]> sjero.net Git - linphone/commitdiff
purge out p2pproxy
authorSimon Morlat <simon.morlat@hp.com>
Wed, 20 Jan 2010 14:44:30 +0000 (15:44 +0100)
committerSimon Morlat <simon.morlat@hp.com>
Wed, 20 Jan 2010 14:44:30 +0000 (15:44 +0100)
1344 files changed:
.gitmodules
ABOUT-NLS [new file with mode: 0644]
AUTHORS [new file with mode: 0644]
BUGS [new file with mode: 0644]
COPYING [new file with mode: 0644]
ChangeLog [new file with mode: 0644]
Makefile.am [new file with mode: 0644]
NEWS [new file with mode: 0644]
README [new file with mode: 0644]
README.M68k.txt [new file with mode: 0644]
README.arm [new file with mode: 0644]
README.macos [new file with mode: 0644]
README.mingw [new file with mode: 0644]
TODO [new file with mode: 0644]
autogen.sh [new file with mode: 0755]
build/wince/liblinphone.sln [new file with mode: 0644]
build/wince/liblinphone.vcproj [new file with mode: 0644]
build/wince/linphonec/linphonec.vcproj [new file with mode: 0644]
config.rpath [new file with mode: 0755]
configure.in [new file with mode: 0644]
console/.gitignore [new file with mode: 0644]
console/Makefile.am [new file with mode: 0644]
console/TODO [new file with mode: 0644]
console/commands.c [new file with mode: 0644]
console/example/linphonec [new file with mode: 0644]
console/linphonec.c [new file with mode: 0644]
console/linphonec.h [new file with mode: 0644]
console/shell.c [new file with mode: 0644]
console/sipomatic.c [new file with mode: 0644]
console/sipomatic.h [new file with mode: 0644]
console/wav2raw.c [new file with mode: 0644]
coreapi/.gitignore [new file with mode: 0644]
coreapi/Makefile.am [new file with mode: 0644]
coreapi/address.c [new file with mode: 0644]
coreapi/authentication.c [new file with mode: 0644]
coreapi/chat.c [new file with mode: 0644]
coreapi/enum.c [new file with mode: 0644]
coreapi/enum.h [new file with mode: 0644]
coreapi/exevents.c [new file with mode: 0644]
coreapi/exevents.h [new file with mode: 0644]
coreapi/fonis.c [new file with mode: 0644]
coreapi/friend.c [new file with mode: 0644]
coreapi/general_state.c [new file with mode: 0644]
coreapi/help/Doxyfile.in [new file with mode: 0644]
coreapi/help/Makefile.am [new file with mode: 0644]
coreapi/help/doxygen.dox.in [new file with mode: 0644]
coreapi/linphonecore.c [new file with mode: 0644]
coreapi/linphonecore.h [new file with mode: 0644]
coreapi/lpconfig.c [new file with mode: 0644]
coreapi/lpconfig.h [new file with mode: 0644]
coreapi/misc.c [new file with mode: 0644]
coreapi/plugins/buddylookup/AUTHORS [new file with mode: 0644]
coreapi/plugins/buddylookup/COPYING [new file with mode: 0644]
coreapi/plugins/buddylookup/ChangeLog [new file with mode: 0644]
coreapi/plugins/buddylookup/INSTALL [new file with mode: 0644]
coreapi/plugins/buddylookup/Makefile.am [new file with mode: 0644]
coreapi/plugins/buddylookup/NEWS [new file with mode: 0644]
coreapi/plugins/buddylookup/README [new file with mode: 0644]
coreapi/plugins/buddylookup/autogen.sh [new file with mode: 0755]
coreapi/plugins/buddylookup/configure.ac [new file with mode: 0644]
coreapi/plugins/buddylookup/src/Makefile.am [new file with mode: 0644]
coreapi/plugins/buddylookup/src/lookup.c [new file with mode: 0644]
coreapi/presence.c [new file with mode: 0644]
coreapi/private.h [new file with mode: 0644]
coreapi/proxy.c [new file with mode: 0644]
coreapi/sdphandler.c [new file with mode: 0644]
coreapi/sdphandler.h [new file with mode: 0644]
coreapi/siplogin.c [new file with mode: 0644]
coreapi/sipsetup.c [new file with mode: 0644]
coreapi/sipsetup.h [new file with mode: 0644]
gen-gtkfilelist.sh [new file with mode: 0755]
gtk+-2.16.2.filelist [new file with mode: 0755]
gtk+-2.16.6.filelist [new file with mode: 0644]
gtk+-2.18.5.filelist [new file with mode: 0644]
gtk-glade/.gitignore [new file with mode: 0644]
gtk-glade/Makefile.am [new file with mode: 0644]
gtk-glade/about.glade [new file with mode: 0644]
gtk-glade/buddylookup.c [new file with mode: 0644]
gtk-glade/buddylookup.glade [new file with mode: 0644]
gtk-glade/call_logs.glade [new file with mode: 0644]
gtk-glade/calllogs.c [new file with mode: 0644]
gtk-glade/chat.c [new file with mode: 0644]
gtk-glade/chatroom.glade [new file with mode: 0644]
gtk-glade/contact.glade [new file with mode: 0644]
gtk-glade/fonis.c [new file with mode: 0644]
gtk-glade/friendlist.c [new file with mode: 0644]
gtk-glade/gtkrc [new file with mode: 0644]
gtk-glade/incall_view.c [new file with mode: 0644]
gtk-glade/incoming_call.glade [new file with mode: 0644]
gtk-glade/linphone.h [new file with mode: 0644]
gtk-glade/linphone.ico [new file with mode: 0755]
gtk-glade/linphone.iss [new file with mode: 0755]
gtk-glade/linphone.png [new file with mode: 0644]
gtk-glade/linphone.rc [new file with mode: 0755]
gtk-glade/linphone2.png [new file with mode: 0644]
gtk-glade/log.glade [new file with mode: 0644]
gtk-glade/logging.c [new file with mode: 0644]
gtk-glade/loginframe.c [new file with mode: 0644]
gtk-glade/main.c [new file with mode: 0644]
gtk-glade/main.glade [new file with mode: 0644]
gtk-glade/p2pwizard.glade [new file with mode: 0644]
gtk-glade/parameters.glade [new file with mode: 0644]
gtk-glade/password.glade [new file with mode: 0644]
gtk-glade/propertybox.c [new file with mode: 0644]
gtk-glade/setupwizard.c [new file with mode: 0644]
gtk-glade/sip_account.glade [new file with mode: 0644]
gtk-glade/stock_people.png [new file with mode: 0644]
gtk-glade/support.c [new file with mode: 0644]
gtk-glade/update.c [new file with mode: 0755]
gtk-glade/utils.c [new file with mode: 0644]
gtk-glade/waiting.glade [new file with mode: 0644]
intl/ChangeLog [new file with mode: 0644]
intl/Makefile.in [new file with mode: 0644]
intl/VERSION [new file with mode: 0644]
intl/bindtextdom.c [new file with mode: 0644]
intl/cat-compat.c [new file with mode: 0644]
intl/dcgettext.c [new file with mode: 0644]
intl/dgettext.c [new file with mode: 0644]
intl/explodename.c [new file with mode: 0644]
intl/finddomain.c [new file with mode: 0644]
intl/gettext.c [new file with mode: 0644]
intl/gettext.h [new file with mode: 0644]
intl/gettextP.h [new file with mode: 0644]
intl/hash-string.h [new file with mode: 0644]
intl/intl-compat.c [new file with mode: 0644]
intl/l10nflist.c [new file with mode: 0644]
intl/libgettext.h [new file with mode: 0644]
intl/linux-msg.sed [new file with mode: 0644]
intl/loadinfo.h [new file with mode: 0644]
intl/loadmsgcat.c [new file with mode: 0644]
intl/localealias.c [new file with mode: 0644]
intl/po2tbl.sed.in [new file with mode: 0644]
intl/textdomain.c [new file with mode: 0644]
intl/xopen-msg.sed [new file with mode: 0644]
intltool-extract.in [new file with mode: 0644]
intltool-merge.in [new file with mode: 0644]
intltool-update.in [new file with mode: 0644]
linphone-deps.filelist [new file with mode: 0755]
linphone.iss.in [new file with mode: 0644]
linphone.kdevelop [new file with mode: 0644]
linphone.spec.in [new file with mode: 0644]
linphone/ABOUT-NLS [deleted file]
linphone/AUTHORS [deleted file]
linphone/BUGS [deleted file]
linphone/COPYING [deleted file]
linphone/ChangeLog [deleted file]
linphone/Makefile.am [deleted file]
linphone/NEWS [deleted file]
linphone/README [deleted file]
linphone/README.M68k.txt [deleted file]
linphone/README.arm [deleted file]
linphone/README.macos [deleted file]
linphone/README.mingw [deleted file]
linphone/TODO [deleted file]
linphone/autogen.sh [deleted file]
linphone/build/wince/liblinphone.sln [deleted file]
linphone/build/wince/liblinphone.vcproj [deleted file]
linphone/build/wince/linphonec/linphonec.vcproj [deleted file]
linphone/config.rpath [deleted file]
linphone/configure.in [deleted file]
linphone/console/.gitignore [deleted file]
linphone/console/Makefile.am [deleted file]
linphone/console/TODO [deleted file]
linphone/console/commands.c [deleted file]
linphone/console/example/linphonec [deleted file]
linphone/console/linphonec.c [deleted file]
linphone/console/linphonec.h [deleted file]
linphone/console/shell.c [deleted file]
linphone/console/sipomatic.c [deleted file]
linphone/console/sipomatic.h [deleted file]
linphone/console/wav2raw.c [deleted file]
linphone/coreapi/.gitignore [deleted file]
linphone/coreapi/Makefile.am [deleted file]
linphone/coreapi/address.c [deleted file]
linphone/coreapi/authentication.c [deleted file]
linphone/coreapi/chat.c [deleted file]
linphone/coreapi/enum.c [deleted file]
linphone/coreapi/enum.h [deleted file]
linphone/coreapi/exevents.c [deleted file]
linphone/coreapi/exevents.h [deleted file]
linphone/coreapi/fonis.c [deleted file]
linphone/coreapi/friend.c [deleted file]
linphone/coreapi/general_state.c [deleted file]
linphone/coreapi/help/Doxyfile.in [deleted file]
linphone/coreapi/help/Makefile.am [deleted file]
linphone/coreapi/help/doxygen.dox.in [deleted file]
linphone/coreapi/linphonecore.c [deleted file]
linphone/coreapi/linphonecore.h [deleted file]
linphone/coreapi/lpconfig.c [deleted file]
linphone/coreapi/lpconfig.h [deleted file]
linphone/coreapi/misc.c [deleted file]
linphone/coreapi/plugins/buddylookup/AUTHORS [deleted file]
linphone/coreapi/plugins/buddylookup/COPYING [deleted file]
linphone/coreapi/plugins/buddylookup/ChangeLog [deleted file]
linphone/coreapi/plugins/buddylookup/INSTALL [deleted file]
linphone/coreapi/plugins/buddylookup/Makefile.am [deleted file]
linphone/coreapi/plugins/buddylookup/NEWS [deleted file]
linphone/coreapi/plugins/buddylookup/README [deleted file]
linphone/coreapi/plugins/buddylookup/autogen.sh [deleted file]
linphone/coreapi/plugins/buddylookup/configure.ac [deleted file]
linphone/coreapi/plugins/buddylookup/src/Makefile.am [deleted file]
linphone/coreapi/plugins/buddylookup/src/lookup.c [deleted file]
linphone/coreapi/presence.c [deleted file]
linphone/coreapi/private.h [deleted file]
linphone/coreapi/proxy.c [deleted file]
linphone/coreapi/sdphandler.c [deleted file]
linphone/coreapi/sdphandler.h [deleted file]
linphone/coreapi/siplogin.c [deleted file]
linphone/coreapi/sipsetup.c [deleted file]
linphone/coreapi/sipsetup.h [deleted file]
linphone/gen-gtkfilelist.sh [deleted file]
linphone/gtk+-2.16.2.filelist [deleted file]
linphone/gtk+-2.16.6.filelist [deleted file]
linphone/gtk+-2.18.5.filelist [deleted file]
linphone/gtk-glade/.gitignore [deleted file]
linphone/gtk-glade/Makefile.am [deleted file]
linphone/gtk-glade/about.glade [deleted file]
linphone/gtk-glade/buddylookup.c [deleted file]
linphone/gtk-glade/buddylookup.glade [deleted file]
linphone/gtk-glade/call_logs.glade [deleted file]
linphone/gtk-glade/calllogs.c [deleted file]
linphone/gtk-glade/chat.c [deleted file]
linphone/gtk-glade/chatroom.glade [deleted file]
linphone/gtk-glade/contact.glade [deleted file]
linphone/gtk-glade/fonis.c [deleted file]
linphone/gtk-glade/friendlist.c [deleted file]
linphone/gtk-glade/gtkrc [deleted file]
linphone/gtk-glade/incall_view.c [deleted file]
linphone/gtk-glade/incoming_call.glade [deleted file]
linphone/gtk-glade/linphone.h [deleted file]
linphone/gtk-glade/linphone.ico [deleted file]
linphone/gtk-glade/linphone.iss [deleted file]
linphone/gtk-glade/linphone.png [deleted file]
linphone/gtk-glade/linphone.rc [deleted file]
linphone/gtk-glade/linphone2.png [deleted file]
linphone/gtk-glade/log.glade [deleted file]
linphone/gtk-glade/logging.c [deleted file]
linphone/gtk-glade/loginframe.c [deleted file]
linphone/gtk-glade/main.c [deleted file]
linphone/gtk-glade/main.glade [deleted file]
linphone/gtk-glade/p2pwizard.glade [deleted file]
linphone/gtk-glade/parameters.glade [deleted file]
linphone/gtk-glade/password.glade [deleted file]
linphone/gtk-glade/propertybox.c [deleted file]
linphone/gtk-glade/setupwizard.c [deleted file]
linphone/gtk-glade/sip_account.glade [deleted file]
linphone/gtk-glade/stock_people.png [deleted file]
linphone/gtk-glade/support.c [deleted file]
linphone/gtk-glade/update.c [deleted file]
linphone/gtk-glade/utils.c [deleted file]
linphone/gtk-glade/waiting.glade [deleted file]
linphone/intl/ChangeLog [deleted file]
linphone/intl/Makefile.in [deleted file]
linphone/intl/VERSION [deleted file]
linphone/intl/bindtextdom.c [deleted file]
linphone/intl/cat-compat.c [deleted file]
linphone/intl/dcgettext.c [deleted file]
linphone/intl/dgettext.c [deleted file]
linphone/intl/explodename.c [deleted file]
linphone/intl/finddomain.c [deleted file]
linphone/intl/gettext.c [deleted file]
linphone/intl/gettext.h [deleted file]
linphone/intl/gettextP.h [deleted file]
linphone/intl/hash-string.h [deleted file]
linphone/intl/intl-compat.c [deleted file]
linphone/intl/l10nflist.c [deleted file]
linphone/intl/libgettext.h [deleted file]
linphone/intl/linux-msg.sed [deleted file]
linphone/intl/loadinfo.h [deleted file]
linphone/intl/loadmsgcat.c [deleted file]
linphone/intl/localealias.c [deleted file]
linphone/intl/po2tbl.sed.in [deleted file]
linphone/intl/textdomain.c [deleted file]
linphone/intl/xopen-msg.sed [deleted file]
linphone/intltool-extract.in [deleted file]
linphone/intltool-merge.in [deleted file]
linphone/intltool-update.in [deleted file]
linphone/linphone-deps.filelist [deleted file]
linphone/linphone.iss.in [deleted file]
linphone/linphone.kdevelop [deleted file]
linphone/linphone.spec.in [deleted file]
linphone/m4/.gitignore [deleted file]
linphone/m4/Makefile.am [deleted file]
linphone/m4/codeset.m4 [deleted file]
linphone/m4/exosip.m4 [deleted file]
linphone/m4/gettext.m4 [deleted file]
linphone/m4/glibc2.m4 [deleted file]
linphone/m4/glibc21.m4 [deleted file]
linphone/m4/iconv.m4 [deleted file]
linphone/m4/ilbc.m4 [deleted file]
linphone/m4/intdiv0.m4 [deleted file]
linphone/m4/intl.m4 [deleted file]
linphone/m4/intldir.m4 [deleted file]
linphone/m4/intmax.m4 [deleted file]
linphone/m4/inttypes-pri.m4 [deleted file]
linphone/m4/inttypes.m4 [deleted file]
linphone/m4/inttypes_h.m4 [deleted file]
linphone/m4/isc-posix.m4 [deleted file]
linphone/m4/lcmessage.m4 [deleted file]
linphone/m4/lib-ld.m4 [deleted file]
linphone/m4/lib-link.m4 [deleted file]
linphone/m4/lib-prefix.m4 [deleted file]
linphone/m4/lock.m4 [deleted file]
linphone/m4/longdouble.m4 [deleted file]
linphone/m4/longlong.m4 [deleted file]
linphone/m4/nls.m4 [deleted file]
linphone/m4/ortp.m4 [deleted file]
linphone/m4/osip.m4 [deleted file]
linphone/m4/po.m4 [deleted file]
linphone/m4/printf-posix.m4 [deleted file]
linphone/m4/progtest.m4 [deleted file]
linphone/m4/readline.m4 [deleted file]
linphone/m4/signed.m4 [deleted file]
linphone/m4/size_max.m4 [deleted file]
linphone/m4/stdint_h.m4 [deleted file]
linphone/m4/uintmax_t.m4 [deleted file]
linphone/m4/ulonglong.m4 [deleted file]
linphone/m4/video.m4 [deleted file]
linphone/m4/visibility.m4 [deleted file]
linphone/m4/wchar_t.m4 [deleted file]
linphone/m4/wint_t.m4 [deleted file]
linphone/m4/xsize.m4 [deleted file]
linphone/media_api/.gitignore [deleted file]
linphone/media_api/DESIGN.txt [deleted file]
linphone/media_api/Makefile.am [deleted file]
linphone/media_api/apitest.c [deleted file]
linphone/media_api/apitest.h [deleted file]
linphone/media_api/basiccall.c [deleted file]
linphone/media_api/basiccall.h [deleted file]
linphone/media_api/callmember.c [deleted file]
linphone/media_api/callmember.h [deleted file]
linphone/media_api/ccl [deleted file]
linphone/media_api/common.h [deleted file]
linphone/media_api/media_api.c [deleted file]
linphone/media_api/media_api.h [deleted file]
linphone/media_api/mediaflow.c [deleted file]
linphone/media_api/mediaflow.h [deleted file]
linphone/mingw-envsetup.sh [deleted file]
linphone/pixmaps/.gitignore [deleted file]
linphone/pixmaps/Makefile.am [deleted file]
linphone/pixmaps/green.png [deleted file]
linphone/pixmaps/linphone.png [deleted file]
linphone/pixmaps/linphone2.png [deleted file]
linphone/pixmaps/linphone2.xpm [deleted file]
linphone/pixmaps/mic_active.png [deleted file]
linphone/pixmaps/mic_muted.png [deleted file]
linphone/pixmaps/red.png [deleted file]
linphone/pixmaps/sip-away.png [deleted file]
linphone/pixmaps/sip-bifm.png [deleted file]
linphone/pixmaps/sip-busy.png [deleted file]
linphone/pixmaps/sip-closed.png [deleted file]
linphone/pixmaps/sip-online.png [deleted file]
linphone/pixmaps/sip-otl.png [deleted file]
linphone/pixmaps/sip-otp.png [deleted file]
linphone/pixmaps/sip-wfa.png [deleted file]
linphone/po/.gitignore [deleted file]
linphone/po/ChangeLog [deleted file]
linphone/po/Makefile.in.in [deleted file]
linphone/po/Makevars [deleted file]
linphone/po/Makevars.template [deleted file]
linphone/po/POTFILES.in [deleted file]
linphone/po/POTFILES.skip [deleted file]
linphone/po/Rules-quot [deleted file]
linphone/po/boldquot.sed [deleted file]
linphone/po/cat-id-tbl.c [deleted file]
linphone/po/cs.po [deleted file]
linphone/po/de.po [deleted file]
linphone/po/en@boldquot.header [deleted file]
linphone/po/en@quot.header [deleted file]
linphone/po/es.po [deleted file]
linphone/po/fr.po [deleted file]
linphone/po/hu.po [deleted file]
linphone/po/insert-header.sin [deleted file]
linphone/po/it.po [deleted file]
linphone/po/ja.po [deleted file]
linphone/po/nl.po [deleted file]
linphone/po/pl.po [deleted file]
linphone/po/pt_BR.po [deleted file]
linphone/po/quot.sed [deleted file]
linphone/po/remove-potcdate.sin [deleted file]
linphone/po/ru.po [deleted file]
linphone/po/sv.po [deleted file]
linphone/po/zh_CN.po [deleted file]
linphone/scripts/Makefile.am [deleted file]
linphone/scripts/Portfile-devel.tmpl [deleted file]
linphone/scripts/Portfile.tmpl [deleted file]
linphone/scripts/builder-mingw.mk [deleted file]
linphone/share/.gitignore [deleted file]
linphone/share/C/.gitignore [deleted file]
linphone/share/C/Makefile.am [deleted file]
linphone/share/C/linphone.1 [deleted file]
linphone/share/C/linphonec.1 [deleted file]
linphone/share/C/linphonecsh.1 [deleted file]
linphone/share/C/manual.lyx [deleted file]
linphone/share/C/manual.sgml [deleted file]
linphone/share/C/sipomatic.1 [deleted file]
linphone/share/Makefile.am [deleted file]
linphone/share/Makefile.inc [deleted file]
linphone/share/cs/.gitignore [deleted file]
linphone/share/cs/Makefile.am [deleted file]
linphone/share/cs/linphone.1 [deleted file]
linphone/share/cs/linphonec.1 [deleted file]
linphone/share/cs/sipomatic.1 [deleted file]
linphone/share/fr/.gitignore [deleted file]
linphone/share/fr/Makefile.am [deleted file]
linphone/share/fr/manual.lyx [deleted file]
linphone/share/fr/manual.sgml [deleted file]
linphone/share/hello16000.wav [deleted file]
linphone/share/hello8000.wav [deleted file]
linphone/share/it/.gitignore [deleted file]
linphone/share/it/Makefile.am [deleted file]
linphone/share/it/manual.lyx [deleted file]
linphone/share/it/manual.sgml [deleted file]
linphone/share/ja/.gitignore [deleted file]
linphone/share/ja/Makefile.am [deleted file]
linphone/share/ja/manual.lyx [deleted file]
linphone/share/ja/manual.sgml [deleted file]
linphone/share/linphone.desktop [deleted file]
linphone/share/linphone.gnorba [deleted file]
linphone/share/linphone.pc.in [deleted file]
linphone/share/linphone_applet.desktop [deleted file]
linphone/share/ringback.wav [deleted file]
linphone/share/rings/bigben.wav [deleted file]
linphone/share/rings/oldphone.wav [deleted file]
linphone/share/rings/orig.wav [deleted file]
linphone/share/rings/rock.wav [deleted file]
linphone/share/rings/sweet.wav [deleted file]
linphone/share/rings/synth.wav [deleted file]
linphone/share/rings/tapping.wav [deleted file]
linphone/share/rings/toy.wav [deleted file]
linphone/stamp-h.in [deleted file]
m4/.gitignore [new file with mode: 0644]
m4/Makefile.am [new file with mode: 0644]
m4/codeset.m4 [new file with mode: 0644]
m4/exosip.m4 [new file with mode: 0644]
m4/gettext.m4 [new file with mode: 0644]
m4/glibc2.m4 [new file with mode: 0644]
m4/glibc21.m4 [new file with mode: 0644]
m4/iconv.m4 [new file with mode: 0644]
m4/ilbc.m4 [new file with mode: 0644]
m4/intdiv0.m4 [new file with mode: 0644]
m4/intl.m4 [new file with mode: 0644]
m4/intldir.m4 [new file with mode: 0644]
m4/intmax.m4 [new file with mode: 0644]
m4/inttypes-pri.m4 [new file with mode: 0644]
m4/inttypes.m4 [new file with mode: 0644]
m4/inttypes_h.m4 [new file with mode: 0644]
m4/isc-posix.m4 [new file with mode: 0644]
m4/lcmessage.m4 [new file with mode: 0644]
m4/lib-ld.m4 [new file with mode: 0644]
m4/lib-link.m4 [new file with mode: 0644]
m4/lib-prefix.m4 [new file with mode: 0644]
m4/lock.m4 [new file with mode: 0644]
m4/longdouble.m4 [new file with mode: 0644]
m4/longlong.m4 [new file with mode: 0644]
m4/nls.m4 [new file with mode: 0644]
m4/ortp.m4 [new file with mode: 0644]
m4/osip.m4 [new file with mode: 0644]
m4/po.m4 [new file with mode: 0644]
m4/printf-posix.m4 [new file with mode: 0644]
m4/progtest.m4 [new file with mode: 0644]
m4/readline.m4 [new file with mode: 0644]
m4/signed.m4 [new file with mode: 0644]
m4/size_max.m4 [new file with mode: 0644]
m4/stdint_h.m4 [new file with mode: 0644]
m4/uintmax_t.m4 [new file with mode: 0644]
m4/ulonglong.m4 [new file with mode: 0644]
m4/video.m4 [new file with mode: 0644]
m4/visibility.m4 [new file with mode: 0644]
m4/wchar_t.m4 [new file with mode: 0644]
m4/wint_t.m4 [new file with mode: 0644]
m4/xsize.m4 [new file with mode: 0644]
media_api/.gitignore [new file with mode: 0644]
media_api/DESIGN.txt [new file with mode: 0644]
media_api/Makefile.am [new file with mode: 0644]
media_api/apitest.c [new file with mode: 0644]
media_api/apitest.h [new file with mode: 0644]
media_api/basiccall.c [new file with mode: 0644]
media_api/basiccall.h [new file with mode: 0644]
media_api/callmember.c [new file with mode: 0644]
media_api/callmember.h [new file with mode: 0644]
media_api/ccl [new file with mode: 0644]
media_api/common.h [new file with mode: 0644]
media_api/media_api.c [new file with mode: 0644]
media_api/media_api.h [new file with mode: 0644]
media_api/mediaflow.c [new file with mode: 0644]
media_api/mediaflow.h [new file with mode: 0644]
p2pproxy/.classpath [deleted file]
p2pproxy/.cvsignore [deleted file]
p2pproxy/.gcjbuilder [deleted file]
p2pproxy/.project [deleted file]
p2pproxy/AUTHORS [deleted file]
p2pproxy/COPYING [deleted file]
p2pproxy/ChangeLog [deleted file]
p2pproxy/INSTALL [deleted file]
p2pproxy/Makefile.am [deleted file]
p2pproxy/NEWS [deleted file]
p2pproxy/README [deleted file]
p2pproxy/autogen.sh [deleted file]
p2pproxy/bin/p2pproxy-cmd.bat [deleted file]
p2pproxy/bin/p2pproxy-cmd.sh [deleted file]
p2pproxy/bin/p2pproxy.bat [deleted file]
p2pproxy/bin/p2pproxy.sh [deleted file]
p2pproxy/build.xml [deleted file]
p2pproxy/configure.ac [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/ChangeRequest.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/ChangedAddress.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/Data.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/Dummy.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/ErrorCode.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/MappedAddress.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/MappedResponseChangedSourceAddressReflectedFrom.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/MessageAttribute.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/MessageAttributeException.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/MessageAttributeInterface.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/MessageAttributeParsingException.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/MessageIntegrity.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/Password.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/ReflectedFrom.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/ResponseAddress.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/SourceAddress.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/UnknownAttribute.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/UnknownMessageAttributeException.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/Username.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/header/MessageHeader.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/header/MessageHeaderException.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/header/MessageHeaderInterface.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/header/MessageHeaderParsingException.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/test/BindingLifetimeTest.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/test/DiscoveryInfo.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/test/DiscoveryTest.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/test/demo/BindingLifetimeTestDemo.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/test/demo/DiscoveryTestDemo.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/test/demo/StunServer.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/test/demo/ice/Candidate.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/test/demo/ice/ICENegociator.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/util/Address.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/util/Utility.java [deleted file]
p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/util/UtilityException.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/pom.xml [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/Version.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/access/AccessService.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/access/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/codat/Codat.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/codat/CodatID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/codat/Metadata.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/codat/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/credential/AuthenticationCredential.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/credential/Credential.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/credential/CredentialPCLSupport.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/credential/CredentialValidator.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/credential/PrivilegedOperation.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/credential/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/discovery/DiscoveryEvent.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/discovery/DiscoveryListener.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/discovery/DiscoveryService.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/discovery/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/Advertisement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/AdvertisementFactory.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/Attributable.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/Attribute.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/BinaryDocument.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/Document.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/DocumentByteArrayIO.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/DocumentByteBufferIO.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/DocumentStreamIO.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/Element.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/ExtendableAdvertisement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/FileDocument.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/MimeMediaType.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/StructuredDocument.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/StructuredDocumentFactory.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/StructuredDocumentUtils.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/StructuredTextDocument.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/TextDocument.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/TextDocumentCharArrayIO.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/TextDocumentCharBufferIO.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/TextDocumentCharSequenceIO.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/TextDocumentReaderIO.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/TextElement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/XMLDocument.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/XMLElement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/AbstractMessenger.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/AsyncChannelMessenger.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/ByteArrayMessageElement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/ChannelMessenger.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/EndpointAddress.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/EndpointListener.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/EndpointService.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/InputStreamMessageElement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/ListenerAdaptor.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/Message.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessageElement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessageFilterListener.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessagePropagater.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessageReceiver.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessageSender.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessageTransport.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/Messenger.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessengerEvent.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessengerEventListener.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessengerState.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/OutgoingMessageEvent.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/OutgoingMessageEventListener.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/StringMessageElement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/TextDocumentMessageElement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/TextMessageElement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/ThreadedMessenger.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/WireFormatMessage.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/WireFormatMessageFactory.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/exception/ConfiguratorException.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/exception/JxtaError.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/exception/JxtaException.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/exception/PeerGroupException.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/exception/ProtocolNotSupportedException.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/exception/ServiceNotFoundException.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/exception/UnknownServiceException.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/exception/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/id/ID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/id/IDFactory.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/id/jxta/IDFormat.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/id/jxta/Instantiator.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/id/jxta/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/id/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/logging/Logging.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/logging/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/membership/Authenticator.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/membership/InteractiveAuthenticator.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/membership/MembershipService.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/membership/doc-files/memberAndAccess.png [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/membership/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/MonitorEvent.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/MonitorException.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/MonitorFilter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/MonitorFilterException.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/MonitorListener.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/MonitorReport.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/MonitorResources.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/PeerMonitorInfo.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/PeerMonitorInfoEvent.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/PeerMonitorInfoListener.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/ServiceMetric.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/ServiceMonitor.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/ServiceMonitorFilter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/overview.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peer/PeerID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peer/PeerInfoEvent.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peer/PeerInfoListener.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peer/PeerInfoService.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peer/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peergroup/Configurator.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peergroup/LightWeightPeerGroup.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peergroup/NetPeerGroupFactory.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peergroup/PeerGroup.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peergroup/PeerGroupFactory.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peergroup/PeerGroupID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peergroup/WorldPeerGroupFactory.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peergroup/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/InputPipe.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/OutputPipe.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/OutputPipeEvent.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/OutputPipeListener.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/PipeID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/PipeMsgEvent.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/PipeMsgListener.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/PipeService.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/platform/Application.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/platform/JxtaLoader.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/platform/Module.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/platform/ModuleClassID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/platform/ModuleSpecID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/platform/NetworkConfigurator.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/platform/NetworkManager.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/platform/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/AccessPointAdvertisement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/ConfigParams.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/DiscoveryQueryMsg.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/DiscoveryResponseMsg.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/ModuleClassAdvertisement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/ModuleImplAdvertisement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/ModuleSpecAdvertisement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/PeerAdvertisement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/PeerGroupAdvertisement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/PeerInfoQueryMessage.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/PeerInfoResponseMessage.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/PipeAdvertisement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/PipeResolverMessage.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/RdvAdvertisement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/ResolverQueryMsg.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/ResolverResponseMsg.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/ResolverSrdiMsg.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/RouteAdvertisement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/RouteQueryMsg.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/RouteResponseMsg.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/SignedAdvertisement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/SrdiMessage.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/TransportAdvertisement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/rendezvous/RendezVousService.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/rendezvous/RendezVousStatus.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/rendezvous/RendezvousEvent.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/rendezvous/RendezvousListener.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/rendezvous/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/resolver/GenericResolver.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/resolver/QueryHandler.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/resolver/ResolverService.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/resolver/SrdiHandler.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/resolver/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/service/Service.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/service/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/socket/JxtaMulticastSocket.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/socket/JxtaServerSocket.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/socket/JxtaSocket.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/socket/JxtaSocketAddress.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/socket/JxtaSocketInputStream.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/socket/JxtaSocketOutputStream.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/socket/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/user.properties [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/AbstractSimpleSelectable.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/AdvertisementUtilities.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/AwtUtils.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/ClassFactory.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/CountingInputStream.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/CountingOutputStream.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/CountingWriter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/DevNullOutputStream.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/DevNullWriter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/DocumentUtilities.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/IgnoreFlushFilterOutputStream.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/JxtaBiDiPipe.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/JxtaServerPipe.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/LimitInputStream.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/MarkProhibitedFilterStream.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/MessageUtilities.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/PipeEventListener.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/PipeStateListener.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/PipeUtilities.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/SimpleSelectable.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/SimpleSelector.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/WatchedInputStream.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/WatchedOutputStream.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/WatchedStream.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/documentSerializable/DocumentSerializable.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/documentSerializable/DocumentSerializableUtilities.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/documentSerializable/DocumentSerializationException.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/api/src/sun/net/www/protocol/urn/Handler.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/META-INF/services/net.jxta.document.Advertisement [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/META-INF/services/net.jxta.document.StructuredDocument [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/META-INF/services/net.jxta.endpoint.WireFormatMessage [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/META-INF/services/net.jxta.id.ID [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/META-INF/services/net.jxta.platform.Module [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/Version.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/access/AccessList.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/access/always/AlwaysAccessService.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/access/always/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/access/pse/PSEAccessService.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/access/pse/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/access/simpleACL/SimpleACLAccessService.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/access/simpleACL/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/cm/Cm.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/cm/Indexer.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/cm/Srdi.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/cm/SrdiIndex.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/config.properties [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/discovery/DiscoveryServiceImpl.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/discovery/DiscoveryServiceInterface.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/discovery/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/document/DOMXMLDocument.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/document/DOMXMLElement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/document/LiteXMLDocument.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/document/LiteXMLElement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/document/PlainTextDocument.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/document/PlainTextElement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/document/TextDocumentCommon.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/BlockingMessenger.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/EndpointServiceImpl.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/EndpointServiceInterface.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/EndpointUtils.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/IPUtils.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/JxtaMessageMessageElement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/LoopbackMessenger.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/SocketFactory.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/WireFormatMessageBinary.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/cbjx/CbJxDefs.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/cbjx/CbJxMessageInfo.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/cbjx/CbJxMessenger.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/cbjx/CbJxTransport.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/cbjx/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/ConditionalEndpointMeterBuildSettings.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/EndpointMeter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/EndpointMeterBuildSettings.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/EndpointMetric.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/EndpointServiceMetric.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/EndpointServiceMonitor.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/EndpointServiceMonitorFilter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/InboundMeter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/InboundMetric.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/IncomingMessageListenerMeter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/MessengerMeter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/OutboundMeter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/OutboundMetric.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/PropagationMeter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/PropagationMetric.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/mcast/McastTransport.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/mcast/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/msgframing/MessagePackageHeader.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/msgframing/WelcomeMessage.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/relay/RelayClient.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/relay/RelayReferralSeedingManager.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/relay/RelayServer.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/relay/RelayServerClient.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/relay/RelayTransport.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/relay/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/BadRoute.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/Destinations.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/EndpointRouter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/EndpointRouterMessage.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/RouteCM.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/RouteControl.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/RouteResolver.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/RouterMessenger.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/servlethttp/HttpClientMessenger.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/servlethttp/HttpMessageReceiver.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/servlethttp/HttpMessageSender.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/servlethttp/HttpMessageServlet.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/servlethttp/HttpServletMessenger.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/servlethttp/ServletHttpTransport.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/servlethttp/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tcp/IncomingUnicastServer.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tcp/TcpMessenger.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tcp/TcpTransport.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tcp/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/JTlsDefs.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/JTlsInputStream.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/JTlsOutputStream.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/TlsConn.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/TlsManager.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/TlsMessenger.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/TlsSocket.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/TlsTransport.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/ConditionalTransportMeterBuildSettings.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/TransportBindingMeter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/TransportBindingMetric.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/TransportMeter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/TransportMeterBuildSettings.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/TransportMetric.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/TransportServiceMetric.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/TransportServiceMonitor.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/TransportServiceMonitorFilter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/CodatID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/IDFormat.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/Instantiator.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/ModuleClassID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/ModuleSpecID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/PeerGroupID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/PeerID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/PipeID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/CodatID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/IDBytes.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/IDFormat.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/Instantiator.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/ModuleClassID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/ModuleSpecID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/PeerGroupID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/PeerID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/PipeID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/UUID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/UUIDFactory.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/BinaryID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/BinaryIDFactory.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/CodatBinaryID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/DigestTool.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/IDFormat.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/Instantiator.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/ModuleClassBinaryID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/ModuleSpecBinaryID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/PeerBinaryID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/PeerGroupBinaryID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/PipeBinaryID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/unknown/ID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/unknown/IDFormat.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/unknown/Instantiator.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/unknown/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/loader/RefJxtaLoader.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/loader/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/PasswdMembershipService.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/none/NoneMembershipService.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/none/NoneMembershipServiceBeanInfo.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/none/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/passwd/PasswdMembershipService.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/passwd/PasswdMembershipServiceBeanInfo.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/passwd/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/CMKeyStoreManager.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/DialogAuthenticator.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/EngineAuthenticator.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/FileKeyStoreManager.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/KeyStoreManager.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSEAuthenticatorEngine.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSEAuthenticatorEngineFactory.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSEConfig.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSECredential.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSECrendentialBeanInfo.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSEKeyStoreManagerFactory.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSEMembershipService.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSEMembershipServiceBeanInfo.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSEPeerSecurityEngine.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSESecurityEngineFactory.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSEUtils.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/StringAuthenticator.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/URIKeyStoreManager.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/meter/ConditionalMeterBuildSettings.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/meter/GenericServiceMonitor.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/meter/MeterBuildSettings.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/meter/MetricUtilities.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/meter/MonitorManager.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/meter/ServiceMonitorImpl.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/meter/ServiceMonitorPulseInfo.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/meter/ServiceMonitorResource.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/monitor.properties [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/overview.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peer/PeerInfoHandler.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peer/PeerInfoMessenger.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peer/PeerInfoServiceImpl.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peer/PeerInfoServiceInterface.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peer/RemoteMonitorPeerInfoHandler.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peer/RemoteMonitorQuery.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peer/RemoteMonitorResponse.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peer/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/AutomaticConfigurator.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/Boot.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/CompatibilityEquater.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/ConfigDialog.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/DefaultConfigurator.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/GenericPeerGroup.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/IncompleteConfigurationException.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/NullConfigurator.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/PeerGroupInterface.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/Platform.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/PlatformConfigurator.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/RefCountPeerGroupInterface.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/ShadowPeerGroup.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/StdPeerGroup.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/StdPeerGroupParamAdv.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/BlockingWireOutputPipe.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/InputPipeImpl.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/NonBlockingOutputPipe.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/NonBlockingWireOutputPipe.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/PipeRegistrar.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/PipeResolver.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/PipeServiceImpl.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/PipeServiceInterface.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/SecureInputPipeImpl.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/SecureOutputPipe.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/WireHeader.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/WirePipe.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/WirePipeImpl.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/AccessPointAdv.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/Certificate.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/CertificateSigningRequest.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/DiscoveryConfigAdv.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/DiscoveryQuery.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/DiscoveryResponse.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/GroupConfig.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/HTTPAdv.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/LeaseRequestMsg.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/LeaseResponseMsg.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/LimitedRangeRdvMsg.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/ModuleClassAdv.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/ModuleImplAdv.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/ModuleSpecAdv.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PSEConfigAdv.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PeerAdv.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PeerGroupAdv.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PeerGroupConfigAdv.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PeerInfoQueryMsg.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PeerInfoResponseMsg.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PipeAdv.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PipeResolverMsg.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PlatformConfig.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/RdvAdv.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/RdvConfigAdv.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/RelayConfigAdv.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/ResolverQuery.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/ResolverResponse.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/ResolverSrdiMsgImpl.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/RouteAdv.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/RouteQuery.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/RouteResponse.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/SignedAdv.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/SrdiMessageImpl.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/TCPAdv.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/proxy/ProxyService.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/proxy/Requestor.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/PeerConnection.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/RdvGreeter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/RdvWalk.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/RdvWalker.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/RendezVousPropagateMessage.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/RendezVousServiceImpl.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/RendezVousServiceInterface.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/RendezVousServiceProvider.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/StdRendezVousService.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/adhoc/AdhocPeerRdvService.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/edge/EdgePeerRdvService.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/edge/RdvConnection.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/limited/LimitedRangeGreeter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/limited/LimitedRangeWalk.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/limited/LimitedRangeWalker.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rdv/ClientConnection.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rdv/RdvPeerRdvService.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/ClientConnectionMeter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/ClientConnectionMetric.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/ConditionalRendezvousMeterBuildSettings.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/RendezvousConnectionMeter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/RendezvousConnectionMetric.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/RendezvousMeter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/RendezvousMeterBuildSettings.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/RendezvousMetric.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/RendezvousServiceMetric.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/RendezvousServiceMonitor.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/RendezvousServiceMonitorFilter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerView.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerViewDestination.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerViewElement.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerViewEvent.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerViewListener.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerViewRandomStrategy.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerViewRandomWithReplaceStrategy.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerViewSequentialStrategy.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerViewStrategy.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerviewSeedingManager.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/InternalQueryHandler.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/ResolverServiceImpl.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/ResolverServiceInterface.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/ConditionalResolverMeterBuildSettings.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/QueryDestinationMeter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/QueryDestinationMetric.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/QueryHandlerMeter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/QueryHandlerMetric.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/ResolverMeter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/ResolverMeterBuildSettings.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/ResolverMetric.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/ResolverServiceMetric.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/ResolverServiceMonitor.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/ResolverServiceMonitorFilter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/SrdiDestinationMeter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/SrdiDestinationMetric.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/SrdiHandlerMeter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/SrdiHandlerMetric.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/ACLSeedingManager.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/AdvCooker.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/BASE64InputStream.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/BASE64OutputStream.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/Base64.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/Cache.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/CacheEntry.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/CacheEntryListener.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/ConsumerBiasedQueue.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/Dlink.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/Dlist.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/DynamicEnumeration.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/EndpointServiceStatsFilter.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/GenerateID.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/JxtaHash.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/LRUCache.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/ModuleManager.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/ProducerBiasedQueue.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/RdvAdvSeedingManager.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/ResourceAccount.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/ResourceDispatcher.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/SeedingManager.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/SequenceIterator.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/TimeUtils.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/TimerThreadNamer.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/URISeedingManager.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/UnbiasedQueue.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/cm/DumpCm.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/package.html [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/AdaptiveFlowControl.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/Defs.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/FixedFlowControl.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/FlowControl.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/Incoming.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/IncomingPipeAdaptor.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/Outgoing.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/OutgoingMsgrAdaptor.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/OutgoingPipeAdaptor.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/OutgoingPipeAdaptorSync.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/ReliableInputStream.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/ReliableOutputStream.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/Debug.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/DBException.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/DBObject.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/FaultCodes.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/data/Key.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/data/Record.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/data/RecordSet.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/data/Value.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/BTree.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/BTreeCallback.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/BTreeCorruptException.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/BTreeException.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/BTreeFiler.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/BTreeNotFoundException.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/Filer.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/FilerException.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/MemFiler.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/Paged.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/Streamable.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/indexer/IndexQuery.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/indexer/Indexer.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/indexer/NameIndexer.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/util/Named.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/util/XindiceException.java [deleted file]
p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/util/XindiceRuntimeException.java [deleted file]
p2pproxy/dependencies/MJSIP.COPYRIGHT.txt [deleted file]
p2pproxy/dependencies/bcprov-jdk14.jar [deleted file]
p2pproxy/dependencies/bouncycastle-LICENSE.txt [deleted file]
p2pproxy/dependencies/javax.servlet.jar [deleted file]
p2pproxy/dependencies/jstun-0.7.0.jar [deleted file]
p2pproxy/dependencies/junit-4.3.1.jar [deleted file]
p2pproxy/dependencies/jxta_license.html [deleted file]
p2pproxy/dependencies/log4j.LICENSE [deleted file]
p2pproxy/dependencies/log4j.jar [deleted file]
p2pproxy/dependencies/org.mortbay.jetty.jar [deleted file]
p2pproxy/dependencies/sip.jar [deleted file]
p2pproxy/launcher/.cdtproject [deleted file]
p2pproxy/launcher/.cproject [deleted file]
p2pproxy/launcher/.project [deleted file]
p2pproxy/launcher/.settings/org.eclipse.cdt.core.prefs [deleted file]
p2pproxy/launcher/Debug/makefile [deleted file]
p2pproxy/launcher/Debug/objects.mk [deleted file]
p2pproxy/launcher/Debug/sources.mk [deleted file]
p2pproxy/launcher/Debug/src/launcher-tester.d [deleted file]
p2pproxy/launcher/Debug/src/p2pproxy.d [deleted file]
p2pproxy/launcher/Debug/src/p2pproxy_wrap.d [deleted file]
p2pproxy/launcher/Debug/src/subdir.mk [deleted file]
p2pproxy/launcher/Makefile.am [deleted file]
p2pproxy/launcher/src/Makefile.am [deleted file]
p2pproxy/launcher/src/launcher-tester.c [deleted file]
p2pproxy/launcher/src/p2pproxy.c [deleted file]
p2pproxy/launcher/src/p2pproxy.h [deleted file]
p2pproxy/log4j.properties [deleted file]
p2pproxy/plugin-src/Makefile.am [deleted file]
p2pproxy/plugin-src/fonis.c [deleted file]
p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyException.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyInstance.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyManagement.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyNetworkProbe.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyNotReadyException.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyResourceManagement.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyRtpRelayManagement.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyUserAlreadyExistException.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyUserNotFoundException.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/Configurator.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/EdgePeerServiceManager.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/GenericService.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/GenericServiceClient.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/GenericUdpSession.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/JxtaNetworkManager.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/MessageDispatcher.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/P2pProxyAccountManagement.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/P2pProxyAccountManagementMBean.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/P2pProxyAdvertisementNotFoundException.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/P2pProxyInstanceImpl.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/P2pProxyMain.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/P2pProxyMainMBean.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/P2pProxyManagementImpl.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/P2pProxyResourceManagementImpl.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/P2pUserProfileAdvertisement.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/SeedingPeerServiceManager.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/ServiceProvider.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/SuperPeerServiceManager.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/jxtaext/EndpointRegistry.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/jxtaext/NatedEndPointAddress.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/media/MediaResourceService.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/media/MediaResoureUnreachableException.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/media/jxtaudpproxy/RtpSession.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/media/jxtaudpproxy/RtpSessionImpl.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/media/jxtaudpproxy/SdpProcessorImpl.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/media/jxtaudpproxy/UdpSession.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/AddressRequest.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/AddressResponse.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/IceSdpProcessorImpl.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/MediaType.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/RouteAddRequest.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/RouteAddResponse.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/RoutingTable.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/RtpRelayServer.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/RtpRelayServerConfig.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/RtpRoutingRules.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/SdpProcessorImpl.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/SingleAddressResponse.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/rdvautoconfig/AutoConfigService.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/rdvautoconfig/P2pproxyRdvListener.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/rdvautoconfig/PeerInfoProvider.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/rdvautoconfig/PeerInfoProviderService.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/rdvautoconfig/PeerInfoServiceClient.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/rdvautoconfig/PublicIpAddressRequest.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/rdvautoconfig/PublicIpAddressResponse.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/rdvautoconfig/SocketProbeRequest.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/NetworkResourceAdvertisement.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/RegistrationHandler.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/SdpProcessor.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/SipProxy.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/SipProxyRegistrar.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/SipProxyRegistrarMBean.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/SipUtils.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/peers/JxtaSipProxy.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/peers/NetworkResources.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/superpeers/JxtaNetworkResources.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/superpeers/P2pUserRegistrationAdvertisement.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/superpeers/SuperPeerProxy.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/stun/AddressInfo.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/stun/DiscoveryInfo.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/stun/StunClient.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/stun/StunServer.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/utils/AccountManagerCli.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/utils/DumpLocalCache.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/utils/Excecutor.java [deleted file]
p2pproxy/src/org/linphone/p2pproxy/core/utils/PeerGroupIdGenerator.java [deleted file]
p2pproxy/test-src/org/linphone/p2pproxy/test/P2pAutoConfigTester.java [deleted file]
p2pproxy/test-src/org/linphone/p2pproxy/test/P2pProxyAccountManagementTester.java [deleted file]
p2pproxy/test-src/org/linphone/p2pproxy/test/P2pProxyNatedNetworkTester.java [deleted file]
p2pproxy/test-src/org/linphone/p2pproxy/test/P2pProxyNetworkingTester.java [deleted file]
p2pproxy/test-src/org/linphone/p2pproxy/test/P2pProxyTester.java [deleted file]
p2pproxy/test-src/org/linphone/p2pproxy/test/RtpRelayServerTester.java [deleted file]
p2pproxy/test-src/org/linphone/p2pproxy/test/StunServerTester.java [deleted file]
p2pproxy/test-src/org/linphone/p2pproxy/test/UdpRelayTester.java [deleted file]
p2pproxy/test-src/org/linphone/p2pproxy/test/utils/DefaultCallListener.java [deleted file]
p2pproxy/test-src/org/linphone/p2pproxy/test/utils/P2pNetwork.java [deleted file]
p2pproxy/test-src/org/linphone/p2pproxy/test/utils/SipClient.java [deleted file]
p2pproxy/test-src/org/linphone/p2pproxy/test/utils/UserInstance.java [deleted file]
pixmaps/.gitignore [new file with mode: 0644]
pixmaps/Makefile.am [new file with mode: 0644]
pixmaps/green.png [new file with mode: 0644]
pixmaps/linphone.png [new file with mode: 0644]
pixmaps/linphone2.png [new file with mode: 0644]
pixmaps/linphone2.xpm [new file with mode: 0644]
pixmaps/mic_active.png [new file with mode: 0644]
pixmaps/mic_muted.png [new file with mode: 0644]
pixmaps/red.png [new file with mode: 0644]
pixmaps/sip-away.png [new file with mode: 0644]
pixmaps/sip-bifm.png [new file with mode: 0644]
pixmaps/sip-busy.png [new file with mode: 0644]
pixmaps/sip-closed.png [new file with mode: 0644]
pixmaps/sip-online.png [new file with mode: 0644]
pixmaps/sip-otl.png [new file with mode: 0644]
pixmaps/sip-otp.png [new file with mode: 0644]
pixmaps/sip-wfa.png [new file with mode: 0644]
po/.gitignore [new file with mode: 0644]
po/ChangeLog [new file with mode: 0644]
po/Makefile.in.in [new file with mode: 0644]
po/Makevars [new file with mode: 0644]
po/Makevars.template [new file with mode: 0644]
po/POTFILES.in [new file with mode: 0644]
po/POTFILES.skip [new file with mode: 0755]
po/Rules-quot [new file with mode: 0644]
po/boldquot.sed [new file with mode: 0644]
po/cat-id-tbl.c [new file with mode: 0644]
po/cs.po [new file with mode: 0644]
po/de.po [new file with mode: 0644]
po/en@boldquot.header [new file with mode: 0644]
po/en@quot.header [new file with mode: 0644]
po/es.po [new file with mode: 0644]
po/fr.po [new file with mode: 0644]
po/hu.po [new file with mode: 0644]
po/insert-header.sin [new file with mode: 0644]
po/it.po [new file with mode: 0644]
po/ja.po [new file with mode: 0644]
po/nl.po [new file with mode: 0644]
po/pl.po [new file with mode: 0644]
po/pt_BR.po [new file with mode: 0644]
po/quot.sed [new file with mode: 0644]
po/remove-potcdate.sin [new file with mode: 0644]
po/ru.po [new file with mode: 0644]
po/sv.po [new file with mode: 0644]
po/zh_CN.po [new file with mode: 0644]
scripts/Makefile.am [new file with mode: 0644]
scripts/Portfile-devel.tmpl [new file with mode: 0644]
scripts/Portfile.tmpl [new file with mode: 0644]
scripts/builder-mingw.mk [new file with mode: 0644]
share/.gitignore [new file with mode: 0644]
share/C/.gitignore [new file with mode: 0644]
share/C/Makefile.am [new file with mode: 0644]
share/C/linphone.1 [new file with mode: 0644]
share/C/linphonec.1 [new file with mode: 0644]
share/C/linphonecsh.1 [new file with mode: 0644]
share/C/manual.lyx [new file with mode: 0644]
share/C/manual.sgml [new file with mode: 0644]
share/C/sipomatic.1 [new file with mode: 0644]
share/Makefile.am [new file with mode: 0644]
share/Makefile.inc [new file with mode: 0644]
share/cs/.gitignore [new file with mode: 0644]
share/cs/Makefile.am [new file with mode: 0644]
share/cs/linphone.1 [new file with mode: 0644]
share/cs/linphonec.1 [new file with mode: 0644]
share/cs/sipomatic.1 [new file with mode: 0644]
share/fr/.gitignore [new file with mode: 0644]
share/fr/Makefile.am [new file with mode: 0644]
share/fr/manual.lyx [new file with mode: 0644]
share/fr/manual.sgml [new file with mode: 0644]
share/hello16000.wav [new file with mode: 0644]
share/hello8000.wav [new file with mode: 0644]
share/it/.gitignore [new file with mode: 0644]
share/it/Makefile.am [new file with mode: 0644]
share/it/manual.lyx [new file with mode: 0644]
share/it/manual.sgml [new file with mode: 0644]
share/ja/.gitignore [new file with mode: 0644]
share/ja/Makefile.am [new file with mode: 0644]
share/ja/manual.lyx [new file with mode: 0644]
share/ja/manual.sgml [new file with mode: 0644]
share/linphone.desktop [new file with mode: 0644]
share/linphone.gnorba [new file with mode: 0644]
share/linphone.pc.in [new file with mode: 0644]
share/linphone_applet.desktop [new file with mode: 0644]
share/ringback.wav [new file with mode: 0644]
share/rings/bigben.wav [new file with mode: 0644]
share/rings/oldphone.wav [new file with mode: 0644]
share/rings/orig.wav [new file with mode: 0644]
share/rings/rock.wav [new file with mode: 0644]
share/rings/sweet.wav [new file with mode: 0644]
share/rings/synth.wav [new file with mode: 0644]
share/rings/tapping.wav [new file with mode: 0644]
share/rings/toy.wav [new file with mode: 0644]
stamp-h.in [new file with mode: 0644]

index 98a34651839470b4ff9b895bda7ff6151907055a..4e701d0762c99ee14c697751d613783303e3e706 100644 (file)
@@ -1,6 +1,6 @@
 [submodule "linphone/oRTP"]
-       path = linphone/oRTP
+       path = oRTP
        url = git://git.linphone.org/ortp.git
 [submodule "linphone/mediastreamer2"]
-       path = linphone/mediastreamer2
+       path = mediastreamer2
        url = git://git.linphone.org/mediastreamer2.git
diff --git a/ABOUT-NLS b/ABOUT-NLS
new file mode 100644 (file)
index 0000000..ec20977
--- /dev/null
+++ b/ABOUT-NLS
@@ -0,0 +1,1101 @@
+1 Notes on the Free Translation Project
+***************************************
+
+Free software is going international!  The Free Translation Project is
+a way to get maintainers of free software, translators, and users all
+together, so that free software will gradually become able to speak many
+languages.  A few packages already provide translations for their
+messages.
+
+   If you found this `ABOUT-NLS' file inside a distribution, you may
+assume that the distributed package does use GNU `gettext' internally,
+itself available at your nearest GNU archive site.  But you do _not_
+need to install GNU `gettext' prior to configuring, installing or using
+this package with messages translated.
+
+   Installers will find here some useful hints.  These notes also
+explain how users should proceed for getting the programs to use the
+available translations.  They tell how people wanting to contribute and
+work on translations can contact the appropriate team.
+
+   When reporting bugs in the `intl/' directory or bugs which may be
+related to internationalization, you should tell about the version of
+`gettext' which is used.  The information can be found in the
+`intl/VERSION' file, in internationalized packages.
+
+1.1 Quick configuration advice
+==============================
+
+If you want to exploit the full power of internationalization, you
+should configure it using
+
+     ./configure --with-included-gettext
+
+to force usage of internationalizing routines provided within this
+package, despite the existence of internationalizing capabilities in the
+operating system where this package is being installed.  So far, only
+the `gettext' implementation in the GNU C library version 2 provides as
+many features (such as locale alias, message inheritance, automatic
+charset conversion or plural form handling) as the implementation here.
+It is also not possible to offer this additional functionality on top
+of a `catgets' implementation.  Future versions of GNU `gettext' will
+very likely convey even more functionality.  So it might be a good idea
+to change to GNU `gettext' as soon as possible.
+
+   So you need _not_ provide this option if you are using GNU libc 2 or
+you have installed a recent copy of the GNU gettext package with the
+included `libintl'.
+
+1.2 INSTALL Matters
+===================
+
+Some packages are "localizable" when properly installed; the programs
+they contain can be made to speak your own native language.  Most such
+packages use GNU `gettext'.  Other packages have their own ways to
+internationalization, predating GNU `gettext'.
+
+   By default, this package will be installed to allow translation of
+messages.  It will automatically detect whether the system already
+provides the GNU `gettext' functions.  If not, the included GNU
+`gettext' library will be used.  This library is wholly contained
+within this package, usually in the `intl/' subdirectory, so prior
+installation of the GNU `gettext' package is _not_ required.
+Installers may use special options at configuration time for changing
+the default behaviour.  The commands:
+
+     ./configure --with-included-gettext
+     ./configure --disable-nls
+
+will, respectively, bypass any pre-existing `gettext' to use the
+internationalizing routines provided within this package, or else,
+_totally_ disable translation of messages.
+
+   When you already have GNU `gettext' installed on your system and run
+configure without an option for your new package, `configure' will
+probably detect the previously built and installed `libintl.a' file and
+will decide to use this.  This might not be desirable.  You should use
+the more recent version of the GNU `gettext' library.  I.e. if the file
+`intl/VERSION' shows that the library which comes with this package is
+more recent, you should use
+
+     ./configure --with-included-gettext
+
+to prevent auto-detection.
+
+   The configuration process will not test for the `catgets' function
+and therefore it will not be used.  The reason is that even an
+emulation of `gettext' on top of `catgets' could not provide all the
+extensions of the GNU `gettext' library.
+
+   Internationalized packages usually have many `po/LL.po' files, where
+LL gives an ISO 639 two-letter code identifying the language.  Unless
+translations have been forbidden at `configure' time by using the
+`--disable-nls' switch, all available translations are installed
+together with the package.  However, the environment variable `LINGUAS'
+may be set, prior to configuration, to limit the installed set.
+`LINGUAS' should then contain a space separated list of two-letter
+codes, stating which languages are allowed.
+
+1.3 Using This Package
+======================
+
+As a user, if your language has been installed for this package, you
+only have to set the `LANG' environment variable to the appropriate
+`LL_CC' combination.  Here `LL' is an ISO 639 two-letter language code,
+and `CC' is an ISO 3166 two-letter country code.  For example, let's
+suppose that you speak German and live in Germany.  At the shell
+prompt, merely execute `setenv LANG de_DE' (in `csh'),
+`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
+This can be done from your `.login' or `.profile' file, once and for
+all.
+
+   You might think that the country code specification is redundant.
+But in fact, some languages have dialects in different countries.  For
+example, `de_AT' is used for Austria, and `pt_BR' for Brazil.  The
+country code serves to distinguish the dialects.
+
+   The locale naming convention of `LL_CC', with `LL' denoting the
+language and `CC' denoting the country, is the one use on systems based
+on GNU libc.  On other systems, some variations of this scheme are
+used, such as `LL' or `LL_CC.ENCODING'.  You can get the list of
+locales supported by your system for your language by running the
+command `locale -a | grep '^LL''.
+
+   Not all programs have translations for all languages.  By default, an
+English message is shown in place of a nonexistent translation.  If you
+understand other languages, you can set up a priority list of languages.
+This is done through a different environment variable, called
+`LANGUAGE'.  GNU `gettext' gives preference to `LANGUAGE' over `LANG'
+for the purpose of message handling, but you still need to have `LANG'
+set to the primary language; this is required by other parts of the
+system libraries.  For example, some Swedish users who would rather
+read translations in German than English for when Swedish is not
+available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
+
+   Special advice for Norwegian users: The language code for Norwegian
+bokma*l changed from `no' to `nb' recently (in 2003).  During the
+transition period, while some message catalogs for this language are
+installed under `nb' and some older ones under `no', it's recommended
+for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
+older translations are used.
+
+   In the `LANGUAGE' environment variable, but not in the `LANG'
+environment variable, `LL_CC' combinations can be abbreviated as `LL'
+to denote the language's main dialect.  For example, `de' is equivalent
+to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
+(Portuguese as spoken in Portugal) in this context.
+
+1.4 Translating Teams
+=====================
+
+For the Free Translation Project to be a success, we need interested
+people who like their own language and write it well, and who are also
+able to synergize with other translators speaking the same language.
+Each translation team has its own mailing list.  The up-to-date list of
+teams can be found at the Free Translation Project's homepage,
+`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
+area.
+
+   If you'd like to volunteer to _work_ at translating messages, you
+should become a member of the translating team for your own language.
+The subscribing address is _not_ the same as the list itself, it has
+`-request' appended.  For example, speakers of Swedish can send a
+message to `sv-request@li.org', having this message body:
+
+     subscribe
+
+   Keep in mind that team members are expected to participate
+_actively_ in translations, or at solving translational difficulties,
+rather than merely lurking around.  If your team does not exist yet and
+you want to start one, or if you are unsure about what to do or how to
+get started, please write to `translation@iro.umontreal.ca' to reach the
+coordinator for all translator teams.
+
+   The English team is special.  It works at improving and uniformizing
+the terminology in use.  Proven linguistic skills are praised more than
+programming skills, here.
+
+1.5 Available Packages
+======================
+
+Languages are not equally supported in all packages.  The following
+matrix shows the current state of internationalization, as of October
+2006.  The matrix shows, in regard of each package, for which languages
+PO files have been submitted to translation coordination, with a
+translation percentage of at least 50%.
+
+     Ready PO files       af am ar az be bg bs ca cs cy da de el en en_GB eo
+                        +----------------------------------------------------+
+     GNUnet             |                                  []                |
+     a2ps               |             []                [] [] []     []      |
+     aegis              |                                  ()                |
+     ant-phone          |                                  ()                |
+     anubis             |                                  []                |
+     ap-utils           |                                                    |
+     aspell             |                      [] []    [] []        []      |
+     bash               |                      []          []             [] |
+     batchelor          |                                  []                |
+     bfd                |                                                    |
+     bibshelf           |                                  []                |
+     binutils           |                               []                   |
+     bison              |                               [] []                |
+     bison-runtime      |                                                    |
+     bluez-pin          | []                      []       [] []          [] |
+     cflow              |                               []                   |
+     clisp              |                                  []    []          |
+     console-tools      |                         []       []                |
+     coreutils          |                []    []          []                |
+     cpio               |                                                    |
+     cpplib             |                      []       [] []                |
+     cryptonit          |                                  []                |
+     darkstat           |                []             () []                |
+     dialog             |                      [] [] [] [] [] []             |
+     diffutils          |                      [] []    [] [] []          [] |
+     doodle             |                                  []                |
+     e2fsprogs          |                         []       []                |
+     enscript           |                      []       [] []        []      |
+     error              |                      []       [] []        []      |
+     fetchmail          |                      []       [] () []             |
+     fileutils          |                               [] []                |
+     findutils          |                []    []       []                   |
+     flex               |                      []       [] []                |
+     fslint             |                                  []                |
+     gas                |                                                    |
+     gawk               |                      []       [] []                |
+     gbiff              |                                  []                |
+     gcal               |                      []                            |
+     gcc                |                                  []                |
+     gettext-examples   | []                   []          [] []          [] |
+     gettext-runtime    |             []       []       [] []             [] |
+     gettext-tools      |                      []          []                |
+     gimp-print         |                         []    [] []        []      |
+     gip                |                []                                  |
+     gliv               |                                  []                |
+     glunarclock        |                []                                  |
+     gmult              | []                               []                |
+     gnubiff            |                                  ()                |
+     gnucash            |                                  () ()     []      |
+     gnucash-glossary   |                               [] ()                |
+     gnuedu             |                                                    |
+     gnulib             | []          [] []    []       [] []                |
+     gnunet-gtk         |                                                    |
+     gnutls             |                                                    |
+     gpe-aerial         |                         []       []                |
+     gpe-beam           |                         []       []                |
+     gpe-calendar       |                                                    |
+     gpe-clock          |                         []       []                |
+     gpe-conf           |                         []       []                |
+     gpe-contacts       |                                                    |
+     gpe-edit           |                         []                         |
+     gpe-filemanager    |                                                    |
+     gpe-go             |                         []                         |
+     gpe-login          |                         []       []                |
+     gpe-ownerinfo      |                         []       []                |
+     gpe-package        |                                                    |
+     gpe-sketchbook     |                         []       []                |
+     gpe-su             |                         []       []                |
+     gpe-taskmanager    |                         []       []                |
+     gpe-timesheet      |                         []                         |
+     gpe-today          |                         []       []                |
+     gpe-todo           |                                                    |
+     gphoto2            |                         []    [] []        []      |
+     gprof              |                               [] []                |
+     gpsdrive           |                                  ()    ()          |
+     gramadoir          | []                               []                |
+     grep               | []          [] []    []          [] []             |
+     gretl              |                                                    |
+     gsasl              |                                                    |
+     gss                |                                                    |
+     gst-plugins        | []                   [] []    []                   |
+     gst-plugins-base   |                []    []       []                   |
+     gst-plugins-good   | []       []    []    [] []    []           []      |
+     gstreamer          | []             []    [] []    [] []        []      |
+     gtick              |                                  ()                |
+     gtkam              |                         []    [] []                |
+     gtkorphan          |                []                []                |
+     gtkspell           |             []                   [] []          [] |
+     gutenprint         |                               []                   |
+     hello              |                []    []       [] []             [] |
+     id-utils           |                               [] []                |
+     impost             |                                                    |
+     indent             |                      []          []             [] |
+     iso_3166           |                                  []             [] |
+     iso_3166_2         |                                                    |
+     iso_4217           |                                  []                |
+     iso_639            |                                  []             [] |
+     jpilot             |                         []                         |
+     jtag               |                                                    |
+     jwhois             |                                                    |
+     kbd                |                         []    [] [] []             |
+     keytouch           |                                                    |
+     keytouch-editor    |                                                    |
+     keytouch-keyboa... |                                                    |
+     latrine            |                                  ()                |
+     ld                 |                               []                   |
+     leafpad            |                []    [] []       [] []             |
+     libc               |                      [] []    [] [] []             |
+     libexif            |                                  []                |
+     libextractor       |                                  []                |
+     libgpewidget       |                         []    [] []                |
+     libgpg-error       |                                  []                |
+     libgphoto2         |                               [] []                |
+     libgphoto2_port    |                               [] []                |
+     libgsasl           |                                                    |
+     libiconv           |                                  []             [] |
+     libidn             |                               []                [] |
+     lifelines          |                               [] ()                |
+     lilypond           |                                  []                |
+     lingoteach         |                                                    |
+     lynx               |                      [] []    [] []                |
+     m4                 |                         []    [] [] []             |
+     mailutils          |                      []                            |
+     make               |                               [] []                |
+     man-db             |                      [] ()    [] []                |
+     minicom            |                         []    [] []                |
+     mysecretdiary      |                               [] []                |
+     nano               |                []    []          []                |
+     nano_1_0           |                      [] ()    [] []                |
+     opcodes            |                                  []                |
+     parted             |                                                    |
+     pilot-qof          |                                            []      |
+     psmisc             |                []                                  |
+     pwdutils           |                                                    |
+     python             |                                                    |
+     qof                |                                                    |
+     radius             |                      []                            |
+     recode             |             []       []       [] [] []          [] |
+     rpm                |                         []    []                   |
+     screem             |                                                    |
+     scrollkeeper       |          [] []       [] [] [] [] []        []      |
+     sed                |                      []          []             [] |
+     sh-utils           |                               [] []                |
+     shared-mime-info   |                []       []                 []   [] |
+     sharutils          |                []    [] []    [] [] []             |
+     shishi             |                                                    |
+     silky              |                                                    |
+     skencil            |                               [] ()                |
+     sketch             |                               [] ()                |
+     solfege            |                                                    |
+     soundtracker       |                               [] []                |
+     sp                 |                                  []                |
+     stardict           |                         []                         |
+     system-tools-ba... |       []       [] [] [] []    [] [] []     []      |
+     tar                |                []                                  |
+     texinfo            |                               [] []             [] |
+     textutils          |                      []       [] []                |
+     tin                |                                  ()        ()      |
+     tp-robot           |                                  []                |
+     tuxpaint           | []             []             [] []        []      |
+     unicode-han-tra... |                                                    |
+     unicode-transla... |                                                    |
+     util-linux         |                      [] []    [] []                |
+     vorbis-tools       |             []          []    []           []      |
+     wastesedge         |                                  ()                |
+     wdiff              |                      []       [] []        []      |
+     wget               |                      []          []                |
+     xchat              |             [] []    []          [] []     []      |
+     xkeyboard-config   |                                                    |
+     xpad               |                []             []                   |
+                        +----------------------------------------------------+
+                          af am ar az be bg bs ca cs cy da de el en en_GB eo
+                          10  0  1  2  9 22  1 42 41  2 60 95 16  1  17   16
+
+                          es et eu fa fi fr  ga gl gu he hi hr hu id is it
+                        +--------------------------------------------------+
+     GNUnet             |                                                  |
+     a2ps               |    []       [] []                             () |
+     aegis              |                                                  |
+     ant-phone          |                []                                |
+     anubis             |                []                                |
+     ap-utils           |             [] []                                |
+     aspell             |                []  []                         [] |
+     bash               | []             []                    []          |
+     batchelor          |                []  []                            |
+     bfd                | []                                               |
+     bibshelf           | []                 []                         [] |
+     binutils           | []          [] []                                |
+     bison              | [] []          []  []                   []    [] |
+     bison-runtime      |    []          []  []                   []    [] |
+     bluez-pin          |             [] []  []                [] []       |
+     cflow              |                    []                            |
+     clisp              | []             []                                |
+     console-tools      |                                                  |
+     coreutils          | [] []       [] []  []                []          |
+     cpio               | []             []  []                            |
+     cpplib             | []             []                                |
+     cryptonit          |                []                                |
+     darkstat           | []             ()  []                [] []       |
+     dialog             | [] [] []    [] []  []                []       [] |
+     diffutils          | []          [] []  [] []    []       [] []    [] |
+     doodle             |                    []                         [] |
+     e2fsprogs          | []             []                             [] |
+     enscript           |                []  []             []             |
+     error              | []          [] []  []                []          |
+     fetchmail          | []                                               |
+     fileutils          | [] []          []  []                []       [] |
+     findutils          |    []          []  []                []          |
+     flex               | []             []  []                            |
+     fslint             |                []                                |
+     gas                | []             []                                |
+     gawk               | []             []  []       []                   |
+     gbiff              |                []                                |
+     gcal               | []             []                                |
+     gcc                | []                                               |
+     gettext-examples   | []             []  []                [] []    [] |
+     gettext-runtime    | []          [] []  []                   []    [] |
+     gettext-tools      | []             []                             [] |
+     gimp-print         | []             []                                |
+     gip                | []    []       []                                |
+     gliv               |                ()                                |
+     glunarclock        |             []     []                []          |
+     gmult              |       []       []                             [] |
+     gnubiff            |                ()                             () |
+     gnucash            | ()             ()                    ()          |
+     gnucash-glossary   | []                                            [] |
+     gnuedu             | []                                               |
+     gnulib             | [] [] []    [] []  [] []             []          |
+     gnunet-gtk         |                                                  |
+     gnutls             |                                                  |
+     gpe-aerial         | []             []                                |
+     gpe-beam           | []             []                                |
+     gpe-calendar       |                                                  |
+     gpe-clock          | []          [] []                    []          |
+     gpe-conf           |                []                                |
+     gpe-contacts       | []             []                                |
+     gpe-edit           | []             []                    [] []       |
+     gpe-filemanager    | []                                               |
+     gpe-go             | []             []                    []          |
+     gpe-login          | []             []                    []          |
+     gpe-ownerinfo      | []          [] []                    [] []       |
+     gpe-package        | []                                               |
+     gpe-sketchbook     | []             []                                |
+     gpe-su             | []          [] []                    []          |
+     gpe-taskmanager    | []          [] []                                |
+     gpe-timesheet      | []             []  []                   []       |
+     gpe-today          | []          [] []  []                            |
+     gpe-todo           | []                                               |
+     gphoto2            | []          [] []                    []       [] |
+     gprof              | []             []  []                   []       |
+     gpsdrive           | ()             ()                    []       () |
+     gramadoir          |                []  []                            |
+     grep               | [] [] []    [] []  [] []    []    [] [] []    [] |
+     gretl              | []             []                             [] |
+     gsasl              |                    []                   []       |
+     gss                |                []                                |
+     gst-plugins        |                []                    []       [] |
+     gst-plugins-base   |                                      []       [] |
+     gst-plugins-good   |       []                             []       [] |
+     gstreamer          |             []                       []       [] |
+     gtick              |                    []                            |
+     gtkam              | []             []                    []       [] |
+     gtkorphan          |                []                             [] |
+     gtkspell           | []    []    [] []  []                         [] |
+     gutenprint         |                                      []          |
+     hello              | [] [] [] [] [] []  [] []    []    [] [] []    [] |
+     id-utils           |                []  []                [] []    [] |
+     impost             |                []  []                            |
+     indent             | [] [] []    [] []  [] []             [] []    [] |
+     iso_3166           |             [] []                    []          |
+     iso_3166_2         |                []                                |
+     iso_4217           |    []       []        []             []          |
+     iso_639            |          [] [] []  []                []          |
+     jpilot             | []             []                                |
+     jtag               |                []                                |
+     jwhois             | []             []                    [] []    [] |
+     kbd                | []             []                                |
+     keytouch           |                    []                            |
+     keytouch-editor    |                    []                            |
+     keytouch-keyboa... |                    []                            |
+     latrine            |                []  []                         [] |
+     ld                 | []             []                                |
+     leafpad            | []             []  []       []       []       [] |
+     libc               | []          [] []     []             []          |
+     libexif            | []                                               |
+     libextractor       |                    []                            |
+     libgpewidget       | []             []  []                [] []       |
+     libgpg-error       |                                                  |
+     libgphoto2         | []             []                             [] |
+     libgphoto2_port    |                []                             [] |
+     libgsasl           |                []  []                            |
+     libiconv           |    []              []                            |
+     libidn             |                []                             [] |
+     lifelines          |                ()                                |
+     lilypond           |                []                                |
+     lingoteach         |                []                       []    [] |
+     lynx               |    []                                []       [] |
+     m4                 |                []  [] []                []       |
+     mailutils          | []             []                                |
+     make               | []          [] []  [] []    []    []    []       |
+     man-db             | ()                                               |
+     minicom            | []          [] []                    []          |
+     mysecretdiary      | []             []                       []       |
+     nano               | []    []       []  []                []       [] |
+     nano_1_0           | []             []     []                []    [] |
+     opcodes            | []          [] []  []                            |
+     parted             | []             []                       []    [] |
+     pilot-qof          |                                                  |
+     psmisc             |       []                             []       [] |
+     pwdutils           |                                                  |
+     python             |                                                  |
+     qof                |                                         []       |
+     radius             | []             []                                |
+     recode             | []             []  [] []    []       [] []    [] |
+     rpm                |                []                       []       |
+     screem             |                                                  |
+     scrollkeeper       | []          []                       []          |
+     sed                | [] []          []  []                []          |
+     sh-utils           | [] []       [] []  []                []       [] |
+     shared-mime-info   | []    []    [] []                    []       [] |
+     sharutils          | [] []       [] []  [] []             []       [] |
+     shishi             |                                                  |
+     silky              |                []                                |
+     skencil            | []             []                                |
+     sketch             | []             []                                |
+     solfege            |                                               [] |
+     soundtracker       | []             []                             [] |
+     sp                 |                []                                |
+     stardict           |                                      []          |
+     system-tools-ba... | []    []    [] []                 [] [] []    [] |
+     tar                | [] []       [] []  []                []       [] |
+     texinfo            |                []           []                   |
+     textutils          | []             []  [] []             []          |
+     tin                |    []          ()                                |
+     tp-robot           |             [] []  []                []          |
+     tuxpaint           |                    []                []          |
+     unicode-han-tra... |                                                  |
+     unicode-transla... |                []  []                            |
+     util-linux         | [] []       [] []                    [] []    [] |
+     vorbis-tools       | []             []                                |
+     wastesedge         |                ()                                |
+     wdiff              | [] []          []  [] []             [] []    [] |
+     wget               |    []       [] []  []             [] [] []    [] |
+     xchat              | []    []    [] []        []    []    []       [] |
+     xkeyboard-config   |             [] []                    []       [] |
+     xpad               | []                 []                []          |
+                        +--------------------------------------------------+
+                          es et eu fa fi fr  ga gl gu he hi hr hu id is it
+                          88 22 14  2 40 115 61 14  1  8  1  6 59 31  0 52
+
+                          ja ko ku ky lg lt lv mk mn ms mt nb ne nl nn no
+                        +-------------------------------------------------+
+     GNUnet             |                                                 |
+     a2ps               |    ()                      []          []    () |
+     aegis              |                                        ()       |
+     ant-phone          |                                        []       |
+     anubis             |                            []    []    []       |
+     ap-utils           |                            []                   |
+     aspell             |                         []             []       |
+     bash               |                                        []       |
+     batchelor          |                            []          []       |
+     bfd                |                                                 |
+     bibshelf           |                            []                   |
+     binutils           |                                                 |
+     bison              |                            []    []    []       |
+     bison-runtime      |                            []    []    []       |
+     bluez-pin          |       []                   []          []       |
+     cflow              |                                                 |
+     clisp              |                                        []       |
+     console-tools      |                                                 |
+     coreutils          |                                        []       |
+     cpio               |                                                 |
+     cpplib             |                                        []       |
+     cryptonit          |                                        []       |
+     darkstat           |                            []          []       |
+     dialog             |                            []          []       |
+     diffutils          | []                         []          []       |
+     doodle             |                                                 |
+     e2fsprogs          |                                        []       |
+     enscript           |                                        []       |
+     error              |                                        []       |
+     fetchmail          | []                                     []       |
+     fileutils          | []          []                                  |
+     findutils          |                                        []       |
+     flex               |    []                                  []       |
+     fslint             |                            []          []       |
+     gas                |                                                 |
+     gawk               | []                                     []       |
+     gbiff              |                                        []       |
+     gcal               |                                                 |
+     gcc                |                                                 |
+     gettext-examples   | []                                     []       |
+     gettext-runtime    | [] []                                  []       |
+     gettext-tools      | [] []                                           |
+     gimp-print         | []                                     []       |
+     gip                |                            []          []       |
+     gliv               |                                        []       |
+     glunarclock        |                            []          []       |
+     gmult              | []                         []                   |
+     gnubiff            |                                                 |
+     gnucash            | ()                               ()             |
+     gnucash-glossary   |                                        []       |
+     gnuedu             |                                                 |
+     gnulib             | [] []                      []          []       |
+     gnunet-gtk         |                                                 |
+     gnutls             |                                                 |
+     gpe-aerial         |                                        []       |
+     gpe-beam           |                                        []       |
+     gpe-calendar       | []                                              |
+     gpe-clock          | [] []                                  []       |
+     gpe-conf           |    []                                  []       |
+     gpe-contacts       |    []                                           |
+     gpe-edit           | [] []                                  []       |
+     gpe-filemanager    | [] []                                           |
+     gpe-go             | [] []                                  []       |
+     gpe-login          | [] []                                  []       |
+     gpe-ownerinfo      | []                                     []       |
+     gpe-package        | [] []                                           |
+     gpe-sketchbook     |    []                                  []       |
+     gpe-su             | [] []                                  []       |
+     gpe-taskmanager    | [] [] []                               []       |
+     gpe-timesheet      |                                        []       |
+     gpe-today          | []                                     []       |
+     gpe-todo           | []                                              |
+     gphoto2            | []                                     []       |
+     gprof              |                                                 |
+     gpsdrive           | ()                                     ()    () |
+     gramadoir          |                                        ()       |
+     grep               | []       []                      []    []       |
+     gretl              |                                                 |
+     gsasl              |                                        []       |
+     gss                |                                                 |
+     gst-plugins        |                                        []       |
+     gst-plugins-base   |                                                 |
+     gst-plugins-good   |                                        []       |
+     gstreamer          |                                        []       |
+     gtick              |                                                 |
+     gtkam              | []                                              |
+     gtkorphan          |                                        []       |
+     gtkspell           |                         []             []       |
+     gutenprint         |                                                 |
+     hello              | [] []                      []    []    [] []    |
+     id-utils           |                                        []       |
+     impost             |                                                 |
+     indent             | []                                     []       |
+     iso_3166           |                                        []       |
+     iso_3166_2         |                                        []       |
+     iso_4217           | []                      []             []       |
+     iso_639            | []                                     []       |
+     jpilot             | ()                                     ()    () |
+     jtag               |                                                 |
+     jwhois             |                                        []       |
+     kbd                |                                        []       |
+     keytouch           |                                        []       |
+     keytouch-editor    |                                                 |
+     keytouch-keyboa... |                                                 |
+     latrine            |                                        []       |
+     ld                 |                                                 |
+     leafpad            | []             []                               |
+     libc               | [] []                            []    []    [] |
+     libexif            |                                                 |
+     libextractor       |                                                 |
+     libgpewidget       |                                        []       |
+     libgpg-error       |                                                 |
+     libgphoto2         | []                                              |
+     libgphoto2_port    | []                                              |
+     libgsasl           |                                        []       |
+     libiconv           |                                                 |
+     libidn             | []                                     []       |
+     lifelines          |                                        []       |
+     lilypond           |                                                 |
+     lingoteach         |                                        []       |
+     lynx               | []                                     []       |
+     m4                 | []                                     []       |
+     mailutils          |                                                 |
+     make               | [] []                                  []       |
+     man-db             | ()                                              |
+     minicom            | []                                              |
+     mysecretdiary      |                                        []       |
+     nano               |                            []    []    []       |
+     nano_1_0           |                            []    []       []    |
+     opcodes            |                                        []       |
+     parted             | []                                     []       |
+     pilot-qof          |                                                 |
+     psmisc             | []                               []    []       |
+     pwdutils           |                                                 |
+     python             |                                                 |
+     qof                |                                                 |
+     radius             |                                                 |
+     recode             |                                        []       |
+     rpm                | [] []                                           |
+     screem             | []                                              |
+     scrollkeeper       |                                  [] [] [] []    |
+     sed                | []                                     []       |
+     sh-utils           | []                               []             |
+     shared-mime-info   |    []          []                []    [] []    |
+     sharutils          | []                                     []       |
+     shishi             |                                                 |
+     silky              |                                        []       |
+     skencil            |                                                 |
+     sketch             |                                                 |
+     solfege            |                                                 |
+     soundtracker       |                                                 |
+     sp                 | ()                                              |
+     stardict           |                      []                []       |
+     system-tools-ba... | [] []          []                      []       |
+     tar                | []       []                            []       |
+     texinfo            | []                               []    []       |
+     textutils          | [] []                            []             |
+     tin                |                                                 |
+     tp-robot           |                                        []       |
+     tuxpaint           |                                           []    |
+     unicode-han-tra... |                                                 |
+     unicode-transla... |                                                 |
+     util-linux         | []                                     []       |
+     vorbis-tools       |                                        []       |
+     wastesedge         |                                        []       |
+     wdiff              |                            []    []             |
+     wget               | []                                     []       |
+     xchat              | [] []                []                []       |
+     xkeyboard-config   |                                        []       |
+     xpad               |    []                      []          []       |
+                        +-------------------------------------------------+
+                          ja ko ku ky lg lt lv mk mn ms mt nb ne nl nn no
+                          52 24  2  2  1  3  0  2  3 21  0 15  1 97  5  1
+
+                          nso or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv  ta
+                        +------------------------------------------------------+
+     GNUnet             |                                                      |
+     a2ps               |           ()     []      [] []       []    [] []     |
+     aegis              |                          () ()                       |
+     ant-phone          |                          []                   []     |
+     anubis             |           []             [] []                       |
+     ap-utils           |           ()                                         |
+     aspell             |                          [] []                       |
+     bash               |                  []      [] []                       |
+     batchelor          |                          []                   []     |
+     bfd                |                                                      |
+     bibshelf           |                                               []     |
+     binutils           |                             []                []     |
+     bison              |           []     []      [] []                []     |
+     bison-runtime      |           []             []          []       []     |
+     bluez-pin          |           []     []   [] [] []    [] []    [] []     |
+     cflow              |           []                                         |
+     clisp              |                             []                       |
+     console-tools      |                             []                       |
+     coreutils          |           []                []       []       []     |
+     cpio               |           []                []                []     |
+     cpplib             |                                               []     |
+     cryptonit          |                  []                           []     |
+     darkstat           |           []     []      []       []       [] []     |
+     dialog             |           [] []  []   [] [] [] []          [] []     |
+     diffutils          |           []     []      [] []             [] []     |
+     doodle             |                                         []    []     |
+     e2fsprogs          |           []                                  []     |
+     enscript           |                  []      [] []       []       []     |
+     error              |                  []      []       []          []     |
+     fetchmail          |           []                []          []           |
+     fileutils          |           []             [] []       []       []     |
+     findutils          |           [] []          []       [] []       []     |
+     flex               |           []     []      [] []                []     |
+     fslint             |                  []      []                [] []     |
+     gas                |                                                      |
+     gawk               |           []     []      []                   []     |
+     gbiff              |                          []                          |
+     gcal               |                                               []     |
+     gcc                |                                               []     |
+     gettext-examples   |           [] []          [] []    [] []    [] []     |
+     gettext-runtime    |           [] []          [] []    [] []    [] []     |
+     gettext-tools      |           []             [] []    [] []    [] []     |
+     gimp-print         |                                   []          []     |
+     gip                |                       []          []       [] []     |
+     gliv               |                  []      []       []          []     |
+     glunarclock        |                  []      [] []    []       [] []     |
+     gmult              |                       [] []                [] []     |
+     gnubiff            |                          ()                          |
+     gnucash            |           ()                                  []     |
+     gnucash-glossary   |              []                   []          []     |
+     gnuedu             |                                                      |
+     gnulib             |           []             [] []       []       []     |
+     gnunet-gtk         |                                               []     |
+     gnutls             |           []                                  []     |
+     gpe-aerial         |              []  []      [] []       []    [] []     |
+     gpe-beam           |              []  []      [] []       []    [] []     |
+     gpe-calendar       |                             []                       |
+     gpe-clock          |              []  []      [] []    [] []    [] []     |
+     gpe-conf           |              []  []      [] []    [] []       []     |
+     gpe-contacts       |                          [] []       []    [] []     |
+     gpe-edit           |              []  []      [] []    [] []    [] []     |
+     gpe-filemanager    |                                      []       []     |
+     gpe-go             |                  []      [] []       []    [] []     |
+     gpe-login          |              []  []      [] []    [] []    [] []     |
+     gpe-ownerinfo      |              []  []      [] []    [] []    [] []     |
+     gpe-package        |                                      []       []     |
+     gpe-sketchbook     |              []  []      [] []    [] []    [] []     |
+     gpe-su             |              []  []      [] []    [] []    [] []     |
+     gpe-taskmanager    |              []  []      [] []    [] []    [] []     |
+     gpe-timesheet      |              []  []      [] []    [] []    [] []     |
+     gpe-today          |              []  []      [] []    [] []    [] []     |
+     gpe-todo           |                             []       []    [] []     |
+     gphoto2            |           []             []       []       [] []     |
+     gprof              |                  []      []                   []     |
+     gpsdrive           |        []                []                   []     |
+     gramadoir          |                                   []          []     |
+     grep               |           [] []  []      [] []       []    [] []     |
+     gretl              |           []                                         |
+     gsasl              |           []                               [] []     |
+     gss                |           []             []                   []     |
+     gst-plugins        |     []                                  [] [] []     |
+     gst-plugins-base   |                                               []     |
+     gst-plugins-good   |     []                                  [] [] []     |
+     gstreamer          |                                         [] [] []     |
+     gtick              |                             []                       |
+     gtkam              |           []     []         []                []     |
+     gtkorphan          |                                               []     |
+     gtkspell           |                  []   [] [] []    [] []    [] []     |
+     gutenprint         |                                               []     |
+     hello              |           []     []      [] []    [] []    [] []     |
+     id-utils           |                  []      [] []                []     |
+     impost             |                                               []     |
+     indent             |                  []      [] []    []       [] []     |
+     iso_3166           |              []                []    [] [] [] []     |
+     iso_3166_2         |                                                      |
+     iso_4217           |                                []    []    [] []     |
+     iso_639            |                                []    []    [] []     |
+     jpilot             |                                                      |
+     jtag               |                                   []                 |
+     jwhois             |           []     []      []                   []     |
+     kbd                |           []             []                   []     |
+     keytouch           |                                               []     |
+     keytouch-editor    |                                               []     |
+     keytouch-keyboa... |                                               []     |
+     latrine            |                          []                   []     |
+     ld                 |                                               []     |
+     leafpad            |           [] []             []    []          []  [] |
+     libc               |           []     []         []    []          []     |
+     libexif            |           []                                         |
+     libextractor       |                          []                   []     |
+     libgpewidget       |              []  []      []       [] []    [] []     |
+     libgpg-error       |           []             []                          |
+     libgphoto2         |           []                                         |
+     libgphoto2_port    |           []                []                []     |
+     libgsasl           |           []             []                [] []     |
+     libiconv           |                                      []    []        |
+     libidn             |           []                               [] ()     |
+     lifelines          |           []                                  []     |
+     lilypond           |                                                      |
+     lingoteach         |                  []                                  |
+     lynx               |                  []         []                []     |
+     m4                 |           []     []      [] []                []     |
+     mailutils          |           []             [] []                []     |
+     make               |           []     []         []                []     |
+     man-db             |                          []                   []     |
+     minicom            |           []     []      [] []                []     |
+     mysecretdiary      |                  []      [] []                []     |
+     nano               |                  []      []                   []     |
+     nano_1_0           |           []             [] []                []     |
+     opcodes            |                          []                   []     |
+     parted             |           []                                         |
+     pilot-qof          |                                               []     |
+     psmisc             |           []                                  []     |
+     pwdutils           |           []                                  []     |
+     python             |                                                      |
+     qof                |                  []                           []     |
+     radius             |           []                []                       |
+     recode             |           [] []  []      [] []       []       []     |
+     rpm                |           [] []             []                []     |
+     screem             |                                                      |
+     scrollkeeper       |           []             [] []    []    [] [] []     |
+     sed                |           [] []  []      [] []    [] []    [] []     |
+     sh-utils           |                             []       []    []        |
+     shared-mime-info   |              []  []                     [] [] []     |
+     sharutils          |           []                []             [] []     |
+     shishi             |           []                                         |
+     silky              |                                   []                 |
+     skencil            |              []  []                           []     |
+     sketch             |              []  []                           []     |
+     solfege            |                                               []     |
+     soundtracker       |                                   []          []     |
+     sp                 |                                                      |
+     stardict           |                             []    []          []     |
+     system-tools-ba... |        [] [] []  []      []             [] [] []  [] |
+     tar                |           []             [] []       []       []     |
+     texinfo            |           []             [] []                []     |
+     textutils          |                             []       []       []     |
+     tin                |                             ()                       |
+     tp-robot           |                             []                       |
+     tuxpaint           |              []                      [] [] [] []     |
+     unicode-han-tra... |                                                      |
+     unicode-transla... |                                                      |
+     util-linux         |                  []         []       []       []     |
+     vorbis-tools       |                          [] []                       |
+     wastesedge         |                                                      |
+     wdiff              |           []     []      [] []    []          []     |
+     wget               |              []             []    []          []     |
+     xchat              |        []                   []    [] [] [] [] []     |
+     xkeyboard-config   |                                      []       []     |
+     xpad               |                                   [] []       []     |
+                        +------------------------------------------------------+
+                          nso or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv  ta
+                           0   2  3 58 30  54    5 73 72  4 40 46 11 50 128  2
+
+                          tg th tk tr uk ven vi  wa xh zh_CN zh_HK zh_TW zu
+                        +---------------------------------------------------+
+     GNUnet             |                    []                             |  2
+     a2ps               |          [] []     []                             | 19
+     aegis              |                                                   |  0
+     ant-phone          |          []        []                             |  6
+     anubis             |          [] []     []                             | 11
+     ap-utils           |             ()     []                             |  4
+     aspell             |             []     []  []                         | 15
+     bash               |                    []                             | 11
+     batchelor          |          []        []                             |  9
+     bfd                |                                                   |  1
+     bibshelf           |                    []                             |  7
+     binutils           |          []        []                     []      |  9
+     bison              |          []        []                     []      | 19
+     bison-runtime      |                    []         []          []      | 15
+     bluez-pin          |          [] []     []  []     []          []      | 28
+     cflow              |             []     []                             |  5
+     clisp              |                                                   |  6
+     console-tools      |          []        []                             |  5
+     coreutils          |          []        []                             | 16
+     cpio               |          [] []     []                             |  9
+     cpplib             |          []        []         []          []      | 11
+     cryptonit          |                                                   |  5
+     darkstat           |                    []         ()          ()      | 15
+     dialog             |          [] []     []         []          []      | 30
+     diffutils          |          []        []         []          []      | 28
+     doodle             |                    []                             |  6
+     e2fsprogs          |          []        []                             | 10
+     enscript           |          [] []     []                             | 16
+     error              |          []        []         []          []      | 18
+     fetchmail          |          []        []                             | 12
+     fileutils          |          []                   []          []      | 18
+     findutils          |          []        []                     []      | 17
+     flex               |          []        []                             | 15
+     fslint             |                    []                             |  9
+     gas                |          []                                       |  3
+     gawk               |          []        []                             | 15
+     gbiff              |                    []                             |  5
+     gcal               |          []                                       |  5
+     gcc                |          []                   []          []      |  6
+     gettext-examples   |          [] []     []         []    []    []      | 27
+     gettext-runtime    |          [] []     []         []    []    []      | 28
+     gettext-tools      |          [] []     []         []          []      | 19
+     gimp-print         |             []     []                             | 12
+     gip                |                    []                     []      | 12
+     gliv               |          []        []                             |  8
+     glunarclock        |                    []  []                 []      | 15
+     gmult              |          []        []         []          []      | 15
+     gnubiff            |                    []                             |  1
+     gnucash            |          ()                                       |  2
+     gnucash-glossary   |                    []                     []      |  9
+     gnuedu             |                    []                             |  2
+     gnulib             |          [] []     []         []          []      | 28
+     gnunet-gtk         |                                                   |  1
+     gnutls             |                                                   |  2
+     gpe-aerial         |                    []         []                  | 14
+     gpe-beam           |                    []         []                  | 14
+     gpe-calendar       |                    []                             |  3
+     gpe-clock          |          []        []  []     []                  | 21
+     gpe-conf           |                    []         []                  | 14
+     gpe-contacts       |                    []         []                  | 10
+     gpe-edit           |          []        []  []                 []      | 20
+     gpe-filemanager    |                    []                             |  6
+     gpe-go             |          []        []                             | 15
+     gpe-login          |          []        []  []     []          []      | 21
+     gpe-ownerinfo      |          []        []         []          []      | 21
+     gpe-package        |                    []                             |  6
+     gpe-sketchbook     |          []        []                             | 16
+     gpe-su             |          []        []         []                  | 20
+     gpe-taskmanager    |          []        []         []                  | 20
+     gpe-timesheet      |          []        []         []          []      | 18
+     gpe-today          |          []        []  []     []          []      | 21
+     gpe-todo           |                    []                             |  7
+     gphoto2            |             []     []         []          []      | 20
+     gprof              |          []        []                             | 11
+     gpsdrive           |                                                   |  4
+     gramadoir          |                    []                             |  7
+     grep               |          [] []     []                     []      | 34
+     gretl              |                                                   |  4
+     gsasl              |                    []         []                  |  8
+     gss                |                    []                             |  5
+     gst-plugins        |             []     []                     []      | 15
+     gst-plugins-base   |             []     []         []                  |  9
+     gst-plugins-good   |             []     []         []    []    []      | 20
+     gstreamer          |          [] []     []                             | 17
+     gtick              |                    []                             |  3
+     gtkam              |                    []                             | 13
+     gtkorphan          |                    []                             |  7
+     gtkspell           |             []     []  []     []    []    []      | 26
+     gutenprint         |                                                   |  3
+     hello              |          [] []     []         []          []      | 37
+     id-utils           |          []        []                             | 14
+     impost             |                    []                             |  4
+     indent             |          []        []         []          []      | 25
+     iso_3166           |       [] []        []               []            | 16
+     iso_3166_2         |                                                   |  2
+     iso_4217           |          []        []                             | 14
+     iso_639            |                    []                             | 14
+     jpilot             |          [] []     []         []                  |  7
+     jtag               |                    []                             |  3
+     jwhois             |          []        []                     []      | 13
+     kbd                |          []        []                             | 12
+     keytouch           |                    []                             |  4
+     keytouch-editor    |                                                   |  2
+     keytouch-keyboa... |                    []                             |  3
+     latrine            |          []        []                             |  8
+     ld                 |          []        []         []          []      |  8
+     leafpad            |          []        []         []          []      | 23
+     libc               |          []                   []          []      | 23
+     libexif            |                    []                             |  4
+     libextractor       |                    []                             |  5
+     libgpewidget       |                    []  []     []                  | 19
+     libgpg-error       |                    []                             |  4
+     libgphoto2         |             []                                    |  8
+     libgphoto2_port    |             []     []                     []      | 11
+     libgsasl           |                    []                             |  8
+     libiconv           |                    []                             |  7
+     libidn             |                    []         []                  | 10
+     lifelines          |                                                   |  4
+     lilypond           |                                                   |  2
+     lingoteach         |                    []                             |  6
+     lynx               |          [] []     []                             | 15
+     m4                 |                    []         []          []      | 18
+     mailutils          |             []                                    |  8
+     make               |          []        []         []                  | 20
+     man-db             |                    []                             |  6
+     minicom            |                    []                             | 14
+     mysecretdiary      |          []        []                             | 12
+     nano               |                    []                     []      | 17
+     nano_1_0           |          [] []     []                             | 18
+     opcodes            |          []        []                             | 10
+     parted             |          [] []                            []      | 10
+     pilot-qof          |                    []                             |  3
+     psmisc             |                    []                             | 10
+     pwdutils           |                    []                             |  3
+     python             |                                                   |  0
+     qof                |                    []                             |  4
+     radius             |             []                                    |  6
+     recode             |          []        []         []                  | 25
+     rpm                |          [] []     []                     []      | 14
+     screem             |                    []                             |  2
+     scrollkeeper       |          [] []     []                     []      | 26
+     sed                |          []        []                     []      | 22
+     sh-utils           |          []                                       | 15
+     shared-mime-info   |             []     []         []          []      | 24
+     sharutils          |          []        []                     []      | 23
+     shishi             |                                                   |  1
+     silky              |                    []                             |  4
+     skencil            |                    []                             |  7
+     sketch             |                                                   |  6
+     solfege            |                                                   |  2
+     soundtracker       |          []        []                             |  9
+     sp                 |          []                                       |  3
+     stardict           |             []     []         []          []      | 11
+     system-tools-ba... |    []    [] []     []     []  []          []      | 37
+     tar                |          [] []     []                     []      | 20
+     texinfo            |          []        []         []                  | 15
+     textutils          |          []                   []          []      | 17
+     tin                |                                                   |  1
+     tp-robot           |                    []         []          []      | 10
+     tuxpaint           |                    []  []                 []      | 16
+     unicode-han-tra... |                                                   |  0
+     unicode-transla... |                                                   |  2
+     util-linux         |          [] []     []                             | 20
+     vorbis-tools       |             []     []                             | 11
+     wastesedge         |                                                   |  1
+     wdiff              |          []        []                             | 22
+     wget               |          []        []                     []      | 19
+     xchat              |             []     []         []          []      | 29
+     xkeyboard-config   |          [] []     []                     []      | 11
+     xpad               |                    []         []          []      | 14
+                        +---------------------------------------------------+
+       77 teams           tg th tk tr uk ven vi  wa xh zh_CN zh_HK zh_TW zu
+      170 domains          0  1  1 77 39  0  136 10  1  48     5    54    0  2028
+
+   Some counters in the preceding matrix are higher than the number of
+visible blocks let us expect.  This is because a few extra PO files are
+used for implementing regional variants of languages, or language
+dialects.
+
+   For a PO file in the matrix above to be effective, the package to
+which it applies should also have been internationalized and
+distributed as such by its maintainer.  There might be an observable
+lag between the mere existence a PO file and its wide availability in a
+distribution.
+
+   If October 2006 seems to be old, you may fetch a more recent copy of
+this `ABOUT-NLS' file on most GNU archive sites.  The most up-to-date
+matrix with full percentage details can be found at
+`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
+
+1.6 Using `gettext' in new packages
+===================================
+
+If you are writing a freely available program and want to
+internationalize it you are welcome to use GNU `gettext' in your
+package.  Of course you have to respect the GNU Library General Public
+License which covers the use of the GNU `gettext' library.  This means
+in particular that even non-free programs can use `libintl' as a shared
+library, whereas only free software can use `libintl' as a static
+library or use modified versions of `libintl'.
+
+   Once the sources are changed appropriately and the setup can handle
+the use of `gettext' the only thing missing are the translations.  The
+Free Translation Project is also available for packages which are not
+developed inside the GNU project.  Therefore the information given above
+applies also for every other Free Software Project.  Contact
+`translation@iro.umontreal.ca' to make the `.pot' files available to
+the translation teams.
+
diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..386427a
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,57 @@
+Simon MORLAT (simon dot morlat at linphone dot org) wrotes:
+       - main graphical program (gnome)
+       - RTP library (oRTP)
+       - SIP user-agent library (osipua)
+       - audio library (mediastreamer), for codec and i/o handling.
+       - sipomatic, the automatic sip replier, which is often used for testing.
+
+Florian Wintertein < f-win at gmx dot net > wrotes the console version of linphone (linphonec)
+in console/ directory.
+
+Aymeric Moizard (jack at atosc dot org) wrotes:
+       - the oSIP SIP transactionnal stack (not part of linphone)
+       - some piece of code of the osip distribution have been reused in osipua
+       - presence information support in osipua
+       - and contributes to some parts of osipua (digest authentification)
+For more information about oSIP, see http://osip.atosc.org
+
+Sharath Udupa is developing the media_api, a usefull library to manage audio and video streams 
+for basic calls as well as conference.
+
+Sandro Santilli < strk at keybit dot net > wrote enhancements in the
+console interface (readline, new commands) and some bug fixes for
+the core api.
+
+Bryan Ogawa ( bko at cisco dot com ) sent a patch that made the linphone-0.7.1 release. 
+This patch fixed several issues in the SIP part while working with proxies.
+
+Koichi KUNITAKE < kunitake at linux-ipv6 dot org > has contributed a patch bringing 
+full IPv6 support.
+
+The Speex codec is a project from Jean Marc Valin. See http://speex.sourceforge.net for more 
+information.
+       
+The GSM library was written by :
+        Jutta Degener and Carsten Bormann,Technische Universitaet Berlin.
+       
+The LPC10-1.5 library was written by:
+       Andy Fingerhut
+       Applied Research Laboratory                     <-- this line is optional if
+       Washington University, Campus Box 1045/Bryan 509      you have limited space
+       One Brookings Drive
+       Saint Louis, MO 63130-4899
+       jaf@arl.wustl.edu
+       http://www.arl.wustl.edu/~jaf/
+
+       See text files in gsmlib and lpc10-1.5 directories for further information.
+       
+G711 library has some code from the alsa-lib on http://www.alsa-project.org
+
+Icons by Pablo Marcelo Moia.
+
+Translations:
+fr: Simon Morlat
+en: Simon Morlat and Delphine Perreau
+it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>
+de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>
+es: Jesús Benítez <gnelson at inMail dot sk>
diff --git a/BUGS b/BUGS
new file mode 100644 (file)
index 0000000..1f57983
--- /dev/null
+++ b/BUGS
@@ -0,0 +1 @@
+version 3.0.0: resizing of video window under linux often causes hang or crash (seems to be a SDL bug).
\ No newline at end of file
diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..d60c31a
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,340 @@
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1989, 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.
+
+                           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.
+\f
+                   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.)
+\f
+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.
+\f
+  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.
+\f
+  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
+\f
+           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) <year>  <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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  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) year  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/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..140cdae
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,513 @@
+2008-09-02  Francois-Xavier Kowalski  <fix@hp.com>
+
+       * gtk/Makefile.am (INCLUDES): 1.6
+         Deprecated automake  directive INCLUDES  does not work  within a
+         conditionnal.
+
+2008-08-22 Francois-Xavier Kowalski <fix@hp.com>
+
+       * mediastreamer2/src/Makefile.am (libmediastreamer_la_SOURCES+): 1.27
+         Deliver swscale.h  in case ffmpeg does not  come with libswscale
+         (in   which  case   the   swscale  feature   is  included   into
+         libavcodec).  Also deliver ffmpeg-priv.h wrapper.
+       
+       * mediastreamer2/src/videoout.c: 1.39 
+       * mediastreamer2/src/videodec.c: 1.24 
+       * mediastreamer2/src/sizeconv.c: 1.14 
+       * mediastreamer2/src/pixconv.c: 1.13 
+       * mediastreamer2/src/nowebcam.c: 1.15
+         Use ffmpeg-priv,h
+
+       * mediastreamer2/mediastreamer-config.h.in: 1.13
+         Remove from CVSm as it is generated by autoheader
+
+       * mediastreamer2/configure.ac: 1.47 
+         Use pkg-config to check for arts
+
+       * mediastreamer2/acinclude.m4: 1.12 
+         Remove -I/usr/include  and -L/usr/lib(64) from  CFLAGS and LIBS.
+         Check  for  ffmpeg  swscale  feature  into  libavcodec  or  into
+         libswscale
+
+2007-09-26 Francois-Xavier Kowalski <fix@hp.com>
+
+       * m4/exosip.m4: 1.3
+         make Linphone buildable with  the eXosip/osip version that ships
+         with Fedora.
+
+       * oRTP/include/ortp/stun_udp.h: 1.9 
+       * mediastreamer2/include/mediastreamer2/msvideo.h: 1.7 
+       * mediastreamer2/include/mediastreamer2/msticker.h: 1.6 
+       * mediastreamer2/include/mediastreamer2/msqueue.h: 1.3
+         Clean ANSI/C vs. ANSI/C++ differences
+
+2007-08-01 Sandro Santilli <strk@keybit.net>
+
+       * console/commands.c: Clean up commands 'nat', 'stun'
+         and 'firewall' to be more intuitive.
+
+2007-02-03  Francois-Xavier Kowalski  <fix@hp.com>
+
+       * m4/osip.m4 (OSIP_CFLAGS): 1.2 
+       * gnome/Makefile.am (linphone_applet_LDADD): 1.33 
+       * coreapi/Makefile.am (liblinphone_la_CFLAGS): 1.38 
+       * console/Makefile.am (sipomatic_LDADD): 1.45 
+         Cope with  osip2-2.2.2 delivered as  legacy on FC6.   New option
+         "--with-osip-version"
+
+2007-01-18 Francois-Xavier Kowalski <fix@hp.com>
+
+       * oRTP/Makefile.am: 1.24 
+       * mediastreamer2/Makefile.am: 1.30 
+       * Makefile.am: 1.45
+         Fix     RPM     package     generattion     to     cope     with
+         <https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=206841>
+
+2007-01-17  gettextize  <bug-gnu-gettext@gnu.org>
+
+       * m4/gettext.m4: Upgrade to gettext-0.16.1.
+       * m4/lib-link.m4: Upgrade to gettext-0.16.1.
+       * m4/lib-prefix.m4: Upgrade to gettext-0.16.1.
+       * m4/nls.m4: Upgrade to gettext-0.16.1.
+       * m4/po.m4: Upgrade to gettext-0.16.1.
+       * m4/codeset.m4: Upgrade to gettext-0.16.1.
+       * m4/intl.m4: New file, from gettext-0.16.1.
+       * m4/intldir.m4: New file, from gettext-0.16.1.
+       * m4/intmax.m4: Upgrade to gettext-0.16.1.
+       * m4/inttypes_h.m4: Upgrade to gettext-0.16.1.
+       * m4/inttypes-pri.m4: Upgrade to gettext-0.16.1.
+       * m4/lock.m4: New file, from gettext-0.16.1.
+       * m4/longdouble.m4: Upgrade to gettext-0.16.1.
+       * m4/longlong.m4: Upgrade to gettext-0.16.1.
+       * m4/size_max.m4: Upgrade to gettext-0.16.1.
+       * m4/stdint_h.m4: Upgrade to gettext-0.16.1.
+       * m4/ulonglong.m4: Upgrade to gettext-0.16.1.
+       * m4/visibility.m4: New file, from gettext-0.16.1.
+       * m4/Makefile.am (EXTRA_DIST): Add the new files.
+
+2006-10-18 Sandro Santilli <strk@keybit.net>
+
+       * console/Makefile.am: set osip includes last in the
+         search path.
+
+2006-09-19  Francois-Xavier Kowalski  <fix@hp.com>
+
+       * linphone.spec.in (BuildRequires): 1.8 
+         Add  RPM  build-time   dependency  on  gettext-devel  to  define
+         AM_GNU_GETTEXT. 
+
+2006-07-26 Sandro Santilli <strk@keybit.net>
+
+       * .cvsignore, developer-docs/mediastreamer/.cvsignore,
+        ipkg/.cvsignore, mediastreamer2/.cvsignore,
+        mediastreamer2/build/.cvsignore,
+        mediastreamer2/build/win32native/.cvsignore,
+        mediastreamer2/include/.cvsignore,
+        mediastreamer2/include/mediastreamer2/.cvsignore,
+        mediastreamer2/plugins/.cvsignore,
+        mediastreamer2/src/.cvsignore,
+        mediastreamer2/tests/.cvsignore,
+        oRTP/build/win32/.cvsignore,
+        oRTP/build/win32native/.cvsignore,
+        oRTP/src/tests/win_receiver/.cvsignore,
+        oRTP/src/tests/win_sender/.cvsignore,
+        po/.cvsignore, share/cs/.cvsignore:
+       Added-fixed .cvsignore files
+
+2006-07-20  gettextize  <bug-gnu-gettext@gnu.org>
+
+       * m4/codeset.m4: New file, from gettext-0.14.6.
+       * m4/gettext.m4: New file, from gettext-0.14.6.
+       * m4/glibc2.m4: New file, from gettext-0.14.6.
+       * m4/glibc21.m4: New file, from gettext-0.14.6.
+       * m4/iconv.m4: New file, from gettext-0.14.6.
+       * m4/intdiv0.m4: New file, from gettext-0.14.6.
+       * m4/intmax.m4: New file, from gettext-0.14.6.
+       * m4/inttypes.m4: New file, from gettext-0.14.6.
+       * m4/inttypes_h.m4: New file, from gettext-0.14.6.
+       * m4/inttypes-pri.m4: New file, from gettext-0.14.6.
+       * m4/isc-posix.m4: New file, from gettext-0.14.6.
+       * m4/lcmessage.m4: New file, from gettext-0.14.6.
+       * m4/lib-ld.m4: New file, from gettext-0.14.6.
+       * m4/lib-link.m4: New file, from gettext-0.14.6.
+       * m4/lib-prefix.m4: New file, from gettext-0.14.6.
+       * m4/longdouble.m4: New file, from gettext-0.14.6.
+       * m4/longlong.m4: New file, from gettext-0.14.6.
+       * m4/nls.m4: New file, from gettext-0.14.6.
+       * m4/po.m4: New file, from gettext-0.14.6.
+       * m4/printf-posix.m4: New file, from gettext-0.14.6.
+       * m4/progtest.m4: New file, from gettext-0.14.6.
+       * m4/signed.m4: New file, from gettext-0.14.6.
+       * m4/size_max.m4: New file, from gettext-0.14.6.
+       * m4/stdint_h.m4: New file, from gettext-0.14.6.
+       * m4/uintmax_t.m4: New file, from gettext-0.14.6.
+       * m4/ulonglong.m4: New file, from gettext-0.14.6.
+       * m4/wchar_t.m4: New file, from gettext-0.14.6.
+       * m4/wint_t.m4: New file, from gettext-0.14.6.
+       * m4/xsize.m4: New file, from gettext-0.14.6.
+       * m4/Makefile.am (EXTRA_DIST): Add the new files.
+       * Makefile.am (EXTRA_DIST): Add config.rpath.
+
+2006-07-07  Francois-Xavier Kowalski  <fix@hp.com>
+
+       * linphone.spec.in (Version): 1.7
+         Force build  of gtk-doc, as  the default choice that  comes with
+         GTK_DOC_CHECK m4 macro is "no".
+
+2006-05-17 Francois-Xavier Kowalski <fix@hp.com>
+
+       * configure.in: 1.179
+       * configure.in: 1.178
+         Allow rpm users to use oRTP packages built from Linphone root.
+
+May 8 2006 : Sandro Santilli <strk@keybit.net>
+
+       * configure.in: lowered libspeex requirement to 1.1.6
+
+undefined yet: linphone-1.4.0
+       - new audio/video streaming engine (mediastreamer2) that let the following improvements:
+               + split video frame to get them smaller than MTU
+               + less video latency
+               + video supported at CIF and QCIF resolution with variable framerate.
+               + arts sound input/output
+               + improved sound latency with alsa
+               + alsa support works with dmix/dsnoop
+               + old oss drivers that don't like select and non blocking mode should finally work
+               - lpc10-15 support removed (speex does better at 8kbit/s)
+               - jack support unported to mediastreamer2, sorry : volunteer needed
+       - video resolution and framerate set according to bandwidth constraints.
+       - linphonec new "soundcard" command to list and choose sound devices.
+       - new download and upload bandwidth parameters.
+
+March 31 2006: linphone-1.3.4
+       - fix linphonec bug in auto-answer mode: was terminating call after a few seconds.
+
+March 28 2006: linphone-1.3.3
+       - various FedoraCore 4 compile problem solved
+       - fix video bug ('could not mmap': happening on kernel>=2.6.15 with pwc driver)
+       - SIP register were not using route field (submitted patch)
+
+March 17 2006: linphone-1.3.2
+       - fix early media call problem: ack for 200ok was never sent.
+
+March 10 2006: linphone-1.3.1
+       - fix compile errors with gcc-2.95 (thanks Wolfram Gloger)
+
+March 8 2006 : linphone-1.3.0 (SUMMARY)
+       - a lots of improvements in linphonec (see strk 's Changelogs below)
+       - telephone event problem with sipomatic.
+       - updated cz translation.
+       - fix bugs around addressbook.
+       - video support with H263-1998/RFC2429 nearly clean.
+       - added timeout for incoming calls
+
+February 20 2006 : Sandro Santilli <strk@keybit.net>
+
+       * console/commands.c: added filter support for
+       command 'friend list'.
+
+February 13 2006 : Sandro Santilli <strk@keybit.net>
+
+       * console/linphonec.c: fixed unused variable warning.
+
+February 02 2006 : Sandro Santilli <strk@keybit.net>
+       Console:
+               - Padded vtable with missing callbacks
+                 (fixing a segfault on friends subscription)
+               - Handled friends notify (bare version)
+               - Handled text messages receive (bare version)
+               - Printed message on subscription request (bare version)
+               - Added 'friend list' and 'friend call' commands
+               - Allowed for multiple DTMF send in a single line
+               - Added status-specific callback (bare version)
+
+
+January 26 2006 : Sandro Santilli <strk@keybit.net>
+       - Core: fixed bug in linphone_core_set_nat_address refusing
+         to set address if use flag was off, added support
+         for NULL addr parameter to only change use flag.
+       - Support: added missing GFileTest enum values
+       - Console: 'nat' commands, cleanups
+
+January 25 2006 : Sandro Santilli <strk@keybit.net>
+       - Core: added request uri in proxy registration failure message
+       - Console: removed the -t switch
+         (terminate on close is default behaviour)
+
+January 20 2006 : Sandro Santilli <strk@keybit.net>
+       - Console: 
+         linphonec_init() and linphonec_finish() functions.  Handled
+         SIGINT and SIGTERM to invoke linphonec_finish().  Handling of
+         auto-termination (-t) moved to linphonec_finish().  Reworked main
+         (input read) loop to not rely on 'terminate' and 'run' variable
+         (dropped). configfile_name allocated on stack using PATH_MAX
+         limit. Changed print_usage signature to allow for an exit_status
+         specification.
+
+January 18 2006 : Sandro Santilli <strk@keybit.net>
+       - Console: 
+         Command completion inhibited
+         in proxy addition and auth request prompts.  Avoided use of
+         readline's internal filename completion.
+
+January 14 2006 : Sandro Santilli <strk@keybit.net>
+       - Console: 
+         Reworked commands interface to use a table structure, used by
+         command line parser and help function.  Implemented first
+         level of completion (commands).  Added notification of
+         invalid "answer" and "terminate" commands (no incoming call,
+         no active call).  Forbidden "call" intialization when a call is
+         already active.  Cleaned up all commands, adding more feedback
+         and error checks.
+
+January 13 2006 : Sandro Santilli <strk@keybit.net>
+       - Console: 
+         Added linphonec.h. Code layout change (added comments, forward
+         decl, globals on top, copyright notices and Logs). Handled
+         out-of-memory condition on history management. Removed
+         assumption on sizeof(char).  Fixed bug in authentication
+         prompt (introduced by readline).  Added support for multiple
+         authentication requests (up to MAX_PENDING_AUTH).
+
+January 12 2006 : Sandro Santilli <strk@keybit.net>
+       - Console: 
+         Changed default configuration file to ~/.linphonerc,
+         automatically handling migration from old layout if not present
+         (use ~/.linphonec or ~/.gnome2/linphone).  Added compile-time
+         define to show identity in prompt.  Used EXIT_SUCCESS and
+         EXIT_FAILURE macros. 
+         Made readline use ~/.linphonec_history file for
+         reading/writing.  Fixed auto-call handling code.  Fixed
+         OOB write of sscanf() in linphonec_parse_command_line().
+         Simplified control flow in linphonec_main_loop().
+         Put linphonec_{initialize,finish}_readline() calls out of
+         main_loop(). Removed redundant exit(0) at end of main().
+         Fixed small leaks.
+
+December 14 2005 : linphone-1.2.0
+       - various ipv6 bugfixes (again)
+       - fix po.pl file (was utf-8 but declared as iso8902)
+       - enum/automatic proxy conflict solved. use "sip:7887488478" for enums, just "382884824" to go through the default proxy.
+       - experimental video support progresses, compliance improved.
+       - remove ilbc from source tree: it is now available as a separete plugin.
+       - updated to work with lastest ffmpeg cvs
+       - fix bug when answering 'busy here'; active call was closed !
+       - fix Ctrl+H bug in linphonec
+       - added bresilian translation
+       - added swedish translation
+       - uri bar improvements
+       - fix a DoS attack by setting a payload type number > 127
+
+August 24 2005  : linphone-1.1.0
+       - peer to peer text chat
+       - automatic sip url completion when using a default proxy: 
+         when user types 'mymother' in the url bar, linphone calls sip:mymother@[default-proxy]
+       - ilbc 20 and 30 miliseconds frames support
+       - support for setting a soundcard for playback and another for record
+       - ipv6 bugfixes: works with ipv6 local loopback with sipomatic at least ! Needs to be tested in a real network.
+       - gtk interface bugfixes
+       - increase max supported sound devices (was 5).
+       - automatic incoming redirections
+       - experimental video support (needs special compilation procedure, see mailing lists)
+       
+
+March 27 2005 :        linphone-1.0.1
+       - patch for NAT traversal (SDP connection address in SDP answer)
+       - patch for writing correct port information when NAT is enabled
+       - patch for always using "rport" extension to traverse NAT with
+         signalling.
+       - patch for saving/restoring correct configuration of proxy:
+         "reg_register" -> "reg_sendregister" and fix for saving "expires"
+       
+March 21 2005 :        linphone-1.0.0
+       - switch from osipua to eXosip/osip2 for improved sip functionnalities and compliance.
+       - support for presence (busy, online...) for everyone in the address book (uses SUBSCRIBE/NOTIFY)
+       - support for PUBLISH (presence information through sip servers)
+       - support for configuring multiple proxies.
+       - RTP adaptive jitter buffer ( provides lower latency )
+       - RTCP coumpound messages sent periodically.
+       - on demand digest authentication for INVITE and REGISTER
+       - support for 183 with sdp answers.
+       - add support for jackd (contributed)
+       - call logging
+       - arm build improved
+       - cz and nl translations contributed.
+
+
+January 2004 : linphone-0.12.2
+       - add enum support (see RFC3241 and RFC3026) 
+               Thanks to Rene Bartsch < ml at bartschnet dot de > for its usefull 
+               and precious help.
+       - interactive presence box (no more need to click OK to confirm)
+       - update spanish translation
+       - alsa interface: the user can choose precisely the pcm device to be used
+               by setting the sound/alsadev parameter of the config file.
+       - use 1 RTP socket instead of 2: this makes linphone NAT-friendly.
+
+Thursday October 2 2003 : linphone-0.12.1
+  - add support for personalizing rings.
+  - make glib dependency optionnal (but recommended).
+  - add polish translation.
+  - use of libartsc to suspend arts instead of killing him.
+
+Tuesday August 19 2003 : linphone-0.12.0
+       - add support for speex/16000
+       - re-enable alsa support (0.9.x)
+       - few improvements on gui.
+       - added spanish translation by Jesús Benítez <gnelson at inMail dot sk>
+
+Monday April 05 2003: linphone-0.11.0
+       - merge ipv6 support patch, contributed by Koichi KUNITAKE 
+               < kunitake at linux-ipv6 dot org > (thanks !)
+       - some improvements on graphical interface.
+
+Friday Feb 28 2003 : linphone-0.10.1
+       - add firewall friendly capability
+       - compiles all well on arm-linux
+       - bugfixes.
+
+Friday Jan 24 2003 : linphone-0.10.0
+       - Gnome interface ported to gnome-2
+       - Unified core engine for both graphical and console interface.
+       - Many bug fix and improvements in the SIP stack.
+       - Japoneese translations and manual added, by Yamaguchi Yoshiya.
+       - updated for speex-1.0rc1
+       - ported to FreeBSD thanks to Georg Shwarz
+
+Monday Oct 21 2002 : linphone-0.9.1
+       - AMD: add support for the "received" and "rport" parameter in osipua.
+
+Monday Oct 21 2002 : linphone-0.9.1
+       - integration of the patch of Lenaic Huard that adds the ability for linphone to send
+               dtmf tones through rtp (only reported to console interface).
+       - following this patch, a nice keypad has been added to the graphical interface to bring
+               the fonctionnality of the patch gui's users.
+       - integration of the patch of Aymeric Moizard, concerning compliance with RFC3261 (new
+               sip's RFC) using the new dialog_t api of libosip.
+       - updated for use of speex-beta1 (speex codec)
+       - osipua fix by jack@atosc.org
+        1: reject calls with 603
+        2: establishement of 1 early dialog for incoming calls.
+        3: update to libosip CVS and its new OSIP_TRACE MACROs.
+        4: fix presence handling.
+        5: fix expires header in REGISTER.
+
+
+Monday Aug 26 2002: linphone-0.9.0
+       - the sdp rtpmap string for alaw and mulaw codec was incorrect.
+
+Sunday Aug 4 2002:     linphone-0.9.0pre3
+       Non visible changes:
+       - Linphone's internal audio architecture is ported to the new mediastreamer architecture.
+         The mediastreamer library is already present in linphone since October 29 2001 but
+         was never used at this time by the core program. Now lots of work has be done inside the
+         mediastreamer so that it is ready to be used by the core program. As a consequence, the
+         old architecture defined by the audio/ directory and the codec.c io.c files is dropped.
+         The mediastreamer architecture provides a modular framework for audio and video 
+         processing. It includes various audio and video codecs (or wrappers to third party 
+         audio and video codecs).
+       Visible changes:
+       - The Speex codec (http://speex.sourceforge.net) is now availlable to linphone, since it has
+         its mediastreamer wrapper. This patent-free codec provides two bitrates, the lowest 
+         being able to work with 56k dialup connections. This is a very important step, because
+         from now only the low quality LPC10 codec was availlable for such connections.
+       - Thanks to Florian Winsterstein (f-win at gmx.de), a console version of linphone called
+         "linphonec" is availlable. Linphonec can be compiled without gnome.
+
+Wednesday May 8 2002:  linphone-0.8.0
+       Visible changes:
+       - Updated to libosip-0.8.5, that reflects the lastest sip draft.
+       - Uses the SDP parser the libosip, and uses also a modified version of its SDP negociator.
+         The MediaDesc object is removed, now osipua users have to deal with BodyHandler's, as the
+         SdpHandler that deals with sdp message generation and negociation.
+         The SDP parser and negociator can use the a=rtpmap fields, so that compliance is improved.
+       - LPC10-1.5 codec has been assigned payload type 115 instead of 4 previously. This breaks
+         compatibility with older versions of linphone.
+       - oRTP (the new RTP library) is used in place of the old lprtplib.
+       - fix endianess problems in the audio part.
+       Non visible changes (changes on libraries not currently used by linphone but used later):
+       - mediastreamer has new working objects: webcam image capture, mpeg encoding and decoding
+         thanks to the libavcodec (ffmpeg) library, rtp wrapper thanks to oRTP.
+
+Tuesday April 15 2002: linphone-0.7.2
+       - A crash in property box "apply" fixed.
+       - bugfix in osipua.
+
+Tuesday March 12 2002: linphone-0.7.1
+       - Some bug fixes by Bryan Ogawa in osipua: route, record-route, tags.
+
+Friday March  1 2002:  linphone-0.7.0
+       - Digest authentification support added by Aymeric.
+       - Improvements in property box.
+       - Translations in German and Italian by J.J. Sarton and A. Zanoni
+       - Bugfix and improvements in the osipua stack.
+       - Better handling of the registration parameters (the user can set its own address of record).
+       
+
+Thu December  6 2001
+                       -osipua.c: Memory allocations.
+                          fi call of from_tag_add(...,sgetcopy(ua->fromtag));
+           -utils.c: Memory allocations.
+           -CallLegs are removed automatically by the osipua layer (eg: when a transaction timed out).
+
+Tue November 27 2001
+                       -Bugfix in osipua for proxy support: record-route and route header support, request-uri bug fixed.
+                       -New choice "outbound proxy" in the property box.
+                       -Fix compilation issues.
+
+
+Mon October 29 2001
+                       -New unithreaded design of the osipua library, based on libosip-0.7.x series.
+                       -Asynchronous name resolution in osipua.
+                       -To and From tag support added.
+                       -Proxy support added. The user can choose between registering for a redirect server, or
+                               registering for a proxy server. When he choose proxy, then all requests are sent to the proxy.
+                       -New good looking graphical interface.
+                       -Mediastreamer is included, but still unused. It has a begin of gtkdoc dcocumentation.
+
+Wed September 26 2001
+                       -Add registration and redirection ability in gui and osipua.
+                       -Critical bugs in osipua/osip fixed.
+                       -Display all sip error strings in appbar.
+                       -Documentation translated in French.
+
+Tue  August 21 2001
+                       -       Add address book functionnality
+                       - Add ringback
+                       - Minor bugfixes in configure.in, src/callbacks.c
+                       -       Work with libosip-0.6.1
+
+Wed August 1 2001:
+                       - Integration with osip sip stack. lpsiplib is no more used and abandonned. osipua provides the session level
+                       on top of osip.
+                       - added G711 codecs.
+                       - configuration structures and api re-written for more clarity.
+                       - new codec selection box
+                       - new sytem for codec registration
+                       - automatic selection of codecs regarding to network connection type.
+                       - add resizing ability for icon applet.
+
+
+June                   2001:  linphone-0.3.0
+                       -Nearly all code in linphone is object oriented.
+                       -linphone can be run as a gnome applet, or as a silent dameon, or as a normal application.
+                       -bugfixes in sip/sdp messages.
+                       -addition of a test program called sipomatic that can automatically answers to call. (for test)
+                       -add io_disk implementation of the audio lib. this can be used to replace the sond card by io on file system.
+
+
+
+Tue May 15 2001:  linphone-0.2.1
+                       -Fix a stupid bug in the audio library.
+
+Fri May 11 2001: linphone-0.2.0
+               -add many missing features of version 0.1.0 (for the property box)
+               -audio levels on the main window.
+               -Sip library modified: now it uses one thread, and should be able to handle several calls in the future.
+               -audio library is more performant. It is able to find itself the best blocksize (latency) by testing the driver.
+               -interactive help on the property box and user manual.
+               -add an icon.
+
+linphone-0.1.0 :
+               Released on april,19 2001
+               Initial version.
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..1a8910f
--- /dev/null
@@ -0,0 +1,148 @@
+## Process this file with automake to produce Makefile.in
+
+# let make re-run automake upon need
+ACLOCAL_AMFLAGS = -I m4 $(ACLOCAL_MACOS_FLAGS)
+
+if EXTERNAL_ORTP
+ORTP_DIR =
+else
+ORTP_DIR = oRTP
+endif
+
+SUBDIRS = m4 pixmaps po $(ORTP_DIR) mediastreamer2\
+               coreapi console gtk-glade share scripts
+
+
+
+ACLOCAL_FLAGS=-I$(top_srcdir)/m4
+
+
+INSTALLDIR=$(shell cd $(top_builddir) && pwd)/linphone-install
+INSTALLDIR_WITH_PREFIX=$(INSTALLDIR)/$(prefix)
+ZIPFILE=$(shell cd $(top_builddir) && pwd)/$(PACKAGE)-win32-$(VERSION).zip
+ZIP_EXCLUDED=include lib \
+               share/sounds/linphone/rings/synth.wav \
+               share/sounds/linphone/rings/tapping.wav \
+               share/sounds/linphone/rings/orig.wav \
+               share/sounds/linphone/rings/sweet.wav \
+               share/sounds/linphone/rings/rock.wav
+
+
+GTK_PREFIX=/usr
+GTK_FILELIST=gtk+-2.18.5.filelist
+GTK_FILELIST_PATH=$(shell cd $(top_srcdir) && pwd)/$(GTK_FILELIST)
+LINPHONEDEPS_FILELIST=linphone-deps.filelist
+WINBINDIST_FILES=$(shell cat $(top_srcdir)/$(LINPHONEDEPS_FILELIST))
+ISS_SCRIPT=linphone.iss
+ISS_SCRIPT_PATH=$(shell cd $(top_srcdir) && pwd)/$(ISS_SCRIPT)
+#path to Inno Setup 5 compiler
+ISCC=/c/Program\ Files/Inno\ Setup\ 5/ISCC.exe
+PACKAGE_WIN32_FILELIST=$(PACKAGE)-win32.filelist
+
+EXTRA_DIST = config.rpath  BUGS linphone.kdevelop  \
+                               intltool-extract.in     \
+                               intltool-merge.in       \
+                               intltool-update.in \
+                               README.arm \
+                               README.mingw \
+                               README.macos \
+                               autogen.sh \
+                               linphone.spec.in \
+                               $(GTK_FILELIST) \
+                               gen-gtkfilelist.sh \
+                               $(LINPHONEDEPS_FILELIST) \
+                               $(ISS_SCRIPT).in
+
+DISTCLEANFILES= intltool-extract intltool-merge intltool-update po/stamp-it po/.intltool-merge-cache $(ISS_SCRIPT) $(PACKAGE_WIN32_FILELIST)
+
+CLEANFILES=Portfile Portfile-devel
+
+# `make rpm'
+
+all-local: linphone.spec linphone.iss
+
+linphone.spec: linphone.spec.in
+
+.phony: rpm
+rpm:
+       $(MAKE) dist
+# Create "Specfile" at the same level as the tarball content
+       -rm -f $(PACKAGE)-$(VERSION).tar
+       gunzip $(PACKAGE)-$(VERSION).tar.gz
+       cp $(PACKAGE).spec Specfile
+       tar --append --file=$(PACKAGE)-$(VERSION).tar Specfile
+       gzip $(PACKAGE)-$(VERSION).tar
+# <https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2068410>
+       TAR_OPTIONS=--wildcards rpmbuild -ta --clean --rmsource --rmspec $(PACKAGE)-$(VERSION).tar.gz
+
+#a zip containing win32 binaries, suitable to generate an installer
+
+other-cherrypick:
+       cd $(GTK_PREFIX) && \
+       for file in $(WINBINDIST_FILES) ; do \
+               if test -d $$file; then \
+                       mkdir -p $(INSTALLDIR_WITH_PREFIX)/$$file ;\
+               else \
+                       cp $$file $(INSTALLDIR_WITH_PREFIX)/$$file ;\
+               fi \
+       done
+       cp /mingw/bin/libgcc_s*.dll $(INSTALLDIR_WITH_PREFIX)/bin/.
+
+
+gtk-cherrypick:
+       cd $(GTK_PREFIX) && \
+       for file in `cat $(GTK_FILELIST_PATH)` ; do \
+               if test -d $$file; then \
+                       mkdir -p $(INSTALLDIR_WITH_PREFIX)/$$file ;\
+               else \
+                       cp $$file $(INSTALLDIR_WITH_PREFIX)/$$file ;\
+               fi \
+       done && \
+       cp -rf share/themes $(INSTALLDIR_WITH_PREFIX)/share/.
+
+zip:
+       rm -f $(ZIPFILE)
+       rm -rf $(INSTALLDIR)
+       mkdir -p $(INSTALLDIR)
+       make install DESTDIR=$(INSTALLDIR)
+#remove unwanted linphone stuff
+       cd $(INSTALLDIR_WITH_PREFIX) && rm -rf $(ZIP_EXCLUDED)
+#add gtk dlls and files
+       make gtk-cherrypick
+       make other-cherrypick
+       cp -f $(top_srcdir)/gtk-glade/gtkrc $(INSTALLDIR_WITH_PREFIX)/.
+       cp -f $(top_srcdir)/README $(INSTALLDIR_WITH_PREFIX)/.
+       cp -f $(top_srcdir)/COPYING $(INSTALLDIR_WITH_PREFIX)/.
+       cd $(INSTALLDIR_WITH_PREFIX) && zip -r $(ZIPFILE) *
+
+filelist: zip
+       cd $(INSTALLDIR_WITH_PREFIX) && \
+       rm -f $(PACKAGE_WIN32_FILELIST) && \
+       for file in `find` ; do \
+               if ! test -d $$file ; then \
+                       echo "Source: $$file; Destdir: {app}\\`dirname $$file`; Flags: ignoreversion" \
+                       >> $(PACKAGE_WIN32_FILELIST) ;\
+               fi \
+       done
+
+setup.exe: filelist
+       cp $(ISS_SCRIPT) $(INSTALLDIR_WITH_PREFIX)/.
+       cd $(INSTALLDIR_WITH_PREFIX) && \
+       $(ISCC) $(ISS_SCRIPT) 
+       mv $(INSTALLDIR_WITH_PREFIX)/Output/setup.exe $(PACKAGE)-$(VERSION)-setup.exe
+       rm -rf $(INSTALLDIR_WITH_PREFIX)/Output
+       rm -f $(INSTALLDIR_WITH_PREFIX)/$(PACKAGE_WIN32_FILELIST)
+       rm -f $(INSTALLDIR_WITH_PREFIX)/$(ISS_SCRIPT)
+
+newdate:
+       cd gtk-glade && $(MAKE) newdate
+
+
+Portfile:      $(top_srcdir)/scripts/Portfile.tmpl dist
+       sed -e 's/\@VERSION\@/$(LINPHONE_VERSION)/g' \
+         -e 's/\@LINPHONE_MD5\@/$(shell md5sum linphone-$(VERSION).tar.gz | awk {'print $$1'})/' < $< > $@
+
+Portfile-devel:        $(top_srcdir)/scripts/Portfile-devel.tmpl dist
+       sed -e 's/\@VERSION\@/$(LINPHONE_VERSION)/g' \
+         -e 's/\@LINPHONE_MD5\@/$(shell md5sum linphone-$(VERSION).tar.gz | awk {'print $$1'})/' < $< > $@
+
diff --git a/NEWS b/NEWS
new file mode 100644 (file)
index 0000000..6c8f60b
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,137 @@
+linphone-3.2.2 -- ?????????
+       * improve bitrate usage of speex codec
+       * allow speex to run with vbr (variable bit rate) mode
+       * add speex/32000 (ultra wide band speex codec)
+       * answer empty SIP INFO requests
+
+linphone-3.2.1 -- October 5, 2009
+       * improve graphics and behaviour of mute button
+       * updated translations
+       * windows installer installs reg keys to indicate windows to start linphone clicking of sip uris
+       * workaround a bug Gtk-macos X with modal popup windows, preventing to answer calls
+
+linphone-3.2.0 -- September 17, 2009
+       * new in-call layout
+       * new idle view with two buttons
+       * ability to dial the number from dialpad
+       * improve local IP address detection when having multiple networks (ex: VPNs)
+       * use proxy's received and rport params from via in Contact header when possible
+       * port to mac os X leopard (using gtk/x11), audio only for now
+       * DevC++ support now deprecated, use msys/mingw (see README.mingw for details)
+       * add an option to ask linphone to place a call, whenever an instance is already running or not:
+               should be useful for starting calls from a web browser recognizing the 'sip:' uri scheme.
+       * french and italian translation updated
+       * don't show ffmpeg codecs when encoder are disabled in ffmpeg library.
+       * bugfixes in:
+               - video4linux2 support
+               - alsa support
+               - socket leak in mtu discovery
+
+
+linphone-3.1.2 -- May 5, 2009
+       * make it work with lastest ffmpeg swscale
+       * improve theora packer
+       * update theora default settings to match performance of 1.0 release.
+       * fix a random crash during video resizing on linux with SDL.
+
+linphone-3.1.1 -- April 14, 2009
+       * fix crash when opening property box, in some rare case
+       * windows version uses the new libmsdscap plugin (video capture using directshow)
+       * improved translations
+
+linphone-3.1.0 -- March 16, 2009
+       * linphone can now send large video pictures: up to SVGA, configurable via the user interface
+       * automatic rescaling of the video windows to the video size of incoming stream
+       * improved webcam support on windows
+       * plenty of user interface cosmetic improvements
+       * set a user friendly gtk theme by default on windows
+       * linphonec can compile and work without libreadline
+       * enable translations on windows
+       * enable lookups of SRV records
+       * new 'linphonecsh' program to send commands to a linphonec running as daemon using unix sockets or tcp.
+       * bugfixing as usual
+
+linphone-3.0.0  -- October 13, 2008
+       * new graphical interface based on Glade/Gtk
+       * systray icon
+       * STUN working for RTP
+       * fully ported to windows
+       * accurate bandwidth management (to let video occupy all remaning bandwidth)
+       * new H264 plugin based on x264 (msx264)
+       * automatic call hangup upon media transmission faillure
+
+linphone-2.1.1 -- February 13, 2008
+       * fix interroperability bug with Asterisk about a BYE not sent by linphone.
+       * fix alsa support weakness (capture underruns not recovered)
+
+linphone-2.1.0 -- January 25, 2008
+       * 4CIF support
+       * enable resizing of video output
+       * hu translation added
+
+linphone-2.0.1 -- November 30, 2007
+       * fix interop issue with asterisk
+       * answer OPTIONS and other SIP messages
+       * allow usage of ALSA user pcm devices with the sound->alsadev config item.
+
+linphone-2.0.0 -- November 15, 2007
+       * port to libeXosip2-3.0.x with libosip2-3.0.x
+       * implements early media
+       * implements incoming re-INVITE
+       * presence support improvements
+       * ipv6 working on windows
+       * implements SDP over 200ok/ACK
+       * add experimental snow codec support
+       * answers to VFU request in SIP-INFO by sending an I-frame.
+       * ffmpeg rate control enabled, improved mpeg4 quality for low bandwidths
+       * separate video grabbing and display in linphonec
+
+linphone-1.7.1 -- April 16, 2007
+       * cz translation
+       * compilation bugfixes (when video support is disabled)
+       * fix IM icons path bug
+
+linphone-1.7.0 -- April 11, 2007
+       * new splash screen when no webcam is detected
+       * new friend commands for linphonec
+       * gnome interface becomes gtk-only
+       * fix issue with codec bitrate settings when no bandwidth limits are given
+       * open rtp sockets before sending SDP offer or answer (so that we don't miss the
+         first I-frame)
+
+linphone-1.6.0 -- January 23, 2007
+       * Video4Linux V2 support with mjpeg cameras
+       * use MPEG4 config string provided in the SDP (if any)
+       * fix bug when choosing an invalid ring sound file
+       * fix bug when using quickcam driver with CIF size
+       * reduce audio bandwidth usage for <128kbit/s connections with video
+
+linphone-1.5.1 -- November 14, 2006
+       * fix translations
+
+linphone-1.5.0 -- October 11, 2006
+       * compliant theora support (using Luca Barbato's draft)
+       * mpeg4 support (compliant with RFC3016)
+       * controls to display and modify video codec list (gnome interface)
+       * banwidth usage improvements
+       * splash screen when no webcam is detected
+
+linphone-1.4.1 -- September 18, 2006
+       * fixes crash when attempting to make two simultaneous calls
+       * fixes crash when having no soundcard
+       * require theora>=1.0.0-alpha7
+       * do not allow resizing of the gnome interface
+       * do not change mixer settings at startup
+
+linphone-1.4.0 -- September 11, 2006
+       * no more glib dependency at all 
+       * new mediastreamer2 framework for audio/video streaming
+       * stable video support with H.263-1998
+       * echo cancelation
+       * experimental theora support
+       * jack support unported to mediastreamer2, sorry : volunteer needed
+       * video resolution and framerate set according to bandwidth constraints.
+       * linphonec new "soundcard" command to list and choose sound devices.
+       * new download and upload bandwidth parameters used to find suitable video/audio codec choice and parameters.
+       * new 'play' and 'record' functions to linphonec to play and record wav files
+       * arts sound backend
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..c92edbc
--- /dev/null
+++ b/README
@@ -0,0 +1,49 @@
+This is Linphone, a free (GPL) video softphone based on the SIP protocol.
+
+
+******************Building linphone ***********************************
+- you need at least:
+               - libosip2>=3.0.3
+               - libeXosip2>=3.0.3
+               - speex>=1.1.6
+               - libreadline
+       + gsm codec (gsm source package or libgsm-dev or gsm-devel) (optional)
+       + if you want to gtk/glade interface:
+               - gtk>=2.16.0
+               - libglade>=2.2
+       + if you want video support:
+               - SDL>=1.2.10
+               - libavcodec (ffmpeg) from a year 2007 or later cvs/svn
+               - libswscale (part of ffmpeg too) for better scaling performance
+
+with their corresponding -dev or -devel package if you don't use source packages.
+
+For windows compilation see README.mingw.
+For macOS X, see README.macos
+
+
+******************************** notes for developers: *****************************
+
+Here is a short description of the content of the source tree.
+
+- oRTP/ is a poweful implementation of the RTP protocol. See the oRTP/README for more details. 
+       It is used by the mediastreamer to send and receive streams to the network.
+
+- mediastreamer2/ is one of the important part of linphone. It is a framework library for audio 
+       and video processing. It contains several objects for grabing audio and video and outputing
+       it (through rtp, to file).
+       It contains also codec objects to compress audio and video streams.
+  The mediastream.h files contain routines to easyly setup audio streams.
+
+- coreapi/ is the central point of linphone, which handles relationship between sip signalisation and media
+  streaming. It contains an easy to use api to create a sip phone.
+
+- gtk-glade/   is the directory that contains the gui frontend of linphone. It uses all libraries descibed above.
+
+- console/
+       * linphonec.c is the main file for the console version of linphone.
+       * sipomatic.c / sipomatic.h contains the code for sipomatic, the test program that auto-answer to linphone calls.
+       * shell.c (program name: linphonecsh) is a small utilities to send interactive commands to a running linphonec daemon.
+               
+- share/ contains translation, documentation, rings and hello sound files.
+
diff --git a/README.M68k.txt b/README.M68k.txt
new file mode 100644 (file)
index 0000000..a3659f8
--- /dev/null
@@ -0,0 +1,93 @@
+                                       LINPHONE ON M68k-LINUX (by GIAN)
+                                       ********************************
+
+The console version of linphone works on arm-linux, but also on m68k-linux? I\92m trying to provide this:
+
+* I used the same toolchain specified in the LTIB menu configuration, that is, on my system:
+/opt/mtwk/usr/local/m68k-linux/gcc-3.4.0-glibc-2.3.2-v4e
+
+* I have created within my home directory a ColdFire-install-environment/ directory, copied into it the fresh tarballs of libogg-1.1.3, libosip2-2.2.2, speex-1.1.12, linphone-1.4.0 readline-5.1 and ncurses-5.5 (readline needs ncurses) Uncompressed all these
+tarballs. 
+
+Very important things common to all packages being cross compiled:
+******************************************************************
+* Copy the ipaq-config.site in the ipkg/ directory of linphone into some safe place, for example:
+cp /home/gianluca/ColdFire-install-environment/linphone-1.4.0-install/linphone-1.4.0/ipkg/ipag-config.site /home/gianluca/ColdFire-install-environment/linphone-1.4.0-install/
+Edit the ipaq-config.site file and replace all the arm-linux strings with m68k-linux one. Add also the \96mcfv4e flag to the CFLAGS, CXXFLAGS, and CPPFLAGS labels. 
+* You need a directory that we call M68K_INSTALL_TREE that will own files in the same way they will be installed on the target computer.
+
+mkdir /ColdFire-linphonec-1.4.0-mcfv4e
+export M68K_INSTALL_TREE=/ColdFire-linphonec-1.4.0-mcfv4e
+export CONFIG_SITE=/home/gianluca/ColdFire-install-environment/linphone-1.4.0-install/ipaq-config.site
+export PATH=$PATH:/opt/mtwk/usr/local/m68k-linux/gcc-3.4.0-glibc-2.3.2-v4e/bin
+
+
+Cross compiling ncurses for M68k:
+********************************
+./configure --prefix=/usr --host=m68k-linux --with-gnu-ld --with-shared
+make
+make install DESTDIR=$M68K_INSTALL_TREE
+
+
+Cross compiling readline for M68k:
+*********************************
+./configure --prefix=/usr --host=m68k-linux --with-gnu-ld --disable-static
+make
+make install DESTDIR=$M68K_INSTALL_TREE
+
+
+
+Cross compiling libosip for M68k:
+********************************
+./configure --prefix=/usr --host=m68k-linux --with-gnu-ld --disable-static
+make
+make install DESTDIR=$M68K_INSTALL_TREE
+
+
+Cross compiling libogg for M68k:
+********************************
+./configure --prefix=/usr --host=m68k-linux --with-gnu-ld --disable-static \96enable-fixed-point
+make
+make install DESTDIR=$M68K_INSTALL_TREE
+
+
+Cross compiling speex for M68k:
+********************************
+./configure --prefix=/usr --host=m68k-linux --with-gnu-ld --disable-static --enable-fixed-point --enable-m68k-asm --with-ogg=/ColdFire-linphonec-1.4.0-mcfv4e/usr --with-ogg-includes=/ColdFire-linphonec-1.4.0-mcfv4e/usr/include \96with-ogg-libraries=/ColdFire-linphonec-1.4.0-mcfv4e/usr/lib --disable-oggtest 
+make
+make install DESTDIR=$M68K_INSTALL_TREE
+
+
+cp /home/gianluca/ColdFire-iinstall-environment/linphone-1.4.0-install/linphone-1.4.0/mediastreamer2/src/.libs/libquickstream.so.0.0.0 /opt/mtwk/usr/local/m68k-linux/gcc-3.4.0-glibc-2.3.2-v4e/m68k-linux/lib
+cd /opt/mtwk/usr/local/m68k-linux/gcc-3.4.0-glibc-2.3.2-v4e/m68k-linux/lib
+ln -s libquickstream.so.0.0.0 libquickstream.so.0
+ln -s libquickstream.so.0.0.0 libquickstream.so
+
+cp /home/gianluca/ColdFire-install-environment/linphone-1.4.0-install/linphone-1.4.0/mediastreamer2/src/.libs/libmediastreamer.so.0.0.0 /opt/mtwk/usr/local/m68k-linux/gcc-3.4.0-glibc-2.3.2-v4e/m68k-linux/lib
+cd /opt/mtwk/usr/local/m68k-linux/gcc-3.4.0-glibc-2.3.2-v4e/m68k-linux/lib
+ln -s libmediastreamer.so.0.0.0 libmediastreamer.so.0
+ln -s libmediastreamer.so.0.0.0 libmediastreamer.so
+
+
+Cross compiling linphone for M68k:
+********************************
+First you need to remove all .la files from the M68K_INSTALL_TREE because it confuses libtool and makes
+the linker use your build machine binaries instead of the m68k-crosscompiled ones.
+rm -f $M68K_INSTALL_TREE/usr/lib/*.la
+#for some reason pkg-config doesn't like cross-compiling...
+export PKG_CONFIG=/usr/bin/pkg-config
+./configure --prefix=/usr --host=m68k-linux --with-gnu-ld --disable-static --disable-strict --enable-gnome_ui=no --enable-alsa --disable-glib --disable-video --with-osip=$ARM_INSTALL_TREE/usr --with-osipparser=$ARM_INSTALL_TREE/usr --with-readline=$ARM_INSTALL_TREE/usr SPEEX_CFLAGS="-I$ARM_INSTALL_TREE/usr/include" SPEEX_LIBS="-L$ARM_INSTALL_TREE/usr/lib -lspeex"
+make 
+make install DESTDIR=$M68K_INSTALL_TREE
+
+
+Binaries can also be stripped with m68k-linux-strip to save more space.
+
+
+Running linphone under the ColdFire board
+********************************************
+
+You just have to start linphone from a terminal by typing 'linphonec'.
+
+Gianluca Salvador
+
diff --git a/README.arm b/README.arm
new file mode 100644 (file)
index 0000000..5020729
--- /dev/null
@@ -0,0 +1,106 @@
+                                       LINPHONE ON ARM-LINUX (HANDHELD COMPUTERS)
+                                       ******************************************
+
+The console version of linphone works on arm-linux and has been tested on ipaqs
+under the familiar linux distribution (http://www.handhelds.org).
+You can find .ipk binary packages on the linphone's download page. 
+If you want to build your own arm-linux packages, here are some instructions to
+cross compile linphone and its dependencies: readline, speex and libosip.
+This is my own experience on cross compiling software. As there is no precise
+step by step documentation (as far as I know) on how to cross-compile on arm, 
+there is no guaranty that the following instructions are the best way to do it.
+First, be aware that only the console version of linphone can compile on ARM.
+
+
+* You need the lastest arm toolchain from http://www.handhelds.org. Uncompress it in / .
+       It contains all the cross-compilation tools. Be sure that the arm-linux-gcc binaries
+       are in your PATH (export PATH=$PATH:/usr/local/arm/3.4.1/bin/ , for example)
+* create within your home directory a arm/ directory, copy into it the fresh 
+       tarballs of libosip2>=2.2.x, speex>=1.1.6, linphone>=1.2.1 readline>=5.1 and ncurses>=5.5 (readline needs ncurses)
+        Uncompress all these
+       tarballs. 
+       
+
+Very important things common to all packages being cross compiled:
+******************************************************************
+* copy the ipaq-config.site in the ipkg/ directory of linphone into some safe place,
+for example: ~/ipaq-config.site .
+* You need a directory that we call ARM_INSTALL_TREE that will own files in the same way they will be installed on the target computer.
+It is also used to build linphone over the arm binaries of its dependencies (speex,osip,ncurses,readline).
+
+For example:
+
+export CONFIG_SITE=~/ipaq-config.site
+export ARM_INSTALL_TREE=/armbuild
+
+
+Cross compiling ncurses for ARM:
+********************************
+./configure --prefix=/usr --host=arm-linux --with-gnu-ld --with-shared
+make
+make install DESTDIR=$ARM_INSTALL_TREE
+make install DESTDIR=`pwd`/armbuild
+
+
+Cross compiling readline for ARM:
+*********************************
+./configure --prefix=/usr --host=arm-linux --with-gnu-ld --disable-static
+make
+make install DESTDIR=$ARM_INSTALL_TREE
+make install DESTDIR=`pwd`/armbuild
+
+
+
+Cross compiling libosip for ARM:
+********************************
+./configure --prefix=/usr --host=arm-linux --with-gnu-ld --disable-static
+make
+make install DESTDIR=$ARM_INSTALL_TREE
+make install DESTDIR=`pwd`/armbuild
+
+Cross compiling speex for ARM:
+********************************
+First you need to remove ogg headers from your build system to avoid a dirty conflict between
+your build machine binaries and the arm binaries. They are usually in a libogg-dev package (rpm or deb).
+Then:
+./configure --prefix=/usr --host=arm-linux --with-gnu-ld --disable-static --enable-fixed-point --enable-arm-asm
+make
+make install DESTDIR=$ARM_INSTALL_TREE
+make install DESTDIR='pwd'/armbuild
+
+
+Cross compiling linphone for ARM
+********************************
+First you need to remove all .la files from the ARM_INSTALL_TREE because it confuses libtool and makes
+the linker use your build machine binaries instead of the arm-crosscompiled ones.
+rm -f $ARM_INSTALL_TREE/usr/lib/*.la
+#for some reason pkg-config doesn't like cross-compiling...
+export PKG_CONFIG=/usr/bin/pkg-config
+./configure --prefix=/usr --host=arm-linux --with-gnu-ld --disable-static \
+       --disable-glib --with-osip=$ARM_INSTALL_TREE/usr \
+    --with-readline=$ARM_INSTALL_TREE/usr \
+       SPEEX_CFLAGS="-I$ARM_INSTALL_TREE/usr/include" \
+       SPEEX_LIBS="-L$ARM_INSTALL_TREE/usr/lib -lspeex "
+make 
+make install DESTDIR='pwd'/armbuild
+
+You can use the install trees libosip2-x.x.x/armbuild speex-x.x.x/armbuild and 
+linphone-0.x.x/armbuild/ to make binary packages of
+each software, as ipkgs for the familiar distribution (http://www.familiar.org).
+In the ipkg/ directory of linphone you can find .control files for ipkg-build. 
+In order to make the osip ipkg, you have to do the following:
+- create a directory named CONTROL inside libosip2-2.2.x/armbuild
+- copy the libosip.control file into CONTROL/ and rename it into "control".
+- edit the "control" file to adjust version number accordingly.
+- remove the non essential parts of libosip inside libosip2-2.x.x/armbuild/usr/ : just 
+       leave the lib/ directory. This saves space on the destination computer.
+- then inside libosip2-2.x.x, run ipkg-build -o root -g root armbuild
+The same procedure applies to make linphone's ipkg.
+Binaries can also be stripped with arm-linux-strip to save more space.
+
+Running linphone under the handheld computer
+********************************************
+
+You just have to start linphone from a terminal by typing 'linphonec'.
+
+Simon
diff --git a/README.macos b/README.macos
new file mode 100644 (file)
index 0000000..6d38515
--- /dev/null
@@ -0,0 +1,34 @@
+Compiling linphone on macos X
+
+This procedure works for audio, video still not fully supported.
+It was tested on macos X (leopard) on september 2009.
+
+Requirements:
+* xcode (for gcc)
+* macport (GNU porting project)
+* svn or git checkout'd linphone tree.
+
+Steps:
+* install with the 'port install' command the following dependencies
+       - automake
+       - autoconf
+       - libtool
+       - gettext
+       - intltool
+       - gtk2
+       - libglade2
+       - speex-dev
+       - osip2
+       - eXosip2
+       
+* add /opt/local/bin to your PATH by editing (or creating) ~/.profile, logout and login again for changes to take effect
+
+* within linphone source directory, run ./autogen.sh
+* run 
+       ./configure --prefix=/opt/local --disable-video --with-readline=none && make
+       (note: we disable readline for linphonec because it appears to hang at this time)
+* install to /opt/local
+       sudo make install 
+
+
+
diff --git a/README.mingw b/README.mingw
new file mode 100644 (file)
index 0000000..9e9709b
--- /dev/null
@@ -0,0 +1,190 @@
+Software to install
+*******************
+
+* mingw32, using Automated windows installer (when launched, choose candidate to have lastest binaries)
+* msys, using windows installer too.
+
+run msys as Administrator (right click on the icon, and click 'run as administrator')
+
+Download zip and unzip (download setup.exe and run) from http://gnuwin32.sourceforge.net
+       - add them to your path in msys terminal:
+               export PATH=$PATH:/c/Program\ Files/GnuWin32/bin
+
+Download from mingw download page (http://www.mingw.org, click download):
+       - MSYS automake-1.11 
+       - MSYS autoconf-2.63
+       - MSYS libtool>=2.2.7 
+       - MSYS libcrypt*-bin
+       - MSYS perl
+       - MSYS gettext-*bin* and gettext-*dev*
+       ===> Uncompress all these packages in /
+       - from gcc-4.4 directory
+               Download: 
+                       - gcc-core*-bin
+                       - gcc-core-*-dll
+                       - gcc-c++*-bin
+                       - gcc-c++*-dll
+                       - gmp*-dll
+                       - mpfr*-dll
+       - w32api*-dev
+       - mingwrt-dev and mingwrt-dll (mingw run time)
+       - gnu binutils 2.19
+       ===> Uncompress all these packages in /mingw
+
+note: lzma files can be uncompressed using tar --lzma -xvf <file>
+
+* Download intltool (quicklink: 
+       http://ftp.acc.umu.se/pub/GNOME/binaries/win32/intltool/0.40/intltool_0.40.4-1_win32.zip
+       note: -dev package is not needed.)
+  uncompress in  / with 'unzip' command.
+
+* Download lastest gtk+bundle from http://www.gtk.org , uncompress in /
+* Download libglade and libglade-dev >=2.6.3 from gnome ftp:
+    http://ftp.gnome.org/pub/GNOME/binaries/win32/libglade/2.6/libglade-dev_2.6.4-1_win32.zip
+    http://ftp.gnome.org/pub/GNOME/binaries/win32/libglade/2.6/libglade_2.6.4-1_win32.zip
+    uncompress in /
+* Download ActiveState perl and run the installer with default options (http://www.activestate.com , developer tools)
+       Yes it is required despite MSYS perl is already installed.
+
+* Download lastest linphone-deps from linphone downloads, misc directory:
+    http://download.savannah.gnu.org/releases-noredirect/linphone/misc/)
+    uncompress in /
+* Download and install Inno Setup Compiler in its default path (required only if you run 'make setup.exe').
+
+* HACKS:
+       Move out /lib/libintl.la : it confuses libtool
+               mv /lib/libintl.la /lib/libintl.la.bak
+       Move out libstdc++.la in order to workaround a gcc-4.4.0 bug (or packaging bug):
+               mv /mingw/lib/gcc/mingw32/4.4.0/libstdc++.la /mingw/lib/gcc/mingw32/4.4.0/libstdc++.la.bak
+
+Get Linphone source code
+************************
+
+Install msys-git from (http://code.google.com/p/msysgit/)
+
+It is recommended that you create a directory somewhere with a path without any spaces or ~ characters, for example
+c:\sources\
+Within msys-git bash, do
+cd /c/sources
+git clone git://git.savannah.nongnu.org/linphone.git
+
+
+Building
+********
+
+WARNING: During the build, windows might slow down suddenly. Using ctl+alt+del to start the windows system monitor,
+ you might see a process 'LVpSRV.exe' or something like this that eats 90% of cpu.
+Kill it. Don't know what it is, but once killed, windows runs normally.
+
+The following variables must be exported:
+
+#use ActiveState perl instead of mingw perl
+export PERL="/c/Perl/bin/perl"
+export INTLTOOL_PERL="/c/Perl/bin/perl"
+#add gnuwin32 tools to your path:
+export PATH=$PATH:/c/Program\ Files/Gnuwin32/bin
+
+for convenience the 'mingw-envsetup.sh' script in linphone sources does this, so you can just source it:
+. ./mingw-envsetup.sh
+
+#run autogen.sh after a git checkout or update
+./autogen.sh
+./configure --prefix=/opt/linphone --enable-shared --disable-static
+make
+#will install to /opt/linphone, required for compilation of plugins.
+make install
+#make a binary zip of linphone
+make zip
+#additionally you can make binary installer if you have Inno Setup 5 installed in its default path
+make setup.exe
+
+#build plugins
+cd mediastreamer2/plugins/msx264
+./autogen.sh
+PKG_CONFIG_PATH=/opt/linphone/lib/pkgconfig ./configure --prefix=/opt/linphone --enable-shared --disable-static
+#make a binary zip of this plugin
+make zip
+#or make an installer
+make setup.exe
+
+#the buddylookup plugin enables lookup of buddies in a remote database using xml-rpc over http/https.
+cd coreapi/plugins/buddylookup
+./autogen.sh
+PKG_CONFIG_PATH=/opt/linphone/lib/pkgconfig ./configure --prefix=/opt/linphone --enable-shared --disable-static 
+make
+#make a binary zip of this plugin
+make zip
+
+
+******************************************************
+*      Notes about linphone-deps generation          *
+******************************************************
+
+Linphone-deps is a collection of linphone dependencies, that are for some of them difficult
+to find as windows binaries.
+These notes are useful if you want to upgrade part of the software that is included in the
+linphone-deps packages.
+
+List of software included in linphone-deps:
+libosip2  (compiled)
+libeXosip2 (compiled)
+libavcodec, libavutil, libavformat, libavdevice, libswscale (compiled, all these from ffmpeg)
+libtheora (from the web)
+libx264 (compiled from the version distributed from linphone's web site)
+libogg (from the web)
+libspeex, libspeexdsp (compiled, statically to workaround a dll-related crash)
+libgnutls (from the web)
+libgsm (from the web)
+libxml2 (compiled)
+libsoup (compiled)
+
+Remarks:
+For every package compiled that goes into linphone-deps, .la files (libtool files) must be removed to avoid libtool errors.
+When running "make install DESTDIR=<somepath>", somepath must be absolute and should not contain any ~ or space.
+
+- building ffmpeg 
+  ./configure --enable-shared --disable-static --enable-memalign-hack --extra-cflags="-fno-common" --enable-gpl && make
+  make install DESTDIR=/home/<myuser>/ffmpeg-install
+  Copy to ~/ffmpeg-install/usr/local/* to linphone-deps/.
+  Copy also all *.dll.a files from the build tree to lib/ directort of linphone-deps. These are the implibs necessary to link a program against the dlls.
+
+- building libxml2: the binaries found on the internet are generated with MSVC++, and for obscure reason they are not suitable for building libsoup 
+  (that requires libxml2).
+  ./configure --enable-shared --disable-static && make && make install DESTDIR=/home/<myuser>/libxml2-install
+  copy ~/libxml2-install/usr/local/* into linphone-deps/.
+
+- building x264:
+  * download yasm normal version windows executable from yasm project page:
+  http://www.tortall.net/projects/yasm/wiki/Download
+  copy it as /usr/local/bin/yasm.exe
+
+  cd into x264/ dir then run:
+  ./configure --enable-pic
+  make
+  make install DESTDIR=/home/<myuser>/x264-install
+  then copy the content of ~/x264-install/usr/local/ into linphone-deps/.
+
+- libgnutls (required for libsoup https support)
+       - download binary zip from http://josefsson.org/gnutls4win.org
+       - add to linphone-deps
+
+- building libsoup (only required for buddylookup plugin)
+       - download source from gnome ftp (warning: at the time of the writing only version 2.26.x can compile with the 
+               glib version supplied in the gtk-bundle, 2.27 requires a new version of glib)
+       - uncompress libgnutls zip in /
+       - make sure you have libxml2 installed in /
+       - apply a bugfix patch (fix gnutls support on windows, completely broken otherwise). The patch
+               is in linphone-deps/src, apply it this way:
+               cd libsoup-2.26.*
+               cd libsoup
+               patch -p0 < libsoup-gnutls-bugfix.patch
+       - run:
+               ./configure --prefix=/usr --enable-shared --disable-static
+               make
+               make install
+               make install DESTDIR=/home/<myuser>/libsoup-install
+       - copy ~/libsoup-install/usr/* into linphone-deps/
+
+Once you have everything in linphone-deps, remove .la files from lib:
+       cd lib && rm -f *.la
diff --git a/TODO b/TODO
new file mode 100644 (file)
index 0000000..3a0199c
--- /dev/null
+++ b/TODO
@@ -0,0 +1,22 @@
+hot stuff:
+---------
+
+* ice support
+* run a user given command upon incoming calls
+* linphonec on win32
+* RTP inactivity timeout to close lost calls.
+
+
+low priority:
+-------------
+
+* random RTP ports (to enable direct mapping NAT)
+* zeroconf support for advertising services (cool stuff!)
+* have the possibility to define several profiles (config files) and switch between them
+* display call duration
+* help tips for the registration box
+* The length (or duration) of the call could be displayed (see icons2.png)
+* 2. There could be a sound effect for "busy" - a short "beep-beep-beep" would be      sufficient (try http://www.google.com/search?q=busy.wav)
+* The call history could be a bit more clear (see history.png). And it
+  should be saved somewhere, so you can track your calls if you need to...
+* move resampling stuff to use speex instead of libresample.
\ No newline at end of file
diff --git a/autogen.sh b/autogen.sh
new file mode 100755 (executable)
index 0000000..a8bd1ca
--- /dev/null
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+AM_VERSION="1.10"
+if ! type aclocal-$AM_VERSION 1>/dev/null 2>&1; then
+       # automake-1.10 (recommended) is not available on Fedora 8
+       AUTOMAKE=automake
+       ACLOCAL=aclocal
+else
+       ACLOCAL=aclocal-${AM_VERSION}
+       AUTOMAKE=automake-${AM_VERSION}
+fi
+
+if test -f /opt/local/bin/glibtoolize ; then
+        # darwin
+        LIBTOOLIZE=/opt/local/bin/glibtoolize
+else
+        LIBTOOLIZE=libtoolize
+fi
+if test -d /opt/local/share/aclocal ; then
+        ACLOCAL_ARGS="-I /opt/local/share/aclocal"
+fi
+
+if test -f /opt/local/bin/intltoolize ; then
+       #darwin
+       INTLTOOLIZE=/opt/local/bin/intltoolize
+else
+       #on mingw, it is important to invoke intltoolize with an absolute path to avoid a bug
+       INTLTOOLIZE=/usr/bin/intltoolize
+fi
+
+echo "Generating build scripts in linphone..."
+set -x
+$LIBTOOLIZE --copy --force
+
+$INTLTOOLIZE -c --force --automake
+$ACLOCAL -I m4 $ACLOCAL_ARGS
+autoheader
+$AUTOMAKE --force-missing --add-missing --copy
+autoconf
+
+echo "Generating build scripts in oRTP..."
+cd oRTP && ./autogen.sh && cd -
+
+echo "Generating build scripts in mediastreamer2..."
+cd mediastreamer2 && ./autogen.sh && cd -
diff --git a/build/wince/liblinphone.sln b/build/wince/liblinphone.sln
new file mode 100644 (file)
index 0000000..fe4efff
--- /dev/null
@@ -0,0 +1,48 @@
+\r
+Microsoft Visual Studio Solution File, Format Version 10.00\r
+# Visual Studio 2008\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblinphone", "liblinphone.vcproj", "{290078F0-3B63-47BF-A2A9-E1AF5411F5E7}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "linphonec", "linphonec\linphonec.vcproj", "{92574924-BF59-4DAA-994B-9978B80E5797}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Win32 = Debug|Win32\r
+               Debug|Windows Mobile 6 Professional SDK (ARMV4I) = Debug|Windows Mobile 6 Professional SDK (ARMV4I)\r
+               Debug|Windows Mobile 6 Standard SDK (ARMV4I) = Debug|Windows Mobile 6 Standard SDK (ARMV4I)\r
+               Release|Win32 = Release|Win32\r
+               Release|Windows Mobile 6 Professional SDK (ARMV4I) = Release|Windows Mobile 6 Professional SDK (ARMV4I)\r
+               Release|Windows Mobile 6 Standard SDK (ARMV4I) = Release|Windows Mobile 6 Standard SDK (ARMV4I)\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Debug|Win32.Build.0 = Debug|Win32\r
+               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I)\r
+               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)\r
+               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)\r
+               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Standard SDK (ARMV4I)\r
+               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I)\r
+               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I)\r
+               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Release|Win32.ActiveCfg = Release|Win32\r
+               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Release|Win32.Build.0 = Release|Win32\r
+               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I)\r
+               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)\r
+               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)\r
+               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Release|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Standard SDK (ARMV4I)\r
+               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I)\r
+               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I)\r
+               {92574924-BF59-4DAA-994B-9978B80E5797}.Debug|Win32.ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I)\r
+               {92574924-BF59-4DAA-994B-9978B80E5797}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I)\r
+               {92574924-BF59-4DAA-994B-9978B80E5797}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)\r
+               {92574924-BF59-4DAA-994B-9978B80E5797}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)\r
+               {92574924-BF59-4DAA-994B-9978B80E5797}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I)\r
+               {92574924-BF59-4DAA-994B-9978B80E5797}.Release|Win32.ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I)\r
+               {92574924-BF59-4DAA-994B-9978B80E5797}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I)\r
+               {92574924-BF59-4DAA-994B-9978B80E5797}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)\r
+               {92574924-BF59-4DAA-994B-9978B80E5797}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)\r
+               {92574924-BF59-4DAA-994B-9978B80E5797}.Release|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I)\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/build/wince/liblinphone.vcproj b/build/wince/liblinphone.vcproj
new file mode 100644 (file)
index 0000000..9909c8a
--- /dev/null
@@ -0,0 +1,585 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9,00"\r
+       Name="liblinphone"\r
+       ProjectGUID="{290078F0-3B63-47BF-A2A9-E1AF5411F5E7}"\r
+       RootNamespace="liblinphone"\r
+       Keyword="Win32Proj"\r
+       TargetFrameworkVersion="0"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="Windows Mobile 6 Standard SDK (ARMV4I)"\r
+               />\r
+               <Platform\r
+                       Name="Windows Mobile 6 Professional SDK (ARMV4I)"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory="Debug"\r
+                       IntermediateDirectory="Debug"\r
+                       ConfigurationType="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="&quot;..\..\oRTP\include:..\..\mediastreamer2\include:..\..\..\..\linphone-builder\osip\include:..\..\..\..\linphone-builder\eXosip\include:..\..\..\..\linphone-builder\speex\include&quot;"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBLINPHONE_EXPORTS; OSIP_MT: ENABLE_TRACE:LOG_DOMAIN=\&quot;LinphoneCore\&quot;:ORTP_STATIC:"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="4"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               LinkIncremental="2"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"\r
+                       OutputDirectory="Windows Mobile 6 Standard SDK (ARMV4I)\$(ConfigurationName)"\r
+                       IntermediateDirectory="Windows Mobile 6 Standard SDK (ARMV4I)\$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               ExecutionBucket="7"\r
+                               AdditionalOptions="&#x0D;&#x0A;"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="..\..\oRTP\include;..\..\mediastreamer2\include;&quot;..\..\..\..\linphone-builder\speex\include&quot;;&quot;..\..\..\..\linphone-builder\eXosip\include&quot;;&quot;..\..\..\..\linphone-builder\osip\include&quot;"\r
+                               PreprocessorDefinitions="ORTP_INET6;ORTP_EXPORT;_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);LIBLINPHONE_EXPORTS;OSIP_MT;ENABLE_TRACE;LOG_DOMAIN=\&quot;LinphoneCore\&quot;;IN_LINPHONE;LINPHONE_PLUGINS_DIR=\&quot;\&quot;;LINPHONE_VERSION=\&quot;3.1.2\&quot;"\r
+                               MinimalRebuild="true"\r
+                               RuntimeLibrary="3"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2.lib osip2.lib osipparser2.lib eXosip2.lib mediastreamer2.lib ortp.lib"\r
+                               LinkIncremental="2"\r
+                               AdditionalLibraryDirectories="&quot;..\..\..\..\linphone-builder\osip\platform\wince\$(PlatformName)\$(ConfigurationName)&quot;;&quot;..\..\oRTP\build\wince\$(PlatformName)\$(ConfigurationName)&quot;"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               TargetMachine="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCodeSignTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+                       <DeploymentTool\r
+                               ForceDirty="-1"\r
+                               RemoteDirectory=""\r
+                               RegisterOutput="0"\r
+                               AdditionalFiles=""\r
+                       />\r
+                       <DebuggerTool\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"\r
+                       OutputDirectory="Windows Mobile 6 Professional SDK (ARMV4I)\$(ConfigurationName)"\r
+                       IntermediateDirectory="Windows Mobile 6 Professional SDK (ARMV4I)\$(ConfigurationName)"\r
+                       ConfigurationType="4"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               ExecutionBucket="7"\r
+                               AdditionalOptions="&#x0D;&#x0A;"\r
+                               Optimization="2"\r
+                               AdditionalIncludeDirectories="..\..\oRTP\include;..\..\mediastreamer2\include;&quot;..\..\..\..\linphone-builder\speex\include&quot;;&quot;..\..\..\..\linphone-builder\eXosip\include&quot;;&quot;..\..\..\..\linphone-builder\osip\include&quot;"\r
+                               PreprocessorDefinitions="ORTP_INET6;ORTP_EXPORT;_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);LIBLINPHONE_EXPORTS;OSIP_MT;ENABLE_TRACE;LOG_DOMAIN=\&quot;LinphoneCore\&quot;;IN_LINPHONE;LINPHONE_PLUGINS_DIR=\&quot;\&quot;;LINPHONE_VERSION=\&quot;3.1.2\&quot;;_UNICODE;UNICODE;PACKAGE_SOUND_DIR=\&quot;\\Program Files\\Linphone\&quot;"\r
+                               MinimalRebuild="true"\r
+                               RuntimeLibrary="3"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLibrarianTool"\r
+                               AdditionalOptions=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCodeSignTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+                       <DeploymentTool\r
+                               ForceDirty="-1"\r
+                               RemoteDirectory=""\r
+                               RegisterOutput="0"\r
+                               AdditionalFiles=""\r
+                       />\r
+                       <DebuggerTool\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="Release"\r
+                       IntermediateDirectory="Release"\r
+                       ConfigurationType="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="..\..\oRTP\include:..\..\mediastreamer2\include:..\..\..\..\linphone-builder\osip\include::..\..\..\..\linphone-builder\eXosip::..\..\..\..\linphone-builder\speex\include"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBLINPHONE_EXPORTS; OSIP_MT: ENABLE_TRACE:LOG_DOMAIN=\&quot;LinphoneCore\&quot;:ORTP_STATIC:"\r
+                               RuntimeLibrary="2"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               LinkIncremental="2"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"\r
+                       OutputDirectory="Windows Mobile 6 Standard SDK (ARMV4I)\$(ConfigurationName)"\r
+                       IntermediateDirectory="Windows Mobile 6 Standard SDK (ARMV4I)\$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               ExecutionBucket="7"\r
+                               AdditionalIncludeDirectories="..\..\oRTP\include:..\..\mediastreamer2\include:..\..\..\..\linphone-builder\osip\include::..\..\..\..\linphone-builder\eXosip::..\..\..\..\linphone-builder\speex\include"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBLINPHONE_EXPORTS; OSIP_MT: ENABLE_TRACE:LOG_DOMAIN=\&quot;LinphoneCore\&quot;:ORTP_STATIC:"\r
+                               RuntimeLibrary="2"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="3"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               LinkIncremental="2"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               TargetMachine="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCodeSignTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+                       <DeploymentTool\r
+                               ForceDirty="-1"\r
+                               RemoteDirectory=""\r
+                               RegisterOutput="0"\r
+                               AdditionalFiles=""\r
+                       />\r
+                       <DebuggerTool\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"\r
+                       OutputDirectory="Windows Mobile 6 Professional SDK (ARMV4I)\$(ConfigurationName)"\r
+                       IntermediateDirectory="Windows Mobile 6 Professional SDK (ARMV4I)\$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               ExecutionBucket="7"\r
+                               AdditionalIncludeDirectories="..\..\oRTP\include:..\..\mediastreamer2\include:..\..\..\..\linphone-builder\osip\include::..\..\..\..\linphone-builder\eXosip::..\..\..\..\linphone-builder\speex\include"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBLINPHONE_EXPORTS; OSIP_MT: ENABLE_TRACE:LOG_DOMAIN=\&quot;LinphoneCore\&quot;:ORTP_STATIC:"\r
+                               RuntimeLibrary="2"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="3"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               LinkIncremental="2"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               TargetMachine="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCodeSignTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+                       <DeploymentTool\r
+                               ForceDirty="-1"\r
+                               RemoteDirectory=""\r
+                               RegisterOutput="0"\r
+                               AdditionalFiles=""\r
+                       />\r
+                       <DebuggerTool\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\coreapi\enum.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\coreapi\exevents.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\coreapi\linphonecore.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\coreapi\lpconfig.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\coreapi\private.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\coreapi\sdphandler.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\coreapi\sipsetup.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"\r
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
+                       >\r
+               </Filter>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\coreapi\authentication.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\coreapi\chat.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\coreapi\enum.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\coreapi\exevents.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\coreapi\friend.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\coreapi\general_state.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\coreapi\linphonecore.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\coreapi\lpconfig.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\coreapi\misc.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\coreapi\presence.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\coreapi\proxy.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\coreapi\sdphandler.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\coreapi\siplogin.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\coreapi\sipsetup.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/build/wince/linphonec/linphonec.vcproj b/build/wince/linphonec/linphonec.vcproj
new file mode 100644 (file)
index 0000000..058ce42
--- /dev/null
@@ -0,0 +1,240 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9,00"\r
+       Name="linphonec"\r
+       ProjectGUID="{92574924-BF59-4DAA-994B-9978B80E5797}"\r
+       RootNamespace="linphonec"\r
+       Keyword="Win32Proj"\r
+       TargetFrameworkVersion="196613"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Windows Mobile 6 Professional SDK (ARMV4I)"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"\r
+                       OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               ExecutionBucket="7"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="&quot;..\..\..\..\..\linphone-builder\osip\include&quot;;..\..\..\mediastreamer2\include;..\..\..\oRTP\include;..\..\..\coreapi"\r
+                               PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_CONSOLE;$(ARCHFAM);$(_ARCHFAM_);IN_LINPHONE;PACKAGE_DIR=\&quot;\\Program Files\\Linphone\&quot;"\r
+                               MinimalRebuild="true"\r
+                               RuntimeLibrary="3"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="3"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES)"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories="$(IntDir)"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=" /subsystem:windowsce,5.02"\r
+                               AdditionalDependencies="mediastreamer2.lib ortp.lib liblinphone.lib ws2.lib mmtimer.lib iphlpapi.lib eXosip2.lib osip2.lib osipparser2.lib"\r
+                               OutputFile="$(OutDir)/linphonec.exe"\r
+                               LinkIncremental="2"\r
+                               AdditionalLibraryDirectories="&quot;..\..\..\oRTP\build\wince\$(PlatformName)\$(ConfigurationName)&quot;;&quot;..\..\..\mediastreamer2\build\wince\$(PlatformName)\$(ConfigurationName)&quot;;&quot;..\$(PlatformName)\$(ConfigurationName)&quot;;&quot;..\..\..\..\..\linphone-builder\eXosip\platform\wince\$(PlatformName)\$(ConfigurationName)&quot;;&quot;..\..\..\..\..\linphone-builder\osip\platform\wince\$(PlatformName)\$(ConfigurationName)&quot;"\r
+                               DelayLoadDLLs="$(NOINHERIT)"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="$(OutDir)/linphonec.pdb"\r
+                               SubSystem="0"\r
+                               StackReserveSize="65536"\r
+                               StackCommitSize="4096"\r
+                               EntryPointSymbol="mainWCRTStartup"\r
+                               RandomizedBaseAddress="1"\r
+                               DataExecutionPrevention="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCodeSignTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+                       <DeploymentTool\r
+                               ForceDirty="-1"\r
+                               RemoteDirectory="%CSIDL_PROGRAM_FILES%\linphone"\r
+                               RegisterOutput="0"\r
+                               AdditionalFiles=""\r
+                       />\r
+                       <DebuggerTool\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"\r
+                       OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+                       ConfigurationType="1"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               ExecutionBucket="7"\r
+                               Optimization="2"\r
+                               FavorSizeOrSpeed="2"\r
+                               PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_CONSOLE;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE"\r
+                               RuntimeLibrary="0"\r
+                               UsePrecompiledHeader="2"\r
+                               WarningLevel="3"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES)"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories="$(IntDir)"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=" /subsystem:windowsce,5.02"\r
+                               OutputFile="$(OutDir)/linphonec.exe"\r
+                               LinkIncremental="1"\r
+                               DelayLoadDLLs="$(NOINHERIT)"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="$(OutDir)/linphonec.pdb"\r
+                               SubSystem="0"\r
+                               StackReserveSize="65536"\r
+                               StackCommitSize="4096"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               EntryPointSymbol="mainWCRTStartup"\r
+                               RandomizedBaseAddress="1"\r
+                               DataExecutionPrevention="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCodeSignTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+                       <DeploymentTool\r
+                               ForceDirty="-1"\r
+                               RemoteDirectory=""\r
+                               RegisterOutput="0"\r
+                               AdditionalFiles=""\r
+                       />\r
+                       <DebuggerTool\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\..\console\commands.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\console\linphonec.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\..\console\linphonec.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
+                       >\r
+               </Filter>\r
+               <File\r
+                       RelativePath=".\ReadMe.txt"\r
+                       >\r
+               </File>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/config.rpath b/config.rpath
new file mode 100755 (executable)
index 0000000..c492a93
--- /dev/null
@@ -0,0 +1,614 @@
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+#   Copyright 1996-2006 Free Software Foundation, Inc.
+#   Taken from GNU libtool, 2001
+#   Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+#   This file is free software; the Free Software Foundation gives
+#   unlimited permission to copy and/or distribute it, with or without
+#   modifications, as long as this notice is preserved.
+#
+# The first argument passed to this file is the canonical host specification,
+#    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+#    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# Known limitations:
+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
+#   than 256 bytes, otherwise the compiler driver will dump core. The only
+#   known workaround is to choose shorter directory names for the build
+#   directory and/or the installation directory.
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+shrext=.so
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+# Code taken from libtool.m4's _LT_CC_BASENAME.
+
+for cc_temp in $CC""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
+
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
+
+wl=
+if test "$GCC" = yes; then
+  wl='-Wl,'
+else
+  case "$host_os" in
+    aix*)
+      wl='-Wl,'
+      ;;
+    darwin*)
+      case $cc_basename in
+        xlc*)
+          wl='-Wl,'
+          ;;
+      esac
+      ;;
+    mingw* | pw32* | os2*)
+      ;;
+    hpux9* | hpux10* | hpux11*)
+      wl='-Wl,'
+      ;;
+    irix5* | irix6* | nonstopux*)
+      wl='-Wl,'
+      ;;
+    newsos6)
+      ;;
+    linux*)
+      case $cc_basename in
+        icc* | ecc*)
+          wl='-Wl,'
+          ;;
+        pgcc | pgf77 | pgf90)
+          wl='-Wl,'
+          ;;
+        ccc*)
+          wl='-Wl,'
+          ;;
+        como)
+          wl='-lopt='
+          ;;
+        *)
+          case `$CC -V 2>&1 | sed 5q` in
+            *Sun\ C*)
+              wl='-Wl,'
+              ;;
+          esac
+          ;;
+      esac
+      ;;
+    osf3* | osf4* | osf5*)
+      wl='-Wl,'
+      ;;
+    sco3.2v5*)
+      ;;
+    solaris*)
+      wl='-Wl,'
+      ;;
+    sunos4*)
+      wl='-Qoption ld '
+      ;;
+    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+      wl='-Wl,'
+      ;;
+    sysv4*MP*)
+      ;;
+    unicos*)
+      wl='-Wl,'
+      ;;
+    uts4*)
+      ;;
+  esac
+fi
+
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+  # Set some defaults for GNU ld with shared library support. These
+  # are reset later if shared libraries are not supported. Putting them
+  # here allows them to be overridden if necessary.
+  # Unlike libtool, we use -rpath here, not --rpath, since the documented
+  # option of GNU ld is called -rpath, not --rpath.
+  hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+  case "$host_os" in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+        ld_shlibs=no
+      fi
+      ;;
+    amigaos*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we cannot use
+      # them.
+      ld_shlibs=no
+      ;;
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    cygwin* | mingw* | pw32*)
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    interix3*)
+      hardcode_direct=no
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      ;;
+    linux*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    netbsd*)
+      ;;
+    solaris*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+        ld_shlibs=no
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+          ld_shlibs=no
+          ;;
+        *)
+          if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+            hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+          else
+            ld_shlibs=no
+          fi
+          ;;
+      esac
+      ;;
+    sunos4*)
+      hardcode_direct=yes
+      ;;
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+  esac
+  if test "$ld_shlibs" = no; then
+    hardcode_libdir_flag_spec=
+  fi
+else
+  case "$host_os" in
+    aix3*)
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes; then
+        # Neither direct hardcoding nor static linking is supported with a
+        # broken collect2.
+        hardcode_direct=unsupported
+      fi
+      ;;
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+        # On IA64, the linker does run time linking by default, so we don't
+        # have to do anything special.
+        aix_use_runtimelinking=no
+      else
+        aix_use_runtimelinking=no
+        # Test if we are trying to use run time linking or normal
+        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+        # need to do runtime linking.
+        case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+          for ld_flag in $LDFLAGS; do
+            if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+              aix_use_runtimelinking=yes
+              break
+            fi
+          done
+          ;;
+        esac
+      fi
+      hardcode_direct=yes
+      hardcode_libdir_separator=':'
+      if test "$GCC" = yes; then
+        case $host_os in aix4.[012]|aix4.[012].*)
+          collect2name=`${CC} -print-prog-name=collect2`
+          if test -f "$collect2name" && \
+            strings "$collect2name" | grep resolve_lib_name >/dev/null
+          then
+            # We have reworked collect2
+            hardcode_direct=yes
+          else
+            # We have old collect2
+            hardcode_direct=unsupported
+            hardcode_minus_L=yes
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_libdir_separator=
+          fi
+          ;;
+        esac
+      fi
+      # Begin _LT_AC_SYS_LIBPATH_AIX.
+      echo 'int main () { return 0; }' > conftest.c
+      ${CC} ${LDFLAGS} conftest.c -o conftest
+      aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+      if test -z "$aix_libpath"; then
+        aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+      fi
+      if test -z "$aix_libpath"; then
+        aix_libpath="/usr/lib:/lib"
+      fi
+      rm -f conftest.c conftest
+      # End _LT_AC_SYS_LIBPATH_AIX.
+      if test "$aix_use_runtimelinking" = yes; then
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+      else
+        if test "$host_cpu" = ia64; then
+          hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+        else
+          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+        fi
+      fi
+      ;;
+    amigaos*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs=no
+      ;;
+    bsdi[45]*)
+      ;;
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec=' '
+      libext=lib
+      ;;
+    darwin* | rhapsody*)
+      hardcode_direct=no
+      if test "$GCC" = yes ; then
+        :
+      else
+        case $cc_basename in
+          xlc*)
+            ;;
+          *)
+            ld_shlibs=no
+            ;;
+        esac
+      fi
+      ;;
+    dgux*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      ;;
+    freebsd1*)
+      ld_shlibs=no
+      ;;
+    freebsd2.2*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    freebsd2*)
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      ;;
+    freebsd* | kfreebsd*-gnu | dragonfly*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    hpux9*)
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      ;;
+    hpux10*)
+      if test "$with_gnu_ld" = no; then
+        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+        hardcode_libdir_separator=:
+        hardcode_direct=yes
+        # hardcode_minus_L: Not really in the search PATH,
+        # but as the default location of the library.
+        hardcode_minus_L=yes
+      fi
+      ;;
+    hpux11*)
+      if test "$with_gnu_ld" = no; then
+        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+        hardcode_libdir_separator=:
+        case $host_cpu in
+          hppa*64*|ia64*)
+            hardcode_direct=no
+            ;;
+          *)
+            hardcode_direct=yes
+            # hardcode_minus_L: Not really in the search PATH,
+            # but as the default location of the library.
+            hardcode_minus_L=yes
+            ;;
+        esac
+      fi
+      ;;
+    irix5* | irix6* | nonstopux*)
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    netbsd*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    newsos6)
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    openbsd*)
+      hardcode_direct=yes
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+        hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      else
+        case "$host_os" in
+          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+            hardcode_libdir_flag_spec='-R$libdir'
+            ;;
+          *)
+            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+            ;;
+        esac
+      fi
+      ;;
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      ;;
+    osf3*)
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    osf4* | osf5*)
+      if test "$GCC" = yes; then
+        hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      else
+        # Both cc and cxx compiler support -rpath directly
+        hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      hardcode_libdir_separator=:
+      ;;
+    solaris*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      ;;
+    sunos4*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      ;;
+    sysv4)
+      case $host_vendor in
+        sni)
+          hardcode_direct=yes # is this really true???
+          ;;
+        siemens)
+          hardcode_direct=no
+          ;;
+        motorola)
+          hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+          ;;
+      esac
+      ;;
+    sysv4.3*)
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+        ld_shlibs=yes
+      fi
+      ;;
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
+      ;;
+    sysv5* | sco3.2v5* | sco5v6*)
+      hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      hardcode_libdir_separator=':'
+      ;;
+    uts4*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      ;;
+    *)
+      ld_shlibs=no
+      ;;
+  esac
+fi
+
+# Check dynamic linker characteristics
+# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
+libname_spec='lib$name'
+case "$host_os" in
+  aix3*)
+    ;;
+  aix4* | aix5*)
+    ;;
+  amigaos*)
+    ;;
+  beos*)
+    ;;
+  bsdi[45]*)
+    ;;
+  cygwin* | mingw* | pw32*)
+    shrext=.dll
+    ;;
+  darwin* | rhapsody*)
+    shrext=.dylib
+    ;;
+  dgux*)
+    ;;
+  freebsd1*)
+    ;;
+  kfreebsd*-gnu)
+    ;;
+  freebsd* | dragonfly*)
+    ;;
+  gnu*)
+    ;;
+  hpux9* | hpux10* | hpux11*)
+    case $host_cpu in
+      ia64*)
+        shrext=.so
+        ;;
+      hppa*64*)
+        shrext=.sl
+        ;;
+      *)
+        shrext=.sl
+        ;;
+    esac
+    ;;
+  interix3*)
+    ;;
+  irix5* | irix6* | nonstopux*)
+    case "$host_os" in
+      irix5* | nonstopux*)
+        libsuff= shlibsuff=
+        ;;
+      *)
+        case $LD in
+          *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
+          *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
+          *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
+          *) libsuff= shlibsuff= ;;
+        esac
+        ;;
+    esac
+    ;;
+  linux*oldld* | linux*aout* | linux*coff*)
+    ;;
+  linux*)
+    ;;
+  knetbsd*-gnu)
+    ;;
+  netbsd*)
+    ;;
+  newsos6)
+    ;;
+  nto-qnx*)
+    ;;
+  openbsd*)
+    ;;
+  os2*)
+    libname_spec='$name'
+    shrext=.dll
+    ;;
+  osf3* | osf4* | osf5*)
+    ;;
+  solaris*)
+    ;;
+  sunos4*)
+    ;;
+  sysv4 | sysv4.3*)
+    ;;
+  sysv4*MP*)
+    ;;
+  sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+    ;;
+  uts4*)
+    ;;
+esac
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+
+LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
+
+# How to pass a linker flag through the compiler.
+wl="$escaped_wl"
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+EOF
diff --git a/configure.in b/configure.in
new file mode 100644 (file)
index 0000000..eb9b47c
--- /dev/null
@@ -0,0 +1,459 @@
+dnl Process this file with autoconf to produce a configure script.
+
+AC_INIT([linphone],[3.2.1],[linphone-developers@nongnu.org])
+AC_CANONICAL_SYSTEM
+
+dnl Source packaging numbers
+
+LINPHONE_MAJOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f1)
+LINPHONE_MINOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f2)
+LINPHONE_MICRO_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f3)
+LINPHONE_EXTRA_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f4)
+
+dnl program extension
+LINPHONE_VERSION=$LINPHONE_MAJOR_VERSION.$LINPHONE_MINOR_VERSION.${LINPHONE_MICRO_VERSION}
+if test "$LINPHONE_EXTRA_VERSION" != "" ;then
+       LINPHONE_VERSION=$LINPHONE_VERSION.${LINPHONE_EXTRA_VERSION}
+fi
+LIBLINPHONE_SO_VERSION=`expr $LINPHONE_MINOR_VERSION + $LINPHONE_MAJOR_VERSION`:$LINPHONE_MICRO_VERSION:$LINPHONE_MINOR_VERSION
+
+AC_SUBST(LIBLINPHONE_SO_VERSION, $LIBLINPHONE_SO_VERSION)
+AC_SUBST(LINPHONE_VERSION)
+
+AC_MSG_NOTICE([$PACKAGE_NAME-$PACKAGE_VERSION          A full featured audio/video sip phone.])
+AC_MSG_NOTICE([licensed under the terms of the General Public License (GPL)])
+
+AM_INIT_AUTOMAKE([tar-ustar])
+m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],)
+AC_CONFIG_HEADER(config.h)
+AC_CONFIG_MACRO_DIR([m4])
+AC_SUBST([mkdir_p])
+AC_ISC_POSIX
+AC_PROG_CC
+AC_C_INLINE
+AM_PROG_CC_STDC
+AC_HEADER_STDC
+AM_PROG_CC_C_O
+
+case $target_os in
+       *mingw32ce)
+               CFLAGS="$CFLAGS -D_WIN32_WCE -DORTP_STATIC -D_WIN32_WINNT=0x0501"
+               CXXFLAGS="$CXXFLAGS -DORTP_STATIC -D_WIN32_WINNT=0x0501"
+               LIBS="$LIBS -lws2 -liphlpapi"
+               mingw_found=yes
+               mingwce_found=yes
+               ;;
+       *mingw*)
+               CFLAGS="$CFLAGS -DORTP_STATIC -D_WIN32_WINNT=0x0501 "
+               CXXFLAGS="$CXXFLAGS -DORTP_STATIC -D_WIN32_WINNT=0x0501"
+               LIBS="$LIBS -lws2_32"
+               GUI_FLAGS="-mwindows"
+               CONSOLE_FLAGS="-mconsole"
+               mingw_found=yes
+       ;;
+       *darwin*)
+               dnl use macport installation
+               ACLOCAL_MACOS_FLAGS="-I /opt/local/share/aclocal"
+       ;;
+esac
+
+AC_SUBST(ACLOCAL_MACOS_FLAGS)
+AC_SUBST(CONSOLE_FLAGS)
+AC_SUBST(GUI_FLAGS)
+
+dnl localization tools
+ifdef([IT_PROG_INTLTOOL],[IT_PROG_INTLTOOL],[AC_PROG_INTLTOOL])
+dnl Initialize libtool
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL
+AM_PROG_LIBTOOL
+AC_ENABLE_SHARED(yes)
+AC_ENABLE_STATIC(no)
+
+
+AC_CONFIG_COMMANDS([libtool-hacking],[
+if test "$mingw_found" = "yes" ; then
+       echo "Hacking libtool to work with mingw..."
+       sed -e 's/\*\" \$a_deplib \"\*/\*/' < ./libtool > libtool.tmp
+       cp -f ./libtool.tmp ./libtool
+       rm -f ./libtool.tmp
+fi
+],[mingw_found=$mingw_found])
+
+dnl Add the languages which your application supports here.
+PKG_PROG_PKG_CONFIG
+ALL_LINGUAS="fr it de ja es pl cs nl sv pt_BR hu ru zh_CN"
+AC_SUBST(ALL_LINGUAS)
+AC_DEFINE_UNQUOTED(LINPHONE_ALL_LANGS, "$ALL_LINGUAS", [All supported languages])
+
+if test "$mingw_found" != "yes" ; then
+dnl gettext macro does not work properly under mingw.
+AM_GNU_GETTEXT([external])
+LIBS="$LIBS $LIBINTL"
+else
+       if test "$mingwce_found" != "yes" ; then 
+               AC_DEFINE(ENABLE_NLS,1,[Tells whether localisation is possible])
+               AC_DEFINE(HAVE_GETTEXT,1,[Tells wheter localisation is possible])
+               LIBS="$LIBS -L/usr/lib -lintl"
+       else
+               dnl gettext macro does not work properly under mingw.
+               AM_GNU_GETTEXT([external])
+               LIBS="$LIBS $LIBINTL"
+       fi
+fi
+
+GETTEXT_PACKAGE=linphone
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",[The name of the gettext package name])
+AC_CHECK_LIB(intl,libintl_gettext)
+
+AC_CHECK_FUNCS([get_current_dir_name strndup stpcpy] )
+
+dnl conditionnal build of console interface.
+AC_ARG_ENABLE(console_ui,
+      [  --enable-console_ui=[yes/no]    Turn on or off compilation of console interface [default=yes]],
+      [case "${enableval}" in
+        yes) console_ui=true ;;
+        no)  console_ui=false ;;
+        *) AC_MSG_ERROR(bad value ${enableval} for --enable-console_ui) ;;
+      esac],[console_ui=true])
+
+dnl conditionnal build of gtk interface.
+AC_ARG_ENABLE(gtk_ui,
+      [  --enable-gtk_ui=[yes/no]    Turn on or off compilation of gtk interface [default=yes]],
+      [case "${enableval}" in
+        yes) gtk_ui=true ;;
+        no)  gtk_ui=false ;;
+        *) AC_MSG_ERROR(bad value ${enableval} for --enable-gtk_ui) ;;
+      esac],[gtk_ui=true])
+
+
+if test "$gtk_ui" = "true" ; then
+       PKG_CHECK_MODULES(LIBGTK, gtk+-2.0 >= 2.4.0 gthread-2.0)
+       PKG_CHECK_MODULES(LIBGLADE, libglade-2.0 >= 2.4.0)
+       AC_SUBST(LIBGTK_CFLAGS)
+       AC_SUBST(LIBGTK_LIBS)
+       AC_SUBST(LIBGLADE_CFLAGS)
+       AC_SUBST(LIBGLADE_LIBS)
+else
+       echo "GTK interface compilation is disabled."
+fi
+
+
+dnl os-specific problems not handled by existing macros.
+case "$host_os" in
+       *freebsd*)
+               LDFLAGS="$LDFLAGS -pthread"
+               ;;
+esac
+
+case "$host_cpu" in
+       *arm*)
+               AC_DEFINE(__ARM__,1,[Defined if we are compiling for arm processor])
+               use_arm_toolchain=yes
+               ;;
+esac
+
+AC_ARG_WITH( configdir,
+      [  --with-configdir      Set a APPDATA subdir where linphone is supposed to find its config (windows only) ],
+      [ configdir=${withval}],[ configdir="Linphone" ])
+
+AC_DEFINE_UNQUOTED(LINPHONE_CONFIG_DIR,"$configdir",[Windows appdata subdir where linphonerc can be found])
+
+AC_ARG_ENABLE(manual,
+      [  --disable-manual    Do not attempt to build html linphone's user documentation],
+      [case "${enableval}" in
+        yes) build_manual=yes ;;
+        no)  build_manual=false ;;
+        *) AC_MSG_ERROR(bad value ${enableval} for --enable-manual) ;;
+      esac],[build_manual=yes])
+
+AC_ARG_ENABLE(date,
+      [  --enable-date    Use build date in internal version number],
+      [case "${enableval}" in
+        yes) use_date=yes ;;
+        no)  use_date=no ;;
+        *) AC_MSG_ERROR(bad value ${enableval} for --enable-date) ;;
+      esac],[use_date=no])
+
+if test x$use_date =  xyes ; then
+       AC_DEFINE(USE_BUILDDATE_VERSION,1,[Tell whether date_version.h must be used])
+fi
+
+
+dnl enable ipv6 support
+AC_ARG_ENABLE(ipv6,
+      [  --enable-ipv6    Turn on ipv6 support],
+      [case "${enableval}" in
+        yes)  ipv6=true;;
+        no)   ipv6=false;;
+        *) AC_MSG_ERROR(bad value ${enableval} for --enable-ipv6) ;;
+      esac],[ipv6=true])
+IPV6_CFLAGS=
+if test x$ipv6 = xtrue ; then
+       IPV6_CFLAGS=-DINET6
+fi
+AC_SUBST(IPV6_CFLAGS)
+
+dnl enable truespeech codec support
+AC_ARG_ENABLE(truespeech,
+      [  --enable-truespeech    Turn on TrueSpeech support (x86 only)],
+      [case "${enableval}" in
+        yes)  truespeech=true;;
+        no)   truespeech=false;;
+        *) AC_MSG_ERROR(bad value ${enableval} for --enable-truespeech) ;;
+      esac],[truespeech=false])
+TRUESPEECH_CFLAGS=
+if test x$truespeech = xtrue ; then
+       TRUESPEECH_CFLAGS=-DTRUESPEECH
+fi
+AC_SUBST(TRUESPEECH_CFLAGS)
+AM_CONDITIONAL([BUILD_TRUESPEECH], [test x$truespeech = xtrue])
+
+AC_ARG_ENABLE(nonstandard-gsm,
+      [  --enable-nonstandard-gsm    Enable GSM codec at nonstandard rates (11025hz, 16000hz)],
+      [case "${enableval}" in
+        yes) exotic_gsm=yes
+       AC_DEFINE(ENABLE_NONSTANDARD_GSM,1,[Defined when using gsm at nonstandard rates])
+        ;;
+        no)  exotic_gsm=no ;;
+        *) AC_MSG_ERROR(bad value ${enableval} for --enable-nonstandard-gsm) ;;
+      esac],[exotic_gsm=no])
+
+
+dnl support for RSVP (by Vincent Maury)
+AC_ARG_ENABLE(rsvp,
+[  --enable-rsvp           enable support for QoS reservations.],
+AC_DEFINE(VINCENT_MAURY_RSVP,1,[Tell whether RSVP support
+should be compiled.]) )
+
+if test "x${prefix}" = "xNONE"; then
+       package_prefix=${ac_default_prefix}
+else
+       package_prefix=${prefix}
+fi
+
+if test x$mingw_found = xyes ; then
+dnl allow binaries to install everywhere
+package_prefix="."
+fi
+
+dnl Set PACKAGE_LOCALE_DIR in config.h.
+DATADIRNAME=share
+AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${package_prefix}/${DATADIRNAME}/locale",[Defines the place where locales can be found])
+
+AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${package_prefix}/${DATADIRNAME}",[Defines the place where data are found])
+
+dnl Set PACKAGE_SOUND_DIR in config.h.
+AC_DEFINE_UNQUOTED(PACKAGE_SOUND_DIR, "${package_prefix}/${DATADIRNAME}/sounds/linphone",[Defines the place where linphone sounds are found])
+
+
+dnl check if we have the getifaddrs() sytem call
+AC_CHECK_FUNCS(getifaddrs)
+
+dnl check for osip2
+LP_CHECK_OSIP2
+
+dnl setup flags for exosip library
+LP_SETUP_EXOSIP
+
+if test "$console_ui" = "true" ; then
+dnl check gnu readline
+LP_CHECK_READLINE
+else
+echo "Console interface compilation is disabled."
+fi
+
+AC_WORDS_BIGENDIAN
+
+dnl normaly this should only by done by mediastreamer2/configure.ac
+dnl but to workaround bugs when cross-compiling for arm-linux,
+dnl we need to have SPEEX_LIBS defined
+dnl Furthermore it is good to repeat here all mediastreamer2 toggles
+dnl since top-level configure --help will not print them.
+
+PKG_CHECK_MODULES(SPEEX, speex >= 1.1.6, build_speex=yes)
+AC_SUBST(SPEEX_LIBS)
+
+dnl conditionnal build of video support
+AC_ARG_ENABLE(video,
+               [  --enable-video    Turn on video support compiling],
+               [case "${enableval}" in
+               yes) video=true ;;
+               no)  video=false ;;
+               *) AC_MSG_ERROR(bad value ${enableval} for --enable-video) ;;
+               esac],[video=true])
+               
+AC_ARG_WITH( ffmpeg,
+               [  --with-ffmpeg                Sets the installation prefix of ffmpeg, needed for video support. [default=/usr] ],
+               [ ffmpegdir=${withval}],[ ffmpegdir=/usr ])
+
+AC_ARG_WITH( sdl,
+               [  --with-sdl           Sets the installation prefix of libSDL, needed for video support. [default=/usr] ],
+               [ libsdldir=${withval}],[ libsdldir=/usr ])
+
+if test "$video" = "true"; then
+       AC_DEFINE(VIDEO_ENABLED,1,[defined if video support is available])
+fi
+
+AC_ARG_ENABLE(alsa,
+      [  --enable-alsa    Turn on alsa native support compiling],
+      [case "${enableval}" in
+        yes) alsa=true ;;
+        no)  alsa=false ;;
+        *) AC_MSG_ERROR(bad value ${enableval} for --enable-alsa) ;;
+      esac],[alsa=true])
+
+AC_ARG_ENABLE(artsc,
+      [  --enable-artsc    Turn on artsc (kde) sound input/output (auto) ],
+      [case "${enableval}" in
+        yes) artsc=true ;;
+        no)  artsc=false ;;
+        *) AC_MSG_ERROR(bad value ${enableval} for --enable-artsc) ;;
+      esac],[artsc=false])
+
+AC_ARG_ENABLE(portaudio,
+      [  --enable-portaudio    Turn on portaudio native support compiling],
+      [case "${enableval}" in
+        yes) portaudio=true ;;
+        no)  portaudio=false ;;
+        *) AC_MSG_ERROR(bad value ${enableval} for --enable-portaudio) ;;
+      esac],[portaudio=false])
+
+dnl build console if required
+AM_CONDITIONAL(BUILD_CONSOLE, test x$console_ui = xtrue)
+dnl special things for arm-linux cross compilation toolchain
+AM_CONDITIONAL(ARMBUILD, test x$use_arm_toolchain = xyes)
+dnl compilation of gtk-glade user interface
+AM_CONDITIONAL(BUILD_GLADE_UI, [test x$gtk_ui = xtrue ] )
+AM_CONDITIONAL(BUILD_WIN32, test x$mingw_found = xyes )
+
+dnl check getenv
+AH_TEMPLATE([HAVE_GETENV])
+AC_CHECK_FUNC([getenv], AC_DEFINE([HAVE_GETENV], [1], [If present, the getenv function allows fim to read environment variables.]))
+
+dnl
+AC_MSG_CHECKING([for sighandler_t])
+AC_TRY_COMPILE([#include <signal.h>],[sighandler_t *f;],
+has_sighandler_t=yes,has_sighandler_t=no)
+AC_MSG_RESULT($has_sighandler_t)
+if test "$has_sighandler_t" = "yes" ; then
+    AC_DEFINE( HAVE_SIGHANDLER_T, 1, [Define if sighandler_t available] )
+fi
+
+##################################################
+# Stricter build options (after external packages)
+##################################################
+
+
+AC_ARG_ENABLE(strict,
+       AC_HELP_STRING([--enable-strict],
+                      [Build with stricter options (gcc only) @<:@yes@:>@]),[
+       strictness="${enableval}"],[strictness=yes]
+)
+
+if test "$GCC$strictness" = "yesyes" ; then
+       STRICT_OPTIONS="-Wall "
+       STRICT_OPTIONS="$STRICT_OPTIONS -Werror"
+       CFLAGS="$CFLAGS -fno-strict-aliasing"
+fi
+
+AC_SUBST(STRICT_OPTIONS)
+
+AC_CONFIG_SUBDIRS( mediastreamer2 )
+
+dnl check for db2html (docbook) to generate html user manual
+AC_CHECK_PROG(have_sgmltools,sgmltools, yes, no)
+AM_CONDITIONAL(ENABLE_MANUAL, test x$have_sgmltools$build_manual = xyesyes )
+
+dnl for external use of linphone libs
+LINPHONE_CFLAGS="-I${includedir} -I${includedir}/linphone  "
+LINPHONE_LIBS="-L${libdir}  -llinphone"
+
+if test x$mingw_found = xyes ; then
+       LINPHONE_LIBS="$LINPHONE_LIBS $OSIP_LIBS"
+fi
+AC_SUBST(LINPHONE_CFLAGS)
+AC_SUBST(LINPHONE_LIBS)
+
+
+AC_DEFINE_UNQUOTED(LINPHONE_VERSION,"$PACKAGE_VERSION",[Linphone's version number])
+
+AC_DEFINE_UNQUOTED(LINPHONE_PLUGINS_DIR, "${package_prefix}/lib/liblinphone/plugins" ,[path of liblinphone plugins, not mediastreamer2 plugins])
+LINPHONE_PLUGINS_DIR="${package_prefix}/lib/liblinphone/plugins"
+AC_SUBST(LINPHONE_PLUGINS_DIR)
+
+AC_ARG_ENABLE(external-ortp,
+      [  --enable-external-ortp    Use external oRTP library],
+      [case "${enableval}" in
+        yes) external_ortp=true ;;
+        no)  external_ortp=false ;;
+        *) AC_MSG_ERROR(bad value ${enableval} for --enable-external-ortp) ;;
+      esac],[external_ortp=false])
+
+if test "$external_ortp" = 'true'; then
+       LP_CHECK_ORTP
+else
+       AC_CONFIG_SUBDIRS( oRTP )
+       ORTP_CFLAGS="-I\$(top_srcdir)/oRTP/include"
+       ORTP_LIBS="\$(top_builddir)/oRTP/src/libortp.la"
+       if test x$ac_cv_c_bigendian = xyes ; then
+               ORTP_CFLAGS="$ORTP_CFLAGS -DORTP_BIGENDIAN"
+       fi
+fi
+AC_SUBST(ORTP_CFLAGS)
+AC_SUBST(ORTP_LIBS)
+
+AM_CONDITIONAL(EXTERNAL_ORTP, [test "$external_ortp" = 'true'])
+
+dnl Packaging: Pick oRTP version from ${top_srcdir}/oRTP/configure.ac
+dnl Feel free to propose an alternative & cleaner version...
+top_srcdir=`dirname $0`
+changequote(, )dnl
+ORTP_VERSION=`grep -E ^[AC]+_INIT ${top_srcdir}/oRTP/configure.ac | sed -e 's:^.*_INIT(.*,\[\(.*\)\]):\1:g'`
+MS2_VERSION=`grep -E ^[AC]+_INIT ${top_srcdir}/mediastreamer2/configure.ac | sed -e 's:^.*_INIT(.*,\[\(.*\)\]):\1:g'`
+changequote([, ])dnl
+AC_SUBST([ORTP_VERSION])
+AC_SUBST([MS2_VERSION])
+
+dnl ##################################################
+dnl # Check for doxygen
+dnl ##################################################
+
+AC_PATH_PROG(DOXYGEN,doxygen,false)
+AM_CONDITIONAL(HAVE_DOXYGEN, test $DOXYGEN != false)
+
+
+AC_OUTPUT([ 
+Makefile 
+m4/Makefile
+po/Makefile.in 
+pixmaps/Makefile
+coreapi/Makefile
+coreapi/help/Makefile
+coreapi/help/Doxyfile
+coreapi/help/doxygen.dox
+gtk-glade/Makefile
+console/Makefile
+share/Makefile
+share/C/Makefile
+share/fr/Makefile
+share/it/Makefile
+share/ja/Makefile
+share/cs/Makefile
+share/linphone.pc
+scripts/Makefile
+linphone.spec
+linphone.iss
+])
+
+echo "Linphone build configuration ended."
+
+if test x$gtk_ui = xtrue ; then
+       echo "* GTK interface will be compiled."
+fi
+if test x$console_ui = xtrue ; then
+       echo "* Console interface will be compiled."
+fi
+
+echo "Now type 'make' to compile, and then 'make install' as root to install it."
diff --git a/console/.gitignore b/console/.gitignore
new file mode 100644 (file)
index 0000000..ff0fec7
--- /dev/null
@@ -0,0 +1,8 @@
+.deps
+.libs
+Makefile
+Makefile.in
+linphonec
+sipomatic
+wav2raw
+linphonecsh
diff --git a/console/Makefile.am b/console/Makefile.am
new file mode 100644 (file)
index 0000000..45f8865
--- /dev/null
@@ -0,0 +1,58 @@
+## Process this file with automake to produce Makefile.in
+
+COMMON_CFLAGS=$(STRICT_OPTIONS) -DIN_LINPHONE -DENABLE_TRACE -D_ORTP_SOURCE $(VIDEO_CFLAGS) $(READLINE_CFLAGS) $(OSIP_CFLAGS)
+
+if BUILD_CONSOLE
+
+INCLUDES = \
+       -I$(top_srcdir)\
+       -I$(top_srcdir)/coreapi\
+       $(ORTP_CFLAGS) \
+       -I$(top_srcdir)/exosip \
+       -I$(top_srcdir)/mediastreamer2/include
+
+
+
+bin_PROGRAMS =  linphonec sipomatic linphonecsh
+
+if BUILD_WIN32
+bin_PROGRAMS += linphoned
+endif
+
+linphonec_SOURCES = linphonec.c linphonec.h commands.c
+linphonec_CFLAGS=$(COMMON_CFLAGS) $(CONSOLE_FLAGS)
+linphonec_LDADD = $(top_builddir)/coreapi/liblinphone.la $(READLINE_LIBS)  \
+               $(top_builddir)/mediastreamer2/src/libmediastreamer.la \
+               $(ORTP_LIBS) \
+               $(SPEEX_LIBS) \
+               $(OSIP_LIBS)
+
+if BUILD_WIN32
+#special build of linphonec to detach from the windows console
+linphoned_SOURCES = $(linphonec_SOURCES)
+linphoned_CFLAGS=$(COMMON_CFLAGS) $(GUI_FLAGS)
+linphoned_LDADD=$(linphonec_LDADD)
+endif
+
+
+sipomatic_SOURCES=\
+       sipomatic.c sipomatic.h
+sipomatic_CFLAGS= $(COMMON_CFLAGS) $(CONSOLE_FLAGS)
+
+sipomatic_LDADD=       $(INTLLIBS)  \
+                       $(top_builddir)/coreapi/liblinphone.la \
+                       $(top_builddir)/mediastreamer2/src/libmediastreamer.la \
+                       $(ORTP_LIBS) \
+                       $(SPEEX_LIBS) \
+                       $(OSIP_LIBS)
+
+linphonecsh_SOURCES = shell.c
+linphonecsh_CFLAGS = $(CONSOLE_FLAGS)
+linphonecsh_LDADD = $(ORTP_LIBS)
+
+endif
+
+
+
+
+
diff --git a/console/TODO b/console/TODO
new file mode 100644 (file)
index 0000000..420d55a
--- /dev/null
@@ -0,0 +1,20 @@
+
+In pseudo-order of priority: 
+---------------------------
+
+- Exctract presence info in friends list
+
+- Allow friend call arg to be a pattern
+
+- hide input during password insertions
+       [ could use ncurses noecho() ]
+
+- Allow for single-shot mode (call somebody and quit after the fact)
+  maybe "linphonec [OPTS] <sip-uri>" would do..
+  Unfortunately the -s switch would confuse people, I'd rather
+  change its semantic to "source file" where file wold contain
+  a list of commands, so ./linephone -s myfriend.sip would call
+  yourfriend...
+
+- implement "smart" command completion
+
diff --git a/console/commands.c b/console/commands.c
new file mode 100644 (file)
index 0000000..cb68451
--- /dev/null
@@ -0,0 +1,1809 @@
+/****************************************************************************
+ *
+ *  $Id: commands.c,v 1.39 2008/07/03 15:08:34 smorlat Exp $
+ *
+ *  Copyright (C) 2006-2009  Sandro Santilli <strk@keybit.net>
+ *  Copyright (C) 2004  Simon MORLAT <simon.morlat@linphone.org>
+ *
+****************************************************************************
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ ****************************************************************************/
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#ifndef _WIN32_WCE
+#include <errno.h>
+#include <unistd.h>
+#endif /*_WIN32_WCE*/
+#include <limits.h>
+#include <ctype.h>
+#include <linphonecore.h>
+#include "linphonec.h"
+#include "private.h"
+#include "lpconfig.h"
+
+#ifndef WIN32
+#include <sys/wait.h>
+#endif
+
+/***************************************************************************
+ *
+ *  Forward declarations 
+ *
+ ***************************************************************************/
+
+extern char *lpc_strip_blanks(char *input);
+
+/* Command handlers */
+static int lpc_cmd_help(LinphoneCore *, char *);
+static int lpc_cmd_proxy(LinphoneCore *, char *);
+static int lpc_cmd_call(LinphoneCore *, char *);
+static int lpc_cmd_answer(LinphoneCore *, char *);
+static int lpc_cmd_autoanswer(LinphoneCore *, char *);
+static int lpc_cmd_terminate(LinphoneCore *, char *);
+static int lpc_cmd_call_logs(LinphoneCore *, char *);
+static int lpc_cmd_ipv6(LinphoneCore *, char *);
+static int lpc_cmd_refer(LinphoneCore *, char *);
+static int lpc_cmd_quit(LinphoneCore *, char *);
+static int lpc_cmd_nat(LinphoneCore *, char *);
+static int lpc_cmd_stun(LinphoneCore *, char *);
+static int lpc_cmd_firewall(LinphoneCore *, char *);
+static int lpc_cmd_friend(LinphoneCore *, char*);
+static int lpc_cmd_soundcard(LinphoneCore *, char *);
+static int lpc_cmd_play(LinphoneCore *, char *);
+static int lpc_cmd_record(LinphoneCore *, char *);
+static int lpc_cmd_register(LinphoneCore *, char *);
+static int lpc_cmd_unregister(LinphoneCore *, char *);
+static int lpc_cmd_duration(LinphoneCore *lc, char *args);
+static int lpc_cmd_status(LinphoneCore *lc, char *args);
+static int lpc_cmd_ports(LinphoneCore *lc, char *args);
+static int lpc_cmd_speak(LinphoneCore *lc, char *args);
+static int lpc_cmd_codec(LinphoneCore *lc, char *args);
+static int lpc_cmd_echocancellation(LinphoneCore *lc, char *args);
+
+/* Command handler helpers */
+static void linphonec_proxy_add(LinphoneCore *lc);
+static void linphonec_proxy_display(LinphoneProxyConfig *lc);
+static void linphonec_proxy_list(LinphoneCore *lc);
+static void linphonec_proxy_remove(LinphoneCore *lc, int index);
+static  int linphonec_proxy_use(LinphoneCore *lc, int index);
+static void linphonec_proxy_show(LinphoneCore *lc,int index);
+static void linphonec_friend_display(LinphoneFriend *fr);
+static int linphonec_friend_list(LinphoneCore *lc, char *arg);
+static void linphonec_display_command_help(LPC_COMMAND *cmd);
+static int linphonec_friend_call(LinphoneCore *lc, unsigned int num);
+#ifndef WIN32
+static int linphonec_friend_add(LinphoneCore *lc, const char *name, const char *addr);
+#endif
+static int linphonec_friend_delete(LinphoneCore *lc, int num);
+static int linphonec_friend_delete(LinphoneCore *lc, int num);
+static void linphonec_codec_list(LinphoneCore *lc);
+static void linphonec_codec_enable(LinphoneCore *lc, int index);
+static void linphonec_codec_disable(LinphoneCore *lc, int index);
+
+
+
+/* Command table management */
+static LPC_COMMAND *lpc_find_command(const char *name);
+
+void linphonec_out(const char *fmt,...);
+
+
+
+/***************************************************************************
+ *
+ *  Global variables
+ *
+ ***************************************************************************/
+
+/*
+ * Commands table.
+ */
+LPC_COMMAND commands[] = {
+       { "help", lpc_cmd_help, "Print commands help", NULL },
+       { "call", lpc_cmd_call, "Call a SIP uri",
+               "'call <sip-url>' "
+               ": initiate a call to the specified destination."
+               },
+       { "terminate", lpc_cmd_terminate, "Terminate the current call",
+               NULL },
+       { "answer", lpc_cmd_answer, "Answer a call",
+               "Accept an incoming call."
+       },
+       { "autoanswer", lpc_cmd_autoanswer, "Show/set auto-answer mode",
+               "'autoanswer'       \t: show current autoanswer mode\n"
+               "'autoanswer enable'\t: enable autoanswer mode\n"
+               "'autoanswer disable'\t: disable autoanswer mode \n"},
+       { "proxy", lpc_cmd_proxy, "Manage proxies",
+               "'proxy list' : list all proxy setups.\n"
+               "'proxy add' : add a new proxy setup.\n"
+               "'proxy remove <index>' : remove proxy setup with number index.\n"
+               "'proxy use <index>' : use proxy with number index as default proxy.\n"
+               "'proxy unuse' : don't use a default proxy.\n"
+               "'proxy show <index>' : show configuration and status of the proxy numbered by index.\n"
+               "'proxy show default' : show configuration and status of the default proxy.\n"
+       },
+       { "soundcard", lpc_cmd_soundcard, "Manage soundcards",
+               "'soundcard list' : list all sound devices.\n"
+               "'soundcard show' : show current sound devices configuration.\n"
+               "'soundcard use <index>' : select a sound device.\n"
+               "'soundcard use files' : use .wav files instead of soundcard\n"
+       },
+       { "ipv6", lpc_cmd_ipv6, "Use IPV6",
+               "'ipv6 status' : show ipv6 usage status.\n"
+               "'ipv6 enable' : enable the use of the ipv6 network.\n"
+               "'ipv6 disable' : do not use ipv6 network."
+       },
+       { "refer", lpc_cmd_refer,
+               "Refer the current call to the specified destination.",
+               "'refer <sip-url>' or 'r <sip-url>' "
+               ": refer the current call to the specified destination."
+       },
+       { "nat", lpc_cmd_nat, "Set nat address",
+               "'nat'        : show nat settings.\n"
+               "'nat <addr>' : set nat address.\n"
+       },
+       { "stun", lpc_cmd_stun, "Set stun server address",
+               "'stun'        : show stun settings.\n"
+               "'stun <addr>' : set stun server address.\n"
+       },
+       { "firewall", lpc_cmd_firewall, "Set firewall policy",
+               "'firewall'        : show current firewall policy.\n"
+               "'firewall none'   : use direct connection.\n"
+               "'firewall nat'    : use nat address given with the 'nat' command.\n"
+               "'firewall stun'   : use stun server given with the 'stun' command.\n"
+       },
+       { "call-logs", lpc_cmd_call_logs, "Calls history", NULL },
+       { "friend", lpc_cmd_friend, "Manage friends",
+               "'friend list [<pattern>]'    : list friends.\n"
+               "'friend call <index>'        : call a friend.\n"
+               "'friend add <name> <addr>'   : add friend, <name> must be quoted to include\n"
+           "                               spaces, <addr> has \"sip:\" added if it isn't\n"
+           "                               there.  Don't use '<' '>' around <addr>.\n"
+               "'friend delete <index>'      : remove friend, 'all' removes all\n"
+       },
+       { "play", lpc_cmd_play, "play from a wav file",
+               "This feature is available only in file mode (see 'help soundcard')\n"
+               "'play <wav file>'    : play a wav file."
+       },
+       { "record", lpc_cmd_record, "record to a wav file",
+               "This feature is available only in file mode (see 'help soundcard')\n"
+               "'record <wav file>'    : record into wav file."
+       },
+       { "quit", lpc_cmd_quit, "Exit linphonec", NULL },
+       { "register", lpc_cmd_register, "Register in one line to a proxy" , "register <sip identity> <sip proxy> <password>"},
+       { "unregister", lpc_cmd_unregister, "Unregister from default proxy", NULL       },
+       { "duration", lpc_cmd_duration, "Print duration in seconds of the last call.", NULL },
+       { "status", lpc_cmd_status, "Print various status information", 
+                       "'status register'  \t: print status concerning registration\n"
+                       "'status autoanswer'\t: tell whether autoanswer mode is enabled\n"
+                       "'status hook'      \t: print hook status\n" },
+       { "ports", lpc_cmd_ports, "Network ports configuration", 
+                       "'ports'  \t: prints current used ports.\n"
+                       "'ports sip <port number>'\t: Sets the sip port.\n" },
+       { "speak", lpc_cmd_speak, "Speak a sentence using espeak TTS engine",
+                       "This feature is available only in file mode. (see 'help soundcard')\n"
+                       "'speak <voice name> <sentence>'        : speak a text using the specified espeak voice.\n"
+                       "Example for english voice: 'speak default Hello my friend !'"
+       },
+    { "codec", lpc_cmd_codec, "Codec configuration",
+            "'codec list' : list codecs\n"  
+            "'codec enable <index>' : enable available codec\n"  
+            "'codec disable <index>' : disable codecs" }, 
+    { "ec", lpc_cmd_echocancellation, "Echo cancellation",
+            "'ec on [<delay>] [<tail>] [<framesize>]' : turn EC on with given delay, tail length and framesize\n"
+            "'ec off' : turn echo cancellation (EC) off\n"
+            "'ec show' : show EC status" },
+       { (char *)NULL, (lpc_cmd_handler)NULL, (char *)NULL, (char *)NULL }
+};
+
+/***************************************************************************
+ *
+ *  Public interface 
+ *
+ ***************************************************************************/
+
+/*
+ * Main command dispatcher.
+ * WARNING: modifies second argument!
+ *
+ * Always return 1 currently.
+ */
+int
+linphonec_parse_command_line(LinphoneCore *lc, char *cl)
+{
+       char *ptr=cl;
+       char *args=NULL;
+       LPC_COMMAND *cmd;
+
+       /* Isolate first word and args */
+       while(*ptr && !isspace(*ptr)) ++ptr;
+       if (*ptr)
+       {
+               *ptr='\0';
+               /* set args to first nonblank */
+               args=ptr+1;
+               while(*args && isspace(*args)) ++args;
+       }
+
+       /* Handle DTMF */
+       if ( isdigit(*cl) || *cl == '#' || *cl == '*' )
+       {
+               while ( isdigit(*cl) || *cl == '#' || *cl == '*' )
+               {
+                       linphone_core_send_dtmf(lc, *cl);
+                       ms_sleep(1); // be nice
+                       ++cl;
+               }
+
+               // discard spurious trailing chars
+               return 1;
+       }
+
+       /* Handle other kind of commands */
+       cmd=lpc_find_command(cl);
+       if ( !cmd )
+       {
+               linphonec_out("'%s': Cannot understand this.\n", cl);
+               return 1;
+       }
+
+       if ( ! cmd->func(lc, args) )
+       {
+               linphonec_out("Syntax error.\n");
+               linphonec_display_command_help(cmd);
+       }
+
+       return 1;
+}
+
+/*
+ * Generator function for command completion.
+ * STATE let us know whether to start from scratch;
+ * without any state (STATE==0), then we start at the
+ * top of the list.
+ */
+char *
+linphonec_command_generator(const char *text, int state)
+{
+       static int index, len;
+       char *name;
+
+       if ( ! state )
+       {
+               index=0;
+               len=strlen(text);
+       }
+
+       /*
+        * Return the next name which partially matches
+        * from the commands list
+        */
+       while ((name=commands[index].name))
+       {
+               ++index; /* so next call get next command */
+
+               if (strncmp(name, text, len) == 0)
+               {
+                       return ortp_strdup(name);
+               }
+       }
+
+       return NULL;
+}
+
+
+/***************************************************************************
+ *
+ *  Command handlers 
+ *
+ ***************************************************************************/
+
+static int
+lpc_cmd_help(LinphoneCore *lc, char *arg)
+{
+       int i=0;
+       LPC_COMMAND *cmd;
+
+       if (!arg || !*arg)
+       {
+               linphonec_out("Commands are:\n");
+               linphonec_out("---------------------------\n");
+
+               while (commands[i].help)
+               {
+                       linphonec_out("%10.10s\t%s\n", commands[i].name,
+                               commands[i].help);
+                       i++;
+               }
+               
+               linphonec_out("---------------------------\n");
+               linphonec_out("Type 'help <command>' for more details.\n");
+
+               return 1;
+       }
+
+       cmd=lpc_find_command(arg);
+       if ( !cmd )
+       {
+               linphonec_out("No such command.\n");
+               return 1;
+       }
+
+       linphonec_display_command_help(cmd);
+       return 1;
+
+}
+
+static char callee_name[256]={0};
+static char caller_name[256]={0};
+
+static int
+lpc_cmd_call(LinphoneCore *lc, char *args)
+{
+       if ( ! args || ! *args )
+       {
+               return 0;
+       }
+
+       if ( lc->call != NULL )
+       {
+               linphonec_out("Terminate current call first.\n");
+       }
+       else
+       {
+               if ( -1 == linphone_core_invite(lc, args) )
+               {
+                       linphonec_out("Error from linphone_core_invite.\n");
+               }
+               else
+               {
+                       snprintf(callee_name,sizeof(callee_name),"%s",args);
+               }
+       }
+       return 1;
+}
+
+const char *linphonec_get_callee(){
+       return callee_name;
+}
+
+const char *linphonec_get_caller(){
+       return caller_name;
+}
+
+void linphonec_set_caller(const char *caller){
+       snprintf(caller_name,sizeof(caller_name)-1,"%s",caller);
+}
+
+static int
+lpc_cmd_refer(LinphoneCore *lc, char *args)
+{
+       if (args)
+               linphone_core_refer(lc, args);
+       else{
+               linphonec_out("refer needs an argument\n");
+       }
+       return 1;
+}
+
+static int
+lpc_cmd_terminate(LinphoneCore *lc, char *args)
+{
+       if ( -1 == linphone_core_terminate_call(lc, NULL) )
+       {
+               linphonec_out("No active call.\n");
+       }
+       return 1;
+}
+
+static int
+lpc_cmd_answer(LinphoneCore *lc, char *args)
+{
+       if ( -1 == linphone_core_accept_call(lc, NULL) )
+       {
+               linphonec_out("No incoming call.\n");
+       }
+       return 1;
+}
+
+static int
+lpc_cmd_autoanswer(LinphoneCore *lc, char *args)
+{
+       if ( ! args )
+       {
+               if ( linphonec_get_autoanswer() ) {
+                       linphonec_out("Auto answer is enabled. Use 'autoanswer disable' to disable.\n");
+               } else {
+                       linphonec_out("Auto answer is disabled. Use 'autoanswer enable' to enable.\n");
+               }
+               return 1;
+       }
+
+       if (strstr(args,"enable")){
+               linphonec_set_autoanswer(TRUE);
+               linphonec_out("Auto answer enabled.\n");
+       }else if (strstr(args,"disable")){
+               linphonec_set_autoanswer(FALSE);
+               linphonec_out("Auto answer disabled.\n");
+       }else return 0;
+       return 1;
+}
+
+static int
+lpc_cmd_quit(LinphoneCore *lc, char *args)
+{
+       linphonec_main_loop_exit();
+       return 1;
+}
+
+static int
+lpc_cmd_nat(LinphoneCore *lc, char *args)
+{
+       bool_t use;
+       const char *nat;
+
+       if ( args ) args=lpc_strip_blanks(args);
+
+       if ( args && *args )
+       {
+               linphone_core_set_nat_address(lc, args);
+               /* linphone_core_set_firewall_policy(lc,LINPHONE_POLICY_USE_NAT_ADDRESS); */
+       }
+
+       nat = linphone_core_get_nat_address(lc);
+       use = linphone_core_get_firewall_policy(lc)==LINPHONE_POLICY_USE_NAT_ADDRESS;
+       linphonec_out("Nat address: %s%s\n", nat ? nat : "unspecified" , use ? "" : " (disabled - use 'firewall nat' to enable)");
+
+       return 1;
+}
+
+static int
+lpc_cmd_stun(LinphoneCore *lc, char *args)
+{
+       bool_t use;
+       const char *stun;
+
+       if ( args ) args=lpc_strip_blanks(args);
+
+       if ( args && *args )
+       {
+               linphone_core_set_stun_server(lc, args);
+               /* linphone_core_set_firewall_policy(lc,LINPHONE_POLICY_USE_STUN); */
+       }
+
+       stun = linphone_core_get_stun_server(lc);
+       use = linphone_core_get_firewall_policy(lc)==LINPHONE_POLICY_USE_STUN;
+       linphonec_out("Stun server: %s%s\n", stun ? stun : "unspecified" , use? "" : " (disabled - use 'firewall stun' to enable)");
+
+       return 1;
+}
+
+static int
+lpc_cmd_firewall(LinphoneCore *lc, char *args)
+{
+       const char* setting=NULL;
+
+       if ( args ) args=lpc_strip_blanks(args);
+
+       if ( args && *args )
+       {
+               if (strcmp(args,"none")==0)
+               {
+                       linphone_core_set_firewall_policy(lc,LINPHONE_POLICY_NO_FIREWALL);
+               }
+               else if (strcmp(args,"stun")==0)
+               {
+                       setting = linphone_core_get_stun_server(lc);
+                       if ( ! setting )
+                       {
+                               linphonec_out("No stun server address is defined, use 'stun <address>' first\n");
+                               return 1;
+                       }
+                       linphone_core_set_firewall_policy(lc,LINPHONE_POLICY_USE_STUN);
+               }
+               else if (strcmp(args,"nat")==0)
+               {
+                       setting = linphone_core_get_nat_address(lc);
+                       if ( ! setting )
+                       {
+                               linphonec_out("No nat address is defined, use 'nat <address>' first");
+                               return 1;
+                       }
+                       linphone_core_set_firewall_policy(lc,LINPHONE_POLICY_USE_NAT_ADDRESS);
+               }
+       }
+
+       switch(linphone_core_get_firewall_policy(lc))
+       {
+               case LINPHONE_POLICY_NO_FIREWALL:
+                       linphonec_out("No firewall\n");
+                       break;
+               case LINPHONE_POLICY_USE_STUN:
+                       linphonec_out("Using stun server %s to discover firewall address\n", setting ? setting : linphone_core_get_stun_server(lc));
+                       break;
+               case LINPHONE_POLICY_USE_NAT_ADDRESS:
+                       linphonec_out("Using supplied nat address %s.\n", setting ? setting : linphone_core_get_nat_address(lc));
+                       break;
+       }
+       return 1;
+}
+
+#ifndef WIN32
+/* Helper function for processing freind names */
+static int
+lpc_friend_name(char **args, char **name)
+{
+       /* Use space as a terminator unless quoted */
+       if (('"' == **args) || ('\'' == **args)){
+               char *end;
+               char delim = **args;
+               (*args)++;
+               end = (*args);
+               while ((delim != *end) && ('\0' != *end)) end++;
+               if ('\0' == *end) {
+                       fprintf(stderr, "Mismatched quotes\n");
+                       return 0;
+               }
+               *name = *args;
+               *end = '\0';
+               *args = ++end;
+       } else {
+               *name = strsep(args, " ");
+               
+               if (NULL == *args) { /* Means there was no separator */
+                       fprintf(stderr, "Either name or address is missing\n");
+                       return 0;
+               }
+               if (NULL == *name) return 0;
+       }
+       return 1;
+}
+#endif
+
+static int
+lpc_cmd_friend(LinphoneCore *lc, char *args)
+{
+       int friend_num;
+
+       if ( args ) args=lpc_strip_blanks(args);
+
+       if ( ! args || ! *args ) return 0;
+
+       if ( !strncmp(args, "list", 4) )
+       {
+               return linphonec_friend_list(lc, args+4);
+               return 1;
+       }
+       else if ( !strncmp(args, "call", 4) )
+       {
+               args+=4;
+               if ( ! *args ) return 0;
+               friend_num = strtol(args, NULL, 10);
+#ifndef _WIN32_WCE             
+               if ( errno == ERANGE ) {
+                       linphonec_out("Invalid friend number\n");
+                       return 0;
+               }
+#endif /*_WIN32_WCE*/
+               linphonec_friend_call(lc, friend_num);
+               return 1;
+       }
+       else if ( !strncmp(args, "delete", 6) )
+       {
+               args+=6;
+               if ( ! *args ) return 0;
+               while (*args == ' ') args++;
+               if ( ! *args ) return 0;
+               if (!strncmp(args, "all", 3))
+               {
+                       friend_num = -1;
+               } 
+               else
+               {
+                       friend_num = strtol(args, NULL, 10);
+#ifndef _WIN32_WCE             
+                       if ( errno == ERANGE ) {
+                               linphonec_out("Invalid friend number\n");
+                               return 0;
+                       }
+#endif /*_WIN32_WCE*/
+               }
+               linphonec_friend_delete(lc, friend_num);
+               return 1;
+       }
+       else if ( !strncmp(args, "add", 3) )
+       {
+#ifndef WIN32
+               char  *name;
+               char  addr[80];
+               char *addr_p = addr;
+               char *addr_orig;
+
+               args+=3;
+               if ( ! *args ) return 0;
+               while (*args == ' ') args++;
+               if ( ! *args ) return 0;
+
+               if (!lpc_friend_name(&args,  &name)) return 0;
+
+               while (*args == ' ') args++;
+               if ( ! *args ) return 0;
+               if (isdigit(*args)) {
+                       strcpy (addr, "sip:");
+                       addr_p = addr + strlen("sip:");
+               }
+               addr_orig = strsep(&args, " ");
+               if (1 >= strlen(addr_orig)) {
+                       fprintf(stderr, "A single-digit address is not valid\n");
+                       return 0;
+               }
+               strcpy(addr_p, addr_orig);
+               linphonec_friend_add(lc, name, addr);
+#else
+               LinphoneFriend *new_friend;
+               new_friend = linphone_friend_new_with_addr(args);
+               linphone_core_add_friend(lc, new_friend);
+#endif
+               return 1;
+       }
+       return 0;
+}
+
+static int lpc_cmd_play(LinphoneCore *lc, char *args){
+       if ( args ) args=lpc_strip_blanks(args);
+       if ( ! args || ! *args ) return 0;
+       linphone_core_set_play_file(lc,args);
+       return 1;
+}
+
+static int lpc_cmd_record(LinphoneCore *lc, char *args){
+       if ( args ) args=lpc_strip_blanks(args);
+       if ( ! args || ! *args ) return 0;
+       linphone_core_set_record_file(lc,args);
+       return 1;
+}
+
+/*
+ * Modified input
+ */
+static int
+lpc_cmd_proxy(LinphoneCore *lc, char *args)
+{
+       char *arg1 = args;
+       char *arg2 = NULL;
+       char *ptr = args;
+       int proxynum;
+
+       if ( ! arg1 ) return 0;
+
+       /* Isolate first and second arg */
+       while(*ptr && !isspace(*ptr)) ++ptr;
+       if ( *ptr )
+       {
+               *ptr='\0';
+               arg2=ptr+1;
+               while(*arg2 && isspace(*arg2)) ++arg2;
+       }
+
+       if (strcmp(arg1,"add")==0)
+       {
+#ifdef HAVE_READLINE
+               rl_inhibit_completion=1;
+#endif
+               linphonec_proxy_add(lc);
+#ifdef HAVE_READLINE
+               rl_inhibit_completion=0;
+#endif
+       }
+       else if (strcmp(arg1,"list")==0)
+       {
+               linphonec_proxy_list(lc);
+       }
+       else if (strcmp(arg1,"remove")==0)
+       {
+               linphonec_proxy_remove(lc,atoi(arg2));
+       }
+       else if (strcmp(arg1,"use")==0)
+       {
+               if ( arg2 && *arg2 )
+               {
+                       proxynum=atoi(arg2);
+                       if ( linphonec_proxy_use(lc, proxynum) )
+                               linphonec_out("Default proxy set to %d.\n", proxynum);
+               }
+               else
+               {
+                       proxynum=linphone_core_get_default_proxy(lc, NULL);
+                       if ( proxynum == -1 ) linphonec_out("No default proxy.\n");
+                       else linphonec_out("Current default proxy is %d.\n", proxynum);
+               }
+       }else if (strcmp(arg1, "unuse")==0){
+               linphone_core_set_default_proxy(lc, NULL);
+               linphonec_out("Use no proxy.\n");
+       }
+
+       else if (strcmp(arg1, "show")==0)
+       {
+               if (arg2 && *arg2)
+               {
+                       if (strstr(arg2,"default"))
+                       {
+               proxynum=linphone_core_get_default_proxy(lc, NULL);
+               if ( proxynum < 0 ) {
+                       linphonec_out("No default proxy defined\n");
+                       return 1;
+               }
+               linphonec_proxy_show(lc,proxynum);
+                       }
+                       else
+                       {
+               linphonec_proxy_show(lc, atoi(arg2));
+                       }
+               }
+               else return 0; /* syntax error */
+       }
+
+       else
+       {
+               return 0; /* syntax error */
+       }
+
+       return 1;
+}
+
+static int
+lpc_cmd_call_logs(LinphoneCore *lc, char *args)
+{
+       const MSList *elem=linphone_core_get_call_logs(lc);
+       for (;elem!=NULL;elem=ms_list_next(elem))
+       {
+               LinphoneCallLog *cl=(LinphoneCallLog*)elem->data;
+               char *str=linphone_call_log_to_str(cl);
+               linphonec_out("%s\n",str);
+               ms_free(str);
+       }
+       return 1;
+}
+
+static int
+lpc_cmd_ipv6(LinphoneCore *lc, char *arg1)
+{
+       if ( ! arg1 )
+       {
+               return 0; /* syntax error */
+       }
+
+       if (strcmp(arg1,"status")==0)
+       {
+               linphonec_out("ipv6 use enabled: %s\n",linphone_core_ipv6_enabled(lc) ? "true":"false");
+       }
+       else if (strcmp(arg1,"enable")==0)
+       {
+               linphone_core_enable_ipv6(lc,TRUE);
+               linphonec_out("ipv6 use enabled.\n");
+       }
+       else if (strcmp(arg1,"disable")==0)
+       {
+               linphone_core_enable_ipv6(lc,FALSE);
+               linphonec_out("ipv6 use disabled.\n");
+       }
+       else
+       {
+               return 0; /* syntax error */
+       }
+       return 1;
+}
+
+static int devname_to_index(LinphoneCore *lc, const char *devname){
+       const char **p;
+       int i;
+       for(i=0,p=linphone_core_get_sound_devices(lc);*p!=NULL;++p,++i){
+               if (strcmp(devname,*p)==0) return i;
+       }
+       return -1;
+}
+
+static const char *index_to_devname(LinphoneCore *lc, int index){
+       const char **p;
+       int i;
+       for(i=0,p=linphone_core_get_sound_devices(lc);*p!=NULL;++p,++i){
+               if (i==index) return *p;
+       }
+       return NULL;
+}
+
+static int lpc_cmd_soundcard(LinphoneCore *lc, char *args)
+{
+       int i, index;
+       const char **dev;
+       char *arg1 = args;
+       char *arg2 = NULL;
+       char *ptr = args;
+
+       if (!args) return 0; /* syntax error */
+
+       /* Isolate first and second arg */
+       while(*ptr && !isspace(*ptr)) ++ptr;
+       if ( *ptr )
+       {
+               *ptr='\0';
+               arg2=ptr+1;
+               while(*arg2 && isspace(*arg2)) ++arg2;
+       }
+
+       if (strcmp(arg1, "list")==0)
+       {
+               dev=linphone_core_get_sound_devices(lc);
+               for(i=0; dev[i]!=NULL; ++i){
+                       linphonec_out("%i: %s\n",i,dev[i]);
+               }
+               return 1;
+       }
+
+       if (strcmp(arg1, "show")==0)
+       {
+               linphonec_out("Ringer device: %s\n",
+                       linphone_core_get_ringer_device(lc));
+               linphonec_out("Playback device: %s\n",
+                       linphone_core_get_playback_device(lc));
+               linphonec_out("Capture device: %s\n",
+                       linphone_core_get_capture_device(lc));
+               return 1;
+       }
+
+       if (strcmp(arg1, "use")==0 && arg2)
+       {
+               if (strcmp(arg2, "files")==0)
+               {
+                       linphonec_out("Using wav files instead of soundcard.\n");
+                       linphone_core_use_files(lc,TRUE);
+                       return 1;
+               }
+
+               dev=linphone_core_get_sound_devices(lc);
+               index=atoi(arg2); /* FIXME: handle not-a-number */
+               for(i=0;dev[i]!=NULL;i++)
+               {
+                       if (i!=index) continue;
+
+                       linphone_core_set_ringer_device(lc,dev[i]);
+                       linphone_core_set_playback_device(lc,dev[i]);
+                       linphone_core_set_capture_device(lc,dev[i]);
+                       linphonec_out("Using sound device %s\n",dev[i]);
+                       return 1;
+               }
+               linphonec_out("No such sound device\n");
+               return 1;
+       }
+       if (strcmp(arg1, "capture")==0)
+       {
+               const char *devname=linphone_core_get_capture_device(lc);
+               if (!arg2){
+                       linphonec_out("Using capture device #%i (%s)\n",
+                                       devname_to_index(lc,devname),devname);
+               }else{
+                       index=atoi(arg2); /* FIXME: handle not-a-number */
+                       devname=index_to_devname(lc,index);
+                       if (devname!=NULL){
+                               linphone_core_set_capture_device(lc,devname);
+                               linphonec_out("Using capture sound device %s\n",devname);
+                               return 1;
+                       }
+                       linphonec_out("No such sound device\n");
+               }
+               return 1;
+       }
+       if (strcmp(arg1, "playback")==0)
+       {
+               const char *devname=linphone_core_get_playback_device(lc);
+               if (!arg2){
+                       linphonec_out("Using playback device #%i (%s)\n",
+                                       devname_to_index(lc,devname),devname);
+               }else{
+                       index=atoi(arg2); /* FIXME: handle not-a-number */
+                       devname=index_to_devname(lc,index);
+                       if (devname!=NULL){
+                               linphone_core_set_playback_device(lc,devname);
+                               linphonec_out("Using playback sound device %s\n",devname);
+                               return 1;
+                       }
+                       linphonec_out("No such sound device\n");
+               }
+               return 1;
+       }
+       if (strcmp(arg1, "ring")==0)
+       {
+               const char *devname=linphone_core_get_ringer_device(lc);
+               if (!arg2){
+                       linphonec_out("Using ring device #%i (%s)\n",
+                                       devname_to_index(lc,devname),devname);
+               }else{
+                       index=atoi(arg2); /* FIXME: handle not-a-number */
+                       devname=index_to_devname(lc,index);
+                       if (devname!=NULL){
+                               linphone_core_set_ringer_device(lc,devname);
+                               linphonec_out("Using ring sound device %s\n",devname);
+                               return 1;
+                       }
+                       linphonec_out("No such sound device\n");
+               }
+               return 1;
+       }
+       return 0; /* syntax error */
+}
+
+/***************************************************************************
+ *
+ *  Commands helper functions
+ *
+ ***************************************************************************/
+
+
+static void
+linphonec_proxy_add(LinphoneCore *lc)
+{
+       bool_t enable_register=FALSE;
+       LinphoneProxyConfig *cfg;
+
+       linphonec_out("Adding new proxy setup. Hit ^D to abort.\n");
+
+       /*
+        * SIP Proxy address
+        */
+       while (1)
+       {
+               char *input=linphonec_readline("Enter proxy sip address: ");
+               char *clean;
+
+               if ( ! input ) {
+                       linphonec_out("Aborted.\n");
+                       return;
+               }
+
+               /* Strip blanks */
+               clean=lpc_strip_blanks(input);
+               if ( ! *clean ) {
+                       free(input);
+                       continue;
+               }
+
+               cfg=linphone_proxy_config_new();
+               if (linphone_proxy_config_set_server_addr(cfg,clean)<0)
+               {
+                       linphonec_out("Invalid sip address (sip:sip.domain.tld).\n");
+                       free(input);
+                       linphone_proxy_config_destroy(cfg);
+                       continue;
+               }
+               free(input);
+               break;
+       }
+
+       /*
+        * SIP Proxy identity
+        */
+       while (1)
+       {
+               char *input=linphonec_readline("Your identity for this proxy: ");
+               char *clean;
+
+               if ( ! input ) {
+                       linphonec_out("Aborted.\n");
+                       linphone_proxy_config_destroy(cfg);
+                       return;
+               }
+
+               /* Strip blanks */
+               clean=lpc_strip_blanks(input);
+               if ( ! *clean ) {
+                       free(input);
+                       continue;
+               }
+
+               linphone_proxy_config_set_identity(cfg, clean);
+               if ( ! cfg->reg_identity )
+               {
+                       linphonec_out("Invalid identity (sip:name@sip.domain.tld).\n");
+                       free(input);
+                       continue;
+               }
+               free(input);
+               break;
+       }
+
+       /*
+        * SIP Proxy enable register
+        */
+       while (1)
+       {
+               char *input=linphonec_readline("Do you want to register on this proxy (yes/no): ");
+               char *clean;
+
+               if ( ! input ) {
+                       linphonec_out("Aborted.\n");
+                       linphone_proxy_config_destroy(cfg);
+                       return;
+               }
+
+               /* Strip blanks */
+               clean=lpc_strip_blanks(input);
+               if ( ! *clean ) {
+                       free(input);
+                       continue;
+               }
+
+               if ( ! strcmp(clean, "yes") ) enable_register=TRUE;
+               else if ( ! strcmp(clean, "no") ) enable_register=FALSE;
+               else {
+                       linphonec_out("Please answer with 'yes' or 'no'\n");
+                       free(input);
+                       continue;
+               }
+               linphone_proxy_config_enableregister(cfg, enable_register);
+               free(input);
+               break;
+       }
+
+       /*
+        * SIP Proxy registration expiration
+        */
+       if ( enable_register==TRUE )
+       {
+               long int expires=0;
+               while (1)
+               {
+                       char *input=linphonec_readline("Specify register expiration time"
+                               " in seconds (default is 600): ");
+
+                       if ( ! input ) {
+                               linphonec_out("Aborted.\n");
+                               linphone_proxy_config_destroy(cfg);
+                               return;
+                       }
+
+                       expires=strtol(input, (char **)NULL, 10);
+                       if ( expires == LONG_MIN || expires == LONG_MAX )
+                       {
+                               linphonec_out("Invalid value: %s\n", strerror(errno));
+                               free(input);
+                               continue;
+                       }
+
+                       linphone_proxy_config_expires(cfg, expires);
+                       linphonec_out("Expiration: %d seconds\n", cfg->expires);
+
+                       free(input);
+                       break;
+               }
+       }
+
+       /*
+        * SIP proxy route
+        */
+       while (1)
+       {
+               char *input=linphonec_readline("Specify route if needed: ");
+               char *clean;
+
+               if ( ! input ) {
+                       linphonec_out("Aborted.\n");
+                       linphone_proxy_config_destroy(cfg);
+                       return;
+               }
+
+               /* Strip blanks */
+               clean=lpc_strip_blanks(input);
+               if ( ! *clean ) {
+                       free(input);
+                       linphonec_out("No route specified.\n");
+                       break;
+               }
+
+               linphone_proxy_config_set_route(cfg, clean);
+               if ( ! cfg->reg_route )
+               {
+                       linphonec_out("Invalid route.\n");
+                       free(input);
+                       continue;
+               }
+
+               free(input);
+               break;
+       }
+
+       /*
+        * Final confirmation 
+        */
+       while (1)
+       {
+               char *input;
+               char *clean;
+
+               linphonec_out("--------------------------------------------\n");
+               linphonec_proxy_display(cfg);
+               linphonec_out("--------------------------------------------\n");
+               input=linphonec_readline("Accept the above proxy configuration (yes/no) ?: ");
+
+
+               if ( ! input ) {
+                       linphonec_out("Aborted.\n");
+                       linphone_proxy_config_destroy(cfg);
+                       return;
+               }
+
+               /* Strip blanks */
+               clean=lpc_strip_blanks(input);
+               if ( ! *clean ) {
+                       free(input);
+                       continue;
+               }
+
+               if ( ! strcmp(clean, "yes") ) break;
+               else if ( ! strcmp(clean, "no") )
+               {
+                       linphonec_out("Declined.\n");
+                       linphone_proxy_config_destroy(cfg);
+                       free(input);
+                       return;
+               }
+
+               linphonec_out("Please answer with 'yes' or 'no'\n");
+               free(input);
+               continue;
+       }
+
+
+       linphone_core_add_proxy_config(lc,cfg);
+
+       /* automatically set the last entered proxy as the default one */
+       linphone_core_set_default_proxy(lc,cfg);
+
+       linphonec_out("Proxy added.\n");
+}
+
+static void
+linphonec_proxy_display(LinphoneProxyConfig *cfg)
+{
+       linphonec_out("sip address: %s\nroute: %s\nidentity: %s\nregister: %s\nexpires: %i\nregistered: %s\n",
+                       cfg->reg_proxy,
+                       (cfg->reg_route!=NULL)?cfg->reg_route:"",
+                       (cfg->reg_identity!=NULL)?cfg->reg_identity:"",
+                       (cfg->reg_sendregister)?"yes":"no",
+                       cfg->expires,
+                       linphone_proxy_config_is_registered(cfg) ? "yes" : "no");
+}
+
+static void linphonec_proxy_show(LinphoneCore *lc, int index)
+{
+       const MSList *elem;
+       int i;
+       for(elem=linphone_core_get_proxy_config_list(lc),i=0;elem!=NULL;elem=elem->next,++i){
+               if (index==i){
+                       LinphoneProxyConfig *cfg=(LinphoneProxyConfig *)elem->data;
+                       linphonec_proxy_display(cfg);
+                       return;
+               }
+       }
+       linphonec_out("No proxy with index %i\n", index);
+}
+
+static void
+linphonec_proxy_list(LinphoneCore *lc)
+{
+       const MSList *proxies;
+       int n;
+       int def=linphone_core_get_default_proxy(lc,NULL);
+       
+       proxies=linphone_core_get_proxy_config_list(lc);
+       for(n=0;proxies!=NULL;proxies=ms_list_next(proxies),n++){
+               if (n==def)
+                       linphonec_out("****** Proxy %i - this is the default one - *******\n",n);
+               else 
+                       linphonec_out("****** Proxy %i *******\n",n);
+               linphonec_proxy_display((LinphoneProxyConfig*)proxies->data);
+       }
+       if ( ! n ) linphonec_out("No proxies defined\n");
+}
+
+static void
+linphonec_proxy_remove(LinphoneCore *lc, int index)
+{
+       const MSList *proxies;
+       LinphoneProxyConfig *cfg;
+       proxies=linphone_core_get_proxy_config_list(lc);
+       cfg=(LinphoneProxyConfig*)ms_list_nth_data(proxies,index);
+       if (cfg==NULL){
+               linphonec_out("No such proxy.\n");
+               return;
+       }
+       linphone_core_remove_proxy_config(lc,cfg);
+       linphonec_out("Proxy %s removed.\n", cfg->reg_proxy);
+       linphone_proxy_config_destroy(cfg);
+}
+
+static int
+linphonec_proxy_use(LinphoneCore *lc, int index)
+{
+       const MSList *proxies;
+       LinphoneProxyConfig *cfg;
+       proxies=linphone_core_get_proxy_config_list(lc);
+       cfg=(LinphoneProxyConfig*)ms_list_nth_data(proxies,index);
+       if (cfg==NULL){
+               linphonec_out("No such proxy (try 'proxy list').");
+               return 0;
+       }
+       linphone_core_set_default_proxy(lc,cfg);
+       return 1;
+}
+
+static void
+linphonec_friend_display(LinphoneFriend *fr)
+{
+       LinphoneAddress *uri=linphone_address_clone(linphone_friend_get_uri(fr));
+       char *str;
+       
+       linphonec_out("name: %s\n", linphone_address_get_display_name(uri));
+       linphone_address_set_display_name(uri,NULL);
+       str=linphone_address_as_string(uri);
+       linphonec_out("address: %s\n", str);
+}
+
+static int
+linphonec_friend_list(LinphoneCore *lc, char *pat)
+{
+       const MSList *friend;
+       int n;
+
+       if (pat) {
+               pat=lpc_strip_blanks(pat);
+               if (!*pat) pat = NULL;
+       }
+
+       friend = linphone_core_get_friend_list(lc);
+       for(n=0; friend!=NULL; friend=ms_list_next(friend), ++n )
+       {
+               if ( pat ) {
+                       const char *name = linphone_address_get_display_name(
+                           linphone_friend_get_uri((LinphoneFriend*)friend->data));
+                       if (name && ! strstr(name, pat) ) continue;
+               }
+               linphonec_out("****** Friend %i *******\n",n);
+               linphonec_friend_display((LinphoneFriend*)friend->data);
+       }
+
+       return 1;
+}
+
+static int
+linphonec_friend_call(LinphoneCore *lc, unsigned int num)
+{
+       const MSList *friend = linphone_core_get_friend_list(lc);
+       unsigned int n;
+       char *addr;
+
+       for(n=0; friend!=NULL; friend=ms_list_next(friend), ++n )
+       {
+               if ( n == num )
+               {
+                       int ret;
+                       addr = linphone_address_as_string(linphone_friend_get_uri((LinphoneFriend*)friend->data));
+                       ret=lpc_cmd_call(lc, addr);
+                       ms_free(addr);
+                       return ret;
+               }
+       }
+       linphonec_out("No such friend %u\n", num);
+       return 1;
+}
+
+#ifndef WIN32
+static int
+linphonec_friend_add(LinphoneCore *lc, const char *name, const char *addr)
+{
+       LinphoneFriend *newFriend;
+
+       char url[PATH_MAX];
+
+       snprintf(url, PATH_MAX, "%s <%s>", name, addr);
+       newFriend = linphone_friend_new_with_addr(url);
+       linphone_core_add_friend(lc, newFriend);
+       return 0;
+}
+#endif
+
+static int
+linphonec_friend_delete(LinphoneCore *lc, int num)
+{
+       const MSList *friend = linphone_core_get_friend_list(lc);
+       unsigned int n;
+
+       for(n=0; friend!=NULL; friend=ms_list_next(friend), ++n )
+       {
+               if ( n == num )
+               {
+                       linphone_core_remove_friend(lc, friend->data);
+                       return 0;
+               }
+       }
+
+       if (-1 == num) 
+       {
+               unsigned int i;
+               for (i = 0 ; i < n ; i++)
+                       linphonec_friend_delete(lc, 0);
+               return 0;
+       }
+
+       linphonec_out("No such friend %u\n", num);
+       return 1;
+}
+
+static void
+linphonec_display_command_help(LPC_COMMAND *cmd)
+{
+       if ( cmd->doc ) linphonec_out ("%s\n", cmd->doc);
+       else linphonec_out("%s\n", cmd->help);
+}
+
+
+static int lpc_cmd_register(LinphoneCore *lc, char *args){
+       char identity[512];
+       char proxy[512];
+       char passwd[512];
+       LinphoneProxyConfig *cfg;
+       const MSList *elem;
+    if (!args) return 0;
+       passwd[0]=proxy[0]=identity[0]='\0';
+       sscanf(args,"%s %s %s",identity,proxy,passwd);
+       if (proxy[0]=='\0' || identity[0]=='\0'){
+               linphonec_out("Missing parameters, see help register\n");
+               return 1;
+       }
+       if (passwd[0]!='\0'){
+               osip_from_t *from;
+               LinphoneAuthInfo *info;
+               osip_from_init(&from);
+               if (osip_from_parse(from,identity)==0){
+                       char realm[128];
+                       snprintf(realm,sizeof(realm)-1,"\"%s\"",from->url->host);
+                       info=linphone_auth_info_new(from->url->username,NULL,passwd,NULL,NULL);
+                       linphone_core_add_auth_info(lc,info);
+               }
+               osip_from_free(from);
+       }
+       elem=linphone_core_get_proxy_config_list(lc);
+       if (elem) {
+               cfg=(LinphoneProxyConfig*)elem->data;
+               linphone_proxy_config_edit(cfg);
+       }
+       else cfg=linphone_proxy_config_new();
+       linphone_proxy_config_set_identity(cfg,identity);
+       linphone_proxy_config_set_server_addr(cfg,proxy);
+       linphone_proxy_config_enable_register(cfg,TRUE);
+       if (elem) linphone_proxy_config_done(cfg);
+       else linphone_core_add_proxy_config(lc,cfg);
+       linphone_core_set_default_proxy(lc,cfg);
+       return 1;
+}
+
+static int lpc_cmd_unregister(LinphoneCore *lc, char *args){
+       LinphoneProxyConfig *cfg=NULL;
+       linphone_core_get_default_proxy(lc,&cfg);
+       if (cfg && linphone_proxy_config_is_registered(cfg)) {
+               linphone_proxy_config_edit(cfg);
+               linphone_proxy_config_enable_register(cfg,FALSE);
+               linphone_proxy_config_done(cfg);
+       }else{
+               linphonec_out("unregistered\n");
+       }
+       return 1;
+}
+
+static int lpc_cmd_duration(LinphoneCore *lc, char *args){
+       LinphoneCallLog *cl;
+       const MSList *elem=linphone_core_get_call_logs(lc);
+       for(;elem!=NULL;elem=elem->next){
+               if (elem->next==NULL){
+                       cl=(LinphoneCallLog*)elem->data;
+                       linphonec_out("%i seconds\n",cl->duration);
+               }
+       }
+       return 1;
+}
+
+static int lpc_cmd_status(LinphoneCore *lc, char *args)
+{
+       LinphoneProxyConfig *cfg;
+       
+       if ( ! args ) return 0;
+       linphone_core_get_default_proxy(lc,&cfg);
+       if (strstr(args,"register"))
+       {
+               if (cfg)
+               {
+                       if (linphone_proxy_config_is_registered(cfg)){
+                               linphonec_out("registered, identity=%s duration=%i\n",
+                                       linphone_proxy_config_get_identity(cfg),
+                                       linphone_proxy_config_get_expires(cfg));
+                       }else if (linphone_proxy_config_register_enabled(cfg)){
+                               linphonec_out("registered=-1\n");
+                       }else linphonec_out("registered=0\n");
+               }
+               else linphonec_out("registered=0\n");
+       }
+       else if (strstr(args,"autoanswer"))
+       {
+               if (cfg && linphone_proxy_config_is_registered(cfg))
+                       linphonec_out("autoanswer=%i\n",linphonec_get_autoanswer());
+               else linphonec_out("unregistered\n");
+       }
+       else if (strstr(args,"hook"))
+       {
+               gstate_t call_state=linphone_core_get_state(lc,GSTATE_GROUP_CALL);
+/*
+               if (!cfg || !linphone_proxy_config_is_registered(cfg)){
+                       linphonec_out("unregistered\n");
+                       return 1;
+               }
+ */
+               switch(call_state){
+                       case GSTATE_CALL_OUT_INVITE:
+                               linphonec_out("hook=dialing\n");
+                       break;
+                       case GSTATE_CALL_IDLE:
+                               linphonec_out("hook=offhook\n");
+                       break;
+                       case GSTATE_CALL_OUT_CONNECTED:
+                               linphonec_out("Call out, hook=%s duration=%i\n", linphonec_get_callee(),
+                                       linphone_core_get_current_call_duration(lc));
+                       break;
+                       case GSTATE_CALL_IN_CONNECTED:
+                               linphonec_out("hook=answered duration=%i\n" ,
+                                       linphone_core_get_current_call_duration(lc));
+                               break;
+                       case GSTATE_CALL_IN_INVITE:
+                               linphonec_out("Incoming call from %s\n",linphonec_get_caller());
+                               break;
+                       default:
+                               break;
+               }
+               
+       }
+       else return 0;
+
+       return 1;
+}
+
+static int lpc_cmd_ports(LinphoneCore *lc, char *args)
+{
+       int port;
+       if ( ! args ){
+               linphonec_out("sip port = %i\naudio rtp port = %i\nvideo rtp port = %i\n",
+                       linphone_core_get_sip_port(lc),
+                       linphone_core_get_audio_port(lc),
+                       linphone_core_get_video_port(lc));
+               return 1;
+       }
+       if (sscanf(args,"sip %i",&port)==1){
+               linphonec_out("Setting sip port to %i\n",port);
+               linphone_core_set_sip_port(lc,port);
+       }else return 0;
+
+       return 1;
+}
+
+static int lpc_cmd_speak(LinphoneCore *lc, char *args){
+#ifndef WIN32
+       char voice[64];
+       char *sentence;
+       char cl[128];
+       char *wavfile;
+       int status;
+       FILE *file;
+    if (!args) return 0;
+       memset(voice,0,sizeof(voice));
+       sscanf(args,"%s63",voice);
+       sentence=args+strlen(voice);
+       wavfile=tempnam("/tmp/","linphonec-espeak-");
+       snprintf(cl,sizeof(cl),"espeak -v %s -s 100 -w %s --stdin",voice,wavfile);
+       file=popen(cl,"w");
+       if (file==NULL){
+               ms_error("Could not open pipe to espeak !");
+               return 1;
+       }
+       fprintf(file,"%s",sentence);
+       status=pclose(file);
+       if (WEXITSTATUS(status)==0){
+               linphone_core_set_play_file(lc,wavfile);
+       }else{
+               linphonec_out("espeak command failed.");
+       }
+#else
+       linphonec_out("Sorry, this command is not implemented in windows version.");
+#endif
+       return 1;
+}
+
+static int lpc_cmd_codec(LinphoneCore *lc, char *args){
+       char *arg1 = args;
+       char *arg2 = NULL;
+       char *ptr = args;
+
+       if (!args) return 0;
+
+       /* Isolate first and second arg */
+       while(*ptr && !isspace(*ptr)) ++ptr;
+       if ( *ptr )
+       {
+               *ptr='\0';
+               arg2=ptr+1;
+               while(*arg2 && isspace(*arg2)) ++arg2;
+       }
+
+       if (strcmp(arg1,"enable")==0)
+       {
+#ifdef HAVE_READLINE
+               rl_inhibit_completion=1;
+#endif
+        if (!strcmp(arg2,"all")) linphonec_codec_enable(lc,-1);
+        else linphonec_codec_enable(lc,atoi(arg2));
+#ifdef HAVE_READLINE
+               rl_inhibit_completion=0;
+#endif
+       }
+       else if (strcmp(arg1,"list")==0)
+       {
+               linphonec_codec_list(lc);
+       }
+       else if (strcmp(arg1,"disable")==0)
+       {
+        if (!strcmp(arg2,"all")) linphonec_codec_disable(lc,-1);
+        else linphonec_codec_disable(lc,atoi(arg2));
+       }
+       else
+       {
+               return 0; /* syntax error */
+       }
+
+       return 1;
+}
+
+static void linphonec_codec_list(LinphoneCore *lc){
+       PayloadType *pt;
+    codecs_config_t *config=&lc->codecs_conf;
+       int index=0;
+       MSList *node;
+       for(node=config->audio_codecs;node!=NULL;node=ms_list_next(node)){
+               pt=(PayloadType*)(node->data);
+        linphonec_out("%2d: %s (%d) %s\n", index, pt->mime_type, pt->clock_rate, payload_type_enabled(pt) ? "enabled" : "disabled");
+               index++;
+       }
+}
+
+static void linphonec_codec_enable(LinphoneCore *lc, int sel_index){
+       PayloadType *pt;
+    codecs_config_t *config=&lc->codecs_conf;
+       int index=0;
+       MSList *node;
+    for(node=config->audio_codecs;node!=NULL;node=ms_list_next(node)){
+        if (index == sel_index || sel_index == -1) {
+                   pt=(PayloadType*)(node->data);
+            pt->flags|=PAYLOAD_TYPE_ENABLED;
+            linphonec_out("%2d: %s (%d) %s\n", index, pt->mime_type, pt->clock_rate, "enabled");
+        }
+               index++;
+       }
+}
+
+static void linphonec_codec_disable(LinphoneCore *lc, int sel_index){
+       PayloadType *pt;
+    codecs_config_t *config=&lc->codecs_conf;
+       int index=0;
+       MSList *node;
+       for(node=config->audio_codecs;node!=NULL;node=ms_list_next(node)){
+        if (index == sel_index || sel_index == -1) {
+               pt=(PayloadType*)(node->data);
+            pt->flags&=~PAYLOAD_TYPE_ENABLED;
+            linphonec_out("%2d: %s (%d) %s\n", index, pt->mime_type, pt->clock_rate, "disabled");
+        }
+               index++;
+       }
+}
+
+static int lpc_cmd_echocancellation(LinphoneCore *lc, char *args){
+       char *arg1 = args;
+       char *arg2 = NULL;
+       char *ptr = args;
+
+       if (!args) return 0;
+
+       /* Isolate first and second arg */
+       while(*ptr && !isspace(*ptr)) ++ptr;
+       if ( *ptr )
+       {
+               *ptr='\0';
+               arg2=ptr+1;
+               while(*arg2 && isspace(*arg2)) ++arg2;
+       }
+
+       if (strcmp(arg1,"on")==0){
+        int delay, tail_len, frame_size;
+        int n;
+
+        linphone_core_enable_echo_cancellation(lc,1);
+
+        if (arg2 != 0) {
+            n = sscanf(arg2, "%d %d %d", &delay, &tail_len, &frame_size);
+
+            if (n == 1) {   
+                lp_config_set_int(lc->config,"sound","ec_delay",delay);
+            }
+            else if (n == 2) {
+                lp_config_set_int(lc->config,"sound","ec_delay",delay);
+                lp_config_set_int(lc->config,"sound","ec_tail_len",tail_len);
+            }
+            else if (n == 3) {
+                lp_config_set_int(lc->config,"sound","ec_delay",delay);
+                lp_config_set_int(lc->config,"sound","ec_tail_len",tail_len);
+                lp_config_set_int(lc->config,"sound","ec_framesize",frame_size);
+            }
+        }
+    }
+    else if (strcmp(arg1,"off")==0){
+        linphone_core_enable_echo_cancellation(lc,0);
+    }
+    else if (strcmp(arg1,"show")==0){
+        linphonec_out("echo cancellation is %s; delay %d, tail length %d, frame size %d\n", 
+            linphone_core_echo_cancellation_enabled(lc) ? "on" : "off",
+            lp_config_get_int(lc->config,"sound","ec_delay",0),
+            lp_config_get_int(lc->config,"sound","ec_tail_len",0),
+            lp_config_get_int(lc->config,"sound","ec_framesize",0));        
+    }
+    else {
+        return 0;
+    }
+
+    return 1;
+}
+
+/***************************************************************************
+ *
+ *  Command table management funx
+ *
+ ***************************************************************************/
+
+/*
+ * Find a command given its name
+ */
+static LPC_COMMAND *
+lpc_find_command(const char *name)
+{
+       int i;
+
+       for (i=0; commands[i].name; ++i)
+       {
+               if (strcmp(name, commands[i].name) == 0)
+                       return &commands[i];
+       }
+
+       return (LPC_COMMAND *)NULL;
+}
+
+
+/****************************************************************************
+ *
+ * $Log: commands.c,v $
+ * Revision 1.39  2008/07/03 15:08:34  smorlat
+ * api cleanups, interface in progress.
+ *
+ * Revision 1.38  2008/06/17 20:38:59  smorlat
+ * added missing file.
+ *
+ * Revision 1.37  2008/04/09 09:26:00  smorlat
+ * merge various patches
+ * H264 support.
+ *
+ * Revision 1.36  2007/08/01 14:47:53  strk
+ *         * console/commands.c: Clean up commands 'nat', 'stun'
+ *           and 'firewall' to be more intuitive.
+ *
+ * Revision 1.35  2007/06/27 09:01:25  smorlat
+ * logging improvements.
+ *
+ * Revision 1.34  2007/02/20 10:17:13  smorlat
+ * linphonec friends patch2
+ *
+ * Revision 1.31  2006/09/22 07:22:47  smorlat
+ * linphonecore api changes.
+ *
+ * Revision 1.30  2006/09/08 15:32:57  smorlat
+ * support for using files instead of soundcard (used by linphonec only)
+ *
+ * Revision 1.29  2006/08/28 14:29:07  smorlat
+ * fix bug.
+ *
+ * Revision 1.28  2006/08/21 12:49:59  smorlat
+ * merged several little patches.
+ *
+ * Revision 1.27  2006/07/17 18:45:00  smorlat
+ * support for several event queues in ortp.
+ * glib dependency removed from coreapi/ and console/
+ *
+ * Revision 1.26  2006/04/14 15:16:36  smorlat
+ * soundcard use did nothing !
+ *
+ * Revision 1.25  2006/04/06 20:09:33  smorlat
+ * add linphonec command to see and select sound devices.
+ *
+ * Revision 1.24  2006/03/04 11:17:10  smorlat
+ * mediastreamer2 in progress.
+ *
+ * Revision 1.23  2006/02/20 21:14:01  strk
+ * Handled syntax errors with 'friend' command
+ *
+ * Revision 1.22  2006/02/20 10:20:29  strk
+ * Added substring-based filter support for command 'friend list'
+ *
+ * Revision 1.21  2006/02/02 15:39:18  strk
+ * - Added 'friend list' and 'friend call' commands
+ * - Allowed for multiple DTFM send in a single line
+ * - Added status-specific callback (bare version)
+ *
+ * Revision 1.20  2006/01/26 11:54:34  strk
+ * More robust 'nat' command handler (strip blanks in args)
+ *
+ * Revision 1.19  2006/01/26 09:48:05  strk
+ * Added limits.h include
+ *
+ * Revision 1.18  2006/01/26 02:18:05  strk
+ * Added new commands 'nat use' and 'nat unuse'.
+ * These will required a pending patch to linphonecore.c
+ * in order to work.
+ *
+ * Revision 1.17  2006/01/20 14:12:33  strk
+ * Added linphonec_init() and linphonec_finish() functions.
+ * Handled SIGINT and SIGTERM to invoke linphonec_finish().
+ * Handling of auto-termination (-t) moved to linphonec_finish().
+ * Reworked main (input read) loop to not rely on 'terminate'
+ * and 'run' variable (dropped). configfile_name allocated on stack
+ * using PATH_MAX limit. Changed print_usage signature to allow
+ * for an exit_status specification.
+ *
+ * Revision 1.16  2006/01/18 09:25:32  strk
+ * Command completion inhibited in proxy addition and auth request prompts.
+ * Avoided use of linphonec_readline's internal filename completion.
+ *
+ * Revision 1.15  2006/01/14 13:29:32  strk
+ * Reworked commands interface to use a table structure,
+ * used by command line parser and help function.
+ * Implemented first level of completion (commands).
+ * Added notification of invalid "answer" and "terminate"
+ * commands (no incoming call, no active call).
+ * Forbidden "call" intialization when a call is already active.
+ * Cleaned up all commands, adding more feedback and error checks.
+ *
+ * Revision 1.14  2006/01/13 13:00:29  strk
+ * Added linphonec.h. Code layout change (added comments, forward decl,
+ * globals on top, copyright notices and Logs). Handled out-of-memory
+ * condition on history management. Removed assumption on sizeof(char).
+ * Fixed bug in authentication prompt (introduced by linphonec_readline).
+ * Added support for multiple authentication requests (up to MAX_PENDING_AUTH).
+ *
+ *
+ ****************************************************************************/
diff --git a/console/example/linphonec b/console/example/linphonec
new file mode 100644 (file)
index 0000000..a832f85
--- /dev/null
@@ -0,0 +1,51 @@
+# this file is used to store user config values for linphonec
+# please modify and copy it to ~/.linphonec
+#
+#
+
+logfile=~/linphonec.log
+debuglevel=0
+
+local_addr=192.168.1.10
+if_name=eth0
+# type of network connection 4 = ethernet
+con_type=4
+
+
+# rtp
+audio_rtp_port=7078
+jitt_comp=150
+
+
+# audio
+driver_mode=0
+rec_lev=100
+play_lev=100
+source=109
+autokill=0
+
+
+# sip
+sip_port=5060
+use_registrar=0
+username=1006
+hostname=192.168.1.1
+registrar=sip:192.168.1.1:5060
+reg_passwd=
+addr_of_rec=sip:1006@192.168.1.1
+reg_expires=900
+as_proxy=1
+as_redirect=0
+as_outbound=1
+
+
+# codecs
+audio_codecs=259 371 264 256 
+
+
+# short dial
+s0=sip:1002@130.83.176.121
+s1=sip:1001@192.168.1.1
+s2=sip:1002@192.168.1.1
+s3=sip:1003@192.168.1.1
+s4=sip:1004@192.168.1.1
diff --git a/console/linphonec.c b/console/linphonec.c
new file mode 100644 (file)
index 0000000..81fccea
--- /dev/null
@@ -0,0 +1,1430 @@
+/****************************************************************************
+ *
+ *  $Id: linphonec.c,v 1.57 2007/11/14 13:40:27 smorlat Exp $
+ *
+ *  Copyright (C) 2006  Sandro Santilli <strk@keybit.net>
+ *  Copyright (C) 2002  Florian Winterstein <flox@gmx.net>
+ *  Copyright (C) 2000  Simon MORLAT <simon.morlat@free.fr>
+ *
+****************************************************************************
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ ****************************************************************************/
+#include <string.h>
+#ifndef _WIN32_WCE
+#include <sys/time.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <errno.h>
+#include <signal.h>
+#include "private.h" /*coreapi/private.h, needed for LINPHONE_VERSION */
+#endif /*_WIN32_WCE*/
+#include <limits.h>
+#include <ctype.h>
+
+#include <linphonecore.h>
+
+#include "linphonec.h"
+
+#ifdef WIN32
+#include <ws2tcpip.h>
+#include <ctype.h>
+#ifndef _WIN32_WCE
+#include <conio.h>
+#endif /*_WIN32_WCE*/
+#else
+#include <sys/socket.h>
+#include <netdb.h>
+#include <sys/un.h>
+#include <sys/stat.h>
+#endif
+
+#if defined(_WIN32_WCE)
+
+#if !defined(PATH_MAX)
+#define PATH_MAX 256
+#endif /*PATH_MAX*/
+
+#if !defined(strdup)
+#define strdup _strdup
+#endif /*strdup*/
+
+#endif /*_WIN32_WCE*/
+
+#ifdef HAVE_GETTEXT
+#include <libintl.h>
+#ifndef _
+#define _(String) gettext(String)
+#endif
+#else
+#define _(something)   (something)
+#endif
+
+#ifndef PACKAGE_DIR
+#define PACKAGE_DIR ""
+#endif
+
+/***************************************************************************
+ *
+ *  Types
+ *
+ ***************************************************************************/
+
+typedef struct {
+       LinphoneAuthInfo *elem[MAX_PENDING_AUTH];
+       int nitems;
+} LPC_AUTH_STACK;
+
+/***************************************************************************
+ *
+ *  Forward declarations
+ *
+ ***************************************************************************/
+
+char *lpc_strip_blanks(char *input);
+
+static int handle_configfile_migration(void);
+#if !defined(_WIN32_WCE)
+static int copy_file(const char *from, const char *to);
+#endif /*_WIN32_WCE*/
+static int linphonec_parse_cmdline(int argc, char **argv);
+static int linphonec_init(int argc, char **argv);
+static int linphonec_main_loop (LinphoneCore * opm, char * sipAddr);
+static int linphonec_idle_call (void);
+#ifdef HAVE_READLINE
+static int linphonec_initialize_readline(void);
+static int linphonec_finish_readline();
+static char **linephonec_readline_completion(const char *text,
+       int start, int end);
+#endif
+
+/* These are callback for linphone core */
+static void linphonec_call_received(LinphoneCore *lc, const char *from);
+static void linphonec_prompt_for_auth(LinphoneCore *lc, const char *realm,
+       const char *username);
+static void linphonec_display_something (LinphoneCore * lc, const char *something);
+static void linphonec_display_url (LinphoneCore * lc, const char *something, const char *url);
+static void linphonec_display_warning (LinphoneCore * lc, const char *something);
+static void stub () {}
+static void linphonec_notify_received(LinphoneCore *lc,LinphoneFriend *fid,
+               const char *from, const char *status, const char *img);
+static void linphonec_new_unknown_subscriber(LinphoneCore *lc,
+               LinphoneFriend *lf, const char *url);
+static void linphonec_bye_received(LinphoneCore *lc, const char *from);
+static void linphonec_text_received(LinphoneCore *lc, LinphoneChatRoom *cr,
+               const char *from, const char *msg);
+static void linphonec_display_status (LinphoneCore * lc, const char *something);
+static void linphonec_general_state (LinphoneCore * lc, LinphoneGeneralState *gstate);
+static void linphonec_dtmf_received(LinphoneCore *lc, int dtmf);
+static void print_prompt(LinphoneCore *opm);
+/***************************************************************************
+ *
+ * Global variables
+ *
+ ***************************************************************************/
+
+LinphoneCore *linphonec;
+FILE *mylogfile;
+#ifdef HAVE_READLINE
+static char *histfile_name=NULL;
+static char last_in_history[256];
+#endif
+//auto answer (-a) option
+static bool_t auto_answer=FALSE;
+static bool_t answer_call=FALSE;
+static bool_t vcap_enabled=FALSE;
+static bool_t display_enabled=FALSE;
+static bool_t preview_enabled=FALSE;
+static bool_t show_general_state=FALSE;
+static bool_t unix_socket=FALSE;
+static bool_t linphonec_running=TRUE;
+LPC_AUTH_STACK auth_stack;
+static int trace_level = 0;
+static char *logfile_name = NULL;
+static char configfile_name[PATH_MAX];
+static char *sipAddr = NULL; /* for autocall */
+#if !defined(_WIN32_WCE)
+static ortp_pipe_t client_sock=ORTP_PIPE_INVALID;
+#endif /*_WIN32_WCE*/
+char prompt[PROMPT_MAX_LEN];
+#if !defined(_WIN32_WCE)
+static ortp_thread_t pipe_reader_th;
+static bool_t pipe_reader_run=FALSE;
+#endif /*_WIN32_WCE*/
+#if !defined(_WIN32_WCE)
+static ortp_pipe_t server_sock;
+#endif /*_WIN32_WCE*/
+
+
+LinphoneCoreVTable linphonec_vtable
+#if !defined (_MSC_VER)
+= {
+       .show =(ShowInterfaceCb) stub,
+       .inv_recv = linphonec_call_received,
+       .bye_recv = linphonec_bye_received,
+       .notify_recv = linphonec_notify_received,
+       .new_unknown_subscriber = linphonec_new_unknown_subscriber,
+       .auth_info_requested = linphonec_prompt_for_auth,
+       .display_status = linphonec_display_status,
+       .display_message=linphonec_display_something,
+#ifdef VINCENT_MAURY_RSVP
+       /* the yes/no dialog box */
+       .display_yes_no= (DisplayMessageCb) stub,
+#endif
+       .display_warning=linphonec_display_warning,
+       .display_url=linphonec_display_url,
+       .display_question=(DisplayQuestionCb)stub,
+       .text_received=linphonec_text_received,
+       .general_state=linphonec_general_state,
+       .dtmf_received=linphonec_dtmf_received
+}
+#endif /*_WIN32_WCE*/
+;
+
+
+
+/***************************************************************************
+ *
+ * Linphone core callbacks
+ *
+ ***************************************************************************/
+
+/*
+ * Linphone core callback
+ */
+static void
+linphonec_display_something (LinphoneCore * lc, const char *something)
+{
+       fprintf (stdout, "%s\n%s", something,prompt);
+       fflush(stdout);
+}
+
+/*
+ * Linphone core callback
+ */
+static void
+linphonec_display_status (LinphoneCore * lc, const char *something)
+{
+       fprintf (stdout, "%s\n%s", something,prompt);
+       fflush(stdout);
+}
+
+/*
+ * Linphone core callback
+ */
+static void
+linphonec_display_warning (LinphoneCore * lc, const char *something)
+{
+       fprintf (stdout, "Warning: %s\n%s", something,prompt);
+       fflush(stdout);
+}
+
+/*
+ * Linphone core callback
+ */
+static void
+linphonec_display_url (LinphoneCore * lc, const char *something, const char *url)
+{
+       fprintf (stdout, "%s : %s\n", something, url);
+}
+
+
+/*
+ * Linphone core callback
+ */
+static void
+linphonec_call_received(LinphoneCore *lc, const char *from)
+{
+       linphonec_set_caller(from);
+       if ( auto_answer)  {
+               answer_call=TRUE;
+       }
+}
+
+/*
+ * Linphone core callback
+ */
+static void
+linphonec_prompt_for_auth(LinphoneCore *lc, const char *realm, const char *username)
+{
+       /* no prompt possible when using pipes or tcp mode*/
+       if (unix_socket){
+               linphone_core_abort_authentication(lc,NULL);
+       }else{
+               LinphoneAuthInfo *pending_auth;
+
+               if ( auth_stack.nitems+1 > MAX_PENDING_AUTH )
+               {
+                       fprintf(stderr,
+                               "Can't accept another authentication request.\n"
+                               "Consider incrementing MAX_PENDING_AUTH macro.\n");
+                       return;
+               }
+
+               pending_auth=linphone_auth_info_new(username,NULL,NULL,NULL,realm);
+               auth_stack.elem[auth_stack.nitems++]=pending_auth;
+       }
+}
+
+/*
+ * Linphone core callback
+ */
+static void
+linphonec_notify_received(LinphoneCore *lc,LinphoneFriend *fid,
+               const char *from, const char *status, const char *img)
+{
+       printf("Friend %s is %s\n", from, status);
+       // todo: update Friend list state (unimplemented)
+}
+
+/*
+ * Linphone core callback
+ */
+static void
+linphonec_new_unknown_subscriber(LinphoneCore *lc, LinphoneFriend *lf,
+               const char *url)
+{
+       printf("Friend %s requested subscription "
+               "(accept/deny is not implemented yet)\n", url);
+       // This means that this person wishes to be notified
+       // of your presence information (online, busy, away...).
+
+}
+
+/*
+ * Linphone core callback
+ */
+static void
+linphonec_bye_received(LinphoneCore *lc, const char *from)
+{
+       // Should change prompt back to original maybe
+
+       // printing this is unneeded as we'd get a "Communication ended"
+       // message trough display_status callback anyway
+       //printf("Bye received from %s\n", from);
+}
+
+/*
+ * Linphone core callback
+ */
+static void
+linphonec_text_received(LinphoneCore *lc, LinphoneChatRoom *cr,
+               const char *from, const char *msg)
+{
+       printf("%s: %s\n", from, msg);
+       // TODO: provide mechanism for answering.. ('say' command?)
+}
+
+
+static void linphonec_dtmf_received(LinphoneCore *lc, int dtmf){
+       fprintf(stdout,"Receiving tone %c\n",dtmf);
+       fflush(stdout);
+}
+
+static void
+linphonec_general_state (LinphoneCore * lc, LinphoneGeneralState *gstate)
+{
+        if (show_general_state) {
+          switch(gstate->new_state) {
+           case GSTATE_POWER_OFF:
+             printf("GSTATE_POWER_OFF");
+             break;
+           case GSTATE_POWER_STARTUP:
+             printf("GSTATE_POWER_STARTUP");
+             break;
+           case GSTATE_POWER_ON:
+             printf("GSTATE_POWER_ON");
+             break;
+           case GSTATE_POWER_SHUTDOWN:
+             printf("GSTATE_POWER_SHUTDOWN");
+             break;
+           case GSTATE_REG_NONE:
+             printf("GSTATE_REG_NONE");
+             break;
+           case GSTATE_REG_OK:
+             printf("GSTATE_REG_OK");
+             break;
+           case GSTATE_REG_FAILED:
+             printf("GSTATE_REG_FAILED");
+             break;
+           case GSTATE_CALL_IDLE:
+             printf("GSTATE_CALL_IDLE");
+             break;
+           case GSTATE_CALL_OUT_INVITE:
+             printf("GSTATE_CALL_OUT_INVITE");
+             break;
+           case GSTATE_CALL_OUT_CONNECTED:
+             printf("GSTATE_CALL_OUT_CONNECTED");
+             break;
+           case GSTATE_CALL_IN_INVITE:
+             printf("GSTATE_CALL_IN_INVITE");
+             break;
+           case GSTATE_CALL_IN_CONNECTED:
+             printf("GSTATE_CALL_IN_CONNECTED");
+             break;
+           case GSTATE_CALL_END:
+             printf("GSTATE_CALL_END");
+             break;
+           case GSTATE_CALL_ERROR:
+             printf("GSTATE_CALL_ERROR");
+             break;
+           default:
+              printf("GSTATE_UNKNOWN_%d",gstate->new_state);
+          }
+          if (gstate->message) printf(" %s", gstate->message);
+          printf("\n");
+        }
+}
+
+static char received_prompt[PROMPT_MAX_LEN];
+static ms_mutex_t prompt_mutex;
+static bool_t have_prompt=FALSE;
+
+static void *prompt_reader_thread(void *arg){
+       char *ret;
+       char tmp[PROMPT_MAX_LEN];
+       while ((ret=fgets(tmp,sizeof(tmp),stdin))!=NULL){
+               ms_mutex_lock(&prompt_mutex);
+               strcpy(received_prompt,ret);
+               have_prompt=TRUE;
+               ms_mutex_unlock(&prompt_mutex);
+       }
+       return NULL;
+}
+
+static void start_prompt_reader(void){
+       ortp_thread_t th;
+       ms_mutex_init(&prompt_mutex,NULL);
+       ortp_thread_create(&th,NULL,prompt_reader_thread,NULL);
+}
+#if !defined(_WIN32_WCE)
+static ortp_pipe_t create_server_socket(void){
+       char path[128];
+#ifndef WIN32
+       snprintf(path,sizeof(path)-1,"linphonec-%i",getuid());
+#else
+       {
+               TCHAR username[128];
+               DWORD size=sizeof(username)-1;
+               GetUserName(username,&size);
+               snprintf(path,sizeof(path)-1,"linphonec-%s",username);
+       }
+#endif
+       return ortp_server_pipe_create(path);
+}
+
+
+static void *pipe_thread(void*p){
+       char tmp[250];
+       server_sock=create_server_socket();
+       if (server_sock==ORTP_PIPE_INVALID) return NULL;
+       while(pipe_reader_run){
+               while(client_sock!=ORTP_PIPE_INVALID){ /*sleep until the last command is finished*/
+#ifndef WIN32
+                       usleep(20000);
+#else
+                       Sleep(20);
+#endif
+               }
+               client_sock=ortp_server_pipe_accept_client(server_sock);
+               if (client_sock!=ORTP_PIPE_INVALID){
+                       int len;
+                       /*now read from the client */
+                       if ((len=ortp_pipe_read(client_sock,(uint8_t*)tmp,sizeof(tmp)-1))>0){
+                               ortp_mutex_lock(&prompt_mutex);
+                               tmp[len]='\0';
+                               strcpy(received_prompt,tmp);
+                               printf("Receiving command '%s'\n",received_prompt);fflush(stdout);
+                               have_prompt=TRUE;
+                               ortp_mutex_unlock(&prompt_mutex);
+                       }else{
+                               printf("read nothing\n");fflush(stdout);
+                               ortp_server_pipe_close_client(client_sock);
+                               client_sock=ORTP_PIPE_INVALID;
+                       }
+
+               }else{
+                       if (pipe_reader_run) fprintf(stderr,"accept() failed: %s\n",strerror(errno));
+               }
+       }
+       ms_message("Exiting pipe_reader_thread.");
+       fflush(stdout);
+       return NULL;
+}
+
+static void start_pipe_reader(void){
+       ms_mutex_init(&prompt_mutex,NULL);
+       pipe_reader_run=TRUE;
+       ortp_thread_create(&pipe_reader_th,NULL,pipe_thread,NULL);
+}
+
+static void stop_pipe_reader(void){
+       pipe_reader_run=FALSE;
+       linphonec_command_finished();
+       ortp_server_pipe_close(server_sock);
+       ortp_thread_join(pipe_reader_th,NULL);
+}
+#endif /*_WIN32_WCE*/
+
+#ifdef HAVE_READLINE
+#define BOOL_HAVE_READLINE 1
+#else
+#define BOOL_HAVE_READLINE 0
+#endif
+
+char *linphonec_readline(char *prompt){
+       if (unix_socket || !BOOL_HAVE_READLINE ){
+               static bool_t prompt_reader_started=FALSE;
+               static bool_t pipe_reader_started=FALSE;
+               if (!prompt_reader_started){
+                       start_prompt_reader();
+                       prompt_reader_started=TRUE;
+               }
+               if (unix_socket && !pipe_reader_started){
+#if !defined(_WIN32_WCE)
+                       start_pipe_reader();
+                       pipe_reader_started=TRUE;
+#endif /*_WIN32_WCE*/
+               }
+               fprintf(stdout,"%s",prompt);
+               fflush(stdout);
+               while(1){
+                       ms_mutex_lock(&prompt_mutex);
+                       if (have_prompt){
+                               char *ret=strdup(received_prompt);
+                               have_prompt=FALSE;
+                               ms_mutex_unlock(&prompt_mutex);
+                               return ret;
+                       }
+                       ms_mutex_unlock(&prompt_mutex);
+                       linphonec_idle_call();
+#ifdef WIN32
+                       Sleep(20);
+#else
+                       usleep(20000);
+#endif
+               }
+       }else{
+#ifdef HAVE_READLINE
+               return readline(prompt);
+#endif
+       }
+}
+
+void linphonec_out(const char *fmt,...){
+       char *res;
+       va_list args;
+       va_start (args, fmt);
+       res=ortp_strdup_vprintf(fmt,args);
+       va_end (args);
+       printf("%s",res);
+       fflush(stdout);
+#if !defined(_WIN32_WCE)
+       if (client_sock!=ORTP_PIPE_INVALID){
+               if (ortp_pipe_write(client_sock,(uint8_t*)res,strlen(res))==-1){
+                       fprintf(stderr,"Fail to send output via pipe: %s",strerror(errno));
+               }
+       }
+#endif /*_WIN32_WCE*/
+       ortp_free(res);
+}
+
+void linphonec_command_finished(void){
+#if !defined(_WIN32_WCE)
+       if (client_sock!=ORTP_PIPE_INVALID){
+               ortp_server_pipe_close_client(client_sock);
+               client_sock=ORTP_PIPE_INVALID;
+       }
+#endif /*_WIN32_WCE*/
+}
+
+void linphonec_set_autoanswer(bool_t enabled){
+       auto_answer=enabled;
+}
+
+bool_t linphonec_get_autoanswer(){
+       return auto_answer;
+}
+
+/***************************************************************************/
+/*
+ * Main
+ *
+ * Use globals:
+ *
+ *     - char *histfile_name
+ *     - FILE *mylogfile
+ */
+#if defined (_WIN32_WCE)
+
+char **convert_args_to_ascii(int argc, _TCHAR **wargv){
+       int i;
+       char **result=malloc(argc*sizeof(char*));
+       char argtmp[128];
+       for(i=0;i<argc;++i){
+               wcstombs(argtmp,wargv[i],sizeof(argtmp));
+               result[i]=strdup(argtmp);
+       }
+       return result;
+}
+
+int _tmain(int argc, _TCHAR* wargv[]) {
+       char **argv=convert_args_to_ascii(argc,wargv);
+       trace_level=6;
+       linphonec_vtable.show =(ShowInterfaceCb) stub;
+       linphonec_vtable.inv_recv = linphonec_call_received;
+       linphonec_vtable.bye_recv = linphonec_bye_received;
+       linphonec_vtable.notify_recv = linphonec_notify_received;
+       linphonec_vtable.new_unknown_subscriber = linphonec_new_unknown_subscriber;
+       linphonec_vtable.auth_info_requested = linphonec_prompt_for_auth;
+       linphonec_vtable.display_status = linphonec_display_status;
+       linphonec_vtable.display_message=linphonec_display_something;
+#ifdef VINCENT_MAURY_RSVP
+       /* the yes/no dialog box */
+       linphonec_vtable.display_yes_no= (DisplayMessageCb) stub;
+#endif
+       linphonec_vtable.display_warning=linphonec_display_warning;
+       linphonec_vtable.display_url=linphonec_display_url;
+       linphonec_vtable.display_question=(DisplayQuestionCb)stub;
+       linphonec_vtable.text_received=linphonec_text_received;
+       linphonec_vtable.general_state=linphonec_general_state;
+       linphonec_vtable.dtmf_received=linphonec_dtmf_received;
+
+#else
+int
+main (int argc, char *argv[]) {
+#endif
+
+
+       if (! linphonec_init(argc, argv) ) exit(EXIT_FAILURE);
+
+       linphonec_main_loop (linphonec, sipAddr);
+
+       linphonec_finish(EXIT_SUCCESS);
+
+       exit(EXIT_SUCCESS); /* should never reach here */
+}
+
+/*
+ * Initialize linphonec
+ */
+static int
+linphonec_init(int argc, char **argv)
+{
+
+       //g_mem_set_vtable(&dbgtable);
+
+       /*
+        * Set initial values for global variables
+        */
+       mylogfile = NULL;
+       
+       
+#ifndef _WIN32
+       snprintf(configfile_name, PATH_MAX, "%s/.linphonerc",
+                       getenv("HOME"));
+#elif defined(_WIN32_WCE)
+       strncpy(configfile_name,PACKAGE_DIR "\\linphonerc",PATH_MAX);
+       mylogfile=fopen(PACKAGE_DIR "\\" "linphonec.log","w");
+       printf("Logs are redirected in" PACKAGE_DIR "\\linphonec.log");
+#else
+       snprintf(configfile_name, PATH_MAX, "%s/Linphone/linphonerc",
+                       getenv("APPDATA"));
+#endif
+       /* Handle configuration filename changes */
+       switch (handle_configfile_migration())
+       {
+               case -1: /* error during file copies */
+                       fprintf(stderr,
+                               "Error in configuration file migration\n");
+                       break;
+
+               case 0: /* nothing done */
+               case 1: /* migrated */
+               default:
+                       break;
+       }
+
+#ifdef ENABLE_NLS
+       if (NULL == bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR))
+               perror ("bindtextdomain failed");
+#ifndef __ARM__
+       bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+#endif
+       textdomain (GETTEXT_PACKAGE);
+#else
+       printf ("NLS disabled.\n");
+#endif
+
+       linphonec_parse_cmdline(argc, argv);
+
+       if (trace_level > 0)
+       {
+               if (logfile_name != NULL)
+                       mylogfile = fopen (logfile_name, "w+");
+
+               if (mylogfile == NULL)
+               {
+                       mylogfile = stdout;
+                       fprintf (stderr,
+                                "INFO: no logfile, logging to stdout\n");
+               }
+               linphone_core_enable_logs(mylogfile);
+       }
+       else
+       {
+               linphone_core_disable_logs();
+       }
+       /*
+        * Initialize auth stack
+        */
+       auth_stack.nitems=0;
+
+       /*
+        * Initialize linphone core
+        */
+       linphonec=linphone_core_new (&linphonec_vtable, configfile_name, NULL,
+                           NULL);
+       linphone_core_enable_video(linphonec,vcap_enabled,display_enabled);
+       linphone_core_enable_video_preview(linphonec,preview_enabled);
+       if (!(vcap_enabled || display_enabled)) printf("Warning: video is disabled in linphonec, use -V or -C or -D to enable.\n");
+#ifdef HAVE_READLINE
+       /*
+        * Initialize readline
+        */
+       linphonec_initialize_readline();
+#endif
+#if !defined(_WIN32_WCE)
+       /*
+        * Initialize signal handlers
+        */
+       signal(SIGTERM, linphonec_finish);
+       signal(SIGINT, linphonec_finish);
+#endif /*_WIN32_WCE*/
+       return 1;
+}
+
+
+void linphonec_main_loop_exit(void){
+       linphonec_running=FALSE;
+}
+
+/*
+ * Close linphonec, cleanly terminating
+ * any pending call
+ */
+void
+linphonec_finish(int exit_status)
+{
+       printf("Terminating...\n");
+
+       /* Terminate any pending call */
+       linphonec_parse_command_line(linphonec, "terminate");
+       linphonec_command_finished();
+#ifdef HAVE_READLINE
+       linphonec_finish_readline();
+#endif
+#if !defined(_WIN32_WCE)
+       if (pipe_reader_run)
+               stop_pipe_reader();
+#endif /*_WIN32_WCE*/
+
+       linphone_core_destroy (linphonec);
+
+       if (mylogfile != NULL && mylogfile != stdout)
+       {
+               fclose (mylogfile);
+       }
+
+       exit(exit_status);
+
+}
+
+/*
+ * This is called from idle_call() whenever
+ * pending_auth != NULL.
+ *
+ * It prompts user for a password.
+ * Hitting ^D (EOF) would make this function
+ * return 0 (Cancel).
+ * Any other input would try to set linphone core
+ * auth_password for the pending_auth, add the auth_info
+ * and return 1.
+ */
+int
+linphonec_prompt_for_auth_final(LinphoneCore *lc)
+{
+       char *input, *iptr;
+       char auth_prompt[256];
+#ifdef HAVE_READLINE
+       rl_hook_func_t *old_event_hook;
+#endif
+       LinphoneAuthInfo *pending_auth=auth_stack.elem[auth_stack.nitems-1];
+
+       snprintf(auth_prompt, 256, "Password for %s on %s: ",
+               pending_auth->username, pending_auth->realm);
+
+       printf("\n");
+#ifdef HAVE_READLINE
+       /*
+        * Disable event hook to avoid entering an
+        * infinite loop. This would prevent idle_call
+        * from being called during authentication reads.
+        * Note that it might be undesiderable...
+        */
+       old_event_hook=rl_event_hook;
+       rl_event_hook=NULL;
+#endif
+
+       while (1)
+       {
+               input=linphonec_readline(auth_prompt);
+
+               /*
+                * If EOF (^D) is sent you probably don't want
+                * to provide an auth password... should give up
+                * the operation, but there's no mechanism to
+                * send this info back to caller currently...
+                */
+               if ( ! input )
+               {
+                       printf("Cancel requested, but not implemented.\n");
+                       continue;
+               }
+
+               /* Strip blanks */
+               iptr=lpc_strip_blanks(input);
+
+               /*
+                * Only blanks, continue asking
+                */
+               if ( ! *iptr )
+               {
+                       free(input);
+                       continue;
+               }
+
+               /* Something typed, let's try */
+               break;
+       }
+
+       /*
+        * No check is done here to ensure password is correct.
+        * I guess password will be asked again later.
+        */
+       linphone_auth_info_set_passwd(pending_auth, input);
+       linphone_core_add_auth_info(lc, pending_auth);
+       --(auth_stack.nitems);
+#ifdef HAVE_READLINE
+       /*
+        * Reset line_buffer, to avoid the password
+        * to be used again from outer readline
+        */
+       rl_line_buffer[0]='\0';
+       rl_event_hook=old_event_hook;
+#endif
+       return 1;
+}
+
+void
+print_usage (int exit_status)
+{
+       fprintf (stdout, "\n\
+usage: linphonec [-c file] [-s sipaddr] [-a] [-V] [-d level ] [-l logfile]\n\
+       linphonec -v\n\
+\n\
+  -c  file             specify path of configuration file.\n\
+  -d  level            be verbose. 0 is no output. 6 is all output\n\
+  -l  logfile          specify the log file for your SIP phone\n\
+  -s  sipaddress       specify the sip call to do at startup\n\
+  -a                   enable auto answering for incoming calls\n\
+  -V                   enable video features globally (disabled by default)\n\
+  -C                   enable video capture only (disabled by default)\n\
+  -D                   enable video display only (disabled by default)\n\
+  -S                   show general state messages (disabled by default)\n\
+  -v or --version      display version and exits.\n");
+
+       exit(exit_status);
+}
+
+
+/*
+ *
+ * Called every second from main read loop.
+ *
+ * Will use the following globals:
+ *
+ *  - LinphoneCore linphonec
+ *  - LPC_AUTH_STACK auth_stack;
+ *
+ */
+static int
+linphonec_idle_call ()
+{
+       LinphoneCore *opm=linphonec;
+
+       /* Uncomment the following to verify being called */
+       /* printf(".\n"); */
+
+       linphone_core_iterate(opm);
+       if (answer_call){
+               fprintf (stdout, "-------auto answering to call-------\n" );
+               linphone_core_accept_call(opm,NULL);
+               answer_call=FALSE;
+       }
+
+       if ( auth_stack.nitems )
+       {
+               /*
+                * Inhibit command completion
+                * during password prompts
+                */
+#ifdef HAVE_READLINE
+               rl_inhibit_completion=1;
+#endif
+               linphonec_prompt_for_auth_final(opm);
+#ifdef HAVE_READLINE
+               rl_inhibit_completion=0;
+#endif
+       }
+
+       return 0;
+}
+
+#ifdef HAVE_READLINE
+/*
+ * Use globals:
+ *
+ *     - char *histfile_name (also sets this)
+ *      - char *last_in_history (allocates it)
+ */
+static int
+linphonec_initialize_readline()
+{
+       /*rl_bind_key('\t', rl_insert);*/
+
+       /* Allow conditional parsing of ~/.inputrc */
+       rl_readline_name = "linphonec";
+
+       /* Call idle_call() every second */
+       rl_set_keyboard_input_timeout(LPC_READLINE_TIMEOUT);
+       rl_event_hook=linphonec_idle_call;
+
+       /* Set history file and read it */
+       histfile_name = ms_strdup_printf ("%s/.linphonec_history",
+               getenv("HOME"));
+       read_history(histfile_name);
+
+       /* Initialized last_in_history cache*/
+       last_in_history[0] = '\0';
+
+       /* Register a completion function */
+       rl_attempted_completion_function = linephonec_readline_completion;
+
+       /* printf("Readline initialized.\n"); */
+        setlinebuf(stdout);
+       return 0;
+}
+
+/*
+ * Uses globals:
+ *
+ *     - char *histfile_name (writes history to file and frees it)
+ *     - char *last_in_history (frees it)
+ *
+ */
+static int
+linphonec_finish_readline()
+{
+
+       stifle_history(HISTSIZE);
+       write_history(histfile_name);
+       free(histfile_name);
+       histfile_name=NULL;
+       return 0;
+}
+
+#endif
+
+static void print_prompt(LinphoneCore *opm){
+#ifdef IDENTITY_AS_PROMPT
+       snprintf(prompt, PROMPT_MAX_LEN, "%s> ",
+               linphone_core_get_primary_contact(opm));
+#else
+       snprintf(prompt, PROMPT_MAX_LEN, "linphonec> ");
+#endif
+}
+
+static int
+linphonec_main_loop (LinphoneCore * opm, char * sipAddr)
+{
+       char buf[LINE_MAX_LEN]; /* auto call handling */
+       char *input;
+
+       print_prompt(opm);
+
+
+       /* auto call handling */
+       if (sipAddr != NULL )
+       {
+               snprintf (buf, sizeof(buf),"call %s", sipAddr);
+               linphonec_parse_command_line(linphonec, buf);
+       }
+
+       while (linphonec_running && (input=linphonec_readline(prompt)))
+       {
+               char *iptr; /* input and input pointer */
+               size_t input_len;
+
+               /* Strip blanks */
+               iptr=lpc_strip_blanks(input);
+
+               input_len = strlen(iptr);
+
+               /*
+                * Do nothing but release memory
+                * if only blanks are read
+                */
+               if ( ! input_len )
+               {
+                       free(input);
+                       continue;
+               }
+
+#ifdef HAVE_READLINE
+               /*
+                * Only add to history if not already
+                * last item in it, and only if the command
+                * doesn't start with a space (to allow for
+                * hiding passwords)
+                */
+               if ( iptr == input && strcmp(last_in_history, iptr) )
+               {
+                       strncpy(last_in_history,iptr,sizeof(last_in_history));
+                       last_in_history[sizeof(last_in_history)-1]='\0';
+                       add_history(iptr);
+               }
+#endif
+
+               linphonec_parse_command_line(linphonec, iptr);
+               linphonec_command_finished();
+               free(input);
+       }
+
+       return 0;
+}
+
+/*
+ *  Parse command line switches
+ *
+ *  Use globals:
+ *
+ *     - int trace_level
+ *     - char *logfile_name
+ *     - char *configfile_name
+ *     - char *sipAddr
+ */
+static int
+linphonec_parse_cmdline(int argc, char **argv)
+{
+       int arg_num=1;
+
+       while (arg_num < argc)
+       {
+               int old_arg_num = arg_num;
+               if (strncmp ("-d", argv[arg_num], 2) == 0)
+               {
+                       arg_num++;
+                       if (arg_num < argc)
+                               trace_level = atoi (argv[arg_num]);
+                       else
+                               trace_level = 1;
+               }
+               else if (strncmp ("-l", argv[arg_num], 2) == 0)
+               {
+                       arg_num++;
+                       if (arg_num < argc)
+                               logfile_name = argv[arg_num];
+               }
+               else if (strncmp ("-c", argv[arg_num], 2) == 0)
+               {
+                       if ( ++arg_num >= argc ) print_usage(EXIT_FAILURE);
+#if !defined(_WIN32_WCE)
+                       if (access(argv[arg_num],F_OK)!=0 )
+                       {
+                               fprintf (stderr,
+                                       "Cannot open config file %s.\n",
+                                        argv[arg_num]);
+                               exit(EXIT_FAILURE);
+                       }
+#endif /*_WIN32_WCE*/
+                       snprintf(configfile_name, PATH_MAX, "%s", argv[arg_num]);
+               }
+               else if (strncmp ("-s", argv[arg_num], 2) == 0)
+               {
+                       arg_num++;
+                       if (arg_num < argc)
+                               sipAddr = argv[arg_num];
+               }
+                else if (strncmp ("-a", argv[arg_num], 2) == 0)
+                {
+                        auto_answer = TRUE;
+                }
+               else if (strncmp ("-C", argv[arg_num], 2) == 0)
+                {
+                        vcap_enabled = TRUE;
+                }
+               else if (strncmp ("-D", argv[arg_num], 2) == 0)
+                {
+                        display_enabled = TRUE;
+                }
+               else if (strncmp ("-V", argv[arg_num], 2) == 0)
+                {
+                        display_enabled = TRUE;
+                       vcap_enabled = TRUE;
+                       preview_enabled=TRUE;
+                }
+               else if ((strncmp ("-v", argv[arg_num], 2) == 0)
+                        ||
+                        (strncmp
+                         ("--version", argv[arg_num],
+                          strlen ("--version")) == 0))
+               {
+#if !defined(_WIN32_WCE)
+                       printf ("version: " LINPHONE_VERSION "\n");
+#endif
+                       exit (EXIT_SUCCESS);
+               }
+               else if (strncmp ("-S", argv[arg_num], 2) == 0)
+               {
+                       show_general_state = TRUE;
+               }
+               else if (strncmp ("--pipe", argv[arg_num], 6) == 0)
+               {
+                       unix_socket=1;
+               }
+               else if (old_arg_num == arg_num)
+               {
+                       fprintf (stderr, "ERROR: bad arguments\n");
+                       print_usage (EXIT_FAILURE);
+               }
+               arg_num++;
+       }
+
+       return 1;
+}
+
+/*
+ * Up to version 1.2.1 linphone used ~/.linphonec for
+ * CLI and ~/.gnome2/linphone for GUI as configuration file.
+ * In newer version both interfaces will use ~/.linphonerc.
+ *
+ * This function helps transparently migrating from one
+ * to the other layout using the following heuristic:
+ *
+ *     IF new_config EXISTS => do nothing
+ *     ELSE IF old_cli_config EXISTS => copy to new_config
+ *     ELSE IF old_gui_config EXISTS => copy to new_config
+ *
+ * Returns:
+ *      0 if it did nothing
+ *      1 if it migrated successfully
+ *     -1 on error
+ */
+static int
+handle_configfile_migration()
+{
+#if !defined(_WIN32_WCE)
+       char *old_cfg_gui;
+       char *old_cfg_cli;
+       char *new_cfg;
+#if !defined(_WIN32_WCE)
+       const char *home = getenv("HOME");
+#else
+       const char *home = ".";
+#endif /*_WIN32_WCE*/
+       new_cfg = ms_strdup_printf("%s/.linphonerc", home);
+
+       /*
+        * If the *NEW* configuration already exists
+        * do nothing.
+        */
+       if (access(new_cfg,F_OK)==0)
+       {
+               free(new_cfg);
+               return 0;
+       }
+
+       old_cfg_cli = ms_strdup_printf("%s/.linphonec", home);
+
+       /*
+        * If the *OLD* CLI configurations exist copy it to
+        * the new file and make it a symlink.
+        */
+       if (access(old_cfg_cli, F_OK)==0)
+       {
+               if ( ! copy_file(old_cfg_cli, new_cfg) )
+               {
+                       free(old_cfg_cli);
+                       free(new_cfg);
+                       return -1;
+               }
+               printf("%s copied to %s\n", old_cfg_cli, new_cfg);
+               free(old_cfg_cli);
+               free(new_cfg);
+               return 1;
+       }
+
+       free(old_cfg_cli);
+       old_cfg_gui = ms_strdup_printf("%s/.gnome2/linphone", home);
+
+       /*
+        * If the *OLD* GUI configurations exist copy it to
+        * the new file and make it a symlink.
+        */
+       if (access(old_cfg_gui, F_OK)==0)
+       {
+               if ( ! copy_file(old_cfg_gui, new_cfg) )
+               {
+                       exit(EXIT_FAILURE);
+                       free(old_cfg_gui);
+                       free(new_cfg);
+                       return -1;
+               }
+               printf("%s copied to %s\n", old_cfg_gui, new_cfg);
+               free(old_cfg_gui);
+               free(new_cfg);
+               return 1;
+       }
+
+       free(old_cfg_gui);
+       free(new_cfg);
+#endif /*_WIN32_WCE*/
+       return 0;
+}
+#if !defined(_WIN32_WCE)
+/*
+ * Copy file "from" to file "to".
+ * Destination file is truncated if existing.
+ * Return 1 on success, 0 on error (printing an error).
+ */
+static int
+copy_file(const char *from, const char *to)
+{
+       char message[256];
+       FILE *in, *out;
+       char buf[256];
+       size_t n;
+
+       /* Open "from" file for reading */
+       in=fopen(from, "r");
+       if ( in == NULL )
+       {
+               snprintf(message, 255, "Can't open %s for reading: %s\n",
+                       from, strerror(errno));
+               fprintf(stderr, "%s", message);
+               return 0;
+       }
+
+       /* Open "to" file for writing (will truncate existing files) */
+       out=fopen(to, "w");
+       if ( out == NULL )
+       {
+               snprintf(message, 255, "Can't open %s for writing: %s\n",
+                       to, strerror(errno));
+               fprintf(stderr, "%s", message);
+               return 0;
+       }
+
+       /* Copy data from "in" to "out" */
+       while ( (n=fread(buf, 1, sizeof buf, in)) > 0 )
+       {
+               if ( ! fwrite(buf, 1, n, out) )
+               {
+                       return 0;
+               }
+       }
+
+       fclose(in);
+       fclose(out);
+
+       return 1;
+}
+#endif /*_WIN32_WCE*/
+
+#ifdef HAVE_READLINE
+static char **
+linephonec_readline_completion(const char *text, int start, int end)
+{
+       char **matches = NULL;
+
+       /*
+        * Prevent readline from falling
+        * back to filename-completion
+        */
+       rl_attempted_completion_over=1;
+
+       /*
+        * If this is the start of line we complete with commands
+        */
+       if ( ! start )
+       {
+               return rl_completion_matches(text, linphonec_command_generator);
+       }
+
+       /*
+        * Otherwise, we should peek at command name
+        * or context to implement a smart completion.
+        * For example: "call .." could return
+        * friends' sip-uri as matches
+        */
+
+       return matches;
+}
+
+#endif
+
+/*
+ * Strip blanks from a string.
+ * Return a pointer into the provided string.
+ * Modifies input adding a NULL at first
+ * of trailing blanks.
+ */
+char *
+lpc_strip_blanks(char *input)
+{
+       char *iptr;
+
+       /* Find first non-blank */
+       while(*input && isspace(*input)) ++input;
+
+       /* Find last non-blank */
+       iptr=input+strlen(input);
+       if (iptr > input) {
+               while(isspace(*--iptr));
+               *(iptr+1)='\0';
+       }
+
+       return input;
+}
+
+/****************************************************************************
+ *
+ * $Log: linphonec.c,v $
+ * Revision 1.57  2007/11/14 13:40:27  smorlat
+ * fix --disable-video build.
+ *
+ * Revision 1.56  2007/09/26 14:07:27  fixkowalski
+ * - ANSI/C++ compilation issues with non-GCC compilers
+ * - Faster epm-based packaging
+ * - Ability to build & run on FC6's eXosip/osip
+ *
+ * Revision 1.55  2007/09/24 16:01:58  smorlat
+ * fix bugs.
+ *
+ * Revision 1.54  2007/08/22 14:06:11  smorlat
+ * authentication bugs fixed.
+ *
+ * Revision 1.53  2007/02/13 21:31:01  smorlat
+ * added patch for general state.
+ * new doxygen for oRTP
+ * gtk-doc removed.
+ *
+ * Revision 1.52  2007/01/10 14:11:24  smorlat
+ * add --video to linphonec.
+ *
+ * Revision 1.51  2006/08/21 12:49:59  smorlat
+ * merged several little patches.
+ *
+ * Revision 1.50  2006/07/26 08:17:28  smorlat
+ * fix bugs.
+ *
+ * Revision 1.49  2006/07/17 18:45:00  smorlat
+ * support for several event queues in ortp.
+ * glib dependency removed from coreapi/ and console/
+ *
+ * Revision 1.48  2006/04/09 12:45:32  smorlat
+ * linphonec improvements.
+ *
+ * Revision 1.47  2006/04/04 08:04:34  smorlat
+ * switched to mediastreamer2, most bugs fixed.
+ *
+ * Revision 1.46  2006/03/16 17:17:40  smorlat
+ * fix various bugs.
+ *
+ * Revision 1.45  2006/03/12 21:48:31  smorlat
+ * gcc-2.95 compile error fixed.
+ * mediastreamer2 in progress
+ *
+ * Revision 1.44  2006/03/04 11:17:10  smorlat
+ * mediastreamer2 in progress.
+ *
+ * Revision 1.43  2006/02/13 09:50:50  strk
+ * fixed unused variable warning.
+ *
+ * Revision 1.42  2006/02/02 15:39:18  strk
+ * - Added 'friend list' and 'friend call' commands
+ * - Allowed for multiple DTFM send in a single line
+ * - Added status-specific callback (bare version)
+ *
+ * Revision 1.41  2006/02/02 13:30:05  strk
+ * - Padded vtable with missing callbacks
+ *   (fixing a segfault on friends subscription)
+ * - Handled friends notify (bare version)
+ * - Handled text messages receive (bare version)
+ * - Printed message on subscription request (bare version)
+ *
+ * Revision 1.40  2006/01/26 09:48:05  strk
+ * Added limits.h include
+ *
+ * Revision 1.39  2006/01/26 02:11:01  strk
+ * Removed unused variables, fixed copyright date
+ *
+ * Revision 1.38  2006/01/25 18:33:02  strk
+ * Removed the -t swich, terminate_on_close made the default behaviour
+ *
+ * Revision 1.37  2006/01/20 14:12:34  strk
+ * Added linphonec_init() and linphonec_finish() functions.
+ * Handled SIGINT and SIGTERM to invoke linphonec_finish().
+ * Handling of auto-termination (-t) moved to linphonec_finish().
+ * Reworked main (input read) loop to not rely on 'terminate'
+ * and 'run' variable (dropped). configfile_name allocated on stack
+ * using PATH_MAX limit. Changed print_usage signature to allow
+ * for an exit_status specification.
+ *
+ * Revision 1.36  2006/01/18 09:25:32  strk
+ * Command completion inhibited in proxy addition and auth request prompts.
+ * Avoided use of readline's internal filename completion.
+ *
+ * Revision 1.35  2006/01/14 13:29:32  strk
+ * Reworked commands interface to use a table structure,
+ * used by command line parser and help function.
+ * Implemented first level of completion (commands).
+ * Added notification of invalid "answer" and "terminate"
+ * commands (no incoming call, no active call).
+ * Forbidden "call" intialization when a call is already active.
+ * Cleaned up all commands, adding more feedback and error checks.
+ *
+ * Revision 1.34  2006/01/13 13:00:29  strk
+ * Added linphonec.h. Code layout change (added comments, forward decl,
+ * globals on top, copyright notices and Logs). Handled out-of-memory
+ * condition on history management. Removed assumption on sizeof(char).
+ * Fixed bug in authentication prompt (introduced by readline).
+ * Added support for multiple authentication requests (up to MAX_PENDING_AUTH).
+ *
+ *
+ ****************************************************************************/
+
diff --git a/console/linphonec.h b/console/linphonec.h
new file mode 100644 (file)
index 0000000..732c99a
--- /dev/null
@@ -0,0 +1,147 @@
+/****************************************************************************
+ *
+ *  $Id: linphonec.h,v 1.3 2006/01/20 14:12:34 strk Exp $
+ *
+ *  Copyright (C) 2005  Sandro Santilli <strk@keybit.net>
+ *
+ ****************************************************************************
+ *
+ *  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 Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ ****************************************************************************/
+
+#ifndef LINPHONEC_H
+#define LINPHONEC_H 1
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#ifdef HAVE_READLINE_H
+#include <readline.h>
+#define HAVE_READLINE
+#else
+#ifdef HAVE_READLINE_READLINE_H
+#include <readline/readline.h>
+#define HAVE_READLINE
+#endif
+#endif
+#ifdef HAVE_HISTORY_H
+#include <history.h>
+#else
+#ifdef HAVE_READLINE_HISTORY_H
+#include <readline/history.h>
+#endif
+#endif
+
+
+/**************************************************************************
+ *
+ * Compile-time defines
+ *
+ **************************************************************************/
+
+#define HISTSIZE 500           /* how many lines of input history */
+#define PROMPT_MAX_LEN 256     /* max len of prompt string */
+#define LINE_MAX_LEN 256       /* really needed ? */
+
+/*
+ * Define this to have your primary contact
+ * as the prompt string
+ */
+/* #define IDENTITY_AS_PROMPT 1 */
+
+/*
+ * Time between calls to linphonec_idle_call during main
+ * input read loop in microseconds.
+ */
+#define LPC_READLINE_TIMEOUT 1000000
+
+/*
+ * Filename of linphonec history
+ */
+#define LPC_HIST_FILE "~/.linphonec_history"
+
+/*
+ * Maximum number of pending authentications
+ */
+#define MAX_PENDING_AUTH 8
+
+/**************************************************************************
+ *
+ *  Types
+ *
+ **************************************************************************/
+
+/*
+ * A structure which contains information on the commands this program
+ * can understand.
+ */
+typedef int (*lpc_cmd_handler)(LinphoneCore *, char *);
+typedef struct {
+       char *name;             /* User printable name of the function. */
+       lpc_cmd_handler func;   /* Function to call to do the job. */
+       char *help;             /* Short help for this function.  */
+       char *doc;              /* Long description.  */
+} LPC_COMMAND;
+
+/***************************************************************************
+ *
+ *  Forward declarations
+ *
+ ***************************************************************************/
+
+extern int linphonec_parse_command_line(LinphoneCore *lc, char *cl);
+extern char *linphonec_command_generator(const char *text, int state);
+void linphonec_main_loop_exit();
+extern void linphonec_finish(int exit_status);
+extern char *linphonec_readline(char *prompt);
+void linphonec_set_autoanswer(bool_t enabled);
+bool_t linphonec_get_autoanswer();
+void linphonec_command_finished(void);
+void linphonec_set_caller(const char *caller);
+
+#endif /* def LINPHONEC_H */
+
+/****************************************************************************
+ *
+ * $Log: linphonec.h,v $
+ * Revision 1.3  2006/01/20 14:12:34  strk
+ * Added linphonec_init() and linphonec_finish() functions.
+ * Handled SIGINT and SIGTERM to invoke linphonec_finish().
+ * Handling of auto-termination (-t) moved to linphonec_finish().
+ * Reworked main (input read) loop to not rely on 'terminate'
+ * and 'run' variable (dropped). configfile_name allocated on stack
+ * using PATH_MAX limit. Changed print_usage signature to allow
+ * for an exit_status specification.
+ *
+ * Revision 1.2  2006/01/14 13:29:32  strk
+ * Reworked commands interface to use a table structure,
+ * used by command line parser and help function.
+ * Implemented first level of completion (commands).
+ * Added notification of invalid "answer" and "terminate"
+ * commands (no incoming call, no active call).
+ * Forbidden "call" intialization when a call is already active.
+ * Cleaned up all commands, adding more feedback and error checks.
+ *
+ * Revision 1.1  2006/01/13 13:00:29  strk
+ * Added linphonec.h. Code layout change (added comments, forward decl,
+ * globals on top, copyright notices and Logs). Handled out-of-memory
+ * condition on history management. Removed assumption on sizeof(char).
+ * Fixed bug in authentication prompt (introduced by readline).
+ * Added support for multiple authentication requests (up to MAX_PENDING_AUTH).
+ *
+ *
+ ****************************************************************************/
diff --git a/console/shell.c b/console/shell.c
new file mode 100644 (file)
index 0000000..0f09064
--- /dev/null
@@ -0,0 +1,353 @@
+/****************************************************************************
+ *  Copyright (C) 2009  Simon MORLAT <simon.morlat@linphone.org>
+ *
+ ****************************************************************************
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ ****************************************************************************/
+
+
+#include <stdio.h>
+#include <stdlib.h>
+
+
+#ifdef WIN32
+#include <windows.h>
+#include <winbase.h>
+#include <ws2tcpip.h>
+#include <ctype.h>
+#include <conio.h>
+#else
+#include <sys/socket.h>
+#include <netdb.h>
+#include <sys/un.h>
+
+#endif
+
+#include "ortp/ortp.h"
+
+#define DEFAULT_REPLY_SIZE 4096
+
+#define STATUS_REGISTERED (1<<0)
+#define STATUS_REGISTERING (1<<1)
+#define STATUS_DIALING (1<<2)
+#define STATUS_AUTOANSWER (1<<3)
+#define STATUS_IN_CONNECTED (1<<4) /* incoming call accepted */
+#define STATUS_OUT_CONNECTED (1<<5) /*outgoing call accepted */
+
+
+static int make_status_value(const char *status_string){
+       int ret=0;
+       if (strstr(status_string,"registered, identity=")){
+               ret|=STATUS_REGISTERED;
+       }
+       if (strstr(status_string,"registered=-1")){
+               ret|=STATUS_REGISTERING;
+       }
+       if (strstr(status_string,"autoanswer=1")){
+               ret|=STATUS_AUTOANSWER;
+       }
+       if (strstr(status_string,"dialing")){
+               ret|=STATUS_DIALING;
+       }
+       if (strstr(status_string,"Call out")){
+               ret|=STATUS_OUT_CONNECTED;
+       }
+       if (strstr(status_string,"hook=answered")){
+               ret|=STATUS_IN_CONNECTED;
+       }
+       return ret;
+}
+
+static int send_command(const char *command, char *reply, int reply_len, int print_errors){
+       ortp_pipe_t pp;
+       int i;
+       int err;
+       char path[128];
+#ifndef WIN32
+       snprintf(path,sizeof(path)-1,"linphonec-%i",getuid());
+#else
+       {
+               char username[128];
+               DWORD size=sizeof(username)-1;
+               GetUserName(username,&size);
+               snprintf(path,sizeof(path)-1,"linphonec-%s",username);
+       }
+#endif
+       if ((pp=ortp_client_pipe_connect(path))==ORTP_PIPE_INVALID){
+               if (print_errors) fprintf(stderr,"ERROR: Failed to connect pipe: %s\n",strerror(errno));
+               return -1;
+       }
+       if (ortp_pipe_write(pp,(uint8_t*)command,strlen(command))==-1){
+               if (print_errors) fprintf(stderr,"ERROR: Fail to send command to remote linphonec\n");
+               ortp_client_pipe_close(pp);
+               return -1;
+       }
+       /*wait for replies */
+       i=0;
+       while ((err=ortp_pipe_read(pp,(uint8_t*)&reply[i],reply_len-i-1))>0){
+               i+=err;
+       }
+       reply[i]='\0';
+       ortp_client_pipe_close(pp);
+       return 0;
+}
+
+static void print_usage(void){
+       fprintf(stderr,"Usage:\nlinphonecsh <action> [arguments]\n"
+                       "where action is one of\n"
+                       "\tinit\t\t: spawn a linphonec daemon (first step to make other actions)\n"
+                       "\t\t\tfollowed by the arguments sent to linphonec\n"
+                       "\tgeneric\t\t: sends a generic command to the running linphonec daemon\n"
+                       "\t\t\tfollowed by the generic command surrounded by quotes,\n\t\t\t for example \"call sip:joe@example.net\"\n"
+                       "\tregister\t: register; arguments are \n\t\t\t--host <host>\n\t\t\t--username <username>\n\t\t\t--password <password>\n"
+                       "\tunregister\t: unregister\n"
+                       "\tdial\t\t: dial <sip uri or number>\n"
+                       "\tstatus\t\t: can be 'status register', 'status autoanswer' or 'status hook'\n"
+                       "\tsoundcard\t: can be 'soundcard capture', 'soundcard playback', 'soundcard ring',\n"
+                       "\t\t\t followed by an optional number representing the index of the soundcard,\n"
+                       "\t\t\t in which case the soundcard is set instead of just read.\n"
+                       "\texit\t\t: make the linphonec daemon to exit.\n"
+       );
+       exit(-1);
+}
+
+#define MAX_ARGS 10
+
+#ifndef WIN32
+static void spawn_linphonec(int argc, char *argv[]){
+       char * args[10];
+       int i,j;
+       pid_t pid;
+       j=0;
+       args[j++]="linphonec";
+       args[j++]="--pipe";
+       args[j++]="-c";
+       args[j++]="/dev/null";
+       for(i=0;i<argc;++i){
+               args[j++]=argv[i];
+       }
+       args[j++]=NULL;
+
+       pid = vfork();
+       if (pid < 0){
+               fprintf(stderr,"Could not fork\n");
+               exit(-1);
+       }
+       if (pid == 0) {
+               int fd;
+               /*we are the new process*/
+               setsid();
+               
+               fd = open("/dev/null", O_RDWR);
+               if (fd==-1){
+                       fprintf(stderr,"Could not open /dev/null\n");
+                       exit(-1);
+               }
+               dup2(fd, 0);
+               dup2(fd, 1);
+               dup2(fd, 2);
+               close(fd);
+               
+               if (execvp("linphonec",args)==-1){
+                       fprintf(stderr,"Fail to spawn linphonec: %s\n",strerror(errno));
+                       exit(-1);
+               }
+       }
+}
+#else
+
+static void spawn_linphonec(int argc, char *argv[]){
+       PROCESS_INFORMATION pinfo;
+       STARTUPINFO si;
+       ZeroMemory( &si, sizeof(si) );
+       si.cb = sizeof(si);
+       ZeroMemory( &pinfo, sizeof(pinfo) );
+
+
+       BOOL ret=CreateProcess(NULL,"linphoned.exe --pipe -c NUL",
+               NULL,
+               NULL,
+               FALSE,
+               0,
+               NULL,
+               NULL,
+               &si,
+               &pinfo);
+       if (!ret){
+               fprintf(stderr,"Spawning of linphonec.exe failed.\n");
+       }else{
+               WaitForInputIdle(pinfo.hProcess,1000);
+       }
+}
+
+#endif
+
+static int send_generic_command(const char *command, int print_result){
+       char reply[DEFAULT_REPLY_SIZE];
+       int err;
+       err=send_command(command,reply,sizeof(reply),print_result);
+       if (err==0 && print_result) {
+               printf("%s",reply);
+               fflush(stdout);
+       }
+       return err;
+}
+
+static int register_execute(int argc, char *argv[]){
+       char cmd[512];
+       char *username=NULL;
+       char *host=NULL;
+       char *passwd=NULL;
+       int i;
+       for(i=0;i<argc;++i){
+               if (strcmp(argv[i],"--host")==0){
+                       i++;
+                       if (i<argc){
+                               host=argv[i];
+                       }else print_usage();
+               }else if (strcmp(argv[i],"--username")==0){
+                       i++;
+                       if (i<argc){
+                               username=argv[i];
+                       }else print_usage();
+               }else if (strcmp(argv[i],"--password")==0){
+                       i++;
+                       if (i<argc){
+                               passwd=argv[i];
+                       }else print_usage();
+               }else print_usage();
+       }
+       if (username==NULL) {
+               fprintf(stderr,"Missing --username\n");
+               print_usage();
+       }
+       if (host==NULL) {
+               fprintf(stderr,"Missing --host\n");
+               print_usage();
+       }
+       if (passwd) snprintf(cmd,sizeof(cmd),"register sip:%s@%s sip:%s %s",username,host,host,passwd);
+       else snprintf(cmd,sizeof(cmd),"register sip:%s@%s sip:%s",username,host,host);
+       return send_generic_command(cmd,TRUE);
+}
+
+static int unregister_execute(int argc, char *argv[]){
+       return send_generic_command("unregister",FALSE);
+}
+
+
+static int dial_execute(int argc, char *argv[]){
+       char cmd[512];
+       if (argc==1){
+               snprintf(cmd,sizeof(cmd),"call %s",argv[0]);
+               return send_generic_command(cmd,TRUE);
+       }else{
+               print_usage();
+       }
+       return -1;
+}
+
+static int status_execute(int argc, char *argv[]){
+       char cmd[512];
+       char reply[DEFAULT_REPLY_SIZE];
+       int err;
+       
+       if (argc==1){
+               snprintf(cmd,sizeof(cmd),"status %s",argv[0]);
+               err=send_command(cmd,reply,sizeof(reply),TRUE);
+               if (err==0) {
+                       printf("%s",reply);
+                       err=make_status_value(reply);
+               }
+               return err;
+       }else{
+               print_usage();
+       }
+       return -1;
+}
+
+static int parse_card_index(const char *reply){
+       int index=-1;
+       reply=strstr(reply,"device #");
+       if (!reply || sscanf(reply,"device #%i",&index)!=1){
+               fprintf(stderr,"Error while parsing linphonec daemon output !\n");
+       }
+       return index;
+}
+
+static int soundcard_execute(int argc, char *argv[]){
+       char cmd[512];
+       char reply[DEFAULT_REPLY_SIZE];
+       int err;
+       if (argc==1){
+               snprintf(cmd,sizeof(cmd),"soundcard %s",argv[0]);
+               err=send_command(cmd,reply,sizeof(reply),TRUE);
+               if (err==0) {
+                       printf("%s",reply);
+                       return parse_card_index(reply);
+               }
+       }else if (argc==2){/*setting a soundcard */
+               snprintf(cmd,sizeof(cmd),"soundcard %s %s",argv[0],argv[1]);
+               err=send_command(cmd,reply,sizeof(reply),TRUE);
+               if (err==0) {
+                       printf("%s",reply);
+                       return 0;
+               }
+       }else{
+               print_usage();
+       }
+       return -1;
+}
+
+int main(int argc, char *argv[]){
+       int argi;
+       if (argc<2){
+               print_usage();
+               return -1;
+       }
+       ortp_init();
+       for(argi=1;argi<argc;++argi){
+               if (strcmp(argv[argi],"init")==0){
+                       /*check if there is running instance*/
+                       if (send_generic_command("help",0)==0){
+                               fprintf(stderr,"A running linphonec has been found, not spawning a second one.\n");
+                               return 0;
+                       }
+                       spawn_linphonec(argc-argi-1,&argv[argi+1]);
+                       return 0;
+               }else if (strcmp(argv[argi],"generic")==0){
+                       if (argi+1<argc){
+                               return send_generic_command(argv[argi+1],1);
+                       }else print_usage();
+               }else if (strcmp(argv[argi],"register")==0){
+                       return register_execute(argc-argi-1,&argv[argi+1]);
+               }else if (strcmp(argv[argi],"unregister")==0){
+                       return unregister_execute(argc-argi-1,&argv[argi+1]);
+               }else if (strcmp(argv[argi],"dial")==0){
+                       return dial_execute(argc-argi-1,&argv[argi+1]);
+               }else if (strcmp(argv[argi],"hangup")==0){
+                       send_generic_command("terminate",FALSE);
+                       send_generic_command("duration",TRUE);
+               }else if (strcmp(argv[argi],"status")==0){
+                       return status_execute(argc-argi-1,&argv[argi+1]);
+               }else if (strcmp(argv[argi],"soundcard")==0){
+                       return soundcard_execute(argc-argi-1,&argv[argi+1]);
+               }else if (strcmp(argv[argi],"exit")==0){
+                       return send_generic_command("quit",TRUE);
+               }else print_usage();
+       }
+       return 0;
+}
diff --git a/console/sipomatic.c b/console/sipomatic.c
new file mode 100644 (file)
index 0000000..9e053b2
--- /dev/null
@@ -0,0 +1,470 @@
+/***************************************************************************
+                          linphone  - sipomatic.c
+This is a test program for linphone. It acts as a sip server and answers to linphone's
+call.
+                             -------------------
+    begin                : ven mar  30
+    copyright            : (C) 2001 by Simon MORLAT
+    email                : simon.morlat@linphone.org
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ ***************************************************************************/
+
+#include <signal.h>
+#include "sipomatic.h"
+#include <eXosip2/eXosip.h>
+
+int run_cond=1;
+
+Sipomatic sipomatic;
+
+int sipomatic_accept_audio_offer(sdp_context_t *ctx,sdp_payload_t *payload);
+int sipomatic_accept_video_offer(sdp_context_t *ctx,sdp_payload_t *payload);
+
+
+sdp_handler_t sipomatic_sdp_handler={
+       sipomatic_accept_audio_offer,   /*from remote sdp */
+       sipomatic_accept_video_offer,
+       NULL,
+       NULL,
+       NULL,
+       NULL,
+};
+
+void stop_handler(int signum)
+{
+       run_cond=0;
+}
+
+void sipomatic_process_event(Sipomatic *obj,eXosip_event_t *ev)
+{
+       Call *call;
+       switch(ev->type){
+               case EXOSIP_CALL_INVITE:
+                       call_new(obj,ev);
+                       break;
+               case EXOSIP_CALL_CLOSED:
+               case EXOSIP_CALL_CANCELLED:
+                       call=sipomatic_find_call(obj,ev->did);
+                       if (call==NULL){
+                               ms_warning("Could not find call with did %i !",ev->did);
+                       }
+                       call_release(call);
+                       call_destroy(call);
+                       break;
+               default:
+                       break;
+       }
+       eXosip_event_free(ev);
+}
+
+
+void endoffile_cb(void *ud, unsigned int ev,void * arg){
+       Call*call=(Call*)ud;
+       call->eof=1;
+}
+
+void call_accept(Call *call)
+{
+       sdp_context_t *ctx;
+       PayloadType *payload;
+       char *hellofile;
+       static int call_count=0;        
+       char record_file[250];
+       osip_message_t *msg=NULL;
+       sprintf(record_file,"/tmp/sipomatic%i.wav",call_count);
+
+       ctx=call->sdpc;
+       payload=rtp_profile_get_payload(call->profile,call->audio.pt);
+       if (strcmp(payload->mime_type,"telephone-event")==0){
+               /* telephone-event is not enough to accept a call */
+               ms_message("Cannot accept call with only telephone-event.\n");
+               eXosip_call_send_answer(call->did,415,NULL);
+               call->state=CALL_STATE_FINISHED;
+               return;
+       }
+       if (payload->clock_rate==16000){
+               hellofile=call->root->file_path16000hz;
+       }else hellofile=call->root->file_path8000hz;
+       eXosip_call_build_answer(call->tid,200,&msg);
+       osip_message_set_content_type(msg,"application/sdp");
+       osip_message_set_body(msg,call->sdpc->answerstr,strlen(call->sdpc->answerstr));
+       eXosip_call_send_answer(call->tid,200,msg);
+       call->audio_stream=audio_stream_new(call->audio.localport,call->root->ipv6);
+       audio_stream_start_with_files(call->audio_stream, call->profile,
+                               call->audio.remaddr,call->audio.remoteport,call->audio.remoteport+1,
+                                call->audio.pt,20,hellofile,record_file);
+       call_count++;
+#ifdef VIDEO_ENABLED
+       if (call->video.remoteport!=0){
+               video_stream_send_only_start(call->video_stream,call->profile,
+                       call->video.remaddr,call->video.remoteport,call->video.remoteport+1,call->video.pt, 60, 
+                       ms_web_cam_manager_get_default_cam(ms_web_cam_manager_get()));
+       }
+#endif
+       call->time=time(NULL);
+       call->state=CALL_STATE_RUNNING;
+       ms_filter_set_notify_callback(call->audio_stream->soundread,endoffile_cb,(void*)call);
+}
+
+
+PayloadType * sipomatic_payload_is_supported(sdp_payload_t *payload,RtpProfile *local_profile,RtpProfile *dialog_profile)
+{
+       int localpt;
+       if (payload->a_rtpmap!=NULL){
+               localpt=rtp_profile_get_payload_number_from_rtpmap(local_profile,payload->a_rtpmap);
+       }else{
+               localpt=payload->pt;
+               ms_warning("payload has no rtpmap.");
+       }
+       
+       if (localpt>=0){
+               /* this payload is supported in our local rtp profile, so add it to the dialog rtp
+               profile */
+               PayloadType *rtppayload;
+               rtppayload=rtp_profile_get_payload(local_profile,localpt);
+               if (rtppayload==NULL) return NULL;
+               /*check if we have the appropriate coder/decoder for this payload */
+               if (strcmp(rtppayload->mime_type,"telephone-event")!=0) {
+                       if (!ms_filter_codec_supported(rtppayload->mime_type)) {
+                               ms_message("Codec %s is not supported.", rtppayload->mime_type);
+                               return NULL;
+                       }
+               }
+               rtppayload=payload_type_clone(rtppayload);
+               rtp_profile_set_payload(dialog_profile,payload->pt,rtppayload);
+               /* add to the rtp payload type some other parameters (bandwidth) */
+               if (payload->b_as_bandwidth!=0) rtppayload->normal_bitrate=payload->b_as_bandwidth*1000;
+               if (payload->a_fmtp!=NULL)
+                       payload_type_set_send_fmtp(rtppayload,payload->a_fmtp);
+               if (strcasecmp(rtppayload->mime_type,"iLBC")==0){
+                       /*default to 30 ms mode */
+                       payload->a_fmtp="ptime=30";
+                       payload_type_set_recv_fmtp(rtppayload,payload->a_fmtp);
+               }
+               return rtppayload;
+       }
+       return NULL;
+}
+
+int sipomatic_accept_audio_offer(sdp_context_t *ctx,sdp_payload_t *payload)
+{
+       static int audioport=8000;
+       Call *call=(Call*)sdp_context_get_user_pointer(ctx);
+       PayloadType *supported;
+       struct stream_params *params=&call->audio;
+       
+       /* see if this codec is supported in our local rtp profile*/
+       supported=sipomatic_payload_is_supported(payload,&av_profile,call->profile);
+       if (supported==NULL) {
+               ms_message("Refusing codec %i (%s)",payload->pt,payload->a_rtpmap);
+               return -1;
+       }
+       if (strcmp(supported->mime_type,"telephone-event")==0) return 0;
+       if (params->ncodecs==0 ){
+               /* this is the first codec we may accept*/
+               params->localport=payload->localport=audioport;
+               params->remoteport=payload->remoteport;
+               params->line=payload->line;
+               params->pt=payload->pt; /* remember the first payload accepted */
+               params->remaddr=payload->c_addr;
+               params->ncodecs++;
+               audioport+=4;
+       }else{
+               /* refuse all other audio lines*/
+               if(params->line!=payload->line) return -1;
+       }
+       return 0;
+}
+
+int sipomatic_accept_video_offer(sdp_context_t *ctx,sdp_payload_t *payload)
+{
+#ifdef VIDEO_ENABLED
+       static int videoport=80000;
+       Call *call=(Call*)sdp_context_get_user_pointer(ctx);
+       PayloadType *supported;
+       struct stream_params *params=&call->video;
+       
+       /* see if this codec is supported in our local rtp profile*/
+       supported=sipomatic_payload_is_supported(payload,&av_profile,call->profile);
+       if (supported==NULL) {
+               ms_message("Refusing video codec %i (%s)",payload->pt,payload->a_rtpmap);
+               return -1;
+       }
+       if (params->ncodecs==0 ){
+               /* this is the first codec we may accept*/
+               params->localport=payload->localport=videoport;
+               params->remoteport=payload->remoteport;
+               params->line=payload->line;
+               params->pt=payload->pt; /* remember the first payload accepted */
+               params->remaddr=payload->c_addr;
+               params->ncodecs++;
+               videoport+=4;
+       }else{
+               /* refuse all other video lines*/
+               if(params->line!=payload->line) return -1;
+       }
+       return 0;
+#else
+       return -1;
+#endif
+}
+
+void sipomatic_init(Sipomatic *obj, char *url, bool_t ipv6)
+{
+       osip_uri_t *uri=NULL;
+       int port=5064;
+       
+       obj->ipv6=ipv6;
+       
+       if (url==NULL){
+               url=getenv("SIPOMATIC_URL");
+               if (url==NULL){
+                       if (ipv6) url="sip:robot@[::1]:5064";
+                       else url="sip:robot@127.0.0.1:5064";
+               }
+       }
+       if (url!=NULL) {
+               osip_uri_init(&uri);
+               if (osip_uri_parse(uri,url)==0){
+                       if (uri->port!=NULL) port=atoi(uri->port);
+               }else{
+                       ms_warning("Invalid identity uri:%s",url);
+               }       
+       }
+       ms_message("Starting using url %s",url);
+       ms_mutex_init(&obj->lock,NULL);
+       obj->calls=NULL;
+       obj->acceptance_time=5;
+       obj->max_call_time=300;
+       obj->file_path8000hz=ms_strdup_printf("%s/%s",PACKAGE_SOUND_DIR,ANNOUCE_FILE8000HZ);
+       obj->file_path16000hz=ms_strdup_printf("%s/%s",PACKAGE_SOUND_DIR,ANNOUCE_FILE16000HZ);
+       osip_trace_initialize(OSIP_INFO1,stdout);
+       osip_trace_initialize(OSIP_INFO2,stdout);
+       osip_trace_initialize(OSIP_WARNING,stdout);
+       osip_trace_initialize(OSIP_ERROR,stdout);
+       osip_trace_initialize(OSIP_BUG,stdout);
+       osip_trace_initialize(OSIP_FATAL,stdout);
+       osip_trace_enable_level(OSIP_INFO1);
+       osip_trace_enable_level(OSIP_INFO2);
+       osip_trace_enable_level(OSIP_WARNING);
+       osip_trace_enable_level(OSIP_ERROR);
+       osip_trace_enable_level(OSIP_BUG);
+       osip_trace_enable_level(OSIP_FATAL);
+       eXosip_init();
+       eXosip_set_user_agent("sipomatic-" LINPHONE_VERSION "/eXosip");
+       eXosip_listen_addr(IPPROTO_UDP,NULL,port,ipv6 ? AF_INET6 : AF_INET,0);
+}
+
+void sipomatic_uninit(Sipomatic *obj)
+{
+       ms_mutex_destroy(&obj->lock);
+       eXosip_quit();
+}
+
+void sipomatic_iterate(Sipomatic *obj)
+{
+       MSList *elem;
+       MSList *to_be_destroyed=NULL;
+       Call *call;
+       double elapsed;
+       eXosip_event_t *ev;
+
+       while((ev=eXosip_event_wait(0,0))!=NULL){
+               sipomatic_process_event(obj,ev);
+       }
+       elem=obj->calls;
+       while(elem!=NULL){
+               call=(Call*)elem->data;
+               elapsed=time(NULL)-call->time;
+               switch(call->state){
+                       case CALL_STATE_INIT:
+                               if (elapsed>obj->acceptance_time){
+                                       call_accept(call);
+                               }
+                       break;
+                       case CALL_STATE_RUNNING:
+                               if (elapsed>obj->max_call_time || call->eof){
+                                       call_release(call);
+                                       to_be_destroyed=ms_list_append(to_be_destroyed,call);
+                               }
+                       break;
+               }
+               elem=ms_list_next(elem);
+       }
+       for(;to_be_destroyed!=NULL; to_be_destroyed=ms_list_next(to_be_destroyed)){
+               call_destroy((Call*)to_be_destroyed->data);
+       }
+}
+
+
+Call* sipomatic_find_call(Sipomatic *obj,int did)
+{
+       MSList *it;
+       Call *call=NULL;
+       for (it=obj->calls;it!=NULL;it=ms_list_next(it)){
+               call=(Call*)it->data;
+               if ( call->did==did) return call;
+       }
+       return call;
+}
+
+
+Call * call_new(Sipomatic *root, eXosip_event_t *ev)
+{
+       Call *obj;
+       char *sdpans;
+       int status;
+       sdp_message_t *sdp;
+       sdp_context_t *sdpc;
+       
+       sdp=eXosip_get_sdp_info(ev->request);
+       sdpc=sdp_handler_create_context(&sipomatic_sdp_handler,NULL,"sipomatic",NULL);
+       obj=ms_new0(Call,1);
+       obj->profile=rtp_profile_new("remote");
+       eXosip_call_send_answer(ev->tid,100,NULL);
+       sdp_context_set_user_pointer(sdpc,obj);
+       sdpans=sdp_context_get_answer(sdpc,sdp);
+       if (sdpans!=NULL){
+               eXosip_call_send_answer(ev->tid,180,NULL);
+               
+       }else{
+               status=sdp_context_get_status(sdpc);
+               eXosip_call_send_answer(ev->tid,status,NULL);
+               sdp_context_free(sdpc);
+               rtp_profile_destroy(obj->profile);
+               ms_free(obj);
+               return NULL;
+       }
+       obj->sdpc=sdpc;
+       obj->did=ev->did;
+       obj->tid=ev->tid;
+       obj->time=time(NULL);
+       obj->audio_stream=NULL;
+       obj->state=CALL_STATE_INIT;
+       obj->eof=0;
+       obj->root=root;
+       root->calls=ms_list_append(root->calls,obj);
+       return obj;
+}
+
+void call_release(Call *call)
+{
+       eXosip_call_terminate(0,call->did);
+       if (call->audio_stream!=NULL) audio_stream_stop(call->audio_stream);
+#ifdef VIDEO_ENABLED
+       if (call->video_stream!=NULL) video_stream_send_only_stop(call->video_stream);
+#endif
+       call->state=CALL_STATE_FINISHED;
+}
+
+void call_destroy(Call *obj)
+{
+       obj->root->calls=ms_list_remove(obj->root->calls,obj);
+       rtp_profile_destroy(obj->profile);
+       sdp_context_free(obj->sdpc);
+       ms_free(obj);
+}
+
+void sipomatic_set_annouce_file(Sipomatic *obj, char *file)
+{
+       if (obj->file_path8000hz!=NULL){
+               ms_free(obj->file_path8000hz);
+       }
+       obj->file_path8000hz=ms_strdup(file);
+}
+
+
+void display_help()
+{
+       printf("sipomatic [-u sip-url] [-f annouce-file ] [-s port]\n"
+                       "sipomatic -h or --help: display this help.\n"
+                       "sipomatic -v or --version: display version information.\n"
+                       "       -u sip-url : specify the sip url sipomatic listens and answers.\n"
+                       "       -f annouce-file : set the annouce file (16 bit raw format,8000Hz)\n"
+                       " -6 enable ipv6 network usage\n");
+       exit(0);
+}
+
+char *getarg(int argc, char*argv[], int i)
+{
+       if (i<argc){
+               return argv[i];
+       }
+       else display_help();
+       return NULL;
+}
+
+int main(int argc, char *argv[])
+{
+       int sendport=5070;
+       char *file=NULL;
+       char *url=NULL;
+       bool_t ipv6=FALSE;
+       int i;
+       
+       for(i=1;i<argc;i++){
+               if ( (strcmp(argv[i],"-h")==0) || (strcmp(argv[i],"--help")==0) ){
+                       display_help();
+                       continue;
+               }
+               if ( (strcmp(argv[i],"-v")==0) || (strcmp(argv[i],"--version")==0) ){
+                       printf("version: " LINPHONE_VERSION "\n");
+                       exit(0);
+               }
+               if (strcmp(argv[i],"-u")==0){
+                       i++;
+                       url=getarg(argc,argv,i);
+                       continue;
+               }
+               if (strcmp(argv[i],"-s")==0){
+                       char *port;
+                       i++;
+                       port=getarg(argc,argv,i);
+                       sendport=atoi(port);
+                       continue;
+               }
+               if (strcmp(argv[i],"-f")==0){
+                       i++;
+                       file=getarg(argc,argv,i);
+                       continue;
+               }
+               if (strcmp(argv[i],"-6")==0){
+                       ipv6=TRUE;
+                       continue;
+               }
+       }
+       
+       signal(SIGINT,stop_handler);
+       ortp_init();
+       ms_init();
+       ortp_set_log_level_mask(ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
+       rtp_profile_set_payload(&av_profile,115,&payload_type_lpc1015);
+       rtp_profile_set_payload(&av_profile,110,&payload_type_speex_nb);
+       rtp_profile_set_payload(&av_profile,111,&payload_type_speex_wb);
+       rtp_profile_set_payload(&av_profile,112,&payload_type_ilbc);
+       rtp_profile_set_payload(&av_profile,101,&payload_type_telephone_event);
+       rtp_profile_set_payload(&av_profile,116,&payload_type_truespeech);
+       rtp_profile_set_payload(&av_profile,98,&payload_type_h263_1998);
+       
+       sipomatic_init(&sipomatic,url,ipv6);
+       if (file!=NULL) sipomatic_set_annouce_file(&sipomatic,file);
+       
+       while (run_cond){
+               sipomatic_iterate(&sipomatic);
+#ifndef WIN32
+               usleep(20000);
+#else
+               Sleep(20);
+#endif
+       }
+       
+       return(0);
+}
diff --git a/console/sipomatic.h b/console/sipomatic.h
new file mode 100644 (file)
index 0000000..6253233
--- /dev/null
@@ -0,0 +1,96 @@
+/***************************************************************************
+                          linphone  - sipomatic.c
+This is a test program for linphone. It acts as a sip server and answers to linphone's
+call.
+                             -------------------
+    begin                : ven mar  30
+    copyright            : (C) 2001 by Simon MORLAT
+    email                : simon.morlat@free.fr
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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.                                   *
+ *                                                                         *
+ ***************************************************************************/
+
+
+#include "../coreapi/linphonecore.h"
+#include "../coreapi/sdphandler.h"
+#include <eXosip2/eXosip.h>
+#undef PACKAGE
+#undef VERSION
+#include "mediastreamer2/mediastream.h"
+
+#include <ortp/ortp.h>
+#include <ortp/telephonyevents.h>
+
+
+#define ANNOUCE_FILE8000HZ     "hello8000.wav"
+#define ANNOUCE_FILE16000HZ    "hello16000.wav"
+
+struct _Sipomatic
+{
+       ms_mutex_t lock;
+       MSList *calls;
+       double acceptance_time;
+       double max_call_time;
+       char *file_path8000hz;
+       char *file_path16000hz;
+       bool_t ipv6;
+};
+
+typedef struct _Sipomatic Sipomatic;
+       
+void sipomatic_init(Sipomatic *obj, char *url, bool_t ipv6);
+void sipomatic_uninit(Sipomatic *obj);
+void sipomatic_iterate(Sipomatic *obj);
+#define sipomatic_lock(obj) ms_mutex_lock(&(obj)->lock);
+#define sipomatic_unlock(obj) ms_mutex_unlock(&(obj)->lock);
+
+void sipomatic_set_annouce_file(Sipomatic *obj, char *file);
+
+struct stream_params{
+       int ncodecs;
+       int line;
+       int localport;
+       int remoteport;
+       int pt;
+       char *remaddr;
+};
+
+struct _Call
+{
+       Sipomatic *root;
+       sdp_context_t *sdpc;
+       int time;
+       int did;
+       int tid;
+       AudioStream *audio_stream;
+#ifdef VIDEO_ENABLED
+       VideoStream *video_stream;
+#endif
+       int state;
+       struct _CallParams *params;
+       int eof;
+       RtpProfile *profile;
+       struct stream_params audio;
+       struct stream_params video;
+};
+
+#define CALL_STATE_INIT 0
+#define CALL_STATE_RUNNING 1
+#define CALL_STATE_FINISHED 2
+
+typedef struct _Call Call;
+
+       
+Call * call_new(Sipomatic *obj, eXosip_event_t *ev);
+void call_accept(Call *call);
+void call_release(Call *call);
+void call_destroy(Call *call);
+
+Call* sipomatic_find_call(Sipomatic *obj,int cid);
diff --git a/console/wav2raw.c b/console/wav2raw.c
new file mode 100644 (file)
index 0000000..1dc2183
--- /dev/null
@@ -0,0 +1,67 @@
+
+
+#include "../config.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+
+int main(int argc, char *argv[])
+{
+       int ifd,ofd;
+       char *name,*p;
+       char buf[200];
+       int len;
+
+       if (argc<2) return -1;  
+       name=malloc(strlen(argv[1])+10);
+       sprintf(name,"%s",argv[1]);
+       p=strstr(name,".raw");
+       if (p!=NULL){
+               sprintf(p,"%s",".wav\0");
+       }else{
+               sprintf(name,"%s%s",argv[1],".raw");
+       }
+       
+       ifd=open(name,O_RDONLY);
+       if (ifd<0) {
+               perror("Could not open input file");
+               return -1;
+       }
+       ofd=open(argv[1],O_WRONLY|O_CREAT|O_TRUNC,S_IRUSR|S_IWUSR|S_IRGRP);
+       if (ofd<0) {
+               perror("Could not open output file");
+               return -1;
+       }
+       len=read(ifd,buf,20);
+       printf("len=%i\n",len);
+       /* erase the wav header */
+       if (len>0){
+               memset(buf,0,20);
+               write(ofd,buf,20);
+       }else{
+               printf("Error while processing %s: %s\n",argv[1],strerror(errno));
+               return -1;
+       };
+
+       while ( (len=read(ifd,buf,200))>0){
+               #ifdef WORDS_BIGENDIAN  
+               for (i=0;i<len/2;i+=2){
+                       tmp=buf[i];
+                       buf[i]=buf[i+1];
+                       buf[i+1]=tmp;
+               }
+               #endif
+               write(ofd,buf,len);
+       }
+
+       close(ifd);
+       close(ofd);
+       return 0;
+}
+
+
diff --git a/coreapi/.gitignore b/coreapi/.gitignore
new file mode 100644 (file)
index 0000000..c5d084f
--- /dev/null
@@ -0,0 +1,7 @@
+Makefile
+Makefile.in
+.deps
+.libs
+*.lo
+*.la
+*.loT
diff --git a/coreapi/Makefile.am b/coreapi/Makefile.am
new file mode 100644 (file)
index 0000000..c0a28ad
--- /dev/null
@@ -0,0 +1,54 @@
+
+SUBDIRS=help
+
+## Process this file with automake to produce Makefile.in
+linphone_includedir=$(includedir)/linphone
+
+linphone_include_HEADERS=linphonecore.h ../config.h lpconfig.h sipsetup.h
+
+INCLUDES = \
+       -I$(top_srcdir)\
+       -I$(top_srcdir)/mediastreamer2/include
+
+
+lib_LTLIBRARIES=liblinphone.la
+
+liblinphone_la_SOURCES=\
+       linphonecore.c linphonecore.h private.h\
+       exevents.c exevents.h \
+       misc.c  \
+       address.c \
+       enum.c enum.h \
+       sdphandler.c sdphandler.h \
+       presence.c \
+       proxy.c \
+       friend.c \
+       authentication.c \
+       lpconfig.c lpconfig.h \
+       chat.c \
+        general_state.c \
+       sipsetup.c sipsetup.h \
+       siplogin.c
+
+
+liblinphone_la_LDFLAGS= -version-info $(LIBLINPHONE_SO_VERSION) -no-undefined
+
+liblinphone_la_LIBADD= \
+               $(EXOSIP_LIBS) \
+               $(top_builddir)/mediastreamer2/src/libmediastreamer.la \
+               $(ORTP_LIBS)
+
+if BUILD_WIN32
+liblinphone_la_LIBADD+=$(top_builddir)/oRTP/src/libortp.la
+endif
+
+
+AM_CFLAGS=$(STRICT_OPTIONS)  -DIN_LINPHONE \
+       $(ORTP_CFLAGS) \
+       $(OSIP_CFLAGS) \
+       $(EXOSIP_CFLAGS) \
+       -DENABLE_TRACE  \
+       -DLOG_DOMAIN=\"LinphoneCore\" \
+        $(IPV6_CFLAGS) \
+        -DORTP_INET6 \
+        $(VIDEO_CFLAGS) 
diff --git a/coreapi/address.c b/coreapi/address.c
new file mode 100644 (file)
index 0000000..36f6de9
--- /dev/null
@@ -0,0 +1,184 @@
+/*
+linphone
+Copyright (C) 2009  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#include "linphonecore.h"
+#include "lpconfig.h"
+#include "private.h"
+#include <eXosip2/eXosip.h>
+
+/**
+ * @addtogroup linphone_address
+ * @{
+**/
+
+/**
+ * Constructs a LinphoneAddress object by parsing the user supplied address,
+ * given as a string.
+**/
+LinphoneAddress * linphone_address_new(const char *uri){
+       osip_from_t *from;
+       osip_from_init(&from);
+       if (osip_from_parse(from,uri)!=0){
+               osip_from_free(from);
+               return NULL;
+       }
+       return from;
+}
+
+/**
+ * Clones a LinphoneAddress object.
+**/
+LinphoneAddress * linphone_address_clone(const LinphoneAddress *uri){
+       osip_from_t *ret=NULL;
+       osip_from_clone(uri,&ret);
+       return ret;
+}
+
+#define null_if_empty(s) (((s)!=NULL && (s)[0]!='\0') ? (s) : NULL )
+
+/**
+ * Returns the address scheme, normally "sip".
+**/
+const char *linphone_address_get_scheme(const LinphoneAddress *u){
+       return null_if_empty(u->url->scheme);
+}
+
+/**
+ * Returns the display name.
+**/
+const char *linphone_address_get_display_name(const LinphoneAddress* u){
+       return null_if_empty(u->displayname);
+}
+
+/**
+ * Returns the username.
+**/
+const char *linphone_address_get_username(const LinphoneAddress *u){
+       return null_if_empty(u->url->username);
+}
+
+/**
+ * Returns the domain name.
+**/
+const char *linphone_address_get_domain(const LinphoneAddress *u){
+       return null_if_empty(u->url->host);
+}
+
+/**
+ * Sets the display name.
+**/
+void linphone_address_set_display_name(LinphoneAddress *u, const char *display_name){
+       if (u->displayname!=NULL){
+               osip_free(u->displayname);
+               u->displayname=NULL;
+       }
+       if (display_name!=NULL)
+               u->displayname=osip_strdup(display_name);
+}
+
+/**
+ * Sets the username.
+**/
+void linphone_address_set_username(LinphoneAddress *uri, const char *username){
+       if (uri->url->username!=NULL){
+               osip_free(uri->url->username);
+               uri->url->username=NULL;
+       }
+       if (username)
+               uri->url->username=osip_strdup(username);
+}
+
+/**
+ * Sets the domain.
+**/
+void linphone_address_set_domain(LinphoneAddress *uri, const char *host){
+       if (uri->url->host!=NULL){
+               osip_free(uri->url->host);
+               uri->url->host=NULL;
+       }
+       if (host)
+               uri->url->host=osip_strdup(host);
+}
+
+/**
+ * Sets the port number.
+**/
+void linphone_address_set_port(LinphoneAddress *uri, const char *port){
+       if (uri->url->port!=NULL){
+               osip_free(uri->url->port);
+               uri->url->port=NULL;
+       }
+       if (port)
+               uri->url->port=osip_strdup(port);
+}
+
+/**
+ * Sets the port number.
+**/
+void linphone_address_set_port_int(LinphoneAddress *uri, int port){
+       char tmp[12];
+       if (port==5060){
+               /*this is the default, special case to leave the port field blank*/
+               linphone_address_set_port(uri,NULL);
+               return;
+       }
+       snprintf(tmp,sizeof(tmp),"%i",port);
+       linphone_address_set_port(uri,tmp);
+}
+
+/**
+ * Removes address's tags and uri headers so that it is displayable to the user.
+**/
+void linphone_address_clean(LinphoneAddress *uri){
+       osip_generic_param_freelist(&uri->gen_params);
+}
+
+/**
+ * Returns the address as a string.
+ * The returned char * must be freed by the application. Use ms_free().
+**/
+char *linphone_address_as_string(const LinphoneAddress *u){
+       char *tmp,*ret;
+       osip_from_to_str(u,&tmp);
+       ret=ms_strdup(tmp);
+       osip_free(tmp);
+       return ret;
+}
+
+/**
+ * Returns the SIP uri only as a string, that is display name is removed.
+ * The returned char * must be freed by the application. Use ms_free().
+**/
+char *linphone_address_as_string_uri_only(const LinphoneAddress *u){
+       char *tmp=NULL,*ret;
+       osip_uri_to_str(u->url,&tmp);
+       ret=ms_strdup(tmp);
+       osip_free(tmp);
+       return ret;
+}
+
+/**
+ * Destroys a LinphoneAddress object.
+**/
+void linphone_address_destroy(LinphoneAddress *u){
+       osip_from_free(u);
+}
+
+
+/** @} */
diff --git a/coreapi/authentication.c b/coreapi/authentication.c
new file mode 100644 (file)
index 0000000..ee360ec
--- /dev/null
@@ -0,0 +1,394 @@
+/***************************************************************************
+ *            authentication.c
+ *
+ *  Fri Jul 16 12:08:34 2004
+ *  Copyright  2004-2009  Simon MORLAT
+ *  simon.morlat@linphone.org
+ ****************************************************************************/
+
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+#include "linphonecore.h"
+#include "private.h"
+#include <eXosip2/eXosip.h>
+#include <osipparser2/osip_message.h>
+#include "lpconfig.h"
+
+extern LinphoneProxyConfig *linphone_core_get_proxy_config_from_rid(LinphoneCore *lc, int rid);
+
+/**
+ * @addtogroup authentication
+ * @{
+**/
+
+/**
+ * Create a LinphoneAuthInfo object with supplied information.
+ *
+ * The object can be created empty, that is with all arguments set to NULL.
+ * Username, userid, password and realm can be set later using specific methods.
+**/
+LinphoneAuthInfo *linphone_auth_info_new(const char *username, const char *userid,
+                                                                                                               const char *passwd, const char *ha1,const char *realm)
+{
+       LinphoneAuthInfo *obj=ms_new0(LinphoneAuthInfo,1);
+       if (username!=NULL && (strlen(username)>0) ) obj->username=ms_strdup(username);
+       if (userid!=NULL && (strlen(userid)>0)) obj->userid=ms_strdup(userid);
+       if (passwd!=NULL && (strlen(passwd)>0)) obj->passwd=ms_strdup(passwd);
+       if (ha1!=NULL && (strlen(ha1)>0)) obj->ha1=ms_strdup(ha1);
+       if (realm!=NULL && (strlen(realm)>0)) obj->realm=ms_strdup(realm);
+       obj->works=FALSE;
+       obj->first_time=TRUE;
+       return obj;
+}
+
+/**
+ * Sets the password.
+**/
+void linphone_auth_info_set_passwd(LinphoneAuthInfo *info, const char *passwd){
+       if (info->passwd!=NULL) {
+               ms_free(info->passwd);
+               info->passwd=NULL;
+       }
+       if (passwd!=NULL && (strlen(passwd)>0)) info->passwd=ms_strdup(passwd);
+}
+
+/**
+ * Sets the username.
+**/
+void linphone_auth_info_set_username(LinphoneAuthInfo *info, const char *username){
+       if (info->username){
+               ms_free(info->username);
+               info->username=NULL;
+       }
+       if (username && strlen(username)>0) info->username=ms_strdup(username);
+}
+
+/**
+ * Sets userid.
+**/
+void linphone_auth_info_set_userid(LinphoneAuthInfo *info, const char *userid){
+       if (info->userid){
+               ms_free(info->userid);
+               info->userid=NULL;
+       }
+       if (userid && strlen(userid)>0) info->userid=ms_strdup(userid);
+}
+
+/**
+ * Destroys a LinphoneAuthInfo object.
+**/
+void linphone_auth_info_destroy(LinphoneAuthInfo *obj){
+       if (obj->username!=NULL) ms_free(obj->username);
+       if (obj->userid!=NULL) ms_free(obj->userid);
+       if (obj->passwd!=NULL) ms_free(obj->passwd);
+       if (obj->ha1!=NULL) ms_free(obj->ha1);
+       if (obj->realm!=NULL) ms_free(obj->realm);
+       ms_free(obj);
+}
+
+void linphone_auth_info_write_config(LpConfig *config, LinphoneAuthInfo *obj, int pos)
+{
+       char key[50];
+       sprintf(key,"auth_info_%i",pos);
+       lp_config_clean_section(config,key);
+       
+       if (obj==NULL){
+               return;
+       }               
+       if (obj->username!=NULL){
+               lp_config_set_string(config,key,"username",obj->username);
+       }
+       if (obj->userid!=NULL){
+               lp_config_set_string(config,key,"userid",obj->userid);
+       }
+       if (obj->passwd!=NULL){
+               lp_config_set_string(config,key,"passwd",obj->passwd);
+       }
+       if (obj->ha1!=NULL){
+               lp_config_set_string(config,key,"ha1",obj->ha1);
+       }
+       if (obj->realm!=NULL){
+               lp_config_set_string(config,key,"realm",obj->realm);
+       }
+}
+
+LinphoneAuthInfo *linphone_auth_info_new_from_config_file(LpConfig * config, int pos)
+{
+       char key[50];
+       const char *username,*userid,*passwd,*ha1,*realm;
+       
+       sprintf(key,"auth_info_%i",pos);
+       if (!lp_config_has_section(config,key)){
+               return NULL;
+       }
+       
+       username=lp_config_get_string(config,key,"username",NULL);
+       userid=lp_config_get_string(config,key,"userid",NULL);
+       passwd=lp_config_get_string(config,key,"passwd",NULL);
+       ha1=lp_config_get_string(config,key,"ha1",NULL);
+       realm=lp_config_get_string(config,key,"realm",NULL);
+       return linphone_auth_info_new(username,userid,passwd,ha1,realm);
+}
+
+static bool_t key_match(const char *tmp1, const char *tmp2){
+       if (tmp1==NULL && tmp2==NULL) return TRUE;
+       if (tmp1!=NULL && tmp2!=NULL && strcmp(tmp1,tmp2)==0) return TRUE;
+       return FALSE;
+       
+}
+
+static char * remove_quotes(char * input){
+       char *tmp;
+       if (*input=='"') input++;
+       tmp=strchr(input,'"');
+       if (tmp) *tmp='\0';
+       return input;
+}
+
+static int realm_match(const char *realm1, const char *realm2){
+       if (realm1==NULL && realm2==NULL) return TRUE;
+       if (realm1!=NULL && realm2!=NULL){
+               if (strcmp(realm1,realm2)==0) return TRUE;
+               else{
+                       char tmp1[128];
+                       char tmp2[128];
+                       char *p1,*p2;
+                       strncpy(tmp1,realm1,sizeof(tmp1)-1);
+                       strncpy(tmp2,realm2,sizeof(tmp2)-1);
+                       p1=remove_quotes(tmp1);
+                       p2=remove_quotes(tmp2);
+                       return strcmp(p1,p2)==0;
+               }
+       }
+       return FALSE;
+}
+
+/**
+ * Retrieves a LinphoneAuthInfo previously entered into the LinphoneCore.
+**/
+LinphoneAuthInfo *linphone_core_find_auth_info(LinphoneCore *lc, const char *realm, const char *username)
+{
+       MSList *elem;
+       LinphoneAuthInfo *ret=NULL,*candidate=NULL;
+       for (elem=lc->auth_info;elem!=NULL;elem=elem->next){
+               LinphoneAuthInfo *pinfo=(LinphoneAuthInfo*)elem->data;
+               if (realm==NULL){
+                       /*return the authinfo for any realm provided that there is only one for that username*/
+                       if (key_match(pinfo->username,username)){
+                               if (ret!=NULL){
+                                       ms_warning("There are several auth info for username '%s'",username);
+                                       return NULL;
+                               }
+                               ret=pinfo;
+                       }
+               }else{
+                       /*return the exact authinfo, or an authinfo for which realm was not supplied yet*/
+                       if (pinfo->realm!=NULL){
+                               if (realm_match(pinfo->realm,realm) 
+                                       && key_match(pinfo->username,username))
+                                       ret=pinfo;
+                       }else{
+                               if (key_match(pinfo->username,username))
+                                       candidate=pinfo;
+                       }
+               }
+       }
+       if (ret==NULL && candidate!=NULL)
+               ret=candidate;
+       return ret;
+}
+
+static void refresh_exosip_auth_info(LinphoneCore *lc){
+       MSList *elem;
+       eXosip_lock();
+       eXosip_clear_authentication_info();
+       for (elem=lc->auth_info;elem!=NULL;elem=ms_list_next(elem)){
+               LinphoneAuthInfo *info=(LinphoneAuthInfo*)elem->data;
+               char *userid;
+               if (info->userid==NULL || info->userid[0]=='\0') userid=info->username;
+               else userid=info->userid;
+               eXosip_add_authentication_info(info->username,userid,
+                               info->passwd,info->ha1,info->realm);
+       }
+       eXosip_unlock();
+}
+
+/**
+ * Adds authentication information to the LinphoneCore.
+ * 
+ * This information will be used during all SIP transacations that require authentication.
+**/
+void linphone_core_add_auth_info(LinphoneCore *lc, LinphoneAuthInfo *info)
+{
+       MSList *elem;
+       LinphoneAuthInfo *ai;
+       
+       /* find if we are attempting to modify an existing auth info */
+       ai=linphone_core_find_auth_info(lc,info->realm,info->username);
+       if (ai!=NULL){
+               elem=ms_list_find(lc->auth_info,ai);
+               if (elem==NULL){
+                       ms_error("AuthInfo list corruption ?");
+                       return;
+               }
+               linphone_auth_info_destroy((LinphoneAuthInfo*)elem->data);
+               elem->data=(void *)info;
+       }else {
+               lc->auth_info=ms_list_append(lc->auth_info,(void *)info);
+       }
+       refresh_exosip_auth_info(lc);
+       /* if the user was prompted, re-allow automatic_action */
+       if (lc->automatic_action>0) lc->automatic_action--;
+}
+
+
+/**
+ * This method is used to abort a user authentication request initiated by LinphoneCore
+ * from the auth_info_requested callback of LinphoneCoreVTable.
+**/
+void linphone_core_abort_authentication(LinphoneCore *lc,  LinphoneAuthInfo *info){
+       if (lc->automatic_action>0) lc->automatic_action--;
+}
+
+/**
+ * Removes an authentication information object.
+**/
+void linphone_core_remove_auth_info(LinphoneCore *lc, LinphoneAuthInfo *info){
+       int len=ms_list_size(lc->auth_info);
+       int newlen;
+       int i;
+       MSList *elem;
+       lc->auth_info=ms_list_remove(lc->auth_info,info);
+       newlen=ms_list_size(lc->auth_info);
+       /*printf("len=%i newlen=%i\n",len,newlen);*/
+       linphone_auth_info_destroy(info);
+       for (i=0;i<len;i++){
+               linphone_auth_info_write_config(lc->config,NULL,i);
+       }
+       for (elem=lc->auth_info,i=0;elem!=NULL;elem=ms_list_next(elem),i++){
+               linphone_auth_info_write_config(lc->config,(LinphoneAuthInfo*)elem->data,i);
+       }
+       refresh_exosip_auth_info(lc);
+       
+}
+
+/**
+ * Returns an unmodifiable list of currently entered LinphoneAuthInfo.
+**/
+const MSList *linphone_core_get_auth_info_list(const LinphoneCore *lc){
+       return lc->auth_info;
+}
+
+/**
+ * Clear all authentication information.
+**/
+void linphone_core_clear_all_auth_info(LinphoneCore *lc){
+       MSList *elem;
+       int i;
+       eXosip_lock();
+       eXosip_clear_authentication_info();
+       eXosip_unlock();
+       for(i=0,elem=lc->auth_info;elem!=NULL;elem=ms_list_next(elem),i++){
+               LinphoneAuthInfo *info=(LinphoneAuthInfo*)elem->data;
+               linphone_auth_info_destroy(info);
+               linphone_auth_info_write_config(lc->config,NULL,i);
+       }
+       ms_list_free(lc->auth_info);
+       lc->auth_info=NULL;
+}
+
+void linphone_authentication_ok(LinphoneCore *lc, eXosip_event_t *ev){
+       char *prx_realm=NULL,*www_realm=NULL;
+       osip_proxy_authorization_t *prx_auth;
+       osip_authorization_t *www_auth;
+       osip_message_t *msg=ev->request;
+       char *username;
+       LinphoneAuthInfo *as=NULL;
+
+       username=osip_uri_get_username(msg->from->url);
+       osip_message_get_proxy_authorization(msg,0,&prx_auth);
+       osip_message_get_authorization(msg,0,&www_auth);
+       if (prx_auth!=NULL)
+               prx_realm=osip_proxy_authorization_get_realm(prx_auth);
+       if (www_auth!=NULL)
+               www_realm=osip_authorization_get_realm(www_auth);
+       
+       if (prx_realm==NULL && www_realm==NULL){
+               ms_message("No authentication info in the request, ignoring");
+               return;
+       }
+       /* see if we already have this auth information , not to ask it everytime to the user */
+       if (prx_realm!=NULL)
+               as=linphone_core_find_auth_info(lc,prx_realm,username);
+       if (www_realm!=NULL) 
+               as=linphone_core_find_auth_info(lc,www_realm,username);
+       if (as){
+               ms_message("Authentication for user=%s realm=%s is working.",username,prx_realm ? prx_realm : www_realm);
+               as->works=TRUE;
+       }
+}
+
+
+void linphone_core_find_or_ask_for_auth_info(LinphoneCore *lc,const char *username,const char* realm, int tid)
+{
+       LinphoneAuthInfo *as=linphone_core_find_auth_info(lc,realm,username);
+       if ( as==NULL || (as!=NULL && as->works==FALSE && as->first_time==FALSE)){
+               if (lc->vtable.auth_info_requested!=NULL){
+                       lc->vtable.auth_info_requested(lc,realm,username);
+                       lc->automatic_action++;/*suspends eXosip_automatic_action until the user supplies a password */
+               }
+       }
+       if (as) as->first_time=FALSE;
+}
+
+void linphone_process_authentication(LinphoneCore *lc, eXosip_event_t *ev)
+{
+       char *prx_realm=NULL,*www_realm=NULL;
+       osip_proxy_authenticate_t *prx_auth;
+       osip_www_authenticate_t *www_auth;
+       osip_message_t *resp=ev->response;
+       char *username;
+
+       /*
+       if (strcmp(ev->request->sip_method,"REGISTER")==0) {
+               gstate_new_state(lc, GSTATE_REG_FAILED, "Authentication required");
+       }
+       */
+
+       username=osip_uri_get_username(resp->from->url);
+       prx_auth=(osip_proxy_authenticate_t*)osip_list_get(&resp->proxy_authenticates,0);
+       www_auth=(osip_proxy_authenticate_t*)osip_list_get(&resp->www_authenticates,0);
+       if (prx_auth!=NULL)
+               prx_realm=osip_proxy_authenticate_get_realm(prx_auth);
+       if (www_auth!=NULL)
+               www_realm=osip_www_authenticate_get_realm(www_auth);
+       
+       if (prx_realm==NULL && www_realm==NULL){
+               ms_warning("No realm in the server response.");
+               return;
+       }
+       /* see if we already have this auth information , not to ask it everytime to the user */
+       if (prx_realm!=NULL) 
+               linphone_core_find_or_ask_for_auth_info(lc,username,prx_realm,ev->tid);
+       if (www_realm!=NULL) 
+               linphone_core_find_or_ask_for_auth_info(lc,username,www_realm,ev->tid);
+}
+
+
+/**
+ * @}
+**/
diff --git a/coreapi/chat.c b/coreapi/chat.c
new file mode 100644 (file)
index 0000000..9552627
--- /dev/null
@@ -0,0 +1,114 @@
+/***************************************************************************
+ *            chat.c
+ *
+ *  Sun Jun  5 19:34:18 2005
+ *  Copyright  2005  Simon Morlat
+ *  Email simon dot morlat at linphone dot org
+ ****************************************************************************/
+
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+ #include "linphonecore.h"
+ #include "private.h"
+ #include <eXosip2/eXosip.h>
+ LinphoneChatRoom * linphone_core_create_chat_room(LinphoneCore *lc, const char *to){
+       LinphoneAddress *parsed_url=NULL;
+       char *route;
+       if (linphone_core_interpret_url(lc,to,&parsed_url,&route)){
+               LinphoneChatRoom *cr=ms_new0(LinphoneChatRoom,1);
+               cr->lc=lc;
+               cr->peer=linphone_address_as_string(parsed_url);
+               cr->peer_url=parsed_url;
+               cr->route=route;
+               lc->chatrooms=ms_list_append(lc->chatrooms,(void *)cr);
+               return cr;
+       }
+       return NULL;
+ }
+ void linphone_chat_room_destroy(LinphoneChatRoom *cr){
+       LinphoneCore *lc=cr->lc;
+       lc->chatrooms=ms_list_remove(lc->chatrooms,(void *) cr);
+       linphone_address_destroy(cr->peer_url);
+       ms_free(cr->peer);
+       ms_free(cr->route);
+ }
+void linphone_chat_room_send_message(LinphoneChatRoom *cr, const char *msg){
+       const char *identity=linphone_core_get_identity(cr->lc);
+       osip_message_t *sip=NULL;
+       eXosip_message_build_request(&sip,"MESSAGE",cr->peer,identity,cr->route);
+       osip_message_set_content_type(sip,"text/plain");
+       osip_message_set_body(sip,msg,strlen(msg));
+       eXosip_message_send_request(sip);
+}
+
+bool_t linphone_chat_room_matches(LinphoneChatRoom *cr, const LinphoneAddress *from){
+       if (linphone_address_get_username(cr->peer_url) && linphone_address_get_username(from) && 
+               strcmp(linphone_address_get_username(cr->peer_url),linphone_address_get_username(from))==0) return TRUE;
+       return FALSE;
+}
+
+void linphone_chat_room_text_received(LinphoneChatRoom *cr, LinphoneCore *lc, const char *from, const char *msg){
+       if (lc->vtable.text_received!=NULL) lc->vtable.text_received(lc, cr, from, msg);
+}
+
+void linphone_core_text_received(LinphoneCore *lc, eXosip_event_t *ev){
+       MSList *elem;
+       const char *msg;
+       LinphoneChatRoom *cr=NULL;
+       char *from;
+       osip_from_t *from_url=ev->request->from;
+       osip_body_t *body=NULL;
+       LinphoneAddress *uri;
+
+       osip_message_get_body(ev->request,0,&body);
+       if (body==NULL){
+               ms_error("Could not get text message from SIP body");
+               return;
+       }
+       msg=body->body;
+       osip_from_to_str(from_url,&from);
+       uri=linphone_address_new(from);
+       osip_free(from);
+       linphone_address_clean(uri);
+       for(elem=lc->chatrooms;elem!=NULL;elem=ms_list_next(elem)){
+               cr=(LinphoneChatRoom*)elem->data;
+               if (linphone_chat_room_matches(cr,uri)){
+                       break;
+               }
+               cr=NULL;
+       }
+       from=linphone_address_as_string(uri);
+       if (cr==NULL){
+               /* create a new chat room */
+               cr=linphone_core_create_chat_room(lc,from);
+       }
+       linphone_address_destroy(uri);
+       linphone_chat_room_text_received(cr,lc,from,msg);
+       ms_free(from);
+}
+
+
+void linphone_chat_room_set_user_data(LinphoneChatRoom *cr, void * ud){
+       cr->user_data=ud;
+}
+void * linphone_chat_room_get_user_data(LinphoneChatRoom *cr){
+       return cr->user_data;
+}
diff --git a/coreapi/enum.c b/coreapi/enum.c
new file mode 100644 (file)
index 0000000..8818ae6
--- /dev/null
@@ -0,0 +1,175 @@
+/*
+linphone
+Copyright (C) 2000-2009  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+/* enum lookup code */
+
+#ifndef _WIN32_WCE
+#include <errno.h>
+#endif
+
+#include <string.h>
+
+#include "enum.h"
+
+#define DNS_ANSWER_MAX_SIZE 2048
+
+
+static char *create_enum_domain(const char *number){
+       int len=strlen(number);
+       char *domain=ms_malloc((len*2)+10);
+       int i,j;
+       
+       for (i=0,j=len-1;j>=0;j--){
+               domain[i]=number[j];
+               i++;
+               domain[i]='.';
+               i++;
+       }
+       strcpy(&domain[i],"e164.arpa");
+       ms_message("enum domain for %s is %s",number,domain);
+       return domain;
+}
+
+
+static bool_t is_a_number(const char *str){
+       char *p=(char *)str;
+       bool_t res=FALSE;
+       bool_t space_found=FALSE;
+       for(;;p++){
+               switch(p[0]){
+                       case '9':
+                       case '8':
+                       case '7':
+                       case '6':
+                       case '5':
+                       case '4':
+                       case '3':
+                       case '2':
+                       case '1':
+                       case '0':
+                               res=TRUE;
+                               if (space_found) return FALSE; /* avoid splited numbers */
+                               break;
+                       case '\0':
+                               return res;
+                               break;
+                       case ' ':
+                               space_found=TRUE;
+                               break;
+                       default:
+                               return FALSE;
+               }
+       }
+       return FALSE;
+}
+//4970072278724
+bool_t is_enum(const char *sipaddress, char **enum_domain){
+       char *p;
+       p=strstr(sipaddress,"sip:");
+       if (p==NULL) return FALSE; /* enum should look like sip:4369959250*/
+       else p+=4;
+       if (is_a_number(p)){
+               if (enum_domain!=NULL){
+                       *enum_domain=create_enum_domain(p);
+               }
+               return TRUE;
+       }
+       return FALSE;
+}
+
+
+
+int enum_lookup(const char *enum_domain, enum_lookup_res_t **res){
+       int err;
+       //char dns_answer[DNS_ANSWER_MAX_SIZE];
+       char *begin,*end;
+       char *host_result, *command;
+       int i;
+       bool_t forkok;
+       /*
+       ns_msg handle;
+       int count;
+       
+       memset(&handle,0,sizeof(handle));
+       *res=NULL;
+       ms_message("Resolving %s...",enum_domain);
+       
+       err=res_search(enum_domain,ns_c_in,ns_t_naptr,dns_answer,DNS_ANSWER_MAX_SIZE);
+       if (err<0){
+               ms_warning("Error resolving enum:",herror(h_errno));
+               return -1;
+       }
+       ns_initparse(dns_answer,DNS_ANSWER_MAX_SIZE,&handle);
+       count=ns_msg_count(handle,ns_s_an);
+       
+       for(i=0;i<count;i++){
+               ns_rr rr;
+               memset(&rr,0,sizeof(rr));
+               ns_parserr(&handle,ns_s_an,i,&rr);
+               ms_message("data=%s",ns_rr_rdata(rr));
+       }
+       */
+       command=ms_strdup_printf("host -t naptr %s",enum_domain);
+       forkok=lp_spawn_command_line_sync(command,&host_result,&err);
+       ms_free(command);
+       if (forkok){
+               if (err!=0){
+                       ms_warning("Host exited with %i error status.",err);
+                       return -1;
+               }
+       }else{
+               ms_warning("Could not spawn the \'host\' command.");
+               return -1;
+       }               
+       ms_message("Answer received from dns (err=%i): %s",err,host_result);
+       
+       begin=strstr(host_result,"sip:");
+       if (begin==0) {
+               ms_warning("No sip address found in dns naptr answer.");
+               return -1;
+       }
+       *res=ms_malloc0(sizeof(enum_lookup_res_t));
+       err=0;
+       for(i=0;i<MAX_ENUM_LOOKUP_RESULTS;i++){
+               end=strstr(begin,"!");
+               if (end==NULL) goto parse_error;
+               end[0]='\0';
+               (*res)->sip_address[i]=ms_strdup(begin);
+               err++;
+               begin=strstr(end+1,"sip:");
+               if (begin==NULL) break;
+       }
+       ms_free(host_result);
+       return err;
+
+       parse_error:
+               ms_free(*res);
+               ms_free(host_result);
+               *res=NULL;
+               ms_warning("Parse error in enum_lookup().");
+               return -1;
+}
+
+void enum_lookup_res_free(enum_lookup_res_t *res){
+       int i;
+       for (i=0;i<MAX_ENUM_LOOKUP_RESULTS;i++){
+               if (res->sip_address[i]!=NULL) ms_free(res->sip_address[i]);
+       }
+       ms_free(res);
+}
diff --git a/coreapi/enum.h b/coreapi/enum.h
new file mode 100644 (file)
index 0000000..05b285f
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+linphone
+Copyright (C) 2000  Simon MORLAT (simon.morlat@free.fr)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#ifndef ENUM_LOOKUP_H
+#define ENUM_LOOKUP_H
+
+#include "private.h"
+
+#define MAX_ENUM_LOOKUP_RESULTS 10
+
+typedef struct enum_lookup_res{
+       char *sip_address[MAX_ENUM_LOOKUP_RESULTS];
+}enum_lookup_res_t;
+
+bool_t is_enum(const char *sipaddress, char **enum_domain);
+int enum_lookup(const char *enum_domain, enum_lookup_res_t **res);
+void enum_lookup_res_free(enum_lookup_res_t *res);
+
+#endif
diff --git a/coreapi/exevents.c b/coreapi/exevents.c
new file mode 100644 (file)
index 0000000..45fdc85
--- /dev/null
@@ -0,0 +1,1186 @@
+/*
+linphone
+Copyright (C) 2000  Simon MORLAT (simon.morlat@free.fr)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#include "exevents.h"
+#include "linphonecore.h"
+#include "private.h"
+#include "mediastreamer2/mediastream.h"
+#include <eXosip2/eXosip.h>
+#include <osipparser2/osip_message.h>
+#include <osipparser2/osip_parser.h>
+
+static int linphone_answer_sdp(LinphoneCore *lc, eXosip_event_t *ev, sdp_message_t *sdp);
+
+static bool_t linphone_call_matches_event(LinphoneCall *call, eXosip_event_t *ev){
+       return call->cid==ev->cid;
+}
+
+static void linphone_call_proceeding(LinphoneCore *lc, eXosip_event_t *ev){
+       if (lc->call==NULL || (lc->call->cid!=-1 && !linphone_call_matches_event(lc->call,ev)) ) {
+               ms_warning("This call has been canceled: call=%p, call->cid=%i, ev->cid=%i",
+                       lc->call,lc->call->cid,ev->cid);
+               eXosip_lock();
+               eXosip_call_terminate(ev->cid,ev->did);
+               eXosip_unlock();
+               return;
+       }
+       lc->call->cid=ev->cid;
+       lc->call->did=ev->did;
+       lc->call->tid=ev->tid;
+}
+
+static void linphone_connect_incoming(LinphoneCore *lc){
+       lc->vtable.show(lc);
+       lc->vtable.display_status(lc,_("Connected."));
+       lc->call->state=LCStateAVRunning;
+       if (lc->ringstream!=NULL){
+               ring_stop(lc->ringstream);
+               lc->ringstream=NULL;
+       }
+       if (lc->audiostream->ticker!=NULL){
+               /*case where we accepted early media */
+               linphone_core_stop_media_streams(lc);
+               linphone_core_init_media_streams(lc);
+       }
+       linphone_core_start_media_streams(lc,lc->call);
+}
+
+int linphone_call_accepted(LinphoneCore *lc, eXosip_event_t *ev)
+{
+       LinphoneCall *call=lc->call;
+       sdp_message_t *sdp;
+       const char *sdpanswer=NULL;
+       osip_message_t *msg=NULL;
+       int err;
+       if (call==NULL){
+               ms_warning("No call to accept.");
+               return 0;
+       }
+       linphone_call_proceeding(lc,ev);
+       if (!linphone_call_matches_event(lc->call,ev)) return 0;
+       call->auth_pending=FALSE;
+       if (call->state==LCStateAVRunning){
+               return 0; /*already accepted*/
+       }
+       linphone_call_init_media_params(call);
+       sdp=eXosip_get_sdp_info(ev->response);
+       if (!lc->sip_conf.sdp_200_ack){
+               err=0;
+               sdp_context_read_answer(call->sdpctx,sdp);
+       }else{
+               /*we receive a 200OK with an sdp offer*/
+               err=linphone_answer_sdp(lc,ev,sdp);
+               if (err==0) sdpanswer=call->sdpctx->answerstr;
+       }
+       if (err==0){
+               gstate_new_state(lc, GSTATE_CALL_OUT_CONNECTED, NULL);
+               linphone_connect_incoming(lc);
+       }
+       /*send the ack once streams are started*/
+       eXosip_call_build_ack(ev->did,&msg);
+       if (sdpanswer!=NULL) linphone_set_sdp(msg,sdpanswer);
+       eXosip_call_send_ack(ev->did,msg);
+       if (err!=0){
+               /*send a bye*/
+               ms_error("Incompatible SDP offer received in 200Ok, need to abort the call");
+               linphone_core_terminate_call(lc,NULL);
+       }
+       sdp_message_free(sdp);
+       return 0;
+}
+
+
+int linphone_call_terminated(LinphoneCore *lc, eXosip_event_t *ev)
+{
+       /*stop ringing if necessary*/
+       if (lc->call!=NULL){
+               if (lc->call->cid!=ev->cid){
+                       /* this is not current call */
+                       ms_message("call %i terminated, this was not current call.",ev->cid);
+                       return 0;
+               }
+       }
+
+       ms_message("Current call terminated...");
+       if (lc->ringstream!=NULL) {
+               ring_stop(lc->ringstream);
+               lc->ringstream=NULL;
+       }
+       linphone_core_stop_media_streams(lc);
+       lc->vtable.show(lc);
+       lc->vtable.display_status(lc,_("Call terminated."));
+       gstate_new_state(lc, GSTATE_CALL_END, NULL);
+       if (lc->vtable.bye_recv!=NULL){
+               char *from;
+               osip_from_to_str(ev->request->from,&from);
+               lc->vtable.bye_recv(lc,from);
+               osip_free(from);
+       }
+       if (lc->call!=NULL){
+               linphone_call_destroy(lc->call);
+               lc->call=NULL;
+       }
+       return 0;
+}
+
+
+int linphone_call_released(LinphoneCore *lc, int cid){
+       LinphoneCall *call=lc->call;
+       if (call!=NULL && call->cid==cid){
+
+               linphone_call_destroy(lc->call);
+               lc->call=NULL;
+               lc->vtable.display_status(lc,_("Could not reach destination."));
+               gstate_new_state(lc, GSTATE_CALL_ERROR, NULL);
+       }
+       return 0;
+}
+
+int linphone_call_failure(LinphoneCore *lc, eXosip_event_t *ev)
+{
+       const char *reason="";
+       char *msg486=_("User is busy.");
+       char *msg480=_("User is temporarily unavailable.");
+       char *msg487=_("Request Cancelled.");
+       /*char *retrymsg=_("%s. Retry after %i minute(s).");*/
+       char *msg600=_("User does not want to be disturbed.");
+       char *msg603=_("Call declined.");
+       char* tmpmsg=msg486;
+       int code;
+       LinphoneCall *call=lc->call;
+
+       if (call){
+               /*check that the faillure is related to this call, not an old one*/
+               if (!linphone_call_matches_event(call,ev)) {
+                       ms_warning("Failure reported for an old call.");
+                       return 0;
+               }
+       }
+
+       if (ev->response){
+               code=osip_message_get_status_code(ev->response);
+               reason=osip_message_get_reason_phrase(ev->response);
+       }else code=-110;
+       lc->vtable.show(lc);
+
+       switch(code)
+       {
+               case 401:
+               case 407:
+                       if (lc->call!=NULL)
+                               linphone_process_authentication(lc,ev);
+                       return 0;
+                       break;
+               case 400:
+                       lc->vtable.display_status(lc,_("Bad request"));
+               break;
+               case 404:
+                       lc->vtable.display_status(lc,_("User cannot be found at given address."));
+               break;
+               case 415:
+                       lc->vtable.display_status(lc,_("Remote user cannot support any of proposed codecs."));
+               break;
+               case 422:
+                       /*ignore: eXosip_automatic_action will do the job of retrying with a greater Session-Expires*/
+                       return 0;
+               break;
+               case 480:
+                       tmpmsg=msg480;
+               case 486:
+                       /*
+                       msg_header_getbyname(msg,"retry-after",0,&retry);
+                       if (retry!=NULL)
+                       {
+                               umsg=g_malloc(strlen(tmpmsg)+strlen(retrymsg)+13);
+                               sprintf(umsg,retrymsg,tmpmsg,atoi(retry->hvalue)/60);
+                               lc->vtable.display_message(lc,umsg);
+                               ms_free(umsg);
+                       }*/
+                       lc->vtable.display_message(lc,tmpmsg);
+               break;
+               case 487:
+                       lc->vtable.display_status(lc,msg487);
+               break;
+               case 600:
+                       lc->vtable.display_message(lc,msg600);
+               break;
+               case 603:
+                       lc->vtable.display_status(lc,msg603);
+               break;
+               case -110:  /* time out, call leg is lost */
+                       lc->vtable.display_status(lc,_("Timeout."));
+               break;
+               case -111:
+                       lc->vtable.display_status(lc,_("Remote host was found but refused connection."));
+               break;
+
+               default:
+                       if (code>0)
+                       {
+                               lc->vtable.display_status(lc,reason);
+                       }
+                       else ms_warning("failure_cb unknown code=%i\n",code);
+       }
+       if (lc->ringstream!=NULL) {
+               ring_stop(lc->ringstream);
+               lc->ringstream=NULL;
+       }
+       linphone_core_stop_media_streams(lc);
+       if (call!=NULL) {
+               linphone_call_destroy(call);
+               gstate_new_state(lc, GSTATE_CALL_ERROR, NULL);
+               lc->call=NULL;
+       }
+       return 0;
+}
+
+extern sdp_handler_t linphone_sdphandler;
+
+static int linphone_answer_sdp(LinphoneCore *lc, eXosip_event_t *ev, sdp_message_t *sdp){
+       int status=200;
+       sdp_context_t *ctx=NULL;
+
+       ctx=lc->call->sdpctx;
+       /* get the result of the negociation */
+       sdp_context_get_answer(ctx,sdp);
+       status=sdp_context_get_status(ctx);
+
+       if (status==200){
+               linphone_core_init_media_streams(lc);
+               return 0;
+       }else{
+               if (status==-1) status=415;
+       }
+       return -1;
+}
+
+int linphone_inc_new_call(LinphoneCore *lc, eXosip_event_t *ev)
+{
+       sdp_message_t *sdp=NULL;
+       osip_from_t *from_url=ev->request->from;
+       char *barmesg;
+       char *from;
+       char *to;
+       int err;
+
+       osip_from_to_str(ev->request->from,&from);
+       osip_to_to_str(ev->request->to,&to);
+
+       /* first check if we can answer successfully to this invite */
+       if (lc->presence_mode!=LINPHONE_STATUS_ONLINE){
+               ms_message("Not present !! presence mode : %d\n",lc->presence_mode);
+               eXosip_lock();
+               if (lc->presence_mode==LINPHONE_STATUS_BUSY)
+                       eXosip_call_send_answer(ev->tid,486,NULL);
+               else if (lc->presence_mode==LINPHONE_STATUS_AWAY
+                        ||lc->presence_mode==LINPHONE_STATUS_BERIGHTBACK
+                        ||lc->presence_mode==LINPHONE_STATUS_ONTHEPHONE
+                        ||lc->presence_mode==LINPHONE_STATUS_OUTTOLUNCH
+                        ||lc->presence_mode==LINPHONE_STATUS_OFFLINE)
+                 eXosip_call_send_answer(ev->tid,480,NULL);
+               else if (lc->presence_mode==LINPHONE_STATUS_NOT_DISTURB)
+                 eXosip_call_send_answer(ev->tid,480,NULL);
+               else if (lc->alt_contact!=NULL && lc->presence_mode==LINPHONE_STATUS_MOVED)
+                 {
+                       osip_message_t *msg;
+                       eXosip_call_build_answer(ev->tid,302,&msg);
+                       osip_message_set_contact(msg,lc->alt_contact);
+                       eXosip_call_send_answer(ev->tid,302,msg);
+                 }
+               else if (lc->alt_contact!=NULL && lc->presence_mode==LINPHONE_STATUS_ALT_SERVICE)
+                 {
+                       osip_message_t *msg;
+                       eXosip_call_build_answer(ev->tid,380,&msg);
+                       osip_message_set_contact(msg,lc->alt_contact);
+                       eXosip_call_send_answer(ev->tid,380,msg);
+                 }
+               else
+                 eXosip_call_send_answer(ev->tid,486,NULL);
+               eXosip_unlock();
+               goto end;
+       }
+       if (lc->call!=NULL){/*busy*/
+               eXosip_lock();
+               eXosip_call_send_answer(ev->tid,486,NULL);
+               eXosip_unlock();
+               goto end;
+       }
+       lc->call=linphone_call_new_incoming(lc,linphone_address_new(from),linphone_address_new(to),ev);
+
+       sdp=eXosip_get_sdp_info(ev->request);
+       if (sdp==NULL){
+               ms_message("No sdp body in invite, 200-ack scheme");
+               err=0;
+       }else{
+               err=linphone_answer_sdp(lc,ev,sdp);
+       }
+       if (!err){
+               char *tmp;
+               if (from_2char_without_params(from_url,&tmp)!=0){
+                       tmp=ms_strdup("Unknown user");
+               }
+               gstate_new_state(lc, GSTATE_CALL_IN_INVITE, tmp);
+               barmesg=ortp_strdup_printf("%s %s",tmp,_("is contacting you."));
+               lc->vtable.show(lc);
+               lc->vtable.display_status(lc,barmesg);
+
+               /* play the ring */
+               if (lc->sound_conf.ring_sndcard!=NULL){
+                       ms_message("Starting local ring...");
+                       lc->ringstream=ring_start(lc->sound_conf.local_ring,2000,lc->sound_conf.ring_sndcard);
+               }
+               linphone_call_set_state(lc->call,LCStateRinging);
+               eXosip_lock();
+               eXosip_call_send_answer(ev->tid,180,NULL);
+               eXosip_unlock();
+
+               lc->vtable.inv_recv(lc,tmp);
+               ms_free(barmesg);
+               osip_free(tmp);
+       }else{
+               ms_error("Error during sdp negociation. ");
+               eXosip_lock();
+               eXosip_call_send_answer(ev->tid,415,NULL);
+               eXosip_unlock();
+               linphone_call_destroy(lc->call);
+               lc->call=NULL;
+       }
+       end:
+       osip_free(from);
+       osip_free(to);
+       if (sdp) sdp_message_free(sdp);
+       return 0;
+}
+
+void linphone_handle_ack(LinphoneCore *lc, eXosip_event_t *ev){
+       sdp_message_t *sdp=eXosip_get_sdp_info(ev->ack);
+       if (sdp){
+               sdp_context_read_answer(lc->call->sdpctx,sdp);
+               linphone_connect_incoming(lc);
+               sdp_message_free(sdp);
+       }
+}
+
+void linphone_handle_reinvite(LinphoneCore *lc, eXosip_event_t *ev){
+       sdp_message_t *sdp=eXosip_get_sdp_info(ev->request);
+       sdp_context_t *ctx;
+       LinphoneCall *call=lc->call;
+       char *answer;
+       int status;
+       if (sdp==NULL){
+               ms_warning("No sdp in reinvite !");
+               eXosip_lock();
+               eXosip_call_send_answer(ev->tid,603,NULL);
+               eXosip_unlock();
+               return;
+       }
+       ctx=call->sdpctx;
+       /* get the result of the negociation */
+       linphone_call_init_media_params(call);
+       answer=sdp_context_get_answer(ctx,sdp);
+       status=sdp_context_get_status(ctx);
+       if (status==200){
+               osip_message_t *msg=NULL;
+               linphone_core_stop_media_streams(lc);
+               linphone_core_init_media_streams(lc);
+               eXosip_lock();
+               if (eXosip_call_build_answer(ev->tid,200,&msg)<0){
+                       ms_warning("Reinvite for closed call ?");
+                        eXosip_unlock();
+                        linphone_core_stop_media_streams(lc);
+                       sdp_message_free(sdp);
+                       return ;
+               }
+               answer=call->sdpctx->answerstr; /* takes the sdp already computed*/
+               linphone_set_sdp(msg,answer);
+               eXosip_call_send_answer(ev->tid,200,msg);
+               eXosip_unlock();
+               linphone_core_start_media_streams(lc,call);
+       }else{
+               eXosip_lock();
+               eXosip_call_send_answer(ev->tid,status,NULL);
+               eXosip_unlock();
+       }
+       sdp_message_free(sdp);
+}
+
+void linphone_do_automatic_redirect(LinphoneCore *lc, const char *contact){
+       char *msg=ortp_strdup_printf(_("Redirected to %s..."),contact);
+       lc->vtable.display_status(lc,msg);
+       ms_free(msg);
+       if (lc->call!=NULL) linphone_call_destroy(lc->call);
+       lc->call=NULL;
+       linphone_core_invite(lc,contact);
+}
+
+void linphone_call_redirected(LinphoneCore *lc, eXosip_event_t *ev){
+       int code=osip_message_get_status_code(ev->response);
+       char *contact=NULL;
+       osip_contact_t *ct;
+       osip_message_get_contact(ev->response,0,&ct);
+       if (ct) osip_contact_to_str(ct,&contact);
+       switch(code){
+               case 380:
+                       lc->vtable.display_url(lc,_("User is not reachable at the moment but he invites you\nto contact him using the following alternate resource:"),contact);
+                       if (lc->call!=NULL) linphone_call_destroy(lc->call);
+                       lc->call=NULL;
+                       break;
+               case 302:
+                       linphone_do_automatic_redirect(lc,contact);
+                       break;
+       }
+       if (contact) osip_free(contact);
+}
+
+
+/* these are the SdpHandler callbacks: we are called in to be aware of the content
+of the SDP messages exchanged */
+
+int linphone_set_audio_offer(sdp_context_t *ctx)
+{
+       LinphoneCall *call=(LinphoneCall*)sdp_context_get_user_pointer(ctx);
+       LinphoneCore *lc=call->core;
+       PayloadType *codec;
+       MSList *elem;
+       sdp_payload_t payload;
+
+
+       elem=lc->codecs_conf.audio_codecs;
+       while(elem!=NULL){
+               codec=(PayloadType*) elem->data;
+               if (linphone_core_check_payload_type_usability(lc,codec) && payload_type_enabled(codec)){
+                       sdp_payload_init(&payload);
+                       payload.a_rtpmap=ortp_strdup_printf("%s/%i/1",codec->mime_type,codec->clock_rate);
+                       payload.pt=rtp_profile_get_payload_number_from_rtpmap(lc->local_profile,payload.a_rtpmap);
+                       payload.localport=call->audio_params.natd_port > 0 ?
+                                               call->audio_params.natd_port : lc->rtp_conf.audio_rtp_port;
+                       if (strcasecmp(codec->mime_type,"iLBC")==0){
+                               /* prefer the 30 ms mode */
+                               payload.a_fmtp="ptime=30";
+                       }
+                       sdp_context_add_audio_payload(ctx,&payload);
+                       ms_free(payload.a_rtpmap);
+               }
+               elem=ms_list_next(elem);
+       }
+       /* add telephone-event payload*/
+       sdp_payload_init(&payload);
+       payload.pt=rtp_profile_get_payload_number_from_mime(lc->local_profile,"telephone-event");
+       payload.a_rtpmap="telephone-event/8000";
+       payload.a_fmtp="0-11";
+       if (lc->dw_audio_bw>0) payload.b_as_bandwidth=lc->dw_audio_bw;
+       sdp_context_add_audio_payload(ctx,&payload);
+       return 0;
+}
+
+static int find_payload_type_number(RtpProfile *prof, PayloadType *pt){
+       int candidate=-1,i;
+       PayloadType *it;
+       for(i=0;i<127;++i){
+               it=rtp_profile_get_payload(prof,i);
+               if (it!=NULL && strcasecmp(pt->mime_type,it->mime_type)==0
+                       && (pt->clock_rate==it->clock_rate || pt->clock_rate<=0) ){
+                       if ( (pt->recv_fmtp && it->recv_fmtp && strcasecmp(pt->recv_fmtp,it->recv_fmtp)==0) ||
+                               (pt->recv_fmtp==NULL && it->recv_fmtp==NULL) ){
+                               /*exact match*/
+                               return i;
+                       }else candidate=i;
+               }
+       }
+       if (candidate==-1) ms_fatal("Should not happen.");
+       return candidate;
+}
+
+static int find_payload_type_number_best_match(RtpProfile *prof, const char *rtpmap, const char *fmtp){
+       int localpt=rtp_profile_get_payload_number_from_rtpmap(prof,rtpmap);
+       PayloadType *pt;
+       char value[10];
+       if (localpt<0) return -1;
+       pt=rtp_profile_get_payload(prof,localpt);
+       if (strcasecmp(pt->mime_type,"H264")==0){
+               /*hack for H264: need to answer with same packetization-mode*/
+               PayloadType tmp;
+               memset(&tmp,0,sizeof(tmp));
+               tmp.mime_type="H264";
+               tmp.clock_rate=pt->clock_rate;
+               if (fmtp && fmtp_get_value(fmtp,"packetization-mode",value,sizeof(value))){
+                       tmp.recv_fmtp=(atoi(value)==1) ? "packetization-mode=1" : NULL;
+               }
+               localpt=find_payload_type_number(prof,&tmp);
+       }
+       return localpt;
+}
+
+int linphone_set_video_offer(sdp_context_t *ctx)
+{
+       LinphoneCall *call=(LinphoneCall*)sdp_context_get_user_pointer(ctx);
+       LinphoneCore *lc=call->core;
+       PayloadType *codec;
+       MSList *elem;
+       bool_t firsttime=TRUE;
+
+       if (!linphone_core_video_enabled(lc)) return -1;
+
+       for(elem=lc->codecs_conf.video_codecs;elem!=NULL;elem=ms_list_next(elem)){
+               codec=(PayloadType*) elem->data;
+               if (linphone_core_check_payload_type_usability(lc,codec) && payload_type_enabled(codec)){
+                       sdp_payload_t payload;
+                       sdp_payload_init(&payload);
+                       payload.line=1;
+                       payload.a_rtpmap=ortp_strdup_printf("%s/%i",codec->mime_type,codec->clock_rate);
+                       payload.localport=call->video_params.natd_port>0 ?
+                                       call->video_params.natd_port : lc->rtp_conf.video_rtp_port;
+                       payload.pt=find_payload_type_number(lc->local_profile,codec);
+                       payload.a_fmtp=codec->recv_fmtp;
+                       if(firsttime){
+                               firsttime=FALSE;
+                               if (lc->dw_video_bw>0)
+                                       payload.b_as_bandwidth=lc->dw_video_bw;
+                       }
+                       sdp_context_add_video_payload(ctx,&payload);
+                       ms_free(payload.a_rtpmap);
+               }
+       }
+       return 0;
+}
+
+typedef enum {
+       Unsupported,
+       Supported,
+       SupportedAndValid  /* valid= the presence of this codec is enough to make a call */
+}SupportLevel;
+
+SupportLevel linphone_payload_is_supported(LinphoneCore *lc, sdp_payload_t *payload,RtpProfile *local_profile,RtpProfile *dialog_profile, bool_t answering, PayloadType **local_payload_type)
+{
+       int localpt;
+       SupportLevel ret;
+       if (payload->a_rtpmap!=NULL){
+               localpt=find_payload_type_number_best_match(local_profile,payload->a_rtpmap,payload->a_fmtp);
+       }else{
+               localpt=payload->pt;
+               ms_warning("payload has no rtpmap.");
+       }
+
+       if (localpt>=0 && localpt <128 ){
+               /* this payload is understood, but does the user want to use it ?? */
+               PayloadType *rtppayload;
+               rtppayload=rtp_profile_get_payload(local_profile,localpt);
+               if (rtppayload==NULL) {
+                       ms_warning("strange error !!");
+                       return Unsupported;
+               }
+               *local_payload_type=rtppayload;
+               if (strcmp(rtppayload->mime_type,"telephone-event")!=0){
+                       if (answering && !linphone_core_check_payload_type_usability(lc,rtppayload) ){
+                               ms_warning("payload %s is not usable",rtppayload->mime_type);
+                               return Unsupported;
+                       }
+                       if ( !payload_type_enabled(rtppayload)) {
+                               ms_warning("payload %s is not enabled.",rtppayload->mime_type);
+                               return Unsupported;
+                       }
+                       ret=SupportedAndValid;
+               }else ret=Supported;
+               if (dialog_profile!=NULL){
+                       int dbw,ubw;
+                       /* this payload is supported in our local rtp profile, so add it to the dialog rtp
+                       profile */
+                       rtppayload=payload_type_clone(rtppayload);
+                       if (rtp_profile_get_payload(dialog_profile,payload->pt)!=NULL){
+                               ms_error("Payload %s type already entered, should not happen !",rtppayload->mime_type);
+                       }
+                       rtp_profile_set_payload(dialog_profile,payload->pt,rtppayload);
+                       /* add to the rtp payload type some other parameters (bandwidth) */
+                       if (rtppayload->type==PAYLOAD_VIDEO){
+                               dbw=lc->dw_video_bw;
+                               ubw=lc->up_video_bw;
+                       }else{
+                               dbw=lc->dw_audio_bw;
+                               ubw=lc->up_audio_bw;
+                       }
+                       if (payload->b_as_bandwidth!=0){
+                               ms_message("Remote bandwidth constraint: %i",payload->b_as_bandwidth);
+                               /*obey to remote bandwidth constraint AND our own upbandwidth constraint*/
+                               rtppayload->normal_bitrate=1000*get_min_bandwidth(
+                                       payload->b_as_bandwidth, ubw);
+                       }else{
+                               /*limit to upload bandwidth if exist, else no limit*/
+                               if (ubw>0) rtppayload->normal_bitrate=1000*ubw;
+                               else {
+                                       if (rtppayload->type!=PAYLOAD_VIDEO){
+                                               rtppayload->normal_bitrate=-1; /*allow speex to use maximum bitrate*/
+                                       }
+                               }
+                       }
+                       if (payload->a_fmtp!=NULL){
+                               payload_type_set_send_fmtp(rtppayload,payload->a_fmtp);
+                       }
+                       payload->a_fmtp=rtppayload->recv_fmtp;
+                       if (payload->a_ptime>0){
+                               char tmp[30];
+                               snprintf(tmp,sizeof(tmp),"ptime=%i",payload->a_ptime);
+                               payload_type_append_send_fmtp(rtppayload,tmp);
+                               ms_message("%s attribute added to fmtp",tmp);
+                       }
+               }
+               return ret;
+       }
+       return Unsupported;
+}
+
+int linphone_accept_audio_offer(sdp_context_t *ctx,sdp_payload_t *payload)
+{
+       RtpProfile *remote_profile;
+       StreamParams *params;
+       SupportLevel supported;
+       LinphoneCall *call=(LinphoneCall*)sdp_context_get_user_pointer(ctx);
+       LinphoneCore *lc=call->core;
+       PayloadType *lpt=NULL;
+
+       params=&call->audio_params;
+       remote_profile=call->profile;
+       /* see if this codec is supported in our local rtp profile*/
+       supported=linphone_payload_is_supported(lc,payload,lc->local_profile,remote_profile,TRUE,&lpt);
+       if (supported==Unsupported) {
+               ms_message("Refusing audio codec %i (%s)",payload->pt,payload->a_rtpmap);
+               return -1;
+       }
+       if (lc->sip_conf.only_one_codec && params->initialized){
+               ms_message("Only one codec has to be accepted.");
+               return -1;
+       }
+       if (supported==SupportedAndValid) {
+               if (params->initialized==0){
+                       /* this is the first codec we accept, it is going to be used*/
+                       params->localport=lc->rtp_conf.audio_rtp_port;
+                       payload->localport=params->natd_port>0 ?
+                               params->natd_port : lc->rtp_conf.audio_rtp_port;
+                       params->line=payload->line;
+                       params->pt=payload->pt; /* remember the first payload accepted */
+                       if (payload->relay_host!=NULL){
+                               strncpy(params->remoteaddr,payload->relay_host,sizeof(params->remoteaddr)-1);
+                               params->remoteport=payload->relay_port;
+                               params->remotertcpport=payload->relay_port;
+                               params->relay_session_id=payload->relay_session_id;
+                       }else{
+                               strncpy(params->remoteaddr,payload->c_addr,sizeof(params->remoteaddr)-1);
+                               params->remoteport=payload->remoteport;
+                               params->remotertcpport=payload->remoteport+1;
+                       }
+                       params->initialized=1;
+                       /* we can now update the allocated bandwidth for audio, and then video*/
+                       linphone_core_update_allocated_audio_bandwidth_in_call(lc,lpt);
+                       /* give our download bandwidth constraint*/
+                       payload->b_as_bandwidth=(lc->dw_audio_bw>0) ? lc->dw_audio_bw : 0;
+               }else{
+                       /* refuse all other audio lines*/
+                       if(params->line!=payload->line) {
+                               ms_message("Only one audio line can be accepted.");
+#if !defined(_WIN32_WCE)
+                               abort();
+#endif /*_WIN32_WCE*/
+                               return -1;
+                       }
+               }
+       }
+       return 0;
+}
+
+int linphone_accept_video_offer(sdp_context_t *ctx,sdp_payload_t *payload)
+{
+       LinphoneCall *call=(LinphoneCall*)sdp_context_get_user_pointer(ctx);
+       LinphoneCore *lc=call->core;
+       RtpProfile *remote_profile;
+       StreamParams *params;
+       SupportLevel supported;
+       PayloadType *lpt=NULL;
+
+       if (!linphone_core_video_enabled(lc)) return -1;
+
+       if (payload->remoteport==0) {
+               ms_message("Video stream refused by remote.");
+               return 0;
+       }
+
+       params=&call->video_params;
+       remote_profile=call->profile;
+       /* see if this codec is supported in our local rtp profile*/
+       supported=linphone_payload_is_supported(lc,payload,lc->local_profile,remote_profile,TRUE,&lpt);
+       if (supported==Unsupported) {
+               ms_message("Refusing video codec %i (%s)",payload->pt,payload->a_rtpmap);
+               return -1;
+       }
+       if (lc->sip_conf.only_one_codec && params->initialized){
+               return -1;
+       }
+       if (supported==SupportedAndValid){
+               if (params->initialized==0){
+                       /* this is the first codec we may accept*/
+                       params->localport=lc->rtp_conf.video_rtp_port;
+                       payload->localport=params->natd_port>0 ? params->natd_port : lc->rtp_conf.video_rtp_port;
+                       params->line=payload->line;
+                       params->pt=payload->pt; /* remember the first payload accepted */
+                       if (payload->relay_host!=NULL){
+                               strncpy(params->remoteaddr,payload->relay_host,sizeof(params->remoteaddr)-1);
+                               params->remoteport=payload->relay_port;
+                               params->remotertcpport=payload->relay_port;
+                               params->relay_session_id=payload->relay_session_id;
+                       }else{
+                               strncpy(params->remoteaddr,payload->c_addr,sizeof(params->remoteaddr)-1);
+                               params->remoteport=payload->remoteport;
+                               params->remotertcpport=params->remoteport+1;
+                       }
+                       params->initialized=1;
+                       payload->b_as_bandwidth=(lc->dw_video_bw>0) ? lc->dw_video_bw : 0;
+               }else{
+                       /* refuse all other video lines*/
+                       if(params->line!=payload->line) return -1;
+               }
+       }
+       return 0;
+}
+
+int linphone_read_audio_answer(sdp_context_t *ctx,sdp_payload_t *payload)
+{
+       LinphoneCall *call=(LinphoneCall*)sdp_context_get_user_pointer(ctx);
+       LinphoneCore *lc=call->core;
+       StreamParams *params;
+       SupportLevel supported;
+       PayloadType *lpt=NULL;
+
+       /* paranoid check: see if this codec is supported in our local rtp profile*/
+       supported=linphone_payload_is_supported(lc, payload,lc->local_profile,call->profile,FALSE,&lpt);
+       if (supported==Unsupported) {
+               ms_warning("This remote sip phone did not answer properly to my sdp offer: rtpmap=%s",payload->a_rtpmap);
+               return 0;
+       }
+       if (supported==SupportedAndValid){
+               params=&call->audio_params;
+               if (params->initialized==0){
+                       /* this is the first codec we accept, this is the one that is going to be used (at least for sending
+                       data.*/
+                       params->localport=lc->rtp_conf.audio_rtp_port;
+                       params->line=payload->line;
+                       params->pt=payload->pt; /* remember the first payload accepted */
+                       if (payload->relay_host!=NULL){
+                               strncpy(params->remoteaddr,payload->relay_host,sizeof(params->remoteaddr)-1);
+                               params->remoteport=payload->relay_port;
+                               params->remotertcpport=payload->relay_port;
+                               params->relay_session_id=payload->relay_session_id;
+                       }else{
+                               strncpy(params->remoteaddr,payload->c_addr,sizeof(params->remoteaddr)-1);
+                               params->remoteport=payload->remoteport;
+                               params->remotertcpport=payload->remoteport+1;
+                       }
+                       params->initialized=1;
+                       /* we can now update the allocated bandwidth for audio, and then video*/
+                       linphone_core_update_allocated_audio_bandwidth_in_call(lc,lpt);
+               }
+       }
+       return 0;
+}
+
+int linphone_read_video_answer(sdp_context_t *ctx,sdp_payload_t *payload)
+{
+       LinphoneCall *call=(LinphoneCall*)sdp_context_get_user_pointer(ctx);
+       LinphoneCore *lc=call->core;
+       StreamParams *params;
+       SupportLevel supported;
+       PayloadType *lpt=NULL;
+
+       /* paranoid check: see if this codec is supported in our local rtp profile*/
+       supported=linphone_payload_is_supported(lc, payload,lc->local_profile,call->profile,FALSE,&lpt);
+       if (supported==Unsupported) {
+               ms_warning("This remote sip phone did not answer properly to my sdp offer: rtpmap=%s",payload->a_rtpmap);
+               return 0;
+       }
+       if (supported==SupportedAndValid){
+               params=&call->video_params;
+               if (params->initialized==0){
+                       /* this is the first codec we may accept*/
+                       params->localport=lc->rtp_conf.video_rtp_port;
+                       params->line=payload->line;
+                       params->pt=payload->pt; /* remember the first payload accepted */
+                       if (payload->relay_host!=NULL){
+                               strncpy(params->remoteaddr,payload->relay_host,sizeof(params->remoteaddr)-1);
+                               params->remoteport=payload->relay_port;
+                               params->remotertcpport=payload->relay_port;
+                               params->relay_session_id=payload->relay_session_id;
+                       }else{
+                               strncpy(params->remoteaddr,payload->c_addr,sizeof(params->remoteaddr)-1);
+                               params->remoteport=payload->remoteport;
+                               params->remotertcpport=payload->remoteport+1;
+                       }
+                       params->initialized=1;
+               }
+       }
+       return 0;
+}
+
+void linphone_call_ringing(LinphoneCore *lc, eXosip_event_t *ev){
+       sdp_message_t *sdp=eXosip_get_sdp_info(ev->response);
+       LinphoneCall *call=lc->call;
+
+       lc->vtable.display_status(lc,_("Remote ringing."));
+       linphone_call_proceeding(lc,ev);
+       if (call==NULL) return;
+       if (sdp==NULL){
+               if (lc->ringstream!=NULL) return;       /*already ringing !*/
+               if (lc->sound_conf.play_sndcard!=NULL){
+                       ms_message("Remote ringing...");
+                       lc->ringstream=ring_start(lc->sound_conf.remote_ring,2000,lc->sound_conf.play_sndcard);
+               }
+       }else{
+               /*accept early media */
+               StreamParams *audio_params;
+               if (call==NULL){
+                       ms_error("No call ?");
+                       goto end;
+               }
+               if (lc->audiostream->ticker!=NULL){
+                       /*streams already started */
+                       ms_message("Early media already started.");
+                       goto end;
+               }
+               audio_params=&call->audio_params;
+               sdp_context_read_answer(lc->call->sdpctx,sdp);
+               lc->vtable.show(lc);
+               lc->vtable.display_status(lc,_("Early media."));
+               gstate_new_state(lc, GSTATE_CALL_OUT_CONNECTED, NULL);
+               if (lc->ringstream!=NULL){
+                       ring_stop(lc->ringstream);
+                       lc->ringstream=NULL;
+               }
+               ms_message("Doing early media...");
+               linphone_core_start_media_streams(lc,call);
+       }
+       call->state=LCStateRinging;
+       goto end;
+       end:
+               sdp_message_free(sdp);
+
+}
+
+static void linphone_process_media_control_xml(LinphoneCore *lc, eXosip_event_t *ev){
+       osip_body_t *body=NULL;
+       osip_message_get_body(ev->request,0,&body);
+       if (body && body->body!=NULL &&
+               strstr(body->body,"picture_fast_update")){
+               osip_message_t *ans=NULL;
+               ms_message("Receiving VFU request !");
+#ifdef VIDEO_ENABLED
+               if (lc->videostream)
+                       video_stream_send_vfu(lc->videostream);
+#endif
+               eXosip_call_build_answer(ev->tid,200,&ans);
+               if (ans)
+                       eXosip_call_send_answer(ev->tid,200,ans);
+       }
+}
+
+static void linphone_process_dtmf_relay(LinphoneCore *lc, eXosip_event_t *ev){
+       osip_body_t *body=NULL;
+       osip_message_get_body(ev->request,0,&body);
+       if (body && body->body!=NULL){
+               osip_message_t *ans=NULL;
+               const char *name=strstr(body->body,"Signal");
+               if (name==NULL) name=strstr(body->body,"signal");
+               if (name==NULL) {
+                       ms_warning("Could not extract the dtmf name from the SIP INFO.");
+               }else{
+                       char tmp[2];
+                       name+=strlen("signal");
+                       if (sscanf(name," = %1s",tmp)==1){
+                               ms_message("Receiving dtmf %s via SIP INFO.",tmp);
+                               if (lc->vtable.dtmf_received != NULL)
+                                       lc->vtable.dtmf_received(lc, tmp[0]);
+                       }
+               }
+
+               eXosip_call_build_answer(ev->tid,200,&ans);
+               if (ans)
+                       eXosip_call_send_answer(ev->tid,200,ans);
+       }
+}
+
+void linphone_call_message_new(LinphoneCore *lc, eXosip_event_t *ev){
+       osip_message_t *ans=NULL;
+       if (ev->request){
+               if (MSG_IS_INFO(ev->request)){
+                       osip_content_type_t *ct;
+                       ct=osip_message_get_content_type(ev->request);
+                       if (ct && ct->subtype){
+                               if (strcmp(ct->subtype,"media_control+xml")==0)
+                                       linphone_process_media_control_xml(lc,ev);
+                               else if (strcmp(ct->subtype,"dtmf-relay")==0)
+                                       linphone_process_dtmf_relay(lc,ev);
+                               else {
+                                       ms_message("Unhandled SIP INFO.");
+                                       /*send an "Not implemented" answer*/
+                                       eXosip_call_build_answer(ev->tid,501,&ans);
+                                       if (ans)
+                                               eXosip_call_send_answer(ev->tid,501,ans);
+                               }
+                       }else{
+                               /*empty SIP INFO, probably to test we are alive. Send an empty answer*/
+                               eXosip_call_build_answer(ev->tid,200,&ans);
+                                       if (ans)
+                                               eXosip_call_send_answer(ev->tid,200,ans);
+                       }
+               }
+       }else ms_warning("linphone_call_message_new: No request ?");
+}
+
+void linphone_registration_faillure(LinphoneCore *lc, eXosip_event_t *ev){
+       int status_code=0;
+       char *msg;
+       const char *reason=NULL;
+       osip_uri_t *requri=osip_message_get_uri(ev->request);
+       char *ru;
+       LinphoneProxyConfig *cfg;
+
+       if (ev->response){
+               status_code=osip_message_get_status_code(ev->response);
+               reason=osip_message_get_reason_phrase(ev->response);
+       }
+       switch(status_code){
+               case 401:
+               case 407:
+                       linphone_process_authentication(lc,ev);
+                       break;
+               default:
+                       cfg=linphone_core_get_proxy_config_from_rid(lc,ev->rid);
+                       /* if contact is up to date, process the failure, otherwise resend a new register with
+                               updated contact first, just in case the faillure is due to incorrect contact */
+                       if (linphone_proxy_config_register_again_with_updated_contact(cfg,ev->request,ev->response))
+                               return; /*we are retrying with an updated contact*/
+                       if (status_code==403) linphone_proxy_config_process_authentication_failure(lc,ev);
+                       osip_uri_to_str(requri,&ru);
+                       msg=ortp_strdup_printf(_("Registration on %s failed: %s"),ru,(reason!=NULL) ? reason : _("no response timeout"));
+                       lc->vtable.display_status(lc,msg);
+                       gstate_new_state(lc, GSTATE_REG_FAILED, msg);
+                       ms_free(msg);
+                       osip_free(ru);
+       }
+}
+
+void linphone_registration_success(LinphoneCore *lc,eXosip_event_t *ev){
+       LinphoneProxyConfig *cfg;
+       osip_uri_t *requri=osip_message_get_uri(ev->request);
+       char *msg;
+       char *ru;
+       osip_header_t *h=NULL;
+
+       cfg=linphone_core_get_proxy_config_from_rid(lc,ev->rid);
+       ms_return_if_fail(cfg!=NULL);
+
+       gstate_new_state(lc, GSTATE_REG_OK, NULL);
+       osip_message_get_expires(ev->request,0,&h);
+       if (h!=NULL && atoi(h->hvalue)!=0){
+               cfg->registered=TRUE;
+               linphone_proxy_config_register_again_with_updated_contact(cfg,ev->request,ev->response);
+       }else cfg->registered=FALSE;
+
+       osip_uri_to_str(requri,&ru);
+       if (cfg->registered) msg=ms_strdup_printf(_("Registration on %s successful."),ru);
+       else msg=ms_strdup_printf(_("Unregistration on %s done."),ru);
+       lc->vtable.display_status(lc,msg);
+       ms_free(msg);
+       osip_free(ru);
+}
+
+static bool_t comes_from_local_if(osip_message_t *msg){
+       osip_via_t *via=NULL;
+       osip_message_get_via(msg,0,&via);
+       if (via){
+               const char *host;
+               host=osip_via_get_host(via);
+               if (strcmp(host,"127.0.0.1")==0 || strcmp(host,"::1")==0){
+                       osip_generic_param_t *param=NULL;
+                       osip_via_param_get_byname(via,"received",&param);
+                       if (param==NULL) return TRUE;
+                       if (param->gvalue &&
+                               (strcmp(param->gvalue,"127.0.0.1")==0 || strcmp(param->gvalue,"::1")==0)){
+                               return TRUE;
+                       }
+               }
+       }
+       return FALSE;
+}
+
+static void linphone_inc_update(LinphoneCore *lc, eXosip_event_t *ev){
+       osip_message_t *msg=NULL;
+       ms_message("Processing incoming UPDATE");
+       eXosip_lock();
+       eXosip_message_build_answer(ev->tid,200,&msg);
+       if (msg!=NULL)
+               eXosip_message_send_answer(ev->tid,200,msg);
+       eXosip_unlock();
+}
+
+static void linphone_other_request(LinphoneCore *lc, eXosip_event_t *ev){
+       ms_message("in linphone_other_request");
+       if (ev->request==NULL) return;
+       if (strcmp(ev->request->sip_method,"MESSAGE")==0){
+               linphone_core_text_received(lc,ev);
+               eXosip_message_send_answer(ev->tid,200,NULL);
+       }else if (strcmp(ev->request->sip_method,"OPTIONS")==0){
+               osip_message_t *options=NULL;
+               eXosip_options_build_answer(ev->tid,200,&options);
+               osip_message_set_allow(options,"INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, SUBSCRIBE, NOTIFY, INFO");
+               osip_message_set_accept(options,"application/sdp");
+               eXosip_options_send_answer(ev->tid,200,options);
+       }else if (strcmp(ev->request->sip_method,"WAKEUP")==0
+               && comes_from_local_if(ev->request)) {
+               eXosip_message_send_answer(ev->tid,200,NULL);
+               ms_message("Receiving WAKEUP request !");
+               if (lc->vtable.show)
+                       lc->vtable.show(lc);
+       }else if (strncmp(ev->request->sip_method, "REFER", 5) == 0){
+               ms_message("Receiving REFER request !");
+               if (comes_from_local_if(ev->request)) {
+                       osip_header_t *h=NULL;
+                       osip_message_header_get_byname(ev->request,"Refer-To",0,&h);
+                       eXosip_message_send_answer(ev->tid,200,NULL);
+                       if (h){
+                               if (lc->vtable.refer_received)
+                                       lc->vtable.refer_received(lc,h->hvalue);
+                       }
+
+               }else ms_warning("Ignored REFER not coming from this local loopback interface.");
+       }else if (strncmp(ev->request->sip_method, "UPDATE", 6) == 0){
+               linphone_inc_update(lc,ev);
+       }else {
+               char *tmp=NULL;
+               size_t msglen=0;
+               osip_message_to_str(ev->request,&tmp,&msglen);
+               if (tmp){
+                       ms_message("Unsupported request received:\n%s",tmp);
+                       osip_free(tmp);
+               }
+               /*answer with a 501 Not implemented*/
+               eXosip_message_send_answer(ev->tid,501,NULL);
+       }
+}
+
+void linphone_core_process_event(LinphoneCore *lc,eXosip_event_t *ev)
+{
+       switch(ev->type){
+               case EXOSIP_CALL_ANSWERED:
+                       ms_message("CALL_ANSWERED\n");
+                       linphone_call_accepted(lc,ev);
+                       linphone_authentication_ok(lc,ev);
+                       break;
+               case EXOSIP_CALL_CLOSED:
+               case EXOSIP_CALL_CANCELLED:
+                       ms_message("CALL_CLOSED or CANCELLED\n");
+                       linphone_call_terminated(lc,ev);
+                       break;
+               case EXOSIP_CALL_TIMEOUT:
+               case EXOSIP_CALL_NOANSWER:
+                       ms_message("CALL_TIMEOUT or NOANSWER\n");
+                       linphone_call_failure(lc,ev);
+                       break;
+               case EXOSIP_CALL_REQUESTFAILURE:
+               case EXOSIP_CALL_GLOBALFAILURE:
+               case EXOSIP_CALL_SERVERFAILURE:
+                       ms_message("CALL_REQUESTFAILURE or GLOBALFAILURE or SERVERFAILURE\n");
+                       linphone_call_failure(lc,ev);
+                       break;
+               case EXOSIP_CALL_INVITE:
+                       ms_message("CALL_NEW\n");
+                       /* CALL_NEW is used twice in qos mode :
+                        * when you receive invite (textinfo = "With QoS" or "Without QoS")
+                        * and when you receive update (textinfo = "New Call") */
+                       linphone_inc_new_call(lc,ev);
+                       break;
+               case EXOSIP_CALL_REINVITE:
+                       linphone_handle_reinvite(lc,ev);
+                       break;
+               case EXOSIP_CALL_ACK:
+                       ms_message("CALL_ACK");
+                       linphone_handle_ack(lc,ev);
+                       break;
+               case EXOSIP_CALL_REDIRECTED:
+                       ms_message("CALL_REDIRECTED");
+                       linphone_call_redirected(lc,ev);
+                       break;
+               case EXOSIP_CALL_PROCEEDING:
+                       ms_message("CALL_PROCEEDING");
+                       linphone_call_proceeding(lc,ev);
+                       break;
+               case EXOSIP_CALL_RINGING:
+                       ms_message("CALL_RINGING");
+                       linphone_call_ringing(lc,ev);
+                       break;
+               case EXOSIP_CALL_MESSAGE_NEW:
+                       ms_message("EXOSIP_CALL_MESSAGE_NEW");
+                       linphone_call_message_new(lc,ev);
+                       break;
+               case EXOSIP_CALL_MESSAGE_REQUESTFAILURE:
+                       if (ev->did<0 && ev->response &&
+                               (ev->response->status_code==407 || ev->response->status_code==401)){
+                                eXosip_default_action(ev);
+                       }
+                       break;
+               case EXOSIP_IN_SUBSCRIPTION_NEW:
+                       ms_message("CALL_SUBSCRIPTION_NEW or UPDATE");
+                       linphone_subscription_new(lc,ev);
+                       break;
+               case EXOSIP_SUBSCRIPTION_UPDATE:
+                       break;
+               case EXOSIP_SUBSCRIPTION_NOTIFY:
+                       ms_message("CALL_SUBSCRIPTION_NOTIFY");
+                       linphone_notify_recv(lc,ev);
+                       break;
+               case EXOSIP_SUBSCRIPTION_ANSWERED:
+                       ms_message("EXOSIP_SUBSCRIPTION_ANSWERED, ev->sid=%i\n",ev->sid);
+                       linphone_subscription_answered(lc,ev);
+                       break;
+               case EXOSIP_SUBSCRIPTION_CLOSED:
+                       ms_message("EXOSIP_SUBSCRIPTION_CLOSED\n");
+                       linphone_subscription_closed(lc,ev);
+                       break;
+               case EXOSIP_CALL_RELEASED:
+                       ms_message("CALL_RELEASED\n");
+                       linphone_call_released(lc, ev->cid);
+                       break;
+               case EXOSIP_REGISTRATION_FAILURE:
+                       ms_message("REGISTRATION_FAILURE\n");
+                       linphone_registration_faillure(lc,ev);
+                       break;
+               case EXOSIP_REGISTRATION_SUCCESS:
+                       linphone_authentication_ok(lc,ev);
+                       linphone_registration_success(lc,ev);
+                       break;
+               case EXOSIP_MESSAGE_NEW:
+                       linphone_other_request(lc,ev);
+                       break;
+               case EXOSIP_MESSAGE_REQUESTFAILURE:
+                       if (ev->response && (ev->response->status_code == 407 || ev->response->status_code == 401)){
+                               /*the user is expected to have registered to the proxy, thus password is known*/
+                               eXosip_default_action(ev);
+                       }
+                       break;
+               default:
+                       ms_message("Unhandled exosip event !");
+                       break;
+       }
+       eXosip_event_free(ev);
+}
diff --git a/coreapi/exevents.h b/coreapi/exevents.h
new file mode 100644 (file)
index 0000000..c7e7baa
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+linphone
+Copyright (C) 2000  Simon MORLAT (simon.morlat@free.fr)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#ifndef EXEVENTS_H
+#define EXEVENTS_H
+#include <eXosip2/eXosip.h>
+#include "sdphandler.h"
+
+
+void linphone_core_process_event(LinphoneCore *lc, eXosip_event_t *ev);
+
+/* these are the SdpHandler callbacks: we are called in to be aware of the content
+of the SDP messages exchanged */
+
+int linphone_set_audio_offer(sdp_context_t *ctx);
+int linphone_set_video_offer(sdp_context_t *ctx);
+int linphone_accept_audio_offer(sdp_context_t *ctx,sdp_payload_t *payload);
+int linphone_accept_video_offer(sdp_context_t *ctx,sdp_payload_t *payload);
+int linphone_read_audio_answer(sdp_context_t *ctx,sdp_payload_t *payload);
+int linphone_read_video_answer(sdp_context_t *ctx,sdp_payload_t *payload);
+
+void linphone_core_text_received(LinphoneCore *lc, eXosip_event_t *ev);
+
+#endif
diff --git a/coreapi/fonis.c b/coreapi/fonis.c
new file mode 100644 (file)
index 0000000..040f68c
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+linphone
+Copyright (C) 2000  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+
+#include "sipsetup.h"
+#include "p2pproxy.h"
+
+static ms_thread_t fonis_thread;
+
+
+static void *fonis_thread_func(void *arg){
+       if (p2pproxy_application_start(0,NULL)!=0){
+               ms_error("Fail to start fonis thread !");
+       }
+       return NULL;
+}
+
+static bool_t fonis_init(void){
+       static bool_t initd=FALSE;
+       if (!initd){
+               ms_thread_create(&fonis_thread,NULL,fonis_thread_func,NULL);
+               initd=TRUE;
+       }
+       return TRUE;
+}
+
+
+static int fonis_create_account(const char *uri, const char *passwd){
+       int err=p2pproxy_accountmgt_createAccount(uri);
+       if (err<0) return -1;
+       return 0;
+}
+
+static int fonis_login_account(SipSetupContext * ctx,const char *uri, const char *passwd){
+       if (p2pproxy_accountmgt_isValidAccount==P2PPROXY_ACCOUNTMGT_USER_EXIST) {
+               return 0;
+       }
+       else return -1;
+}
+
+static int fonis_get_proxy(SipSetupContext *ctx, const char *domain, char *proxy, size_t sz){
+       int err=p2pproxy_resourcemgt_lookup_sip_proxy(proxy,sz,(char*)domain);
+       if (err==0) return 0;
+       else return -1;
+}
+
+static int fonis_get_stun_servers(SipSetupContext *ctx, char *stun1, char *stun2, size_t size){
+       FonisContext *fc=(FonisContext*)ctx->data;
+       int ret=-1;
+       p2pproxy_resourcemgt_resource_list_t* l=p2pproxy_resourcemgt_new_resource_list();
+       if (p2pproxy_resourcemgt_lookup_media_resource(l,ctx->domain)==0){
+               if (l->size>0) strncpy(stun1,l->resource_uri[0],size);
+               if (l->size>1) strncpy(stun2,l->resource_uri[1],size);
+               ret=0;
+       }
+       p2pproxy_resourcemgt_delete_resource_list(l);
+       return ret;
+}
+
+static int fonis_get_stun_relay(SipSetupContext *ctx, char *relay, size_t size){
+       FonisContext *fc=(FonisContext*)ctx->data;
+       int ret=-1;
+       p2pproxy_resourcemgt_resource_list_t* l=p2pproxy_resourcemgt_new_resource_list();
+       if (p2pproxy_resourcemgt_lookup_media_resource(l,ctx->domain)==0){
+               if (l->size>0) strncpy(relay,l->resource_uri[0],size);
+               ret=0;
+       }
+       p2pproxy_resourcemgt_delete_resource_list(l);
+       return ret;
+}
+
+
+SipSetup fonis_sip_setup={
+       .name="fonis",
+       .init=fonis_init,
+       .create_account=fonis_create_account,
+       .login_account=fonis_login_account,
+       .get_proxy=fonis_get_proxy,
+       .get_stun_servers=fonis_get_stun_servers,
+       .get_relay=fonis_get_relay,
+       .exit=p2pproxy_application_stop
+};
+
diff --git a/coreapi/friend.c b/coreapi/friend.c
new file mode 100644 (file)
index 0000000..08f072d
--- /dev/null
@@ -0,0 +1,822 @@
+/***************************************************************************
+ *            friend.c
+ *
+ *  Sat May 15 15:25:16 2004
+ *  Copyright  2004-2009  Simon Morlat
+ *  Email
+ ****************************************************************************/
+
+/*
+ *  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 Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "linphonecore.h"
+#include "private.h"
+#include <eXosip2/eXosip.h>
+#include <osipparser2/osip_message.h>
+#include "lpconfig.h"
+
+const char *linphone_online_status_to_string(LinphoneOnlineStatus ss){
+       const char *str=NULL;
+       switch(ss){
+               case LINPHONE_STATUS_UNKNOWN:
+               str=_("Unknown");
+               break;
+               case LINPHONE_STATUS_ONLINE:
+               str=_("Online");
+               break;
+               case LINPHONE_STATUS_BUSY:
+               str=_("Busy");
+               break;
+               case LINPHONE_STATUS_BERIGHTBACK:
+               str=_("Be right back");
+               break;
+               case LINPHONE_STATUS_AWAY:
+               str=_("Away");
+               break;
+               case LINPHONE_STATUS_ONTHEPHONE:
+               str=_("On the phone");
+               break;
+               case LINPHONE_STATUS_OUTTOLUNCH:
+               str=_("Out to lunch");
+               break;
+               case LINPHONE_STATUS_NOT_DISTURB:
+               str=_("Do not disturb");
+               break;
+               case LINPHONE_STATUS_MOVED:
+               str=_("Moved");
+               break;
+               case LINPHONE_STATUS_ALT_SERVICE:
+               str=_("Using another messaging service");
+               break;
+               case LINPHONE_STATUS_OFFLINE:
+               str=_("Offline");
+               break;
+               case LINPHONE_STATUS_PENDING:
+               str=_("Pending");
+               break;
+               case LINPHONE_STATUS_CLOSED:
+               str=_("Closed");
+               break;
+               default:
+               str=_("Unknown-bug");
+       }
+       return str;
+}
+
+static int friend_data_compare(const void * a, const void * b, void * data){
+       LinphoneAddress *fa=((LinphoneFriend*)a)->uri;
+       LinphoneAddress *fb=((LinphoneFriend*)b)->uri;
+       const char *ua,*ub;
+       ua=linphone_address_get_username(fa);
+       ub=linphone_address_get_username(fb);
+       if (ua!=NULL && ub!=NULL) {
+               //printf("Comparing usernames %s,%s\n",ua,ub);
+               return strcasecmp(ua,ub);
+       }
+       else {
+               /* compare hosts*/
+               ua=linphone_address_get_domain(fa);
+               ub=linphone_address_get_domain(fb);
+               if (ua!=NULL && ub!=NULL){
+                       int ret=strcasecmp(ua,ub);
+                       //printf("Comparing hostnames %s,%s,res=%i\n",ua,ub,ret);
+                       return ret;
+               }
+               else return -1;
+       }
+}
+
+static int friend_compare(const void * a, const void * b){
+       return friend_data_compare(a,b,NULL);
+}
+
+
+MSList *linphone_find_friend(MSList *fl, const LinphoneAddress *friend, LinphoneFriend **lf){
+       MSList *res=NULL;
+       LinphoneFriend dummy;
+       if (lf!=NULL) *lf=NULL;
+       dummy.uri=(LinphoneAddress*)friend;
+       res=ms_list_find_custom(fl,friend_compare,&dummy);
+       if (lf!=NULL && res!=NULL) *lf=(LinphoneFriend*)res->data;
+       return res;
+}
+
+LinphoneFriend *linphone_find_friend_by_nid(MSList *l, int nid){
+       MSList *elem;
+       for (elem=l;elem!=NULL;elem=elem->next){
+               LinphoneFriend *lf=(LinphoneFriend*)elem->data;
+               if (lf->nid==nid) return lf;
+       }
+       return NULL;
+}
+
+LinphoneFriend *linphone_find_friend_by_sid(MSList *l, int sid){
+       MSList *elem;
+       for (elem=l;elem!=NULL;elem=elem->next){
+               LinphoneFriend *lf=(LinphoneFriend*)elem->data;
+               if (lf->sid==sid) return lf;
+       }
+       return NULL;
+}
+
+void __linphone_friend_do_subscribe(LinphoneFriend *fr){
+       char *friend=NULL;
+       const char *route=NULL;
+       const char *from=NULL;
+       osip_message_t *msg=NULL;
+       friend=linphone_address_as_string(fr->uri);
+       if (fr->proxy!=NULL){
+               route=fr->proxy->reg_route;
+               from=fr->proxy->reg_identity;
+       }else from=linphone_core_get_primary_contact(fr->lc);
+       if (fr->sid<0){
+               /* people for which we don't have yet an answer should appear as offline */
+               fr->lc->vtable.notify_recv(fr->lc,(LinphoneFriend*)fr,friend,_("Gone"),"sip-closed.png");
+       }
+       eXosip_lock();
+       eXosip_subscribe_build_initial_request(&msg,friend,from,route,"presence",600);
+       eXosip_subscribe_send_initial_request(msg);
+       eXosip_unlock();
+       ms_free(friend);
+}
+
+
+LinphoneFriend * linphone_friend_new(){
+       LinphoneFriend *obj=ms_new0(LinphoneFriend,1);
+       obj->out_did=-1;
+       obj->in_did=-1;
+       obj->nid=-1;
+       obj->sid=-1;
+       obj->pol=LinphoneSPAccept;
+       obj->status=LINPHONE_STATUS_OFFLINE;
+       obj->subscribe=TRUE;
+       return obj;     
+}
+
+LinphoneFriend *linphone_friend_new_with_addr(const char *addr){
+       LinphoneFriend *fr=linphone_friend_new();
+       if (linphone_friend_set_sip_addr(fr,addr)<0){
+               linphone_friend_destroy(fr);
+               return NULL;
+       }
+       return fr;
+}
+
+void linphone_core_interpret_friend_uri(LinphoneCore *lc, const char *uri, char **result){
+       LinphoneAddress *fr=NULL;
+       *result=NULL;
+       fr=linphone_address_new(uri);
+       if (fr==NULL){
+               char *tmp=NULL;
+               if (strchr(uri,'@')!=NULL){
+                       LinphoneAddress *u;
+                       /*try adding sip:*/
+                       tmp=ms_strdup_printf("sip:%s",uri);
+                       u=linphone_address_new(tmp);
+                       if (u!=NULL){
+                               *result=tmp;
+                       }
+               }else if (lc->default_proxy!=NULL){
+                       /*try adding domain part from default current proxy*/
+                       LinphoneAddress * id=linphone_address_new(linphone_core_get_identity(lc));
+                       if (id!=NULL){
+                               linphone_address_set_username(id,uri);
+                               *result=linphone_address_as_string(id);
+                               linphone_address_destroy(id);
+                       }
+               }
+               if (*result){
+                       /*looks good */
+                       ms_message("%s interpreted as %s",uri,*result);
+               }else{
+                       ms_warning("Fail to interpret friend uri %s",uri);
+               }
+       }else *result=linphone_address_as_string(fr);
+       linphone_address_destroy(fr);
+}
+
+int linphone_friend_set_sip_addr(LinphoneFriend *lf, const char *addr){
+       LinphoneAddress *fr=linphone_address_new(addr);
+       if (fr==NULL) {
+               ms_warning("Invalid friend sip uri: %s",addr);
+               return -1;
+       }
+       if (lf->uri!=NULL) linphone_address_destroy(lf->uri);   
+       lf->uri=fr;
+       return 0;
+}
+
+int linphone_friend_set_name(LinphoneFriend *lf, const char *name){
+       LinphoneAddress *fr=lf->uri;
+       if (fr==NULL){
+               ms_error("linphone_friend_set_sip_addr() must be called before linphone_friend_set_name().");
+               return -1;
+       }
+       linphone_address_set_display_name(fr,name);
+       return 0;
+}
+
+int linphone_friend_send_subscribe(LinphoneFriend *fr, bool_t val){
+       fr->subscribe=val;
+       return 0;
+}
+
+int linphone_friend_set_inc_subscribe_policy(LinphoneFriend *fr, LinphoneSubscribePolicy pol)
+{
+       fr->pol=pol;
+       return 0;
+}
+
+int linphone_friend_set_proxy(LinphoneFriend *fr, struct _LinphoneProxyConfig *cfg){
+       fr->proxy=cfg;
+       return 0;
+}
+
+void linphone_friend_set_sid(LinphoneFriend *lf, int sid){
+       lf->sid=sid;
+}
+void linphone_friend_set_nid(LinphoneFriend *lf, int nid){
+       lf->nid=nid;
+       lf->inc_subscribe_pending=TRUE;
+}
+
+void add_presence_body(osip_message_t *notify, LinphoneOnlineStatus online_status)
+{
+       char buf[1000];
+#ifdef SUPPORT_MSN
+       int atom_id = 1000;
+#endif
+       char *contact_info;
+
+       osip_contact_t *ct=NULL;
+       osip_message_get_contact(notify,0,&ct);
+       osip_contact_to_str(ct,&contact_info);
+
+#ifdef SUPPORT_MSN
+
+  if (online_status==LINPHONE_STATUS_ONLINE)
+    {
+      sprintf(buf, "<?xml version=\"1.0\"?>\n\
+<!DOCTYPE presence\n\
+PUBLIC \"-//IETF//DTD RFCxxxx XPIDF 1.0//EN\" \"xpidf.dtd\">\n\
+<presence>\n\
+<presentity uri=\"%s;method=SUBSCRIBE\" />\n\
+<atom id=\"%i\">\n\
+<address uri=\"%s;user=ip\" priority=\"0.800000\">\n\
+<status status=\"open\" />\n\
+<msnsubstatus substatus=\"online\" />\n\
+</address>\n\
+</atom>\n\
+</presence>", contact_info, atom_id, contact_info);
+
+    }
+  else if (online_status==LINPHONE_STATUS_BUSY)
+    {
+      sprintf(buf, "<?xml version=\"1.0\"?>\n\
+<!DOCTYPE presence\n\
+PUBLIC \"-//IETF//DTD RFCxxxx XPIDF 1.0//EN\" \"xpidf.dtd\">\n\
+<presence>\n\
+<presentity uri=\"%s;method=SUBSCRIBE\" />\n\
+<atom id=\"%i\">\n\
+<address uri=\"%s;user=ip\" priority=\"0.800000\">\n\
+<status status=\"inuse\" />\n\
+<msnsubstatus substatus=\"busy\" />\n\
+</address>\n\
+</atom>\n\
+</presence>", contact_info, atom_id, contact_info);
+
+    }
+  else if (online_status==LINPHONE_STATUS_BERIGHTBACK)
+    {
+      sprintf(buf, "<?xml version=\"1.0\"?>\n\
+<!DOCTYPE presence\n\
+PUBLIC \"-//IETF//DTD RFCxxxx XPIDF 1.0//EN\" \"xpidf.dtd\">\n\
+<presence>\n\
+<presentity uri=\"%s;method=SUBSCRIBE\" />\n\
+<atom id=\"%i\">\n\
+<address uri=\"%s;user=ip\" priority=\"0.800000\">\n\
+<status status=\"inactive\" />\n\
+<msnsubstatus substatus=\"berightback\" />\n\
+</address>\n\
+</atom>\n\
+</presence>", contact_info, atom_id, contact_info);
+
+    }
+  else if (online_status==LINPHONE_STATUS_AWAY)
+    {
+      sprintf(buf, "<?xml version=\"1.0\"?>\n\
+<!DOCTYPE presence\n\
+PUBLIC \"-//IETF//DTD RFCxxxx XPIDF 1.0//EN\" \"xpidf.dtd\">\n\
+<presence>\n\
+<presentity uri=\"%s;method=SUBSCRIBE\" />\n\
+<atom id=\"%i\">\n\
+<address uri=\"%s;user=ip\" priority=\"0.800000\">\n\
+<status status=\"inactive\" />\n\
+<msnsubstatus substatus=\"away\" />\n\
+</address>\n\
+</atom>\n\
+</presence>", contact_info, atom_id, contact_info);
+
+    }
+  else if (online_status==LINPHONE_STATUS_ONTHEPHONE)
+    {
+      sprintf(buf, "<?xml version=\"1.0\"?>\n\
+<!DOCTYPE presence\n\
+PUBLIC \"-//IETF//DTD RFCxxxx XPIDF 1.0//EN\" \"xpidf.dtd\">\n\
+<presence>\n\
+<presentity uri=\"%s;method=SUBSCRIBE\" />\n\
+<atom id=\"%i\">\n\
+<address uri=\"%s;user=ip\" priority=\"0.800000\">\n\
+<status status=\"inuse\" />\n\
+<msnsubstatus substatus=\"onthephone\" />\n\
+</address>\n\
+</atom>\n\
+</presence>", contact_info, atom_id, contact_info);
+
+    }
+  else if (online_status==LINPHONE_STATUS_OUTTOLUNCH)
+    {
+      sprintf(buf, "<?xml version=\"1.0\"?>\n\
+<!DOCTYPE presence\n\
+PUBLIC \"-//IETF//DTD RFCxxxx XPIDF 1.0//EN\" \"xpidf.dtd\">\n\
+<presence>\n\
+<presentity uri=\"%s;method=SUBSCRIBE\" />\n\
+<atom id=\"%i\">\n\
+<address uri=\"%s;user=ip\" priority=\"0.800000\">\n\
+<status status=\"inactive\" />\n\
+<msnsubstatus substatus=\"outtolunch\" />\n\
+</address>\n\
+</atom>\n\
+</presence>", contact_info, atom_id, contact_info);
+
+    }
+  else
+    {
+      sprintf(buf, "<?xml version=\"1.0\"?>\n\
+<!DOCTYPE presence\n\
+PUBLIC \"-//IETF//DTD RFCxxxx XPIDF 1.0//EN\" \"xpidf.dtd\">\n\
+<presence>\n\
+<presentity uri=\"%s;method=SUBSCRIBE\" />\n\
+<atom id=\"%i\">\n\
+<address uri=\"%s;user=ip\" priority=\"0.800000\">\n\
+<status status=\"inactive\" />\n\
+<msnsubstatus substatus=\"away\" />\n\
+</address>\n\
+</atom>\n\
+</presence>", contact_info, atom_id, contact_info);
+    }
+
+  osip_message_set_body(notify, buf, strlen(buf));
+  osip_message_set_content_type(notify, "application/xpidf+xml");
+#else
+
+  if (online_status==LINPHONE_STATUS_ONLINE)
+    {
+      sprintf(buf, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
+<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
+          entity=\"%s\">\n\
+<tuple id=\"sg89ae\">\n\
+<status>\n\
+<basic>open</basic>\n\
+</status>\n\
+<contact priority=\"0.8\">%s</contact>\n\
+<note>online</note>\n\
+</tuple>\n\
+</presence>",
+             contact_info, contact_info);
+    }
+  else if (online_status==LINPHONE_STATUS_BUSY)
+    {
+      sprintf(buf, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
+<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
+          xmlns:es=\"urn:ietf:params:xml:ns:pidf:status:rpid-status\"\n\
+          entity=\"%s\">\n\
+<tuple id=\"sg89ae\">\n\
+<status>\n\
+<basic>open</basic>\n\
+<es:activities>\n\
+  <es:activity>busy</es:activity>\n\
+</es:activities>\n\
+</status>\n\
+<contact priority=\"0.8\">%s</contact>\n\
+<note>busy</note>\n\
+</tuple>\n\
+</presence>",
+             contact_info, contact_info);
+    }
+  else if (online_status==LINPHONE_STATUS_BERIGHTBACK)
+    {
+      sprintf(buf, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
+<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
+          xmlns:es=\"urn:ietf:params:xml:ns:pidf:status:rpid-status\"\n\
+          entity=\"%s\">\n\
+<tuple id=\"sg89ae\">\n\
+<status>\n\
+<basic>open</basic>\n\
+<es:activities>\n\
+  <es:activity>in-transit</es:activity>\n\
+</es:activities>\n\
+</status>\n\
+<contact priority=\"0.8\">%s</contact>\n\
+<note>be right back</note>\n\
+</tuple>\n\
+</presence>",
+             contact_info, contact_info);
+    }
+  else if (online_status==LINPHONE_STATUS_AWAY)
+    {
+      sprintf(buf, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
+<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
+          xmlns:es=\"urn:ietf:params:xml:ns:pidf:status:rpid-status\"\n\
+          entity=\"%s\">\n\
+<tuple id=\"sg89ae\">\n\
+<status>\n\
+<basic>open</basic>\n\
+<es:activities>\n\
+  <es:activity>away</es:activity>\n\
+</es:activities>\n\
+</status>\n\
+<contact priority=\"0.8\">%s</contact>\n\
+<note>away</note>\n\
+</tuple>\n\
+</presence>",
+             contact_info, contact_info);
+    }
+  else if (online_status==LINPHONE_STATUS_ONTHEPHONE)
+    {
+      sprintf(buf, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
+<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
+          xmlns:es=\"urn:ietf:params:xml:ns:pidf:status:rpid-status\"\n\
+          entity=\"%s\">\n\
+<tuple id=\"sg89ae\">\n\
+<status>\n\
+<basic>open</basic>\n\
+<es:activities>\n\
+  <es:activity>on-the-phone</es:activity>\n\
+</es:activities>\n\
+</status>\n\
+<contact priority=\"0.8\">%s</contact>\n\
+<note>on the phone</note>\n\
+</tuple>\n\
+</presence>",
+             contact_info, contact_info);
+    }
+  else if (online_status==LINPHONE_STATUS_OUTTOLUNCH)
+    {
+      sprintf(buf, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
+<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
+          xmlns:es=\"urn:ietf:params:xml:ns:pidf:status:rpid-status\"\n\
+          entity=\"%s\">\n\
+<tuple id=\"sg89ae\">\n\
+<status>\n\
+<basic>open</basic>\n\
+<es:activities>\n\
+  <es:activity>meal</es:activity>\n\
+</es:activities>\n\
+</status>\n\
+<contact priority=\"0.8\">%s</contact>\n\
+<note>out to lunch</note>\n\
+</tuple>\n\
+</presence>",
+             contact_info, contact_info);
+    }
+  else
+    {
+      /* */
+      sprintf(buf, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
+<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
+xmlns:es=\"urn:ietf:params:xml:ns:pidf:status:rpid-status\"\n\
+entity=\"%s\">\n%s",
+             contact_info,
+"<tuple id=\"sg89ae\">\n\
+<status>\n\
+<basic>closed</basic>\n\
+<es:activities>\n\
+  <es:activity>permanent-absence</es:activity>\n\
+</es:activities>\n\
+</status>\n\
+</tuple>\n\
+\n</presence>\n");
+    }
+  osip_message_set_body(notify, buf, strlen(buf));
+  osip_message_set_content_type(notify, "application/pidf+xml");
+
+#endif
+       osip_free(contact_info);
+}
+
+
+void linphone_friend_notify(LinphoneFriend *lf, int ss, LinphoneOnlineStatus os){
+       //printf("Wish to notify %p, lf->nid=%i\n",lf,lf->nid);
+       if (lf->in_did!=-1){
+               osip_message_t *msg=NULL;
+               const char *identity;
+               if (lf->proxy!=NULL) identity=lf->proxy->reg_identity;
+               else identity=linphone_core_get_primary_contact(lf->lc);
+               eXosip_lock();
+               eXosip_insubscription_build_notify(lf->in_did,ss,0,&msg);
+               if (msg!=NULL){
+                       osip_message_set_contact(msg,identity);
+                       add_presence_body(msg,os);
+                       eXosip_insubscription_send_request(lf->in_did,msg);
+               }else ms_error("could not create notify for incoming subscription.");
+               eXosip_unlock();
+       }
+}
+
+static void linphone_friend_unsubscribe(LinphoneFriend *lf){
+       if (lf->out_did!=-1) {
+               osip_message_t *msg=NULL;
+               eXosip_lock();
+               eXosip_subscribe_build_refresh_request(lf->out_did,&msg);
+               if (msg){
+                       osip_message_set_expires(msg,"0");
+                       eXosip_subscribe_send_refresh_request(lf->out_did,msg);
+               }else ms_error("Could not build subscribe refresh request !");
+               eXosip_unlock();
+       }
+}
+
+void linphone_friend_destroy(LinphoneFriend *lf){
+       linphone_friend_notify(lf,EXOSIP_SUBCRSTATE_TERMINATED,LINPHONE_STATUS_CLOSED);
+       linphone_friend_unsubscribe(lf);
+       if (lf->uri!=NULL) linphone_address_destroy(lf->uri);
+       if (lf->info!=NULL) buddy_info_free(lf->info);
+       ms_free(lf);
+}
+
+void linphone_friend_check_for_removed_proxy(LinphoneFriend *lf, LinphoneProxyConfig *cfg){
+       if (lf->proxy==cfg){
+               lf->proxy=NULL;
+       }
+}
+
+const LinphoneAddress *linphone_friend_get_uri(const LinphoneFriend *lf){
+       return lf->uri;
+}
+
+
+bool_t linphone_friend_get_send_subscribe(const LinphoneFriend *lf){
+       return lf->subscribe;
+}
+
+LinphoneSubscribePolicy linphone_friend_get_inc_subscribe_policy(const LinphoneFriend *lf){
+       return lf->pol;
+}
+
+LinphoneOnlineStatus linphone_friend_get_status(const LinphoneFriend *lf){
+       return lf->status;
+}
+
+BuddyInfo * linphone_friend_get_info(const LinphoneFriend *lf){
+       return lf->info;
+}
+
+void linphone_friend_apply(LinphoneFriend *fr, LinphoneCore *lc){
+       if (fr->uri==NULL) {
+               ms_warning("No sip url defined.");
+               return;
+       }
+       fr->lc=lc;
+       
+       linphone_core_write_friends_config(lc);
+
+       if (fr->inc_subscribe_pending){
+               switch(fr->pol){
+                       case LinphoneSPWait:
+                               linphone_friend_notify(fr,EXOSIP_SUBCRSTATE_PENDING,LINPHONE_STATUS_PENDING);
+                               break;
+                       case LinphoneSPAccept:
+                               if (fr->lc!=NULL)
+                                 {
+                                       linphone_friend_notify(fr,EXOSIP_SUBCRSTATE_ACTIVE,fr->lc->presence_mode);
+                                 }
+                               break;
+                       case LinphoneSPDeny:
+                               linphone_friend_notify(fr,EXOSIP_SUBCRSTATE_TERMINATED,LINPHONE_STATUS_CLOSED);
+                               break;
+               }
+               fr->inc_subscribe_pending=FALSE;
+       }
+       if (fr->subscribe && fr->out_did==-1){
+               
+               __linphone_friend_do_subscribe(fr);
+       }
+       ms_message("linphone_friend_apply() done.");
+       lc->bl_refresh=TRUE;
+}
+
+void linphone_friend_edit(LinphoneFriend *fr){
+}
+
+void linphone_friend_done(LinphoneFriend *fr){
+       ms_return_if_fail(fr!=NULL);
+       if (fr->lc==NULL) return;
+       linphone_friend_apply(fr,fr->lc);
+}
+
+void linphone_core_add_friend(LinphoneCore *lc, LinphoneFriend *lf)
+{
+       ms_return_if_fail(lf->lc==NULL);
+       ms_return_if_fail(lf->uri!=NULL);
+       lc->friends=ms_list_append(lc->friends,lf);
+       linphone_friend_apply(lf,lc);
+       return ;
+}
+
+void linphone_core_remove_friend(LinphoneCore *lc, LinphoneFriend* fl){
+       MSList *el=ms_list_find(lc->friends,(void *)fl);
+       if (el!=NULL){
+               lc->friends=ms_list_remove_link(lc->friends,el);
+               linphone_friend_destroy((LinphoneFriend*)el->data);
+               linphone_core_write_friends_config(lc);
+       }
+}
+
+void linphone_friend_set_ref_key(LinphoneFriend *lf, const char *key){
+       if (lf->refkey!=NULL){
+               ms_free(lf->refkey);
+               lf->refkey=NULL;
+       }
+       if (key)
+               lf->refkey=ms_strdup(key);
+       if (lf->lc)
+               linphone_core_write_friends_config(lf->lc);
+}
+
+const char *linphone_friend_get_ref_key(const LinphoneFriend *lf){
+       return lf->refkey;
+}
+
+static bool_t username_match(const char *u1, const char *u2){
+       if (u1==NULL && u2==NULL) return TRUE;
+       if (u1 && u2 && strcasecmp(u1,u2)==0) return TRUE;
+       return FALSE;
+}
+
+LinphoneFriend *linphone_core_get_friend_by_uri(const LinphoneCore *lc, const char *uri){
+       LinphoneAddress *puri=linphone_address_new(uri);
+       const MSList *elem;
+       const char *username=linphone_address_get_username(puri);
+       const char *domain=linphone_address_get_domain(puri);
+       LinphoneFriend *lf=NULL;
+               
+       if (puri==NULL){
+               return NULL;
+       }
+       for(elem=lc->friends;elem!=NULL;elem=ms_list_next(elem)){
+               lf=(LinphoneFriend*)elem->data;
+               const char *it_username=linphone_address_get_username(lf->uri);
+               const char *it_host=linphone_address_get_domain(lf->uri);;
+               if (strcasecmp(domain,it_host)==0 && username_match(username,it_username)){
+                       break;
+               }
+               lf=NULL;
+       }
+       linphone_address_destroy(puri);
+       return lf;
+}
+
+LinphoneFriend *linphone_core_get_friend_by_ref_key(const LinphoneCore *lc, const char *key){
+       const MSList *elem;
+       if (key==NULL) return NULL;
+       for(elem=linphone_core_get_friend_list(lc);elem!=NULL;elem=elem->next){
+               LinphoneFriend *lf=(LinphoneFriend*)elem->data;
+               if (lf->refkey!=NULL && strcmp(lf->refkey,key)==0){
+                       return lf;
+               }
+       }
+       return NULL;
+}
+
+#define key_compare(s1,s2)     strcmp(s1,s2)
+
+LinphoneSubscribePolicy __policy_str_to_enum(const char* pol){
+       if (key_compare("accept",pol)==0){
+               return LinphoneSPAccept;
+       }
+       if (key_compare("deny",pol)==0){
+               return LinphoneSPDeny;
+       }
+       if (key_compare("wait",pol)==0){
+               return LinphoneSPWait;
+       }
+       ms_warning("Unrecognized subscribe policy: %s",pol);
+       return LinphoneSPWait;
+}
+
+LinphoneProxyConfig *__index_to_proxy(LinphoneCore *lc, int index){
+       if (index>=0) return (LinphoneProxyConfig*)ms_list_nth_data(lc->sip_conf.proxies,index);
+       else return NULL;
+}
+
+LinphoneFriend * linphone_friend_new_from_config_file(LinphoneCore *lc, int index){
+       const char *tmp;
+       char item[50];
+       int a;
+       LinphoneFriend *lf;
+       LpConfig *config=lc->config;
+       
+       sprintf(item,"friend_%i",index);
+       
+       if (!lp_config_has_section(config,item)){
+               return NULL;
+       }
+       
+       tmp=lp_config_get_string(config,item,"url",NULL);
+       if (tmp==NULL) {
+               return NULL;
+       }
+       lf=linphone_friend_new_with_addr(tmp);
+       if (lf==NULL) {
+               return NULL;
+       }
+       tmp=lp_config_get_string(config,item,"pol",NULL);
+       if (tmp==NULL) linphone_friend_set_inc_subscribe_policy(lf,LinphoneSPWait);
+       else{
+               linphone_friend_set_inc_subscribe_policy(lf,__policy_str_to_enum(tmp));
+       }
+       a=lp_config_get_int(config,item,"subscribe",0);
+       linphone_friend_send_subscribe(lf,a);
+               
+       a=lp_config_get_int(config,item,"proxy",-1);
+       if (a!=-1) {
+               linphone_friend_set_proxy(lf,__index_to_proxy(lc,a));
+       }
+       linphone_friend_set_ref_key(lf,lp_config_get_string(config,item,"refkey",NULL));
+       return lf;
+}
+
+const char *__policy_enum_to_str(LinphoneSubscribePolicy pol){
+       switch(pol){
+               case LinphoneSPAccept:
+                       return "accept";
+                       break;
+               case LinphoneSPDeny:
+                       return "deny";
+                       break;
+               case LinphoneSPWait:
+                       return "wait";
+                       break;
+       }
+       ms_warning("Invalid policy enum value.");
+       return "wait";
+}
+
+void linphone_friend_write_to_config_file(LpConfig *config, LinphoneFriend *lf, int index){
+       char key[50];
+       char *tmp;
+       int a;
+       const char *refkey;
+       
+       sprintf(key,"friend_%i",index);
+       
+       if (lf==NULL){
+               lp_config_clean_section(config,key);
+               return;
+       }
+       if (lf->uri!=NULL){
+               tmp=linphone_address_as_string(lf->uri);
+               if (tmp==NULL) {
+                       return;
+               }
+               lp_config_set_string(config,key,"url",tmp);
+               osip_free(tmp);
+       }
+       lp_config_set_string(config,key,"pol",__policy_enum_to_str(lf->pol));
+       lp_config_set_int(config,key,"subscribe",lf->subscribe);
+       if (lf->proxy!=NULL){
+               a=ms_list_index(lf->lc->sip_conf.proxies,lf->proxy);
+               lp_config_set_int(config,key,"proxy",a);
+       }else lp_config_set_int(config,key,"proxy",-1);
+
+       refkey=linphone_friend_get_ref_key(lf);
+       if (refkey){
+               lp_config_set_string(config,key,"refkey",refkey);
+       }
+}
+
+void linphone_core_write_friends_config(LinphoneCore* lc)
+{
+       MSList *elem;
+       int i;
+       if (!lc->ready) return; /*dont write config when reading it !*/
+       for (elem=lc->friends,i=0; elem!=NULL; elem=ms_list_next(elem),i++){
+               linphone_friend_write_to_config_file(lc->config,(LinphoneFriend*)elem->data,i);
+       }
+       linphone_friend_write_to_config_file(lc->config,NULL,i);        /* set the end */
+}
+
diff --git a/coreapi/general_state.c b/coreapi/general_state.c
new file mode 100644 (file)
index 0000000..7cf7137
--- /dev/null
@@ -0,0 +1,117 @@
+/****************************************************************************
+ *
+ *  File: general_state.c
+ *
+ *  Copyright (C) 2006, 2007  Thomas Reitmayr <treitmayr@yahoo.com>
+ *
+ ****************************************************************************
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 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 Library 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.
+ *
+ ****************************************************************************/
+
+
+#include "linphonecore.h"
+
+#if 0
+static const char *_gstates_text[] = {
+  "GSTATE_POWER_OFF",         /* 0 */
+  "GSTATE_POWER_STARTUP",     /* 1 */
+  "GSTATE_POWER_ON",          /* 2 */
+  "GSTATE_POWER_SHUTDOWN",    /* 3 */
+  NULL, NULL, NULL, NULL, NULL, NULL,
+
+  "GSTATE_REG_NONE",          /* 10 */
+  "GSTATE_REG_OK",            /* 11 */
+  "GSTATE_REG_FAILED",        /* 12 */
+  NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+
+  "GSTATE_CALL_IDLE",           /* 20 */
+  "GSTATE_CALL_OUT_INVITE",     /* 21 */
+  "GSTATE_CALL_OUT_CONNECTED",  /* 22 */
+  "GSTATE_CALL_IN_INVITE",      /* 23 */
+  "GSTATE_CALL_IN_CONNECTED",   /* 24 */
+  "GSTATE_CALL_END",            /* 25 */
+  "GSTATE_CALL_ERROR"           /* 26 */
+};
+#endif
+
+/* set the initial states */
+void gstate_initialize(LinphoneCore *lc) {
+  lc->gstate_power = GSTATE_POWER_OFF;
+  lc->gstate_reg   = GSTATE_REG_NONE;
+  lc->gstate_call  = GSTATE_CALL_IDLE;
+}
+
+gstate_t linphone_core_get_state(const LinphoneCore *lc, gstate_group_t group){
+       switch(group){
+               case GSTATE_GROUP_POWER:
+                       return lc->gstate_power;
+               case GSTATE_GROUP_REG:
+                       return lc->gstate_reg;
+               case GSTATE_GROUP_CALL:
+                       return lc->gstate_call;
+       }
+       return GSTATE_INVALID;
+}
+
+static void linphone_core_set_state(LinphoneCore *lc, gstate_group_t group, gstate_t new_state){
+       switch(group){
+               case GSTATE_GROUP_POWER:
+                       lc->gstate_power=new_state;
+                       break;
+               case GSTATE_GROUP_REG:
+                       lc->gstate_reg=new_state;
+                       break;
+               case GSTATE_GROUP_CALL:
+                       lc->gstate_call=new_state;
+                       break;
+       }
+}
+
+void gstate_new_state(struct _LinphoneCore *lc,
+                      gstate_t new_state,
+                      const char *message) {
+  LinphoneGeneralState states_arg;
+  
+  /* determine the affected group */
+  if (new_state < GSTATE_REG_NONE)
+    states_arg.group = GSTATE_GROUP_POWER;
+  else if (new_state < GSTATE_CALL_IDLE)
+    states_arg.group = GSTATE_GROUP_REG;
+  else
+    states_arg.group = GSTATE_GROUP_CALL;
+  
+  /* store the new state while remembering the old one */
+  states_arg.new_state = new_state;
+  states_arg.old_state = linphone_core_get_state(lc,states_arg.group);
+  linphone_core_set_state(lc, states_arg.group,new_state);
+  states_arg.message = message;
+  
+  /*printf("gstate_new_state: %s\t-> %s\t(%s)\n",
+         _gstates_text[states_arg.old_state],
+         _gstates_text[states_arg.new_state],
+         message);*/
+
+  /* call the virtual method */
+  if (lc->vtable.general_state)
+    lc->vtable.general_state(lc, &states_arg);
+  
+  /* immediately proceed to idle state */
+  if (new_state == GSTATE_CALL_END ||
+      new_state == GSTATE_CALL_ERROR)
+    gstate_new_state(lc, GSTATE_CALL_IDLE, NULL);
+}
+
diff --git a/coreapi/help/Doxyfile.in b/coreapi/help/Doxyfile.in
new file mode 100644 (file)
index 0000000..abb4aef
--- /dev/null
@@ -0,0 +1,233 @@
+# Doxyfile 1.4.1
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME           = liblinphone
+PROJECT_NUMBER         = @LINPHONE_VERSION@
+OUTPUT_DIRECTORY       = 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      = NO
+MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP         = NO
+INHERIT_DOCS           = YES
+DISTRIBUTE_GROUP_DOC   = NO
+TAB_SIZE               = 8
+ALIASES                = 
+OPTIMIZE_OUTPUT_FOR_C  = YES
+OPTIMIZE_OUTPUT_JAVA   = NO
+SUBGROUPING            = YES
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL            = NO
+EXTRACT_PRIVATE        = NO
+EXTRACT_STATIC         = NO
+EXTRACT_LOCAL_CLASSES  = YES
+EXTRACT_LOCAL_METHODS  = NO
+HIDE_UNDOC_MEMBERS     = YES
+HIDE_UNDOC_CLASSES     = YES
+HIDE_FRIEND_COMPOUNDS  = NO
+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       = NO
+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       = YES
+FILE_VERSION_FILTER    = 
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET                  = NO
+WARNINGS               = YES
+WARN_IF_UNDOCUMENTED   = YES
+WARN_IF_DOC_ERROR      = YES
+WARN_NO_PARAMDOC       = NO
+WARN_FORMAT            = "$file:$line: $text"
+WARN_LOGFILE           = 
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT                  = . ../
+
+FILE_PATTERNS          = *.h \
+                         *.c \
+                         *.dox
+RECURSIVE              = NO
+EXCLUDE                = 
+EXCLUDE_SYMLINKS       = NO
+EXCLUDE_PATTERNS       = 
+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         = NO
+INLINE_SOURCES         = NO
+STRIP_CODE_COMMENTS    = YES
+REFERENCED_BY_RELATION = NO
+REFERENCES_RELATION    = NO
+VERBATIM_HEADERS       = NO
+#---------------------------------------------------------------------------
+# 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
+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   = 1
+GENERATE_TREEVIEW      = NO
+TREEVIEW_WIDTH         = 250
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX         = YES
+LATEX_OUTPUT           = latex
+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             = rtf
+COMPACT_RTF            = NO
+RTF_HYPERLINKS         = NO
+RTF_STYLESHEET_FILE    = 
+RTF_EXTENSIONS_FILE    = 
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN           = YES
+MAN_OUTPUT             = man
+MAN_EXTENSION          = .3
+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     = NO
+SEARCH_INCLUDES        = YES
+INCLUDE_PATH           = .
+INCLUDE_FILE_PATTERNS  = *.h
+PREDEFINED             = DOXYGEN
+EXPAND_AS_DEFINED      = 
+SKIP_FUNCTION_MACROS   = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references   
+#---------------------------------------------------------------------------
+TAGFILES               = 
+GENERATE_TAGFILE       = 
+ALLEXTERNALS           = NO
+EXTERNAL_GROUPS        = YES
+PERL_PATH              = /usr/bin/perl
+#---------------------------------------------------------------------------
+# 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    = 1024
+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/coreapi/help/Makefile.am b/coreapi/help/Makefile.am
new file mode 100644 (file)
index 0000000..0b12592
--- /dev/null
@@ -0,0 +1,33 @@
+
+EXTRA_DIST = Doxyfile.in doxygen.dox.in
+
+SOURCES=$(top_srcdir)/coreapi/*.h $(top_srcdir)/coreapi/*.c
+
+
+#html doc
+if HAVE_DOXYGEN
+
+# doxdir & pkgdocdir are not always defined by automake
+docdir=$(datadir)/doc
+pkgdocdir=$(docdir)/$(PACKAGE)-$(VERSION)
+doc_htmldir=$(pkgdocdir)/html
+
+doc_html_DATA = $(top_builddir)/coreapi/help/doc/html/html.tar
+
+$(doc_html_DATA): $(top_builddir)/coreapi/help/doc/html/index.html
+       cd $(<D) && tar cf html.tar *
+
+$(top_builddir)/coreapi/help/doc/html/index.html: $(SOURCES) Doxyfile Makefile.am
+       rm -rf doc
+       $(DOXYGEN) Doxyfile
+
+install-data-hook:
+       cd $(DESTDIR)$(doc_htmldir) && tar xf html.tar && rm -f html.tar
+
+uninstall-hook:
+       cd $(DESTDIR)$(doc_htmldir) && rm -f *
+
+endif
+
+clean-local:
+       rm -rf doc
diff --git a/coreapi/help/doxygen.dox.in b/coreapi/help/doxygen.dox.in
new file mode 100644 (file)
index 0000000..acdec90
--- /dev/null
@@ -0,0 +1,76 @@
+/**
+ * @mainpage
+ *
+ * @see http://www.linphone.org
+ *
+ * @section what_is_it What is liblinphone
+ *
+ * Liblinphone is a high level library for bringing SIP video call functionnality
+ * into an application. It aims at making easy the integration of the SIP
+ * video calls into any applications. All variants of linphone are directly based
+ * on it:
+ * - linphone (gtk interface)
+ *
+ * - linphonec (console interface)
+ *
+ * Liblinphone is GPL (see COPYING file). Please understand the licencing details
+ * before using it!
+ * 
+ * For any use of this library beyond the rights granted to you by the
+ * GPL license, please contact Belledonne Communications 
+ * (contact@belledonne-communications.com)
+ * 
+ *
+**/
+
+/**
+ * @page liblinphone_license COPYING 
+ * @verbinclude COPYING
+ */
+
+
+/** 
+ * @defgroup initializing Initialization and destruction
+ *
+**/
+
+/**
+ * @defgroup call_control Call control
+ *
+ * The application can initiate outgoing calls with linphone_core_invite().
+ * It is notified of incoming call thanks to the inv_recv callback of the LinphoneCoreVTable
+ * structure that is passed at creation of the LinphoneCore object.
+ * It can then answer calls with linphone_core_accept_call().
+ * Calls can be terminated or declined with linphone_core_terminate_call().
+ * The application is notified when the remote party hangups thanks to 
+ * bye_recv callback of the #LinphoneCoreVTable.
+**/
+
+/**
+ * @defgroup media_parameters Controlling media parameters
+**/
+
+/**
+ * @defgroup proxies Managing proxies
+**/
+
+/**
+ * @defgroup network_parameters Controlling network parameters (ports, mtu...)
+**/
+
+/**
+ * @defgroup authentication Managing authentication: userid and passwords
+**/
+
+/**
+ * @defgroup call_logs Managing call logs
+**/
+
+/**
+ * @defgroup linphone_address SIP address parser API.
+ * This api is useful for manipulating SIP addresses ('from' or 'to' headers).
+**/
+
+/**
+ * @defgroup misc Miscenalleous: logs, version strings, config storage
+**/
diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c
new file mode 100644 (file)
index 0000000..c582a30
--- /dev/null
@@ -0,0 +1,3484 @@
+/*
+linphone
+Copyright (C) 2000  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#include "linphonecore.h"
+#include "sipsetup.h"
+#include "lpconfig.h"
+#include "private.h"
+#include "mediastreamer2/mediastream.h"
+#include "mediastreamer2/msvolume.h"
+#include "mediastreamer2/msequalizer.h"
+#include <eXosip2/eXosip.h>
+#include "sdphandler.h"
+
+#include <ortp/telephonyevents.h>
+#include "exevents.h"
+
+
+#ifdef INET6
+#ifndef WIN32
+#include <netdb.h>
+#endif
+#endif
+
+/*#define UNSTANDART_GSM_11K 1*/
+
+static const char *liblinphone_version=LIBLINPHONE_VERSION;
+
+#include "enum.h"
+
+void linphone_core_get_local_ip(LinphoneCore *lc, const char *dest, char *result);
+static void apply_nat_settings(LinphoneCore *lc);
+static void toggle_video_preview(LinphoneCore *lc, bool_t val);
+
+/* relative path where is stored local ring*/
+#define LOCAL_RING "rings/oldphone.wav"
+/* same for remote ring (ringback)*/
+#define REMOTE_RING "ringback.wav"
+
+
+sdp_handler_t linphone_sdphandler={
+       linphone_accept_audio_offer,   /*from remote sdp */
+       linphone_accept_video_offer,   /*from remote sdp */
+       linphone_set_audio_offer,       /*to local sdp */
+       linphone_set_video_offer,       /*to local sdp */
+       linphone_read_audio_answer,     /*from incoming answer  */
+       linphone_read_video_answer      /*from incoming answer  */
+};
+
+void lc_callback_obj_init(LCCallbackObj *obj,LinphoneCoreCbFunc func,void* ud)
+{
+  obj->_func=func;
+  obj->_user_data=ud;
+}
+
+int lc_callback_obj_invoke(LCCallbackObj *obj, LinphoneCore *lc){
+       if (obj->_func!=NULL) obj->_func(lc,obj->_user_data);
+       return 0;
+}
+
+static void  linphone_call_init_common(LinphoneCall *call, LinphoneAddress *from, LinphoneAddress *to){
+       call->state=LCStateInit;
+       call->start_time=time(NULL);
+       call->media_start_time=0;
+       call->log=linphone_call_log_new(call, from, to);
+       linphone_core_notify_all_friends(call->core,LINPHONE_STATUS_ONTHEPHONE);
+       if (linphone_core_get_firewall_policy(call->core)==LINPHONE_POLICY_USE_STUN)
+               linphone_core_run_stun_tests(call->core,call);
+       call->profile=rtp_profile_new("Call RTP profile");
+}
+
+void linphone_call_init_media_params(LinphoneCall *call){
+       memset(&call->audio_params,0,sizeof(call->audio_params));
+       memset(&call->video_params,0,sizeof(call->video_params));
+}
+
+static void discover_mtu(LinphoneCore *lc, const char *remote){
+       int mtu;
+       if (lc->net_conf.mtu==0 ){
+               /*attempt to discover mtu*/
+               mtu=ms_discover_mtu(remote);
+               if (mtu>0){
+                       ms_set_mtu(mtu);
+                       ms_message("Discovered mtu is %i, RTP payload max size is %i",
+                               mtu, ms_get_payload_max_size());
+               }
+       }
+}
+
+LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to)
+{
+       LinphoneCall *call=ms_new0(LinphoneCall,1);
+       call->dir=LinphoneCallOutgoing;
+       call->cid=-1;
+       call->did=-1;
+       call->tid=-1;
+       call->core=lc;
+       linphone_core_get_local_ip(lc,linphone_address_get_domain(to),call->localip);
+       linphone_call_init_common(call,from,to);
+       call->sdpctx=sdp_handler_create_context(&linphone_sdphandler,
+               call->audio_params.natd_port>0 ? call->audio_params.natd_addr : call->localip,
+               linphone_address_get_username (from),NULL);
+       sdp_context_set_user_pointer(call->sdpctx,(void*)call);
+       discover_mtu(lc,linphone_address_get_domain (to));
+       return call;
+}
+
+
+LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to, eXosip_event_t *ev){
+       LinphoneCall *call=ms_new0(LinphoneCall,1);
+       LinphoneAddress *me=linphone_core_get_primary_contact_parsed(lc);
+       osip_header_t *h=NULL;
+
+       call->dir=LinphoneCallIncoming;
+       call->cid=ev->cid;
+       call->did=ev->did;
+       call->tid=ev->tid;
+       call->core=lc;
+       
+       linphone_address_clean(from);
+       
+       linphone_core_get_local_ip(lc,linphone_address_get_domain(from),call->localip);
+       linphone_call_init_common(call, from, to);
+       call->sdpctx=sdp_handler_create_context(&linphone_sdphandler,
+               call->audio_params.natd_port>0 ? call->audio_params.natd_addr : call->localip,
+               linphone_address_get_username (me),NULL);
+       sdp_context_set_user_pointer(call->sdpctx,(void*)call);
+       discover_mtu(lc,linphone_address_get_domain(from));
+       linphone_address_destroy(me);
+       osip_message_header_get_byname(ev->request,"Session-expires",0,&h);
+       if (h) call->supports_session_timers=TRUE;
+       return call;
+}
+
+void linphone_call_destroy(LinphoneCall *obj)
+{
+       linphone_core_notify_all_friends(obj->core,obj->core->prev_mode);
+       linphone_call_log_completed(obj->log,obj);
+       linphone_core_update_allocated_audio_bandwidth(obj->core);
+       if (obj->profile!=NULL) rtp_profile_destroy(obj->profile);
+       if (obj->sdpctx!=NULL) sdp_context_free(obj->sdpctx);
+       ms_free(obj);
+}
+
+/*prevent a gcc bug with %c*/
+static size_t my_strftime(char *s, size_t max, const char  *fmt,  const struct tm *tm){
+#if !defined(_WIN32_WCE)
+       return strftime(s, max, fmt, tm);
+#else
+       return 0;
+       /*FIXME*/
+#endif /*_WIN32_WCE*/
+}
+
+static void set_call_log_date(LinphoneCallLog *cl, const struct tm *loctime){
+       my_strftime(cl->start_date,sizeof(cl->start_date),"%c",loctime);
+}
+
+LinphoneCallLog * linphone_call_log_new(LinphoneCall *call, LinphoneAddress *from, LinphoneAddress *to){
+       LinphoneCallLog *cl=ms_new0(LinphoneCallLog,1);
+       struct tm loctime;
+       cl->dir=call->dir;
+#ifdef WIN32
+#if !defined(_WIN32_WCE)
+       loctime=*localtime(&call->start_time);
+       /*FIXME*/
+#endif /*_WIN32_WCE*/
+#else
+       localtime_r(&call->start_time,&loctime);
+#endif
+       set_call_log_date(cl,&loctime);
+       cl->from=from;
+       cl->to=to;
+       return cl;
+}
+
+static void call_logs_write_to_config_file(LinphoneCore *lc){
+       MSList *elem;
+       char logsection[32];
+       int i;
+       char *tmp;
+       LpConfig *cfg=lc->config;
+
+       if (!lc->ready) return;
+       
+       for(i=0,elem=lc->call_logs;elem!=NULL;elem=elem->next,++i){
+               LinphoneCallLog *cl=(LinphoneCallLog*)elem->data;
+               snprintf(logsection,sizeof(logsection),"call_log_%i",i);
+               lp_config_set_int(cfg,logsection,"dir",cl->dir);
+               lp_config_set_int(cfg,logsection,"status",cl->status);
+               tmp=linphone_address_as_string(cl->from);
+               lp_config_set_string(cfg,logsection,"from",tmp);
+               ms_free(tmp);
+               tmp=linphone_address_as_string(cl->to);
+               lp_config_set_string(cfg,logsection,"to",tmp);
+               ms_free(tmp);
+               lp_config_set_string(cfg,logsection,"start_date",cl->start_date);
+               lp_config_set_int(cfg,logsection,"duration",cl->duration);
+               if (cl->refkey) lp_config_set_string(cfg,logsection,"refkey",cl->refkey);
+       }
+       for(;i<lc->max_call_logs;++i){
+               snprintf(logsection,sizeof(logsection),"call_log_%i",i);
+               lp_config_clean_section(cfg,logsection);
+       }
+}
+
+static void call_logs_read_from_config_file(LinphoneCore *lc){
+       char logsection[32];
+       int i;
+       const char *tmp;
+       LpConfig *cfg=lc->config;
+       for(i=0;;++i){
+               snprintf(logsection,sizeof(logsection),"call_log_%i",i);
+               if (lp_config_has_section(cfg,logsection)){
+                       LinphoneCallLog *cl=ms_new0(LinphoneCallLog,1);
+                       cl->dir=lp_config_get_int(cfg,logsection,"dir",0);
+                       cl->status=lp_config_get_int(cfg,logsection,"status",0);
+                       tmp=lp_config_get_string(cfg,logsection,"from",NULL);
+                       if (tmp) cl->from=linphone_address_new(tmp);
+                       tmp=lp_config_get_string(cfg,logsection,"to",NULL);
+                       if (tmp) cl->to=linphone_address_new(tmp);
+                       tmp=lp_config_get_string(cfg,logsection,"start_date",NULL);
+                       if (tmp) strncpy(cl->start_date,tmp,sizeof(cl->start_date));
+                       cl->duration=lp_config_get_int(cfg,logsection,"duration",0);
+                       tmp=lp_config_get_string(cfg,logsection,"refkey",NULL);
+                       if (tmp) cl->refkey=ms_strdup(tmp);
+                       lc->call_logs=ms_list_append(lc->call_logs,cl);
+               }else break;    
+       }
+}
+
+
+void linphone_call_log_completed(LinphoneCallLog *calllog, LinphoneCall *call){
+       LinphoneCore *lc=call->core;
+       
+       calllog->duration=time(NULL)-call->start_time;
+       switch(call->state){
+               case LCStateInit:
+                       calllog->status=LinphoneCallAborted;
+                       break;
+               case LCStateRinging:
+                       if (calllog->dir==LinphoneCallIncoming){
+                               char *info;
+                               calllog->status=LinphoneCallMissed;
+                               lc->missed_calls++;
+                               info=ortp_strdup_printf(ngettext("You have missed %i call.",
+                            "You have missed %i calls.", lc->missed_calls),
+                        lc->missed_calls);
+                               lc->vtable.display_status(lc,info);
+                               ms_free(info);
+                       }
+                       else calllog->status=LinphoneCallAborted;
+                       break;
+               case LCStateAVRunning:
+                       calllog->status=LinphoneCallSuccess;
+                       break;
+       }
+       lc->call_logs=ms_list_append(lc->call_logs,(void *)calllog);
+       if (ms_list_size(lc->call_logs)>lc->max_call_logs){
+               MSList *elem;
+               elem=lc->call_logs;
+               linphone_call_log_destroy((LinphoneCallLog*)elem->data);
+               lc->call_logs=ms_list_remove_link(lc->call_logs,elem);
+       }
+       if (lc->vtable.call_log_updated!=NULL){
+               lc->vtable.call_log_updated(lc,calllog);
+       }
+       call_logs_write_to_config_file(lc);
+}
+
+/**
+ * @addtogroup call_logs
+ * @{
+**/
+
+/**
+ * Returns a human readable string describing the call.
+ * 
+ * @note: the returned char* must be freed by the application (use ms_free()).
+**/
+char * linphone_call_log_to_str(LinphoneCallLog *cl){
+       char *status;
+       char *tmp;
+       char *from=linphone_address_as_string (cl->from);
+       char *to=linphone_address_as_string (cl->to);
+       switch(cl->status){
+               case LinphoneCallAborted:
+                       status=_("aborted");
+                       break;
+               case LinphoneCallSuccess:
+                       status=_("completed");
+                       break;
+               case LinphoneCallMissed:
+                       status=_("missed");
+                       break;
+               default:
+                       status="unknown";
+       }
+       tmp=ortp_strdup_printf(_("%s at %s\nFrom: %s\nTo: %s\nStatus: %s\nDuration: %i mn %i sec\n"),
+                       (cl->dir==LinphoneCallIncoming) ? _("Incoming call") : _("Outgoing call"),
+                       cl->start_date,
+                       from,
+                       to,
+                       status,
+                       cl->duration/60,
+                       cl->duration%60);
+       ms_free(from);
+       ms_free(to);
+       return tmp;
+}
+
+void linphone_call_log_set_user_pointer(LinphoneCallLog *cl, void *up){
+       cl->user_pointer=up;
+}
+
+void *linphone_call_log_get_user_pointer(const LinphoneCallLog *cl){
+       return cl->user_pointer;
+}
+
+
+
+/**
+ * Associate a persistent reference key to the call log.
+ *
+ * The reference key can be for example an id to an external database.
+ * It is stored in the config file, thus can survive to process exits/restarts.
+ *
+**/
+void linphone_call_log_set_ref_key(LinphoneCallLog *cl, const char *refkey){
+       if (cl->refkey!=NULL){
+               ms_free(cl->refkey);
+               cl->refkey=NULL;
+       }
+       if (refkey) cl->refkey=ms_strdup(refkey);
+       call_logs_write_to_config_file(cl->lc);
+}
+
+/**
+ * Get the persistent reference key associated to the call log.
+ *
+ * The reference key can be for example an id to an external database.
+ * It is stored in the config file, thus can survive to process exits/restarts.
+ *
+**/
+const char *linphone_call_log_get_ref_key(const LinphoneCallLog *cl){
+       return cl->refkey;
+}
+
+/** @} */
+
+void linphone_call_log_destroy(LinphoneCallLog *cl){
+       if (cl->from!=NULL) linphone_address_destroy(cl->from);
+       if (cl->to!=NULL) linphone_address_destroy(cl->to);
+       if (cl->refkey!=NULL) ms_free(cl->refkey);
+       ms_free(cl);
+}
+
+int linphone_core_get_current_call_duration(const LinphoneCore *lc){
+       LinphoneCall *call=lc->call;
+       if (call==NULL) return 0;
+       if (call->media_start_time==0) return 0;
+       return time(NULL)-call->media_start_time;
+}
+
+const LinphoneAddress *linphone_core_get_remote_uri(LinphoneCore *lc){
+       LinphoneCall *call=lc->call;
+       if (call==NULL) return 0;
+       return call->dir==LinphoneCallIncoming ? call->log->from : call->log->to;
+}
+
+void _osip_trace_func(char *fi, int li, osip_trace_level_t level, char *chfr, va_list ap){
+       int ortp_level=ORTP_DEBUG;
+       switch(level){
+               case OSIP_INFO1:
+               case OSIP_INFO2:
+               case OSIP_INFO3:
+               case OSIP_INFO4:
+                       ortp_level=ORTP_MESSAGE;
+                       break;
+               case OSIP_WARNING:
+                       ortp_level=ORTP_WARNING;
+                       break;
+               case OSIP_ERROR:
+               case OSIP_BUG:
+                       ortp_level=ORTP_ERROR;
+                       break;
+               case OSIP_FATAL:
+                       ortp_level=ORTP_FATAL;
+                       break;
+               case END_TRACE_LEVEL:
+                       break;
+       }
+       if (ortp_log_level_enabled(level)){
+               int len=strlen(chfr);
+               char *chfrdup=ortp_strdup(chfr);
+               /*need to remove endline*/
+               if (len>1){
+                       if (chfrdup[len-1]=='\n')
+                               chfrdup[len-1]='\0';
+                       if (chfrdup[len-2]=='\r')
+                               chfrdup[len-2]='\0';
+               }
+               ortp_logv(ortp_level,chfrdup,ap);
+               ortp_free(chfrdup);
+       }
+}
+
+/**
+ * Enable logs in supplied FILE*.
+ *
+ * @ingroup misc
+ *
+ * @param file a C FILE* where to fprintf logs. If null stdout is used.
+ * 
+**/
+void linphone_core_enable_logs(FILE *file){
+       if (file==NULL) file=stdout;
+       ortp_set_log_file(file);
+       ortp_set_log_level_mask(ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
+       osip_trace_initialize_func (OSIP_INFO4,&_osip_trace_func);
+}
+
+/**
+ * Enable logs through the user's supplied log callback.
+ *
+ * @ingroup misc
+ *
+ * @param logfunc The address of a OrtpLogFunc callback whose protoype is
+ *               typedef void (*OrtpLogFunc)(OrtpLogLevel lev, const char *fmt, va_list args);
+ * 
+**/
+void linphone_core_enable_logs_with_cb(OrtpLogFunc logfunc){
+       ortp_set_log_level_mask(ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
+       osip_trace_initialize_func (OSIP_INFO4,&_osip_trace_func);
+       ortp_set_log_handler(logfunc);
+}
+
+/**
+ * Entirely disable logging.
+ *
+ * @ingroup misc
+**/
+void linphone_core_disable_logs(){
+       int tl;
+       for (tl=0;tl<=OSIP_INFO4;tl++) osip_trace_disable_level(tl);
+       ortp_set_log_level_mask(ORTP_ERROR|ORTP_FATAL);
+}
+
+
+static void
+net_config_read (LinphoneCore *lc)
+{
+       int tmp;
+       const char *tmpstr;
+       LpConfig *config=lc->config;
+
+       tmp=lp_config_get_int(config,"net","download_bw",0);
+       linphone_core_set_download_bandwidth(lc,tmp);
+       tmp=lp_config_get_int(config,"net","upload_bw",0);
+       linphone_core_set_upload_bandwidth(lc,tmp);
+       linphone_core_set_stun_server(lc,lp_config_get_string(config,"net","stun_server",NULL));
+       tmpstr=lp_config_get_string(lc->config,"net","nat_address",NULL);
+       if (tmpstr!=NULL && (strlen(tmpstr)<1)) tmpstr=NULL;
+       linphone_core_set_nat_address(lc,tmpstr);
+       tmp=lp_config_get_int(lc->config,"net","firewall_policy",0);
+       linphone_core_set_firewall_policy(lc,tmp);
+       tmp=lp_config_get_int(lc->config,"net","nat_sdp_only",0);
+       lc->net_conf.nat_sdp_only=tmp;
+       tmp=lp_config_get_int(lc->config,"net","mtu",0);
+       linphone_core_set_mtu(lc,tmp);
+}
+
+static void build_sound_devices_table(LinphoneCore *lc){
+       const char **devices;
+       const char **old;
+       int ndev;
+       int i;
+       const MSList *elem=ms_snd_card_manager_get_list(ms_snd_card_manager_get());
+       ndev=ms_list_size(elem);
+       devices=ms_malloc((ndev+1)*sizeof(const char *));
+       for (i=0;elem!=NULL;elem=elem->next,i++){
+               devices[i]=ms_snd_card_get_string_id((MSSndCard *)elem->data);
+       }
+       devices[ndev]=NULL;
+       old=lc->sound_conf.cards;
+       lc->sound_conf.cards=devices;
+       if (old!=NULL) ms_free(old);
+}
+
+static void sound_config_read(LinphoneCore *lc)
+{
+       /*int tmp;*/
+       const char *tmpbuf;
+       const char *devid;
+#ifdef __linux
+       /*alsadev let the user use custom alsa device within linphone*/
+       devid=lp_config_get_string(lc->config,"sound","alsadev",NULL);
+       if (devid){
+               MSSndCard *card=ms_alsa_card_new_custom(devid,devid);
+               ms_snd_card_manager_add_card(ms_snd_card_manager_get(),card);
+       }
+#endif
+       /* retrieve all sound devices */
+       build_sound_devices_table(lc);
+
+       devid=lp_config_get_string(lc->config,"sound","playback_dev_id",NULL);
+       linphone_core_set_playback_device(lc,devid);
+
+       devid=lp_config_get_string(lc->config,"sound","ringer_dev_id",NULL);
+       linphone_core_set_ringer_device(lc,devid);
+
+       devid=lp_config_get_string(lc->config,"sound","capture_dev_id",NULL);
+       linphone_core_set_capture_device(lc,devid);
+
+/*
+       tmp=lp_config_get_int(lc->config,"sound","play_lev",80);
+       linphone_core_set_play_level(lc,tmp);
+       tmp=lp_config_get_int(lc->config,"sound","ring_lev",80);
+       linphone_core_set_ring_level(lc,tmp);
+       tmp=lp_config_get_int(lc->config,"sound","rec_lev",80);
+       linphone_core_set_rec_level(lc,tmp);
+       tmpbuf=lp_config_get_string(lc->config,"sound","source","m");
+       linphone_core_set_sound_source(lc,tmpbuf[0]);
+*/
+
+       tmpbuf=PACKAGE_SOUND_DIR "/" LOCAL_RING;
+       tmpbuf=lp_config_get_string(lc->config,"sound","local_ring",tmpbuf);
+       if (ortp_file_exist(tmpbuf)==-1) {
+               tmpbuf=PACKAGE_SOUND_DIR "/" LOCAL_RING;
+       }
+       if (strstr(tmpbuf,".wav")==NULL){
+               /* it currently uses old sound files, so replace them */
+               tmpbuf=PACKAGE_SOUND_DIR "/" LOCAL_RING;
+       }
+
+       linphone_core_set_ring(lc,tmpbuf);
+
+       tmpbuf=PACKAGE_SOUND_DIR "/" REMOTE_RING;
+       tmpbuf=lp_config_get_string(lc->config,"sound","remote_ring",tmpbuf);
+       if (ortp_file_exist(tmpbuf)==-1){
+               tmpbuf=PACKAGE_SOUND_DIR "/" REMOTE_RING;
+       }
+       if (strstr(tmpbuf,".wav")==NULL){
+               /* it currently uses old sound files, so replace them */
+               tmpbuf=PACKAGE_SOUND_DIR "/" REMOTE_RING;
+       }
+       linphone_core_set_ringback(lc,tmpbuf);
+       check_sound_device(lc);
+       lc->sound_conf.latency=0;
+
+       linphone_core_enable_echo_cancellation(lc,
+           lp_config_get_int(lc->config,"sound","echocancelation",0) |
+           lp_config_get_int(lc->config,"sound","echocancellation",0)
+               );
+
+       linphone_core_enable_echo_limiter(lc,
+               lp_config_get_int(lc->config,"sound","echolimiter",0));
+       linphone_core_enable_agc(lc,
+               lp_config_get_int(lc->config,"sound","agc",0));
+}
+
+static void sip_config_read(LinphoneCore *lc)
+{
+       char *contact;
+       const char *tmpstr;
+       int port;
+       int i,tmp;
+       int ipv6;
+       port=lp_config_get_int(lc->config,"sip","use_info",0);
+       linphone_core_set_use_info_for_dtmf(lc,port);
+
+       port=lp_config_get_int(lc->config,"sip","use_rfc2833",0);
+       linphone_core_set_use_rfc2833_for_dtmf(lc,port);
+
+       ipv6=lp_config_get_int(lc->config,"sip","use_ipv6",-1);
+       if (ipv6==-1){
+               ipv6=0;
+               if (host_has_ipv6_network()){
+                       lc->vtable.display_message(lc,_("Your machine appears to be connected to an IPv6 network. By default linphone always uses IPv4. Please update your configuration if you want to use IPv6"));
+               }
+       }
+       linphone_core_enable_ipv6(lc,ipv6);
+       port=lp_config_get_int(lc->config,"sip","sip_port",5060);
+       linphone_core_set_sip_port(lc,port);
+
+       tmpstr=lp_config_get_string(lc->config,"sip","contact",NULL);
+       if (tmpstr==NULL || linphone_core_set_primary_contact(lc,tmpstr)==-1) {
+               const char *hostname=NULL;
+               const char *username=NULL;
+#ifdef HAVE_GETENV
+               hostname=getenv("HOST");
+               username=getenv("USER");
+               if (hostname==NULL) hostname=getenv("HOSTNAME");
+#endif /*HAVE_GETENV*/
+               if (hostname==NULL)
+                       hostname="unknown-host";
+               if (username==NULL){
+                       username="toto";
+               }
+               contact=ortp_strdup_printf("sip:%s@%s",username,hostname);
+               linphone_core_set_primary_contact(lc,contact);
+               ms_free(contact);
+       }
+
+       tmp=lp_config_get_int(lc->config,"sip","guess_hostname",1);
+       linphone_core_set_guess_hostname(lc,tmp);
+
+
+       tmp=lp_config_get_int(lc->config,"sip","inc_timeout",15);
+       linphone_core_set_inc_timeout(lc,tmp);
+
+       /* get proxies config */
+       for(i=0;; i++){
+               LinphoneProxyConfig *cfg=linphone_proxy_config_new_from_config_file(lc->config,i);
+               if (cfg!=NULL){
+                       linphone_core_add_proxy_config(lc,cfg);
+               }else{
+                       break;
+               }
+       }
+       /* get the default proxy */
+       tmp=lp_config_get_int(lc->config,"sip","default_proxy",-1);
+       linphone_core_set_default_proxy_index(lc,tmp);
+
+       /* read authentication information */
+       for(i=0;; i++){
+               LinphoneAuthInfo *ai=linphone_auth_info_new_from_config_file(lc->config,i);
+               if (ai!=NULL){
+                       linphone_core_add_auth_info(lc,ai);
+               }else{
+                       break;
+               }
+       }
+       
+       /*for test*/
+       lc->sip_conf.sdp_200_ack=lp_config_get_int(lc->config,"sip","sdp_200_ack",0);
+       lc->sip_conf.only_one_codec=lp_config_get_int(lc->config,"sip","only_one_codec",0);
+       lc->sip_conf.register_only_when_network_is_up=
+               lp_config_get_int(lc->config,"sip","register_only_when_network_is_up",0);
+}
+
+static void rtp_config_read(LinphoneCore *lc)
+{
+       int port;
+       int jitt_comp;
+       int nortp_timeout;
+       port=lp_config_get_int(lc->config,"rtp","audio_rtp_port",7078);
+       linphone_core_set_audio_port(lc,port);
+
+       port=lp_config_get_int(lc->config,"rtp","video_rtp_port",9078);
+       if (port==0) port=9078;
+       linphone_core_set_video_port(lc,port);
+
+       jitt_comp=lp_config_get_int(lc->config,"rtp","audio_jitt_comp",60);
+       linphone_core_set_audio_jittcomp(lc,jitt_comp);
+       jitt_comp=lp_config_get_int(lc->config,"rtp","video_jitt_comp",60);
+       nortp_timeout=lp_config_get_int(lc->config,"rtp","nortp_timeout",30);
+       linphone_core_set_nortp_timeout(lc,nortp_timeout);
+}
+
+
+static PayloadType * get_codec(LpConfig *config, char* type,int index){
+       char codeckey[50];
+       const char *mime,*fmtp;
+       int rate,enabled;
+       PayloadType *pt;
+
+       snprintf(codeckey,50,"%s_%i",type,index);
+       mime=lp_config_get_string(config,codeckey,"mime",NULL);
+       if (mime==NULL || strlen(mime)==0 ) return NULL;
+
+       pt=payload_type_new();
+       pt->mime_type=ms_strdup(mime);
+
+       rate=lp_config_get_int(config,codeckey,"rate",8000);
+       pt->clock_rate=rate;
+       fmtp=lp_config_get_string(config,codeckey,"recv_fmtp",NULL);
+       if (fmtp) pt->recv_fmtp=ms_strdup(fmtp);
+       enabled=lp_config_get_int(config,codeckey,"enabled",1);
+       if (enabled ) pt->flags|=PAYLOAD_TYPE_ENABLED;
+       //ms_message("Found codec %s/%i",pt->mime_type,pt->clock_rate);
+       return pt;
+}
+
+static void codecs_config_read(LinphoneCore *lc)
+{
+       int i;
+       PayloadType *pt;
+       MSList *audio_codecs=NULL;
+       MSList *video_codecs=NULL;
+       for (i=0;;i++){
+               pt=get_codec(lc->config,"audio_codec",i);
+               if (pt==NULL) break;
+               audio_codecs=ms_list_append(audio_codecs,(void *)pt);
+       }
+       for (i=0;;i++){
+               pt=get_codec(lc->config,"video_codec",i);
+               if (pt==NULL) break;
+               video_codecs=ms_list_append(video_codecs,(void *)pt);
+       }
+       linphone_core_set_audio_codecs(lc,audio_codecs);
+       linphone_core_set_video_codecs(lc,video_codecs);
+       linphone_core_setup_local_rtp_profile(lc);
+}
+
+static void video_config_read(LinphoneCore *lc)
+{
+       int capture, display;
+       int enabled;
+       const char *str;
+       int ndev;
+       const char **devices;
+       const MSList *elem;
+       int i;
+
+       /* retrieve all video devices */
+       elem=ms_web_cam_manager_get_list(ms_web_cam_manager_get());
+       ndev=ms_list_size(elem);
+       devices=ms_malloc((ndev+1)*sizeof(const char *));
+       for (i=0;elem!=NULL;elem=elem->next,i++){
+               devices[i]=ms_web_cam_get_string_id((MSWebCam *)elem->data);
+       }
+       devices[ndev]=NULL;
+       lc->video_conf.cams=devices;
+
+       str=lp_config_get_string(lc->config,"video","device",NULL);
+       if (str && str[0]==0) str=NULL;
+       linphone_core_set_video_device(lc,str);
+
+       linphone_core_set_preferred_video_size_by_name(lc,
+               lp_config_get_string(lc->config,"video","size","cif"));
+
+       enabled=lp_config_get_int(lc->config,"video","enabled",1);
+       capture=lp_config_get_int(lc->config,"video","capture",enabled);
+       display=lp_config_get_int(lc->config,"video","display",enabled);
+#ifdef VIDEO_ENABLED
+       linphone_core_enable_video(lc,capture,display);
+       linphone_core_enable_self_view(lc,TRUE);
+#endif
+}
+
+static void ui_config_read(LinphoneCore *lc)
+{
+       LinphoneFriend *lf;
+       int i;
+       for (i=0;(lf=linphone_friend_new_from_config_file(lc,i))!=NULL;i++){
+               linphone_core_add_friend(lc,lf);
+       }
+       call_logs_read_from_config_file(lc);
+}
+
+/*
+static void autoreplier_config_init(LinphoneCore *lc)
+{
+       autoreplier_config_t *config=&lc->autoreplier_conf;
+       config->enabled=lp_config_get_int(lc->config,"autoreplier","enabled",0);
+       config->after_seconds=lp_config_get_int(lc->config,"autoreplier","after_seconds",6);
+       config->max_users=lp_config_get_int(lc->config,"autoreplier","max_users",1);
+       config->max_rec_time=lp_config_get_int(lc->config,"autoreplier","max_rec_time",60);
+       config->max_rec_msg=lp_config_get_int(lc->config,"autoreplier","max_rec_msg",10);
+       config->message=lp_config_get_string(lc->config,"autoreplier","message",NULL);
+}
+*/
+
+/**
+ * Sets maximum available download bandwidth
+ *
+ * @ingroup media_parameters
+ *
+ * This is IP bandwidth, in kbit/s.
+ * This information is used signaled to other parties during
+ * calls (within SDP messages) so that the remote end can have
+ * sufficient knowledge to properly configure its audio & video
+ * codec output bitrate to not overflow available bandwidth.
+ *
+ * @param lc the LinphoneCore object
+ * @param bw the bandwidth in kbits/s, 0 for infinite
+ */
+void linphone_core_set_download_bandwidth(LinphoneCore *lc, int bw){
+       lc->net_conf.download_bw=bw;
+       if (bw==0){ /*infinite*/
+               lc->dw_audio_bw=-1;
+               lc->dw_video_bw=-1;
+       }else {
+               lc->dw_audio_bw=MIN(lc->audio_bw,bw);
+               lc->dw_video_bw=MAX(bw-lc->dw_audio_bw-10,0);/*-10: security margin*/
+       }
+}
+
+/**
+ * Sets maximum available upload bandwidth
+ *
+ * @ingroup media_parameters
+ *
+ * This is IP bandwidth, in kbit/s.
+ * This information is used by liblinphone together with remote
+ * side available bandwidth signaled in SDP messages to properly
+ * configure audio & video codec's output bitrate.
+ *
+ * @param lc the LinphoneCore object
+ * @param bw the bandwidth in kbits/s, 0 for infinite
+ */
+void linphone_core_set_upload_bandwidth(LinphoneCore *lc, int bw){
+       lc->net_conf.upload_bw=bw;
+       if (bw==0){ /*infinite*/
+               lc->up_audio_bw=-1;
+               lc->up_video_bw=-1;
+       }else{
+               lc->up_audio_bw=MIN(lc->audio_bw,bw);
+               lc->up_video_bw=MAX(bw-lc->up_audio_bw-10,0);/*-10: security margin*/
+       }
+}
+
+/**
+ * Retrieve the maximum available download bandwidth.
+ *
+ * @ingroup media_parameters
+ *
+ * This value was set by linphone_core_set_download_bandwidth().
+ *
+**/
+int linphone_core_get_download_bandwidth(const LinphoneCore *lc){
+       return lc->net_conf.download_bw;
+}
+
+/**
+ * Retrieve the maximum available upload bandwidth.
+ *
+ * @ingroup media_parameters
+ *
+ * This value was set by linphone_core_set_upload_bandwidth().
+ *
+**/
+int linphone_core_get_upload_bandwidth(const LinphoneCore *lc){
+       return lc->net_conf.upload_bw;
+}
+
+/**
+ * Returns liblinphone's version as a string.
+ *
+ * @ingroup misc
+ *
+**/
+const char * linphone_core_get_version(void){
+       return liblinphone_version;
+}
+
+
+static MSList *linphone_payload_types=NULL;
+
+static void linphone_core_assign_payload_type(PayloadType *const_pt, int number, const char *recv_fmtp){
+       PayloadType *pt;
+       pt=payload_type_clone(const_pt);
+       if (recv_fmtp!=NULL) payload_type_set_recv_fmtp(pt,recv_fmtp);
+       rtp_profile_set_payload(&av_profile,number,pt);
+       linphone_payload_types=ms_list_append(linphone_payload_types,pt);
+}
+
+static void linphone_core_free_payload_types(void){
+       ms_list_for_each(linphone_payload_types,(void (*)(void*))payload_type_destroy);
+       ms_list_free(linphone_payload_types);
+       linphone_payload_types=NULL;
+}
+
+static void linphone_core_init (LinphoneCore * lc, const LinphoneCoreVTable *vtable, const char *config_path, 
+    const char *factory_config_path, void * userdata)
+{
+       memset (lc, 0, sizeof (LinphoneCore));
+       lc->data=userdata;
+
+       memcpy(&lc->vtable,vtable,sizeof(LinphoneCoreVTable));
+
+       gstate_initialize(lc);
+       gstate_new_state(lc, GSTATE_POWER_STARTUP, NULL);
+
+       ortp_init();
+       linphone_core_assign_payload_type(&payload_type_lpc1015,115,NULL);
+       linphone_core_assign_payload_type(&payload_type_speex_nb,110,"vbr=on");
+       linphone_core_assign_payload_type(&payload_type_speex_wb,111,"vbr=on");
+       linphone_core_assign_payload_type(&payload_type_speex_uwb,112,"vbr=on");
+       linphone_core_assign_payload_type(&payload_type_telephone_event,101,NULL);
+       linphone_core_assign_payload_type(&payload_type_ilbc,113,NULL);
+
+#ifdef ENABLE_NONSTANDARD_GSM
+       {
+               PayloadType *pt;
+               pt=payload_type_clone(&payload_type_gsm);
+               pt->clock_rate=11025;
+               rtp_profile_set_payload(&av_profile,114,pt);
+               linphone_payload_types=ms_list_append(linphone_payload_types,pt);
+               pt=payload_type_clone(&payload_type_gsm);
+               pt->clock_rate=22050;
+               rtp_profile_set_payload(&av_profile,115,pt);
+               linphone_payload_types=ms_list_append(linphone_payload_types,pt);
+       }
+#endif
+
+#ifdef VIDEO_ENABLED
+       linphone_core_assign_payload_type(&payload_type_h263,34,NULL);
+       linphone_core_assign_payload_type(&payload_type_theora,97,NULL);
+       linphone_core_assign_payload_type(&payload_type_h263_1998,98,"CIF=1;QCIF=1");
+       linphone_core_assign_payload_type(&payload_type_mp4v,99,"profile-level-id=3");
+       linphone_core_assign_payload_type(&payload_type_x_snow,100,NULL);
+       linphone_core_assign_payload_type(&payload_type_h264,102,NULL);
+       linphone_core_assign_payload_type(&payload_type_h264,103,"packetization-mode=1");
+#endif
+
+       ms_init();
+
+       lc->config=lp_config_new(config_path);
+       if (factory_config_path)
+               lp_config_read_file(lc->config,factory_config_path);
+
+#ifdef VINCENT_MAURY_RSVP
+       /* default qos parameters : rsvp on, rpc off */
+       lc->rsvp_enable = 1;
+       lc->rpc_enable = 0;
+#endif
+       sip_setup_register_all();
+       sound_config_read(lc);
+       net_config_read(lc);
+       rtp_config_read(lc);
+       codecs_config_read(lc);
+       sip_config_read(lc); /* this will start eXosip*/
+       video_config_read(lc);
+       //autoreplier_config_init(&lc->autoreplier_conf);
+       lc->prev_mode=LINPHONE_STATUS_ONLINE;
+       lc->presence_mode=LINPHONE_STATUS_ONLINE;
+       lc->max_call_logs=15;
+       ui_config_read(lc);
+       ms_mutex_init(&lc->lock,NULL);
+       lc->vtable.display_status(lc,_("Ready"));
+        gstate_new_state(lc, GSTATE_POWER_ON, NULL);
+       lc->ready=TRUE;
+}
+
+/**
+ * Instanciates a LinphoneCore object.
+ * @ingroup initializing
+ * 
+ * The LinphoneCore object is the primary handle for doing all phone actions.
+ * It should be unique within your application.
+ * @param vtable a LinphoneCoreVTable structure holding your application callbacks
+ * @param config_path a path to a config file. If it does not exists it will be created.
+ *        The config file is used to store all user settings, call logs, friends, proxies...
+ * @param factory_config_path a path to a read-only config file that can be used to 
+ *        to store hard-coded preference such as proxy settings or internal preferences.
+ *        The settings in this factory file always override the one in the normal config file.
+ *        It is OPTIONAL, use NULL if unneeded.
+ * @param userdata an opaque user pointer that can be retrieved at any time (for example in
+ *        callbacks) using linphone_core_get_user_data().
+ * 
+**/
+LinphoneCore *linphone_core_new(const LinphoneCoreVTable *vtable,
+                                               const char *config_path, const char *factory_config_path, void * userdata)
+{
+       LinphoneCore *core=ms_new(LinphoneCore,1);
+       linphone_core_init(core,vtable,config_path, factory_config_path, userdata);
+       return core;
+}
+
+/**
+ * Returns the list of available audio codecs.
+ *
+ * This list is unmodifiable. The ->data field of the MSList points a PayloadType
+ * structure holding the codec information.
+ * It is possible to make copy of the list with ms_list_copy() in order to modify it
+ * (such as the order of codecs).
+**/
+const MSList *linphone_core_get_audio_codecs(const LinphoneCore *lc)
+{
+       return lc->codecs_conf.audio_codecs;
+}
+
+/**
+ * Returns the list of available video codecs.
+ *
+ * This list is unmodifiable. The ->data field of the MSList points a PayloadType
+ * structure holding the codec information.
+ * It is possible to make copy of the list with ms_list_copy() in order to modify it
+ * (such as the order of codecs).
+**/
+const MSList *linphone_core_get_video_codecs(const LinphoneCore *lc)
+{
+       return lc->codecs_conf.video_codecs;
+}
+
+/**
+ * Sets the local "from" identity.
+ *
+ * @ingroup proxies
+ * This data is used in absence of any proxy configuration or when no
+ * default proxy configuration is set. See LinphoneProxyConfig
+**/
+int linphone_core_set_primary_contact(LinphoneCore *lc, const char *contact)
+{
+       osip_from_t *ctt=NULL;
+       osip_from_init(&ctt);
+       if (osip_from_parse(ctt,contact)!=0){
+               ms_error("Bad contact url: %s",contact);
+               osip_from_free(ctt);
+               return -1;
+       }
+       if (lc->sip_conf.contact!=NULL) ms_free(lc->sip_conf.contact);
+       lc->sip_conf.contact=ms_strdup(contact);
+       if (lc->sip_conf.guessed_contact!=NULL){
+               ms_free(lc->sip_conf.guessed_contact);
+               lc->sip_conf.guessed_contact=NULL;
+       }
+       osip_from_free(ctt);
+       return 0;
+}
+
+
+/*result must be an array of chars at least LINPHONE_IPADDR_SIZE */
+void linphone_core_get_local_ip(LinphoneCore *lc, const char *dest, char *result){
+       if (lc->apply_nat_settings){
+               apply_nat_settings(lc);
+               lc->apply_nat_settings=FALSE;
+       }
+       if (linphone_core_get_firewall_policy(lc)==LINPHONE_POLICY_USE_NAT_ADDRESS){
+               strncpy(result,linphone_core_get_nat_address(lc),LINPHONE_IPADDR_SIZE);
+               return;
+       }
+       if (dest==NULL) dest="87.98.157.38"; /*a public IP address*/
+       if (linphone_core_get_local_ip_for(dest,result)==0)
+               return;
+       /*else fallback to exosip routine that will attempt to find the most realistic interface */
+       if (eXosip_guess_localip(lc->sip_conf.ipv6_enabled ? AF_INET6 : AF_INET,result,LINPHONE_IPADDR_SIZE)<0){
+               /*default to something */
+               strncpy(result,lc->sip_conf.ipv6_enabled ? "::1" : "127.0.0.1",LINPHONE_IPADDR_SIZE);
+               ms_error("Could not find default routable ip address !");
+       }
+}
+
+/**
+ * Returns the default identity when no proxy configuration is used.
+ *
+ * @ingroup proxies
+**/
+const char *linphone_core_get_primary_contact(LinphoneCore *lc)
+{
+       char *identity;
+       char tmp[LINPHONE_IPADDR_SIZE];
+       if (lc->sip_conf.guess_hostname){
+               if (lc->sip_conf.guessed_contact==NULL || lc->sip_conf.loopback_only){
+                       char *guessed=NULL;
+                       osip_from_t *url;
+                       if (lc->sip_conf.guessed_contact!=NULL){
+                               ms_free(lc->sip_conf.guessed_contact);
+                               lc->sip_conf.guessed_contact=NULL;
+                       }
+
+                       osip_from_init(&url);
+                       if (osip_from_parse(url,lc->sip_conf.contact)==0){
+
+                       }else ms_error("Could not parse identity contact !");
+                       linphone_core_get_local_ip(lc, NULL, tmp);
+                       if (strcmp(tmp,"127.0.0.1")==0 || strcmp(tmp,"::1")==0 ){
+                               ms_warning("Local loopback network only !");
+                               lc->sip_conf.loopback_only=TRUE;
+                       }else lc->sip_conf.loopback_only=FALSE;
+                       osip_free(url->url->host);
+                       url->url->host=osip_strdup(tmp);
+                       if (url->url->port!=NULL){
+                               osip_free(url->url->port);
+                               url->url->port=NULL;
+                       }
+                       if (lc->sip_conf.sip_port!=5060){
+                               url->url->port=ortp_strdup_printf("%i",lc->sip_conf.sip_port);
+                       }
+                       osip_from_to_str(url,&guessed);
+                       lc->sip_conf.guessed_contact=guessed;
+
+                       osip_from_free(url);
+
+               }
+               identity=lc->sip_conf.guessed_contact;
+       }else{
+               identity=lc->sip_conf.contact;
+       }
+       return identity;
+}
+
+/**
+ * Tells LinphoneCore to guess local hostname automatically in primary contact.
+ *
+ * @ingroup proxies
+**/
+void linphone_core_set_guess_hostname(LinphoneCore *lc, bool_t val){
+       lc->sip_conf.guess_hostname=val;
+}
+
+/**
+ * Returns TRUE if hostname part of primary contact is guessed automatically.
+ *
+ * @ingroup proxies
+**/
+bool_t linphone_core_get_guess_hostname(LinphoneCore *lc){
+       return lc->sip_conf.guess_hostname;
+}
+
+/**
+ * Same as linphone_core_get_primary_contact() but the result is a LinphoneAddress object
+ * instead of const char*
+ *
+ * @ingroup proxies
+**/
+LinphoneAddress *linphone_core_get_primary_contact_parsed(LinphoneCore *lc){
+       return linphone_address_new(linphone_core_get_primary_contact(lc));
+}
+
+/**
+ * Sets the list of audio codecs.
+ *
+ * @ingroup media_parameters
+ * The list is taken by the LinphoneCore thus the application should not free it.
+ * This list is made of struct PayloadType describing the codec parameters.
+**/
+int linphone_core_set_audio_codecs(LinphoneCore *lc, MSList *codecs)
+{
+       if (lc->codecs_conf.audio_codecs!=NULL) ms_list_free(lc->codecs_conf.audio_codecs);
+       lc->codecs_conf.audio_codecs=codecs;
+       return 0;
+}
+
+/**
+ * Sets the list of video codecs.
+ *
+ * @ingroup media_parameters
+ * The list is taken by the LinphoneCore thus the application should not free it.
+ * This list is made of struct PayloadType describing the codec parameters.
+**/
+int linphone_core_set_video_codecs(LinphoneCore *lc, MSList *codecs)
+{
+       if (lc->codecs_conf.video_codecs!=NULL) ms_list_free(lc->codecs_conf.video_codecs);
+       lc->codecs_conf.video_codecs=codecs;
+       return 0;
+}
+
+const MSList * linphone_core_get_friend_list(const LinphoneCore *lc)
+{
+       return lc->friends;
+}
+
+/**
+ * Returns the nominal jitter buffer size in milliseconds.
+ *
+ * @ingroup media_parameters
+**/
+int linphone_core_get_audio_jittcomp(LinphoneCore *lc)
+{
+       return lc->rtp_conf.audio_jitt_comp;
+}
+
+/**
+ * Returns the UDP port used for audio streaming.
+ *
+ * @ingroup network_parameters
+**/
+int linphone_core_get_audio_port(const LinphoneCore *lc)
+{
+       return lc->rtp_conf.audio_rtp_port;
+}
+
+/**
+ * Returns the UDP port used for video streaming.
+ *
+ * @ingroup network_parameters
+**/
+int linphone_core_get_video_port(const LinphoneCore *lc){
+       return lc->rtp_conf.video_rtp_port;
+}
+
+
+/**
+ * Returns the value in seconds of the no-rtp timeout.
+ *
+ * @ingroup media_parameters
+ * When no RTP or RTCP packets have been received for a while
+ * LinphoneCore will consider the call is broken (remote end crashed or
+ * disconnected from the network), and thus will terminate the call.
+ * The no-rtp timeout is the duration above which the call is considered broken.
+**/
+int linphone_core_get_nortp_timeout(const LinphoneCore *lc){
+       return lc->rtp_conf.nortp_timeout;
+}
+
+/**
+ * Sets the nominal audio jitter buffer size in milliseconds.
+ *
+ * @ingroup media_parameters
+**/
+void linphone_core_set_audio_jittcomp(LinphoneCore *lc, int value)
+{
+       lc->rtp_conf.audio_jitt_comp=value;
+}
+
+/**
+ * Sets the UDP port used for audio streaming.
+ *
+ * @ingroup network_parameters
+**/
+void linphone_core_set_audio_port(LinphoneCore *lc, int port)
+{
+       lc->rtp_conf.audio_rtp_port=port;
+}
+
+/**
+ * Sets the UDP port used for video streaming.
+ *
+ * @ingroup network_parameters
+**/
+void linphone_core_set_video_port(LinphoneCore *lc, int port){
+       lc->rtp_conf.video_rtp_port=port;
+}
+
+/**
+ * Sets the no-rtp timeout value in seconds.
+ * 
+ * @ingroup media_parameters
+ * See linphone_core_get_nortp_timeout() for details.
+**/
+void linphone_core_set_nortp_timeout(LinphoneCore *lc, int nortp_timeout){
+       lc->rtp_conf.nortp_timeout=nortp_timeout;
+}
+
+/**
+ * Indicates whether SIP INFO is used for sending digits.
+ *
+ * @ingroup media_parameters
+**/
+bool_t linphone_core_get_use_info_for_dtmf(LinphoneCore *lc)
+{
+       return lc->sip_conf.use_info;
+}
+
+/**
+ * Sets whether SIP INFO is to be used for sending digits.
+ *
+ * @ingroup media_parameters
+**/
+void linphone_core_set_use_info_for_dtmf(LinphoneCore *lc,bool_t use_info)
+{
+       lc->sip_conf.use_info=use_info;
+}
+
+/**
+ * Indicates whether RFC2833 is used for sending digits.
+ *
+ * @ingroup media_parameters
+**/
+bool_t linphone_core_get_use_rfc2833_for_dtmf(LinphoneCore *lc)
+{
+       return lc->sip_conf.use_rfc2833;
+}
+
+/**
+ * Sets whether RFC2833 is to be used for sending digits.
+ *
+ * @ingroup media_parameters
+**/
+void linphone_core_set_use_rfc2833_for_dtmf(LinphoneCore *lc,bool_t use_rfc2833)
+{
+       lc->sip_conf.use_rfc2833=use_rfc2833;
+}
+
+/**
+ * Returns the UDP port used by SIP.
+ *
+ * @ingroup network_parameters
+**/
+int linphone_core_get_sip_port(LinphoneCore *lc)
+{
+       return lc->sip_conf.sip_port;
+}
+
+static bool_t exosip_running=FALSE;
+static char _ua_name[64]="Linphone";
+static char _ua_version[64]=LINPHONE_VERSION;
+
+static void apply_user_agent(void){
+       char ua_string[256];
+       snprintf(ua_string,sizeof(ua_string),"%s/%s (eXosip2/%s)",_ua_name,_ua_version,
+#ifdef HAVE_EXOSIP_GET_VERSION
+                eXosip_get_version()
+#else
+                "unknown"
+#endif
+       );
+       eXosip_set_user_agent(ua_string);
+}
+
+/**
+ * Sets the user agent string used in SIP messages.
+ *
+ * @ingroup misc
+**/
+void linphone_core_set_user_agent(const char *name, const char *ver){
+       strncpy(_ua_name,name,sizeof(_ua_name)-1);
+       strncpy(_ua_version,ver,sizeof(_ua_version));
+}
+
+/**
+ * Sets the UDP port to be used by SIP.
+ *
+ * @ingroup network_parameters
+**/
+void linphone_core_set_sip_port(LinphoneCore *lc,int port)
+{
+       const char *anyaddr;
+       int err=0;
+       if (port==lc->sip_conf.sip_port) return;
+       lc->sip_conf.sip_port=port;
+       if (exosip_running) eXosip_quit();
+       eXosip_init();
+       err=0;
+       eXosip_set_option(13,&err); /*13=EXOSIP_OPT_SRV_WITH_NAPTR, as it is an enum value, we can't use it unless we are sure of the
+                                       version of eXosip, which is not the case*/
+       eXosip_enable_ipv6(lc->sip_conf.ipv6_enabled);
+       if (lc->sip_conf.ipv6_enabled)
+               anyaddr="::0";
+       else
+               anyaddr="0.0.0.0";
+       err=eXosip_listen_addr (IPPROTO_UDP, anyaddr, port,
+               lc->sip_conf.ipv6_enabled ?  PF_INET6 : PF_INET, 0);
+       if (err<0){
+               char *msg=ortp_strdup_printf("UDP port %i seems already in use ! Cannot initialize.",port);
+               ms_warning(msg);
+               lc->vtable.display_warning(lc,msg);
+               ms_free(msg);
+               return;
+       }
+#ifdef VINCENT_MAURY_RSVP
+       /* tell exosip the qos settings according to default linphone parameters */
+       eXosip_set_rsvp_mode (lc->rsvp_enable);
+       eXosip_set_rpc_mode (lc->rpc_enable);
+#endif
+       apply_user_agent();
+       exosip_running=TRUE;
+}
+
+/**
+ * Returns TRUE if IPv6 is enabled.
+ *
+ * @ingroup network_parameters
+ * See linphone_core_enable_ipv6() for more details on how IPv6 is supported in liblinphone.
+**/
+bool_t linphone_core_ipv6_enabled(LinphoneCore *lc){
+       return lc->sip_conf.ipv6_enabled;
+}
+
+/**
+ * Turns IPv6 support on or off.
+ *
+ * @ingroup network_parameters
+ *
+ * @note IPv6 support is exclusive with IPv4 in liblinphone:
+ * when IPv6 is turned on, IPv4 calls won't be possible anymore.
+ * By default IPv6 support is off.
+**/
+void linphone_core_enable_ipv6(LinphoneCore *lc, bool_t val){
+       if (lc->sip_conf.ipv6_enabled!=val){
+               lc->sip_conf.ipv6_enabled=val;
+               if (exosip_running){
+                       /* we need to restart eXosip */
+                       linphone_core_set_sip_port(lc, lc->sip_conf.sip_port);
+               }
+       }
+}
+
+static void display_bandwidth(RtpSession *as, RtpSession *vs){
+       ms_message("bandwidth usage: audio=[d=%.1f,u=%.1f] video=[d=%.1f,u=%.1f] kbit/sec",
+       (as!=NULL) ? (rtp_session_compute_recv_bandwidth(as)*1e-3) : 0,
+       (as!=NULL) ? (rtp_session_compute_send_bandwidth(as)*1e-3) : 0,
+       (vs!=NULL) ? (rtp_session_compute_recv_bandwidth(vs)*1e-3) : 0,
+       (vs!=NULL) ? (rtp_session_compute_send_bandwidth(vs)*1e-3) : 0);
+}
+
+static void linphone_core_disconnected(LinphoneCore *lc){
+       lc->vtable.display_warning(lc,_("Remote end seems to have disconnected, the call is going to be closed."));
+       linphone_core_terminate_call(lc,NULL);
+}
+
+static void proxy_update(LinphoneCore *lc, time_t curtime){
+       bool_t doit=FALSE;
+       static time_t last_check=0;
+       static bool_t last_status=FALSE;
+       if (lc->sip_conf.register_only_when_network_is_up){
+               char result[LINPHONE_IPADDR_SIZE];
+               /* only do the network up checking every five seconds */
+               if (last_check==0 || (curtime-last_check)>=5){
+                       if (eXosip_guess_localip(lc->sip_conf.ipv6_enabled ? AF_INET6 : AF_INET,result,LINPHONE_IPADDR_SIZE)==0){
+                               if (strcmp(result,"::1")!=0 && strcmp(result,"127.0.0.1")!=0){
+                                       last_status=TRUE;
+                                       ms_message("Network is up, registering now (%s)",result);
+                               }else last_status=FALSE;
+                       }
+                       last_check=curtime;
+               }
+               doit=last_status;
+       }else doit=TRUE;
+       if (doit) ms_list_for_each(lc->sip_conf.proxies,(void (*)(void*))&linphone_proxy_config_update);
+}
+
+static void assign_buddy_info(LinphoneCore *lc, BuddyInfo *info){
+       LinphoneFriend *lf=linphone_core_get_friend_by_uri(lc,info->sip_uri);
+       if (lf!=NULL){
+               lf->info=info;
+               ms_message("%s has a BuddyInfo assigned with image %p",info->sip_uri, info->image_data);
+               if (lc->vtable.buddy_info_updated)
+                       lc->vtable.buddy_info_updated(lc,lf);
+       }else{
+               ms_warning("Could not any friend with uri %s",info->sip_uri);
+       }
+}
+
+static void analyze_buddy_lookup_results(LinphoneCore *lc, LinphoneProxyConfig *cfg){
+       MSList *elem;
+       SipSetupContext *ctx=linphone_proxy_config_get_sip_setup_context(cfg);
+       for (elem=lc->bl_reqs;elem!=NULL;elem=ms_list_next(elem)){
+               BuddyLookupRequest *req=(BuddyLookupRequest *)elem->data;
+               if (req->status==BuddyLookupDone || req->status==BuddyLookupFailure){
+                       if (req->results!=NULL){
+                               BuddyInfo *i=(BuddyInfo*)req->results->data;
+                               ms_list_free(req->results);
+                               req->results=NULL;
+                               assign_buddy_info(lc,i);
+                       }
+                       sip_setup_context_buddy_lookup_free(ctx,req);
+                       elem->data=NULL;
+               }
+       }
+       /*purge completed requests */
+       while((elem=ms_list_find(lc->bl_reqs,NULL))!=NULL){
+               lc->bl_reqs=ms_list_remove_link(lc->bl_reqs,elem);
+       }
+}
+
+static void linphone_core_grab_buddy_infos(LinphoneCore *lc, LinphoneProxyConfig *cfg){
+       const MSList *elem;
+       SipSetupContext *ctx=linphone_proxy_config_get_sip_setup_context(cfg);
+       for(elem=linphone_core_get_friend_list(lc);elem!=NULL;elem=elem->next){
+               LinphoneFriend *lf=(LinphoneFriend*)elem->data;
+               if (lf->info==NULL){
+                       if (linphone_core_lookup_known_proxy(lc,lf->uri)==cfg){
+                               if (linphone_address_get_username(lf->uri)!=NULL){
+                                       BuddyLookupRequest *req;
+                                       char *tmp=linphone_address_as_string_uri_only(lf->uri);
+                                       req=sip_setup_context_create_buddy_lookup_request(ctx);
+                                       buddy_lookup_request_set_key(req,tmp);
+                                       buddy_lookup_request_set_max_results(req,1);
+                                       sip_setup_context_buddy_lookup_submit(ctx,req);
+                                       lc->bl_reqs=ms_list_append(lc->bl_reqs,req);
+                                       ms_free(tmp);
+                               }
+                       }
+               }
+       }
+}
+
+static void linphone_core_do_plugin_tasks(LinphoneCore *lc){
+       LinphoneProxyConfig *cfg=NULL;
+       linphone_core_get_default_proxy(lc,&cfg);
+       if (cfg){
+               if (lc->bl_refresh){
+                       SipSetupContext *ctx=linphone_proxy_config_get_sip_setup_context(cfg);
+                       if (ctx && (sip_setup_context_get_capabilities(ctx) & SIP_SETUP_CAP_BUDDY_LOOKUP)){
+                               linphone_core_grab_buddy_infos(lc,cfg);
+                               lc->bl_refresh=FALSE;
+                       }
+               }
+               if (lc->bl_reqs) analyze_buddy_lookup_results(lc,cfg);
+       }
+}
+
+/**
+ * Main loop function. It is crucial that your application call it periodically.
+ *
+ * @ingroup initializing
+ * linphone_core_iterate() performs various backgrounds tasks:
+ * - receiving of SIP messages
+ * - handles timers and timeout
+ * - performs registration to proxies
+ * - authentication retries
+ * The application MUST call this function from periodically, in its main loop.
+ * Be careful that this function must be call from the same thread as
+ * other liblinphone methods. In not the case make sure all liblinphone calls are 
+ * serialized with a mutex.
+**/
+void linphone_core_iterate(LinphoneCore *lc)
+{
+       eXosip_event_t *ev;
+       bool_t disconnected=FALSE;
+       int disconnect_timeout = linphone_core_get_nortp_timeout(lc);
+       time_t curtime=time(NULL);
+       int elapsed;
+       bool_t one_second_elapsed=FALSE;
+
+       if (curtime-lc->prevtime>=1){
+               lc->prevtime=curtime;
+               one_second_elapsed=TRUE;
+       }
+
+       if (lc->preview_finished){
+               lc->preview_finished=0;
+               ring_stop(lc->ringstream);
+               lc->ringstream=NULL;
+               lc_callback_obj_invoke(&lc->preview_finished_cb,lc);
+       }
+
+       if (exosip_running){
+               while((ev=eXosip_event_wait(0,0))!=NULL){
+                       linphone_core_process_event(lc,ev);
+               }
+               if (lc->automatic_action==0) {
+                       eXosip_lock();
+                       eXosip_automatic_action();
+                       eXosip_unlock();
+               }
+       }
+
+       proxy_update(lc,curtime);
+
+       if (lc->call!=NULL){
+               LinphoneCall *call=lc->call;
+
+               if (call->dir==LinphoneCallIncoming && call->state==LCStateRinging){
+                       elapsed=curtime-call->start_time;
+                       ms_message("incoming call ringing for %i seconds",elapsed);
+                       if (elapsed>lc->sip_conf.inc_timeout){
+                               linphone_core_terminate_call(lc,NULL);
+                       }
+               }else if (call->state==LCStateAVRunning){
+                       if (one_second_elapsed){
+                               RtpSession *as=NULL,*vs=NULL;
+                               lc->prevtime=curtime;
+                               if (lc->audiostream!=NULL)
+                                       as=lc->audiostream->session;
+                               if (lc->videostream!=NULL)
+                                       vs=lc->videostream->session;
+                               display_bandwidth(as,vs);
+                       }
+#ifdef VIDEO_ENABLED
+                       if (lc->videostream!=NULL)
+                               video_stream_iterate(lc->videostream);
+#endif
+                       if (lc->audiostream!=NULL && disconnect_timeout>0)
+                               disconnected=!audio_stream_alive(lc->audiostream,disconnect_timeout);
+               }
+       }
+       if (linphone_core_video_preview_enabled(lc)){
+               if (lc->previewstream==NULL)
+                       toggle_video_preview(lc,TRUE);
+#ifdef VIDEO_ENABLED
+               else video_stream_iterate(lc->previewstream);
+#endif
+       }else{
+               if (lc->previewstream!=NULL)
+                       toggle_video_preview(lc,FALSE);
+       }
+       if (disconnected)
+               linphone_core_disconnected(lc);
+
+       linphone_core_do_plugin_tasks(lc);
+
+       if (one_second_elapsed && lp_config_needs_commit(lc->config)){
+               lp_config_sync(lc->config);
+       }
+}
+
+
+bool_t linphone_core_is_in_main_thread(LinphoneCore *lc){
+       return TRUE;
+}
+
+static char *guess_route_if_any(LinphoneCore *lc, osip_to_t *parsed_url){
+       const MSList *elem=linphone_core_get_proxy_config_list(lc);
+       for(;elem!=NULL;elem=elem->next){
+               LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
+               char prx[256];
+               if (cfg->ssctx && sip_setup_context_get_proxy(cfg->ssctx,parsed_url->url->host,prx,sizeof(prx))==0){
+                       ms_message("We have a proxy for domain %s",parsed_url->url->host);
+                       if (strcmp(parsed_url->url->host,prx)!=0){
+                               char *route=NULL;
+                               osip_route_t *rt;
+                               osip_route_init(&rt);
+                               if (osip_route_parse(rt,prx)==0){
+                                       char *rtstr;
+                                       osip_uri_uparam_add(rt->url,osip_strdup("lr"),NULL);
+                                       osip_route_to_str(rt,&rtstr);
+                                       route=ms_strdup(rtstr);
+                                       osip_free(rtstr);
+                               }
+                               osip_route_free(rt);
+                               ms_message("Adding a route: %s",route);
+                               return route;
+                       }
+               }
+       }
+       return NULL;
+}
+
+bool_t linphone_core_interpret_url(LinphoneCore *lc, const char *url, LinphoneAddress **real_parsed_url, char **route){
+       enum_lookup_res_t *enumres=NULL;
+       osip_to_t *parsed_url=NULL;
+       char *enum_domain=NULL;
+       LinphoneProxyConfig *proxy;
+       char *tmpurl;
+       const char *tmproute;
+       if (real_parsed_url!=NULL) *real_parsed_url=NULL;
+       *route=NULL;
+       tmproute=linphone_core_get_route(lc);
+
+       if (is_enum(url,&enum_domain)){
+               lc->vtable.display_status(lc,_("Looking for telephone number destination..."));
+               if (enum_lookup(enum_domain,&enumres)<0){
+                       lc->vtable.display_status(lc,_("Could not resolve this number."));
+                       ms_free(enum_domain);
+                       return FALSE;
+               }
+               ms_free(enum_domain);
+               tmpurl=enumres->sip_address[0];
+               if (real_parsed_url!=NULL) *real_parsed_url=linphone_address_new(tmpurl);
+               enum_lookup_res_free(enumres);
+               if (tmproute) *route=ms_strdup(tmproute);
+               return TRUE;
+       }
+       /* check if we have a "sip:" */
+       if (strstr(url,"sip:")==NULL){
+               /* this doesn't look like a true sip uri */
+               proxy=lc->default_proxy;
+               if (proxy!=NULL){
+                       /* append the proxy domain suffix */
+                       LinphoneAddress *uri;
+                       const char *identity=linphone_proxy_config_get_identity(proxy);
+                       char normalized_username[128];
+                       uri=linphone_address_new(identity);
+                       if (uri==NULL){
+                               return FALSE;
+                       }
+                       linphone_address_set_display_name(uri,NULL);
+                       linphone_proxy_config_normalize_number(proxy,url,normalized_username,
+                                                               sizeof(normalized_username));
+                       linphone_address_set_username(uri,normalized_username);
+                                                                               
+                       if (real_parsed_url!=NULL) *real_parsed_url=uri;
+#if 0
+                       /*if the prompted uri was auto-suffixed with proxy domain,
+                       then automatically set a route so that the request goes
+                       through the proxy*/
+                       if (tmproute==NULL){
+                               osip_route_t *rt=NULL;
+                               char *rtstr=NULL;
+                               osip_route_init(&rt);
+                               if (osip_route_parse(rt,linphone_proxy_config_get_addr(proxy))==0){
+                                       osip_uri_uparam_add(rt->url,osip_strdup("lr"),NULL);
+                                       osip_route_to_str(rt,&rtstr);
+                                       *route=ms_strdup(rtstr);
+                                       osip_free(rtstr);
+                               }
+                               ms_message("setting automatically a route to %s",*route);
+                       }
+                       else *route=ms_strdup(tmproute);
+#else
+                       if (tmproute==NULL) *route=guess_route_if_any(lc,*real_parsed_url);
+                       if (tmproute) *route=ms_strdup(tmproute);
+#endif
+                       return TRUE;
+               }
+       }
+       parsed_url=linphone_address_new(url);
+       if (parsed_url!=NULL){
+               if (real_parsed_url!=NULL) *real_parsed_url=parsed_url;
+               else linphone_address_destroy(parsed_url);
+               if (tmproute) *route=ms_strdup(tmproute);
+               else *route=guess_route_if_any(lc,*real_parsed_url);
+               return TRUE;
+       }
+       /* else we could not do anything with url given by user, so display an error */
+       if (lc->vtable.display_warning!=NULL){
+               lc->vtable.display_warning(lc,_("Could not parse given sip address. A sip url usually looks like sip:user@domain"));
+       }
+       return FALSE;
+}
+
+/**
+ * Returns the default identity SIP address.
+ *
+ * @ingroup proxies
+ * This is an helper function:
+ *
+ * If no default proxy is set, this will return the primary contact (
+ * see linphone_core_get_primary_contact() ). If a default proxy is set
+ * it returns the registered identity on the proxy.
+**/
+const char * linphone_core_get_identity(LinphoneCore *lc){
+       LinphoneProxyConfig *proxy=NULL;
+       const char *from;
+       linphone_core_get_default_proxy(lc,&proxy);
+       if (proxy!=NULL) {
+               from=linphone_proxy_config_get_identity(proxy);
+       }else from=linphone_core_get_primary_contact(lc);
+       return from;
+}
+
+const char * linphone_core_get_route(LinphoneCore *lc){
+       LinphoneProxyConfig *proxy=NULL;
+       const char *route=NULL;
+       linphone_core_get_default_proxy(lc,&proxy);
+       if (proxy!=NULL) {
+               route=linphone_proxy_config_get_route(proxy);
+       }
+       return route;
+}
+
+void linphone_set_sdp(osip_message_t *sip, const char *sdpmesg){
+       int sdplen=strlen(sdpmesg);
+       char clen[10];
+       snprintf(clen,sizeof(clen),"%i",sdplen);
+       osip_message_set_body(sip,sdpmesg,sdplen);
+       osip_message_set_content_type(sip,"application/sdp");
+       osip_message_set_content_length(sip,clen);
+}
+
+LinphoneProxyConfig * linphone_core_lookup_known_proxy(LinphoneCore *lc, const LinphoneAddress *uri){
+       const MSList *elem;
+       LinphoneProxyConfig *found_cfg=NULL;
+       for (elem=linphone_core_get_proxy_config_list(lc);elem!=NULL;elem=elem->next){
+               LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
+               const char *domain=linphone_proxy_config_get_domain(cfg);
+               if (domain!=NULL && strcmp(domain,linphone_address_get_domain(uri))==0){
+                       found_cfg=cfg;
+                       break;
+               }
+       }
+       return found_cfg;
+}
+
+static void fix_contact(LinphoneCore *lc, osip_message_t *msg, const char *localip, LinphoneProxyConfig *dest_proxy){
+       osip_contact_t *ctt=NULL;
+       const char *ip=NULL;
+       int port=5060;
+
+       osip_message_get_contact(msg,0,&ctt);
+       if (ctt!=NULL){
+               if (dest_proxy!=NULL){
+                       /* if we know the request will go to a known proxy for which we are registered,
+                       we can use the same contact address as in the register */
+                       linphone_proxy_config_get_contact(dest_proxy,&ip,&port);
+               }else{
+                       ip=localip;
+                       port=linphone_core_get_sip_port(lc);
+               }
+               if (ip!=NULL){
+                       osip_free(ctt->url->host);
+                       ctt->url->host=osip_strdup(ip);
+               }
+               if (port!=0){
+                       char tmp[10]={0};
+                       char *str;
+                       snprintf(tmp,sizeof(tmp)-1,"%i",port);
+                       if (ctt->url->port!=NULL)
+                               osip_free(ctt->url->port);
+                       ctt->url->port=osip_strdup(tmp);
+                       osip_contact_to_str(ctt,&str);
+                       ms_message("Contact has been fixed to %s",str);
+                       osip_free(str);
+               }
+       }
+}
+
+/**
+ * Initiates an outgoing call
+ *
+ * @ingroup call_control
+ * @param lc the LinphoneCore object
+ * @param url the destination of the call (sip address).
+**/
+int linphone_core_invite(LinphoneCore *lc, const char *url)
+{
+       char *barmsg;
+       int err=0;
+       char *sdpmesg=NULL;
+       char *route=NULL;
+       const char *from=NULL;
+       osip_message_t *invite=NULL;
+       sdp_context_t *ctx=NULL;
+       LinphoneProxyConfig *proxy=NULL;
+       LinphoneAddress *parsed_url2=NULL;
+       LinphoneAddress *real_parsed_url=NULL;
+       char *real_url=NULL;
+       LinphoneProxyConfig *dest_proxy=NULL;
+
+       if (lc->call!=NULL){
+               lc->vtable.display_warning(lc,_("Sorry, having multiple simultaneous calls is not supported yet !"));
+               return -1;
+       }
+
+       linphone_core_get_default_proxy(lc,&proxy);
+       if (!linphone_core_interpret_url(lc,url,&real_parsed_url,&route)){
+               return -1;
+       }
+       real_url=linphone_address_as_string(real_parsed_url);
+       dest_proxy=linphone_core_lookup_known_proxy(lc,real_parsed_url);
+
+       if (proxy!=dest_proxy && dest_proxy!=NULL) {
+               ms_message("Overriding default proxy setting for this call:");
+               ms_message("The used identity will be %s",linphone_proxy_config_get_identity(dest_proxy));
+       }
+
+       if (dest_proxy!=NULL)
+               from=linphone_proxy_config_get_identity(dest_proxy);
+       else if (proxy!=NULL)
+               from=linphone_proxy_config_get_identity(proxy);
+
+       /* if no proxy or no identity defined for this proxy, default to primary contact*/
+       if (from==NULL) from=linphone_core_get_primary_contact(lc);
+
+       err=eXosip_call_build_initial_invite(&invite,real_url,from,
+                                               route,"Phone call");
+       if (err<0){
+               ms_warning("Could not build initial invite");
+               goto end;
+       }
+       if (lp_config_get_int(lc->config,"sip","use_session_timers",0)==1){
+               osip_message_set_header(invite, "Session-expires", "200");
+               osip_message_set_supported(invite, "timer");
+       }
+       /* make sdp message */
+
+       parsed_url2=linphone_address_new(from);
+
+       lc->call=linphone_call_new_outgoing(lc,parsed_url2,real_parsed_url);
+       /*try to be best-effort in giving real local or routable contact address,
+       except when the user choosed to override the ipaddress */
+       if (linphone_core_get_firewall_policy(lc)!=LINPHONE_POLICY_USE_NAT_ADDRESS)
+               fix_contact(lc,invite,lc->call->localip,dest_proxy);
+
+       barmsg=ortp_strdup_printf("%s %s", _("Contacting"), real_url);
+       lc->vtable.display_status(lc,barmsg);
+       ms_free(barmsg);
+       if (!lc->sip_conf.sdp_200_ack){
+               ctx=lc->call->sdpctx;
+               sdpmesg=sdp_context_get_offer(ctx);
+               linphone_set_sdp(invite,sdpmesg);
+               linphone_core_init_media_streams(lc);
+       }
+       eXosip_lock();
+       err=eXosip_call_send_initial_invite(invite);
+       lc->call->cid=err;
+       eXosip_unlock();
+       
+       if (err<0){
+               ms_warning("Could not initiate call.");
+               lc->vtable.display_status(lc,_("could not call"));
+               linphone_call_destroy(lc->call);
+               lc->call=NULL;
+               linphone_core_stop_media_streams(lc);
+       }else gstate_new_state(lc, GSTATE_CALL_OUT_INVITE, url);
+
+       goto end;
+       end:
+               if (real_url!=NULL) ms_free(real_url);
+               if (route!=NULL) ms_free(route);
+       return (err<0) ? -1 : 0;
+}
+
+int linphone_core_refer(LinphoneCore *lc, const char *url)
+{
+       char *real_url=NULL;
+       LinphoneAddress *real_parsed_url=NULL;
+       LinphoneCall *call;
+       osip_message_t *msg=NULL;
+       char *route;
+       if (!linphone_core_interpret_url(lc,url,&real_parsed_url, &route)){
+               /* bad url */
+               return -1;
+       }
+       if (route!=NULL) ms_free(route);
+       call=lc->call;
+       if (call==NULL){
+               ms_warning("No established call to refer.");
+               return -1;
+       }
+       lc->call=NULL;
+       real_url=linphone_address_as_string (real_parsed_url);
+       eXosip_call_build_refer(call->did, real_url, &msg);
+       ms_free(real_url);
+       eXosip_lock();
+       eXosip_call_send_request(call->did, msg);
+       eXosip_unlock();
+       return 0;
+}
+
+/**
+ * Returns true if in incoming call is pending, ie waiting for being answered or declined.
+ *
+ * @ingroup call_control
+**/
+bool_t linphone_core_inc_invite_pending(LinphoneCore*lc){
+       if (lc->call!=NULL && lc->call->dir==LinphoneCallIncoming){
+               return TRUE;
+       }
+       return FALSE;
+}
+
+#ifdef VINCENT_MAURY_RSVP
+/* on=1 for RPC_ENABLE=1...*/
+int linphone_core_set_rpc_mode(LinphoneCore *lc, int on)
+{
+       if (on==1)
+               printf("RPC_ENABLE set on\n");
+       else
+               printf("RPC_ENABLE set off\n");
+       lc->rpc_enable = (on==1);
+       /* need to tell eXosip the new setting */
+       if (eXosip_set_rpc_mode (lc->rpc_enable)!=0)
+               return -1;
+       return 0;
+}
+
+/* on=1 for RSVP_ENABLE=1...*/
+int linphone_core_set_rsvp_mode(LinphoneCore *lc, int on)
+{
+       if (on==1)
+               printf("RSVP_ENABLE set on\n");
+       else
+               printf("RSVP_ENABLE set off\n");
+       lc->rsvp_enable = (on==1);
+       /* need to tell eXosip the new setting */
+       if (eXosip_set_rsvp_mode (lc->rsvp_enable)!=0)
+               return -1;
+       return 0;
+}
+
+/* answer : 1 for yes, 0 for no */
+int linphone_core_change_qos(LinphoneCore *lc, int answer)
+{
+       char *sdpmesg;
+       if (lc->call==NULL){
+               return -1;
+       }
+
+       if (lc->rsvp_enable && answer==1)
+       {
+               /* answer is yes, local setting is with qos, so
+                * the user chose to continue with no qos ! */
+               /* so switch in normal mode : ring and 180 */
+               lc->rsvp_enable = 0; /* no more rsvp */
+               eXosip_set_rsvp_mode (lc->rsvp_enable);
+               /* send 180 */
+               eXosip_lock();
+               eXosip_answer_call(lc->call->did,180,NULL);
+               eXosip_unlock();
+               /* play the ring */
+               ms_message("Starting local ring...");
+               lc->ringstream=ring_start(lc->sound_conf.local_ring,
+                                       2000,ms_snd_card_manager_get_card(ms_snd_card_manager_get(),lc->sound_conf.ring_sndcard));
+       }
+       else if (!lc->rsvp_enable && answer==1)
+       {
+               /* switch to QoS mode on : answer 183 session progress */
+               lc->rsvp_enable = 1;
+               eXosip_set_rsvp_mode (lc->rsvp_enable);
+               /* take the sdp already computed, see osipuacb.c */
+               sdpmesg=lc->call->sdpctx->answerstr;
+               eXosip_lock();
+               eXosip_answer_call_with_body(lc->call->did,183,"application/sdp",sdpmesg);
+               eXosip_unlock();
+       }
+       else
+       {
+               /* decline offer (603) */
+               linphone_core_terminate_call(lc, NULL);
+       }
+       return 0;
+}
+#endif
+
+void linphone_core_init_media_streams(LinphoneCore *lc){
+       lc->audiostream=audio_stream_new(linphone_core_get_audio_port(lc),linphone_core_ipv6_enabled(lc));
+       if (linphone_core_echo_limiter_enabled(lc)){
+               const char *type=lp_config_get_string(lc->config,"sound","el_type","mic");
+               if (strcasecmp(type,"mic")==0)
+                       audio_stream_enable_echo_limiter(lc->audiostream,ELControlMic);
+               else if (strcasecmp(type,"speaker")==0)
+                       audio_stream_enable_echo_limiter(lc->audiostream,ELControlSpeaker);
+       }
+       audio_stream_enable_gain_control(lc->audiostream,TRUE);
+       if (linphone_core_echo_cancellation_enabled(lc)){
+               int len,delay,framesize;
+               len=lp_config_get_int(lc->config,"sound","ec_tail_len",0);
+               delay=lp_config_get_int(lc->config,"sound","ec_delay",0);
+               framesize=lp_config_get_int(lc->config,"sound","ec_framesize",0);
+               audio_stream_set_echo_canceller_params(lc->audiostream,len,delay,framesize);
+       }
+       audio_stream_enable_automatic_gain_control(lc->audiostream,linphone_core_agc_enabled(lc));
+       {
+               int enabled=lp_config_get_int(lc->config,"sound","noisegate",0);
+               audio_stream_enable_noise_gate(lc->audiostream,enabled);
+       }
+       if (lc->a_rtp)
+               rtp_session_set_transports(lc->audiostream->session,lc->a_rtp,lc->a_rtcp);
+
+#ifdef VIDEO_ENABLED
+       if (lc->video_conf.display || lc->video_conf.capture)
+               lc->videostream=video_stream_new(linphone_core_get_video_port(lc),linphone_core_ipv6_enabled(lc));
+#else
+       lc->videostream=NULL;
+#endif
+}
+
+static void linphone_core_dtmf_received(RtpSession* s, int dtmf, void* user_data){
+       LinphoneCore* lc = (LinphoneCore*)user_data;
+       if (lc->vtable.dtmf_received != NULL)
+               lc->vtable.dtmf_received(lc, dtmf);
+}
+
+static void parametrize_equalizer(LinphoneCore *lc, AudioStream *st){
+       if (st->equalizer){
+               MSFilter *f=st->equalizer;
+               int enabled=lp_config_get_int(lc->config,"sound","eq_active",0);
+               const char *gains=lp_config_get_string(lc->config,"sound","eq_gains",NULL);
+               ms_filter_call_method(f,MS_EQUALIZER_SET_ACTIVE,&enabled);
+               if (enabled){
+                       if (gains){
+                               do{
+                                       int bytes;
+                                       MSEqualizerGain g;
+                                       if (sscanf(gains,"%f:%f:%f %n",&g.frequency,&g.gain,&g.width,&bytes)==3){
+                                               ms_message("Read equalizer gains: %f(~%f) --> %f",g.frequency,g.width,g.gain);
+                                               ms_filter_call_method(f,MS_EQUALIZER_SET_GAIN,&g);
+                                               gains+=bytes;
+                                       }else break;
+                               }while(1);
+                       }
+               }
+       }
+}
+
+static void post_configure_audio_streams(LinphoneCore *lc){
+       AudioStream *st=lc->audiostream;
+       float gain=lp_config_get_float(lc->config,"sound","mic_gain",-1);
+       if (gain!=-1)
+               audio_stream_set_mic_gain(st,gain);
+       if (linphone_core_echo_limiter_enabled(lc)){
+               float speed=lp_config_get_float(lc->config,"sound","el_speed",-1);
+               float thres=lp_config_get_float(lc->config,"sound","el_thres",-1);
+               float force=lp_config_get_float(lc->config,"sound","el_force",-1);
+               int sustain=lp_config_get_int(lc->config,"sound","el_sustain",-1);
+               MSFilter *f=NULL;
+               if (st->el_type==ELControlMic){
+                       f=st->volsend;
+                       if (speed==-1) speed=0.03;
+                       if (force==-1) force=10;
+               }
+               else if (st->el_type==ELControlSpeaker){
+                       f=st->volrecv;
+                       if (speed==-1) speed=0.02;
+                       if (force==-1) force=5;
+               }
+               if (speed!=-1)
+                       ms_filter_call_method(f,MS_VOLUME_SET_EA_SPEED,&speed);
+               if (thres!=-1)
+                       ms_filter_call_method(f,MS_VOLUME_SET_EA_THRESHOLD,&thres);
+               if (force!=-1)
+                       ms_filter_call_method(f,MS_VOLUME_SET_EA_FORCE,&force);
+               if (sustain!=-1)
+                       ms_filter_call_method(f,MS_VOLUME_SET_EA_SUSTAIN,&sustain);
+
+       }
+       if (st->volsend){
+               float ng_thres=lp_config_get_float(lc->config,"sound","ng_thres",0.05);
+               float ng_floorgain=lp_config_get_float(lc->config,"sound","ng_floorgain",0);
+               ms_filter_call_method(st->volsend,MS_VOLUME_SET_NOISE_GATE_THRESHOLD,&ng_thres);
+               ms_filter_call_method(st->volsend,MS_VOLUME_SET_NOISE_GATE_FLOORGAIN,&ng_floorgain);
+       }
+       parametrize_equalizer(lc,st);
+       if (lc->vtable.dtmf_received!=NULL){
+               /* replace by our default action*/
+               audio_stream_play_received_dtmfs(lc->audiostream,FALSE);
+               rtp_session_signal_connect(lc->audiostream->session,"telephone-event",(RtpCallback)linphone_core_dtmf_received,(unsigned long)lc);
+       }
+}
+
+void linphone_core_start_media_streams(LinphoneCore *lc, LinphoneCall *call){
+       LinphoneAddress *me=linphone_core_get_primary_contact_parsed(lc);
+       const char *tool="linphone-" LINPHONE_VERSION;
+       char *cname;
+       /* adjust rtp jitter compensation. It must be at least the latency of the sound card */
+       int jitt_comp=MAX(lc->sound_conf.latency,lc->rtp_conf.audio_jitt_comp);
+
+       if (call->media_start_time==0) call->media_start_time=time(NULL);
+
+       cname=ortp_strdup_printf("%s@%s",me->url->username,me->url->host);
+       {
+               StreamParams *audio_params=&call->audio_params;
+               if (!lc->use_files){
+                       MSSndCard *playcard=lc->sound_conf.play_sndcard;
+                       MSSndCard *captcard=lc->sound_conf.capt_sndcard;
+                       if (playcard==NULL) {
+                               ms_warning("No card defined for playback !");
+                               goto end;
+                       }
+                       if (captcard==NULL) {
+                               ms_warning("No card defined for capture !");
+                               goto end;
+                       }
+                       if (audio_params->relay_session_id!=NULL)
+                               audio_stream_set_relay_session_id(lc->audiostream,audio_params->relay_session_id);
+                       audio_stream_start_now(
+                               lc->audiostream,
+                               call->profile,
+                               audio_params->remoteaddr,
+                               audio_params->remoteport,
+                               audio_params->remotertcpport,
+                               audio_params->pt,
+                               jitt_comp,
+                               playcard,
+                               captcard,
+                               linphone_core_echo_cancellation_enabled(lc));
+               }else{
+                       audio_stream_start_with_files(
+                               lc->audiostream,
+                               call->profile,
+                               audio_params->remoteaddr,
+                               audio_params->remoteport,
+                               audio_params->remotertcpport,
+                               audio_params->pt,
+                               100,
+                               lc->play_file,
+                               lc->rec_file);
+               }
+               post_configure_audio_streams(lc);
+               audio_stream_set_rtcp_information(lc->audiostream, cname, tool);
+       }
+#ifdef VIDEO_ENABLED
+       {
+               /* shutdown preview */
+               if (lc->previewstream!=NULL) {
+                       video_preview_stop(lc->previewstream);
+                       lc->previewstream=NULL;
+               }
+               if (lc->video_conf.display || lc->video_conf.capture) {
+                       StreamParams *video_params=&call->video_params;
+
+                       if (video_params->remoteport>0){
+                               if (video_params->relay_session_id!=NULL)
+                                       video_stream_set_relay_session_id(lc->videostream,video_params->relay_session_id);
+                               video_stream_set_sent_video_size(lc->videostream,linphone_core_get_preferred_video_size(lc));
+                               video_stream_enable_self_view(lc->videostream,lc->video_conf.selfview);
+                               if (lc->video_conf.display && lc->video_conf.capture)
+                                       video_stream_start(lc->videostream,
+                                       call->profile, video_params->remoteaddr, video_params->remoteport,
+                                       video_params->remotertcpport,
+                                       video_params->pt, jitt_comp, lc->video_conf.device);
+                               else if (lc->video_conf.display)
+                                       video_stream_recv_only_start(lc->videostream,
+                                       call->profile, video_params->remoteaddr, video_params->remoteport,
+                                       video_params->pt, jitt_comp);
+                               else if (lc->video_conf.capture)
+                                       video_stream_send_only_start(lc->videostream,
+                                       call->profile, video_params->remoteaddr, video_params->remoteport,
+                                       video_params->remotertcpport,
+                                       video_params->pt, jitt_comp, lc->video_conf.device);
+                               video_stream_set_rtcp_information(lc->videostream, cname,tool);
+                       }
+               }
+       }
+#endif
+       goto end;
+       end:
+       ms_free(cname);
+       linphone_address_destroy(me);
+       lc->call->state=LCStateAVRunning;
+}
+
+void linphone_core_stop_media_streams(LinphoneCore *lc){
+       if (lc->audiostream!=NULL) {
+               audio_stream_stop(lc->audiostream);
+               lc->audiostream=NULL;
+       }
+#ifdef VIDEO_ENABLED
+       if (lc->videostream!=NULL){
+               if (lc->video_conf.display && lc->video_conf.capture)
+                       video_stream_stop(lc->videostream);
+               else if (lc->video_conf.display)
+                       video_stream_recv_only_stop(lc->videostream);
+               else if (lc->video_conf.capture)
+                       video_stream_send_only_stop(lc->videostream);
+               lc->videostream=NULL;
+       }
+       if (linphone_core_video_preview_enabled(lc)){
+               if (lc->previewstream==NULL){
+                       lc->previewstream=video_preview_start(lc->video_conf.device, lc->video_conf.vsize);
+               }
+       }
+#endif
+}
+
+/**
+ * Accept an incoming call.
+ *
+ * @ingroup call_control
+ * Basically the application is notified of incoming calls within the
+ * invite_recv callback of the #LinphoneCoreVTable structure.
+ * The application can later respond positively to the call using
+ * this method.
+ * @param lc the LinphoneCore object
+ * @param url the SIP address of the originator of the call, or NULL.
+ *            This argument is useful for managing multiple calls simulatenously,
+ *            however this feature is not supported yet.
+ *            Using NULL will accept the unique incoming call in progress.
+**/
+int linphone_core_accept_call(LinphoneCore *lc, const char *url)
+{
+       char *sdpmesg;
+       osip_message_t *msg=NULL;
+       LinphoneCall *call=lc->call;
+       int err;
+       bool_t offering=FALSE;
+
+       if (call==NULL){
+               return -1;
+       }
+
+       if (lc->call->state==LCStateAVRunning){
+               /*call already accepted*/
+               return -1;
+       }
+
+       /*stop ringing */
+       if (lc->ringstream!=NULL) {
+               ms_message("stop ringing");
+               ring_stop(lc->ringstream);
+               ms_message("ring stopped");
+               lc->ringstream=NULL;
+       }
+       /* sends a 200 OK */
+       err=eXosip_call_build_answer(call->tid,200,&msg);
+       if (err<0 || msg==NULL){
+               ms_error("Fail to build answer for call: err=%i",err);
+               return -1;
+       }
+       if (lp_config_get_int(lc->config,"sip","use_session_timers",0)==1){
+               if (call->supports_session_timers) osip_message_set_supported(msg, "timer");
+       }
+       /*try to be best-effort in giving real local or routable contact address,
+       except when the user choosed to override the ipaddress */
+       if (linphone_core_get_firewall_policy(lc)!=LINPHONE_POLICY_USE_NAT_ADDRESS)
+               fix_contact(lc,msg,call->localip,NULL);
+       /*if a sdp answer is computed, send it, else send an offer */
+       sdpmesg=call->sdpctx->answerstr;
+       if (sdpmesg==NULL){
+               offering=TRUE;
+               ms_message("generating sdp offer");
+               sdpmesg=sdp_context_get_offer(call->sdpctx);
+
+               if (sdpmesg==NULL){
+                       ms_error("fail to generate sdp offer !");
+                       return -1;
+               }
+               linphone_set_sdp(msg,sdpmesg);
+               linphone_core_init_media_streams(lc);
+       }else{
+               linphone_set_sdp(msg,sdpmesg);
+       }
+       eXosip_lock();
+       eXosip_call_send_answer(call->tid,200,msg);
+       eXosip_unlock();
+       lc->vtable.display_status(lc,_("Connected."));
+       gstate_new_state(lc, GSTATE_CALL_IN_CONNECTED, NULL);
+
+       if (!offering) linphone_core_start_media_streams(lc, lc->call);
+       ms_message("call answered.");
+       return 0;
+}
+
+/**
+ * Terminates a call.
+ *
+ * @ingroup call_control
+ * @param lc The LinphoneCore
+ * @param url the destination of the call to be terminated, use NULL if there is
+ *            only one call (which is case in this version of liblinphone).
+**/
+int linphone_core_terminate_call(LinphoneCore *lc, const char *url)
+{
+       LinphoneCall *call=lc->call;
+       if (call==NULL){
+               return -1;
+       }
+       lc->call=NULL;
+
+       eXosip_lock();
+       eXosip_call_terminate(call->cid,call->did);
+       eXosip_unlock();
+
+       /*stop ringing*/
+       if (lc->ringstream!=NULL) {
+               ring_stop(lc->ringstream);
+               lc->ringstream=NULL;
+       }
+       linphone_core_stop_media_streams(lc);
+       lc->vtable.display_status(lc,_("Call ended") );
+       gstate_new_state(lc, GSTATE_CALL_END, NULL);
+       linphone_call_destroy(call);
+       return 0;
+}
+
+/**
+ * Returns TRUE if there is a call running or pending.
+ *
+ * @ingroup call_control
+**/
+bool_t linphone_core_in_call(const LinphoneCore *lc){
+       return lc->call!=NULL;
+}
+
+int linphone_core_send_publish(LinphoneCore *lc,
+                              LinphoneOnlineStatus presence_mode)
+{
+       const MSList *elem;
+       for (elem=linphone_core_get_proxy_config_list(lc);elem!=NULL;elem=ms_list_next(elem)){
+               LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
+               if (cfg->publish) linphone_proxy_config_send_publish(cfg,presence_mode);
+       }
+       return 0;
+}
+
+/**
+ * Set the incoming call timeout in seconds.
+ *
+ * @ingroup call_control
+ * If an incoming call isn't answered for this timeout period, it is 
+ * automatically declined.
+**/
+void linphone_core_set_inc_timeout(LinphoneCore *lc, int seconds){
+       lc->sip_conf.inc_timeout=seconds;
+}
+
+/**
+ * Returns the incoming call timeout
+ *
+ * @ingroup call_control
+ * See linphone_core_set_inc_timeout() for details.
+**/
+int linphone_core_get_inc_timeout(LinphoneCore *lc){
+       return lc->sip_conf.inc_timeout;
+}
+
+void linphone_core_set_presence_info(LinphoneCore *lc,int minutes_away,
+                                                                                                       const char *contact,
+                                                                                                       LinphoneOnlineStatus presence_mode)
+{
+       int contactok=-1;
+       if (minutes_away>0) lc->minutes_away=minutes_away;
+       if (contact!=NULL) {
+               osip_from_t *url;
+               osip_from_init(&url);
+               contactok=osip_from_parse(url,contact);
+               if (contactok>=0) {
+                       ms_message("contact url is correct.");
+               }
+               osip_from_free(url);
+
+       }
+       if (contactok>=0){
+               if (lc->alt_contact!=NULL) ms_free(lc->alt_contact);
+               lc->alt_contact=ms_strdup(contact);
+       }
+       if (lc->presence_mode!=presence_mode){
+               linphone_core_notify_all_friends(lc,presence_mode);
+               /*
+                  Improve the use of all LINPHONE_STATUS available.
+                  !TODO Do not mix "presence status" with "answer status code"..
+                  Use correct parameter to follow sip_if_match/sip_etag.
+                */
+               linphone_core_send_publish(lc,presence_mode);
+       }
+       lc->prev_mode=lc->presence_mode;
+       lc->presence_mode=presence_mode;
+
+}
+
+LinphoneOnlineStatus linphone_core_get_presence_info(const LinphoneCore *lc){
+       return lc->presence_mode;
+}
+
+/**
+ * Get playback sound level in 0-100 scale.
+ *
+ * @ingroup media_parameters
+**/
+int linphone_core_get_play_level(LinphoneCore *lc)
+{
+       return lc->sound_conf.play_lev;
+}
+
+/**
+ * Get ring sound level in 0-100 scale
+ *
+ * @ingroup media_parameters
+**/
+int linphone_core_get_ring_level(LinphoneCore *lc)
+{
+       return lc->sound_conf.ring_lev;
+}
+
+/**
+ * Get sound capture level in 0-100 scale
+ *
+ * @ingroup media_parameters
+**/
+int linphone_core_get_rec_level(LinphoneCore *lc){
+       return lc->sound_conf.rec_lev;
+}
+
+/**
+ * Set sound ring level in 0-100 scale
+ *
+ * @ingroup media_parameters
+**/
+void linphone_core_set_ring_level(LinphoneCore *lc, int level){
+       MSSndCard *sndcard;
+       lc->sound_conf.ring_lev=level;
+       sndcard=lc->sound_conf.ring_sndcard;
+       if (sndcard) ms_snd_card_set_level(sndcard,MS_SND_CARD_PLAYBACK,level);
+}
+
+/**
+ * Set sound playback level in 0-100 scale
+ *
+ * @ingroup media_parameters
+**/
+void linphone_core_set_play_level(LinphoneCore *lc, int level){
+       MSSndCard *sndcard;
+       lc->sound_conf.play_lev=level;
+       sndcard=lc->sound_conf.play_sndcard;
+       if (sndcard) ms_snd_card_set_level(sndcard,MS_SND_CARD_PLAYBACK,level);
+}
+
+/**
+ * Set sound capture level in 0-100 scale
+ *
+ * @ingroup media_parameters
+**/
+void linphone_core_set_rec_level(LinphoneCore *lc, int level)
+{
+       MSSndCard *sndcard;
+       lc->sound_conf.rec_lev=level;
+       sndcard=lc->sound_conf.capt_sndcard;
+       if (sndcard) ms_snd_card_set_level(sndcard,MS_SND_CARD_CAPTURE,level);
+}
+
+static MSSndCard *get_card_from_string_id(const char *devid, unsigned int cap){
+       MSSndCard *sndcard=NULL;
+       if (devid!=NULL){
+               sndcard=ms_snd_card_manager_get_card(ms_snd_card_manager_get(),devid);
+               if (sndcard!=NULL &&
+                       (ms_snd_card_get_capabilities(sndcard) & cap)==0 ){
+                       ms_warning("%s card does not have the %s capability, ignoring.",
+                               devid,
+                               cap==MS_SND_CARD_CAP_CAPTURE ? "capture" : "playback");
+                       sndcard=NULL;
+               }
+       }
+       if (sndcard==NULL) {
+               /* get a card that has read+write capabilities */
+               sndcard=ms_snd_card_manager_get_default_card(ms_snd_card_manager_get());
+               /* otherwise refine to the first card having the right capability*/
+               if (sndcard==NULL){
+                       const MSList *elem=ms_snd_card_manager_get_list(ms_snd_card_manager_get());
+                       for(;elem!=NULL;elem=elem->next){
+                               sndcard=(MSSndCard*)elem->data;
+                               if (ms_snd_card_get_capabilities(sndcard) & cap) break;
+                       }
+               }
+               if (sndcard==NULL){/*looks like a bug! take the first one !*/
+                       const MSList *elem=ms_snd_card_manager_get_list(ms_snd_card_manager_get());
+                       sndcard=(MSSndCard*)elem->data;
+               }
+       }
+       if (sndcard==NULL) ms_error("Could not find a suitable soundcard !");
+       return sndcard;
+}
+
+/**
+ * Returns true if the specified sound device can capture sound.
+ *
+ * @ingroup media_parameters
+ * @param devid the device name as returned by linphone_core_get_sound_devices()
+**/
+bool_t linphone_core_sound_device_can_capture(LinphoneCore *lc, const char *devid){
+       MSSndCard *sndcard;
+       sndcard=ms_snd_card_manager_get_card(ms_snd_card_manager_get(),devid);
+       if (sndcard!=NULL && (ms_snd_card_get_capabilities(sndcard) & MS_SND_CARD_CAP_CAPTURE)) return TRUE;
+       return FALSE;
+}
+
+/**
+ * Returns true if the specified sound device can play sound.
+ *
+ * @ingroup media_parameters
+ * @param devid the device name as returned by linphone_core_get_sound_devices()
+**/
+bool_t linphone_core_sound_device_can_playback(LinphoneCore *lc, const char *devid){
+       MSSndCard *sndcard;
+       sndcard=ms_snd_card_manager_get_card(ms_snd_card_manager_get(),devid);
+       if (sndcard!=NULL && (ms_snd_card_get_capabilities(sndcard) & MS_SND_CARD_CAP_PLAYBACK)) return TRUE;
+       return FALSE;
+}
+
+/**
+ * Sets the sound device used for ringing.
+ *
+ * @ingroup media_parameters
+ * @param devid the device name as returned by linphone_core_get_sound_devices()
+**/
+int linphone_core_set_ringer_device(LinphoneCore *lc, const char * devid){
+       MSSndCard *card=get_card_from_string_id(devid,MS_SND_CARD_CAP_PLAYBACK);
+       lc->sound_conf.ring_sndcard=card;
+       if (card && lc->ready)
+               lp_config_set_string(lc->config,"sound","ringer_dev_id",ms_snd_card_get_string_id(card));
+       return 0;
+}
+
+/**
+ * Sets the sound device used for playback.
+ *
+ * @ingroup media_parameters
+ * @param devid the device name as returned by linphone_core_get_sound_devices()
+**/
+int linphone_core_set_playback_device(LinphoneCore *lc, const char * devid){
+       MSSndCard *card=get_card_from_string_id(devid,MS_SND_CARD_CAP_PLAYBACK);
+       lc->sound_conf.play_sndcard=card;
+       if (card && lc->ready)
+               lp_config_set_string(lc->config,"sound","playback_dev_id",ms_snd_card_get_string_id(card));
+       return 0;
+}
+
+/**
+ * Sets the sound device used for capture.
+ *
+ * @ingroup media_parameters
+ * @param devid the device name as returned by linphone_core_get_sound_devices()
+**/
+int linphone_core_set_capture_device(LinphoneCore *lc, const char * devid){
+       MSSndCard *card=get_card_from_string_id(devid,MS_SND_CARD_CAP_CAPTURE);
+       lc->sound_conf.capt_sndcard=card;
+       if (card && lc->ready)
+               lp_config_set_string(lc->config,"sound","capture_dev_id",ms_snd_card_get_string_id(card));
+       return 0;
+}
+
+/**
+ * Returns the name of the currently assigned sound device for ringing.
+ *
+ * @ingroup media_parameters
+**/
+const char * linphone_core_get_ringer_device(LinphoneCore *lc)
+{
+       if (lc->sound_conf.ring_sndcard) return ms_snd_card_get_string_id(lc->sound_conf.ring_sndcard);
+       return NULL;
+}
+
+/**
+ * Returns the name of the currently assigned sound device for playback.
+ *
+ * @ingroup media_parameters
+**/
+const char * linphone_core_get_playback_device(LinphoneCore *lc)
+{
+       return lc->sound_conf.play_sndcard ? ms_snd_card_get_string_id(lc->sound_conf.play_sndcard) : NULL;
+}
+
+/**
+ * Returns the name of the currently assigned sound device for capture.
+ *
+ * @ingroup media_parameters
+**/
+const char * linphone_core_get_capture_device(LinphoneCore *lc)
+{
+       return lc->sound_conf.capt_sndcard ? ms_snd_card_get_string_id(lc->sound_conf.capt_sndcard) : NULL;
+}
+
+/**
+ * Returns an unmodifiable array of available sound devices.
+ *
+ * @ingroup media_parameters
+ * The array is NULL terminated.
+**/
+const char**  linphone_core_get_sound_devices(LinphoneCore *lc){
+       build_sound_devices_table(lc);
+       return lc->sound_conf.cards;
+}
+
+/**
+ * Returns an unmodifiable array of available video capture devices.
+ *
+ * @ingroup media_parameters
+ * The array is NULL terminated.
+**/
+const char**  linphone_core_get_video_devices(const LinphoneCore *lc){
+       return lc->video_conf.cams;
+}
+
+char linphone_core_get_sound_source(LinphoneCore *lc)
+{
+       return lc->sound_conf.source;
+}
+
+void linphone_core_set_sound_source(LinphoneCore *lc, char source)
+{
+       MSSndCard *sndcard=lc->sound_conf.capt_sndcard;
+       lc->sound_conf.source=source;
+       if (!sndcard) return;
+       switch(source){
+               case 'm':
+                       ms_snd_card_set_capture(sndcard,MS_SND_CARD_MIC);
+                       break;
+               case 'l':
+                       ms_snd_card_set_capture(sndcard,MS_SND_CARD_LINE);
+                       break;
+       }
+
+}
+
+
+/**
+ * Sets the path to a wav file used for ringing.
+ *
+ * The file must be a wav 16bit linear.
+ *
+ * @ingroup media_parameters
+**/
+void linphone_core_set_ring(LinphoneCore *lc,const char *path){
+       if (lc->sound_conf.local_ring!=0){
+               ms_free(lc->sound_conf.local_ring);
+       }
+       lc->sound_conf.local_ring=ms_strdup(path);
+       if (lc->ready && lc->sound_conf.local_ring)
+               lp_config_set_string(lc->config,"sound","local_ring",lc->sound_conf.local_ring);
+}
+
+/**
+ * Returns the path to the wav file used for ringing.
+ *
+ * @ingroup media_parameters
+**/
+const char *linphone_core_get_ring(const LinphoneCore *lc){
+       return lc->sound_conf.local_ring;
+}
+
+static void notify_end_of_ring(void *ud ,unsigned int event, void * arg){
+       LinphoneCore *lc=(LinphoneCore*)ud;
+       lc->preview_finished=1;
+}
+
+int linphone_core_preview_ring(LinphoneCore *lc, const char *ring,LinphoneCoreCbFunc func,void * userdata)
+{
+       if (lc->ringstream!=0){
+               ms_warning("Cannot start ring now,there's already a ring being played");
+               return -1;
+       }
+       lc_callback_obj_init(&lc->preview_finished_cb,func,userdata);
+       lc->preview_finished=0;
+       if (lc->sound_conf.ring_sndcard!=NULL){
+               lc->ringstream=ring_start_with_cb(ring,2000,lc->sound_conf.ring_sndcard,notify_end_of_ring,(void *)lc);
+       }
+       return 0;
+}
+
+/**
+ * Sets the path to a wav file used for ringing back.
+ *
+ * Ringback means the ring that is heard when it's ringing at the remote party.
+ * The file must be a wav 16bit linear.
+ *
+ * @ingroup media_parameters
+**/
+void linphone_core_set_ringback(LinphoneCore *lc, const char *path){
+       if (lc->sound_conf.remote_ring!=0){
+               ms_free(lc->sound_conf.remote_ring);
+       }
+       lc->sound_conf.remote_ring=ms_strdup(path);
+}
+
+/**
+ * Returns the path to the wav file used for ringing back.
+ *
+ * @ingroup media_parameters
+**/
+const char * linphone_core_get_ringback(const LinphoneCore *lc){
+       return lc->sound_conf.remote_ring;
+}
+
+/**
+ * Enables or disable echo cancellation.
+ *
+ * @ingroup media_parameters
+**/
+void linphone_core_enable_echo_cancellation(LinphoneCore *lc, bool_t val){
+       lc->sound_conf.ec=val;
+       if (lc->ready)
+               lp_config_set_int(lc->config,"sound","echocancellation",val);
+}
+
+/**
+ * Returns TRUE if echo cancellation is enabled.
+ *
+ * @ingroup media_parameters
+**/
+bool_t linphone_core_echo_cancellation_enabled(LinphoneCore *lc){
+       return lc->sound_conf.ec;
+}
+
+void linphone_core_enable_echo_limiter(LinphoneCore *lc, bool_t val){
+       lc->sound_conf.ea=val;
+}
+
+bool_t linphone_core_echo_limiter_enabled(const LinphoneCore *lc){
+       return lc->sound_conf.ea;
+}
+
+/**
+ * Mutes or unmutes the local microphone.
+ *
+ * @ingroup media_parameters
+**/
+void linphone_core_mute_mic(LinphoneCore *lc, bool_t val){
+       if (lc->audiostream!=NULL){
+                audio_stream_set_mic_gain(lc->audiostream,
+                       (val==TRUE) ? 0 : 1.0);
+       }
+}
+
+void linphone_core_enable_agc(LinphoneCore *lc, bool_t val){
+       lc->sound_conf.agc=val;
+}
+
+bool_t linphone_core_agc_enabled(const LinphoneCore *lc){
+       return lc->sound_conf.agc;
+}
+
+/**
+ * Send the specified dtmf.
+ *
+ * @ingroup media_parameters
+ * This function only works during calls. The dtmf is automatically played to the user.
+ * @param lc The LinphoneCore object
+ * @param dtmf The dtmf name specified as a char, such as '0', '#' etc...
+ *
+**/
+void linphone_core_send_dtmf(LinphoneCore *lc,char dtmf)
+{
+       /*By default we send DTMF RFC2833 if we do not have enabled SIP_INFO but we can also send RFC2833 and SIP_INFO*/
+       if (linphone_core_get_use_rfc2833_for_dtmf(lc)!=0 || linphone_core_get_use_info_for_dtmf(lc)==0)
+       {
+               /* In Band DTMF */
+               if (lc->audiostream!=NULL){
+                       audio_stream_send_dtmf(lc->audiostream,dtmf);
+               }
+               else
+               {
+                       ms_error("we cannot send RFC2833 dtmf when we are not in communication");
+               }
+       }
+       if (linphone_core_get_use_info_for_dtmf(lc)!=0)
+       {
+               char dtmf_body[1000];
+               char clen[10];
+               osip_message_t *msg=NULL;
+               /* Out of Band DTMF (use INFO method) */
+               LinphoneCall *call=lc->call;
+               if (call==NULL){
+                       return;
+               }
+               eXosip_call_build_info(call->did,&msg);
+               snprintf(dtmf_body, 999, "Signal=%c\r\nDuration=250\r\n", dtmf);
+               osip_message_set_body(msg,dtmf_body,strlen(dtmf_body));
+               osip_message_set_content_type(msg,"application/dtmf-relay");
+               snprintf(clen,sizeof(clen),"%lu",(unsigned long)strlen(dtmf_body));
+               osip_message_set_content_length(msg,clen);
+
+               eXosip_lock();
+               eXosip_call_send_request(call->did,msg);
+               eXosip_unlock();
+       }
+}
+
+void linphone_core_set_stun_server(LinphoneCore *lc, const char *server){
+       if (lc->net_conf.stun_server!=NULL)
+               ms_free(lc->net_conf.stun_server);
+       if (server)
+               lc->net_conf.stun_server=ms_strdup(server);
+       else lc->net_conf.stun_server=NULL;
+       lc->apply_nat_settings=TRUE;
+}
+
+const char * linphone_core_get_stun_server(const LinphoneCore *lc){
+       return lc->net_conf.stun_server;
+}
+
+const char * linphone_core_get_relay_addr(const LinphoneCore *lc){
+       return lc->net_conf.relay;
+}
+
+int linphone_core_set_relay_addr(LinphoneCore *lc, const char *addr){
+       if (lc->net_conf.relay!=NULL){
+               ms_free(lc->net_conf.relay);
+               lc->net_conf.relay=NULL;
+       }
+       if (addr){
+               lc->net_conf.relay=ms_strdup(addr);
+       }
+       return 0;
+}
+
+static void apply_nat_settings(LinphoneCore *lc){
+       char *wmsg;
+       char *tmp=NULL;
+       int err;
+       struct addrinfo hints,*res;
+       const char *addr=lc->net_conf.nat_address;
+
+       if (lc->net_conf.firewall_policy==LINPHONE_POLICY_USE_NAT_ADDRESS){
+               if (addr==NULL || strlen(addr)==0){
+                       lc->vtable.display_warning(lc,_("No nat/firewall address supplied !"));
+                       linphone_core_set_firewall_policy(lc,LINPHONE_POLICY_NO_FIREWALL);
+               }
+               /*check the ip address given */
+               memset(&hints,0,sizeof(struct addrinfo));
+               if (lc->sip_conf.ipv6_enabled)
+                       hints.ai_family=AF_INET6;
+               else
+                       hints.ai_family=AF_INET;
+               hints.ai_socktype = SOCK_DGRAM;
+               err=getaddrinfo(addr,NULL,&hints,&res);
+               if (err!=0){
+                       wmsg=ortp_strdup_printf(_("Invalid nat address '%s' : %s"),
+                               addr, gai_strerror(err));
+                       ms_warning(wmsg); // what is this for ?
+                       lc->vtable.display_warning(lc, wmsg);
+                       ms_free(wmsg);
+                       linphone_core_set_firewall_policy(lc,LINPHONE_POLICY_NO_FIREWALL);
+                       return;
+               }
+               /*now get it as an numeric ip address */
+               tmp=ms_malloc0(50);
+               err=getnameinfo(res->ai_addr,res->ai_addrlen,tmp,50,NULL,0,NI_NUMERICHOST);
+               if (err!=0){
+                       wmsg=ortp_strdup_printf(_("Invalid nat address '%s' : %s"),
+                               addr, gai_strerror(err));
+                       ms_warning(wmsg); // what is this for ?
+                       lc->vtable.display_warning(lc, wmsg);
+                       ms_free(wmsg);
+                       ms_free(tmp);
+                       freeaddrinfo(res);
+                       linphone_core_set_firewall_policy(lc,LINPHONE_POLICY_NO_FIREWALL);
+                       return;
+               }
+               freeaddrinfo(res);
+       }
+
+       if (lc->net_conf.firewall_policy==LINPHONE_POLICY_USE_NAT_ADDRESS){
+               if (tmp!=NULL){
+                       if (!lc->net_conf.nat_sdp_only){
+                               eXosip_set_option(EXOSIP_OPT_SET_IPV4_FOR_GATEWAY,tmp);
+                               /* the following does not work in all cases */
+                               /*
+                               eXosip_masquerade_contact(tmp,lc->sip_conf.sip_port);
+                               */
+                       }
+                       ms_free(tmp);
+               }
+               else{
+                       eXosip_set_option(EXOSIP_OPT_SET_IPV4_FOR_GATEWAY,NULL);
+                       eXosip_masquerade_contact("",0);
+               }
+       }
+       else {
+               eXosip_set_option(EXOSIP_OPT_SET_IPV4_FOR_GATEWAY,NULL);
+               eXosip_masquerade_contact("",0);
+       }
+}
+
+
+void linphone_core_set_nat_address(LinphoneCore *lc, const char *addr)
+{
+       if (lc->net_conf.nat_address!=NULL){
+               ms_free(lc->net_conf.nat_address);
+       }
+       if (addr!=NULL) lc->net_conf.nat_address=ms_strdup(addr);
+       else lc->net_conf.nat_address=NULL;
+       lc->apply_nat_settings=TRUE;
+}
+
+const char *linphone_core_get_nat_address(const LinphoneCore *lc)
+{
+       return lc->net_conf.nat_address;
+}
+
+void linphone_core_set_firewall_policy(LinphoneCore *lc, LinphoneFirewallPolicy pol){
+       lc->net_conf.firewall_policy=pol;
+       lc->apply_nat_settings=TRUE;
+}
+
+LinphoneFirewallPolicy linphone_core_get_firewall_policy(const LinphoneCore *lc){
+       return lc->net_conf.firewall_policy;
+}
+
+/**
+ * Get the list of call logs (past calls).
+ *
+ * @ingroup call_logs
+**/
+const MSList * linphone_core_get_call_logs(LinphoneCore *lc){
+       lc->missed_calls=0;
+       return lc->call_logs;
+}
+
+/**
+ * Erase the call log.
+ *
+ * @ingroup call_logs
+**/
+void linphone_core_clear_call_logs(LinphoneCore *lc){
+       lc->missed_calls=0;
+       ms_list_for_each(lc->call_logs,(void (*)(void*))linphone_call_log_destroy);
+       lc->call_logs=ms_list_free(lc->call_logs);
+       call_logs_write_to_config_file(lc);
+}
+
+static void toggle_video_preview(LinphoneCore *lc, bool_t val){
+#ifdef VIDEO_ENABLED
+       if (lc->videostream==NULL){
+               if (val){
+                       if (lc->previewstream==NULL){
+                               lc->previewstream=video_preview_start(lc->video_conf.device,
+                                                       lc->video_conf.vsize);
+                       }
+               }else{
+                       if (lc->previewstream!=NULL){
+                               video_preview_stop(lc->previewstream);
+                               lc->previewstream=NULL;
+                       }
+               }
+       }
+#endif
+}
+
+/**
+ * Enables video globally.
+ *
+ * @ingroup media_parameters
+ * This function does not have any effect during calls. It just indicates LinphoneCore to
+ * initiate future calls with video or not. The two boolean parameters indicate in which
+ * direction video is enabled. Setting both to false disables video entirely.
+ *
+ * @param vcap_enabled indicates whether video capture is enabled
+ * @param display_enabled indicates whether video display should be shown
+ *
+**/
+void linphone_core_enable_video(LinphoneCore *lc, bool_t vcap_enabled, bool_t display_enabled){
+#ifndef VIDEO_ENABLED
+       if (vcap_enabled || display_enabled)
+               ms_warning("This version of linphone was built without video support.");
+#endif
+       lc->video_conf.capture=vcap_enabled;
+       lc->video_conf.display=display_enabled;
+
+       if (lc->ready){
+               lp_config_set_int(lc->config,"video","display",display_enabled);
+               lp_config_set_int(lc->config,"video","capture",vcap_enabled);
+       }
+
+       /* need to re-apply network bandwidth settings*/
+       linphone_core_set_download_bandwidth(lc,
+               linphone_core_get_download_bandwidth(lc));
+       linphone_core_set_upload_bandwidth(lc,
+               linphone_core_get_upload_bandwidth(lc));
+}
+
+/**
+ * Returns TRUE if video is enabled, FALSE otherwise.
+ * @ingroup media_parameters
+**/
+bool_t linphone_core_video_enabled(LinphoneCore *lc){
+       return (lc->video_conf.display || lc->video_conf.capture);
+}
+
+/**
+ * Controls video preview enablement.
+ *
+ * @ingroup media_parameters
+ * Video preview refers to the action of displaying the local webcam image
+ * to the user while not in call.
+**/
+void linphone_core_enable_video_preview(LinphoneCore *lc, bool_t val){
+       lc->video_conf.show_local=val;
+       if (lc->ready) lp_config_set_int(lc->config,"video","show_local",val);
+}
+
+/**
+ * Returns TRUE if video previewing is enabled.
+ * @ingroup media_parameters
+**/
+bool_t linphone_core_video_preview_enabled(const LinphoneCore *lc){
+       return lc->video_conf.show_local;
+}
+
+/**
+ * Enables or disable self view during calls.
+ *
+ * @ingroup media_parameters
+ * Self-view refers to having local webcam image inserted in corner
+ * of the video window during calls.
+ * This function works at any time, including during calls.
+**/
+void linphone_core_enable_self_view(LinphoneCore *lc, bool_t val){
+       lc->video_conf.selfview=val;
+#ifdef VIDEO_ENABLED
+       if (lc->videostream){
+               video_stream_enable_self_view(lc->videostream,val);
+       }
+#endif
+}
+
+/**
+ * Returns TRUE if self-view is enabled, FALSE otherwise.
+ *
+ * @ingroup media_parameters
+ *
+ * Refer to linphone_core_enable_self_view() for details.
+**/
+bool_t linphone_core_self_view_enabled(const LinphoneCore *lc){
+       return lc->video_conf.selfview;
+}
+
+/**
+ * Sets the active video device.
+ *
+ * @ingroup media_parameters
+ * @param id the name of the video device as returned by linphone_core_get_video_devices()
+**/
+int linphone_core_set_video_device(LinphoneCore *lc, const char *id){
+       MSWebCam *olddev=lc->video_conf.device;
+       const char *vd;
+       if (id!=NULL){
+               lc->video_conf.device=ms_web_cam_manager_get_cam(ms_web_cam_manager_get(),id);
+               if (lc->video_conf.device==NULL){
+                       ms_warning("Could not found video device %s",id);
+               }
+       }
+       if (lc->video_conf.device==NULL)
+               lc->video_conf.device=ms_web_cam_manager_get_default_cam(ms_web_cam_manager_get());
+       if (olddev!=NULL && olddev!=lc->video_conf.device){
+               toggle_video_preview(lc,FALSE);/*restart the video local preview*/
+       }
+       if (lc->ready && lc->video_conf.device){
+               vd=ms_web_cam_get_string_id(lc->video_conf.device);
+               if (vd && strstr(vd,"Static picture")!=NULL){
+                       vd=NULL;
+               }
+               lp_config_set_string(lc->config,"video","device",vd);
+       }
+       return 0;
+}
+
+/**
+ * Returns the name of the currently active video device.
+ *
+ * @ingroup media_parameters
+**/
+const char *linphone_core_get_video_device(const LinphoneCore *lc){
+       if (lc->video_conf.device) return ms_web_cam_get_string_id(lc->video_conf.device);
+       return NULL;
+}
+
+/**
+ * Returns the native window handle of the video window, casted as an unsigned long.
+ *
+ * @ingroup media_parameters
+**/
+unsigned long linphone_core_get_native_video_window_id(const LinphoneCore *lc){
+#ifdef VIDEO_ENABLED
+       if (lc->videostream)
+               return video_stream_get_native_window_id(lc->videostream);
+       if (lc->previewstream)
+               return video_stream_get_native_window_id(lc->previewstream);
+#endif
+       return 0;
+}
+
+static MSVideoSizeDef supported_resolutions[]={
+       {       {MS_VIDEO_SIZE_SVGA_W,MS_VIDEO_SIZE_SVGA_H}     ,       "svga"  },
+       {       {MS_VIDEO_SIZE_4CIF_W,MS_VIDEO_SIZE_4CIF_H}     ,       "4cif"  },
+       {       {MS_VIDEO_SIZE_VGA_W,MS_VIDEO_SIZE_VGA_H}       ,       "vga"   },
+       {       {MS_VIDEO_SIZE_CIF_W,MS_VIDEO_SIZE_CIF_H}       ,       "cif"   },
+       {       {MS_VIDEO_SIZE_QVGA_W,MS_VIDEO_SIZE_QVGA_H}     ,       "qvga"  },
+       {       {MS_VIDEO_SIZE_QCIF_W,MS_VIDEO_SIZE_QCIF_H}     ,       "qcif"  },
+       {       {0,0}                   ,       NULL    }
+};
+
+/**
+ * Returns the zero terminated table of supported video resolutions.
+ *
+ * @ingroup media_parameters
+**/
+const MSVideoSizeDef *linphone_core_get_supported_video_sizes(LinphoneCore *lc){
+       return supported_resolutions;
+}
+
+static MSVideoSize video_size_get_by_name(const char *name){
+       MSVideoSizeDef *pdef=supported_resolutions;
+       MSVideoSize null_vsize={0,0};
+       for(;pdef->name!=NULL;pdef++){
+               if (strcasecmp(name,pdef->name)==0){
+                       return pdef->vsize;
+               }
+       }
+       ms_warning("Video resolution %s is not supported in linphone.",name);
+       return null_vsize;
+}
+
+static const char *video_size_get_name(MSVideoSize vsize){
+       MSVideoSizeDef *pdef=supported_resolutions;
+       for(;pdef->name!=NULL;pdef++){
+               if (pdef->vsize.width==vsize.width && pdef->vsize.height==vsize.height){
+                       return pdef->name;
+               }
+       }
+       return NULL;
+}
+
+static bool_t video_size_supported(MSVideoSize vsize){
+       if (video_size_get_name(vsize)) return TRUE;
+       ms_warning("Video resolution %ix%i is not supported in linphone.",vsize.width,vsize.height);
+       return FALSE;
+}
+
+/**
+ * Sets the preferred video size.
+ *
+ * @ingroup media_parameters
+ * This applies only to the stream that is captured and sent to the remote party,
+ * since we accept all standart video size on the receive path.
+**/
+void linphone_core_set_preferred_video_size(LinphoneCore *lc, MSVideoSize vsize){
+       if (video_size_supported(vsize)){
+               MSVideoSize oldvsize=lc->video_conf.vsize;
+               lc->video_conf.vsize=vsize;
+               if (!ms_video_size_equal(oldvsize,vsize) && lc->previewstream!=NULL){
+                       toggle_video_preview(lc,FALSE);
+                       toggle_video_preview(lc,TRUE);
+               }
+               if (lc->ready)
+                       lp_config_set_string(lc->config,"video","size",video_size_get_name(vsize));
+       }
+}
+
+/**
+ * Sets the preferred video size by its name.
+ *
+ * @ingroup media_parameters
+ * This is identical to linphone_core_set_preferred_video_size() except
+ * that it takes the name of the video resolution as input.
+ * Video resolution names are: qcif, svga, cif, vga, 4cif, svga ...
+**/
+void linphone_core_set_preferred_video_size_by_name(LinphoneCore *lc, const char *name){
+       MSVideoSize vsize=video_size_get_by_name(name);
+       MSVideoSize default_vsize={MS_VIDEO_SIZE_CIF_W,MS_VIDEO_SIZE_CIF_H};
+       if (vsize.width!=0)     linphone_core_set_preferred_video_size(lc,vsize);
+       else linphone_core_set_preferred_video_size(lc,default_vsize);
+}
+
+/**
+ * Returns the current preferred video size for sending.
+ *
+ * @ingroup media_parameters
+**/
+MSVideoSize linphone_core_get_preferred_video_size(LinphoneCore *lc){
+       return lc->video_conf.vsize;
+}
+
+void linphone_core_use_files(LinphoneCore *lc, bool_t yesno){
+       lc->use_files=yesno;
+}
+
+void linphone_core_set_play_file(LinphoneCore *lc, const char *file){
+       if (lc->play_file!=NULL){
+               ms_free(lc->play_file);
+               lc->play_file=NULL;
+       }
+       if (file!=NULL) {
+               lc->play_file=ms_strdup(file);
+               if (lc->audiostream)
+                       audio_stream_play(lc->audiostream,file);
+       }
+}
+
+void linphone_core_set_record_file(LinphoneCore *lc, const char *file){
+       if (lc->rec_file!=NULL){
+               ms_free(lc->rec_file);
+               lc->rec_file=NULL;
+       }
+       if (file!=NULL) {
+               lc->rec_file=ms_strdup(file);
+               if (lc->audiostream)
+                       audio_stream_record(lc->audiostream,file);
+       }
+}
+
+/**
+ * Retrieves the user pointer that was given to linphone_core_new()
+ *
+ * @ingroup initializing
+**/
+void *linphone_core_get_user_data(LinphoneCore *lc){
+       return lc->data;
+}
+
+int linphone_core_get_mtu(const LinphoneCore *lc){
+       return lc->net_conf.mtu;
+}
+
+void linphone_core_set_mtu(LinphoneCore *lc, int mtu){
+       lc->net_conf.mtu=mtu;
+       if (mtu>0){
+               if (mtu<500){
+                       ms_error("MTU too small !");
+                       mtu=500;
+               }
+               ms_set_mtu(mtu);
+               ms_message("MTU is supposed to be %i, rtp payload max size will be %i",mtu, ms_get_payload_max_size());
+       }else ms_set_mtu(0);//use mediastreamer2 default value
+}
+
+void linphone_core_set_waiting_callback(LinphoneCore *lc, LinphoneWaitingCallback cb, void *user_context){
+       lc->wait_cb=cb;
+       lc->wait_ctx=user_context;
+}
+
+void linphone_core_start_waiting(LinphoneCore *lc, const char *purpose){
+       if (lc->wait_cb){
+               lc->wait_ctx=lc->wait_cb(lc,lc->wait_ctx,LinphoneWaitingStart,purpose,0);
+       }
+}
+
+void linphone_core_update_progress(LinphoneCore *lc, const char *purpose, float progress){
+       if (lc->wait_cb){
+               lc->wait_ctx=lc->wait_cb(lc,lc->wait_ctx,LinphoneWaitingProgress,purpose,progress);
+       }else{
+#ifdef WIN32
+               Sleep(50000);
+#else
+               usleep(50000);
+#endif
+       }
+}
+
+void linphone_core_stop_waiting(LinphoneCore *lc){
+       if (lc->wait_cb){
+               lc->wait_ctx=lc->wait_cb(lc,lc->wait_ctx,LinphoneWaitingFinished,NULL,0);
+       }
+}
+
+void linphone_core_set_audio_transports(LinphoneCore *lc, RtpTransport *rtp, RtpTransport *rtcp){
+       lc->a_rtp=rtp;
+       lc->a_rtcp=rtcp;
+}
+
+void net_config_uninit(LinphoneCore *lc)
+{
+       net_config_t *config=&lc->net_conf;
+       lp_config_set_int(lc->config,"net","download_bw",config->download_bw);
+       lp_config_set_int(lc->config,"net","upload_bw",config->upload_bw);
+
+       if (config->stun_server!=NULL)
+               lp_config_set_string(lc->config,"net","stun_server",config->stun_server);
+       if (config->nat_address!=NULL)
+               lp_config_set_string(lc->config,"net","nat_address",config->nat_address);
+       lp_config_set_int(lc->config,"net","firewall_policy",config->firewall_policy);
+       lp_config_set_int(lc->config,"net","mtu",config->mtu);
+       if (lc->net_conf.stun_server!=NULL)
+               ms_free(lc->net_conf.stun_server);
+}
+
+
+void sip_config_uninit(LinphoneCore *lc)
+{
+       MSList *elem;
+       int i;
+       sip_config_t *config=&lc->sip_conf;
+       lp_config_set_int(lc->config,"sip","sip_port",config->sip_port);
+       lp_config_set_int(lc->config,"sip","guess_hostname",config->guess_hostname);
+       lp_config_set_string(lc->config,"sip","contact",config->contact);
+       lp_config_set_int(lc->config,"sip","inc_timeout",config->inc_timeout);
+       lp_config_set_int(lc->config,"sip","use_info",config->use_info);
+       lp_config_set_int(lc->config,"sip","use_rfc2833",config->use_rfc2833);
+       lp_config_set_int(lc->config,"sip","use_ipv6",config->ipv6_enabled);
+       lp_config_set_int(lc->config,"sip","register_only_when_network_is_up",config->register_only_when_network_is_up);
+       for(elem=config->proxies,i=0;elem!=NULL;elem=ms_list_next(elem),i++){
+               LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)(elem->data);
+               linphone_proxy_config_write_to_config_file(lc->config,cfg,i);
+               linphone_proxy_config_edit(cfg);        /* to unregister */
+       }
+
+       if (exosip_running)
+         {
+           int i;
+           for (i=0;i<20;i++)
+             {
+               eXosip_event_t *ev;
+               while((ev=eXosip_event_wait(0,0))!=NULL){
+                 linphone_core_process_event(lc,ev);
+               }
+               eXosip_automatic_action();
+#ifndef WIN32
+               usleep(100000);
+#else
+        Sleep(100);
+#endif
+             }
+         }
+
+       linphone_proxy_config_write_to_config_file(lc->config,NULL,i);  /*mark the end */
+
+       for(elem=lc->auth_info,i=0;elem!=NULL;elem=ms_list_next(elem),i++){
+               LinphoneAuthInfo *ai=(LinphoneAuthInfo*)(elem->data);
+               linphone_auth_info_write_config(lc->config,ai,i);
+       }
+       linphone_auth_info_write_config(lc->config,NULL,i); /* mark the end */
+}
+
+void rtp_config_uninit(LinphoneCore *lc)
+{
+       rtp_config_t *config=&lc->rtp_conf;
+       lp_config_set_int(lc->config,"rtp","audio_rtp_port",config->audio_rtp_port);
+       lp_config_set_int(lc->config,"rtp","video_rtp_port",config->video_rtp_port);
+       lp_config_set_int(lc->config,"rtp","audio_jitt_comp",config->audio_jitt_comp);
+       lp_config_set_int(lc->config,"rtp","video_jitt_comp",config->audio_jitt_comp);
+       lp_config_set_int(lc->config,"rtp","nortp_timeout",config->nortp_timeout);
+}
+
+void sound_config_uninit(LinphoneCore *lc)
+{
+       sound_config_t *config=&lc->sound_conf;
+       ms_free(config->cards);
+
+       lp_config_set_string(lc->config,"sound","remote_ring",config->remote_ring);
+
+       if (config->local_ring) ms_free(config->local_ring);
+       if (config->remote_ring) ms_free(config->remote_ring);
+       ms_snd_card_manager_destroy();
+}
+
+void video_config_uninit(LinphoneCore *lc)
+{
+
+}
+
+void codecs_config_uninit(LinphoneCore *lc)
+{
+       PayloadType *pt;
+       codecs_config_t *config=&lc->codecs_conf;
+       MSList *node;
+       char key[50];
+       int index;
+       index=0;
+       for(node=config->audio_codecs;node!=NULL;node=ms_list_next(node)){
+               pt=(PayloadType*)(node->data);
+               sprintf(key,"audio_codec_%i",index);
+               lp_config_set_string(lc->config,key,"mime",pt->mime_type);
+               lp_config_set_int(lc->config,key,"rate",pt->clock_rate);
+               lp_config_set_int(lc->config,key,"enabled",payload_type_enabled(pt));
+               index++;
+       }
+       index=0;
+       for(node=config->video_codecs;node!=NULL;node=ms_list_next(node)){
+               pt=(PayloadType*)(node->data);
+               sprintf(key,"video_codec_%i",index);
+               lp_config_set_string(lc->config,key,"mime",pt->mime_type);
+               lp_config_set_int(lc->config,key,"rate",pt->clock_rate);
+               lp_config_set_int(lc->config,key,"enabled",payload_type_enabled(pt));
+               lp_config_set_string(lc->config,key,"recv_fmtp",pt->recv_fmtp);
+               index++;
+       }
+       if (lc->local_profile){
+               rtp_profile_destroy(lc->local_profile);
+               lc->local_profile=NULL;
+       }
+}
+
+void ui_config_uninit(LinphoneCore* lc)
+{
+       if (lc->friends){
+               ms_list_for_each(lc->friends,(void (*)(void *))linphone_friend_destroy);
+               ms_list_free(lc->friends);
+               lc->friends=NULL;
+       }
+}
+
+/**
+ * Returns the LpConfig object used to manage the storage (config) file.
+ *
+ * @ingroup misc
+ * The application can use the LpConfig object to insert its own private 
+ * sections and pairs of key=value in the configuration file.
+ * 
+**/
+LpConfig *linphone_core_get_config(LinphoneCore *lc){
+       return lc->config;
+}
+
+static void linphone_core_uninit(LinphoneCore *lc)
+{
+       if (lc->call){
+               int i;
+               linphone_core_terminate_call(lc,NULL);
+               for(i=0;i<10;++i){
+#ifndef WIN32
+                       usleep(50000);
+#else
+                       Sleep(50);
+#endif
+                       linphone_core_iterate(lc);
+               }
+       }
+       gstate_new_state(lc, GSTATE_POWER_SHUTDOWN, NULL);
+#ifdef VIDEO_ENABLED
+       if (lc->previewstream!=NULL){
+               video_preview_stop(lc->previewstream);
+               lc->previewstream=NULL;
+       }
+#endif
+       /* save all config */
+       net_config_uninit(lc);
+       sip_config_uninit(lc);
+       lp_config_set_int(lc->config,"sip","default_proxy",linphone_core_get_default_proxy(lc,NULL));
+       rtp_config_uninit(lc);
+       sound_config_uninit(lc);
+       video_config_uninit(lc);
+       codecs_config_uninit(lc);
+       ui_config_uninit(lc);
+       if (lp_config_needs_commit(lc->config)) lp_config_sync(lc->config);
+       lp_config_destroy(lc->config);
+       sip_setup_unregister_all();
+
+       linphone_core_free_payload_types();
+
+       ortp_exit();
+       eXosip_quit();
+       exosip_running=FALSE;
+       gstate_new_state(lc, GSTATE_POWER_OFF, NULL);
+}
+
+/**
+ * Destroys a LinphoneCore
+ *
+ * @ingroup initializing
+**/
+void linphone_core_destroy(LinphoneCore *lc){
+       linphone_core_uninit(lc);
+       ms_free(lc);
+}
+
diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h
new file mode 100644 (file)
index 0000000..94d15c2
--- /dev/null
@@ -0,0 +1,941 @@
+/*
+linphone
+Copyright (C) 2000  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+#ifndef LINPHONECORE_H
+#define LINPHONECORE_H
+
+#include "ortp/ortp.h"
+#include "ortp/payloadtype.h"
+#include "mediastreamer2/mscommon.h"
+#include "mediastreamer2/msvideo.h"
+
+#ifdef IN_LINPHONE
+#include "sipsetup.h"
+#else
+#include "linphone/sipsetup.h"
+#endif
+
+#define LINPHONE_IPADDR_SIZE 64
+#define LINPHONE_HOSTNAME_SIZE 128
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct _MSSndCard;
+struct _LinphoneCore;
+
+bool_t payload_type_enabled(struct _PayloadType *pt);
+void payload_type_set_enable(struct _PayloadType *pt,int value);
+const char *payload_type_get_description(struct _PayloadType *pt);
+int payload_type_get_bitrate(PayloadType *pt);
+const char *payload_type_get_mime(PayloadType *pt);
+int payload_type_get_rate(PayloadType *pt);
+
+
+struct _LpConfig;
+
+typedef struct sip_config
+{
+       char *contact;
+       char *guessed_contact;
+       int sip_port;
+       MSList *proxies;
+       MSList *deleted_proxies;
+       int inc_timeout;        /*timeout after an un-answered incoming call is rejected*/
+       bool_t use_info;
+       bool_t use_rfc2833;     /*force RFC2833 to be sent*/
+       bool_t guess_hostname;
+       bool_t loopback_only;
+       bool_t ipv6_enabled;
+       bool_t sdp_200_ack;
+       bool_t only_one_codec; /*in SDP answers*/
+       bool_t register_only_when_network_is_up;
+} sip_config_t;
+
+typedef struct rtp_config
+{
+       int audio_rtp_port;
+       int video_rtp_port;
+       int audio_jitt_comp;  /*jitter compensation*/
+       int video_jitt_comp;  /*jitter compensation*/
+       int nortp_timeout;
+}rtp_config_t;
+
+
+
+typedef struct net_config
+{
+       char *nat_address;
+       char *stun_server;
+       char *relay;
+       int download_bw;
+       int upload_bw;
+       int firewall_policy;
+       int mtu;
+       bool_t nat_sdp_only;
+}net_config_t;
+
+
+typedef struct sound_config
+{
+       struct _MSSndCard * ring_sndcard;       /* the playback sndcard currently used */
+       struct _MSSndCard * play_sndcard;       /* the playback sndcard currently used */
+       struct _MSSndCard * capt_sndcard; /* the capture sndcard currently used */
+       const char **cards;
+       int latency;    /* latency in samples of the current used sound device */
+       char rec_lev;
+       char play_lev;
+       char ring_lev;
+       char source;
+       char *local_ring;
+       char *remote_ring;
+       bool_t ec;
+       bool_t ea;
+       bool_t agc;
+} sound_config_t;
+
+typedef struct codecs_config
+{
+       MSList *audio_codecs;  /* list of audio codecs in order of preference*/
+       MSList *video_codecs;   /* for later use*/
+}codecs_config_t;
+
+typedef struct video_config{
+       struct _MSWebCam *device;
+       const char **cams;
+       MSVideoSize vsize;
+       bool_t capture;
+       bool_t show_local;
+       bool_t display;
+       bool_t selfview; /*during calls*/
+}video_config_t;
+
+typedef struct ui_config
+{
+       int is_daemon;
+       int is_applet;
+       unsigned int timer_id;  /* the timer id for registration */
+}ui_config_t;
+
+
+
+typedef struct autoreplier_config
+{
+       int enabled;
+       int after_seconds;              /* accept the call after x seconds*/
+       int max_users;                  /* maximum number of user that can call simultaneously */
+       int max_rec_time;       /* the max time of incoming voice recorded */
+       int max_rec_msg;                /* maximum number of recorded messages */
+       const char *message;            /* the path of the file to be played */
+}autoreplier_config_t;
+
+struct osip_from;
+
+/**
+ * Object that represents a SIP address.
+ *
+ * The LinphoneAddress is an opaque object to represents SIP addresses, ie
+ * the content of SIP's 'from' and 'to' headers.
+ * A SIP address is made of display name, username, domain name, port, and various
+ * uri headers (such as tags). It looks like 'Alice <sip:alice@example.net>'.
+ * The LinphoneAddress has methods to extract and manipulate all parts of the address.
+ * When some part of the address (for example the username) is empty, the accessor methods
+ * return NULL.
+ * 
+ * @ingroup linphone_address
+ * @var LinphoneAddress
+ */
+typedef struct osip_from LinphoneAddress;
+
+LinphoneAddress * linphone_address_new(const char *uri);
+LinphoneAddress * linphone_address_clone(const LinphoneAddress *uri);
+const char *linphone_address_get_scheme(const LinphoneAddress *u);
+const char *linphone_address_get_display_name(const LinphoneAddress* u);
+const char *linphone_address_get_username(const LinphoneAddress *u);
+const char *linphone_address_get_domain(const LinphoneAddress *u);
+void linphone_address_set_display_name(LinphoneAddress *u, const char *display_name);
+void linphone_address_set_username(LinphoneAddress *uri, const char *username);
+void linphone_address_set_domain(LinphoneAddress *uri, const char *host);
+void linphone_address_set_port(LinphoneAddress *uri, const char *port);
+void linphone_address_set_port_int(LinphoneAddress *uri, int port);
+/*remove tags, params etc... so that it is displayable to the user*/
+void linphone_address_clean(LinphoneAddress *uri);
+char *linphone_address_as_string(const LinphoneAddress *u);
+char *linphone_address_as_string_uri_only(const LinphoneAddress *u);
+void linphone_address_destroy(LinphoneAddress *u);
+
+struct _LinphoneCore;
+struct _sdp_context;
+struct _SipSetupContext;
+struct _LinphoneCall;
+
+/**
+ * Enum representing the direction of a call.
+ * @ingroup call_logs
+**/
+enum _LinphoneCallDir {
+       LinphoneCallOutgoing, /**< outgoing calls*/
+       LinphoneCallIncoming  /**< incoming calls*/
+};
+
+/**
+ * Typedef for enum
+ * @ingroup call_logs
+**/
+typedef enum _LinphoneCallDir LinphoneCallDir;
+
+/**
+ * Enum representing the status of a call
+ * @ingroup call_logs
+**/
+typedef enum _LinphoneCallStatus { 
+       LinphoneCallSuccess, /**< The call was sucessful*/
+       LinphoneCallAborted, /**< The call was aborted */
+       LinphoneCallMissed /**< The call was missed (unanswered)*/
+} LinphoneCallStatus;
+
+/**
+ * Structure representing a call log.
+ *
+ * @ingroup call_logs
+ * 
+**/
+typedef struct _LinphoneCallLog{
+       LinphoneCallDir dir; /**< The direction of the call*/
+       LinphoneCallStatus status; /**< The status of the call*/
+       LinphoneAddress *from; /**<Originator of the call as a LinphoneAddress object*/
+       LinphoneAddress *to; /**<Destination of the call as a LinphoneAddress object*/
+       char start_date[128]; /**<Human readable string containg the start date*/
+       int duration; /**<Duration of the call in seconds*/
+       char *refkey;
+       void *user_pointer;
+       struct _LinphoneCore *lc;
+} LinphoneCallLog;
+
+
+
+/*public: */
+void linphone_call_log_set_user_pointer(LinphoneCallLog *cl, void *up);
+void *linphone_call_log_get_user_pointer(const LinphoneCallLog *cl);
+void linphone_call_log_set_ref_key(LinphoneCallLog *cl, const char *refkey);
+const char *linphone_call_log_get_ref_key(const LinphoneCallLog *cl);
+char * linphone_call_log_to_str(LinphoneCallLog *cl);
+
+typedef enum{
+       LinphoneSPWait,
+       LinphoneSPDeny,
+       LinphoneSPAccept
+}LinphoneSubscribePolicy;
+
+typedef enum _LinphoneOnlineStatus{
+       LINPHONE_STATUS_UNKNOWN,
+       LINPHONE_STATUS_ONLINE,
+       LINPHONE_STATUS_BUSY,
+       LINPHONE_STATUS_BERIGHTBACK,
+       LINPHONE_STATUS_AWAY,
+       LINPHONE_STATUS_ONTHEPHONE,
+       LINPHONE_STATUS_OUTTOLUNCH,
+       LINPHONE_STATUS_NOT_DISTURB,
+       LINPHONE_STATUS_MOVED,
+       LINPHONE_STATUS_ALT_SERVICE,
+       LINPHONE_STATUS_OFFLINE,
+       LINPHONE_STATUS_PENDING,
+       LINPHONE_STATUS_CLOSED,
+       LINPHONE_STATUS_END
+}LinphoneOnlineStatus;
+
+const char *linphone_online_status_to_string(LinphoneOnlineStatus ss);
+
+typedef struct _LinphoneFriend{
+       LinphoneAddress *uri;
+       int in_did;
+       int out_did;
+       int sid;
+       int nid;
+       LinphoneSubscribePolicy pol;
+       LinphoneOnlineStatus status;
+       struct _LinphoneProxyConfig *proxy;
+       struct _LinphoneCore *lc;
+       BuddyInfo *info;
+       char *refkey;
+       bool_t subscribe;
+       bool_t inc_subscribe_pending;
+}LinphoneFriend;       
+
+LinphoneFriend * linphone_friend_new();
+LinphoneFriend *linphone_friend_new_with_addr(const char *addr);
+int linphone_friend_set_sip_addr(LinphoneFriend *fr, const char *uri);
+int linphone_friend_set_name(LinphoneFriend *fr, const char *name);
+int linphone_friend_send_subscribe(LinphoneFriend *fr, bool_t val);
+int linphone_friend_set_inc_subscribe_policy(LinphoneFriend *fr, LinphoneSubscribePolicy pol);
+int linphone_friend_set_proxy(LinphoneFriend *fr, struct _LinphoneProxyConfig *cfg);
+void linphone_friend_edit(LinphoneFriend *fr);
+void linphone_friend_done(LinphoneFriend *fr);
+void linphone_friend_destroy(LinphoneFriend *lf);
+const LinphoneAddress *linphone_friend_get_uri(const LinphoneFriend *lf);
+bool_t linphone_friend_get_send_subscribe(const LinphoneFriend *lf);
+LinphoneSubscribePolicy linphone_friend_get_inc_subscribe_policy(const LinphoneFriend *lf);
+LinphoneOnlineStatus linphone_friend_get_status(const LinphoneFriend *lf);
+BuddyInfo * linphone_friend_get_info(const LinphoneFriend *lf);
+void linphone_friend_set_ref_key(LinphoneFriend *lf, const char *key);
+const char *linphone_friend_get_ref_key(const LinphoneFriend *lf);
+#define linphone_friend_in_list(lf)    ((lf)->lc!=NULL)
+
+#define linphone_friend_url(lf) ((lf)->url)
+
+/**
+ * @addtogroup proxies
+ * @{
+**/
+/**
+ * The LinphoneProxyConfig object represents a proxy configuration to be used
+ * by the LinphoneCore object.
+ * Its fields must not be used directly in favour of the accessors methods.
+ * Once created and filled properly the LinphoneProxyConfig can be given to
+ * LinphoneCore with linphone_core_add_proxy_config().
+ * This will automatically triggers the registration, if enabled.
+ *
+ * The proxy configuration are persistent to restarts because they are saved
+ * in the configuration file. As a consequence, after linphone_core_new() there
+ * might already be a list of configured proxy that can be examined with
+ * linphone_core_get_proxy_config_list().
+ *
+ * The default proxy (see linphone_core_set_default_proxy() ) is the one of the list
+ * that is used by default for calls.
+**/
+typedef struct _LinphoneProxyConfig
+{
+       struct _LinphoneCore *lc;
+       char *reg_proxy;
+       char *reg_identity;
+       char *reg_route;
+       char *realm;
+       int expires;
+       int reg_time;
+       int rid;
+       char *type;
+       struct _SipSetupContext *ssctx;
+       int auth_failures;
+       char *contact_addr; /* our IP address as seen by the proxy, read from via 's received= parameter*/
+       int contact_port; /*our IP port as seen by the proxy, read from via's rport= parameter */
+       char *dial_prefix;
+       bool_t commit;
+       bool_t reg_sendregister;
+       bool_t registered;
+       bool_t publish;
+       bool_t dial_escape_plus;
+} LinphoneProxyConfig;
+
+LinphoneProxyConfig *linphone_proxy_config_new(void);
+int linphone_proxy_config_set_server_addr(LinphoneProxyConfig *obj, const char *server_addr);
+void linphone_proxy_config_set_identity(LinphoneProxyConfig *obj, const char *identity);
+void linphone_proxy_config_set_route(LinphoneProxyConfig *obj, const char *route);
+void linphone_proxy_config_expires(LinphoneProxyConfig *obj, int expires);
+void linphone_proxy_config_enable_register(LinphoneProxyConfig *obj, bool_t val);
+#define linphone_proxy_config_enableregister linphone_proxy_config_enable_register
+void linphone_proxy_config_edit(LinphoneProxyConfig *obj);
+int linphone_proxy_config_done(LinphoneProxyConfig *obj);
+void linphone_proxy_config_enable_publish(LinphoneProxyConfig *obj, bool_t val);
+bool_t linphone_proxy_config_is_registered(const LinphoneProxyConfig *obj);
+const char *linphone_proxy_config_get_domain(const LinphoneProxyConfig *cfg);
+/** Returns the proxy configured identity as a const char * */
+#define linphone_proxy_config_get_route(obj)  ((obj)->reg_route)
+/** Returns the proxy configured identity as a const char * */
+#define linphone_proxy_config_get_identity(obj)        ((obj)->reg_identity)
+#define linphone_proxy_config_publish_enabled(obj) ((obj)->publish)
+/** Returns the proxy sip address as const char * */
+#define linphone_proxy_config_get_addr(obj) ((obj)->reg_proxy)
+/** Returns the 'expire' time of the registration */
+#define linphone_proxy_config_get_expires(obj) ((obj)->expires)
+/** Returns TRUE if registration is enabled, FALSE otherwise */
+#define linphone_proxy_config_register_enabled(obj) ((obj)->reg_sendregister)
+#define linphone_proxy_config_get_core(obj) ((obj)->lc)
+/* destruction is called automatically when removing the proxy config */
+void linphone_proxy_config_destroy(LinphoneProxyConfig *cfg);
+void linphone_proxy_config_set_sip_setup(LinphoneProxyConfig *cfg, const char *type);
+SipSetupContext *linphone_proxy_config_get_sip_setup_context(LinphoneProxyConfig *cfg);
+SipSetup *linphone_proxy_config_get_sip_setup(LinphoneProxyConfig *cfg);
+
+/**
+ * @}
+**/
+
+typedef struct _LinphoneAccountCreator{
+       struct _LinphoneCore *lc;
+       struct _SipSetupContext *ssctx;
+       char *username;
+       char *password;
+       char *domain;
+       bool_t succeeded;
+}LinphoneAccountCreator;
+
+LinphoneAccountCreator *linphone_account_creator_new(struct _LinphoneCore *core, const char *type);
+void linphone_account_creator_set_username(LinphoneAccountCreator *obj, const char *username);
+void linphone_account_creator_set_password(LinphoneAccountCreator *obj, const char *password);
+void linphone_account_creator_set_domain(LinphoneAccountCreator *obj, const char *domain);
+const char * linphone_account_creator_get_username(LinphoneAccountCreator *obj);
+const char * linphone_account_creator_get_domain(LinphoneAccountCreator *obj);
+int linphone_account_creator_test_existence(LinphoneAccountCreator *obj);
+LinphoneProxyConfig * linphone_account_creator_validate(LinphoneAccountCreator *obj);
+void linphone_account_creator_destroy(LinphoneAccountCreator *obj);
+
+/**
+ * @ingroup authentication
+ * Object holding authentication information.
+ *
+ * @note The object's fields should not be accessed directly. Prefer using
+ * the accessor methods.
+ *
+ * In most case, authentication information consists of a username and password.
+ * Sometimes, a userid is required by proxy, and realm can be useful to discriminate
+ * different SIP domains.
+ *
+ * Once created and filled, a LinphoneAuthInfo must be added to the LinphoneCore in
+ * order to become known and used automatically when needed. 
+ * Use linphone_core_add_auth_info() for that purpose.
+ *
+ * The LinphoneCore object can take the initiative to request authentication information
+ * when needed to the application through the auth_info_requested callback of the
+ * LinphoneCoreVTable structure.
+ *
+ * The application can respond to this information request later using 
+ * linphone_core_add_auth_info(). This will unblock all pending authentication 
+ * transactions and retry them with authentication headers.
+ *
+**/
+typedef struct _LinphoneAuthInfo
+{
+       char *username;
+       char *realm;
+       char *userid;
+       char *passwd;
+       char *ha1;
+       bool_t works;
+       bool_t first_time;
+}LinphoneAuthInfo;
+
+LinphoneAuthInfo *linphone_auth_info_new(const char *username, const char *userid,
+               const char *passwd, const char *ha1,const char *realm);
+void linphone_auth_info_set_passwd(LinphoneAuthInfo *info, const char *passwd);
+void linphone_auth_info_set_username(LinphoneAuthInfo *info, const char *username);
+void linphone_auth_info_set_userid(LinphoneAuthInfo *info, const char *userid);
+/* you don't need those function*/
+void linphone_auth_info_destroy(LinphoneAuthInfo *info);
+LinphoneAuthInfo * linphone_auth_info_new_from_config_file(struct _LpConfig *config, int pos);
+
+struct _LinphoneChatRoom{
+       struct _LinphoneCore *lc;
+       char  *peer;
+       char *route;
+       LinphoneAddress *peer_url;
+       void * user_data;
+};
+typedef struct _LinphoneChatRoom LinphoneChatRoom;
+
+LinphoneChatRoom * linphone_core_create_chat_room(struct _LinphoneCore *lc, const char *to);
+void linphone_chat_room_send_message(LinphoneChatRoom *cr, const char *msg);
+void linphone_chat_room_destroy(LinphoneChatRoom *cr);
+void linphone_chat_room_set_user_data(LinphoneChatRoom *cr, void * ud);
+void * linphone_chat_room_get_user_data(LinphoneChatRoom *cr);
+
+/* describes the different groups of states */
+typedef enum _gstate_group {
+  GSTATE_GROUP_POWER,
+  GSTATE_GROUP_REG,
+  GSTATE_GROUP_CALL
+} gstate_group_t;
+
+typedef enum _gstate {
+  /* states for GSTATE_GROUP_POWER */
+  GSTATE_POWER_OFF = 0,        /* initial state */
+  GSTATE_POWER_STARTUP,
+  GSTATE_POWER_ON,
+  GSTATE_POWER_SHUTDOWN,
+  /* states for GSTATE_GROUP_REG */
+  GSTATE_REG_NONE = 10,       /* initial state */
+  GSTATE_REG_OK,
+  GSTATE_REG_FAILED,
+  /* states for GSTATE_GROUP_CALL */
+  GSTATE_CALL_IDLE = 20,      /* initial state */
+  GSTATE_CALL_OUT_INVITE,
+  GSTATE_CALL_OUT_CONNECTED,
+  GSTATE_CALL_IN_INVITE,
+  GSTATE_CALL_IN_CONNECTED,
+  GSTATE_CALL_END,
+  GSTATE_CALL_ERROR,
+  GSTATE_INVALID
+} gstate_t;
+
+struct _LinphoneGeneralState {
+  gstate_t old_state;
+  gstate_t new_state;
+  gstate_group_t group;
+  const char *message;
+};
+typedef struct _LinphoneGeneralState LinphoneGeneralState;
+
+/* private: set a new state */
+void gstate_new_state(struct _LinphoneCore *lc, gstate_t new_state, const char *message);
+/*private*/
+void gstate_initialize(struct _LinphoneCore *lc) ;
+
+/**
+ * @addtogroup initializing
+ * @{
+**/
+
+/** Callback prototype */
+typedef void (*ShowInterfaceCb)(struct _LinphoneCore *lc);
+/** Callback prototype */
+typedef void (*InviteReceivedCb)(struct _LinphoneCore *lc, const char *from);
+/** Callback prototype */
+typedef void (*ByeReceivedCb)(struct _LinphoneCore *lc, const char *from);
+/** Callback prototype */
+typedef void (*DisplayStatusCb)(struct _LinphoneCore *lc, const char *message);
+/** Callback prototype */
+typedef void (*DisplayMessageCb)(struct _LinphoneCore *lc, const char *message);
+/** Callback prototype */
+typedef void (*DisplayUrlCb)(struct _LinphoneCore *lc, const char *message, const char *url);
+/** Callback prototype */
+typedef void (*DisplayQuestionCb)(struct _LinphoneCore *lc, const char *message);
+/** Callback prototype */
+typedef void (*LinphoneCoreCbFunc)(struct _LinphoneCore *lc,void * user_data);
+/** Callback prototype */
+typedef void (*NotifyReceivedCb)(struct _LinphoneCore *lc, LinphoneFriend * fid, const char *url, const char *status, const char *img);
+/** Callback prototype */
+typedef void (*NewUnknownSubscriberCb)(struct _LinphoneCore *lc, LinphoneFriend *lf, const char *url);
+/** Callback prototype */
+typedef void (*AuthInfoRequested)(struct _LinphoneCore *lc, const char *realm, const char *username);
+/** Callback prototype */
+typedef void (*CallLogUpdated)(struct _LinphoneCore *lc, struct _LinphoneCallLog *newcl);
+/** Callback prototype */
+typedef void (*TextMessageReceived)(struct _LinphoneCore *lc, LinphoneChatRoom *room, const char *from, const char *message);
+/** Callback prototype */
+typedef void (*GeneralStateChange)(struct _LinphoneCore *lc, LinphoneGeneralState *gstate);
+/** Callback prototype */
+typedef void (*DtmfReceived)(struct _LinphoneCore* lc, int dtmf);
+/** Callback prototype */
+typedef void (*ReferReceived)(struct _LinphoneCore *lc, const char *refer_to);
+/** Callback prototype */
+typedef void (*BuddyInfoUpdated)(struct _LinphoneCore *lc, LinphoneFriend *lf);
+
+/**
+ * This structure holds all callbacks that the application should implement.
+ * 
+**/
+typedef struct _LinphoneVTable
+{
+       ShowInterfaceCb show; /**< Notifies the application that it should show up*/
+       InviteReceivedCb inv_recv; /**< Notifies incoming calls */
+       ByeReceivedCb bye_recv; /**< Notify calls terminated by far end*/
+       NotifyReceivedCb notify_recv; /**< Notify received presence events*/
+       NewUnknownSubscriberCb new_unknown_subscriber; /**< Notify about unknown subscriber */
+       AuthInfoRequested auth_info_requested; /**< Ask the application some authentication information */
+       DisplayStatusCb display_status; /**< Callback that notifies various events with human readable text.*/
+       DisplayMessageCb display_message;/**< Callback to display a message to the user */
+#ifdef VINCENT_MAURY_RSVP
+       /* the yes/no dialog box */
+       DisplayMessageCb display_yes_no;
+#endif
+       DisplayMessageCb display_warning;/** Callback to display a warning to the user */
+       DisplayUrlCb display_url;
+       DisplayQuestionCb display_question;
+       CallLogUpdated call_log_updated; /**< Notifies that call log list has been updated */
+       TextMessageReceived text_received; /**< A text message has been received */
+       GeneralStateChange general_state; /**< State notification callback */
+       DtmfReceived dtmf_received; /**< A dtmf has been received received */
+       ReferReceived refer_received; /**< A refer was received */
+       BuddyInfoUpdated buddy_info_updated; /**< a LinphoneFriend's BuddyInfo has changed*/
+} LinphoneCoreVTable;
+
+/**
+ * @}
+**/
+
+typedef struct _LCCallbackObj
+{
+  LinphoneCoreCbFunc _func;
+  void * _user_data;
+}LCCallbackObj;
+
+
+
+typedef enum _LinphoneFirewallPolicy{
+       LINPHONE_POLICY_NO_FIREWALL,
+       LINPHONE_POLICY_USE_NAT_ADDRESS,
+       LINPHONE_POLICY_USE_STUN
+} LinphoneFirewallPolicy;
+
+typedef enum _LinphoneWaitingState{
+       LinphoneWaitingStart,
+       LinphoneWaitingProgress,
+       LinphoneWaitingFinished
+} LinphoneWaitingState;
+typedef void * (*LinphoneWaitingCallback)(struct _LinphoneCore *lc, void *context, LinphoneWaitingState ws, const char *purpose, float progress);
+
+
+typedef struct _LinphoneCore
+{
+       LinphoneCoreVTable vtable;
+       struct _LpConfig *config;
+       net_config_t net_conf;
+       sip_config_t sip_conf;
+       rtp_config_t rtp_conf;
+       sound_config_t sound_conf;
+       video_config_t video_conf;
+       codecs_config_t codecs_conf;
+       ui_config_t ui_conf;
+       autoreplier_config_t autoreplier_conf;
+       LinphoneProxyConfig *default_proxy;
+       MSList *friends;
+       MSList *auth_info;
+       struct _RingStream *ringstream;
+       LCCallbackObj preview_finished_cb;
+       bool_t preview_finished;
+       struct _LinphoneCall *call;   /* the current call, in the future it will be a list of calls (conferencing)*/
+       int rid; /*registration id*/
+       MSList *queued_calls;   /* used by the autoreplier */
+       MSList *call_logs;
+       MSList *chatrooms;
+       int max_call_logs;
+       int missed_calls;
+       struct _AudioStream *audiostream;  /**/
+       struct _VideoStream *videostream;
+       struct _VideoStream *previewstream;
+       RtpTransport *a_rtp,*a_rtcp;
+       struct _RtpProfile *local_profile;
+       MSList *bl_reqs;
+       MSList *subscribers;    /* unknown subscribers */
+       int minutes_away;
+       LinphoneOnlineStatus presence_mode;
+       LinphoneOnlineStatus prev_mode;
+       char *alt_contact;
+       void *data;
+       ms_mutex_t lock;
+       char *play_file;
+       char *rec_file;
+       time_t prevtime;
+       int dw_audio_bw;
+       int up_audio_bw;
+       int dw_video_bw;
+       int up_video_bw;
+       int audio_bw;
+       int automatic_action;
+       gstate_t gstate_power;
+       gstate_t gstate_reg;
+       gstate_t gstate_call;
+       LinphoneWaitingCallback wait_cb;
+       void *wait_ctx;
+       bool_t use_files;
+       bool_t apply_nat_settings;
+       bool_t ready;
+       bool_t bl_refresh;
+#ifdef VINCENT_MAURY_RSVP
+       /* QoS parameters*/
+       int rsvp_enable;
+       int rpc_enable;
+#endif
+} LinphoneCore;
+
+
+
+/* THE main API */
+
+void linphone_core_enable_logs(FILE *file);
+void linphone_core_enable_logs_with_cb(OrtpLogFunc logfunc);
+void linphone_core_disable_logs(void);
+/*sets the user-agent string in sip messages, must be set before linphone_core_new() or linphone_core_init() */
+void linphone_core_set_user_agent(const char *ua_name, const char *version);
+const char *linphone_core_get_version(void);
+
+LinphoneCore *linphone_core_new(const LinphoneCoreVTable *vtable,
+                                               const char *config_path, const char *factory_config, void* userdata);
+
+/* function to be periodically called in a main loop */
+void linphone_core_iterate(LinphoneCore *lc);
+
+int linphone_core_invite(LinphoneCore *lc, const char *url);
+
+int linphone_core_refer(LinphoneCore *lc, const char *url);
+
+bool_t linphone_core_inc_invite_pending(LinphoneCore*lc);
+
+bool_t linphone_core_in_call(const LinphoneCore *lc);
+
+int linphone_core_accept_call(LinphoneCore *lc, const char *url);
+
+int linphone_core_terminate_call(LinphoneCore *lc, const char *url);
+
+void linphone_core_send_dtmf(LinphoneCore *lc,char dtmf);
+
+int linphone_core_set_primary_contact(LinphoneCore *lc, const char *contact);
+
+const char *linphone_core_get_primary_contact(LinphoneCore *lc);
+
+void linphone_core_set_guess_hostname(LinphoneCore *lc, bool_t val);
+bool_t linphone_core_get_guess_hostname(LinphoneCore *lc);
+
+bool_t linphone_core_ipv6_enabled(LinphoneCore *lc);
+void linphone_core_enable_ipv6(LinphoneCore *lc, bool_t val);
+
+LinphoneAddress *linphone_core_get_primary_contact_parsed(LinphoneCore *lc);
+
+/*0= no bandwidth limit*/
+void linphone_core_set_download_bandwidth(LinphoneCore *lc, int bw);
+void linphone_core_set_upload_bandwidth(LinphoneCore *lc, int bw);
+
+int linphone_core_get_download_bandwidth(const LinphoneCore *lc);
+int linphone_core_get_upload_bandwidth(const LinphoneCore *lc);
+
+
+#ifdef VINCENT_MAURY_RSVP
+/* QoS functions */
+int linphone_core_set_rpc_mode(LinphoneCore *lc, int on); /* on = 1 (RPC_ENABLE = 1) */
+int linphone_core_set_rsvp_mode(LinphoneCore *lc, int on); /* on = 1 (RSVP_ENABLE = 1) */
+int linphone_core_change_qos(LinphoneCore *lc, int answer); /* answer = 1 for yes, 0 for no */
+#endif
+
+/* returns a MSList of PayloadType */
+const MSList *linphone_core_get_audio_codecs(const LinphoneCore *lc);
+
+int linphone_core_set_audio_codecs(LinphoneCore *lc, MSList *codecs);
+/* returns a MSList of PayloadType */
+const MSList *linphone_core_get_video_codecs(const LinphoneCore *lc);
+
+int linphone_core_set_video_codecs(LinphoneCore *lc, MSList *codecs);
+
+bool_t linphone_core_check_payload_type_usability(LinphoneCore *lc, PayloadType *pt);
+
+int linphone_core_add_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *config);
+
+void linphone_core_clear_proxy_config(LinphoneCore *lc);
+
+void linphone_core_remove_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *config);
+
+const MSList *linphone_core_get_proxy_config_list(const LinphoneCore *lc);
+
+void linphone_core_set_default_proxy(LinphoneCore *lc, LinphoneProxyConfig *config);
+
+void linphone_core_set_default_proxy_index(LinphoneCore *lc, int index);
+
+int linphone_core_get_default_proxy(LinphoneCore *lc, LinphoneProxyConfig **config);
+
+void linphone_core_add_auth_info(LinphoneCore *lc, LinphoneAuthInfo *info);
+
+void linphone_core_remove_auth_info(LinphoneCore *lc, LinphoneAuthInfo *info);
+
+const MSList *linphone_core_get_auth_info_list(const LinphoneCore *lc);
+
+LinphoneAuthInfo *linphone_core_find_auth_info(LinphoneCore *lc, const char *realm, const char *username);
+
+void linphone_core_abort_authentication(LinphoneCore *lc,  LinphoneAuthInfo *info);
+
+void linphone_core_clear_all_auth_info(LinphoneCore *lc);
+
+int linphone_core_get_audio_jittcomp(LinphoneCore *lc);
+
+void linphone_core_set_audio_jittcomp(LinphoneCore *lc, int value);
+
+int linphone_core_get_audio_port(const LinphoneCore *lc);
+
+int linphone_core_get_video_port(const LinphoneCore *lc);
+
+int linphone_core_get_nortp_timeout(const LinphoneCore *lc);
+
+void linphone_core_set_audio_port(LinphoneCore *lc, int port);
+
+void linphone_core_set_video_port(LinphoneCore *lc, int port);
+
+void linphone_core_set_nortp_timeout(LinphoneCore *lc, int port);
+
+void linphone_core_set_use_info_for_dtmf(LinphoneCore *lc, bool_t use_info);
+
+bool_t linphone_core_get_use_info_for_dtmf(LinphoneCore *lc);
+
+void linphone_core_set_use_rfc2833_for_dtmf(LinphoneCore *lc,bool_t use_rfc2833);
+
+bool_t linphone_core_get_use_rfc2833_for_dtmf(LinphoneCore *lc);
+
+int linphone_core_get_sip_port(LinphoneCore *lc);
+
+void linphone_core_set_sip_port(LinphoneCore *lc,int port);
+
+void linphone_core_set_inc_timeout(LinphoneCore *lc, int seconds);
+
+int linphone_core_get_inc_timeout(LinphoneCore *lc);
+
+void linphone_core_set_stun_server(LinphoneCore *lc, const char *server);
+
+const char * linphone_core_get_stun_server(const LinphoneCore *lc);
+
+void linphone_core_set_nat_address(LinphoneCore *lc, const char *addr);
+
+const char *linphone_core_get_nat_address(const LinphoneCore *lc);
+
+void linphone_core_set_firewall_policy(LinphoneCore *lc, LinphoneFirewallPolicy pol);
+
+LinphoneFirewallPolicy linphone_core_get_firewall_policy(const LinphoneCore *lc);
+
+const char * linphone_core_get_relay_addr(const LinphoneCore *lc);
+
+int linphone_core_set_relay_addr(LinphoneCore *lc, const char *addr);
+
+/* sound functions */
+/* returns a null terminated static array of string describing the sound devices */ 
+const char**  linphone_core_get_sound_devices(LinphoneCore *lc);
+bool_t linphone_core_sound_device_can_capture(LinphoneCore *lc, const char *device);
+bool_t linphone_core_sound_device_can_playback(LinphoneCore *lc, const char *device);
+int linphone_core_get_ring_level(LinphoneCore *lc);
+int linphone_core_get_play_level(LinphoneCore *lc);
+int linphone_core_get_rec_level(LinphoneCore *lc);
+void linphone_core_set_ring_level(LinphoneCore *lc, int level);
+void linphone_core_set_play_level(LinphoneCore *lc, int level);
+void linphone_core_set_rec_level(LinphoneCore *lc, int level);
+const char * linphone_core_get_ringer_device(LinphoneCore *lc);
+const char * linphone_core_get_playback_device(LinphoneCore *lc);
+const char * linphone_core_get_capture_device(LinphoneCore *lc);
+int linphone_core_set_ringer_device(LinphoneCore *lc, const char * devid);
+int linphone_core_set_playback_device(LinphoneCore *lc, const char * devid);
+int linphone_core_set_capture_device(LinphoneCore *lc, const char * devid);
+char linphone_core_get_sound_source(LinphoneCore *lc);
+void linphone_core_set_sound_source(LinphoneCore *lc, char source);
+void linphone_core_set_ring(LinphoneCore *lc, const char *path);
+const char *linphone_core_get_ring(const LinphoneCore *lc);
+void linphone_core_set_ringback(LinphoneCore *lc, const char *path);
+const char * linphone_core_get_ringback(const LinphoneCore *lc);
+int linphone_core_preview_ring(LinphoneCore *lc, const char *ring,LinphoneCoreCbFunc func,void * userdata);
+void linphone_core_enable_echo_cancellation(LinphoneCore *lc, bool_t val);
+bool_t linphone_core_echo_cancellation_enabled(LinphoneCore *lc);
+
+void linphone_core_enable_echo_limiter(LinphoneCore *lc, bool_t val);
+bool_t linphone_core_echo_limiter_enabled(const LinphoneCore *lc);
+
+void linphone_core_enable_agc(LinphoneCore *lc, bool_t val);
+bool_t linphone_core_agc_enabled(const LinphoneCore *lc);
+
+void linphone_core_mute_mic(LinphoneCore *lc, bool_t muted);
+
+void linphone_core_set_presence_info(LinphoneCore *lc,int minutes_away,const char *contact,LinphoneOnlineStatus os);
+
+LinphoneOnlineStatus linphone_core_get_presence_info(const LinphoneCore *lc);
+
+void linphone_core_interpret_friend_uri(LinphoneCore *lc, const char *uri, char **result);
+void linphone_core_add_friend(LinphoneCore *lc, LinphoneFriend *fr);
+void linphone_core_remove_friend(LinphoneCore *lc, LinphoneFriend *fr);
+void linphone_core_reject_subscriber(LinphoneCore *lc, LinphoneFriend *lf);
+/* a list of LinphoneFriend */
+const MSList * linphone_core_get_friend_list(const LinphoneCore *lc);
+/* notify all friends that have subscribed */
+void linphone_core_notify_all_friends(LinphoneCore *lc, LinphoneOnlineStatus os);
+LinphoneFriend *linphone_core_get_friend_by_uri(const LinphoneCore *lc, const char *uri);
+LinphoneFriend *linphone_core_get_friend_by_ref_key(const LinphoneCore *lc, const char *key);
+
+/* returns a list of LinphoneCallLog */
+const MSList * linphone_core_get_call_logs(LinphoneCore *lc);
+void linphone_core_clear_call_logs(LinphoneCore *lc);
+
+/* video support */
+void linphone_core_enable_video(LinphoneCore *lc, bool_t vcap_enabled, bool_t display_enabled);
+bool_t linphone_core_video_enabled(LinphoneCore *lc);
+
+typedef struct MSVideoSizeDef{
+       MSVideoSize vsize;
+       const char *name;
+}MSVideoSizeDef;
+/* returns a zero terminated table of MSVideoSizeDef*/
+const MSVideoSizeDef *linphone_core_get_supported_video_sizes(LinphoneCore *lc);
+void linphone_core_set_preferred_video_size(LinphoneCore *lc, MSVideoSize vsize);
+MSVideoSize linphone_core_get_preferred_video_size(LinphoneCore *lc);
+void linphone_core_set_preferred_video_size_by_name(LinphoneCore *lc, const char *name);
+
+void linphone_core_enable_video_preview(LinphoneCore *lc, bool_t val);
+bool_t linphone_core_video_preview_enabled(const LinphoneCore *lc);
+
+void linphone_core_enable_self_view(LinphoneCore *lc, bool_t val);
+bool_t linphone_core_self_view_enabled(const LinphoneCore *lc);
+
+
+/* returns a null terminated static array of string describing the webcams */ 
+const char**  linphone_core_get_video_devices(const LinphoneCore *lc);
+int linphone_core_set_video_device(LinphoneCore *lc, const char *id);
+const char *linphone_core_get_video_device(const LinphoneCore *lc);
+
+/*function to be used for eventually setting window decorations (icons, title...)*/
+unsigned long linphone_core_get_native_video_window_id(const LinphoneCore *lc);
+
+
+/*play/record support: use files instead of soundcard*/
+void linphone_core_use_files(LinphoneCore *lc, bool_t yesno);
+void linphone_core_set_play_file(LinphoneCore *lc, const char *file);
+void linphone_core_set_record_file(LinphoneCore *lc, const char *file);
+
+gstate_t linphone_core_get_state(const LinphoneCore *lc, gstate_group_t group);
+int linphone_core_get_current_call_duration(const LinphoneCore *lc);
+const LinphoneAddress *linphone_core_get_remote_uri(LinphoneCore *lc);
+
+int linphone_core_get_mtu(const LinphoneCore *lc);
+void linphone_core_set_mtu(LinphoneCore *lc, int mtu);
+
+bool_t linphone_core_is_in_main_thread(LinphoneCore *lc);
+
+void *linphone_core_get_user_data(LinphoneCore *lc);
+
+/* returns LpConfig object to read/write to the config file: usefull if you wish to extend
+the config file with your own sections */
+struct _LpConfig *linphone_core_get_config(LinphoneCore *lc);
+
+/* attempts to wake up another linphone engine already running.
+The "show" callback is called for the other linphone, causing gui to show up.
+call_addr is an optional sip-uri to call immediately after waking up.
+The method returns 0 if an already running linphone was found*/
+
+int linphone_core_wake_up_possible_already_running_instance(
+    const char * config_file, const char * call_addr);
+
+/*set a callback for some blocking operations, it takes you informed of the progress of the operation*/
+void linphone_core_set_waiting_callback(LinphoneCore *lc, LinphoneWaitingCallback cb, void *user_context);
+
+/*returns the list of registered SipSetup (linphonecore plugins) */
+const MSList * linphone_core_get_sip_setups(LinphoneCore *lc);
+
+void linphone_core_destroy(LinphoneCore *lc);
+
+/*for advanced users:*/
+void linphone_core_set_audio_transports(LinphoneCore *lc, RtpTransport *rtp, RtpTransport *rtcp);
+
+/* end of lecacy api */
+
+/*internal use only */
+#define linphone_core_lock(lc) ms_mutex_lock(&(lc)->lock)
+#define linphone_core_unlock(lc)       ms_mutex_unlock((&lc)->lock)
+void linphone_core_start_media_streams(LinphoneCore *lc, struct _LinphoneCall *call);
+void linphone_core_stop_media_streams(LinphoneCore *lc);
+const char * linphone_core_get_identity(LinphoneCore *lc);
+const char * linphone_core_get_route(LinphoneCore *lc);
+bool_t linphone_core_interpret_url(LinphoneCore *lc, const char *url, LinphoneAddress **real_parsed_url, char **route);
+void linphone_core_start_waiting(LinphoneCore *lc, const char *purpose);
+void linphone_core_update_progress(LinphoneCore *lc, const char *purpose, float progresses);
+void linphone_core_stop_waiting(LinphoneCore *lc);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/coreapi/lpconfig.c b/coreapi/lpconfig.c
new file mode 100644 (file)
index 0000000..9e5cabc
--- /dev/null
@@ -0,0 +1,358 @@
+/***************************************************************************
+ *            lpconfig.c
+ *
+ *  Thu Mar 10 11:13:44 2005
+ *  Copyright  2005  Simon Morlat
+ *  Email simon.morlat@linphone.org
+ ****************************************************************************/
+
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#define MAX_LEN 1024
+
+#include "linphonecore.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#if !defined(_WIN32_WCE)
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#endif /*_WIN32_WCE*/
+
+
+
+#define lp_new0(type,n)        (type*)calloc(sizeof(type),n)
+
+#include "lpconfig.h"
+
+
+typedef struct _LpItem{
+       char *key;
+       char *value;
+} LpItem;
+
+typedef struct _LpSection{
+       char *name;
+       MSList *items;
+} LpSection;
+
+struct _LpConfig{
+       FILE *file;
+       char *filename;
+       MSList *sections;
+       int modified;
+       int readonly;
+};
+
+LpItem * lp_item_new(const char *key, const char *value){
+       LpItem *item=lp_new0(LpItem,1);
+       item->key=ortp_strdup(key);
+       item->value=ortp_strdup(value);
+       return item;
+}
+
+LpSection *lp_section_new(const char *name){
+       LpSection *sec=lp_new0(LpSection,1);
+       sec->name=ortp_strdup(name);
+       return sec;
+}
+
+void lp_item_destroy(void *pitem){
+       LpItem *item=(LpItem*)pitem;
+       free(item->key);
+       free(item->value);
+       free(item);
+}
+
+void lp_section_destroy(LpSection *sec){
+       free(sec->name);
+       ms_list_for_each(sec->items,lp_item_destroy);
+       ms_list_free(sec->items);
+       free(sec);
+}
+
+void lp_section_add_item(LpSection *sec,LpItem *item){
+       sec->items=ms_list_append(sec->items,(void *)item);
+}
+
+void lp_config_add_section(LpConfig *lpconfig, LpSection *section){
+       lpconfig->sections=ms_list_append(lpconfig->sections,(void *)section);
+}
+
+void lp_config_remove_section(LpConfig *lpconfig, LpSection *section){
+       lpconfig->sections=ms_list_remove(lpconfig->sections,(void *)section);
+       lp_section_destroy(section);
+}
+
+static bool_t is_first_char(const char *start, const char *pos){
+       const char *p;
+       for(p=start;p<pos;p++){
+               if (*p!=' ') return FALSE;
+       }
+       return TRUE;
+}
+
+LpSection *lp_config_find_section(LpConfig *lpconfig, const char *name){
+       LpSection *sec;
+       MSList *elem;
+       /*printf("Looking for section %s\n",name);*/
+       for (elem=lpconfig->sections;elem!=NULL;elem=ms_list_next(elem)){
+               sec=(LpSection*)elem->data;
+               if (strcmp(sec->name,name)==0){
+                       /*printf("Section %s found\n",name);*/
+                       return sec;
+               }
+       }
+       return NULL;
+}
+
+LpItem *lp_section_find_item(LpSection *sec, const char *name){
+       MSList *elem;
+       LpItem *item;
+       /*printf("Looking for item %s\n",name);*/
+       for (elem=sec->items;elem!=NULL;elem=ms_list_next(elem)){
+               item=(LpItem*)elem->data;
+               if (strcmp(item->key,name)==0) {
+                       /*printf("Item %s found\n",name);*/
+                       return item;
+               }
+       }
+       return NULL;
+}
+
+void lp_config_parse(LpConfig *lpconfig, FILE *file){
+       char tmp[MAX_LEN];
+       LpSection *cur=NULL;
+
+       if (file==NULL) return;
+
+       while(fgets(tmp,MAX_LEN,file)!=NULL){
+               char *pos1,*pos2;
+               pos1=strchr(tmp,'[');
+               if (pos1!=NULL && is_first_char(tmp,pos1) ){
+                       pos2=strchr(pos1,']');
+                       if (pos2!=NULL){
+                               int nbs;
+                               char secname[MAX_LEN];
+                               secname[0]='\0';
+                               /* found section */
+                               *pos2='\0';
+                               nbs = sscanf(pos1+1,"%s",secname);
+                               if (nbs == 1 ){
+                                       if (strlen(secname)>0){
+                                               cur=lp_config_find_section (lpconfig,secname);
+                                               if (cur==NULL){
+                                                       cur=lp_section_new(secname);
+                                                       lp_config_add_section(lpconfig,cur);
+                                               }
+                                       }
+                               }else{
+                                       ms_warning("parse error!");
+                               }
+                       }
+               }else {
+                       pos1=strchr(tmp,'=');
+                       if (pos1!=NULL){
+                               char key[MAX_LEN];
+                               key[0]='\0';
+
+                               *pos1='\0';
+                               if (sscanf(tmp,"%s",key)>0){
+
+                                       pos1++;
+                                       pos2=strchr(pos1,'\n');
+                                       if (pos2==NULL) pos2=pos1+strlen(pos1);
+                                       else {
+                                               *pos2='\0'; /*replace the '\n' */
+                                               pos2--;
+                                       }
+                                       /* remove ending white spaces */
+                                       for (; pos2>pos1 && *pos2==' ';pos2--) *pos2='\0';
+                                       if (pos2-pos1>=0){
+                                               /* found a pair key,value */
+                                               if (cur!=NULL){
+                                                       LpItem *item=lp_section_find_item(cur,key);
+                                                       if (item==NULL){
+                                                               lp_section_add_item(cur,lp_item_new(key,pos1));
+                                                       }else{
+                                                               ms_free(item->value);
+                                                               item->value=strdup(pos1);
+                                                       }
+                                                       /*printf("Found %s %s=%s\n",cur->name,key,pos1);*/
+                                               }else{
+                                                       ms_warning("found key,item but no sections");
+                                               }
+                                       }
+                               }
+                       }
+               }
+       }
+}
+
+LpConfig * lp_config_new(const char *filename){
+       LpConfig *lpconfig=lp_new0(LpConfig,1);
+       if (filename!=NULL){
+               lpconfig->filename=ortp_strdup(filename);
+               lpconfig->file=fopen(filename,"rw");
+               if (lpconfig->file!=NULL){
+                       lp_config_parse(lpconfig,lpconfig->file);
+                       fclose(lpconfig->file);                 
+#if !defined(_WIN32_WCE)
+                       /* make existing configuration files non-group/world-accessible */
+                       if (chmod(filename, S_IRUSR | S_IWUSR) == -1)
+                               ms_warning("unable to correct permissions on "
+                                         "configuration file: %s",
+                                          strerror(errno));
+#endif /*_WIN32_WCE*/
+                       lpconfig->file=NULL;
+                       lpconfig->modified=0;
+               }
+       }
+       return lpconfig;
+}
+
+int lp_config_read_file(LpConfig *lpconfig, const char *filename){
+       FILE* f=fopen(filename,"r");
+       if (f!=NULL){
+               lp_config_parse(lpconfig,f);
+               fclose(f);
+               return 0;
+       }
+       ms_warning("Fail to open file %s",filename);
+       return -1;
+}
+
+void lp_item_set_value(LpItem *item, const char *value){
+       free(item->value);
+       item->value=ortp_strdup(value);
+}
+
+
+void lp_config_destroy(LpConfig *lpconfig){
+       if (lpconfig->filename!=NULL) free(lpconfig->filename);
+       ms_list_for_each(lpconfig->sections,(void (*)(void*))lp_section_destroy);
+       ms_list_free(lpconfig->sections);
+       free(lpconfig);
+}
+
+void lp_section_remove_item(LpSection *sec, LpItem *item){
+       sec->items=ms_list_remove(sec->items,(void *)item);
+       lp_item_destroy(item);
+}
+
+const char *lp_config_get_string(LpConfig *lpconfig, const char *section, const char *key, const char *default_string){
+       LpSection *sec;
+       LpItem *item;
+       sec=lp_config_find_section(lpconfig,section);
+       if (sec!=NULL){
+               item=lp_section_find_item(sec,key);
+               if (item!=NULL) return item->value;
+       }
+       return default_string;
+}
+
+int lp_config_get_int(LpConfig *lpconfig,const char *section, const char *key, int default_value){
+       const char *str=lp_config_get_string(lpconfig,section,key,NULL);
+       if (str!=NULL) return atoi(str);
+       else return default_value;
+}
+
+float lp_config_get_float(LpConfig *lpconfig,const char *section, const char *key, float default_value){
+       const char *str=lp_config_get_string(lpconfig,section,key,NULL);
+       float ret=default_value;
+       if (str==NULL) return default_value;
+       sscanf(str,"%f",&ret);
+       return ret;
+}
+
+void lp_config_set_string(LpConfig *lpconfig,const char *section, const char *key, const char *value){
+       LpItem *item;
+       LpSection *sec=lp_config_find_section(lpconfig,section);
+       if (sec!=NULL){
+               item=lp_section_find_item(sec,key);
+               if (item!=NULL){
+                       if (value!=NULL)
+                               lp_item_set_value(item,value);
+                       else lp_section_remove_item(sec,item);
+               }else{
+                       if (value!=NULL)
+                               lp_section_add_item(sec,lp_item_new(key,value));
+               }
+       }else if (value!=NULL){
+               sec=lp_section_new(section);
+               lp_config_add_section(lpconfig,sec);
+               lp_section_add_item(sec,lp_item_new(key,value));
+       }
+       lpconfig->modified++;
+}
+
+void lp_config_set_int(LpConfig *lpconfig,const char *section, const char *key, int value){
+       char tmp[30];
+       snprintf(tmp,30,"%i",value);
+       lp_config_set_string(lpconfig,section,key,tmp);
+       lpconfig->modified++;
+}
+
+void lp_item_write(LpItem *item, FILE *file){
+       fprintf(file,"%s=%s\n",item->key,item->value);
+}
+
+void lp_section_write(LpSection *sec, FILE *file){
+       fprintf(file,"[%s]\n",sec->name);
+       ms_list_for_each2(sec->items,(void (*)(void*, void*))lp_item_write,(void *)file);
+       fprintf(file,"\n");
+}
+
+int lp_config_sync(LpConfig *lpconfig){
+       FILE *file;
+       if (lpconfig->filename==NULL) return -1;
+       if (lpconfig->readonly) return 0;
+#ifndef WIN32
+       /* don't create group/world-accessible files */
+       (void) umask(S_IRWXG | S_IRWXO);
+#endif
+       file=fopen(lpconfig->filename,"w");
+       if (file==NULL){
+               ms_warning("Could not write %s ! Maybe it is read-only. Configuration will not be saved.",lpconfig->filename);
+               lpconfig->readonly=1;
+               return -1;
+       }
+       ms_list_for_each2(lpconfig->sections,(void (*)(void *,void*))lp_section_write,(void *)file);
+       fclose(file);
+       lpconfig->modified=0;
+       return 0;
+}
+
+int lp_config_has_section(LpConfig *lpconfig, const char *section){
+       if (lp_config_find_section(lpconfig,section)!=NULL) return 1;
+       return 0;
+}
+
+void lp_config_clean_section(LpConfig *lpconfig, const char *section){
+       LpSection *sec=lp_config_find_section(lpconfig,section);
+       if (sec!=NULL){
+               lp_config_remove_section(lpconfig,sec);
+       }
+       lpconfig->modified++;
+}
+
+int lp_config_needs_commit(const LpConfig *lpconfig){
+       return lpconfig->modified>0;
+}
diff --git a/coreapi/lpconfig.h b/coreapi/lpconfig.h
new file mode 100644 (file)
index 0000000..bb731ac
--- /dev/null
@@ -0,0 +1,115 @@
+/***************************************************************************
+ *            lpconfig.h
+ *
+ *  Thu Mar 10 15:02:49 2005
+ *  Copyright  2005  Simon Morlat
+ *  Email simon.morlat@linphone.org
+ ****************************************************************************/
+
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+#ifndef LPCONFIG_H
+#define LPCONFIG_H
+
+/**
+ * The LpConfig object is used to manipulate a configuration file.
+ * 
+ * @ingroup misc
+ * The format of the configuration file is a .ini like format:
+ * - sections are defined in []
+ * - each section contains a sequence of key=value pairs.
+ *
+ * Example:
+ * @code
+ * [sound]
+ * echocanceler=1
+ * playback_dev=ALSA: Default device
+ *
+ * [video]
+ * enabled=1
+ * @endcode
+**/
+typedef struct _LpConfig LpConfig;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+LpConfig * lp_config_new(const char *filename);
+int lp_config_read_file(LpConfig *lpconfig, const char *filename);
+/**
+ * Retrieves a configuration item as a string, given its section, key, and default value.
+ * 
+ * @ingroup misc
+ * The default value string is returned if the config item isn't found.
+**/
+const char *lp_config_get_string(LpConfig *lpconfig, const char *section, const char *key, const char *default_string);
+int lp_config_read_file(LpConfig *lpconfig, const char *filename);
+/**
+ * Retrieves a configuration item as an integer, given its section, key, and default value.
+ * 
+ * @ingroup misc
+ * The default integer value is returned if the config item isn't found.
+**/
+int lp_config_get_int(LpConfig *lpconfig,const char *section, const char *key, int default_value);
+int lp_config_read_file(LpConfig *lpconfig, const char *filename);
+/**
+ * Retrieves a configuration item as a float, given its section, key, and default value.
+ * 
+ * @ingroup misc
+ * The default float value is returned if the config item isn't found.
+**/
+float lp_config_get_float(LpConfig *lpconfig,const char *section, const char *key, float default_value);
+/**
+ * Sets a string config item 
+ *
+ * @ingroup misc
+**/
+void lp_config_set_string(LpConfig *lpconfig,const char *section, const char *key, const char *value);
+/**
+ * Sets an integer config item
+ *
+ * @ingroup misc
+**/
+void lp_config_set_int(LpConfig *lpconfig,const char *section, const char *key, int value);
+/**
+ * Writes the config file to disk.
+ * 
+ * @ingroup misc
+**/
+int lp_config_sync(LpConfig *lpconfig);
+/**
+ * Returns 1 if a given section is present in the configuration.
+ *
+ * @ingroup misc
+**/
+int lp_config_has_section(LpConfig *lpconfig, const char *section);
+/**
+ * Removes every pair of key,value in a section and remove the section.
+ *
+ * @ingroup misc
+**/
+void lp_config_clean_section(LpConfig *lpconfig, const char *section);
+/*tells whether uncommited (with lp_config_sync()) modifications exist*/
+int lp_config_needs_commit(const LpConfig *lpconfig);
+void lp_config_destroy(LpConfig *cfg);
+       
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/coreapi/misc.c b/coreapi/misc.c
new file mode 100644 (file)
index 0000000..c2ba262
--- /dev/null
@@ -0,0 +1,831 @@
+
+/*
+linphone
+Copyright (C) 2000  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#include "private.h"
+#include "mediastreamer2/mediastream.h"
+#include <stdlib.h>
+#include <stdio.h>
+#ifdef HAVE_SIGHANDLER_T
+#include <signal.h>
+#endif /*HAVE_SIGHANDLER_T*/
+
+#include <string.h>
+#if !defined(_WIN32_WCE)
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <fcntl.h>
+#endif /*_WIN32_WCE*/
+
+#undef snprintf
+#include <ortp/stun.h>
+
+
+#if !defined(WIN32)
+
+static char lock_name[80];
+static char lock_set=0;
+/* put a lock file in /tmp. this is called when linphone runs as a daemon*/
+int set_lock_file()
+{
+       FILE *lockfile;
+
+       snprintf(lock_name,80,"/tmp/linphone.%i",getuid());
+       lockfile=fopen(lock_name,"w");
+       if (lockfile==NULL)
+       {
+               printf("Failed to create lock file.\n");
+               return(-1);
+       }
+       fprintf(lockfile,"%i",getpid());
+       fclose(lockfile);
+       lock_set=1;
+       return(0);
+}
+
+/* looks if there is a lock file. If presents return its content (the pid of the already running linphone), if not found, returns -1*/
+int get_lock_file()
+{
+       int pid;
+       FILE *lockfile;
+
+       snprintf(lock_name,80,"/tmp/linphone.%i",getuid());
+       lockfile=fopen(lock_name,"r");
+       if (lockfile==NULL)
+               return(-1);
+       if (fscanf(lockfile,"%i",&pid)!=1){
+               ms_warning("Could not read pid in lock file.");
+               fclose(lockfile);
+               return -1;
+       }
+       fclose(lockfile);
+       return pid;
+}
+
+/* remove the lock file if it was set*/
+int remove_lock_file()
+{
+       int err=0;
+       if (lock_set)
+       {
+               err=unlink(lock_name);
+               lock_set=0;
+       }
+       return(err);
+}
+
+#endif
+
+char *int2str(int number)
+{
+       char *numstr=ms_malloc(10);
+       snprintf(numstr,10,"%i",number);
+       return numstr;
+}
+
+void check_sound_device(LinphoneCore *lc)
+{
+#ifdef _linux
+       int fd=0;
+       int len;
+       int a;
+       char *file=NULL;
+       char *i810_audio=NULL;
+       char *snd_pcm_oss=NULL;
+       char *snd_mixer_oss=NULL;
+       char *snd_pcm=NULL;
+       fd=open("/proc/modules",O_RDONLY);
+
+       if (fd>0){
+               /* read the entire /proc/modules file and check if sound conf seems correct */
+               /*a=fstat(fd,&statbuf);
+               if (a<0) ms_warning("Can't stat /proc/modules:%s.",strerror(errno));
+               len=statbuf.st_size;
+               if (len==0) ms_warning("/proc/modules has zero size!");
+               */
+               /***** fstat does not work on /proc/modules for unknown reason *****/
+               len=6000;
+               file=ms_malloc(len+1);
+               a=read(fd,file,len);
+               if (a<len) file=ms_realloc(file,a+1);
+               file[a]='\0';
+               i810_audio=strstr(file,"i810_audio");
+               if (i810_audio!=NULL){
+                       /* I'm sorry i put this warning in comments because
+                        * i don't use yet the right driver !! */
+/*                     lc->vtable.display_warning(lc,_("You are currently using the i810_audio driver.\nThis driver is buggy and so does not work with Linphone.\nWe suggest that you replace it by its equivalent ALSA driver,\neither with packages from your distribution, or by downloading\nALSA drivers at http://www.alsa-project.org."));*/
+                       goto end;
+               }
+               snd_pcm=strstr(file,"snd-pcm");
+               if (snd_pcm!=NULL){
+                       snd_pcm_oss=strstr(file,"snd-pcm-oss");
+                       snd_mixer_oss=strstr(file,"snd-mixer-oss");
+                       if (snd_pcm_oss==NULL){
+                               lc->vtable.display_warning(lc,_("Your computer appears to be using ALSA sound drivers.\nThis is the best choice. However the pcm oss emulation module\nis missing and linphone needs it. Please execute\n'modprobe snd-pcm-oss' as root to load it."));
+                       }
+                       if (snd_mixer_oss==NULL){
+                               lc->vtable.display_warning(lc,_("Your computer appears to be using ALSA sound drivers.\nThis is the best choice. However the mixer oss emulation module\nis missing and linphone needs it. Please execute\n 'modprobe snd-mixer-oss' as root to load it."));
+                       }
+               }
+       }else {
+
+               ms_warning("Could not open /proc/modules.");
+       }
+       /* now check general volume. Some user forget to rise it and then complain that linphone is
+       not working */
+       /* but some other users complain that linphone should not change levels...
+       if (lc->sound_conf.sndcard!=NULL){
+               a=snd_card_get_level(lc->sound_conf.sndcard,SND_CARD_LEVEL_GENERAL);
+               if (a<50){
+                       ms_warning("General level is quite low (%i). Linphone rises it up for you.",a);
+                       snd_card_set_level(lc->sound_conf.sndcard,SND_CARD_LEVEL_GENERAL,80);
+               }
+       }
+       */
+       end:
+       if (file!=NULL) ms_free(file);
+       if (fd>0) close(fd);
+#endif
+}
+
+#define UDP_HDR_SZ 8
+#define RTP_HDR_SZ 12
+#define IP4_HDR_SZ 20   /*20 is the minimum, but there may be some options*/
+
+const char *payload_type_get_description(PayloadType *pt){
+       return _((const char *)pt->user_data);
+}
+
+void payload_type_set_enable(PayloadType *pt,int value)
+{
+       if ((value)!=0) payload_type_set_flag(pt,PAYLOAD_TYPE_ENABLED); \
+       else payload_type_unset_flag(pt,PAYLOAD_TYPE_ENABLED);
+}
+
+
+bool_t payload_type_enabled(PayloadType *pt) {
+       return (((pt)->flags & PAYLOAD_TYPE_ENABLED)!=0);
+}
+
+int payload_type_get_bitrate(PayloadType *pt)
+{
+       return pt->normal_bitrate;
+}
+const char *payload_type_get_mime(PayloadType *pt){
+       return pt->mime_type;
+}
+
+int payload_type_get_rate(PayloadType *pt){
+       return pt->clock_rate;
+}
+
+/*this function makes a special case for speex/8000.
+This codec is variable bitrate. The 8kbit/s mode is interesting when having a low upload bandwidth, but its quality
+is not very good. We 'd better use its 15kbt/s mode when we have enough bandwidth*/
+static int get_codec_bitrate(LinphoneCore *lc, const PayloadType *pt){
+       int upload_bw=linphone_core_get_upload_bandwidth(lc);
+       if (bandwidth_is_greater(upload_bw,129) || (bandwidth_is_greater(upload_bw,33) && !linphone_core_video_enabled(lc)) ) {
+               if (strcmp(pt->mime_type,"speex")==0 && pt->clock_rate==8000){
+                       return 15000;
+               }
+       }
+       return pt->normal_bitrate;
+}
+
+static double get_audio_payload_bandwidth(LinphoneCore *lc, const PayloadType *pt){
+       double npacket=50;
+       double packet_size;
+       int bitrate;
+       bitrate=get_codec_bitrate(lc,pt);
+       packet_size= (((double)bitrate)/(50*8))+UDP_HDR_SZ+RTP_HDR_SZ+IP4_HDR_SZ;
+       return packet_size*8.0*npacket;
+}
+
+void linphone_core_update_allocated_audio_bandwidth_in_call(LinphoneCore *lc, const PayloadType *pt){
+       lc->audio_bw=(int)(get_audio_payload_bandwidth(lc,pt)/1000.0);
+       /*update*/
+       linphone_core_set_download_bandwidth(lc,lc->net_conf.download_bw);
+       linphone_core_set_upload_bandwidth(lc,lc->net_conf.upload_bw);
+}
+
+void linphone_core_update_allocated_audio_bandwidth(LinphoneCore *lc){
+       const MSList *elem;
+       PayloadType *max=NULL;
+       for(elem=linphone_core_get_audio_codecs(lc);elem!=NULL;elem=elem->next){
+               PayloadType *pt=(PayloadType*)elem->data;
+               if (payload_type_enabled(pt)){
+                       int pt_bitrate=get_codec_bitrate(lc,pt);
+                       if (max==NULL) max=pt;
+                       else if (max->normal_bitrate<pt_bitrate){
+                               max=pt;
+                       }
+               }
+       }
+       if (max) {
+               linphone_core_update_allocated_audio_bandwidth_in_call(lc,max);
+       }
+}
+
+/* return TRUE if codec can be used with bandwidth, FALSE else*/
+bool_t linphone_core_check_payload_type_usability(LinphoneCore *lc, PayloadType *pt)
+{
+       double codec_band;
+       int min_audio_bw;
+       int min_video_bw;
+       bool_t ret=FALSE;
+       /*
+         update allocated audio bandwidth to allocate the remaining to video.
+         This must be done outside calls, because after sdp negociation
+         the audio bandwidth is refined to the selected codec
+       */
+       if (!linphone_core_in_call(lc)) linphone_core_update_allocated_audio_bandwidth(lc);
+       min_audio_bw=get_min_bandwidth(linphone_core_get_download_bandwidth(lc),
+                                       linphone_core_get_upload_bandwidth(lc));
+       if (min_audio_bw==0) min_audio_bw=-1;
+       min_video_bw=get_min_bandwidth(lc->dw_video_bw,lc->up_video_bw);
+
+       switch (pt->type){
+               case PAYLOAD_AUDIO_CONTINUOUS:
+               case PAYLOAD_AUDIO_PACKETIZED:
+                       codec_band=get_audio_payload_bandwidth(lc,pt);
+                       ret=bandwidth_is_greater(min_audio_bw*1000,codec_band);
+                       //ms_message("Payload %s: %g",pt->mime_type,codec_band);
+                       break;
+               case PAYLOAD_VIDEO:
+                       if (min_video_bw!=0) {/* infinite (-1) or strictly positive*/
+                               /*let the video use all the bandwidth minus the maximum bandwidth used by audio */
+                               if (min_video_bw>0)
+                                       pt->normal_bitrate=min_video_bw*1000;
+                               else
+                                       pt->normal_bitrate=1500000; /*around 1.5 Mbit/s*/
+                               ret=TRUE;
+                       }
+                       else ret=FALSE;
+                       break;
+       }
+       /*if (!ret) ms_warning("Payload %s is not usable with your internet connection.",pt->mime_type);*/
+
+       return ret;
+}
+
+static PayloadType * find_payload(RtpProfile *prof, PayloadType *pt /*from config*/){
+       PayloadType *candidate=NULL;
+       int i;
+       PayloadType *it;
+       for(i=0;i<127;++i){
+               it=rtp_profile_get_payload(prof,i);
+               if (it!=NULL && strcasecmp(pt->mime_type,it->mime_type)==0
+                       && (pt->clock_rate==it->clock_rate || pt->clock_rate<=0)
+                       && payload_type_get_user_data(it)==NULL ){
+                       if ( (pt->recv_fmtp && it->recv_fmtp && strcasecmp(pt->recv_fmtp,it->recv_fmtp)==0) ||
+                               (pt->recv_fmtp==NULL && it->recv_fmtp==NULL) ){
+                               /*exact match*/
+                               return it;
+                       }else candidate=it;
+               }
+       }
+       return candidate;
+}
+
+static bool_t check_h264_packmode(PayloadType *payload, MSFilterDesc *desc){
+       if (payload->recv_fmtp==NULL || strstr(payload->recv_fmtp,"packetization-mode")==0){
+               /*this is packetization-mode=0 H264, we only support it with a multislicing
+               enabled version of x264*/
+               if (strstr(desc->text,"x264") && strstr(desc->text,"multislicing")==0){
+                       /*this is x264 without multisclicing*/
+                       ms_message("Disabling packetization-mode=0 H264 codec because "
+                       "of lack of multislicing support");
+                       return FALSE;
+               }
+       }
+       return TRUE;
+}
+
+static MSList *fix_codec_list(RtpProfile *prof, MSList *conflist)
+{
+       MSList *elem;
+       MSList *newlist=NULL;
+       PayloadType *payload,*confpayload;
+
+       for (elem=conflist;elem!=NULL;elem=ms_list_next(elem))
+       {
+               confpayload=(PayloadType*)elem->data;
+               payload=find_payload(prof,confpayload);
+               if (payload!=NULL){
+                       if (ms_filter_codec_supported(confpayload->mime_type)){
+                               MSFilterDesc *desc=ms_filter_get_encoder(confpayload->mime_type);
+                               if (strcasecmp(confpayload->mime_type,"H264")==0){
+                                       if (!check_h264_packmode(confpayload,desc)){
+                                               continue;
+                                       }
+                               }
+                               payload_type_set_user_data(payload,(void*)desc->text);
+                               payload_type_set_enable(payload,payload_type_enabled(confpayload));
+                               newlist=ms_list_append(newlist,payload);
+                       }
+               }
+               else{
+                       ms_warning("Cannot support %s/%i: does not exist.",confpayload->mime_type,
+                                                               confpayload->clock_rate);
+               }
+       }
+       return newlist;
+}
+
+
+void linphone_core_setup_local_rtp_profile(LinphoneCore *lc)
+{
+       int i;
+       MSList *audiopt,*videopt;
+       PayloadType *payload;
+       bool_t prepend;
+       lc->local_profile=rtp_profile_clone_full(&av_profile);
+       /* first look at the list given by configuration file to see if
+       it is correct */
+       audiopt=fix_codec_list(lc->local_profile,lc->codecs_conf.audio_codecs);
+       videopt=fix_codec_list(lc->local_profile,lc->codecs_conf.video_codecs);
+       /* now find and add payloads that are not listed in the configuration
+       codec list */
+       for (i=0;i<127;i++)
+       {
+               payload=rtp_profile_get_payload(lc->local_profile,i);
+               if (payload!=NULL){
+                       if (payload_type_get_user_data(payload)!=NULL) continue;
+                       /* find a mediastreamer codec for this payload type */
+                       if (ms_filter_codec_supported(payload->mime_type)){
+                               MSFilterDesc *desc=ms_filter_get_encoder(payload->mime_type);
+                               ms_message("Adding new codec %s/%i",payload->mime_type,payload->clock_rate);
+                               payload_type_set_enable(payload,1);
+                               payload_type_set_user_data(payload,(void *)desc->text);
+                               prepend=FALSE;
+                               /* by default, put speex, mpeg4, or h264 on top of list*/
+                               if (strcmp(payload->mime_type,"speex")==0)
+                                       prepend=TRUE;
+                               else if (strcmp(payload->mime_type,"MP4V-ES")==0)
+                                       prepend=TRUE;
+                               else if (strcasecmp(payload->mime_type,"H264")==0){
+                                       if (check_h264_packmode(payload,desc))
+                                               prepend=TRUE;
+                                       else continue;
+                               }
+                               switch (payload->type){
+                                       case PAYLOAD_AUDIO_CONTINUOUS:
+                                       case PAYLOAD_AUDIO_PACKETIZED:
+                                                       if (prepend)
+                                                               audiopt=ms_list_prepend(audiopt,(void *)payload);
+                                                       else
+                                                               audiopt=ms_list_append(audiopt,(void *)payload);
+                                               break;
+                                       case PAYLOAD_VIDEO:
+                                                       if (prepend)
+                                                               videopt=ms_list_prepend(videopt,(void *)payload);
+                                                       else
+                                                               videopt=ms_list_append(videopt,(void *)payload);
+                                               break;
+                                       default:
+                                               ms_error("Unsupported rtp media type.");
+                               }
+                       }
+               }
+       }
+       ms_list_for_each(lc->codecs_conf.audio_codecs,(void (*)(void*))payload_type_destroy);
+       ms_list_for_each(lc->codecs_conf.video_codecs,(void (*)(void *))payload_type_destroy);
+       ms_list_free(lc->codecs_conf.audio_codecs);
+       ms_list_free(lc->codecs_conf.video_codecs);
+       /* set the fixed lists instead:*/
+       lc->codecs_conf.audio_codecs=audiopt;
+       lc->codecs_conf.video_codecs=videopt;
+       linphone_core_update_allocated_audio_bandwidth(lc);
+}
+
+int from_2char_without_params(osip_from_t *from,char **str)
+{
+       osip_from_t *tmpfrom=NULL;
+       osip_from_clone(from,&tmpfrom);
+       if (tmpfrom!=NULL){
+               while(!osip_list_eol(&tmpfrom->gen_params,0)){
+                       osip_generic_param_t *param=(osip_generic_param_t*)osip_list_get(&tmpfrom->gen_params,0);
+                       osip_generic_param_free(param);
+                       osip_list_remove(&tmpfrom->gen_params,0);
+               }
+       }else return -1;
+       osip_from_to_str(tmpfrom,str);
+       osip_from_free(tmpfrom);
+       return 0;
+}
+
+bool_t lp_spawn_command_line_sync(const char *command, char **result,int *command_ret){
+#if !defined(_WIN32_WCE)
+       FILE *f=popen(command,"r");
+       if (f!=NULL){
+               int err;
+               *result=ms_malloc(4096);
+               err=fread(*result,1,4096-1,f);
+               if (err<0){
+                       ms_warning("Error reading command output:%s",strerror(errno));
+                       ms_free(result);
+                       return FALSE;
+               }
+               (*result)[err]=0;
+               err=pclose(f);
+               if (command_ret!=NULL) *command_ret=err;
+               return TRUE;
+       }
+#endif /*_WIN32_WCE*/
+       return FALSE;
+}
+
+#if defined(HAVE_GETIFADDRS) && defined(INET6)
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <ifaddrs.h>
+bool_t host_has_ipv6_network()
+{
+       struct ifaddrs *ifp;
+       struct ifaddrs *ifpstart;
+       bool_t ipv6_present=FALSE;
+
+       if (getifaddrs (&ifpstart) < 0)
+       {
+               return FALSE;
+       }
+
+       for (ifp=ifpstart; ifp != NULL; ifp = ifp->ifa_next)
+       {
+               if (!ifp->ifa_addr)
+                 continue;
+
+               switch (ifp->ifa_addr->sa_family) {
+               case AF_INET:
+
+                       break;
+               case AF_INET6:
+                   ipv6_present=TRUE;
+                       break;
+               default:
+                       continue;
+               }
+       }
+
+       freeifaddrs (ifpstart);
+
+       return ipv6_present;
+}
+#else
+
+bool_t host_has_ipv6_network()
+{
+       return FALSE;
+}
+
+
+#endif
+
+static ortp_socket_t create_socket(int local_port){
+       struct sockaddr_in laddr;
+       ortp_socket_t sock;
+       int optval;
+       sock=socket(PF_INET,SOCK_DGRAM,IPPROTO_UDP);
+       if (sock<0) {
+               ms_error("Fail to create socket");
+               return -1;
+       }
+       memset (&laddr,0,sizeof(laddr));
+       laddr.sin_family=AF_INET;
+       laddr.sin_addr.s_addr=INADDR_ANY;
+       laddr.sin_port=htons(local_port);
+       if (bind(sock,(struct sockaddr*)&laddr,sizeof(laddr))<0){
+               ms_error("Bind socket to 0.0.0.0:%i failed: %s",local_port,getSocketError());
+               close_socket(sock);
+               return -1;
+       }
+       optval=1;
+       if (setsockopt (sock, SOL_SOCKET, SO_REUSEADDR,
+                               (SOCKET_OPTION_VALUE)&optval, sizeof (optval))<0){
+               ms_warning("Fail to set SO_REUSEADDR");
+       }
+       set_non_blocking_socket(sock);
+       return sock;
+}
+
+static int sendStunRequest(int sock, const struct sockaddr *server, socklen_t addrlen, int id, bool_t changeAddr){
+       char buf[STUN_MAX_MESSAGE_SIZE];
+       int len = STUN_MAX_MESSAGE_SIZE;
+       StunAtrString username;
+       StunAtrString password;
+       StunMessage req;
+       int err;
+       memset(&req, 0, sizeof(StunMessage));
+       memset(&username,0,sizeof(username));
+       memset(&password,0,sizeof(password));
+       stunBuildReqSimple( &req, &username, changeAddr , changeAddr , id);
+       len = stunEncodeMessage( &req, buf, len, &password);
+       if (len<=0){
+               ms_error("Fail to encode stun message.");
+               return -1;
+       }
+       err=sendto(sock,buf,len,0,server,addrlen);
+       if (err<0){
+               ms_error("sendto failed: %s",strerror(errno));
+               return -1;
+       }
+       return 0;
+}
+
+static int parse_stun_server_addr(const char *server, struct sockaddr_storage *ss, socklen_t *socklen){
+       struct addrinfo hints,*res=NULL;
+       int ret;
+       const char *port;
+       char host[NI_MAXHOST];
+       char *p;
+       host[NI_MAXHOST-1]='\0';
+       strncpy(host,server,sizeof(host)-1);
+       p=strchr(host,':');
+       if (p) {
+               *p='\0';
+               port=p+1;
+       }else port="3478";
+       memset(&hints,0,sizeof(hints));
+       hints.ai_family=PF_INET;
+       hints.ai_socktype=SOCK_DGRAM;
+       hints.ai_protocol=IPPROTO_UDP;
+       ret=getaddrinfo(host,port,&hints,&res);
+       if (ret!=0){
+               ms_error("getaddrinfo() failed for %s:%s : %s",host,port,gai_strerror(ret));
+               return -1;
+       }
+       if (!res) return -1;
+       memcpy(ss,res->ai_addr,res->ai_addrlen);
+       *socklen=res->ai_addrlen;
+       freeaddrinfo(res);
+       return 0;
+}
+
+static int recvStunResponse(ortp_socket_t sock, char *ipaddr, int *port, int *id){
+       char buf[STUN_MAX_MESSAGE_SIZE];
+       int len = STUN_MAX_MESSAGE_SIZE;
+       StunMessage resp;
+       len=recv(sock,buf,len,0);
+       if (len>0){
+               struct in_addr ia;
+               stunParseMessage(buf,len, &resp );
+               *id=resp.msgHdr.tr_id.octet[0];
+               *port = resp.mappedAddress.ipv4.port;
+               ia.s_addr=htonl(resp.mappedAddress.ipv4.addr);
+               strncpy(ipaddr,inet_ntoa(ia),LINPHONE_IPADDR_SIZE);
+       }
+       return len;
+}
+
+void linphone_core_run_stun_tests(LinphoneCore *lc, LinphoneCall *call){
+       const char *server=linphone_core_get_stun_server(lc);
+
+       if (lc->sip_conf.ipv6_enabled){
+               ms_warning("stun support is not implemented for ipv6");
+               return;
+       }
+       if (server!=NULL){
+               struct sockaddr_storage ss;
+               socklen_t ss_len;
+               ortp_socket_t sock1=-1, sock2=-1;
+               bool_t video_enabled=linphone_core_video_enabled(lc);
+               bool_t got_audio,got_video;
+               bool_t cone_audio=FALSE,cone_video=FALSE;
+               struct timeval init,cur;
+               if (parse_stun_server_addr(server,&ss,&ss_len)<0){
+                       ms_error("Fail to parser stun server address: %s",server);
+                       return;
+               }
+               if (lc->vtable.display_status!=NULL)
+                       lc->vtable.display_status(lc,_("Stun lookup in progress..."));
+
+               /*create the two audio and video RTP sockets, and send STUN message to our stun server */
+               sock1=create_socket(linphone_core_get_audio_port(lc));
+               if (sock1<0) return;
+               if (video_enabled){
+                       sock2=create_socket(linphone_core_get_video_port(lc));
+                       if (sock2<0) return ;
+               }
+               sendStunRequest(sock1,(struct sockaddr*)&ss,ss_len,11,TRUE);
+               sendStunRequest(sock1,(struct sockaddr*)&ss,ss_len,1,FALSE);
+               if (sock2>=0){
+                       sendStunRequest(sock2,(struct sockaddr*)&ss,ss_len,22,TRUE);
+                       sendStunRequest(sock2,(struct sockaddr*)&ss,ss_len,2,FALSE);
+               }
+               got_audio=FALSE;
+               got_video=FALSE;
+               gettimeofday(&init,NULL);
+               do{
+                       double elapsed;
+                       int id;
+#ifdef WIN32
+                       Sleep(10);
+#else
+                       usleep(10000);
+#endif
+
+                       if (recvStunResponse(sock1,call->audio_params.natd_addr,
+                                               &call->audio_params.natd_port,&id)>0){
+                               ms_message("STUN test result: local audio port maps to %s:%i",
+                                               call->audio_params.natd_addr,
+                                               call->audio_params.natd_port);
+                               if (id==11)
+                                       cone_audio=TRUE;
+                               got_audio=TRUE;
+                       }
+                       if (recvStunResponse(sock2,call->video_params.natd_addr,
+                                                       &call->video_params.natd_port,&id)>0){
+                               ms_message("STUN test result: local video port maps to %s:%i",
+                                       call->video_params.natd_addr,
+                                       call->video_params.natd_port);
+                               if (id==22)
+                                       cone_video=TRUE;
+                               got_video=TRUE;
+                       }
+                       gettimeofday(&cur,NULL);
+                       elapsed=((cur.tv_sec-init.tv_sec)*1000.0) +  ((cur.tv_usec-init.tv_usec)/1000.0);
+                       if (elapsed>2000)  break;
+               }while(!(got_audio && (got_video||sock2<0)  ) );
+               if (!got_audio){
+                       ms_error("No stun server response for audio port.");
+               }else{
+                       if (!cone_audio) {
+                               ms_warning("NAT is symmetric for audio port");
+                               call->audio_params.natd_port=0;
+                       }
+               }
+               if (sock2>=0){
+                       if (!got_video){
+                               ms_error("No stun server response for video port.");
+                       }else{
+                               if (!cone_video) {
+                                       ms_warning("NAT is symmetric for video port.");
+                                       call->video_params.natd_port=0;
+                               }
+                       }
+               }
+               close_socket(sock1);
+               if (sock2>=0) close_socket(sock2);
+       }
+}
+
+static int extract_sip_port(const char *config){
+       char line[512];
+       char port[12];
+       int ret=-1;
+       FILE *f=fopen(config,"r");
+       if (f){
+               while(fgets(line,sizeof(line),f)!=NULL){
+                       if (fmtp_get_value(line,"sip_port",port,sizeof(port))){
+                               ret=atoi(port);
+                       }
+               }
+               fclose(f);
+       }
+       return ret;
+}
+
+int linphone_core_wake_up_possible_already_running_instance(
+    const char * config_file, const char * addr_to_call)
+{
+       int port=extract_sip_port(config_file);
+       const char *wakeup="WAKEUP sip:127.0.0.1 SIP/2.0\r\n"
+               "Via: SIP/2.0/UDP 127.0.0.1:%i;rport;branch=z9hG4bK%u\r\n"
+               "From: <sip:another_linphone@127.0.0.1>;tag=%u\r\n"
+               "To:   <sip:you@127.0.0.1>\r\n"
+               "CSeq: 1 WAKEUP\r\n"
+               "Call-ID: %u@onsantape\r\n"
+               "Content-length: 0\r\n\r\n";
+       const char * call = "REFER sip:127.0.0.1 SIP/2.0\r\n"
+               "Via: SIP/2.0/UDP 127.0.0.1:%i;rport;branch=z9hG4bK%u\r\n"
+               "From: <sip:another_linphone@127.0.0.1>;tag=%u\r\n"
+               "To:   <sip:you@127.0.0.1>\r\n"
+               "Refer-To: %s\r\n"
+               "CSeq: 1 WAKEUP\r\n"
+               "Call-ID: %u@onsantape\r\n"
+               "Content-length: 0\r\n\r\n";
+
+       /*make sure ortp is initialized (it initializes win32 socket api)*/
+       ortp_init();
+       if (port>0){
+               struct sockaddr_storage ss;
+               socklen_t sslen;
+               char tmp[100];
+               snprintf(tmp,sizeof(tmp),"127.0.0.1:%i",port);
+               if (parse_stun_server_addr(tmp,&ss,&sslen)==0){
+                       int locport=57123;
+                       ortp_socket_t sock=create_socket(locport);
+                       if (sock<0) sock=create_socket(++locport);
+                       if (sock>=0){
+                               char req[512];
+                               if (addr_to_call != NULL)
+                                       snprintf(req, sizeof(req), call, locport,
+                                       random(), random(), addr_to_call, random());
+                               else
+                                       snprintf(req, sizeof(req), wakeup, locport,
+                                       random(), random(), random());
+                               if (connect(sock,(struct sockaddr*)&ss,sslen)<0){
+                                       fprintf(stderr,"connect failed: %s\n",getSocketError());
+                               }else if (send(sock,req,strlen(req),0)>0){
+                                       /*wait a bit for a response*/
+                                       int i;
+                                       for(i=0;i<10;++i){
+                                               if (recv(sock,req,sizeof(req),0)>0){
+                                                       close_socket(sock);
+                                                       return 0;
+                                               }else if (getSocketErrorCode()!=EWOULDBLOCK){
+                                                       break;
+                                               }
+#ifdef WIN32
+                                               Sleep(100);
+#else
+                                               usleep(100000);
+#endif
+                                       }
+                               }else{
+                                       ms_message("sendto() of WAKEUP request failed, nobody to wakeup.");
+                               }
+                       }
+                       close_socket(sock);
+               }
+       }
+       return -1;
+}
+
+int linphone_core_get_local_ip_for(const char *dest, char *result){
+       int err,tmp;
+       struct addrinfo hints;
+       struct addrinfo *res=NULL;
+       struct sockaddr_storage addr;
+       struct sockaddr *p_addr=(struct sockaddr*)&addr;
+       ortp_socket_t sock;
+       socklen_t s;
+
+       memset(&hints,0,sizeof(hints));
+       hints.ai_family=PF_UNSPEC;
+       hints.ai_socktype=SOCK_DGRAM;
+       /*hints.ai_flags=AI_NUMERICHOST|AI_CANONNAME;*/
+       err=getaddrinfo(dest,"5060",&hints,&res);
+       if (err!=0){
+               ms_error("getaddrinfo() error: %s",gai_strerror(err));
+               return -1;
+       }
+       if (res==NULL){
+               ms_error("bug: getaddrinfo returned nothing.");
+               return -1;
+       }
+       sock=socket(res->ai_family,SOCK_DGRAM,0);
+       tmp=1;
+       err=setsockopt(sock,SOL_SOCKET,SO_REUSEADDR,(SOCKET_OPTION_VALUE)&tmp,sizeof(int));
+       if (err<0){
+               ms_warning("Error in setsockopt: %s",strerror(errno));
+       }
+       err=connect(sock,res->ai_addr,res->ai_addrlen);
+       if (err<0) {
+               ms_error("Error in connect: %s",strerror(errno));
+               freeaddrinfo(res);
+               close_socket(sock);
+               return -1;
+       }
+       freeaddrinfo(res);
+       res=NULL;
+       s=sizeof(addr);
+       err=getsockname(sock,(struct sockaddr*)&addr,&s);
+       if (err!=0) {
+               ms_error("Error in getsockname: %s",strerror(errno));
+               close_socket(sock);
+               return -1;
+       }
+       if (p_addr->sa_family==AF_INET){
+               struct sockaddr_in *p_sin=(struct sockaddr_in*)p_addr;
+               if (p_sin->sin_addr.s_addr==0){
+                       close_socket(sock);
+                       return -1;
+               }
+       }
+       err=getnameinfo((struct sockaddr *)&addr,s,result,LINPHONE_IPADDR_SIZE,NULL,0,NI_NUMERICHOST);
+       if (err!=0){
+               ms_error("getnameinfo error: %s",strerror(errno));
+       }
+       close_socket(sock);
+       ms_message("Local interface to reach %s is %s.",dest,result);
+       return 0;
+}
diff --git a/coreapi/plugins/buddylookup/AUTHORS b/coreapi/plugins/buddylookup/AUTHORS
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/coreapi/plugins/buddylookup/COPYING b/coreapi/plugins/buddylookup/COPYING
new file mode 100644 (file)
index 0000000..94a9ed0
--- /dev/null
@@ -0,0 +1,674 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  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
+them 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 prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  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.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey 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;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If 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 convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU 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 that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  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.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+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.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            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
+state 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) <year>  <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 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program 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, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU 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 Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/coreapi/plugins/buddylookup/ChangeLog b/coreapi/plugins/buddylookup/ChangeLog
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/coreapi/plugins/buddylookup/INSTALL b/coreapi/plugins/buddylookup/INSTALL
new file mode 100644 (file)
index 0000000..2550dab
--- /dev/null
@@ -0,0 +1,302 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008, 2009 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.
+
+  6. Often, you can also type `make uninstall' to remove the installed
+     files again.
+
+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.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+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.
+
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
+   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+   On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'.  It is recommended to use the following options:
+
+     ./configure --prefix=/boot/common
+
+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 all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
+
+`--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.
+
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *Note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
diff --git a/coreapi/plugins/buddylookup/Makefile.am b/coreapi/plugins/buddylookup/Makefile.am
new file mode 100644 (file)
index 0000000..27ce125
--- /dev/null
@@ -0,0 +1,34 @@
+SUBDIRS=src
+
+
+
+INSTALLDIR=$(shell cd $(top_builddir) && pwd)/$(PACKAGE)-install
+INSTALLDIR_WITH_PREFIX=$(INSTALLDIR)/$(prefix)
+ZIPFILE=$(shell cd $(top_builddir) && pwd)/$(PACKAGE)-win32-$(VERSION).zip
+ZIP_EXCLUDED=include 
+PLUGIN_DEPS_PREFIX=/usr/bin
+PLUGIN_DEPS=   libsoup-2.4-1.dll \
+               libgcrypt-11.dll \
+               libgnutls-extra-26.dll \
+               libgnutlsxx-26.dll \
+               libtasn1-3.dll \
+               libgnutls-26.dll \
+               libgnutls-openssl-26.dll \
+               libgpg-error-0.dll
+
+
+zip:
+       rm -f $(ZIPFILE)
+       rm -rf $(INSTALLDIR)
+       mkdir -p $(INSTALLDIR)
+       make install DESTDIR=$(INSTALLDIR)
+       mkdir -p $(INSTALLDIR_WITH_PREFIX)/bin
+       cd $(PLUGIN_DEPS_PREFIX) && \
+               cp -f $(PLUGIN_DEPS) $(INSTALLDIR_WITH_PREFIX)/bin/.
+       cd $(INSTALLDIR)/$(prefix) && rm -rf $(ZIP_EXCLUDED) && \
+       zip -r $(ZIPFILE) *
+
+clean-local:
+       rm -rf $(PACKAGE)-install
+       rm -f $(PACKAGE)-win32-$(VERSION).zip
+
diff --git a/coreapi/plugins/buddylookup/NEWS b/coreapi/plugins/buddylookup/NEWS
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/coreapi/plugins/buddylookup/README b/coreapi/plugins/buddylookup/README
new file mode 100644 (file)
index 0000000..7823425
--- /dev/null
@@ -0,0 +1,35 @@
+This plugin implements a buddy lookup using a xml-rpc lookup to a distant server.
+The server side implementation isn't available here but it is quite simple to implement.
+The format of the xml-rpc request defined below:
+
+The function name is "fp.searchUsers"
+ /**
+ * Arguments:
+ * sip_uri: string, mandatory, the SIP username, ie john.doe@example.net
+ * password: string, mandatory, the SIP password
+ * criteria: string, mandatory, the key or criteria to search for, multiple keywords should be space separated
+ * limit: int, optional default 100, the maximum number of results to get back, -1 for all of them (note that -1 would really be limited by a hard limit at the server, something decent in the style of 100 or similar).
+ * offset: int, optional default 0, where to start in the result list for the given criteria
+ * domain: string, optional default is the same name as the SIP name, in which domain to search for users
+ * 
+ * Returns:
+ * If sip-uri & password is correct, an array where each element is a struct with the following members:
+ * first_name: string, example: "John"
+ * last_name: string, example: "Doe"
+ * display_name: string, example: "John Doe"
+ * street: string, example: "Paradise Avenue"
+ * zip: string, example: "7777777"
+ * city: string, example: "Heaven"
+ * country: string, example: "SKY"
+ * email: string, example: "john.doe@example.net"
+ * sip: string, example "john.doe@example.net"
+ * domain: string, example: "myjoice.com"
+ * 
+ * If username || password is incorrect an error with a numeric code and a message is returned.
+ *
+ */
+
+The server uri is configurable in ~/.linphonerc :
+
+[BuddyLookup]
+url=https://....
diff --git a/coreapi/plugins/buddylookup/autogen.sh b/coreapi/plugins/buddylookup/autogen.sh
new file mode 100755 (executable)
index 0000000..cbe603e
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+AM_VERSION="1.10"
+if ! type aclocal-$AM_VERSION 1>/dev/null 2>&1; then
+       # automake-1.9 (recommended) is not available on Fedora 8
+       AUTOMAKE=automake
+       ACLOCAL=aclocal
+else
+       ACLOCAL=aclocal-${AM_VERSION}
+       AUTOMAKE=automake-${AM_VERSION}
+fi
+
+echo "Generating build scripts in buddylookup..."
+set -x
+libtoolize --copy --force
+autoheader
+$ACLOCAL 
+$AUTOMAKE --force-missing --add-missing --copy
+autoconf
diff --git a/coreapi/plugins/buddylookup/configure.ac b/coreapi/plugins/buddylookup/configure.ac
new file mode 100644 (file)
index 0000000..5e61343
--- /dev/null
@@ -0,0 +1,72 @@
+#                                               -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.61)
+AC_INIT(buddylookup, 0.0.1, simon dot morlat at linphone dot org)
+AC_CONFIG_SRCDIR([src/lookup.c])
+
+AM_INIT_AUTOMAKE([tar-ustar])
+
+AC_CANONICAL_SYSTEM
+
+case $target_os in
+       *mingw*)
+               mingw_found=yes
+       ;;
+esac
+
+AC_MSG_CHECKING([warning make an error on compilation])
+AC_ARG_ENABLE(strict,
+[  --enable-strict       Enable error on compilation warning [default=yes]],
+[wall_werror=$enableval],
+[wall_werror=yes]
+)
+
+dnl AC_CONFIG_HEADER([config.h])
+
+# Checks for programs.
+AC_PROG_CC
+dnl LT_INIT([disable-static])
+AC_DISABLE_STATIC
+AC_PROG_LIBTOOL
+
+
+
+AC_CONFIG_COMMANDS([libtool-hacking],[
+       if test "$mingw_found" = "yes" ; then
+               echo "Hacking libtool to work with mingw..."
+               sed -e 's/\*\" \$a_deplib \"\*/\*/' < ./libtool > libtool.tmp
+               cp -f ./libtool.tmp ./libtool
+               rm -f ./libtool.tmp
+       fi
+],[mingw_found=$mingw_found])
+
+# Checks for libraries.
+
+PKG_CHECK_MODULES(LIBSOUP, libsoup-2.4 >= 2.4.0)
+PKG_CHECK_MODULES(LIBLINPHONE, linphone >= 3.0.0)
+
+LINPHONE_PLUGINS_DIR="\$(libdir)/liblinphone/plugins/"
+AC_SUBST(LINPHONE_PLUGINS_DIR)
+
+# Checks for header files.
+
+# Checks for typedefs, structures, and compiler characteristics.
+
+# Checks for library functions.
+
+if test "$GCC" = "yes" ; then
+CFLAGS="$CFLAGS -Wall"
+LDFLAGS="$LDFLAGS -rdynamic "
+
+       if test $wall_werror = yes;  then
+               CFLAGS="$CFLAGS -Werror "
+       fi
+fi
+
+AM_CONDITIONAL(BUILD_WIN32, test x$mingw_found = xyes)
+
+AC_OUTPUT(
+Makefile
+src/Makefile
+)
diff --git a/coreapi/plugins/buddylookup/src/Makefile.am b/coreapi/plugins/buddylookup/src/Makefile.am
new file mode 100644 (file)
index 0000000..f965a9d
--- /dev/null
@@ -0,0 +1,20 @@
+pluginsdir=$(LINPHONE_PLUGINS_DIR)
+
+plugins_LTLIBRARIES=libbuddylookup.la
+
+libbuddylookup_la_SOURCES=lookup.c
+
+libbuddylookup_la_LIBADD=$(LIBSOUP_LIBS) $(LIBLINPHONE_LIBS) 
+
+libbuddylookup_la_LDFLAGS=-no-undefined
+
+AM_CFLAGS= $(LIBLINPHONE_CFLAGS) $(LIBSOUP_CFLAGS)
+
+if BUILD_WIN32
+#hack for mingw to force plugins dll to be where we want them to be.
+install-data-hook:
+       mv $(DESTDIR)$(pluginsdir)/../bin/libbuddylookup*.dll \
+       $(DESTDIR)$(pluginsdir)/.
+       rm -f $(DESTDIR)$(pluginsdir)/*.la
+       rm -f $(DESTDIR)$(pluginsdir)/*.dll.a
+endif
diff --git a/coreapi/plugins/buddylookup/src/lookup.c b/coreapi/plugins/buddylookup/src/lookup.c
new file mode 100644 (file)
index 0000000..ff6ef8b
--- /dev/null
@@ -0,0 +1,273 @@
+#ifdef IN_LINPHONE
+#include "linphonecore.h"
+#include "lpconfig.h"
+#else
+#include <linphone/linphonecore.h>
+#include <linphone/lpconfig.h>
+#endif
+#include <libsoup/soup.h>
+
+#define SERIALIZE_HTTPS 0
+
+static bool_t buddy_lookup_init(void){
+       return TRUE;
+};
+
+typedef struct _BLReq{
+       BuddyLookupRequest base;
+       SoupMessage *msg;
+       SoupSession *session;
+       ortp_thread_t th;
+}BLReq;
+
+
+void set_proxy(SoupSession *session, const char *proxy){
+       SoupURI *uri=soup_uri_new(proxy);
+       ms_message("Using http proxy %s",proxy);
+       g_object_set(G_OBJECT(session),"proxy-uri",uri,NULL);
+}
+
+static void buddy_lookup_instance_init(SipSetupContext *ctx){
+}
+
+static void buddy_lookup_instance_uninit(SipSetupContext *ctx){
+}
+
+static SoupMessage * build_xmlrpc_request(const char *identity, const char *password, const char *key, const char *domain, const char *url, int max_results){
+       SoupMessage * msg;
+
+       msg=soup_xmlrpc_request_new(url,
+                               "fp.searchUsers",
+                               G_TYPE_STRING, identity,
+                               G_TYPE_STRING, password ? password : "",
+                               G_TYPE_STRING, key,
+                               G_TYPE_INT , max_results,
+                               G_TYPE_INT , 0,
+                               G_TYPE_STRING, domain,
+                               G_TYPE_INVALID);
+       if (!msg){
+               ms_error("Fail to create SoupMessage !");
+       }else{
+               SoupBuffer *sb=soup_message_body_flatten(msg->request_body);
+               ms_message("This is the XML-RPC request we are going to send:\n%s\n",sb->data);
+               soup_buffer_free(sb);
+       }
+       return msg;
+}
+
+static void got_headers(BLReq *blreq, SoupMessage*msg){
+       ms_message("Got headers !");
+       blreq->base.status=BuddyLookupConnected;
+}
+
+static void fill_item(GHashTable *ht , const char *name, char *dest, size_t dest_size){
+       GValue *v=(GValue*)g_hash_table_lookup(ht,(gconstpointer)name);
+       if (v) {
+               const char *tmp=g_value_get_string(v);
+               if (tmp){
+                       strncpy(dest,tmp,dest_size-1);
+               }
+       }else ms_warning("no field named '%s'", name);
+}
+
+static void fill_buddy_info(BLReq *blreq, BuddyInfo *bi, GHashTable *ht){
+       char tmp[256];
+       fill_item(ht,"first_name",bi->firstname,sizeof(bi->firstname));
+       fill_item(ht,"last_name",bi->lastname,sizeof(bi->lastname));
+       fill_item(ht,"display_name",bi->displayname,sizeof(bi->displayname));
+       fill_item(ht,"sip",tmp,sizeof(tmp));
+       if (strstr(tmp,"sip:")==0){
+               snprintf(bi->sip_uri,sizeof(bi->sip_uri)-1,"sip:%s",tmp);
+       }else{
+               strncpy(bi->sip_uri,tmp,sizeof(bi->sip_uri)-1);
+       }
+       
+       fill_item(ht,"street",bi->address.street,sizeof(bi->address.street));
+       fill_item(ht,"zip",bi->address.zip,sizeof(bi->address.zip));
+       fill_item(ht,"city",bi->address.town,sizeof(bi->address.town));
+       fill_item(ht,"country",bi->address.country,sizeof(bi->address.country));
+       fill_item(ht,"email",bi->email,sizeof(bi->email));
+       tmp[0]='\0';
+       fill_item(ht,"image",tmp,sizeof(tmp));
+       if (tmp[0]!='\0'){
+               SoupMessage *msg;
+               guint status;
+               ms_message("This buddy has an image, let's download it: %s",tmp);
+               msg=soup_message_new("GET",tmp);
+               if ((status=soup_session_send_message(blreq->session,msg))==200){
+                       SoupMessageBody *body=msg->response_body;
+                       ms_message("Received %i bytes",body->length);
+                       strncpy(bi->image_type,"png",sizeof(bi->image_type));
+                       bi->image_length=body->length;
+                       bi->image_data=ms_malloc(body->length+4); /*add padding bytes*/
+                       memcpy(bi->image_data,body->data,bi->image_length);
+               }else{
+                       ms_error("Fail to fetch the image %i",status);
+               }
+       }
+       
+}
+
+static MSList * make_buddy_list(BLReq *blreq, GValue *retval){
+       MSList *ret=NULL;
+       if (G_VALUE_TYPE(retval)==G_TYPE_VALUE_ARRAY){
+               GValueArray *array=(GValueArray*)g_value_get_boxed(retval);
+               GValue *gelem;
+               int i;
+               for(i=0;i<array->n_values;++i){
+                       gelem=g_value_array_get_nth(array,i);
+                       if (G_VALUE_TYPE(gelem)==G_TYPE_HASH_TABLE){
+                               GHashTable *ht=(GHashTable*)g_value_get_boxed(gelem);
+                               BuddyInfo *bi=buddy_info_new();
+                               fill_buddy_info(blreq,bi,ht);
+                               ret=ms_list_append(ret,bi);
+                       }else{
+                               ms_error("Element is not a hash table");
+                       }
+               }
+       }else ms_error("Return value is not an array");
+       return ret;
+}
+
+
+static int xml_rpc_parse_response(BLReq *blreq, SoupMessage *sm){
+       SoupBuffer *sb;
+       GValue retval;
+       GError *error=NULL;
+       sb=soup_message_body_flatten(sm->response_body);
+       ms_message("This the xml-rpc response:\n%s\n",sb->data);
+       if (soup_xmlrpc_parse_method_response(sb->data,sb->length,&retval,&error)==FALSE){
+               if (error!=NULL){
+                       ms_error("xmlrpc fault: %s",error->message);
+                       g_error_free(error);
+               }else{
+                       ms_error("Could not parse xml-rpc response !");
+               }
+               blreq->base.status=BuddyLookupFailure;
+       }else{
+               ms_message("Extracting values from return type...");
+               blreq->base.results=make_buddy_list(blreq,&retval);
+               g_value_unset(&retval);
+               blreq->base.status=BuddyLookupDone;
+       }
+       soup_buffer_free(sb);
+       return blreq->base.status==BuddyLookupDone ? 0 : -1;
+}
+
+#if SERIALIZE_HTTPS
+/*on windows libsoup support for threads with gnutls is not yet functionnal (only in git)
+This will come in next release of libsoup, probably. 
+In the meantime, we are forced to serialize all soup https processing with a big
+ugly global mutex...*/
+
+static GStaticMutex big_mutex = G_STATIC_MUTEX_INIT;
+
+#endif
+
+static void * process_xml_rpc_request(void *up){
+       BLReq *blreq=(BLReq*)up;
+       SoupMessage *sm=blreq->msg;
+       int code;
+       g_signal_connect_swapped(G_OBJECT(sm),"got-headers",(GCallback)got_headers,blreq);
+       blreq->base.status=BuddyLookupConnecting;
+#if SERIALIZE_HTTPS
+       g_static_mutex_lock(&big_mutex);
+#endif
+       code=soup_session_send_message(blreq->session,sm);
+       if (code==200){
+               ms_message("Got a response from server, yeah !");
+               xml_rpc_parse_response(blreq,sm);
+       }else{
+               ms_error("request failed, error-code=%i (%s)",code,soup_status_get_phrase(code));
+               blreq->base.status=BuddyLookupFailure;
+       }
+#if SERIALIZE_HTTPS
+       g_static_mutex_unlock(&big_mutex);
+#endif
+       return NULL;
+}
+
+static int lookup_buddy(SipSetupContext *ctx, BLReq *req){
+       LinphoneProxyConfig *cfg=sip_setup_context_get_proxy_config(ctx);
+       LinphoneCore *lc=linphone_proxy_config_get_core(cfg);
+       LpConfig *config=linphone_core_get_config(lc);
+       const char *identity=linphone_proxy_config_get_identity(cfg);
+       const char *url=lp_config_get_string(config,"BuddyLookup","url",NULL);
+       LinphoneAuthInfo *aa;
+       SoupMessage *sm;
+       LinphoneAddress *from;
+       
+       if (url==NULL){
+               ms_error("No url defined for BuddyLookup in config file, aborting search.");
+               return -1;
+       }
+
+       from=linphone_address_new(identity);
+       if (from==NULL){
+               ms_error("Could not parse identity %s",identity);
+               return -1;
+       }
+       aa=linphone_core_find_auth_info(lc,linphone_address_get_domain(from),linphone_address_get_username(from));
+       if (aa) ms_message("There is a password: %s",aa->passwd);
+       else ms_message("No password for %s on %s",linphone_address_get_username(from),linphone_address_get_domain(from));
+       sm=build_xmlrpc_request(identity, aa ? aa->passwd : NULL, req->base.key, linphone_address_get_domain(from), url, req->base.max_results);
+       linphone_address_destroy(from);
+       req->msg=sm;
+       ortp_thread_create(&req->th,NULL,process_xml_rpc_request,req);
+       if (!sm) return -1;
+       return 0;
+}
+
+static BuddyLookupRequest * create_request(SipSetupContext *ctx){
+       BLReq *req=ms_new0(BLReq,1);
+       const char *proxy=NULL;
+       req->session=soup_session_sync_new();
+       proxy=getenv("http_proxy");
+       if (proxy && strlen(proxy)>0) set_proxy(req->session,proxy);
+       return (BuddyLookupRequest*)req;
+}
+
+static int submit_request(SipSetupContext *ctx, BuddyLookupRequest *req){
+       BLReq *blreq=(BLReq*)req;
+       return lookup_buddy(ctx,blreq);
+}
+
+static int free_request(SipSetupContext *ctx, BuddyLookupRequest *req){
+       BLReq *blreq=(BLReq*)req;
+       if (blreq->th!=0){
+               soup_session_cancel_message(blreq->session,blreq->msg, SOUP_STATUS_CANCELLED);
+               ortp_thread_join(blreq->th,NULL);
+               blreq->th=0;
+               g_object_unref(G_OBJECT(blreq->msg));
+       }
+       if (blreq->session)
+               g_object_unref(G_OBJECT(blreq->session));
+       buddy_lookup_request_free(req);
+       return 0;
+}
+
+static void buddy_lookup_exit(void){
+}
+
+static BuddyLookupFuncs bl_funcs={
+       .request_create=create_request,
+       .request_submit=submit_request,
+       .request_free=free_request
+};
+
+
+
+static SipSetup buddy_lookup_funcs={
+       .name="BuddyLookup",
+       .capabilities=SIP_SETUP_CAP_BUDDY_LOOKUP,
+       .init=buddy_lookup_init,
+       .init_instance=buddy_lookup_instance_init,
+       .uninit_instance=buddy_lookup_instance_uninit,
+       .exit=buddy_lookup_exit,
+       .buddy_lookup_funcs=&bl_funcs,
+};
+
+void libbuddylookup_init(){
+       sip_setup_register(&buddy_lookup_funcs);
+       ms_message("Buddylookup plugin registered.");
+}
diff --git a/coreapi/presence.c b/coreapi/presence.c
new file mode 100644 (file)
index 0000000..fc8f46b
--- /dev/null
@@ -0,0 +1,211 @@
+/*
+linphone
+Copyright (C) 2000  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#include "linphonecore.h"
+#include <eXosip2/eXosip.h>
+#include <osipparser2/osip_message.h>
+#include "private.h"
+
+
+extern const char *__policy_enum_to_str(LinphoneSubscribePolicy pol);
+
+
+void linphone_core_add_subscriber(LinphoneCore *lc, const char *subscriber, int did, int nid){
+       LinphoneFriend *fl=linphone_friend_new_with_addr(subscriber);
+       if (fl==NULL) return ;
+       fl->in_did=did;
+       linphone_friend_set_nid(fl,nid);
+       linphone_friend_set_inc_subscribe_policy(fl,LinphoneSPAccept);
+       fl->inc_subscribe_pending=TRUE;
+       lc->subscribers=ms_list_append(lc->subscribers,(void *)fl);
+       if (lc->vtable.new_unknown_subscriber!=NULL) {
+               char *subscriber=linphone_address_as_string(fl->uri);
+               lc->vtable.new_unknown_subscriber(lc,fl,subscriber);
+               ms_free(subscriber);
+       }
+}
+
+void linphone_core_reject_subscriber(LinphoneCore *lc, LinphoneFriend *lf){
+       linphone_friend_set_inc_subscribe_policy(lf,LinphoneSPDeny);
+}
+
+static void __do_notify(void * data, void * user_data){
+       int *tab=(int*)user_data;
+       LinphoneFriend *lf=(LinphoneFriend*)data;
+       linphone_friend_notify(lf,tab[0],tab[1]);
+}
+
+void __linphone_core_notify_all_friends(LinphoneCore *lc, int ss, int os){
+       int tab[2];
+       tab[0]=ss;
+       tab[1]=os;
+       ms_list_for_each2(lc->friends,__do_notify,(void *)tab);
+}
+
+void linphone_core_notify_all_friends(LinphoneCore *lc, LinphoneOnlineStatus os){
+       ms_message("Notifying all friends that we are in status %i",os);
+       __linphone_core_notify_all_friends(lc,EXOSIP_SUBCRSTATE_ACTIVE,os);
+}
+
+/* check presence state before answering to call; returns TRUE if we can proceed, else answer the appropriate answer
+to close the dialog*/
+bool_t linphone_core_check_presence(LinphoneCore *lc){
+       return TRUE;
+}
+
+void linphone_subscription_new(LinphoneCore *lc, eXosip_event_t *ev){
+       LinphoneFriend *lf=NULL;
+       osip_from_t *from=ev->request->from;
+       char *tmp;
+       osip_message_t *msg=NULL;
+       LinphoneAddress *uri;
+       osip_from_to_str(ev->request->from,&tmp);
+       uri=linphone_address_new(tmp);
+       ms_message("Receiving new subscription from %s.",tmp);
+       /* check if we answer to this subscription */
+       if (linphone_find_friend(lc->friends,uri,&lf)!=NULL){
+               lf->in_did=ev->did;
+               linphone_friend_set_nid(lf,ev->nid);
+               eXosip_insubscription_build_answer(ev->tid,202,&msg);
+               eXosip_insubscription_send_answer(ev->tid,202,msg);
+               __eXosip_wakeup_event();
+               linphone_friend_done(lf);       /*this will do all necessary actions */
+       }else{
+               /* check if this subscriber is in our black list */
+               if (linphone_find_friend(lc->subscribers,uri,&lf)){
+                       if (lf->pol==LinphoneSPDeny){
+                               ms_message("Rejecting %s because we already rejected it once.",from);
+                               eXosip_insubscription_send_answer(ev->tid,401,NULL);
+                       }
+                       else {
+                               /* else it is in wait for approval state, because otherwise it is in the friend list.*/
+                               ms_message("New subscriber found in friend list, in %s state.",__policy_enum_to_str(lf->pol));
+                       }
+               }else {
+                       eXosip_insubscription_build_answer(ev->tid,202,&msg);
+                       eXosip_insubscription_send_answer(ev->tid,202,msg);
+                       linphone_core_add_subscriber(lc,tmp,ev->did,ev->nid);
+               }
+       }
+       osip_free(tmp);
+}
+
+void linphone_notify_recv(LinphoneCore *lc, eXosip_event_t *ev)
+{
+       const char *status=_("Gone");
+       const char *img="sip-closed.png";
+       char *tmp;
+       LinphoneFriend *lf;
+       LinphoneAddress *friend=NULL;
+       osip_from_t *from=NULL;
+       osip_body_t *body=NULL;
+       LinphoneOnlineStatus estatus=LINPHONE_STATUS_UNKNOWN;
+       ms_message("Receiving notify with sid=%i,nid=%i",ev->sid,ev->nid);
+       if (ev->request!=NULL){
+               from=ev->request->from;
+               osip_message_get_body(ev->request,0,&body);
+               if (body==NULL){
+                       ms_error("No body in NOTIFY");
+                       return;
+               }
+               if (strstr(body->body,"pending")!=NULL){
+                       status=_("Waiting for Approval");
+                       img="sip-wfa.png";
+                       estatus=LINPHONE_STATUS_PENDING;
+               }else if ((strstr(body->body,"online")!=NULL) || (strstr(body->body,"open")!=NULL)) {
+                       status=_("Online");
+                       img="sip-online.png";
+                       estatus=LINPHONE_STATUS_ONLINE;
+               }else if (strstr(body->body,"busy")!=NULL){
+                       status=_("Busy");
+                       img="sip-busy.png";
+                       estatus=LINPHONE_STATUS_BUSY;
+               }else if (strstr(body->body,"berightback")!=NULL
+                               || strstr(body->body,"in-transit")!=NULL ){
+                       status=_("Be Right Back");
+                       img="sip-bifm.png";
+                       estatus=LINPHONE_STATUS_BERIGHTBACK;
+               }else if (strstr(body->body,"away")!=NULL){
+                       status=_("Away");
+                       img="sip-away.png";
+                       estatus=LINPHONE_STATUS_AWAY;
+               }else if (strstr(body->body,"onthephone")!=NULL
+                       || strstr(body->body,"on-the-phone")!=NULL){
+                       status=_("On The Phone");
+                       img="sip-otp.png";
+                       estatus=LINPHONE_STATUS_ONTHEPHONE;
+               }else if (strstr(body->body,"outtolunch")!=NULL
+                               || strstr(body->body,"meal")!=NULL){
+                       status=_("Out To Lunch");
+                       img="sip-otl.png";
+                       estatus=LINPHONE_STATUS_OUTTOLUNCH;
+               }else if (strstr(body->body,"closed")!=NULL){
+                       status=_("Closed");
+                       img="sip-away.png";
+                       estatus=LINPHONE_STATUS_CLOSED;
+               }else{
+                       status=_("Gone");
+                       img="sip-closed.png";
+                       estatus=LINPHONE_STATUS_OFFLINE;
+               }
+               ms_message("We are notified that sip:%s@%s has online status %s",from->url->username,from->url->host,status);
+       }
+       lf=linphone_find_friend_by_sid(lc->friends,ev->sid);
+       if (lf!=NULL){
+               friend=lf->uri;
+               tmp=linphone_address_as_string(friend);
+               lf->status=estatus;
+               lc->vtable.notify_recv(lc,(LinphoneFriend*)lf,tmp,status,img);
+               ms_free(tmp);
+               if (ev->ss_status==EXOSIP_SUBCRSTATE_TERMINATED) {
+                       lf->sid=-1;
+                       lf->out_did=-1;
+                       ms_message("Outgoing subscription terminated by remote.");
+               }
+       }else{
+               ms_message("But this person is not part of our friend list, so we don't care.");
+       }
+}
+
+void linphone_subscription_answered(LinphoneCore *lc, eXosip_event_t *ev){
+       LinphoneFriend *lf;
+       osip_from_t *from=ev->response->to;
+       char *tmp;
+       osip_from_to_str(from,&tmp);
+       LinphoneAddress *uri=linphone_address_new(tmp);
+       linphone_find_friend(lc->friends,uri,&lf);
+       if (lf!=NULL){
+               lf->out_did=ev->did;
+               linphone_friend_set_sid(lf,ev->sid);
+       }else{
+               ms_warning("Receiving answer for unknown subscribe sip:%s@%s", from->url->username,from->url->host);
+       }
+       ms_free(tmp);
+}
+void linphone_subscription_closed(LinphoneCore *lc,eXosip_event_t *ev){
+       LinphoneFriend *lf;
+       osip_from_t *from=ev->request->from;
+       lf=linphone_find_friend_by_nid(lc->friends,ev->nid);
+       if (lf!=NULL){
+               lf->in_did=-1;
+               linphone_friend_set_nid(lf,-1);
+       }else{
+               ms_warning("Receiving unsuscribe for unknown in-subscribtion from sip:%s@%s", from->url->username, from->url->host);
+       }
+}
diff --git a/coreapi/private.h b/coreapi/private.h
new file mode 100644 (file)
index 0000000..e9809dc
--- /dev/null
@@ -0,0 +1,197 @@
+/***************************************************************************
+ *            private.h
+ *
+ *  Mon Jun 13 14:23:23 2005
+ *  Copyright  2005  Simon Morlat
+ *  Email simon dot morlat at linphone dot org
+ ****************************************************************************/
+
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+#ifndef _PRIVATE_H
+#define _PRIVATE_H
+
+#include "linphonecore.h"
+#include <eXosip2/eXosip.h>
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#ifndef LIBLINPHONE_VERSION 
+#define LIBLINPHONE_VERSION LINPHONE_VERSION
+#endif
+
+#ifndef PACKAGE_SOUND_DIR 
+#define PACKAGE_SOUND_DIR "."
+#endif
+
+#ifdef HAVE_GETTEXT
+#include <libintl.h>
+#ifndef _
+#define _(String) gettext(String)
+#endif
+#else
+#ifndef _
+#define _(something)   (something)
+#endif
+#ifndef ngettext
+#define ngettext(singular, plural, number)     (((number)==1)?(singular):(plural))
+#endif
+#endif
+
+       
+typedef struct _StreamParams
+{
+       int initialized;
+       int line;
+       int localport;
+       int remoteport;
+       int remotertcpport;
+       int pt;
+       char *relay_session_id;
+       int natd_port;
+       char remoteaddr[LINPHONE_HOSTNAME_SIZE];
+       char natd_addr[LINPHONE_HOSTNAME_SIZE];
+} StreamParams;
+
+typedef enum _LCState{
+       LCStateInit,
+       LCStateRinging,
+       LCStateAVRunning
+}LCState;
+
+
+typedef struct _LinphoneCall
+{
+       struct _LinphoneCore *core;
+       StreamParams audio_params;
+       StreamParams video_params;
+       LinphoneCallDir dir;
+       struct _RtpProfile *profile;    /*points to the local_profile or to the remote "guessed" profile*/
+       struct _LinphoneCallLog *log;
+       int cid; /*call id */
+       int did; /*dialog id */
+       int tid; /*last transaction id*/
+       char localip[LINPHONE_IPADDR_SIZE]; /* our best guess for local ipaddress for this call */
+       struct _sdp_context *sdpctx;
+       time_t start_time; /*time at which the call was initiated*/
+       time_t media_start_time; /*time at which it was accepted, media streams established*/
+       LCState state;
+       bool_t auth_pending;
+       bool_t supports_session_timers;
+} LinphoneCall;
+
+LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to);
+LinphoneCall * linphone_call_new_incoming(struct _LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to, eXosip_event_t *ev);
+#define linphone_call_set_state(lcall,st)      (lcall)->state=(st)
+void linphone_call_destroy(struct _LinphoneCall *obj);
+
+/* private: */
+LinphoneCallLog * linphone_call_log_new(LinphoneCall *call, LinphoneAddress *local, LinphoneAddress * remote);
+void linphone_call_log_completed(LinphoneCallLog *calllog, LinphoneCall *call);
+void linphone_call_log_destroy(LinphoneCallLog *cl);
+
+
+void linphone_core_init_media_streams(LinphoneCore *lc);
+
+void linphone_auth_info_write_config(struct _LpConfig *config, LinphoneAuthInfo *obj, int pos);
+
+void linphone_core_update_proxy_register(LinphoneCore *lc);
+void linphone_core_refresh_subscribes(LinphoneCore *lc);
+
+int linphone_proxy_config_send_publish(LinphoneProxyConfig *cfg, LinphoneOnlineStatus os);
+
+int linphone_online_status_to_eXosip(LinphoneOnlineStatus os);
+
+void linphone_friend_set_sid(LinphoneFriend *lf, int sid);
+void linphone_friend_set_nid(LinphoneFriend *lf, int nid);
+void linphone_friend_notify(LinphoneFriend *lf, int ss, LinphoneOnlineStatus os);
+
+int set_lock_file();
+int get_lock_file();
+int remove_lock_file();
+int do_registration(LinphoneCore *lc, bool_t doit);
+void check_for_registration(LinphoneCore *lc);
+char *int2str(int number);
+int from_2char_without_params(osip_from_t *from,char **str);
+void check_sound_device(LinphoneCore *lc);
+void linphone_core_setup_local_rtp_profile(LinphoneCore *lc);
+void linphone_core_get_local_ip(LinphoneCore *lc, const char *to, char *result);
+bool_t host_has_ipv6_network();
+bool_t lp_spawn_command_line_sync(const char *command, char **result,int *command_ret);
+
+static inline int get_min_bandwidth(int dbw, int ubw){
+       if (dbw<0) return ubw;
+       if (ubw<0) return dbw;
+       return MIN(dbw,ubw);
+}
+
+static inline bool_t bandwidth_is_greater(int bw1, int bw2){
+       if (bw1<0) return TRUE;
+       else if (bw2<0) return FALSE;
+       else return bw1>=bw2;
+}
+
+static inline void set_string(char **dest, const char *src){
+       if (*dest){
+               ms_free(*dest);
+               *dest=NULL;
+       }
+       if (src)
+               *dest=ms_strdup(src);
+}
+
+#define PAYLOAD_TYPE_ENABLED   PAYLOAD_TYPE_USER_FLAG_0
+bool_t linphone_proxy_config_register_again_with_updated_contact(LinphoneProxyConfig *obj, osip_message_t *orig_request, osip_message_t *last_answer);
+void linphone_process_authentication(LinphoneCore* lc, eXosip_event_t *ev);
+void linphone_authentication_ok(LinphoneCore *lc, eXosip_event_t *ev);
+void linphone_subscription_new(LinphoneCore *lc, eXosip_event_t *ev);
+void linphone_notify_recv(LinphoneCore *lc,eXosip_event_t *ev);
+LinphoneProxyConfig *linphone_core_get_proxy_config_from_rid(LinphoneCore *lc, int rid);
+void linphone_proxy_config_process_authentication_failure(LinphoneCore *lc, eXosip_event_t *ev);
+
+void linphone_subscription_answered(LinphoneCore *lc, eXosip_event_t *ev);
+void linphone_subscription_closed(LinphoneCore *lc, eXosip_event_t *ev);
+
+void linphone_call_init_media_params(LinphoneCall *call);
+
+void linphone_set_sdp(osip_message_t *sip, const char *sdp);
+
+MSList *linphone_find_friend(MSList *fl, const LinphoneAddress *fri, LinphoneFriend **lf);
+LinphoneFriend *linphone_find_friend_by_nid(MSList *l, int nid);
+LinphoneFriend *linphone_find_friend_by_sid(MSList *l, int sid);
+
+void linphone_core_update_allocated_audio_bandwidth(LinphoneCore *lc);
+void linphone_core_update_allocated_audio_bandwidth_in_call(LinphoneCore *lc, const PayloadType *pt);
+void linphone_core_run_stun_tests(LinphoneCore *lc, LinphoneCall *call);
+
+void linphone_core_write_friends_config(LinphoneCore* lc);
+void linphone_friend_write_to_config_file(struct _LpConfig *config, LinphoneFriend *lf, int index);
+LinphoneFriend * linphone_friend_new_from_config_file(struct _LinphoneCore *lc, int index);
+
+void linphone_proxy_config_update(LinphoneProxyConfig *cfg);
+void linphone_proxy_config_get_contact(LinphoneProxyConfig *cfg, const char **ip, int *port);
+LinphoneProxyConfig * linphone_core_lookup_known_proxy(LinphoneCore *lc, const LinphoneAddress *uri);
+int linphone_core_get_local_ip_for(const char *dest, char *result);
+
+LinphoneProxyConfig *linphone_proxy_config_new_from_config_file(struct _LpConfig *config, int index);
+void linphone_proxy_config_write_to_config_file(struct _LpConfig* config,LinphoneProxyConfig *obj, int index);
+
+int linphone_proxy_config_normalize_number(LinphoneProxyConfig *cfg, const char *username, char *result, size_t result_len);
+
+#endif /* _PRIVATE_H */
diff --git a/coreapi/proxy.c b/coreapi/proxy.c
new file mode 100644 (file)
index 0000000..b836feb
--- /dev/null
@@ -0,0 +1,992 @@
+/*
+linphone
+Copyright (C) 2000  Simon MORLAT (simon.morlat@linphone.org)
+*/
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+#include "linphonecore.h"
+#include "sipsetup.h"
+#include <eXosip2/eXosip.h>
+#include <osipparser2/osip_message.h>
+#include "lpconfig.h"
+#include "private.h"
+
+
+#include <ctype.h>
+
+
+void linphone_proxy_config_write_all_to_config_file(LinphoneCore *lc){
+       MSList *elem;
+       int i;
+       for(elem=lc->sip_conf.proxies,i=0;elem!=NULL;elem=ms_list_next(elem),i++){
+               LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
+               linphone_proxy_config_write_to_config_file(lc->config,cfg,i);
+       }
+}
+
+void linphone_proxy_config_init(LinphoneProxyConfig *obj){
+       memset(obj,0,sizeof(LinphoneProxyConfig));
+       obj->rid=-1;
+       obj->expires=3600;
+}
+
+/**
+ * @addtogroup proxies
+ * @{
+**/
+
+/**
+ * Creates an empty proxy config.
+**/
+LinphoneProxyConfig *linphone_proxy_config_new(){
+       LinphoneProxyConfig *obj=NULL;
+       obj=ms_new(LinphoneProxyConfig,1);
+       linphone_proxy_config_init(obj);
+       return obj;
+}
+
+/**
+ * Destroys a proxy config.
+ * 
+ * @note: LinphoneProxyConfig that have been removed from LinphoneCore with
+ * linphone_core_remove_proxy_config() must not be freed.
+**/
+void linphone_proxy_config_destroy(LinphoneProxyConfig *obj){
+       if (obj->reg_proxy!=NULL) ms_free(obj->reg_proxy);
+       if (obj->reg_identity!=NULL) ms_free(obj->reg_identity);
+       if (obj->reg_route!=NULL) ms_free(obj->reg_route);
+       if (obj->ssctx!=NULL) sip_setup_context_free(obj->ssctx);
+       if (obj->realm!=NULL) ms_free(obj->realm);
+       if (obj->type!=NULL) ms_free(obj->type);
+       if (obj->contact_addr!=NULL) ms_free(obj->contact_addr);
+       if (obj->dial_prefix!=NULL) ms_free(obj->dial_prefix);
+}
+
+/**
+ * Returns a boolean indicating that the user is sucessfully registered on the proxy.
+**/
+bool_t linphone_proxy_config_is_registered(const LinphoneProxyConfig *obj){
+       return obj->registered;
+}
+
+void linphone_proxy_config_get_contact(LinphoneProxyConfig *cfg, const char **ip, int *port){
+       if (cfg->registered){
+               *ip=cfg->contact_addr;
+               *port=cfg->contact_port;
+       }else{
+               *ip=NULL;
+               *port=0;
+       }
+}
+
+static void update_contact(LinphoneProxyConfig *cfg, const char *ip, const char *port){
+       if (cfg->contact_addr){
+               ms_free(cfg->contact_addr);
+       }
+       cfg->contact_addr=ms_strdup(ip);
+       if (port!=NULL)
+               cfg->contact_port=atoi(port);
+       else cfg->contact_port=5060;
+}
+
+bool_t linphone_proxy_config_register_again_with_updated_contact(LinphoneProxyConfig *obj, osip_message_t *orig_request, osip_message_t *last_answer){
+       osip_message_t *msg;
+       const char *rport,*received;
+       osip_via_t *via=NULL;
+       osip_generic_param_t *param=NULL;
+       osip_contact_t *ctt=NULL;
+       osip_message_get_via(last_answer,0,&via);
+       if (!via) return FALSE;
+       osip_via_param_get_byname(via,"rport",&param);
+       if (param) rport=param->gvalue;
+       else return FALSE;
+       param=NULL;
+       osip_via_param_get_byname(via,"received",&param);
+       if (param) received=param->gvalue;
+       else return FALSE;
+       osip_message_get_contact(orig_request,0,&ctt);
+       if (strcmp(ctt->url->host,received)==0){
+               /*ip address matches, check ports*/
+               const char *contact_port=ctt->url->port;
+               const char *via_rport=rport;
+               if (via_rport==NULL || strlen(via_rport)>0)
+                       via_rport="5060";
+               if (contact_port==NULL || strlen(contact_port)>0)
+                       contact_port="5060";
+               if (strcmp(contact_port,via_rport)==0){
+                       ms_message("Register has up to date contact, doing nothing.");
+                       return FALSE;
+               }else ms_message("ports do not match, need to update the register (%s <> %s)", contact_port,via_rport);
+       }
+       eXosip_lock();
+       msg=NULL;
+       eXosip_register_build_register(obj->rid,obj->expires,&msg);
+       if (msg==NULL){
+               eXosip_unlock();
+               ms_warning("Fail to create a contact updated register.");
+               return FALSE;
+       }
+       osip_message_get_contact(msg,0,&ctt);
+       if (ctt->url->host!=NULL){
+               osip_free(ctt->url->host);
+       }
+       ctt->url->host=osip_strdup(received);
+       if (ctt->url->port!=NULL){
+               osip_free(ctt->url->port);
+       }
+       ctt->url->port=osip_strdup(rport);
+       eXosip_register_send_register(obj->rid,msg);
+       eXosip_unlock();
+       update_contact(obj,received,rport);
+       ms_message("Resending new register with updated contact %s:%s",received,rport);
+       return TRUE;
+}
+
+/**
+ * Sets the proxy address
+ *
+ * Examples of valid sip proxy address are:
+ * - IP address: sip:87.98.157.38
+ * - IP address with port: sip:87.98.157.38:5062
+ * - hostnames : sip:sip.example.net
+**/
+int linphone_proxy_config_set_server_addr(LinphoneProxyConfig *obj, const char *server_addr){
+       int err;
+       osip_from_t *url;
+       if (obj->reg_proxy!=NULL) ms_free(obj->reg_proxy);
+       obj->reg_proxy=NULL;
+       if (server_addr!=NULL && strlen(server_addr)>0){
+               osip_from_init(&url);
+               err=osip_from_parse(url,server_addr);
+               if (err==0 && url->url->host!=NULL){
+                       obj->reg_proxy=ms_strdup(server_addr);
+               }else{
+                       ms_warning("Could not parse %s",server_addr);
+               }
+               osip_from_free(url);
+       }
+       return 0;
+}
+
+/**
+ * Sets the user identity as a SIP address.
+ *
+ * This identity is normally formed with display name, username and domain, such 
+ * as:
+ * Alice <sip:alice@example.net>
+ * The REGISTER messages will have from and to set to this identity.
+ *
+**/
+void linphone_proxy_config_set_identity(LinphoneProxyConfig *obj, const char *identity){
+       int err=0;
+       osip_from_t *url=NULL;
+       if (identity!=NULL && strlen(identity)>0){
+               osip_from_init(&url);
+               err=osip_from_parse(url,identity);
+               if (err<0 || url->url->host==NULL || url->url->username==NULL){
+                       ms_warning("Could not parse %s",identity);
+                       osip_from_free(url);
+                       return;
+               }
+       } else err=-2;
+       if (obj->reg_identity!=NULL) {
+               ms_free(obj->reg_identity);
+               obj->reg_identity=NULL;
+       }
+       if (err==-2) obj->reg_identity=NULL;
+       else {
+               obj->reg_identity=ms_strdup(identity);
+               if (obj->realm)
+                       ms_free(obj->realm);
+               obj->realm=ms_strdup(url->url->host);
+       }
+       if (url) osip_from_free(url);
+}
+
+const char *linphone_proxy_config_get_domain(const LinphoneProxyConfig *cfg){
+       return cfg->realm;
+}
+
+/**
+ * Sets a SIP route.
+ * When a route is set, all outgoing calls will go to the route's destination if this proxy
+ * is the default one (see linphone_core_set_default_proxy() ).
+**/
+void linphone_proxy_config_set_route(LinphoneProxyConfig *obj, const char *route)
+{
+       int err;
+       osip_uri_param_t *lr_param=NULL;
+       osip_route_t *rt=NULL;
+       char *tmproute=NULL;
+       if (route!=NULL && strlen(route)>0){
+               osip_route_init(&rt);
+               err=osip_route_parse(rt,route);
+               if (err<0){
+                       ms_warning("Could not parse %s",route);
+                       osip_route_free(rt);
+                       return ;
+               }
+               if (obj->reg_route!=NULL) {
+                       ms_free(obj->reg_route);
+                       obj->reg_route=NULL;
+               }
+                       
+               /* check if the lr parameter is set , if not add it */
+               osip_uri_uparam_get_byname(rt->url, "lr", &lr_param);
+               if (lr_param==NULL){
+                       osip_uri_uparam_add(rt->url,osip_strdup("lr"),NULL);
+                       osip_route_to_str(rt,&tmproute);
+                       obj->reg_route=ms_strdup(tmproute);
+                       osip_free(tmproute);
+               }else obj->reg_route=ms_strdup(route);
+       }else{
+               if (obj->reg_route!=NULL) ms_free(obj->reg_route);
+               obj->reg_route=NULL;
+       }
+}
+
+bool_t linphone_proxy_config_check(LinphoneCore *lc, LinphoneProxyConfig *obj){
+       if (obj->reg_proxy==NULL){
+               if (lc->vtable.display_warning)
+                       lc->vtable.display_warning(lc,_("The sip proxy address you entered is invalid, it must start with \"sip:\""
+                                               " followed by a hostname."));
+               return FALSE;
+       }
+       if (obj->reg_identity==NULL){
+               if (lc->vtable.display_warning)
+                       lc->vtable.display_warning(lc,_("The sip identity you entered is invalid.\nIt should look like "
+                                       "sip:username@proxydomain, such as sip:alice@example.net"));
+               return FALSE;
+       }
+       return TRUE;
+}
+
+/**
+ * Indicates whether a REGISTER request must be sent to the proxy.
+**/
+void linphone_proxy_config_enableregister(LinphoneProxyConfig *obj, bool_t val){
+       obj->reg_sendregister=val;
+}
+
+/**
+ * Sets the registration expiration time in seconds.
+**/
+void linphone_proxy_config_expires(LinphoneProxyConfig *obj, int val){
+       if (val<=0) val=600;
+       obj->expires=val;
+}
+
+void linphone_proxy_config_enable_publish(LinphoneProxyConfig *obj, bool_t val){
+       obj->publish=val;
+}
+
+/**
+ * Starts editing a proxy configuration.
+ *
+ * Because proxy configuration must be consistent, applications MUST
+ * call linphone_proxy_config_edit() before doing any attempts to modify
+ * proxy configuration (such as identity, proxy address and so on).
+ * Once the modifications are done, then the application must call
+ * linphone_proxy_config_done() to commit the changes.
+**/
+void linphone_proxy_config_edit(LinphoneProxyConfig *obj){
+       obj->auth_failures=0;
+       if (obj->reg_sendregister){
+               /* unregister */
+               if (obj->registered) {
+                       osip_message_t *msg;
+                       eXosip_lock();
+                       eXosip_register_build_register(obj->rid,0,&msg);
+                       eXosip_register_send_register(obj->rid,msg);
+                       eXosip_unlock();
+                       obj->registered=FALSE;
+               }
+       }
+}
+
+void linphone_proxy_config_apply(LinphoneProxyConfig *obj,LinphoneCore *lc)
+{
+       obj->lc=lc;
+       linphone_proxy_config_done(obj);
+}
+
+static void linphone_proxy_config_register(LinphoneProxyConfig *obj){
+       const char *id_str;
+       if (obj->reg_identity!=NULL) id_str=obj->reg_identity;
+       else id_str=linphone_core_get_primary_contact(obj->lc);
+       if (obj->reg_sendregister){
+               char *ct=NULL;
+               osip_message_t *msg=NULL;
+               eXosip_lock();
+               obj->rid=eXosip_register_build_initial_register(id_str,obj->reg_proxy,NULL,obj->expires,&msg);
+               eXosip_register_send_register(obj->rid,msg);
+               eXosip_unlock();
+               if (ct!=NULL) osip_free(ct);
+       }
+}
+
+
+/**
+ * Sets a dialing prefix to be automatically prepended when inviting a number with 
+ * #linphone_core_invite.
+ *
+**/
+void linphone_proxy_config_set_dial_prefix(LinphoneProxyConfig *cfg, const char *prefix){
+       if (cfg->dial_prefix!=NULL){
+               ms_free(cfg->dial_prefix);
+               cfg->dial_prefix=NULL;
+       }
+       if (prefix) cfg->dial_prefix=ms_strdup(prefix);
+}
+
+/**
+ * Returns dialing prefix.
+ *
+ * 
+**/
+const char *linphone_proxy_config_get_dial_prefix(const LinphoneProxyConfig *cfg){
+       return cfg->dial_prefix;
+}
+
+/**
+ * Sets whether liblinphone should replace "+" by "00" in dialed numbers (passed to
+ * #linphone_core_invite ).
+ *
+**/
+void linphone_proxy_config_set_dial_escape_plus(LinphoneProxyConfig *cfg, bool_t val){
+       cfg->dial_escape_plus=val;
+}
+
+/**
+ * Returns whether liblinphone should replace "+" by "00" in dialed numbers (passed to
+ * #linphone_core_invite ).
+ *
+**/
+bool_t linphone_proxy_config_get_dial_escape_plus(const LinphoneProxyConfig *cfg){
+       return cfg->dial_escape_plus;
+}
+
+
+static bool_t is_a_phone_number(const char *username){
+       const char *p;
+       for(p=username;*p!='\0';++p){
+               if (isdigit(*p) || 
+                   *p==' ' ||
+                   *p=='-' ||
+                   *p==')' ||
+                       *p=='(' ||
+                       *p=='/' ||
+                       *p=='+') continue;
+               else return FALSE;
+       }
+       return TRUE;
+}
+
+static char *flatten_number(const char *number){
+       char *result=ms_malloc0(strlen(number)+1);
+       char *w=result;
+       const char *r;
+       for(r=number;*r!='\0';++r){
+               if (*r=='+' || isdigit(*r)){
+                       *w++=*r;
+               }
+       }
+       *w++='\0';
+       return result;
+}
+
+static void copy_result(const char *src, char *dest, size_t destlen, bool_t escape_plus){
+       int i=0;
+       
+       if (escape_plus && src[0]=='+' && destlen>2){
+               dest[0]='0';
+               dest[1]='0';
+               src++;
+               i=2;
+       }
+       
+       for(;i<destlen-1;++i){
+               dest[i]=*src;
+               src++;
+       }
+       dest[i]='\0';
+}
+
+
+static char *append_prefix(const char *number, const char *prefix){
+       char *res=ms_malloc(strlen(number)+strlen(prefix)+1);
+       strcpy(res,prefix);
+       return strcat(res,number);
+}
+
+int linphone_proxy_config_normalize_number(LinphoneProxyConfig *proxy, const char *username, char *result, size_t result_len){
+       char *flatten;
+       int numlen;
+       if (is_a_phone_number(username)){
+               flatten=flatten_number(username);
+               ms_message("Flattened number is '%s'",flatten);
+               numlen=strlen(flatten);
+               if (numlen>10 || flatten[0]=='+' || proxy->dial_prefix==NULL){
+                       ms_message("No need to add a prefix");
+                       /* prefix is already there */
+                       copy_result(flatten,result,result_len,proxy->dial_escape_plus);
+                       ms_free(flatten);
+                       return 0;
+               }else if (proxy->dial_prefix){
+                       char *prefixed;
+                       int skipped=0;
+                       ms_message("Need to prefix with %s",proxy->dial_prefix);
+                       if (numlen==10){
+                               /*remove initial number before prepending prefix*/
+                               skipped=1;
+                       }
+                       prefixed=append_prefix(flatten+skipped,proxy->dial_prefix);
+                       ms_free(flatten);
+                       copy_result(prefixed,result,result_len,proxy->dial_escape_plus);
+                       ms_free(prefixed);
+               }
+       }else strncpy(result,username,result_len);
+       return 0;
+}
+
+/**
+ * Commits modification made to the proxy configuration.
+**/
+int linphone_proxy_config_done(LinphoneProxyConfig *obj)
+{
+       if (!linphone_proxy_config_check(obj->lc,obj)) return -1;
+       obj->commit=TRUE;
+       linphone_proxy_config_write_all_to_config_file(obj->lc);
+       return 0;
+}
+
+void linphone_proxy_config_set_realm(LinphoneProxyConfig *cfg, const char *realm)
+{
+       if (cfg->realm!=NULL) {
+               ms_free(cfg->realm);
+               cfg->realm=NULL;
+       }
+       if (realm!=NULL) cfg->realm=ms_strdup(realm);
+}
+
+int linphone_proxy_config_send_publish(LinphoneProxyConfig *proxy,
+                              LinphoneOnlineStatus presence_mode)
+{
+  osip_message_t *pub;
+  int i;
+  const char *from=NULL;
+  char buf[5000];
+
+  if (proxy->publish==FALSE) return 0;
+       
+  if (proxy!=NULL) {
+    from=linphone_proxy_config_get_identity(proxy);
+  }
+  if (from==NULL) from=linphone_core_get_primary_contact(proxy->lc);
+
+  if (presence_mode==LINPHONE_STATUS_ONLINE)
+    {
+      snprintf(buf, 5000, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
+<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
+          entity=\"%s\">\n\
+<tuple id=\"sg89ae\">\n\
+<status>\n\
+<basic>open</basic>\n\
+</status>\n\
+<contact priority=\"0.8\">%s</contact>\n\
+<note>online</note>\n\
+</tuple>\n\
+</presence>",
+              from, from);
+    }
+  else if (presence_mode==LINPHONE_STATUS_BUSY
+          ||presence_mode==LINPHONE_STATUS_NOT_DISTURB)
+    {
+      snprintf(buf, 5000, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
+<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
+          xmlns:es=\"urn:ietf:params:xml:ns:pidf:status:rpid-status\"\n\
+          entity=\"%s\">\n\
+<tuple id=\"sg89ae\">\n\
+<status>\n\
+<basic>open</basic>\n\
+<es:activities>\n\
+  <es:activity>busy</es:activity>\n\
+</es:activities>\n\
+</status>\n\
+<contact priority=\"0.8\">%s</contact>\n\
+<note>busy</note>\n\
+</tuple>\n\
+</presence>",
+             from, from);
+    }
+  else if (presence_mode==LINPHONE_STATUS_BERIGHTBACK)
+    {
+      snprintf(buf, 5000, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
+<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
+          xmlns:es=\"urn:ietf:params:xml:ns:pidf:status:rpid-status\"\n\
+          entity=\"%s\">\n\
+<tuple id=\"sg89ae\">\n\
+<status>\n\
+<basic>open</basic>\n\
+<es:activities>\n\
+  <es:activity>in-transit</es:activity>\n\
+</es:activities>\n\
+</status>\n\
+<contact priority=\"0.8\">%s</contact>\n\
+<note>be right back</note>\n\
+</tuple>\n\
+</presence>",
+             from,from);
+    }
+  else if (presence_mode==LINPHONE_STATUS_AWAY
+          ||presence_mode==LINPHONE_STATUS_MOVED
+          ||presence_mode==LINPHONE_STATUS_ALT_SERVICE)
+    {
+      snprintf(buf, 5000, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
+<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
+          xmlns:es=\"urn:ietf:params:xml:ns:pidf:status:rpid-status\"\n\
+          entity=\"%s\">\n\
+<tuple id=\"sg89ae\">\n\
+<status>\n\
+<basic>open</basic>\n\
+<es:activities>\n\
+  <es:activity>away</es:activity>\n\
+</es:activities>\n\
+</status>\n\
+<contact priority=\"0.8\">%s</contact>\n\
+<note>away</note>\n\
+</tuple>\n\
+</presence>",
+             from, from);
+    }
+  else if (presence_mode==LINPHONE_STATUS_ONTHEPHONE)
+    {
+      snprintf(buf, 5000, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
+<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
+          xmlns:es=\"urn:ietf:params:xml:ns:pidf:status:rpid-status\"\n\
+          entity=\"%s\">\n\
+<tuple id=\"sg89ae\">\n\
+<status>\n\
+<basic>open</basic>\n\
+<es:activities>\n\
+  <es:activity>on-the-phone</es:activity>\n\
+</es:activities>\n\
+</status>\n\
+<contact priority=\"0.8\">%s</contact>\n\
+<note>on the phone</note>\n\
+</tuple>\n\
+</presence>",
+             from, from);
+    }
+  else if (presence_mode==LINPHONE_STATUS_OUTTOLUNCH)
+    {
+      snprintf(buf, 5000, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
+<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
+          xmlns:es=\"urn:ietf:params:xml:ns:pidf:status:rpid-status\"\n\
+          entity=\"%s\">\n\
+<tuple id=\"sg89ae\">\n\
+<status>\n\
+<basic>open</basic>\n\
+<es:activities>\n\
+  <es:activity>meal</es:activity>\n\
+</es:activities>\n\
+</status>\n\
+<contact priority=\"0.8\">%s</contact>\n\
+<note>out to lunch</note>\n\
+</tuple>\n\
+</presence>",
+             from, from);
+    }
+  else if (presence_mode==LINPHONE_STATUS_OFFLINE)
+    {
+      /* */
+      snprintf(buf, 5000, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
+<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
+xmlns:es=\"urn:ietf:params:xml:ns:pidf:status:rpid-status\"\n\
+entity=\"%s\">\n%s",
+             from,
+"<tuple id=\"sg89ae\">\n\
+<status>\n\
+<basic>closed</basic>\n\
+<es:activities>\n\
+  <es:activity>permanent-absence</e:activity>\n\
+</es:activities>\n\
+</status>\n\
+</tuple>\n\
+\n</presence>\n");
+    }
+
+  i = eXosip_build_publish(&pub, (char *)from, (char *)from, NULL, "presence", "1800", "application/pidf+xml", buf);
+
+  if (i<0)
+    {
+      ms_message("Failed to build publish request.");
+      return -1;
+    }
+
+  eXosip_lock();
+  i = eXosip_publish(pub, from); /* should update the sip-if-match parameter
+                                   from sip-etag  from last 200ok of PUBLISH */
+  eXosip_unlock();
+  if (i<0)
+    {
+      ms_message("Failed to send publish request.");
+      return -1;
+    }
+  return 0;
+}
+
+
+/**
+ * Add a proxy configuration.
+ * This will start registration on the proxy, if registration is enabled.
+**/
+int linphone_core_add_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *cfg){
+       if (!linphone_proxy_config_check(lc,cfg)) return -1;
+       lc->sip_conf.proxies=ms_list_append(lc->sip_conf.proxies,(void *)cfg);
+       linphone_proxy_config_apply(cfg,lc);
+       return 0;
+}
+
+extern void linphone_friend_check_for_removed_proxy(LinphoneFriend *lf, LinphoneProxyConfig *cfg);
+
+/**
+ * Removes a proxy configuration.
+ *
+ * LinphoneCore will then automatically unregister and place the proxy configuration
+ * on a deleted list. For that reason, a removed proxy does NOT need to be freed.
+**/
+void linphone_core_remove_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *cfg){
+       MSList *elem;
+       lc->sip_conf.proxies=ms_list_remove(lc->sip_conf.proxies,(void *)cfg);
+       /* add to the list of destroyed proxies, so that the possible unREGISTER request can succeed authentication */
+       lc->sip_conf.deleted_proxies=ms_list_append(lc->sip_conf.deleted_proxies,(void *)cfg);
+       /* this will unREGISTER */
+       linphone_proxy_config_edit(cfg);
+       if (lc->default_proxy==cfg){
+               lc->default_proxy=NULL;
+       }
+       /* invalidate all references to this proxy in our friend list */
+       for (elem=lc->friends;elem!=NULL;elem=ms_list_next(elem)){
+               linphone_friend_check_for_removed_proxy((LinphoneFriend*)elem->data,cfg);
+       }
+       
+}
+/**
+ * Erase all proxies from config.
+ *
+ * @ingroup proxy
+**/
+void linphone_core_clear_proxy_config(LinphoneCore *lc){
+       MSList* list=ms_list_copy(linphone_core_get_proxy_config_list((const LinphoneCore*)lc));
+       for(;list!=NULL;list=list->next){
+               linphone_core_remove_proxy_config(lc,(LinphoneProxyConfig *)list->data);
+       }
+       ms_list_free(list);
+}
+/**
+ * Sets the default proxy.
+ *
+ * This default proxy must be part of the list of already entered LinphoneProxyConfig.
+ * Toggling it as default will make LinphoneCore use the identity associated with
+ * the proxy configuration in all incoming and outgoing calls.
+**/
+void linphone_core_set_default_proxy(LinphoneCore *lc, LinphoneProxyConfig *config){
+       /* check if this proxy is in our list */
+       if (config!=NULL){
+               if (ms_list_find(lc->sip_conf.proxies,config)==NULL){
+                       ms_warning("Bad proxy address: it is not in the list !");
+                       lc->default_proxy=NULL;
+                       return ;
+               }
+       }
+       lc->default_proxy=config;
+       
+}      
+
+void linphone_core_set_default_proxy_index(LinphoneCore *lc, int index){
+       if (index<0) linphone_core_set_default_proxy(lc,NULL);
+       else linphone_core_set_default_proxy(lc,ms_list_nth_data(lc->sip_conf.proxies,index));
+}
+
+/**
+ * Returns the default proxy configuration, that is the one used to determine the current identity.
+**/
+int linphone_core_get_default_proxy(LinphoneCore *lc, LinphoneProxyConfig **config){
+       int pos=-1;
+       if (config!=NULL) *config=lc->default_proxy;
+       if (lc->default_proxy!=NULL){
+               pos=ms_list_position(lc->sip_conf.proxies,ms_list_find(lc->sip_conf.proxies,(void *)lc->default_proxy));
+       }
+       return pos;
+}
+
+static int rid_compare(const void *pcfg,const void *prid){
+       const LinphoneProxyConfig *cfg=(const LinphoneProxyConfig*)pcfg;
+       const int *rid=(const int*)prid;
+       ms_message("cfg= %s, cfg->rid=%i, rid=%i",cfg->reg_proxy, cfg->rid, *rid);
+       return cfg->rid-(*rid);
+}
+
+LinphoneProxyConfig *linphone_core_get_proxy_config_from_rid(LinphoneCore *lc, int rid){
+       MSList *elem=ms_list_find_custom(lc->sip_conf.proxies,rid_compare, &rid);
+       if (elem==NULL){
+               ms_message("linphone_core_get_proxy_config_from_rid: searching in deleted proxies...");
+               elem=ms_list_find_custom(lc->sip_conf.deleted_proxies,rid_compare, &rid);
+       }
+       if (elem==NULL) return NULL;
+       else return (LinphoneProxyConfig*)elem->data;
+}
+
+/**
+ * Returns an unmodifiable list of entered proxy configurations.
+**/
+const MSList *linphone_core_get_proxy_config_list(const LinphoneCore *lc){
+       return lc->sip_conf.proxies;
+}
+
+
+void linphone_proxy_config_process_authentication_failure(LinphoneCore *lc, eXosip_event_t *ev){
+       LinphoneProxyConfig *cfg=linphone_core_get_proxy_config_from_rid(lc, ev->rid);
+       if (cfg){
+               cfg->auth_failures++;
+               if (strcmp(ev->request->sip_method,"REGISTER")==0) {
+                       gstate_new_state(lc, GSTATE_REG_FAILED, "Authentication failed.");
+               }
+               /*restart a new register so that the user gets a chance to be prompted for a password*/
+               if (cfg->auth_failures==1){
+                       linphone_proxy_config_register(cfg);
+               }
+       }
+}
+
+void linphone_proxy_config_write_to_config_file(LpConfig *config, LinphoneProxyConfig *obj, int index)
+{
+       char key[50];
+
+       sprintf(key,"proxy_%i",index);
+       lp_config_clean_section(config,key);
+       if (obj==NULL){
+               return;
+       }
+       if (obj->type!=NULL){
+               lp_config_set_string(config,key,"type",obj->type);
+       }
+       if (obj->reg_proxy!=NULL){
+               lp_config_set_string(config,key,"reg_proxy",obj->reg_proxy);
+       }
+       if (obj->reg_route!=NULL){
+               lp_config_set_string(config,key,"reg_route",obj->reg_route);
+       }
+       if (obj->reg_identity!=NULL){
+               lp_config_set_string(config,key,"reg_identity",obj->reg_identity);
+       }
+       lp_config_set_int(config,key,"reg_expires",obj->expires);
+       lp_config_set_int(config,key,"reg_sendregister",obj->reg_sendregister);
+       lp_config_set_int(config,key,"publish",obj->publish);
+       lp_config_set_int(config,key,"dial_escape_plus",obj->dial_escape_plus);
+       lp_config_set_string(config,key,"dial_prefix",obj->dial_prefix);
+}
+
+
+
+LinphoneProxyConfig *linphone_proxy_config_new_from_config_file(LpConfig *config, int index)
+{
+       const char *tmp;
+       const char *identity;
+       const char *proxy;
+       LinphoneProxyConfig *cfg;
+       char key[50];
+       
+       sprintf(key,"proxy_%i",index);
+
+       if (!lp_config_has_section(config,key)){
+               return NULL;
+       }
+
+       cfg=linphone_proxy_config_new();
+
+       identity=lp_config_get_string(config,key,"reg_identity",NULL);  
+       proxy=lp_config_get_string(config,key,"reg_proxy",NULL);
+       
+       linphone_proxy_config_set_identity(cfg,identity);
+       linphone_proxy_config_set_server_addr(cfg,proxy);
+       
+       tmp=lp_config_get_string(config,key,"reg_route",NULL);
+       if (tmp!=NULL) linphone_proxy_config_set_route(cfg,tmp);
+
+       linphone_proxy_config_expires(cfg,lp_config_get_int(config,key,"reg_expires",600));
+       linphone_proxy_config_enableregister(cfg,lp_config_get_int(config,key,"reg_sendregister",0));
+       
+       linphone_proxy_config_enable_publish(cfg,lp_config_get_int(config,key,"publish",0));
+
+       linphone_proxy_config_set_dial_escape_plus(cfg,lp_config_get_int(config,key,"dial_escape_plus",0));
+       linphone_proxy_config_set_dial_prefix(cfg,lp_config_get_string(config,key,"dial_prefix",NULL));
+       
+       tmp=lp_config_get_string(config,key,"type",NULL);
+       if (tmp!=NULL && strlen(tmp)>0) 
+               linphone_proxy_config_set_sip_setup(cfg,tmp);
+
+       return cfg;
+}
+
+static void linphone_proxy_config_activate_sip_setup(LinphoneProxyConfig *cfg){
+       SipSetupContext *ssc;
+       SipSetup *ss=sip_setup_lookup(cfg->type);
+       LinphoneCore *lc=linphone_proxy_config_get_core(cfg);
+       unsigned int caps;
+       if (!ss) return ;
+       ssc=sip_setup_context_new(ss,cfg);
+       cfg->ssctx=ssc;
+       if (cfg->reg_identity==NULL){
+               ms_error("Invalid identity for this proxy configuration.");
+               return;
+       }
+       caps=sip_setup_context_get_capabilities(ssc);
+       if (caps & SIP_SETUP_CAP_ACCOUNT_MANAGER){
+               if (sip_setup_context_login_account(ssc,cfg->reg_identity,NULL)!=0){
+                       if (lc->vtable.display_warning){
+                               char *tmp=ms_strdup_printf(_("Could not login as %s"),cfg->reg_identity);
+                               lc->vtable.display_warning(lc,tmp);
+                               ms_free(tmp);
+                       }
+                       return;
+               }
+       }
+       if (caps & SIP_SETUP_CAP_PROXY_PROVIDER){
+               char proxy[256];
+               if (sip_setup_context_get_proxy(ssc,NULL,proxy,sizeof(proxy))==0){
+                       linphone_proxy_config_set_server_addr(cfg,proxy);
+               }else{
+                       ms_error("Could not retrieve proxy uri !");
+               }
+       }
+       
+}
+
+SipSetup *linphone_proxy_config_get_sip_setup(LinphoneProxyConfig *cfg){
+       if (cfg->ssctx!=NULL) return cfg->ssctx->funcs;
+       if (cfg->type!=NULL){
+               return sip_setup_lookup(cfg->type);
+       }
+       return NULL;
+}
+
+void linphone_proxy_config_update(LinphoneProxyConfig *cfg){
+       if (cfg->commit){
+               if (cfg->type && cfg->ssctx==NULL){
+                       linphone_proxy_config_activate_sip_setup(cfg);
+               }
+               linphone_proxy_config_register(cfg);
+               cfg->commit=FALSE;
+       }
+}
+
+void linphone_proxy_config_set_sip_setup(LinphoneProxyConfig *cfg, const char *type){
+       if (cfg->type)
+               ms_free(cfg->type);
+       cfg->type=ms_strdup(type);
+       if (linphone_proxy_config_get_addr(cfg)==NULL){
+               /*put a placeholder so that the sip setup gets saved into the config */
+               linphone_proxy_config_set_server_addr(cfg,"sip:undefined");
+       }
+}
+
+SipSetupContext *linphone_proxy_config_get_sip_setup_context(LinphoneProxyConfig *cfg){
+       return cfg->ssctx;
+}
+
+/**
+ * @}
+**/
+
+LinphoneAccountCreator *linphone_account_creator_new(struct _LinphoneCore *core, const char *type){
+       LinphoneAccountCreator *obj;
+       LinphoneProxyConfig *cfg;
+       SipSetup *ss=sip_setup_lookup(type);
+       SipSetupContext *ssctx;
+       if (!ss){
+               return NULL;
+       }
+       if (!(sip_setup_get_capabilities(ss) & SIP_SETUP_CAP_ACCOUNT_MANAGER)){
+               ms_error("%s cannot manage accounts.");
+               return NULL;
+       }
+       obj=ms_new0(LinphoneAccountCreator,1);
+       cfg=linphone_proxy_config_new();
+       ssctx=sip_setup_context_new(ss,cfg);
+       obj->lc=core;
+       obj->ssctx=ssctx;
+       set_string(&obj->domain,sip_setup_context_get_domains(ssctx)[0]);
+       cfg->lc=core;
+       return obj;
+}
+
+void linphone_account_creator_set_username(LinphoneAccountCreator *obj, const char *username){
+       set_string(&obj->username,username);
+}
+
+void linphone_account_creator_set_password(LinphoneAccountCreator *obj, const char *password){
+       set_string(&obj->password,password);
+}
+
+void linphone_account_creator_set_domain(LinphoneAccountCreator *obj, const char *domain){
+       set_string(&obj->domain,domain);
+}
+
+const char * linphone_account_creator_get_username(LinphoneAccountCreator *obj){
+       return obj->username;
+}
+
+const char * linphone_account_creator_get_domain(LinphoneAccountCreator *obj){
+       return obj->domain;
+}
+
+int linphone_account_creator_test_existence(LinphoneAccountCreator *obj){
+       SipSetupContext *ssctx=obj->ssctx;
+       char *uri=ms_strdup_printf("%s@%s",obj->username,obj->domain);
+       int err=sip_setup_context_account_exists(ssctx,uri);
+       ms_free(uri);
+       return err;
+}
+
+LinphoneProxyConfig * linphone_account_creator_validate(LinphoneAccountCreator *obj){
+       SipSetupContext *ssctx=obj->ssctx;
+       char *uri=ms_strdup_printf("%s@%s",obj->username,obj->domain);
+       int err=sip_setup_context_create_account(ssctx,uri,obj->password);
+       ms_free(uri);
+       if (err==0) {
+               obj->succeeded=TRUE;
+               return sip_setup_context_get_proxy_config(ssctx);
+       }
+       return NULL;
+}
+
+void linphone_account_creator_destroy(LinphoneAccountCreator *obj){
+       if (obj->username)
+               ms_free(obj->username);
+       if (obj->password)
+               ms_free(obj->password);
+       if (obj->domain)
+               ms_free(obj->domain);
+       if (!obj->succeeded){
+               linphone_proxy_config_destroy(sip_setup_context_get_proxy_config(obj->ssctx));
+       }
+}
+
+
+
diff --git a/coreapi/sdphandler.c b/coreapi/sdphandler.c
new file mode 100644 (file)
index 0000000..8902172
--- /dev/null
@@ -0,0 +1,689 @@
+/*
+  * Linphone is sip (RFC3261) compatible internet phone.
+  * 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 "sdphandler.h"
+#include <osipparser2/osip_port.h>
+#include <osipparser2/sdp_message.h>
+#include <eXosip2/eXosip.h>
+#include "linphonecore.h"
+#include "ortp/b64.h"
+
+#define keywordcmp(key,str)  strncmp(key,str,strlen(key))
+
+
+#define sstrdup_sprintf ms_strdup_printf
+
+#define eXosip_trace(loglevel,args)  do        \
+{                       \
+       char *__strmsg;  \
+       __strmsg=ms_strdup_printf args ;    \
+       OSIP_TRACE(osip_trace(__FILE__,__LINE__,(loglevel),NULL,"%s\n",__strmsg)); \
+       osip_free (__strmsg);        \
+}while (0);
+
+
+static char *make_relay_session_id(const char *username, const char *relay){
+       /*ideally this should be a hash of the parameters with a random part*/
+       char tmp[128];
+       int s1=(int)random();
+       int s2=(int)random();
+       long long int res=((long long int)s1)<<32 | (long long int) s2;
+       void *src=&res;
+       b64_encode(src, sizeof(long long int), tmp, sizeof(tmp));
+       return osip_strdup(tmp);
+}
+
+char * int_2char(int a){
+       char *p=osip_malloc(16);
+       snprintf(p,16,"%i",a);
+       return p;
+}
+
+/* return the value of attr "field" for payload pt at line pos (field=rtpmap,fmtp...)*/
+char *sdp_message_a_attr_value_get_with_pt(sdp_message_t *sdp,int pos,int pt,const char *field)
+{
+       int i,tmppt=0,scanned=0;
+       char *tmp;
+       sdp_attribute_t *attr;
+       for (i=0;(attr=sdp_message_attribute_get(sdp,pos,i))!=NULL;i++){
+               if (keywordcmp(field,attr->a_att_field)==0 && attr->a_att_value!=NULL){
+                       int nb = sscanf(attr->a_att_value,"%i %n",&tmppt,&scanned);
+                       /* the return value may depend on how %n is interpreted by the libc: see manpage*/
+                       if (nb == 1 || nb==2 ){
+                               if (pt==tmppt){
+                                       tmp=attr->a_att_value+scanned;
+                                       if (strlen(tmp)>0)
+                                               return tmp;
+                               }
+                       }else eXosip_trace(OSIP_WARNING,("sdp has a strange a= line (%s) nb=%i",attr->a_att_value,nb));
+               }
+       }
+       return NULL;
+}
+
+/* return the value of attr "field" */
+char *sdp_message_a_attr_value_get(sdp_message_t *sdp,int pos,const char *field)
+{
+       int i;
+       sdp_attribute_t *attr;
+       for (i=0;(attr=sdp_message_attribute_get(sdp,pos,i))!=NULL;i++){
+               if (keywordcmp(field,attr->a_att_field)==0 && attr->a_att_value!=NULL){
+                       return attr->a_att_value;
+               }
+       }
+       return NULL;
+}
+
+static int _sdp_message_get_a_ptime(sdp_message_t *sdp, int mline){
+       int i,ret;
+       sdp_attribute_t *attr;
+       for (i=0;(attr=sdp_message_attribute_get(sdp,mline,i))!=NULL;i++){
+               if (keywordcmp("ptime",attr->a_att_field)==0){
+                       int nb = sscanf(attr->a_att_value,"%i",&ret);
+                       /* the return value may depend on how %n is interpreted by the libc: see manpage*/
+                       if (nb == 1){
+                               return ret;
+                       }else eXosip_trace(OSIP_WARNING,("sdp has a strange a=ptime line (%s) ",attr->a_att_value));
+               }
+       }
+       return 0;
+}
+
+int
+sdp_payload_init (sdp_payload_t * payload)
+{
+       memset (payload, 0, sizeof (sdp_payload_t));
+       return 0;
+}
+
+sdp_context_t *sdp_handler_create_context(sdp_handler_t *handler, const char *localip, const char *username, const char *relay){
+       sdp_context_t *ctx=osip_malloc(sizeof(sdp_context_t));
+       memset(ctx,0,sizeof(sdp_context_t));
+       if (localip!=NULL) ctx->localip=osip_strdup(localip);
+       ctx->username=osip_strdup(username);
+       ctx->handler=handler;
+       if (relay){
+               ctx->relay=osip_strdup(relay);
+               ctx->relay_session_id=make_relay_session_id(username,relay);
+       }
+       return ctx;
+}
+
+void sdp_context_set_user_pointer(sdp_context_t * ctx, void* up){
+       ctx->reference=up;
+}
+
+void *sdp_context_get_user_pointer(sdp_context_t * ctx){
+       return ctx->reference;
+}
+
+int sdp_context_get_status(sdp_context_t* ctx){
+       return ctx->negoc_status;
+}
+
+/* generate a template sdp */
+sdp_message_t *
+sdp_context_generate_template (sdp_context_t * ctx)
+{
+       sdp_message_t *local;
+       int inet6;
+
+       sdp_message_init (&local);
+       if (strchr(ctx->localip,':')!=NULL){
+               inet6=1;
+       }else inet6=0;
+       if (!inet6){
+               sdp_message_v_version_set (local, osip_strdup ("0"));
+               sdp_message_o_origin_set (local, osip_strdup (ctx->username),
+                                 osip_strdup ("123456"), osip_strdup ("654321"),
+                                 osip_strdup ("IN"), osip_strdup ("IP4"),
+                                 osip_strdup (ctx->localip));
+               sdp_message_s_name_set (local, osip_strdup ("A conversation"));
+               sdp_message_c_connection_add (local, -1,
+                                     osip_strdup ("IN"), osip_strdup ("IP4"),
+                                     osip_strdup (ctx->localip), NULL, NULL);
+               sdp_message_t_time_descr_add (local, osip_strdup ("0"), osip_strdup ("0"));
+       }else{
+               sdp_message_v_version_set (local, osip_strdup ("0"));
+               sdp_message_o_origin_set (local, osip_strdup (ctx->username),
+                                 osip_strdup ("123456"), osip_strdup ("654321"),
+                                 osip_strdup ("IN"), osip_strdup ("IP6"),
+                                 osip_strdup (ctx->localip));
+               sdp_message_s_name_set (local, osip_strdup ("A conversation"));
+               sdp_message_c_connection_add (local, -1,
+                                     osip_strdup ("IN"), osip_strdup ("IP6"),
+                                     osip_strdup (ctx->localip), NULL, NULL);
+               sdp_message_t_time_descr_add (local, osip_strdup ("0"), osip_strdup ("0"));
+       }
+       return local;
+}
+
+static void add_relay_info(sdp_message_t *sdp, int mline, const char *relay, const char *relay_session_id){
+
+       if (relay) sdp_message_a_attribute_add(sdp, mline,
+                                    osip_strdup ("relay-addr"),osip_strdup(relay));
+       if (relay_session_id) sdp_message_a_attribute_add(sdp, mline,
+                                    osip_strdup ("relay-session-id"), osip_strdup(relay_session_id));
+}
+
+/* to add payloads to the offer, must be called inside the write_offer callback */
+void
+sdp_context_add_payload (sdp_context_t * ctx, sdp_payload_t * payload, char *media)
+{
+       sdp_message_t *offer = ctx->offer;
+       char *attr_field;
+       if (!ctx->incb)
+       {
+               eXosip_trace (OSIP_ERROR,
+                           ("You must not call sdp_context_add_*_payload outside the write_offer callback\n"));
+#if !defined(_WIN32_WCE)
+                               abort();
+#else
+                               exit(-1);
+#endif /*_WIN32_WCE*/
+
+       }
+       if (payload->proto == NULL)
+               payload->proto = "RTP/AVP";
+       /*printf("payload->line=%i payload->pt=%i\n",payload->line, payload->pt);*/
+       if (sdp_message_m_media_get (offer, payload->line) == NULL)
+       {
+               /*printf("Adding new mline %s \n",media);*/
+               /* need a new line */
+               sdp_message_m_media_add (offer, osip_strdup (media),
+                                int_2char (payload->localport), NULL,
+                                osip_strdup (payload->proto));
+               if (ctx->relay){
+                       add_relay_info(offer,payload->line,ctx->relay,ctx->relay_session_id);
+               }
+       }
+       sdp_message_m_payload_add (offer, payload->line, int_2char (payload->pt));
+       if (payload->a_rtpmap != NULL)
+       {
+               attr_field =
+                       sstrdup_sprintf ("%i %s", payload->pt,
+                                        payload->a_rtpmap);
+               sdp_message_a_attribute_add (offer, payload->line,
+                                    osip_strdup ("rtpmap"), attr_field);
+       }
+       if (payload->a_fmtp != NULL)
+       {
+               attr_field =
+                       sstrdup_sprintf ("%i %s", payload->pt,
+                                        payload->a_fmtp);
+               sdp_message_a_attribute_add (offer, payload->line, osip_strdup ("fmtp"),
+                                    attr_field);
+       }
+       if (payload->b_as_bandwidth != 0)
+       {
+               if (sdp_message_bandwidth_get(offer,payload->line,0)==NULL){
+                       attr_field =
+                       sstrdup_sprintf ("%i", payload->b_as_bandwidth);
+                       sdp_message_b_bandwidth_add (offer, payload->line, osip_strdup ("AS"),
+                                    attr_field);
+               }
+       }
+}
+
+void
+sdp_context_add_audio_payload (sdp_context_t * ctx, sdp_payload_t * payload)
+{
+       sdp_context_add_payload (ctx, payload, "audio");
+}
+
+void
+sdp_context_add_video_payload (sdp_context_t * ctx, sdp_payload_t * payload)
+{
+       sdp_context_add_payload (ctx, payload, "video");
+}
+
+char *
+sdp_context_get_offer ( sdp_context_t * ctx)
+{
+       sdp_message_t *offer;
+       sdp_handler_t *sdph=ctx->handler;
+       char *tmp;
+
+       offer = sdp_context_generate_template (ctx);
+       /* add audio codecs */
+       ctx->offer = offer;
+       ctx->incb = 1;
+       if (sdph->set_audio_codecs != NULL)
+               sdph->set_audio_codecs (ctx);
+       if (sdph->set_video_codecs != NULL)
+               sdph->set_video_codecs (ctx);
+       ctx->incb = 0;
+       sdp_message_to_str(offer,&tmp);
+       ctx->offerstr=tmp;
+       return tmp;
+}
+
+
+/* refuse the line */
+static void refuse_mline(sdp_message_t *answer,char *mtype,char *proto, int mline)
+{
+       sdp_message_m_media_add (answer,
+                                                        osip_strdup (mtype),
+                                                        int_2char (0), NULL,
+                                                        osip_strdup (proto));
+       /* add a payload just to comply with sdp RFC.*/
+       sdp_message_m_payload_add(answer,mline,int_2char(0));
+}
+
+static char * parse_relay_addr(char *addr, int *port)
+{
+       char *semicolon=NULL;
+       char *p;
+
+       *port=56789;
+       semicolon=strchr(addr,':');
+       for (p=addr+strlen(addr)-1;p>addr;p--){
+               if (*p==':') {
+                       semicolon=p;
+                       break;
+               }
+       }
+       if (semicolon){
+               *port=atoi(semicolon+1);
+               *semicolon='\0';
+       }
+       return addr;
+}
+
+
+char *
+sdp_context_get_answer ( sdp_context_t *ctx,sdp_message_t *remote)
+{
+       sdp_message_t *answer=NULL;
+       char *mtype=NULL, *tmp=NULL;
+       char *proto=NULL, *port=NULL, *pt=NULL;
+       int i, j, ncodec, m_lines_accepted = 0;
+       int err;
+       sdp_payload_t payload;
+       sdp_payload_t init_payload;
+       sdp_handler_t *sdph=ctx->handler;
+       sdp_bandwidth_t *sbw=NULL;
+       char *relay;
+
+       tmp = sdp_message_c_addr_get (remote, 0, 0);
+       if (tmp == NULL)
+         tmp = sdp_message_c_addr_get (remote, -1, 0);
+       if (ctx->localip==NULL) {
+               /* NULL means guess, otherwise we use the address given as localip */
+               ctx->localip=osip_malloc(128);
+               eXosip_guess_localip(strchr(tmp,':') ?  AF_INET6 : AF_INET,ctx->localip,128);
+       }
+       else eXosip_trace(OSIP_INFO1,("Using firewall address in sdp."));
+
+       answer = sdp_context_generate_template (ctx);
+
+       /* for each m= line */
+       for (i = 0; !sdp_message_endof_media (remote, i); i++){
+               sdp_payload_init(&init_payload);
+               mtype = sdp_message_m_media_get (remote, i);
+               proto = sdp_message_m_proto_get (remote, i);
+               port = sdp_message_m_port_get (remote, i);
+               init_payload.remoteport = osip_atoi (port);
+               init_payload.proto = proto;
+               init_payload.line = i;
+               init_payload.c_addr = sdp_message_c_addr_get (remote, i, 0);
+               if (init_payload.c_addr == NULL)
+                       init_payload.c_addr = sdp_message_c_addr_get (remote, -1, 0);
+               /*parse relay address if given*/
+               relay=sdp_message_a_attr_value_get(remote,i,"relay-addr");
+               if (relay){
+                       init_payload.relay_host=parse_relay_addr(relay,&init_payload.relay_port);
+               }
+               init_payload.relay_session_id=sdp_message_a_attr_value_get(remote,i,"relay-session-id");
+               /* get application specific bandwidth, if any */
+               for(j=0;(sbw=sdp_message_bandwidth_get(remote,i,j))!=NULL;j++){
+                       if (strcasecmp(sbw->b_bwtype,"AS")==0) init_payload.b_as_bandwidth=atoi(sbw->b_bandwidth);
+               }
+               init_payload.a_ptime=_sdp_message_get_a_ptime(remote,i);
+               if (keywordcmp ("audio", mtype) == 0)
+               {
+                       if (sdph->accept_audio_codecs != NULL)
+                       {
+                               ncodec = 0;
+                               /* for each payload type */
+                               for (j = 0;
+                                    ((pt =
+                                      sdp_message_m_payload_get (remote, i,
+                                                         j)) != NULL); j++)
+                               {
+                                       memcpy(&payload,&init_payload,sizeof(payload));
+                                       payload.pt = osip_atoi (pt);
+                                       /* get the rtpmap associated to this codec, if any */
+                                       payload.a_rtpmap =
+                                               sdp_message_a_attr_value_get_with_pt
+                                               (remote, i, payload.pt,
+                                                "rtpmap");
+                                       /* get the fmtp, if any */
+                                       payload.a_fmtp =
+                                               sdp_message_a_attr_value_get_with_pt
+                                               (remote, i, payload.pt,
+                                                "fmtp");
+
+                                       /* ask the application if this codec is supported */
+                                       err = sdph->accept_audio_codecs (ctx,
+                                                                        &payload);
+                                       if (err == 0)
+                                       {
+                                               ncodec++;
+                                               /* codec accepted */
+                                               if (ncodec == 1)
+                                               {
+                                                       /* first codec accepted, setup the line  */
+                                                       sdp_message_m_media_add
+                                                               (answer,
+                                                                osip_strdup
+                                                                (mtype),
+                                                                int_2char
+                                                                (payload.
+                                                                 localport),
+                                                                NULL,
+                                                                osip_strdup
+                                                                (proto));
+                                                       /* and accept the remote relay addr if we planned to use our own */
+                                                       if (ctx->relay!=NULL && relay){
+                                                               add_relay_info(answer,i,relay,payload.relay_session_id);
+                                                       }
+                                               }
+                                               /* add the payload, rtpmap, fmtp */
+                                               sdp_message_m_payload_add (answer, i,
+                                                                  int_2char
+                                                                  (payload.
+                                                                   pt));
+                                               if (payload.a_rtpmap != NULL)
+                                               {
+                                                       sdp_message_a_attribute_add
+                                                               (answer, i,
+                                                                osip_strdup
+                                                                ("rtpmap"),
+                                                                sstrdup_sprintf
+                                                                ("%i %s",
+                                                                 payload.pt,
+                                                                 payload.
+                                                                 a_rtpmap));
+                                               }
+                                               if (payload.a_fmtp != NULL)
+                                               {
+                                                       sdp_message_a_attribute_add
+                                                               (answer, i,
+                                                                osip_strdup
+                                                                ("fmtp"),
+                                                                sstrdup_sprintf
+                                                                ("%i %s",
+                                                                 payload.pt,
+                                                                 payload.
+                                                                 a_fmtp));
+                                               }
+                                               if (payload.b_as_bandwidth !=
+                                                   0)
+                                               {
+                                                       if (sdp_message_bandwidth_get(answer,i,0)==NULL)
+                                                               sdp_message_b_bandwidth_add
+                                                               (answer, i,
+                                                                osip_strdup
+                                                                ("AS"),
+                                                                sstrdup_sprintf
+                                                                ("%i",
+                                                                 payload.
+                                                                 b_as_bandwidth));
+                                               }
+                                       }
+                               }
+                               if (ncodec == 0)
+                               {
+                                       /* refuse the line */
+                                       refuse_mline(answer,mtype,proto,i);
+
+                               }
+                               else
+                                       m_lines_accepted++;
+                       }
+                       else
+                       {
+                               /* refuse this line (leave port to 0) */
+                               refuse_mline(answer,mtype,proto,i);
+                       }
+
+               }
+               else if (keywordcmp ("video", mtype) == 0)
+               {
+                       if (sdph->accept_video_codecs != NULL)
+                       {
+                               ncodec = 0;
+                               /* for each payload type */
+                               for (j = 0;
+                                    ((pt =
+                                      sdp_message_m_payload_get (remote, i,
+                                                         j)) != NULL); j++)
+                               {
+                                       memcpy(&payload,&init_payload,sizeof(payload));
+                                       payload.pt = osip_atoi (pt);
+                                       /* get the rtpmap associated to this codec, if any */
+                                       payload.a_rtpmap =
+                                               sdp_message_a_attr_value_get_with_pt
+                                               (remote, i, payload.pt,
+                                                "rtpmap");
+                                       /* get the fmtp, if any */
+                                       payload.a_fmtp =
+                                               sdp_message_a_attr_value_get_with_pt
+                                               (remote, i, payload.pt,
+                                                "fmtp");
+                                       /* ask the application if this codec is supported */
+                                       err = sdph->accept_video_codecs (ctx,
+                                                                        &payload);
+                                       if (err == 0 )
+                                       {
+                                               ncodec++;
+                                               /* codec accepted */
+                                               if (ncodec == 1)
+                                               {
+                                                       /* first codec accepted, setup the line  */
+                                                       sdp_message_m_media_add
+                                                               (answer,
+                                                                osip_strdup
+                                                                (mtype),
+                                                                int_2char
+                                                                (payload.localport), NULL,
+                                                                osip_strdup
+                                                                (proto));
+                                                       /* and accept the remote relay addr if we planned to use our own */
+                                                       if (ctx->relay!=NULL && relay){
+                                                               add_relay_info(answer,i,relay,payload.relay_session_id);
+                                                       }
+                                               }
+                                               /* add the payload, rtpmap, fmtp */
+                                               sdp_message_m_payload_add (answer, i,
+                                                                  int_2char
+                                                                  (payload.
+                                                                   pt));
+                                               if (payload.a_rtpmap != NULL)
+                                               {
+                                                       sdp_message_a_attribute_add
+                                                               (answer, i,
+                                                                osip_strdup
+                                                                ("rtpmap"),
+                                                                sstrdup_sprintf
+                                                                ("%i %s",
+                                                                 payload.pt,
+                                                                 payload.
+                                                                 a_rtpmap));
+                                               }
+                                               if (payload.a_fmtp != NULL)
+                                               {
+                                                       sdp_message_a_attribute_add
+                                                               (answer, i,
+                                                                osip_strdup
+                                                                ("fmtp"),
+                                                                sstrdup_sprintf
+                                                                ("%i %s",
+                                                                 payload.pt,
+                                                                 payload.
+                                                                 a_fmtp));
+                                               }
+                                               if (payload.b_as_bandwidth !=0)
+                                               {
+                                                       if (sdp_message_bandwidth_get(answer,i,0)==NULL)
+                                                               sdp_message_b_bandwidth_add
+                                                               (answer, i,
+                                                                osip_strdup
+                                                                ("AS"),
+                                                                sstrdup_sprintf
+                                                                ("%i",
+                                                                 payload.
+                                                                 b_as_bandwidth));
+                                               }
+                                       }
+                               }
+                               if (ncodec == 0)
+                               {
+                                       /* refuse the line */
+                                       refuse_mline(answer,mtype,proto,i);
+                               }
+                               else
+                                       m_lines_accepted++;
+                       }
+                       else
+                       {
+                               /* refuse the line */
+                               refuse_mline(answer,mtype,proto,i);
+                       }
+               }
+       }
+       if (ctx->answer!=NULL)
+               sdp_message_free(ctx->answer);
+       ctx->answer = answer;
+       if (m_lines_accepted > 0){
+               ctx->negoc_status = 200;
+               sdp_message_to_str(answer,&tmp);
+               if (ctx->answerstr!=NULL)
+                       osip_free(ctx->answerstr);
+               ctx->answerstr=tmp;
+               return tmp;
+       }else{
+               ctx->negoc_status = 415;
+               return NULL;
+       }
+}
+
+void
+sdp_context_read_answer (sdp_context_t *ctx, sdp_message_t *remote)
+{
+       char *mtype;
+       char *proto, *port, *pt;
+       int i, j,err;
+       char *relay;
+       sdp_payload_t payload,arg_payload;
+       sdp_handler_t *sdph=ctx->handler;
+       sdp_bandwidth_t *sbw=NULL;
+       /* for each m= line */
+       for (i = 0; !sdp_message_endof_media (remote, i); i++)
+       {
+               sdp_payload_init(&payload);
+               mtype = sdp_message_m_media_get (remote, i);
+               proto = sdp_message_m_proto_get (remote, i);
+               port = sdp_message_m_port_get (remote, i);
+               payload.remoteport = osip_atoi (port);
+               payload.localport = osip_atoi (sdp_message_m_port_get (ctx->offer, i));
+               payload.proto = proto;
+               payload.line = i;
+               payload.c_addr = sdp_message_c_addr_get (remote, i, 0);
+               if (payload.c_addr == NULL)
+                       payload.c_addr = sdp_message_c_addr_get (remote, -1, 0);
+               /*parse relay address if given*/
+               relay=sdp_message_a_attr_value_get(remote,i,"relay-addr");
+               if (relay){
+                       payload.relay_host=parse_relay_addr(relay,&payload.relay_port);
+               }
+               payload.relay_session_id=sdp_message_a_attr_value_get(remote,i,"relay-session-id");
+               for(j=0;(sbw=sdp_message_bandwidth_get(remote,i,j))!=NULL;++j){
+                       if (strcasecmp(sbw->b_bwtype,"AS")==0) payload.b_as_bandwidth=atoi(sbw->b_bandwidth);
+               }
+               payload.a_ptime=_sdp_message_get_a_ptime(remote,i);
+               if (keywordcmp ("audio", mtype) == 0)
+               {
+                       if (sdph->get_audio_codecs != NULL)
+                       {
+                               /* for each payload type */
+                               for (j = 0;
+                                    ((pt =
+                                      sdp_message_m_payload_get (remote, i,
+                                                         j)) != NULL); j++)
+                               {
+                                       payload.pt = osip_atoi (pt);
+                                       /* get the rtpmap associated to this codec, if any */
+                                       payload.a_rtpmap =
+                                               sdp_message_a_attr_value_get_with_pt
+                                               (remote, i, payload.pt,
+                                                "rtpmap");
+                                       /* get the fmtp, if any */
+                                       payload.a_fmtp =
+                                               sdp_message_a_attr_value_get_with_pt
+                                               (remote, i, payload.pt,
+                                                "fmtp");
+                                       /* ask the application if this codec is supported */
+                                       memcpy(&arg_payload,&payload,sizeof(payload));
+                                       err = sdph->get_audio_codecs (ctx,
+                                                                     &arg_payload);
+                               }
+                       }
+               }
+               else if (keywordcmp ("video", mtype) == 0)
+               {
+                       if (sdph->get_video_codecs != NULL)
+                       {
+                               /* for each payload type */
+                               for (j = 0;
+                                    ((pt =
+                                      sdp_message_m_payload_get (remote, i,
+                                                         j)) != NULL); j++)
+                               {
+                                       payload.pt = osip_atoi (pt);
+                                       /* get the rtpmap associated to this codec, if any */
+                                       payload.a_rtpmap =
+                                               sdp_message_a_attr_value_get_with_pt
+                                               (remote, i, payload.pt,
+                                                "rtpmap");
+                                       /* get the fmtp, if any */
+                                       payload.a_fmtp =
+                                               sdp_message_a_attr_value_get_with_pt
+                                               (remote, i, payload.pt,
+                                                "fmtp");
+                                       /* ask the application if this codec is supported */
+                                       memcpy(&arg_payload,&payload,sizeof(payload));
+                                       err = sdph->get_video_codecs (ctx,
+                                                                        &arg_payload);
+                               }
+                       }
+               }
+       }
+}
+void sdp_context_free(sdp_context_t *ctx){
+       osip_free(ctx->localip);
+       osip_free(ctx->username);
+       if (ctx->offer!=NULL) sdp_message_free(ctx->offer);
+       if (ctx->answer!=NULL) sdp_message_free(ctx->answer);
+       if (ctx->offerstr!=NULL) osip_free(ctx->offerstr);
+       if (ctx->answerstr!=NULL) osip_free(ctx->answerstr);
+       if (ctx->relay!=NULL) osip_free(ctx->relay);
+       if (ctx->relay_session_id!=NULL) osip_free(ctx->relay_session_id);
+       osip_free(ctx);
+}
diff --git a/coreapi/sdphandler.h b/coreapi/sdphandler.h
new file mode 100644 (file)
index 0000000..b3e811b
--- /dev/null
@@ -0,0 +1,101 @@
+ /*
+  * Linphone is sip (RFC3261) compatible internet phone.
+  * 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 SDP_HANDLER_H
+#define SDP_HANDLER_H
+
+#include <osipparser2/sdp_message.h>
+#include "linphonecore.h"
+
+typedef struct _sdp_payload
+{
+       int line;       /* the index of the m= line */
+       int pt;         /*payload type */
+       int localport;
+       int remoteport;
+       int b_as_bandwidth;     /* application specific bandwidth */
+       char *proto;
+       char *c_nettype;
+       char *c_addrtype;
+       char *c_addr;
+       char *c_addr_multicast_ttl;
+       char *c_addr_multicast_int;
+       char *a_rtpmap;
+       char *a_fmtp;
+       char *relay_host;
+       int relay_port;
+       char *relay_session_id;
+       int a_ptime;
+} sdp_payload_t;
+
+typedef struct _sdp_context sdp_context_t;
+
+typedef int (*sdp_handler_read_codec_func_t) (struct _sdp_context *,
+                                                                                       sdp_payload_t *);
+typedef int (*sdp_handler_write_codec_func_t) (struct _sdp_context *);
+
+typedef struct _sdp_handler
+{
+       sdp_handler_read_codec_func_t accept_audio_codecs;   /*from remote sdp */
+       sdp_handler_read_codec_func_t accept_video_codecs;   /*from remote sdp */
+       sdp_handler_write_codec_func_t set_audio_codecs;        /*to local sdp */
+       sdp_handler_write_codec_func_t set_video_codecs;        /*to local sdp */
+       sdp_handler_read_codec_func_t get_audio_codecs; /*from incoming answer  */
+       sdp_handler_read_codec_func_t get_video_codecs; /*from incoming answer  */
+} sdp_handler_t;
+
+
+typedef enum _sdp_context_state
+{
+       SDP_CONTEXT_STATE_INIT,
+       SDP_CONTEXT_STATE_NEGOCIATION_OPENED,
+       SDP_CONTEXT_STATE_NEGOCIATION_CLOSED
+} sdp_context_state_t;
+
+struct _sdp_context
+{
+       sdp_handler_t *handler;
+       char *localip;
+       char *username;
+       void *reference;
+       sdp_message_t *offer;           /* the local sdp to be used for outgoing request */
+       char *offerstr;
+       sdp_message_t *answer;          /* the local sdp generated from an inc request */
+       char *answerstr;
+       char *relay;
+       char *relay_session_id;
+       int negoc_status;       /* in sip code */
+       int incb;
+       sdp_context_state_t state;
+};
+
+/* create a context for a sdp negociation: localip is the ip address to be used in the sdp message, can
+be a firewall address.
+It can be null when negociating for an incoming offer; In that case it will be guessed. */
+sdp_context_t *sdp_handler_create_context(sdp_handler_t *handler, const char *localip, const char *username, const char *relay);
+void sdp_context_set_user_pointer(sdp_context_t * ctx, void* up);
+void *sdp_context_get_user_pointer(sdp_context_t * ctx);
+void sdp_context_add_audio_payload( sdp_context_t * ctx, sdp_payload_t * payload);
+void sdp_context_add_video_payload( sdp_context_t * ctx, sdp_payload_t * payload);
+char * sdp_context_get_offer(sdp_context_t *ctx);
+char * sdp_context_get_answer(sdp_context_t* ctx, sdp_message_t *remote_offer);
+int sdp_context_get_status(sdp_context_t* ctx);
+void sdp_context_read_answer(sdp_context_t *ctx, sdp_message_t *remote_answer);
+void sdp_context_free(sdp_context_t *ctx);
+
+int sdp_payload_init (sdp_payload_t * payload);
+#endif
diff --git a/coreapi/siplogin.c b/coreapi/siplogin.c
new file mode 100644 (file)
index 0000000..528e3f3
--- /dev/null
@@ -0,0 +1,127 @@
+/*
+linphone
+Copyright (C) 2009  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "../config.h"
+#endif
+
+#include "linphonecore.h"
+#include <ctype.h>
+
+static void sip_login_init_instance(SipSetupContext *ctx){
+       LinphoneProxyConfig *cfg=sip_setup_context_get_proxy_config(ctx);
+       /*disable registration until the user logs in*/
+       linphone_proxy_config_enable_register(cfg,FALSE);
+}
+
+static void guess_display_name(LinphoneAddress *from){
+       char *dn=(char*)ms_malloc(strlen(linphone_address_get_username(from))+3);
+       const char *it;
+       char *wptr=dn;
+       bool_t begin=TRUE;
+       bool_t surname=0;
+       for(it=linphone_address_get_username(from);*it!='\0';++it){
+               if (begin){
+                       *wptr=toupper(*it);
+                       begin=FALSE;
+               }else if (*it=='.'){
+                       if (surname) break;
+                       *wptr=' ';
+                       begin=TRUE;
+                       surname=TRUE;
+               }else *wptr=*it;
+               wptr++;
+       }
+       linphone_address_set_display_name(from,dn);
+       ms_free(dn);
+}
+
+static int sip_login_do_login(SipSetupContext * ctx, const char *uri, const char *passwd){
+       LinphoneProxyConfig *cfg=sip_setup_context_get_proxy_config(ctx);
+       LinphoneCore *lc=linphone_proxy_config_get_core(cfg);
+       LinphoneAuthInfo *auth;
+       LinphoneAddress *parsed_uri;
+       char *tmp;
+
+       parsed_uri=linphone_address_new(uri);
+       if (parsed_uri==NULL){
+               return -1;
+       }
+       if (linphone_address_get_display_name(parsed_uri)!=NULL){
+               guess_display_name(parsed_uri);
+       }
+       tmp=linphone_address_as_string(parsed_uri);
+       linphone_proxy_config_set_identity(cfg,tmp);
+       if (passwd ) {
+               auth=linphone_auth_info_new(linphone_address_get_username(parsed_uri),NULL,passwd,NULL,NULL);
+               linphone_core_add_auth_info(lc,auth);
+       }
+       linphone_proxy_config_enable_register(cfg,TRUE);
+       linphone_proxy_config_done(cfg);
+       ms_free(tmp);
+       linphone_address_destroy(parsed_uri);
+       ms_message("SipLogin: done");
+       return 0;
+}
+
+static int sip_login_do_logout(SipSetupContext * ctx){
+       LinphoneProxyConfig *cfg=sip_setup_context_get_proxy_config(ctx);
+       linphone_proxy_config_enable_register(cfg,FALSE);
+       linphone_proxy_config_done(cfg);
+       return 0;
+}
+
+/* a simple SipSetup built-in plugin to allow specify the user/password for proxy config at runtime*/
+
+#ifndef _MSC_VER
+
+SipSetup linphone_sip_login={
+       .name="SipLogin",
+       .capabilities=SIP_SETUP_CAP_LOGIN,
+       .init_instance=sip_login_init_instance,
+       .login_account=sip_login_do_login,
+       .logout_account=sip_login_do_logout
+};
+
+#else
+SipSetup linphone_sip_login={
+       "SipLogin",
+       SIP_SETUP_CAP_LOGIN,
+       0,
+       NULL,
+       NULL,
+       sip_login_init_instance,
+       NULL,
+       NULL,
+       NULL,
+       sip_login_do_login,
+       NULL,
+       NULL,
+       NULL,
+       NULL,
+       NULL,
+       NULL,
+       NULL,
+       NULL,
+       sip_login_do_logout
+};
+
+
+
+#endif
diff --git a/coreapi/sipsetup.c b/coreapi/sipsetup.c
new file mode 100644 (file)
index 0000000..270737d
--- /dev/null
@@ -0,0 +1,224 @@
+/*
+linphone
+Copyright (C) 2009  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "../config.h"
+#endif
+
+#include "linphonecore.h"
+
+extern SipSetup linphone_sip_login;
+
+static SipSetup *all_sip_setups[]={
+       &linphone_sip_login,
+       NULL
+};
+
+static MSList *registered_sip_setups=NULL;
+
+void sip_setup_register(SipSetup *ss){
+       registered_sip_setups=ms_list_append(registered_sip_setups,ss);
+}
+
+void sip_setup_register_all(void){
+       SipSetup **p=all_sip_setups;
+       ms_load_plugins(LINPHONE_PLUGINS_DIR);
+       while(*p!=NULL){
+               sip_setup_register(*p);
+               p++;
+       }
+}
+
+const MSList * linphone_core_get_sip_setups(LinphoneCore *lc){
+       return registered_sip_setups;
+}
+
+SipSetup *sip_setup_lookup(const char *type_name){
+       MSList *elem;
+       for(elem=registered_sip_setups;elem!=NULL;elem=elem->next){
+               SipSetup *ss=(SipSetup*)elem->data;
+               if ( strcasecmp(ss->name,type_name)==0){
+                       if (!ss->initialized){
+                               if (ss->init!=NULL) ss->init();
+                               ss->initialized=TRUE;
+                               if (ss->capabilities==0){
+                                       ms_error("%s SipSetup isn't capable of anything ?",ss->name);
+                               }
+                       }
+                       return ss;
+               }
+       }
+       ms_warning("no %s setup manager declared.",type_name);
+       return NULL;
+}
+
+void sip_setup_unregister_all(void){
+       MSList *elem;
+       for(elem=registered_sip_setups;elem!=NULL;elem=elem->next){
+               SipSetup *ss=(SipSetup*)elem->data;
+               if (ss->initialized){
+                       if (ss->exit) ss->exit();
+                       ss->initialized=FALSE;
+               }
+       }
+}
+
+void buddy_lookup_request_set_key(BuddyLookupRequest *req, const char *key){
+       if (req->key!=NULL) {
+               ms_free(req->key);
+               req->key=NULL;
+       }
+       if (key) req->key=ms_strdup(key);
+}
+
+void buddy_lookup_request_set_max_results(BuddyLookupRequest *req, int ncount){
+       req->max_results=ncount;
+}
+
+void buddy_lookup_request_free(BuddyLookupRequest *req){
+       if (req->key) ms_free(req->key);
+       if (req->results){
+               ms_list_for_each(req->results,(void (*)(void*))buddy_info_free);
+               ms_list_free(req->results);
+       }
+       ms_free(req);
+}
+
+LinphoneProxyConfig *sip_setup_context_get_proxy_config(const SipSetupContext *ctx){
+       return ctx->cfg;
+}
+
+SipSetupContext *sip_setup_context_new(SipSetup *s, struct _LinphoneProxyConfig *cfg){
+       SipSetupContext *obj=(SipSetupContext*)ms_new0(SipSetupContext,1);
+       obj->funcs=s;
+       obj->data=NULL;
+       obj->cfg=cfg;
+       if (obj->funcs->init_instance){
+               obj->funcs->init_instance(obj);
+       }
+       return obj;
+}
+
+unsigned int sip_setup_get_capabilities(SipSetup *s){
+       return s->capabilities;
+}
+
+int sip_setup_context_get_capabilities(SipSetupContext *ctx){
+       return ctx->funcs->capabilities;
+}
+
+int sip_setup_context_create_account(SipSetupContext * ctx, const char *uri, const char *passwd){
+       if (ctx->funcs->create_account)
+               return ctx->funcs->create_account(ctx,uri, passwd);
+       else return -1;
+}
+
+int sip_setup_context_account_exists(SipSetupContext *ctx, const char *uri){
+       if (ctx->funcs->account_exists)
+               return ctx->funcs->account_exists(ctx,uri);
+       return -1;
+}
+
+int sip_setup_context_login_account(SipSetupContext * ctx, const char *uri, const char *passwd){
+       LinphoneAddress *from=linphone_address_new(uri);
+       if (from==NULL) {
+               ms_warning("Fail to parse %s",uri);
+               return -1;
+       }
+       strncpy(ctx->domain,linphone_address_get_domain(from),sizeof(ctx->domain));
+       strncpy(ctx->username,linphone_address_get_username(from),sizeof(ctx->username));
+       linphone_address_destroy(from);
+       if (ctx->funcs->login_account)
+               return ctx->funcs->login_account(ctx,uri,passwd);
+       return -1;
+}
+
+int sip_setup_context_get_proxy(SipSetupContext *ctx, const char *domain, char *proxy, size_t sz){
+       if (ctx->funcs->get_proxy)
+               return ctx->funcs->get_proxy(ctx,domain ? domain : ctx->domain,proxy,sz);
+       return -1;
+}
+
+int sip_setup_context_get_stun_servers(SipSetupContext *ctx, char *stun1, char *stun2, size_t size){
+       if (ctx->funcs->get_stun_servers)
+               return ctx->funcs->get_stun_servers(ctx,stun1,stun2,size);
+       return -1;
+}
+
+int sip_setup_context_get_relay(SipSetupContext *ctx,char *relay, size_t size){
+       if (ctx->funcs->get_relay)
+               return ctx->funcs->get_relay(ctx,relay,size);
+       return -1;
+}
+
+BuddyLookupRequest *sip_setup_context_create_buddy_lookup_request(SipSetupContext *ctx){
+       if (ctx->funcs->buddy_lookup_funcs)
+               return ctx->funcs->buddy_lookup_funcs->request_create(ctx);
+       return NULL;
+}
+
+int sip_setup_context_buddy_lookup_submit(SipSetupContext *ctx , BuddyLookupRequest *req){
+       if (ctx->funcs->buddy_lookup_funcs)
+               return ctx->funcs->buddy_lookup_funcs->request_submit(ctx,req);
+       return -1;
+}
+
+int sip_setup_context_buddy_lookup_free(SipSetupContext *ctx , BuddyLookupRequest *req){
+       if (ctx->funcs->buddy_lookup_funcs)
+               return ctx->funcs->buddy_lookup_funcs->request_free(ctx,req);
+       return -1;
+}
+
+const char * sip_setup_context_get_notice(SipSetupContext *ctx){
+       if (ctx->funcs->get_notice)
+               return ctx->funcs->get_notice(ctx);
+       return NULL;
+}
+
+const char ** sip_setup_context_get_domains(SipSetupContext *ctx){
+       if (ctx->funcs->get_domains)
+               return ctx->funcs->get_domains(ctx);
+       return NULL;
+}
+
+
+int sip_setup_context_logout(SipSetupContext *ctx){
+       if (ctx->funcs->logout_account){
+               return ctx->funcs->logout_account(ctx);
+       }
+       return -1;
+}
+
+void sip_setup_context_free(SipSetupContext *ctx){
+       if (ctx->funcs->uninit_instance){
+               ctx->funcs->uninit_instance(ctx);
+       }
+       ms_free(ctx);
+}
+
+
+BuddyInfo *buddy_info_new(){
+       return ms_new0(BuddyInfo,1);
+}
+
+void buddy_info_free(BuddyInfo *info){
+       if (info->image_data!=NULL)
+               ms_free(info->image_data);
+       ms_free(info);
+}
diff --git a/coreapi/sipsetup.h b/coreapi/sipsetup.h
new file mode 100644 (file)
index 0000000..6776367
--- /dev/null
@@ -0,0 +1,163 @@
+/*
+linphone
+Copyright (C) 2000  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+
+#ifndef sipsetup_h
+#define sipsetup_h
+
+#include "mediastreamer2/mscommon.h"
+
+struct _SipSetup;
+
+struct _BuddyInfo;
+
+
+struct _SipSetupContext{
+       struct _SipSetup *funcs;
+       struct _LinphoneProxyConfig *cfg;
+       char domain[128];
+       char username[128];
+       void *data;
+};
+
+typedef struct _SipSetupContext SipSetupContext;
+
+#define SIP_SETUP_CAP_PROXY_PROVIDER   (1)
+#define SIP_SETUP_CAP_STUN_PROVIDER    (1<<1)
+#define SIP_SETUP_CAP_RELAY_PROVIDER   (1<<2)
+#define SIP_SETUP_CAP_BUDDY_LOOKUP     (1<<3)
+#define SIP_SETUP_CAP_ACCOUNT_MANAGER  (1<<4)  /*can create accounts*/
+#define SIP_SETUP_CAP_LOGIN            (1<<5)  /*can login to any account for a given proxy */
+
+typedef enum _BuddyLookupStatus{
+       BuddyLookupNone,
+       BuddyLookupConnecting,
+       BuddyLookupConnected,
+       BuddyLookupReceivingResponse,
+       BuddyLookupDone,
+       BuddyLookupFailure
+}BuddyLookupStatus;
+
+typedef struct _BuddyAddress{
+       char street[64];
+       char zip[64];
+       char town[64];
+       char country[64];
+} BuddyAddress;
+
+typedef struct _BuddyInfo{
+       char firstname[64];
+       char lastname[64];
+       char displayname[64];
+       char sip_uri[128];
+       char email[128];
+       BuddyAddress address;
+       char image_type[32];
+       uint8_t *image_data;
+       int image_length;
+}BuddyInfo;
+
+typedef struct _BuddyLookupRequest {
+       char *key;
+       int max_results;
+       BuddyLookupStatus status;
+       MSList *results; /*of BuddyInfo */
+}BuddyLookupRequest;
+
+
+typedef struct _BuddyLookupFuncs{
+       BuddyLookupRequest * (*request_create)(SipSetupContext *ctx);
+       int (*request_submit)(SipSetupContext *ctx, BuddyLookupRequest *req);
+       int (*request_free)(SipSetupContext *ctx, BuddyLookupRequest *req);
+}BuddyLookupFuncs;
+
+
+struct _SipSetup{
+       char *name;
+       unsigned int capabilities;
+       int initialized;
+       bool_t (*init)(void);
+       void (*exit)(void);
+       void (*init_instance)(SipSetupContext *ctx);
+       void (*uninit_instance)(SipSetupContext *ctx);
+       int (*account_exists)(SipSetupContext *ctx, const char *uri);
+       int (*create_account)(SipSetupContext *ctx, const char *uri, const char *passwd);
+       int (*login_account)(SipSetupContext *ctx, const char *uri, const char *passwd);
+       int (*get_proxy)(SipSetupContext *ctx, const char *domain, char *proxy, size_t sz);
+       int (*get_stun_servers)(SipSetupContext *ctx, char *stun1, char *stun2, size_t size);
+       int (*get_relay)(SipSetupContext *ctx, char *relay, size_t size);
+       const char * (*get_notice)(SipSetupContext *ctx);
+       const char ** (*get_domains)(SipSetupContext *ctx);
+       int (*logout_account)(SipSetupContext *ctx);
+       BuddyLookupFuncs *buddy_lookup_funcs;
+};
+
+typedef struct _SipSetup SipSetup;
+
+
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+BuddyInfo *buddy_info_new();
+void buddy_info_free(BuddyInfo *info);
+
+void buddy_lookup_request_set_key(BuddyLookupRequest *req, const char *key);
+void buddy_lookup_request_set_max_results(BuddyLookupRequest *req, int ncount);
+
+
+void sip_setup_register(SipSetup *ss);
+void sip_setup_register_all(void);
+SipSetup *sip_setup_lookup(const char *type_name);
+void sip_setup_unregister_all(void);
+unsigned int sip_setup_get_capabilities(SipSetup *s);
+
+SipSetupContext * sip_setup_context_new(SipSetup *s, struct _LinphoneProxyConfig *cfg);
+int sip_setup_context_account_exists(SipSetupContext *ctx, const char *uri);
+int sip_setup_context_create_account(SipSetupContext *ctx, const char *uri, const char *passwd);
+int sip_setup_context_get_capabilities(SipSetupContext *ctx);
+int sip_setup_context_login_account(SipSetupContext * ctx, const char *uri, const char *passwd);
+int sip_setup_context_get_proxy(SipSetupContext *ctx, const char *domain, char *proxy, size_t sz);
+int sip_setup_context_get_stun_servers(SipSetupContext *ctx, char *stun1, char *stun2, size_t size);
+int sip_setup_context_get_relay(SipSetupContext *ctx, char *relay, size_t size);
+
+BuddyLookupRequest *sip_setup_context_create_buddy_lookup_request(SipSetupContext *ctx);
+int sip_setup_context_buddy_lookup_submit(SipSetupContext *ctx , BuddyLookupRequest *req);
+int sip_setup_context_buddy_lookup_free(SipSetupContext *ctx , BuddyLookupRequest *req);
+
+const char * sip_setup_context_get_notice(SipSetupContext *ctx);
+const char ** sip_setup_context_get_domains(SipSetupContext *ctx);
+
+void sip_setup_context_free(SipSetupContext *ctx);
+
+int sip_setup_context_logout(SipSetupContext *ctx);
+
+/*internal methods for use WITHIN plugins: do not use elsewhere*/
+struct _LinphoneProxyConfig *sip_setup_context_get_proxy_config(const SipSetupContext *ctx);
+void buddy_lookup_request_free(BuddyLookupRequest *req);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
+
+
diff --git a/gen-gtkfilelist.sh b/gen-gtkfilelist.sh
new file mode 100755 (executable)
index 0000000..1971e03
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+# this script is used to generate a file list of gtk+ files necessary for
+# execution. This is useful for generating linphone packages.
+# It must be run within a gtk+ binary bundle tree, such as in the zip bundle
+# downloadable from www.gtk.org
+echo bin
+echo bin/libglade-2.0-0.dll
+find bin -name *.dll
+find lib/gtk-2.0
+find etc
+find share/locale/fr
+find share/locale/de
+find share/locale/sv
+find share/locale/cs
+find share/locale/es
+find share/locale/hu
+find share/locale/it
+find share/locale/ja
+find share/locale/nl
+find share/locale/pl
+find share/locale/ru
+find share/locale/pt_BR
+find share/themes
+
diff --git a/gtk+-2.16.2.filelist b/gtk+-2.16.2.filelist
new file mode 100755 (executable)
index 0000000..10e10a5
--- /dev/null
@@ -0,0 +1,165 @@
+bin
+bin/libglade-2.0-0.dll
+bin/intl.dll
+bin/jpeg62.dll
+bin/libasprintf-0.dll
+bin/libatk-1.0-0.dll
+bin/libcairo-2.dll
+bin/libgailutil-18.dll
+bin/libgdk-win32-2.0-0.dll
+bin/libgdk_pixbuf-2.0-0.dll
+bin/libgettextlib-0-17.dll
+bin/libgettextpo-0.dll
+bin/libgettextsrc-0-17.dll
+bin/libgio-2.0-0.dll
+bin/libglib-2.0-0.dll
+bin/libgmodule-2.0-0.dll
+bin/libgobject-2.0-0.dll
+bin/libgthread-2.0-0.dll
+bin/libgtk-win32-2.0-0.dll
+bin/libpango-1.0-0.dll
+bin/libpangocairo-1.0-0.dll
+bin/libpangoft2-1.0-0.dll
+bin/libpangowin32-1.0-0.dll
+bin/libpng12-0.dll
+bin/libtiff3.dll
+bin/zlib1.dll
+lib/gtk-2.0
+lib/gtk-2.0/2.10.0
+lib/gtk-2.0/2.10.0/engines
+lib/gtk-2.0/2.10.0/engines/libpixmap.dll
+lib/gtk-2.0/2.10.0/engines/libwimp.dll
+lib/gtk-2.0/2.10.0/loaders
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-ani.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-bmp.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-gif.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-icns.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-ico.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-jpeg.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-pcx.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-pnm.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-ras.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-tga.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-tiff.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-wbmp.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xbm.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xpm.dll
+lib/gtk-2.0/include
+lib/gtk-2.0/include/gdkconfig.h
+lib/gtk-2.0/modules
+lib/gtk-2.0/modules/libgail.dll
+etc
+etc/gtk-2.0
+etc/gtk-2.0/gdk-pixbuf.loaders
+etc/gtk-2.0/gtk.immodules
+etc/gtk-2.0/im-multipress.conf
+etc/pango
+etc/pango/pango.modules
+share/locale/fr
+share/locale/fr/LC_MESSAGES
+share/locale/fr/LC_MESSAGES/atk10.mo
+share/locale/fr/LC_MESSAGES/gettext-runtime.mo
+share/locale/fr/LC_MESSAGES/gettext-tools.mo
+share/locale/fr/LC_MESSAGES/glib20.mo
+share/locale/fr/LC_MESSAGES/gtk20-properties.mo
+share/locale/fr/LC_MESSAGES/gtk20.mo
+share/locale/de
+share/locale/de/LC_MESSAGES
+share/locale/de/LC_MESSAGES/atk10.mo
+share/locale/de/LC_MESSAGES/gettext-runtime.mo
+share/locale/de/LC_MESSAGES/gettext-tools.mo
+share/locale/de/LC_MESSAGES/glib20.mo
+share/locale/de/LC_MESSAGES/gtk20-properties.mo
+share/locale/de/LC_MESSAGES/gtk20.mo
+share/locale/sv
+share/locale/sv/LC_MESSAGES
+share/locale/sv/LC_MESSAGES/atk10.mo
+share/locale/sv/LC_MESSAGES/gettext-runtime.mo
+share/locale/sv/LC_MESSAGES/gettext-tools.mo
+share/locale/sv/LC_MESSAGES/glib20.mo
+share/locale/sv/LC_MESSAGES/gtk20-properties.mo
+share/locale/sv/LC_MESSAGES/gtk20.mo
+share/locale/cs
+share/locale/cs/LC_MESSAGES
+share/locale/cs/LC_MESSAGES/atk10.mo
+share/locale/cs/LC_MESSAGES/gettext-runtime.mo
+share/locale/cs/LC_MESSAGES/gettext-tools.mo
+share/locale/cs/LC_MESSAGES/glib20.mo
+share/locale/cs/LC_MESSAGES/gtk20-properties.mo
+share/locale/cs/LC_MESSAGES/gtk20.mo
+share/locale/es
+share/locale/es/LC_MESSAGES
+share/locale/es/LC_MESSAGES/atk10.mo
+share/locale/es/LC_MESSAGES/gettext-runtime.mo
+share/locale/es/LC_MESSAGES/gettext-tools.mo
+share/locale/es/LC_MESSAGES/glib20.mo
+share/locale/es/LC_MESSAGES/gtk20-properties.mo
+share/locale/es/LC_MESSAGES/gtk20.mo
+share/locale/hu
+share/locale/hu/LC_MESSAGES
+share/locale/hu/LC_MESSAGES/atk10.mo
+share/locale/hu/LC_MESSAGES/glib20.mo
+share/locale/hu/LC_MESSAGES/gtk20-properties.mo
+share/locale/hu/LC_MESSAGES/gtk20.mo
+share/locale/it
+share/locale/it/LC_MESSAGES
+share/locale/it/LC_MESSAGES/atk10.mo
+share/locale/it/LC_MESSAGES/gettext-runtime.mo
+share/locale/it/LC_MESSAGES/gettext-tools.mo
+share/locale/it/LC_MESSAGES/glib20.mo
+share/locale/it/LC_MESSAGES/gtk20-properties.mo
+share/locale/it/LC_MESSAGES/gtk20.mo
+share/locale/ja
+share/locale/ja/LC_MESSAGES
+share/locale/ja/LC_MESSAGES/atk10.mo
+share/locale/ja/LC_MESSAGES/gettext-runtime.mo
+share/locale/ja/LC_MESSAGES/gettext-tools.mo
+share/locale/ja/LC_MESSAGES/glib20.mo
+share/locale/ja/LC_MESSAGES/gtk20-properties.mo
+share/locale/ja/LC_MESSAGES/gtk20.mo
+share/locale/nl
+share/locale/nl/LC_MESSAGES
+share/locale/nl/LC_MESSAGES/atk10.mo
+share/locale/nl/LC_MESSAGES/gettext-runtime.mo
+share/locale/nl/LC_MESSAGES/gettext-tools.mo
+share/locale/nl/LC_MESSAGES/glib20.mo
+share/locale/nl/LC_MESSAGES/gtk20-properties.mo
+share/locale/nl/LC_MESSAGES/gtk20.mo
+share/locale/pl
+share/locale/pl/LC_MESSAGES
+share/locale/pl/LC_MESSAGES/atk10.mo
+share/locale/pl/LC_MESSAGES/gettext-runtime.mo
+share/locale/pl/LC_MESSAGES/gettext-tools.mo
+share/locale/pl/LC_MESSAGES/glib20.mo
+share/locale/pl/LC_MESSAGES/gtk20-properties.mo
+share/locale/pl/LC_MESSAGES/gtk20.mo
+share/locale/ru
+share/locale/ru/LC_MESSAGES
+share/locale/ru/LC_MESSAGES/atk10.mo
+share/locale/ru/LC_MESSAGES/gettext-runtime.mo
+share/locale/ru/LC_MESSAGES/gettext-tools.mo
+share/locale/ru/LC_MESSAGES/glib20.mo
+share/locale/ru/LC_MESSAGES/gtk20-properties.mo
+share/locale/ru/LC_MESSAGES/gtk20.mo
+share/locale/pt_BR
+share/locale/pt_BR/LC_MESSAGES
+share/locale/pt_BR/LC_MESSAGES/atk10.mo
+share/locale/pt_BR/LC_MESSAGES/gettext-runtime.mo
+share/locale/pt_BR/LC_MESSAGES/gettext-tools.mo
+share/locale/pt_BR/LC_MESSAGES/glib20.mo
+share/locale/pt_BR/LC_MESSAGES/gtk20-properties.mo
+share/locale/pt_BR/LC_MESSAGES/gtk20.mo
+share/themes
+share/themes/Default
+share/themes/Default/gtk-2.0-key
+share/themes/Default/gtk-2.0-key/gtkrc
+share/themes/Emacs
+share/themes/Emacs/gtk-2.0-key
+share/themes/Emacs/gtk-2.0-key/gtkrc
+share/themes/MS-Windows
+share/themes/MS-Windows/gtk-2.0
+share/themes/MS-Windows/gtk-2.0/gtkrc
+share/themes/Raleigh
+share/themes/Raleigh/gtk-2.0
+share/themes/Raleigh/gtk-2.0/gtkrc
diff --git a/gtk+-2.16.6.filelist b/gtk+-2.16.6.filelist
new file mode 100644 (file)
index 0000000..2b9b82f
--- /dev/null
@@ -0,0 +1,146 @@
+bin
+bin/libglade-2.0-0.dll
+bin/freetype6.dll
+bin/intl.dll
+bin/libatk-1.0-0.dll
+bin/libcairo-2.dll
+bin/libexpat-1.dll
+bin/libfontconfig-1.dll
+bin/libgailutil-18.dll
+bin/libgdk-win32-2.0-0.dll
+bin/libgdk_pixbuf-2.0-0.dll
+bin/libgio-2.0-0.dll
+bin/libglib-2.0-0.dll
+bin/libgmodule-2.0-0.dll
+bin/libgobject-2.0-0.dll
+bin/libgthread-2.0-0.dll
+bin/libgtk-win32-2.0-0.dll
+bin/libjpeg-7.dll
+bin/libpango-1.0-0.dll
+bin/libpangocairo-1.0-0.dll
+bin/libpangoft2-1.0-0.dll
+bin/libpangowin32-1.0-0.dll
+bin/libpng12-0.dll
+bin/libtiff-3.dll
+bin/libtiffxx-3.dll
+bin/zlib1.dll
+lib/gtk-2.0
+lib/gtk-2.0/2.10.0
+lib/gtk-2.0/2.10.0/engines
+lib/gtk-2.0/2.10.0/engines/libpixmap.dll
+lib/gtk-2.0/2.10.0/engines/libwimp.dll
+lib/gtk-2.0/2.10.0/loaders
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-ani.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-bmp.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-gif.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-icns.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-ico.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-jpeg.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-pcx.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-pnm.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-ras.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-tga.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-tiff.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-wbmp.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xbm.dll
+lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xpm.dll
+lib/gtk-2.0/include
+lib/gtk-2.0/include/gdkconfig.h
+lib/gtk-2.0/modules
+lib/gtk-2.0/modules/libgail.dll
+etc
+etc/fonts
+etc/fonts/fonts.conf
+etc/fonts/fonts.dtd
+etc/gtk-2.0
+etc/gtk-2.0/gdk-pixbuf.loaders
+etc/gtk-2.0/gtk.immodules
+etc/gtk-2.0/im-multipress.conf
+etc/pango
+etc/pango/pango.modules
+share/locale/fr
+share/locale/fr/LC_MESSAGES
+share/locale/fr/LC_MESSAGES/atk10.mo
+share/locale/fr/LC_MESSAGES/glib20.mo
+share/locale/fr/LC_MESSAGES/gtk20-properties.mo
+share/locale/fr/LC_MESSAGES/gtk20.mo
+share/locale/de
+share/locale/de/LC_MESSAGES
+share/locale/de/LC_MESSAGES/atk10.mo
+share/locale/de/LC_MESSAGES/glib20.mo
+share/locale/de/LC_MESSAGES/gtk20-properties.mo
+share/locale/de/LC_MESSAGES/gtk20.mo
+share/locale/sv
+share/locale/sv/LC_MESSAGES
+share/locale/sv/LC_MESSAGES/atk10.mo
+share/locale/sv/LC_MESSAGES/glib20.mo
+share/locale/sv/LC_MESSAGES/gtk20-properties.mo
+share/locale/sv/LC_MESSAGES/gtk20.mo
+share/locale/cs
+share/locale/cs/LC_MESSAGES
+share/locale/cs/LC_MESSAGES/atk10.mo
+share/locale/cs/LC_MESSAGES/glib20.mo
+share/locale/cs/LC_MESSAGES/gtk20-properties.mo
+share/locale/cs/LC_MESSAGES/gtk20.mo
+share/locale/es
+share/locale/es/LC_MESSAGES
+share/locale/es/LC_MESSAGES/atk10.mo
+share/locale/es/LC_MESSAGES/glib20.mo
+share/locale/es/LC_MESSAGES/gtk20-properties.mo
+share/locale/es/LC_MESSAGES/gtk20.mo
+share/locale/hu
+share/locale/hu/LC_MESSAGES
+share/locale/hu/LC_MESSAGES/atk10.mo
+share/locale/hu/LC_MESSAGES/glib20.mo
+share/locale/hu/LC_MESSAGES/gtk20-properties.mo
+share/locale/hu/LC_MESSAGES/gtk20.mo
+share/locale/it
+share/locale/it/LC_MESSAGES
+share/locale/it/LC_MESSAGES/atk10.mo
+share/locale/it/LC_MESSAGES/glib20.mo
+share/locale/it/LC_MESSAGES/gtk20-properties.mo
+share/locale/it/LC_MESSAGES/gtk20.mo
+share/locale/ja
+share/locale/ja/LC_MESSAGES
+share/locale/ja/LC_MESSAGES/atk10.mo
+share/locale/ja/LC_MESSAGES/glib20.mo
+share/locale/ja/LC_MESSAGES/gtk20-properties.mo
+share/locale/ja/LC_MESSAGES/gtk20.mo
+share/locale/nl
+share/locale/nl/LC_MESSAGES
+share/locale/nl/LC_MESSAGES/atk10.mo
+share/locale/nl/LC_MESSAGES/glib20.mo
+share/locale/nl/LC_MESSAGES/gtk20-properties.mo
+share/locale/nl/LC_MESSAGES/gtk20.mo
+share/locale/pl
+share/locale/pl/LC_MESSAGES
+share/locale/pl/LC_MESSAGES/atk10.mo
+share/locale/pl/LC_MESSAGES/glib20.mo
+share/locale/pl/LC_MESSAGES/gtk20-properties.mo
+share/locale/pl/LC_MESSAGES/gtk20.mo
+share/locale/ru
+share/locale/ru/LC_MESSAGES
+share/locale/ru/LC_MESSAGES/atk10.mo
+share/locale/ru/LC_MESSAGES/glib20.mo
+share/locale/ru/LC_MESSAGES/gtk20-properties.mo
+share/locale/ru/LC_MESSAGES/gtk20.mo
+share/locale/pt_BR
+share/locale/pt_BR/LC_MESSAGES
+share/locale/pt_BR/LC_MESSAGES/atk10.mo
+share/locale/pt_BR/LC_MESSAGES/glib20.mo
+share/locale/pt_BR/LC_MESSAGES/gtk20-properties.mo
+share/locale/pt_BR/LC_MESSAGES/gtk20.mo
+share/themes
+share/themes/Default
+share/themes/Default/gtk-2.0-key
+share/themes/Default/gtk-2.0-key/gtkrc
+share/themes/Emacs
+share/themes/Emacs/gtk-2.0-key
+share/themes/Emacs/gtk-2.0-key/gtkrc
+share/themes/MS-Windows
+share/themes/MS-Windows/gtk-2.0
+share/themes/MS-Windows/gtk-2.0/gtkrc
+share/themes/Raleigh
+share/themes/Raleigh/gtk-2.0
+share/themes/Raleigh/gtk-2.0/gtkrc
diff --git a/gtk+-2.18.5.filelist b/gtk+-2.18.5.filelist
new file mode 100644 (file)
index 0000000..cb2f3be
--- /dev/null
@@ -0,0 +1,130 @@
+bin
+bin/libglade-2.0-0.dll
+bin/freetype6.dll
+bin/intl.dll
+bin/libatk-1.0-0.dll
+bin/libcairo-2.dll
+bin/libexpat-1.dll
+bin/libfontconfig-1.dll
+bin/libgailutil-18.dll
+bin/libgdk-win32-2.0-0.dll
+bin/libgdk_pixbuf-2.0-0.dll
+bin/libgio-2.0-0.dll
+bin/libglib-2.0-0.dll
+bin/libgmodule-2.0-0.dll
+bin/libgobject-2.0-0.dll
+bin/libgthread-2.0-0.dll
+bin/libgtk-win32-2.0-0.dll
+bin/libjpeg-7.dll
+bin/libpango-1.0-0.dll
+bin/libpangocairo-1.0-0.dll
+bin/libpangoft2-1.0-0.dll
+bin/libpangowin32-1.0-0.dll
+bin/libpng12-0.dll
+bin/libtiff-3.dll
+bin/libtiffxx-3.dll
+bin/zlib1.dll
+lib/gtk-2.0
+lib/gtk-2.0/2.10.0
+lib/gtk-2.0/2.10.0/engines
+lib/gtk-2.0/2.10.0/engines/libpixmap.dll
+lib/gtk-2.0/2.10.0/engines/libwimp.dll
+lib/gtk-2.0/include
+lib/gtk-2.0/include/gdkconfig.h
+lib/gtk-2.0/modules
+lib/gtk-2.0/modules/libgail.dll
+etc
+etc/fonts
+etc/fonts/fonts.conf
+etc/fonts/fonts.dtd
+etc/gtk-2.0
+etc/gtk-2.0/gdk-pixbuf.loaders
+etc/gtk-2.0/gtk.immodules
+etc/gtk-2.0/im-multipress.conf
+etc/pango
+etc/pango/pango.modules
+share/locale/fr
+share/locale/fr/LC_MESSAGES
+share/locale/fr/LC_MESSAGES/atk10.mo
+share/locale/fr/LC_MESSAGES/glib20.mo
+share/locale/fr/LC_MESSAGES/gtk20-properties.mo
+share/locale/fr/LC_MESSAGES/gtk20.mo
+share/locale/de
+share/locale/de/LC_MESSAGES
+share/locale/de/LC_MESSAGES/atk10.mo
+share/locale/de/LC_MESSAGES/glib20.mo
+share/locale/de/LC_MESSAGES/gtk20-properties.mo
+share/locale/de/LC_MESSAGES/gtk20.mo
+share/locale/sv
+share/locale/sv/LC_MESSAGES
+share/locale/sv/LC_MESSAGES/atk10.mo
+share/locale/sv/LC_MESSAGES/glib20.mo
+share/locale/sv/LC_MESSAGES/gtk20-properties.mo
+share/locale/sv/LC_MESSAGES/gtk20.mo
+share/locale/cs
+share/locale/cs/LC_MESSAGES
+share/locale/cs/LC_MESSAGES/atk10.mo
+share/locale/cs/LC_MESSAGES/glib20.mo
+share/locale/cs/LC_MESSAGES/gtk20-properties.mo
+share/locale/cs/LC_MESSAGES/gtk20.mo
+share/locale/es
+share/locale/es/LC_MESSAGES
+share/locale/es/LC_MESSAGES/atk10.mo
+share/locale/es/LC_MESSAGES/glib20.mo
+share/locale/es/LC_MESSAGES/gtk20-properties.mo
+share/locale/es/LC_MESSAGES/gtk20.mo
+share/locale/hu
+share/locale/hu/LC_MESSAGES
+share/locale/hu/LC_MESSAGES/atk10.mo
+share/locale/hu/LC_MESSAGES/glib20.mo
+share/locale/hu/LC_MESSAGES/gtk20-properties.mo
+share/locale/hu/LC_MESSAGES/gtk20.mo
+share/locale/it
+share/locale/it/LC_MESSAGES
+share/locale/it/LC_MESSAGES/atk10.mo
+share/locale/it/LC_MESSAGES/glib20.mo
+share/locale/it/LC_MESSAGES/gtk20-properties.mo
+share/locale/it/LC_MESSAGES/gtk20.mo
+share/locale/ja
+share/locale/ja/LC_MESSAGES
+share/locale/ja/LC_MESSAGES/atk10.mo
+share/locale/ja/LC_MESSAGES/glib20.mo
+share/locale/ja/LC_MESSAGES/gtk20-properties.mo
+share/locale/ja/LC_MESSAGES/gtk20.mo
+share/locale/nl
+share/locale/nl/LC_MESSAGES
+share/locale/nl/LC_MESSAGES/atk10.mo
+share/locale/nl/LC_MESSAGES/glib20.mo
+share/locale/nl/LC_MESSAGES/gtk20-properties.mo
+share/locale/nl/LC_MESSAGES/gtk20.mo
+share/locale/pl
+share/locale/pl/LC_MESSAGES
+share/locale/pl/LC_MESSAGES/atk10.mo
+share/locale/pl/LC_MESSAGES/glib20.mo
+share/locale/pl/LC_MESSAGES/gtk20-properties.mo
+share/locale/pl/LC_MESSAGES/gtk20.mo
+share/locale/ru
+share/locale/ru/LC_MESSAGES
+share/locale/ru/LC_MESSAGES/atk10.mo
+share/locale/ru/LC_MESSAGES/glib20.mo
+share/locale/ru/LC_MESSAGES/gtk20-properties.mo
+share/locale/ru/LC_MESSAGES/gtk20.mo
+share/locale/pt_BR
+share/locale/pt_BR/LC_MESSAGES
+share/locale/pt_BR/LC_MESSAGES/atk10.mo
+share/locale/pt_BR/LC_MESSAGES/glib20.mo
+share/locale/pt_BR/LC_MESSAGES/gtk20-properties.mo
+share/locale/pt_BR/LC_MESSAGES/gtk20.mo
+share/themes
+share/themes/Default
+share/themes/Default/gtk-2.0-key
+share/themes/Default/gtk-2.0-key/gtkrc
+share/themes/Emacs
+share/themes/Emacs/gtk-2.0-key
+share/themes/Emacs/gtk-2.0-key/gtkrc
+share/themes/MS-Windows
+share/themes/MS-Windows/gtk-2.0
+share/themes/MS-Windows/gtk-2.0/gtkrc
+share/themes/Raleigh
+share/themes/Raleigh/gtk-2.0
+share/themes/Raleigh/gtk-2.0/gtkrc
diff --git a/gtk-glade/.gitignore b/gtk-glade/.gitignore
new file mode 100644 (file)
index 0000000..398d60f
--- /dev/null
@@ -0,0 +1,5 @@
+linphone-3
+.libs
+.deps
+linphone.res
+
diff --git a/gtk-glade/Makefile.am b/gtk-glade/Makefile.am
new file mode 100644 (file)
index 0000000..4a74424
--- /dev/null
@@ -0,0 +1,92 @@
+GLADE_FILES=   about.glade \
+               main.glade \
+               password.glade \
+               contact.glade \
+               incoming_call.glade \
+               parameters.glade \
+               sip_account.glade \
+               chatroom.glade \
+               call_logs.glade \
+               log.glade \
+               buddylookup.glade \
+               waiting.glade
+
+PIXMAPS=       linphone2.png \
+               linphone.png \
+               stock_people.png 
+
+LINPHONE_ICO_RC_FILE=linphone.rc
+LINPHONE_ICO_FILE=linphone.ico
+
+EXTRA_DIST=    $(PIXMAPS) \
+               $(GLADE_FILES) \
+               linphone.iss \
+               $(LINPHONE_ICO_RC_FILE) \
+               $(LINPHONE_ICO_FILE)
+
+
+if BUILD_GLADE_UI
+
+BUILT_SOURCES=version_date.h
+
+bin_PROGRAMS=linphone-3
+
+linphone_3_SOURCES=    \
+                       main.c \
+                       propertybox.c \
+                       friendlist.c \
+                       support.c \
+                       chat.c \
+                       calllogs.c \
+                       logging.c \
+                       update.c \
+                       buddylookup.c \
+                       utils.c \
+                       setupwizard.c\
+                       incall_view.c \
+                       loginframe.c \
+                       linphone.h 
+
+linphone_3_LDADD=$(top_builddir)/oRTP/src/libortp.la \
+               $(top_builddir)/mediastreamer2/src/libmediastreamer.la \
+               $(top_builddir)/coreapi/liblinphone.la \
+                       $(LIBGTK_LIBS) $(INTLLIBS) \
+                       $(LIBGLADE_LIBS)
+
+
+if BUILD_WIN32
+
+linphone.res:  $(LINPHONE_ICO_RC_FILE) $(LINPHONE_ICO_FILE)
+       windres $(LINPHONE_ICO_RC_FILE) -O coff -o linphone.res
+
+linphone_3_LDADD+=linphone.res -lwininet
+linphone_3_LDFLAGS=-Wl,--export-all-symbols -mwindows
+else
+linphone_3_LDFLAGS=-export-dynamic
+endif
+
+gladedir=$(datadir)/linphone
+glade_DATA=$(GLADE_FILES) $(PIXMAPS) $(top_srcdir)/COPYING
+
+#all-local:    gtk-linphone.ui 
+
+#gtk-linphone.ui:      gtk-linphone.glade
+#      gtk-builder-convert gtk-linphone.glade $@
+
+endif
+
+
+AM_CFLAGS= -DIN_LINPHONE -I$(top_srcdir)/coreapi/ \
+               -I$(top_srcdir)/mediastreamer2/include/ \
+               $(LIBGLADE_CFLAGS) $(STRICT_OPTIONS) $(LIBGTK_CFLAGS) $(IPV6_CFLAGS) \
+               $(ORTP_CFLAGS) $(OSIP_CFLAGS) 
+
+
+version_date.h: $(top_srcdir)/configure.in
+       echo "#define LINPHONE_VERSION_DATE \"$(VERSION)-`date +%y%m%d`\"" > $@
+
+newdate:
+       rm -f version_date.h
+
+CLEANFILES=version_date.h linphone.res
+
diff --git a/gtk-glade/about.glade b/gtk-glade/about.glade
new file mode 100644 (file)
index 0000000..96c6b5f
--- /dev/null
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--Generated with glade3 3.4.5 on Mon Jun  2 22:01:30 2008 -->
+<glade-interface>
+  <widget class="GtkAboutDialog" id="about">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">About linphone</property>
+    <property name="resizable">False</property>
+    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+    <property name="icon">linphone2.png</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="has_separator">False</property>
+    <property name="program_name">Linphone</property>
+    <property name="version">undef</property>
+    <property name="copyright" translatable="yes">Created by Simon Morlat
+</property>
+    <property name="comments" translatable="yes">An internet video phone using the standart SIP (rfc3261) protocol.</property>
+    <property name="website">http://www.linphone.org</property>
+    <property name="license">GPL</property>
+    <property name="authors">Simon Morlat</property>
+    <property name="documenters"></property>
+    <property name="translator_credits" translatable="yes">fr: Simon Morlat
+en: Simon Morlat and Delphine Perreau
+it: Alberto Zanoni &lt;alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it&gt;
+de: Jean-Jacques Sarton &lt;jj.sarton@-NO-SPAM-PLEASE-t-online.de&gt;
+sv: Daniel Nylander &lt;po@danielnylander.se&gt;
+es: Jesus Benitez &lt;gnelson at inMail dot sk&gt;
+ja: YAMAGUCHI YOSHIYA &lt;yushiya@anet.ne.jp&gt;
+pt_BR: Rafael Caesar Lenzi &lt;rc_lenzi@yahoo.com.br&gt;
+pl: Robert Nasiadek &lt;darkone@darkone.pl&gt;
+cs: Petr Pisar &lt;petr.pisar@atlas.cz&gt;
+hu: anonymous
+</property>
+    <property name="artists">Icons by Pablo Marcello Moia
+</property>
+    <property name="logo">linphone.png</property>
+    <signal name="response" handler="linphone_gtk_about_response"/>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox8">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <placeholder/>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area7">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>
diff --git a/gtk-glade/buddylookup.c b/gtk-glade/buddylookup.c
new file mode 100644 (file)
index 0000000..55c3f33
--- /dev/null
@@ -0,0 +1,305 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#include "linphone.h"
+#include "sipsetup.h"
+
+static void linphone_gtk_display_lookup_results(GtkWidget *w, const MSList *results);
+
+enum {
+       LOOKUP_RESULT_NAME,
+       LOOKUP_RESULT_SIP_URI,
+       LOOKUP_RESULT_ADDRESS,
+       LOOKUP_RESULT_ICON,
+       LOOKUP_RESULT_NCOL
+};
+
+void linphone_gtk_buddy_lookup_window_destroyed(GtkWidget *w){
+       guint tid=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"typing_timeout"));
+       if (tid!=0){
+               g_source_remove(tid);
+       }
+       tid=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"buddylookup_processing"));
+       if (tid!=0){
+               g_source_remove(tid);
+       }
+}
+
+static void enable_add_buddy_button(GtkWidget *w){
+       gtk_widget_set_sensitive(linphone_gtk_get_widget(w,"add_buddy"),TRUE);
+}
+
+static void disable_add_buddy_button(GtkWidget *w){
+       gtk_widget_set_sensitive(linphone_gtk_get_widget(w,"add_buddy"),FALSE);
+}
+
+static void buddy_selection_changed(GtkWidget *w){
+       GtkWidget *results=linphone_gtk_get_widget(w,"search_results");
+       GtkTreeSelection *select;
+       GtkTreeIter iter;
+       GtkTreeModel *model;
+       enable_add_buddy_button(w);
+       
+       select = gtk_tree_view_get_selection(GTK_TREE_VIEW(results));
+       if (gtk_tree_selection_get_selected (select, &model, &iter))
+       {
+               GtkTreePath *path=gtk_tree_model_get_path(model,&iter);
+               gtk_tree_view_collapse_all(GTK_TREE_VIEW(results));
+               gtk_tree_view_expand_row(GTK_TREE_VIEW(results),path,FALSE);
+               gtk_tree_path_free(path);
+       }
+}
+
+GtkWidget * linphone_gtk_show_buddy_lookup_window(SipSetupContext *ctx){
+       GtkTreeStore *store;
+       GtkCellRenderer *renderer,*pbuf_renderer;
+       GtkTreeViewColumn *column;
+       GtkTreeSelection *select;
+       GtkWidget *w=linphone_gtk_create_window("buddylookup");
+       GtkWidget *results=linphone_gtk_get_widget(w,"search_results");
+       GtkProgressBar *pb=GTK_PROGRESS_BAR(linphone_gtk_get_widget(w,"progressbar"));
+       
+       store = gtk_tree_store_new(LOOKUP_RESULT_NCOL, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, GDK_TYPE_PIXBUF);
+       
+       /*gtk_tree_view_set_hover_expand(GTK_TREE_VIEW(results),TRUE);*/
+       gtk_tree_view_set_model(GTK_TREE_VIEW(results),GTK_TREE_MODEL(store));
+       g_object_unref(G_OBJECT(store));
+
+       renderer = gtk_cell_renderer_text_new ();
+       column = gtk_tree_view_column_new_with_attributes (_("Firstname, Lastname"),
+                                                   renderer,
+                                                   "markup", LOOKUP_RESULT_NAME,
+                                                   NULL);
+       g_object_set (G_OBJECT(column), "resizable", TRUE, NULL);
+       
+
+       pbuf_renderer=gtk_cell_renderer_pixbuf_new();
+       g_object_set(G_OBJECT(renderer),"is-expander",TRUE,NULL);
+       gtk_tree_view_column_pack_start(column,pbuf_renderer,FALSE);
+       gtk_tree_view_column_add_attribute  (column,pbuf_renderer,
+                                                         "pixbuf",
+                                                         LOOKUP_RESULT_ICON);
+       gtk_tree_view_append_column (GTK_TREE_VIEW (results), column);
+       
+/*
+       column = gtk_tree_view_column_new_with_attributes (_("SIP address"),
+                                                   renderer,
+                                                   "text", LOOKUP_RESULT_SIP_URI,
+                                                   NULL);
+       g_object_set (G_OBJECT(column), "resizable", TRUE, NULL);
+       gtk_tree_view_append_column (GTK_TREE_VIEW (results), column);
+*/
+
+       select = gtk_tree_view_get_selection (GTK_TREE_VIEW (results));
+       gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
+       g_signal_connect_swapped(G_OBJECT(select),"changed",(GCallback)buddy_selection_changed,w);
+/*
+#if GTK_CHECK_VERSION(2,12,0)
+       gtk_tree_view_set_tooltip_column(GTK_TREE_VIEW(results),LOOKUP_RESULT_ADDRESS);
+#endif
+*/
+       g_object_set_data(G_OBJECT(w),"SipSetupContext",ctx);
+       g_object_weak_ref(G_OBJECT(w),(GWeakNotify)linphone_gtk_buddy_lookup_window_destroyed,w);
+       //g_signal_connect_swapped(G_OBJECT(w),"destroy",(GCallback)linphone_gtk_buddy_lookup_window_destroyed,w);
+       gtk_progress_bar_set_fraction(pb,0);
+       gtk_progress_bar_set_text(pb,NULL);
+       gtk_dialog_add_button(GTK_DIALOG(w),GTK_STOCK_CLOSE,GTK_RESPONSE_CLOSE);
+       g_object_set_data(G_OBJECT(w),"last_state",GINT_TO_POINTER(-1));
+
+       gtk_widget_show(w);
+       return w;
+}
+
+
+void linphone_gtk_buddy_lookup_set_keyword(GtkWidget *w, const char *kw){
+       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"keyword")),kw);
+}
+
+static gboolean linphone_gtk_process_buddy_lookup(GtkWidget *w){
+       BuddyLookupStatus bls;
+       SipSetupContext *ctx;
+       int last_state;
+       gchar *tmp;
+       MSList *results=NULL;
+       GtkProgressBar *pb=GTK_PROGRESS_BAR(linphone_gtk_get_widget(w,"progressbar"));
+       BuddyLookupRequest *req=(BuddyLookupRequest*)g_object_get_data(G_OBJECT(w),"buddylookup_request");
+
+       ctx=(SipSetupContext*)g_object_get_data(G_OBJECT(w),"SipSetupContext"); 
+       last_state=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"last_state"));
+
+       if (req==NULL) {
+               g_object_set_data(G_OBJECT(w),"buddylookup_processing",GINT_TO_POINTER(0));
+               return FALSE;
+       }
+       bls=req->status;
+       if (last_state==bls) return TRUE;
+       
+       switch(bls){
+               case BuddyLookupNone:
+                       gtk_progress_bar_set_fraction(pb,0);
+                       gtk_progress_bar_set_text(pb,NULL);
+                       break;
+               case BuddyLookupFailure:
+                       gtk_progress_bar_set_fraction(pb,0);
+                       gtk_progress_bar_set_text(pb,_("Error communicating with server."));
+                       break;
+               case BuddyLookupConnecting:
+                       gtk_progress_bar_set_fraction(pb,0.2);
+                       gtk_progress_bar_set_text(pb,_("Connecting..."));
+                       break;
+               case BuddyLookupConnected:
+                       gtk_progress_bar_set_fraction(pb,0.4);
+                       gtk_progress_bar_set_text(pb,_("Connected"));
+                       break;
+               case BuddyLookupReceivingResponse:
+                       gtk_progress_bar_set_fraction(pb,0.8);
+                       gtk_progress_bar_set_text(pb,_("Receiving data..."));
+                       break;
+               case BuddyLookupDone:
+                       results=req->results;
+                       linphone_gtk_display_lookup_results(
+                                       linphone_gtk_get_widget(w,"search_results"),
+                                       results);
+                       gtk_progress_bar_set_fraction(pb,1);
+                       tmp=g_strdup_printf(ngettext("Found %i contact",
+                        "Found %i contacts", ms_list_size(results)),
+                    ms_list_size(results));
+                       gtk_progress_bar_set_text(pb,tmp);
+                       g_free(tmp);
+                       sip_setup_context_buddy_lookup_free(ctx,req);
+                       g_object_set_data(G_OBJECT(w),"buddylookup_request",NULL);
+                       break;
+       }
+       g_object_set_data(G_OBJECT(w),"last_state",GINT_TO_POINTER(bls));
+       return TRUE;
+}
+
+static gboolean keyword_typing_finished(GtkWidget *w){
+       guint tid=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"typing_timeout"));
+       const char *keyword;
+       SipSetupContext *ctx;
+       if (tid!=0){
+               g_source_remove(tid);
+       }
+       keyword=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(w,"keyword")));
+       if (strlen(keyword)>=1){
+               BuddyLookupRequest *req;
+               guint tid2;
+               ctx=(SipSetupContext*)g_object_get_data(G_OBJECT(w),"SipSetupContext");
+               req=(BuddyLookupRequest*)g_object_get_data(G_OBJECT(w),"buddylookup_request");
+               if (req!=NULL){
+                       sip_setup_context_buddy_lookup_free(ctx,req);
+               }
+               req=sip_setup_context_create_buddy_lookup_request(ctx);
+               buddy_lookup_request_set_key(req,keyword);
+               sip_setup_context_buddy_lookup_submit(ctx,req);
+               g_object_set_data(G_OBJECT(w),"buddylookup_request",req);
+               if (g_object_get_data(G_OBJECT(w),"buddylookup_processing")==NULL){
+                       tid2=g_timeout_add(20,(GSourceFunc)linphone_gtk_process_buddy_lookup,w);
+                       g_object_set_data(G_OBJECT(w),"buddylookup_processing",GINT_TO_POINTER(tid2));
+               }
+       }
+       return FALSE;
+}
+
+void linphone_gtk_keyword_changed(GtkEditable *e){
+       GtkWidget *w=gtk_widget_get_toplevel(GTK_WIDGET(e));
+       guint tid=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"typing_timeout"));
+       if (tid!=0){
+               g_source_remove(tid);
+       }
+       tid=g_timeout_add(2000,(GSourceFunc)keyword_typing_finished,w);
+       g_object_set_data(G_OBJECT(w),"typing_timeout",GINT_TO_POINTER(tid));
+}
+
+static void linphone_gtk_display_lookup_results(GtkWidget *w, const MSList *results){
+       GtkTreeStore *store;
+       GtkTreeIter iter;
+       gchar *tmp;
+       const MSList *elem;
+       store=GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(w)));
+       gtk_tree_store_clear(store);
+       disable_add_buddy_button(gtk_widget_get_toplevel(w));
+       for(elem=results;elem!=NULL;elem=elem->next){
+               BuddyInfo *bi=(BuddyInfo*)elem->data;
+               GdkPixbuf *pbuf;
+               GtkTreeIter depth1;
+               gtk_tree_store_append(store,&iter,NULL);
+               tmp=g_strdup_printf("%s, %s (%s)",bi->firstname,bi->lastname,bi->displayname);
+               gtk_tree_store_set(store,&iter,LOOKUP_RESULT_NAME, tmp,-1);
+               g_free(tmp);
+               gtk_tree_store_set(store,&iter,LOOKUP_RESULT_SIP_URI, bi->sip_uri,-1);
+               tmp=g_strdup_printf("%s, %s %s\n%s",bi->address.street, bi->address.zip, bi->address.town, bi->address.country);
+               gtk_tree_store_set(store,&iter,LOOKUP_RESULT_ADDRESS, tmp,-1);
+               g_free(tmp);
+               if (bi->image_data!=NULL){
+                       pbuf=_gdk_pixbuf_new_from_memory_at_scale(bi->image_data,bi->image_length,-1,40,TRUE);
+                       if (pbuf) {
+                               gtk_tree_store_set(store,&iter,LOOKUP_RESULT_ICON,pbuf,-1);
+                               g_object_unref(G_OBJECT(pbuf));
+                       }
+               }
+               gtk_tree_store_append(store,&depth1,&iter);
+               tmp=g_strdup_printf("<big>%s, %s (%s)</big>\n<i>%s</i>, <b>%s</b> %s\n%s\n%s",
+                       bi->firstname,bi->lastname,bi->displayname,bi->address.street,
+                       bi->address.zip, bi->address.town, bi->address.country,bi->sip_uri);
+               gtk_tree_store_set(store,&depth1,LOOKUP_RESULT_NAME,tmp,-1);
+               g_free(tmp);
+               if (bi->image_data!=NULL){
+                       pbuf=_gdk_pixbuf_new_from_memory_at_scale(bi->image_data,bi->image_length,-1,-1,TRUE);
+                       if (pbuf) {
+                               gtk_tree_store_set(store,&depth1,LOOKUP_RESULT_ICON,pbuf,-1);
+                               g_object_unref(G_OBJECT(pbuf));
+                       }
+               }
+       }
+}
+
+void linphone_gtk_add_buddy_from_database(GtkWidget *button){
+       GtkWidget *w=gtk_widget_get_toplevel(button);
+       GtkTreeSelection *select;
+       GtkTreeIter iter;
+       GtkTreeModel *model;
+       select = gtk_tree_view_get_selection(GTK_TREE_VIEW(linphone_gtk_get_widget(w,"search_results")));
+       if (gtk_tree_selection_get_selected (select, &model, &iter))
+       {
+               char *uri;
+               char *name;
+               char *addr;
+               LinphoneFriend *lf;
+               int presence=linphone_gtk_get_ui_config_int("use_subscribe_notify",1);
+               gtk_tree_model_get (model, &iter,LOOKUP_RESULT_SIP_URI , &uri,LOOKUP_RESULT_NAME, &name, -1);
+               addr=g_strdup_printf("%s <%s>",name,uri);
+
+               lf=linphone_friend_new_with_addr(addr);
+               linphone_friend_set_inc_subscribe_policy(lf,presence ? LinphoneSPAccept : LinphoneSPDeny);
+               linphone_friend_send_subscribe(lf,presence);
+               linphone_core_add_friend(linphone_gtk_get_core(),lf);
+               linphone_gtk_show_friends();
+               g_free(addr);
+               g_free(uri);
+               g_free(name);
+       }
+}
+
+/*called when double clicking on a contact */
+void linphone_gtk_buddy_lookup_contact_activated(GtkWidget *treeview){
+       linphone_gtk_add_buddy_from_database(treeview);
+       gtk_widget_destroy(gtk_widget_get_toplevel(treeview));
+}
diff --git a/gtk-glade/buddylookup.glade b/gtk-glade/buddylookup.glade
new file mode 100644 (file)
index 0000000..2e6eb96
--- /dev/null
@@ -0,0 +1,163 @@
+<?xml version="1.0"?>
+<glade-interface>
+  <!-- interface-requires gtk+ 2.16 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <widget class="GtkDialog" id="buddylookup">
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Search contacts in directory</property>
+    <property name="window_position">center-on-parent</property>
+    <property name="icon">linphone2.png</property>
+    <property name="type_hint">dialog</property>
+    <property name="has_separator">False</property>
+    <signal name="response" handler="gtk_widget_destroy"/>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <property name="spacing">2</property>
+        <child>
+          <widget class="GtkFrame" id="frame1">
+            <property name="visible">True</property>
+            <property name="border_width">5</property>
+            <property name="label_xalign">0</property>
+            <child>
+              <widget class="GtkAlignment" id="alignment1">
+                <property name="visible">True</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <widget class="GtkVBox" id="vbox2">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkEntry" id="keyword">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="has_focus">True</property>
+                        <signal name="changed" handler="linphone_gtk_keyword_changed"/>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkScrolledWindow" id="scrolledwindow1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="hscrollbar_policy">automatic</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <property name="shadow_type">etched-in</property>
+                        <child>
+                          <widget class="GtkTreeView" id="search_results">
+                            <property name="width_request">512</property>
+                            <property name="height_request">140</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <signal name="row_activated" handler="linphone_gtk_buddy_lookup_contact_activated"/>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="padding">6</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkProgressBar" id="progressbar">
+                        <property name="visible">True</property>
+                        <property name="activity_mode">True</property>
+                        <property name="show_text">True</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkHButtonBox" id="hbuttonbox1">
+                        <property name="visible">True</property>
+                        <child>
+                          <widget class="GtkButton" id="add_buddy">
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <signal name="clicked" handler="linphone_gtk_add_buddy_from_database"/>
+                            <child>
+                              <widget class="GtkHBox" id="hbox1">
+                                <property name="visible">True</property>
+                                <child>
+                                  <widget class="GtkImage" id="image1">
+                                    <property name="visible">True</property>
+                                    <property name="stock">gtk-add</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="label2">
+                                    <property name="visible">True</property>
+                                    <property name="label" translatable="yes">Add to my list</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="padding">5</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label1">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">&lt;b&gt;Search somebody&lt;/b&gt;</property>
+                <property name="use_markup">True</property>
+              </widget>
+              <packing>
+                <property name="type">label_item</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="layout_style">end</property>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>
diff --git a/gtk-glade/call_logs.glade b/gtk-glade/call_logs.glade
new file mode 100644 (file)
index 0000000..d2ac682
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--Generated with glade3 3.4.5 on Wed Jul 30 17:55:28 2008 -->
+<glade-interface>
+  <widget class="GtkDialog" id="call_logs">
+    <property name="width_request">500</property>
+    <property name="height_request">370</property>
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Call history</property>
+    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+    <property name="icon">linphone2.png</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="has_separator">False</property>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <property name="spacing">2</property>
+        <child>
+          <widget class="GtkScrolledWindow" id="scrolledwindow1">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+            <child>
+              <widget class="GtkTextView" id="logtextview">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="editable">False</property>
+                <property name="wrap_mode">GTK_WRAP_WORD</property>
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <widget class="GtkButton" id="button1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes">gtk-close</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">0</property>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>
diff --git a/gtk-glade/calllogs.c b/gtk-glade/calllogs.c
new file mode 100644 (file)
index 0000000..b652f9a
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#include "linphone.h"
+
+void linphone_gtk_call_log_update(GtkWidget *w){
+       GtkTextView *v=GTK_TEXT_VIEW(linphone_gtk_get_widget(w,"logtextview"));
+       GtkTextBuffer *b=gtk_text_view_get_buffer(v);
+       GtkTextIter iter,begin;
+       int off;
+       char *logmsg;
+       const MSList *logs;
+       for (logs=linphone_core_get_call_logs(linphone_gtk_get_core());logs!=NULL;logs=logs->next){
+               LinphoneCallLog *cl=(LinphoneCallLog*)logs->data;
+               logmsg=linphone_call_log_to_str(cl);
+               gtk_text_buffer_get_end_iter(b,&iter);
+               off=gtk_text_iter_get_offset(&iter);
+               gtk_text_buffer_insert(b,&iter,logmsg,-1);
+               gtk_text_buffer_get_end_iter(b,&iter);
+               gtk_text_buffer_insert(b,&iter,"\n",-1);
+               gtk_text_buffer_get_end_iter(b,&iter);
+               gtk_text_buffer_get_iter_at_offset(b,&begin,off);
+               gtk_text_buffer_apply_tag_by_name(b,cl->dir==LinphoneCallOutgoing ? "green" : "blue" ,&begin,&iter);
+               ms_free(logmsg);        
+       }
+       gtk_text_buffer_get_end_iter(b,&iter);
+       gtk_text_view_scroll_to_iter(v,&iter,0,FALSE,0,0);
+}
+
+void linphone_gtk_call_log_response(GtkWidget *w){
+       GtkWidget *mw=linphone_gtk_get_main_window();
+       g_object_set_data(G_OBJECT(mw),"call_logs",NULL);
+       gtk_widget_destroy(w);
+}
+
+GtkWidget * linphone_gtk_show_call_logs(void){
+       GtkWidget *mw=linphone_gtk_get_main_window();
+       GtkTextBuffer *b;
+       GtkWidget *w=(GtkWidget*)g_object_get_data(G_OBJECT(linphone_gtk_get_main_window()),"call_logs");
+       if (w==NULL){
+               w=linphone_gtk_create_window("call_logs");
+               g_object_set_data(G_OBJECT(mw),"call_logs",w);
+               g_signal_connect(G_OBJECT(w),"response",(GCallback)linphone_gtk_call_log_response,NULL);
+               gtk_widget_show(w);
+               b=gtk_text_view_get_buffer(GTK_TEXT_VIEW(linphone_gtk_get_widget(w,"logtextview")));
+               gtk_text_buffer_create_tag(b,"blue","foreground","blue",NULL);
+               gtk_text_buffer_create_tag(b,"green","foreground","green",NULL);
+               linphone_gtk_call_log_update(w);
+       }else gtk_window_present(GTK_WINDOW(w));
+       return w;
+}
+
diff --git a/gtk-glade/chat.c b/gtk-glade/chat.c
new file mode 100644 (file)
index 0000000..bc61850
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#include "linphone.h"
+
+GtkWidget * linphone_gtk_init_chatroom(LinphoneChatRoom *cr, const char *with){
+       GtkWidget *w;
+       GtkTextBuffer *b;
+       gchar *tmp;
+       w=linphone_gtk_create_window("chatroom");
+       tmp=g_strdup_printf(_("Chat with %s"),with);
+       gtk_window_set_title(GTK_WINDOW(w),tmp);
+       g_free(tmp);
+       g_object_set_data(G_OBJECT(w),"cr",cr);
+       gtk_widget_show(w);
+       linphone_chat_room_set_user_data(cr,w);
+       b=gtk_text_view_get_buffer(GTK_TEXT_VIEW(linphone_gtk_get_widget(w,"textlog")));
+       gtk_text_buffer_create_tag(b,"blue","foreground","blue",NULL);
+       gtk_text_buffer_create_tag(b,"green","foreground","green",NULL);
+       return w;
+}
+
+void linphone_gtk_create_chatroom(const char *with){
+       LinphoneChatRoom *cr=linphone_core_create_chat_room(linphone_gtk_get_core(),with);
+       if (!cr) return;
+       linphone_gtk_init_chatroom(cr,with);
+}
+
+void linphone_gtk_chat_destroyed(GtkWidget *w){
+       LinphoneChatRoom *cr=(LinphoneChatRoom*)g_object_get_data(G_OBJECT(w),"cr");
+       linphone_chat_room_destroy(cr);
+}
+
+void linphone_gtk_chat_close(GtkWidget *button){
+       GtkWidget *w=gtk_widget_get_toplevel(button);
+       gtk_widget_destroy(w);
+}
+
+void linphone_gtk_push_text(GtkTextView *v, const char *from, const char *message, gboolean me){
+       GtkTextBuffer *b=gtk_text_view_get_buffer(v);
+       GtkTextIter iter,begin;
+       int off;
+       gtk_text_buffer_get_end_iter(b,&iter);
+       off=gtk_text_iter_get_offset(&iter);
+       gtk_text_buffer_insert(b,&iter,from,-1);
+       gtk_text_buffer_get_end_iter(b,&iter);
+       gtk_text_buffer_insert(b,&iter,":\t",-1);
+       gtk_text_buffer_get_end_iter(b,&iter);
+       gtk_text_buffer_get_iter_at_offset(b,&begin,off);
+       gtk_text_buffer_apply_tag_by_name(b,me ? "green" : "blue" ,&begin,&iter);
+       gtk_text_buffer_insert(b,&iter,message,-1);
+       gtk_text_buffer_get_end_iter(b,&iter);
+       gtk_text_buffer_insert(b,&iter,"\n",-1);
+       gtk_text_buffer_get_end_iter(b,&iter);
+       gtk_text_view_scroll_to_iter(v,&iter,0,FALSE,0,0);
+}
+
+const char* linphone_gtk_get_used_identity(){
+       LinphoneCore *lc=linphone_gtk_get_core();
+       LinphoneProxyConfig *cfg;
+       linphone_core_get_default_proxy(lc,&cfg);
+       if (cfg) return linphone_proxy_config_get_identity(cfg);
+       else return linphone_core_get_primary_contact(lc);
+}
+
+void linphone_gtk_send_text(GtkWidget *button){
+       GtkWidget *w=gtk_widget_get_toplevel(button);
+       GtkWidget *entry=linphone_gtk_get_widget(w,"text_entry");
+       LinphoneChatRoom *cr=(LinphoneChatRoom*)g_object_get_data(G_OBJECT(w),"cr");
+       const gchar *entered;
+       entered=gtk_entry_get_text(GTK_ENTRY(entry));
+       if (strlen(entered)>0) {
+               linphone_gtk_push_text(GTK_TEXT_VIEW(linphone_gtk_get_widget(w,"textlog")),
+                               linphone_gtk_get_used_identity(),
+                               entered,TRUE);
+               linphone_chat_room_send_message(cr,entered);
+               gtk_entry_set_text(GTK_ENTRY(entry),"");
+       }
+}
+
+void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, const char *from, const char *message){
+       GtkWidget *w=(GtkWidget*)linphone_chat_room_get_user_data(room);
+       if (w==NULL){
+               w=linphone_gtk_init_chatroom(room,from);
+       }
+       linphone_gtk_push_text(GTK_TEXT_VIEW(linphone_gtk_get_widget(w,"textlog")),
+                               from,
+                               message,FALSE);
+       gtk_window_present(GTK_WINDOW(w));
+       /*gtk_window_set_urgency_hint(GTK_WINDOW(w),TRUE);*/
+}
+
diff --git a/gtk-glade/chatroom.glade b/gtk-glade/chatroom.glade
new file mode 100644 (file)
index 0000000..870ae53
--- /dev/null
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--Generated with glade3 3.4.5 on Wed Jul 30 15:51:13 2008 -->
+<glade-interface>
+  <widget class="GtkWindow" id="chatroom">
+    <signal name="destroy" handler="linphone_gtk_chat_destroyed"/>
+    <child>
+      <widget class="GtkVBox" id="vbox1">
+        <property name="visible">True</property>
+        <child>
+          <widget class="GtkTextView" id="textlog">
+            <property name="width_request">200</property>
+            <property name="height_request">200</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="editable">False</property>
+            <property name="wrap_mode">GTK_WRAP_WORD</property>
+          </widget>
+        </child>
+        <child>
+          <widget class="GtkHBox" id="hbox1">
+            <property name="visible">True</property>
+            <child>
+              <widget class="GtkEntry" id="text_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="has_focus">True</property>
+                <signal name="activate" handler="linphone_gtk_send_text"/>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkButton" id="send">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="response_id">0</property>
+                <signal name="clicked" handler="linphone_gtk_send_text"/>
+                <child>
+                  <widget class="GtkHBox" id="hbox2">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImage" id="image1">
+                        <property name="visible">True</property>
+                        <property name="stock">gtk-ok</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label1">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Send</property>
+                      </widget>
+                      <packing>
+                        <property name="padding">7</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkHButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <child>
+              <widget class="GtkButton" id="button1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes">gtk-close</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">0</property>
+                <signal name="clicked" handler="linphone_gtk_chat_close"/>
+              </widget>
+              <packing>
+                <property name="pack_type">GTK_PACK_END</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>
diff --git a/gtk-glade/contact.glade b/gtk-glade/contact.glade
new file mode 100644 (file)
index 0000000..d16543b
--- /dev/null
@@ -0,0 +1,186 @@
+<?xml version="1.0"?>
+<glade-interface>
+  <!-- interface-requires gtk+ 2.16 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <widget class="GtkDialog" id="contact">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="border_width">5</property>
+    <property name="window_position">center-on-parent</property>
+    <property name="icon">linphone2.png</property>
+    <property name="type_hint">dialog</property>
+    <property name="has_separator">False</property>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox7">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <widget class="GtkFrame" id="frame17">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="label_xalign">0</property>
+            <child>
+              <widget class="GtkAlignment" id="alignment17">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <widget class="GtkVBox" id="vbox13">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <widget class="GtkTable" id="table7">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="n_rows">2</property>
+                        <property name="n_columns">2</property>
+                        <child>
+                          <widget class="GtkLabel" id="label45">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">Name</property>
+                          </widget>
+                          <packing>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="label46">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">SIP Address</property>
+                          </widget>
+                          <packing>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkEntry" id="name">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                          </widget>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkEntry" id="sip_address">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                          </widget>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckButton" id="show_presence">
+                        <property name="label" translatable="yes">Show this contact presence status</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckButton" id="allow_presence">
+                        <property name="label" translatable="yes">Allow this contact to see my presence status</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label47">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">&lt;b&gt;Contact information&lt;/b&gt;</property>
+                <property name="use_markup">True</property>
+              </widget>
+              <packing>
+                <property name="type">label_item</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area7">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="layout_style">end</property>
+            <child>
+              <widget class="GtkButton" id="cancel_button">
+                <property name="label" translatable="yes">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="linphone_gtk_contact_cancel"/>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkButton" id="ok_button">
+                <property name="label" translatable="yes">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="linphone_gtk_contact_ok"/>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>
diff --git a/gtk-glade/fonis.c b/gtk-glade/fonis.c
new file mode 100644 (file)
index 0000000..dbcbf68
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+
+#include "linphone.h"
+
diff --git a/gtk-glade/friendlist.c b/gtk-glade/friendlist.c
new file mode 100644 (file)
index 0000000..035a107
--- /dev/null
@@ -0,0 +1,588 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#include <gtk/gtk.h>
+#include "linphone.h"
+
+static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list);
+
+enum{
+       FRIEND_PRESENCE_IMG,
+       FRIEND_NAME,
+       FRIEND_PRESENCE_STATUS,
+       FRIEND_ID,
+       FRIEND_SIP_ADDRESS,
+       FRIEND_ICON,
+       FRIEND_LIST_NCOL
+};
+
+
+typedef struct _status_picture_tab_t{
+       LinphoneOnlineStatus status;
+       const char *img;
+} status_picture_tab_t;
+
+status_picture_tab_t status_picture_tab[]={
+       {       LINPHONE_STATUS_UNKNOWN,        "sip-closed.png"        },
+       {       LINPHONE_STATUS_ONLINE,         "sip-online.png"        },
+       {       LINPHONE_STATUS_BUSY,           "sip-busy.png"          },
+       {       LINPHONE_STATUS_BERIGHTBACK,    "sip-bifm.png"          },
+       {       LINPHONE_STATUS_AWAY,           "sip-away.png"          },
+       {       LINPHONE_STATUS_ONTHEPHONE,     "sip-otp.png"           },
+       {       LINPHONE_STATUS_OUTTOLUNCH,     "sip-otl.png"           },
+       {       LINPHONE_STATUS_NOT_DISTURB,    "sip-closed.png"        },
+       {       LINPHONE_STATUS_MOVED,          "sip-closed.png"        },
+       {       LINPHONE_STATUS_ALT_SERVICE,    "sip-closed.png"        },
+       {       LINPHONE_STATUS_OFFLINE,        "sip-away.png"          },
+       {       LINPHONE_STATUS_PENDING,        "sip-wfa.png"           },
+       {       LINPHONE_STATUS_CLOSED,         "sip-closed.png"        },
+       {       LINPHONE_STATUS_END,            NULL                    },
+};
+
+static GdkPixbuf *create_status_picture(LinphoneOnlineStatus ss){
+       status_picture_tab_t *t=status_picture_tab;
+       while(t->img!=NULL){
+               if (ss==t->status){
+                       GdkPixbuf *pixbuf;
+                       pixbuf = create_pixbuf(t->img);
+                       return pixbuf;
+               }
+               ++t;
+       }
+       g_error("No pixmap defined for status %i",ss);
+       return NULL;
+}
+
+void linphone_gtk_set_friend_status(GtkWidget *friendlist , LinphoneFriend * fid, const gchar *url, const gchar *status, const gchar *img){
+       GtkTreeIter iter;
+       LinphoneFriend *tmp=0;
+       gboolean found=FALSE;
+       GtkTreeModel *model=gtk_tree_view_get_model(GTK_TREE_VIEW(friendlist));
+       if (gtk_tree_model_get_iter_first(model,&iter)) {
+               do{
+                       gtk_tree_model_get(model,&iter,FRIEND_ID,&tmp,-1);
+                       //printf("tmp=%i, fid=%i",tmp,fid);
+                       if (fid==tmp) {
+                               GdkPixbuf *pixbuf;
+                               gtk_list_store_set(GTK_LIST_STORE(model),&iter,FRIEND_PRESENCE_STATUS,status,-1);
+                               pixbuf = create_pixbuf(img);
+                               if (pixbuf)
+                                 {
+                                   gtk_list_store_set(GTK_LIST_STORE(model),&iter,FRIEND_PRESENCE_IMG, pixbuf,-1);
+                                 }
+                                 found=TRUE;
+                       }
+               }while(gtk_tree_model_iter_next(model,&iter));
+       }
+       
+}
+
+
+static void linphone_gtk_set_selection_to_uri_bar(GtkTreeView *treeview){
+       GtkTreeSelection *select;
+       GtkTreeIter iter;
+       GtkTreeModel *model;
+       LinphoneFriend *lf=NULL;
+       gchar* friend;
+       select = gtk_tree_view_get_selection (treeview);
+       if (gtk_tree_selection_get_selected (select, &model, &iter))
+       {
+               gtk_tree_model_get (model, &iter,FRIEND_ID , &lf, -1);
+               friend=linphone_address_as_string(linphone_friend_get_uri(lf));
+               gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"uribar")),friend);
+               ms_free(friend);
+       }
+}
+
+static void linphone_gtk_call_selected(GtkTreeView *treeview){
+       linphone_gtk_set_selection_to_uri_bar(treeview);
+       linphone_gtk_start_call(linphone_gtk_get_widget(gtk_widget_get_toplevel(GTK_WIDGET(treeview)),
+                                       "start_call"));
+}
+
+void linphone_gtk_contact_activated(GtkTreeView     *treeview,
+                                    GtkTreePath     *path,
+                                    GtkTreeViewColumn *column,
+                                        gpointer         user_data)
+{
+       linphone_gtk_call_selected(treeview);
+}
+
+void linphone_gtk_contact_clicked(GtkTreeView     *treeview){
+       linphone_gtk_set_selection_to_uri_bar(treeview);
+}
+
+static GtkWidget * create_presence_menu(){
+       GtkWidget *menu=gtk_menu_new();
+       GtkWidget *menu_item;
+       GdkPixbuf *pbuf;
+       status_picture_tab_t *t;
+       for(t=status_picture_tab;t->img!=NULL;++t){
+               if (t->status==LINPHONE_STATUS_UNKNOWN ||
+                       t->status==LINPHONE_STATUS_PENDING){
+                       continue;
+               }
+               menu_item=gtk_image_menu_item_new_with_label(linphone_online_status_to_string(t->status));
+               pbuf=create_status_picture(t->status);
+               gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),
+                                               gtk_image_new_from_pixbuf(pbuf));
+               g_object_unref(G_OBJECT(pbuf));
+               gtk_widget_show(menu_item);
+               gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
+               g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_set_my_presence,GINT_TO_POINTER(t->status));
+       }
+       return menu;
+}
+
+void linphone_gtk_set_my_presence(LinphoneOnlineStatus ss){
+       GtkWidget *button=linphone_gtk_get_widget(linphone_gtk_get_main_window(),"presence_button");
+       GdkPixbuf *pbuf=create_status_picture(ss);
+       GtkWidget *image=gtk_image_new_from_pixbuf(pbuf);
+       GtkWidget *menu;
+       g_object_unref(G_OBJECT(pbuf));
+       gtk_button_set_label(GTK_BUTTON(button),linphone_online_status_to_string(ss));
+       gtk_button_set_image(GTK_BUTTON(button),image);
+       /*prepare menu*/
+       menu=(GtkWidget*)g_object_get_data(G_OBJECT(button),"presence_menu");
+       if (menu==NULL){
+               menu=create_presence_menu();
+               /*the menu is destroyed when the button is destroyed*/
+               g_object_weak_ref(G_OBJECT(button),(GWeakNotify)gtk_widget_destroy,menu);
+               g_object_set_data(G_OBJECT(button),"presence_menu",menu);
+       }
+       linphone_core_set_presence_info(linphone_gtk_get_core(),0,NULL,ss);
+}
+
+void linphone_gtk_my_presence_clicked(GtkWidget *button){
+       GtkWidget *menu=(GtkWidget*)g_object_get_data(G_OBJECT(button),"presence_menu");
+       gtk_menu_popup(GTK_MENU(menu),NULL,NULL,NULL,NULL,0,
+                       gtk_get_current_event_time());
+       gtk_widget_show(menu);
+}
+
+
+static void linphone_gtk_friend_list_init(GtkWidget *friendlist)
+{
+       GtkListStore *store;
+       GtkCellRenderer *renderer;
+       GtkTreeViewColumn *column;
+       GtkTreeSelection *select;
+       
+       
+       store = gtk_list_store_new(FRIEND_LIST_NCOL, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING,  G_TYPE_POINTER,
+                                       G_TYPE_STRING, GDK_TYPE_PIXBUF);
+
+       gtk_tree_view_set_model(GTK_TREE_VIEW(friendlist),GTK_TREE_MODEL(store));
+       g_object_unref(G_OBJECT(store));
+
+       renderer = gtk_cell_renderer_pixbuf_new ();
+       column = gtk_tree_view_column_new_with_attributes (_("Name"),
+                                                   renderer,
+                                                   "pixbuf", FRIEND_ICON,
+                                                   NULL);
+       g_object_set (G_OBJECT(column), "resizable", TRUE, NULL);
+       renderer = gtk_cell_renderer_text_new ();
+       gtk_tree_view_column_pack_start(column,renderer,FALSE);
+       gtk_tree_view_column_add_attribute  (column,renderer,
+                                                         "text",
+                                                         FRIEND_NAME);
+       
+       gtk_tree_view_append_column (GTK_TREE_VIEW (friendlist), column);
+
+       column = gtk_tree_view_column_new_with_attributes (_("Presence status"),
+                                                   renderer,
+                                                   "text", FRIEND_PRESENCE_STATUS,
+                                                   NULL);
+       g_object_set (G_OBJECT(column), "resizable", TRUE, NULL);
+       gtk_tree_view_column_set_visible(column,linphone_gtk_get_ui_config_int("friendlist_status",1));
+       
+       renderer = gtk_cell_renderer_pixbuf_new();
+       gtk_tree_view_column_pack_start(column,renderer,FALSE);
+       gtk_tree_view_column_add_attribute  (column,renderer,
+                                                         "pixbuf",
+                                                         FRIEND_PRESENCE_IMG);
+       gtk_tree_view_append_column (GTK_TREE_VIEW (friendlist), column);
+
+       select = gtk_tree_view_get_selection (GTK_TREE_VIEW (friendlist));
+       gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
+#if GTK_CHECK_VERSION(2,12,0)
+       gtk_tree_view_set_tooltip_column(GTK_TREE_VIEW(friendlist),FRIEND_SIP_ADDRESS);
+#endif
+       gtk_combo_box_set_active(GTK_COMBO_BOX(linphone_gtk_get_widget(
+                                       gtk_widget_get_toplevel(friendlist),"show_category")),0);
+}
+
+void linphone_gtk_show_directory_search(void){
+       LinphoneProxyConfig *cfg=NULL;
+       SipSetupContext * ssc=NULL;
+       GtkWidget *mw=linphone_gtk_get_main_window();
+       GtkWidget *search_box=linphone_gtk_get_widget(mw,"directory_search_box");
+
+       linphone_core_get_default_proxy(linphone_gtk_get_core(),&cfg);
+       if (cfg){
+               ssc=linphone_proxy_config_get_sip_setup_context(cfg);
+               if (ssc!=NULL && sip_setup_context_get_capabilities(ssc) & SIP_SETUP_CAP_BUDDY_LOOKUP){
+                       GtkWidget *entry=linphone_gtk_get_widget(mw,"directory_search_entry");
+                       gchar  *tooltip;
+                       GdkColor grey={0,40000,40000,40000};
+                       gtk_widget_show(search_box);
+                       tooltip=g_strdup_printf(_("Search in %s directory"),linphone_proxy_config_get_domain(cfg));
+                       gtk_widget_modify_text(entry,GTK_STATE_NORMAL,&grey);
+                       gtk_entry_set_text(GTK_ENTRY(entry),tooltip);
+                       g_object_set_data(G_OBJECT(entry),"active",GINT_TO_POINTER(0));
+                       g_free(tooltip);
+                       return;
+               }
+       }
+       gtk_widget_hide(search_box);
+}
+
+gboolean linphone_gtk_directory_search_focus_out(GtkWidget *entry){
+       if (gtk_entry_get_text_length(GTK_ENTRY(entry))==0)
+               linphone_gtk_show_directory_search();
+       return FALSE;
+}
+
+gboolean linphone_gtk_directory_search_focus_in(GtkWidget *entry){
+       if (GPOINTER_TO_INT(g_object_get_data(G_OBJECT(entry),"active"))==0){
+               gtk_entry_set_text(GTK_ENTRY(entry),"");
+               gtk_widget_modify_text(entry,GTK_STATE_NORMAL,NULL);
+               g_object_set_data(G_OBJECT(entry),"active",GINT_TO_POINTER(1));
+       }
+       return FALSE;
+}
+
+void linphone_gtk_directory_search_activate(GtkWidget *entry){
+       LinphoneProxyConfig *cfg;
+       linphone_core_get_default_proxy(linphone_gtk_get_core(),&cfg);
+       GtkWidget *w=linphone_gtk_show_buddy_lookup_window(linphone_proxy_config_get_sip_setup_context(cfg));
+       if (GPOINTER_TO_INT(g_object_get_data(G_OBJECT(entry),"active"))==1)
+               linphone_gtk_buddy_lookup_set_keyword(w,gtk_entry_get_text(GTK_ENTRY(entry)));
+}
+
+void linphone_gtk_directory_search_button_clicked(GtkWidget *button){
+       linphone_gtk_directory_search_activate(
+               linphone_gtk_get_widget(gtk_widget_get_toplevel(button),"directory_search_entry"));
+}
+
+void linphone_gtk_show_friends(void){
+       GtkWidget *mw=linphone_gtk_get_main_window();
+       GtkWidget *friendlist=linphone_gtk_get_widget(mw,"contact_list");
+       GtkListStore *store=NULL;
+       GtkTreeIter iter;
+       const MSList *itf;
+       GtkWidget *category=linphone_gtk_get_widget(mw,"show_category");
+       GtkWidget *filter=linphone_gtk_get_widget(mw,"search_bar");
+       LinphoneCore *core=linphone_gtk_get_core();
+       const gchar *search=NULL;
+       gboolean online_only=FALSE,lookup=FALSE;
+       
+       linphone_gtk_show_directory_search();
+
+       if (gtk_tree_view_get_model(GTK_TREE_VIEW(friendlist))==NULL){
+               linphone_gtk_friend_list_init(friendlist);
+       }
+       store=GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(friendlist)));
+       gtk_list_store_clear(store);
+
+       online_only=(gtk_combo_box_get_active(GTK_COMBO_BOX(category))==1);
+       search=gtk_entry_get_text(GTK_ENTRY(filter));
+       if (search==NULL || search[0]=='\0')
+               lookup=FALSE;
+       else lookup=TRUE;
+
+       for(itf=linphone_core_get_friend_list(core);itf!=NULL;itf=ms_list_next(itf)){
+               LinphoneFriend *lf=(LinphoneFriend*)itf->data;
+               const LinphoneAddress *f_uri=linphone_friend_get_uri(lf);
+               char *uri=linphone_address_as_string(f_uri);
+               const char *name=linphone_address_get_display_name(f_uri);
+               const char *display=name;
+               char *escaped=NULL;
+               if (lookup){
+                       if (strstr(uri,search)==NULL){
+                               ms_free(uri);
+                               continue;
+                       }
+               }
+               if (!online_only || (linphone_friend_get_status(lf)!=LINPHONE_STATUS_OFFLINE)){
+                       BuddyInfo *bi;
+                       if (name==NULL || name[0]=='\0') display=uri;
+                       gtk_list_store_append(store,&iter);
+                       gtk_list_store_set(store,&iter,FRIEND_NAME, display,
+                                       FRIEND_PRESENCE_STATUS, linphone_online_status_to_string(linphone_friend_get_status(lf)),
+                                       FRIEND_ID,lf,-1);
+                       gtk_list_store_set(store,&iter,
+                               FRIEND_PRESENCE_IMG, create_status_picture(linphone_friend_get_status(lf)),
+                               -1);
+                       escaped=g_markup_escape_text(uri,-1);
+                       gtk_list_store_set(store,&iter,FRIEND_SIP_ADDRESS,escaped,-1);
+                       g_free(escaped);
+                       bi=linphone_friend_get_info(lf);
+                       if (bi!=NULL && bi->image_data!=NULL){
+                               GdkPixbuf *pbuf=
+                                       _gdk_pixbuf_new_from_memory_at_scale(bi->image_data,bi->image_length,-1,40,TRUE);
+                               if (pbuf) {
+                                       gtk_list_store_set(store,&iter,FRIEND_ICON,pbuf,-1);
+                                       g_object_unref(G_OBJECT(pbuf));
+                               }
+                       }
+               }
+               ms_free(uri);
+       }
+}
+
+void linphone_gtk_add_contact(void){
+       GtkWidget *w=linphone_gtk_create_window("contact");
+       int presence_enabled=linphone_gtk_get_ui_config_int("use_subscribe_notify",1);
+       
+       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"show_presence")),presence_enabled);
+       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"allow_presence")),
+                                       presence_enabled);
+       gtk_widget_show(w);
+}
+
+void linphone_gtk_remove_contact(GtkWidget *button){
+       GtkWidget *w=gtk_widget_get_toplevel(button);
+       GtkTreeSelection *select;
+       GtkTreeIter iter;
+       GtkTreeModel *model;
+       LinphoneFriend *lf=NULL;
+       select = gtk_tree_view_get_selection(GTK_TREE_VIEW(linphone_gtk_get_widget(w,"contact_list")));
+       if (gtk_tree_selection_get_selected (select, &model, &iter))
+       {
+               gtk_tree_model_get (model, &iter,FRIEND_ID , &lf, -1);
+               linphone_core_remove_friend(linphone_gtk_get_core(),lf);
+               linphone_gtk_show_friends();
+       }
+}
+
+void linphone_gtk_show_contact(LinphoneFriend *lf){
+       GtkWidget *w=linphone_gtk_create_window("contact");
+       char *uri;
+       const char *name;
+       const LinphoneAddress *f_uri=linphone_friend_get_uri(lf);
+       uri=linphone_address_as_string_uri_only(f_uri);
+       name=linphone_address_get_display_name(f_uri);
+       if (uri) {
+               gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"sip_address")),uri);
+               ms_free(uri);
+       }
+       if (name){
+               gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"name")),name);
+       }
+       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"show_presence")),
+                                       linphone_friend_get_send_subscribe(lf));
+       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"allow_presence")),
+                                       linphone_friend_get_inc_subscribe_policy(lf)==LinphoneSPAccept);
+       g_object_set_data(G_OBJECT(w),"friend_ref",(gpointer)lf);
+       gtk_widget_show(w);
+}
+
+void linphone_gtk_edit_contact(GtkWidget *button){
+       GtkWidget *w=gtk_widget_get_toplevel(button);
+       GtkTreeSelection *select;
+       GtkTreeIter iter;
+       GtkTreeModel *model;
+       LinphoneFriend *lf=NULL;
+       select = gtk_tree_view_get_selection(GTK_TREE_VIEW(linphone_gtk_get_widget(w,"contact_list")));
+       if (gtk_tree_selection_get_selected (select, &model, &iter))
+       {
+               gtk_tree_model_get (model, &iter,FRIEND_ID , &lf, -1);
+               linphone_gtk_show_contact(lf);
+       }
+}
+
+void linphone_gtk_chat_selected(GtkWidget *item){
+       GtkWidget *w=gtk_widget_get_toplevel(item);
+       GtkTreeSelection *select;
+       GtkTreeIter iter;
+       GtkTreeModel *model;
+       LinphoneFriend *lf=NULL;
+       select = gtk_tree_view_get_selection(GTK_TREE_VIEW(linphone_gtk_get_widget(w,"contact_list")));
+       if (gtk_tree_selection_get_selected (select, &model, &iter))
+       {
+               char *uri;
+               gtk_tree_model_get (model, &iter,FRIEND_ID , &lf, -1);
+               uri=linphone_address_as_string(linphone_friend_get_uri(lf));
+               linphone_gtk_create_chatroom(uri);
+               ms_free(uri);
+       }
+}
+
+void linphone_gtk_contact_cancel(GtkWidget *button){
+       gtk_widget_destroy(gtk_widget_get_toplevel(button));
+}
+
+void linphone_gtk_contact_ok(GtkWidget *button){
+       GtkWidget *w=gtk_widget_get_toplevel(button);
+       LinphoneFriend *lf=(LinphoneFriend*)g_object_get_data(G_OBJECT(w),"friend_ref");
+       char *fixed_uri=NULL;
+       gboolean show_presence=FALSE,allow_presence=FALSE;
+       const gchar *name,*uri;
+       if (lf==NULL){
+               lf=linphone_friend_new();
+               if (linphone_gtk_get_ui_config_int("use_subscribe_notify",1)==1){
+                       show_presence=FALSE;
+                       allow_presence=FALSE;
+               }
+               linphone_friend_set_inc_subscribe_policy(lf,allow_presence ? LinphoneSPAccept : LinphoneSPDeny);
+               linphone_friend_send_subscribe(lf,show_presence);
+       }
+       name=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(w,"name")));
+       uri=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(w,"sip_address")));
+       show_presence=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"show_presence")));
+       allow_presence=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"allow_presence")));
+       linphone_core_interpret_friend_uri(linphone_gtk_get_core(),uri,&fixed_uri);
+       if (fixed_uri==NULL){
+               linphone_gtk_display_something(GTK_MESSAGE_WARNING,_("Invalid sip contact !"));
+               return ;
+       }
+       linphone_friend_set_sip_addr(lf,fixed_uri);
+       ms_free(fixed_uri);
+       linphone_friend_set_name(lf,name);
+       linphone_friend_send_subscribe(lf,show_presence);
+       linphone_friend_set_inc_subscribe_policy(lf,allow_presence==TRUE ? LinphoneSPAccept : LinphoneSPDeny);
+       if (linphone_friend_in_list(lf)) {
+               linphone_friend_done(lf);
+       }else{
+               linphone_core_add_friend(linphone_gtk_get_core(),lf);
+       }
+       linphone_gtk_show_friends();
+       gtk_widget_destroy(w);
+}
+
+static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list){
+       GtkWidget *menu=gtk_menu_new();
+       GtkWidget *menu_item;
+       gchar *call_label=NULL;
+       gchar *text_label=NULL;
+       gchar *edit_label=NULL;
+       gchar *delete_label=NULL;
+       gchar *name=NULL;
+       GtkTreeSelection *select;
+       GtkTreeIter iter;
+       GtkTreeModel *model;
+       GtkWidget *image;
+       LinphoneCore *lc=linphone_gtk_get_core();
+       LinphoneProxyConfig *cfg=NULL;
+       SipSetupContext * ssc=NULL;
+
+       linphone_core_get_default_proxy(lc,&cfg);
+       if (cfg){
+               ssc=linphone_proxy_config_get_sip_setup_context(cfg);
+       }
+
+       g_signal_connect(G_OBJECT(menu), "selection-done", G_CALLBACK (gtk_widget_destroy), NULL);
+       select = gtk_tree_view_get_selection(GTK_TREE_VIEW(contact_list));
+       if (gtk_tree_selection_get_selected (select, &model, &iter)){
+               gtk_tree_model_get(model, &iter,FRIEND_NAME , &name, -1);
+               call_label=g_strdup_printf(_("Call %s"),name);
+               text_label=g_strdup_printf(_("Send text to %s"),name);
+               edit_label=g_strdup_printf(_("Edit contact '%s'"),name);
+               delete_label=g_strdup_printf(_("Delete contact '%s'"),name);
+               g_free(name);
+       }
+       if (call_label){
+               menu_item=gtk_image_menu_item_new_with_label(call_label);
+               image=gtk_image_new_from_stock(GTK_STOCK_NETWORK,GTK_ICON_SIZE_MENU);
+               gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
+               gtk_widget_show(image);
+               gtk_widget_show(menu_item);
+               gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
+               g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_call_selected,contact_list);
+       }
+       if (text_label){
+               menu_item=gtk_image_menu_item_new_with_label(text_label);
+               image=gtk_image_new_from_stock(GTK_STOCK_NETWORK,GTK_ICON_SIZE_MENU);
+               gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
+               gtk_widget_show(image);
+               gtk_widget_show(menu_item);
+               gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
+               g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_chat_selected,contact_list);
+       }
+       if (edit_label){
+               menu_item=gtk_image_menu_item_new_with_label(edit_label);
+               image=gtk_image_new_from_stock(GTK_STOCK_EDIT,GTK_ICON_SIZE_MENU);
+               gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
+               gtk_widget_show(image);
+               gtk_widget_show(menu_item);
+               gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
+               g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_edit_contact,contact_list);
+       }
+       if (delete_label){
+               menu_item=gtk_image_menu_item_new_with_label(delete_label);
+               image=gtk_image_new_from_stock(GTK_STOCK_DELETE,GTK_ICON_SIZE_MENU);
+               gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
+               gtk_widget_show(image);
+               gtk_widget_show(menu_item);
+               gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
+               g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_remove_contact,contact_list);
+       }
+       
+
+       if (ssc && (sip_setup_context_get_capabilities(ssc) & SIP_SETUP_CAP_BUDDY_LOOKUP)) {
+               gchar *tmp=g_strdup_printf(_("Add new contact from %s directory"),linphone_proxy_config_get_domain(cfg));
+               menu_item=gtk_image_menu_item_new_with_label(tmp);
+               g_free(tmp);
+               image=gtk_image_new_from_stock(GTK_STOCK_ADD,GTK_ICON_SIZE_MENU);
+               gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
+               gtk_widget_show(image);
+               gtk_widget_show(menu_item);
+               gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
+               g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_show_buddy_lookup_window,ssc);
+               gtk_widget_show(menu);
+       }
+       
+       menu_item=gtk_image_menu_item_new_from_stock(GTK_STOCK_ADD,NULL);
+       gtk_widget_show(menu_item);
+       gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
+       g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_add_contact,contact_list);
+       gtk_widget_show(menu);
+       gtk_menu_attach_to_widget (GTK_MENU (menu), contact_list, NULL);
+
+       if (call_label) g_free(call_label);
+       if (text_label) g_free(text_label);
+       if (edit_label) g_free(edit_label);
+       if (delete_label) g_free(delete_label);
+       return menu;
+}
+
+
+gboolean linphone_gtk_popup_contact_menu(GtkWidget *list, GdkEventButton *event){
+       GtkWidget *m=linphone_gtk_create_contact_menu(list);
+       gtk_menu_popup (GTK_MENU (m), NULL, NULL, NULL, NULL, 
+                  event ? event->button : 0, event ? event->time : gtk_get_current_event_time());
+       return TRUE;
+}
+
+gboolean linphone_gtk_contact_list_button_pressed(GtkWidget *widget, GdkEventButton *event){
+       /* Ignore double-clicks and triple-clicks */
+       if (event->button == 3 && event->type == GDK_BUTTON_PRESS)
+       {
+               return linphone_gtk_popup_contact_menu(widget, event);
+       }
+       return FALSE;
+}
+
+void linphone_gtk_buddy_info_updated(LinphoneCore *lc, LinphoneFriend *lf){
+       /*refresh the entire list*/
+       linphone_gtk_show_friends();
+}
+
+
diff --git a/gtk-glade/gtkrc b/gtk-glade/gtkrc
new file mode 100644 (file)
index 0000000..73d2174
--- /dev/null
@@ -0,0 +1,4 @@
+#include "share/themes/XLiquid_GTK-1.0.3/gtk-2.0/gtkrc"
+#include "share/themes/Aero-ion3.1/gtk-2.0/gtkrc"
+include "share/themes/Outcrop/gtk-2.0/gtkrc"
+
diff --git a/gtk-glade/incall_view.c b/gtk-glade/incall_view.c
new file mode 100644 (file)
index 0000000..4d38dc9
--- /dev/null
@@ -0,0 +1,194 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2009  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+/*
+*  C Implementation: incall_frame
+*
+* Description: 
+*
+*
+* Author: Simon Morlat <simon.morlat@linphone.org>, (C) 2009
+*
+*
+*/
+
+#include "linphone.h"
+
+
+gboolean linphone_gtk_use_in_call_view(){
+       static int val=-1;
+       if (val==-1) val=linphone_gtk_get_ui_config_int("use_incall_view",1);
+       return val;
+}
+
+void linphone_gtk_show_in_call_view(void){
+       GtkWidget *main_window=linphone_gtk_get_main_window();
+       GtkWidget *idle_frame=linphone_gtk_get_widget(main_window,"idle_frame");
+       GtkWidget *in_call_frame=linphone_gtk_get_widget(main_window,"in_call_frame");
+       gtk_widget_hide(idle_frame);
+       gtk_widget_show(in_call_frame);
+}
+
+void linphone_gtk_show_idle_view(void){
+       GtkWidget *main_window=linphone_gtk_get_main_window();
+       GtkWidget *idle_frame=linphone_gtk_get_widget(main_window,"idle_frame");
+       GtkWidget *in_call_frame=linphone_gtk_get_widget(main_window,"in_call_frame");
+       gtk_widget_show(idle_frame);
+       gtk_widget_hide(in_call_frame);
+}
+
+void display_peer_name_in_label(GtkWidget *label, const char *uri){
+       LinphoneAddress *from;
+       const char *displayname=NULL;
+       char *id=NULL;
+       char *uri_label;
+
+       if (uri==NULL) {
+               ms_error("Strange: in call with nobody ?");
+               return;
+       }
+
+       from=linphone_address_new(uri);
+       if (from!=NULL){
+               
+               if (linphone_address_get_display_name(from))
+                       displayname=linphone_address_get_display_name(from);
+
+               id=linphone_address_as_string_uri_only(from);
+
+       }else id=ms_strdup(uri);
+
+       if (displayname!=NULL)
+               uri_label=g_markup_printf_escaped("<span size=\"large\">%s</span>\n<i>%s</i>", 
+                       displayname,id);
+       else
+               uri_label=g_markup_printf_escaped("<span size=\"large\"><i>%s</i></span>\n",id);
+       gtk_label_set_markup(GTK_LABEL(label),uri_label);
+       ms_free(id);
+       g_free(uri_label);
+       if (from!=NULL) linphone_address_destroy(from);
+}
+
+void linphone_gtk_in_call_view_set_calling(const char *uri){
+       GtkWidget *main_window=linphone_gtk_get_main_window();
+       GtkWidget *status=linphone_gtk_get_widget(main_window,"in_call_status");
+       GtkWidget *callee=linphone_gtk_get_widget(main_window,"in_call_uri");
+       GtkWidget *duration=linphone_gtk_get_widget(main_window,"in_call_duration");
+       GtkWidget *animation=linphone_gtk_get_widget(main_window,"in_call_animation");
+       GdkPixbufAnimation *pbuf=create_pixbuf_animation("calling_anim.gif");
+       GtkWidget *terminate_button=linphone_gtk_get_widget(main_window,"in_call_terminate");
+
+       gtk_widget_set_sensitive(terminate_button,TRUE);
+       gtk_label_set_markup(GTK_LABEL(status),_("<b>Calling...</b>"));
+       display_peer_name_in_label(callee,uri);
+       
+       gtk_label_set_text(GTK_LABEL(duration),"00:00:00");
+       if (pbuf!=NULL){
+               gtk_image_set_from_animation(GTK_IMAGE(animation),pbuf);
+               g_object_unref(G_OBJECT(pbuf));
+       }else gtk_image_set_from_stock(GTK_IMAGE(animation),GTK_STOCK_INFO,GTK_ICON_SIZE_DIALOG);
+}
+
+void linphone_gtk_in_call_view_set_in_call(){
+       LinphoneCore *lc=linphone_gtk_get_core();
+       GtkWidget *main_window=linphone_gtk_get_main_window();
+       GtkWidget *status=linphone_gtk_get_widget(main_window,"in_call_status");
+       GtkWidget *callee=linphone_gtk_get_widget(main_window,"in_call_uri");
+       GtkWidget *duration=linphone_gtk_get_widget(main_window,"in_call_duration");
+       GtkWidget *animation=linphone_gtk_get_widget(main_window,"in_call_animation");
+       GdkPixbufAnimation *pbuf=create_pixbuf_animation("incall_anim.gif");
+       GtkWidget *terminate_button=linphone_gtk_get_widget(main_window,"in_call_terminate");
+       const LinphoneAddress *uri=linphone_core_get_remote_uri(lc);
+       char *tmp=linphone_address_as_string(uri);
+       display_peer_name_in_label(callee,tmp);
+       ms_free(tmp);
+
+       gtk_widget_set_sensitive(terminate_button,TRUE);
+       gtk_label_set_markup(GTK_LABEL(status),_("<b>In call with</b>"));
+
+       gtk_label_set_text(GTK_LABEL(duration),_("00::00::00"));
+       if (pbuf!=NULL){
+               gtk_image_set_from_animation(GTK_IMAGE(animation),pbuf);
+               g_object_unref(G_OBJECT(pbuf));
+       }else gtk_image_set_from_stock(GTK_IMAGE(animation),GTK_STOCK_INFO,GTK_ICON_SIZE_DIALOG);
+       linphone_gtk_enable_mute_button(
+               GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(main_window,"incall_mute")),TRUE);
+}
+
+void linphone_gtk_in_call_view_update_duration(int duration){
+       GtkWidget *main_window=linphone_gtk_get_main_window();
+       GtkWidget *duration_label=linphone_gtk_get_widget(main_window,"in_call_duration");
+       char tmp[256]={0};
+       int seconds=duration%60;
+       int minutes=(duration/60)%60;
+       int hours=duration/3600;
+       snprintf(tmp,sizeof(tmp)-1,_("%02i::%02i::%02i"),hours,minutes,seconds);
+       gtk_label_set_text(GTK_LABEL(duration_label),tmp);
+}
+
+static gboolean in_call_view_terminated(){
+       linphone_gtk_show_idle_view();
+       return FALSE;
+}
+
+void linphone_gtk_in_call_view_terminate(const char *error_msg){
+       GtkWidget *main_window=linphone_gtk_get_main_window();
+       GtkWidget *status=linphone_gtk_get_widget(main_window,"in_call_status");
+       GtkWidget *animation=linphone_gtk_get_widget(main_window,"in_call_animation");
+       GtkWidget *terminate_button=linphone_gtk_get_widget(main_window,"in_call_terminate");
+       GdkPixbuf *pbuf=create_pixbuf(linphone_gtk_get_ui_config("stop_call_icon","red.png"));
+
+       gtk_widget_set_sensitive(terminate_button,FALSE);
+       if (error_msg==NULL)
+               gtk_label_set_markup(GTK_LABEL(status),_("<b>Call ended.</b>"));
+       else{
+               char *msg=g_markup_printf_escaped("<span color=\"red\"><b>%s</b></span>",error_msg);
+               gtk_label_set_markup(GTK_LABEL(status),msg);
+               g_free(msg);
+       }
+       if (pbuf!=NULL){
+               gtk_image_set_from_pixbuf(GTK_IMAGE(animation),pbuf);
+               g_object_unref(G_OBJECT(pbuf));
+       }
+       linphone_gtk_enable_mute_button(
+               GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(main_window,"incall_mute")),FALSE);
+       g_timeout_add_seconds(2,(GSourceFunc)in_call_view_terminated,NULL);
+}
+
+void linphone_gtk_draw_mute_button(GtkToggleButton *button, gboolean active){
+       if (active){
+               GtkWidget *image=create_pixmap("mic_muted.png");
+               gtk_button_set_label(GTK_BUTTON(button),_("Unmute"));
+               if (image!=NULL) gtk_button_set_image(GTK_BUTTON(button),image);
+       }else{
+               GtkWidget *image=create_pixmap("mic_active.png");
+               gtk_button_set_label(GTK_BUTTON(button),_("Mute"));
+               if (image!=NULL) gtk_button_set_image(GTK_BUTTON(button),image);
+       }
+}
+
+void linphone_gtk_mute_toggled(GtkToggleButton *button){
+       gboolean active=gtk_toggle_button_get_active(button);
+       linphone_core_mute_mic(linphone_gtk_get_core(),active);
+       linphone_gtk_draw_mute_button(button,active);
+}
+
+void linphone_gtk_enable_mute_button(GtkToggleButton *button, gboolean sensitive){
+       gtk_widget_set_sensitive(GTK_WIDGET(button),sensitive);
+       linphone_gtk_draw_mute_button(button,FALSE);
+}
diff --git a/gtk-glade/incoming_call.glade b/gtk-glade/incoming_call.glade
new file mode 100644 (file)
index 0000000..14c8948
--- /dev/null
@@ -0,0 +1,150 @@
+<?xml version="1.0"?>
+<glade-interface>
+  <!-- interface-requires gtk+ 2.16 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <widget class="GtkDialog" id="incoming_call">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="border_width">5</property>
+    <property name="type">popup</property>
+    <property name="title" translatable="yes">Linphone - Incoming call</property>
+    <property name="window_position">center-on-parent</property>
+    <property name="icon">linphone2.png</property>
+    <property name="type_hint">notification</property>
+    <property name="urgency_hint">True</property>
+    <property name="deletable">False</property>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox8">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <widget class="GtkFrame" id="frame16">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="label_xalign">0</property>
+            <child>
+              <widget class="GtkAlignment" id="alignment16">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <widget class="GtkLabel" id="message">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Incoming call from</property>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label43">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">Incoming call</property>
+                <property name="use_markup">True</property>
+              </widget>
+              <packing>
+                <property name="type">label_item</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area7">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="layout_style">spread</property>
+            <child>
+              <widget class="GtkButton" id="accept_call">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <signal name="clicked" handler="linphone_gtk_accept_call"/>
+                <child>
+                  <widget class="GtkHBox" id="hbox17">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <widget class="GtkImage" id="image12">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="stock">gtk-yes</property>
+                      </widget>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label44">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">Accept</property>
+                      </widget>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkButton" id="decline_cal">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <signal name="clicked" handler="linphone_gtk_decline_call"/>
+                <child>
+                  <widget class="GtkHBox" id="hbox20">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <widget class="GtkImage" id="image13">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="stock">gtk-no</property>
+                      </widget>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="decline_call">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">Decline</property>
+                      </widget>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>
diff --git a/gtk-glade/linphone.h b/gtk-glade/linphone.h
new file mode 100644 (file)
index 0000000..d7185c9
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gtk/gtk.h>
+#ifdef WIN32
+// alloca is already defined by gtk
+#undef alloca
+#endif
+#include "linphonecore.h"
+
+#include <libintl.h>
+#ifndef _
+#define _(String) gettext (String)
+#endif
+
+#ifdef USE_BUILDDATE_VERSION
+#include "version_date.h"
+#undef LINPHONE_VERSION
+#define LINPHONE_VERSION LINPHONE_VERSION_DATE
+#endif
+
+GdkPixbuf * create_pixbuf(const gchar *filename);
+GdkPixbufAnimation *create_pixbuf_animation(const gchar *filename);
+void add_pixmap_directory(const gchar *directory);
+GtkWidget*create_pixmap(const gchar     *filename);
+GtkWidget *_gtk_image_new_from_memory_at_scale(const void *data, gint len, gint w, gint h, gboolean preserve_ratio);
+GdkPixbuf *_gdk_pixbuf_new_from_memory_at_scale(const void *data, gint len, gint w, gint h, gboolean preserve_ratio);
+
+GtkWidget *linphone_gtk_create_window(const char *window_name);
+GtkWidget *linphone_gtk_get_widget(GtkWidget *window, const char *name);
+LinphoneCore *linphone_gtk_get_core(void);
+GtkWidget *linphone_gtk_get_main_window();
+void linphone_gtk_display_something(GtkMessageType type,const gchar *message);
+void linphone_gtk_start_call(GtkWidget *button);
+void linphone_gtk_call_terminated();
+void linphone_gtk_show_friends(void);
+void linphone_gtk_show_contact(LinphoneFriend *lf);
+void linphone_gtk_set_my_presence(LinphoneOnlineStatus ss);
+void linphone_gtk_show_parameters(void);
+void linphone_gtk_load_identities(void);
+void linphone_gtk_create_chatroom(const char *with);
+void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, const char *from, const char *message);
+void linphone_gtk_call_log_update(GtkWidget *w);
+void linphone_gtk_create_log_window(void);
+void linphone_gtk_log_show(void);
+void linphone_gtk_log_push(OrtpLogLevel lev, const char *fmt, va_list args);
+void linphone_gtk_destroy_log_window(void);
+gboolean linphone_gtk_check_logs();
+void linphone_gtk_buddy_info_updated(LinphoneCore *lc, LinphoneFriend *lf);
+const gchar *linphone_gtk_get_ui_config(const char *key, const char *def);
+int linphone_gtk_get_ui_config_int(const char *key, int def);
+void linphone_gtk_set_ui_config_int(const char *key , int val);
+
+void linphone_gtk_open_browser(const char *url);
+void linphone_gtk_check_for_new_version(void);
+const char *linphone_gtk_get_lang(const char *config_file);
+void linphone_gtk_set_lang(const char *code);
+SipSetupContext* linphone_gtk_get_default_sip_setup_context(void);
+GtkWidget * linphone_gtk_show_buddy_lookup_window(SipSetupContext *ctx);
+void linphone_gtk_buddy_lookup_set_keyword(GtkWidget *w, const char *kw);
+void * linphone_gtk_wait(LinphoneCore *lc, void *ctx, LinphoneWaitingState ws, const char *purpose, float progress);
+
+void linphone_gtk_show_directory_search(void);
+
+/*functions controlling the different views*/
+gboolean linphone_gtk_use_in_call_view();
+void linphone_gtk_show_in_call_view(void);
+void linphone_gtk_show_idle_view(void);
+void linphone_gtk_in_call_view_set_calling(const char *uri);
+void linphone_gtk_in_call_view_set_in_call(void);
+void linphone_gtk_in_call_view_update_duration(int duration);
+void linphone_gtk_in_call_view_terminate(const char *error_msg);
+void linphone_gtk_enable_mute_button(GtkToggleButton *button, gboolean sensitive);
+
+void linphone_gtk_show_login_frame(LinphoneProxyConfig *cfg);
+
diff --git a/gtk-glade/linphone.ico b/gtk-glade/linphone.ico
new file mode 100755 (executable)
index 0000000..8c56e06
Binary files /dev/null and b/gtk-glade/linphone.ico differ
diff --git a/gtk-glade/linphone.iss b/gtk-glade/linphone.iss
new file mode 100755 (executable)
index 0000000..f691046
--- /dev/null
@@ -0,0 +1,90 @@
+; Script generated by the Inno Setup Script Wizard.\r
+; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!\r
+\r
+[Setup]\r
+AppName=Linphone\r
+AppVerName=Linphone version 3.1.2\r
+AppPublisher=linphone.org\r
+AppPublisherURL=http://www.linphone.org\r
+AppSupportURL=http://www.linphone.org\r
+AppUpdatesURL=http://www.linphone.org\r
+DefaultDirName={pf}\Linphone\r
+DefaultGroupName=Linphone\r
+LicenseFile=..\COPYING\r
+;InfoBeforeFile=..\README\r
+OutputBaseFilename=setup\r
+Compression=lzma\r
+SolidCompression=yes\r
+\r
+[Languages]\r
+Name: "english"; MessagesFile: "compiler:Default.isl"\r
+\r
+[Tasks]\r
+Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked\r
+\r
+[Files]\r
+Source: "linphone.exe"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\mediastreamer2\build\win32native\mediastream.exe"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\console\linphonec.exe"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\console\linphonecsh.exe"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "*.glade"; DestDir: "{app}/linphone"; Flags: ignoreversion\r
+Source: "..\pixmaps\*.png"; DestDir: "{app}/linphone"; Flags: ignoreversion\r
+Source: "*.png"; DestDir: "{app}/linphone"; Flags: ignoreversion\r
+Source: "..\mediastreamer2\src\nowebcamCIF.jpg"; DestDir: "{app}\images"; Flags: ignoreversion\r
+;;internal linphone dlls:\r
+Source: "..\..\linphone-deps\bin\osipparser2.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\..\linphone-deps\bin\osip2.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\..\linphone-deps\bin\exosip2.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\..\linphone-deps\bin\libogg.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+;;Source: "..\..\linphone-deps\bin\speex.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\..\linphone-deps\bin\avcodec.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\..\linphone-deps\bin\avutil-49.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\..\linphone-deps\bin\swscale.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+;;Source: "..\..\linphone-deps\bin\libspeex-1.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+;;Source: "..\..\linphone-deps\bin\libspeexdsp-1.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\coreapi\linphone.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\mediastreamer2\build\win32native\mediastreamer2.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\oRTP\build\win32native\ortp.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+;;Sound files:\r
+Source: "..\COPYING"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\share\ringback.wav"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\share\rings\orig.wav"; DestDir: "{app}\rings"; Flags: ignoreversion\r
+Source: "..\share\rings\bigben.wav"; DestDir: "{app}\rings"; Flags: ignoreversion\r
+Source: "..\share\rings\toy.wav"; DestDir: "{app}\rings"; Flags: ignoreversion\r
+Source: "..\share\rings\tapping.wav"; DestDir: "{app}\rings"; Flags: ignoreversion\r
+Source: "..\share\rings\oldphone.wav"; DestDir: "{app}\rings"; Flags: ignoreversion\r
+;;Default my preferred gtk theme on windows:\r
+Source: "..\gtk-glade\gtkrc"; DestDir: "{app}"; Flags: ignoreversion\r
+;;Locales for linphone:\r
+Source: "..\po\fr.gmo"; DestDir: "{app}\share\locale\fr\LC_MESSAGES"; DestName: "linphone.mo"; Flags: ignoreversion\r
+Source: "..\po\sv.gmo"; DestDir: "{app}\share\locale\sv\LC_MESSAGES"; DestName: "linphone.mo"; Flags: ignoreversion\r
+\r
+;;GTK stuff:\r
+Source: "..\..\gtk+-2.14.7\bin\*.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\..\libglade-2.6.3\bin\*.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\..\gtk+-2.14.7\etc\gtk-2.0\*"; DestDir: "{app}\etc\gtk-2.0\"; Flags: ignoreversion\r
+Source: "..\..\linphone-deps\bin\libxml2.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\..\iconv-1.9.2.win32\bin\*.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\..\gtk+-2.14.7\lib\gtk-2.0\2.10.0\engines\*"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion\r
+Source: "..\..\gtk+-2.14.7\lib\gtk-2.0\2.10.0\loaders\*"; DestDir: "{app}\lib\gtk-2.0\2.10.0\loaders"; Flags: ignoreversion\r
+;;Source: "..\..\gtk+-2.14.7\lib\gtk-2.0\2.10.0\immodules\*"; DestDir: "{app}\lib\gtk-2.0\2.10.0\immodules"; Flags: ignoreversion\r
+Source: "..\..\gtk+-2.14.7\share\locale\fr\LC_MESSAGES\*"; DestDir: "{app}\share\locale\fr\LC_MESSAGES"; Flags: ignoreversion\r
+Source: "..\..\gtk+-2.14.7\share\locale\sv\LC_MESSAGES\*"; DestDir: "{app}\share\locale\sv\LC_MESSAGES"; Flags: ignoreversion\r
+Source: "..\..\XLiquid_GTK-1.0.3\gtk-2.0\*"; DestDir: "{app}\share\themes\XLiquid_GTK-1.0.3\gtk-2.0"; Flags: ignoreversion\r
+; NOTE: Don't use "Flags: ignoreversion" on any shared system files\r
+\r
+;; BuddyLookup plugin\r
+Source: "..\coreapi\plugins\buddylookup\libbuddylookup.dll"; DestDir: "{app}\liblinphone\plugins"; Flags: ignoreversion\r
+Source: "..\..\libsoup\bin\libsoup-2.4-1.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\..\gnutls-2.6.4\bin\*.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+\r
+;;Directshow capture plugin\r
+Source: "..\mediastreamer2\plugins\msdscap\libmsdscap.dll"; DestDir: "{app}\plugins" ; Flags: ignoreversion\r
+\r
+[Icons]\r
+Name: "{group}\Linphone"; Filename: "{app}\linphone.exe" ; WorkingDir: "{app}"\r
+Name: "{userdesktop}\Linphone"; Filename: "{app}\linphone.exe"; WorkingDir: "{app}" ; Tasks: desktopicon\r
+\r
+[Run]\r
+Filename: "{app}\linphone.exe"; Description: "{cm:LaunchProgram,Linphone}"; WorkingDir: "{app}" ; Flags: nowait postinstall skipifsilent\r
+\r
diff --git a/gtk-glade/linphone.png b/gtk-glade/linphone.png
new file mode 100644 (file)
index 0000000..06cf183
Binary files /dev/null and b/gtk-glade/linphone.png differ
diff --git a/gtk-glade/linphone.rc b/gtk-glade/linphone.rc
new file mode 100755 (executable)
index 0000000..9455ab6
--- /dev/null
@@ -0,0 +1,5 @@
+// This file is automatically generated by wxDev-C++.\r
+// All changes to this file will be lost when the project is recompiled.\r
+\r
+A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "linphone.ico"\r
+\r
diff --git a/gtk-glade/linphone2.png b/gtk-glade/linphone2.png
new file mode 100644 (file)
index 0000000..d1bf1ab
Binary files /dev/null and b/gtk-glade/linphone2.png differ
diff --git a/gtk-glade/log.glade b/gtk-glade/log.glade
new file mode 100644 (file)
index 0000000..0dfc558
--- /dev/null
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--Generated with glade3 3.4.5 on Thu Jul 31 12:01:20 2008 -->
+<glade-interface>
+  <widget class="GtkDialog" id="log">
+    <property name="width_request">540</property>
+    <property name="height_request">290</property>
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Linphone debug window</property>
+    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+    <property name="icon">linphone2.png</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="deletable">False</property>
+    <property name="has_separator">False</property>
+    <signal name="response" handler="gtk_widget_hide"/>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <property name="spacing">2</property>
+        <child>
+          <widget class="GtkScrolledWindow" id="scrolledwindow1">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+            <property name="window_placement">GTK_CORNER_BOTTOM_LEFT</property>
+            <property name="window_placement_set">True</property>
+            <property name="shadow_type">GTK_SHADOW_IN</property>
+            <child>
+              <widget class="GtkTextView" id="textview">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="editable">False</property>
+                <property name="wrap_mode">GTK_WRAP_WORD</property>
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <widget class="GtkButton" id="button1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes">gtk-close</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">0</property>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>
diff --git a/gtk-glade/logging.c b/gtk-glade/logging.c
new file mode 100644 (file)
index 0000000..a8211d1
--- /dev/null
@@ -0,0 +1,125 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#include "linphone.h"
+
+static GtkWidget *log_window=NULL;
+static GStaticMutex log_mutex=G_STATIC_MUTEX_INIT;
+static GList *log_queue=NULL;
+
+typedef struct _LinphoneGtkLog{
+       OrtpLogLevel lev;
+       gchar *msg;
+}LinphoneGtkLog;
+
+void linphone_gtk_create_log_window(void){
+       GtkTextBuffer *b;
+       log_window=linphone_gtk_create_window("log");
+       b=gtk_text_view_get_buffer(GTK_TEXT_VIEW(linphone_gtk_get_widget(log_window,"textview")));
+       gtk_text_buffer_create_tag(b,"red","foreground","red",NULL);
+       gtk_text_buffer_create_tag(b,"orange","foreground","orange",NULL);
+}
+
+void linphone_gtk_destroy_log_window(void){
+       GtkWidget *w=log_window;
+       g_static_mutex_lock(&log_mutex);
+       log_window=NULL;
+       gtk_widget_destroy(w);
+       g_static_mutex_unlock(&log_mutex);
+}
+
+void linphone_gtk_log_show(void){
+       gtk_widget_show(log_window);
+       gtk_window_present(GTK_WINDOW(log_window));
+}
+
+static void linphone_gtk_display_log(OrtpLogLevel lev, const char *msg){
+       GtkTextIter iter,begin;
+       int off;
+       static GtkTextView *v=NULL;
+       GtkTextBuffer *b;
+       const char *lname="undef";
+
+       if (log_window==NULL) {
+               return;
+       }
+
+       if (v==NULL) v=GTK_TEXT_VIEW(linphone_gtk_get_widget(log_window,"textview"));
+       b=gtk_text_view_get_buffer(v);
+       switch(lev){
+               case ORTP_DEBUG:
+                       lname="debug";
+                       break;
+               case ORTP_MESSAGE:
+                       lname="message";
+                       break;
+               case ORTP_WARNING:
+                       lname="warning";
+                       break;
+               case ORTP_ERROR:
+                       lname="error";
+                       break;
+               case ORTP_FATAL:
+                       lname="fatal";
+                       break;
+               default:
+                       g_error("Bad level !");
+       }
+       gtk_text_buffer_get_end_iter(b,&iter);
+       off=gtk_text_iter_get_offset(&iter);
+       gtk_text_buffer_insert(b,&iter,lname,-1);
+       gtk_text_buffer_get_end_iter(b,&iter);
+       gtk_text_buffer_insert(b,&iter,": ",-1);
+       gtk_text_buffer_get_end_iter(b,&iter);
+       gtk_text_buffer_insert(b,&iter,msg,-1);
+       gtk_text_buffer_get_end_iter(b,&iter);
+       gtk_text_buffer_insert(b,&iter,"\n",-1);
+       gtk_text_buffer_get_end_iter(b,&iter);
+       gtk_text_buffer_get_iter_at_offset(b,&begin,off);
+       if (lev==ORTP_ERROR || lev==ORTP_FATAL) gtk_text_buffer_apply_tag_by_name(b,"red",&begin,&iter);
+       else if (lev==ORTP_WARNING) gtk_text_buffer_apply_tag_by_name(b,"orange",&begin,&iter);
+       gtk_text_buffer_get_end_iter(b,&iter);
+       //gtk_text_view_scroll_to_iter(v,&iter,0,FALSE,0,0);
+}
+
+gboolean linphone_gtk_check_logs(){
+       GList *elem;
+       g_static_mutex_lock(&log_mutex);
+       for(elem=log_queue;elem!=NULL;elem=elem->next){
+               LinphoneGtkLog *lgl=(LinphoneGtkLog*)elem->data;
+               linphone_gtk_display_log(lgl->lev,lgl->msg);
+               g_free(lgl->msg);
+               g_free(lgl);
+       }
+       if (log_queue) g_list_free(log_queue);
+       log_queue=NULL;
+       g_static_mutex_unlock(&log_mutex);
+       return TRUE;
+}
+
+void linphone_gtk_log_push(OrtpLogLevel lev, const char *fmt, va_list args){
+       gchar *msg=g_strdup_vprintf(fmt,args);
+       LinphoneGtkLog *lgl=g_new(LinphoneGtkLog,1);
+       lgl->lev=lev;
+       lgl->msg=msg;
+       g_static_mutex_lock(&log_mutex);
+       log_queue=g_list_append(log_queue,lgl);
+       g_static_mutex_unlock(&log_mutex);
+}
+
diff --git a/gtk-glade/loginframe.c b/gtk-glade/loginframe.c
new file mode 100644 (file)
index 0000000..d4ed369
--- /dev/null
@@ -0,0 +1,162 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2009  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#include "linphone.h"
+
+void linphone_gtk_login_frame_connect_clicked(GtkWidget *button);
+void linphone_gtk_exit_login_frame(void);
+
+enum {
+       NetworkKindAdsl,
+       NetworkKindOpticalFiber
+};
+
+static gboolean check_login_ok(LinphoneProxyConfig *cfg){
+       if (linphone_proxy_config_is_registered(cfg)){
+               linphone_gtk_exit_login_frame();
+               return FALSE;   
+       }
+       return TRUE;
+}
+
+static void do_login(SipSetupContext *ssctx, const char *identity, const char * passwd){
+       GtkWidget *mw=linphone_gtk_get_main_window();
+       if (sip_setup_context_login_account(ssctx,identity,passwd)==0){
+               guint t=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(mw),"login_tout"));
+               if (t!=0) g_source_remove(t);
+               t=g_timeout_add(50,(GSourceFunc)check_login_ok,sip_setup_context_get_proxy_config(ssctx));
+               g_object_set_data(G_OBJECT(mw),"login_tout",GINT_TO_POINTER(t));
+       }
+}
+
+static gboolean do_login_noprompt(LinphoneProxyConfig *cfg){
+       SipSetupContext *ssctx=linphone_proxy_config_get_sip_setup_context(cfg);
+       if (ssctx==NULL) return TRUE;/*not ready ?*/
+       do_login(ssctx,linphone_proxy_config_get_identity(cfg),NULL);
+       return FALSE;
+}
+
+void linphone_gtk_show_login_frame(LinphoneProxyConfig *cfg){
+       GtkWidget *mw=linphone_gtk_get_main_window();
+       GtkWidget *label=linphone_gtk_get_widget(mw,"login_label");
+       LinphoneAuthInfo *ai;
+       gchar *str;
+       LinphoneAddress *from;
+       LinphoneCore *lc=linphone_gtk_get_core();
+       int nettype;
+
+
+       if (linphone_core_get_download_bandwidth(lc)==512 &&
+               linphone_core_get_upload_bandwidth(lc)==512)
+               nettype=NetworkKindOpticalFiber;
+       else nettype=NetworkKindAdsl;
+       gtk_combo_box_set_active(GTK_COMBO_BOX(linphone_gtk_get_widget(mw,"login_internet_kind")),nettype);
+       gtk_combo_box_set_active(GTK_COMBO_BOX(linphone_gtk_get_widget(mw,"internet_kind")),nettype);
+
+       if (linphone_gtk_get_ui_config_int("automatic_login",0) ){
+               g_timeout_add(250,(GSourceFunc)do_login_noprompt,cfg);
+               return;
+       }
+
+       gtk_widget_hide(linphone_gtk_get_widget(mw,"logout"));
+       gtk_widget_hide(linphone_gtk_get_widget(mw,"idle_frame"));
+       gtk_widget_show(linphone_gtk_get_widget(mw,"login_frame"));
+       gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"main_menu"),FALSE);
+       gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"modes"),FALSE);
+       str=g_strdup_printf(_("Please enter login information for %s"),linphone_proxy_config_get_domain(cfg));
+       gtk_label_set_text(GTK_LABEL(label),str);
+       g_object_set_data(G_OBJECT(mw),"login_proxy_config",cfg);
+       g_free(str);
+
+       from=linphone_address_new(linphone_proxy_config_get_identity(cfg));
+       
+       ai=linphone_core_find_auth_info(lc,linphone_proxy_config_get_domain(cfg),linphone_address_get_username(from));
+       /*display the last entered username, if not '?????'*/
+       if (linphone_address_get_username(from)[0]!='?')
+               gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(mw,"login_username")),
+                       linphone_address_get_username(from));
+       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(mw,"login_password")),
+               ai!=NULL ? ai->passwd : "");
+       
+       linphone_address_destroy(from);
+}
+
+void linphone_gtk_exit_login_frame(void){
+       GtkWidget *mw=linphone_gtk_get_main_window();
+       gtk_widget_show(linphone_gtk_get_widget(mw,"idle_frame"));
+       gtk_widget_hide(linphone_gtk_get_widget(mw,"login_frame"));
+       gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"main_menu"),TRUE);
+       gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"modes"),TRUE);
+       gtk_widget_show(linphone_gtk_get_widget(mw,"logout"));
+}
+
+void linphone_gtk_logout_clicked(){
+       LinphoneCore *lc=linphone_gtk_get_core();
+       LinphoneProxyConfig *cfg=NULL;
+       linphone_core_get_default_proxy(lc,&cfg);
+       if (cfg){
+               SipSetupContext *ss=linphone_proxy_config_get_sip_setup_context(cfg);
+               if (ss){
+                       sip_setup_context_logout(ss);
+                       linphone_gtk_set_ui_config_int("automatic_login",FALSE);
+                       linphone_gtk_show_login_frame(cfg);
+               }
+       }
+}
+
+
+
+void linphone_gtk_login_frame_connect_clicked(GtkWidget *button){
+       GtkWidget *mw=gtk_widget_get_toplevel(button);
+       const char *username;
+       const char *password;
+       char *identity;
+       gboolean autologin;
+       LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)g_object_get_data(G_OBJECT(mw),"login_proxy_config");
+       LinphoneAddress *from;
+       SipSetupContext *ssctx=linphone_proxy_config_get_sip_setup_context(cfg);
+
+       username=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(mw,"login_username")));
+       password=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(mw,"login_password")));
+
+       if (username==NULL || username[0]=='\0')
+               return;
+
+       autologin=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(mw,"automatic_login")));
+       linphone_gtk_set_ui_config_int("automatic_login",autologin);
+
+       from=linphone_address_new(linphone_proxy_config_get_identity(cfg));
+       linphone_address_set_username(from,username);
+       identity=linphone_address_as_string(from);
+       do_login(ssctx,identity,password);
+       /*we need to refresh the identities since the proxy config may have changed.*/
+       linphone_gtk_load_identities();
+}
+
+void linphone_gtk_internet_kind_changed(GtkWidget *combo){
+       int netkind_id=gtk_combo_box_get_active(GTK_COMBO_BOX(combo));
+       LinphoneCore *lc=linphone_gtk_get_core();
+       if (netkind_id==NetworkKindAdsl){
+               linphone_core_set_upload_bandwidth(lc,256);
+               linphone_core_set_download_bandwidth(lc,512);
+       }else if (netkind_id==NetworkKindOpticalFiber){
+               linphone_core_set_upload_bandwidth(lc,512);
+               linphone_core_set_download_bandwidth(lc,512);
+       }
+}
diff --git a/gtk-glade/main.c b/gtk-glade/main.c
new file mode 100644 (file)
index 0000000..e6e2ac7
--- /dev/null
@@ -0,0 +1,1234 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#define USE_LIBGLADE 1
+
+#include "linphone.h"
+#include "lpconfig.h"
+
+
+
+#ifdef USE_LIBGLADE
+#include <glade/glade.h>
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#define LINPHONE_ICON "linphone2.png"
+
+const char *this_program_ident_string="linphone_ident_string=" LINPHONE_VERSION;
+
+static LinphoneCore *the_core=NULL;
+static GtkWidget *the_ui=NULL;
+
+static void linphone_gtk_show(LinphoneCore *lc);
+static void linphone_gtk_inv_recv(LinphoneCore *lc, const char *from);
+static void linphone_gtk_bye_recv(LinphoneCore *lc, const char *from);
+static void linphone_gtk_notify_recv(LinphoneCore *lc, LinphoneFriend * fid, const char *url, const char *status, const char *img);
+static void linphone_gtk_new_unknown_subscriber(LinphoneCore *lc, LinphoneFriend *lf, const char *url);
+static void linphone_gtk_auth_info_requested(LinphoneCore *lc, const char *realm, const char *username);
+static void linphone_gtk_display_status(LinphoneCore *lc, const char *status);
+static void linphone_gtk_display_message(LinphoneCore *lc, const char *msg);
+static void linphone_gtk_display_warning(LinphoneCore *lc, const char *warning);
+static void linphone_gtk_display_url(LinphoneCore *lc, const char *msg, const char *url);
+static void linphone_gtk_display_question(LinphoneCore *lc, const char *question);
+static void linphone_gtk_call_log_updated(LinphoneCore *lc, LinphoneCallLog *cl);
+static void linphone_gtk_general_state(LinphoneCore *lc, LinphoneGeneralState *gstate);
+static void linphone_gtk_refer_received(LinphoneCore *lc, const char *refer_to);
+static gboolean linphone_gtk_auto_answer(GtkWidget *incall_window);
+
+static LinphoneCoreVTable vtable={
+       .show=linphone_gtk_show,
+       .inv_recv=linphone_gtk_inv_recv,
+       .bye_recv=linphone_gtk_bye_recv,
+       .notify_recv=linphone_gtk_notify_recv,
+       .new_unknown_subscriber=linphone_gtk_new_unknown_subscriber,
+       .auth_info_requested=linphone_gtk_auth_info_requested,
+       .display_status=linphone_gtk_display_status,
+       .display_message=linphone_gtk_display_message,
+       .display_warning=linphone_gtk_display_warning,
+       .display_url=linphone_gtk_display_url,
+       .display_question=linphone_gtk_display_question,
+       .call_log_updated=linphone_gtk_call_log_updated,
+       .text_received=linphone_gtk_text_received,
+       .general_state=linphone_gtk_general_state,
+       .refer_received=linphone_gtk_refer_received,
+       .buddy_info_updated=linphone_gtk_buddy_info_updated
+};
+
+static gboolean verbose=0;
+static gboolean auto_answer = 0;
+static gchar * addr_to_call = NULL;
+static gboolean iconified=FALSE;
+#ifdef WIN32
+static gchar *workingdir=NULL;
+#endif
+
+static GOptionEntry linphone_options[]={
+       {
+               .long_name="verbose",
+               .short_name= '\0',
+               .arg=G_OPTION_ARG_NONE,
+               .arg_data= (gpointer)&verbose,
+               .description=N_("log to stdout some debug information while running.")
+       },
+       {
+               .long_name="iconified",
+               .short_name= '\0',
+               .arg=G_OPTION_ARG_NONE,
+               .arg_data= (gpointer)&iconified,
+               .description=N_("Start only in the system tray, do not show the main interface.")
+       },
+       {
+           .long_name = "call",
+           .short_name = 'c',
+           .arg = G_OPTION_ARG_STRING,
+           .arg_data = &addr_to_call,
+           .description = N_("address to call right now")
+       },
+       {
+           .long_name = "auto-answer",
+           .short_name = 'a',
+           .arg = G_OPTION_ARG_NONE,
+           .arg_data = (gpointer) & auto_answer,
+           .description = N_("if set automatically answer incoming calls")
+       },
+#ifdef WIN32
+       {                               /* zsd addition */
+           .long_name = "workdir",
+           .short_name = '\0',
+           .arg = G_OPTION_ARG_STRING,
+           .arg_data = (gpointer) & workingdir,
+           .description = N_("Specifiy a working directory (should be the base of the installation, eg: c:\\Program Files\\Linphone)")
+       },
+#endif
+       {0}
+};
+
+#define INSTALLED_XML_DIR PACKAGE_DATA_DIR "/linphone"
+#define BUILD_TREE_XML_DIR "gtk-glade"
+
+#ifndef WIN32
+#define CONFIG_FILE ".linphonerc"
+#else
+#define CONFIG_FILE "linphonerc"
+#endif
+
+
+
+static char _config_file[1024];
+
+
+const char *linphone_gtk_get_config_file(){
+       /*try accessing a local file first if exists*/
+       if (access(CONFIG_FILE,F_OK)==0){
+               snprintf(_config_file,sizeof(_config_file),"%s",CONFIG_FILE);
+       }else{
+#ifdef WIN32
+               const char *appdata=getenv("APPDATA");
+               if (appdata){
+                       snprintf(_config_file,sizeof(_config_file),"%s\\%s",appdata,LINPHONE_CONFIG_DIR);
+                       CreateDirectory(_config_file,NULL);
+                       snprintf(_config_file,sizeof(_config_file),"%s\\%s",appdata,LINPHONE_CONFIG_DIR "\\" CONFIG_FILE);
+               }
+#else
+               const char *home=getenv("HOME");
+               if (home==NULL) home=".";
+               snprintf(_config_file,sizeof(_config_file),"%s/%s",home,CONFIG_FILE);
+#endif
+       }
+       return _config_file;
+}
+
+static void linphone_gtk_init_liblinphone(const char *file){
+       linphone_core_set_user_agent("Linphone", LINPHONE_VERSION);
+       the_core=linphone_core_new(&vtable,file,NULL,NULL);
+       linphone_core_set_waiting_callback(the_core,linphone_gtk_wait,NULL);
+}
+
+
+
+LinphoneCore *linphone_gtk_get_core(void){
+       return the_core;
+}
+
+GtkWidget *linphone_gtk_get_main_window(){
+       return the_ui;
+}
+
+static void parse_item(const char *item, const char *window_name, GtkWidget *w,  gboolean show){
+       char tmp[64];
+       char *dot;
+       strcpy(tmp,item);
+       dot=strchr(tmp,'.');
+       if (dot){
+               *dot='\0';
+               dot++;
+               if (strcmp(window_name,tmp)==0){
+                       GtkWidget *wd=linphone_gtk_get_widget(w,dot);
+                       if (wd) {
+                               if (!show) gtk_widget_hide(wd);
+                               else gtk_widget_show(wd);
+                       }
+               }
+       }
+}
+
+static void parse_widgets(const char *hiddens, const char *window_name, GtkWidget *w, gboolean show){
+       char item[64];
+       const char *i;
+       const char *b;
+       int len;
+       for(b=i=hiddens;*i!='\0';++i){
+               if (*i==' '){
+                       len=MIN(i-b,sizeof(item)-1);
+                       strncpy(item,b,len);
+                       item[len]='\0';
+                       b=i+1;
+                       parse_item(item,window_name,w,show);
+               }
+       }
+       len=MIN(i-b,sizeof(item)-1);
+       if (len>0){
+               strncpy(item,b,len);
+               item[len]='\0';
+               parse_item(item,window_name,w,show);
+       }
+}
+
+static void linphone_gtk_configure_window(GtkWidget *w, const char *window_name){
+       static const char *icon_path=NULL;
+       static const char *hiddens=NULL;
+       static const char *shown=NULL;
+       static bool_t config_loaded=FALSE;
+       if (linphone_gtk_get_core()==NULL) return;
+       if (config_loaded==FALSE){
+               hiddens=linphone_gtk_get_ui_config("hidden_widgets",NULL);
+               shown=linphone_gtk_get_ui_config("shown_widgets",NULL);
+               icon_path=linphone_gtk_get_ui_config("icon",NULL);
+               config_loaded=TRUE;
+       }
+       if (hiddens)
+               parse_widgets(hiddens,window_name,w,FALSE);
+       if (shown)
+               parse_widgets(shown,window_name,w,TRUE);
+       if (icon_path) {
+               GdkPixbuf *pbuf=create_pixbuf(icon_path);
+               gtk_window_set_icon(GTK_WINDOW(w),pbuf);
+               g_object_unref(G_OBJECT(pbuf));
+       }
+}
+
+#ifdef USE_LIBGLADE
+
+GtkWidget *linphone_gtk_create_window(const char *window_name){
+       GtkWidget *w;
+       GladeXML *gxml;
+       char path[2048];
+       snprintf(path,sizeof(path),"%s/%s.glade",BUILD_TREE_XML_DIR,window_name);
+       if (access(path,F_OK)!=0){
+               snprintf(path,sizeof(path),"%s/%s.glade",INSTALLED_XML_DIR,window_name);
+               if (access(path,F_OK)!=0){
+                       g_error("Could not locate neither %s/%s.glade and %s/%s.glade .",BUILD_TREE_XML_DIR,window_name,
+                               INSTALLED_XML_DIR,window_name);
+                       return NULL;
+               }
+       }
+       gxml=glade_xml_new(path,NULL,NULL);
+       glade_xml_signal_autoconnect(gxml);
+       w=glade_xml_get_widget(gxml,window_name);
+       if (w==NULL) g_error("Could not retrieve '%s' window from xml file",window_name);
+       linphone_gtk_configure_window(w,window_name);
+       return w;
+}
+
+GtkWidget *linphone_gtk_get_widget(GtkWidget *window, const char *name){
+       GtkWidget *w;
+       GladeXML *gxml=glade_get_widget_tree(window);
+       if (gxml==NULL) g_error("Could not retrieve XML tree of window %s",name);
+       w=glade_xml_get_widget(gxml,name);
+       if (w==NULL) g_error("Could not retrieve widget %s",name);
+       return GTK_WIDGET(w);
+}
+
+#else
+
+GtkWidget *linphone_gtk_create_window(const char *window_name){
+       
+}
+
+GtkWidget *linphone_gtk_get_widget(GtkWidget *window, const char *name){
+       GObject *w=gtk_builder_get_object(the_ui,name);
+       if (w==NULL){
+               g_error("No widget named %s found in xml interface.",name);
+       }
+       return GTK_WIDGET(w);
+}
+
+#endif
+
+void linphone_gtk_display_something(GtkMessageType type,const gchar *message){
+       GtkWidget *dialog;
+       GtkWidget *main_window=linphone_gtk_get_main_window();
+       
+       gtk_widget_show(main_window);
+       if (type==GTK_MESSAGE_QUESTION)
+       {
+               /* draw a question box. link to dialog_click callback */
+               dialog = gtk_message_dialog_new (
+                               GTK_WINDOW(main_window),
+                                GTK_DIALOG_DESTROY_WITH_PARENT,
+                               GTK_MESSAGE_QUESTION,
+                                GTK_BUTTONS_YES_NO,
+                                "%s",
+                               (const gchar*)message);
+               /* connect to some callback : REVISIT */
+               /*
+               g_signal_connect_swapped (G_OBJECT (dialog), "response",
+                           G_CALLBACK (dialog_click),
+                           G_OBJECT (dialog));
+               */
+               /* actually show the box */
+               gtk_widget_show(dialog);
+       }
+       else
+       {
+               dialog = gtk_message_dialog_new (GTK_WINDOW(main_window),
+                                  GTK_DIALOG_DESTROY_WITH_PARENT,
+                                  type,
+                                  GTK_BUTTONS_CLOSE,
+                                  "%s",
+                                  (const gchar*)message);
+               /* Destroy the dialog when the user responds to it (e.g. clicks a button) */
+               g_signal_connect_swapped (G_OBJECT (dialog), "response",
+                           G_CALLBACK (gtk_widget_destroy),
+                           G_OBJECT (dialog));
+               gtk_widget_show(dialog);
+       }
+}
+
+void linphone_gtk_about_response(GtkDialog *dialog, gint id){
+       if (id==GTK_RESPONSE_CANCEL){
+               gtk_widget_destroy(GTK_WIDGET(dialog));
+       }
+}
+
+static void about_url_clicked(GtkAboutDialog *dialog, const char *url, gpointer data){
+       g_message("About url clicked");
+       linphone_gtk_open_browser(url);
+}
+
+void linphone_gtk_show_about(){
+       struct stat filestat;
+       const char *license_file=PACKAGE_DATA_DIR "/linphone/COPYING";
+       GtkWidget *about;
+       
+       about=linphone_gtk_create_window("about");
+       gtk_about_dialog_set_url_hook(about_url_clicked,NULL,NULL);
+       memset(&filestat,0,sizeof(filestat));
+       if (stat(license_file,&filestat)!=0){
+               license_file="COPYING";
+               stat(license_file,&filestat);
+       }
+       if (filestat.st_size>0){
+               char *license=g_malloc(filestat.st_size+1);
+               FILE *f=fopen(license_file,"r");
+               if (f && fread(license,filestat.st_size,1,f)==1){
+                       license[filestat.st_size]='\0';
+                       gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(about),license);
+               }
+               g_free(license);
+       }
+       gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about),LINPHONE_VERSION);
+       gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(about),linphone_gtk_get_ui_config("title","Linphone"));
+       gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about),linphone_gtk_get_ui_config("home","http://www.linphone.org"));
+       gtk_widget_show(about);
+}
+
+static void set_video_window_decorations(GdkWindow *w){
+       const char *title=linphone_gtk_get_ui_config("title","Linphone");
+       const char *icon_path=linphone_gtk_get_ui_config("icon","linphone2.png");
+       char video_title[256];
+       GdkPixbuf *pbuf=create_pixbuf(icon_path);
+       if (!linphone_core_in_call(linphone_gtk_get_core())){
+               snprintf(video_title,sizeof(video_title),"%s video",title);     
+       }else{
+               const LinphoneAddress *uri=linphone_core_get_remote_uri(linphone_gtk_get_core());
+               char *display_name;
+               if (linphone_address_get_display_name(uri)!=NULL)
+                       display_name=ms_strdup(linphone_address_get_display_name(uri));
+               else{
+                       display_name=linphone_address_as_string(uri);
+               }
+               snprintf(video_title,sizeof(video_title),_("Call with %s"),display_name);
+               ms_free(display_name);
+       }
+       gdk_window_set_title(w,video_title);
+       /*gdk_window_set_urgency_hint(w,TRUE);*/
+       gdk_window_raise(w);
+       if (pbuf){
+               GList *l=NULL;
+               l=g_list_append(l,pbuf);
+               gdk_window_set_icon_list(w,l);
+               g_list_free(l);
+               g_object_unref(G_OBJECT(pbuf));
+       }
+}
+
+static gboolean video_needs_update=FALSE;
+
+static void update_video_title(){
+       video_needs_update=TRUE;
+}
+
+static gboolean linphone_gtk_iterate(LinphoneCore *lc){
+       static gboolean first_time=TRUE;
+       unsigned long id;
+       static unsigned long previd=0;
+       static gboolean in_iterate=FALSE;
+       
+       /*avoid reentrancy*/
+       if (in_iterate) return TRUE;
+       in_iterate=TRUE;
+       linphone_core_iterate(lc);
+       if (first_time){
+               /*after the first call to iterate, SipSetupContexts should be ready, so take actions:*/
+               linphone_gtk_show_directory_search();
+               first_time=FALSE;
+       }
+
+       id=linphone_core_get_native_video_window_id(lc);
+       if (id!=previd || video_needs_update){
+               GdkWindow *w;
+               previd=id;
+               if (id!=0){
+                       ms_message("Updating window decorations");
+#ifndef WIN32
+                       w=gdk_window_foreign_new(id);
+#else
+                       w=gdk_window_foreign_new((HANDLE)id);
+#endif
+                       if (w) {
+                               set_video_window_decorations(w);
+                               g_object_unref(G_OBJECT(w));
+                       }
+                       else ms_error("gdk_window_foreign_new() failed");
+                       if (video_needs_update) video_needs_update=FALSE;
+               }
+       }
+       if (addr_to_call!=NULL){
+               /*make sure we are not showing the login screen*/
+               GtkWidget *mw=linphone_gtk_get_main_window();
+               GtkWidget *login_frame=linphone_gtk_get_widget(mw,"login_frame");
+               if (!GTK_WIDGET_VISIBLE(login_frame)){
+                       GtkWidget *uri_bar=linphone_gtk_get_widget(mw,"uribar");
+                       gtk_entry_set_text(GTK_ENTRY(uri_bar),addr_to_call);
+                       addr_to_call=NULL;
+                       linphone_gtk_start_call(uri_bar);
+               }
+       }
+       in_iterate=FALSE;
+       return TRUE;
+}
+
+static void load_uri_history(){
+       GtkEntry *uribar=GTK_ENTRY(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"uribar"));
+       char key[20];
+       int i;
+       GtkEntryCompletion *gep=gtk_entry_completion_new();
+       GtkListStore *model=gtk_list_store_new(1,G_TYPE_STRING);
+       for (i=0;;i++){
+               const char *uri;
+               snprintf(key,sizeof(key),"uri%i",i);
+               uri=linphone_gtk_get_ui_config(key,NULL);
+               if (uri!=NULL) {
+                       GtkTreeIter iter;
+                       gtk_list_store_append(model,&iter);
+                       gtk_list_store_set(model,&iter,0,uri,-1);
+                       if (i==0) gtk_entry_set_text(uribar,uri);
+               }
+               else break;
+       }
+       gtk_entry_completion_set_model(gep,GTK_TREE_MODEL(model));
+       gtk_entry_completion_set_text_column(gep,0);
+       gtk_entry_set_completion(uribar,gep);
+}
+
+static void save_uri_history(){
+       LinphoneCore *lc=linphone_gtk_get_core();
+       LpConfig *cfg=linphone_core_get_config(lc);
+       GtkEntry *uribar=GTK_ENTRY(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"uribar"));
+       char key[20];
+       int i=0;
+       char *uri=NULL;
+       GtkTreeIter iter;
+       GtkTreeModel *model=gtk_entry_completion_get_model(gtk_entry_get_completion(uribar));
+
+       if (!gtk_tree_model_get_iter_first(model,&iter)) return;
+       do {
+               gtk_tree_model_get(model,&iter,0,&uri,-1);
+               if (uri) {
+                       snprintf(key,sizeof(key),"uri%i",i);
+                       lp_config_set_string(cfg,"GtkUi",key,uri);
+                       g_free(uri);
+               }else break;
+               i++;
+               if (i>5) break;
+       }while(gtk_tree_model_iter_next(model,&iter));
+       lp_config_sync(cfg);
+}
+
+static void completion_add_text(GtkEntry *entry, const char *text){
+       GtkTreeIter iter;
+       GtkTreeModel *model=gtk_entry_completion_get_model(gtk_entry_get_completion(entry));
+       
+       if (gtk_tree_model_get_iter_first(model,&iter)){ 
+               do {
+                       gchar *uri=NULL;
+                       gtk_tree_model_get(model,&iter,0,&uri,-1);
+                       if (uri!=NULL){
+                               if (strcmp(uri,text)==0) {
+                                       /*remove text */
+                                       gtk_list_store_remove(GTK_LIST_STORE(model),&iter);
+                                       g_free(uri);
+                                       break;
+                               }
+                               g_free(uri);
+                       }
+               }while (gtk_tree_model_iter_next(model,&iter));
+       }
+       /* and prepend it on top of the list */
+       gtk_list_store_prepend(GTK_LIST_STORE(model),&iter);
+       gtk_list_store_set(GTK_LIST_STORE(model),&iter,0,text,-1);
+       save_uri_history();
+}
+
+void linphone_gtk_call_terminated(const char *error){
+       GtkWidget *mw=linphone_gtk_get_main_window();
+       GtkWidget *icw;
+       gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"terminate_call"),FALSE);
+       gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"start_call"),TRUE);
+       gtk_widget_hide_all(linphone_gtk_get_widget(mw,"go_to_call_view_box"));
+       linphone_gtk_enable_mute_button(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(mw,"main_mute")),FALSE);
+       if (linphone_gtk_use_in_call_view())
+               linphone_gtk_in_call_view_terminate(error);
+       update_video_title();
+       icw=GTK_WIDGET(g_object_get_data(G_OBJECT(mw),"incoming_call"));
+       if (icw!=NULL){
+               g_object_set_data(G_OBJECT(mw),"incoming_call",NULL);
+               gtk_widget_destroy(icw);
+       }
+}
+
+static gboolean in_call_timer(){
+       if (linphone_core_in_call(linphone_gtk_get_core())){
+               linphone_gtk_in_call_view_update_duration(
+                       linphone_core_get_current_call_duration(linphone_gtk_get_core()));
+               return TRUE;
+       }
+       return FALSE;
+}
+
+static void linphone_gtk_call_started(GtkWidget *mw){
+       gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"start_call"),FALSE);
+       gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"terminate_call"),TRUE);
+       gtk_widget_show_all(linphone_gtk_get_widget(mw,"go_to_call_view_box"));
+       update_video_title();
+       if (linphone_gtk_use_in_call_view())
+               g_timeout_add(250,(GSourceFunc)in_call_timer,NULL);
+}
+
+static gboolean linphone_gtk_start_call_do(GtkWidget *uri_bar){
+       const char *entered=gtk_entry_get_text(GTK_ENTRY(uri_bar));
+       if (linphone_core_invite(linphone_gtk_get_core(),entered)==0) {
+               completion_add_text(GTK_ENTRY(uri_bar),entered);
+       }else{
+       }
+       return FALSE;
+}
+
+static void _linphone_gtk_accept_call(){
+       LinphoneCore *lc=linphone_gtk_get_core();
+       GtkWidget *mw=linphone_gtk_get_main_window();
+       GtkWidget *icw=GTK_WIDGET(g_object_get_data(G_OBJECT(mw),"incoming_call"));
+       if (icw!=NULL){
+               g_object_set_data(G_OBJECT(mw),"incoming_call",NULL);
+               gtk_widget_destroy(icw);
+       }
+
+       linphone_core_accept_call(lc,NULL);
+       linphone_gtk_call_started(linphone_gtk_get_main_window());
+       if (linphone_gtk_use_in_call_view()){
+               linphone_gtk_in_call_view_set_in_call();
+               linphone_gtk_show_in_call_view();
+       }
+       linphone_gtk_enable_mute_button(
+               GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"main_mute"))
+               ,TRUE);
+}
+
+void linphone_gtk_start_call(GtkWidget *w){
+       LinphoneCore *lc=linphone_gtk_get_core();
+       if (linphone_core_inc_invite_pending(lc)){
+               /*accept the call*/
+               _linphone_gtk_accept_call();
+       }else if (linphone_core_in_call(lc)) {
+               /*already in call */
+       }else{
+               /*change into in-call mode, then do the work later as it might block a bit */
+               GtkWidget *mw=gtk_widget_get_toplevel(w);
+               GtkWidget *uri_bar=linphone_gtk_get_widget(mw,"uribar");
+               const char *entered=gtk_entry_get_text(GTK_ENTRY(uri_bar));
+               linphone_gtk_call_started(mw);
+               if (linphone_gtk_use_in_call_view()){
+                       linphone_gtk_in_call_view_set_calling(entered);
+                       linphone_gtk_show_in_call_view();
+               }
+               g_timeout_add(100,(GSourceFunc)linphone_gtk_start_call_do,uri_bar);
+       }
+}
+
+void linphone_gtk_uri_bar_activate(GtkWidget *w){
+       linphone_gtk_start_call(w);
+}
+
+
+void linphone_gtk_terminate_call(GtkWidget *button){
+       linphone_core_terminate_call(linphone_gtk_get_core(),NULL);
+}
+
+void linphone_gtk_decline_call(GtkWidget *button){
+       linphone_core_terminate_call(linphone_gtk_get_core(),NULL);
+       gtk_widget_destroy(gtk_widget_get_toplevel(button));
+}
+
+void linphone_gtk_accept_call(GtkWidget *button){
+       _linphone_gtk_accept_call();
+}
+
+static gboolean linphone_gtk_auto_answer(GtkWidget *incall_window){
+       linphone_gtk_accept_call(linphone_gtk_get_widget(incall_window,"accept_call"));
+       return FALSE;
+}
+
+void linphone_gtk_set_audio_video(){
+       linphone_core_enable_video(linphone_gtk_get_core(),TRUE,TRUE);
+       linphone_core_enable_video_preview(linphone_gtk_get_core(),TRUE);
+}
+
+void linphone_gtk_set_audio_only(){
+       linphone_core_enable_video(linphone_gtk_get_core(),FALSE,FALSE);
+       linphone_core_enable_video_preview(linphone_gtk_get_core(),FALSE);
+}
+
+void linphone_gtk_enable_self_view(GtkWidget *w){
+       linphone_core_enable_self_view(linphone_gtk_get_core(),
+               gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(w)));
+}
+
+void linphone_gtk_used_identity_changed(GtkWidget *w){
+       int active=gtk_combo_box_get_active(GTK_COMBO_BOX(w));
+       char *sel=gtk_combo_box_get_active_text(GTK_COMBO_BOX(w));
+       if (sel && strlen(sel)>0){ //avoid a dummy "changed" at gui startup
+               linphone_core_set_default_proxy_index(linphone_gtk_get_core(),(active==0) ? -1 : (active-1));
+               linphone_gtk_show_directory_search();
+       }
+       if (sel) g_free(sel);
+}
+
+static void linphone_gtk_show_main_window(){
+       GtkWidget *w=linphone_gtk_get_main_window();
+       LinphoneCore *lc=linphone_gtk_get_core();
+       linphone_core_enable_video_preview(lc,linphone_core_video_enabled(lc));
+       gtk_widget_show(w);
+       gtk_window_present(GTK_WINDOW(w));
+}
+
+static void linphone_gtk_show(LinphoneCore *lc){
+       linphone_gtk_show_main_window();
+}
+
+static void linphone_gtk_inv_recv(LinphoneCore *lc, const char *from){
+       GtkWidget *w=linphone_gtk_create_window("incoming_call");
+       GtkWidget *label;
+       gchar *msg;
+
+       if (auto_answer){
+               g_timeout_add(2000,(GSourceFunc)linphone_gtk_auto_answer,w);
+       }
+
+       gtk_window_set_transient_for(GTK_WINDOW(w),GTK_WINDOW(linphone_gtk_get_main_window()));
+       gtk_window_set_position(GTK_WINDOW(w),GTK_WIN_POS_CENTER_ON_PARENT);
+
+       label=linphone_gtk_get_widget(w,"message");
+       msg=g_strdup_printf(_("Incoming call from %s"),from);
+       gtk_label_set_text(GTK_LABEL(label),msg);
+       gtk_window_set_title(GTK_WINDOW(w),msg);
+       gtk_widget_show(w);
+       gtk_window_present(GTK_WINDOW(w));
+       /*gtk_window_set_urgency_hint(GTK_WINDOW(w),TRUE);*/
+       g_free(msg);
+       g_object_set_data(G_OBJECT(linphone_gtk_get_main_window()),"incoming_call",w);
+       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"uribar")),
+                       from);
+}
+
+static void linphone_gtk_bye_recv(LinphoneCore *lc, const char *from){
+       
+}
+
+static void linphone_gtk_notify_recv(LinphoneCore *lc, LinphoneFriend * fid, const char *url, const char *status, const char *img){
+}
+
+static void linphone_gtk_new_subscriber_response(GtkWidget *dialog, guint response_id, LinphoneFriend *lf){
+       switch(response_id){
+               case GTK_RESPONSE_YES:
+                       linphone_gtk_show_contact(lf);
+               break;
+               default:
+                       linphone_core_reject_subscriber(linphone_gtk_get_core(),lf);
+       }
+       gtk_widget_destroy(dialog);
+}
+
+static void linphone_gtk_new_unknown_subscriber(LinphoneCore *lc, LinphoneFriend *lf, const char *url){
+       GtkWidget *dialog;
+
+       if (linphone_gtk_get_ui_config_int("subscribe_deny_all",0)){
+               linphone_core_reject_subscriber(linphone_gtk_get_core(),lf);
+               return;
+       }
+
+       gchar *message=g_strdup_printf(_("%s would like to add you to his contact list.\nWould you allow him to see your presence status or add him to your contact list ?\nIf you answer no, this person will be temporarily blacklisted."),url);
+       dialog = gtk_message_dialog_new (
+                               GTK_WINDOW(linphone_gtk_get_main_window()),
+                                GTK_DIALOG_DESTROY_WITH_PARENT,
+                               GTK_MESSAGE_QUESTION,
+                                GTK_BUTTONS_YES_NO,
+                                "%s",
+                               message);
+       g_free(message);
+       g_signal_connect(G_OBJECT (dialog), "response",
+               G_CALLBACK (linphone_gtk_new_subscriber_response),lf);
+       /* actually show the box */
+       gtk_widget_show(dialog);
+}
+
+typedef struct _AuthTimeout{
+       GtkWidget *w;
+} AuthTimeout;
+
+
+static void auth_timeout_clean(AuthTimeout *tout){
+       tout->w=NULL;
+}
+
+static gboolean auth_timeout_destroy(AuthTimeout *tout){
+       if (tout->w)  {
+               g_object_weak_unref(G_OBJECT(tout->w),(GWeakNotify)auth_timeout_clean,tout);
+               gtk_widget_destroy(tout->w);
+       }
+       g_free(tout);
+       return FALSE;
+}
+
+static AuthTimeout * auth_timeout_new(GtkWidget *w){
+       AuthTimeout *tout=g_new(AuthTimeout,1);
+       tout->w=w;
+       /*so that the timeout no more references the widget when it is destroyed:*/
+       g_object_weak_ref(G_OBJECT(w),(GWeakNotify)auth_timeout_clean,tout);
+       /*so that the widget is automatically destroyed after some time */
+       g_timeout_add(30000,(GtkFunction)auth_timeout_destroy,tout);
+       return tout;
+}
+
+void linphone_gtk_password_cancel(GtkWidget *w){
+       LinphoneAuthInfo *info;
+       GtkWidget *window=gtk_widget_get_toplevel(w);
+       info=(LinphoneAuthInfo*)g_object_get_data(G_OBJECT(window),"auth_info");
+       linphone_core_abort_authentication(linphone_gtk_get_core(),info);
+       gtk_widget_destroy(window);
+}
+
+void linphone_gtk_password_ok(GtkWidget *w){
+       GtkWidget *entry;
+       GtkWidget *window=gtk_widget_get_toplevel(w);
+       LinphoneAuthInfo *info;
+       info=(LinphoneAuthInfo*)g_object_get_data(G_OBJECT(window),"auth_info");
+       g_object_weak_unref(G_OBJECT(window),(GWeakNotify)linphone_auth_info_destroy,info);
+       entry=linphone_gtk_get_widget(window,"password_entry");
+       linphone_auth_info_set_passwd(info,gtk_entry_get_text(GTK_ENTRY(entry)));
+       linphone_auth_info_set_userid(info,
+               gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(window,"userid_entry"))));
+       linphone_core_add_auth_info(linphone_gtk_get_core(),info);
+       gtk_widget_destroy(window);
+}
+
+static void linphone_gtk_auth_info_requested(LinphoneCore *lc, const char *realm, const char *username){
+       GtkWidget *w=linphone_gtk_create_window("password");
+       GtkWidget *label=linphone_gtk_get_widget(w,"message");
+       LinphoneAuthInfo *info;
+       gchar *msg;
+       GtkWidget *mw=linphone_gtk_get_main_window();
+       
+       if (mw && GTK_WIDGET_VISIBLE(linphone_gtk_get_widget(mw,"login_frame"))){
+               /*don't prompt for authentication when login frame is visible*/
+               linphone_core_abort_authentication(lc,NULL);
+               return;
+       }
+
+       msg=g_strdup_printf(_("Please enter your password for username <i>%s</i>\n at domain <i>%s</i>:"),
+               username,realm);
+       gtk_label_set_markup(GTK_LABEL(label),msg);
+       g_free(msg);
+       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"userid_entry")),username);
+       info=linphone_auth_info_new(username, NULL, NULL, NULL,realm);
+       g_object_set_data(G_OBJECT(w),"auth_info",info);
+       g_object_weak_ref(G_OBJECT(w),(GWeakNotify)linphone_auth_info_destroy,info);
+       gtk_widget_show(w);
+       auth_timeout_new(w);
+}
+
+static void linphone_gtk_display_status(LinphoneCore *lc, const char *status){
+       GtkWidget *w=linphone_gtk_get_main_window();
+       GtkWidget *status_bar=linphone_gtk_get_widget(w,"status_bar");
+       gtk_statusbar_push(GTK_STATUSBAR(status_bar),
+                       gtk_statusbar_get_context_id(GTK_STATUSBAR(status_bar),""),
+                       status);
+}
+
+static void linphone_gtk_display_message(LinphoneCore *lc, const char *msg){
+       linphone_gtk_display_something(GTK_MESSAGE_INFO,msg);
+}
+
+static void linphone_gtk_display_warning(LinphoneCore *lc, const char *warning){
+       linphone_gtk_display_something(GTK_MESSAGE_WARNING,warning);
+}
+
+static void linphone_gtk_display_url(LinphoneCore *lc, const char *msg, const char *url){
+       char richtext[4096];
+       snprintf(richtext,sizeof(richtext),"%s %s",msg,url);
+       linphone_gtk_display_something(GTK_MESSAGE_INFO,richtext);
+}
+
+static void linphone_gtk_display_question(LinphoneCore *lc, const char *question){
+       linphone_gtk_display_something(GTK_MESSAGE_QUESTION,question);
+}
+
+static void linphone_gtk_call_log_updated(LinphoneCore *lc, LinphoneCallLog *cl){
+       GtkWidget *w=(GtkWidget*)g_object_get_data(G_OBJECT(linphone_gtk_get_main_window()),"call_logs");
+       if (w) linphone_gtk_call_log_update(w);
+}
+
+static void linphone_gtk_general_state(LinphoneCore *lc, LinphoneGeneralState *gstate){
+       switch(gstate->new_state){
+               case GSTATE_CALL_OUT_CONNECTED:
+               case GSTATE_CALL_IN_CONNECTED:
+                       if (linphone_gtk_use_in_call_view())
+                               linphone_gtk_in_call_view_set_in_call();
+                       linphone_gtk_enable_mute_button(
+                               GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"main_mute")),
+                       TRUE);
+               break;
+               case GSTATE_CALL_ERROR:
+                       linphone_gtk_call_terminated(gstate->message);
+               break;
+               case GSTATE_CALL_END:
+                       linphone_gtk_call_terminated(NULL);
+               break;
+               default:
+               break;
+       }
+}
+
+static void icon_popup_menu(GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer user_data){
+       GtkWidget *menu=(GtkWidget*)g_object_get_data(G_OBJECT(status_icon),"menu");
+       gtk_menu_popup(GTK_MENU(menu),NULL,NULL,gtk_status_icon_position_menu,status_icon,button,activate_time);
+}
+
+void linphone_gtk_open_browser(const char *url){
+       /*in gtk 2.16, gtk_show_uri does not work...*/
+#ifndef WIN32
+#if GTK_CHECK_VERSION(2,18,3)
+       gtk_show_uri(NULL,url,GDK_CURRENT_TIME,NULL);
+#else
+       char cl[255];
+       snprintf(cl,sizeof(cl),"/usr/bin/x-www-browser %s",url);
+       g_spawn_command_line_async(cl,NULL);
+#endif
+#else /*WIN32*/
+       ShellExecute(0,"open",url,NULL,NULL,1);
+#endif
+}
+
+void linphone_gtk_link_to_website(GtkWidget *item){
+       const gchar *home=(const gchar*)g_object_get_data(G_OBJECT(item),"home");
+       linphone_gtk_open_browser(home);
+}
+
+static GtkWidget *create_icon_menu(){
+       GtkWidget *menu=gtk_menu_new();
+       GtkWidget *menu_item;
+       GtkWidget *image;
+       gchar *tmp;
+       const gchar *homesite;
+       
+       homesite=linphone_gtk_get_ui_config("home","http://www.linphone.org");
+       menu_item=gtk_image_menu_item_new_with_label(_("Website link"));
+       tmp=g_strdup(homesite);
+       g_object_set_data(G_OBJECT(menu_item),"home",tmp);
+       g_object_weak_ref(G_OBJECT(menu_item),(GWeakNotify)g_free,tmp);
+       
+       image=gtk_image_new_from_stock(GTK_STOCK_HELP,GTK_ICON_SIZE_MENU);
+       gtk_widget_show(image);
+       gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
+       //g_object_unref(G_OBJECT(image));
+       gtk_widget_show(menu_item);
+       gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
+       g_signal_connect(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_link_to_website,NULL);
+       
+       menu_item=gtk_image_menu_item_new_from_stock(GTK_STOCK_ABOUT,NULL);
+       gtk_widget_show(menu_item);
+       gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
+       g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_show_about,NULL);
+       menu_item=gtk_image_menu_item_new_from_stock(GTK_STOCK_QUIT,NULL);
+       gtk_widget_show(menu_item);
+       gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
+       g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)gtk_main_quit,NULL);
+       gtk_widget_show(menu);
+       return menu;
+}
+
+static GtkStatusIcon *icon=NULL;
+
+static void linphone_gtk_init_status_icon(){
+       const char *icon_path=linphone_gtk_get_ui_config("icon",LINPHONE_ICON);
+       GdkPixbuf *pbuf=create_pixbuf(icon_path);
+       GtkWidget *menu=create_icon_menu();
+       const char *title;
+       icon=gtk_status_icon_new_from_pixbuf(pbuf);
+       g_object_unref(G_OBJECT(pbuf));
+       g_signal_connect_swapped(G_OBJECT(icon),"activate",(GCallback)linphone_gtk_show_main_window,linphone_gtk_get_main_window());
+       g_signal_connect(G_OBJECT(icon),"popup-menu",(GCallback)icon_popup_menu,NULL);
+       title=linphone_gtk_get_ui_config("title",_("Linphone - a video internet phone"));
+       gtk_status_icon_set_tooltip(icon,title);
+       gtk_status_icon_set_visible(icon,TRUE);
+       g_object_set_data(G_OBJECT(icon),"menu",menu);
+       g_object_weak_ref(G_OBJECT(icon),(GWeakNotify)gtk_widget_destroy,menu);
+}
+
+void linphone_gtk_load_identities(void){
+       const MSList *elem;
+       GtkComboBox *box=GTK_COMBO_BOX(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"identities"));
+       char *def_identity;
+       LinphoneProxyConfig *def=NULL;
+       int def_index=0,i;
+       GtkListStore *store;
+
+       store=GTK_LIST_STORE(gtk_combo_box_get_model(box));
+       gtk_list_store_clear(store);
+
+       linphone_core_get_default_proxy(linphone_gtk_get_core(),&def);
+       def_identity=g_strdup_printf(_("%s (Default)"),linphone_core_get_primary_contact(linphone_gtk_get_core()));
+       gtk_combo_box_append_text(box,def_identity);
+       g_free(def_identity);
+       for(i=1,elem=linphone_core_get_proxy_config_list(linphone_gtk_get_core());
+                       elem!=NULL;
+                       elem=ms_list_next(elem),i++){
+               LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
+               gtk_combo_box_append_text(box,linphone_proxy_config_get_identity(cfg));
+               if (cfg==def) {
+                       def_index=i;
+               }
+       }
+       gtk_combo_box_set_active(box,def_index);
+}
+
+static void linphone_gtk_dtmf_clicked(GtkButton *button){
+       const char *label=gtk_button_get_label(button);
+       if (linphone_core_in_call(linphone_gtk_get_core())){
+               linphone_core_send_dtmf(linphone_gtk_get_core(),label[0]);
+       }else{
+               GtkWidget *uri_bar=linphone_gtk_get_widget(gtk_widget_get_toplevel(GTK_WIDGET(button)),"uribar");
+               int pos=-1;
+               gtk_editable_insert_text(GTK_EDITABLE(uri_bar),label,1,&pos);
+       }
+}
+
+static void linphone_gtk_connect_digits(void){
+       GtkContainer *cont=GTK_CONTAINER(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"dtmf_table"));
+       GList *children=gtk_container_get_children(cont);
+       GList *elem;
+       for(elem=children;elem!=NULL;elem=elem->next){
+               GtkButton *button=GTK_BUTTON(elem->data);
+               g_signal_connect(G_OBJECT(button),"clicked",(GCallback)linphone_gtk_dtmf_clicked,NULL);
+       }
+}
+
+static void linphone_gtk_check_menu_items(void){
+       bool_t audio_only=!linphone_core_video_enabled(linphone_gtk_get_core());
+       gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(linphone_gtk_get_widget(
+                                       linphone_gtk_get_main_window(),
+                                       audio_only ? "audio_only_item" : "video_item")), TRUE);
+}
+
+static gboolean linphone_gtk_can_manage_accounts(){
+       LinphoneCore *lc=linphone_gtk_get_core();
+       const MSList *elem;
+       for(elem=linphone_core_get_sip_setups(lc);elem!=NULL;elem=elem->next){
+               SipSetup *ss=(SipSetup*)elem->data;
+               if (sip_setup_get_capabilities(ss) & SIP_SETUP_CAP_ACCOUNT_MANAGER){
+                       return TRUE;
+               }
+       }
+       return FALSE;
+}
+
+static void linphone_gtk_configure_main_window(){
+       static gboolean config_loaded=FALSE;
+       static const char *title;
+       static const char *home;
+       static const char *start_call_icon;
+       static const char *stop_call_icon;
+       static gboolean update_check_menu;
+       GtkWidget *w=linphone_gtk_get_main_window();
+       if (!config_loaded){
+               title=linphone_gtk_get_ui_config("title","Linphone");
+               home=linphone_gtk_get_ui_config("home","http://www.linphone.org");
+               start_call_icon=linphone_gtk_get_ui_config("start_call_icon","green.png");
+               stop_call_icon=linphone_gtk_get_ui_config("stop_call_icon","red.png");
+               update_check_menu=linphone_gtk_get_ui_config_int("update_check_menu",0);
+               config_loaded=TRUE;
+       }
+       linphone_gtk_configure_window(w,"main_window");
+       if (title) {
+               gtk_window_set_title(GTK_WINDOW(w),title);
+#if GTK_CHECK_VERSION(2,16,0)
+               gtk_menu_item_set_label(GTK_MENU_ITEM(linphone_gtk_get_widget(w,"main_menu")),title);
+#endif
+       }
+       if (start_call_icon){
+               GdkPixbuf *pbuf=create_pixbuf(start_call_icon);
+               gtk_image_set_from_pixbuf(GTK_IMAGE(linphone_gtk_get_widget(w,"start_call_icon")),pbuf);
+               g_object_unref(G_OBJECT(pbuf));
+       }
+       if (stop_call_icon){
+               GdkPixbuf *pbuf=create_pixbuf(stop_call_icon);
+               gtk_image_set_from_pixbuf(GTK_IMAGE(linphone_gtk_get_widget(w,"terminate_call_icon")),pbuf);
+               gtk_image_set_from_pixbuf(GTK_IMAGE(linphone_gtk_get_widget(w,"in_call_terminate_icon")),pbuf);
+               g_object_unref(G_OBJECT(pbuf));
+       }
+       if (home){
+               gchar *tmp;
+               GtkWidget *menu_item=linphone_gtk_get_widget(w,"home_item");
+               tmp=g_strdup(home);
+               g_object_set_data(G_OBJECT(menu_item),"home",tmp);
+       }
+       if (!linphone_gtk_can_manage_accounts())
+               gtk_widget_hide(linphone_gtk_get_widget(w,"run_assistant"));
+       if (update_check_menu){
+               gtk_widget_show(linphone_gtk_get_widget(w,"versioncheck"));
+       }
+}
+
+void linphone_gtk_manage_login(void){
+       LinphoneCore *lc=linphone_gtk_get_core();
+       LinphoneProxyConfig *cfg=NULL;
+       linphone_core_get_default_proxy(lc,&cfg);
+       if (cfg){
+               SipSetup *ss=linphone_proxy_config_get_sip_setup(cfg);
+               if (ss && (sip_setup_get_capabilities(ss) & SIP_SETUP_CAP_LOGIN)){
+                       linphone_gtk_show_login_frame(cfg);
+               }
+       }
+}
+
+static void linphone_gtk_init_main_window(){
+       linphone_gtk_configure_main_window();
+       linphone_gtk_manage_login();
+       load_uri_history();
+       linphone_gtk_load_identities();
+       linphone_gtk_set_my_presence(linphone_core_get_presence_info(linphone_gtk_get_core()));
+       linphone_gtk_show_friends();
+       linphone_gtk_connect_digits();
+       linphone_gtk_check_menu_items();
+       linphone_gtk_enable_mute_button(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(linphone_gtk_get_main_window(),
+                                       "main_mute")),FALSE);
+       linphone_gtk_enable_mute_button(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(linphone_gtk_get_main_window(),
+                                       "incall_mute")),FALSE);
+       if (linphone_core_in_call(linphone_gtk_get_core())) linphone_gtk_call_started(
+               linphone_gtk_get_main_window());/*hide the call button, show terminate button*/
+}
+
+void linphone_gtk_close(){
+       /* couldn't find a way to prevent closing to destroy the main window*/
+       LinphoneCore *lc=linphone_gtk_get_core();
+       the_ui=NULL;
+       the_ui=linphone_gtk_create_window("main");
+       linphone_gtk_init_main_window();
+       /*shutdown call if any*/
+       if (linphone_core_in_call(lc)){
+               linphone_core_terminate_call(lc,NULL);
+               linphone_gtk_call_terminated(NULL);
+       }
+       linphone_core_enable_video_preview(lc,FALSE);
+}
+
+void linphone_gtk_log_handler(OrtpLogLevel lev, const char *fmt, va_list args){
+       if (verbose){
+               const char *lname="undef";
+               char *msg;
+               #ifdef __linux
+               va_list cap;/*copy of our argument list: a va_list cannot be re-used (SIGSEGV on linux 64 bits)*/
+               #endif
+               switch(lev){
+                       case ORTP_DEBUG:
+                               lname="debug";
+                               break;
+                       case ORTP_MESSAGE:
+                               lname="message";
+                               break;
+                       case ORTP_WARNING:
+                               lname="warning";
+                               break;
+                       case ORTP_ERROR:
+                               lname="error";
+                               break;
+                       case ORTP_FATAL:
+                               lname="fatal";
+                               break;
+                       default:
+                               g_error("Bad level !");
+               }
+#ifdef __linux
+               va_copy(cap,args);
+               msg=g_strdup_vprintf(fmt,cap);
+               va_end(cap);
+#else
+               msg=g_strdup_vprintf(fmt,args);
+#endif
+               fprintf(stdout,"linphone-%s : %s\n",lname,msg);
+               ortp_free(msg);
+       }
+       linphone_gtk_log_push(lev,fmt,args);
+}
+
+
+static void linphone_gtk_refer_received(LinphoneCore *lc, const char *refer_to){
+    GtkEntry * uri_bar =GTK_ENTRY(linphone_gtk_get_widget(
+               linphone_gtk_get_main_window(), "uribar"));
+       linphone_gtk_show_main_window();
+       gtk_entry_set_text(uri_bar, refer_to);
+       linphone_gtk_start_call(linphone_gtk_get_main_window());
+}
+
+int main(int argc, char *argv[]){
+#ifdef ENABLE_NLS
+       void *p;
+#endif
+       const char *config_file;
+       const char *lang;
+
+       g_thread_init(NULL);
+       gdk_threads_init();
+       
+       config_file=linphone_gtk_get_config_file();
+
+#ifdef WIN32
+       /*workaround for windows: sometimes LANG is defined to an integer value, not understood by gtk */
+       if ((lang=getenv("LANG"))!=NULL){
+               if (atoi(lang)!=0){
+                       char tmp[128];
+                       snprintf(tmp,sizeof(tmp),"LANG=",lang);
+                       _putenv(tmp);
+               }
+       }
+#endif
+
+       if ((lang=linphone_gtk_get_lang(config_file))!=NULL && lang[0]!='\0'){
+#ifdef WIN32
+               char tmp[128];
+               snprintf(tmp,sizeof(tmp),"LANG=%s",lang);
+               _putenv(tmp);
+#else
+               setenv("LANG",lang,1);
+#endif
+       }
+
+#ifdef ENABLE_NLS
+       p=bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
+       if (p==NULL) perror("bindtextdomain failed");
+       bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+       textdomain (GETTEXT_PACKAGE);
+#else
+       g_message("NLS disabled.\n");
+#endif
+#ifdef WIN32
+       gtk_rc_add_default_file("./gtkrc");
+#endif
+       gdk_threads_enter();
+       
+       if (!gtk_init_with_args(&argc,&argv,_("A free SIP video-phone"),
+                               linphone_options,NULL,NULL)){
+               gdk_threads_leave();
+               return -1;
+       }
+#ifdef WIN32
+       if (workingdir!=NULL)
+               _chdir(workingdir);
+#endif
+
+       if (linphone_core_wake_up_possible_already_running_instance(
+               config_file, addr_to_call) == 0){
+               g_message("addr_to_call=%s",addr_to_call);
+               g_warning("Another running instance of linphone has been detected. It has been woken-up.");
+               g_warning("This instance is going to exit now.");
+               gdk_threads_leave();
+               return 0;
+       }
+
+       add_pixmap_directory("pixmaps");
+       add_pixmap_directory(PACKAGE_DATA_DIR "/pixmaps/linphone");
+
+       the_ui=linphone_gtk_create_window("main");
+       
+       linphone_gtk_create_log_window();
+       linphone_core_enable_logs_with_cb(linphone_gtk_log_handler);
+
+       linphone_gtk_init_liblinphone(config_file);
+       /* do not lower timeouts under 30 ms because it exhibits a bug on gtk+/win32, with cpu running 20% all the time...*/
+       gtk_timeout_add(30,(GtkFunction)linphone_gtk_iterate,(gpointer)linphone_gtk_get_core());
+       gtk_timeout_add(30,(GtkFunction)linphone_gtk_check_logs,(gpointer)NULL);
+       linphone_gtk_init_main_window();
+       linphone_gtk_init_status_icon();
+       if (!iconified)
+               linphone_gtk_show_main_window();
+       if (linphone_gtk_get_ui_config_int("update_check_menu",0)==0)
+               linphone_gtk_check_for_new_version();
+
+       gtk_main();
+       gdk_threads_leave();
+       linphone_gtk_destroy_log_window();
+       linphone_core_destroy(the_core);
+       /*workaround a bug on win32 that makes status icon still present in the systray even after program exit.*/
+       gtk_status_icon_set_visible(icon,FALSE);
+       return 0;
+}
diff --git a/gtk-glade/main.glade b/gtk-glade/main.glade
new file mode 100644 (file)
index 0000000..ad7445e
--- /dev/null
@@ -0,0 +1,1429 @@
+<?xml version="1.0"?>
+<glade-interface>
+  <!-- interface-requires gtk+ 2.16 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <widget class="GtkWindow" id="main">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="icon">linphone2.png</property>
+    <signal name="destroy" handler="linphone_gtk_close"/>
+    <child>
+      <widget class="GtkVBox" id="vbox2">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <child>
+          <widget class="GtkMenuBar" id="main_menubar">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <child>
+              <widget class="GtkMenuItem" id="main_menu">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">_Linphone</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="menu2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="run_assistant">
+                        <property name="label" translatable="yes">Assistant</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="linphone_gtk_create_assistant"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image1">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-preferences</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="menuitem5">
+                        <property name="label">gtk-preferences</property>
+                        <property name="visible">True</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                        <signal name="activate" handler="linphone_gtk_show_parameters"/>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="menuitem1">
+                        <property name="label">Call history</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="linphone_gtk_show_call_logs"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image2">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-justify-fill</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="logout">
+                        <property name="label">gtk-disconnect</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                        <signal name="activate" handler="linphone_gtk_logout_clicked"/>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkSeparatorMenuItem" id="separatormenuitem2">
+                        <property name="visible">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="quit">
+                        <property name="label">gtk-quit</property>
+                        <property name="visible">True</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                        <signal name="activate" handler="gtk_main_quit"/>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkMenuItem" id="modes">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">_Modes</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="menu_mode">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <widget class="GtkRadioMenuItem" id="audio_only_item">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">Audio only</property>
+                        <property name="use_underline">True</property>
+                        <property name="draw_as_radio">True</property>
+                        <property name="group">video_item</property>
+                        <signal name="activate" handler="linphone_gtk_set_audio_only"/>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkRadioMenuItem" id="video_item">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">Audio &amp; Video</property>
+                        <property name="use_underline">True</property>
+                        <property name="active">True</property>
+                        <property name="draw_as_radio">True</property>
+                        <property name="group">audio_only_item</property>
+                        <signal name="activate" handler="linphone_gtk_set_audio_video"/>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
+                        <property name="visible">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckMenuItem" id="menuitem3">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Enable self-view</property>
+                        <property name="use_underline">True</property>
+                        <property name="active">True</property>
+                        <signal name="toggled" handler="linphone_gtk_enable_self_view"/>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkImageMenuItem" id="menuitem4">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="use_underline">True</property>
+                <property name="use_stock">True</property>
+                <child>
+                  <widget class="GtkMenu" id="menu3">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="show_logs">
+                        <property name="label">Show debug messages</property>
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="linphone_gtk_log_show"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image3">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-info</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="menuitem6">
+                        <property name="label">gtk-about</property>
+                        <property name="visible">True</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                        <signal name="activate" handler="linphone_gtk_show_about"/>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="home_item">
+                        <property name="label">Homepage</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="linphone_gtk_link_to_website"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image4">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-home</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="versioncheck">
+                        <property name="label" translatable="yes">Check for updates</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="linphone_gtk_check_for_updates"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image5">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-info</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkHBox" id="hbox1">
+            <property name="visible">True</property>
+            <child>
+              <widget class="GtkVBox" id="idle_frame">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="orientation">vertical</property>
+                <child>
+                  <widget class="GtkHBox" id="hbox2">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkButton" id="start_call">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="has_tooltip">True</property>
+                        <property name="tooltip" translatable="yes">Start call</property>
+                        <property name="relief">half</property>
+                        <signal name="clicked" handler="linphone_gtk_start_call"/>
+                        <child>
+                          <widget class="GtkHBox" id="hbox4">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkImage" id="start_call_icon">
+                                <property name="visible">True</property>
+                                <property name="stock">gtk-apply</property>
+                              </widget>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="start_call_label">
+                                <property name="label" translatable="yes">Start call</property>
+                              </widget>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="padding">10</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkFrame" id="frame4">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label_xalign">0</property>
+                        <child>
+                          <widget class="GtkAlignment" id="alignment4">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <child>
+                              <widget class="GtkHBox" id="hbox3">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <child>
+                                  <widget class="GtkEntry" id="uribar">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="tooltip" translatable="yes">Enter username, phone number, or full sip address</property>
+                                    <property name="invisible_char">&#x25CF;</property>
+                                    <signal name="activate" handler="linphone_gtk_uri_bar_activate"/>
+                                  </widget>
+                                  <packing>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="label9">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">SIP address or phone number:</property>
+                            <property name="use_markup">True</property>
+                          </widget>
+                          <packing>
+                            <property name="type">label_item</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkButton" id="terminate_call">
+                        <property name="visible">True</property>
+                        <property name="sensitive">False</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="has_tooltip">True</property>
+                        <property name="tooltip" translatable="yes">Terminate call</property>
+                        <property name="relief">half</property>
+                        <signal name="clicked" handler="linphone_gtk_terminate_call"/>
+                        <child>
+                          <widget class="GtkHBox" id="hbox21">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <child>
+                              <widget class="GtkImage" id="terminate_call_icon">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="stock">gtk-close</property>
+                              </widget>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="terminate_call_label">
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Terminate call</property>
+                              </widget>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="padding">10</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="padding">8</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkHBox" id="hbox5">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <widget class="GtkVBox" id="vbox5">
+                        <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <widget class="GtkFrame" id="contact_list_frame">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label_xalign">0</property>
+                            <child>
+                              <widget class="GtkAlignment" id="alignment6">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="left_padding">12</property>
+                                <child>
+                                  <widget class="GtkVBox" id="vbox7">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="orientation">vertical</property>
+                                    <child>
+                                      <widget class="GtkHBox" id="filtering_box">
+                                        <property name="visible">True</property>
+                                        <child>
+                                          <widget class="GtkLabel" id="label2">
+                                            <property name="visible">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <property name="label" translatable="yes">Lookup:</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="padding">12</property>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkEntry" id="search_bar">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <property name="invisible_char">&#x25CF;</property>
+                                            <signal name="changed" handler="linphone_gtk_show_friends"/>
+                                          </widget>
+                                          <packing>
+                                            <property name="padding">4</property>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkLabel" id="label_in">
+                                            <property name="visible">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <property name="label" translatable="yes">in</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="padding">8</property>
+                                            <property name="position">2</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkComboBox" id="show_category">
+                                            <property name="visible">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <property name="active">0</property>
+                                            <property name="items" translatable="yes">All users
+Online users</property>
+                                            <signal name="changed" handler="linphone_gtk_show_friends"/>
+                                          </widget>
+                                          <packing>
+                                            <property name="padding">4</property>
+                                            <property name="position">3</property>
+                                          </packing>
+                                        </child>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkScrolledWindow" id="scrolledwindow1">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="hscrollbar_policy">automatic</property>
+                                        <property name="vscrollbar_policy">automatic</property>
+                                        <child>
+                                          <widget class="GtkTreeView" id="contact_list">
+                                            <property name="height_request">120</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <signal name="button_press_event" handler="linphone_gtk_contact_list_button_pressed"/>
+                                            <signal name="cursor_changed" handler="linphone_gtk_contact_clicked"/>
+                                            <signal name="row_activated" handler="linphone_gtk_contact_activated"/>
+                                            <signal name="popup_menu" handler="linphone_gtk_popup_contact_menu"/>
+                                          </widget>
+                                        </child>
+                                      </widget>
+                                      <packing>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkHBox" id="directory_search_box">
+                                        <child>
+                                          <widget class="GtkEntry" id="directory_search_entry">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="invisible_char">&#x25CF;</property>
+                                            <property name="secondary_icon_stock">gtk-find</property>
+                                            <property name="secondary_icon_activatable">True</property>
+                                            <property name="secondary_icon_sensitive">True</property>
+                                            <signal name="focus_in_event" handler="linphone_gtk_directory_search_focus_in"/>
+                                            <signal name="activate" handler="linphone_gtk_directory_search_activate"/>
+                                            <signal name="icon_press" handler="linphone_gtk_directory_search_activate"/>
+                                            <signal name="focus_out_event" handler="linphone_gtk_directory_search_focus_out"/>
+                                          </widget>
+                                          <packing>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkButton" id="directory_search_button">
+                                            <property name="label" translatable="yes">gtk-find</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <property name="use_stock">True</property>
+                                            <signal name="clicked" handler="linphone_gtk_directory_search_button_clicked"/>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">2</property>
+                                      </packing>
+                                    </child>
+                                  </widget>
+                                </child>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label12">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">&lt;b&gt;Contact list&lt;/b&gt;</property>
+                                <property name="use_markup">True</property>
+                              </widget>
+                              <packing>
+                                <property name="type">label_item</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="padding">8</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkHBox" id="hbox7">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkToggleButton" id="main_mute">
+                                <property name="label" translatable="yes">Mute</property>
+                                <property name="sensitive">False</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <signal name="toggled" handler="linphone_gtk_mute_toggled"/>
+                              </widget>
+                              <packing>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkHBox" id="internet_kind_controls">
+                            <child>
+                              <widget class="GtkLabel" id="label7">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Internet connection:</property>
+                              </widget>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkComboBox" id="internet_kind">
+                                <property name="visible">True</property>
+                                <property name="active">0</property>
+                                <property name="items" translatable="yes">ADSL
+Fiber Channel</property>
+                                <signal name="changed" handler="linphone_gtk_internet_kind_changed"/>
+                              </widget>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="padding">8</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkVBox" id="vbox6">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <widget class="GtkFrame" id="dialpad">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label_xalign">0</property>
+                            <child>
+                              <widget class="GtkAlignment" id="alignment5">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <child>
+                                  <widget class="GtkTable" id="dtmf_table">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="border_width">4</property>
+                                    <property name="n_rows">4</property>
+                                    <property name="n_columns">4</property>
+                                    <property name="homogeneous">True</property>
+                                    <child>
+                                      <widget class="GtkButton" id="dtmf_D">
+                                        <property name="label" translatable="yes">D</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="left_attach">3</property>
+                                        <property name="right_attach">4</property>
+                                        <property name="top_attach">3</property>
+                                        <property name="bottom_attach">4</property>
+                                        <property name="x_options"></property>
+                                        <property name="y_options"></property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkButton" id="dtmf_hash">
+                                        <property name="label" translatable="yes">#</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="left_attach">2</property>
+                                        <property name="right_attach">3</property>
+                                        <property name="top_attach">3</property>
+                                        <property name="bottom_attach">4</property>
+                                        <property name="x_options"></property>
+                                        <property name="y_options"></property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkButton" id="dtmf_0">
+                                        <property name="label" translatable="yes">0</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="left_attach">1</property>
+                                        <property name="right_attach">2</property>
+                                        <property name="top_attach">3</property>
+                                        <property name="bottom_attach">4</property>
+                                        <property name="x_options"></property>
+                                        <property name="y_options"></property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkButton" id="dtmf_star">
+                                        <property name="label" translatable="yes">*</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="top_attach">3</property>
+                                        <property name="bottom_attach">4</property>
+                                        <property name="x_options"></property>
+                                        <property name="y_options"></property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkButton" id="dtmf_C">
+                                        <property name="label" translatable="yes">C</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="left_attach">3</property>
+                                        <property name="right_attach">4</property>
+                                        <property name="top_attach">2</property>
+                                        <property name="bottom_attach">3</property>
+                                        <property name="x_options"></property>
+                                        <property name="y_options"></property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkButton" id="dtmf_9">
+                                        <property name="label" translatable="yes">9</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="left_attach">2</property>
+                                        <property name="right_attach">3</property>
+                                        <property name="top_attach">2</property>
+                                        <property name="bottom_attach">3</property>
+                                        <property name="x_options"></property>
+                                        <property name="y_options"></property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkButton" id="dtmf_8">
+                                        <property name="label" translatable="yes">8</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="left_attach">1</property>
+                                        <property name="right_attach">2</property>
+                                        <property name="top_attach">2</property>
+                                        <property name="bottom_attach">3</property>
+                                        <property name="x_options"></property>
+                                        <property name="y_options"></property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkButton" id="dtmf_7">
+                                        <property name="label" translatable="yes">7</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="top_attach">2</property>
+                                        <property name="bottom_attach">3</property>
+                                        <property name="x_options"></property>
+                                        <property name="y_options"></property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkButton" id="dtmf_B">
+                                        <property name="label" translatable="yes">B</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="left_attach">3</property>
+                                        <property name="right_attach">4</property>
+                                        <property name="top_attach">1</property>
+                                        <property name="bottom_attach">2</property>
+                                        <property name="x_options"></property>
+                                        <property name="y_options"></property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkButton" id="dtmf_6">
+                                        <property name="label" translatable="yes">6</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="left_attach">2</property>
+                                        <property name="right_attach">3</property>
+                                        <property name="top_attach">1</property>
+                                        <property name="bottom_attach">2</property>
+                                        <property name="x_options"></property>
+                                        <property name="y_options"></property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkButton" id="dtmf_5">
+                                        <property name="label" translatable="yes">5</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="left_attach">1</property>
+                                        <property name="right_attach">2</property>
+                                        <property name="top_attach">1</property>
+                                        <property name="bottom_attach">2</property>
+                                        <property name="x_options"></property>
+                                        <property name="y_options"></property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkButton" id="dtmf_4">
+                                        <property name="label" translatable="yes">4</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="top_attach">1</property>
+                                        <property name="bottom_attach">2</property>
+                                        <property name="x_options"></property>
+                                        <property name="y_options"></property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkButton" id="dtmf_A">
+                                        <property name="label" translatable="yes">A</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="left_attach">3</property>
+                                        <property name="right_attach">4</property>
+                                        <property name="x_options"></property>
+                                        <property name="y_options"></property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkButton" id="dtmf_3">
+                                        <property name="label" translatable="yes">3</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="left_attach">2</property>
+                                        <property name="right_attach">3</property>
+                                        <property name="x_options"></property>
+                                        <property name="y_options"></property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkButton" id="dtmf_2">
+                                        <property name="label" translatable="yes">2</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="left_attach">1</property>
+                                        <property name="right_attach">2</property>
+                                        <property name="x_options"></property>
+                                        <property name="y_options"></property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkButton" id="dtmf_1">
+                                        <property name="label" translatable="yes">1</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="x_options"></property>
+                                        <property name="y_options"></property>
+                                      </packing>
+                                    </child>
+                                  </widget>
+                                </child>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label11">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Digits</property>
+                                <property name="use_markup">True</property>
+                              </widget>
+                              <packing>
+                                <property name="type">label_item</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkHBox" id="hbox6">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkFrame" id="identity_frame">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label_xalign">0</property>
+                        <child>
+                          <widget class="GtkHBox" id="hbox9">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkAlignment" id="alignment8">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="left_padding">12</property>
+                                <child>
+                                  <widget class="GtkComboBox" id="identities">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="active">0</property>
+                                    <property name="items" translatable="yes">Default</property>
+                                    <signal name="changed" handler="linphone_gtk_used_identity_changed"/>
+                                  </widget>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkButton" id="presence_button">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <signal name="clicked" handler="linphone_gtk_my_presence_clicked"/>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="label17">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">My current identity:</property>
+                            <property name="use_markup">True</property>
+                          </widget>
+                          <packing>
+                            <property name="type">label_item</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkHButtonBox" id="go_to_call_view_box">
+                    <child>
+                      <widget class="GtkButton" id="go_to_call_view">
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <signal name="clicked" handler="linphone_gtk_show_in_call_view"/>
+                        <child>
+                          <widget class="GtkHBox" id="hbox10">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkImage" id="image7">
+                                <property name="visible">True</property>
+                                <property name="stock">gtk-go-forward</property>
+                                <property name="icon-size">4</property>
+                              </widget>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label5">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Show current call</property>
+                              </widget>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="padding">8</property>
+                        <property name="pack_type">end</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkFrame" id="in_call_frame">
+                <property name="label_xalign">0.5</property>
+                <child>
+                  <widget class="GtkAlignment" id="alignment1">
+                    <property name="visible">True</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <widget class="GtkVBox" id="vbox3">
+                        <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <widget class="GtkImage" id="in_call_animation">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-info</property>
+                            <property name="icon-size">5</property>
+                          </widget>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkFrame" id="frame2">
+                            <property name="visible">True</property>
+                            <property name="label_xalign">0</property>
+                            <child>
+                              <widget class="GtkLabel" id="in_call_uri">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">label</property>
+                                <property name="justify">center</property>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label3">
+                                <property name="visible">True</property>
+                                <property name="use_markup">True</property>
+                              </widget>
+                              <packing>
+                                <property name="type">label_item</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkFrame" id="frame1">
+                            <property name="visible">True</property>
+                            <property name="label_xalign">0</property>
+                            <child>
+                              <widget class="GtkVBox" id="vbox4">
+                                <property name="visible">True</property>
+                                <property name="orientation">vertical</property>
+                                <child>
+                                  <widget class="GtkLabel" id="in_call_duration">
+                                    <property name="visible">True</property>
+                                    <property name="label" translatable="yes">Duration</property>
+                                    <property name="justify">center</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="call_label">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Duration:</property>
+                                <property name="use_markup">True</property>
+                              </widget>
+                              <packing>
+                                <property name="type">label_item</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkHButtonBox" id="hbuttonbox4">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkToggleButton" id="incall_mute">
+                                <property name="label" translatable="yes">Mute</property>
+                                <property name="visible">True</property>
+                                <property name="sensitive">False</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <signal name="toggled" handler="linphone_gtk_mute_toggled"/>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">3</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkHButtonBox" id="hbuttonbox1">
+                            <property name="visible">True</property>
+                            <property name="layout_style">center</property>
+                            <child>
+                              <widget class="GtkButton" id="in_call_terminate">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <signal name="clicked" handler="linphone_gtk_terminate_call"/>
+                                <child>
+                                  <widget class="GtkHBox" id="hbox8">
+                                    <property name="visible">True</property>
+                                    <child>
+                                      <widget class="GtkImage" id="in_call_terminate_icon">
+                                        <property name="visible">True</property>
+                                        <property name="stock">gtk-close</property>
+                                        <property name="icon-size">3</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkLabel" id="label1">
+                                        <property name="visible">True</property>
+                                        <property name="label" translatable="yes">&lt;b&gt;Terminate call&lt;/b&gt;</property>
+                                        <property name="use_markup">True</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </widget>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="padding">8</property>
+                            <property name="position">4</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkHButtonBox" id="hbuttonbox2">
+                            <property name="visible">True</property>
+                            <property name="layout_style">center</property>
+                            <child>
+                              <widget class="GtkButton" id="idle_view_button">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <signal name="clicked" handler="linphone_gtk_show_idle_view"/>
+                                <child>
+                                  <widget class="GtkHBox" id="hbox11">
+                                    <property name="visible">True</property>
+                                    <child>
+                                      <widget class="GtkImage" id="image6">
+                                        <property name="visible">True</property>
+                                        <property name="stock">gtk-go-back</property>
+                                        <property name="icon-size">1</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkLabel" id="label4">
+                                        <property name="visible">True</property>
+                                        <property name="label" translatable="yes">Main view</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </widget>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="pack_type">end</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">5</property>
+                          </packing>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="in_call_status">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">In call</property>
+                    <property name="use_markup">True</property>
+                    <property name="justify">center</property>
+                  </widget>
+                  <packing>
+                    <property name="type">label_item</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkFrame" id="login_frame">
+                <property name="label_xalign">0</property>
+                <child>
+                  <widget class="GtkAlignment" id="alignment2">
+                    <property name="visible">True</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <widget class="GtkVBox" id="vbox1">
+                        <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <widget class="GtkFrame" id="frame5">
+                            <property name="visible">True</property>
+                            <property name="label_xalign">0</property>
+                            <child>
+                              <widget class="GtkAlignment" id="alignment3">
+                                <property name="visible">True</property>
+                                <property name="left_padding">12</property>
+                                <child>
+                                  <widget class="GtkTable" id="table1">
+                                    <property name="visible">True</property>
+                                    <property name="n_rows">4</property>
+                                    <property name="n_columns">2</property>
+                                    <child>
+                                      <widget class="GtkLabel" id="label8">
+                                        <property name="visible">True</property>
+                                        <property name="label" translatable="yes">Username</property>
+                                      </widget>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkLabel" id="label10">
+                                        <property name="visible">True</property>
+                                        <property name="label" translatable="yes">Password</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="top_attach">1</property>
+                                        <property name="bottom_attach">2</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkLabel" id="label13">
+                                        <property name="visible">True</property>
+                                        <property name="label" translatable="yes">Internet connection:</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="top_attach">2</property>
+                                        <property name="bottom_attach">3</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkEntry" id="login_username">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="invisible_char">&#x25CF;</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="left_attach">1</property>
+                                        <property name="right_attach">2</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkEntry" id="login_password">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="visibility">False</property>
+                                        <property name="invisible_char">&#x25CF;</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="left_attach">1</property>
+                                        <property name="right_attach">2</property>
+                                        <property name="top_attach">1</property>
+                                        <property name="bottom_attach">2</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkComboBox" id="login_internet_kind">
+                                        <property name="visible">True</property>
+                                        <property name="active">0</property>
+                                        <property name="items" translatable="yes">ADSL
+Fiber Channel</property>
+                                        <signal name="changed" handler="linphone_gtk_internet_kind_changed"/>
+                                      </widget>
+                                      <packing>
+                                        <property name="left_attach">1</property>
+                                        <property name="right_attach">2</property>
+                                        <property name="top_attach">2</property>
+                                        <property name="bottom_attach">3</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkCheckButton" id="automatic_login">
+                                        <property name="label" translatable="yes">Automatically log me in</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">False</property>
+                                        <property name="draw_indicator">True</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="left_attach">1</property>
+                                        <property name="right_attach">2</property>
+                                        <property name="top_attach">3</property>
+                                        <property name="bottom_attach">4</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <placeholder/>
+                                    </child>
+                                  </widget>
+                                </child>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="login_label">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Login information</property>
+                                <property name="use_markup">True</property>
+                              </widget>
+                              <packing>
+                                <property name="type">label_item</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkHButtonBox" id="hbuttonbox3">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkButton" id="login_connect">
+                                <property name="label" translatable="yes">gtk-connect</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <property name="use_stock">True</property>
+                                <signal name="clicked" handler="linphone_gtk_login_frame_connect_clicked"/>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label6">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Welcome !&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </widget>
+                  <packing>
+                    <property name="type">label_item</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkStatusbar" id="status_bar">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="spacing">2</property>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>
diff --git a/gtk-glade/p2pwizard.glade b/gtk-glade/p2pwizard.glade
new file mode 100644 (file)
index 0000000..79007a6
--- /dev/null
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--Generated with glade3 3.4.5 on Sun Mar 29 21:17:24 2009 -->
+<glade-interface>
+  <widget class="GtkAssistant" id="p2pwizard">
+    <property name="title" translatable="yes">Creating a FONICS account</property>
+    <signal name="apply" handler="linphone_gtk_fonis_wizard_apply"/>
+    <signal name="prepare" handler="linphone_gtk_fonis_wizard_prepare"/>
+    <child>
+      <widget class="GtkLabel" id="label1">
+        <property name="visible">True</property>
+        <property name="label" translatable="yes">Welcome !
+This wizard will help you to setup a SIP account. 
+</property>
+        <property name="use_markup">True</property>
+        <property name="justify">GTK_JUSTIFY_CENTER</property>
+        <property name="wrap">True</property>
+        <property name="selectable">True</property>
+      </widget>
+      <packing>
+        <property name="page_type">GTK_ASSISTANT_PAGE_INTRO</property>
+        <property name="title">Introduction</property>
+      </packing>
+    </child>
+    <child>
+      <widget class="GtkVBox" id="vbox1">
+        <property name="visible">True</property>
+        <child>
+          <widget class="GtkLabel" id="label2">
+            <property name="visible">True</property>
+            <property name="label" translatable="yes">Please choose a username:</property>
+          </widget>
+        </child>
+        <child>
+          <widget class="GtkFrame" id="frame1">
+            <property name="visible">True</property>
+            <property name="label_xalign">0</property>
+            <child>
+              <widget class="GtkAlignment" id="alignment1">
+                <property name="visible">True</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <widget class="GtkVBox" id="vbox2">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkHBox" id="hbox1">
+                        <property name="visible">True</property>
+                        <child>
+                          <widget class="GtkEntry" id="username">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                          </widget>
+                        </child>
+                        <child>
+                          <widget class="GtkButton" id="button1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="response_id">0</property>
+                            <signal name="clicked" handler="linphone_gtk_fonis_wizard_check_username_clicked"/>
+                            <child>
+                              <widget class="GtkHBox" id="hbox2">
+                                <property name="visible">True</property>
+                                <child>
+                                  <widget class="GtkImage" id="image1">
+                                    <property name="visible">True</property>
+                                    <property name="stock">gtk-apply</property>
+                                  </widget>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="label5">
+                                    <property name="visible">True</property>
+                                    <property name="label" translatable="yes">Check availability</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="check_result">
+                        <property name="visible">True</property>
+                      </widget>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label4">
+                <property name="visible">True</property>
+                <property name="use_markup">True</property>
+              </widget>
+              <packing>
+                <property name="type">label_item</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </widget>
+      <packing>
+        <property name="title">Create your account !</property>
+      </packing>
+    </child>
+    <child>
+      <widget class="GtkLabel" id="label3">
+        <property name="visible">True</property>
+        <property name="label" translatable="yes">Done ! Your account is now created and ready to use.</property>
+      </widget>
+      <packing>
+        <property name="page_type">GTK_ASSISTANT_PAGE_CONFIRM</property>
+        <property name="title">Finished !</property>
+      </packing>
+    </child>
+  </widget>
+</glade-interface>
diff --git a/gtk-glade/parameters.glade b/gtk-glade/parameters.glade
new file mode 100644 (file)
index 0000000..56d02a4
--- /dev/null
@@ -0,0 +1,1643 @@
+<?xml version="1.0"?>
+<glade-interface>
+  <!-- interface-requires gtk+ 2.16 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <widget class="GtkWindow" id="parameters">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Settings</property>
+    <property name="icon">linphone2.png</property>
+    <child>
+      <widget class="GtkVBox" id="vbox1">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <child>
+          <widget class="GtkNotebook" id="notebook1">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <child>
+              <widget class="GtkVBox" id="network_tab">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <child>
+                  <widget class="GtkFrame" id="transport_frame">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkVBox" id="vbox3">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkHBox" id="hbox2">
+                                <property name="visible">True</property>
+                                <child>
+                                  <widget class="GtkCheckButton" id="mtu_set">
+                                    <property name="label" translatable="yes">Set Maximum Transmission Unit:</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="draw_indicator">True</property>
+                                    <signal name="toggled" handler="linphone_gtk_mtu_set"/>
+                                  </widget>
+                                  <packing>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkSpinButton" id="mtu">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="adjustment">500 500 3001 1 10 10</property>
+                                    <signal name="value_changed" handler="linphone_gtk_mtu_changed"/>
+                                  </widget>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkCheckButton" id="dtmf_sipinfo">
+                                <property name="label" translatable="yes">Send DTMFs as SIP info</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="draw_indicator">True</property>
+                                <signal name="toggled" handler="linphone_gtk_use_sip_info_dtmf_toggled"/>
+                              </widget>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkCheckButton" id="ipv6_enabled">
+                                <property name="label" translatable="yes">Use IPv6 instead of IPv4</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="draw_indicator">True</property>
+                                <signal name="toggled" handler="linphone_gtk_ipv6_toggled"/>
+                              </widget>
+                              <packing>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Transport&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkFrame" id="ports_frame">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment2">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkTable" id="table1">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="n_rows">3</property>
+                            <property name="n_columns">2</property>
+                            <child>
+                              <widget class="GtkSpinButton" id="video_rtp_port">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="adjustment">1 1 65535 1 10 10</property>
+                                <signal name="value_changed" handler="linphone_gtk_video_port_changed"/>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkSpinButton" id="audio_rtp_port">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="adjustment">1 1 65535 1 10 10</property>
+                                <signal name="value_changed" handler="linphone_gtk_audio_port_changed"/>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkSpinButton" id="sip_port">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="adjustment">1 1 65535 1 10 10</property>
+                                <signal name="value_changed" handler="linphone_gtk_sip_port_changed"/>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label7">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Video RTP/UDP:</property>
+                                <property name="justify">right</property>
+                              </widget>
+                              <packing>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label6">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Audio RTP/UDP:</property>
+                                <property name="justify">right</property>
+                              </widget>
+                              <packing>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label5">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">SIP (UDP):</property>
+                                <property name="justify">right</property>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label4">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Ports&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkFrame" id="nat_frame">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <widget class="GtkVButtonBox" id="vbuttonbox3">
+                        <property name="visible">True</property>
+                        <child>
+                          <widget class="GtkRadioButton" id="no_nat">
+                            <property name="label" translatable="yes">Direct connection to the Internet</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                            <signal name="toggled" handler="linphone_gtk_no_firewall_toggled"/>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkVBox" id="vbox4">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkRadioButton" id="use_nat_address">
+                                <property name="label" translatable="yes">Behind NAT / Firewall (specify gateway IP below)</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="active">True</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">no_nat</property>
+                                <signal name="toggled" handler="linphone_gtk_use_nat_address_toggled"/>
+                              </widget>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkHBox" id="hbox21">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <child>
+                                  <widget class="GtkLabel" id="label39">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="label" translatable="yes">Public IP address:</property>
+                                    <property name="justify">right</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkEntry" id="nat_address">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <signal name="changed" handler="linphone_gtk_nat_address_changed"/>
+                                  </widget>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkVBox" id="vbox5">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkRadioButton" id="use_stun">
+                                <property name="label" translatable="yes">Behind NAT / Firewall (use STUN to resolve)</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="active">True</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">no_nat</property>
+                                <signal name="toggled" handler="linphone_gtk_use_stun_toggled"/>
+                              </widget>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkHBox" id="hbox24">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <child>
+                                  <widget class="GtkLabel" id="label42">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="label" translatable="yes">Stun server:</property>
+                                    <property name="justify">right</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkEntry" id="stun_server">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <signal name="changed" handler="linphone_gtk_stun_server_changed"/>
+                                  </widget>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label38">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">&lt;b&gt;NAT and Firewall&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkHBox" id="hbox12">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <child>
+                  <widget class="GtkImage" id="image6">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="stock">gtk-network</property>
+                  </widget>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="network">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Network settings</property>
+                  </widget>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="tab_fill">False</property>
+                <property name="type">tab</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkVBox" id="multimedia_tab">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <child>
+                  <widget class="GtkFrame" id="frame14">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment14">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkTable" id="table5">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="n_rows">6</property>
+                            <property name="n_columns">2</property>
+                            <child>
+                              <widget class="GtkHBox" id="ring_sound_box">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <child>
+                                  <widget class="GtkFileChooserButton" id="ring_chooser">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <signal name="file_set" handler="linphone_gtk_ring_file_set"/>
+                                  </widget>
+                                  <packing>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkButton" id="play_ring">
+                                    <property name="label" translatable="yes">gtk-media-play</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="use_stock">True</property>
+                                    <signal name="clicked" handler="linphone_gtk_play_ring_file"/>
+                                  </widget>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">4</property>
+                                <property name="bottom_attach">5</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="ring_sound_label">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Ring sound:</property>
+                                <property name="justify">right</property>
+                              </widget>
+                              <packing>
+                                <property name="top_attach">4</property>
+                                <property name="bottom_attach">5</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkEntry" id="alsa_dev">
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <signal name="editing_done" handler="linphone_gtk_alsa_special_device_changed"/>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">3</property>
+                                <property name="bottom_attach">4</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkComboBox" id="capture_device">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="items" translatable="yes">default soundcard
+</property>
+                                <signal name="changed" handler="linphone_gtk_capture_device_changed"/>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkComboBox" id="ring_device">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="items" translatable="yes">default soundcard</property>
+                                <signal name="changed" handler="linphone_gtk_ring_device_changed"/>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label36">
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">ALSA special device (optional):</property>
+                                <property name="justify">right</property>
+                              </widget>
+                              <packing>
+                                <property name="top_attach">3</property>
+                                <property name="bottom_attach">4</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label35">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Capture device:</property>
+                                <property name="justify">right</property>
+                              </widget>
+                              <packing>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label34">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Ring device:</property>
+                                <property name="justify">right</property>
+                              </widget>
+                              <packing>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label32">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Playback device:</property>
+                                <property name="justify">right</property>
+                              </widget>
+                              <packing>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkComboBox" id="playback_device">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="items" translatable="yes">a sound card
+</property>
+                                <signal name="changed" handler="linphone_gtk_playback_device_changed"/>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkCheckButton" id="echo_cancelation">
+                                <property name="label" translatable="yes">Enable echo cancellation</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="draw_indicator">True</property>
+                                <signal name="toggled" handler="linphone_gtk_echo_cancelation_toggled"/>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">5</property>
+                                <property name="bottom_attach">6</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label31">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Audio&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkFrame" id="frame4">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment4">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkTable" id="table2">
+                            <property name="visible">True</property>
+                            <property name="n_rows">2</property>
+                            <property name="n_columns">2</property>
+                            <child>
+                              <widget class="GtkLabel" id="label9">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Video input device:</property>
+                                <property name="justify">right</property>
+                              </widget>
+                              <packing>
+                                <property name="y_options">GTK_EXPAND</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkComboBox" id="webcams">
+                                <property name="visible">True</property>
+                                <property name="items" translatable="yes">default camera</property>
+                                <signal name="changed" handler="linphone_gtk_cam_changed"/>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="y_options">GTK_EXPAND</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="video_size_label">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Prefered video resolution:</property>
+                              </widget>
+                              <packing>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkComboBox" id="video_size">
+                                <property name="visible">True</property>
+                                <property name="active">0</property>
+                                <property name="items" translatable="yes">CIF</property>
+                                <signal name="changed" handler="linphone_gtk_video_size_changed"/>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="video_frame">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Video&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkHBox" id="hbox11">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <child>
+                  <widget class="GtkImage" id="image5">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="stock">gtk-media-play</property>
+                  </widget>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Multimedia settings</property>
+                  </widget>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+                <property name="tab_fill">False</property>
+                <property name="type">tab</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkVBox" id="sip_tab">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <child>
+                  <widget class="GtkFrame" id="frame11">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="tooltip" translatable="yes">This section defines your SIP address when not using a SIP account</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment11">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkTable" id="table4">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="n_rows">3</property>
+                            <property name="n_columns">2</property>
+                            <child>
+                              <widget class="GtkLabel" id="label25">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Your display name (eg: John Doe):</property>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkEntry" id="displayname">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <signal name="changed" handler="linphone_gtk_update_my_contact"/>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label26">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Your username:</property>
+                              </widget>
+                              <packing>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label27">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Your resulting SIP address:</property>
+                              </widget>
+                              <packing>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkEntry" id="username">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <signal name="changed" handler="linphone_gtk_update_my_contact"/>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkEntry" id="sip_address">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="editable">False</property>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label24">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Default identity&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkFrame" id="frame12">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment12">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkHBox" id="hbox13">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <child>
+                              <widget class="GtkScrolledWindow" id="scrolledwindow2">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="hscrollbar_policy">automatic</property>
+                                <property name="vscrollbar_policy">automatic</property>
+                                <child>
+                                  <widget class="GtkTreeView" id="proxy_list">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                  </widget>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkVButtonBox" id="vbuttonbox2">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <child>
+                                  <widget class="GtkButton" id="add_proxy">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <signal name="clicked" handler="linphone_gtk_add_proxy"/>
+                                    <child>
+                                      <widget class="GtkHBox" id="hbox14">
+                                        <property name="visible">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <child>
+                                          <widget class="GtkImage" id="image7">
+                                            <property name="visible">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <property name="stock">gtk-add</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkLabel" id="add_proxy_label">
+                                            <property name="visible">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <property name="label" translatable="yes">Add</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                      </widget>
+                                    </child>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkButton" id="edit_proxy">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <signal name="clicked" handler="linphone_gtk_edit_proxy"/>
+                                    <child>
+                                      <widget class="GtkHBox" id="hbox16">
+                                        <property name="visible">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <child>
+                                          <widget class="GtkImage" id="image9">
+                                            <property name="visible">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <property name="stock">gtk-edit</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkLabel" id="label_proxy2">
+                                            <property name="visible">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <property name="label" translatable="yes">Edit</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                      </widget>
+                                    </child>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkButton" id="remove_proxy">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <signal name="clicked" handler="linphone_gtk_remove_proxy"/>
+                                    <child>
+                                      <widget class="GtkHBox" id="hbox7">
+                                        <property name="visible">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <child>
+                                          <widget class="GtkImage" id="image2">
+                                            <property name="visible">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <property name="stock">gtk-delete</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkLabel" id="label_proxy1">
+                                            <property name="visible">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <property name="label" translatable="yes">Remove</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                      </widget>
+                                    </child>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkButton" id="create_phonics">
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <signal name="clicked" handler="linphone_gtk_create_fonics_account"/>
+                                    <child>
+                                      <widget class="GtkHBox" id="hbox1">
+                                        <property name="visible">True</property>
+                                        <child>
+                                          <widget class="GtkImage" id="image1">
+                                            <property name="visible">True</property>
+                                            <property name="stock">gtk-network</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkLabel" id="label11">
+                                            <property name="visible">True</property>
+                                            <property name="label" translatable="yes">Register to FONICS
+virtual network !</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                      </widget>
+                                    </child>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">3</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label28">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Proxy accounts&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkFrame" id="frame13">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment13">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkHButtonBox" id="hbuttonbox3">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <child>
+                              <widget class="GtkButton" id="erase_passwords">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <signal name="clicked" handler="linphone_gtk_clear_passwords"/>
+                                <child>
+                                  <widget class="GtkHBox" id="hbox18">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <child>
+                                      <widget class="GtkImage" id="image11">
+                                        <property name="visible">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="stock">gtk-delete</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkLabel" id="label30">
+                                        <property name="visible">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="label" translatable="yes">Erase all passwords</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </widget>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label29">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Privacy&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkHBox" id="hbox10">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <child>
+                  <widget class="GtkImage" id="image4">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="pixbuf">stock_people.png</property>
+                  </widget>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label3">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Manage SIP Accounts</property>
+                  </widget>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">2</property>
+                <property name="tab_fill">False</property>
+                <property name="type">tab</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkVBox" id="codec_tab">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <child>
+                  <widget class="GtkFrame" id="frame9">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment9">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkVBox" id="vbox8">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <child>
+                              <widget class="GtkComboBox" id="codec_view">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="active">0</property>
+                                <property name="items" translatable="yes">Audio codecs
+Video codecs</property>
+                                <signal name="changed" handler="linphone_gtk_codec_view_changed"/>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkHBox" id="hbox_codec">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <child>
+                                  <widget class="GtkScrolledWindow" id="scrolledwindow1">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="hscrollbar_policy">automatic</property>
+                                    <property name="vscrollbar_policy">automatic</property>
+                                    <property name="shadow_type">out</property>
+                                    <child>
+                                      <widget class="GtkTreeView" id="codec_list">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="has_tooltip">True</property>
+                                      </widget>
+                                    </child>
+                                  </widget>
+                                  <packing>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkVButtonBox" id="vbuttonbox1">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <child>
+                                      <widget class="GtkButton" id="button4">
+                                        <property name="label" translatable="yes">gtk-go-up</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="use_stock">True</property>
+                                        <signal name="clicked" handler="linphone_gtk_codec_up"/>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkButton" id="up_codec">
+                                        <property name="label" translatable="yes">gtk-go-down</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="use_stock">True</property>
+                                        <signal name="clicked" handler="linphone_gtk_codec_down"/>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkButton" id="enable_codec">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <signal name="clicked" handler="linphone_gtk_codec_enable"/>
+                                        <child>
+                                          <widget class="GtkHBox" id="hbox8">
+                                            <property name="visible">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <child>
+                                              <widget class="GtkImage" id="image3">
+                                                <property name="visible">True</property>
+                                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                <property name="stock">gtk-yes</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="position">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <widget class="GtkLabel" id="label19">
+                                                <property name="visible">True</property>
+                                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                <property name="label" translatable="yes">Enable</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="position">1</property>
+                                              </packing>
+                                            </child>
+                                          </widget>
+                                        </child>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">2</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkButton" id="disable_codec">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <signal name="clicked" handler="linphone_gtk_codec_disable"/>
+                                        <child>
+                                          <widget class="GtkHBox" id="hbox9">
+                                            <property name="visible">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <child>
+                                              <widget class="GtkImage" id="image8">
+                                                <property name="visible">True</property>
+                                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                <property name="stock">gtk-no</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="position">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <widget class="GtkLabel" id="label20">
+                                                <property name="visible">True</property>
+                                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                <property name="label" translatable="yes">Disable</property>
+                                              </widget>
+                                              <packing>
+                                                <property name="position">1</property>
+                                              </packing>
+                                            </child>
+                                          </widget>
+                                        </child>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">3</property>
+                                      </packing>
+                                    </child>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label18">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Codecs&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkFrame" id="frame10">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment10">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkTable" id="table3">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="n_rows">2</property>
+                            <property name="n_columns">2</property>
+                            <child>
+                              <widget class="GtkSpinButton" id="upload_bw">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="tooltip" translatable="yes">0 stands for "unlimited"</property>
+                                <property name="adjustment">0 -1 100000 1 10 10</property>
+                                <signal name="value_changed" handler="linphone_gtk_upload_bw_changed"/>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkSpinButton" id="download_bw">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="tooltip" translatable="yes">0 stands for "unlimited"</property>
+                                <property name="adjustment">0 -1 100000 1 10 10</property>
+                                <signal name="value_changed" handler="linphone_gtk_download_bw_changed"/>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label23">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Upload speed limit in Kbit/sec:</property>
+                                <property name="justify">right</property>
+                              </widget>
+                              <packing>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label22">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Download speed limit in Kbit/sec:</property>
+                                <property name="justify">right</property>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label21">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Bandwidth control&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkHBox" id="hbox15">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <child>
+                  <widget class="GtkImage" id="image10">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="stock">gtk-execute</property>
+                  </widget>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label33">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Codecs</property>
+                  </widget>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">3</property>
+                <property name="tab_fill">False</property>
+                <property name="type">tab</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkVBox" id="vbox2">
+                <property name="visible">True</property>
+                <property name="orientation">vertical</property>
+                <child>
+                  <widget class="GtkFrame" id="lang_frame">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment3">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkComboBox" id="lang_combo">
+                            <property name="visible">True</property>
+                            <property name="items" translatable="yes">C</property>
+                            <signal name="changed" handler="linphone_gtk_lang_changed"/>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="lang_label">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Language&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">4</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkHBox" id="hbox4">
+                <property name="visible">True</property>
+                <child>
+                  <widget class="GtkImage" id="image13">
+                    <property name="visible">True</property>
+                    <property name="stock">gtk-properties</property>
+                    <property name="icon-size">3</property>
+                  </widget>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label10">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">User interface</property>
+                  </widget>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">4</property>
+                <property name="tab_fill">False</property>
+                <property name="type">tab</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkHButtonBox" id="hbuttonbox2">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="layout_style">end</property>
+            <child>
+              <widget class="GtkButton" id="button5">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <signal name="clicked" handler="linphone_gtk_parameters_closed"/>
+                <child>
+                  <widget class="GtkHBox" id="hbox3">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImage" id="image12">
+                        <property name="visible">True</property>
+                        <property name="stock">gtk-apply</property>
+                        <property name="icon-size">4</property>
+                      </widget>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label8">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Done</property>
+                      </widget>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="padding">10</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="padding">5</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>
diff --git a/gtk-glade/password.glade b/gtk-glade/password.glade
new file mode 100644 (file)
index 0000000..6617f48
--- /dev/null
@@ -0,0 +1,141 @@
+<?xml version="1.0"?>
+<glade-interface>
+  <!-- interface-requires gtk+ 2.16 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <widget class="GtkDialog" id="password">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Linphone - Authentication required</property>
+    <property name="modal">True</property>
+    <property name="window_position">center-on-parent</property>
+    <property name="icon">linphone2.png</property>
+    <property name="type_hint">dialog</property>
+    <property name="has_separator">False</property>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox9">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <widget class="GtkVBox" id="vbox12">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <child>
+              <widget class="GtkLabel" id="message">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">Please enter the domain password</property>
+                <property name="justify">center</property>
+                <property name="wrap">True</property>
+              </widget>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkTable" id="table1">
+                <property name="visible">True</property>
+                <property name="n_rows">2</property>
+                <property name="n_columns">2</property>
+                <child>
+                  <widget class="GtkLabel" id="userid_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">UserID</property>
+                  </widget>
+                </child>
+                <child>
+                  <widget class="GtkEntry" id="userid_entry">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">&#x25CF;</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">Password:</property>
+                    <property name="justify">right</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkEntry" id="password_entry">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="visibility">False</property>
+                    <property name="invisible_char">&#x25CF;</property>
+                    <signal name="activate" handler="linphone_gtk_password_ok"/>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area8">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="layout_style">end</property>
+            <child>
+              <widget class="GtkButton" id="button8">
+                <property name="label" translatable="yes">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="linphone_gtk_password_ok"/>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkButton" id="button9">
+                <property name="label" translatable="yes">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="linphone_gtk_password_cancel"/>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>
diff --git a/gtk-glade/propertybox.c b/gtk-glade/propertybox.c
new file mode 100644 (file)
index 0000000..cbc7b5c
--- /dev/null
@@ -0,0 +1,784 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2008-2009  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#include "linphone.h"
+
+typedef enum {
+       CAP_IGNORE,
+       CAP_PLAYBACK,
+       CAP_CAPTURE
+}DeviceCap;
+
+static void linphone_gtk_fill_combo_box(GtkWidget *combo, const char **devices, const char *selected, DeviceCap cap){
+       const char **p=devices;
+       int i=0,active=0;
+       /* glade creates a combo box without list model and text renderer,
+       unless we fill it with a dummy text.
+       This dummy text needs to be removed first*/
+       gtk_combo_box_remove_text(GTK_COMBO_BOX(combo),0);
+       for(;*p!=NULL;++p){
+               if ( cap==CAP_IGNORE 
+                       || (cap==CAP_CAPTURE && linphone_core_sound_device_can_capture(linphone_gtk_get_core(),*p))
+                       || (cap==CAP_PLAYBACK && linphone_core_sound_device_can_playback(linphone_gtk_get_core(),*p)) ){
+                       gtk_combo_box_append_text(GTK_COMBO_BOX(combo),*p);
+                       if (strcmp(selected,*p)==0) active=i;
+                       i++;
+               }
+       }
+       gtk_combo_box_set_active(GTK_COMBO_BOX(combo),active);
+}
+
+void linphone_gtk_fill_video_sizes(GtkWidget *combo){
+       const MSVideoSizeDef *def=linphone_core_get_supported_video_sizes(linphone_gtk_get_core());;
+       int i,active=0;
+       char vsize_def[256];
+       MSVideoSize cur=linphone_core_get_preferred_video_size(linphone_gtk_get_core());
+       /* glade creates a combo box without list model and text renderer,
+       unless we fill it with a dummy text.
+       This dummy text needs to be removed first*/
+       gtk_combo_box_remove_text(GTK_COMBO_BOX(combo),0);
+       for(i=0;def->name!=NULL;++def,++i){
+               snprintf(vsize_def,sizeof(vsize_def),"%s (%ix%i)",def->name,def->vsize.width,def->vsize.height);
+               gtk_combo_box_append_text(GTK_COMBO_BOX(combo),vsize_def);
+               if (cur.width==def->vsize.width && cur.height==def->vsize.height) active=i;
+       }
+       gtk_combo_box_set_active(GTK_COMBO_BOX(combo),active);
+}
+
+void linphone_gtk_parameters_closed(GtkWidget *button){
+       GtkWidget *pb=gtk_widget_get_toplevel(button);
+       gtk_widget_destroy(pb);
+}
+
+void linphone_gtk_update_my_contact(GtkWidget *w){
+       GtkWidget *pb=gtk_widget_get_toplevel(w);
+       const char *username=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"username")));
+       const char *displayname=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"displayname")));
+       int port=linphone_core_get_sip_port(linphone_gtk_get_core());
+       LinphoneAddress *parsed=linphone_core_get_primary_contact_parsed(linphone_gtk_get_core());
+       char *contact;
+       g_return_if_fail(parsed!=NULL);
+       if (username[0]=='\0') return;
+
+       linphone_address_set_display_name(parsed,displayname);
+       linphone_address_set_username(parsed,username);
+       linphone_address_set_port_int(parsed,port);
+       contact=linphone_address_as_string(parsed);
+       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"sip_address")),contact);
+       linphone_core_set_primary_contact(linphone_gtk_get_core(),contact);
+       ms_free(contact);
+       linphone_address_destroy(parsed);
+       linphone_gtk_load_identities();
+}
+
+void linphone_gtk_stun_server_changed(GtkWidget *w){
+       const gchar *addr=gtk_entry_get_text(GTK_ENTRY(w));
+       linphone_core_set_stun_server(linphone_gtk_get_core(),addr);
+}
+
+void linphone_gtk_nat_address_changed(GtkWidget *w){
+       const gchar *addr=gtk_entry_get_text(GTK_ENTRY(w));
+       linphone_core_set_nat_address(linphone_gtk_get_core(),addr);
+}
+
+void linphone_gtk_ipv6_toggled(GtkWidget *w){
+       linphone_core_enable_ipv6(linphone_gtk_get_core(),
+                               gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)));
+}
+
+void linphone_gtk_sip_port_changed(GtkWidget *w){
+       linphone_core_set_sip_port(linphone_gtk_get_core(),
+                       (gint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
+}
+
+void linphone_gtk_audio_port_changed(GtkWidget *w){
+       linphone_core_set_audio_port(linphone_gtk_get_core(),
+                       (gint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
+}
+
+void linphone_gtk_video_port_changed(GtkWidget *w){
+       linphone_core_set_video_port(linphone_gtk_get_core(),
+                       (gint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
+}
+
+void linphone_gtk_no_firewall_toggled(GtkWidget *w){
+       if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)))
+               linphone_core_set_firewall_policy(linphone_gtk_get_core(),LINPHONE_POLICY_NO_FIREWALL);
+}
+
+void linphone_gtk_use_nat_address_toggled(GtkWidget *w){
+       if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)))
+               linphone_core_set_firewall_policy(linphone_gtk_get_core(),LINPHONE_POLICY_USE_NAT_ADDRESS);
+}
+
+void linphone_gtk_use_stun_toggled(GtkWidget *w){
+       if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)))
+               linphone_core_set_firewall_policy(linphone_gtk_get_core(),LINPHONE_POLICY_USE_STUN);
+}
+
+void linphone_gtk_mtu_changed(GtkWidget *w){
+       if (GTK_WIDGET_SENSITIVE(w))
+               linphone_core_set_mtu(linphone_gtk_get_core(),gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
+}
+
+void linphone_gtk_use_sip_info_dtmf_toggled(GtkWidget *w){
+       linphone_core_set_use_info_for_dtmf(linphone_gtk_get_core(),
+               gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)));
+}
+
+void linphone_gtk_mtu_set(GtkWidget *w){
+       GtkWidget *mtu=linphone_gtk_get_widget(gtk_widget_get_toplevel(w),"mtu");
+       if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))){
+               gtk_widget_set_sensitive(mtu,TRUE);
+               linphone_gtk_mtu_changed(mtu);
+       }else{
+               gtk_widget_set_sensitive(mtu,FALSE);
+               linphone_core_set_mtu(linphone_gtk_get_core(),0);
+       }
+}
+
+void linphone_gtk_playback_device_changed(GtkWidget *w){
+       gchar *sel=gtk_combo_box_get_active_text(GTK_COMBO_BOX(w));
+       linphone_core_set_playback_device(linphone_gtk_get_core(),sel);
+       g_free(sel);
+}
+
+void linphone_gtk_capture_device_changed(GtkWidget *w){
+       gchar *sel=gtk_combo_box_get_active_text(GTK_COMBO_BOX(w));
+       linphone_core_set_capture_device(linphone_gtk_get_core(),sel);
+       g_free(sel);
+}
+
+void linphone_gtk_ring_device_changed(GtkWidget *w){
+       gchar *sel=gtk_combo_box_get_active_text(GTK_COMBO_BOX(w));
+       linphone_core_set_ringer_device(linphone_gtk_get_core(),sel);
+       g_free(sel);
+}
+
+void linphone_gtk_alsa_special_device_changed(GtkWidget *w){
+       /*
+       const gchar *dev=gtk_entry_get_text(GTK_ENTRY(w));
+       ...*/
+}
+
+void linphone_gtk_cam_changed(GtkWidget *w){
+       gchar *sel=gtk_combo_box_get_active_text(GTK_COMBO_BOX(w));
+       linphone_core_set_video_device(linphone_gtk_get_core(),sel);
+       g_free(sel);
+}
+
+void linphone_gtk_video_size_changed(GtkWidget *w){
+       int sel=gtk_combo_box_get_active(GTK_COMBO_BOX(w));
+       const MSVideoSizeDef *defs=linphone_core_get_supported_video_sizes(linphone_gtk_get_core());
+       if (sel<0) return;
+       linphone_core_set_preferred_video_size(linphone_gtk_get_core(),
+                                       defs[sel].vsize);
+}
+
+void linphone_gtk_ring_file_set(GtkWidget *w){
+       gchar *file=gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(w));
+       linphone_core_set_ring(linphone_gtk_get_core(),file);
+       g_free(file);
+}
+
+static void linphone_gtk_end_of_ring(LinphoneCore *lc, void *user_data){
+       gtk_widget_set_sensitive((GtkWidget*)user_data,TRUE);
+}
+
+void linphone_gtk_play_ring_file(GtkWidget *w){
+       if (linphone_core_preview_ring(linphone_gtk_get_core(),
+                               linphone_core_get_ring(linphone_gtk_get_core()),
+                               linphone_gtk_end_of_ring,
+                               w)==0){
+               gtk_widget_set_sensitive(w,FALSE);
+       }
+}
+
+void linphone_gtk_echo_cancelation_toggled(GtkWidget *w){
+       linphone_core_enable_echo_cancellation(linphone_gtk_get_core(),
+               gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)));
+}
+
+enum {
+       CODEC_NAME,
+       CODEC_RATE,
+       CODEC_BITRATE,
+       CODEC_STATUS,
+       CODEC_PARAMS,
+       CODEC_PRIVDATA,
+       CODEC_COLOR,
+       CODEC_INFO,
+       CODEC_NCOLUMNS
+};
+
+static void linphone_gtk_init_codec_list(GtkTreeView *listview){
+       GtkCellRenderer *renderer;
+       GtkTreeViewColumn *column;
+       GtkTreeSelection *select;
+
+       GtkListStore *store = gtk_list_store_new (CODEC_NCOLUMNS, G_TYPE_STRING,G_TYPE_INT,
+                                                       G_TYPE_FLOAT,
+                                                       G_TYPE_STRING,
+                                                       G_TYPE_STRING,
+                                                       G_TYPE_POINTER,
+                                                       G_TYPE_STRING,
+                                                       G_TYPE_STRING);
+
+       gtk_tree_view_set_model(listview,GTK_TREE_MODEL(store));
+       g_object_unref(G_OBJECT(store));
+
+       renderer = gtk_cell_renderer_text_new ();
+       column = gtk_tree_view_column_new_with_attributes (_("Name"),
+                                                   renderer,
+                                                   "text", CODEC_NAME,
+                                               "foreground",CODEC_COLOR,
+                                                   NULL);
+       gtk_tree_view_append_column (listview, column);
+       column = gtk_tree_view_column_new_with_attributes (_("Rate (Hz)"),
+                                                   renderer,
+                                                   "text", CODEC_RATE,
+                                               "foreground",CODEC_COLOR,
+                                                   NULL);
+       gtk_tree_view_append_column (listview, column);
+       column = gtk_tree_view_column_new_with_attributes (_("Status"),
+                                                   renderer,
+                                                   "text", CODEC_STATUS,
+                                               "foreground",CODEC_COLOR,
+                                                   NULL);
+       gtk_tree_view_append_column (listview, column);
+       column = gtk_tree_view_column_new_with_attributes (_("Min bitrate (kbit/s)"),
+                                                   renderer,
+                                                   "text", CODEC_BITRATE,
+                                               "foreground",CODEC_COLOR,
+                                                   NULL);
+       gtk_tree_view_append_column (listview, column);
+       column = gtk_tree_view_column_new_with_attributes (_("Parameters"),
+                                                   renderer,
+                                                   "text", CODEC_PARAMS,
+                                               "foreground",CODEC_COLOR,
+                                                   NULL);
+       gtk_tree_view_append_column (listview, column);
+       /* Setup the selection handler */
+       select = gtk_tree_view_get_selection (listview);
+       gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
+}
+
+static void linphone_gtk_show_codecs(GtkTreeView *listview, const MSList *codeclist)
+{
+       const MSList *elem;
+       GtkTreeIter iter;
+       GtkListStore *store=GTK_LIST_STORE(gtk_tree_view_get_model(listview));
+       GtkTreeSelection *selection;
+
+       gtk_list_store_clear(store);
+
+       for(elem=codeclist; elem!=NULL; elem=elem->next){
+               gchar *status;
+               gint rate;
+               gfloat bitrate; 
+               gchar *color;
+               const char *params="";
+               struct _PayloadType *pt=(struct _PayloadType *)elem->data;
+               if (payload_type_enabled(pt)) status=_("Enabled");
+               else status=_("Disabled");
+               if (linphone_core_check_payload_type_usability(linphone_gtk_get_core(),pt)) color="blue";
+               else color="red";
+               /* get an iterator */
+               gtk_list_store_append(store,&iter);
+               bitrate=payload_type_get_bitrate(pt)/1000.0;
+               rate=payload_type_get_rate(pt);
+               if (pt->recv_fmtp!=NULL) params=pt->recv_fmtp;
+               gtk_list_store_set(store,&iter, CODEC_NAME,payload_type_get_mime(pt),
+                                       CODEC_RATE,rate,
+                                       CODEC_BITRATE,bitrate,
+                                       CODEC_STATUS,status,
+                                       CODEC_PARAMS,params,
+                                       CODEC_PRIVDATA,(gpointer)pt,
+                                       CODEC_COLOR,(gpointer)color,
+                                       CODEC_INFO,(gpointer)payload_type_get_description(pt),
+                                       -1);
+       }
+       
+       
+       
+       /* Setup the selection handler */
+       selection = gtk_tree_view_get_selection (listview);
+       gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
+       //gtk_tree_view_columns_autosize(GTK_TREE_VIEW (sec->interfaces));
+#if GTK_CHECK_VERSION(2,12,0)
+       gtk_tree_view_set_tooltip_column(listview,CODEC_INFO);
+#endif
+}
+
+static void linphone_gtk_check_codec_bandwidth(GtkTreeView *v){
+       GtkTreeIter iter;
+       GtkTreeModel *model;
+       model=gtk_tree_view_get_model(v);
+       g_return_if_fail(gtk_tree_model_get_iter_first(model,&iter));
+       do{
+               PayloadType *pt=NULL;
+               const gchar *color;
+               gfloat bitrate;
+               gtk_tree_model_get(model,&iter,CODEC_PRIVDATA,&pt,-1);
+               if (linphone_core_check_payload_type_usability(linphone_gtk_get_core(),pt)) color="blue";
+               else color="red";
+               bitrate=payload_type_get_bitrate(pt)/1000.0;
+               gtk_list_store_set(GTK_LIST_STORE(model),&iter,CODEC_COLOR, (gpointer)color,
+                                       CODEC_BITRATE, bitrate,-1);
+       }while(gtk_tree_model_iter_next(model,&iter));
+}
+
+static void linphone_gtk_select_codec(GtkTreeView *v, PayloadType *ref){
+       GtkTreeIter iter;
+       GtkTreeModel *model;
+       GtkTreeSelection *selection;
+       selection=gtk_tree_view_get_selection(v);
+       model=gtk_tree_view_get_model(v);
+       g_return_if_fail(gtk_tree_model_get_iter_first(model,&iter));
+       do{
+               PayloadType *pt=NULL;
+               gtk_tree_model_get(model,&iter,CODEC_PRIVDATA,&pt,-1);
+               if (pt==ref){
+                       gtk_tree_selection_select_iter(selection,&iter);
+               }
+               
+       }while(gtk_tree_model_iter_next(model,&iter));
+}
+
+static void linphone_gtk_draw_codec_list(GtkTreeView *v, int type){ /* 0=audio, 1=video*/
+       const MSList *list;
+       if (type==0) list=linphone_core_get_audio_codecs(linphone_gtk_get_core());
+       else list=linphone_core_get_video_codecs(linphone_gtk_get_core());
+       linphone_gtk_show_codecs(v,list);
+}
+
+void linphone_gtk_codec_view_changed(GtkWidget *w){
+       GtkWidget *listview=linphone_gtk_get_widget(gtk_widget_get_toplevel(w),"codec_list");
+       int active=gtk_combo_box_get_active(GTK_COMBO_BOX(w));
+       linphone_gtk_draw_codec_list(GTK_TREE_VIEW(listview),active);
+}
+
+void linphone_gtk_download_bw_changed(GtkWidget *w){
+       GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(gtk_widget_get_toplevel(w),"codec_list"));
+       linphone_core_set_download_bandwidth(linphone_gtk_get_core(),
+                               (int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
+       linphone_gtk_check_codec_bandwidth(v);
+}
+
+void linphone_gtk_upload_bw_changed(GtkWidget *w){
+       GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(gtk_widget_get_toplevel(w),"codec_list"));
+       linphone_core_set_upload_bandwidth(linphone_gtk_get_core(),
+                               (int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
+       linphone_gtk_check_codec_bandwidth(v);
+}
+
+static void linphone_gtk_codec_move(GtkWidget *button, int dir){
+       GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(gtk_widget_get_toplevel(button),"codec_list"));
+       GtkTreeSelection *sel=gtk_tree_view_get_selection(v);
+       GtkTreeModel *mod;
+       GtkTreeIter iter;
+       PayloadType *pt=NULL;
+       LinphoneCore *lc=linphone_gtk_get_core();
+       if (gtk_tree_selection_get_selected(sel,&mod,&iter)){
+               MSList *sel_elem,*before;
+               MSList *codec_list;
+               gtk_tree_model_get(mod,&iter,CODEC_PRIVDATA,&pt,-1);
+               if (pt->type==PAYLOAD_VIDEO)
+                       codec_list=ms_list_copy(linphone_core_get_video_codecs(lc));
+               else codec_list=ms_list_copy(linphone_core_get_audio_codecs(lc));
+               sel_elem=ms_list_find(codec_list,pt);
+               if (dir>0) {
+                       if (sel_elem->prev) before=sel_elem->prev;
+                       else before=sel_elem;
+                       codec_list=ms_list_insert(codec_list,before,pt);
+               }
+               else{
+                       if (sel_elem->next) before=sel_elem->next->next;
+                       else before=sel_elem;
+                       codec_list=ms_list_insert(codec_list,before,pt);
+               }
+               codec_list=ms_list_remove_link(codec_list,sel_elem);
+               if (pt->type==PAYLOAD_VIDEO)
+                       linphone_core_set_video_codecs(lc,codec_list);
+               else linphone_core_set_audio_codecs(lc,codec_list);
+               linphone_gtk_show_codecs(v,codec_list);
+               linphone_gtk_select_codec(v,pt);
+       }
+}
+
+static void linphone_gtk_codec_set_enable(GtkWidget *button, gboolean enabled){
+       GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(gtk_widget_get_toplevel(button),"codec_list"));
+       GtkTreeSelection *sel=gtk_tree_view_get_selection(v);
+       GtkTreeModel *mod;
+       GtkListStore *store;
+       GtkTreeIter iter;
+       PayloadType *pt=NULL;
+
+       if (gtk_tree_selection_get_selected(sel,&mod,&iter)){
+               store=GTK_LIST_STORE(mod);
+               gtk_tree_model_get(mod,&iter,CODEC_PRIVDATA,&pt,-1);
+               payload_type_set_enable(pt,enabled);
+               gtk_list_store_set(store,&iter,CODEC_STATUS, enabled ? _("Enabled") : _("Disabled"), -1);
+       }
+}
+
+void linphone_gtk_codec_up(GtkWidget *button){
+       linphone_gtk_codec_move(button,+1);
+}
+
+void linphone_gtk_codec_down(GtkWidget *button){
+       linphone_gtk_codec_move(button,-1);
+}
+
+void linphone_gtk_codec_enable(GtkWidget *button){
+       linphone_gtk_codec_set_enable(button,TRUE);
+}
+
+void linphone_gtk_codec_disable(GtkWidget *button){
+       linphone_gtk_codec_set_enable(button,FALSE);
+}
+
+void linphone_gtk_clear_passwords(GtkWidget *button){
+       linphone_core_clear_all_auth_info(linphone_gtk_get_core());
+}
+
+enum{
+       PROXY_CONFIG_IDENTITY,
+       PROXY_CONFIG_REF,
+       PROXY_CONFIG_NCOL
+};
+
+void linphone_gtk_show_sip_accounts(GtkWidget *w){
+       GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(w,"proxy_list"));
+       GtkTreeModel *model=gtk_tree_view_get_model(v);
+       GtkListStore *store;
+       GtkTreeSelection *select;
+       const MSList *elem;
+       if (!model){
+               GtkCellRenderer *renderer;
+               GtkTreeViewColumn *column;
+               /* create the proxy list */
+               store = gtk_list_store_new (PROXY_CONFIG_NCOL, G_TYPE_STRING, G_TYPE_POINTER);
+               
+               gtk_tree_view_set_model(v,GTK_TREE_MODEL(store));
+               g_object_unref(G_OBJECT(store));
+               renderer = gtk_cell_renderer_text_new ();
+               column = gtk_tree_view_column_new_with_attributes (_("Account"),
+                                                       renderer,
+                                                       "text", PROXY_CONFIG_IDENTITY,
+                                                       NULL);
+               gtk_tree_view_append_column (v, column);
+               
+               select = gtk_tree_view_get_selection (v);
+               gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
+               model=GTK_TREE_MODEL(store);
+       }else {
+               store=GTK_LIST_STORE(model);
+       }
+       gtk_list_store_clear(store);
+       for(elem=linphone_core_get_proxy_config_list(linphone_gtk_get_core());elem!=NULL;elem=ms_list_next(elem)){
+               LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
+               GtkTreeIter iter;
+               gtk_list_store_append(store,&iter);
+               gtk_list_store_set(store,&iter,PROXY_CONFIG_IDENTITY,linphone_proxy_config_get_identity(cfg),
+                                       PROXY_CONFIG_REF,cfg,-1);
+       }
+}
+
+static void linphone_gtk_proxy_closed(GtkWidget *w){
+       LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)g_object_get_data(G_OBJECT(w),"config");
+       if (cfg){
+               linphone_proxy_config_done(cfg);
+       }
+}
+
+void linphone_gtk_show_proxy_config(GtkWidget *pb, LinphoneProxyConfig *cfg){
+       GtkWidget *w=linphone_gtk_create_window("sip_account");
+       const char *tmp;
+       if (cfg){
+               linphone_proxy_config_edit(cfg);
+               gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"identity")),
+                       linphone_proxy_config_get_identity(cfg));
+               gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"proxy")),
+                       linphone_proxy_config_get_addr(cfg));
+               tmp=linphone_proxy_config_get_route(cfg);
+               if (tmp) gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"route")),tmp);
+               gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(w,"regperiod")),
+                       linphone_proxy_config_get_expires(cfg));
+               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"register")),
+                       linphone_proxy_config_register_enabled(cfg));
+               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"publish")),
+                       linphone_proxy_config_publish_enabled(cfg));
+       }
+       g_object_set_data(G_OBJECT(w),"config",(gpointer)cfg);
+       g_object_set_data(G_OBJECT(w),"parameters",(gpointer)pb);
+       g_object_weak_ref(G_OBJECT(w),(GWeakNotify)linphone_gtk_proxy_closed,w);
+       gtk_widget_show(w);
+}
+
+void linphone_gtk_proxy_cancel(GtkButton *button){
+       GtkWidget *w=gtk_widget_get_toplevel(GTK_WIDGET(button));
+       gtk_widget_destroy(w);
+}
+
+void linphone_gtk_proxy_ok(GtkButton *button){
+       GtkWidget *w=gtk_widget_get_toplevel(GTK_WIDGET(button));
+       LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)g_object_get_data(G_OBJECT(w),"config");
+       gboolean was_editing=TRUE;
+       if (!cfg){
+               was_editing=FALSE;
+               cfg=linphone_proxy_config_new();
+       }
+       linphone_proxy_config_set_identity(cfg,
+               gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(w,"identity"))));
+       linphone_proxy_config_set_server_addr(cfg,
+               gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(w,"proxy"))));
+       linphone_proxy_config_set_route(cfg,
+               gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(w,"route"))));
+       linphone_proxy_config_expires(cfg,
+               (int)gtk_spin_button_get_value(
+                       GTK_SPIN_BUTTON(linphone_gtk_get_widget(w,"regperiod"))));
+       linphone_proxy_config_enable_publish(cfg,
+               gtk_toggle_button_get_active(
+                       GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"publish"))));
+       linphone_proxy_config_enable_register(cfg,
+               gtk_toggle_button_get_active(
+                       GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"register"))));
+       if (was_editing){
+               if (linphone_proxy_config_done(cfg)==-1)
+                       return;
+       }
+       else {
+               if (linphone_core_add_proxy_config(linphone_gtk_get_core(),cfg)==-1) return;
+               linphone_core_set_default_proxy(linphone_gtk_get_core(),cfg);
+       }
+       g_object_set_data(G_OBJECT(w),"config",NULL);
+       linphone_gtk_show_sip_accounts(GTK_WIDGET(g_object_get_data(G_OBJECT(w),"parameters")));
+       gtk_widget_destroy(w);
+       /* also update the main window's list of identities*/
+       linphone_gtk_load_identities();
+}
+
+static LinphoneProxyConfig *linphone_gtk_get_selected_proxy_config(GtkWidget* pb){
+       GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(pb,"proxy_list"));
+       GtkTreeSelection *selection=gtk_tree_view_get_selection(v);
+       GtkTreeIter iter;
+       GtkTreeModel *model;
+       if (gtk_tree_selection_get_selected(selection,&model,&iter)){
+               LinphoneProxyConfig *cfg=NULL;
+               gtk_tree_model_get(model,&iter,PROXY_CONFIG_REF,&cfg,-1);
+               return cfg;
+       }
+       return NULL;
+}
+
+void linphone_gtk_add_proxy(GtkButton *button){
+       linphone_gtk_show_proxy_config(gtk_widget_get_toplevel(GTK_WIDGET(button)),NULL);
+}
+
+void linphone_gtk_remove_proxy(GtkButton *button){
+       LinphoneProxyConfig *cfg=linphone_gtk_get_selected_proxy_config(
+                       gtk_widget_get_toplevel(GTK_WIDGET(button)));
+       if (cfg){
+               linphone_core_remove_proxy_config(linphone_gtk_get_core(),cfg);
+               linphone_gtk_show_sip_accounts(gtk_widget_get_toplevel(GTK_WIDGET(button)));
+               /* also update the main window's list of identities*/
+               linphone_gtk_load_identities();
+       }
+}
+
+void linphone_gtk_edit_proxy(GtkButton *button){
+       GtkWidget *pb=gtk_widget_get_toplevel(GTK_WIDGET(button));
+       LinphoneProxyConfig *cfg=linphone_gtk_get_selected_proxy_config(pb);
+       if (cfg){
+               linphone_gtk_show_proxy_config(pb,cfg);
+               /* also update the main window's list of identities*/
+               linphone_gtk_load_identities();
+       }
+}
+
+typedef struct _LangCodes{
+       const char *code;
+       const char *name;
+}LangCodes;
+
+static LangCodes supported_langs[]={
+       {       "C"     ,       N_("English")   },
+       {       "fr"    ,       N_("French")    },
+       {       "sv"    ,       N_("Swedish")   },
+       {       "it"    ,       N_("Italian")   },
+       {       "es"    ,       N_("Spanish")   },
+       {       "pt_BR" ,       N_("Brazilian Portugese")       },
+       {       "pl"    ,       N_("Polish")    },
+       {       "de"    ,       N_("German")    },
+       {       "ru"    ,       N_("Russian")   },
+       {       "ja"    ,       N_("Japanese")  },
+       {       "nl"    ,       N_("Dutch")     },
+       {       "hu"    ,       N_("Hungarian") },
+       {       "cs"    ,       N_("Czech")     },
+       {       "zh_CN" ,       N_("Chinese")   },
+       {       NULL    ,       NULL            }
+};
+
+static const char *lang_get_name(const char *code){
+       LangCodes *p=supported_langs;
+       while(p->code!=NULL){
+               if (strcmp(p->code,code)==0) return p->name;
+               p++;
+       }
+       return NULL;
+}
+
+static gboolean lang_equals(const char *l1, const char *l2){
+       return ((strncmp(l1,l2,5)==0 || strncmp(l1,l2,2)==0));
+}
+
+static void linphone_gtk_fill_langs(GtkWidget *pb){
+       GtkWidget *combo=linphone_gtk_get_widget(pb,"lang_combo");
+       char code[10];
+       const char *all_langs="C " LINPHONE_ALL_LANGS;
+       const char *name;
+       int i=0,index=0;
+       const char *cur_lang=getenv("LANG");
+       int cur_lang_index=-1;
+       char text[256]={0};
+       if (cur_lang==NULL) cur_lang="C";
+       /* glade creates a combo box without list model and text renderer,
+       unless we fill it with a dummy text.
+       This dummy text needs to be removed first*/
+       gtk_combo_box_remove_text(GTK_COMBO_BOX(combo),0);
+       while(sscanf(all_langs+i,"%s",code)==1){
+               i+=strlen(code);
+               while(all_langs[i]==' ') ++i;
+               name=lang_get_name(code);
+               snprintf(text,sizeof(text)-1,"%s : %s",code,name!=NULL ? _(name) : code);
+               gtk_combo_box_append_text(GTK_COMBO_BOX(combo),text);
+               if (cur_lang_index==-1 && lang_equals(cur_lang,code)) 
+                       cur_lang_index=index;
+               index++;
+       }
+       gtk_combo_box_set_active(GTK_COMBO_BOX(combo),cur_lang_index);
+}
+
+void linphone_gtk_lang_changed(GtkComboBox *combo){
+       const char *selected=gtk_combo_box_get_active_text(combo);
+       char code[10];
+       const char *cur_lang=getenv("LANG");
+       if (selected!=NULL){
+               sscanf(selected,"%s",code);
+               if (cur_lang==NULL) cur_lang="C";
+               if (!lang_equals(cur_lang,code)){
+                       GtkWidget *dialog = gtk_message_dialog_new (GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(combo))),
+                               GTK_DIALOG_DESTROY_WITH_PARENT,
+                               GTK_MESSAGE_INFO,
+                               GTK_BUTTONS_CLOSE,
+                               "%s",
+                               (const gchar*)_("You need to restart linphone for the new language selection to take effect."));
+                               /* Destroy the dialog when the user responds to it (e.g. clicks a button) */
+                       g_signal_connect_swapped (G_OBJECT (dialog), "response",
+                                       G_CALLBACK (gtk_widget_destroy),
+                                       G_OBJECT (dialog));
+                       gtk_widget_show(dialog);
+                       linphone_gtk_set_lang(code);
+               }
+       }
+}
+
+void linphone_gtk_show_parameters(void){
+       GtkWidget *pb=linphone_gtk_create_window("parameters");
+       LinphoneCore *lc=linphone_gtk_get_core();
+       const char **sound_devices=linphone_core_get_sound_devices(lc);
+       const char *tmp;
+       LinphoneAddress *contact;
+       LinphoneFirewallPolicy pol;
+       GtkWidget *codec_list=linphone_gtk_get_widget(pb,"codec_list");
+       int mtu;
+       /* NETWORK CONFIG */
+       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"ipv6_enabled")),
+                               linphone_core_ipv6_enabled(lc));
+       gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"sip_port")),
+                               linphone_core_get_sip_port(lc));
+       gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"audio_rtp_port")),
+                               linphone_core_get_audio_port(lc));
+       gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"video_rtp_port")),
+                               linphone_core_get_video_port(lc));
+       tmp=linphone_core_get_nat_address(lc);
+       if (tmp) gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"nat_address")),tmp);
+       tmp=linphone_core_get_stun_server(lc);
+       if (tmp) gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"stun_server")),tmp);
+       pol=linphone_core_get_firewall_policy(lc);
+       switch(pol){
+               case LINPHONE_POLICY_NO_FIREWALL:
+                       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"no_nat")),TRUE);
+               break;
+               case LINPHONE_POLICY_USE_NAT_ADDRESS:
+                       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"use_nat_address")),TRUE);
+               break;
+               case LINPHONE_POLICY_USE_STUN:
+                       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"use_stun")),TRUE);
+               break;
+       }
+       mtu=linphone_core_get_mtu(lc);
+       if (mtu<=0){
+               gtk_widget_set_sensitive(linphone_gtk_get_widget(pb,"mtu"),FALSE);
+               gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"mtu")),1500);
+               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"mtu_set")),FALSE);
+       }else{
+               gtk_widget_set_sensitive(linphone_gtk_get_widget(pb,"mtu"),TRUE);
+               gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"mtu")),mtu);
+               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"mtu_set")),TRUE);
+       }
+       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"dtmf_sipinfo")),
+                                       linphone_core_get_use_info_for_dtmf(lc));
+       /* MUTIMEDIA CONFIG */
+       linphone_gtk_fill_combo_box(linphone_gtk_get_widget(pb,"playback_device"), sound_devices,
+                                       linphone_core_get_playback_device(lc),CAP_PLAYBACK);
+       linphone_gtk_fill_combo_box(linphone_gtk_get_widget(pb,"ring_device"), sound_devices,
+                                       linphone_core_get_ringer_device(lc),CAP_PLAYBACK);
+       linphone_gtk_fill_combo_box(linphone_gtk_get_widget(pb,"capture_device"), sound_devices,
+                                       linphone_core_get_capture_device(lc), CAP_CAPTURE);
+       linphone_gtk_fill_combo_box(linphone_gtk_get_widget(pb,"webcams"),linphone_core_get_video_devices(lc),
+                                       linphone_core_get_video_device(lc),CAP_IGNORE);
+       linphone_gtk_fill_video_sizes(linphone_gtk_get_widget(pb,"video_size"));
+       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"echo_cancelation")),
+                                       linphone_core_echo_cancellation_enabled(lc));
+
+       gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(linphone_gtk_get_widget(pb,"ring_chooser")),
+                                       linphone_core_get_ring(lc));
+       /* SIP CONFIG */
+       contact=linphone_core_get_primary_contact_parsed(lc);
+       if (contact){
+               if (linphone_address_get_display_name(contact)) 
+                       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"displayname")),linphone_address_get_display_name(contact));
+               if (linphone_address_get_username(contact))
+                       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"username")),linphone_address_get_username(contact));
+       }
+       linphone_address_destroy(contact);
+       linphone_gtk_show_sip_accounts(pb);
+       /* CODECS CONFIG */
+       linphone_gtk_init_codec_list(GTK_TREE_VIEW(codec_list));
+       gtk_combo_box_set_active(GTK_COMBO_BOX(linphone_gtk_get_widget(pb,"codec_view")),0);
+       gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"download_bw")),
+                               linphone_core_get_download_bandwidth(lc));
+       gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"upload_bw")),
+                               linphone_core_get_upload_bandwidth(lc));
+
+       linphone_gtk_fill_langs(pb);
+       gtk_widget_show(pb);
+}
diff --git a/gtk-glade/setupwizard.c b/gtk-glade/setupwizard.c
new file mode 100644 (file)
index 0000000..e5f8702
--- /dev/null
@@ -0,0 +1,264 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#include "linphone.h"
+LinphoneAccountCreator *linphone_gtk_assistant_get_creator(GtkWidget*w);
+
+static GtkWidget *create_intro(){
+       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
+       GtkWidget *label=gtk_label_new(_("Welcome !\nThis assistant will help you to use a SIP account for your calls."));
+       gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
+       g_object_set_data(G_OBJECT(vbox),"label",label);
+       gtk_widget_show_all(vbox);
+       return vbox;
+}
+
+static GtkWidget *create_setup_signin_choice(){
+       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
+       GtkWidget *t1=gtk_radio_button_new_with_label(NULL,_("Create an account by choosing a username"));
+       GtkWidget *t2=gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(t1),_("I have already an account and just want to use it"));
+       gtk_box_pack_start (GTK_BOX (vbox), t1, TRUE, TRUE, 2);
+       gtk_box_pack_start (GTK_BOX (vbox), t2, TRUE, TRUE, 2);
+       gtk_widget_show_all(vbox);
+       g_object_set_data(G_OBJECT(vbox),"create_account",t1);
+       g_object_set_data(G_OBJECT(vbox),"setup_account",t2);
+       return vbox;
+}
+
+static void create_username_changed(GtkEntry *entry, GtkWidget *w){
+       GtkWidget *assistant=gtk_widget_get_toplevel(w);
+       gtk_assistant_set_page_complete(GTK_ASSISTANT(assistant),w,
+               gtk_entry_get_text_length(entry)>=3);
+}
+
+static GtkWidget *create_username_chooser(){
+       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
+       GtkWidget *hbox=gtk_hbox_new(FALSE,2);
+       GtkWidget *label=gtk_label_new(_("Please choose a username:"));
+       GtkWidget *label2=gtk_label_new(_("Username:"));
+       GtkWidget *label3=gtk_label_new(NULL);
+       GtkWidget *entry=gtk_entry_new();
+       gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
+       gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 2);
+       gtk_box_pack_start (GTK_BOX (hbox), label2, TRUE, TRUE, 2);
+       gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 2);
+       gtk_box_pack_start (GTK_BOX (vbox), label3, TRUE, TRUE, 2);
+       gtk_widget_show_all(vbox);
+       g_object_set_data(G_OBJECT(vbox),"username",entry);
+       g_object_set_data(G_OBJECT(vbox),"errorstring",label3);
+       g_signal_connect(G_OBJECT(entry),"changed",(GCallback)create_username_changed,vbox);
+       return vbox;
+}
+
+static GtkWidget *create_username_checking_page(){
+       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
+       GtkWidget *label=gtk_label_new(NULL);
+       GtkWidget *progress=gtk_progress_bar_new();
+       gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
+       gtk_box_pack_start (GTK_BOX (vbox), progress, TRUE, TRUE, 2);
+       g_object_set_data(G_OBJECT(vbox),"label",label);
+       g_object_set_data(G_OBJECT(vbox),"progress",progress);
+       gtk_widget_show_all(vbox);
+       return vbox;
+}
+
+static void *progress_bar_update(LinphoneCore *lc, void *ctx, LinphoneWaitingState ws, const char *purpose, float progress){
+       GtkWidget *pb=(GtkWidget*)ctx;
+       if (ws==LinphoneWaitingProgress) gtk_progress_bar_pulse(GTK_PROGRESS_BAR(pb));
+       else if (ws==LinphoneWaitingFinished) gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(pb),1);
+       return ctx;
+}
+
+static void check_username(GtkWidget *page){
+       GtkWidget *progress=(GtkWidget*)g_object_get_data(G_OBJECT(page),"progress");
+       GtkWidget *label=(GtkWidget*)g_object_get_data(G_OBJECT(page),"label");
+       LinphoneAccountCreator *creator=linphone_gtk_assistant_get_creator(gtk_widget_get_toplevel(page));
+       gchar *text=g_strdup_printf(_("Checking if '%s' is available..."),linphone_account_creator_get_username(creator));
+       LinphoneAccountCreator *c=linphone_gtk_assistant_get_creator(gtk_widget_get_toplevel(page));
+       int res;
+       gtk_label_set_text(GTK_LABEL(label),text);
+       g_free(text);
+       gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Please wait..."));
+       linphone_core_set_waiting_callback(linphone_gtk_get_core(),progress_bar_update,progress);
+       res=linphone_account_creator_test_existence(c);
+       if (res==1){
+               gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Sorry this username already exists. Please try a new one."));
+       }else if (res==0){
+               gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Ok !"));
+               gtk_assistant_set_page_complete(GTK_ASSISTANT(gtk_widget_get_toplevel(page)),page,TRUE);
+       }else if (res==-1){
+               gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Communication problem, please try again later."));
+       }
+       linphone_core_set_waiting_callback(linphone_gtk_get_core(),linphone_gtk_wait,NULL);
+}
+
+static GtkWidget *create_confirmation_page(){
+       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
+       GtkWidget *label=gtk_label_new(NULL);
+       gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
+       g_object_set_data(G_OBJECT(vbox),"label",label);
+       gtk_widget_show_all(vbox);
+       return vbox;
+}
+
+static GtkWidget *create_creation_page(){
+       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
+       GtkWidget *label=gtk_label_new(NULL);
+       GtkWidget *progress=gtk_progress_bar_new();
+       gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
+       gtk_box_pack_start (GTK_BOX (vbox), progress, TRUE, TRUE, 2);
+       g_object_set_data(G_OBJECT(vbox),"label",label);
+       g_object_set_data(G_OBJECT(vbox),"progress",progress);
+       gtk_widget_show_all(vbox);
+       return vbox;
+}
+
+static GtkWidget *create_finish_page(){
+       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
+       GtkWidget *label=gtk_label_new(_("Thank you. Your account is now configured and ready for use."));
+       gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
+       gtk_widget_show_all(vbox);
+       return vbox;
+}
+
+static void linphone_gtk_assistant_closed(GtkWidget *w){
+       gtk_widget_destroy(w);
+}
+
+static int linphone_gtk_assistant_forward(int curpage, gpointer data){
+       GtkWidget *w=(GtkWidget*)data;
+       GtkWidget *box=gtk_assistant_get_nth_page(GTK_ASSISTANT(w),curpage);
+       if (curpage==1){
+               GtkWidget *create_button=(GtkWidget*)g_object_get_data(G_OBJECT(box),"create_account");
+               if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(create_button))){
+                       g_error("Not implemented yet...");
+               }
+       }else if (curpage==2){
+               LinphoneAccountCreator *c=linphone_gtk_assistant_get_creator(w);
+               linphone_account_creator_set_username(c,gtk_entry_get_text(GTK_ENTRY(g_object_get_data(G_OBJECT(box),"username"))));
+       }
+       return curpage+1;
+}
+
+static void linphone_gtk_assistant_apply(GtkWidget *w){
+       LinphoneAccountCreator *creator=linphone_gtk_assistant_get_creator(w);
+       GtkWidget *page=gtk_assistant_get_nth_page(GTK_ASSISTANT(w),gtk_assistant_get_current_page(GTK_ASSISTANT(w)));
+       GtkWidget *progress=(GtkWidget*)g_object_get_data(G_OBJECT(page),"progress");
+       LinphoneProxyConfig *res;
+       gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Please wait..."));
+       linphone_core_set_waiting_callback(linphone_gtk_get_core(),progress_bar_update,progress);
+       res=linphone_account_creator_validate(creator);
+       if (res){
+               gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Ok !"));
+               gtk_assistant_set_page_complete(GTK_ASSISTANT(w),page,TRUE);
+       }else{
+               gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Communication problem, please try again later."));
+       }
+       linphone_core_set_waiting_callback(linphone_gtk_get_core(),linphone_gtk_wait,NULL);
+       if (res) linphone_core_add_proxy_config(linphone_gtk_get_core(),res);
+       gtk_assistant_set_page_complete(GTK_ASSISTANT(w),page,TRUE);
+}
+
+static void linphone_gtk_assistant_prepare(GtkWidget *assistant, GtkWidget *page){
+       int pagenum=gtk_assistant_get_current_page(GTK_ASSISTANT(assistant));
+       if (pagenum==3){
+               check_username(page);
+       }else if (pagenum==4){
+               GtkWidget *label=(GtkWidget*)g_object_get_data(G_OBJECT(page),"label");
+               LinphoneAccountCreator *creator=linphone_gtk_assistant_get_creator(assistant);
+               gchar *text=g_strdup_printf("You have choosen '%s' as username.\nDo you confirm the creation of the account ?",linphone_account_creator_get_username(creator));
+               gtk_label_set_text(GTK_LABEL(label),text);
+               g_free(text);
+       }else if (pagenum==5){
+               GtkWidget *label=(GtkWidget*)g_object_get_data(G_OBJECT(page),"label");
+               LinphoneAccountCreator *creator=linphone_gtk_assistant_get_creator(assistant);
+               gchar *text=g_strdup_printf("Account creation in progress for '%s'",linphone_account_creator_get_username(creator));
+               gtk_label_set_text(GTK_LABEL(label),text);
+               g_free(text);
+       }
+}
+
+static LinphoneAccountCreator * linphone_gtk_assistant_init(GtkWidget *w){
+       const MSList *elem;
+       LinphoneCore *lc=linphone_gtk_get_core();
+       for(elem=linphone_core_get_sip_setups(lc);elem!=NULL;elem=elem->next){
+               SipSetup *ss=(SipSetup*)elem->data;
+               if (sip_setup_get_capabilities(ss) & SIP_SETUP_CAP_ACCOUNT_MANAGER){
+                       LinphoneAccountCreator *creator=linphone_account_creator_new(lc,ss->name);
+                       g_object_set_data(G_OBJECT(w),"creator",creator);
+                       return creator;
+               }
+       }
+       return NULL;
+}
+
+LinphoneAccountCreator *linphone_gtk_assistant_get_creator(GtkWidget*w){
+       return (LinphoneAccountCreator*)g_object_get_data(G_OBJECT(w),"creator");
+}
+
+GtkWidget * linphone_gtk_create_assistant(void){
+       GtkWidget *w=gtk_assistant_new();
+       GtkWidget *p1=create_intro();
+       GtkWidget *p2=create_setup_signin_choice();
+       GtkWidget *p3=create_username_chooser();
+       GtkWidget *checking=create_username_checking_page();
+       GtkWidget *confirm=create_confirmation_page();
+       GtkWidget *creation=create_creation_page();
+       GtkWidget *end=create_finish_page();
+       
+       linphone_gtk_assistant_init(w);
+       gtk_assistant_append_page(GTK_ASSISTANT(w),p1);
+       gtk_assistant_set_page_type(GTK_ASSISTANT(w),p1,GTK_ASSISTANT_PAGE_INTRO);
+       gtk_assistant_set_page_title(GTK_ASSISTANT(w),p1,_("Welcome to the account setup assistant"));
+       gtk_assistant_set_page_complete(GTK_ASSISTANT(w),p1,TRUE);
+       gtk_assistant_append_page(GTK_ASSISTANT(w),p2);
+       gtk_assistant_set_page_type(GTK_ASSISTANT(w),p2,GTK_ASSISTANT_PAGE_CONTENT);
+       gtk_assistant_set_page_title(GTK_ASSISTANT(w),p2,_("Account setup assistant"));
+       gtk_assistant_set_page_complete(GTK_ASSISTANT(w),p2,TRUE);
+       gtk_assistant_append_page(GTK_ASSISTANT(w),p3);
+       gtk_assistant_set_page_type(GTK_ASSISTANT(w),p3,GTK_ASSISTANT_PAGE_CONTENT);
+       gtk_assistant_set_page_title(GTK_ASSISTANT(w),p3,_("Choosing a username"));
+       
+       gtk_assistant_append_page(GTK_ASSISTANT(w),checking);
+       gtk_assistant_set_page_type(GTK_ASSISTANT(w),checking,GTK_ASSISTANT_PAGE_PROGRESS);
+       gtk_assistant_set_page_title(GTK_ASSISTANT(w),checking,_("Verifying"));
+       
+       gtk_assistant_append_page(GTK_ASSISTANT(w),confirm);
+       gtk_assistant_set_page_type(GTK_ASSISTANT(w),confirm,GTK_ASSISTANT_PAGE_CONFIRM);
+       gtk_assistant_set_page_title(GTK_ASSISTANT(w),confirm,_("Confirmation"));
+       gtk_assistant_set_page_complete(GTK_ASSISTANT(w),confirm,TRUE);
+
+       gtk_assistant_append_page(GTK_ASSISTANT(w),creation);
+       gtk_assistant_set_page_type(GTK_ASSISTANT(w),creation,GTK_ASSISTANT_PAGE_PROGRESS);
+       gtk_assistant_set_page_title(GTK_ASSISTANT(w),creation,_("Creating your account"));
+
+       gtk_assistant_append_page(GTK_ASSISTANT(w),end);
+       gtk_assistant_set_page_type(GTK_ASSISTANT(w),end,GTK_ASSISTANT_PAGE_SUMMARY);
+       gtk_assistant_set_page_title(GTK_ASSISTANT(w),end,_("Now ready !"));
+       
+       gtk_assistant_set_forward_page_func(GTK_ASSISTANT(w),linphone_gtk_assistant_forward,w,NULL);
+       g_signal_connect(G_OBJECT(w),"close",(GCallback)linphone_gtk_assistant_closed,NULL);
+       g_signal_connect(G_OBJECT(w),"cancel",(GCallback)linphone_gtk_assistant_closed,NULL);
+       g_signal_connect(G_OBJECT(w),"apply",(GCallback)linphone_gtk_assistant_apply,NULL);
+       g_signal_connect(G_OBJECT(w),"prepare",(GCallback)linphone_gtk_assistant_prepare,NULL);
+       gtk_widget_show(w);
+       
+       return w;
+}
+
diff --git a/gtk-glade/sip_account.glade b/gtk-glade/sip_account.glade
new file mode 100644 (file)
index 0000000..2828e30
--- /dev/null
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--Generated with glade3 3.4.5 on Sat Nov  8 15:49:12 2008 -->
+<glade-interface>
+  <widget class="GtkDialog" id="sip_account">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Linphone - Configure a SIP account</property>
+    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+    <property name="icon">linphone2.png</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="has_separator">False</property>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox2">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <widget class="GtkFrame" id="frame15">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="label_xalign">0</property>
+            <child>
+              <widget class="GtkAlignment" id="alignment15">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <widget class="GtkVBox" id="vbox11">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <widget class="GtkTable" id="table6">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="n_rows">4</property>
+                        <property name="n_columns">2</property>
+                        <child>
+                          <widget class="GtkLabel" id="label38">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">Your SIP identity:</property>
+                            <property name="justify">GTK_JUSTIFY_RIGHT</property>
+                          </widget>
+                        </child>
+                        <child>
+                          <widget class="GtkEntry" id="identity">
+                            <property name="width_request">275</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                          </widget>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="label39">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">SIP Proxy address:</property>
+                            <property name="justify">GTK_JUSTIFY_RIGHT</property>
+                          </widget>
+                          <packing>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkEntry" id="proxy">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="text" translatable="yes">sip:</property>
+                          </widget>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="label40">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">Route (optional):</property>
+                            <property name="justify">GTK_JUSTIFY_RIGHT</property>
+                          </widget>
+                          <packing>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkEntry" id="route">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                          </widget>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="label41">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">Registration duration (sec):</property>
+                            <property name="justify">GTK_JUSTIFY_RIGHT</property>
+                          </widget>
+                          <packing>
+                            <property name="top_attach">3</property>
+                            <property name="bottom_attach">4</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkSpinButton" id="regperiod">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="adjustment">3600 0 100000 1 10 10</property>
+                          </widget>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">3</property>
+                            <property name="bottom_attach">4</property>
+                          </packing>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckButton" id="register">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes">Register at startup</property>
+                        <property name="response_id">0</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckButton" id="publish">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">Publish presence information</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label42">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">Configure a SIP account</property>
+                <property name="use_markup">True</property>
+              </widget>
+              <packing>
+                <property name="type">label_item</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area2">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <child>
+              <widget class="GtkButton" id="button6">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">gtk-ok</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">0</property>
+                <signal name="clicked" handler="linphone_gtk_proxy_ok"/>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkButton" id="button7">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">gtk-cancel</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">0</property>
+                <signal name="clicked" handler="linphone_gtk_proxy_cancel"/>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>
diff --git a/gtk-glade/stock_people.png b/gtk-glade/stock_people.png
new file mode 100644 (file)
index 0000000..ed2d33b
Binary files /dev/null and b/gtk-glade/stock_people.png differ
diff --git a/gtk-glade/support.c b/gtk-glade/support.c
new file mode 100644 (file)
index 0000000..3600205
--- /dev/null
@@ -0,0 +1,195 @@
+#include "linphone.h"
+
+#include "lpconfig.h"
+
+static GList *pixmaps_directories = NULL;
+
+/* Use this function to set the directory containing installed pixmaps. */
+void
+add_pixmap_directory                   (const gchar     *directory)
+{
+  pixmaps_directories = g_list_prepend (pixmaps_directories,
+                                        g_strdup (directory));
+}
+
+/* This is an internally used function to find pixmap files. */
+static gchar*
+find_pixmap_file                       (const gchar     *filename)
+{
+  GList *elem;
+
+  /* We step through each of the pixmaps directory to find it. */
+  elem = pixmaps_directories;
+  while (elem)
+    {
+      gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data,
+                                         G_DIR_SEPARATOR_S, filename);
+      if (g_file_test (pathname, G_FILE_TEST_EXISTS))
+        return pathname;
+      g_free (pathname);
+      elem = elem->next;
+    }
+  return NULL;
+}
+
+/* This is an internally used function to create pixmaps. */
+GtkWidget*
+create_pixmap                          (const gchar     *filename)
+{
+  gchar *pathname = NULL;
+  GtkWidget *pixmap;
+
+  if (!filename || !filename[0])
+      return gtk_image_new ();
+
+  pathname = find_pixmap_file (filename);
+
+  if (!pathname)
+    {
+      g_warning (_("Couldn't find pixmap file: %s"), filename);
+      return gtk_image_new ();
+    }
+
+  pixmap = gtk_image_new_from_file (pathname);
+  g_free (pathname);
+  return pixmap;
+}
+
+/* This is an internally used function to create pixmaps. */
+GdkPixbuf*
+create_pixbuf                          (const gchar     *filename)
+{
+  gchar *pathname = NULL;
+  GdkPixbuf *pixbuf;
+  GError *error = NULL;
+
+  if (!filename || !filename[0])
+      return NULL;
+
+  pathname = find_pixmap_file (filename);
+
+  if (!pathname)
+    {
+      g_warning (_("Couldn't find pixmap file: %s"), filename);
+      return NULL;
+    }
+
+  pixbuf = gdk_pixbuf_new_from_file (pathname, &error);
+  if (!pixbuf)
+    {
+      fprintf (stderr, "Failed to load pixbuf file: %s: %s\n",
+               pathname, error->message);
+      g_error_free (error);
+    }
+  g_free (pathname);
+  return pixbuf;
+}
+
+/* This is an internally used function to create animations */
+GdkPixbufAnimation *
+create_pixbuf_animation(const gchar     *filename)
+{
+       gchar *pathname = NULL;
+       GdkPixbufAnimation *pixbuf;
+       GError *error = NULL;
+       
+       if (!filename || !filename[0])
+               return NULL;
+       
+       pathname = find_pixmap_file (filename);
+       
+       if (!pathname){
+               g_warning (_("Couldn't find pixmap file: %s"), filename);
+               return NULL;
+       }
+       
+       pixbuf = gdk_pixbuf_animation_new_from_file (pathname, &error);
+       if (!pixbuf){
+               fprintf (stderr, "Failed to load pixbuf file: %s: %s\n",
+                       pathname, error->message);
+               g_error_free (error);
+       }
+       g_free (pathname);
+       return pixbuf;
+}
+
+
+
+/* This is used to set ATK action descriptions. */
+void
+glade_set_atk_action_description       (AtkAction       *action,
+                                        const gchar     *action_name,
+                                        const gchar     *description)
+{
+  gint n_actions, i;
+
+  n_actions = atk_action_get_n_actions (action);
+  for (i = 0; i < n_actions; i++)
+    {
+      if (!strcmp (atk_action_get_name (action, i), action_name))
+        atk_action_set_description (action, i, description);
+    }
+}
+
+
+static char linphone_lang[256]={0};
+
+/*lang has to be read before the config file is parsed...*/
+const char *linphone_gtk_get_lang(const char *config_file){
+       FILE *f=fopen(config_file,"r");
+       if (f){
+               char tmp[256];
+               while(fgets(tmp,sizeof(tmp),f)!=NULL){
+                       char *p;
+                       if ((p=strstr(tmp,"lang="))!=NULL){
+                               p+=5;
+                               sscanf(p,"%s",linphone_lang);
+                               g_message("Found lang %s",linphone_lang);
+                               break;
+                       }
+               }
+               fclose(f);
+       }
+       return linphone_lang;
+}
+
+void linphone_gtk_set_lang(const char *code){
+       LpConfig *cfg=linphone_core_get_config(linphone_gtk_get_core());
+       const char *curlang;
+       curlang=getenv("LANG");
+       if (curlang!=NULL && strncmp(curlang,code,2)==0) {
+               /* do not loose the _territory@encoding part*/
+               return;
+       }
+       lp_config_set_string(cfg,"GtkUi","lang",code);
+#ifdef WIN32
+       char tmp[128];
+       snprintf(tmp,sizeof(tmp),"LANG=%s",code);
+       _putenv(tmp);
+#else
+       setenv("LANG",code,1);
+#endif
+}
+
+const gchar *linphone_gtk_get_ui_config(const char *key, const char *def){
+       LinphoneCore *lc=linphone_gtk_get_core();
+       if (lc){
+               LpConfig *cfg=linphone_core_get_config(linphone_gtk_get_core());
+               return lp_config_get_string(cfg,"GtkUi",key,def);
+       }else{
+               ms_warning ("Cannot read config, no core created yet.");
+               return NULL;
+       }
+}
+
+int linphone_gtk_get_ui_config_int(const char *key, int def){
+       LpConfig *cfg=linphone_core_get_config(linphone_gtk_get_core());
+       return lp_config_get_int(cfg,"GtkUi",key,def);
+}
+
+void linphone_gtk_set_ui_config_int(const char *key , int val){
+       LpConfig *cfg=linphone_core_get_config(linphone_gtk_get_core());
+       lp_config_set_int(cfg,"GtkUi",key,val);
+}
+
+
diff --git a/gtk-glade/update.c b/gtk-glade/update.c
new file mode 100755 (executable)
index 0000000..6fac1b8
--- /dev/null
@@ -0,0 +1,157 @@
+/*\r
+linphone, gtk-glade interface.\r
+Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)\r
+\r
+This program is free software; you can redistribute it and/or\r
+modify it under the terms of the GNU General Public License\r
+as published by the Free Software Foundation; either version 2\r
+of the License, or (at your option) any later version.\r
+\r
+This program is distributed in the hope that it will be useful,\r
+but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+GNU General Public License for more details.\r
+\r
+You should have received a copy of the GNU General Public License\r
+along with this program; if not, write to the Free Software\r
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\r
+*/\r
+\r
+#include "linphone.h"\r
+\r
+#ifdef WIN32\r
+\r
+#include <wininet.h>\r
+\r
+static int linphone_gtk_get_new_version(const char *version_url, char *version, size_t size){\r
+       DWORD dwDownloaded = 0;\r
+       HINTERNET  hSession = NULL, hConnect = NULL;\r
+       int ret=-1;\r
+       \r
+       hSession=InternetOpen("Linphone",INTERNET_OPEN_TYPE_PRECONFIG,NULL,NULL,0);\r
+       \r
+       if (hSession==NULL) return -1;\r
+       \r
+       hConnect=InternetOpenUrl(hSession,version_url,NULL,0,0,0);\r
+       \r
+       if (hConnect==NULL) {\r
+               InternetCloseHandle(hSession);\r
+               return -1;\r
+       }\r
+       dwDownloaded=0;\r
+       if (InternetReadFile(hConnect,version,size,&dwDownloaded) && dwDownloaded>0){\r
+               version[dwDownloaded]='\0';\r
+               ms_message("Got response: %s", version);\r
+               /*check this not just html containing 404 not found*/\r
+               if (strstr(version,"html")==0)\r
+                       ret=0;\r
+       }\r
+       \r
+       // Close any open handles.\r
+       if (hConnect) InternetCloseHandle(hConnect);\r
+       if (hSession) InternetCloseHandle(hSession);\r
+       return ret;\r
+}\r
+\r
+#else\r
+\r
+static int linphone_gtk_get_new_version(const char *url, char *version, size_t size){\r
+       \r
+       return -1;\r
+}\r
+\r
+#endif\r
+\r
+static void new_version_response(GtkWidget *dialog, int response_id, gpointer download_site){\r
+       if (response_id==GTK_RESPONSE_YES){\r
+               linphone_gtk_open_browser((const char*)download_site);\r
+       }\r
+       gtk_widget_destroy(dialog);\r
+}\r
+\r
+static gboolean popup_new_version(const char *download_site){\r
+       GtkWidget *dialog;\r
+       /* draw a question box. link to dialog_click callback */\r
+       dialog = gtk_message_dialog_new (\r
+                               GTK_WINDOW(linphone_gtk_get_main_window()),\r
+                GTK_DIALOG_DESTROY_WITH_PARENT,\r
+                               GTK_MESSAGE_QUESTION,\r
+                GTK_BUTTONS_YES_NO,\r
+                _("A more recent version is availalble from %s.\nWould you like to open a browser to download it ?"),\r
+                               download_site);\r
+       g_signal_connect(G_OBJECT (dialog), "response",\r
+            G_CALLBACK (new_version_response),\r
+               (gpointer)download_site);\r
+       /* actually show the box */\r
+       gtk_widget_show(dialog);\r
+       return FALSE;\r
+}\r
+\r
+static gboolean popup_version_ok(){\r
+       linphone_gtk_display_something(GTK_MESSAGE_INFO,_("You are running the lastest version."));\r
+       return FALSE;\r
+}\r
+\r
+static int copytilldot(char *n, const char *v){\r
+       int ret=0;\r
+       while(*v!='\0' && *v!='.' && *v!='-' && *v!='\n' && *v!='\r' && *v!='\t'){\r
+               *n=*v;\r
+               ret++;\r
+               v++;\r
+               n++;\r
+       }\r
+       *n='\0';\r
+       if (*v!='\0') ret=ret+1;\r
+       return ret;\r
+}\r
+\r
+static int version_compare(const char *v1, const char *v2){\r
+       char n1[16];\r
+       char n2[16];\r
+       int ret;\r
+       if (*v1=='\0' && *v2=='\0') return 0;\r
+       v1+=copytilldot(n1,v1);\r
+       v2+=copytilldot(n2,v2);\r
+       ms_message("Comparing %s <> %s",n1,n2);\r
+       ret=strcmp(n1,n2);\r
+       if (ret==0) return version_compare(v1,v2);\r
+       else return ret;\r
+}\r
+\r
+static void *check_for_new_version(void *d){\r
+       const char *version_url=(const char *)d;\r
+       char version[256];\r
+       if (linphone_gtk_get_new_version(version_url,version,sizeof(version))==0){\r
+               if (version_compare(version,LINPHONE_VERSION)>0){\r
+                       const char *download_site=linphone_gtk_get_ui_config("download_site",NULL);\r
+                       if (download_site)   {\r
+                               gdk_threads_enter();\r
+                               g_idle_add((GSourceFunc)popup_new_version,(gpointer)download_site);\r
+                               gdk_threads_leave();\r
+                       }\r
+               }else{\r
+                       if (linphone_gtk_get_ui_config_int("update_check_menu",0)){\r
+                               gdk_threads_enter();\r
+                               g_idle_add((GSourceFunc)popup_version_ok,NULL);\r
+                               gdk_threads_leave();\r
+                       }\r
+               }\r
+       }\r
+       return NULL;\r
+}\r
+\r
+void linphone_gtk_check_for_new_version(void){\r
+       ortp_thread_t thread;\r
+       static gboolean done=FALSE;\r
+       const char *version_url;\r
+       if (done) return;\r
+       done=TRUE;\r
+       version_url=linphone_gtk_get_ui_config("last_version_url",NULL);\r
+       if (version_url==NULL) return ;\r
+       ortp_thread_create(&thread,NULL,check_for_new_version,(void*)version_url);\r
+}\r
+\r
+/*called when the user clicks on the "Check for updates" menu item */\r
+void linphone_gtk_check_for_updates(void){\r
+       linphone_gtk_check_for_new_version();\r
+}\r
diff --git a/gtk-glade/utils.c b/gtk-glade/utils.c
new file mode 100644 (file)
index 0000000..69ae435
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#include "linphone.h"
+
+static void run_gtk(){
+       while (gtk_events_pending ())
+               gtk_main_iteration ();
+
+}
+
+void *linphone_gtk_wait(LinphoneCore *lc, void *ctx, LinphoneWaitingState ws, const char *purpose, float progress){
+       GtkWidget *w;
+       switch(ws){
+               case LinphoneWaitingStart:
+                       gdk_threads_enter();
+                       w=linphone_gtk_create_window("waiting");
+                       gtk_window_set_transient_for(GTK_WINDOW(w),GTK_WINDOW(linphone_gtk_get_main_window()));
+                       gtk_window_set_position(GTK_WINDOW(w),GTK_WIN_POS_CENTER_ON_PARENT);
+                       if (purpose) {
+                               gtk_progress_bar_set_text(
+                                       GTK_PROGRESS_BAR(linphone_gtk_get_widget(w,"progressbar")),
+                                       purpose);
+                       }
+                       gtk_widget_show(w);
+                       /*g_message("Creating waiting window");*/
+                       run_gtk();
+                       gdk_threads_leave();
+                       return w;
+               break;
+               case LinphoneWaitingProgress:
+                       w=(GtkWidget*)ctx;
+                       gdk_threads_enter();
+                       if (progress>=0){
+                               gtk_progress_bar_set_fraction(
+                                       GTK_PROGRESS_BAR(linphone_gtk_get_widget(w,"progressbar")),
+                                       progress);
+                               
+                               
+                       }else {
+                               gtk_progress_bar_pulse(
+                                       GTK_PROGRESS_BAR(linphone_gtk_get_widget(w,"progressbar"))
+                               );
+                       }
+                       /*g_message("Updating progress");*/
+                       run_gtk();
+                       gdk_threads_leave();
+                       g_usleep(50000);
+                       return w;
+               break;
+               case LinphoneWaitingFinished:
+                       w=(GtkWidget*)ctx;
+                       gdk_threads_enter();
+                       gtk_widget_destroy(w);
+                       run_gtk();
+                       gdk_threads_leave();
+                       return NULL;
+               break;
+       }
+       return NULL;
+}
+
+GdkPixbuf *_gdk_pixbuf_new_from_memory_at_scale(const void *data, gint len, gint w, gint h, gboolean preserve_ratio){
+       GInputStream *stream=g_memory_input_stream_new_from_data (data,len,NULL);
+       GError *error=NULL;
+       
+       GdkPixbuf *pbuf=gdk_pixbuf_new_from_stream_at_scale (stream,w,h,preserve_ratio,NULL,&error);
+       g_input_stream_close(stream,NULL,NULL);
+       g_object_unref(G_OBJECT(stream));
+       if (pbuf==NULL){
+               g_warning("Could not open image from memory");
+       }
+       return pbuf;
+}
+
+GtkWidget * _gtk_image_new_from_memory_at_scale(const void *data, gint len, gint w, gint h, gboolean preserve_ratio){
+       GtkWidget *image;
+       GdkPixbuf *pbuf=_gdk_pixbuf_new_from_memory_at_scale(data,len,w,h,preserve_ratio);
+       if (pbuf==NULL) return NULL;
+       image=gtk_image_new_from_pixbuf(pbuf);
+       g_object_unref(G_OBJECT(pbuf));
+       return image;
+}
diff --git a/gtk-glade/waiting.glade b/gtk-glade/waiting.glade
new file mode 100644 (file)
index 0000000..294f44e
--- /dev/null
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--Generated with glade3 3.4.5 on Sun Mar 29 15:33:09 2009 -->
+<glade-interface>
+  <widget class="GtkWindow" id="waiting">
+    <property name="title" translatable="yes">Linphone</property>
+    <property name="resizable">False</property>
+    <property name="modal">True</property>
+    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+    <property name="icon">linphone2.png</property>
+    <property name="deletable">False</property>
+    <child>
+      <widget class="GtkFrame" id="frame1">
+        <property name="visible">True</property>
+        <property name="label_xalign">0</property>
+        <child>
+          <widget class="GtkAlignment" id="alignment1">
+            <property name="visible">True</property>
+            <property name="left_padding">12</property>
+            <child>
+              <widget class="GtkHBox" id="hbox1">
+                <property name="visible">True</property>
+                <property name="spacing">5</property>
+                <child>
+                  <widget class="GtkImage" id="image1">
+                    <property name="visible">True</property>
+                    <property name="stock">gtk-dialog-info</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkProgressBar" id="progressbar">
+                    <property name="visible">True</property>
+                  </widget>
+                  <packing>
+                    <property name="padding">5</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </widget>
+            </child>
+          </widget>
+        </child>
+        <child>
+          <widget class="GtkLabel" id="label1">
+            <property name="visible">True</property>
+            <property name="label" translatable="yes">Please wait</property>
+            <property name="use_markup">True</property>
+            <property name="justify">GTK_JUSTIFY_CENTER</property>
+          </widget>
+          <packing>
+            <property name="type">label_item</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>
diff --git a/intl/ChangeLog b/intl/ChangeLog
new file mode 100644 (file)
index 0000000..65ec50f
--- /dev/null
@@ -0,0 +1,4 @@
+2002-08-06  GNU  <bug-gnu-gettext@gnu.org>
+
+       * Version 0.11.5 released.
+
diff --git a/intl/Makefile.in b/intl/Makefile.in
new file mode 100644 (file)
index 0000000..0486dc9
--- /dev/null
@@ -0,0 +1,337 @@
+# Makefile for directory with message catalog handling in GNU NLS Utilities.
+# Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
+#
+# This program 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, 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
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+# USA.
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = ..
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+transform = @program_transform_name@
+libdir = @libdir@
+includedir = @includedir@
+datadir = @datadir@
+localedir = $(datadir)/locale
+gettextsrcdir = $(datadir)/gettext/intl
+aliaspath = $(localedir)
+subdir = intl
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
+
+l = @INTL_LIBTOOL_SUFFIX_PREFIX@
+
+AR = ar
+CC = @CC@
+LIBTOOL = @LIBTOOL@
+RANLIB = @RANLIB@
+YACC = @INTLBISON@ -y -d
+YFLAGS = --name-prefix=__gettext
+
+DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
+-DLIBDIR=\"$(libdir)\" -DIN_LIBINTL @DEFS@
+CPPFLAGS = @CPPFLAGS@
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
+
+HEADERS = $(COMHDRS) libgnuintl.h loadinfo.h
+COMHDRS = gmo.h gettextP.h hash-string.h plural-exp.h eval-plural.h os2compat.h
+SOURCES = $(COMSRCS) intl-compat.c
+COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
+finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
+explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \
+plural-exp.c localcharset.c localename.c osdep.c os2compat.c
+OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
+finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
+explodename.$lo dcigettext.$lo dcngettext.$lo dngettext.$lo ngettext.$lo \
+plural.$lo plural-exp.$lo localcharset.$lo localename.$lo osdep.$lo
+GETTOBJS = intl-compat.$lo
+DISTFILES.common = Makefile.in \
+config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
+DISTFILES.generated = plural.c
+DISTFILES.normal = VERSION
+DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc
+DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \
+COPYING.LIB-2 gettext.h libgettext.h plural-eval.c
+
+# Libtool's library version information for libintl.
+# Before making a gettext release, the gettext maintainer must change this
+# according to the libtool documentation, section "Library interface versions".
+# Maintainers of other packages that include the intl directory must *not*
+# change these values.
+LTV_CURRENT=4
+LTV_REVISION=0
+LTV_AGE=2
+
+.SUFFIXES:
+.SUFFIXES: .c .y .o .lo .sin .sed
+.c.o:
+       $(COMPILE) $<
+.c.lo:
+       $(LIBTOOL) --mode=compile $(COMPILE) $<
+
+.y.c:
+       $(YACC) $(YFLAGS) --output $@ $<
+       rm -f $*.h
+
+.sin.sed:
+       sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
+       mv t-$@ $@
+
+INCLUDES = -I.. -I. -I$(top_srcdir)/intl
+
+all: all-@USE_INCLUDED_LIBINTL@
+all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
+all-no: all-no-@BUILD_INCLUDED_LIBINTL@
+all-no-yes: libgnuintl.$la
+all-no-no:
+
+libintl.a libgnuintl.a: $(OBJECTS)
+       rm -f $@
+       $(AR) cru $@ $(OBJECTS)
+       $(RANLIB) $@
+
+libintl.la libgnuintl.la: $(OBJECTS)
+       $(LIBTOOL) --mode=link \
+         $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
+         $(OBJECTS) @LTLIBICONV@ -lc \
+         -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
+         -rpath $(libdir) \
+         -no-undefined
+
+libintl.h: libgnuintl.h
+       cp $(srcdir)/libgnuintl.h libintl.h
+
+charset.alias: config.charset
+       $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
+       mv t-$@ $@
+
+check: all
+
+# This installation goal is only used in GNU gettext.  Packages which
+# only use the library should use install instead.
+
+# We must not install the libintl.h/libintl.a files if we are on a
+# system which has the GNU gettext() function in its C library or in a
+# separate library.
+# If you want to use the one which comes with this version of the
+# package, you have to use `configure --with-included-gettext'.
+install: install-exec install-data
+install-exec: all
+       if test "$(PACKAGE)" = "gettext" \
+          && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
+         $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
+         $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
+         $(LIBTOOL) --mode=install \
+           $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
+       else \
+         : ; \
+       fi
+       if test '@USE_INCLUDED_LIBINTL@' = yes; then \
+         test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
+         temp=$(DESTDIR)$(libdir)/t-charset.alias; \
+         dest=$(DESTDIR)$(libdir)/charset.alias; \
+         if test -f $(DESTDIR)$(libdir)/charset.alias; then \
+           orig=$(DESTDIR)$(libdir)/charset.alias; \
+           sed -f ref-add.sed $$orig > $$temp; \
+           $(INSTALL_DATA) $$temp $$dest; \
+           rm -f $$temp; \
+         else \
+           if test @GLIBC21@ = no; then \
+             orig=charset.alias; \
+             sed -f ref-add.sed $$orig > $$temp; \
+             $(INSTALL_DATA) $$temp $$dest; \
+             rm -f $$temp; \
+           fi; \
+         fi; \
+         $(mkinstalldirs) $(DESTDIR)$(localedir); \
+         test -f $(DESTDIR)$(localedir)/locale.alias \
+           && orig=$(DESTDIR)$(localedir)/locale.alias \
+           || orig=$(srcdir)/locale.alias; \
+         temp=$(DESTDIR)$(localedir)/t-locale.alias; \
+         dest=$(DESTDIR)$(localedir)/locale.alias; \
+         sed -f ref-add.sed $$orig > $$temp; \
+         $(INSTALL_DATA) $$temp $$dest; \
+         rm -f $$temp; \
+       else \
+         : ; \
+       fi
+install-data: all
+       if test "$(PACKAGE)" = "gettext"; then \
+         $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+         $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
+         $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
+         dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \
+         for file in $$dists; do \
+           $(INSTALL_DATA) $(srcdir)/$$file \
+                           $(DESTDIR)$(gettextsrcdir)/$$file; \
+         done; \
+         chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
+         dists="$(DISTFILES.generated)"; \
+         for file in $$dists; do \
+           if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
+           $(INSTALL_DATA) $$dir/$$file \
+                           $(DESTDIR)$(gettextsrcdir)/$$file; \
+         done; \
+         dists="$(DISTFILES.obsolete)"; \
+         for file in $$dists; do \
+           rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+         done; \
+       else \
+         : ; \
+       fi
+
+install-strip: install
+
+installdirs:
+       if test "$(PACKAGE)" = "gettext" \
+          && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
+         $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
+       else \
+         : ; \
+       fi
+       if test '@USE_INCLUDED_LIBINTL@' = yes; then \
+         test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
+         $(mkinstalldirs) $(DESTDIR)$(localedir); \
+       else \
+         : ; \
+       fi
+       if test "$(PACKAGE)" = "gettext"; then \
+         $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+       else \
+         : ; \
+       fi
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall:
+       if test "$(PACKAGE)" = "gettext" \
+          && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
+         rm -f $(DESTDIR)$(includedir)/libintl.h; \
+         $(LIBTOOL) --mode=uninstall \
+           rm -f $(DESTDIR)$(libdir)/libintl.$la; \
+       else \
+         : ; \
+       fi
+       if test '@USE_INCLUDED_LIBINTL@' = yes; then \
+         if test -f $(DESTDIR)$(libdir)/charset.alias; then \
+           temp=$(DESTDIR)$(libdir)/t-charset.alias; \
+           dest=$(DESTDIR)$(libdir)/charset.alias; \
+           sed -f ref-del.sed $$dest > $$temp; \
+           if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
+             rm -f $$dest; \
+           else \
+             $(INSTALL_DATA) $$temp $$dest; \
+           fi; \
+           rm -f $$temp; \
+         fi; \
+         if test -f $(DESTDIR)$(localedir)/locale.alias; then \
+           temp=$(DESTDIR)$(localedir)/t-locale.alias; \
+           dest=$(DESTDIR)$(localedir)/locale.alias; \
+           sed -f ref-del.sed $$dest > $$temp; \
+           if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
+             rm -f $$dest; \
+           else \
+             $(INSTALL_DATA) $$temp $$dest; \
+           fi; \
+           rm -f $$temp; \
+         fi; \
+       else \
+         : ; \
+       fi
+       if test "$(PACKAGE)" = "gettext"; then \
+         for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \
+           rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+         done; \
+       else \
+         : ; \
+       fi
+
+info dvi:
+
+$(OBJECTS): ../config.h libgnuintl.h
+bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: gettextP.h gmo.h loadinfo.h
+dcigettext.$lo: hash-string.h
+explodename.$lo l10nflist.$lo: loadinfo.h
+dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: plural-exp.h
+dcigettext.$lo: eval-plural.h
+
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES)
+       here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
+
+id: ID
+
+ID: $(HEADERS) $(SOURCES)
+       here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
+
+
+mostlyclean:
+       rm -f *.a *.la *.o *.lo core core.*
+       rm -f libintl.h charset.alias ref-add.sed ref-del.sed
+       rm -f -r .libs _libs
+
+clean: mostlyclean
+
+distclean: clean
+       rm -f Makefile ID TAGS
+       if test "$(PACKAGE)" = gettext; then \
+         rm -f ChangeLog.inst $(DISTFILES.normal); \
+       else \
+         : ; \
+       fi
+
+maintainer-clean: distclean
+       @echo "This command is intended for maintainers to use;"
+       @echo "it deletes files that may require special tools to rebuild."
+
+
+# GNU gettext needs not contain the file `VERSION' but contains some
+# other files which should not be distributed in other packages.
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: Makefile
+       if test "$(PACKAGE)" = gettext; then \
+         additional="$(DISTFILES.gettext)"; \
+       else \
+         additional="$(DISTFILES.normal)"; \
+       fi; \
+       $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
+       for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
+         if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
+         cp -p $$dir/$$file $(distdir); \
+       done
+
+Makefile: Makefile.in ../config.status
+       cd .. \
+         && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/intl/VERSION b/intl/VERSION
new file mode 100644 (file)
index 0000000..acc8052
--- /dev/null
@@ -0,0 +1 @@
+GNU gettext library from gettext-0.11.5
diff --git a/intl/bindtextdom.c b/intl/bindtextdom.c
new file mode 100644 (file)
index 0000000..d582ce1
--- /dev/null
@@ -0,0 +1,369 @@
+/* Implementation of the bindtextdomain(3) function
+   Copyright (C) 1995-1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+#include "gettextP.h"
+
+#ifdef _LIBC
+/* We have to handle multi-threaded applications.  */
+# include <bits/libc-lock.h>
+#else
+/* Provide dummy implementation if this is outside glibc.  */
+# define __libc_rwlock_define(CLASS, NAME)
+# define __libc_rwlock_wrlock(NAME)
+# define __libc_rwlock_unlock(NAME)
+#endif
+
+/* The internal variables in the standalone libintl.a must have different
+   names than the internal variables in GNU libc, otherwise programs
+   using libintl.a cannot be linked statically.  */
+#if !defined _LIBC
+# define _nl_default_dirname libintl_nl_default_dirname
+# define _nl_domain_bindings libintl_nl_domain_bindings
+#endif
+
+/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>.  */
+#ifndef offsetof
+# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Contains the default location of the message catalogs.  */
+extern const char _nl_default_dirname[];
+
+/* List with bindings of specific domains.  */
+extern struct binding *_nl_domain_bindings;
+
+/* Lock variable to protect the global data in the gettext implementation.  */
+__libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
+
+
+/* Names for the libintl functions are a problem.  They must not clash
+   with existing names and they should follow ANSI C.  But this source
+   code is also used in GNU C Library where the names have a __
+   prefix.  So we have to make a difference here.  */
+#ifdef _LIBC
+# define BINDTEXTDOMAIN __bindtextdomain
+# define BIND_TEXTDOMAIN_CODESET __bind_textdomain_codeset
+# ifndef strdup
+#  define strdup(str) __strdup (str)
+# endif
+#else
+# define BINDTEXTDOMAIN libintl_bindtextdomain
+# define BIND_TEXTDOMAIN_CODESET libintl_bind_textdomain_codeset
+#endif
+
+/* Prototypes for local functions.  */
+static void set_binding_values PARAMS ((const char *domainname,
+                                       const char **dirnamep,
+                                       const char **codesetp));
+
+/* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP
+   to be used for the DOMAINNAME message catalog.
+   If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not
+   modified, only the current value is returned.
+   If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither
+   modified nor returned.  */
+static void
+set_binding_values (domainname, dirnamep, codesetp)
+     const char *domainname;
+     const char **dirnamep;
+     const char **codesetp;
+{
+  struct binding *binding;
+  int modified;
+
+  /* Some sanity checks.  */
+  if (domainname == NULL || domainname[0] == '\0')
+    {
+      if (dirnamep)
+       *dirnamep = NULL;
+      if (codesetp)
+       *codesetp = NULL;
+      return;
+    }
+
+  __libc_rwlock_wrlock (_nl_state_lock);
+
+  modified = 0;
+
+  for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
+    {
+      int compare = strcmp (domainname, binding->domainname);
+      if (compare == 0)
+       /* We found it!  */
+       break;
+      if (compare < 0)
+       {
+         /* It is not in the list.  */
+         binding = NULL;
+         break;
+       }
+    }
+
+  if (binding != NULL)
+    {
+      if (dirnamep)
+       {
+         const char *dirname = *dirnamep;
+
+         if (dirname == NULL)
+           /* The current binding has be to returned.  */
+           *dirnamep = binding->dirname;
+         else
+           {
+             /* The domain is already bound.  If the new value and the old
+                one are equal we simply do nothing.  Otherwise replace the
+                old binding.  */
+             char *result = binding->dirname;
+             if (strcmp (dirname, result) != 0)
+               {
+                 if (strcmp (dirname, _nl_default_dirname) == 0)
+                   result = (char *) _nl_default_dirname;
+                 else
+                   {
+#if defined _LIBC || defined HAVE_STRDUP
+                     result = strdup (dirname);
+#else
+                     size_t len = strlen (dirname) + 1;
+                     result = (char *) malloc (len);
+                     if (__builtin_expect (result != NULL, 1))
+                       memcpy (result, dirname, len);
+#endif
+                   }
+
+                 if (__builtin_expect (result != NULL, 1))
+                   {
+                     if (binding->dirname != _nl_default_dirname)
+                       free (binding->dirname);
+
+                     binding->dirname = result;
+                     modified = 1;
+                   }
+               }
+             *dirnamep = result;
+           }
+       }
+
+      if (codesetp)
+       {
+         const char *codeset = *codesetp;
+
+         if (codeset == NULL)
+           /* The current binding has be to returned.  */
+           *codesetp = binding->codeset;
+         else
+           {
+             /* The domain is already bound.  If the new value and the old
+                one are equal we simply do nothing.  Otherwise replace the
+                old binding.  */
+             char *result = binding->codeset;
+             if (result == NULL || strcmp (codeset, result) != 0)
+               {
+#if defined _LIBC || defined HAVE_STRDUP
+                 result = strdup (codeset);
+#else
+                 size_t len = strlen (codeset) + 1;
+                 result = (char *) malloc (len);
+                 if (__builtin_expect (result != NULL, 1))
+                   memcpy (result, codeset, len);
+#endif
+
+                 if (__builtin_expect (result != NULL, 1))
+                   {
+                     if (binding->codeset != NULL)
+                       free (binding->codeset);
+
+                     binding->codeset = result;
+                     binding->codeset_cntr++;
+                     modified = 1;
+                   }
+               }
+             *codesetp = result;
+           }
+       }
+    }
+  else if ((dirnamep == NULL || *dirnamep == NULL)
+          && (codesetp == NULL || *codesetp == NULL))
+    {
+      /* Simply return the default values.  */
+      if (dirnamep)
+       *dirnamep = _nl_default_dirname;
+      if (codesetp)
+       *codesetp = NULL;
+    }
+  else
+    {
+      /* We have to create a new binding.  */
+      size_t len = strlen (domainname) + 1;
+      struct binding *new_binding =
+       (struct binding *) malloc (offsetof (struct binding, domainname) + len);
+
+      if (__builtin_expect (new_binding == NULL, 0))
+       goto failed;
+
+      memcpy (new_binding->domainname, domainname, len);
+
+      if (dirnamep)
+       {
+         const char *dirname = *dirnamep;
+
+         if (dirname == NULL)
+           /* The default value.  */
+           dirname = _nl_default_dirname;
+         else
+           {
+             if (strcmp (dirname, _nl_default_dirname) == 0)
+               dirname = _nl_default_dirname;
+             else
+               {
+                 char *result;
+#if defined _LIBC || defined HAVE_STRDUP
+                 result = strdup (dirname);
+                 if (__builtin_expect (result == NULL, 0))
+                   goto failed_dirname;
+#else
+                 size_t len = strlen (dirname) + 1;
+                 result = (char *) malloc (len);
+                 if (__builtin_expect (result == NULL, 0))
+                   goto failed_dirname;
+                 memcpy (result, dirname, len);
+#endif
+                 dirname = result;
+               }
+           }
+         *dirnamep = dirname;
+         new_binding->dirname = (char *) dirname;
+       }
+      else
+       /* The default value.  */
+       new_binding->dirname = (char *) _nl_default_dirname;
+
+      new_binding->codeset_cntr = 0;
+
+      if (codesetp)
+       {
+         const char *codeset = *codesetp;
+
+         if (codeset != NULL)
+           {
+             char *result;
+
+#if defined _LIBC || defined HAVE_STRDUP
+             result = strdup (codeset);
+             if (__builtin_expect (result == NULL, 0))
+               goto failed_codeset;
+#else
+             size_t len = strlen (codeset) + 1;
+             result = (char *) malloc (len);
+             if (__builtin_expect (result == NULL, 0))
+               goto failed_codeset;
+             memcpy (result, codeset, len);
+#endif
+             codeset = result;
+             new_binding->codeset_cntr++;
+           }
+         *codesetp = codeset;
+         new_binding->codeset = (char *) codeset;
+       }
+      else
+       new_binding->codeset = NULL;
+
+      /* Now enqueue it.  */
+      if (_nl_domain_bindings == NULL
+         || strcmp (domainname, _nl_domain_bindings->domainname) < 0)
+       {
+         new_binding->next = _nl_domain_bindings;
+         _nl_domain_bindings = new_binding;
+       }
+      else
+       {
+         binding = _nl_domain_bindings;
+         while (binding->next != NULL
+                && strcmp (domainname, binding->next->domainname) > 0)
+           binding = binding->next;
+
+         new_binding->next = binding->next;
+         binding->next = new_binding;
+       }
+
+      modified = 1;
+
+      /* Here we deal with memory allocation failures.  */
+      if (0)
+       {
+       failed_codeset:
+         if (new_binding->dirname != _nl_default_dirname)
+           free (new_binding->dirname);
+       failed_dirname:
+         free (new_binding);
+       failed:
+         if (dirnamep)
+           *dirnamep = NULL;
+         if (codesetp)
+           *codesetp = NULL;
+       }
+    }
+
+  /* If we modified any binding, we flush the caches.  */
+  if (modified)
+    ++_nl_msg_cat_cntr;
+
+  __libc_rwlock_unlock (_nl_state_lock);
+}
+
+/* Specify that the DOMAINNAME message catalog will be found
+   in DIRNAME rather than in the system locale data base.  */
+char *
+BINDTEXTDOMAIN (domainname, dirname)
+     const char *domainname;
+     const char *dirname;
+{
+  set_binding_values (domainname, &dirname, NULL);
+  return (char *) dirname;
+}
+
+/* Specify the character encoding in which the messages from the
+   DOMAINNAME message catalog will be returned.  */
+char *
+BIND_TEXTDOMAIN_CODESET (domainname, codeset)
+     const char *domainname;
+     const char *codeset;
+{
+  set_binding_values (domainname, NULL, &codeset);
+  return (char *) codeset;
+}
+
+#ifdef _LIBC
+/* Aliases for function names in GNU C Library.  */
+weak_alias (__bindtextdomain, bindtextdomain);
+weak_alias (__bind_textdomain_codeset, bind_textdomain_codeset);
+#endif
diff --git a/intl/cat-compat.c b/intl/cat-compat.c
new file mode 100644 (file)
index 0000000..867d901
--- /dev/null
@@ -0,0 +1,262 @@
+/* Compatibility code for gettext-using-catgets interface.
+   Copyright (C) 1995, 1997 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+#else
+char *getenv ();
+# ifdef HAVE_MALLOC_H
+#  include <malloc.h>
+# endif
+#endif
+
+#ifdef HAVE_NL_TYPES_H
+# include <nl_types.h>
+#endif
+
+#include "libgettext.h"
+
+/* @@ end of prolog @@ */
+
+/* XPG3 defines the result of `setlocale (category, NULL)' as:
+   ``Directs `setlocale()' to query `category' and return the current
+     setting of `local'.''
+   However it does not specify the exact format.  And even worse: POSIX
+   defines this not at all.  So we can use this feature only on selected
+   system (e.g. those using GNU C Library).  */
+#ifdef _LIBC
+# define HAVE_LOCALE_NULL
+#endif
+
+/* The catalog descriptor.  */
+static nl_catd catalog = (nl_catd) -1;
+
+/* Name of the default catalog.  */
+static const char default_catalog_name[] = "messages";
+
+/* Name of currently used catalog.  */
+static const char *catalog_name = default_catalog_name;
+
+/* Get ID for given string.  If not found return -1.  */
+static int msg_to_cat_id PARAMS ((const char *msg));
+
+/* Substitution for systems lacking this function in their C library.  */
+#if !_LIBC && !HAVE_STPCPY
+static char *stpcpy PARAMS ((char *dest, const char *src));
+#endif
+
+
+/* Set currently used domain/catalog.  */
+char *
+textdomain (domainname)
+     const char *domainname;
+{
+  nl_catd new_catalog;
+  char *new_name;
+  size_t new_name_len;
+  char *lang;
+
+#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES \
+    && defined HAVE_LOCALE_NULL
+  lang = setlocale (LC_MESSAGES, NULL);
+#else
+  lang = getenv ("LC_ALL");
+  if (lang == NULL || lang[0] == '\0')
+    {
+      lang = getenv ("LC_MESSAGES");
+      if (lang == NULL || lang[0] == '\0')
+       lang = getenv ("LANG");
+    }
+#endif
+  if (lang == NULL || lang[0] == '\0')
+    lang = "C";
+
+  /* See whether name of currently used domain is asked.  */
+  if (domainname == NULL)
+    return (char *) catalog_name;
+
+  if (domainname[0] == '\0')
+    domainname = default_catalog_name;
+
+  /* Compute length of added path element.  */
+  new_name_len = sizeof (LOCALEDIR) - 1 + 1 + strlen (lang)
+                + sizeof ("/LC_MESSAGES/") - 1 + sizeof (PACKAGE) - 1
+                + sizeof (".cat");
+
+  new_name = (char *) malloc (new_name_len);
+  if (new_name == NULL)
+    return NULL;
+
+  strcpy (new_name, PACKAGE);
+  new_catalog = catopen (new_name, 0);
+
+  if (new_catalog == (nl_catd) -1)
+    {
+      /* NLSPATH search didn't work, try absolute path */
+      sprintf (new_name, "%s/%s/LC_MESSAGES/%s.cat", LOCALEDIR, lang,
+              PACKAGE);
+      new_catalog = catopen (new_name, 0);
+
+      if (new_catalog == (nl_catd) -1)
+       {
+         free (new_name);
+         return (char *) catalog_name;
+       }
+    }
+
+  /* Close old catalog.  */
+  if (catalog != (nl_catd) -1)
+    catclose (catalog);
+  if (catalog_name != default_catalog_name)
+    free ((char *) catalog_name);
+
+  catalog = new_catalog;
+  catalog_name = new_name;
+
+  return (char *) catalog_name;
+}
+
+char *
+bindtextdomain (domainname, dirname)
+     const char *domainname;
+     const char *dirname;
+{
+#if HAVE_SETENV || HAVE_PUTENV
+  char *old_val, *new_val, *cp;
+  size_t new_val_len;
+
+  /* This does not make much sense here but to be compatible do it.  */
+  if (domainname == NULL)
+    return NULL;
+
+  /* Compute length of added path element.  If we use setenv we don't need
+     the first byts for NLSPATH=, but why complicate the code for this
+     peanuts.  */
+  new_val_len = sizeof ("NLSPATH=") - 1 + strlen (dirname)
+               + sizeof ("/%L/LC_MESSAGES/%N.cat");
+
+  old_val = getenv ("NLSPATH");
+  if (old_val == NULL || old_val[0] == '\0')
+    {
+      old_val = NULL;
+      new_val_len += 1 + sizeof (LOCALEDIR) - 1
+                    + sizeof ("/%L/LC_MESSAGES/%N.cat");
+    }
+  else
+    new_val_len += strlen (old_val);
+
+  new_val = (char *) malloc (new_val_len);
+  if (new_val == NULL)
+    return NULL;
+
+# if HAVE_SETENV
+  cp = new_val;
+# else
+  cp = stpcpy (new_val, "NLSPATH=");
+# endif
+
+  cp = stpcpy (cp, dirname);
+  cp = stpcpy (cp, "/%L/LC_MESSAGES/%N.cat:");
+
+  if (old_val == NULL)
+    {
+# if __STDC__
+      stpcpy (cp, LOCALEDIR "/%L/LC_MESSAGES/%N.cat");
+# else
+
+      cp = stpcpy (cp, LOCALEDIR);
+      stpcpy (cp, "/%L/LC_MESSAGES/%N.cat");
+# endif
+    }
+  else
+    stpcpy (cp, old_val);
+
+# if HAVE_SETENV
+  setenv ("NLSPATH", new_val, 1);
+  free (new_val);
+# else
+  putenv (new_val);
+  /* Do *not* free the environment entry we just entered.  It is used
+     from now on.   */
+# endif
+
+#endif
+
+  return (char *) domainname;
+}
+
+#undef gettext
+char *
+gettext (msg)
+     const char *msg;
+{
+  int msgid;
+
+  if (msg == NULL || catalog == (nl_catd) -1)
+    return (char *) msg;
+
+  /* Get the message from the catalog.  We always use set number 1.
+     The message ID is computed by the function `msg_to_cat_id'
+     which works on the table generated by `po-to-tbl'.  */
+  msgid = msg_to_cat_id (msg);
+  if (msgid == -1)
+    return (char *) msg;
+
+  return catgets (catalog, 1, msgid, (char *) msg);
+}
+
+/* Look through the table `_msg_tbl' which has `_msg_tbl_length' entries
+   for the one equal to msg.  If it is found return the ID.  In case when
+   the string is not found return -1.  */
+static int
+msg_to_cat_id (msg)
+     const char *msg;
+{
+  int cnt;
+
+  for (cnt = 0; cnt < _msg_tbl_length; ++cnt)
+    if (strcmp (msg, _msg_tbl[cnt]._msg) == 0)
+      return _msg_tbl[cnt]._msg_number;
+
+  return -1;
+}
+
+
+/* @@ begin of epilog @@ */
+
+/* We don't want libintl.a to depend on any other library.  So we
+   avoid the non-standard function stpcpy.  In GNU C Library this
+   function is available, though.  Also allow the symbol HAVE_STPCPY
+   to be defined.  */
+#if !_LIBC && !HAVE_STPCPY
+static char *
+stpcpy (dest, src)
+     char *dest;
+     const char *src;
+{
+  while ((*dest++ = *src++) != '\0')
+    /* Do nothing. */ ;
+  return dest - 1;
+}
+#endif
diff --git a/intl/dcgettext.c b/intl/dcgettext.c
new file mode 100644 (file)
index 0000000..ca6a1c8
--- /dev/null
@@ -0,0 +1,59 @@
+/* Implementation of the dcgettext(3) function.
+   Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem.  They must not clash
+   with existing names and they should follow ANSI C.  But this source
+   code is also used in GNU C Library where the names have a __
+   prefix.  So we have to make a difference here.  */
+#ifdef _LIBC
+# define DCGETTEXT __dcgettext
+# define DCIGETTEXT __dcigettext
+#else
+# define DCGETTEXT libintl_dcgettext
+# define DCIGETTEXT libintl_dcigettext
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
+   locale.  */
+char *
+DCGETTEXT (domainname, msgid, category)
+     const char *domainname;
+     const char *msgid;
+     int category;
+{
+  return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library.  */
+INTDEF(__dcgettext)
+weak_alias (__dcgettext, dcgettext);
+#endif
diff --git a/intl/dgettext.c b/intl/dgettext.c
new file mode 100644 (file)
index 0000000..cf5b403
--- /dev/null
@@ -0,0 +1,59 @@
+/* Implementation of the dgettext(3) function.
+   Copyright (C) 1995-1997, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <locale.h>
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem.  They must not clash
+   with existing names and they should follow ANSI C.  But this source
+   code is also used in GNU C Library where the names have a __
+   prefix.  So we have to make a difference here.  */
+#ifdef _LIBC
+# define DGETTEXT __dgettext
+# define DCGETTEXT INTUSE(__dcgettext)
+#else
+# define DGETTEXT libintl_dgettext
+# define DCGETTEXT libintl_dcgettext
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog of the current
+   LC_MESSAGES locale.  */
+char *
+DGETTEXT (domainname, msgid)
+     const char *domainname;
+     const char *msgid;
+{
+  return DCGETTEXT (domainname, msgid, LC_MESSAGES);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library.  */
+weak_alias (__dgettext, dgettext);
+#endif
diff --git a/intl/explodename.c b/intl/explodename.c
new file mode 100644 (file)
index 0000000..2985064
--- /dev/null
@@ -0,0 +1,192 @@
+/* Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+
+#include "loadinfo.h"
+
+/* On some strange systems still no definition of NULL is found.  Sigh!  */
+#ifndef NULL
+# if defined __STDC__ && __STDC__
+#  define NULL ((void *) 0)
+# else
+#  define NULL 0
+# endif
+#endif
+
+/* @@ end of prolog @@ */
+
+char *
+_nl_find_language (name)
+     const char *name;
+{
+  while (name[0] != '\0' && name[0] != '_' && name[0] != '@'
+        && name[0] != '+' && name[0] != ',')
+    ++name;
+
+  return (char *) name;
+}
+
+
+int
+_nl_explode_name (name, language, modifier, territory, codeset,
+                 normalized_codeset, special, sponsor, revision)
+     char *name;
+     const char **language;
+     const char **modifier;
+     const char **territory;
+     const char **codeset;
+     const char **normalized_codeset;
+     const char **special;
+     const char **sponsor;
+     const char **revision;
+{
+  enum { undecided, xpg, cen } syntax;
+  char *cp;
+  int mask;
+
+  *modifier = NULL;
+  *territory = NULL;
+  *codeset = NULL;
+  *normalized_codeset = NULL;
+  *special = NULL;
+  *sponsor = NULL;
+  *revision = NULL;
+
+  /* Now we determine the single parts of the locale name.  First
+     look for the language.  Termination symbols are `_' and `@' if
+     we use XPG4 style, and `_', `+', and `,' if we use CEN syntax.  */
+  mask = 0;
+  syntax = undecided;
+  *language = cp = name;
+  cp = _nl_find_language (*language);
+
+  if (*language == cp)
+    /* This does not make sense: language has to be specified.  Use
+       this entry as it is without exploding.  Perhaps it is an alias.  */
+    cp = strchr (*language, '\0');
+  else if (cp[0] == '_')
+    {
+      /* Next is the territory.  */
+      cp[0] = '\0';
+      *territory = ++cp;
+
+      while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@'
+            && cp[0] != '+' && cp[0] != ',' && cp[0] != '_')
+       ++cp;
+
+      mask |= TERRITORY;
+
+      if (cp[0] == '.')
+       {
+         /* Next is the codeset.  */
+         syntax = xpg;
+         cp[0] = '\0';
+         *codeset = ++cp;
+
+         while (cp[0] != '\0' && cp[0] != '@')
+           ++cp;
+
+         mask |= XPG_CODESET;
+
+         if (*codeset != cp && (*codeset)[0] != '\0')
+           {
+             *normalized_codeset = _nl_normalize_codeset (*codeset,
+                                                          cp - *codeset);
+             if (strcmp (*codeset, *normalized_codeset) == 0)
+               free ((char *) *normalized_codeset);
+             else
+               mask |= XPG_NORM_CODESET;
+           }
+       }
+    }
+
+  if (cp[0] == '@' || (syntax != xpg && cp[0] == '+'))
+    {
+      /* Next is the modifier.  */
+      syntax = cp[0] == '@' ? xpg : cen;
+      cp[0] = '\0';
+      *modifier = ++cp;
+
+      while (syntax == cen && cp[0] != '\0' && cp[0] != '+'
+            && cp[0] != ',' && cp[0] != '_')
+       ++cp;
+
+      mask |= XPG_MODIFIER | CEN_AUDIENCE;
+    }
+
+  if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_'))
+    {
+      syntax = cen;
+
+      if (cp[0] == '+')
+       {
+         /* Next is special application (CEN syntax).  */
+         cp[0] = '\0';
+         *special = ++cp;
+
+         while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_')
+           ++cp;
+
+         mask |= CEN_SPECIAL;
+       }
+
+      if (cp[0] == ',')
+       {
+         /* Next is sponsor (CEN syntax).  */
+         cp[0] = '\0';
+         *sponsor = ++cp;
+
+         while (cp[0] != '\0' && cp[0] != '_')
+           ++cp;
+
+         mask |= CEN_SPONSOR;
+       }
+
+      if (cp[0] == '_')
+       {
+         /* Next is revision (CEN syntax).  */
+         cp[0] = '\0';
+         *revision = ++cp;
+
+         mask |= CEN_REVISION;
+       }
+    }
+
+  /* For CEN syntax values it might be important to have the
+     separator character in the file name, not for XPG syntax.  */
+  if (syntax == xpg)
+    {
+      if (*territory != NULL && (*territory)[0] == '\0')
+       mask &= ~TERRITORY;
+
+      if (*codeset != NULL && (*codeset)[0] == '\0')
+       mask &= ~XPG_CODESET;
+
+      if (*modifier != NULL && (*modifier)[0] == '\0')
+       mask &= ~XPG_MODIFIER;
+    }
+
+  return mask;
+}
diff --git a/intl/finddomain.c b/intl/finddomain.c
new file mode 100644 (file)
index 0000000..2f103d5
--- /dev/null
@@ -0,0 +1,198 @@
+/* Handle list of needed message catalogs
+   Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
+   Written by Ulrich Drepper <drepper@gnu.org>, 1995.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+/* List of already loaded domains.  */
+static struct loaded_l10nfile *_nl_loaded_domains;
+
+
+/* Return a data structure describing the message catalog described by
+   the DOMAINNAME and CATEGORY parameters with respect to the currently
+   established bindings.  */
+struct loaded_l10nfile *
+internal_function
+_nl_find_domain (dirname, locale, domainname, domainbinding)
+     const char *dirname;
+     char *locale;
+     const char *domainname;
+     struct binding *domainbinding;
+{
+  struct loaded_l10nfile *retval;
+  const char *language;
+  const char *modifier;
+  const char *territory;
+  const char *codeset;
+  const char *normalized_codeset;
+  const char *special;
+  const char *sponsor;
+  const char *revision;
+  const char *alias_value;
+  int mask;
+
+  /* LOCALE can consist of up to four recognized parts for the XPG syntax:
+
+               language[_territory[.codeset]][@modifier]
+
+     and six parts for the CEN syntax:
+
+       language[_territory][+audience][+special][,[sponsor][_revision]]
+
+     Beside the first part all of them are allowed to be missing.  If
+     the full specified locale is not found, the less specific one are
+     looked for.  The various parts will be stripped off according to
+     the following order:
+               (1) revision
+               (2) sponsor
+               (3) special
+               (4) codeset
+               (5) normalized codeset
+               (6) territory
+               (7) audience/modifier
+   */
+
+  /* If we have already tested for this locale entry there has to
+     be one data set in the list of loaded domains.  */
+  retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
+                              strlen (dirname) + 1, 0, locale, NULL, NULL,
+                              NULL, NULL, NULL, NULL, NULL, domainname, 0);
+  if (retval != NULL)
+    {
+      /* We know something about this locale.  */
+      int cnt;
+
+      if (retval->decided == 0)
+       _nl_load_domain (retval, domainbinding);
+
+      if (retval->data != NULL)
+       return retval;
+
+      for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
+       {
+         if (retval->successor[cnt]->decided == 0)
+           _nl_load_domain (retval->successor[cnt], domainbinding);
+
+         if (retval->successor[cnt]->data != NULL)
+           break;
+       }
+      return cnt >= 0 ? retval : NULL;
+      /* NOTREACHED */
+    }
+
+  /* See whether the locale value is an alias.  If yes its value
+     *overwrites* the alias name.  No test for the original value is
+     done.  */
+  alias_value = _nl_expand_alias (locale);
+  if (alias_value != NULL)
+    {
+#if defined _LIBC || defined HAVE_STRDUP
+      locale = strdup (alias_value);
+      if (locale == NULL)
+       return NULL;
+#else
+      size_t len = strlen (alias_value) + 1;
+      locale = (char *) malloc (len);
+      if (locale == NULL)
+       return NULL;
+
+      memcpy (locale, alias_value, len);
+#endif
+    }
+
+  /* Now we determine the single parts of the locale name.  First
+     look for the language.  Termination symbols are `_' and `@' if
+     we use XPG4 style, and `_', `+', and `,' if we use CEN syntax.  */
+  mask = _nl_explode_name (locale, &language, &modifier, &territory,
+                          &codeset, &normalized_codeset, &special,
+                          &sponsor, &revision);
+
+  /* Create all possible locale entries which might be interested in
+     generalization.  */
+  retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
+                              strlen (dirname) + 1, mask, language, territory,
+                              codeset, normalized_codeset, modifier, special,
+                              sponsor, revision, domainname, 1);
+  if (retval == NULL)
+    /* This means we are out of core.  */
+    return NULL;
+
+  if (retval->decided == 0)
+    _nl_load_domain (retval, domainbinding);
+  if (retval->data == NULL)
+    {
+      int cnt;
+      for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
+       {
+         if (retval->successor[cnt]->decided == 0)
+           _nl_load_domain (retval->successor[cnt], domainbinding);
+         if (retval->successor[cnt]->data != NULL)
+           break;
+       }
+    }
+
+  /* The room for an alias was dynamically allocated.  Free it now.  */
+  if (alias_value != NULL)
+    free (locale);
+
+  /* The space for normalized_codeset is dynamically allocated.  Free it.  */
+  if (mask & XPG_NORM_CODESET)
+    free ((void *) normalized_codeset);
+
+  return retval;
+}
+
+
+#ifdef _LIBC
+static void __attribute__ ((unused))
+free_mem (void)
+{
+  struct loaded_l10nfile *runp = _nl_loaded_domains;
+
+  while (runp != NULL)
+    {
+      struct loaded_l10nfile *here = runp;
+      if (runp->data != NULL)
+       _nl_unload_domain ((struct loaded_domain *) runp->data);
+      runp = runp->next;
+      free ((char *) here->filename);
+      free (here);
+    }
+}
+
+text_set_element (__libc_subfreeres, free_mem);
+#endif
diff --git a/intl/gettext.c b/intl/gettext.c
new file mode 100644 (file)
index 0000000..43d689f
--- /dev/null
@@ -0,0 +1,64 @@
+/* Implementation of gettext(3) function.
+   Copyright (C) 1995, 1997, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef _LIBC
+# define __need_NULL
+# include <stddef.h>
+#else
+# include <stdlib.h>           /* Just for NULL.  */
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem.  They must not clash
+   with existing names and they should follow ANSI C.  But this source
+   code is also used in GNU C Library where the names have a __
+   prefix.  So we have to make a difference here.  */
+#ifdef _LIBC
+# define GETTEXT __gettext
+# define DCGETTEXT INTUSE(__dcgettext)
+#else
+# define GETTEXT libintl_gettext
+# define DCGETTEXT libintl_dcgettext
+#endif
+
+/* Look up MSGID in the current default message catalog for the current
+   LC_MESSAGES locale.  If not found, returns MSGID itself (the default
+   text).  */
+char *
+GETTEXT (msgid)
+     const char *msgid;
+{
+  return DCGETTEXT (NULL, msgid, LC_MESSAGES);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library.  */
+weak_alias (__gettext, gettext);
+#endif
diff --git a/intl/gettext.h b/intl/gettext.h
new file mode 100644 (file)
index 0000000..6f5d760
--- /dev/null
@@ -0,0 +1,102 @@
+/* Description of GNU message catalog format: general file layout.
+   Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifndef _GETTEXT_H
+#define _GETTEXT_H 1
+
+#if HAVE_LIMITS_H || _LIBC
+# include <limits.h>
+#endif
+
+/* @@ end of prolog @@ */
+
+/* The magic number of the GNU message catalog format.  */
+#define _MAGIC 0x950412de
+#define _MAGIC_SWAPPED 0xde120495
+
+/* Revision number of the currently used .mo (binary) file format.  */
+#define MO_REVISION_NUMBER 0
+
+/* The following contortions are an attempt to use the C preprocessor
+   to determine an unsigned integral type that is 32 bits wide.  An
+   alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
+   as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work
+   when cross-compiling.  */
+
+#if __STDC__
+# define UINT_MAX_32_BITS 4294967295U
+#else
+# define UINT_MAX_32_BITS 0xFFFFFFFF
+#endif
+
+/* If UINT_MAX isn't defined, assume it's a 32-bit type.
+   This should be valid for all systems GNU cares about because
+   that doesn't include 16-bit systems, and only modern systems
+   (that certainly have <limits.h>) have 64+-bit integral types.  */
+
+#ifndef UINT_MAX
+# define UINT_MAX UINT_MAX_32_BITS
+#endif
+
+#if UINT_MAX == UINT_MAX_32_BITS
+typedef unsigned nls_uint32;
+#else
+# if USHRT_MAX == UINT_MAX_32_BITS
+typedef unsigned short nls_uint32;
+# else
+#  if ULONG_MAX == UINT_MAX_32_BITS
+typedef unsigned long nls_uint32;
+#  else
+  /* The following line is intended to throw an error.  Using #error is
+     not portable enough.  */
+  "Cannot determine unsigned 32-bit data type."
+#  endif
+# endif
+#endif
+
+
+/* Header for binary .mo file format.  */
+struct mo_file_header
+{
+  /* The magic number.  */
+  nls_uint32 magic;
+  /* The revision number of the file format.  */
+  nls_uint32 revision;
+  /* The number of strings pairs.  */
+  nls_uint32 nstrings;
+  /* Offset of table with start offsets of original strings.  */
+  nls_uint32 orig_tab_offset;
+  /* Offset of table with start offsets of translation strings.  */
+  nls_uint32 trans_tab_offset;
+  /* Size of hashing table.  */
+  nls_uint32 hash_tab_size;
+  /* Offset of first hashing entry.  */
+  nls_uint32 hash_tab_offset;
+};
+
+struct string_desc
+{
+  /* Length of addressed string.  */
+  nls_uint32 length;
+  /* Offset of string in file.  */
+  nls_uint32 offset;
+};
+
+/* @@ begin of epilog @@ */
+
+#endif /* gettext.h  */
diff --git a/intl/gettextP.h b/intl/gettextP.h
new file mode 100644 (file)
index 0000000..f085c59
--- /dev/null
@@ -0,0 +1,242 @@
+/* Header describing internals of libintl library.
+   Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc.
+   Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifndef _GETTEXTP_H
+#define _GETTEXTP_H
+
+#include <stddef.h>            /* Get size_t.  */
+
+#ifdef _LIBC
+# include "../iconv/gconv_int.h"
+#else
+# if HAVE_ICONV
+#  include <iconv.h>
+# endif
+#endif
+
+#include "loadinfo.h"
+
+#include "gmo.h"               /* Get nls_uint32.  */
+
+/* @@ end of prolog @@ */
+
+#ifndef PARAMS
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
+#  define PARAMS(args) args
+# else
+#  define PARAMS(args) ()
+# endif
+#endif
+
+#ifndef internal_function
+# define internal_function
+#endif
+
+#ifndef attribute_hidden
+# define attribute_hidden
+#endif
+
+/* Tell the compiler when a conditional or integer expression is
+   almost always true or almost always false.  */
+#ifndef HAVE_BUILTIN_EXPECT
+# define __builtin_expect(expr, val) (expr)
+#endif
+
+#ifndef W
+# define W(flag, data) ((flag) ? SWAP (data) : (data))
+#endif
+
+
+#ifdef _LIBC
+# include <byteswap.h>
+# define SWAP(i) bswap_32 (i)
+#else
+static inline nls_uint32
+SWAP (i)
+     nls_uint32 i;
+{
+  return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
+}
+#endif
+
+
+/* In-memory representation of system dependent string.  */
+struct sysdep_string_desc
+{
+  /* Length of addressed string, including the trailing NUL.  */
+  size_t length;
+  /* Pointer to addressed string.  */
+  const char *pointer;
+};
+
+/* The representation of an opened message catalog.  */
+struct loaded_domain
+{
+  /* Pointer to memory containing the .mo file.  */
+  const char *data;
+  /* 1 if the memory is mmap()ed, 0 if the memory is malloc()ed.  */
+  int use_mmap;
+  /* Size of mmap()ed memory.  */
+  size_t mmap_size;
+  /* 1 if the .mo file uses a different endianness than this machine.  */
+  int must_swap;
+  /* Pointer to additional malloc()ed memory.  */
+  void *malloced;
+
+  /* Number of static strings pairs.  */
+  nls_uint32 nstrings;
+  /* Pointer to descriptors of original strings in the file.  */
+  const struct string_desc *orig_tab;
+  /* Pointer to descriptors of translated strings in the file.  */
+  const struct string_desc *trans_tab;
+
+  /* Number of system dependent strings pairs.  */
+  nls_uint32 n_sysdep_strings;
+  /* Pointer to descriptors of original sysdep strings.  */
+  const struct sysdep_string_desc *orig_sysdep_tab;
+  /* Pointer to descriptors of translated sysdep strings.  */
+  const struct sysdep_string_desc *trans_sysdep_tab;
+
+  /* Size of hash table.  */
+  nls_uint32 hash_size;
+  /* Pointer to hash table.  */
+  const nls_uint32 *hash_tab;
+  /* 1 if the hash table uses a different endianness than this machine.  */
+  int must_swap_hash_tab;
+
+  int codeset_cntr;
+#ifdef _LIBC
+  __gconv_t conv;
+#else
+# if HAVE_ICONV
+  iconv_t conv;
+# endif
+#endif
+  char **conv_tab;
+
+  struct expression *plural;
+  unsigned long int nplurals;
+};
+
+/* We want to allocate a string at the end of the struct.  But ISO C
+   doesn't allow zero sized arrays.  */
+#ifdef __GNUC__
+# define ZERO 0
+#else
+# define ZERO 1
+#endif
+
+/* A set of settings bound to a message domain.  Used to store settings
+   from bindtextdomain() and bind_textdomain_codeset().  */
+struct binding
+{
+  struct binding *next;
+  char *dirname;
+  int codeset_cntr;    /* Incremented each time codeset changes.  */
+  char *codeset;
+  char domainname[ZERO];
+};
+
+/* A counter which is incremented each time some previous translations
+   become invalid.
+   This variable is part of the external ABI of the GNU libintl.  */
+extern int _nl_msg_cat_cntr;
+
+#ifndef _LIBC
+const char *_nl_locale_name PARAMS ((int category, const char *categoryname));
+#endif
+
+struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
+                                                char *__locale,
+                                                const char *__domainname,
+                                             struct binding *__domainbinding))
+     internal_function;
+void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain,
+                             struct binding *__domainbinding))
+     internal_function;
+void _nl_unload_domain PARAMS ((struct loaded_domain *__domain))
+     internal_function;
+const char *_nl_init_domain_conv PARAMS ((struct loaded_l10nfile *__domain_file,
+                                         struct loaded_domain *__domain,
+                                         struct binding *__domainbinding))
+     internal_function;
+void _nl_free_domain_conv PARAMS ((struct loaded_domain *__domain))
+     internal_function;
+
+char *_nl_find_msg PARAMS ((struct loaded_l10nfile *domain_file,
+                           struct binding *domainbinding,
+                           const char *msgid, size_t *lengthp))
+     internal_function;
+
+#ifdef _LIBC
+extern char *__gettext PARAMS ((const char *__msgid));
+extern char *__dgettext PARAMS ((const char *__domainname,
+                                const char *__msgid));
+extern char *__dcgettext PARAMS ((const char *__domainname,
+                                 const char *__msgid, int __category));
+extern char *__ngettext PARAMS ((const char *__msgid1, const char *__msgid2,
+                                unsigned long int __n));
+extern char *__dngettext PARAMS ((const char *__domainname,
+                                 const char *__msgid1, const char *__msgid2,
+                                 unsigned long int n));
+extern char *__dcngettext PARAMS ((const char *__domainname,
+                                  const char *__msgid1, const char *__msgid2,
+                                  unsigned long int __n, int __category));
+extern char *__dcigettext PARAMS ((const char *__domainname,
+                                  const char *__msgid1, const char *__msgid2,
+                                  int __plural, unsigned long int __n,
+                                  int __category));
+extern char *__textdomain PARAMS ((const char *__domainname));
+extern char *__bindtextdomain PARAMS ((const char *__domainname,
+                                      const char *__dirname));
+extern char *__bind_textdomain_codeset PARAMS ((const char *__domainname,
+                                               const char *__codeset));
+#else
+extern char *libintl_gettext PARAMS ((const char *__msgid));
+extern char *libintl_dgettext PARAMS ((const char *__domainname,
+                                      const char *__msgid));
+extern char *libintl_dcgettext PARAMS ((const char *__domainname,
+                                       const char *__msgid, int __category));
+extern char *libintl_ngettext PARAMS ((const char *__msgid1,
+                                      const char *__msgid2,
+                                      unsigned long int __n));
+extern char *libintl_dngettext PARAMS ((const char *__domainname,
+                                       const char *__msgid1,
+                                       const char *__msgid2,
+                                       unsigned long int __n));
+extern char *libintl_dcngettext PARAMS ((const char *__domainname,
+                                        const char *__msgid1,
+                                        const char *__msgid2,
+                                        unsigned long int __n,
+                                        int __category));
+extern char *libintl_dcigettext PARAMS ((const char *__domainname,
+                                        const char *__msgid1,
+                                        const char *__msgid2,
+                                        int __plural, unsigned long int __n,
+                                        int __category));
+extern char *libintl_textdomain PARAMS ((const char *__domainname));
+extern char *libintl_bindtextdomain PARAMS ((const char *__domainname,
+                                            const char *__dirname));
+extern char *libintl_bind_textdomain_codeset PARAMS ((const char *__domainname,
+                                                     const char *__codeset));
+#endif
+
+/* @@ begin of epilog @@ */
+
+#endif /* gettextP.h  */
diff --git a/intl/hash-string.h b/intl/hash-string.h
new file mode 100644 (file)
index 0000000..b267a87
--- /dev/null
@@ -0,0 +1,59 @@
+/* Description of GNU message catalog format: string hashing function.
+   Copyright (C) 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+/* @@ end of prolog @@ */
+
+#ifndef PARAMS
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
+#  define PARAMS(Args) Args
+# else
+#  define PARAMS(Args) ()
+# endif
+#endif
+
+/* We assume to have `unsigned long int' value with at least 32 bits.  */
+#define HASHWORDBITS 32
+
+
+/* Defines the so called `hashpjw' function by P.J. Weinberger
+   [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
+   1986, 1987 Bell Telephone Laboratories, Inc.]  */
+static unsigned long int hash_string PARAMS ((const char *__str_param));
+
+static inline unsigned long int
+hash_string (str_param)
+     const char *str_param;
+{
+  unsigned long int hval, g;
+  const char *str = str_param;
+
+  /* Compute the hash value for the given string.  */
+  hval = 0;
+  while (*str != '\0')
+    {
+      hval <<= 4;
+      hval += (unsigned long int) *str++;
+      g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
+      if (g != 0)
+       {
+         hval ^= g >> (HASHWORDBITS - 8);
+         hval ^= g;
+       }
+    }
+  return hval;
+}
diff --git a/intl/intl-compat.c b/intl/intl-compat.c
new file mode 100644 (file)
index 0000000..da89015
--- /dev/null
@@ -0,0 +1,131 @@
+/* intl-compat.c - Stub functions to call gettext functions from GNU gettext
+   Library.
+   Copyright (C) 1995, 2000-2002 Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#define _INTL_REDIRECT_MACROS
+#include "libgnuintl.h"
+#include "gettextP.h"
+
+/* @@ end of prolog @@ */
+
+/* This file redirects the gettext functions (without prefix) to those
+   defined in the included GNU libintl library (with "libintl_" prefix).
+   It is compiled into libintl in order to make the AM_GNU_GETTEXT test
+   of gettext <= 0.11.2 work with the libintl library >= 0.11.3 which
+   has the redirections primarily in the <libintl.h> include file.  */
+
+
+#undef gettext
+#undef dgettext
+#undef dcgettext
+#undef ngettext
+#undef dngettext
+#undef dcngettext
+#undef textdomain
+#undef bindtextdomain
+#undef bind_textdomain_codeset
+
+
+char *
+gettext (msgid)
+     const char *msgid;
+{
+  return libintl_gettext (msgid);
+}
+
+
+char *
+dgettext (domainname, msgid)
+     const char *domainname;
+     const char *msgid;
+{
+  return libintl_dgettext (domainname, msgid);
+}
+
+
+char *
+dcgettext (domainname, msgid, category)
+     const char *domainname;
+     const char *msgid;
+     int category;
+{
+  return libintl_dcgettext (domainname, msgid, category);
+}
+
+
+char *
+ngettext (msgid1, msgid2, n)
+     const char *msgid1;
+     const char *msgid2;
+     unsigned long int n;
+{
+  return libintl_ngettext (msgid1, msgid2, n);
+}
+
+
+char *
+dngettext (domainname, msgid1, msgid2, n)
+     const char *domainname;
+     const char *msgid1;
+     const char *msgid2;
+     unsigned long int n;
+{
+  return libintl_dngettext (domainname, msgid1, msgid2, n);
+}
+
+
+char *
+dcngettext (domainname, msgid1, msgid2, n, category)
+     const char *domainname;
+     const char *msgid1;
+     const char *msgid2;
+     unsigned long int n;
+     int category;
+{
+  return libintl_dcngettext (domainname, msgid1, msgid2, n, category);
+}
+
+
+char *
+textdomain (domainname)
+     const char *domainname;
+{
+  return libintl_textdomain (domainname);
+}
+
+
+char *
+bindtextdomain (domainname, dirname)
+     const char *domainname;
+     const char *dirname;
+{
+  return libintl_bindtextdomain (domainname, dirname);
+}
+
+
+char *
+bind_textdomain_codeset (domainname, codeset)
+     const char *domainname;
+     const char *codeset;
+{
+  return libintl_bind_textdomain_codeset (domainname, codeset);
+}
diff --git a/intl/l10nflist.c b/intl/l10nflist.c
new file mode 100644 (file)
index 0000000..ec8713f
--- /dev/null
@@ -0,0 +1,453 @@
+/* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+/* Tell glibc's <string.h> to provide a prototype for stpcpy().
+   This must come before <config.h> because <config.h> may include
+   <features.h>, and once <features.h> has been included, it's too late.  */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE   1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <string.h>
+
+#if defined _LIBC || defined HAVE_ARGZ_H
+# include <argz.h>
+#endif
+#include <ctype.h>
+#include <sys/types.h>
+#include <stdlib.h>
+
+#include "loadinfo.h"
+
+/* On some strange systems still no definition of NULL is found.  Sigh!  */
+#ifndef NULL
+# if defined __STDC__ && __STDC__
+#  define NULL ((void *) 0)
+# else
+#  define NULL 0
+# endif
+#endif
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ANSI C functions.  This is required by the standard
+   because some ANSI C functions will require linking with this object
+   file and the name space must not be polluted.  */
+# ifndef stpcpy
+#  define stpcpy(dest, src) __stpcpy(dest, src)
+# endif
+#else
+# ifndef HAVE_STPCPY
+static char *stpcpy PARAMS ((char *dest, const char *src));
+# endif
+#endif
+
+/* Pathname support.
+   ISSLASH(C)           tests whether C is a directory separator character.
+   IS_ABSOLUTE_PATH(P)  tests whether P is an absolute path.  If it is not,
+                        it may be concatenated to a directory pathname.
+ */
+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
+  /* Win32, OS/2, DOS */
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+# define HAS_DEVICE(P) \
+    ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
+     && (P)[1] == ':')
+# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
+#else
+  /* Unix */
+# define ISSLASH(C) ((C) == '/')
+# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
+#endif
+
+/* Define function which are usually not available.  */
+
+#if !defined _LIBC && !defined HAVE___ARGZ_COUNT
+/* Returns the number of strings in ARGZ.  */
+static size_t argz_count__ PARAMS ((const char *argz, size_t len));
+
+static size_t
+argz_count__ (argz, len)
+     const char *argz;
+     size_t len;
+{
+  size_t count = 0;
+  while (len > 0)
+    {
+      size_t part_len = strlen (argz);
+      argz += part_len + 1;
+      len -= part_len + 1;
+      count++;
+    }
+  return count;
+}
+# undef __argz_count
+# define __argz_count(argz, len) argz_count__ (argz, len)
+#else
+# ifdef _LIBC
+#  define __argz_count(argz, len) INTUSE(__argz_count) (argz, len)
+# endif
+#endif /* !_LIBC && !HAVE___ARGZ_COUNT */
+
+#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY
+/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
+   except the last into the character SEP.  */
+static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep));
+
+static void
+argz_stringify__ (argz, len, sep)
+     char *argz;
+     size_t len;
+     int sep;
+{
+  while (len > 0)
+    {
+      size_t part_len = strlen (argz);
+      argz += part_len;
+      len -= part_len + 1;
+      if (len > 0)
+       *argz++ = sep;
+    }
+}
+# undef __argz_stringify
+# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
+#else
+# ifdef _LIBC
+#  define __argz_stringify(argz, len, sep) \
+  INTUSE(__argz_stringify) (argz, len, sep)
+# endif
+#endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */
+
+#if !defined _LIBC && !defined HAVE___ARGZ_NEXT
+static char *argz_next__ PARAMS ((char *argz, size_t argz_len,
+                                 const char *entry));
+
+static char *
+argz_next__ (argz, argz_len, entry)
+     char *argz;
+     size_t argz_len;
+     const char *entry;
+{
+  if (entry)
+    {
+      if (entry < argz + argz_len)
+        entry = strchr (entry, '\0') + 1;
+
+      return entry >= argz + argz_len ? NULL : (char *) entry;
+    }
+  else
+    if (argz_len > 0)
+      return argz;
+    else
+      return 0;
+}
+# undef __argz_next
+# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry)
+#endif /* !_LIBC && !HAVE___ARGZ_NEXT */
+
+
+/* Return number of bits set in X.  */
+static int pop PARAMS ((int x));
+
+static inline int
+pop (x)
+     int x;
+{
+  /* We assume that no more than 16 bits are used.  */
+  x = ((x & ~0x5555) >> 1) + (x & 0x5555);
+  x = ((x & ~0x3333) >> 2) + (x & 0x3333);
+  x = ((x >> 4) + x) & 0x0f0f;
+  x = ((x >> 8) + x) & 0xff;
+
+  return x;
+}
+
+\f
+struct loaded_l10nfile *
+_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
+                   territory, codeset, normalized_codeset, modifier, special,
+                   sponsor, revision, filename, do_allocate)
+     struct loaded_l10nfile **l10nfile_list;
+     const char *dirlist;
+     size_t dirlist_len;
+     int mask;
+     const char *language;
+     const char *territory;
+     const char *codeset;
+     const char *normalized_codeset;
+     const char *modifier;
+     const char *special;
+     const char *sponsor;
+     const char *revision;
+     const char *filename;
+     int do_allocate;
+{
+  char *abs_filename;
+  struct loaded_l10nfile **lastp;
+  struct loaded_l10nfile *retval;
+  char *cp;
+  size_t dirlist_count;
+  size_t entries;
+  int cnt;
+
+  /* If LANGUAGE contains an absolute directory specification, we ignore
+     DIRLIST.  */
+  if (IS_ABSOLUTE_PATH (language))
+    dirlist_len = 0;
+
+  /* Allocate room for the full file name.  */
+  abs_filename = (char *) malloc (dirlist_len
+                                 + strlen (language)
+                                 + ((mask & TERRITORY) != 0
+                                    ? strlen (territory) + 1 : 0)
+                                 + ((mask & XPG_CODESET) != 0
+                                    ? strlen (codeset) + 1 : 0)
+                                 + ((mask & XPG_NORM_CODESET) != 0
+                                    ? strlen (normalized_codeset) + 1 : 0)
+                                 + (((mask & XPG_MODIFIER) != 0
+                                     || (mask & CEN_AUDIENCE) != 0)
+                                    ? strlen (modifier) + 1 : 0)
+                                 + ((mask & CEN_SPECIAL) != 0
+                                    ? strlen (special) + 1 : 0)
+                                 + (((mask & CEN_SPONSOR) != 0
+                                     || (mask & CEN_REVISION) != 0)
+                                    ? (1 + ((mask & CEN_SPONSOR) != 0
+                                            ? strlen (sponsor) : 0)
+                                       + ((mask & CEN_REVISION) != 0
+                                          ? strlen (revision) + 1 : 0)) : 0)
+                                 + 1 + strlen (filename) + 1);
+
+  if (abs_filename == NULL)
+    return NULL;
+
+  /* Construct file name.  */
+  cp = abs_filename;
+  if (dirlist_len > 0)
+    {
+      memcpy (cp, dirlist, dirlist_len);
+      __argz_stringify (cp, dirlist_len, PATH_SEPARATOR);
+      cp += dirlist_len;
+      cp[-1] = '/';
+    }
+
+  cp = stpcpy (cp, language);
+
+  if ((mask & TERRITORY) != 0)
+    {
+      *cp++ = '_';
+      cp = stpcpy (cp, territory);
+    }
+  if ((mask & XPG_CODESET) != 0)
+    {
+      *cp++ = '.';
+      cp = stpcpy (cp, codeset);
+    }
+  if ((mask & XPG_NORM_CODESET) != 0)
+    {
+      *cp++ = '.';
+      cp = stpcpy (cp, normalized_codeset);
+    }
+  if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0)
+    {
+      /* This component can be part of both syntaces but has different
+        leading characters.  For CEN we use `+', else `@'.  */
+      *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@';
+      cp = stpcpy (cp, modifier);
+    }
+  if ((mask & CEN_SPECIAL) != 0)
+    {
+      *cp++ = '+';
+      cp = stpcpy (cp, special);
+    }
+  if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0)
+    {
+      *cp++ = ',';
+      if ((mask & CEN_SPONSOR) != 0)
+       cp = stpcpy (cp, sponsor);
+      if ((mask & CEN_REVISION) != 0)
+       {
+         *cp++ = '_';
+         cp = stpcpy (cp, revision);
+       }
+    }
+
+  *cp++ = '/';
+  stpcpy (cp, filename);
+
+  /* Look in list of already loaded domains whether it is already
+     available.  */
+  lastp = l10nfile_list;
+  for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
+    if (retval->filename != NULL)
+      {
+       int compare = strcmp (retval->filename, abs_filename);
+       if (compare == 0)
+         /* We found it!  */
+         break;
+       if (compare < 0)
+         {
+           /* It's not in the list.  */
+           retval = NULL;
+           break;
+         }
+
+       lastp = &retval->next;
+      }
+
+  if (retval != NULL || do_allocate == 0)
+    {
+      free (abs_filename);
+      return retval;
+    }
+
+  dirlist_count = (dirlist_len > 0 ? __argz_count (dirlist, dirlist_len) : 1);
+
+  /* Allocate a new loaded_l10nfile.  */
+  retval =
+    (struct loaded_l10nfile *)
+    malloc (sizeof (*retval)
+           + (((dirlist_count << pop (mask)) + (dirlist_count > 1 ? 1 : 0))
+              * sizeof (struct loaded_l10nfile *)));
+  if (retval == NULL)
+    return NULL;
+
+  retval->filename = abs_filename;
+
+  /* We set retval->data to NULL here; it is filled in later.
+     Setting retval->decided to 1 here means that retval does not
+     correspond to a real file (dirlist_count > 1) or is not worth
+     looking up (if an unnormalized codeset was specified).  */
+  retval->decided = (dirlist_count > 1
+                    || ((mask & XPG_CODESET) != 0
+                        && (mask & XPG_NORM_CODESET) != 0));
+  retval->data = NULL;
+
+  retval->next = *lastp;
+  *lastp = retval;
+
+  entries = 0;
+  /* Recurse to fill the inheritance list of RETVAL.
+     If the DIRLIST is a real list (i.e. DIRLIST_COUNT > 1), the RETVAL
+     entry does not correspond to a real file; retval->filename contains
+     colons.  In this case we loop across all elements of DIRLIST and
+     across all bit patterns dominated by MASK.
+     If the DIRLIST is a single directory or entirely redundant (i.e.
+     DIRLIST_COUNT == 1), we loop across all bit patterns dominated by
+     MASK, excluding MASK itself.
+     In either case, we loop down from MASK to 0.  This has the effect
+     that the extra bits in the locale name are dropped in this order:
+     first the modifier, then the territory, then the codeset, then the
+     normalized_codeset.  */
+  for (cnt = dirlist_count > 1 ? mask : mask - 1; cnt >= 0; --cnt)
+    if ((cnt & ~mask) == 0
+       && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
+       && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
+      {
+       if (dirlist_count > 1)
+         {
+           /* Iterate over all elements of the DIRLIST.  */
+           char *dir = NULL;
+
+           while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
+                  != NULL)
+             retval->successor[entries++]
+               = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1,
+                                     cnt, language, territory, codeset,
+                                     normalized_codeset, modifier, special,
+                                     sponsor, revision, filename, 1);
+         }
+       else
+         retval->successor[entries++]
+           = _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len,
+                                 cnt, language, territory, codeset,
+                                 normalized_codeset, modifier, special,
+                                 sponsor, revision, filename, 1);
+      }
+  retval->successor[entries] = NULL;
+
+  return retval;
+}
+\f
+/* Normalize codeset name.  There is no standard for the codeset
+   names.  Normalization allows the user to use any of the common
+   names.  The return value is dynamically allocated and has to be
+   freed by the caller.  */
+const char *
+_nl_normalize_codeset (codeset, name_len)
+     const char *codeset;
+     size_t name_len;
+{
+  int len = 0;
+  int only_digit = 1;
+  char *retval;
+  char *wp;
+  size_t cnt;
+
+  for (cnt = 0; cnt < name_len; ++cnt)
+    if (isalnum ((unsigned char) codeset[cnt]))
+      {
+       ++len;
+
+       if (isalpha ((unsigned char) codeset[cnt]))
+         only_digit = 0;
+      }
+
+  retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1);
+
+  if (retval != NULL)
+    {
+      if (only_digit)
+       wp = stpcpy (retval, "iso");
+      else
+       wp = retval;
+
+      for (cnt = 0; cnt < name_len; ++cnt)
+       if (isalpha ((unsigned char) codeset[cnt]))
+         *wp++ = tolower ((unsigned char) codeset[cnt]);
+       else if (isdigit ((unsigned char) codeset[cnt]))
+         *wp++ = codeset[cnt];
+
+      *wp = '\0';
+    }
+
+  return (const char *) retval;
+}
+
+
+/* @@ begin of epilog @@ */
+
+/* We don't want libintl.a to depend on any other library.  So we
+   avoid the non-standard function stpcpy.  In GNU C Library this
+   function is available, though.  Also allow the symbol HAVE_STPCPY
+   to be defined.  */
+#if !_LIBC && !HAVE_STPCPY
+static char *
+stpcpy (dest, src)
+     char *dest;
+     const char *src;
+{
+  while ((*dest++ = *src++) != '\0')
+    /* Do nothing. */ ;
+  return dest - 1;
+}
+#endif
diff --git a/intl/libgettext.h b/intl/libgettext.h
new file mode 100644 (file)
index 0000000..c5be54a
--- /dev/null
@@ -0,0 +1,49 @@
+/* Convenience header for conditional use of GNU <libintl.h>.
+   Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifndef _LIBGETTEXT_H
+#define _LIBGETTEXT_H 1
+
+/* NLS can be disabled through the configure --disable-nls option.  */
+#if ENABLE_NLS
+
+/* Get declarations of GNU message catalog functions.  */
+# include <libintl.h>
+
+#else
+
+# define gettext(Msgid) (Msgid)
+# define dgettext(Domainname, Msgid) (Msgid)
+# define dcgettext(Domainname, Msgid, Category) (Msgid)
+# define ngettext(Msgid1, Msgid2, N) \
+    ((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
+# define dngettext(Domainname, Msgid1, Msgid2, N) \
+    ((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
+# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
+    ((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
+# define textdomain(Domainname) ((char *) (Domainname))
+# define bindtextdomain(Domainname, Dirname) ((char *) (Dirname))
+# define bind_textdomain_codeset(Domainname, Codeset) ((char *) (Codeset))
+
+#endif
+
+/* For automatical extraction of messages sometimes no real
+   translation is needed.  Instead the string itself is the result.  */
+#define gettext_noop(Str) (Str)
+
+#endif /* _LIBGETTEXT_H */
diff --git a/intl/linux-msg.sed b/intl/linux-msg.sed
new file mode 100644 (file)
index 0000000..5918e72
--- /dev/null
@@ -0,0 +1,100 @@
+# po2msg.sed - Convert Uniforum style .po file to Linux style .msg file
+# Copyright (C) 1995 Free Software Foundation, Inc.
+# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+#
+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+#
+# The first directive in the .msg should be the definition of the
+# message set number.  We use always set number 1.
+#
+1 {
+  i\
+$set 1 # Automatically created by po2msg.sed
+  h
+  s/.*/0/
+  x
+}
+#
+# Mitch's old catalog format does not allow comments.
+#
+# We copy the original message as a comment into the .msg file.
+#
+/^msgid/ {
+  s/msgid[     ]*"//
+#
+# This does not work now with the new format.
+# /"$/! {
+#   s/\\$//
+#   s/$/ ... (more lines following)"/
+# }
+  x
+# The following nice solution is by
+# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
+  td
+# Increment a decimal number in pattern space.
+# First hide trailing `9' digits.
+  :d
+  s/9\(_*\)$/_\1/
+  td
+# Assure at least one digit is available.
+  s/^\(_*\)$/0\1/
+# Increment the last digit.
+  s/8\(_*\)$/9\1/
+  s/7\(_*\)$/8\1/
+  s/6\(_*\)$/7\1/
+  s/5\(_*\)$/6\1/
+  s/4\(_*\)$/5\1/
+  s/3\(_*\)$/4\1/
+  s/2\(_*\)$/3\1/
+  s/1\(_*\)$/2\1/
+  s/0\(_*\)$/1\1/
+# Convert the hidden `9' digits to `0's.
+  s/_/0/g
+  x
+  G
+  s/\(.*\)"\n\([0-9]*\)/$ #\2 Original Message:(\1)/p
+}
+#
+# The .msg file contains, other then the .po file, only the translations
+# but each given a unique ID.  Starting from 1 and incrementing by 1 for
+# each message we assign them to the messages.
+# It is important that the .po file used to generate the cat-id-tbl.c file
+# (with po-to-tbl) is the same as the one used here.  (At least the order
+# of declarations must not be changed.)
+#
+/^msgstr/ {
+  s/msgstr[    ]*"\(.*\)"/# \1/
+# Clear substitution flag.
+  tb
+# Append the next line.
+  :b
+  N
+# Look whether second part is continuation line.
+  s/\(.*\n\)"\(.*\)"/\1\2/
+# Yes, then branch.
+  ta
+  P
+  D
+# Note that D includes a jump to the start!!
+# We found a continuation line.  But before printing insert '\'.
+  :a
+  s/\(.*\)\(\n.*\)/\1\\\2/
+  P
+# We cannot use D here.
+  s/.*\n\(.*\)/\1/
+  tb
+}
+d
diff --git a/intl/loadinfo.h b/intl/loadinfo.h
new file mode 100644 (file)
index 0000000..1d3ba61
--- /dev/null
@@ -0,0 +1,156 @@
+/* Copyright (C) 1996-1999, 2000-2002 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifndef _LOADINFO_H
+#define _LOADINFO_H    1
+
+/* Declarations of locale dependent catalog lookup functions.
+   Implemented in
+
+     localealias.c    Possibly replace a locale name by another.
+     explodename.c    Split a locale name into its various fields.
+     l10nflist.c      Generate a list of filenames of possible message catalogs.
+     finddomain.c     Find and open the relevant message catalogs.
+
+   The main function _nl_find_domain() in finddomain.c is declared
+   in gettextP.h.
+ */
+
+#ifndef PARAMS
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
+#  define PARAMS(args) args
+# else
+#  define PARAMS(args) ()
+# endif
+#endif
+
+#ifndef internal_function
+# define internal_function
+#endif
+
+/* Tell the compiler when a conditional or integer expression is
+   almost always true or almost always false.  */
+#ifndef HAVE_BUILTIN_EXPECT
+# define __builtin_expect(expr, val) (expr)
+#endif
+
+/* Separator in PATH like lists of pathnames.  */
+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
+  /* Win32, OS/2, DOS */
+# define PATH_SEPARATOR ';'
+#else
+  /* Unix */
+# define PATH_SEPARATOR ':'
+#endif
+
+/* Encoding of locale name parts.  */
+#define CEN_REVISION           1
+#define CEN_SPONSOR            2
+#define CEN_SPECIAL            4
+#define XPG_NORM_CODESET       8
+#define XPG_CODESET            16
+#define TERRITORY              32
+#define CEN_AUDIENCE           64
+#define XPG_MODIFIER           128
+
+#define CEN_SPECIFIC   (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
+#define XPG_SPECIFIC   (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER)
+
+
+struct loaded_l10nfile
+{
+  const char *filename;
+  int decided;
+
+  const void *data;
+
+  struct loaded_l10nfile *next;
+  struct loaded_l10nfile *successor[1];
+};
+
+
+/* Normalize codeset name.  There is no standard for the codeset
+   names.  Normalization allows the user to use any of the common
+   names.  The return value is dynamically allocated and has to be
+   freed by the caller.  */
+extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
+                                                 size_t name_len));
+
+/* Lookup a locale dependent file.
+   *L10NFILE_LIST denotes a pool of lookup results of locale dependent
+   files of the same kind, sorted in decreasing order of ->filename.
+   DIRLIST and DIRLIST_LEN are an argz list of directories in which to
+   look, containing at least one directory (i.e. DIRLIST_LEN > 0).
+   MASK, LANGUAGE, TERRITORY, CODESET, NORMALIZED_CODESET, MODIFIER,
+   SPECIAL, SPONSOR, REVISION are the pieces of the locale name, as
+   produced by _nl_explode_name().  FILENAME is the filename suffix.
+   The return value is the lookup result, either found in *L10NFILE_LIST,
+   or - if DO_ALLOCATE is nonzero - freshly allocated, or possibly NULL.
+   If the return value is non-NULL, it is added to *L10NFILE_LIST, and
+   its ->next field denotes the chaining inside *L10NFILE_LIST, and
+   furthermore its ->successor[] field contains a list of other lookup
+   results from which this lookup result inherits.  */
+extern struct loaded_l10nfile *
+_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
+                           const char *dirlist, size_t dirlist_len, int mask,
+                           const char *language, const char *territory,
+                           const char *codeset,
+                           const char *normalized_codeset,
+                           const char *modifier, const char *special,
+                           const char *sponsor, const char *revision,
+                           const char *filename, int do_allocate));
+
+/* Lookup the real locale name for a locale alias NAME, or NULL if
+   NAME is not a locale alias (but possibly a real locale name).
+   The return value is statically allocated and must not be freed.  */
+extern const char *_nl_expand_alias PARAMS ((const char *name));
+
+/* Split a locale name NAME into its pieces: language, modifier,
+   territory, codeset, special, sponsor, revision.
+   NAME gets destructively modified: NUL bytes are inserted here and
+   there.  *LANGUAGE gets assigned NAME.  Each of *MODIFIER, *TERRITORY,
+   *CODESET, *SPECIAL, *SPONSOR, *REVISION gets assigned either a
+   pointer into the old NAME string, or NULL.  *NORMALIZED_CODESET
+   gets assigned the expanded *CODESET, if it is different from *CODESET;
+   this one is dynamically allocated and has to be freed by the caller.
+   The return value is a bitmask, where each bit corresponds to one
+   filled-in value:
+     XPG_MODIFIER, CEN_AUDIENCE  for *MODIFIER,
+     TERRITORY                   for *TERRITORY,
+     XPG_CODESET                 for *CODESET,
+     XPG_NORM_CODESET            for *NORMALIZED_CODESET,
+     CEN_SPECIAL                 for *SPECIAL,
+     CEN_SPONSOR                 for *SPONSOR,
+     CEN_REVISION                for *REVISION.
+ */
+extern int _nl_explode_name PARAMS ((char *name, const char **language,
+                                    const char **modifier,
+                                    const char **territory,
+                                    const char **codeset,
+                                    const char **normalized_codeset,
+                                    const char **special,
+                                    const char **sponsor,
+                                    const char **revision));
+
+/* Split a locale name NAME into a leading language part and all the
+   rest.  Return a pointer to the first character after the language,
+   i.e. to the first byte of the rest.  */
+extern char *_nl_find_language PARAMS ((const char *name));
+
+#endif /* loadinfo.h */
diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c
new file mode 100644 (file)
index 0000000..516f521
--- /dev/null
@@ -0,0 +1,1316 @@
+/* Load needed message catalogs.
+   Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
+   This must come before <config.h> because <config.h> may include
+   <features.h>, and once <features.h> has been included, it's too late.  */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE    1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#else
+# if defined HAVE_ALLOCA_H || defined _LIBC
+#  include <alloca.h>
+# else
+#  ifdef _AIX
+ #pragma alloca
+#  else
+#   ifndef alloca
+char *alloca ();
+#   endif
+#  endif
+# endif
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#ifdef _LIBC
+# include <langinfo.h>
+# include <locale.h>
+#endif
+
+#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
+    || (defined _LIBC && defined _POSIX_MAPPED_FILES)
+# include <sys/mman.h>
+# undef HAVE_MMAP
+# define HAVE_MMAP     1
+#else
+# undef HAVE_MMAP
+#endif
+
+#if defined HAVE_STDINT_H_WITH_UINTMAX || defined _LIBC
+# include <stdint.h>
+#endif
+#if defined HAVE_INTTYPES_H || defined _LIBC
+# include <inttypes.h>
+#endif
+
+#include "gmo.h"
+#include "gettextP.h"
+#include "hash-string.h"
+#include "plural-exp.h"
+
+#ifdef _LIBC
+# include "../locale/localeinfo.h"
+#endif
+
+/* Provide fallback values for macros that ought to be defined in <inttypes.h>.
+   Note that our fallback values need not be literal strings, because we don't
+   use them with preprocessor string concatenation.  */
+#if !defined PRId8 || PRI_MACROS_BROKEN
+# undef PRId8
+# define PRId8 "d"
+#endif
+#if !defined PRIi8 || PRI_MACROS_BROKEN
+# undef PRIi8
+# define PRIi8 "i"
+#endif
+#if !defined PRIo8 || PRI_MACROS_BROKEN
+# undef PRIo8
+# define PRIo8 "o"
+#endif
+#if !defined PRIu8 || PRI_MACROS_BROKEN
+# undef PRIu8
+# define PRIu8 "u"
+#endif
+#if !defined PRIx8 || PRI_MACROS_BROKEN
+# undef PRIx8
+# define PRIx8 "x"
+#endif
+#if !defined PRIX8 || PRI_MACROS_BROKEN
+# undef PRIX8
+# define PRIX8 "X"
+#endif
+#if !defined PRId16 || PRI_MACROS_BROKEN
+# undef PRId16
+# define PRId16 "d"
+#endif
+#if !defined PRIi16 || PRI_MACROS_BROKEN
+# undef PRIi16
+# define PRIi16 "i"
+#endif
+#if !defined PRIo16 || PRI_MACROS_BROKEN
+# undef PRIo16
+# define PRIo16 "o"
+#endif
+#if !defined PRIu16 || PRI_MACROS_BROKEN
+# undef PRIu16
+# define PRIu16 "u"
+#endif
+#if !defined PRIx16 || PRI_MACROS_BROKEN
+# undef PRIx16
+# define PRIx16 "x"
+#endif
+#if !defined PRIX16 || PRI_MACROS_BROKEN
+# undef PRIX16
+# define PRIX16 "X"
+#endif
+#if !defined PRId32 || PRI_MACROS_BROKEN
+# undef PRId32
+# define PRId32 "d"
+#endif
+#if !defined PRIi32 || PRI_MACROS_BROKEN
+# undef PRIi32
+# define PRIi32 "i"
+#endif
+#if !defined PRIo32 || PRI_MACROS_BROKEN
+# undef PRIo32
+# define PRIo32 "o"
+#endif
+#if !defined PRIu32 || PRI_MACROS_BROKEN
+# undef PRIu32
+# define PRIu32 "u"
+#endif
+#if !defined PRIx32 || PRI_MACROS_BROKEN
+# undef PRIx32
+# define PRIx32 "x"
+#endif
+#if !defined PRIX32 || PRI_MACROS_BROKEN
+# undef PRIX32
+# define PRIX32 "X"
+#endif
+#if !defined PRId64 || PRI_MACROS_BROKEN
+# undef PRId64
+# define PRId64 (sizeof (long) == 8 ? "ld" : "lld")
+#endif
+#if !defined PRIi64 || PRI_MACROS_BROKEN
+# undef PRIi64
+# define PRIi64 (sizeof (long) == 8 ? "li" : "lli")
+#endif
+#if !defined PRIo64 || PRI_MACROS_BROKEN
+# undef PRIo64
+# define PRIo64 (sizeof (long) == 8 ? "lo" : "llo")
+#endif
+#if !defined PRIu64 || PRI_MACROS_BROKEN
+# undef PRIu64
+# define PRIu64 (sizeof (long) == 8 ? "lu" : "llu")
+#endif
+#if !defined PRIx64 || PRI_MACROS_BROKEN
+# undef PRIx64
+# define PRIx64 (sizeof (long) == 8 ? "lx" : "llx")
+#endif
+#if !defined PRIX64 || PRI_MACROS_BROKEN
+# undef PRIX64
+# define PRIX64 (sizeof (long) == 8 ? "lX" : "llX")
+#endif
+#if !defined PRIdLEAST8 || PRI_MACROS_BROKEN
+# undef PRIdLEAST8
+# define PRIdLEAST8 "d"
+#endif
+#if !defined PRIiLEAST8 || PRI_MACROS_BROKEN
+# undef PRIiLEAST8
+# define PRIiLEAST8 "i"
+#endif
+#if !defined PRIoLEAST8 || PRI_MACROS_BROKEN
+# undef PRIoLEAST8
+# define PRIoLEAST8 "o"
+#endif
+#if !defined PRIuLEAST8 || PRI_MACROS_BROKEN
+# undef PRIuLEAST8
+# define PRIuLEAST8 "u"
+#endif
+#if !defined PRIxLEAST8 || PRI_MACROS_BROKEN
+# undef PRIxLEAST8
+# define PRIxLEAST8 "x"
+#endif
+#if !defined PRIXLEAST8 || PRI_MACROS_BROKEN
+# undef PRIXLEAST8
+# define PRIXLEAST8 "X"
+#endif
+#if !defined PRIdLEAST16 || PRI_MACROS_BROKEN
+# undef PRIdLEAST16
+# define PRIdLEAST16 "d"
+#endif
+#if !defined PRIiLEAST16 || PRI_MACROS_BROKEN
+# undef PRIiLEAST16
+# define PRIiLEAST16 "i"
+#endif
+#if !defined PRIoLEAST16 || PRI_MACROS_BROKEN
+# undef PRIoLEAST16
+# define PRIoLEAST16 "o"
+#endif
+#if !defined PRIuLEAST16 || PRI_MACROS_BROKEN
+# undef PRIuLEAST16
+# define PRIuLEAST16 "u"
+#endif
+#if !defined PRIxLEAST16 || PRI_MACROS_BROKEN
+# undef PRIxLEAST16
+# define PRIxLEAST16 "x"
+#endif
+#if !defined PRIXLEAST16 || PRI_MACROS_BROKEN
+# undef PRIXLEAST16
+# define PRIXLEAST16 "X"
+#endif
+#if !defined PRIdLEAST32 || PRI_MACROS_BROKEN
+# undef PRIdLEAST32
+# define PRIdLEAST32 "d"
+#endif
+#if !defined PRIiLEAST32 || PRI_MACROS_BROKEN
+# undef PRIiLEAST32
+# define PRIiLEAST32 "i"
+#endif
+#if !defined PRIoLEAST32 || PRI_MACROS_BROKEN
+# undef PRIoLEAST32
+# define PRIoLEAST32 "o"
+#endif
+#if !defined PRIuLEAST32 || PRI_MACROS_BROKEN
+# undef PRIuLEAST32
+# define PRIuLEAST32 "u"
+#endif
+#if !defined PRIxLEAST32 || PRI_MACROS_BROKEN
+# undef PRIxLEAST32
+# define PRIxLEAST32 "x"
+#endif
+#if !defined PRIXLEAST32 || PRI_MACROS_BROKEN
+# undef PRIXLEAST32
+# define PRIXLEAST32 "X"
+#endif
+#if !defined PRIdLEAST64 || PRI_MACROS_BROKEN
+# undef PRIdLEAST64
+# define PRIdLEAST64 PRId64
+#endif
+#if !defined PRIiLEAST64 || PRI_MACROS_BROKEN
+# undef PRIiLEAST64
+# define PRIiLEAST64 PRIi64
+#endif
+#if !defined PRIoLEAST64 || PRI_MACROS_BROKEN
+# undef PRIoLEAST64
+# define PRIoLEAST64 PRIo64
+#endif
+#if !defined PRIuLEAST64 || PRI_MACROS_BROKEN
+# undef PRIuLEAST64
+# define PRIuLEAST64 PRIu64
+#endif
+#if !defined PRIxLEAST64 || PRI_MACROS_BROKEN
+# undef PRIxLEAST64
+# define PRIxLEAST64 PRIx64
+#endif
+#if !defined PRIXLEAST64 || PRI_MACROS_BROKEN
+# undef PRIXLEAST64
+# define PRIXLEAST64 PRIX64
+#endif
+#if !defined PRIdFAST8 || PRI_MACROS_BROKEN
+# undef PRIdFAST8
+# define PRIdFAST8 "d"
+#endif
+#if !defined PRIiFAST8 || PRI_MACROS_BROKEN
+# undef PRIiFAST8
+# define PRIiFAST8 "i"
+#endif
+#if !defined PRIoFAST8 || PRI_MACROS_BROKEN
+# undef PRIoFAST8
+# define PRIoFAST8 "o"
+#endif
+#if !defined PRIuFAST8 || PRI_MACROS_BROKEN
+# undef PRIuFAST8
+# define PRIuFAST8 "u"
+#endif
+#if !defined PRIxFAST8 || PRI_MACROS_BROKEN
+# undef PRIxFAST8
+# define PRIxFAST8 "x"
+#endif
+#if !defined PRIXFAST8 || PRI_MACROS_BROKEN
+# undef PRIXFAST8
+# define PRIXFAST8 "X"
+#endif
+#if !defined PRIdFAST16 || PRI_MACROS_BROKEN
+# undef PRIdFAST16
+# define PRIdFAST16 "d"
+#endif
+#if !defined PRIiFAST16 || PRI_MACROS_BROKEN
+# undef PRIiFAST16
+# define PRIiFAST16 "i"
+#endif
+#if !defined PRIoFAST16 || PRI_MACROS_BROKEN
+# undef PRIoFAST16
+# define PRIoFAST16 "o"
+#endif
+#if !defined PRIuFAST16 || PRI_MACROS_BROKEN
+# undef PRIuFAST16
+# define PRIuFAST16 "u"
+#endif
+#if !defined PRIxFAST16 || PRI_MACROS_BROKEN
+# undef PRIxFAST16
+# define PRIxFAST16 "x"
+#endif
+#if !defined PRIXFAST16 || PRI_MACROS_BROKEN
+# undef PRIXFAST16
+# define PRIXFAST16 "X"
+#endif
+#if !defined PRIdFAST32 || PRI_MACROS_BROKEN
+# undef PRIdFAST32
+# define PRIdFAST32 "d"
+#endif
+#if !defined PRIiFAST32 || PRI_MACROS_BROKEN
+# undef PRIiFAST32
+# define PRIiFAST32 "i"
+#endif
+#if !defined PRIoFAST32 || PRI_MACROS_BROKEN
+# undef PRIoFAST32
+# define PRIoFAST32 "o"
+#endif
+#if !defined PRIuFAST32 || PRI_MACROS_BROKEN
+# undef PRIuFAST32
+# define PRIuFAST32 "u"
+#endif
+#if !defined PRIxFAST32 || PRI_MACROS_BROKEN
+# undef PRIxFAST32
+# define PRIxFAST32 "x"
+#endif
+#if !defined PRIXFAST32 || PRI_MACROS_BROKEN
+# undef PRIXFAST32
+# define PRIXFAST32 "X"
+#endif
+#if !defined PRIdFAST64 || PRI_MACROS_BROKEN
+# undef PRIdFAST64
+# define PRIdFAST64 PRId64
+#endif
+#if !defined PRIiFAST64 || PRI_MACROS_BROKEN
+# undef PRIiFAST64
+# define PRIiFAST64 PRIi64
+#endif
+#if !defined PRIoFAST64 || PRI_MACROS_BROKEN
+# undef PRIoFAST64
+# define PRIoFAST64 PRIo64
+#endif
+#if !defined PRIuFAST64 || PRI_MACROS_BROKEN
+# undef PRIuFAST64
+# define PRIuFAST64 PRIu64
+#endif
+#if !defined PRIxFAST64 || PRI_MACROS_BROKEN
+# undef PRIxFAST64
+# define PRIxFAST64 PRIx64
+#endif
+#if !defined PRIXFAST64 || PRI_MACROS_BROKEN
+# undef PRIXFAST64
+# define PRIXFAST64 PRIX64
+#endif
+#if !defined PRIdMAX || PRI_MACROS_BROKEN
+# undef PRIdMAX
+# define PRIdMAX (sizeof (uintmax_t) == sizeof (long) ? "ld" : "lld")
+#endif
+#if !defined PRIiMAX || PRI_MACROS_BROKEN
+# undef PRIiMAX
+# define PRIiMAX (sizeof (uintmax_t) == sizeof (long) ? "li" : "lli")
+#endif
+#if !defined PRIoMAX || PRI_MACROS_BROKEN
+# undef PRIoMAX
+# define PRIoMAX (sizeof (uintmax_t) == sizeof (long) ? "lo" : "llo")
+#endif
+#if !defined PRIuMAX || PRI_MACROS_BROKEN
+# undef PRIuMAX
+# define PRIuMAX (sizeof (uintmax_t) == sizeof (long) ? "lu" : "llu")
+#endif
+#if !defined PRIxMAX || PRI_MACROS_BROKEN
+# undef PRIxMAX
+# define PRIxMAX (sizeof (uintmax_t) == sizeof (long) ? "lx" : "llx")
+#endif
+#if !defined PRIXMAX || PRI_MACROS_BROKEN
+# undef PRIXMAX
+# define PRIXMAX (sizeof (uintmax_t) == sizeof (long) ? "lX" : "llX")
+#endif
+#if !defined PRIdPTR || PRI_MACROS_BROKEN
+# undef PRIdPTR
+# define PRIdPTR \
+  (sizeof (void *) == sizeof (long) ? "ld" : \
+   sizeof (void *) == sizeof (int) ? "d" : \
+   "lld")
+#endif
+#if !defined PRIiPTR || PRI_MACROS_BROKEN
+# undef PRIiPTR
+# define PRIiPTR \
+  (sizeof (void *) == sizeof (long) ? "li" : \
+   sizeof (void *) == sizeof (int) ? "i" : \
+   "lli")
+#endif
+#if !defined PRIoPTR || PRI_MACROS_BROKEN
+# undef PRIoPTR
+# define PRIoPTR \
+  (sizeof (void *) == sizeof (long) ? "lo" : \
+   sizeof (void *) == sizeof (int) ? "o" : \
+   "llo")
+#endif
+#if !defined PRIuPTR || PRI_MACROS_BROKEN
+# undef PRIuPTR
+# define PRIuPTR \
+  (sizeof (void *) == sizeof (long) ? "lu" : \
+   sizeof (void *) == sizeof (int) ? "u" : \
+   "llu")
+#endif
+#if !defined PRIxPTR || PRI_MACROS_BROKEN
+# undef PRIxPTR
+# define PRIxPTR \
+  (sizeof (void *) == sizeof (long) ? "lx" : \
+   sizeof (void *) == sizeof (int) ? "x" : \
+   "llx")
+#endif
+#if !defined PRIXPTR || PRI_MACROS_BROKEN
+# undef PRIXPTR
+# define PRIXPTR \
+  (sizeof (void *) == sizeof (long) ? "lX" : \
+   sizeof (void *) == sizeof (int) ? "X" : \
+   "llX")
+#endif
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ISO C functions.  This is required by the standard
+   because some ISO C functions will require linking with this object
+   file and the name space must not be polluted.  */
+# define open   __open
+# define close  __close
+# define read   __read
+# define mmap   __mmap
+# define munmap __munmap
+#endif
+
+/* For those losing systems which don't have `alloca' we have to add
+   some additional code emulating it.  */
+#ifdef HAVE_ALLOCA
+# define freea(p) /* nothing */
+#else
+# define alloca(n) malloc (n)
+# define freea(p) free (p)
+#endif
+
+/* For systems that distinguish between text and binary I/O.
+   O_BINARY is usually declared in <fcntl.h>. */
+#if !defined O_BINARY && defined _O_BINARY
+  /* For MSC-compatible compilers.  */
+# define O_BINARY _O_BINARY
+# define O_TEXT _O_TEXT
+#endif
+#ifdef __BEOS__
+  /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect.  */
+# undef O_BINARY
+# undef O_TEXT
+#endif
+/* On reasonable systems, binary I/O is the default.  */
+#ifndef O_BINARY
+# define O_BINARY 0
+#endif
+
+
+/* Prototypes for local functions.  Needed to ensure compiler checking of
+   function argument counts despite of K&R C function definition syntax.  */
+static const char *get_sysdep_segment_value PARAMS ((const char *name));
+
+
+/* We need a sign, whether a new catalog was loaded, which can be associated
+   with all translations.  This is important if the translations are
+   cached by one of GCC's features.  */
+int _nl_msg_cat_cntr;
+
+
+/* Expand a system dependent string segment.  Return NULL if unsupported.  */
+static const char *
+get_sysdep_segment_value (name)
+     const char *name;
+{
+  /* Test for an ISO C 99 section 7.8.1 format string directive.
+     Syntax:
+     P R I { d | i | o | u | x | X }
+     { { | LEAST | FAST } { 8 | 16 | 32 | 64 } | MAX | PTR }  */
+  /* We don't use a table of 14 times 6 'const char *' strings here, because
+     data relocations cost startup time.  */
+  if (name[0] == 'P' && name[1] == 'R' && name[2] == 'I')
+    {
+      if (name[3] == 'd' || name[3] == 'i' || name[3] == 'o' || name[3] == 'u'
+         || name[3] == 'x' || name[3] == 'X')
+       {
+         if (name[4] == '8' && name[5] == '\0')
+           {
+             if (name[3] == 'd')
+               return PRId8;
+             if (name[3] == 'i')
+               return PRIi8;
+             if (name[3] == 'o')
+               return PRIo8;
+             if (name[3] == 'u')
+               return PRIu8;
+             if (name[3] == 'x')
+               return PRIx8;
+             if (name[3] == 'X')
+               return PRIX8;
+             abort ();
+           }
+         if (name[4] == '1' && name[5] == '6' && name[6] == '\0')
+           {
+             if (name[3] == 'd')
+               return PRId16;
+             if (name[3] == 'i')
+               return PRIi16;
+             if (name[3] == 'o')
+               return PRIo16;
+             if (name[3] == 'u')
+               return PRIu16;
+             if (name[3] == 'x')
+               return PRIx16;
+             if (name[3] == 'X')
+               return PRIX16;
+             abort ();
+           }
+         if (name[4] == '3' && name[5] == '2' && name[6] == '\0')
+           {
+             if (name[3] == 'd')
+               return PRId32;
+             if (name[3] == 'i')
+               return PRIi32;
+             if (name[3] == 'o')
+               return PRIo32;
+             if (name[3] == 'u')
+               return PRIu32;
+             if (name[3] == 'x')
+               return PRIx32;
+             if (name[3] == 'X')
+               return PRIX32;
+             abort ();
+           }
+         if (name[4] == '6' && name[5] == '4' && name[6] == '\0')
+           {
+             if (name[3] == 'd')
+               return PRId64;
+             if (name[3] == 'i')
+               return PRIi64;
+             if (name[3] == 'o')
+               return PRIo64;
+             if (name[3] == 'u')
+               return PRIu64;
+             if (name[3] == 'x')
+               return PRIx64;
+             if (name[3] == 'X')
+               return PRIX64;
+             abort ();
+           }
+         if (name[4] == 'L' && name[5] == 'E' && name[6] == 'A'
+             && name[7] == 'S' && name[8] == 'T')
+           {
+             if (name[9] == '8' && name[10] == '\0')
+               {
+                 if (name[3] == 'd')
+                   return PRIdLEAST8;
+                 if (name[3] == 'i')
+                   return PRIiLEAST8;
+                 if (name[3] == 'o')
+                   return PRIoLEAST8;
+                 if (name[3] == 'u')
+                   return PRIuLEAST8;
+                 if (name[3] == 'x')
+                   return PRIxLEAST8;
+                 if (name[3] == 'X')
+                   return PRIXLEAST8;
+                 abort ();
+               }
+             if (name[9] == '1' && name[10] == '6' && name[11] == '\0')
+               {
+                 if (name[3] == 'd')
+                   return PRIdLEAST16;
+                 if (name[3] == 'i')
+                   return PRIiLEAST16;
+                 if (name[3] == 'o')
+                   return PRIoLEAST16;
+                 if (name[3] == 'u')
+                   return PRIuLEAST16;
+                 if (name[3] == 'x')
+                   return PRIxLEAST16;
+                 if (name[3] == 'X')
+                   return PRIXLEAST16;
+                 abort ();
+               }
+             if (name[9] == '3' && name[10] == '2' && name[11] == '\0')
+               {
+                 if (name[3] == 'd')
+                   return PRIdLEAST32;
+                 if (name[3] == 'i')
+                   return PRIiLEAST32;
+                 if (name[3] == 'o')
+                   return PRIoLEAST32;
+                 if (name[3] == 'u')
+                   return PRIuLEAST32;
+                 if (name[3] == 'x')
+                   return PRIxLEAST32;
+                 if (name[3] == 'X')
+                   return PRIXLEAST32;
+                 abort ();
+               }
+             if (name[9] == '6' && name[10] == '4' && name[11] == '\0')
+               {
+                 if (name[3] == 'd')
+                   return PRIdLEAST64;
+                 if (name[3] == 'i')
+                   return PRIiLEAST64;
+                 if (name[3] == 'o')
+                   return PRIoLEAST64;
+                 if (name[3] == 'u')
+                   return PRIuLEAST64;
+                 if (name[3] == 'x')
+                   return PRIxLEAST64;
+                 if (name[3] == 'X')
+                   return PRIXLEAST64;
+                 abort ();
+               }
+           }
+         if (name[4] == 'F' && name[5] == 'A' && name[6] == 'S'
+             && name[7] == 'T')
+           {
+             if (name[8] == '8' && name[9] == '\0')
+               {
+                 if (name[3] == 'd')
+                   return PRIdFAST8;
+                 if (name[3] == 'i')
+                   return PRIiFAST8;
+                 if (name[3] == 'o')
+                   return PRIoFAST8;
+                 if (name[3] == 'u')
+                   return PRIuFAST8;
+                 if (name[3] == 'x')
+                   return PRIxFAST8;
+                 if (name[3] == 'X')
+                   return PRIXFAST8;
+                 abort ();
+               }
+             if (name[8] == '1' && name[9] == '6' && name[10] == '\0')
+               {
+                 if (name[3] == 'd')
+                   return PRIdFAST16;
+                 if (name[3] == 'i')
+                   return PRIiFAST16;
+                 if (name[3] == 'o')
+                   return PRIoFAST16;
+                 if (name[3] == 'u')
+                   return PRIuFAST16;
+                 if (name[3] == 'x')
+                   return PRIxFAST16;
+                 if (name[3] == 'X')
+                   return PRIXFAST16;
+                 abort ();
+               }
+             if (name[8] == '3' && name[9] == '2' && name[10] == '\0')
+               {
+                 if (name[3] == 'd')
+                   return PRIdFAST32;
+                 if (name[3] == 'i')
+                   return PRIiFAST32;
+                 if (name[3] == 'o')
+                   return PRIoFAST32;
+                 if (name[3] == 'u')
+                   return PRIuFAST32;
+                 if (name[3] == 'x')
+                   return PRIxFAST32;
+                 if (name[3] == 'X')
+                   return PRIXFAST32;
+                 abort ();
+               }
+             if (name[8] == '6' && name[9] == '4' && name[10] == '\0')
+               {
+                 if (name[3] == 'd')
+                   return PRIdFAST64;
+                 if (name[3] == 'i')
+                   return PRIiFAST64;
+                 if (name[3] == 'o')
+                   return PRIoFAST64;
+                 if (name[3] == 'u')
+                   return PRIuFAST64;
+                 if (name[3] == 'x')
+                   return PRIxFAST64;
+                 if (name[3] == 'X')
+                   return PRIXFAST64;
+                 abort ();
+               }
+           }
+         if (name[4] == 'M' && name[5] == 'A' && name[6] == 'X'
+             && name[7] == '\0')
+           {
+             if (name[3] == 'd')
+               return PRIdMAX;
+             if (name[3] == 'i')
+               return PRIiMAX;
+             if (name[3] == 'o')
+               return PRIoMAX;
+             if (name[3] == 'u')
+               return PRIuMAX;
+             if (name[3] == 'x')
+               return PRIxMAX;
+             if (name[3] == 'X')
+               return PRIXMAX;
+             abort ();
+           }
+         if (name[4] == 'P' && name[5] == 'T' && name[6] == 'R'
+             && name[7] == '\0')
+           {
+             if (name[3] == 'd')
+               return PRIdPTR;
+             if (name[3] == 'i')
+               return PRIiPTR;
+             if (name[3] == 'o')
+               return PRIoPTR;
+             if (name[3] == 'u')
+               return PRIuPTR;
+             if (name[3] == 'x')
+               return PRIxPTR;
+             if (name[3] == 'X')
+               return PRIXPTR;
+             abort ();
+           }
+       }
+    }
+  /* Other system dependent strings are not valid.  */
+  return NULL;
+}
+
+/* Initialize the codeset dependent parts of an opened message catalog.
+   Return the header entry.  */
+const char *
+internal_function
+_nl_init_domain_conv (domain_file, domain, domainbinding)
+     struct loaded_l10nfile *domain_file;
+     struct loaded_domain *domain;
+     struct binding *domainbinding;
+{
+  /* Find out about the character set the file is encoded with.
+     This can be found (in textual form) in the entry "".  If this
+     entry does not exist or if this does not contain the `charset='
+     information, we will assume the charset matches the one the
+     current locale and we don't have to perform any conversion.  */
+  char *nullentry;
+  size_t nullentrylen;
+
+  /* Preinitialize fields, to avoid recursion during _nl_find_msg.  */
+  domain->codeset_cntr =
+    (domainbinding != NULL ? domainbinding->codeset_cntr : 0);
+#ifdef _LIBC
+  domain->conv = (__gconv_t) -1;
+#else
+# if HAVE_ICONV
+  domain->conv = (iconv_t) -1;
+# endif
+#endif
+  domain->conv_tab = NULL;
+
+  /* Get the header entry.  */
+  nullentry = _nl_find_msg (domain_file, domainbinding, "", &nullentrylen);
+
+  if (nullentry != NULL)
+    {
+#if defined _LIBC || HAVE_ICONV
+      const char *charsetstr;
+
+      charsetstr = strstr (nullentry, "charset=");
+      if (charsetstr != NULL)
+       {
+         size_t len;
+         char *charset;
+         const char *outcharset;
+
+         charsetstr += strlen ("charset=");
+         len = strcspn (charsetstr, " \t\n");
+
+         charset = (char *) alloca (len + 1);
+# if defined _LIBC || HAVE_MEMPCPY
+         *((char *) mempcpy (charset, charsetstr, len)) = '\0';
+# else
+         memcpy (charset, charsetstr, len);
+         charset[len] = '\0';
+# endif
+
+         /* The output charset should normally be determined by the
+            locale.  But sometimes the locale is not used or not correctly
+            set up, so we provide a possibility for the user to override
+            this.  Moreover, the value specified through
+            bind_textdomain_codeset overrides both.  */
+         if (domainbinding != NULL && domainbinding->codeset != NULL)
+           outcharset = domainbinding->codeset;
+         else
+           {
+             outcharset = getenv ("OUTPUT_CHARSET");
+             if (outcharset == NULL || outcharset[0] == '\0')
+               {
+# ifdef _LIBC
+                 outcharset = (*_nl_current[LC_CTYPE])->values[_NL_ITEM_INDEX (CODESET)].string;
+# else
+#  if HAVE_ICONV
+                 extern const char *locale_charset PARAMS ((void));
+                 outcharset = locale_charset ();
+#  endif
+# endif
+               }
+           }
+
+# ifdef _LIBC
+         /* We always want to use transliteration.  */
+         outcharset = norm_add_slashes (outcharset, "TRANSLIT");
+         charset = norm_add_slashes (charset, NULL);
+         if (__gconv_open (outcharset, charset, &domain->conv,
+                           GCONV_AVOID_NOCONV)
+             != __GCONV_OK)
+           domain->conv = (__gconv_t) -1;
+# else
+#  if HAVE_ICONV
+         /* When using GNU libc >= 2.2 or GNU libiconv >= 1.5,
+            we want to use transliteration.  */
+#   if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \
+       || _LIBICONV_VERSION >= 0x0105
+         if (strchr (outcharset, '/') == NULL)
+           {
+             char *tmp;
+
+             len = strlen (outcharset);
+             tmp = (char *) alloca (len + 10 + 1);
+             memcpy (tmp, outcharset, len);
+             memcpy (tmp + len, "//TRANSLIT", 10 + 1);
+             outcharset = tmp;
+
+             domain->conv = iconv_open (outcharset, charset);
+
+             freea (outcharset);
+           }
+         else
+#   endif
+           domain->conv = iconv_open (outcharset, charset);
+#  endif
+# endif
+
+         freea (charset);
+       }
+#endif /* _LIBC || HAVE_ICONV */
+    }
+
+  return nullentry;
+}
+
+/* Frees the codeset dependent parts of an opened message catalog.  */
+void
+internal_function
+_nl_free_domain_conv (domain)
+     struct loaded_domain *domain;
+{
+  if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1)
+    free (domain->conv_tab);
+
+#ifdef _LIBC
+  if (domain->conv != (__gconv_t) -1)
+    __gconv_close (domain->conv);
+#else
+# if HAVE_ICONV
+  if (domain->conv != (iconv_t) -1)
+    iconv_close (domain->conv);
+# endif
+#endif
+}
+
+/* Load the message catalogs specified by FILENAME.  If it is no valid
+   message catalog do nothing.  */
+void
+internal_function
+_nl_load_domain (domain_file, domainbinding)
+     struct loaded_l10nfile *domain_file;
+     struct binding *domainbinding;
+{
+  int fd;
+  size_t size;
+#ifdef _LIBC
+  struct stat64 st;
+#else
+  struct stat st;
+#endif
+  struct mo_file_header *data = (struct mo_file_header *) -1;
+  int use_mmap = 0;
+  struct loaded_domain *domain;
+  int revision;
+  const char *nullentry;
+
+  domain_file->decided = 1;
+  domain_file->data = NULL;
+
+  /* Note that it would be useless to store domainbinding in domain_file
+     because domainbinding might be == NULL now but != NULL later (after
+     a call to bind_textdomain_codeset).  */
+
+  /* If the record does not represent a valid locale the FILENAME
+     might be NULL.  This can happen when according to the given
+     specification the locale file name is different for XPG and CEN
+     syntax.  */
+  if (domain_file->filename == NULL)
+    return;
+
+  /* Try to open the addressed file.  */
+  fd = open (domain_file->filename, O_RDONLY | O_BINARY);
+  if (fd == -1)
+    return;
+
+  /* We must know about the size of the file.  */
+  if (
+#ifdef _LIBC
+      __builtin_expect (fstat64 (fd, &st) != 0, 0)
+#else
+      __builtin_expect (fstat (fd, &st) != 0, 0)
+#endif
+      || __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0)
+      || __builtin_expect (size < sizeof (struct mo_file_header), 0))
+    {
+      /* Something went wrong.  */
+      close (fd);
+      return;
+    }
+
+#ifdef HAVE_MMAP
+  /* Now we are ready to load the file.  If mmap() is available we try
+     this first.  If not available or it failed we try to load it.  */
+  data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
+                                        MAP_PRIVATE, fd, 0);
+
+  if (__builtin_expect (data != (struct mo_file_header *) -1, 1))
+    {
+      /* mmap() call was successful.  */
+      close (fd);
+      use_mmap = 1;
+    }
+#endif
+
+  /* If the data is not yet available (i.e. mmap'ed) we try to load
+     it manually.  */
+  if (data == (struct mo_file_header *) -1)
+    {
+      size_t to_read;
+      char *read_ptr;
+
+      data = (struct mo_file_header *) malloc (size);
+      if (data == NULL)
+       return;
+
+      to_read = size;
+      read_ptr = (char *) data;
+      do
+       {
+         long int nb = (long int) read (fd, read_ptr, to_read);
+         if (nb <= 0)
+           {
+#ifdef EINTR
+             if (nb == -1 && errno == EINTR)
+               continue;
+#endif
+             close (fd);
+             return;
+           }
+         read_ptr += nb;
+         to_read -= nb;
+       }
+      while (to_read > 0);
+
+      close (fd);
+    }
+
+  /* Using the magic number we can test whether it really is a message
+     catalog file.  */
+  if (__builtin_expect (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED,
+                       0))
+    {
+      /* The magic number is wrong: not a message catalog file.  */
+#ifdef HAVE_MMAP
+      if (use_mmap)
+       munmap ((caddr_t) data, size);
+      else
+#endif
+       free (data);
+      return;
+    }
+
+  domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
+  if (domain == NULL)
+    return;
+  domain_file->data = domain;
+
+  domain->data = (char *) data;
+  domain->use_mmap = use_mmap;
+  domain->mmap_size = size;
+  domain->must_swap = data->magic != _MAGIC;
+  domain->malloced = NULL;
+
+  /* Fill in the information about the available tables.  */
+  revision = W (domain->must_swap, data->revision);
+  /* We support only the major revision 0.  */
+  switch (revision >> 16)
+    {
+    case 0:
+      domain->nstrings = W (domain->must_swap, data->nstrings);
+      domain->orig_tab = (const struct string_desc *)
+       ((char *) data + W (domain->must_swap, data->orig_tab_offset));
+      domain->trans_tab = (const struct string_desc *)
+       ((char *) data + W (domain->must_swap, data->trans_tab_offset));
+      domain->hash_size = W (domain->must_swap, data->hash_tab_size);
+      domain->hash_tab =
+       (domain->hash_size > 2
+        ? (const nls_uint32 *)
+          ((char *) data + W (domain->must_swap, data->hash_tab_offset))
+        : NULL);
+      domain->must_swap_hash_tab = domain->must_swap;
+
+      /* Now dispatch on the minor revision.  */
+      switch (revision & 0xffff)
+       {
+       case 0:
+         domain->n_sysdep_strings = 0;
+         domain->orig_sysdep_tab = NULL;
+         domain->trans_sysdep_tab = NULL;
+         break;
+       case 1:
+       default:
+         {
+           nls_uint32 n_sysdep_strings;
+
+           if (domain->hash_tab == NULL)
+             /* This is invalid.  These minor revisions need a hash table.  */
+             goto invalid;
+
+           n_sysdep_strings =
+             W (domain->must_swap, data->n_sysdep_strings);
+           if (n_sysdep_strings > 0)
+             {
+               nls_uint32 n_sysdep_segments;
+               const struct sysdep_segment *sysdep_segments;
+               const char **sysdep_segment_values;
+               const nls_uint32 *orig_sysdep_tab;
+               const nls_uint32 *trans_sysdep_tab;
+               size_t memneed;
+               char *mem;
+               struct sysdep_string_desc *inmem_orig_sysdep_tab;
+               struct sysdep_string_desc *inmem_trans_sysdep_tab;
+               nls_uint32 *inmem_hash_tab;
+               unsigned int i;
+
+               /* Get the values of the system dependent segments.  */
+               n_sysdep_segments =
+                 W (domain->must_swap, data->n_sysdep_segments);
+               sysdep_segments = (const struct sysdep_segment *)
+                 ((char *) data
+                  + W (domain->must_swap, data->sysdep_segments_offset));
+               sysdep_segment_values =
+                 alloca (n_sysdep_segments * sizeof (const char *));
+               for (i = 0; i < n_sysdep_segments; i++)
+                 {
+                   const char *name =
+                     (char *) data
+                     + W (domain->must_swap, sysdep_segments[i].offset);
+                   nls_uint32 namelen =
+                     W (domain->must_swap, sysdep_segments[i].length);
+
+                   if (!(namelen > 0 && name[namelen - 1] == '\0'))
+                     {
+                       freea (sysdep_segment_values);
+                       goto invalid;
+                     }
+
+                   sysdep_segment_values[i] = get_sysdep_segment_value (name);
+                 }
+
+               orig_sysdep_tab = (const nls_uint32 *)
+                 ((char *) data
+                  + W (domain->must_swap, data->orig_sysdep_tab_offset));
+               trans_sysdep_tab = (const nls_uint32 *)
+                 ((char *) data
+                  + W (domain->must_swap, data->trans_sysdep_tab_offset));
+
+               /* Compute the amount of additional memory needed for the
+                  system dependent strings and the augmented hash table.  */
+               memneed = 2 * n_sysdep_strings
+                         * sizeof (struct sysdep_string_desc)
+                         + domain->hash_size * sizeof (nls_uint32);
+               for (i = 0; i < 2 * n_sysdep_strings; i++)
+                 {
+                   const struct sysdep_string *sysdep_string =
+                     (const struct sysdep_string *)
+                     ((char *) data
+                      + W (domain->must_swap,
+                           i < n_sysdep_strings
+                           ? orig_sysdep_tab[i]
+                           : trans_sysdep_tab[i - n_sysdep_strings]));
+                   size_t need = 0;
+                   const struct segment_pair *p = sysdep_string->segments;
+
+                   if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END)
+                     for (p = sysdep_string->segments;; p++)
+                       {
+                         nls_uint32 sysdepref;
+
+                         need += W (domain->must_swap, p->segsize);
+
+                         sysdepref = W (domain->must_swap, p->sysdepref);
+                         if (sysdepref == SEGMENTS_END)
+                           break;
+
+                         if (sysdepref >= n_sysdep_segments)
+                           {
+                             /* Invalid.  */
+                             freea (sysdep_segment_values);
+                             goto invalid;
+                           }
+
+                         need += strlen (sysdep_segment_values[sysdepref]);
+                       }
+
+                   memneed += need;
+                 }
+
+               /* Allocate additional memory.  */
+               mem = (char *) malloc (memneed);
+               if (mem == NULL)
+                 goto invalid;
+
+               domain->malloced = mem;
+               inmem_orig_sysdep_tab = (struct sysdep_string_desc *) mem;
+               mem += n_sysdep_strings * sizeof (struct sysdep_string_desc);
+               inmem_trans_sysdep_tab = (struct sysdep_string_desc *) mem;
+               mem += n_sysdep_strings * sizeof (struct sysdep_string_desc);
+               inmem_hash_tab = (nls_uint32 *) mem;
+               mem += domain->hash_size * sizeof (nls_uint32);
+
+               /* Compute the system dependent strings.  */
+               for (i = 0; i < 2 * n_sysdep_strings; i++)
+                 {
+                   const struct sysdep_string *sysdep_string =
+                     (const struct sysdep_string *)
+                     ((char *) data
+                      + W (domain->must_swap,
+                           i < n_sysdep_strings
+                           ? orig_sysdep_tab[i]
+                           : trans_sysdep_tab[i - n_sysdep_strings]));
+                   const char *static_segments =
+                     (char *) data
+                     + W (domain->must_swap, sysdep_string->offset);
+                   const struct segment_pair *p = sysdep_string->segments;
+
+                   /* Concatenate the segments, and fill
+                      inmem_orig_sysdep_tab[i] (for i < n_sysdep_strings) and
+                      inmem_trans_sysdep_tab[i-n_sysdep_strings] (for
+                      i >= n_sysdep_strings).  */
+
+                   if (W (domain->must_swap, p->sysdepref) == SEGMENTS_END)
+                     {
+                       /* Only one static segment.  */
+                       inmem_orig_sysdep_tab[i].length =
+                         W (domain->must_swap, p->segsize);
+                       inmem_orig_sysdep_tab[i].pointer = static_segments;
+                     }
+                   else
+                     {
+                       inmem_orig_sysdep_tab[i].pointer = mem;
+
+                       for (p = sysdep_string->segments;; p++)
+                         {
+                           nls_uint32 segsize =
+                             W (domain->must_swap, p->segsize);
+                           nls_uint32 sysdepref =
+                             W (domain->must_swap, p->sysdepref);
+                           size_t n;
+
+                           if (segsize > 0)
+                             {
+                               memcpy (mem, static_segments, segsize);
+                               mem += segsize;
+                               static_segments += segsize;
+                             }
+
+                           if (sysdepref == SEGMENTS_END)
+                             break;
+
+                           n = strlen (sysdep_segment_values[sysdepref]);
+                           memcpy (mem, sysdep_segment_values[sysdepref], n);
+                           mem += n;
+                         }
+
+                       inmem_orig_sysdep_tab[i].length =
+                         mem - inmem_orig_sysdep_tab[i].pointer;
+                     }
+                 }
+
+               /* Compute the augmented hash table.  */
+               for (i = 0; i < domain->hash_size; i++)
+                 inmem_hash_tab[i] =
+                   W (domain->must_swap_hash_tab, domain->hash_tab[i]);
+               for (i = 0; i < n_sysdep_strings; i++)
+                 {
+                   const char *msgid = inmem_orig_sysdep_tab[i].pointer;
+                   nls_uint32 hash_val = hash_string (msgid);
+                   nls_uint32 idx = hash_val % domain->hash_size;
+                   nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
+
+                   for (;;)
+                     {
+                       if (inmem_hash_tab[idx] == 0)
+                         {
+                           /* Hash table entry is empty.  Use it.  */
+                           inmem_hash_tab[idx] = 1 + domain->nstrings + i;
+                           break;
+                         }
+
+                       if (idx >= domain->hash_size - incr)
+                         idx -= domain->hash_size - incr;
+                       else
+                         idx += incr;
+                     }
+                 }
+
+               freea (sysdep_segment_values);
+
+               domain->n_sysdep_strings = n_sysdep_strings;
+               domain->orig_sysdep_tab = inmem_orig_sysdep_tab;
+               domain->trans_sysdep_tab = inmem_trans_sysdep_tab;
+
+               domain->hash_tab = inmem_hash_tab;
+               domain->must_swap_hash_tab = 0;
+             }
+           else
+             {
+               domain->n_sysdep_strings = 0;
+               domain->orig_sysdep_tab = NULL;
+               domain->trans_sysdep_tab = NULL;
+             }
+         }
+         break;
+       }
+      break;
+    default:
+      /* This is an invalid revision.  */
+    invalid:
+      /* This is an invalid .mo file.  */
+      if (domain->malloced)
+       free (domain->malloced);
+#ifdef HAVE_MMAP
+      if (use_mmap)
+       munmap ((caddr_t) data, size);
+      else
+#endif
+       free (data);
+      free (domain);
+      domain_file->data = NULL;
+      return;
+    }
+
+  /* Now initialize the character set converter from the character set
+     the file is encoded with (found in the header entry) to the domain's
+     specified character set or the locale's character set.  */
+  nullentry = _nl_init_domain_conv (domain_file, domain, domainbinding);
+
+  /* Also look for a plural specification.  */
+  EXTRACT_PLURAL_EXPRESSION (nullentry, &domain->plural, &domain->nplurals);
+}
+
+
+#ifdef _LIBC
+void
+internal_function
+_nl_unload_domain (domain)
+     struct loaded_domain *domain;
+{
+  if (domain->plural != &__gettext_germanic_plural)
+    __gettext_free_exp (domain->plural);
+
+  _nl_free_domain_conv (domain);
+
+  if (domain->malloced)
+    free (domain->malloced);
+
+# ifdef _POSIX_MAPPED_FILES
+  if (domain->use_mmap)
+    munmap ((caddr_t) domain->data, domain->mmap_size);
+  else
+# endif        /* _POSIX_MAPPED_FILES */
+    free ((void *) domain->data);
+
+  free (domain);
+}
+#endif
diff --git a/intl/localealias.c b/intl/localealias.c
new file mode 100644 (file)
index 0000000..456e41e
--- /dev/null
@@ -0,0 +1,419 @@
+/* Handle aliases for locale names.
+   Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
+   This must come before <config.h> because <config.h> may include
+   <features.h>, and once <features.h> has been included, it's too late.  */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE    1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <stdio.h>
+#if defined _LIBC || defined HAVE___FSETLOCKING
+# include <stdio_ext.h>
+#endif
+#include <sys/types.h>
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#else
+# if defined HAVE_ALLOCA_H || defined _LIBC
+#  include <alloca.h>
+# else
+#  ifdef _AIX
+ #pragma alloca
+#  else
+#   ifndef alloca
+char *alloca ();
+#   endif
+#  endif
+# endif
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "gettextP.h"
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ANSI C functions.  This is required by the standard
+   because some ANSI C functions will require linking with this object
+   file and the name space must not be polluted.  */
+# define strcasecmp __strcasecmp
+
+# ifndef mempcpy
+#  define mempcpy __mempcpy
+# endif
+# define HAVE_MEMPCPY  1
+# define HAVE___FSETLOCKING    1
+
+/* We need locking here since we can be called from different places.  */
+# include <bits/libc-lock.h>
+
+__libc_lock_define_initialized (static, lock);
+#endif
+
+#ifndef internal_function
+# define internal_function
+#endif
+
+/* Some optimizations for glibc.  */
+#ifdef _LIBC
+# define FEOF(fp)              feof_unlocked (fp)
+# define FGETS(buf, n, fp)     fgets_unlocked (buf, n, fp)
+#else
+# define FEOF(fp)              feof (fp)
+# define FGETS(buf, n, fp)     fgets (buf, n, fp)
+#endif
+
+/* For those losing systems which don't have `alloca' we have to add
+   some additional code emulating it.  */
+#ifdef HAVE_ALLOCA
+# define freea(p) /* nothing */
+#else
+# define alloca(n) malloc (n)
+# define freea(p) free (p)
+#endif
+
+#if defined _LIBC_REENTRANT || defined HAVE_FGETS_UNLOCKED
+# undef fgets
+# define fgets(buf, len, s) fgets_unlocked (buf, len, s)
+#endif
+#if defined _LIBC_REENTRANT || defined HAVE_FEOF_UNLOCKED
+# undef feof
+# define feof(s) feof_unlocked (s)
+#endif
+
+
+struct alias_map
+{
+  const char *alias;
+  const char *value;
+};
+
+
+static char *string_space;
+static size_t string_space_act;
+static size_t string_space_max;
+static struct alias_map *map;
+static size_t nmap;
+static size_t maxmap;
+
+
+/* Prototypes for local functions.  */
+static size_t read_alias_file PARAMS ((const char *fname, int fname_len))
+     internal_function;
+static int extend_alias_table PARAMS ((void));
+static int alias_compare PARAMS ((const struct alias_map *map1,
+                                 const struct alias_map *map2));
+
+
+const char *
+_nl_expand_alias (name)
+    const char *name;
+{
+  static const char *locale_alias_path;
+  struct alias_map *retval;
+  const char *result = NULL;
+  size_t added;
+
+#ifdef _LIBC
+  __libc_lock_lock (lock);
+#endif
+
+  if (locale_alias_path == NULL)
+    locale_alias_path = LOCALE_ALIAS_PATH;
+
+  do
+    {
+      struct alias_map item;
+
+      item.alias = name;
+
+      if (nmap > 0)
+       retval = (struct alias_map *) bsearch (&item, map, nmap,
+                                              sizeof (struct alias_map),
+                                              (int (*) PARAMS ((const void *,
+                                                                const void *))
+                                               ) alias_compare);
+      else
+       retval = NULL;
+
+      /* We really found an alias.  Return the value.  */
+      if (retval != NULL)
+       {
+         result = retval->value;
+         break;
+       }
+
+      /* Perhaps we can find another alias file.  */
+      added = 0;
+      while (added == 0 && locale_alias_path[0] != '\0')
+       {
+         const char *start;
+
+         while (locale_alias_path[0] == PATH_SEPARATOR)
+           ++locale_alias_path;
+         start = locale_alias_path;
+
+         while (locale_alias_path[0] != '\0'
+                && locale_alias_path[0] != PATH_SEPARATOR)
+           ++locale_alias_path;
+
+         if (start < locale_alias_path)
+           added = read_alias_file (start, locale_alias_path - start);
+       }
+    }
+  while (added != 0);
+
+#ifdef _LIBC
+  __libc_lock_unlock (lock);
+#endif
+
+  return result;
+}
+
+
+static size_t
+internal_function
+read_alias_file (fname, fname_len)
+     const char *fname;
+     int fname_len;
+{
+  FILE *fp;
+  char *full_fname;
+  size_t added;
+  static const char aliasfile[] = "/locale.alias";
+
+  full_fname = (char *) alloca (fname_len + sizeof aliasfile);
+#ifdef HAVE_MEMPCPY
+  mempcpy (mempcpy (full_fname, fname, fname_len),
+          aliasfile, sizeof aliasfile);
+#else
+  memcpy (full_fname, fname, fname_len);
+  memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
+#endif
+
+  fp = fopen (full_fname, "r");
+  freea (full_fname);
+  if (fp == NULL)
+    return 0;
+
+#ifdef HAVE___FSETLOCKING
+  /* No threads present.  */
+  __fsetlocking (fp, FSETLOCKING_BYCALLER);
+#endif
+
+  added = 0;
+  while (!FEOF (fp))
+    {
+      /* It is a reasonable approach to use a fix buffer here because
+        a) we are only interested in the first two fields
+        b) these fields must be usable as file names and so must not
+           be that long
+       */
+      char buf[BUFSIZ];
+      char *alias;
+      char *value;
+      char *cp;
+
+      if (FGETS (buf, sizeof buf, fp) == NULL)
+       /* EOF reached.  */
+       break;
+
+      /* Possibly not the whole line fits into the buffer.  Ignore
+        the rest of the line.  */
+      if (strchr (buf, '\n') == NULL)
+       {
+         char altbuf[BUFSIZ];
+         do
+           if (FGETS (altbuf, sizeof altbuf, fp) == NULL)
+             /* Make sure the inner loop will be left.  The outer loop
+                will exit at the `feof' test.  */
+             break;
+         while (strchr (altbuf, '\n') == NULL);
+       }
+
+      cp = buf;
+      /* Ignore leading white space.  */
+      while (isspace ((unsigned char) cp[0]))
+       ++cp;
+
+      /* A leading '#' signals a comment line.  */
+      if (cp[0] != '\0' && cp[0] != '#')
+       {
+         alias = cp++;
+         while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
+           ++cp;
+         /* Terminate alias name.  */
+         if (cp[0] != '\0')
+           *cp++ = '\0';
+
+         /* Now look for the beginning of the value.  */
+         while (isspace ((unsigned char) cp[0]))
+           ++cp;
+
+         if (cp[0] != '\0')
+           {
+             size_t alias_len;
+             size_t value_len;
+
+             value = cp++;
+             while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
+               ++cp;
+             /* Terminate value.  */
+             if (cp[0] == '\n')
+               {
+                 /* This has to be done to make the following test
+                    for the end of line possible.  We are looking for
+                    the terminating '\n' which do not overwrite here.  */
+                 *cp++ = '\0';
+                 *cp = '\n';
+               }
+             else if (cp[0] != '\0')
+               *cp++ = '\0';
+
+             if (nmap >= maxmap)
+               if (__builtin_expect (extend_alias_table (), 0))
+                 return added;
+
+             alias_len = strlen (alias) + 1;
+             value_len = strlen (value) + 1;
+
+             if (string_space_act + alias_len + value_len > string_space_max)
+               {
+                 /* Increase size of memory pool.  */
+                 size_t new_size = (string_space_max
+                                    + (alias_len + value_len > 1024
+                                       ? alias_len + value_len : 1024));
+                 char *new_pool = (char *) realloc (string_space, new_size);
+                 if (new_pool == NULL)
+                   return added;
+
+                 if (__builtin_expect (string_space != new_pool, 0))
+                   {
+                     size_t i;
+
+                     for (i = 0; i < nmap; i++)
+                       {
+                         map[i].alias += new_pool - string_space;
+                         map[i].value += new_pool - string_space;
+                       }
+                   }
+
+                 string_space = new_pool;
+                 string_space_max = new_size;
+               }
+
+             map[nmap].alias = memcpy (&string_space[string_space_act],
+                                       alias, alias_len);
+             string_space_act += alias_len;
+
+             map[nmap].value = memcpy (&string_space[string_space_act],
+                                       value, value_len);
+             string_space_act += value_len;
+
+             ++nmap;
+             ++added;
+           }
+       }
+    }
+
+  /* Should we test for ferror()?  I think we have to silently ignore
+     errors.  --drepper  */
+  fclose (fp);
+
+  if (added > 0)
+    qsort (map, nmap, sizeof (struct alias_map),
+          (int (*) PARAMS ((const void *, const void *))) alias_compare);
+
+  return added;
+}
+
+
+static int
+extend_alias_table ()
+{
+  size_t new_size;
+  struct alias_map *new_map;
+
+  new_size = maxmap == 0 ? 100 : 2 * maxmap;
+  new_map = (struct alias_map *) realloc (map, (new_size
+                                               * sizeof (struct alias_map)));
+  if (new_map == NULL)
+    /* Simply don't extend: we don't have any more core.  */
+    return -1;
+
+  map = new_map;
+  maxmap = new_size;
+  return 0;
+}
+
+
+#ifdef _LIBC
+static void __attribute__ ((unused))
+free_mem (void)
+{
+  if (string_space != NULL)
+    free (string_space);
+  if (map != NULL)
+    free (map);
+}
+text_set_element (__libc_subfreeres, free_mem);
+#endif
+
+
+static int
+alias_compare (map1, map2)
+     const struct alias_map *map1;
+     const struct alias_map *map2;
+{
+#if defined _LIBC || defined HAVE_STRCASECMP
+  return strcasecmp (map1->alias, map2->alias);
+#else
+  const unsigned char *p1 = (const unsigned char *) map1->alias;
+  const unsigned char *p2 = (const unsigned char *) map2->alias;
+  unsigned char c1, c2;
+
+  if (p1 == p2)
+    return 0;
+
+  do
+    {
+      /* I know this seems to be odd but the tolower() function in
+        some systems libc cannot handle nonalpha characters.  */
+      c1 = isupper (*p1) ? tolower (*p1) : *p1;
+      c2 = isupper (*p2) ? tolower (*p2) : *p2;
+      if (c1 == '\0')
+       break;
+      ++p1;
+      ++p2;
+    }
+  while (c1 == c2);
+
+  return c1 - c2;
+#endif
+}
diff --git a/intl/po2tbl.sed.in b/intl/po2tbl.sed.in
new file mode 100644 (file)
index 0000000..b3bcca4
--- /dev/null
@@ -0,0 +1,102 @@
+# po2tbl.sed - Convert Uniforum style .po file to lookup table for catgets
+# Copyright (C) 1995 Free Software Foundation, Inc.
+# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+#
+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+1 {
+  i\
+/* Automatically generated by po2tbl.sed from @PACKAGE NAME@.pot.  */\
+\
+#if HAVE_CONFIG_H\
+# include <config.h>\
+#endif\
+\
+#include "libgettext.h"\
+\
+const struct _msg_ent _msg_tbl[] = {
+  h
+  s/.*/0/
+  x
+}
+#
+# Write msgid entries in C array form.
+#
+/^msgid/ {
+  s/msgid[     ]*\(".*"\)/  {\1/
+  tb
+# Append the next line
+  :b
+  N
+# Look whether second part is continuation line.
+  s/\(.*\)"\(\n\)"\(.*"\)/\1\2\3/
+# Yes, then branch.
+  ta
+# Because we assume that the input file correctly formed the line
+# just read cannot be again be a msgid line.  So it's safe to ignore
+# it.
+  s/\(.*\)\n.*/\1/
+  bc
+# We found a continuation line.  But before printing insert '\'.
+  :a
+  s/\(.*\)\(\n.*\)/\1\\\2/
+  P
+# We cannot use D here.
+  s/.*\n\(.*\)/\1/
+# Some buggy seds do not clear the `successful substitution since last ``t'''
+# flag on `N', so we do a `t' here to clear it.
+  tb
+# Not reached
+  :c
+  x
+# The following nice solution is by
+# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
+  td
+# Increment a decimal number in pattern space.
+# First hide trailing `9' digits.
+  :d
+  s/9\(_*\)$/_\1/
+  td
+# Assure at least one digit is available.
+  s/^\(_*\)$/0\1/
+# Increment the last digit.
+  s/8\(_*\)$/9\1/
+  s/7\(_*\)$/8\1/
+  s/6\(_*\)$/7\1/
+  s/5\(_*\)$/6\1/
+  s/4\(_*\)$/5\1/
+  s/3\(_*\)$/4\1/
+  s/2\(_*\)$/3\1/
+  s/1\(_*\)$/2\1/
+  s/0\(_*\)$/1\1/
+# Convert the hidden `9' digits to `0's.
+  s/_/0/g
+  x
+  G
+  s/\(.*\)\n\([0-9]*\)/\1, \2},/
+  s/\(.*\)"$/\1/
+  p
+}
+#
+# Last line.
+#
+$ {
+  i\
+};\
+
+  g
+  s/0*\(.*\)/int _msg_tbl_length = \1;/p
+}
+d
diff --git a/intl/textdomain.c b/intl/textdomain.c
new file mode 100644 (file)
index 0000000..f259c69
--- /dev/null
@@ -0,0 +1,142 @@
+/* Implementation of the textdomain(3) function.
+   Copyright (C) 1995-1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+   This program 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, 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+#include "gettextP.h"
+
+#ifdef _LIBC
+/* We have to handle multi-threaded applications.  */
+# include <bits/libc-lock.h>
+#else
+/* Provide dummy implementation if this is outside glibc.  */
+# define __libc_rwlock_define(CLASS, NAME)
+# define __libc_rwlock_wrlock(NAME)
+# define __libc_rwlock_unlock(NAME)
+#endif
+
+/* The internal variables in the standalone libintl.a must have different
+   names than the internal variables in GNU libc, otherwise programs
+   using libintl.a cannot be linked statically.  */
+#if !defined _LIBC
+# define _nl_default_default_domain libintl_nl_default_default_domain
+# define _nl_current_default_domain libintl_nl_current_default_domain
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Name of the default text domain.  */
+extern const char _nl_default_default_domain[] attribute_hidden;
+
+/* Default text domain in which entries for gettext(3) are to be found.  */
+extern const char *_nl_current_default_domain attribute_hidden;
+
+
+/* Names for the libintl functions are a problem.  They must not clash
+   with existing names and they should follow ANSI C.  But this source
+   code is also used in GNU C Library where the names have a __
+   prefix.  So we have to make a difference here.  */
+#ifdef _LIBC
+# define TEXTDOMAIN __textdomain
+# ifndef strdup
+#  define strdup(str) __strdup (str)
+# endif
+#else
+# define TEXTDOMAIN libintl_textdomain
+#endif
+
+/* Lock variable to protect the global data in the gettext implementation.  */
+__libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
+
+/* Set the current default message catalog to DOMAINNAME.
+   If DOMAINNAME is null, return the current default.
+   If DOMAINNAME is "", reset to the default of "messages".  */
+char *
+TEXTDOMAIN (domainname)
+     const char *domainname;
+{
+  char *new_domain;
+  char *old_domain;
+
+  /* A NULL pointer requests the current setting.  */
+  if (domainname == NULL)
+    return (char *) _nl_current_default_domain;
+
+  __libc_rwlock_wrlock (_nl_state_lock);
+
+  old_domain = (char *) _nl_current_default_domain;
+
+  /* If domain name is the null string set to default domain "messages".  */
+  if (domainname[0] == '\0'
+      || strcmp (domainname, _nl_default_default_domain) == 0)
+    {
+      _nl_current_default_domain = _nl_default_default_domain;
+      new_domain = (char *) _nl_current_default_domain;
+    }
+  else if (strcmp (domainname, old_domain) == 0)
+    /* This can happen and people will use it to signal that some
+       environment variable changed.  */
+    new_domain = old_domain;
+  else
+    {
+      /* If the following malloc fails `_nl_current_default_domain'
+        will be NULL.  This value will be returned and so signals we
+        are out of core.  */
+#if defined _LIBC || defined HAVE_STRDUP
+      new_domain = strdup (domainname);
+#else
+      size_t len = strlen (domainname) + 1;
+      new_domain = (char *) malloc (len);
+      if (new_domain != NULL)
+       memcpy (new_domain, domainname, len);
+#endif
+
+      if (new_domain != NULL)
+       _nl_current_default_domain = new_domain;
+    }
+
+  /* We use this possibility to signal a change of the loaded catalogs
+     since this is most likely the case and there is no other easy we
+     to do it.  Do it only when the call was successful.  */
+  if (new_domain != NULL)
+    {
+      ++_nl_msg_cat_cntr;
+
+      if (old_domain != new_domain && old_domain != _nl_default_default_domain)
+       free (old_domain);
+    }
+
+  __libc_rwlock_unlock (_nl_state_lock);
+
+  return new_domain;
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library.  */
+weak_alias (__textdomain, textdomain);
+#endif
diff --git a/intl/xopen-msg.sed b/intl/xopen-msg.sed
new file mode 100644 (file)
index 0000000..b19c0bb
--- /dev/null
@@ -0,0 +1,104 @@
+# po2msg.sed - Convert Uniforum style .po file to X/Open style .msg file
+# Copyright (C) 1995 Free Software Foundation, Inc.
+# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+#
+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+#
+# The first directive in the .msg should be the definition of the
+# message set number.  We use always set number 1.
+#
+1 {
+  i\
+$set 1 # Automatically created by po2msg.sed
+  h
+  s/.*/0/
+  x
+}
+#
+# We copy all comments into the .msg file.  Perhaps they can help.
+#
+/^#/ s/^#[     ]*/$ /p
+#
+# We copy the original message as a comment into the .msg file.
+#
+/^msgid/ {
+# Does not work now
+#  /"$/! {
+#    s/\\$//
+#    s/$/ ... (more lines following)"/
+#  }
+  s/^msgid[    ]*"\(.*\)"$/$ Original Message: \1/
+  p
+}
+#
+# The .msg file contains, other then the .po file, only the translations
+# but each given a unique ID.  Starting from 1 and incrementing by 1 for
+# each message we assign them to the messages.
+# It is important that the .po file used to generate the cat-id-tbl.c file
+# (with po-to-tbl) is the same as the one used here.  (At least the order
+# of declarations must not be changed.)
+#
+/^msgstr/ {
+  s/msgstr[    ]*"\(.*\)"/\1/
+  x
+# The following nice solution is by
+# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
+  td
+# Increment a decimal number in pattern space.
+# First hide trailing `9' digits.
+  :d
+  s/9\(_*\)$/_\1/
+  td
+# Assure at least one digit is available.
+  s/^\(_*\)$/0\1/
+# Increment the last digit.
+  s/8\(_*\)$/9\1/
+  s/7\(_*\)$/8\1/
+  s/6\(_*\)$/7\1/
+  s/5\(_*\)$/6\1/
+  s/4\(_*\)$/5\1/
+  s/3\(_*\)$/4\1/
+  s/2\(_*\)$/3\1/
+  s/1\(_*\)$/2\1/
+  s/0\(_*\)$/1\1/
+# Convert the hidden `9' digits to `0's.
+  s/_/0/g
+  x
+# Bring the line in the format `<number> <message>'
+  G
+  s/^[^\n]*$/& /
+  s/\(.*\)\n\([0-9]*\)/\2 \1/
+# Clear flag from last substitution.
+  tb
+# Append the next line.
+  :b
+  N
+# Look whether second part is a continuation line.
+  s/\(.*\n\)"\(.*\)"/\1\2/
+# Yes, then branch.
+  ta
+  P
+  D
+# Note that `D' includes a jump to the start!!
+# We found a continuation line.  But before printing insert '\'.
+  :a
+  s/\(.*\)\(\n.*\)/\1\\\2/
+  P
+# We cannot use the sed command `D' here
+  s/.*\n\(.*\)/\1/
+  tb
+}
+d
diff --git a/intltool-extract.in b/intltool-extract.in
new file mode 100644 (file)
index 0000000..256a959
--- /dev/null
@@ -0,0 +1,325 @@
+#!@INTLTOOL_PERL@ -w 
+# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4  -*-
+
+#
+#  The Intltool Message Extractor
+#
+#  Copyright (C) 2000-2001 Free Software Foundation.
+#
+#  Intltool 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.
+#
+#  Intltool 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.
+#
+#  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.
+#
+#  Authors: Kenneth Christiansen <kenneth@gnu.org>
+#           Darin Adler <darin@bentspoon.com>
+#
+
+## Release information
+my $PROGRAM      = "intltool-extract";
+my $PACKAGE      = "intltool";
+my $VERSION      = "0.22";
+
+## Loaded modules
+use strict; 
+use File::Basename;
+use Getopt::Long;
+
+## Scalars used by the option stuff
+my $TYPE_ARG   = "0";
+my $LOCAL_ARG  = "0";
+my $HELP_ARG   = "0";
+my $VERSION_ARG = "0";
+my $UPDATE_ARG  = "0";
+my $QUIET_ARG   = "0";
+
+my $FILE;
+my $OUTFILE;
+
+my $gettext_type = "";
+my $input;
+my %messages = ();
+
+## Use this instead of \w for XML files to handle more possible characters.
+my $w = "[-A-Za-z0-9._:]";
+
+## Always print first
+$| = 1;
+
+## Handle options
+GetOptions (
+           "type=s"     => \$TYPE_ARG,
+            "local|l"    => \$LOCAL_ARG,
+            "help|h"     => \$HELP_ARG,
+            "version|v"  => \$VERSION_ARG,
+            "update"     => \$UPDATE_ARG,
+           "quiet|q"    => \$QUIET_ARG,
+            ) or &error;
+
+&split_on_argument;
+
+
+## Check for options. 
+## This section will check for the different options.
+
+sub split_on_argument {
+
+    if ($VERSION_ARG) {
+        &version;
+
+    } elsif ($HELP_ARG) {
+       &help;
+        
+    } elsif ($LOCAL_ARG) {
+        &place_local;
+        &extract;
+
+    } elsif ($UPDATE_ARG) {
+       &place_normal;
+       &extract;
+
+    } elsif (@ARGV > 0) {
+       &place_normal;
+       &message;
+       &extract;
+
+    } else {
+       &help;
+
+    }  
+}    
+
+sub place_normal {
+    $FILE       = $ARGV[0];
+    $OUTFILE     = "$FILE.h";
+}   
+
+sub place_local {
+    $OUTFILE     = fileparse($FILE, ());
+    if (!-e "tmp/") { 
+        system("mkdir tmp/"); 
+    }
+    $OUTFILE     = "./tmp/$OUTFILE.h"
+}
+
+sub determine_type {
+   if ($TYPE_ARG =~ /^gettext\/(.*)/) {
+       $gettext_type=$1
+   }
+}
+
+## Sub for printing release information
+sub version{
+    print "${PROGRAM} (${PACKAGE}) $VERSION\n";
+    print "Copyright (C) 2000 Free Software Foundation, Inc.\n";
+    print "Written by Kenneth Christiansen, 2000.\n\n";
+    print "This is free software; see the source for copying conditions. There is NO\n";
+    print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n";
+    exit;
+}
+
+## Sub for printing usage information
+sub help{
+    print "Usage: ${PROGRAM} [FILENAME] [OPTIONS] ...\n";
+    print "Generates a header file from an xml source file.\n\nGrabs all strings ";
+    print "between <_translatable_node> and it's end tag,\nwhere tag are all allowed ";
+    print "xml tags. Read the docs for more info.\n\n"; 
+    print "  -v, --version                shows the version\n";
+    print "  -h, --help                   shows this help page\n";
+    print "  -q, --quiet                  quiet mode\n";
+    print "\nReport bugs to <kenneth\@gnu.org>.\n";
+    exit;
+}
+
+## Sub for printing error messages
+sub error{
+    print "Try `${PROGRAM} --help' for more information.\n";
+    exit;
+}
+
+sub message {
+    print "Generating C format header file for translation.\n";
+}
+
+sub extract {
+    &determine_type;
+
+    &convert ($FILE);
+
+    open OUT, ">$OUTFILE";
+    &msg_write;
+    close OUT;
+
+    print "Wrote $OUTFILE\n" unless $QUIET_ARG;
+}
+
+sub convert($) {
+
+    ## Reading the file
+    {
+       local (*IN);
+       local $/; #slurp mode
+       open (IN, "<$FILE") || die "can't open $FILE: $!";
+       $input = <IN>;
+    }
+
+    &type_ini if $gettext_type eq "ini";
+    &type_keys if $gettext_type eq "keys";
+    &type_xml if $gettext_type eq "xml";
+    &type_glade if $gettext_type eq "glade";
+    &type_scheme if $gettext_type eq "scheme";
+    &type_schemas  if $gettext_type eq "schemas";
+}
+
+sub entity_decode_minimal
+{
+    local ($_) = @_;
+
+    s/&apos;/'/g; # '
+    s/&quot;/"/g; # "
+    s/&amp;/&/g;
+
+    return $_;
+}
+
+sub entity_decode
+{
+    local ($_) = @_;
+
+    s/&apos;/'/g; # '
+    s/&quot;/"/g; # "
+    s/&amp;/&/g;
+    s/&lt;/</g;
+    s/&gt;/>/g;
+
+    return $_;
+}
+
+sub escape_char
+{
+    return '\"' if $_ eq '"';
+    return '\n' if $_ eq "\n";
+    return '\\' if $_ eq '\\';
+
+    return $_;
+}
+
+sub escape
+{
+    my ($string) = @_;
+    return join "", map &escape_char, split //, $string;
+}
+
+sub type_ini {
+    ### For generic translatable desktop files ###
+    while ($input =~ /^_.*=(.*)$/mg) {
+        $messages{$1} = [];
+    }
+}
+
+sub type_keys {
+    ### For generic translatable mime/keys files ###
+    while ($input =~ /^\s*_\w+=(.*)$/mg) {
+        $messages{$1} = [];
+    }
+}
+
+sub type_xml {
+    ### For generic translatable XML files ###
+        
+    while ($input =~ /\s_$w+=\"([^"]+)\"/sg) { # "
+        $messages{entity_decode_minimal($1)} = [];
+    }
+
+    while ($input =~ /<_($w+)>(.+?)<\/_\1>/sg) {
+        $_ = $2;
+        s/\s+/ /g;
+       s/^ //;
+       s/ $//;
+        $messages{entity_decode_minimal($_)} = [];
+    }
+}
+
+sub type_schemas {
+    ### For schemas XML files ###
+         
+    # FIXME: We should handle escaped < (less than)
+    while ($input =~ /<(short|long)>([^<]+)<\/\1>/sg) {
+        $_ = $2;
+        s/\s+/ /g;
+       s/^ //;
+       s/ $//;
+        $messages{entity_decode_minimal($_)} = [];
+    }
+}
+
+sub type_glade {
+    ### For translatable Glade XML files ###
+
+    my $tags = "label|title|text|format|copyright|comments|preview_text|tooltip|message";
+
+    while ($input =~ /<($tags)>([^<]+)<\/($tags)>/sg) {
+       # Glade sometimes uses tags that normally mark translatable things for
+        # little bits of non-translatable content. We work around this by not
+        # translating strings that only includes something like label4 or window1.
+       $messages{entity_decode($2)} = [] unless $2 =~ /^(window|label)[0-9]+$/;
+    }
+    
+    while ($input =~ /<items>(..[^<]*)<\/items>/sg) {
+       for my $item (split (/\n/, $1)) {
+           $messages{entity_decode($item)} = [];
+       }
+    }
+
+    ## handle new glade files
+    while ($input =~ /<(property|atkproperty)\s+[^>]*translatable\s*=\s*"yes"[^>]*>([^<]+)<\/\1>/sg) {
+       $messages{entity_decode($2)} = [] unless $2 =~ /^(window|label)[0-9]+$/;
+    }
+    while ($input =~ /<atkaction\s+action_name="([^>]*)"\s+description="([^>]+)"\/>/sg) {
+        $messages{entity_decode_minimal($2)} = [];
+    }
+}
+
+sub type_scheme {
+    while ($input =~ /_\(?"((?:[^"\\]+|\\.)*)"\)?/sg) {
+       $messages{$1} = [];
+    }
+}
+
+sub msg_write {
+    for my $message (sort keys %messages) { 
+       print OUT "/* xgettext:no-c-format */\n" if $message =~ /%/;
+        
+       my @lines = split (/\n/, $message);
+       for (my $n = 0; $n < @lines; $n++) {
+            if ($n == 0) { 
+               print OUT "char *s = N_(\""; 
+            } else {  
+               print OUT "             \""; 
+           }
+
+            print OUT escape($lines[$n]);
+
+            if ($n < @lines - 1) { 
+               print OUT "\\n\"\n"; 
+           } else { 
+               print OUT "\");\n";  
+           }
+        }
+    }
+}
+
diff --git a/intltool-merge.in b/intltool-merge.in
new file mode 100644 (file)
index 0000000..fd35cfd
--- /dev/null
@@ -0,0 +1,657 @@
+#!@INTLTOOL_PERL@ -w
+
+#
+#  The Intltool Message Merger
+#
+#  Copyright (C) 2000, 2002 Free Software Foundation.
+#  Copyright (C) 2000, 2001 Eazel, Inc
+#
+#  Intltool is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License 
+#  version 2 published by the Free Software Foundation.
+#
+#  Intltool 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.
+#
+#  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.
+#
+#  Authors:  Maciej Stachowiak <mjs@noisehavoc.org>
+#            Kenneth Christiansen <kenneth@gnu.org>
+#            Darin Adler <darin@bentspoon.com>
+#
+#  Proper XML UTF-8'ification written by Cyrille Chepelov <chepelov@calixo.net>
+#
+
+## Release information
+my $PROGRAM = "intltool-merge";
+my $PACKAGE = "intltool";
+my $VERSION = "0.22";
+
+## Loaded modules
+use strict; 
+use Getopt::Long;
+
+## Scalars used by the option stuff
+my $HELP_ARG = 0;
+my $VERSION_ARG = 0;
+my $BA_STYLE_ARG = 0;
+my $XML_STYLE_ARG = 0;
+my $KEYS_STYLE_ARG = 0;
+my $DESKTOP_STYLE_ARG = 0;
+my $SCHEMAS_STYLE_ARG = 0;
+my $QUIET_ARG = 0;
+my $PASS_THROUGH_ARG = 0;
+my $UTF8_ARG = 0;
+my $cache_file;
+
+## Handle options
+GetOptions 
+(
+ "help" => \$HELP_ARG,
+ "version" => \$VERSION_ARG,
+ "quiet|q" => \$QUIET_ARG,
+ "oaf-style|o" => \$BA_STYLE_ARG, ## for compatibility
+ "ba-style|b" => \$BA_STYLE_ARG,
+ "xml-style|x" => \$XML_STYLE_ARG,
+ "keys-style|k" => \$KEYS_STYLE_ARG,
+ "desktop-style|d" => \$DESKTOP_STYLE_ARG,
+ "schemas-style|s" => \$SCHEMAS_STYLE_ARG,
+ "pass-through|p" => \$PASS_THROUGH_ARG,
+ "utf8|u" => \$UTF8_ARG,
+ "cache|c=s" => \$cache_file
+ ) or &error;
+
+my $PO_DIR;
+my $FILE;
+my $OUTFILE;
+
+my %po_files_by_lang = ();
+my %translations = ();
+
+# Use this instead of \w for XML files to handle more possible characters.
+my $w = "[-A-Za-z0-9._:]";
+
+# XML quoted string contents
+my $q = "[^\\\"]*";
+
+## Check for options. 
+
+if ($VERSION_ARG) {
+       &print_version;
+} elsif ($HELP_ARG) {
+       &print_help;
+} elsif ($BA_STYLE_ARG && @ARGV > 2) {
+       &preparation;
+       &print_message;
+       &ba_merge_translations;
+       &finalize;
+} elsif ($XML_STYLE_ARG && @ARGV > 2) {
+        &utf8_sanity_check;
+       &preparation;
+       &print_message;
+       &xml_merge_translations;
+       &finalize;
+} elsif ($KEYS_STYLE_ARG && @ARGV > 2) {
+        &utf8_sanity_check;
+        &preparation;
+        &print_message;
+        &keys_merge_translations;
+       &finalize;
+} elsif ($DESKTOP_STYLE_ARG && @ARGV > 2) {
+        &preparation;
+        &print_message;
+        &desktop_merge_translations;
+       &finalize;
+} elsif ($SCHEMAS_STYLE_ARG && @ARGV > 2) {
+        &preparation;
+        &print_message;
+        &schemas_merge_translations;
+       &finalize;
+} else {
+       &print_help;
+}
+
+exit;
+
+## Sub for printing release information
+sub print_version
+{
+    print "${PROGRAM} (${PACKAGE}) ${VERSION}\n";
+    print "Written by Maciej Stachowiak, Darin Adler and Kenneth Christiansen.\n\n";
+    print "Copyright (C) 2000-2002 Free Software Foundation, Inc.\n";
+    print "Copyright (C) 2000-2001 Eazel, Inc.\n";
+    print "This is free software; see the source for copying conditions.  There is NO\n";
+    print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n";
+    exit;
+}
+
+## Sub for printing usage information
+sub print_help
+{
+    print "Usage: ${PROGRAM} [OPTIONS] PO_DIRECTORY FILENAME OUTPUT_FILE\n";
+    print "Generates an output file that includes translated versions of some attributes,\n";
+    print "from an untranslated source and a po directory that includes translations.\n\n";
+    print "  -b, --ba-style         includes translations in the bonobo-activation style\n";
+    print "  -d, --desktop-style    includes translations in the desktop style\n";
+    print "  -k, --keys-style       includes translations in the keys style\n";
+    print "  -s, --schemas-style    includes translations in the schemas style\n";
+    print "  -x, --xml-style        includes translations in the standard xml style\n";
+    print "  -u, --utf8             convert all strings to UTF-8 before merging\n";
+    print "  -p, --pass-through     use strings as found in .po files, without\n";
+    print "                         conversion (STRONGLY unrecommended with -x)\n";
+    print "  -q, --quiet            suppress most messages\n";
+    print "      --help             display this help and exit\n";
+    print "      --version          output version information and exit\n";
+    print "\nReport bugs to bugzilla.gnome.org, module intltool, or contact us through \n";
+    print "<xml-i18n-tools-list\@gnome.org>.\n";
+    exit;
+}
+
+
+## Sub for printing error messages
+sub print_error
+{
+    print "Try `${PROGRAM} --help' for more information.\n";
+    exit;
+}
+
+
+sub print_message 
+{
+    print "Merging translations into $OUTFILE.\n" unless $QUIET_ARG;
+}
+
+
+sub preparation 
+{
+    $PO_DIR = $ARGV[0];
+    $FILE = $ARGV[1];
+    $OUTFILE = $ARGV[2];
+
+    &gather_po_files;
+    &get_translation_database;
+}
+
+# General-purpose code for looking up translations in .po files
+
+sub po_file2lang
+{
+    my ($tmp) = @_; 
+    $tmp =~ s/^.*\/(.*)\.po$/$1/; 
+    return $tmp; 
+}
+
+sub gather_po_files
+{
+    for my $po_file (glob "$PO_DIR/*.po") {
+       $po_files_by_lang{po_file2lang($po_file)} = $po_file;
+    }
+}
+
+sub get_po_encoding
+{
+    my ($in_po_file) = @_;
+    my $encoding = "";
+
+    open IN_PO_FILE, $in_po_file or die;
+    while (<IN_PO_FILE>) {
+        ## example: "Content-Type: text/plain; charset=ISO-8859-1\n"
+        if (/Content-Type\:.*charset=([-a-zA-Z0-9]+)\\n/) {
+            $encoding = $1; 
+            last;
+        }
+    }
+    close IN_PO_FILE;
+
+    if (!$encoding) {
+        print "Warning: no encoding found in $in_po_file. Assuming ISO-8859-1\n";
+        $encoding = "ISO-8859-1";
+    }
+    return $encoding
+}
+
+sub utf8_sanity_check 
+{
+    if (!$UTF8_ARG) {
+        if (!$PASS_THROUGH_ARG) {
+            $PASS_THROUGH_ARG="1";
+        }
+    }
+}
+
+sub get_translation_database
+{
+    if ($cache_file) {
+       &get_cached_translation_database;
+    } else {
+        &create_translation_database;
+    }
+}
+
+sub get_newest_po_age
+{
+    my $newest_age;
+
+    foreach my $file (values %po_files_by_lang) {
+       my $file_age = -M $file;
+       $newest_age = $file_age if !$newest_age || $file_age < $newest_age;
+    }
+
+    return $newest_age;
+}
+
+sub create_cache
+{
+    print "Generating and caching the translation database\n" unless $QUIET_ARG;
+
+    &create_translation_database;
+
+    open CACHE, ">$cache_file" || die;
+    print CACHE join "\x01", %translations;
+    close CACHE;
+}
+
+sub load_cache 
+{
+    print "Found cached translation database\n" unless $QUIET_ARG;
+
+    my $contents;
+    open CACHE, "<$cache_file" || die;
+    {
+        local $/;
+        $contents = <CACHE>;
+    }
+    close CACHE;
+    %translations = split "\x01", $contents;
+}
+
+sub get_cached_translation_database
+{
+    my $cache_file_age = -M $cache_file;
+    if (defined $cache_file_age) {
+        if ($cache_file_age <= &get_newest_po_age) {
+            &load_cache;
+            return;
+        }
+        print "Found too-old cached translation database\n" unless $QUIET_ARG;
+    }
+
+    &create_cache;
+}
+
+sub create_translation_database
+{
+    for my $lang (keys %po_files_by_lang) {
+       my $po_file = $po_files_by_lang{$lang};
+
+        if ($UTF8_ARG) {
+            my $encoding = get_po_encoding ($po_file);
+            if (lc $encoding eq "utf-8") {
+                open PO_FILE, "<$po_file";     
+            } else {
+                my $iconv = $ENV{"INTLTOOL_ICONV"} || "iconv";
+                open PO_FILE, "$iconv -f $encoding -t UTF-8 $po_file|";        
+            }
+        } else {
+            open PO_FILE, "<$po_file"; 
+        }
+
+       my $nextfuzzy = 0;
+       my $inmsgid = 0;
+       my $inmsgstr = 0;
+       my $msgid = "";
+       my $msgstr = "";
+        while (<PO_FILE>) {
+           $nextfuzzy = 1 if /^#, fuzzy/;
+            if (/^msgid "((\\.|[^\\])*)"/ ) {
+               $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr;
+               $msgid = "";
+               $msgstr = "";
+
+               if ($nextfuzzy) {
+                   $inmsgid = 0;
+               } else {
+                   $msgid = unescape_po_string($1);
+                   $inmsgid = 1;
+               }
+               $inmsgstr = 0;
+               $nextfuzzy = 0;
+           }
+           if (/^msgstr "((\\.|[^\\])*)"/) {
+               $msgstr = unescape_po_string($1);
+               $inmsgstr = 1;
+               $inmsgid = 0;
+           }
+           if (/^"((\\.|[^\\])*)"/) {
+               $msgid .= unescape_po_string($1) if $inmsgid;
+               $msgstr .= unescape_po_string($1) if $inmsgstr;
+           }
+       }
+       $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr;
+    }
+}
+
+sub finalize
+{
+}
+
+sub unescape_one_sequence
+{
+    my ($sequence) = @_;
+
+    return "\\" if $sequence eq "\\\\";
+    return "\"" if $sequence eq "\\\"";
+
+    # gettext also handles \n, \t, \b, \r, \f, \v, \a, \xxx (octal),
+    # \xXX (hex) and has a comment saying they want to handle \u and \U.
+
+    return $sequence;
+}
+
+sub unescape_po_string
+{
+    my ($string) = @_;
+
+    $string =~ s/(\\.)/unescape_one_sequence($1)/eg;
+
+    return $string;
+}
+
+sub entity_decode
+{
+    local ($_) = @_;
+
+    s/&apos;/'/g; # '
+    s/&quot;/"/g; # "
+    s/&amp;/&/g;
+
+    return $_;
+}
+
+sub entity_encode
+{
+    my ($pre_encoded) = @_;
+
+    my @list_of_chars = unpack ('C*', $pre_encoded);
+
+    if ($PASS_THROUGH_ARG) {
+        return join ('', map (&entity_encode_int_even_high_bit, @list_of_chars));
+    } else {
+        return join ('', map (&entity_encode_int_minimalist, @list_of_chars));
+    }
+}
+
+sub entity_encode_int_minimalist
+{
+    return "&quot;" if $_ == 34;
+    return "&amp;" if $_ == 38;
+    return "&apos;" if $_ == 39;
+    return chr $_;
+}
+
+sub entity_encode_int_even_high_bit
+{
+    if ($_ > 127 || $_ == 34 || $_ == 38 || $_ == 39) {
+        # the ($_ > 127) should probably be removed
+       return "&#" . $_ . ";"; 
+    } else {
+       return chr $_;
+    }
+}
+
+sub entity_encoded_translation
+{
+    my ($lang, $string) = @_;
+
+    my $translation = $translations{$lang, $string};
+    return $string if !$translation;
+    return entity_encode ($translation);
+}
+
+## XML (bonobo-activation specific) merge code
+
+sub ba_merge_translations
+{
+    my $source;
+
+    {
+       local $/; # slurp mode
+       open INPUT, "<$FILE" or die "can't open $FILE: $!";
+       $source = <INPUT>;
+       close INPUT;
+    }
+
+    open OUTPUT, ">$OUTFILE" or die "can't open $OUTFILE: $!";
+
+    while ($source =~ s|^(.*?)([ \t]*<\s*$w+\s+($w+\s*=\s*"$q"\s*)+/?>)([ \t]*\n)?||s) {
+        print OUTPUT $1;
+
+        my $node = $2 . "\n";
+
+        my @strings = ();
+        $_ = $node;
+       while (s/(\s)_($w+\s*=\s*"($q)")/$1$2/s) {
+             push @strings, entity_decode($3);
+        }
+       print OUTPUT;
+
+       my %langs;
+       for my $string (@strings) {
+           for my $lang (keys %po_files_by_lang) {
+                $langs{$lang} = 1 if $translations{$lang, $string};
+           }
+       }
+       
+       for my $lang (sort keys %langs) {
+           $_ = $node;
+           s/(\sname\s*=\s*)"($q)"/$1"$2-$lang"/s;
+           s/(\s)_($w+\s*=\s*")($q)"/$1 . $2 . entity_encoded_translation($lang, $3) . '"'/seg;
+           print OUTPUT;
+        }
+    }
+
+    print OUTPUT $source;
+
+    close OUTPUT;
+}
+
+
+## XML (non-bonobo-activation) merge code
+
+sub xml_merge_translations
+{
+    my $source;
+
+    {
+       local $/; # slurp mode
+       open INPUT, "<$FILE" or die "can't open $FILE: $!";
+       $source = <INPUT>;
+       close INPUT;
+    }
+
+    open OUTPUT, ">$OUTFILE" or die;
+
+    # FIXME: support attribute translations
+
+    # Empty nodes never need translation, so unmark all of them.
+    # For example, <_foo/> is just replaced by <foo/>.
+    $source =~ s|<\s*_($w+)\s*/>|<$1/>|g;
+
+    # Support for <_foo>blah</_foo> style translations.
+    while ($source =~ s|^(.*?)([ \t]*)<\s*_($w+)\s*>(.*?)<\s*/_\3\s*>([ \t]*\n)?||s) {
+        print OUTPUT $1;
+
+        my $spaces = $2;
+        my $tag = $3;
+        my $string = $4;
+
+       print OUTPUT "$spaces<$tag>$string</$tag>\n";
+
+       $string =~ s/\s+/ /g;
+       $string =~ s/^ //;
+       $string =~ s/ $//;
+       $string = entity_decode($string);
+
+       for my $lang (sort keys %po_files_by_lang) {
+           my $translation = $translations{$lang, $string};
+           next if !$translation;
+           $translation = entity_encode($translation);
+           print OUTPUT "$spaces<$tag xml:lang=\"$lang\">$translation</$tag>\n";
+        }
+    }
+
+    print OUTPUT $source;
+
+    close OUTPUT;
+}
+
+sub keys_merge_translations
+{
+    open INPUT, "<${FILE}" or die;
+    open OUTPUT, ">${OUTFILE}" or die;
+
+    while (<INPUT>) {
+        if (s/^(\s*)_(\w+=(.*))/$1$2/)  {
+           my $string = $3;
+
+            print OUTPUT;
+
+           my $non_translated_line = $_;
+
+            for my $lang (sort keys %po_files_by_lang) {
+               my $translation = $translations{$lang, $string};
+                next if !$translation;
+
+                $_ = $non_translated_line;
+               s/(\w+)=.*/[$lang]$1=$translation/;
+                print OUTPUT;
+            }
+       } else {
+            print OUTPUT;
+        }
+    }
+
+    close OUTPUT;
+    close INPUT;
+}
+
+sub desktop_merge_translations
+{
+    open INPUT, "<${FILE}" or die;
+    open OUTPUT, ">${OUTFILE}" or die;
+
+    while (<INPUT>) {
+        if (s/^(\s*)_(\w+=(.*))/$1$2/)  {
+           my $string = $3;
+
+            print OUTPUT;
+
+           my $non_translated_line = $_;
+
+            for my $lang (sort keys %po_files_by_lang) {
+                my $translation = $translations{$lang, $string};
+                next if !$translation;
+
+                $_ = $non_translated_line;
+                s/(\w+)=.*/${1}[$lang]=$translation/;
+                print OUTPUT;
+            }
+       } else {
+            print OUTPUT;
+        }
+    }
+
+    close OUTPUT;
+    close INPUT;
+}
+
+sub schemas_merge_translations
+{
+    my $source;
+
+    {
+       local $/; # slurp mode
+       open INPUT, "<$FILE" or die "can't open $FILE: $!";
+       $source = <INPUT>;
+       close INPUT;
+    }
+
+    open OUTPUT, ">$OUTFILE" or die;
+
+    # FIXME: support attribute translations
+
+    # Empty nodes never need translation, so unmark all of them.
+    # For example, <_foo/> is just replaced by <foo/>.
+    $source =~ s|<\s*_($w+)\s*/>|<$1/>|g;
+
+    # Support for <_foo>blah</_foo> style translations.
+
+    my $regex_start = "^(.*?)([ \t]*)<locale name=\"C\">";
+    my $regex_short = "([ \t\n]*)<short>(.*?)</short>";
+    my $regex_long  = "([ \t\n]*)<long>(.*?)</long>";
+    my $regex_end   = "([ \t\n]*)</locale>";
+
+    while ($source =~ s|$regex_start$regex_short$regex_long$regex_end||s) {
+        print OUTPUT $1;
+
+        my $locale_start_spaces = $2;
+       my $locale_end_spaces = $7;
+       my $short_spaces = $3;
+       my $short_string = $4;
+       my $long_spaces = $5;
+       my $long_string = $6;
+
+       # English first
+
+       print OUTPUT "$locale_start_spaces<locale name=\"C\">";
+       print OUTPUT "$short_spaces<short>$short_string</short>";
+       print OUTPUT "$long_spaces<long>$long_string</long>";
+       print OUTPUT "$locale_end_spaces</locale>";
+
+       $short_string =~ s/\s+/ /g;
+       $short_string =~ s/^ //;
+       $short_string =~ s/ $//;
+       $short_string = entity_decode($short_string);
+
+       $long_string =~ s/\s+/ /g;
+       $long_string =~ s/^ //;
+       $long_string =~ s/ $//;
+       $long_string = entity_decode($long_string);
+
+       for my $lang (sort keys %po_files_by_lang) {
+           my $short_translation = $translations{$lang, $short_string};
+           my $long_translation  = $translations{$lang, $long_string};
+
+           next if (!$short_translation && !$long_translation);
+
+           print OUTPUT "\n$locale_start_spaces<locale name=\"$lang\">";
+
+           if ($short_translation)
+           {
+               $short_translation = entity_encode($short_translation);
+               print OUTPUT "$short_spaces<short>$short_translation</short>";
+           }
+
+           if ($long_translation)
+           {
+               $long_translation = entity_encode($long_translation);
+               print OUTPUT "$long_spaces<long>$long_translation</long>";
+           }       
+
+           print OUTPUT "$locale_end_spaces</locale>";
+        }
+    }
+
+    print OUTPUT $source;
+
+    close OUTPUT;
+}
diff --git a/intltool-update.in b/intltool-update.in
new file mode 100644 (file)
index 0000000..cc5fc14
--- /dev/null
@@ -0,0 +1,634 @@
+#!@INTLTOOL_PERL@ -w
+
+#
+#  The Intltool Message Updater
+#
+#  Copyright (C) 2000-2002 Free Software Foundation.
+#
+#  Intltool is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License 
+#  version 2 published by the Free Software Foundation.
+#
+#  Intltool 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.
+#
+#  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.
+#
+#  Authors: Kenneth Christiansen <kenneth@gnu.org>
+#           Maciej Stachowiak
+#           Darin Adler <darin@bentspoon.com>
+
+## Release information
+my $PROGRAM = "intltool-update";
+my $VERSION = "0.22";
+my $PACKAGE = "intltool";
+
+## Loaded modules
+use strict;
+use Getopt::Long;
+use Cwd;
+use File::Copy;
+use File::Find;
+
+## Scalars used by the option stuff
+my $HELP_ARG      = 0;
+my $VERSION_ARG    = 0;
+my $DIST_ARG      = 0;
+my $POT_ARG       = 0;
+my $HEADERS_ARG    = 0;
+my $MAINTAIN_ARG   = 0;
+my $REPORT_ARG     = 0;
+my $VERBOSE       = 0;
+my $GETTEXT_PACKAGE = "";
+
+my @languages;
+my %po_files_by_lang = ();
+
+# Regular expressions to categorize file types.
+# FIXME: Please check if the following is correct
+
+my $xml_extension =
+"xml(\.in)*|".         # .in is not required
+"ui|".
+"glade2?(\.in)*|".     # .in is not required
+"scm(\.in)*|".         # .in is not required
+"oaf(\.in)+|".
+"etspec|".
+"sheet(\.in)+|".
+"schemas(\.in)+|".
+"pong(\.in)+";
+
+my $ini_extension =
+"desktop(\.in)+|".
+"caves(\.in)+|". 
+"directory(\.in)+|".
+"soundlist(\.in)+|".
+"keys(\.in)+|".
+"server(\.in)+";
+
+## Always print as the first thing
+$| = 1;
+
+## Handle options
+GetOptions 
+(
+ "help"               => \$HELP_ARG,
+ "version"            => \$VERSION_ARG,
+ "dist|d"             => \$DIST_ARG,
+ "pot|p"              => \$POT_ARG,
+ "headers|s"          => \$HEADERS_ARG,
+ "maintain|m"         => \$MAINTAIN_ARG,
+ "report|r"           => \$REPORT_ARG,
+ "verbose|x"          => \$VERBOSE,
+ "gettext-package|g=s" => \$GETTEXT_PACKAGE,
+ ) or &print_error_invalid_option;
+
+&print_help if $HELP_ARG;
+&print_version if $VERSION_ARG;
+
+my $arg_count = ($DIST_ARG > 0)
+    + ($POT_ARG > 0)
+    + ($HEADERS_ARG > 0)
+    + ($MAINTAIN_ARG > 0)
+    + ($REPORT_ARG > 0);
+&print_help if $arg_count > 1;
+
+# --version and --help don't require a module name
+my $MODULE = $GETTEXT_PACKAGE || &find_package_name;
+
+if ($DIST_ARG) {
+    if ($ARGV[0] =~ /^[a-z]/){
+        &update_po_file ($ARGV[0]);
+        &print_status ($ARGV[0]);
+    } else {
+        &print_help;
+    }
+} elsif ($POT_ARG) {
+    &generate_headers;
+    &generate_po_template;
+} elsif ($HEADERS_ARG) {
+    &generate_headers;
+} elsif ($MAINTAIN_ARG) {
+    &find_leftout_files;
+} elsif ($REPORT_ARG) {
+    &print_report;
+} else {
+    if ($ARGV[0] =~ /^[a-z]/) {
+        &main ($ARGV[0]);
+    } else {
+        &print_help;
+    }
+}
+
+exit;
+
+#########
+
+sub print_version
+{
+    ## Print version information
+    print "${PROGRAM} (${PACKAGE}) $VERSION\n";
+    print "Written by Kenneth Christiansen, Maciej Stachowiak, and Darin Adler.\n\n";
+    print "Copyright (C) 2000-2002 Free Software Foundation, Inc.\n";
+    print "This is free software; see the source for copying conditions.  There is NO\n";
+    print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n";
+    exit;
+}
+
+sub print_help
+{
+    ## Print usage information
+    print "Usage: ${PROGRAM} [OPTIONS] ...LANGCODE\n";
+    print "Updates PO template files and merge them with the translations.\n\n";
+    print "  -p, --pot              generate the PO template only\n";
+    print "  -s, --headers          generate the header files in POTFILES.in\n";
+    print "  -m, --maintain         search for left out files from POTFILES.in\n";
+    print "  -r, --report           display a status report for the module.\n";
+    print "  -x, --verbose          display lots of feedback\n";
+    print "      --help             display this help and exit\n";
+    print "      --version          output version information and exit\n";
+    print "\nExamples of use:\n";
+    print "${PROGRAM} --pot    just creates a new PO template from the source\n";
+    print "${PROGRAM} da       created new PO template and updated the da.po file\n\n";
+    print "Report bugs to bugzilla.gnome.org, module 'intltool'.\n";
+    exit;
+}
+
+sub main
+{
+    my ($lang) = @_;
+
+    ## Report error if the language file supplied
+    ## to the command line is non-existent
+    &print_error_not_existing("$lang.po") if ! -s "$lang.po";
+
+    print "Working, please wait..." unless $VERBOSE;
+    &generate_headers;
+    &generate_po_template;
+    &update_po_file ($lang);
+    &print_status ($lang);
+}
+
+sub determine_type ($) 
+{
+   my $type = $_;
+   my $gettext_type;
+
+   # FIXME: Use $xml_extentions, and maybe do all this even nicer
+   my $xml_regex = 
+       "(?:xml(\.in)*|ui|oaf(?:\.in)+|server(?:\.in)+|sheet(?:\.in)+|".
+       "pong(?:\.in)+|etspec|schemas(?:\.in)+)";
+   my $ini_regex =
+       "(?:desktop(?:\.in)+|caves(?:\.in)+|directory(?:\.in)+|".
+       "soundlist(?:\.in)+)";
+
+   if ($type =~ /\[type: gettext\/([^\]].*)]/) {
+        $gettext_type=$1;
+   }
+   elsif ($type =~ /schemas(\.in)+$/) {
+        $gettext_type="schemas";
+   }
+   elsif ($type =~ /$xml_regex$/) {
+        $gettext_type="xml";
+   }
+   elsif ($type =~ /glade2?(\.in)*$/) {
+        $gettext_type="glade";
+   }
+   elsif ($type =~ /$ini_regex$/) { 
+        $gettext_type="ini";
+   }
+   elsif ($type =~ /scm(\.in)*$/) {
+        $gettext_type="scheme";
+   }
+   elsif ($type =~ /keys(\.in)+$/) {
+        $gettext_type="keys";
+   }
+   else { $gettext_type=""; }
+
+   return "gettext\/$gettext_type";
+}
+
+sub find_leftout_files
+{
+    my (@buf_i18n_plain,
+       @buf_i18n_xml,
+       @buf_i18n_xml_unmarked,
+       @buf_i18n_ini,
+       @buf_potfiles,
+       @buf_potfiles_ignore,
+       @buf_allfiles,
+       @buf_allfiles_sorted,
+       @buf_potfiles_sorted
+    );
+
+    ## Search and find all translatable files
+    find sub { 
+       push @buf_i18n_plain, "$File::Find::name" if /\.(c|y|cc|cpp|c\+\+|h|gob)$/ 
+       }, "..";
+    find sub { 
+       push @buf_i18n_xml, "$File::Find::name" if /\.($xml_extension)$/ 
+       }, "..";
+    find sub {
+       push @buf_i18n_ini, "$File::Find::name" if /\.($ini_extension)$/ 
+       }, "..";
+    find sub {
+        push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/
+        }, "..";
+
+
+    open POTFILES, "POTFILES.in" or die "$PROGRAM:  there's no POTFILES.in!\n";
+
+    @buf_potfiles = grep /^[^#]/, <POTFILES>;
+                           
+    print "Searching for missing translatable files...\n" if $VERBOSE;
+
+    ## Check if we should ignore some found files, when
+    ## comparing with POTFILES.in
+    foreach my $ignore ("POTFILES.skip", "POTFILES.ignore") {
+        if (-s $ignore) {
+            open FILE, $ignore;
+            while (<FILE>) {
+                if (/^[^#]/){
+                    push @buf_potfiles_ignore, $_;
+                }
+            }
+           print "Found $ignore: Ignoring files...\n" if $VERBOSE;
+            @buf_potfiles = (@buf_potfiles_ignore, @buf_potfiles);
+        }
+    }
+
+    foreach my $file (@buf_i18n_plain)
+      {
+        my $in_comment = 0;
+       my $in_macro = 0;
+
+        open FILE, "<$file";
+        while (<FILE>)
+         {
+           # Handle continued multi-line comment.
+           if ($in_comment)
+             {
+               next unless s-.*\*/--;
+               $in_comment = 0;
+             }
+
+           # Handle continued macro.
+           if ($in_macro)
+             {
+               $in_macro = 0 unless /\\$/;
+               next;
+             }
+
+           # Handle start of macro (or any preprocessor directive).
+           if (/^\s*\#/)
+             {
+               $in_macro = 1 if /^([^\\]|\\.)*\\$/;
+               next;
+             }
+
+           # Handle comments and quoted text.
+           while (m-(/\*|//|\'|\")-) # \' and \" keep emacs perl mode happy
+             {
+               my $match = $1;
+               if ($match eq "/*")
+                 {
+                   if (!s-/\*.*?\*/--)
+                     {
+                       s-/\*.*--;
+                       $in_comment = 1;
+                     }
+                 }
+               elsif ($match eq "//")
+                 {
+                   s-//.*--;
+                 }
+               else # ' or "
+                 {
+                   if (!s-$match([^\\]|\\.)*?$match-QUOTEDTEXT-)
+                     {
+                       warn "mismatched quotes at line $. in $file\n";
+                       s-$match.*--;
+                     }
+                 }
+             }
+       
+
+           if (/_\(QUOTEDTEXT/)
+             {
+               ## Remove the first 3 chars and add newline
+               push @buf_allfiles, unpack("x3 A*", $file) . "\n";
+               last;
+             }
+         }
+       close FILE;
+      }
+
+    foreach my $file (@buf_i18n_xml) {
+        open FILE, "<$file";
+        while (<FILE>) {
+            if (/\s_(.*)=\"/ || /translatable=\"yes\"/){
+                push @buf_allfiles, unpack("x3 A*", $file) . "\n";
+                last;
+            }
+        }
+    }
+
+    foreach my $file (@buf_i18n_ini){
+        open FILE, "<$file";
+        while (<FILE>) {
+            if (/_(.*)=/){
+                push @buf_allfiles, unpack("x3 A*", $file) . "\n";
+                last;
+            }
+        }
+    }
+
+    foreach my $file (@buf_i18n_xml_unmarked){
+        push @buf_allfiles, unpack("x3 A*", $file) . "\n";
+    }
+
+
+    @buf_allfiles_sorted = sort (@buf_allfiles);
+    @buf_potfiles_sorted = sort (@buf_potfiles);
+
+    my %in2;
+    foreach (@buf_potfiles_sorted) {
+        $in2{$_} = 1;
+    }
+
+    my @result;
+
+    foreach (@buf_allfiles_sorted){
+        if (!exists($in2{$_})){
+            push @result, $_
+        }
+    }
+
+    ## Save file with information about the files missing
+    ## if any, and give information about this procedure.
+    if (@result) {
+       print "\n" if $VERBOSE;
+        open OUT, ">missing";
+        print OUT @result;
+        print "The following files contain translations and are currently not in use. Please\n";
+       print "consider adding these to the POTFILES.in file, located in the po/ directory.\n\n";
+       print @result, "\n";
+       print "If some of these files are left out on purpose then please add them to\n";
+       print "POTFILES.skip instead of POTFILES.in. A file 'missing' containing this list\n";
+        print "of left out files has been written in the current directory.\n";
+    }
+
+    ## If there is nothing to complain about, notify the user
+    else {
+        print "\nAll files containing translations are present in POTFILES.in.\n";
+    }
+}
+
+sub print_error_invalid_option
+{
+    ## Handle invalid arguments
+    print "Try `${PROGRAM} --help' for more information.\n";
+    exit 1;
+}
+
+sub generate_headers
+{
+    my $EXTRACT = `which intltool-extract 2>/dev/null`;
+    chomp $EXTRACT;
+
+    $EXTRACT = $ENV{"INTLTOOL_EXTRACT"} if $ENV{"INTLTOOL_EXTRACT"};
+
+    ## Generate the .h header files, so we can allow glade and
+    ## xml translation support
+    if (! -s $EXTRACT)
+    {
+       print "\n *** The intltool-extract script wasn't found!"
+            ."\n *** Without it, intltool-update can not generate files.\n";
+       exit;
+    }
+    else
+    {
+        open FILE, "<POTFILES.in";
+        while (<FILE>) {
+           chomp;
+
+           ## Find xml files in POTFILES.in and generate the
+           ## files with help from the extract script
+
+          my $gettext_type= &determine_type ($1);
+
+           if (/\.($xml_extension|$ini_extension)$/ || /^\[/){
+              $_ =~ s/^\[[^\[].*]\s*//;
+               my $filename = "../$_";
+
+               if ($VERBOSE){
+                   system($EXTRACT, "--update", "--type=$gettext_type", $filename);
+               } else {
+                  system($EXTRACT, "--update", "--type=$gettext_type", "--quiet", $filename);
+               }
+           }
+       }
+       close FILE;
+   }
+}
+
+sub generate_po_template
+{
+    ## Generate the potfiles from the POTFILES.in file
+
+    print "Building the $MODULE.pot...\n" if $VERBOSE;
+
+    move ("POTFILES.in", "POTFILES.in.old");
+
+    open INFILE, "<POTFILES.in.old";
+    open OUTFILE, ">POTFILES.in";
+    while (<INFILE>) {
+        s/\.($xml_extension|$ini_extension)$/$&.h/;
+        s/^\[.*]\s*(.*)/$1.h/;
+        print OUTFILE $_;
+    }
+    close OUTFILE;
+    close INFILE;
+
+    system ("xgettext", "--default-domain\=$MODULE", 
+                       "--directory\=\.\.",
+                       "--add-comments", 
+                       "--keyword\=\_", 
+                       "--keyword\=N\_", 
+                       "--keyword\=U\_",
+                       "--files-from\=\.\/POTFILES\.in");
+
+    move ("POTFILES.in.old", "POTFILES.in");
+
+    print "Removing generated header (.h) files..." if $VERBOSE;
+
+    open FILE, "<POTFILES.in";
+
+    while (<FILE>)
+    {
+        chomp;
+        unlink "../$_.h" if /\.($xml_extension|$ini_extension)$/;
+    }
+
+    close FILE;
+    print "done\n" if $VERBOSE;
+
+    if (!-e "$MODULE.po") {
+        print "WARNING: It seems that none of the files in POTFILES.in ".
+              "contain marked strings\n";
+        exit (1);
+    }
+
+    system ("rm", "-f", "$MODULE.pot");
+    move ("$MODULE.po", "$MODULE.pot") or die "$PROGRAM: couldn't move $MODULE.po to $MODULE.pot.\n";
+
+    print "Wrote $MODULE.pot\n" if $VERBOSE;
+}
+
+sub update_po_file
+{
+    my ($lang) = @_;
+
+    print "Merging $lang.po with $MODULE.pot..." if $VERBOSE;
+
+    copy ("$lang.po", "$lang.po.old") || die "copy failed: $!";
+
+    # Perform merge, remove backup file and the "messages" trash file 
+    # generated by gettext
+    system ("msgmerge", "$lang.po.old", "$MODULE.pot", "-o", "$lang.po");
+    unlink "$lang.po.old";
+    unlink "messages";
+}
+
+sub print_error_not_existing
+{
+    my ($file) = @_;
+
+    ## Report error if supplied language file is non-existing
+    print "$PROGRAM: $file does not exist!\n";
+    print "Try '$PROGRAM --help' for more information.\n";
+    exit;
+}
+
+sub gather_po_files
+{
+    my @po_files = glob ("./*.po");
+
+    @languages = map (&po_file2lang, @po_files);
+
+    foreach my $lang (@languages) {
+       $po_files_by_lang{$lang} = shift (@po_files);
+    }
+}
+
+sub po_file2lang ($)
+{
+    my $tmp = $_;
+    $tmp =~ s/^.*\/(.*)\.po$/$1/;
+    return $tmp;
+}
+
+sub print_status
+{
+    my ($lang) = @_;
+
+    system ("msgfmt", "--statistics", "$lang.po");
+    print "\n";
+}
+
+sub print_report
+{
+    &generate_headers;
+    &generate_po_template;
+    &gather_po_files;
+
+    foreach my $lang (@languages) {
+       print "$lang: ";
+       &update_po_file ($lang);
+    }
+
+    print "\n\n * Current translation support in $MODULE \n\n";
+
+    foreach my $lang (@languages){
+        print "$lang: ";
+       system ("msgfmt", "--statistics", "$lang.po");
+    }
+}
+
+sub find_package_name
+{
+    my $base_dirname = getcwd();
+    $base_dirname =~ s@.*/@@;
+
+    my ($conf_in, $src_dir);
+
+    if ($base_dirname =~ /^po(-.+)?$/) {
+        if (-f "../configure.in") {
+            $conf_in = "../configure.in";
+       } elsif (-f "../configure.ac") {
+           $conf_in = "../configure.ac";
+        } else {
+           my $makefile_source;
+           local (*IN);
+           open IN, "<Makefile" || die "can't open Makefile: $!";
+
+           while (<IN>) {
+               if (/^top_srcdir[ \t]*=/) {
+                   $src_dir = $_;
+                   # print "${src_dir}\n";
+
+                   $src_dir =~ s/^top_srcdir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/;
+                   # print "${src_dir}\n";
+                   chomp $src_dir;
+                   $conf_in = "$src_dir" . "/configure.in" . "\n";
+                   last;
+               }
+           }
+           $conf_in || die "Cannot find top_srcdir in Makefile."
+        }
+
+       my %varhash = ();
+        my $conf_source; {
+           local (*IN);
+           open (IN, "<$conf_in") || die "can't open $conf_in: $!";
+           while (<IN>) {
+              if (/^(\w+)=(\S+)/) { $varhash{$1} = $2 };
+           }
+           seek (IN, 0, 0);
+           local $/; # slurp mode
+           $conf_source = <IN>;
+        }
+
+       my $name = "";
+       $name = $1 if $conf_source =~ /^AM_INIT_AUTOMAKE\([\s\[]*([^,\)\s\]]+)/m;
+       if ($conf_source =~ /^AC_INIT\([\s\[]*([^,\)\s\]]+)\]?\s*,/m) {
+           $name = $1;
+           $varhash{"AC_PACKAGE_NAME"} = $1;
+       }
+       $name = $1 if $conf_source =~ /^GETTEXT_PACKAGE=\[?([^\s\]]+)/m;
+
+       $name = "\$AC_PACKAGE_NAME" if "$name" eq "AC_PACKAGE_NAME";
+
+       my $oldname = "";
+       while (($name =~ /[\$](\S+)/) && ("$oldname" ne "$name")) {
+           $oldname = $name;
+           if (exists $varhash{$1}) {
+               $name =~ s/[\$](\S+)/$varhash{$1}/;
+           }
+       }
+       return $name if $name;
+    }
+
+    print "$PROGRAM: Unable to determine package name.\n" .
+         "Make sure to run this script inside the po directory.\n";
+    exit;
+}
diff --git a/linphone-deps.filelist b/linphone-deps.filelist
new file mode 100755 (executable)
index 0000000..54ae39f
--- /dev/null
@@ -0,0 +1,10 @@
+./bin/avcodec-52.dll
+./bin/avformat-52.dll
+./bin/avutil-50.dll
+./bin/libeXosip2-4.dll
+./bin/libogg-0.dll
+./bin/libtheora-0.dll
+./bin/libxml2-2.dll
+./bin/libosip2-4.dll
+./bin/libosipparser2-4.dll
+./bin/swscale-0.dll
diff --git a/linphone.iss.in b/linphone.iss.in
new file mode 100644 (file)
index 0000000..b7726f5
--- /dev/null
@@ -0,0 +1,48 @@
+[Setup]\r
+AppName=Linphone\r
+AppVerName=Linphone version @LINPHONE_VERSION@\r
+AppPublisher=linphone.org\r
+AppPublisherURL=http://www.linphone.org\r
+AppSupportURL=http://www.linphone.org\r
+AppUpdatesURL=http://www.linphone.org\r
+DefaultDirName={pf}\Linphone\r
+DefaultGroupName=Linphone\r
+LicenseFile=COPYING\r
+;InfoBeforeFile=README\r
+OutputBaseFilename=setup\r
+Compression=lzma\r
+SolidCompression=yes\r
+ShowLanguageDialog=yes\r
+\r
+[Languages]\r
+Name: "english"; MessagesFile: "compiler:Default.isl"\r
+Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl";\r
+Name: "french";  MessagesFile: "compiler:Languages\French.isl"\r
+Name: "czech";   MessagesFile: "compiler:Languages\Czech.isl"\r
+Name: "german";  MessagesFile: "compiler:Languages\German.isl"\r
+Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"\r
+\r
+\r
+[Tasks]\r
+Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked\r
+\r
+[Files]\r
+#include "linphone-win32.filelist"\r
+\r
+[Icons]\r
+Name: "{group}\Linphone"; Filename: "{app}\bin\linphone-3.exe" ; WorkingDir: "{app}"\r
+Name: "{userdesktop}\Linphone"; Filename: "{app}\bin\linphone-3.exe"; WorkingDir: "{app}" ; Tasks: desktopicon\r
+\r
+[Registry]\r
+Root: HKCR; Subkey: "sip";\r
+Root: HKCR; Subkey: "sip"; ValueData: "URL: SIP protocol" ; ValueType:string\r
+Root: HKCR; Subkey: "sip"; ValueName: "EditFlags"; ValueData: "02 00 00 00" ; ValueType:binary\r
+Root: HKCR; Subkey: "sip"; ValueName: "URL Protocol" ;  ValueType:string\r
+Root: HKCR; Subkey: "sip\DefaultIcon"; ValueData: "{app}\bin\linphone-3.exe"; ValueType:string ; Flags:uninsdeletekey\r
+Root: HKCR; Subkey: "sip\shell"\r
+Root: HKCR; Subkey: "sip\shell\open"\r
+Root: HKCR; Subkey: "sip\shell\open\command"; ValueType:string ; ValueData: "{app}\bin\linphone-3.exe --workdir {app} --call %1"; Flags:uninsdeletekey\r
+\r
+[Run]\r
+Filename: "{app}\bin\linphone-3.exe"; Description: "{cm:LaunchProgram,Linphone}"; WorkingDir: "{app}" ; Flags: nowait postinstall skipifsilent\r
+\r
diff --git a/linphone.kdevelop b/linphone.kdevelop
new file mode 100644 (file)
index 0000000..27eac22
--- /dev/null
@@ -0,0 +1,558 @@
+<?xml version = '1.0'?>
+<kdevelop>
+  <general>
+    <author>Simon Morlat</author>
+    <email>simon.morlat@linphone.org</email>
+    <version>[3.1.2]</version>
+    <projectmanagement>KDevCustomProject</projectmanagement>
+    <primarylanguage>C</primarylanguage>
+    <ignoreparts/>
+    <projectname>linphone</projectname>
+    <projectdirectory>.</projectdirectory>
+    <absoluteprojectpath>false</absoluteprojectpath>
+    <description/>
+    <defaultencoding/>
+  </general>
+  <kdevcustomproject>
+    <run>
+      <directoryradio>executable</directoryradio>
+      <mainprogram>gtk-glade/linphone-3</mainprogram>
+      <programargs/>
+      <globaldebugarguments/>
+      <globalcwd/>
+      <useglobalprogram>false</useglobalprogram>
+      <terminal>false</terminal>
+      <autocompile>false</autocompile>
+      <autoinstall>false</autoinstall>
+      <autokdesu>false</autokdesu>
+      <envvars/>
+    </run>
+    <filetypes>
+      <filetype>*.java</filetype>
+      <filetype>*.h</filetype>
+      <filetype>*.H</filetype>
+      <filetype>*.hh</filetype>
+      <filetype>*.hxx</filetype>
+      <filetype>*.hpp</filetype>
+      <filetype>*.c</filetype>
+      <filetype>*.C</filetype>
+      <filetype>*.cc</filetype>
+      <filetype>*.cpp</filetype>
+      <filetype>*.c++</filetype>
+      <filetype>*.cxx</filetype>
+    </filetypes>
+    <blacklist>
+      <path>config.h</path>
+      <path>exosip</path>
+      <path>exosip/eXosip2.h</path>
+      <path>exosip/eXosip.c</path>
+      <path>exosip/eXosip_cfg.h</path>
+      <path>exosip/eXosip.h</path>
+      <path>exosip/eXutils.c</path>
+      <path>exosip/jauth.c</path>
+      <path>exosip/jcallback.c</path>
+      <path>exosip/jcall.c</path>
+      <path>exosip/jdialog.c</path>
+      <path>exosip/jevents.c</path>
+      <path>exosip/jfreinds.c</path>
+      <path>exosip/jidentity.c</path>
+      <path>exosip/jnotify.c</path>
+      <path>exosip/jpipe.c</path>
+      <path>exosip/jpipe.h</path>
+      <path>exosip/jpublish.c</path>
+      <path>exosip/jreg.c</path>
+      <path>exosip/jrequest.c</path>
+      <path>exosip/jresponse.c</path>
+      <path>exosip/jsubscribe.c</path>
+      <path>exosip/jsubscribers.c</path>
+      <path>exosip/misc.c</path>
+      <path>exosip/sdp_offans.c</path>
+      <path>exosip/udp.c</path>
+      <path>gnome</path>
+      <path>gnome/addressbook.c</path>
+      <path>gnome/addressbook.h</path>
+      <path>gnome/applet.c</path>
+      <path>gnome/callbacks.c</path>
+      <path>gnome/callbacks.h</path>
+      <path>gnome/friends.c</path>
+      <path>gnome/friends.h</path>
+      <path>gnome/gui_utils.c</path>
+      <path>gnome/gui_utils.h</path>
+      <path>gnome/interface.c</path>
+      <path>gnome/interface.h</path>
+      <path>gnome/linphone.c</path>
+      <path>gnome/linphone.h</path>
+      <path>gnome/main.c</path>
+      <path>gnome/presence.c</path>
+      <path>gnome/presence.h</path>
+      <path>gnome/propertybox.c</path>
+      <path>gnome/propertybox.h</path>
+      <path>gnome/support.c</path>
+      <path>gnome/support.h</path>
+      <path>gsmlib</path>
+      <path>gsmlib/code.c</path>
+      <path>gsmlib/config.h</path>
+      <path>gsmlib/debug.c</path>
+      <path>gsmlib/decode.c</path>
+      <path>gsmlib/gsmadd.c</path>
+      <path>gsmlib/gsm_create.c</path>
+      <path>gsmlib/gsm_decode.c</path>
+      <path>gsmlib/gsm_destroy.c</path>
+      <path>gsmlib/gsm_encode.c</path>
+      <path>gsmlib/gsm_explode.c</path>
+      <path>gsmlib/gsm.h</path>
+      <path>gsmlib/gsm_implode.c</path>
+      <path>gsmlib/gsm_option.c</path>
+      <path>gsmlib/gsm_print.c</path>
+      <path>gsmlib/gsm_wrapper.c</path>
+      <path>gsmlib/gsm_wrapper.h</path>
+      <path>gsmlib/long_term.c</path>
+      <path>gsmlib/lpc.c</path>
+      <path>gsmlib/preprocess.c</path>
+      <path>gsmlib/private.h</path>
+      <path>gsmlib/proto.h</path>
+      <path>gsmlib/rpe.c</path>
+      <path>gsmlib/short_term.c</path>
+      <path>gsmlib/table.c</path>
+      <path>gsmlib/toast.h</path>
+      <path>gsmlib/unproto.h</path>
+      <path>gtk</path>
+      <path>gtk/addressbook.c</path>
+      <path>gtk/addressbook.h</path>
+      <path>gtk/applet.c</path>
+      <path>gtk/callbacks.c</path>
+      <path>gtk/callbacks.h</path>
+      <path>gtk/friends.c</path>
+      <path>gtk/friends.h</path>
+      <path>gtk/gui_utils.c</path>
+      <path>gtk/gui_utils.h</path>
+      <path>gtk/interface.c</path>
+      <path>gtk/interface.h</path>
+      <path>gtk/linphone.c</path>
+      <path>gtk/linphone.h</path>
+      <path>gtk/main.c</path>
+      <path>gtk/presence.c</path>
+      <path>gtk/presence.h</path>
+      <path>gtk/propertybox.c</path>
+      <path>gtk/propertybox.h</path>
+      <path>gtk/support.c</path>
+      <path>gtk/support.h</path>
+      <path>intl</path>
+      <path>intl/bindtextdom.c</path>
+      <path>intl/cat-compat.c</path>
+      <path>intl/dcgettext.c</path>
+      <path>intl/dgettext.c</path>
+      <path>intl/explodename.c</path>
+      <path>intl/finddomain.c</path>
+      <path>intl/gettext.c</path>
+      <path>intl/gettext.h</path>
+      <path>intl/gettextP.h</path>
+      <path>intl/hash-string.h</path>
+      <path>intl/intl-compat.c</path>
+      <path>intl/l10nflist.c</path>
+      <path>intl/libgettext.h</path>
+      <path>intl/loadinfo.h</path>
+      <path>intl/loadmsgcat.c</path>
+      <path>intl/localealias.c</path>
+      <path>intl/textdomain.c</path>
+      <path>lpc10-1.5</path>
+      <path>lpc10-1.5/analys.c</path>
+      <path>lpc10-1.5/bitio.c</path>
+      <path>lpc10-1.5/bsynz.c</path>
+      <path>lpc10-1.5/chanwr.c</path>
+      <path>lpc10-1.5/dcbias.c</path>
+      <path>lpc10-1.5/decode.c</path>
+      <path>lpc10-1.5/deemp.c</path>
+      <path>lpc10-1.5/difmag.c</path>
+      <path>lpc10-1.5/dyptrk.c</path>
+      <path>lpc10-1.5/encode.c</path>
+      <path>lpc10-1.5/energy.c</path>
+      <path>lpc10-1.5/f2c.h</path>
+      <path>lpc10-1.5/f2clib.c</path>
+      <path>lpc10-1.5/ham84.c</path>
+      <path>lpc10-1.5/hp100.c</path>
+      <path>lpc10-1.5/invert.c</path>
+      <path>lpc10-1.5/irc2pc.c</path>
+      <path>lpc10-1.5/ivfilt.c</path>
+      <path>lpc10-1.5/lpc10.h</path>
+      <path>lpc10-1.5/lpc10_wrapper.c</path>
+      <path>lpc10-1.5/lpc10_wrapper.h</path>
+      <path>lpc10-1.5/lpcdec.c</path>
+      <path>lpc10-1.5/lpcenc.c</path>
+      <path>lpc10-1.5/lpcini.c</path>
+      <path>lpc10-1.5/lpfilt.c</path>
+      <path>lpc10-1.5/median.c</path>
+      <path>lpc10-1.5/mload.c</path>
+      <path>lpc10-1.5/onset.c</path>
+      <path>lpc10-1.5/pitsyn.c</path>
+      <path>lpc10-1.5/placea.c</path>
+      <path>lpc10-1.5/placev.c</path>
+      <path>lpc10-1.5/preemp.c</path>
+      <path>lpc10-1.5/prepro.c</path>
+      <path>lpc10-1.5/random.c</path>
+      <path>lpc10-1.5/rcchk.c</path>
+      <path>lpc10-1.5/synths.c</path>
+      <path>lpc10-1.5/tbdm.c</path>
+      <path>lpc10-1.5/voicin.c</path>
+      <path>lpc10-1.5/vparms.c</path>
+      <path>media_api</path>
+      <path>media_api/apitest.c</path>
+      <path>media_api/apitest.h</path>
+      <path>media_api/basiccall.c</path>
+      <path>media_api/basiccall.h</path>
+      <path>media_api/callmember.c</path>
+      <path>media_api/callmember.h</path>
+      <path>media_api/common.h</path>
+      <path>media_api/media_api.c</path>
+      <path>media_api/media_api.h</path>
+      <path>media_api/mediaflow.c</path>
+      <path>media_api/mediaflow.h</path>
+      <path>mediastreamer</path>
+      <path>mediastreamer/affine.c</path>
+      <path>mediastreamer/affine.h</path>
+      <path>mediastreamer/alsacard.c</path>
+      <path>mediastreamer/alsacard.h</path>
+      <path>mediastreamer/audiostream.c</path>
+      <path>mediastreamer/g711common.h</path>
+      <path>mediastreamer/hpuxsndcard.c</path>
+      <path>mediastreamer/jackcard.c</path>
+      <path>mediastreamer/jackcard.h</path>
+      <path>mediastreamer/mediastream.c</path>
+      <path>mediastreamer/mediastream.h</path>
+      <path>mediastreamer/msAlawdec.c</path>
+      <path>mediastreamer/msAlawdec.h</path>
+      <path>mediastreamer/msAlawenc.c</path>
+      <path>mediastreamer/msAlawenc.h</path>
+      <path>mediastreamer/msavdecoder.c</path>
+      <path>mediastreamer/msavdecoder.h</path>
+      <path>mediastreamer/msavencoder.c</path>
+      <path>mediastreamer/msavencoder.h</path>
+      <path>mediastreamer/msbuffer.c</path>
+      <path>mediastreamer/msbuffer.h</path>
+      <path>mediastreamer/ms.c</path>
+      <path>mediastreamer/mscodec.c</path>
+      <path>mediastreamer/mscodec.h</path>
+      <path>mediastreamer/mscopy.c</path>
+      <path>mediastreamer/mscopy.h</path>
+      <path>mediastreamer/msfdispatcher.c</path>
+      <path>mediastreamer/msfdispatcher.h</path>
+      <path>mediastreamer/msfifo.c</path>
+      <path>mediastreamer/msfifo.h</path>
+      <path>mediastreamer/msfilter.c</path>
+      <path>mediastreamer/msfilter.h</path>
+      <path>mediastreamer/msGSMdecoder.c</path>
+      <path>mediastreamer/msGSMdecoder.h</path>
+      <path>mediastreamer/msGSMencoder.c</path>
+      <path>mediastreamer/msGSMencoder.h</path>
+      <path>mediastreamer/ms.h</path>
+      <path>mediastreamer/msLPC10decoder.c</path>
+      <path>mediastreamer/msLPC10decoder.h</path>
+      <path>mediastreamer/msLPC10encoder.c</path>
+      <path>mediastreamer/msLPC10encoder.h</path>
+      <path>mediastreamer/msMUlawdec.c</path>
+      <path>mediastreamer/msMUlawdec.h</path>
+      <path>mediastreamer/msMUlawenc.c</path>
+      <path>mediastreamer/msMUlawenc.h</path>
+      <path>mediastreamer/msnosync.c</path>
+      <path>mediastreamer/msnosync.h</path>
+      <path>mediastreamer/msossread.c</path>
+      <path>mediastreamer/msossread.h</path>
+      <path>mediastreamer/msosswrite.c</path>
+      <path>mediastreamer/msosswrite.h</path>
+      <path>mediastreamer/msqdispatcher.c</path>
+      <path>mediastreamer/msqdispatcher.h</path>
+      <path>mediastreamer/msqueue.c</path>
+      <path>mediastreamer/msqueue.h</path>
+      <path>mediastreamer/msread.c</path>
+      <path>mediastreamer/msread.h</path>
+      <path>mediastreamer/msringplayer.c</path>
+      <path>mediastreamer/msringplayer.h</path>
+      <path>mediastreamer/msrtprecv.c</path>
+      <path>mediastreamer/msrtprecv.h</path>
+      <path>mediastreamer/msrtpsend.c</path>
+      <path>mediastreamer/msrtpsend.h</path>
+      <path>mediastreamer/mssdlout.c</path>
+      <path>mediastreamer/mssdlout.h</path>
+      <path>mediastreamer/mssmpeg.c</path>
+      <path>mediastreamer/mssmpeg.h</path>
+      <path>mediastreamer/mssoundread.c</path>
+      <path>mediastreamer/mssoundread.h</path>
+      <path>mediastreamer/mssoundwrite.c</path>
+      <path>mediastreamer/mssoundwrite.h</path>
+      <path>mediastreamer/msspeexdec.c</path>
+      <path>mediastreamer/msspeexdec.h</path>
+      <path>mediastreamer/msspeexenc.c</path>
+      <path>mediastreamer/msspeexenc.h</path>
+      <path>mediastreamer/mssync.c</path>
+      <path>mediastreamer/mssync.h</path>
+      <path>mediastreamer/mstcpclient.c</path>
+      <path>mediastreamer/mstcpclient.h</path>
+      <path>mediastreamer/mstcpserv.c</path>
+      <path>mediastreamer/mstcpserv.h</path>
+      <path>mediastreamer/mstimer.c</path>
+      <path>mediastreamer/mstimer.h</path>
+      <path>mediastreamer/mstruespeechdecoder.c</path>
+      <path>mediastreamer/mstruespeechdecoder.h</path>
+      <path>mediastreamer/mstruespeechencoder.c</path>
+      <path>mediastreamer/mstruespeechencoder.h</path>
+      <path>mediastreamer/msutils.h</path>
+      <path>mediastreamer/msv4l.c</path>
+      <path>mediastreamer/msv4l.h</path>
+      <path>mediastreamer/msvideooutput.c</path>
+      <path>mediastreamer/msvideooutput.h</path>
+      <path>mediastreamer/msvideosource.c</path>
+      <path>mediastreamer/msvideosource.h</path>
+      <path>mediastreamer/mswrite.c</path>
+      <path>mediastreamer/mswrite.h</path>
+      <path>mediastreamer/msxine.c</path>
+      <path>mediastreamer/msxine.h</path>
+      <path>mediastreamer/osscard.c</path>
+      <path>mediastreamer/osscard.h</path>
+      <path>mediastreamer/rfc2429.h</path>
+      <path>mediastreamer/ring_test.c</path>
+      <path>mediastreamer/sndcard.c</path>
+      <path>mediastreamer/sndcard.h</path>
+      <path>mediastreamer/test_alaw.c</path>
+      <path>mediastreamer/test.c</path>
+      <path>mediastreamer/test_gsm.c</path>
+      <path>mediastreamer/test_lpc10.c</path>
+      <path>mediastreamer/test_mulaw.c</path>
+      <path>mediastreamer/test_rtprecv.c</path>
+      <path>mediastreamer/test_smpeg.c</path>
+      <path>mediastreamer/test_speex.c</path>
+      <path>mediastreamer/test_truespeech.c</path>
+      <path>mediastreamer/test_v4l.c</path>
+      <path>mediastreamer/test_videostream.c</path>
+      <path>mediastreamer/test_xine.c</path>
+      <path>mediastreamer/videoclient.c</path>
+      <path>mediastreamer/videoserver.c</path>
+      <path>mediastreamer/videostream.c</path>
+      <path>mediastreamer/waveheader.h</path>
+      <path>po</path>
+      <path>po/cat-id-tbl.c</path>
+      <path>win32acm</path>
+      <path>win32acm/afl.c</path>
+      <path>win32acm/com.h</path>
+      <path>win32acm/config.h</path>
+      <path>win32acm/cpudetect.c</path>
+      <path>win32acm/cpudetect.h</path>
+      <path>win32acm/cputable.h</path>
+      <path>win32acm/driver.c</path>
+      <path>win32acm/driver.h</path>
+      <path>win32acm/elfdll.c</path>
+      <path>win32acm/ext.c</path>
+      <path>win32acm/ext.h</path>
+      <path>win32acm/ldt_keeper.c</path>
+      <path>win32acm/ldt_keeper.h</path>
+      <path>win32acm/loader.h</path>
+      <path>win32acm/module.c</path>
+      <path>win32acm/mp_msg.c</path>
+      <path>win32acm/mp_msg.h</path>
+      <path>win32acm/pe_image.c</path>
+      <path>win32acm/pe_resource.c</path>
+      <path>win32acm/registry.c</path>
+      <path>win32acm/registry.h</path>
+      <path>win32acm/resource.c</path>
+      <path>win32acm/test_truespeech.c</path>
+      <path>win32acm/win32.c</path>
+      <path>win32acm/win32codec.c</path>
+      <path>win32acm/win32codec.h</path>
+      <path>win32acm/win32.h</path>
+      <path>win32acm/wine</path>
+      <path>win32acm/wine/basetsd.h</path>
+      <path>win32acm/wine/debugtools.h</path>
+      <path>win32acm/wine/driver.h</path>
+      <path>win32acm/wine/elfdll.h</path>
+      <path>win32acm/wine/heap.h</path>
+      <path>win32acm/wine/ldt.h</path>
+      <path>win32acm/wine/mmreg.h</path>
+      <path>win32acm/wine/module.h</path>
+      <path>win32acm/wine/msacmdrv.h</path>
+      <path>win32acm/wine/msacm.h</path>
+      <path>win32acm/wine/ntdef.h</path>
+      <path>win32acm/wine/pe_image.h</path>
+      <path>win32acm/wine/poppack.h</path>
+      <path>win32acm/wine/pshpack1.h</path>
+      <path>win32acm/wine/pshpack2.h</path>
+      <path>win32acm/wine/pshpack4.h</path>
+      <path>win32acm/wine/pshpack8.h</path>
+      <path>win32acm/wine/vfw.h</path>
+      <path>win32acm/wine/winbase.h</path>
+      <path>win32acm/wine/windef.h</path>
+      <path>win32acm/wine/windows.h</path>
+      <path>win32acm/wine/winerror.h</path>
+      <path>win32acm/wine/winestring.h</path>
+      <path>win32acm/wine/winnt.h</path>
+      <path>win32acm/wine/winreg.h</path>
+      <path>win32acm/wine/winuser.h</path>
+      <path>win32acm/wineacm.h</path>
+      <path>win32acm/wrapper.h</path>
+      <path>builddate.h</path>
+    </blacklist>
+    <build>
+      <buildtool>make</buildtool>
+      <builddir/>
+    </build>
+    <other>
+      <prio>0</prio>
+      <otherbin/>
+      <defaulttarget/>
+      <otheroptions/>
+      <selectedenvironment>default</selectedenvironment>
+      <environments>
+        <default/>
+      </environments>
+    </other>
+    <make>
+      <abortonerror>true</abortonerror>
+      <numberofjobs>0</numberofjobs>
+      <prio>0</prio>
+      <dontact>false</dontact>
+      <makebin/>
+      <defaulttarget/>
+      <makeoptions/>
+      <selectedenvironment>default</selectedenvironment>
+      <environments>
+        <default/>
+      </environments>
+    </make>
+  </kdevcustomproject>
+  <kdevdebugger>
+    <general>
+      <dbgshell/>
+      <gdbpath/>
+      <configGdbScript/>
+      <runShellScript/>
+      <runGdbScript/>
+      <breakonloadinglibs>true</breakonloadinglibs>
+      <separatetty>false</separatetty>
+      <floatingtoolbar>false</floatingtoolbar>
+      <raiseGDBOnStart>false</raiseGDBOnStart>
+    </general>
+    <display>
+      <staticmembers>false</staticmembers>
+      <demanglenames>true</demanglenames>
+      <outputradix>10</outputradix>
+    </display>
+  </kdevdebugger>
+  <kdevdoctreeview>
+    <ignoretocs>
+      <toc>ada</toc>
+      <toc>ada_bugs_gcc</toc>
+      <toc>bash</toc>
+      <toc>bash_bugs</toc>
+      <toc>clanlib</toc>
+      <toc>fortran_bugs_gcc</toc>
+      <toc>gnome1</toc>
+      <toc>gnustep</toc>
+      <toc>gtk</toc>
+      <toc>gtk_bugs</toc>
+      <toc>haskell</toc>
+      <toc>haskell_bugs_ghc</toc>
+      <toc>java_bugs_gcc</toc>
+      <toc>java_bugs_sun</toc>
+      <toc>kde2book</toc>
+      <toc>libstdc++</toc>
+      <toc>opengl</toc>
+      <toc>pascal_bugs_fp</toc>
+      <toc>php</toc>
+      <toc>php_bugs</toc>
+      <toc>perl</toc>
+      <toc>perl_bugs</toc>
+      <toc>python</toc>
+      <toc>python_bugs</toc>
+      <toc>qt-kdev3</toc>
+      <toc>ruby</toc>
+      <toc>ruby_bugs</toc>
+      <toc>sdl</toc>
+      <toc>stl</toc>
+      <toc>sw</toc>
+      <toc>w3c-dom-level2-html</toc>
+      <toc>w3c-svg</toc>
+      <toc>w3c-uaag10</toc>
+      <toc>wxwidgets_bugs</toc>
+    </ignoretocs>
+    <ignoreqt_xml>
+      <toc>Guide to the Qt Translation Tools</toc>
+      <toc>Qt Assistant Manual</toc>
+      <toc>Qt Designer Manual</toc>
+      <toc>Qt Reference Documentation</toc>
+      <toc>qmake User Guide</toc>
+    </ignoreqt_xml>
+    <ignoredoxygen>
+      <toc>KDE Libraries (Doxygen)</toc>
+    </ignoredoxygen>
+  </kdevdoctreeview>
+  <kdevfilecreate>
+    <filetypes/>
+    <useglobaltypes>
+      <type ext="c" />
+      <type ext="h" />
+    </useglobaltypes>
+  </kdevfilecreate>
+  <kdevcppsupport>
+    <qt>
+      <used>false</used>
+      <version>3</version>
+      <includestyle>3</includestyle>
+      <root></root>
+      <designerintegration>EmbeddedKDevDesigner</designerintegration>
+      <qmake></qmake>
+      <designer></designer>
+      <designerpluginpaths/>
+    </qt>
+    <references/>
+    <codecompletion>
+      <automaticCodeCompletion>false</automaticCodeCompletion>
+      <automaticArgumentsHint>true</automaticArgumentsHint>
+      <automaticHeaderCompletion>true</automaticHeaderCompletion>
+      <codeCompletionDelay>250</codeCompletionDelay>
+      <argumentsHintDelay>400</argumentsHintDelay>
+      <headerCompletionDelay>250</headerCompletionDelay>
+      <showOnlyAccessibleItems>false</showOnlyAccessibleItems>
+      <completionBoxItemOrder>0</completionBoxItemOrder>
+      <howEvaluationContextMenu>true</howEvaluationContextMenu>
+      <showCommentWithArgumentHint>true</showCommentWithArgumentHint>
+      <statusBarTypeEvaluation>false</statusBarTypeEvaluation>
+      <namespaceAliases>std=_GLIBCXX_STD;__gnu_cxx=std</namespaceAliases>
+      <processPrimaryTypes>true</processPrimaryTypes>
+      <processFunctionArguments>false</processFunctionArguments>
+      <preProcessAllHeaders>false</preProcessAllHeaders>
+      <parseMissingHeadersExperimental>false</parseMissingHeadersExperimental>
+      <resolveIncludePathsUsingMakeExperimental>false</resolveIncludePathsUsingMakeExperimental>
+      <alwaysParseInBackground>true</alwaysParseInBackground>
+      <usePermanentCaching>true</usePermanentCaching>
+      <alwaysIncludeNamespaces>false</alwaysIncludeNamespaces>
+      <includePaths>.;</includePaths>
+    </codecompletion>
+    <creategettersetter>
+      <prefixGet/>
+      <prefixSet>set</prefixSet>
+      <prefixVariable>m_,_</prefixVariable>
+      <parameterName>theValue</parameterName>
+      <inlineGet>true</inlineGet>
+      <inlineSet>true</inlineSet>
+    </creategettersetter>
+    <splitheadersource>
+      <enabled>false</enabled>
+      <synchronize>true</synchronize>
+      <orientation>Vertical</orientation>
+    </splitheadersource>
+  </kdevcppsupport>
+  <kdevfileview>
+    <groups>
+      <hidenonprojectfiles>false</hidenonprojectfiles>
+      <hidenonlocation>false</hidenonlocation>
+    </groups>
+    <tree>
+      <hidepatterns>*.o,*.lo,CVS</hidepatterns>
+      <hidenonprojectfiles>false</hidenonprojectfiles>
+    </tree>
+  </kdevfileview>
+  <cppsupportpart>
+    <filetemplates>
+      <interfacesuffix>.h</interfacesuffix>
+      <implementationsuffix>.cpp</implementationsuffix>
+    </filetemplates>
+  </cppsupportpart>
+</kdevelop>
diff --git a/linphone.spec.in b/linphone.spec.in
new file mode 100644 (file)
index 0000000..3bdeeea
--- /dev/null
@@ -0,0 +1,258 @@
+# -*- rpm-spec -*-
+
+## rpmbuild options
+
+# default is to build with video support & without truespeech support
+%define                video           %{?_without_video:0}%{!?_without_video:1}
+%define                truespeech      %{?_with_truespeech:1}%{!?_with_truespeech:0}
+
+# Linphone requires an old osip version, sometimes (e.g. fc6)
+# delivered as "compat-"
+%define _without_old_osip      0
+
+Name:           linphone
+Version:        @VERSION@
+Release:        1%{?dist}
+Summary:        Phone anywhere in the whole world by using the Internet
+
+Group:          Applications/Communications
+License:        GPL
+URL:            http://www.linphone.org
+Source0:        http://download.savannah.gnu.org/releases/linphone/stable/source/%{name}-%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+%ifarch %{ix86}
+BuildArch:     i686
+%endif
+
+BuildRequires:  gnome-panel-devel libgnomeui-devel glib2-devel alsa-lib-devel
+BuildRequires:  libosip2-devel speex-devel gettext desktop-file-utils
+BuildRequires: readline-devel ncurses-devel
+BuildRequires:  intltool gettext-devel
+%if %{video}
+BuildRequires: ffmpeg-devel SDL-devel
+%endif
+
+%description
+Linphone is mostly sip compliant. It works successfully with these
+implementations:
+    * eStara softphone (commercial software for windows)
+    * Pingtel phones (with DNS enabled and VLAN QOS support disabled).
+    * Hotsip, a free of charge phone for Windows.
+    * Vocal, an open source SIP stack from Vovida that includes a SIP proxy
+        that works with linphone since version 0.7.1.
+    * Siproxd is a free sip proxy being developped by Thomas Ries because he
+        would like to have linphone working behind his firewall. Siproxd is
+        simple to setup and works perfectly with linphone.
+    * Partysip aims at being a generic and fully functionnal SIP proxy. Visit
+        the web page for more details on its functionalities.
+
+Linphone may work also with other sip phones, but this has not been tested yet.
+
+%package devel
+Summary:        Development libraries for linphone
+Group:          Development/Libraries
+Requires:       %{name} = %{version}-%{release}
+Requires:      ortp-devel = @ORTP_VERSION@
+Requires:      glib2-devel
+
+%description    devel
+Libraries and headers required to develop software with linphone.
+
+%package -n ortp
+Summary:        A C library implementing the RTP protocol (rfc1889)
+Group:          System Environment/Libraries
+Version:        @ORTP_VERSION@
+
+%description -n ortp
+oRTP is a LGPL licensed C library implementing the RTP protocol (rfc1889). It
+is available for most *nix clones (primilarly Linux and HP-UX), and Win32.
+
+%package -n ortp-devel
+Summary:        Development libraries for ortp
+Group:          Development/Libraries
+Version:        @ORTP_VERSION@
+Requires:      ortp = @ORTP_VERSION@
+
+%description -n ortp-devel
+oRTP is a LGPL licensed C library implementing the RTP protocol (rfc1889). It
+is available for most *nix clones (primilarly Linux and HP-UX), and Win32.
+
+This package contains header files and development libraries needed to
+develop programs using the oRTP library.
+
+%package -n mediastreamer2
+Summary:        Audio/Video real-time streaming
+Group:          Development/Libraries
+Version:        @MS2_VERSION@
+
+%description -n mediastreamer2
+Mediastreamer2 is a GPL licensed library to make audio and video
+real-time streaming and processing. Written in pure C, it is based
+upon the oRTP library.
+
+%package -n mediastreamer2-devel
+Summary:        Headers, libraries and docs for the mediastreamer2 library
+Group:          Development/Libraries
+Version:        @MS2_VERSION@
+Requires:      mediastreamer2 = @MS2_VERSION@
+Requires:      ortp-devel = @ORTP_VERSION@
+
+%description -n mediastreamer2-devel
+Mediastreamer2 is a GPL licensed library to make audio and video
+real-time streaming and processing. Written in pure C, it is based
+upon the ortp library.
+
+This package contains header files and development libraries needed to
+develop programs using the mediastreamer2 library.
+
+%prep
+%setup -q
+#%patch -p 1 -b .pkgconfig
+#%patch1 -p 1 -b .Werror
+#%patch2 -p 1 -b .old
+
+%build
+%configure \
+       --with-osip=/usr \
+       --with-speex=/usr \
+       --with-readline=/usr \
+%if %{video}
+       --enable-video \
+       --with-ffmpeg=/usr \
+       --with-sdl=/usr \
+%endif
+%if %{truespeech}
+       --enable-truespeech \
+%endif
+%{?_without_old_osip: --with-osip-version=2.2.2} \
+       --enable-ipv6
+%__make %{?_smp_mflags}
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+install -p -m 0644 pixmaps/linphone2.png $RPM_BUILD_ROOT%{_datadir}/pixmaps
+%find_lang %{name}
+rm $RPM_BUILD_ROOT%{_datadir}/gnome/apps/Internet/linphone.desktop
+desktop-file-install --vendor=fedora \
+  --delete-original \
+  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
+  --add-category X-Fedora \
+  --add-category Telephony \
+  --add-category GTK \
+  $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%post -n ortp -p /sbin/ldconfig
+
+%postun -n ortp -p /sbin/ldconfig
+
+%post -n mediastreamer2 -p /sbin/ldconfig
+
+%postun -n mediastreamer2 -p /sbin/ldconfig
+
+%files -f %{name}.lang
+%defattr(-,root,root)
+%doc AUTHORS ChangeLog COPYING NEWS README TODO
+%{_bindir}/*
+%{_libdir}/bonobo/servers/*.server
+%{_libdir}/liblinphone.so.*
+%exclude %{_libdir}/libortp*
+%{_libexecdir}/*
+%{_mandir}/*
+%{_datadir}/applications/*%{name}.desktop
+%{_datadir}/gnome/help/linphone
+%{_datadir}/gnome-2.0/ui/*.xml
+%{_datadir}/pixmaps/linphone
+%{_datadir}/pixmaps/linphone2.png
+%{_datadir}/sounds/linphone
+
+%files devel
+%defattr(-,root,root)
+%{_includedir}/linphone
+%{_libdir}/liblinphone.a
+%{_libdir}/liblinphone.la
+%{_libdir}/liblinphone.so
+%{_libdir}/pkgconfig/linphone.pc
+
+%files -n ortp
+%defattr(-,root,root)
+%doc oRTP/AUTHORS oRTP/ChangeLog oRTP/COPYING oRTP/NEWS oRTP/README oRTP/TODO
+%{_libdir}/libortp.so.*
+%exclude %{_libdir}/liblinphone*
+
+%files -n ortp-devel
+%defattr(-,root,root)
+%{_includedir}/ortp
+%{_libdir}/pkgconfig/ortp.pc
+%{_libdir}/libortp.a
+%{_libdir}/libortp.la
+%{_libdir}/libortp.so
+%{_datadir}/gtk-doc/html/ortp
+
+%files -n mediastreamer2
+%defattr(-,root,root)
+%doc mediastreamer2/AUTHORS mediastreamer2/ChangeLog mediastreamer2/COPYING
+%doc mediastreamer2/NEWS mediastreamer2/README
+%{_libdir}/libmediastreamer.so.*
+%{_libdir}/libquickstream.so.*
+
+%files -n mediastreamer2-devel
+%{_includedir}/mediastreamer2
+%{_libdir}/pkgconfig/mediastreamer.pc
+%{_libdir}/libmediastreamer.so
+%{_libdir}/libmediastreamer.*a
+%{_libdir}/libquickstream.so
+%{_libdir}/libquickstream.*a
+
+%changelog
+* Wed Sep 28 2005 Francois-Xavier 'FiX' KOWALSKI <francois-xavier.kowalski@hp.com> - 1.2.0pre3
+- Updated to latests Simon's work
+
+* Fri May 27 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 1.0.1-3
+- Fix multiple menu entry and missing icon (#158975)
+- Clean up spec file
+
+* Fri May  6 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 1.0.1-2
+- Fix libosip2-devel BR
+
+* Wed May  4 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 1.0.1-1
+- Update to 1.0.1
+- Port patches from devel
+
+* Wed Mar 23 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.12.2-7
+- pkgconfig and -devel fixes
+
+* Wed Mar 23 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.12.2-6
+- Fix build on x86_64
+
+* Sat Mar 19 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.12.2-5
+- %%
+
+* Sat Mar 19 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.12.2-4
+- Used %%find_lang
+- Tightened up %%files
+- Streamlined spec file
+
+* Thu Mar 17 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.12.2-3
+- Broke %%description at 80 columns
+
+* Wed Mar 16 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.12.2-2
+- Removed explicit Requires
+
+* Tue Mar 15 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.12.2-1
+- Bump release to 1
+- Cleaned up the -docs and -speex patches
+
+* Fri Jan 21 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0:0.12.2-0.iva.1
+- Fixed a silly spec error
+
+* Fri Jan 21 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0:0.12.2-0.iva.0
+- Initial RPM release.
diff --git a/linphone/ABOUT-NLS b/linphone/ABOUT-NLS
deleted file mode 100644 (file)
index ec20977..0000000
+++ /dev/null
@@ -1,1101 +0,0 @@
-1 Notes on the Free Translation Project
-***************************************
-
-Free software is going international!  The Free Translation Project is
-a way to get maintainers of free software, translators, and users all
-together, so that free software will gradually become able to speak many
-languages.  A few packages already provide translations for their
-messages.
-
-   If you found this `ABOUT-NLS' file inside a distribution, you may
-assume that the distributed package does use GNU `gettext' internally,
-itself available at your nearest GNU archive site.  But you do _not_
-need to install GNU `gettext' prior to configuring, installing or using
-this package with messages translated.
-
-   Installers will find here some useful hints.  These notes also
-explain how users should proceed for getting the programs to use the
-available translations.  They tell how people wanting to contribute and
-work on translations can contact the appropriate team.
-
-   When reporting bugs in the `intl/' directory or bugs which may be
-related to internationalization, you should tell about the version of
-`gettext' which is used.  The information can be found in the
-`intl/VERSION' file, in internationalized packages.
-
-1.1 Quick configuration advice
-==============================
-
-If you want to exploit the full power of internationalization, you
-should configure it using
-
-     ./configure --with-included-gettext
-
-to force usage of internationalizing routines provided within this
-package, despite the existence of internationalizing capabilities in the
-operating system where this package is being installed.  So far, only
-the `gettext' implementation in the GNU C library version 2 provides as
-many features (such as locale alias, message inheritance, automatic
-charset conversion or plural form handling) as the implementation here.
-It is also not possible to offer this additional functionality on top
-of a `catgets' implementation.  Future versions of GNU `gettext' will
-very likely convey even more functionality.  So it might be a good idea
-to change to GNU `gettext' as soon as possible.
-
-   So you need _not_ provide this option if you are using GNU libc 2 or
-you have installed a recent copy of the GNU gettext package with the
-included `libintl'.
-
-1.2 INSTALL Matters
-===================
-
-Some packages are "localizable" when properly installed; the programs
-they contain can be made to speak your own native language.  Most such
-packages use GNU `gettext'.  Other packages have their own ways to
-internationalization, predating GNU `gettext'.
-
-   By default, this package will be installed to allow translation of
-messages.  It will automatically detect whether the system already
-provides the GNU `gettext' functions.  If not, the included GNU
-`gettext' library will be used.  This library is wholly contained
-within this package, usually in the `intl/' subdirectory, so prior
-installation of the GNU `gettext' package is _not_ required.
-Installers may use special options at configuration time for changing
-the default behaviour.  The commands:
-
-     ./configure --with-included-gettext
-     ./configure --disable-nls
-
-will, respectively, bypass any pre-existing `gettext' to use the
-internationalizing routines provided within this package, or else,
-_totally_ disable translation of messages.
-
-   When you already have GNU `gettext' installed on your system and run
-configure without an option for your new package, `configure' will
-probably detect the previously built and installed `libintl.a' file and
-will decide to use this.  This might not be desirable.  You should use
-the more recent version of the GNU `gettext' library.  I.e. if the file
-`intl/VERSION' shows that the library which comes with this package is
-more recent, you should use
-
-     ./configure --with-included-gettext
-
-to prevent auto-detection.
-
-   The configuration process will not test for the `catgets' function
-and therefore it will not be used.  The reason is that even an
-emulation of `gettext' on top of `catgets' could not provide all the
-extensions of the GNU `gettext' library.
-
-   Internationalized packages usually have many `po/LL.po' files, where
-LL gives an ISO 639 two-letter code identifying the language.  Unless
-translations have been forbidden at `configure' time by using the
-`--disable-nls' switch, all available translations are installed
-together with the package.  However, the environment variable `LINGUAS'
-may be set, prior to configuration, to limit the installed set.
-`LINGUAS' should then contain a space separated list of two-letter
-codes, stating which languages are allowed.
-
-1.3 Using This Package
-======================
-
-As a user, if your language has been installed for this package, you
-only have to set the `LANG' environment variable to the appropriate
-`LL_CC' combination.  Here `LL' is an ISO 639 two-letter language code,
-and `CC' is an ISO 3166 two-letter country code.  For example, let's
-suppose that you speak German and live in Germany.  At the shell
-prompt, merely execute `setenv LANG de_DE' (in `csh'),
-`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
-This can be done from your `.login' or `.profile' file, once and for
-all.
-
-   You might think that the country code specification is redundant.
-But in fact, some languages have dialects in different countries.  For
-example, `de_AT' is used for Austria, and `pt_BR' for Brazil.  The
-country code serves to distinguish the dialects.
-
-   The locale naming convention of `LL_CC', with `LL' denoting the
-language and `CC' denoting the country, is the one use on systems based
-on GNU libc.  On other systems, some variations of this scheme are
-used, such as `LL' or `LL_CC.ENCODING'.  You can get the list of
-locales supported by your system for your language by running the
-command `locale -a | grep '^LL''.
-
-   Not all programs have translations for all languages.  By default, an
-English message is shown in place of a nonexistent translation.  If you
-understand other languages, you can set up a priority list of languages.
-This is done through a different environment variable, called
-`LANGUAGE'.  GNU `gettext' gives preference to `LANGUAGE' over `LANG'
-for the purpose of message handling, but you still need to have `LANG'
-set to the primary language; this is required by other parts of the
-system libraries.  For example, some Swedish users who would rather
-read translations in German than English for when Swedish is not
-available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
-
-   Special advice for Norwegian users: The language code for Norwegian
-bokma*l changed from `no' to `nb' recently (in 2003).  During the
-transition period, while some message catalogs for this language are
-installed under `nb' and some older ones under `no', it's recommended
-for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
-older translations are used.
-
-   In the `LANGUAGE' environment variable, but not in the `LANG'
-environment variable, `LL_CC' combinations can be abbreviated as `LL'
-to denote the language's main dialect.  For example, `de' is equivalent
-to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
-(Portuguese as spoken in Portugal) in this context.
-
-1.4 Translating Teams
-=====================
-
-For the Free Translation Project to be a success, we need interested
-people who like their own language and write it well, and who are also
-able to synergize with other translators speaking the same language.
-Each translation team has its own mailing list.  The up-to-date list of
-teams can be found at the Free Translation Project's homepage,
-`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
-area.
-
-   If you'd like to volunteer to _work_ at translating messages, you
-should become a member of the translating team for your own language.
-The subscribing address is _not_ the same as the list itself, it has
-`-request' appended.  For example, speakers of Swedish can send a
-message to `sv-request@li.org', having this message body:
-
-     subscribe
-
-   Keep in mind that team members are expected to participate
-_actively_ in translations, or at solving translational difficulties,
-rather than merely lurking around.  If your team does not exist yet and
-you want to start one, or if you are unsure about what to do or how to
-get started, please write to `translation@iro.umontreal.ca' to reach the
-coordinator for all translator teams.
-
-   The English team is special.  It works at improving and uniformizing
-the terminology in use.  Proven linguistic skills are praised more than
-programming skills, here.
-
-1.5 Available Packages
-======================
-
-Languages are not equally supported in all packages.  The following
-matrix shows the current state of internationalization, as of October
-2006.  The matrix shows, in regard of each package, for which languages
-PO files have been submitted to translation coordination, with a
-translation percentage of at least 50%.
-
-     Ready PO files       af am ar az be bg bs ca cs cy da de el en en_GB eo
-                        +----------------------------------------------------+
-     GNUnet             |                                  []                |
-     a2ps               |             []                [] [] []     []      |
-     aegis              |                                  ()                |
-     ant-phone          |                                  ()                |
-     anubis             |                                  []                |
-     ap-utils           |                                                    |
-     aspell             |                      [] []    [] []        []      |
-     bash               |                      []          []             [] |
-     batchelor          |                                  []                |
-     bfd                |                                                    |
-     bibshelf           |                                  []                |
-     binutils           |                               []                   |
-     bison              |                               [] []                |
-     bison-runtime      |                                                    |
-     bluez-pin          | []                      []       [] []          [] |
-     cflow              |                               []                   |
-     clisp              |                                  []    []          |
-     console-tools      |                         []       []                |
-     coreutils          |                []    []          []                |
-     cpio               |                                                    |
-     cpplib             |                      []       [] []                |
-     cryptonit          |                                  []                |
-     darkstat           |                []             () []                |
-     dialog             |                      [] [] [] [] [] []             |
-     diffutils          |                      [] []    [] [] []          [] |
-     doodle             |                                  []                |
-     e2fsprogs          |                         []       []                |
-     enscript           |                      []       [] []        []      |
-     error              |                      []       [] []        []      |
-     fetchmail          |                      []       [] () []             |
-     fileutils          |                               [] []                |
-     findutils          |                []    []       []                   |
-     flex               |                      []       [] []                |
-     fslint             |                                  []                |
-     gas                |                                                    |
-     gawk               |                      []       [] []                |
-     gbiff              |                                  []                |
-     gcal               |                      []                            |
-     gcc                |                                  []                |
-     gettext-examples   | []                   []          [] []          [] |
-     gettext-runtime    |             []       []       [] []             [] |
-     gettext-tools      |                      []          []                |
-     gimp-print         |                         []    [] []        []      |
-     gip                |                []                                  |
-     gliv               |                                  []                |
-     glunarclock        |                []                                  |
-     gmult              | []                               []                |
-     gnubiff            |                                  ()                |
-     gnucash            |                                  () ()     []      |
-     gnucash-glossary   |                               [] ()                |
-     gnuedu             |                                                    |
-     gnulib             | []          [] []    []       [] []                |
-     gnunet-gtk         |                                                    |
-     gnutls             |                                                    |
-     gpe-aerial         |                         []       []                |
-     gpe-beam           |                         []       []                |
-     gpe-calendar       |                                                    |
-     gpe-clock          |                         []       []                |
-     gpe-conf           |                         []       []                |
-     gpe-contacts       |                                                    |
-     gpe-edit           |                         []                         |
-     gpe-filemanager    |                                                    |
-     gpe-go             |                         []                         |
-     gpe-login          |                         []       []                |
-     gpe-ownerinfo      |                         []       []                |
-     gpe-package        |                                                    |
-     gpe-sketchbook     |                         []       []                |
-     gpe-su             |                         []       []                |
-     gpe-taskmanager    |                         []       []                |
-     gpe-timesheet      |                         []                         |
-     gpe-today          |                         []       []                |
-     gpe-todo           |                                                    |
-     gphoto2            |                         []    [] []        []      |
-     gprof              |                               [] []                |
-     gpsdrive           |                                  ()    ()          |
-     gramadoir          | []                               []                |
-     grep               | []          [] []    []          [] []             |
-     gretl              |                                                    |
-     gsasl              |                                                    |
-     gss                |                                                    |
-     gst-plugins        | []                   [] []    []                   |
-     gst-plugins-base   |                []    []       []                   |
-     gst-plugins-good   | []       []    []    [] []    []           []      |
-     gstreamer          | []             []    [] []    [] []        []      |
-     gtick              |                                  ()                |
-     gtkam              |                         []    [] []                |
-     gtkorphan          |                []                []                |
-     gtkspell           |             []                   [] []          [] |
-     gutenprint         |                               []                   |
-     hello              |                []    []       [] []             [] |
-     id-utils           |                               [] []                |
-     impost             |                                                    |
-     indent             |                      []          []             [] |
-     iso_3166           |                                  []             [] |
-     iso_3166_2         |                                                    |
-     iso_4217           |                                  []                |
-     iso_639            |                                  []             [] |
-     jpilot             |                         []                         |
-     jtag               |                                                    |
-     jwhois             |                                                    |
-     kbd                |                         []    [] [] []             |
-     keytouch           |                                                    |
-     keytouch-editor    |                                                    |
-     keytouch-keyboa... |                                                    |
-     latrine            |                                  ()                |
-     ld                 |                               []                   |
-     leafpad            |                []    [] []       [] []             |
-     libc               |                      [] []    [] [] []             |
-     libexif            |                                  []                |
-     libextractor       |                                  []                |
-     libgpewidget       |                         []    [] []                |
-     libgpg-error       |                                  []                |
-     libgphoto2         |                               [] []                |
-     libgphoto2_port    |                               [] []                |
-     libgsasl           |                                                    |
-     libiconv           |                                  []             [] |
-     libidn             |                               []                [] |
-     lifelines          |                               [] ()                |
-     lilypond           |                                  []                |
-     lingoteach         |                                                    |
-     lynx               |                      [] []    [] []                |
-     m4                 |                         []    [] [] []             |
-     mailutils          |                      []                            |
-     make               |                               [] []                |
-     man-db             |                      [] ()    [] []                |
-     minicom            |                         []    [] []                |
-     mysecretdiary      |                               [] []                |
-     nano               |                []    []          []                |
-     nano_1_0           |                      [] ()    [] []                |
-     opcodes            |                                  []                |
-     parted             |                                                    |
-     pilot-qof          |                                            []      |
-     psmisc             |                []                                  |
-     pwdutils           |                                                    |
-     python             |                                                    |
-     qof                |                                                    |
-     radius             |                      []                            |
-     recode             |             []       []       [] [] []          [] |
-     rpm                |                         []    []                   |
-     screem             |                                                    |
-     scrollkeeper       |          [] []       [] [] [] [] []        []      |
-     sed                |                      []          []             [] |
-     sh-utils           |                               [] []                |
-     shared-mime-info   |                []       []                 []   [] |
-     sharutils          |                []    [] []    [] [] []             |
-     shishi             |                                                    |
-     silky              |                                                    |
-     skencil            |                               [] ()                |
-     sketch             |                               [] ()                |
-     solfege            |                                                    |
-     soundtracker       |                               [] []                |
-     sp                 |                                  []                |
-     stardict           |                         []                         |
-     system-tools-ba... |       []       [] [] [] []    [] [] []     []      |
-     tar                |                []                                  |
-     texinfo            |                               [] []             [] |
-     textutils          |                      []       [] []                |
-     tin                |                                  ()        ()      |
-     tp-robot           |                                  []                |
-     tuxpaint           | []             []             [] []        []      |
-     unicode-han-tra... |                                                    |
-     unicode-transla... |                                                    |
-     util-linux         |                      [] []    [] []                |
-     vorbis-tools       |             []          []    []           []      |
-     wastesedge         |                                  ()                |
-     wdiff              |                      []       [] []        []      |
-     wget               |                      []          []                |
-     xchat              |             [] []    []          [] []     []      |
-     xkeyboard-config   |                                                    |
-     xpad               |                []             []                   |
-                        +----------------------------------------------------+
-                          af am ar az be bg bs ca cs cy da de el en en_GB eo
-                          10  0  1  2  9 22  1 42 41  2 60 95 16  1  17   16
-
-                          es et eu fa fi fr  ga gl gu he hi hr hu id is it
-                        +--------------------------------------------------+
-     GNUnet             |                                                  |
-     a2ps               |    []       [] []                             () |
-     aegis              |                                                  |
-     ant-phone          |                []                                |
-     anubis             |                []                                |
-     ap-utils           |             [] []                                |
-     aspell             |                []  []                         [] |
-     bash               | []             []                    []          |
-     batchelor          |                []  []                            |
-     bfd                | []                                               |
-     bibshelf           | []                 []                         [] |
-     binutils           | []          [] []                                |
-     bison              | [] []          []  []                   []    [] |
-     bison-runtime      |    []          []  []                   []    [] |
-     bluez-pin          |             [] []  []                [] []       |
-     cflow              |                    []                            |
-     clisp              | []             []                                |
-     console-tools      |                                                  |
-     coreutils          | [] []       [] []  []                []          |
-     cpio               | []             []  []                            |
-     cpplib             | []             []                                |
-     cryptonit          |                []                                |
-     darkstat           | []             ()  []                [] []       |
-     dialog             | [] [] []    [] []  []                []       [] |
-     diffutils          | []          [] []  [] []    []       [] []    [] |
-     doodle             |                    []                         [] |
-     e2fsprogs          | []             []                             [] |
-     enscript           |                []  []             []             |
-     error              | []          [] []  []                []          |
-     fetchmail          | []                                               |
-     fileutils          | [] []          []  []                []       [] |
-     findutils          |    []          []  []                []          |
-     flex               | []             []  []                            |
-     fslint             |                []                                |
-     gas                | []             []                                |
-     gawk               | []             []  []       []                   |
-     gbiff              |                []                                |
-     gcal               | []             []                                |
-     gcc                | []                                               |
-     gettext-examples   | []             []  []                [] []    [] |
-     gettext-runtime    | []          [] []  []                   []    [] |
-     gettext-tools      | []             []                             [] |
-     gimp-print         | []             []                                |
-     gip                | []    []       []                                |
-     gliv               |                ()                                |
-     glunarclock        |             []     []                []          |
-     gmult              |       []       []                             [] |
-     gnubiff            |                ()                             () |
-     gnucash            | ()             ()                    ()          |
-     gnucash-glossary   | []                                            [] |
-     gnuedu             | []                                               |
-     gnulib             | [] [] []    [] []  [] []             []          |
-     gnunet-gtk         |                                                  |
-     gnutls             |                                                  |
-     gpe-aerial         | []             []                                |
-     gpe-beam           | []             []                                |
-     gpe-calendar       |                                                  |
-     gpe-clock          | []          [] []                    []          |
-     gpe-conf           |                []                                |
-     gpe-contacts       | []             []                                |
-     gpe-edit           | []             []                    [] []       |
-     gpe-filemanager    | []                                               |
-     gpe-go             | []             []                    []          |
-     gpe-login          | []             []                    []          |
-     gpe-ownerinfo      | []          [] []                    [] []       |
-     gpe-package        | []                                               |
-     gpe-sketchbook     | []             []                                |
-     gpe-su             | []          [] []                    []          |
-     gpe-taskmanager    | []          [] []                                |
-     gpe-timesheet      | []             []  []                   []       |
-     gpe-today          | []          [] []  []                            |
-     gpe-todo           | []                                               |
-     gphoto2            | []          [] []                    []       [] |
-     gprof              | []             []  []                   []       |
-     gpsdrive           | ()             ()                    []       () |
-     gramadoir          |                []  []                            |
-     grep               | [] [] []    [] []  [] []    []    [] [] []    [] |
-     gretl              | []             []                             [] |
-     gsasl              |                    []                   []       |
-     gss                |                []                                |
-     gst-plugins        |                []                    []       [] |
-     gst-plugins-base   |                                      []       [] |
-     gst-plugins-good   |       []                             []       [] |
-     gstreamer          |             []                       []       [] |
-     gtick              |                    []                            |
-     gtkam              | []             []                    []       [] |
-     gtkorphan          |                []                             [] |
-     gtkspell           | []    []    [] []  []                         [] |
-     gutenprint         |                                      []          |
-     hello              | [] [] [] [] [] []  [] []    []    [] [] []    [] |
-     id-utils           |                []  []                [] []    [] |
-     impost             |                []  []                            |
-     indent             | [] [] []    [] []  [] []             [] []    [] |
-     iso_3166           |             [] []                    []          |
-     iso_3166_2         |                []                                |
-     iso_4217           |    []       []        []             []          |
-     iso_639            |          [] [] []  []                []          |
-     jpilot             | []             []                                |
-     jtag               |                []                                |
-     jwhois             | []             []                    [] []    [] |
-     kbd                | []             []                                |
-     keytouch           |                    []                            |
-     keytouch-editor    |                    []                            |
-     keytouch-keyboa... |                    []                            |
-     latrine            |                []  []                         [] |
-     ld                 | []             []                                |
-     leafpad            | []             []  []       []       []       [] |
-     libc               | []          [] []     []             []          |
-     libexif            | []                                               |
-     libextractor       |                    []                            |
-     libgpewidget       | []             []  []                [] []       |
-     libgpg-error       |                                                  |
-     libgphoto2         | []             []                             [] |
-     libgphoto2_port    |                []                             [] |
-     libgsasl           |                []  []                            |
-     libiconv           |    []              []                            |
-     libidn             |                []                             [] |
-     lifelines          |                ()                                |
-     lilypond           |                []                                |
-     lingoteach         |                []                       []    [] |
-     lynx               |    []                                []       [] |
-     m4                 |                []  [] []                []       |
-     mailutils          | []             []                                |
-     make               | []          [] []  [] []    []    []    []       |
-     man-db             | ()                                               |
-     minicom            | []          [] []                    []          |
-     mysecretdiary      | []             []                       []       |
-     nano               | []    []       []  []                []       [] |
-     nano_1_0           | []             []     []                []    [] |
-     opcodes            | []          [] []  []                            |
-     parted             | []             []                       []    [] |
-     pilot-qof          |                                                  |
-     psmisc             |       []                             []       [] |
-     pwdutils           |                                                  |
-     python             |                                                  |
-     qof                |                                         []       |
-     radius             | []             []                                |
-     recode             | []             []  [] []    []       [] []    [] |
-     rpm                |                []                       []       |
-     screem             |                                                  |
-     scrollkeeper       | []          []                       []          |
-     sed                | [] []          []  []                []          |
-     sh-utils           | [] []       [] []  []                []       [] |
-     shared-mime-info   | []    []    [] []                    []       [] |
-     sharutils          | [] []       [] []  [] []             []       [] |
-     shishi             |                                                  |
-     silky              |                []                                |
-     skencil            | []             []                                |
-     sketch             | []             []                                |
-     solfege            |                                               [] |
-     soundtracker       | []             []                             [] |
-     sp                 |                []                                |
-     stardict           |                                      []          |
-     system-tools-ba... | []    []    [] []                 [] [] []    [] |
-     tar                | [] []       [] []  []                []       [] |
-     texinfo            |                []           []                   |
-     textutils          | []             []  [] []             []          |
-     tin                |    []          ()                                |
-     tp-robot           |             [] []  []                []          |
-     tuxpaint           |                    []                []          |
-     unicode-han-tra... |                                                  |
-     unicode-transla... |                []  []                            |
-     util-linux         | [] []       [] []                    [] []    [] |
-     vorbis-tools       | []             []                                |
-     wastesedge         |                ()                                |
-     wdiff              | [] []          []  [] []             [] []    [] |
-     wget               |    []       [] []  []             [] [] []    [] |
-     xchat              | []    []    [] []        []    []    []       [] |
-     xkeyboard-config   |             [] []                    []       [] |
-     xpad               | []                 []                []          |
-                        +--------------------------------------------------+
-                          es et eu fa fi fr  ga gl gu he hi hr hu id is it
-                          88 22 14  2 40 115 61 14  1  8  1  6 59 31  0 52
-
-                          ja ko ku ky lg lt lv mk mn ms mt nb ne nl nn no
-                        +-------------------------------------------------+
-     GNUnet             |                                                 |
-     a2ps               |    ()                      []          []    () |
-     aegis              |                                        ()       |
-     ant-phone          |                                        []       |
-     anubis             |                            []    []    []       |
-     ap-utils           |                            []                   |
-     aspell             |                         []             []       |
-     bash               |                                        []       |
-     batchelor          |                            []          []       |
-     bfd                |                                                 |
-     bibshelf           |                            []                   |
-     binutils           |                                                 |
-     bison              |                            []    []    []       |
-     bison-runtime      |                            []    []    []       |
-     bluez-pin          |       []                   []          []       |
-     cflow              |                                                 |
-     clisp              |                                        []       |
-     console-tools      |                                                 |
-     coreutils          |                                        []       |
-     cpio               |                                                 |
-     cpplib             |                                        []       |
-     cryptonit          |                                        []       |
-     darkstat           |                            []          []       |
-     dialog             |                            []          []       |
-     diffutils          | []                         []          []       |
-     doodle             |                                                 |
-     e2fsprogs          |                                        []       |
-     enscript           |                                        []       |
-     error              |                                        []       |
-     fetchmail          | []                                     []       |
-     fileutils          | []          []                                  |
-     findutils          |                                        []       |
-     flex               |    []                                  []       |
-     fslint             |                            []          []       |
-     gas                |                                                 |
-     gawk               | []                                     []       |
-     gbiff              |                                        []       |
-     gcal               |                                                 |
-     gcc                |                                                 |
-     gettext-examples   | []                                     []       |
-     gettext-runtime    | [] []                                  []       |
-     gettext-tools      | [] []                                           |
-     gimp-print         | []                                     []       |
-     gip                |                            []          []       |
-     gliv               |                                        []       |
-     glunarclock        |                            []          []       |
-     gmult              | []                         []                   |
-     gnubiff            |                                                 |
-     gnucash            | ()                               ()             |
-     gnucash-glossary   |                                        []       |
-     gnuedu             |                                                 |
-     gnulib             | [] []                      []          []       |
-     gnunet-gtk         |                                                 |
-     gnutls             |                                                 |
-     gpe-aerial         |                                        []       |
-     gpe-beam           |                                        []       |
-     gpe-calendar       | []                                              |
-     gpe-clock          | [] []                                  []       |
-     gpe-conf           |    []                                  []       |
-     gpe-contacts       |    []                                           |
-     gpe-edit           | [] []                                  []       |
-     gpe-filemanager    | [] []                                           |
-     gpe-go             | [] []                                  []       |
-     gpe-login          | [] []                                  []       |
-     gpe-ownerinfo      | []                                     []       |
-     gpe-package        | [] []                                           |
-     gpe-sketchbook     |    []                                  []       |
-     gpe-su             | [] []                                  []       |
-     gpe-taskmanager    | [] [] []                               []       |
-     gpe-timesheet      |                                        []       |
-     gpe-today          | []                                     []       |
-     gpe-todo           | []                                              |
-     gphoto2            | []                                     []       |
-     gprof              |                                                 |
-     gpsdrive           | ()                                     ()    () |
-     gramadoir          |                                        ()       |
-     grep               | []       []                      []    []       |
-     gretl              |                                                 |
-     gsasl              |                                        []       |
-     gss                |                                                 |
-     gst-plugins        |                                        []       |
-     gst-plugins-base   |                                                 |
-     gst-plugins-good   |                                        []       |
-     gstreamer          |                                        []       |
-     gtick              |                                                 |
-     gtkam              | []                                              |
-     gtkorphan          |                                        []       |
-     gtkspell           |                         []             []       |
-     gutenprint         |                                                 |
-     hello              | [] []                      []    []    [] []    |
-     id-utils           |                                        []       |
-     impost             |                                                 |
-     indent             | []                                     []       |
-     iso_3166           |                                        []       |
-     iso_3166_2         |                                        []       |
-     iso_4217           | []                      []             []       |
-     iso_639            | []                                     []       |
-     jpilot             | ()                                     ()    () |
-     jtag               |                                                 |
-     jwhois             |                                        []       |
-     kbd                |                                        []       |
-     keytouch           |                                        []       |
-     keytouch-editor    |                                                 |
-     keytouch-keyboa... |                                                 |
-     latrine            |                                        []       |
-     ld                 |                                                 |
-     leafpad            | []             []                               |
-     libc               | [] []                            []    []    [] |
-     libexif            |                                                 |
-     libextractor       |                                                 |
-     libgpewidget       |                                        []       |
-     libgpg-error       |                                                 |
-     libgphoto2         | []                                              |
-     libgphoto2_port    | []                                              |
-     libgsasl           |                                        []       |
-     libiconv           |                                                 |
-     libidn             | []                                     []       |
-     lifelines          |                                        []       |
-     lilypond           |                                                 |
-     lingoteach         |                                        []       |
-     lynx               | []                                     []       |
-     m4                 | []                                     []       |
-     mailutils          |                                                 |
-     make               | [] []                                  []       |
-     man-db             | ()                                              |
-     minicom            | []                                              |
-     mysecretdiary      |                                        []       |
-     nano               |                            []    []    []       |
-     nano_1_0           |                            []    []       []    |
-     opcodes            |                                        []       |
-     parted             | []                                     []       |
-     pilot-qof          |                                                 |
-     psmisc             | []                               []    []       |
-     pwdutils           |                                                 |
-     python             |                                                 |
-     qof                |                                                 |
-     radius             |                                                 |
-     recode             |                                        []       |
-     rpm                | [] []                                           |
-     screem             | []                                              |
-     scrollkeeper       |                                  [] [] [] []    |
-     sed                | []                                     []       |
-     sh-utils           | []                               []             |
-     shared-mime-info   |    []          []                []    [] []    |
-     sharutils          | []                                     []       |
-     shishi             |                                                 |
-     silky              |                                        []       |
-     skencil            |                                                 |
-     sketch             |                                                 |
-     solfege            |                                                 |
-     soundtracker       |                                                 |
-     sp                 | ()                                              |
-     stardict           |                      []                []       |
-     system-tools-ba... | [] []          []                      []       |
-     tar                | []       []                            []       |
-     texinfo            | []                               []    []       |
-     textutils          | [] []                            []             |
-     tin                |                                                 |
-     tp-robot           |                                        []       |
-     tuxpaint           |                                           []    |
-     unicode-han-tra... |                                                 |
-     unicode-transla... |                                                 |
-     util-linux         | []                                     []       |
-     vorbis-tools       |                                        []       |
-     wastesedge         |                                        []       |
-     wdiff              |                            []    []             |
-     wget               | []                                     []       |
-     xchat              | [] []                []                []       |
-     xkeyboard-config   |                                        []       |
-     xpad               |    []                      []          []       |
-                        +-------------------------------------------------+
-                          ja ko ku ky lg lt lv mk mn ms mt nb ne nl nn no
-                          52 24  2  2  1  3  0  2  3 21  0 15  1 97  5  1
-
-                          nso or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv  ta
-                        +------------------------------------------------------+
-     GNUnet             |                                                      |
-     a2ps               |           ()     []      [] []       []    [] []     |
-     aegis              |                          () ()                       |
-     ant-phone          |                          []                   []     |
-     anubis             |           []             [] []                       |
-     ap-utils           |           ()                                         |
-     aspell             |                          [] []                       |
-     bash               |                  []      [] []                       |
-     batchelor          |                          []                   []     |
-     bfd                |                                                      |
-     bibshelf           |                                               []     |
-     binutils           |                             []                []     |
-     bison              |           []     []      [] []                []     |
-     bison-runtime      |           []             []          []       []     |
-     bluez-pin          |           []     []   [] [] []    [] []    [] []     |
-     cflow              |           []                                         |
-     clisp              |                             []                       |
-     console-tools      |                             []                       |
-     coreutils          |           []                []       []       []     |
-     cpio               |           []                []                []     |
-     cpplib             |                                               []     |
-     cryptonit          |                  []                           []     |
-     darkstat           |           []     []      []       []       [] []     |
-     dialog             |           [] []  []   [] [] [] []          [] []     |
-     diffutils          |           []     []      [] []             [] []     |
-     doodle             |                                         []    []     |
-     e2fsprogs          |           []                                  []     |
-     enscript           |                  []      [] []       []       []     |
-     error              |                  []      []       []          []     |
-     fetchmail          |           []                []          []           |
-     fileutils          |           []             [] []       []       []     |
-     findutils          |           [] []          []       [] []       []     |
-     flex               |           []     []      [] []                []     |
-     fslint             |                  []      []                [] []     |
-     gas                |                                                      |
-     gawk               |           []     []      []                   []     |
-     gbiff              |                          []                          |
-     gcal               |                                               []     |
-     gcc                |                                               []     |
-     gettext-examples   |           [] []          [] []    [] []    [] []     |
-     gettext-runtime    |           [] []          [] []    [] []    [] []     |
-     gettext-tools      |           []             [] []    [] []    [] []     |
-     gimp-print         |                                   []          []     |
-     gip                |                       []          []       [] []     |
-     gliv               |                  []      []       []          []     |
-     glunarclock        |                  []      [] []    []       [] []     |
-     gmult              |                       [] []                [] []     |
-     gnubiff            |                          ()                          |
-     gnucash            |           ()                                  []     |
-     gnucash-glossary   |              []                   []          []     |
-     gnuedu             |                                                      |
-     gnulib             |           []             [] []       []       []     |
-     gnunet-gtk         |                                               []     |
-     gnutls             |           []                                  []     |
-     gpe-aerial         |              []  []      [] []       []    [] []     |
-     gpe-beam           |              []  []      [] []       []    [] []     |
-     gpe-calendar       |                             []                       |
-     gpe-clock          |              []  []      [] []    [] []    [] []     |
-     gpe-conf           |              []  []      [] []    [] []       []     |
-     gpe-contacts       |                          [] []       []    [] []     |
-     gpe-edit           |              []  []      [] []    [] []    [] []     |
-     gpe-filemanager    |                                      []       []     |
-     gpe-go             |                  []      [] []       []    [] []     |
-     gpe-login          |              []  []      [] []    [] []    [] []     |
-     gpe-ownerinfo      |              []  []      [] []    [] []    [] []     |
-     gpe-package        |                                      []       []     |
-     gpe-sketchbook     |              []  []      [] []    [] []    [] []     |
-     gpe-su             |              []  []      [] []    [] []    [] []     |
-     gpe-taskmanager    |              []  []      [] []    [] []    [] []     |
-     gpe-timesheet      |              []  []      [] []    [] []    [] []     |
-     gpe-today          |              []  []      [] []    [] []    [] []     |
-     gpe-todo           |                             []       []    [] []     |
-     gphoto2            |           []             []       []       [] []     |
-     gprof              |                  []      []                   []     |
-     gpsdrive           |        []                []                   []     |
-     gramadoir          |                                   []          []     |
-     grep               |           [] []  []      [] []       []    [] []     |
-     gretl              |           []                                         |
-     gsasl              |           []                               [] []     |
-     gss                |           []             []                   []     |
-     gst-plugins        |     []                                  [] [] []     |
-     gst-plugins-base   |                                               []     |
-     gst-plugins-good   |     []                                  [] [] []     |
-     gstreamer          |                                         [] [] []     |
-     gtick              |                             []                       |
-     gtkam              |           []     []         []                []     |
-     gtkorphan          |                                               []     |
-     gtkspell           |                  []   [] [] []    [] []    [] []     |
-     gutenprint         |                                               []     |
-     hello              |           []     []      [] []    [] []    [] []     |
-     id-utils           |                  []      [] []                []     |
-     impost             |                                               []     |
-     indent             |                  []      [] []    []       [] []     |
-     iso_3166           |              []                []    [] [] [] []     |
-     iso_3166_2         |                                                      |
-     iso_4217           |                                []    []    [] []     |
-     iso_639            |                                []    []    [] []     |
-     jpilot             |                                                      |
-     jtag               |                                   []                 |
-     jwhois             |           []     []      []                   []     |
-     kbd                |           []             []                   []     |
-     keytouch           |                                               []     |
-     keytouch-editor    |                                               []     |
-     keytouch-keyboa... |                                               []     |
-     latrine            |                          []                   []     |
-     ld                 |                                               []     |
-     leafpad            |           [] []             []    []          []  [] |
-     libc               |           []     []         []    []          []     |
-     libexif            |           []                                         |
-     libextractor       |                          []                   []     |
-     libgpewidget       |              []  []      []       [] []    [] []     |
-     libgpg-error       |           []             []                          |
-     libgphoto2         |           []                                         |
-     libgphoto2_port    |           []                []                []     |
-     libgsasl           |           []             []                [] []     |
-     libiconv           |                                      []    []        |
-     libidn             |           []                               [] ()     |
-     lifelines          |           []                                  []     |
-     lilypond           |                                                      |
-     lingoteach         |                  []                                  |
-     lynx               |                  []         []                []     |
-     m4                 |           []     []      [] []                []     |
-     mailutils          |           []             [] []                []     |
-     make               |           []     []         []                []     |
-     man-db             |                          []                   []     |
-     minicom            |           []     []      [] []                []     |
-     mysecretdiary      |                  []      [] []                []     |
-     nano               |                  []      []                   []     |
-     nano_1_0           |           []             [] []                []     |
-     opcodes            |                          []                   []     |
-     parted             |           []                                         |
-     pilot-qof          |                                               []     |
-     psmisc             |           []                                  []     |
-     pwdutils           |           []                                  []     |
-     python             |                                                      |
-     qof                |                  []                           []     |
-     radius             |           []                []                       |
-     recode             |           [] []  []      [] []       []       []     |
-     rpm                |           [] []             []                []     |
-     screem             |                                                      |
-     scrollkeeper       |           []             [] []    []    [] [] []     |
-     sed                |           [] []  []      [] []    [] []    [] []     |
-     sh-utils           |                             []       []    []        |
-     shared-mime-info   |              []  []                     [] [] []     |
-     sharutils          |           []                []             [] []     |
-     shishi             |           []                                         |
-     silky              |                                   []                 |
-     skencil            |              []  []                           []     |
-     sketch             |              []  []                           []     |
-     solfege            |                                               []     |
-     soundtracker       |                                   []          []     |
-     sp                 |                                                      |
-     stardict           |                             []    []          []     |
-     system-tools-ba... |        [] [] []  []      []             [] [] []  [] |
-     tar                |           []             [] []       []       []     |
-     texinfo            |           []             [] []                []     |
-     textutils          |                             []       []       []     |
-     tin                |                             ()                       |
-     tp-robot           |                             []                       |
-     tuxpaint           |              []                      [] [] [] []     |
-     unicode-han-tra... |                                                      |
-     unicode-transla... |                                                      |
-     util-linux         |                  []         []       []       []     |
-     vorbis-tools       |                          [] []                       |
-     wastesedge         |                                                      |
-     wdiff              |           []     []      [] []    []          []     |
-     wget               |              []             []    []          []     |
-     xchat              |        []                   []    [] [] [] [] []     |
-     xkeyboard-config   |                                      []       []     |
-     xpad               |                                   [] []       []     |
-                        +------------------------------------------------------+
-                          nso or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv  ta
-                           0   2  3 58 30  54    5 73 72  4 40 46 11 50 128  2
-
-                          tg th tk tr uk ven vi  wa xh zh_CN zh_HK zh_TW zu
-                        +---------------------------------------------------+
-     GNUnet             |                    []                             |  2
-     a2ps               |          [] []     []                             | 19
-     aegis              |                                                   |  0
-     ant-phone          |          []        []                             |  6
-     anubis             |          [] []     []                             | 11
-     ap-utils           |             ()     []                             |  4
-     aspell             |             []     []  []                         | 15
-     bash               |                    []                             | 11
-     batchelor          |          []        []                             |  9
-     bfd                |                                                   |  1
-     bibshelf           |                    []                             |  7
-     binutils           |          []        []                     []      |  9
-     bison              |          []        []                     []      | 19
-     bison-runtime      |                    []         []          []      | 15
-     bluez-pin          |          [] []     []  []     []          []      | 28
-     cflow              |             []     []                             |  5
-     clisp              |                                                   |  6
-     console-tools      |          []        []                             |  5
-     coreutils          |          []        []                             | 16
-     cpio               |          [] []     []                             |  9
-     cpplib             |          []        []         []          []      | 11
-     cryptonit          |                                                   |  5
-     darkstat           |                    []         ()          ()      | 15
-     dialog             |          [] []     []         []          []      | 30
-     diffutils          |          []        []         []          []      | 28
-     doodle             |                    []                             |  6
-     e2fsprogs          |          []        []                             | 10
-     enscript           |          [] []     []                             | 16
-     error              |          []        []         []          []      | 18
-     fetchmail          |          []        []                             | 12
-     fileutils          |          []                   []          []      | 18
-     findutils          |          []        []                     []      | 17
-     flex               |          []        []                             | 15
-     fslint             |                    []                             |  9
-     gas                |          []                                       |  3
-     gawk               |          []        []                             | 15
-     gbiff              |                    []                             |  5
-     gcal               |          []                                       |  5
-     gcc                |          []                   []          []      |  6
-     gettext-examples   |          [] []     []         []    []    []      | 27
-     gettext-runtime    |          [] []     []         []    []    []      | 28
-     gettext-tools      |          [] []     []         []          []      | 19
-     gimp-print         |             []     []                             | 12
-     gip                |                    []                     []      | 12
-     gliv               |          []        []                             |  8
-     glunarclock        |                    []  []                 []      | 15
-     gmult              |          []        []         []          []      | 15
-     gnubiff            |                    []                             |  1
-     gnucash            |          ()                                       |  2
-     gnucash-glossary   |                    []                     []      |  9
-     gnuedu             |                    []                             |  2
-     gnulib             |          [] []     []         []          []      | 28
-     gnunet-gtk         |                                                   |  1
-     gnutls             |                                                   |  2
-     gpe-aerial         |                    []         []                  | 14
-     gpe-beam           |                    []         []                  | 14
-     gpe-calendar       |                    []                             |  3
-     gpe-clock          |          []        []  []     []                  | 21
-     gpe-conf           |                    []         []                  | 14
-     gpe-contacts       |                    []         []                  | 10
-     gpe-edit           |          []        []  []                 []      | 20
-     gpe-filemanager    |                    []                             |  6
-     gpe-go             |          []        []                             | 15
-     gpe-login          |          []        []  []     []          []      | 21
-     gpe-ownerinfo      |          []        []         []          []      | 21
-     gpe-package        |                    []                             |  6
-     gpe-sketchbook     |          []        []                             | 16
-     gpe-su             |          []        []         []                  | 20
-     gpe-taskmanager    |          []        []         []                  | 20
-     gpe-timesheet      |          []        []         []          []      | 18
-     gpe-today          |          []        []  []     []          []      | 21
-     gpe-todo           |                    []                             |  7
-     gphoto2            |             []     []         []          []      | 20
-     gprof              |          []        []                             | 11
-     gpsdrive           |                                                   |  4
-     gramadoir          |                    []                             |  7
-     grep               |          [] []     []                     []      | 34
-     gretl              |                                                   |  4
-     gsasl              |                    []         []                  |  8
-     gss                |                    []                             |  5
-     gst-plugins        |             []     []                     []      | 15
-     gst-plugins-base   |             []     []         []                  |  9
-     gst-plugins-good   |             []     []         []    []    []      | 20
-     gstreamer          |          [] []     []                             | 17
-     gtick              |                    []                             |  3
-     gtkam              |                    []                             | 13
-     gtkorphan          |                    []                             |  7
-     gtkspell           |             []     []  []     []    []    []      | 26
-     gutenprint         |                                                   |  3
-     hello              |          [] []     []         []          []      | 37
-     id-utils           |          []        []                             | 14
-     impost             |                    []                             |  4
-     indent             |          []        []         []          []      | 25
-     iso_3166           |       [] []        []               []            | 16
-     iso_3166_2         |                                                   |  2
-     iso_4217           |          []        []                             | 14
-     iso_639            |                    []                             | 14
-     jpilot             |          [] []     []         []                  |  7
-     jtag               |                    []                             |  3
-     jwhois             |          []        []                     []      | 13
-     kbd                |          []        []                             | 12
-     keytouch           |                    []                             |  4
-     keytouch-editor    |                                                   |  2
-     keytouch-keyboa... |                    []                             |  3
-     latrine            |          []        []                             |  8
-     ld                 |          []        []         []          []      |  8
-     leafpad            |          []        []         []          []      | 23
-     libc               |          []                   []          []      | 23
-     libexif            |                    []                             |  4
-     libextractor       |                    []                             |  5
-     libgpewidget       |                    []  []     []                  | 19
-     libgpg-error       |                    []                             |  4
-     libgphoto2         |             []                                    |  8
-     libgphoto2_port    |             []     []                     []      | 11
-     libgsasl           |                    []                             |  8
-     libiconv           |                    []                             |  7
-     libidn             |                    []         []                  | 10
-     lifelines          |                                                   |  4
-     lilypond           |                                                   |  2
-     lingoteach         |                    []                             |  6
-     lynx               |          [] []     []                             | 15
-     m4                 |                    []         []          []      | 18
-     mailutils          |             []                                    |  8
-     make               |          []        []         []                  | 20
-     man-db             |                    []                             |  6
-     minicom            |                    []                             | 14
-     mysecretdiary      |          []        []                             | 12
-     nano               |                    []                     []      | 17
-     nano_1_0           |          [] []     []                             | 18
-     opcodes            |          []        []                             | 10
-     parted             |          [] []                            []      | 10
-     pilot-qof          |                    []                             |  3
-     psmisc             |                    []                             | 10
-     pwdutils           |                    []                             |  3
-     python             |                                                   |  0
-     qof                |                    []                             |  4
-     radius             |             []                                    |  6
-     recode             |          []        []         []                  | 25
-     rpm                |          [] []     []                     []      | 14
-     screem             |                    []                             |  2
-     scrollkeeper       |          [] []     []                     []      | 26
-     sed                |          []        []                     []      | 22
-     sh-utils           |          []                                       | 15
-     shared-mime-info   |             []     []         []          []      | 24
-     sharutils          |          []        []                     []      | 23
-     shishi             |                                                   |  1
-     silky              |                    []                             |  4
-     skencil            |                    []                             |  7
-     sketch             |                                                   |  6
-     solfege            |                                                   |  2
-     soundtracker       |          []        []                             |  9
-     sp                 |          []                                       |  3
-     stardict           |             []     []         []          []      | 11
-     system-tools-ba... |    []    [] []     []     []  []          []      | 37
-     tar                |          [] []     []                     []      | 20
-     texinfo            |          []        []         []                  | 15
-     textutils          |          []                   []          []      | 17
-     tin                |                                                   |  1
-     tp-robot           |                    []         []          []      | 10
-     tuxpaint           |                    []  []                 []      | 16
-     unicode-han-tra... |                                                   |  0
-     unicode-transla... |                                                   |  2
-     util-linux         |          [] []     []                             | 20
-     vorbis-tools       |             []     []                             | 11
-     wastesedge         |                                                   |  1
-     wdiff              |          []        []                             | 22
-     wget               |          []        []                     []      | 19
-     xchat              |             []     []         []          []      | 29
-     xkeyboard-config   |          [] []     []                     []      | 11
-     xpad               |                    []         []          []      | 14
-                        +---------------------------------------------------+
-       77 teams           tg th tk tr uk ven vi  wa xh zh_CN zh_HK zh_TW zu
-      170 domains          0  1  1 77 39  0  136 10  1  48     5    54    0  2028
-
-   Some counters in the preceding matrix are higher than the number of
-visible blocks let us expect.  This is because a few extra PO files are
-used for implementing regional variants of languages, or language
-dialects.
-
-   For a PO file in the matrix above to be effective, the package to
-which it applies should also have been internationalized and
-distributed as such by its maintainer.  There might be an observable
-lag between the mere existence a PO file and its wide availability in a
-distribution.
-
-   If October 2006 seems to be old, you may fetch a more recent copy of
-this `ABOUT-NLS' file on most GNU archive sites.  The most up-to-date
-matrix with full percentage details can be found at
-`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
-
-1.6 Using `gettext' in new packages
-===================================
-
-If you are writing a freely available program and want to
-internationalize it you are welcome to use GNU `gettext' in your
-package.  Of course you have to respect the GNU Library General Public
-License which covers the use of the GNU `gettext' library.  This means
-in particular that even non-free programs can use `libintl' as a shared
-library, whereas only free software can use `libintl' as a static
-library or use modified versions of `libintl'.
-
-   Once the sources are changed appropriately and the setup can handle
-the use of `gettext' the only thing missing are the translations.  The
-Free Translation Project is also available for packages which are not
-developed inside the GNU project.  Therefore the information given above
-applies also for every other Free Software Project.  Contact
-`translation@iro.umontreal.ca' to make the `.pot' files available to
-the translation teams.
-
diff --git a/linphone/AUTHORS b/linphone/AUTHORS
deleted file mode 100644 (file)
index 386427a..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-Simon MORLAT (simon dot morlat at linphone dot org) wrotes:
-       - main graphical program (gnome)
-       - RTP library (oRTP)
-       - SIP user-agent library (osipua)
-       - audio library (mediastreamer), for codec and i/o handling.
-       - sipomatic, the automatic sip replier, which is often used for testing.
-
-Florian Wintertein < f-win at gmx dot net > wrotes the console version of linphone (linphonec)
-in console/ directory.
-
-Aymeric Moizard (jack at atosc dot org) wrotes:
-       - the oSIP SIP transactionnal stack (not part of linphone)
-       - some piece of code of the osip distribution have been reused in osipua
-       - presence information support in osipua
-       - and contributes to some parts of osipua (digest authentification)
-For more information about oSIP, see http://osip.atosc.org
-
-Sharath Udupa is developing the media_api, a usefull library to manage audio and video streams 
-for basic calls as well as conference.
-
-Sandro Santilli < strk at keybit dot net > wrote enhancements in the
-console interface (readline, new commands) and some bug fixes for
-the core api.
-
-Bryan Ogawa ( bko at cisco dot com ) sent a patch that made the linphone-0.7.1 release. 
-This patch fixed several issues in the SIP part while working with proxies.
-
-Koichi KUNITAKE < kunitake at linux-ipv6 dot org > has contributed a patch bringing 
-full IPv6 support.
-
-The Speex codec is a project from Jean Marc Valin. See http://speex.sourceforge.net for more 
-information.
-       
-The GSM library was written by :
-        Jutta Degener and Carsten Bormann,Technische Universitaet Berlin.
-       
-The LPC10-1.5 library was written by:
-       Andy Fingerhut
-       Applied Research Laboratory                     <-- this line is optional if
-       Washington University, Campus Box 1045/Bryan 509      you have limited space
-       One Brookings Drive
-       Saint Louis, MO 63130-4899
-       jaf@arl.wustl.edu
-       http://www.arl.wustl.edu/~jaf/
-
-       See text files in gsmlib and lpc10-1.5 directories for further information.
-       
-G711 library has some code from the alsa-lib on http://www.alsa-project.org
-
-Icons by Pablo Marcelo Moia.
-
-Translations:
-fr: Simon Morlat
-en: Simon Morlat and Delphine Perreau
-it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>
-de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>
-es: Jesús Benítez <gnelson at inMail dot sk>
diff --git a/linphone/BUGS b/linphone/BUGS
deleted file mode 100644 (file)
index 1f57983..0000000
+++ /dev/null
@@ -1 +0,0 @@
-version 3.0.0: resizing of video window under linux often causes hang or crash (seems to be a SDL bug).
\ No newline at end of file
diff --git a/linphone/COPYING b/linphone/COPYING
deleted file mode 100644 (file)
index d60c31a..0000000
+++ /dev/null
@@ -1,340 +0,0 @@
-                   GNU GENERAL PUBLIC LICENSE
-                      Version 2, June 1991
-
- Copyright (C) 1989, 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.
-
-                           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.
-\f
-                   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.)
-\f
-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.
-\f
-  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.
-\f
-  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
-\f
-           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) <year>  <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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  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) year  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/linphone/ChangeLog b/linphone/ChangeLog
deleted file mode 100644 (file)
index 140cdae..0000000
+++ /dev/null
@@ -1,513 +0,0 @@
-2008-09-02  Francois-Xavier Kowalski  <fix@hp.com>
-
-       * gtk/Makefile.am (INCLUDES): 1.6
-         Deprecated automake  directive INCLUDES  does not work  within a
-         conditionnal.
-
-2008-08-22 Francois-Xavier Kowalski <fix@hp.com>
-
-       * mediastreamer2/src/Makefile.am (libmediastreamer_la_SOURCES+): 1.27
-         Deliver swscale.h  in case ffmpeg does not  come with libswscale
-         (in   which  case   the   swscale  feature   is  included   into
-         libavcodec).  Also deliver ffmpeg-priv.h wrapper.
-       
-       * mediastreamer2/src/videoout.c: 1.39 
-       * mediastreamer2/src/videodec.c: 1.24 
-       * mediastreamer2/src/sizeconv.c: 1.14 
-       * mediastreamer2/src/pixconv.c: 1.13 
-       * mediastreamer2/src/nowebcam.c: 1.15
-         Use ffmpeg-priv,h
-
-       * mediastreamer2/mediastreamer-config.h.in: 1.13
-         Remove from CVSm as it is generated by autoheader
-
-       * mediastreamer2/configure.ac: 1.47 
-         Use pkg-config to check for arts
-
-       * mediastreamer2/acinclude.m4: 1.12 
-         Remove -I/usr/include  and -L/usr/lib(64) from  CFLAGS and LIBS.
-         Check  for  ffmpeg  swscale  feature  into  libavcodec  or  into
-         libswscale
-
-2007-09-26 Francois-Xavier Kowalski <fix@hp.com>
-
-       * m4/exosip.m4: 1.3
-         make Linphone buildable with  the eXosip/osip version that ships
-         with Fedora.
-
-       * oRTP/include/ortp/stun_udp.h: 1.9 
-       * mediastreamer2/include/mediastreamer2/msvideo.h: 1.7 
-       * mediastreamer2/include/mediastreamer2/msticker.h: 1.6 
-       * mediastreamer2/include/mediastreamer2/msqueue.h: 1.3
-         Clean ANSI/C vs. ANSI/C++ differences
-
-2007-08-01 Sandro Santilli <strk@keybit.net>
-
-       * console/commands.c: Clean up commands 'nat', 'stun'
-         and 'firewall' to be more intuitive.
-
-2007-02-03  Francois-Xavier Kowalski  <fix@hp.com>
-
-       * m4/osip.m4 (OSIP_CFLAGS): 1.2 
-       * gnome/Makefile.am (linphone_applet_LDADD): 1.33 
-       * coreapi/Makefile.am (liblinphone_la_CFLAGS): 1.38 
-       * console/Makefile.am (sipomatic_LDADD): 1.45 
-         Cope with  osip2-2.2.2 delivered as  legacy on FC6.   New option
-         "--with-osip-version"
-
-2007-01-18 Francois-Xavier Kowalski <fix@hp.com>
-
-       * oRTP/Makefile.am: 1.24 
-       * mediastreamer2/Makefile.am: 1.30 
-       * Makefile.am: 1.45
-         Fix     RPM     package     generattion     to     cope     with
-         <https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=206841>
-
-2007-01-17  gettextize  <bug-gnu-gettext@gnu.org>
-
-       * m4/gettext.m4: Upgrade to gettext-0.16.1.
-       * m4/lib-link.m4: Upgrade to gettext-0.16.1.
-       * m4/lib-prefix.m4: Upgrade to gettext-0.16.1.
-       * m4/nls.m4: Upgrade to gettext-0.16.1.
-       * m4/po.m4: Upgrade to gettext-0.16.1.
-       * m4/codeset.m4: Upgrade to gettext-0.16.1.
-       * m4/intl.m4: New file, from gettext-0.16.1.
-       * m4/intldir.m4: New file, from gettext-0.16.1.
-       * m4/intmax.m4: Upgrade to gettext-0.16.1.
-       * m4/inttypes_h.m4: Upgrade to gettext-0.16.1.
-       * m4/inttypes-pri.m4: Upgrade to gettext-0.16.1.
-       * m4/lock.m4: New file, from gettext-0.16.1.
-       * m4/longdouble.m4: Upgrade to gettext-0.16.1.
-       * m4/longlong.m4: Upgrade to gettext-0.16.1.
-       * m4/size_max.m4: Upgrade to gettext-0.16.1.
-       * m4/stdint_h.m4: Upgrade to gettext-0.16.1.
-       * m4/ulonglong.m4: Upgrade to gettext-0.16.1.
-       * m4/visibility.m4: New file, from gettext-0.16.1.
-       * m4/Makefile.am (EXTRA_DIST): Add the new files.
-
-2006-10-18 Sandro Santilli <strk@keybit.net>
-
-       * console/Makefile.am: set osip includes last in the
-         search path.
-
-2006-09-19  Francois-Xavier Kowalski  <fix@hp.com>
-
-       * linphone.spec.in (BuildRequires): 1.8 
-         Add  RPM  build-time   dependency  on  gettext-devel  to  define
-         AM_GNU_GETTEXT. 
-
-2006-07-26 Sandro Santilli <strk@keybit.net>
-
-       * .cvsignore, developer-docs/mediastreamer/.cvsignore,
-        ipkg/.cvsignore, mediastreamer2/.cvsignore,
-        mediastreamer2/build/.cvsignore,
-        mediastreamer2/build/win32native/.cvsignore,
-        mediastreamer2/include/.cvsignore,
-        mediastreamer2/include/mediastreamer2/.cvsignore,
-        mediastreamer2/plugins/.cvsignore,
-        mediastreamer2/src/.cvsignore,
-        mediastreamer2/tests/.cvsignore,
-        oRTP/build/win32/.cvsignore,
-        oRTP/build/win32native/.cvsignore,
-        oRTP/src/tests/win_receiver/.cvsignore,
-        oRTP/src/tests/win_sender/.cvsignore,
-        po/.cvsignore, share/cs/.cvsignore:
-       Added-fixed .cvsignore files
-
-2006-07-20  gettextize  <bug-gnu-gettext@gnu.org>
-
-       * m4/codeset.m4: New file, from gettext-0.14.6.
-       * m4/gettext.m4: New file, from gettext-0.14.6.
-       * m4/glibc2.m4: New file, from gettext-0.14.6.
-       * m4/glibc21.m4: New file, from gettext-0.14.6.
-       * m4/iconv.m4: New file, from gettext-0.14.6.
-       * m4/intdiv0.m4: New file, from gettext-0.14.6.
-       * m4/intmax.m4: New file, from gettext-0.14.6.
-       * m4/inttypes.m4: New file, from gettext-0.14.6.
-       * m4/inttypes_h.m4: New file, from gettext-0.14.6.
-       * m4/inttypes-pri.m4: New file, from gettext-0.14.6.
-       * m4/isc-posix.m4: New file, from gettext-0.14.6.
-       * m4/lcmessage.m4: New file, from gettext-0.14.6.
-       * m4/lib-ld.m4: New file, from gettext-0.14.6.
-       * m4/lib-link.m4: New file, from gettext-0.14.6.
-       * m4/lib-prefix.m4: New file, from gettext-0.14.6.
-       * m4/longdouble.m4: New file, from gettext-0.14.6.
-       * m4/longlong.m4: New file, from gettext-0.14.6.
-       * m4/nls.m4: New file, from gettext-0.14.6.
-       * m4/po.m4: New file, from gettext-0.14.6.
-       * m4/printf-posix.m4: New file, from gettext-0.14.6.
-       * m4/progtest.m4: New file, from gettext-0.14.6.
-       * m4/signed.m4: New file, from gettext-0.14.6.
-       * m4/size_max.m4: New file, from gettext-0.14.6.
-       * m4/stdint_h.m4: New file, from gettext-0.14.6.
-       * m4/uintmax_t.m4: New file, from gettext-0.14.6.
-       * m4/ulonglong.m4: New file, from gettext-0.14.6.
-       * m4/wchar_t.m4: New file, from gettext-0.14.6.
-       * m4/wint_t.m4: New file, from gettext-0.14.6.
-       * m4/xsize.m4: New file, from gettext-0.14.6.
-       * m4/Makefile.am (EXTRA_DIST): Add the new files.
-       * Makefile.am (EXTRA_DIST): Add config.rpath.
-
-2006-07-07  Francois-Xavier Kowalski  <fix@hp.com>
-
-       * linphone.spec.in (Version): 1.7
-         Force build  of gtk-doc, as  the default choice that  comes with
-         GTK_DOC_CHECK m4 macro is "no".
-
-2006-05-17 Francois-Xavier Kowalski <fix@hp.com>
-
-       * configure.in: 1.179
-       * configure.in: 1.178
-         Allow rpm users to use oRTP packages built from Linphone root.
-
-May 8 2006 : Sandro Santilli <strk@keybit.net>
-
-       * configure.in: lowered libspeex requirement to 1.1.6
-
-undefined yet: linphone-1.4.0
-       - new audio/video streaming engine (mediastreamer2) that let the following improvements:
-               + split video frame to get them smaller than MTU
-               + less video latency
-               + video supported at CIF and QCIF resolution with variable framerate.
-               + arts sound input/output
-               + improved sound latency with alsa
-               + alsa support works with dmix/dsnoop
-               + old oss drivers that don't like select and non blocking mode should finally work
-               - lpc10-15 support removed (speex does better at 8kbit/s)
-               - jack support unported to mediastreamer2, sorry : volunteer needed
-       - video resolution and framerate set according to bandwidth constraints.
-       - linphonec new "soundcard" command to list and choose sound devices.
-       - new download and upload bandwidth parameters.
-
-March 31 2006: linphone-1.3.4
-       - fix linphonec bug in auto-answer mode: was terminating call after a few seconds.
-
-March 28 2006: linphone-1.3.3
-       - various FedoraCore 4 compile problem solved
-       - fix video bug ('could not mmap': happening on kernel>=2.6.15 with pwc driver)
-       - SIP register were not using route field (submitted patch)
-
-March 17 2006: linphone-1.3.2
-       - fix early media call problem: ack for 200ok was never sent.
-
-March 10 2006: linphone-1.3.1
-       - fix compile errors with gcc-2.95 (thanks Wolfram Gloger)
-
-March 8 2006 : linphone-1.3.0 (SUMMARY)
-       - a lots of improvements in linphonec (see strk 's Changelogs below)
-       - telephone event problem with sipomatic.
-       - updated cz translation.
-       - fix bugs around addressbook.
-       - video support with H263-1998/RFC2429 nearly clean.
-       - added timeout for incoming calls
-
-February 20 2006 : Sandro Santilli <strk@keybit.net>
-
-       * console/commands.c: added filter support for
-       command 'friend list'.
-
-February 13 2006 : Sandro Santilli <strk@keybit.net>
-
-       * console/linphonec.c: fixed unused variable warning.
-
-February 02 2006 : Sandro Santilli <strk@keybit.net>
-       Console:
-               - Padded vtable with missing callbacks
-                 (fixing a segfault on friends subscription)
-               - Handled friends notify (bare version)
-               - Handled text messages receive (bare version)
-               - Printed message on subscription request (bare version)
-               - Added 'friend list' and 'friend call' commands
-               - Allowed for multiple DTMF send in a single line
-               - Added status-specific callback (bare version)
-
-
-January 26 2006 : Sandro Santilli <strk@keybit.net>
-       - Core: fixed bug in linphone_core_set_nat_address refusing
-         to set address if use flag was off, added support
-         for NULL addr parameter to only change use flag.
-       - Support: added missing GFileTest enum values
-       - Console: 'nat' commands, cleanups
-
-January 25 2006 : Sandro Santilli <strk@keybit.net>
-       - Core: added request uri in proxy registration failure message
-       - Console: removed the -t switch
-         (terminate on close is default behaviour)
-
-January 20 2006 : Sandro Santilli <strk@keybit.net>
-       - Console: 
-         linphonec_init() and linphonec_finish() functions.  Handled
-         SIGINT and SIGTERM to invoke linphonec_finish().  Handling of
-         auto-termination (-t) moved to linphonec_finish().  Reworked main
-         (input read) loop to not rely on 'terminate' and 'run' variable
-         (dropped). configfile_name allocated on stack using PATH_MAX
-         limit. Changed print_usage signature to allow for an exit_status
-         specification.
-
-January 18 2006 : Sandro Santilli <strk@keybit.net>
-       - Console: 
-         Command completion inhibited
-         in proxy addition and auth request prompts.  Avoided use of
-         readline's internal filename completion.
-
-January 14 2006 : Sandro Santilli <strk@keybit.net>
-       - Console: 
-         Reworked commands interface to use a table structure, used by
-         command line parser and help function.  Implemented first
-         level of completion (commands).  Added notification of
-         invalid "answer" and "terminate" commands (no incoming call,
-         no active call).  Forbidden "call" intialization when a call is
-         already active.  Cleaned up all commands, adding more feedback
-         and error checks.
-
-January 13 2006 : Sandro Santilli <strk@keybit.net>
-       - Console: 
-         Added linphonec.h. Code layout change (added comments, forward
-         decl, globals on top, copyright notices and Logs). Handled
-         out-of-memory condition on history management. Removed
-         assumption on sizeof(char).  Fixed bug in authentication
-         prompt (introduced by readline).  Added support for multiple
-         authentication requests (up to MAX_PENDING_AUTH).
-
-January 12 2006 : Sandro Santilli <strk@keybit.net>
-       - Console: 
-         Changed default configuration file to ~/.linphonerc,
-         automatically handling migration from old layout if not present
-         (use ~/.linphonec or ~/.gnome2/linphone).  Added compile-time
-         define to show identity in prompt.  Used EXIT_SUCCESS and
-         EXIT_FAILURE macros. 
-         Made readline use ~/.linphonec_history file for
-         reading/writing.  Fixed auto-call handling code.  Fixed
-         OOB write of sscanf() in linphonec_parse_command_line().
-         Simplified control flow in linphonec_main_loop().
-         Put linphonec_{initialize,finish}_readline() calls out of
-         main_loop(). Removed redundant exit(0) at end of main().
-         Fixed small leaks.
-
-December 14 2005 : linphone-1.2.0
-       - various ipv6 bugfixes (again)
-       - fix po.pl file (was utf-8 but declared as iso8902)
-       - enum/automatic proxy conflict solved. use "sip:7887488478" for enums, just "382884824" to go through the default proxy.
-       - experimental video support progresses, compliance improved.
-       - remove ilbc from source tree: it is now available as a separete plugin.
-       - updated to work with lastest ffmpeg cvs
-       - fix bug when answering 'busy here'; active call was closed !
-       - fix Ctrl+H bug in linphonec
-       - added bresilian translation
-       - added swedish translation
-       - uri bar improvements
-       - fix a DoS attack by setting a payload type number > 127
-
-August 24 2005  : linphone-1.1.0
-       - peer to peer text chat
-       - automatic sip url completion when using a default proxy: 
-         when user types 'mymother' in the url bar, linphone calls sip:mymother@[default-proxy]
-       - ilbc 20 and 30 miliseconds frames support
-       - support for setting a soundcard for playback and another for record
-       - ipv6 bugfixes: works with ipv6 local loopback with sipomatic at least ! Needs to be tested in a real network.
-       - gtk interface bugfixes
-       - increase max supported sound devices (was 5).
-       - automatic incoming redirections
-       - experimental video support (needs special compilation procedure, see mailing lists)
-       
-
-March 27 2005 :        linphone-1.0.1
-       - patch for NAT traversal (SDP connection address in SDP answer)
-       - patch for writing correct port information when NAT is enabled
-       - patch for always using "rport" extension to traverse NAT with
-         signalling.
-       - patch for saving/restoring correct configuration of proxy:
-         "reg_register" -> "reg_sendregister" and fix for saving "expires"
-       
-March 21 2005 :        linphone-1.0.0
-       - switch from osipua to eXosip/osip2 for improved sip functionnalities and compliance.
-       - support for presence (busy, online...) for everyone in the address book (uses SUBSCRIBE/NOTIFY)
-       - support for PUBLISH (presence information through sip servers)
-       - support for configuring multiple proxies.
-       - RTP adaptive jitter buffer ( provides lower latency )
-       - RTCP coumpound messages sent periodically.
-       - on demand digest authentication for INVITE and REGISTER
-       - support for 183 with sdp answers.
-       - add support for jackd (contributed)
-       - call logging
-       - arm build improved
-       - cz and nl translations contributed.
-
-
-January 2004 : linphone-0.12.2
-       - add enum support (see RFC3241 and RFC3026) 
-               Thanks to Rene Bartsch < ml at bartschnet dot de > for its usefull 
-               and precious help.
-       - interactive presence box (no more need to click OK to confirm)
-       - update spanish translation
-       - alsa interface: the user can choose precisely the pcm device to be used
-               by setting the sound/alsadev parameter of the config file.
-       - use 1 RTP socket instead of 2: this makes linphone NAT-friendly.
-
-Thursday October 2 2003 : linphone-0.12.1
-  - add support for personalizing rings.
-  - make glib dependency optionnal (but recommended).
-  - add polish translation.
-  - use of libartsc to suspend arts instead of killing him.
-
-Tuesday August 19 2003 : linphone-0.12.0
-       - add support for speex/16000
-       - re-enable alsa support (0.9.x)
-       - few improvements on gui.
-       - added spanish translation by Jesús Benítez <gnelson at inMail dot sk>
-
-Monday April 05 2003: linphone-0.11.0
-       - merge ipv6 support patch, contributed by Koichi KUNITAKE 
-               < kunitake at linux-ipv6 dot org > (thanks !)
-       - some improvements on graphical interface.
-
-Friday Feb 28 2003 : linphone-0.10.1
-       - add firewall friendly capability
-       - compiles all well on arm-linux
-       - bugfixes.
-
-Friday Jan 24 2003 : linphone-0.10.0
-       - Gnome interface ported to gnome-2
-       - Unified core engine for both graphical and console interface.
-       - Many bug fix and improvements in the SIP stack.
-       - Japoneese translations and manual added, by Yamaguchi Yoshiya.
-       - updated for speex-1.0rc1
-       - ported to FreeBSD thanks to Georg Shwarz
-
-Monday Oct 21 2002 : linphone-0.9.1
-       - AMD: add support for the "received" and "rport" parameter in osipua.
-
-Monday Oct 21 2002 : linphone-0.9.1
-       - integration of the patch of Lenaic Huard that adds the ability for linphone to send
-               dtmf tones through rtp (only reported to console interface).
-       - following this patch, a nice keypad has been added to the graphical interface to bring
-               the fonctionnality of the patch gui's users.
-       - integration of the patch of Aymeric Moizard, concerning compliance with RFC3261 (new
-               sip's RFC) using the new dialog_t api of libosip.
-       - updated for use of speex-beta1 (speex codec)
-       - osipua fix by jack@atosc.org
-        1: reject calls with 603
-        2: establishement of 1 early dialog for incoming calls.
-        3: update to libosip CVS and its new OSIP_TRACE MACROs.
-        4: fix presence handling.
-        5: fix expires header in REGISTER.
-
-
-Monday Aug 26 2002: linphone-0.9.0
-       - the sdp rtpmap string for alaw and mulaw codec was incorrect.
-
-Sunday Aug 4 2002:     linphone-0.9.0pre3
-       Non visible changes:
-       - Linphone's internal audio architecture is ported to the new mediastreamer architecture.
-         The mediastreamer library is already present in linphone since October 29 2001 but
-         was never used at this time by the core program. Now lots of work has be done inside the
-         mediastreamer so that it is ready to be used by the core program. As a consequence, the
-         old architecture defined by the audio/ directory and the codec.c io.c files is dropped.
-         The mediastreamer architecture provides a modular framework for audio and video 
-         processing. It includes various audio and video codecs (or wrappers to third party 
-         audio and video codecs).
-       Visible changes:
-       - The Speex codec (http://speex.sourceforge.net) is now availlable to linphone, since it has
-         its mediastreamer wrapper. This patent-free codec provides two bitrates, the lowest 
-         being able to work with 56k dialup connections. This is a very important step, because
-         from now only the low quality LPC10 codec was availlable for such connections.
-       - Thanks to Florian Winsterstein (f-win at gmx.de), a console version of linphone called
-         "linphonec" is availlable. Linphonec can be compiled without gnome.
-
-Wednesday May 8 2002:  linphone-0.8.0
-       Visible changes:
-       - Updated to libosip-0.8.5, that reflects the lastest sip draft.
-       - Uses the SDP parser the libosip, and uses also a modified version of its SDP negociator.
-         The MediaDesc object is removed, now osipua users have to deal with BodyHandler's, as the
-         SdpHandler that deals with sdp message generation and negociation.
-         The SDP parser and negociator can use the a=rtpmap fields, so that compliance is improved.
-       - LPC10-1.5 codec has been assigned payload type 115 instead of 4 previously. This breaks
-         compatibility with older versions of linphone.
-       - oRTP (the new RTP library) is used in place of the old lprtplib.
-       - fix endianess problems in the audio part.
-       Non visible changes (changes on libraries not currently used by linphone but used later):
-       - mediastreamer has new working objects: webcam image capture, mpeg encoding and decoding
-         thanks to the libavcodec (ffmpeg) library, rtp wrapper thanks to oRTP.
-
-Tuesday April 15 2002: linphone-0.7.2
-       - A crash in property box "apply" fixed.
-       - bugfix in osipua.
-
-Tuesday March 12 2002: linphone-0.7.1
-       - Some bug fixes by Bryan Ogawa in osipua: route, record-route, tags.
-
-Friday March  1 2002:  linphone-0.7.0
-       - Digest authentification support added by Aymeric.
-       - Improvements in property box.
-       - Translations in German and Italian by J.J. Sarton and A. Zanoni
-       - Bugfix and improvements in the osipua stack.
-       - Better handling of the registration parameters (the user can set its own address of record).
-       
-
-Thu December  6 2001
-                       -osipua.c: Memory allocations.
-                          fi call of from_tag_add(...,sgetcopy(ua->fromtag));
-           -utils.c: Memory allocations.
-           -CallLegs are removed automatically by the osipua layer (eg: when a transaction timed out).
-
-Tue November 27 2001
-                       -Bugfix in osipua for proxy support: record-route and route header support, request-uri bug fixed.
-                       -New choice "outbound proxy" in the property box.
-                       -Fix compilation issues.
-
-
-Mon October 29 2001
-                       -New unithreaded design of the osipua library, based on libosip-0.7.x series.
-                       -Asynchronous name resolution in osipua.
-                       -To and From tag support added.
-                       -Proxy support added. The user can choose between registering for a redirect server, or
-                               registering for a proxy server. When he choose proxy, then all requests are sent to the proxy.
-                       -New good looking graphical interface.
-                       -Mediastreamer is included, but still unused. It has a begin of gtkdoc dcocumentation.
-
-Wed September 26 2001
-                       -Add registration and redirection ability in gui and osipua.
-                       -Critical bugs in osipua/osip fixed.
-                       -Display all sip error strings in appbar.
-                       -Documentation translated in French.
-
-Tue  August 21 2001
-                       -       Add address book functionnality
-                       - Add ringback
-                       - Minor bugfixes in configure.in, src/callbacks.c
-                       -       Work with libosip-0.6.1
-
-Wed August 1 2001:
-                       - Integration with osip sip stack. lpsiplib is no more used and abandonned. osipua provides the session level
-                       on top of osip.
-                       - added G711 codecs.
-                       - configuration structures and api re-written for more clarity.
-                       - new codec selection box
-                       - new sytem for codec registration
-                       - automatic selection of codecs regarding to network connection type.
-                       - add resizing ability for icon applet.
-
-
-June                   2001:  linphone-0.3.0
-                       -Nearly all code in linphone is object oriented.
-                       -linphone can be run as a gnome applet, or as a silent dameon, or as a normal application.
-                       -bugfixes in sip/sdp messages.
-                       -addition of a test program called sipomatic that can automatically answers to call. (for test)
-                       -add io_disk implementation of the audio lib. this can be used to replace the sond card by io on file system.
-
-
-
-Tue May 15 2001:  linphone-0.2.1
-                       -Fix a stupid bug in the audio library.
-
-Fri May 11 2001: linphone-0.2.0
-               -add many missing features of version 0.1.0 (for the property box)
-               -audio levels on the main window.
-               -Sip library modified: now it uses one thread, and should be able to handle several calls in the future.
-               -audio library is more performant. It is able to find itself the best blocksize (latency) by testing the driver.
-               -interactive help on the property box and user manual.
-               -add an icon.
-
-linphone-0.1.0 :
-               Released on april,19 2001
-               Initial version.
diff --git a/linphone/Makefile.am b/linphone/Makefile.am
deleted file mode 100644 (file)
index 1a8910f..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-# let make re-run automake upon need
-ACLOCAL_AMFLAGS = -I m4 $(ACLOCAL_MACOS_FLAGS)
-
-if EXTERNAL_ORTP
-ORTP_DIR =
-else
-ORTP_DIR = oRTP
-endif
-
-SUBDIRS = m4 pixmaps po $(ORTP_DIR) mediastreamer2\
-               coreapi console gtk-glade share scripts
-
-
-
-ACLOCAL_FLAGS=-I$(top_srcdir)/m4
-
-
-INSTALLDIR=$(shell cd $(top_builddir) && pwd)/linphone-install
-INSTALLDIR_WITH_PREFIX=$(INSTALLDIR)/$(prefix)
-ZIPFILE=$(shell cd $(top_builddir) && pwd)/$(PACKAGE)-win32-$(VERSION).zip
-ZIP_EXCLUDED=include lib \
-               share/sounds/linphone/rings/synth.wav \
-               share/sounds/linphone/rings/tapping.wav \
-               share/sounds/linphone/rings/orig.wav \
-               share/sounds/linphone/rings/sweet.wav \
-               share/sounds/linphone/rings/rock.wav
-
-
-GTK_PREFIX=/usr
-GTK_FILELIST=gtk+-2.18.5.filelist
-GTK_FILELIST_PATH=$(shell cd $(top_srcdir) && pwd)/$(GTK_FILELIST)
-LINPHONEDEPS_FILELIST=linphone-deps.filelist
-WINBINDIST_FILES=$(shell cat $(top_srcdir)/$(LINPHONEDEPS_FILELIST))
-ISS_SCRIPT=linphone.iss
-ISS_SCRIPT_PATH=$(shell cd $(top_srcdir) && pwd)/$(ISS_SCRIPT)
-#path to Inno Setup 5 compiler
-ISCC=/c/Program\ Files/Inno\ Setup\ 5/ISCC.exe
-PACKAGE_WIN32_FILELIST=$(PACKAGE)-win32.filelist
-
-EXTRA_DIST = config.rpath  BUGS linphone.kdevelop  \
-                               intltool-extract.in     \
-                               intltool-merge.in       \
-                               intltool-update.in \
-                               README.arm \
-                               README.mingw \
-                               README.macos \
-                               autogen.sh \
-                               linphone.spec.in \
-                               $(GTK_FILELIST) \
-                               gen-gtkfilelist.sh \
-                               $(LINPHONEDEPS_FILELIST) \
-                               $(ISS_SCRIPT).in
-
-DISTCLEANFILES= intltool-extract intltool-merge intltool-update po/stamp-it po/.intltool-merge-cache $(ISS_SCRIPT) $(PACKAGE_WIN32_FILELIST)
-
-CLEANFILES=Portfile Portfile-devel
-
-# `make rpm'
-
-all-local: linphone.spec linphone.iss
-
-linphone.spec: linphone.spec.in
-
-.phony: rpm
-rpm:
-       $(MAKE) dist
-# Create "Specfile" at the same level as the tarball content
-       -rm -f $(PACKAGE)-$(VERSION).tar
-       gunzip $(PACKAGE)-$(VERSION).tar.gz
-       cp $(PACKAGE).spec Specfile
-       tar --append --file=$(PACKAGE)-$(VERSION).tar Specfile
-       gzip $(PACKAGE)-$(VERSION).tar
-# <https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2068410>
-       TAR_OPTIONS=--wildcards rpmbuild -ta --clean --rmsource --rmspec $(PACKAGE)-$(VERSION).tar.gz
-
-#a zip containing win32 binaries, suitable to generate an installer
-
-other-cherrypick:
-       cd $(GTK_PREFIX) && \
-       for file in $(WINBINDIST_FILES) ; do \
-               if test -d $$file; then \
-                       mkdir -p $(INSTALLDIR_WITH_PREFIX)/$$file ;\
-               else \
-                       cp $$file $(INSTALLDIR_WITH_PREFIX)/$$file ;\
-               fi \
-       done
-       cp /mingw/bin/libgcc_s*.dll $(INSTALLDIR_WITH_PREFIX)/bin/.
-
-
-gtk-cherrypick:
-       cd $(GTK_PREFIX) && \
-       for file in `cat $(GTK_FILELIST_PATH)` ; do \
-               if test -d $$file; then \
-                       mkdir -p $(INSTALLDIR_WITH_PREFIX)/$$file ;\
-               else \
-                       cp $$file $(INSTALLDIR_WITH_PREFIX)/$$file ;\
-               fi \
-       done && \
-       cp -rf share/themes $(INSTALLDIR_WITH_PREFIX)/share/.
-
-zip:
-       rm -f $(ZIPFILE)
-       rm -rf $(INSTALLDIR)
-       mkdir -p $(INSTALLDIR)
-       make install DESTDIR=$(INSTALLDIR)
-#remove unwanted linphone stuff
-       cd $(INSTALLDIR_WITH_PREFIX) && rm -rf $(ZIP_EXCLUDED)
-#add gtk dlls and files
-       make gtk-cherrypick
-       make other-cherrypick
-       cp -f $(top_srcdir)/gtk-glade/gtkrc $(INSTALLDIR_WITH_PREFIX)/.
-       cp -f $(top_srcdir)/README $(INSTALLDIR_WITH_PREFIX)/.
-       cp -f $(top_srcdir)/COPYING $(INSTALLDIR_WITH_PREFIX)/.
-       cd $(INSTALLDIR_WITH_PREFIX) && zip -r $(ZIPFILE) *
-
-filelist: zip
-       cd $(INSTALLDIR_WITH_PREFIX) && \
-       rm -f $(PACKAGE_WIN32_FILELIST) && \
-       for file in `find` ; do \
-               if ! test -d $$file ; then \
-                       echo "Source: $$file; Destdir: {app}\\`dirname $$file`; Flags: ignoreversion" \
-                       >> $(PACKAGE_WIN32_FILELIST) ;\
-               fi \
-       done
-
-setup.exe: filelist
-       cp $(ISS_SCRIPT) $(INSTALLDIR_WITH_PREFIX)/.
-       cd $(INSTALLDIR_WITH_PREFIX) && \
-       $(ISCC) $(ISS_SCRIPT) 
-       mv $(INSTALLDIR_WITH_PREFIX)/Output/setup.exe $(PACKAGE)-$(VERSION)-setup.exe
-       rm -rf $(INSTALLDIR_WITH_PREFIX)/Output
-       rm -f $(INSTALLDIR_WITH_PREFIX)/$(PACKAGE_WIN32_FILELIST)
-       rm -f $(INSTALLDIR_WITH_PREFIX)/$(ISS_SCRIPT)
-
-newdate:
-       cd gtk-glade && $(MAKE) newdate
-
-
-Portfile:      $(top_srcdir)/scripts/Portfile.tmpl dist
-       sed -e 's/\@VERSION\@/$(LINPHONE_VERSION)/g' \
-         -e 's/\@LINPHONE_MD5\@/$(shell md5sum linphone-$(VERSION).tar.gz | awk {'print $$1'})/' < $< > $@
-
-Portfile-devel:        $(top_srcdir)/scripts/Portfile-devel.tmpl dist
-       sed -e 's/\@VERSION\@/$(LINPHONE_VERSION)/g' \
-         -e 's/\@LINPHONE_MD5\@/$(shell md5sum linphone-$(VERSION).tar.gz | awk {'print $$1'})/' < $< > $@
-
diff --git a/linphone/NEWS b/linphone/NEWS
deleted file mode 100644 (file)
index 6c8f60b..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-linphone-3.2.2 -- ?????????
-       * improve bitrate usage of speex codec
-       * allow speex to run with vbr (variable bit rate) mode
-       * add speex/32000 (ultra wide band speex codec)
-       * answer empty SIP INFO requests
-
-linphone-3.2.1 -- October 5, 2009
-       * improve graphics and behaviour of mute button
-       * updated translations
-       * windows installer installs reg keys to indicate windows to start linphone clicking of sip uris
-       * workaround a bug Gtk-macos X with modal popup windows, preventing to answer calls
-
-linphone-3.2.0 -- September 17, 2009
-       * new in-call layout
-       * new idle view with two buttons
-       * ability to dial the number from dialpad
-       * improve local IP address detection when having multiple networks (ex: VPNs)
-       * use proxy's received and rport params from via in Contact header when possible
-       * port to mac os X leopard (using gtk/x11), audio only for now
-       * DevC++ support now deprecated, use msys/mingw (see README.mingw for details)
-       * add an option to ask linphone to place a call, whenever an instance is already running or not:
-               should be useful for starting calls from a web browser recognizing the 'sip:' uri scheme.
-       * french and italian translation updated
-       * don't show ffmpeg codecs when encoder are disabled in ffmpeg library.
-       * bugfixes in:
-               - video4linux2 support
-               - alsa support
-               - socket leak in mtu discovery
-
-
-linphone-3.1.2 -- May 5, 2009
-       * make it work with lastest ffmpeg swscale
-       * improve theora packer
-       * update theora default settings to match performance of 1.0 release.
-       * fix a random crash during video resizing on linux with SDL.
-
-linphone-3.1.1 -- April 14, 2009
-       * fix crash when opening property box, in some rare case
-       * windows version uses the new libmsdscap plugin (video capture using directshow)
-       * improved translations
-
-linphone-3.1.0 -- March 16, 2009
-       * linphone can now send large video pictures: up to SVGA, configurable via the user interface
-       * automatic rescaling of the video windows to the video size of incoming stream
-       * improved webcam support on windows
-       * plenty of user interface cosmetic improvements
-       * set a user friendly gtk theme by default on windows
-       * linphonec can compile and work without libreadline
-       * enable translations on windows
-       * enable lookups of SRV records
-       * new 'linphonecsh' program to send commands to a linphonec running as daemon using unix sockets or tcp.
-       * bugfixing as usual
-
-linphone-3.0.0  -- October 13, 2008
-       * new graphical interface based on Glade/Gtk
-       * systray icon
-       * STUN working for RTP
-       * fully ported to windows
-       * accurate bandwidth management (to let video occupy all remaning bandwidth)
-       * new H264 plugin based on x264 (msx264)
-       * automatic call hangup upon media transmission faillure
-
-linphone-2.1.1 -- February 13, 2008
-       * fix interroperability bug with Asterisk about a BYE not sent by linphone.
-       * fix alsa support weakness (capture underruns not recovered)
-
-linphone-2.1.0 -- January 25, 2008
-       * 4CIF support
-       * enable resizing of video output
-       * hu translation added
-
-linphone-2.0.1 -- November 30, 2007
-       * fix interop issue with asterisk
-       * answer OPTIONS and other SIP messages
-       * allow usage of ALSA user pcm devices with the sound->alsadev config item.
-
-linphone-2.0.0 -- November 15, 2007
-       * port to libeXosip2-3.0.x with libosip2-3.0.x
-       * implements early media
-       * implements incoming re-INVITE
-       * presence support improvements
-       * ipv6 working on windows
-       * implements SDP over 200ok/ACK
-       * add experimental snow codec support
-       * answers to VFU request in SIP-INFO by sending an I-frame.
-       * ffmpeg rate control enabled, improved mpeg4 quality for low bandwidths
-       * separate video grabbing and display in linphonec
-
-linphone-1.7.1 -- April 16, 2007
-       * cz translation
-       * compilation bugfixes (when video support is disabled)
-       * fix IM icons path bug
-
-linphone-1.7.0 -- April 11, 2007
-       * new splash screen when no webcam is detected
-       * new friend commands for linphonec
-       * gnome interface becomes gtk-only
-       * fix issue with codec bitrate settings when no bandwidth limits are given
-       * open rtp sockets before sending SDP offer or answer (so that we don't miss the
-         first I-frame)
-
-linphone-1.6.0 -- January 23, 2007
-       * Video4Linux V2 support with mjpeg cameras
-       * use MPEG4 config string provided in the SDP (if any)
-       * fix bug when choosing an invalid ring sound file
-       * fix bug when using quickcam driver with CIF size
-       * reduce audio bandwidth usage for <128kbit/s connections with video
-
-linphone-1.5.1 -- November 14, 2006
-       * fix translations
-
-linphone-1.5.0 -- October 11, 2006
-       * compliant theora support (using Luca Barbato's draft)
-       * mpeg4 support (compliant with RFC3016)
-       * controls to display and modify video codec list (gnome interface)
-       * banwidth usage improvements
-       * splash screen when no webcam is detected
-
-linphone-1.4.1 -- September 18, 2006
-       * fixes crash when attempting to make two simultaneous calls
-       * fixes crash when having no soundcard
-       * require theora>=1.0.0-alpha7
-       * do not allow resizing of the gnome interface
-       * do not change mixer settings at startup
-
-linphone-1.4.0 -- September 11, 2006
-       * no more glib dependency at all 
-       * new mediastreamer2 framework for audio/video streaming
-       * stable video support with H.263-1998
-       * echo cancelation
-       * experimental theora support
-       * jack support unported to mediastreamer2, sorry : volunteer needed
-       * video resolution and framerate set according to bandwidth constraints.
-       * linphonec new "soundcard" command to list and choose sound devices.
-       * new download and upload bandwidth parameters used to find suitable video/audio codec choice and parameters.
-       * new 'play' and 'record' functions to linphonec to play and record wav files
-       * arts sound backend
diff --git a/linphone/README b/linphone/README
deleted file mode 100644 (file)
index c92edbc..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-This is Linphone, a free (GPL) video softphone based on the SIP protocol.
-
-
-******************Building linphone ***********************************
-- you need at least:
-               - libosip2>=3.0.3
-               - libeXosip2>=3.0.3
-               - speex>=1.1.6
-               - libreadline
-       + gsm codec (gsm source package or libgsm-dev or gsm-devel) (optional)
-       + if you want to gtk/glade interface:
-               - gtk>=2.16.0
-               - libglade>=2.2
-       + if you want video support:
-               - SDL>=1.2.10
-               - libavcodec (ffmpeg) from a year 2007 or later cvs/svn
-               - libswscale (part of ffmpeg too) for better scaling performance
-
-with their corresponding -dev or -devel package if you don't use source packages.
-
-For windows compilation see README.mingw.
-For macOS X, see README.macos
-
-
-******************************** notes for developers: *****************************
-
-Here is a short description of the content of the source tree.
-
-- oRTP/ is a poweful implementation of the RTP protocol. See the oRTP/README for more details. 
-       It is used by the mediastreamer to send and receive streams to the network.
-
-- mediastreamer2/ is one of the important part of linphone. It is a framework library for audio 
-       and video processing. It contains several objects for grabing audio and video and outputing
-       it (through rtp, to file).
-       It contains also codec objects to compress audio and video streams.
-  The mediastream.h files contain routines to easyly setup audio streams.
-
-- coreapi/ is the central point of linphone, which handles relationship between sip signalisation and media
-  streaming. It contains an easy to use api to create a sip phone.
-
-- gtk-glade/   is the directory that contains the gui frontend of linphone. It uses all libraries descibed above.
-
-- console/
-       * linphonec.c is the main file for the console version of linphone.
-       * sipomatic.c / sipomatic.h contains the code for sipomatic, the test program that auto-answer to linphone calls.
-       * shell.c (program name: linphonecsh) is a small utilities to send interactive commands to a running linphonec daemon.
-               
-- share/ contains translation, documentation, rings and hello sound files.
-
diff --git a/linphone/README.M68k.txt b/linphone/README.M68k.txt
deleted file mode 100644 (file)
index a3659f8..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-                                       LINPHONE ON M68k-LINUX (by GIAN)
-                                       ********************************
-
-The console version of linphone works on arm-linux, but also on m68k-linux? I\92m trying to provide this:
-
-* I used the same toolchain specified in the LTIB menu configuration, that is, on my system:
-/opt/mtwk/usr/local/m68k-linux/gcc-3.4.0-glibc-2.3.2-v4e
-
-* I have created within my home directory a ColdFire-install-environment/ directory, copied into it the fresh tarballs of libogg-1.1.3, libosip2-2.2.2, speex-1.1.12, linphone-1.4.0 readline-5.1 and ncurses-5.5 (readline needs ncurses) Uncompressed all these
-tarballs. 
-
-Very important things common to all packages being cross compiled:
-******************************************************************
-* Copy the ipaq-config.site in the ipkg/ directory of linphone into some safe place, for example:
-cp /home/gianluca/ColdFire-install-environment/linphone-1.4.0-install/linphone-1.4.0/ipkg/ipag-config.site /home/gianluca/ColdFire-install-environment/linphone-1.4.0-install/
-Edit the ipaq-config.site file and replace all the arm-linux strings with m68k-linux one. Add also the \96mcfv4e flag to the CFLAGS, CXXFLAGS, and CPPFLAGS labels. 
-* You need a directory that we call M68K_INSTALL_TREE that will own files in the same way they will be installed on the target computer.
-
-mkdir /ColdFire-linphonec-1.4.0-mcfv4e
-export M68K_INSTALL_TREE=/ColdFire-linphonec-1.4.0-mcfv4e
-export CONFIG_SITE=/home/gianluca/ColdFire-install-environment/linphone-1.4.0-install/ipaq-config.site
-export PATH=$PATH:/opt/mtwk/usr/local/m68k-linux/gcc-3.4.0-glibc-2.3.2-v4e/bin
-
-
-Cross compiling ncurses for M68k:
-********************************
-./configure --prefix=/usr --host=m68k-linux --with-gnu-ld --with-shared
-make
-make install DESTDIR=$M68K_INSTALL_TREE
-
-
-Cross compiling readline for M68k:
-*********************************
-./configure --prefix=/usr --host=m68k-linux --with-gnu-ld --disable-static
-make
-make install DESTDIR=$M68K_INSTALL_TREE
-
-
-
-Cross compiling libosip for M68k:
-********************************
-./configure --prefix=/usr --host=m68k-linux --with-gnu-ld --disable-static
-make
-make install DESTDIR=$M68K_INSTALL_TREE
-
-
-Cross compiling libogg for M68k:
-********************************
-./configure --prefix=/usr --host=m68k-linux --with-gnu-ld --disable-static \96enable-fixed-point
-make
-make install DESTDIR=$M68K_INSTALL_TREE
-
-
-Cross compiling speex for M68k:
-********************************
-./configure --prefix=/usr --host=m68k-linux --with-gnu-ld --disable-static --enable-fixed-point --enable-m68k-asm --with-ogg=/ColdFire-linphonec-1.4.0-mcfv4e/usr --with-ogg-includes=/ColdFire-linphonec-1.4.0-mcfv4e/usr/include \96with-ogg-libraries=/ColdFire-linphonec-1.4.0-mcfv4e/usr/lib --disable-oggtest 
-make
-make install DESTDIR=$M68K_INSTALL_TREE
-
-
-cp /home/gianluca/ColdFire-iinstall-environment/linphone-1.4.0-install/linphone-1.4.0/mediastreamer2/src/.libs/libquickstream.so.0.0.0 /opt/mtwk/usr/local/m68k-linux/gcc-3.4.0-glibc-2.3.2-v4e/m68k-linux/lib
-cd /opt/mtwk/usr/local/m68k-linux/gcc-3.4.0-glibc-2.3.2-v4e/m68k-linux/lib
-ln -s libquickstream.so.0.0.0 libquickstream.so.0
-ln -s libquickstream.so.0.0.0 libquickstream.so
-
-cp /home/gianluca/ColdFire-install-environment/linphone-1.4.0-install/linphone-1.4.0/mediastreamer2/src/.libs/libmediastreamer.so.0.0.0 /opt/mtwk/usr/local/m68k-linux/gcc-3.4.0-glibc-2.3.2-v4e/m68k-linux/lib
-cd /opt/mtwk/usr/local/m68k-linux/gcc-3.4.0-glibc-2.3.2-v4e/m68k-linux/lib
-ln -s libmediastreamer.so.0.0.0 libmediastreamer.so.0
-ln -s libmediastreamer.so.0.0.0 libmediastreamer.so
-
-
-Cross compiling linphone for M68k:
-********************************
-First you need to remove all .la files from the M68K_INSTALL_TREE because it confuses libtool and makes
-the linker use your build machine binaries instead of the m68k-crosscompiled ones.
-rm -f $M68K_INSTALL_TREE/usr/lib/*.la
-#for some reason pkg-config doesn't like cross-compiling...
-export PKG_CONFIG=/usr/bin/pkg-config
-./configure --prefix=/usr --host=m68k-linux --with-gnu-ld --disable-static --disable-strict --enable-gnome_ui=no --enable-alsa --disable-glib --disable-video --with-osip=$ARM_INSTALL_TREE/usr --with-osipparser=$ARM_INSTALL_TREE/usr --with-readline=$ARM_INSTALL_TREE/usr SPEEX_CFLAGS="-I$ARM_INSTALL_TREE/usr/include" SPEEX_LIBS="-L$ARM_INSTALL_TREE/usr/lib -lspeex"
-make 
-make install DESTDIR=$M68K_INSTALL_TREE
-
-
-Binaries can also be stripped with m68k-linux-strip to save more space.
-
-
-Running linphone under the ColdFire board
-********************************************
-
-You just have to start linphone from a terminal by typing 'linphonec'.
-
-Gianluca Salvador
-
diff --git a/linphone/README.arm b/linphone/README.arm
deleted file mode 100644 (file)
index 5020729..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-                                       LINPHONE ON ARM-LINUX (HANDHELD COMPUTERS)
-                                       ******************************************
-
-The console version of linphone works on arm-linux and has been tested on ipaqs
-under the familiar linux distribution (http://www.handhelds.org).
-You can find .ipk binary packages on the linphone's download page. 
-If you want to build your own arm-linux packages, here are some instructions to
-cross compile linphone and its dependencies: readline, speex and libosip.
-This is my own experience on cross compiling software. As there is no precise
-step by step documentation (as far as I know) on how to cross-compile on arm, 
-there is no guaranty that the following instructions are the best way to do it.
-First, be aware that only the console version of linphone can compile on ARM.
-
-
-* You need the lastest arm toolchain from http://www.handhelds.org. Uncompress it in / .
-       It contains all the cross-compilation tools. Be sure that the arm-linux-gcc binaries
-       are in your PATH (export PATH=$PATH:/usr/local/arm/3.4.1/bin/ , for example)
-* create within your home directory a arm/ directory, copy into it the fresh 
-       tarballs of libosip2>=2.2.x, speex>=1.1.6, linphone>=1.2.1 readline>=5.1 and ncurses>=5.5 (readline needs ncurses)
-        Uncompress all these
-       tarballs. 
-       
-
-Very important things common to all packages being cross compiled:
-******************************************************************
-* copy the ipaq-config.site in the ipkg/ directory of linphone into some safe place,
-for example: ~/ipaq-config.site .
-* You need a directory that we call ARM_INSTALL_TREE that will own files in the same way they will be installed on the target computer.
-It is also used to build linphone over the arm binaries of its dependencies (speex,osip,ncurses,readline).
-
-For example:
-
-export CONFIG_SITE=~/ipaq-config.site
-export ARM_INSTALL_TREE=/armbuild
-
-
-Cross compiling ncurses for ARM:
-********************************
-./configure --prefix=/usr --host=arm-linux --with-gnu-ld --with-shared
-make
-make install DESTDIR=$ARM_INSTALL_TREE
-make install DESTDIR=`pwd`/armbuild
-
-
-Cross compiling readline for ARM:
-*********************************
-./configure --prefix=/usr --host=arm-linux --with-gnu-ld --disable-static
-make
-make install DESTDIR=$ARM_INSTALL_TREE
-make install DESTDIR=`pwd`/armbuild
-
-
-
-Cross compiling libosip for ARM:
-********************************
-./configure --prefix=/usr --host=arm-linux --with-gnu-ld --disable-static
-make
-make install DESTDIR=$ARM_INSTALL_TREE
-make install DESTDIR=`pwd`/armbuild
-
-Cross compiling speex for ARM:
-********************************
-First you need to remove ogg headers from your build system to avoid a dirty conflict between
-your build machine binaries and the arm binaries. They are usually in a libogg-dev package (rpm or deb).
-Then:
-./configure --prefix=/usr --host=arm-linux --with-gnu-ld --disable-static --enable-fixed-point --enable-arm-asm
-make
-make install DESTDIR=$ARM_INSTALL_TREE
-make install DESTDIR='pwd'/armbuild
-
-
-Cross compiling linphone for ARM
-********************************
-First you need to remove all .la files from the ARM_INSTALL_TREE because it confuses libtool and makes
-the linker use your build machine binaries instead of the arm-crosscompiled ones.
-rm -f $ARM_INSTALL_TREE/usr/lib/*.la
-#for some reason pkg-config doesn't like cross-compiling...
-export PKG_CONFIG=/usr/bin/pkg-config
-./configure --prefix=/usr --host=arm-linux --with-gnu-ld --disable-static \
-       --disable-glib --with-osip=$ARM_INSTALL_TREE/usr \
-    --with-readline=$ARM_INSTALL_TREE/usr \
-       SPEEX_CFLAGS="-I$ARM_INSTALL_TREE/usr/include" \
-       SPEEX_LIBS="-L$ARM_INSTALL_TREE/usr/lib -lspeex "
-make 
-make install DESTDIR='pwd'/armbuild
-
-You can use the install trees libosip2-x.x.x/armbuild speex-x.x.x/armbuild and 
-linphone-0.x.x/armbuild/ to make binary packages of
-each software, as ipkgs for the familiar distribution (http://www.familiar.org).
-In the ipkg/ directory of linphone you can find .control files for ipkg-build. 
-In order to make the osip ipkg, you have to do the following:
-- create a directory named CONTROL inside libosip2-2.2.x/armbuild
-- copy the libosip.control file into CONTROL/ and rename it into "control".
-- edit the "control" file to adjust version number accordingly.
-- remove the non essential parts of libosip inside libosip2-2.x.x/armbuild/usr/ : just 
-       leave the lib/ directory. This saves space on the destination computer.
-- then inside libosip2-2.x.x, run ipkg-build -o root -g root armbuild
-The same procedure applies to make linphone's ipkg.
-Binaries can also be stripped with arm-linux-strip to save more space.
-
-Running linphone under the handheld computer
-********************************************
-
-You just have to start linphone from a terminal by typing 'linphonec'.
-
-Simon
diff --git a/linphone/README.macos b/linphone/README.macos
deleted file mode 100644 (file)
index 6d38515..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-Compiling linphone on macos X
-
-This procedure works for audio, video still not fully supported.
-It was tested on macos X (leopard) on september 2009.
-
-Requirements:
-* xcode (for gcc)
-* macport (GNU porting project)
-* svn or git checkout'd linphone tree.
-
-Steps:
-* install with the 'port install' command the following dependencies
-       - automake
-       - autoconf
-       - libtool
-       - gettext
-       - intltool
-       - gtk2
-       - libglade2
-       - speex-dev
-       - osip2
-       - eXosip2
-       
-* add /opt/local/bin to your PATH by editing (or creating) ~/.profile, logout and login again for changes to take effect
-
-* within linphone source directory, run ./autogen.sh
-* run 
-       ./configure --prefix=/opt/local --disable-video --with-readline=none && make
-       (note: we disable readline for linphonec because it appears to hang at this time)
-* install to /opt/local
-       sudo make install 
-
-
-
diff --git a/linphone/README.mingw b/linphone/README.mingw
deleted file mode 100644 (file)
index 9e9709b..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-Software to install
-*******************
-
-* mingw32, using Automated windows installer (when launched, choose candidate to have lastest binaries)
-* msys, using windows installer too.
-
-run msys as Administrator (right click on the icon, and click 'run as administrator')
-
-Download zip and unzip (download setup.exe and run) from http://gnuwin32.sourceforge.net
-       - add them to your path in msys terminal:
-               export PATH=$PATH:/c/Program\ Files/GnuWin32/bin
-
-Download from mingw download page (http://www.mingw.org, click download):
-       - MSYS automake-1.11 
-       - MSYS autoconf-2.63
-       - MSYS libtool>=2.2.7 
-       - MSYS libcrypt*-bin
-       - MSYS perl
-       - MSYS gettext-*bin* and gettext-*dev*
-       ===> Uncompress all these packages in /
-       - from gcc-4.4 directory
-               Download: 
-                       - gcc-core*-bin
-                       - gcc-core-*-dll
-                       - gcc-c++*-bin
-                       - gcc-c++*-dll
-                       - gmp*-dll
-                       - mpfr*-dll
-       - w32api*-dev
-       - mingwrt-dev and mingwrt-dll (mingw run time)
-       - gnu binutils 2.19
-       ===> Uncompress all these packages in /mingw
-
-note: lzma files can be uncompressed using tar --lzma -xvf <file>
-
-* Download intltool (quicklink: 
-       http://ftp.acc.umu.se/pub/GNOME/binaries/win32/intltool/0.40/intltool_0.40.4-1_win32.zip
-       note: -dev package is not needed.)
-  uncompress in  / with 'unzip' command.
-
-* Download lastest gtk+bundle from http://www.gtk.org , uncompress in /
-* Download libglade and libglade-dev >=2.6.3 from gnome ftp:
-    http://ftp.gnome.org/pub/GNOME/binaries/win32/libglade/2.6/libglade-dev_2.6.4-1_win32.zip
-    http://ftp.gnome.org/pub/GNOME/binaries/win32/libglade/2.6/libglade_2.6.4-1_win32.zip
-    uncompress in /
-* Download ActiveState perl and run the installer with default options (http://www.activestate.com , developer tools)
-       Yes it is required despite MSYS perl is already installed.
-
-* Download lastest linphone-deps from linphone downloads, misc directory:
-    http://download.savannah.gnu.org/releases-noredirect/linphone/misc/)
-    uncompress in /
-* Download and install Inno Setup Compiler in its default path (required only if you run 'make setup.exe').
-
-* HACKS:
-       Move out /lib/libintl.la : it confuses libtool
-               mv /lib/libintl.la /lib/libintl.la.bak
-       Move out libstdc++.la in order to workaround a gcc-4.4.0 bug (or packaging bug):
-               mv /mingw/lib/gcc/mingw32/4.4.0/libstdc++.la /mingw/lib/gcc/mingw32/4.4.0/libstdc++.la.bak
-
-Get Linphone source code
-************************
-
-Install msys-git from (http://code.google.com/p/msysgit/)
-
-It is recommended that you create a directory somewhere with a path without any spaces or ~ characters, for example
-c:\sources\
-Within msys-git bash, do
-cd /c/sources
-git clone git://git.savannah.nongnu.org/linphone.git
-
-
-Building
-********
-
-WARNING: During the build, windows might slow down suddenly. Using ctl+alt+del to start the windows system monitor,
- you might see a process 'LVpSRV.exe' or something like this that eats 90% of cpu.
-Kill it. Don't know what it is, but once killed, windows runs normally.
-
-The following variables must be exported:
-
-#use ActiveState perl instead of mingw perl
-export PERL="/c/Perl/bin/perl"
-export INTLTOOL_PERL="/c/Perl/bin/perl"
-#add gnuwin32 tools to your path:
-export PATH=$PATH:/c/Program\ Files/Gnuwin32/bin
-
-for convenience the 'mingw-envsetup.sh' script in linphone sources does this, so you can just source it:
-. ./mingw-envsetup.sh
-
-#run autogen.sh after a git checkout or update
-./autogen.sh
-./configure --prefix=/opt/linphone --enable-shared --disable-static
-make
-#will install to /opt/linphone, required for compilation of plugins.
-make install
-#make a binary zip of linphone
-make zip
-#additionally you can make binary installer if you have Inno Setup 5 installed in its default path
-make setup.exe
-
-#build plugins
-cd mediastreamer2/plugins/msx264
-./autogen.sh
-PKG_CONFIG_PATH=/opt/linphone/lib/pkgconfig ./configure --prefix=/opt/linphone --enable-shared --disable-static
-#make a binary zip of this plugin
-make zip
-#or make an installer
-make setup.exe
-
-#the buddylookup plugin enables lookup of buddies in a remote database using xml-rpc over http/https.
-cd coreapi/plugins/buddylookup
-./autogen.sh
-PKG_CONFIG_PATH=/opt/linphone/lib/pkgconfig ./configure --prefix=/opt/linphone --enable-shared --disable-static 
-make
-#make a binary zip of this plugin
-make zip
-
-
-******************************************************
-*      Notes about linphone-deps generation          *
-******************************************************
-
-Linphone-deps is a collection of linphone dependencies, that are for some of them difficult
-to find as windows binaries.
-These notes are useful if you want to upgrade part of the software that is included in the
-linphone-deps packages.
-
-List of software included in linphone-deps:
-libosip2  (compiled)
-libeXosip2 (compiled)
-libavcodec, libavutil, libavformat, libavdevice, libswscale (compiled, all these from ffmpeg)
-libtheora (from the web)
-libx264 (compiled from the version distributed from linphone's web site)
-libogg (from the web)
-libspeex, libspeexdsp (compiled, statically to workaround a dll-related crash)
-libgnutls (from the web)
-libgsm (from the web)
-libxml2 (compiled)
-libsoup (compiled)
-
-Remarks:
-For every package compiled that goes into linphone-deps, .la files (libtool files) must be removed to avoid libtool errors.
-When running "make install DESTDIR=<somepath>", somepath must be absolute and should not contain any ~ or space.
-
-- building ffmpeg 
-  ./configure --enable-shared --disable-static --enable-memalign-hack --extra-cflags="-fno-common" --enable-gpl && make
-  make install DESTDIR=/home/<myuser>/ffmpeg-install
-  Copy to ~/ffmpeg-install/usr/local/* to linphone-deps/.
-  Copy also all *.dll.a files from the build tree to lib/ directort of linphone-deps. These are the implibs necessary to link a program against the dlls.
-
-- building libxml2: the binaries found on the internet are generated with MSVC++, and for obscure reason they are not suitable for building libsoup 
-  (that requires libxml2).
-  ./configure --enable-shared --disable-static && make && make install DESTDIR=/home/<myuser>/libxml2-install
-  copy ~/libxml2-install/usr/local/* into linphone-deps/.
-
-- building x264:
-  * download yasm normal version windows executable from yasm project page:
-  http://www.tortall.net/projects/yasm/wiki/Download
-  copy it as /usr/local/bin/yasm.exe
-
-  cd into x264/ dir then run:
-  ./configure --enable-pic
-  make
-  make install DESTDIR=/home/<myuser>/x264-install
-  then copy the content of ~/x264-install/usr/local/ into linphone-deps/.
-
-- libgnutls (required for libsoup https support)
-       - download binary zip from http://josefsson.org/gnutls4win.org
-       - add to linphone-deps
-
-- building libsoup (only required for buddylookup plugin)
-       - download source from gnome ftp (warning: at the time of the writing only version 2.26.x can compile with the 
-               glib version supplied in the gtk-bundle, 2.27 requires a new version of glib)
-       - uncompress libgnutls zip in /
-       - make sure you have libxml2 installed in /
-       - apply a bugfix patch (fix gnutls support on windows, completely broken otherwise). The patch
-               is in linphone-deps/src, apply it this way:
-               cd libsoup-2.26.*
-               cd libsoup
-               patch -p0 < libsoup-gnutls-bugfix.patch
-       - run:
-               ./configure --prefix=/usr --enable-shared --disable-static
-               make
-               make install
-               make install DESTDIR=/home/<myuser>/libsoup-install
-       - copy ~/libsoup-install/usr/* into linphone-deps/
-
-Once you have everything in linphone-deps, remove .la files from lib:
-       cd lib && rm -f *.la
diff --git a/linphone/TODO b/linphone/TODO
deleted file mode 100644 (file)
index 3a0199c..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-hot stuff:
----------
-
-* ice support
-* run a user given command upon incoming calls
-* linphonec on win32
-* RTP inactivity timeout to close lost calls.
-
-
-low priority:
--------------
-
-* random RTP ports (to enable direct mapping NAT)
-* zeroconf support for advertising services (cool stuff!)
-* have the possibility to define several profiles (config files) and switch between them
-* display call duration
-* help tips for the registration box
-* The length (or duration) of the call could be displayed (see icons2.png)
-* 2. There could be a sound effect for "busy" - a short "beep-beep-beep" would be      sufficient (try http://www.google.com/search?q=busy.wav)
-* The call history could be a bit more clear (see history.png). And it
-  should be saved somewhere, so you can track your calls if you need to...
-* move resampling stuff to use speex instead of libresample.
\ No newline at end of file
diff --git a/linphone/autogen.sh b/linphone/autogen.sh
deleted file mode 100755 (executable)
index a8bd1ca..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/sh
-
-AM_VERSION="1.10"
-if ! type aclocal-$AM_VERSION 1>/dev/null 2>&1; then
-       # automake-1.10 (recommended) is not available on Fedora 8
-       AUTOMAKE=automake
-       ACLOCAL=aclocal
-else
-       ACLOCAL=aclocal-${AM_VERSION}
-       AUTOMAKE=automake-${AM_VERSION}
-fi
-
-if test -f /opt/local/bin/glibtoolize ; then
-        # darwin
-        LIBTOOLIZE=/opt/local/bin/glibtoolize
-else
-        LIBTOOLIZE=libtoolize
-fi
-if test -d /opt/local/share/aclocal ; then
-        ACLOCAL_ARGS="-I /opt/local/share/aclocal"
-fi
-
-if test -f /opt/local/bin/intltoolize ; then
-       #darwin
-       INTLTOOLIZE=/opt/local/bin/intltoolize
-else
-       #on mingw, it is important to invoke intltoolize with an absolute path to avoid a bug
-       INTLTOOLIZE=/usr/bin/intltoolize
-fi
-
-echo "Generating build scripts in linphone..."
-set -x
-$LIBTOOLIZE --copy --force
-
-$INTLTOOLIZE -c --force --automake
-$ACLOCAL -I m4 $ACLOCAL_ARGS
-autoheader
-$AUTOMAKE --force-missing --add-missing --copy
-autoconf
-
-echo "Generating build scripts in oRTP..."
-cd oRTP && ./autogen.sh && cd -
-
-echo "Generating build scripts in mediastreamer2..."
-cd mediastreamer2 && ./autogen.sh && cd -
diff --git a/linphone/build/wince/liblinphone.sln b/linphone/build/wince/liblinphone.sln
deleted file mode 100644 (file)
index fe4efff..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-\r
-Microsoft Visual Studio Solution File, Format Version 10.00\r
-# Visual Studio 2008\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblinphone", "liblinphone.vcproj", "{290078F0-3B63-47BF-A2A9-E1AF5411F5E7}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "linphonec", "linphonec\linphonec.vcproj", "{92574924-BF59-4DAA-994B-9978B80E5797}"\r
-EndProject\r
-Global\r
-       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
-               Debug|Win32 = Debug|Win32\r
-               Debug|Windows Mobile 6 Professional SDK (ARMV4I) = Debug|Windows Mobile 6 Professional SDK (ARMV4I)\r
-               Debug|Windows Mobile 6 Standard SDK (ARMV4I) = Debug|Windows Mobile 6 Standard SDK (ARMV4I)\r
-               Release|Win32 = Release|Win32\r
-               Release|Windows Mobile 6 Professional SDK (ARMV4I) = Release|Windows Mobile 6 Professional SDK (ARMV4I)\r
-               Release|Windows Mobile 6 Standard SDK (ARMV4I) = Release|Windows Mobile 6 Standard SDK (ARMV4I)\r
-       EndGlobalSection\r
-       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
-               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Debug|Win32.Build.0 = Debug|Win32\r
-               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I)\r
-               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)\r
-               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)\r
-               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Standard SDK (ARMV4I)\r
-               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I)\r
-               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I)\r
-               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Release|Win32.ActiveCfg = Release|Win32\r
-               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Release|Win32.Build.0 = Release|Win32\r
-               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I)\r
-               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)\r
-               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)\r
-               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Release|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Standard SDK (ARMV4I)\r
-               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I)\r
-               {290078F0-3B63-47BF-A2A9-E1AF5411F5E7}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I)\r
-               {92574924-BF59-4DAA-994B-9978B80E5797}.Debug|Win32.ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I)\r
-               {92574924-BF59-4DAA-994B-9978B80E5797}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I)\r
-               {92574924-BF59-4DAA-994B-9978B80E5797}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)\r
-               {92574924-BF59-4DAA-994B-9978B80E5797}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)\r
-               {92574924-BF59-4DAA-994B-9978B80E5797}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I)\r
-               {92574924-BF59-4DAA-994B-9978B80E5797}.Release|Win32.ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I)\r
-               {92574924-BF59-4DAA-994B-9978B80E5797}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I)\r
-               {92574924-BF59-4DAA-994B-9978B80E5797}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)\r
-               {92574924-BF59-4DAA-994B-9978B80E5797}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)\r
-               {92574924-BF59-4DAA-994B-9978B80E5797}.Release|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I)\r
-       EndGlobalSection\r
-       GlobalSection(SolutionProperties) = preSolution\r
-               HideSolutionNode = FALSE\r
-       EndGlobalSection\r
-EndGlobal\r
diff --git a/linphone/build/wince/liblinphone.vcproj b/linphone/build/wince/liblinphone.vcproj
deleted file mode 100644 (file)
index 9909c8a..0000000
+++ /dev/null
@@ -1,585 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9,00"\r
-       Name="liblinphone"\r
-       ProjectGUID="{290078F0-3B63-47BF-A2A9-E1AF5411F5E7}"\r
-       RootNamespace="liblinphone"\r
-       Keyword="Win32Proj"\r
-       TargetFrameworkVersion="0"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="Windows Mobile 6 Standard SDK (ARMV4I)"\r
-               />\r
-               <Platform\r
-                       Name="Windows Mobile 6 Professional SDK (ARMV4I)"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       OutputDirectory="Debug"\r
-                       IntermediateDirectory="Debug"\r
-                       ConfigurationType="2"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="0"\r
-                               AdditionalIncludeDirectories="&quot;..\..\oRTP\include:..\..\mediastreamer2\include:..\..\..\..\linphone-builder\osip\include:..\..\..\..\linphone-builder\eXosip\include:..\..\..\..\linphone-builder\speex\include&quot;"\r
-                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBLINPHONE_EXPORTS; OSIP_MT: ENABLE_TRACE:LOG_DOMAIN=\&quot;LinphoneCore\&quot;:ORTP_STATIC:"\r
-                               MinimalRebuild="true"\r
-                               BasicRuntimeChecks="3"\r
-                               RuntimeLibrary="3"\r
-                               UsePrecompiledHeader="0"\r
-                               WarningLevel="3"\r
-                               Detect64BitPortabilityProblems="true"\r
-                               DebugInformationFormat="4"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               LinkIncremental="2"\r
-                               GenerateDebugInformation="true"\r
-                               SubSystem="2"\r
-                               TargetMachine="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"\r
-                       OutputDirectory="Windows Mobile 6 Standard SDK (ARMV4I)\$(ConfigurationName)"\r
-                       IntermediateDirectory="Windows Mobile 6 Standard SDK (ARMV4I)\$(ConfigurationName)"\r
-                       ConfigurationType="2"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               ExecutionBucket="7"\r
-                               AdditionalOptions="&#x0D;&#x0A;"\r
-                               Optimization="0"\r
-                               AdditionalIncludeDirectories="..\..\oRTP\include;..\..\mediastreamer2\include;&quot;..\..\..\..\linphone-builder\speex\include&quot;;&quot;..\..\..\..\linphone-builder\eXosip\include&quot;;&quot;..\..\..\..\linphone-builder\osip\include&quot;"\r
-                               PreprocessorDefinitions="ORTP_INET6;ORTP_EXPORT;_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);LIBLINPHONE_EXPORTS;OSIP_MT;ENABLE_TRACE;LOG_DOMAIN=\&quot;LinphoneCore\&quot;;IN_LINPHONE;LINPHONE_PLUGINS_DIR=\&quot;\&quot;;LINPHONE_VERSION=\&quot;3.1.2\&quot;"\r
-                               MinimalRebuild="true"\r
-                               RuntimeLibrary="3"\r
-                               UsePrecompiledHeader="0"\r
-                               WarningLevel="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2.lib osip2.lib osipparser2.lib eXosip2.lib mediastreamer2.lib ortp.lib"\r
-                               LinkIncremental="2"\r
-                               AdditionalLibraryDirectories="&quot;..\..\..\..\linphone-builder\osip\platform\wince\$(PlatformName)\$(ConfigurationName)&quot;;&quot;..\..\oRTP\build\wince\$(PlatformName)\$(ConfigurationName)&quot;"\r
-                               GenerateDebugInformation="true"\r
-                               SubSystem="2"\r
-                               TargetMachine="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCodeSignTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-                       <DeploymentTool\r
-                               ForceDirty="-1"\r
-                               RemoteDirectory=""\r
-                               RegisterOutput="0"\r
-                               AdditionalFiles=""\r
-                       />\r
-                       <DebuggerTool\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"\r
-                       OutputDirectory="Windows Mobile 6 Professional SDK (ARMV4I)\$(ConfigurationName)"\r
-                       IntermediateDirectory="Windows Mobile 6 Professional SDK (ARMV4I)\$(ConfigurationName)"\r
-                       ConfigurationType="4"\r
-                       CharacterSet="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               ExecutionBucket="7"\r
-                               AdditionalOptions="&#x0D;&#x0A;"\r
-                               Optimization="2"\r
-                               AdditionalIncludeDirectories="..\..\oRTP\include;..\..\mediastreamer2\include;&quot;..\..\..\..\linphone-builder\speex\include&quot;;&quot;..\..\..\..\linphone-builder\eXosip\include&quot;;&quot;..\..\..\..\linphone-builder\osip\include&quot;"\r
-                               PreprocessorDefinitions="ORTP_INET6;ORTP_EXPORT;_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);LIBLINPHONE_EXPORTS;OSIP_MT;ENABLE_TRACE;LOG_DOMAIN=\&quot;LinphoneCore\&quot;;IN_LINPHONE;LINPHONE_PLUGINS_DIR=\&quot;\&quot;;LINPHONE_VERSION=\&quot;3.1.2\&quot;;_UNICODE;UNICODE;PACKAGE_SOUND_DIR=\&quot;\\Program Files\\Linphone\&quot;"\r
-                               MinimalRebuild="true"\r
-                               RuntimeLibrary="3"\r
-                               UsePrecompiledHeader="0"\r
-                               WarningLevel="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLibrarianTool"\r
-                               AdditionalOptions=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCodeSignTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-                       <DeploymentTool\r
-                               ForceDirty="-1"\r
-                               RemoteDirectory=""\r
-                               RegisterOutput="0"\r
-                               AdditionalFiles=""\r
-                       />\r
-                       <DebuggerTool\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       OutputDirectory="Release"\r
-                       IntermediateDirectory="Release"\r
-                       ConfigurationType="2"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="..\..\oRTP\include:..\..\mediastreamer2\include:..\..\..\..\linphone-builder\osip\include::..\..\..\..\linphone-builder\eXosip::..\..\..\..\linphone-builder\speex\include"\r
-                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBLINPHONE_EXPORTS; OSIP_MT: ENABLE_TRACE:LOG_DOMAIN=\&quot;LinphoneCore\&quot;:ORTP_STATIC:"\r
-                               RuntimeLibrary="2"\r
-                               UsePrecompiledHeader="0"\r
-                               WarningLevel="3"\r
-                               Detect64BitPortabilityProblems="true"\r
-                               DebugInformationFormat="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               LinkIncremental="2"\r
-                               GenerateDebugInformation="true"\r
-                               SubSystem="2"\r
-                               OptimizeReferences="2"\r
-                               EnableCOMDATFolding="2"\r
-                               TargetMachine="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"\r
-                       OutputDirectory="Windows Mobile 6 Standard SDK (ARMV4I)\$(ConfigurationName)"\r
-                       IntermediateDirectory="Windows Mobile 6 Standard SDK (ARMV4I)\$(ConfigurationName)"\r
-                       ConfigurationType="2"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               ExecutionBucket="7"\r
-                               AdditionalIncludeDirectories="..\..\oRTP\include:..\..\mediastreamer2\include:..\..\..\..\linphone-builder\osip\include::..\..\..\..\linphone-builder\eXosip::..\..\..\..\linphone-builder\speex\include"\r
-                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBLINPHONE_EXPORTS; OSIP_MT: ENABLE_TRACE:LOG_DOMAIN=\&quot;LinphoneCore\&quot;:ORTP_STATIC:"\r
-                               RuntimeLibrary="2"\r
-                               UsePrecompiledHeader="0"\r
-                               WarningLevel="3"\r
-                               DebugInformationFormat="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               LinkIncremental="2"\r
-                               GenerateDebugInformation="true"\r
-                               SubSystem="2"\r
-                               OptimizeReferences="2"\r
-                               EnableCOMDATFolding="2"\r
-                               TargetMachine="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCodeSignTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-                       <DeploymentTool\r
-                               ForceDirty="-1"\r
-                               RemoteDirectory=""\r
-                               RegisterOutput="0"\r
-                               AdditionalFiles=""\r
-                       />\r
-                       <DebuggerTool\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"\r
-                       OutputDirectory="Windows Mobile 6 Professional SDK (ARMV4I)\$(ConfigurationName)"\r
-                       IntermediateDirectory="Windows Mobile 6 Professional SDK (ARMV4I)\$(ConfigurationName)"\r
-                       ConfigurationType="2"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               ExecutionBucket="7"\r
-                               AdditionalIncludeDirectories="..\..\oRTP\include:..\..\mediastreamer2\include:..\..\..\..\linphone-builder\osip\include::..\..\..\..\linphone-builder\eXosip::..\..\..\..\linphone-builder\speex\include"\r
-                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBLINPHONE_EXPORTS; OSIP_MT: ENABLE_TRACE:LOG_DOMAIN=\&quot;LinphoneCore\&quot;:ORTP_STATIC:"\r
-                               RuntimeLibrary="2"\r
-                               UsePrecompiledHeader="0"\r
-                               WarningLevel="3"\r
-                               DebugInformationFormat="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               LinkIncremental="2"\r
-                               GenerateDebugInformation="true"\r
-                               SubSystem="2"\r
-                               OptimizeReferences="2"\r
-                               EnableCOMDATFolding="2"\r
-                               TargetMachine="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCodeSignTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-                       <DeploymentTool\r
-                               ForceDirty="-1"\r
-                               RemoteDirectory=""\r
-                               RegisterOutput="0"\r
-                               AdditionalFiles=""\r
-                       />\r
-                       <DebuggerTool\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Header Files"\r
-                       Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
-                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\..\coreapi\enum.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\coreapi\exevents.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\coreapi\linphonecore.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\coreapi\lpconfig.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\coreapi\private.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\coreapi\sdphandler.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\coreapi\sipsetup.h"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Resource Files"\r
-                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"\r
-                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
-                       >\r
-               </Filter>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
-                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\..\coreapi\authentication.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\coreapi\chat.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\coreapi\enum.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\coreapi\exevents.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\coreapi\friend.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\coreapi\general_state.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\coreapi\linphonecore.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\coreapi\lpconfig.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\coreapi\misc.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\coreapi\presence.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\coreapi\proxy.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\coreapi\sdphandler.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\coreapi\siplogin.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\coreapi\sipsetup.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/linphone/build/wince/linphonec/linphonec.vcproj b/linphone/build/wince/linphonec/linphonec.vcproj
deleted file mode 100644 (file)
index 058ce42..0000000
+++ /dev/null
@@ -1,240 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9,00"\r
-       Name="linphonec"\r
-       ProjectGUID="{92574924-BF59-4DAA-994B-9978B80E5797}"\r
-       RootNamespace="linphonec"\r
-       Keyword="Win32Proj"\r
-       TargetFrameworkVersion="196613"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Windows Mobile 6 Professional SDK (ARMV4I)"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"\r
-                       OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
-                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
-                       ConfigurationType="1"\r
-                       UseOfMFC="0"\r
-                       CharacterSet="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               ExecutionBucket="7"\r
-                               Optimization="0"\r
-                               AdditionalIncludeDirectories="&quot;..\..\..\..\..\linphone-builder\osip\include&quot;;..\..\..\mediastreamer2\include;..\..\..\oRTP\include;..\..\..\coreapi"\r
-                               PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_CONSOLE;$(ARCHFAM);$(_ARCHFAM_);IN_LINPHONE;PACKAGE_DIR=\&quot;\\Program Files\\Linphone\&quot;"\r
-                               MinimalRebuild="true"\r
-                               RuntimeLibrary="3"\r
-                               UsePrecompiledHeader="0"\r
-                               WarningLevel="3"\r
-                               DebugInformationFormat="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES)"\r
-                               Culture="1033"\r
-                               AdditionalIncludeDirectories="$(IntDir)"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalOptions=" /subsystem:windowsce,5.02"\r
-                               AdditionalDependencies="mediastreamer2.lib ortp.lib liblinphone.lib ws2.lib mmtimer.lib iphlpapi.lib eXosip2.lib osip2.lib osipparser2.lib"\r
-                               OutputFile="$(OutDir)/linphonec.exe"\r
-                               LinkIncremental="2"\r
-                               AdditionalLibraryDirectories="&quot;..\..\..\oRTP\build\wince\$(PlatformName)\$(ConfigurationName)&quot;;&quot;..\..\..\mediastreamer2\build\wince\$(PlatformName)\$(ConfigurationName)&quot;;&quot;..\$(PlatformName)\$(ConfigurationName)&quot;;&quot;..\..\..\..\..\linphone-builder\eXosip\platform\wince\$(PlatformName)\$(ConfigurationName)&quot;;&quot;..\..\..\..\..\linphone-builder\osip\platform\wince\$(PlatformName)\$(ConfigurationName)&quot;"\r
-                               DelayLoadDLLs="$(NOINHERIT)"\r
-                               GenerateDebugInformation="true"\r
-                               ProgramDatabaseFile="$(OutDir)/linphonec.pdb"\r
-                               SubSystem="0"\r
-                               StackReserveSize="65536"\r
-                               StackCommitSize="4096"\r
-                               EntryPointSymbol="mainWCRTStartup"\r
-                               RandomizedBaseAddress="1"\r
-                               DataExecutionPrevention="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCodeSignTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-                       <DeploymentTool\r
-                               ForceDirty="-1"\r
-                               RemoteDirectory="%CSIDL_PROGRAM_FILES%\linphone"\r
-                               RegisterOutput="0"\r
-                               AdditionalFiles=""\r
-                       />\r
-                       <DebuggerTool\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"\r
-                       OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
-                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
-                       ConfigurationType="1"\r
-                       CharacterSet="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               ExecutionBucket="7"\r
-                               Optimization="2"\r
-                               FavorSizeOrSpeed="2"\r
-                               PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_CONSOLE;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE"\r
-                               RuntimeLibrary="0"\r
-                               UsePrecompiledHeader="2"\r
-                               WarningLevel="3"\r
-                               DebugInformationFormat="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES)"\r
-                               Culture="1033"\r
-                               AdditionalIncludeDirectories="$(IntDir)"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalOptions=" /subsystem:windowsce,5.02"\r
-                               OutputFile="$(OutDir)/linphonec.exe"\r
-                               LinkIncremental="1"\r
-                               DelayLoadDLLs="$(NOINHERIT)"\r
-                               GenerateDebugInformation="true"\r
-                               ProgramDatabaseFile="$(OutDir)/linphonec.pdb"\r
-                               SubSystem="0"\r
-                               StackReserveSize="65536"\r
-                               StackCommitSize="4096"\r
-                               OptimizeReferences="2"\r
-                               EnableCOMDATFolding="2"\r
-                               EntryPointSymbol="mainWCRTStartup"\r
-                               RandomizedBaseAddress="1"\r
-                               DataExecutionPrevention="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCodeSignTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-                       <DeploymentTool\r
-                               ForceDirty="-1"\r
-                               RemoteDirectory=""\r
-                               RegisterOutput="0"\r
-                               AdditionalFiles=""\r
-                       />\r
-                       <DebuggerTool\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
-                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\..\..\console\commands.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\..\console\linphonec.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Header Files"\r
-                       Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
-                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\..\..\console\linphonec.h"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Resource Files"\r
-                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
-                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
-                       >\r
-               </Filter>\r
-               <File\r
-                       RelativePath=".\ReadMe.txt"\r
-                       >\r
-               </File>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/linphone/config.rpath b/linphone/config.rpath
deleted file mode 100755 (executable)
index c492a93..0000000
+++ /dev/null
@@ -1,614 +0,0 @@
-#! /bin/sh
-# Output a system dependent set of variables, describing how to set the
-# run time search path of shared libraries in an executable.
-#
-#   Copyright 1996-2006 Free Software Foundation, Inc.
-#   Taken from GNU libtool, 2001
-#   Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-#   This file is free software; the Free Software Foundation gives
-#   unlimited permission to copy and/or distribute it, with or without
-#   modifications, as long as this notice is preserved.
-#
-# The first argument passed to this file is the canonical host specification,
-#    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or
-#    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
-# should be set by the caller.
-#
-# The set of defined variables is at the end of this script.
-
-# Known limitations:
-# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
-#   than 256 bytes, otherwise the compiler driver will dump core. The only
-#   known workaround is to choose shorter directory names for the build
-#   directory and/or the installation directory.
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-shrext=.so
-
-host="$1"
-host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-# Code taken from libtool.m4's _LT_CC_BASENAME.
-
-for cc_temp in $CC""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
-
-# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
-
-wl=
-if test "$GCC" = yes; then
-  wl='-Wl,'
-else
-  case "$host_os" in
-    aix*)
-      wl='-Wl,'
-      ;;
-    darwin*)
-      case $cc_basename in
-        xlc*)
-          wl='-Wl,'
-          ;;
-      esac
-      ;;
-    mingw* | pw32* | os2*)
-      ;;
-    hpux9* | hpux10* | hpux11*)
-      wl='-Wl,'
-      ;;
-    irix5* | irix6* | nonstopux*)
-      wl='-Wl,'
-      ;;
-    newsos6)
-      ;;
-    linux*)
-      case $cc_basename in
-        icc* | ecc*)
-          wl='-Wl,'
-          ;;
-        pgcc | pgf77 | pgf90)
-          wl='-Wl,'
-          ;;
-        ccc*)
-          wl='-Wl,'
-          ;;
-        como)
-          wl='-lopt='
-          ;;
-        *)
-          case `$CC -V 2>&1 | sed 5q` in
-            *Sun\ C*)
-              wl='-Wl,'
-              ;;
-          esac
-          ;;
-      esac
-      ;;
-    osf3* | osf4* | osf5*)
-      wl='-Wl,'
-      ;;
-    sco3.2v5*)
-      ;;
-    solaris*)
-      wl='-Wl,'
-      ;;
-    sunos4*)
-      wl='-Qoption ld '
-      ;;
-    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-      wl='-Wl,'
-      ;;
-    sysv4*MP*)
-      ;;
-    unicos*)
-      wl='-Wl,'
-      ;;
-    uts4*)
-      ;;
-  esac
-fi
-
-# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
-
-hardcode_libdir_flag_spec=
-hardcode_libdir_separator=
-hardcode_direct=no
-hardcode_minus_L=no
-
-case "$host_os" in
-  cygwin* | mingw* | pw32*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
-    fi
-    ;;
-  interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
-    with_gnu_ld=yes
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
-esac
-
-ld_shlibs=yes
-if test "$with_gnu_ld" = yes; then
-  # Set some defaults for GNU ld with shared library support. These
-  # are reset later if shared libraries are not supported. Putting them
-  # here allows them to be overridden if necessary.
-  # Unlike libtool, we use -rpath here, not --rpath, since the documented
-  # option of GNU ld is called -rpath, not --rpath.
-  hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-  case "$host_os" in
-    aix3* | aix4* | aix5*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-        ld_shlibs=no
-      fi
-      ;;
-    amigaos*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
-      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
-      # that the semantics of dynamic libraries on AmigaOS, at least up
-      # to version 4, is to share data among multiple programs linked
-      # with the same dynamic library.  Since this doesn't match the
-      # behavior of shared libraries on other platforms, we cannot use
-      # them.
-      ld_shlibs=no
-      ;;
-    beos*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-        :
-      else
-        ld_shlibs=no
-      fi
-      ;;
-    cygwin* | mingw* | pw32*)
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      hardcode_libdir_flag_spec='-L$libdir'
-      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-        :
-      else
-        ld_shlibs=no
-      fi
-      ;;
-    interix3*)
-      hardcode_direct=no
-      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-      ;;
-    linux*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-        :
-      else
-        ld_shlibs=no
-      fi
-      ;;
-    netbsd*)
-      ;;
-    solaris*)
-      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
-        ld_shlibs=no
-      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-        :
-      else
-        ld_shlibs=no
-      fi
-      ;;
-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-      case `$LD -v 2>&1` in
-        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
-          ld_shlibs=no
-          ;;
-        *)
-          if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-            hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
-          else
-            ld_shlibs=no
-          fi
-          ;;
-      esac
-      ;;
-    sunos4*)
-      hardcode_direct=yes
-      ;;
-    *)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-        :
-      else
-        ld_shlibs=no
-      fi
-      ;;
-  esac
-  if test "$ld_shlibs" = no; then
-    hardcode_libdir_flag_spec=
-  fi
-else
-  case "$host_os" in
-    aix3*)
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      hardcode_minus_L=yes
-      if test "$GCC" = yes; then
-        # Neither direct hardcoding nor static linking is supported with a
-        # broken collect2.
-        hardcode_direct=unsupported
-      fi
-      ;;
-    aix4* | aix5*)
-      if test "$host_cpu" = ia64; then
-        # On IA64, the linker does run time linking by default, so we don't
-        # have to do anything special.
-        aix_use_runtimelinking=no
-      else
-        aix_use_runtimelinking=no
-        # Test if we are trying to use run time linking or normal
-        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-        # need to do runtime linking.
-        case $host_os in aix4.[23]|aix4.[23].*|aix5*)
-          for ld_flag in $LDFLAGS; do
-            if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-              aix_use_runtimelinking=yes
-              break
-            fi
-          done
-          ;;
-        esac
-      fi
-      hardcode_direct=yes
-      hardcode_libdir_separator=':'
-      if test "$GCC" = yes; then
-        case $host_os in aix4.[012]|aix4.[012].*)
-          collect2name=`${CC} -print-prog-name=collect2`
-          if test -f "$collect2name" && \
-            strings "$collect2name" | grep resolve_lib_name >/dev/null
-          then
-            # We have reworked collect2
-            hardcode_direct=yes
-          else
-            # We have old collect2
-            hardcode_direct=unsupported
-            hardcode_minus_L=yes
-            hardcode_libdir_flag_spec='-L$libdir'
-            hardcode_libdir_separator=
-          fi
-          ;;
-        esac
-      fi
-      # Begin _LT_AC_SYS_LIBPATH_AIX.
-      echo 'int main () { return 0; }' > conftest.c
-      ${CC} ${LDFLAGS} conftest.c -o conftest
-      aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-      if test -z "$aix_libpath"; then
-        aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-      fi
-      if test -z "$aix_libpath"; then
-        aix_libpath="/usr/lib:/lib"
-      fi
-      rm -f conftest.c conftest
-      # End _LT_AC_SYS_LIBPATH_AIX.
-      if test "$aix_use_runtimelinking" = yes; then
-        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-      else
-        if test "$host_cpu" = ia64; then
-          hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
-        else
-          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-        fi
-      fi
-      ;;
-    amigaos*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
-      # see comment about different semantics on the GNU ld section
-      ld_shlibs=no
-      ;;
-    bsdi[45]*)
-      ;;
-    cygwin* | mingw* | pw32*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      hardcode_libdir_flag_spec=' '
-      libext=lib
-      ;;
-    darwin* | rhapsody*)
-      hardcode_direct=no
-      if test "$GCC" = yes ; then
-        :
-      else
-        case $cc_basename in
-          xlc*)
-            ;;
-          *)
-            ld_shlibs=no
-            ;;
-        esac
-      fi
-      ;;
-    dgux*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      ;;
-    freebsd1*)
-      ld_shlibs=no
-      ;;
-    freebsd2.2*)
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      ;;
-    freebsd2*)
-      hardcode_direct=yes
-      hardcode_minus_L=yes
-      ;;
-    freebsd* | kfreebsd*-gnu | dragonfly*)
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      ;;
-    hpux9*)
-      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-      hardcode_libdir_separator=:
-      hardcode_direct=yes
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      hardcode_minus_L=yes
-      ;;
-    hpux10*)
-      if test "$with_gnu_ld" = no; then
-        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-        hardcode_libdir_separator=:
-        hardcode_direct=yes
-        # hardcode_minus_L: Not really in the search PATH,
-        # but as the default location of the library.
-        hardcode_minus_L=yes
-      fi
-      ;;
-    hpux11*)
-      if test "$with_gnu_ld" = no; then
-        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-        hardcode_libdir_separator=:
-        case $host_cpu in
-          hppa*64*|ia64*)
-            hardcode_direct=no
-            ;;
-          *)
-            hardcode_direct=yes
-            # hardcode_minus_L: Not really in the search PATH,
-            # but as the default location of the library.
-            hardcode_minus_L=yes
-            ;;
-        esac
-      fi
-      ;;
-    irix5* | irix6* | nonstopux*)
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      ;;
-    netbsd*)
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      ;;
-    newsos6)
-      hardcode_direct=yes
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      ;;
-    openbsd*)
-      hardcode_direct=yes
-      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-        hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-      else
-        case "$host_os" in
-          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-            hardcode_libdir_flag_spec='-R$libdir'
-            ;;
-          *)
-            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-            ;;
-        esac
-      fi
-      ;;
-    os2*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
-      ;;
-    osf3*)
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      ;;
-    osf4* | osf5*)
-      if test "$GCC" = yes; then
-        hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      else
-        # Both cc and cxx compiler support -rpath directly
-        hardcode_libdir_flag_spec='-rpath $libdir'
-      fi
-      hardcode_libdir_separator=:
-      ;;
-    solaris*)
-      hardcode_libdir_flag_spec='-R$libdir'
-      ;;
-    sunos4*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_direct=yes
-      hardcode_minus_L=yes
-      ;;
-    sysv4)
-      case $host_vendor in
-        sni)
-          hardcode_direct=yes # is this really true???
-          ;;
-        siemens)
-          hardcode_direct=no
-          ;;
-        motorola)
-          hardcode_direct=no #Motorola manual says yes, but my tests say they lie
-          ;;
-      esac
-      ;;
-    sysv4.3*)
-      ;;
-    sysv4*MP*)
-      if test -d /usr/nec; then
-        ld_shlibs=yes
-      fi
-      ;;
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
-      ;;
-    sysv5* | sco3.2v5* | sco5v6*)
-      hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
-      hardcode_libdir_separator=':'
-      ;;
-    uts4*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      ;;
-    *)
-      ld_shlibs=no
-      ;;
-  esac
-fi
-
-# Check dynamic linker characteristics
-# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
-libname_spec='lib$name'
-case "$host_os" in
-  aix3*)
-    ;;
-  aix4* | aix5*)
-    ;;
-  amigaos*)
-    ;;
-  beos*)
-    ;;
-  bsdi[45]*)
-    ;;
-  cygwin* | mingw* | pw32*)
-    shrext=.dll
-    ;;
-  darwin* | rhapsody*)
-    shrext=.dylib
-    ;;
-  dgux*)
-    ;;
-  freebsd1*)
-    ;;
-  kfreebsd*-gnu)
-    ;;
-  freebsd* | dragonfly*)
-    ;;
-  gnu*)
-    ;;
-  hpux9* | hpux10* | hpux11*)
-    case $host_cpu in
-      ia64*)
-        shrext=.so
-        ;;
-      hppa*64*)
-        shrext=.sl
-        ;;
-      *)
-        shrext=.sl
-        ;;
-    esac
-    ;;
-  interix3*)
-    ;;
-  irix5* | irix6* | nonstopux*)
-    case "$host_os" in
-      irix5* | nonstopux*)
-        libsuff= shlibsuff=
-        ;;
-      *)
-        case $LD in
-          *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
-          *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
-          *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
-          *) libsuff= shlibsuff= ;;
-        esac
-        ;;
-    esac
-    ;;
-  linux*oldld* | linux*aout* | linux*coff*)
-    ;;
-  linux*)
-    ;;
-  knetbsd*-gnu)
-    ;;
-  netbsd*)
-    ;;
-  newsos6)
-    ;;
-  nto-qnx*)
-    ;;
-  openbsd*)
-    ;;
-  os2*)
-    libname_spec='$name'
-    shrext=.dll
-    ;;
-  osf3* | osf4* | osf5*)
-    ;;
-  solaris*)
-    ;;
-  sunos4*)
-    ;;
-  sysv4 | sysv4.3*)
-    ;;
-  sysv4*MP*)
-    ;;
-  sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-    ;;
-  uts4*)
-    ;;
-esac
-
-sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
-escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
-shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
-escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
-
-LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
-
-# How to pass a linker flag through the compiler.
-wl="$escaped_wl"
-
-# Static library suffix (normally "a").
-libext="$libext"
-
-# Shared library suffix (normally "so").
-shlibext="$shlibext"
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator="$hardcode_libdir_separator"
-
-# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct="$hardcode_direct"
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L="$hardcode_minus_L"
-
-EOF
diff --git a/linphone/configure.in b/linphone/configure.in
deleted file mode 100644 (file)
index eb9b47c..0000000
+++ /dev/null
@@ -1,459 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-
-AC_INIT([linphone],[3.2.1],[linphone-developers@nongnu.org])
-AC_CANONICAL_SYSTEM
-
-dnl Source packaging numbers
-
-LINPHONE_MAJOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f1)
-LINPHONE_MINOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f2)
-LINPHONE_MICRO_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f3)
-LINPHONE_EXTRA_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f4)
-
-dnl program extension
-LINPHONE_VERSION=$LINPHONE_MAJOR_VERSION.$LINPHONE_MINOR_VERSION.${LINPHONE_MICRO_VERSION}
-if test "$LINPHONE_EXTRA_VERSION" != "" ;then
-       LINPHONE_VERSION=$LINPHONE_VERSION.${LINPHONE_EXTRA_VERSION}
-fi
-LIBLINPHONE_SO_VERSION=`expr $LINPHONE_MINOR_VERSION + $LINPHONE_MAJOR_VERSION`:$LINPHONE_MICRO_VERSION:$LINPHONE_MINOR_VERSION
-
-AC_SUBST(LIBLINPHONE_SO_VERSION, $LIBLINPHONE_SO_VERSION)
-AC_SUBST(LINPHONE_VERSION)
-
-AC_MSG_NOTICE([$PACKAGE_NAME-$PACKAGE_VERSION          A full featured audio/video sip phone.])
-AC_MSG_NOTICE([licensed under the terms of the General Public License (GPL)])
-
-AM_INIT_AUTOMAKE([tar-ustar])
-m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],)
-AC_CONFIG_HEADER(config.h)
-AC_CONFIG_MACRO_DIR([m4])
-AC_SUBST([mkdir_p])
-AC_ISC_POSIX
-AC_PROG_CC
-AC_C_INLINE
-AM_PROG_CC_STDC
-AC_HEADER_STDC
-AM_PROG_CC_C_O
-
-case $target_os in
-       *mingw32ce)
-               CFLAGS="$CFLAGS -D_WIN32_WCE -DORTP_STATIC -D_WIN32_WINNT=0x0501"
-               CXXFLAGS="$CXXFLAGS -DORTP_STATIC -D_WIN32_WINNT=0x0501"
-               LIBS="$LIBS -lws2 -liphlpapi"
-               mingw_found=yes
-               mingwce_found=yes
-               ;;
-       *mingw*)
-               CFLAGS="$CFLAGS -DORTP_STATIC -D_WIN32_WINNT=0x0501 "
-               CXXFLAGS="$CXXFLAGS -DORTP_STATIC -D_WIN32_WINNT=0x0501"
-               LIBS="$LIBS -lws2_32"
-               GUI_FLAGS="-mwindows"
-               CONSOLE_FLAGS="-mconsole"
-               mingw_found=yes
-       ;;
-       *darwin*)
-               dnl use macport installation
-               ACLOCAL_MACOS_FLAGS="-I /opt/local/share/aclocal"
-       ;;
-esac
-
-AC_SUBST(ACLOCAL_MACOS_FLAGS)
-AC_SUBST(CONSOLE_FLAGS)
-AC_SUBST(GUI_FLAGS)
-
-dnl localization tools
-ifdef([IT_PROG_INTLTOOL],[IT_PROG_INTLTOOL],[AC_PROG_INTLTOOL])
-dnl Initialize libtool
-AC_LIBTOOL_WIN32_DLL
-AC_PROG_LIBTOOL
-AM_PROG_LIBTOOL
-AC_ENABLE_SHARED(yes)
-AC_ENABLE_STATIC(no)
-
-
-AC_CONFIG_COMMANDS([libtool-hacking],[
-if test "$mingw_found" = "yes" ; then
-       echo "Hacking libtool to work with mingw..."
-       sed -e 's/\*\" \$a_deplib \"\*/\*/' < ./libtool > libtool.tmp
-       cp -f ./libtool.tmp ./libtool
-       rm -f ./libtool.tmp
-fi
-],[mingw_found=$mingw_found])
-
-dnl Add the languages which your application supports here.
-PKG_PROG_PKG_CONFIG
-ALL_LINGUAS="fr it de ja es pl cs nl sv pt_BR hu ru zh_CN"
-AC_SUBST(ALL_LINGUAS)
-AC_DEFINE_UNQUOTED(LINPHONE_ALL_LANGS, "$ALL_LINGUAS", [All supported languages])
-
-if test "$mingw_found" != "yes" ; then
-dnl gettext macro does not work properly under mingw.
-AM_GNU_GETTEXT([external])
-LIBS="$LIBS $LIBINTL"
-else
-       if test "$mingwce_found" != "yes" ; then 
-               AC_DEFINE(ENABLE_NLS,1,[Tells whether localisation is possible])
-               AC_DEFINE(HAVE_GETTEXT,1,[Tells wheter localisation is possible])
-               LIBS="$LIBS -L/usr/lib -lintl"
-       else
-               dnl gettext macro does not work properly under mingw.
-               AM_GNU_GETTEXT([external])
-               LIBS="$LIBS $LIBINTL"
-       fi
-fi
-
-GETTEXT_PACKAGE=linphone
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",[The name of the gettext package name])
-AC_CHECK_LIB(intl,libintl_gettext)
-
-AC_CHECK_FUNCS([get_current_dir_name strndup stpcpy] )
-
-dnl conditionnal build of console interface.
-AC_ARG_ENABLE(console_ui,
-      [  --enable-console_ui=[yes/no]    Turn on or off compilation of console interface [default=yes]],
-      [case "${enableval}" in
-        yes) console_ui=true ;;
-        no)  console_ui=false ;;
-        *) AC_MSG_ERROR(bad value ${enableval} for --enable-console_ui) ;;
-      esac],[console_ui=true])
-
-dnl conditionnal build of gtk interface.
-AC_ARG_ENABLE(gtk_ui,
-      [  --enable-gtk_ui=[yes/no]    Turn on or off compilation of gtk interface [default=yes]],
-      [case "${enableval}" in
-        yes) gtk_ui=true ;;
-        no)  gtk_ui=false ;;
-        *) AC_MSG_ERROR(bad value ${enableval} for --enable-gtk_ui) ;;
-      esac],[gtk_ui=true])
-
-
-if test "$gtk_ui" = "true" ; then
-       PKG_CHECK_MODULES(LIBGTK, gtk+-2.0 >= 2.4.0 gthread-2.0)
-       PKG_CHECK_MODULES(LIBGLADE, libglade-2.0 >= 2.4.0)
-       AC_SUBST(LIBGTK_CFLAGS)
-       AC_SUBST(LIBGTK_LIBS)
-       AC_SUBST(LIBGLADE_CFLAGS)
-       AC_SUBST(LIBGLADE_LIBS)
-else
-       echo "GTK interface compilation is disabled."
-fi
-
-
-dnl os-specific problems not handled by existing macros.
-case "$host_os" in
-       *freebsd*)
-               LDFLAGS="$LDFLAGS -pthread"
-               ;;
-esac
-
-case "$host_cpu" in
-       *arm*)
-               AC_DEFINE(__ARM__,1,[Defined if we are compiling for arm processor])
-               use_arm_toolchain=yes
-               ;;
-esac
-
-AC_ARG_WITH( configdir,
-      [  --with-configdir      Set a APPDATA subdir where linphone is supposed to find its config (windows only) ],
-      [ configdir=${withval}],[ configdir="Linphone" ])
-
-AC_DEFINE_UNQUOTED(LINPHONE_CONFIG_DIR,"$configdir",[Windows appdata subdir where linphonerc can be found])
-
-AC_ARG_ENABLE(manual,
-      [  --disable-manual    Do not attempt to build html linphone's user documentation],
-      [case "${enableval}" in
-        yes) build_manual=yes ;;
-        no)  build_manual=false ;;
-        *) AC_MSG_ERROR(bad value ${enableval} for --enable-manual) ;;
-      esac],[build_manual=yes])
-
-AC_ARG_ENABLE(date,
-      [  --enable-date    Use build date in internal version number],
-      [case "${enableval}" in
-        yes) use_date=yes ;;
-        no)  use_date=no ;;
-        *) AC_MSG_ERROR(bad value ${enableval} for --enable-date) ;;
-      esac],[use_date=no])
-
-if test x$use_date =  xyes ; then
-       AC_DEFINE(USE_BUILDDATE_VERSION,1,[Tell whether date_version.h must be used])
-fi
-
-
-dnl enable ipv6 support
-AC_ARG_ENABLE(ipv6,
-      [  --enable-ipv6    Turn on ipv6 support],
-      [case "${enableval}" in
-        yes)  ipv6=true;;
-        no)   ipv6=false;;
-        *) AC_MSG_ERROR(bad value ${enableval} for --enable-ipv6) ;;
-      esac],[ipv6=true])
-IPV6_CFLAGS=
-if test x$ipv6 = xtrue ; then
-       IPV6_CFLAGS=-DINET6
-fi
-AC_SUBST(IPV6_CFLAGS)
-
-dnl enable truespeech codec support
-AC_ARG_ENABLE(truespeech,
-      [  --enable-truespeech    Turn on TrueSpeech support (x86 only)],
-      [case "${enableval}" in
-        yes)  truespeech=true;;
-        no)   truespeech=false;;
-        *) AC_MSG_ERROR(bad value ${enableval} for --enable-truespeech) ;;
-      esac],[truespeech=false])
-TRUESPEECH_CFLAGS=
-if test x$truespeech = xtrue ; then
-       TRUESPEECH_CFLAGS=-DTRUESPEECH
-fi
-AC_SUBST(TRUESPEECH_CFLAGS)
-AM_CONDITIONAL([BUILD_TRUESPEECH], [test x$truespeech = xtrue])
-
-AC_ARG_ENABLE(nonstandard-gsm,
-      [  --enable-nonstandard-gsm    Enable GSM codec at nonstandard rates (11025hz, 16000hz)],
-      [case "${enableval}" in
-        yes) exotic_gsm=yes
-       AC_DEFINE(ENABLE_NONSTANDARD_GSM,1,[Defined when using gsm at nonstandard rates])
-        ;;
-        no)  exotic_gsm=no ;;
-        *) AC_MSG_ERROR(bad value ${enableval} for --enable-nonstandard-gsm) ;;
-      esac],[exotic_gsm=no])
-
-
-dnl support for RSVP (by Vincent Maury)
-AC_ARG_ENABLE(rsvp,
-[  --enable-rsvp           enable support for QoS reservations.],
-AC_DEFINE(VINCENT_MAURY_RSVP,1,[Tell whether RSVP support
-should be compiled.]) )
-
-if test "x${prefix}" = "xNONE"; then
-       package_prefix=${ac_default_prefix}
-else
-       package_prefix=${prefix}
-fi
-
-if test x$mingw_found = xyes ; then
-dnl allow binaries to install everywhere
-package_prefix="."
-fi
-
-dnl Set PACKAGE_LOCALE_DIR in config.h.
-DATADIRNAME=share
-AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${package_prefix}/${DATADIRNAME}/locale",[Defines the place where locales can be found])
-
-AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${package_prefix}/${DATADIRNAME}",[Defines the place where data are found])
-
-dnl Set PACKAGE_SOUND_DIR in config.h.
-AC_DEFINE_UNQUOTED(PACKAGE_SOUND_DIR, "${package_prefix}/${DATADIRNAME}/sounds/linphone",[Defines the place where linphone sounds are found])
-
-
-dnl check if we have the getifaddrs() sytem call
-AC_CHECK_FUNCS(getifaddrs)
-
-dnl check for osip2
-LP_CHECK_OSIP2
-
-dnl setup flags for exosip library
-LP_SETUP_EXOSIP
-
-if test "$console_ui" = "true" ; then
-dnl check gnu readline
-LP_CHECK_READLINE
-else
-echo "Console interface compilation is disabled."
-fi
-
-AC_WORDS_BIGENDIAN
-
-dnl normaly this should only by done by mediastreamer2/configure.ac
-dnl but to workaround bugs when cross-compiling for arm-linux,
-dnl we need to have SPEEX_LIBS defined
-dnl Furthermore it is good to repeat here all mediastreamer2 toggles
-dnl since top-level configure --help will not print them.
-
-PKG_CHECK_MODULES(SPEEX, speex >= 1.1.6, build_speex=yes)
-AC_SUBST(SPEEX_LIBS)
-
-dnl conditionnal build of video support
-AC_ARG_ENABLE(video,
-               [  --enable-video    Turn on video support compiling],
-               [case "${enableval}" in
-               yes) video=true ;;
-               no)  video=false ;;
-               *) AC_MSG_ERROR(bad value ${enableval} for --enable-video) ;;
-               esac],[video=true])
-               
-AC_ARG_WITH( ffmpeg,
-               [  --with-ffmpeg                Sets the installation prefix of ffmpeg, needed for video support. [default=/usr] ],
-               [ ffmpegdir=${withval}],[ ffmpegdir=/usr ])
-
-AC_ARG_WITH( sdl,
-               [  --with-sdl           Sets the installation prefix of libSDL, needed for video support. [default=/usr] ],
-               [ libsdldir=${withval}],[ libsdldir=/usr ])
-
-if test "$video" = "true"; then
-       AC_DEFINE(VIDEO_ENABLED,1,[defined if video support is available])
-fi
-
-AC_ARG_ENABLE(alsa,
-      [  --enable-alsa    Turn on alsa native support compiling],
-      [case "${enableval}" in
-        yes) alsa=true ;;
-        no)  alsa=false ;;
-        *) AC_MSG_ERROR(bad value ${enableval} for --enable-alsa) ;;
-      esac],[alsa=true])
-
-AC_ARG_ENABLE(artsc,
-      [  --enable-artsc    Turn on artsc (kde) sound input/output (auto) ],
-      [case "${enableval}" in
-        yes) artsc=true ;;
-        no)  artsc=false ;;
-        *) AC_MSG_ERROR(bad value ${enableval} for --enable-artsc) ;;
-      esac],[artsc=false])
-
-AC_ARG_ENABLE(portaudio,
-      [  --enable-portaudio    Turn on portaudio native support compiling],
-      [case "${enableval}" in
-        yes) portaudio=true ;;
-        no)  portaudio=false ;;
-        *) AC_MSG_ERROR(bad value ${enableval} for --enable-portaudio) ;;
-      esac],[portaudio=false])
-
-dnl build console if required
-AM_CONDITIONAL(BUILD_CONSOLE, test x$console_ui = xtrue)
-dnl special things for arm-linux cross compilation toolchain
-AM_CONDITIONAL(ARMBUILD, test x$use_arm_toolchain = xyes)
-dnl compilation of gtk-glade user interface
-AM_CONDITIONAL(BUILD_GLADE_UI, [test x$gtk_ui = xtrue ] )
-AM_CONDITIONAL(BUILD_WIN32, test x$mingw_found = xyes )
-
-dnl check getenv
-AH_TEMPLATE([HAVE_GETENV])
-AC_CHECK_FUNC([getenv], AC_DEFINE([HAVE_GETENV], [1], [If present, the getenv function allows fim to read environment variables.]))
-
-dnl
-AC_MSG_CHECKING([for sighandler_t])
-AC_TRY_COMPILE([#include <signal.h>],[sighandler_t *f;],
-has_sighandler_t=yes,has_sighandler_t=no)
-AC_MSG_RESULT($has_sighandler_t)
-if test "$has_sighandler_t" = "yes" ; then
-    AC_DEFINE( HAVE_SIGHANDLER_T, 1, [Define if sighandler_t available] )
-fi
-
-##################################################
-# Stricter build options (after external packages)
-##################################################
-
-
-AC_ARG_ENABLE(strict,
-       AC_HELP_STRING([--enable-strict],
-                      [Build with stricter options (gcc only) @<:@yes@:>@]),[
-       strictness="${enableval}"],[strictness=yes]
-)
-
-if test "$GCC$strictness" = "yesyes" ; then
-       STRICT_OPTIONS="-Wall "
-       STRICT_OPTIONS="$STRICT_OPTIONS -Werror"
-       CFLAGS="$CFLAGS -fno-strict-aliasing"
-fi
-
-AC_SUBST(STRICT_OPTIONS)
-
-AC_CONFIG_SUBDIRS( mediastreamer2 )
-
-dnl check for db2html (docbook) to generate html user manual
-AC_CHECK_PROG(have_sgmltools,sgmltools, yes, no)
-AM_CONDITIONAL(ENABLE_MANUAL, test x$have_sgmltools$build_manual = xyesyes )
-
-dnl for external use of linphone libs
-LINPHONE_CFLAGS="-I${includedir} -I${includedir}/linphone  "
-LINPHONE_LIBS="-L${libdir}  -llinphone"
-
-if test x$mingw_found = xyes ; then
-       LINPHONE_LIBS="$LINPHONE_LIBS $OSIP_LIBS"
-fi
-AC_SUBST(LINPHONE_CFLAGS)
-AC_SUBST(LINPHONE_LIBS)
-
-
-AC_DEFINE_UNQUOTED(LINPHONE_VERSION,"$PACKAGE_VERSION",[Linphone's version number])
-
-AC_DEFINE_UNQUOTED(LINPHONE_PLUGINS_DIR, "${package_prefix}/lib/liblinphone/plugins" ,[path of liblinphone plugins, not mediastreamer2 plugins])
-LINPHONE_PLUGINS_DIR="${package_prefix}/lib/liblinphone/plugins"
-AC_SUBST(LINPHONE_PLUGINS_DIR)
-
-AC_ARG_ENABLE(external-ortp,
-      [  --enable-external-ortp    Use external oRTP library],
-      [case "${enableval}" in
-        yes) external_ortp=true ;;
-        no)  external_ortp=false ;;
-        *) AC_MSG_ERROR(bad value ${enableval} for --enable-external-ortp) ;;
-      esac],[external_ortp=false])
-
-if test "$external_ortp" = 'true'; then
-       LP_CHECK_ORTP
-else
-       AC_CONFIG_SUBDIRS( oRTP )
-       ORTP_CFLAGS="-I\$(top_srcdir)/oRTP/include"
-       ORTP_LIBS="\$(top_builddir)/oRTP/src/libortp.la"
-       if test x$ac_cv_c_bigendian = xyes ; then
-               ORTP_CFLAGS="$ORTP_CFLAGS -DORTP_BIGENDIAN"
-       fi
-fi
-AC_SUBST(ORTP_CFLAGS)
-AC_SUBST(ORTP_LIBS)
-
-AM_CONDITIONAL(EXTERNAL_ORTP, [test "$external_ortp" = 'true'])
-
-dnl Packaging: Pick oRTP version from ${top_srcdir}/oRTP/configure.ac
-dnl Feel free to propose an alternative & cleaner version...
-top_srcdir=`dirname $0`
-changequote(, )dnl
-ORTP_VERSION=`grep -E ^[AC]+_INIT ${top_srcdir}/oRTP/configure.ac | sed -e 's:^.*_INIT(.*,\[\(.*\)\]):\1:g'`
-MS2_VERSION=`grep -E ^[AC]+_INIT ${top_srcdir}/mediastreamer2/configure.ac | sed -e 's:^.*_INIT(.*,\[\(.*\)\]):\1:g'`
-changequote([, ])dnl
-AC_SUBST([ORTP_VERSION])
-AC_SUBST([MS2_VERSION])
-
-dnl ##################################################
-dnl # Check for doxygen
-dnl ##################################################
-
-AC_PATH_PROG(DOXYGEN,doxygen,false)
-AM_CONDITIONAL(HAVE_DOXYGEN, test $DOXYGEN != false)
-
-
-AC_OUTPUT([ 
-Makefile 
-m4/Makefile
-po/Makefile.in 
-pixmaps/Makefile
-coreapi/Makefile
-coreapi/help/Makefile
-coreapi/help/Doxyfile
-coreapi/help/doxygen.dox
-gtk-glade/Makefile
-console/Makefile
-share/Makefile
-share/C/Makefile
-share/fr/Makefile
-share/it/Makefile
-share/ja/Makefile
-share/cs/Makefile
-share/linphone.pc
-scripts/Makefile
-linphone.spec
-linphone.iss
-])
-
-echo "Linphone build configuration ended."
-
-if test x$gtk_ui = xtrue ; then
-       echo "* GTK interface will be compiled."
-fi
-if test x$console_ui = xtrue ; then
-       echo "* Console interface will be compiled."
-fi
-
-echo "Now type 'make' to compile, and then 'make install' as root to install it."
diff --git a/linphone/console/.gitignore b/linphone/console/.gitignore
deleted file mode 100644 (file)
index ff0fec7..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-linphonec
-sipomatic
-wav2raw
-linphonecsh
diff --git a/linphone/console/Makefile.am b/linphone/console/Makefile.am
deleted file mode 100644 (file)
index 45f8865..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-COMMON_CFLAGS=$(STRICT_OPTIONS) -DIN_LINPHONE -DENABLE_TRACE -D_ORTP_SOURCE $(VIDEO_CFLAGS) $(READLINE_CFLAGS) $(OSIP_CFLAGS)
-
-if BUILD_CONSOLE
-
-INCLUDES = \
-       -I$(top_srcdir)\
-       -I$(top_srcdir)/coreapi\
-       $(ORTP_CFLAGS) \
-       -I$(top_srcdir)/exosip \
-       -I$(top_srcdir)/mediastreamer2/include
-
-
-
-bin_PROGRAMS =  linphonec sipomatic linphonecsh
-
-if BUILD_WIN32
-bin_PROGRAMS += linphoned
-endif
-
-linphonec_SOURCES = linphonec.c linphonec.h commands.c
-linphonec_CFLAGS=$(COMMON_CFLAGS) $(CONSOLE_FLAGS)
-linphonec_LDADD = $(top_builddir)/coreapi/liblinphone.la $(READLINE_LIBS)  \
-               $(top_builddir)/mediastreamer2/src/libmediastreamer.la \
-               $(ORTP_LIBS) \
-               $(SPEEX_LIBS) \
-               $(OSIP_LIBS)
-
-if BUILD_WIN32
-#special build of linphonec to detach from the windows console
-linphoned_SOURCES = $(linphonec_SOURCES)
-linphoned_CFLAGS=$(COMMON_CFLAGS) $(GUI_FLAGS)
-linphoned_LDADD=$(linphonec_LDADD)
-endif
-
-
-sipomatic_SOURCES=\
-       sipomatic.c sipomatic.h
-sipomatic_CFLAGS= $(COMMON_CFLAGS) $(CONSOLE_FLAGS)
-
-sipomatic_LDADD=       $(INTLLIBS)  \
-                       $(top_builddir)/coreapi/liblinphone.la \
-                       $(top_builddir)/mediastreamer2/src/libmediastreamer.la \
-                       $(ORTP_LIBS) \
-                       $(SPEEX_LIBS) \
-                       $(OSIP_LIBS)
-
-linphonecsh_SOURCES = shell.c
-linphonecsh_CFLAGS = $(CONSOLE_FLAGS)
-linphonecsh_LDADD = $(ORTP_LIBS)
-
-endif
-
-
-
-
-
diff --git a/linphone/console/TODO b/linphone/console/TODO
deleted file mode 100644 (file)
index 420d55a..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-
-In pseudo-order of priority: 
----------------------------
-
-- Exctract presence info in friends list
-
-- Allow friend call arg to be a pattern
-
-- hide input during password insertions
-       [ could use ncurses noecho() ]
-
-- Allow for single-shot mode (call somebody and quit after the fact)
-  maybe "linphonec [OPTS] <sip-uri>" would do..
-  Unfortunately the -s switch would confuse people, I'd rather
-  change its semantic to "source file" where file wold contain
-  a list of commands, so ./linephone -s myfriend.sip would call
-  yourfriend...
-
-- implement "smart" command completion
-
diff --git a/linphone/console/commands.c b/linphone/console/commands.c
deleted file mode 100644 (file)
index cb68451..0000000
+++ /dev/null
@@ -1,1809 +0,0 @@
-/****************************************************************************
- *
- *  $Id: commands.c,v 1.39 2008/07/03 15:08:34 smorlat Exp $
- *
- *  Copyright (C) 2006-2009  Sandro Santilli <strk@keybit.net>
- *  Copyright (C) 2004  Simon MORLAT <simon.morlat@linphone.org>
- *
-****************************************************************************
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- *
- ****************************************************************************/
-
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#ifndef _WIN32_WCE
-#include <errno.h>
-#include <unistd.h>
-#endif /*_WIN32_WCE*/
-#include <limits.h>
-#include <ctype.h>
-#include <linphonecore.h>
-#include "linphonec.h"
-#include "private.h"
-#include "lpconfig.h"
-
-#ifndef WIN32
-#include <sys/wait.h>
-#endif
-
-/***************************************************************************
- *
- *  Forward declarations 
- *
- ***************************************************************************/
-
-extern char *lpc_strip_blanks(char *input);
-
-/* Command handlers */
-static int lpc_cmd_help(LinphoneCore *, char *);
-static int lpc_cmd_proxy(LinphoneCore *, char *);
-static int lpc_cmd_call(LinphoneCore *, char *);
-static int lpc_cmd_answer(LinphoneCore *, char *);
-static int lpc_cmd_autoanswer(LinphoneCore *, char *);
-static int lpc_cmd_terminate(LinphoneCore *, char *);
-static int lpc_cmd_call_logs(LinphoneCore *, char *);
-static int lpc_cmd_ipv6(LinphoneCore *, char *);
-static int lpc_cmd_refer(LinphoneCore *, char *);
-static int lpc_cmd_quit(LinphoneCore *, char *);
-static int lpc_cmd_nat(LinphoneCore *, char *);
-static int lpc_cmd_stun(LinphoneCore *, char *);
-static int lpc_cmd_firewall(LinphoneCore *, char *);
-static int lpc_cmd_friend(LinphoneCore *, char*);
-static int lpc_cmd_soundcard(LinphoneCore *, char *);
-static int lpc_cmd_play(LinphoneCore *, char *);
-static int lpc_cmd_record(LinphoneCore *, char *);
-static int lpc_cmd_register(LinphoneCore *, char *);
-static int lpc_cmd_unregister(LinphoneCore *, char *);
-static int lpc_cmd_duration(LinphoneCore *lc, char *args);
-static int lpc_cmd_status(LinphoneCore *lc, char *args);
-static int lpc_cmd_ports(LinphoneCore *lc, char *args);
-static int lpc_cmd_speak(LinphoneCore *lc, char *args);
-static int lpc_cmd_codec(LinphoneCore *lc, char *args);
-static int lpc_cmd_echocancellation(LinphoneCore *lc, char *args);
-
-/* Command handler helpers */
-static void linphonec_proxy_add(LinphoneCore *lc);
-static void linphonec_proxy_display(LinphoneProxyConfig *lc);
-static void linphonec_proxy_list(LinphoneCore *lc);
-static void linphonec_proxy_remove(LinphoneCore *lc, int index);
-static  int linphonec_proxy_use(LinphoneCore *lc, int index);
-static void linphonec_proxy_show(LinphoneCore *lc,int index);
-static void linphonec_friend_display(LinphoneFriend *fr);
-static int linphonec_friend_list(LinphoneCore *lc, char *arg);
-static void linphonec_display_command_help(LPC_COMMAND *cmd);
-static int linphonec_friend_call(LinphoneCore *lc, unsigned int num);
-#ifndef WIN32
-static int linphonec_friend_add(LinphoneCore *lc, const char *name, const char *addr);
-#endif
-static int linphonec_friend_delete(LinphoneCore *lc, int num);
-static int linphonec_friend_delete(LinphoneCore *lc, int num);
-static void linphonec_codec_list(LinphoneCore *lc);
-static void linphonec_codec_enable(LinphoneCore *lc, int index);
-static void linphonec_codec_disable(LinphoneCore *lc, int index);
-
-
-
-/* Command table management */
-static LPC_COMMAND *lpc_find_command(const char *name);
-
-void linphonec_out(const char *fmt,...);
-
-
-
-/***************************************************************************
- *
- *  Global variables
- *
- ***************************************************************************/
-
-/*
- * Commands table.
- */
-LPC_COMMAND commands[] = {
-       { "help", lpc_cmd_help, "Print commands help", NULL },
-       { "call", lpc_cmd_call, "Call a SIP uri",
-               "'call <sip-url>' "
-               ": initiate a call to the specified destination."
-               },
-       { "terminate", lpc_cmd_terminate, "Terminate the current call",
-               NULL },
-       { "answer", lpc_cmd_answer, "Answer a call",
-               "Accept an incoming call."
-       },
-       { "autoanswer", lpc_cmd_autoanswer, "Show/set auto-answer mode",
-               "'autoanswer'       \t: show current autoanswer mode\n"
-               "'autoanswer enable'\t: enable autoanswer mode\n"
-               "'autoanswer disable'\t: disable autoanswer mode \n"},
-       { "proxy", lpc_cmd_proxy, "Manage proxies",
-               "'proxy list' : list all proxy setups.\n"
-               "'proxy add' : add a new proxy setup.\n"
-               "'proxy remove <index>' : remove proxy setup with number index.\n"
-               "'proxy use <index>' : use proxy with number index as default proxy.\n"
-               "'proxy unuse' : don't use a default proxy.\n"
-               "'proxy show <index>' : show configuration and status of the proxy numbered by index.\n"
-               "'proxy show default' : show configuration and status of the default proxy.\n"
-       },
-       { "soundcard", lpc_cmd_soundcard, "Manage soundcards",
-               "'soundcard list' : list all sound devices.\n"
-               "'soundcard show' : show current sound devices configuration.\n"
-               "'soundcard use <index>' : select a sound device.\n"
-               "'soundcard use files' : use .wav files instead of soundcard\n"
-       },
-       { "ipv6", lpc_cmd_ipv6, "Use IPV6",
-               "'ipv6 status' : show ipv6 usage status.\n"
-               "'ipv6 enable' : enable the use of the ipv6 network.\n"
-               "'ipv6 disable' : do not use ipv6 network."
-       },
-       { "refer", lpc_cmd_refer,
-               "Refer the current call to the specified destination.",
-               "'refer <sip-url>' or 'r <sip-url>' "
-               ": refer the current call to the specified destination."
-       },
-       { "nat", lpc_cmd_nat, "Set nat address",
-               "'nat'        : show nat settings.\n"
-               "'nat <addr>' : set nat address.\n"
-       },
-       { "stun", lpc_cmd_stun, "Set stun server address",
-               "'stun'        : show stun settings.\n"
-               "'stun <addr>' : set stun server address.\n"
-       },
-       { "firewall", lpc_cmd_firewall, "Set firewall policy",
-               "'firewall'        : show current firewall policy.\n"
-               "'firewall none'   : use direct connection.\n"
-               "'firewall nat'    : use nat address given with the 'nat' command.\n"
-               "'firewall stun'   : use stun server given with the 'stun' command.\n"
-       },
-       { "call-logs", lpc_cmd_call_logs, "Calls history", NULL },
-       { "friend", lpc_cmd_friend, "Manage friends",
-               "'friend list [<pattern>]'    : list friends.\n"
-               "'friend call <index>'        : call a friend.\n"
-               "'friend add <name> <addr>'   : add friend, <name> must be quoted to include\n"
-           "                               spaces, <addr> has \"sip:\" added if it isn't\n"
-           "                               there.  Don't use '<' '>' around <addr>.\n"
-               "'friend delete <index>'      : remove friend, 'all' removes all\n"
-       },
-       { "play", lpc_cmd_play, "play from a wav file",
-               "This feature is available only in file mode (see 'help soundcard')\n"
-               "'play <wav file>'    : play a wav file."
-       },
-       { "record", lpc_cmd_record, "record to a wav file",
-               "This feature is available only in file mode (see 'help soundcard')\n"
-               "'record <wav file>'    : record into wav file."
-       },
-       { "quit", lpc_cmd_quit, "Exit linphonec", NULL },
-       { "register", lpc_cmd_register, "Register in one line to a proxy" , "register <sip identity> <sip proxy> <password>"},
-       { "unregister", lpc_cmd_unregister, "Unregister from default proxy", NULL       },
-       { "duration", lpc_cmd_duration, "Print duration in seconds of the last call.", NULL },
-       { "status", lpc_cmd_status, "Print various status information", 
-                       "'status register'  \t: print status concerning registration\n"
-                       "'status autoanswer'\t: tell whether autoanswer mode is enabled\n"
-                       "'status hook'      \t: print hook status\n" },
-       { "ports", lpc_cmd_ports, "Network ports configuration", 
-                       "'ports'  \t: prints current used ports.\n"
-                       "'ports sip <port number>'\t: Sets the sip port.\n" },
-       { "speak", lpc_cmd_speak, "Speak a sentence using espeak TTS engine",
-                       "This feature is available only in file mode. (see 'help soundcard')\n"
-                       "'speak <voice name> <sentence>'        : speak a text using the specified espeak voice.\n"
-                       "Example for english voice: 'speak default Hello my friend !'"
-       },
-    { "codec", lpc_cmd_codec, "Codec configuration",
-            "'codec list' : list codecs\n"  
-            "'codec enable <index>' : enable available codec\n"  
-            "'codec disable <index>' : disable codecs" }, 
-    { "ec", lpc_cmd_echocancellation, "Echo cancellation",
-            "'ec on [<delay>] [<tail>] [<framesize>]' : turn EC on with given delay, tail length and framesize\n"
-            "'ec off' : turn echo cancellation (EC) off\n"
-            "'ec show' : show EC status" },
-       { (char *)NULL, (lpc_cmd_handler)NULL, (char *)NULL, (char *)NULL }
-};
-
-/***************************************************************************
- *
- *  Public interface 
- *
- ***************************************************************************/
-
-/*
- * Main command dispatcher.
- * WARNING: modifies second argument!
- *
- * Always return 1 currently.
- */
-int
-linphonec_parse_command_line(LinphoneCore *lc, char *cl)
-{
-       char *ptr=cl;
-       char *args=NULL;
-       LPC_COMMAND *cmd;
-
-       /* Isolate first word and args */
-       while(*ptr && !isspace(*ptr)) ++ptr;
-       if (*ptr)
-       {
-               *ptr='\0';
-               /* set args to first nonblank */
-               args=ptr+1;
-               while(*args && isspace(*args)) ++args;
-       }
-
-       /* Handle DTMF */
-       if ( isdigit(*cl) || *cl == '#' || *cl == '*' )
-       {
-               while ( isdigit(*cl) || *cl == '#' || *cl == '*' )
-               {
-                       linphone_core_send_dtmf(lc, *cl);
-                       ms_sleep(1); // be nice
-                       ++cl;
-               }
-
-               // discard spurious trailing chars
-               return 1;
-       }
-
-       /* Handle other kind of commands */
-       cmd=lpc_find_command(cl);
-       if ( !cmd )
-       {
-               linphonec_out("'%s': Cannot understand this.\n", cl);
-               return 1;
-       }
-
-       if ( ! cmd->func(lc, args) )
-       {
-               linphonec_out("Syntax error.\n");
-               linphonec_display_command_help(cmd);
-       }
-
-       return 1;
-}
-
-/*
- * Generator function for command completion.
- * STATE let us know whether to start from scratch;
- * without any state (STATE==0), then we start at the
- * top of the list.
- */
-char *
-linphonec_command_generator(const char *text, int state)
-{
-       static int index, len;
-       char *name;
-
-       if ( ! state )
-       {
-               index=0;
-               len=strlen(text);
-       }
-
-       /*
-        * Return the next name which partially matches
-        * from the commands list
-        */
-       while ((name=commands[index].name))
-       {
-               ++index; /* so next call get next command */
-
-               if (strncmp(name, text, len) == 0)
-               {
-                       return ortp_strdup(name);
-               }
-       }
-
-       return NULL;
-}
-
-
-/***************************************************************************
- *
- *  Command handlers 
- *
- ***************************************************************************/
-
-static int
-lpc_cmd_help(LinphoneCore *lc, char *arg)
-{
-       int i=0;
-       LPC_COMMAND *cmd;
-
-       if (!arg || !*arg)
-       {
-               linphonec_out("Commands are:\n");
-               linphonec_out("---------------------------\n");
-
-               while (commands[i].help)
-               {
-                       linphonec_out("%10.10s\t%s\n", commands[i].name,
-                               commands[i].help);
-                       i++;
-               }
-               
-               linphonec_out("---------------------------\n");
-               linphonec_out("Type 'help <command>' for more details.\n");
-
-               return 1;
-       }
-
-       cmd=lpc_find_command(arg);
-       if ( !cmd )
-       {
-               linphonec_out("No such command.\n");
-               return 1;
-       }
-
-       linphonec_display_command_help(cmd);
-       return 1;
-
-}
-
-static char callee_name[256]={0};
-static char caller_name[256]={0};
-
-static int
-lpc_cmd_call(LinphoneCore *lc, char *args)
-{
-       if ( ! args || ! *args )
-       {
-               return 0;
-       }
-
-       if ( lc->call != NULL )
-       {
-               linphonec_out("Terminate current call first.\n");
-       }
-       else
-       {
-               if ( -1 == linphone_core_invite(lc, args) )
-               {
-                       linphonec_out("Error from linphone_core_invite.\n");
-               }
-               else
-               {
-                       snprintf(callee_name,sizeof(callee_name),"%s",args);
-               }
-       }
-       return 1;
-}
-
-const char *linphonec_get_callee(){
-       return callee_name;
-}
-
-const char *linphonec_get_caller(){
-       return caller_name;
-}
-
-void linphonec_set_caller(const char *caller){
-       snprintf(caller_name,sizeof(caller_name)-1,"%s",caller);
-}
-
-static int
-lpc_cmd_refer(LinphoneCore *lc, char *args)
-{
-       if (args)
-               linphone_core_refer(lc, args);
-       else{
-               linphonec_out("refer needs an argument\n");
-       }
-       return 1;
-}
-
-static int
-lpc_cmd_terminate(LinphoneCore *lc, char *args)
-{
-       if ( -1 == linphone_core_terminate_call(lc, NULL) )
-       {
-               linphonec_out("No active call.\n");
-       }
-       return 1;
-}
-
-static int
-lpc_cmd_answer(LinphoneCore *lc, char *args)
-{
-       if ( -1 == linphone_core_accept_call(lc, NULL) )
-       {
-               linphonec_out("No incoming call.\n");
-       }
-       return 1;
-}
-
-static int
-lpc_cmd_autoanswer(LinphoneCore *lc, char *args)
-{
-       if ( ! args )
-       {
-               if ( linphonec_get_autoanswer() ) {
-                       linphonec_out("Auto answer is enabled. Use 'autoanswer disable' to disable.\n");
-               } else {
-                       linphonec_out("Auto answer is disabled. Use 'autoanswer enable' to enable.\n");
-               }
-               return 1;
-       }
-
-       if (strstr(args,"enable")){
-               linphonec_set_autoanswer(TRUE);
-               linphonec_out("Auto answer enabled.\n");
-       }else if (strstr(args,"disable")){
-               linphonec_set_autoanswer(FALSE);
-               linphonec_out("Auto answer disabled.\n");
-       }else return 0;
-       return 1;
-}
-
-static int
-lpc_cmd_quit(LinphoneCore *lc, char *args)
-{
-       linphonec_main_loop_exit();
-       return 1;
-}
-
-static int
-lpc_cmd_nat(LinphoneCore *lc, char *args)
-{
-       bool_t use;
-       const char *nat;
-
-       if ( args ) args=lpc_strip_blanks(args);
-
-       if ( args && *args )
-       {
-               linphone_core_set_nat_address(lc, args);
-               /* linphone_core_set_firewall_policy(lc,LINPHONE_POLICY_USE_NAT_ADDRESS); */
-       }
-
-       nat = linphone_core_get_nat_address(lc);
-       use = linphone_core_get_firewall_policy(lc)==LINPHONE_POLICY_USE_NAT_ADDRESS;
-       linphonec_out("Nat address: %s%s\n", nat ? nat : "unspecified" , use ? "" : " (disabled - use 'firewall nat' to enable)");
-
-       return 1;
-}
-
-static int
-lpc_cmd_stun(LinphoneCore *lc, char *args)
-{
-       bool_t use;
-       const char *stun;
-
-       if ( args ) args=lpc_strip_blanks(args);
-
-       if ( args && *args )
-       {
-               linphone_core_set_stun_server(lc, args);
-               /* linphone_core_set_firewall_policy(lc,LINPHONE_POLICY_USE_STUN); */
-       }
-
-       stun = linphone_core_get_stun_server(lc);
-       use = linphone_core_get_firewall_policy(lc)==LINPHONE_POLICY_USE_STUN;
-       linphonec_out("Stun server: %s%s\n", stun ? stun : "unspecified" , use? "" : " (disabled - use 'firewall stun' to enable)");
-
-       return 1;
-}
-
-static int
-lpc_cmd_firewall(LinphoneCore *lc, char *args)
-{
-       const char* setting=NULL;
-
-       if ( args ) args=lpc_strip_blanks(args);
-
-       if ( args && *args )
-       {
-               if (strcmp(args,"none")==0)
-               {
-                       linphone_core_set_firewall_policy(lc,LINPHONE_POLICY_NO_FIREWALL);
-               }
-               else if (strcmp(args,"stun")==0)
-               {
-                       setting = linphone_core_get_stun_server(lc);
-                       if ( ! setting )
-                       {
-                               linphonec_out("No stun server address is defined, use 'stun <address>' first\n");
-                               return 1;
-                       }
-                       linphone_core_set_firewall_policy(lc,LINPHONE_POLICY_USE_STUN);
-               }
-               else if (strcmp(args,"nat")==0)
-               {
-                       setting = linphone_core_get_nat_address(lc);
-                       if ( ! setting )
-                       {
-                               linphonec_out("No nat address is defined, use 'nat <address>' first");
-                               return 1;
-                       }
-                       linphone_core_set_firewall_policy(lc,LINPHONE_POLICY_USE_NAT_ADDRESS);
-               }
-       }
-
-       switch(linphone_core_get_firewall_policy(lc))
-       {
-               case LINPHONE_POLICY_NO_FIREWALL:
-                       linphonec_out("No firewall\n");
-                       break;
-               case LINPHONE_POLICY_USE_STUN:
-                       linphonec_out("Using stun server %s to discover firewall address\n", setting ? setting : linphone_core_get_stun_server(lc));
-                       break;
-               case LINPHONE_POLICY_USE_NAT_ADDRESS:
-                       linphonec_out("Using supplied nat address %s.\n", setting ? setting : linphone_core_get_nat_address(lc));
-                       break;
-       }
-       return 1;
-}
-
-#ifndef WIN32
-/* Helper function for processing freind names */
-static int
-lpc_friend_name(char **args, char **name)
-{
-       /* Use space as a terminator unless quoted */
-       if (('"' == **args) || ('\'' == **args)){
-               char *end;
-               char delim = **args;
-               (*args)++;
-               end = (*args);
-               while ((delim != *end) && ('\0' != *end)) end++;
-               if ('\0' == *end) {
-                       fprintf(stderr, "Mismatched quotes\n");
-                       return 0;
-               }
-               *name = *args;
-               *end = '\0';
-               *args = ++end;
-       } else {
-               *name = strsep(args, " ");
-               
-               if (NULL == *args) { /* Means there was no separator */
-                       fprintf(stderr, "Either name or address is missing\n");
-                       return 0;
-               }
-               if (NULL == *name) return 0;
-       }
-       return 1;
-}
-#endif
-
-static int
-lpc_cmd_friend(LinphoneCore *lc, char *args)
-{
-       int friend_num;
-
-       if ( args ) args=lpc_strip_blanks(args);
-
-       if ( ! args || ! *args ) return 0;
-
-       if ( !strncmp(args, "list", 4) )
-       {
-               return linphonec_friend_list(lc, args+4);
-               return 1;
-       }
-       else if ( !strncmp(args, "call", 4) )
-       {
-               args+=4;
-               if ( ! *args ) return 0;
-               friend_num = strtol(args, NULL, 10);
-#ifndef _WIN32_WCE             
-               if ( errno == ERANGE ) {
-                       linphonec_out("Invalid friend number\n");
-                       return 0;
-               }
-#endif /*_WIN32_WCE*/
-               linphonec_friend_call(lc, friend_num);
-               return 1;
-       }
-       else if ( !strncmp(args, "delete", 6) )
-       {
-               args+=6;
-               if ( ! *args ) return 0;
-               while (*args == ' ') args++;
-               if ( ! *args ) return 0;
-               if (!strncmp(args, "all", 3))
-               {
-                       friend_num = -1;
-               } 
-               else
-               {
-                       friend_num = strtol(args, NULL, 10);
-#ifndef _WIN32_WCE             
-                       if ( errno == ERANGE ) {
-                               linphonec_out("Invalid friend number\n");
-                               return 0;
-                       }
-#endif /*_WIN32_WCE*/
-               }
-               linphonec_friend_delete(lc, friend_num);
-               return 1;
-       }
-       else if ( !strncmp(args, "add", 3) )
-       {
-#ifndef WIN32
-               char  *name;
-               char  addr[80];
-               char *addr_p = addr;
-               char *addr_orig;
-
-               args+=3;
-               if ( ! *args ) return 0;
-               while (*args == ' ') args++;
-               if ( ! *args ) return 0;
-
-               if (!lpc_friend_name(&args,  &name)) return 0;
-
-               while (*args == ' ') args++;
-               if ( ! *args ) return 0;
-               if (isdigit(*args)) {
-                       strcpy (addr, "sip:");
-                       addr_p = addr + strlen("sip:");
-               }
-               addr_orig = strsep(&args, " ");
-               if (1 >= strlen(addr_orig)) {
-                       fprintf(stderr, "A single-digit address is not valid\n");
-                       return 0;
-               }
-               strcpy(addr_p, addr_orig);
-               linphonec_friend_add(lc, name, addr);
-#else
-               LinphoneFriend *new_friend;
-               new_friend = linphone_friend_new_with_addr(args);
-               linphone_core_add_friend(lc, new_friend);
-#endif
-               return 1;
-       }
-       return 0;
-}
-
-static int lpc_cmd_play(LinphoneCore *lc, char *args){
-       if ( args ) args=lpc_strip_blanks(args);
-       if ( ! args || ! *args ) return 0;
-       linphone_core_set_play_file(lc,args);
-       return 1;
-}
-
-static int lpc_cmd_record(LinphoneCore *lc, char *args){
-       if ( args ) args=lpc_strip_blanks(args);
-       if ( ! args || ! *args ) return 0;
-       linphone_core_set_record_file(lc,args);
-       return 1;
-}
-
-/*
- * Modified input
- */
-static int
-lpc_cmd_proxy(LinphoneCore *lc, char *args)
-{
-       char *arg1 = args;
-       char *arg2 = NULL;
-       char *ptr = args;
-       int proxynum;
-
-       if ( ! arg1 ) return 0;
-
-       /* Isolate first and second arg */
-       while(*ptr && !isspace(*ptr)) ++ptr;
-       if ( *ptr )
-       {
-               *ptr='\0';
-               arg2=ptr+1;
-               while(*arg2 && isspace(*arg2)) ++arg2;
-       }
-
-       if (strcmp(arg1,"add")==0)
-       {
-#ifdef HAVE_READLINE
-               rl_inhibit_completion=1;
-#endif
-               linphonec_proxy_add(lc);
-#ifdef HAVE_READLINE
-               rl_inhibit_completion=0;
-#endif
-       }
-       else if (strcmp(arg1,"list")==0)
-       {
-               linphonec_proxy_list(lc);
-       }
-       else if (strcmp(arg1,"remove")==0)
-       {
-               linphonec_proxy_remove(lc,atoi(arg2));
-       }
-       else if (strcmp(arg1,"use")==0)
-       {
-               if ( arg2 && *arg2 )
-               {
-                       proxynum=atoi(arg2);
-                       if ( linphonec_proxy_use(lc, proxynum) )
-                               linphonec_out("Default proxy set to %d.\n", proxynum);
-               }
-               else
-               {
-                       proxynum=linphone_core_get_default_proxy(lc, NULL);
-                       if ( proxynum == -1 ) linphonec_out("No default proxy.\n");
-                       else linphonec_out("Current default proxy is %d.\n", proxynum);
-               }
-       }else if (strcmp(arg1, "unuse")==0){
-               linphone_core_set_default_proxy(lc, NULL);
-               linphonec_out("Use no proxy.\n");
-       }
-
-       else if (strcmp(arg1, "show")==0)
-       {
-               if (arg2 && *arg2)
-               {
-                       if (strstr(arg2,"default"))
-                       {
-               proxynum=linphone_core_get_default_proxy(lc, NULL);
-               if ( proxynum < 0 ) {
-                       linphonec_out("No default proxy defined\n");
-                       return 1;
-               }
-               linphonec_proxy_show(lc,proxynum);
-                       }
-                       else
-                       {
-               linphonec_proxy_show(lc, atoi(arg2));
-                       }
-               }
-               else return 0; /* syntax error */
-       }
-
-       else
-       {
-               return 0; /* syntax error */
-       }
-
-       return 1;
-}
-
-static int
-lpc_cmd_call_logs(LinphoneCore *lc, char *args)
-{
-       const MSList *elem=linphone_core_get_call_logs(lc);
-       for (;elem!=NULL;elem=ms_list_next(elem))
-       {
-               LinphoneCallLog *cl=(LinphoneCallLog*)elem->data;
-               char *str=linphone_call_log_to_str(cl);
-               linphonec_out("%s\n",str);
-               ms_free(str);
-       }
-       return 1;
-}
-
-static int
-lpc_cmd_ipv6(LinphoneCore *lc, char *arg1)
-{
-       if ( ! arg1 )
-       {
-               return 0; /* syntax error */
-       }
-
-       if (strcmp(arg1,"status")==0)
-       {
-               linphonec_out("ipv6 use enabled: %s\n",linphone_core_ipv6_enabled(lc) ? "true":"false");
-       }
-       else if (strcmp(arg1,"enable")==0)
-       {
-               linphone_core_enable_ipv6(lc,TRUE);
-               linphonec_out("ipv6 use enabled.\n");
-       }
-       else if (strcmp(arg1,"disable")==0)
-       {
-               linphone_core_enable_ipv6(lc,FALSE);
-               linphonec_out("ipv6 use disabled.\n");
-       }
-       else
-       {
-               return 0; /* syntax error */
-       }
-       return 1;
-}
-
-static int devname_to_index(LinphoneCore *lc, const char *devname){
-       const char **p;
-       int i;
-       for(i=0,p=linphone_core_get_sound_devices(lc);*p!=NULL;++p,++i){
-               if (strcmp(devname,*p)==0) return i;
-       }
-       return -1;
-}
-
-static const char *index_to_devname(LinphoneCore *lc, int index){
-       const char **p;
-       int i;
-       for(i=0,p=linphone_core_get_sound_devices(lc);*p!=NULL;++p,++i){
-               if (i==index) return *p;
-       }
-       return NULL;
-}
-
-static int lpc_cmd_soundcard(LinphoneCore *lc, char *args)
-{
-       int i, index;
-       const char **dev;
-       char *arg1 = args;
-       char *arg2 = NULL;
-       char *ptr = args;
-
-       if (!args) return 0; /* syntax error */
-
-       /* Isolate first and second arg */
-       while(*ptr && !isspace(*ptr)) ++ptr;
-       if ( *ptr )
-       {
-               *ptr='\0';
-               arg2=ptr+1;
-               while(*arg2 && isspace(*arg2)) ++arg2;
-       }
-
-       if (strcmp(arg1, "list")==0)
-       {
-               dev=linphone_core_get_sound_devices(lc);
-               for(i=0; dev[i]!=NULL; ++i){
-                       linphonec_out("%i: %s\n",i,dev[i]);
-               }
-               return 1;
-       }
-
-       if (strcmp(arg1, "show")==0)
-       {
-               linphonec_out("Ringer device: %s\n",
-                       linphone_core_get_ringer_device(lc));
-               linphonec_out("Playback device: %s\n",
-                       linphone_core_get_playback_device(lc));
-               linphonec_out("Capture device: %s\n",
-                       linphone_core_get_capture_device(lc));
-               return 1;
-       }
-
-       if (strcmp(arg1, "use")==0 && arg2)
-       {
-               if (strcmp(arg2, "files")==0)
-               {
-                       linphonec_out("Using wav files instead of soundcard.\n");
-                       linphone_core_use_files(lc,TRUE);
-                       return 1;
-               }
-
-               dev=linphone_core_get_sound_devices(lc);
-               index=atoi(arg2); /* FIXME: handle not-a-number */
-               for(i=0;dev[i]!=NULL;i++)
-               {
-                       if (i!=index) continue;
-
-                       linphone_core_set_ringer_device(lc,dev[i]);
-                       linphone_core_set_playback_device(lc,dev[i]);
-                       linphone_core_set_capture_device(lc,dev[i]);
-                       linphonec_out("Using sound device %s\n",dev[i]);
-                       return 1;
-               }
-               linphonec_out("No such sound device\n");
-               return 1;
-       }
-       if (strcmp(arg1, "capture")==0)
-       {
-               const char *devname=linphone_core_get_capture_device(lc);
-               if (!arg2){
-                       linphonec_out("Using capture device #%i (%s)\n",
-                                       devname_to_index(lc,devname),devname);
-               }else{
-                       index=atoi(arg2); /* FIXME: handle not-a-number */
-                       devname=index_to_devname(lc,index);
-                       if (devname!=NULL){
-                               linphone_core_set_capture_device(lc,devname);
-                               linphonec_out("Using capture sound device %s\n",devname);
-                               return 1;
-                       }
-                       linphonec_out("No such sound device\n");
-               }
-               return 1;
-       }
-       if (strcmp(arg1, "playback")==0)
-       {
-               const char *devname=linphone_core_get_playback_device(lc);
-               if (!arg2){
-                       linphonec_out("Using playback device #%i (%s)\n",
-                                       devname_to_index(lc,devname),devname);
-               }else{
-                       index=atoi(arg2); /* FIXME: handle not-a-number */
-                       devname=index_to_devname(lc,index);
-                       if (devname!=NULL){
-                               linphone_core_set_playback_device(lc,devname);
-                               linphonec_out("Using playback sound device %s\n",devname);
-                               return 1;
-                       }
-                       linphonec_out("No such sound device\n");
-               }
-               return 1;
-       }
-       if (strcmp(arg1, "ring")==0)
-       {
-               const char *devname=linphone_core_get_ringer_device(lc);
-               if (!arg2){
-                       linphonec_out("Using ring device #%i (%s)\n",
-                                       devname_to_index(lc,devname),devname);
-               }else{
-                       index=atoi(arg2); /* FIXME: handle not-a-number */
-                       devname=index_to_devname(lc,index);
-                       if (devname!=NULL){
-                               linphone_core_set_ringer_device(lc,devname);
-                               linphonec_out("Using ring sound device %s\n",devname);
-                               return 1;
-                       }
-                       linphonec_out("No such sound device\n");
-               }
-               return 1;
-       }
-       return 0; /* syntax error */
-}
-
-/***************************************************************************
- *
- *  Commands helper functions
- *
- ***************************************************************************/
-
-
-static void
-linphonec_proxy_add(LinphoneCore *lc)
-{
-       bool_t enable_register=FALSE;
-       LinphoneProxyConfig *cfg;
-
-       linphonec_out("Adding new proxy setup. Hit ^D to abort.\n");
-
-       /*
-        * SIP Proxy address
-        */
-       while (1)
-       {
-               char *input=linphonec_readline("Enter proxy sip address: ");
-               char *clean;
-
-               if ( ! input ) {
-                       linphonec_out("Aborted.\n");
-                       return;
-               }
-
-               /* Strip blanks */
-               clean=lpc_strip_blanks(input);
-               if ( ! *clean ) {
-                       free(input);
-                       continue;
-               }
-
-               cfg=linphone_proxy_config_new();
-               if (linphone_proxy_config_set_server_addr(cfg,clean)<0)
-               {
-                       linphonec_out("Invalid sip address (sip:sip.domain.tld).\n");
-                       free(input);
-                       linphone_proxy_config_destroy(cfg);
-                       continue;
-               }
-               free(input);
-               break;
-       }
-
-       /*
-        * SIP Proxy identity
-        */
-       while (1)
-       {
-               char *input=linphonec_readline("Your identity for this proxy: ");
-               char *clean;
-
-               if ( ! input ) {
-                       linphonec_out("Aborted.\n");
-                       linphone_proxy_config_destroy(cfg);
-                       return;
-               }
-
-               /* Strip blanks */
-               clean=lpc_strip_blanks(input);
-               if ( ! *clean ) {
-                       free(input);
-                       continue;
-               }
-
-               linphone_proxy_config_set_identity(cfg, clean);
-               if ( ! cfg->reg_identity )
-               {
-                       linphonec_out("Invalid identity (sip:name@sip.domain.tld).\n");
-                       free(input);
-                       continue;
-               }
-               free(input);
-               break;
-       }
-
-       /*
-        * SIP Proxy enable register
-        */
-       while (1)
-       {
-               char *input=linphonec_readline("Do you want to register on this proxy (yes/no): ");
-               char *clean;
-
-               if ( ! input ) {
-                       linphonec_out("Aborted.\n");
-                       linphone_proxy_config_destroy(cfg);
-                       return;
-               }
-
-               /* Strip blanks */
-               clean=lpc_strip_blanks(input);
-               if ( ! *clean ) {
-                       free(input);
-                       continue;
-               }
-
-               if ( ! strcmp(clean, "yes") ) enable_register=TRUE;
-               else if ( ! strcmp(clean, "no") ) enable_register=FALSE;
-               else {
-                       linphonec_out("Please answer with 'yes' or 'no'\n");
-                       free(input);
-                       continue;
-               }
-               linphone_proxy_config_enableregister(cfg, enable_register);
-               free(input);
-               break;
-       }
-
-       /*
-        * SIP Proxy registration expiration
-        */
-       if ( enable_register==TRUE )
-       {
-               long int expires=0;
-               while (1)
-               {
-                       char *input=linphonec_readline("Specify register expiration time"
-                               " in seconds (default is 600): ");
-
-                       if ( ! input ) {
-                               linphonec_out("Aborted.\n");
-                               linphone_proxy_config_destroy(cfg);
-                               return;
-                       }
-
-                       expires=strtol(input, (char **)NULL, 10);
-                       if ( expires == LONG_MIN || expires == LONG_MAX )
-                       {
-                               linphonec_out("Invalid value: %s\n", strerror(errno));
-                               free(input);
-                               continue;
-                       }
-
-                       linphone_proxy_config_expires(cfg, expires);
-                       linphonec_out("Expiration: %d seconds\n", cfg->expires);
-
-                       free(input);
-                       break;
-               }
-       }
-
-       /*
-        * SIP proxy route
-        */
-       while (1)
-       {
-               char *input=linphonec_readline("Specify route if needed: ");
-               char *clean;
-
-               if ( ! input ) {
-                       linphonec_out("Aborted.\n");
-                       linphone_proxy_config_destroy(cfg);
-                       return;
-               }
-
-               /* Strip blanks */
-               clean=lpc_strip_blanks(input);
-               if ( ! *clean ) {
-                       free(input);
-                       linphonec_out("No route specified.\n");
-                       break;
-               }
-
-               linphone_proxy_config_set_route(cfg, clean);
-               if ( ! cfg->reg_route )
-               {
-                       linphonec_out("Invalid route.\n");
-                       free(input);
-                       continue;
-               }
-
-               free(input);
-               break;
-       }
-
-       /*
-        * Final confirmation 
-        */
-       while (1)
-       {
-               char *input;
-               char *clean;
-
-               linphonec_out("--------------------------------------------\n");
-               linphonec_proxy_display(cfg);
-               linphonec_out("--------------------------------------------\n");
-               input=linphonec_readline("Accept the above proxy configuration (yes/no) ?: ");
-
-
-               if ( ! input ) {
-                       linphonec_out("Aborted.\n");
-                       linphone_proxy_config_destroy(cfg);
-                       return;
-               }
-
-               /* Strip blanks */
-               clean=lpc_strip_blanks(input);
-               if ( ! *clean ) {
-                       free(input);
-                       continue;
-               }
-
-               if ( ! strcmp(clean, "yes") ) break;
-               else if ( ! strcmp(clean, "no") )
-               {
-                       linphonec_out("Declined.\n");
-                       linphone_proxy_config_destroy(cfg);
-                       free(input);
-                       return;
-               }
-
-               linphonec_out("Please answer with 'yes' or 'no'\n");
-               free(input);
-               continue;
-       }
-
-
-       linphone_core_add_proxy_config(lc,cfg);
-
-       /* automatically set the last entered proxy as the default one */
-       linphone_core_set_default_proxy(lc,cfg);
-
-       linphonec_out("Proxy added.\n");
-}
-
-static void
-linphonec_proxy_display(LinphoneProxyConfig *cfg)
-{
-       linphonec_out("sip address: %s\nroute: %s\nidentity: %s\nregister: %s\nexpires: %i\nregistered: %s\n",
-                       cfg->reg_proxy,
-                       (cfg->reg_route!=NULL)?cfg->reg_route:"",
-                       (cfg->reg_identity!=NULL)?cfg->reg_identity:"",
-                       (cfg->reg_sendregister)?"yes":"no",
-                       cfg->expires,
-                       linphone_proxy_config_is_registered(cfg) ? "yes" : "no");
-}
-
-static void linphonec_proxy_show(LinphoneCore *lc, int index)
-{
-       const MSList *elem;
-       int i;
-       for(elem=linphone_core_get_proxy_config_list(lc),i=0;elem!=NULL;elem=elem->next,++i){
-               if (index==i){
-                       LinphoneProxyConfig *cfg=(LinphoneProxyConfig *)elem->data;
-                       linphonec_proxy_display(cfg);
-                       return;
-               }
-       }
-       linphonec_out("No proxy with index %i\n", index);
-}
-
-static void
-linphonec_proxy_list(LinphoneCore *lc)
-{
-       const MSList *proxies;
-       int n;
-       int def=linphone_core_get_default_proxy(lc,NULL);
-       
-       proxies=linphone_core_get_proxy_config_list(lc);
-       for(n=0;proxies!=NULL;proxies=ms_list_next(proxies),n++){
-               if (n==def)
-                       linphonec_out("****** Proxy %i - this is the default one - *******\n",n);
-               else 
-                       linphonec_out("****** Proxy %i *******\n",n);
-               linphonec_proxy_display((LinphoneProxyConfig*)proxies->data);
-       }
-       if ( ! n ) linphonec_out("No proxies defined\n");
-}
-
-static void
-linphonec_proxy_remove(LinphoneCore *lc, int index)
-{
-       const MSList *proxies;
-       LinphoneProxyConfig *cfg;
-       proxies=linphone_core_get_proxy_config_list(lc);
-       cfg=(LinphoneProxyConfig*)ms_list_nth_data(proxies,index);
-       if (cfg==NULL){
-               linphonec_out("No such proxy.\n");
-               return;
-       }
-       linphone_core_remove_proxy_config(lc,cfg);
-       linphonec_out("Proxy %s removed.\n", cfg->reg_proxy);
-       linphone_proxy_config_destroy(cfg);
-}
-
-static int
-linphonec_proxy_use(LinphoneCore *lc, int index)
-{
-       const MSList *proxies;
-       LinphoneProxyConfig *cfg;
-       proxies=linphone_core_get_proxy_config_list(lc);
-       cfg=(LinphoneProxyConfig*)ms_list_nth_data(proxies,index);
-       if (cfg==NULL){
-               linphonec_out("No such proxy (try 'proxy list').");
-               return 0;
-       }
-       linphone_core_set_default_proxy(lc,cfg);
-       return 1;
-}
-
-static void
-linphonec_friend_display(LinphoneFriend *fr)
-{
-       LinphoneAddress *uri=linphone_address_clone(linphone_friend_get_uri(fr));
-       char *str;
-       
-       linphonec_out("name: %s\n", linphone_address_get_display_name(uri));
-       linphone_address_set_display_name(uri,NULL);
-       str=linphone_address_as_string(uri);
-       linphonec_out("address: %s\n", str);
-}
-
-static int
-linphonec_friend_list(LinphoneCore *lc, char *pat)
-{
-       const MSList *friend;
-       int n;
-
-       if (pat) {
-               pat=lpc_strip_blanks(pat);
-               if (!*pat) pat = NULL;
-       }
-
-       friend = linphone_core_get_friend_list(lc);
-       for(n=0; friend!=NULL; friend=ms_list_next(friend), ++n )
-       {
-               if ( pat ) {
-                       const char *name = linphone_address_get_display_name(
-                           linphone_friend_get_uri((LinphoneFriend*)friend->data));
-                       if (name && ! strstr(name, pat) ) continue;
-               }
-               linphonec_out("****** Friend %i *******\n",n);
-               linphonec_friend_display((LinphoneFriend*)friend->data);
-       }
-
-       return 1;
-}
-
-static int
-linphonec_friend_call(LinphoneCore *lc, unsigned int num)
-{
-       const MSList *friend = linphone_core_get_friend_list(lc);
-       unsigned int n;
-       char *addr;
-
-       for(n=0; friend!=NULL; friend=ms_list_next(friend), ++n )
-       {
-               if ( n == num )
-               {
-                       int ret;
-                       addr = linphone_address_as_string(linphone_friend_get_uri((LinphoneFriend*)friend->data));
-                       ret=lpc_cmd_call(lc, addr);
-                       ms_free(addr);
-                       return ret;
-               }
-       }
-       linphonec_out("No such friend %u\n", num);
-       return 1;
-}
-
-#ifndef WIN32
-static int
-linphonec_friend_add(LinphoneCore *lc, const char *name, const char *addr)
-{
-       LinphoneFriend *newFriend;
-
-       char url[PATH_MAX];
-
-       snprintf(url, PATH_MAX, "%s <%s>", name, addr);
-       newFriend = linphone_friend_new_with_addr(url);
-       linphone_core_add_friend(lc, newFriend);
-       return 0;
-}
-#endif
-
-static int
-linphonec_friend_delete(LinphoneCore *lc, int num)
-{
-       const MSList *friend = linphone_core_get_friend_list(lc);
-       unsigned int n;
-
-       for(n=0; friend!=NULL; friend=ms_list_next(friend), ++n )
-       {
-               if ( n == num )
-               {
-                       linphone_core_remove_friend(lc, friend->data);
-                       return 0;
-               }
-       }
-
-       if (-1 == num) 
-       {
-               unsigned int i;
-               for (i = 0 ; i < n ; i++)
-                       linphonec_friend_delete(lc, 0);
-               return 0;
-       }
-
-       linphonec_out("No such friend %u\n", num);
-       return 1;
-}
-
-static void
-linphonec_display_command_help(LPC_COMMAND *cmd)
-{
-       if ( cmd->doc ) linphonec_out ("%s\n", cmd->doc);
-       else linphonec_out("%s\n", cmd->help);
-}
-
-
-static int lpc_cmd_register(LinphoneCore *lc, char *args){
-       char identity[512];
-       char proxy[512];
-       char passwd[512];
-       LinphoneProxyConfig *cfg;
-       const MSList *elem;
-    if (!args) return 0;
-       passwd[0]=proxy[0]=identity[0]='\0';
-       sscanf(args,"%s %s %s",identity,proxy,passwd);
-       if (proxy[0]=='\0' || identity[0]=='\0'){
-               linphonec_out("Missing parameters, see help register\n");
-               return 1;
-       }
-       if (passwd[0]!='\0'){
-               osip_from_t *from;
-               LinphoneAuthInfo *info;
-               osip_from_init(&from);
-               if (osip_from_parse(from,identity)==0){
-                       char realm[128];
-                       snprintf(realm,sizeof(realm)-1,"\"%s\"",from->url->host);
-                       info=linphone_auth_info_new(from->url->username,NULL,passwd,NULL,NULL);
-                       linphone_core_add_auth_info(lc,info);
-               }
-               osip_from_free(from);
-       }
-       elem=linphone_core_get_proxy_config_list(lc);
-       if (elem) {
-               cfg=(LinphoneProxyConfig*)elem->data;
-               linphone_proxy_config_edit(cfg);
-       }
-       else cfg=linphone_proxy_config_new();
-       linphone_proxy_config_set_identity(cfg,identity);
-       linphone_proxy_config_set_server_addr(cfg,proxy);
-       linphone_proxy_config_enable_register(cfg,TRUE);
-       if (elem) linphone_proxy_config_done(cfg);
-       else linphone_core_add_proxy_config(lc,cfg);
-       linphone_core_set_default_proxy(lc,cfg);
-       return 1;
-}
-
-static int lpc_cmd_unregister(LinphoneCore *lc, char *args){
-       LinphoneProxyConfig *cfg=NULL;
-       linphone_core_get_default_proxy(lc,&cfg);
-       if (cfg && linphone_proxy_config_is_registered(cfg)) {
-               linphone_proxy_config_edit(cfg);
-               linphone_proxy_config_enable_register(cfg,FALSE);
-               linphone_proxy_config_done(cfg);
-       }else{
-               linphonec_out("unregistered\n");
-       }
-       return 1;
-}
-
-static int lpc_cmd_duration(LinphoneCore *lc, char *args){
-       LinphoneCallLog *cl;
-       const MSList *elem=linphone_core_get_call_logs(lc);
-       for(;elem!=NULL;elem=elem->next){
-               if (elem->next==NULL){
-                       cl=(LinphoneCallLog*)elem->data;
-                       linphonec_out("%i seconds\n",cl->duration);
-               }
-       }
-       return 1;
-}
-
-static int lpc_cmd_status(LinphoneCore *lc, char *args)
-{
-       LinphoneProxyConfig *cfg;
-       
-       if ( ! args ) return 0;
-       linphone_core_get_default_proxy(lc,&cfg);
-       if (strstr(args,"register"))
-       {
-               if (cfg)
-               {
-                       if (linphone_proxy_config_is_registered(cfg)){
-                               linphonec_out("registered, identity=%s duration=%i\n",
-                                       linphone_proxy_config_get_identity(cfg),
-                                       linphone_proxy_config_get_expires(cfg));
-                       }else if (linphone_proxy_config_register_enabled(cfg)){
-                               linphonec_out("registered=-1\n");
-                       }else linphonec_out("registered=0\n");
-               }
-               else linphonec_out("registered=0\n");
-       }
-       else if (strstr(args,"autoanswer"))
-       {
-               if (cfg && linphone_proxy_config_is_registered(cfg))
-                       linphonec_out("autoanswer=%i\n",linphonec_get_autoanswer());
-               else linphonec_out("unregistered\n");
-       }
-       else if (strstr(args,"hook"))
-       {
-               gstate_t call_state=linphone_core_get_state(lc,GSTATE_GROUP_CALL);
-/*
-               if (!cfg || !linphone_proxy_config_is_registered(cfg)){
-                       linphonec_out("unregistered\n");
-                       return 1;
-               }
- */
-               switch(call_state){
-                       case GSTATE_CALL_OUT_INVITE:
-                               linphonec_out("hook=dialing\n");
-                       break;
-                       case GSTATE_CALL_IDLE:
-                               linphonec_out("hook=offhook\n");
-                       break;
-                       case GSTATE_CALL_OUT_CONNECTED:
-                               linphonec_out("Call out, hook=%s duration=%i\n", linphonec_get_callee(),
-                                       linphone_core_get_current_call_duration(lc));
-                       break;
-                       case GSTATE_CALL_IN_CONNECTED:
-                               linphonec_out("hook=answered duration=%i\n" ,
-                                       linphone_core_get_current_call_duration(lc));
-                               break;
-                       case GSTATE_CALL_IN_INVITE:
-                               linphonec_out("Incoming call from %s\n",linphonec_get_caller());
-                               break;
-                       default:
-                               break;
-               }
-               
-       }
-       else return 0;
-
-       return 1;
-}
-
-static int lpc_cmd_ports(LinphoneCore *lc, char *args)
-{
-       int port;
-       if ( ! args ){
-               linphonec_out("sip port = %i\naudio rtp port = %i\nvideo rtp port = %i\n",
-                       linphone_core_get_sip_port(lc),
-                       linphone_core_get_audio_port(lc),
-                       linphone_core_get_video_port(lc));
-               return 1;
-       }
-       if (sscanf(args,"sip %i",&port)==1){
-               linphonec_out("Setting sip port to %i\n",port);
-               linphone_core_set_sip_port(lc,port);
-       }else return 0;
-
-       return 1;
-}
-
-static int lpc_cmd_speak(LinphoneCore *lc, char *args){
-#ifndef WIN32
-       char voice[64];
-       char *sentence;
-       char cl[128];
-       char *wavfile;
-       int status;
-       FILE *file;
-    if (!args) return 0;
-       memset(voice,0,sizeof(voice));
-       sscanf(args,"%s63",voice);
-       sentence=args+strlen(voice);
-       wavfile=tempnam("/tmp/","linphonec-espeak-");
-       snprintf(cl,sizeof(cl),"espeak -v %s -s 100 -w %s --stdin",voice,wavfile);
-       file=popen(cl,"w");
-       if (file==NULL){
-               ms_error("Could not open pipe to espeak !");
-               return 1;
-       }
-       fprintf(file,"%s",sentence);
-       status=pclose(file);
-       if (WEXITSTATUS(status)==0){
-               linphone_core_set_play_file(lc,wavfile);
-       }else{
-               linphonec_out("espeak command failed.");
-       }
-#else
-       linphonec_out("Sorry, this command is not implemented in windows version.");
-#endif
-       return 1;
-}
-
-static int lpc_cmd_codec(LinphoneCore *lc, char *args){
-       char *arg1 = args;
-       char *arg2 = NULL;
-       char *ptr = args;
-
-       if (!args) return 0;
-
-       /* Isolate first and second arg */
-       while(*ptr && !isspace(*ptr)) ++ptr;
-       if ( *ptr )
-       {
-               *ptr='\0';
-               arg2=ptr+1;
-               while(*arg2 && isspace(*arg2)) ++arg2;
-       }
-
-       if (strcmp(arg1,"enable")==0)
-       {
-#ifdef HAVE_READLINE
-               rl_inhibit_completion=1;
-#endif
-        if (!strcmp(arg2,"all")) linphonec_codec_enable(lc,-1);
-        else linphonec_codec_enable(lc,atoi(arg2));
-#ifdef HAVE_READLINE
-               rl_inhibit_completion=0;
-#endif
-       }
-       else if (strcmp(arg1,"list")==0)
-       {
-               linphonec_codec_list(lc);
-       }
-       else if (strcmp(arg1,"disable")==0)
-       {
-        if (!strcmp(arg2,"all")) linphonec_codec_disable(lc,-1);
-        else linphonec_codec_disable(lc,atoi(arg2));
-       }
-       else
-       {
-               return 0; /* syntax error */
-       }
-
-       return 1;
-}
-
-static void linphonec_codec_list(LinphoneCore *lc){
-       PayloadType *pt;
-    codecs_config_t *config=&lc->codecs_conf;
-       int index=0;
-       MSList *node;
-       for(node=config->audio_codecs;node!=NULL;node=ms_list_next(node)){
-               pt=(PayloadType*)(node->data);
-        linphonec_out("%2d: %s (%d) %s\n", index, pt->mime_type, pt->clock_rate, payload_type_enabled(pt) ? "enabled" : "disabled");
-               index++;
-       }
-}
-
-static void linphonec_codec_enable(LinphoneCore *lc, int sel_index){
-       PayloadType *pt;
-    codecs_config_t *config=&lc->codecs_conf;
-       int index=0;
-       MSList *node;
-    for(node=config->audio_codecs;node!=NULL;node=ms_list_next(node)){
-        if (index == sel_index || sel_index == -1) {
-                   pt=(PayloadType*)(node->data);
-            pt->flags|=PAYLOAD_TYPE_ENABLED;
-            linphonec_out("%2d: %s (%d) %s\n", index, pt->mime_type, pt->clock_rate, "enabled");
-        }
-               index++;
-       }
-}
-
-static void linphonec_codec_disable(LinphoneCore *lc, int sel_index){
-       PayloadType *pt;
-    codecs_config_t *config=&lc->codecs_conf;
-       int index=0;
-       MSList *node;
-       for(node=config->audio_codecs;node!=NULL;node=ms_list_next(node)){
-        if (index == sel_index || sel_index == -1) {
-               pt=(PayloadType*)(node->data);
-            pt->flags&=~PAYLOAD_TYPE_ENABLED;
-            linphonec_out("%2d: %s (%d) %s\n", index, pt->mime_type, pt->clock_rate, "disabled");
-        }
-               index++;
-       }
-}
-
-static int lpc_cmd_echocancellation(LinphoneCore *lc, char *args){
-       char *arg1 = args;
-       char *arg2 = NULL;
-       char *ptr = args;
-
-       if (!args) return 0;
-
-       /* Isolate first and second arg */
-       while(*ptr && !isspace(*ptr)) ++ptr;
-       if ( *ptr )
-       {
-               *ptr='\0';
-               arg2=ptr+1;
-               while(*arg2 && isspace(*arg2)) ++arg2;
-       }
-
-       if (strcmp(arg1,"on")==0){
-        int delay, tail_len, frame_size;
-        int n;
-
-        linphone_core_enable_echo_cancellation(lc,1);
-
-        if (arg2 != 0) {
-            n = sscanf(arg2, "%d %d %d", &delay, &tail_len, &frame_size);
-
-            if (n == 1) {   
-                lp_config_set_int(lc->config,"sound","ec_delay",delay);
-            }
-            else if (n == 2) {
-                lp_config_set_int(lc->config,"sound","ec_delay",delay);
-                lp_config_set_int(lc->config,"sound","ec_tail_len",tail_len);
-            }
-            else if (n == 3) {
-                lp_config_set_int(lc->config,"sound","ec_delay",delay);
-                lp_config_set_int(lc->config,"sound","ec_tail_len",tail_len);
-                lp_config_set_int(lc->config,"sound","ec_framesize",frame_size);
-            }
-        }
-    }
-    else if (strcmp(arg1,"off")==0){
-        linphone_core_enable_echo_cancellation(lc,0);
-    }
-    else if (strcmp(arg1,"show")==0){
-        linphonec_out("echo cancellation is %s; delay %d, tail length %d, frame size %d\n", 
-            linphone_core_echo_cancellation_enabled(lc) ? "on" : "off",
-            lp_config_get_int(lc->config,"sound","ec_delay",0),
-            lp_config_get_int(lc->config,"sound","ec_tail_len",0),
-            lp_config_get_int(lc->config,"sound","ec_framesize",0));        
-    }
-    else {
-        return 0;
-    }
-
-    return 1;
-}
-
-/***************************************************************************
- *
- *  Command table management funx
- *
- ***************************************************************************/
-
-/*
- * Find a command given its name
- */
-static LPC_COMMAND *
-lpc_find_command(const char *name)
-{
-       int i;
-
-       for (i=0; commands[i].name; ++i)
-       {
-               if (strcmp(name, commands[i].name) == 0)
-                       return &commands[i];
-       }
-
-       return (LPC_COMMAND *)NULL;
-}
-
-
-/****************************************************************************
- *
- * $Log: commands.c,v $
- * Revision 1.39  2008/07/03 15:08:34  smorlat
- * api cleanups, interface in progress.
- *
- * Revision 1.38  2008/06/17 20:38:59  smorlat
- * added missing file.
- *
- * Revision 1.37  2008/04/09 09:26:00  smorlat
- * merge various patches
- * H264 support.
- *
- * Revision 1.36  2007/08/01 14:47:53  strk
- *         * console/commands.c: Clean up commands 'nat', 'stun'
- *           and 'firewall' to be more intuitive.
- *
- * Revision 1.35  2007/06/27 09:01:25  smorlat
- * logging improvements.
- *
- * Revision 1.34  2007/02/20 10:17:13  smorlat
- * linphonec friends patch2
- *
- * Revision 1.31  2006/09/22 07:22:47  smorlat
- * linphonecore api changes.
- *
- * Revision 1.30  2006/09/08 15:32:57  smorlat
- * support for using files instead of soundcard (used by linphonec only)
- *
- * Revision 1.29  2006/08/28 14:29:07  smorlat
- * fix bug.
- *
- * Revision 1.28  2006/08/21 12:49:59  smorlat
- * merged several little patches.
- *
- * Revision 1.27  2006/07/17 18:45:00  smorlat
- * support for several event queues in ortp.
- * glib dependency removed from coreapi/ and console/
- *
- * Revision 1.26  2006/04/14 15:16:36  smorlat
- * soundcard use did nothing !
- *
- * Revision 1.25  2006/04/06 20:09:33  smorlat
- * add linphonec command to see and select sound devices.
- *
- * Revision 1.24  2006/03/04 11:17:10  smorlat
- * mediastreamer2 in progress.
- *
- * Revision 1.23  2006/02/20 21:14:01  strk
- * Handled syntax errors with 'friend' command
- *
- * Revision 1.22  2006/02/20 10:20:29  strk
- * Added substring-based filter support for command 'friend list'
- *
- * Revision 1.21  2006/02/02 15:39:18  strk
- * - Added 'friend list' and 'friend call' commands
- * - Allowed for multiple DTFM send in a single line
- * - Added status-specific callback (bare version)
- *
- * Revision 1.20  2006/01/26 11:54:34  strk
- * More robust 'nat' command handler (strip blanks in args)
- *
- * Revision 1.19  2006/01/26 09:48:05  strk
- * Added limits.h include
- *
- * Revision 1.18  2006/01/26 02:18:05  strk
- * Added new commands 'nat use' and 'nat unuse'.
- * These will required a pending patch to linphonecore.c
- * in order to work.
- *
- * Revision 1.17  2006/01/20 14:12:33  strk
- * Added linphonec_init() and linphonec_finish() functions.
- * Handled SIGINT and SIGTERM to invoke linphonec_finish().
- * Handling of auto-termination (-t) moved to linphonec_finish().
- * Reworked main (input read) loop to not rely on 'terminate'
- * and 'run' variable (dropped). configfile_name allocated on stack
- * using PATH_MAX limit. Changed print_usage signature to allow
- * for an exit_status specification.
- *
- * Revision 1.16  2006/01/18 09:25:32  strk
- * Command completion inhibited in proxy addition and auth request prompts.
- * Avoided use of linphonec_readline's internal filename completion.
- *
- * Revision 1.15  2006/01/14 13:29:32  strk
- * Reworked commands interface to use a table structure,
- * used by command line parser and help function.
- * Implemented first level of completion (commands).
- * Added notification of invalid "answer" and "terminate"
- * commands (no incoming call, no active call).
- * Forbidden "call" intialization when a call is already active.
- * Cleaned up all commands, adding more feedback and error checks.
- *
- * Revision 1.14  2006/01/13 13:00:29  strk
- * Added linphonec.h. Code layout change (added comments, forward decl,
- * globals on top, copyright notices and Logs). Handled out-of-memory
- * condition on history management. Removed assumption on sizeof(char).
- * Fixed bug in authentication prompt (introduced by linphonec_readline).
- * Added support for multiple authentication requests (up to MAX_PENDING_AUTH).
- *
- *
- ****************************************************************************/
diff --git a/linphone/console/example/linphonec b/linphone/console/example/linphonec
deleted file mode 100644 (file)
index a832f85..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-# this file is used to store user config values for linphonec
-# please modify and copy it to ~/.linphonec
-#
-#
-
-logfile=~/linphonec.log
-debuglevel=0
-
-local_addr=192.168.1.10
-if_name=eth0
-# type of network connection 4 = ethernet
-con_type=4
-
-
-# rtp
-audio_rtp_port=7078
-jitt_comp=150
-
-
-# audio
-driver_mode=0
-rec_lev=100
-play_lev=100
-source=109
-autokill=0
-
-
-# sip
-sip_port=5060
-use_registrar=0
-username=1006
-hostname=192.168.1.1
-registrar=sip:192.168.1.1:5060
-reg_passwd=
-addr_of_rec=sip:1006@192.168.1.1
-reg_expires=900
-as_proxy=1
-as_redirect=0
-as_outbound=1
-
-
-# codecs
-audio_codecs=259 371 264 256 
-
-
-# short dial
-s0=sip:1002@130.83.176.121
-s1=sip:1001@192.168.1.1
-s2=sip:1002@192.168.1.1
-s3=sip:1003@192.168.1.1
-s4=sip:1004@192.168.1.1
diff --git a/linphone/console/linphonec.c b/linphone/console/linphonec.c
deleted file mode 100644 (file)
index 81fccea..0000000
+++ /dev/null
@@ -1,1430 +0,0 @@
-/****************************************************************************
- *
- *  $Id: linphonec.c,v 1.57 2007/11/14 13:40:27 smorlat Exp $
- *
- *  Copyright (C) 2006  Sandro Santilli <strk@keybit.net>
- *  Copyright (C) 2002  Florian Winterstein <flox@gmx.net>
- *  Copyright (C) 2000  Simon MORLAT <simon.morlat@free.fr>
- *
-****************************************************************************
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- *
- ****************************************************************************/
-#include <string.h>
-#ifndef _WIN32_WCE
-#include <sys/time.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <errno.h>
-#include <signal.h>
-#include "private.h" /*coreapi/private.h, needed for LINPHONE_VERSION */
-#endif /*_WIN32_WCE*/
-#include <limits.h>
-#include <ctype.h>
-
-#include <linphonecore.h>
-
-#include "linphonec.h"
-
-#ifdef WIN32
-#include <ws2tcpip.h>
-#include <ctype.h>
-#ifndef _WIN32_WCE
-#include <conio.h>
-#endif /*_WIN32_WCE*/
-#else
-#include <sys/socket.h>
-#include <netdb.h>
-#include <sys/un.h>
-#include <sys/stat.h>
-#endif
-
-#if defined(_WIN32_WCE)
-
-#if !defined(PATH_MAX)
-#define PATH_MAX 256
-#endif /*PATH_MAX*/
-
-#if !defined(strdup)
-#define strdup _strdup
-#endif /*strdup*/
-
-#endif /*_WIN32_WCE*/
-
-#ifdef HAVE_GETTEXT
-#include <libintl.h>
-#ifndef _
-#define _(String) gettext(String)
-#endif
-#else
-#define _(something)   (something)
-#endif
-
-#ifndef PACKAGE_DIR
-#define PACKAGE_DIR ""
-#endif
-
-/***************************************************************************
- *
- *  Types
- *
- ***************************************************************************/
-
-typedef struct {
-       LinphoneAuthInfo *elem[MAX_PENDING_AUTH];
-       int nitems;
-} LPC_AUTH_STACK;
-
-/***************************************************************************
- *
- *  Forward declarations
- *
- ***************************************************************************/
-
-char *lpc_strip_blanks(char *input);
-
-static int handle_configfile_migration(void);
-#if !defined(_WIN32_WCE)
-static int copy_file(const char *from, const char *to);
-#endif /*_WIN32_WCE*/
-static int linphonec_parse_cmdline(int argc, char **argv);
-static int linphonec_init(int argc, char **argv);
-static int linphonec_main_loop (LinphoneCore * opm, char * sipAddr);
-static int linphonec_idle_call (void);
-#ifdef HAVE_READLINE
-static int linphonec_initialize_readline(void);
-static int linphonec_finish_readline();
-static char **linephonec_readline_completion(const char *text,
-       int start, int end);
-#endif
-
-/* These are callback for linphone core */
-static void linphonec_call_received(LinphoneCore *lc, const char *from);
-static void linphonec_prompt_for_auth(LinphoneCore *lc, const char *realm,
-       const char *username);
-static void linphonec_display_something (LinphoneCore * lc, const char *something);
-static void linphonec_display_url (LinphoneCore * lc, const char *something, const char *url);
-static void linphonec_display_warning (LinphoneCore * lc, const char *something);
-static void stub () {}
-static void linphonec_notify_received(LinphoneCore *lc,LinphoneFriend *fid,
-               const char *from, const char *status, const char *img);
-static void linphonec_new_unknown_subscriber(LinphoneCore *lc,
-               LinphoneFriend *lf, const char *url);
-static void linphonec_bye_received(LinphoneCore *lc, const char *from);
-static void linphonec_text_received(LinphoneCore *lc, LinphoneChatRoom *cr,
-               const char *from, const char *msg);
-static void linphonec_display_status (LinphoneCore * lc, const char *something);
-static void linphonec_general_state (LinphoneCore * lc, LinphoneGeneralState *gstate);
-static void linphonec_dtmf_received(LinphoneCore *lc, int dtmf);
-static void print_prompt(LinphoneCore *opm);
-/***************************************************************************
- *
- * Global variables
- *
- ***************************************************************************/
-
-LinphoneCore *linphonec;
-FILE *mylogfile;
-#ifdef HAVE_READLINE
-static char *histfile_name=NULL;
-static char last_in_history[256];
-#endif
-//auto answer (-a) option
-static bool_t auto_answer=FALSE;
-static bool_t answer_call=FALSE;
-static bool_t vcap_enabled=FALSE;
-static bool_t display_enabled=FALSE;
-static bool_t preview_enabled=FALSE;
-static bool_t show_general_state=FALSE;
-static bool_t unix_socket=FALSE;
-static bool_t linphonec_running=TRUE;
-LPC_AUTH_STACK auth_stack;
-static int trace_level = 0;
-static char *logfile_name = NULL;
-static char configfile_name[PATH_MAX];
-static char *sipAddr = NULL; /* for autocall */
-#if !defined(_WIN32_WCE)
-static ortp_pipe_t client_sock=ORTP_PIPE_INVALID;
-#endif /*_WIN32_WCE*/
-char prompt[PROMPT_MAX_LEN];
-#if !defined(_WIN32_WCE)
-static ortp_thread_t pipe_reader_th;
-static bool_t pipe_reader_run=FALSE;
-#endif /*_WIN32_WCE*/
-#if !defined(_WIN32_WCE)
-static ortp_pipe_t server_sock;
-#endif /*_WIN32_WCE*/
-
-
-LinphoneCoreVTable linphonec_vtable
-#if !defined (_MSC_VER)
-= {
-       .show =(ShowInterfaceCb) stub,
-       .inv_recv = linphonec_call_received,
-       .bye_recv = linphonec_bye_received,
-       .notify_recv = linphonec_notify_received,
-       .new_unknown_subscriber = linphonec_new_unknown_subscriber,
-       .auth_info_requested = linphonec_prompt_for_auth,
-       .display_status = linphonec_display_status,
-       .display_message=linphonec_display_something,
-#ifdef VINCENT_MAURY_RSVP
-       /* the yes/no dialog box */
-       .display_yes_no= (DisplayMessageCb) stub,
-#endif
-       .display_warning=linphonec_display_warning,
-       .display_url=linphonec_display_url,
-       .display_question=(DisplayQuestionCb)stub,
-       .text_received=linphonec_text_received,
-       .general_state=linphonec_general_state,
-       .dtmf_received=linphonec_dtmf_received
-}
-#endif /*_WIN32_WCE*/
-;
-
-
-
-/***************************************************************************
- *
- * Linphone core callbacks
- *
- ***************************************************************************/
-
-/*
- * Linphone core callback
- */
-static void
-linphonec_display_something (LinphoneCore * lc, const char *something)
-{
-       fprintf (stdout, "%s\n%s", something,prompt);
-       fflush(stdout);
-}
-
-/*
- * Linphone core callback
- */
-static void
-linphonec_display_status (LinphoneCore * lc, const char *something)
-{
-       fprintf (stdout, "%s\n%s", something,prompt);
-       fflush(stdout);
-}
-
-/*
- * Linphone core callback
- */
-static void
-linphonec_display_warning (LinphoneCore * lc, const char *something)
-{
-       fprintf (stdout, "Warning: %s\n%s", something,prompt);
-       fflush(stdout);
-}
-
-/*
- * Linphone core callback
- */
-static void
-linphonec_display_url (LinphoneCore * lc, const char *something, const char *url)
-{
-       fprintf (stdout, "%s : %s\n", something, url);
-}
-
-
-/*
- * Linphone core callback
- */
-static void
-linphonec_call_received(LinphoneCore *lc, const char *from)
-{
-       linphonec_set_caller(from);
-       if ( auto_answer)  {
-               answer_call=TRUE;
-       }
-}
-
-/*
- * Linphone core callback
- */
-static void
-linphonec_prompt_for_auth(LinphoneCore *lc, const char *realm, const char *username)
-{
-       /* no prompt possible when using pipes or tcp mode*/
-       if (unix_socket){
-               linphone_core_abort_authentication(lc,NULL);
-       }else{
-               LinphoneAuthInfo *pending_auth;
-
-               if ( auth_stack.nitems+1 > MAX_PENDING_AUTH )
-               {
-                       fprintf(stderr,
-                               "Can't accept another authentication request.\n"
-                               "Consider incrementing MAX_PENDING_AUTH macro.\n");
-                       return;
-               }
-
-               pending_auth=linphone_auth_info_new(username,NULL,NULL,NULL,realm);
-               auth_stack.elem[auth_stack.nitems++]=pending_auth;
-       }
-}
-
-/*
- * Linphone core callback
- */
-static void
-linphonec_notify_received(LinphoneCore *lc,LinphoneFriend *fid,
-               const char *from, const char *status, const char *img)
-{
-       printf("Friend %s is %s\n", from, status);
-       // todo: update Friend list state (unimplemented)
-}
-
-/*
- * Linphone core callback
- */
-static void
-linphonec_new_unknown_subscriber(LinphoneCore *lc, LinphoneFriend *lf,
-               const char *url)
-{
-       printf("Friend %s requested subscription "
-               "(accept/deny is not implemented yet)\n", url);
-       // This means that this person wishes to be notified
-       // of your presence information (online, busy, away...).
-
-}
-
-/*
- * Linphone core callback
- */
-static void
-linphonec_bye_received(LinphoneCore *lc, const char *from)
-{
-       // Should change prompt back to original maybe
-
-       // printing this is unneeded as we'd get a "Communication ended"
-       // message trough display_status callback anyway
-       //printf("Bye received from %s\n", from);
-}
-
-/*
- * Linphone core callback
- */
-static void
-linphonec_text_received(LinphoneCore *lc, LinphoneChatRoom *cr,
-               const char *from, const char *msg)
-{
-       printf("%s: %s\n", from, msg);
-       // TODO: provide mechanism for answering.. ('say' command?)
-}
-
-
-static void linphonec_dtmf_received(LinphoneCore *lc, int dtmf){
-       fprintf(stdout,"Receiving tone %c\n",dtmf);
-       fflush(stdout);
-}
-
-static void
-linphonec_general_state (LinphoneCore * lc, LinphoneGeneralState *gstate)
-{
-        if (show_general_state) {
-          switch(gstate->new_state) {
-           case GSTATE_POWER_OFF:
-             printf("GSTATE_POWER_OFF");
-             break;
-           case GSTATE_POWER_STARTUP:
-             printf("GSTATE_POWER_STARTUP");
-             break;
-           case GSTATE_POWER_ON:
-             printf("GSTATE_POWER_ON");
-             break;
-           case GSTATE_POWER_SHUTDOWN:
-             printf("GSTATE_POWER_SHUTDOWN");
-             break;
-           case GSTATE_REG_NONE:
-             printf("GSTATE_REG_NONE");
-             break;
-           case GSTATE_REG_OK:
-             printf("GSTATE_REG_OK");
-             break;
-           case GSTATE_REG_FAILED:
-             printf("GSTATE_REG_FAILED");
-             break;
-           case GSTATE_CALL_IDLE:
-             printf("GSTATE_CALL_IDLE");
-             break;
-           case GSTATE_CALL_OUT_INVITE:
-             printf("GSTATE_CALL_OUT_INVITE");
-             break;
-           case GSTATE_CALL_OUT_CONNECTED:
-             printf("GSTATE_CALL_OUT_CONNECTED");
-             break;
-           case GSTATE_CALL_IN_INVITE:
-             printf("GSTATE_CALL_IN_INVITE");
-             break;
-           case GSTATE_CALL_IN_CONNECTED:
-             printf("GSTATE_CALL_IN_CONNECTED");
-             break;
-           case GSTATE_CALL_END:
-             printf("GSTATE_CALL_END");
-             break;
-           case GSTATE_CALL_ERROR:
-             printf("GSTATE_CALL_ERROR");
-             break;
-           default:
-              printf("GSTATE_UNKNOWN_%d",gstate->new_state);
-          }
-          if (gstate->message) printf(" %s", gstate->message);
-          printf("\n");
-        }
-}
-
-static char received_prompt[PROMPT_MAX_LEN];
-static ms_mutex_t prompt_mutex;
-static bool_t have_prompt=FALSE;
-
-static void *prompt_reader_thread(void *arg){
-       char *ret;
-       char tmp[PROMPT_MAX_LEN];
-       while ((ret=fgets(tmp,sizeof(tmp),stdin))!=NULL){
-               ms_mutex_lock(&prompt_mutex);
-               strcpy(received_prompt,ret);
-               have_prompt=TRUE;
-               ms_mutex_unlock(&prompt_mutex);
-       }
-       return NULL;
-}
-
-static void start_prompt_reader(void){
-       ortp_thread_t th;
-       ms_mutex_init(&prompt_mutex,NULL);
-       ortp_thread_create(&th,NULL,prompt_reader_thread,NULL);
-}
-#if !defined(_WIN32_WCE)
-static ortp_pipe_t create_server_socket(void){
-       char path[128];
-#ifndef WIN32
-       snprintf(path,sizeof(path)-1,"linphonec-%i",getuid());
-#else
-       {
-               TCHAR username[128];
-               DWORD size=sizeof(username)-1;
-               GetUserName(username,&size);
-               snprintf(path,sizeof(path)-1,"linphonec-%s",username);
-       }
-#endif
-       return ortp_server_pipe_create(path);
-}
-
-
-static void *pipe_thread(void*p){
-       char tmp[250];
-       server_sock=create_server_socket();
-       if (server_sock==ORTP_PIPE_INVALID) return NULL;
-       while(pipe_reader_run){
-               while(client_sock!=ORTP_PIPE_INVALID){ /*sleep until the last command is finished*/
-#ifndef WIN32
-                       usleep(20000);
-#else
-                       Sleep(20);
-#endif
-               }
-               client_sock=ortp_server_pipe_accept_client(server_sock);
-               if (client_sock!=ORTP_PIPE_INVALID){
-                       int len;
-                       /*now read from the client */
-                       if ((len=ortp_pipe_read(client_sock,(uint8_t*)tmp,sizeof(tmp)-1))>0){
-                               ortp_mutex_lock(&prompt_mutex);
-                               tmp[len]='\0';
-                               strcpy(received_prompt,tmp);
-                               printf("Receiving command '%s'\n",received_prompt);fflush(stdout);
-                               have_prompt=TRUE;
-                               ortp_mutex_unlock(&prompt_mutex);
-                       }else{
-                               printf("read nothing\n");fflush(stdout);
-                               ortp_server_pipe_close_client(client_sock);
-                               client_sock=ORTP_PIPE_INVALID;
-                       }
-
-               }else{
-                       if (pipe_reader_run) fprintf(stderr,"accept() failed: %s\n",strerror(errno));
-               }
-       }
-       ms_message("Exiting pipe_reader_thread.");
-       fflush(stdout);
-       return NULL;
-}
-
-static void start_pipe_reader(void){
-       ms_mutex_init(&prompt_mutex,NULL);
-       pipe_reader_run=TRUE;
-       ortp_thread_create(&pipe_reader_th,NULL,pipe_thread,NULL);
-}
-
-static void stop_pipe_reader(void){
-       pipe_reader_run=FALSE;
-       linphonec_command_finished();
-       ortp_server_pipe_close(server_sock);
-       ortp_thread_join(pipe_reader_th,NULL);
-}
-#endif /*_WIN32_WCE*/
-
-#ifdef HAVE_READLINE
-#define BOOL_HAVE_READLINE 1
-#else
-#define BOOL_HAVE_READLINE 0
-#endif
-
-char *linphonec_readline(char *prompt){
-       if (unix_socket || !BOOL_HAVE_READLINE ){
-               static bool_t prompt_reader_started=FALSE;
-               static bool_t pipe_reader_started=FALSE;
-               if (!prompt_reader_started){
-                       start_prompt_reader();
-                       prompt_reader_started=TRUE;
-               }
-               if (unix_socket && !pipe_reader_started){
-#if !defined(_WIN32_WCE)
-                       start_pipe_reader();
-                       pipe_reader_started=TRUE;
-#endif /*_WIN32_WCE*/
-               }
-               fprintf(stdout,"%s",prompt);
-               fflush(stdout);
-               while(1){
-                       ms_mutex_lock(&prompt_mutex);
-                       if (have_prompt){
-                               char *ret=strdup(received_prompt);
-                               have_prompt=FALSE;
-                               ms_mutex_unlock(&prompt_mutex);
-                               return ret;
-                       }
-                       ms_mutex_unlock(&prompt_mutex);
-                       linphonec_idle_call();
-#ifdef WIN32
-                       Sleep(20);
-#else
-                       usleep(20000);
-#endif
-               }
-       }else{
-#ifdef HAVE_READLINE
-               return readline(prompt);
-#endif
-       }
-}
-
-void linphonec_out(const char *fmt,...){
-       char *res;
-       va_list args;
-       va_start (args, fmt);
-       res=ortp_strdup_vprintf(fmt,args);
-       va_end (args);
-       printf("%s",res);
-       fflush(stdout);
-#if !defined(_WIN32_WCE)
-       if (client_sock!=ORTP_PIPE_INVALID){
-               if (ortp_pipe_write(client_sock,(uint8_t*)res,strlen(res))==-1){
-                       fprintf(stderr,"Fail to send output via pipe: %s",strerror(errno));
-               }
-       }
-#endif /*_WIN32_WCE*/
-       ortp_free(res);
-}
-
-void linphonec_command_finished(void){
-#if !defined(_WIN32_WCE)
-       if (client_sock!=ORTP_PIPE_INVALID){
-               ortp_server_pipe_close_client(client_sock);
-               client_sock=ORTP_PIPE_INVALID;
-       }
-#endif /*_WIN32_WCE*/
-}
-
-void linphonec_set_autoanswer(bool_t enabled){
-       auto_answer=enabled;
-}
-
-bool_t linphonec_get_autoanswer(){
-       return auto_answer;
-}
-
-/***************************************************************************/
-/*
- * Main
- *
- * Use globals:
- *
- *     - char *histfile_name
- *     - FILE *mylogfile
- */
-#if defined (_WIN32_WCE)
-
-char **convert_args_to_ascii(int argc, _TCHAR **wargv){
-       int i;
-       char **result=malloc(argc*sizeof(char*));
-       char argtmp[128];
-       for(i=0;i<argc;++i){
-               wcstombs(argtmp,wargv[i],sizeof(argtmp));
-               result[i]=strdup(argtmp);
-       }
-       return result;
-}
-
-int _tmain(int argc, _TCHAR* wargv[]) {
-       char **argv=convert_args_to_ascii(argc,wargv);
-       trace_level=6;
-       linphonec_vtable.show =(ShowInterfaceCb) stub;
-       linphonec_vtable.inv_recv = linphonec_call_received;
-       linphonec_vtable.bye_recv = linphonec_bye_received;
-       linphonec_vtable.notify_recv = linphonec_notify_received;
-       linphonec_vtable.new_unknown_subscriber = linphonec_new_unknown_subscriber;
-       linphonec_vtable.auth_info_requested = linphonec_prompt_for_auth;
-       linphonec_vtable.display_status = linphonec_display_status;
-       linphonec_vtable.display_message=linphonec_display_something;
-#ifdef VINCENT_MAURY_RSVP
-       /* the yes/no dialog box */
-       linphonec_vtable.display_yes_no= (DisplayMessageCb) stub;
-#endif
-       linphonec_vtable.display_warning=linphonec_display_warning;
-       linphonec_vtable.display_url=linphonec_display_url;
-       linphonec_vtable.display_question=(DisplayQuestionCb)stub;
-       linphonec_vtable.text_received=linphonec_text_received;
-       linphonec_vtable.general_state=linphonec_general_state;
-       linphonec_vtable.dtmf_received=linphonec_dtmf_received;
-
-#else
-int
-main (int argc, char *argv[]) {
-#endif
-
-
-       if (! linphonec_init(argc, argv) ) exit(EXIT_FAILURE);
-
-       linphonec_main_loop (linphonec, sipAddr);
-
-       linphonec_finish(EXIT_SUCCESS);
-
-       exit(EXIT_SUCCESS); /* should never reach here */
-}
-
-/*
- * Initialize linphonec
- */
-static int
-linphonec_init(int argc, char **argv)
-{
-
-       //g_mem_set_vtable(&dbgtable);
-
-       /*
-        * Set initial values for global variables
-        */
-       mylogfile = NULL;
-       
-       
-#ifndef _WIN32
-       snprintf(configfile_name, PATH_MAX, "%s/.linphonerc",
-                       getenv("HOME"));
-#elif defined(_WIN32_WCE)
-       strncpy(configfile_name,PACKAGE_DIR "\\linphonerc",PATH_MAX);
-       mylogfile=fopen(PACKAGE_DIR "\\" "linphonec.log","w");
-       printf("Logs are redirected in" PACKAGE_DIR "\\linphonec.log");
-#else
-       snprintf(configfile_name, PATH_MAX, "%s/Linphone/linphonerc",
-                       getenv("APPDATA"));
-#endif
-       /* Handle configuration filename changes */
-       switch (handle_configfile_migration())
-       {
-               case -1: /* error during file copies */
-                       fprintf(stderr,
-                               "Error in configuration file migration\n");
-                       break;
-
-               case 0: /* nothing done */
-               case 1: /* migrated */
-               default:
-                       break;
-       }
-
-#ifdef ENABLE_NLS
-       if (NULL == bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR))
-               perror ("bindtextdomain failed");
-#ifndef __ARM__
-       bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-#endif
-       textdomain (GETTEXT_PACKAGE);
-#else
-       printf ("NLS disabled.\n");
-#endif
-
-       linphonec_parse_cmdline(argc, argv);
-
-       if (trace_level > 0)
-       {
-               if (logfile_name != NULL)
-                       mylogfile = fopen (logfile_name, "w+");
-
-               if (mylogfile == NULL)
-               {
-                       mylogfile = stdout;
-                       fprintf (stderr,
-                                "INFO: no logfile, logging to stdout\n");
-               }
-               linphone_core_enable_logs(mylogfile);
-       }
-       else
-       {
-               linphone_core_disable_logs();
-       }
-       /*
-        * Initialize auth stack
-        */
-       auth_stack.nitems=0;
-
-       /*
-        * Initialize linphone core
-        */
-       linphonec=linphone_core_new (&linphonec_vtable, configfile_name, NULL,
-                           NULL);
-       linphone_core_enable_video(linphonec,vcap_enabled,display_enabled);
-       linphone_core_enable_video_preview(linphonec,preview_enabled);
-       if (!(vcap_enabled || display_enabled)) printf("Warning: video is disabled in linphonec, use -V or -C or -D to enable.\n");
-#ifdef HAVE_READLINE
-       /*
-        * Initialize readline
-        */
-       linphonec_initialize_readline();
-#endif
-#if !defined(_WIN32_WCE)
-       /*
-        * Initialize signal handlers
-        */
-       signal(SIGTERM, linphonec_finish);
-       signal(SIGINT, linphonec_finish);
-#endif /*_WIN32_WCE*/
-       return 1;
-}
-
-
-void linphonec_main_loop_exit(void){
-       linphonec_running=FALSE;
-}
-
-/*
- * Close linphonec, cleanly terminating
- * any pending call
- */
-void
-linphonec_finish(int exit_status)
-{
-       printf("Terminating...\n");
-
-       /* Terminate any pending call */
-       linphonec_parse_command_line(linphonec, "terminate");
-       linphonec_command_finished();
-#ifdef HAVE_READLINE
-       linphonec_finish_readline();
-#endif
-#if !defined(_WIN32_WCE)
-       if (pipe_reader_run)
-               stop_pipe_reader();
-#endif /*_WIN32_WCE*/
-
-       linphone_core_destroy (linphonec);
-
-       if (mylogfile != NULL && mylogfile != stdout)
-       {
-               fclose (mylogfile);
-       }
-
-       exit(exit_status);
-
-}
-
-/*
- * This is called from idle_call() whenever
- * pending_auth != NULL.
- *
- * It prompts user for a password.
- * Hitting ^D (EOF) would make this function
- * return 0 (Cancel).
- * Any other input would try to set linphone core
- * auth_password for the pending_auth, add the auth_info
- * and return 1.
- */
-int
-linphonec_prompt_for_auth_final(LinphoneCore *lc)
-{
-       char *input, *iptr;
-       char auth_prompt[256];
-#ifdef HAVE_READLINE
-       rl_hook_func_t *old_event_hook;
-#endif
-       LinphoneAuthInfo *pending_auth=auth_stack.elem[auth_stack.nitems-1];
-
-       snprintf(auth_prompt, 256, "Password for %s on %s: ",
-               pending_auth->username, pending_auth->realm);
-
-       printf("\n");
-#ifdef HAVE_READLINE
-       /*
-        * Disable event hook to avoid entering an
-        * infinite loop. This would prevent idle_call
-        * from being called during authentication reads.
-        * Note that it might be undesiderable...
-        */
-       old_event_hook=rl_event_hook;
-       rl_event_hook=NULL;
-#endif
-
-       while (1)
-       {
-               input=linphonec_readline(auth_prompt);
-
-               /*
-                * If EOF (^D) is sent you probably don't want
-                * to provide an auth password... should give up
-                * the operation, but there's no mechanism to
-                * send this info back to caller currently...
-                */
-               if ( ! input )
-               {
-                       printf("Cancel requested, but not implemented.\n");
-                       continue;
-               }
-
-               /* Strip blanks */
-               iptr=lpc_strip_blanks(input);
-
-               /*
-                * Only blanks, continue asking
-                */
-               if ( ! *iptr )
-               {
-                       free(input);
-                       continue;
-               }
-
-               /* Something typed, let's try */
-               break;
-       }
-
-       /*
-        * No check is done here to ensure password is correct.
-        * I guess password will be asked again later.
-        */
-       linphone_auth_info_set_passwd(pending_auth, input);
-       linphone_core_add_auth_info(lc, pending_auth);
-       --(auth_stack.nitems);
-#ifdef HAVE_READLINE
-       /*
-        * Reset line_buffer, to avoid the password
-        * to be used again from outer readline
-        */
-       rl_line_buffer[0]='\0';
-       rl_event_hook=old_event_hook;
-#endif
-       return 1;
-}
-
-void
-print_usage (int exit_status)
-{
-       fprintf (stdout, "\n\
-usage: linphonec [-c file] [-s sipaddr] [-a] [-V] [-d level ] [-l logfile]\n\
-       linphonec -v\n\
-\n\
-  -c  file             specify path of configuration file.\n\
-  -d  level            be verbose. 0 is no output. 6 is all output\n\
-  -l  logfile          specify the log file for your SIP phone\n\
-  -s  sipaddress       specify the sip call to do at startup\n\
-  -a                   enable auto answering for incoming calls\n\
-  -V                   enable video features globally (disabled by default)\n\
-  -C                   enable video capture only (disabled by default)\n\
-  -D                   enable video display only (disabled by default)\n\
-  -S                   show general state messages (disabled by default)\n\
-  -v or --version      display version and exits.\n");
-
-       exit(exit_status);
-}
-
-
-/*
- *
- * Called every second from main read loop.
- *
- * Will use the following globals:
- *
- *  - LinphoneCore linphonec
- *  - LPC_AUTH_STACK auth_stack;
- *
- */
-static int
-linphonec_idle_call ()
-{
-       LinphoneCore *opm=linphonec;
-
-       /* Uncomment the following to verify being called */
-       /* printf(".\n"); */
-
-       linphone_core_iterate(opm);
-       if (answer_call){
-               fprintf (stdout, "-------auto answering to call-------\n" );
-               linphone_core_accept_call(opm,NULL);
-               answer_call=FALSE;
-       }
-
-       if ( auth_stack.nitems )
-       {
-               /*
-                * Inhibit command completion
-                * during password prompts
-                */
-#ifdef HAVE_READLINE
-               rl_inhibit_completion=1;
-#endif
-               linphonec_prompt_for_auth_final(opm);
-#ifdef HAVE_READLINE
-               rl_inhibit_completion=0;
-#endif
-       }
-
-       return 0;
-}
-
-#ifdef HAVE_READLINE
-/*
- * Use globals:
- *
- *     - char *histfile_name (also sets this)
- *      - char *last_in_history (allocates it)
- */
-static int
-linphonec_initialize_readline()
-{
-       /*rl_bind_key('\t', rl_insert);*/
-
-       /* Allow conditional parsing of ~/.inputrc */
-       rl_readline_name = "linphonec";
-
-       /* Call idle_call() every second */
-       rl_set_keyboard_input_timeout(LPC_READLINE_TIMEOUT);
-       rl_event_hook=linphonec_idle_call;
-
-       /* Set history file and read it */
-       histfile_name = ms_strdup_printf ("%s/.linphonec_history",
-               getenv("HOME"));
-       read_history(histfile_name);
-
-       /* Initialized last_in_history cache*/
-       last_in_history[0] = '\0';
-
-       /* Register a completion function */
-       rl_attempted_completion_function = linephonec_readline_completion;
-
-       /* printf("Readline initialized.\n"); */
-        setlinebuf(stdout);
-       return 0;
-}
-
-/*
- * Uses globals:
- *
- *     - char *histfile_name (writes history to file and frees it)
- *     - char *last_in_history (frees it)
- *
- */
-static int
-linphonec_finish_readline()
-{
-
-       stifle_history(HISTSIZE);
-       write_history(histfile_name);
-       free(histfile_name);
-       histfile_name=NULL;
-       return 0;
-}
-
-#endif
-
-static void print_prompt(LinphoneCore *opm){
-#ifdef IDENTITY_AS_PROMPT
-       snprintf(prompt, PROMPT_MAX_LEN, "%s> ",
-               linphone_core_get_primary_contact(opm));
-#else
-       snprintf(prompt, PROMPT_MAX_LEN, "linphonec> ");
-#endif
-}
-
-static int
-linphonec_main_loop (LinphoneCore * opm, char * sipAddr)
-{
-       char buf[LINE_MAX_LEN]; /* auto call handling */
-       char *input;
-
-       print_prompt(opm);
-
-
-       /* auto call handling */
-       if (sipAddr != NULL )
-       {
-               snprintf (buf, sizeof(buf),"call %s", sipAddr);
-               linphonec_parse_command_line(linphonec, buf);
-       }
-
-       while (linphonec_running && (input=linphonec_readline(prompt)))
-       {
-               char *iptr; /* input and input pointer */
-               size_t input_len;
-
-               /* Strip blanks */
-               iptr=lpc_strip_blanks(input);
-
-               input_len = strlen(iptr);
-
-               /*
-                * Do nothing but release memory
-                * if only blanks are read
-                */
-               if ( ! input_len )
-               {
-                       free(input);
-                       continue;
-               }
-
-#ifdef HAVE_READLINE
-               /*
-                * Only add to history if not already
-                * last item in it, and only if the command
-                * doesn't start with a space (to allow for
-                * hiding passwords)
-                */
-               if ( iptr == input && strcmp(last_in_history, iptr) )
-               {
-                       strncpy(last_in_history,iptr,sizeof(last_in_history));
-                       last_in_history[sizeof(last_in_history)-1]='\0';
-                       add_history(iptr);
-               }
-#endif
-
-               linphonec_parse_command_line(linphonec, iptr);
-               linphonec_command_finished();
-               free(input);
-       }
-
-       return 0;
-}
-
-/*
- *  Parse command line switches
- *
- *  Use globals:
- *
- *     - int trace_level
- *     - char *logfile_name
- *     - char *configfile_name
- *     - char *sipAddr
- */
-static int
-linphonec_parse_cmdline(int argc, char **argv)
-{
-       int arg_num=1;
-
-       while (arg_num < argc)
-       {
-               int old_arg_num = arg_num;
-               if (strncmp ("-d", argv[arg_num], 2) == 0)
-               {
-                       arg_num++;
-                       if (arg_num < argc)
-                               trace_level = atoi (argv[arg_num]);
-                       else
-                               trace_level = 1;
-               }
-               else if (strncmp ("-l", argv[arg_num], 2) == 0)
-               {
-                       arg_num++;
-                       if (arg_num < argc)
-                               logfile_name = argv[arg_num];
-               }
-               else if (strncmp ("-c", argv[arg_num], 2) == 0)
-               {
-                       if ( ++arg_num >= argc ) print_usage(EXIT_FAILURE);
-#if !defined(_WIN32_WCE)
-                       if (access(argv[arg_num],F_OK)!=0 )
-                       {
-                               fprintf (stderr,
-                                       "Cannot open config file %s.\n",
-                                        argv[arg_num]);
-                               exit(EXIT_FAILURE);
-                       }
-#endif /*_WIN32_WCE*/
-                       snprintf(configfile_name, PATH_MAX, "%s", argv[arg_num]);
-               }
-               else if (strncmp ("-s", argv[arg_num], 2) == 0)
-               {
-                       arg_num++;
-                       if (arg_num < argc)
-                               sipAddr = argv[arg_num];
-               }
-                else if (strncmp ("-a", argv[arg_num], 2) == 0)
-                {
-                        auto_answer = TRUE;
-                }
-               else if (strncmp ("-C", argv[arg_num], 2) == 0)
-                {
-                        vcap_enabled = TRUE;
-                }
-               else if (strncmp ("-D", argv[arg_num], 2) == 0)
-                {
-                        display_enabled = TRUE;
-                }
-               else if (strncmp ("-V", argv[arg_num], 2) == 0)
-                {
-                        display_enabled = TRUE;
-                       vcap_enabled = TRUE;
-                       preview_enabled=TRUE;
-                }
-               else if ((strncmp ("-v", argv[arg_num], 2) == 0)
-                        ||
-                        (strncmp
-                         ("--version", argv[arg_num],
-                          strlen ("--version")) == 0))
-               {
-#if !defined(_WIN32_WCE)
-                       printf ("version: " LINPHONE_VERSION "\n");
-#endif
-                       exit (EXIT_SUCCESS);
-               }
-               else if (strncmp ("-S", argv[arg_num], 2) == 0)
-               {
-                       show_general_state = TRUE;
-               }
-               else if (strncmp ("--pipe", argv[arg_num], 6) == 0)
-               {
-                       unix_socket=1;
-               }
-               else if (old_arg_num == arg_num)
-               {
-                       fprintf (stderr, "ERROR: bad arguments\n");
-                       print_usage (EXIT_FAILURE);
-               }
-               arg_num++;
-       }
-
-       return 1;
-}
-
-/*
- * Up to version 1.2.1 linphone used ~/.linphonec for
- * CLI and ~/.gnome2/linphone for GUI as configuration file.
- * In newer version both interfaces will use ~/.linphonerc.
- *
- * This function helps transparently migrating from one
- * to the other layout using the following heuristic:
- *
- *     IF new_config EXISTS => do nothing
- *     ELSE IF old_cli_config EXISTS => copy to new_config
- *     ELSE IF old_gui_config EXISTS => copy to new_config
- *
- * Returns:
- *      0 if it did nothing
- *      1 if it migrated successfully
- *     -1 on error
- */
-static int
-handle_configfile_migration()
-{
-#if !defined(_WIN32_WCE)
-       char *old_cfg_gui;
-       char *old_cfg_cli;
-       char *new_cfg;
-#if !defined(_WIN32_WCE)
-       const char *home = getenv("HOME");
-#else
-       const char *home = ".";
-#endif /*_WIN32_WCE*/
-       new_cfg = ms_strdup_printf("%s/.linphonerc", home);
-
-       /*
-        * If the *NEW* configuration already exists
-        * do nothing.
-        */
-       if (access(new_cfg,F_OK)==0)
-       {
-               free(new_cfg);
-               return 0;
-       }
-
-       old_cfg_cli = ms_strdup_printf("%s/.linphonec", home);
-
-       /*
-        * If the *OLD* CLI configurations exist copy it to
-        * the new file and make it a symlink.
-        */
-       if (access(old_cfg_cli, F_OK)==0)
-       {
-               if ( ! copy_file(old_cfg_cli, new_cfg) )
-               {
-                       free(old_cfg_cli);
-                       free(new_cfg);
-                       return -1;
-               }
-               printf("%s copied to %s\n", old_cfg_cli, new_cfg);
-               free(old_cfg_cli);
-               free(new_cfg);
-               return 1;
-       }
-
-       free(old_cfg_cli);
-       old_cfg_gui = ms_strdup_printf("%s/.gnome2/linphone", home);
-
-       /*
-        * If the *OLD* GUI configurations exist copy it to
-        * the new file and make it a symlink.
-        */
-       if (access(old_cfg_gui, F_OK)==0)
-       {
-               if ( ! copy_file(old_cfg_gui, new_cfg) )
-               {
-                       exit(EXIT_FAILURE);
-                       free(old_cfg_gui);
-                       free(new_cfg);
-                       return -1;
-               }
-               printf("%s copied to %s\n", old_cfg_gui, new_cfg);
-               free(old_cfg_gui);
-               free(new_cfg);
-               return 1;
-       }
-
-       free(old_cfg_gui);
-       free(new_cfg);
-#endif /*_WIN32_WCE*/
-       return 0;
-}
-#if !defined(_WIN32_WCE)
-/*
- * Copy file "from" to file "to".
- * Destination file is truncated if existing.
- * Return 1 on success, 0 on error (printing an error).
- */
-static int
-copy_file(const char *from, const char *to)
-{
-       char message[256];
-       FILE *in, *out;
-       char buf[256];
-       size_t n;
-
-       /* Open "from" file for reading */
-       in=fopen(from, "r");
-       if ( in == NULL )
-       {
-               snprintf(message, 255, "Can't open %s for reading: %s\n",
-                       from, strerror(errno));
-               fprintf(stderr, "%s", message);
-               return 0;
-       }
-
-       /* Open "to" file for writing (will truncate existing files) */
-       out=fopen(to, "w");
-       if ( out == NULL )
-       {
-               snprintf(message, 255, "Can't open %s for writing: %s\n",
-                       to, strerror(errno));
-               fprintf(stderr, "%s", message);
-               return 0;
-       }
-
-       /* Copy data from "in" to "out" */
-       while ( (n=fread(buf, 1, sizeof buf, in)) > 0 )
-       {
-               if ( ! fwrite(buf, 1, n, out) )
-               {
-                       return 0;
-               }
-       }
-
-       fclose(in);
-       fclose(out);
-
-       return 1;
-}
-#endif /*_WIN32_WCE*/
-
-#ifdef HAVE_READLINE
-static char **
-linephonec_readline_completion(const char *text, int start, int end)
-{
-       char **matches = NULL;
-
-       /*
-        * Prevent readline from falling
-        * back to filename-completion
-        */
-       rl_attempted_completion_over=1;
-
-       /*
-        * If this is the start of line we complete with commands
-        */
-       if ( ! start )
-       {
-               return rl_completion_matches(text, linphonec_command_generator);
-       }
-
-       /*
-        * Otherwise, we should peek at command name
-        * or context to implement a smart completion.
-        * For example: "call .." could return
-        * friends' sip-uri as matches
-        */
-
-       return matches;
-}
-
-#endif
-
-/*
- * Strip blanks from a string.
- * Return a pointer into the provided string.
- * Modifies input adding a NULL at first
- * of trailing blanks.
- */
-char *
-lpc_strip_blanks(char *input)
-{
-       char *iptr;
-
-       /* Find first non-blank */
-       while(*input && isspace(*input)) ++input;
-
-       /* Find last non-blank */
-       iptr=input+strlen(input);
-       if (iptr > input) {
-               while(isspace(*--iptr));
-               *(iptr+1)='\0';
-       }
-
-       return input;
-}
-
-/****************************************************************************
- *
- * $Log: linphonec.c,v $
- * Revision 1.57  2007/11/14 13:40:27  smorlat
- * fix --disable-video build.
- *
- * Revision 1.56  2007/09/26 14:07:27  fixkowalski
- * - ANSI/C++ compilation issues with non-GCC compilers
- * - Faster epm-based packaging
- * - Ability to build & run on FC6's eXosip/osip
- *
- * Revision 1.55  2007/09/24 16:01:58  smorlat
- * fix bugs.
- *
- * Revision 1.54  2007/08/22 14:06:11  smorlat
- * authentication bugs fixed.
- *
- * Revision 1.53  2007/02/13 21:31:01  smorlat
- * added patch for general state.
- * new doxygen for oRTP
- * gtk-doc removed.
- *
- * Revision 1.52  2007/01/10 14:11:24  smorlat
- * add --video to linphonec.
- *
- * Revision 1.51  2006/08/21 12:49:59  smorlat
- * merged several little patches.
- *
- * Revision 1.50  2006/07/26 08:17:28  smorlat
- * fix bugs.
- *
- * Revision 1.49  2006/07/17 18:45:00  smorlat
- * support for several event queues in ortp.
- * glib dependency removed from coreapi/ and console/
- *
- * Revision 1.48  2006/04/09 12:45:32  smorlat
- * linphonec improvements.
- *
- * Revision 1.47  2006/04/04 08:04:34  smorlat
- * switched to mediastreamer2, most bugs fixed.
- *
- * Revision 1.46  2006/03/16 17:17:40  smorlat
- * fix various bugs.
- *
- * Revision 1.45  2006/03/12 21:48:31  smorlat
- * gcc-2.95 compile error fixed.
- * mediastreamer2 in progress
- *
- * Revision 1.44  2006/03/04 11:17:10  smorlat
- * mediastreamer2 in progress.
- *
- * Revision 1.43  2006/02/13 09:50:50  strk
- * fixed unused variable warning.
- *
- * Revision 1.42  2006/02/02 15:39:18  strk
- * - Added 'friend list' and 'friend call' commands
- * - Allowed for multiple DTFM send in a single line
- * - Added status-specific callback (bare version)
- *
- * Revision 1.41  2006/02/02 13:30:05  strk
- * - Padded vtable with missing callbacks
- *   (fixing a segfault on friends subscription)
- * - Handled friends notify (bare version)
- * - Handled text messages receive (bare version)
- * - Printed message on subscription request (bare version)
- *
- * Revision 1.40  2006/01/26 09:48:05  strk
- * Added limits.h include
- *
- * Revision 1.39  2006/01/26 02:11:01  strk
- * Removed unused variables, fixed copyright date
- *
- * Revision 1.38  2006/01/25 18:33:02  strk
- * Removed the -t swich, terminate_on_close made the default behaviour
- *
- * Revision 1.37  2006/01/20 14:12:34  strk
- * Added linphonec_init() and linphonec_finish() functions.
- * Handled SIGINT and SIGTERM to invoke linphonec_finish().
- * Handling of auto-termination (-t) moved to linphonec_finish().
- * Reworked main (input read) loop to not rely on 'terminate'
- * and 'run' variable (dropped). configfile_name allocated on stack
- * using PATH_MAX limit. Changed print_usage signature to allow
- * for an exit_status specification.
- *
- * Revision 1.36  2006/01/18 09:25:32  strk
- * Command completion inhibited in proxy addition and auth request prompts.
- * Avoided use of readline's internal filename completion.
- *
- * Revision 1.35  2006/01/14 13:29:32  strk
- * Reworked commands interface to use a table structure,
- * used by command line parser and help function.
- * Implemented first level of completion (commands).
- * Added notification of invalid "answer" and "terminate"
- * commands (no incoming call, no active call).
- * Forbidden "call" intialization when a call is already active.
- * Cleaned up all commands, adding more feedback and error checks.
- *
- * Revision 1.34  2006/01/13 13:00:29  strk
- * Added linphonec.h. Code layout change (added comments, forward decl,
- * globals on top, copyright notices and Logs). Handled out-of-memory
- * condition on history management. Removed assumption on sizeof(char).
- * Fixed bug in authentication prompt (introduced by readline).
- * Added support for multiple authentication requests (up to MAX_PENDING_AUTH).
- *
- *
- ****************************************************************************/
-
diff --git a/linphone/console/linphonec.h b/linphone/console/linphonec.h
deleted file mode 100644 (file)
index 732c99a..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-/****************************************************************************
- *
- *  $Id: linphonec.h,v 1.3 2006/01/20 14:12:34 strk Exp $
- *
- *  Copyright (C) 2005  Sandro Santilli <strk@keybit.net>
- *
- ****************************************************************************
- *
- *  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 Library General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- ****************************************************************************/
-
-#ifndef LINPHONEC_H
-#define LINPHONEC_H 1
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#ifdef HAVE_READLINE_H
-#include <readline.h>
-#define HAVE_READLINE
-#else
-#ifdef HAVE_READLINE_READLINE_H
-#include <readline/readline.h>
-#define HAVE_READLINE
-#endif
-#endif
-#ifdef HAVE_HISTORY_H
-#include <history.h>
-#else
-#ifdef HAVE_READLINE_HISTORY_H
-#include <readline/history.h>
-#endif
-#endif
-
-
-/**************************************************************************
- *
- * Compile-time defines
- *
- **************************************************************************/
-
-#define HISTSIZE 500           /* how many lines of input history */
-#define PROMPT_MAX_LEN 256     /* max len of prompt string */
-#define LINE_MAX_LEN 256       /* really needed ? */
-
-/*
- * Define this to have your primary contact
- * as the prompt string
- */
-/* #define IDENTITY_AS_PROMPT 1 */
-
-/*
- * Time between calls to linphonec_idle_call during main
- * input read loop in microseconds.
- */
-#define LPC_READLINE_TIMEOUT 1000000
-
-/*
- * Filename of linphonec history
- */
-#define LPC_HIST_FILE "~/.linphonec_history"
-
-/*
- * Maximum number of pending authentications
- */
-#define MAX_PENDING_AUTH 8
-
-/**************************************************************************
- *
- *  Types
- *
- **************************************************************************/
-
-/*
- * A structure which contains information on the commands this program
- * can understand.
- */
-typedef int (*lpc_cmd_handler)(LinphoneCore *, char *);
-typedef struct {
-       char *name;             /* User printable name of the function. */
-       lpc_cmd_handler func;   /* Function to call to do the job. */
-       char *help;             /* Short help for this function.  */
-       char *doc;              /* Long description.  */
-} LPC_COMMAND;
-
-/***************************************************************************
- *
- *  Forward declarations
- *
- ***************************************************************************/
-
-extern int linphonec_parse_command_line(LinphoneCore *lc, char *cl);
-extern char *linphonec_command_generator(const char *text, int state);
-void linphonec_main_loop_exit();
-extern void linphonec_finish(int exit_status);
-extern char *linphonec_readline(char *prompt);
-void linphonec_set_autoanswer(bool_t enabled);
-bool_t linphonec_get_autoanswer();
-void linphonec_command_finished(void);
-void linphonec_set_caller(const char *caller);
-
-#endif /* def LINPHONEC_H */
-
-/****************************************************************************
- *
- * $Log: linphonec.h,v $
- * Revision 1.3  2006/01/20 14:12:34  strk
- * Added linphonec_init() and linphonec_finish() functions.
- * Handled SIGINT and SIGTERM to invoke linphonec_finish().
- * Handling of auto-termination (-t) moved to linphonec_finish().
- * Reworked main (input read) loop to not rely on 'terminate'
- * and 'run' variable (dropped). configfile_name allocated on stack
- * using PATH_MAX limit. Changed print_usage signature to allow
- * for an exit_status specification.
- *
- * Revision 1.2  2006/01/14 13:29:32  strk
- * Reworked commands interface to use a table structure,
- * used by command line parser and help function.
- * Implemented first level of completion (commands).
- * Added notification of invalid "answer" and "terminate"
- * commands (no incoming call, no active call).
- * Forbidden "call" intialization when a call is already active.
- * Cleaned up all commands, adding more feedback and error checks.
- *
- * Revision 1.1  2006/01/13 13:00:29  strk
- * Added linphonec.h. Code layout change (added comments, forward decl,
- * globals on top, copyright notices and Logs). Handled out-of-memory
- * condition on history management. Removed assumption on sizeof(char).
- * Fixed bug in authentication prompt (introduced by readline).
- * Added support for multiple authentication requests (up to MAX_PENDING_AUTH).
- *
- *
- ****************************************************************************/
diff --git a/linphone/console/shell.c b/linphone/console/shell.c
deleted file mode 100644 (file)
index 0f09064..0000000
+++ /dev/null
@@ -1,353 +0,0 @@
-/****************************************************************************
- *  Copyright (C) 2009  Simon MORLAT <simon.morlat@linphone.org>
- *
- ****************************************************************************
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- *
- ****************************************************************************/
-
-
-#include <stdio.h>
-#include <stdlib.h>
-
-
-#ifdef WIN32
-#include <windows.h>
-#include <winbase.h>
-#include <ws2tcpip.h>
-#include <ctype.h>
-#include <conio.h>
-#else
-#include <sys/socket.h>
-#include <netdb.h>
-#include <sys/un.h>
-
-#endif
-
-#include "ortp/ortp.h"
-
-#define DEFAULT_REPLY_SIZE 4096
-
-#define STATUS_REGISTERED (1<<0)
-#define STATUS_REGISTERING (1<<1)
-#define STATUS_DIALING (1<<2)
-#define STATUS_AUTOANSWER (1<<3)
-#define STATUS_IN_CONNECTED (1<<4) /* incoming call accepted */
-#define STATUS_OUT_CONNECTED (1<<5) /*outgoing call accepted */
-
-
-static int make_status_value(const char *status_string){
-       int ret=0;
-       if (strstr(status_string,"registered, identity=")){
-               ret|=STATUS_REGISTERED;
-       }
-       if (strstr(status_string,"registered=-1")){
-               ret|=STATUS_REGISTERING;
-       }
-       if (strstr(status_string,"autoanswer=1")){
-               ret|=STATUS_AUTOANSWER;
-       }
-       if (strstr(status_string,"dialing")){
-               ret|=STATUS_DIALING;
-       }
-       if (strstr(status_string,"Call out")){
-               ret|=STATUS_OUT_CONNECTED;
-       }
-       if (strstr(status_string,"hook=answered")){
-               ret|=STATUS_IN_CONNECTED;
-       }
-       return ret;
-}
-
-static int send_command(const char *command, char *reply, int reply_len, int print_errors){
-       ortp_pipe_t pp;
-       int i;
-       int err;
-       char path[128];
-#ifndef WIN32
-       snprintf(path,sizeof(path)-1,"linphonec-%i",getuid());
-#else
-       {
-               char username[128];
-               DWORD size=sizeof(username)-1;
-               GetUserName(username,&size);
-               snprintf(path,sizeof(path)-1,"linphonec-%s",username);
-       }
-#endif
-       if ((pp=ortp_client_pipe_connect(path))==ORTP_PIPE_INVALID){
-               if (print_errors) fprintf(stderr,"ERROR: Failed to connect pipe: %s\n",strerror(errno));
-               return -1;
-       }
-       if (ortp_pipe_write(pp,(uint8_t*)command,strlen(command))==-1){
-               if (print_errors) fprintf(stderr,"ERROR: Fail to send command to remote linphonec\n");
-               ortp_client_pipe_close(pp);
-               return -1;
-       }
-       /*wait for replies */
-       i=0;
-       while ((err=ortp_pipe_read(pp,(uint8_t*)&reply[i],reply_len-i-1))>0){
-               i+=err;
-       }
-       reply[i]='\0';
-       ortp_client_pipe_close(pp);
-       return 0;
-}
-
-static void print_usage(void){
-       fprintf(stderr,"Usage:\nlinphonecsh <action> [arguments]\n"
-                       "where action is one of\n"
-                       "\tinit\t\t: spawn a linphonec daemon (first step to make other actions)\n"
-                       "\t\t\tfollowed by the arguments sent to linphonec\n"
-                       "\tgeneric\t\t: sends a generic command to the running linphonec daemon\n"
-                       "\t\t\tfollowed by the generic command surrounded by quotes,\n\t\t\t for example \"call sip:joe@example.net\"\n"
-                       "\tregister\t: register; arguments are \n\t\t\t--host <host>\n\t\t\t--username <username>\n\t\t\t--password <password>\n"
-                       "\tunregister\t: unregister\n"
-                       "\tdial\t\t: dial <sip uri or number>\n"
-                       "\tstatus\t\t: can be 'status register', 'status autoanswer' or 'status hook'\n"
-                       "\tsoundcard\t: can be 'soundcard capture', 'soundcard playback', 'soundcard ring',\n"
-                       "\t\t\t followed by an optional number representing the index of the soundcard,\n"
-                       "\t\t\t in which case the soundcard is set instead of just read.\n"
-                       "\texit\t\t: make the linphonec daemon to exit.\n"
-       );
-       exit(-1);
-}
-
-#define MAX_ARGS 10
-
-#ifndef WIN32
-static void spawn_linphonec(int argc, char *argv[]){
-       char * args[10];
-       int i,j;
-       pid_t pid;
-       j=0;
-       args[j++]="linphonec";
-       args[j++]="--pipe";
-       args[j++]="-c";
-       args[j++]="/dev/null";
-       for(i=0;i<argc;++i){
-               args[j++]=argv[i];
-       }
-       args[j++]=NULL;
-
-       pid = vfork();
-       if (pid < 0){
-               fprintf(stderr,"Could not fork\n");
-               exit(-1);
-       }
-       if (pid == 0) {
-               int fd;
-               /*we are the new process*/
-               setsid();
-               
-               fd = open("/dev/null", O_RDWR);
-               if (fd==-1){
-                       fprintf(stderr,"Could not open /dev/null\n");
-                       exit(-1);
-               }
-               dup2(fd, 0);
-               dup2(fd, 1);
-               dup2(fd, 2);
-               close(fd);
-               
-               if (execvp("linphonec",args)==-1){
-                       fprintf(stderr,"Fail to spawn linphonec: %s\n",strerror(errno));
-                       exit(-1);
-               }
-       }
-}
-#else
-
-static void spawn_linphonec(int argc, char *argv[]){
-       PROCESS_INFORMATION pinfo;
-       STARTUPINFO si;
-       ZeroMemory( &si, sizeof(si) );
-       si.cb = sizeof(si);
-       ZeroMemory( &pinfo, sizeof(pinfo) );
-
-
-       BOOL ret=CreateProcess(NULL,"linphoned.exe --pipe -c NUL",
-               NULL,
-               NULL,
-               FALSE,
-               0,
-               NULL,
-               NULL,
-               &si,
-               &pinfo);
-       if (!ret){
-               fprintf(stderr,"Spawning of linphonec.exe failed.\n");
-       }else{
-               WaitForInputIdle(pinfo.hProcess,1000);
-       }
-}
-
-#endif
-
-static int send_generic_command(const char *command, int print_result){
-       char reply[DEFAULT_REPLY_SIZE];
-       int err;
-       err=send_command(command,reply,sizeof(reply),print_result);
-       if (err==0 && print_result) {
-               printf("%s",reply);
-               fflush(stdout);
-       }
-       return err;
-}
-
-static int register_execute(int argc, char *argv[]){
-       char cmd[512];
-       char *username=NULL;
-       char *host=NULL;
-       char *passwd=NULL;
-       int i;
-       for(i=0;i<argc;++i){
-               if (strcmp(argv[i],"--host")==0){
-                       i++;
-                       if (i<argc){
-                               host=argv[i];
-                       }else print_usage();
-               }else if (strcmp(argv[i],"--username")==0){
-                       i++;
-                       if (i<argc){
-                               username=argv[i];
-                       }else print_usage();
-               }else if (strcmp(argv[i],"--password")==0){
-                       i++;
-                       if (i<argc){
-                               passwd=argv[i];
-                       }else print_usage();
-               }else print_usage();
-       }
-       if (username==NULL) {
-               fprintf(stderr,"Missing --username\n");
-               print_usage();
-       }
-       if (host==NULL) {
-               fprintf(stderr,"Missing --host\n");
-               print_usage();
-       }
-       if (passwd) snprintf(cmd,sizeof(cmd),"register sip:%s@%s sip:%s %s",username,host,host,passwd);
-       else snprintf(cmd,sizeof(cmd),"register sip:%s@%s sip:%s",username,host,host);
-       return send_generic_command(cmd,TRUE);
-}
-
-static int unregister_execute(int argc, char *argv[]){
-       return send_generic_command("unregister",FALSE);
-}
-
-
-static int dial_execute(int argc, char *argv[]){
-       char cmd[512];
-       if (argc==1){
-               snprintf(cmd,sizeof(cmd),"call %s",argv[0]);
-               return send_generic_command(cmd,TRUE);
-       }else{
-               print_usage();
-       }
-       return -1;
-}
-
-static int status_execute(int argc, char *argv[]){
-       char cmd[512];
-       char reply[DEFAULT_REPLY_SIZE];
-       int err;
-       
-       if (argc==1){
-               snprintf(cmd,sizeof(cmd),"status %s",argv[0]);
-               err=send_command(cmd,reply,sizeof(reply),TRUE);
-               if (err==0) {
-                       printf("%s",reply);
-                       err=make_status_value(reply);
-               }
-               return err;
-       }else{
-               print_usage();
-       }
-       return -1;
-}
-
-static int parse_card_index(const char *reply){
-       int index=-1;
-       reply=strstr(reply,"device #");
-       if (!reply || sscanf(reply,"device #%i",&index)!=1){
-               fprintf(stderr,"Error while parsing linphonec daemon output !\n");
-       }
-       return index;
-}
-
-static int soundcard_execute(int argc, char *argv[]){
-       char cmd[512];
-       char reply[DEFAULT_REPLY_SIZE];
-       int err;
-       if (argc==1){
-               snprintf(cmd,sizeof(cmd),"soundcard %s",argv[0]);
-               err=send_command(cmd,reply,sizeof(reply),TRUE);
-               if (err==0) {
-                       printf("%s",reply);
-                       return parse_card_index(reply);
-               }
-       }else if (argc==2){/*setting a soundcard */
-               snprintf(cmd,sizeof(cmd),"soundcard %s %s",argv[0],argv[1]);
-               err=send_command(cmd,reply,sizeof(reply),TRUE);
-               if (err==0) {
-                       printf("%s",reply);
-                       return 0;
-               }
-       }else{
-               print_usage();
-       }
-       return -1;
-}
-
-int main(int argc, char *argv[]){
-       int argi;
-       if (argc<2){
-               print_usage();
-               return -1;
-       }
-       ortp_init();
-       for(argi=1;argi<argc;++argi){
-               if (strcmp(argv[argi],"init")==0){
-                       /*check if there is running instance*/
-                       if (send_generic_command("help",0)==0){
-                               fprintf(stderr,"A running linphonec has been found, not spawning a second one.\n");
-                               return 0;
-                       }
-                       spawn_linphonec(argc-argi-1,&argv[argi+1]);
-                       return 0;
-               }else if (strcmp(argv[argi],"generic")==0){
-                       if (argi+1<argc){
-                               return send_generic_command(argv[argi+1],1);
-                       }else print_usage();
-               }else if (strcmp(argv[argi],"register")==0){
-                       return register_execute(argc-argi-1,&argv[argi+1]);
-               }else if (strcmp(argv[argi],"unregister")==0){
-                       return unregister_execute(argc-argi-1,&argv[argi+1]);
-               }else if (strcmp(argv[argi],"dial")==0){
-                       return dial_execute(argc-argi-1,&argv[argi+1]);
-               }else if (strcmp(argv[argi],"hangup")==0){
-                       send_generic_command("terminate",FALSE);
-                       send_generic_command("duration",TRUE);
-               }else if (strcmp(argv[argi],"status")==0){
-                       return status_execute(argc-argi-1,&argv[argi+1]);
-               }else if (strcmp(argv[argi],"soundcard")==0){
-                       return soundcard_execute(argc-argi-1,&argv[argi+1]);
-               }else if (strcmp(argv[argi],"exit")==0){
-                       return send_generic_command("quit",TRUE);
-               }else print_usage();
-       }
-       return 0;
-}
diff --git a/linphone/console/sipomatic.c b/linphone/console/sipomatic.c
deleted file mode 100644 (file)
index 9e053b2..0000000
+++ /dev/null
@@ -1,470 +0,0 @@
-/***************************************************************************
-                          linphone  - sipomatic.c
-This is a test program for linphone. It acts as a sip server and answers to linphone's
-call.
-                             -------------------
-    begin                : ven mar  30
-    copyright            : (C) 2001 by Simon MORLAT
-    email                : simon.morlat@linphone.org
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
-
-#include <signal.h>
-#include "sipomatic.h"
-#include <eXosip2/eXosip.h>
-
-int run_cond=1;
-
-Sipomatic sipomatic;
-
-int sipomatic_accept_audio_offer(sdp_context_t *ctx,sdp_payload_t *payload);
-int sipomatic_accept_video_offer(sdp_context_t *ctx,sdp_payload_t *payload);
-
-
-sdp_handler_t sipomatic_sdp_handler={
-       sipomatic_accept_audio_offer,   /*from remote sdp */
-       sipomatic_accept_video_offer,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-};
-
-void stop_handler(int signum)
-{
-       run_cond=0;
-}
-
-void sipomatic_process_event(Sipomatic *obj,eXosip_event_t *ev)
-{
-       Call *call;
-       switch(ev->type){
-               case EXOSIP_CALL_INVITE:
-                       call_new(obj,ev);
-                       break;
-               case EXOSIP_CALL_CLOSED:
-               case EXOSIP_CALL_CANCELLED:
-                       call=sipomatic_find_call(obj,ev->did);
-                       if (call==NULL){
-                               ms_warning("Could not find call with did %i !",ev->did);
-                       }
-                       call_release(call);
-                       call_destroy(call);
-                       break;
-               default:
-                       break;
-       }
-       eXosip_event_free(ev);
-}
-
-
-void endoffile_cb(void *ud, unsigned int ev,void * arg){
-       Call*call=(Call*)ud;
-       call->eof=1;
-}
-
-void call_accept(Call *call)
-{
-       sdp_context_t *ctx;
-       PayloadType *payload;
-       char *hellofile;
-       static int call_count=0;        
-       char record_file[250];
-       osip_message_t *msg=NULL;
-       sprintf(record_file,"/tmp/sipomatic%i.wav",call_count);
-
-       ctx=call->sdpc;
-       payload=rtp_profile_get_payload(call->profile,call->audio.pt);
-       if (strcmp(payload->mime_type,"telephone-event")==0){
-               /* telephone-event is not enough to accept a call */
-               ms_message("Cannot accept call with only telephone-event.\n");
-               eXosip_call_send_answer(call->did,415,NULL);
-               call->state=CALL_STATE_FINISHED;
-               return;
-       }
-       if (payload->clock_rate==16000){
-               hellofile=call->root->file_path16000hz;
-       }else hellofile=call->root->file_path8000hz;
-       eXosip_call_build_answer(call->tid,200,&msg);
-       osip_message_set_content_type(msg,"application/sdp");
-       osip_message_set_body(msg,call->sdpc->answerstr,strlen(call->sdpc->answerstr));
-       eXosip_call_send_answer(call->tid,200,msg);
-       call->audio_stream=audio_stream_new(call->audio.localport,call->root->ipv6);
-       audio_stream_start_with_files(call->audio_stream, call->profile,
-                               call->audio.remaddr,call->audio.remoteport,call->audio.remoteport+1,
-                                call->audio.pt,20,hellofile,record_file);
-       call_count++;
-#ifdef VIDEO_ENABLED
-       if (call->video.remoteport!=0){
-               video_stream_send_only_start(call->video_stream,call->profile,
-                       call->video.remaddr,call->video.remoteport,call->video.remoteport+1,call->video.pt, 60, 
-                       ms_web_cam_manager_get_default_cam(ms_web_cam_manager_get()));
-       }
-#endif
-       call->time=time(NULL);
-       call->state=CALL_STATE_RUNNING;
-       ms_filter_set_notify_callback(call->audio_stream->soundread,endoffile_cb,(void*)call);
-}
-
-
-PayloadType * sipomatic_payload_is_supported(sdp_payload_t *payload,RtpProfile *local_profile,RtpProfile *dialog_profile)
-{
-       int localpt;
-       if (payload->a_rtpmap!=NULL){
-               localpt=rtp_profile_get_payload_number_from_rtpmap(local_profile,payload->a_rtpmap);
-       }else{
-               localpt=payload->pt;
-               ms_warning("payload has no rtpmap.");
-       }
-       
-       if (localpt>=0){
-               /* this payload is supported in our local rtp profile, so add it to the dialog rtp
-               profile */
-               PayloadType *rtppayload;
-               rtppayload=rtp_profile_get_payload(local_profile,localpt);
-               if (rtppayload==NULL) return NULL;
-               /*check if we have the appropriate coder/decoder for this payload */
-               if (strcmp(rtppayload->mime_type,"telephone-event")!=0) {
-                       if (!ms_filter_codec_supported(rtppayload->mime_type)) {
-                               ms_message("Codec %s is not supported.", rtppayload->mime_type);
-                               return NULL;
-                       }
-               }
-               rtppayload=payload_type_clone(rtppayload);
-               rtp_profile_set_payload(dialog_profile,payload->pt,rtppayload);
-               /* add to the rtp payload type some other parameters (bandwidth) */
-               if (payload->b_as_bandwidth!=0) rtppayload->normal_bitrate=payload->b_as_bandwidth*1000;
-               if (payload->a_fmtp!=NULL)
-                       payload_type_set_send_fmtp(rtppayload,payload->a_fmtp);
-               if (strcasecmp(rtppayload->mime_type,"iLBC")==0){
-                       /*default to 30 ms mode */
-                       payload->a_fmtp="ptime=30";
-                       payload_type_set_recv_fmtp(rtppayload,payload->a_fmtp);
-               }
-               return rtppayload;
-       }
-       return NULL;
-}
-
-int sipomatic_accept_audio_offer(sdp_context_t *ctx,sdp_payload_t *payload)
-{
-       static int audioport=8000;
-       Call *call=(Call*)sdp_context_get_user_pointer(ctx);
-       PayloadType *supported;
-       struct stream_params *params=&call->audio;
-       
-       /* see if this codec is supported in our local rtp profile*/
-       supported=sipomatic_payload_is_supported(payload,&av_profile,call->profile);
-       if (supported==NULL) {
-               ms_message("Refusing codec %i (%s)",payload->pt,payload->a_rtpmap);
-               return -1;
-       }
-       if (strcmp(supported->mime_type,"telephone-event")==0) return 0;
-       if (params->ncodecs==0 ){
-               /* this is the first codec we may accept*/
-               params->localport=payload->localport=audioport;
-               params->remoteport=payload->remoteport;
-               params->line=payload->line;
-               params->pt=payload->pt; /* remember the first payload accepted */
-               params->remaddr=payload->c_addr;
-               params->ncodecs++;
-               audioport+=4;
-       }else{
-               /* refuse all other audio lines*/
-               if(params->line!=payload->line) return -1;
-       }
-       return 0;
-}
-
-int sipomatic_accept_video_offer(sdp_context_t *ctx,sdp_payload_t *payload)
-{
-#ifdef VIDEO_ENABLED
-       static int videoport=80000;
-       Call *call=(Call*)sdp_context_get_user_pointer(ctx);
-       PayloadType *supported;
-       struct stream_params *params=&call->video;
-       
-       /* see if this codec is supported in our local rtp profile*/
-       supported=sipomatic_payload_is_supported(payload,&av_profile,call->profile);
-       if (supported==NULL) {
-               ms_message("Refusing video codec %i (%s)",payload->pt,payload->a_rtpmap);
-               return -1;
-       }
-       if (params->ncodecs==0 ){
-               /* this is the first codec we may accept*/
-               params->localport=payload->localport=videoport;
-               params->remoteport=payload->remoteport;
-               params->line=payload->line;
-               params->pt=payload->pt; /* remember the first payload accepted */
-               params->remaddr=payload->c_addr;
-               params->ncodecs++;
-               videoport+=4;
-       }else{
-               /* refuse all other video lines*/
-               if(params->line!=payload->line) return -1;
-       }
-       return 0;
-#else
-       return -1;
-#endif
-}
-
-void sipomatic_init(Sipomatic *obj, char *url, bool_t ipv6)
-{
-       osip_uri_t *uri=NULL;
-       int port=5064;
-       
-       obj->ipv6=ipv6;
-       
-       if (url==NULL){
-               url=getenv("SIPOMATIC_URL");
-               if (url==NULL){
-                       if (ipv6) url="sip:robot@[::1]:5064";
-                       else url="sip:robot@127.0.0.1:5064";
-               }
-       }
-       if (url!=NULL) {
-               osip_uri_init(&uri);
-               if (osip_uri_parse(uri,url)==0){
-                       if (uri->port!=NULL) port=atoi(uri->port);
-               }else{
-                       ms_warning("Invalid identity uri:%s",url);
-               }       
-       }
-       ms_message("Starting using url %s",url);
-       ms_mutex_init(&obj->lock,NULL);
-       obj->calls=NULL;
-       obj->acceptance_time=5;
-       obj->max_call_time=300;
-       obj->file_path8000hz=ms_strdup_printf("%s/%s",PACKAGE_SOUND_DIR,ANNOUCE_FILE8000HZ);
-       obj->file_path16000hz=ms_strdup_printf("%s/%s",PACKAGE_SOUND_DIR,ANNOUCE_FILE16000HZ);
-       osip_trace_initialize(OSIP_INFO1,stdout);
-       osip_trace_initialize(OSIP_INFO2,stdout);
-       osip_trace_initialize(OSIP_WARNING,stdout);
-       osip_trace_initialize(OSIP_ERROR,stdout);
-       osip_trace_initialize(OSIP_BUG,stdout);
-       osip_trace_initialize(OSIP_FATAL,stdout);
-       osip_trace_enable_level(OSIP_INFO1);
-       osip_trace_enable_level(OSIP_INFO2);
-       osip_trace_enable_level(OSIP_WARNING);
-       osip_trace_enable_level(OSIP_ERROR);
-       osip_trace_enable_level(OSIP_BUG);
-       osip_trace_enable_level(OSIP_FATAL);
-       eXosip_init();
-       eXosip_set_user_agent("sipomatic-" LINPHONE_VERSION "/eXosip");
-       eXosip_listen_addr(IPPROTO_UDP,NULL,port,ipv6 ? AF_INET6 : AF_INET,0);
-}
-
-void sipomatic_uninit(Sipomatic *obj)
-{
-       ms_mutex_destroy(&obj->lock);
-       eXosip_quit();
-}
-
-void sipomatic_iterate(Sipomatic *obj)
-{
-       MSList *elem;
-       MSList *to_be_destroyed=NULL;
-       Call *call;
-       double elapsed;
-       eXosip_event_t *ev;
-
-       while((ev=eXosip_event_wait(0,0))!=NULL){
-               sipomatic_process_event(obj,ev);
-       }
-       elem=obj->calls;
-       while(elem!=NULL){
-               call=(Call*)elem->data;
-               elapsed=time(NULL)-call->time;
-               switch(call->state){
-                       case CALL_STATE_INIT:
-                               if (elapsed>obj->acceptance_time){
-                                       call_accept(call);
-                               }
-                       break;
-                       case CALL_STATE_RUNNING:
-                               if (elapsed>obj->max_call_time || call->eof){
-                                       call_release(call);
-                                       to_be_destroyed=ms_list_append(to_be_destroyed,call);
-                               }
-                       break;
-               }
-               elem=ms_list_next(elem);
-       }
-       for(;to_be_destroyed!=NULL; to_be_destroyed=ms_list_next(to_be_destroyed)){
-               call_destroy((Call*)to_be_destroyed->data);
-       }
-}
-
-
-Call* sipomatic_find_call(Sipomatic *obj,int did)
-{
-       MSList *it;
-       Call *call=NULL;
-       for (it=obj->calls;it!=NULL;it=ms_list_next(it)){
-               call=(Call*)it->data;
-               if ( call->did==did) return call;
-       }
-       return call;
-}
-
-
-Call * call_new(Sipomatic *root, eXosip_event_t *ev)
-{
-       Call *obj;
-       char *sdpans;
-       int status;
-       sdp_message_t *sdp;
-       sdp_context_t *sdpc;
-       
-       sdp=eXosip_get_sdp_info(ev->request);
-       sdpc=sdp_handler_create_context(&sipomatic_sdp_handler,NULL,"sipomatic",NULL);
-       obj=ms_new0(Call,1);
-       obj->profile=rtp_profile_new("remote");
-       eXosip_call_send_answer(ev->tid,100,NULL);
-       sdp_context_set_user_pointer(sdpc,obj);
-       sdpans=sdp_context_get_answer(sdpc,sdp);
-       if (sdpans!=NULL){
-               eXosip_call_send_answer(ev->tid,180,NULL);
-               
-       }else{
-               status=sdp_context_get_status(sdpc);
-               eXosip_call_send_answer(ev->tid,status,NULL);
-               sdp_context_free(sdpc);
-               rtp_profile_destroy(obj->profile);
-               ms_free(obj);
-               return NULL;
-       }
-       obj->sdpc=sdpc;
-       obj->did=ev->did;
-       obj->tid=ev->tid;
-       obj->time=time(NULL);
-       obj->audio_stream=NULL;
-       obj->state=CALL_STATE_INIT;
-       obj->eof=0;
-       obj->root=root;
-       root->calls=ms_list_append(root->calls,obj);
-       return obj;
-}
-
-void call_release(Call *call)
-{
-       eXosip_call_terminate(0,call->did);
-       if (call->audio_stream!=NULL) audio_stream_stop(call->audio_stream);
-#ifdef VIDEO_ENABLED
-       if (call->video_stream!=NULL) video_stream_send_only_stop(call->video_stream);
-#endif
-       call->state=CALL_STATE_FINISHED;
-}
-
-void call_destroy(Call *obj)
-{
-       obj->root->calls=ms_list_remove(obj->root->calls,obj);
-       rtp_profile_destroy(obj->profile);
-       sdp_context_free(obj->sdpc);
-       ms_free(obj);
-}
-
-void sipomatic_set_annouce_file(Sipomatic *obj, char *file)
-{
-       if (obj->file_path8000hz!=NULL){
-               ms_free(obj->file_path8000hz);
-       }
-       obj->file_path8000hz=ms_strdup(file);
-}
-
-
-void display_help()
-{
-       printf("sipomatic [-u sip-url] [-f annouce-file ] [-s port]\n"
-                       "sipomatic -h or --help: display this help.\n"
-                       "sipomatic -v or --version: display version information.\n"
-                       "       -u sip-url : specify the sip url sipomatic listens and answers.\n"
-                       "       -f annouce-file : set the annouce file (16 bit raw format,8000Hz)\n"
-                       " -6 enable ipv6 network usage\n");
-       exit(0);
-}
-
-char *getarg(int argc, char*argv[], int i)
-{
-       if (i<argc){
-               return argv[i];
-       }
-       else display_help();
-       return NULL;
-}
-
-int main(int argc, char *argv[])
-{
-       int sendport=5070;
-       char *file=NULL;
-       char *url=NULL;
-       bool_t ipv6=FALSE;
-       int i;
-       
-       for(i=1;i<argc;i++){
-               if ( (strcmp(argv[i],"-h")==0) || (strcmp(argv[i],"--help")==0) ){
-                       display_help();
-                       continue;
-               }
-               if ( (strcmp(argv[i],"-v")==0) || (strcmp(argv[i],"--version")==0) ){
-                       printf("version: " LINPHONE_VERSION "\n");
-                       exit(0);
-               }
-               if (strcmp(argv[i],"-u")==0){
-                       i++;
-                       url=getarg(argc,argv,i);
-                       continue;
-               }
-               if (strcmp(argv[i],"-s")==0){
-                       char *port;
-                       i++;
-                       port=getarg(argc,argv,i);
-                       sendport=atoi(port);
-                       continue;
-               }
-               if (strcmp(argv[i],"-f")==0){
-                       i++;
-                       file=getarg(argc,argv,i);
-                       continue;
-               }
-               if (strcmp(argv[i],"-6")==0){
-                       ipv6=TRUE;
-                       continue;
-               }
-       }
-       
-       signal(SIGINT,stop_handler);
-       ortp_init();
-       ms_init();
-       ortp_set_log_level_mask(ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
-       rtp_profile_set_payload(&av_profile,115,&payload_type_lpc1015);
-       rtp_profile_set_payload(&av_profile,110,&payload_type_speex_nb);
-       rtp_profile_set_payload(&av_profile,111,&payload_type_speex_wb);
-       rtp_profile_set_payload(&av_profile,112,&payload_type_ilbc);
-       rtp_profile_set_payload(&av_profile,101,&payload_type_telephone_event);
-       rtp_profile_set_payload(&av_profile,116,&payload_type_truespeech);
-       rtp_profile_set_payload(&av_profile,98,&payload_type_h263_1998);
-       
-       sipomatic_init(&sipomatic,url,ipv6);
-       if (file!=NULL) sipomatic_set_annouce_file(&sipomatic,file);
-       
-       while (run_cond){
-               sipomatic_iterate(&sipomatic);
-#ifndef WIN32
-               usleep(20000);
-#else
-               Sleep(20);
-#endif
-       }
-       
-       return(0);
-}
diff --git a/linphone/console/sipomatic.h b/linphone/console/sipomatic.h
deleted file mode 100644 (file)
index 6253233..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/***************************************************************************
-                          linphone  - sipomatic.c
-This is a test program for linphone. It acts as a sip server and answers to linphone's
-call.
-                             -------------------
-    begin                : ven mar  30
-    copyright            : (C) 2001 by Simon MORLAT
-    email                : simon.morlat@free.fr
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   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.                                   *
- *                                                                         *
- ***************************************************************************/
-
-
-#include "../coreapi/linphonecore.h"
-#include "../coreapi/sdphandler.h"
-#include <eXosip2/eXosip.h>
-#undef PACKAGE
-#undef VERSION
-#include "mediastreamer2/mediastream.h"
-
-#include <ortp/ortp.h>
-#include <ortp/telephonyevents.h>
-
-
-#define ANNOUCE_FILE8000HZ     "hello8000.wav"
-#define ANNOUCE_FILE16000HZ    "hello16000.wav"
-
-struct _Sipomatic
-{
-       ms_mutex_t lock;
-       MSList *calls;
-       double acceptance_time;
-       double max_call_time;
-       char *file_path8000hz;
-       char *file_path16000hz;
-       bool_t ipv6;
-};
-
-typedef struct _Sipomatic Sipomatic;
-       
-void sipomatic_init(Sipomatic *obj, char *url, bool_t ipv6);
-void sipomatic_uninit(Sipomatic *obj);
-void sipomatic_iterate(Sipomatic *obj);
-#define sipomatic_lock(obj) ms_mutex_lock(&(obj)->lock);
-#define sipomatic_unlock(obj) ms_mutex_unlock(&(obj)->lock);
-
-void sipomatic_set_annouce_file(Sipomatic *obj, char *file);
-
-struct stream_params{
-       int ncodecs;
-       int line;
-       int localport;
-       int remoteport;
-       int pt;
-       char *remaddr;
-};
-
-struct _Call
-{
-       Sipomatic *root;
-       sdp_context_t *sdpc;
-       int time;
-       int did;
-       int tid;
-       AudioStream *audio_stream;
-#ifdef VIDEO_ENABLED
-       VideoStream *video_stream;
-#endif
-       int state;
-       struct _CallParams *params;
-       int eof;
-       RtpProfile *profile;
-       struct stream_params audio;
-       struct stream_params video;
-};
-
-#define CALL_STATE_INIT 0
-#define CALL_STATE_RUNNING 1
-#define CALL_STATE_FINISHED 2
-
-typedef struct _Call Call;
-
-       
-Call * call_new(Sipomatic *obj, eXosip_event_t *ev);
-void call_accept(Call *call);
-void call_release(Call *call);
-void call_destroy(Call *call);
-
-Call* sipomatic_find_call(Sipomatic *obj,int cid);
diff --git a/linphone/console/wav2raw.c b/linphone/console/wav2raw.c
deleted file mode 100644 (file)
index 1dc2183..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-#include "../config.h"
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-
-int main(int argc, char *argv[])
-{
-       int ifd,ofd;
-       char *name,*p;
-       char buf[200];
-       int len;
-
-       if (argc<2) return -1;  
-       name=malloc(strlen(argv[1])+10);
-       sprintf(name,"%s",argv[1]);
-       p=strstr(name,".raw");
-       if (p!=NULL){
-               sprintf(p,"%s",".wav\0");
-       }else{
-               sprintf(name,"%s%s",argv[1],".raw");
-       }
-       
-       ifd=open(name,O_RDONLY);
-       if (ifd<0) {
-               perror("Could not open input file");
-               return -1;
-       }
-       ofd=open(argv[1],O_WRONLY|O_CREAT|O_TRUNC,S_IRUSR|S_IWUSR|S_IRGRP);
-       if (ofd<0) {
-               perror("Could not open output file");
-               return -1;
-       }
-       len=read(ifd,buf,20);
-       printf("len=%i\n",len);
-       /* erase the wav header */
-       if (len>0){
-               memset(buf,0,20);
-               write(ofd,buf,20);
-       }else{
-               printf("Error while processing %s: %s\n",argv[1],strerror(errno));
-               return -1;
-       };
-
-       while ( (len=read(ifd,buf,200))>0){
-               #ifdef WORDS_BIGENDIAN  
-               for (i=0;i<len/2;i+=2){
-                       tmp=buf[i];
-                       buf[i]=buf[i+1];
-                       buf[i+1]=tmp;
-               }
-               #endif
-               write(ofd,buf,len);
-       }
-
-       close(ifd);
-       close(ofd);
-       return 0;
-}
-
-
diff --git a/linphone/coreapi/.gitignore b/linphone/coreapi/.gitignore
deleted file mode 100644 (file)
index c5d084f..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-Makefile
-Makefile.in
-.deps
-.libs
-*.lo
-*.la
-*.loT
diff --git a/linphone/coreapi/Makefile.am b/linphone/coreapi/Makefile.am
deleted file mode 100644 (file)
index c0a28ad..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-
-SUBDIRS=help
-
-## Process this file with automake to produce Makefile.in
-linphone_includedir=$(includedir)/linphone
-
-linphone_include_HEADERS=linphonecore.h ../config.h lpconfig.h sipsetup.h
-
-INCLUDES = \
-       -I$(top_srcdir)\
-       -I$(top_srcdir)/mediastreamer2/include
-
-
-lib_LTLIBRARIES=liblinphone.la
-
-liblinphone_la_SOURCES=\
-       linphonecore.c linphonecore.h private.h\
-       exevents.c exevents.h \
-       misc.c  \
-       address.c \
-       enum.c enum.h \
-       sdphandler.c sdphandler.h \
-       presence.c \
-       proxy.c \
-       friend.c \
-       authentication.c \
-       lpconfig.c lpconfig.h \
-       chat.c \
-        general_state.c \
-       sipsetup.c sipsetup.h \
-       siplogin.c
-
-
-liblinphone_la_LDFLAGS= -version-info $(LIBLINPHONE_SO_VERSION) -no-undefined
-
-liblinphone_la_LIBADD= \
-               $(EXOSIP_LIBS) \
-               $(top_builddir)/mediastreamer2/src/libmediastreamer.la \
-               $(ORTP_LIBS)
-
-if BUILD_WIN32
-liblinphone_la_LIBADD+=$(top_builddir)/oRTP/src/libortp.la
-endif
-
-
-AM_CFLAGS=$(STRICT_OPTIONS)  -DIN_LINPHONE \
-       $(ORTP_CFLAGS) \
-       $(OSIP_CFLAGS) \
-       $(EXOSIP_CFLAGS) \
-       -DENABLE_TRACE  \
-       -DLOG_DOMAIN=\"LinphoneCore\" \
-        $(IPV6_CFLAGS) \
-        -DORTP_INET6 \
-        $(VIDEO_CFLAGS) 
diff --git a/linphone/coreapi/address.c b/linphone/coreapi/address.c
deleted file mode 100644 (file)
index 36f6de9..0000000
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
-linphone
-Copyright (C) 2009  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#include "linphonecore.h"
-#include "lpconfig.h"
-#include "private.h"
-#include <eXosip2/eXosip.h>
-
-/**
- * @addtogroup linphone_address
- * @{
-**/
-
-/**
- * Constructs a LinphoneAddress object by parsing the user supplied address,
- * given as a string.
-**/
-LinphoneAddress * linphone_address_new(const char *uri){
-       osip_from_t *from;
-       osip_from_init(&from);
-       if (osip_from_parse(from,uri)!=0){
-               osip_from_free(from);
-               return NULL;
-       }
-       return from;
-}
-
-/**
- * Clones a LinphoneAddress object.
-**/
-LinphoneAddress * linphone_address_clone(const LinphoneAddress *uri){
-       osip_from_t *ret=NULL;
-       osip_from_clone(uri,&ret);
-       return ret;
-}
-
-#define null_if_empty(s) (((s)!=NULL && (s)[0]!='\0') ? (s) : NULL )
-
-/**
- * Returns the address scheme, normally "sip".
-**/
-const char *linphone_address_get_scheme(const LinphoneAddress *u){
-       return null_if_empty(u->url->scheme);
-}
-
-/**
- * Returns the display name.
-**/
-const char *linphone_address_get_display_name(const LinphoneAddress* u){
-       return null_if_empty(u->displayname);
-}
-
-/**
- * Returns the username.
-**/
-const char *linphone_address_get_username(const LinphoneAddress *u){
-       return null_if_empty(u->url->username);
-}
-
-/**
- * Returns the domain name.
-**/
-const char *linphone_address_get_domain(const LinphoneAddress *u){
-       return null_if_empty(u->url->host);
-}
-
-/**
- * Sets the display name.
-**/
-void linphone_address_set_display_name(LinphoneAddress *u, const char *display_name){
-       if (u->displayname!=NULL){
-               osip_free(u->displayname);
-               u->displayname=NULL;
-       }
-       if (display_name!=NULL)
-               u->displayname=osip_strdup(display_name);
-}
-
-/**
- * Sets the username.
-**/
-void linphone_address_set_username(LinphoneAddress *uri, const char *username){
-       if (uri->url->username!=NULL){
-               osip_free(uri->url->username);
-               uri->url->username=NULL;
-       }
-       if (username)
-               uri->url->username=osip_strdup(username);
-}
-
-/**
- * Sets the domain.
-**/
-void linphone_address_set_domain(LinphoneAddress *uri, const char *host){
-       if (uri->url->host!=NULL){
-               osip_free(uri->url->host);
-               uri->url->host=NULL;
-       }
-       if (host)
-               uri->url->host=osip_strdup(host);
-}
-
-/**
- * Sets the port number.
-**/
-void linphone_address_set_port(LinphoneAddress *uri, const char *port){
-       if (uri->url->port!=NULL){
-               osip_free(uri->url->port);
-               uri->url->port=NULL;
-       }
-       if (port)
-               uri->url->port=osip_strdup(port);
-}
-
-/**
- * Sets the port number.
-**/
-void linphone_address_set_port_int(LinphoneAddress *uri, int port){
-       char tmp[12];
-       if (port==5060){
-               /*this is the default, special case to leave the port field blank*/
-               linphone_address_set_port(uri,NULL);
-               return;
-       }
-       snprintf(tmp,sizeof(tmp),"%i",port);
-       linphone_address_set_port(uri,tmp);
-}
-
-/**
- * Removes address's tags and uri headers so that it is displayable to the user.
-**/
-void linphone_address_clean(LinphoneAddress *uri){
-       osip_generic_param_freelist(&uri->gen_params);
-}
-
-/**
- * Returns the address as a string.
- * The returned char * must be freed by the application. Use ms_free().
-**/
-char *linphone_address_as_string(const LinphoneAddress *u){
-       char *tmp,*ret;
-       osip_from_to_str(u,&tmp);
-       ret=ms_strdup(tmp);
-       osip_free(tmp);
-       return ret;
-}
-
-/**
- * Returns the SIP uri only as a string, that is display name is removed.
- * The returned char * must be freed by the application. Use ms_free().
-**/
-char *linphone_address_as_string_uri_only(const LinphoneAddress *u){
-       char *tmp=NULL,*ret;
-       osip_uri_to_str(u->url,&tmp);
-       ret=ms_strdup(tmp);
-       osip_free(tmp);
-       return ret;
-}
-
-/**
- * Destroys a LinphoneAddress object.
-**/
-void linphone_address_destroy(LinphoneAddress *u){
-       osip_from_free(u);
-}
-
-
-/** @} */
diff --git a/linphone/coreapi/authentication.c b/linphone/coreapi/authentication.c
deleted file mode 100644 (file)
index ee360ec..0000000
+++ /dev/null
@@ -1,394 +0,0 @@
-/***************************************************************************
- *            authentication.c
- *
- *  Fri Jul 16 12:08:34 2004
- *  Copyright  2004-2009  Simon MORLAT
- *  simon.morlat@linphone.org
- ****************************************************************************/
-
-/*
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-#include "linphonecore.h"
-#include "private.h"
-#include <eXosip2/eXosip.h>
-#include <osipparser2/osip_message.h>
-#include "lpconfig.h"
-
-extern LinphoneProxyConfig *linphone_core_get_proxy_config_from_rid(LinphoneCore *lc, int rid);
-
-/**
- * @addtogroup authentication
- * @{
-**/
-
-/**
- * Create a LinphoneAuthInfo object with supplied information.
- *
- * The object can be created empty, that is with all arguments set to NULL.
- * Username, userid, password and realm can be set later using specific methods.
-**/
-LinphoneAuthInfo *linphone_auth_info_new(const char *username, const char *userid,
-                                                                                                               const char *passwd, const char *ha1,const char *realm)
-{
-       LinphoneAuthInfo *obj=ms_new0(LinphoneAuthInfo,1);
-       if (username!=NULL && (strlen(username)>0) ) obj->username=ms_strdup(username);
-       if (userid!=NULL && (strlen(userid)>0)) obj->userid=ms_strdup(userid);
-       if (passwd!=NULL && (strlen(passwd)>0)) obj->passwd=ms_strdup(passwd);
-       if (ha1!=NULL && (strlen(ha1)>0)) obj->ha1=ms_strdup(ha1);
-       if (realm!=NULL && (strlen(realm)>0)) obj->realm=ms_strdup(realm);
-       obj->works=FALSE;
-       obj->first_time=TRUE;
-       return obj;
-}
-
-/**
- * Sets the password.
-**/
-void linphone_auth_info_set_passwd(LinphoneAuthInfo *info, const char *passwd){
-       if (info->passwd!=NULL) {
-               ms_free(info->passwd);
-               info->passwd=NULL;
-       }
-       if (passwd!=NULL && (strlen(passwd)>0)) info->passwd=ms_strdup(passwd);
-}
-
-/**
- * Sets the username.
-**/
-void linphone_auth_info_set_username(LinphoneAuthInfo *info, const char *username){
-       if (info->username){
-               ms_free(info->username);
-               info->username=NULL;
-       }
-       if (username && strlen(username)>0) info->username=ms_strdup(username);
-}
-
-/**
- * Sets userid.
-**/
-void linphone_auth_info_set_userid(LinphoneAuthInfo *info, const char *userid){
-       if (info->userid){
-               ms_free(info->userid);
-               info->userid=NULL;
-       }
-       if (userid && strlen(userid)>0) info->userid=ms_strdup(userid);
-}
-
-/**
- * Destroys a LinphoneAuthInfo object.
-**/
-void linphone_auth_info_destroy(LinphoneAuthInfo *obj){
-       if (obj->username!=NULL) ms_free(obj->username);
-       if (obj->userid!=NULL) ms_free(obj->userid);
-       if (obj->passwd!=NULL) ms_free(obj->passwd);
-       if (obj->ha1!=NULL) ms_free(obj->ha1);
-       if (obj->realm!=NULL) ms_free(obj->realm);
-       ms_free(obj);
-}
-
-void linphone_auth_info_write_config(LpConfig *config, LinphoneAuthInfo *obj, int pos)
-{
-       char key[50];
-       sprintf(key,"auth_info_%i",pos);
-       lp_config_clean_section(config,key);
-       
-       if (obj==NULL){
-               return;
-       }               
-       if (obj->username!=NULL){
-               lp_config_set_string(config,key,"username",obj->username);
-       }
-       if (obj->userid!=NULL){
-               lp_config_set_string(config,key,"userid",obj->userid);
-       }
-       if (obj->passwd!=NULL){
-               lp_config_set_string(config,key,"passwd",obj->passwd);
-       }
-       if (obj->ha1!=NULL){
-               lp_config_set_string(config,key,"ha1",obj->ha1);
-       }
-       if (obj->realm!=NULL){
-               lp_config_set_string(config,key,"realm",obj->realm);
-       }
-}
-
-LinphoneAuthInfo *linphone_auth_info_new_from_config_file(LpConfig * config, int pos)
-{
-       char key[50];
-       const char *username,*userid,*passwd,*ha1,*realm;
-       
-       sprintf(key,"auth_info_%i",pos);
-       if (!lp_config_has_section(config,key)){
-               return NULL;
-       }
-       
-       username=lp_config_get_string(config,key,"username",NULL);
-       userid=lp_config_get_string(config,key,"userid",NULL);
-       passwd=lp_config_get_string(config,key,"passwd",NULL);
-       ha1=lp_config_get_string(config,key,"ha1",NULL);
-       realm=lp_config_get_string(config,key,"realm",NULL);
-       return linphone_auth_info_new(username,userid,passwd,ha1,realm);
-}
-
-static bool_t key_match(const char *tmp1, const char *tmp2){
-       if (tmp1==NULL && tmp2==NULL) return TRUE;
-       if (tmp1!=NULL && tmp2!=NULL && strcmp(tmp1,tmp2)==0) return TRUE;
-       return FALSE;
-       
-}
-
-static char * remove_quotes(char * input){
-       char *tmp;
-       if (*input=='"') input++;
-       tmp=strchr(input,'"');
-       if (tmp) *tmp='\0';
-       return input;
-}
-
-static int realm_match(const char *realm1, const char *realm2){
-       if (realm1==NULL && realm2==NULL) return TRUE;
-       if (realm1!=NULL && realm2!=NULL){
-               if (strcmp(realm1,realm2)==0) return TRUE;
-               else{
-                       char tmp1[128];
-                       char tmp2[128];
-                       char *p1,*p2;
-                       strncpy(tmp1,realm1,sizeof(tmp1)-1);
-                       strncpy(tmp2,realm2,sizeof(tmp2)-1);
-                       p1=remove_quotes(tmp1);
-                       p2=remove_quotes(tmp2);
-                       return strcmp(p1,p2)==0;
-               }
-       }
-       return FALSE;
-}
-
-/**
- * Retrieves a LinphoneAuthInfo previously entered into the LinphoneCore.
-**/
-LinphoneAuthInfo *linphone_core_find_auth_info(LinphoneCore *lc, const char *realm, const char *username)
-{
-       MSList *elem;
-       LinphoneAuthInfo *ret=NULL,*candidate=NULL;
-       for (elem=lc->auth_info;elem!=NULL;elem=elem->next){
-               LinphoneAuthInfo *pinfo=(LinphoneAuthInfo*)elem->data;
-               if (realm==NULL){
-                       /*return the authinfo for any realm provided that there is only one for that username*/
-                       if (key_match(pinfo->username,username)){
-                               if (ret!=NULL){
-                                       ms_warning("There are several auth info for username '%s'",username);
-                                       return NULL;
-                               }
-                               ret=pinfo;
-                       }
-               }else{
-                       /*return the exact authinfo, or an authinfo for which realm was not supplied yet*/
-                       if (pinfo->realm!=NULL){
-                               if (realm_match(pinfo->realm,realm) 
-                                       && key_match(pinfo->username,username))
-                                       ret=pinfo;
-                       }else{
-                               if (key_match(pinfo->username,username))
-                                       candidate=pinfo;
-                       }
-               }
-       }
-       if (ret==NULL && candidate!=NULL)
-               ret=candidate;
-       return ret;
-}
-
-static void refresh_exosip_auth_info(LinphoneCore *lc){
-       MSList *elem;
-       eXosip_lock();
-       eXosip_clear_authentication_info();
-       for (elem=lc->auth_info;elem!=NULL;elem=ms_list_next(elem)){
-               LinphoneAuthInfo *info=(LinphoneAuthInfo*)elem->data;
-               char *userid;
-               if (info->userid==NULL || info->userid[0]=='\0') userid=info->username;
-               else userid=info->userid;
-               eXosip_add_authentication_info(info->username,userid,
-                               info->passwd,info->ha1,info->realm);
-       }
-       eXosip_unlock();
-}
-
-/**
- * Adds authentication information to the LinphoneCore.
- * 
- * This information will be used during all SIP transacations that require authentication.
-**/
-void linphone_core_add_auth_info(LinphoneCore *lc, LinphoneAuthInfo *info)
-{
-       MSList *elem;
-       LinphoneAuthInfo *ai;
-       
-       /* find if we are attempting to modify an existing auth info */
-       ai=linphone_core_find_auth_info(lc,info->realm,info->username);
-       if (ai!=NULL){
-               elem=ms_list_find(lc->auth_info,ai);
-               if (elem==NULL){
-                       ms_error("AuthInfo list corruption ?");
-                       return;
-               }
-               linphone_auth_info_destroy((LinphoneAuthInfo*)elem->data);
-               elem->data=(void *)info;
-       }else {
-               lc->auth_info=ms_list_append(lc->auth_info,(void *)info);
-       }
-       refresh_exosip_auth_info(lc);
-       /* if the user was prompted, re-allow automatic_action */
-       if (lc->automatic_action>0) lc->automatic_action--;
-}
-
-
-/**
- * This method is used to abort a user authentication request initiated by LinphoneCore
- * from the auth_info_requested callback of LinphoneCoreVTable.
-**/
-void linphone_core_abort_authentication(LinphoneCore *lc,  LinphoneAuthInfo *info){
-       if (lc->automatic_action>0) lc->automatic_action--;
-}
-
-/**
- * Removes an authentication information object.
-**/
-void linphone_core_remove_auth_info(LinphoneCore *lc, LinphoneAuthInfo *info){
-       int len=ms_list_size(lc->auth_info);
-       int newlen;
-       int i;
-       MSList *elem;
-       lc->auth_info=ms_list_remove(lc->auth_info,info);
-       newlen=ms_list_size(lc->auth_info);
-       /*printf("len=%i newlen=%i\n",len,newlen);*/
-       linphone_auth_info_destroy(info);
-       for (i=0;i<len;i++){
-               linphone_auth_info_write_config(lc->config,NULL,i);
-       }
-       for (elem=lc->auth_info,i=0;elem!=NULL;elem=ms_list_next(elem),i++){
-               linphone_auth_info_write_config(lc->config,(LinphoneAuthInfo*)elem->data,i);
-       }
-       refresh_exosip_auth_info(lc);
-       
-}
-
-/**
- * Returns an unmodifiable list of currently entered LinphoneAuthInfo.
-**/
-const MSList *linphone_core_get_auth_info_list(const LinphoneCore *lc){
-       return lc->auth_info;
-}
-
-/**
- * Clear all authentication information.
-**/
-void linphone_core_clear_all_auth_info(LinphoneCore *lc){
-       MSList *elem;
-       int i;
-       eXosip_lock();
-       eXosip_clear_authentication_info();
-       eXosip_unlock();
-       for(i=0,elem=lc->auth_info;elem!=NULL;elem=ms_list_next(elem),i++){
-               LinphoneAuthInfo *info=(LinphoneAuthInfo*)elem->data;
-               linphone_auth_info_destroy(info);
-               linphone_auth_info_write_config(lc->config,NULL,i);
-       }
-       ms_list_free(lc->auth_info);
-       lc->auth_info=NULL;
-}
-
-void linphone_authentication_ok(LinphoneCore *lc, eXosip_event_t *ev){
-       char *prx_realm=NULL,*www_realm=NULL;
-       osip_proxy_authorization_t *prx_auth;
-       osip_authorization_t *www_auth;
-       osip_message_t *msg=ev->request;
-       char *username;
-       LinphoneAuthInfo *as=NULL;
-
-       username=osip_uri_get_username(msg->from->url);
-       osip_message_get_proxy_authorization(msg,0,&prx_auth);
-       osip_message_get_authorization(msg,0,&www_auth);
-       if (prx_auth!=NULL)
-               prx_realm=osip_proxy_authorization_get_realm(prx_auth);
-       if (www_auth!=NULL)
-               www_realm=osip_authorization_get_realm(www_auth);
-       
-       if (prx_realm==NULL && www_realm==NULL){
-               ms_message("No authentication info in the request, ignoring");
-               return;
-       }
-       /* see if we already have this auth information , not to ask it everytime to the user */
-       if (prx_realm!=NULL)
-               as=linphone_core_find_auth_info(lc,prx_realm,username);
-       if (www_realm!=NULL) 
-               as=linphone_core_find_auth_info(lc,www_realm,username);
-       if (as){
-               ms_message("Authentication for user=%s realm=%s is working.",username,prx_realm ? prx_realm : www_realm);
-               as->works=TRUE;
-       }
-}
-
-
-void linphone_core_find_or_ask_for_auth_info(LinphoneCore *lc,const char *username,const char* realm, int tid)
-{
-       LinphoneAuthInfo *as=linphone_core_find_auth_info(lc,realm,username);
-       if ( as==NULL || (as!=NULL && as->works==FALSE && as->first_time==FALSE)){
-               if (lc->vtable.auth_info_requested!=NULL){
-                       lc->vtable.auth_info_requested(lc,realm,username);
-                       lc->automatic_action++;/*suspends eXosip_automatic_action until the user supplies a password */
-               }
-       }
-       if (as) as->first_time=FALSE;
-}
-
-void linphone_process_authentication(LinphoneCore *lc, eXosip_event_t *ev)
-{
-       char *prx_realm=NULL,*www_realm=NULL;
-       osip_proxy_authenticate_t *prx_auth;
-       osip_www_authenticate_t *www_auth;
-       osip_message_t *resp=ev->response;
-       char *username;
-
-       /*
-       if (strcmp(ev->request->sip_method,"REGISTER")==0) {
-               gstate_new_state(lc, GSTATE_REG_FAILED, "Authentication required");
-       }
-       */
-
-       username=osip_uri_get_username(resp->from->url);
-       prx_auth=(osip_proxy_authenticate_t*)osip_list_get(&resp->proxy_authenticates,0);
-       www_auth=(osip_proxy_authenticate_t*)osip_list_get(&resp->www_authenticates,0);
-       if (prx_auth!=NULL)
-               prx_realm=osip_proxy_authenticate_get_realm(prx_auth);
-       if (www_auth!=NULL)
-               www_realm=osip_www_authenticate_get_realm(www_auth);
-       
-       if (prx_realm==NULL && www_realm==NULL){
-               ms_warning("No realm in the server response.");
-               return;
-       }
-       /* see if we already have this auth information , not to ask it everytime to the user */
-       if (prx_realm!=NULL) 
-               linphone_core_find_or_ask_for_auth_info(lc,username,prx_realm,ev->tid);
-       if (www_realm!=NULL) 
-               linphone_core_find_or_ask_for_auth_info(lc,username,www_realm,ev->tid);
-}
-
-
-/**
- * @}
-**/
diff --git a/linphone/coreapi/chat.c b/linphone/coreapi/chat.c
deleted file mode 100644 (file)
index 9552627..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-/***************************************************************************
- *            chat.c
- *
- *  Sun Jun  5 19:34:18 2005
- *  Copyright  2005  Simon Morlat
- *  Email simon dot morlat at linphone dot org
- ****************************************************************************/
-
-/*
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
- #include "linphonecore.h"
- #include "private.h"
- #include <eXosip2/eXosip.h>
- LinphoneChatRoom * linphone_core_create_chat_room(LinphoneCore *lc, const char *to){
-       LinphoneAddress *parsed_url=NULL;
-       char *route;
-       if (linphone_core_interpret_url(lc,to,&parsed_url,&route)){
-               LinphoneChatRoom *cr=ms_new0(LinphoneChatRoom,1);
-               cr->lc=lc;
-               cr->peer=linphone_address_as_string(parsed_url);
-               cr->peer_url=parsed_url;
-               cr->route=route;
-               lc->chatrooms=ms_list_append(lc->chatrooms,(void *)cr);
-               return cr;
-       }
-       return NULL;
- }
- void linphone_chat_room_destroy(LinphoneChatRoom *cr){
-       LinphoneCore *lc=cr->lc;
-       lc->chatrooms=ms_list_remove(lc->chatrooms,(void *) cr);
-       linphone_address_destroy(cr->peer_url);
-       ms_free(cr->peer);
-       ms_free(cr->route);
- }
-void linphone_chat_room_send_message(LinphoneChatRoom *cr, const char *msg){
-       const char *identity=linphone_core_get_identity(cr->lc);
-       osip_message_t *sip=NULL;
-       eXosip_message_build_request(&sip,"MESSAGE",cr->peer,identity,cr->route);
-       osip_message_set_content_type(sip,"text/plain");
-       osip_message_set_body(sip,msg,strlen(msg));
-       eXosip_message_send_request(sip);
-}
-
-bool_t linphone_chat_room_matches(LinphoneChatRoom *cr, const LinphoneAddress *from){
-       if (linphone_address_get_username(cr->peer_url) && linphone_address_get_username(from) && 
-               strcmp(linphone_address_get_username(cr->peer_url),linphone_address_get_username(from))==0) return TRUE;
-       return FALSE;
-}
-
-void linphone_chat_room_text_received(LinphoneChatRoom *cr, LinphoneCore *lc, const char *from, const char *msg){
-       if (lc->vtable.text_received!=NULL) lc->vtable.text_received(lc, cr, from, msg);
-}
-
-void linphone_core_text_received(LinphoneCore *lc, eXosip_event_t *ev){
-       MSList *elem;
-       const char *msg;
-       LinphoneChatRoom *cr=NULL;
-       char *from;
-       osip_from_t *from_url=ev->request->from;
-       osip_body_t *body=NULL;
-       LinphoneAddress *uri;
-
-       osip_message_get_body(ev->request,0,&body);
-       if (body==NULL){
-               ms_error("Could not get text message from SIP body");
-               return;
-       }
-       msg=body->body;
-       osip_from_to_str(from_url,&from);
-       uri=linphone_address_new(from);
-       osip_free(from);
-       linphone_address_clean(uri);
-       for(elem=lc->chatrooms;elem!=NULL;elem=ms_list_next(elem)){
-               cr=(LinphoneChatRoom*)elem->data;
-               if (linphone_chat_room_matches(cr,uri)){
-                       break;
-               }
-               cr=NULL;
-       }
-       from=linphone_address_as_string(uri);
-       if (cr==NULL){
-               /* create a new chat room */
-               cr=linphone_core_create_chat_room(lc,from);
-       }
-       linphone_address_destroy(uri);
-       linphone_chat_room_text_received(cr,lc,from,msg);
-       ms_free(from);
-}
-
-
-void linphone_chat_room_set_user_data(LinphoneChatRoom *cr, void * ud){
-       cr->user_data=ud;
-}
-void * linphone_chat_room_get_user_data(LinphoneChatRoom *cr){
-       return cr->user_data;
-}
diff --git a/linphone/coreapi/enum.c b/linphone/coreapi/enum.c
deleted file mode 100644 (file)
index 8818ae6..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
-linphone
-Copyright (C) 2000-2009  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-/* enum lookup code */
-
-#ifndef _WIN32_WCE
-#include <errno.h>
-#endif
-
-#include <string.h>
-
-#include "enum.h"
-
-#define DNS_ANSWER_MAX_SIZE 2048
-
-
-static char *create_enum_domain(const char *number){
-       int len=strlen(number);
-       char *domain=ms_malloc((len*2)+10);
-       int i,j;
-       
-       for (i=0,j=len-1;j>=0;j--){
-               domain[i]=number[j];
-               i++;
-               domain[i]='.';
-               i++;
-       }
-       strcpy(&domain[i],"e164.arpa");
-       ms_message("enum domain for %s is %s",number,domain);
-       return domain;
-}
-
-
-static bool_t is_a_number(const char *str){
-       char *p=(char *)str;
-       bool_t res=FALSE;
-       bool_t space_found=FALSE;
-       for(;;p++){
-               switch(p[0]){
-                       case '9':
-                       case '8':
-                       case '7':
-                       case '6':
-                       case '5':
-                       case '4':
-                       case '3':
-                       case '2':
-                       case '1':
-                       case '0':
-                               res=TRUE;
-                               if (space_found) return FALSE; /* avoid splited numbers */
-                               break;
-                       case '\0':
-                               return res;
-                               break;
-                       case ' ':
-                               space_found=TRUE;
-                               break;
-                       default:
-                               return FALSE;
-               }
-       }
-       return FALSE;
-}
-//4970072278724
-bool_t is_enum(const char *sipaddress, char **enum_domain){
-       char *p;
-       p=strstr(sipaddress,"sip:");
-       if (p==NULL) return FALSE; /* enum should look like sip:4369959250*/
-       else p+=4;
-       if (is_a_number(p)){
-               if (enum_domain!=NULL){
-                       *enum_domain=create_enum_domain(p);
-               }
-               return TRUE;
-       }
-       return FALSE;
-}
-
-
-
-int enum_lookup(const char *enum_domain, enum_lookup_res_t **res){
-       int err;
-       //char dns_answer[DNS_ANSWER_MAX_SIZE];
-       char *begin,*end;
-       char *host_result, *command;
-       int i;
-       bool_t forkok;
-       /*
-       ns_msg handle;
-       int count;
-       
-       memset(&handle,0,sizeof(handle));
-       *res=NULL;
-       ms_message("Resolving %s...",enum_domain);
-       
-       err=res_search(enum_domain,ns_c_in,ns_t_naptr,dns_answer,DNS_ANSWER_MAX_SIZE);
-       if (err<0){
-               ms_warning("Error resolving enum:",herror(h_errno));
-               return -1;
-       }
-       ns_initparse(dns_answer,DNS_ANSWER_MAX_SIZE,&handle);
-       count=ns_msg_count(handle,ns_s_an);
-       
-       for(i=0;i<count;i++){
-               ns_rr rr;
-               memset(&rr,0,sizeof(rr));
-               ns_parserr(&handle,ns_s_an,i,&rr);
-               ms_message("data=%s",ns_rr_rdata(rr));
-       }
-       */
-       command=ms_strdup_printf("host -t naptr %s",enum_domain);
-       forkok=lp_spawn_command_line_sync(command,&host_result,&err);
-       ms_free(command);
-       if (forkok){
-               if (err!=0){
-                       ms_warning("Host exited with %i error status.",err);
-                       return -1;
-               }
-       }else{
-               ms_warning("Could not spawn the \'host\' command.");
-               return -1;
-       }               
-       ms_message("Answer received from dns (err=%i): %s",err,host_result);
-       
-       begin=strstr(host_result,"sip:");
-       if (begin==0) {
-               ms_warning("No sip address found in dns naptr answer.");
-               return -1;
-       }
-       *res=ms_malloc0(sizeof(enum_lookup_res_t));
-       err=0;
-       for(i=0;i<MAX_ENUM_LOOKUP_RESULTS;i++){
-               end=strstr(begin,"!");
-               if (end==NULL) goto parse_error;
-               end[0]='\0';
-               (*res)->sip_address[i]=ms_strdup(begin);
-               err++;
-               begin=strstr(end+1,"sip:");
-               if (begin==NULL) break;
-       }
-       ms_free(host_result);
-       return err;
-
-       parse_error:
-               ms_free(*res);
-               ms_free(host_result);
-               *res=NULL;
-               ms_warning("Parse error in enum_lookup().");
-               return -1;
-}
-
-void enum_lookup_res_free(enum_lookup_res_t *res){
-       int i;
-       for (i=0;i<MAX_ENUM_LOOKUP_RESULTS;i++){
-               if (res->sip_address[i]!=NULL) ms_free(res->sip_address[i]);
-       }
-       ms_free(res);
-}
diff --git a/linphone/coreapi/enum.h b/linphone/coreapi/enum.h
deleted file mode 100644 (file)
index 05b285f..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-linphone
-Copyright (C) 2000  Simon MORLAT (simon.morlat@free.fr)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#ifndef ENUM_LOOKUP_H
-#define ENUM_LOOKUP_H
-
-#include "private.h"
-
-#define MAX_ENUM_LOOKUP_RESULTS 10
-
-typedef struct enum_lookup_res{
-       char *sip_address[MAX_ENUM_LOOKUP_RESULTS];
-}enum_lookup_res_t;
-
-bool_t is_enum(const char *sipaddress, char **enum_domain);
-int enum_lookup(const char *enum_domain, enum_lookup_res_t **res);
-void enum_lookup_res_free(enum_lookup_res_t *res);
-
-#endif
diff --git a/linphone/coreapi/exevents.c b/linphone/coreapi/exevents.c
deleted file mode 100644 (file)
index 45fdc85..0000000
+++ /dev/null
@@ -1,1186 +0,0 @@
-/*
-linphone
-Copyright (C) 2000  Simon MORLAT (simon.morlat@free.fr)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#include "exevents.h"
-#include "linphonecore.h"
-#include "private.h"
-#include "mediastreamer2/mediastream.h"
-#include <eXosip2/eXosip.h>
-#include <osipparser2/osip_message.h>
-#include <osipparser2/osip_parser.h>
-
-static int linphone_answer_sdp(LinphoneCore *lc, eXosip_event_t *ev, sdp_message_t *sdp);
-
-static bool_t linphone_call_matches_event(LinphoneCall *call, eXosip_event_t *ev){
-       return call->cid==ev->cid;
-}
-
-static void linphone_call_proceeding(LinphoneCore *lc, eXosip_event_t *ev){
-       if (lc->call==NULL || (lc->call->cid!=-1 && !linphone_call_matches_event(lc->call,ev)) ) {
-               ms_warning("This call has been canceled: call=%p, call->cid=%i, ev->cid=%i",
-                       lc->call,lc->call->cid,ev->cid);
-               eXosip_lock();
-               eXosip_call_terminate(ev->cid,ev->did);
-               eXosip_unlock();
-               return;
-       }
-       lc->call->cid=ev->cid;
-       lc->call->did=ev->did;
-       lc->call->tid=ev->tid;
-}
-
-static void linphone_connect_incoming(LinphoneCore *lc){
-       lc->vtable.show(lc);
-       lc->vtable.display_status(lc,_("Connected."));
-       lc->call->state=LCStateAVRunning;
-       if (lc->ringstream!=NULL){
-               ring_stop(lc->ringstream);
-               lc->ringstream=NULL;
-       }
-       if (lc->audiostream->ticker!=NULL){
-               /*case where we accepted early media */
-               linphone_core_stop_media_streams(lc);
-               linphone_core_init_media_streams(lc);
-       }
-       linphone_core_start_media_streams(lc,lc->call);
-}
-
-int linphone_call_accepted(LinphoneCore *lc, eXosip_event_t *ev)
-{
-       LinphoneCall *call=lc->call;
-       sdp_message_t *sdp;
-       const char *sdpanswer=NULL;
-       osip_message_t *msg=NULL;
-       int err;
-       if (call==NULL){
-               ms_warning("No call to accept.");
-               return 0;
-       }
-       linphone_call_proceeding(lc,ev);
-       if (!linphone_call_matches_event(lc->call,ev)) return 0;
-       call->auth_pending=FALSE;
-       if (call->state==LCStateAVRunning){
-               return 0; /*already accepted*/
-       }
-       linphone_call_init_media_params(call);
-       sdp=eXosip_get_sdp_info(ev->response);
-       if (!lc->sip_conf.sdp_200_ack){
-               err=0;
-               sdp_context_read_answer(call->sdpctx,sdp);
-       }else{
-               /*we receive a 200OK with an sdp offer*/
-               err=linphone_answer_sdp(lc,ev,sdp);
-               if (err==0) sdpanswer=call->sdpctx->answerstr;
-       }
-       if (err==0){
-               gstate_new_state(lc, GSTATE_CALL_OUT_CONNECTED, NULL);
-               linphone_connect_incoming(lc);
-       }
-       /*send the ack once streams are started*/
-       eXosip_call_build_ack(ev->did,&msg);
-       if (sdpanswer!=NULL) linphone_set_sdp(msg,sdpanswer);
-       eXosip_call_send_ack(ev->did,msg);
-       if (err!=0){
-               /*send a bye*/
-               ms_error("Incompatible SDP offer received in 200Ok, need to abort the call");
-               linphone_core_terminate_call(lc,NULL);
-       }
-       sdp_message_free(sdp);
-       return 0;
-}
-
-
-int linphone_call_terminated(LinphoneCore *lc, eXosip_event_t *ev)
-{
-       /*stop ringing if necessary*/
-       if (lc->call!=NULL){
-               if (lc->call->cid!=ev->cid){
-                       /* this is not current call */
-                       ms_message("call %i terminated, this was not current call.",ev->cid);
-                       return 0;
-               }
-       }
-
-       ms_message("Current call terminated...");
-       if (lc->ringstream!=NULL) {
-               ring_stop(lc->ringstream);
-               lc->ringstream=NULL;
-       }
-       linphone_core_stop_media_streams(lc);
-       lc->vtable.show(lc);
-       lc->vtable.display_status(lc,_("Call terminated."));
-       gstate_new_state(lc, GSTATE_CALL_END, NULL);
-       if (lc->vtable.bye_recv!=NULL){
-               char *from;
-               osip_from_to_str(ev->request->from,&from);
-               lc->vtable.bye_recv(lc,from);
-               osip_free(from);
-       }
-       if (lc->call!=NULL){
-               linphone_call_destroy(lc->call);
-               lc->call=NULL;
-       }
-       return 0;
-}
-
-
-int linphone_call_released(LinphoneCore *lc, int cid){
-       LinphoneCall *call=lc->call;
-       if (call!=NULL && call->cid==cid){
-
-               linphone_call_destroy(lc->call);
-               lc->call=NULL;
-               lc->vtable.display_status(lc,_("Could not reach destination."));
-               gstate_new_state(lc, GSTATE_CALL_ERROR, NULL);
-       }
-       return 0;
-}
-
-int linphone_call_failure(LinphoneCore *lc, eXosip_event_t *ev)
-{
-       const char *reason="";
-       char *msg486=_("User is busy.");
-       char *msg480=_("User is temporarily unavailable.");
-       char *msg487=_("Request Cancelled.");
-       /*char *retrymsg=_("%s. Retry after %i minute(s).");*/
-       char *msg600=_("User does not want to be disturbed.");
-       char *msg603=_("Call declined.");
-       char* tmpmsg=msg486;
-       int code;
-       LinphoneCall *call=lc->call;
-
-       if (call){
-               /*check that the faillure is related to this call, not an old one*/
-               if (!linphone_call_matches_event(call,ev)) {
-                       ms_warning("Failure reported for an old call.");
-                       return 0;
-               }
-       }
-
-       if (ev->response){
-               code=osip_message_get_status_code(ev->response);
-               reason=osip_message_get_reason_phrase(ev->response);
-       }else code=-110;
-       lc->vtable.show(lc);
-
-       switch(code)
-       {
-               case 401:
-               case 407:
-                       if (lc->call!=NULL)
-                               linphone_process_authentication(lc,ev);
-                       return 0;
-                       break;
-               case 400:
-                       lc->vtable.display_status(lc,_("Bad request"));
-               break;
-               case 404:
-                       lc->vtable.display_status(lc,_("User cannot be found at given address."));
-               break;
-               case 415:
-                       lc->vtable.display_status(lc,_("Remote user cannot support any of proposed codecs."));
-               break;
-               case 422:
-                       /*ignore: eXosip_automatic_action will do the job of retrying with a greater Session-Expires*/
-                       return 0;
-               break;
-               case 480:
-                       tmpmsg=msg480;
-               case 486:
-                       /*
-                       msg_header_getbyname(msg,"retry-after",0,&retry);
-                       if (retry!=NULL)
-                       {
-                               umsg=g_malloc(strlen(tmpmsg)+strlen(retrymsg)+13);
-                               sprintf(umsg,retrymsg,tmpmsg,atoi(retry->hvalue)/60);
-                               lc->vtable.display_message(lc,umsg);
-                               ms_free(umsg);
-                       }*/
-                       lc->vtable.display_message(lc,tmpmsg);
-               break;
-               case 487:
-                       lc->vtable.display_status(lc,msg487);
-               break;
-               case 600:
-                       lc->vtable.display_message(lc,msg600);
-               break;
-               case 603:
-                       lc->vtable.display_status(lc,msg603);
-               break;
-               case -110:  /* time out, call leg is lost */
-                       lc->vtable.display_status(lc,_("Timeout."));
-               break;
-               case -111:
-                       lc->vtable.display_status(lc,_("Remote host was found but refused connection."));
-               break;
-
-               default:
-                       if (code>0)
-                       {
-                               lc->vtable.display_status(lc,reason);
-                       }
-                       else ms_warning("failure_cb unknown code=%i\n",code);
-       }
-       if (lc->ringstream!=NULL) {
-               ring_stop(lc->ringstream);
-               lc->ringstream=NULL;
-       }
-       linphone_core_stop_media_streams(lc);
-       if (call!=NULL) {
-               linphone_call_destroy(call);
-               gstate_new_state(lc, GSTATE_CALL_ERROR, NULL);
-               lc->call=NULL;
-       }
-       return 0;
-}
-
-extern sdp_handler_t linphone_sdphandler;
-
-static int linphone_answer_sdp(LinphoneCore *lc, eXosip_event_t *ev, sdp_message_t *sdp){
-       int status=200;
-       sdp_context_t *ctx=NULL;
-
-       ctx=lc->call->sdpctx;
-       /* get the result of the negociation */
-       sdp_context_get_answer(ctx,sdp);
-       status=sdp_context_get_status(ctx);
-
-       if (status==200){
-               linphone_core_init_media_streams(lc);
-               return 0;
-       }else{
-               if (status==-1) status=415;
-       }
-       return -1;
-}
-
-int linphone_inc_new_call(LinphoneCore *lc, eXosip_event_t *ev)
-{
-       sdp_message_t *sdp=NULL;
-       osip_from_t *from_url=ev->request->from;
-       char *barmesg;
-       char *from;
-       char *to;
-       int err;
-
-       osip_from_to_str(ev->request->from,&from);
-       osip_to_to_str(ev->request->to,&to);
-
-       /* first check if we can answer successfully to this invite */
-       if (lc->presence_mode!=LINPHONE_STATUS_ONLINE){
-               ms_message("Not present !! presence mode : %d\n",lc->presence_mode);
-               eXosip_lock();
-               if (lc->presence_mode==LINPHONE_STATUS_BUSY)
-                       eXosip_call_send_answer(ev->tid,486,NULL);
-               else if (lc->presence_mode==LINPHONE_STATUS_AWAY
-                        ||lc->presence_mode==LINPHONE_STATUS_BERIGHTBACK
-                        ||lc->presence_mode==LINPHONE_STATUS_ONTHEPHONE
-                        ||lc->presence_mode==LINPHONE_STATUS_OUTTOLUNCH
-                        ||lc->presence_mode==LINPHONE_STATUS_OFFLINE)
-                 eXosip_call_send_answer(ev->tid,480,NULL);
-               else if (lc->presence_mode==LINPHONE_STATUS_NOT_DISTURB)
-                 eXosip_call_send_answer(ev->tid,480,NULL);
-               else if (lc->alt_contact!=NULL && lc->presence_mode==LINPHONE_STATUS_MOVED)
-                 {
-                       osip_message_t *msg;
-                       eXosip_call_build_answer(ev->tid,302,&msg);
-                       osip_message_set_contact(msg,lc->alt_contact);
-                       eXosip_call_send_answer(ev->tid,302,msg);
-                 }
-               else if (lc->alt_contact!=NULL && lc->presence_mode==LINPHONE_STATUS_ALT_SERVICE)
-                 {
-                       osip_message_t *msg;
-                       eXosip_call_build_answer(ev->tid,380,&msg);
-                       osip_message_set_contact(msg,lc->alt_contact);
-                       eXosip_call_send_answer(ev->tid,380,msg);
-                 }
-               else
-                 eXosip_call_send_answer(ev->tid,486,NULL);
-               eXosip_unlock();
-               goto end;
-       }
-       if (lc->call!=NULL){/*busy*/
-               eXosip_lock();
-               eXosip_call_send_answer(ev->tid,486,NULL);
-               eXosip_unlock();
-               goto end;
-       }
-       lc->call=linphone_call_new_incoming(lc,linphone_address_new(from),linphone_address_new(to),ev);
-
-       sdp=eXosip_get_sdp_info(ev->request);
-       if (sdp==NULL){
-               ms_message("No sdp body in invite, 200-ack scheme");
-               err=0;
-       }else{
-               err=linphone_answer_sdp(lc,ev,sdp);
-       }
-       if (!err){
-               char *tmp;
-               if (from_2char_without_params(from_url,&tmp)!=0){
-                       tmp=ms_strdup("Unknown user");
-               }
-               gstate_new_state(lc, GSTATE_CALL_IN_INVITE, tmp);
-               barmesg=ortp_strdup_printf("%s %s",tmp,_("is contacting you."));
-               lc->vtable.show(lc);
-               lc->vtable.display_status(lc,barmesg);
-
-               /* play the ring */
-               if (lc->sound_conf.ring_sndcard!=NULL){
-                       ms_message("Starting local ring...");
-                       lc->ringstream=ring_start(lc->sound_conf.local_ring,2000,lc->sound_conf.ring_sndcard);
-               }
-               linphone_call_set_state(lc->call,LCStateRinging);
-               eXosip_lock();
-               eXosip_call_send_answer(ev->tid,180,NULL);
-               eXosip_unlock();
-
-               lc->vtable.inv_recv(lc,tmp);
-               ms_free(barmesg);
-               osip_free(tmp);
-       }else{
-               ms_error("Error during sdp negociation. ");
-               eXosip_lock();
-               eXosip_call_send_answer(ev->tid,415,NULL);
-               eXosip_unlock();
-               linphone_call_destroy(lc->call);
-               lc->call=NULL;
-       }
-       end:
-       osip_free(from);
-       osip_free(to);
-       if (sdp) sdp_message_free(sdp);
-       return 0;
-}
-
-void linphone_handle_ack(LinphoneCore *lc, eXosip_event_t *ev){
-       sdp_message_t *sdp=eXosip_get_sdp_info(ev->ack);
-       if (sdp){
-               sdp_context_read_answer(lc->call->sdpctx,sdp);
-               linphone_connect_incoming(lc);
-               sdp_message_free(sdp);
-       }
-}
-
-void linphone_handle_reinvite(LinphoneCore *lc, eXosip_event_t *ev){
-       sdp_message_t *sdp=eXosip_get_sdp_info(ev->request);
-       sdp_context_t *ctx;
-       LinphoneCall *call=lc->call;
-       char *answer;
-       int status;
-       if (sdp==NULL){
-               ms_warning("No sdp in reinvite !");
-               eXosip_lock();
-               eXosip_call_send_answer(ev->tid,603,NULL);
-               eXosip_unlock();
-               return;
-       }
-       ctx=call->sdpctx;
-       /* get the result of the negociation */
-       linphone_call_init_media_params(call);
-       answer=sdp_context_get_answer(ctx,sdp);
-       status=sdp_context_get_status(ctx);
-       if (status==200){
-               osip_message_t *msg=NULL;
-               linphone_core_stop_media_streams(lc);
-               linphone_core_init_media_streams(lc);
-               eXosip_lock();
-               if (eXosip_call_build_answer(ev->tid,200,&msg)<0){
-                       ms_warning("Reinvite for closed call ?");
-                        eXosip_unlock();
-                        linphone_core_stop_media_streams(lc);
-                       sdp_message_free(sdp);
-                       return ;
-               }
-               answer=call->sdpctx->answerstr; /* takes the sdp already computed*/
-               linphone_set_sdp(msg,answer);
-               eXosip_call_send_answer(ev->tid,200,msg);
-               eXosip_unlock();
-               linphone_core_start_media_streams(lc,call);
-       }else{
-               eXosip_lock();
-               eXosip_call_send_answer(ev->tid,status,NULL);
-               eXosip_unlock();
-       }
-       sdp_message_free(sdp);
-}
-
-void linphone_do_automatic_redirect(LinphoneCore *lc, const char *contact){
-       char *msg=ortp_strdup_printf(_("Redirected to %s..."),contact);
-       lc->vtable.display_status(lc,msg);
-       ms_free(msg);
-       if (lc->call!=NULL) linphone_call_destroy(lc->call);
-       lc->call=NULL;
-       linphone_core_invite(lc,contact);
-}
-
-void linphone_call_redirected(LinphoneCore *lc, eXosip_event_t *ev){
-       int code=osip_message_get_status_code(ev->response);
-       char *contact=NULL;
-       osip_contact_t *ct;
-       osip_message_get_contact(ev->response,0,&ct);
-       if (ct) osip_contact_to_str(ct,&contact);
-       switch(code){
-               case 380:
-                       lc->vtable.display_url(lc,_("User is not reachable at the moment but he invites you\nto contact him using the following alternate resource:"),contact);
-                       if (lc->call!=NULL) linphone_call_destroy(lc->call);
-                       lc->call=NULL;
-                       break;
-               case 302:
-                       linphone_do_automatic_redirect(lc,contact);
-                       break;
-       }
-       if (contact) osip_free(contact);
-}
-
-
-/* these are the SdpHandler callbacks: we are called in to be aware of the content
-of the SDP messages exchanged */
-
-int linphone_set_audio_offer(sdp_context_t *ctx)
-{
-       LinphoneCall *call=(LinphoneCall*)sdp_context_get_user_pointer(ctx);
-       LinphoneCore *lc=call->core;
-       PayloadType *codec;
-       MSList *elem;
-       sdp_payload_t payload;
-
-
-       elem=lc->codecs_conf.audio_codecs;
-       while(elem!=NULL){
-               codec=(PayloadType*) elem->data;
-               if (linphone_core_check_payload_type_usability(lc,codec) && payload_type_enabled(codec)){
-                       sdp_payload_init(&payload);
-                       payload.a_rtpmap=ortp_strdup_printf("%s/%i/1",codec->mime_type,codec->clock_rate);
-                       payload.pt=rtp_profile_get_payload_number_from_rtpmap(lc->local_profile,payload.a_rtpmap);
-                       payload.localport=call->audio_params.natd_port > 0 ?
-                                               call->audio_params.natd_port : lc->rtp_conf.audio_rtp_port;
-                       if (strcasecmp(codec->mime_type,"iLBC")==0){
-                               /* prefer the 30 ms mode */
-                               payload.a_fmtp="ptime=30";
-                       }
-                       sdp_context_add_audio_payload(ctx,&payload);
-                       ms_free(payload.a_rtpmap);
-               }
-               elem=ms_list_next(elem);
-       }
-       /* add telephone-event payload*/
-       sdp_payload_init(&payload);
-       payload.pt=rtp_profile_get_payload_number_from_mime(lc->local_profile,"telephone-event");
-       payload.a_rtpmap="telephone-event/8000";
-       payload.a_fmtp="0-11";
-       if (lc->dw_audio_bw>0) payload.b_as_bandwidth=lc->dw_audio_bw;
-       sdp_context_add_audio_payload(ctx,&payload);
-       return 0;
-}
-
-static int find_payload_type_number(RtpProfile *prof, PayloadType *pt){
-       int candidate=-1,i;
-       PayloadType *it;
-       for(i=0;i<127;++i){
-               it=rtp_profile_get_payload(prof,i);
-               if (it!=NULL && strcasecmp(pt->mime_type,it->mime_type)==0
-                       && (pt->clock_rate==it->clock_rate || pt->clock_rate<=0) ){
-                       if ( (pt->recv_fmtp && it->recv_fmtp && strcasecmp(pt->recv_fmtp,it->recv_fmtp)==0) ||
-                               (pt->recv_fmtp==NULL && it->recv_fmtp==NULL) ){
-                               /*exact match*/
-                               return i;
-                       }else candidate=i;
-               }
-       }
-       if (candidate==-1) ms_fatal("Should not happen.");
-       return candidate;
-}
-
-static int find_payload_type_number_best_match(RtpProfile *prof, const char *rtpmap, const char *fmtp){
-       int localpt=rtp_profile_get_payload_number_from_rtpmap(prof,rtpmap);
-       PayloadType *pt;
-       char value[10];
-       if (localpt<0) return -1;
-       pt=rtp_profile_get_payload(prof,localpt);
-       if (strcasecmp(pt->mime_type,"H264")==0){
-               /*hack for H264: need to answer with same packetization-mode*/
-               PayloadType tmp;
-               memset(&tmp,0,sizeof(tmp));
-               tmp.mime_type="H264";
-               tmp.clock_rate=pt->clock_rate;
-               if (fmtp && fmtp_get_value(fmtp,"packetization-mode",value,sizeof(value))){
-                       tmp.recv_fmtp=(atoi(value)==1) ? "packetization-mode=1" : NULL;
-               }
-               localpt=find_payload_type_number(prof,&tmp);
-       }
-       return localpt;
-}
-
-int linphone_set_video_offer(sdp_context_t *ctx)
-{
-       LinphoneCall *call=(LinphoneCall*)sdp_context_get_user_pointer(ctx);
-       LinphoneCore *lc=call->core;
-       PayloadType *codec;
-       MSList *elem;
-       bool_t firsttime=TRUE;
-
-       if (!linphone_core_video_enabled(lc)) return -1;
-
-       for(elem=lc->codecs_conf.video_codecs;elem!=NULL;elem=ms_list_next(elem)){
-               codec=(PayloadType*) elem->data;
-               if (linphone_core_check_payload_type_usability(lc,codec) && payload_type_enabled(codec)){
-                       sdp_payload_t payload;
-                       sdp_payload_init(&payload);
-                       payload.line=1;
-                       payload.a_rtpmap=ortp_strdup_printf("%s/%i",codec->mime_type,codec->clock_rate);
-                       payload.localport=call->video_params.natd_port>0 ?
-                                       call->video_params.natd_port : lc->rtp_conf.video_rtp_port;
-                       payload.pt=find_payload_type_number(lc->local_profile,codec);
-                       payload.a_fmtp=codec->recv_fmtp;
-                       if(firsttime){
-                               firsttime=FALSE;
-                               if (lc->dw_video_bw>0)
-                                       payload.b_as_bandwidth=lc->dw_video_bw;
-                       }
-                       sdp_context_add_video_payload(ctx,&payload);
-                       ms_free(payload.a_rtpmap);
-               }
-       }
-       return 0;
-}
-
-typedef enum {
-       Unsupported,
-       Supported,
-       SupportedAndValid  /* valid= the presence of this codec is enough to make a call */
-}SupportLevel;
-
-SupportLevel linphone_payload_is_supported(LinphoneCore *lc, sdp_payload_t *payload,RtpProfile *local_profile,RtpProfile *dialog_profile, bool_t answering, PayloadType **local_payload_type)
-{
-       int localpt;
-       SupportLevel ret;
-       if (payload->a_rtpmap!=NULL){
-               localpt=find_payload_type_number_best_match(local_profile,payload->a_rtpmap,payload->a_fmtp);
-       }else{
-               localpt=payload->pt;
-               ms_warning("payload has no rtpmap.");
-       }
-
-       if (localpt>=0 && localpt <128 ){
-               /* this payload is understood, but does the user want to use it ?? */
-               PayloadType *rtppayload;
-               rtppayload=rtp_profile_get_payload(local_profile,localpt);
-               if (rtppayload==NULL) {
-                       ms_warning("strange error !!");
-                       return Unsupported;
-               }
-               *local_payload_type=rtppayload;
-               if (strcmp(rtppayload->mime_type,"telephone-event")!=0){
-                       if (answering && !linphone_core_check_payload_type_usability(lc,rtppayload) ){
-                               ms_warning("payload %s is not usable",rtppayload->mime_type);
-                               return Unsupported;
-                       }
-                       if ( !payload_type_enabled(rtppayload)) {
-                               ms_warning("payload %s is not enabled.",rtppayload->mime_type);
-                               return Unsupported;
-                       }
-                       ret=SupportedAndValid;
-               }else ret=Supported;
-               if (dialog_profile!=NULL){
-                       int dbw,ubw;
-                       /* this payload is supported in our local rtp profile, so add it to the dialog rtp
-                       profile */
-                       rtppayload=payload_type_clone(rtppayload);
-                       if (rtp_profile_get_payload(dialog_profile,payload->pt)!=NULL){
-                               ms_error("Payload %s type already entered, should not happen !",rtppayload->mime_type);
-                       }
-                       rtp_profile_set_payload(dialog_profile,payload->pt,rtppayload);
-                       /* add to the rtp payload type some other parameters (bandwidth) */
-                       if (rtppayload->type==PAYLOAD_VIDEO){
-                               dbw=lc->dw_video_bw;
-                               ubw=lc->up_video_bw;
-                       }else{
-                               dbw=lc->dw_audio_bw;
-                               ubw=lc->up_audio_bw;
-                       }
-                       if (payload->b_as_bandwidth!=0){
-                               ms_message("Remote bandwidth constraint: %i",payload->b_as_bandwidth);
-                               /*obey to remote bandwidth constraint AND our own upbandwidth constraint*/
-                               rtppayload->normal_bitrate=1000*get_min_bandwidth(
-                                       payload->b_as_bandwidth, ubw);
-                       }else{
-                               /*limit to upload bandwidth if exist, else no limit*/
-                               if (ubw>0) rtppayload->normal_bitrate=1000*ubw;
-                               else {
-                                       if (rtppayload->type!=PAYLOAD_VIDEO){
-                                               rtppayload->normal_bitrate=-1; /*allow speex to use maximum bitrate*/
-                                       }
-                               }
-                       }
-                       if (payload->a_fmtp!=NULL){
-                               payload_type_set_send_fmtp(rtppayload,payload->a_fmtp);
-                       }
-                       payload->a_fmtp=rtppayload->recv_fmtp;
-                       if (payload->a_ptime>0){
-                               char tmp[30];
-                               snprintf(tmp,sizeof(tmp),"ptime=%i",payload->a_ptime);
-                               payload_type_append_send_fmtp(rtppayload,tmp);
-                               ms_message("%s attribute added to fmtp",tmp);
-                       }
-               }
-               return ret;
-       }
-       return Unsupported;
-}
-
-int linphone_accept_audio_offer(sdp_context_t *ctx,sdp_payload_t *payload)
-{
-       RtpProfile *remote_profile;
-       StreamParams *params;
-       SupportLevel supported;
-       LinphoneCall *call=(LinphoneCall*)sdp_context_get_user_pointer(ctx);
-       LinphoneCore *lc=call->core;
-       PayloadType *lpt=NULL;
-
-       params=&call->audio_params;
-       remote_profile=call->profile;
-       /* see if this codec is supported in our local rtp profile*/
-       supported=linphone_payload_is_supported(lc,payload,lc->local_profile,remote_profile,TRUE,&lpt);
-       if (supported==Unsupported) {
-               ms_message("Refusing audio codec %i (%s)",payload->pt,payload->a_rtpmap);
-               return -1;
-       }
-       if (lc->sip_conf.only_one_codec && params->initialized){
-               ms_message("Only one codec has to be accepted.");
-               return -1;
-       }
-       if (supported==SupportedAndValid) {
-               if (params->initialized==0){
-                       /* this is the first codec we accept, it is going to be used*/
-                       params->localport=lc->rtp_conf.audio_rtp_port;
-                       payload->localport=params->natd_port>0 ?
-                               params->natd_port : lc->rtp_conf.audio_rtp_port;
-                       params->line=payload->line;
-                       params->pt=payload->pt; /* remember the first payload accepted */
-                       if (payload->relay_host!=NULL){
-                               strncpy(params->remoteaddr,payload->relay_host,sizeof(params->remoteaddr)-1);
-                               params->remoteport=payload->relay_port;
-                               params->remotertcpport=payload->relay_port;
-                               params->relay_session_id=payload->relay_session_id;
-                       }else{
-                               strncpy(params->remoteaddr,payload->c_addr,sizeof(params->remoteaddr)-1);
-                               params->remoteport=payload->remoteport;
-                               params->remotertcpport=payload->remoteport+1;
-                       }
-                       params->initialized=1;
-                       /* we can now update the allocated bandwidth for audio, and then video*/
-                       linphone_core_update_allocated_audio_bandwidth_in_call(lc,lpt);
-                       /* give our download bandwidth constraint*/
-                       payload->b_as_bandwidth=(lc->dw_audio_bw>0) ? lc->dw_audio_bw : 0;
-               }else{
-                       /* refuse all other audio lines*/
-                       if(params->line!=payload->line) {
-                               ms_message("Only one audio line can be accepted.");
-#if !defined(_WIN32_WCE)
-                               abort();
-#endif /*_WIN32_WCE*/
-                               return -1;
-                       }
-               }
-       }
-       return 0;
-}
-
-int linphone_accept_video_offer(sdp_context_t *ctx,sdp_payload_t *payload)
-{
-       LinphoneCall *call=(LinphoneCall*)sdp_context_get_user_pointer(ctx);
-       LinphoneCore *lc=call->core;
-       RtpProfile *remote_profile;
-       StreamParams *params;
-       SupportLevel supported;
-       PayloadType *lpt=NULL;
-
-       if (!linphone_core_video_enabled(lc)) return -1;
-
-       if (payload->remoteport==0) {
-               ms_message("Video stream refused by remote.");
-               return 0;
-       }
-
-       params=&call->video_params;
-       remote_profile=call->profile;
-       /* see if this codec is supported in our local rtp profile*/
-       supported=linphone_payload_is_supported(lc,payload,lc->local_profile,remote_profile,TRUE,&lpt);
-       if (supported==Unsupported) {
-               ms_message("Refusing video codec %i (%s)",payload->pt,payload->a_rtpmap);
-               return -1;
-       }
-       if (lc->sip_conf.only_one_codec && params->initialized){
-               return -1;
-       }
-       if (supported==SupportedAndValid){
-               if (params->initialized==0){
-                       /* this is the first codec we may accept*/
-                       params->localport=lc->rtp_conf.video_rtp_port;
-                       payload->localport=params->natd_port>0 ? params->natd_port : lc->rtp_conf.video_rtp_port;
-                       params->line=payload->line;
-                       params->pt=payload->pt; /* remember the first payload accepted */
-                       if (payload->relay_host!=NULL){
-                               strncpy(params->remoteaddr,payload->relay_host,sizeof(params->remoteaddr)-1);
-                               params->remoteport=payload->relay_port;
-                               params->remotertcpport=payload->relay_port;
-                               params->relay_session_id=payload->relay_session_id;
-                       }else{
-                               strncpy(params->remoteaddr,payload->c_addr,sizeof(params->remoteaddr)-1);
-                               params->remoteport=payload->remoteport;
-                               params->remotertcpport=params->remoteport+1;
-                       }
-                       params->initialized=1;
-                       payload->b_as_bandwidth=(lc->dw_video_bw>0) ? lc->dw_video_bw : 0;
-               }else{
-                       /* refuse all other video lines*/
-                       if(params->line!=payload->line) return -1;
-               }
-       }
-       return 0;
-}
-
-int linphone_read_audio_answer(sdp_context_t *ctx,sdp_payload_t *payload)
-{
-       LinphoneCall *call=(LinphoneCall*)sdp_context_get_user_pointer(ctx);
-       LinphoneCore *lc=call->core;
-       StreamParams *params;
-       SupportLevel supported;
-       PayloadType *lpt=NULL;
-
-       /* paranoid check: see if this codec is supported in our local rtp profile*/
-       supported=linphone_payload_is_supported(lc, payload,lc->local_profile,call->profile,FALSE,&lpt);
-       if (supported==Unsupported) {
-               ms_warning("This remote sip phone did not answer properly to my sdp offer: rtpmap=%s",payload->a_rtpmap);
-               return 0;
-       }
-       if (supported==SupportedAndValid){
-               params=&call->audio_params;
-               if (params->initialized==0){
-                       /* this is the first codec we accept, this is the one that is going to be used (at least for sending
-                       data.*/
-                       params->localport=lc->rtp_conf.audio_rtp_port;
-                       params->line=payload->line;
-                       params->pt=payload->pt; /* remember the first payload accepted */
-                       if (payload->relay_host!=NULL){
-                               strncpy(params->remoteaddr,payload->relay_host,sizeof(params->remoteaddr)-1);
-                               params->remoteport=payload->relay_port;
-                               params->remotertcpport=payload->relay_port;
-                               params->relay_session_id=payload->relay_session_id;
-                       }else{
-                               strncpy(params->remoteaddr,payload->c_addr,sizeof(params->remoteaddr)-1);
-                               params->remoteport=payload->remoteport;
-                               params->remotertcpport=payload->remoteport+1;
-                       }
-                       params->initialized=1;
-                       /* we can now update the allocated bandwidth for audio, and then video*/
-                       linphone_core_update_allocated_audio_bandwidth_in_call(lc,lpt);
-               }
-       }
-       return 0;
-}
-
-int linphone_read_video_answer(sdp_context_t *ctx,sdp_payload_t *payload)
-{
-       LinphoneCall *call=(LinphoneCall*)sdp_context_get_user_pointer(ctx);
-       LinphoneCore *lc=call->core;
-       StreamParams *params;
-       SupportLevel supported;
-       PayloadType *lpt=NULL;
-
-       /* paranoid check: see if this codec is supported in our local rtp profile*/
-       supported=linphone_payload_is_supported(lc, payload,lc->local_profile,call->profile,FALSE,&lpt);
-       if (supported==Unsupported) {
-               ms_warning("This remote sip phone did not answer properly to my sdp offer: rtpmap=%s",payload->a_rtpmap);
-               return 0;
-       }
-       if (supported==SupportedAndValid){
-               params=&call->video_params;
-               if (params->initialized==0){
-                       /* this is the first codec we may accept*/
-                       params->localport=lc->rtp_conf.video_rtp_port;
-                       params->line=payload->line;
-                       params->pt=payload->pt; /* remember the first payload accepted */
-                       if (payload->relay_host!=NULL){
-                               strncpy(params->remoteaddr,payload->relay_host,sizeof(params->remoteaddr)-1);
-                               params->remoteport=payload->relay_port;
-                               params->remotertcpport=payload->relay_port;
-                               params->relay_session_id=payload->relay_session_id;
-                       }else{
-                               strncpy(params->remoteaddr,payload->c_addr,sizeof(params->remoteaddr)-1);
-                               params->remoteport=payload->remoteport;
-                               params->remotertcpport=payload->remoteport+1;
-                       }
-                       params->initialized=1;
-               }
-       }
-       return 0;
-}
-
-void linphone_call_ringing(LinphoneCore *lc, eXosip_event_t *ev){
-       sdp_message_t *sdp=eXosip_get_sdp_info(ev->response);
-       LinphoneCall *call=lc->call;
-
-       lc->vtable.display_status(lc,_("Remote ringing."));
-       linphone_call_proceeding(lc,ev);
-       if (call==NULL) return;
-       if (sdp==NULL){
-               if (lc->ringstream!=NULL) return;       /*already ringing !*/
-               if (lc->sound_conf.play_sndcard!=NULL){
-                       ms_message("Remote ringing...");
-                       lc->ringstream=ring_start(lc->sound_conf.remote_ring,2000,lc->sound_conf.play_sndcard);
-               }
-       }else{
-               /*accept early media */
-               StreamParams *audio_params;
-               if (call==NULL){
-                       ms_error("No call ?");
-                       goto end;
-               }
-               if (lc->audiostream->ticker!=NULL){
-                       /*streams already started */
-                       ms_message("Early media already started.");
-                       goto end;
-               }
-               audio_params=&call->audio_params;
-               sdp_context_read_answer(lc->call->sdpctx,sdp);
-               lc->vtable.show(lc);
-               lc->vtable.display_status(lc,_("Early media."));
-               gstate_new_state(lc, GSTATE_CALL_OUT_CONNECTED, NULL);
-               if (lc->ringstream!=NULL){
-                       ring_stop(lc->ringstream);
-                       lc->ringstream=NULL;
-               }
-               ms_message("Doing early media...");
-               linphone_core_start_media_streams(lc,call);
-       }
-       call->state=LCStateRinging;
-       goto end;
-       end:
-               sdp_message_free(sdp);
-
-}
-
-static void linphone_process_media_control_xml(LinphoneCore *lc, eXosip_event_t *ev){
-       osip_body_t *body=NULL;
-       osip_message_get_body(ev->request,0,&body);
-       if (body && body->body!=NULL &&
-               strstr(body->body,"picture_fast_update")){
-               osip_message_t *ans=NULL;
-               ms_message("Receiving VFU request !");
-#ifdef VIDEO_ENABLED
-               if (lc->videostream)
-                       video_stream_send_vfu(lc->videostream);
-#endif
-               eXosip_call_build_answer(ev->tid,200,&ans);
-               if (ans)
-                       eXosip_call_send_answer(ev->tid,200,ans);
-       }
-}
-
-static void linphone_process_dtmf_relay(LinphoneCore *lc, eXosip_event_t *ev){
-       osip_body_t *body=NULL;
-       osip_message_get_body(ev->request,0,&body);
-       if (body && body->body!=NULL){
-               osip_message_t *ans=NULL;
-               const char *name=strstr(body->body,"Signal");
-               if (name==NULL) name=strstr(body->body,"signal");
-               if (name==NULL) {
-                       ms_warning("Could not extract the dtmf name from the SIP INFO.");
-               }else{
-                       char tmp[2];
-                       name+=strlen("signal");
-                       if (sscanf(name," = %1s",tmp)==1){
-                               ms_message("Receiving dtmf %s via SIP INFO.",tmp);
-                               if (lc->vtable.dtmf_received != NULL)
-                                       lc->vtable.dtmf_received(lc, tmp[0]);
-                       }
-               }
-
-               eXosip_call_build_answer(ev->tid,200,&ans);
-               if (ans)
-                       eXosip_call_send_answer(ev->tid,200,ans);
-       }
-}
-
-void linphone_call_message_new(LinphoneCore *lc, eXosip_event_t *ev){
-       osip_message_t *ans=NULL;
-       if (ev->request){
-               if (MSG_IS_INFO(ev->request)){
-                       osip_content_type_t *ct;
-                       ct=osip_message_get_content_type(ev->request);
-                       if (ct && ct->subtype){
-                               if (strcmp(ct->subtype,"media_control+xml")==0)
-                                       linphone_process_media_control_xml(lc,ev);
-                               else if (strcmp(ct->subtype,"dtmf-relay")==0)
-                                       linphone_process_dtmf_relay(lc,ev);
-                               else {
-                                       ms_message("Unhandled SIP INFO.");
-                                       /*send an "Not implemented" answer*/
-                                       eXosip_call_build_answer(ev->tid,501,&ans);
-                                       if (ans)
-                                               eXosip_call_send_answer(ev->tid,501,ans);
-                               }
-                       }else{
-                               /*empty SIP INFO, probably to test we are alive. Send an empty answer*/
-                               eXosip_call_build_answer(ev->tid,200,&ans);
-                                       if (ans)
-                                               eXosip_call_send_answer(ev->tid,200,ans);
-                       }
-               }
-       }else ms_warning("linphone_call_message_new: No request ?");
-}
-
-void linphone_registration_faillure(LinphoneCore *lc, eXosip_event_t *ev){
-       int status_code=0;
-       char *msg;
-       const char *reason=NULL;
-       osip_uri_t *requri=osip_message_get_uri(ev->request);
-       char *ru;
-       LinphoneProxyConfig *cfg;
-
-       if (ev->response){
-               status_code=osip_message_get_status_code(ev->response);
-               reason=osip_message_get_reason_phrase(ev->response);
-       }
-       switch(status_code){
-               case 401:
-               case 407:
-                       linphone_process_authentication(lc,ev);
-                       break;
-               default:
-                       cfg=linphone_core_get_proxy_config_from_rid(lc,ev->rid);
-                       /* if contact is up to date, process the failure, otherwise resend a new register with
-                               updated contact first, just in case the faillure is due to incorrect contact */
-                       if (linphone_proxy_config_register_again_with_updated_contact(cfg,ev->request,ev->response))
-                               return; /*we are retrying with an updated contact*/
-                       if (status_code==403) linphone_proxy_config_process_authentication_failure(lc,ev);
-                       osip_uri_to_str(requri,&ru);
-                       msg=ortp_strdup_printf(_("Registration on %s failed: %s"),ru,(reason!=NULL) ? reason : _("no response timeout"));
-                       lc->vtable.display_status(lc,msg);
-                       gstate_new_state(lc, GSTATE_REG_FAILED, msg);
-                       ms_free(msg);
-                       osip_free(ru);
-       }
-}
-
-void linphone_registration_success(LinphoneCore *lc,eXosip_event_t *ev){
-       LinphoneProxyConfig *cfg;
-       osip_uri_t *requri=osip_message_get_uri(ev->request);
-       char *msg;
-       char *ru;
-       osip_header_t *h=NULL;
-
-       cfg=linphone_core_get_proxy_config_from_rid(lc,ev->rid);
-       ms_return_if_fail(cfg!=NULL);
-
-       gstate_new_state(lc, GSTATE_REG_OK, NULL);
-       osip_message_get_expires(ev->request,0,&h);
-       if (h!=NULL && atoi(h->hvalue)!=0){
-               cfg->registered=TRUE;
-               linphone_proxy_config_register_again_with_updated_contact(cfg,ev->request,ev->response);
-       }else cfg->registered=FALSE;
-
-       osip_uri_to_str(requri,&ru);
-       if (cfg->registered) msg=ms_strdup_printf(_("Registration on %s successful."),ru);
-       else msg=ms_strdup_printf(_("Unregistration on %s done."),ru);
-       lc->vtable.display_status(lc,msg);
-       ms_free(msg);
-       osip_free(ru);
-}
-
-static bool_t comes_from_local_if(osip_message_t *msg){
-       osip_via_t *via=NULL;
-       osip_message_get_via(msg,0,&via);
-       if (via){
-               const char *host;
-               host=osip_via_get_host(via);
-               if (strcmp(host,"127.0.0.1")==0 || strcmp(host,"::1")==0){
-                       osip_generic_param_t *param=NULL;
-                       osip_via_param_get_byname(via,"received",&param);
-                       if (param==NULL) return TRUE;
-                       if (param->gvalue &&
-                               (strcmp(param->gvalue,"127.0.0.1")==0 || strcmp(param->gvalue,"::1")==0)){
-                               return TRUE;
-                       }
-               }
-       }
-       return FALSE;
-}
-
-static void linphone_inc_update(LinphoneCore *lc, eXosip_event_t *ev){
-       osip_message_t *msg=NULL;
-       ms_message("Processing incoming UPDATE");
-       eXosip_lock();
-       eXosip_message_build_answer(ev->tid,200,&msg);
-       if (msg!=NULL)
-               eXosip_message_send_answer(ev->tid,200,msg);
-       eXosip_unlock();
-}
-
-static void linphone_other_request(LinphoneCore *lc, eXosip_event_t *ev){
-       ms_message("in linphone_other_request");
-       if (ev->request==NULL) return;
-       if (strcmp(ev->request->sip_method,"MESSAGE")==0){
-               linphone_core_text_received(lc,ev);
-               eXosip_message_send_answer(ev->tid,200,NULL);
-       }else if (strcmp(ev->request->sip_method,"OPTIONS")==0){
-               osip_message_t *options=NULL;
-               eXosip_options_build_answer(ev->tid,200,&options);
-               osip_message_set_allow(options,"INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, SUBSCRIBE, NOTIFY, INFO");
-               osip_message_set_accept(options,"application/sdp");
-               eXosip_options_send_answer(ev->tid,200,options);
-       }else if (strcmp(ev->request->sip_method,"WAKEUP")==0
-               && comes_from_local_if(ev->request)) {
-               eXosip_message_send_answer(ev->tid,200,NULL);
-               ms_message("Receiving WAKEUP request !");
-               if (lc->vtable.show)
-                       lc->vtable.show(lc);
-       }else if (strncmp(ev->request->sip_method, "REFER", 5) == 0){
-               ms_message("Receiving REFER request !");
-               if (comes_from_local_if(ev->request)) {
-                       osip_header_t *h=NULL;
-                       osip_message_header_get_byname(ev->request,"Refer-To",0,&h);
-                       eXosip_message_send_answer(ev->tid,200,NULL);
-                       if (h){
-                               if (lc->vtable.refer_received)
-                                       lc->vtable.refer_received(lc,h->hvalue);
-                       }
-
-               }else ms_warning("Ignored REFER not coming from this local loopback interface.");
-       }else if (strncmp(ev->request->sip_method, "UPDATE", 6) == 0){
-               linphone_inc_update(lc,ev);
-       }else {
-               char *tmp=NULL;
-               size_t msglen=0;
-               osip_message_to_str(ev->request,&tmp,&msglen);
-               if (tmp){
-                       ms_message("Unsupported request received:\n%s",tmp);
-                       osip_free(tmp);
-               }
-               /*answer with a 501 Not implemented*/
-               eXosip_message_send_answer(ev->tid,501,NULL);
-       }
-}
-
-void linphone_core_process_event(LinphoneCore *lc,eXosip_event_t *ev)
-{
-       switch(ev->type){
-               case EXOSIP_CALL_ANSWERED:
-                       ms_message("CALL_ANSWERED\n");
-                       linphone_call_accepted(lc,ev);
-                       linphone_authentication_ok(lc,ev);
-                       break;
-               case EXOSIP_CALL_CLOSED:
-               case EXOSIP_CALL_CANCELLED:
-                       ms_message("CALL_CLOSED or CANCELLED\n");
-                       linphone_call_terminated(lc,ev);
-                       break;
-               case EXOSIP_CALL_TIMEOUT:
-               case EXOSIP_CALL_NOANSWER:
-                       ms_message("CALL_TIMEOUT or NOANSWER\n");
-                       linphone_call_failure(lc,ev);
-                       break;
-               case EXOSIP_CALL_REQUESTFAILURE:
-               case EXOSIP_CALL_GLOBALFAILURE:
-               case EXOSIP_CALL_SERVERFAILURE:
-                       ms_message("CALL_REQUESTFAILURE or GLOBALFAILURE or SERVERFAILURE\n");
-                       linphone_call_failure(lc,ev);
-                       break;
-               case EXOSIP_CALL_INVITE:
-                       ms_message("CALL_NEW\n");
-                       /* CALL_NEW is used twice in qos mode :
-                        * when you receive invite (textinfo = "With QoS" or "Without QoS")
-                        * and when you receive update (textinfo = "New Call") */
-                       linphone_inc_new_call(lc,ev);
-                       break;
-               case EXOSIP_CALL_REINVITE:
-                       linphone_handle_reinvite(lc,ev);
-                       break;
-               case EXOSIP_CALL_ACK:
-                       ms_message("CALL_ACK");
-                       linphone_handle_ack(lc,ev);
-                       break;
-               case EXOSIP_CALL_REDIRECTED:
-                       ms_message("CALL_REDIRECTED");
-                       linphone_call_redirected(lc,ev);
-                       break;
-               case EXOSIP_CALL_PROCEEDING:
-                       ms_message("CALL_PROCEEDING");
-                       linphone_call_proceeding(lc,ev);
-                       break;
-               case EXOSIP_CALL_RINGING:
-                       ms_message("CALL_RINGING");
-                       linphone_call_ringing(lc,ev);
-                       break;
-               case EXOSIP_CALL_MESSAGE_NEW:
-                       ms_message("EXOSIP_CALL_MESSAGE_NEW");
-                       linphone_call_message_new(lc,ev);
-                       break;
-               case EXOSIP_CALL_MESSAGE_REQUESTFAILURE:
-                       if (ev->did<0 && ev->response &&
-                               (ev->response->status_code==407 || ev->response->status_code==401)){
-                                eXosip_default_action(ev);
-                       }
-                       break;
-               case EXOSIP_IN_SUBSCRIPTION_NEW:
-                       ms_message("CALL_SUBSCRIPTION_NEW or UPDATE");
-                       linphone_subscription_new(lc,ev);
-                       break;
-               case EXOSIP_SUBSCRIPTION_UPDATE:
-                       break;
-               case EXOSIP_SUBSCRIPTION_NOTIFY:
-                       ms_message("CALL_SUBSCRIPTION_NOTIFY");
-                       linphone_notify_recv(lc,ev);
-                       break;
-               case EXOSIP_SUBSCRIPTION_ANSWERED:
-                       ms_message("EXOSIP_SUBSCRIPTION_ANSWERED, ev->sid=%i\n",ev->sid);
-                       linphone_subscription_answered(lc,ev);
-                       break;
-               case EXOSIP_SUBSCRIPTION_CLOSED:
-                       ms_message("EXOSIP_SUBSCRIPTION_CLOSED\n");
-                       linphone_subscription_closed(lc,ev);
-                       break;
-               case EXOSIP_CALL_RELEASED:
-                       ms_message("CALL_RELEASED\n");
-                       linphone_call_released(lc, ev->cid);
-                       break;
-               case EXOSIP_REGISTRATION_FAILURE:
-                       ms_message("REGISTRATION_FAILURE\n");
-                       linphone_registration_faillure(lc,ev);
-                       break;
-               case EXOSIP_REGISTRATION_SUCCESS:
-                       linphone_authentication_ok(lc,ev);
-                       linphone_registration_success(lc,ev);
-                       break;
-               case EXOSIP_MESSAGE_NEW:
-                       linphone_other_request(lc,ev);
-                       break;
-               case EXOSIP_MESSAGE_REQUESTFAILURE:
-                       if (ev->response && (ev->response->status_code == 407 || ev->response->status_code == 401)){
-                               /*the user is expected to have registered to the proxy, thus password is known*/
-                               eXosip_default_action(ev);
-                       }
-                       break;
-               default:
-                       ms_message("Unhandled exosip event !");
-                       break;
-       }
-       eXosip_event_free(ev);
-}
diff --git a/linphone/coreapi/exevents.h b/linphone/coreapi/exevents.h
deleted file mode 100644 (file)
index c7e7baa..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-linphone
-Copyright (C) 2000  Simon MORLAT (simon.morlat@free.fr)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#ifndef EXEVENTS_H
-#define EXEVENTS_H
-#include <eXosip2/eXosip.h>
-#include "sdphandler.h"
-
-
-void linphone_core_process_event(LinphoneCore *lc, eXosip_event_t *ev);
-
-/* these are the SdpHandler callbacks: we are called in to be aware of the content
-of the SDP messages exchanged */
-
-int linphone_set_audio_offer(sdp_context_t *ctx);
-int linphone_set_video_offer(sdp_context_t *ctx);
-int linphone_accept_audio_offer(sdp_context_t *ctx,sdp_payload_t *payload);
-int linphone_accept_video_offer(sdp_context_t *ctx,sdp_payload_t *payload);
-int linphone_read_audio_answer(sdp_context_t *ctx,sdp_payload_t *payload);
-int linphone_read_video_answer(sdp_context_t *ctx,sdp_payload_t *payload);
-
-void linphone_core_text_received(LinphoneCore *lc, eXosip_event_t *ev);
-
-#endif
diff --git a/linphone/coreapi/fonis.c b/linphone/coreapi/fonis.c
deleted file mode 100644 (file)
index 040f68c..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
-linphone
-Copyright (C) 2000  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-
-#include "sipsetup.h"
-#include "p2pproxy.h"
-
-static ms_thread_t fonis_thread;
-
-
-static void *fonis_thread_func(void *arg){
-       if (p2pproxy_application_start(0,NULL)!=0){
-               ms_error("Fail to start fonis thread !");
-       }
-       return NULL;
-}
-
-static bool_t fonis_init(void){
-       static bool_t initd=FALSE;
-       if (!initd){
-               ms_thread_create(&fonis_thread,NULL,fonis_thread_func,NULL);
-               initd=TRUE;
-       }
-       return TRUE;
-}
-
-
-static int fonis_create_account(const char *uri, const char *passwd){
-       int err=p2pproxy_accountmgt_createAccount(uri);
-       if (err<0) return -1;
-       return 0;
-}
-
-static int fonis_login_account(SipSetupContext * ctx,const char *uri, const char *passwd){
-       if (p2pproxy_accountmgt_isValidAccount==P2PPROXY_ACCOUNTMGT_USER_EXIST) {
-               return 0;
-       }
-       else return -1;
-}
-
-static int fonis_get_proxy(SipSetupContext *ctx, const char *domain, char *proxy, size_t sz){
-       int err=p2pproxy_resourcemgt_lookup_sip_proxy(proxy,sz,(char*)domain);
-       if (err==0) return 0;
-       else return -1;
-}
-
-static int fonis_get_stun_servers(SipSetupContext *ctx, char *stun1, char *stun2, size_t size){
-       FonisContext *fc=(FonisContext*)ctx->data;
-       int ret=-1;
-       p2pproxy_resourcemgt_resource_list_t* l=p2pproxy_resourcemgt_new_resource_list();
-       if (p2pproxy_resourcemgt_lookup_media_resource(l,ctx->domain)==0){
-               if (l->size>0) strncpy(stun1,l->resource_uri[0],size);
-               if (l->size>1) strncpy(stun2,l->resource_uri[1],size);
-               ret=0;
-       }
-       p2pproxy_resourcemgt_delete_resource_list(l);
-       return ret;
-}
-
-static int fonis_get_stun_relay(SipSetupContext *ctx, char *relay, size_t size){
-       FonisContext *fc=(FonisContext*)ctx->data;
-       int ret=-1;
-       p2pproxy_resourcemgt_resource_list_t* l=p2pproxy_resourcemgt_new_resource_list();
-       if (p2pproxy_resourcemgt_lookup_media_resource(l,ctx->domain)==0){
-               if (l->size>0) strncpy(relay,l->resource_uri[0],size);
-               ret=0;
-       }
-       p2pproxy_resourcemgt_delete_resource_list(l);
-       return ret;
-}
-
-
-SipSetup fonis_sip_setup={
-       .name="fonis",
-       .init=fonis_init,
-       .create_account=fonis_create_account,
-       .login_account=fonis_login_account,
-       .get_proxy=fonis_get_proxy,
-       .get_stun_servers=fonis_get_stun_servers,
-       .get_relay=fonis_get_relay,
-       .exit=p2pproxy_application_stop
-};
-
diff --git a/linphone/coreapi/friend.c b/linphone/coreapi/friend.c
deleted file mode 100644 (file)
index 08f072d..0000000
+++ /dev/null
@@ -1,822 +0,0 @@
-/***************************************************************************
- *            friend.c
- *
- *  Sat May 15 15:25:16 2004
- *  Copyright  2004-2009  Simon Morlat
- *  Email
- ****************************************************************************/
-
-/*
- *  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 Library General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#include "linphonecore.h"
-#include "private.h"
-#include <eXosip2/eXosip.h>
-#include <osipparser2/osip_message.h>
-#include "lpconfig.h"
-
-const char *linphone_online_status_to_string(LinphoneOnlineStatus ss){
-       const char *str=NULL;
-       switch(ss){
-               case LINPHONE_STATUS_UNKNOWN:
-               str=_("Unknown");
-               break;
-               case LINPHONE_STATUS_ONLINE:
-               str=_("Online");
-               break;
-               case LINPHONE_STATUS_BUSY:
-               str=_("Busy");
-               break;
-               case LINPHONE_STATUS_BERIGHTBACK:
-               str=_("Be right back");
-               break;
-               case LINPHONE_STATUS_AWAY:
-               str=_("Away");
-               break;
-               case LINPHONE_STATUS_ONTHEPHONE:
-               str=_("On the phone");
-               break;
-               case LINPHONE_STATUS_OUTTOLUNCH:
-               str=_("Out to lunch");
-               break;
-               case LINPHONE_STATUS_NOT_DISTURB:
-               str=_("Do not disturb");
-               break;
-               case LINPHONE_STATUS_MOVED:
-               str=_("Moved");
-               break;
-               case LINPHONE_STATUS_ALT_SERVICE:
-               str=_("Using another messaging service");
-               break;
-               case LINPHONE_STATUS_OFFLINE:
-               str=_("Offline");
-               break;
-               case LINPHONE_STATUS_PENDING:
-               str=_("Pending");
-               break;
-               case LINPHONE_STATUS_CLOSED:
-               str=_("Closed");
-               break;
-               default:
-               str=_("Unknown-bug");
-       }
-       return str;
-}
-
-static int friend_data_compare(const void * a, const void * b, void * data){
-       LinphoneAddress *fa=((LinphoneFriend*)a)->uri;
-       LinphoneAddress *fb=((LinphoneFriend*)b)->uri;
-       const char *ua,*ub;
-       ua=linphone_address_get_username(fa);
-       ub=linphone_address_get_username(fb);
-       if (ua!=NULL && ub!=NULL) {
-               //printf("Comparing usernames %s,%s\n",ua,ub);
-               return strcasecmp(ua,ub);
-       }
-       else {
-               /* compare hosts*/
-               ua=linphone_address_get_domain(fa);
-               ub=linphone_address_get_domain(fb);
-               if (ua!=NULL && ub!=NULL){
-                       int ret=strcasecmp(ua,ub);
-                       //printf("Comparing hostnames %s,%s,res=%i\n",ua,ub,ret);
-                       return ret;
-               }
-               else return -1;
-       }
-}
-
-static int friend_compare(const void * a, const void * b){
-       return friend_data_compare(a,b,NULL);
-}
-
-
-MSList *linphone_find_friend(MSList *fl, const LinphoneAddress *friend, LinphoneFriend **lf){
-       MSList *res=NULL;
-       LinphoneFriend dummy;
-       if (lf!=NULL) *lf=NULL;
-       dummy.uri=(LinphoneAddress*)friend;
-       res=ms_list_find_custom(fl,friend_compare,&dummy);
-       if (lf!=NULL && res!=NULL) *lf=(LinphoneFriend*)res->data;
-       return res;
-}
-
-LinphoneFriend *linphone_find_friend_by_nid(MSList *l, int nid){
-       MSList *elem;
-       for (elem=l;elem!=NULL;elem=elem->next){
-               LinphoneFriend *lf=(LinphoneFriend*)elem->data;
-               if (lf->nid==nid) return lf;
-       }
-       return NULL;
-}
-
-LinphoneFriend *linphone_find_friend_by_sid(MSList *l, int sid){
-       MSList *elem;
-       for (elem=l;elem!=NULL;elem=elem->next){
-               LinphoneFriend *lf=(LinphoneFriend*)elem->data;
-               if (lf->sid==sid) return lf;
-       }
-       return NULL;
-}
-
-void __linphone_friend_do_subscribe(LinphoneFriend *fr){
-       char *friend=NULL;
-       const char *route=NULL;
-       const char *from=NULL;
-       osip_message_t *msg=NULL;
-       friend=linphone_address_as_string(fr->uri);
-       if (fr->proxy!=NULL){
-               route=fr->proxy->reg_route;
-               from=fr->proxy->reg_identity;
-       }else from=linphone_core_get_primary_contact(fr->lc);
-       if (fr->sid<0){
-               /* people for which we don't have yet an answer should appear as offline */
-               fr->lc->vtable.notify_recv(fr->lc,(LinphoneFriend*)fr,friend,_("Gone"),"sip-closed.png");
-       }
-       eXosip_lock();
-       eXosip_subscribe_build_initial_request(&msg,friend,from,route,"presence",600);
-       eXosip_subscribe_send_initial_request(msg);
-       eXosip_unlock();
-       ms_free(friend);
-}
-
-
-LinphoneFriend * linphone_friend_new(){
-       LinphoneFriend *obj=ms_new0(LinphoneFriend,1);
-       obj->out_did=-1;
-       obj->in_did=-1;
-       obj->nid=-1;
-       obj->sid=-1;
-       obj->pol=LinphoneSPAccept;
-       obj->status=LINPHONE_STATUS_OFFLINE;
-       obj->subscribe=TRUE;
-       return obj;     
-}
-
-LinphoneFriend *linphone_friend_new_with_addr(const char *addr){
-       LinphoneFriend *fr=linphone_friend_new();
-       if (linphone_friend_set_sip_addr(fr,addr)<0){
-               linphone_friend_destroy(fr);
-               return NULL;
-       }
-       return fr;
-}
-
-void linphone_core_interpret_friend_uri(LinphoneCore *lc, const char *uri, char **result){
-       LinphoneAddress *fr=NULL;
-       *result=NULL;
-       fr=linphone_address_new(uri);
-       if (fr==NULL){
-               char *tmp=NULL;
-               if (strchr(uri,'@')!=NULL){
-                       LinphoneAddress *u;
-                       /*try adding sip:*/
-                       tmp=ms_strdup_printf("sip:%s",uri);
-                       u=linphone_address_new(tmp);
-                       if (u!=NULL){
-                               *result=tmp;
-                       }
-               }else if (lc->default_proxy!=NULL){
-                       /*try adding domain part from default current proxy*/
-                       LinphoneAddress * id=linphone_address_new(linphone_core_get_identity(lc));
-                       if (id!=NULL){
-                               linphone_address_set_username(id,uri);
-                               *result=linphone_address_as_string(id);
-                               linphone_address_destroy(id);
-                       }
-               }
-               if (*result){
-                       /*looks good */
-                       ms_message("%s interpreted as %s",uri,*result);
-               }else{
-                       ms_warning("Fail to interpret friend uri %s",uri);
-               }
-       }else *result=linphone_address_as_string(fr);
-       linphone_address_destroy(fr);
-}
-
-int linphone_friend_set_sip_addr(LinphoneFriend *lf, const char *addr){
-       LinphoneAddress *fr=linphone_address_new(addr);
-       if (fr==NULL) {
-               ms_warning("Invalid friend sip uri: %s",addr);
-               return -1;
-       }
-       if (lf->uri!=NULL) linphone_address_destroy(lf->uri);   
-       lf->uri=fr;
-       return 0;
-}
-
-int linphone_friend_set_name(LinphoneFriend *lf, const char *name){
-       LinphoneAddress *fr=lf->uri;
-       if (fr==NULL){
-               ms_error("linphone_friend_set_sip_addr() must be called before linphone_friend_set_name().");
-               return -1;
-       }
-       linphone_address_set_display_name(fr,name);
-       return 0;
-}
-
-int linphone_friend_send_subscribe(LinphoneFriend *fr, bool_t val){
-       fr->subscribe=val;
-       return 0;
-}
-
-int linphone_friend_set_inc_subscribe_policy(LinphoneFriend *fr, LinphoneSubscribePolicy pol)
-{
-       fr->pol=pol;
-       return 0;
-}
-
-int linphone_friend_set_proxy(LinphoneFriend *fr, struct _LinphoneProxyConfig *cfg){
-       fr->proxy=cfg;
-       return 0;
-}
-
-void linphone_friend_set_sid(LinphoneFriend *lf, int sid){
-       lf->sid=sid;
-}
-void linphone_friend_set_nid(LinphoneFriend *lf, int nid){
-       lf->nid=nid;
-       lf->inc_subscribe_pending=TRUE;
-}
-
-void add_presence_body(osip_message_t *notify, LinphoneOnlineStatus online_status)
-{
-       char buf[1000];
-#ifdef SUPPORT_MSN
-       int atom_id = 1000;
-#endif
-       char *contact_info;
-
-       osip_contact_t *ct=NULL;
-       osip_message_get_contact(notify,0,&ct);
-       osip_contact_to_str(ct,&contact_info);
-
-#ifdef SUPPORT_MSN
-
-  if (online_status==LINPHONE_STATUS_ONLINE)
-    {
-      sprintf(buf, "<?xml version=\"1.0\"?>\n\
-<!DOCTYPE presence\n\
-PUBLIC \"-//IETF//DTD RFCxxxx XPIDF 1.0//EN\" \"xpidf.dtd\">\n\
-<presence>\n\
-<presentity uri=\"%s;method=SUBSCRIBE\" />\n\
-<atom id=\"%i\">\n\
-<address uri=\"%s;user=ip\" priority=\"0.800000\">\n\
-<status status=\"open\" />\n\
-<msnsubstatus substatus=\"online\" />\n\
-</address>\n\
-</atom>\n\
-</presence>", contact_info, atom_id, contact_info);
-
-    }
-  else if (online_status==LINPHONE_STATUS_BUSY)
-    {
-      sprintf(buf, "<?xml version=\"1.0\"?>\n\
-<!DOCTYPE presence\n\
-PUBLIC \"-//IETF//DTD RFCxxxx XPIDF 1.0//EN\" \"xpidf.dtd\">\n\
-<presence>\n\
-<presentity uri=\"%s;method=SUBSCRIBE\" />\n\
-<atom id=\"%i\">\n\
-<address uri=\"%s;user=ip\" priority=\"0.800000\">\n\
-<status status=\"inuse\" />\n\
-<msnsubstatus substatus=\"busy\" />\n\
-</address>\n\
-</atom>\n\
-</presence>", contact_info, atom_id, contact_info);
-
-    }
-  else if (online_status==LINPHONE_STATUS_BERIGHTBACK)
-    {
-      sprintf(buf, "<?xml version=\"1.0\"?>\n\
-<!DOCTYPE presence\n\
-PUBLIC \"-//IETF//DTD RFCxxxx XPIDF 1.0//EN\" \"xpidf.dtd\">\n\
-<presence>\n\
-<presentity uri=\"%s;method=SUBSCRIBE\" />\n\
-<atom id=\"%i\">\n\
-<address uri=\"%s;user=ip\" priority=\"0.800000\">\n\
-<status status=\"inactive\" />\n\
-<msnsubstatus substatus=\"berightback\" />\n\
-</address>\n\
-</atom>\n\
-</presence>", contact_info, atom_id, contact_info);
-
-    }
-  else if (online_status==LINPHONE_STATUS_AWAY)
-    {
-      sprintf(buf, "<?xml version=\"1.0\"?>\n\
-<!DOCTYPE presence\n\
-PUBLIC \"-//IETF//DTD RFCxxxx XPIDF 1.0//EN\" \"xpidf.dtd\">\n\
-<presence>\n\
-<presentity uri=\"%s;method=SUBSCRIBE\" />\n\
-<atom id=\"%i\">\n\
-<address uri=\"%s;user=ip\" priority=\"0.800000\">\n\
-<status status=\"inactive\" />\n\
-<msnsubstatus substatus=\"away\" />\n\
-</address>\n\
-</atom>\n\
-</presence>", contact_info, atom_id, contact_info);
-
-    }
-  else if (online_status==LINPHONE_STATUS_ONTHEPHONE)
-    {
-      sprintf(buf, "<?xml version=\"1.0\"?>\n\
-<!DOCTYPE presence\n\
-PUBLIC \"-//IETF//DTD RFCxxxx XPIDF 1.0//EN\" \"xpidf.dtd\">\n\
-<presence>\n\
-<presentity uri=\"%s;method=SUBSCRIBE\" />\n\
-<atom id=\"%i\">\n\
-<address uri=\"%s;user=ip\" priority=\"0.800000\">\n\
-<status status=\"inuse\" />\n\
-<msnsubstatus substatus=\"onthephone\" />\n\
-</address>\n\
-</atom>\n\
-</presence>", contact_info, atom_id, contact_info);
-
-    }
-  else if (online_status==LINPHONE_STATUS_OUTTOLUNCH)
-    {
-      sprintf(buf, "<?xml version=\"1.0\"?>\n\
-<!DOCTYPE presence\n\
-PUBLIC \"-//IETF//DTD RFCxxxx XPIDF 1.0//EN\" \"xpidf.dtd\">\n\
-<presence>\n\
-<presentity uri=\"%s;method=SUBSCRIBE\" />\n\
-<atom id=\"%i\">\n\
-<address uri=\"%s;user=ip\" priority=\"0.800000\">\n\
-<status status=\"inactive\" />\n\
-<msnsubstatus substatus=\"outtolunch\" />\n\
-</address>\n\
-</atom>\n\
-</presence>", contact_info, atom_id, contact_info);
-
-    }
-  else
-    {
-      sprintf(buf, "<?xml version=\"1.0\"?>\n\
-<!DOCTYPE presence\n\
-PUBLIC \"-//IETF//DTD RFCxxxx XPIDF 1.0//EN\" \"xpidf.dtd\">\n\
-<presence>\n\
-<presentity uri=\"%s;method=SUBSCRIBE\" />\n\
-<atom id=\"%i\">\n\
-<address uri=\"%s;user=ip\" priority=\"0.800000\">\n\
-<status status=\"inactive\" />\n\
-<msnsubstatus substatus=\"away\" />\n\
-</address>\n\
-</atom>\n\
-</presence>", contact_info, atom_id, contact_info);
-    }
-
-  osip_message_set_body(notify, buf, strlen(buf));
-  osip_message_set_content_type(notify, "application/xpidf+xml");
-#else
-
-  if (online_status==LINPHONE_STATUS_ONLINE)
-    {
-      sprintf(buf, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
-<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
-          entity=\"%s\">\n\
-<tuple id=\"sg89ae\">\n\
-<status>\n\
-<basic>open</basic>\n\
-</status>\n\
-<contact priority=\"0.8\">%s</contact>\n\
-<note>online</note>\n\
-</tuple>\n\
-</presence>",
-             contact_info, contact_info);
-    }
-  else if (online_status==LINPHONE_STATUS_BUSY)
-    {
-      sprintf(buf, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
-<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
-          xmlns:es=\"urn:ietf:params:xml:ns:pidf:status:rpid-status\"\n\
-          entity=\"%s\">\n\
-<tuple id=\"sg89ae\">\n\
-<status>\n\
-<basic>open</basic>\n\
-<es:activities>\n\
-  <es:activity>busy</es:activity>\n\
-</es:activities>\n\
-</status>\n\
-<contact priority=\"0.8\">%s</contact>\n\
-<note>busy</note>\n\
-</tuple>\n\
-</presence>",
-             contact_info, contact_info);
-    }
-  else if (online_status==LINPHONE_STATUS_BERIGHTBACK)
-    {
-      sprintf(buf, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
-<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
-          xmlns:es=\"urn:ietf:params:xml:ns:pidf:status:rpid-status\"\n\
-          entity=\"%s\">\n\
-<tuple id=\"sg89ae\">\n\
-<status>\n\
-<basic>open</basic>\n\
-<es:activities>\n\
-  <es:activity>in-transit</es:activity>\n\
-</es:activities>\n\
-</status>\n\
-<contact priority=\"0.8\">%s</contact>\n\
-<note>be right back</note>\n\
-</tuple>\n\
-</presence>",
-             contact_info, contact_info);
-    }
-  else if (online_status==LINPHONE_STATUS_AWAY)
-    {
-      sprintf(buf, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
-<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
-          xmlns:es=\"urn:ietf:params:xml:ns:pidf:status:rpid-status\"\n\
-          entity=\"%s\">\n\
-<tuple id=\"sg89ae\">\n\
-<status>\n\
-<basic>open</basic>\n\
-<es:activities>\n\
-  <es:activity>away</es:activity>\n\
-</es:activities>\n\
-</status>\n\
-<contact priority=\"0.8\">%s</contact>\n\
-<note>away</note>\n\
-</tuple>\n\
-</presence>",
-             contact_info, contact_info);
-    }
-  else if (online_status==LINPHONE_STATUS_ONTHEPHONE)
-    {
-      sprintf(buf, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
-<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
-          xmlns:es=\"urn:ietf:params:xml:ns:pidf:status:rpid-status\"\n\
-          entity=\"%s\">\n\
-<tuple id=\"sg89ae\">\n\
-<status>\n\
-<basic>open</basic>\n\
-<es:activities>\n\
-  <es:activity>on-the-phone</es:activity>\n\
-</es:activities>\n\
-</status>\n\
-<contact priority=\"0.8\">%s</contact>\n\
-<note>on the phone</note>\n\
-</tuple>\n\
-</presence>",
-             contact_info, contact_info);
-    }
-  else if (online_status==LINPHONE_STATUS_OUTTOLUNCH)
-    {
-      sprintf(buf, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
-<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
-          xmlns:es=\"urn:ietf:params:xml:ns:pidf:status:rpid-status\"\n\
-          entity=\"%s\">\n\
-<tuple id=\"sg89ae\">\n\
-<status>\n\
-<basic>open</basic>\n\
-<es:activities>\n\
-  <es:activity>meal</es:activity>\n\
-</es:activities>\n\
-</status>\n\
-<contact priority=\"0.8\">%s</contact>\n\
-<note>out to lunch</note>\n\
-</tuple>\n\
-</presence>",
-             contact_info, contact_info);
-    }
-  else
-    {
-      /* */
-      sprintf(buf, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
-<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
-xmlns:es=\"urn:ietf:params:xml:ns:pidf:status:rpid-status\"\n\
-entity=\"%s\">\n%s",
-             contact_info,
-"<tuple id=\"sg89ae\">\n\
-<status>\n\
-<basic>closed</basic>\n\
-<es:activities>\n\
-  <es:activity>permanent-absence</es:activity>\n\
-</es:activities>\n\
-</status>\n\
-</tuple>\n\
-\n</presence>\n");
-    }
-  osip_message_set_body(notify, buf, strlen(buf));
-  osip_message_set_content_type(notify, "application/pidf+xml");
-
-#endif
-       osip_free(contact_info);
-}
-
-
-void linphone_friend_notify(LinphoneFriend *lf, int ss, LinphoneOnlineStatus os){
-       //printf("Wish to notify %p, lf->nid=%i\n",lf,lf->nid);
-       if (lf->in_did!=-1){
-               osip_message_t *msg=NULL;
-               const char *identity;
-               if (lf->proxy!=NULL) identity=lf->proxy->reg_identity;
-               else identity=linphone_core_get_primary_contact(lf->lc);
-               eXosip_lock();
-               eXosip_insubscription_build_notify(lf->in_did,ss,0,&msg);
-               if (msg!=NULL){
-                       osip_message_set_contact(msg,identity);
-                       add_presence_body(msg,os);
-                       eXosip_insubscription_send_request(lf->in_did,msg);
-               }else ms_error("could not create notify for incoming subscription.");
-               eXosip_unlock();
-       }
-}
-
-static void linphone_friend_unsubscribe(LinphoneFriend *lf){
-       if (lf->out_did!=-1) {
-               osip_message_t *msg=NULL;
-               eXosip_lock();
-               eXosip_subscribe_build_refresh_request(lf->out_did,&msg);
-               if (msg){
-                       osip_message_set_expires(msg,"0");
-                       eXosip_subscribe_send_refresh_request(lf->out_did,msg);
-               }else ms_error("Could not build subscribe refresh request !");
-               eXosip_unlock();
-       }
-}
-
-void linphone_friend_destroy(LinphoneFriend *lf){
-       linphone_friend_notify(lf,EXOSIP_SUBCRSTATE_TERMINATED,LINPHONE_STATUS_CLOSED);
-       linphone_friend_unsubscribe(lf);
-       if (lf->uri!=NULL) linphone_address_destroy(lf->uri);
-       if (lf->info!=NULL) buddy_info_free(lf->info);
-       ms_free(lf);
-}
-
-void linphone_friend_check_for_removed_proxy(LinphoneFriend *lf, LinphoneProxyConfig *cfg){
-       if (lf->proxy==cfg){
-               lf->proxy=NULL;
-       }
-}
-
-const LinphoneAddress *linphone_friend_get_uri(const LinphoneFriend *lf){
-       return lf->uri;
-}
-
-
-bool_t linphone_friend_get_send_subscribe(const LinphoneFriend *lf){
-       return lf->subscribe;
-}
-
-LinphoneSubscribePolicy linphone_friend_get_inc_subscribe_policy(const LinphoneFriend *lf){
-       return lf->pol;
-}
-
-LinphoneOnlineStatus linphone_friend_get_status(const LinphoneFriend *lf){
-       return lf->status;
-}
-
-BuddyInfo * linphone_friend_get_info(const LinphoneFriend *lf){
-       return lf->info;
-}
-
-void linphone_friend_apply(LinphoneFriend *fr, LinphoneCore *lc){
-       if (fr->uri==NULL) {
-               ms_warning("No sip url defined.");
-               return;
-       }
-       fr->lc=lc;
-       
-       linphone_core_write_friends_config(lc);
-
-       if (fr->inc_subscribe_pending){
-               switch(fr->pol){
-                       case LinphoneSPWait:
-                               linphone_friend_notify(fr,EXOSIP_SUBCRSTATE_PENDING,LINPHONE_STATUS_PENDING);
-                               break;
-                       case LinphoneSPAccept:
-                               if (fr->lc!=NULL)
-                                 {
-                                       linphone_friend_notify(fr,EXOSIP_SUBCRSTATE_ACTIVE,fr->lc->presence_mode);
-                                 }
-                               break;
-                       case LinphoneSPDeny:
-                               linphone_friend_notify(fr,EXOSIP_SUBCRSTATE_TERMINATED,LINPHONE_STATUS_CLOSED);
-                               break;
-               }
-               fr->inc_subscribe_pending=FALSE;
-       }
-       if (fr->subscribe && fr->out_did==-1){
-               
-               __linphone_friend_do_subscribe(fr);
-       }
-       ms_message("linphone_friend_apply() done.");
-       lc->bl_refresh=TRUE;
-}
-
-void linphone_friend_edit(LinphoneFriend *fr){
-}
-
-void linphone_friend_done(LinphoneFriend *fr){
-       ms_return_if_fail(fr!=NULL);
-       if (fr->lc==NULL) return;
-       linphone_friend_apply(fr,fr->lc);
-}
-
-void linphone_core_add_friend(LinphoneCore *lc, LinphoneFriend *lf)
-{
-       ms_return_if_fail(lf->lc==NULL);
-       ms_return_if_fail(lf->uri!=NULL);
-       lc->friends=ms_list_append(lc->friends,lf);
-       linphone_friend_apply(lf,lc);
-       return ;
-}
-
-void linphone_core_remove_friend(LinphoneCore *lc, LinphoneFriend* fl){
-       MSList *el=ms_list_find(lc->friends,(void *)fl);
-       if (el!=NULL){
-               lc->friends=ms_list_remove_link(lc->friends,el);
-               linphone_friend_destroy((LinphoneFriend*)el->data);
-               linphone_core_write_friends_config(lc);
-       }
-}
-
-void linphone_friend_set_ref_key(LinphoneFriend *lf, const char *key){
-       if (lf->refkey!=NULL){
-               ms_free(lf->refkey);
-               lf->refkey=NULL;
-       }
-       if (key)
-               lf->refkey=ms_strdup(key);
-       if (lf->lc)
-               linphone_core_write_friends_config(lf->lc);
-}
-
-const char *linphone_friend_get_ref_key(const LinphoneFriend *lf){
-       return lf->refkey;
-}
-
-static bool_t username_match(const char *u1, const char *u2){
-       if (u1==NULL && u2==NULL) return TRUE;
-       if (u1 && u2 && strcasecmp(u1,u2)==0) return TRUE;
-       return FALSE;
-}
-
-LinphoneFriend *linphone_core_get_friend_by_uri(const LinphoneCore *lc, const char *uri){
-       LinphoneAddress *puri=linphone_address_new(uri);
-       const MSList *elem;
-       const char *username=linphone_address_get_username(puri);
-       const char *domain=linphone_address_get_domain(puri);
-       LinphoneFriend *lf=NULL;
-               
-       if (puri==NULL){
-               return NULL;
-       }
-       for(elem=lc->friends;elem!=NULL;elem=ms_list_next(elem)){
-               lf=(LinphoneFriend*)elem->data;
-               const char *it_username=linphone_address_get_username(lf->uri);
-               const char *it_host=linphone_address_get_domain(lf->uri);;
-               if (strcasecmp(domain,it_host)==0 && username_match(username,it_username)){
-                       break;
-               }
-               lf=NULL;
-       }
-       linphone_address_destroy(puri);
-       return lf;
-}
-
-LinphoneFriend *linphone_core_get_friend_by_ref_key(const LinphoneCore *lc, const char *key){
-       const MSList *elem;
-       if (key==NULL) return NULL;
-       for(elem=linphone_core_get_friend_list(lc);elem!=NULL;elem=elem->next){
-               LinphoneFriend *lf=(LinphoneFriend*)elem->data;
-               if (lf->refkey!=NULL && strcmp(lf->refkey,key)==0){
-                       return lf;
-               }
-       }
-       return NULL;
-}
-
-#define key_compare(s1,s2)     strcmp(s1,s2)
-
-LinphoneSubscribePolicy __policy_str_to_enum(const char* pol){
-       if (key_compare("accept",pol)==0){
-               return LinphoneSPAccept;
-       }
-       if (key_compare("deny",pol)==0){
-               return LinphoneSPDeny;
-       }
-       if (key_compare("wait",pol)==0){
-               return LinphoneSPWait;
-       }
-       ms_warning("Unrecognized subscribe policy: %s",pol);
-       return LinphoneSPWait;
-}
-
-LinphoneProxyConfig *__index_to_proxy(LinphoneCore *lc, int index){
-       if (index>=0) return (LinphoneProxyConfig*)ms_list_nth_data(lc->sip_conf.proxies,index);
-       else return NULL;
-}
-
-LinphoneFriend * linphone_friend_new_from_config_file(LinphoneCore *lc, int index){
-       const char *tmp;
-       char item[50];
-       int a;
-       LinphoneFriend *lf;
-       LpConfig *config=lc->config;
-       
-       sprintf(item,"friend_%i",index);
-       
-       if (!lp_config_has_section(config,item)){
-               return NULL;
-       }
-       
-       tmp=lp_config_get_string(config,item,"url",NULL);
-       if (tmp==NULL) {
-               return NULL;
-       }
-       lf=linphone_friend_new_with_addr(tmp);
-       if (lf==NULL) {
-               return NULL;
-       }
-       tmp=lp_config_get_string(config,item,"pol",NULL);
-       if (tmp==NULL) linphone_friend_set_inc_subscribe_policy(lf,LinphoneSPWait);
-       else{
-               linphone_friend_set_inc_subscribe_policy(lf,__policy_str_to_enum(tmp));
-       }
-       a=lp_config_get_int(config,item,"subscribe",0);
-       linphone_friend_send_subscribe(lf,a);
-               
-       a=lp_config_get_int(config,item,"proxy",-1);
-       if (a!=-1) {
-               linphone_friend_set_proxy(lf,__index_to_proxy(lc,a));
-       }
-       linphone_friend_set_ref_key(lf,lp_config_get_string(config,item,"refkey",NULL));
-       return lf;
-}
-
-const char *__policy_enum_to_str(LinphoneSubscribePolicy pol){
-       switch(pol){
-               case LinphoneSPAccept:
-                       return "accept";
-                       break;
-               case LinphoneSPDeny:
-                       return "deny";
-                       break;
-               case LinphoneSPWait:
-                       return "wait";
-                       break;
-       }
-       ms_warning("Invalid policy enum value.");
-       return "wait";
-}
-
-void linphone_friend_write_to_config_file(LpConfig *config, LinphoneFriend *lf, int index){
-       char key[50];
-       char *tmp;
-       int a;
-       const char *refkey;
-       
-       sprintf(key,"friend_%i",index);
-       
-       if (lf==NULL){
-               lp_config_clean_section(config,key);
-               return;
-       }
-       if (lf->uri!=NULL){
-               tmp=linphone_address_as_string(lf->uri);
-               if (tmp==NULL) {
-                       return;
-               }
-               lp_config_set_string(config,key,"url",tmp);
-               osip_free(tmp);
-       }
-       lp_config_set_string(config,key,"pol",__policy_enum_to_str(lf->pol));
-       lp_config_set_int(config,key,"subscribe",lf->subscribe);
-       if (lf->proxy!=NULL){
-               a=ms_list_index(lf->lc->sip_conf.proxies,lf->proxy);
-               lp_config_set_int(config,key,"proxy",a);
-       }else lp_config_set_int(config,key,"proxy",-1);
-
-       refkey=linphone_friend_get_ref_key(lf);
-       if (refkey){
-               lp_config_set_string(config,key,"refkey",refkey);
-       }
-}
-
-void linphone_core_write_friends_config(LinphoneCore* lc)
-{
-       MSList *elem;
-       int i;
-       if (!lc->ready) return; /*dont write config when reading it !*/
-       for (elem=lc->friends,i=0; elem!=NULL; elem=ms_list_next(elem),i++){
-               linphone_friend_write_to_config_file(lc->config,(LinphoneFriend*)elem->data,i);
-       }
-       linphone_friend_write_to_config_file(lc->config,NULL,i);        /* set the end */
-}
-
diff --git a/linphone/coreapi/general_state.c b/linphone/coreapi/general_state.c
deleted file mode 100644 (file)
index 7cf7137..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/****************************************************************************
- *
- *  File: general_state.c
- *
- *  Copyright (C) 2006, 2007  Thomas Reitmayr <treitmayr@yahoo.com>
- *
- ****************************************************************************
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 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 Library 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.
- *
- ****************************************************************************/
-
-
-#include "linphonecore.h"
-
-#if 0
-static const char *_gstates_text[] = {
-  "GSTATE_POWER_OFF",         /* 0 */
-  "GSTATE_POWER_STARTUP",     /* 1 */
-  "GSTATE_POWER_ON",          /* 2 */
-  "GSTATE_POWER_SHUTDOWN",    /* 3 */
-  NULL, NULL, NULL, NULL, NULL, NULL,
-
-  "GSTATE_REG_NONE",          /* 10 */
-  "GSTATE_REG_OK",            /* 11 */
-  "GSTATE_REG_FAILED",        /* 12 */
-  NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-
-  "GSTATE_CALL_IDLE",           /* 20 */
-  "GSTATE_CALL_OUT_INVITE",     /* 21 */
-  "GSTATE_CALL_OUT_CONNECTED",  /* 22 */
-  "GSTATE_CALL_IN_INVITE",      /* 23 */
-  "GSTATE_CALL_IN_CONNECTED",   /* 24 */
-  "GSTATE_CALL_END",            /* 25 */
-  "GSTATE_CALL_ERROR"           /* 26 */
-};
-#endif
-
-/* set the initial states */
-void gstate_initialize(LinphoneCore *lc) {
-  lc->gstate_power = GSTATE_POWER_OFF;
-  lc->gstate_reg   = GSTATE_REG_NONE;
-  lc->gstate_call  = GSTATE_CALL_IDLE;
-}
-
-gstate_t linphone_core_get_state(const LinphoneCore *lc, gstate_group_t group){
-       switch(group){
-               case GSTATE_GROUP_POWER:
-                       return lc->gstate_power;
-               case GSTATE_GROUP_REG:
-                       return lc->gstate_reg;
-               case GSTATE_GROUP_CALL:
-                       return lc->gstate_call;
-       }
-       return GSTATE_INVALID;
-}
-
-static void linphone_core_set_state(LinphoneCore *lc, gstate_group_t group, gstate_t new_state){
-       switch(group){
-               case GSTATE_GROUP_POWER:
-                       lc->gstate_power=new_state;
-                       break;
-               case GSTATE_GROUP_REG:
-                       lc->gstate_reg=new_state;
-                       break;
-               case GSTATE_GROUP_CALL:
-                       lc->gstate_call=new_state;
-                       break;
-       }
-}
-
-void gstate_new_state(struct _LinphoneCore *lc,
-                      gstate_t new_state,
-                      const char *message) {
-  LinphoneGeneralState states_arg;
-  
-  /* determine the affected group */
-  if (new_state < GSTATE_REG_NONE)
-    states_arg.group = GSTATE_GROUP_POWER;
-  else if (new_state < GSTATE_CALL_IDLE)
-    states_arg.group = GSTATE_GROUP_REG;
-  else
-    states_arg.group = GSTATE_GROUP_CALL;
-  
-  /* store the new state while remembering the old one */
-  states_arg.new_state = new_state;
-  states_arg.old_state = linphone_core_get_state(lc,states_arg.group);
-  linphone_core_set_state(lc, states_arg.group,new_state);
-  states_arg.message = message;
-  
-  /*printf("gstate_new_state: %s\t-> %s\t(%s)\n",
-         _gstates_text[states_arg.old_state],
-         _gstates_text[states_arg.new_state],
-         message);*/
-
-  /* call the virtual method */
-  if (lc->vtable.general_state)
-    lc->vtable.general_state(lc, &states_arg);
-  
-  /* immediately proceed to idle state */
-  if (new_state == GSTATE_CALL_END ||
-      new_state == GSTATE_CALL_ERROR)
-    gstate_new_state(lc, GSTATE_CALL_IDLE, NULL);
-}
-
diff --git a/linphone/coreapi/help/Doxyfile.in b/linphone/coreapi/help/Doxyfile.in
deleted file mode 100644 (file)
index abb4aef..0000000
+++ /dev/null
@@ -1,233 +0,0 @@
-# Doxyfile 1.4.1
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME           = liblinphone
-PROJECT_NUMBER         = @LINPHONE_VERSION@
-OUTPUT_DIRECTORY       = 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      = NO
-MULTILINE_CPP_IS_BRIEF = NO
-DETAILS_AT_TOP         = NO
-INHERIT_DOCS           = YES
-DISTRIBUTE_GROUP_DOC   = NO
-TAB_SIZE               = 8
-ALIASES                = 
-OPTIMIZE_OUTPUT_FOR_C  = YES
-OPTIMIZE_OUTPUT_JAVA   = NO
-SUBGROUPING            = YES
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL            = NO
-EXTRACT_PRIVATE        = NO
-EXTRACT_STATIC         = NO
-EXTRACT_LOCAL_CLASSES  = YES
-EXTRACT_LOCAL_METHODS  = NO
-HIDE_UNDOC_MEMBERS     = YES
-HIDE_UNDOC_CLASSES     = YES
-HIDE_FRIEND_COMPOUNDS  = NO
-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       = NO
-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       = YES
-FILE_VERSION_FILTER    = 
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET                  = NO
-WARNINGS               = YES
-WARN_IF_UNDOCUMENTED   = YES
-WARN_IF_DOC_ERROR      = YES
-WARN_NO_PARAMDOC       = NO
-WARN_FORMAT            = "$file:$line: $text"
-WARN_LOGFILE           = 
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT                  = . ../
-
-FILE_PATTERNS          = *.h \
-                         *.c \
-                         *.dox
-RECURSIVE              = NO
-EXCLUDE                = 
-EXCLUDE_SYMLINKS       = NO
-EXCLUDE_PATTERNS       = 
-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         = NO
-INLINE_SOURCES         = NO
-STRIP_CODE_COMMENTS    = YES
-REFERENCED_BY_RELATION = NO
-REFERENCES_RELATION    = NO
-VERBATIM_HEADERS       = NO
-#---------------------------------------------------------------------------
-# 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
-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   = 1
-GENERATE_TREEVIEW      = NO
-TREEVIEW_WIDTH         = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX         = YES
-LATEX_OUTPUT           = latex
-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             = rtf
-COMPACT_RTF            = NO
-RTF_HYPERLINKS         = NO
-RTF_STYLESHEET_FILE    = 
-RTF_EXTENSIONS_FILE    = 
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN           = YES
-MAN_OUTPUT             = man
-MAN_EXTENSION          = .3
-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     = NO
-SEARCH_INCLUDES        = YES
-INCLUDE_PATH           = .
-INCLUDE_FILE_PATTERNS  = *.h
-PREDEFINED             = DOXYGEN
-EXPAND_AS_DEFINED      = 
-SKIP_FUNCTION_MACROS   = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references   
-#---------------------------------------------------------------------------
-TAGFILES               = 
-GENERATE_TAGFILE       = 
-ALLEXTERNALS           = NO
-EXTERNAL_GROUPS        = YES
-PERL_PATH              = /usr/bin/perl
-#---------------------------------------------------------------------------
-# 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    = 1024
-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/linphone/coreapi/help/Makefile.am b/linphone/coreapi/help/Makefile.am
deleted file mode 100644 (file)
index 0b12592..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-
-EXTRA_DIST = Doxyfile.in doxygen.dox.in
-
-SOURCES=$(top_srcdir)/coreapi/*.h $(top_srcdir)/coreapi/*.c
-
-
-#html doc
-if HAVE_DOXYGEN
-
-# doxdir & pkgdocdir are not always defined by automake
-docdir=$(datadir)/doc
-pkgdocdir=$(docdir)/$(PACKAGE)-$(VERSION)
-doc_htmldir=$(pkgdocdir)/html
-
-doc_html_DATA = $(top_builddir)/coreapi/help/doc/html/html.tar
-
-$(doc_html_DATA): $(top_builddir)/coreapi/help/doc/html/index.html
-       cd $(<D) && tar cf html.tar *
-
-$(top_builddir)/coreapi/help/doc/html/index.html: $(SOURCES) Doxyfile Makefile.am
-       rm -rf doc
-       $(DOXYGEN) Doxyfile
-
-install-data-hook:
-       cd $(DESTDIR)$(doc_htmldir) && tar xf html.tar && rm -f html.tar
-
-uninstall-hook:
-       cd $(DESTDIR)$(doc_htmldir) && rm -f *
-
-endif
-
-clean-local:
-       rm -rf doc
diff --git a/linphone/coreapi/help/doxygen.dox.in b/linphone/coreapi/help/doxygen.dox.in
deleted file mode 100644 (file)
index acdec90..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * @mainpage
- *
- * @see http://www.linphone.org
- *
- * @section what_is_it What is liblinphone
- *
- * Liblinphone is a high level library for bringing SIP video call functionnality
- * into an application. It aims at making easy the integration of the SIP
- * video calls into any applications. All variants of linphone are directly based
- * on it:
- * - linphone (gtk interface)
- *
- * - linphonec (console interface)
- *
- * Liblinphone is GPL (see COPYING file). Please understand the licencing details
- * before using it!
- * 
- * For any use of this library beyond the rights granted to you by the
- * GPL license, please contact Belledonne Communications 
- * (contact@belledonne-communications.com)
- * 
- *
-**/
-
-/**
- * @page liblinphone_license COPYING 
- * @verbinclude COPYING
- */
-
-
-/** 
- * @defgroup initializing Initialization and destruction
- *
-**/
-
-/**
- * @defgroup call_control Call control
- *
- * The application can initiate outgoing calls with linphone_core_invite().
- * It is notified of incoming call thanks to the inv_recv callback of the LinphoneCoreVTable
- * structure that is passed at creation of the LinphoneCore object.
- * It can then answer calls with linphone_core_accept_call().
- * Calls can be terminated or declined with linphone_core_terminate_call().
- * The application is notified when the remote party hangups thanks to 
- * bye_recv callback of the #LinphoneCoreVTable.
-**/
-
-/**
- * @defgroup media_parameters Controlling media parameters
-**/
-
-/**
- * @defgroup proxies Managing proxies
-**/
-
-/**
- * @defgroup network_parameters Controlling network parameters (ports, mtu...)
-**/
-
-/**
- * @defgroup authentication Managing authentication: userid and passwords
-**/
-
-/**
- * @defgroup call_logs Managing call logs
-**/
-
-/**
- * @defgroup linphone_address SIP address parser API.
- * This api is useful for manipulating SIP addresses ('from' or 'to' headers).
-**/
-
-/**
- * @defgroup misc Miscenalleous: logs, version strings, config storage
-**/
diff --git a/linphone/coreapi/linphonecore.c b/linphone/coreapi/linphonecore.c
deleted file mode 100644 (file)
index c582a30..0000000
+++ /dev/null
@@ -1,3484 +0,0 @@
-/*
-linphone
-Copyright (C) 2000  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#include "linphonecore.h"
-#include "sipsetup.h"
-#include "lpconfig.h"
-#include "private.h"
-#include "mediastreamer2/mediastream.h"
-#include "mediastreamer2/msvolume.h"
-#include "mediastreamer2/msequalizer.h"
-#include <eXosip2/eXosip.h>
-#include "sdphandler.h"
-
-#include <ortp/telephonyevents.h>
-#include "exevents.h"
-
-
-#ifdef INET6
-#ifndef WIN32
-#include <netdb.h>
-#endif
-#endif
-
-/*#define UNSTANDART_GSM_11K 1*/
-
-static const char *liblinphone_version=LIBLINPHONE_VERSION;
-
-#include "enum.h"
-
-void linphone_core_get_local_ip(LinphoneCore *lc, const char *dest, char *result);
-static void apply_nat_settings(LinphoneCore *lc);
-static void toggle_video_preview(LinphoneCore *lc, bool_t val);
-
-/* relative path where is stored local ring*/
-#define LOCAL_RING "rings/oldphone.wav"
-/* same for remote ring (ringback)*/
-#define REMOTE_RING "ringback.wav"
-
-
-sdp_handler_t linphone_sdphandler={
-       linphone_accept_audio_offer,   /*from remote sdp */
-       linphone_accept_video_offer,   /*from remote sdp */
-       linphone_set_audio_offer,       /*to local sdp */
-       linphone_set_video_offer,       /*to local sdp */
-       linphone_read_audio_answer,     /*from incoming answer  */
-       linphone_read_video_answer      /*from incoming answer  */
-};
-
-void lc_callback_obj_init(LCCallbackObj *obj,LinphoneCoreCbFunc func,void* ud)
-{
-  obj->_func=func;
-  obj->_user_data=ud;
-}
-
-int lc_callback_obj_invoke(LCCallbackObj *obj, LinphoneCore *lc){
-       if (obj->_func!=NULL) obj->_func(lc,obj->_user_data);
-       return 0;
-}
-
-static void  linphone_call_init_common(LinphoneCall *call, LinphoneAddress *from, LinphoneAddress *to){
-       call->state=LCStateInit;
-       call->start_time=time(NULL);
-       call->media_start_time=0;
-       call->log=linphone_call_log_new(call, from, to);
-       linphone_core_notify_all_friends(call->core,LINPHONE_STATUS_ONTHEPHONE);
-       if (linphone_core_get_firewall_policy(call->core)==LINPHONE_POLICY_USE_STUN)
-               linphone_core_run_stun_tests(call->core,call);
-       call->profile=rtp_profile_new("Call RTP profile");
-}
-
-void linphone_call_init_media_params(LinphoneCall *call){
-       memset(&call->audio_params,0,sizeof(call->audio_params));
-       memset(&call->video_params,0,sizeof(call->video_params));
-}
-
-static void discover_mtu(LinphoneCore *lc, const char *remote){
-       int mtu;
-       if (lc->net_conf.mtu==0 ){
-               /*attempt to discover mtu*/
-               mtu=ms_discover_mtu(remote);
-               if (mtu>0){
-                       ms_set_mtu(mtu);
-                       ms_message("Discovered mtu is %i, RTP payload max size is %i",
-                               mtu, ms_get_payload_max_size());
-               }
-       }
-}
-
-LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to)
-{
-       LinphoneCall *call=ms_new0(LinphoneCall,1);
-       call->dir=LinphoneCallOutgoing;
-       call->cid=-1;
-       call->did=-1;
-       call->tid=-1;
-       call->core=lc;
-       linphone_core_get_local_ip(lc,linphone_address_get_domain(to),call->localip);
-       linphone_call_init_common(call,from,to);
-       call->sdpctx=sdp_handler_create_context(&linphone_sdphandler,
-               call->audio_params.natd_port>0 ? call->audio_params.natd_addr : call->localip,
-               linphone_address_get_username (from),NULL);
-       sdp_context_set_user_pointer(call->sdpctx,(void*)call);
-       discover_mtu(lc,linphone_address_get_domain (to));
-       return call;
-}
-
-
-LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to, eXosip_event_t *ev){
-       LinphoneCall *call=ms_new0(LinphoneCall,1);
-       LinphoneAddress *me=linphone_core_get_primary_contact_parsed(lc);
-       osip_header_t *h=NULL;
-
-       call->dir=LinphoneCallIncoming;
-       call->cid=ev->cid;
-       call->did=ev->did;
-       call->tid=ev->tid;
-       call->core=lc;
-       
-       linphone_address_clean(from);
-       
-       linphone_core_get_local_ip(lc,linphone_address_get_domain(from),call->localip);
-       linphone_call_init_common(call, from, to);
-       call->sdpctx=sdp_handler_create_context(&linphone_sdphandler,
-               call->audio_params.natd_port>0 ? call->audio_params.natd_addr : call->localip,
-               linphone_address_get_username (me),NULL);
-       sdp_context_set_user_pointer(call->sdpctx,(void*)call);
-       discover_mtu(lc,linphone_address_get_domain(from));
-       linphone_address_destroy(me);
-       osip_message_header_get_byname(ev->request,"Session-expires",0,&h);
-       if (h) call->supports_session_timers=TRUE;
-       return call;
-}
-
-void linphone_call_destroy(LinphoneCall *obj)
-{
-       linphone_core_notify_all_friends(obj->core,obj->core->prev_mode);
-       linphone_call_log_completed(obj->log,obj);
-       linphone_core_update_allocated_audio_bandwidth(obj->core);
-       if (obj->profile!=NULL) rtp_profile_destroy(obj->profile);
-       if (obj->sdpctx!=NULL) sdp_context_free(obj->sdpctx);
-       ms_free(obj);
-}
-
-/*prevent a gcc bug with %c*/
-static size_t my_strftime(char *s, size_t max, const char  *fmt,  const struct tm *tm){
-#if !defined(_WIN32_WCE)
-       return strftime(s, max, fmt, tm);
-#else
-       return 0;
-       /*FIXME*/
-#endif /*_WIN32_WCE*/
-}
-
-static void set_call_log_date(LinphoneCallLog *cl, const struct tm *loctime){
-       my_strftime(cl->start_date,sizeof(cl->start_date),"%c",loctime);
-}
-
-LinphoneCallLog * linphone_call_log_new(LinphoneCall *call, LinphoneAddress *from, LinphoneAddress *to){
-       LinphoneCallLog *cl=ms_new0(LinphoneCallLog,1);
-       struct tm loctime;
-       cl->dir=call->dir;
-#ifdef WIN32
-#if !defined(_WIN32_WCE)
-       loctime=*localtime(&call->start_time);
-       /*FIXME*/
-#endif /*_WIN32_WCE*/
-#else
-       localtime_r(&call->start_time,&loctime);
-#endif
-       set_call_log_date(cl,&loctime);
-       cl->from=from;
-       cl->to=to;
-       return cl;
-}
-
-static void call_logs_write_to_config_file(LinphoneCore *lc){
-       MSList *elem;
-       char logsection[32];
-       int i;
-       char *tmp;
-       LpConfig *cfg=lc->config;
-
-       if (!lc->ready) return;
-       
-       for(i=0,elem=lc->call_logs;elem!=NULL;elem=elem->next,++i){
-               LinphoneCallLog *cl=(LinphoneCallLog*)elem->data;
-               snprintf(logsection,sizeof(logsection),"call_log_%i",i);
-               lp_config_set_int(cfg,logsection,"dir",cl->dir);
-               lp_config_set_int(cfg,logsection,"status",cl->status);
-               tmp=linphone_address_as_string(cl->from);
-               lp_config_set_string(cfg,logsection,"from",tmp);
-               ms_free(tmp);
-               tmp=linphone_address_as_string(cl->to);
-               lp_config_set_string(cfg,logsection,"to",tmp);
-               ms_free(tmp);
-               lp_config_set_string(cfg,logsection,"start_date",cl->start_date);
-               lp_config_set_int(cfg,logsection,"duration",cl->duration);
-               if (cl->refkey) lp_config_set_string(cfg,logsection,"refkey",cl->refkey);
-       }
-       for(;i<lc->max_call_logs;++i){
-               snprintf(logsection,sizeof(logsection),"call_log_%i",i);
-               lp_config_clean_section(cfg,logsection);
-       }
-}
-
-static void call_logs_read_from_config_file(LinphoneCore *lc){
-       char logsection[32];
-       int i;
-       const char *tmp;
-       LpConfig *cfg=lc->config;
-       for(i=0;;++i){
-               snprintf(logsection,sizeof(logsection),"call_log_%i",i);
-               if (lp_config_has_section(cfg,logsection)){
-                       LinphoneCallLog *cl=ms_new0(LinphoneCallLog,1);
-                       cl->dir=lp_config_get_int(cfg,logsection,"dir",0);
-                       cl->status=lp_config_get_int(cfg,logsection,"status",0);
-                       tmp=lp_config_get_string(cfg,logsection,"from",NULL);
-                       if (tmp) cl->from=linphone_address_new(tmp);
-                       tmp=lp_config_get_string(cfg,logsection,"to",NULL);
-                       if (tmp) cl->to=linphone_address_new(tmp);
-                       tmp=lp_config_get_string(cfg,logsection,"start_date",NULL);
-                       if (tmp) strncpy(cl->start_date,tmp,sizeof(cl->start_date));
-                       cl->duration=lp_config_get_int(cfg,logsection,"duration",0);
-                       tmp=lp_config_get_string(cfg,logsection,"refkey",NULL);
-                       if (tmp) cl->refkey=ms_strdup(tmp);
-                       lc->call_logs=ms_list_append(lc->call_logs,cl);
-               }else break;    
-       }
-}
-
-
-void linphone_call_log_completed(LinphoneCallLog *calllog, LinphoneCall *call){
-       LinphoneCore *lc=call->core;
-       
-       calllog->duration=time(NULL)-call->start_time;
-       switch(call->state){
-               case LCStateInit:
-                       calllog->status=LinphoneCallAborted;
-                       break;
-               case LCStateRinging:
-                       if (calllog->dir==LinphoneCallIncoming){
-                               char *info;
-                               calllog->status=LinphoneCallMissed;
-                               lc->missed_calls++;
-                               info=ortp_strdup_printf(ngettext("You have missed %i call.",
-                            "You have missed %i calls.", lc->missed_calls),
-                        lc->missed_calls);
-                               lc->vtable.display_status(lc,info);
-                               ms_free(info);
-                       }
-                       else calllog->status=LinphoneCallAborted;
-                       break;
-               case LCStateAVRunning:
-                       calllog->status=LinphoneCallSuccess;
-                       break;
-       }
-       lc->call_logs=ms_list_append(lc->call_logs,(void *)calllog);
-       if (ms_list_size(lc->call_logs)>lc->max_call_logs){
-               MSList *elem;
-               elem=lc->call_logs;
-               linphone_call_log_destroy((LinphoneCallLog*)elem->data);
-               lc->call_logs=ms_list_remove_link(lc->call_logs,elem);
-       }
-       if (lc->vtable.call_log_updated!=NULL){
-               lc->vtable.call_log_updated(lc,calllog);
-       }
-       call_logs_write_to_config_file(lc);
-}
-
-/**
- * @addtogroup call_logs
- * @{
-**/
-
-/**
- * Returns a human readable string describing the call.
- * 
- * @note: the returned char* must be freed by the application (use ms_free()).
-**/
-char * linphone_call_log_to_str(LinphoneCallLog *cl){
-       char *status;
-       char *tmp;
-       char *from=linphone_address_as_string (cl->from);
-       char *to=linphone_address_as_string (cl->to);
-       switch(cl->status){
-               case LinphoneCallAborted:
-                       status=_("aborted");
-                       break;
-               case LinphoneCallSuccess:
-                       status=_("completed");
-                       break;
-               case LinphoneCallMissed:
-                       status=_("missed");
-                       break;
-               default:
-                       status="unknown";
-       }
-       tmp=ortp_strdup_printf(_("%s at %s\nFrom: %s\nTo: %s\nStatus: %s\nDuration: %i mn %i sec\n"),
-                       (cl->dir==LinphoneCallIncoming) ? _("Incoming call") : _("Outgoing call"),
-                       cl->start_date,
-                       from,
-                       to,
-                       status,
-                       cl->duration/60,
-                       cl->duration%60);
-       ms_free(from);
-       ms_free(to);
-       return tmp;
-}
-
-void linphone_call_log_set_user_pointer(LinphoneCallLog *cl, void *up){
-       cl->user_pointer=up;
-}
-
-void *linphone_call_log_get_user_pointer(const LinphoneCallLog *cl){
-       return cl->user_pointer;
-}
-
-
-
-/**
- * Associate a persistent reference key to the call log.
- *
- * The reference key can be for example an id to an external database.
- * It is stored in the config file, thus can survive to process exits/restarts.
- *
-**/
-void linphone_call_log_set_ref_key(LinphoneCallLog *cl, const char *refkey){
-       if (cl->refkey!=NULL){
-               ms_free(cl->refkey);
-               cl->refkey=NULL;
-       }
-       if (refkey) cl->refkey=ms_strdup(refkey);
-       call_logs_write_to_config_file(cl->lc);
-}
-
-/**
- * Get the persistent reference key associated to the call log.
- *
- * The reference key can be for example an id to an external database.
- * It is stored in the config file, thus can survive to process exits/restarts.
- *
-**/
-const char *linphone_call_log_get_ref_key(const LinphoneCallLog *cl){
-       return cl->refkey;
-}
-
-/** @} */
-
-void linphone_call_log_destroy(LinphoneCallLog *cl){
-       if (cl->from!=NULL) linphone_address_destroy(cl->from);
-       if (cl->to!=NULL) linphone_address_destroy(cl->to);
-       if (cl->refkey!=NULL) ms_free(cl->refkey);
-       ms_free(cl);
-}
-
-int linphone_core_get_current_call_duration(const LinphoneCore *lc){
-       LinphoneCall *call=lc->call;
-       if (call==NULL) return 0;
-       if (call->media_start_time==0) return 0;
-       return time(NULL)-call->media_start_time;
-}
-
-const LinphoneAddress *linphone_core_get_remote_uri(LinphoneCore *lc){
-       LinphoneCall *call=lc->call;
-       if (call==NULL) return 0;
-       return call->dir==LinphoneCallIncoming ? call->log->from : call->log->to;
-}
-
-void _osip_trace_func(char *fi, int li, osip_trace_level_t level, char *chfr, va_list ap){
-       int ortp_level=ORTP_DEBUG;
-       switch(level){
-               case OSIP_INFO1:
-               case OSIP_INFO2:
-               case OSIP_INFO3:
-               case OSIP_INFO4:
-                       ortp_level=ORTP_MESSAGE;
-                       break;
-               case OSIP_WARNING:
-                       ortp_level=ORTP_WARNING;
-                       break;
-               case OSIP_ERROR:
-               case OSIP_BUG:
-                       ortp_level=ORTP_ERROR;
-                       break;
-               case OSIP_FATAL:
-                       ortp_level=ORTP_FATAL;
-                       break;
-               case END_TRACE_LEVEL:
-                       break;
-       }
-       if (ortp_log_level_enabled(level)){
-               int len=strlen(chfr);
-               char *chfrdup=ortp_strdup(chfr);
-               /*need to remove endline*/
-               if (len>1){
-                       if (chfrdup[len-1]=='\n')
-                               chfrdup[len-1]='\0';
-                       if (chfrdup[len-2]=='\r')
-                               chfrdup[len-2]='\0';
-               }
-               ortp_logv(ortp_level,chfrdup,ap);
-               ortp_free(chfrdup);
-       }
-}
-
-/**
- * Enable logs in supplied FILE*.
- *
- * @ingroup misc
- *
- * @param file a C FILE* where to fprintf logs. If null stdout is used.
- * 
-**/
-void linphone_core_enable_logs(FILE *file){
-       if (file==NULL) file=stdout;
-       ortp_set_log_file(file);
-       ortp_set_log_level_mask(ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
-       osip_trace_initialize_func (OSIP_INFO4,&_osip_trace_func);
-}
-
-/**
- * Enable logs through the user's supplied log callback.
- *
- * @ingroup misc
- *
- * @param logfunc The address of a OrtpLogFunc callback whose protoype is
- *               typedef void (*OrtpLogFunc)(OrtpLogLevel lev, const char *fmt, va_list args);
- * 
-**/
-void linphone_core_enable_logs_with_cb(OrtpLogFunc logfunc){
-       ortp_set_log_level_mask(ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
-       osip_trace_initialize_func (OSIP_INFO4,&_osip_trace_func);
-       ortp_set_log_handler(logfunc);
-}
-
-/**
- * Entirely disable logging.
- *
- * @ingroup misc
-**/
-void linphone_core_disable_logs(){
-       int tl;
-       for (tl=0;tl<=OSIP_INFO4;tl++) osip_trace_disable_level(tl);
-       ortp_set_log_level_mask(ORTP_ERROR|ORTP_FATAL);
-}
-
-
-static void
-net_config_read (LinphoneCore *lc)
-{
-       int tmp;
-       const char *tmpstr;
-       LpConfig *config=lc->config;
-
-       tmp=lp_config_get_int(config,"net","download_bw",0);
-       linphone_core_set_download_bandwidth(lc,tmp);
-       tmp=lp_config_get_int(config,"net","upload_bw",0);
-       linphone_core_set_upload_bandwidth(lc,tmp);
-       linphone_core_set_stun_server(lc,lp_config_get_string(config,"net","stun_server",NULL));
-       tmpstr=lp_config_get_string(lc->config,"net","nat_address",NULL);
-       if (tmpstr!=NULL && (strlen(tmpstr)<1)) tmpstr=NULL;
-       linphone_core_set_nat_address(lc,tmpstr);
-       tmp=lp_config_get_int(lc->config,"net","firewall_policy",0);
-       linphone_core_set_firewall_policy(lc,tmp);
-       tmp=lp_config_get_int(lc->config,"net","nat_sdp_only",0);
-       lc->net_conf.nat_sdp_only=tmp;
-       tmp=lp_config_get_int(lc->config,"net","mtu",0);
-       linphone_core_set_mtu(lc,tmp);
-}
-
-static void build_sound_devices_table(LinphoneCore *lc){
-       const char **devices;
-       const char **old;
-       int ndev;
-       int i;
-       const MSList *elem=ms_snd_card_manager_get_list(ms_snd_card_manager_get());
-       ndev=ms_list_size(elem);
-       devices=ms_malloc((ndev+1)*sizeof(const char *));
-       for (i=0;elem!=NULL;elem=elem->next,i++){
-               devices[i]=ms_snd_card_get_string_id((MSSndCard *)elem->data);
-       }
-       devices[ndev]=NULL;
-       old=lc->sound_conf.cards;
-       lc->sound_conf.cards=devices;
-       if (old!=NULL) ms_free(old);
-}
-
-static void sound_config_read(LinphoneCore *lc)
-{
-       /*int tmp;*/
-       const char *tmpbuf;
-       const char *devid;
-#ifdef __linux
-       /*alsadev let the user use custom alsa device within linphone*/
-       devid=lp_config_get_string(lc->config,"sound","alsadev",NULL);
-       if (devid){
-               MSSndCard *card=ms_alsa_card_new_custom(devid,devid);
-               ms_snd_card_manager_add_card(ms_snd_card_manager_get(),card);
-       }
-#endif
-       /* retrieve all sound devices */
-       build_sound_devices_table(lc);
-
-       devid=lp_config_get_string(lc->config,"sound","playback_dev_id",NULL);
-       linphone_core_set_playback_device(lc,devid);
-
-       devid=lp_config_get_string(lc->config,"sound","ringer_dev_id",NULL);
-       linphone_core_set_ringer_device(lc,devid);
-
-       devid=lp_config_get_string(lc->config,"sound","capture_dev_id",NULL);
-       linphone_core_set_capture_device(lc,devid);
-
-/*
-       tmp=lp_config_get_int(lc->config,"sound","play_lev",80);
-       linphone_core_set_play_level(lc,tmp);
-       tmp=lp_config_get_int(lc->config,"sound","ring_lev",80);
-       linphone_core_set_ring_level(lc,tmp);
-       tmp=lp_config_get_int(lc->config,"sound","rec_lev",80);
-       linphone_core_set_rec_level(lc,tmp);
-       tmpbuf=lp_config_get_string(lc->config,"sound","source","m");
-       linphone_core_set_sound_source(lc,tmpbuf[0]);
-*/
-
-       tmpbuf=PACKAGE_SOUND_DIR "/" LOCAL_RING;
-       tmpbuf=lp_config_get_string(lc->config,"sound","local_ring",tmpbuf);
-       if (ortp_file_exist(tmpbuf)==-1) {
-               tmpbuf=PACKAGE_SOUND_DIR "/" LOCAL_RING;
-       }
-       if (strstr(tmpbuf,".wav")==NULL){
-               /* it currently uses old sound files, so replace them */
-               tmpbuf=PACKAGE_SOUND_DIR "/" LOCAL_RING;
-       }
-
-       linphone_core_set_ring(lc,tmpbuf);
-
-       tmpbuf=PACKAGE_SOUND_DIR "/" REMOTE_RING;
-       tmpbuf=lp_config_get_string(lc->config,"sound","remote_ring",tmpbuf);
-       if (ortp_file_exist(tmpbuf)==-1){
-               tmpbuf=PACKAGE_SOUND_DIR "/" REMOTE_RING;
-       }
-       if (strstr(tmpbuf,".wav")==NULL){
-               /* it currently uses old sound files, so replace them */
-               tmpbuf=PACKAGE_SOUND_DIR "/" REMOTE_RING;
-       }
-       linphone_core_set_ringback(lc,tmpbuf);
-       check_sound_device(lc);
-       lc->sound_conf.latency=0;
-
-       linphone_core_enable_echo_cancellation(lc,
-           lp_config_get_int(lc->config,"sound","echocancelation",0) |
-           lp_config_get_int(lc->config,"sound","echocancellation",0)
-               );
-
-       linphone_core_enable_echo_limiter(lc,
-               lp_config_get_int(lc->config,"sound","echolimiter",0));
-       linphone_core_enable_agc(lc,
-               lp_config_get_int(lc->config,"sound","agc",0));
-}
-
-static void sip_config_read(LinphoneCore *lc)
-{
-       char *contact;
-       const char *tmpstr;
-       int port;
-       int i,tmp;
-       int ipv6;
-       port=lp_config_get_int(lc->config,"sip","use_info",0);
-       linphone_core_set_use_info_for_dtmf(lc,port);
-
-       port=lp_config_get_int(lc->config,"sip","use_rfc2833",0);
-       linphone_core_set_use_rfc2833_for_dtmf(lc,port);
-
-       ipv6=lp_config_get_int(lc->config,"sip","use_ipv6",-1);
-       if (ipv6==-1){
-               ipv6=0;
-               if (host_has_ipv6_network()){
-                       lc->vtable.display_message(lc,_("Your machine appears to be connected to an IPv6 network. By default linphone always uses IPv4. Please update your configuration if you want to use IPv6"));
-               }
-       }
-       linphone_core_enable_ipv6(lc,ipv6);
-       port=lp_config_get_int(lc->config,"sip","sip_port",5060);
-       linphone_core_set_sip_port(lc,port);
-
-       tmpstr=lp_config_get_string(lc->config,"sip","contact",NULL);
-       if (tmpstr==NULL || linphone_core_set_primary_contact(lc,tmpstr)==-1) {
-               const char *hostname=NULL;
-               const char *username=NULL;
-#ifdef HAVE_GETENV
-               hostname=getenv("HOST");
-               username=getenv("USER");
-               if (hostname==NULL) hostname=getenv("HOSTNAME");
-#endif /*HAVE_GETENV*/
-               if (hostname==NULL)
-                       hostname="unknown-host";
-               if (username==NULL){
-                       username="toto";
-               }
-               contact=ortp_strdup_printf("sip:%s@%s",username,hostname);
-               linphone_core_set_primary_contact(lc,contact);
-               ms_free(contact);
-       }
-
-       tmp=lp_config_get_int(lc->config,"sip","guess_hostname",1);
-       linphone_core_set_guess_hostname(lc,tmp);
-
-
-       tmp=lp_config_get_int(lc->config,"sip","inc_timeout",15);
-       linphone_core_set_inc_timeout(lc,tmp);
-
-       /* get proxies config */
-       for(i=0;; i++){
-               LinphoneProxyConfig *cfg=linphone_proxy_config_new_from_config_file(lc->config,i);
-               if (cfg!=NULL){
-                       linphone_core_add_proxy_config(lc,cfg);
-               }else{
-                       break;
-               }
-       }
-       /* get the default proxy */
-       tmp=lp_config_get_int(lc->config,"sip","default_proxy",-1);
-       linphone_core_set_default_proxy_index(lc,tmp);
-
-       /* read authentication information */
-       for(i=0;; i++){
-               LinphoneAuthInfo *ai=linphone_auth_info_new_from_config_file(lc->config,i);
-               if (ai!=NULL){
-                       linphone_core_add_auth_info(lc,ai);
-               }else{
-                       break;
-               }
-       }
-       
-       /*for test*/
-       lc->sip_conf.sdp_200_ack=lp_config_get_int(lc->config,"sip","sdp_200_ack",0);
-       lc->sip_conf.only_one_codec=lp_config_get_int(lc->config,"sip","only_one_codec",0);
-       lc->sip_conf.register_only_when_network_is_up=
-               lp_config_get_int(lc->config,"sip","register_only_when_network_is_up",0);
-}
-
-static void rtp_config_read(LinphoneCore *lc)
-{
-       int port;
-       int jitt_comp;
-       int nortp_timeout;
-       port=lp_config_get_int(lc->config,"rtp","audio_rtp_port",7078);
-       linphone_core_set_audio_port(lc,port);
-
-       port=lp_config_get_int(lc->config,"rtp","video_rtp_port",9078);
-       if (port==0) port=9078;
-       linphone_core_set_video_port(lc,port);
-
-       jitt_comp=lp_config_get_int(lc->config,"rtp","audio_jitt_comp",60);
-       linphone_core_set_audio_jittcomp(lc,jitt_comp);
-       jitt_comp=lp_config_get_int(lc->config,"rtp","video_jitt_comp",60);
-       nortp_timeout=lp_config_get_int(lc->config,"rtp","nortp_timeout",30);
-       linphone_core_set_nortp_timeout(lc,nortp_timeout);
-}
-
-
-static PayloadType * get_codec(LpConfig *config, char* type,int index){
-       char codeckey[50];
-       const char *mime,*fmtp;
-       int rate,enabled;
-       PayloadType *pt;
-
-       snprintf(codeckey,50,"%s_%i",type,index);
-       mime=lp_config_get_string(config,codeckey,"mime",NULL);
-       if (mime==NULL || strlen(mime)==0 ) return NULL;
-
-       pt=payload_type_new();
-       pt->mime_type=ms_strdup(mime);
-
-       rate=lp_config_get_int(config,codeckey,"rate",8000);
-       pt->clock_rate=rate;
-       fmtp=lp_config_get_string(config,codeckey,"recv_fmtp",NULL);
-       if (fmtp) pt->recv_fmtp=ms_strdup(fmtp);
-       enabled=lp_config_get_int(config,codeckey,"enabled",1);
-       if (enabled ) pt->flags|=PAYLOAD_TYPE_ENABLED;
-       //ms_message("Found codec %s/%i",pt->mime_type,pt->clock_rate);
-       return pt;
-}
-
-static void codecs_config_read(LinphoneCore *lc)
-{
-       int i;
-       PayloadType *pt;
-       MSList *audio_codecs=NULL;
-       MSList *video_codecs=NULL;
-       for (i=0;;i++){
-               pt=get_codec(lc->config,"audio_codec",i);
-               if (pt==NULL) break;
-               audio_codecs=ms_list_append(audio_codecs,(void *)pt);
-       }
-       for (i=0;;i++){
-               pt=get_codec(lc->config,"video_codec",i);
-               if (pt==NULL) break;
-               video_codecs=ms_list_append(video_codecs,(void *)pt);
-       }
-       linphone_core_set_audio_codecs(lc,audio_codecs);
-       linphone_core_set_video_codecs(lc,video_codecs);
-       linphone_core_setup_local_rtp_profile(lc);
-}
-
-static void video_config_read(LinphoneCore *lc)
-{
-       int capture, display;
-       int enabled;
-       const char *str;
-       int ndev;
-       const char **devices;
-       const MSList *elem;
-       int i;
-
-       /* retrieve all video devices */
-       elem=ms_web_cam_manager_get_list(ms_web_cam_manager_get());
-       ndev=ms_list_size(elem);
-       devices=ms_malloc((ndev+1)*sizeof(const char *));
-       for (i=0;elem!=NULL;elem=elem->next,i++){
-               devices[i]=ms_web_cam_get_string_id((MSWebCam *)elem->data);
-       }
-       devices[ndev]=NULL;
-       lc->video_conf.cams=devices;
-
-       str=lp_config_get_string(lc->config,"video","device",NULL);
-       if (str && str[0]==0) str=NULL;
-       linphone_core_set_video_device(lc,str);
-
-       linphone_core_set_preferred_video_size_by_name(lc,
-               lp_config_get_string(lc->config,"video","size","cif"));
-
-       enabled=lp_config_get_int(lc->config,"video","enabled",1);
-       capture=lp_config_get_int(lc->config,"video","capture",enabled);
-       display=lp_config_get_int(lc->config,"video","display",enabled);
-#ifdef VIDEO_ENABLED
-       linphone_core_enable_video(lc,capture,display);
-       linphone_core_enable_self_view(lc,TRUE);
-#endif
-}
-
-static void ui_config_read(LinphoneCore *lc)
-{
-       LinphoneFriend *lf;
-       int i;
-       for (i=0;(lf=linphone_friend_new_from_config_file(lc,i))!=NULL;i++){
-               linphone_core_add_friend(lc,lf);
-       }
-       call_logs_read_from_config_file(lc);
-}
-
-/*
-static void autoreplier_config_init(LinphoneCore *lc)
-{
-       autoreplier_config_t *config=&lc->autoreplier_conf;
-       config->enabled=lp_config_get_int(lc->config,"autoreplier","enabled",0);
-       config->after_seconds=lp_config_get_int(lc->config,"autoreplier","after_seconds",6);
-       config->max_users=lp_config_get_int(lc->config,"autoreplier","max_users",1);
-       config->max_rec_time=lp_config_get_int(lc->config,"autoreplier","max_rec_time",60);
-       config->max_rec_msg=lp_config_get_int(lc->config,"autoreplier","max_rec_msg",10);
-       config->message=lp_config_get_string(lc->config,"autoreplier","message",NULL);
-}
-*/
-
-/**
- * Sets maximum available download bandwidth
- *
- * @ingroup media_parameters
- *
- * This is IP bandwidth, in kbit/s.
- * This information is used signaled to other parties during
- * calls (within SDP messages) so that the remote end can have
- * sufficient knowledge to properly configure its audio & video
- * codec output bitrate to not overflow available bandwidth.
- *
- * @param lc the LinphoneCore object
- * @param bw the bandwidth in kbits/s, 0 for infinite
- */
-void linphone_core_set_download_bandwidth(LinphoneCore *lc, int bw){
-       lc->net_conf.download_bw=bw;
-       if (bw==0){ /*infinite*/
-               lc->dw_audio_bw=-1;
-               lc->dw_video_bw=-1;
-       }else {
-               lc->dw_audio_bw=MIN(lc->audio_bw,bw);
-               lc->dw_video_bw=MAX(bw-lc->dw_audio_bw-10,0);/*-10: security margin*/
-       }
-}
-
-/**
- * Sets maximum available upload bandwidth
- *
- * @ingroup media_parameters
- *
- * This is IP bandwidth, in kbit/s.
- * This information is used by liblinphone together with remote
- * side available bandwidth signaled in SDP messages to properly
- * configure audio & video codec's output bitrate.
- *
- * @param lc the LinphoneCore object
- * @param bw the bandwidth in kbits/s, 0 for infinite
- */
-void linphone_core_set_upload_bandwidth(LinphoneCore *lc, int bw){
-       lc->net_conf.upload_bw=bw;
-       if (bw==0){ /*infinite*/
-               lc->up_audio_bw=-1;
-               lc->up_video_bw=-1;
-       }else{
-               lc->up_audio_bw=MIN(lc->audio_bw,bw);
-               lc->up_video_bw=MAX(bw-lc->up_audio_bw-10,0);/*-10: security margin*/
-       }
-}
-
-/**
- * Retrieve the maximum available download bandwidth.
- *
- * @ingroup media_parameters
- *
- * This value was set by linphone_core_set_download_bandwidth().
- *
-**/
-int linphone_core_get_download_bandwidth(const LinphoneCore *lc){
-       return lc->net_conf.download_bw;
-}
-
-/**
- * Retrieve the maximum available upload bandwidth.
- *
- * @ingroup media_parameters
- *
- * This value was set by linphone_core_set_upload_bandwidth().
- *
-**/
-int linphone_core_get_upload_bandwidth(const LinphoneCore *lc){
-       return lc->net_conf.upload_bw;
-}
-
-/**
- * Returns liblinphone's version as a string.
- *
- * @ingroup misc
- *
-**/
-const char * linphone_core_get_version(void){
-       return liblinphone_version;
-}
-
-
-static MSList *linphone_payload_types=NULL;
-
-static void linphone_core_assign_payload_type(PayloadType *const_pt, int number, const char *recv_fmtp){
-       PayloadType *pt;
-       pt=payload_type_clone(const_pt);
-       if (recv_fmtp!=NULL) payload_type_set_recv_fmtp(pt,recv_fmtp);
-       rtp_profile_set_payload(&av_profile,number,pt);
-       linphone_payload_types=ms_list_append(linphone_payload_types,pt);
-}
-
-static void linphone_core_free_payload_types(void){
-       ms_list_for_each(linphone_payload_types,(void (*)(void*))payload_type_destroy);
-       ms_list_free(linphone_payload_types);
-       linphone_payload_types=NULL;
-}
-
-static void linphone_core_init (LinphoneCore * lc, const LinphoneCoreVTable *vtable, const char *config_path, 
-    const char *factory_config_path, void * userdata)
-{
-       memset (lc, 0, sizeof (LinphoneCore));
-       lc->data=userdata;
-
-       memcpy(&lc->vtable,vtable,sizeof(LinphoneCoreVTable));
-
-       gstate_initialize(lc);
-       gstate_new_state(lc, GSTATE_POWER_STARTUP, NULL);
-
-       ortp_init();
-       linphone_core_assign_payload_type(&payload_type_lpc1015,115,NULL);
-       linphone_core_assign_payload_type(&payload_type_speex_nb,110,"vbr=on");
-       linphone_core_assign_payload_type(&payload_type_speex_wb,111,"vbr=on");
-       linphone_core_assign_payload_type(&payload_type_speex_uwb,112,"vbr=on");
-       linphone_core_assign_payload_type(&payload_type_telephone_event,101,NULL);
-       linphone_core_assign_payload_type(&payload_type_ilbc,113,NULL);
-
-#ifdef ENABLE_NONSTANDARD_GSM
-       {
-               PayloadType *pt;
-               pt=payload_type_clone(&payload_type_gsm);
-               pt->clock_rate=11025;
-               rtp_profile_set_payload(&av_profile,114,pt);
-               linphone_payload_types=ms_list_append(linphone_payload_types,pt);
-               pt=payload_type_clone(&payload_type_gsm);
-               pt->clock_rate=22050;
-               rtp_profile_set_payload(&av_profile,115,pt);
-               linphone_payload_types=ms_list_append(linphone_payload_types,pt);
-       }
-#endif
-
-#ifdef VIDEO_ENABLED
-       linphone_core_assign_payload_type(&payload_type_h263,34,NULL);
-       linphone_core_assign_payload_type(&payload_type_theora,97,NULL);
-       linphone_core_assign_payload_type(&payload_type_h263_1998,98,"CIF=1;QCIF=1");
-       linphone_core_assign_payload_type(&payload_type_mp4v,99,"profile-level-id=3");
-       linphone_core_assign_payload_type(&payload_type_x_snow,100,NULL);
-       linphone_core_assign_payload_type(&payload_type_h264,102,NULL);
-       linphone_core_assign_payload_type(&payload_type_h264,103,"packetization-mode=1");
-#endif
-
-       ms_init();
-
-       lc->config=lp_config_new(config_path);
-       if (factory_config_path)
-               lp_config_read_file(lc->config,factory_config_path);
-
-#ifdef VINCENT_MAURY_RSVP
-       /* default qos parameters : rsvp on, rpc off */
-       lc->rsvp_enable = 1;
-       lc->rpc_enable = 0;
-#endif
-       sip_setup_register_all();
-       sound_config_read(lc);
-       net_config_read(lc);
-       rtp_config_read(lc);
-       codecs_config_read(lc);
-       sip_config_read(lc); /* this will start eXosip*/
-       video_config_read(lc);
-       //autoreplier_config_init(&lc->autoreplier_conf);
-       lc->prev_mode=LINPHONE_STATUS_ONLINE;
-       lc->presence_mode=LINPHONE_STATUS_ONLINE;
-       lc->max_call_logs=15;
-       ui_config_read(lc);
-       ms_mutex_init(&lc->lock,NULL);
-       lc->vtable.display_status(lc,_("Ready"));
-        gstate_new_state(lc, GSTATE_POWER_ON, NULL);
-       lc->ready=TRUE;
-}
-
-/**
- * Instanciates a LinphoneCore object.
- * @ingroup initializing
- * 
- * The LinphoneCore object is the primary handle for doing all phone actions.
- * It should be unique within your application.
- * @param vtable a LinphoneCoreVTable structure holding your application callbacks
- * @param config_path a path to a config file. If it does not exists it will be created.
- *        The config file is used to store all user settings, call logs, friends, proxies...
- * @param factory_config_path a path to a read-only config file that can be used to 
- *        to store hard-coded preference such as proxy settings or internal preferences.
- *        The settings in this factory file always override the one in the normal config file.
- *        It is OPTIONAL, use NULL if unneeded.
- * @param userdata an opaque user pointer that can be retrieved at any time (for example in
- *        callbacks) using linphone_core_get_user_data().
- * 
-**/
-LinphoneCore *linphone_core_new(const LinphoneCoreVTable *vtable,
-                                               const char *config_path, const char *factory_config_path, void * userdata)
-{
-       LinphoneCore *core=ms_new(LinphoneCore,1);
-       linphone_core_init(core,vtable,config_path, factory_config_path, userdata);
-       return core;
-}
-
-/**
- * Returns the list of available audio codecs.
- *
- * This list is unmodifiable. The ->data field of the MSList points a PayloadType
- * structure holding the codec information.
- * It is possible to make copy of the list with ms_list_copy() in order to modify it
- * (such as the order of codecs).
-**/
-const MSList *linphone_core_get_audio_codecs(const LinphoneCore *lc)
-{
-       return lc->codecs_conf.audio_codecs;
-}
-
-/**
- * Returns the list of available video codecs.
- *
- * This list is unmodifiable. The ->data field of the MSList points a PayloadType
- * structure holding the codec information.
- * It is possible to make copy of the list with ms_list_copy() in order to modify it
- * (such as the order of codecs).
-**/
-const MSList *linphone_core_get_video_codecs(const LinphoneCore *lc)
-{
-       return lc->codecs_conf.video_codecs;
-}
-
-/**
- * Sets the local "from" identity.
- *
- * @ingroup proxies
- * This data is used in absence of any proxy configuration or when no
- * default proxy configuration is set. See LinphoneProxyConfig
-**/
-int linphone_core_set_primary_contact(LinphoneCore *lc, const char *contact)
-{
-       osip_from_t *ctt=NULL;
-       osip_from_init(&ctt);
-       if (osip_from_parse(ctt,contact)!=0){
-               ms_error("Bad contact url: %s",contact);
-               osip_from_free(ctt);
-               return -1;
-       }
-       if (lc->sip_conf.contact!=NULL) ms_free(lc->sip_conf.contact);
-       lc->sip_conf.contact=ms_strdup(contact);
-       if (lc->sip_conf.guessed_contact!=NULL){
-               ms_free(lc->sip_conf.guessed_contact);
-               lc->sip_conf.guessed_contact=NULL;
-       }
-       osip_from_free(ctt);
-       return 0;
-}
-
-
-/*result must be an array of chars at least LINPHONE_IPADDR_SIZE */
-void linphone_core_get_local_ip(LinphoneCore *lc, const char *dest, char *result){
-       if (lc->apply_nat_settings){
-               apply_nat_settings(lc);
-               lc->apply_nat_settings=FALSE;
-       }
-       if (linphone_core_get_firewall_policy(lc)==LINPHONE_POLICY_USE_NAT_ADDRESS){
-               strncpy(result,linphone_core_get_nat_address(lc),LINPHONE_IPADDR_SIZE);
-               return;
-       }
-       if (dest==NULL) dest="87.98.157.38"; /*a public IP address*/
-       if (linphone_core_get_local_ip_for(dest,result)==0)
-               return;
-       /*else fallback to exosip routine that will attempt to find the most realistic interface */
-       if (eXosip_guess_localip(lc->sip_conf.ipv6_enabled ? AF_INET6 : AF_INET,result,LINPHONE_IPADDR_SIZE)<0){
-               /*default to something */
-               strncpy(result,lc->sip_conf.ipv6_enabled ? "::1" : "127.0.0.1",LINPHONE_IPADDR_SIZE);
-               ms_error("Could not find default routable ip address !");
-       }
-}
-
-/**
- * Returns the default identity when no proxy configuration is used.
- *
- * @ingroup proxies
-**/
-const char *linphone_core_get_primary_contact(LinphoneCore *lc)
-{
-       char *identity;
-       char tmp[LINPHONE_IPADDR_SIZE];
-       if (lc->sip_conf.guess_hostname){
-               if (lc->sip_conf.guessed_contact==NULL || lc->sip_conf.loopback_only){
-                       char *guessed=NULL;
-                       osip_from_t *url;
-                       if (lc->sip_conf.guessed_contact!=NULL){
-                               ms_free(lc->sip_conf.guessed_contact);
-                               lc->sip_conf.guessed_contact=NULL;
-                       }
-
-                       osip_from_init(&url);
-                       if (osip_from_parse(url,lc->sip_conf.contact)==0){
-
-                       }else ms_error("Could not parse identity contact !");
-                       linphone_core_get_local_ip(lc, NULL, tmp);
-                       if (strcmp(tmp,"127.0.0.1")==0 || strcmp(tmp,"::1")==0 ){
-                               ms_warning("Local loopback network only !");
-                               lc->sip_conf.loopback_only=TRUE;
-                       }else lc->sip_conf.loopback_only=FALSE;
-                       osip_free(url->url->host);
-                       url->url->host=osip_strdup(tmp);
-                       if (url->url->port!=NULL){
-                               osip_free(url->url->port);
-                               url->url->port=NULL;
-                       }
-                       if (lc->sip_conf.sip_port!=5060){
-                               url->url->port=ortp_strdup_printf("%i",lc->sip_conf.sip_port);
-                       }
-                       osip_from_to_str(url,&guessed);
-                       lc->sip_conf.guessed_contact=guessed;
-
-                       osip_from_free(url);
-
-               }
-               identity=lc->sip_conf.guessed_contact;
-       }else{
-               identity=lc->sip_conf.contact;
-       }
-       return identity;
-}
-
-/**
- * Tells LinphoneCore to guess local hostname automatically in primary contact.
- *
- * @ingroup proxies
-**/
-void linphone_core_set_guess_hostname(LinphoneCore *lc, bool_t val){
-       lc->sip_conf.guess_hostname=val;
-}
-
-/**
- * Returns TRUE if hostname part of primary contact is guessed automatically.
- *
- * @ingroup proxies
-**/
-bool_t linphone_core_get_guess_hostname(LinphoneCore *lc){
-       return lc->sip_conf.guess_hostname;
-}
-
-/**
- * Same as linphone_core_get_primary_contact() but the result is a LinphoneAddress object
- * instead of const char*
- *
- * @ingroup proxies
-**/
-LinphoneAddress *linphone_core_get_primary_contact_parsed(LinphoneCore *lc){
-       return linphone_address_new(linphone_core_get_primary_contact(lc));
-}
-
-/**
- * Sets the list of audio codecs.
- *
- * @ingroup media_parameters
- * The list is taken by the LinphoneCore thus the application should not free it.
- * This list is made of struct PayloadType describing the codec parameters.
-**/
-int linphone_core_set_audio_codecs(LinphoneCore *lc, MSList *codecs)
-{
-       if (lc->codecs_conf.audio_codecs!=NULL) ms_list_free(lc->codecs_conf.audio_codecs);
-       lc->codecs_conf.audio_codecs=codecs;
-       return 0;
-}
-
-/**
- * Sets the list of video codecs.
- *
- * @ingroup media_parameters
- * The list is taken by the LinphoneCore thus the application should not free it.
- * This list is made of struct PayloadType describing the codec parameters.
-**/
-int linphone_core_set_video_codecs(LinphoneCore *lc, MSList *codecs)
-{
-       if (lc->codecs_conf.video_codecs!=NULL) ms_list_free(lc->codecs_conf.video_codecs);
-       lc->codecs_conf.video_codecs=codecs;
-       return 0;
-}
-
-const MSList * linphone_core_get_friend_list(const LinphoneCore *lc)
-{
-       return lc->friends;
-}
-
-/**
- * Returns the nominal jitter buffer size in milliseconds.
- *
- * @ingroup media_parameters
-**/
-int linphone_core_get_audio_jittcomp(LinphoneCore *lc)
-{
-       return lc->rtp_conf.audio_jitt_comp;
-}
-
-/**
- * Returns the UDP port used for audio streaming.
- *
- * @ingroup network_parameters
-**/
-int linphone_core_get_audio_port(const LinphoneCore *lc)
-{
-       return lc->rtp_conf.audio_rtp_port;
-}
-
-/**
- * Returns the UDP port used for video streaming.
- *
- * @ingroup network_parameters
-**/
-int linphone_core_get_video_port(const LinphoneCore *lc){
-       return lc->rtp_conf.video_rtp_port;
-}
-
-
-/**
- * Returns the value in seconds of the no-rtp timeout.
- *
- * @ingroup media_parameters
- * When no RTP or RTCP packets have been received for a while
- * LinphoneCore will consider the call is broken (remote end crashed or
- * disconnected from the network), and thus will terminate the call.
- * The no-rtp timeout is the duration above which the call is considered broken.
-**/
-int linphone_core_get_nortp_timeout(const LinphoneCore *lc){
-       return lc->rtp_conf.nortp_timeout;
-}
-
-/**
- * Sets the nominal audio jitter buffer size in milliseconds.
- *
- * @ingroup media_parameters
-**/
-void linphone_core_set_audio_jittcomp(LinphoneCore *lc, int value)
-{
-       lc->rtp_conf.audio_jitt_comp=value;
-}
-
-/**
- * Sets the UDP port used for audio streaming.
- *
- * @ingroup network_parameters
-**/
-void linphone_core_set_audio_port(LinphoneCore *lc, int port)
-{
-       lc->rtp_conf.audio_rtp_port=port;
-}
-
-/**
- * Sets the UDP port used for video streaming.
- *
- * @ingroup network_parameters
-**/
-void linphone_core_set_video_port(LinphoneCore *lc, int port){
-       lc->rtp_conf.video_rtp_port=port;
-}
-
-/**
- * Sets the no-rtp timeout value in seconds.
- * 
- * @ingroup media_parameters
- * See linphone_core_get_nortp_timeout() for details.
-**/
-void linphone_core_set_nortp_timeout(LinphoneCore *lc, int nortp_timeout){
-       lc->rtp_conf.nortp_timeout=nortp_timeout;
-}
-
-/**
- * Indicates whether SIP INFO is used for sending digits.
- *
- * @ingroup media_parameters
-**/
-bool_t linphone_core_get_use_info_for_dtmf(LinphoneCore *lc)
-{
-       return lc->sip_conf.use_info;
-}
-
-/**
- * Sets whether SIP INFO is to be used for sending digits.
- *
- * @ingroup media_parameters
-**/
-void linphone_core_set_use_info_for_dtmf(LinphoneCore *lc,bool_t use_info)
-{
-       lc->sip_conf.use_info=use_info;
-}
-
-/**
- * Indicates whether RFC2833 is used for sending digits.
- *
- * @ingroup media_parameters
-**/
-bool_t linphone_core_get_use_rfc2833_for_dtmf(LinphoneCore *lc)
-{
-       return lc->sip_conf.use_rfc2833;
-}
-
-/**
- * Sets whether RFC2833 is to be used for sending digits.
- *
- * @ingroup media_parameters
-**/
-void linphone_core_set_use_rfc2833_for_dtmf(LinphoneCore *lc,bool_t use_rfc2833)
-{
-       lc->sip_conf.use_rfc2833=use_rfc2833;
-}
-
-/**
- * Returns the UDP port used by SIP.
- *
- * @ingroup network_parameters
-**/
-int linphone_core_get_sip_port(LinphoneCore *lc)
-{
-       return lc->sip_conf.sip_port;
-}
-
-static bool_t exosip_running=FALSE;
-static char _ua_name[64]="Linphone";
-static char _ua_version[64]=LINPHONE_VERSION;
-
-static void apply_user_agent(void){
-       char ua_string[256];
-       snprintf(ua_string,sizeof(ua_string),"%s/%s (eXosip2/%s)",_ua_name,_ua_version,
-#ifdef HAVE_EXOSIP_GET_VERSION
-                eXosip_get_version()
-#else
-                "unknown"
-#endif
-       );
-       eXosip_set_user_agent(ua_string);
-}
-
-/**
- * Sets the user agent string used in SIP messages.
- *
- * @ingroup misc
-**/
-void linphone_core_set_user_agent(const char *name, const char *ver){
-       strncpy(_ua_name,name,sizeof(_ua_name)-1);
-       strncpy(_ua_version,ver,sizeof(_ua_version));
-}
-
-/**
- * Sets the UDP port to be used by SIP.
- *
- * @ingroup network_parameters
-**/
-void linphone_core_set_sip_port(LinphoneCore *lc,int port)
-{
-       const char *anyaddr;
-       int err=0;
-       if (port==lc->sip_conf.sip_port) return;
-       lc->sip_conf.sip_port=port;
-       if (exosip_running) eXosip_quit();
-       eXosip_init();
-       err=0;
-       eXosip_set_option(13,&err); /*13=EXOSIP_OPT_SRV_WITH_NAPTR, as it is an enum value, we can't use it unless we are sure of the
-                                       version of eXosip, which is not the case*/
-       eXosip_enable_ipv6(lc->sip_conf.ipv6_enabled);
-       if (lc->sip_conf.ipv6_enabled)
-               anyaddr="::0";
-       else
-               anyaddr="0.0.0.0";
-       err=eXosip_listen_addr (IPPROTO_UDP, anyaddr, port,
-               lc->sip_conf.ipv6_enabled ?  PF_INET6 : PF_INET, 0);
-       if (err<0){
-               char *msg=ortp_strdup_printf("UDP port %i seems already in use ! Cannot initialize.",port);
-               ms_warning(msg);
-               lc->vtable.display_warning(lc,msg);
-               ms_free(msg);
-               return;
-       }
-#ifdef VINCENT_MAURY_RSVP
-       /* tell exosip the qos settings according to default linphone parameters */
-       eXosip_set_rsvp_mode (lc->rsvp_enable);
-       eXosip_set_rpc_mode (lc->rpc_enable);
-#endif
-       apply_user_agent();
-       exosip_running=TRUE;
-}
-
-/**
- * Returns TRUE if IPv6 is enabled.
- *
- * @ingroup network_parameters
- * See linphone_core_enable_ipv6() for more details on how IPv6 is supported in liblinphone.
-**/
-bool_t linphone_core_ipv6_enabled(LinphoneCore *lc){
-       return lc->sip_conf.ipv6_enabled;
-}
-
-/**
- * Turns IPv6 support on or off.
- *
- * @ingroup network_parameters
- *
- * @note IPv6 support is exclusive with IPv4 in liblinphone:
- * when IPv6 is turned on, IPv4 calls won't be possible anymore.
- * By default IPv6 support is off.
-**/
-void linphone_core_enable_ipv6(LinphoneCore *lc, bool_t val){
-       if (lc->sip_conf.ipv6_enabled!=val){
-               lc->sip_conf.ipv6_enabled=val;
-               if (exosip_running){
-                       /* we need to restart eXosip */
-                       linphone_core_set_sip_port(lc, lc->sip_conf.sip_port);
-               }
-       }
-}
-
-static void display_bandwidth(RtpSession *as, RtpSession *vs){
-       ms_message("bandwidth usage: audio=[d=%.1f,u=%.1f] video=[d=%.1f,u=%.1f] kbit/sec",
-       (as!=NULL) ? (rtp_session_compute_recv_bandwidth(as)*1e-3) : 0,
-       (as!=NULL) ? (rtp_session_compute_send_bandwidth(as)*1e-3) : 0,
-       (vs!=NULL) ? (rtp_session_compute_recv_bandwidth(vs)*1e-3) : 0,
-       (vs!=NULL) ? (rtp_session_compute_send_bandwidth(vs)*1e-3) : 0);
-}
-
-static void linphone_core_disconnected(LinphoneCore *lc){
-       lc->vtable.display_warning(lc,_("Remote end seems to have disconnected, the call is going to be closed."));
-       linphone_core_terminate_call(lc,NULL);
-}
-
-static void proxy_update(LinphoneCore *lc, time_t curtime){
-       bool_t doit=FALSE;
-       static time_t last_check=0;
-       static bool_t last_status=FALSE;
-       if (lc->sip_conf.register_only_when_network_is_up){
-               char result[LINPHONE_IPADDR_SIZE];
-               /* only do the network up checking every five seconds */
-               if (last_check==0 || (curtime-last_check)>=5){
-                       if (eXosip_guess_localip(lc->sip_conf.ipv6_enabled ? AF_INET6 : AF_INET,result,LINPHONE_IPADDR_SIZE)==0){
-                               if (strcmp(result,"::1")!=0 && strcmp(result,"127.0.0.1")!=0){
-                                       last_status=TRUE;
-                                       ms_message("Network is up, registering now (%s)",result);
-                               }else last_status=FALSE;
-                       }
-                       last_check=curtime;
-               }
-               doit=last_status;
-       }else doit=TRUE;
-       if (doit) ms_list_for_each(lc->sip_conf.proxies,(void (*)(void*))&linphone_proxy_config_update);
-}
-
-static void assign_buddy_info(LinphoneCore *lc, BuddyInfo *info){
-       LinphoneFriend *lf=linphone_core_get_friend_by_uri(lc,info->sip_uri);
-       if (lf!=NULL){
-               lf->info=info;
-               ms_message("%s has a BuddyInfo assigned with image %p",info->sip_uri, info->image_data);
-               if (lc->vtable.buddy_info_updated)
-                       lc->vtable.buddy_info_updated(lc,lf);
-       }else{
-               ms_warning("Could not any friend with uri %s",info->sip_uri);
-       }
-}
-
-static void analyze_buddy_lookup_results(LinphoneCore *lc, LinphoneProxyConfig *cfg){
-       MSList *elem;
-       SipSetupContext *ctx=linphone_proxy_config_get_sip_setup_context(cfg);
-       for (elem=lc->bl_reqs;elem!=NULL;elem=ms_list_next(elem)){
-               BuddyLookupRequest *req=(BuddyLookupRequest *)elem->data;
-               if (req->status==BuddyLookupDone || req->status==BuddyLookupFailure){
-                       if (req->results!=NULL){
-                               BuddyInfo *i=(BuddyInfo*)req->results->data;
-                               ms_list_free(req->results);
-                               req->results=NULL;
-                               assign_buddy_info(lc,i);
-                       }
-                       sip_setup_context_buddy_lookup_free(ctx,req);
-                       elem->data=NULL;
-               }
-       }
-       /*purge completed requests */
-       while((elem=ms_list_find(lc->bl_reqs,NULL))!=NULL){
-               lc->bl_reqs=ms_list_remove_link(lc->bl_reqs,elem);
-       }
-}
-
-static void linphone_core_grab_buddy_infos(LinphoneCore *lc, LinphoneProxyConfig *cfg){
-       const MSList *elem;
-       SipSetupContext *ctx=linphone_proxy_config_get_sip_setup_context(cfg);
-       for(elem=linphone_core_get_friend_list(lc);elem!=NULL;elem=elem->next){
-               LinphoneFriend *lf=(LinphoneFriend*)elem->data;
-               if (lf->info==NULL){
-                       if (linphone_core_lookup_known_proxy(lc,lf->uri)==cfg){
-                               if (linphone_address_get_username(lf->uri)!=NULL){
-                                       BuddyLookupRequest *req;
-                                       char *tmp=linphone_address_as_string_uri_only(lf->uri);
-                                       req=sip_setup_context_create_buddy_lookup_request(ctx);
-                                       buddy_lookup_request_set_key(req,tmp);
-                                       buddy_lookup_request_set_max_results(req,1);
-                                       sip_setup_context_buddy_lookup_submit(ctx,req);
-                                       lc->bl_reqs=ms_list_append(lc->bl_reqs,req);
-                                       ms_free(tmp);
-                               }
-                       }
-               }
-       }
-}
-
-static void linphone_core_do_plugin_tasks(LinphoneCore *lc){
-       LinphoneProxyConfig *cfg=NULL;
-       linphone_core_get_default_proxy(lc,&cfg);
-       if (cfg){
-               if (lc->bl_refresh){
-                       SipSetupContext *ctx=linphone_proxy_config_get_sip_setup_context(cfg);
-                       if (ctx && (sip_setup_context_get_capabilities(ctx) & SIP_SETUP_CAP_BUDDY_LOOKUP)){
-                               linphone_core_grab_buddy_infos(lc,cfg);
-                               lc->bl_refresh=FALSE;
-                       }
-               }
-               if (lc->bl_reqs) analyze_buddy_lookup_results(lc,cfg);
-       }
-}
-
-/**
- * Main loop function. It is crucial that your application call it periodically.
- *
- * @ingroup initializing
- * linphone_core_iterate() performs various backgrounds tasks:
- * - receiving of SIP messages
- * - handles timers and timeout
- * - performs registration to proxies
- * - authentication retries
- * The application MUST call this function from periodically, in its main loop.
- * Be careful that this function must be call from the same thread as
- * other liblinphone methods. In not the case make sure all liblinphone calls are 
- * serialized with a mutex.
-**/
-void linphone_core_iterate(LinphoneCore *lc)
-{
-       eXosip_event_t *ev;
-       bool_t disconnected=FALSE;
-       int disconnect_timeout = linphone_core_get_nortp_timeout(lc);
-       time_t curtime=time(NULL);
-       int elapsed;
-       bool_t one_second_elapsed=FALSE;
-
-       if (curtime-lc->prevtime>=1){
-               lc->prevtime=curtime;
-               one_second_elapsed=TRUE;
-       }
-
-       if (lc->preview_finished){
-               lc->preview_finished=0;
-               ring_stop(lc->ringstream);
-               lc->ringstream=NULL;
-               lc_callback_obj_invoke(&lc->preview_finished_cb,lc);
-       }
-
-       if (exosip_running){
-               while((ev=eXosip_event_wait(0,0))!=NULL){
-                       linphone_core_process_event(lc,ev);
-               }
-               if (lc->automatic_action==0) {
-                       eXosip_lock();
-                       eXosip_automatic_action();
-                       eXosip_unlock();
-               }
-       }
-
-       proxy_update(lc,curtime);
-
-       if (lc->call!=NULL){
-               LinphoneCall *call=lc->call;
-
-               if (call->dir==LinphoneCallIncoming && call->state==LCStateRinging){
-                       elapsed=curtime-call->start_time;
-                       ms_message("incoming call ringing for %i seconds",elapsed);
-                       if (elapsed>lc->sip_conf.inc_timeout){
-                               linphone_core_terminate_call(lc,NULL);
-                       }
-               }else if (call->state==LCStateAVRunning){
-                       if (one_second_elapsed){
-                               RtpSession *as=NULL,*vs=NULL;
-                               lc->prevtime=curtime;
-                               if (lc->audiostream!=NULL)
-                                       as=lc->audiostream->session;
-                               if (lc->videostream!=NULL)
-                                       vs=lc->videostream->session;
-                               display_bandwidth(as,vs);
-                       }
-#ifdef VIDEO_ENABLED
-                       if (lc->videostream!=NULL)
-                               video_stream_iterate(lc->videostream);
-#endif
-                       if (lc->audiostream!=NULL && disconnect_timeout>0)
-                               disconnected=!audio_stream_alive(lc->audiostream,disconnect_timeout);
-               }
-       }
-       if (linphone_core_video_preview_enabled(lc)){
-               if (lc->previewstream==NULL)
-                       toggle_video_preview(lc,TRUE);
-#ifdef VIDEO_ENABLED
-               else video_stream_iterate(lc->previewstream);
-#endif
-       }else{
-               if (lc->previewstream!=NULL)
-                       toggle_video_preview(lc,FALSE);
-       }
-       if (disconnected)
-               linphone_core_disconnected(lc);
-
-       linphone_core_do_plugin_tasks(lc);
-
-       if (one_second_elapsed && lp_config_needs_commit(lc->config)){
-               lp_config_sync(lc->config);
-       }
-}
-
-
-bool_t linphone_core_is_in_main_thread(LinphoneCore *lc){
-       return TRUE;
-}
-
-static char *guess_route_if_any(LinphoneCore *lc, osip_to_t *parsed_url){
-       const MSList *elem=linphone_core_get_proxy_config_list(lc);
-       for(;elem!=NULL;elem=elem->next){
-               LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
-               char prx[256];
-               if (cfg->ssctx && sip_setup_context_get_proxy(cfg->ssctx,parsed_url->url->host,prx,sizeof(prx))==0){
-                       ms_message("We have a proxy for domain %s",parsed_url->url->host);
-                       if (strcmp(parsed_url->url->host,prx)!=0){
-                               char *route=NULL;
-                               osip_route_t *rt;
-                               osip_route_init(&rt);
-                               if (osip_route_parse(rt,prx)==0){
-                                       char *rtstr;
-                                       osip_uri_uparam_add(rt->url,osip_strdup("lr"),NULL);
-                                       osip_route_to_str(rt,&rtstr);
-                                       route=ms_strdup(rtstr);
-                                       osip_free(rtstr);
-                               }
-                               osip_route_free(rt);
-                               ms_message("Adding a route: %s",route);
-                               return route;
-                       }
-               }
-       }
-       return NULL;
-}
-
-bool_t linphone_core_interpret_url(LinphoneCore *lc, const char *url, LinphoneAddress **real_parsed_url, char **route){
-       enum_lookup_res_t *enumres=NULL;
-       osip_to_t *parsed_url=NULL;
-       char *enum_domain=NULL;
-       LinphoneProxyConfig *proxy;
-       char *tmpurl;
-       const char *tmproute;
-       if (real_parsed_url!=NULL) *real_parsed_url=NULL;
-       *route=NULL;
-       tmproute=linphone_core_get_route(lc);
-
-       if (is_enum(url,&enum_domain)){
-               lc->vtable.display_status(lc,_("Looking for telephone number destination..."));
-               if (enum_lookup(enum_domain,&enumres)<0){
-                       lc->vtable.display_status(lc,_("Could not resolve this number."));
-                       ms_free(enum_domain);
-                       return FALSE;
-               }
-               ms_free(enum_domain);
-               tmpurl=enumres->sip_address[0];
-               if (real_parsed_url!=NULL) *real_parsed_url=linphone_address_new(tmpurl);
-               enum_lookup_res_free(enumres);
-               if (tmproute) *route=ms_strdup(tmproute);
-               return TRUE;
-       }
-       /* check if we have a "sip:" */
-       if (strstr(url,"sip:")==NULL){
-               /* this doesn't look like a true sip uri */
-               proxy=lc->default_proxy;
-               if (proxy!=NULL){
-                       /* append the proxy domain suffix */
-                       LinphoneAddress *uri;
-                       const char *identity=linphone_proxy_config_get_identity(proxy);
-                       char normalized_username[128];
-                       uri=linphone_address_new(identity);
-                       if (uri==NULL){
-                               return FALSE;
-                       }
-                       linphone_address_set_display_name(uri,NULL);
-                       linphone_proxy_config_normalize_number(proxy,url,normalized_username,
-                                                               sizeof(normalized_username));
-                       linphone_address_set_username(uri,normalized_username);
-                                                                               
-                       if (real_parsed_url!=NULL) *real_parsed_url=uri;
-#if 0
-                       /*if the prompted uri was auto-suffixed with proxy domain,
-                       then automatically set a route so that the request goes
-                       through the proxy*/
-                       if (tmproute==NULL){
-                               osip_route_t *rt=NULL;
-                               char *rtstr=NULL;
-                               osip_route_init(&rt);
-                               if (osip_route_parse(rt,linphone_proxy_config_get_addr(proxy))==0){
-                                       osip_uri_uparam_add(rt->url,osip_strdup("lr"),NULL);
-                                       osip_route_to_str(rt,&rtstr);
-                                       *route=ms_strdup(rtstr);
-                                       osip_free(rtstr);
-                               }
-                               ms_message("setting automatically a route to %s",*route);
-                       }
-                       else *route=ms_strdup(tmproute);
-#else
-                       if (tmproute==NULL) *route=guess_route_if_any(lc,*real_parsed_url);
-                       if (tmproute) *route=ms_strdup(tmproute);
-#endif
-                       return TRUE;
-               }
-       }
-       parsed_url=linphone_address_new(url);
-       if (parsed_url!=NULL){
-               if (real_parsed_url!=NULL) *real_parsed_url=parsed_url;
-               else linphone_address_destroy(parsed_url);
-               if (tmproute) *route=ms_strdup(tmproute);
-               else *route=guess_route_if_any(lc,*real_parsed_url);
-               return TRUE;
-       }
-       /* else we could not do anything with url given by user, so display an error */
-       if (lc->vtable.display_warning!=NULL){
-               lc->vtable.display_warning(lc,_("Could not parse given sip address. A sip url usually looks like sip:user@domain"));
-       }
-       return FALSE;
-}
-
-/**
- * Returns the default identity SIP address.
- *
- * @ingroup proxies
- * This is an helper function:
- *
- * If no default proxy is set, this will return the primary contact (
- * see linphone_core_get_primary_contact() ). If a default proxy is set
- * it returns the registered identity on the proxy.
-**/
-const char * linphone_core_get_identity(LinphoneCore *lc){
-       LinphoneProxyConfig *proxy=NULL;
-       const char *from;
-       linphone_core_get_default_proxy(lc,&proxy);
-       if (proxy!=NULL) {
-               from=linphone_proxy_config_get_identity(proxy);
-       }else from=linphone_core_get_primary_contact(lc);
-       return from;
-}
-
-const char * linphone_core_get_route(LinphoneCore *lc){
-       LinphoneProxyConfig *proxy=NULL;
-       const char *route=NULL;
-       linphone_core_get_default_proxy(lc,&proxy);
-       if (proxy!=NULL) {
-               route=linphone_proxy_config_get_route(proxy);
-       }
-       return route;
-}
-
-void linphone_set_sdp(osip_message_t *sip, const char *sdpmesg){
-       int sdplen=strlen(sdpmesg);
-       char clen[10];
-       snprintf(clen,sizeof(clen),"%i",sdplen);
-       osip_message_set_body(sip,sdpmesg,sdplen);
-       osip_message_set_content_type(sip,"application/sdp");
-       osip_message_set_content_length(sip,clen);
-}
-
-LinphoneProxyConfig * linphone_core_lookup_known_proxy(LinphoneCore *lc, const LinphoneAddress *uri){
-       const MSList *elem;
-       LinphoneProxyConfig *found_cfg=NULL;
-       for (elem=linphone_core_get_proxy_config_list(lc);elem!=NULL;elem=elem->next){
-               LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
-               const char *domain=linphone_proxy_config_get_domain(cfg);
-               if (domain!=NULL && strcmp(domain,linphone_address_get_domain(uri))==0){
-                       found_cfg=cfg;
-                       break;
-               }
-       }
-       return found_cfg;
-}
-
-static void fix_contact(LinphoneCore *lc, osip_message_t *msg, const char *localip, LinphoneProxyConfig *dest_proxy){
-       osip_contact_t *ctt=NULL;
-       const char *ip=NULL;
-       int port=5060;
-
-       osip_message_get_contact(msg,0,&ctt);
-       if (ctt!=NULL){
-               if (dest_proxy!=NULL){
-                       /* if we know the request will go to a known proxy for which we are registered,
-                       we can use the same contact address as in the register */
-                       linphone_proxy_config_get_contact(dest_proxy,&ip,&port);
-               }else{
-                       ip=localip;
-                       port=linphone_core_get_sip_port(lc);
-               }
-               if (ip!=NULL){
-                       osip_free(ctt->url->host);
-                       ctt->url->host=osip_strdup(ip);
-               }
-               if (port!=0){
-                       char tmp[10]={0};
-                       char *str;
-                       snprintf(tmp,sizeof(tmp)-1,"%i",port);
-                       if (ctt->url->port!=NULL)
-                               osip_free(ctt->url->port);
-                       ctt->url->port=osip_strdup(tmp);
-                       osip_contact_to_str(ctt,&str);
-                       ms_message("Contact has been fixed to %s",str);
-                       osip_free(str);
-               }
-       }
-}
-
-/**
- * Initiates an outgoing call
- *
- * @ingroup call_control
- * @param lc the LinphoneCore object
- * @param url the destination of the call (sip address).
-**/
-int linphone_core_invite(LinphoneCore *lc, const char *url)
-{
-       char *barmsg;
-       int err=0;
-       char *sdpmesg=NULL;
-       char *route=NULL;
-       const char *from=NULL;
-       osip_message_t *invite=NULL;
-       sdp_context_t *ctx=NULL;
-       LinphoneProxyConfig *proxy=NULL;
-       LinphoneAddress *parsed_url2=NULL;
-       LinphoneAddress *real_parsed_url=NULL;
-       char *real_url=NULL;
-       LinphoneProxyConfig *dest_proxy=NULL;
-
-       if (lc->call!=NULL){
-               lc->vtable.display_warning(lc,_("Sorry, having multiple simultaneous calls is not supported yet !"));
-               return -1;
-       }
-
-       linphone_core_get_default_proxy(lc,&proxy);
-       if (!linphone_core_interpret_url(lc,url,&real_parsed_url,&route)){
-               return -1;
-       }
-       real_url=linphone_address_as_string(real_parsed_url);
-       dest_proxy=linphone_core_lookup_known_proxy(lc,real_parsed_url);
-
-       if (proxy!=dest_proxy && dest_proxy!=NULL) {
-               ms_message("Overriding default proxy setting for this call:");
-               ms_message("The used identity will be %s",linphone_proxy_config_get_identity(dest_proxy));
-       }
-
-       if (dest_proxy!=NULL)
-               from=linphone_proxy_config_get_identity(dest_proxy);
-       else if (proxy!=NULL)
-               from=linphone_proxy_config_get_identity(proxy);
-
-       /* if no proxy or no identity defined for this proxy, default to primary contact*/
-       if (from==NULL) from=linphone_core_get_primary_contact(lc);
-
-       err=eXosip_call_build_initial_invite(&invite,real_url,from,
-                                               route,"Phone call");
-       if (err<0){
-               ms_warning("Could not build initial invite");
-               goto end;
-       }
-       if (lp_config_get_int(lc->config,"sip","use_session_timers",0)==1){
-               osip_message_set_header(invite, "Session-expires", "200");
-               osip_message_set_supported(invite, "timer");
-       }
-       /* make sdp message */
-
-       parsed_url2=linphone_address_new(from);
-
-       lc->call=linphone_call_new_outgoing(lc,parsed_url2,real_parsed_url);
-       /*try to be best-effort in giving real local or routable contact address,
-       except when the user choosed to override the ipaddress */
-       if (linphone_core_get_firewall_policy(lc)!=LINPHONE_POLICY_USE_NAT_ADDRESS)
-               fix_contact(lc,invite,lc->call->localip,dest_proxy);
-
-       barmsg=ortp_strdup_printf("%s %s", _("Contacting"), real_url);
-       lc->vtable.display_status(lc,barmsg);
-       ms_free(barmsg);
-       if (!lc->sip_conf.sdp_200_ack){
-               ctx=lc->call->sdpctx;
-               sdpmesg=sdp_context_get_offer(ctx);
-               linphone_set_sdp(invite,sdpmesg);
-               linphone_core_init_media_streams(lc);
-       }
-       eXosip_lock();
-       err=eXosip_call_send_initial_invite(invite);
-       lc->call->cid=err;
-       eXosip_unlock();
-       
-       if (err<0){
-               ms_warning("Could not initiate call.");
-               lc->vtable.display_status(lc,_("could not call"));
-               linphone_call_destroy(lc->call);
-               lc->call=NULL;
-               linphone_core_stop_media_streams(lc);
-       }else gstate_new_state(lc, GSTATE_CALL_OUT_INVITE, url);
-
-       goto end;
-       end:
-               if (real_url!=NULL) ms_free(real_url);
-               if (route!=NULL) ms_free(route);
-       return (err<0) ? -1 : 0;
-}
-
-int linphone_core_refer(LinphoneCore *lc, const char *url)
-{
-       char *real_url=NULL;
-       LinphoneAddress *real_parsed_url=NULL;
-       LinphoneCall *call;
-       osip_message_t *msg=NULL;
-       char *route;
-       if (!linphone_core_interpret_url(lc,url,&real_parsed_url, &route)){
-               /* bad url */
-               return -1;
-       }
-       if (route!=NULL) ms_free(route);
-       call=lc->call;
-       if (call==NULL){
-               ms_warning("No established call to refer.");
-               return -1;
-       }
-       lc->call=NULL;
-       real_url=linphone_address_as_string (real_parsed_url);
-       eXosip_call_build_refer(call->did, real_url, &msg);
-       ms_free(real_url);
-       eXosip_lock();
-       eXosip_call_send_request(call->did, msg);
-       eXosip_unlock();
-       return 0;
-}
-
-/**
- * Returns true if in incoming call is pending, ie waiting for being answered or declined.
- *
- * @ingroup call_control
-**/
-bool_t linphone_core_inc_invite_pending(LinphoneCore*lc){
-       if (lc->call!=NULL && lc->call->dir==LinphoneCallIncoming){
-               return TRUE;
-       }
-       return FALSE;
-}
-
-#ifdef VINCENT_MAURY_RSVP
-/* on=1 for RPC_ENABLE=1...*/
-int linphone_core_set_rpc_mode(LinphoneCore *lc, int on)
-{
-       if (on==1)
-               printf("RPC_ENABLE set on\n");
-       else
-               printf("RPC_ENABLE set off\n");
-       lc->rpc_enable = (on==1);
-       /* need to tell eXosip the new setting */
-       if (eXosip_set_rpc_mode (lc->rpc_enable)!=0)
-               return -1;
-       return 0;
-}
-
-/* on=1 for RSVP_ENABLE=1...*/
-int linphone_core_set_rsvp_mode(LinphoneCore *lc, int on)
-{
-       if (on==1)
-               printf("RSVP_ENABLE set on\n");
-       else
-               printf("RSVP_ENABLE set off\n");
-       lc->rsvp_enable = (on==1);
-       /* need to tell eXosip the new setting */
-       if (eXosip_set_rsvp_mode (lc->rsvp_enable)!=0)
-               return -1;
-       return 0;
-}
-
-/* answer : 1 for yes, 0 for no */
-int linphone_core_change_qos(LinphoneCore *lc, int answer)
-{
-       char *sdpmesg;
-       if (lc->call==NULL){
-               return -1;
-       }
-
-       if (lc->rsvp_enable && answer==1)
-       {
-               /* answer is yes, local setting is with qos, so
-                * the user chose to continue with no qos ! */
-               /* so switch in normal mode : ring and 180 */
-               lc->rsvp_enable = 0; /* no more rsvp */
-               eXosip_set_rsvp_mode (lc->rsvp_enable);
-               /* send 180 */
-               eXosip_lock();
-               eXosip_answer_call(lc->call->did,180,NULL);
-               eXosip_unlock();
-               /* play the ring */
-               ms_message("Starting local ring...");
-               lc->ringstream=ring_start(lc->sound_conf.local_ring,
-                                       2000,ms_snd_card_manager_get_card(ms_snd_card_manager_get(),lc->sound_conf.ring_sndcard));
-       }
-       else if (!lc->rsvp_enable && answer==1)
-       {
-               /* switch to QoS mode on : answer 183 session progress */
-               lc->rsvp_enable = 1;
-               eXosip_set_rsvp_mode (lc->rsvp_enable);
-               /* take the sdp already computed, see osipuacb.c */
-               sdpmesg=lc->call->sdpctx->answerstr;
-               eXosip_lock();
-               eXosip_answer_call_with_body(lc->call->did,183,"application/sdp",sdpmesg);
-               eXosip_unlock();
-       }
-       else
-       {
-               /* decline offer (603) */
-               linphone_core_terminate_call(lc, NULL);
-       }
-       return 0;
-}
-#endif
-
-void linphone_core_init_media_streams(LinphoneCore *lc){
-       lc->audiostream=audio_stream_new(linphone_core_get_audio_port(lc),linphone_core_ipv6_enabled(lc));
-       if (linphone_core_echo_limiter_enabled(lc)){
-               const char *type=lp_config_get_string(lc->config,"sound","el_type","mic");
-               if (strcasecmp(type,"mic")==0)
-                       audio_stream_enable_echo_limiter(lc->audiostream,ELControlMic);
-               else if (strcasecmp(type,"speaker")==0)
-                       audio_stream_enable_echo_limiter(lc->audiostream,ELControlSpeaker);
-       }
-       audio_stream_enable_gain_control(lc->audiostream,TRUE);
-       if (linphone_core_echo_cancellation_enabled(lc)){
-               int len,delay,framesize;
-               len=lp_config_get_int(lc->config,"sound","ec_tail_len",0);
-               delay=lp_config_get_int(lc->config,"sound","ec_delay",0);
-               framesize=lp_config_get_int(lc->config,"sound","ec_framesize",0);
-               audio_stream_set_echo_canceller_params(lc->audiostream,len,delay,framesize);
-       }
-       audio_stream_enable_automatic_gain_control(lc->audiostream,linphone_core_agc_enabled(lc));
-       {
-               int enabled=lp_config_get_int(lc->config,"sound","noisegate",0);
-               audio_stream_enable_noise_gate(lc->audiostream,enabled);
-       }
-       if (lc->a_rtp)
-               rtp_session_set_transports(lc->audiostream->session,lc->a_rtp,lc->a_rtcp);
-
-#ifdef VIDEO_ENABLED
-       if (lc->video_conf.display || lc->video_conf.capture)
-               lc->videostream=video_stream_new(linphone_core_get_video_port(lc),linphone_core_ipv6_enabled(lc));
-#else
-       lc->videostream=NULL;
-#endif
-}
-
-static void linphone_core_dtmf_received(RtpSession* s, int dtmf, void* user_data){
-       LinphoneCore* lc = (LinphoneCore*)user_data;
-       if (lc->vtable.dtmf_received != NULL)
-               lc->vtable.dtmf_received(lc, dtmf);
-}
-
-static void parametrize_equalizer(LinphoneCore *lc, AudioStream *st){
-       if (st->equalizer){
-               MSFilter *f=st->equalizer;
-               int enabled=lp_config_get_int(lc->config,"sound","eq_active",0);
-               const char *gains=lp_config_get_string(lc->config,"sound","eq_gains",NULL);
-               ms_filter_call_method(f,MS_EQUALIZER_SET_ACTIVE,&enabled);
-               if (enabled){
-                       if (gains){
-                               do{
-                                       int bytes;
-                                       MSEqualizerGain g;
-                                       if (sscanf(gains,"%f:%f:%f %n",&g.frequency,&g.gain,&g.width,&bytes)==3){
-                                               ms_message("Read equalizer gains: %f(~%f) --> %f",g.frequency,g.width,g.gain);
-                                               ms_filter_call_method(f,MS_EQUALIZER_SET_GAIN,&g);
-                                               gains+=bytes;
-                                       }else break;
-                               }while(1);
-                       }
-               }
-       }
-}
-
-static void post_configure_audio_streams(LinphoneCore *lc){
-       AudioStream *st=lc->audiostream;
-       float gain=lp_config_get_float(lc->config,"sound","mic_gain",-1);
-       if (gain!=-1)
-               audio_stream_set_mic_gain(st,gain);
-       if (linphone_core_echo_limiter_enabled(lc)){
-               float speed=lp_config_get_float(lc->config,"sound","el_speed",-1);
-               float thres=lp_config_get_float(lc->config,"sound","el_thres",-1);
-               float force=lp_config_get_float(lc->config,"sound","el_force",-1);
-               int sustain=lp_config_get_int(lc->config,"sound","el_sustain",-1);
-               MSFilter *f=NULL;
-               if (st->el_type==ELControlMic){
-                       f=st->volsend;
-                       if (speed==-1) speed=0.03;
-                       if (force==-1) force=10;
-               }
-               else if (st->el_type==ELControlSpeaker){
-                       f=st->volrecv;
-                       if (speed==-1) speed=0.02;
-                       if (force==-1) force=5;
-               }
-               if (speed!=-1)
-                       ms_filter_call_method(f,MS_VOLUME_SET_EA_SPEED,&speed);
-               if (thres!=-1)
-                       ms_filter_call_method(f,MS_VOLUME_SET_EA_THRESHOLD,&thres);
-               if (force!=-1)
-                       ms_filter_call_method(f,MS_VOLUME_SET_EA_FORCE,&force);
-               if (sustain!=-1)
-                       ms_filter_call_method(f,MS_VOLUME_SET_EA_SUSTAIN,&sustain);
-
-       }
-       if (st->volsend){
-               float ng_thres=lp_config_get_float(lc->config,"sound","ng_thres",0.05);
-               float ng_floorgain=lp_config_get_float(lc->config,"sound","ng_floorgain",0);
-               ms_filter_call_method(st->volsend,MS_VOLUME_SET_NOISE_GATE_THRESHOLD,&ng_thres);
-               ms_filter_call_method(st->volsend,MS_VOLUME_SET_NOISE_GATE_FLOORGAIN,&ng_floorgain);
-       }
-       parametrize_equalizer(lc,st);
-       if (lc->vtable.dtmf_received!=NULL){
-               /* replace by our default action*/
-               audio_stream_play_received_dtmfs(lc->audiostream,FALSE);
-               rtp_session_signal_connect(lc->audiostream->session,"telephone-event",(RtpCallback)linphone_core_dtmf_received,(unsigned long)lc);
-       }
-}
-
-void linphone_core_start_media_streams(LinphoneCore *lc, LinphoneCall *call){
-       LinphoneAddress *me=linphone_core_get_primary_contact_parsed(lc);
-       const char *tool="linphone-" LINPHONE_VERSION;
-       char *cname;
-       /* adjust rtp jitter compensation. It must be at least the latency of the sound card */
-       int jitt_comp=MAX(lc->sound_conf.latency,lc->rtp_conf.audio_jitt_comp);
-
-       if (call->media_start_time==0) call->media_start_time=time(NULL);
-
-       cname=ortp_strdup_printf("%s@%s",me->url->username,me->url->host);
-       {
-               StreamParams *audio_params=&call->audio_params;
-               if (!lc->use_files){
-                       MSSndCard *playcard=lc->sound_conf.play_sndcard;
-                       MSSndCard *captcard=lc->sound_conf.capt_sndcard;
-                       if (playcard==NULL) {
-                               ms_warning("No card defined for playback !");
-                               goto end;
-                       }
-                       if (captcard==NULL) {
-                               ms_warning("No card defined for capture !");
-                               goto end;
-                       }
-                       if (audio_params->relay_session_id!=NULL)
-                               audio_stream_set_relay_session_id(lc->audiostream,audio_params->relay_session_id);
-                       audio_stream_start_now(
-                               lc->audiostream,
-                               call->profile,
-                               audio_params->remoteaddr,
-                               audio_params->remoteport,
-                               audio_params->remotertcpport,
-                               audio_params->pt,
-                               jitt_comp,
-                               playcard,
-                               captcard,
-                               linphone_core_echo_cancellation_enabled(lc));
-               }else{
-                       audio_stream_start_with_files(
-                               lc->audiostream,
-                               call->profile,
-                               audio_params->remoteaddr,
-                               audio_params->remoteport,
-                               audio_params->remotertcpport,
-                               audio_params->pt,
-                               100,
-                               lc->play_file,
-                               lc->rec_file);
-               }
-               post_configure_audio_streams(lc);
-               audio_stream_set_rtcp_information(lc->audiostream, cname, tool);
-       }
-#ifdef VIDEO_ENABLED
-       {
-               /* shutdown preview */
-               if (lc->previewstream!=NULL) {
-                       video_preview_stop(lc->previewstream);
-                       lc->previewstream=NULL;
-               }
-               if (lc->video_conf.display || lc->video_conf.capture) {
-                       StreamParams *video_params=&call->video_params;
-
-                       if (video_params->remoteport>0){
-                               if (video_params->relay_session_id!=NULL)
-                                       video_stream_set_relay_session_id(lc->videostream,video_params->relay_session_id);
-                               video_stream_set_sent_video_size(lc->videostream,linphone_core_get_preferred_video_size(lc));
-                               video_stream_enable_self_view(lc->videostream,lc->video_conf.selfview);
-                               if (lc->video_conf.display && lc->video_conf.capture)
-                                       video_stream_start(lc->videostream,
-                                       call->profile, video_params->remoteaddr, video_params->remoteport,
-                                       video_params->remotertcpport,
-                                       video_params->pt, jitt_comp, lc->video_conf.device);
-                               else if (lc->video_conf.display)
-                                       video_stream_recv_only_start(lc->videostream,
-                                       call->profile, video_params->remoteaddr, video_params->remoteport,
-                                       video_params->pt, jitt_comp);
-                               else if (lc->video_conf.capture)
-                                       video_stream_send_only_start(lc->videostream,
-                                       call->profile, video_params->remoteaddr, video_params->remoteport,
-                                       video_params->remotertcpport,
-                                       video_params->pt, jitt_comp, lc->video_conf.device);
-                               video_stream_set_rtcp_information(lc->videostream, cname,tool);
-                       }
-               }
-       }
-#endif
-       goto end;
-       end:
-       ms_free(cname);
-       linphone_address_destroy(me);
-       lc->call->state=LCStateAVRunning;
-}
-
-void linphone_core_stop_media_streams(LinphoneCore *lc){
-       if (lc->audiostream!=NULL) {
-               audio_stream_stop(lc->audiostream);
-               lc->audiostream=NULL;
-       }
-#ifdef VIDEO_ENABLED
-       if (lc->videostream!=NULL){
-               if (lc->video_conf.display && lc->video_conf.capture)
-                       video_stream_stop(lc->videostream);
-               else if (lc->video_conf.display)
-                       video_stream_recv_only_stop(lc->videostream);
-               else if (lc->video_conf.capture)
-                       video_stream_send_only_stop(lc->videostream);
-               lc->videostream=NULL;
-       }
-       if (linphone_core_video_preview_enabled(lc)){
-               if (lc->previewstream==NULL){
-                       lc->previewstream=video_preview_start(lc->video_conf.device, lc->video_conf.vsize);
-               }
-       }
-#endif
-}
-
-/**
- * Accept an incoming call.
- *
- * @ingroup call_control
- * Basically the application is notified of incoming calls within the
- * invite_recv callback of the #LinphoneCoreVTable structure.
- * The application can later respond positively to the call using
- * this method.
- * @param lc the LinphoneCore object
- * @param url the SIP address of the originator of the call, or NULL.
- *            This argument is useful for managing multiple calls simulatenously,
- *            however this feature is not supported yet.
- *            Using NULL will accept the unique incoming call in progress.
-**/
-int linphone_core_accept_call(LinphoneCore *lc, const char *url)
-{
-       char *sdpmesg;
-       osip_message_t *msg=NULL;
-       LinphoneCall *call=lc->call;
-       int err;
-       bool_t offering=FALSE;
-
-       if (call==NULL){
-               return -1;
-       }
-
-       if (lc->call->state==LCStateAVRunning){
-               /*call already accepted*/
-               return -1;
-       }
-
-       /*stop ringing */
-       if (lc->ringstream!=NULL) {
-               ms_message("stop ringing");
-               ring_stop(lc->ringstream);
-               ms_message("ring stopped");
-               lc->ringstream=NULL;
-       }
-       /* sends a 200 OK */
-       err=eXosip_call_build_answer(call->tid,200,&msg);
-       if (err<0 || msg==NULL){
-               ms_error("Fail to build answer for call: err=%i",err);
-               return -1;
-       }
-       if (lp_config_get_int(lc->config,"sip","use_session_timers",0)==1){
-               if (call->supports_session_timers) osip_message_set_supported(msg, "timer");
-       }
-       /*try to be best-effort in giving real local or routable contact address,
-       except when the user choosed to override the ipaddress */
-       if (linphone_core_get_firewall_policy(lc)!=LINPHONE_POLICY_USE_NAT_ADDRESS)
-               fix_contact(lc,msg,call->localip,NULL);
-       /*if a sdp answer is computed, send it, else send an offer */
-       sdpmesg=call->sdpctx->answerstr;
-       if (sdpmesg==NULL){
-               offering=TRUE;
-               ms_message("generating sdp offer");
-               sdpmesg=sdp_context_get_offer(call->sdpctx);
-
-               if (sdpmesg==NULL){
-                       ms_error("fail to generate sdp offer !");
-                       return -1;
-               }
-               linphone_set_sdp(msg,sdpmesg);
-               linphone_core_init_media_streams(lc);
-       }else{
-               linphone_set_sdp(msg,sdpmesg);
-       }
-       eXosip_lock();
-       eXosip_call_send_answer(call->tid,200,msg);
-       eXosip_unlock();
-       lc->vtable.display_status(lc,_("Connected."));
-       gstate_new_state(lc, GSTATE_CALL_IN_CONNECTED, NULL);
-
-       if (!offering) linphone_core_start_media_streams(lc, lc->call);
-       ms_message("call answered.");
-       return 0;
-}
-
-/**
- * Terminates a call.
- *
- * @ingroup call_control
- * @param lc The LinphoneCore
- * @param url the destination of the call to be terminated, use NULL if there is
- *            only one call (which is case in this version of liblinphone).
-**/
-int linphone_core_terminate_call(LinphoneCore *lc, const char *url)
-{
-       LinphoneCall *call=lc->call;
-       if (call==NULL){
-               return -1;
-       }
-       lc->call=NULL;
-
-       eXosip_lock();
-       eXosip_call_terminate(call->cid,call->did);
-       eXosip_unlock();
-
-       /*stop ringing*/
-       if (lc->ringstream!=NULL) {
-               ring_stop(lc->ringstream);
-               lc->ringstream=NULL;
-       }
-       linphone_core_stop_media_streams(lc);
-       lc->vtable.display_status(lc,_("Call ended") );
-       gstate_new_state(lc, GSTATE_CALL_END, NULL);
-       linphone_call_destroy(call);
-       return 0;
-}
-
-/**
- * Returns TRUE if there is a call running or pending.
- *
- * @ingroup call_control
-**/
-bool_t linphone_core_in_call(const LinphoneCore *lc){
-       return lc->call!=NULL;
-}
-
-int linphone_core_send_publish(LinphoneCore *lc,
-                              LinphoneOnlineStatus presence_mode)
-{
-       const MSList *elem;
-       for (elem=linphone_core_get_proxy_config_list(lc);elem!=NULL;elem=ms_list_next(elem)){
-               LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
-               if (cfg->publish) linphone_proxy_config_send_publish(cfg,presence_mode);
-       }
-       return 0;
-}
-
-/**
- * Set the incoming call timeout in seconds.
- *
- * @ingroup call_control
- * If an incoming call isn't answered for this timeout period, it is 
- * automatically declined.
-**/
-void linphone_core_set_inc_timeout(LinphoneCore *lc, int seconds){
-       lc->sip_conf.inc_timeout=seconds;
-}
-
-/**
- * Returns the incoming call timeout
- *
- * @ingroup call_control
- * See linphone_core_set_inc_timeout() for details.
-**/
-int linphone_core_get_inc_timeout(LinphoneCore *lc){
-       return lc->sip_conf.inc_timeout;
-}
-
-void linphone_core_set_presence_info(LinphoneCore *lc,int minutes_away,
-                                                                                                       const char *contact,
-                                                                                                       LinphoneOnlineStatus presence_mode)
-{
-       int contactok=-1;
-       if (minutes_away>0) lc->minutes_away=minutes_away;
-       if (contact!=NULL) {
-               osip_from_t *url;
-               osip_from_init(&url);
-               contactok=osip_from_parse(url,contact);
-               if (contactok>=0) {
-                       ms_message("contact url is correct.");
-               }
-               osip_from_free(url);
-
-       }
-       if (contactok>=0){
-               if (lc->alt_contact!=NULL) ms_free(lc->alt_contact);
-               lc->alt_contact=ms_strdup(contact);
-       }
-       if (lc->presence_mode!=presence_mode){
-               linphone_core_notify_all_friends(lc,presence_mode);
-               /*
-                  Improve the use of all LINPHONE_STATUS available.
-                  !TODO Do not mix "presence status" with "answer status code"..
-                  Use correct parameter to follow sip_if_match/sip_etag.
-                */
-               linphone_core_send_publish(lc,presence_mode);
-       }
-       lc->prev_mode=lc->presence_mode;
-       lc->presence_mode=presence_mode;
-
-}
-
-LinphoneOnlineStatus linphone_core_get_presence_info(const LinphoneCore *lc){
-       return lc->presence_mode;
-}
-
-/**
- * Get playback sound level in 0-100 scale.
- *
- * @ingroup media_parameters
-**/
-int linphone_core_get_play_level(LinphoneCore *lc)
-{
-       return lc->sound_conf.play_lev;
-}
-
-/**
- * Get ring sound level in 0-100 scale
- *
- * @ingroup media_parameters
-**/
-int linphone_core_get_ring_level(LinphoneCore *lc)
-{
-       return lc->sound_conf.ring_lev;
-}
-
-/**
- * Get sound capture level in 0-100 scale
- *
- * @ingroup media_parameters
-**/
-int linphone_core_get_rec_level(LinphoneCore *lc){
-       return lc->sound_conf.rec_lev;
-}
-
-/**
- * Set sound ring level in 0-100 scale
- *
- * @ingroup media_parameters
-**/
-void linphone_core_set_ring_level(LinphoneCore *lc, int level){
-       MSSndCard *sndcard;
-       lc->sound_conf.ring_lev=level;
-       sndcard=lc->sound_conf.ring_sndcard;
-       if (sndcard) ms_snd_card_set_level(sndcard,MS_SND_CARD_PLAYBACK,level);
-}
-
-/**
- * Set sound playback level in 0-100 scale
- *
- * @ingroup media_parameters
-**/
-void linphone_core_set_play_level(LinphoneCore *lc, int level){
-       MSSndCard *sndcard;
-       lc->sound_conf.play_lev=level;
-       sndcard=lc->sound_conf.play_sndcard;
-       if (sndcard) ms_snd_card_set_level(sndcard,MS_SND_CARD_PLAYBACK,level);
-}
-
-/**
- * Set sound capture level in 0-100 scale
- *
- * @ingroup media_parameters
-**/
-void linphone_core_set_rec_level(LinphoneCore *lc, int level)
-{
-       MSSndCard *sndcard;
-       lc->sound_conf.rec_lev=level;
-       sndcard=lc->sound_conf.capt_sndcard;
-       if (sndcard) ms_snd_card_set_level(sndcard,MS_SND_CARD_CAPTURE,level);
-}
-
-static MSSndCard *get_card_from_string_id(const char *devid, unsigned int cap){
-       MSSndCard *sndcard=NULL;
-       if (devid!=NULL){
-               sndcard=ms_snd_card_manager_get_card(ms_snd_card_manager_get(),devid);
-               if (sndcard!=NULL &&
-                       (ms_snd_card_get_capabilities(sndcard) & cap)==0 ){
-                       ms_warning("%s card does not have the %s capability, ignoring.",
-                               devid,
-                               cap==MS_SND_CARD_CAP_CAPTURE ? "capture" : "playback");
-                       sndcard=NULL;
-               }
-       }
-       if (sndcard==NULL) {
-               /* get a card that has read+write capabilities */
-               sndcard=ms_snd_card_manager_get_default_card(ms_snd_card_manager_get());
-               /* otherwise refine to the first card having the right capability*/
-               if (sndcard==NULL){
-                       const MSList *elem=ms_snd_card_manager_get_list(ms_snd_card_manager_get());
-                       for(;elem!=NULL;elem=elem->next){
-                               sndcard=(MSSndCard*)elem->data;
-                               if (ms_snd_card_get_capabilities(sndcard) & cap) break;
-                       }
-               }
-               if (sndcard==NULL){/*looks like a bug! take the first one !*/
-                       const MSList *elem=ms_snd_card_manager_get_list(ms_snd_card_manager_get());
-                       sndcard=(MSSndCard*)elem->data;
-               }
-       }
-       if (sndcard==NULL) ms_error("Could not find a suitable soundcard !");
-       return sndcard;
-}
-
-/**
- * Returns true if the specified sound device can capture sound.
- *
- * @ingroup media_parameters
- * @param devid the device name as returned by linphone_core_get_sound_devices()
-**/
-bool_t linphone_core_sound_device_can_capture(LinphoneCore *lc, const char *devid){
-       MSSndCard *sndcard;
-       sndcard=ms_snd_card_manager_get_card(ms_snd_card_manager_get(),devid);
-       if (sndcard!=NULL && (ms_snd_card_get_capabilities(sndcard) & MS_SND_CARD_CAP_CAPTURE)) return TRUE;
-       return FALSE;
-}
-
-/**
- * Returns true if the specified sound device can play sound.
- *
- * @ingroup media_parameters
- * @param devid the device name as returned by linphone_core_get_sound_devices()
-**/
-bool_t linphone_core_sound_device_can_playback(LinphoneCore *lc, const char *devid){
-       MSSndCard *sndcard;
-       sndcard=ms_snd_card_manager_get_card(ms_snd_card_manager_get(),devid);
-       if (sndcard!=NULL && (ms_snd_card_get_capabilities(sndcard) & MS_SND_CARD_CAP_PLAYBACK)) return TRUE;
-       return FALSE;
-}
-
-/**
- * Sets the sound device used for ringing.
- *
- * @ingroup media_parameters
- * @param devid the device name as returned by linphone_core_get_sound_devices()
-**/
-int linphone_core_set_ringer_device(LinphoneCore *lc, const char * devid){
-       MSSndCard *card=get_card_from_string_id(devid,MS_SND_CARD_CAP_PLAYBACK);
-       lc->sound_conf.ring_sndcard=card;
-       if (card && lc->ready)
-               lp_config_set_string(lc->config,"sound","ringer_dev_id",ms_snd_card_get_string_id(card));
-       return 0;
-}
-
-/**
- * Sets the sound device used for playback.
- *
- * @ingroup media_parameters
- * @param devid the device name as returned by linphone_core_get_sound_devices()
-**/
-int linphone_core_set_playback_device(LinphoneCore *lc, const char * devid){
-       MSSndCard *card=get_card_from_string_id(devid,MS_SND_CARD_CAP_PLAYBACK);
-       lc->sound_conf.play_sndcard=card;
-       if (card && lc->ready)
-               lp_config_set_string(lc->config,"sound","playback_dev_id",ms_snd_card_get_string_id(card));
-       return 0;
-}
-
-/**
- * Sets the sound device used for capture.
- *
- * @ingroup media_parameters
- * @param devid the device name as returned by linphone_core_get_sound_devices()
-**/
-int linphone_core_set_capture_device(LinphoneCore *lc, const char * devid){
-       MSSndCard *card=get_card_from_string_id(devid,MS_SND_CARD_CAP_CAPTURE);
-       lc->sound_conf.capt_sndcard=card;
-       if (card && lc->ready)
-               lp_config_set_string(lc->config,"sound","capture_dev_id",ms_snd_card_get_string_id(card));
-       return 0;
-}
-
-/**
- * Returns the name of the currently assigned sound device for ringing.
- *
- * @ingroup media_parameters
-**/
-const char * linphone_core_get_ringer_device(LinphoneCore *lc)
-{
-       if (lc->sound_conf.ring_sndcard) return ms_snd_card_get_string_id(lc->sound_conf.ring_sndcard);
-       return NULL;
-}
-
-/**
- * Returns the name of the currently assigned sound device for playback.
- *
- * @ingroup media_parameters
-**/
-const char * linphone_core_get_playback_device(LinphoneCore *lc)
-{
-       return lc->sound_conf.play_sndcard ? ms_snd_card_get_string_id(lc->sound_conf.play_sndcard) : NULL;
-}
-
-/**
- * Returns the name of the currently assigned sound device for capture.
- *
- * @ingroup media_parameters
-**/
-const char * linphone_core_get_capture_device(LinphoneCore *lc)
-{
-       return lc->sound_conf.capt_sndcard ? ms_snd_card_get_string_id(lc->sound_conf.capt_sndcard) : NULL;
-}
-
-/**
- * Returns an unmodifiable array of available sound devices.
- *
- * @ingroup media_parameters
- * The array is NULL terminated.
-**/
-const char**  linphone_core_get_sound_devices(LinphoneCore *lc){
-       build_sound_devices_table(lc);
-       return lc->sound_conf.cards;
-}
-
-/**
- * Returns an unmodifiable array of available video capture devices.
- *
- * @ingroup media_parameters
- * The array is NULL terminated.
-**/
-const char**  linphone_core_get_video_devices(const LinphoneCore *lc){
-       return lc->video_conf.cams;
-}
-
-char linphone_core_get_sound_source(LinphoneCore *lc)
-{
-       return lc->sound_conf.source;
-}
-
-void linphone_core_set_sound_source(LinphoneCore *lc, char source)
-{
-       MSSndCard *sndcard=lc->sound_conf.capt_sndcard;
-       lc->sound_conf.source=source;
-       if (!sndcard) return;
-       switch(source){
-               case 'm':
-                       ms_snd_card_set_capture(sndcard,MS_SND_CARD_MIC);
-                       break;
-               case 'l':
-                       ms_snd_card_set_capture(sndcard,MS_SND_CARD_LINE);
-                       break;
-       }
-
-}
-
-
-/**
- * Sets the path to a wav file used for ringing.
- *
- * The file must be a wav 16bit linear.
- *
- * @ingroup media_parameters
-**/
-void linphone_core_set_ring(LinphoneCore *lc,const char *path){
-       if (lc->sound_conf.local_ring!=0){
-               ms_free(lc->sound_conf.local_ring);
-       }
-       lc->sound_conf.local_ring=ms_strdup(path);
-       if (lc->ready && lc->sound_conf.local_ring)
-               lp_config_set_string(lc->config,"sound","local_ring",lc->sound_conf.local_ring);
-}
-
-/**
- * Returns the path to the wav file used for ringing.
- *
- * @ingroup media_parameters
-**/
-const char *linphone_core_get_ring(const LinphoneCore *lc){
-       return lc->sound_conf.local_ring;
-}
-
-static void notify_end_of_ring(void *ud ,unsigned int event, void * arg){
-       LinphoneCore *lc=(LinphoneCore*)ud;
-       lc->preview_finished=1;
-}
-
-int linphone_core_preview_ring(LinphoneCore *lc, const char *ring,LinphoneCoreCbFunc func,void * userdata)
-{
-       if (lc->ringstream!=0){
-               ms_warning("Cannot start ring now,there's already a ring being played");
-               return -1;
-       }
-       lc_callback_obj_init(&lc->preview_finished_cb,func,userdata);
-       lc->preview_finished=0;
-       if (lc->sound_conf.ring_sndcard!=NULL){
-               lc->ringstream=ring_start_with_cb(ring,2000,lc->sound_conf.ring_sndcard,notify_end_of_ring,(void *)lc);
-       }
-       return 0;
-}
-
-/**
- * Sets the path to a wav file used for ringing back.
- *
- * Ringback means the ring that is heard when it's ringing at the remote party.
- * The file must be a wav 16bit linear.
- *
- * @ingroup media_parameters
-**/
-void linphone_core_set_ringback(LinphoneCore *lc, const char *path){
-       if (lc->sound_conf.remote_ring!=0){
-               ms_free(lc->sound_conf.remote_ring);
-       }
-       lc->sound_conf.remote_ring=ms_strdup(path);
-}
-
-/**
- * Returns the path to the wav file used for ringing back.
- *
- * @ingroup media_parameters
-**/
-const char * linphone_core_get_ringback(const LinphoneCore *lc){
-       return lc->sound_conf.remote_ring;
-}
-
-/**
- * Enables or disable echo cancellation.
- *
- * @ingroup media_parameters
-**/
-void linphone_core_enable_echo_cancellation(LinphoneCore *lc, bool_t val){
-       lc->sound_conf.ec=val;
-       if (lc->ready)
-               lp_config_set_int(lc->config,"sound","echocancellation",val);
-}
-
-/**
- * Returns TRUE if echo cancellation is enabled.
- *
- * @ingroup media_parameters
-**/
-bool_t linphone_core_echo_cancellation_enabled(LinphoneCore *lc){
-       return lc->sound_conf.ec;
-}
-
-void linphone_core_enable_echo_limiter(LinphoneCore *lc, bool_t val){
-       lc->sound_conf.ea=val;
-}
-
-bool_t linphone_core_echo_limiter_enabled(const LinphoneCore *lc){
-       return lc->sound_conf.ea;
-}
-
-/**
- * Mutes or unmutes the local microphone.
- *
- * @ingroup media_parameters
-**/
-void linphone_core_mute_mic(LinphoneCore *lc, bool_t val){
-       if (lc->audiostream!=NULL){
-                audio_stream_set_mic_gain(lc->audiostream,
-                       (val==TRUE) ? 0 : 1.0);
-       }
-}
-
-void linphone_core_enable_agc(LinphoneCore *lc, bool_t val){
-       lc->sound_conf.agc=val;
-}
-
-bool_t linphone_core_agc_enabled(const LinphoneCore *lc){
-       return lc->sound_conf.agc;
-}
-
-/**
- * Send the specified dtmf.
- *
- * @ingroup media_parameters
- * This function only works during calls. The dtmf is automatically played to the user.
- * @param lc The LinphoneCore object
- * @param dtmf The dtmf name specified as a char, such as '0', '#' etc...
- *
-**/
-void linphone_core_send_dtmf(LinphoneCore *lc,char dtmf)
-{
-       /*By default we send DTMF RFC2833 if we do not have enabled SIP_INFO but we can also send RFC2833 and SIP_INFO*/
-       if (linphone_core_get_use_rfc2833_for_dtmf(lc)!=0 || linphone_core_get_use_info_for_dtmf(lc)==0)
-       {
-               /* In Band DTMF */
-               if (lc->audiostream!=NULL){
-                       audio_stream_send_dtmf(lc->audiostream,dtmf);
-               }
-               else
-               {
-                       ms_error("we cannot send RFC2833 dtmf when we are not in communication");
-               }
-       }
-       if (linphone_core_get_use_info_for_dtmf(lc)!=0)
-       {
-               char dtmf_body[1000];
-               char clen[10];
-               osip_message_t *msg=NULL;
-               /* Out of Band DTMF (use INFO method) */
-               LinphoneCall *call=lc->call;
-               if (call==NULL){
-                       return;
-               }
-               eXosip_call_build_info(call->did,&msg);
-               snprintf(dtmf_body, 999, "Signal=%c\r\nDuration=250\r\n", dtmf);
-               osip_message_set_body(msg,dtmf_body,strlen(dtmf_body));
-               osip_message_set_content_type(msg,"application/dtmf-relay");
-               snprintf(clen,sizeof(clen),"%lu",(unsigned long)strlen(dtmf_body));
-               osip_message_set_content_length(msg,clen);
-
-               eXosip_lock();
-               eXosip_call_send_request(call->did,msg);
-               eXosip_unlock();
-       }
-}
-
-void linphone_core_set_stun_server(LinphoneCore *lc, const char *server){
-       if (lc->net_conf.stun_server!=NULL)
-               ms_free(lc->net_conf.stun_server);
-       if (server)
-               lc->net_conf.stun_server=ms_strdup(server);
-       else lc->net_conf.stun_server=NULL;
-       lc->apply_nat_settings=TRUE;
-}
-
-const char * linphone_core_get_stun_server(const LinphoneCore *lc){
-       return lc->net_conf.stun_server;
-}
-
-const char * linphone_core_get_relay_addr(const LinphoneCore *lc){
-       return lc->net_conf.relay;
-}
-
-int linphone_core_set_relay_addr(LinphoneCore *lc, const char *addr){
-       if (lc->net_conf.relay!=NULL){
-               ms_free(lc->net_conf.relay);
-               lc->net_conf.relay=NULL;
-       }
-       if (addr){
-               lc->net_conf.relay=ms_strdup(addr);
-       }
-       return 0;
-}
-
-static void apply_nat_settings(LinphoneCore *lc){
-       char *wmsg;
-       char *tmp=NULL;
-       int err;
-       struct addrinfo hints,*res;
-       const char *addr=lc->net_conf.nat_address;
-
-       if (lc->net_conf.firewall_policy==LINPHONE_POLICY_USE_NAT_ADDRESS){
-               if (addr==NULL || strlen(addr)==0){
-                       lc->vtable.display_warning(lc,_("No nat/firewall address supplied !"));
-                       linphone_core_set_firewall_policy(lc,LINPHONE_POLICY_NO_FIREWALL);
-               }
-               /*check the ip address given */
-               memset(&hints,0,sizeof(struct addrinfo));
-               if (lc->sip_conf.ipv6_enabled)
-                       hints.ai_family=AF_INET6;
-               else
-                       hints.ai_family=AF_INET;
-               hints.ai_socktype = SOCK_DGRAM;
-               err=getaddrinfo(addr,NULL,&hints,&res);
-               if (err!=0){
-                       wmsg=ortp_strdup_printf(_("Invalid nat address '%s' : %s"),
-                               addr, gai_strerror(err));
-                       ms_warning(wmsg); // what is this for ?
-                       lc->vtable.display_warning(lc, wmsg);
-                       ms_free(wmsg);
-                       linphone_core_set_firewall_policy(lc,LINPHONE_POLICY_NO_FIREWALL);
-                       return;
-               }
-               /*now get it as an numeric ip address */
-               tmp=ms_malloc0(50);
-               err=getnameinfo(res->ai_addr,res->ai_addrlen,tmp,50,NULL,0,NI_NUMERICHOST);
-               if (err!=0){
-                       wmsg=ortp_strdup_printf(_("Invalid nat address '%s' : %s"),
-                               addr, gai_strerror(err));
-                       ms_warning(wmsg); // what is this for ?
-                       lc->vtable.display_warning(lc, wmsg);
-                       ms_free(wmsg);
-                       ms_free(tmp);
-                       freeaddrinfo(res);
-                       linphone_core_set_firewall_policy(lc,LINPHONE_POLICY_NO_FIREWALL);
-                       return;
-               }
-               freeaddrinfo(res);
-       }
-
-       if (lc->net_conf.firewall_policy==LINPHONE_POLICY_USE_NAT_ADDRESS){
-               if (tmp!=NULL){
-                       if (!lc->net_conf.nat_sdp_only){
-                               eXosip_set_option(EXOSIP_OPT_SET_IPV4_FOR_GATEWAY,tmp);
-                               /* the following does not work in all cases */
-                               /*
-                               eXosip_masquerade_contact(tmp,lc->sip_conf.sip_port);
-                               */
-                       }
-                       ms_free(tmp);
-               }
-               else{
-                       eXosip_set_option(EXOSIP_OPT_SET_IPV4_FOR_GATEWAY,NULL);
-                       eXosip_masquerade_contact("",0);
-               }
-       }
-       else {
-               eXosip_set_option(EXOSIP_OPT_SET_IPV4_FOR_GATEWAY,NULL);
-               eXosip_masquerade_contact("",0);
-       }
-}
-
-
-void linphone_core_set_nat_address(LinphoneCore *lc, const char *addr)
-{
-       if (lc->net_conf.nat_address!=NULL){
-               ms_free(lc->net_conf.nat_address);
-       }
-       if (addr!=NULL) lc->net_conf.nat_address=ms_strdup(addr);
-       else lc->net_conf.nat_address=NULL;
-       lc->apply_nat_settings=TRUE;
-}
-
-const char *linphone_core_get_nat_address(const LinphoneCore *lc)
-{
-       return lc->net_conf.nat_address;
-}
-
-void linphone_core_set_firewall_policy(LinphoneCore *lc, LinphoneFirewallPolicy pol){
-       lc->net_conf.firewall_policy=pol;
-       lc->apply_nat_settings=TRUE;
-}
-
-LinphoneFirewallPolicy linphone_core_get_firewall_policy(const LinphoneCore *lc){
-       return lc->net_conf.firewall_policy;
-}
-
-/**
- * Get the list of call logs (past calls).
- *
- * @ingroup call_logs
-**/
-const MSList * linphone_core_get_call_logs(LinphoneCore *lc){
-       lc->missed_calls=0;
-       return lc->call_logs;
-}
-
-/**
- * Erase the call log.
- *
- * @ingroup call_logs
-**/
-void linphone_core_clear_call_logs(LinphoneCore *lc){
-       lc->missed_calls=0;
-       ms_list_for_each(lc->call_logs,(void (*)(void*))linphone_call_log_destroy);
-       lc->call_logs=ms_list_free(lc->call_logs);
-       call_logs_write_to_config_file(lc);
-}
-
-static void toggle_video_preview(LinphoneCore *lc, bool_t val){
-#ifdef VIDEO_ENABLED
-       if (lc->videostream==NULL){
-               if (val){
-                       if (lc->previewstream==NULL){
-                               lc->previewstream=video_preview_start(lc->video_conf.device,
-                                                       lc->video_conf.vsize);
-                       }
-               }else{
-                       if (lc->previewstream!=NULL){
-                               video_preview_stop(lc->previewstream);
-                               lc->previewstream=NULL;
-                       }
-               }
-       }
-#endif
-}
-
-/**
- * Enables video globally.
- *
- * @ingroup media_parameters
- * This function does not have any effect during calls. It just indicates LinphoneCore to
- * initiate future calls with video or not. The two boolean parameters indicate in which
- * direction video is enabled. Setting both to false disables video entirely.
- *
- * @param vcap_enabled indicates whether video capture is enabled
- * @param display_enabled indicates whether video display should be shown
- *
-**/
-void linphone_core_enable_video(LinphoneCore *lc, bool_t vcap_enabled, bool_t display_enabled){
-#ifndef VIDEO_ENABLED
-       if (vcap_enabled || display_enabled)
-               ms_warning("This version of linphone was built without video support.");
-#endif
-       lc->video_conf.capture=vcap_enabled;
-       lc->video_conf.display=display_enabled;
-
-       if (lc->ready){
-               lp_config_set_int(lc->config,"video","display",display_enabled);
-               lp_config_set_int(lc->config,"video","capture",vcap_enabled);
-       }
-
-       /* need to re-apply network bandwidth settings*/
-       linphone_core_set_download_bandwidth(lc,
-               linphone_core_get_download_bandwidth(lc));
-       linphone_core_set_upload_bandwidth(lc,
-               linphone_core_get_upload_bandwidth(lc));
-}
-
-/**
- * Returns TRUE if video is enabled, FALSE otherwise.
- * @ingroup media_parameters
-**/
-bool_t linphone_core_video_enabled(LinphoneCore *lc){
-       return (lc->video_conf.display || lc->video_conf.capture);
-}
-
-/**
- * Controls video preview enablement.
- *
- * @ingroup media_parameters
- * Video preview refers to the action of displaying the local webcam image
- * to the user while not in call.
-**/
-void linphone_core_enable_video_preview(LinphoneCore *lc, bool_t val){
-       lc->video_conf.show_local=val;
-       if (lc->ready) lp_config_set_int(lc->config,"video","show_local",val);
-}
-
-/**
- * Returns TRUE if video previewing is enabled.
- * @ingroup media_parameters
-**/
-bool_t linphone_core_video_preview_enabled(const LinphoneCore *lc){
-       return lc->video_conf.show_local;
-}
-
-/**
- * Enables or disable self view during calls.
- *
- * @ingroup media_parameters
- * Self-view refers to having local webcam image inserted in corner
- * of the video window during calls.
- * This function works at any time, including during calls.
-**/
-void linphone_core_enable_self_view(LinphoneCore *lc, bool_t val){
-       lc->video_conf.selfview=val;
-#ifdef VIDEO_ENABLED
-       if (lc->videostream){
-               video_stream_enable_self_view(lc->videostream,val);
-       }
-#endif
-}
-
-/**
- * Returns TRUE if self-view is enabled, FALSE otherwise.
- *
- * @ingroup media_parameters
- *
- * Refer to linphone_core_enable_self_view() for details.
-**/
-bool_t linphone_core_self_view_enabled(const LinphoneCore *lc){
-       return lc->video_conf.selfview;
-}
-
-/**
- * Sets the active video device.
- *
- * @ingroup media_parameters
- * @param id the name of the video device as returned by linphone_core_get_video_devices()
-**/
-int linphone_core_set_video_device(LinphoneCore *lc, const char *id){
-       MSWebCam *olddev=lc->video_conf.device;
-       const char *vd;
-       if (id!=NULL){
-               lc->video_conf.device=ms_web_cam_manager_get_cam(ms_web_cam_manager_get(),id);
-               if (lc->video_conf.device==NULL){
-                       ms_warning("Could not found video device %s",id);
-               }
-       }
-       if (lc->video_conf.device==NULL)
-               lc->video_conf.device=ms_web_cam_manager_get_default_cam(ms_web_cam_manager_get());
-       if (olddev!=NULL && olddev!=lc->video_conf.device){
-               toggle_video_preview(lc,FALSE);/*restart the video local preview*/
-       }
-       if (lc->ready && lc->video_conf.device){
-               vd=ms_web_cam_get_string_id(lc->video_conf.device);
-               if (vd && strstr(vd,"Static picture")!=NULL){
-                       vd=NULL;
-               }
-               lp_config_set_string(lc->config,"video","device",vd);
-       }
-       return 0;
-}
-
-/**
- * Returns the name of the currently active video device.
- *
- * @ingroup media_parameters
-**/
-const char *linphone_core_get_video_device(const LinphoneCore *lc){
-       if (lc->video_conf.device) return ms_web_cam_get_string_id(lc->video_conf.device);
-       return NULL;
-}
-
-/**
- * Returns the native window handle of the video window, casted as an unsigned long.
- *
- * @ingroup media_parameters
-**/
-unsigned long linphone_core_get_native_video_window_id(const LinphoneCore *lc){
-#ifdef VIDEO_ENABLED
-       if (lc->videostream)
-               return video_stream_get_native_window_id(lc->videostream);
-       if (lc->previewstream)
-               return video_stream_get_native_window_id(lc->previewstream);
-#endif
-       return 0;
-}
-
-static MSVideoSizeDef supported_resolutions[]={
-       {       {MS_VIDEO_SIZE_SVGA_W,MS_VIDEO_SIZE_SVGA_H}     ,       "svga"  },
-       {       {MS_VIDEO_SIZE_4CIF_W,MS_VIDEO_SIZE_4CIF_H}     ,       "4cif"  },
-       {       {MS_VIDEO_SIZE_VGA_W,MS_VIDEO_SIZE_VGA_H}       ,       "vga"   },
-       {       {MS_VIDEO_SIZE_CIF_W,MS_VIDEO_SIZE_CIF_H}       ,       "cif"   },
-       {       {MS_VIDEO_SIZE_QVGA_W,MS_VIDEO_SIZE_QVGA_H}     ,       "qvga"  },
-       {       {MS_VIDEO_SIZE_QCIF_W,MS_VIDEO_SIZE_QCIF_H}     ,       "qcif"  },
-       {       {0,0}                   ,       NULL    }
-};
-
-/**
- * Returns the zero terminated table of supported video resolutions.
- *
- * @ingroup media_parameters
-**/
-const MSVideoSizeDef *linphone_core_get_supported_video_sizes(LinphoneCore *lc){
-       return supported_resolutions;
-}
-
-static MSVideoSize video_size_get_by_name(const char *name){
-       MSVideoSizeDef *pdef=supported_resolutions;
-       MSVideoSize null_vsize={0,0};
-       for(;pdef->name!=NULL;pdef++){
-               if (strcasecmp(name,pdef->name)==0){
-                       return pdef->vsize;
-               }
-       }
-       ms_warning("Video resolution %s is not supported in linphone.",name);
-       return null_vsize;
-}
-
-static const char *video_size_get_name(MSVideoSize vsize){
-       MSVideoSizeDef *pdef=supported_resolutions;
-       for(;pdef->name!=NULL;pdef++){
-               if (pdef->vsize.width==vsize.width && pdef->vsize.height==vsize.height){
-                       return pdef->name;
-               }
-       }
-       return NULL;
-}
-
-static bool_t video_size_supported(MSVideoSize vsize){
-       if (video_size_get_name(vsize)) return TRUE;
-       ms_warning("Video resolution %ix%i is not supported in linphone.",vsize.width,vsize.height);
-       return FALSE;
-}
-
-/**
- * Sets the preferred video size.
- *
- * @ingroup media_parameters
- * This applies only to the stream that is captured and sent to the remote party,
- * since we accept all standart video size on the receive path.
-**/
-void linphone_core_set_preferred_video_size(LinphoneCore *lc, MSVideoSize vsize){
-       if (video_size_supported(vsize)){
-               MSVideoSize oldvsize=lc->video_conf.vsize;
-               lc->video_conf.vsize=vsize;
-               if (!ms_video_size_equal(oldvsize,vsize) && lc->previewstream!=NULL){
-                       toggle_video_preview(lc,FALSE);
-                       toggle_video_preview(lc,TRUE);
-               }
-               if (lc->ready)
-                       lp_config_set_string(lc->config,"video","size",video_size_get_name(vsize));
-       }
-}
-
-/**
- * Sets the preferred video size by its name.
- *
- * @ingroup media_parameters
- * This is identical to linphone_core_set_preferred_video_size() except
- * that it takes the name of the video resolution as input.
- * Video resolution names are: qcif, svga, cif, vga, 4cif, svga ...
-**/
-void linphone_core_set_preferred_video_size_by_name(LinphoneCore *lc, const char *name){
-       MSVideoSize vsize=video_size_get_by_name(name);
-       MSVideoSize default_vsize={MS_VIDEO_SIZE_CIF_W,MS_VIDEO_SIZE_CIF_H};
-       if (vsize.width!=0)     linphone_core_set_preferred_video_size(lc,vsize);
-       else linphone_core_set_preferred_video_size(lc,default_vsize);
-}
-
-/**
- * Returns the current preferred video size for sending.
- *
- * @ingroup media_parameters
-**/
-MSVideoSize linphone_core_get_preferred_video_size(LinphoneCore *lc){
-       return lc->video_conf.vsize;
-}
-
-void linphone_core_use_files(LinphoneCore *lc, bool_t yesno){
-       lc->use_files=yesno;
-}
-
-void linphone_core_set_play_file(LinphoneCore *lc, const char *file){
-       if (lc->play_file!=NULL){
-               ms_free(lc->play_file);
-               lc->play_file=NULL;
-       }
-       if (file!=NULL) {
-               lc->play_file=ms_strdup(file);
-               if (lc->audiostream)
-                       audio_stream_play(lc->audiostream,file);
-       }
-}
-
-void linphone_core_set_record_file(LinphoneCore *lc, const char *file){
-       if (lc->rec_file!=NULL){
-               ms_free(lc->rec_file);
-               lc->rec_file=NULL;
-       }
-       if (file!=NULL) {
-               lc->rec_file=ms_strdup(file);
-               if (lc->audiostream)
-                       audio_stream_record(lc->audiostream,file);
-       }
-}
-
-/**
- * Retrieves the user pointer that was given to linphone_core_new()
- *
- * @ingroup initializing
-**/
-void *linphone_core_get_user_data(LinphoneCore *lc){
-       return lc->data;
-}
-
-int linphone_core_get_mtu(const LinphoneCore *lc){
-       return lc->net_conf.mtu;
-}
-
-void linphone_core_set_mtu(LinphoneCore *lc, int mtu){
-       lc->net_conf.mtu=mtu;
-       if (mtu>0){
-               if (mtu<500){
-                       ms_error("MTU too small !");
-                       mtu=500;
-               }
-               ms_set_mtu(mtu);
-               ms_message("MTU is supposed to be %i, rtp payload max size will be %i",mtu, ms_get_payload_max_size());
-       }else ms_set_mtu(0);//use mediastreamer2 default value
-}
-
-void linphone_core_set_waiting_callback(LinphoneCore *lc, LinphoneWaitingCallback cb, void *user_context){
-       lc->wait_cb=cb;
-       lc->wait_ctx=user_context;
-}
-
-void linphone_core_start_waiting(LinphoneCore *lc, const char *purpose){
-       if (lc->wait_cb){
-               lc->wait_ctx=lc->wait_cb(lc,lc->wait_ctx,LinphoneWaitingStart,purpose,0);
-       }
-}
-
-void linphone_core_update_progress(LinphoneCore *lc, const char *purpose, float progress){
-       if (lc->wait_cb){
-               lc->wait_ctx=lc->wait_cb(lc,lc->wait_ctx,LinphoneWaitingProgress,purpose,progress);
-       }else{
-#ifdef WIN32
-               Sleep(50000);
-#else
-               usleep(50000);
-#endif
-       }
-}
-
-void linphone_core_stop_waiting(LinphoneCore *lc){
-       if (lc->wait_cb){
-               lc->wait_ctx=lc->wait_cb(lc,lc->wait_ctx,LinphoneWaitingFinished,NULL,0);
-       }
-}
-
-void linphone_core_set_audio_transports(LinphoneCore *lc, RtpTransport *rtp, RtpTransport *rtcp){
-       lc->a_rtp=rtp;
-       lc->a_rtcp=rtcp;
-}
-
-void net_config_uninit(LinphoneCore *lc)
-{
-       net_config_t *config=&lc->net_conf;
-       lp_config_set_int(lc->config,"net","download_bw",config->download_bw);
-       lp_config_set_int(lc->config,"net","upload_bw",config->upload_bw);
-
-       if (config->stun_server!=NULL)
-               lp_config_set_string(lc->config,"net","stun_server",config->stun_server);
-       if (config->nat_address!=NULL)
-               lp_config_set_string(lc->config,"net","nat_address",config->nat_address);
-       lp_config_set_int(lc->config,"net","firewall_policy",config->firewall_policy);
-       lp_config_set_int(lc->config,"net","mtu",config->mtu);
-       if (lc->net_conf.stun_server!=NULL)
-               ms_free(lc->net_conf.stun_server);
-}
-
-
-void sip_config_uninit(LinphoneCore *lc)
-{
-       MSList *elem;
-       int i;
-       sip_config_t *config=&lc->sip_conf;
-       lp_config_set_int(lc->config,"sip","sip_port",config->sip_port);
-       lp_config_set_int(lc->config,"sip","guess_hostname",config->guess_hostname);
-       lp_config_set_string(lc->config,"sip","contact",config->contact);
-       lp_config_set_int(lc->config,"sip","inc_timeout",config->inc_timeout);
-       lp_config_set_int(lc->config,"sip","use_info",config->use_info);
-       lp_config_set_int(lc->config,"sip","use_rfc2833",config->use_rfc2833);
-       lp_config_set_int(lc->config,"sip","use_ipv6",config->ipv6_enabled);
-       lp_config_set_int(lc->config,"sip","register_only_when_network_is_up",config->register_only_when_network_is_up);
-       for(elem=config->proxies,i=0;elem!=NULL;elem=ms_list_next(elem),i++){
-               LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)(elem->data);
-               linphone_proxy_config_write_to_config_file(lc->config,cfg,i);
-               linphone_proxy_config_edit(cfg);        /* to unregister */
-       }
-
-       if (exosip_running)
-         {
-           int i;
-           for (i=0;i<20;i++)
-             {
-               eXosip_event_t *ev;
-               while((ev=eXosip_event_wait(0,0))!=NULL){
-                 linphone_core_process_event(lc,ev);
-               }
-               eXosip_automatic_action();
-#ifndef WIN32
-               usleep(100000);
-#else
-        Sleep(100);
-#endif
-             }
-         }
-
-       linphone_proxy_config_write_to_config_file(lc->config,NULL,i);  /*mark the end */
-
-       for(elem=lc->auth_info,i=0;elem!=NULL;elem=ms_list_next(elem),i++){
-               LinphoneAuthInfo *ai=(LinphoneAuthInfo*)(elem->data);
-               linphone_auth_info_write_config(lc->config,ai,i);
-       }
-       linphone_auth_info_write_config(lc->config,NULL,i); /* mark the end */
-}
-
-void rtp_config_uninit(LinphoneCore *lc)
-{
-       rtp_config_t *config=&lc->rtp_conf;
-       lp_config_set_int(lc->config,"rtp","audio_rtp_port",config->audio_rtp_port);
-       lp_config_set_int(lc->config,"rtp","video_rtp_port",config->video_rtp_port);
-       lp_config_set_int(lc->config,"rtp","audio_jitt_comp",config->audio_jitt_comp);
-       lp_config_set_int(lc->config,"rtp","video_jitt_comp",config->audio_jitt_comp);
-       lp_config_set_int(lc->config,"rtp","nortp_timeout",config->nortp_timeout);
-}
-
-void sound_config_uninit(LinphoneCore *lc)
-{
-       sound_config_t *config=&lc->sound_conf;
-       ms_free(config->cards);
-
-       lp_config_set_string(lc->config,"sound","remote_ring",config->remote_ring);
-
-       if (config->local_ring) ms_free(config->local_ring);
-       if (config->remote_ring) ms_free(config->remote_ring);
-       ms_snd_card_manager_destroy();
-}
-
-void video_config_uninit(LinphoneCore *lc)
-{
-
-}
-
-void codecs_config_uninit(LinphoneCore *lc)
-{
-       PayloadType *pt;
-       codecs_config_t *config=&lc->codecs_conf;
-       MSList *node;
-       char key[50];
-       int index;
-       index=0;
-       for(node=config->audio_codecs;node!=NULL;node=ms_list_next(node)){
-               pt=(PayloadType*)(node->data);
-               sprintf(key,"audio_codec_%i",index);
-               lp_config_set_string(lc->config,key,"mime",pt->mime_type);
-               lp_config_set_int(lc->config,key,"rate",pt->clock_rate);
-               lp_config_set_int(lc->config,key,"enabled",payload_type_enabled(pt));
-               index++;
-       }
-       index=0;
-       for(node=config->video_codecs;node!=NULL;node=ms_list_next(node)){
-               pt=(PayloadType*)(node->data);
-               sprintf(key,"video_codec_%i",index);
-               lp_config_set_string(lc->config,key,"mime",pt->mime_type);
-               lp_config_set_int(lc->config,key,"rate",pt->clock_rate);
-               lp_config_set_int(lc->config,key,"enabled",payload_type_enabled(pt));
-               lp_config_set_string(lc->config,key,"recv_fmtp",pt->recv_fmtp);
-               index++;
-       }
-       if (lc->local_profile){
-               rtp_profile_destroy(lc->local_profile);
-               lc->local_profile=NULL;
-       }
-}
-
-void ui_config_uninit(LinphoneCore* lc)
-{
-       if (lc->friends){
-               ms_list_for_each(lc->friends,(void (*)(void *))linphone_friend_destroy);
-               ms_list_free(lc->friends);
-               lc->friends=NULL;
-       }
-}
-
-/**
- * Returns the LpConfig object used to manage the storage (config) file.
- *
- * @ingroup misc
- * The application can use the LpConfig object to insert its own private 
- * sections and pairs of key=value in the configuration file.
- * 
-**/
-LpConfig *linphone_core_get_config(LinphoneCore *lc){
-       return lc->config;
-}
-
-static void linphone_core_uninit(LinphoneCore *lc)
-{
-       if (lc->call){
-               int i;
-               linphone_core_terminate_call(lc,NULL);
-               for(i=0;i<10;++i){
-#ifndef WIN32
-                       usleep(50000);
-#else
-                       Sleep(50);
-#endif
-                       linphone_core_iterate(lc);
-               }
-       }
-       gstate_new_state(lc, GSTATE_POWER_SHUTDOWN, NULL);
-#ifdef VIDEO_ENABLED
-       if (lc->previewstream!=NULL){
-               video_preview_stop(lc->previewstream);
-               lc->previewstream=NULL;
-       }
-#endif
-       /* save all config */
-       net_config_uninit(lc);
-       sip_config_uninit(lc);
-       lp_config_set_int(lc->config,"sip","default_proxy",linphone_core_get_default_proxy(lc,NULL));
-       rtp_config_uninit(lc);
-       sound_config_uninit(lc);
-       video_config_uninit(lc);
-       codecs_config_uninit(lc);
-       ui_config_uninit(lc);
-       if (lp_config_needs_commit(lc->config)) lp_config_sync(lc->config);
-       lp_config_destroy(lc->config);
-       sip_setup_unregister_all();
-
-       linphone_core_free_payload_types();
-
-       ortp_exit();
-       eXosip_quit();
-       exosip_running=FALSE;
-       gstate_new_state(lc, GSTATE_POWER_OFF, NULL);
-}
-
-/**
- * Destroys a LinphoneCore
- *
- * @ingroup initializing
-**/
-void linphone_core_destroy(LinphoneCore *lc){
-       linphone_core_uninit(lc);
-       ms_free(lc);
-}
-
diff --git a/linphone/coreapi/linphonecore.h b/linphone/coreapi/linphonecore.h
deleted file mode 100644 (file)
index 94d15c2..0000000
+++ /dev/null
@@ -1,941 +0,0 @@
-/*
-linphone
-Copyright (C) 2000  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-#ifndef LINPHONECORE_H
-#define LINPHONECORE_H
-
-#include "ortp/ortp.h"
-#include "ortp/payloadtype.h"
-#include "mediastreamer2/mscommon.h"
-#include "mediastreamer2/msvideo.h"
-
-#ifdef IN_LINPHONE
-#include "sipsetup.h"
-#else
-#include "linphone/sipsetup.h"
-#endif
-
-#define LINPHONE_IPADDR_SIZE 64
-#define LINPHONE_HOSTNAME_SIZE 128
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct _MSSndCard;
-struct _LinphoneCore;
-
-bool_t payload_type_enabled(struct _PayloadType *pt);
-void payload_type_set_enable(struct _PayloadType *pt,int value);
-const char *payload_type_get_description(struct _PayloadType *pt);
-int payload_type_get_bitrate(PayloadType *pt);
-const char *payload_type_get_mime(PayloadType *pt);
-int payload_type_get_rate(PayloadType *pt);
-
-
-struct _LpConfig;
-
-typedef struct sip_config
-{
-       char *contact;
-       char *guessed_contact;
-       int sip_port;
-       MSList *proxies;
-       MSList *deleted_proxies;
-       int inc_timeout;        /*timeout after an un-answered incoming call is rejected*/
-       bool_t use_info;
-       bool_t use_rfc2833;     /*force RFC2833 to be sent*/
-       bool_t guess_hostname;
-       bool_t loopback_only;
-       bool_t ipv6_enabled;
-       bool_t sdp_200_ack;
-       bool_t only_one_codec; /*in SDP answers*/
-       bool_t register_only_when_network_is_up;
-} sip_config_t;
-
-typedef struct rtp_config
-{
-       int audio_rtp_port;
-       int video_rtp_port;
-       int audio_jitt_comp;  /*jitter compensation*/
-       int video_jitt_comp;  /*jitter compensation*/
-       int nortp_timeout;
-}rtp_config_t;
-
-
-
-typedef struct net_config
-{
-       char *nat_address;
-       char *stun_server;
-       char *relay;
-       int download_bw;
-       int upload_bw;
-       int firewall_policy;
-       int mtu;
-       bool_t nat_sdp_only;
-}net_config_t;
-
-
-typedef struct sound_config
-{
-       struct _MSSndCard * ring_sndcard;       /* the playback sndcard currently used */
-       struct _MSSndCard * play_sndcard;       /* the playback sndcard currently used */
-       struct _MSSndCard * capt_sndcard; /* the capture sndcard currently used */
-       const char **cards;
-       int latency;    /* latency in samples of the current used sound device */
-       char rec_lev;
-       char play_lev;
-       char ring_lev;
-       char source;
-       char *local_ring;
-       char *remote_ring;
-       bool_t ec;
-       bool_t ea;
-       bool_t agc;
-} sound_config_t;
-
-typedef struct codecs_config
-{
-       MSList *audio_codecs;  /* list of audio codecs in order of preference*/
-       MSList *video_codecs;   /* for later use*/
-}codecs_config_t;
-
-typedef struct video_config{
-       struct _MSWebCam *device;
-       const char **cams;
-       MSVideoSize vsize;
-       bool_t capture;
-       bool_t show_local;
-       bool_t display;
-       bool_t selfview; /*during calls*/
-}video_config_t;
-
-typedef struct ui_config
-{
-       int is_daemon;
-       int is_applet;
-       unsigned int timer_id;  /* the timer id for registration */
-}ui_config_t;
-
-
-
-typedef struct autoreplier_config
-{
-       int enabled;
-       int after_seconds;              /* accept the call after x seconds*/
-       int max_users;                  /* maximum number of user that can call simultaneously */
-       int max_rec_time;       /* the max time of incoming voice recorded */
-       int max_rec_msg;                /* maximum number of recorded messages */
-       const char *message;            /* the path of the file to be played */
-}autoreplier_config_t;
-
-struct osip_from;
-
-/**
- * Object that represents a SIP address.
- *
- * The LinphoneAddress is an opaque object to represents SIP addresses, ie
- * the content of SIP's 'from' and 'to' headers.
- * A SIP address is made of display name, username, domain name, port, and various
- * uri headers (such as tags). It looks like 'Alice <sip:alice@example.net>'.
- * The LinphoneAddress has methods to extract and manipulate all parts of the address.
- * When some part of the address (for example the username) is empty, the accessor methods
- * return NULL.
- * 
- * @ingroup linphone_address
- * @var LinphoneAddress
- */
-typedef struct osip_from LinphoneAddress;
-
-LinphoneAddress * linphone_address_new(const char *uri);
-LinphoneAddress * linphone_address_clone(const LinphoneAddress *uri);
-const char *linphone_address_get_scheme(const LinphoneAddress *u);
-const char *linphone_address_get_display_name(const LinphoneAddress* u);
-const char *linphone_address_get_username(const LinphoneAddress *u);
-const char *linphone_address_get_domain(const LinphoneAddress *u);
-void linphone_address_set_display_name(LinphoneAddress *u, const char *display_name);
-void linphone_address_set_username(LinphoneAddress *uri, const char *username);
-void linphone_address_set_domain(LinphoneAddress *uri, const char *host);
-void linphone_address_set_port(LinphoneAddress *uri, const char *port);
-void linphone_address_set_port_int(LinphoneAddress *uri, int port);
-/*remove tags, params etc... so that it is displayable to the user*/
-void linphone_address_clean(LinphoneAddress *uri);
-char *linphone_address_as_string(const LinphoneAddress *u);
-char *linphone_address_as_string_uri_only(const LinphoneAddress *u);
-void linphone_address_destroy(LinphoneAddress *u);
-
-struct _LinphoneCore;
-struct _sdp_context;
-struct _SipSetupContext;
-struct _LinphoneCall;
-
-/**
- * Enum representing the direction of a call.
- * @ingroup call_logs
-**/
-enum _LinphoneCallDir {
-       LinphoneCallOutgoing, /**< outgoing calls*/
-       LinphoneCallIncoming  /**< incoming calls*/
-};
-
-/**
- * Typedef for enum
- * @ingroup call_logs
-**/
-typedef enum _LinphoneCallDir LinphoneCallDir;
-
-/**
- * Enum representing the status of a call
- * @ingroup call_logs
-**/
-typedef enum _LinphoneCallStatus { 
-       LinphoneCallSuccess, /**< The call was sucessful*/
-       LinphoneCallAborted, /**< The call was aborted */
-       LinphoneCallMissed /**< The call was missed (unanswered)*/
-} LinphoneCallStatus;
-
-/**
- * Structure representing a call log.
- *
- * @ingroup call_logs
- * 
-**/
-typedef struct _LinphoneCallLog{
-       LinphoneCallDir dir; /**< The direction of the call*/
-       LinphoneCallStatus status; /**< The status of the call*/
-       LinphoneAddress *from; /**<Originator of the call as a LinphoneAddress object*/
-       LinphoneAddress *to; /**<Destination of the call as a LinphoneAddress object*/
-       char start_date[128]; /**<Human readable string containg the start date*/
-       int duration; /**<Duration of the call in seconds*/
-       char *refkey;
-       void *user_pointer;
-       struct _LinphoneCore *lc;
-} LinphoneCallLog;
-
-
-
-/*public: */
-void linphone_call_log_set_user_pointer(LinphoneCallLog *cl, void *up);
-void *linphone_call_log_get_user_pointer(const LinphoneCallLog *cl);
-void linphone_call_log_set_ref_key(LinphoneCallLog *cl, const char *refkey);
-const char *linphone_call_log_get_ref_key(const LinphoneCallLog *cl);
-char * linphone_call_log_to_str(LinphoneCallLog *cl);
-
-typedef enum{
-       LinphoneSPWait,
-       LinphoneSPDeny,
-       LinphoneSPAccept
-}LinphoneSubscribePolicy;
-
-typedef enum _LinphoneOnlineStatus{
-       LINPHONE_STATUS_UNKNOWN,
-       LINPHONE_STATUS_ONLINE,
-       LINPHONE_STATUS_BUSY,
-       LINPHONE_STATUS_BERIGHTBACK,
-       LINPHONE_STATUS_AWAY,
-       LINPHONE_STATUS_ONTHEPHONE,
-       LINPHONE_STATUS_OUTTOLUNCH,
-       LINPHONE_STATUS_NOT_DISTURB,
-       LINPHONE_STATUS_MOVED,
-       LINPHONE_STATUS_ALT_SERVICE,
-       LINPHONE_STATUS_OFFLINE,
-       LINPHONE_STATUS_PENDING,
-       LINPHONE_STATUS_CLOSED,
-       LINPHONE_STATUS_END
-}LinphoneOnlineStatus;
-
-const char *linphone_online_status_to_string(LinphoneOnlineStatus ss);
-
-typedef struct _LinphoneFriend{
-       LinphoneAddress *uri;
-       int in_did;
-       int out_did;
-       int sid;
-       int nid;
-       LinphoneSubscribePolicy pol;
-       LinphoneOnlineStatus status;
-       struct _LinphoneProxyConfig *proxy;
-       struct _LinphoneCore *lc;
-       BuddyInfo *info;
-       char *refkey;
-       bool_t subscribe;
-       bool_t inc_subscribe_pending;
-}LinphoneFriend;       
-
-LinphoneFriend * linphone_friend_new();
-LinphoneFriend *linphone_friend_new_with_addr(const char *addr);
-int linphone_friend_set_sip_addr(LinphoneFriend *fr, const char *uri);
-int linphone_friend_set_name(LinphoneFriend *fr, const char *name);
-int linphone_friend_send_subscribe(LinphoneFriend *fr, bool_t val);
-int linphone_friend_set_inc_subscribe_policy(LinphoneFriend *fr, LinphoneSubscribePolicy pol);
-int linphone_friend_set_proxy(LinphoneFriend *fr, struct _LinphoneProxyConfig *cfg);
-void linphone_friend_edit(LinphoneFriend *fr);
-void linphone_friend_done(LinphoneFriend *fr);
-void linphone_friend_destroy(LinphoneFriend *lf);
-const LinphoneAddress *linphone_friend_get_uri(const LinphoneFriend *lf);
-bool_t linphone_friend_get_send_subscribe(const LinphoneFriend *lf);
-LinphoneSubscribePolicy linphone_friend_get_inc_subscribe_policy(const LinphoneFriend *lf);
-LinphoneOnlineStatus linphone_friend_get_status(const LinphoneFriend *lf);
-BuddyInfo * linphone_friend_get_info(const LinphoneFriend *lf);
-void linphone_friend_set_ref_key(LinphoneFriend *lf, const char *key);
-const char *linphone_friend_get_ref_key(const LinphoneFriend *lf);
-#define linphone_friend_in_list(lf)    ((lf)->lc!=NULL)
-
-#define linphone_friend_url(lf) ((lf)->url)
-
-/**
- * @addtogroup proxies
- * @{
-**/
-/**
- * The LinphoneProxyConfig object represents a proxy configuration to be used
- * by the LinphoneCore object.
- * Its fields must not be used directly in favour of the accessors methods.
- * Once created and filled properly the LinphoneProxyConfig can be given to
- * LinphoneCore with linphone_core_add_proxy_config().
- * This will automatically triggers the registration, if enabled.
- *
- * The proxy configuration are persistent to restarts because they are saved
- * in the configuration file. As a consequence, after linphone_core_new() there
- * might already be a list of configured proxy that can be examined with
- * linphone_core_get_proxy_config_list().
- *
- * The default proxy (see linphone_core_set_default_proxy() ) is the one of the list
- * that is used by default for calls.
-**/
-typedef struct _LinphoneProxyConfig
-{
-       struct _LinphoneCore *lc;
-       char *reg_proxy;
-       char *reg_identity;
-       char *reg_route;
-       char *realm;
-       int expires;
-       int reg_time;
-       int rid;
-       char *type;
-       struct _SipSetupContext *ssctx;
-       int auth_failures;
-       char *contact_addr; /* our IP address as seen by the proxy, read from via 's received= parameter*/
-       int contact_port; /*our IP port as seen by the proxy, read from via's rport= parameter */
-       char *dial_prefix;
-       bool_t commit;
-       bool_t reg_sendregister;
-       bool_t registered;
-       bool_t publish;
-       bool_t dial_escape_plus;
-} LinphoneProxyConfig;
-
-LinphoneProxyConfig *linphone_proxy_config_new(void);
-int linphone_proxy_config_set_server_addr(LinphoneProxyConfig *obj, const char *server_addr);
-void linphone_proxy_config_set_identity(LinphoneProxyConfig *obj, const char *identity);
-void linphone_proxy_config_set_route(LinphoneProxyConfig *obj, const char *route);
-void linphone_proxy_config_expires(LinphoneProxyConfig *obj, int expires);
-void linphone_proxy_config_enable_register(LinphoneProxyConfig *obj, bool_t val);
-#define linphone_proxy_config_enableregister linphone_proxy_config_enable_register
-void linphone_proxy_config_edit(LinphoneProxyConfig *obj);
-int linphone_proxy_config_done(LinphoneProxyConfig *obj);
-void linphone_proxy_config_enable_publish(LinphoneProxyConfig *obj, bool_t val);
-bool_t linphone_proxy_config_is_registered(const LinphoneProxyConfig *obj);
-const char *linphone_proxy_config_get_domain(const LinphoneProxyConfig *cfg);
-/** Returns the proxy configured identity as a const char * */
-#define linphone_proxy_config_get_route(obj)  ((obj)->reg_route)
-/** Returns the proxy configured identity as a const char * */
-#define linphone_proxy_config_get_identity(obj)        ((obj)->reg_identity)
-#define linphone_proxy_config_publish_enabled(obj) ((obj)->publish)
-/** Returns the proxy sip address as const char * */
-#define linphone_proxy_config_get_addr(obj) ((obj)->reg_proxy)
-/** Returns the 'expire' time of the registration */
-#define linphone_proxy_config_get_expires(obj) ((obj)->expires)
-/** Returns TRUE if registration is enabled, FALSE otherwise */
-#define linphone_proxy_config_register_enabled(obj) ((obj)->reg_sendregister)
-#define linphone_proxy_config_get_core(obj) ((obj)->lc)
-/* destruction is called automatically when removing the proxy config */
-void linphone_proxy_config_destroy(LinphoneProxyConfig *cfg);
-void linphone_proxy_config_set_sip_setup(LinphoneProxyConfig *cfg, const char *type);
-SipSetupContext *linphone_proxy_config_get_sip_setup_context(LinphoneProxyConfig *cfg);
-SipSetup *linphone_proxy_config_get_sip_setup(LinphoneProxyConfig *cfg);
-
-/**
- * @}
-**/
-
-typedef struct _LinphoneAccountCreator{
-       struct _LinphoneCore *lc;
-       struct _SipSetupContext *ssctx;
-       char *username;
-       char *password;
-       char *domain;
-       bool_t succeeded;
-}LinphoneAccountCreator;
-
-LinphoneAccountCreator *linphone_account_creator_new(struct _LinphoneCore *core, const char *type);
-void linphone_account_creator_set_username(LinphoneAccountCreator *obj, const char *username);
-void linphone_account_creator_set_password(LinphoneAccountCreator *obj, const char *password);
-void linphone_account_creator_set_domain(LinphoneAccountCreator *obj, const char *domain);
-const char * linphone_account_creator_get_username(LinphoneAccountCreator *obj);
-const char * linphone_account_creator_get_domain(LinphoneAccountCreator *obj);
-int linphone_account_creator_test_existence(LinphoneAccountCreator *obj);
-LinphoneProxyConfig * linphone_account_creator_validate(LinphoneAccountCreator *obj);
-void linphone_account_creator_destroy(LinphoneAccountCreator *obj);
-
-/**
- * @ingroup authentication
- * Object holding authentication information.
- *
- * @note The object's fields should not be accessed directly. Prefer using
- * the accessor methods.
- *
- * In most case, authentication information consists of a username and password.
- * Sometimes, a userid is required by proxy, and realm can be useful to discriminate
- * different SIP domains.
- *
- * Once created and filled, a LinphoneAuthInfo must be added to the LinphoneCore in
- * order to become known and used automatically when needed. 
- * Use linphone_core_add_auth_info() for that purpose.
- *
- * The LinphoneCore object can take the initiative to request authentication information
- * when needed to the application through the auth_info_requested callback of the
- * LinphoneCoreVTable structure.
- *
- * The application can respond to this information request later using 
- * linphone_core_add_auth_info(). This will unblock all pending authentication 
- * transactions and retry them with authentication headers.
- *
-**/
-typedef struct _LinphoneAuthInfo
-{
-       char *username;
-       char *realm;
-       char *userid;
-       char *passwd;
-       char *ha1;
-       bool_t works;
-       bool_t first_time;
-}LinphoneAuthInfo;
-
-LinphoneAuthInfo *linphone_auth_info_new(const char *username, const char *userid,
-               const char *passwd, const char *ha1,const char *realm);
-void linphone_auth_info_set_passwd(LinphoneAuthInfo *info, const char *passwd);
-void linphone_auth_info_set_username(LinphoneAuthInfo *info, const char *username);
-void linphone_auth_info_set_userid(LinphoneAuthInfo *info, const char *userid);
-/* you don't need those function*/
-void linphone_auth_info_destroy(LinphoneAuthInfo *info);
-LinphoneAuthInfo * linphone_auth_info_new_from_config_file(struct _LpConfig *config, int pos);
-
-struct _LinphoneChatRoom{
-       struct _LinphoneCore *lc;
-       char  *peer;
-       char *route;
-       LinphoneAddress *peer_url;
-       void * user_data;
-};
-typedef struct _LinphoneChatRoom LinphoneChatRoom;
-
-LinphoneChatRoom * linphone_core_create_chat_room(struct _LinphoneCore *lc, const char *to);
-void linphone_chat_room_send_message(LinphoneChatRoom *cr, const char *msg);
-void linphone_chat_room_destroy(LinphoneChatRoom *cr);
-void linphone_chat_room_set_user_data(LinphoneChatRoom *cr, void * ud);
-void * linphone_chat_room_get_user_data(LinphoneChatRoom *cr);
-
-/* describes the different groups of states */
-typedef enum _gstate_group {
-  GSTATE_GROUP_POWER,
-  GSTATE_GROUP_REG,
-  GSTATE_GROUP_CALL
-} gstate_group_t;
-
-typedef enum _gstate {
-  /* states for GSTATE_GROUP_POWER */
-  GSTATE_POWER_OFF = 0,        /* initial state */
-  GSTATE_POWER_STARTUP,
-  GSTATE_POWER_ON,
-  GSTATE_POWER_SHUTDOWN,
-  /* states for GSTATE_GROUP_REG */
-  GSTATE_REG_NONE = 10,       /* initial state */
-  GSTATE_REG_OK,
-  GSTATE_REG_FAILED,
-  /* states for GSTATE_GROUP_CALL */
-  GSTATE_CALL_IDLE = 20,      /* initial state */
-  GSTATE_CALL_OUT_INVITE,
-  GSTATE_CALL_OUT_CONNECTED,
-  GSTATE_CALL_IN_INVITE,
-  GSTATE_CALL_IN_CONNECTED,
-  GSTATE_CALL_END,
-  GSTATE_CALL_ERROR,
-  GSTATE_INVALID
-} gstate_t;
-
-struct _LinphoneGeneralState {
-  gstate_t old_state;
-  gstate_t new_state;
-  gstate_group_t group;
-  const char *message;
-};
-typedef struct _LinphoneGeneralState LinphoneGeneralState;
-
-/* private: set a new state */
-void gstate_new_state(struct _LinphoneCore *lc, gstate_t new_state, const char *message);
-/*private*/
-void gstate_initialize(struct _LinphoneCore *lc) ;
-
-/**
- * @addtogroup initializing
- * @{
-**/
-
-/** Callback prototype */
-typedef void (*ShowInterfaceCb)(struct _LinphoneCore *lc);
-/** Callback prototype */
-typedef void (*InviteReceivedCb)(struct _LinphoneCore *lc, const char *from);
-/** Callback prototype */
-typedef void (*ByeReceivedCb)(struct _LinphoneCore *lc, const char *from);
-/** Callback prototype */
-typedef void (*DisplayStatusCb)(struct _LinphoneCore *lc, const char *message);
-/** Callback prototype */
-typedef void (*DisplayMessageCb)(struct _LinphoneCore *lc, const char *message);
-/** Callback prototype */
-typedef void (*DisplayUrlCb)(struct _LinphoneCore *lc, const char *message, const char *url);
-/** Callback prototype */
-typedef void (*DisplayQuestionCb)(struct _LinphoneCore *lc, const char *message);
-/** Callback prototype */
-typedef void (*LinphoneCoreCbFunc)(struct _LinphoneCore *lc,void * user_data);
-/** Callback prototype */
-typedef void (*NotifyReceivedCb)(struct _LinphoneCore *lc, LinphoneFriend * fid, const char *url, const char *status, const char *img);
-/** Callback prototype */
-typedef void (*NewUnknownSubscriberCb)(struct _LinphoneCore *lc, LinphoneFriend *lf, const char *url);
-/** Callback prototype */
-typedef void (*AuthInfoRequested)(struct _LinphoneCore *lc, const char *realm, const char *username);
-/** Callback prototype */
-typedef void (*CallLogUpdated)(struct _LinphoneCore *lc, struct _LinphoneCallLog *newcl);
-/** Callback prototype */
-typedef void (*TextMessageReceived)(struct _LinphoneCore *lc, LinphoneChatRoom *room, const char *from, const char *message);
-/** Callback prototype */
-typedef void (*GeneralStateChange)(struct _LinphoneCore *lc, LinphoneGeneralState *gstate);
-/** Callback prototype */
-typedef void (*DtmfReceived)(struct _LinphoneCore* lc, int dtmf);
-/** Callback prototype */
-typedef void (*ReferReceived)(struct _LinphoneCore *lc, const char *refer_to);
-/** Callback prototype */
-typedef void (*BuddyInfoUpdated)(struct _LinphoneCore *lc, LinphoneFriend *lf);
-
-/**
- * This structure holds all callbacks that the application should implement.
- * 
-**/
-typedef struct _LinphoneVTable
-{
-       ShowInterfaceCb show; /**< Notifies the application that it should show up*/
-       InviteReceivedCb inv_recv; /**< Notifies incoming calls */
-       ByeReceivedCb bye_recv; /**< Notify calls terminated by far end*/
-       NotifyReceivedCb notify_recv; /**< Notify received presence events*/
-       NewUnknownSubscriberCb new_unknown_subscriber; /**< Notify about unknown subscriber */
-       AuthInfoRequested auth_info_requested; /**< Ask the application some authentication information */
-       DisplayStatusCb display_status; /**< Callback that notifies various events with human readable text.*/
-       DisplayMessageCb display_message;/**< Callback to display a message to the user */
-#ifdef VINCENT_MAURY_RSVP
-       /* the yes/no dialog box */
-       DisplayMessageCb display_yes_no;
-#endif
-       DisplayMessageCb display_warning;/** Callback to display a warning to the user */
-       DisplayUrlCb display_url;
-       DisplayQuestionCb display_question;
-       CallLogUpdated call_log_updated; /**< Notifies that call log list has been updated */
-       TextMessageReceived text_received; /**< A text message has been received */
-       GeneralStateChange general_state; /**< State notification callback */
-       DtmfReceived dtmf_received; /**< A dtmf has been received received */
-       ReferReceived refer_received; /**< A refer was received */
-       BuddyInfoUpdated buddy_info_updated; /**< a LinphoneFriend's BuddyInfo has changed*/
-} LinphoneCoreVTable;
-
-/**
- * @}
-**/
-
-typedef struct _LCCallbackObj
-{
-  LinphoneCoreCbFunc _func;
-  void * _user_data;
-}LCCallbackObj;
-
-
-
-typedef enum _LinphoneFirewallPolicy{
-       LINPHONE_POLICY_NO_FIREWALL,
-       LINPHONE_POLICY_USE_NAT_ADDRESS,
-       LINPHONE_POLICY_USE_STUN
-} LinphoneFirewallPolicy;
-
-typedef enum _LinphoneWaitingState{
-       LinphoneWaitingStart,
-       LinphoneWaitingProgress,
-       LinphoneWaitingFinished
-} LinphoneWaitingState;
-typedef void * (*LinphoneWaitingCallback)(struct _LinphoneCore *lc, void *context, LinphoneWaitingState ws, const char *purpose, float progress);
-
-
-typedef struct _LinphoneCore
-{
-       LinphoneCoreVTable vtable;
-       struct _LpConfig *config;
-       net_config_t net_conf;
-       sip_config_t sip_conf;
-       rtp_config_t rtp_conf;
-       sound_config_t sound_conf;
-       video_config_t video_conf;
-       codecs_config_t codecs_conf;
-       ui_config_t ui_conf;
-       autoreplier_config_t autoreplier_conf;
-       LinphoneProxyConfig *default_proxy;
-       MSList *friends;
-       MSList *auth_info;
-       struct _RingStream *ringstream;
-       LCCallbackObj preview_finished_cb;
-       bool_t preview_finished;
-       struct _LinphoneCall *call;   /* the current call, in the future it will be a list of calls (conferencing)*/
-       int rid; /*registration id*/
-       MSList *queued_calls;   /* used by the autoreplier */
-       MSList *call_logs;
-       MSList *chatrooms;
-       int max_call_logs;
-       int missed_calls;
-       struct _AudioStream *audiostream;  /**/
-       struct _VideoStream *videostream;
-       struct _VideoStream *previewstream;
-       RtpTransport *a_rtp,*a_rtcp;
-       struct _RtpProfile *local_profile;
-       MSList *bl_reqs;
-       MSList *subscribers;    /* unknown subscribers */
-       int minutes_away;
-       LinphoneOnlineStatus presence_mode;
-       LinphoneOnlineStatus prev_mode;
-       char *alt_contact;
-       void *data;
-       ms_mutex_t lock;
-       char *play_file;
-       char *rec_file;
-       time_t prevtime;
-       int dw_audio_bw;
-       int up_audio_bw;
-       int dw_video_bw;
-       int up_video_bw;
-       int audio_bw;
-       int automatic_action;
-       gstate_t gstate_power;
-       gstate_t gstate_reg;
-       gstate_t gstate_call;
-       LinphoneWaitingCallback wait_cb;
-       void *wait_ctx;
-       bool_t use_files;
-       bool_t apply_nat_settings;
-       bool_t ready;
-       bool_t bl_refresh;
-#ifdef VINCENT_MAURY_RSVP
-       /* QoS parameters*/
-       int rsvp_enable;
-       int rpc_enable;
-#endif
-} LinphoneCore;
-
-
-
-/* THE main API */
-
-void linphone_core_enable_logs(FILE *file);
-void linphone_core_enable_logs_with_cb(OrtpLogFunc logfunc);
-void linphone_core_disable_logs(void);
-/*sets the user-agent string in sip messages, must be set before linphone_core_new() or linphone_core_init() */
-void linphone_core_set_user_agent(const char *ua_name, const char *version);
-const char *linphone_core_get_version(void);
-
-LinphoneCore *linphone_core_new(const LinphoneCoreVTable *vtable,
-                                               const char *config_path, const char *factory_config, void* userdata);
-
-/* function to be periodically called in a main loop */
-void linphone_core_iterate(LinphoneCore *lc);
-
-int linphone_core_invite(LinphoneCore *lc, const char *url);
-
-int linphone_core_refer(LinphoneCore *lc, const char *url);
-
-bool_t linphone_core_inc_invite_pending(LinphoneCore*lc);
-
-bool_t linphone_core_in_call(const LinphoneCore *lc);
-
-int linphone_core_accept_call(LinphoneCore *lc, const char *url);
-
-int linphone_core_terminate_call(LinphoneCore *lc, const char *url);
-
-void linphone_core_send_dtmf(LinphoneCore *lc,char dtmf);
-
-int linphone_core_set_primary_contact(LinphoneCore *lc, const char *contact);
-
-const char *linphone_core_get_primary_contact(LinphoneCore *lc);
-
-void linphone_core_set_guess_hostname(LinphoneCore *lc, bool_t val);
-bool_t linphone_core_get_guess_hostname(LinphoneCore *lc);
-
-bool_t linphone_core_ipv6_enabled(LinphoneCore *lc);
-void linphone_core_enable_ipv6(LinphoneCore *lc, bool_t val);
-
-LinphoneAddress *linphone_core_get_primary_contact_parsed(LinphoneCore *lc);
-
-/*0= no bandwidth limit*/
-void linphone_core_set_download_bandwidth(LinphoneCore *lc, int bw);
-void linphone_core_set_upload_bandwidth(LinphoneCore *lc, int bw);
-
-int linphone_core_get_download_bandwidth(const LinphoneCore *lc);
-int linphone_core_get_upload_bandwidth(const LinphoneCore *lc);
-
-
-#ifdef VINCENT_MAURY_RSVP
-/* QoS functions */
-int linphone_core_set_rpc_mode(LinphoneCore *lc, int on); /* on = 1 (RPC_ENABLE = 1) */
-int linphone_core_set_rsvp_mode(LinphoneCore *lc, int on); /* on = 1 (RSVP_ENABLE = 1) */
-int linphone_core_change_qos(LinphoneCore *lc, int answer); /* answer = 1 for yes, 0 for no */
-#endif
-
-/* returns a MSList of PayloadType */
-const MSList *linphone_core_get_audio_codecs(const LinphoneCore *lc);
-
-int linphone_core_set_audio_codecs(LinphoneCore *lc, MSList *codecs);
-/* returns a MSList of PayloadType */
-const MSList *linphone_core_get_video_codecs(const LinphoneCore *lc);
-
-int linphone_core_set_video_codecs(LinphoneCore *lc, MSList *codecs);
-
-bool_t linphone_core_check_payload_type_usability(LinphoneCore *lc, PayloadType *pt);
-
-int linphone_core_add_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *config);
-
-void linphone_core_clear_proxy_config(LinphoneCore *lc);
-
-void linphone_core_remove_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *config);
-
-const MSList *linphone_core_get_proxy_config_list(const LinphoneCore *lc);
-
-void linphone_core_set_default_proxy(LinphoneCore *lc, LinphoneProxyConfig *config);
-
-void linphone_core_set_default_proxy_index(LinphoneCore *lc, int index);
-
-int linphone_core_get_default_proxy(LinphoneCore *lc, LinphoneProxyConfig **config);
-
-void linphone_core_add_auth_info(LinphoneCore *lc, LinphoneAuthInfo *info);
-
-void linphone_core_remove_auth_info(LinphoneCore *lc, LinphoneAuthInfo *info);
-
-const MSList *linphone_core_get_auth_info_list(const LinphoneCore *lc);
-
-LinphoneAuthInfo *linphone_core_find_auth_info(LinphoneCore *lc, const char *realm, const char *username);
-
-void linphone_core_abort_authentication(LinphoneCore *lc,  LinphoneAuthInfo *info);
-
-void linphone_core_clear_all_auth_info(LinphoneCore *lc);
-
-int linphone_core_get_audio_jittcomp(LinphoneCore *lc);
-
-void linphone_core_set_audio_jittcomp(LinphoneCore *lc, int value);
-
-int linphone_core_get_audio_port(const LinphoneCore *lc);
-
-int linphone_core_get_video_port(const LinphoneCore *lc);
-
-int linphone_core_get_nortp_timeout(const LinphoneCore *lc);
-
-void linphone_core_set_audio_port(LinphoneCore *lc, int port);
-
-void linphone_core_set_video_port(LinphoneCore *lc, int port);
-
-void linphone_core_set_nortp_timeout(LinphoneCore *lc, int port);
-
-void linphone_core_set_use_info_for_dtmf(LinphoneCore *lc, bool_t use_info);
-
-bool_t linphone_core_get_use_info_for_dtmf(LinphoneCore *lc);
-
-void linphone_core_set_use_rfc2833_for_dtmf(LinphoneCore *lc,bool_t use_rfc2833);
-
-bool_t linphone_core_get_use_rfc2833_for_dtmf(LinphoneCore *lc);
-
-int linphone_core_get_sip_port(LinphoneCore *lc);
-
-void linphone_core_set_sip_port(LinphoneCore *lc,int port);
-
-void linphone_core_set_inc_timeout(LinphoneCore *lc, int seconds);
-
-int linphone_core_get_inc_timeout(LinphoneCore *lc);
-
-void linphone_core_set_stun_server(LinphoneCore *lc, const char *server);
-
-const char * linphone_core_get_stun_server(const LinphoneCore *lc);
-
-void linphone_core_set_nat_address(LinphoneCore *lc, const char *addr);
-
-const char *linphone_core_get_nat_address(const LinphoneCore *lc);
-
-void linphone_core_set_firewall_policy(LinphoneCore *lc, LinphoneFirewallPolicy pol);
-
-LinphoneFirewallPolicy linphone_core_get_firewall_policy(const LinphoneCore *lc);
-
-const char * linphone_core_get_relay_addr(const LinphoneCore *lc);
-
-int linphone_core_set_relay_addr(LinphoneCore *lc, const char *addr);
-
-/* sound functions */
-/* returns a null terminated static array of string describing the sound devices */ 
-const char**  linphone_core_get_sound_devices(LinphoneCore *lc);
-bool_t linphone_core_sound_device_can_capture(LinphoneCore *lc, const char *device);
-bool_t linphone_core_sound_device_can_playback(LinphoneCore *lc, const char *device);
-int linphone_core_get_ring_level(LinphoneCore *lc);
-int linphone_core_get_play_level(LinphoneCore *lc);
-int linphone_core_get_rec_level(LinphoneCore *lc);
-void linphone_core_set_ring_level(LinphoneCore *lc, int level);
-void linphone_core_set_play_level(LinphoneCore *lc, int level);
-void linphone_core_set_rec_level(LinphoneCore *lc, int level);
-const char * linphone_core_get_ringer_device(LinphoneCore *lc);
-const char * linphone_core_get_playback_device(LinphoneCore *lc);
-const char * linphone_core_get_capture_device(LinphoneCore *lc);
-int linphone_core_set_ringer_device(LinphoneCore *lc, const char * devid);
-int linphone_core_set_playback_device(LinphoneCore *lc, const char * devid);
-int linphone_core_set_capture_device(LinphoneCore *lc, const char * devid);
-char linphone_core_get_sound_source(LinphoneCore *lc);
-void linphone_core_set_sound_source(LinphoneCore *lc, char source);
-void linphone_core_set_ring(LinphoneCore *lc, const char *path);
-const char *linphone_core_get_ring(const LinphoneCore *lc);
-void linphone_core_set_ringback(LinphoneCore *lc, const char *path);
-const char * linphone_core_get_ringback(const LinphoneCore *lc);
-int linphone_core_preview_ring(LinphoneCore *lc, const char *ring,LinphoneCoreCbFunc func,void * userdata);
-void linphone_core_enable_echo_cancellation(LinphoneCore *lc, bool_t val);
-bool_t linphone_core_echo_cancellation_enabled(LinphoneCore *lc);
-
-void linphone_core_enable_echo_limiter(LinphoneCore *lc, bool_t val);
-bool_t linphone_core_echo_limiter_enabled(const LinphoneCore *lc);
-
-void linphone_core_enable_agc(LinphoneCore *lc, bool_t val);
-bool_t linphone_core_agc_enabled(const LinphoneCore *lc);
-
-void linphone_core_mute_mic(LinphoneCore *lc, bool_t muted);
-
-void linphone_core_set_presence_info(LinphoneCore *lc,int minutes_away,const char *contact,LinphoneOnlineStatus os);
-
-LinphoneOnlineStatus linphone_core_get_presence_info(const LinphoneCore *lc);
-
-void linphone_core_interpret_friend_uri(LinphoneCore *lc, const char *uri, char **result);
-void linphone_core_add_friend(LinphoneCore *lc, LinphoneFriend *fr);
-void linphone_core_remove_friend(LinphoneCore *lc, LinphoneFriend *fr);
-void linphone_core_reject_subscriber(LinphoneCore *lc, LinphoneFriend *lf);
-/* a list of LinphoneFriend */
-const MSList * linphone_core_get_friend_list(const LinphoneCore *lc);
-/* notify all friends that have subscribed */
-void linphone_core_notify_all_friends(LinphoneCore *lc, LinphoneOnlineStatus os);
-LinphoneFriend *linphone_core_get_friend_by_uri(const LinphoneCore *lc, const char *uri);
-LinphoneFriend *linphone_core_get_friend_by_ref_key(const LinphoneCore *lc, const char *key);
-
-/* returns a list of LinphoneCallLog */
-const MSList * linphone_core_get_call_logs(LinphoneCore *lc);
-void linphone_core_clear_call_logs(LinphoneCore *lc);
-
-/* video support */
-void linphone_core_enable_video(LinphoneCore *lc, bool_t vcap_enabled, bool_t display_enabled);
-bool_t linphone_core_video_enabled(LinphoneCore *lc);
-
-typedef struct MSVideoSizeDef{
-       MSVideoSize vsize;
-       const char *name;
-}MSVideoSizeDef;
-/* returns a zero terminated table of MSVideoSizeDef*/
-const MSVideoSizeDef *linphone_core_get_supported_video_sizes(LinphoneCore *lc);
-void linphone_core_set_preferred_video_size(LinphoneCore *lc, MSVideoSize vsize);
-MSVideoSize linphone_core_get_preferred_video_size(LinphoneCore *lc);
-void linphone_core_set_preferred_video_size_by_name(LinphoneCore *lc, const char *name);
-
-void linphone_core_enable_video_preview(LinphoneCore *lc, bool_t val);
-bool_t linphone_core_video_preview_enabled(const LinphoneCore *lc);
-
-void linphone_core_enable_self_view(LinphoneCore *lc, bool_t val);
-bool_t linphone_core_self_view_enabled(const LinphoneCore *lc);
-
-
-/* returns a null terminated static array of string describing the webcams */ 
-const char**  linphone_core_get_video_devices(const LinphoneCore *lc);
-int linphone_core_set_video_device(LinphoneCore *lc, const char *id);
-const char *linphone_core_get_video_device(const LinphoneCore *lc);
-
-/*function to be used for eventually setting window decorations (icons, title...)*/
-unsigned long linphone_core_get_native_video_window_id(const LinphoneCore *lc);
-
-
-/*play/record support: use files instead of soundcard*/
-void linphone_core_use_files(LinphoneCore *lc, bool_t yesno);
-void linphone_core_set_play_file(LinphoneCore *lc, const char *file);
-void linphone_core_set_record_file(LinphoneCore *lc, const char *file);
-
-gstate_t linphone_core_get_state(const LinphoneCore *lc, gstate_group_t group);
-int linphone_core_get_current_call_duration(const LinphoneCore *lc);
-const LinphoneAddress *linphone_core_get_remote_uri(LinphoneCore *lc);
-
-int linphone_core_get_mtu(const LinphoneCore *lc);
-void linphone_core_set_mtu(LinphoneCore *lc, int mtu);
-
-bool_t linphone_core_is_in_main_thread(LinphoneCore *lc);
-
-void *linphone_core_get_user_data(LinphoneCore *lc);
-
-/* returns LpConfig object to read/write to the config file: usefull if you wish to extend
-the config file with your own sections */
-struct _LpConfig *linphone_core_get_config(LinphoneCore *lc);
-
-/* attempts to wake up another linphone engine already running.
-The "show" callback is called for the other linphone, causing gui to show up.
-call_addr is an optional sip-uri to call immediately after waking up.
-The method returns 0 if an already running linphone was found*/
-
-int linphone_core_wake_up_possible_already_running_instance(
-    const char * config_file, const char * call_addr);
-
-/*set a callback for some blocking operations, it takes you informed of the progress of the operation*/
-void linphone_core_set_waiting_callback(LinphoneCore *lc, LinphoneWaitingCallback cb, void *user_context);
-
-/*returns the list of registered SipSetup (linphonecore plugins) */
-const MSList * linphone_core_get_sip_setups(LinphoneCore *lc);
-
-void linphone_core_destroy(LinphoneCore *lc);
-
-/*for advanced users:*/
-void linphone_core_set_audio_transports(LinphoneCore *lc, RtpTransport *rtp, RtpTransport *rtcp);
-
-/* end of lecacy api */
-
-/*internal use only */
-#define linphone_core_lock(lc) ms_mutex_lock(&(lc)->lock)
-#define linphone_core_unlock(lc)       ms_mutex_unlock((&lc)->lock)
-void linphone_core_start_media_streams(LinphoneCore *lc, struct _LinphoneCall *call);
-void linphone_core_stop_media_streams(LinphoneCore *lc);
-const char * linphone_core_get_identity(LinphoneCore *lc);
-const char * linphone_core_get_route(LinphoneCore *lc);
-bool_t linphone_core_interpret_url(LinphoneCore *lc, const char *url, LinphoneAddress **real_parsed_url, char **route);
-void linphone_core_start_waiting(LinphoneCore *lc, const char *purpose);
-void linphone_core_update_progress(LinphoneCore *lc, const char *purpose, float progresses);
-void linphone_core_stop_waiting(LinphoneCore *lc);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/linphone/coreapi/lpconfig.c b/linphone/coreapi/lpconfig.c
deleted file mode 100644 (file)
index 9e5cabc..0000000
+++ /dev/null
@@ -1,358 +0,0 @@
-/***************************************************************************
- *            lpconfig.c
- *
- *  Thu Mar 10 11:13:44 2005
- *  Copyright  2005  Simon Morlat
- *  Email simon.morlat@linphone.org
- ****************************************************************************/
-
-/*
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#define MAX_LEN 1024
-
-#include "linphonecore.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#if !defined(_WIN32_WCE)
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#endif /*_WIN32_WCE*/
-
-
-
-#define lp_new0(type,n)        (type*)calloc(sizeof(type),n)
-
-#include "lpconfig.h"
-
-
-typedef struct _LpItem{
-       char *key;
-       char *value;
-} LpItem;
-
-typedef struct _LpSection{
-       char *name;
-       MSList *items;
-} LpSection;
-
-struct _LpConfig{
-       FILE *file;
-       char *filename;
-       MSList *sections;
-       int modified;
-       int readonly;
-};
-
-LpItem * lp_item_new(const char *key, const char *value){
-       LpItem *item=lp_new0(LpItem,1);
-       item->key=ortp_strdup(key);
-       item->value=ortp_strdup(value);
-       return item;
-}
-
-LpSection *lp_section_new(const char *name){
-       LpSection *sec=lp_new0(LpSection,1);
-       sec->name=ortp_strdup(name);
-       return sec;
-}
-
-void lp_item_destroy(void *pitem){
-       LpItem *item=(LpItem*)pitem;
-       free(item->key);
-       free(item->value);
-       free(item);
-}
-
-void lp_section_destroy(LpSection *sec){
-       free(sec->name);
-       ms_list_for_each(sec->items,lp_item_destroy);
-       ms_list_free(sec->items);
-       free(sec);
-}
-
-void lp_section_add_item(LpSection *sec,LpItem *item){
-       sec->items=ms_list_append(sec->items,(void *)item);
-}
-
-void lp_config_add_section(LpConfig *lpconfig, LpSection *section){
-       lpconfig->sections=ms_list_append(lpconfig->sections,(void *)section);
-}
-
-void lp_config_remove_section(LpConfig *lpconfig, LpSection *section){
-       lpconfig->sections=ms_list_remove(lpconfig->sections,(void *)section);
-       lp_section_destroy(section);
-}
-
-static bool_t is_first_char(const char *start, const char *pos){
-       const char *p;
-       for(p=start;p<pos;p++){
-               if (*p!=' ') return FALSE;
-       }
-       return TRUE;
-}
-
-LpSection *lp_config_find_section(LpConfig *lpconfig, const char *name){
-       LpSection *sec;
-       MSList *elem;
-       /*printf("Looking for section %s\n",name);*/
-       for (elem=lpconfig->sections;elem!=NULL;elem=ms_list_next(elem)){
-               sec=(LpSection*)elem->data;
-               if (strcmp(sec->name,name)==0){
-                       /*printf("Section %s found\n",name);*/
-                       return sec;
-               }
-       }
-       return NULL;
-}
-
-LpItem *lp_section_find_item(LpSection *sec, const char *name){
-       MSList *elem;
-       LpItem *item;
-       /*printf("Looking for item %s\n",name);*/
-       for (elem=sec->items;elem!=NULL;elem=ms_list_next(elem)){
-               item=(LpItem*)elem->data;
-               if (strcmp(item->key,name)==0) {
-                       /*printf("Item %s found\n",name);*/
-                       return item;
-               }
-       }
-       return NULL;
-}
-
-void lp_config_parse(LpConfig *lpconfig, FILE *file){
-       char tmp[MAX_LEN];
-       LpSection *cur=NULL;
-
-       if (file==NULL) return;
-
-       while(fgets(tmp,MAX_LEN,file)!=NULL){
-               char *pos1,*pos2;
-               pos1=strchr(tmp,'[');
-               if (pos1!=NULL && is_first_char(tmp,pos1) ){
-                       pos2=strchr(pos1,']');
-                       if (pos2!=NULL){
-                               int nbs;
-                               char secname[MAX_LEN];
-                               secname[0]='\0';
-                               /* found section */
-                               *pos2='\0';
-                               nbs = sscanf(pos1+1,"%s",secname);
-                               if (nbs == 1 ){
-                                       if (strlen(secname)>0){
-                                               cur=lp_config_find_section (lpconfig,secname);
-                                               if (cur==NULL){
-                                                       cur=lp_section_new(secname);
-                                                       lp_config_add_section(lpconfig,cur);
-                                               }
-                                       }
-                               }else{
-                                       ms_warning("parse error!");
-                               }
-                       }
-               }else {
-                       pos1=strchr(tmp,'=');
-                       if (pos1!=NULL){
-                               char key[MAX_LEN];
-                               key[0]='\0';
-
-                               *pos1='\0';
-                               if (sscanf(tmp,"%s",key)>0){
-
-                                       pos1++;
-                                       pos2=strchr(pos1,'\n');
-                                       if (pos2==NULL) pos2=pos1+strlen(pos1);
-                                       else {
-                                               *pos2='\0'; /*replace the '\n' */
-                                               pos2--;
-                                       }
-                                       /* remove ending white spaces */
-                                       for (; pos2>pos1 && *pos2==' ';pos2--) *pos2='\0';
-                                       if (pos2-pos1>=0){
-                                               /* found a pair key,value */
-                                               if (cur!=NULL){
-                                                       LpItem *item=lp_section_find_item(cur,key);
-                                                       if (item==NULL){
-                                                               lp_section_add_item(cur,lp_item_new(key,pos1));
-                                                       }else{
-                                                               ms_free(item->value);
-                                                               item->value=strdup(pos1);
-                                                       }
-                                                       /*printf("Found %s %s=%s\n",cur->name,key,pos1);*/
-                                               }else{
-                                                       ms_warning("found key,item but no sections");
-                                               }
-                                       }
-                               }
-                       }
-               }
-       }
-}
-
-LpConfig * lp_config_new(const char *filename){
-       LpConfig *lpconfig=lp_new0(LpConfig,1);
-       if (filename!=NULL){
-               lpconfig->filename=ortp_strdup(filename);
-               lpconfig->file=fopen(filename,"rw");
-               if (lpconfig->file!=NULL){
-                       lp_config_parse(lpconfig,lpconfig->file);
-                       fclose(lpconfig->file);                 
-#if !defined(_WIN32_WCE)
-                       /* make existing configuration files non-group/world-accessible */
-                       if (chmod(filename, S_IRUSR | S_IWUSR) == -1)
-                               ms_warning("unable to correct permissions on "
-                                         "configuration file: %s",
-                                          strerror(errno));
-#endif /*_WIN32_WCE*/
-                       lpconfig->file=NULL;
-                       lpconfig->modified=0;
-               }
-       }
-       return lpconfig;
-}
-
-int lp_config_read_file(LpConfig *lpconfig, const char *filename){
-       FILE* f=fopen(filename,"r");
-       if (f!=NULL){
-               lp_config_parse(lpconfig,f);
-               fclose(f);
-               return 0;
-       }
-       ms_warning("Fail to open file %s",filename);
-       return -1;
-}
-
-void lp_item_set_value(LpItem *item, const char *value){
-       free(item->value);
-       item->value=ortp_strdup(value);
-}
-
-
-void lp_config_destroy(LpConfig *lpconfig){
-       if (lpconfig->filename!=NULL) free(lpconfig->filename);
-       ms_list_for_each(lpconfig->sections,(void (*)(void*))lp_section_destroy);
-       ms_list_free(lpconfig->sections);
-       free(lpconfig);
-}
-
-void lp_section_remove_item(LpSection *sec, LpItem *item){
-       sec->items=ms_list_remove(sec->items,(void *)item);
-       lp_item_destroy(item);
-}
-
-const char *lp_config_get_string(LpConfig *lpconfig, const char *section, const char *key, const char *default_string){
-       LpSection *sec;
-       LpItem *item;
-       sec=lp_config_find_section(lpconfig,section);
-       if (sec!=NULL){
-               item=lp_section_find_item(sec,key);
-               if (item!=NULL) return item->value;
-       }
-       return default_string;
-}
-
-int lp_config_get_int(LpConfig *lpconfig,const char *section, const char *key, int default_value){
-       const char *str=lp_config_get_string(lpconfig,section,key,NULL);
-       if (str!=NULL) return atoi(str);
-       else return default_value;
-}
-
-float lp_config_get_float(LpConfig *lpconfig,const char *section, const char *key, float default_value){
-       const char *str=lp_config_get_string(lpconfig,section,key,NULL);
-       float ret=default_value;
-       if (str==NULL) return default_value;
-       sscanf(str,"%f",&ret);
-       return ret;
-}
-
-void lp_config_set_string(LpConfig *lpconfig,const char *section, const char *key, const char *value){
-       LpItem *item;
-       LpSection *sec=lp_config_find_section(lpconfig,section);
-       if (sec!=NULL){
-               item=lp_section_find_item(sec,key);
-               if (item!=NULL){
-                       if (value!=NULL)
-                               lp_item_set_value(item,value);
-                       else lp_section_remove_item(sec,item);
-               }else{
-                       if (value!=NULL)
-                               lp_section_add_item(sec,lp_item_new(key,value));
-               }
-       }else if (value!=NULL){
-               sec=lp_section_new(section);
-               lp_config_add_section(lpconfig,sec);
-               lp_section_add_item(sec,lp_item_new(key,value));
-       }
-       lpconfig->modified++;
-}
-
-void lp_config_set_int(LpConfig *lpconfig,const char *section, const char *key, int value){
-       char tmp[30];
-       snprintf(tmp,30,"%i",value);
-       lp_config_set_string(lpconfig,section,key,tmp);
-       lpconfig->modified++;
-}
-
-void lp_item_write(LpItem *item, FILE *file){
-       fprintf(file,"%s=%s\n",item->key,item->value);
-}
-
-void lp_section_write(LpSection *sec, FILE *file){
-       fprintf(file,"[%s]\n",sec->name);
-       ms_list_for_each2(sec->items,(void (*)(void*, void*))lp_item_write,(void *)file);
-       fprintf(file,"\n");
-}
-
-int lp_config_sync(LpConfig *lpconfig){
-       FILE *file;
-       if (lpconfig->filename==NULL) return -1;
-       if (lpconfig->readonly) return 0;
-#ifndef WIN32
-       /* don't create group/world-accessible files */
-       (void) umask(S_IRWXG | S_IRWXO);
-#endif
-       file=fopen(lpconfig->filename,"w");
-       if (file==NULL){
-               ms_warning("Could not write %s ! Maybe it is read-only. Configuration will not be saved.",lpconfig->filename);
-               lpconfig->readonly=1;
-               return -1;
-       }
-       ms_list_for_each2(lpconfig->sections,(void (*)(void *,void*))lp_section_write,(void *)file);
-       fclose(file);
-       lpconfig->modified=0;
-       return 0;
-}
-
-int lp_config_has_section(LpConfig *lpconfig, const char *section){
-       if (lp_config_find_section(lpconfig,section)!=NULL) return 1;
-       return 0;
-}
-
-void lp_config_clean_section(LpConfig *lpconfig, const char *section){
-       LpSection *sec=lp_config_find_section(lpconfig,section);
-       if (sec!=NULL){
-               lp_config_remove_section(lpconfig,sec);
-       }
-       lpconfig->modified++;
-}
-
-int lp_config_needs_commit(const LpConfig *lpconfig){
-       return lpconfig->modified>0;
-}
diff --git a/linphone/coreapi/lpconfig.h b/linphone/coreapi/lpconfig.h
deleted file mode 100644 (file)
index bb731ac..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/***************************************************************************
- *            lpconfig.h
- *
- *  Thu Mar 10 15:02:49 2005
- *  Copyright  2005  Simon Morlat
- *  Email simon.morlat@linphone.org
- ****************************************************************************/
-
-/*
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-#ifndef LPCONFIG_H
-#define LPCONFIG_H
-
-/**
- * The LpConfig object is used to manipulate a configuration file.
- * 
- * @ingroup misc
- * The format of the configuration file is a .ini like format:
- * - sections are defined in []
- * - each section contains a sequence of key=value pairs.
- *
- * Example:
- * @code
- * [sound]
- * echocanceler=1
- * playback_dev=ALSA: Default device
- *
- * [video]
- * enabled=1
- * @endcode
-**/
-typedef struct _LpConfig LpConfig;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-LpConfig * lp_config_new(const char *filename);
-int lp_config_read_file(LpConfig *lpconfig, const char *filename);
-/**
- * Retrieves a configuration item as a string, given its section, key, and default value.
- * 
- * @ingroup misc
- * The default value string is returned if the config item isn't found.
-**/
-const char *lp_config_get_string(LpConfig *lpconfig, const char *section, const char *key, const char *default_string);
-int lp_config_read_file(LpConfig *lpconfig, const char *filename);
-/**
- * Retrieves a configuration item as an integer, given its section, key, and default value.
- * 
- * @ingroup misc
- * The default integer value is returned if the config item isn't found.
-**/
-int lp_config_get_int(LpConfig *lpconfig,const char *section, const char *key, int default_value);
-int lp_config_read_file(LpConfig *lpconfig, const char *filename);
-/**
- * Retrieves a configuration item as a float, given its section, key, and default value.
- * 
- * @ingroup misc
- * The default float value is returned if the config item isn't found.
-**/
-float lp_config_get_float(LpConfig *lpconfig,const char *section, const char *key, float default_value);
-/**
- * Sets a string config item 
- *
- * @ingroup misc
-**/
-void lp_config_set_string(LpConfig *lpconfig,const char *section, const char *key, const char *value);
-/**
- * Sets an integer config item
- *
- * @ingroup misc
-**/
-void lp_config_set_int(LpConfig *lpconfig,const char *section, const char *key, int value);
-/**
- * Writes the config file to disk.
- * 
- * @ingroup misc
-**/
-int lp_config_sync(LpConfig *lpconfig);
-/**
- * Returns 1 if a given section is present in the configuration.
- *
- * @ingroup misc
-**/
-int lp_config_has_section(LpConfig *lpconfig, const char *section);
-/**
- * Removes every pair of key,value in a section and remove the section.
- *
- * @ingroup misc
-**/
-void lp_config_clean_section(LpConfig *lpconfig, const char *section);
-/*tells whether uncommited (with lp_config_sync()) modifications exist*/
-int lp_config_needs_commit(const LpConfig *lpconfig);
-void lp_config_destroy(LpConfig *cfg);
-       
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/linphone/coreapi/misc.c b/linphone/coreapi/misc.c
deleted file mode 100644 (file)
index c2ba262..0000000
+++ /dev/null
@@ -1,831 +0,0 @@
-
-/*
-linphone
-Copyright (C) 2000  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#include "private.h"
-#include "mediastreamer2/mediastream.h"
-#include <stdlib.h>
-#include <stdio.h>
-#ifdef HAVE_SIGHANDLER_T
-#include <signal.h>
-#endif /*HAVE_SIGHANDLER_T*/
-
-#include <string.h>
-#if !defined(_WIN32_WCE)
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <fcntl.h>
-#endif /*_WIN32_WCE*/
-
-#undef snprintf
-#include <ortp/stun.h>
-
-
-#if !defined(WIN32)
-
-static char lock_name[80];
-static char lock_set=0;
-/* put a lock file in /tmp. this is called when linphone runs as a daemon*/
-int set_lock_file()
-{
-       FILE *lockfile;
-
-       snprintf(lock_name,80,"/tmp/linphone.%i",getuid());
-       lockfile=fopen(lock_name,"w");
-       if (lockfile==NULL)
-       {
-               printf("Failed to create lock file.\n");
-               return(-1);
-       }
-       fprintf(lockfile,"%i",getpid());
-       fclose(lockfile);
-       lock_set=1;
-       return(0);
-}
-
-/* looks if there is a lock file. If presents return its content (the pid of the already running linphone), if not found, returns -1*/
-int get_lock_file()
-{
-       int pid;
-       FILE *lockfile;
-
-       snprintf(lock_name,80,"/tmp/linphone.%i",getuid());
-       lockfile=fopen(lock_name,"r");
-       if (lockfile==NULL)
-               return(-1);
-       if (fscanf(lockfile,"%i",&pid)!=1){
-               ms_warning("Could not read pid in lock file.");
-               fclose(lockfile);
-               return -1;
-       }
-       fclose(lockfile);
-       return pid;
-}
-
-/* remove the lock file if it was set*/
-int remove_lock_file()
-{
-       int err=0;
-       if (lock_set)
-       {
-               err=unlink(lock_name);
-               lock_set=0;
-       }
-       return(err);
-}
-
-#endif
-
-char *int2str(int number)
-{
-       char *numstr=ms_malloc(10);
-       snprintf(numstr,10,"%i",number);
-       return numstr;
-}
-
-void check_sound_device(LinphoneCore *lc)
-{
-#ifdef _linux
-       int fd=0;
-       int len;
-       int a;
-       char *file=NULL;
-       char *i810_audio=NULL;
-       char *snd_pcm_oss=NULL;
-       char *snd_mixer_oss=NULL;
-       char *snd_pcm=NULL;
-       fd=open("/proc/modules",O_RDONLY);
-
-       if (fd>0){
-               /* read the entire /proc/modules file and check if sound conf seems correct */
-               /*a=fstat(fd,&statbuf);
-               if (a<0) ms_warning("Can't stat /proc/modules:%s.",strerror(errno));
-               len=statbuf.st_size;
-               if (len==0) ms_warning("/proc/modules has zero size!");
-               */
-               /***** fstat does not work on /proc/modules for unknown reason *****/
-               len=6000;
-               file=ms_malloc(len+1);
-               a=read(fd,file,len);
-               if (a<len) file=ms_realloc(file,a+1);
-               file[a]='\0';
-               i810_audio=strstr(file,"i810_audio");
-               if (i810_audio!=NULL){
-                       /* I'm sorry i put this warning in comments because
-                        * i don't use yet the right driver !! */
-/*                     lc->vtable.display_warning(lc,_("You are currently using the i810_audio driver.\nThis driver is buggy and so does not work with Linphone.\nWe suggest that you replace it by its equivalent ALSA driver,\neither with packages from your distribution, or by downloading\nALSA drivers at http://www.alsa-project.org."));*/
-                       goto end;
-               }
-               snd_pcm=strstr(file,"snd-pcm");
-               if (snd_pcm!=NULL){
-                       snd_pcm_oss=strstr(file,"snd-pcm-oss");
-                       snd_mixer_oss=strstr(file,"snd-mixer-oss");
-                       if (snd_pcm_oss==NULL){
-                               lc->vtable.display_warning(lc,_("Your computer appears to be using ALSA sound drivers.\nThis is the best choice. However the pcm oss emulation module\nis missing and linphone needs it. Please execute\n'modprobe snd-pcm-oss' as root to load it."));
-                       }
-                       if (snd_mixer_oss==NULL){
-                               lc->vtable.display_warning(lc,_("Your computer appears to be using ALSA sound drivers.\nThis is the best choice. However the mixer oss emulation module\nis missing and linphone needs it. Please execute\n 'modprobe snd-mixer-oss' as root to load it."));
-                       }
-               }
-       }else {
-
-               ms_warning("Could not open /proc/modules.");
-       }
-       /* now check general volume. Some user forget to rise it and then complain that linphone is
-       not working */
-       /* but some other users complain that linphone should not change levels...
-       if (lc->sound_conf.sndcard!=NULL){
-               a=snd_card_get_level(lc->sound_conf.sndcard,SND_CARD_LEVEL_GENERAL);
-               if (a<50){
-                       ms_warning("General level is quite low (%i). Linphone rises it up for you.",a);
-                       snd_card_set_level(lc->sound_conf.sndcard,SND_CARD_LEVEL_GENERAL,80);
-               }
-       }
-       */
-       end:
-       if (file!=NULL) ms_free(file);
-       if (fd>0) close(fd);
-#endif
-}
-
-#define UDP_HDR_SZ 8
-#define RTP_HDR_SZ 12
-#define IP4_HDR_SZ 20   /*20 is the minimum, but there may be some options*/
-
-const char *payload_type_get_description(PayloadType *pt){
-       return _((const char *)pt->user_data);
-}
-
-void payload_type_set_enable(PayloadType *pt,int value)
-{
-       if ((value)!=0) payload_type_set_flag(pt,PAYLOAD_TYPE_ENABLED); \
-       else payload_type_unset_flag(pt,PAYLOAD_TYPE_ENABLED);
-}
-
-
-bool_t payload_type_enabled(PayloadType *pt) {
-       return (((pt)->flags & PAYLOAD_TYPE_ENABLED)!=0);
-}
-
-int payload_type_get_bitrate(PayloadType *pt)
-{
-       return pt->normal_bitrate;
-}
-const char *payload_type_get_mime(PayloadType *pt){
-       return pt->mime_type;
-}
-
-int payload_type_get_rate(PayloadType *pt){
-       return pt->clock_rate;
-}
-
-/*this function makes a special case for speex/8000.
-This codec is variable bitrate. The 8kbit/s mode is interesting when having a low upload bandwidth, but its quality
-is not very good. We 'd better use its 15kbt/s mode when we have enough bandwidth*/
-static int get_codec_bitrate(LinphoneCore *lc, const PayloadType *pt){
-       int upload_bw=linphone_core_get_upload_bandwidth(lc);
-       if (bandwidth_is_greater(upload_bw,129) || (bandwidth_is_greater(upload_bw,33) && !linphone_core_video_enabled(lc)) ) {
-               if (strcmp(pt->mime_type,"speex")==0 && pt->clock_rate==8000){
-                       return 15000;
-               }
-       }
-       return pt->normal_bitrate;
-}
-
-static double get_audio_payload_bandwidth(LinphoneCore *lc, const PayloadType *pt){
-       double npacket=50;
-       double packet_size;
-       int bitrate;
-       bitrate=get_codec_bitrate(lc,pt);
-       packet_size= (((double)bitrate)/(50*8))+UDP_HDR_SZ+RTP_HDR_SZ+IP4_HDR_SZ;
-       return packet_size*8.0*npacket;
-}
-
-void linphone_core_update_allocated_audio_bandwidth_in_call(LinphoneCore *lc, const PayloadType *pt){
-       lc->audio_bw=(int)(get_audio_payload_bandwidth(lc,pt)/1000.0);
-       /*update*/
-       linphone_core_set_download_bandwidth(lc,lc->net_conf.download_bw);
-       linphone_core_set_upload_bandwidth(lc,lc->net_conf.upload_bw);
-}
-
-void linphone_core_update_allocated_audio_bandwidth(LinphoneCore *lc){
-       const MSList *elem;
-       PayloadType *max=NULL;
-       for(elem=linphone_core_get_audio_codecs(lc);elem!=NULL;elem=elem->next){
-               PayloadType *pt=(PayloadType*)elem->data;
-               if (payload_type_enabled(pt)){
-                       int pt_bitrate=get_codec_bitrate(lc,pt);
-                       if (max==NULL) max=pt;
-                       else if (max->normal_bitrate<pt_bitrate){
-                               max=pt;
-                       }
-               }
-       }
-       if (max) {
-               linphone_core_update_allocated_audio_bandwidth_in_call(lc,max);
-       }
-}
-
-/* return TRUE if codec can be used with bandwidth, FALSE else*/
-bool_t linphone_core_check_payload_type_usability(LinphoneCore *lc, PayloadType *pt)
-{
-       double codec_band;
-       int min_audio_bw;
-       int min_video_bw;
-       bool_t ret=FALSE;
-       /*
-         update allocated audio bandwidth to allocate the remaining to video.
-         This must be done outside calls, because after sdp negociation
-         the audio bandwidth is refined to the selected codec
-       */
-       if (!linphone_core_in_call(lc)) linphone_core_update_allocated_audio_bandwidth(lc);
-       min_audio_bw=get_min_bandwidth(linphone_core_get_download_bandwidth(lc),
-                                       linphone_core_get_upload_bandwidth(lc));
-       if (min_audio_bw==0) min_audio_bw=-1;
-       min_video_bw=get_min_bandwidth(lc->dw_video_bw,lc->up_video_bw);
-
-       switch (pt->type){
-               case PAYLOAD_AUDIO_CONTINUOUS:
-               case PAYLOAD_AUDIO_PACKETIZED:
-                       codec_band=get_audio_payload_bandwidth(lc,pt);
-                       ret=bandwidth_is_greater(min_audio_bw*1000,codec_band);
-                       //ms_message("Payload %s: %g",pt->mime_type,codec_band);
-                       break;
-               case PAYLOAD_VIDEO:
-                       if (min_video_bw!=0) {/* infinite (-1) or strictly positive*/
-                               /*let the video use all the bandwidth minus the maximum bandwidth used by audio */
-                               if (min_video_bw>0)
-                                       pt->normal_bitrate=min_video_bw*1000;
-                               else
-                                       pt->normal_bitrate=1500000; /*around 1.5 Mbit/s*/
-                               ret=TRUE;
-                       }
-                       else ret=FALSE;
-                       break;
-       }
-       /*if (!ret) ms_warning("Payload %s is not usable with your internet connection.",pt->mime_type);*/
-
-       return ret;
-}
-
-static PayloadType * find_payload(RtpProfile *prof, PayloadType *pt /*from config*/){
-       PayloadType *candidate=NULL;
-       int i;
-       PayloadType *it;
-       for(i=0;i<127;++i){
-               it=rtp_profile_get_payload(prof,i);
-               if (it!=NULL && strcasecmp(pt->mime_type,it->mime_type)==0
-                       && (pt->clock_rate==it->clock_rate || pt->clock_rate<=0)
-                       && payload_type_get_user_data(it)==NULL ){
-                       if ( (pt->recv_fmtp && it->recv_fmtp && strcasecmp(pt->recv_fmtp,it->recv_fmtp)==0) ||
-                               (pt->recv_fmtp==NULL && it->recv_fmtp==NULL) ){
-                               /*exact match*/
-                               return it;
-                       }else candidate=it;
-               }
-       }
-       return candidate;
-}
-
-static bool_t check_h264_packmode(PayloadType *payload, MSFilterDesc *desc){
-       if (payload->recv_fmtp==NULL || strstr(payload->recv_fmtp,"packetization-mode")==0){
-               /*this is packetization-mode=0 H264, we only support it with a multislicing
-               enabled version of x264*/
-               if (strstr(desc->text,"x264") && strstr(desc->text,"multislicing")==0){
-                       /*this is x264 without multisclicing*/
-                       ms_message("Disabling packetization-mode=0 H264 codec because "
-                       "of lack of multislicing support");
-                       return FALSE;
-               }
-       }
-       return TRUE;
-}
-
-static MSList *fix_codec_list(RtpProfile *prof, MSList *conflist)
-{
-       MSList *elem;
-       MSList *newlist=NULL;
-       PayloadType *payload,*confpayload;
-
-       for (elem=conflist;elem!=NULL;elem=ms_list_next(elem))
-       {
-               confpayload=(PayloadType*)elem->data;
-               payload=find_payload(prof,confpayload);
-               if (payload!=NULL){
-                       if (ms_filter_codec_supported(confpayload->mime_type)){
-                               MSFilterDesc *desc=ms_filter_get_encoder(confpayload->mime_type);
-                               if (strcasecmp(confpayload->mime_type,"H264")==0){
-                                       if (!check_h264_packmode(confpayload,desc)){
-                                               continue;
-                                       }
-                               }
-                               payload_type_set_user_data(payload,(void*)desc->text);
-                               payload_type_set_enable(payload,payload_type_enabled(confpayload));
-                               newlist=ms_list_append(newlist,payload);
-                       }
-               }
-               else{
-                       ms_warning("Cannot support %s/%i: does not exist.",confpayload->mime_type,
-                                                               confpayload->clock_rate);
-               }
-       }
-       return newlist;
-}
-
-
-void linphone_core_setup_local_rtp_profile(LinphoneCore *lc)
-{
-       int i;
-       MSList *audiopt,*videopt;
-       PayloadType *payload;
-       bool_t prepend;
-       lc->local_profile=rtp_profile_clone_full(&av_profile);
-       /* first look at the list given by configuration file to see if
-       it is correct */
-       audiopt=fix_codec_list(lc->local_profile,lc->codecs_conf.audio_codecs);
-       videopt=fix_codec_list(lc->local_profile,lc->codecs_conf.video_codecs);
-       /* now find and add payloads that are not listed in the configuration
-       codec list */
-       for (i=0;i<127;i++)
-       {
-               payload=rtp_profile_get_payload(lc->local_profile,i);
-               if (payload!=NULL){
-                       if (payload_type_get_user_data(payload)!=NULL) continue;
-                       /* find a mediastreamer codec for this payload type */
-                       if (ms_filter_codec_supported(payload->mime_type)){
-                               MSFilterDesc *desc=ms_filter_get_encoder(payload->mime_type);
-                               ms_message("Adding new codec %s/%i",payload->mime_type,payload->clock_rate);
-                               payload_type_set_enable(payload,1);
-                               payload_type_set_user_data(payload,(void *)desc->text);
-                               prepend=FALSE;
-                               /* by default, put speex, mpeg4, or h264 on top of list*/
-                               if (strcmp(payload->mime_type,"speex")==0)
-                                       prepend=TRUE;
-                               else if (strcmp(payload->mime_type,"MP4V-ES")==0)
-                                       prepend=TRUE;
-                               else if (strcasecmp(payload->mime_type,"H264")==0){
-                                       if (check_h264_packmode(payload,desc))
-                                               prepend=TRUE;
-                                       else continue;
-                               }
-                               switch (payload->type){
-                                       case PAYLOAD_AUDIO_CONTINUOUS:
-                                       case PAYLOAD_AUDIO_PACKETIZED:
-                                                       if (prepend)
-                                                               audiopt=ms_list_prepend(audiopt,(void *)payload);
-                                                       else
-                                                               audiopt=ms_list_append(audiopt,(void *)payload);
-                                               break;
-                                       case PAYLOAD_VIDEO:
-                                                       if (prepend)
-                                                               videopt=ms_list_prepend(videopt,(void *)payload);
-                                                       else
-                                                               videopt=ms_list_append(videopt,(void *)payload);
-                                               break;
-                                       default:
-                                               ms_error("Unsupported rtp media type.");
-                               }
-                       }
-               }
-       }
-       ms_list_for_each(lc->codecs_conf.audio_codecs,(void (*)(void*))payload_type_destroy);
-       ms_list_for_each(lc->codecs_conf.video_codecs,(void (*)(void *))payload_type_destroy);
-       ms_list_free(lc->codecs_conf.audio_codecs);
-       ms_list_free(lc->codecs_conf.video_codecs);
-       /* set the fixed lists instead:*/
-       lc->codecs_conf.audio_codecs=audiopt;
-       lc->codecs_conf.video_codecs=videopt;
-       linphone_core_update_allocated_audio_bandwidth(lc);
-}
-
-int from_2char_without_params(osip_from_t *from,char **str)
-{
-       osip_from_t *tmpfrom=NULL;
-       osip_from_clone(from,&tmpfrom);
-       if (tmpfrom!=NULL){
-               while(!osip_list_eol(&tmpfrom->gen_params,0)){
-                       osip_generic_param_t *param=(osip_generic_param_t*)osip_list_get(&tmpfrom->gen_params,0);
-                       osip_generic_param_free(param);
-                       osip_list_remove(&tmpfrom->gen_params,0);
-               }
-       }else return -1;
-       osip_from_to_str(tmpfrom,str);
-       osip_from_free(tmpfrom);
-       return 0;
-}
-
-bool_t lp_spawn_command_line_sync(const char *command, char **result,int *command_ret){
-#if !defined(_WIN32_WCE)
-       FILE *f=popen(command,"r");
-       if (f!=NULL){
-               int err;
-               *result=ms_malloc(4096);
-               err=fread(*result,1,4096-1,f);
-               if (err<0){
-                       ms_warning("Error reading command output:%s",strerror(errno));
-                       ms_free(result);
-                       return FALSE;
-               }
-               (*result)[err]=0;
-               err=pclose(f);
-               if (command_ret!=NULL) *command_ret=err;
-               return TRUE;
-       }
-#endif /*_WIN32_WCE*/
-       return FALSE;
-}
-
-#if defined(HAVE_GETIFADDRS) && defined(INET6)
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <ifaddrs.h>
-bool_t host_has_ipv6_network()
-{
-       struct ifaddrs *ifp;
-       struct ifaddrs *ifpstart;
-       bool_t ipv6_present=FALSE;
-
-       if (getifaddrs (&ifpstart) < 0)
-       {
-               return FALSE;
-       }
-
-       for (ifp=ifpstart; ifp != NULL; ifp = ifp->ifa_next)
-       {
-               if (!ifp->ifa_addr)
-                 continue;
-
-               switch (ifp->ifa_addr->sa_family) {
-               case AF_INET:
-
-                       break;
-               case AF_INET6:
-                   ipv6_present=TRUE;
-                       break;
-               default:
-                       continue;
-               }
-       }
-
-       freeifaddrs (ifpstart);
-
-       return ipv6_present;
-}
-#else
-
-bool_t host_has_ipv6_network()
-{
-       return FALSE;
-}
-
-
-#endif
-
-static ortp_socket_t create_socket(int local_port){
-       struct sockaddr_in laddr;
-       ortp_socket_t sock;
-       int optval;
-       sock=socket(PF_INET,SOCK_DGRAM,IPPROTO_UDP);
-       if (sock<0) {
-               ms_error("Fail to create socket");
-               return -1;
-       }
-       memset (&laddr,0,sizeof(laddr));
-       laddr.sin_family=AF_INET;
-       laddr.sin_addr.s_addr=INADDR_ANY;
-       laddr.sin_port=htons(local_port);
-       if (bind(sock,(struct sockaddr*)&laddr,sizeof(laddr))<0){
-               ms_error("Bind socket to 0.0.0.0:%i failed: %s",local_port,getSocketError());
-               close_socket(sock);
-               return -1;
-       }
-       optval=1;
-       if (setsockopt (sock, SOL_SOCKET, SO_REUSEADDR,
-                               (SOCKET_OPTION_VALUE)&optval, sizeof (optval))<0){
-               ms_warning("Fail to set SO_REUSEADDR");
-       }
-       set_non_blocking_socket(sock);
-       return sock;
-}
-
-static int sendStunRequest(int sock, const struct sockaddr *server, socklen_t addrlen, int id, bool_t changeAddr){
-       char buf[STUN_MAX_MESSAGE_SIZE];
-       int len = STUN_MAX_MESSAGE_SIZE;
-       StunAtrString username;
-       StunAtrString password;
-       StunMessage req;
-       int err;
-       memset(&req, 0, sizeof(StunMessage));
-       memset(&username,0,sizeof(username));
-       memset(&password,0,sizeof(password));
-       stunBuildReqSimple( &req, &username, changeAddr , changeAddr , id);
-       len = stunEncodeMessage( &req, buf, len, &password);
-       if (len<=0){
-               ms_error("Fail to encode stun message.");
-               return -1;
-       }
-       err=sendto(sock,buf,len,0,server,addrlen);
-       if (err<0){
-               ms_error("sendto failed: %s",strerror(errno));
-               return -1;
-       }
-       return 0;
-}
-
-static int parse_stun_server_addr(const char *server, struct sockaddr_storage *ss, socklen_t *socklen){
-       struct addrinfo hints,*res=NULL;
-       int ret;
-       const char *port;
-       char host[NI_MAXHOST];
-       char *p;
-       host[NI_MAXHOST-1]='\0';
-       strncpy(host,server,sizeof(host)-1);
-       p=strchr(host,':');
-       if (p) {
-               *p='\0';
-               port=p+1;
-       }else port="3478";
-       memset(&hints,0,sizeof(hints));
-       hints.ai_family=PF_INET;
-       hints.ai_socktype=SOCK_DGRAM;
-       hints.ai_protocol=IPPROTO_UDP;
-       ret=getaddrinfo(host,port,&hints,&res);
-       if (ret!=0){
-               ms_error("getaddrinfo() failed for %s:%s : %s",host,port,gai_strerror(ret));
-               return -1;
-       }
-       if (!res) return -1;
-       memcpy(ss,res->ai_addr,res->ai_addrlen);
-       *socklen=res->ai_addrlen;
-       freeaddrinfo(res);
-       return 0;
-}
-
-static int recvStunResponse(ortp_socket_t sock, char *ipaddr, int *port, int *id){
-       char buf[STUN_MAX_MESSAGE_SIZE];
-       int len = STUN_MAX_MESSAGE_SIZE;
-       StunMessage resp;
-       len=recv(sock,buf,len,0);
-       if (len>0){
-               struct in_addr ia;
-               stunParseMessage(buf,len, &resp );
-               *id=resp.msgHdr.tr_id.octet[0];
-               *port = resp.mappedAddress.ipv4.port;
-               ia.s_addr=htonl(resp.mappedAddress.ipv4.addr);
-               strncpy(ipaddr,inet_ntoa(ia),LINPHONE_IPADDR_SIZE);
-       }
-       return len;
-}
-
-void linphone_core_run_stun_tests(LinphoneCore *lc, LinphoneCall *call){
-       const char *server=linphone_core_get_stun_server(lc);
-
-       if (lc->sip_conf.ipv6_enabled){
-               ms_warning("stun support is not implemented for ipv6");
-               return;
-       }
-       if (server!=NULL){
-               struct sockaddr_storage ss;
-               socklen_t ss_len;
-               ortp_socket_t sock1=-1, sock2=-1;
-               bool_t video_enabled=linphone_core_video_enabled(lc);
-               bool_t got_audio,got_video;
-               bool_t cone_audio=FALSE,cone_video=FALSE;
-               struct timeval init,cur;
-               if (parse_stun_server_addr(server,&ss,&ss_len)<0){
-                       ms_error("Fail to parser stun server address: %s",server);
-                       return;
-               }
-               if (lc->vtable.display_status!=NULL)
-                       lc->vtable.display_status(lc,_("Stun lookup in progress..."));
-
-               /*create the two audio and video RTP sockets, and send STUN message to our stun server */
-               sock1=create_socket(linphone_core_get_audio_port(lc));
-               if (sock1<0) return;
-               if (video_enabled){
-                       sock2=create_socket(linphone_core_get_video_port(lc));
-                       if (sock2<0) return ;
-               }
-               sendStunRequest(sock1,(struct sockaddr*)&ss,ss_len,11,TRUE);
-               sendStunRequest(sock1,(struct sockaddr*)&ss,ss_len,1,FALSE);
-               if (sock2>=0){
-                       sendStunRequest(sock2,(struct sockaddr*)&ss,ss_len,22,TRUE);
-                       sendStunRequest(sock2,(struct sockaddr*)&ss,ss_len,2,FALSE);
-               }
-               got_audio=FALSE;
-               got_video=FALSE;
-               gettimeofday(&init,NULL);
-               do{
-                       double elapsed;
-                       int id;
-#ifdef WIN32
-                       Sleep(10);
-#else
-                       usleep(10000);
-#endif
-
-                       if (recvStunResponse(sock1,call->audio_params.natd_addr,
-                                               &call->audio_params.natd_port,&id)>0){
-                               ms_message("STUN test result: local audio port maps to %s:%i",
-                                               call->audio_params.natd_addr,
-                                               call->audio_params.natd_port);
-                               if (id==11)
-                                       cone_audio=TRUE;
-                               got_audio=TRUE;
-                       }
-                       if (recvStunResponse(sock2,call->video_params.natd_addr,
-                                                       &call->video_params.natd_port,&id)>0){
-                               ms_message("STUN test result: local video port maps to %s:%i",
-                                       call->video_params.natd_addr,
-                                       call->video_params.natd_port);
-                               if (id==22)
-                                       cone_video=TRUE;
-                               got_video=TRUE;
-                       }
-                       gettimeofday(&cur,NULL);
-                       elapsed=((cur.tv_sec-init.tv_sec)*1000.0) +  ((cur.tv_usec-init.tv_usec)/1000.0);
-                       if (elapsed>2000)  break;
-               }while(!(got_audio && (got_video||sock2<0)  ) );
-               if (!got_audio){
-                       ms_error("No stun server response for audio port.");
-               }else{
-                       if (!cone_audio) {
-                               ms_warning("NAT is symmetric for audio port");
-                               call->audio_params.natd_port=0;
-                       }
-               }
-               if (sock2>=0){
-                       if (!got_video){
-                               ms_error("No stun server response for video port.");
-                       }else{
-                               if (!cone_video) {
-                                       ms_warning("NAT is symmetric for video port.");
-                                       call->video_params.natd_port=0;
-                               }
-                       }
-               }
-               close_socket(sock1);
-               if (sock2>=0) close_socket(sock2);
-       }
-}
-
-static int extract_sip_port(const char *config){
-       char line[512];
-       char port[12];
-       int ret=-1;
-       FILE *f=fopen(config,"r");
-       if (f){
-               while(fgets(line,sizeof(line),f)!=NULL){
-                       if (fmtp_get_value(line,"sip_port",port,sizeof(port))){
-                               ret=atoi(port);
-                       }
-               }
-               fclose(f);
-       }
-       return ret;
-}
-
-int linphone_core_wake_up_possible_already_running_instance(
-    const char * config_file, const char * addr_to_call)
-{
-       int port=extract_sip_port(config_file);
-       const char *wakeup="WAKEUP sip:127.0.0.1 SIP/2.0\r\n"
-               "Via: SIP/2.0/UDP 127.0.0.1:%i;rport;branch=z9hG4bK%u\r\n"
-               "From: <sip:another_linphone@127.0.0.1>;tag=%u\r\n"
-               "To:   <sip:you@127.0.0.1>\r\n"
-               "CSeq: 1 WAKEUP\r\n"
-               "Call-ID: %u@onsantape\r\n"
-               "Content-length: 0\r\n\r\n";
-       const char * call = "REFER sip:127.0.0.1 SIP/2.0\r\n"
-               "Via: SIP/2.0/UDP 127.0.0.1:%i;rport;branch=z9hG4bK%u\r\n"
-               "From: <sip:another_linphone@127.0.0.1>;tag=%u\r\n"
-               "To:   <sip:you@127.0.0.1>\r\n"
-               "Refer-To: %s\r\n"
-               "CSeq: 1 WAKEUP\r\n"
-               "Call-ID: %u@onsantape\r\n"
-               "Content-length: 0\r\n\r\n";
-
-       /*make sure ortp is initialized (it initializes win32 socket api)*/
-       ortp_init();
-       if (port>0){
-               struct sockaddr_storage ss;
-               socklen_t sslen;
-               char tmp[100];
-               snprintf(tmp,sizeof(tmp),"127.0.0.1:%i",port);
-               if (parse_stun_server_addr(tmp,&ss,&sslen)==0){
-                       int locport=57123;
-                       ortp_socket_t sock=create_socket(locport);
-                       if (sock<0) sock=create_socket(++locport);
-                       if (sock>=0){
-                               char req[512];
-                               if (addr_to_call != NULL)
-                                       snprintf(req, sizeof(req), call, locport,
-                                       random(), random(), addr_to_call, random());
-                               else
-                                       snprintf(req, sizeof(req), wakeup, locport,
-                                       random(), random(), random());
-                               if (connect(sock,(struct sockaddr*)&ss,sslen)<0){
-                                       fprintf(stderr,"connect failed: %s\n",getSocketError());
-                               }else if (send(sock,req,strlen(req),0)>0){
-                                       /*wait a bit for a response*/
-                                       int i;
-                                       for(i=0;i<10;++i){
-                                               if (recv(sock,req,sizeof(req),0)>0){
-                                                       close_socket(sock);
-                                                       return 0;
-                                               }else if (getSocketErrorCode()!=EWOULDBLOCK){
-                                                       break;
-                                               }
-#ifdef WIN32
-                                               Sleep(100);
-#else
-                                               usleep(100000);
-#endif
-                                       }
-                               }else{
-                                       ms_message("sendto() of WAKEUP request failed, nobody to wakeup.");
-                               }
-                       }
-                       close_socket(sock);
-               }
-       }
-       return -1;
-}
-
-int linphone_core_get_local_ip_for(const char *dest, char *result){
-       int err,tmp;
-       struct addrinfo hints;
-       struct addrinfo *res=NULL;
-       struct sockaddr_storage addr;
-       struct sockaddr *p_addr=(struct sockaddr*)&addr;
-       ortp_socket_t sock;
-       socklen_t s;
-
-       memset(&hints,0,sizeof(hints));
-       hints.ai_family=PF_UNSPEC;
-       hints.ai_socktype=SOCK_DGRAM;
-       /*hints.ai_flags=AI_NUMERICHOST|AI_CANONNAME;*/
-       err=getaddrinfo(dest,"5060",&hints,&res);
-       if (err!=0){
-               ms_error("getaddrinfo() error: %s",gai_strerror(err));
-               return -1;
-       }
-       if (res==NULL){
-               ms_error("bug: getaddrinfo returned nothing.");
-               return -1;
-       }
-       sock=socket(res->ai_family,SOCK_DGRAM,0);
-       tmp=1;
-       err=setsockopt(sock,SOL_SOCKET,SO_REUSEADDR,(SOCKET_OPTION_VALUE)&tmp,sizeof(int));
-       if (err<0){
-               ms_warning("Error in setsockopt: %s",strerror(errno));
-       }
-       err=connect(sock,res->ai_addr,res->ai_addrlen);
-       if (err<0) {
-               ms_error("Error in connect: %s",strerror(errno));
-               freeaddrinfo(res);
-               close_socket(sock);
-               return -1;
-       }
-       freeaddrinfo(res);
-       res=NULL;
-       s=sizeof(addr);
-       err=getsockname(sock,(struct sockaddr*)&addr,&s);
-       if (err!=0) {
-               ms_error("Error in getsockname: %s",strerror(errno));
-               close_socket(sock);
-               return -1;
-       }
-       if (p_addr->sa_family==AF_INET){
-               struct sockaddr_in *p_sin=(struct sockaddr_in*)p_addr;
-               if (p_sin->sin_addr.s_addr==0){
-                       close_socket(sock);
-                       return -1;
-               }
-       }
-       err=getnameinfo((struct sockaddr *)&addr,s,result,LINPHONE_IPADDR_SIZE,NULL,0,NI_NUMERICHOST);
-       if (err!=0){
-               ms_error("getnameinfo error: %s",strerror(errno));
-       }
-       close_socket(sock);
-       ms_message("Local interface to reach %s is %s.",dest,result);
-       return 0;
-}
diff --git a/linphone/coreapi/plugins/buddylookup/AUTHORS b/linphone/coreapi/plugins/buddylookup/AUTHORS
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/linphone/coreapi/plugins/buddylookup/COPYING b/linphone/coreapi/plugins/buddylookup/COPYING
deleted file mode 100644 (file)
index 94a9ed0..0000000
+++ /dev/null
@@ -1,674 +0,0 @@
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  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
-them 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 prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  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.
-
-  Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
-  For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
-  Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
-  Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                       TERMS AND CONDITIONS
-
-  0. Definitions.
-
-  "This License" refers to version 3 of the GNU General Public License.
-
-  "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
-  "The Program" refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as "you".  "Licensees" and
-"recipients" may be individuals or organizations.
-
-  To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
-  A "covered work" means either the unmodified Program or a work based
-on the Program.
-
-  To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-  To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
-  An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
-  1. Source Code.
-
-  The "source code" for a work means the preferred form of the work
-for making modifications to it.  "Object code" means any non-source
-form of a work.
-
-  A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-  The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-  The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-  The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
-  The Corresponding Source for a work in source code form is that
-same work.
-
-  2. Basic Permissions.
-
-  All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-  You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
-  Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
-  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-  No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-  When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
-  4. Conveying Verbatim Copies.
-
-  You may convey 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;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-  You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
-  5. Conveying Modified Source Versions.
-
-  You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
-    a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.
-
-    b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    "keep intact all notices".
-
-    c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.
-
-    d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.
-
-  A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
-  6. Conveying Non-Source Forms.
-
-  You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
-    a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.
-
-    b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.
-
-    c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.
-
-    d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.
-
-    e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.
-
-  A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-  A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
-  "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
-  If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-  The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
-  Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
-  7. Additional Terms.
-
-  "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-  When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-  Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
-    a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or
-
-    b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or
-
-    c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or
-
-    d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or
-
-    e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or
-
-    f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.
-
-  All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-  If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-  Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
-  8. Termination.
-
-  You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-  However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
-  Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-  Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
-  9. Acceptance Not Required for Having Copies.
-
-  You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
-  10. Automatic Licensing of Downstream Recipients.
-
-  Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-  An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-  You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
-  11. Patents.
-
-  A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's "contributor version".
-
-  A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-  Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-  In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-  If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
-  If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-  A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
-  Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
-  12. No Surrender of Others' Freedom.
-
-  If 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 convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
-  13. Use with the GNU Affero General Public License.
-
-  Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
-  14. Revised Versions of this License.
-
-  The Free Software Foundation may publish revised and/or new versions of
-the GNU 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 that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
-  If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
-  Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
-  15. Disclaimer of Warranty.
-
-  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.
-
-  16. Limitation of Liability.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-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.
-
-  17. Interpretation of Sections 15 and 16.
-
-  If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
-                     END OF TERMS AND CONDITIONS
-
-            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
-state 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) <year>  <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 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
-  If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
-    <program>  Copyright (C) <year>  <name of author>
-    This program 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, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
-  You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
-  The GNU 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 Lesser General
-Public License instead of this License.  But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/linphone/coreapi/plugins/buddylookup/ChangeLog b/linphone/coreapi/plugins/buddylookup/ChangeLog
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/linphone/coreapi/plugins/buddylookup/INSTALL b/linphone/coreapi/plugins/buddylookup/INSTALL
deleted file mode 100644 (file)
index 2550dab..0000000
+++ /dev/null
@@ -1,302 +0,0 @@
-Installation Instructions
-*************************
-
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007, 2008, 2009 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.
-
-  6. Often, you can also type `make uninstall' to remove the installed
-     files again.
-
-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.
-
-   On MacOS X 10.5 and later systems, you can create libraries and
-executables that work on multiple system types--known as "fat" or
-"universal" binaries--by specifying multiple `-arch' options to the
-compiler but only a single `-arch' option to the preprocessor.  Like
-this:
-
-     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
-                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
-                 CPP="gcc -E" CXXCPP="g++ -E"
-
-   This is not guaranteed to produce working output in all cases, you
-may have to build one architecture at a time and combine the results
-using the `lipo' tool if you have problems.
-
-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.
-
-Particular systems
-==================
-
-   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
-CC is not installed, it is recommended to use the following options in
-order to use an ANSI C compiler:
-
-     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
-
-and if that doesn't work, install pre-built binaries of GCC for HP-UX.
-
-   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
-parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
-a workaround.  If GNU CC is not installed, it is therefore recommended
-to try
-
-     ./configure CC="cc"
-
-and if that doesn't work, try
-
-     ./configure CC="cc -nodtk"
-
-   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
-directory contains several dysfunctional programs; working variants of
-these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
-in your `PATH', put it _after_ `/usr/bin'.
-
-   On Haiku, software installed for all users goes in `/boot/common',
-not `/usr/local'.  It is recommended to use the following options:
-
-     ./configure --prefix=/boot/common
-
-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 all of the options to `configure', and exit.
-
-`--help=short'
-`--help=recursive'
-     Print a summary of the options unique to this package's
-     `configure', and exit.  The `short' variant lists options used
-     only in the top level, while the `recursive' variant lists options
-     also present in any nested packages.
-
-`--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.
-
-`--prefix=DIR'
-     Use DIR as the installation prefix.  *Note Installation Names::
-     for more details, including other options available for fine-tuning
-     the installation locations.
-
-`--no-create'
-`-n'
-     Run the configure checks, but stop before creating any output
-     files.
-
-`configure' also accepts some other, not widely useful, options.  Run
-`configure --help' for more details.
-
diff --git a/linphone/coreapi/plugins/buddylookup/Makefile.am b/linphone/coreapi/plugins/buddylookup/Makefile.am
deleted file mode 100644 (file)
index 27ce125..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-SUBDIRS=src
-
-
-
-INSTALLDIR=$(shell cd $(top_builddir) && pwd)/$(PACKAGE)-install
-INSTALLDIR_WITH_PREFIX=$(INSTALLDIR)/$(prefix)
-ZIPFILE=$(shell cd $(top_builddir) && pwd)/$(PACKAGE)-win32-$(VERSION).zip
-ZIP_EXCLUDED=include 
-PLUGIN_DEPS_PREFIX=/usr/bin
-PLUGIN_DEPS=   libsoup-2.4-1.dll \
-               libgcrypt-11.dll \
-               libgnutls-extra-26.dll \
-               libgnutlsxx-26.dll \
-               libtasn1-3.dll \
-               libgnutls-26.dll \
-               libgnutls-openssl-26.dll \
-               libgpg-error-0.dll
-
-
-zip:
-       rm -f $(ZIPFILE)
-       rm -rf $(INSTALLDIR)
-       mkdir -p $(INSTALLDIR)
-       make install DESTDIR=$(INSTALLDIR)
-       mkdir -p $(INSTALLDIR_WITH_PREFIX)/bin
-       cd $(PLUGIN_DEPS_PREFIX) && \
-               cp -f $(PLUGIN_DEPS) $(INSTALLDIR_WITH_PREFIX)/bin/.
-       cd $(INSTALLDIR)/$(prefix) && rm -rf $(ZIP_EXCLUDED) && \
-       zip -r $(ZIPFILE) *
-
-clean-local:
-       rm -rf $(PACKAGE)-install
-       rm -f $(PACKAGE)-win32-$(VERSION).zip
-
diff --git a/linphone/coreapi/plugins/buddylookup/NEWS b/linphone/coreapi/plugins/buddylookup/NEWS
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/linphone/coreapi/plugins/buddylookup/README b/linphone/coreapi/plugins/buddylookup/README
deleted file mode 100644 (file)
index 7823425..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-This plugin implements a buddy lookup using a xml-rpc lookup to a distant server.
-The server side implementation isn't available here but it is quite simple to implement.
-The format of the xml-rpc request defined below:
-
-The function name is "fp.searchUsers"
- /**
- * Arguments:
- * sip_uri: string, mandatory, the SIP username, ie john.doe@example.net
- * password: string, mandatory, the SIP password
- * criteria: string, mandatory, the key or criteria to search for, multiple keywords should be space separated
- * limit: int, optional default 100, the maximum number of results to get back, -1 for all of them (note that -1 would really be limited by a hard limit at the server, something decent in the style of 100 or similar).
- * offset: int, optional default 0, where to start in the result list for the given criteria
- * domain: string, optional default is the same name as the SIP name, in which domain to search for users
- * 
- * Returns:
- * If sip-uri & password is correct, an array where each element is a struct with the following members:
- * first_name: string, example: "John"
- * last_name: string, example: "Doe"
- * display_name: string, example: "John Doe"
- * street: string, example: "Paradise Avenue"
- * zip: string, example: "7777777"
- * city: string, example: "Heaven"
- * country: string, example: "SKY"
- * email: string, example: "john.doe@example.net"
- * sip: string, example "john.doe@example.net"
- * domain: string, example: "myjoice.com"
- * 
- * If username || password is incorrect an error with a numeric code and a message is returned.
- *
- */
-
-The server uri is configurable in ~/.linphonerc :
-
-[BuddyLookup]
-url=https://....
diff --git a/linphone/coreapi/plugins/buddylookup/autogen.sh b/linphone/coreapi/plugins/buddylookup/autogen.sh
deleted file mode 100755 (executable)
index cbe603e..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-AM_VERSION="1.10"
-if ! type aclocal-$AM_VERSION 1>/dev/null 2>&1; then
-       # automake-1.9 (recommended) is not available on Fedora 8
-       AUTOMAKE=automake
-       ACLOCAL=aclocal
-else
-       ACLOCAL=aclocal-${AM_VERSION}
-       AUTOMAKE=automake-${AM_VERSION}
-fi
-
-echo "Generating build scripts in buddylookup..."
-set -x
-libtoolize --copy --force
-autoheader
-$ACLOCAL 
-$AUTOMAKE --force-missing --add-missing --copy
-autoconf
diff --git a/linphone/coreapi/plugins/buddylookup/configure.ac b/linphone/coreapi/plugins/buddylookup/configure.ac
deleted file mode 100644 (file)
index 5e61343..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-#                                               -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.61)
-AC_INIT(buddylookup, 0.0.1, simon dot morlat at linphone dot org)
-AC_CONFIG_SRCDIR([src/lookup.c])
-
-AM_INIT_AUTOMAKE([tar-ustar])
-
-AC_CANONICAL_SYSTEM
-
-case $target_os in
-       *mingw*)
-               mingw_found=yes
-       ;;
-esac
-
-AC_MSG_CHECKING([warning make an error on compilation])
-AC_ARG_ENABLE(strict,
-[  --enable-strict       Enable error on compilation warning [default=yes]],
-[wall_werror=$enableval],
-[wall_werror=yes]
-)
-
-dnl AC_CONFIG_HEADER([config.h])
-
-# Checks for programs.
-AC_PROG_CC
-dnl LT_INIT([disable-static])
-AC_DISABLE_STATIC
-AC_PROG_LIBTOOL
-
-
-
-AC_CONFIG_COMMANDS([libtool-hacking],[
-       if test "$mingw_found" = "yes" ; then
-               echo "Hacking libtool to work with mingw..."
-               sed -e 's/\*\" \$a_deplib \"\*/\*/' < ./libtool > libtool.tmp
-               cp -f ./libtool.tmp ./libtool
-               rm -f ./libtool.tmp
-       fi
-],[mingw_found=$mingw_found])
-
-# Checks for libraries.
-
-PKG_CHECK_MODULES(LIBSOUP, libsoup-2.4 >= 2.4.0)
-PKG_CHECK_MODULES(LIBLINPHONE, linphone >= 3.0.0)
-
-LINPHONE_PLUGINS_DIR="\$(libdir)/liblinphone/plugins/"
-AC_SUBST(LINPHONE_PLUGINS_DIR)
-
-# Checks for header files.
-
-# Checks for typedefs, structures, and compiler characteristics.
-
-# Checks for library functions.
-
-if test "$GCC" = "yes" ; then
-CFLAGS="$CFLAGS -Wall"
-LDFLAGS="$LDFLAGS -rdynamic "
-
-       if test $wall_werror = yes;  then
-               CFLAGS="$CFLAGS -Werror "
-       fi
-fi
-
-AM_CONDITIONAL(BUILD_WIN32, test x$mingw_found = xyes)
-
-AC_OUTPUT(
-Makefile
-src/Makefile
-)
diff --git a/linphone/coreapi/plugins/buddylookup/src/Makefile.am b/linphone/coreapi/plugins/buddylookup/src/Makefile.am
deleted file mode 100644 (file)
index f965a9d..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-pluginsdir=$(LINPHONE_PLUGINS_DIR)
-
-plugins_LTLIBRARIES=libbuddylookup.la
-
-libbuddylookup_la_SOURCES=lookup.c
-
-libbuddylookup_la_LIBADD=$(LIBSOUP_LIBS) $(LIBLINPHONE_LIBS) 
-
-libbuddylookup_la_LDFLAGS=-no-undefined
-
-AM_CFLAGS= $(LIBLINPHONE_CFLAGS) $(LIBSOUP_CFLAGS)
-
-if BUILD_WIN32
-#hack for mingw to force plugins dll to be where we want them to be.
-install-data-hook:
-       mv $(DESTDIR)$(pluginsdir)/../bin/libbuddylookup*.dll \
-       $(DESTDIR)$(pluginsdir)/.
-       rm -f $(DESTDIR)$(pluginsdir)/*.la
-       rm -f $(DESTDIR)$(pluginsdir)/*.dll.a
-endif
diff --git a/linphone/coreapi/plugins/buddylookup/src/lookup.c b/linphone/coreapi/plugins/buddylookup/src/lookup.c
deleted file mode 100644 (file)
index ff6ef8b..0000000
+++ /dev/null
@@ -1,273 +0,0 @@
-#ifdef IN_LINPHONE
-#include "linphonecore.h"
-#include "lpconfig.h"
-#else
-#include <linphone/linphonecore.h>
-#include <linphone/lpconfig.h>
-#endif
-#include <libsoup/soup.h>
-
-#define SERIALIZE_HTTPS 0
-
-static bool_t buddy_lookup_init(void){
-       return TRUE;
-};
-
-typedef struct _BLReq{
-       BuddyLookupRequest base;
-       SoupMessage *msg;
-       SoupSession *session;
-       ortp_thread_t th;
-}BLReq;
-
-
-void set_proxy(SoupSession *session, const char *proxy){
-       SoupURI *uri=soup_uri_new(proxy);
-       ms_message("Using http proxy %s",proxy);
-       g_object_set(G_OBJECT(session),"proxy-uri",uri,NULL);
-}
-
-static void buddy_lookup_instance_init(SipSetupContext *ctx){
-}
-
-static void buddy_lookup_instance_uninit(SipSetupContext *ctx){
-}
-
-static SoupMessage * build_xmlrpc_request(const char *identity, const char *password, const char *key, const char *domain, const char *url, int max_results){
-       SoupMessage * msg;
-
-       msg=soup_xmlrpc_request_new(url,
-                               "fp.searchUsers",
-                               G_TYPE_STRING, identity,
-                               G_TYPE_STRING, password ? password : "",
-                               G_TYPE_STRING, key,
-                               G_TYPE_INT , max_results,
-                               G_TYPE_INT , 0,
-                               G_TYPE_STRING, domain,
-                               G_TYPE_INVALID);
-       if (!msg){
-               ms_error("Fail to create SoupMessage !");
-       }else{
-               SoupBuffer *sb=soup_message_body_flatten(msg->request_body);
-               ms_message("This is the XML-RPC request we are going to send:\n%s\n",sb->data);
-               soup_buffer_free(sb);
-       }
-       return msg;
-}
-
-static void got_headers(BLReq *blreq, SoupMessage*msg){
-       ms_message("Got headers !");
-       blreq->base.status=BuddyLookupConnected;
-}
-
-static void fill_item(GHashTable *ht , const char *name, char *dest, size_t dest_size){
-       GValue *v=(GValue*)g_hash_table_lookup(ht,(gconstpointer)name);
-       if (v) {
-               const char *tmp=g_value_get_string(v);
-               if (tmp){
-                       strncpy(dest,tmp,dest_size-1);
-               }
-       }else ms_warning("no field named '%s'", name);
-}
-
-static void fill_buddy_info(BLReq *blreq, BuddyInfo *bi, GHashTable *ht){
-       char tmp[256];
-       fill_item(ht,"first_name",bi->firstname,sizeof(bi->firstname));
-       fill_item(ht,"last_name",bi->lastname,sizeof(bi->lastname));
-       fill_item(ht,"display_name",bi->displayname,sizeof(bi->displayname));
-       fill_item(ht,"sip",tmp,sizeof(tmp));
-       if (strstr(tmp,"sip:")==0){
-               snprintf(bi->sip_uri,sizeof(bi->sip_uri)-1,"sip:%s",tmp);
-       }else{
-               strncpy(bi->sip_uri,tmp,sizeof(bi->sip_uri)-1);
-       }
-       
-       fill_item(ht,"street",bi->address.street,sizeof(bi->address.street));
-       fill_item(ht,"zip",bi->address.zip,sizeof(bi->address.zip));
-       fill_item(ht,"city",bi->address.town,sizeof(bi->address.town));
-       fill_item(ht,"country",bi->address.country,sizeof(bi->address.country));
-       fill_item(ht,"email",bi->email,sizeof(bi->email));
-       tmp[0]='\0';
-       fill_item(ht,"image",tmp,sizeof(tmp));
-       if (tmp[0]!='\0'){
-               SoupMessage *msg;
-               guint status;
-               ms_message("This buddy has an image, let's download it: %s",tmp);
-               msg=soup_message_new("GET",tmp);
-               if ((status=soup_session_send_message(blreq->session,msg))==200){
-                       SoupMessageBody *body=msg->response_body;
-                       ms_message("Received %i bytes",body->length);
-                       strncpy(bi->image_type,"png",sizeof(bi->image_type));
-                       bi->image_length=body->length;
-                       bi->image_data=ms_malloc(body->length+4); /*add padding bytes*/
-                       memcpy(bi->image_data,body->data,bi->image_length);
-               }else{
-                       ms_error("Fail to fetch the image %i",status);
-               }
-       }
-       
-}
-
-static MSList * make_buddy_list(BLReq *blreq, GValue *retval){
-       MSList *ret=NULL;
-       if (G_VALUE_TYPE(retval)==G_TYPE_VALUE_ARRAY){
-               GValueArray *array=(GValueArray*)g_value_get_boxed(retval);
-               GValue *gelem;
-               int i;
-               for(i=0;i<array->n_values;++i){
-                       gelem=g_value_array_get_nth(array,i);
-                       if (G_VALUE_TYPE(gelem)==G_TYPE_HASH_TABLE){
-                               GHashTable *ht=(GHashTable*)g_value_get_boxed(gelem);
-                               BuddyInfo *bi=buddy_info_new();
-                               fill_buddy_info(blreq,bi,ht);
-                               ret=ms_list_append(ret,bi);
-                       }else{
-                               ms_error("Element is not a hash table");
-                       }
-               }
-       }else ms_error("Return value is not an array");
-       return ret;
-}
-
-
-static int xml_rpc_parse_response(BLReq *blreq, SoupMessage *sm){
-       SoupBuffer *sb;
-       GValue retval;
-       GError *error=NULL;
-       sb=soup_message_body_flatten(sm->response_body);
-       ms_message("This the xml-rpc response:\n%s\n",sb->data);
-       if (soup_xmlrpc_parse_method_response(sb->data,sb->length,&retval,&error)==FALSE){
-               if (error!=NULL){
-                       ms_error("xmlrpc fault: %s",error->message);
-                       g_error_free(error);
-               }else{
-                       ms_error("Could not parse xml-rpc response !");
-               }
-               blreq->base.status=BuddyLookupFailure;
-       }else{
-               ms_message("Extracting values from return type...");
-               blreq->base.results=make_buddy_list(blreq,&retval);
-               g_value_unset(&retval);
-               blreq->base.status=BuddyLookupDone;
-       }
-       soup_buffer_free(sb);
-       return blreq->base.status==BuddyLookupDone ? 0 : -1;
-}
-
-#if SERIALIZE_HTTPS
-/*on windows libsoup support for threads with gnutls is not yet functionnal (only in git)
-This will come in next release of libsoup, probably. 
-In the meantime, we are forced to serialize all soup https processing with a big
-ugly global mutex...*/
-
-static GStaticMutex big_mutex = G_STATIC_MUTEX_INIT;
-
-#endif
-
-static void * process_xml_rpc_request(void *up){
-       BLReq *blreq=(BLReq*)up;
-       SoupMessage *sm=blreq->msg;
-       int code;
-       g_signal_connect_swapped(G_OBJECT(sm),"got-headers",(GCallback)got_headers,blreq);
-       blreq->base.status=BuddyLookupConnecting;
-#if SERIALIZE_HTTPS
-       g_static_mutex_lock(&big_mutex);
-#endif
-       code=soup_session_send_message(blreq->session,sm);
-       if (code==200){
-               ms_message("Got a response from server, yeah !");
-               xml_rpc_parse_response(blreq,sm);
-       }else{
-               ms_error("request failed, error-code=%i (%s)",code,soup_status_get_phrase(code));
-               blreq->base.status=BuddyLookupFailure;
-       }
-#if SERIALIZE_HTTPS
-       g_static_mutex_unlock(&big_mutex);
-#endif
-       return NULL;
-}
-
-static int lookup_buddy(SipSetupContext *ctx, BLReq *req){
-       LinphoneProxyConfig *cfg=sip_setup_context_get_proxy_config(ctx);
-       LinphoneCore *lc=linphone_proxy_config_get_core(cfg);
-       LpConfig *config=linphone_core_get_config(lc);
-       const char *identity=linphone_proxy_config_get_identity(cfg);
-       const char *url=lp_config_get_string(config,"BuddyLookup","url",NULL);
-       LinphoneAuthInfo *aa;
-       SoupMessage *sm;
-       LinphoneAddress *from;
-       
-       if (url==NULL){
-               ms_error("No url defined for BuddyLookup in config file, aborting search.");
-               return -1;
-       }
-
-       from=linphone_address_new(identity);
-       if (from==NULL){
-               ms_error("Could not parse identity %s",identity);
-               return -1;
-       }
-       aa=linphone_core_find_auth_info(lc,linphone_address_get_domain(from),linphone_address_get_username(from));
-       if (aa) ms_message("There is a password: %s",aa->passwd);
-       else ms_message("No password for %s on %s",linphone_address_get_username(from),linphone_address_get_domain(from));
-       sm=build_xmlrpc_request(identity, aa ? aa->passwd : NULL, req->base.key, linphone_address_get_domain(from), url, req->base.max_results);
-       linphone_address_destroy(from);
-       req->msg=sm;
-       ortp_thread_create(&req->th,NULL,process_xml_rpc_request,req);
-       if (!sm) return -1;
-       return 0;
-}
-
-static BuddyLookupRequest * create_request(SipSetupContext *ctx){
-       BLReq *req=ms_new0(BLReq,1);
-       const char *proxy=NULL;
-       req->session=soup_session_sync_new();
-       proxy=getenv("http_proxy");
-       if (proxy && strlen(proxy)>0) set_proxy(req->session,proxy);
-       return (BuddyLookupRequest*)req;
-}
-
-static int submit_request(SipSetupContext *ctx, BuddyLookupRequest *req){
-       BLReq *blreq=(BLReq*)req;
-       return lookup_buddy(ctx,blreq);
-}
-
-static int free_request(SipSetupContext *ctx, BuddyLookupRequest *req){
-       BLReq *blreq=(BLReq*)req;
-       if (blreq->th!=0){
-               soup_session_cancel_message(blreq->session,blreq->msg, SOUP_STATUS_CANCELLED);
-               ortp_thread_join(blreq->th,NULL);
-               blreq->th=0;
-               g_object_unref(G_OBJECT(blreq->msg));
-       }
-       if (blreq->session)
-               g_object_unref(G_OBJECT(blreq->session));
-       buddy_lookup_request_free(req);
-       return 0;
-}
-
-static void buddy_lookup_exit(void){
-}
-
-static BuddyLookupFuncs bl_funcs={
-       .request_create=create_request,
-       .request_submit=submit_request,
-       .request_free=free_request
-};
-
-
-
-static SipSetup buddy_lookup_funcs={
-       .name="BuddyLookup",
-       .capabilities=SIP_SETUP_CAP_BUDDY_LOOKUP,
-       .init=buddy_lookup_init,
-       .init_instance=buddy_lookup_instance_init,
-       .uninit_instance=buddy_lookup_instance_uninit,
-       .exit=buddy_lookup_exit,
-       .buddy_lookup_funcs=&bl_funcs,
-};
-
-void libbuddylookup_init(){
-       sip_setup_register(&buddy_lookup_funcs);
-       ms_message("Buddylookup plugin registered.");
-}
diff --git a/linphone/coreapi/presence.c b/linphone/coreapi/presence.c
deleted file mode 100644 (file)
index fc8f46b..0000000
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
-linphone
-Copyright (C) 2000  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#include "linphonecore.h"
-#include <eXosip2/eXosip.h>
-#include <osipparser2/osip_message.h>
-#include "private.h"
-
-
-extern const char *__policy_enum_to_str(LinphoneSubscribePolicy pol);
-
-
-void linphone_core_add_subscriber(LinphoneCore *lc, const char *subscriber, int did, int nid){
-       LinphoneFriend *fl=linphone_friend_new_with_addr(subscriber);
-       if (fl==NULL) return ;
-       fl->in_did=did;
-       linphone_friend_set_nid(fl,nid);
-       linphone_friend_set_inc_subscribe_policy(fl,LinphoneSPAccept);
-       fl->inc_subscribe_pending=TRUE;
-       lc->subscribers=ms_list_append(lc->subscribers,(void *)fl);
-       if (lc->vtable.new_unknown_subscriber!=NULL) {
-               char *subscriber=linphone_address_as_string(fl->uri);
-               lc->vtable.new_unknown_subscriber(lc,fl,subscriber);
-               ms_free(subscriber);
-       }
-}
-
-void linphone_core_reject_subscriber(LinphoneCore *lc, LinphoneFriend *lf){
-       linphone_friend_set_inc_subscribe_policy(lf,LinphoneSPDeny);
-}
-
-static void __do_notify(void * data, void * user_data){
-       int *tab=(int*)user_data;
-       LinphoneFriend *lf=(LinphoneFriend*)data;
-       linphone_friend_notify(lf,tab[0],tab[1]);
-}
-
-void __linphone_core_notify_all_friends(LinphoneCore *lc, int ss, int os){
-       int tab[2];
-       tab[0]=ss;
-       tab[1]=os;
-       ms_list_for_each2(lc->friends,__do_notify,(void *)tab);
-}
-
-void linphone_core_notify_all_friends(LinphoneCore *lc, LinphoneOnlineStatus os){
-       ms_message("Notifying all friends that we are in status %i",os);
-       __linphone_core_notify_all_friends(lc,EXOSIP_SUBCRSTATE_ACTIVE,os);
-}
-
-/* check presence state before answering to call; returns TRUE if we can proceed, else answer the appropriate answer
-to close the dialog*/
-bool_t linphone_core_check_presence(LinphoneCore *lc){
-       return TRUE;
-}
-
-void linphone_subscription_new(LinphoneCore *lc, eXosip_event_t *ev){
-       LinphoneFriend *lf=NULL;
-       osip_from_t *from=ev->request->from;
-       char *tmp;
-       osip_message_t *msg=NULL;
-       LinphoneAddress *uri;
-       osip_from_to_str(ev->request->from,&tmp);
-       uri=linphone_address_new(tmp);
-       ms_message("Receiving new subscription from %s.",tmp);
-       /* check if we answer to this subscription */
-       if (linphone_find_friend(lc->friends,uri,&lf)!=NULL){
-               lf->in_did=ev->did;
-               linphone_friend_set_nid(lf,ev->nid);
-               eXosip_insubscription_build_answer(ev->tid,202,&msg);
-               eXosip_insubscription_send_answer(ev->tid,202,msg);
-               __eXosip_wakeup_event();
-               linphone_friend_done(lf);       /*this will do all necessary actions */
-       }else{
-               /* check if this subscriber is in our black list */
-               if (linphone_find_friend(lc->subscribers,uri,&lf)){
-                       if (lf->pol==LinphoneSPDeny){
-                               ms_message("Rejecting %s because we already rejected it once.",from);
-                               eXosip_insubscription_send_answer(ev->tid,401,NULL);
-                       }
-                       else {
-                               /* else it is in wait for approval state, because otherwise it is in the friend list.*/
-                               ms_message("New subscriber found in friend list, in %s state.",__policy_enum_to_str(lf->pol));
-                       }
-               }else {
-                       eXosip_insubscription_build_answer(ev->tid,202,&msg);
-                       eXosip_insubscription_send_answer(ev->tid,202,msg);
-                       linphone_core_add_subscriber(lc,tmp,ev->did,ev->nid);
-               }
-       }
-       osip_free(tmp);
-}
-
-void linphone_notify_recv(LinphoneCore *lc, eXosip_event_t *ev)
-{
-       const char *status=_("Gone");
-       const char *img="sip-closed.png";
-       char *tmp;
-       LinphoneFriend *lf;
-       LinphoneAddress *friend=NULL;
-       osip_from_t *from=NULL;
-       osip_body_t *body=NULL;
-       LinphoneOnlineStatus estatus=LINPHONE_STATUS_UNKNOWN;
-       ms_message("Receiving notify with sid=%i,nid=%i",ev->sid,ev->nid);
-       if (ev->request!=NULL){
-               from=ev->request->from;
-               osip_message_get_body(ev->request,0,&body);
-               if (body==NULL){
-                       ms_error("No body in NOTIFY");
-                       return;
-               }
-               if (strstr(body->body,"pending")!=NULL){
-                       status=_("Waiting for Approval");
-                       img="sip-wfa.png";
-                       estatus=LINPHONE_STATUS_PENDING;
-               }else if ((strstr(body->body,"online")!=NULL) || (strstr(body->body,"open")!=NULL)) {
-                       status=_("Online");
-                       img="sip-online.png";
-                       estatus=LINPHONE_STATUS_ONLINE;
-               }else if (strstr(body->body,"busy")!=NULL){
-                       status=_("Busy");
-                       img="sip-busy.png";
-                       estatus=LINPHONE_STATUS_BUSY;
-               }else if (strstr(body->body,"berightback")!=NULL
-                               || strstr(body->body,"in-transit")!=NULL ){
-                       status=_("Be Right Back");
-                       img="sip-bifm.png";
-                       estatus=LINPHONE_STATUS_BERIGHTBACK;
-               }else if (strstr(body->body,"away")!=NULL){
-                       status=_("Away");
-                       img="sip-away.png";
-                       estatus=LINPHONE_STATUS_AWAY;
-               }else if (strstr(body->body,"onthephone")!=NULL
-                       || strstr(body->body,"on-the-phone")!=NULL){
-                       status=_("On The Phone");
-                       img="sip-otp.png";
-                       estatus=LINPHONE_STATUS_ONTHEPHONE;
-               }else if (strstr(body->body,"outtolunch")!=NULL
-                               || strstr(body->body,"meal")!=NULL){
-                       status=_("Out To Lunch");
-                       img="sip-otl.png";
-                       estatus=LINPHONE_STATUS_OUTTOLUNCH;
-               }else if (strstr(body->body,"closed")!=NULL){
-                       status=_("Closed");
-                       img="sip-away.png";
-                       estatus=LINPHONE_STATUS_CLOSED;
-               }else{
-                       status=_("Gone");
-                       img="sip-closed.png";
-                       estatus=LINPHONE_STATUS_OFFLINE;
-               }
-               ms_message("We are notified that sip:%s@%s has online status %s",from->url->username,from->url->host,status);
-       }
-       lf=linphone_find_friend_by_sid(lc->friends,ev->sid);
-       if (lf!=NULL){
-               friend=lf->uri;
-               tmp=linphone_address_as_string(friend);
-               lf->status=estatus;
-               lc->vtable.notify_recv(lc,(LinphoneFriend*)lf,tmp,status,img);
-               ms_free(tmp);
-               if (ev->ss_status==EXOSIP_SUBCRSTATE_TERMINATED) {
-                       lf->sid=-1;
-                       lf->out_did=-1;
-                       ms_message("Outgoing subscription terminated by remote.");
-               }
-       }else{
-               ms_message("But this person is not part of our friend list, so we don't care.");
-       }
-}
-
-void linphone_subscription_answered(LinphoneCore *lc, eXosip_event_t *ev){
-       LinphoneFriend *lf;
-       osip_from_t *from=ev->response->to;
-       char *tmp;
-       osip_from_to_str(from,&tmp);
-       LinphoneAddress *uri=linphone_address_new(tmp);
-       linphone_find_friend(lc->friends,uri,&lf);
-       if (lf!=NULL){
-               lf->out_did=ev->did;
-               linphone_friend_set_sid(lf,ev->sid);
-       }else{
-               ms_warning("Receiving answer for unknown subscribe sip:%s@%s", from->url->username,from->url->host);
-       }
-       ms_free(tmp);
-}
-void linphone_subscription_closed(LinphoneCore *lc,eXosip_event_t *ev){
-       LinphoneFriend *lf;
-       osip_from_t *from=ev->request->from;
-       lf=linphone_find_friend_by_nid(lc->friends,ev->nid);
-       if (lf!=NULL){
-               lf->in_did=-1;
-               linphone_friend_set_nid(lf,-1);
-       }else{
-               ms_warning("Receiving unsuscribe for unknown in-subscribtion from sip:%s@%s", from->url->username, from->url->host);
-       }
-}
diff --git a/linphone/coreapi/private.h b/linphone/coreapi/private.h
deleted file mode 100644 (file)
index e9809dc..0000000
+++ /dev/null
@@ -1,197 +0,0 @@
-/***************************************************************************
- *            private.h
- *
- *  Mon Jun 13 14:23:23 2005
- *  Copyright  2005  Simon Morlat
- *  Email simon dot morlat at linphone dot org
- ****************************************************************************/
-
-/*
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-#ifndef _PRIVATE_H
-#define _PRIVATE_H
-
-#include "linphonecore.h"
-#include <eXosip2/eXosip.h>
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#ifndef LIBLINPHONE_VERSION 
-#define LIBLINPHONE_VERSION LINPHONE_VERSION
-#endif
-
-#ifndef PACKAGE_SOUND_DIR 
-#define PACKAGE_SOUND_DIR "."
-#endif
-
-#ifdef HAVE_GETTEXT
-#include <libintl.h>
-#ifndef _
-#define _(String) gettext(String)
-#endif
-#else
-#ifndef _
-#define _(something)   (something)
-#endif
-#ifndef ngettext
-#define ngettext(singular, plural, number)     (((number)==1)?(singular):(plural))
-#endif
-#endif
-
-       
-typedef struct _StreamParams
-{
-       int initialized;
-       int line;
-       int localport;
-       int remoteport;
-       int remotertcpport;
-       int pt;
-       char *relay_session_id;
-       int natd_port;
-       char remoteaddr[LINPHONE_HOSTNAME_SIZE];
-       char natd_addr[LINPHONE_HOSTNAME_SIZE];
-} StreamParams;
-
-typedef enum _LCState{
-       LCStateInit,
-       LCStateRinging,
-       LCStateAVRunning
-}LCState;
-
-
-typedef struct _LinphoneCall
-{
-       struct _LinphoneCore *core;
-       StreamParams audio_params;
-       StreamParams video_params;
-       LinphoneCallDir dir;
-       struct _RtpProfile *profile;    /*points to the local_profile or to the remote "guessed" profile*/
-       struct _LinphoneCallLog *log;
-       int cid; /*call id */
-       int did; /*dialog id */
-       int tid; /*last transaction id*/
-       char localip[LINPHONE_IPADDR_SIZE]; /* our best guess for local ipaddress for this call */
-       struct _sdp_context *sdpctx;
-       time_t start_time; /*time at which the call was initiated*/
-       time_t media_start_time; /*time at which it was accepted, media streams established*/
-       LCState state;
-       bool_t auth_pending;
-       bool_t supports_session_timers;
-} LinphoneCall;
-
-LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to);
-LinphoneCall * linphone_call_new_incoming(struct _LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to, eXosip_event_t *ev);
-#define linphone_call_set_state(lcall,st)      (lcall)->state=(st)
-void linphone_call_destroy(struct _LinphoneCall *obj);
-
-/* private: */
-LinphoneCallLog * linphone_call_log_new(LinphoneCall *call, LinphoneAddress *local, LinphoneAddress * remote);
-void linphone_call_log_completed(LinphoneCallLog *calllog, LinphoneCall *call);
-void linphone_call_log_destroy(LinphoneCallLog *cl);
-
-
-void linphone_core_init_media_streams(LinphoneCore *lc);
-
-void linphone_auth_info_write_config(struct _LpConfig *config, LinphoneAuthInfo *obj, int pos);
-
-void linphone_core_update_proxy_register(LinphoneCore *lc);
-void linphone_core_refresh_subscribes(LinphoneCore *lc);
-
-int linphone_proxy_config_send_publish(LinphoneProxyConfig *cfg, LinphoneOnlineStatus os);
-
-int linphone_online_status_to_eXosip(LinphoneOnlineStatus os);
-
-void linphone_friend_set_sid(LinphoneFriend *lf, int sid);
-void linphone_friend_set_nid(LinphoneFriend *lf, int nid);
-void linphone_friend_notify(LinphoneFriend *lf, int ss, LinphoneOnlineStatus os);
-
-int set_lock_file();
-int get_lock_file();
-int remove_lock_file();
-int do_registration(LinphoneCore *lc, bool_t doit);
-void check_for_registration(LinphoneCore *lc);
-char *int2str(int number);
-int from_2char_without_params(osip_from_t *from,char **str);
-void check_sound_device(LinphoneCore *lc);
-void linphone_core_setup_local_rtp_profile(LinphoneCore *lc);
-void linphone_core_get_local_ip(LinphoneCore *lc, const char *to, char *result);
-bool_t host_has_ipv6_network();
-bool_t lp_spawn_command_line_sync(const char *command, char **result,int *command_ret);
-
-static inline int get_min_bandwidth(int dbw, int ubw){
-       if (dbw<0) return ubw;
-       if (ubw<0) return dbw;
-       return MIN(dbw,ubw);
-}
-
-static inline bool_t bandwidth_is_greater(int bw1, int bw2){
-       if (bw1<0) return TRUE;
-       else if (bw2<0) return FALSE;
-       else return bw1>=bw2;
-}
-
-static inline void set_string(char **dest, const char *src){
-       if (*dest){
-               ms_free(*dest);
-               *dest=NULL;
-       }
-       if (src)
-               *dest=ms_strdup(src);
-}
-
-#define PAYLOAD_TYPE_ENABLED   PAYLOAD_TYPE_USER_FLAG_0
-bool_t linphone_proxy_config_register_again_with_updated_contact(LinphoneProxyConfig *obj, osip_message_t *orig_request, osip_message_t *last_answer);
-void linphone_process_authentication(LinphoneCore* lc, eXosip_event_t *ev);
-void linphone_authentication_ok(LinphoneCore *lc, eXosip_event_t *ev);
-void linphone_subscription_new(LinphoneCore *lc, eXosip_event_t *ev);
-void linphone_notify_recv(LinphoneCore *lc,eXosip_event_t *ev);
-LinphoneProxyConfig *linphone_core_get_proxy_config_from_rid(LinphoneCore *lc, int rid);
-void linphone_proxy_config_process_authentication_failure(LinphoneCore *lc, eXosip_event_t *ev);
-
-void linphone_subscription_answered(LinphoneCore *lc, eXosip_event_t *ev);
-void linphone_subscription_closed(LinphoneCore *lc, eXosip_event_t *ev);
-
-void linphone_call_init_media_params(LinphoneCall *call);
-
-void linphone_set_sdp(osip_message_t *sip, const char *sdp);
-
-MSList *linphone_find_friend(MSList *fl, const LinphoneAddress *fri, LinphoneFriend **lf);
-LinphoneFriend *linphone_find_friend_by_nid(MSList *l, int nid);
-LinphoneFriend *linphone_find_friend_by_sid(MSList *l, int sid);
-
-void linphone_core_update_allocated_audio_bandwidth(LinphoneCore *lc);
-void linphone_core_update_allocated_audio_bandwidth_in_call(LinphoneCore *lc, const PayloadType *pt);
-void linphone_core_run_stun_tests(LinphoneCore *lc, LinphoneCall *call);
-
-void linphone_core_write_friends_config(LinphoneCore* lc);
-void linphone_friend_write_to_config_file(struct _LpConfig *config, LinphoneFriend *lf, int index);
-LinphoneFriend * linphone_friend_new_from_config_file(struct _LinphoneCore *lc, int index);
-
-void linphone_proxy_config_update(LinphoneProxyConfig *cfg);
-void linphone_proxy_config_get_contact(LinphoneProxyConfig *cfg, const char **ip, int *port);
-LinphoneProxyConfig * linphone_core_lookup_known_proxy(LinphoneCore *lc, const LinphoneAddress *uri);
-int linphone_core_get_local_ip_for(const char *dest, char *result);
-
-LinphoneProxyConfig *linphone_proxy_config_new_from_config_file(struct _LpConfig *config, int index);
-void linphone_proxy_config_write_to_config_file(struct _LpConfig* config,LinphoneProxyConfig *obj, int index);
-
-int linphone_proxy_config_normalize_number(LinphoneProxyConfig *cfg, const char *username, char *result, size_t result_len);
-
-#endif /* _PRIVATE_H */
diff --git a/linphone/coreapi/proxy.c b/linphone/coreapi/proxy.c
deleted file mode 100644 (file)
index b836feb..0000000
+++ /dev/null
@@ -1,992 +0,0 @@
-/*
-linphone
-Copyright (C) 2000  Simon MORLAT (simon.morlat@linphone.org)
-*/
-/*
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-#include "linphonecore.h"
-#include "sipsetup.h"
-#include <eXosip2/eXosip.h>
-#include <osipparser2/osip_message.h>
-#include "lpconfig.h"
-#include "private.h"
-
-
-#include <ctype.h>
-
-
-void linphone_proxy_config_write_all_to_config_file(LinphoneCore *lc){
-       MSList *elem;
-       int i;
-       for(elem=lc->sip_conf.proxies,i=0;elem!=NULL;elem=ms_list_next(elem),i++){
-               LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
-               linphone_proxy_config_write_to_config_file(lc->config,cfg,i);
-       }
-}
-
-void linphone_proxy_config_init(LinphoneProxyConfig *obj){
-       memset(obj,0,sizeof(LinphoneProxyConfig));
-       obj->rid=-1;
-       obj->expires=3600;
-}
-
-/**
- * @addtogroup proxies
- * @{
-**/
-
-/**
- * Creates an empty proxy config.
-**/
-LinphoneProxyConfig *linphone_proxy_config_new(){
-       LinphoneProxyConfig *obj=NULL;
-       obj=ms_new(LinphoneProxyConfig,1);
-       linphone_proxy_config_init(obj);
-       return obj;
-}
-
-/**
- * Destroys a proxy config.
- * 
- * @note: LinphoneProxyConfig that have been removed from LinphoneCore with
- * linphone_core_remove_proxy_config() must not be freed.
-**/
-void linphone_proxy_config_destroy(LinphoneProxyConfig *obj){
-       if (obj->reg_proxy!=NULL) ms_free(obj->reg_proxy);
-       if (obj->reg_identity!=NULL) ms_free(obj->reg_identity);
-       if (obj->reg_route!=NULL) ms_free(obj->reg_route);
-       if (obj->ssctx!=NULL) sip_setup_context_free(obj->ssctx);
-       if (obj->realm!=NULL) ms_free(obj->realm);
-       if (obj->type!=NULL) ms_free(obj->type);
-       if (obj->contact_addr!=NULL) ms_free(obj->contact_addr);
-       if (obj->dial_prefix!=NULL) ms_free(obj->dial_prefix);
-}
-
-/**
- * Returns a boolean indicating that the user is sucessfully registered on the proxy.
-**/
-bool_t linphone_proxy_config_is_registered(const LinphoneProxyConfig *obj){
-       return obj->registered;
-}
-
-void linphone_proxy_config_get_contact(LinphoneProxyConfig *cfg, const char **ip, int *port){
-       if (cfg->registered){
-               *ip=cfg->contact_addr;
-               *port=cfg->contact_port;
-       }else{
-               *ip=NULL;
-               *port=0;
-       }
-}
-
-static void update_contact(LinphoneProxyConfig *cfg, const char *ip, const char *port){
-       if (cfg->contact_addr){
-               ms_free(cfg->contact_addr);
-       }
-       cfg->contact_addr=ms_strdup(ip);
-       if (port!=NULL)
-               cfg->contact_port=atoi(port);
-       else cfg->contact_port=5060;
-}
-
-bool_t linphone_proxy_config_register_again_with_updated_contact(LinphoneProxyConfig *obj, osip_message_t *orig_request, osip_message_t *last_answer){
-       osip_message_t *msg;
-       const char *rport,*received;
-       osip_via_t *via=NULL;
-       osip_generic_param_t *param=NULL;
-       osip_contact_t *ctt=NULL;
-       osip_message_get_via(last_answer,0,&via);
-       if (!via) return FALSE;
-       osip_via_param_get_byname(via,"rport",&param);
-       if (param) rport=param->gvalue;
-       else return FALSE;
-       param=NULL;
-       osip_via_param_get_byname(via,"received",&param);
-       if (param) received=param->gvalue;
-       else return FALSE;
-       osip_message_get_contact(orig_request,0,&ctt);
-       if (strcmp(ctt->url->host,received)==0){
-               /*ip address matches, check ports*/
-               const char *contact_port=ctt->url->port;
-               const char *via_rport=rport;
-               if (via_rport==NULL || strlen(via_rport)>0)
-                       via_rport="5060";
-               if (contact_port==NULL || strlen(contact_port)>0)
-                       contact_port="5060";
-               if (strcmp(contact_port,via_rport)==0){
-                       ms_message("Register has up to date contact, doing nothing.");
-                       return FALSE;
-               }else ms_message("ports do not match, need to update the register (%s <> %s)", contact_port,via_rport);
-       }
-       eXosip_lock();
-       msg=NULL;
-       eXosip_register_build_register(obj->rid,obj->expires,&msg);
-       if (msg==NULL){
-               eXosip_unlock();
-               ms_warning("Fail to create a contact updated register.");
-               return FALSE;
-       }
-       osip_message_get_contact(msg,0,&ctt);
-       if (ctt->url->host!=NULL){
-               osip_free(ctt->url->host);
-       }
-       ctt->url->host=osip_strdup(received);
-       if (ctt->url->port!=NULL){
-               osip_free(ctt->url->port);
-       }
-       ctt->url->port=osip_strdup(rport);
-       eXosip_register_send_register(obj->rid,msg);
-       eXosip_unlock();
-       update_contact(obj,received,rport);
-       ms_message("Resending new register with updated contact %s:%s",received,rport);
-       return TRUE;
-}
-
-/**
- * Sets the proxy address
- *
- * Examples of valid sip proxy address are:
- * - IP address: sip:87.98.157.38
- * - IP address with port: sip:87.98.157.38:5062
- * - hostnames : sip:sip.example.net
-**/
-int linphone_proxy_config_set_server_addr(LinphoneProxyConfig *obj, const char *server_addr){
-       int err;
-       osip_from_t *url;
-       if (obj->reg_proxy!=NULL) ms_free(obj->reg_proxy);
-       obj->reg_proxy=NULL;
-       if (server_addr!=NULL && strlen(server_addr)>0){
-               osip_from_init(&url);
-               err=osip_from_parse(url,server_addr);
-               if (err==0 && url->url->host!=NULL){
-                       obj->reg_proxy=ms_strdup(server_addr);
-               }else{
-                       ms_warning("Could not parse %s",server_addr);
-               }
-               osip_from_free(url);
-       }
-       return 0;
-}
-
-/**
- * Sets the user identity as a SIP address.
- *
- * This identity is normally formed with display name, username and domain, such 
- * as:
- * Alice <sip:alice@example.net>
- * The REGISTER messages will have from and to set to this identity.
- *
-**/
-void linphone_proxy_config_set_identity(LinphoneProxyConfig *obj, const char *identity){
-       int err=0;
-       osip_from_t *url=NULL;
-       if (identity!=NULL && strlen(identity)>0){
-               osip_from_init(&url);
-               err=osip_from_parse(url,identity);
-               if (err<0 || url->url->host==NULL || url->url->username==NULL){
-                       ms_warning("Could not parse %s",identity);
-                       osip_from_free(url);
-                       return;
-               }
-       } else err=-2;
-       if (obj->reg_identity!=NULL) {
-               ms_free(obj->reg_identity);
-               obj->reg_identity=NULL;
-       }
-       if (err==-2) obj->reg_identity=NULL;
-       else {
-               obj->reg_identity=ms_strdup(identity);
-               if (obj->realm)
-                       ms_free(obj->realm);
-               obj->realm=ms_strdup(url->url->host);
-       }
-       if (url) osip_from_free(url);
-}
-
-const char *linphone_proxy_config_get_domain(const LinphoneProxyConfig *cfg){
-       return cfg->realm;
-}
-
-/**
- * Sets a SIP route.
- * When a route is set, all outgoing calls will go to the route's destination if this proxy
- * is the default one (see linphone_core_set_default_proxy() ).
-**/
-void linphone_proxy_config_set_route(LinphoneProxyConfig *obj, const char *route)
-{
-       int err;
-       osip_uri_param_t *lr_param=NULL;
-       osip_route_t *rt=NULL;
-       char *tmproute=NULL;
-       if (route!=NULL && strlen(route)>0){
-               osip_route_init(&rt);
-               err=osip_route_parse(rt,route);
-               if (err<0){
-                       ms_warning("Could not parse %s",route);
-                       osip_route_free(rt);
-                       return ;
-               }
-               if (obj->reg_route!=NULL) {
-                       ms_free(obj->reg_route);
-                       obj->reg_route=NULL;
-               }
-                       
-               /* check if the lr parameter is set , if not add it */
-               osip_uri_uparam_get_byname(rt->url, "lr", &lr_param);
-               if (lr_param==NULL){
-                       osip_uri_uparam_add(rt->url,osip_strdup("lr"),NULL);
-                       osip_route_to_str(rt,&tmproute);
-                       obj->reg_route=ms_strdup(tmproute);
-                       osip_free(tmproute);
-               }else obj->reg_route=ms_strdup(route);
-       }else{
-               if (obj->reg_route!=NULL) ms_free(obj->reg_route);
-               obj->reg_route=NULL;
-       }
-}
-
-bool_t linphone_proxy_config_check(LinphoneCore *lc, LinphoneProxyConfig *obj){
-       if (obj->reg_proxy==NULL){
-               if (lc->vtable.display_warning)
-                       lc->vtable.display_warning(lc,_("The sip proxy address you entered is invalid, it must start with \"sip:\""
-                                               " followed by a hostname."));
-               return FALSE;
-       }
-       if (obj->reg_identity==NULL){
-               if (lc->vtable.display_warning)
-                       lc->vtable.display_warning(lc,_("The sip identity you entered is invalid.\nIt should look like "
-                                       "sip:username@proxydomain, such as sip:alice@example.net"));
-               return FALSE;
-       }
-       return TRUE;
-}
-
-/**
- * Indicates whether a REGISTER request must be sent to the proxy.
-**/
-void linphone_proxy_config_enableregister(LinphoneProxyConfig *obj, bool_t val){
-       obj->reg_sendregister=val;
-}
-
-/**
- * Sets the registration expiration time in seconds.
-**/
-void linphone_proxy_config_expires(LinphoneProxyConfig *obj, int val){
-       if (val<=0) val=600;
-       obj->expires=val;
-}
-
-void linphone_proxy_config_enable_publish(LinphoneProxyConfig *obj, bool_t val){
-       obj->publish=val;
-}
-
-/**
- * Starts editing a proxy configuration.
- *
- * Because proxy configuration must be consistent, applications MUST
- * call linphone_proxy_config_edit() before doing any attempts to modify
- * proxy configuration (such as identity, proxy address and so on).
- * Once the modifications are done, then the application must call
- * linphone_proxy_config_done() to commit the changes.
-**/
-void linphone_proxy_config_edit(LinphoneProxyConfig *obj){
-       obj->auth_failures=0;
-       if (obj->reg_sendregister){
-               /* unregister */
-               if (obj->registered) {
-                       osip_message_t *msg;
-                       eXosip_lock();
-                       eXosip_register_build_register(obj->rid,0,&msg);
-                       eXosip_register_send_register(obj->rid,msg);
-                       eXosip_unlock();
-                       obj->registered=FALSE;
-               }
-       }
-}
-
-void linphone_proxy_config_apply(LinphoneProxyConfig *obj,LinphoneCore *lc)
-{
-       obj->lc=lc;
-       linphone_proxy_config_done(obj);
-}
-
-static void linphone_proxy_config_register(LinphoneProxyConfig *obj){
-       const char *id_str;
-       if (obj->reg_identity!=NULL) id_str=obj->reg_identity;
-       else id_str=linphone_core_get_primary_contact(obj->lc);
-       if (obj->reg_sendregister){
-               char *ct=NULL;
-               osip_message_t *msg=NULL;
-               eXosip_lock();
-               obj->rid=eXosip_register_build_initial_register(id_str,obj->reg_proxy,NULL,obj->expires,&msg);
-               eXosip_register_send_register(obj->rid,msg);
-               eXosip_unlock();
-               if (ct!=NULL) osip_free(ct);
-       }
-}
-
-
-/**
- * Sets a dialing prefix to be automatically prepended when inviting a number with 
- * #linphone_core_invite.
- *
-**/
-void linphone_proxy_config_set_dial_prefix(LinphoneProxyConfig *cfg, const char *prefix){
-       if (cfg->dial_prefix!=NULL){
-               ms_free(cfg->dial_prefix);
-               cfg->dial_prefix=NULL;
-       }
-       if (prefix) cfg->dial_prefix=ms_strdup(prefix);
-}
-
-/**
- * Returns dialing prefix.
- *
- * 
-**/
-const char *linphone_proxy_config_get_dial_prefix(const LinphoneProxyConfig *cfg){
-       return cfg->dial_prefix;
-}
-
-/**
- * Sets whether liblinphone should replace "+" by "00" in dialed numbers (passed to
- * #linphone_core_invite ).
- *
-**/
-void linphone_proxy_config_set_dial_escape_plus(LinphoneProxyConfig *cfg, bool_t val){
-       cfg->dial_escape_plus=val;
-}
-
-/**
- * Returns whether liblinphone should replace "+" by "00" in dialed numbers (passed to
- * #linphone_core_invite ).
- *
-**/
-bool_t linphone_proxy_config_get_dial_escape_plus(const LinphoneProxyConfig *cfg){
-       return cfg->dial_escape_plus;
-}
-
-
-static bool_t is_a_phone_number(const char *username){
-       const char *p;
-       for(p=username;*p!='\0';++p){
-               if (isdigit(*p) || 
-                   *p==' ' ||
-                   *p=='-' ||
-                   *p==')' ||
-                       *p=='(' ||
-                       *p=='/' ||
-                       *p=='+') continue;
-               else return FALSE;
-       }
-       return TRUE;
-}
-
-static char *flatten_number(const char *number){
-       char *result=ms_malloc0(strlen(number)+1);
-       char *w=result;
-       const char *r;
-       for(r=number;*r!='\0';++r){
-               if (*r=='+' || isdigit(*r)){
-                       *w++=*r;
-               }
-       }
-       *w++='\0';
-       return result;
-}
-
-static void copy_result(const char *src, char *dest, size_t destlen, bool_t escape_plus){
-       int i=0;
-       
-       if (escape_plus && src[0]=='+' && destlen>2){
-               dest[0]='0';
-               dest[1]='0';
-               src++;
-               i=2;
-       }
-       
-       for(;i<destlen-1;++i){
-               dest[i]=*src;
-               src++;
-       }
-       dest[i]='\0';
-}
-
-
-static char *append_prefix(const char *number, const char *prefix){
-       char *res=ms_malloc(strlen(number)+strlen(prefix)+1);
-       strcpy(res,prefix);
-       return strcat(res,number);
-}
-
-int linphone_proxy_config_normalize_number(LinphoneProxyConfig *proxy, const char *username, char *result, size_t result_len){
-       char *flatten;
-       int numlen;
-       if (is_a_phone_number(username)){
-               flatten=flatten_number(username);
-               ms_message("Flattened number is '%s'",flatten);
-               numlen=strlen(flatten);
-               if (numlen>10 || flatten[0]=='+' || proxy->dial_prefix==NULL){
-                       ms_message("No need to add a prefix");
-                       /* prefix is already there */
-                       copy_result(flatten,result,result_len,proxy->dial_escape_plus);
-                       ms_free(flatten);
-                       return 0;
-               }else if (proxy->dial_prefix){
-                       char *prefixed;
-                       int skipped=0;
-                       ms_message("Need to prefix with %s",proxy->dial_prefix);
-                       if (numlen==10){
-                               /*remove initial number before prepending prefix*/
-                               skipped=1;
-                       }
-                       prefixed=append_prefix(flatten+skipped,proxy->dial_prefix);
-                       ms_free(flatten);
-                       copy_result(prefixed,result,result_len,proxy->dial_escape_plus);
-                       ms_free(prefixed);
-               }
-       }else strncpy(result,username,result_len);
-       return 0;
-}
-
-/**
- * Commits modification made to the proxy configuration.
-**/
-int linphone_proxy_config_done(LinphoneProxyConfig *obj)
-{
-       if (!linphone_proxy_config_check(obj->lc,obj)) return -1;
-       obj->commit=TRUE;
-       linphone_proxy_config_write_all_to_config_file(obj->lc);
-       return 0;
-}
-
-void linphone_proxy_config_set_realm(LinphoneProxyConfig *cfg, const char *realm)
-{
-       if (cfg->realm!=NULL) {
-               ms_free(cfg->realm);
-               cfg->realm=NULL;
-       }
-       if (realm!=NULL) cfg->realm=ms_strdup(realm);
-}
-
-int linphone_proxy_config_send_publish(LinphoneProxyConfig *proxy,
-                              LinphoneOnlineStatus presence_mode)
-{
-  osip_message_t *pub;
-  int i;
-  const char *from=NULL;
-  char buf[5000];
-
-  if (proxy->publish==FALSE) return 0;
-       
-  if (proxy!=NULL) {
-    from=linphone_proxy_config_get_identity(proxy);
-  }
-  if (from==NULL) from=linphone_core_get_primary_contact(proxy->lc);
-
-  if (presence_mode==LINPHONE_STATUS_ONLINE)
-    {
-      snprintf(buf, 5000, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
-<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
-          entity=\"%s\">\n\
-<tuple id=\"sg89ae\">\n\
-<status>\n\
-<basic>open</basic>\n\
-</status>\n\
-<contact priority=\"0.8\">%s</contact>\n\
-<note>online</note>\n\
-</tuple>\n\
-</presence>",
-              from, from);
-    }
-  else if (presence_mode==LINPHONE_STATUS_BUSY
-          ||presence_mode==LINPHONE_STATUS_NOT_DISTURB)
-    {
-      snprintf(buf, 5000, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
-<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
-          xmlns:es=\"urn:ietf:params:xml:ns:pidf:status:rpid-status\"\n\
-          entity=\"%s\">\n\
-<tuple id=\"sg89ae\">\n\
-<status>\n\
-<basic>open</basic>\n\
-<es:activities>\n\
-  <es:activity>busy</es:activity>\n\
-</es:activities>\n\
-</status>\n\
-<contact priority=\"0.8\">%s</contact>\n\
-<note>busy</note>\n\
-</tuple>\n\
-</presence>",
-             from, from);
-    }
-  else if (presence_mode==LINPHONE_STATUS_BERIGHTBACK)
-    {
-      snprintf(buf, 5000, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
-<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
-          xmlns:es=\"urn:ietf:params:xml:ns:pidf:status:rpid-status\"\n\
-          entity=\"%s\">\n\
-<tuple id=\"sg89ae\">\n\
-<status>\n\
-<basic>open</basic>\n\
-<es:activities>\n\
-  <es:activity>in-transit</es:activity>\n\
-</es:activities>\n\
-</status>\n\
-<contact priority=\"0.8\">%s</contact>\n\
-<note>be right back</note>\n\
-</tuple>\n\
-</presence>",
-             from,from);
-    }
-  else if (presence_mode==LINPHONE_STATUS_AWAY
-          ||presence_mode==LINPHONE_STATUS_MOVED
-          ||presence_mode==LINPHONE_STATUS_ALT_SERVICE)
-    {
-      snprintf(buf, 5000, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
-<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
-          xmlns:es=\"urn:ietf:params:xml:ns:pidf:status:rpid-status\"\n\
-          entity=\"%s\">\n\
-<tuple id=\"sg89ae\">\n\
-<status>\n\
-<basic>open</basic>\n\
-<es:activities>\n\
-  <es:activity>away</es:activity>\n\
-</es:activities>\n\
-</status>\n\
-<contact priority=\"0.8\">%s</contact>\n\
-<note>away</note>\n\
-</tuple>\n\
-</presence>",
-             from, from);
-    }
-  else if (presence_mode==LINPHONE_STATUS_ONTHEPHONE)
-    {
-      snprintf(buf, 5000, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
-<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
-          xmlns:es=\"urn:ietf:params:xml:ns:pidf:status:rpid-status\"\n\
-          entity=\"%s\">\n\
-<tuple id=\"sg89ae\">\n\
-<status>\n\
-<basic>open</basic>\n\
-<es:activities>\n\
-  <es:activity>on-the-phone</es:activity>\n\
-</es:activities>\n\
-</status>\n\
-<contact priority=\"0.8\">%s</contact>\n\
-<note>on the phone</note>\n\
-</tuple>\n\
-</presence>",
-             from, from);
-    }
-  else if (presence_mode==LINPHONE_STATUS_OUTTOLUNCH)
-    {
-      snprintf(buf, 5000, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
-<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
-          xmlns:es=\"urn:ietf:params:xml:ns:pidf:status:rpid-status\"\n\
-          entity=\"%s\">\n\
-<tuple id=\"sg89ae\">\n\
-<status>\n\
-<basic>open</basic>\n\
-<es:activities>\n\
-  <es:activity>meal</es:activity>\n\
-</es:activities>\n\
-</status>\n\
-<contact priority=\"0.8\">%s</contact>\n\
-<note>out to lunch</note>\n\
-</tuple>\n\
-</presence>",
-             from, from);
-    }
-  else if (presence_mode==LINPHONE_STATUS_OFFLINE)
-    {
-      /* */
-      snprintf(buf, 5000, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
-<presence xmlns=\"urn:ietf:params:xml:ns:pidf\"\n\
-xmlns:es=\"urn:ietf:params:xml:ns:pidf:status:rpid-status\"\n\
-entity=\"%s\">\n%s",
-             from,
-"<tuple id=\"sg89ae\">\n\
-<status>\n\
-<basic>closed</basic>\n\
-<es:activities>\n\
-  <es:activity>permanent-absence</e:activity>\n\
-</es:activities>\n\
-</status>\n\
-</tuple>\n\
-\n</presence>\n");
-    }
-
-  i = eXosip_build_publish(&pub, (char *)from, (char *)from, NULL, "presence", "1800", "application/pidf+xml", buf);
-
-  if (i<0)
-    {
-      ms_message("Failed to build publish request.");
-      return -1;
-    }
-
-  eXosip_lock();
-  i = eXosip_publish(pub, from); /* should update the sip-if-match parameter
-                                   from sip-etag  from last 200ok of PUBLISH */
-  eXosip_unlock();
-  if (i<0)
-    {
-      ms_message("Failed to send publish request.");
-      return -1;
-    }
-  return 0;
-}
-
-
-/**
- * Add a proxy configuration.
- * This will start registration on the proxy, if registration is enabled.
-**/
-int linphone_core_add_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *cfg){
-       if (!linphone_proxy_config_check(lc,cfg)) return -1;
-       lc->sip_conf.proxies=ms_list_append(lc->sip_conf.proxies,(void *)cfg);
-       linphone_proxy_config_apply(cfg,lc);
-       return 0;
-}
-
-extern void linphone_friend_check_for_removed_proxy(LinphoneFriend *lf, LinphoneProxyConfig *cfg);
-
-/**
- * Removes a proxy configuration.
- *
- * LinphoneCore will then automatically unregister and place the proxy configuration
- * on a deleted list. For that reason, a removed proxy does NOT need to be freed.
-**/
-void linphone_core_remove_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *cfg){
-       MSList *elem;
-       lc->sip_conf.proxies=ms_list_remove(lc->sip_conf.proxies,(void *)cfg);
-       /* add to the list of destroyed proxies, so that the possible unREGISTER request can succeed authentication */
-       lc->sip_conf.deleted_proxies=ms_list_append(lc->sip_conf.deleted_proxies,(void *)cfg);
-       /* this will unREGISTER */
-       linphone_proxy_config_edit(cfg);
-       if (lc->default_proxy==cfg){
-               lc->default_proxy=NULL;
-       }
-       /* invalidate all references to this proxy in our friend list */
-       for (elem=lc->friends;elem!=NULL;elem=ms_list_next(elem)){
-               linphone_friend_check_for_removed_proxy((LinphoneFriend*)elem->data,cfg);
-       }
-       
-}
-/**
- * Erase all proxies from config.
- *
- * @ingroup proxy
-**/
-void linphone_core_clear_proxy_config(LinphoneCore *lc){
-       MSList* list=ms_list_copy(linphone_core_get_proxy_config_list((const LinphoneCore*)lc));
-       for(;list!=NULL;list=list->next){
-               linphone_core_remove_proxy_config(lc,(LinphoneProxyConfig *)list->data);
-       }
-       ms_list_free(list);
-}
-/**
- * Sets the default proxy.
- *
- * This default proxy must be part of the list of already entered LinphoneProxyConfig.
- * Toggling it as default will make LinphoneCore use the identity associated with
- * the proxy configuration in all incoming and outgoing calls.
-**/
-void linphone_core_set_default_proxy(LinphoneCore *lc, LinphoneProxyConfig *config){
-       /* check if this proxy is in our list */
-       if (config!=NULL){
-               if (ms_list_find(lc->sip_conf.proxies,config)==NULL){
-                       ms_warning("Bad proxy address: it is not in the list !");
-                       lc->default_proxy=NULL;
-                       return ;
-               }
-       }
-       lc->default_proxy=config;
-       
-}      
-
-void linphone_core_set_default_proxy_index(LinphoneCore *lc, int index){
-       if (index<0) linphone_core_set_default_proxy(lc,NULL);
-       else linphone_core_set_default_proxy(lc,ms_list_nth_data(lc->sip_conf.proxies,index));
-}
-
-/**
- * Returns the default proxy configuration, that is the one used to determine the current identity.
-**/
-int linphone_core_get_default_proxy(LinphoneCore *lc, LinphoneProxyConfig **config){
-       int pos=-1;
-       if (config!=NULL) *config=lc->default_proxy;
-       if (lc->default_proxy!=NULL){
-               pos=ms_list_position(lc->sip_conf.proxies,ms_list_find(lc->sip_conf.proxies,(void *)lc->default_proxy));
-       }
-       return pos;
-}
-
-static int rid_compare(const void *pcfg,const void *prid){
-       const LinphoneProxyConfig *cfg=(const LinphoneProxyConfig*)pcfg;
-       const int *rid=(const int*)prid;
-       ms_message("cfg= %s, cfg->rid=%i, rid=%i",cfg->reg_proxy, cfg->rid, *rid);
-       return cfg->rid-(*rid);
-}
-
-LinphoneProxyConfig *linphone_core_get_proxy_config_from_rid(LinphoneCore *lc, int rid){
-       MSList *elem=ms_list_find_custom(lc->sip_conf.proxies,rid_compare, &rid);
-       if (elem==NULL){
-               ms_message("linphone_core_get_proxy_config_from_rid: searching in deleted proxies...");
-               elem=ms_list_find_custom(lc->sip_conf.deleted_proxies,rid_compare, &rid);
-       }
-       if (elem==NULL) return NULL;
-       else return (LinphoneProxyConfig*)elem->data;
-}
-
-/**
- * Returns an unmodifiable list of entered proxy configurations.
-**/
-const MSList *linphone_core_get_proxy_config_list(const LinphoneCore *lc){
-       return lc->sip_conf.proxies;
-}
-
-
-void linphone_proxy_config_process_authentication_failure(LinphoneCore *lc, eXosip_event_t *ev){
-       LinphoneProxyConfig *cfg=linphone_core_get_proxy_config_from_rid(lc, ev->rid);
-       if (cfg){
-               cfg->auth_failures++;
-               if (strcmp(ev->request->sip_method,"REGISTER")==0) {
-                       gstate_new_state(lc, GSTATE_REG_FAILED, "Authentication failed.");
-               }
-               /*restart a new register so that the user gets a chance to be prompted for a password*/
-               if (cfg->auth_failures==1){
-                       linphone_proxy_config_register(cfg);
-               }
-       }
-}
-
-void linphone_proxy_config_write_to_config_file(LpConfig *config, LinphoneProxyConfig *obj, int index)
-{
-       char key[50];
-
-       sprintf(key,"proxy_%i",index);
-       lp_config_clean_section(config,key);
-       if (obj==NULL){
-               return;
-       }
-       if (obj->type!=NULL){
-               lp_config_set_string(config,key,"type",obj->type);
-       }
-       if (obj->reg_proxy!=NULL){
-               lp_config_set_string(config,key,"reg_proxy",obj->reg_proxy);
-       }
-       if (obj->reg_route!=NULL){
-               lp_config_set_string(config,key,"reg_route",obj->reg_route);
-       }
-       if (obj->reg_identity!=NULL){
-               lp_config_set_string(config,key,"reg_identity",obj->reg_identity);
-       }
-       lp_config_set_int(config,key,"reg_expires",obj->expires);
-       lp_config_set_int(config,key,"reg_sendregister",obj->reg_sendregister);
-       lp_config_set_int(config,key,"publish",obj->publish);
-       lp_config_set_int(config,key,"dial_escape_plus",obj->dial_escape_plus);
-       lp_config_set_string(config,key,"dial_prefix",obj->dial_prefix);
-}
-
-
-
-LinphoneProxyConfig *linphone_proxy_config_new_from_config_file(LpConfig *config, int index)
-{
-       const char *tmp;
-       const char *identity;
-       const char *proxy;
-       LinphoneProxyConfig *cfg;
-       char key[50];
-       
-       sprintf(key,"proxy_%i",index);
-
-       if (!lp_config_has_section(config,key)){
-               return NULL;
-       }
-
-       cfg=linphone_proxy_config_new();
-
-       identity=lp_config_get_string(config,key,"reg_identity",NULL);  
-       proxy=lp_config_get_string(config,key,"reg_proxy",NULL);
-       
-       linphone_proxy_config_set_identity(cfg,identity);
-       linphone_proxy_config_set_server_addr(cfg,proxy);
-       
-       tmp=lp_config_get_string(config,key,"reg_route",NULL);
-       if (tmp!=NULL) linphone_proxy_config_set_route(cfg,tmp);
-
-       linphone_proxy_config_expires(cfg,lp_config_get_int(config,key,"reg_expires",600));
-       linphone_proxy_config_enableregister(cfg,lp_config_get_int(config,key,"reg_sendregister",0));
-       
-       linphone_proxy_config_enable_publish(cfg,lp_config_get_int(config,key,"publish",0));
-
-       linphone_proxy_config_set_dial_escape_plus(cfg,lp_config_get_int(config,key,"dial_escape_plus",0));
-       linphone_proxy_config_set_dial_prefix(cfg,lp_config_get_string(config,key,"dial_prefix",NULL));
-       
-       tmp=lp_config_get_string(config,key,"type",NULL);
-       if (tmp!=NULL && strlen(tmp)>0) 
-               linphone_proxy_config_set_sip_setup(cfg,tmp);
-
-       return cfg;
-}
-
-static void linphone_proxy_config_activate_sip_setup(LinphoneProxyConfig *cfg){
-       SipSetupContext *ssc;
-       SipSetup *ss=sip_setup_lookup(cfg->type);
-       LinphoneCore *lc=linphone_proxy_config_get_core(cfg);
-       unsigned int caps;
-       if (!ss) return ;
-       ssc=sip_setup_context_new(ss,cfg);
-       cfg->ssctx=ssc;
-       if (cfg->reg_identity==NULL){
-               ms_error("Invalid identity for this proxy configuration.");
-               return;
-       }
-       caps=sip_setup_context_get_capabilities(ssc);
-       if (caps & SIP_SETUP_CAP_ACCOUNT_MANAGER){
-               if (sip_setup_context_login_account(ssc,cfg->reg_identity,NULL)!=0){
-                       if (lc->vtable.display_warning){
-                               char *tmp=ms_strdup_printf(_("Could not login as %s"),cfg->reg_identity);
-                               lc->vtable.display_warning(lc,tmp);
-                               ms_free(tmp);
-                       }
-                       return;
-               }
-       }
-       if (caps & SIP_SETUP_CAP_PROXY_PROVIDER){
-               char proxy[256];
-               if (sip_setup_context_get_proxy(ssc,NULL,proxy,sizeof(proxy))==0){
-                       linphone_proxy_config_set_server_addr(cfg,proxy);
-               }else{
-                       ms_error("Could not retrieve proxy uri !");
-               }
-       }
-       
-}
-
-SipSetup *linphone_proxy_config_get_sip_setup(LinphoneProxyConfig *cfg){
-       if (cfg->ssctx!=NULL) return cfg->ssctx->funcs;
-       if (cfg->type!=NULL){
-               return sip_setup_lookup(cfg->type);
-       }
-       return NULL;
-}
-
-void linphone_proxy_config_update(LinphoneProxyConfig *cfg){
-       if (cfg->commit){
-               if (cfg->type && cfg->ssctx==NULL){
-                       linphone_proxy_config_activate_sip_setup(cfg);
-               }
-               linphone_proxy_config_register(cfg);
-               cfg->commit=FALSE;
-       }
-}
-
-void linphone_proxy_config_set_sip_setup(LinphoneProxyConfig *cfg, const char *type){
-       if (cfg->type)
-               ms_free(cfg->type);
-       cfg->type=ms_strdup(type);
-       if (linphone_proxy_config_get_addr(cfg)==NULL){
-               /*put a placeholder so that the sip setup gets saved into the config */
-               linphone_proxy_config_set_server_addr(cfg,"sip:undefined");
-       }
-}
-
-SipSetupContext *linphone_proxy_config_get_sip_setup_context(LinphoneProxyConfig *cfg){
-       return cfg->ssctx;
-}
-
-/**
- * @}
-**/
-
-LinphoneAccountCreator *linphone_account_creator_new(struct _LinphoneCore *core, const char *type){
-       LinphoneAccountCreator *obj;
-       LinphoneProxyConfig *cfg;
-       SipSetup *ss=sip_setup_lookup(type);
-       SipSetupContext *ssctx;
-       if (!ss){
-               return NULL;
-       }
-       if (!(sip_setup_get_capabilities(ss) & SIP_SETUP_CAP_ACCOUNT_MANAGER)){
-               ms_error("%s cannot manage accounts.");
-               return NULL;
-       }
-       obj=ms_new0(LinphoneAccountCreator,1);
-       cfg=linphone_proxy_config_new();
-       ssctx=sip_setup_context_new(ss,cfg);
-       obj->lc=core;
-       obj->ssctx=ssctx;
-       set_string(&obj->domain,sip_setup_context_get_domains(ssctx)[0]);
-       cfg->lc=core;
-       return obj;
-}
-
-void linphone_account_creator_set_username(LinphoneAccountCreator *obj, const char *username){
-       set_string(&obj->username,username);
-}
-
-void linphone_account_creator_set_password(LinphoneAccountCreator *obj, const char *password){
-       set_string(&obj->password,password);
-}
-
-void linphone_account_creator_set_domain(LinphoneAccountCreator *obj, const char *domain){
-       set_string(&obj->domain,domain);
-}
-
-const char * linphone_account_creator_get_username(LinphoneAccountCreator *obj){
-       return obj->username;
-}
-
-const char * linphone_account_creator_get_domain(LinphoneAccountCreator *obj){
-       return obj->domain;
-}
-
-int linphone_account_creator_test_existence(LinphoneAccountCreator *obj){
-       SipSetupContext *ssctx=obj->ssctx;
-       char *uri=ms_strdup_printf("%s@%s",obj->username,obj->domain);
-       int err=sip_setup_context_account_exists(ssctx,uri);
-       ms_free(uri);
-       return err;
-}
-
-LinphoneProxyConfig * linphone_account_creator_validate(LinphoneAccountCreator *obj){
-       SipSetupContext *ssctx=obj->ssctx;
-       char *uri=ms_strdup_printf("%s@%s",obj->username,obj->domain);
-       int err=sip_setup_context_create_account(ssctx,uri,obj->password);
-       ms_free(uri);
-       if (err==0) {
-               obj->succeeded=TRUE;
-               return sip_setup_context_get_proxy_config(ssctx);
-       }
-       return NULL;
-}
-
-void linphone_account_creator_destroy(LinphoneAccountCreator *obj){
-       if (obj->username)
-               ms_free(obj->username);
-       if (obj->password)
-               ms_free(obj->password);
-       if (obj->domain)
-               ms_free(obj->domain);
-       if (!obj->succeeded){
-               linphone_proxy_config_destroy(sip_setup_context_get_proxy_config(obj->ssctx));
-       }
-}
-
-
-
diff --git a/linphone/coreapi/sdphandler.c b/linphone/coreapi/sdphandler.c
deleted file mode 100644 (file)
index 8902172..0000000
+++ /dev/null
@@ -1,689 +0,0 @@
-/*
-  * Linphone is sip (RFC3261) compatible internet phone.
-  * 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 "sdphandler.h"
-#include <osipparser2/osip_port.h>
-#include <osipparser2/sdp_message.h>
-#include <eXosip2/eXosip.h>
-#include "linphonecore.h"
-#include "ortp/b64.h"
-
-#define keywordcmp(key,str)  strncmp(key,str,strlen(key))
-
-
-#define sstrdup_sprintf ms_strdup_printf
-
-#define eXosip_trace(loglevel,args)  do        \
-{                       \
-       char *__strmsg;  \
-       __strmsg=ms_strdup_printf args ;    \
-       OSIP_TRACE(osip_trace(__FILE__,__LINE__,(loglevel),NULL,"%s\n",__strmsg)); \
-       osip_free (__strmsg);        \
-}while (0);
-
-
-static char *make_relay_session_id(const char *username, const char *relay){
-       /*ideally this should be a hash of the parameters with a random part*/
-       char tmp[128];
-       int s1=(int)random();
-       int s2=(int)random();
-       long long int res=((long long int)s1)<<32 | (long long int) s2;
-       void *src=&res;
-       b64_encode(src, sizeof(long long int), tmp, sizeof(tmp));
-       return osip_strdup(tmp);
-}
-
-char * int_2char(int a){
-       char *p=osip_malloc(16);
-       snprintf(p,16,"%i",a);
-       return p;
-}
-
-/* return the value of attr "field" for payload pt at line pos (field=rtpmap,fmtp...)*/
-char *sdp_message_a_attr_value_get_with_pt(sdp_message_t *sdp,int pos,int pt,const char *field)
-{
-       int i,tmppt=0,scanned=0;
-       char *tmp;
-       sdp_attribute_t *attr;
-       for (i=0;(attr=sdp_message_attribute_get(sdp,pos,i))!=NULL;i++){
-               if (keywordcmp(field,attr->a_att_field)==0 && attr->a_att_value!=NULL){
-                       int nb = sscanf(attr->a_att_value,"%i %n",&tmppt,&scanned);
-                       /* the return value may depend on how %n is interpreted by the libc: see manpage*/
-                       if (nb == 1 || nb==2 ){
-                               if (pt==tmppt){
-                                       tmp=attr->a_att_value+scanned;
-                                       if (strlen(tmp)>0)
-                                               return tmp;
-                               }
-                       }else eXosip_trace(OSIP_WARNING,("sdp has a strange a= line (%s) nb=%i",attr->a_att_value,nb));
-               }
-       }
-       return NULL;
-}
-
-/* return the value of attr "field" */
-char *sdp_message_a_attr_value_get(sdp_message_t *sdp,int pos,const char *field)
-{
-       int i;
-       sdp_attribute_t *attr;
-       for (i=0;(attr=sdp_message_attribute_get(sdp,pos,i))!=NULL;i++){
-               if (keywordcmp(field,attr->a_att_field)==0 && attr->a_att_value!=NULL){
-                       return attr->a_att_value;
-               }
-       }
-       return NULL;
-}
-
-static int _sdp_message_get_a_ptime(sdp_message_t *sdp, int mline){
-       int i,ret;
-       sdp_attribute_t *attr;
-       for (i=0;(attr=sdp_message_attribute_get(sdp,mline,i))!=NULL;i++){
-               if (keywordcmp("ptime",attr->a_att_field)==0){
-                       int nb = sscanf(attr->a_att_value,"%i",&ret);
-                       /* the return value may depend on how %n is interpreted by the libc: see manpage*/
-                       if (nb == 1){
-                               return ret;
-                       }else eXosip_trace(OSIP_WARNING,("sdp has a strange a=ptime line (%s) ",attr->a_att_value));
-               }
-       }
-       return 0;
-}
-
-int
-sdp_payload_init (sdp_payload_t * payload)
-{
-       memset (payload, 0, sizeof (sdp_payload_t));
-       return 0;
-}
-
-sdp_context_t *sdp_handler_create_context(sdp_handler_t *handler, const char *localip, const char *username, const char *relay){
-       sdp_context_t *ctx=osip_malloc(sizeof(sdp_context_t));
-       memset(ctx,0,sizeof(sdp_context_t));
-       if (localip!=NULL) ctx->localip=osip_strdup(localip);
-       ctx->username=osip_strdup(username);
-       ctx->handler=handler;
-       if (relay){
-               ctx->relay=osip_strdup(relay);
-               ctx->relay_session_id=make_relay_session_id(username,relay);
-       }
-       return ctx;
-}
-
-void sdp_context_set_user_pointer(sdp_context_t * ctx, void* up){
-       ctx->reference=up;
-}
-
-void *sdp_context_get_user_pointer(sdp_context_t * ctx){
-       return ctx->reference;
-}
-
-int sdp_context_get_status(sdp_context_t* ctx){
-       return ctx->negoc_status;
-}
-
-/* generate a template sdp */
-sdp_message_t *
-sdp_context_generate_template (sdp_context_t * ctx)
-{
-       sdp_message_t *local;
-       int inet6;
-
-       sdp_message_init (&local);
-       if (strchr(ctx->localip,':')!=NULL){
-               inet6=1;
-       }else inet6=0;
-       if (!inet6){
-               sdp_message_v_version_set (local, osip_strdup ("0"));
-               sdp_message_o_origin_set (local, osip_strdup (ctx->username),
-                                 osip_strdup ("123456"), osip_strdup ("654321"),
-                                 osip_strdup ("IN"), osip_strdup ("IP4"),
-                                 osip_strdup (ctx->localip));
-               sdp_message_s_name_set (local, osip_strdup ("A conversation"));
-               sdp_message_c_connection_add (local, -1,
-                                     osip_strdup ("IN"), osip_strdup ("IP4"),
-                                     osip_strdup (ctx->localip), NULL, NULL);
-               sdp_message_t_time_descr_add (local, osip_strdup ("0"), osip_strdup ("0"));
-       }else{
-               sdp_message_v_version_set (local, osip_strdup ("0"));
-               sdp_message_o_origin_set (local, osip_strdup (ctx->username),
-                                 osip_strdup ("123456"), osip_strdup ("654321"),
-                                 osip_strdup ("IN"), osip_strdup ("IP6"),
-                                 osip_strdup (ctx->localip));
-               sdp_message_s_name_set (local, osip_strdup ("A conversation"));
-               sdp_message_c_connection_add (local, -1,
-                                     osip_strdup ("IN"), osip_strdup ("IP6"),
-                                     osip_strdup (ctx->localip), NULL, NULL);
-               sdp_message_t_time_descr_add (local, osip_strdup ("0"), osip_strdup ("0"));
-       }
-       return local;
-}
-
-static void add_relay_info(sdp_message_t *sdp, int mline, const char *relay, const char *relay_session_id){
-
-       if (relay) sdp_message_a_attribute_add(sdp, mline,
-                                    osip_strdup ("relay-addr"),osip_strdup(relay));
-       if (relay_session_id) sdp_message_a_attribute_add(sdp, mline,
-                                    osip_strdup ("relay-session-id"), osip_strdup(relay_session_id));
-}
-
-/* to add payloads to the offer, must be called inside the write_offer callback */
-void
-sdp_context_add_payload (sdp_context_t * ctx, sdp_payload_t * payload, char *media)
-{
-       sdp_message_t *offer = ctx->offer;
-       char *attr_field;
-       if (!ctx->incb)
-       {
-               eXosip_trace (OSIP_ERROR,
-                           ("You must not call sdp_context_add_*_payload outside the write_offer callback\n"));
-#if !defined(_WIN32_WCE)
-                               abort();
-#else
-                               exit(-1);
-#endif /*_WIN32_WCE*/
-
-       }
-       if (payload->proto == NULL)
-               payload->proto = "RTP/AVP";
-       /*printf("payload->line=%i payload->pt=%i\n",payload->line, payload->pt);*/
-       if (sdp_message_m_media_get (offer, payload->line) == NULL)
-       {
-               /*printf("Adding new mline %s \n",media);*/
-               /* need a new line */
-               sdp_message_m_media_add (offer, osip_strdup (media),
-                                int_2char (payload->localport), NULL,
-                                osip_strdup (payload->proto));
-               if (ctx->relay){
-                       add_relay_info(offer,payload->line,ctx->relay,ctx->relay_session_id);
-               }
-       }
-       sdp_message_m_payload_add (offer, payload->line, int_2char (payload->pt));
-       if (payload->a_rtpmap != NULL)
-       {
-               attr_field =
-                       sstrdup_sprintf ("%i %s", payload->pt,
-                                        payload->a_rtpmap);
-               sdp_message_a_attribute_add (offer, payload->line,
-                                    osip_strdup ("rtpmap"), attr_field);
-       }
-       if (payload->a_fmtp != NULL)
-       {
-               attr_field =
-                       sstrdup_sprintf ("%i %s", payload->pt,
-                                        payload->a_fmtp);
-               sdp_message_a_attribute_add (offer, payload->line, osip_strdup ("fmtp"),
-                                    attr_field);
-       }
-       if (payload->b_as_bandwidth != 0)
-       {
-               if (sdp_message_bandwidth_get(offer,payload->line,0)==NULL){
-                       attr_field =
-                       sstrdup_sprintf ("%i", payload->b_as_bandwidth);
-                       sdp_message_b_bandwidth_add (offer, payload->line, osip_strdup ("AS"),
-                                    attr_field);
-               }
-       }
-}
-
-void
-sdp_context_add_audio_payload (sdp_context_t * ctx, sdp_payload_t * payload)
-{
-       sdp_context_add_payload (ctx, payload, "audio");
-}
-
-void
-sdp_context_add_video_payload (sdp_context_t * ctx, sdp_payload_t * payload)
-{
-       sdp_context_add_payload (ctx, payload, "video");
-}
-
-char *
-sdp_context_get_offer ( sdp_context_t * ctx)
-{
-       sdp_message_t *offer;
-       sdp_handler_t *sdph=ctx->handler;
-       char *tmp;
-
-       offer = sdp_context_generate_template (ctx);
-       /* add audio codecs */
-       ctx->offer = offer;
-       ctx->incb = 1;
-       if (sdph->set_audio_codecs != NULL)
-               sdph->set_audio_codecs (ctx);
-       if (sdph->set_video_codecs != NULL)
-               sdph->set_video_codecs (ctx);
-       ctx->incb = 0;
-       sdp_message_to_str(offer,&tmp);
-       ctx->offerstr=tmp;
-       return tmp;
-}
-
-
-/* refuse the line */
-static void refuse_mline(sdp_message_t *answer,char *mtype,char *proto, int mline)
-{
-       sdp_message_m_media_add (answer,
-                                                        osip_strdup (mtype),
-                                                        int_2char (0), NULL,
-                                                        osip_strdup (proto));
-       /* add a payload just to comply with sdp RFC.*/
-       sdp_message_m_payload_add(answer,mline,int_2char(0));
-}
-
-static char * parse_relay_addr(char *addr, int *port)
-{
-       char *semicolon=NULL;
-       char *p;
-
-       *port=56789;
-       semicolon=strchr(addr,':');
-       for (p=addr+strlen(addr)-1;p>addr;p--){
-               if (*p==':') {
-                       semicolon=p;
-                       break;
-               }
-       }
-       if (semicolon){
-               *port=atoi(semicolon+1);
-               *semicolon='\0';
-       }
-       return addr;
-}
-
-
-char *
-sdp_context_get_answer ( sdp_context_t *ctx,sdp_message_t *remote)
-{
-       sdp_message_t *answer=NULL;
-       char *mtype=NULL, *tmp=NULL;
-       char *proto=NULL, *port=NULL, *pt=NULL;
-       int i, j, ncodec, m_lines_accepted = 0;
-       int err;
-       sdp_payload_t payload;
-       sdp_payload_t init_payload;
-       sdp_handler_t *sdph=ctx->handler;
-       sdp_bandwidth_t *sbw=NULL;
-       char *relay;
-
-       tmp = sdp_message_c_addr_get (remote, 0, 0);
-       if (tmp == NULL)
-         tmp = sdp_message_c_addr_get (remote, -1, 0);
-       if (ctx->localip==NULL) {
-               /* NULL means guess, otherwise we use the address given as localip */
-               ctx->localip=osip_malloc(128);
-               eXosip_guess_localip(strchr(tmp,':') ?  AF_INET6 : AF_INET,ctx->localip,128);
-       }
-       else eXosip_trace(OSIP_INFO1,("Using firewall address in sdp."));
-
-       answer = sdp_context_generate_template (ctx);
-
-       /* for each m= line */
-       for (i = 0; !sdp_message_endof_media (remote, i); i++){
-               sdp_payload_init(&init_payload);
-               mtype = sdp_message_m_media_get (remote, i);
-               proto = sdp_message_m_proto_get (remote, i);
-               port = sdp_message_m_port_get (remote, i);
-               init_payload.remoteport = osip_atoi (port);
-               init_payload.proto = proto;
-               init_payload.line = i;
-               init_payload.c_addr = sdp_message_c_addr_get (remote, i, 0);
-               if (init_payload.c_addr == NULL)
-                       init_payload.c_addr = sdp_message_c_addr_get (remote, -1, 0);
-               /*parse relay address if given*/
-               relay=sdp_message_a_attr_value_get(remote,i,"relay-addr");
-               if (relay){
-                       init_payload.relay_host=parse_relay_addr(relay,&init_payload.relay_port);
-               }
-               init_payload.relay_session_id=sdp_message_a_attr_value_get(remote,i,"relay-session-id");
-               /* get application specific bandwidth, if any */
-               for(j=0;(sbw=sdp_message_bandwidth_get(remote,i,j))!=NULL;j++){
-                       if (strcasecmp(sbw->b_bwtype,"AS")==0) init_payload.b_as_bandwidth=atoi(sbw->b_bandwidth);
-               }
-               init_payload.a_ptime=_sdp_message_get_a_ptime(remote,i);
-               if (keywordcmp ("audio", mtype) == 0)
-               {
-                       if (sdph->accept_audio_codecs != NULL)
-                       {
-                               ncodec = 0;
-                               /* for each payload type */
-                               for (j = 0;
-                                    ((pt =
-                                      sdp_message_m_payload_get (remote, i,
-                                                         j)) != NULL); j++)
-                               {
-                                       memcpy(&payload,&init_payload,sizeof(payload));
-                                       payload.pt = osip_atoi (pt);
-                                       /* get the rtpmap associated to this codec, if any */
-                                       payload.a_rtpmap =
-                                               sdp_message_a_attr_value_get_with_pt
-                                               (remote, i, payload.pt,
-                                                "rtpmap");
-                                       /* get the fmtp, if any */
-                                       payload.a_fmtp =
-                                               sdp_message_a_attr_value_get_with_pt
-                                               (remote, i, payload.pt,
-                                                "fmtp");
-
-                                       /* ask the application if this codec is supported */
-                                       err = sdph->accept_audio_codecs (ctx,
-                                                                        &payload);
-                                       if (err == 0)
-                                       {
-                                               ncodec++;
-                                               /* codec accepted */
-                                               if (ncodec == 1)
-                                               {
-                                                       /* first codec accepted, setup the line  */
-                                                       sdp_message_m_media_add
-                                                               (answer,
-                                                                osip_strdup
-                                                                (mtype),
-                                                                int_2char
-                                                                (payload.
-                                                                 localport),
-                                                                NULL,
-                                                                osip_strdup
-                                                                (proto));
-                                                       /* and accept the remote relay addr if we planned to use our own */
-                                                       if (ctx->relay!=NULL && relay){
-                                                               add_relay_info(answer,i,relay,payload.relay_session_id);
-                                                       }
-                                               }
-                                               /* add the payload, rtpmap, fmtp */
-                                               sdp_message_m_payload_add (answer, i,
-                                                                  int_2char
-                                                                  (payload.
-                                                                   pt));
-                                               if (payload.a_rtpmap != NULL)
-                                               {
-                                                       sdp_message_a_attribute_add
-                                                               (answer, i,
-                                                                osip_strdup
-                                                                ("rtpmap"),
-                                                                sstrdup_sprintf
-                                                                ("%i %s",
-                                                                 payload.pt,
-                                                                 payload.
-                                                                 a_rtpmap));
-                                               }
-                                               if (payload.a_fmtp != NULL)
-                                               {
-                                                       sdp_message_a_attribute_add
-                                                               (answer, i,
-                                                                osip_strdup
-                                                                ("fmtp"),
-                                                                sstrdup_sprintf
-                                                                ("%i %s",
-                                                                 payload.pt,
-                                                                 payload.
-                                                                 a_fmtp));
-                                               }
-                                               if (payload.b_as_bandwidth !=
-                                                   0)
-                                               {
-                                                       if (sdp_message_bandwidth_get(answer,i,0)==NULL)
-                                                               sdp_message_b_bandwidth_add
-                                                               (answer, i,
-                                                                osip_strdup
-                                                                ("AS"),
-                                                                sstrdup_sprintf
-                                                                ("%i",
-                                                                 payload.
-                                                                 b_as_bandwidth));
-                                               }
-                                       }
-                               }
-                               if (ncodec == 0)
-                               {
-                                       /* refuse the line */
-                                       refuse_mline(answer,mtype,proto,i);
-
-                               }
-                               else
-                                       m_lines_accepted++;
-                       }
-                       else
-                       {
-                               /* refuse this line (leave port to 0) */
-                               refuse_mline(answer,mtype,proto,i);
-                       }
-
-               }
-               else if (keywordcmp ("video", mtype) == 0)
-               {
-                       if (sdph->accept_video_codecs != NULL)
-                       {
-                               ncodec = 0;
-                               /* for each payload type */
-                               for (j = 0;
-                                    ((pt =
-                                      sdp_message_m_payload_get (remote, i,
-                                                         j)) != NULL); j++)
-                               {
-                                       memcpy(&payload,&init_payload,sizeof(payload));
-                                       payload.pt = osip_atoi (pt);
-                                       /* get the rtpmap associated to this codec, if any */
-                                       payload.a_rtpmap =
-                                               sdp_message_a_attr_value_get_with_pt
-                                               (remote, i, payload.pt,
-                                                "rtpmap");
-                                       /* get the fmtp, if any */
-                                       payload.a_fmtp =
-                                               sdp_message_a_attr_value_get_with_pt
-                                               (remote, i, payload.pt,
-                                                "fmtp");
-                                       /* ask the application if this codec is supported */
-                                       err = sdph->accept_video_codecs (ctx,
-                                                                        &payload);
-                                       if (err == 0 )
-                                       {
-                                               ncodec++;
-                                               /* codec accepted */
-                                               if (ncodec == 1)
-                                               {
-                                                       /* first codec accepted, setup the line  */
-                                                       sdp_message_m_media_add
-                                                               (answer,
-                                                                osip_strdup
-                                                                (mtype),
-                                                                int_2char
-                                                                (payload.localport), NULL,
-                                                                osip_strdup
-                                                                (proto));
-                                                       /* and accept the remote relay addr if we planned to use our own */
-                                                       if (ctx->relay!=NULL && relay){
-                                                               add_relay_info(answer,i,relay,payload.relay_session_id);
-                                                       }
-                                               }
-                                               /* add the payload, rtpmap, fmtp */
-                                               sdp_message_m_payload_add (answer, i,
-                                                                  int_2char
-                                                                  (payload.
-                                                                   pt));
-                                               if (payload.a_rtpmap != NULL)
-                                               {
-                                                       sdp_message_a_attribute_add
-                                                               (answer, i,
-                                                                osip_strdup
-                                                                ("rtpmap"),
-                                                                sstrdup_sprintf
-                                                                ("%i %s",
-                                                                 payload.pt,
-                                                                 payload.
-                                                                 a_rtpmap));
-                                               }
-                                               if (payload.a_fmtp != NULL)
-                                               {
-                                                       sdp_message_a_attribute_add
-                                                               (answer, i,
-                                                                osip_strdup
-                                                                ("fmtp"),
-                                                                sstrdup_sprintf
-                                                                ("%i %s",
-                                                                 payload.pt,
-                                                                 payload.
-                                                                 a_fmtp));
-                                               }
-                                               if (payload.b_as_bandwidth !=0)
-                                               {
-                                                       if (sdp_message_bandwidth_get(answer,i,0)==NULL)
-                                                               sdp_message_b_bandwidth_add
-                                                               (answer, i,
-                                                                osip_strdup
-                                                                ("AS"),
-                                                                sstrdup_sprintf
-                                                                ("%i",
-                                                                 payload.
-                                                                 b_as_bandwidth));
-                                               }
-                                       }
-                               }
-                               if (ncodec == 0)
-                               {
-                                       /* refuse the line */
-                                       refuse_mline(answer,mtype,proto,i);
-                               }
-                               else
-                                       m_lines_accepted++;
-                       }
-                       else
-                       {
-                               /* refuse the line */
-                               refuse_mline(answer,mtype,proto,i);
-                       }
-               }
-       }
-       if (ctx->answer!=NULL)
-               sdp_message_free(ctx->answer);
-       ctx->answer = answer;
-       if (m_lines_accepted > 0){
-               ctx->negoc_status = 200;
-               sdp_message_to_str(answer,&tmp);
-               if (ctx->answerstr!=NULL)
-                       osip_free(ctx->answerstr);
-               ctx->answerstr=tmp;
-               return tmp;
-       }else{
-               ctx->negoc_status = 415;
-               return NULL;
-       }
-}
-
-void
-sdp_context_read_answer (sdp_context_t *ctx, sdp_message_t *remote)
-{
-       char *mtype;
-       char *proto, *port, *pt;
-       int i, j,err;
-       char *relay;
-       sdp_payload_t payload,arg_payload;
-       sdp_handler_t *sdph=ctx->handler;
-       sdp_bandwidth_t *sbw=NULL;
-       /* for each m= line */
-       for (i = 0; !sdp_message_endof_media (remote, i); i++)
-       {
-               sdp_payload_init(&payload);
-               mtype = sdp_message_m_media_get (remote, i);
-               proto = sdp_message_m_proto_get (remote, i);
-               port = sdp_message_m_port_get (remote, i);
-               payload.remoteport = osip_atoi (port);
-               payload.localport = osip_atoi (sdp_message_m_port_get (ctx->offer, i));
-               payload.proto = proto;
-               payload.line = i;
-               payload.c_addr = sdp_message_c_addr_get (remote, i, 0);
-               if (payload.c_addr == NULL)
-                       payload.c_addr = sdp_message_c_addr_get (remote, -1, 0);
-               /*parse relay address if given*/
-               relay=sdp_message_a_attr_value_get(remote,i,"relay-addr");
-               if (relay){
-                       payload.relay_host=parse_relay_addr(relay,&payload.relay_port);
-               }
-               payload.relay_session_id=sdp_message_a_attr_value_get(remote,i,"relay-session-id");
-               for(j=0;(sbw=sdp_message_bandwidth_get(remote,i,j))!=NULL;++j){
-                       if (strcasecmp(sbw->b_bwtype,"AS")==0) payload.b_as_bandwidth=atoi(sbw->b_bandwidth);
-               }
-               payload.a_ptime=_sdp_message_get_a_ptime(remote,i);
-               if (keywordcmp ("audio", mtype) == 0)
-               {
-                       if (sdph->get_audio_codecs != NULL)
-                       {
-                               /* for each payload type */
-                               for (j = 0;
-                                    ((pt =
-                                      sdp_message_m_payload_get (remote, i,
-                                                         j)) != NULL); j++)
-                               {
-                                       payload.pt = osip_atoi (pt);
-                                       /* get the rtpmap associated to this codec, if any */
-                                       payload.a_rtpmap =
-                                               sdp_message_a_attr_value_get_with_pt
-                                               (remote, i, payload.pt,
-                                                "rtpmap");
-                                       /* get the fmtp, if any */
-                                       payload.a_fmtp =
-                                               sdp_message_a_attr_value_get_with_pt
-                                               (remote, i, payload.pt,
-                                                "fmtp");
-                                       /* ask the application if this codec is supported */
-                                       memcpy(&arg_payload,&payload,sizeof(payload));
-                                       err = sdph->get_audio_codecs (ctx,
-                                                                     &arg_payload);
-                               }
-                       }
-               }
-               else if (keywordcmp ("video", mtype) == 0)
-               {
-                       if (sdph->get_video_codecs != NULL)
-                       {
-                               /* for each payload type */
-                               for (j = 0;
-                                    ((pt =
-                                      sdp_message_m_payload_get (remote, i,
-                                                         j)) != NULL); j++)
-                               {
-                                       payload.pt = osip_atoi (pt);
-                                       /* get the rtpmap associated to this codec, if any */
-                                       payload.a_rtpmap =
-                                               sdp_message_a_attr_value_get_with_pt
-                                               (remote, i, payload.pt,
-                                                "rtpmap");
-                                       /* get the fmtp, if any */
-                                       payload.a_fmtp =
-                                               sdp_message_a_attr_value_get_with_pt
-                                               (remote, i, payload.pt,
-                                                "fmtp");
-                                       /* ask the application if this codec is supported */
-                                       memcpy(&arg_payload,&payload,sizeof(payload));
-                                       err = sdph->get_video_codecs (ctx,
-                                                                        &arg_payload);
-                               }
-                       }
-               }
-       }
-}
-void sdp_context_free(sdp_context_t *ctx){
-       osip_free(ctx->localip);
-       osip_free(ctx->username);
-       if (ctx->offer!=NULL) sdp_message_free(ctx->offer);
-       if (ctx->answer!=NULL) sdp_message_free(ctx->answer);
-       if (ctx->offerstr!=NULL) osip_free(ctx->offerstr);
-       if (ctx->answerstr!=NULL) osip_free(ctx->answerstr);
-       if (ctx->relay!=NULL) osip_free(ctx->relay);
-       if (ctx->relay_session_id!=NULL) osip_free(ctx->relay_session_id);
-       osip_free(ctx);
-}
diff --git a/linphone/coreapi/sdphandler.h b/linphone/coreapi/sdphandler.h
deleted file mode 100644 (file)
index b3e811b..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
- /*
-  * Linphone is sip (RFC3261) compatible internet phone.
-  * 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 SDP_HANDLER_H
-#define SDP_HANDLER_H
-
-#include <osipparser2/sdp_message.h>
-#include "linphonecore.h"
-
-typedef struct _sdp_payload
-{
-       int line;       /* the index of the m= line */
-       int pt;         /*payload type */
-       int localport;
-       int remoteport;
-       int b_as_bandwidth;     /* application specific bandwidth */
-       char *proto;
-       char *c_nettype;
-       char *c_addrtype;
-       char *c_addr;
-       char *c_addr_multicast_ttl;
-       char *c_addr_multicast_int;
-       char *a_rtpmap;
-       char *a_fmtp;
-       char *relay_host;
-       int relay_port;
-       char *relay_session_id;
-       int a_ptime;
-} sdp_payload_t;
-
-typedef struct _sdp_context sdp_context_t;
-
-typedef int (*sdp_handler_read_codec_func_t) (struct _sdp_context *,
-                                                                                       sdp_payload_t *);
-typedef int (*sdp_handler_write_codec_func_t) (struct _sdp_context *);
-
-typedef struct _sdp_handler
-{
-       sdp_handler_read_codec_func_t accept_audio_codecs;   /*from remote sdp */
-       sdp_handler_read_codec_func_t accept_video_codecs;   /*from remote sdp */
-       sdp_handler_write_codec_func_t set_audio_codecs;        /*to local sdp */
-       sdp_handler_write_codec_func_t set_video_codecs;        /*to local sdp */
-       sdp_handler_read_codec_func_t get_audio_codecs; /*from incoming answer  */
-       sdp_handler_read_codec_func_t get_video_codecs; /*from incoming answer  */
-} sdp_handler_t;
-
-
-typedef enum _sdp_context_state
-{
-       SDP_CONTEXT_STATE_INIT,
-       SDP_CONTEXT_STATE_NEGOCIATION_OPENED,
-       SDP_CONTEXT_STATE_NEGOCIATION_CLOSED
-} sdp_context_state_t;
-
-struct _sdp_context
-{
-       sdp_handler_t *handler;
-       char *localip;
-       char *username;
-       void *reference;
-       sdp_message_t *offer;           /* the local sdp to be used for outgoing request */
-       char *offerstr;
-       sdp_message_t *answer;          /* the local sdp generated from an inc request */
-       char *answerstr;
-       char *relay;
-       char *relay_session_id;
-       int negoc_status;       /* in sip code */
-       int incb;
-       sdp_context_state_t state;
-};
-
-/* create a context for a sdp negociation: localip is the ip address to be used in the sdp message, can
-be a firewall address.
-It can be null when negociating for an incoming offer; In that case it will be guessed. */
-sdp_context_t *sdp_handler_create_context(sdp_handler_t *handler, const char *localip, const char *username, const char *relay);
-void sdp_context_set_user_pointer(sdp_context_t * ctx, void* up);
-void *sdp_context_get_user_pointer(sdp_context_t * ctx);
-void sdp_context_add_audio_payload( sdp_context_t * ctx, sdp_payload_t * payload);
-void sdp_context_add_video_payload( sdp_context_t * ctx, sdp_payload_t * payload);
-char * sdp_context_get_offer(sdp_context_t *ctx);
-char * sdp_context_get_answer(sdp_context_t* ctx, sdp_message_t *remote_offer);
-int sdp_context_get_status(sdp_context_t* ctx);
-void sdp_context_read_answer(sdp_context_t *ctx, sdp_message_t *remote_answer);
-void sdp_context_free(sdp_context_t *ctx);
-
-int sdp_payload_init (sdp_payload_t * payload);
-#endif
diff --git a/linphone/coreapi/siplogin.c b/linphone/coreapi/siplogin.c
deleted file mode 100644 (file)
index 528e3f3..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
-linphone
-Copyright (C) 2009  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#ifdef HAVE_CONFIG_H
-#include "../config.h"
-#endif
-
-#include "linphonecore.h"
-#include <ctype.h>
-
-static void sip_login_init_instance(SipSetupContext *ctx){
-       LinphoneProxyConfig *cfg=sip_setup_context_get_proxy_config(ctx);
-       /*disable registration until the user logs in*/
-       linphone_proxy_config_enable_register(cfg,FALSE);
-}
-
-static void guess_display_name(LinphoneAddress *from){
-       char *dn=(char*)ms_malloc(strlen(linphone_address_get_username(from))+3);
-       const char *it;
-       char *wptr=dn;
-       bool_t begin=TRUE;
-       bool_t surname=0;
-       for(it=linphone_address_get_username(from);*it!='\0';++it){
-               if (begin){
-                       *wptr=toupper(*it);
-                       begin=FALSE;
-               }else if (*it=='.'){
-                       if (surname) break;
-                       *wptr=' ';
-                       begin=TRUE;
-                       surname=TRUE;
-               }else *wptr=*it;
-               wptr++;
-       }
-       linphone_address_set_display_name(from,dn);
-       ms_free(dn);
-}
-
-static int sip_login_do_login(SipSetupContext * ctx, const char *uri, const char *passwd){
-       LinphoneProxyConfig *cfg=sip_setup_context_get_proxy_config(ctx);
-       LinphoneCore *lc=linphone_proxy_config_get_core(cfg);
-       LinphoneAuthInfo *auth;
-       LinphoneAddress *parsed_uri;
-       char *tmp;
-
-       parsed_uri=linphone_address_new(uri);
-       if (parsed_uri==NULL){
-               return -1;
-       }
-       if (linphone_address_get_display_name(parsed_uri)!=NULL){
-               guess_display_name(parsed_uri);
-       }
-       tmp=linphone_address_as_string(parsed_uri);
-       linphone_proxy_config_set_identity(cfg,tmp);
-       if (passwd ) {
-               auth=linphone_auth_info_new(linphone_address_get_username(parsed_uri),NULL,passwd,NULL,NULL);
-               linphone_core_add_auth_info(lc,auth);
-       }
-       linphone_proxy_config_enable_register(cfg,TRUE);
-       linphone_proxy_config_done(cfg);
-       ms_free(tmp);
-       linphone_address_destroy(parsed_uri);
-       ms_message("SipLogin: done");
-       return 0;
-}
-
-static int sip_login_do_logout(SipSetupContext * ctx){
-       LinphoneProxyConfig *cfg=sip_setup_context_get_proxy_config(ctx);
-       linphone_proxy_config_enable_register(cfg,FALSE);
-       linphone_proxy_config_done(cfg);
-       return 0;
-}
-
-/* a simple SipSetup built-in plugin to allow specify the user/password for proxy config at runtime*/
-
-#ifndef _MSC_VER
-
-SipSetup linphone_sip_login={
-       .name="SipLogin",
-       .capabilities=SIP_SETUP_CAP_LOGIN,
-       .init_instance=sip_login_init_instance,
-       .login_account=sip_login_do_login,
-       .logout_account=sip_login_do_logout
-};
-
-#else
-SipSetup linphone_sip_login={
-       "SipLogin",
-       SIP_SETUP_CAP_LOGIN,
-       0,
-       NULL,
-       NULL,
-       sip_login_init_instance,
-       NULL,
-       NULL,
-       NULL,
-       sip_login_do_login,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       sip_login_do_logout
-};
-
-
-
-#endif
diff --git a/linphone/coreapi/sipsetup.c b/linphone/coreapi/sipsetup.c
deleted file mode 100644 (file)
index 270737d..0000000
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
-linphone
-Copyright (C) 2009  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#ifdef HAVE_CONFIG_H
-#include "../config.h"
-#endif
-
-#include "linphonecore.h"
-
-extern SipSetup linphone_sip_login;
-
-static SipSetup *all_sip_setups[]={
-       &linphone_sip_login,
-       NULL
-};
-
-static MSList *registered_sip_setups=NULL;
-
-void sip_setup_register(SipSetup *ss){
-       registered_sip_setups=ms_list_append(registered_sip_setups,ss);
-}
-
-void sip_setup_register_all(void){
-       SipSetup **p=all_sip_setups;
-       ms_load_plugins(LINPHONE_PLUGINS_DIR);
-       while(*p!=NULL){
-               sip_setup_register(*p);
-               p++;
-       }
-}
-
-const MSList * linphone_core_get_sip_setups(LinphoneCore *lc){
-       return registered_sip_setups;
-}
-
-SipSetup *sip_setup_lookup(const char *type_name){
-       MSList *elem;
-       for(elem=registered_sip_setups;elem!=NULL;elem=elem->next){
-               SipSetup *ss=(SipSetup*)elem->data;
-               if ( strcasecmp(ss->name,type_name)==0){
-                       if (!ss->initialized){
-                               if (ss->init!=NULL) ss->init();
-                               ss->initialized=TRUE;
-                               if (ss->capabilities==0){
-                                       ms_error("%s SipSetup isn't capable of anything ?",ss->name);
-                               }
-                       }
-                       return ss;
-               }
-       }
-       ms_warning("no %s setup manager declared.",type_name);
-       return NULL;
-}
-
-void sip_setup_unregister_all(void){
-       MSList *elem;
-       for(elem=registered_sip_setups;elem!=NULL;elem=elem->next){
-               SipSetup *ss=(SipSetup*)elem->data;
-               if (ss->initialized){
-                       if (ss->exit) ss->exit();
-                       ss->initialized=FALSE;
-               }
-       }
-}
-
-void buddy_lookup_request_set_key(BuddyLookupRequest *req, const char *key){
-       if (req->key!=NULL) {
-               ms_free(req->key);
-               req->key=NULL;
-       }
-       if (key) req->key=ms_strdup(key);
-}
-
-void buddy_lookup_request_set_max_results(BuddyLookupRequest *req, int ncount){
-       req->max_results=ncount;
-}
-
-void buddy_lookup_request_free(BuddyLookupRequest *req){
-       if (req->key) ms_free(req->key);
-       if (req->results){
-               ms_list_for_each(req->results,(void (*)(void*))buddy_info_free);
-               ms_list_free(req->results);
-       }
-       ms_free(req);
-}
-
-LinphoneProxyConfig *sip_setup_context_get_proxy_config(const SipSetupContext *ctx){
-       return ctx->cfg;
-}
-
-SipSetupContext *sip_setup_context_new(SipSetup *s, struct _LinphoneProxyConfig *cfg){
-       SipSetupContext *obj=(SipSetupContext*)ms_new0(SipSetupContext,1);
-       obj->funcs=s;
-       obj->data=NULL;
-       obj->cfg=cfg;
-       if (obj->funcs->init_instance){
-               obj->funcs->init_instance(obj);
-       }
-       return obj;
-}
-
-unsigned int sip_setup_get_capabilities(SipSetup *s){
-       return s->capabilities;
-}
-
-int sip_setup_context_get_capabilities(SipSetupContext *ctx){
-       return ctx->funcs->capabilities;
-}
-
-int sip_setup_context_create_account(SipSetupContext * ctx, const char *uri, const char *passwd){
-       if (ctx->funcs->create_account)
-               return ctx->funcs->create_account(ctx,uri, passwd);
-       else return -1;
-}
-
-int sip_setup_context_account_exists(SipSetupContext *ctx, const char *uri){
-       if (ctx->funcs->account_exists)
-               return ctx->funcs->account_exists(ctx,uri);
-       return -1;
-}
-
-int sip_setup_context_login_account(SipSetupContext * ctx, const char *uri, const char *passwd){
-       LinphoneAddress *from=linphone_address_new(uri);
-       if (from==NULL) {
-               ms_warning("Fail to parse %s",uri);
-               return -1;
-       }
-       strncpy(ctx->domain,linphone_address_get_domain(from),sizeof(ctx->domain));
-       strncpy(ctx->username,linphone_address_get_username(from),sizeof(ctx->username));
-       linphone_address_destroy(from);
-       if (ctx->funcs->login_account)
-               return ctx->funcs->login_account(ctx,uri,passwd);
-       return -1;
-}
-
-int sip_setup_context_get_proxy(SipSetupContext *ctx, const char *domain, char *proxy, size_t sz){
-       if (ctx->funcs->get_proxy)
-               return ctx->funcs->get_proxy(ctx,domain ? domain : ctx->domain,proxy,sz);
-       return -1;
-}
-
-int sip_setup_context_get_stun_servers(SipSetupContext *ctx, char *stun1, char *stun2, size_t size){
-       if (ctx->funcs->get_stun_servers)
-               return ctx->funcs->get_stun_servers(ctx,stun1,stun2,size);
-       return -1;
-}
-
-int sip_setup_context_get_relay(SipSetupContext *ctx,char *relay, size_t size){
-       if (ctx->funcs->get_relay)
-               return ctx->funcs->get_relay(ctx,relay,size);
-       return -1;
-}
-
-BuddyLookupRequest *sip_setup_context_create_buddy_lookup_request(SipSetupContext *ctx){
-       if (ctx->funcs->buddy_lookup_funcs)
-               return ctx->funcs->buddy_lookup_funcs->request_create(ctx);
-       return NULL;
-}
-
-int sip_setup_context_buddy_lookup_submit(SipSetupContext *ctx , BuddyLookupRequest *req){
-       if (ctx->funcs->buddy_lookup_funcs)
-               return ctx->funcs->buddy_lookup_funcs->request_submit(ctx,req);
-       return -1;
-}
-
-int sip_setup_context_buddy_lookup_free(SipSetupContext *ctx , BuddyLookupRequest *req){
-       if (ctx->funcs->buddy_lookup_funcs)
-               return ctx->funcs->buddy_lookup_funcs->request_free(ctx,req);
-       return -1;
-}
-
-const char * sip_setup_context_get_notice(SipSetupContext *ctx){
-       if (ctx->funcs->get_notice)
-               return ctx->funcs->get_notice(ctx);
-       return NULL;
-}
-
-const char ** sip_setup_context_get_domains(SipSetupContext *ctx){
-       if (ctx->funcs->get_domains)
-               return ctx->funcs->get_domains(ctx);
-       return NULL;
-}
-
-
-int sip_setup_context_logout(SipSetupContext *ctx){
-       if (ctx->funcs->logout_account){
-               return ctx->funcs->logout_account(ctx);
-       }
-       return -1;
-}
-
-void sip_setup_context_free(SipSetupContext *ctx){
-       if (ctx->funcs->uninit_instance){
-               ctx->funcs->uninit_instance(ctx);
-       }
-       ms_free(ctx);
-}
-
-
-BuddyInfo *buddy_info_new(){
-       return ms_new0(BuddyInfo,1);
-}
-
-void buddy_info_free(BuddyInfo *info){
-       if (info->image_data!=NULL)
-               ms_free(info->image_data);
-       ms_free(info);
-}
diff --git a/linphone/coreapi/sipsetup.h b/linphone/coreapi/sipsetup.h
deleted file mode 100644 (file)
index 6776367..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
-linphone
-Copyright (C) 2000  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-
-#ifndef sipsetup_h
-#define sipsetup_h
-
-#include "mediastreamer2/mscommon.h"
-
-struct _SipSetup;
-
-struct _BuddyInfo;
-
-
-struct _SipSetupContext{
-       struct _SipSetup *funcs;
-       struct _LinphoneProxyConfig *cfg;
-       char domain[128];
-       char username[128];
-       void *data;
-};
-
-typedef struct _SipSetupContext SipSetupContext;
-
-#define SIP_SETUP_CAP_PROXY_PROVIDER   (1)
-#define SIP_SETUP_CAP_STUN_PROVIDER    (1<<1)
-#define SIP_SETUP_CAP_RELAY_PROVIDER   (1<<2)
-#define SIP_SETUP_CAP_BUDDY_LOOKUP     (1<<3)
-#define SIP_SETUP_CAP_ACCOUNT_MANAGER  (1<<4)  /*can create accounts*/
-#define SIP_SETUP_CAP_LOGIN            (1<<5)  /*can login to any account for a given proxy */
-
-typedef enum _BuddyLookupStatus{
-       BuddyLookupNone,
-       BuddyLookupConnecting,
-       BuddyLookupConnected,
-       BuddyLookupReceivingResponse,
-       BuddyLookupDone,
-       BuddyLookupFailure
-}BuddyLookupStatus;
-
-typedef struct _BuddyAddress{
-       char street[64];
-       char zip[64];
-       char town[64];
-       char country[64];
-} BuddyAddress;
-
-typedef struct _BuddyInfo{
-       char firstname[64];
-       char lastname[64];
-       char displayname[64];
-       char sip_uri[128];
-       char email[128];
-       BuddyAddress address;
-       char image_type[32];
-       uint8_t *image_data;
-       int image_length;
-}BuddyInfo;
-
-typedef struct _BuddyLookupRequest {
-       char *key;
-       int max_results;
-       BuddyLookupStatus status;
-       MSList *results; /*of BuddyInfo */
-}BuddyLookupRequest;
-
-
-typedef struct _BuddyLookupFuncs{
-       BuddyLookupRequest * (*request_create)(SipSetupContext *ctx);
-       int (*request_submit)(SipSetupContext *ctx, BuddyLookupRequest *req);
-       int (*request_free)(SipSetupContext *ctx, BuddyLookupRequest *req);
-}BuddyLookupFuncs;
-
-
-struct _SipSetup{
-       char *name;
-       unsigned int capabilities;
-       int initialized;
-       bool_t (*init)(void);
-       void (*exit)(void);
-       void (*init_instance)(SipSetupContext *ctx);
-       void (*uninit_instance)(SipSetupContext *ctx);
-       int (*account_exists)(SipSetupContext *ctx, const char *uri);
-       int (*create_account)(SipSetupContext *ctx, const char *uri, const char *passwd);
-       int (*login_account)(SipSetupContext *ctx, const char *uri, const char *passwd);
-       int (*get_proxy)(SipSetupContext *ctx, const char *domain, char *proxy, size_t sz);
-       int (*get_stun_servers)(SipSetupContext *ctx, char *stun1, char *stun2, size_t size);
-       int (*get_relay)(SipSetupContext *ctx, char *relay, size_t size);
-       const char * (*get_notice)(SipSetupContext *ctx);
-       const char ** (*get_domains)(SipSetupContext *ctx);
-       int (*logout_account)(SipSetupContext *ctx);
-       BuddyLookupFuncs *buddy_lookup_funcs;
-};
-
-typedef struct _SipSetup SipSetup;
-
-
-
-#ifdef __cplusplus
-extern "C"{
-#endif
-
-BuddyInfo *buddy_info_new();
-void buddy_info_free(BuddyInfo *info);
-
-void buddy_lookup_request_set_key(BuddyLookupRequest *req, const char *key);
-void buddy_lookup_request_set_max_results(BuddyLookupRequest *req, int ncount);
-
-
-void sip_setup_register(SipSetup *ss);
-void sip_setup_register_all(void);
-SipSetup *sip_setup_lookup(const char *type_name);
-void sip_setup_unregister_all(void);
-unsigned int sip_setup_get_capabilities(SipSetup *s);
-
-SipSetupContext * sip_setup_context_new(SipSetup *s, struct _LinphoneProxyConfig *cfg);
-int sip_setup_context_account_exists(SipSetupContext *ctx, const char *uri);
-int sip_setup_context_create_account(SipSetupContext *ctx, const char *uri, const char *passwd);
-int sip_setup_context_get_capabilities(SipSetupContext *ctx);
-int sip_setup_context_login_account(SipSetupContext * ctx, const char *uri, const char *passwd);
-int sip_setup_context_get_proxy(SipSetupContext *ctx, const char *domain, char *proxy, size_t sz);
-int sip_setup_context_get_stun_servers(SipSetupContext *ctx, char *stun1, char *stun2, size_t size);
-int sip_setup_context_get_relay(SipSetupContext *ctx, char *relay, size_t size);
-
-BuddyLookupRequest *sip_setup_context_create_buddy_lookup_request(SipSetupContext *ctx);
-int sip_setup_context_buddy_lookup_submit(SipSetupContext *ctx , BuddyLookupRequest *req);
-int sip_setup_context_buddy_lookup_free(SipSetupContext *ctx , BuddyLookupRequest *req);
-
-const char * sip_setup_context_get_notice(SipSetupContext *ctx);
-const char ** sip_setup_context_get_domains(SipSetupContext *ctx);
-
-void sip_setup_context_free(SipSetupContext *ctx);
-
-int sip_setup_context_logout(SipSetupContext *ctx);
-
-/*internal methods for use WITHIN plugins: do not use elsewhere*/
-struct _LinphoneProxyConfig *sip_setup_context_get_proxy_config(const SipSetupContext *ctx);
-void buddy_lookup_request_free(BuddyLookupRequest *req);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif
-
-
diff --git a/linphone/gen-gtkfilelist.sh b/linphone/gen-gtkfilelist.sh
deleted file mode 100755 (executable)
index 1971e03..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-# this script is used to generate a file list of gtk+ files necessary for
-# execution. This is useful for generating linphone packages.
-# It must be run within a gtk+ binary bundle tree, such as in the zip bundle
-# downloadable from www.gtk.org
-echo bin
-echo bin/libglade-2.0-0.dll
-find bin -name *.dll
-find lib/gtk-2.0
-find etc
-find share/locale/fr
-find share/locale/de
-find share/locale/sv
-find share/locale/cs
-find share/locale/es
-find share/locale/hu
-find share/locale/it
-find share/locale/ja
-find share/locale/nl
-find share/locale/pl
-find share/locale/ru
-find share/locale/pt_BR
-find share/themes
-
diff --git a/linphone/gtk+-2.16.2.filelist b/linphone/gtk+-2.16.2.filelist
deleted file mode 100755 (executable)
index 10e10a5..0000000
+++ /dev/null
@@ -1,165 +0,0 @@
-bin
-bin/libglade-2.0-0.dll
-bin/intl.dll
-bin/jpeg62.dll
-bin/libasprintf-0.dll
-bin/libatk-1.0-0.dll
-bin/libcairo-2.dll
-bin/libgailutil-18.dll
-bin/libgdk-win32-2.0-0.dll
-bin/libgdk_pixbuf-2.0-0.dll
-bin/libgettextlib-0-17.dll
-bin/libgettextpo-0.dll
-bin/libgettextsrc-0-17.dll
-bin/libgio-2.0-0.dll
-bin/libglib-2.0-0.dll
-bin/libgmodule-2.0-0.dll
-bin/libgobject-2.0-0.dll
-bin/libgthread-2.0-0.dll
-bin/libgtk-win32-2.0-0.dll
-bin/libpango-1.0-0.dll
-bin/libpangocairo-1.0-0.dll
-bin/libpangoft2-1.0-0.dll
-bin/libpangowin32-1.0-0.dll
-bin/libpng12-0.dll
-bin/libtiff3.dll
-bin/zlib1.dll
-lib/gtk-2.0
-lib/gtk-2.0/2.10.0
-lib/gtk-2.0/2.10.0/engines
-lib/gtk-2.0/2.10.0/engines/libpixmap.dll
-lib/gtk-2.0/2.10.0/engines/libwimp.dll
-lib/gtk-2.0/2.10.0/loaders
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-ani.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-bmp.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-gif.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-icns.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-ico.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-jpeg.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-pcx.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-pnm.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-ras.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-tga.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-tiff.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-wbmp.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xbm.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xpm.dll
-lib/gtk-2.0/include
-lib/gtk-2.0/include/gdkconfig.h
-lib/gtk-2.0/modules
-lib/gtk-2.0/modules/libgail.dll
-etc
-etc/gtk-2.0
-etc/gtk-2.0/gdk-pixbuf.loaders
-etc/gtk-2.0/gtk.immodules
-etc/gtk-2.0/im-multipress.conf
-etc/pango
-etc/pango/pango.modules
-share/locale/fr
-share/locale/fr/LC_MESSAGES
-share/locale/fr/LC_MESSAGES/atk10.mo
-share/locale/fr/LC_MESSAGES/gettext-runtime.mo
-share/locale/fr/LC_MESSAGES/gettext-tools.mo
-share/locale/fr/LC_MESSAGES/glib20.mo
-share/locale/fr/LC_MESSAGES/gtk20-properties.mo
-share/locale/fr/LC_MESSAGES/gtk20.mo
-share/locale/de
-share/locale/de/LC_MESSAGES
-share/locale/de/LC_MESSAGES/atk10.mo
-share/locale/de/LC_MESSAGES/gettext-runtime.mo
-share/locale/de/LC_MESSAGES/gettext-tools.mo
-share/locale/de/LC_MESSAGES/glib20.mo
-share/locale/de/LC_MESSAGES/gtk20-properties.mo
-share/locale/de/LC_MESSAGES/gtk20.mo
-share/locale/sv
-share/locale/sv/LC_MESSAGES
-share/locale/sv/LC_MESSAGES/atk10.mo
-share/locale/sv/LC_MESSAGES/gettext-runtime.mo
-share/locale/sv/LC_MESSAGES/gettext-tools.mo
-share/locale/sv/LC_MESSAGES/glib20.mo
-share/locale/sv/LC_MESSAGES/gtk20-properties.mo
-share/locale/sv/LC_MESSAGES/gtk20.mo
-share/locale/cs
-share/locale/cs/LC_MESSAGES
-share/locale/cs/LC_MESSAGES/atk10.mo
-share/locale/cs/LC_MESSAGES/gettext-runtime.mo
-share/locale/cs/LC_MESSAGES/gettext-tools.mo
-share/locale/cs/LC_MESSAGES/glib20.mo
-share/locale/cs/LC_MESSAGES/gtk20-properties.mo
-share/locale/cs/LC_MESSAGES/gtk20.mo
-share/locale/es
-share/locale/es/LC_MESSAGES
-share/locale/es/LC_MESSAGES/atk10.mo
-share/locale/es/LC_MESSAGES/gettext-runtime.mo
-share/locale/es/LC_MESSAGES/gettext-tools.mo
-share/locale/es/LC_MESSAGES/glib20.mo
-share/locale/es/LC_MESSAGES/gtk20-properties.mo
-share/locale/es/LC_MESSAGES/gtk20.mo
-share/locale/hu
-share/locale/hu/LC_MESSAGES
-share/locale/hu/LC_MESSAGES/atk10.mo
-share/locale/hu/LC_MESSAGES/glib20.mo
-share/locale/hu/LC_MESSAGES/gtk20-properties.mo
-share/locale/hu/LC_MESSAGES/gtk20.mo
-share/locale/it
-share/locale/it/LC_MESSAGES
-share/locale/it/LC_MESSAGES/atk10.mo
-share/locale/it/LC_MESSAGES/gettext-runtime.mo
-share/locale/it/LC_MESSAGES/gettext-tools.mo
-share/locale/it/LC_MESSAGES/glib20.mo
-share/locale/it/LC_MESSAGES/gtk20-properties.mo
-share/locale/it/LC_MESSAGES/gtk20.mo
-share/locale/ja
-share/locale/ja/LC_MESSAGES
-share/locale/ja/LC_MESSAGES/atk10.mo
-share/locale/ja/LC_MESSAGES/gettext-runtime.mo
-share/locale/ja/LC_MESSAGES/gettext-tools.mo
-share/locale/ja/LC_MESSAGES/glib20.mo
-share/locale/ja/LC_MESSAGES/gtk20-properties.mo
-share/locale/ja/LC_MESSAGES/gtk20.mo
-share/locale/nl
-share/locale/nl/LC_MESSAGES
-share/locale/nl/LC_MESSAGES/atk10.mo
-share/locale/nl/LC_MESSAGES/gettext-runtime.mo
-share/locale/nl/LC_MESSAGES/gettext-tools.mo
-share/locale/nl/LC_MESSAGES/glib20.mo
-share/locale/nl/LC_MESSAGES/gtk20-properties.mo
-share/locale/nl/LC_MESSAGES/gtk20.mo
-share/locale/pl
-share/locale/pl/LC_MESSAGES
-share/locale/pl/LC_MESSAGES/atk10.mo
-share/locale/pl/LC_MESSAGES/gettext-runtime.mo
-share/locale/pl/LC_MESSAGES/gettext-tools.mo
-share/locale/pl/LC_MESSAGES/glib20.mo
-share/locale/pl/LC_MESSAGES/gtk20-properties.mo
-share/locale/pl/LC_MESSAGES/gtk20.mo
-share/locale/ru
-share/locale/ru/LC_MESSAGES
-share/locale/ru/LC_MESSAGES/atk10.mo
-share/locale/ru/LC_MESSAGES/gettext-runtime.mo
-share/locale/ru/LC_MESSAGES/gettext-tools.mo
-share/locale/ru/LC_MESSAGES/glib20.mo
-share/locale/ru/LC_MESSAGES/gtk20-properties.mo
-share/locale/ru/LC_MESSAGES/gtk20.mo
-share/locale/pt_BR
-share/locale/pt_BR/LC_MESSAGES
-share/locale/pt_BR/LC_MESSAGES/atk10.mo
-share/locale/pt_BR/LC_MESSAGES/gettext-runtime.mo
-share/locale/pt_BR/LC_MESSAGES/gettext-tools.mo
-share/locale/pt_BR/LC_MESSAGES/glib20.mo
-share/locale/pt_BR/LC_MESSAGES/gtk20-properties.mo
-share/locale/pt_BR/LC_MESSAGES/gtk20.mo
-share/themes
-share/themes/Default
-share/themes/Default/gtk-2.0-key
-share/themes/Default/gtk-2.0-key/gtkrc
-share/themes/Emacs
-share/themes/Emacs/gtk-2.0-key
-share/themes/Emacs/gtk-2.0-key/gtkrc
-share/themes/MS-Windows
-share/themes/MS-Windows/gtk-2.0
-share/themes/MS-Windows/gtk-2.0/gtkrc
-share/themes/Raleigh
-share/themes/Raleigh/gtk-2.0
-share/themes/Raleigh/gtk-2.0/gtkrc
diff --git a/linphone/gtk+-2.16.6.filelist b/linphone/gtk+-2.16.6.filelist
deleted file mode 100644 (file)
index 2b9b82f..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-bin
-bin/libglade-2.0-0.dll
-bin/freetype6.dll
-bin/intl.dll
-bin/libatk-1.0-0.dll
-bin/libcairo-2.dll
-bin/libexpat-1.dll
-bin/libfontconfig-1.dll
-bin/libgailutil-18.dll
-bin/libgdk-win32-2.0-0.dll
-bin/libgdk_pixbuf-2.0-0.dll
-bin/libgio-2.0-0.dll
-bin/libglib-2.0-0.dll
-bin/libgmodule-2.0-0.dll
-bin/libgobject-2.0-0.dll
-bin/libgthread-2.0-0.dll
-bin/libgtk-win32-2.0-0.dll
-bin/libjpeg-7.dll
-bin/libpango-1.0-0.dll
-bin/libpangocairo-1.0-0.dll
-bin/libpangoft2-1.0-0.dll
-bin/libpangowin32-1.0-0.dll
-bin/libpng12-0.dll
-bin/libtiff-3.dll
-bin/libtiffxx-3.dll
-bin/zlib1.dll
-lib/gtk-2.0
-lib/gtk-2.0/2.10.0
-lib/gtk-2.0/2.10.0/engines
-lib/gtk-2.0/2.10.0/engines/libpixmap.dll
-lib/gtk-2.0/2.10.0/engines/libwimp.dll
-lib/gtk-2.0/2.10.0/loaders
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-ani.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-bmp.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-gif.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-icns.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-ico.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-jpeg.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-pcx.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-pnm.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-ras.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-tga.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-tiff.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-wbmp.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xbm.dll
-lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xpm.dll
-lib/gtk-2.0/include
-lib/gtk-2.0/include/gdkconfig.h
-lib/gtk-2.0/modules
-lib/gtk-2.0/modules/libgail.dll
-etc
-etc/fonts
-etc/fonts/fonts.conf
-etc/fonts/fonts.dtd
-etc/gtk-2.0
-etc/gtk-2.0/gdk-pixbuf.loaders
-etc/gtk-2.0/gtk.immodules
-etc/gtk-2.0/im-multipress.conf
-etc/pango
-etc/pango/pango.modules
-share/locale/fr
-share/locale/fr/LC_MESSAGES
-share/locale/fr/LC_MESSAGES/atk10.mo
-share/locale/fr/LC_MESSAGES/glib20.mo
-share/locale/fr/LC_MESSAGES/gtk20-properties.mo
-share/locale/fr/LC_MESSAGES/gtk20.mo
-share/locale/de
-share/locale/de/LC_MESSAGES
-share/locale/de/LC_MESSAGES/atk10.mo
-share/locale/de/LC_MESSAGES/glib20.mo
-share/locale/de/LC_MESSAGES/gtk20-properties.mo
-share/locale/de/LC_MESSAGES/gtk20.mo
-share/locale/sv
-share/locale/sv/LC_MESSAGES
-share/locale/sv/LC_MESSAGES/atk10.mo
-share/locale/sv/LC_MESSAGES/glib20.mo
-share/locale/sv/LC_MESSAGES/gtk20-properties.mo
-share/locale/sv/LC_MESSAGES/gtk20.mo
-share/locale/cs
-share/locale/cs/LC_MESSAGES
-share/locale/cs/LC_MESSAGES/atk10.mo
-share/locale/cs/LC_MESSAGES/glib20.mo
-share/locale/cs/LC_MESSAGES/gtk20-properties.mo
-share/locale/cs/LC_MESSAGES/gtk20.mo
-share/locale/es
-share/locale/es/LC_MESSAGES
-share/locale/es/LC_MESSAGES/atk10.mo
-share/locale/es/LC_MESSAGES/glib20.mo
-share/locale/es/LC_MESSAGES/gtk20-properties.mo
-share/locale/es/LC_MESSAGES/gtk20.mo
-share/locale/hu
-share/locale/hu/LC_MESSAGES
-share/locale/hu/LC_MESSAGES/atk10.mo
-share/locale/hu/LC_MESSAGES/glib20.mo
-share/locale/hu/LC_MESSAGES/gtk20-properties.mo
-share/locale/hu/LC_MESSAGES/gtk20.mo
-share/locale/it
-share/locale/it/LC_MESSAGES
-share/locale/it/LC_MESSAGES/atk10.mo
-share/locale/it/LC_MESSAGES/glib20.mo
-share/locale/it/LC_MESSAGES/gtk20-properties.mo
-share/locale/it/LC_MESSAGES/gtk20.mo
-share/locale/ja
-share/locale/ja/LC_MESSAGES
-share/locale/ja/LC_MESSAGES/atk10.mo
-share/locale/ja/LC_MESSAGES/glib20.mo
-share/locale/ja/LC_MESSAGES/gtk20-properties.mo
-share/locale/ja/LC_MESSAGES/gtk20.mo
-share/locale/nl
-share/locale/nl/LC_MESSAGES
-share/locale/nl/LC_MESSAGES/atk10.mo
-share/locale/nl/LC_MESSAGES/glib20.mo
-share/locale/nl/LC_MESSAGES/gtk20-properties.mo
-share/locale/nl/LC_MESSAGES/gtk20.mo
-share/locale/pl
-share/locale/pl/LC_MESSAGES
-share/locale/pl/LC_MESSAGES/atk10.mo
-share/locale/pl/LC_MESSAGES/glib20.mo
-share/locale/pl/LC_MESSAGES/gtk20-properties.mo
-share/locale/pl/LC_MESSAGES/gtk20.mo
-share/locale/ru
-share/locale/ru/LC_MESSAGES
-share/locale/ru/LC_MESSAGES/atk10.mo
-share/locale/ru/LC_MESSAGES/glib20.mo
-share/locale/ru/LC_MESSAGES/gtk20-properties.mo
-share/locale/ru/LC_MESSAGES/gtk20.mo
-share/locale/pt_BR
-share/locale/pt_BR/LC_MESSAGES
-share/locale/pt_BR/LC_MESSAGES/atk10.mo
-share/locale/pt_BR/LC_MESSAGES/glib20.mo
-share/locale/pt_BR/LC_MESSAGES/gtk20-properties.mo
-share/locale/pt_BR/LC_MESSAGES/gtk20.mo
-share/themes
-share/themes/Default
-share/themes/Default/gtk-2.0-key
-share/themes/Default/gtk-2.0-key/gtkrc
-share/themes/Emacs
-share/themes/Emacs/gtk-2.0-key
-share/themes/Emacs/gtk-2.0-key/gtkrc
-share/themes/MS-Windows
-share/themes/MS-Windows/gtk-2.0
-share/themes/MS-Windows/gtk-2.0/gtkrc
-share/themes/Raleigh
-share/themes/Raleigh/gtk-2.0
-share/themes/Raleigh/gtk-2.0/gtkrc
diff --git a/linphone/gtk+-2.18.5.filelist b/linphone/gtk+-2.18.5.filelist
deleted file mode 100644 (file)
index cb2f3be..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-bin
-bin/libglade-2.0-0.dll
-bin/freetype6.dll
-bin/intl.dll
-bin/libatk-1.0-0.dll
-bin/libcairo-2.dll
-bin/libexpat-1.dll
-bin/libfontconfig-1.dll
-bin/libgailutil-18.dll
-bin/libgdk-win32-2.0-0.dll
-bin/libgdk_pixbuf-2.0-0.dll
-bin/libgio-2.0-0.dll
-bin/libglib-2.0-0.dll
-bin/libgmodule-2.0-0.dll
-bin/libgobject-2.0-0.dll
-bin/libgthread-2.0-0.dll
-bin/libgtk-win32-2.0-0.dll
-bin/libjpeg-7.dll
-bin/libpango-1.0-0.dll
-bin/libpangocairo-1.0-0.dll
-bin/libpangoft2-1.0-0.dll
-bin/libpangowin32-1.0-0.dll
-bin/libpng12-0.dll
-bin/libtiff-3.dll
-bin/libtiffxx-3.dll
-bin/zlib1.dll
-lib/gtk-2.0
-lib/gtk-2.0/2.10.0
-lib/gtk-2.0/2.10.0/engines
-lib/gtk-2.0/2.10.0/engines/libpixmap.dll
-lib/gtk-2.0/2.10.0/engines/libwimp.dll
-lib/gtk-2.0/include
-lib/gtk-2.0/include/gdkconfig.h
-lib/gtk-2.0/modules
-lib/gtk-2.0/modules/libgail.dll
-etc
-etc/fonts
-etc/fonts/fonts.conf
-etc/fonts/fonts.dtd
-etc/gtk-2.0
-etc/gtk-2.0/gdk-pixbuf.loaders
-etc/gtk-2.0/gtk.immodules
-etc/gtk-2.0/im-multipress.conf
-etc/pango
-etc/pango/pango.modules
-share/locale/fr
-share/locale/fr/LC_MESSAGES
-share/locale/fr/LC_MESSAGES/atk10.mo
-share/locale/fr/LC_MESSAGES/glib20.mo
-share/locale/fr/LC_MESSAGES/gtk20-properties.mo
-share/locale/fr/LC_MESSAGES/gtk20.mo
-share/locale/de
-share/locale/de/LC_MESSAGES
-share/locale/de/LC_MESSAGES/atk10.mo
-share/locale/de/LC_MESSAGES/glib20.mo
-share/locale/de/LC_MESSAGES/gtk20-properties.mo
-share/locale/de/LC_MESSAGES/gtk20.mo
-share/locale/sv
-share/locale/sv/LC_MESSAGES
-share/locale/sv/LC_MESSAGES/atk10.mo
-share/locale/sv/LC_MESSAGES/glib20.mo
-share/locale/sv/LC_MESSAGES/gtk20-properties.mo
-share/locale/sv/LC_MESSAGES/gtk20.mo
-share/locale/cs
-share/locale/cs/LC_MESSAGES
-share/locale/cs/LC_MESSAGES/atk10.mo
-share/locale/cs/LC_MESSAGES/glib20.mo
-share/locale/cs/LC_MESSAGES/gtk20-properties.mo
-share/locale/cs/LC_MESSAGES/gtk20.mo
-share/locale/es
-share/locale/es/LC_MESSAGES
-share/locale/es/LC_MESSAGES/atk10.mo
-share/locale/es/LC_MESSAGES/glib20.mo
-share/locale/es/LC_MESSAGES/gtk20-properties.mo
-share/locale/es/LC_MESSAGES/gtk20.mo
-share/locale/hu
-share/locale/hu/LC_MESSAGES
-share/locale/hu/LC_MESSAGES/atk10.mo
-share/locale/hu/LC_MESSAGES/glib20.mo
-share/locale/hu/LC_MESSAGES/gtk20-properties.mo
-share/locale/hu/LC_MESSAGES/gtk20.mo
-share/locale/it
-share/locale/it/LC_MESSAGES
-share/locale/it/LC_MESSAGES/atk10.mo
-share/locale/it/LC_MESSAGES/glib20.mo
-share/locale/it/LC_MESSAGES/gtk20-properties.mo
-share/locale/it/LC_MESSAGES/gtk20.mo
-share/locale/ja
-share/locale/ja/LC_MESSAGES
-share/locale/ja/LC_MESSAGES/atk10.mo
-share/locale/ja/LC_MESSAGES/glib20.mo
-share/locale/ja/LC_MESSAGES/gtk20-properties.mo
-share/locale/ja/LC_MESSAGES/gtk20.mo
-share/locale/nl
-share/locale/nl/LC_MESSAGES
-share/locale/nl/LC_MESSAGES/atk10.mo
-share/locale/nl/LC_MESSAGES/glib20.mo
-share/locale/nl/LC_MESSAGES/gtk20-properties.mo
-share/locale/nl/LC_MESSAGES/gtk20.mo
-share/locale/pl
-share/locale/pl/LC_MESSAGES
-share/locale/pl/LC_MESSAGES/atk10.mo
-share/locale/pl/LC_MESSAGES/glib20.mo
-share/locale/pl/LC_MESSAGES/gtk20-properties.mo
-share/locale/pl/LC_MESSAGES/gtk20.mo
-share/locale/ru
-share/locale/ru/LC_MESSAGES
-share/locale/ru/LC_MESSAGES/atk10.mo
-share/locale/ru/LC_MESSAGES/glib20.mo
-share/locale/ru/LC_MESSAGES/gtk20-properties.mo
-share/locale/ru/LC_MESSAGES/gtk20.mo
-share/locale/pt_BR
-share/locale/pt_BR/LC_MESSAGES
-share/locale/pt_BR/LC_MESSAGES/atk10.mo
-share/locale/pt_BR/LC_MESSAGES/glib20.mo
-share/locale/pt_BR/LC_MESSAGES/gtk20-properties.mo
-share/locale/pt_BR/LC_MESSAGES/gtk20.mo
-share/themes
-share/themes/Default
-share/themes/Default/gtk-2.0-key
-share/themes/Default/gtk-2.0-key/gtkrc
-share/themes/Emacs
-share/themes/Emacs/gtk-2.0-key
-share/themes/Emacs/gtk-2.0-key/gtkrc
-share/themes/MS-Windows
-share/themes/MS-Windows/gtk-2.0
-share/themes/MS-Windows/gtk-2.0/gtkrc
-share/themes/Raleigh
-share/themes/Raleigh/gtk-2.0
-share/themes/Raleigh/gtk-2.0/gtkrc
diff --git a/linphone/gtk-glade/.gitignore b/linphone/gtk-glade/.gitignore
deleted file mode 100644 (file)
index 398d60f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-linphone-3
-.libs
-.deps
-linphone.res
-
diff --git a/linphone/gtk-glade/Makefile.am b/linphone/gtk-glade/Makefile.am
deleted file mode 100644 (file)
index 4a74424..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-GLADE_FILES=   about.glade \
-               main.glade \
-               password.glade \
-               contact.glade \
-               incoming_call.glade \
-               parameters.glade \
-               sip_account.glade \
-               chatroom.glade \
-               call_logs.glade \
-               log.glade \
-               buddylookup.glade \
-               waiting.glade
-
-PIXMAPS=       linphone2.png \
-               linphone.png \
-               stock_people.png 
-
-LINPHONE_ICO_RC_FILE=linphone.rc
-LINPHONE_ICO_FILE=linphone.ico
-
-EXTRA_DIST=    $(PIXMAPS) \
-               $(GLADE_FILES) \
-               linphone.iss \
-               $(LINPHONE_ICO_RC_FILE) \
-               $(LINPHONE_ICO_FILE)
-
-
-if BUILD_GLADE_UI
-
-BUILT_SOURCES=version_date.h
-
-bin_PROGRAMS=linphone-3
-
-linphone_3_SOURCES=    \
-                       main.c \
-                       propertybox.c \
-                       friendlist.c \
-                       support.c \
-                       chat.c \
-                       calllogs.c \
-                       logging.c \
-                       update.c \
-                       buddylookup.c \
-                       utils.c \
-                       setupwizard.c\
-                       incall_view.c \
-                       loginframe.c \
-                       linphone.h 
-
-linphone_3_LDADD=$(top_builddir)/oRTP/src/libortp.la \
-               $(top_builddir)/mediastreamer2/src/libmediastreamer.la \
-               $(top_builddir)/coreapi/liblinphone.la \
-                       $(LIBGTK_LIBS) $(INTLLIBS) \
-                       $(LIBGLADE_LIBS)
-
-
-if BUILD_WIN32
-
-linphone.res:  $(LINPHONE_ICO_RC_FILE) $(LINPHONE_ICO_FILE)
-       windres $(LINPHONE_ICO_RC_FILE) -O coff -o linphone.res
-
-linphone_3_LDADD+=linphone.res -lwininet
-linphone_3_LDFLAGS=-Wl,--export-all-symbols -mwindows
-else
-linphone_3_LDFLAGS=-export-dynamic
-endif
-
-gladedir=$(datadir)/linphone
-glade_DATA=$(GLADE_FILES) $(PIXMAPS) $(top_srcdir)/COPYING
-
-#all-local:    gtk-linphone.ui 
-
-#gtk-linphone.ui:      gtk-linphone.glade
-#      gtk-builder-convert gtk-linphone.glade $@
-
-endif
-
-
-AM_CFLAGS= -DIN_LINPHONE -I$(top_srcdir)/coreapi/ \
-               -I$(top_srcdir)/mediastreamer2/include/ \
-               $(LIBGLADE_CFLAGS) $(STRICT_OPTIONS) $(LIBGTK_CFLAGS) $(IPV6_CFLAGS) \
-               $(ORTP_CFLAGS) $(OSIP_CFLAGS) 
-
-
-version_date.h: $(top_srcdir)/configure.in
-       echo "#define LINPHONE_VERSION_DATE \"$(VERSION)-`date +%y%m%d`\"" > $@
-
-newdate:
-       rm -f version_date.h
-
-CLEANFILES=version_date.h linphone.res
-
diff --git a/linphone/gtk-glade/about.glade b/linphone/gtk-glade/about.glade
deleted file mode 100644 (file)
index 96c6b5f..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Mon Jun  2 22:01:30 2008 -->
-<glade-interface>
-  <widget class="GtkAboutDialog" id="about">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="border_width">5</property>
-    <property name="title" translatable="yes">About linphone</property>
-    <property name="resizable">False</property>
-    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
-    <property name="icon">linphone2.png</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-    <property name="has_separator">False</property>
-    <property name="program_name">Linphone</property>
-    <property name="version">undef</property>
-    <property name="copyright" translatable="yes">Created by Simon Morlat
-</property>
-    <property name="comments" translatable="yes">An internet video phone using the standart SIP (rfc3261) protocol.</property>
-    <property name="website">http://www.linphone.org</property>
-    <property name="license">GPL</property>
-    <property name="authors">Simon Morlat</property>
-    <property name="documenters"></property>
-    <property name="translator_credits" translatable="yes">fr: Simon Morlat
-en: Simon Morlat and Delphine Perreau
-it: Alberto Zanoni &lt;alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it&gt;
-de: Jean-Jacques Sarton &lt;jj.sarton@-NO-SPAM-PLEASE-t-online.de&gt;
-sv: Daniel Nylander &lt;po@danielnylander.se&gt;
-es: Jesus Benitez &lt;gnelson at inMail dot sk&gt;
-ja: YAMAGUCHI YOSHIYA &lt;yushiya@anet.ne.jp&gt;
-pt_BR: Rafael Caesar Lenzi &lt;rc_lenzi@yahoo.com.br&gt;
-pl: Robert Nasiadek &lt;darkone@darkone.pl&gt;
-cs: Petr Pisar &lt;petr.pisar@atlas.cz&gt;
-hu: anonymous
-</property>
-    <property name="artists">Icons by Pablo Marcello Moia
-</property>
-    <property name="logo">linphone.png</property>
-    <signal name="response" handler="linphone_gtk_about_response"/>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox8">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <placeholder/>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area7">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="layout_style">GTK_BUTTONBOX_END</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/linphone/gtk-glade/buddylookup.c b/linphone/gtk-glade/buddylookup.c
deleted file mode 100644 (file)
index 55c3f33..0000000
+++ /dev/null
@@ -1,305 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#include "linphone.h"
-#include "sipsetup.h"
-
-static void linphone_gtk_display_lookup_results(GtkWidget *w, const MSList *results);
-
-enum {
-       LOOKUP_RESULT_NAME,
-       LOOKUP_RESULT_SIP_URI,
-       LOOKUP_RESULT_ADDRESS,
-       LOOKUP_RESULT_ICON,
-       LOOKUP_RESULT_NCOL
-};
-
-void linphone_gtk_buddy_lookup_window_destroyed(GtkWidget *w){
-       guint tid=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"typing_timeout"));
-       if (tid!=0){
-               g_source_remove(tid);
-       }
-       tid=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"buddylookup_processing"));
-       if (tid!=0){
-               g_source_remove(tid);
-       }
-}
-
-static void enable_add_buddy_button(GtkWidget *w){
-       gtk_widget_set_sensitive(linphone_gtk_get_widget(w,"add_buddy"),TRUE);
-}
-
-static void disable_add_buddy_button(GtkWidget *w){
-       gtk_widget_set_sensitive(linphone_gtk_get_widget(w,"add_buddy"),FALSE);
-}
-
-static void buddy_selection_changed(GtkWidget *w){
-       GtkWidget *results=linphone_gtk_get_widget(w,"search_results");
-       GtkTreeSelection *select;
-       GtkTreeIter iter;
-       GtkTreeModel *model;
-       enable_add_buddy_button(w);
-       
-       select = gtk_tree_view_get_selection(GTK_TREE_VIEW(results));
-       if (gtk_tree_selection_get_selected (select, &model, &iter))
-       {
-               GtkTreePath *path=gtk_tree_model_get_path(model,&iter);
-               gtk_tree_view_collapse_all(GTK_TREE_VIEW(results));
-               gtk_tree_view_expand_row(GTK_TREE_VIEW(results),path,FALSE);
-               gtk_tree_path_free(path);
-       }
-}
-
-GtkWidget * linphone_gtk_show_buddy_lookup_window(SipSetupContext *ctx){
-       GtkTreeStore *store;
-       GtkCellRenderer *renderer,*pbuf_renderer;
-       GtkTreeViewColumn *column;
-       GtkTreeSelection *select;
-       GtkWidget *w=linphone_gtk_create_window("buddylookup");
-       GtkWidget *results=linphone_gtk_get_widget(w,"search_results");
-       GtkProgressBar *pb=GTK_PROGRESS_BAR(linphone_gtk_get_widget(w,"progressbar"));
-       
-       store = gtk_tree_store_new(LOOKUP_RESULT_NCOL, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, GDK_TYPE_PIXBUF);
-       
-       /*gtk_tree_view_set_hover_expand(GTK_TREE_VIEW(results),TRUE);*/
-       gtk_tree_view_set_model(GTK_TREE_VIEW(results),GTK_TREE_MODEL(store));
-       g_object_unref(G_OBJECT(store));
-
-       renderer = gtk_cell_renderer_text_new ();
-       column = gtk_tree_view_column_new_with_attributes (_("Firstname, Lastname"),
-                                                   renderer,
-                                                   "markup", LOOKUP_RESULT_NAME,
-                                                   NULL);
-       g_object_set (G_OBJECT(column), "resizable", TRUE, NULL);
-       
-
-       pbuf_renderer=gtk_cell_renderer_pixbuf_new();
-       g_object_set(G_OBJECT(renderer),"is-expander",TRUE,NULL);
-       gtk_tree_view_column_pack_start(column,pbuf_renderer,FALSE);
-       gtk_tree_view_column_add_attribute  (column,pbuf_renderer,
-                                                         "pixbuf",
-                                                         LOOKUP_RESULT_ICON);
-       gtk_tree_view_append_column (GTK_TREE_VIEW (results), column);
-       
-/*
-       column = gtk_tree_view_column_new_with_attributes (_("SIP address"),
-                                                   renderer,
-                                                   "text", LOOKUP_RESULT_SIP_URI,
-                                                   NULL);
-       g_object_set (G_OBJECT(column), "resizable", TRUE, NULL);
-       gtk_tree_view_append_column (GTK_TREE_VIEW (results), column);
-*/
-
-       select = gtk_tree_view_get_selection (GTK_TREE_VIEW (results));
-       gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
-       g_signal_connect_swapped(G_OBJECT(select),"changed",(GCallback)buddy_selection_changed,w);
-/*
-#if GTK_CHECK_VERSION(2,12,0)
-       gtk_tree_view_set_tooltip_column(GTK_TREE_VIEW(results),LOOKUP_RESULT_ADDRESS);
-#endif
-*/
-       g_object_set_data(G_OBJECT(w),"SipSetupContext",ctx);
-       g_object_weak_ref(G_OBJECT(w),(GWeakNotify)linphone_gtk_buddy_lookup_window_destroyed,w);
-       //g_signal_connect_swapped(G_OBJECT(w),"destroy",(GCallback)linphone_gtk_buddy_lookup_window_destroyed,w);
-       gtk_progress_bar_set_fraction(pb,0);
-       gtk_progress_bar_set_text(pb,NULL);
-       gtk_dialog_add_button(GTK_DIALOG(w),GTK_STOCK_CLOSE,GTK_RESPONSE_CLOSE);
-       g_object_set_data(G_OBJECT(w),"last_state",GINT_TO_POINTER(-1));
-
-       gtk_widget_show(w);
-       return w;
-}
-
-
-void linphone_gtk_buddy_lookup_set_keyword(GtkWidget *w, const char *kw){
-       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"keyword")),kw);
-}
-
-static gboolean linphone_gtk_process_buddy_lookup(GtkWidget *w){
-       BuddyLookupStatus bls;
-       SipSetupContext *ctx;
-       int last_state;
-       gchar *tmp;
-       MSList *results=NULL;
-       GtkProgressBar *pb=GTK_PROGRESS_BAR(linphone_gtk_get_widget(w,"progressbar"));
-       BuddyLookupRequest *req=(BuddyLookupRequest*)g_object_get_data(G_OBJECT(w),"buddylookup_request");
-
-       ctx=(SipSetupContext*)g_object_get_data(G_OBJECT(w),"SipSetupContext"); 
-       last_state=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"last_state"));
-
-       if (req==NULL) {
-               g_object_set_data(G_OBJECT(w),"buddylookup_processing",GINT_TO_POINTER(0));
-               return FALSE;
-       }
-       bls=req->status;
-       if (last_state==bls) return TRUE;
-       
-       switch(bls){
-               case BuddyLookupNone:
-                       gtk_progress_bar_set_fraction(pb,0);
-                       gtk_progress_bar_set_text(pb,NULL);
-                       break;
-               case BuddyLookupFailure:
-                       gtk_progress_bar_set_fraction(pb,0);
-                       gtk_progress_bar_set_text(pb,_("Error communicating with server."));
-                       break;
-               case BuddyLookupConnecting:
-                       gtk_progress_bar_set_fraction(pb,0.2);
-                       gtk_progress_bar_set_text(pb,_("Connecting..."));
-                       break;
-               case BuddyLookupConnected:
-                       gtk_progress_bar_set_fraction(pb,0.4);
-                       gtk_progress_bar_set_text(pb,_("Connected"));
-                       break;
-               case BuddyLookupReceivingResponse:
-                       gtk_progress_bar_set_fraction(pb,0.8);
-                       gtk_progress_bar_set_text(pb,_("Receiving data..."));
-                       break;
-               case BuddyLookupDone:
-                       results=req->results;
-                       linphone_gtk_display_lookup_results(
-                                       linphone_gtk_get_widget(w,"search_results"),
-                                       results);
-                       gtk_progress_bar_set_fraction(pb,1);
-                       tmp=g_strdup_printf(ngettext("Found %i contact",
-                        "Found %i contacts", ms_list_size(results)),
-                    ms_list_size(results));
-                       gtk_progress_bar_set_text(pb,tmp);
-                       g_free(tmp);
-                       sip_setup_context_buddy_lookup_free(ctx,req);
-                       g_object_set_data(G_OBJECT(w),"buddylookup_request",NULL);
-                       break;
-       }
-       g_object_set_data(G_OBJECT(w),"last_state",GINT_TO_POINTER(bls));
-       return TRUE;
-}
-
-static gboolean keyword_typing_finished(GtkWidget *w){
-       guint tid=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"typing_timeout"));
-       const char *keyword;
-       SipSetupContext *ctx;
-       if (tid!=0){
-               g_source_remove(tid);
-       }
-       keyword=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(w,"keyword")));
-       if (strlen(keyword)>=1){
-               BuddyLookupRequest *req;
-               guint tid2;
-               ctx=(SipSetupContext*)g_object_get_data(G_OBJECT(w),"SipSetupContext");
-               req=(BuddyLookupRequest*)g_object_get_data(G_OBJECT(w),"buddylookup_request");
-               if (req!=NULL){
-                       sip_setup_context_buddy_lookup_free(ctx,req);
-               }
-               req=sip_setup_context_create_buddy_lookup_request(ctx);
-               buddy_lookup_request_set_key(req,keyword);
-               sip_setup_context_buddy_lookup_submit(ctx,req);
-               g_object_set_data(G_OBJECT(w),"buddylookup_request",req);
-               if (g_object_get_data(G_OBJECT(w),"buddylookup_processing")==NULL){
-                       tid2=g_timeout_add(20,(GSourceFunc)linphone_gtk_process_buddy_lookup,w);
-                       g_object_set_data(G_OBJECT(w),"buddylookup_processing",GINT_TO_POINTER(tid2));
-               }
-       }
-       return FALSE;
-}
-
-void linphone_gtk_keyword_changed(GtkEditable *e){
-       GtkWidget *w=gtk_widget_get_toplevel(GTK_WIDGET(e));
-       guint tid=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"typing_timeout"));
-       if (tid!=0){
-               g_source_remove(tid);
-       }
-       tid=g_timeout_add(2000,(GSourceFunc)keyword_typing_finished,w);
-       g_object_set_data(G_OBJECT(w),"typing_timeout",GINT_TO_POINTER(tid));
-}
-
-static void linphone_gtk_display_lookup_results(GtkWidget *w, const MSList *results){
-       GtkTreeStore *store;
-       GtkTreeIter iter;
-       gchar *tmp;
-       const MSList *elem;
-       store=GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(w)));
-       gtk_tree_store_clear(store);
-       disable_add_buddy_button(gtk_widget_get_toplevel(w));
-       for(elem=results;elem!=NULL;elem=elem->next){
-               BuddyInfo *bi=(BuddyInfo*)elem->data;
-               GdkPixbuf *pbuf;
-               GtkTreeIter depth1;
-               gtk_tree_store_append(store,&iter,NULL);
-               tmp=g_strdup_printf("%s, %s (%s)",bi->firstname,bi->lastname,bi->displayname);
-               gtk_tree_store_set(store,&iter,LOOKUP_RESULT_NAME, tmp,-1);
-               g_free(tmp);
-               gtk_tree_store_set(store,&iter,LOOKUP_RESULT_SIP_URI, bi->sip_uri,-1);
-               tmp=g_strdup_printf("%s, %s %s\n%s",bi->address.street, bi->address.zip, bi->address.town, bi->address.country);
-               gtk_tree_store_set(store,&iter,LOOKUP_RESULT_ADDRESS, tmp,-1);
-               g_free(tmp);
-               if (bi->image_data!=NULL){
-                       pbuf=_gdk_pixbuf_new_from_memory_at_scale(bi->image_data,bi->image_length,-1,40,TRUE);
-                       if (pbuf) {
-                               gtk_tree_store_set(store,&iter,LOOKUP_RESULT_ICON,pbuf,-1);
-                               g_object_unref(G_OBJECT(pbuf));
-                       }
-               }
-               gtk_tree_store_append(store,&depth1,&iter);
-               tmp=g_strdup_printf("<big>%s, %s (%s)</big>\n<i>%s</i>, <b>%s</b> %s\n%s\n%s",
-                       bi->firstname,bi->lastname,bi->displayname,bi->address.street,
-                       bi->address.zip, bi->address.town, bi->address.country,bi->sip_uri);
-               gtk_tree_store_set(store,&depth1,LOOKUP_RESULT_NAME,tmp,-1);
-               g_free(tmp);
-               if (bi->image_data!=NULL){
-                       pbuf=_gdk_pixbuf_new_from_memory_at_scale(bi->image_data,bi->image_length,-1,-1,TRUE);
-                       if (pbuf) {
-                               gtk_tree_store_set(store,&depth1,LOOKUP_RESULT_ICON,pbuf,-1);
-                               g_object_unref(G_OBJECT(pbuf));
-                       }
-               }
-       }
-}
-
-void linphone_gtk_add_buddy_from_database(GtkWidget *button){
-       GtkWidget *w=gtk_widget_get_toplevel(button);
-       GtkTreeSelection *select;
-       GtkTreeIter iter;
-       GtkTreeModel *model;
-       select = gtk_tree_view_get_selection(GTK_TREE_VIEW(linphone_gtk_get_widget(w,"search_results")));
-       if (gtk_tree_selection_get_selected (select, &model, &iter))
-       {
-               char *uri;
-               char *name;
-               char *addr;
-               LinphoneFriend *lf;
-               int presence=linphone_gtk_get_ui_config_int("use_subscribe_notify",1);
-               gtk_tree_model_get (model, &iter,LOOKUP_RESULT_SIP_URI , &uri,LOOKUP_RESULT_NAME, &name, -1);
-               addr=g_strdup_printf("%s <%s>",name,uri);
-
-               lf=linphone_friend_new_with_addr(addr);
-               linphone_friend_set_inc_subscribe_policy(lf,presence ? LinphoneSPAccept : LinphoneSPDeny);
-               linphone_friend_send_subscribe(lf,presence);
-               linphone_core_add_friend(linphone_gtk_get_core(),lf);
-               linphone_gtk_show_friends();
-               g_free(addr);
-               g_free(uri);
-               g_free(name);
-       }
-}
-
-/*called when double clicking on a contact */
-void linphone_gtk_buddy_lookup_contact_activated(GtkWidget *treeview){
-       linphone_gtk_add_buddy_from_database(treeview);
-       gtk_widget_destroy(gtk_widget_get_toplevel(treeview));
-}
diff --git a/linphone/gtk-glade/buddylookup.glade b/linphone/gtk-glade/buddylookup.glade
deleted file mode 100644 (file)
index 2e6eb96..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-<?xml version="1.0"?>
-<glade-interface>
-  <!-- interface-requires gtk+ 2.16 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <widget class="GtkDialog" id="buddylookup">
-    <property name="border_width">5</property>
-    <property name="title" translatable="yes">Search contacts in directory</property>
-    <property name="window_position">center-on-parent</property>
-    <property name="icon">linphone2.png</property>
-    <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
-    <signal name="response" handler="gtk_widget_destroy"/>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox1">
-        <property name="visible">True</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkFrame" id="frame1">
-            <property name="visible">True</property>
-            <property name="border_width">5</property>
-            <property name="label_xalign">0</property>
-            <child>
-              <widget class="GtkAlignment" id="alignment1">
-                <property name="visible">True</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <widget class="GtkVBox" id="vbox2">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkEntry" id="keyword">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="has_focus">True</property>
-                        <signal name="changed" handler="linphone_gtk_keyword_changed"/>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkScrolledWindow" id="scrolledwindow1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="hscrollbar_policy">automatic</property>
-                        <property name="vscrollbar_policy">automatic</property>
-                        <property name="shadow_type">etched-in</property>
-                        <child>
-                          <widget class="GtkTreeView" id="search_results">
-                            <property name="width_request">512</property>
-                            <property name="height_request">140</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <signal name="row_activated" handler="linphone_gtk_buddy_lookup_contact_activated"/>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="padding">6</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkProgressBar" id="progressbar">
-                        <property name="visible">True</property>
-                        <property name="activity_mode">True</property>
-                        <property name="show_text">True</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkHButtonBox" id="hbuttonbox1">
-                        <property name="visible">True</property>
-                        <child>
-                          <widget class="GtkButton" id="add_buddy">
-                            <property name="visible">True</property>
-                            <property name="sensitive">False</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <signal name="clicked" handler="linphone_gtk_add_buddy_from_database"/>
-                            <child>
-                              <widget class="GtkHBox" id="hbox1">
-                                <property name="visible">True</property>
-                                <child>
-                                  <widget class="GtkImage" id="image1">
-                                    <property name="visible">True</property>
-                                    <property name="stock">gtk-add</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkLabel" id="label2">
-                                    <property name="visible">True</property>
-                                    <property name="label" translatable="yes">Add to my list</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="padding">5</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">3</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label1">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">&lt;b&gt;Search somebody&lt;/b&gt;</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/linphone/gtk-glade/call_logs.glade b/linphone/gtk-glade/call_logs.glade
deleted file mode 100644 (file)
index d2ac682..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Wed Jul 30 17:55:28 2008 -->
-<glade-interface>
-  <widget class="GtkDialog" id="call_logs">
-    <property name="width_request">500</property>
-    <property name="height_request">370</property>
-    <property name="border_width">5</property>
-    <property name="title" translatable="yes">Call history</property>
-    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
-    <property name="icon">linphone2.png</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-    <property name="has_separator">False</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox1">
-        <property name="visible">True</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkScrolledWindow" id="scrolledwindow1">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-            <child>
-              <widget class="GtkTextView" id="logtextview">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="editable">False</property>
-                <property name="wrap_mode">GTK_WRAP_WORD</property>
-              </widget>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">GTK_BUTTONBOX_END</property>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <widget class="GtkButton" id="button1">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="label" translatable="yes">gtk-close</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">0</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/linphone/gtk-glade/calllogs.c b/linphone/gtk-glade/calllogs.c
deleted file mode 100644 (file)
index b652f9a..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#include "linphone.h"
-
-void linphone_gtk_call_log_update(GtkWidget *w){
-       GtkTextView *v=GTK_TEXT_VIEW(linphone_gtk_get_widget(w,"logtextview"));
-       GtkTextBuffer *b=gtk_text_view_get_buffer(v);
-       GtkTextIter iter,begin;
-       int off;
-       char *logmsg;
-       const MSList *logs;
-       for (logs=linphone_core_get_call_logs(linphone_gtk_get_core());logs!=NULL;logs=logs->next){
-               LinphoneCallLog *cl=(LinphoneCallLog*)logs->data;
-               logmsg=linphone_call_log_to_str(cl);
-               gtk_text_buffer_get_end_iter(b,&iter);
-               off=gtk_text_iter_get_offset(&iter);
-               gtk_text_buffer_insert(b,&iter,logmsg,-1);
-               gtk_text_buffer_get_end_iter(b,&iter);
-               gtk_text_buffer_insert(b,&iter,"\n",-1);
-               gtk_text_buffer_get_end_iter(b,&iter);
-               gtk_text_buffer_get_iter_at_offset(b,&begin,off);
-               gtk_text_buffer_apply_tag_by_name(b,cl->dir==LinphoneCallOutgoing ? "green" : "blue" ,&begin,&iter);
-               ms_free(logmsg);        
-       }
-       gtk_text_buffer_get_end_iter(b,&iter);
-       gtk_text_view_scroll_to_iter(v,&iter,0,FALSE,0,0);
-}
-
-void linphone_gtk_call_log_response(GtkWidget *w){
-       GtkWidget *mw=linphone_gtk_get_main_window();
-       g_object_set_data(G_OBJECT(mw),"call_logs",NULL);
-       gtk_widget_destroy(w);
-}
-
-GtkWidget * linphone_gtk_show_call_logs(void){
-       GtkWidget *mw=linphone_gtk_get_main_window();
-       GtkTextBuffer *b;
-       GtkWidget *w=(GtkWidget*)g_object_get_data(G_OBJECT(linphone_gtk_get_main_window()),"call_logs");
-       if (w==NULL){
-               w=linphone_gtk_create_window("call_logs");
-               g_object_set_data(G_OBJECT(mw),"call_logs",w);
-               g_signal_connect(G_OBJECT(w),"response",(GCallback)linphone_gtk_call_log_response,NULL);
-               gtk_widget_show(w);
-               b=gtk_text_view_get_buffer(GTK_TEXT_VIEW(linphone_gtk_get_widget(w,"logtextview")));
-               gtk_text_buffer_create_tag(b,"blue","foreground","blue",NULL);
-               gtk_text_buffer_create_tag(b,"green","foreground","green",NULL);
-               linphone_gtk_call_log_update(w);
-       }else gtk_window_present(GTK_WINDOW(w));
-       return w;
-}
-
diff --git a/linphone/gtk-glade/chat.c b/linphone/gtk-glade/chat.c
deleted file mode 100644 (file)
index bc61850..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#include "linphone.h"
-
-GtkWidget * linphone_gtk_init_chatroom(LinphoneChatRoom *cr, const char *with){
-       GtkWidget *w;
-       GtkTextBuffer *b;
-       gchar *tmp;
-       w=linphone_gtk_create_window("chatroom");
-       tmp=g_strdup_printf(_("Chat with %s"),with);
-       gtk_window_set_title(GTK_WINDOW(w),tmp);
-       g_free(tmp);
-       g_object_set_data(G_OBJECT(w),"cr",cr);
-       gtk_widget_show(w);
-       linphone_chat_room_set_user_data(cr,w);
-       b=gtk_text_view_get_buffer(GTK_TEXT_VIEW(linphone_gtk_get_widget(w,"textlog")));
-       gtk_text_buffer_create_tag(b,"blue","foreground","blue",NULL);
-       gtk_text_buffer_create_tag(b,"green","foreground","green",NULL);
-       return w;
-}
-
-void linphone_gtk_create_chatroom(const char *with){
-       LinphoneChatRoom *cr=linphone_core_create_chat_room(linphone_gtk_get_core(),with);
-       if (!cr) return;
-       linphone_gtk_init_chatroom(cr,with);
-}
-
-void linphone_gtk_chat_destroyed(GtkWidget *w){
-       LinphoneChatRoom *cr=(LinphoneChatRoom*)g_object_get_data(G_OBJECT(w),"cr");
-       linphone_chat_room_destroy(cr);
-}
-
-void linphone_gtk_chat_close(GtkWidget *button){
-       GtkWidget *w=gtk_widget_get_toplevel(button);
-       gtk_widget_destroy(w);
-}
-
-void linphone_gtk_push_text(GtkTextView *v, const char *from, const char *message, gboolean me){
-       GtkTextBuffer *b=gtk_text_view_get_buffer(v);
-       GtkTextIter iter,begin;
-       int off;
-       gtk_text_buffer_get_end_iter(b,&iter);
-       off=gtk_text_iter_get_offset(&iter);
-       gtk_text_buffer_insert(b,&iter,from,-1);
-       gtk_text_buffer_get_end_iter(b,&iter);
-       gtk_text_buffer_insert(b,&iter,":\t",-1);
-       gtk_text_buffer_get_end_iter(b,&iter);
-       gtk_text_buffer_get_iter_at_offset(b,&begin,off);
-       gtk_text_buffer_apply_tag_by_name(b,me ? "green" : "blue" ,&begin,&iter);
-       gtk_text_buffer_insert(b,&iter,message,-1);
-       gtk_text_buffer_get_end_iter(b,&iter);
-       gtk_text_buffer_insert(b,&iter,"\n",-1);
-       gtk_text_buffer_get_end_iter(b,&iter);
-       gtk_text_view_scroll_to_iter(v,&iter,0,FALSE,0,0);
-}
-
-const char* linphone_gtk_get_used_identity(){
-       LinphoneCore *lc=linphone_gtk_get_core();
-       LinphoneProxyConfig *cfg;
-       linphone_core_get_default_proxy(lc,&cfg);
-       if (cfg) return linphone_proxy_config_get_identity(cfg);
-       else return linphone_core_get_primary_contact(lc);
-}
-
-void linphone_gtk_send_text(GtkWidget *button){
-       GtkWidget *w=gtk_widget_get_toplevel(button);
-       GtkWidget *entry=linphone_gtk_get_widget(w,"text_entry");
-       LinphoneChatRoom *cr=(LinphoneChatRoom*)g_object_get_data(G_OBJECT(w),"cr");
-       const gchar *entered;
-       entered=gtk_entry_get_text(GTK_ENTRY(entry));
-       if (strlen(entered)>0) {
-               linphone_gtk_push_text(GTK_TEXT_VIEW(linphone_gtk_get_widget(w,"textlog")),
-                               linphone_gtk_get_used_identity(),
-                               entered,TRUE);
-               linphone_chat_room_send_message(cr,entered);
-               gtk_entry_set_text(GTK_ENTRY(entry),"");
-       }
-}
-
-void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, const char *from, const char *message){
-       GtkWidget *w=(GtkWidget*)linphone_chat_room_get_user_data(room);
-       if (w==NULL){
-               w=linphone_gtk_init_chatroom(room,from);
-       }
-       linphone_gtk_push_text(GTK_TEXT_VIEW(linphone_gtk_get_widget(w,"textlog")),
-                               from,
-                               message,FALSE);
-       gtk_window_present(GTK_WINDOW(w));
-       /*gtk_window_set_urgency_hint(GTK_WINDOW(w),TRUE);*/
-}
-
diff --git a/linphone/gtk-glade/chatroom.glade b/linphone/gtk-glade/chatroom.glade
deleted file mode 100644 (file)
index 870ae53..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Wed Jul 30 15:51:13 2008 -->
-<glade-interface>
-  <widget class="GtkWindow" id="chatroom">
-    <signal name="destroy" handler="linphone_gtk_chat_destroyed"/>
-    <child>
-      <widget class="GtkVBox" id="vbox1">
-        <property name="visible">True</property>
-        <child>
-          <widget class="GtkTextView" id="textlog">
-            <property name="width_request">200</property>
-            <property name="height_request">200</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="editable">False</property>
-            <property name="wrap_mode">GTK_WRAP_WORD</property>
-          </widget>
-        </child>
-        <child>
-          <widget class="GtkHBox" id="hbox1">
-            <property name="visible">True</property>
-            <child>
-              <widget class="GtkEntry" id="text_entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="has_focus">True</property>
-                <signal name="activate" handler="linphone_gtk_send_text"/>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkButton" id="send">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="response_id">0</property>
-                <signal name="clicked" handler="linphone_gtk_send_text"/>
-                <child>
-                  <widget class="GtkHBox" id="hbox2">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkImage" id="image1">
-                        <property name="visible">True</property>
-                        <property name="stock">gtk-ok</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label1">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">Send</property>
-                      </widget>
-                      <packing>
-                        <property name="padding">7</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">GTK_BUTTONBOX_END</property>
-            <child>
-              <widget class="GtkButton" id="button1">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="label" translatable="yes">gtk-close</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">0</property>
-                <signal name="clicked" handler="linphone_gtk_chat_close"/>
-              </widget>
-              <packing>
-                <property name="pack_type">GTK_PACK_END</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/linphone/gtk-glade/contact.glade b/linphone/gtk-glade/contact.glade
deleted file mode 100644 (file)
index d16543b..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-<?xml version="1.0"?>
-<glade-interface>
-  <!-- interface-requires gtk+ 2.16 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <widget class="GtkDialog" id="contact">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="border_width">5</property>
-    <property name="window_position">center-on-parent</property>
-    <property name="icon">linphone2.png</property>
-    <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox7">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkFrame" id="frame17">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="label_xalign">0</property>
-            <child>
-              <widget class="GtkAlignment" id="alignment17">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <widget class="GtkVBox" id="vbox13">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkTable" id="table7">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="n_rows">2</property>
-                        <property name="n_columns">2</property>
-                        <child>
-                          <widget class="GtkLabel" id="label45">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Name</property>
-                          </widget>
-                          <packing>
-                            <property name="y_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label46">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">SIP Address</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="y_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="name">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="y_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="sip_address">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="y_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="fill">False</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkCheckButton" id="show_presence">
-                        <property name="label" translatable="yes">Show this contact presence status</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkCheckButton" id="allow_presence">
-                        <property name="label" translatable="yes">Allow this contact to see my presence status</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
-                      </widget>
-                      <packing>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label47">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">&lt;b&gt;Contact information&lt;/b&gt;</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area7">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="layout_style">end</property>
-            <child>
-              <widget class="GtkButton" id="cancel_button">
-                <property name="label" translatable="yes">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="use_stock">True</property>
-                <signal name="clicked" handler="linphone_gtk_contact_cancel"/>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="ok_button">
-                <property name="label" translatable="yes">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="use_stock">True</property>
-                <signal name="clicked" handler="linphone_gtk_contact_ok"/>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/linphone/gtk-glade/fonis.c b/linphone/gtk-glade/fonis.c
deleted file mode 100644 (file)
index dbcbf68..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-
-#include "linphone.h"
-
diff --git a/linphone/gtk-glade/friendlist.c b/linphone/gtk-glade/friendlist.c
deleted file mode 100644 (file)
index 035a107..0000000
+++ /dev/null
@@ -1,588 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#include <gtk/gtk.h>
-#include "linphone.h"
-
-static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list);
-
-enum{
-       FRIEND_PRESENCE_IMG,
-       FRIEND_NAME,
-       FRIEND_PRESENCE_STATUS,
-       FRIEND_ID,
-       FRIEND_SIP_ADDRESS,
-       FRIEND_ICON,
-       FRIEND_LIST_NCOL
-};
-
-
-typedef struct _status_picture_tab_t{
-       LinphoneOnlineStatus status;
-       const char *img;
-} status_picture_tab_t;
-
-status_picture_tab_t status_picture_tab[]={
-       {       LINPHONE_STATUS_UNKNOWN,        "sip-closed.png"        },
-       {       LINPHONE_STATUS_ONLINE,         "sip-online.png"        },
-       {       LINPHONE_STATUS_BUSY,           "sip-busy.png"          },
-       {       LINPHONE_STATUS_BERIGHTBACK,    "sip-bifm.png"          },
-       {       LINPHONE_STATUS_AWAY,           "sip-away.png"          },
-       {       LINPHONE_STATUS_ONTHEPHONE,     "sip-otp.png"           },
-       {       LINPHONE_STATUS_OUTTOLUNCH,     "sip-otl.png"           },
-       {       LINPHONE_STATUS_NOT_DISTURB,    "sip-closed.png"        },
-       {       LINPHONE_STATUS_MOVED,          "sip-closed.png"        },
-       {       LINPHONE_STATUS_ALT_SERVICE,    "sip-closed.png"        },
-       {       LINPHONE_STATUS_OFFLINE,        "sip-away.png"          },
-       {       LINPHONE_STATUS_PENDING,        "sip-wfa.png"           },
-       {       LINPHONE_STATUS_CLOSED,         "sip-closed.png"        },
-       {       LINPHONE_STATUS_END,            NULL                    },
-};
-
-static GdkPixbuf *create_status_picture(LinphoneOnlineStatus ss){
-       status_picture_tab_t *t=status_picture_tab;
-       while(t->img!=NULL){
-               if (ss==t->status){
-                       GdkPixbuf *pixbuf;
-                       pixbuf = create_pixbuf(t->img);
-                       return pixbuf;
-               }
-               ++t;
-       }
-       g_error("No pixmap defined for status %i",ss);
-       return NULL;
-}
-
-void linphone_gtk_set_friend_status(GtkWidget *friendlist , LinphoneFriend * fid, const gchar *url, const gchar *status, const gchar *img){
-       GtkTreeIter iter;
-       LinphoneFriend *tmp=0;
-       gboolean found=FALSE;
-       GtkTreeModel *model=gtk_tree_view_get_model(GTK_TREE_VIEW(friendlist));
-       if (gtk_tree_model_get_iter_first(model,&iter)) {
-               do{
-                       gtk_tree_model_get(model,&iter,FRIEND_ID,&tmp,-1);
-                       //printf("tmp=%i, fid=%i",tmp,fid);
-                       if (fid==tmp) {
-                               GdkPixbuf *pixbuf;
-                               gtk_list_store_set(GTK_LIST_STORE(model),&iter,FRIEND_PRESENCE_STATUS,status,-1);
-                               pixbuf = create_pixbuf(img);
-                               if (pixbuf)
-                                 {
-                                   gtk_list_store_set(GTK_LIST_STORE(model),&iter,FRIEND_PRESENCE_IMG, pixbuf,-1);
-                                 }
-                                 found=TRUE;
-                       }
-               }while(gtk_tree_model_iter_next(model,&iter));
-       }
-       
-}
-
-
-static void linphone_gtk_set_selection_to_uri_bar(GtkTreeView *treeview){
-       GtkTreeSelection *select;
-       GtkTreeIter iter;
-       GtkTreeModel *model;
-       LinphoneFriend *lf=NULL;
-       gchar* friend;
-       select = gtk_tree_view_get_selection (treeview);
-       if (gtk_tree_selection_get_selected (select, &model, &iter))
-       {
-               gtk_tree_model_get (model, &iter,FRIEND_ID , &lf, -1);
-               friend=linphone_address_as_string(linphone_friend_get_uri(lf));
-               gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"uribar")),friend);
-               ms_free(friend);
-       }
-}
-
-static void linphone_gtk_call_selected(GtkTreeView *treeview){
-       linphone_gtk_set_selection_to_uri_bar(treeview);
-       linphone_gtk_start_call(linphone_gtk_get_widget(gtk_widget_get_toplevel(GTK_WIDGET(treeview)),
-                                       "start_call"));
-}
-
-void linphone_gtk_contact_activated(GtkTreeView     *treeview,
-                                    GtkTreePath     *path,
-                                    GtkTreeViewColumn *column,
-                                        gpointer         user_data)
-{
-       linphone_gtk_call_selected(treeview);
-}
-
-void linphone_gtk_contact_clicked(GtkTreeView     *treeview){
-       linphone_gtk_set_selection_to_uri_bar(treeview);
-}
-
-static GtkWidget * create_presence_menu(){
-       GtkWidget *menu=gtk_menu_new();
-       GtkWidget *menu_item;
-       GdkPixbuf *pbuf;
-       status_picture_tab_t *t;
-       for(t=status_picture_tab;t->img!=NULL;++t){
-               if (t->status==LINPHONE_STATUS_UNKNOWN ||
-                       t->status==LINPHONE_STATUS_PENDING){
-                       continue;
-               }
-               menu_item=gtk_image_menu_item_new_with_label(linphone_online_status_to_string(t->status));
-               pbuf=create_status_picture(t->status);
-               gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),
-                                               gtk_image_new_from_pixbuf(pbuf));
-               g_object_unref(G_OBJECT(pbuf));
-               gtk_widget_show(menu_item);
-               gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
-               g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_set_my_presence,GINT_TO_POINTER(t->status));
-       }
-       return menu;
-}
-
-void linphone_gtk_set_my_presence(LinphoneOnlineStatus ss){
-       GtkWidget *button=linphone_gtk_get_widget(linphone_gtk_get_main_window(),"presence_button");
-       GdkPixbuf *pbuf=create_status_picture(ss);
-       GtkWidget *image=gtk_image_new_from_pixbuf(pbuf);
-       GtkWidget *menu;
-       g_object_unref(G_OBJECT(pbuf));
-       gtk_button_set_label(GTK_BUTTON(button),linphone_online_status_to_string(ss));
-       gtk_button_set_image(GTK_BUTTON(button),image);
-       /*prepare menu*/
-       menu=(GtkWidget*)g_object_get_data(G_OBJECT(button),"presence_menu");
-       if (menu==NULL){
-               menu=create_presence_menu();
-               /*the menu is destroyed when the button is destroyed*/
-               g_object_weak_ref(G_OBJECT(button),(GWeakNotify)gtk_widget_destroy,menu);
-               g_object_set_data(G_OBJECT(button),"presence_menu",menu);
-       }
-       linphone_core_set_presence_info(linphone_gtk_get_core(),0,NULL,ss);
-}
-
-void linphone_gtk_my_presence_clicked(GtkWidget *button){
-       GtkWidget *menu=(GtkWidget*)g_object_get_data(G_OBJECT(button),"presence_menu");
-       gtk_menu_popup(GTK_MENU(menu),NULL,NULL,NULL,NULL,0,
-                       gtk_get_current_event_time());
-       gtk_widget_show(menu);
-}
-
-
-static void linphone_gtk_friend_list_init(GtkWidget *friendlist)
-{
-       GtkListStore *store;
-       GtkCellRenderer *renderer;
-       GtkTreeViewColumn *column;
-       GtkTreeSelection *select;
-       
-       
-       store = gtk_list_store_new(FRIEND_LIST_NCOL, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING,  G_TYPE_POINTER,
-                                       G_TYPE_STRING, GDK_TYPE_PIXBUF);
-
-       gtk_tree_view_set_model(GTK_TREE_VIEW(friendlist),GTK_TREE_MODEL(store));
-       g_object_unref(G_OBJECT(store));
-
-       renderer = gtk_cell_renderer_pixbuf_new ();
-       column = gtk_tree_view_column_new_with_attributes (_("Name"),
-                                                   renderer,
-                                                   "pixbuf", FRIEND_ICON,
-                                                   NULL);
-       g_object_set (G_OBJECT(column), "resizable", TRUE, NULL);
-       renderer = gtk_cell_renderer_text_new ();
-       gtk_tree_view_column_pack_start(column,renderer,FALSE);
-       gtk_tree_view_column_add_attribute  (column,renderer,
-                                                         "text",
-                                                         FRIEND_NAME);
-       
-       gtk_tree_view_append_column (GTK_TREE_VIEW (friendlist), column);
-
-       column = gtk_tree_view_column_new_with_attributes (_("Presence status"),
-                                                   renderer,
-                                                   "text", FRIEND_PRESENCE_STATUS,
-                                                   NULL);
-       g_object_set (G_OBJECT(column), "resizable", TRUE, NULL);
-       gtk_tree_view_column_set_visible(column,linphone_gtk_get_ui_config_int("friendlist_status",1));
-       
-       renderer = gtk_cell_renderer_pixbuf_new();
-       gtk_tree_view_column_pack_start(column,renderer,FALSE);
-       gtk_tree_view_column_add_attribute  (column,renderer,
-                                                         "pixbuf",
-                                                         FRIEND_PRESENCE_IMG);
-       gtk_tree_view_append_column (GTK_TREE_VIEW (friendlist), column);
-
-       select = gtk_tree_view_get_selection (GTK_TREE_VIEW (friendlist));
-       gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
-#if GTK_CHECK_VERSION(2,12,0)
-       gtk_tree_view_set_tooltip_column(GTK_TREE_VIEW(friendlist),FRIEND_SIP_ADDRESS);
-#endif
-       gtk_combo_box_set_active(GTK_COMBO_BOX(linphone_gtk_get_widget(
-                                       gtk_widget_get_toplevel(friendlist),"show_category")),0);
-}
-
-void linphone_gtk_show_directory_search(void){
-       LinphoneProxyConfig *cfg=NULL;
-       SipSetupContext * ssc=NULL;
-       GtkWidget *mw=linphone_gtk_get_main_window();
-       GtkWidget *search_box=linphone_gtk_get_widget(mw,"directory_search_box");
-
-       linphone_core_get_default_proxy(linphone_gtk_get_core(),&cfg);
-       if (cfg){
-               ssc=linphone_proxy_config_get_sip_setup_context(cfg);
-               if (ssc!=NULL && sip_setup_context_get_capabilities(ssc) & SIP_SETUP_CAP_BUDDY_LOOKUP){
-                       GtkWidget *entry=linphone_gtk_get_widget(mw,"directory_search_entry");
-                       gchar  *tooltip;
-                       GdkColor grey={0,40000,40000,40000};
-                       gtk_widget_show(search_box);
-                       tooltip=g_strdup_printf(_("Search in %s directory"),linphone_proxy_config_get_domain(cfg));
-                       gtk_widget_modify_text(entry,GTK_STATE_NORMAL,&grey);
-                       gtk_entry_set_text(GTK_ENTRY(entry),tooltip);
-                       g_object_set_data(G_OBJECT(entry),"active",GINT_TO_POINTER(0));
-                       g_free(tooltip);
-                       return;
-               }
-       }
-       gtk_widget_hide(search_box);
-}
-
-gboolean linphone_gtk_directory_search_focus_out(GtkWidget *entry){
-       if (gtk_entry_get_text_length(GTK_ENTRY(entry))==0)
-               linphone_gtk_show_directory_search();
-       return FALSE;
-}
-
-gboolean linphone_gtk_directory_search_focus_in(GtkWidget *entry){
-       if (GPOINTER_TO_INT(g_object_get_data(G_OBJECT(entry),"active"))==0){
-               gtk_entry_set_text(GTK_ENTRY(entry),"");
-               gtk_widget_modify_text(entry,GTK_STATE_NORMAL,NULL);
-               g_object_set_data(G_OBJECT(entry),"active",GINT_TO_POINTER(1));
-       }
-       return FALSE;
-}
-
-void linphone_gtk_directory_search_activate(GtkWidget *entry){
-       LinphoneProxyConfig *cfg;
-       linphone_core_get_default_proxy(linphone_gtk_get_core(),&cfg);
-       GtkWidget *w=linphone_gtk_show_buddy_lookup_window(linphone_proxy_config_get_sip_setup_context(cfg));
-       if (GPOINTER_TO_INT(g_object_get_data(G_OBJECT(entry),"active"))==1)
-               linphone_gtk_buddy_lookup_set_keyword(w,gtk_entry_get_text(GTK_ENTRY(entry)));
-}
-
-void linphone_gtk_directory_search_button_clicked(GtkWidget *button){
-       linphone_gtk_directory_search_activate(
-               linphone_gtk_get_widget(gtk_widget_get_toplevel(button),"directory_search_entry"));
-}
-
-void linphone_gtk_show_friends(void){
-       GtkWidget *mw=linphone_gtk_get_main_window();
-       GtkWidget *friendlist=linphone_gtk_get_widget(mw,"contact_list");
-       GtkListStore *store=NULL;
-       GtkTreeIter iter;
-       const MSList *itf;
-       GtkWidget *category=linphone_gtk_get_widget(mw,"show_category");
-       GtkWidget *filter=linphone_gtk_get_widget(mw,"search_bar");
-       LinphoneCore *core=linphone_gtk_get_core();
-       const gchar *search=NULL;
-       gboolean online_only=FALSE,lookup=FALSE;
-       
-       linphone_gtk_show_directory_search();
-
-       if (gtk_tree_view_get_model(GTK_TREE_VIEW(friendlist))==NULL){
-               linphone_gtk_friend_list_init(friendlist);
-       }
-       store=GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(friendlist)));
-       gtk_list_store_clear(store);
-
-       online_only=(gtk_combo_box_get_active(GTK_COMBO_BOX(category))==1);
-       search=gtk_entry_get_text(GTK_ENTRY(filter));
-       if (search==NULL || search[0]=='\0')
-               lookup=FALSE;
-       else lookup=TRUE;
-
-       for(itf=linphone_core_get_friend_list(core);itf!=NULL;itf=ms_list_next(itf)){
-               LinphoneFriend *lf=(LinphoneFriend*)itf->data;
-               const LinphoneAddress *f_uri=linphone_friend_get_uri(lf);
-               char *uri=linphone_address_as_string(f_uri);
-               const char *name=linphone_address_get_display_name(f_uri);
-               const char *display=name;
-               char *escaped=NULL;
-               if (lookup){
-                       if (strstr(uri,search)==NULL){
-                               ms_free(uri);
-                               continue;
-                       }
-               }
-               if (!online_only || (linphone_friend_get_status(lf)!=LINPHONE_STATUS_OFFLINE)){
-                       BuddyInfo *bi;
-                       if (name==NULL || name[0]=='\0') display=uri;
-                       gtk_list_store_append(store,&iter);
-                       gtk_list_store_set(store,&iter,FRIEND_NAME, display,
-                                       FRIEND_PRESENCE_STATUS, linphone_online_status_to_string(linphone_friend_get_status(lf)),
-                                       FRIEND_ID,lf,-1);
-                       gtk_list_store_set(store,&iter,
-                               FRIEND_PRESENCE_IMG, create_status_picture(linphone_friend_get_status(lf)),
-                               -1);
-                       escaped=g_markup_escape_text(uri,-1);
-                       gtk_list_store_set(store,&iter,FRIEND_SIP_ADDRESS,escaped,-1);
-                       g_free(escaped);
-                       bi=linphone_friend_get_info(lf);
-                       if (bi!=NULL && bi->image_data!=NULL){
-                               GdkPixbuf *pbuf=
-                                       _gdk_pixbuf_new_from_memory_at_scale(bi->image_data,bi->image_length,-1,40,TRUE);
-                               if (pbuf) {
-                                       gtk_list_store_set(store,&iter,FRIEND_ICON,pbuf,-1);
-                                       g_object_unref(G_OBJECT(pbuf));
-                               }
-                       }
-               }
-               ms_free(uri);
-       }
-}
-
-void linphone_gtk_add_contact(void){
-       GtkWidget *w=linphone_gtk_create_window("contact");
-       int presence_enabled=linphone_gtk_get_ui_config_int("use_subscribe_notify",1);
-       
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"show_presence")),presence_enabled);
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"allow_presence")),
-                                       presence_enabled);
-       gtk_widget_show(w);
-}
-
-void linphone_gtk_remove_contact(GtkWidget *button){
-       GtkWidget *w=gtk_widget_get_toplevel(button);
-       GtkTreeSelection *select;
-       GtkTreeIter iter;
-       GtkTreeModel *model;
-       LinphoneFriend *lf=NULL;
-       select = gtk_tree_view_get_selection(GTK_TREE_VIEW(linphone_gtk_get_widget(w,"contact_list")));
-       if (gtk_tree_selection_get_selected (select, &model, &iter))
-       {
-               gtk_tree_model_get (model, &iter,FRIEND_ID , &lf, -1);
-               linphone_core_remove_friend(linphone_gtk_get_core(),lf);
-               linphone_gtk_show_friends();
-       }
-}
-
-void linphone_gtk_show_contact(LinphoneFriend *lf){
-       GtkWidget *w=linphone_gtk_create_window("contact");
-       char *uri;
-       const char *name;
-       const LinphoneAddress *f_uri=linphone_friend_get_uri(lf);
-       uri=linphone_address_as_string_uri_only(f_uri);
-       name=linphone_address_get_display_name(f_uri);
-       if (uri) {
-               gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"sip_address")),uri);
-               ms_free(uri);
-       }
-       if (name){
-               gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"name")),name);
-       }
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"show_presence")),
-                                       linphone_friend_get_send_subscribe(lf));
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"allow_presence")),
-                                       linphone_friend_get_inc_subscribe_policy(lf)==LinphoneSPAccept);
-       g_object_set_data(G_OBJECT(w),"friend_ref",(gpointer)lf);
-       gtk_widget_show(w);
-}
-
-void linphone_gtk_edit_contact(GtkWidget *button){
-       GtkWidget *w=gtk_widget_get_toplevel(button);
-       GtkTreeSelection *select;
-       GtkTreeIter iter;
-       GtkTreeModel *model;
-       LinphoneFriend *lf=NULL;
-       select = gtk_tree_view_get_selection(GTK_TREE_VIEW(linphone_gtk_get_widget(w,"contact_list")));
-       if (gtk_tree_selection_get_selected (select, &model, &iter))
-       {
-               gtk_tree_model_get (model, &iter,FRIEND_ID , &lf, -1);
-               linphone_gtk_show_contact(lf);
-       }
-}
-
-void linphone_gtk_chat_selected(GtkWidget *item){
-       GtkWidget *w=gtk_widget_get_toplevel(item);
-       GtkTreeSelection *select;
-       GtkTreeIter iter;
-       GtkTreeModel *model;
-       LinphoneFriend *lf=NULL;
-       select = gtk_tree_view_get_selection(GTK_TREE_VIEW(linphone_gtk_get_widget(w,"contact_list")));
-       if (gtk_tree_selection_get_selected (select, &model, &iter))
-       {
-               char *uri;
-               gtk_tree_model_get (model, &iter,FRIEND_ID , &lf, -1);
-               uri=linphone_address_as_string(linphone_friend_get_uri(lf));
-               linphone_gtk_create_chatroom(uri);
-               ms_free(uri);
-       }
-}
-
-void linphone_gtk_contact_cancel(GtkWidget *button){
-       gtk_widget_destroy(gtk_widget_get_toplevel(button));
-}
-
-void linphone_gtk_contact_ok(GtkWidget *button){
-       GtkWidget *w=gtk_widget_get_toplevel(button);
-       LinphoneFriend *lf=(LinphoneFriend*)g_object_get_data(G_OBJECT(w),"friend_ref");
-       char *fixed_uri=NULL;
-       gboolean show_presence=FALSE,allow_presence=FALSE;
-       const gchar *name,*uri;
-       if (lf==NULL){
-               lf=linphone_friend_new();
-               if (linphone_gtk_get_ui_config_int("use_subscribe_notify",1)==1){
-                       show_presence=FALSE;
-                       allow_presence=FALSE;
-               }
-               linphone_friend_set_inc_subscribe_policy(lf,allow_presence ? LinphoneSPAccept : LinphoneSPDeny);
-               linphone_friend_send_subscribe(lf,show_presence);
-       }
-       name=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(w,"name")));
-       uri=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(w,"sip_address")));
-       show_presence=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"show_presence")));
-       allow_presence=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"allow_presence")));
-       linphone_core_interpret_friend_uri(linphone_gtk_get_core(),uri,&fixed_uri);
-       if (fixed_uri==NULL){
-               linphone_gtk_display_something(GTK_MESSAGE_WARNING,_("Invalid sip contact !"));
-               return ;
-       }
-       linphone_friend_set_sip_addr(lf,fixed_uri);
-       ms_free(fixed_uri);
-       linphone_friend_set_name(lf,name);
-       linphone_friend_send_subscribe(lf,show_presence);
-       linphone_friend_set_inc_subscribe_policy(lf,allow_presence==TRUE ? LinphoneSPAccept : LinphoneSPDeny);
-       if (linphone_friend_in_list(lf)) {
-               linphone_friend_done(lf);
-       }else{
-               linphone_core_add_friend(linphone_gtk_get_core(),lf);
-       }
-       linphone_gtk_show_friends();
-       gtk_widget_destroy(w);
-}
-
-static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list){
-       GtkWidget *menu=gtk_menu_new();
-       GtkWidget *menu_item;
-       gchar *call_label=NULL;
-       gchar *text_label=NULL;
-       gchar *edit_label=NULL;
-       gchar *delete_label=NULL;
-       gchar *name=NULL;
-       GtkTreeSelection *select;
-       GtkTreeIter iter;
-       GtkTreeModel *model;
-       GtkWidget *image;
-       LinphoneCore *lc=linphone_gtk_get_core();
-       LinphoneProxyConfig *cfg=NULL;
-       SipSetupContext * ssc=NULL;
-
-       linphone_core_get_default_proxy(lc,&cfg);
-       if (cfg){
-               ssc=linphone_proxy_config_get_sip_setup_context(cfg);
-       }
-
-       g_signal_connect(G_OBJECT(menu), "selection-done", G_CALLBACK (gtk_widget_destroy), NULL);
-       select = gtk_tree_view_get_selection(GTK_TREE_VIEW(contact_list));
-       if (gtk_tree_selection_get_selected (select, &model, &iter)){
-               gtk_tree_model_get(model, &iter,FRIEND_NAME , &name, -1);
-               call_label=g_strdup_printf(_("Call %s"),name);
-               text_label=g_strdup_printf(_("Send text to %s"),name);
-               edit_label=g_strdup_printf(_("Edit contact '%s'"),name);
-               delete_label=g_strdup_printf(_("Delete contact '%s'"),name);
-               g_free(name);
-       }
-       if (call_label){
-               menu_item=gtk_image_menu_item_new_with_label(call_label);
-               image=gtk_image_new_from_stock(GTK_STOCK_NETWORK,GTK_ICON_SIZE_MENU);
-               gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
-               gtk_widget_show(image);
-               gtk_widget_show(menu_item);
-               gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
-               g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_call_selected,contact_list);
-       }
-       if (text_label){
-               menu_item=gtk_image_menu_item_new_with_label(text_label);
-               image=gtk_image_new_from_stock(GTK_STOCK_NETWORK,GTK_ICON_SIZE_MENU);
-               gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
-               gtk_widget_show(image);
-               gtk_widget_show(menu_item);
-               gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
-               g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_chat_selected,contact_list);
-       }
-       if (edit_label){
-               menu_item=gtk_image_menu_item_new_with_label(edit_label);
-               image=gtk_image_new_from_stock(GTK_STOCK_EDIT,GTK_ICON_SIZE_MENU);
-               gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
-               gtk_widget_show(image);
-               gtk_widget_show(menu_item);
-               gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
-               g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_edit_contact,contact_list);
-       }
-       if (delete_label){
-               menu_item=gtk_image_menu_item_new_with_label(delete_label);
-               image=gtk_image_new_from_stock(GTK_STOCK_DELETE,GTK_ICON_SIZE_MENU);
-               gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
-               gtk_widget_show(image);
-               gtk_widget_show(menu_item);
-               gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
-               g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_remove_contact,contact_list);
-       }
-       
-
-       if (ssc && (sip_setup_context_get_capabilities(ssc) & SIP_SETUP_CAP_BUDDY_LOOKUP)) {
-               gchar *tmp=g_strdup_printf(_("Add new contact from %s directory"),linphone_proxy_config_get_domain(cfg));
-               menu_item=gtk_image_menu_item_new_with_label(tmp);
-               g_free(tmp);
-               image=gtk_image_new_from_stock(GTK_STOCK_ADD,GTK_ICON_SIZE_MENU);
-               gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
-               gtk_widget_show(image);
-               gtk_widget_show(menu_item);
-               gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
-               g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_show_buddy_lookup_window,ssc);
-               gtk_widget_show(menu);
-       }
-       
-       menu_item=gtk_image_menu_item_new_from_stock(GTK_STOCK_ADD,NULL);
-       gtk_widget_show(menu_item);
-       gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
-       g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_add_contact,contact_list);
-       gtk_widget_show(menu);
-       gtk_menu_attach_to_widget (GTK_MENU (menu), contact_list, NULL);
-
-       if (call_label) g_free(call_label);
-       if (text_label) g_free(text_label);
-       if (edit_label) g_free(edit_label);
-       if (delete_label) g_free(delete_label);
-       return menu;
-}
-
-
-gboolean linphone_gtk_popup_contact_menu(GtkWidget *list, GdkEventButton *event){
-       GtkWidget *m=linphone_gtk_create_contact_menu(list);
-       gtk_menu_popup (GTK_MENU (m), NULL, NULL, NULL, NULL, 
-                  event ? event->button : 0, event ? event->time : gtk_get_current_event_time());
-       return TRUE;
-}
-
-gboolean linphone_gtk_contact_list_button_pressed(GtkWidget *widget, GdkEventButton *event){
-       /* Ignore double-clicks and triple-clicks */
-       if (event->button == 3 && event->type == GDK_BUTTON_PRESS)
-       {
-               return linphone_gtk_popup_contact_menu(widget, event);
-       }
-       return FALSE;
-}
-
-void linphone_gtk_buddy_info_updated(LinphoneCore *lc, LinphoneFriend *lf){
-       /*refresh the entire list*/
-       linphone_gtk_show_friends();
-}
-
-
diff --git a/linphone/gtk-glade/gtkrc b/linphone/gtk-glade/gtkrc
deleted file mode 100644 (file)
index 73d2174..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#include "share/themes/XLiquid_GTK-1.0.3/gtk-2.0/gtkrc"
-#include "share/themes/Aero-ion3.1/gtk-2.0/gtkrc"
-include "share/themes/Outcrop/gtk-2.0/gtkrc"
-
diff --git a/linphone/gtk-glade/incall_view.c b/linphone/gtk-glade/incall_view.c
deleted file mode 100644 (file)
index 4d38dc9..0000000
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2009  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-/*
-*  C Implementation: incall_frame
-*
-* Description: 
-*
-*
-* Author: Simon Morlat <simon.morlat@linphone.org>, (C) 2009
-*
-*
-*/
-
-#include "linphone.h"
-
-
-gboolean linphone_gtk_use_in_call_view(){
-       static int val=-1;
-       if (val==-1) val=linphone_gtk_get_ui_config_int("use_incall_view",1);
-       return val;
-}
-
-void linphone_gtk_show_in_call_view(void){
-       GtkWidget *main_window=linphone_gtk_get_main_window();
-       GtkWidget *idle_frame=linphone_gtk_get_widget(main_window,"idle_frame");
-       GtkWidget *in_call_frame=linphone_gtk_get_widget(main_window,"in_call_frame");
-       gtk_widget_hide(idle_frame);
-       gtk_widget_show(in_call_frame);
-}
-
-void linphone_gtk_show_idle_view(void){
-       GtkWidget *main_window=linphone_gtk_get_main_window();
-       GtkWidget *idle_frame=linphone_gtk_get_widget(main_window,"idle_frame");
-       GtkWidget *in_call_frame=linphone_gtk_get_widget(main_window,"in_call_frame");
-       gtk_widget_show(idle_frame);
-       gtk_widget_hide(in_call_frame);
-}
-
-void display_peer_name_in_label(GtkWidget *label, const char *uri){
-       LinphoneAddress *from;
-       const char *displayname=NULL;
-       char *id=NULL;
-       char *uri_label;
-
-       if (uri==NULL) {
-               ms_error("Strange: in call with nobody ?");
-               return;
-       }
-
-       from=linphone_address_new(uri);
-       if (from!=NULL){
-               
-               if (linphone_address_get_display_name(from))
-                       displayname=linphone_address_get_display_name(from);
-
-               id=linphone_address_as_string_uri_only(from);
-
-       }else id=ms_strdup(uri);
-
-       if (displayname!=NULL)
-               uri_label=g_markup_printf_escaped("<span size=\"large\">%s</span>\n<i>%s</i>", 
-                       displayname,id);
-       else
-               uri_label=g_markup_printf_escaped("<span size=\"large\"><i>%s</i></span>\n",id);
-       gtk_label_set_markup(GTK_LABEL(label),uri_label);
-       ms_free(id);
-       g_free(uri_label);
-       if (from!=NULL) linphone_address_destroy(from);
-}
-
-void linphone_gtk_in_call_view_set_calling(const char *uri){
-       GtkWidget *main_window=linphone_gtk_get_main_window();
-       GtkWidget *status=linphone_gtk_get_widget(main_window,"in_call_status");
-       GtkWidget *callee=linphone_gtk_get_widget(main_window,"in_call_uri");
-       GtkWidget *duration=linphone_gtk_get_widget(main_window,"in_call_duration");
-       GtkWidget *animation=linphone_gtk_get_widget(main_window,"in_call_animation");
-       GdkPixbufAnimation *pbuf=create_pixbuf_animation("calling_anim.gif");
-       GtkWidget *terminate_button=linphone_gtk_get_widget(main_window,"in_call_terminate");
-
-       gtk_widget_set_sensitive(terminate_button,TRUE);
-       gtk_label_set_markup(GTK_LABEL(status),_("<b>Calling...</b>"));
-       display_peer_name_in_label(callee,uri);
-       
-       gtk_label_set_text(GTK_LABEL(duration),"00:00:00");
-       if (pbuf!=NULL){
-               gtk_image_set_from_animation(GTK_IMAGE(animation),pbuf);
-               g_object_unref(G_OBJECT(pbuf));
-       }else gtk_image_set_from_stock(GTK_IMAGE(animation),GTK_STOCK_INFO,GTK_ICON_SIZE_DIALOG);
-}
-
-void linphone_gtk_in_call_view_set_in_call(){
-       LinphoneCore *lc=linphone_gtk_get_core();
-       GtkWidget *main_window=linphone_gtk_get_main_window();
-       GtkWidget *status=linphone_gtk_get_widget(main_window,"in_call_status");
-       GtkWidget *callee=linphone_gtk_get_widget(main_window,"in_call_uri");
-       GtkWidget *duration=linphone_gtk_get_widget(main_window,"in_call_duration");
-       GtkWidget *animation=linphone_gtk_get_widget(main_window,"in_call_animation");
-       GdkPixbufAnimation *pbuf=create_pixbuf_animation("incall_anim.gif");
-       GtkWidget *terminate_button=linphone_gtk_get_widget(main_window,"in_call_terminate");
-       const LinphoneAddress *uri=linphone_core_get_remote_uri(lc);
-       char *tmp=linphone_address_as_string(uri);
-       display_peer_name_in_label(callee,tmp);
-       ms_free(tmp);
-
-       gtk_widget_set_sensitive(terminate_button,TRUE);
-       gtk_label_set_markup(GTK_LABEL(status),_("<b>In call with</b>"));
-
-       gtk_label_set_text(GTK_LABEL(duration),_("00::00::00"));
-       if (pbuf!=NULL){
-               gtk_image_set_from_animation(GTK_IMAGE(animation),pbuf);
-               g_object_unref(G_OBJECT(pbuf));
-       }else gtk_image_set_from_stock(GTK_IMAGE(animation),GTK_STOCK_INFO,GTK_ICON_SIZE_DIALOG);
-       linphone_gtk_enable_mute_button(
-               GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(main_window,"incall_mute")),TRUE);
-}
-
-void linphone_gtk_in_call_view_update_duration(int duration){
-       GtkWidget *main_window=linphone_gtk_get_main_window();
-       GtkWidget *duration_label=linphone_gtk_get_widget(main_window,"in_call_duration");
-       char tmp[256]={0};
-       int seconds=duration%60;
-       int minutes=(duration/60)%60;
-       int hours=duration/3600;
-       snprintf(tmp,sizeof(tmp)-1,_("%02i::%02i::%02i"),hours,minutes,seconds);
-       gtk_label_set_text(GTK_LABEL(duration_label),tmp);
-}
-
-static gboolean in_call_view_terminated(){
-       linphone_gtk_show_idle_view();
-       return FALSE;
-}
-
-void linphone_gtk_in_call_view_terminate(const char *error_msg){
-       GtkWidget *main_window=linphone_gtk_get_main_window();
-       GtkWidget *status=linphone_gtk_get_widget(main_window,"in_call_status");
-       GtkWidget *animation=linphone_gtk_get_widget(main_window,"in_call_animation");
-       GtkWidget *terminate_button=linphone_gtk_get_widget(main_window,"in_call_terminate");
-       GdkPixbuf *pbuf=create_pixbuf(linphone_gtk_get_ui_config("stop_call_icon","red.png"));
-
-       gtk_widget_set_sensitive(terminate_button,FALSE);
-       if (error_msg==NULL)
-               gtk_label_set_markup(GTK_LABEL(status),_("<b>Call ended.</b>"));
-       else{
-               char *msg=g_markup_printf_escaped("<span color=\"red\"><b>%s</b></span>",error_msg);
-               gtk_label_set_markup(GTK_LABEL(status),msg);
-               g_free(msg);
-       }
-       if (pbuf!=NULL){
-               gtk_image_set_from_pixbuf(GTK_IMAGE(animation),pbuf);
-               g_object_unref(G_OBJECT(pbuf));
-       }
-       linphone_gtk_enable_mute_button(
-               GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(main_window,"incall_mute")),FALSE);
-       g_timeout_add_seconds(2,(GSourceFunc)in_call_view_terminated,NULL);
-}
-
-void linphone_gtk_draw_mute_button(GtkToggleButton *button, gboolean active){
-       if (active){
-               GtkWidget *image=create_pixmap("mic_muted.png");
-               gtk_button_set_label(GTK_BUTTON(button),_("Unmute"));
-               if (image!=NULL) gtk_button_set_image(GTK_BUTTON(button),image);
-       }else{
-               GtkWidget *image=create_pixmap("mic_active.png");
-               gtk_button_set_label(GTK_BUTTON(button),_("Mute"));
-               if (image!=NULL) gtk_button_set_image(GTK_BUTTON(button),image);
-       }
-}
-
-void linphone_gtk_mute_toggled(GtkToggleButton *button){
-       gboolean active=gtk_toggle_button_get_active(button);
-       linphone_core_mute_mic(linphone_gtk_get_core(),active);
-       linphone_gtk_draw_mute_button(button,active);
-}
-
-void linphone_gtk_enable_mute_button(GtkToggleButton *button, gboolean sensitive){
-       gtk_widget_set_sensitive(GTK_WIDGET(button),sensitive);
-       linphone_gtk_draw_mute_button(button,FALSE);
-}
diff --git a/linphone/gtk-glade/incoming_call.glade b/linphone/gtk-glade/incoming_call.glade
deleted file mode 100644 (file)
index 14c8948..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-<?xml version="1.0"?>
-<glade-interface>
-  <!-- interface-requires gtk+ 2.16 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <widget class="GtkDialog" id="incoming_call">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="border_width">5</property>
-    <property name="type">popup</property>
-    <property name="title" translatable="yes">Linphone - Incoming call</property>
-    <property name="window_position">center-on-parent</property>
-    <property name="icon">linphone2.png</property>
-    <property name="type_hint">notification</property>
-    <property name="urgency_hint">True</property>
-    <property name="deletable">False</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox8">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkFrame" id="frame16">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="label_xalign">0</property>
-            <child>
-              <widget class="GtkAlignment" id="alignment16">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <widget class="GtkLabel" id="message">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Incoming call from</property>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label43">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Incoming call</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area7">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="layout_style">spread</property>
-            <child>
-              <widget class="GtkButton" id="accept_call">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <signal name="clicked" handler="linphone_gtk_accept_call"/>
-                <child>
-                  <widget class="GtkHBox" id="hbox17">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkImage" id="image12">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="stock">gtk-yes</property>
-                      </widget>
-                      <packing>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label44">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Accept</property>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="decline_cal">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <signal name="clicked" handler="linphone_gtk_decline_call"/>
-                <child>
-                  <widget class="GtkHBox" id="hbox20">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkImage" id="image13">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="stock">gtk-no</property>
-                      </widget>
-                      <packing>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="decline_call">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Decline</property>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/linphone/gtk-glade/linphone.h b/linphone/gtk-glade/linphone.h
deleted file mode 100644 (file)
index d7185c9..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gtk/gtk.h>
-#ifdef WIN32
-// alloca is already defined by gtk
-#undef alloca
-#endif
-#include "linphonecore.h"
-
-#include <libintl.h>
-#ifndef _
-#define _(String) gettext (String)
-#endif
-
-#ifdef USE_BUILDDATE_VERSION
-#include "version_date.h"
-#undef LINPHONE_VERSION
-#define LINPHONE_VERSION LINPHONE_VERSION_DATE
-#endif
-
-GdkPixbuf * create_pixbuf(const gchar *filename);
-GdkPixbufAnimation *create_pixbuf_animation(const gchar *filename);
-void add_pixmap_directory(const gchar *directory);
-GtkWidget*create_pixmap(const gchar     *filename);
-GtkWidget *_gtk_image_new_from_memory_at_scale(const void *data, gint len, gint w, gint h, gboolean preserve_ratio);
-GdkPixbuf *_gdk_pixbuf_new_from_memory_at_scale(const void *data, gint len, gint w, gint h, gboolean preserve_ratio);
-
-GtkWidget *linphone_gtk_create_window(const char *window_name);
-GtkWidget *linphone_gtk_get_widget(GtkWidget *window, const char *name);
-LinphoneCore *linphone_gtk_get_core(void);
-GtkWidget *linphone_gtk_get_main_window();
-void linphone_gtk_display_something(GtkMessageType type,const gchar *message);
-void linphone_gtk_start_call(GtkWidget *button);
-void linphone_gtk_call_terminated();
-void linphone_gtk_show_friends(void);
-void linphone_gtk_show_contact(LinphoneFriend *lf);
-void linphone_gtk_set_my_presence(LinphoneOnlineStatus ss);
-void linphone_gtk_show_parameters(void);
-void linphone_gtk_load_identities(void);
-void linphone_gtk_create_chatroom(const char *with);
-void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, const char *from, const char *message);
-void linphone_gtk_call_log_update(GtkWidget *w);
-void linphone_gtk_create_log_window(void);
-void linphone_gtk_log_show(void);
-void linphone_gtk_log_push(OrtpLogLevel lev, const char *fmt, va_list args);
-void linphone_gtk_destroy_log_window(void);
-gboolean linphone_gtk_check_logs();
-void linphone_gtk_buddy_info_updated(LinphoneCore *lc, LinphoneFriend *lf);
-const gchar *linphone_gtk_get_ui_config(const char *key, const char *def);
-int linphone_gtk_get_ui_config_int(const char *key, int def);
-void linphone_gtk_set_ui_config_int(const char *key , int val);
-
-void linphone_gtk_open_browser(const char *url);
-void linphone_gtk_check_for_new_version(void);
-const char *linphone_gtk_get_lang(const char *config_file);
-void linphone_gtk_set_lang(const char *code);
-SipSetupContext* linphone_gtk_get_default_sip_setup_context(void);
-GtkWidget * linphone_gtk_show_buddy_lookup_window(SipSetupContext *ctx);
-void linphone_gtk_buddy_lookup_set_keyword(GtkWidget *w, const char *kw);
-void * linphone_gtk_wait(LinphoneCore *lc, void *ctx, LinphoneWaitingState ws, const char *purpose, float progress);
-
-void linphone_gtk_show_directory_search(void);
-
-/*functions controlling the different views*/
-gboolean linphone_gtk_use_in_call_view();
-void linphone_gtk_show_in_call_view(void);
-void linphone_gtk_show_idle_view(void);
-void linphone_gtk_in_call_view_set_calling(const char *uri);
-void linphone_gtk_in_call_view_set_in_call(void);
-void linphone_gtk_in_call_view_update_duration(int duration);
-void linphone_gtk_in_call_view_terminate(const char *error_msg);
-void linphone_gtk_enable_mute_button(GtkToggleButton *button, gboolean sensitive);
-
-void linphone_gtk_show_login_frame(LinphoneProxyConfig *cfg);
-
diff --git a/linphone/gtk-glade/linphone.ico b/linphone/gtk-glade/linphone.ico
deleted file mode 100755 (executable)
index 8c56e06..0000000
Binary files a/linphone/gtk-glade/linphone.ico and /dev/null differ
diff --git a/linphone/gtk-glade/linphone.iss b/linphone/gtk-glade/linphone.iss
deleted file mode 100755 (executable)
index f691046..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-; Script generated by the Inno Setup Script Wizard.\r
-; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!\r
-\r
-[Setup]\r
-AppName=Linphone\r
-AppVerName=Linphone version 3.1.2\r
-AppPublisher=linphone.org\r
-AppPublisherURL=http://www.linphone.org\r
-AppSupportURL=http://www.linphone.org\r
-AppUpdatesURL=http://www.linphone.org\r
-DefaultDirName={pf}\Linphone\r
-DefaultGroupName=Linphone\r
-LicenseFile=..\COPYING\r
-;InfoBeforeFile=..\README\r
-OutputBaseFilename=setup\r
-Compression=lzma\r
-SolidCompression=yes\r
-\r
-[Languages]\r
-Name: "english"; MessagesFile: "compiler:Default.isl"\r
-\r
-[Tasks]\r
-Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked\r
-\r
-[Files]\r
-Source: "linphone.exe"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\mediastreamer2\build\win32native\mediastream.exe"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\console\linphonec.exe"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\console\linphonecsh.exe"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "*.glade"; DestDir: "{app}/linphone"; Flags: ignoreversion\r
-Source: "..\pixmaps\*.png"; DestDir: "{app}/linphone"; Flags: ignoreversion\r
-Source: "*.png"; DestDir: "{app}/linphone"; Flags: ignoreversion\r
-Source: "..\mediastreamer2\src\nowebcamCIF.jpg"; DestDir: "{app}\images"; Flags: ignoreversion\r
-;;internal linphone dlls:\r
-Source: "..\..\linphone-deps\bin\osipparser2.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\..\linphone-deps\bin\osip2.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\..\linphone-deps\bin\exosip2.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\..\linphone-deps\bin\libogg.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-;;Source: "..\..\linphone-deps\bin\speex.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\..\linphone-deps\bin\avcodec.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\..\linphone-deps\bin\avutil-49.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\..\linphone-deps\bin\swscale.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-;;Source: "..\..\linphone-deps\bin\libspeex-1.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-;;Source: "..\..\linphone-deps\bin\libspeexdsp-1.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\coreapi\linphone.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\mediastreamer2\build\win32native\mediastreamer2.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\oRTP\build\win32native\ortp.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-;;Sound files:\r
-Source: "..\COPYING"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\share\ringback.wav"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\share\rings\orig.wav"; DestDir: "{app}\rings"; Flags: ignoreversion\r
-Source: "..\share\rings\bigben.wav"; DestDir: "{app}\rings"; Flags: ignoreversion\r
-Source: "..\share\rings\toy.wav"; DestDir: "{app}\rings"; Flags: ignoreversion\r
-Source: "..\share\rings\tapping.wav"; DestDir: "{app}\rings"; Flags: ignoreversion\r
-Source: "..\share\rings\oldphone.wav"; DestDir: "{app}\rings"; Flags: ignoreversion\r
-;;Default my preferred gtk theme on windows:\r
-Source: "..\gtk-glade\gtkrc"; DestDir: "{app}"; Flags: ignoreversion\r
-;;Locales for linphone:\r
-Source: "..\po\fr.gmo"; DestDir: "{app}\share\locale\fr\LC_MESSAGES"; DestName: "linphone.mo"; Flags: ignoreversion\r
-Source: "..\po\sv.gmo"; DestDir: "{app}\share\locale\sv\LC_MESSAGES"; DestName: "linphone.mo"; Flags: ignoreversion\r
-\r
-;;GTK stuff:\r
-Source: "..\..\gtk+-2.14.7\bin\*.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\..\libglade-2.6.3\bin\*.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\..\gtk+-2.14.7\etc\gtk-2.0\*"; DestDir: "{app}\etc\gtk-2.0\"; Flags: ignoreversion\r
-Source: "..\..\linphone-deps\bin\libxml2.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\..\iconv-1.9.2.win32\bin\*.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\..\gtk+-2.14.7\lib\gtk-2.0\2.10.0\engines\*"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion\r
-Source: "..\..\gtk+-2.14.7\lib\gtk-2.0\2.10.0\loaders\*"; DestDir: "{app}\lib\gtk-2.0\2.10.0\loaders"; Flags: ignoreversion\r
-;;Source: "..\..\gtk+-2.14.7\lib\gtk-2.0\2.10.0\immodules\*"; DestDir: "{app}\lib\gtk-2.0\2.10.0\immodules"; Flags: ignoreversion\r
-Source: "..\..\gtk+-2.14.7\share\locale\fr\LC_MESSAGES\*"; DestDir: "{app}\share\locale\fr\LC_MESSAGES"; Flags: ignoreversion\r
-Source: "..\..\gtk+-2.14.7\share\locale\sv\LC_MESSAGES\*"; DestDir: "{app}\share\locale\sv\LC_MESSAGES"; Flags: ignoreversion\r
-Source: "..\..\XLiquid_GTK-1.0.3\gtk-2.0\*"; DestDir: "{app}\share\themes\XLiquid_GTK-1.0.3\gtk-2.0"; Flags: ignoreversion\r
-; NOTE: Don't use "Flags: ignoreversion" on any shared system files\r
-\r
-;; BuddyLookup plugin\r
-Source: "..\coreapi\plugins\buddylookup\libbuddylookup.dll"; DestDir: "{app}\liblinphone\plugins"; Flags: ignoreversion\r
-Source: "..\..\libsoup\bin\libsoup-2.4-1.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\..\gnutls-2.6.4\bin\*.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-\r
-;;Directshow capture plugin\r
-Source: "..\mediastreamer2\plugins\msdscap\libmsdscap.dll"; DestDir: "{app}\plugins" ; Flags: ignoreversion\r
-\r
-[Icons]\r
-Name: "{group}\Linphone"; Filename: "{app}\linphone.exe" ; WorkingDir: "{app}"\r
-Name: "{userdesktop}\Linphone"; Filename: "{app}\linphone.exe"; WorkingDir: "{app}" ; Tasks: desktopicon\r
-\r
-[Run]\r
-Filename: "{app}\linphone.exe"; Description: "{cm:LaunchProgram,Linphone}"; WorkingDir: "{app}" ; Flags: nowait postinstall skipifsilent\r
-\r
diff --git a/linphone/gtk-glade/linphone.png b/linphone/gtk-glade/linphone.png
deleted file mode 100644 (file)
index 06cf183..0000000
Binary files a/linphone/gtk-glade/linphone.png and /dev/null differ
diff --git a/linphone/gtk-glade/linphone.rc b/linphone/gtk-glade/linphone.rc
deleted file mode 100755 (executable)
index 9455ab6..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-// This file is automatically generated by wxDev-C++.\r
-// All changes to this file will be lost when the project is recompiled.\r
-\r
-A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "linphone.ico"\r
-\r
diff --git a/linphone/gtk-glade/linphone2.png b/linphone/gtk-glade/linphone2.png
deleted file mode 100644 (file)
index d1bf1ab..0000000
Binary files a/linphone/gtk-glade/linphone2.png and /dev/null differ
diff --git a/linphone/gtk-glade/log.glade b/linphone/gtk-glade/log.glade
deleted file mode 100644 (file)
index 0dfc558..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Thu Jul 31 12:01:20 2008 -->
-<glade-interface>
-  <widget class="GtkDialog" id="log">
-    <property name="width_request">540</property>
-    <property name="height_request">290</property>
-    <property name="border_width">5</property>
-    <property name="title" translatable="yes">Linphone debug window</property>
-    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
-    <property name="icon">linphone2.png</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-    <property name="deletable">False</property>
-    <property name="has_separator">False</property>
-    <signal name="response" handler="gtk_widget_hide"/>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox1">
-        <property name="visible">True</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkScrolledWindow" id="scrolledwindow1">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-            <property name="window_placement">GTK_CORNER_BOTTOM_LEFT</property>
-            <property name="window_placement_set">True</property>
-            <property name="shadow_type">GTK_SHADOW_IN</property>
-            <child>
-              <widget class="GtkTextView" id="textview">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="editable">False</property>
-                <property name="wrap_mode">GTK_WRAP_WORD</property>
-              </widget>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">GTK_BUTTONBOX_END</property>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <widget class="GtkButton" id="button1">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="label" translatable="yes">gtk-close</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">0</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/linphone/gtk-glade/logging.c b/linphone/gtk-glade/logging.c
deleted file mode 100644 (file)
index a8211d1..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#include "linphone.h"
-
-static GtkWidget *log_window=NULL;
-static GStaticMutex log_mutex=G_STATIC_MUTEX_INIT;
-static GList *log_queue=NULL;
-
-typedef struct _LinphoneGtkLog{
-       OrtpLogLevel lev;
-       gchar *msg;
-}LinphoneGtkLog;
-
-void linphone_gtk_create_log_window(void){
-       GtkTextBuffer *b;
-       log_window=linphone_gtk_create_window("log");
-       b=gtk_text_view_get_buffer(GTK_TEXT_VIEW(linphone_gtk_get_widget(log_window,"textview")));
-       gtk_text_buffer_create_tag(b,"red","foreground","red",NULL);
-       gtk_text_buffer_create_tag(b,"orange","foreground","orange",NULL);
-}
-
-void linphone_gtk_destroy_log_window(void){
-       GtkWidget *w=log_window;
-       g_static_mutex_lock(&log_mutex);
-       log_window=NULL;
-       gtk_widget_destroy(w);
-       g_static_mutex_unlock(&log_mutex);
-}
-
-void linphone_gtk_log_show(void){
-       gtk_widget_show(log_window);
-       gtk_window_present(GTK_WINDOW(log_window));
-}
-
-static void linphone_gtk_display_log(OrtpLogLevel lev, const char *msg){
-       GtkTextIter iter,begin;
-       int off;
-       static GtkTextView *v=NULL;
-       GtkTextBuffer *b;
-       const char *lname="undef";
-
-       if (log_window==NULL) {
-               return;
-       }
-
-       if (v==NULL) v=GTK_TEXT_VIEW(linphone_gtk_get_widget(log_window,"textview"));
-       b=gtk_text_view_get_buffer(v);
-       switch(lev){
-               case ORTP_DEBUG:
-                       lname="debug";
-                       break;
-               case ORTP_MESSAGE:
-                       lname="message";
-                       break;
-               case ORTP_WARNING:
-                       lname="warning";
-                       break;
-               case ORTP_ERROR:
-                       lname="error";
-                       break;
-               case ORTP_FATAL:
-                       lname="fatal";
-                       break;
-               default:
-                       g_error("Bad level !");
-       }
-       gtk_text_buffer_get_end_iter(b,&iter);
-       off=gtk_text_iter_get_offset(&iter);
-       gtk_text_buffer_insert(b,&iter,lname,-1);
-       gtk_text_buffer_get_end_iter(b,&iter);
-       gtk_text_buffer_insert(b,&iter,": ",-1);
-       gtk_text_buffer_get_end_iter(b,&iter);
-       gtk_text_buffer_insert(b,&iter,msg,-1);
-       gtk_text_buffer_get_end_iter(b,&iter);
-       gtk_text_buffer_insert(b,&iter,"\n",-1);
-       gtk_text_buffer_get_end_iter(b,&iter);
-       gtk_text_buffer_get_iter_at_offset(b,&begin,off);
-       if (lev==ORTP_ERROR || lev==ORTP_FATAL) gtk_text_buffer_apply_tag_by_name(b,"red",&begin,&iter);
-       else if (lev==ORTP_WARNING) gtk_text_buffer_apply_tag_by_name(b,"orange",&begin,&iter);
-       gtk_text_buffer_get_end_iter(b,&iter);
-       //gtk_text_view_scroll_to_iter(v,&iter,0,FALSE,0,0);
-}
-
-gboolean linphone_gtk_check_logs(){
-       GList *elem;
-       g_static_mutex_lock(&log_mutex);
-       for(elem=log_queue;elem!=NULL;elem=elem->next){
-               LinphoneGtkLog *lgl=(LinphoneGtkLog*)elem->data;
-               linphone_gtk_display_log(lgl->lev,lgl->msg);
-               g_free(lgl->msg);
-               g_free(lgl);
-       }
-       if (log_queue) g_list_free(log_queue);
-       log_queue=NULL;
-       g_static_mutex_unlock(&log_mutex);
-       return TRUE;
-}
-
-void linphone_gtk_log_push(OrtpLogLevel lev, const char *fmt, va_list args){
-       gchar *msg=g_strdup_vprintf(fmt,args);
-       LinphoneGtkLog *lgl=g_new(LinphoneGtkLog,1);
-       lgl->lev=lev;
-       lgl->msg=msg;
-       g_static_mutex_lock(&log_mutex);
-       log_queue=g_list_append(log_queue,lgl);
-       g_static_mutex_unlock(&log_mutex);
-}
-
diff --git a/linphone/gtk-glade/loginframe.c b/linphone/gtk-glade/loginframe.c
deleted file mode 100644 (file)
index d4ed369..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2009  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#include "linphone.h"
-
-void linphone_gtk_login_frame_connect_clicked(GtkWidget *button);
-void linphone_gtk_exit_login_frame(void);
-
-enum {
-       NetworkKindAdsl,
-       NetworkKindOpticalFiber
-};
-
-static gboolean check_login_ok(LinphoneProxyConfig *cfg){
-       if (linphone_proxy_config_is_registered(cfg)){
-               linphone_gtk_exit_login_frame();
-               return FALSE;   
-       }
-       return TRUE;
-}
-
-static void do_login(SipSetupContext *ssctx, const char *identity, const char * passwd){
-       GtkWidget *mw=linphone_gtk_get_main_window();
-       if (sip_setup_context_login_account(ssctx,identity,passwd)==0){
-               guint t=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(mw),"login_tout"));
-               if (t!=0) g_source_remove(t);
-               t=g_timeout_add(50,(GSourceFunc)check_login_ok,sip_setup_context_get_proxy_config(ssctx));
-               g_object_set_data(G_OBJECT(mw),"login_tout",GINT_TO_POINTER(t));
-       }
-}
-
-static gboolean do_login_noprompt(LinphoneProxyConfig *cfg){
-       SipSetupContext *ssctx=linphone_proxy_config_get_sip_setup_context(cfg);
-       if (ssctx==NULL) return TRUE;/*not ready ?*/
-       do_login(ssctx,linphone_proxy_config_get_identity(cfg),NULL);
-       return FALSE;
-}
-
-void linphone_gtk_show_login_frame(LinphoneProxyConfig *cfg){
-       GtkWidget *mw=linphone_gtk_get_main_window();
-       GtkWidget *label=linphone_gtk_get_widget(mw,"login_label");
-       LinphoneAuthInfo *ai;
-       gchar *str;
-       LinphoneAddress *from;
-       LinphoneCore *lc=linphone_gtk_get_core();
-       int nettype;
-
-
-       if (linphone_core_get_download_bandwidth(lc)==512 &&
-               linphone_core_get_upload_bandwidth(lc)==512)
-               nettype=NetworkKindOpticalFiber;
-       else nettype=NetworkKindAdsl;
-       gtk_combo_box_set_active(GTK_COMBO_BOX(linphone_gtk_get_widget(mw,"login_internet_kind")),nettype);
-       gtk_combo_box_set_active(GTK_COMBO_BOX(linphone_gtk_get_widget(mw,"internet_kind")),nettype);
-
-       if (linphone_gtk_get_ui_config_int("automatic_login",0) ){
-               g_timeout_add(250,(GSourceFunc)do_login_noprompt,cfg);
-               return;
-       }
-
-       gtk_widget_hide(linphone_gtk_get_widget(mw,"logout"));
-       gtk_widget_hide(linphone_gtk_get_widget(mw,"idle_frame"));
-       gtk_widget_show(linphone_gtk_get_widget(mw,"login_frame"));
-       gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"main_menu"),FALSE);
-       gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"modes"),FALSE);
-       str=g_strdup_printf(_("Please enter login information for %s"),linphone_proxy_config_get_domain(cfg));
-       gtk_label_set_text(GTK_LABEL(label),str);
-       g_object_set_data(G_OBJECT(mw),"login_proxy_config",cfg);
-       g_free(str);
-
-       from=linphone_address_new(linphone_proxy_config_get_identity(cfg));
-       
-       ai=linphone_core_find_auth_info(lc,linphone_proxy_config_get_domain(cfg),linphone_address_get_username(from));
-       /*display the last entered username, if not '?????'*/
-       if (linphone_address_get_username(from)[0]!='?')
-               gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(mw,"login_username")),
-                       linphone_address_get_username(from));
-       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(mw,"login_password")),
-               ai!=NULL ? ai->passwd : "");
-       
-       linphone_address_destroy(from);
-}
-
-void linphone_gtk_exit_login_frame(void){
-       GtkWidget *mw=linphone_gtk_get_main_window();
-       gtk_widget_show(linphone_gtk_get_widget(mw,"idle_frame"));
-       gtk_widget_hide(linphone_gtk_get_widget(mw,"login_frame"));
-       gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"main_menu"),TRUE);
-       gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"modes"),TRUE);
-       gtk_widget_show(linphone_gtk_get_widget(mw,"logout"));
-}
-
-void linphone_gtk_logout_clicked(){
-       LinphoneCore *lc=linphone_gtk_get_core();
-       LinphoneProxyConfig *cfg=NULL;
-       linphone_core_get_default_proxy(lc,&cfg);
-       if (cfg){
-               SipSetupContext *ss=linphone_proxy_config_get_sip_setup_context(cfg);
-               if (ss){
-                       sip_setup_context_logout(ss);
-                       linphone_gtk_set_ui_config_int("automatic_login",FALSE);
-                       linphone_gtk_show_login_frame(cfg);
-               }
-       }
-}
-
-
-
-void linphone_gtk_login_frame_connect_clicked(GtkWidget *button){
-       GtkWidget *mw=gtk_widget_get_toplevel(button);
-       const char *username;
-       const char *password;
-       char *identity;
-       gboolean autologin;
-       LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)g_object_get_data(G_OBJECT(mw),"login_proxy_config");
-       LinphoneAddress *from;
-       SipSetupContext *ssctx=linphone_proxy_config_get_sip_setup_context(cfg);
-
-       username=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(mw,"login_username")));
-       password=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(mw,"login_password")));
-
-       if (username==NULL || username[0]=='\0')
-               return;
-
-       autologin=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(mw,"automatic_login")));
-       linphone_gtk_set_ui_config_int("automatic_login",autologin);
-
-       from=linphone_address_new(linphone_proxy_config_get_identity(cfg));
-       linphone_address_set_username(from,username);
-       identity=linphone_address_as_string(from);
-       do_login(ssctx,identity,password);
-       /*we need to refresh the identities since the proxy config may have changed.*/
-       linphone_gtk_load_identities();
-}
-
-void linphone_gtk_internet_kind_changed(GtkWidget *combo){
-       int netkind_id=gtk_combo_box_get_active(GTK_COMBO_BOX(combo));
-       LinphoneCore *lc=linphone_gtk_get_core();
-       if (netkind_id==NetworkKindAdsl){
-               linphone_core_set_upload_bandwidth(lc,256);
-               linphone_core_set_download_bandwidth(lc,512);
-       }else if (netkind_id==NetworkKindOpticalFiber){
-               linphone_core_set_upload_bandwidth(lc,512);
-               linphone_core_set_download_bandwidth(lc,512);
-       }
-}
diff --git a/linphone/gtk-glade/main.c b/linphone/gtk-glade/main.c
deleted file mode 100644 (file)
index e6e2ac7..0000000
+++ /dev/null
@@ -1,1234 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#define USE_LIBGLADE 1
-
-#include "linphone.h"
-#include "lpconfig.h"
-
-
-
-#ifdef USE_LIBGLADE
-#include <glade/glade.h>
-#endif
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-#define LINPHONE_ICON "linphone2.png"
-
-const char *this_program_ident_string="linphone_ident_string=" LINPHONE_VERSION;
-
-static LinphoneCore *the_core=NULL;
-static GtkWidget *the_ui=NULL;
-
-static void linphone_gtk_show(LinphoneCore *lc);
-static void linphone_gtk_inv_recv(LinphoneCore *lc, const char *from);
-static void linphone_gtk_bye_recv(LinphoneCore *lc, const char *from);
-static void linphone_gtk_notify_recv(LinphoneCore *lc, LinphoneFriend * fid, const char *url, const char *status, const char *img);
-static void linphone_gtk_new_unknown_subscriber(LinphoneCore *lc, LinphoneFriend *lf, const char *url);
-static void linphone_gtk_auth_info_requested(LinphoneCore *lc, const char *realm, const char *username);
-static void linphone_gtk_display_status(LinphoneCore *lc, const char *status);
-static void linphone_gtk_display_message(LinphoneCore *lc, const char *msg);
-static void linphone_gtk_display_warning(LinphoneCore *lc, const char *warning);
-static void linphone_gtk_display_url(LinphoneCore *lc, const char *msg, const char *url);
-static void linphone_gtk_display_question(LinphoneCore *lc, const char *question);
-static void linphone_gtk_call_log_updated(LinphoneCore *lc, LinphoneCallLog *cl);
-static void linphone_gtk_general_state(LinphoneCore *lc, LinphoneGeneralState *gstate);
-static void linphone_gtk_refer_received(LinphoneCore *lc, const char *refer_to);
-static gboolean linphone_gtk_auto_answer(GtkWidget *incall_window);
-
-static LinphoneCoreVTable vtable={
-       .show=linphone_gtk_show,
-       .inv_recv=linphone_gtk_inv_recv,
-       .bye_recv=linphone_gtk_bye_recv,
-       .notify_recv=linphone_gtk_notify_recv,
-       .new_unknown_subscriber=linphone_gtk_new_unknown_subscriber,
-       .auth_info_requested=linphone_gtk_auth_info_requested,
-       .display_status=linphone_gtk_display_status,
-       .display_message=linphone_gtk_display_message,
-       .display_warning=linphone_gtk_display_warning,
-       .display_url=linphone_gtk_display_url,
-       .display_question=linphone_gtk_display_question,
-       .call_log_updated=linphone_gtk_call_log_updated,
-       .text_received=linphone_gtk_text_received,
-       .general_state=linphone_gtk_general_state,
-       .refer_received=linphone_gtk_refer_received,
-       .buddy_info_updated=linphone_gtk_buddy_info_updated
-};
-
-static gboolean verbose=0;
-static gboolean auto_answer = 0;
-static gchar * addr_to_call = NULL;
-static gboolean iconified=FALSE;
-#ifdef WIN32
-static gchar *workingdir=NULL;
-#endif
-
-static GOptionEntry linphone_options[]={
-       {
-               .long_name="verbose",
-               .short_name= '\0',
-               .arg=G_OPTION_ARG_NONE,
-               .arg_data= (gpointer)&verbose,
-               .description=N_("log to stdout some debug information while running.")
-       },
-       {
-               .long_name="iconified",
-               .short_name= '\0',
-               .arg=G_OPTION_ARG_NONE,
-               .arg_data= (gpointer)&iconified,
-               .description=N_("Start only in the system tray, do not show the main interface.")
-       },
-       {
-           .long_name = "call",
-           .short_name = 'c',
-           .arg = G_OPTION_ARG_STRING,
-           .arg_data = &addr_to_call,
-           .description = N_("address to call right now")
-       },
-       {
-           .long_name = "auto-answer",
-           .short_name = 'a',
-           .arg = G_OPTION_ARG_NONE,
-           .arg_data = (gpointer) & auto_answer,
-           .description = N_("if set automatically answer incoming calls")
-       },
-#ifdef WIN32
-       {                               /* zsd addition */
-           .long_name = "workdir",
-           .short_name = '\0',
-           .arg = G_OPTION_ARG_STRING,
-           .arg_data = (gpointer) & workingdir,
-           .description = N_("Specifiy a working directory (should be the base of the installation, eg: c:\\Program Files\\Linphone)")
-       },
-#endif
-       {0}
-};
-
-#define INSTALLED_XML_DIR PACKAGE_DATA_DIR "/linphone"
-#define BUILD_TREE_XML_DIR "gtk-glade"
-
-#ifndef WIN32
-#define CONFIG_FILE ".linphonerc"
-#else
-#define CONFIG_FILE "linphonerc"
-#endif
-
-
-
-static char _config_file[1024];
-
-
-const char *linphone_gtk_get_config_file(){
-       /*try accessing a local file first if exists*/
-       if (access(CONFIG_FILE,F_OK)==0){
-               snprintf(_config_file,sizeof(_config_file),"%s",CONFIG_FILE);
-       }else{
-#ifdef WIN32
-               const char *appdata=getenv("APPDATA");
-               if (appdata){
-                       snprintf(_config_file,sizeof(_config_file),"%s\\%s",appdata,LINPHONE_CONFIG_DIR);
-                       CreateDirectory(_config_file,NULL);
-                       snprintf(_config_file,sizeof(_config_file),"%s\\%s",appdata,LINPHONE_CONFIG_DIR "\\" CONFIG_FILE);
-               }
-#else
-               const char *home=getenv("HOME");
-               if (home==NULL) home=".";
-               snprintf(_config_file,sizeof(_config_file),"%s/%s",home,CONFIG_FILE);
-#endif
-       }
-       return _config_file;
-}
-
-static void linphone_gtk_init_liblinphone(const char *file){
-       linphone_core_set_user_agent("Linphone", LINPHONE_VERSION);
-       the_core=linphone_core_new(&vtable,file,NULL,NULL);
-       linphone_core_set_waiting_callback(the_core,linphone_gtk_wait,NULL);
-}
-
-
-
-LinphoneCore *linphone_gtk_get_core(void){
-       return the_core;
-}
-
-GtkWidget *linphone_gtk_get_main_window(){
-       return the_ui;
-}
-
-static void parse_item(const char *item, const char *window_name, GtkWidget *w,  gboolean show){
-       char tmp[64];
-       char *dot;
-       strcpy(tmp,item);
-       dot=strchr(tmp,'.');
-       if (dot){
-               *dot='\0';
-               dot++;
-               if (strcmp(window_name,tmp)==0){
-                       GtkWidget *wd=linphone_gtk_get_widget(w,dot);
-                       if (wd) {
-                               if (!show) gtk_widget_hide(wd);
-                               else gtk_widget_show(wd);
-                       }
-               }
-       }
-}
-
-static void parse_widgets(const char *hiddens, const char *window_name, GtkWidget *w, gboolean show){
-       char item[64];
-       const char *i;
-       const char *b;
-       int len;
-       for(b=i=hiddens;*i!='\0';++i){
-               if (*i==' '){
-                       len=MIN(i-b,sizeof(item)-1);
-                       strncpy(item,b,len);
-                       item[len]='\0';
-                       b=i+1;
-                       parse_item(item,window_name,w,show);
-               }
-       }
-       len=MIN(i-b,sizeof(item)-1);
-       if (len>0){
-               strncpy(item,b,len);
-               item[len]='\0';
-               parse_item(item,window_name,w,show);
-       }
-}
-
-static void linphone_gtk_configure_window(GtkWidget *w, const char *window_name){
-       static const char *icon_path=NULL;
-       static const char *hiddens=NULL;
-       static const char *shown=NULL;
-       static bool_t config_loaded=FALSE;
-       if (linphone_gtk_get_core()==NULL) return;
-       if (config_loaded==FALSE){
-               hiddens=linphone_gtk_get_ui_config("hidden_widgets",NULL);
-               shown=linphone_gtk_get_ui_config("shown_widgets",NULL);
-               icon_path=linphone_gtk_get_ui_config("icon",NULL);
-               config_loaded=TRUE;
-       }
-       if (hiddens)
-               parse_widgets(hiddens,window_name,w,FALSE);
-       if (shown)
-               parse_widgets(shown,window_name,w,TRUE);
-       if (icon_path) {
-               GdkPixbuf *pbuf=create_pixbuf(icon_path);
-               gtk_window_set_icon(GTK_WINDOW(w),pbuf);
-               g_object_unref(G_OBJECT(pbuf));
-       }
-}
-
-#ifdef USE_LIBGLADE
-
-GtkWidget *linphone_gtk_create_window(const char *window_name){
-       GtkWidget *w;
-       GladeXML *gxml;
-       char path[2048];
-       snprintf(path,sizeof(path),"%s/%s.glade",BUILD_TREE_XML_DIR,window_name);
-       if (access(path,F_OK)!=0){
-               snprintf(path,sizeof(path),"%s/%s.glade",INSTALLED_XML_DIR,window_name);
-               if (access(path,F_OK)!=0){
-                       g_error("Could not locate neither %s/%s.glade and %s/%s.glade .",BUILD_TREE_XML_DIR,window_name,
-                               INSTALLED_XML_DIR,window_name);
-                       return NULL;
-               }
-       }
-       gxml=glade_xml_new(path,NULL,NULL);
-       glade_xml_signal_autoconnect(gxml);
-       w=glade_xml_get_widget(gxml,window_name);
-       if (w==NULL) g_error("Could not retrieve '%s' window from xml file",window_name);
-       linphone_gtk_configure_window(w,window_name);
-       return w;
-}
-
-GtkWidget *linphone_gtk_get_widget(GtkWidget *window, const char *name){
-       GtkWidget *w;
-       GladeXML *gxml=glade_get_widget_tree(window);
-       if (gxml==NULL) g_error("Could not retrieve XML tree of window %s",name);
-       w=glade_xml_get_widget(gxml,name);
-       if (w==NULL) g_error("Could not retrieve widget %s",name);
-       return GTK_WIDGET(w);
-}
-
-#else
-
-GtkWidget *linphone_gtk_create_window(const char *window_name){
-       
-}
-
-GtkWidget *linphone_gtk_get_widget(GtkWidget *window, const char *name){
-       GObject *w=gtk_builder_get_object(the_ui,name);
-       if (w==NULL){
-               g_error("No widget named %s found in xml interface.",name);
-       }
-       return GTK_WIDGET(w);
-}
-
-#endif
-
-void linphone_gtk_display_something(GtkMessageType type,const gchar *message){
-       GtkWidget *dialog;
-       GtkWidget *main_window=linphone_gtk_get_main_window();
-       
-       gtk_widget_show(main_window);
-       if (type==GTK_MESSAGE_QUESTION)
-       {
-               /* draw a question box. link to dialog_click callback */
-               dialog = gtk_message_dialog_new (
-                               GTK_WINDOW(main_window),
-                                GTK_DIALOG_DESTROY_WITH_PARENT,
-                               GTK_MESSAGE_QUESTION,
-                                GTK_BUTTONS_YES_NO,
-                                "%s",
-                               (const gchar*)message);
-               /* connect to some callback : REVISIT */
-               /*
-               g_signal_connect_swapped (G_OBJECT (dialog), "response",
-                           G_CALLBACK (dialog_click),
-                           G_OBJECT (dialog));
-               */
-               /* actually show the box */
-               gtk_widget_show(dialog);
-       }
-       else
-       {
-               dialog = gtk_message_dialog_new (GTK_WINDOW(main_window),
-                                  GTK_DIALOG_DESTROY_WITH_PARENT,
-                                  type,
-                                  GTK_BUTTONS_CLOSE,
-                                  "%s",
-                                  (const gchar*)message);
-               /* Destroy the dialog when the user responds to it (e.g. clicks a button) */
-               g_signal_connect_swapped (G_OBJECT (dialog), "response",
-                           G_CALLBACK (gtk_widget_destroy),
-                           G_OBJECT (dialog));
-               gtk_widget_show(dialog);
-       }
-}
-
-void linphone_gtk_about_response(GtkDialog *dialog, gint id){
-       if (id==GTK_RESPONSE_CANCEL){
-               gtk_widget_destroy(GTK_WIDGET(dialog));
-       }
-}
-
-static void about_url_clicked(GtkAboutDialog *dialog, const char *url, gpointer data){
-       g_message("About url clicked");
-       linphone_gtk_open_browser(url);
-}
-
-void linphone_gtk_show_about(){
-       struct stat filestat;
-       const char *license_file=PACKAGE_DATA_DIR "/linphone/COPYING";
-       GtkWidget *about;
-       
-       about=linphone_gtk_create_window("about");
-       gtk_about_dialog_set_url_hook(about_url_clicked,NULL,NULL);
-       memset(&filestat,0,sizeof(filestat));
-       if (stat(license_file,&filestat)!=0){
-               license_file="COPYING";
-               stat(license_file,&filestat);
-       }
-       if (filestat.st_size>0){
-               char *license=g_malloc(filestat.st_size+1);
-               FILE *f=fopen(license_file,"r");
-               if (f && fread(license,filestat.st_size,1,f)==1){
-                       license[filestat.st_size]='\0';
-                       gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(about),license);
-               }
-               g_free(license);
-       }
-       gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about),LINPHONE_VERSION);
-       gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(about),linphone_gtk_get_ui_config("title","Linphone"));
-       gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about),linphone_gtk_get_ui_config("home","http://www.linphone.org"));
-       gtk_widget_show(about);
-}
-
-static void set_video_window_decorations(GdkWindow *w){
-       const char *title=linphone_gtk_get_ui_config("title","Linphone");
-       const char *icon_path=linphone_gtk_get_ui_config("icon","linphone2.png");
-       char video_title[256];
-       GdkPixbuf *pbuf=create_pixbuf(icon_path);
-       if (!linphone_core_in_call(linphone_gtk_get_core())){
-               snprintf(video_title,sizeof(video_title),"%s video",title);     
-       }else{
-               const LinphoneAddress *uri=linphone_core_get_remote_uri(linphone_gtk_get_core());
-               char *display_name;
-               if (linphone_address_get_display_name(uri)!=NULL)
-                       display_name=ms_strdup(linphone_address_get_display_name(uri));
-               else{
-                       display_name=linphone_address_as_string(uri);
-               }
-               snprintf(video_title,sizeof(video_title),_("Call with %s"),display_name);
-               ms_free(display_name);
-       }
-       gdk_window_set_title(w,video_title);
-       /*gdk_window_set_urgency_hint(w,TRUE);*/
-       gdk_window_raise(w);
-       if (pbuf){
-               GList *l=NULL;
-               l=g_list_append(l,pbuf);
-               gdk_window_set_icon_list(w,l);
-               g_list_free(l);
-               g_object_unref(G_OBJECT(pbuf));
-       }
-}
-
-static gboolean video_needs_update=FALSE;
-
-static void update_video_title(){
-       video_needs_update=TRUE;
-}
-
-static gboolean linphone_gtk_iterate(LinphoneCore *lc){
-       static gboolean first_time=TRUE;
-       unsigned long id;
-       static unsigned long previd=0;
-       static gboolean in_iterate=FALSE;
-       
-       /*avoid reentrancy*/
-       if (in_iterate) return TRUE;
-       in_iterate=TRUE;
-       linphone_core_iterate(lc);
-       if (first_time){
-               /*after the first call to iterate, SipSetupContexts should be ready, so take actions:*/
-               linphone_gtk_show_directory_search();
-               first_time=FALSE;
-       }
-
-       id=linphone_core_get_native_video_window_id(lc);
-       if (id!=previd || video_needs_update){
-               GdkWindow *w;
-               previd=id;
-               if (id!=0){
-                       ms_message("Updating window decorations");
-#ifndef WIN32
-                       w=gdk_window_foreign_new(id);
-#else
-                       w=gdk_window_foreign_new((HANDLE)id);
-#endif
-                       if (w) {
-                               set_video_window_decorations(w);
-                               g_object_unref(G_OBJECT(w));
-                       }
-                       else ms_error("gdk_window_foreign_new() failed");
-                       if (video_needs_update) video_needs_update=FALSE;
-               }
-       }
-       if (addr_to_call!=NULL){
-               /*make sure we are not showing the login screen*/
-               GtkWidget *mw=linphone_gtk_get_main_window();
-               GtkWidget *login_frame=linphone_gtk_get_widget(mw,"login_frame");
-               if (!GTK_WIDGET_VISIBLE(login_frame)){
-                       GtkWidget *uri_bar=linphone_gtk_get_widget(mw,"uribar");
-                       gtk_entry_set_text(GTK_ENTRY(uri_bar),addr_to_call);
-                       addr_to_call=NULL;
-                       linphone_gtk_start_call(uri_bar);
-               }
-       }
-       in_iterate=FALSE;
-       return TRUE;
-}
-
-static void load_uri_history(){
-       GtkEntry *uribar=GTK_ENTRY(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"uribar"));
-       char key[20];
-       int i;
-       GtkEntryCompletion *gep=gtk_entry_completion_new();
-       GtkListStore *model=gtk_list_store_new(1,G_TYPE_STRING);
-       for (i=0;;i++){
-               const char *uri;
-               snprintf(key,sizeof(key),"uri%i",i);
-               uri=linphone_gtk_get_ui_config(key,NULL);
-               if (uri!=NULL) {
-                       GtkTreeIter iter;
-                       gtk_list_store_append(model,&iter);
-                       gtk_list_store_set(model,&iter,0,uri,-1);
-                       if (i==0) gtk_entry_set_text(uribar,uri);
-               }
-               else break;
-       }
-       gtk_entry_completion_set_model(gep,GTK_TREE_MODEL(model));
-       gtk_entry_completion_set_text_column(gep,0);
-       gtk_entry_set_completion(uribar,gep);
-}
-
-static void save_uri_history(){
-       LinphoneCore *lc=linphone_gtk_get_core();
-       LpConfig *cfg=linphone_core_get_config(lc);
-       GtkEntry *uribar=GTK_ENTRY(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"uribar"));
-       char key[20];
-       int i=0;
-       char *uri=NULL;
-       GtkTreeIter iter;
-       GtkTreeModel *model=gtk_entry_completion_get_model(gtk_entry_get_completion(uribar));
-
-       if (!gtk_tree_model_get_iter_first(model,&iter)) return;
-       do {
-               gtk_tree_model_get(model,&iter,0,&uri,-1);
-               if (uri) {
-                       snprintf(key,sizeof(key),"uri%i",i);
-                       lp_config_set_string(cfg,"GtkUi",key,uri);
-                       g_free(uri);
-               }else break;
-               i++;
-               if (i>5) break;
-       }while(gtk_tree_model_iter_next(model,&iter));
-       lp_config_sync(cfg);
-}
-
-static void completion_add_text(GtkEntry *entry, const char *text){
-       GtkTreeIter iter;
-       GtkTreeModel *model=gtk_entry_completion_get_model(gtk_entry_get_completion(entry));
-       
-       if (gtk_tree_model_get_iter_first(model,&iter)){ 
-               do {
-                       gchar *uri=NULL;
-                       gtk_tree_model_get(model,&iter,0,&uri,-1);
-                       if (uri!=NULL){
-                               if (strcmp(uri,text)==0) {
-                                       /*remove text */
-                                       gtk_list_store_remove(GTK_LIST_STORE(model),&iter);
-                                       g_free(uri);
-                                       break;
-                               }
-                               g_free(uri);
-                       }
-               }while (gtk_tree_model_iter_next(model,&iter));
-       }
-       /* and prepend it on top of the list */
-       gtk_list_store_prepend(GTK_LIST_STORE(model),&iter);
-       gtk_list_store_set(GTK_LIST_STORE(model),&iter,0,text,-1);
-       save_uri_history();
-}
-
-void linphone_gtk_call_terminated(const char *error){
-       GtkWidget *mw=linphone_gtk_get_main_window();
-       GtkWidget *icw;
-       gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"terminate_call"),FALSE);
-       gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"start_call"),TRUE);
-       gtk_widget_hide_all(linphone_gtk_get_widget(mw,"go_to_call_view_box"));
-       linphone_gtk_enable_mute_button(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(mw,"main_mute")),FALSE);
-       if (linphone_gtk_use_in_call_view())
-               linphone_gtk_in_call_view_terminate(error);
-       update_video_title();
-       icw=GTK_WIDGET(g_object_get_data(G_OBJECT(mw),"incoming_call"));
-       if (icw!=NULL){
-               g_object_set_data(G_OBJECT(mw),"incoming_call",NULL);
-               gtk_widget_destroy(icw);
-       }
-}
-
-static gboolean in_call_timer(){
-       if (linphone_core_in_call(linphone_gtk_get_core())){
-               linphone_gtk_in_call_view_update_duration(
-                       linphone_core_get_current_call_duration(linphone_gtk_get_core()));
-               return TRUE;
-       }
-       return FALSE;
-}
-
-static void linphone_gtk_call_started(GtkWidget *mw){
-       gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"start_call"),FALSE);
-       gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"terminate_call"),TRUE);
-       gtk_widget_show_all(linphone_gtk_get_widget(mw,"go_to_call_view_box"));
-       update_video_title();
-       if (linphone_gtk_use_in_call_view())
-               g_timeout_add(250,(GSourceFunc)in_call_timer,NULL);
-}
-
-static gboolean linphone_gtk_start_call_do(GtkWidget *uri_bar){
-       const char *entered=gtk_entry_get_text(GTK_ENTRY(uri_bar));
-       if (linphone_core_invite(linphone_gtk_get_core(),entered)==0) {
-               completion_add_text(GTK_ENTRY(uri_bar),entered);
-       }else{
-       }
-       return FALSE;
-}
-
-static void _linphone_gtk_accept_call(){
-       LinphoneCore *lc=linphone_gtk_get_core();
-       GtkWidget *mw=linphone_gtk_get_main_window();
-       GtkWidget *icw=GTK_WIDGET(g_object_get_data(G_OBJECT(mw),"incoming_call"));
-       if (icw!=NULL){
-               g_object_set_data(G_OBJECT(mw),"incoming_call",NULL);
-               gtk_widget_destroy(icw);
-       }
-
-       linphone_core_accept_call(lc,NULL);
-       linphone_gtk_call_started(linphone_gtk_get_main_window());
-       if (linphone_gtk_use_in_call_view()){
-               linphone_gtk_in_call_view_set_in_call();
-               linphone_gtk_show_in_call_view();
-       }
-       linphone_gtk_enable_mute_button(
-               GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"main_mute"))
-               ,TRUE);
-}
-
-void linphone_gtk_start_call(GtkWidget *w){
-       LinphoneCore *lc=linphone_gtk_get_core();
-       if (linphone_core_inc_invite_pending(lc)){
-               /*accept the call*/
-               _linphone_gtk_accept_call();
-       }else if (linphone_core_in_call(lc)) {
-               /*already in call */
-       }else{
-               /*change into in-call mode, then do the work later as it might block a bit */
-               GtkWidget *mw=gtk_widget_get_toplevel(w);
-               GtkWidget *uri_bar=linphone_gtk_get_widget(mw,"uribar");
-               const char *entered=gtk_entry_get_text(GTK_ENTRY(uri_bar));
-               linphone_gtk_call_started(mw);
-               if (linphone_gtk_use_in_call_view()){
-                       linphone_gtk_in_call_view_set_calling(entered);
-                       linphone_gtk_show_in_call_view();
-               }
-               g_timeout_add(100,(GSourceFunc)linphone_gtk_start_call_do,uri_bar);
-       }
-}
-
-void linphone_gtk_uri_bar_activate(GtkWidget *w){
-       linphone_gtk_start_call(w);
-}
-
-
-void linphone_gtk_terminate_call(GtkWidget *button){
-       linphone_core_terminate_call(linphone_gtk_get_core(),NULL);
-}
-
-void linphone_gtk_decline_call(GtkWidget *button){
-       linphone_core_terminate_call(linphone_gtk_get_core(),NULL);
-       gtk_widget_destroy(gtk_widget_get_toplevel(button));
-}
-
-void linphone_gtk_accept_call(GtkWidget *button){
-       _linphone_gtk_accept_call();
-}
-
-static gboolean linphone_gtk_auto_answer(GtkWidget *incall_window){
-       linphone_gtk_accept_call(linphone_gtk_get_widget(incall_window,"accept_call"));
-       return FALSE;
-}
-
-void linphone_gtk_set_audio_video(){
-       linphone_core_enable_video(linphone_gtk_get_core(),TRUE,TRUE);
-       linphone_core_enable_video_preview(linphone_gtk_get_core(),TRUE);
-}
-
-void linphone_gtk_set_audio_only(){
-       linphone_core_enable_video(linphone_gtk_get_core(),FALSE,FALSE);
-       linphone_core_enable_video_preview(linphone_gtk_get_core(),FALSE);
-}
-
-void linphone_gtk_enable_self_view(GtkWidget *w){
-       linphone_core_enable_self_view(linphone_gtk_get_core(),
-               gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(w)));
-}
-
-void linphone_gtk_used_identity_changed(GtkWidget *w){
-       int active=gtk_combo_box_get_active(GTK_COMBO_BOX(w));
-       char *sel=gtk_combo_box_get_active_text(GTK_COMBO_BOX(w));
-       if (sel && strlen(sel)>0){ //avoid a dummy "changed" at gui startup
-               linphone_core_set_default_proxy_index(linphone_gtk_get_core(),(active==0) ? -1 : (active-1));
-               linphone_gtk_show_directory_search();
-       }
-       if (sel) g_free(sel);
-}
-
-static void linphone_gtk_show_main_window(){
-       GtkWidget *w=linphone_gtk_get_main_window();
-       LinphoneCore *lc=linphone_gtk_get_core();
-       linphone_core_enable_video_preview(lc,linphone_core_video_enabled(lc));
-       gtk_widget_show(w);
-       gtk_window_present(GTK_WINDOW(w));
-}
-
-static void linphone_gtk_show(LinphoneCore *lc){
-       linphone_gtk_show_main_window();
-}
-
-static void linphone_gtk_inv_recv(LinphoneCore *lc, const char *from){
-       GtkWidget *w=linphone_gtk_create_window("incoming_call");
-       GtkWidget *label;
-       gchar *msg;
-
-       if (auto_answer){
-               g_timeout_add(2000,(GSourceFunc)linphone_gtk_auto_answer,w);
-       }
-
-       gtk_window_set_transient_for(GTK_WINDOW(w),GTK_WINDOW(linphone_gtk_get_main_window()));
-       gtk_window_set_position(GTK_WINDOW(w),GTK_WIN_POS_CENTER_ON_PARENT);
-
-       label=linphone_gtk_get_widget(w,"message");
-       msg=g_strdup_printf(_("Incoming call from %s"),from);
-       gtk_label_set_text(GTK_LABEL(label),msg);
-       gtk_window_set_title(GTK_WINDOW(w),msg);
-       gtk_widget_show(w);
-       gtk_window_present(GTK_WINDOW(w));
-       /*gtk_window_set_urgency_hint(GTK_WINDOW(w),TRUE);*/
-       g_free(msg);
-       g_object_set_data(G_OBJECT(linphone_gtk_get_main_window()),"incoming_call",w);
-       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"uribar")),
-                       from);
-}
-
-static void linphone_gtk_bye_recv(LinphoneCore *lc, const char *from){
-       
-}
-
-static void linphone_gtk_notify_recv(LinphoneCore *lc, LinphoneFriend * fid, const char *url, const char *status, const char *img){
-}
-
-static void linphone_gtk_new_subscriber_response(GtkWidget *dialog, guint response_id, LinphoneFriend *lf){
-       switch(response_id){
-               case GTK_RESPONSE_YES:
-                       linphone_gtk_show_contact(lf);
-               break;
-               default:
-                       linphone_core_reject_subscriber(linphone_gtk_get_core(),lf);
-       }
-       gtk_widget_destroy(dialog);
-}
-
-static void linphone_gtk_new_unknown_subscriber(LinphoneCore *lc, LinphoneFriend *lf, const char *url){
-       GtkWidget *dialog;
-
-       if (linphone_gtk_get_ui_config_int("subscribe_deny_all",0)){
-               linphone_core_reject_subscriber(linphone_gtk_get_core(),lf);
-               return;
-       }
-
-       gchar *message=g_strdup_printf(_("%s would like to add you to his contact list.\nWould you allow him to see your presence status or add him to your contact list ?\nIf you answer no, this person will be temporarily blacklisted."),url);
-       dialog = gtk_message_dialog_new (
-                               GTK_WINDOW(linphone_gtk_get_main_window()),
-                                GTK_DIALOG_DESTROY_WITH_PARENT,
-                               GTK_MESSAGE_QUESTION,
-                                GTK_BUTTONS_YES_NO,
-                                "%s",
-                               message);
-       g_free(message);
-       g_signal_connect(G_OBJECT (dialog), "response",
-               G_CALLBACK (linphone_gtk_new_subscriber_response),lf);
-       /* actually show the box */
-       gtk_widget_show(dialog);
-}
-
-typedef struct _AuthTimeout{
-       GtkWidget *w;
-} AuthTimeout;
-
-
-static void auth_timeout_clean(AuthTimeout *tout){
-       tout->w=NULL;
-}
-
-static gboolean auth_timeout_destroy(AuthTimeout *tout){
-       if (tout->w)  {
-               g_object_weak_unref(G_OBJECT(tout->w),(GWeakNotify)auth_timeout_clean,tout);
-               gtk_widget_destroy(tout->w);
-       }
-       g_free(tout);
-       return FALSE;
-}
-
-static AuthTimeout * auth_timeout_new(GtkWidget *w){
-       AuthTimeout *tout=g_new(AuthTimeout,1);
-       tout->w=w;
-       /*so that the timeout no more references the widget when it is destroyed:*/
-       g_object_weak_ref(G_OBJECT(w),(GWeakNotify)auth_timeout_clean,tout);
-       /*so that the widget is automatically destroyed after some time */
-       g_timeout_add(30000,(GtkFunction)auth_timeout_destroy,tout);
-       return tout;
-}
-
-void linphone_gtk_password_cancel(GtkWidget *w){
-       LinphoneAuthInfo *info;
-       GtkWidget *window=gtk_widget_get_toplevel(w);
-       info=(LinphoneAuthInfo*)g_object_get_data(G_OBJECT(window),"auth_info");
-       linphone_core_abort_authentication(linphone_gtk_get_core(),info);
-       gtk_widget_destroy(window);
-}
-
-void linphone_gtk_password_ok(GtkWidget *w){
-       GtkWidget *entry;
-       GtkWidget *window=gtk_widget_get_toplevel(w);
-       LinphoneAuthInfo *info;
-       info=(LinphoneAuthInfo*)g_object_get_data(G_OBJECT(window),"auth_info");
-       g_object_weak_unref(G_OBJECT(window),(GWeakNotify)linphone_auth_info_destroy,info);
-       entry=linphone_gtk_get_widget(window,"password_entry");
-       linphone_auth_info_set_passwd(info,gtk_entry_get_text(GTK_ENTRY(entry)));
-       linphone_auth_info_set_userid(info,
-               gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(window,"userid_entry"))));
-       linphone_core_add_auth_info(linphone_gtk_get_core(),info);
-       gtk_widget_destroy(window);
-}
-
-static void linphone_gtk_auth_info_requested(LinphoneCore *lc, const char *realm, const char *username){
-       GtkWidget *w=linphone_gtk_create_window("password");
-       GtkWidget *label=linphone_gtk_get_widget(w,"message");
-       LinphoneAuthInfo *info;
-       gchar *msg;
-       GtkWidget *mw=linphone_gtk_get_main_window();
-       
-       if (mw && GTK_WIDGET_VISIBLE(linphone_gtk_get_widget(mw,"login_frame"))){
-               /*don't prompt for authentication when login frame is visible*/
-               linphone_core_abort_authentication(lc,NULL);
-               return;
-       }
-
-       msg=g_strdup_printf(_("Please enter your password for username <i>%s</i>\n at domain <i>%s</i>:"),
-               username,realm);
-       gtk_label_set_markup(GTK_LABEL(label),msg);
-       g_free(msg);
-       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"userid_entry")),username);
-       info=linphone_auth_info_new(username, NULL, NULL, NULL,realm);
-       g_object_set_data(G_OBJECT(w),"auth_info",info);
-       g_object_weak_ref(G_OBJECT(w),(GWeakNotify)linphone_auth_info_destroy,info);
-       gtk_widget_show(w);
-       auth_timeout_new(w);
-}
-
-static void linphone_gtk_display_status(LinphoneCore *lc, const char *status){
-       GtkWidget *w=linphone_gtk_get_main_window();
-       GtkWidget *status_bar=linphone_gtk_get_widget(w,"status_bar");
-       gtk_statusbar_push(GTK_STATUSBAR(status_bar),
-                       gtk_statusbar_get_context_id(GTK_STATUSBAR(status_bar),""),
-                       status);
-}
-
-static void linphone_gtk_display_message(LinphoneCore *lc, const char *msg){
-       linphone_gtk_display_something(GTK_MESSAGE_INFO,msg);
-}
-
-static void linphone_gtk_display_warning(LinphoneCore *lc, const char *warning){
-       linphone_gtk_display_something(GTK_MESSAGE_WARNING,warning);
-}
-
-static void linphone_gtk_display_url(LinphoneCore *lc, const char *msg, const char *url){
-       char richtext[4096];
-       snprintf(richtext,sizeof(richtext),"%s %s",msg,url);
-       linphone_gtk_display_something(GTK_MESSAGE_INFO,richtext);
-}
-
-static void linphone_gtk_display_question(LinphoneCore *lc, const char *question){
-       linphone_gtk_display_something(GTK_MESSAGE_QUESTION,question);
-}
-
-static void linphone_gtk_call_log_updated(LinphoneCore *lc, LinphoneCallLog *cl){
-       GtkWidget *w=(GtkWidget*)g_object_get_data(G_OBJECT(linphone_gtk_get_main_window()),"call_logs");
-       if (w) linphone_gtk_call_log_update(w);
-}
-
-static void linphone_gtk_general_state(LinphoneCore *lc, LinphoneGeneralState *gstate){
-       switch(gstate->new_state){
-               case GSTATE_CALL_OUT_CONNECTED:
-               case GSTATE_CALL_IN_CONNECTED:
-                       if (linphone_gtk_use_in_call_view())
-                               linphone_gtk_in_call_view_set_in_call();
-                       linphone_gtk_enable_mute_button(
-                               GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"main_mute")),
-                       TRUE);
-               break;
-               case GSTATE_CALL_ERROR:
-                       linphone_gtk_call_terminated(gstate->message);
-               break;
-               case GSTATE_CALL_END:
-                       linphone_gtk_call_terminated(NULL);
-               break;
-               default:
-               break;
-       }
-}
-
-static void icon_popup_menu(GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer user_data){
-       GtkWidget *menu=(GtkWidget*)g_object_get_data(G_OBJECT(status_icon),"menu");
-       gtk_menu_popup(GTK_MENU(menu),NULL,NULL,gtk_status_icon_position_menu,status_icon,button,activate_time);
-}
-
-void linphone_gtk_open_browser(const char *url){
-       /*in gtk 2.16, gtk_show_uri does not work...*/
-#ifndef WIN32
-#if GTK_CHECK_VERSION(2,18,3)
-       gtk_show_uri(NULL,url,GDK_CURRENT_TIME,NULL);
-#else
-       char cl[255];
-       snprintf(cl,sizeof(cl),"/usr/bin/x-www-browser %s",url);
-       g_spawn_command_line_async(cl,NULL);
-#endif
-#else /*WIN32*/
-       ShellExecute(0,"open",url,NULL,NULL,1);
-#endif
-}
-
-void linphone_gtk_link_to_website(GtkWidget *item){
-       const gchar *home=(const gchar*)g_object_get_data(G_OBJECT(item),"home");
-       linphone_gtk_open_browser(home);
-}
-
-static GtkWidget *create_icon_menu(){
-       GtkWidget *menu=gtk_menu_new();
-       GtkWidget *menu_item;
-       GtkWidget *image;
-       gchar *tmp;
-       const gchar *homesite;
-       
-       homesite=linphone_gtk_get_ui_config("home","http://www.linphone.org");
-       menu_item=gtk_image_menu_item_new_with_label(_("Website link"));
-       tmp=g_strdup(homesite);
-       g_object_set_data(G_OBJECT(menu_item),"home",tmp);
-       g_object_weak_ref(G_OBJECT(menu_item),(GWeakNotify)g_free,tmp);
-       
-       image=gtk_image_new_from_stock(GTK_STOCK_HELP,GTK_ICON_SIZE_MENU);
-       gtk_widget_show(image);
-       gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
-       //g_object_unref(G_OBJECT(image));
-       gtk_widget_show(menu_item);
-       gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
-       g_signal_connect(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_link_to_website,NULL);
-       
-       menu_item=gtk_image_menu_item_new_from_stock(GTK_STOCK_ABOUT,NULL);
-       gtk_widget_show(menu_item);
-       gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
-       g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_show_about,NULL);
-       menu_item=gtk_image_menu_item_new_from_stock(GTK_STOCK_QUIT,NULL);
-       gtk_widget_show(menu_item);
-       gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
-       g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)gtk_main_quit,NULL);
-       gtk_widget_show(menu);
-       return menu;
-}
-
-static GtkStatusIcon *icon=NULL;
-
-static void linphone_gtk_init_status_icon(){
-       const char *icon_path=linphone_gtk_get_ui_config("icon",LINPHONE_ICON);
-       GdkPixbuf *pbuf=create_pixbuf(icon_path);
-       GtkWidget *menu=create_icon_menu();
-       const char *title;
-       icon=gtk_status_icon_new_from_pixbuf(pbuf);
-       g_object_unref(G_OBJECT(pbuf));
-       g_signal_connect_swapped(G_OBJECT(icon),"activate",(GCallback)linphone_gtk_show_main_window,linphone_gtk_get_main_window());
-       g_signal_connect(G_OBJECT(icon),"popup-menu",(GCallback)icon_popup_menu,NULL);
-       title=linphone_gtk_get_ui_config("title",_("Linphone - a video internet phone"));
-       gtk_status_icon_set_tooltip(icon,title);
-       gtk_status_icon_set_visible(icon,TRUE);
-       g_object_set_data(G_OBJECT(icon),"menu",menu);
-       g_object_weak_ref(G_OBJECT(icon),(GWeakNotify)gtk_widget_destroy,menu);
-}
-
-void linphone_gtk_load_identities(void){
-       const MSList *elem;
-       GtkComboBox *box=GTK_COMBO_BOX(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"identities"));
-       char *def_identity;
-       LinphoneProxyConfig *def=NULL;
-       int def_index=0,i;
-       GtkListStore *store;
-
-       store=GTK_LIST_STORE(gtk_combo_box_get_model(box));
-       gtk_list_store_clear(store);
-
-       linphone_core_get_default_proxy(linphone_gtk_get_core(),&def);
-       def_identity=g_strdup_printf(_("%s (Default)"),linphone_core_get_primary_contact(linphone_gtk_get_core()));
-       gtk_combo_box_append_text(box,def_identity);
-       g_free(def_identity);
-       for(i=1,elem=linphone_core_get_proxy_config_list(linphone_gtk_get_core());
-                       elem!=NULL;
-                       elem=ms_list_next(elem),i++){
-               LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
-               gtk_combo_box_append_text(box,linphone_proxy_config_get_identity(cfg));
-               if (cfg==def) {
-                       def_index=i;
-               }
-       }
-       gtk_combo_box_set_active(box,def_index);
-}
-
-static void linphone_gtk_dtmf_clicked(GtkButton *button){
-       const char *label=gtk_button_get_label(button);
-       if (linphone_core_in_call(linphone_gtk_get_core())){
-               linphone_core_send_dtmf(linphone_gtk_get_core(),label[0]);
-       }else{
-               GtkWidget *uri_bar=linphone_gtk_get_widget(gtk_widget_get_toplevel(GTK_WIDGET(button)),"uribar");
-               int pos=-1;
-               gtk_editable_insert_text(GTK_EDITABLE(uri_bar),label,1,&pos);
-       }
-}
-
-static void linphone_gtk_connect_digits(void){
-       GtkContainer *cont=GTK_CONTAINER(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"dtmf_table"));
-       GList *children=gtk_container_get_children(cont);
-       GList *elem;
-       for(elem=children;elem!=NULL;elem=elem->next){
-               GtkButton *button=GTK_BUTTON(elem->data);
-               g_signal_connect(G_OBJECT(button),"clicked",(GCallback)linphone_gtk_dtmf_clicked,NULL);
-       }
-}
-
-static void linphone_gtk_check_menu_items(void){
-       bool_t audio_only=!linphone_core_video_enabled(linphone_gtk_get_core());
-       gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(linphone_gtk_get_widget(
-                                       linphone_gtk_get_main_window(),
-                                       audio_only ? "audio_only_item" : "video_item")), TRUE);
-}
-
-static gboolean linphone_gtk_can_manage_accounts(){
-       LinphoneCore *lc=linphone_gtk_get_core();
-       const MSList *elem;
-       for(elem=linphone_core_get_sip_setups(lc);elem!=NULL;elem=elem->next){
-               SipSetup *ss=(SipSetup*)elem->data;
-               if (sip_setup_get_capabilities(ss) & SIP_SETUP_CAP_ACCOUNT_MANAGER){
-                       return TRUE;
-               }
-       }
-       return FALSE;
-}
-
-static void linphone_gtk_configure_main_window(){
-       static gboolean config_loaded=FALSE;
-       static const char *title;
-       static const char *home;
-       static const char *start_call_icon;
-       static const char *stop_call_icon;
-       static gboolean update_check_menu;
-       GtkWidget *w=linphone_gtk_get_main_window();
-       if (!config_loaded){
-               title=linphone_gtk_get_ui_config("title","Linphone");
-               home=linphone_gtk_get_ui_config("home","http://www.linphone.org");
-               start_call_icon=linphone_gtk_get_ui_config("start_call_icon","green.png");
-               stop_call_icon=linphone_gtk_get_ui_config("stop_call_icon","red.png");
-               update_check_menu=linphone_gtk_get_ui_config_int("update_check_menu",0);
-               config_loaded=TRUE;
-       }
-       linphone_gtk_configure_window(w,"main_window");
-       if (title) {
-               gtk_window_set_title(GTK_WINDOW(w),title);
-#if GTK_CHECK_VERSION(2,16,0)
-               gtk_menu_item_set_label(GTK_MENU_ITEM(linphone_gtk_get_widget(w,"main_menu")),title);
-#endif
-       }
-       if (start_call_icon){
-               GdkPixbuf *pbuf=create_pixbuf(start_call_icon);
-               gtk_image_set_from_pixbuf(GTK_IMAGE(linphone_gtk_get_widget(w,"start_call_icon")),pbuf);
-               g_object_unref(G_OBJECT(pbuf));
-       }
-       if (stop_call_icon){
-               GdkPixbuf *pbuf=create_pixbuf(stop_call_icon);
-               gtk_image_set_from_pixbuf(GTK_IMAGE(linphone_gtk_get_widget(w,"terminate_call_icon")),pbuf);
-               gtk_image_set_from_pixbuf(GTK_IMAGE(linphone_gtk_get_widget(w,"in_call_terminate_icon")),pbuf);
-               g_object_unref(G_OBJECT(pbuf));
-       }
-       if (home){
-               gchar *tmp;
-               GtkWidget *menu_item=linphone_gtk_get_widget(w,"home_item");
-               tmp=g_strdup(home);
-               g_object_set_data(G_OBJECT(menu_item),"home",tmp);
-       }
-       if (!linphone_gtk_can_manage_accounts())
-               gtk_widget_hide(linphone_gtk_get_widget(w,"run_assistant"));
-       if (update_check_menu){
-               gtk_widget_show(linphone_gtk_get_widget(w,"versioncheck"));
-       }
-}
-
-void linphone_gtk_manage_login(void){
-       LinphoneCore *lc=linphone_gtk_get_core();
-       LinphoneProxyConfig *cfg=NULL;
-       linphone_core_get_default_proxy(lc,&cfg);
-       if (cfg){
-               SipSetup *ss=linphone_proxy_config_get_sip_setup(cfg);
-               if (ss && (sip_setup_get_capabilities(ss) & SIP_SETUP_CAP_LOGIN)){
-                       linphone_gtk_show_login_frame(cfg);
-               }
-       }
-}
-
-static void linphone_gtk_init_main_window(){
-       linphone_gtk_configure_main_window();
-       linphone_gtk_manage_login();
-       load_uri_history();
-       linphone_gtk_load_identities();
-       linphone_gtk_set_my_presence(linphone_core_get_presence_info(linphone_gtk_get_core()));
-       linphone_gtk_show_friends();
-       linphone_gtk_connect_digits();
-       linphone_gtk_check_menu_items();
-       linphone_gtk_enable_mute_button(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(linphone_gtk_get_main_window(),
-                                       "main_mute")),FALSE);
-       linphone_gtk_enable_mute_button(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(linphone_gtk_get_main_window(),
-                                       "incall_mute")),FALSE);
-       if (linphone_core_in_call(linphone_gtk_get_core())) linphone_gtk_call_started(
-               linphone_gtk_get_main_window());/*hide the call button, show terminate button*/
-}
-
-void linphone_gtk_close(){
-       /* couldn't find a way to prevent closing to destroy the main window*/
-       LinphoneCore *lc=linphone_gtk_get_core();
-       the_ui=NULL;
-       the_ui=linphone_gtk_create_window("main");
-       linphone_gtk_init_main_window();
-       /*shutdown call if any*/
-       if (linphone_core_in_call(lc)){
-               linphone_core_terminate_call(lc,NULL);
-               linphone_gtk_call_terminated(NULL);
-       }
-       linphone_core_enable_video_preview(lc,FALSE);
-}
-
-void linphone_gtk_log_handler(OrtpLogLevel lev, const char *fmt, va_list args){
-       if (verbose){
-               const char *lname="undef";
-               char *msg;
-               #ifdef __linux
-               va_list cap;/*copy of our argument list: a va_list cannot be re-used (SIGSEGV on linux 64 bits)*/
-               #endif
-               switch(lev){
-                       case ORTP_DEBUG:
-                               lname="debug";
-                               break;
-                       case ORTP_MESSAGE:
-                               lname="message";
-                               break;
-                       case ORTP_WARNING:
-                               lname="warning";
-                               break;
-                       case ORTP_ERROR:
-                               lname="error";
-                               break;
-                       case ORTP_FATAL:
-                               lname="fatal";
-                               break;
-                       default:
-                               g_error("Bad level !");
-               }
-#ifdef __linux
-               va_copy(cap,args);
-               msg=g_strdup_vprintf(fmt,cap);
-               va_end(cap);
-#else
-               msg=g_strdup_vprintf(fmt,args);
-#endif
-               fprintf(stdout,"linphone-%s : %s\n",lname,msg);
-               ortp_free(msg);
-       }
-       linphone_gtk_log_push(lev,fmt,args);
-}
-
-
-static void linphone_gtk_refer_received(LinphoneCore *lc, const char *refer_to){
-    GtkEntry * uri_bar =GTK_ENTRY(linphone_gtk_get_widget(
-               linphone_gtk_get_main_window(), "uribar"));
-       linphone_gtk_show_main_window();
-       gtk_entry_set_text(uri_bar, refer_to);
-       linphone_gtk_start_call(linphone_gtk_get_main_window());
-}
-
-int main(int argc, char *argv[]){
-#ifdef ENABLE_NLS
-       void *p;
-#endif
-       const char *config_file;
-       const char *lang;
-
-       g_thread_init(NULL);
-       gdk_threads_init();
-       
-       config_file=linphone_gtk_get_config_file();
-
-#ifdef WIN32
-       /*workaround for windows: sometimes LANG is defined to an integer value, not understood by gtk */
-       if ((lang=getenv("LANG"))!=NULL){
-               if (atoi(lang)!=0){
-                       char tmp[128];
-                       snprintf(tmp,sizeof(tmp),"LANG=",lang);
-                       _putenv(tmp);
-               }
-       }
-#endif
-
-       if ((lang=linphone_gtk_get_lang(config_file))!=NULL && lang[0]!='\0'){
-#ifdef WIN32
-               char tmp[128];
-               snprintf(tmp,sizeof(tmp),"LANG=%s",lang);
-               _putenv(tmp);
-#else
-               setenv("LANG",lang,1);
-#endif
-       }
-
-#ifdef ENABLE_NLS
-       p=bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
-       if (p==NULL) perror("bindtextdomain failed");
-       bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-       textdomain (GETTEXT_PACKAGE);
-#else
-       g_message("NLS disabled.\n");
-#endif
-#ifdef WIN32
-       gtk_rc_add_default_file("./gtkrc");
-#endif
-       gdk_threads_enter();
-       
-       if (!gtk_init_with_args(&argc,&argv,_("A free SIP video-phone"),
-                               linphone_options,NULL,NULL)){
-               gdk_threads_leave();
-               return -1;
-       }
-#ifdef WIN32
-       if (workingdir!=NULL)
-               _chdir(workingdir);
-#endif
-
-       if (linphone_core_wake_up_possible_already_running_instance(
-               config_file, addr_to_call) == 0){
-               g_message("addr_to_call=%s",addr_to_call);
-               g_warning("Another running instance of linphone has been detected. It has been woken-up.");
-               g_warning("This instance is going to exit now.");
-               gdk_threads_leave();
-               return 0;
-       }
-
-       add_pixmap_directory("pixmaps");
-       add_pixmap_directory(PACKAGE_DATA_DIR "/pixmaps/linphone");
-
-       the_ui=linphone_gtk_create_window("main");
-       
-       linphone_gtk_create_log_window();
-       linphone_core_enable_logs_with_cb(linphone_gtk_log_handler);
-
-       linphone_gtk_init_liblinphone(config_file);
-       /* do not lower timeouts under 30 ms because it exhibits a bug on gtk+/win32, with cpu running 20% all the time...*/
-       gtk_timeout_add(30,(GtkFunction)linphone_gtk_iterate,(gpointer)linphone_gtk_get_core());
-       gtk_timeout_add(30,(GtkFunction)linphone_gtk_check_logs,(gpointer)NULL);
-       linphone_gtk_init_main_window();
-       linphone_gtk_init_status_icon();
-       if (!iconified)
-               linphone_gtk_show_main_window();
-       if (linphone_gtk_get_ui_config_int("update_check_menu",0)==0)
-               linphone_gtk_check_for_new_version();
-
-       gtk_main();
-       gdk_threads_leave();
-       linphone_gtk_destroy_log_window();
-       linphone_core_destroy(the_core);
-       /*workaround a bug on win32 that makes status icon still present in the systray even after program exit.*/
-       gtk_status_icon_set_visible(icon,FALSE);
-       return 0;
-}
diff --git a/linphone/gtk-glade/main.glade b/linphone/gtk-glade/main.glade
deleted file mode 100644 (file)
index ad7445e..0000000
+++ /dev/null
@@ -1,1429 +0,0 @@
-<?xml version="1.0"?>
-<glade-interface>
-  <!-- interface-requires gtk+ 2.16 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <widget class="GtkWindow" id="main">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="icon">linphone2.png</property>
-    <signal name="destroy" handler="linphone_gtk_close"/>
-    <child>
-      <widget class="GtkVBox" id="vbox2">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <child>
-          <widget class="GtkMenuBar" id="main_menubar">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child>
-              <widget class="GtkMenuItem" id="main_menu">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">_Linphone</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="menu2">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="run_assistant">
-                        <property name="label" translatable="yes">Assistant</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="linphone_gtk_create_assistant"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="image1">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-preferences</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="menuitem5">
-                        <property name="label">gtk-preferences</property>
-                        <property name="visible">True</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="linphone_gtk_show_parameters"/>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="menuitem1">
-                        <property name="label">Call history</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="linphone_gtk_show_call_logs"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="image2">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-justify-fill</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="logout">
-                        <property name="label">gtk-disconnect</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="linphone_gtk_logout_clicked"/>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkSeparatorMenuItem" id="separatormenuitem2">
-                        <property name="visible">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="quit">
-                        <property name="label">gtk-quit</property>
-                        <property name="visible">True</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="gtk_main_quit"/>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="modes">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">_Modes</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="menu_mode">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkRadioMenuItem" id="audio_only_item">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Audio only</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_as_radio">True</property>
-                        <property name="group">video_item</property>
-                        <signal name="activate" handler="linphone_gtk_set_audio_only"/>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkRadioMenuItem" id="video_item">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Audio &amp; Video</property>
-                        <property name="use_underline">True</property>
-                        <property name="active">True</property>
-                        <property name="draw_as_radio">True</property>
-                        <property name="group">audio_only_item</property>
-                        <signal name="activate" handler="linphone_gtk_set_audio_video"/>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
-                        <property name="visible">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkCheckMenuItem" id="menuitem3">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">Enable self-view</property>
-                        <property name="use_underline">True</property>
-                        <property name="active">True</property>
-                        <signal name="toggled" handler="linphone_gtk_enable_self_view"/>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkImageMenuItem" id="menuitem4">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="use_underline">True</property>
-                <property name="use_stock">True</property>
-                <child>
-                  <widget class="GtkMenu" id="menu3">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="show_logs">
-                        <property name="label">Show debug messages</property>
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="linphone_gtk_log_show"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="image3">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-info</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="menuitem6">
-                        <property name="label">gtk-about</property>
-                        <property name="visible">True</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="linphone_gtk_show_about"/>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="home_item">
-                        <property name="label">Homepage</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="linphone_gtk_link_to_website"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="image4">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-home</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="versioncheck">
-                        <property name="label" translatable="yes">Check for updates</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="linphone_gtk_check_for_updates"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="image5">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-info</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkHBox" id="hbox1">
-            <property name="visible">True</property>
-            <child>
-              <widget class="GtkVBox" id="idle_frame">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="orientation">vertical</property>
-                <child>
-                  <widget class="GtkHBox" id="hbox2">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkButton" id="start_call">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="has_tooltip">True</property>
-                        <property name="tooltip" translatable="yes">Start call</property>
-                        <property name="relief">half</property>
-                        <signal name="clicked" handler="linphone_gtk_start_call"/>
-                        <child>
-                          <widget class="GtkHBox" id="hbox4">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkImage" id="start_call_icon">
-                                <property name="visible">True</property>
-                                <property name="stock">gtk-apply</property>
-                              </widget>
-                              <packing>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="start_call_label">
-                                <property name="label" translatable="yes">Start call</property>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="padding">10</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkFrame" id="frame4">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label_xalign">0</property>
-                        <child>
-                          <widget class="GtkAlignment" id="alignment4">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <child>
-                              <widget class="GtkHBox" id="hbox3">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <child>
-                                  <widget class="GtkEntry" id="uribar">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="tooltip" translatable="yes">Enter username, phone number, or full sip address</property>
-                                    <property name="invisible_char">&#x25CF;</property>
-                                    <signal name="activate" handler="linphone_gtk_uri_bar_activate"/>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label9">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">SIP address or phone number:</property>
-                            <property name="use_markup">True</property>
-                          </widget>
-                          <packing>
-                            <property name="type">label_item</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkButton" id="terminate_call">
-                        <property name="visible">True</property>
-                        <property name="sensitive">False</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="has_tooltip">True</property>
-                        <property name="tooltip" translatable="yes">Terminate call</property>
-                        <property name="relief">half</property>
-                        <signal name="clicked" handler="linphone_gtk_terminate_call"/>
-                        <child>
-                          <widget class="GtkHBox" id="hbox21">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <child>
-                              <widget class="GtkImage" id="terminate_call_icon">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="stock">gtk-close</property>
-                              </widget>
-                              <packing>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="terminate_call_label">
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Terminate call</property>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="padding">10</property>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="padding">8</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkHBox" id="hbox5">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkVBox" id="vbox5">
-                        <property name="visible">True</property>
-                        <property name="orientation">vertical</property>
-                        <child>
-                          <widget class="GtkFrame" id="contact_list_frame">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label_xalign">0</property>
-                            <child>
-                              <widget class="GtkAlignment" id="alignment6">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="left_padding">12</property>
-                                <child>
-                                  <widget class="GtkVBox" id="vbox7">
-                                    <property name="visible">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="orientation">vertical</property>
-                                    <child>
-                                      <widget class="GtkHBox" id="filtering_box">
-                                        <property name="visible">True</property>
-                                        <child>
-                                          <widget class="GtkLabel" id="label2">
-                                            <property name="visible">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="label" translatable="yes">Lookup:</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="padding">12</property>
-                                            <property name="position">0</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkEntry" id="search_bar">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="invisible_char">&#x25CF;</property>
-                                            <signal name="changed" handler="linphone_gtk_show_friends"/>
-                                          </widget>
-                                          <packing>
-                                            <property name="padding">4</property>
-                                            <property name="position">1</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkLabel" id="label_in">
-                                            <property name="visible">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="label" translatable="yes">in</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="padding">8</property>
-                                            <property name="position">2</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkComboBox" id="show_category">
-                                            <property name="visible">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="active">0</property>
-                                            <property name="items" translatable="yes">All users
-Online users</property>
-                                            <signal name="changed" handler="linphone_gtk_show_friends"/>
-                                          </widget>
-                                          <packing>
-                                            <property name="padding">4</property>
-                                            <property name="position">3</property>
-                                          </packing>
-                                        </child>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="position">0</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkScrolledWindow" id="scrolledwindow1">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="hscrollbar_policy">automatic</property>
-                                        <property name="vscrollbar_policy">automatic</property>
-                                        <child>
-                                          <widget class="GtkTreeView" id="contact_list">
-                                            <property name="height_request">120</property>
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <signal name="button_press_event" handler="linphone_gtk_contact_list_button_pressed"/>
-                                            <signal name="cursor_changed" handler="linphone_gtk_contact_clicked"/>
-                                            <signal name="row_activated" handler="linphone_gtk_contact_activated"/>
-                                            <signal name="popup_menu" handler="linphone_gtk_popup_contact_menu"/>
-                                          </widget>
-                                        </child>
-                                      </widget>
-                                      <packing>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkHBox" id="directory_search_box">
-                                        <child>
-                                          <widget class="GtkEntry" id="directory_search_entry">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="invisible_char">&#x25CF;</property>
-                                            <property name="secondary_icon_stock">gtk-find</property>
-                                            <property name="secondary_icon_activatable">True</property>
-                                            <property name="secondary_icon_sensitive">True</property>
-                                            <signal name="focus_in_event" handler="linphone_gtk_directory_search_focus_in"/>
-                                            <signal name="activate" handler="linphone_gtk_directory_search_activate"/>
-                                            <signal name="icon_press" handler="linphone_gtk_directory_search_activate"/>
-                                            <signal name="focus_out_event" handler="linphone_gtk_directory_search_focus_out"/>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">0</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="directory_search_button">
-                                            <property name="label" translatable="yes">gtk-find</property>
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="use_stock">True</property>
-                                            <signal name="clicked" handler="linphone_gtk_directory_search_button_clicked"/>
-                                          </widget>
-                                          <packing>
-                                            <property name="expand">False</property>
-                                            <property name="position">1</property>
-                                          </packing>
-                                        </child>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">False</property>
-                                        <property name="position">2</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                </child>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label12">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">&lt;b&gt;Contact list&lt;/b&gt;</property>
-                                <property name="use_markup">True</property>
-                              </widget>
-                              <packing>
-                                <property name="type">label_item</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="padding">8</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkHBox" id="hbox7">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkToggleButton" id="main_mute">
-                                <property name="label" translatable="yes">Mute</property>
-                                <property name="sensitive">False</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">True</property>
-                                <signal name="toggled" handler="linphone_gtk_mute_toggled"/>
-                              </widget>
-                              <packing>
-                                <property name="fill">False</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkHBox" id="internet_kind_controls">
-                            <child>
-                              <widget class="GtkLabel" id="label7">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Internet connection:</property>
-                              </widget>
-                              <packing>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkComboBox" id="internet_kind">
-                                <property name="visible">True</property>
-                                <property name="active">0</property>
-                                <property name="items" translatable="yes">ADSL
-Fiber Channel</property>
-                                <signal name="changed" handler="linphone_gtk_internet_kind_changed"/>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="fill">False</property>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="padding">8</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkVBox" id="vbox6">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="orientation">vertical</property>
-                        <child>
-                          <widget class="GtkFrame" id="dialpad">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label_xalign">0</property>
-                            <child>
-                              <widget class="GtkAlignment" id="alignment5">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <child>
-                                  <widget class="GtkTable" id="dtmf_table">
-                                    <property name="visible">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="border_width">4</property>
-                                    <property name="n_rows">4</property>
-                                    <property name="n_columns">4</property>
-                                    <property name="homogeneous">True</property>
-                                    <child>
-                                      <widget class="GtkButton" id="dtmf_D">
-                                        <property name="label" translatable="yes">D</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="left_attach">3</property>
-                                        <property name="right_attach">4</property>
-                                        <property name="top_attach">3</property>
-                                        <property name="bottom_attach">4</property>
-                                        <property name="x_options"></property>
-                                        <property name="y_options"></property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkButton" id="dtmf_hash">
-                                        <property name="label" translatable="yes">#</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="left_attach">2</property>
-                                        <property name="right_attach">3</property>
-                                        <property name="top_attach">3</property>
-                                        <property name="bottom_attach">4</property>
-                                        <property name="x_options"></property>
-                                        <property name="y_options"></property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkButton" id="dtmf_0">
-                                        <property name="label" translatable="yes">0</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="right_attach">2</property>
-                                        <property name="top_attach">3</property>
-                                        <property name="bottom_attach">4</property>
-                                        <property name="x_options"></property>
-                                        <property name="y_options"></property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkButton" id="dtmf_star">
-                                        <property name="label" translatable="yes">*</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="top_attach">3</property>
-                                        <property name="bottom_attach">4</property>
-                                        <property name="x_options"></property>
-                                        <property name="y_options"></property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkButton" id="dtmf_C">
-                                        <property name="label" translatable="yes">C</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="left_attach">3</property>
-                                        <property name="right_attach">4</property>
-                                        <property name="top_attach">2</property>
-                                        <property name="bottom_attach">3</property>
-                                        <property name="x_options"></property>
-                                        <property name="y_options"></property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkButton" id="dtmf_9">
-                                        <property name="label" translatable="yes">9</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="left_attach">2</property>
-                                        <property name="right_attach">3</property>
-                                        <property name="top_attach">2</property>
-                                        <property name="bottom_attach">3</property>
-                                        <property name="x_options"></property>
-                                        <property name="y_options"></property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkButton" id="dtmf_8">
-                                        <property name="label" translatable="yes">8</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="right_attach">2</property>
-                                        <property name="top_attach">2</property>
-                                        <property name="bottom_attach">3</property>
-                                        <property name="x_options"></property>
-                                        <property name="y_options"></property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkButton" id="dtmf_7">
-                                        <property name="label" translatable="yes">7</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="top_attach">2</property>
-                                        <property name="bottom_attach">3</property>
-                                        <property name="x_options"></property>
-                                        <property name="y_options"></property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkButton" id="dtmf_B">
-                                        <property name="label" translatable="yes">B</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="left_attach">3</property>
-                                        <property name="right_attach">4</property>
-                                        <property name="top_attach">1</property>
-                                        <property name="bottom_attach">2</property>
-                                        <property name="x_options"></property>
-                                        <property name="y_options"></property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkButton" id="dtmf_6">
-                                        <property name="label" translatable="yes">6</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="left_attach">2</property>
-                                        <property name="right_attach">3</property>
-                                        <property name="top_attach">1</property>
-                                        <property name="bottom_attach">2</property>
-                                        <property name="x_options"></property>
-                                        <property name="y_options"></property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkButton" id="dtmf_5">
-                                        <property name="label" translatable="yes">5</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="right_attach">2</property>
-                                        <property name="top_attach">1</property>
-                                        <property name="bottom_attach">2</property>
-                                        <property name="x_options"></property>
-                                        <property name="y_options"></property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkButton" id="dtmf_4">
-                                        <property name="label" translatable="yes">4</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="top_attach">1</property>
-                                        <property name="bottom_attach">2</property>
-                                        <property name="x_options"></property>
-                                        <property name="y_options"></property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkButton" id="dtmf_A">
-                                        <property name="label" translatable="yes">A</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="left_attach">3</property>
-                                        <property name="right_attach">4</property>
-                                        <property name="x_options"></property>
-                                        <property name="y_options"></property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkButton" id="dtmf_3">
-                                        <property name="label" translatable="yes">3</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="left_attach">2</property>
-                                        <property name="right_attach">3</property>
-                                        <property name="x_options"></property>
-                                        <property name="y_options"></property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkButton" id="dtmf_2">
-                                        <property name="label" translatable="yes">2</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="right_attach">2</property>
-                                        <property name="x_options"></property>
-                                        <property name="y_options"></property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkButton" id="dtmf_1">
-                                        <property name="label" translatable="yes">1</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="x_options"></property>
-                                        <property name="y_options"></property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                </child>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label11">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Digits</property>
-                                <property name="use_markup">True</property>
-                              </widget>
-                              <packing>
-                                <property name="type">label_item</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkHBox" id="hbox6">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkFrame" id="identity_frame">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label_xalign">0</property>
-                        <child>
-                          <widget class="GtkHBox" id="hbox9">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkAlignment" id="alignment8">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="left_padding">12</property>
-                                <child>
-                                  <widget class="GtkComboBox" id="identities">
-                                    <property name="visible">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="active">0</property>
-                                    <property name="items" translatable="yes">Default</property>
-                                    <signal name="changed" handler="linphone_gtk_used_identity_changed"/>
-                                  </widget>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkButton" id="presence_button">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">True</property>
-                                <signal name="clicked" handler="linphone_gtk_my_presence_clicked"/>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label17">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">My current identity:</property>
-                            <property name="use_markup">True</property>
-                          </widget>
-                          <packing>
-                            <property name="type">label_item</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="position">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkHButtonBox" id="go_to_call_view_box">
-                    <child>
-                      <widget class="GtkButton" id="go_to_call_view">
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">True</property>
-                        <signal name="clicked" handler="linphone_gtk_show_in_call_view"/>
-                        <child>
-                          <widget class="GtkHBox" id="hbox10">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkImage" id="image7">
-                                <property name="visible">True</property>
-                                <property name="stock">gtk-go-forward</property>
-                                <property name="icon-size">4</property>
-                              </widget>
-                              <packing>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label5">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Show current call</property>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="padding">8</property>
-                        <property name="pack_type">end</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">3</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkFrame" id="in_call_frame">
-                <property name="label_xalign">0.5</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment1">
-                    <property name="visible">True</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <widget class="GtkVBox" id="vbox3">
-                        <property name="visible">True</property>
-                        <property name="orientation">vertical</property>
-                        <child>
-                          <widget class="GtkImage" id="in_call_animation">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-info</property>
-                            <property name="icon-size">5</property>
-                          </widget>
-                          <packing>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkFrame" id="frame2">
-                            <property name="visible">True</property>
-                            <property name="label_xalign">0</property>
-                            <child>
-                              <widget class="GtkLabel" id="in_call_uri">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">label</property>
-                                <property name="justify">center</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label3">
-                                <property name="visible">True</property>
-                                <property name="use_markup">True</property>
-                              </widget>
-                              <packing>
-                                <property name="type">label_item</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkFrame" id="frame1">
-                            <property name="visible">True</property>
-                            <property name="label_xalign">0</property>
-                            <child>
-                              <widget class="GtkVBox" id="vbox4">
-                                <property name="visible">True</property>
-                                <property name="orientation">vertical</property>
-                                <child>
-                                  <widget class="GtkLabel" id="in_call_duration">
-                                    <property name="visible">True</property>
-                                    <property name="label" translatable="yes">Duration</property>
-                                    <property name="justify">center</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="call_label">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Duration:</property>
-                                <property name="use_markup">True</property>
-                              </widget>
-                              <packing>
-                                <property name="type">label_item</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkHButtonBox" id="hbuttonbox4">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkToggleButton" id="incall_mute">
-                                <property name="label" translatable="yes">Mute</property>
-                                <property name="visible">True</property>
-                                <property name="sensitive">False</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">True</property>
-                                <signal name="toggled" handler="linphone_gtk_mute_toggled"/>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">3</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkHButtonBox" id="hbuttonbox1">
-                            <property name="visible">True</property>
-                            <property name="layout_style">center</property>
-                            <child>
-                              <widget class="GtkButton" id="in_call_terminate">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">True</property>
-                                <signal name="clicked" handler="linphone_gtk_terminate_call"/>
-                                <child>
-                                  <widget class="GtkHBox" id="hbox8">
-                                    <property name="visible">True</property>
-                                    <child>
-                                      <widget class="GtkImage" id="in_call_terminate_icon">
-                                        <property name="visible">True</property>
-                                        <property name="stock">gtk-close</property>
-                                        <property name="icon-size">3</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="position">0</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkLabel" id="label1">
-                                        <property name="visible">True</property>
-                                        <property name="label" translatable="yes">&lt;b&gt;Terminate call&lt;/b&gt;</property>
-                                        <property name="use_markup">True</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="padding">8</property>
-                            <property name="position">4</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkHButtonBox" id="hbuttonbox2">
-                            <property name="visible">True</property>
-                            <property name="layout_style">center</property>
-                            <child>
-                              <widget class="GtkButton" id="idle_view_button">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">True</property>
-                                <signal name="clicked" handler="linphone_gtk_show_idle_view"/>
-                                <child>
-                                  <widget class="GtkHBox" id="hbox11">
-                                    <property name="visible">True</property>
-                                    <child>
-                                      <widget class="GtkImage" id="image6">
-                                        <property name="visible">True</property>
-                                        <property name="stock">gtk-go-back</property>
-                                        <property name="icon-size">1</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="position">0</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkLabel" id="label4">
-                                        <property name="visible">True</property>
-                                        <property name="label" translatable="yes">Main view</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="pack_type">end</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">5</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="in_call_status">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">In call</property>
-                    <property name="use_markup">True</property>
-                    <property name="justify">center</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkFrame" id="login_frame">
-                <property name="label_xalign">0</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment2">
-                    <property name="visible">True</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <widget class="GtkVBox" id="vbox1">
-                        <property name="visible">True</property>
-                        <property name="orientation">vertical</property>
-                        <child>
-                          <widget class="GtkFrame" id="frame5">
-                            <property name="visible">True</property>
-                            <property name="label_xalign">0</property>
-                            <child>
-                              <widget class="GtkAlignment" id="alignment3">
-                                <property name="visible">True</property>
-                                <property name="left_padding">12</property>
-                                <child>
-                                  <widget class="GtkTable" id="table1">
-                                    <property name="visible">True</property>
-                                    <property name="n_rows">4</property>
-                                    <property name="n_columns">2</property>
-                                    <child>
-                                      <widget class="GtkLabel" id="label8">
-                                        <property name="visible">True</property>
-                                        <property name="label" translatable="yes">Username</property>
-                                      </widget>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkLabel" id="label10">
-                                        <property name="visible">True</property>
-                                        <property name="label" translatable="yes">Password</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="top_attach">1</property>
-                                        <property name="bottom_attach">2</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkLabel" id="label13">
-                                        <property name="visible">True</property>
-                                        <property name="label" translatable="yes">Internet connection:</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="top_attach">2</property>
-                                        <property name="bottom_attach">3</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkEntry" id="login_username">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="invisible_char">&#x25CF;</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="right_attach">2</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkEntry" id="login_password">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="visibility">False</property>
-                                        <property name="invisible_char">&#x25CF;</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="right_attach">2</property>
-                                        <property name="top_attach">1</property>
-                                        <property name="bottom_attach">2</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkComboBox" id="login_internet_kind">
-                                        <property name="visible">True</property>
-                                        <property name="active">0</property>
-                                        <property name="items" translatable="yes">ADSL
-Fiber Channel</property>
-                                        <signal name="changed" handler="linphone_gtk_internet_kind_changed"/>
-                                      </widget>
-                                      <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="right_attach">2</property>
-                                        <property name="top_attach">2</property>
-                                        <property name="bottom_attach">3</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkCheckButton" id="automatic_login">
-                                        <property name="label" translatable="yes">Automatically log me in</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="draw_indicator">True</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="right_attach">2</property>
-                                        <property name="top_attach">3</property>
-                                        <property name="bottom_attach">4</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <placeholder/>
-                                    </child>
-                                  </widget>
-                                </child>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="login_label">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Login information</property>
-                                <property name="use_markup">True</property>
-                              </widget>
-                              <packing>
-                                <property name="type">label_item</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkHButtonBox" id="hbuttonbox3">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkButton" id="login_connect">
-                                <property name="label" translatable="yes">gtk-connect</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">True</property>
-                                <property name="use_stock">True</property>
-                                <signal name="clicked" handler="linphone_gtk_login_frame_connect_clicked"/>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label6">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">&lt;b&gt;Welcome !&lt;/b&gt;</property>
-                    <property name="use_markup">True</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkStatusbar" id="status_bar">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="spacing">2</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/linphone/gtk-glade/p2pwizard.glade b/linphone/gtk-glade/p2pwizard.glade
deleted file mode 100644 (file)
index 79007a6..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Sun Mar 29 21:17:24 2009 -->
-<glade-interface>
-  <widget class="GtkAssistant" id="p2pwizard">
-    <property name="title" translatable="yes">Creating a FONICS account</property>
-    <signal name="apply" handler="linphone_gtk_fonis_wizard_apply"/>
-    <signal name="prepare" handler="linphone_gtk_fonis_wizard_prepare"/>
-    <child>
-      <widget class="GtkLabel" id="label1">
-        <property name="visible">True</property>
-        <property name="label" translatable="yes">Welcome !
-This wizard will help you to setup a SIP account. 
-</property>
-        <property name="use_markup">True</property>
-        <property name="justify">GTK_JUSTIFY_CENTER</property>
-        <property name="wrap">True</property>
-        <property name="selectable">True</property>
-      </widget>
-      <packing>
-        <property name="page_type">GTK_ASSISTANT_PAGE_INTRO</property>
-        <property name="title">Introduction</property>
-      </packing>
-    </child>
-    <child>
-      <widget class="GtkVBox" id="vbox1">
-        <property name="visible">True</property>
-        <child>
-          <widget class="GtkLabel" id="label2">
-            <property name="visible">True</property>
-            <property name="label" translatable="yes">Please choose a username:</property>
-          </widget>
-        </child>
-        <child>
-          <widget class="GtkFrame" id="frame1">
-            <property name="visible">True</property>
-            <property name="label_xalign">0</property>
-            <child>
-              <widget class="GtkAlignment" id="alignment1">
-                <property name="visible">True</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <widget class="GtkVBox" id="vbox2">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkHBox" id="hbox1">
-                        <property name="visible">True</property>
-                        <child>
-                          <widget class="GtkEntry" id="username">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkButton" id="button1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="response_id">0</property>
-                            <signal name="clicked" handler="linphone_gtk_fonis_wizard_check_username_clicked"/>
-                            <child>
-                              <widget class="GtkHBox" id="hbox2">
-                                <property name="visible">True</property>
-                                <child>
-                                  <widget class="GtkImage" id="image1">
-                                    <property name="visible">True</property>
-                                    <property name="stock">gtk-apply</property>
-                                  </widget>
-                                </child>
-                                <child>
-                                  <widget class="GtkLabel" id="label5">
-                                    <property name="visible">True</property>
-                                    <property name="label" translatable="yes">Check availability</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="check_result">
-                        <property name="visible">True</property>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label4">
-                <property name="visible">True</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-      <packing>
-        <property name="title">Create your account !</property>
-      </packing>
-    </child>
-    <child>
-      <widget class="GtkLabel" id="label3">
-        <property name="visible">True</property>
-        <property name="label" translatable="yes">Done ! Your account is now created and ready to use.</property>
-      </widget>
-      <packing>
-        <property name="page_type">GTK_ASSISTANT_PAGE_CONFIRM</property>
-        <property name="title">Finished !</property>
-      </packing>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/linphone/gtk-glade/parameters.glade b/linphone/gtk-glade/parameters.glade
deleted file mode 100644 (file)
index 56d02a4..0000000
+++ /dev/null
@@ -1,1643 +0,0 @@
-<?xml version="1.0"?>
-<glade-interface>
-  <!-- interface-requires gtk+ 2.16 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <widget class="GtkWindow" id="parameters">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title" translatable="yes">Settings</property>
-    <property name="icon">linphone2.png</property>
-    <child>
-      <widget class="GtkVBox" id="vbox1">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <child>
-          <widget class="GtkNotebook" id="notebook1">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child>
-              <widget class="GtkVBox" id="network_tab">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkFrame" id="transport_frame">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label_xalign">0</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment1">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkVBox" id="vbox3">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkHBox" id="hbox2">
-                                <property name="visible">True</property>
-                                <child>
-                                  <widget class="GtkCheckButton" id="mtu_set">
-                                    <property name="label" translatable="yes">Set Maximum Transmission Unit:</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="draw_indicator">True</property>
-                                    <signal name="toggled" handler="linphone_gtk_mtu_set"/>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkSpinButton" id="mtu">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="adjustment">500 500 3001 1 10 10</property>
-                                    <signal name="value_changed" handler="linphone_gtk_mtu_changed"/>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkCheckButton" id="dtmf_sipinfo">
-                                <property name="label" translatable="yes">Send DTMFs as SIP info</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="draw_indicator">True</property>
-                                <signal name="toggled" handler="linphone_gtk_use_sip_info_dtmf_toggled"/>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkCheckButton" id="ipv6_enabled">
-                                <property name="label" translatable="yes">Use IPv6 instead of IPv4</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="draw_indicator">True</property>
-                                <signal name="toggled" handler="linphone_gtk_ipv6_toggled"/>
-                              </widget>
-                              <packing>
-                                <property name="position">2</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label1">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Transport&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkFrame" id="ports_frame">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label_xalign">0</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment2">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkTable" id="table1">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="n_rows">3</property>
-                            <property name="n_columns">2</property>
-                            <child>
-                              <widget class="GtkSpinButton" id="video_rtp_port">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="adjustment">1 1 65535 1 10 10</property>
-                                <signal name="value_changed" handler="linphone_gtk_video_port_changed"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkSpinButton" id="audio_rtp_port">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="adjustment">1 1 65535 1 10 10</property>
-                                <signal name="value_changed" handler="linphone_gtk_audio_port_changed"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkSpinButton" id="sip_port">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="adjustment">1 1 65535 1 10 10</property>
-                                <signal name="value_changed" handler="linphone_gtk_sip_port_changed"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label7">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Video RTP/UDP:</property>
-                                <property name="justify">right</property>
-                              </widget>
-                              <packing>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label6">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Audio RTP/UDP:</property>
-                                <property name="justify">right</property>
-                              </widget>
-                              <packing>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label5">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">SIP (UDP):</property>
-                                <property name="justify">right</property>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label4">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Ports&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkFrame" id="nat_frame">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label_xalign">0</property>
-                    <child>
-                      <widget class="GtkVButtonBox" id="vbuttonbox3">
-                        <property name="visible">True</property>
-                        <child>
-                          <widget class="GtkRadioButton" id="no_nat">
-                            <property name="label" translatable="yes">Direct connection to the Internet</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                            <signal name="toggled" handler="linphone_gtk_no_firewall_toggled"/>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkVBox" id="vbox4">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkRadioButton" id="use_nat_address">
-                                <property name="label" translatable="yes">Behind NAT / Firewall (specify gateway IP below)</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="active">True</property>
-                                <property name="draw_indicator">True</property>
-                                <property name="group">no_nat</property>
-                                <signal name="toggled" handler="linphone_gtk_use_nat_address_toggled"/>
-                              </widget>
-                              <packing>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkHBox" id="hbox21">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <child>
-                                  <widget class="GtkLabel" id="label39">
-                                    <property name="visible">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="label" translatable="yes">Public IP address:</property>
-                                    <property name="justify">right</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkEntry" id="nat_address">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <signal name="changed" handler="linphone_gtk_nat_address_changed"/>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkVBox" id="vbox5">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkRadioButton" id="use_stun">
-                                <property name="label" translatable="yes">Behind NAT / Firewall (use STUN to resolve)</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="active">True</property>
-                                <property name="draw_indicator">True</property>
-                                <property name="group">no_nat</property>
-                                <signal name="toggled" handler="linphone_gtk_use_stun_toggled"/>
-                              </widget>
-                              <packing>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkHBox" id="hbox24">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <child>
-                                  <widget class="GtkLabel" id="label42">
-                                    <property name="visible">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="label" translatable="yes">Stun server:</property>
-                                    <property name="justify">right</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkEntry" id="stun_server">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <signal name="changed" handler="linphone_gtk_stun_server_changed"/>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label38">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">&lt;b&gt;NAT and Firewall&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">2</property>
-                  </packing>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="hbox12">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkImage" id="image6">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="stock">gtk-network</property>
-                  </widget>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="network">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Network settings</property>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="tab_fill">False</property>
-                <property name="type">tab</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkVBox" id="multimedia_tab">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkFrame" id="frame14">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label_xalign">0</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment14">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkTable" id="table5">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="n_rows">6</property>
-                            <property name="n_columns">2</property>
-                            <child>
-                              <widget class="GtkHBox" id="ring_sound_box">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <child>
-                                  <widget class="GtkFileChooserButton" id="ring_chooser">
-                                    <property name="visible">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <signal name="file_set" handler="linphone_gtk_ring_file_set"/>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkButton" id="play_ring">
-                                    <property name="label" translatable="yes">gtk-media-play</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="use_stock">True</property>
-                                    <signal name="clicked" handler="linphone_gtk_play_ring_file"/>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">4</property>
-                                <property name="bottom_attach">5</property>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="ring_sound_label">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Ring sound:</property>
-                                <property name="justify">right</property>
-                              </widget>
-                              <packing>
-                                <property name="top_attach">4</property>
-                                <property name="bottom_attach">5</property>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkEntry" id="alsa_dev">
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <signal name="editing_done" handler="linphone_gtk_alsa_special_device_changed"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">3</property>
-                                <property name="bottom_attach">4</property>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkComboBox" id="capture_device">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="items" translatable="yes">default soundcard
-</property>
-                                <signal name="changed" handler="linphone_gtk_capture_device_changed"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkComboBox" id="ring_device">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="items" translatable="yes">default soundcard</property>
-                                <signal name="changed" handler="linphone_gtk_ring_device_changed"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label36">
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">ALSA special device (optional):</property>
-                                <property name="justify">right</property>
-                              </widget>
-                              <packing>
-                                <property name="top_attach">3</property>
-                                <property name="bottom_attach">4</property>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label35">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Capture device:</property>
-                                <property name="justify">right</property>
-                              </widget>
-                              <packing>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label34">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Ring device:</property>
-                                <property name="justify">right</property>
-                              </widget>
-                              <packing>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label32">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Playback device:</property>
-                                <property name="justify">right</property>
-                              </widget>
-                              <packing>
-                                <property name="x_options">GTK_FILL</property>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkComboBox" id="playback_device">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="items" translatable="yes">a sound card
-</property>
-                                <signal name="changed" handler="linphone_gtk_playback_device_changed"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="x_options">GTK_FILL</property>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkCheckButton" id="echo_cancelation">
-                                <property name="label" translatable="yes">Enable echo cancellation</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="draw_indicator">True</property>
-                                <signal name="toggled" handler="linphone_gtk_echo_cancelation_toggled"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">5</property>
-                                <property name="bottom_attach">6</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <placeholder/>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label31">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Audio&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkFrame" id="frame4">
-                    <property name="visible">True</property>
-                    <property name="label_xalign">0</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment4">
-                        <property name="visible">True</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkTable" id="table2">
-                            <property name="visible">True</property>
-                            <property name="n_rows">2</property>
-                            <property name="n_columns">2</property>
-                            <child>
-                              <widget class="GtkLabel" id="label9">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Video input device:</property>
-                                <property name="justify">right</property>
-                              </widget>
-                              <packing>
-                                <property name="y_options">GTK_EXPAND</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkComboBox" id="webcams">
-                                <property name="visible">True</property>
-                                <property name="items" translatable="yes">default camera</property>
-                                <signal name="changed" handler="linphone_gtk_cam_changed"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="y_options">GTK_EXPAND</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="video_size_label">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Prefered video resolution:</property>
-                              </widget>
-                              <packing>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkComboBox" id="video_size">
-                                <property name="visible">True</property>
-                                <property name="active">0</property>
-                                <property name="items" translatable="yes">CIF</property>
-                                <signal name="changed" handler="linphone_gtk_video_size_changed"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="video_frame">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Video&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="fill">False</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="hbox11">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkImage" id="image5">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="stock">gtk-media-play</property>
-                  </widget>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label2">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Multimedia settings</property>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-                <property name="tab_fill">False</property>
-                <property name="type">tab</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkVBox" id="sip_tab">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkFrame" id="frame11">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="tooltip" translatable="yes">This section defines your SIP address when not using a SIP account</property>
-                    <property name="label_xalign">0</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment11">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkTable" id="table4">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="n_rows">3</property>
-                            <property name="n_columns">2</property>
-                            <child>
-                              <widget class="GtkLabel" id="label25">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Your display name (eg: John Doe):</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkEntry" id="displayname">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <signal name="changed" handler="linphone_gtk_update_my_contact"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label26">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Your username:</property>
-                              </widget>
-                              <packing>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label27">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Your resulting SIP address:</property>
-                              </widget>
-                              <packing>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkEntry" id="username">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <signal name="changed" handler="linphone_gtk_update_my_contact"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkEntry" id="sip_address">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="editable">False</property>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label24">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Default identity&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkFrame" id="frame12">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label_xalign">0</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment12">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkHBox" id="hbox13">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <child>
-                              <widget class="GtkScrolledWindow" id="scrolledwindow2">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="hscrollbar_policy">automatic</property>
-                                <property name="vscrollbar_policy">automatic</property>
-                                <child>
-                                  <widget class="GtkTreeView" id="proxy_list">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                  </widget>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkVButtonBox" id="vbuttonbox2">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <child>
-                                  <widget class="GtkButton" id="add_proxy">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <signal name="clicked" handler="linphone_gtk_add_proxy"/>
-                                    <child>
-                                      <widget class="GtkHBox" id="hbox14">
-                                        <property name="visible">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <child>
-                                          <widget class="GtkImage" id="image7">
-                                            <property name="visible">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="stock">gtk-add</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">0</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkLabel" id="add_proxy_label">
-                                            <property name="visible">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="label" translatable="yes">Add</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">1</property>
-                                          </packing>
-                                        </child>
-                                      </widget>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkButton" id="edit_proxy">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <signal name="clicked" handler="linphone_gtk_edit_proxy"/>
-                                    <child>
-                                      <widget class="GtkHBox" id="hbox16">
-                                        <property name="visible">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <child>
-                                          <widget class="GtkImage" id="image9">
-                                            <property name="visible">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="stock">gtk-edit</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">0</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkLabel" id="label_proxy2">
-                                            <property name="visible">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="label" translatable="yes">Edit</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">1</property>
-                                          </packing>
-                                        </child>
-                                      </widget>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkButton" id="remove_proxy">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <signal name="clicked" handler="linphone_gtk_remove_proxy"/>
-                                    <child>
-                                      <widget class="GtkHBox" id="hbox7">
-                                        <property name="visible">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <child>
-                                          <widget class="GtkImage" id="image2">
-                                            <property name="visible">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="stock">gtk-delete</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">0</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkLabel" id="label_proxy1">
-                                            <property name="visible">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="label" translatable="yes">Remove</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">1</property>
-                                          </packing>
-                                        </child>
-                                      </widget>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">2</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkButton" id="create_phonics">
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">True</property>
-                                    <signal name="clicked" handler="linphone_gtk_create_fonics_account"/>
-                                    <child>
-                                      <widget class="GtkHBox" id="hbox1">
-                                        <property name="visible">True</property>
-                                        <child>
-                                          <widget class="GtkImage" id="image1">
-                                            <property name="visible">True</property>
-                                            <property name="stock">gtk-network</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">0</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkLabel" id="label11">
-                                            <property name="visible">True</property>
-                                            <property name="label" translatable="yes">Register to FONICS
-virtual network !</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">1</property>
-                                          </packing>
-                                        </child>
-                                      </widget>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">3</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label28">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Proxy accounts&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkFrame" id="frame13">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label_xalign">0</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment13">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkHButtonBox" id="hbuttonbox3">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <child>
-                              <widget class="GtkButton" id="erase_passwords">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <signal name="clicked" handler="linphone_gtk_clear_passwords"/>
-                                <child>
-                                  <widget class="GtkHBox" id="hbox18">
-                                    <property name="visible">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <child>
-                                      <widget class="GtkImage" id="image11">
-                                        <property name="visible">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="stock">gtk-delete</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="position">0</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkLabel" id="label30">
-                                        <property name="visible">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="label" translatable="yes">Erase all passwords</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label29">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Privacy&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">2</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="hbox10">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkImage" id="image4">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="pixbuf">stock_people.png</property>
-                  </widget>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label3">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Manage SIP Accounts</property>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">2</property>
-                <property name="tab_fill">False</property>
-                <property name="type">tab</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkVBox" id="codec_tab">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkFrame" id="frame9">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label_xalign">0</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment9">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkVBox" id="vbox8">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <child>
-                              <widget class="GtkComboBox" id="codec_view">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="active">0</property>
-                                <property name="items" translatable="yes">Audio codecs
-Video codecs</property>
-                                <signal name="changed" handler="linphone_gtk_codec_view_changed"/>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkHBox" id="hbox_codec">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <child>
-                                  <widget class="GtkScrolledWindow" id="scrolledwindow1">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="hscrollbar_policy">automatic</property>
-                                    <property name="vscrollbar_policy">automatic</property>
-                                    <property name="shadow_type">out</property>
-                                    <child>
-                                      <widget class="GtkTreeView" id="codec_list">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="has_tooltip">True</property>
-                                      </widget>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkVButtonBox" id="vbuttonbox1">
-                                    <property name="visible">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <child>
-                                      <widget class="GtkButton" id="button4">
-                                        <property name="label" translatable="yes">gtk-go-up</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="use_stock">True</property>
-                                        <signal name="clicked" handler="linphone_gtk_codec_up"/>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">False</property>
-                                        <property name="position">0</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkButton" id="up_codec">
-                                        <property name="label" translatable="yes">gtk-go-down</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="use_stock">True</property>
-                                        <signal name="clicked" handler="linphone_gtk_codec_down"/>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">False</property>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkButton" id="enable_codec">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <signal name="clicked" handler="linphone_gtk_codec_enable"/>
-                                        <child>
-                                          <widget class="GtkHBox" id="hbox8">
-                                            <property name="visible">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <child>
-                                              <widget class="GtkImage" id="image3">
-                                                <property name="visible">True</property>
-                                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                <property name="stock">gtk-yes</property>
-                                              </widget>
-                                              <packing>
-                                                <property name="position">0</property>
-                                              </packing>
-                                            </child>
-                                            <child>
-                                              <widget class="GtkLabel" id="label19">
-                                                <property name="visible">True</property>
-                                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                <property name="label" translatable="yes">Enable</property>
-                                              </widget>
-                                              <packing>
-                                                <property name="position">1</property>
-                                              </packing>
-                                            </child>
-                                          </widget>
-                                        </child>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">False</property>
-                                        <property name="position">2</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkButton" id="disable_codec">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <signal name="clicked" handler="linphone_gtk_codec_disable"/>
-                                        <child>
-                                          <widget class="GtkHBox" id="hbox9">
-                                            <property name="visible">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <child>
-                                              <widget class="GtkImage" id="image8">
-                                                <property name="visible">True</property>
-                                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                <property name="stock">gtk-no</property>
-                                              </widget>
-                                              <packing>
-                                                <property name="position">0</property>
-                                              </packing>
-                                            </child>
-                                            <child>
-                                              <widget class="GtkLabel" id="label20">
-                                                <property name="visible">True</property>
-                                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                <property name="label" translatable="yes">Disable</property>
-                                              </widget>
-                                              <packing>
-                                                <property name="position">1</property>
-                                              </packing>
-                                            </child>
-                                          </widget>
-                                        </child>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">False</property>
-                                        <property name="position">3</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label18">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Codecs&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkFrame" id="frame10">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label_xalign">0</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment10">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkTable" id="table3">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="n_rows">2</property>
-                            <property name="n_columns">2</property>
-                            <child>
-                              <widget class="GtkSpinButton" id="upload_bw">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="tooltip" translatable="yes">0 stands for "unlimited"</property>
-                                <property name="adjustment">0 -1 100000 1 10 10</property>
-                                <signal name="value_changed" handler="linphone_gtk_upload_bw_changed"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkSpinButton" id="download_bw">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="tooltip" translatable="yes">0 stands for "unlimited"</property>
-                                <property name="adjustment">0 -1 100000 1 10 10</property>
-                                <signal name="value_changed" handler="linphone_gtk_download_bw_changed"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label23">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Upload speed limit in Kbit/sec:</property>
-                                <property name="justify">right</property>
-                              </widget>
-                              <packing>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label22">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Download speed limit in Kbit/sec:</property>
-                                <property name="justify">right</property>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label21">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Bandwidth control&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">3</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="hbox15">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkImage" id="image10">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="stock">gtk-execute</property>
-                  </widget>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label33">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Codecs</property>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">3</property>
-                <property name="tab_fill">False</property>
-                <property name="type">tab</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkVBox" id="vbox2">
-                <property name="visible">True</property>
-                <property name="orientation">vertical</property>
-                <child>
-                  <widget class="GtkFrame" id="lang_frame">
-                    <property name="visible">True</property>
-                    <property name="label_xalign">0</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment3">
-                        <property name="visible">True</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkComboBox" id="lang_combo">
-                            <property name="visible">True</property>
-                            <property name="items" translatable="yes">C</property>
-                            <signal name="changed" handler="linphone_gtk_lang_changed"/>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="lang_label">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Language&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">4</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="hbox4">
-                <property name="visible">True</property>
-                <child>
-                  <widget class="GtkImage" id="image13">
-                    <property name="visible">True</property>
-                    <property name="stock">gtk-properties</property>
-                    <property name="icon-size">3</property>
-                  </widget>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label10">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">User interface</property>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">4</property>
-                <property name="tab_fill">False</property>
-                <property name="type">tab</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">0</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkHButtonBox" id="hbuttonbox2">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="layout_style">end</property>
-            <child>
-              <widget class="GtkButton" id="button5">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <signal name="clicked" handler="linphone_gtk_parameters_closed"/>
-                <child>
-                  <widget class="GtkHBox" id="hbox3">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkImage" id="image12">
-                        <property name="visible">True</property>
-                        <property name="stock">gtk-apply</property>
-                        <property name="icon-size">4</property>
-                      </widget>
-                      <packing>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label8">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">Done</property>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="padding">10</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="padding">5</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/linphone/gtk-glade/password.glade b/linphone/gtk-glade/password.glade
deleted file mode 100644 (file)
index 6617f48..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-<?xml version="1.0"?>
-<glade-interface>
-  <!-- interface-requires gtk+ 2.16 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <widget class="GtkDialog" id="password">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="border_width">5</property>
-    <property name="title" translatable="yes">Linphone - Authentication required</property>
-    <property name="modal">True</property>
-    <property name="window_position">center-on-parent</property>
-    <property name="icon">linphone2.png</property>
-    <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox9">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkVBox" id="vbox12">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child>
-              <widget class="GtkLabel" id="message">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Please enter the domain password</property>
-                <property name="justify">center</property>
-                <property name="wrap">True</property>
-              </widget>
-              <packing>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkTable" id="table1">
-                <property name="visible">True</property>
-                <property name="n_rows">2</property>
-                <property name="n_columns">2</property>
-                <child>
-                  <widget class="GtkLabel" id="userid_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">UserID</property>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkEntry" id="userid_entry">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">&#x25CF;</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label1">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">Password:</property>
-                    <property name="justify">right</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkEntry" id="password_entry">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="visibility">False</property>
-                    <property name="invisible_char">&#x25CF;</property>
-                    <signal name="activate" handler="linphone_gtk_password_ok"/>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area8">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="layout_style">end</property>
-            <child>
-              <widget class="GtkButton" id="button8">
-                <property name="label" translatable="yes">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="use_stock">True</property>
-                <signal name="clicked" handler="linphone_gtk_password_ok"/>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="button9">
-                <property name="label" translatable="yes">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="use_stock">True</property>
-                <signal name="clicked" handler="linphone_gtk_password_cancel"/>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/linphone/gtk-glade/propertybox.c b/linphone/gtk-glade/propertybox.c
deleted file mode 100644 (file)
index cbc7b5c..0000000
+++ /dev/null
@@ -1,784 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2008-2009  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#include "linphone.h"
-
-typedef enum {
-       CAP_IGNORE,
-       CAP_PLAYBACK,
-       CAP_CAPTURE
-}DeviceCap;
-
-static void linphone_gtk_fill_combo_box(GtkWidget *combo, const char **devices, const char *selected, DeviceCap cap){
-       const char **p=devices;
-       int i=0,active=0;
-       /* glade creates a combo box without list model and text renderer,
-       unless we fill it with a dummy text.
-       This dummy text needs to be removed first*/
-       gtk_combo_box_remove_text(GTK_COMBO_BOX(combo),0);
-       for(;*p!=NULL;++p){
-               if ( cap==CAP_IGNORE 
-                       || (cap==CAP_CAPTURE && linphone_core_sound_device_can_capture(linphone_gtk_get_core(),*p))
-                       || (cap==CAP_PLAYBACK && linphone_core_sound_device_can_playback(linphone_gtk_get_core(),*p)) ){
-                       gtk_combo_box_append_text(GTK_COMBO_BOX(combo),*p);
-                       if (strcmp(selected,*p)==0) active=i;
-                       i++;
-               }
-       }
-       gtk_combo_box_set_active(GTK_COMBO_BOX(combo),active);
-}
-
-void linphone_gtk_fill_video_sizes(GtkWidget *combo){
-       const MSVideoSizeDef *def=linphone_core_get_supported_video_sizes(linphone_gtk_get_core());;
-       int i,active=0;
-       char vsize_def[256];
-       MSVideoSize cur=linphone_core_get_preferred_video_size(linphone_gtk_get_core());
-       /* glade creates a combo box without list model and text renderer,
-       unless we fill it with a dummy text.
-       This dummy text needs to be removed first*/
-       gtk_combo_box_remove_text(GTK_COMBO_BOX(combo),0);
-       for(i=0;def->name!=NULL;++def,++i){
-               snprintf(vsize_def,sizeof(vsize_def),"%s (%ix%i)",def->name,def->vsize.width,def->vsize.height);
-               gtk_combo_box_append_text(GTK_COMBO_BOX(combo),vsize_def);
-               if (cur.width==def->vsize.width && cur.height==def->vsize.height) active=i;
-       }
-       gtk_combo_box_set_active(GTK_COMBO_BOX(combo),active);
-}
-
-void linphone_gtk_parameters_closed(GtkWidget *button){
-       GtkWidget *pb=gtk_widget_get_toplevel(button);
-       gtk_widget_destroy(pb);
-}
-
-void linphone_gtk_update_my_contact(GtkWidget *w){
-       GtkWidget *pb=gtk_widget_get_toplevel(w);
-       const char *username=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"username")));
-       const char *displayname=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"displayname")));
-       int port=linphone_core_get_sip_port(linphone_gtk_get_core());
-       LinphoneAddress *parsed=linphone_core_get_primary_contact_parsed(linphone_gtk_get_core());
-       char *contact;
-       g_return_if_fail(parsed!=NULL);
-       if (username[0]=='\0') return;
-
-       linphone_address_set_display_name(parsed,displayname);
-       linphone_address_set_username(parsed,username);
-       linphone_address_set_port_int(parsed,port);
-       contact=linphone_address_as_string(parsed);
-       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"sip_address")),contact);
-       linphone_core_set_primary_contact(linphone_gtk_get_core(),contact);
-       ms_free(contact);
-       linphone_address_destroy(parsed);
-       linphone_gtk_load_identities();
-}
-
-void linphone_gtk_stun_server_changed(GtkWidget *w){
-       const gchar *addr=gtk_entry_get_text(GTK_ENTRY(w));
-       linphone_core_set_stun_server(linphone_gtk_get_core(),addr);
-}
-
-void linphone_gtk_nat_address_changed(GtkWidget *w){
-       const gchar *addr=gtk_entry_get_text(GTK_ENTRY(w));
-       linphone_core_set_nat_address(linphone_gtk_get_core(),addr);
-}
-
-void linphone_gtk_ipv6_toggled(GtkWidget *w){
-       linphone_core_enable_ipv6(linphone_gtk_get_core(),
-                               gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)));
-}
-
-void linphone_gtk_sip_port_changed(GtkWidget *w){
-       linphone_core_set_sip_port(linphone_gtk_get_core(),
-                       (gint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
-}
-
-void linphone_gtk_audio_port_changed(GtkWidget *w){
-       linphone_core_set_audio_port(linphone_gtk_get_core(),
-                       (gint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
-}
-
-void linphone_gtk_video_port_changed(GtkWidget *w){
-       linphone_core_set_video_port(linphone_gtk_get_core(),
-                       (gint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
-}
-
-void linphone_gtk_no_firewall_toggled(GtkWidget *w){
-       if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)))
-               linphone_core_set_firewall_policy(linphone_gtk_get_core(),LINPHONE_POLICY_NO_FIREWALL);
-}
-
-void linphone_gtk_use_nat_address_toggled(GtkWidget *w){
-       if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)))
-               linphone_core_set_firewall_policy(linphone_gtk_get_core(),LINPHONE_POLICY_USE_NAT_ADDRESS);
-}
-
-void linphone_gtk_use_stun_toggled(GtkWidget *w){
-       if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)))
-               linphone_core_set_firewall_policy(linphone_gtk_get_core(),LINPHONE_POLICY_USE_STUN);
-}
-
-void linphone_gtk_mtu_changed(GtkWidget *w){
-       if (GTK_WIDGET_SENSITIVE(w))
-               linphone_core_set_mtu(linphone_gtk_get_core(),gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
-}
-
-void linphone_gtk_use_sip_info_dtmf_toggled(GtkWidget *w){
-       linphone_core_set_use_info_for_dtmf(linphone_gtk_get_core(),
-               gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)));
-}
-
-void linphone_gtk_mtu_set(GtkWidget *w){
-       GtkWidget *mtu=linphone_gtk_get_widget(gtk_widget_get_toplevel(w),"mtu");
-       if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))){
-               gtk_widget_set_sensitive(mtu,TRUE);
-               linphone_gtk_mtu_changed(mtu);
-       }else{
-               gtk_widget_set_sensitive(mtu,FALSE);
-               linphone_core_set_mtu(linphone_gtk_get_core(),0);
-       }
-}
-
-void linphone_gtk_playback_device_changed(GtkWidget *w){
-       gchar *sel=gtk_combo_box_get_active_text(GTK_COMBO_BOX(w));
-       linphone_core_set_playback_device(linphone_gtk_get_core(),sel);
-       g_free(sel);
-}
-
-void linphone_gtk_capture_device_changed(GtkWidget *w){
-       gchar *sel=gtk_combo_box_get_active_text(GTK_COMBO_BOX(w));
-       linphone_core_set_capture_device(linphone_gtk_get_core(),sel);
-       g_free(sel);
-}
-
-void linphone_gtk_ring_device_changed(GtkWidget *w){
-       gchar *sel=gtk_combo_box_get_active_text(GTK_COMBO_BOX(w));
-       linphone_core_set_ringer_device(linphone_gtk_get_core(),sel);
-       g_free(sel);
-}
-
-void linphone_gtk_alsa_special_device_changed(GtkWidget *w){
-       /*
-       const gchar *dev=gtk_entry_get_text(GTK_ENTRY(w));
-       ...*/
-}
-
-void linphone_gtk_cam_changed(GtkWidget *w){
-       gchar *sel=gtk_combo_box_get_active_text(GTK_COMBO_BOX(w));
-       linphone_core_set_video_device(linphone_gtk_get_core(),sel);
-       g_free(sel);
-}
-
-void linphone_gtk_video_size_changed(GtkWidget *w){
-       int sel=gtk_combo_box_get_active(GTK_COMBO_BOX(w));
-       const MSVideoSizeDef *defs=linphone_core_get_supported_video_sizes(linphone_gtk_get_core());
-       if (sel<0) return;
-       linphone_core_set_preferred_video_size(linphone_gtk_get_core(),
-                                       defs[sel].vsize);
-}
-
-void linphone_gtk_ring_file_set(GtkWidget *w){
-       gchar *file=gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(w));
-       linphone_core_set_ring(linphone_gtk_get_core(),file);
-       g_free(file);
-}
-
-static void linphone_gtk_end_of_ring(LinphoneCore *lc, void *user_data){
-       gtk_widget_set_sensitive((GtkWidget*)user_data,TRUE);
-}
-
-void linphone_gtk_play_ring_file(GtkWidget *w){
-       if (linphone_core_preview_ring(linphone_gtk_get_core(),
-                               linphone_core_get_ring(linphone_gtk_get_core()),
-                               linphone_gtk_end_of_ring,
-                               w)==0){
-               gtk_widget_set_sensitive(w,FALSE);
-       }
-}
-
-void linphone_gtk_echo_cancelation_toggled(GtkWidget *w){
-       linphone_core_enable_echo_cancellation(linphone_gtk_get_core(),
-               gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)));
-}
-
-enum {
-       CODEC_NAME,
-       CODEC_RATE,
-       CODEC_BITRATE,
-       CODEC_STATUS,
-       CODEC_PARAMS,
-       CODEC_PRIVDATA,
-       CODEC_COLOR,
-       CODEC_INFO,
-       CODEC_NCOLUMNS
-};
-
-static void linphone_gtk_init_codec_list(GtkTreeView *listview){
-       GtkCellRenderer *renderer;
-       GtkTreeViewColumn *column;
-       GtkTreeSelection *select;
-
-       GtkListStore *store = gtk_list_store_new (CODEC_NCOLUMNS, G_TYPE_STRING,G_TYPE_INT,
-                                                       G_TYPE_FLOAT,
-                                                       G_TYPE_STRING,
-                                                       G_TYPE_STRING,
-                                                       G_TYPE_POINTER,
-                                                       G_TYPE_STRING,
-                                                       G_TYPE_STRING);
-
-       gtk_tree_view_set_model(listview,GTK_TREE_MODEL(store));
-       g_object_unref(G_OBJECT(store));
-
-       renderer = gtk_cell_renderer_text_new ();
-       column = gtk_tree_view_column_new_with_attributes (_("Name"),
-                                                   renderer,
-                                                   "text", CODEC_NAME,
-                                               "foreground",CODEC_COLOR,
-                                                   NULL);
-       gtk_tree_view_append_column (listview, column);
-       column = gtk_tree_view_column_new_with_attributes (_("Rate (Hz)"),
-                                                   renderer,
-                                                   "text", CODEC_RATE,
-                                               "foreground",CODEC_COLOR,
-                                                   NULL);
-       gtk_tree_view_append_column (listview, column);
-       column = gtk_tree_view_column_new_with_attributes (_("Status"),
-                                                   renderer,
-                                                   "text", CODEC_STATUS,
-                                               "foreground",CODEC_COLOR,
-                                                   NULL);
-       gtk_tree_view_append_column (listview, column);
-       column = gtk_tree_view_column_new_with_attributes (_("Min bitrate (kbit/s)"),
-                                                   renderer,
-                                                   "text", CODEC_BITRATE,
-                                               "foreground",CODEC_COLOR,
-                                                   NULL);
-       gtk_tree_view_append_column (listview, column);
-       column = gtk_tree_view_column_new_with_attributes (_("Parameters"),
-                                                   renderer,
-                                                   "text", CODEC_PARAMS,
-                                               "foreground",CODEC_COLOR,
-                                                   NULL);
-       gtk_tree_view_append_column (listview, column);
-       /* Setup the selection handler */
-       select = gtk_tree_view_get_selection (listview);
-       gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
-}
-
-static void linphone_gtk_show_codecs(GtkTreeView *listview, const MSList *codeclist)
-{
-       const MSList *elem;
-       GtkTreeIter iter;
-       GtkListStore *store=GTK_LIST_STORE(gtk_tree_view_get_model(listview));
-       GtkTreeSelection *selection;
-
-       gtk_list_store_clear(store);
-
-       for(elem=codeclist; elem!=NULL; elem=elem->next){
-               gchar *status;
-               gint rate;
-               gfloat bitrate; 
-               gchar *color;
-               const char *params="";
-               struct _PayloadType *pt=(struct _PayloadType *)elem->data;
-               if (payload_type_enabled(pt)) status=_("Enabled");
-               else status=_("Disabled");
-               if (linphone_core_check_payload_type_usability(linphone_gtk_get_core(),pt)) color="blue";
-               else color="red";
-               /* get an iterator */
-               gtk_list_store_append(store,&iter);
-               bitrate=payload_type_get_bitrate(pt)/1000.0;
-               rate=payload_type_get_rate(pt);
-               if (pt->recv_fmtp!=NULL) params=pt->recv_fmtp;
-               gtk_list_store_set(store,&iter, CODEC_NAME,payload_type_get_mime(pt),
-                                       CODEC_RATE,rate,
-                                       CODEC_BITRATE,bitrate,
-                                       CODEC_STATUS,status,
-                                       CODEC_PARAMS,params,
-                                       CODEC_PRIVDATA,(gpointer)pt,
-                                       CODEC_COLOR,(gpointer)color,
-                                       CODEC_INFO,(gpointer)payload_type_get_description(pt),
-                                       -1);
-       }
-       
-       
-       
-       /* Setup the selection handler */
-       selection = gtk_tree_view_get_selection (listview);
-       gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
-       //gtk_tree_view_columns_autosize(GTK_TREE_VIEW (sec->interfaces));
-#if GTK_CHECK_VERSION(2,12,0)
-       gtk_tree_view_set_tooltip_column(listview,CODEC_INFO);
-#endif
-}
-
-static void linphone_gtk_check_codec_bandwidth(GtkTreeView *v){
-       GtkTreeIter iter;
-       GtkTreeModel *model;
-       model=gtk_tree_view_get_model(v);
-       g_return_if_fail(gtk_tree_model_get_iter_first(model,&iter));
-       do{
-               PayloadType *pt=NULL;
-               const gchar *color;
-               gfloat bitrate;
-               gtk_tree_model_get(model,&iter,CODEC_PRIVDATA,&pt,-1);
-               if (linphone_core_check_payload_type_usability(linphone_gtk_get_core(),pt)) color="blue";
-               else color="red";
-               bitrate=payload_type_get_bitrate(pt)/1000.0;
-               gtk_list_store_set(GTK_LIST_STORE(model),&iter,CODEC_COLOR, (gpointer)color,
-                                       CODEC_BITRATE, bitrate,-1);
-       }while(gtk_tree_model_iter_next(model,&iter));
-}
-
-static void linphone_gtk_select_codec(GtkTreeView *v, PayloadType *ref){
-       GtkTreeIter iter;
-       GtkTreeModel *model;
-       GtkTreeSelection *selection;
-       selection=gtk_tree_view_get_selection(v);
-       model=gtk_tree_view_get_model(v);
-       g_return_if_fail(gtk_tree_model_get_iter_first(model,&iter));
-       do{
-               PayloadType *pt=NULL;
-               gtk_tree_model_get(model,&iter,CODEC_PRIVDATA,&pt,-1);
-               if (pt==ref){
-                       gtk_tree_selection_select_iter(selection,&iter);
-               }
-               
-       }while(gtk_tree_model_iter_next(model,&iter));
-}
-
-static void linphone_gtk_draw_codec_list(GtkTreeView *v, int type){ /* 0=audio, 1=video*/
-       const MSList *list;
-       if (type==0) list=linphone_core_get_audio_codecs(linphone_gtk_get_core());
-       else list=linphone_core_get_video_codecs(linphone_gtk_get_core());
-       linphone_gtk_show_codecs(v,list);
-}
-
-void linphone_gtk_codec_view_changed(GtkWidget *w){
-       GtkWidget *listview=linphone_gtk_get_widget(gtk_widget_get_toplevel(w),"codec_list");
-       int active=gtk_combo_box_get_active(GTK_COMBO_BOX(w));
-       linphone_gtk_draw_codec_list(GTK_TREE_VIEW(listview),active);
-}
-
-void linphone_gtk_download_bw_changed(GtkWidget *w){
-       GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(gtk_widget_get_toplevel(w),"codec_list"));
-       linphone_core_set_download_bandwidth(linphone_gtk_get_core(),
-                               (int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
-       linphone_gtk_check_codec_bandwidth(v);
-}
-
-void linphone_gtk_upload_bw_changed(GtkWidget *w){
-       GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(gtk_widget_get_toplevel(w),"codec_list"));
-       linphone_core_set_upload_bandwidth(linphone_gtk_get_core(),
-                               (int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
-       linphone_gtk_check_codec_bandwidth(v);
-}
-
-static void linphone_gtk_codec_move(GtkWidget *button, int dir){
-       GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(gtk_widget_get_toplevel(button),"codec_list"));
-       GtkTreeSelection *sel=gtk_tree_view_get_selection(v);
-       GtkTreeModel *mod;
-       GtkTreeIter iter;
-       PayloadType *pt=NULL;
-       LinphoneCore *lc=linphone_gtk_get_core();
-       if (gtk_tree_selection_get_selected(sel,&mod,&iter)){
-               MSList *sel_elem,*before;
-               MSList *codec_list;
-               gtk_tree_model_get(mod,&iter,CODEC_PRIVDATA,&pt,-1);
-               if (pt->type==PAYLOAD_VIDEO)
-                       codec_list=ms_list_copy(linphone_core_get_video_codecs(lc));
-               else codec_list=ms_list_copy(linphone_core_get_audio_codecs(lc));
-               sel_elem=ms_list_find(codec_list,pt);
-               if (dir>0) {
-                       if (sel_elem->prev) before=sel_elem->prev;
-                       else before=sel_elem;
-                       codec_list=ms_list_insert(codec_list,before,pt);
-               }
-               else{
-                       if (sel_elem->next) before=sel_elem->next->next;
-                       else before=sel_elem;
-                       codec_list=ms_list_insert(codec_list,before,pt);
-               }
-               codec_list=ms_list_remove_link(codec_list,sel_elem);
-               if (pt->type==PAYLOAD_VIDEO)
-                       linphone_core_set_video_codecs(lc,codec_list);
-               else linphone_core_set_audio_codecs(lc,codec_list);
-               linphone_gtk_show_codecs(v,codec_list);
-               linphone_gtk_select_codec(v,pt);
-       }
-}
-
-static void linphone_gtk_codec_set_enable(GtkWidget *button, gboolean enabled){
-       GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(gtk_widget_get_toplevel(button),"codec_list"));
-       GtkTreeSelection *sel=gtk_tree_view_get_selection(v);
-       GtkTreeModel *mod;
-       GtkListStore *store;
-       GtkTreeIter iter;
-       PayloadType *pt=NULL;
-
-       if (gtk_tree_selection_get_selected(sel,&mod,&iter)){
-               store=GTK_LIST_STORE(mod);
-               gtk_tree_model_get(mod,&iter,CODEC_PRIVDATA,&pt,-1);
-               payload_type_set_enable(pt,enabled);
-               gtk_list_store_set(store,&iter,CODEC_STATUS, enabled ? _("Enabled") : _("Disabled"), -1);
-       }
-}
-
-void linphone_gtk_codec_up(GtkWidget *button){
-       linphone_gtk_codec_move(button,+1);
-}
-
-void linphone_gtk_codec_down(GtkWidget *button){
-       linphone_gtk_codec_move(button,-1);
-}
-
-void linphone_gtk_codec_enable(GtkWidget *button){
-       linphone_gtk_codec_set_enable(button,TRUE);
-}
-
-void linphone_gtk_codec_disable(GtkWidget *button){
-       linphone_gtk_codec_set_enable(button,FALSE);
-}
-
-void linphone_gtk_clear_passwords(GtkWidget *button){
-       linphone_core_clear_all_auth_info(linphone_gtk_get_core());
-}
-
-enum{
-       PROXY_CONFIG_IDENTITY,
-       PROXY_CONFIG_REF,
-       PROXY_CONFIG_NCOL
-};
-
-void linphone_gtk_show_sip_accounts(GtkWidget *w){
-       GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(w,"proxy_list"));
-       GtkTreeModel *model=gtk_tree_view_get_model(v);
-       GtkListStore *store;
-       GtkTreeSelection *select;
-       const MSList *elem;
-       if (!model){
-               GtkCellRenderer *renderer;
-               GtkTreeViewColumn *column;
-               /* create the proxy list */
-               store = gtk_list_store_new (PROXY_CONFIG_NCOL, G_TYPE_STRING, G_TYPE_POINTER);
-               
-               gtk_tree_view_set_model(v,GTK_TREE_MODEL(store));
-               g_object_unref(G_OBJECT(store));
-               renderer = gtk_cell_renderer_text_new ();
-               column = gtk_tree_view_column_new_with_attributes (_("Account"),
-                                                       renderer,
-                                                       "text", PROXY_CONFIG_IDENTITY,
-                                                       NULL);
-               gtk_tree_view_append_column (v, column);
-               
-               select = gtk_tree_view_get_selection (v);
-               gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
-               model=GTK_TREE_MODEL(store);
-       }else {
-               store=GTK_LIST_STORE(model);
-       }
-       gtk_list_store_clear(store);
-       for(elem=linphone_core_get_proxy_config_list(linphone_gtk_get_core());elem!=NULL;elem=ms_list_next(elem)){
-               LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
-               GtkTreeIter iter;
-               gtk_list_store_append(store,&iter);
-               gtk_list_store_set(store,&iter,PROXY_CONFIG_IDENTITY,linphone_proxy_config_get_identity(cfg),
-                                       PROXY_CONFIG_REF,cfg,-1);
-       }
-}
-
-static void linphone_gtk_proxy_closed(GtkWidget *w){
-       LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)g_object_get_data(G_OBJECT(w),"config");
-       if (cfg){
-               linphone_proxy_config_done(cfg);
-       }
-}
-
-void linphone_gtk_show_proxy_config(GtkWidget *pb, LinphoneProxyConfig *cfg){
-       GtkWidget *w=linphone_gtk_create_window("sip_account");
-       const char *tmp;
-       if (cfg){
-               linphone_proxy_config_edit(cfg);
-               gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"identity")),
-                       linphone_proxy_config_get_identity(cfg));
-               gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"proxy")),
-                       linphone_proxy_config_get_addr(cfg));
-               tmp=linphone_proxy_config_get_route(cfg);
-               if (tmp) gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"route")),tmp);
-               gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(w,"regperiod")),
-                       linphone_proxy_config_get_expires(cfg));
-               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"register")),
-                       linphone_proxy_config_register_enabled(cfg));
-               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"publish")),
-                       linphone_proxy_config_publish_enabled(cfg));
-       }
-       g_object_set_data(G_OBJECT(w),"config",(gpointer)cfg);
-       g_object_set_data(G_OBJECT(w),"parameters",(gpointer)pb);
-       g_object_weak_ref(G_OBJECT(w),(GWeakNotify)linphone_gtk_proxy_closed,w);
-       gtk_widget_show(w);
-}
-
-void linphone_gtk_proxy_cancel(GtkButton *button){
-       GtkWidget *w=gtk_widget_get_toplevel(GTK_WIDGET(button));
-       gtk_widget_destroy(w);
-}
-
-void linphone_gtk_proxy_ok(GtkButton *button){
-       GtkWidget *w=gtk_widget_get_toplevel(GTK_WIDGET(button));
-       LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)g_object_get_data(G_OBJECT(w),"config");
-       gboolean was_editing=TRUE;
-       if (!cfg){
-               was_editing=FALSE;
-               cfg=linphone_proxy_config_new();
-       }
-       linphone_proxy_config_set_identity(cfg,
-               gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(w,"identity"))));
-       linphone_proxy_config_set_server_addr(cfg,
-               gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(w,"proxy"))));
-       linphone_proxy_config_set_route(cfg,
-               gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(w,"route"))));
-       linphone_proxy_config_expires(cfg,
-               (int)gtk_spin_button_get_value(
-                       GTK_SPIN_BUTTON(linphone_gtk_get_widget(w,"regperiod"))));
-       linphone_proxy_config_enable_publish(cfg,
-               gtk_toggle_button_get_active(
-                       GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"publish"))));
-       linphone_proxy_config_enable_register(cfg,
-               gtk_toggle_button_get_active(
-                       GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"register"))));
-       if (was_editing){
-               if (linphone_proxy_config_done(cfg)==-1)
-                       return;
-       }
-       else {
-               if (linphone_core_add_proxy_config(linphone_gtk_get_core(),cfg)==-1) return;
-               linphone_core_set_default_proxy(linphone_gtk_get_core(),cfg);
-       }
-       g_object_set_data(G_OBJECT(w),"config",NULL);
-       linphone_gtk_show_sip_accounts(GTK_WIDGET(g_object_get_data(G_OBJECT(w),"parameters")));
-       gtk_widget_destroy(w);
-       /* also update the main window's list of identities*/
-       linphone_gtk_load_identities();
-}
-
-static LinphoneProxyConfig *linphone_gtk_get_selected_proxy_config(GtkWidget* pb){
-       GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(pb,"proxy_list"));
-       GtkTreeSelection *selection=gtk_tree_view_get_selection(v);
-       GtkTreeIter iter;
-       GtkTreeModel *model;
-       if (gtk_tree_selection_get_selected(selection,&model,&iter)){
-               LinphoneProxyConfig *cfg=NULL;
-               gtk_tree_model_get(model,&iter,PROXY_CONFIG_REF,&cfg,-1);
-               return cfg;
-       }
-       return NULL;
-}
-
-void linphone_gtk_add_proxy(GtkButton *button){
-       linphone_gtk_show_proxy_config(gtk_widget_get_toplevel(GTK_WIDGET(button)),NULL);
-}
-
-void linphone_gtk_remove_proxy(GtkButton *button){
-       LinphoneProxyConfig *cfg=linphone_gtk_get_selected_proxy_config(
-                       gtk_widget_get_toplevel(GTK_WIDGET(button)));
-       if (cfg){
-               linphone_core_remove_proxy_config(linphone_gtk_get_core(),cfg);
-               linphone_gtk_show_sip_accounts(gtk_widget_get_toplevel(GTK_WIDGET(button)));
-               /* also update the main window's list of identities*/
-               linphone_gtk_load_identities();
-       }
-}
-
-void linphone_gtk_edit_proxy(GtkButton *button){
-       GtkWidget *pb=gtk_widget_get_toplevel(GTK_WIDGET(button));
-       LinphoneProxyConfig *cfg=linphone_gtk_get_selected_proxy_config(pb);
-       if (cfg){
-               linphone_gtk_show_proxy_config(pb,cfg);
-               /* also update the main window's list of identities*/
-               linphone_gtk_load_identities();
-       }
-}
-
-typedef struct _LangCodes{
-       const char *code;
-       const char *name;
-}LangCodes;
-
-static LangCodes supported_langs[]={
-       {       "C"     ,       N_("English")   },
-       {       "fr"    ,       N_("French")    },
-       {       "sv"    ,       N_("Swedish")   },
-       {       "it"    ,       N_("Italian")   },
-       {       "es"    ,       N_("Spanish")   },
-       {       "pt_BR" ,       N_("Brazilian Portugese")       },
-       {       "pl"    ,       N_("Polish")    },
-       {       "de"    ,       N_("German")    },
-       {       "ru"    ,       N_("Russian")   },
-       {       "ja"    ,       N_("Japanese")  },
-       {       "nl"    ,       N_("Dutch")     },
-       {       "hu"    ,       N_("Hungarian") },
-       {       "cs"    ,       N_("Czech")     },
-       {       "zh_CN" ,       N_("Chinese")   },
-       {       NULL    ,       NULL            }
-};
-
-static const char *lang_get_name(const char *code){
-       LangCodes *p=supported_langs;
-       while(p->code!=NULL){
-               if (strcmp(p->code,code)==0) return p->name;
-               p++;
-       }
-       return NULL;
-}
-
-static gboolean lang_equals(const char *l1, const char *l2){
-       return ((strncmp(l1,l2,5)==0 || strncmp(l1,l2,2)==0));
-}
-
-static void linphone_gtk_fill_langs(GtkWidget *pb){
-       GtkWidget *combo=linphone_gtk_get_widget(pb,"lang_combo");
-       char code[10];
-       const char *all_langs="C " LINPHONE_ALL_LANGS;
-       const char *name;
-       int i=0,index=0;
-       const char *cur_lang=getenv("LANG");
-       int cur_lang_index=-1;
-       char text[256]={0};
-       if (cur_lang==NULL) cur_lang="C";
-       /* glade creates a combo box without list model and text renderer,
-       unless we fill it with a dummy text.
-       This dummy text needs to be removed first*/
-       gtk_combo_box_remove_text(GTK_COMBO_BOX(combo),0);
-       while(sscanf(all_langs+i,"%s",code)==1){
-               i+=strlen(code);
-               while(all_langs[i]==' ') ++i;
-               name=lang_get_name(code);
-               snprintf(text,sizeof(text)-1,"%s : %s",code,name!=NULL ? _(name) : code);
-               gtk_combo_box_append_text(GTK_COMBO_BOX(combo),text);
-               if (cur_lang_index==-1 && lang_equals(cur_lang,code)) 
-                       cur_lang_index=index;
-               index++;
-       }
-       gtk_combo_box_set_active(GTK_COMBO_BOX(combo),cur_lang_index);
-}
-
-void linphone_gtk_lang_changed(GtkComboBox *combo){
-       const char *selected=gtk_combo_box_get_active_text(combo);
-       char code[10];
-       const char *cur_lang=getenv("LANG");
-       if (selected!=NULL){
-               sscanf(selected,"%s",code);
-               if (cur_lang==NULL) cur_lang="C";
-               if (!lang_equals(cur_lang,code)){
-                       GtkWidget *dialog = gtk_message_dialog_new (GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(combo))),
-                               GTK_DIALOG_DESTROY_WITH_PARENT,
-                               GTK_MESSAGE_INFO,
-                               GTK_BUTTONS_CLOSE,
-                               "%s",
-                               (const gchar*)_("You need to restart linphone for the new language selection to take effect."));
-                               /* Destroy the dialog when the user responds to it (e.g. clicks a button) */
-                       g_signal_connect_swapped (G_OBJECT (dialog), "response",
-                                       G_CALLBACK (gtk_widget_destroy),
-                                       G_OBJECT (dialog));
-                       gtk_widget_show(dialog);
-                       linphone_gtk_set_lang(code);
-               }
-       }
-}
-
-void linphone_gtk_show_parameters(void){
-       GtkWidget *pb=linphone_gtk_create_window("parameters");
-       LinphoneCore *lc=linphone_gtk_get_core();
-       const char **sound_devices=linphone_core_get_sound_devices(lc);
-       const char *tmp;
-       LinphoneAddress *contact;
-       LinphoneFirewallPolicy pol;
-       GtkWidget *codec_list=linphone_gtk_get_widget(pb,"codec_list");
-       int mtu;
-       /* NETWORK CONFIG */
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"ipv6_enabled")),
-                               linphone_core_ipv6_enabled(lc));
-       gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"sip_port")),
-                               linphone_core_get_sip_port(lc));
-       gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"audio_rtp_port")),
-                               linphone_core_get_audio_port(lc));
-       gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"video_rtp_port")),
-                               linphone_core_get_video_port(lc));
-       tmp=linphone_core_get_nat_address(lc);
-       if (tmp) gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"nat_address")),tmp);
-       tmp=linphone_core_get_stun_server(lc);
-       if (tmp) gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"stun_server")),tmp);
-       pol=linphone_core_get_firewall_policy(lc);
-       switch(pol){
-               case LINPHONE_POLICY_NO_FIREWALL:
-                       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"no_nat")),TRUE);
-               break;
-               case LINPHONE_POLICY_USE_NAT_ADDRESS:
-                       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"use_nat_address")),TRUE);
-               break;
-               case LINPHONE_POLICY_USE_STUN:
-                       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"use_stun")),TRUE);
-               break;
-       }
-       mtu=linphone_core_get_mtu(lc);
-       if (mtu<=0){
-               gtk_widget_set_sensitive(linphone_gtk_get_widget(pb,"mtu"),FALSE);
-               gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"mtu")),1500);
-               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"mtu_set")),FALSE);
-       }else{
-               gtk_widget_set_sensitive(linphone_gtk_get_widget(pb,"mtu"),TRUE);
-               gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"mtu")),mtu);
-               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"mtu_set")),TRUE);
-       }
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"dtmf_sipinfo")),
-                                       linphone_core_get_use_info_for_dtmf(lc));
-       /* MUTIMEDIA CONFIG */
-       linphone_gtk_fill_combo_box(linphone_gtk_get_widget(pb,"playback_device"), sound_devices,
-                                       linphone_core_get_playback_device(lc),CAP_PLAYBACK);
-       linphone_gtk_fill_combo_box(linphone_gtk_get_widget(pb,"ring_device"), sound_devices,
-                                       linphone_core_get_ringer_device(lc),CAP_PLAYBACK);
-       linphone_gtk_fill_combo_box(linphone_gtk_get_widget(pb,"capture_device"), sound_devices,
-                                       linphone_core_get_capture_device(lc), CAP_CAPTURE);
-       linphone_gtk_fill_combo_box(linphone_gtk_get_widget(pb,"webcams"),linphone_core_get_video_devices(lc),
-                                       linphone_core_get_video_device(lc),CAP_IGNORE);
-       linphone_gtk_fill_video_sizes(linphone_gtk_get_widget(pb,"video_size"));
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"echo_cancelation")),
-                                       linphone_core_echo_cancellation_enabled(lc));
-
-       gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(linphone_gtk_get_widget(pb,"ring_chooser")),
-                                       linphone_core_get_ring(lc));
-       /* SIP CONFIG */
-       contact=linphone_core_get_primary_contact_parsed(lc);
-       if (contact){
-               if (linphone_address_get_display_name(contact)) 
-                       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"displayname")),linphone_address_get_display_name(contact));
-               if (linphone_address_get_username(contact))
-                       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"username")),linphone_address_get_username(contact));
-       }
-       linphone_address_destroy(contact);
-       linphone_gtk_show_sip_accounts(pb);
-       /* CODECS CONFIG */
-       linphone_gtk_init_codec_list(GTK_TREE_VIEW(codec_list));
-       gtk_combo_box_set_active(GTK_COMBO_BOX(linphone_gtk_get_widget(pb,"codec_view")),0);
-       gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"download_bw")),
-                               linphone_core_get_download_bandwidth(lc));
-       gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"upload_bw")),
-                               linphone_core_get_upload_bandwidth(lc));
-
-       linphone_gtk_fill_langs(pb);
-       gtk_widget_show(pb);
-}
diff --git a/linphone/gtk-glade/setupwizard.c b/linphone/gtk-glade/setupwizard.c
deleted file mode 100644 (file)
index e5f8702..0000000
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#include "linphone.h"
-LinphoneAccountCreator *linphone_gtk_assistant_get_creator(GtkWidget*w);
-
-static GtkWidget *create_intro(){
-       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
-       GtkWidget *label=gtk_label_new(_("Welcome !\nThis assistant will help you to use a SIP account for your calls."));
-       gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
-       g_object_set_data(G_OBJECT(vbox),"label",label);
-       gtk_widget_show_all(vbox);
-       return vbox;
-}
-
-static GtkWidget *create_setup_signin_choice(){
-       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
-       GtkWidget *t1=gtk_radio_button_new_with_label(NULL,_("Create an account by choosing a username"));
-       GtkWidget *t2=gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(t1),_("I have already an account and just want to use it"));
-       gtk_box_pack_start (GTK_BOX (vbox), t1, TRUE, TRUE, 2);
-       gtk_box_pack_start (GTK_BOX (vbox), t2, TRUE, TRUE, 2);
-       gtk_widget_show_all(vbox);
-       g_object_set_data(G_OBJECT(vbox),"create_account",t1);
-       g_object_set_data(G_OBJECT(vbox),"setup_account",t2);
-       return vbox;
-}
-
-static void create_username_changed(GtkEntry *entry, GtkWidget *w){
-       GtkWidget *assistant=gtk_widget_get_toplevel(w);
-       gtk_assistant_set_page_complete(GTK_ASSISTANT(assistant),w,
-               gtk_entry_get_text_length(entry)>=3);
-}
-
-static GtkWidget *create_username_chooser(){
-       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
-       GtkWidget *hbox=gtk_hbox_new(FALSE,2);
-       GtkWidget *label=gtk_label_new(_("Please choose a username:"));
-       GtkWidget *label2=gtk_label_new(_("Username:"));
-       GtkWidget *label3=gtk_label_new(NULL);
-       GtkWidget *entry=gtk_entry_new();
-       gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
-       gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 2);
-       gtk_box_pack_start (GTK_BOX (hbox), label2, TRUE, TRUE, 2);
-       gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 2);
-       gtk_box_pack_start (GTK_BOX (vbox), label3, TRUE, TRUE, 2);
-       gtk_widget_show_all(vbox);
-       g_object_set_data(G_OBJECT(vbox),"username",entry);
-       g_object_set_data(G_OBJECT(vbox),"errorstring",label3);
-       g_signal_connect(G_OBJECT(entry),"changed",(GCallback)create_username_changed,vbox);
-       return vbox;
-}
-
-static GtkWidget *create_username_checking_page(){
-       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
-       GtkWidget *label=gtk_label_new(NULL);
-       GtkWidget *progress=gtk_progress_bar_new();
-       gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
-       gtk_box_pack_start (GTK_BOX (vbox), progress, TRUE, TRUE, 2);
-       g_object_set_data(G_OBJECT(vbox),"label",label);
-       g_object_set_data(G_OBJECT(vbox),"progress",progress);
-       gtk_widget_show_all(vbox);
-       return vbox;
-}
-
-static void *progress_bar_update(LinphoneCore *lc, void *ctx, LinphoneWaitingState ws, const char *purpose, float progress){
-       GtkWidget *pb=(GtkWidget*)ctx;
-       if (ws==LinphoneWaitingProgress) gtk_progress_bar_pulse(GTK_PROGRESS_BAR(pb));
-       else if (ws==LinphoneWaitingFinished) gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(pb),1);
-       return ctx;
-}
-
-static void check_username(GtkWidget *page){
-       GtkWidget *progress=(GtkWidget*)g_object_get_data(G_OBJECT(page),"progress");
-       GtkWidget *label=(GtkWidget*)g_object_get_data(G_OBJECT(page),"label");
-       LinphoneAccountCreator *creator=linphone_gtk_assistant_get_creator(gtk_widget_get_toplevel(page));
-       gchar *text=g_strdup_printf(_("Checking if '%s' is available..."),linphone_account_creator_get_username(creator));
-       LinphoneAccountCreator *c=linphone_gtk_assistant_get_creator(gtk_widget_get_toplevel(page));
-       int res;
-       gtk_label_set_text(GTK_LABEL(label),text);
-       g_free(text);
-       gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Please wait..."));
-       linphone_core_set_waiting_callback(linphone_gtk_get_core(),progress_bar_update,progress);
-       res=linphone_account_creator_test_existence(c);
-       if (res==1){
-               gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Sorry this username already exists. Please try a new one."));
-       }else if (res==0){
-               gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Ok !"));
-               gtk_assistant_set_page_complete(GTK_ASSISTANT(gtk_widget_get_toplevel(page)),page,TRUE);
-       }else if (res==-1){
-               gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Communication problem, please try again later."));
-       }
-       linphone_core_set_waiting_callback(linphone_gtk_get_core(),linphone_gtk_wait,NULL);
-}
-
-static GtkWidget *create_confirmation_page(){
-       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
-       GtkWidget *label=gtk_label_new(NULL);
-       gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
-       g_object_set_data(G_OBJECT(vbox),"label",label);
-       gtk_widget_show_all(vbox);
-       return vbox;
-}
-
-static GtkWidget *create_creation_page(){
-       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
-       GtkWidget *label=gtk_label_new(NULL);
-       GtkWidget *progress=gtk_progress_bar_new();
-       gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
-       gtk_box_pack_start (GTK_BOX (vbox), progress, TRUE, TRUE, 2);
-       g_object_set_data(G_OBJECT(vbox),"label",label);
-       g_object_set_data(G_OBJECT(vbox),"progress",progress);
-       gtk_widget_show_all(vbox);
-       return vbox;
-}
-
-static GtkWidget *create_finish_page(){
-       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
-       GtkWidget *label=gtk_label_new(_("Thank you. Your account is now configured and ready for use."));
-       gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
-       gtk_widget_show_all(vbox);
-       return vbox;
-}
-
-static void linphone_gtk_assistant_closed(GtkWidget *w){
-       gtk_widget_destroy(w);
-}
-
-static int linphone_gtk_assistant_forward(int curpage, gpointer data){
-       GtkWidget *w=(GtkWidget*)data;
-       GtkWidget *box=gtk_assistant_get_nth_page(GTK_ASSISTANT(w),curpage);
-       if (curpage==1){
-               GtkWidget *create_button=(GtkWidget*)g_object_get_data(G_OBJECT(box),"create_account");
-               if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(create_button))){
-                       g_error("Not implemented yet...");
-               }
-       }else if (curpage==2){
-               LinphoneAccountCreator *c=linphone_gtk_assistant_get_creator(w);
-               linphone_account_creator_set_username(c,gtk_entry_get_text(GTK_ENTRY(g_object_get_data(G_OBJECT(box),"username"))));
-       }
-       return curpage+1;
-}
-
-static void linphone_gtk_assistant_apply(GtkWidget *w){
-       LinphoneAccountCreator *creator=linphone_gtk_assistant_get_creator(w);
-       GtkWidget *page=gtk_assistant_get_nth_page(GTK_ASSISTANT(w),gtk_assistant_get_current_page(GTK_ASSISTANT(w)));
-       GtkWidget *progress=(GtkWidget*)g_object_get_data(G_OBJECT(page),"progress");
-       LinphoneProxyConfig *res;
-       gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Please wait..."));
-       linphone_core_set_waiting_callback(linphone_gtk_get_core(),progress_bar_update,progress);
-       res=linphone_account_creator_validate(creator);
-       if (res){
-               gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Ok !"));
-               gtk_assistant_set_page_complete(GTK_ASSISTANT(w),page,TRUE);
-       }else{
-               gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Communication problem, please try again later."));
-       }
-       linphone_core_set_waiting_callback(linphone_gtk_get_core(),linphone_gtk_wait,NULL);
-       if (res) linphone_core_add_proxy_config(linphone_gtk_get_core(),res);
-       gtk_assistant_set_page_complete(GTK_ASSISTANT(w),page,TRUE);
-}
-
-static void linphone_gtk_assistant_prepare(GtkWidget *assistant, GtkWidget *page){
-       int pagenum=gtk_assistant_get_current_page(GTK_ASSISTANT(assistant));
-       if (pagenum==3){
-               check_username(page);
-       }else if (pagenum==4){
-               GtkWidget *label=(GtkWidget*)g_object_get_data(G_OBJECT(page),"label");
-               LinphoneAccountCreator *creator=linphone_gtk_assistant_get_creator(assistant);
-               gchar *text=g_strdup_printf("You have choosen '%s' as username.\nDo you confirm the creation of the account ?",linphone_account_creator_get_username(creator));
-               gtk_label_set_text(GTK_LABEL(label),text);
-               g_free(text);
-       }else if (pagenum==5){
-               GtkWidget *label=(GtkWidget*)g_object_get_data(G_OBJECT(page),"label");
-               LinphoneAccountCreator *creator=linphone_gtk_assistant_get_creator(assistant);
-               gchar *text=g_strdup_printf("Account creation in progress for '%s'",linphone_account_creator_get_username(creator));
-               gtk_label_set_text(GTK_LABEL(label),text);
-               g_free(text);
-       }
-}
-
-static LinphoneAccountCreator * linphone_gtk_assistant_init(GtkWidget *w){
-       const MSList *elem;
-       LinphoneCore *lc=linphone_gtk_get_core();
-       for(elem=linphone_core_get_sip_setups(lc);elem!=NULL;elem=elem->next){
-               SipSetup *ss=(SipSetup*)elem->data;
-               if (sip_setup_get_capabilities(ss) & SIP_SETUP_CAP_ACCOUNT_MANAGER){
-                       LinphoneAccountCreator *creator=linphone_account_creator_new(lc,ss->name);
-                       g_object_set_data(G_OBJECT(w),"creator",creator);
-                       return creator;
-               }
-       }
-       return NULL;
-}
-
-LinphoneAccountCreator *linphone_gtk_assistant_get_creator(GtkWidget*w){
-       return (LinphoneAccountCreator*)g_object_get_data(G_OBJECT(w),"creator");
-}
-
-GtkWidget * linphone_gtk_create_assistant(void){
-       GtkWidget *w=gtk_assistant_new();
-       GtkWidget *p1=create_intro();
-       GtkWidget *p2=create_setup_signin_choice();
-       GtkWidget *p3=create_username_chooser();
-       GtkWidget *checking=create_username_checking_page();
-       GtkWidget *confirm=create_confirmation_page();
-       GtkWidget *creation=create_creation_page();
-       GtkWidget *end=create_finish_page();
-       
-       linphone_gtk_assistant_init(w);
-       gtk_assistant_append_page(GTK_ASSISTANT(w),p1);
-       gtk_assistant_set_page_type(GTK_ASSISTANT(w),p1,GTK_ASSISTANT_PAGE_INTRO);
-       gtk_assistant_set_page_title(GTK_ASSISTANT(w),p1,_("Welcome to the account setup assistant"));
-       gtk_assistant_set_page_complete(GTK_ASSISTANT(w),p1,TRUE);
-       gtk_assistant_append_page(GTK_ASSISTANT(w),p2);
-       gtk_assistant_set_page_type(GTK_ASSISTANT(w),p2,GTK_ASSISTANT_PAGE_CONTENT);
-       gtk_assistant_set_page_title(GTK_ASSISTANT(w),p2,_("Account setup assistant"));
-       gtk_assistant_set_page_complete(GTK_ASSISTANT(w),p2,TRUE);
-       gtk_assistant_append_page(GTK_ASSISTANT(w),p3);
-       gtk_assistant_set_page_type(GTK_ASSISTANT(w),p3,GTK_ASSISTANT_PAGE_CONTENT);
-       gtk_assistant_set_page_title(GTK_ASSISTANT(w),p3,_("Choosing a username"));
-       
-       gtk_assistant_append_page(GTK_ASSISTANT(w),checking);
-       gtk_assistant_set_page_type(GTK_ASSISTANT(w),checking,GTK_ASSISTANT_PAGE_PROGRESS);
-       gtk_assistant_set_page_title(GTK_ASSISTANT(w),checking,_("Verifying"));
-       
-       gtk_assistant_append_page(GTK_ASSISTANT(w),confirm);
-       gtk_assistant_set_page_type(GTK_ASSISTANT(w),confirm,GTK_ASSISTANT_PAGE_CONFIRM);
-       gtk_assistant_set_page_title(GTK_ASSISTANT(w),confirm,_("Confirmation"));
-       gtk_assistant_set_page_complete(GTK_ASSISTANT(w),confirm,TRUE);
-
-       gtk_assistant_append_page(GTK_ASSISTANT(w),creation);
-       gtk_assistant_set_page_type(GTK_ASSISTANT(w),creation,GTK_ASSISTANT_PAGE_PROGRESS);
-       gtk_assistant_set_page_title(GTK_ASSISTANT(w),creation,_("Creating your account"));
-
-       gtk_assistant_append_page(GTK_ASSISTANT(w),end);
-       gtk_assistant_set_page_type(GTK_ASSISTANT(w),end,GTK_ASSISTANT_PAGE_SUMMARY);
-       gtk_assistant_set_page_title(GTK_ASSISTANT(w),end,_("Now ready !"));
-       
-       gtk_assistant_set_forward_page_func(GTK_ASSISTANT(w),linphone_gtk_assistant_forward,w,NULL);
-       g_signal_connect(G_OBJECT(w),"close",(GCallback)linphone_gtk_assistant_closed,NULL);
-       g_signal_connect(G_OBJECT(w),"cancel",(GCallback)linphone_gtk_assistant_closed,NULL);
-       g_signal_connect(G_OBJECT(w),"apply",(GCallback)linphone_gtk_assistant_apply,NULL);
-       g_signal_connect(G_OBJECT(w),"prepare",(GCallback)linphone_gtk_assistant_prepare,NULL);
-       gtk_widget_show(w);
-       
-       return w;
-}
-
diff --git a/linphone/gtk-glade/sip_account.glade b/linphone/gtk-glade/sip_account.glade
deleted file mode 100644 (file)
index 2828e30..0000000
+++ /dev/null
@@ -1,225 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Sat Nov  8 15:49:12 2008 -->
-<glade-interface>
-  <widget class="GtkDialog" id="sip_account">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="border_width">5</property>
-    <property name="title" translatable="yes">Linphone - Configure a SIP account</property>
-    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
-    <property name="icon">linphone2.png</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-    <property name="has_separator">False</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox2">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkFrame" id="frame15">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="label_xalign">0</property>
-            <child>
-              <widget class="GtkAlignment" id="alignment15">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <widget class="GtkVBox" id="vbox11">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkTable" id="table6">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="n_rows">4</property>
-                        <property name="n_columns">2</property>
-                        <child>
-                          <widget class="GtkLabel" id="label38">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Your SIP identity:</property>
-                            <property name="justify">GTK_JUSTIFY_RIGHT</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="identity">
-                            <property name="width_request">275</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label39">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">SIP Proxy address:</property>
-                            <property name="justify">GTK_JUSTIFY_RIGHT</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="proxy">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="text" translatable="yes">sip:</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label40">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Route (optional):</property>
-                            <property name="justify">GTK_JUSTIFY_RIGHT</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="route">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label41">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Registration duration (sec):</property>
-                            <property name="justify">GTK_JUSTIFY_RIGHT</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">3</property>
-                            <property name="bottom_attach">4</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkSpinButton" id="regperiod">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="adjustment">3600 0 100000 1 10 10</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">3</property>
-                            <property name="bottom_attach">4</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkCheckButton" id="register">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="label" translatable="yes">Register at startup</property>
-                        <property name="response_id">0</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkCheckButton" id="publish">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Publish presence information</property>
-                        <property name="response_id">0</property>
-                        <property name="draw_indicator">True</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label42">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Configure a SIP account</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area2">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="layout_style">GTK_BUTTONBOX_END</property>
-            <child>
-              <widget class="GtkButton" id="button6">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">gtk-ok</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">0</property>
-                <signal name="clicked" handler="linphone_gtk_proxy_ok"/>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkButton" id="button7">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">gtk-cancel</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">0</property>
-                <signal name="clicked" handler="linphone_gtk_proxy_cancel"/>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/linphone/gtk-glade/stock_people.png b/linphone/gtk-glade/stock_people.png
deleted file mode 100644 (file)
index ed2d33b..0000000
Binary files a/linphone/gtk-glade/stock_people.png and /dev/null differ
diff --git a/linphone/gtk-glade/support.c b/linphone/gtk-glade/support.c
deleted file mode 100644 (file)
index 3600205..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
-#include "linphone.h"
-
-#include "lpconfig.h"
-
-static GList *pixmaps_directories = NULL;
-
-/* Use this function to set the directory containing installed pixmaps. */
-void
-add_pixmap_directory                   (const gchar     *directory)
-{
-  pixmaps_directories = g_list_prepend (pixmaps_directories,
-                                        g_strdup (directory));
-}
-
-/* This is an internally used function to find pixmap files. */
-static gchar*
-find_pixmap_file                       (const gchar     *filename)
-{
-  GList *elem;
-
-  /* We step through each of the pixmaps directory to find it. */
-  elem = pixmaps_directories;
-  while (elem)
-    {
-      gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data,
-                                         G_DIR_SEPARATOR_S, filename);
-      if (g_file_test (pathname, G_FILE_TEST_EXISTS))
-        return pathname;
-      g_free (pathname);
-      elem = elem->next;
-    }
-  return NULL;
-}
-
-/* This is an internally used function to create pixmaps. */
-GtkWidget*
-create_pixmap                          (const gchar     *filename)
-{
-  gchar *pathname = NULL;
-  GtkWidget *pixmap;
-
-  if (!filename || !filename[0])
-      return gtk_image_new ();
-
-  pathname = find_pixmap_file (filename);
-
-  if (!pathname)
-    {
-      g_warning (_("Couldn't find pixmap file: %s"), filename);
-      return gtk_image_new ();
-    }
-
-  pixmap = gtk_image_new_from_file (pathname);
-  g_free (pathname);
-  return pixmap;
-}
-
-/* This is an internally used function to create pixmaps. */
-GdkPixbuf*
-create_pixbuf                          (const gchar     *filename)
-{
-  gchar *pathname = NULL;
-  GdkPixbuf *pixbuf;
-  GError *error = NULL;
-
-  if (!filename || !filename[0])
-      return NULL;
-
-  pathname = find_pixmap_file (filename);
-
-  if (!pathname)
-    {
-      g_warning (_("Couldn't find pixmap file: %s"), filename);
-      return NULL;
-    }
-
-  pixbuf = gdk_pixbuf_new_from_file (pathname, &error);
-  if (!pixbuf)
-    {
-      fprintf (stderr, "Failed to load pixbuf file: %s: %s\n",
-               pathname, error->message);
-      g_error_free (error);
-    }
-  g_free (pathname);
-  return pixbuf;
-}
-
-/* This is an internally used function to create animations */
-GdkPixbufAnimation *
-create_pixbuf_animation(const gchar     *filename)
-{
-       gchar *pathname = NULL;
-       GdkPixbufAnimation *pixbuf;
-       GError *error = NULL;
-       
-       if (!filename || !filename[0])
-               return NULL;
-       
-       pathname = find_pixmap_file (filename);
-       
-       if (!pathname){
-               g_warning (_("Couldn't find pixmap file: %s"), filename);
-               return NULL;
-       }
-       
-       pixbuf = gdk_pixbuf_animation_new_from_file (pathname, &error);
-       if (!pixbuf){
-               fprintf (stderr, "Failed to load pixbuf file: %s: %s\n",
-                       pathname, error->message);
-               g_error_free (error);
-       }
-       g_free (pathname);
-       return pixbuf;
-}
-
-
-
-/* This is used to set ATK action descriptions. */
-void
-glade_set_atk_action_description       (AtkAction       *action,
-                                        const gchar     *action_name,
-                                        const gchar     *description)
-{
-  gint n_actions, i;
-
-  n_actions = atk_action_get_n_actions (action);
-  for (i = 0; i < n_actions; i++)
-    {
-      if (!strcmp (atk_action_get_name (action, i), action_name))
-        atk_action_set_description (action, i, description);
-    }
-}
-
-
-static char linphone_lang[256]={0};
-
-/*lang has to be read before the config file is parsed...*/
-const char *linphone_gtk_get_lang(const char *config_file){
-       FILE *f=fopen(config_file,"r");
-       if (f){
-               char tmp[256];
-               while(fgets(tmp,sizeof(tmp),f)!=NULL){
-                       char *p;
-                       if ((p=strstr(tmp,"lang="))!=NULL){
-                               p+=5;
-                               sscanf(p,"%s",linphone_lang);
-                               g_message("Found lang %s",linphone_lang);
-                               break;
-                       }
-               }
-               fclose(f);
-       }
-       return linphone_lang;
-}
-
-void linphone_gtk_set_lang(const char *code){
-       LpConfig *cfg=linphone_core_get_config(linphone_gtk_get_core());
-       const char *curlang;
-       curlang=getenv("LANG");
-       if (curlang!=NULL && strncmp(curlang,code,2)==0) {
-               /* do not loose the _territory@encoding part*/
-               return;
-       }
-       lp_config_set_string(cfg,"GtkUi","lang",code);
-#ifdef WIN32
-       char tmp[128];
-       snprintf(tmp,sizeof(tmp),"LANG=%s",code);
-       _putenv(tmp);
-#else
-       setenv("LANG",code,1);
-#endif
-}
-
-const gchar *linphone_gtk_get_ui_config(const char *key, const char *def){
-       LinphoneCore *lc=linphone_gtk_get_core();
-       if (lc){
-               LpConfig *cfg=linphone_core_get_config(linphone_gtk_get_core());
-               return lp_config_get_string(cfg,"GtkUi",key,def);
-       }else{
-               ms_warning ("Cannot read config, no core created yet.");
-               return NULL;
-       }
-}
-
-int linphone_gtk_get_ui_config_int(const char *key, int def){
-       LpConfig *cfg=linphone_core_get_config(linphone_gtk_get_core());
-       return lp_config_get_int(cfg,"GtkUi",key,def);
-}
-
-void linphone_gtk_set_ui_config_int(const char *key , int val){
-       LpConfig *cfg=linphone_core_get_config(linphone_gtk_get_core());
-       lp_config_set_int(cfg,"GtkUi",key,val);
-}
-
-
diff --git a/linphone/gtk-glade/update.c b/linphone/gtk-glade/update.c
deleted file mode 100755 (executable)
index 6fac1b8..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-/*\r
-linphone, gtk-glade interface.\r
-Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)\r
-\r
-This program is free software; you can redistribute it and/or\r
-modify it under the terms of the GNU General Public License\r
-as published by the Free Software Foundation; either version 2\r
-of the License, or (at your option) any later version.\r
-\r
-This program is distributed in the hope that it will be useful,\r
-but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-GNU General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License\r
-along with this program; if not, write to the Free Software\r
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\r
-*/\r
-\r
-#include "linphone.h"\r
-\r
-#ifdef WIN32\r
-\r
-#include <wininet.h>\r
-\r
-static int linphone_gtk_get_new_version(const char *version_url, char *version, size_t size){\r
-       DWORD dwDownloaded = 0;\r
-       HINTERNET  hSession = NULL, hConnect = NULL;\r
-       int ret=-1;\r
-       \r
-       hSession=InternetOpen("Linphone",INTERNET_OPEN_TYPE_PRECONFIG,NULL,NULL,0);\r
-       \r
-       if (hSession==NULL) return -1;\r
-       \r
-       hConnect=InternetOpenUrl(hSession,version_url,NULL,0,0,0);\r
-       \r
-       if (hConnect==NULL) {\r
-               InternetCloseHandle(hSession);\r
-               return -1;\r
-       }\r
-       dwDownloaded=0;\r
-       if (InternetReadFile(hConnect,version,size,&dwDownloaded) && dwDownloaded>0){\r
-               version[dwDownloaded]='\0';\r
-               ms_message("Got response: %s", version);\r
-               /*check this not just html containing 404 not found*/\r
-               if (strstr(version,"html")==0)\r
-                       ret=0;\r
-       }\r
-       \r
-       // Close any open handles.\r
-       if (hConnect) InternetCloseHandle(hConnect);\r
-       if (hSession) InternetCloseHandle(hSession);\r
-       return ret;\r
-}\r
-\r
-#else\r
-\r
-static int linphone_gtk_get_new_version(const char *url, char *version, size_t size){\r
-       \r
-       return -1;\r
-}\r
-\r
-#endif\r
-\r
-static void new_version_response(GtkWidget *dialog, int response_id, gpointer download_site){\r
-       if (response_id==GTK_RESPONSE_YES){\r
-               linphone_gtk_open_browser((const char*)download_site);\r
-       }\r
-       gtk_widget_destroy(dialog);\r
-}\r
-\r
-static gboolean popup_new_version(const char *download_site){\r
-       GtkWidget *dialog;\r
-       /* draw a question box. link to dialog_click callback */\r
-       dialog = gtk_message_dialog_new (\r
-                               GTK_WINDOW(linphone_gtk_get_main_window()),\r
-                GTK_DIALOG_DESTROY_WITH_PARENT,\r
-                               GTK_MESSAGE_QUESTION,\r
-                GTK_BUTTONS_YES_NO,\r
-                _("A more recent version is availalble from %s.\nWould you like to open a browser to download it ?"),\r
-                               download_site);\r
-       g_signal_connect(G_OBJECT (dialog), "response",\r
-            G_CALLBACK (new_version_response),\r
-               (gpointer)download_site);\r
-       /* actually show the box */\r
-       gtk_widget_show(dialog);\r
-       return FALSE;\r
-}\r
-\r
-static gboolean popup_version_ok(){\r
-       linphone_gtk_display_something(GTK_MESSAGE_INFO,_("You are running the lastest version."));\r
-       return FALSE;\r
-}\r
-\r
-static int copytilldot(char *n, const char *v){\r
-       int ret=0;\r
-       while(*v!='\0' && *v!='.' && *v!='-' && *v!='\n' && *v!='\r' && *v!='\t'){\r
-               *n=*v;\r
-               ret++;\r
-               v++;\r
-               n++;\r
-       }\r
-       *n='\0';\r
-       if (*v!='\0') ret=ret+1;\r
-       return ret;\r
-}\r
-\r
-static int version_compare(const char *v1, const char *v2){\r
-       char n1[16];\r
-       char n2[16];\r
-       int ret;\r
-       if (*v1=='\0' && *v2=='\0') return 0;\r
-       v1+=copytilldot(n1,v1);\r
-       v2+=copytilldot(n2,v2);\r
-       ms_message("Comparing %s <> %s",n1,n2);\r
-       ret=strcmp(n1,n2);\r
-       if (ret==0) return version_compare(v1,v2);\r
-       else return ret;\r
-}\r
-\r
-static void *check_for_new_version(void *d){\r
-       const char *version_url=(const char *)d;\r
-       char version[256];\r
-       if (linphone_gtk_get_new_version(version_url,version,sizeof(version))==0){\r
-               if (version_compare(version,LINPHONE_VERSION)>0){\r
-                       const char *download_site=linphone_gtk_get_ui_config("download_site",NULL);\r
-                       if (download_site)   {\r
-                               gdk_threads_enter();\r
-                               g_idle_add((GSourceFunc)popup_new_version,(gpointer)download_site);\r
-                               gdk_threads_leave();\r
-                       }\r
-               }else{\r
-                       if (linphone_gtk_get_ui_config_int("update_check_menu",0)){\r
-                               gdk_threads_enter();\r
-                               g_idle_add((GSourceFunc)popup_version_ok,NULL);\r
-                               gdk_threads_leave();\r
-                       }\r
-               }\r
-       }\r
-       return NULL;\r
-}\r
-\r
-void linphone_gtk_check_for_new_version(void){\r
-       ortp_thread_t thread;\r
-       static gboolean done=FALSE;\r
-       const char *version_url;\r
-       if (done) return;\r
-       done=TRUE;\r
-       version_url=linphone_gtk_get_ui_config("last_version_url",NULL);\r
-       if (version_url==NULL) return ;\r
-       ortp_thread_create(&thread,NULL,check_for_new_version,(void*)version_url);\r
-}\r
-\r
-/*called when the user clicks on the "Check for updates" menu item */\r
-void linphone_gtk_check_for_updates(void){\r
-       linphone_gtk_check_for_new_version();\r
-}\r
diff --git a/linphone/gtk-glade/utils.c b/linphone/gtk-glade/utils.c
deleted file mode 100644 (file)
index 69ae435..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#include "linphone.h"
-
-static void run_gtk(){
-       while (gtk_events_pending ())
-               gtk_main_iteration ();
-
-}
-
-void *linphone_gtk_wait(LinphoneCore *lc, void *ctx, LinphoneWaitingState ws, const char *purpose, float progress){
-       GtkWidget *w;
-       switch(ws){
-               case LinphoneWaitingStart:
-                       gdk_threads_enter();
-                       w=linphone_gtk_create_window("waiting");
-                       gtk_window_set_transient_for(GTK_WINDOW(w),GTK_WINDOW(linphone_gtk_get_main_window()));
-                       gtk_window_set_position(GTK_WINDOW(w),GTK_WIN_POS_CENTER_ON_PARENT);
-                       if (purpose) {
-                               gtk_progress_bar_set_text(
-                                       GTK_PROGRESS_BAR(linphone_gtk_get_widget(w,"progressbar")),
-                                       purpose);
-                       }
-                       gtk_widget_show(w);
-                       /*g_message("Creating waiting window");*/
-                       run_gtk();
-                       gdk_threads_leave();
-                       return w;
-               break;
-               case LinphoneWaitingProgress:
-                       w=(GtkWidget*)ctx;
-                       gdk_threads_enter();
-                       if (progress>=0){
-                               gtk_progress_bar_set_fraction(
-                                       GTK_PROGRESS_BAR(linphone_gtk_get_widget(w,"progressbar")),
-                                       progress);
-                               
-                               
-                       }else {
-                               gtk_progress_bar_pulse(
-                                       GTK_PROGRESS_BAR(linphone_gtk_get_widget(w,"progressbar"))
-                               );
-                       }
-                       /*g_message("Updating progress");*/
-                       run_gtk();
-                       gdk_threads_leave();
-                       g_usleep(50000);
-                       return w;
-               break;
-               case LinphoneWaitingFinished:
-                       w=(GtkWidget*)ctx;
-                       gdk_threads_enter();
-                       gtk_widget_destroy(w);
-                       run_gtk();
-                       gdk_threads_leave();
-                       return NULL;
-               break;
-       }
-       return NULL;
-}
-
-GdkPixbuf *_gdk_pixbuf_new_from_memory_at_scale(const void *data, gint len, gint w, gint h, gboolean preserve_ratio){
-       GInputStream *stream=g_memory_input_stream_new_from_data (data,len,NULL);
-       GError *error=NULL;
-       
-       GdkPixbuf *pbuf=gdk_pixbuf_new_from_stream_at_scale (stream,w,h,preserve_ratio,NULL,&error);
-       g_input_stream_close(stream,NULL,NULL);
-       g_object_unref(G_OBJECT(stream));
-       if (pbuf==NULL){
-               g_warning("Could not open image from memory");
-       }
-       return pbuf;
-}
-
-GtkWidget * _gtk_image_new_from_memory_at_scale(const void *data, gint len, gint w, gint h, gboolean preserve_ratio){
-       GtkWidget *image;
-       GdkPixbuf *pbuf=_gdk_pixbuf_new_from_memory_at_scale(data,len,w,h,preserve_ratio);
-       if (pbuf==NULL) return NULL;
-       image=gtk_image_new_from_pixbuf(pbuf);
-       g_object_unref(G_OBJECT(pbuf));
-       return image;
-}
diff --git a/linphone/gtk-glade/waiting.glade b/linphone/gtk-glade/waiting.glade
deleted file mode 100644 (file)
index 294f44e..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Sun Mar 29 15:33:09 2009 -->
-<glade-interface>
-  <widget class="GtkWindow" id="waiting">
-    <property name="title" translatable="yes">Linphone</property>
-    <property name="resizable">False</property>
-    <property name="modal">True</property>
-    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
-    <property name="icon">linphone2.png</property>
-    <property name="deletable">False</property>
-    <child>
-      <widget class="GtkFrame" id="frame1">
-        <property name="visible">True</property>
-        <property name="label_xalign">0</property>
-        <child>
-          <widget class="GtkAlignment" id="alignment1">
-            <property name="visible">True</property>
-            <property name="left_padding">12</property>
-            <child>
-              <widget class="GtkHBox" id="hbox1">
-                <property name="visible">True</property>
-                <property name="spacing">5</property>
-                <child>
-                  <widget class="GtkImage" id="image1">
-                    <property name="visible">True</property>
-                    <property name="stock">gtk-dialog-info</property>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkProgressBar" id="progressbar">
-                    <property name="visible">True</property>
-                  </widget>
-                  <packing>
-                    <property name="padding">5</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="GtkLabel" id="label1">
-            <property name="visible">True</property>
-            <property name="label" translatable="yes">Please wait</property>
-            <property name="use_markup">True</property>
-            <property name="justify">GTK_JUSTIFY_CENTER</property>
-          </widget>
-          <packing>
-            <property name="type">label_item</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/linphone/intl/ChangeLog b/linphone/intl/ChangeLog
deleted file mode 100644 (file)
index 65ec50f..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-2002-08-06  GNU  <bug-gnu-gettext@gnu.org>
-
-       * Version 0.11.5 released.
-
diff --git a/linphone/intl/Makefile.in b/linphone/intl/Makefile.in
deleted file mode 100644 (file)
index 0486dc9..0000000
+++ /dev/null
@@ -1,337 +0,0 @@
-# Makefile for directory with message catalog handling in GNU NLS Utilities.
-# Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
-#
-# This program 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, 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
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General Public
-# License along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-# USA.
-
-PACKAGE = @PACKAGE@
-VERSION = @VERSION@
-
-SHELL = /bin/sh
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-VPATH = @srcdir@
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-transform = @program_transform_name@
-libdir = @libdir@
-includedir = @includedir@
-datadir = @datadir@
-localedir = $(datadir)/locale
-gettextsrcdir = $(datadir)/gettext/intl
-aliaspath = $(localedir)
-subdir = intl
-
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-MKINSTALLDIRS = @MKINSTALLDIRS@
-mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
-
-l = @INTL_LIBTOOL_SUFFIX_PREFIX@
-
-AR = ar
-CC = @CC@
-LIBTOOL = @LIBTOOL@
-RANLIB = @RANLIB@
-YACC = @INTLBISON@ -y -d
-YFLAGS = --name-prefix=__gettext
-
-DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
--DLIBDIR=\"$(libdir)\" -DIN_LIBINTL @DEFS@
-CPPFLAGS = @CPPFLAGS@
-CFLAGS = @CFLAGS@
-LDFLAGS = @LDFLAGS@
-
-COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
-
-HEADERS = $(COMHDRS) libgnuintl.h loadinfo.h
-COMHDRS = gmo.h gettextP.h hash-string.h plural-exp.h eval-plural.h os2compat.h
-SOURCES = $(COMSRCS) intl-compat.c
-COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
-finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
-explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \
-plural-exp.c localcharset.c localename.c osdep.c os2compat.c
-OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
-finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
-explodename.$lo dcigettext.$lo dcngettext.$lo dngettext.$lo ngettext.$lo \
-plural.$lo plural-exp.$lo localcharset.$lo localename.$lo osdep.$lo
-GETTOBJS = intl-compat.$lo
-DISTFILES.common = Makefile.in \
-config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
-DISTFILES.generated = plural.c
-DISTFILES.normal = VERSION
-DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc
-DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \
-COPYING.LIB-2 gettext.h libgettext.h plural-eval.c
-
-# Libtool's library version information for libintl.
-# Before making a gettext release, the gettext maintainer must change this
-# according to the libtool documentation, section "Library interface versions".
-# Maintainers of other packages that include the intl directory must *not*
-# change these values.
-LTV_CURRENT=4
-LTV_REVISION=0
-LTV_AGE=2
-
-.SUFFIXES:
-.SUFFIXES: .c .y .o .lo .sin .sed
-.c.o:
-       $(COMPILE) $<
-.c.lo:
-       $(LIBTOOL) --mode=compile $(COMPILE) $<
-
-.y.c:
-       $(YACC) $(YFLAGS) --output $@ $<
-       rm -f $*.h
-
-.sin.sed:
-       sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
-       mv t-$@ $@
-
-INCLUDES = -I.. -I. -I$(top_srcdir)/intl
-
-all: all-@USE_INCLUDED_LIBINTL@
-all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
-all-no: all-no-@BUILD_INCLUDED_LIBINTL@
-all-no-yes: libgnuintl.$la
-all-no-no:
-
-libintl.a libgnuintl.a: $(OBJECTS)
-       rm -f $@
-       $(AR) cru $@ $(OBJECTS)
-       $(RANLIB) $@
-
-libintl.la libgnuintl.la: $(OBJECTS)
-       $(LIBTOOL) --mode=link \
-         $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
-         $(OBJECTS) @LTLIBICONV@ -lc \
-         -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
-         -rpath $(libdir) \
-         -no-undefined
-
-libintl.h: libgnuintl.h
-       cp $(srcdir)/libgnuintl.h libintl.h
-
-charset.alias: config.charset
-       $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
-       mv t-$@ $@
-
-check: all
-
-# This installation goal is only used in GNU gettext.  Packages which
-# only use the library should use install instead.
-
-# We must not install the libintl.h/libintl.a files if we are on a
-# system which has the GNU gettext() function in its C library or in a
-# separate library.
-# If you want to use the one which comes with this version of the
-# package, you have to use `configure --with-included-gettext'.
-install: install-exec install-data
-install-exec: all
-       if test "$(PACKAGE)" = "gettext" \
-          && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
-         $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
-         $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
-         $(LIBTOOL) --mode=install \
-           $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
-       else \
-         : ; \
-       fi
-       if test '@USE_INCLUDED_LIBINTL@' = yes; then \
-         test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
-         temp=$(DESTDIR)$(libdir)/t-charset.alias; \
-         dest=$(DESTDIR)$(libdir)/charset.alias; \
-         if test -f $(DESTDIR)$(libdir)/charset.alias; then \
-           orig=$(DESTDIR)$(libdir)/charset.alias; \
-           sed -f ref-add.sed $$orig > $$temp; \
-           $(INSTALL_DATA) $$temp $$dest; \
-           rm -f $$temp; \
-         else \
-           if test @GLIBC21@ = no; then \
-             orig=charset.alias; \
-             sed -f ref-add.sed $$orig > $$temp; \
-             $(INSTALL_DATA) $$temp $$dest; \
-             rm -f $$temp; \
-           fi; \
-         fi; \
-         $(mkinstalldirs) $(DESTDIR)$(localedir); \
-         test -f $(DESTDIR)$(localedir)/locale.alias \
-           && orig=$(DESTDIR)$(localedir)/locale.alias \
-           || orig=$(srcdir)/locale.alias; \
-         temp=$(DESTDIR)$(localedir)/t-locale.alias; \
-         dest=$(DESTDIR)$(localedir)/locale.alias; \
-         sed -f ref-add.sed $$orig > $$temp; \
-         $(INSTALL_DATA) $$temp $$dest; \
-         rm -f $$temp; \
-       else \
-         : ; \
-       fi
-install-data: all
-       if test "$(PACKAGE)" = "gettext"; then \
-         $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
-         $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
-         $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
-         dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \
-         for file in $$dists; do \
-           $(INSTALL_DATA) $(srcdir)/$$file \
-                           $(DESTDIR)$(gettextsrcdir)/$$file; \
-         done; \
-         chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
-         dists="$(DISTFILES.generated)"; \
-         for file in $$dists; do \
-           if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
-           $(INSTALL_DATA) $$dir/$$file \
-                           $(DESTDIR)$(gettextsrcdir)/$$file; \
-         done; \
-         dists="$(DISTFILES.obsolete)"; \
-         for file in $$dists; do \
-           rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
-         done; \
-       else \
-         : ; \
-       fi
-
-install-strip: install
-
-installdirs:
-       if test "$(PACKAGE)" = "gettext" \
-          && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
-         $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
-       else \
-         : ; \
-       fi
-       if test '@USE_INCLUDED_LIBINTL@' = yes; then \
-         test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
-         $(mkinstalldirs) $(DESTDIR)$(localedir); \
-       else \
-         : ; \
-       fi
-       if test "$(PACKAGE)" = "gettext"; then \
-         $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
-       else \
-         : ; \
-       fi
-
-# Define this as empty until I found a useful application.
-installcheck:
-
-uninstall:
-       if test "$(PACKAGE)" = "gettext" \
-          && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
-         rm -f $(DESTDIR)$(includedir)/libintl.h; \
-         $(LIBTOOL) --mode=uninstall \
-           rm -f $(DESTDIR)$(libdir)/libintl.$la; \
-       else \
-         : ; \
-       fi
-       if test '@USE_INCLUDED_LIBINTL@' = yes; then \
-         if test -f $(DESTDIR)$(libdir)/charset.alias; then \
-           temp=$(DESTDIR)$(libdir)/t-charset.alias; \
-           dest=$(DESTDIR)$(libdir)/charset.alias; \
-           sed -f ref-del.sed $$dest > $$temp; \
-           if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
-             rm -f $$dest; \
-           else \
-             $(INSTALL_DATA) $$temp $$dest; \
-           fi; \
-           rm -f $$temp; \
-         fi; \
-         if test -f $(DESTDIR)$(localedir)/locale.alias; then \
-           temp=$(DESTDIR)$(localedir)/t-locale.alias; \
-           dest=$(DESTDIR)$(localedir)/locale.alias; \
-           sed -f ref-del.sed $$dest > $$temp; \
-           if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
-             rm -f $$dest; \
-           else \
-             $(INSTALL_DATA) $$temp $$dest; \
-           fi; \
-           rm -f $$temp; \
-         fi; \
-       else \
-         : ; \
-       fi
-       if test "$(PACKAGE)" = "gettext"; then \
-         for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \
-           rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
-         done; \
-       else \
-         : ; \
-       fi
-
-info dvi:
-
-$(OBJECTS): ../config.h libgnuintl.h
-bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: gettextP.h gmo.h loadinfo.h
-dcigettext.$lo: hash-string.h
-explodename.$lo l10nflist.$lo: loadinfo.h
-dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: plural-exp.h
-dcigettext.$lo: eval-plural.h
-
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES)
-       here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
-
-id: ID
-
-ID: $(HEADERS) $(SOURCES)
-       here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
-
-
-mostlyclean:
-       rm -f *.a *.la *.o *.lo core core.*
-       rm -f libintl.h charset.alias ref-add.sed ref-del.sed
-       rm -f -r .libs _libs
-
-clean: mostlyclean
-
-distclean: clean
-       rm -f Makefile ID TAGS
-       if test "$(PACKAGE)" = gettext; then \
-         rm -f ChangeLog.inst $(DISTFILES.normal); \
-       else \
-         : ; \
-       fi
-
-maintainer-clean: distclean
-       @echo "This command is intended for maintainers to use;"
-       @echo "it deletes files that may require special tools to rebuild."
-
-
-# GNU gettext needs not contain the file `VERSION' but contains some
-# other files which should not be distributed in other packages.
-distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
-dist distdir: Makefile
-       if test "$(PACKAGE)" = gettext; then \
-         additional="$(DISTFILES.gettext)"; \
-       else \
-         additional="$(DISTFILES.normal)"; \
-       fi; \
-       $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
-       for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
-         if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
-         cp -p $$dir/$$file $(distdir); \
-       done
-
-Makefile: Makefile.in ../config.status
-       cd .. \
-         && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-# Tell versions [3.59,3.63) of GNU make not to export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/linphone/intl/VERSION b/linphone/intl/VERSION
deleted file mode 100644 (file)
index acc8052..0000000
+++ /dev/null
@@ -1 +0,0 @@
-GNU gettext library from gettext-0.11.5
diff --git a/linphone/intl/bindtextdom.c b/linphone/intl/bindtextdom.c
deleted file mode 100644 (file)
index d582ce1..0000000
+++ /dev/null
@@ -1,369 +0,0 @@
-/* Implementation of the bindtextdomain(3) function
-   Copyright (C) 1995-1998, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-   This program 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, 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-   USA.  */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-#include "gettextP.h"
-
-#ifdef _LIBC
-/* We have to handle multi-threaded applications.  */
-# include <bits/libc-lock.h>
-#else
-/* Provide dummy implementation if this is outside glibc.  */
-# define __libc_rwlock_define(CLASS, NAME)
-# define __libc_rwlock_wrlock(NAME)
-# define __libc_rwlock_unlock(NAME)
-#endif
-
-/* The internal variables in the standalone libintl.a must have different
-   names than the internal variables in GNU libc, otherwise programs
-   using libintl.a cannot be linked statically.  */
-#if !defined _LIBC
-# define _nl_default_dirname libintl_nl_default_dirname
-# define _nl_domain_bindings libintl_nl_domain_bindings
-#endif
-
-/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>.  */
-#ifndef offsetof
-# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
-#endif
-
-/* @@ end of prolog @@ */
-
-/* Contains the default location of the message catalogs.  */
-extern const char _nl_default_dirname[];
-
-/* List with bindings of specific domains.  */
-extern struct binding *_nl_domain_bindings;
-
-/* Lock variable to protect the global data in the gettext implementation.  */
-__libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
-
-
-/* Names for the libintl functions are a problem.  They must not clash
-   with existing names and they should follow ANSI C.  But this source
-   code is also used in GNU C Library where the names have a __
-   prefix.  So we have to make a difference here.  */
-#ifdef _LIBC
-# define BINDTEXTDOMAIN __bindtextdomain
-# define BIND_TEXTDOMAIN_CODESET __bind_textdomain_codeset
-# ifndef strdup
-#  define strdup(str) __strdup (str)
-# endif
-#else
-# define BINDTEXTDOMAIN libintl_bindtextdomain
-# define BIND_TEXTDOMAIN_CODESET libintl_bind_textdomain_codeset
-#endif
-
-/* Prototypes for local functions.  */
-static void set_binding_values PARAMS ((const char *domainname,
-                                       const char **dirnamep,
-                                       const char **codesetp));
-
-/* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP
-   to be used for the DOMAINNAME message catalog.
-   If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not
-   modified, only the current value is returned.
-   If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither
-   modified nor returned.  */
-static void
-set_binding_values (domainname, dirnamep, codesetp)
-     const char *domainname;
-     const char **dirnamep;
-     const char **codesetp;
-{
-  struct binding *binding;
-  int modified;
-
-  /* Some sanity checks.  */
-  if (domainname == NULL || domainname[0] == '\0')
-    {
-      if (dirnamep)
-       *dirnamep = NULL;
-      if (codesetp)
-       *codesetp = NULL;
-      return;
-    }
-
-  __libc_rwlock_wrlock (_nl_state_lock);
-
-  modified = 0;
-
-  for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
-    {
-      int compare = strcmp (domainname, binding->domainname);
-      if (compare == 0)
-       /* We found it!  */
-       break;
-      if (compare < 0)
-       {
-         /* It is not in the list.  */
-         binding = NULL;
-         break;
-       }
-    }
-
-  if (binding != NULL)
-    {
-      if (dirnamep)
-       {
-         const char *dirname = *dirnamep;
-
-         if (dirname == NULL)
-           /* The current binding has be to returned.  */
-           *dirnamep = binding->dirname;
-         else
-           {
-             /* The domain is already bound.  If the new value and the old
-                one are equal we simply do nothing.  Otherwise replace the
-                old binding.  */
-             char *result = binding->dirname;
-             if (strcmp (dirname, result) != 0)
-               {
-                 if (strcmp (dirname, _nl_default_dirname) == 0)
-                   result = (char *) _nl_default_dirname;
-                 else
-                   {
-#if defined _LIBC || defined HAVE_STRDUP
-                     result = strdup (dirname);
-#else
-                     size_t len = strlen (dirname) + 1;
-                     result = (char *) malloc (len);
-                     if (__builtin_expect (result != NULL, 1))
-                       memcpy (result, dirname, len);
-#endif
-                   }
-
-                 if (__builtin_expect (result != NULL, 1))
-                   {
-                     if (binding->dirname != _nl_default_dirname)
-                       free (binding->dirname);
-
-                     binding->dirname = result;
-                     modified = 1;
-                   }
-               }
-             *dirnamep = result;
-           }
-       }
-
-      if (codesetp)
-       {
-         const char *codeset = *codesetp;
-
-         if (codeset == NULL)
-           /* The current binding has be to returned.  */
-           *codesetp = binding->codeset;
-         else
-           {
-             /* The domain is already bound.  If the new value and the old
-                one are equal we simply do nothing.  Otherwise replace the
-                old binding.  */
-             char *result = binding->codeset;
-             if (result == NULL || strcmp (codeset, result) != 0)
-               {
-#if defined _LIBC || defined HAVE_STRDUP
-                 result = strdup (codeset);
-#else
-                 size_t len = strlen (codeset) + 1;
-                 result = (char *) malloc (len);
-                 if (__builtin_expect (result != NULL, 1))
-                   memcpy (result, codeset, len);
-#endif
-
-                 if (__builtin_expect (result != NULL, 1))
-                   {
-                     if (binding->codeset != NULL)
-                       free (binding->codeset);
-
-                     binding->codeset = result;
-                     binding->codeset_cntr++;
-                     modified = 1;
-                   }
-               }
-             *codesetp = result;
-           }
-       }
-    }
-  else if ((dirnamep == NULL || *dirnamep == NULL)
-          && (codesetp == NULL || *codesetp == NULL))
-    {
-      /* Simply return the default values.  */
-      if (dirnamep)
-       *dirnamep = _nl_default_dirname;
-      if (codesetp)
-       *codesetp = NULL;
-    }
-  else
-    {
-      /* We have to create a new binding.  */
-      size_t len = strlen (domainname) + 1;
-      struct binding *new_binding =
-       (struct binding *) malloc (offsetof (struct binding, domainname) + len);
-
-      if (__builtin_expect (new_binding == NULL, 0))
-       goto failed;
-
-      memcpy (new_binding->domainname, domainname, len);
-
-      if (dirnamep)
-       {
-         const char *dirname = *dirnamep;
-
-         if (dirname == NULL)
-           /* The default value.  */
-           dirname = _nl_default_dirname;
-         else
-           {
-             if (strcmp (dirname, _nl_default_dirname) == 0)
-               dirname = _nl_default_dirname;
-             else
-               {
-                 char *result;
-#if defined _LIBC || defined HAVE_STRDUP
-                 result = strdup (dirname);
-                 if (__builtin_expect (result == NULL, 0))
-                   goto failed_dirname;
-#else
-                 size_t len = strlen (dirname) + 1;
-                 result = (char *) malloc (len);
-                 if (__builtin_expect (result == NULL, 0))
-                   goto failed_dirname;
-                 memcpy (result, dirname, len);
-#endif
-                 dirname = result;
-               }
-           }
-         *dirnamep = dirname;
-         new_binding->dirname = (char *) dirname;
-       }
-      else
-       /* The default value.  */
-       new_binding->dirname = (char *) _nl_default_dirname;
-
-      new_binding->codeset_cntr = 0;
-
-      if (codesetp)
-       {
-         const char *codeset = *codesetp;
-
-         if (codeset != NULL)
-           {
-             char *result;
-
-#if defined _LIBC || defined HAVE_STRDUP
-             result = strdup (codeset);
-             if (__builtin_expect (result == NULL, 0))
-               goto failed_codeset;
-#else
-             size_t len = strlen (codeset) + 1;
-             result = (char *) malloc (len);
-             if (__builtin_expect (result == NULL, 0))
-               goto failed_codeset;
-             memcpy (result, codeset, len);
-#endif
-             codeset = result;
-             new_binding->codeset_cntr++;
-           }
-         *codesetp = codeset;
-         new_binding->codeset = (char *) codeset;
-       }
-      else
-       new_binding->codeset = NULL;
-
-      /* Now enqueue it.  */
-      if (_nl_domain_bindings == NULL
-         || strcmp (domainname, _nl_domain_bindings->domainname) < 0)
-       {
-         new_binding->next = _nl_domain_bindings;
-         _nl_domain_bindings = new_binding;
-       }
-      else
-       {
-         binding = _nl_domain_bindings;
-         while (binding->next != NULL
-                && strcmp (domainname, binding->next->domainname) > 0)
-           binding = binding->next;
-
-         new_binding->next = binding->next;
-         binding->next = new_binding;
-       }
-
-      modified = 1;
-
-      /* Here we deal with memory allocation failures.  */
-      if (0)
-       {
-       failed_codeset:
-         if (new_binding->dirname != _nl_default_dirname)
-           free (new_binding->dirname);
-       failed_dirname:
-         free (new_binding);
-       failed:
-         if (dirnamep)
-           *dirnamep = NULL;
-         if (codesetp)
-           *codesetp = NULL;
-       }
-    }
-
-  /* If we modified any binding, we flush the caches.  */
-  if (modified)
-    ++_nl_msg_cat_cntr;
-
-  __libc_rwlock_unlock (_nl_state_lock);
-}
-
-/* Specify that the DOMAINNAME message catalog will be found
-   in DIRNAME rather than in the system locale data base.  */
-char *
-BINDTEXTDOMAIN (domainname, dirname)
-     const char *domainname;
-     const char *dirname;
-{
-  set_binding_values (domainname, &dirname, NULL);
-  return (char *) dirname;
-}
-
-/* Specify the character encoding in which the messages from the
-   DOMAINNAME message catalog will be returned.  */
-char *
-BIND_TEXTDOMAIN_CODESET (domainname, codeset)
-     const char *domainname;
-     const char *codeset;
-{
-  set_binding_values (domainname, NULL, &codeset);
-  return (char *) codeset;
-}
-
-#ifdef _LIBC
-/* Aliases for function names in GNU C Library.  */
-weak_alias (__bindtextdomain, bindtextdomain);
-weak_alias (__bind_textdomain_codeset, bind_textdomain_codeset);
-#endif
diff --git a/linphone/intl/cat-compat.c b/linphone/intl/cat-compat.c
deleted file mode 100644 (file)
index 867d901..0000000
+++ /dev/null
@@ -1,262 +0,0 @@
-/* Compatibility code for gettext-using-catgets interface.
-   Copyright (C) 1995, 1997 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-# include <string.h>
-#else
-char *getenv ();
-# ifdef HAVE_MALLOC_H
-#  include <malloc.h>
-# endif
-#endif
-
-#ifdef HAVE_NL_TYPES_H
-# include <nl_types.h>
-#endif
-
-#include "libgettext.h"
-
-/* @@ end of prolog @@ */
-
-/* XPG3 defines the result of `setlocale (category, NULL)' as:
-   ``Directs `setlocale()' to query `category' and return the current
-     setting of `local'.''
-   However it does not specify the exact format.  And even worse: POSIX
-   defines this not at all.  So we can use this feature only on selected
-   system (e.g. those using GNU C Library).  */
-#ifdef _LIBC
-# define HAVE_LOCALE_NULL
-#endif
-
-/* The catalog descriptor.  */
-static nl_catd catalog = (nl_catd) -1;
-
-/* Name of the default catalog.  */
-static const char default_catalog_name[] = "messages";
-
-/* Name of currently used catalog.  */
-static const char *catalog_name = default_catalog_name;
-
-/* Get ID for given string.  If not found return -1.  */
-static int msg_to_cat_id PARAMS ((const char *msg));
-
-/* Substitution for systems lacking this function in their C library.  */
-#if !_LIBC && !HAVE_STPCPY
-static char *stpcpy PARAMS ((char *dest, const char *src));
-#endif
-
-
-/* Set currently used domain/catalog.  */
-char *
-textdomain (domainname)
-     const char *domainname;
-{
-  nl_catd new_catalog;
-  char *new_name;
-  size_t new_name_len;
-  char *lang;
-
-#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES \
-    && defined HAVE_LOCALE_NULL
-  lang = setlocale (LC_MESSAGES, NULL);
-#else
-  lang = getenv ("LC_ALL");
-  if (lang == NULL || lang[0] == '\0')
-    {
-      lang = getenv ("LC_MESSAGES");
-      if (lang == NULL || lang[0] == '\0')
-       lang = getenv ("LANG");
-    }
-#endif
-  if (lang == NULL || lang[0] == '\0')
-    lang = "C";
-
-  /* See whether name of currently used domain is asked.  */
-  if (domainname == NULL)
-    return (char *) catalog_name;
-
-  if (domainname[0] == '\0')
-    domainname = default_catalog_name;
-
-  /* Compute length of added path element.  */
-  new_name_len = sizeof (LOCALEDIR) - 1 + 1 + strlen (lang)
-                + sizeof ("/LC_MESSAGES/") - 1 + sizeof (PACKAGE) - 1
-                + sizeof (".cat");
-
-  new_name = (char *) malloc (new_name_len);
-  if (new_name == NULL)
-    return NULL;
-
-  strcpy (new_name, PACKAGE);
-  new_catalog = catopen (new_name, 0);
-
-  if (new_catalog == (nl_catd) -1)
-    {
-      /* NLSPATH search didn't work, try absolute path */
-      sprintf (new_name, "%s/%s/LC_MESSAGES/%s.cat", LOCALEDIR, lang,
-              PACKAGE);
-      new_catalog = catopen (new_name, 0);
-
-      if (new_catalog == (nl_catd) -1)
-       {
-         free (new_name);
-         return (char *) catalog_name;
-       }
-    }
-
-  /* Close old catalog.  */
-  if (catalog != (nl_catd) -1)
-    catclose (catalog);
-  if (catalog_name != default_catalog_name)
-    free ((char *) catalog_name);
-
-  catalog = new_catalog;
-  catalog_name = new_name;
-
-  return (char *) catalog_name;
-}
-
-char *
-bindtextdomain (domainname, dirname)
-     const char *domainname;
-     const char *dirname;
-{
-#if HAVE_SETENV || HAVE_PUTENV
-  char *old_val, *new_val, *cp;
-  size_t new_val_len;
-
-  /* This does not make much sense here but to be compatible do it.  */
-  if (domainname == NULL)
-    return NULL;
-
-  /* Compute length of added path element.  If we use setenv we don't need
-     the first byts for NLSPATH=, but why complicate the code for this
-     peanuts.  */
-  new_val_len = sizeof ("NLSPATH=") - 1 + strlen (dirname)
-               + sizeof ("/%L/LC_MESSAGES/%N.cat");
-
-  old_val = getenv ("NLSPATH");
-  if (old_val == NULL || old_val[0] == '\0')
-    {
-      old_val = NULL;
-      new_val_len += 1 + sizeof (LOCALEDIR) - 1
-                    + sizeof ("/%L/LC_MESSAGES/%N.cat");
-    }
-  else
-    new_val_len += strlen (old_val);
-
-  new_val = (char *) malloc (new_val_len);
-  if (new_val == NULL)
-    return NULL;
-
-# if HAVE_SETENV
-  cp = new_val;
-# else
-  cp = stpcpy (new_val, "NLSPATH=");
-# endif
-
-  cp = stpcpy (cp, dirname);
-  cp = stpcpy (cp, "/%L/LC_MESSAGES/%N.cat:");
-
-  if (old_val == NULL)
-    {
-# if __STDC__
-      stpcpy (cp, LOCALEDIR "/%L/LC_MESSAGES/%N.cat");
-# else
-
-      cp = stpcpy (cp, LOCALEDIR);
-      stpcpy (cp, "/%L/LC_MESSAGES/%N.cat");
-# endif
-    }
-  else
-    stpcpy (cp, old_val);
-
-# if HAVE_SETENV
-  setenv ("NLSPATH", new_val, 1);
-  free (new_val);
-# else
-  putenv (new_val);
-  /* Do *not* free the environment entry we just entered.  It is used
-     from now on.   */
-# endif
-
-#endif
-
-  return (char *) domainname;
-}
-
-#undef gettext
-char *
-gettext (msg)
-     const char *msg;
-{
-  int msgid;
-
-  if (msg == NULL || catalog == (nl_catd) -1)
-    return (char *) msg;
-
-  /* Get the message from the catalog.  We always use set number 1.
-     The message ID is computed by the function `msg_to_cat_id'
-     which works on the table generated by `po-to-tbl'.  */
-  msgid = msg_to_cat_id (msg);
-  if (msgid == -1)
-    return (char *) msg;
-
-  return catgets (catalog, 1, msgid, (char *) msg);
-}
-
-/* Look through the table `_msg_tbl' which has `_msg_tbl_length' entries
-   for the one equal to msg.  If it is found return the ID.  In case when
-   the string is not found return -1.  */
-static int
-msg_to_cat_id (msg)
-     const char *msg;
-{
-  int cnt;
-
-  for (cnt = 0; cnt < _msg_tbl_length; ++cnt)
-    if (strcmp (msg, _msg_tbl[cnt]._msg) == 0)
-      return _msg_tbl[cnt]._msg_number;
-
-  return -1;
-}
-
-
-/* @@ begin of epilog @@ */
-
-/* We don't want libintl.a to depend on any other library.  So we
-   avoid the non-standard function stpcpy.  In GNU C Library this
-   function is available, though.  Also allow the symbol HAVE_STPCPY
-   to be defined.  */
-#if !_LIBC && !HAVE_STPCPY
-static char *
-stpcpy (dest, src)
-     char *dest;
-     const char *src;
-{
-  while ((*dest++ = *src++) != '\0')
-    /* Do nothing. */ ;
-  return dest - 1;
-}
-#endif
diff --git a/linphone/intl/dcgettext.c b/linphone/intl/dcgettext.c
deleted file mode 100644 (file)
index ca6a1c8..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Implementation of the dcgettext(3) function.
-   Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-   This program 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, 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-   USA.  */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "gettextP.h"
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-
-/* @@ end of prolog @@ */
-
-/* Names for the libintl functions are a problem.  They must not clash
-   with existing names and they should follow ANSI C.  But this source
-   code is also used in GNU C Library where the names have a __
-   prefix.  So we have to make a difference here.  */
-#ifdef _LIBC
-# define DCGETTEXT __dcgettext
-# define DCIGETTEXT __dcigettext
-#else
-# define DCGETTEXT libintl_dcgettext
-# define DCIGETTEXT libintl_dcigettext
-#endif
-
-/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
-   locale.  */
-char *
-DCGETTEXT (domainname, msgid, category)
-     const char *domainname;
-     const char *msgid;
-     int category;
-{
-  return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
-}
-
-#ifdef _LIBC
-/* Alias for function name in GNU C Library.  */
-INTDEF(__dcgettext)
-weak_alias (__dcgettext, dcgettext);
-#endif
diff --git a/linphone/intl/dgettext.c b/linphone/intl/dgettext.c
deleted file mode 100644 (file)
index cf5b403..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Implementation of the dgettext(3) function.
-   Copyright (C) 1995-1997, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-   This program 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, 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-   USA.  */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <locale.h>
-
-#include "gettextP.h"
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-
-/* @@ end of prolog @@ */
-
-/* Names for the libintl functions are a problem.  They must not clash
-   with existing names and they should follow ANSI C.  But this source
-   code is also used in GNU C Library where the names have a __
-   prefix.  So we have to make a difference here.  */
-#ifdef _LIBC
-# define DGETTEXT __dgettext
-# define DCGETTEXT INTUSE(__dcgettext)
-#else
-# define DGETTEXT libintl_dgettext
-# define DCGETTEXT libintl_dcgettext
-#endif
-
-/* Look up MSGID in the DOMAINNAME message catalog of the current
-   LC_MESSAGES locale.  */
-char *
-DGETTEXT (domainname, msgid)
-     const char *domainname;
-     const char *msgid;
-{
-  return DCGETTEXT (domainname, msgid, LC_MESSAGES);
-}
-
-#ifdef _LIBC
-/* Alias for function name in GNU C Library.  */
-weak_alias (__dgettext, dgettext);
-#endif
diff --git a/linphone/intl/explodename.c b/linphone/intl/explodename.c
deleted file mode 100644 (file)
index 2985064..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-/* Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
-   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-
-   This program 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, 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-   USA.  */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-
-#include "loadinfo.h"
-
-/* On some strange systems still no definition of NULL is found.  Sigh!  */
-#ifndef NULL
-# if defined __STDC__ && __STDC__
-#  define NULL ((void *) 0)
-# else
-#  define NULL 0
-# endif
-#endif
-
-/* @@ end of prolog @@ */
-
-char *
-_nl_find_language (name)
-     const char *name;
-{
-  while (name[0] != '\0' && name[0] != '_' && name[0] != '@'
-        && name[0] != '+' && name[0] != ',')
-    ++name;
-
-  return (char *) name;
-}
-
-
-int
-_nl_explode_name (name, language, modifier, territory, codeset,
-                 normalized_codeset, special, sponsor, revision)
-     char *name;
-     const char **language;
-     const char **modifier;
-     const char **territory;
-     const char **codeset;
-     const char **normalized_codeset;
-     const char **special;
-     const char **sponsor;
-     const char **revision;
-{
-  enum { undecided, xpg, cen } syntax;
-  char *cp;
-  int mask;
-
-  *modifier = NULL;
-  *territory = NULL;
-  *codeset = NULL;
-  *normalized_codeset = NULL;
-  *special = NULL;
-  *sponsor = NULL;
-  *revision = NULL;
-
-  /* Now we determine the single parts of the locale name.  First
-     look for the language.  Termination symbols are `_' and `@' if
-     we use XPG4 style, and `_', `+', and `,' if we use CEN syntax.  */
-  mask = 0;
-  syntax = undecided;
-  *language = cp = name;
-  cp = _nl_find_language (*language);
-
-  if (*language == cp)
-    /* This does not make sense: language has to be specified.  Use
-       this entry as it is without exploding.  Perhaps it is an alias.  */
-    cp = strchr (*language, '\0');
-  else if (cp[0] == '_')
-    {
-      /* Next is the territory.  */
-      cp[0] = '\0';
-      *territory = ++cp;
-
-      while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@'
-            && cp[0] != '+' && cp[0] != ',' && cp[0] != '_')
-       ++cp;
-
-      mask |= TERRITORY;
-
-      if (cp[0] == '.')
-       {
-         /* Next is the codeset.  */
-         syntax = xpg;
-         cp[0] = '\0';
-         *codeset = ++cp;
-
-         while (cp[0] != '\0' && cp[0] != '@')
-           ++cp;
-
-         mask |= XPG_CODESET;
-
-         if (*codeset != cp && (*codeset)[0] != '\0')
-           {
-             *normalized_codeset = _nl_normalize_codeset (*codeset,
-                                                          cp - *codeset);
-             if (strcmp (*codeset, *normalized_codeset) == 0)
-               free ((char *) *normalized_codeset);
-             else
-               mask |= XPG_NORM_CODESET;
-           }
-       }
-    }
-
-  if (cp[0] == '@' || (syntax != xpg && cp[0] == '+'))
-    {
-      /* Next is the modifier.  */
-      syntax = cp[0] == '@' ? xpg : cen;
-      cp[0] = '\0';
-      *modifier = ++cp;
-
-      while (syntax == cen && cp[0] != '\0' && cp[0] != '+'
-            && cp[0] != ',' && cp[0] != '_')
-       ++cp;
-
-      mask |= XPG_MODIFIER | CEN_AUDIENCE;
-    }
-
-  if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_'))
-    {
-      syntax = cen;
-
-      if (cp[0] == '+')
-       {
-         /* Next is special application (CEN syntax).  */
-         cp[0] = '\0';
-         *special = ++cp;
-
-         while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_')
-           ++cp;
-
-         mask |= CEN_SPECIAL;
-       }
-
-      if (cp[0] == ',')
-       {
-         /* Next is sponsor (CEN syntax).  */
-         cp[0] = '\0';
-         *sponsor = ++cp;
-
-         while (cp[0] != '\0' && cp[0] != '_')
-           ++cp;
-
-         mask |= CEN_SPONSOR;
-       }
-
-      if (cp[0] == '_')
-       {
-         /* Next is revision (CEN syntax).  */
-         cp[0] = '\0';
-         *revision = ++cp;
-
-         mask |= CEN_REVISION;
-       }
-    }
-
-  /* For CEN syntax values it might be important to have the
-     separator character in the file name, not for XPG syntax.  */
-  if (syntax == xpg)
-    {
-      if (*territory != NULL && (*territory)[0] == '\0')
-       mask &= ~TERRITORY;
-
-      if (*codeset != NULL && (*codeset)[0] == '\0')
-       mask &= ~XPG_CODESET;
-
-      if (*modifier != NULL && (*modifier)[0] == '\0')
-       mask &= ~XPG_MODIFIER;
-    }
-
-  return mask;
-}
diff --git a/linphone/intl/finddomain.c b/linphone/intl/finddomain.c
deleted file mode 100644 (file)
index 2f103d5..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-/* Handle list of needed message catalogs
-   Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
-   Written by Ulrich Drepper <drepper@gnu.org>, 1995.
-
-   This program 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, 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-   USA.  */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <stdlib.h>
-#include <string.h>
-
-#if defined HAVE_UNISTD_H || defined _LIBC
-# include <unistd.h>
-#endif
-
-#include "gettextP.h"
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-
-/* @@ end of prolog @@ */
-/* List of already loaded domains.  */
-static struct loaded_l10nfile *_nl_loaded_domains;
-
-
-/* Return a data structure describing the message catalog described by
-   the DOMAINNAME and CATEGORY parameters with respect to the currently
-   established bindings.  */
-struct loaded_l10nfile *
-internal_function
-_nl_find_domain (dirname, locale, domainname, domainbinding)
-     const char *dirname;
-     char *locale;
-     const char *domainname;
-     struct binding *domainbinding;
-{
-  struct loaded_l10nfile *retval;
-  const char *language;
-  const char *modifier;
-  const char *territory;
-  const char *codeset;
-  const char *normalized_codeset;
-  const char *special;
-  const char *sponsor;
-  const char *revision;
-  const char *alias_value;
-  int mask;
-
-  /* LOCALE can consist of up to four recognized parts for the XPG syntax:
-
-               language[_territory[.codeset]][@modifier]
-
-     and six parts for the CEN syntax:
-
-       language[_territory][+audience][+special][,[sponsor][_revision]]
-
-     Beside the first part all of them are allowed to be missing.  If
-     the full specified locale is not found, the less specific one are
-     looked for.  The various parts will be stripped off according to
-     the following order:
-               (1) revision
-               (2) sponsor
-               (3) special
-               (4) codeset
-               (5) normalized codeset
-               (6) territory
-               (7) audience/modifier
-   */
-
-  /* If we have already tested for this locale entry there has to
-     be one data set in the list of loaded domains.  */
-  retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
-                              strlen (dirname) + 1, 0, locale, NULL, NULL,
-                              NULL, NULL, NULL, NULL, NULL, domainname, 0);
-  if (retval != NULL)
-    {
-      /* We know something about this locale.  */
-      int cnt;
-
-      if (retval->decided == 0)
-       _nl_load_domain (retval, domainbinding);
-
-      if (retval->data != NULL)
-       return retval;
-
-      for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
-       {
-         if (retval->successor[cnt]->decided == 0)
-           _nl_load_domain (retval->successor[cnt], domainbinding);
-
-         if (retval->successor[cnt]->data != NULL)
-           break;
-       }
-      return cnt >= 0 ? retval : NULL;
-      /* NOTREACHED */
-    }
-
-  /* See whether the locale value is an alias.  If yes its value
-     *overwrites* the alias name.  No test for the original value is
-     done.  */
-  alias_value = _nl_expand_alias (locale);
-  if (alias_value != NULL)
-    {
-#if defined _LIBC || defined HAVE_STRDUP
-      locale = strdup (alias_value);
-      if (locale == NULL)
-       return NULL;
-#else
-      size_t len = strlen (alias_value) + 1;
-      locale = (char *) malloc (len);
-      if (locale == NULL)
-       return NULL;
-
-      memcpy (locale, alias_value, len);
-#endif
-    }
-
-  /* Now we determine the single parts of the locale name.  First
-     look for the language.  Termination symbols are `_' and `@' if
-     we use XPG4 style, and `_', `+', and `,' if we use CEN syntax.  */
-  mask = _nl_explode_name (locale, &language, &modifier, &territory,
-                          &codeset, &normalized_codeset, &special,
-                          &sponsor, &revision);
-
-  /* Create all possible locale entries which might be interested in
-     generalization.  */
-  retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
-                              strlen (dirname) + 1, mask, language, territory,
-                              codeset, normalized_codeset, modifier, special,
-                              sponsor, revision, domainname, 1);
-  if (retval == NULL)
-    /* This means we are out of core.  */
-    return NULL;
-
-  if (retval->decided == 0)
-    _nl_load_domain (retval, domainbinding);
-  if (retval->data == NULL)
-    {
-      int cnt;
-      for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
-       {
-         if (retval->successor[cnt]->decided == 0)
-           _nl_load_domain (retval->successor[cnt], domainbinding);
-         if (retval->successor[cnt]->data != NULL)
-           break;
-       }
-    }
-
-  /* The room for an alias was dynamically allocated.  Free it now.  */
-  if (alias_value != NULL)
-    free (locale);
-
-  /* The space for normalized_codeset is dynamically allocated.  Free it.  */
-  if (mask & XPG_NORM_CODESET)
-    free ((void *) normalized_codeset);
-
-  return retval;
-}
-
-
-#ifdef _LIBC
-static void __attribute__ ((unused))
-free_mem (void)
-{
-  struct loaded_l10nfile *runp = _nl_loaded_domains;
-
-  while (runp != NULL)
-    {
-      struct loaded_l10nfile *here = runp;
-      if (runp->data != NULL)
-       _nl_unload_domain ((struct loaded_domain *) runp->data);
-      runp = runp->next;
-      free ((char *) here->filename);
-      free (here);
-    }
-}
-
-text_set_element (__libc_subfreeres, free_mem);
-#endif
diff --git a/linphone/intl/gettext.c b/linphone/intl/gettext.c
deleted file mode 100644 (file)
index 43d689f..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Implementation of gettext(3) function.
-   Copyright (C) 1995, 1997, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-   This program 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, 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-   USA.  */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef _LIBC
-# define __need_NULL
-# include <stddef.h>
-#else
-# include <stdlib.h>           /* Just for NULL.  */
-#endif
-
-#include "gettextP.h"
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-
-/* @@ end of prolog @@ */
-
-/* Names for the libintl functions are a problem.  They must not clash
-   with existing names and they should follow ANSI C.  But this source
-   code is also used in GNU C Library where the names have a __
-   prefix.  So we have to make a difference here.  */
-#ifdef _LIBC
-# define GETTEXT __gettext
-# define DCGETTEXT INTUSE(__dcgettext)
-#else
-# define GETTEXT libintl_gettext
-# define DCGETTEXT libintl_dcgettext
-#endif
-
-/* Look up MSGID in the current default message catalog for the current
-   LC_MESSAGES locale.  If not found, returns MSGID itself (the default
-   text).  */
-char *
-GETTEXT (msgid)
-     const char *msgid;
-{
-  return DCGETTEXT (NULL, msgid, LC_MESSAGES);
-}
-
-#ifdef _LIBC
-/* Alias for function name in GNU C Library.  */
-weak_alias (__gettext, gettext);
-#endif
diff --git a/linphone/intl/gettext.h b/linphone/intl/gettext.h
deleted file mode 100644 (file)
index 6f5d760..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/* Description of GNU message catalog format: general file layout.
-   Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
-
-   This program 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, 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-   USA.  */
-
-#ifndef _GETTEXT_H
-#define _GETTEXT_H 1
-
-#if HAVE_LIMITS_H || _LIBC
-# include <limits.h>
-#endif
-
-/* @@ end of prolog @@ */
-
-/* The magic number of the GNU message catalog format.  */
-#define _MAGIC 0x950412de
-#define _MAGIC_SWAPPED 0xde120495
-
-/* Revision number of the currently used .mo (binary) file format.  */
-#define MO_REVISION_NUMBER 0
-
-/* The following contortions are an attempt to use the C preprocessor
-   to determine an unsigned integral type that is 32 bits wide.  An
-   alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
-   as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work
-   when cross-compiling.  */
-
-#if __STDC__
-# define UINT_MAX_32_BITS 4294967295U
-#else
-# define UINT_MAX_32_BITS 0xFFFFFFFF
-#endif
-
-/* If UINT_MAX isn't defined, assume it's a 32-bit type.
-   This should be valid for all systems GNU cares about because
-   that doesn't include 16-bit systems, and only modern systems
-   (that certainly have <limits.h>) have 64+-bit integral types.  */
-
-#ifndef UINT_MAX
-# define UINT_MAX UINT_MAX_32_BITS
-#endif
-
-#if UINT_MAX == UINT_MAX_32_BITS
-typedef unsigned nls_uint32;
-#else
-# if USHRT_MAX == UINT_MAX_32_BITS
-typedef unsigned short nls_uint32;
-# else
-#  if ULONG_MAX == UINT_MAX_32_BITS
-typedef unsigned long nls_uint32;
-#  else
-  /* The following line is intended to throw an error.  Using #error is
-     not portable enough.  */
-  "Cannot determine unsigned 32-bit data type."
-#  endif
-# endif
-#endif
-
-
-/* Header for binary .mo file format.  */
-struct mo_file_header
-{
-  /* The magic number.  */
-  nls_uint32 magic;
-  /* The revision number of the file format.  */
-  nls_uint32 revision;
-  /* The number of strings pairs.  */
-  nls_uint32 nstrings;
-  /* Offset of table with start offsets of original strings.  */
-  nls_uint32 orig_tab_offset;
-  /* Offset of table with start offsets of translation strings.  */
-  nls_uint32 trans_tab_offset;
-  /* Size of hashing table.  */
-  nls_uint32 hash_tab_size;
-  /* Offset of first hashing entry.  */
-  nls_uint32 hash_tab_offset;
-};
-
-struct string_desc
-{
-  /* Length of addressed string.  */
-  nls_uint32 length;
-  /* Offset of string in file.  */
-  nls_uint32 offset;
-};
-
-/* @@ begin of epilog @@ */
-
-#endif /* gettext.h  */
diff --git a/linphone/intl/gettextP.h b/linphone/intl/gettextP.h
deleted file mode 100644 (file)
index f085c59..0000000
+++ /dev/null
@@ -1,242 +0,0 @@
-/* Header describing internals of libintl library.
-   Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc.
-   Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
-
-   This program 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, 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-   USA.  */
-
-#ifndef _GETTEXTP_H
-#define _GETTEXTP_H
-
-#include <stddef.h>            /* Get size_t.  */
-
-#ifdef _LIBC
-# include "../iconv/gconv_int.h"
-#else
-# if HAVE_ICONV
-#  include <iconv.h>
-# endif
-#endif
-
-#include "loadinfo.h"
-
-#include "gmo.h"               /* Get nls_uint32.  */
-
-/* @@ end of prolog @@ */
-
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#  define PARAMS(args) args
-# else
-#  define PARAMS(args) ()
-# endif
-#endif
-
-#ifndef internal_function
-# define internal_function
-#endif
-
-#ifndef attribute_hidden
-# define attribute_hidden
-#endif
-
-/* Tell the compiler when a conditional or integer expression is
-   almost always true or almost always false.  */
-#ifndef HAVE_BUILTIN_EXPECT
-# define __builtin_expect(expr, val) (expr)
-#endif
-
-#ifndef W
-# define W(flag, data) ((flag) ? SWAP (data) : (data))
-#endif
-
-
-#ifdef _LIBC
-# include <byteswap.h>
-# define SWAP(i) bswap_32 (i)
-#else
-static inline nls_uint32
-SWAP (i)
-     nls_uint32 i;
-{
-  return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
-}
-#endif
-
-
-/* In-memory representation of system dependent string.  */
-struct sysdep_string_desc
-{
-  /* Length of addressed string, including the trailing NUL.  */
-  size_t length;
-  /* Pointer to addressed string.  */
-  const char *pointer;
-};
-
-/* The representation of an opened message catalog.  */
-struct loaded_domain
-{
-  /* Pointer to memory containing the .mo file.  */
-  const char *data;
-  /* 1 if the memory is mmap()ed, 0 if the memory is malloc()ed.  */
-  int use_mmap;
-  /* Size of mmap()ed memory.  */
-  size_t mmap_size;
-  /* 1 if the .mo file uses a different endianness than this machine.  */
-  int must_swap;
-  /* Pointer to additional malloc()ed memory.  */
-  void *malloced;
-
-  /* Number of static strings pairs.  */
-  nls_uint32 nstrings;
-  /* Pointer to descriptors of original strings in the file.  */
-  const struct string_desc *orig_tab;
-  /* Pointer to descriptors of translated strings in the file.  */
-  const struct string_desc *trans_tab;
-
-  /* Number of system dependent strings pairs.  */
-  nls_uint32 n_sysdep_strings;
-  /* Pointer to descriptors of original sysdep strings.  */
-  const struct sysdep_string_desc *orig_sysdep_tab;
-  /* Pointer to descriptors of translated sysdep strings.  */
-  const struct sysdep_string_desc *trans_sysdep_tab;
-
-  /* Size of hash table.  */
-  nls_uint32 hash_size;
-  /* Pointer to hash table.  */
-  const nls_uint32 *hash_tab;
-  /* 1 if the hash table uses a different endianness than this machine.  */
-  int must_swap_hash_tab;
-
-  int codeset_cntr;
-#ifdef _LIBC
-  __gconv_t conv;
-#else
-# if HAVE_ICONV
-  iconv_t conv;
-# endif
-#endif
-  char **conv_tab;
-
-  struct expression *plural;
-  unsigned long int nplurals;
-};
-
-/* We want to allocate a string at the end of the struct.  But ISO C
-   doesn't allow zero sized arrays.  */
-#ifdef __GNUC__
-# define ZERO 0
-#else
-# define ZERO 1
-#endif
-
-/* A set of settings bound to a message domain.  Used to store settings
-   from bindtextdomain() and bind_textdomain_codeset().  */
-struct binding
-{
-  struct binding *next;
-  char *dirname;
-  int codeset_cntr;    /* Incremented each time codeset changes.  */
-  char *codeset;
-  char domainname[ZERO];
-};
-
-/* A counter which is incremented each time some previous translations
-   become invalid.
-   This variable is part of the external ABI of the GNU libintl.  */
-extern int _nl_msg_cat_cntr;
-
-#ifndef _LIBC
-const char *_nl_locale_name PARAMS ((int category, const char *categoryname));
-#endif
-
-struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
-                                                char *__locale,
-                                                const char *__domainname,
-                                             struct binding *__domainbinding))
-     internal_function;
-void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain,
-                             struct binding *__domainbinding))
-     internal_function;
-void _nl_unload_domain PARAMS ((struct loaded_domain *__domain))
-     internal_function;
-const char *_nl_init_domain_conv PARAMS ((struct loaded_l10nfile *__domain_file,
-                                         struct loaded_domain *__domain,
-                                         struct binding *__domainbinding))
-     internal_function;
-void _nl_free_domain_conv PARAMS ((struct loaded_domain *__domain))
-     internal_function;
-
-char *_nl_find_msg PARAMS ((struct loaded_l10nfile *domain_file,
-                           struct binding *domainbinding,
-                           const char *msgid, size_t *lengthp))
-     internal_function;
-
-#ifdef _LIBC
-extern char *__gettext PARAMS ((const char *__msgid));
-extern char *__dgettext PARAMS ((const char *__domainname,
-                                const char *__msgid));
-extern char *__dcgettext PARAMS ((const char *__domainname,
-                                 const char *__msgid, int __category));
-extern char *__ngettext PARAMS ((const char *__msgid1, const char *__msgid2,
-                                unsigned long int __n));
-extern char *__dngettext PARAMS ((const char *__domainname,
-                                 const char *__msgid1, const char *__msgid2,
-                                 unsigned long int n));
-extern char *__dcngettext PARAMS ((const char *__domainname,
-                                  const char *__msgid1, const char *__msgid2,
-                                  unsigned long int __n, int __category));
-extern char *__dcigettext PARAMS ((const char *__domainname,
-                                  const char *__msgid1, const char *__msgid2,
-                                  int __plural, unsigned long int __n,
-                                  int __category));
-extern char *__textdomain PARAMS ((const char *__domainname));
-extern char *__bindtextdomain PARAMS ((const char *__domainname,
-                                      const char *__dirname));
-extern char *__bind_textdomain_codeset PARAMS ((const char *__domainname,
-                                               const char *__codeset));
-#else
-extern char *libintl_gettext PARAMS ((const char *__msgid));
-extern char *libintl_dgettext PARAMS ((const char *__domainname,
-                                      const char *__msgid));
-extern char *libintl_dcgettext PARAMS ((const char *__domainname,
-                                       const char *__msgid, int __category));
-extern char *libintl_ngettext PARAMS ((const char *__msgid1,
-                                      const char *__msgid2,
-                                      unsigned long int __n));
-extern char *libintl_dngettext PARAMS ((const char *__domainname,
-                                       const char *__msgid1,
-                                       const char *__msgid2,
-                                       unsigned long int __n));
-extern char *libintl_dcngettext PARAMS ((const char *__domainname,
-                                        const char *__msgid1,
-                                        const char *__msgid2,
-                                        unsigned long int __n,
-                                        int __category));
-extern char *libintl_dcigettext PARAMS ((const char *__domainname,
-                                        const char *__msgid1,
-                                        const char *__msgid2,
-                                        int __plural, unsigned long int __n,
-                                        int __category));
-extern char *libintl_textdomain PARAMS ((const char *__domainname));
-extern char *libintl_bindtextdomain PARAMS ((const char *__domainname,
-                                            const char *__dirname));
-extern char *libintl_bind_textdomain_codeset PARAMS ((const char *__domainname,
-                                                     const char *__codeset));
-#endif
-
-/* @@ begin of epilog @@ */
-
-#endif /* gettextP.h  */
diff --git a/linphone/intl/hash-string.h b/linphone/intl/hash-string.h
deleted file mode 100644 (file)
index b267a87..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Description of GNU message catalog format: string hashing function.
-   Copyright (C) 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
-
-   This program 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, 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-   USA.  */
-
-/* @@ end of prolog @@ */
-
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#  define PARAMS(Args) Args
-# else
-#  define PARAMS(Args) ()
-# endif
-#endif
-
-/* We assume to have `unsigned long int' value with at least 32 bits.  */
-#define HASHWORDBITS 32
-
-
-/* Defines the so called `hashpjw' function by P.J. Weinberger
-   [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
-   1986, 1987 Bell Telephone Laboratories, Inc.]  */
-static unsigned long int hash_string PARAMS ((const char *__str_param));
-
-static inline unsigned long int
-hash_string (str_param)
-     const char *str_param;
-{
-  unsigned long int hval, g;
-  const char *str = str_param;
-
-  /* Compute the hash value for the given string.  */
-  hval = 0;
-  while (*str != '\0')
-    {
-      hval <<= 4;
-      hval += (unsigned long int) *str++;
-      g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
-      if (g != 0)
-       {
-         hval ^= g >> (HASHWORDBITS - 8);
-         hval ^= g;
-       }
-    }
-  return hval;
-}
diff --git a/linphone/intl/intl-compat.c b/linphone/intl/intl-compat.c
deleted file mode 100644 (file)
index da89015..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/* intl-compat.c - Stub functions to call gettext functions from GNU gettext
-   Library.
-   Copyright (C) 1995, 2000-2002 Software Foundation, Inc.
-
-   This program 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, 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-   USA.  */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#define _INTL_REDIRECT_MACROS
-#include "libgnuintl.h"
-#include "gettextP.h"
-
-/* @@ end of prolog @@ */
-
-/* This file redirects the gettext functions (without prefix) to those
-   defined in the included GNU libintl library (with "libintl_" prefix).
-   It is compiled into libintl in order to make the AM_GNU_GETTEXT test
-   of gettext <= 0.11.2 work with the libintl library >= 0.11.3 which
-   has the redirections primarily in the <libintl.h> include file.  */
-
-
-#undef gettext
-#undef dgettext
-#undef dcgettext
-#undef ngettext
-#undef dngettext
-#undef dcngettext
-#undef textdomain
-#undef bindtextdomain
-#undef bind_textdomain_codeset
-
-
-char *
-gettext (msgid)
-     const char *msgid;
-{
-  return libintl_gettext (msgid);
-}
-
-
-char *
-dgettext (domainname, msgid)
-     const char *domainname;
-     const char *msgid;
-{
-  return libintl_dgettext (domainname, msgid);
-}
-
-
-char *
-dcgettext (domainname, msgid, category)
-     const char *domainname;
-     const char *msgid;
-     int category;
-{
-  return libintl_dcgettext (domainname, msgid, category);
-}
-
-
-char *
-ngettext (msgid1, msgid2, n)
-     const char *msgid1;
-     const char *msgid2;
-     unsigned long int n;
-{
-  return libintl_ngettext (msgid1, msgid2, n);
-}
-
-
-char *
-dngettext (domainname, msgid1, msgid2, n)
-     const char *domainname;
-     const char *msgid1;
-     const char *msgid2;
-     unsigned long int n;
-{
-  return libintl_dngettext (domainname, msgid1, msgid2, n);
-}
-
-
-char *
-dcngettext (domainname, msgid1, msgid2, n, category)
-     const char *domainname;
-     const char *msgid1;
-     const char *msgid2;
-     unsigned long int n;
-     int category;
-{
-  return libintl_dcngettext (domainname, msgid1, msgid2, n, category);
-}
-
-
-char *
-textdomain (domainname)
-     const char *domainname;
-{
-  return libintl_textdomain (domainname);
-}
-
-
-char *
-bindtextdomain (domainname, dirname)
-     const char *domainname;
-     const char *dirname;
-{
-  return libintl_bindtextdomain (domainname, dirname);
-}
-
-
-char *
-bind_textdomain_codeset (domainname, codeset)
-     const char *domainname;
-     const char *codeset;
-{
-  return libintl_bind_textdomain_codeset (domainname, codeset);
-}
diff --git a/linphone/intl/l10nflist.c b/linphone/intl/l10nflist.c
deleted file mode 100644 (file)
index ec8713f..0000000
+++ /dev/null
@@ -1,453 +0,0 @@
-/* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-
-   This program 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, 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-   USA.  */
-
-/* Tell glibc's <string.h> to provide a prototype for stpcpy().
-   This must come before <config.h> because <config.h> may include
-   <features.h>, and once <features.h> has been included, it's too late.  */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE   1
-#endif
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <string.h>
-
-#if defined _LIBC || defined HAVE_ARGZ_H
-# include <argz.h>
-#endif
-#include <ctype.h>
-#include <sys/types.h>
-#include <stdlib.h>
-
-#include "loadinfo.h"
-
-/* On some strange systems still no definition of NULL is found.  Sigh!  */
-#ifndef NULL
-# if defined __STDC__ && __STDC__
-#  define NULL ((void *) 0)
-# else
-#  define NULL 0
-# endif
-#endif
-
-/* @@ end of prolog @@ */
-
-#ifdef _LIBC
-/* Rename the non ANSI C functions.  This is required by the standard
-   because some ANSI C functions will require linking with this object
-   file and the name space must not be polluted.  */
-# ifndef stpcpy
-#  define stpcpy(dest, src) __stpcpy(dest, src)
-# endif
-#else
-# ifndef HAVE_STPCPY
-static char *stpcpy PARAMS ((char *dest, const char *src));
-# endif
-#endif
-
-/* Pathname support.
-   ISSLASH(C)           tests whether C is a directory separator character.
-   IS_ABSOLUTE_PATH(P)  tests whether P is an absolute path.  If it is not,
-                        it may be concatenated to a directory pathname.
- */
-#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
-  /* Win32, OS/2, DOS */
-# define ISSLASH(C) ((C) == '/' || (C) == '\\')
-# define HAS_DEVICE(P) \
-    ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
-     && (P)[1] == ':')
-# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
-#else
-  /* Unix */
-# define ISSLASH(C) ((C) == '/')
-# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
-#endif
-
-/* Define function which are usually not available.  */
-
-#if !defined _LIBC && !defined HAVE___ARGZ_COUNT
-/* Returns the number of strings in ARGZ.  */
-static size_t argz_count__ PARAMS ((const char *argz, size_t len));
-
-static size_t
-argz_count__ (argz, len)
-     const char *argz;
-     size_t len;
-{
-  size_t count = 0;
-  while (len > 0)
-    {
-      size_t part_len = strlen (argz);
-      argz += part_len + 1;
-      len -= part_len + 1;
-      count++;
-    }
-  return count;
-}
-# undef __argz_count
-# define __argz_count(argz, len) argz_count__ (argz, len)
-#else
-# ifdef _LIBC
-#  define __argz_count(argz, len) INTUSE(__argz_count) (argz, len)
-# endif
-#endif /* !_LIBC && !HAVE___ARGZ_COUNT */
-
-#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY
-/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
-   except the last into the character SEP.  */
-static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep));
-
-static void
-argz_stringify__ (argz, len, sep)
-     char *argz;
-     size_t len;
-     int sep;
-{
-  while (len > 0)
-    {
-      size_t part_len = strlen (argz);
-      argz += part_len;
-      len -= part_len + 1;
-      if (len > 0)
-       *argz++ = sep;
-    }
-}
-# undef __argz_stringify
-# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
-#else
-# ifdef _LIBC
-#  define __argz_stringify(argz, len, sep) \
-  INTUSE(__argz_stringify) (argz, len, sep)
-# endif
-#endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */
-
-#if !defined _LIBC && !defined HAVE___ARGZ_NEXT
-static char *argz_next__ PARAMS ((char *argz, size_t argz_len,
-                                 const char *entry));
-
-static char *
-argz_next__ (argz, argz_len, entry)
-     char *argz;
-     size_t argz_len;
-     const char *entry;
-{
-  if (entry)
-    {
-      if (entry < argz + argz_len)
-        entry = strchr (entry, '\0') + 1;
-
-      return entry >= argz + argz_len ? NULL : (char *) entry;
-    }
-  else
-    if (argz_len > 0)
-      return argz;
-    else
-      return 0;
-}
-# undef __argz_next
-# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry)
-#endif /* !_LIBC && !HAVE___ARGZ_NEXT */
-
-
-/* Return number of bits set in X.  */
-static int pop PARAMS ((int x));
-
-static inline int
-pop (x)
-     int x;
-{
-  /* We assume that no more than 16 bits are used.  */
-  x = ((x & ~0x5555) >> 1) + (x & 0x5555);
-  x = ((x & ~0x3333) >> 2) + (x & 0x3333);
-  x = ((x >> 4) + x) & 0x0f0f;
-  x = ((x >> 8) + x) & 0xff;
-
-  return x;
-}
-
-\f
-struct loaded_l10nfile *
-_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
-                   territory, codeset, normalized_codeset, modifier, special,
-                   sponsor, revision, filename, do_allocate)
-     struct loaded_l10nfile **l10nfile_list;
-     const char *dirlist;
-     size_t dirlist_len;
-     int mask;
-     const char *language;
-     const char *territory;
-     const char *codeset;
-     const char *normalized_codeset;
-     const char *modifier;
-     const char *special;
-     const char *sponsor;
-     const char *revision;
-     const char *filename;
-     int do_allocate;
-{
-  char *abs_filename;
-  struct loaded_l10nfile **lastp;
-  struct loaded_l10nfile *retval;
-  char *cp;
-  size_t dirlist_count;
-  size_t entries;
-  int cnt;
-
-  /* If LANGUAGE contains an absolute directory specification, we ignore
-     DIRLIST.  */
-  if (IS_ABSOLUTE_PATH (language))
-    dirlist_len = 0;
-
-  /* Allocate room for the full file name.  */
-  abs_filename = (char *) malloc (dirlist_len
-                                 + strlen (language)
-                                 + ((mask & TERRITORY) != 0
-                                    ? strlen (territory) + 1 : 0)
-                                 + ((mask & XPG_CODESET) != 0
-                                    ? strlen (codeset) + 1 : 0)
-                                 + ((mask & XPG_NORM_CODESET) != 0
-                                    ? strlen (normalized_codeset) + 1 : 0)
-                                 + (((mask & XPG_MODIFIER) != 0
-                                     || (mask & CEN_AUDIENCE) != 0)
-                                    ? strlen (modifier) + 1 : 0)
-                                 + ((mask & CEN_SPECIAL) != 0
-                                    ? strlen (special) + 1 : 0)
-                                 + (((mask & CEN_SPONSOR) != 0
-                                     || (mask & CEN_REVISION) != 0)
-                                    ? (1 + ((mask & CEN_SPONSOR) != 0
-                                            ? strlen (sponsor) : 0)
-                                       + ((mask & CEN_REVISION) != 0
-                                          ? strlen (revision) + 1 : 0)) : 0)
-                                 + 1 + strlen (filename) + 1);
-
-  if (abs_filename == NULL)
-    return NULL;
-
-  /* Construct file name.  */
-  cp = abs_filename;
-  if (dirlist_len > 0)
-    {
-      memcpy (cp, dirlist, dirlist_len);
-      __argz_stringify (cp, dirlist_len, PATH_SEPARATOR);
-      cp += dirlist_len;
-      cp[-1] = '/';
-    }
-
-  cp = stpcpy (cp, language);
-
-  if ((mask & TERRITORY) != 0)
-    {
-      *cp++ = '_';
-      cp = stpcpy (cp, territory);
-    }
-  if ((mask & XPG_CODESET) != 0)
-    {
-      *cp++ = '.';
-      cp = stpcpy (cp, codeset);
-    }
-  if ((mask & XPG_NORM_CODESET) != 0)
-    {
-      *cp++ = '.';
-      cp = stpcpy (cp, normalized_codeset);
-    }
-  if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0)
-    {
-      /* This component can be part of both syntaces but has different
-        leading characters.  For CEN we use `+', else `@'.  */
-      *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@';
-      cp = stpcpy (cp, modifier);
-    }
-  if ((mask & CEN_SPECIAL) != 0)
-    {
-      *cp++ = '+';
-      cp = stpcpy (cp, special);
-    }
-  if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0)
-    {
-      *cp++ = ',';
-      if ((mask & CEN_SPONSOR) != 0)
-       cp = stpcpy (cp, sponsor);
-      if ((mask & CEN_REVISION) != 0)
-       {
-         *cp++ = '_';
-         cp = stpcpy (cp, revision);
-       }
-    }
-
-  *cp++ = '/';
-  stpcpy (cp, filename);
-
-  /* Look in list of already loaded domains whether it is already
-     available.  */
-  lastp = l10nfile_list;
-  for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
-    if (retval->filename != NULL)
-      {
-       int compare = strcmp (retval->filename, abs_filename);
-       if (compare == 0)
-         /* We found it!  */
-         break;
-       if (compare < 0)
-         {
-           /* It's not in the list.  */
-           retval = NULL;
-           break;
-         }
-
-       lastp = &retval->next;
-      }
-
-  if (retval != NULL || do_allocate == 0)
-    {
-      free (abs_filename);
-      return retval;
-    }
-
-  dirlist_count = (dirlist_len > 0 ? __argz_count (dirlist, dirlist_len) : 1);
-
-  /* Allocate a new loaded_l10nfile.  */
-  retval =
-    (struct loaded_l10nfile *)
-    malloc (sizeof (*retval)
-           + (((dirlist_count << pop (mask)) + (dirlist_count > 1 ? 1 : 0))
-              * sizeof (struct loaded_l10nfile *)));
-  if (retval == NULL)
-    return NULL;
-
-  retval->filename = abs_filename;
-
-  /* We set retval->data to NULL here; it is filled in later.
-     Setting retval->decided to 1 here means that retval does not
-     correspond to a real file (dirlist_count > 1) or is not worth
-     looking up (if an unnormalized codeset was specified).  */
-  retval->decided = (dirlist_count > 1
-                    || ((mask & XPG_CODESET) != 0
-                        && (mask & XPG_NORM_CODESET) != 0));
-  retval->data = NULL;
-
-  retval->next = *lastp;
-  *lastp = retval;
-
-  entries = 0;
-  /* Recurse to fill the inheritance list of RETVAL.
-     If the DIRLIST is a real list (i.e. DIRLIST_COUNT > 1), the RETVAL
-     entry does not correspond to a real file; retval->filename contains
-     colons.  In this case we loop across all elements of DIRLIST and
-     across all bit patterns dominated by MASK.
-     If the DIRLIST is a single directory or entirely redundant (i.e.
-     DIRLIST_COUNT == 1), we loop across all bit patterns dominated by
-     MASK, excluding MASK itself.
-     In either case, we loop down from MASK to 0.  This has the effect
-     that the extra bits in the locale name are dropped in this order:
-     first the modifier, then the territory, then the codeset, then the
-     normalized_codeset.  */
-  for (cnt = dirlist_count > 1 ? mask : mask - 1; cnt >= 0; --cnt)
-    if ((cnt & ~mask) == 0
-       && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
-       && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
-      {
-       if (dirlist_count > 1)
-         {
-           /* Iterate over all elements of the DIRLIST.  */
-           char *dir = NULL;
-
-           while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
-                  != NULL)
-             retval->successor[entries++]
-               = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1,
-                                     cnt, language, territory, codeset,
-                                     normalized_codeset, modifier, special,
-                                     sponsor, revision, filename, 1);
-         }
-       else
-         retval->successor[entries++]
-           = _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len,
-                                 cnt, language, territory, codeset,
-                                 normalized_codeset, modifier, special,
-                                 sponsor, revision, filename, 1);
-      }
-  retval->successor[entries] = NULL;
-
-  return retval;
-}
-\f
-/* Normalize codeset name.  There is no standard for the codeset
-   names.  Normalization allows the user to use any of the common
-   names.  The return value is dynamically allocated and has to be
-   freed by the caller.  */
-const char *
-_nl_normalize_codeset (codeset, name_len)
-     const char *codeset;
-     size_t name_len;
-{
-  int len = 0;
-  int only_digit = 1;
-  char *retval;
-  char *wp;
-  size_t cnt;
-
-  for (cnt = 0; cnt < name_len; ++cnt)
-    if (isalnum ((unsigned char) codeset[cnt]))
-      {
-       ++len;
-
-       if (isalpha ((unsigned char) codeset[cnt]))
-         only_digit = 0;
-      }
-
-  retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1);
-
-  if (retval != NULL)
-    {
-      if (only_digit)
-       wp = stpcpy (retval, "iso");
-      else
-       wp = retval;
-
-      for (cnt = 0; cnt < name_len; ++cnt)
-       if (isalpha ((unsigned char) codeset[cnt]))
-         *wp++ = tolower ((unsigned char) codeset[cnt]);
-       else if (isdigit ((unsigned char) codeset[cnt]))
-         *wp++ = codeset[cnt];
-
-      *wp = '\0';
-    }
-
-  return (const char *) retval;
-}
-
-
-/* @@ begin of epilog @@ */
-
-/* We don't want libintl.a to depend on any other library.  So we
-   avoid the non-standard function stpcpy.  In GNU C Library this
-   function is available, though.  Also allow the symbol HAVE_STPCPY
-   to be defined.  */
-#if !_LIBC && !HAVE_STPCPY
-static char *
-stpcpy (dest, src)
-     char *dest;
-     const char *src;
-{
-  while ((*dest++ = *src++) != '\0')
-    /* Do nothing. */ ;
-  return dest - 1;
-}
-#endif
diff --git a/linphone/intl/libgettext.h b/linphone/intl/libgettext.h
deleted file mode 100644 (file)
index c5be54a..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Convenience header for conditional use of GNU <libintl.h>.
-   Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
-
-   This program 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, 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-   USA.  */
-
-#ifndef _LIBGETTEXT_H
-#define _LIBGETTEXT_H 1
-
-/* NLS can be disabled through the configure --disable-nls option.  */
-#if ENABLE_NLS
-
-/* Get declarations of GNU message catalog functions.  */
-# include <libintl.h>
-
-#else
-
-# define gettext(Msgid) (Msgid)
-# define dgettext(Domainname, Msgid) (Msgid)
-# define dcgettext(Domainname, Msgid, Category) (Msgid)
-# define ngettext(Msgid1, Msgid2, N) \
-    ((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
-# define dngettext(Domainname, Msgid1, Msgid2, N) \
-    ((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
-# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
-    ((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
-# define textdomain(Domainname) ((char *) (Domainname))
-# define bindtextdomain(Domainname, Dirname) ((char *) (Dirname))
-# define bind_textdomain_codeset(Domainname, Codeset) ((char *) (Codeset))
-
-#endif
-
-/* For automatical extraction of messages sometimes no real
-   translation is needed.  Instead the string itself is the result.  */
-#define gettext_noop(Str) (Str)
-
-#endif /* _LIBGETTEXT_H */
diff --git a/linphone/intl/linux-msg.sed b/linphone/intl/linux-msg.sed
deleted file mode 100644 (file)
index 5918e72..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-# po2msg.sed - Convert Uniforum style .po file to Linux style .msg file
-# Copyright (C) 1995 Free Software Foundation, Inc.
-# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-#
-# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-#
-# The first directive in the .msg should be the definition of the
-# message set number.  We use always set number 1.
-#
-1 {
-  i\
-$set 1 # Automatically created by po2msg.sed
-  h
-  s/.*/0/
-  x
-}
-#
-# Mitch's old catalog format does not allow comments.
-#
-# We copy the original message as a comment into the .msg file.
-#
-/^msgid/ {
-  s/msgid[     ]*"//
-#
-# This does not work now with the new format.
-# /"$/! {
-#   s/\\$//
-#   s/$/ ... (more lines following)"/
-# }
-  x
-# The following nice solution is by
-# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
-  td
-# Increment a decimal number in pattern space.
-# First hide trailing `9' digits.
-  :d
-  s/9\(_*\)$/_\1/
-  td
-# Assure at least one digit is available.
-  s/^\(_*\)$/0\1/
-# Increment the last digit.
-  s/8\(_*\)$/9\1/
-  s/7\(_*\)$/8\1/
-  s/6\(_*\)$/7\1/
-  s/5\(_*\)$/6\1/
-  s/4\(_*\)$/5\1/
-  s/3\(_*\)$/4\1/
-  s/2\(_*\)$/3\1/
-  s/1\(_*\)$/2\1/
-  s/0\(_*\)$/1\1/
-# Convert the hidden `9' digits to `0's.
-  s/_/0/g
-  x
-  G
-  s/\(.*\)"\n\([0-9]*\)/$ #\2 Original Message:(\1)/p
-}
-#
-# The .msg file contains, other then the .po file, only the translations
-# but each given a unique ID.  Starting from 1 and incrementing by 1 for
-# each message we assign them to the messages.
-# It is important that the .po file used to generate the cat-id-tbl.c file
-# (with po-to-tbl) is the same as the one used here.  (At least the order
-# of declarations must not be changed.)
-#
-/^msgstr/ {
-  s/msgstr[    ]*"\(.*\)"/# \1/
-# Clear substitution flag.
-  tb
-# Append the next line.
-  :b
-  N
-# Look whether second part is continuation line.
-  s/\(.*\n\)"\(.*\)"/\1\2/
-# Yes, then branch.
-  ta
-  P
-  D
-# Note that D includes a jump to the start!!
-# We found a continuation line.  But before printing insert '\'.
-  :a
-  s/\(.*\)\(\n.*\)/\1\\\2/
-  P
-# We cannot use D here.
-  s/.*\n\(.*\)/\1/
-  tb
-}
-d
diff --git a/linphone/intl/loadinfo.h b/linphone/intl/loadinfo.h
deleted file mode 100644 (file)
index 1d3ba61..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-/* Copyright (C) 1996-1999, 2000-2002 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
-
-   This program 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, 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-   USA.  */
-
-#ifndef _LOADINFO_H
-#define _LOADINFO_H    1
-
-/* Declarations of locale dependent catalog lookup functions.
-   Implemented in
-
-     localealias.c    Possibly replace a locale name by another.
-     explodename.c    Split a locale name into its various fields.
-     l10nflist.c      Generate a list of filenames of possible message catalogs.
-     finddomain.c     Find and open the relevant message catalogs.
-
-   The main function _nl_find_domain() in finddomain.c is declared
-   in gettextP.h.
- */
-
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#  define PARAMS(args) args
-# else
-#  define PARAMS(args) ()
-# endif
-#endif
-
-#ifndef internal_function
-# define internal_function
-#endif
-
-/* Tell the compiler when a conditional or integer expression is
-   almost always true or almost always false.  */
-#ifndef HAVE_BUILTIN_EXPECT
-# define __builtin_expect(expr, val) (expr)
-#endif
-
-/* Separator in PATH like lists of pathnames.  */
-#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
-  /* Win32, OS/2, DOS */
-# define PATH_SEPARATOR ';'
-#else
-  /* Unix */
-# define PATH_SEPARATOR ':'
-#endif
-
-/* Encoding of locale name parts.  */
-#define CEN_REVISION           1
-#define CEN_SPONSOR            2
-#define CEN_SPECIAL            4
-#define XPG_NORM_CODESET       8
-#define XPG_CODESET            16
-#define TERRITORY              32
-#define CEN_AUDIENCE           64
-#define XPG_MODIFIER           128
-
-#define CEN_SPECIFIC   (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
-#define XPG_SPECIFIC   (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER)
-
-
-struct loaded_l10nfile
-{
-  const char *filename;
-  int decided;
-
-  const void *data;
-
-  struct loaded_l10nfile *next;
-  struct loaded_l10nfile *successor[1];
-};
-
-
-/* Normalize codeset name.  There is no standard for the codeset
-   names.  Normalization allows the user to use any of the common
-   names.  The return value is dynamically allocated and has to be
-   freed by the caller.  */
-extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
-                                                 size_t name_len));
-
-/* Lookup a locale dependent file.
-   *L10NFILE_LIST denotes a pool of lookup results of locale dependent
-   files of the same kind, sorted in decreasing order of ->filename.
-   DIRLIST and DIRLIST_LEN are an argz list of directories in which to
-   look, containing at least one directory (i.e. DIRLIST_LEN > 0).
-   MASK, LANGUAGE, TERRITORY, CODESET, NORMALIZED_CODESET, MODIFIER,
-   SPECIAL, SPONSOR, REVISION are the pieces of the locale name, as
-   produced by _nl_explode_name().  FILENAME is the filename suffix.
-   The return value is the lookup result, either found in *L10NFILE_LIST,
-   or - if DO_ALLOCATE is nonzero - freshly allocated, or possibly NULL.
-   If the return value is non-NULL, it is added to *L10NFILE_LIST, and
-   its ->next field denotes the chaining inside *L10NFILE_LIST, and
-   furthermore its ->successor[] field contains a list of other lookup
-   results from which this lookup result inherits.  */
-extern struct loaded_l10nfile *
-_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
-                           const char *dirlist, size_t dirlist_len, int mask,
-                           const char *language, const char *territory,
-                           const char *codeset,
-                           const char *normalized_codeset,
-                           const char *modifier, const char *special,
-                           const char *sponsor, const char *revision,
-                           const char *filename, int do_allocate));
-
-/* Lookup the real locale name for a locale alias NAME, or NULL if
-   NAME is not a locale alias (but possibly a real locale name).
-   The return value is statically allocated and must not be freed.  */
-extern const char *_nl_expand_alias PARAMS ((const char *name));
-
-/* Split a locale name NAME into its pieces: language, modifier,
-   territory, codeset, special, sponsor, revision.
-   NAME gets destructively modified: NUL bytes are inserted here and
-   there.  *LANGUAGE gets assigned NAME.  Each of *MODIFIER, *TERRITORY,
-   *CODESET, *SPECIAL, *SPONSOR, *REVISION gets assigned either a
-   pointer into the old NAME string, or NULL.  *NORMALIZED_CODESET
-   gets assigned the expanded *CODESET, if it is different from *CODESET;
-   this one is dynamically allocated and has to be freed by the caller.
-   The return value is a bitmask, where each bit corresponds to one
-   filled-in value:
-     XPG_MODIFIER, CEN_AUDIENCE  for *MODIFIER,
-     TERRITORY                   for *TERRITORY,
-     XPG_CODESET                 for *CODESET,
-     XPG_NORM_CODESET            for *NORMALIZED_CODESET,
-     CEN_SPECIAL                 for *SPECIAL,
-     CEN_SPONSOR                 for *SPONSOR,
-     CEN_REVISION                for *REVISION.
- */
-extern int _nl_explode_name PARAMS ((char *name, const char **language,
-                                    const char **modifier,
-                                    const char **territory,
-                                    const char **codeset,
-                                    const char **normalized_codeset,
-                                    const char **special,
-                                    const char **sponsor,
-                                    const char **revision));
-
-/* Split a locale name NAME into a leading language part and all the
-   rest.  Return a pointer to the first character after the language,
-   i.e. to the first byte of the rest.  */
-extern char *_nl_find_language PARAMS ((const char *name));
-
-#endif /* loadinfo.h */
diff --git a/linphone/intl/loadmsgcat.c b/linphone/intl/loadmsgcat.c
deleted file mode 100644 (file)
index 516f521..0000000
+++ /dev/null
@@ -1,1316 +0,0 @@
-/* Load needed message catalogs.
-   Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc.
-
-   This program 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, 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-   USA.  */
-
-/* Tell glibc's <string.h> to provide a prototype for mempcpy().
-   This must come before <config.h> because <config.h> may include
-   <features.h>, and once <features.h> has been included, it's too late.  */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE    1
-#endif
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <ctype.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-# define HAVE_ALLOCA 1
-#else
-# if defined HAVE_ALLOCA_H || defined _LIBC
-#  include <alloca.h>
-# else
-#  ifdef _AIX
- #pragma alloca
-#  else
-#   ifndef alloca
-char *alloca ();
-#   endif
-#  endif
-# endif
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-
-#if defined HAVE_UNISTD_H || defined _LIBC
-# include <unistd.h>
-#endif
-
-#ifdef _LIBC
-# include <langinfo.h>
-# include <locale.h>
-#endif
-
-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
-    || (defined _LIBC && defined _POSIX_MAPPED_FILES)
-# include <sys/mman.h>
-# undef HAVE_MMAP
-# define HAVE_MMAP     1
-#else
-# undef HAVE_MMAP
-#endif
-
-#if defined HAVE_STDINT_H_WITH_UINTMAX || defined _LIBC
-# include <stdint.h>
-#endif
-#if defined HAVE_INTTYPES_H || defined _LIBC
-# include <inttypes.h>
-#endif
-
-#include "gmo.h"
-#include "gettextP.h"
-#include "hash-string.h"
-#include "plural-exp.h"
-
-#ifdef _LIBC
-# include "../locale/localeinfo.h"
-#endif
-
-/* Provide fallback values for macros that ought to be defined in <inttypes.h>.
-   Note that our fallback values need not be literal strings, because we don't
-   use them with preprocessor string concatenation.  */
-#if !defined PRId8 || PRI_MACROS_BROKEN
-# undef PRId8
-# define PRId8 "d"
-#endif
-#if !defined PRIi8 || PRI_MACROS_BROKEN
-# undef PRIi8
-# define PRIi8 "i"
-#endif
-#if !defined PRIo8 || PRI_MACROS_BROKEN
-# undef PRIo8
-# define PRIo8 "o"
-#endif
-#if !defined PRIu8 || PRI_MACROS_BROKEN
-# undef PRIu8
-# define PRIu8 "u"
-#endif
-#if !defined PRIx8 || PRI_MACROS_BROKEN
-# undef PRIx8
-# define PRIx8 "x"
-#endif
-#if !defined PRIX8 || PRI_MACROS_BROKEN
-# undef PRIX8
-# define PRIX8 "X"
-#endif
-#if !defined PRId16 || PRI_MACROS_BROKEN
-# undef PRId16
-# define PRId16 "d"
-#endif
-#if !defined PRIi16 || PRI_MACROS_BROKEN
-# undef PRIi16
-# define PRIi16 "i"
-#endif
-#if !defined PRIo16 || PRI_MACROS_BROKEN
-# undef PRIo16
-# define PRIo16 "o"
-#endif
-#if !defined PRIu16 || PRI_MACROS_BROKEN
-# undef PRIu16
-# define PRIu16 "u"
-#endif
-#if !defined PRIx16 || PRI_MACROS_BROKEN
-# undef PRIx16
-# define PRIx16 "x"
-#endif
-#if !defined PRIX16 || PRI_MACROS_BROKEN
-# undef PRIX16
-# define PRIX16 "X"
-#endif
-#if !defined PRId32 || PRI_MACROS_BROKEN
-# undef PRId32
-# define PRId32 "d"
-#endif
-#if !defined PRIi32 || PRI_MACROS_BROKEN
-# undef PRIi32
-# define PRIi32 "i"
-#endif
-#if !defined PRIo32 || PRI_MACROS_BROKEN
-# undef PRIo32
-# define PRIo32 "o"
-#endif
-#if !defined PRIu32 || PRI_MACROS_BROKEN
-# undef PRIu32
-# define PRIu32 "u"
-#endif
-#if !defined PRIx32 || PRI_MACROS_BROKEN
-# undef PRIx32
-# define PRIx32 "x"
-#endif
-#if !defined PRIX32 || PRI_MACROS_BROKEN
-# undef PRIX32
-# define PRIX32 "X"
-#endif
-#if !defined PRId64 || PRI_MACROS_BROKEN
-# undef PRId64
-# define PRId64 (sizeof (long) == 8 ? "ld" : "lld")
-#endif
-#if !defined PRIi64 || PRI_MACROS_BROKEN
-# undef PRIi64
-# define PRIi64 (sizeof (long) == 8 ? "li" : "lli")
-#endif
-#if !defined PRIo64 || PRI_MACROS_BROKEN
-# undef PRIo64
-# define PRIo64 (sizeof (long) == 8 ? "lo" : "llo")
-#endif
-#if !defined PRIu64 || PRI_MACROS_BROKEN
-# undef PRIu64
-# define PRIu64 (sizeof (long) == 8 ? "lu" : "llu")
-#endif
-#if !defined PRIx64 || PRI_MACROS_BROKEN
-# undef PRIx64
-# define PRIx64 (sizeof (long) == 8 ? "lx" : "llx")
-#endif
-#if !defined PRIX64 || PRI_MACROS_BROKEN
-# undef PRIX64
-# define PRIX64 (sizeof (long) == 8 ? "lX" : "llX")
-#endif
-#if !defined PRIdLEAST8 || PRI_MACROS_BROKEN
-# undef PRIdLEAST8
-# define PRIdLEAST8 "d"
-#endif
-#if !defined PRIiLEAST8 || PRI_MACROS_BROKEN
-# undef PRIiLEAST8
-# define PRIiLEAST8 "i"
-#endif
-#if !defined PRIoLEAST8 || PRI_MACROS_BROKEN
-# undef PRIoLEAST8
-# define PRIoLEAST8 "o"
-#endif
-#if !defined PRIuLEAST8 || PRI_MACROS_BROKEN
-# undef PRIuLEAST8
-# define PRIuLEAST8 "u"
-#endif
-#if !defined PRIxLEAST8 || PRI_MACROS_BROKEN
-# undef PRIxLEAST8
-# define PRIxLEAST8 "x"
-#endif
-#if !defined PRIXLEAST8 || PRI_MACROS_BROKEN
-# undef PRIXLEAST8
-# define PRIXLEAST8 "X"
-#endif
-#if !defined PRIdLEAST16 || PRI_MACROS_BROKEN
-# undef PRIdLEAST16
-# define PRIdLEAST16 "d"
-#endif
-#if !defined PRIiLEAST16 || PRI_MACROS_BROKEN
-# undef PRIiLEAST16
-# define PRIiLEAST16 "i"
-#endif
-#if !defined PRIoLEAST16 || PRI_MACROS_BROKEN
-# undef PRIoLEAST16
-# define PRIoLEAST16 "o"
-#endif
-#if !defined PRIuLEAST16 || PRI_MACROS_BROKEN
-# undef PRIuLEAST16
-# define PRIuLEAST16 "u"
-#endif
-#if !defined PRIxLEAST16 || PRI_MACROS_BROKEN
-# undef PRIxLEAST16
-# define PRIxLEAST16 "x"
-#endif
-#if !defined PRIXLEAST16 || PRI_MACROS_BROKEN
-# undef PRIXLEAST16
-# define PRIXLEAST16 "X"
-#endif
-#if !defined PRIdLEAST32 || PRI_MACROS_BROKEN
-# undef PRIdLEAST32
-# define PRIdLEAST32 "d"
-#endif
-#if !defined PRIiLEAST32 || PRI_MACROS_BROKEN
-# undef PRIiLEAST32
-# define PRIiLEAST32 "i"
-#endif
-#if !defined PRIoLEAST32 || PRI_MACROS_BROKEN
-# undef PRIoLEAST32
-# define PRIoLEAST32 "o"
-#endif
-#if !defined PRIuLEAST32 || PRI_MACROS_BROKEN
-# undef PRIuLEAST32
-# define PRIuLEAST32 "u"
-#endif
-#if !defined PRIxLEAST32 || PRI_MACROS_BROKEN
-# undef PRIxLEAST32
-# define PRIxLEAST32 "x"
-#endif
-#if !defined PRIXLEAST32 || PRI_MACROS_BROKEN
-# undef PRIXLEAST32
-# define PRIXLEAST32 "X"
-#endif
-#if !defined PRIdLEAST64 || PRI_MACROS_BROKEN
-# undef PRIdLEAST64
-# define PRIdLEAST64 PRId64
-#endif
-#if !defined PRIiLEAST64 || PRI_MACROS_BROKEN
-# undef PRIiLEAST64
-# define PRIiLEAST64 PRIi64
-#endif
-#if !defined PRIoLEAST64 || PRI_MACROS_BROKEN
-# undef PRIoLEAST64
-# define PRIoLEAST64 PRIo64
-#endif
-#if !defined PRIuLEAST64 || PRI_MACROS_BROKEN
-# undef PRIuLEAST64
-# define PRIuLEAST64 PRIu64
-#endif
-#if !defined PRIxLEAST64 || PRI_MACROS_BROKEN
-# undef PRIxLEAST64
-# define PRIxLEAST64 PRIx64
-#endif
-#if !defined PRIXLEAST64 || PRI_MACROS_BROKEN
-# undef PRIXLEAST64
-# define PRIXLEAST64 PRIX64
-#endif
-#if !defined PRIdFAST8 || PRI_MACROS_BROKEN
-# undef PRIdFAST8
-# define PRIdFAST8 "d"
-#endif
-#if !defined PRIiFAST8 || PRI_MACROS_BROKEN
-# undef PRIiFAST8
-# define PRIiFAST8 "i"
-#endif
-#if !defined PRIoFAST8 || PRI_MACROS_BROKEN
-# undef PRIoFAST8
-# define PRIoFAST8 "o"
-#endif
-#if !defined PRIuFAST8 || PRI_MACROS_BROKEN
-# undef PRIuFAST8
-# define PRIuFAST8 "u"
-#endif
-#if !defined PRIxFAST8 || PRI_MACROS_BROKEN
-# undef PRIxFAST8
-# define PRIxFAST8 "x"
-#endif
-#if !defined PRIXFAST8 || PRI_MACROS_BROKEN
-# undef PRIXFAST8
-# define PRIXFAST8 "X"
-#endif
-#if !defined PRIdFAST16 || PRI_MACROS_BROKEN
-# undef PRIdFAST16
-# define PRIdFAST16 "d"
-#endif
-#if !defined PRIiFAST16 || PRI_MACROS_BROKEN
-# undef PRIiFAST16
-# define PRIiFAST16 "i"
-#endif
-#if !defined PRIoFAST16 || PRI_MACROS_BROKEN
-# undef PRIoFAST16
-# define PRIoFAST16 "o"
-#endif
-#if !defined PRIuFAST16 || PRI_MACROS_BROKEN
-# undef PRIuFAST16
-# define PRIuFAST16 "u"
-#endif
-#if !defined PRIxFAST16 || PRI_MACROS_BROKEN
-# undef PRIxFAST16
-# define PRIxFAST16 "x"
-#endif
-#if !defined PRIXFAST16 || PRI_MACROS_BROKEN
-# undef PRIXFAST16
-# define PRIXFAST16 "X"
-#endif
-#if !defined PRIdFAST32 || PRI_MACROS_BROKEN
-# undef PRIdFAST32
-# define PRIdFAST32 "d"
-#endif
-#if !defined PRIiFAST32 || PRI_MACROS_BROKEN
-# undef PRIiFAST32
-# define PRIiFAST32 "i"
-#endif
-#if !defined PRIoFAST32 || PRI_MACROS_BROKEN
-# undef PRIoFAST32
-# define PRIoFAST32 "o"
-#endif
-#if !defined PRIuFAST32 || PRI_MACROS_BROKEN
-# undef PRIuFAST32
-# define PRIuFAST32 "u"
-#endif
-#if !defined PRIxFAST32 || PRI_MACROS_BROKEN
-# undef PRIxFAST32
-# define PRIxFAST32 "x"
-#endif
-#if !defined PRIXFAST32 || PRI_MACROS_BROKEN
-# undef PRIXFAST32
-# define PRIXFAST32 "X"
-#endif
-#if !defined PRIdFAST64 || PRI_MACROS_BROKEN
-# undef PRIdFAST64
-# define PRIdFAST64 PRId64
-#endif
-#if !defined PRIiFAST64 || PRI_MACROS_BROKEN
-# undef PRIiFAST64
-# define PRIiFAST64 PRIi64
-#endif
-#if !defined PRIoFAST64 || PRI_MACROS_BROKEN
-# undef PRIoFAST64
-# define PRIoFAST64 PRIo64
-#endif
-#if !defined PRIuFAST64 || PRI_MACROS_BROKEN
-# undef PRIuFAST64
-# define PRIuFAST64 PRIu64
-#endif
-#if !defined PRIxFAST64 || PRI_MACROS_BROKEN
-# undef PRIxFAST64
-# define PRIxFAST64 PRIx64
-#endif
-#if !defined PRIXFAST64 || PRI_MACROS_BROKEN
-# undef PRIXFAST64
-# define PRIXFAST64 PRIX64
-#endif
-#if !defined PRIdMAX || PRI_MACROS_BROKEN
-# undef PRIdMAX
-# define PRIdMAX (sizeof (uintmax_t) == sizeof (long) ? "ld" : "lld")
-#endif
-#if !defined PRIiMAX || PRI_MACROS_BROKEN
-# undef PRIiMAX
-# define PRIiMAX (sizeof (uintmax_t) == sizeof (long) ? "li" : "lli")
-#endif
-#if !defined PRIoMAX || PRI_MACROS_BROKEN
-# undef PRIoMAX
-# define PRIoMAX (sizeof (uintmax_t) == sizeof (long) ? "lo" : "llo")
-#endif
-#if !defined PRIuMAX || PRI_MACROS_BROKEN
-# undef PRIuMAX
-# define PRIuMAX (sizeof (uintmax_t) == sizeof (long) ? "lu" : "llu")
-#endif
-#if !defined PRIxMAX || PRI_MACROS_BROKEN
-# undef PRIxMAX
-# define PRIxMAX (sizeof (uintmax_t) == sizeof (long) ? "lx" : "llx")
-#endif
-#if !defined PRIXMAX || PRI_MACROS_BROKEN
-# undef PRIXMAX
-# define PRIXMAX (sizeof (uintmax_t) == sizeof (long) ? "lX" : "llX")
-#endif
-#if !defined PRIdPTR || PRI_MACROS_BROKEN
-# undef PRIdPTR
-# define PRIdPTR \
-  (sizeof (void *) == sizeof (long) ? "ld" : \
-   sizeof (void *) == sizeof (int) ? "d" : \
-   "lld")
-#endif
-#if !defined PRIiPTR || PRI_MACROS_BROKEN
-# undef PRIiPTR
-# define PRIiPTR \
-  (sizeof (void *) == sizeof (long) ? "li" : \
-   sizeof (void *) == sizeof (int) ? "i" : \
-   "lli")
-#endif
-#if !defined PRIoPTR || PRI_MACROS_BROKEN
-# undef PRIoPTR
-# define PRIoPTR \
-  (sizeof (void *) == sizeof (long) ? "lo" : \
-   sizeof (void *) == sizeof (int) ? "o" : \
-   "llo")
-#endif
-#if !defined PRIuPTR || PRI_MACROS_BROKEN
-# undef PRIuPTR
-# define PRIuPTR \
-  (sizeof (void *) == sizeof (long) ? "lu" : \
-   sizeof (void *) == sizeof (int) ? "u" : \
-   "llu")
-#endif
-#if !defined PRIxPTR || PRI_MACROS_BROKEN
-# undef PRIxPTR
-# define PRIxPTR \
-  (sizeof (void *) == sizeof (long) ? "lx" : \
-   sizeof (void *) == sizeof (int) ? "x" : \
-   "llx")
-#endif
-#if !defined PRIXPTR || PRI_MACROS_BROKEN
-# undef PRIXPTR
-# define PRIXPTR \
-  (sizeof (void *) == sizeof (long) ? "lX" : \
-   sizeof (void *) == sizeof (int) ? "X" : \
-   "llX")
-#endif
-
-/* @@ end of prolog @@ */
-
-#ifdef _LIBC
-/* Rename the non ISO C functions.  This is required by the standard
-   because some ISO C functions will require linking with this object
-   file and the name space must not be polluted.  */
-# define open   __open
-# define close  __close
-# define read   __read
-# define mmap   __mmap
-# define munmap __munmap
-#endif
-
-/* For those losing systems which don't have `alloca' we have to add
-   some additional code emulating it.  */
-#ifdef HAVE_ALLOCA
-# define freea(p) /* nothing */
-#else
-# define alloca(n) malloc (n)
-# define freea(p) free (p)
-#endif
-
-/* For systems that distinguish between text and binary I/O.
-   O_BINARY is usually declared in <fcntl.h>. */
-#if !defined O_BINARY && defined _O_BINARY
-  /* For MSC-compatible compilers.  */
-# define O_BINARY _O_BINARY
-# define O_TEXT _O_TEXT
-#endif
-#ifdef __BEOS__
-  /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect.  */
-# undef O_BINARY
-# undef O_TEXT
-#endif
-/* On reasonable systems, binary I/O is the default.  */
-#ifndef O_BINARY
-# define O_BINARY 0
-#endif
-
-
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static const char *get_sysdep_segment_value PARAMS ((const char *name));
-
-
-/* We need a sign, whether a new catalog was loaded, which can be associated
-   with all translations.  This is important if the translations are
-   cached by one of GCC's features.  */
-int _nl_msg_cat_cntr;
-
-
-/* Expand a system dependent string segment.  Return NULL if unsupported.  */
-static const char *
-get_sysdep_segment_value (name)
-     const char *name;
-{
-  /* Test for an ISO C 99 section 7.8.1 format string directive.
-     Syntax:
-     P R I { d | i | o | u | x | X }
-     { { | LEAST | FAST } { 8 | 16 | 32 | 64 } | MAX | PTR }  */
-  /* We don't use a table of 14 times 6 'const char *' strings here, because
-     data relocations cost startup time.  */
-  if (name[0] == 'P' && name[1] == 'R' && name[2] == 'I')
-    {
-      if (name[3] == 'd' || name[3] == 'i' || name[3] == 'o' || name[3] == 'u'
-         || name[3] == 'x' || name[3] == 'X')
-       {
-         if (name[4] == '8' && name[5] == '\0')
-           {
-             if (name[3] == 'd')
-               return PRId8;
-             if (name[3] == 'i')
-               return PRIi8;
-             if (name[3] == 'o')
-               return PRIo8;
-             if (name[3] == 'u')
-               return PRIu8;
-             if (name[3] == 'x')
-               return PRIx8;
-             if (name[3] == 'X')
-               return PRIX8;
-             abort ();
-           }
-         if (name[4] == '1' && name[5] == '6' && name[6] == '\0')
-           {
-             if (name[3] == 'd')
-               return PRId16;
-             if (name[3] == 'i')
-               return PRIi16;
-             if (name[3] == 'o')
-               return PRIo16;
-             if (name[3] == 'u')
-               return PRIu16;
-             if (name[3] == 'x')
-               return PRIx16;
-             if (name[3] == 'X')
-               return PRIX16;
-             abort ();
-           }
-         if (name[4] == '3' && name[5] == '2' && name[6] == '\0')
-           {
-             if (name[3] == 'd')
-               return PRId32;
-             if (name[3] == 'i')
-               return PRIi32;
-             if (name[3] == 'o')
-               return PRIo32;
-             if (name[3] == 'u')
-               return PRIu32;
-             if (name[3] == 'x')
-               return PRIx32;
-             if (name[3] == 'X')
-               return PRIX32;
-             abort ();
-           }
-         if (name[4] == '6' && name[5] == '4' && name[6] == '\0')
-           {
-             if (name[3] == 'd')
-               return PRId64;
-             if (name[3] == 'i')
-               return PRIi64;
-             if (name[3] == 'o')
-               return PRIo64;
-             if (name[3] == 'u')
-               return PRIu64;
-             if (name[3] == 'x')
-               return PRIx64;
-             if (name[3] == 'X')
-               return PRIX64;
-             abort ();
-           }
-         if (name[4] == 'L' && name[5] == 'E' && name[6] == 'A'
-             && name[7] == 'S' && name[8] == 'T')
-           {
-             if (name[9] == '8' && name[10] == '\0')
-               {
-                 if (name[3] == 'd')
-                   return PRIdLEAST8;
-                 if (name[3] == 'i')
-                   return PRIiLEAST8;
-                 if (name[3] == 'o')
-                   return PRIoLEAST8;
-                 if (name[3] == 'u')
-                   return PRIuLEAST8;
-                 if (name[3] == 'x')
-                   return PRIxLEAST8;
-                 if (name[3] == 'X')
-                   return PRIXLEAST8;
-                 abort ();
-               }
-             if (name[9] == '1' && name[10] == '6' && name[11] == '\0')
-               {
-                 if (name[3] == 'd')
-                   return PRIdLEAST16;
-                 if (name[3] == 'i')
-                   return PRIiLEAST16;
-                 if (name[3] == 'o')
-                   return PRIoLEAST16;
-                 if (name[3] == 'u')
-                   return PRIuLEAST16;
-                 if (name[3] == 'x')
-                   return PRIxLEAST16;
-                 if (name[3] == 'X')
-                   return PRIXLEAST16;
-                 abort ();
-               }
-             if (name[9] == '3' && name[10] == '2' && name[11] == '\0')
-               {
-                 if (name[3] == 'd')
-                   return PRIdLEAST32;
-                 if (name[3] == 'i')
-                   return PRIiLEAST32;
-                 if (name[3] == 'o')
-                   return PRIoLEAST32;
-                 if (name[3] == 'u')
-                   return PRIuLEAST32;
-                 if (name[3] == 'x')
-                   return PRIxLEAST32;
-                 if (name[3] == 'X')
-                   return PRIXLEAST32;
-                 abort ();
-               }
-             if (name[9] == '6' && name[10] == '4' && name[11] == '\0')
-               {
-                 if (name[3] == 'd')
-                   return PRIdLEAST64;
-                 if (name[3] == 'i')
-                   return PRIiLEAST64;
-                 if (name[3] == 'o')
-                   return PRIoLEAST64;
-                 if (name[3] == 'u')
-                   return PRIuLEAST64;
-                 if (name[3] == 'x')
-                   return PRIxLEAST64;
-                 if (name[3] == 'X')
-                   return PRIXLEAST64;
-                 abort ();
-               }
-           }
-         if (name[4] == 'F' && name[5] == 'A' && name[6] == 'S'
-             && name[7] == 'T')
-           {
-             if (name[8] == '8' && name[9] == '\0')
-               {
-                 if (name[3] == 'd')
-                   return PRIdFAST8;
-                 if (name[3] == 'i')
-                   return PRIiFAST8;
-                 if (name[3] == 'o')
-                   return PRIoFAST8;
-                 if (name[3] == 'u')
-                   return PRIuFAST8;
-                 if (name[3] == 'x')
-                   return PRIxFAST8;
-                 if (name[3] == 'X')
-                   return PRIXFAST8;
-                 abort ();
-               }
-             if (name[8] == '1' && name[9] == '6' && name[10] == '\0')
-               {
-                 if (name[3] == 'd')
-                   return PRIdFAST16;
-                 if (name[3] == 'i')
-                   return PRIiFAST16;
-                 if (name[3] == 'o')
-                   return PRIoFAST16;
-                 if (name[3] == 'u')
-                   return PRIuFAST16;
-                 if (name[3] == 'x')
-                   return PRIxFAST16;
-                 if (name[3] == 'X')
-                   return PRIXFAST16;
-                 abort ();
-               }
-             if (name[8] == '3' && name[9] == '2' && name[10] == '\0')
-               {
-                 if (name[3] == 'd')
-                   return PRIdFAST32;
-                 if (name[3] == 'i')
-                   return PRIiFAST32;
-                 if (name[3] == 'o')
-                   return PRIoFAST32;
-                 if (name[3] == 'u')
-                   return PRIuFAST32;
-                 if (name[3] == 'x')
-                   return PRIxFAST32;
-                 if (name[3] == 'X')
-                   return PRIXFAST32;
-                 abort ();
-               }
-             if (name[8] == '6' && name[9] == '4' && name[10] == '\0')
-               {
-                 if (name[3] == 'd')
-                   return PRIdFAST64;
-                 if (name[3] == 'i')
-                   return PRIiFAST64;
-                 if (name[3] == 'o')
-                   return PRIoFAST64;
-                 if (name[3] == 'u')
-                   return PRIuFAST64;
-                 if (name[3] == 'x')
-                   return PRIxFAST64;
-                 if (name[3] == 'X')
-                   return PRIXFAST64;
-                 abort ();
-               }
-           }
-         if (name[4] == 'M' && name[5] == 'A' && name[6] == 'X'
-             && name[7] == '\0')
-           {
-             if (name[3] == 'd')
-               return PRIdMAX;
-             if (name[3] == 'i')
-               return PRIiMAX;
-             if (name[3] == 'o')
-               return PRIoMAX;
-             if (name[3] == 'u')
-               return PRIuMAX;
-             if (name[3] == 'x')
-               return PRIxMAX;
-             if (name[3] == 'X')
-               return PRIXMAX;
-             abort ();
-           }
-         if (name[4] == 'P' && name[5] == 'T' && name[6] == 'R'
-             && name[7] == '\0')
-           {
-             if (name[3] == 'd')
-               return PRIdPTR;
-             if (name[3] == 'i')
-               return PRIiPTR;
-             if (name[3] == 'o')
-               return PRIoPTR;
-             if (name[3] == 'u')
-               return PRIuPTR;
-             if (name[3] == 'x')
-               return PRIxPTR;
-             if (name[3] == 'X')
-               return PRIXPTR;
-             abort ();
-           }
-       }
-    }
-  /* Other system dependent strings are not valid.  */
-  return NULL;
-}
-
-/* Initialize the codeset dependent parts of an opened message catalog.
-   Return the header entry.  */
-const char *
-internal_function
-_nl_init_domain_conv (domain_file, domain, domainbinding)
-     struct loaded_l10nfile *domain_file;
-     struct loaded_domain *domain;
-     struct binding *domainbinding;
-{
-  /* Find out about the character set the file is encoded with.
-     This can be found (in textual form) in the entry "".  If this
-     entry does not exist or if this does not contain the `charset='
-     information, we will assume the charset matches the one the
-     current locale and we don't have to perform any conversion.  */
-  char *nullentry;
-  size_t nullentrylen;
-
-  /* Preinitialize fields, to avoid recursion during _nl_find_msg.  */
-  domain->codeset_cntr =
-    (domainbinding != NULL ? domainbinding->codeset_cntr : 0);
-#ifdef _LIBC
-  domain->conv = (__gconv_t) -1;
-#else
-# if HAVE_ICONV
-  domain->conv = (iconv_t) -1;
-# endif
-#endif
-  domain->conv_tab = NULL;
-
-  /* Get the header entry.  */
-  nullentry = _nl_find_msg (domain_file, domainbinding, "", &nullentrylen);
-
-  if (nullentry != NULL)
-    {
-#if defined _LIBC || HAVE_ICONV
-      const char *charsetstr;
-
-      charsetstr = strstr (nullentry, "charset=");
-      if (charsetstr != NULL)
-       {
-         size_t len;
-         char *charset;
-         const char *outcharset;
-
-         charsetstr += strlen ("charset=");
-         len = strcspn (charsetstr, " \t\n");
-
-         charset = (char *) alloca (len + 1);
-# if defined _LIBC || HAVE_MEMPCPY
-         *((char *) mempcpy (charset, charsetstr, len)) = '\0';
-# else
-         memcpy (charset, charsetstr, len);
-         charset[len] = '\0';
-# endif
-
-         /* The output charset should normally be determined by the
-            locale.  But sometimes the locale is not used or not correctly
-            set up, so we provide a possibility for the user to override
-            this.  Moreover, the value specified through
-            bind_textdomain_codeset overrides both.  */
-         if (domainbinding != NULL && domainbinding->codeset != NULL)
-           outcharset = domainbinding->codeset;
-         else
-           {
-             outcharset = getenv ("OUTPUT_CHARSET");
-             if (outcharset == NULL || outcharset[0] == '\0')
-               {
-# ifdef _LIBC
-                 outcharset = (*_nl_current[LC_CTYPE])->values[_NL_ITEM_INDEX (CODESET)].string;
-# else
-#  if HAVE_ICONV
-                 extern const char *locale_charset PARAMS ((void));
-                 outcharset = locale_charset ();
-#  endif
-# endif
-               }
-           }
-
-# ifdef _LIBC
-         /* We always want to use transliteration.  */
-         outcharset = norm_add_slashes (outcharset, "TRANSLIT");
-         charset = norm_add_slashes (charset, NULL);
-         if (__gconv_open (outcharset, charset, &domain->conv,
-                           GCONV_AVOID_NOCONV)
-             != __GCONV_OK)
-           domain->conv = (__gconv_t) -1;
-# else
-#  if HAVE_ICONV
-         /* When using GNU libc >= 2.2 or GNU libiconv >= 1.5,
-            we want to use transliteration.  */
-#   if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \
-       || _LIBICONV_VERSION >= 0x0105
-         if (strchr (outcharset, '/') == NULL)
-           {
-             char *tmp;
-
-             len = strlen (outcharset);
-             tmp = (char *) alloca (len + 10 + 1);
-             memcpy (tmp, outcharset, len);
-             memcpy (tmp + len, "//TRANSLIT", 10 + 1);
-             outcharset = tmp;
-
-             domain->conv = iconv_open (outcharset, charset);
-
-             freea (outcharset);
-           }
-         else
-#   endif
-           domain->conv = iconv_open (outcharset, charset);
-#  endif
-# endif
-
-         freea (charset);
-       }
-#endif /* _LIBC || HAVE_ICONV */
-    }
-
-  return nullentry;
-}
-
-/* Frees the codeset dependent parts of an opened message catalog.  */
-void
-internal_function
-_nl_free_domain_conv (domain)
-     struct loaded_domain *domain;
-{
-  if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1)
-    free (domain->conv_tab);
-
-#ifdef _LIBC
-  if (domain->conv != (__gconv_t) -1)
-    __gconv_close (domain->conv);
-#else
-# if HAVE_ICONV
-  if (domain->conv != (iconv_t) -1)
-    iconv_close (domain->conv);
-# endif
-#endif
-}
-
-/* Load the message catalogs specified by FILENAME.  If it is no valid
-   message catalog do nothing.  */
-void
-internal_function
-_nl_load_domain (domain_file, domainbinding)
-     struct loaded_l10nfile *domain_file;
-     struct binding *domainbinding;
-{
-  int fd;
-  size_t size;
-#ifdef _LIBC
-  struct stat64 st;
-#else
-  struct stat st;
-#endif
-  struct mo_file_header *data = (struct mo_file_header *) -1;
-  int use_mmap = 0;
-  struct loaded_domain *domain;
-  int revision;
-  const char *nullentry;
-
-  domain_file->decided = 1;
-  domain_file->data = NULL;
-
-  /* Note that it would be useless to store domainbinding in domain_file
-     because domainbinding might be == NULL now but != NULL later (after
-     a call to bind_textdomain_codeset).  */
-
-  /* If the record does not represent a valid locale the FILENAME
-     might be NULL.  This can happen when according to the given
-     specification the locale file name is different for XPG and CEN
-     syntax.  */
-  if (domain_file->filename == NULL)
-    return;
-
-  /* Try to open the addressed file.  */
-  fd = open (domain_file->filename, O_RDONLY | O_BINARY);
-  if (fd == -1)
-    return;
-
-  /* We must know about the size of the file.  */
-  if (
-#ifdef _LIBC
-      __builtin_expect (fstat64 (fd, &st) != 0, 0)
-#else
-      __builtin_expect (fstat (fd, &st) != 0, 0)
-#endif
-      || __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0)
-      || __builtin_expect (size < sizeof (struct mo_file_header), 0))
-    {
-      /* Something went wrong.  */
-      close (fd);
-      return;
-    }
-
-#ifdef HAVE_MMAP
-  /* Now we are ready to load the file.  If mmap() is available we try
-     this first.  If not available or it failed we try to load it.  */
-  data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
-                                        MAP_PRIVATE, fd, 0);
-
-  if (__builtin_expect (data != (struct mo_file_header *) -1, 1))
-    {
-      /* mmap() call was successful.  */
-      close (fd);
-      use_mmap = 1;
-    }
-#endif
-
-  /* If the data is not yet available (i.e. mmap'ed) we try to load
-     it manually.  */
-  if (data == (struct mo_file_header *) -1)
-    {
-      size_t to_read;
-      char *read_ptr;
-
-      data = (struct mo_file_header *) malloc (size);
-      if (data == NULL)
-       return;
-
-      to_read = size;
-      read_ptr = (char *) data;
-      do
-       {
-         long int nb = (long int) read (fd, read_ptr, to_read);
-         if (nb <= 0)
-           {
-#ifdef EINTR
-             if (nb == -1 && errno == EINTR)
-               continue;
-#endif
-             close (fd);
-             return;
-           }
-         read_ptr += nb;
-         to_read -= nb;
-       }
-      while (to_read > 0);
-
-      close (fd);
-    }
-
-  /* Using the magic number we can test whether it really is a message
-     catalog file.  */
-  if (__builtin_expect (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED,
-                       0))
-    {
-      /* The magic number is wrong: not a message catalog file.  */
-#ifdef HAVE_MMAP
-      if (use_mmap)
-       munmap ((caddr_t) data, size);
-      else
-#endif
-       free (data);
-      return;
-    }
-
-  domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
-  if (domain == NULL)
-    return;
-  domain_file->data = domain;
-
-  domain->data = (char *) data;
-  domain->use_mmap = use_mmap;
-  domain->mmap_size = size;
-  domain->must_swap = data->magic != _MAGIC;
-  domain->malloced = NULL;
-
-  /* Fill in the information about the available tables.  */
-  revision = W (domain->must_swap, data->revision);
-  /* We support only the major revision 0.  */
-  switch (revision >> 16)
-    {
-    case 0:
-      domain->nstrings = W (domain->must_swap, data->nstrings);
-      domain->orig_tab = (const struct string_desc *)
-       ((char *) data + W (domain->must_swap, data->orig_tab_offset));
-      domain->trans_tab = (const struct string_desc *)
-       ((char *) data + W (domain->must_swap, data->trans_tab_offset));
-      domain->hash_size = W (domain->must_swap, data->hash_tab_size);
-      domain->hash_tab =
-       (domain->hash_size > 2
-        ? (const nls_uint32 *)
-          ((char *) data + W (domain->must_swap, data->hash_tab_offset))
-        : NULL);
-      domain->must_swap_hash_tab = domain->must_swap;
-
-      /* Now dispatch on the minor revision.  */
-      switch (revision & 0xffff)
-       {
-       case 0:
-         domain->n_sysdep_strings = 0;
-         domain->orig_sysdep_tab = NULL;
-         domain->trans_sysdep_tab = NULL;
-         break;
-       case 1:
-       default:
-         {
-           nls_uint32 n_sysdep_strings;
-
-           if (domain->hash_tab == NULL)
-             /* This is invalid.  These minor revisions need a hash table.  */
-             goto invalid;
-
-           n_sysdep_strings =
-             W (domain->must_swap, data->n_sysdep_strings);
-           if (n_sysdep_strings > 0)
-             {
-               nls_uint32 n_sysdep_segments;
-               const struct sysdep_segment *sysdep_segments;
-               const char **sysdep_segment_values;
-               const nls_uint32 *orig_sysdep_tab;
-               const nls_uint32 *trans_sysdep_tab;
-               size_t memneed;
-               char *mem;
-               struct sysdep_string_desc *inmem_orig_sysdep_tab;
-               struct sysdep_string_desc *inmem_trans_sysdep_tab;
-               nls_uint32 *inmem_hash_tab;
-               unsigned int i;
-
-               /* Get the values of the system dependent segments.  */
-               n_sysdep_segments =
-                 W (domain->must_swap, data->n_sysdep_segments);
-               sysdep_segments = (const struct sysdep_segment *)
-                 ((char *) data
-                  + W (domain->must_swap, data->sysdep_segments_offset));
-               sysdep_segment_values =
-                 alloca (n_sysdep_segments * sizeof (const char *));
-               for (i = 0; i < n_sysdep_segments; i++)
-                 {
-                   const char *name =
-                     (char *) data
-                     + W (domain->must_swap, sysdep_segments[i].offset);
-                   nls_uint32 namelen =
-                     W (domain->must_swap, sysdep_segments[i].length);
-
-                   if (!(namelen > 0 && name[namelen - 1] == '\0'))
-                     {
-                       freea (sysdep_segment_values);
-                       goto invalid;
-                     }
-
-                   sysdep_segment_values[i] = get_sysdep_segment_value (name);
-                 }
-
-               orig_sysdep_tab = (const nls_uint32 *)
-                 ((char *) data
-                  + W (domain->must_swap, data->orig_sysdep_tab_offset));
-               trans_sysdep_tab = (const nls_uint32 *)
-                 ((char *) data
-                  + W (domain->must_swap, data->trans_sysdep_tab_offset));
-
-               /* Compute the amount of additional memory needed for the
-                  system dependent strings and the augmented hash table.  */
-               memneed = 2 * n_sysdep_strings
-                         * sizeof (struct sysdep_string_desc)
-                         + domain->hash_size * sizeof (nls_uint32);
-               for (i = 0; i < 2 * n_sysdep_strings; i++)
-                 {
-                   const struct sysdep_string *sysdep_string =
-                     (const struct sysdep_string *)
-                     ((char *) data
-                      + W (domain->must_swap,
-                           i < n_sysdep_strings
-                           ? orig_sysdep_tab[i]
-                           : trans_sysdep_tab[i - n_sysdep_strings]));
-                   size_t need = 0;
-                   const struct segment_pair *p = sysdep_string->segments;
-
-                   if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END)
-                     for (p = sysdep_string->segments;; p++)
-                       {
-                         nls_uint32 sysdepref;
-
-                         need += W (domain->must_swap, p->segsize);
-
-                         sysdepref = W (domain->must_swap, p->sysdepref);
-                         if (sysdepref == SEGMENTS_END)
-                           break;
-
-                         if (sysdepref >= n_sysdep_segments)
-                           {
-                             /* Invalid.  */
-                             freea (sysdep_segment_values);
-                             goto invalid;
-                           }
-
-                         need += strlen (sysdep_segment_values[sysdepref]);
-                       }
-
-                   memneed += need;
-                 }
-
-               /* Allocate additional memory.  */
-               mem = (char *) malloc (memneed);
-               if (mem == NULL)
-                 goto invalid;
-
-               domain->malloced = mem;
-               inmem_orig_sysdep_tab = (struct sysdep_string_desc *) mem;
-               mem += n_sysdep_strings * sizeof (struct sysdep_string_desc);
-               inmem_trans_sysdep_tab = (struct sysdep_string_desc *) mem;
-               mem += n_sysdep_strings * sizeof (struct sysdep_string_desc);
-               inmem_hash_tab = (nls_uint32 *) mem;
-               mem += domain->hash_size * sizeof (nls_uint32);
-
-               /* Compute the system dependent strings.  */
-               for (i = 0; i < 2 * n_sysdep_strings; i++)
-                 {
-                   const struct sysdep_string *sysdep_string =
-                     (const struct sysdep_string *)
-                     ((char *) data
-                      + W (domain->must_swap,
-                           i < n_sysdep_strings
-                           ? orig_sysdep_tab[i]
-                           : trans_sysdep_tab[i - n_sysdep_strings]));
-                   const char *static_segments =
-                     (char *) data
-                     + W (domain->must_swap, sysdep_string->offset);
-                   const struct segment_pair *p = sysdep_string->segments;
-
-                   /* Concatenate the segments, and fill
-                      inmem_orig_sysdep_tab[i] (for i < n_sysdep_strings) and
-                      inmem_trans_sysdep_tab[i-n_sysdep_strings] (for
-                      i >= n_sysdep_strings).  */
-
-                   if (W (domain->must_swap, p->sysdepref) == SEGMENTS_END)
-                     {
-                       /* Only one static segment.  */
-                       inmem_orig_sysdep_tab[i].length =
-                         W (domain->must_swap, p->segsize);
-                       inmem_orig_sysdep_tab[i].pointer = static_segments;
-                     }
-                   else
-                     {
-                       inmem_orig_sysdep_tab[i].pointer = mem;
-
-                       for (p = sysdep_string->segments;; p++)
-                         {
-                           nls_uint32 segsize =
-                             W (domain->must_swap, p->segsize);
-                           nls_uint32 sysdepref =
-                             W (domain->must_swap, p->sysdepref);
-                           size_t n;
-
-                           if (segsize > 0)
-                             {
-                               memcpy (mem, static_segments, segsize);
-                               mem += segsize;
-                               static_segments += segsize;
-                             }
-
-                           if (sysdepref == SEGMENTS_END)
-                             break;
-
-                           n = strlen (sysdep_segment_values[sysdepref]);
-                           memcpy (mem, sysdep_segment_values[sysdepref], n);
-                           mem += n;
-                         }
-
-                       inmem_orig_sysdep_tab[i].length =
-                         mem - inmem_orig_sysdep_tab[i].pointer;
-                     }
-                 }
-
-               /* Compute the augmented hash table.  */
-               for (i = 0; i < domain->hash_size; i++)
-                 inmem_hash_tab[i] =
-                   W (domain->must_swap_hash_tab, domain->hash_tab[i]);
-               for (i = 0; i < n_sysdep_strings; i++)
-                 {
-                   const char *msgid = inmem_orig_sysdep_tab[i].pointer;
-                   nls_uint32 hash_val = hash_string (msgid);
-                   nls_uint32 idx = hash_val % domain->hash_size;
-                   nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
-
-                   for (;;)
-                     {
-                       if (inmem_hash_tab[idx] == 0)
-                         {
-                           /* Hash table entry is empty.  Use it.  */
-                           inmem_hash_tab[idx] = 1 + domain->nstrings + i;
-                           break;
-                         }
-
-                       if (idx >= domain->hash_size - incr)
-                         idx -= domain->hash_size - incr;
-                       else
-                         idx += incr;
-                     }
-                 }
-
-               freea (sysdep_segment_values);
-
-               domain->n_sysdep_strings = n_sysdep_strings;
-               domain->orig_sysdep_tab = inmem_orig_sysdep_tab;
-               domain->trans_sysdep_tab = inmem_trans_sysdep_tab;
-
-               domain->hash_tab = inmem_hash_tab;
-               domain->must_swap_hash_tab = 0;
-             }
-           else
-             {
-               domain->n_sysdep_strings = 0;
-               domain->orig_sysdep_tab = NULL;
-               domain->trans_sysdep_tab = NULL;
-             }
-         }
-         break;
-       }
-      break;
-    default:
-      /* This is an invalid revision.  */
-    invalid:
-      /* This is an invalid .mo file.  */
-      if (domain->malloced)
-       free (domain->malloced);
-#ifdef HAVE_MMAP
-      if (use_mmap)
-       munmap ((caddr_t) data, size);
-      else
-#endif
-       free (data);
-      free (domain);
-      domain_file->data = NULL;
-      return;
-    }
-
-  /* Now initialize the character set converter from the character set
-     the file is encoded with (found in the header entry) to the domain's
-     specified character set or the locale's character set.  */
-  nullentry = _nl_init_domain_conv (domain_file, domain, domainbinding);
-
-  /* Also look for a plural specification.  */
-  EXTRACT_PLURAL_EXPRESSION (nullentry, &domain->plural, &domain->nplurals);
-}
-
-
-#ifdef _LIBC
-void
-internal_function
-_nl_unload_domain (domain)
-     struct loaded_domain *domain;
-{
-  if (domain->plural != &__gettext_germanic_plural)
-    __gettext_free_exp (domain->plural);
-
-  _nl_free_domain_conv (domain);
-
-  if (domain->malloced)
-    free (domain->malloced);
-
-# ifdef _POSIX_MAPPED_FILES
-  if (domain->use_mmap)
-    munmap ((caddr_t) domain->data, domain->mmap_size);
-  else
-# endif        /* _POSIX_MAPPED_FILES */
-    free ((void *) domain->data);
-
-  free (domain);
-}
-#endif
diff --git a/linphone/intl/localealias.c b/linphone/intl/localealias.c
deleted file mode 100644 (file)
index 456e41e..0000000
+++ /dev/null
@@ -1,419 +0,0 @@
-/* Handle aliases for locale names.
-   Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
-
-   This program 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, 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-   USA.  */
-
-/* Tell glibc's <string.h> to provide a prototype for mempcpy().
-   This must come before <config.h> because <config.h> may include
-   <features.h>, and once <features.h> has been included, it's too late.  */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE    1
-#endif
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <ctype.h>
-#include <stdio.h>
-#if defined _LIBC || defined HAVE___FSETLOCKING
-# include <stdio_ext.h>
-#endif
-#include <sys/types.h>
-
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-# define HAVE_ALLOCA 1
-#else
-# if defined HAVE_ALLOCA_H || defined _LIBC
-#  include <alloca.h>
-# else
-#  ifdef _AIX
- #pragma alloca
-#  else
-#   ifndef alloca
-char *alloca ();
-#   endif
-#  endif
-# endif
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "gettextP.h"
-
-/* @@ end of prolog @@ */
-
-#ifdef _LIBC
-/* Rename the non ANSI C functions.  This is required by the standard
-   because some ANSI C functions will require linking with this object
-   file and the name space must not be polluted.  */
-# define strcasecmp __strcasecmp
-
-# ifndef mempcpy
-#  define mempcpy __mempcpy
-# endif
-# define HAVE_MEMPCPY  1
-# define HAVE___FSETLOCKING    1
-
-/* We need locking here since we can be called from different places.  */
-# include <bits/libc-lock.h>
-
-__libc_lock_define_initialized (static, lock);
-#endif
-
-#ifndef internal_function
-# define internal_function
-#endif
-
-/* Some optimizations for glibc.  */
-#ifdef _LIBC
-# define FEOF(fp)              feof_unlocked (fp)
-# define FGETS(buf, n, fp)     fgets_unlocked (buf, n, fp)
-#else
-# define FEOF(fp)              feof (fp)
-# define FGETS(buf, n, fp)     fgets (buf, n, fp)
-#endif
-
-/* For those losing systems which don't have `alloca' we have to add
-   some additional code emulating it.  */
-#ifdef HAVE_ALLOCA
-# define freea(p) /* nothing */
-#else
-# define alloca(n) malloc (n)
-# define freea(p) free (p)
-#endif
-
-#if defined _LIBC_REENTRANT || defined HAVE_FGETS_UNLOCKED
-# undef fgets
-# define fgets(buf, len, s) fgets_unlocked (buf, len, s)
-#endif
-#if defined _LIBC_REENTRANT || defined HAVE_FEOF_UNLOCKED
-# undef feof
-# define feof(s) feof_unlocked (s)
-#endif
-
-
-struct alias_map
-{
-  const char *alias;
-  const char *value;
-};
-
-
-static char *string_space;
-static size_t string_space_act;
-static size_t string_space_max;
-static struct alias_map *map;
-static size_t nmap;
-static size_t maxmap;
-
-
-/* Prototypes for local functions.  */
-static size_t read_alias_file PARAMS ((const char *fname, int fname_len))
-     internal_function;
-static int extend_alias_table PARAMS ((void));
-static int alias_compare PARAMS ((const struct alias_map *map1,
-                                 const struct alias_map *map2));
-
-
-const char *
-_nl_expand_alias (name)
-    const char *name;
-{
-  static const char *locale_alias_path;
-  struct alias_map *retval;
-  const char *result = NULL;
-  size_t added;
-
-#ifdef _LIBC
-  __libc_lock_lock (lock);
-#endif
-
-  if (locale_alias_path == NULL)
-    locale_alias_path = LOCALE_ALIAS_PATH;
-
-  do
-    {
-      struct alias_map item;
-
-      item.alias = name;
-
-      if (nmap > 0)
-       retval = (struct alias_map *) bsearch (&item, map, nmap,
-                                              sizeof (struct alias_map),
-                                              (int (*) PARAMS ((const void *,
-                                                                const void *))
-                                               ) alias_compare);
-      else
-       retval = NULL;
-
-      /* We really found an alias.  Return the value.  */
-      if (retval != NULL)
-       {
-         result = retval->value;
-         break;
-       }
-
-      /* Perhaps we can find another alias file.  */
-      added = 0;
-      while (added == 0 && locale_alias_path[0] != '\0')
-       {
-         const char *start;
-
-         while (locale_alias_path[0] == PATH_SEPARATOR)
-           ++locale_alias_path;
-         start = locale_alias_path;
-
-         while (locale_alias_path[0] != '\0'
-                && locale_alias_path[0] != PATH_SEPARATOR)
-           ++locale_alias_path;
-
-         if (start < locale_alias_path)
-           added = read_alias_file (start, locale_alias_path - start);
-       }
-    }
-  while (added != 0);
-
-#ifdef _LIBC
-  __libc_lock_unlock (lock);
-#endif
-
-  return result;
-}
-
-
-static size_t
-internal_function
-read_alias_file (fname, fname_len)
-     const char *fname;
-     int fname_len;
-{
-  FILE *fp;
-  char *full_fname;
-  size_t added;
-  static const char aliasfile[] = "/locale.alias";
-
-  full_fname = (char *) alloca (fname_len + sizeof aliasfile);
-#ifdef HAVE_MEMPCPY
-  mempcpy (mempcpy (full_fname, fname, fname_len),
-          aliasfile, sizeof aliasfile);
-#else
-  memcpy (full_fname, fname, fname_len);
-  memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
-#endif
-
-  fp = fopen (full_fname, "r");
-  freea (full_fname);
-  if (fp == NULL)
-    return 0;
-
-#ifdef HAVE___FSETLOCKING
-  /* No threads present.  */
-  __fsetlocking (fp, FSETLOCKING_BYCALLER);
-#endif
-
-  added = 0;
-  while (!FEOF (fp))
-    {
-      /* It is a reasonable approach to use a fix buffer here because
-        a) we are only interested in the first two fields
-        b) these fields must be usable as file names and so must not
-           be that long
-       */
-      char buf[BUFSIZ];
-      char *alias;
-      char *value;
-      char *cp;
-
-      if (FGETS (buf, sizeof buf, fp) == NULL)
-       /* EOF reached.  */
-       break;
-
-      /* Possibly not the whole line fits into the buffer.  Ignore
-        the rest of the line.  */
-      if (strchr (buf, '\n') == NULL)
-       {
-         char altbuf[BUFSIZ];
-         do
-           if (FGETS (altbuf, sizeof altbuf, fp) == NULL)
-             /* Make sure the inner loop will be left.  The outer loop
-                will exit at the `feof' test.  */
-             break;
-         while (strchr (altbuf, '\n') == NULL);
-       }
-
-      cp = buf;
-      /* Ignore leading white space.  */
-      while (isspace ((unsigned char) cp[0]))
-       ++cp;
-
-      /* A leading '#' signals a comment line.  */
-      if (cp[0] != '\0' && cp[0] != '#')
-       {
-         alias = cp++;
-         while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
-           ++cp;
-         /* Terminate alias name.  */
-         if (cp[0] != '\0')
-           *cp++ = '\0';
-
-         /* Now look for the beginning of the value.  */
-         while (isspace ((unsigned char) cp[0]))
-           ++cp;
-
-         if (cp[0] != '\0')
-           {
-             size_t alias_len;
-             size_t value_len;
-
-             value = cp++;
-             while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
-               ++cp;
-             /* Terminate value.  */
-             if (cp[0] == '\n')
-               {
-                 /* This has to be done to make the following test
-                    for the end of line possible.  We are looking for
-                    the terminating '\n' which do not overwrite here.  */
-                 *cp++ = '\0';
-                 *cp = '\n';
-               }
-             else if (cp[0] != '\0')
-               *cp++ = '\0';
-
-             if (nmap >= maxmap)
-               if (__builtin_expect (extend_alias_table (), 0))
-                 return added;
-
-             alias_len = strlen (alias) + 1;
-             value_len = strlen (value) + 1;
-
-             if (string_space_act + alias_len + value_len > string_space_max)
-               {
-                 /* Increase size of memory pool.  */
-                 size_t new_size = (string_space_max
-                                    + (alias_len + value_len > 1024
-                                       ? alias_len + value_len : 1024));
-                 char *new_pool = (char *) realloc (string_space, new_size);
-                 if (new_pool == NULL)
-                   return added;
-
-                 if (__builtin_expect (string_space != new_pool, 0))
-                   {
-                     size_t i;
-
-                     for (i = 0; i < nmap; i++)
-                       {
-                         map[i].alias += new_pool - string_space;
-                         map[i].value += new_pool - string_space;
-                       }
-                   }
-
-                 string_space = new_pool;
-                 string_space_max = new_size;
-               }
-
-             map[nmap].alias = memcpy (&string_space[string_space_act],
-                                       alias, alias_len);
-             string_space_act += alias_len;
-
-             map[nmap].value = memcpy (&string_space[string_space_act],
-                                       value, value_len);
-             string_space_act += value_len;
-
-             ++nmap;
-             ++added;
-           }
-       }
-    }
-
-  /* Should we test for ferror()?  I think we have to silently ignore
-     errors.  --drepper  */
-  fclose (fp);
-
-  if (added > 0)
-    qsort (map, nmap, sizeof (struct alias_map),
-          (int (*) PARAMS ((const void *, const void *))) alias_compare);
-
-  return added;
-}
-
-
-static int
-extend_alias_table ()
-{
-  size_t new_size;
-  struct alias_map *new_map;
-
-  new_size = maxmap == 0 ? 100 : 2 * maxmap;
-  new_map = (struct alias_map *) realloc (map, (new_size
-                                               * sizeof (struct alias_map)));
-  if (new_map == NULL)
-    /* Simply don't extend: we don't have any more core.  */
-    return -1;
-
-  map = new_map;
-  maxmap = new_size;
-  return 0;
-}
-
-
-#ifdef _LIBC
-static void __attribute__ ((unused))
-free_mem (void)
-{
-  if (string_space != NULL)
-    free (string_space);
-  if (map != NULL)
-    free (map);
-}
-text_set_element (__libc_subfreeres, free_mem);
-#endif
-
-
-static int
-alias_compare (map1, map2)
-     const struct alias_map *map1;
-     const struct alias_map *map2;
-{
-#if defined _LIBC || defined HAVE_STRCASECMP
-  return strcasecmp (map1->alias, map2->alias);
-#else
-  const unsigned char *p1 = (const unsigned char *) map1->alias;
-  const unsigned char *p2 = (const unsigned char *) map2->alias;
-  unsigned char c1, c2;
-
-  if (p1 == p2)
-    return 0;
-
-  do
-    {
-      /* I know this seems to be odd but the tolower() function in
-        some systems libc cannot handle nonalpha characters.  */
-      c1 = isupper (*p1) ? tolower (*p1) : *p1;
-      c2 = isupper (*p2) ? tolower (*p2) : *p2;
-      if (c1 == '\0')
-       break;
-      ++p1;
-      ++p2;
-    }
-  while (c1 == c2);
-
-  return c1 - c2;
-#endif
-}
diff --git a/linphone/intl/po2tbl.sed.in b/linphone/intl/po2tbl.sed.in
deleted file mode 100644 (file)
index b3bcca4..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-# po2tbl.sed - Convert Uniforum style .po file to lookup table for catgets
-# Copyright (C) 1995 Free Software Foundation, Inc.
-# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-#
-# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-1 {
-  i\
-/* Automatically generated by po2tbl.sed from @PACKAGE NAME@.pot.  */\
-\
-#if HAVE_CONFIG_H\
-# include <config.h>\
-#endif\
-\
-#include "libgettext.h"\
-\
-const struct _msg_ent _msg_tbl[] = {
-  h
-  s/.*/0/
-  x
-}
-#
-# Write msgid entries in C array form.
-#
-/^msgid/ {
-  s/msgid[     ]*\(".*"\)/  {\1/
-  tb
-# Append the next line
-  :b
-  N
-# Look whether second part is continuation line.
-  s/\(.*\)"\(\n\)"\(.*"\)/\1\2\3/
-# Yes, then branch.
-  ta
-# Because we assume that the input file correctly formed the line
-# just read cannot be again be a msgid line.  So it's safe to ignore
-# it.
-  s/\(.*\)\n.*/\1/
-  bc
-# We found a continuation line.  But before printing insert '\'.
-  :a
-  s/\(.*\)\(\n.*\)/\1\\\2/
-  P
-# We cannot use D here.
-  s/.*\n\(.*\)/\1/
-# Some buggy seds do not clear the `successful substitution since last ``t'''
-# flag on `N', so we do a `t' here to clear it.
-  tb
-# Not reached
-  :c
-  x
-# The following nice solution is by
-# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
-  td
-# Increment a decimal number in pattern space.
-# First hide trailing `9' digits.
-  :d
-  s/9\(_*\)$/_\1/
-  td
-# Assure at least one digit is available.
-  s/^\(_*\)$/0\1/
-# Increment the last digit.
-  s/8\(_*\)$/9\1/
-  s/7\(_*\)$/8\1/
-  s/6\(_*\)$/7\1/
-  s/5\(_*\)$/6\1/
-  s/4\(_*\)$/5\1/
-  s/3\(_*\)$/4\1/
-  s/2\(_*\)$/3\1/
-  s/1\(_*\)$/2\1/
-  s/0\(_*\)$/1\1/
-# Convert the hidden `9' digits to `0's.
-  s/_/0/g
-  x
-  G
-  s/\(.*\)\n\([0-9]*\)/\1, \2},/
-  s/\(.*\)"$/\1/
-  p
-}
-#
-# Last line.
-#
-$ {
-  i\
-};\
-
-  g
-  s/0*\(.*\)/int _msg_tbl_length = \1;/p
-}
-d
diff --git a/linphone/intl/textdomain.c b/linphone/intl/textdomain.c
deleted file mode 100644 (file)
index f259c69..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-/* Implementation of the textdomain(3) function.
-   Copyright (C) 1995-1998, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-   This program 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, 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
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-   USA.  */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-#include "gettextP.h"
-
-#ifdef _LIBC
-/* We have to handle multi-threaded applications.  */
-# include <bits/libc-lock.h>
-#else
-/* Provide dummy implementation if this is outside glibc.  */
-# define __libc_rwlock_define(CLASS, NAME)
-# define __libc_rwlock_wrlock(NAME)
-# define __libc_rwlock_unlock(NAME)
-#endif
-
-/* The internal variables in the standalone libintl.a must have different
-   names than the internal variables in GNU libc, otherwise programs
-   using libintl.a cannot be linked statically.  */
-#if !defined _LIBC
-# define _nl_default_default_domain libintl_nl_default_default_domain
-# define _nl_current_default_domain libintl_nl_current_default_domain
-#endif
-
-/* @@ end of prolog @@ */
-
-/* Name of the default text domain.  */
-extern const char _nl_default_default_domain[] attribute_hidden;
-
-/* Default text domain in which entries for gettext(3) are to be found.  */
-extern const char *_nl_current_default_domain attribute_hidden;
-
-
-/* Names for the libintl functions are a problem.  They must not clash
-   with existing names and they should follow ANSI C.  But this source
-   code is also used in GNU C Library where the names have a __
-   prefix.  So we have to make a difference here.  */
-#ifdef _LIBC
-# define TEXTDOMAIN __textdomain
-# ifndef strdup
-#  define strdup(str) __strdup (str)
-# endif
-#else
-# define TEXTDOMAIN libintl_textdomain
-#endif
-
-/* Lock variable to protect the global data in the gettext implementation.  */
-__libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
-
-/* Set the current default message catalog to DOMAINNAME.
-   If DOMAINNAME is null, return the current default.
-   If DOMAINNAME is "", reset to the default of "messages".  */
-char *
-TEXTDOMAIN (domainname)
-     const char *domainname;
-{
-  char *new_domain;
-  char *old_domain;
-
-  /* A NULL pointer requests the current setting.  */
-  if (domainname == NULL)
-    return (char *) _nl_current_default_domain;
-
-  __libc_rwlock_wrlock (_nl_state_lock);
-
-  old_domain = (char *) _nl_current_default_domain;
-
-  /* If domain name is the null string set to default domain "messages".  */
-  if (domainname[0] == '\0'
-      || strcmp (domainname, _nl_default_default_domain) == 0)
-    {
-      _nl_current_default_domain = _nl_default_default_domain;
-      new_domain = (char *) _nl_current_default_domain;
-    }
-  else if (strcmp (domainname, old_domain) == 0)
-    /* This can happen and people will use it to signal that some
-       environment variable changed.  */
-    new_domain = old_domain;
-  else
-    {
-      /* If the following malloc fails `_nl_current_default_domain'
-        will be NULL.  This value will be returned and so signals we
-        are out of core.  */
-#if defined _LIBC || defined HAVE_STRDUP
-      new_domain = strdup (domainname);
-#else
-      size_t len = strlen (domainname) + 1;
-      new_domain = (char *) malloc (len);
-      if (new_domain != NULL)
-       memcpy (new_domain, domainname, len);
-#endif
-
-      if (new_domain != NULL)
-       _nl_current_default_domain = new_domain;
-    }
-
-  /* We use this possibility to signal a change of the loaded catalogs
-     since this is most likely the case and there is no other easy we
-     to do it.  Do it only when the call was successful.  */
-  if (new_domain != NULL)
-    {
-      ++_nl_msg_cat_cntr;
-
-      if (old_domain != new_domain && old_domain != _nl_default_default_domain)
-       free (old_domain);
-    }
-
-  __libc_rwlock_unlock (_nl_state_lock);
-
-  return new_domain;
-}
-
-#ifdef _LIBC
-/* Alias for function name in GNU C Library.  */
-weak_alias (__textdomain, textdomain);
-#endif
diff --git a/linphone/intl/xopen-msg.sed b/linphone/intl/xopen-msg.sed
deleted file mode 100644 (file)
index b19c0bb..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-# po2msg.sed - Convert Uniforum style .po file to X/Open style .msg file
-# Copyright (C) 1995 Free Software Foundation, Inc.
-# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-#
-# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-#
-# The first directive in the .msg should be the definition of the
-# message set number.  We use always set number 1.
-#
-1 {
-  i\
-$set 1 # Automatically created by po2msg.sed
-  h
-  s/.*/0/
-  x
-}
-#
-# We copy all comments into the .msg file.  Perhaps they can help.
-#
-/^#/ s/^#[     ]*/$ /p
-#
-# We copy the original message as a comment into the .msg file.
-#
-/^msgid/ {
-# Does not work now
-#  /"$/! {
-#    s/\\$//
-#    s/$/ ... (more lines following)"/
-#  }
-  s/^msgid[    ]*"\(.*\)"$/$ Original Message: \1/
-  p
-}
-#
-# The .msg file contains, other then the .po file, only the translations
-# but each given a unique ID.  Starting from 1 and incrementing by 1 for
-# each message we assign them to the messages.
-# It is important that the .po file used to generate the cat-id-tbl.c file
-# (with po-to-tbl) is the same as the one used here.  (At least the order
-# of declarations must not be changed.)
-#
-/^msgstr/ {
-  s/msgstr[    ]*"\(.*\)"/\1/
-  x
-# The following nice solution is by
-# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
-  td
-# Increment a decimal number in pattern space.
-# First hide trailing `9' digits.
-  :d
-  s/9\(_*\)$/_\1/
-  td
-# Assure at least one digit is available.
-  s/^\(_*\)$/0\1/
-# Increment the last digit.
-  s/8\(_*\)$/9\1/
-  s/7\(_*\)$/8\1/
-  s/6\(_*\)$/7\1/
-  s/5\(_*\)$/6\1/
-  s/4\(_*\)$/5\1/
-  s/3\(_*\)$/4\1/
-  s/2\(_*\)$/3\1/
-  s/1\(_*\)$/2\1/
-  s/0\(_*\)$/1\1/
-# Convert the hidden `9' digits to `0's.
-  s/_/0/g
-  x
-# Bring the line in the format `<number> <message>'
-  G
-  s/^[^\n]*$/& /
-  s/\(.*\)\n\([0-9]*\)/\2 \1/
-# Clear flag from last substitution.
-  tb
-# Append the next line.
-  :b
-  N
-# Look whether second part is a continuation line.
-  s/\(.*\n\)"\(.*\)"/\1\2/
-# Yes, then branch.
-  ta
-  P
-  D
-# Note that `D' includes a jump to the start!!
-# We found a continuation line.  But before printing insert '\'.
-  :a
-  s/\(.*\)\(\n.*\)/\1\\\2/
-  P
-# We cannot use the sed command `D' here
-  s/.*\n\(.*\)/\1/
-  tb
-}
-d
diff --git a/linphone/intltool-extract.in b/linphone/intltool-extract.in
deleted file mode 100644 (file)
index 256a959..0000000
+++ /dev/null
@@ -1,325 +0,0 @@
-#!@INTLTOOL_PERL@ -w 
-# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4  -*-
-
-#
-#  The Intltool Message Extractor
-#
-#  Copyright (C) 2000-2001 Free Software Foundation.
-#
-#  Intltool 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.
-#
-#  Intltool 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.
-#
-#  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.
-#
-#  Authors: Kenneth Christiansen <kenneth@gnu.org>
-#           Darin Adler <darin@bentspoon.com>
-#
-
-## Release information
-my $PROGRAM      = "intltool-extract";
-my $PACKAGE      = "intltool";
-my $VERSION      = "0.22";
-
-## Loaded modules
-use strict; 
-use File::Basename;
-use Getopt::Long;
-
-## Scalars used by the option stuff
-my $TYPE_ARG   = "0";
-my $LOCAL_ARG  = "0";
-my $HELP_ARG   = "0";
-my $VERSION_ARG = "0";
-my $UPDATE_ARG  = "0";
-my $QUIET_ARG   = "0";
-
-my $FILE;
-my $OUTFILE;
-
-my $gettext_type = "";
-my $input;
-my %messages = ();
-
-## Use this instead of \w for XML files to handle more possible characters.
-my $w = "[-A-Za-z0-9._:]";
-
-## Always print first
-$| = 1;
-
-## Handle options
-GetOptions (
-           "type=s"     => \$TYPE_ARG,
-            "local|l"    => \$LOCAL_ARG,
-            "help|h"     => \$HELP_ARG,
-            "version|v"  => \$VERSION_ARG,
-            "update"     => \$UPDATE_ARG,
-           "quiet|q"    => \$QUIET_ARG,
-            ) or &error;
-
-&split_on_argument;
-
-
-## Check for options. 
-## This section will check for the different options.
-
-sub split_on_argument {
-
-    if ($VERSION_ARG) {
-        &version;
-
-    } elsif ($HELP_ARG) {
-       &help;
-        
-    } elsif ($LOCAL_ARG) {
-        &place_local;
-        &extract;
-
-    } elsif ($UPDATE_ARG) {
-       &place_normal;
-       &extract;
-
-    } elsif (@ARGV > 0) {
-       &place_normal;
-       &message;
-       &extract;
-
-    } else {
-       &help;
-
-    }  
-}    
-
-sub place_normal {
-    $FILE       = $ARGV[0];
-    $OUTFILE     = "$FILE.h";
-}   
-
-sub place_local {
-    $OUTFILE     = fileparse($FILE, ());
-    if (!-e "tmp/") { 
-        system("mkdir tmp/"); 
-    }
-    $OUTFILE     = "./tmp/$OUTFILE.h"
-}
-
-sub determine_type {
-   if ($TYPE_ARG =~ /^gettext\/(.*)/) {
-       $gettext_type=$1
-   }
-}
-
-## Sub for printing release information
-sub version{
-    print "${PROGRAM} (${PACKAGE}) $VERSION\n";
-    print "Copyright (C) 2000 Free Software Foundation, Inc.\n";
-    print "Written by Kenneth Christiansen, 2000.\n\n";
-    print "This is free software; see the source for copying conditions. There is NO\n";
-    print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n";
-    exit;
-}
-
-## Sub for printing usage information
-sub help{
-    print "Usage: ${PROGRAM} [FILENAME] [OPTIONS] ...\n";
-    print "Generates a header file from an xml source file.\n\nGrabs all strings ";
-    print "between <_translatable_node> and it's end tag,\nwhere tag are all allowed ";
-    print "xml tags. Read the docs for more info.\n\n"; 
-    print "  -v, --version                shows the version\n";
-    print "  -h, --help                   shows this help page\n";
-    print "  -q, --quiet                  quiet mode\n";
-    print "\nReport bugs to <kenneth\@gnu.org>.\n";
-    exit;
-}
-
-## Sub for printing error messages
-sub error{
-    print "Try `${PROGRAM} --help' for more information.\n";
-    exit;
-}
-
-sub message {
-    print "Generating C format header file for translation.\n";
-}
-
-sub extract {
-    &determine_type;
-
-    &convert ($FILE);
-
-    open OUT, ">$OUTFILE";
-    &msg_write;
-    close OUT;
-
-    print "Wrote $OUTFILE\n" unless $QUIET_ARG;
-}
-
-sub convert($) {
-
-    ## Reading the file
-    {
-       local (*IN);
-       local $/; #slurp mode
-       open (IN, "<$FILE") || die "can't open $FILE: $!";
-       $input = <IN>;
-    }
-
-    &type_ini if $gettext_type eq "ini";
-    &type_keys if $gettext_type eq "keys";
-    &type_xml if $gettext_type eq "xml";
-    &type_glade if $gettext_type eq "glade";
-    &type_scheme if $gettext_type eq "scheme";
-    &type_schemas  if $gettext_type eq "schemas";
-}
-
-sub entity_decode_minimal
-{
-    local ($_) = @_;
-
-    s/&apos;/'/g; # '
-    s/&quot;/"/g; # "
-    s/&amp;/&/g;
-
-    return $_;
-}
-
-sub entity_decode
-{
-    local ($_) = @_;
-
-    s/&apos;/'/g; # '
-    s/&quot;/"/g; # "
-    s/&amp;/&/g;
-    s/&lt;/</g;
-    s/&gt;/>/g;
-
-    return $_;
-}
-
-sub escape_char
-{
-    return '\"' if $_ eq '"';
-    return '\n' if $_ eq "\n";
-    return '\\' if $_ eq '\\';
-
-    return $_;
-}
-
-sub escape
-{
-    my ($string) = @_;
-    return join "", map &escape_char, split //, $string;
-}
-
-sub type_ini {
-    ### For generic translatable desktop files ###
-    while ($input =~ /^_.*=(.*)$/mg) {
-        $messages{$1} = [];
-    }
-}
-
-sub type_keys {
-    ### For generic translatable mime/keys files ###
-    while ($input =~ /^\s*_\w+=(.*)$/mg) {
-        $messages{$1} = [];
-    }
-}
-
-sub type_xml {
-    ### For generic translatable XML files ###
-        
-    while ($input =~ /\s_$w+=\"([^"]+)\"/sg) { # "
-        $messages{entity_decode_minimal($1)} = [];
-    }
-
-    while ($input =~ /<_($w+)>(.+?)<\/_\1>/sg) {
-        $_ = $2;
-        s/\s+/ /g;
-       s/^ //;
-       s/ $//;
-        $messages{entity_decode_minimal($_)} = [];
-    }
-}
-
-sub type_schemas {
-    ### For schemas XML files ###
-         
-    # FIXME: We should handle escaped < (less than)
-    while ($input =~ /<(short|long)>([^<]+)<\/\1>/sg) {
-        $_ = $2;
-        s/\s+/ /g;
-       s/^ //;
-       s/ $//;
-        $messages{entity_decode_minimal($_)} = [];
-    }
-}
-
-sub type_glade {
-    ### For translatable Glade XML files ###
-
-    my $tags = "label|title|text|format|copyright|comments|preview_text|tooltip|message";
-
-    while ($input =~ /<($tags)>([^<]+)<\/($tags)>/sg) {
-       # Glade sometimes uses tags that normally mark translatable things for
-        # little bits of non-translatable content. We work around this by not
-        # translating strings that only includes something like label4 or window1.
-       $messages{entity_decode($2)} = [] unless $2 =~ /^(window|label)[0-9]+$/;
-    }
-    
-    while ($input =~ /<items>(..[^<]*)<\/items>/sg) {
-       for my $item (split (/\n/, $1)) {
-           $messages{entity_decode($item)} = [];
-       }
-    }
-
-    ## handle new glade files
-    while ($input =~ /<(property|atkproperty)\s+[^>]*translatable\s*=\s*"yes"[^>]*>([^<]+)<\/\1>/sg) {
-       $messages{entity_decode($2)} = [] unless $2 =~ /^(window|label)[0-9]+$/;
-    }
-    while ($input =~ /<atkaction\s+action_name="([^>]*)"\s+description="([^>]+)"\/>/sg) {
-        $messages{entity_decode_minimal($2)} = [];
-    }
-}
-
-sub type_scheme {
-    while ($input =~ /_\(?"((?:[^"\\]+|\\.)*)"\)?/sg) {
-       $messages{$1} = [];
-    }
-}
-
-sub msg_write {
-    for my $message (sort keys %messages) { 
-       print OUT "/* xgettext:no-c-format */\n" if $message =~ /%/;
-        
-       my @lines = split (/\n/, $message);
-       for (my $n = 0; $n < @lines; $n++) {
-            if ($n == 0) { 
-               print OUT "char *s = N_(\""; 
-            } else {  
-               print OUT "             \""; 
-           }
-
-            print OUT escape($lines[$n]);
-
-            if ($n < @lines - 1) { 
-               print OUT "\\n\"\n"; 
-           } else { 
-               print OUT "\");\n";  
-           }
-        }
-    }
-}
-
diff --git a/linphone/intltool-merge.in b/linphone/intltool-merge.in
deleted file mode 100644 (file)
index fd35cfd..0000000
+++ /dev/null
@@ -1,657 +0,0 @@
-#!@INTLTOOL_PERL@ -w
-
-#
-#  The Intltool Message Merger
-#
-#  Copyright (C) 2000, 2002 Free Software Foundation.
-#  Copyright (C) 2000, 2001 Eazel, Inc
-#
-#  Intltool is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License 
-#  version 2 published by the Free Software Foundation.
-#
-#  Intltool 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.
-#
-#  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.
-#
-#  Authors:  Maciej Stachowiak <mjs@noisehavoc.org>
-#            Kenneth Christiansen <kenneth@gnu.org>
-#            Darin Adler <darin@bentspoon.com>
-#
-#  Proper XML UTF-8'ification written by Cyrille Chepelov <chepelov@calixo.net>
-#
-
-## Release information
-my $PROGRAM = "intltool-merge";
-my $PACKAGE = "intltool";
-my $VERSION = "0.22";
-
-## Loaded modules
-use strict; 
-use Getopt::Long;
-
-## Scalars used by the option stuff
-my $HELP_ARG = 0;
-my $VERSION_ARG = 0;
-my $BA_STYLE_ARG = 0;
-my $XML_STYLE_ARG = 0;
-my $KEYS_STYLE_ARG = 0;
-my $DESKTOP_STYLE_ARG = 0;
-my $SCHEMAS_STYLE_ARG = 0;
-my $QUIET_ARG = 0;
-my $PASS_THROUGH_ARG = 0;
-my $UTF8_ARG = 0;
-my $cache_file;
-
-## Handle options
-GetOptions 
-(
- "help" => \$HELP_ARG,
- "version" => \$VERSION_ARG,
- "quiet|q" => \$QUIET_ARG,
- "oaf-style|o" => \$BA_STYLE_ARG, ## for compatibility
- "ba-style|b" => \$BA_STYLE_ARG,
- "xml-style|x" => \$XML_STYLE_ARG,
- "keys-style|k" => \$KEYS_STYLE_ARG,
- "desktop-style|d" => \$DESKTOP_STYLE_ARG,
- "schemas-style|s" => \$SCHEMAS_STYLE_ARG,
- "pass-through|p" => \$PASS_THROUGH_ARG,
- "utf8|u" => \$UTF8_ARG,
- "cache|c=s" => \$cache_file
- ) or &error;
-
-my $PO_DIR;
-my $FILE;
-my $OUTFILE;
-
-my %po_files_by_lang = ();
-my %translations = ();
-
-# Use this instead of \w for XML files to handle more possible characters.
-my $w = "[-A-Za-z0-9._:]";
-
-# XML quoted string contents
-my $q = "[^\\\"]*";
-
-## Check for options. 
-
-if ($VERSION_ARG) {
-       &print_version;
-} elsif ($HELP_ARG) {
-       &print_help;
-} elsif ($BA_STYLE_ARG && @ARGV > 2) {
-       &preparation;
-       &print_message;
-       &ba_merge_translations;
-       &finalize;
-} elsif ($XML_STYLE_ARG && @ARGV > 2) {
-        &utf8_sanity_check;
-       &preparation;
-       &print_message;
-       &xml_merge_translations;
-       &finalize;
-} elsif ($KEYS_STYLE_ARG && @ARGV > 2) {
-        &utf8_sanity_check;
-        &preparation;
-        &print_message;
-        &keys_merge_translations;
-       &finalize;
-} elsif ($DESKTOP_STYLE_ARG && @ARGV > 2) {
-        &preparation;
-        &print_message;
-        &desktop_merge_translations;
-       &finalize;
-} elsif ($SCHEMAS_STYLE_ARG && @ARGV > 2) {
-        &preparation;
-        &print_message;
-        &schemas_merge_translations;
-       &finalize;
-} else {
-       &print_help;
-}
-
-exit;
-
-## Sub for printing release information
-sub print_version
-{
-    print "${PROGRAM} (${PACKAGE}) ${VERSION}\n";
-    print "Written by Maciej Stachowiak, Darin Adler and Kenneth Christiansen.\n\n";
-    print "Copyright (C) 2000-2002 Free Software Foundation, Inc.\n";
-    print "Copyright (C) 2000-2001 Eazel, Inc.\n";
-    print "This is free software; see the source for copying conditions.  There is NO\n";
-    print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n";
-    exit;
-}
-
-## Sub for printing usage information
-sub print_help
-{
-    print "Usage: ${PROGRAM} [OPTIONS] PO_DIRECTORY FILENAME OUTPUT_FILE\n";
-    print "Generates an output file that includes translated versions of some attributes,\n";
-    print "from an untranslated source and a po directory that includes translations.\n\n";
-    print "  -b, --ba-style         includes translations in the bonobo-activation style\n";
-    print "  -d, --desktop-style    includes translations in the desktop style\n";
-    print "  -k, --keys-style       includes translations in the keys style\n";
-    print "  -s, --schemas-style    includes translations in the schemas style\n";
-    print "  -x, --xml-style        includes translations in the standard xml style\n";
-    print "  -u, --utf8             convert all strings to UTF-8 before merging\n";
-    print "  -p, --pass-through     use strings as found in .po files, without\n";
-    print "                         conversion (STRONGLY unrecommended with -x)\n";
-    print "  -q, --quiet            suppress most messages\n";
-    print "      --help             display this help and exit\n";
-    print "      --version          output version information and exit\n";
-    print "\nReport bugs to bugzilla.gnome.org, module intltool, or contact us through \n";
-    print "<xml-i18n-tools-list\@gnome.org>.\n";
-    exit;
-}
-
-
-## Sub for printing error messages
-sub print_error
-{
-    print "Try `${PROGRAM} --help' for more information.\n";
-    exit;
-}
-
-
-sub print_message 
-{
-    print "Merging translations into $OUTFILE.\n" unless $QUIET_ARG;
-}
-
-
-sub preparation 
-{
-    $PO_DIR = $ARGV[0];
-    $FILE = $ARGV[1];
-    $OUTFILE = $ARGV[2];
-
-    &gather_po_files;
-    &get_translation_database;
-}
-
-# General-purpose code for looking up translations in .po files
-
-sub po_file2lang
-{
-    my ($tmp) = @_; 
-    $tmp =~ s/^.*\/(.*)\.po$/$1/; 
-    return $tmp; 
-}
-
-sub gather_po_files
-{
-    for my $po_file (glob "$PO_DIR/*.po") {
-       $po_files_by_lang{po_file2lang($po_file)} = $po_file;
-    }
-}
-
-sub get_po_encoding
-{
-    my ($in_po_file) = @_;
-    my $encoding = "";
-
-    open IN_PO_FILE, $in_po_file or die;
-    while (<IN_PO_FILE>) {
-        ## example: "Content-Type: text/plain; charset=ISO-8859-1\n"
-        if (/Content-Type\:.*charset=([-a-zA-Z0-9]+)\\n/) {
-            $encoding = $1; 
-            last;
-        }
-    }
-    close IN_PO_FILE;
-
-    if (!$encoding) {
-        print "Warning: no encoding found in $in_po_file. Assuming ISO-8859-1\n";
-        $encoding = "ISO-8859-1";
-    }
-    return $encoding
-}
-
-sub utf8_sanity_check 
-{
-    if (!$UTF8_ARG) {
-        if (!$PASS_THROUGH_ARG) {
-            $PASS_THROUGH_ARG="1";
-        }
-    }
-}
-
-sub get_translation_database
-{
-    if ($cache_file) {
-       &get_cached_translation_database;
-    } else {
-        &create_translation_database;
-    }
-}
-
-sub get_newest_po_age
-{
-    my $newest_age;
-
-    foreach my $file (values %po_files_by_lang) {
-       my $file_age = -M $file;
-       $newest_age = $file_age if !$newest_age || $file_age < $newest_age;
-    }
-
-    return $newest_age;
-}
-
-sub create_cache
-{
-    print "Generating and caching the translation database\n" unless $QUIET_ARG;
-
-    &create_translation_database;
-
-    open CACHE, ">$cache_file" || die;
-    print CACHE join "\x01", %translations;
-    close CACHE;
-}
-
-sub load_cache 
-{
-    print "Found cached translation database\n" unless $QUIET_ARG;
-
-    my $contents;
-    open CACHE, "<$cache_file" || die;
-    {
-        local $/;
-        $contents = <CACHE>;
-    }
-    close CACHE;
-    %translations = split "\x01", $contents;
-}
-
-sub get_cached_translation_database
-{
-    my $cache_file_age = -M $cache_file;
-    if (defined $cache_file_age) {
-        if ($cache_file_age <= &get_newest_po_age) {
-            &load_cache;
-            return;
-        }
-        print "Found too-old cached translation database\n" unless $QUIET_ARG;
-    }
-
-    &create_cache;
-}
-
-sub create_translation_database
-{
-    for my $lang (keys %po_files_by_lang) {
-       my $po_file = $po_files_by_lang{$lang};
-
-        if ($UTF8_ARG) {
-            my $encoding = get_po_encoding ($po_file);
-            if (lc $encoding eq "utf-8") {
-                open PO_FILE, "<$po_file";     
-            } else {
-                my $iconv = $ENV{"INTLTOOL_ICONV"} || "iconv";
-                open PO_FILE, "$iconv -f $encoding -t UTF-8 $po_file|";        
-            }
-        } else {
-            open PO_FILE, "<$po_file"; 
-        }
-
-       my $nextfuzzy = 0;
-       my $inmsgid = 0;
-       my $inmsgstr = 0;
-       my $msgid = "";
-       my $msgstr = "";
-        while (<PO_FILE>) {
-           $nextfuzzy = 1 if /^#, fuzzy/;
-            if (/^msgid "((\\.|[^\\])*)"/ ) {
-               $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr;
-               $msgid = "";
-               $msgstr = "";
-
-               if ($nextfuzzy) {
-                   $inmsgid = 0;
-               } else {
-                   $msgid = unescape_po_string($1);
-                   $inmsgid = 1;
-               }
-               $inmsgstr = 0;
-               $nextfuzzy = 0;
-           }
-           if (/^msgstr "((\\.|[^\\])*)"/) {
-               $msgstr = unescape_po_string($1);
-               $inmsgstr = 1;
-               $inmsgid = 0;
-           }
-           if (/^"((\\.|[^\\])*)"/) {
-               $msgid .= unescape_po_string($1) if $inmsgid;
-               $msgstr .= unescape_po_string($1) if $inmsgstr;
-           }
-       }
-       $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr;
-    }
-}
-
-sub finalize
-{
-}
-
-sub unescape_one_sequence
-{
-    my ($sequence) = @_;
-
-    return "\\" if $sequence eq "\\\\";
-    return "\"" if $sequence eq "\\\"";
-
-    # gettext also handles \n, \t, \b, \r, \f, \v, \a, \xxx (octal),
-    # \xXX (hex) and has a comment saying they want to handle \u and \U.
-
-    return $sequence;
-}
-
-sub unescape_po_string
-{
-    my ($string) = @_;
-
-    $string =~ s/(\\.)/unescape_one_sequence($1)/eg;
-
-    return $string;
-}
-
-sub entity_decode
-{
-    local ($_) = @_;
-
-    s/&apos;/'/g; # '
-    s/&quot;/"/g; # "
-    s/&amp;/&/g;
-
-    return $_;
-}
-
-sub entity_encode
-{
-    my ($pre_encoded) = @_;
-
-    my @list_of_chars = unpack ('C*', $pre_encoded);
-
-    if ($PASS_THROUGH_ARG) {
-        return join ('', map (&entity_encode_int_even_high_bit, @list_of_chars));
-    } else {
-        return join ('', map (&entity_encode_int_minimalist, @list_of_chars));
-    }
-}
-
-sub entity_encode_int_minimalist
-{
-    return "&quot;" if $_ == 34;
-    return "&amp;" if $_ == 38;
-    return "&apos;" if $_ == 39;
-    return chr $_;
-}
-
-sub entity_encode_int_even_high_bit
-{
-    if ($_ > 127 || $_ == 34 || $_ == 38 || $_ == 39) {
-        # the ($_ > 127) should probably be removed
-       return "&#" . $_ . ";"; 
-    } else {
-       return chr $_;
-    }
-}
-
-sub entity_encoded_translation
-{
-    my ($lang, $string) = @_;
-
-    my $translation = $translations{$lang, $string};
-    return $string if !$translation;
-    return entity_encode ($translation);
-}
-
-## XML (bonobo-activation specific) merge code
-
-sub ba_merge_translations
-{
-    my $source;
-
-    {
-       local $/; # slurp mode
-       open INPUT, "<$FILE" or die "can't open $FILE: $!";
-       $source = <INPUT>;
-       close INPUT;
-    }
-
-    open OUTPUT, ">$OUTFILE" or die "can't open $OUTFILE: $!";
-
-    while ($source =~ s|^(.*?)([ \t]*<\s*$w+\s+($w+\s*=\s*"$q"\s*)+/?>)([ \t]*\n)?||s) {
-        print OUTPUT $1;
-
-        my $node = $2 . "\n";
-
-        my @strings = ();
-        $_ = $node;
-       while (s/(\s)_($w+\s*=\s*"($q)")/$1$2/s) {
-             push @strings, entity_decode($3);
-        }
-       print OUTPUT;
-
-       my %langs;
-       for my $string (@strings) {
-           for my $lang (keys %po_files_by_lang) {
-                $langs{$lang} = 1 if $translations{$lang, $string};
-           }
-       }
-       
-       for my $lang (sort keys %langs) {
-           $_ = $node;
-           s/(\sname\s*=\s*)"($q)"/$1"$2-$lang"/s;
-           s/(\s)_($w+\s*=\s*")($q)"/$1 . $2 . entity_encoded_translation($lang, $3) . '"'/seg;
-           print OUTPUT;
-        }
-    }
-
-    print OUTPUT $source;
-
-    close OUTPUT;
-}
-
-
-## XML (non-bonobo-activation) merge code
-
-sub xml_merge_translations
-{
-    my $source;
-
-    {
-       local $/; # slurp mode
-       open INPUT, "<$FILE" or die "can't open $FILE: $!";
-       $source = <INPUT>;
-       close INPUT;
-    }
-
-    open OUTPUT, ">$OUTFILE" or die;
-
-    # FIXME: support attribute translations
-
-    # Empty nodes never need translation, so unmark all of them.
-    # For example, <_foo/> is just replaced by <foo/>.
-    $source =~ s|<\s*_($w+)\s*/>|<$1/>|g;
-
-    # Support for <_foo>blah</_foo> style translations.
-    while ($source =~ s|^(.*?)([ \t]*)<\s*_($w+)\s*>(.*?)<\s*/_\3\s*>([ \t]*\n)?||s) {
-        print OUTPUT $1;
-
-        my $spaces = $2;
-        my $tag = $3;
-        my $string = $4;
-
-       print OUTPUT "$spaces<$tag>$string</$tag>\n";
-
-       $string =~ s/\s+/ /g;
-       $string =~ s/^ //;
-       $string =~ s/ $//;
-       $string = entity_decode($string);
-
-       for my $lang (sort keys %po_files_by_lang) {
-           my $translation = $translations{$lang, $string};
-           next if !$translation;
-           $translation = entity_encode($translation);
-           print OUTPUT "$spaces<$tag xml:lang=\"$lang\">$translation</$tag>\n";
-        }
-    }
-
-    print OUTPUT $source;
-
-    close OUTPUT;
-}
-
-sub keys_merge_translations
-{
-    open INPUT, "<${FILE}" or die;
-    open OUTPUT, ">${OUTFILE}" or die;
-
-    while (<INPUT>) {
-        if (s/^(\s*)_(\w+=(.*))/$1$2/)  {
-           my $string = $3;
-
-            print OUTPUT;
-
-           my $non_translated_line = $_;
-
-            for my $lang (sort keys %po_files_by_lang) {
-               my $translation = $translations{$lang, $string};
-                next if !$translation;
-
-                $_ = $non_translated_line;
-               s/(\w+)=.*/[$lang]$1=$translation/;
-                print OUTPUT;
-            }
-       } else {
-            print OUTPUT;
-        }
-    }
-
-    close OUTPUT;
-    close INPUT;
-}
-
-sub desktop_merge_translations
-{
-    open INPUT, "<${FILE}" or die;
-    open OUTPUT, ">${OUTFILE}" or die;
-
-    while (<INPUT>) {
-        if (s/^(\s*)_(\w+=(.*))/$1$2/)  {
-           my $string = $3;
-
-            print OUTPUT;
-
-           my $non_translated_line = $_;
-
-            for my $lang (sort keys %po_files_by_lang) {
-                my $translation = $translations{$lang, $string};
-                next if !$translation;
-
-                $_ = $non_translated_line;
-                s/(\w+)=.*/${1}[$lang]=$translation/;
-                print OUTPUT;
-            }
-       } else {
-            print OUTPUT;
-        }
-    }
-
-    close OUTPUT;
-    close INPUT;
-}
-
-sub schemas_merge_translations
-{
-    my $source;
-
-    {
-       local $/; # slurp mode
-       open INPUT, "<$FILE" or die "can't open $FILE: $!";
-       $source = <INPUT>;
-       close INPUT;
-    }
-
-    open OUTPUT, ">$OUTFILE" or die;
-
-    # FIXME: support attribute translations
-
-    # Empty nodes never need translation, so unmark all of them.
-    # For example, <_foo/> is just replaced by <foo/>.
-    $source =~ s|<\s*_($w+)\s*/>|<$1/>|g;
-
-    # Support for <_foo>blah</_foo> style translations.
-
-    my $regex_start = "^(.*?)([ \t]*)<locale name=\"C\">";
-    my $regex_short = "([ \t\n]*)<short>(.*?)</short>";
-    my $regex_long  = "([ \t\n]*)<long>(.*?)</long>";
-    my $regex_end   = "([ \t\n]*)</locale>";
-
-    while ($source =~ s|$regex_start$regex_short$regex_long$regex_end||s) {
-        print OUTPUT $1;
-
-        my $locale_start_spaces = $2;
-       my $locale_end_spaces = $7;
-       my $short_spaces = $3;
-       my $short_string = $4;
-       my $long_spaces = $5;
-       my $long_string = $6;
-
-       # English first
-
-       print OUTPUT "$locale_start_spaces<locale name=\"C\">";
-       print OUTPUT "$short_spaces<short>$short_string</short>";
-       print OUTPUT "$long_spaces<long>$long_string</long>";
-       print OUTPUT "$locale_end_spaces</locale>";
-
-       $short_string =~ s/\s+/ /g;
-       $short_string =~ s/^ //;
-       $short_string =~ s/ $//;
-       $short_string = entity_decode($short_string);
-
-       $long_string =~ s/\s+/ /g;
-       $long_string =~ s/^ //;
-       $long_string =~ s/ $//;
-       $long_string = entity_decode($long_string);
-
-       for my $lang (sort keys %po_files_by_lang) {
-           my $short_translation = $translations{$lang, $short_string};
-           my $long_translation  = $translations{$lang, $long_string};
-
-           next if (!$short_translation && !$long_translation);
-
-           print OUTPUT "\n$locale_start_spaces<locale name=\"$lang\">";
-
-           if ($short_translation)
-           {
-               $short_translation = entity_encode($short_translation);
-               print OUTPUT "$short_spaces<short>$short_translation</short>";
-           }
-
-           if ($long_translation)
-           {
-               $long_translation = entity_encode($long_translation);
-               print OUTPUT "$long_spaces<long>$long_translation</long>";
-           }       
-
-           print OUTPUT "$locale_end_spaces</locale>";
-        }
-    }
-
-    print OUTPUT $source;
-
-    close OUTPUT;
-}
diff --git a/linphone/intltool-update.in b/linphone/intltool-update.in
deleted file mode 100644 (file)
index cc5fc14..0000000
+++ /dev/null
@@ -1,634 +0,0 @@
-#!@INTLTOOL_PERL@ -w
-
-#
-#  The Intltool Message Updater
-#
-#  Copyright (C) 2000-2002 Free Software Foundation.
-#
-#  Intltool is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License 
-#  version 2 published by the Free Software Foundation.
-#
-#  Intltool 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.
-#
-#  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.
-#
-#  Authors: Kenneth Christiansen <kenneth@gnu.org>
-#           Maciej Stachowiak
-#           Darin Adler <darin@bentspoon.com>
-
-## Release information
-my $PROGRAM = "intltool-update";
-my $VERSION = "0.22";
-my $PACKAGE = "intltool";
-
-## Loaded modules
-use strict;
-use Getopt::Long;
-use Cwd;
-use File::Copy;
-use File::Find;
-
-## Scalars used by the option stuff
-my $HELP_ARG      = 0;
-my $VERSION_ARG    = 0;
-my $DIST_ARG      = 0;
-my $POT_ARG       = 0;
-my $HEADERS_ARG    = 0;
-my $MAINTAIN_ARG   = 0;
-my $REPORT_ARG     = 0;
-my $VERBOSE       = 0;
-my $GETTEXT_PACKAGE = "";
-
-my @languages;
-my %po_files_by_lang = ();
-
-# Regular expressions to categorize file types.
-# FIXME: Please check if the following is correct
-
-my $xml_extension =
-"xml(\.in)*|".         # .in is not required
-"ui|".
-"glade2?(\.in)*|".     # .in is not required
-"scm(\.in)*|".         # .in is not required
-"oaf(\.in)+|".
-"etspec|".
-"sheet(\.in)+|".
-"schemas(\.in)+|".
-"pong(\.in)+";
-
-my $ini_extension =
-"desktop(\.in)+|".
-"caves(\.in)+|". 
-"directory(\.in)+|".
-"soundlist(\.in)+|".
-"keys(\.in)+|".
-"server(\.in)+";
-
-## Always print as the first thing
-$| = 1;
-
-## Handle options
-GetOptions 
-(
- "help"               => \$HELP_ARG,
- "version"            => \$VERSION_ARG,
- "dist|d"             => \$DIST_ARG,
- "pot|p"              => \$POT_ARG,
- "headers|s"          => \$HEADERS_ARG,
- "maintain|m"         => \$MAINTAIN_ARG,
- "report|r"           => \$REPORT_ARG,
- "verbose|x"          => \$VERBOSE,
- "gettext-package|g=s" => \$GETTEXT_PACKAGE,
- ) or &print_error_invalid_option;
-
-&print_help if $HELP_ARG;
-&print_version if $VERSION_ARG;
-
-my $arg_count = ($DIST_ARG > 0)
-    + ($POT_ARG > 0)
-    + ($HEADERS_ARG > 0)
-    + ($MAINTAIN_ARG > 0)
-    + ($REPORT_ARG > 0);
-&print_help if $arg_count > 1;
-
-# --version and --help don't require a module name
-my $MODULE = $GETTEXT_PACKAGE || &find_package_name;
-
-if ($DIST_ARG) {
-    if ($ARGV[0] =~ /^[a-z]/){
-        &update_po_file ($ARGV[0]);
-        &print_status ($ARGV[0]);
-    } else {
-        &print_help;
-    }
-} elsif ($POT_ARG) {
-    &generate_headers;
-    &generate_po_template;
-} elsif ($HEADERS_ARG) {
-    &generate_headers;
-} elsif ($MAINTAIN_ARG) {
-    &find_leftout_files;
-} elsif ($REPORT_ARG) {
-    &print_report;
-} else {
-    if ($ARGV[0] =~ /^[a-z]/) {
-        &main ($ARGV[0]);
-    } else {
-        &print_help;
-    }
-}
-
-exit;
-
-#########
-
-sub print_version
-{
-    ## Print version information
-    print "${PROGRAM} (${PACKAGE}) $VERSION\n";
-    print "Written by Kenneth Christiansen, Maciej Stachowiak, and Darin Adler.\n\n";
-    print "Copyright (C) 2000-2002 Free Software Foundation, Inc.\n";
-    print "This is free software; see the source for copying conditions.  There is NO\n";
-    print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n";
-    exit;
-}
-
-sub print_help
-{
-    ## Print usage information
-    print "Usage: ${PROGRAM} [OPTIONS] ...LANGCODE\n";
-    print "Updates PO template files and merge them with the translations.\n\n";
-    print "  -p, --pot              generate the PO template only\n";
-    print "  -s, --headers          generate the header files in POTFILES.in\n";
-    print "  -m, --maintain         search for left out files from POTFILES.in\n";
-    print "  -r, --report           display a status report for the module.\n";
-    print "  -x, --verbose          display lots of feedback\n";
-    print "      --help             display this help and exit\n";
-    print "      --version          output version information and exit\n";
-    print "\nExamples of use:\n";
-    print "${PROGRAM} --pot    just creates a new PO template from the source\n";
-    print "${PROGRAM} da       created new PO template and updated the da.po file\n\n";
-    print "Report bugs to bugzilla.gnome.org, module 'intltool'.\n";
-    exit;
-}
-
-sub main
-{
-    my ($lang) = @_;
-
-    ## Report error if the language file supplied
-    ## to the command line is non-existent
-    &print_error_not_existing("$lang.po") if ! -s "$lang.po";
-
-    print "Working, please wait..." unless $VERBOSE;
-    &generate_headers;
-    &generate_po_template;
-    &update_po_file ($lang);
-    &print_status ($lang);
-}
-
-sub determine_type ($) 
-{
-   my $type = $_;
-   my $gettext_type;
-
-   # FIXME: Use $xml_extentions, and maybe do all this even nicer
-   my $xml_regex = 
-       "(?:xml(\.in)*|ui|oaf(?:\.in)+|server(?:\.in)+|sheet(?:\.in)+|".
-       "pong(?:\.in)+|etspec|schemas(?:\.in)+)";
-   my $ini_regex =
-       "(?:desktop(?:\.in)+|caves(?:\.in)+|directory(?:\.in)+|".
-       "soundlist(?:\.in)+)";
-
-   if ($type =~ /\[type: gettext\/([^\]].*)]/) {
-        $gettext_type=$1;
-   }
-   elsif ($type =~ /schemas(\.in)+$/) {
-        $gettext_type="schemas";
-   }
-   elsif ($type =~ /$xml_regex$/) {
-        $gettext_type="xml";
-   }
-   elsif ($type =~ /glade2?(\.in)*$/) {
-        $gettext_type="glade";
-   }
-   elsif ($type =~ /$ini_regex$/) { 
-        $gettext_type="ini";
-   }
-   elsif ($type =~ /scm(\.in)*$/) {
-        $gettext_type="scheme";
-   }
-   elsif ($type =~ /keys(\.in)+$/) {
-        $gettext_type="keys";
-   }
-   else { $gettext_type=""; }
-
-   return "gettext\/$gettext_type";
-}
-
-sub find_leftout_files
-{
-    my (@buf_i18n_plain,
-       @buf_i18n_xml,
-       @buf_i18n_xml_unmarked,
-       @buf_i18n_ini,
-       @buf_potfiles,
-       @buf_potfiles_ignore,
-       @buf_allfiles,
-       @buf_allfiles_sorted,
-       @buf_potfiles_sorted
-    );
-
-    ## Search and find all translatable files
-    find sub { 
-       push @buf_i18n_plain, "$File::Find::name" if /\.(c|y|cc|cpp|c\+\+|h|gob)$/ 
-       }, "..";
-    find sub { 
-       push @buf_i18n_xml, "$File::Find::name" if /\.($xml_extension)$/ 
-       }, "..";
-    find sub {
-       push @buf_i18n_ini, "$File::Find::name" if /\.($ini_extension)$/ 
-       }, "..";
-    find sub {
-        push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/
-        }, "..";
-
-
-    open POTFILES, "POTFILES.in" or die "$PROGRAM:  there's no POTFILES.in!\n";
-
-    @buf_potfiles = grep /^[^#]/, <POTFILES>;
-                           
-    print "Searching for missing translatable files...\n" if $VERBOSE;
-
-    ## Check if we should ignore some found files, when
-    ## comparing with POTFILES.in
-    foreach my $ignore ("POTFILES.skip", "POTFILES.ignore") {
-        if (-s $ignore) {
-            open FILE, $ignore;
-            while (<FILE>) {
-                if (/^[^#]/){
-                    push @buf_potfiles_ignore, $_;
-                }
-            }
-           print "Found $ignore: Ignoring files...\n" if $VERBOSE;
-            @buf_potfiles = (@buf_potfiles_ignore, @buf_potfiles);
-        }
-    }
-
-    foreach my $file (@buf_i18n_plain)
-      {
-        my $in_comment = 0;
-       my $in_macro = 0;
-
-        open FILE, "<$file";
-        while (<FILE>)
-         {
-           # Handle continued multi-line comment.
-           if ($in_comment)
-             {
-               next unless s-.*\*/--;
-               $in_comment = 0;
-             }
-
-           # Handle continued macro.
-           if ($in_macro)
-             {
-               $in_macro = 0 unless /\\$/;
-               next;
-             }
-
-           # Handle start of macro (or any preprocessor directive).
-           if (/^\s*\#/)
-             {
-               $in_macro = 1 if /^([^\\]|\\.)*\\$/;
-               next;
-             }
-
-           # Handle comments and quoted text.
-           while (m-(/\*|//|\'|\")-) # \' and \" keep emacs perl mode happy
-             {
-               my $match = $1;
-               if ($match eq "/*")
-                 {
-                   if (!s-/\*.*?\*/--)
-                     {
-                       s-/\*.*--;
-                       $in_comment = 1;
-                     }
-                 }
-               elsif ($match eq "//")
-                 {
-                   s-//.*--;
-                 }
-               else # ' or "
-                 {
-                   if (!s-$match([^\\]|\\.)*?$match-QUOTEDTEXT-)
-                     {
-                       warn "mismatched quotes at line $. in $file\n";
-                       s-$match.*--;
-                     }
-                 }
-             }
-       
-
-           if (/_\(QUOTEDTEXT/)
-             {
-               ## Remove the first 3 chars and add newline
-               push @buf_allfiles, unpack("x3 A*", $file) . "\n";
-               last;
-             }
-         }
-       close FILE;
-      }
-
-    foreach my $file (@buf_i18n_xml) {
-        open FILE, "<$file";
-        while (<FILE>) {
-            if (/\s_(.*)=\"/ || /translatable=\"yes\"/){
-                push @buf_allfiles, unpack("x3 A*", $file) . "\n";
-                last;
-            }
-        }
-    }
-
-    foreach my $file (@buf_i18n_ini){
-        open FILE, "<$file";
-        while (<FILE>) {
-            if (/_(.*)=/){
-                push @buf_allfiles, unpack("x3 A*", $file) . "\n";
-                last;
-            }
-        }
-    }
-
-    foreach my $file (@buf_i18n_xml_unmarked){
-        push @buf_allfiles, unpack("x3 A*", $file) . "\n";
-    }
-
-
-    @buf_allfiles_sorted = sort (@buf_allfiles);
-    @buf_potfiles_sorted = sort (@buf_potfiles);
-
-    my %in2;
-    foreach (@buf_potfiles_sorted) {
-        $in2{$_} = 1;
-    }
-
-    my @result;
-
-    foreach (@buf_allfiles_sorted){
-        if (!exists($in2{$_})){
-            push @result, $_
-        }
-    }
-
-    ## Save file with information about the files missing
-    ## if any, and give information about this procedure.
-    if (@result) {
-       print "\n" if $VERBOSE;
-        open OUT, ">missing";
-        print OUT @result;
-        print "The following files contain translations and are currently not in use. Please\n";
-       print "consider adding these to the POTFILES.in file, located in the po/ directory.\n\n";
-       print @result, "\n";
-       print "If some of these files are left out on purpose then please add them to\n";
-       print "POTFILES.skip instead of POTFILES.in. A file 'missing' containing this list\n";
-        print "of left out files has been written in the current directory.\n";
-    }
-
-    ## If there is nothing to complain about, notify the user
-    else {
-        print "\nAll files containing translations are present in POTFILES.in.\n";
-    }
-}
-
-sub print_error_invalid_option
-{
-    ## Handle invalid arguments
-    print "Try `${PROGRAM} --help' for more information.\n";
-    exit 1;
-}
-
-sub generate_headers
-{
-    my $EXTRACT = `which intltool-extract 2>/dev/null`;
-    chomp $EXTRACT;
-
-    $EXTRACT = $ENV{"INTLTOOL_EXTRACT"} if $ENV{"INTLTOOL_EXTRACT"};
-
-    ## Generate the .h header files, so we can allow glade and
-    ## xml translation support
-    if (! -s $EXTRACT)
-    {
-       print "\n *** The intltool-extract script wasn't found!"
-            ."\n *** Without it, intltool-update can not generate files.\n";
-       exit;
-    }
-    else
-    {
-        open FILE, "<POTFILES.in";
-        while (<FILE>) {
-           chomp;
-
-           ## Find xml files in POTFILES.in and generate the
-           ## files with help from the extract script
-
-          my $gettext_type= &determine_type ($1);
-
-           if (/\.($xml_extension|$ini_extension)$/ || /^\[/){
-              $_ =~ s/^\[[^\[].*]\s*//;
-               my $filename = "../$_";
-
-               if ($VERBOSE){
-                   system($EXTRACT, "--update", "--type=$gettext_type", $filename);
-               } else {
-                  system($EXTRACT, "--update", "--type=$gettext_type", "--quiet", $filename);
-               }
-           }
-       }
-       close FILE;
-   }
-}
-
-sub generate_po_template
-{
-    ## Generate the potfiles from the POTFILES.in file
-
-    print "Building the $MODULE.pot...\n" if $VERBOSE;
-
-    move ("POTFILES.in", "POTFILES.in.old");
-
-    open INFILE, "<POTFILES.in.old";
-    open OUTFILE, ">POTFILES.in";
-    while (<INFILE>) {
-        s/\.($xml_extension|$ini_extension)$/$&.h/;
-        s/^\[.*]\s*(.*)/$1.h/;
-        print OUTFILE $_;
-    }
-    close OUTFILE;
-    close INFILE;
-
-    system ("xgettext", "--default-domain\=$MODULE", 
-                       "--directory\=\.\.",
-                       "--add-comments", 
-                       "--keyword\=\_", 
-                       "--keyword\=N\_", 
-                       "--keyword\=U\_",
-                       "--files-from\=\.\/POTFILES\.in");
-
-    move ("POTFILES.in.old", "POTFILES.in");
-
-    print "Removing generated header (.h) files..." if $VERBOSE;
-
-    open FILE, "<POTFILES.in";
-
-    while (<FILE>)
-    {
-        chomp;
-        unlink "../$_.h" if /\.($xml_extension|$ini_extension)$/;
-    }
-
-    close FILE;
-    print "done\n" if $VERBOSE;
-
-    if (!-e "$MODULE.po") {
-        print "WARNING: It seems that none of the files in POTFILES.in ".
-              "contain marked strings\n";
-        exit (1);
-    }
-
-    system ("rm", "-f", "$MODULE.pot");
-    move ("$MODULE.po", "$MODULE.pot") or die "$PROGRAM: couldn't move $MODULE.po to $MODULE.pot.\n";
-
-    print "Wrote $MODULE.pot\n" if $VERBOSE;
-}
-
-sub update_po_file
-{
-    my ($lang) = @_;
-
-    print "Merging $lang.po with $MODULE.pot..." if $VERBOSE;
-
-    copy ("$lang.po", "$lang.po.old") || die "copy failed: $!";
-
-    # Perform merge, remove backup file and the "messages" trash file 
-    # generated by gettext
-    system ("msgmerge", "$lang.po.old", "$MODULE.pot", "-o", "$lang.po");
-    unlink "$lang.po.old";
-    unlink "messages";
-}
-
-sub print_error_not_existing
-{
-    my ($file) = @_;
-
-    ## Report error if supplied language file is non-existing
-    print "$PROGRAM: $file does not exist!\n";
-    print "Try '$PROGRAM --help' for more information.\n";
-    exit;
-}
-
-sub gather_po_files
-{
-    my @po_files = glob ("./*.po");
-
-    @languages = map (&po_file2lang, @po_files);
-
-    foreach my $lang (@languages) {
-       $po_files_by_lang{$lang} = shift (@po_files);
-    }
-}
-
-sub po_file2lang ($)
-{
-    my $tmp = $_;
-    $tmp =~ s/^.*\/(.*)\.po$/$1/;
-    return $tmp;
-}
-
-sub print_status
-{
-    my ($lang) = @_;
-
-    system ("msgfmt", "--statistics", "$lang.po");
-    print "\n";
-}
-
-sub print_report
-{
-    &generate_headers;
-    &generate_po_template;
-    &gather_po_files;
-
-    foreach my $lang (@languages) {
-       print "$lang: ";
-       &update_po_file ($lang);
-    }
-
-    print "\n\n * Current translation support in $MODULE \n\n";
-
-    foreach my $lang (@languages){
-        print "$lang: ";
-       system ("msgfmt", "--statistics", "$lang.po");
-    }
-}
-
-sub find_package_name
-{
-    my $base_dirname = getcwd();
-    $base_dirname =~ s@.*/@@;
-
-    my ($conf_in, $src_dir);
-
-    if ($base_dirname =~ /^po(-.+)?$/) {
-        if (-f "../configure.in") {
-            $conf_in = "../configure.in";
-       } elsif (-f "../configure.ac") {
-           $conf_in = "../configure.ac";
-        } else {
-           my $makefile_source;
-           local (*IN);
-           open IN, "<Makefile" || die "can't open Makefile: $!";
-
-           while (<IN>) {
-               if (/^top_srcdir[ \t]*=/) {
-                   $src_dir = $_;
-                   # print "${src_dir}\n";
-
-                   $src_dir =~ s/^top_srcdir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/;
-                   # print "${src_dir}\n";
-                   chomp $src_dir;
-                   $conf_in = "$src_dir" . "/configure.in" . "\n";
-                   last;
-               }
-           }
-           $conf_in || die "Cannot find top_srcdir in Makefile."
-        }
-
-       my %varhash = ();
-        my $conf_source; {
-           local (*IN);
-           open (IN, "<$conf_in") || die "can't open $conf_in: $!";
-           while (<IN>) {
-              if (/^(\w+)=(\S+)/) { $varhash{$1} = $2 };
-           }
-           seek (IN, 0, 0);
-           local $/; # slurp mode
-           $conf_source = <IN>;
-        }
-
-       my $name = "";
-       $name = $1 if $conf_source =~ /^AM_INIT_AUTOMAKE\([\s\[]*([^,\)\s\]]+)/m;
-       if ($conf_source =~ /^AC_INIT\([\s\[]*([^,\)\s\]]+)\]?\s*,/m) {
-           $name = $1;
-           $varhash{"AC_PACKAGE_NAME"} = $1;
-       }
-       $name = $1 if $conf_source =~ /^GETTEXT_PACKAGE=\[?([^\s\]]+)/m;
-
-       $name = "\$AC_PACKAGE_NAME" if "$name" eq "AC_PACKAGE_NAME";
-
-       my $oldname = "";
-       while (($name =~ /[\$](\S+)/) && ("$oldname" ne "$name")) {
-           $oldname = $name;
-           if (exists $varhash{$1}) {
-               $name =~ s/[\$](\S+)/$varhash{$1}/;
-           }
-       }
-       return $name if $name;
-    }
-
-    print "$PROGRAM: Unable to determine package name.\n" .
-         "Make sure to run this script inside the po directory.\n";
-    exit;
-}
diff --git a/linphone/linphone-deps.filelist b/linphone/linphone-deps.filelist
deleted file mode 100755 (executable)
index 54ae39f..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-./bin/avcodec-52.dll
-./bin/avformat-52.dll
-./bin/avutil-50.dll
-./bin/libeXosip2-4.dll
-./bin/libogg-0.dll
-./bin/libtheora-0.dll
-./bin/libxml2-2.dll
-./bin/libosip2-4.dll
-./bin/libosipparser2-4.dll
-./bin/swscale-0.dll
diff --git a/linphone/linphone.iss.in b/linphone/linphone.iss.in
deleted file mode 100644 (file)
index b7726f5..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-[Setup]\r
-AppName=Linphone\r
-AppVerName=Linphone version @LINPHONE_VERSION@\r
-AppPublisher=linphone.org\r
-AppPublisherURL=http://www.linphone.org\r
-AppSupportURL=http://www.linphone.org\r
-AppUpdatesURL=http://www.linphone.org\r
-DefaultDirName={pf}\Linphone\r
-DefaultGroupName=Linphone\r
-LicenseFile=COPYING\r
-;InfoBeforeFile=README\r
-OutputBaseFilename=setup\r
-Compression=lzma\r
-SolidCompression=yes\r
-ShowLanguageDialog=yes\r
-\r
-[Languages]\r
-Name: "english"; MessagesFile: "compiler:Default.isl"\r
-Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl";\r
-Name: "french";  MessagesFile: "compiler:Languages\French.isl"\r
-Name: "czech";   MessagesFile: "compiler:Languages\Czech.isl"\r
-Name: "german";  MessagesFile: "compiler:Languages\German.isl"\r
-Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"\r
-\r
-\r
-[Tasks]\r
-Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked\r
-\r
-[Files]\r
-#include "linphone-win32.filelist"\r
-\r
-[Icons]\r
-Name: "{group}\Linphone"; Filename: "{app}\bin\linphone-3.exe" ; WorkingDir: "{app}"\r
-Name: "{userdesktop}\Linphone"; Filename: "{app}\bin\linphone-3.exe"; WorkingDir: "{app}" ; Tasks: desktopicon\r
-\r
-[Registry]\r
-Root: HKCR; Subkey: "sip";\r
-Root: HKCR; Subkey: "sip"; ValueData: "URL: SIP protocol" ; ValueType:string\r
-Root: HKCR; Subkey: "sip"; ValueName: "EditFlags"; ValueData: "02 00 00 00" ; ValueType:binary\r
-Root: HKCR; Subkey: "sip"; ValueName: "URL Protocol" ;  ValueType:string\r
-Root: HKCR; Subkey: "sip\DefaultIcon"; ValueData: "{app}\bin\linphone-3.exe"; ValueType:string ; Flags:uninsdeletekey\r
-Root: HKCR; Subkey: "sip\shell"\r
-Root: HKCR; Subkey: "sip\shell\open"\r
-Root: HKCR; Subkey: "sip\shell\open\command"; ValueType:string ; ValueData: "{app}\bin\linphone-3.exe --workdir {app} --call %1"; Flags:uninsdeletekey\r
-\r
-[Run]\r
-Filename: "{app}\bin\linphone-3.exe"; Description: "{cm:LaunchProgram,Linphone}"; WorkingDir: "{app}" ; Flags: nowait postinstall skipifsilent\r
-\r
diff --git a/linphone/linphone.kdevelop b/linphone/linphone.kdevelop
deleted file mode 100644 (file)
index 27eac22..0000000
+++ /dev/null
@@ -1,558 +0,0 @@
-<?xml version = '1.0'?>
-<kdevelop>
-  <general>
-    <author>Simon Morlat</author>
-    <email>simon.morlat@linphone.org</email>
-    <version>[3.1.2]</version>
-    <projectmanagement>KDevCustomProject</projectmanagement>
-    <primarylanguage>C</primarylanguage>
-    <ignoreparts/>
-    <projectname>linphone</projectname>
-    <projectdirectory>.</projectdirectory>
-    <absoluteprojectpath>false</absoluteprojectpath>
-    <description/>
-    <defaultencoding/>
-  </general>
-  <kdevcustomproject>
-    <run>
-      <directoryradio>executable</directoryradio>
-      <mainprogram>gtk-glade/linphone-3</mainprogram>
-      <programargs/>
-      <globaldebugarguments/>
-      <globalcwd/>
-      <useglobalprogram>false</useglobalprogram>
-      <terminal>false</terminal>
-      <autocompile>false</autocompile>
-      <autoinstall>false</autoinstall>
-      <autokdesu>false</autokdesu>
-      <envvars/>
-    </run>
-    <filetypes>
-      <filetype>*.java</filetype>
-      <filetype>*.h</filetype>
-      <filetype>*.H</filetype>
-      <filetype>*.hh</filetype>
-      <filetype>*.hxx</filetype>
-      <filetype>*.hpp</filetype>
-      <filetype>*.c</filetype>
-      <filetype>*.C</filetype>
-      <filetype>*.cc</filetype>
-      <filetype>*.cpp</filetype>
-      <filetype>*.c++</filetype>
-      <filetype>*.cxx</filetype>
-    </filetypes>
-    <blacklist>
-      <path>config.h</path>
-      <path>exosip</path>
-      <path>exosip/eXosip2.h</path>
-      <path>exosip/eXosip.c</path>
-      <path>exosip/eXosip_cfg.h</path>
-      <path>exosip/eXosip.h</path>
-      <path>exosip/eXutils.c</path>
-      <path>exosip/jauth.c</path>
-      <path>exosip/jcallback.c</path>
-      <path>exosip/jcall.c</path>
-      <path>exosip/jdialog.c</path>
-      <path>exosip/jevents.c</path>
-      <path>exosip/jfreinds.c</path>
-      <path>exosip/jidentity.c</path>
-      <path>exosip/jnotify.c</path>
-      <path>exosip/jpipe.c</path>
-      <path>exosip/jpipe.h</path>
-      <path>exosip/jpublish.c</path>
-      <path>exosip/jreg.c</path>
-      <path>exosip/jrequest.c</path>
-      <path>exosip/jresponse.c</path>
-      <path>exosip/jsubscribe.c</path>
-      <path>exosip/jsubscribers.c</path>
-      <path>exosip/misc.c</path>
-      <path>exosip/sdp_offans.c</path>
-      <path>exosip/udp.c</path>
-      <path>gnome</path>
-      <path>gnome/addressbook.c</path>
-      <path>gnome/addressbook.h</path>
-      <path>gnome/applet.c</path>
-      <path>gnome/callbacks.c</path>
-      <path>gnome/callbacks.h</path>
-      <path>gnome/friends.c</path>
-      <path>gnome/friends.h</path>
-      <path>gnome/gui_utils.c</path>
-      <path>gnome/gui_utils.h</path>
-      <path>gnome/interface.c</path>
-      <path>gnome/interface.h</path>
-      <path>gnome/linphone.c</path>
-      <path>gnome/linphone.h</path>
-      <path>gnome/main.c</path>
-      <path>gnome/presence.c</path>
-      <path>gnome/presence.h</path>
-      <path>gnome/propertybox.c</path>
-      <path>gnome/propertybox.h</path>
-      <path>gnome/support.c</path>
-      <path>gnome/support.h</path>
-      <path>gsmlib</path>
-      <path>gsmlib/code.c</path>
-      <path>gsmlib/config.h</path>
-      <path>gsmlib/debug.c</path>
-      <path>gsmlib/decode.c</path>
-      <path>gsmlib/gsmadd.c</path>
-      <path>gsmlib/gsm_create.c</path>
-      <path>gsmlib/gsm_decode.c</path>
-      <path>gsmlib/gsm_destroy.c</path>
-      <path>gsmlib/gsm_encode.c</path>
-      <path>gsmlib/gsm_explode.c</path>
-      <path>gsmlib/gsm.h</path>
-      <path>gsmlib/gsm_implode.c</path>
-      <path>gsmlib/gsm_option.c</path>
-      <path>gsmlib/gsm_print.c</path>
-      <path>gsmlib/gsm_wrapper.c</path>
-      <path>gsmlib/gsm_wrapper.h</path>
-      <path>gsmlib/long_term.c</path>
-      <path>gsmlib/lpc.c</path>
-      <path>gsmlib/preprocess.c</path>
-      <path>gsmlib/private.h</path>
-      <path>gsmlib/proto.h</path>
-      <path>gsmlib/rpe.c</path>
-      <path>gsmlib/short_term.c</path>
-      <path>gsmlib/table.c</path>
-      <path>gsmlib/toast.h</path>
-      <path>gsmlib/unproto.h</path>
-      <path>gtk</path>
-      <path>gtk/addressbook.c</path>
-      <path>gtk/addressbook.h</path>
-      <path>gtk/applet.c</path>
-      <path>gtk/callbacks.c</path>
-      <path>gtk/callbacks.h</path>
-      <path>gtk/friends.c</path>
-      <path>gtk/friends.h</path>
-      <path>gtk/gui_utils.c</path>
-      <path>gtk/gui_utils.h</path>
-      <path>gtk/interface.c</path>
-      <path>gtk/interface.h</path>
-      <path>gtk/linphone.c</path>
-      <path>gtk/linphone.h</path>
-      <path>gtk/main.c</path>
-      <path>gtk/presence.c</path>
-      <path>gtk/presence.h</path>
-      <path>gtk/propertybox.c</path>
-      <path>gtk/propertybox.h</path>
-      <path>gtk/support.c</path>
-      <path>gtk/support.h</path>
-      <path>intl</path>
-      <path>intl/bindtextdom.c</path>
-      <path>intl/cat-compat.c</path>
-      <path>intl/dcgettext.c</path>
-      <path>intl/dgettext.c</path>
-      <path>intl/explodename.c</path>
-      <path>intl/finddomain.c</path>
-      <path>intl/gettext.c</path>
-      <path>intl/gettext.h</path>
-      <path>intl/gettextP.h</path>
-      <path>intl/hash-string.h</path>
-      <path>intl/intl-compat.c</path>
-      <path>intl/l10nflist.c</path>
-      <path>intl/libgettext.h</path>
-      <path>intl/loadinfo.h</path>
-      <path>intl/loadmsgcat.c</path>
-      <path>intl/localealias.c</path>
-      <path>intl/textdomain.c</path>
-      <path>lpc10-1.5</path>
-      <path>lpc10-1.5/analys.c</path>
-      <path>lpc10-1.5/bitio.c</path>
-      <path>lpc10-1.5/bsynz.c</path>
-      <path>lpc10-1.5/chanwr.c</path>
-      <path>lpc10-1.5/dcbias.c</path>
-      <path>lpc10-1.5/decode.c</path>
-      <path>lpc10-1.5/deemp.c</path>
-      <path>lpc10-1.5/difmag.c</path>
-      <path>lpc10-1.5/dyptrk.c</path>
-      <path>lpc10-1.5/encode.c</path>
-      <path>lpc10-1.5/energy.c</path>
-      <path>lpc10-1.5/f2c.h</path>
-      <path>lpc10-1.5/f2clib.c</path>
-      <path>lpc10-1.5/ham84.c</path>
-      <path>lpc10-1.5/hp100.c</path>
-      <path>lpc10-1.5/invert.c</path>
-      <path>lpc10-1.5/irc2pc.c</path>
-      <path>lpc10-1.5/ivfilt.c</path>
-      <path>lpc10-1.5/lpc10.h</path>
-      <path>lpc10-1.5/lpc10_wrapper.c</path>
-      <path>lpc10-1.5/lpc10_wrapper.h</path>
-      <path>lpc10-1.5/lpcdec.c</path>
-      <path>lpc10-1.5/lpcenc.c</path>
-      <path>lpc10-1.5/lpcini.c</path>
-      <path>lpc10-1.5/lpfilt.c</path>
-      <path>lpc10-1.5/median.c</path>
-      <path>lpc10-1.5/mload.c</path>
-      <path>lpc10-1.5/onset.c</path>
-      <path>lpc10-1.5/pitsyn.c</path>
-      <path>lpc10-1.5/placea.c</path>
-      <path>lpc10-1.5/placev.c</path>
-      <path>lpc10-1.5/preemp.c</path>
-      <path>lpc10-1.5/prepro.c</path>
-      <path>lpc10-1.5/random.c</path>
-      <path>lpc10-1.5/rcchk.c</path>
-      <path>lpc10-1.5/synths.c</path>
-      <path>lpc10-1.5/tbdm.c</path>
-      <path>lpc10-1.5/voicin.c</path>
-      <path>lpc10-1.5/vparms.c</path>
-      <path>media_api</path>
-      <path>media_api/apitest.c</path>
-      <path>media_api/apitest.h</path>
-      <path>media_api/basiccall.c</path>
-      <path>media_api/basiccall.h</path>
-      <path>media_api/callmember.c</path>
-      <path>media_api/callmember.h</path>
-      <path>media_api/common.h</path>
-      <path>media_api/media_api.c</path>
-      <path>media_api/media_api.h</path>
-      <path>media_api/mediaflow.c</path>
-      <path>media_api/mediaflow.h</path>
-      <path>mediastreamer</path>
-      <path>mediastreamer/affine.c</path>
-      <path>mediastreamer/affine.h</path>
-      <path>mediastreamer/alsacard.c</path>
-      <path>mediastreamer/alsacard.h</path>
-      <path>mediastreamer/audiostream.c</path>
-      <path>mediastreamer/g711common.h</path>
-      <path>mediastreamer/hpuxsndcard.c</path>
-      <path>mediastreamer/jackcard.c</path>
-      <path>mediastreamer/jackcard.h</path>
-      <path>mediastreamer/mediastream.c</path>
-      <path>mediastreamer/mediastream.h</path>
-      <path>mediastreamer/msAlawdec.c</path>
-      <path>mediastreamer/msAlawdec.h</path>
-      <path>mediastreamer/msAlawenc.c</path>
-      <path>mediastreamer/msAlawenc.h</path>
-      <path>mediastreamer/msavdecoder.c</path>
-      <path>mediastreamer/msavdecoder.h</path>
-      <path>mediastreamer/msavencoder.c</path>
-      <path>mediastreamer/msavencoder.h</path>
-      <path>mediastreamer/msbuffer.c</path>
-      <path>mediastreamer/msbuffer.h</path>
-      <path>mediastreamer/ms.c</path>
-      <path>mediastreamer/mscodec.c</path>
-      <path>mediastreamer/mscodec.h</path>
-      <path>mediastreamer/mscopy.c</path>
-      <path>mediastreamer/mscopy.h</path>
-      <path>mediastreamer/msfdispatcher.c</path>
-      <path>mediastreamer/msfdispatcher.h</path>
-      <path>mediastreamer/msfifo.c</path>
-      <path>mediastreamer/msfifo.h</path>
-      <path>mediastreamer/msfilter.c</path>
-      <path>mediastreamer/msfilter.h</path>
-      <path>mediastreamer/msGSMdecoder.c</path>
-      <path>mediastreamer/msGSMdecoder.h</path>
-      <path>mediastreamer/msGSMencoder.c</path>
-      <path>mediastreamer/msGSMencoder.h</path>
-      <path>mediastreamer/ms.h</path>
-      <path>mediastreamer/msLPC10decoder.c</path>
-      <path>mediastreamer/msLPC10decoder.h</path>
-      <path>mediastreamer/msLPC10encoder.c</path>
-      <path>mediastreamer/msLPC10encoder.h</path>
-      <path>mediastreamer/msMUlawdec.c</path>
-      <path>mediastreamer/msMUlawdec.h</path>
-      <path>mediastreamer/msMUlawenc.c</path>
-      <path>mediastreamer/msMUlawenc.h</path>
-      <path>mediastreamer/msnosync.c</path>
-      <path>mediastreamer/msnosync.h</path>
-      <path>mediastreamer/msossread.c</path>
-      <path>mediastreamer/msossread.h</path>
-      <path>mediastreamer/msosswrite.c</path>
-      <path>mediastreamer/msosswrite.h</path>
-      <path>mediastreamer/msqdispatcher.c</path>
-      <path>mediastreamer/msqdispatcher.h</path>
-      <path>mediastreamer/msqueue.c</path>
-      <path>mediastreamer/msqueue.h</path>
-      <path>mediastreamer/msread.c</path>
-      <path>mediastreamer/msread.h</path>
-      <path>mediastreamer/msringplayer.c</path>
-      <path>mediastreamer/msringplayer.h</path>
-      <path>mediastreamer/msrtprecv.c</path>
-      <path>mediastreamer/msrtprecv.h</path>
-      <path>mediastreamer/msrtpsend.c</path>
-      <path>mediastreamer/msrtpsend.h</path>
-      <path>mediastreamer/mssdlout.c</path>
-      <path>mediastreamer/mssdlout.h</path>
-      <path>mediastreamer/mssmpeg.c</path>
-      <path>mediastreamer/mssmpeg.h</path>
-      <path>mediastreamer/mssoundread.c</path>
-      <path>mediastreamer/mssoundread.h</path>
-      <path>mediastreamer/mssoundwrite.c</path>
-      <path>mediastreamer/mssoundwrite.h</path>
-      <path>mediastreamer/msspeexdec.c</path>
-      <path>mediastreamer/msspeexdec.h</path>
-      <path>mediastreamer/msspeexenc.c</path>
-      <path>mediastreamer/msspeexenc.h</path>
-      <path>mediastreamer/mssync.c</path>
-      <path>mediastreamer/mssync.h</path>
-      <path>mediastreamer/mstcpclient.c</path>
-      <path>mediastreamer/mstcpclient.h</path>
-      <path>mediastreamer/mstcpserv.c</path>
-      <path>mediastreamer/mstcpserv.h</path>
-      <path>mediastreamer/mstimer.c</path>
-      <path>mediastreamer/mstimer.h</path>
-      <path>mediastreamer/mstruespeechdecoder.c</path>
-      <path>mediastreamer/mstruespeechdecoder.h</path>
-      <path>mediastreamer/mstruespeechencoder.c</path>
-      <path>mediastreamer/mstruespeechencoder.h</path>
-      <path>mediastreamer/msutils.h</path>
-      <path>mediastreamer/msv4l.c</path>
-      <path>mediastreamer/msv4l.h</path>
-      <path>mediastreamer/msvideooutput.c</path>
-      <path>mediastreamer/msvideooutput.h</path>
-      <path>mediastreamer/msvideosource.c</path>
-      <path>mediastreamer/msvideosource.h</path>
-      <path>mediastreamer/mswrite.c</path>
-      <path>mediastreamer/mswrite.h</path>
-      <path>mediastreamer/msxine.c</path>
-      <path>mediastreamer/msxine.h</path>
-      <path>mediastreamer/osscard.c</path>
-      <path>mediastreamer/osscard.h</path>
-      <path>mediastreamer/rfc2429.h</path>
-      <path>mediastreamer/ring_test.c</path>
-      <path>mediastreamer/sndcard.c</path>
-      <path>mediastreamer/sndcard.h</path>
-      <path>mediastreamer/test_alaw.c</path>
-      <path>mediastreamer/test.c</path>
-      <path>mediastreamer/test_gsm.c</path>
-      <path>mediastreamer/test_lpc10.c</path>
-      <path>mediastreamer/test_mulaw.c</path>
-      <path>mediastreamer/test_rtprecv.c</path>
-      <path>mediastreamer/test_smpeg.c</path>
-      <path>mediastreamer/test_speex.c</path>
-      <path>mediastreamer/test_truespeech.c</path>
-      <path>mediastreamer/test_v4l.c</path>
-      <path>mediastreamer/test_videostream.c</path>
-      <path>mediastreamer/test_xine.c</path>
-      <path>mediastreamer/videoclient.c</path>
-      <path>mediastreamer/videoserver.c</path>
-      <path>mediastreamer/videostream.c</path>
-      <path>mediastreamer/waveheader.h</path>
-      <path>po</path>
-      <path>po/cat-id-tbl.c</path>
-      <path>win32acm</path>
-      <path>win32acm/afl.c</path>
-      <path>win32acm/com.h</path>
-      <path>win32acm/config.h</path>
-      <path>win32acm/cpudetect.c</path>
-      <path>win32acm/cpudetect.h</path>
-      <path>win32acm/cputable.h</path>
-      <path>win32acm/driver.c</path>
-      <path>win32acm/driver.h</path>
-      <path>win32acm/elfdll.c</path>
-      <path>win32acm/ext.c</path>
-      <path>win32acm/ext.h</path>
-      <path>win32acm/ldt_keeper.c</path>
-      <path>win32acm/ldt_keeper.h</path>
-      <path>win32acm/loader.h</path>
-      <path>win32acm/module.c</path>
-      <path>win32acm/mp_msg.c</path>
-      <path>win32acm/mp_msg.h</path>
-      <path>win32acm/pe_image.c</path>
-      <path>win32acm/pe_resource.c</path>
-      <path>win32acm/registry.c</path>
-      <path>win32acm/registry.h</path>
-      <path>win32acm/resource.c</path>
-      <path>win32acm/test_truespeech.c</path>
-      <path>win32acm/win32.c</path>
-      <path>win32acm/win32codec.c</path>
-      <path>win32acm/win32codec.h</path>
-      <path>win32acm/win32.h</path>
-      <path>win32acm/wine</path>
-      <path>win32acm/wine/basetsd.h</path>
-      <path>win32acm/wine/debugtools.h</path>
-      <path>win32acm/wine/driver.h</path>
-      <path>win32acm/wine/elfdll.h</path>
-      <path>win32acm/wine/heap.h</path>
-      <path>win32acm/wine/ldt.h</path>
-      <path>win32acm/wine/mmreg.h</path>
-      <path>win32acm/wine/module.h</path>
-      <path>win32acm/wine/msacmdrv.h</path>
-      <path>win32acm/wine/msacm.h</path>
-      <path>win32acm/wine/ntdef.h</path>
-      <path>win32acm/wine/pe_image.h</path>
-      <path>win32acm/wine/poppack.h</path>
-      <path>win32acm/wine/pshpack1.h</path>
-      <path>win32acm/wine/pshpack2.h</path>
-      <path>win32acm/wine/pshpack4.h</path>
-      <path>win32acm/wine/pshpack8.h</path>
-      <path>win32acm/wine/vfw.h</path>
-      <path>win32acm/wine/winbase.h</path>
-      <path>win32acm/wine/windef.h</path>
-      <path>win32acm/wine/windows.h</path>
-      <path>win32acm/wine/winerror.h</path>
-      <path>win32acm/wine/winestring.h</path>
-      <path>win32acm/wine/winnt.h</path>
-      <path>win32acm/wine/winreg.h</path>
-      <path>win32acm/wine/winuser.h</path>
-      <path>win32acm/wineacm.h</path>
-      <path>win32acm/wrapper.h</path>
-      <path>builddate.h</path>
-    </blacklist>
-    <build>
-      <buildtool>make</buildtool>
-      <builddir/>
-    </build>
-    <other>
-      <prio>0</prio>
-      <otherbin/>
-      <defaulttarget/>
-      <otheroptions/>
-      <selectedenvironment>default</selectedenvironment>
-      <environments>
-        <default/>
-      </environments>
-    </other>
-    <make>
-      <abortonerror>true</abortonerror>
-      <numberofjobs>0</numberofjobs>
-      <prio>0</prio>
-      <dontact>false</dontact>
-      <makebin/>
-      <defaulttarget/>
-      <makeoptions/>
-      <selectedenvironment>default</selectedenvironment>
-      <environments>
-        <default/>
-      </environments>
-    </make>
-  </kdevcustomproject>
-  <kdevdebugger>
-    <general>
-      <dbgshell/>
-      <gdbpath/>
-      <configGdbScript/>
-      <runShellScript/>
-      <runGdbScript/>
-      <breakonloadinglibs>true</breakonloadinglibs>
-      <separatetty>false</separatetty>
-      <floatingtoolbar>false</floatingtoolbar>
-      <raiseGDBOnStart>false</raiseGDBOnStart>
-    </general>
-    <display>
-      <staticmembers>false</staticmembers>
-      <demanglenames>true</demanglenames>
-      <outputradix>10</outputradix>
-    </display>
-  </kdevdebugger>
-  <kdevdoctreeview>
-    <ignoretocs>
-      <toc>ada</toc>
-      <toc>ada_bugs_gcc</toc>
-      <toc>bash</toc>
-      <toc>bash_bugs</toc>
-      <toc>clanlib</toc>
-      <toc>fortran_bugs_gcc</toc>
-      <toc>gnome1</toc>
-      <toc>gnustep</toc>
-      <toc>gtk</toc>
-      <toc>gtk_bugs</toc>
-      <toc>haskell</toc>
-      <toc>haskell_bugs_ghc</toc>
-      <toc>java_bugs_gcc</toc>
-      <toc>java_bugs_sun</toc>
-      <toc>kde2book</toc>
-      <toc>libstdc++</toc>
-      <toc>opengl</toc>
-      <toc>pascal_bugs_fp</toc>
-      <toc>php</toc>
-      <toc>php_bugs</toc>
-      <toc>perl</toc>
-      <toc>perl_bugs</toc>
-      <toc>python</toc>
-      <toc>python_bugs</toc>
-      <toc>qt-kdev3</toc>
-      <toc>ruby</toc>
-      <toc>ruby_bugs</toc>
-      <toc>sdl</toc>
-      <toc>stl</toc>
-      <toc>sw</toc>
-      <toc>w3c-dom-level2-html</toc>
-      <toc>w3c-svg</toc>
-      <toc>w3c-uaag10</toc>
-      <toc>wxwidgets_bugs</toc>
-    </ignoretocs>
-    <ignoreqt_xml>
-      <toc>Guide to the Qt Translation Tools</toc>
-      <toc>Qt Assistant Manual</toc>
-      <toc>Qt Designer Manual</toc>
-      <toc>Qt Reference Documentation</toc>
-      <toc>qmake User Guide</toc>
-    </ignoreqt_xml>
-    <ignoredoxygen>
-      <toc>KDE Libraries (Doxygen)</toc>
-    </ignoredoxygen>
-  </kdevdoctreeview>
-  <kdevfilecreate>
-    <filetypes/>
-    <useglobaltypes>
-      <type ext="c" />
-      <type ext="h" />
-    </useglobaltypes>
-  </kdevfilecreate>
-  <kdevcppsupport>
-    <qt>
-      <used>false</used>
-      <version>3</version>
-      <includestyle>3</includestyle>
-      <root></root>
-      <designerintegration>EmbeddedKDevDesigner</designerintegration>
-      <qmake></qmake>
-      <designer></designer>
-      <designerpluginpaths/>
-    </qt>
-    <references/>
-    <codecompletion>
-      <automaticCodeCompletion>false</automaticCodeCompletion>
-      <automaticArgumentsHint>true</automaticArgumentsHint>
-      <automaticHeaderCompletion>true</automaticHeaderCompletion>
-      <codeCompletionDelay>250</codeCompletionDelay>
-      <argumentsHintDelay>400</argumentsHintDelay>
-      <headerCompletionDelay>250</headerCompletionDelay>
-      <showOnlyAccessibleItems>false</showOnlyAccessibleItems>
-      <completionBoxItemOrder>0</completionBoxItemOrder>
-      <howEvaluationContextMenu>true</howEvaluationContextMenu>
-      <showCommentWithArgumentHint>true</showCommentWithArgumentHint>
-      <statusBarTypeEvaluation>false</statusBarTypeEvaluation>
-      <namespaceAliases>std=_GLIBCXX_STD;__gnu_cxx=std</namespaceAliases>
-      <processPrimaryTypes>true</processPrimaryTypes>
-      <processFunctionArguments>false</processFunctionArguments>
-      <preProcessAllHeaders>false</preProcessAllHeaders>
-      <parseMissingHeadersExperimental>false</parseMissingHeadersExperimental>
-      <resolveIncludePathsUsingMakeExperimental>false</resolveIncludePathsUsingMakeExperimental>
-      <alwaysParseInBackground>true</alwaysParseInBackground>
-      <usePermanentCaching>true</usePermanentCaching>
-      <alwaysIncludeNamespaces>false</alwaysIncludeNamespaces>
-      <includePaths>.;</includePaths>
-    </codecompletion>
-    <creategettersetter>
-      <prefixGet/>
-      <prefixSet>set</prefixSet>
-      <prefixVariable>m_,_</prefixVariable>
-      <parameterName>theValue</parameterName>
-      <inlineGet>true</inlineGet>
-      <inlineSet>true</inlineSet>
-    </creategettersetter>
-    <splitheadersource>
-      <enabled>false</enabled>
-      <synchronize>true</synchronize>
-      <orientation>Vertical</orientation>
-    </splitheadersource>
-  </kdevcppsupport>
-  <kdevfileview>
-    <groups>
-      <hidenonprojectfiles>false</hidenonprojectfiles>
-      <hidenonlocation>false</hidenonlocation>
-    </groups>
-    <tree>
-      <hidepatterns>*.o,*.lo,CVS</hidepatterns>
-      <hidenonprojectfiles>false</hidenonprojectfiles>
-    </tree>
-  </kdevfileview>
-  <cppsupportpart>
-    <filetemplates>
-      <interfacesuffix>.h</interfacesuffix>
-      <implementationsuffix>.cpp</implementationsuffix>
-    </filetemplates>
-  </cppsupportpart>
-</kdevelop>
diff --git a/linphone/linphone.spec.in b/linphone/linphone.spec.in
deleted file mode 100644 (file)
index 3bdeeea..0000000
+++ /dev/null
@@ -1,258 +0,0 @@
-# -*- rpm-spec -*-
-
-## rpmbuild options
-
-# default is to build with video support & without truespeech support
-%define                video           %{?_without_video:0}%{!?_without_video:1}
-%define                truespeech      %{?_with_truespeech:1}%{!?_with_truespeech:0}
-
-# Linphone requires an old osip version, sometimes (e.g. fc6)
-# delivered as "compat-"
-%define _without_old_osip      0
-
-Name:           linphone
-Version:        @VERSION@
-Release:        1%{?dist}
-Summary:        Phone anywhere in the whole world by using the Internet
-
-Group:          Applications/Communications
-License:        GPL
-URL:            http://www.linphone.org
-Source0:        http://download.savannah.gnu.org/releases/linphone/stable/source/%{name}-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-%ifarch %{ix86}
-BuildArch:     i686
-%endif
-
-BuildRequires:  gnome-panel-devel libgnomeui-devel glib2-devel alsa-lib-devel
-BuildRequires:  libosip2-devel speex-devel gettext desktop-file-utils
-BuildRequires: readline-devel ncurses-devel
-BuildRequires:  intltool gettext-devel
-%if %{video}
-BuildRequires: ffmpeg-devel SDL-devel
-%endif
-
-%description
-Linphone is mostly sip compliant. It works successfully with these
-implementations:
-    * eStara softphone (commercial software for windows)
-    * Pingtel phones (with DNS enabled and VLAN QOS support disabled).
-    * Hotsip, a free of charge phone for Windows.
-    * Vocal, an open source SIP stack from Vovida that includes a SIP proxy
-        that works with linphone since version 0.7.1.
-    * Siproxd is a free sip proxy being developped by Thomas Ries because he
-        would like to have linphone working behind his firewall. Siproxd is
-        simple to setup and works perfectly with linphone.
-    * Partysip aims at being a generic and fully functionnal SIP proxy. Visit
-        the web page for more details on its functionalities.
-
-Linphone may work also with other sip phones, but this has not been tested yet.
-
-%package devel
-Summary:        Development libraries for linphone
-Group:          Development/Libraries
-Requires:       %{name} = %{version}-%{release}
-Requires:      ortp-devel = @ORTP_VERSION@
-Requires:      glib2-devel
-
-%description    devel
-Libraries and headers required to develop software with linphone.
-
-%package -n ortp
-Summary:        A C library implementing the RTP protocol (rfc1889)
-Group:          System Environment/Libraries
-Version:        @ORTP_VERSION@
-
-%description -n ortp
-oRTP is a LGPL licensed C library implementing the RTP protocol (rfc1889). It
-is available for most *nix clones (primilarly Linux and HP-UX), and Win32.
-
-%package -n ortp-devel
-Summary:        Development libraries for ortp
-Group:          Development/Libraries
-Version:        @ORTP_VERSION@
-Requires:      ortp = @ORTP_VERSION@
-
-%description -n ortp-devel
-oRTP is a LGPL licensed C library implementing the RTP protocol (rfc1889). It
-is available for most *nix clones (primilarly Linux and HP-UX), and Win32.
-
-This package contains header files and development libraries needed to
-develop programs using the oRTP library.
-
-%package -n mediastreamer2
-Summary:        Audio/Video real-time streaming
-Group:          Development/Libraries
-Version:        @MS2_VERSION@
-
-%description -n mediastreamer2
-Mediastreamer2 is a GPL licensed library to make audio and video
-real-time streaming and processing. Written in pure C, it is based
-upon the oRTP library.
-
-%package -n mediastreamer2-devel
-Summary:        Headers, libraries and docs for the mediastreamer2 library
-Group:          Development/Libraries
-Version:        @MS2_VERSION@
-Requires:      mediastreamer2 = @MS2_VERSION@
-Requires:      ortp-devel = @ORTP_VERSION@
-
-%description -n mediastreamer2-devel
-Mediastreamer2 is a GPL licensed library to make audio and video
-real-time streaming and processing. Written in pure C, it is based
-upon the ortp library.
-
-This package contains header files and development libraries needed to
-develop programs using the mediastreamer2 library.
-
-%prep
-%setup -q
-#%patch -p 1 -b .pkgconfig
-#%patch1 -p 1 -b .Werror
-#%patch2 -p 1 -b .old
-
-%build
-%configure \
-       --with-osip=/usr \
-       --with-speex=/usr \
-       --with-readline=/usr \
-%if %{video}
-       --enable-video \
-       --with-ffmpeg=/usr \
-       --with-sdl=/usr \
-%endif
-%if %{truespeech}
-       --enable-truespeech \
-%endif
-%{?_without_old_osip: --with-osip-version=2.2.2} \
-       --enable-ipv6
-%__make %{?_smp_mflags}
-
-
-%install
-rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT
-install -p -m 0644 pixmaps/linphone2.png $RPM_BUILD_ROOT%{_datadir}/pixmaps
-%find_lang %{name}
-rm $RPM_BUILD_ROOT%{_datadir}/gnome/apps/Internet/linphone.desktop
-desktop-file-install --vendor=fedora \
-  --delete-original \
-  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
-  --add-category X-Fedora \
-  --add-category Telephony \
-  --add-category GTK \
-  $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%post -p /sbin/ldconfig
-
-%postun -p /sbin/ldconfig
-
-%post -n ortp -p /sbin/ldconfig
-
-%postun -n ortp -p /sbin/ldconfig
-
-%post -n mediastreamer2 -p /sbin/ldconfig
-
-%postun -n mediastreamer2 -p /sbin/ldconfig
-
-%files -f %{name}.lang
-%defattr(-,root,root)
-%doc AUTHORS ChangeLog COPYING NEWS README TODO
-%{_bindir}/*
-%{_libdir}/bonobo/servers/*.server
-%{_libdir}/liblinphone.so.*
-%exclude %{_libdir}/libortp*
-%{_libexecdir}/*
-%{_mandir}/*
-%{_datadir}/applications/*%{name}.desktop
-%{_datadir}/gnome/help/linphone
-%{_datadir}/gnome-2.0/ui/*.xml
-%{_datadir}/pixmaps/linphone
-%{_datadir}/pixmaps/linphone2.png
-%{_datadir}/sounds/linphone
-
-%files devel
-%defattr(-,root,root)
-%{_includedir}/linphone
-%{_libdir}/liblinphone.a
-%{_libdir}/liblinphone.la
-%{_libdir}/liblinphone.so
-%{_libdir}/pkgconfig/linphone.pc
-
-%files -n ortp
-%defattr(-,root,root)
-%doc oRTP/AUTHORS oRTP/ChangeLog oRTP/COPYING oRTP/NEWS oRTP/README oRTP/TODO
-%{_libdir}/libortp.so.*
-%exclude %{_libdir}/liblinphone*
-
-%files -n ortp-devel
-%defattr(-,root,root)
-%{_includedir}/ortp
-%{_libdir}/pkgconfig/ortp.pc
-%{_libdir}/libortp.a
-%{_libdir}/libortp.la
-%{_libdir}/libortp.so
-%{_datadir}/gtk-doc/html/ortp
-
-%files -n mediastreamer2
-%defattr(-,root,root)
-%doc mediastreamer2/AUTHORS mediastreamer2/ChangeLog mediastreamer2/COPYING
-%doc mediastreamer2/NEWS mediastreamer2/README
-%{_libdir}/libmediastreamer.so.*
-%{_libdir}/libquickstream.so.*
-
-%files -n mediastreamer2-devel
-%{_includedir}/mediastreamer2
-%{_libdir}/pkgconfig/mediastreamer.pc
-%{_libdir}/libmediastreamer.so
-%{_libdir}/libmediastreamer.*a
-%{_libdir}/libquickstream.so
-%{_libdir}/libquickstream.*a
-
-%changelog
-* Wed Sep 28 2005 Francois-Xavier 'FiX' KOWALSKI <francois-xavier.kowalski@hp.com> - 1.2.0pre3
-- Updated to latests Simon's work
-
-* Fri May 27 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 1.0.1-3
-- Fix multiple menu entry and missing icon (#158975)
-- Clean up spec file
-
-* Fri May  6 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 1.0.1-2
-- Fix libosip2-devel BR
-
-* Wed May  4 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 1.0.1-1
-- Update to 1.0.1
-- Port patches from devel
-
-* Wed Mar 23 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.12.2-7
-- pkgconfig and -devel fixes
-
-* Wed Mar 23 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.12.2-6
-- Fix build on x86_64
-
-* Sat Mar 19 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.12.2-5
-- %%
-
-* Sat Mar 19 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.12.2-4
-- Used %%find_lang
-- Tightened up %%files
-- Streamlined spec file
-
-* Thu Mar 17 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.12.2-3
-- Broke %%description at 80 columns
-
-* Wed Mar 16 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.12.2-2
-- Removed explicit Requires
-
-* Tue Mar 15 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.12.2-1
-- Bump release to 1
-- Cleaned up the -docs and -speex patches
-
-* Fri Jan 21 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0:0.12.2-0.iva.1
-- Fixed a silly spec error
-
-* Fri Jan 21 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0:0.12.2-0.iva.0
-- Initial RPM release.
diff --git a/linphone/m4/.gitignore b/linphone/m4/.gitignore
deleted file mode 100644 (file)
index 79171ee..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-Makefile
-Makefile.in
-intltool.m4
-libtool.m4
-ltoptions.m4
-ltsugar.m4
-ltversion.m4
-lt~obsolete.m4
-
diff --git a/linphone/m4/Makefile.am b/linphone/m4/Makefile.am
deleted file mode 100644 (file)
index 562029e..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-EXTRA_DIST= $(shell cd $(srcdir) && ls *.m4)
-
diff --git a/linphone/m4/codeset.m4 b/linphone/m4/codeset.m4
deleted file mode 100644 (file)
index 223955b..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# codeset.m4 serial 2 (gettext-0.16)
-dnl Copyright (C) 2000-2002, 2006 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_DEFUN([AM_LANGINFO_CODESET],
-[
-  AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
-    [AC_TRY_LINK([#include <langinfo.h>],
-      [char* cs = nl_langinfo(CODESET); return !cs;],
-      am_cv_langinfo_codeset=yes,
-      am_cv_langinfo_codeset=no)
-    ])
-  if test $am_cv_langinfo_codeset = yes; then
-    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
-      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
-  fi
-])
diff --git a/linphone/m4/exosip.m4 b/linphone/m4/exosip.m4
deleted file mode 100644 (file)
index d3f89ee..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-dnl -*- autoconf -*-
-AC_DEFUN([LP_SETUP_EXOSIP],[
-AC_REQUIRE([AC_CANONICAL_HOST])
-AC_REQUIRE([LP_CHECK_OSIP2])
-
-dnl eXosip embeded stuff
-EXOSIP_CFLAGS="$OSIP_CFLAGS -DOSIP_MT "
-EXOSIP_LIBS="$OSIP_LIBS -leXosip2  "
-
-CPPFLAGS_save=$CPPFLAGS
-CPPFLAGS="$OSIP_CFLAGS $CPPFLAGS"
-AC_CHECK_HEADER([eXosip2/eXosip.h], ,AC_MSG_ERROR([Could not find eXosip2 headers !]))
-CPPFLAGS=$CPPFLAGS_save
-
-dnl check for eXosip2 libs
-LDFLAGS_save=$LDFLAGS
-LDFLAGS="$OSIP_LIBS $LDFLAGS"
-LIBS_save=$LIBS
-AC_CHECK_LIB([eXosip2],[eXosip_subscribe_remove],
-       [],
-       [AC_MSG_ERROR([Could not find eXosip2 library with version >= 3.0.2 !])],
-       [-losipparser2 -losip2 ])
-AC_CHECK_LIB([eXosip2],[eXosip_get_version],
-       [AC_DEFINE([HAVE_EXOSIP_GET_VERSION],[1],[Defined when eXosip_get_version is available])],
-       [],
-       [-losipparser2 -losip2 ])
-dnl AC_CHECK_LIB([eXosip2],[eXosip_get_naptr],
-dnl    [AC_DEFINE([HAVE_EXOSIP_NAPTR_SUPPORT],[1],[Defined when eXosip_get_naptr is available])],
-dnl    [],
-dnl    [-losipparser2 -losip2 ])
-LIBS=$LIBS_save
-LDFLAGS=$LDFLAGS_save
-
-AC_SUBST(EXOSIP_CFLAGS)
-AC_SUBST(EXOSIP_LIBS)
-])
diff --git a/linphone/m4/gettext.m4 b/linphone/m4/gettext.m4
deleted file mode 100644 (file)
index 91c345e..0000000
+++ /dev/null
@@ -1,419 +0,0 @@
-# gettext.m4 serial 59 (gettext-0.16.1)
-dnl Copyright (C) 1995-2006 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Authors:
-dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
-dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2006.
-
-dnl Macro to add for using GNU gettext.
-
-dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
-dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
-dnl    default (if it is not specified or empty) is 'no-libtool'.
-dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
-dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
-dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
-dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
-dnl    depending on --{enable,disable}-{shared,static} and on the presence of
-dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
-dnl    $(top_builddir)/intl/libintl.a will be created.
-dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
-dnl    implementations (in libc or libintl) without the ngettext() function
-dnl    will be ignored.  If NEEDSYMBOL is specified and is
-dnl    'need-formatstring-macros', then GNU gettext implementations that don't
-dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
-dnl INTLDIR is used to find the intl libraries.  If empty,
-dnl    the value `$(top_builddir)/intl/' is used.
-dnl
-dnl The result of the configuration is one of three cases:
-dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
-dnl    and used.
-dnl    Catalog format: GNU --> install in $(datadir)
-dnl    Catalog extension: .mo after installation, .gmo in source tree
-dnl 2) GNU gettext has been found in the system's C library.
-dnl    Catalog format: GNU --> install in $(datadir)
-dnl    Catalog extension: .mo after installation, .gmo in source tree
-dnl 3) No internationalization, always use English msgid.
-dnl    Catalog format: none
-dnl    Catalog extension: none
-dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
-dnl The use of .gmo is historical (it was needed to avoid overwriting the
-dnl GNU format catalogs when building on a platform with an X/Open gettext),
-dnl but we keep it in order not to force irrelevant filename changes on the
-dnl maintainers.
-dnl
-AC_DEFUN([AM_GNU_GETTEXT],
-[
-  dnl Argument checking.
-  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
-    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
-])])])])])
-  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
-    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
-])])])])
-  define([gt_included_intl],
-    ifelse([$1], [external],
-      ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
-      [yes]))
-  define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
-  gt_NEEDS_INIT
-  AM_GNU_GETTEXT_NEED([$2])
-
-  AC_REQUIRE([AM_PO_SUBDIRS])dnl
-  ifelse(gt_included_intl, yes, [
-    AC_REQUIRE([AM_INTL_SUBDIR])dnl
-  ])
-
-  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
-  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-  AC_REQUIRE([AC_LIB_RPATH])
-
-  dnl Sometimes libintl requires libiconv, so first search for libiconv.
-  dnl Ideally we would do this search only after the
-  dnl      if test "$USE_NLS" = "yes"; then
-  dnl        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
-  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
-  dnl the configure script would need to contain the same shell code
-  dnl again, outside any 'if'. There are two solutions:
-  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
-  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
-  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
-  dnl documented, we avoid it.
-  ifelse(gt_included_intl, yes, , [
-    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
-  ])
-
-  dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
-  gt_INTL_MACOSX
-
-  dnl Set USE_NLS.
-  AC_REQUIRE([AM_NLS])
-
-  ifelse(gt_included_intl, yes, [
-    BUILD_INCLUDED_LIBINTL=no
-    USE_INCLUDED_LIBINTL=no
-  ])
-  LIBINTL=
-  LTLIBINTL=
-  POSUB=
-
-  dnl Add a version number to the cache macros.
-  case " $gt_needs " in
-    *" need-formatstring-macros "*) gt_api_version=3 ;;
-    *" need-ngettext "*) gt_api_version=2 ;;
-    *) gt_api_version=1 ;;
-  esac
-  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
-  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
-
-  dnl If we use NLS figure out what method
-  if test "$USE_NLS" = "yes"; then
-    gt_use_preinstalled_gnugettext=no
-    ifelse(gt_included_intl, yes, [
-      AC_MSG_CHECKING([whether included gettext is requested])
-      AC_ARG_WITH(included-gettext,
-        [  --with-included-gettext use the GNU gettext library included here],
-        nls_cv_force_use_gnu_gettext=$withval,
-        nls_cv_force_use_gnu_gettext=no)
-      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
-
-      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
-      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
-    ])
-        dnl User does not insist on using GNU NLS library.  Figure out what
-        dnl to use.  If GNU gettext is available we use this.  Else we have
-        dnl to fall back to GNU NLS library.
-
-        if test $gt_api_version -ge 3; then
-          gt_revision_test_code='
-#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
-#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
-#endif
-changequote(,)dnl
-typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
-changequote([,])dnl
-'
-        else
-          gt_revision_test_code=
-        fi
-        if test $gt_api_version -ge 2; then
-          gt_expression_test_code=' + * ngettext ("", "", 0)'
-        else
-          gt_expression_test_code=
-        fi
-
-        AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
-         [AC_TRY_LINK([#include <libintl.h>
-$gt_revision_test_code
-extern int _nl_msg_cat_cntr;
-extern int *_nl_domain_bindings;],
-            [bindtextdomain ("", "");
-return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
-            [eval "$gt_func_gnugettext_libc=yes"],
-            [eval "$gt_func_gnugettext_libc=no"])])
-
-        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
-          dnl Sometimes libintl requires libiconv, so first search for libiconv.
-          ifelse(gt_included_intl, yes, , [
-            AM_ICONV_LINK
-          ])
-          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
-          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
-          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
-          dnl even if libiconv doesn't exist.
-          AC_LIB_LINKFLAGS_BODY([intl])
-          AC_CACHE_CHECK([for GNU gettext in libintl],
-            [$gt_func_gnugettext_libintl],
-           [gt_save_CPPFLAGS="$CPPFLAGS"
-            CPPFLAGS="$CPPFLAGS $INCINTL"
-            gt_save_LIBS="$LIBS"
-            LIBS="$LIBS $LIBINTL"
-            dnl Now see whether libintl exists and does not depend on libiconv.
-            AC_TRY_LINK([#include <libintl.h>
-$gt_revision_test_code
-extern int _nl_msg_cat_cntr;
-extern
-#ifdef __cplusplus
-"C"
-#endif
-const char *_nl_expand_alias (const char *);],
-              [bindtextdomain ("", "");
-return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
-              [eval "$gt_func_gnugettext_libintl=yes"],
-              [eval "$gt_func_gnugettext_libintl=no"])
-            dnl Now see whether libintl exists and depends on libiconv.
-            if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
-              LIBS="$LIBS $LIBICONV"
-              AC_TRY_LINK([#include <libintl.h>
-$gt_revision_test_code
-extern int _nl_msg_cat_cntr;
-extern
-#ifdef __cplusplus
-"C"
-#endif
-const char *_nl_expand_alias (const char *);],
-                [bindtextdomain ("", "");
-return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
-               [LIBINTL="$LIBINTL $LIBICONV"
-                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
-                eval "$gt_func_gnugettext_libintl=yes"
-               ])
-            fi
-            CPPFLAGS="$gt_save_CPPFLAGS"
-            LIBS="$gt_save_LIBS"])
-        fi
-
-        dnl If an already present or preinstalled GNU gettext() is found,
-        dnl use it.  But if this macro is used in GNU gettext, and GNU
-        dnl gettext is already preinstalled in libintl, we update this
-        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
-        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
-           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
-                && test "$PACKAGE" != gettext-runtime \
-                && test "$PACKAGE" != gettext-tools; }; then
-          gt_use_preinstalled_gnugettext=yes
-        else
-          dnl Reset the values set by searching for libintl.
-          LIBINTL=
-          LTLIBINTL=
-          INCINTL=
-        fi
-
-    ifelse(gt_included_intl, yes, [
-        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
-          dnl GNU gettext is not found in the C library.
-          dnl Fall back on included GNU gettext library.
-          nls_cv_use_gnu_gettext=yes
-        fi
-      fi
-
-      if test "$nls_cv_use_gnu_gettext" = "yes"; then
-        dnl Mark actions used to generate GNU NLS library.
-        BUILD_INCLUDED_LIBINTL=yes
-        USE_INCLUDED_LIBINTL=yes
-        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
-        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
-        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
-      fi
-
-      CATOBJEXT=
-      if test "$gt_use_preinstalled_gnugettext" = "yes" \
-         || test "$nls_cv_use_gnu_gettext" = "yes"; then
-        dnl Mark actions to use GNU gettext tools.
-        CATOBJEXT=.gmo
-      fi
-    ])
-
-    if test -n "$INTL_MACOSX_LIBS"; then
-      if test "$gt_use_preinstalled_gnugettext" = "yes" \
-         || test "$nls_cv_use_gnu_gettext" = "yes"; then
-        dnl Some extra flags are needed during linking.
-        LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
-        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
-      fi
-    fi
-
-    if test "$gt_use_preinstalled_gnugettext" = "yes" \
-       || test "$nls_cv_use_gnu_gettext" = "yes"; then
-      AC_DEFINE(ENABLE_NLS, 1,
-        [Define to 1 if translation of program messages to the user's native language
-   is requested.])
-    else
-      USE_NLS=no
-    fi
-  fi
-
-  AC_MSG_CHECKING([whether to use NLS])
-  AC_MSG_RESULT([$USE_NLS])
-  if test "$USE_NLS" = "yes"; then
-    AC_MSG_CHECKING([where the gettext function comes from])
-    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
-      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
-        gt_source="external libintl"
-      else
-        gt_source="libc"
-      fi
-    else
-      gt_source="included intl directory"
-    fi
-    AC_MSG_RESULT([$gt_source])
-  fi
-
-  if test "$USE_NLS" = "yes"; then
-
-    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
-      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
-        AC_MSG_CHECKING([how to link with libintl])
-        AC_MSG_RESULT([$LIBINTL])
-        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
-      fi
-
-      dnl For backward compatibility. Some packages may be using this.
-      AC_DEFINE(HAVE_GETTEXT, 1,
-       [Define if the GNU gettext() function is already present or preinstalled.])
-      AC_DEFINE(HAVE_DCGETTEXT, 1,
-       [Define if the GNU dcgettext() function is already present or preinstalled.])
-    fi
-
-    dnl We need to process the po/ directory.
-    POSUB=po
-  fi
-
-  ifelse(gt_included_intl, yes, [
-    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
-    dnl to 'yes' because some of the testsuite requires it.
-    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
-      BUILD_INCLUDED_LIBINTL=yes
-    fi
-
-    dnl Make all variables we use known to autoconf.
-    AC_SUBST(BUILD_INCLUDED_LIBINTL)
-    AC_SUBST(USE_INCLUDED_LIBINTL)
-    AC_SUBST(CATOBJEXT)
-
-    dnl For backward compatibility. Some configure.ins may be using this.
-    nls_cv_header_intl=
-    nls_cv_header_libgt=
-
-    dnl For backward compatibility. Some Makefiles may be using this.
-    DATADIRNAME=share
-    AC_SUBST(DATADIRNAME)
-
-    dnl For backward compatibility. Some Makefiles may be using this.
-    INSTOBJEXT=.mo
-    AC_SUBST(INSTOBJEXT)
-
-    dnl For backward compatibility. Some Makefiles may be using this.
-    GENCAT=gencat
-    AC_SUBST(GENCAT)
-
-    dnl For backward compatibility. Some Makefiles may be using this.
-    INTLOBJS=
-    if test "$USE_INCLUDED_LIBINTL" = yes; then
-      INTLOBJS="\$(GETTOBJS)"
-    fi
-    AC_SUBST(INTLOBJS)
-
-    dnl Enable libtool support if the surrounding package wishes it.
-    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
-    AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
-  ])
-
-  dnl For backward compatibility. Some Makefiles may be using this.
-  INTLLIBS="$LIBINTL"
-  AC_SUBST(INTLLIBS)
-
-  dnl Make all documented variables known to autoconf.
-  AC_SUBST(LIBINTL)
-  AC_SUBST(LTLIBINTL)
-  AC_SUBST(POSUB)
-])
-
-
-dnl Checks for special options needed on MacOS X.
-dnl Defines INTL_MACOSX_LIBS.
-AC_DEFUN([gt_INTL_MACOSX],
-[
-  dnl Check for API introduced in MacOS X 10.2.
-  AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
-    gt_cv_func_CFPreferencesCopyAppValue,
-    [gt_save_LIBS="$LIBS"
-     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
-     AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
-       [CFPreferencesCopyAppValue(NULL, NULL)],
-       [gt_cv_func_CFPreferencesCopyAppValue=yes],
-       [gt_cv_func_CFPreferencesCopyAppValue=no])
-     LIBS="$gt_save_LIBS"])
-  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
-    AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
-      [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
-  fi
-  dnl Check for API introduced in MacOS X 10.3.
-  AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
-    [gt_save_LIBS="$LIBS"
-     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
-     AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
-       [gt_cv_func_CFLocaleCopyCurrent=yes],
-       [gt_cv_func_CFLocaleCopyCurrent=no])
-     LIBS="$gt_save_LIBS"])
-  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
-    AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
-      [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
-  fi
-  INTL_MACOSX_LIBS=
-  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
-    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
-  fi
-  AC_SUBST([INTL_MACOSX_LIBS])
-])
-
-
-dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
-m4_define([gt_NEEDS_INIT],
-[
-  m4_divert_text([DEFAULTS], [gt_needs=])
-  m4_define([gt_NEEDS_INIT], [])
-])
-
-
-dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
-AC_DEFUN([AM_GNU_GETTEXT_NEED],
-[
-  m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
-])
-
-
-dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
-AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
diff --git a/linphone/m4/glibc2.m4 b/linphone/m4/glibc2.m4
deleted file mode 100644 (file)
index e8f5bfe..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-# glibc2.m4 serial 1
-dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-# Test for the GNU C Library, version 2.0 or newer.
-# From Bruno Haible.
-
-AC_DEFUN([gt_GLIBC2],
-  [
-    AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer,
-      ac_cv_gnu_library_2,
-      [AC_EGREP_CPP([Lucky GNU user],
-       [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ >= 2)
-  Lucky GNU user
- #endif
-#endif
-       ],
-       ac_cv_gnu_library_2=yes,
-       ac_cv_gnu_library_2=no)
-      ]
-    )
-    AC_SUBST(GLIBC2)
-    GLIBC2="$ac_cv_gnu_library_2"
-  ]
-)
diff --git a/linphone/m4/glibc21.m4 b/linphone/m4/glibc21.m4
deleted file mode 100644 (file)
index d95fd98..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-# glibc21.m4 serial 3
-dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-# Test for the GNU C Library, version 2.1 or newer.
-# From Bruno Haible.
-
-AC_DEFUN([gl_GLIBC21],
-  [
-    AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
-      ac_cv_gnu_library_2_1,
-      [AC_EGREP_CPP([Lucky GNU user],
-       [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
-  Lucky GNU user
- #endif
-#endif
-       ],
-       ac_cv_gnu_library_2_1=yes,
-       ac_cv_gnu_library_2_1=no)
-      ]
-    )
-    AC_SUBST(GLIBC21)
-    GLIBC21="$ac_cv_gnu_library_2_1"
-  ]
-)
diff --git a/linphone/m4/iconv.m4 b/linphone/m4/iconv.m4
deleted file mode 100644 (file)
index 654c415..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-# iconv.m4 serial AM4 (gettext-0.11.3)
-dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
-[
-  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
-  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-  AC_REQUIRE([AC_LIB_RPATH])
-
-  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
-  dnl accordingly.
-  AC_LIB_LINKFLAGS_BODY([iconv])
-])
-
-AC_DEFUN([AM_ICONV_LINK],
-[
-  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
-  dnl those with the standalone portable GNU libiconv installed).
-
-  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
-  dnl accordingly.
-  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
-
-  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
-  dnl because if the user has installed libiconv and not disabled its use
-  dnl via --without-libiconv-prefix, he wants to use it. The first
-  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
-  am_save_CPPFLAGS="$CPPFLAGS"
-  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
-
-  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
-    am_cv_func_iconv="no, consider installing GNU libiconv"
-    am_cv_lib_iconv=no
-    AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
-      [iconv_t cd = iconv_open("","");
-       iconv(cd,NULL,NULL,NULL,NULL);
-       iconv_close(cd);],
-      am_cv_func_iconv=yes)
-    if test "$am_cv_func_iconv" != yes; then
-      am_save_LIBS="$LIBS"
-      LIBS="$LIBS $LIBICONV"
-      AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
-        [iconv_t cd = iconv_open("","");
-         iconv(cd,NULL,NULL,NULL,NULL);
-         iconv_close(cd);],
-        am_cv_lib_iconv=yes
-        am_cv_func_iconv=yes)
-      LIBS="$am_save_LIBS"
-    fi
-  ])
-  if test "$am_cv_func_iconv" = yes; then
-    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
-  fi
-  if test "$am_cv_lib_iconv" = yes; then
-    AC_MSG_CHECKING([how to link with libiconv])
-    AC_MSG_RESULT([$LIBICONV])
-  else
-    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
-    dnl either.
-    CPPFLAGS="$am_save_CPPFLAGS"
-    LIBICONV=
-    LTLIBICONV=
-  fi
-  AC_SUBST(LIBICONV)
-  AC_SUBST(LTLIBICONV)
-])
-
-AC_DEFUN([AM_ICONV],
-[
-  AM_ICONV_LINK
-  if test "$am_cv_func_iconv" = yes; then
-    AC_MSG_CHECKING([for iconv declaration])
-    AC_CACHE_VAL(am_cv_proto_iconv, [
-      AC_TRY_COMPILE([
-#include <stdlib.h>
-#include <iconv.h>
-extern
-#ifdef __cplusplus
-"C"
-#endif
-#if defined(__STDC__) || defined(__cplusplus)
-size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
-#else
-size_t iconv();
-#endif
-], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
-      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
-    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
-    AC_MSG_RESULT([$]{ac_t:-
-         }[$]am_cv_proto_iconv)
-    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
-      [Define as const if the declaration of iconv() needs const.])
-  fi
-])
diff --git a/linphone/m4/ilbc.m4 b/linphone/m4/ilbc.m4
deleted file mode 100644 (file)
index 465f850..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-AC_DEFUN([LP_CHECK_ILBC],[
-
-AC_ARG_WITH( ilbc,
-      [  --with-ilbc      Set prefix where ilbc headers and libs can be found (ex:/usr, /usr/local, none to disable ilbc support) [default=/usr] ],
-      [ ilbc_prefix=${withval}],[ ilbc_prefix="/usr" ])
-
-if test "$ilbc_prefix" = "none" ; then
-       AC_MSG_NOTICE([iLBC codec support disabled. ])
-else
-       ILBC_CFLAGS=" -I${ilbc_prefix}/include/ilbc"
-       ILBC_LIBS="-L${ilbc_prefix}/lib -lilbc -lm"
-       CPPFLAGS_save=$CPPFLAGS
-       CPPFLAGS=$ILBC_CFLAGS
-       LDFLAGS_save=$LDFLAGS
-       LDFLAGS=$ILBC_LIBS
-       AC_CHECK_HEADERS(iLBC_decode.h,[AC_CHECK_LIB(ilbc,iLBC_decode,ilbc_found=yes,ilbc_found=no)
-       ],ilbc_found=no)
-       
-       CPPFLAGS=$CPPFLAGS_save
-       LDFLAGS=$LDFLAGS_save
-       
-       if test "$ilbc_found" = "no" ; then
-               AC_MSG_WARN([Could not find ilbc headers or libs. Please install ilbc package from http://www.linphone.org if you want iLBC codec support in linphone.])
-               ILBC_CFLAGS=
-               ILBC_LIBS=
-       else
-               AC_DEFINE(HAVE_ILBC,1,[Defined when we have ilbc codec lib])
-               AC_SUBST(ILBC_CFLAGS)
-               AC_SUBST(ILBC_LIBS)
-       fi      
-fi
-
-])
diff --git a/linphone/m4/intdiv0.m4 b/linphone/m4/intdiv0.m4
deleted file mode 100644 (file)
index b8d7817..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-# intdiv0.m4 serial 1 (gettext-0.11.3)
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_DEFUN([gt_INTDIV0],
-[
-  AC_REQUIRE([AC_PROG_CC])dnl
-  AC_REQUIRE([AC_CANONICAL_HOST])dnl
-
-  AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
-    gt_cv_int_divbyzero_sigfpe,
-    [
-      AC_TRY_RUN([
-#include <stdlib.h>
-#include <signal.h>
-
-static void
-#ifdef __cplusplus
-sigfpe_handler (int sig)
-#else
-sigfpe_handler (sig) int sig;
-#endif
-{
-  /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
-  exit (sig != SIGFPE);
-}
-
-int x = 1;
-int y = 0;
-int z;
-int nan;
-
-int main ()
-{
-  signal (SIGFPE, sigfpe_handler);
-/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */
-#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
-  signal (SIGTRAP, sigfpe_handler);
-#endif
-/* Linux/SPARC yields signal SIGILL.  */
-#if defined (__sparc__) && defined (__linux__)
-  signal (SIGILL, sigfpe_handler);
-#endif
-
-  z = x / y;
-  nan = y / y;
-  exit (1);
-}
-], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
-        [
-          # Guess based on the CPU.
-          case "$host_cpu" in
-            alpha* | i[34567]86 | m68k | s390*)
-              gt_cv_int_divbyzero_sigfpe="guessing yes";;
-            *)
-              gt_cv_int_divbyzero_sigfpe="guessing no";;
-          esac
-        ])
-    ])
-  case "$gt_cv_int_divbyzero_sigfpe" in
-    *yes) value=1;;
-    *) value=0;;
-  esac
-  AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
-    [Define if integer division by zero raises signal SIGFPE.])
-])
diff --git a/linphone/m4/intl.m4 b/linphone/m4/intl.m4
deleted file mode 100644 (file)
index dcefb11..0000000
+++ /dev/null
@@ -1,259 +0,0 @@
-# intl.m4 serial 3 (gettext-0.16)
-dnl Copyright (C) 1995-2006 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Authors:
-dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
-dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2006.
-
-AC_PREREQ(2.52)
-
-dnl Checks for all prerequisites of the intl subdirectory,
-dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
-dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
-AC_DEFUN([AM_INTL_SUBDIR],
-[
-  AC_REQUIRE([AC_PROG_INSTALL])dnl
-  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
-  AC_REQUIRE([AC_PROG_CC])dnl
-  AC_REQUIRE([AC_CANONICAL_HOST])dnl
-  AC_REQUIRE([gt_GLIBC2])dnl
-  AC_REQUIRE([AC_PROG_RANLIB])dnl
-  AC_REQUIRE([gl_VISIBILITY])dnl
-  AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl
-  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl
-  AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
-  AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
-  AC_REQUIRE([gt_TYPE_WINT_T])dnl
-  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
-  AC_REQUIRE([gt_TYPE_INTMAX_T])
-  AC_REQUIRE([gt_PRINTF_POSIX])
-  AC_REQUIRE([gl_GLIBC21])dnl
-  AC_REQUIRE([gl_XSIZE])dnl
-  AC_REQUIRE([gt_INTL_MACOSX])dnl
-
-  AC_CHECK_TYPE([ptrdiff_t], ,
-    [AC_DEFINE([ptrdiff_t], [long],
-       [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
-    ])
-  AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
-  AC_CHECK_FUNCS([asprintf fwprintf putenv setenv setlocale snprintf wcslen])
-
-  dnl Use the _snprintf function only if it is declared (because on NetBSD it
-  dnl is defined as a weak alias of snprintf; we prefer to use the latter).
-  gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
-  gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
-
-  dnl Use the *_unlocked functions only if they are declared.
-  dnl (because some of them were defined without being declared in Solaris
-  dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
-  dnl on Solaris 2.5.1 to run on Solaris 2.6).
-  dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
-  gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
-
-  case $gt_cv_func_printf_posix in
-    *yes) HAVE_POSIX_PRINTF=1 ;;
-    *) HAVE_POSIX_PRINTF=0 ;;
-  esac
-  AC_SUBST([HAVE_POSIX_PRINTF])
-  if test "$ac_cv_func_asprintf" = yes; then
-    HAVE_ASPRINTF=1
-  else
-    HAVE_ASPRINTF=0
-  fi
-  AC_SUBST([HAVE_ASPRINTF])
-  if test "$ac_cv_func_snprintf" = yes; then
-    HAVE_SNPRINTF=1
-  else
-    HAVE_SNPRINTF=0
-  fi
-  AC_SUBST([HAVE_SNPRINTF])
-  if test "$ac_cv_func_wprintf" = yes; then
-    HAVE_WPRINTF=1
-  else
-    HAVE_WPRINTF=0
-  fi
-  AC_SUBST([HAVE_WPRINTF])
-
-  AM_LANGINFO_CODESET
-  gt_LC_MESSAGES
-
-  dnl Compilation on mingw and Cygwin needs special Makefile rules, because
-  dnl 1. when we install a shared library, we must arrange to export
-  dnl    auxiliary pointer variables for every exported variable,
-  dnl 2. when we install a shared library and a static library simultaneously,
-  dnl    the include file specifies __declspec(dllimport) and therefore we
-  dnl    must arrange to define the auxiliary pointer variables for the
-  dnl    exported variables _also_ in the static library.
-  if test "$enable_shared" = yes; then
-    case "$host_os" in
-      cygwin*) is_woe32dll=yes ;;
-      *) is_woe32dll=no ;;
-    esac
-  else
-    is_woe32dll=no
-  fi
-  WOE32DLL=$is_woe32dll
-  AC_SUBST([WOE32DLL])
-
-  dnl Rename some macros and functions used for locking.
-  AH_BOTTOM([
-#define __libc_lock_t                   gl_lock_t
-#define __libc_lock_define              gl_lock_define
-#define __libc_lock_define_initialized  gl_lock_define_initialized
-#define __libc_lock_init                gl_lock_init
-#define __libc_lock_lock                gl_lock_lock
-#define __libc_lock_unlock              gl_lock_unlock
-#define __libc_lock_recursive_t                   gl_recursive_lock_t
-#define __libc_lock_define_recursive              gl_recursive_lock_define
-#define __libc_lock_define_initialized_recursive  gl_recursive_lock_define_initialized
-#define __libc_lock_init_recursive                gl_recursive_lock_init
-#define __libc_lock_lock_recursive                gl_recursive_lock_lock
-#define __libc_lock_unlock_recursive              gl_recursive_lock_unlock
-#define glthread_in_use  libintl_thread_in_use
-#define glthread_lock_init     libintl_lock_init
-#define glthread_lock_lock     libintl_lock_lock
-#define glthread_lock_unlock   libintl_lock_unlock
-#define glthread_lock_destroy  libintl_lock_destroy
-#define glthread_rwlock_init     libintl_rwlock_init
-#define glthread_rwlock_rdlock   libintl_rwlock_rdlock
-#define glthread_rwlock_wrlock   libintl_rwlock_wrlock
-#define glthread_rwlock_unlock   libintl_rwlock_unlock
-#define glthread_rwlock_destroy  libintl_rwlock_destroy
-#define glthread_recursive_lock_init     libintl_recursive_lock_init
-#define glthread_recursive_lock_lock     libintl_recursive_lock_lock
-#define glthread_recursive_lock_unlock   libintl_recursive_lock_unlock
-#define glthread_recursive_lock_destroy  libintl_recursive_lock_destroy
-#define glthread_once                 libintl_once
-#define glthread_once_call            libintl_once_call
-#define glthread_once_singlethreaded  libintl_once_singlethreaded
-])
-])
-
-
-dnl Checks for the core files of the intl subdirectory:
-dnl   dcigettext.c
-dnl   eval-plural.h
-dnl   explodename.c
-dnl   finddomain.c
-dnl   gettextP.h
-dnl   gmo.h
-dnl   hash-string.h hash-string.c
-dnl   l10nflist.c
-dnl   libgnuintl.h.in (except the *printf stuff)
-dnl   loadinfo.h
-dnl   loadmsgcat.c
-dnl   localealias.c
-dnl   log.c
-dnl   plural-exp.h plural-exp.c
-dnl   plural.y
-dnl Used by libglocale.
-AC_DEFUN([gt_INTL_SUBDIR_CORE],
-[
-  AC_REQUIRE([AC_C_INLINE])dnl
-  AC_REQUIRE([AC_TYPE_SIZE_T])dnl
-  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
-  AC_REQUIRE([AC_FUNC_ALLOCA])dnl
-  AC_REQUIRE([AC_FUNC_MMAP])dnl
-  AC_REQUIRE([gt_INTDIV0])dnl
-  AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
-  AC_REQUIRE([gt_INTTYPES_PRI])dnl
-  AC_REQUIRE([gl_LOCK])dnl
-
-  AC_TRY_LINK(
-    [int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }],
-    [],
-    [AC_DEFINE([HAVE_BUILTIN_EXPECT], 1,
-       [Define to 1 if the compiler understands __builtin_expect.])])
-
-  AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h])
-  AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \
-    stpcpy strcasecmp strdup strtoul tsearch argz_count argz_stringify \
-    argz_next __fsetlocking])
-
-  dnl Use the *_unlocked functions only if they are declared.
-  dnl (because some of them were defined without being declared in Solaris
-  dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
-  dnl on Solaris 2.5.1 to run on Solaris 2.6).
-  dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
-  gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
-  gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
-
-  AM_ICONV
-
-  dnl glibc >= 2.4 has a NL_LOCALE_NAME macro when _GNU_SOURCE is defined,
-  dnl and a _NL_LOCALE_NAME macro always.
-  AC_CACHE_CHECK([for NL_LOCALE_NAME macro], gt_cv_nl_locale_name,
-    [AC_TRY_LINK([#include <langinfo.h>
-#include <locale.h>],
-      [char* cs = nl_langinfo(_NL_LOCALE_NAME(LC_MESSAGES));],
-      gt_cv_nl_locale_name=yes,
-      gt_cv_nl_locale_name=no)
-    ])
-  if test $gt_cv_nl_locale_name = yes; then
-    AC_DEFINE(HAVE_NL_LOCALE_NAME, 1,
-      [Define if you have <langinfo.h> and it defines the NL_LOCALE_NAME macro if _GNU_SOURCE is defined.])
-  fi
-
-  dnl intl/plural.c is generated from intl/plural.y. It requires bison,
-  dnl because plural.y uses bison specific features. It requires at least
-  dnl bison-1.26 because earlier versions generate a plural.c that doesn't
-  dnl compile.
-  dnl bison is only needed for the maintainer (who touches plural.y). But in
-  dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
-  dnl the rule in general Makefile. Now, some people carelessly touch the
-  dnl files or have a broken "make" program, hence the plural.c rule will
-  dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
-  dnl present or too old.
-  AC_CHECK_PROGS([INTLBISON], [bison])
-  if test -z "$INTLBISON"; then
-    ac_verc_fail=yes
-  else
-    dnl Found it, now check the version.
-    AC_MSG_CHECKING([version of bison])
-changequote(<<,>>)dnl
-    ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
-    case $ac_prog_version in
-      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
-      1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
-changequote([,])dnl
-         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
-      *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
-    esac
-    AC_MSG_RESULT([$ac_prog_version])
-  fi
-  if test $ac_verc_fail = yes; then
-    INTLBISON=:
-  fi
-])
-
-
-dnl gt_CHECK_DECL(FUNC, INCLUDES)
-dnl Check whether a function is declared.
-AC_DEFUN([gt_CHECK_DECL],
-[
-  AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
-    [AC_TRY_COMPILE([$2], [
-#ifndef $1
-  char *p = (char *) $1;
-#endif
-], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
-  if test $ac_cv_have_decl_$1 = yes; then
-    gt_value=1
-  else
-    gt_value=0
-  fi
-  AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
-    [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
-])
diff --git a/linphone/m4/intldir.m4 b/linphone/m4/intldir.m4
deleted file mode 100644 (file)
index 7a28843..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-# intldir.m4 serial 1 (gettext-0.16)
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-AC_PREREQ(2.52)
-
-dnl Tells the AM_GNU_GETTEXT macro to consider an intl/ directory.
-AC_DEFUN([AM_GNU_GETTEXT_INTL_SUBDIR], [])
diff --git a/linphone/m4/intmax.m4 b/linphone/m4/intmax.m4
deleted file mode 100644 (file)
index ce7a8a4..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-# intmax.m4 serial 3 (gettext-0.16)
-dnl Copyright (C) 2002-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-dnl Test whether the system has the 'intmax_t' type, but don't attempt to
-dnl find a replacement if it is lacking.
-
-AC_DEFUN([gt_TYPE_INTMAX_T],
-[
-  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
-  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
-  AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
-    [AC_TRY_COMPILE([
-#include <stddef.h>
-#include <stdlib.h>
-#if HAVE_STDINT_H_WITH_UINTMAX
-#include <stdint.h>
-#endif
-#if HAVE_INTTYPES_H_WITH_UINTMAX
-#include <inttypes.h>
-#endif
-],     [intmax_t x = -1;
-        return !x;],
-       gt_cv_c_intmax_t=yes,
-       gt_cv_c_intmax_t=no)])
-  if test $gt_cv_c_intmax_t = yes; then
-    AC_DEFINE(HAVE_INTMAX_T, 1,
-      [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
-  fi
-])
diff --git a/linphone/m4/inttypes-pri.m4 b/linphone/m4/inttypes-pri.m4
deleted file mode 100644 (file)
index 7c7f894..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# inttypes-pri.m4 serial 4 (gettext-0.16)
-dnl Copyright (C) 1997-2002, 2006 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_PREREQ(2.52)
-
-# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
-# macros to non-string values.  This is the case on AIX 4.3.3.
-
-AC_DEFUN([gt_INTTYPES_PRI],
-[
-  AC_CHECK_HEADERS([inttypes.h])
-  if test $ac_cv_header_inttypes_h = yes; then
-    AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
-      gt_cv_inttypes_pri_broken,
-      [
-        AC_TRY_COMPILE([#include <inttypes.h>
-#ifdef PRId32
-char *p = PRId32;
-#endif
-], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
-      ])
-  fi
-  if test "$gt_cv_inttypes_pri_broken" = yes; then
-    AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
-      [Define if <inttypes.h> exists and defines unusable PRI* macros.])
-    PRI_MACROS_BROKEN=1
-  else
-    PRI_MACROS_BROKEN=0
-  fi
-  AC_SUBST([PRI_MACROS_BROKEN])
-])
diff --git a/linphone/m4/inttypes.m4 b/linphone/m4/inttypes.m4
deleted file mode 100644 (file)
index 779bcea..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-# inttypes.m4 serial 1 (gettext-0.11.4)
-dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Paul Eggert.
-
-# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
-# <sys/types.h>.
-
-AC_DEFUN([gt_HEADER_INTTYPES_H],
-[
-  AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
-  [
-    AC_TRY_COMPILE(
-      [#include <sys/types.h>
-#include <inttypes.h>],
-      [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
-  ])
-  if test $gt_cv_header_inttypes_h = yes; then
-    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
-      [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
-  fi
-])
diff --git a/linphone/m4/inttypes_h.m4 b/linphone/m4/inttypes_h.m4
deleted file mode 100644 (file)
index edc8ecb..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-# inttypes_h.m4 serial 7
-dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Paul Eggert.
-
-# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
-# doesn't clash with <sys/types.h>, and declares uintmax_t.
-
-AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
-[
-  AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h,
-  [AC_TRY_COMPILE(
-    [#include <sys/types.h>
-#include <inttypes.h>],
-    [uintmax_t i = (uintmax_t) -1; return !i;],
-    gl_cv_header_inttypes_h=yes,
-    gl_cv_header_inttypes_h=no)])
-  if test $gl_cv_header_inttypes_h = yes; then
-    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
-      [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
-       and declares uintmax_t. ])
-  fi
-])
diff --git a/linphone/m4/isc-posix.m4 b/linphone/m4/isc-posix.m4
deleted file mode 100644 (file)
index 74dc8f2..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-# isc-posix.m4 serial 2 (gettext-0.11.2)
-dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-# This file is not needed with autoconf-2.53 and newer.  Remove it in 2005.
-
-# This test replaces the one in autoconf.
-# Currently this macro should have the same name as the autoconf macro
-# because gettext's gettext.m4 (distributed in the automake package)
-# still uses it.  Otherwise, the use in gettext.m4 makes autoheader
-# give these diagnostics:
-#   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
-#   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
-
-undefine([AC_ISC_POSIX])
-
-AC_DEFUN([AC_ISC_POSIX],
-  [
-    dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
-    AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
-  ]
-)
diff --git a/linphone/m4/lcmessage.m4 b/linphone/m4/lcmessage.m4
deleted file mode 100644 (file)
index 19aa77e..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-# lcmessage.m4 serial 4 (gettext-0.14.2)
-dnl Copyright (C) 1995-2002, 2004-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Authors:
-dnl   Ulrich Drepper <drepper@cygnus.com>, 1995.
-
-# Check whether LC_MESSAGES is available in <locale.h>.
-
-AC_DEFUN([gt_LC_MESSAGES],
-[
-  AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES,
-    [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
-       gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)])
-  if test $gt_cv_val_LC_MESSAGES = yes; then
-    AC_DEFINE(HAVE_LC_MESSAGES, 1,
-      [Define if your <locale.h> file defines LC_MESSAGES.])
-  fi
-])
diff --git a/linphone/m4/lib-ld.m4 b/linphone/m4/lib-ld.m4
deleted file mode 100644 (file)
index 96c4e2c..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-# lib-ld.m4 serial 3 (gettext-0.13)
-dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
-
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
-AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  acl_cv_prog_gnu_ld=yes ;;
-*)
-  acl_cv_prog_gnu_ld=no ;;
-esac])
-with_gnu_ld=$acl_cv_prog_gnu_ld
-])
-
-dnl From libtool-1.4. Sets the variable LD.
-AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  AC_MSG_CHECKING([for ld used by GCC])
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [[\\/]* | [A-Za-z]:[\\/]*)]
-      [re_direlt='/[^/][^/]*/\.\./']
-      # Canonicalize the path of ld
-      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
-      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-       ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  AC_MSG_CHECKING([for GNU ld])
-else
-  AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(acl_cv_path_LD,
-[if test -z "$LD"; then
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      acl_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some GNU ld's only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
-      *GNU* | *'with BFD'*)
-       test "$with_gnu_ld" != no && break ;;
-      *)
-       test "$with_gnu_ld" != yes && break ;;
-      esac
-    fi
-  done
-  IFS="$ac_save_ifs"
-else
-  acl_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$acl_cv_path_LD"
-if test -n "$LD"; then
-  AC_MSG_RESULT($LD)
-else
-  AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_LIB_PROG_LD_GNU
-])
diff --git a/linphone/m4/lib-link.m4 b/linphone/m4/lib-link.m4
deleted file mode 100644 (file)
index f95b7ba..0000000
+++ /dev/null
@@ -1,644 +0,0 @@
-# lib-link.m4 serial 9 (gettext-0.16)
-dnl Copyright (C) 2001-2006 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_PREREQ(2.50)
-
-dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
-dnl augments the CPPFLAGS variable.
-AC_DEFUN([AC_LIB_LINKFLAGS],
-[
-  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-  AC_REQUIRE([AC_LIB_RPATH])
-  define([Name],[translit([$1],[./-], [___])])
-  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
-    AC_LIB_LINKFLAGS_BODY([$1], [$2])
-    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
-    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
-    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
-  ])
-  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
-  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
-  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
-  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-  AC_SUBST([LIB]NAME)
-  AC_SUBST([LTLIB]NAME)
-  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
-  dnl results of this search when this library appears as a dependency.
-  HAVE_LIB[]NAME=yes
-  undefine([Name])
-  undefine([NAME])
-])
-
-dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
-dnl searches for libname and the libraries corresponding to explicit and
-dnl implicit dependencies, together with the specified include files and
-dnl the ability to compile and link the specified testcode. If found, it
-dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
-dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
-dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
-dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
-AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
-[
-  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-  AC_REQUIRE([AC_LIB_RPATH])
-  define([Name],[translit([$1],[./-], [___])])
-  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-
-  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
-  dnl accordingly.
-  AC_LIB_LINKFLAGS_BODY([$1], [$2])
-
-  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
-  dnl because if the user has installed lib[]Name and not disabled its use
-  dnl via --without-lib[]Name-prefix, he wants to use it.
-  ac_save_CPPFLAGS="$CPPFLAGS"
-  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-
-  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
-    ac_save_LIBS="$LIBS"
-    LIBS="$LIBS $LIB[]NAME"
-    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
-    LIBS="$ac_save_LIBS"
-  ])
-  if test "$ac_cv_lib[]Name" = yes; then
-    HAVE_LIB[]NAME=yes
-    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
-    AC_MSG_CHECKING([how to link with lib[]$1])
-    AC_MSG_RESULT([$LIB[]NAME])
-  else
-    HAVE_LIB[]NAME=no
-    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
-    dnl $INC[]NAME either.
-    CPPFLAGS="$ac_save_CPPFLAGS"
-    LIB[]NAME=
-    LTLIB[]NAME=
-  fi
-  AC_SUBST([HAVE_LIB]NAME)
-  AC_SUBST([LIB]NAME)
-  AC_SUBST([LTLIB]NAME)
-  undefine([Name])
-  undefine([NAME])
-])
-
-dnl Determine the platform dependent parameters needed to use rpath:
-dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
-dnl hardcode_direct, hardcode_minus_L.
-AC_DEFUN([AC_LIB_RPATH],
-[
-  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
-  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
-  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
-  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
-  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
-  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
-  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
-    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
-    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
-    . ./conftest.sh
-    rm -f ./conftest.sh
-    acl_cv_rpath=done
-  ])
-  wl="$acl_cv_wl"
-  libext="$acl_cv_libext"
-  shlibext="$acl_cv_shlibext"
-  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
-  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
-  hardcode_direct="$acl_cv_hardcode_direct"
-  hardcode_minus_L="$acl_cv_hardcode_minus_L"
-  dnl Determine whether the user wants rpath handling at all.
-  AC_ARG_ENABLE(rpath,
-    [  --disable-rpath         do not hardcode runtime library paths],
-    :, enable_rpath=yes)
-])
-
-dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
-AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
-[
-  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
-  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-  dnl By default, look in $includedir and $libdir.
-  use_additional=yes
-  AC_LIB_WITH_FINAL_PREFIX([
-    eval additional_includedir=\"$includedir\"
-    eval additional_libdir=\"$libdir\"
-  ])
-  AC_LIB_ARG_WITH([lib$1-prefix],
-[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
-  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
-[
-    if test "X$withval" = "Xno"; then
-      use_additional=no
-    else
-      if test "X$withval" = "X"; then
-        AC_LIB_WITH_FINAL_PREFIX([
-          eval additional_includedir=\"$includedir\"
-          eval additional_libdir=\"$libdir\"
-        ])
-      else
-        additional_includedir="$withval/include"
-        additional_libdir="$withval/$acl_libdirstem"
-      fi
-    fi
-])
-  dnl Search the library and its dependencies in $additional_libdir and
-  dnl $LDFLAGS. Using breadth-first-seach.
-  LIB[]NAME=
-  LTLIB[]NAME=
-  INC[]NAME=
-  rpathdirs=
-  ltrpathdirs=
-  names_already_handled=
-  names_next_round='$1 $2'
-  while test -n "$names_next_round"; do
-    names_this_round="$names_next_round"
-    names_next_round=
-    for name in $names_this_round; do
-      already_handled=
-      for n in $names_already_handled; do
-        if test "$n" = "$name"; then
-          already_handled=yes
-          break
-        fi
-      done
-      if test -z "$already_handled"; then
-        names_already_handled="$names_already_handled $name"
-        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
-        dnl or AC_LIB_HAVE_LINKFLAGS call.
-        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
-        eval value=\"\$HAVE_LIB$uppername\"
-        if test -n "$value"; then
-          if test "$value" = yes; then
-            eval value=\"\$LIB$uppername\"
-            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
-            eval value=\"\$LTLIB$uppername\"
-            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
-          else
-            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
-            dnl that this library doesn't exist. So just drop it.
-            :
-          fi
-        else
-          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
-          dnl and the already constructed $LIBNAME/$LTLIBNAME.
-          found_dir=
-          found_la=
-          found_so=
-          found_a=
-          if test $use_additional = yes; then
-            if test -n "$shlibext" \
-               && { test -f "$additional_libdir/lib$name.$shlibext" \
-                    || { test "$shlibext" = dll \
-                         && test -f "$additional_libdir/lib$name.dll.a"; }; }; then
-              found_dir="$additional_libdir"
-              if test -f "$additional_libdir/lib$name.$shlibext"; then
-                found_so="$additional_libdir/lib$name.$shlibext"
-              else
-                found_so="$additional_libdir/lib$name.dll.a"
-              fi
-              if test -f "$additional_libdir/lib$name.la"; then
-                found_la="$additional_libdir/lib$name.la"
-              fi
-            else
-              if test -f "$additional_libdir/lib$name.$libext"; then
-                found_dir="$additional_libdir"
-                found_a="$additional_libdir/lib$name.$libext"
-                if test -f "$additional_libdir/lib$name.la"; then
-                  found_la="$additional_libdir/lib$name.la"
-                fi
-              fi
-            fi
-          fi
-          if test "X$found_dir" = "X"; then
-            for x in $LDFLAGS $LTLIB[]NAME; do
-              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-              case "$x" in
-                -L*)
-                  dir=`echo "X$x" | sed -e 's/^X-L//'`
-                  if test -n "$shlibext" \
-                     && { test -f "$dir/lib$name.$shlibext" \
-                          || { test "$shlibext" = dll \
-                               && test -f "$dir/lib$name.dll.a"; }; }; then
-                    found_dir="$dir"
-                    if test -f "$dir/lib$name.$shlibext"; then
-                      found_so="$dir/lib$name.$shlibext"
-                    else
-                      found_so="$dir/lib$name.dll.a"
-                    fi
-                    if test -f "$dir/lib$name.la"; then
-                      found_la="$dir/lib$name.la"
-                    fi
-                  else
-                    if test -f "$dir/lib$name.$libext"; then
-                      found_dir="$dir"
-                      found_a="$dir/lib$name.$libext"
-                      if test -f "$dir/lib$name.la"; then
-                        found_la="$dir/lib$name.la"
-                      fi
-                    fi
-                  fi
-                  ;;
-              esac
-              if test "X$found_dir" != "X"; then
-                break
-              fi
-            done
-          fi
-          if test "X$found_dir" != "X"; then
-            dnl Found the library.
-            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
-            if test "X$found_so" != "X"; then
-              dnl Linking with a shared library. We attempt to hardcode its
-              dnl directory into the executable's runpath, unless it's the
-              dnl standard /usr/lib.
-              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
-                dnl No hardcoding is needed.
-                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-              else
-                dnl Use an explicit option to hardcode DIR into the resulting
-                dnl binary.
-                dnl Potentially add DIR to ltrpathdirs.
-                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
-                haveit=
-                for x in $ltrpathdirs; do
-                  if test "X$x" = "X$found_dir"; then
-                    haveit=yes
-                    break
-                  fi
-                done
-                if test -z "$haveit"; then
-                  ltrpathdirs="$ltrpathdirs $found_dir"
-                fi
-                dnl The hardcoding into $LIBNAME is system dependent.
-                if test "$hardcode_direct" = yes; then
-                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
-                  dnl resulting binary.
-                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-                else
-                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
-                    dnl Use an explicit option to hardcode DIR into the resulting
-                    dnl binary.
-                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-                    dnl Potentially add DIR to rpathdirs.
-                    dnl The rpathdirs will be appended to $LIBNAME at the end.
-                    haveit=
-                    for x in $rpathdirs; do
-                      if test "X$x" = "X$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      rpathdirs="$rpathdirs $found_dir"
-                    fi
-                  else
-                    dnl Rely on "-L$found_dir".
-                    dnl But don't add it if it's already contained in the LDFLAGS
-                    dnl or the already constructed $LIBNAME
-                    haveit=
-                    for x in $LDFLAGS $LIB[]NAME; do
-                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-                      if test "X$x" = "X-L$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
-                    fi
-                    if test "$hardcode_minus_L" != no; then
-                      dnl FIXME: Not sure whether we should use
-                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
-                      dnl here.
-                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-                    else
-                      dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
-                      dnl here, because this doesn't fit in flags passed to the
-                      dnl compiler. So give up. No hardcoding. This affects only
-                      dnl very old systems.
-                      dnl FIXME: Not sure whether we should use
-                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
-                      dnl here.
-                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
-                    fi
-                  fi
-                fi
-              fi
-            else
-              if test "X$found_a" != "X"; then
-                dnl Linking with a static library.
-                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
-              else
-                dnl We shouldn't come here, but anyway it's good to have a
-                dnl fallback.
-                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
-              fi
-            fi
-            dnl Assume the include files are nearby.
-            additional_includedir=
-            case "$found_dir" in
-              */$acl_libdirstem | */$acl_libdirstem/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
-                additional_includedir="$basedir/include"
-                ;;
-            esac
-            if test "X$additional_includedir" != "X"; then
-              dnl Potentially add $additional_includedir to $INCNAME.
-              dnl But don't add it
-              dnl   1. if it's the standard /usr/include,
-              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
-              dnl   3. if it's already present in $CPPFLAGS or the already
-              dnl      constructed $INCNAME,
-              dnl   4. if it doesn't exist as a directory.
-              if test "X$additional_includedir" != "X/usr/include"; then
-                haveit=
-                if test "X$additional_includedir" = "X/usr/local/include"; then
-                  if test -n "$GCC"; then
-                    case $host_os in
-                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                    esac
-                  fi
-                fi
-                if test -z "$haveit"; then
-                  for x in $CPPFLAGS $INC[]NAME; do
-                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-                    if test "X$x" = "X-I$additional_includedir"; then
-                      haveit=yes
-                      break
-                    fi
-                  done
-                  if test -z "$haveit"; then
-                    if test -d "$additional_includedir"; then
-                      dnl Really add $additional_includedir to $INCNAME.
-                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
-                    fi
-                  fi
-                fi
-              fi
-            fi
-            dnl Look for dependencies.
-            if test -n "$found_la"; then
-              dnl Read the .la file. It defines the variables
-              dnl dlname, library_names, old_library, dependency_libs, current,
-              dnl age, revision, installed, dlopen, dlpreopen, libdir.
-              save_libdir="$libdir"
-              case "$found_la" in
-                */* | *\\*) . "$found_la" ;;
-                *) . "./$found_la" ;;
-              esac
-              libdir="$save_libdir"
-              dnl We use only dependency_libs.
-              for dep in $dependency_libs; do
-                case "$dep" in
-                  -L*)
-                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
-                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
-                    dnl But don't add it
-                    dnl   1. if it's the standard /usr/lib,
-                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
-                    dnl   3. if it's already present in $LDFLAGS or the already
-                    dnl      constructed $LIBNAME,
-                    dnl   4. if it doesn't exist as a directory.
-                    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
-                      haveit=
-                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
-                        if test -n "$GCC"; then
-                          case $host_os in
-                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                          esac
-                        fi
-                      fi
-                      if test -z "$haveit"; then
-                        haveit=
-                        for x in $LDFLAGS $LIB[]NAME; do
-                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                            dnl Really add $additional_libdir to $LIBNAME.
-                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
-                          fi
-                        fi
-                        haveit=
-                        for x in $LDFLAGS $LTLIB[]NAME; do
-                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                            dnl Really add $additional_libdir to $LTLIBNAME.
-                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
-                          fi
-                        fi
-                      fi
-                    fi
-                    ;;
-                  -R*)
-                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
-                    if test "$enable_rpath" != no; then
-                      dnl Potentially add DIR to rpathdirs.
-                      dnl The rpathdirs will be appended to $LIBNAME at the end.
-                      haveit=
-                      for x in $rpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        rpathdirs="$rpathdirs $dir"
-                      fi
-                      dnl Potentially add DIR to ltrpathdirs.
-                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
-                      haveit=
-                      for x in $ltrpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        ltrpathdirs="$ltrpathdirs $dir"
-                      fi
-                    fi
-                    ;;
-                  -l*)
-                    dnl Handle this in the next round.
-                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
-                    ;;
-                  *.la)
-                    dnl Handle this in the next round. Throw away the .la's
-                    dnl directory; it is already contained in a preceding -L
-                    dnl option.
-                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
-                    ;;
-                  *)
-                    dnl Most likely an immediate library name.
-                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
-                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
-                    ;;
-                esac
-              done
-            fi
-          else
-            dnl Didn't find the library; assume it is in the system directories
-            dnl known to the linker and runtime loader. (All the system
-            dnl directories known to the linker should also be known to the
-            dnl runtime loader, otherwise the system is severely misconfigured.)
-            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
-            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
-          fi
-        fi
-      fi
-    done
-  done
-  if test "X$rpathdirs" != "X"; then
-    if test -n "$hardcode_libdir_separator"; then
-      dnl Weird platform: only the last -rpath option counts, the user must
-      dnl pass all path elements in one option. We can arrange that for a
-      dnl single library, but not when more than one $LIBNAMEs are used.
-      alldirs=
-      for found_dir in $rpathdirs; do
-        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
-      done
-      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
-      acl_save_libdir="$libdir"
-      libdir="$alldirs"
-      eval flag=\"$hardcode_libdir_flag_spec\"
-      libdir="$acl_save_libdir"
-      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
-    else
-      dnl The -rpath options are cumulative.
-      for found_dir in $rpathdirs; do
-        acl_save_libdir="$libdir"
-        libdir="$found_dir"
-        eval flag=\"$hardcode_libdir_flag_spec\"
-        libdir="$acl_save_libdir"
-        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
-      done
-    fi
-  fi
-  if test "X$ltrpathdirs" != "X"; then
-    dnl When using libtool, the option that works for both libraries and
-    dnl executables is -R. The -R options are cumulative.
-    for found_dir in $ltrpathdirs; do
-      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
-    done
-  fi
-])
-
-dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
-dnl unless already present in VAR.
-dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
-dnl contains two or three consecutive elements that belong together.
-AC_DEFUN([AC_LIB_APPENDTOVAR],
-[
-  for element in [$2]; do
-    haveit=
-    for x in $[$1]; do
-      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      [$1]="${[$1]}${[$1]:+ }$element"
-    fi
-  done
-])
-
-dnl For those cases where a variable contains several -L and -l options
-dnl referring to unknown libraries and directories, this macro determines the
-dnl necessary additional linker options for the runtime path.
-dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
-dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
-dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
-dnl otherwise linking without libtool is assumed.
-AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
-[
-  AC_REQUIRE([AC_LIB_RPATH])
-  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
-  $1=
-  if test "$enable_rpath" != no; then
-    if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
-      dnl Use an explicit option to hardcode directories into the resulting
-      dnl binary.
-      rpathdirs=
-      next=
-      for opt in $2; do
-        if test -n "$next"; then
-          dir="$next"
-          dnl No need to hardcode the standard /usr/lib.
-          if test "X$dir" != "X/usr/$acl_libdirstem"; then
-            rpathdirs="$rpathdirs $dir"
-          fi
-          next=
-        else
-          case $opt in
-            -L) next=yes ;;
-            -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
-                 dnl No need to hardcode the standard /usr/lib.
-                 if test "X$dir" != "X/usr/$acl_libdirstem"; then
-                   rpathdirs="$rpathdirs $dir"
-                 fi
-                 next= ;;
-            *) next= ;;
-          esac
-        fi
-      done
-      if test "X$rpathdirs" != "X"; then
-        if test -n ""$3""; then
-          dnl libtool is used for linking. Use -R options.
-          for dir in $rpathdirs; do
-            $1="${$1}${$1:+ }-R$dir"
-          done
-        else
-          dnl The linker is used for linking directly.
-          if test -n "$hardcode_libdir_separator"; then
-            dnl Weird platform: only the last -rpath option counts, the user
-            dnl must pass all path elements in one option.
-            alldirs=
-            for dir in $rpathdirs; do
-              alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir"
-            done
-            acl_save_libdir="$libdir"
-            libdir="$alldirs"
-            eval flag=\"$hardcode_libdir_flag_spec\"
-            libdir="$acl_save_libdir"
-            $1="$flag"
-          else
-            dnl The -rpath options are cumulative.
-            for dir in $rpathdirs; do
-              acl_save_libdir="$libdir"
-              libdir="$dir"
-              eval flag=\"$hardcode_libdir_flag_spec\"
-              libdir="$acl_save_libdir"
-              $1="${$1}${$1:+ }$flag"
-            done
-          fi
-        fi
-      fi
-    fi
-  fi
-  AC_SUBST([$1])
-])
diff --git a/linphone/m4/lib-prefix.m4 b/linphone/m4/lib-prefix.m4
deleted file mode 100644 (file)
index a8684e1..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
-# lib-prefix.m4 serial 5 (gettext-0.15)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
-dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
-dnl require excessive bracketing.
-ifdef([AC_HELP_STRING],
-[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
-[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
-
-dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
-dnl to access previously installed libraries. The basic assumption is that
-dnl a user will want packages to use other packages he previously installed
-dnl with the same --prefix option.
-dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
-dnl libraries, but is otherwise very convenient.
-AC_DEFUN([AC_LIB_PREFIX],
-[
-  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
-  AC_REQUIRE([AC_PROG_CC])
-  AC_REQUIRE([AC_CANONICAL_HOST])
-  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
-  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-  dnl By default, look in $includedir and $libdir.
-  use_additional=yes
-  AC_LIB_WITH_FINAL_PREFIX([
-    eval additional_includedir=\"$includedir\"
-    eval additional_libdir=\"$libdir\"
-  ])
-  AC_LIB_ARG_WITH([lib-prefix],
-[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
-  --without-lib-prefix    don't search for libraries in includedir and libdir],
-[
-    if test "X$withval" = "Xno"; then
-      use_additional=no
-    else
-      if test "X$withval" = "X"; then
-        AC_LIB_WITH_FINAL_PREFIX([
-          eval additional_includedir=\"$includedir\"
-          eval additional_libdir=\"$libdir\"
-        ])
-      else
-        additional_includedir="$withval/include"
-        additional_libdir="$withval/$acl_libdirstem"
-      fi
-    fi
-])
-  if test $use_additional = yes; then
-    dnl Potentially add $additional_includedir to $CPPFLAGS.
-    dnl But don't add it
-    dnl   1. if it's the standard /usr/include,
-    dnl   2. if it's already present in $CPPFLAGS,
-    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
-    dnl   4. if it doesn't exist as a directory.
-    if test "X$additional_includedir" != "X/usr/include"; then
-      haveit=
-      for x in $CPPFLAGS; do
-        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-        if test "X$x" = "X-I$additional_includedir"; then
-          haveit=yes
-          break
-        fi
-      done
-      if test -z "$haveit"; then
-        if test "X$additional_includedir" = "X/usr/local/include"; then
-          if test -n "$GCC"; then
-            case $host_os in
-              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-            esac
-          fi
-        fi
-        if test -z "$haveit"; then
-          if test -d "$additional_includedir"; then
-            dnl Really add $additional_includedir to $CPPFLAGS.
-            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
-          fi
-        fi
-      fi
-    fi
-    dnl Potentially add $additional_libdir to $LDFLAGS.
-    dnl But don't add it
-    dnl   1. if it's the standard /usr/lib,
-    dnl   2. if it's already present in $LDFLAGS,
-    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
-    dnl   4. if it doesn't exist as a directory.
-    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
-      haveit=
-      for x in $LDFLAGS; do
-        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-        if test "X$x" = "X-L$additional_libdir"; then
-          haveit=yes
-          break
-        fi
-      done
-      if test -z "$haveit"; then
-        if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
-          if test -n "$GCC"; then
-            case $host_os in
-              linux*) haveit=yes;;
-            esac
-          fi
-        fi
-        if test -z "$haveit"; then
-          if test -d "$additional_libdir"; then
-            dnl Really add $additional_libdir to $LDFLAGS.
-            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
-          fi
-        fi
-      fi
-    fi
-  fi
-])
-
-dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
-dnl acl_final_exec_prefix, containing the values to which $prefix and
-dnl $exec_prefix will expand at the end of the configure script.
-AC_DEFUN([AC_LIB_PREPARE_PREFIX],
-[
-  dnl Unfortunately, prefix and exec_prefix get only finally determined
-  dnl at the end of configure.
-  if test "X$prefix" = "XNONE"; then
-    acl_final_prefix="$ac_default_prefix"
-  else
-    acl_final_prefix="$prefix"
-  fi
-  if test "X$exec_prefix" = "XNONE"; then
-    acl_final_exec_prefix='${prefix}'
-  else
-    acl_final_exec_prefix="$exec_prefix"
-  fi
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
-  prefix="$acl_save_prefix"
-])
-
-dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
-dnl variables prefix and exec_prefix bound to the values they will have
-dnl at the end of the configure script.
-AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
-[
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  $1
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-])
-
-dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
-dnl the basename of the libdir, either "lib" or "lib64".
-AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
-[
-  dnl There is no formal standard regarding lib and lib64. The current
-  dnl practice is that on a system supporting 32-bit and 64-bit instruction
-  dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
-  dnl libraries go under $prefix/lib. We determine the compiler's default
-  dnl mode by looking at the compiler's library search path. If at least
-  dnl of its elements ends in /lib64 or points to a directory whose absolute
-  dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
-  dnl default, namely "lib".
-  acl_libdirstem=lib
-  searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
-  if test -n "$searchpath"; then
-    acl_save_IFS="${IFS=       }"; IFS=":"
-    for searchdir in $searchpath; do
-      if test -d "$searchdir"; then
-        case "$searchdir" in
-          */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
-          *) searchdir=`cd "$searchdir" && pwd`
-             case "$searchdir" in
-               */lib64 ) acl_libdirstem=lib64 ;;
-             esac ;;
-        esac
-      fi
-    done
-    IFS="$acl_save_IFS"
-  fi
-])
diff --git a/linphone/m4/lock.m4 b/linphone/m4/lock.m4
deleted file mode 100644 (file)
index 0224f2f..0000000
+++ /dev/null
@@ -1,311 +0,0 @@
-# lock.m4 serial 6 (gettext-0.16)
-dnl Copyright (C) 2005-2006 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-dnl Tests for a multithreading library to be used.
-dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS,
-dnl USE_PTH_THREADS, USE_WIN32_THREADS
-dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use
-dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with
-dnl libtool).
-dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for
-dnl programs that really need multithread functionality. The difference
-dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak
-dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread".
-dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
-dnl multithread-safe programs.
-
-AC_DEFUN([gl_LOCK_EARLY],
-[
-  AC_REQUIRE([gl_LOCK_EARLY_BODY])
-])
-
-dnl The guts of gl_LOCK_EARLY. Needs to be expanded only once.
-
-AC_DEFUN([gl_LOCK_EARLY_BODY],
-[
-  dnl Ordering constraints: This macro modifies CPPFLAGS in a way that
-  dnl influences the result of the autoconf tests that test for *_unlocked
-  dnl declarations, on AIX 5 at least. Therefore it must come early.
-  AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl
-  AC_BEFORE([$0], [gl_ARGP])dnl
-
-  AC_REQUIRE([AC_CANONICAL_HOST])
-  AC_REQUIRE([AC_GNU_SOURCE]) dnl needed for pthread_rwlock_t on glibc systems
-  dnl Check for multithreading.
-  AC_ARG_ENABLE(threads,
-AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API])
-AC_HELP_STRING([--disable-threads], [build without multithread safety]),
-    [gl_use_threads=$enableval],
-    [case "$host_os" in
-       dnl Disable multithreading by default on OSF/1, because it interferes
-       dnl with fork()/exec(): When msgexec is linked with -lpthread, its child
-       dnl process gets an endless segmentation fault inside execvp().
-       osf*) gl_use_threads=no ;;
-       *)    gl_use_threads=yes ;;
-     esac
-    ])
-  if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
-    # For using <pthread.h>:
-    case "$host_os" in
-      osf*)
-        # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
-        # groks <pthread.h>. cc also understands the flag -pthread, but
-        # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
-        # 2. putting a flag into CPPFLAGS that has an effect on the linker
-        # causes the AC_TRY_LINK test below to succeed unexpectedly,
-        # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
-        CPPFLAGS="$CPPFLAGS -D_REENTRANT"
-        ;;
-    esac
-    # Some systems optimize for single-threaded programs by default, and
-    # need special flags to disable these optimizations. For example, the
-    # definition of 'errno' in <errno.h>.
-    case "$host_os" in
-      aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
-      solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
-    esac
-  fi
-])
-
-dnl The guts of gl_LOCK. Needs to be expanded only once.
-
-AC_DEFUN([gl_LOCK_BODY],
-[
-  AC_REQUIRE([gl_LOCK_EARLY_BODY])
-  gl_threads_api=none
-  LIBTHREAD=
-  LTLIBTHREAD=
-  LIBMULTITHREAD=
-  LTLIBMULTITHREAD=
-  if test "$gl_use_threads" != no; then
-    dnl Check whether the compiler and linker support weak declarations.
-    AC_MSG_CHECKING([whether imported symbols can be declared weak])
-    gl_have_weak=no
-    AC_TRY_LINK([extern void xyzzy ();
-#pragma weak xyzzy], [xyzzy();], [gl_have_weak=yes])
-    AC_MSG_RESULT([$gl_have_weak])
-    if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
-      # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
-      # it groks <pthread.h>. It's added above, in gl_LOCK_EARLY_BODY.
-      AC_CHECK_HEADER(pthread.h, gl_have_pthread_h=yes, gl_have_pthread_h=no)
-      if test "$gl_have_pthread_h" = yes; then
-        # Other possible tests:
-        #   -lpthreads (FSU threads, PCthreads)
-        #   -lgthreads
-        gl_have_pthread=
-        # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
-        # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
-        # the second one only in libpthread, and lock.c needs it.
-        AC_TRY_LINK([#include <pthread.h>],
-          [pthread_mutex_lock((pthread_mutex_t*)0);
-           pthread_mutexattr_init((pthread_mutexattr_t*)0);],
-          [gl_have_pthread=yes])
-        # Test for libpthread by looking for pthread_kill. (Not pthread_self,
-        # since it is defined as a macro on OSF/1.)
-        if test -n "$gl_have_pthread"; then
-          # The program links fine without libpthread. But it may actually
-          # need to link with libpthread in order to create multiple threads.
-          AC_CHECK_LIB(pthread, pthread_kill,
-            [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
-             # On Solaris and HP-UX, most pthread functions exist also in libc.
-             # Therefore pthread_in_use() needs to actually try to create a
-             # thread: pthread_create from libc will fail, whereas
-             # pthread_create will actually create a thread.
-             case "$host_os" in
-               solaris* | hpux*)
-                 AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], 1,
-                   [Define if the pthread_in_use() detection is hard.])
-             esac
-            ])
-        else
-          # Some library is needed. Try libpthread and libc_r.
-          AC_CHECK_LIB(pthread, pthread_kill,
-            [gl_have_pthread=yes
-             LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
-             LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread])
-          if test -z "$gl_have_pthread"; then
-            # For FreeBSD 4.
-            AC_CHECK_LIB(c_r, pthread_kill,
-              [gl_have_pthread=yes
-               LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
-               LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r])
-          fi
-        fi
-        if test -n "$gl_have_pthread"; then
-          gl_threads_api=posix
-          AC_DEFINE([USE_POSIX_THREADS], 1,
-            [Define if the POSIX multithreading library can be used.])
-          if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
-            if test $gl_have_weak = yes; then
-              AC_DEFINE([USE_POSIX_THREADS_WEAK], 1,
-                [Define if references to the POSIX multithreading library should be made weak.])
-              LIBTHREAD=
-              LTLIBTHREAD=
-            fi
-          fi
-          # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the
-          # pthread_rwlock_* functions.
-          AC_CHECK_TYPE([pthread_rwlock_t],
-            [AC_DEFINE([HAVE_PTHREAD_RWLOCK], 1,
-               [Define if the POSIX multithreading library has read/write locks.])],
-            [],
-            [#include <pthread.h>])
-          # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
-          AC_TRY_COMPILE([#include <pthread.h>],
-            [#if __FreeBSD__ == 4
-error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
-#else
-int x = (int)PTHREAD_MUTEX_RECURSIVE;
-return !x;
-#endif],
-            [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], 1,
-               [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])])
-        fi
-      fi
-    fi
-    if test -z "$gl_have_pthread"; then
-      if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
-        gl_have_solaristhread=
-        gl_save_LIBS="$LIBS"
-        LIBS="$LIBS -lthread"
-        AC_TRY_LINK([#include <thread.h>
-#include <synch.h>],
-          [thr_self();],
-          [gl_have_solaristhread=yes])
-        LIBS="$gl_save_LIBS"
-        if test -n "$gl_have_solaristhread"; then
-          gl_threads_api=solaris
-          LIBTHREAD=-lthread
-          LTLIBTHREAD=-lthread
-          LIBMULTITHREAD="$LIBTHREAD"
-          LTLIBMULTITHREAD="$LTLIBTHREAD"
-          AC_DEFINE([USE_SOLARIS_THREADS], 1,
-            [Define if the old Solaris multithreading library can be used.])
-          if test $gl_have_weak = yes; then
-            AC_DEFINE([USE_SOLARIS_THREADS_WEAK], 1,
-              [Define if references to the old Solaris multithreading library should be made weak.])
-            LIBTHREAD=
-            LTLIBTHREAD=
-          fi
-        fi
-      fi
-    fi
-    if test "$gl_use_threads" = pth; then
-      gl_save_CPPFLAGS="$CPPFLAGS"
-      AC_LIB_LINKFLAGS(pth)
-      gl_have_pth=
-      gl_save_LIBS="$LIBS"
-      LIBS="$LIBS -lpth"
-      AC_TRY_LINK([#include <pth.h>], [pth_self();], gl_have_pth=yes)
-      LIBS="$gl_save_LIBS"
-      if test -n "$gl_have_pth"; then
-        gl_threads_api=pth
-        LIBTHREAD="$LIBPTH"
-        LTLIBTHREAD="$LTLIBPTH"
-        LIBMULTITHREAD="$LIBTHREAD"
-        LTLIBMULTITHREAD="$LTLIBTHREAD"
-        AC_DEFINE([USE_PTH_THREADS], 1,
-          [Define if the GNU Pth multithreading library can be used.])
-        if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
-          if test $gl_have_weak = yes; then
-            AC_DEFINE([USE_PTH_THREADS_WEAK], 1,
-              [Define if references to the GNU Pth multithreading library should be made weak.])
-            LIBTHREAD=
-            LTLIBTHREAD=
-          fi
-        fi
-      else
-        CPPFLAGS="$gl_save_CPPFLAGS"
-      fi
-    fi
-    if test -z "$gl_have_pthread"; then
-      if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then
-        if { case "$host_os" in
-               mingw*) true;;
-               *) false;;
-             esac
-           }; then
-          gl_threads_api=win32
-          AC_DEFINE([USE_WIN32_THREADS], 1,
-            [Define if the Win32 multithreading API can be used.])
-        fi
-      fi
-    fi
-  fi
-  AC_MSG_CHECKING([for multithread API to use])
-  AC_MSG_RESULT([$gl_threads_api])
-  AC_SUBST(LIBTHREAD)
-  AC_SUBST(LTLIBTHREAD)
-  AC_SUBST(LIBMULTITHREAD)
-  AC_SUBST(LTLIBMULTITHREAD)
-])
-
-AC_DEFUN([gl_LOCK],
-[
-  AC_REQUIRE([gl_LOCK_EARLY])
-  AC_REQUIRE([gl_LOCK_BODY])
-  gl_PREREQ_LOCK
-])
-
-# Prerequisites of lib/lock.c.
-AC_DEFUN([gl_PREREQ_LOCK], [
-  AC_REQUIRE([AC_C_INLINE])
-])
-
-dnl Survey of platforms:
-dnl
-dnl Platform          Available   Compiler    Supports   test-lock
-dnl                   flavours    option      weak       result
-dnl ---------------   ---------   ---------   --------   ---------
-dnl Linux 2.4/glibc   posix       -lpthread       Y      OK
-dnl
-dnl GNU Hurd/glibc    posix
-dnl
-dnl FreeBSD 5.3       posix       -lc_r           Y
-dnl                   posix       -lkse ?         Y
-dnl                   posix       -lpthread ?     Y
-dnl                   posix       -lthr           Y
-dnl
-dnl FreeBSD 5.2       posix       -lc_r           Y
-dnl                   posix       -lkse           Y
-dnl                   posix       -lthr           Y
-dnl
-dnl FreeBSD 4.0,4.10  posix       -lc_r           Y      OK
-dnl
-dnl NetBSD 1.6        --
-dnl
-dnl OpenBSD 3.4       posix       -lpthread       Y      OK
-dnl
-dnl MacOS X 10.[123]  posix       -lpthread       Y      OK
-dnl
-dnl Solaris 7,8,9     posix       -lpthread       Y      Sol 7,8: 0.0; Sol 9: OK
-dnl                   solaris     -lthread        Y      Sol 7,8: 0.0; Sol 9: OK
-dnl
-dnl HP-UX 11          posix       -lpthread       N (cc) OK
-dnl                                               Y (gcc)
-dnl
-dnl IRIX 6.5          posix       -lpthread       Y      0.5
-dnl
-dnl AIX 4.3,5.1       posix       -lpthread       N      AIX 4: 0.5; AIX 5: OK
-dnl
-dnl OSF/1 4.0,5.1     posix       -pthread (cc)   N      OK
-dnl                               -lpthread (gcc) Y
-dnl
-dnl Cygwin            posix       -lpthread       Y      OK
-dnl
-dnl Any of the above  pth         -lpth                  0.0
-dnl
-dnl Mingw             win32                       N      OK
-dnl
-dnl BeOS 5            --
-dnl
-dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is
-dnl turned off:
-dnl   OK if all three tests terminate OK,
-dnl   0.5 if the first test terminates OK but the second one loops endlessly,
-dnl   0.0 if the first test already loops endlessly.
diff --git a/linphone/m4/longdouble.m4 b/linphone/m4/longdouble.m4
deleted file mode 100644 (file)
index 25590f4..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-# longdouble.m4 serial 2 (gettext-0.15)
-dnl Copyright (C) 2002-2003, 2006 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-dnl Test whether the compiler supports the 'long double' type.
-dnl Prerequisite: AC_PROG_CC
-
-dnl This file is only needed in autoconf <= 2.59.  Newer versions of autoconf
-dnl have a macro AC_TYPE_LONG_DOUBLE with identical semantics.
-
-AC_DEFUN([gt_TYPE_LONGDOUBLE],
-[
-  AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
-    [if test "$GCC" = yes; then
-       gt_cv_c_long_double=yes
-     else
-       AC_TRY_COMPILE([
-         /* The Stardent Vistra knows sizeof(long double), but does not support it.  */
-         long double foo = 0.0;
-         /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
-         int array [2*(sizeof(long double) >= sizeof(double)) - 1];
-         ], ,
-         gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
-     fi])
-  if test $gt_cv_c_long_double = yes; then
-    AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
-  fi
-])
diff --git a/linphone/m4/longlong.m4 b/linphone/m4/longlong.m4
deleted file mode 100644 (file)
index 3716c09..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# longlong.m4 serial 8
-dnl Copyright (C) 1999-2006 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Paul Eggert.
-
-# Define HAVE_LONG_LONG_INT if 'long long int' works.
-# This fixes a bug in Autoconf 2.60, but can be removed once we
-# assume 2.61 everywhere.
-
-# Note: If the type 'long long int' exists but is only 32 bits large
-# (as on some very old compilers), AC_TYPE_LONG_LONG_INT will not be
-# defined. In this case you can treat 'long long int' like 'long int'.
-
-AC_DEFUN([AC_TYPE_LONG_LONG_INT],
-[
-  AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
-    [AC_LINK_IFELSE(
-       [AC_LANG_PROGRAM(
-         [[long long int ll = 9223372036854775807ll;
-           long long int nll = -9223372036854775807LL;
-           typedef int a[((-9223372036854775807LL < 0
-                           && 0 < 9223372036854775807ll)
-                          ? 1 : -1)];
-           int i = 63;]],
-         [[long long int llmax = 9223372036854775807ll;
-           return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
-                   | (llmax / ll) | (llmax % ll));]])],
-       [ac_cv_type_long_long_int=yes],
-       [ac_cv_type_long_long_int=no])])
-  if test $ac_cv_type_long_long_int = yes; then
-    AC_DEFINE([HAVE_LONG_LONG_INT], 1,
-      [Define to 1 if the system has the type `long long int'.])
-  fi
-])
-
-# This macro is obsolescent and should go away soon.
-AC_DEFUN([gl_AC_TYPE_LONG_LONG],
-[
-  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
-  ac_cv_type_long_long=$ac_cv_type_long_long_int
-  if test $ac_cv_type_long_long = yes; then
-    AC_DEFINE(HAVE_LONG_LONG, 1,
-      [Define if you have the 'long long' type.])
-  fi
-])
diff --git a/linphone/m4/nls.m4 b/linphone/m4/nls.m4
deleted file mode 100644 (file)
index 7967cc2..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-# nls.m4 serial 3 (gettext-0.15)
-dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Authors:
-dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
-dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
-
-AC_PREREQ(2.50)
-
-AC_DEFUN([AM_NLS],
-[
-  AC_MSG_CHECKING([whether NLS is requested])
-  dnl Default is enabled NLS
-  AC_ARG_ENABLE(nls,
-    [  --disable-nls           do not use Native Language Support],
-    USE_NLS=$enableval, USE_NLS=yes)
-  AC_MSG_RESULT($USE_NLS)
-  AC_SUBST(USE_NLS)
-])
diff --git a/linphone/m4/ortp.m4 b/linphone/m4/ortp.m4
deleted file mode 100644 (file)
index e0f36ef..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-AC_DEFUN([LP_CHECK_ORTP],[
-
-ortp_pkgconfig=true
-
-PKG_CHECK_MODULES([ORTP], [ortp], , [ortp_pkgconfig=false])
-
-if test $ortp_pkgconfig = false; then
-       AC_CHECK_HEADER([ortp/ortp.h], ,AC_MSG_ERROR([Could not find oRTP headers !]))
-       LIBS_save=$LIBS
-       AC_CHECK_LIB([ortp], [ortp_init], , AC_MSG_ERROR([Could not find oRTP library]))
-       ORTP_LIBS='-lortp'
-       LIBS=$LIBS_save
-fi
-AC_SUBST([ORTP_LIBS])
-AC_SUBST([ORTP_CFLAGS])
-])
diff --git a/linphone/m4/osip.m4 b/linphone/m4/osip.m4
deleted file mode 100644 (file)
index 629f92a..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-dnl -*- autoconf -*-
-AC_DEFUN([LP_CHECK_OSIP2],[
-
-AC_ARG_WITH( osip,
-      [  --with-osip      Set prefix where osip can be found (ex:/usr or /usr/local)[default=/usr] ],
-      [ osip_prefix=${withval}],[ osip_prefix=/usr ])
-
-dnl FC6's compat-osip2 headers live into "/usr/include/osip2-2.2.2",
-dnl while  libraries are "/usr/lib/libosipparser2-2.2.2.so*".
-AC_ARG_WITH( osip-version,dnl
-AC_HELP_STRING([--with-osip-version=VERSION],
-       [Set osip legacy version @<:@empty@:>@]),
-       [osip_legacy_version="-${withval}"],
-       [osip_legacy_version=""])
-
-osip_pkgconfig=true
-osip_pkgconfig_file=libosip2
-if test -n "$osip_legacy_version"; then
-       osip_pkgconfig_file=libosip2${osip_legacy_version}
-fi
-
-PKG_CHECK_MODULES(OSIP, $osip_pkgconfig_file >= 3.0.0, ,osip_pkgconfig=false)
-
-if test $osip_pkgconfig = false; then
-
-       if test -z "$osip_legacy_version"; then
-               OSIP_CFLAGS="-I${osip_prefix}/include"
-       else
-               OSIP_CFLAGS="-I${osip_prefix}/include/osip2${osip_legacy_version}"
-       fi
-
-dnl check osip2 headers
-       CPPFLAGS_save=$CPPFLAGS
-       CPPFLAGS=$OSIP_CFLAGS
-       AC_CHECK_HEADER([osip2/osip.h], ,AC_MSG_ERROR([Could not find osip2 headers !]))
-       CPPFLAGS=$CPPFLAGS_save
-
-dnl check for osip2 libs
-       OSIP_LIBS="-L$osip_prefix/lib -losipparser2${osip_legacy_version}"
-       LDFLAGS_save=$LDFLAGS
-       LDFLAGS=$OSIP_LIBS
-       LIBS_save=$LIBS
-       case "$target_os" in
-               *mingw*)
-                       osip_aux_libs=
-                       ;;
-               *)
-                       osip_aux_libs=-lpthread
-                       ;;
-       esac
-       OSIP_LIBS="$OSIP_LIBS $osip_aux_libs"
-       AC_CHECK_LIB(osip2${osip_legacy_version},osip_init, , AC_MSG_ERROR([Could not find osip2 library !]),[-losipparser2${osip_legacy_version} $osip_aux_libs ])
-       AC_CHECK_LIB(osipparser2${osip_legacy_version},osip_message_init, , AC_MSG_ERROR([Could not find osipparser2 library !]),[$osip_aux_libs])
-       LDFLAGS=$LDFLAGS_save
-       LIBS=$LIBS_save
-fi
-
-AC_SUBST(OSIP_CFLAGS)
-AC_SUBST(OSIP_LIBS)
-
-])
diff --git a/linphone/m4/po.m4 b/linphone/m4/po.m4
deleted file mode 100644 (file)
index 00133ef..0000000
+++ /dev/null
@@ -1,428 +0,0 @@
-# po.m4 serial 13 (gettext-0.15)
-dnl Copyright (C) 1995-2006 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Authors:
-dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
-dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
-
-AC_PREREQ(2.50)
-
-dnl Checks for all prerequisites of the po subdirectory.
-AC_DEFUN([AM_PO_SUBDIRS],
-[
-  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-  AC_REQUIRE([AC_PROG_INSTALL])dnl
-  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
-  AC_REQUIRE([AM_NLS])dnl
-
-  dnl Perform the following tests also if --disable-nls has been given,
-  dnl because they are needed for "make dist" to work.
-
-  dnl Search for GNU msgfmt in the PATH.
-  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
-  dnl The second test excludes FreeBSD msgfmt.
-  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
-    [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
-     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
-    :)
-  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-
-  dnl Test whether it is GNU msgfmt >= 0.15.
-changequote(,)dnl
-  case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
-    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
-    *) MSGFMT_015=$MSGFMT ;;
-  esac
-changequote([,])dnl
-  AC_SUBST([MSGFMT_015])
-changequote(,)dnl
-  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
-    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
-    *) GMSGFMT_015=$GMSGFMT ;;
-  esac
-changequote([,])dnl
-  AC_SUBST([GMSGFMT_015])
-
-  dnl Search for GNU xgettext 0.12 or newer in the PATH.
-  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
-  dnl The second test excludes FreeBSD xgettext.
-  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
-    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
-     (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
-    :)
-  dnl Remove leftover from FreeBSD xgettext call.
-  rm -f messages.po
-
-  dnl Test whether it is GNU xgettext >= 0.15.
-changequote(,)dnl
-  case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
-    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
-    *) XGETTEXT_015=$XGETTEXT ;;
-  esac
-changequote([,])dnl
-  AC_SUBST([XGETTEXT_015])
-
-  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
-  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
-    [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
-
-  dnl Installation directories.
-  dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
-  dnl have to define it here, so that it can be used in po/Makefile.
-  test -n "$localedir" || localedir='${datadir}/locale'
-  AC_SUBST([localedir])
-
-  AC_CONFIG_COMMANDS([po-directories], [[
-    for ac_file in $CONFIG_FILES; do
-      # Support "outfile[:infile[:infile...]]"
-      case "$ac_file" in
-        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-      esac
-      # PO directories have a Makefile.in generated from Makefile.in.in.
-      case "$ac_file" in */Makefile.in)
-        # Adjust a relative srcdir.
-        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
-        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
-        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
-        # In autoconf-2.13 it is called $ac_given_srcdir.
-        # In autoconf-2.50 it is called $srcdir.
-        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
-        case "$ac_given_srcdir" in
-          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
-          /*) top_srcdir="$ac_given_srcdir" ;;
-          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
-        esac
-        # Treat a directory as a PO directory if and only if it has a
-        # POTFILES.in file. This allows packages to have multiple PO
-        # directories under different names or in different locations.
-        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
-          rm -f "$ac_dir/POTFILES"
-          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
-          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[  ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
-          POMAKEFILEDEPS="POTFILES.in"
-          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
-          # on $ac_dir but don't depend on user-specified configuration
-          # parameters.
-          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
-            # The LINGUAS file contains the set of available languages.
-            if test -n "$OBSOLETE_ALL_LINGUAS"; then
-              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
-            fi
-            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
-            # Hide the ALL_LINGUAS assigment from automake < 1.5.
-            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
-            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
-          else
-            # The set of available languages was given in configure.in.
-            # Hide the ALL_LINGUAS assigment from automake < 1.5.
-            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
-          fi
-          # Compute POFILES
-          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
-          # Compute UPDATEPOFILES
-          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
-          # Compute DUMMYPOFILES
-          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
-          # Compute GMOFILES
-          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
-          case "$ac_given_srcdir" in
-            .) srcdirpre= ;;
-            *) srcdirpre='$(srcdir)/' ;;
-          esac
-          POFILES=
-          UPDATEPOFILES=
-          DUMMYPOFILES=
-          GMOFILES=
-          for lang in $ALL_LINGUAS; do
-            POFILES="$POFILES $srcdirpre$lang.po"
-            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
-            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
-            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
-          done
-          # CATALOGS depends on both $ac_dir and the user's LINGUAS
-          # environment variable.
-          INST_LINGUAS=
-          if test -n "$ALL_LINGUAS"; then
-            for presentlang in $ALL_LINGUAS; do
-              useit=no
-              if test "%UNSET%" != "$LINGUAS"; then
-                desiredlanguages="$LINGUAS"
-              else
-                desiredlanguages="$ALL_LINGUAS"
-              fi
-              for desiredlang in $desiredlanguages; do
-                # Use the presentlang catalog if desiredlang is
-                #   a. equal to presentlang, or
-                #   b. a variant of presentlang (because in this case,
-                #      presentlang can be used as a fallback for messages
-                #      which are not translated in the desiredlang catalog).
-                case "$desiredlang" in
-                  "$presentlang"*) useit=yes;;
-                esac
-              done
-              if test $useit = yes; then
-                INST_LINGUAS="$INST_LINGUAS $presentlang"
-              fi
-            done
-          fi
-          CATALOGS=
-          if test -n "$INST_LINGUAS"; then
-            for lang in $INST_LINGUAS; do
-              CATALOGS="$CATALOGS $lang.gmo"
-            done
-          fi
-          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
-          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
-          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
-            if test -f "$f"; then
-              case "$f" in
-                *.orig | *.bak | *~) ;;
-                *) cat "$f" >> "$ac_dir/Makefile" ;;
-              esac
-            fi
-          done
-        fi
-        ;;
-      esac
-    done]],
-   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
-    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
-    # from automake < 1.5.
-    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
-    # Capture the value of LINGUAS because we need it to compute CATALOGS.
-    LINGUAS="${LINGUAS-%UNSET%}"
-   ])
-])
-
-dnl Postprocesses a Makefile in a directory containing PO files.
-AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
-[
-  # When this code is run, in config.status, two variables have already been
-  # set:
-  # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
-  # - LINGUAS is the value of the environment variable LINGUAS at configure
-  #   time.
-
-changequote(,)dnl
-  # Adjust a relative srcdir.
-  ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
-  ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
-  ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
-  # In autoconf-2.13 it is called $ac_given_srcdir.
-  # In autoconf-2.50 it is called $srcdir.
-  test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
-  case "$ac_given_srcdir" in
-    .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
-    /*) top_srcdir="$ac_given_srcdir" ;;
-    *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  # Find a way to echo strings without interpreting backslash.
-  if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
-    gt_echo='echo'
-  else
-    if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
-      gt_echo='printf %s\n'
-    else
-      echo_func () {
-        cat <<EOT
-$*
-EOT
-      }
-      gt_echo='echo_func'
-    fi
-  fi
-
-  # A sed script that extracts the value of VARIABLE from a Makefile.
-  sed_x_variable='
-# Test if the hold space is empty.
-x
-s/P/P/
-x
-ta
-# Yes it was empty. Look if we have the expected variable definition.
-/^[     ]*VARIABLE[     ]*=/{
-  # Seen the first line of the variable definition.
-  s/^[  ]*VARIABLE[     ]*=//
-  ba
-}
-bd
-:a
-# Here we are processing a line from the variable definition.
-# Remove comment, more precisely replace it with a space.
-s/#.*$/ /
-# See if the line ends in a backslash.
-tb
-:b
-s/\\$//
-# Print the line, without the trailing backslash.
-p
-tc
-# There was no trailing backslash. The end of the variable definition is
-# reached. Clear the hold space.
-s/^.*$//
-x
-bd
-:c
-# A trailing backslash means that the variable definition continues in the
-# next line. Put a nonempty string into the hold space to indicate this.
-s/^.*$/P/
-x
-:d
-'
-changequote([,])dnl
-
-  # Set POTFILES to the value of the Makefile variable POTFILES.
-  sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
-  POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
-  # Compute POTFILES_DEPS as
-  #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
-  POTFILES_DEPS=
-  for file in $POTFILES; do
-    POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
-  done
-  POMAKEFILEDEPS=""
-
-  if test -n "$OBSOLETE_ALL_LINGUAS"; then
-    test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
-  fi
-  if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
-    # The LINGUAS file contains the set of available languages.
-    ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
-    POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
-  else
-    # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
-    sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
-    ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
-  fi
-  # Hide the ALL_LINGUAS assigment from automake < 1.5.
-  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
-  # Compute POFILES
-  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
-  # Compute UPDATEPOFILES
-  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
-  # Compute DUMMYPOFILES
-  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
-  # Compute GMOFILES
-  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
-  # Compute PROPERTIESFILES
-  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
-  # Compute CLASSFILES
-  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
-  # Compute QMFILES
-  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
-  # Compute MSGFILES
-  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
-  # Compute RESOURCESDLLFILES
-  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
-  case "$ac_given_srcdir" in
-    .) srcdirpre= ;;
-    *) srcdirpre='$(srcdir)/' ;;
-  esac
-  POFILES=
-  UPDATEPOFILES=
-  DUMMYPOFILES=
-  GMOFILES=
-  PROPERTIESFILES=
-  CLASSFILES=
-  QMFILES=
-  MSGFILES=
-  RESOURCESDLLFILES=
-  for lang in $ALL_LINGUAS; do
-    POFILES="$POFILES $srcdirpre$lang.po"
-    UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
-    DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
-    GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
-    PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
-    CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
-    QMFILES="$QMFILES $srcdirpre$lang.qm"
-    frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
-    MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
-    frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
-    RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
-  done
-  # CATALOGS depends on both $ac_dir and the user's LINGUAS
-  # environment variable.
-  INST_LINGUAS=
-  if test -n "$ALL_LINGUAS"; then
-    for presentlang in $ALL_LINGUAS; do
-      useit=no
-      if test "%UNSET%" != "$LINGUAS"; then
-        desiredlanguages="$LINGUAS"
-      else
-        desiredlanguages="$ALL_LINGUAS"
-      fi
-      for desiredlang in $desiredlanguages; do
-        # Use the presentlang catalog if desiredlang is
-        #   a. equal to presentlang, or
-        #   b. a variant of presentlang (because in this case,
-        #      presentlang can be used as a fallback for messages
-        #      which are not translated in the desiredlang catalog).
-        case "$desiredlang" in
-          "$presentlang"*) useit=yes;;
-        esac
-      done
-      if test $useit = yes; then
-        INST_LINGUAS="$INST_LINGUAS $presentlang"
-      fi
-    done
-  fi
-  CATALOGS=
-  JAVACATALOGS=
-  QTCATALOGS=
-  TCLCATALOGS=
-  CSHARPCATALOGS=
-  if test -n "$INST_LINGUAS"; then
-    for lang in $INST_LINGUAS; do
-      CATALOGS="$CATALOGS $lang.gmo"
-      JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
-      QTCATALOGS="$QTCATALOGS $lang.qm"
-      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
-      TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
-      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
-      CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
-    done
-  fi
-
-  sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
-  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
-    # Add dependencies that cannot be formulated as a simple suffix rule.
-    for lang in $ALL_LINGUAS; do
-      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
-      cat >> "$ac_file.tmp" <<EOF
-$frobbedlang.msg: $lang.po
-       @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
-       \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
-EOF
-    done
-  fi
-  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
-    # Add dependencies that cannot be formulated as a simple suffix rule.
-    for lang in $ALL_LINGUAS; do
-      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
-      cat >> "$ac_file.tmp" <<EOF
-$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
-       @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
-       \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
-EOF
-    done
-  fi
-  if test -n "$POMAKEFILEDEPS"; then
-    cat >> "$ac_file.tmp" <<EOF
-Makefile: $POMAKEFILEDEPS
-EOF
-  fi
-  mv "$ac_file.tmp" "$ac_file"
-])
diff --git a/linphone/m4/printf-posix.m4 b/linphone/m4/printf-posix.m4
deleted file mode 100644 (file)
index af10170..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-# printf-posix.m4 serial 2 (gettext-0.13.1)
-dnl Copyright (C) 2003 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-dnl Test whether the printf() function supports POSIX/XSI format strings with
-dnl positions.
-
-AC_DEFUN([gt_PRINTF_POSIX],
-[
-  AC_REQUIRE([AC_PROG_CC])
-  AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
-    gt_cv_func_printf_posix,
-    [
-      AC_TRY_RUN([
-#include <stdio.h>
-#include <string.h>
-/* The string "%2$d %1$d", with dollar characters protected from the shell's
-   dollar expansion (possibly an autoconf bug).  */
-static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
-static char buf[100];
-int main ()
-{
-  sprintf (buf, format, 33, 55);
-  return (strcmp (buf, "55 33") != 0);
-}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
-      [
-        AC_EGREP_CPP(notposix, [
-#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
-  notposix
-#endif
-        ], gt_cv_func_printf_posix="guessing no",
-           gt_cv_func_printf_posix="guessing yes")
-      ])
-    ])
-  case $gt_cv_func_printf_posix in
-    *yes)
-      AC_DEFINE(HAVE_POSIX_PRINTF, 1,
-        [Define if your printf() function supports format strings with positions.])
-      ;;
-  esac
-])
diff --git a/linphone/m4/progtest.m4 b/linphone/m4/progtest.m4
deleted file mode 100644 (file)
index a56365c..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-# progtest.m4 serial 4 (gettext-0.14.2)
-dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Authors:
-dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
-
-AC_PREREQ(2.50)
-
-# Search path for a program which passes the given test.
-
-dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
-dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
-AC_DEFUN([AM_PATH_PROG_WITH_TEST],
-[
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-
-# Find out how to test for executable files. Don't use a zero-byte file,
-# as systems may use methods other than mode bits to determine executability.
-cat >conf$$.file <<_ASEOF
-#! /bin/sh
-exit 0
-_ASEOF
-chmod +x conf$$.file
-if test -x conf$$.file >/dev/null 2>&1; then
-  ac_executable_p="test -x"
-else
-  ac_executable_p="test -f"
-fi
-rm -f conf$$.file
-
-# Extract the first word of "$2", so it can be a program name with args.
-set dummy $2; ac_word=[$]2
-AC_MSG_CHECKING([for $ac_word])
-AC_CACHE_VAL(ac_cv_path_$1,
-[case "[$]$1" in
-  [[\\/]]* | ?:[[\\/]]*)
-    ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
-    ;;
-  *)
-    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
-    for ac_dir in ifelse([$5], , $PATH, [$5]); do
-      IFS="$ac_save_IFS"
-      test -z "$ac_dir" && ac_dir=.
-      for ac_exec_ext in '' $ac_executable_extensions; do
-        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
-          echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
-          if [$3]; then
-            ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
-            break 2
-          fi
-        fi
-      done
-    done
-    IFS="$ac_save_IFS"
-dnl If no 4th arg is given, leave the cache variable unset,
-dnl so AC_PATH_PROGS will keep looking.
-ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
-])dnl
-    ;;
-esac])dnl
-$1="$ac_cv_path_$1"
-if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
-  AC_MSG_RESULT([$]$1)
-else
-  AC_MSG_RESULT(no)
-fi
-AC_SUBST($1)dnl
-])
diff --git a/linphone/m4/readline.m4 b/linphone/m4/readline.m4
deleted file mode 100644 (file)
index 8c4e185..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-##################################################
-# Check for readline support.
-##################################################
-
-AC_DEFUN([LP_CHECK_READLINE],[
-
-AC_ARG_WITH( readline,
-      [  --with-readline      Set prefix where gnu readline headers and libs can be found (ex:/usr, /usr/local, none) [default=/usr] ],
-      [ readline_prefix=${withval}],[ readline_prefix="/usr" ])
-
-if test "$readline_prefix" != "none"; then
-
-       if test "$readline_prefix" != "/usr"; then
-               READLINE_CFLAGS="-I$readline_prefix/include"
-               READLINE_LIBS="-L$readline_prefix/lib"
-       fi
-       
-       CPPFLAGS_save=$CPPFLAGS
-       LIBS_save=$LIBS
-       CPPFLAGS="$CPPFLAGS $READLINE_CFLAGS"
-       LIBS="$LIBS $READLINE_LIBS"
-       AC_CHECK_HEADERS(readline.h readline/readline.h, readline_h_found=yes)
-       AC_CHECK_HEADERS(history.h readline/history.h)
-       
-       AC_CHECK_LIB(readline, readline, [readline_libs_found=yes],[],[-lncurses])
-       
-       LIBS=$LIBS_save
-       CPPFLAGS=$CPPFLAGS_save
-       
-       if test "$readline_libs_found$readline_h_found" != "yesyes" ; then
-               AC_MSG_WARN("Could not find libreadline headers or library, linphonec will have limited prompt features")
-       else
-               READLINE_LIBS="$READLINE_LIBS -lreadline -lncurses"
-       fi
-       
-       
-       AC_SUBST(READLINE_CFLAGS)
-       AC_SUBST(READLINE_LIBS)
-
-else
-       AC_MSG_NOTICE([Readline support disabled.])
-fi
-
-])
diff --git a/linphone/m4/signed.m4 b/linphone/m4/signed.m4
deleted file mode 100644 (file)
index 048f593..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-# signed.m4 serial 1 (gettext-0.10.40)
-dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_DEFUN([bh_C_SIGNED],
-[
-  AC_CACHE_CHECK([for signed], bh_cv_c_signed,
-   [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
-  if test $bh_cv_c_signed = no; then
-    AC_DEFINE(signed, ,
-              [Define to empty if the C compiler doesn't support this keyword.])
-  fi
-])
diff --git a/linphone/m4/size_max.m4 b/linphone/m4/size_max.m4
deleted file mode 100644 (file)
index bfba811..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-# size_max.m4 serial 5
-dnl Copyright (C) 2003, 2005-2006 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_DEFUN([gl_SIZE_MAX],
-[
-  AC_CHECK_HEADERS(stdint.h)
-  dnl First test whether the system already has SIZE_MAX.
-  AC_MSG_CHECKING([for SIZE_MAX])
-  AC_CACHE_VAL([gl_cv_size_max], [
-    gl_cv_size_max=
-    AC_EGREP_CPP([Found it], [
-#include <limits.h>
-#if HAVE_STDINT_H
-#include <stdint.h>
-#endif
-#ifdef SIZE_MAX
-Found it
-#endif
-], gl_cv_size_max=yes)
-    if test -z "$gl_cv_size_max"; then
-      dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
-      dnl than the type 'unsigned long'. Try hard to find a definition that can
-      dnl be used in a preprocessor #if, i.e. doesn't contain a cast.
-      _AC_COMPUTE_INT([sizeof (size_t) * CHAR_BIT - 1], size_t_bits_minus_1,
-        [#include <stddef.h>
-#include <limits.h>], size_t_bits_minus_1=)
-      _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
-        [#include <stddef.h>], fits_in_uint=)
-      if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
-        if test $fits_in_uint = 1; then
-          dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
-          dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
-          AC_TRY_COMPILE([#include <stddef.h>
-            extern size_t foo;
-            extern unsigned long foo;
-            ], [], fits_in_uint=0)
-        fi
-        dnl We cannot use 'expr' to simplify this expression, because 'expr'
-        dnl works only with 'long' integers in the host environment, while we
-        dnl might be cross-compiling from a 32-bit platform to a 64-bit platform.
-        if test $fits_in_uint = 1; then
-          gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
-        else
-          gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
-        fi
-      else
-        dnl Shouldn't happen, but who knows...
-        gl_cv_size_max='((size_t)~(size_t)0)'
-      fi
-    fi
-  ])
-  AC_MSG_RESULT([$gl_cv_size_max])
-  if test "$gl_cv_size_max" != yes; then
-    AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max],
-      [Define as the maximum value of type 'size_t', if the system doesn't define it.])
-  fi
-])
diff --git a/linphone/m4/stdint_h.m4 b/linphone/m4/stdint_h.m4
deleted file mode 100644 (file)
index db9a8ac..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-# stdint_h.m4 serial 6
-dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Paul Eggert.
-
-# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
-# doesn't clash with <sys/types.h>, and declares uintmax_t.
-
-AC_DEFUN([gl_AC_HEADER_STDINT_H],
-[
-  AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h,
-  [AC_TRY_COMPILE(
-    [#include <sys/types.h>
-#include <stdint.h>],
-    [uintmax_t i = (uintmax_t) -1; return !i;],
-    gl_cv_header_stdint_h=yes,
-    gl_cv_header_stdint_h=no)])
-  if test $gl_cv_header_stdint_h = yes; then
-    AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
-      [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
-       and declares uintmax_t. ])
-  fi
-])
diff --git a/linphone/m4/uintmax_t.m4 b/linphone/m4/uintmax_t.m4
deleted file mode 100644 (file)
index bf83ed7..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-# uintmax_t.m4 serial 9
-dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Paul Eggert.
-
-AC_PREREQ(2.13)
-
-# Define uintmax_t to 'unsigned long' or 'unsigned long long'
-# if it is not already defined in <stdint.h> or <inttypes.h>.
-
-AC_DEFUN([gl_AC_TYPE_UINTMAX_T],
-[
-  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
-  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
-  if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
-    AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG])
-    test $ac_cv_type_unsigned_long_long = yes \
-      && ac_type='unsigned long long' \
-      || ac_type='unsigned long'
-    AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
-      [Define to unsigned long or unsigned long long
-       if <stdint.h> and <inttypes.h> don't define.])
-  else
-    AC_DEFINE(HAVE_UINTMAX_T, 1,
-      [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
-  fi
-])
diff --git a/linphone/m4/ulonglong.m4 b/linphone/m4/ulonglong.m4
deleted file mode 100644 (file)
index 9fae98e..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# ulonglong.m4 serial 6
-dnl Copyright (C) 1999-2006 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Paul Eggert.
-
-# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
-# This fixes a bug in Autoconf 2.60, but can be removed once we
-# assume 2.61 everywhere.
-
-# Note: If the type 'unsigned long long int' exists but is only 32 bits
-# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
-# will not be defined. In this case you can treat 'unsigned long long int'
-# like 'unsigned long int'.
-
-AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
-[
-  AC_CACHE_CHECK([for unsigned long long int],
-    [ac_cv_type_unsigned_long_long_int],
-    [AC_LINK_IFELSE(
-       [AC_LANG_PROGRAM(
-         [[unsigned long long int ull = 18446744073709551615ULL;
-           typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1
-                          ? 1 : -1)];
-          int i = 63;]],
-         [[unsigned long long int ullmax = 18446744073709551615ull;
-           return (ull << 63 | ull >> 63 | ull << i | ull >> i
-                   | ullmax / ull | ullmax % ull);]])],
-       [ac_cv_type_unsigned_long_long_int=yes],
-       [ac_cv_type_unsigned_long_long_int=no])])
-  if test $ac_cv_type_unsigned_long_long_int = yes; then
-    AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], 1,
-      [Define to 1 if the system has the type `unsigned long long int'.])
-  fi
-])
-
-# This macro is obsolescent and should go away soon.
-AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG],
-[
-  AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
-  ac_cv_type_unsigned_long_long=$ac_cv_type_unsigned_long_long_int
-  if test $ac_cv_type_unsigned_long_long = yes; then
-    AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
-      [Define if you have the 'unsigned long long' type.])
-  fi
-])
diff --git a/linphone/m4/video.m4 b/linphone/m4/video.m4
deleted file mode 100644 (file)
index 73cdf9f..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-AC_DEFUN([LP_CHECK_DEP],[
-       dnl $1=dependency description
-       dnl $2=dependency short name, will be suffixed with _CFLAGS and _LIBS
-       dnl $3=headers's place
-       dnl $4=lib's place
-       dnl $5=header to check
-       dnl $6=lib to check
-       dnl $7=function to check in library
-       
-       NAME=$2
-       dep_headersdir=$3
-       dep_libsdir=$4
-       dep_header=$5
-       dep_lib=$6
-       dep_funclib=$7
-       other_libs=$8   
-       
-       if test "$dep_headersdir" != "/usr/include" ; then
-               eval ${NAME}_CFLAGS=\"-I$dep_headersdir \"
-       fi
-       eval ${NAME}_LIBS=\"-L$dep_libsdir -l$dep_lib\"
-       
-       CPPFLAGS_save=$CPPFLAGS
-       LDFLAGS_save=$LDFLAGS
-       CPPFLAGS="-I$dep_headersdir "
-       LDFLAGS="-L$dep_libsdir "
-       
-       AC_CHECK_HEADERS([$dep_header],[AC_CHECK_LIB([$dep_lib],[$dep_funclib],found=yes,found=no, [$other_libs])
-       ],found=no)
-       
-       if test "$found" = "yes" ; then
-               eval ${NAME}_found=yes
-               AC_DEFINE([HAVE_${NAME}],1,[Defined when we have found $1])
-               AC_SUBST(${NAME}_CFLAGS)
-               AC_SUBST(${NAME}_LIBS)
-       else
-               eval ${NAME}_found=no
-               eval ${NAME}_CFLAGS=
-               eval ${NAME}_LIBS=
-       fi
-       CPPFLAGS=$CPPFLAGS_save
-       LDFLAGS=$LDFLAGS_save
-       
-])
-
-
-AC_DEFUN([LP_CHECK_VIDEO],[
-
-       dnl conditionnal build of video support
-       AC_ARG_ENABLE(video,
-                 [  --enable-video    Turn on video support compiling: not functionnal for the moment],
-                 [case "${enableval}" in
-                       yes) video=true ;;
-                       no)  video=false ;;
-                       *) AC_MSG_ERROR(bad value ${enableval} for --enable-video) ;;
-                 esac],[video=false])
-                 
-       AC_ARG_WITH( ffmpeg,
-                 [  --with-ffmpeg              Sets the installation prefix of ffmpeg, needed for video support. [default=/usr] ],
-                 [ ffmpegdir=${withval}],[ ffmpegdir=/usr ])
-       
-       AC_ARG_WITH( sdl,
-                 [  --with-sdl         Sets the installation prefix of libSDL, needed for video support. [default=/usr] ],
-                 [ libsdldir=${withval}],[ libsdldir=/usr ])
-       
-       if test "$video" = "true"; then
-               
-               dnl test for ffmpeg presence
-               dnl LP_CHECK_DEP([ffmpeg],[FFMPEG],[${ffmpegdir}/include/ffmpeg],[${ffmpegdir}/lib],[avcodec.h],[avcodec],[avcodec_init], [-lavutils -lm])
-               dnl if test "$FFMPEG_found" = "no" ; then
-               dnl     AC_MSG_ERROR([Could not find ffmpeg headers and library. This is mandatory for video support])
-               dnl fi
-               PKG_CHECK_MODULES(FFMPEG, [libavcodec >= 50.0.0 ], , [ AC_MSG_ERROR([Could not find ffmpeg headers and library. This is mandatory for video support]) ])
-               
-               LP_CHECK_DEP([SDL],[SDL],[${libsdldir}/include],[${libsdldir}/lib],[SDL/SDL.h],[SDL],[SDL_Init])
-               if test "$SDL_found" = "no" ; then
-                       AC_MSG_ERROR([Could not find libsdl headers and library. This is mandatory for video support])
-               fi
-       
-               VIDEO_CFLAGS=" $FFMPEG_CFLAGS $SDL_CFLAGS"
-               VIDEO_LIBS=" $FFMPEG_LIBS $SDL_LIBS"
-               
-               AC_DEFINE(VIDEO_ENABLED,1,[Set when video support is enabled])
-               
-       fi
-       
-       AC_SUBST(VIDEO_CFLAGS)
-       AC_SUBST(VIDEO_LIBS)
-])
diff --git a/linphone/m4/visibility.m4 b/linphone/m4/visibility.m4
deleted file mode 100644 (file)
index 2ff6330..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-# visibility.m4 serial 1 (gettext-0.15)
-dnl Copyright (C) 2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-dnl Tests whether the compiler supports the command-line option
-dnl -fvisibility=hidden and the function and variable attributes
-dnl __attribute__((__visibility__("hidden"))) and
-dnl __attribute__((__visibility__("default"))).
-dnl Does *not* test for __visibility__("protected") - which has tricky
-dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
-dnl MacOS X.
-dnl Does *not* test for __visibility__("internal") - which has processor
-dnl dependent semantics.
-dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
-dnl "really only recommended for legacy code".
-dnl Set the variable CFLAG_VISIBILITY.
-dnl Defines and sets the variable HAVE_VISIBILITY.
-
-AC_DEFUN([gl_VISIBILITY],
-[
-  AC_REQUIRE([AC_PROG_CC])
-  CFLAG_VISIBILITY=
-  HAVE_VISIBILITY=0
-  if test -n "$GCC"; then
-    AC_MSG_CHECKING([for simple visibility declarations])
-    AC_CACHE_VAL(gl_cv_cc_visibility, [
-      gl_save_CFLAGS="$CFLAGS"
-      CFLAGS="$CFLAGS -fvisibility=hidden"
-      AC_TRY_COMPILE(
-        [extern __attribute__((__visibility__("hidden"))) int hiddenvar;
-         extern __attribute__((__visibility__("default"))) int exportedvar;
-         extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
-         extern __attribute__((__visibility__("default"))) int exportedfunc (void);],
-        [],
-        gl_cv_cc_visibility=yes,
-        gl_cv_cc_visibility=no)
-      CFLAGS="$gl_save_CFLAGS"])
-    AC_MSG_RESULT([$gl_cv_cc_visibility])
-    if test $gl_cv_cc_visibility = yes; then
-      CFLAG_VISIBILITY="-fvisibility=hidden"
-      HAVE_VISIBILITY=1
-    fi
-  fi
-  AC_SUBST([CFLAG_VISIBILITY])
-  AC_SUBST([HAVE_VISIBILITY])
-  AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
-    [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
-])
diff --git a/linphone/m4/wchar_t.m4 b/linphone/m4/wchar_t.m4
deleted file mode 100644 (file)
index cde2129..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-# wchar_t.m4 serial 1 (gettext-0.12)
-dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-dnl Test whether <stddef.h> has the 'wchar_t' type.
-dnl Prerequisite: AC_PROG_CC
-
-AC_DEFUN([gt_TYPE_WCHAR_T],
-[
-  AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
-    [AC_TRY_COMPILE([#include <stddef.h>
-       wchar_t foo = (wchar_t)'\0';], ,
-       gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
-  if test $gt_cv_c_wchar_t = yes; then
-    AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
-  fi
-])
diff --git a/linphone/m4/wint_t.m4 b/linphone/m4/wint_t.m4
deleted file mode 100644 (file)
index b8fff9c..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-# wint_t.m4 serial 1 (gettext-0.12)
-dnl Copyright (C) 2003 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-dnl Test whether <wchar.h> has the 'wint_t' type.
-dnl Prerequisite: AC_PROG_CC
-
-AC_DEFUN([gt_TYPE_WINT_T],
-[
-  AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
-    [AC_TRY_COMPILE([#include <wchar.h>
-       wint_t foo = (wchar_t)'\0';], ,
-       gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
-  if test $gt_cv_c_wint_t = yes; then
-    AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
-  fi
-])
diff --git a/linphone/m4/xsize.m4 b/linphone/m4/xsize.m4
deleted file mode 100644 (file)
index 85bb721..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-# xsize.m4 serial 3
-dnl Copyright (C) 2003-2004 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_XSIZE],
-[
-  dnl Prerequisites of lib/xsize.h.
-  AC_REQUIRE([gl_SIZE_MAX])
-  AC_REQUIRE([AC_C_INLINE])
-  AC_CHECK_HEADERS(stdint.h)
-])
diff --git a/linphone/media_api/.gitignore b/linphone/media_api/.gitignore
deleted file mode 100644 (file)
index e995588..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-.deps
-Makefile
-Makefile.in
diff --git a/linphone/media_api/DESIGN.txt b/linphone/media_api/DESIGN.txt
deleted file mode 100644 (file)
index f7c9cfc..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-MEDIA API DESIGN DRAFT
-**********************
-
-
-The objective of the media_api is to construct and run the necessary
-processing on audio and video data flows for a given call (two party call) or
-conference.
-The media_api must support calls where callmember can be remote as well
-local hosted, in other words the media_api can be used inside linphone as
-well as in sip conferencing server. The api must support multiples way of
-getting media data: from disk, from rtp, from soundcard...
-The media_api is object oriented in C, and is based on the mediastreamer library
-to deal with audio or video signals, and on glib for types and usefull routines.
-
-The api must provide object and methods that describes the call, and then functions
-that executes the processing (using the mediastreamer) that is necessary for the
-call described.
-
-Proposed API:
-
-************************************************************************
-object: MediaFlow
-This object reprensent a media that is shared between all members of the call,
-for example voice.
-methods:
-MediaFlow *media_flow_new(char *id_string,gint type,gint duplex);
-type can be FLOW_AUDIO, FLOW_VIDEO.
-if duplex is 1, it means that the media flow is used by every member in both
-receiving and sending mode.
-id_string is just a string to identify the flow.
-
-void media_flow_destroy(MediaFlow *flow);
-destructor
-
-**************************************************************************
-object: CallMember
-This object reprensent a member of a call.
-methods:
-CallMember *call_member_new();
-
-gint call_member_setup_flow(CallMember *member, MediaFlow *flow,
-                                                                                                         char *rx_endpoint, char *tx_endpoint);
-       This is the most important function of the API. It describes the way each
-       call member receives and send a given media flow.
-       The MediaFlow "flow" is added to the list of flows used by the member "member".
-       rx_endpoint is a string that described how data is received by the call member.
-       It should be an url, for example "rtp://213.21.54.127:7080". In this case it
-       means that data will be received on port 7080 at ip address 213.21.54.127.
-       tx_endpoint is a string that described how data is sent by the call member.
-       The role of url is very important. They can be:
-       "rtp://213.21.54.127:7080"
-       "file://tmp/media.out"  -a file on disk
-       "oss://0"               -souncard 0 using oss api
-       "alsa://0"                                                      -soundcard 0 using alsa api.
-       In order to work, the call member must be part of a BasicCall, as well as
-       the flow must be part of the BasicCall too (using basic_call_add_flow())
-       This function may (on the backend) create a MediaEndpoint object that stores
-       the rx_endpoint and tx_endpoint parameter. This object is added to:
-       -the list of MediaEndpoint maintained by the member (list per member)
-       -the list of MediaEndpoint maintained by the flow (list per flow)
-
-
-**************************************************************************
-object: BasicCall
-This object handles simple calls (two party calls). It defines inside itself
-two CallMember objects.
-method:
-BasicCall *basic_call_new();
-
-CallMember *basic_call_get_member(BasicCall *call, gint member_number);
-       Returns a member of a BasicCall according to a number.
-       
-void basic_call_add_flow(BasicCall *call, MediaFlow *flow);
-       Adds a flow to the call's list of flow.
-       
-gint basic_call_start_flow(BasicCall *call, MediaFlow *flow);
-       This function construct the mediastreamer processing chain necessary to make
-       the call running, if not done, and runs it using ms_start()
-       
-gint basic_call_stop_flow(BasicCall *call, MediaFlow *flow);
-
-gint basic_call_start_all_flows(BasicCall *call);
-       
-void basic_call_destroy(BasicCall *call);
-       Destroy all data used by the call: call members, call flows.
-
-**************************************************************************
-object: ConferenceCall
-This object handles conference call (which are quite much complicated than basic
-calls). But this object should have the same method as the BasicCall object.
-
-*******************************************************************
-                       EXAMPLE
-*******************************************************************
-
-Two party call between call member A on machine "linphone.org" and call member B on machine "home.com". 
-The media_api is running on "home.com".
-
-       A (on linphone.org)                                                             B (on home.com)
-
------->(send to rtp://home.com:7080              MSRTPReceiver------>Decode----->(send to oss:/0)
-
-------<(recv on rtp://linphone.org:7020                  MSRTPSender<--------Encode<-----(read on oss://0)
-
-This is how to setup this call using the media_api:
-BasicCall *call;
-CallMember *memberA,*memberB;
-MediaFlow *flow;
-
-/* create a basic call*/
-call=basic_call_new();
-/* get a pointer to the pre-define members of the call */
-memberA=basic_call_get_member(call,0);
-memberB=basic_call_get_member(call,1);
-
-/* create a media flow */
-flow=media_flow_new("voice",FLOW_AUDIO,1);
-/* tell that the flow is used by the call */
-basic_call_add_flow(call,flow);
-/* tell how each member uses the flow (how is the interface ?)*/
-call_member_setup_flow(memberA,flow,"rtp://linphone.org:7020","rtp://home.com:7080");
-/* note: it is not efficient to do name resolution at this stage: that's why in reality numeric ip address
-should be given instead of host name */
-call_member_setup_flow(memberB,flow,"oss://0","oss://0");
-
-/* start the flow */
-basic_call_start_flow(call,flow);
-
-In case where the media api is running on another host called "toto" (in a media translator application for example),
- the only thing that would change is the url given to memberB: tx="rtp://home.com:8820" for example and
- rx="rtp://toto:9522".
-In the sipomatic application (the test application I use to test linphone (it answers to call and plays
-a short annoucement)), I would write rx="file://path_to_annoucement.raw" and tx="file://dev/null" instead of
-"oss://0".
diff --git a/linphone/media_api/Makefile.am b/linphone/media_api/Makefile.am
deleted file mode 100644 (file)
index 38dcf06..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-## Process this file with automake to produce Makefile.in
-if BUILD_MEDIA_API
-
-#the media_api library is the only one we have to build here
-lib_LTLIBRARIES=libmedia_api.la
-
-#definition of the sources of libmedia_api
-libmedia_api_la_SOURCES=       basiccall.c callmember.c mediaflow.c
-
-# libmedia_api  needs libmediastreamer
-libmedia_api_la_LIBADD=$(top_srcdir)/mediastreamer/libmediastreamer.la
-
-#the media_api test program
-bin_PROGRAMS=apitest
-
-apitest_SOURCES= apitest.c
-# the test program links to libmedia_api
-apitest_LDADD=libmedia_api.la
-
-endif
-
-DEFS=@DEFS@ @SOUNDDEFS@ -DDEBUG -DG_LOG_DOMAIN=\"MediaApi\" 
-
-INCLUDES=-I$(top_srcdir)/mediastreamer \
-               -I$(top_srcdir)/speex \
-               -I$(top_srcdir)/gsmlib \
-               $(ORTP_CFLAGS) \
-               -I$(top_srcdir)/lpc10-1.5 \
-               -I$(top_srcdir)/ffmpeg 
-
-
diff --git a/linphone/media_api/apitest.c b/linphone/media_api/apitest.c
deleted file mode 100644 (file)
index cd4ac9e..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#include "basiccall.h"
-#include <signal.h>
-static int flag = 1;
-void stop(int sign){
-       flag = 0;
-}
-
-
-int main(){
-       BasicCall *call;
-       char *id;
-       CallMember *memberA, *memberB;
-       MediaFlow *flow, *flow1;
-
-       signal(SIGINT, stop);
-       call = basic_call_new();
-       memberA = basic_call_get_member(call,MemberA);
-       memberB = basic_call_get_member(call,MemberB);
-
-       id = "test_voice";
-       printf("\n");
-       flow = media_flow_new(id, MEDIA_FLOW_VOICE);
-       
-       basic_call_add_flow(call, flow);
-
-       call_member_setup_flow(memberA, flow, "file://temp", "oss://0");
-       call_member_setup_flow(memberB, flow, "oss://0", "oss://0");
-
-       media_flow_setup_fd(flow, memberA, memberB, MEDIA_FLOW_HALF_DUPLEX); 
-       basic_call_start_flow(call, flow);
-
-       while(flag){
-               sleep(1);
-       }
-
-}
diff --git a/linphone/media_api/apitest.h b/linphone/media_api/apitest.h
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/linphone/media_api/basiccall.c b/linphone/media_api/basiccall.c
deleted file mode 100644 (file)
index 8a00447..0000000
+++ /dev/null
@@ -1,170 +0,0 @@
-/*\r
-       The objective of the media_api is to construct and run the necessary processing \r
-       on audio and video data flows for a given call (two party call) or conference.\r
-       Copyright (C) 2001  Sharath Udupa skuds@gmx.net\r
-\r
-       This library is free software; you can redistribute it and/or\r
-       modify it under the terms of the GNU Lesser General Public\r
-       License as published by the Free Software Foundation; either\r
-       version 2.1 of the License, or (at your option) any later version.\r
-\r
-       This library is distributed in the hope that it will be useful,\r
-       but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-       Lesser General Public License for more details.\r
-\r
-       You should have received a copy of the GNU Lesser General Public\r
-       License along with this library; if not, write to the Free Software\r
-       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
-*/\r
-\r
-#include "basiccall.h"\r
-#include "../mediastreamer/mscodec.h"\r
-\r
-#define ONESYNC 10\r
-#define MULTISYNC 20\r
-\r
-BasicCall *basic_call_new(){\r
-       BasicCall *bc = (BasicCall*) g_malloc(sizeof(BasicCall));\r
-       api_trace("basic_call_new: creating a basic call");\r
-       bc->memberA = call_member_new("memberA");\r
-       bc->memberB = call_member_new("memberB");\r
-       return bc;\r
-}\r
-\r
-CallMember *basic_call_get_member(BasicCall *call, int member_nu){\r
-       api_trace("basic_call_get_member: called for %d",member_nu);\r
-       if(member_nu == MemberA){\r
-               return call->memberA;\r
-       }\r
-       else if(member_nu == MemberB){\r
-               return call->memberB;\r
-       }\r
-}\r
-\r
-void basic_call_add_flow(BasicCall *call, MediaFlow *flow){\r
-       api_trace("basic_call_add_flow: called for %s",flow->id);\r
-       call->flows = g_list_append( call->flows, flow);\r
-       return 1;\r
-}\r
-\r
-int find_mediaflow(gconstpointer llist, gconstpointer flow){\r
-       //MediaFlow *mf = (MediaFlow *) ((BasicCallFlow*)llist)->mediaFlow;\r
-       if(((MediaFlow*)flow)->id == ((MediaFlow*)llist)->id){\r
-               return 0;\r
-       }\r
-       return 1;\r
-}\r
-\r
-int basic_call_start_flow(BasicCall *call, MediaFlow *flow){\r
-       int i=0;\r
-       int syncFlag=0;\r
-       int nFlowDirections;\r
-       MSSync *sync;\r
-       Members *source, *destination;\r
-       FlowDirections *fd;\r
-       GList *elem, *selem;\r
-       GList *snd_read = NULL, *snd_write = NULL, *filter = NULL;\r
-       \r
-       //Commented by Sharat\r
-       //This is initialized in media_api.c\r
-       //when should these functions be really called?\r
-       //ms_init(); \r
-       //ortp_init(); \r
-       \r
-       api_trace("basic_call_start_flow: called for flow %s", flow->id);\r
-       \r
-       elem = g_list_find_custom( call->flows, flow, &find_mediaflow);\r
-       if(elem == NULL){\r
-               api_error("basic_call_start_flow: Called for unregistered mediaflow %s", flow->id);\r
-       }\r
-       \r
-       nFlowDirections = g_list_length(flow->flowDirections);\r
-       if(flow->type == MEDIA_FLOW_VOICE){\r
-               syncFlag = ONESYNC;\r
-               sync = ms_timer_new();\r
-       }\r
-       else{\r
-               syncFlag = MULTISYNC;\r
-       }\r
-\r
-       for(i=0;i< nFlowDirections; i++){\r
-               \r
-               if(syncFlag == MULTISYNC){\r
-                       sync = ms_timer_new();\r
-               }\r
-               fd = (FlowDirections*)g_list_nth_data(flow->flowDirections,i);\r
-               source = fd->source;\r
-               destination = fd->destination;\r
-\r
-               media_flow_start_fd(fd, sync);\r
-               if(fd->type == MEDIA_FLOW_DUPLEX){\r
-                       switch(source->tx_endpoint->protocol){\r
-                               case MEDIA_ALSA:\r
-                               case MEDIA_OSS:\r
-                                       snd_read = g_list_append(snd_read, fd->recv);\r
-                       }\r
-                       switch(destination->rx_endpoint->protocol){\r
-                               case MEDIA_ALSA:\r
-                               case MEDIA_OSS:\r
-                                       snd_write = g_list_append(snd_write, fd->play);\r
-                       }\r
-                       \r
-                       switch(destination->tx_endpoint->protocol){\r
-                               case MEDIA_ALSA:\r
-                               case MEDIA_OSS:\r
-                                       snd_read = g_list_append(snd_read, fd->read);\r
-                       }\r
-                       \r
-                       switch(source->rx_endpoint->protocol){\r
-                               case MEDIA_ALSA:\r
-                               case MEDIA_OSS:\r
-                                       snd_write = g_list_append(snd_write, fd->send);\r
-                       }\r
-                       \r
-               }\r
-               else if(fd->type == MEDIA_FLOW_HALF_DUPLEX){\r
-                       \r
-                       switch(source->tx_endpoint->protocol){\r
-                               case MEDIA_ALSA:\r
-                               case MEDIA_OSS:\r
-                                       snd_read = g_list_append(snd_read, fd->recv);\r
-                       }\r
-                       switch(destination->rx_endpoint->protocol){\r
-                               case MEDIA_ALSA:\r
-                               case MEDIA_OSS:\r
-                                       snd_write = g_list_append(snd_write, fd->play);\r
-                       }\r
-               }\r
-               if(syncFlag == MULTISYNC){\r
-                       flow->sync = g_list_append(flow->sync, sync);\r
-               }\r
-       }\r
-       if(syncFlag == ONESYNC){\r
-               ms_start(sync);\r
-               flow->sync = g_list_append(flow->sync, sync);\r
-       }\r
-       if(syncFlag == MULTISYNC){\r
-               selem = flow->sync;\r
-               while(selem != NULL){\r
-                       ms_start(selem->data);\r
-                       selem = g_list_next(selem);\r
-               }\r
-       }\r
-       filter = snd_read;\r
-       while(filter != NULL){\r
-               ms_sound_read_start(MS_SOUND_READ((MSFilter*)filter->data));\r
-               filter = g_list_next(filter);\r
-       }\r
-\r
-       filter = snd_write;\r
-       while(filter != NULL){\r
-               ms_sound_write_start(MS_SOUND_WRITE((MSFilter*)filter->data));\r
-               filter = g_list_next(filter);\r
-       }\r
-       return 1;\r
-}\r
-\r
-int basic_call_stop_flow(BasicCall *call, MediaFlow *flow){\r
-\r
-}\r
diff --git a/linphone/media_api/basiccall.h b/linphone/media_api/basiccall.h
deleted file mode 100644 (file)
index 2351fac..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*\r
-       The objective of the media_api is to construct and run the necessary processing \r
-       on audio and video data flows for a given call (two party call) or conference.\r
-       Copyright (C) 2001  Sharath Udupa skuds@gmx.net \r
-\r
-       This library is free software; you can redistribute it and/or\r
-       modify it under the terms of the GNU Lesser General Public\r
-       License as published by the Free Software Foundation; either\r
-       version 2.1 of the License, or (at your option) any later version.\r
-\r
-       This library is distributed in the hope that it will be useful,\r
-       but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-       Lesser General Public License for more details.\r
-\r
-       You should have received a copy of the GNU Lesser General Public\r
-       License along with this library; if not, write to the Free Software\r
-       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
-*/\r
-\r
-#include "common.h"\r
-#include "mediaflow.h"\r
-#include "callmember.h"\r
-\r
-//other includes required to be done here\r
-#define MemberA 1\r
-#define MemberB 2\r
-\r
-\r
-struct _BasicCall{\r
-       CallMember *memberA, *memberB;\r
-       GList *flows;                   //linked list of MediaFlows\r
-};\r
-\r
-typedef struct _BasicCall BasicCall;\r
-\r
-\r
-BasicCall *basic_call_new();\r
-\r
-CallMember *basic_call_get_member(BasicCall *call, int member_nu);\r
-\r
-void basic_call_add_flow(BasicCall *call, MediaFlow *flow);\r
-\r
-int basic_call_start_flow(BasicCall *call, MediaFlow *flow);\r
-\r
-int basic_call_stop_flow(BasicCall *call, MediaFlow *flow);\r
-\r
-int basic_call_start_all_flows(BasicCall *call);\r
-\r
-int basic_call_destroy(BasicCall *call);\r
-\r
diff --git a/linphone/media_api/callmember.c b/linphone/media_api/callmember.c
deleted file mode 100644 (file)
index 643ba7b..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-/*\r
-       The objective of the media_api is to construct and run the necessary processing \r
-       on audio and video data flows for a given call (two party call) or conference.\r
-       Copyright (C) 2001  Sharath Udupa skuds@gmx.net\r
-\r
-       This library is free software; you can redistribute it and/or\r
-       modify it under the terms of the GNU Lesser General Public\r
-       License as published by the Free Software Foundation; either\r
-       version 2.1 of the License, or (at your option) any later version.\r
-\r
-       This library is distributed in the hope that it will be useful,\r
-       but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-       Lesser General Public License for more details.\r
-\r
-       You should have received a copy of the GNU Lesser General Public\r
-       License along with this library; if not, write to the Free Software\r
-       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
-*/\r
-#include <string.h>\r
-#include "common.h"\r
-#include "callmember.h"\r
-#include "mediaflow.h"\r
-\r
-\r
-CallMember *call_member_new(char *name){\r
-  CallMember *member = (CallMember*) g_malloc(sizeof(CallMember));\r
-  api_trace("call_member_new: creating %s", name);\r
-  member->name = name;\r
-  member->flows = NULL;\r
-  member->profile = NULL;\r
-  return member;\r
-}\r
-\r
-int call_member_set_rtp_profile(CallMember *member, RtpProfile *profile){\r
-       member->profile = profile;\r
-       return 1;\r
-}\r
-\r
-int call_member_setup_flow(CallMember *member, MediaFlow *flow, char* rx, char *tx){\r
-  Members *mem = (Members*) g_malloc(sizeof(Members));\r
-  Flows *flows = (Flows*) g_malloc(sizeof(Flows));\r
-  api_trace("call_member_setup_flow: setting up flow for: CallMember->%s , MediaFlow->%s", member->name, flow->id);\r
-  mem->member = member;\r
-  mem->rx_endpoint = parse_end_point(rx);\r
-  mem->tx_endpoint = parse_end_point(tx);\r
-  flow->members = g_list_append(flow->members, mem);\r
-\r
-  flows->flow = flow;\r
-  flows->rx_endpoint = parse_end_point(rx);\r
-  flows->tx_endpoint = parse_end_point(tx);\r
-  member->flows = g_list_append(member->flows, flows);\r
-  return 1;\r
-}\r
-\r
-EndPoint *parse_end_point(char *endpoint){\r
-       EndPoint *result = (EndPoint*) g_malloc(sizeof(EndPoint));\r
-       int i=0,len1,len2,len, tlen;\r
-       char *str2, temp[30], *host_str;\r
-       //api_trace("parse_end_point: parsing %s\n", endpoint);\r
-       result->pt = -1;\r
-       while(1){\r
-               str2 = (char*) strpbrk(endpoint, ":");\r
-               if(str2 == NULL){ \r
-                       str2 = (char*) strpbrk(endpoint, ";");\r
-                       if(str2 == NULL){\r
-                               len = strlen(endpoint); \r
-                       }\r
-                       else{\r
-                               len1 = strlen(endpoint);\r
-                               len2 = strlen(str2);\r
-                               len = len1-len2;\r
-                       }\r
-               }\r
-               else{\r
-                       len1 = strlen(endpoint);\r
-                       len2 = strlen(str2);\r
-                       len = len1-len2;\r
-               }\r
-               strncpy(temp,endpoint,len);\r
-               temp[len] = '\0';\r
-               tlen = strlen(temp);\r
-               if((tlen >= 2)&&(temp[0] == '/')&&(temp[1] == '/')){\r
-                       host_str = remove_slash(temp);\r
-               }\r
-               switch(i){\r
-                       case 0: if(strcmp(temp,"rtp")==0){\r
-                                       result->protocol=MEDIA_RTP;\r
-                               }\r
-                               else if(strcmp(temp,"oss")==0){\r
-                                       result->protocol=MEDIA_OSS;\r
-                               }\r
-                               else if(strcmp(temp,"alsa")==0){\r
-                                       result->protocol=MEDIA_ALSA;\r
-                               }\r
-                               else if(strcmp(temp,"file")==0){\r
-                                       result->protocol=MEDIA_FILE;\r
-                               }\r
-                               break;\r
-                       case 1: if(result->protocol==MEDIA_FILE){\r
-                                       result->file=host_str;\r
-                               }\r
-                               else{\r
-                                       result->host = host_str;\r
-                               }\r
-                               break;\r
-                       case 2: result->port = to_digits(temp);\r
-                               break;\r
-                       case 3: result->pt = pt_digits(temp);\r
-                               break;\r
-                       default://result->options[result->nOptions++] = temp;\r
-                               break;\r
-               }\r
-               if(str2 != NULL) endpoint = str2+1;\r
-               else break;\r
-               i++;\r
-       }\r
-       return result;          \r
-}\r
-\r
-int to_digits(char *str){\r
-       int nu=0,a,len,i;\r
-       len = strlen(str);\r
-       for(i=0;i<len;i++){\r
-               a=str[i];\r
-               a=a-'0';\r
-               nu = nu*10+a;\r
-       }\r
-       return nu;\r
-}\r
-\r
-int pt_digits(char *str){\r
-       int len;\r
-       len = strlen(str);\r
-       if((len>3)&&(str[0]=='p')&&(str[1]=='t')&&(str[2]=='=')){\r
-               return to_digits(str+3);\r
-       }\r
-       else{\r
-               api_warn("Wrong parameters passed in the endpoints");\r
-               return 0;\r
-               //ERROR handling\r
-       }\r
-}\r
-char *remove_slash(char var[]){\r
-       char *temp = (char*) g_malloc(10*sizeof(char));\r
-       int len,i;\r
-       len=strlen(var);\r
-       for(i=2;i<len;i++){\r
-               temp[i-2]=var[i];\r
-       }\r
-       return temp;\r
-}\r
-\r
diff --git a/linphone/media_api/callmember.h b/linphone/media_api/callmember.h
deleted file mode 100644 (file)
index 1c40746..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*\r
-       The objective of the media_api is to construct and run the necessary processing \r
-       on audio and video data flows for a given call (two party call) or conference.\r
-       Copyright (C) 2001  Sharath Udupa skuds@gmx.net\r
-\r
-       This library is free software; you can redistribute it and/or\r
-       modify it under the terms of the GNU Lesser General Public\r
-       License as published by the Free Software Foundation; either\r
-       version 2.1 of the License, or (at your option) any later version.\r
-\r
-       This library is distributed in the hope that it will be useful,\r
-       but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-       Lesser General Public License for more details.\r
-\r
-       You should have received a copy of the GNU Lesser General Public\r
-       License along with this library; if not, write to the Free Software\r
-       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
-*/\r
-\r
-struct _CallMember{\r
-       char *name;\r
-       GList *flows;\r
-       RtpProfile *profile;\r
-};\r
-\r
-typedef struct _CallMember CallMember;\r
-\r
-struct _EndPoint{\r
-       int protocol;\r
-       char *host;\r
-       char *file;\r
-       int port;\r
-       int pt;\r
-};\r
-\r
-typedef struct _EndPoint EndPoint;\r
-\r
-struct _Flows{\r
-  struct _MediaFlow *flow;\r
-  EndPoint *rx_endpoint;\r
-  EndPoint *tx_endpoint;\r
-};\r
-\r
-typedef struct _Flows Flows;\r
-\r
-CallMember *call_member_new(char *);\r
-\r
-int call_member_setup_flow(CallMember *member, struct _MediaFlow *flow, char *rx_enndpoint, char *tx_endpoint);\r
-\r
-/* Internal functions */\r
-EndPoint *parse_end_point(char *endpoint);\r
-\r
-char *remove_slash(char[]);\r
-\r
-int to_digits(char*);\r
-\r
-int pt_digits(char*);\r
-\r
diff --git a/linphone/media_api/ccl b/linphone/media_api/ccl
deleted file mode 100644 (file)
index d814341..0000000
+++ /dev/null
@@ -1 +0,0 @@
-gcc -I/home/skudupa/linphone/mediastreamer -I/home/skudupa/linphone/ffmpeg/libavcodec -I/home/skudupa/linphone/gsmlib -I/home/skudupa/linphone/lpc10-1.5 -I/home/skudupa/linphone/oRTP/src -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -I/home/skudupa/linphone/oRTP mediaflow.c
diff --git a/linphone/media_api/common.h b/linphone/media_api/common.h
deleted file mode 100644 (file)
index a2294c2..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifndef COMMON_H
-#define COMMON_H
-
-
-#include "media_api.h"
-#include <glib.h>
-
-#define api_trace g_message
-#define api_error g_error
-#define api_warn g_warning
-
-#define MEDIA_FLOW_DUPLEX 1
-#define MEDIA_FLOW_HALF_DUPLEX 2
-
-//Mediaflow type
-#define MEDIA_FLOW_VIDEO 1
-#define MEDIA_FLOW_VOICE 2
-
-//Mediaflow protocols
-#define MEDIA_RTP 1
-#define MEDIA_OSS 2
-#define MEDIA_ALSA 3
-#define MEDIA_FILE 4
-
-//Mediaflow codec function
-#define MEDIA_API_DECODER 1
-#define MEDIA_API_ENCODER 2
-
-#endif
-
-
diff --git a/linphone/media_api/media_api.c b/linphone/media_api/media_api.c
deleted file mode 100644 (file)
index 28ed3c1..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*\r
-       The objective of the media_api is to construct and run the necessary processing \r
-       on audio and video data flows for a given call (two party call) or conference.\r
-       Copyright (C) 2001  Sharath Udupa skuds@gmx.net\r
-\r
-       This library is free software; you can redistribute it and/or\r
-       modify it under the terms of the GNU Lesser General Public\r
-       License as published by the Free Software Foundation; either\r
-       version 2.1 of the License, or (at your option) any later version.\r
-\r
-       This library is distributed in the hope that it will be useful,\r
-       but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-       Lesser General Public License for more details.\r
-\r
-       You should have received a copy of the GNU Lesser General Public\r
-       License along with this library; if not, write to the Free Software\r
-       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
-*/\r
-
-#include "media_api.h"
-
-/* non-standart payload types for oRTP */
-PayloadType lpc1015={
-    PAYLOAD_AUDIO_PACKETIZED,
-    8000,
-    0,
-    NULL,
-    0,
-    2400,
-    "1015/8000/1"
-};
-
-PayloadType speex_nb={
-    PAYLOAD_AUDIO_PACKETIZED,
-    8000,
-    0,
-    NULL,
-    0,
-    15000,
-    "speex/8000/1"
-};
-
-PayloadType speex_nb_lbr={
-    PAYLOAD_AUDIO_PACKETIZED,
-    8000,
-    0,
-    NULL,
-    0,
-    8000,
-    "speex-lbr/8000/1"
-};
-
-void media_api_init()
-{
-       ortp_init();
-       ortp_set_debug_file("oRTP",NULL);
-       rtp_profile_set_payload(&av_profile,115,&lpc1015);
-       rtp_profile_set_payload(&av_profile,110,&speex_nb);
-       rtp_profile_set_payload(&av_profile,111,&speex_nb_lbr);
-       rtp_profile_set_payload(&av_profile,101,&telephone_event);
-       ms_init();
-       ms_speex_codec_init();
-#ifdef HAVE_AVCODEC
-       ms_AVCodec_init();
-#endif
-}
-
-
diff --git a/linphone/media_api/media_api.h b/linphone/media_api/media_api.h
deleted file mode 100644 (file)
index b7341fc..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
-       The objective of the media_api is to construct and run the necessary processing 
-       on audio and video data flows for a given call (two party call) or conference.
-       Copyright (C) 2001  Sharath Udupa skuds@gmx.net
-
-       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 MEDIA_API_H
-#define MEDIA_API_H
-
-/* some mediastreamer include files....*/
-
-#include "ms.h"
-
-/* audio codecs ; all these header are not really required as we should use ms_codec_new..() to 
-create codec filters*/
-/*Commented by Sharath Udupa
-#include <mscodec.h>
-#include <msMUlawdec.h>
-#include <msMUlawenc.h>
-#include <msAlawdec.h>
-#include <msAlawenc.h>
-#include <msGSMdecoder.h>
-#include <msGSMencoder.h>
-#include <msLPC10decoder.h>
-#include <msLPC10encoder.h>
-
-#ifdef BUILD_FFMPEG
-#include <msavdecoder.h>
-#include <msavencoder.h>*/
-#endif
-
-/* some usefull filters of the mediastreamer */
-#include "mscopy.h"
-#include "msfdispatcher.h"
-#include "msqdispatcher.h"
-
-/* some synchronisation sources */
-#include <msnosync.h>
-#include <mstimer.h>
-
-/* some streams sources and sinks */
-#include <msossread.h>
-#include <msosswrite.h>
-#include <msread.h>
-#include <mswrite.h>
-#include <msringplayer.h>
-#include <msrtprecv.h>
-#include <msrtpsend.h>
-#include <msv4l.h>
-#include <msvideooutput.h>
-
-#endif
-
-
-
diff --git a/linphone/media_api/mediaflow.c b/linphone/media_api/mediaflow.c
deleted file mode 100644 (file)
index 8ccdadb..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-/*\r
-       The objective of the media_api is to construct and run the necessary processing \r
-       on audio and video data flows for a given call (two party call) or conference.\r
-       Copyright (C) 2001  Sharath Udupa skuds@gmx.net\r
-\r
-       This library is free software; you can redistribute it and/or\r
-       modify it under the terms of the GNU Lesser General Public\r
-       License as published by the Free Software Foundation; either\r
-       version 2.1 of the License, or (at your option) any later version.\r
-\r
-       This library is distributed in the hope that it will be useful,\r
-       but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-       Lesser General Public License for more details.\r
-\r
-       You should have received a copy of the GNU Lesser General Public\r
-       License along with this library; if not, write to the Free Software\r
-       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
-*/\r
-#include "common.h"\r
-#include "mediaflow.h"\r
-#include "callmember.h"\r
-\r
-\r
-MediaFlow *media_flow_new(char *id_string, int type){\r
-  MediaFlow *flow = (MediaFlow *) g_malloc(sizeof(MediaFlow));  //malloc required?\r
-  api_trace("media_flow_new: creating %s",id_string);\r
-  flow->id = id_string;\r
-  flow->type = type;\r
-  flow->flowDirections = NULL;\r
-  flow->members = NULL;\r
-  return flow;\r
-}\r
-\r
-int media_flow_destroy(MediaFlow *flow){\r
-       g_free(flow);\r
-       return 1;\r
-}\r
-\r
-int media_flow_setup_fd(MediaFlow *flow, CallMember* csource, CallMember *cdestination, int direction){\r
-       GList *source, *destination;\r
-       char *dir;\r
-       FlowDirections *fd = (FlowDirections *) g_malloc(sizeof(FlowDirections));\r
-       if(direction == MEDIA_FLOW_DUPLEX) dir = "DUPLEX";\r
-       else if(direction == MEDIA_FLOW_HALF_DUPLEX) dir = "HALF_DUPLEX";\r
-       api_trace("media_flow_setup_fd: setting up %s flow for %s , %s",dir, csource->name, cdestination->name);\r
-       source = g_list_find_custom(flow->members, csource, &find);\r
-       destination =g_list_find_custom(flow->members, cdestination, &find);\r
-       if(source == NULL){\r
-               api_error("media_flow_setup_fd: Invalid source %s specified", csource->name);\r
-       }\r
-       if(destination == NULL){\r
-               api_error("media_flow_setup_fd: Invalid destination %s specified", cdestination->name);\r
-               //ERROR handling to be done here\r
-       }\r
-       fd->source = (Members*)source->data;\r
-       fd->destination = (Members*)destination->data;\r
-       fd->type = direction;\r
-       flow->flowDirections = g_list_append(flow->flowDirections, fd);\r
-       return 1;\r
-}\r
-\r
-int find(gconstpointer mem, gconstpointer cmember){\r
-       if(!strcmp(((Members*)mem)->member->name, ((CallMember*)cmember)->name)){\r
-               return 0;\r
-       }\r
-       return 1;\r
-}\r
-\r
-int media_flow_start_fd(FlowDirections *fd, MSSync *sync){\r
-       Members *source, *destination;\r
-       source = fd->source;\r
-       destination = fd->destination;\r
-       if(fd->type == MEDIA_FLOW_DUPLEX){\r
-               fd->recv = set_MSFilter(source->tx_endpoint,1,fd);\r
-               fd->dec = set_CODECFilter(source->member->profile, source->tx_endpoint->pt,MEDIA_API_DECODER);\r
-               fd->play = set_MSFilter(destination->rx_endpoint,0,fd);\r
-               \r
-               ms_filter_add_link(fd->recv,fd->dec);\r
-               ms_filter_add_link(fd->dec,fd->play);\r
-               ms_sync_attach(sync, fd->recv);\r
-               \r
-               fd->read = set_MSFilter(destination->tx_endpoint,1,fd);\r
-               fd->enc = set_CODECFilter(destination->member->profile, destination->tx_endpoint->pt,MEDIA_API_ENCODER);\r
-               fd->send = set_MSFilter(source->rx_endpoint,0,fd);\r
-               \r
-               ms_filter_add_link(fd->read, fd->enc);\r
-               ms_filter_add_link(fd->enc, fd->send);\r
-               ms_sync_attach(sync, fd->read);\r
-               \r
-       }\r
-       else if(fd->type == MEDIA_FLOW_HALF_DUPLEX){\r
-       \r
-               fd->recv = set_MSFilter(source->tx_endpoint,1,fd);\r
-               fd->dec = set_CODECFilter(sourcec->member->profile, source->tx_endpoint->pt,MEDIA_API_DECODER);\r
-               fd->play = set_MSFilter(destination->rx_endpoint,0,fd);\r
-               \r
-               ms_filter_add_link(fd->recv,fd->dec);\r
-               ms_filter_add_link(fd->dec,fd->play);\r
-               ms_sync_attach(sync, fd->recv); \r
-       }\r
-       return 1;\r
-}\r
-\r
-\r
-MSFilter *set_MSFilter(EndPoint *endpoint, int type, FlowDirections *fdir){\r
-       MSFilter *filter;\r
-       RtpSession *rtps;\r
-       switch(endpoint->protocol){\r
-               case MEDIA_RTP:\r
-                       rtps = rtp_session_new(RTP_SESSION_RECVONLY);\r
-                       rtp_session_set_local_addr(rtps,"0.0.0.0",8000);\r
-                       rtp_session_set_scheduling_mode(rtps,0);\r
-                       rtp_session_set_blocking_mode(rtps,0);\r
-                       \r
-                       if(type == 1){\r
-                               filter = ms_rtp_recv_new();\r
-                               ms_rtp_recv_set_session(MS_RTP_RECV(filter), rtps);\r
-                               fdir->rtpSessions = g_list_append(fdir->rtpSessions, rtps);\r
-                               return filter;\r
-                       }\r
-                       else{\r
-                               //ms_rtp_send_new\r
-                       }\r
-               case MEDIA_OSS:\r
-                       if(type == 1){\r
-                               filter = ms_oss_read_new();\r
-                               ms_sound_read_set_device(MS_SOUND_READ(filter),0);\r
-                               return filter;\r
-                       }\r
-                       else{\r
-                               filter = ms_oss_write_new();\r
-                               ms_sound_write_set_device(MS_SOUND_WRITE(filter),0);\r
-                               return filter;\r
-                       }\r
-               case MEDIA_FILE:\r
-                       if(type == 1){\r
-                               filter = ms_read_new(endpoint->file);\r
-                               return filter;\r
-                       }\r
-                       if(type == 0){\r
-                               filter = ms_write_new(endpoint->file);\r
-                               return filter;\r
-                       }\r
-\r
-       }\r
-}\r
-\r
-MSFilter *set_CODECFilter(RtpProfile *profile, int pt, int mode){\r
-       PayloadType *payload;\r
-       \r
-       switch(mode){\r
-               case MEDIA_API_DECODER: \r
-                       payload = rtp_profile_get_payload(profile, pt);\r
-                       if(payload == NULL){\r
-                               api_error("media_api: undefined payload in URL\n");\r
-                               return NULL;\r
-                       }\r
-                       return ms_decoder_new_with_string_id(payload->mime_type);\r
-                       \r
-                       //Commented this to include the new RtpProfile\r
-                       /*if(pt != -1) return ms_decoder_new_with_pt(pt);\r
-                        *else return ms_copy_new();\r
-                        */\r
-               case MEDIA_API_ENCODER: \r
-                       \r
-                       payload = rtp_profile_get_payload(profile, pt);\r
-                       if(payload == NULL){\r
-                               api_error("media_api: undefined payload in URL\n");\r
-                               return NULL;\r
-                       }\r
-                       return ms_encoder_new_with_string_id(payload->mime_type);\r
-                       /*if(pt != -1) return ms_encoder_new_with_pt(pt);\r
-                        *else return ms_copy_new();\r
-                        */\r
-       }\r
-}\r
-       \r
-\r
diff --git a/linphone/media_api/mediaflow.h b/linphone/media_api/mediaflow.h
deleted file mode 100644 (file)
index 598df4d..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*\r
-       The objective of the media_api is to construct and run the necessary processing \r
-       on audio and video data flows for a given call (two party call) or conference.\r
-       Copyright (C) 2001  Sharath Udupa skuds@gmx.net\r
-\r
-       This library is free software; you can redistribute it and/or\r
-       modify it under the terms of the GNU Lesser General Public\r
-       License as published by the Free Software Foundation; either\r
-       version 2.1 of the License, or (at your option) any later version.\r
-\r
-       This library is distributed in the hope that it will be useful,\r
-       but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-       Lesser General Public License for more details.\r
-\r
-       You should have received a c:opy of the GNU Lesser General Public\r
-       License along with this library; if not, write to the Free Software\r
-       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
-*/\r
-\r
-struct _MediaFlow{\r
-       char *id;\r
-       int type;\r
-       GList *members;\r
-       GList *flowDirections;\r
-       GList *sync; //holds all the filters in this MediaFlow\r
-};\r
-\r
-typedef struct _MediaFlow MediaFlow;\r
-\r
-struct _Members{\r
-  struct _CallMember *member;\r
-  struct _EndPoint *rx_endpoint;\r
-  struct _EndPoint *tx_endpoint;\r
-};\r
-\r
-typedef struct _Members Members;\r
-\r
-struct _FlowDirections{\r
-       Members *source, *destination;\r
-       MSFilter *recv,\r
-                *dec,\r
-                *play;\r
-       MSFilter *read,         //Filters used \r
-                *enc,          //if type==DUPLEX\r
-                *send;\r
-       GList *rtpSessions;\r
-       int type;\r
-};\r
-\r
-typedef struct _FlowDirections FlowDirections;\r
-\r
-\r
-MediaFlow *media_flow_new(char *id_string, int type);\r
-\r
-int media_flow_setup_fd(MediaFlow*, struct _CallMember *, struct _CallMember *, int);\r
-\r
-int media_flow_start_fd(FlowDirections *fd, MSSync *sync);\r
-\r
-int media_flow_destroy(MediaFlow *flow);\r
-\r
-/* Internal functions */\r
-int find(gconstpointer, gconstpointer);\r
-\r
-MSFilter *set_MSFilter(struct _EndPoint *, int, FlowDirections *);\r
-\r
-MSFilter *set_CODECFilter(RtpProfile* , int, int);\r
-\r
diff --git a/linphone/mingw-envsetup.sh b/linphone/mingw-envsetup.sh
deleted file mode 100644 (file)
index 9f79d89..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-export PATH=$PATH:"${PROGRAMFILES}\GnuWin32\bin":"${PROGRAMFILES}\Inno Setup 5"
-export PERL=/c/Perl/bin/perl.exe
-export INTLTOOL_PERL=/c/Perl/bin/perl.exe
-
-
diff --git a/linphone/pixmaps/.gitignore b/linphone/pixmaps/.gitignore
deleted file mode 100644 (file)
index 282522d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/linphone/pixmaps/Makefile.am b/linphone/pixmaps/Makefile.am
deleted file mode 100644 (file)
index 52ae8cd..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-pixmapdir=$(datadir)/pixmaps/linphone
-
-pixmap_DATA= linphone2.png  linphone2.xpm  linphone.png \
-sip-away.png      sip-bifm.png       \
-sip-busy.png      sip-closed.png     \
-sip-online.png    sip-otl.png        \
-sip-otp.png       sip-wfa.png \
-green.png red.png \
-mic_muted.png mic_active.png
-
-EXTRA_DIST=$(pixmap_DATA)
diff --git a/linphone/pixmaps/green.png b/linphone/pixmaps/green.png
deleted file mode 100644 (file)
index 0005537..0000000
Binary files a/linphone/pixmaps/green.png and /dev/null differ
diff --git a/linphone/pixmaps/linphone.png b/linphone/pixmaps/linphone.png
deleted file mode 100644 (file)
index 06cf183..0000000
Binary files a/linphone/pixmaps/linphone.png and /dev/null differ
diff --git a/linphone/pixmaps/linphone2.png b/linphone/pixmaps/linphone2.png
deleted file mode 100644 (file)
index d1bf1ab..0000000
Binary files a/linphone/pixmaps/linphone2.png and /dev/null differ
diff --git a/linphone/pixmaps/linphone2.xpm b/linphone/pixmaps/linphone2.xpm
deleted file mode 100644 (file)
index 717f8c4..0000000
+++ /dev/null
@@ -1,883 +0,0 @@
-/* XPM */
-static char * linphone2_xpm[] = {
-"50 45 835 2",
-"      c None",
-".     c #211F1D",
-"+     c #53514E",
-"@     c #5F5D59",
-"#     c #7D7C78",
-"$     c #605F5C",
-"%     c #94928C",
-"&     c #95938D",
-"*     c #7B7A77",
-"=     c #605E5C",
-"-     c #353432",
-";     c #585754",
-">     c #84827D",
-",     c #B9B6B0",
-"'     c #D9D5CE",
-")     c #DFDBD3",
-"!     c #EAE6DE",
-"~     c #EFEBE2",
-"{     c #EEEAE1",
-"]     c #EFEBE3",
-"^     c #EEEAE2",
-"/     c #75726D",
-"(     c #5E5C58",
-"_     c #7D7B77",
-":     c #BAB6AF",
-"<     c #E5E1D8",
-"[     c #DAD7CF",
-"}     c #C8C4BD",
-"|     c #898782",
-"1     c #949089",
-"2     c #938F88",
-"3     c #5B5854",
-"4     c #45433F",
-"5     c #4D4943",
-"6     c #5F5C56",
-"7     c #A5A199",
-"8     c #DCD5C5",
-"9     c #6F6B63",
-"0     c #42413F",
-"a     c #A19E97",
-"b     c #DAD6CE",
-"c     c #EDE9E1",
-"d     c #D4D0C9",
-"e     c #96928C",
-"f     c #63605B",
-"g     c #827C73",
-"h     c #6F6961",
-"i     c #90877A",
-"j     c #8E8578",
-"k     c #B4A999",
-"l     c #B9AD9D",
-"m     c #C0B5A3",
-"n     c #BCB1A0",
-"o     c #858075",
-"p     c #C3BCAE",
-"q     c #EAE5DB",
-"r     c #E0D9C9",
-"s     c #C5BDAE",
-"t     c #20201E",
-"u     c #8D8B86",
-"v     c #CAC7C1",
-"w     c #D2CEC6",
-"x     c #918F89",
-"y     c #5D5A56",
-"z     c #A0998F",
-"A     c #827B6F",
-"B     c #C0B4A2",
-"C     c #C2B7A5",
-"D     c #C1B6A4",
-"E     c #8A8174",
-"F     c #94918B",
-"G     c #C7C3BB",
-"H     c #AFAAA1",
-"I     c #938B7E",
-"J     c #646058",
-"K     c #D8D1C3",
-"L     c #ECE7DE",
-"M     c #EBE7DD",
-"N     c #E4DED0",
-"O     c #DED6C5",
-"P     c #57544D",
-"Q     c #202020",
-"R     c #7E7C77",
-"S     c #DFDCD4",
-"T     c #F0ECE4",
-"U     c #EDE9E0",
-"V     c #ECE8E1",
-"W     c #B6B2AB",
-"X     c #77736E",
-"Y     c #767067",
-"Z     c #A3998B",
-"`     c #BCB09F",
-" .    c #C3B7A6",
-"..    c #BFB3A1",
-"+.    c #C3B8A7",
-"@.    c #BFB4A2",
-"#.    c #BDB2A1",
-"$.    c #3E3B35",
-"%.    c #BBB4A6",
-"&.    c #A7A39C",
-"*.    c #ECE9E1",
-"=.    c #77736A",
-"-.    c #E7E1D5",
-";.    c #E3DDCE",
-">.    c #8F897F",
-",.    c #22201E",
-"'.    c #91908C",
-").    c #EFECE3",
-"!.    c #EBE7DE",
-"~.    c #878581",
-"{.    c #5B574F",
-"].    c #7F786C",
-"^.    c #8D867A",
-"/.    c #9C9994",
-"(.    c #98958F",
-"_.    c #837B6E",
-":.    c #C4B9A7",
-"<.    c #958B7E",
-"[.    c #736D62",
-"}.    c #4E4942",
-"|.    c #4C4842",
-"1.    c #383632",
-"2.    c #99968F",
-"3.    c #ECE8DE",
-"4.    c #7C7972",
-"5.    c #CCC6BB",
-"6.    c #E9E4D9",
-"7.    c #EDE8DF",
-"8.    c #E1D9C9",
-"9.    c #BFB8A9",
-"0.    c #1A1A1A",
-"a.    c #C3BFB8",
-"b.    c #CFCCC4",
-"c.    c #85827C",
-"d.    c #56514A",
-"e.    c #A69C8D",
-"f.    c #BFB3A2",
-"g.    c #C2B7A6",
-"h.    c #B4AA9A",
-"i.    c #757168",
-"j.    c #706D68",
-"k.    c #918E88",
-"l.    c #464441",
-"m.    c #97948E",
-"n.    c #C9C6BF",
-"o.    c #8C8A85",
-"p.    c #8E897F",
-"q.    c #999488",
-"r.    c #817E77",
-"s.    c #C1BEB7",
-"t.    c #807D75",
-"u.    c #8A8377",
-"v.    c #6E6A63",
-"w.    c #A8A49C",
-"x.    c #EAE4D9",
-"y.    c #E4DDCF",
-"z.    c #D8D0C0",
-"A.    c #AFA99C",
-"B.    c #848076",
-"C.    c #BFBBB4",
-"D.    c #B1AEA8",
-"E.    c #47443F",
-"F.    c #5C5851",
-"G.    c #686259",
-"H.    c #B0A595",
-"I.    c #B7AC9B",
-"J.    c #817A6F",
-"K.    c #7E7A70",
-"L.    c #AEA99D",
-"M.    c #9A9791",
-"N.    c #EEE9E1",
-"O.    c #E6E2DA",
-"P.    c #CCC8BF",
-"Q.    c #E3DCCE",
-"R.    c #86827A",
-"S.    c #C6C3BC",
-"T.    c #7C7974",
-"U.    c #4A4642",
-"V.    c #6E685F",
-"W.    c #89837A",
-"X.    c #7B7873",
-"Y.    c #9A9892",
-"Z.    c #827D73",
-"`.    c #56534C",
-" +    c #6A675E",
-".+    c #E2DBCC",
-"++    c #EDE9DF",
-"@+    c #DED8CC",
-"#+    c #DDD5C4",
-"$+    c #C4BDAE",
-"%+    c #6F6B62",
-"&+    c #312F2B",
-"*+    c #6D6960",
-"=+    c #A19B8F",
-"-+    c #E5E1DA",
-";+    c #7F7D79",
-">+    c #CFCBC3",
-",+    c #ACA9A2",
-"'+    c #B6B1A8",
-")+    c #B4B0AA",
-"!+    c #827F7A",
-"~+    c #444340",
-"{+    c #262524",
-"]+    c #C1BEB8",
-"^+    c #9A968D",
-"/+    c #242322",
-"(+    c #CEC7B7",
-"_+    c #DFD8C7",
-":+    c #E6E0D3",
-"<+    c #747067",
-"[+    c #D3CCBC",
-"}+    c #857F74",
-"|+    c #595856",
-"1+    c #CCC8C2",
-"2+    c #D4D1C9",
-"3+    c #ECE8DF",
-"4+    c #CFCBC4",
-"5+    c #93918C",
-"6+    c #2F2E2C",
-"7+    c #312F2C",
-"8+    c #969185",
-"9+    c #BAB3A5",
-"0+    c #B1AB9D",
-"a+    c #363532",
-"b+    c #E2DED5",
-"c+    c #676360",
-"d+    c #4C4B4A",
-"e+    c #767471",
-"f+    c #75736D",
-"g+    c #5B5956",
-"h+    c #928D81",
-"i+    c #E5DFD2",
-"j+    c #EEE9E0",
-"k+    c #EBE6DB",
-"l+    c #C0B9AB",
-"m+    c #A7A195",
-"n+    c #8D887E",
-"o+    c #C4BCAD",
-"p+    c #BCB8B1",
-"q+    c #D5D1C9",
-"r+    c #7A746D",
-"s+    c #AEABA4",
-"t+    c #B2AFA8",
-"u+    c #98948D",
-"v+    c #7D7A76",
-"w+    c #69655D",
-"x+    c #9B9589",
-"y+    c #A9A396",
-"z+    c #A7A49F",
-"A+    c #D8D2C9",
-"B+    c #948F83",
-"C+    c #454340",
-"D+    c #D7D3CC",
-"E+    c #63615E",
-"F+    c #141414",
-"G+    c #000000",
-"H+    c #53504A",
-"I+    c #EBE7DC",
-"J+    c #E4DDD0",
-"K+    c #898479",
-"L+    c #ADA79A",
-"M+    c #CBC3B4",
-"N+    c #89847A",
-"O+    c #CDC6B6",
-"P+    c #AAA59C",
-"Q+    c #9F9D98",
-"R+    c #E6E2D9",
-"S+    c #AFACA7",
-"T+    c #615F5C",
-"U+    c #201F1D",
-"V+    c #66625B",
-"W+    c #AEA89A",
-"X+    c #AEA89B",
-"Y+    c #B7B0A2",
-"Z+    c #070707",
-"`+    c #E0DED9",
-" @    c #CFC7B8",
-".@    c #6B6863",
-"+@    c #63625E",
-"@@    c #DBD3C3",
-"#@    c #534D46",
-"$@    c #807E7B",
-"%@    c #DDD9D1",
-"&@    c #36322E",
-"*@    c #4B4A49",
-"=@    c #6E6C67",
-"-@    c #E5DED1",
-";@    c #E9E4D8",
-">@    c #EFEAE2",
-",@    c #E2DCD0",
-"'@    c #8F8A7F",
-")@    c #999387",
-"!@    c #4E4B45",
-"~@    c #6B665E",
-"{@    c #47433D",
-"]@    c #D4CDC0",
-"^@    c #E8E3DA",
-"/@    c #1F1E1E",
-"(@    c #65615A",
-"_@    c #ADA699",
-":@    c #949494",
-"<@    c #BEBEBC",
-"[@    c #DAD2C2",
-"}@    c #7F7B74",
-"|@    c #4D4D4D",
-"1@    c #959084",
-"2@    c #DAD5C9",
-"3@    c #B9B1A2",
-"4@    c #3C3934",
-"5@    c #989693",
-"6@    c #B1ADA5",
-"7@    c #76746F",
-"8@    c #4C4A44",
-"9@    c #DCD4C3",
-"0@    c #E9E3D8",
-"a@    c #DCD8CE",
-"b@    c #A6A49E",
-"c@    c #9C9890",
-"d@    c #7B776D",
-"e@    c #55534E",
-"f@    c #B5B3AD",
-"g@    c #474440",
-"h@    c #D0C9B9",
-"i@    c #E7E2D7",
-"j@    c #65635D",
-"k@    c #4F4E4C",
-"l@    c #B7B1A3",
-"m@    c #B7B3A9",
-"n@    c #96948E",
-"o@    c #BCBBBB",
-"p@    c #BCB6A9",
-"q@    c #ABA6A1",
-"r@    c #8E8C87",
-"s@    c #161514",
-"t@    c #545350",
-"u@    c #B9B1A1",
-"v@    c #958F84",
-"w@    c #8C867B",
-"x@    c #81796E",
-"y@    c #BFB4A3",
-"z@    c #C6BBAA",
-"A@    c #5E5B53",
-"B@    c #96938D",
-"C@    c #696762",
-"D@    c #DFD7C7",
-"E@    c #C6C2B9",
-"F@    c #817C72",
-"G@    c #B3AC9F",
-"H@    c #B5AFA4",
-"I@    c #6C6964",
-"J@    c #DFD8C9",
-"K@    c #9C9C9B",
-"L@    c #716E6A",
-"M@    c #B8B1A3",
-"N@    c #2A2926",
-"O@    c #625F58",
-"P@    c #E0D8C9",
-"Q@    c #C1BAAB",
-"R@    c #252321",
-"S@    c #E1DDD5",
-"T@    c #7B7977",
-"U@    c #625E57",
-"V@    c #322F2A",
-"W@    c #C4B9A8",
-"X@    c #D1C7B6",
-"Y@    c #C1B5A4",
-"Z@    c #C8BEAC",
-"`@    c #9A9387",
-" #    c #2D2C28",
-".#    c #595752",
-"+#    c #A29D94",
-"@#    c #D5CEBD",
-"##    c #CBC4B4",
-"$#    c #DBD3C2",
-"%#    c #A09C94",
-"&#    c #C1C1C1",
-"*#    c #95938E",
-"=#    c #7F7A70",
-"-#    c #8B867C",
-";#    c #D6D0C4",
-">#    c #C9C2B3",
-",#    c #7C7B78",
-"'#    c #BEBBB5",
-")#    c #D1CABA",
-"!#    c #44423F",
-"~#    c #D6D2CA",
-"{#    c #3A3835",
-"]#    c #262421",
-"^#    c #33302C",
-"/#    c #69645B",
-"(#    c #8B8478",
-"_#    c #5F5951",
-":#    c #605C53",
-"<#    c #67635B",
-"[#    c #BFB8AA",
-"}#    c #928D82",
-"|#    c #B8B2A4",
-"1#    c #938F85",
-"2#    c #989287",
-"3#    c #89857C",
-"4#    c #706E6A",
-"5#    c #DED7C6",
-"6#    c #928F88",
-"7#    c #979797",
-"8#    c #B4AEA2",
-"9#    c #918C81",
-"0#    c #68645C",
-"a#    c #979286",
-"b#    c #4A4741",
-"c#    c #5E5D5A",
-"d#    c #B2AFAA",
-"e#    c #47453F",
-"f#    c #C2BBAC",
-"g#    c #B5AEA0",
-"h#    c #D4CDBC",
-"i#    c #CAC7C0",
-"j#    c #B5AEA1",
-"k#    c #CCC4B5",
-"l#    c #ACABA7",
-"m#    c #797979",
-"n#    c #757169",
-"o#    c #BDB6A7",
-"p#    c #68655D",
-"q#    c #A09B92",
-"r#    c #D1CABB",
-"s#    c #8D887D",
-"t#    c #80807F",
-"u#    c #C5BEAF",
-"v#    c #1E1D1B",
-"w#    c #A3A099",
-"x#    c #888681",
-"y#    c #6A6864",
-"z#    c #B3AEA3",
-"A#    c #4D4A44",
-"B#    c #D6CFBE",
-"C#    c #A29E95",
-"D#    c #C1BAAC",
-"E#    c #918C82",
-"F#    c #6D6961",
-"G#    c #B9B3A5",
-"H#    c #979084",
-"I#    c #3A3836",
-"J#    c #BDBBB7",
-"K#    c #C7C0B1",
-"L#    c #6C6860",
-"M#    c #D2CBBB",
-"N#    c #393836",
-"O#    c #66635D",
-"P#    c #A19D94",
-"Q#    c #656461",
-"R#    c #32302C",
-"S#    c #CCC5B5",
-"T#    c #DEDAD1",
-"U#    c #B1ACA3",
-"V#    c #7C7C7C",
-"W#    c #B5B4B1",
-"X#    c #5A5853",
-"Y#    c #4F4C46",
-"Z#    c #A09A8E",
-"`#    c #76726A",
-" $    c #88857F",
-".$    c #4B4843",
-"+$    c #DAD2C1",
-"@$    c #B4ADA0",
-"#$    c #B7B4AF",
-"$$    c #CCC9C2",
-"%$    c #282623",
-"&$    c #888378",
-"*$    c #262522",
-"=$    c #A8A194",
-"-$    c #9A9388",
-";$    c #BEB7A8",
-">$    c #E3DCCD",
-",$    c #D1CEC6",
-"'$    c #ACA699",
-")$    c #AFA99B",
-"!$    c #B2ADA2",
-"~$    c #A09D97",
-"{$    c #C0BCB5",
-"]$    c #B0A99C",
-"^$    c #7A776F",
-"/$    c #99958E",
-"($    c #8A8681",
-"_$    c #777068",
-":$    c #B3AB9D",
-"<$    c #131211",
-"[$    c #5D5A53",
-"}$    c #090908",
-"|$    c #8C877C",
-"1$    c #C7C1B4",
-"2$    c #D3CEC5",
-"3$    c #EAE5DA",
-"4$    c #83817D",
-"5$    c #C7C0B0",
-"6$    c #484743",
-"7$    c #C3BFB7",
-"8$    c #C7C1B3",
-"9$    c #9E998F",
-"0$    c #CCC9C1",
-"a$    c #C3C0B8",
-"b$    c #817E78",
-"c$    c #7F786E",
-"d$    c #AFA494",
-"e$    c #ABA396",
-"f$    c #474645",
-"g$    c #BCB9B3",
-"h$    c #9B9893",
-"i$    c #2B2926",
-"j$    c #070706",
-"k$    c #74716D",
-"l$    c #B7B4AD",
-"m$    c #484641",
-"n$    c #504D47",
-"o$    c #DBD6CC",
-"p$    c #65615B",
-"q$    c #DCD5C6",
-"r$    c #B3ADA1",
-"s$    c #A8A296",
-"t$    c #949086",
-"u$    c #999690",
-"v$    c #AAA6A0",
-"w$    c #6D675F",
-"x$    c #A09789",
-"y$    c #C2B6A5",
-"z$    c #6C6259",
-"A$    c #66645F",
-"B$    c #2D2D2D",
-"C$    c #64615B",
-"D$    c #2F2D2A",
-"E$    c #8B8781",
-"F$    c #64625D",
-"G$    c #0A0908",
-"H$    c #393733",
-"I$    c #C2BAAB",
-"J$    c #D9D5CD",
-"K$    c #9C978C",
-"L$    c #CFC8B8",
-"M$    c #9C968A",
-"N$    c #928D83",
-"O$    c #98958E",
-"P$    c #CBC8C0",
-"Q$    c #B1ADA7",
-"R$    c #8D8A84",
-"S$    c #878177",
-"T$    c #B4AA9B",
-"U$    c #B3A898",
-"V$    c #7A7368",
-"W$    c #706E6B",
-"X$    c #292826",
-"Y$    c #A9A499",
-"Z$    c #3F3E3C",
-"`$    c #1B1A18",
-" %    c #9F9C96",
-".%    c #2D2A27",
-"+%    c #C8C1B1",
-"@%    c #E6DFD2",
-"#%    c #C0BDB7",
-"$%    c #8C8982",
-"%%    c #C7C3BC",
-"&%    c #8E8B84",
-"*%    c #958E86",
-"=%    c #837B6F",
-"-%    c #AFA595",
-";%    c #80796E",
-">%    c #31302D",
-",%    c #8F8C87",
-"'%    c #74726E",
-")%    c #5E5C57",
-"!%    c #393430",
-"~%    c #413F3B",
-"{%    c #413C37",
-"]%    c #605E5A",
-"^%    c #22201D",
-"/%    c #0C0B0A",
-"(%    c #E9E4DA",
-"_%    c #D6CFC2",
-":%    c #7E766A",
-"<%    c #C0B4A3",
-"[%    c #C1B6A5",
-"}%    c #605B52",
-"|%    c #97938B",
-"1%    c #181817",
-"2%    c #0A0A0A",
-"3%    c #8D8981",
-"4%    c #787369",
-"5%    c #D4CFC6",
-"6%    c #DCD6C9",
-"7%    c #CAC6BC",
-"8%    c #A5A096",
-"9%    c #78756E",
-"0%    c #726E65",
-"a%    c #4A4742",
-"b%    c #605E59",
-"c%    c #363433",
-"d%    c #0B0A0A",
-"e%    c #BFB5A5",
-"f%    c #C3B8A6",
-"g%    c #6C6359",
-"h%    c #7C786E",
-"i%    c #46433D",
-"j%    c #55534F",
-"k%    c #BAB5AB",
-"l%    c #E1DACA",
-"m%    c #B1AA9C",
-"n%    c #928B80",
-"o%    c #ACA598",
-"p%    c #CCC5B8",
-"q%    c #E1DACB",
-"r%    c #CFC9BE",
-"s%    c #44413C",
-"t%    c #23221F",
-"u%    c #AFA89B",
-"v%    c #D5CCBB",
-"w%    c #BEB2A1",
-"x%    c #A59A8B",
-"y%    c #5C564D",
-"z%    c #0F0F0E",
-"A%    c #65625C",
-"B%    c #B8B4AE",
-"C%    c #AAA498",
-"D%    c #55514B",
-"E%    c #332F2A",
-"F%    c #47443E",
-"G%    c #252320",
-"H%    c #3A3833",
-"I%    c #6B665C",
-"J%    c #857D71",
-"K%    c #90887B",
-"L%    c #CBC1B0",
-"M%    c #CBC1AF",
-"N%    c #DED7CA",
-"O%    c #9B968A",
-"P%    c #59554E",
-"Q%    c #B5AB9C",
-"R%    c #7B7469",
-"S%    c #57524A",
-"T%    c #040303",
-"U%    c #2F2D29",
-"V%    c #BEBBB4",
-"W%    c #D2CEC3",
-"X%    c #1D1C1A",
-"Y%    c #292827",
-"Z%    c #1C1A18",
-"`%    c #090807",
-" &    c #181613",
-".&    c #807A6E",
-"+&    c #DCD5C7",
-"@&    c #B8B2A5",
-"#&    c #191815",
-"$&    c #B8B0A2",
-"%&    c #C9C1B2",
-"&&    c #6A6259",
-"*&    c #AEA393",
-"=&    c #625D54",
-"-&    c #010100",
-";&    c #353431",
-">&    c #76736C",
-",&    c #C8C5BD",
-"'&    c #979287",
-")&    c #3A3733",
-"!&    c #413E39",
-"~&    c #8A8680",
-"{&    c #BFB8AB",
-"]&    c #3A3631",
-"^&    c #494440",
-"/&    c #3C3731",
-"(&    c #28231F",
-"_&    c #181715",
-":&    c #040404",
-"<&    c #3D3933",
-"[&    c #B9B1A3",
-"}&    c #85827B",
-"|&    c #080807",
-"1&    c #645F57",
-"2&    c #8F897E",
-"3&    c #71675D",
-"4&    c #B5AB9A",
-"5&    c #766E63",
-"6&    c #38342F",
-"7&    c #0D0C0B",
-"8&    c #0D0B0A",
-"9&    c #33312D",
-"0&    c #D5CFC4",
-"a&    c #DBD4C5",
-"b&    c #534E48",
-"c&    c #030303",
-"d&    c #5E5D5E",
-"e&    c #535153",
-"f&    c #666460",
-"g&    c #3D3B39",
-"h&    c #79756B",
-"i&    c #43413B",
-"j&    c #B9B4A9",
-"k&    c #D5D0C6",
-"l&    c #CEC8BC",
-"m&    c #BDB6A9",
-"n&    c #97948F",
-"o&    c #D5CEC0",
-"p&    c #B2AC9E",
-"q&    c #ADA293",
-"r&    c #797166",
-"s&    c #151412",
-"t&    c #76736D",
-"u&    c #DBD4C8",
-"v&    c #D9D2C1",
-"w&    c #2E2B28",
-"x&    c #171615",
-"y&    c #454243",
-"z&    c #2C2B2A",
-"A&    c #68655E",
-"B&    c #807C75",
-"C&    c #BAB5AA",
-"D&    c #D0CABD",
-"E&    c #D9D1C0",
-"F&    c #E1DACD",
-"G&    c #DCD3C3",
-"H&    c #D0C7B7",
-"I&    c #D6CEBE",
-"J&    c #A8A299",
-"K&    c #54524D",
-"L&    c #0B0A09",
-"M&    c #5E5A53",
-"N&    c #9C9486",
-"O&    c #948C7E",
-"P&    c #544F47",
-"Q&    c #0D0C0A",
-"R&    c #DDD7CC",
-"S&    c #E4DFD3",
-"T&    c #AFAA9F",
-"U&    c #847F76",
-"V&    c #BFB7AB",
-"W&    c #E5DFD1",
-"X&    c #E8E3D7",
-"Y&    c #C6BBA9",
-"Z&    c #C8BDAC",
-"`&    c #B8AE9F",
-" *    c #756F65",
-".*    c #46413B",
-"+*    c #6A665D",
-"@*    c #B0AA9C",
-"#*    c #D7CFBF",
-"$*    c #E0D8C8",
-"%*    c #B8B2A7",
-"&*    c #5B5851",
-"**    c #272623",
-"=*    c #191513",
-"-*    c #413F3A",
-";*    c #4B4842",
-">*    c #87837B",
-",*    c #B7B2A9",
-"'*    c #A6A199",
-")*    c #E7E1D4",
-"!*    c #D7CEBD",
-"~*    c #D9D1C2",
-"{*    c #CDC4B3",
-"]*    c #B1A89A",
-"^*    c #837D73",
-"/*    c #534F48",
-"(*    c #373531",
-"_*    c #22211F",
-":*    c #C7BFB0",
-"<*    c #3F3D38",
-"[*    c #A8A295",
-"}*    c #BAB5A9",
-"|*    c #3B3935",
-"1*    c #706C63",
-"2*    c #91887C",
-"3*    c #C1B7A7",
-"4*    c #B7AD9D",
-"5*    c #69645C",
-"6*    c #74716B",
-"7*    c #A19D95",
-"8*    c #918B82",
-"9*    c #484640",
-"0*    c #636058",
-"a*    c #68635B",
-"b*    c #38332F",
-"c*    c #0E0C0B",
-"d*    c #837E73",
-"e*    c #34322E",
-"f*    c #050505",
-"g*    c #060606",
-"h*    c #060505",
-"i*    c #12100E",
-"j*    c #78746C",
-"k*    c #C5C0B5",
-"l*    c #AFABA1",
-"m*    c #44433F",
-"n*    c #100E0C",
-"o*    c #21201D",
-"p*    c #6C6963",
-"q*    c #D0CBBF",
-"r*    c #53504B",
-"s*    c #4E4B44",
-"t*    c #CCC5B6",
-"u*    c #72716C",
-"v*    c #6E6C66",
-"w*    c #43403B",
-"x*    c #B0AA9F",
-"y*    c #85817A",
-"z*    c #D5CFC3",
-"A*    c #8C887E",
-"B*    c #2D2C2A",
-"C*    c #2A2723",
-"D*    c #65635E",
-"E*    c #BCB7AC",
-"F*    c #66625A",
-"G*    c #7F796F",
-"H*    c #96928A",
-"I*    c #CCC7BE",
-"J*    c #B5B1A9",
-"K*    c #938F86",
-"L*    c #CCC8BE",
-"M*    c #1E1C1A",
-"N*    c #817D73",
-"O*    c #191715",
-"P*    c #726D64",
-"Q*    c #747069",
-"R*    c #E8E2D6",
-"S*    c #99958B",
-"T*    c #E5E0D3",
-"U*    c #7F7C73",
-"V*    c #666159",
-"W*    c #1A1917",
-"X*    c #131110",
-"Y*    c #726E66",
-"Z*    c #45433E",
-"`*    c #D9D1C1",
-" =    c #1E1B19",
-".=    c #CDC5B5",
-"+=    c #A7A194",
-"@=    c #242220",
-"#=    c #42403B",
-"$=    c #060605",
-"%=    c #484540",
-"                                                                                                    ",
-"                                                        . + @ # $ % & % * =                         ",
-"                                              - ; > , ' ) ! ~ { ] { ] { ~ ^ /                       ",
-"                                        ( _ : < ~ ^ ~ ^ [ } | 1 2 3 4 5 6 7 8 9                     ",
-"                                  0 a b ^ ^ ~ c d e f g h i j k l m n o p q r s                     ",
-"                            t u v { ] { w x y z A B C m D E F G H I J K L M N O P                   ",
-"                        Q R S T U V W X Y Z `  ...+.@.C #.$.%.&.*.=.O -.{ ;.O O >.                  ",
-"                    ,.'.^ { ).!.~.{.].#.^./.(._.:.<.[.}.|.1.O 2.3.4.5.6.] 7.-.8.9.                  ",
-"                  0.a.{ ^ b.c.d.e.f.g.h.i.j.c k.l.m.n.o.p.q.O r.s.t.u.v.w.x.y.O z.                  ",
-"                  A.B.C.D.9 E.F.G.H.I.J.K.L.] M.).N.] { O.P.Q.R.S.T.U.V.W.X.Y.R.Z.`.                ",
-"                 +O .+++@+O O #+$+%+&+*+=+p.-+;+{ ] ^ ~ ^ ^ ^ U >+,+'+)+!+~+{+]+^+                  ",
-"                /+(+_+U N.:+O O O O <+[+O }+|+1+^ ~ [ 2+^ ^ 3+4+5+@ 6+7+8+9+0+a+b+c+                ",
-"          d+e+f+g+h+i+j+k+j+:+O O l+m+n+O o+p+q+M.r+s+t+u+v+y w+x+y+8+z+A+O O B+C+D+E+              ",
-"        d+u F+G+H+#+;.I+^ ] J+O K+L+M+N+O O+P+Q+R+S+T+U+V+W+X+Y+Z+`+ @.@+@O O @@#@$@%@&@            ",
-"      *@=@G+    B+-@;@] >@{ ,@'@)@O M+!@~@{@]@^@/@(@_@O y.:@<@[@}@|@[@Y+1@2@O O 3@4@5@6@            ",
-"      7@        8@9@0@a@b@c@d@O O O e@f@g@h@O i@j@O O O h@_ k@l@O m@n@Q.H o@p@O O O &+q@r@          ",
-"    s@t@        G+u@v@w@x@y@z@O O A@B@C@(+O O D@E@F@O O O G@H@I@r J@K@L@M@N@O@P@O O Q@R@S@T@        ",
-"    U@<+          V@W@X@Y@Z@:.`@ #.#+#@#O O O O Q.1 ##O O $#%#&#*#$+=#-#;#>#,#'#)#O O K+!#~#{#      ",
-"      w+i.]#        ^#/#(#_#:#<#[#}#|#O O O O O O q 1#O O O $#2#3#4#5#6#7#8#9#0#a#O O O b#c#d#      ",
-"        e#f#          e#>#g#h#O O O O O O O O O O y.i#j#O O O k#l#m#n#o#p#q#r#s#t#5.O O u#v#w#x#    ",
-"        y#z#          A#B#O O O O O O O O O O O O O y.C#O+O O O D#E#F#G#H#I#J#K#T+L#M#O O Y+N#4+O#  ",
-"      P#Q#              R#S#O O O O O O O O O O O O O T#/ #+O O O U#V#W#9+X#Y#Z#`# $.$+$#+@$.@#$$$  ",
-"      %$&$                *$=$O O -$8+;$O O O O O O O >$,$'$O O O O 8@i.)$!$~${$L i+]$^$/$: ($_$:$G+",
-"      <$[$U@                }$|$1$s+2$=.O O O O O O O O 3$4$Q@O O O 5$6$7${ 3$8$9$u+0$a$b$c$d$@.e$G+",
-"    f$g$h$i$                j$k$l$m$n$9#O O O O O O O O 5#o$p$)#O O O q$r$s$t$u$b+v$w$x$n Y@Y@y$z$A$",
-"    B$C$D$                  E$F$G$H$I$9#O O O O O O O O O N J$K$L$M$N$O$P$Q$R$S$T$U$m D Y@D D Y@V$W$",
-"      X$Y$Z$              `$ %    .%+%w+O O O O O O O O O O @%#%$%%%0$&%*%=%-%D Y@D Y@D Y@D D Y@;%4#",
-"    >%,%'%)%      !%~%{%  R@]%      ^%/%S$[@O O O O O O O O D@(%_%&$:%d$Y@D D m y$<%C m D Y@Y@[%}%F$",
-"    |%1%  2%`$3%4%5%;@N 6%7%8%9%0%a%b%c%d%H+K#O O O O O O O O e% .f. .<%y$D m C @.f%@.C m D D U$g%  ",
-"    [$h%i%j%k%l%O m%k#n%o%p%-@++q%0@:+r%h%s%t%u%O O O O O O O v%..:.f.g.m D y$B f%w%+.@.C x%y%z%    ",
-"      A%B%C%l%$+D%E%F%G%H%H%I%J%K%L%M%N%;.y.O%<$P%5$O O O O +$Q%+.w%f%B y$D m g.f.:...R%S%T%G+      ",
-"    U%V%W%z.s#X%Y%Z%G+G+G+G+G+G+j$`% &.&+&3$N @&#&v#$&O O O %&&&@.f%@.C m D y$<%*&=&}$-&            ",
-"  ;&>&,&'&)&!&Q ~&{&]&G+      ^&/&(&_&:&<&[&:+D@}&G+|&1&z.O 2&3&C <%y$m D 4&5&6&7&8&                ",
-"  9&0&a&b&c&d&e&f&g&h&Z%i&a+j&k&l&>+m&n&>%P%L%O o&G+  G+^#p&h%{.Y@D q&r&6&s&G+                      ",
-"  t&u&v&w&x&y&z&A&B&C&D&E&8 F&G&H&I&y.-.3$J&b#O K&G+      L&M&N&O&P&Q&G+                            ",
-"n$R&S&T&U&u#V&]@W&X&;.+$Y&Z&`& *.*+*@*#*$*%*&*=#**G+        =*G+G+                                  ",
-"-*;*>*,*'*)*!*-@~*{*]*^*/*(*_*H%M$:*<*U@[*#+}***G+                                                  ",
-"  |*1*=$2*3*4*5*.$G+6*7*8*8&v#9*0*a*H+b*c*M@+$d*e*                                                  ",
-"      f*g*h*i*    U+-#E#N j*G+G+            k*l*m*n*                                                ",
-"                    o*u%p*q*r*G+          s*t*u*v*G+                                                ",
-"                      w*x*y*z*A*B*C*      D*E*[*}$G+                                                ",
-"                        L#F*G*H*I*J*p@K*L*M#M*N*O*                                                  ",
-"                          b#P*(+Q*R*S*T*U*l+1.V*W*                                                  ",
-"                            X*Y*Z*`* =.=X%+=@=G+                                                    ",
-"                                  #=$=%=G+                                                          "};
diff --git a/linphone/pixmaps/mic_active.png b/linphone/pixmaps/mic_active.png
deleted file mode 100644 (file)
index 6625269..0000000
Binary files a/linphone/pixmaps/mic_active.png and /dev/null differ
diff --git a/linphone/pixmaps/mic_muted.png b/linphone/pixmaps/mic_muted.png
deleted file mode 100644 (file)
index f813691..0000000
Binary files a/linphone/pixmaps/mic_muted.png and /dev/null differ
diff --git a/linphone/pixmaps/red.png b/linphone/pixmaps/red.png
deleted file mode 100644 (file)
index e6136b3..0000000
Binary files a/linphone/pixmaps/red.png and /dev/null differ
diff --git a/linphone/pixmaps/sip-away.png b/linphone/pixmaps/sip-away.png
deleted file mode 100644 (file)
index ba7580f..0000000
Binary files a/linphone/pixmaps/sip-away.png and /dev/null differ
diff --git a/linphone/pixmaps/sip-bifm.png b/linphone/pixmaps/sip-bifm.png
deleted file mode 100644 (file)
index 898a18a..0000000
Binary files a/linphone/pixmaps/sip-bifm.png and /dev/null differ
diff --git a/linphone/pixmaps/sip-busy.png b/linphone/pixmaps/sip-busy.png
deleted file mode 100644 (file)
index 550e10a..0000000
Binary files a/linphone/pixmaps/sip-busy.png and /dev/null differ
diff --git a/linphone/pixmaps/sip-closed.png b/linphone/pixmaps/sip-closed.png
deleted file mode 100644 (file)
index 6bbe083..0000000
Binary files a/linphone/pixmaps/sip-closed.png and /dev/null differ
diff --git a/linphone/pixmaps/sip-online.png b/linphone/pixmaps/sip-online.png
deleted file mode 100644 (file)
index a6656ec..0000000
Binary files a/linphone/pixmaps/sip-online.png and /dev/null differ
diff --git a/linphone/pixmaps/sip-otl.png b/linphone/pixmaps/sip-otl.png
deleted file mode 100644 (file)
index cc9023b..0000000
Binary files a/linphone/pixmaps/sip-otl.png and /dev/null differ
diff --git a/linphone/pixmaps/sip-otp.png b/linphone/pixmaps/sip-otp.png
deleted file mode 100644 (file)
index 0df6f91..0000000
Binary files a/linphone/pixmaps/sip-otp.png and /dev/null differ
diff --git a/linphone/pixmaps/sip-wfa.png b/linphone/pixmaps/sip-wfa.png
deleted file mode 100644 (file)
index d6fe73b..0000000
Binary files a/linphone/pixmaps/sip-wfa.png and /dev/null differ
diff --git a/linphone/po/.gitignore b/linphone/po/.gitignore
deleted file mode 100644 (file)
index 5af5323..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-.intltool-merge-cache
-Makefile
-Makefile.in
-Makefile.in.in
-POTFILES
-*.gmo
-stamp-*
diff --git a/linphone/po/ChangeLog b/linphone/po/ChangeLog
deleted file mode 100644 (file)
index 63269d9..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-2007-01-17  gettextize  <bug-gnu-gettext@gnu.org>
-
-       * Makefile.in.in: Upgrade to gettext-0.16.1.
-       * cat-id-tbl.c: Remove file.
-
-2006-07-20  gettextize  <bug-gnu-gettext@gnu.org>
-
-       * Makefile.in.in: Upgrade to gettext-0.14.6.
-       * boldquot.sed: New file, from gettext-0.14.6.
-       * en@boldquot.header: New file, from gettext-0.14.6.
-       * en@quot.header: New file, from gettext-0.14.6.
-       * insert-header.sin: New file, from gettext-0.14.6.
-       * quot.sed: New file, from gettext-0.14.6.
-       * remove-potcdate.sin: New file, from gettext-0.14.6.
-       * Rules-quot: New file, from gettext-0.14.6.
-       * cat-id-tbl.c: Remove file.
-
-2002-10-15  gettextize  <bug-gnu-gettext@gnu.org>
-
-       * cat-id-tbl.c: Remove file.
-       * stamp-cat-id: Remove file.
-
-2002-10-08  gettextize  <bug-gnu-gettext@gnu.org>
-
-       * cat-id-tbl.c: Remove file.
-       * stamp-cat-id: Remove file.
-
-2002-10-08  gettextize  <bug-gnu-gettext@gnu.org>
-
-       * boldquot.sed: New file, from gettext-0.11.5.
-       * en@boldquot.header: New file, from gettext-0.11.5.
-       * en@quot.header: New file, from gettext-0.11.5.
-       * insert-header.sin: New file, from gettext-0.11.5.
-       * quot.sed: New file, from gettext-0.11.5.
-       * remove-potcdate.sin: New file, from gettext-0.11.5.
-       * Rules-quot: New file, from gettext-0.11.5.
-       * cat-id-tbl.c: Remove file.
-       * stamp-cat-id: Remove file.
-
-2002-10-04  gettextize  <bug-gnu-gettext@gnu.org>
-
-       * cat-id-tbl.c: Remove file.
-       * stamp-cat-id: Remove file.
-
-2002-10-04  gettextize  <bug-gnu-gettext@gnu.org>
-
-       * Makefile.in.in: Upgrade to gettext-0.11.5.
-
-2002-10-04  gettextize  <bug-gnu-gettext@gnu.org>
-
-       * Makefile.in.in: New file, from gettext-0.11.5.
-
-2002-10-01  gettextize  <bug-gnu-gettext@gnu.org>
-
-       * Makefile.in.in: Upgrade to gettext-0.11.5.
-       * boldquot.sed: New file, from gettext-0.11.5.
-       * en@boldquot.header: New file, from gettext-0.11.5.
-       * en@quot.header: New file, from gettext-0.11.5.
-       * insert-header.sin: New file, from gettext-0.11.5.
-       * quot.sed: New file, from gettext-0.11.5.
-       * remove-potcdate.sin: New file, from gettext-0.11.5.
-       * Rules-quot: New file, from gettext-0.11.5.
-       * cat-id-tbl.c: Remove file.
-       * stamp-cat-id: Remove file.
-
-2002-08-04  gettextize  <bug-gnu-utils@gnu.org>
-
-       * Makefile.in.in: Upgrade to gettext-0.10.40.
-
-2002-08-04  gettextize  <bug-gnu-utils@gnu.org>
-
-       * Makefile.in.in: Upgrade to gettext-0.10.40.
-       * cat-id-tbl.c: Remove file.
-       * stamp-cat-id: Remove file.
-
-2002-07-16  gettextize  <bug-gnu-utils@gnu.org>
-
-       * Makefile.in.in: Upgrade to gettext-0.10.40.
-       * cat-id-tbl.c: Remove file.
-       * stamp-cat-id: Remove file.
-
-2002-02-16  gettextize  <bug-gnu-utils@gnu.org>
-
-       * Makefile.in.in: Upgrade to gettext-0.10.40.
-       * cat-id-tbl.c: Remove file.
-       * stamp-cat-id: Remove file.
-
-2002-02-10  gettextize  <bug-gnu-utils@gnu.org>
-
-       * Makefile.in.in: Upgrade to gettext-0.10.40.
-
-2002-02-10  gettextize  <bug-gnu-utils@gnu.org>
-
-       * Makefile.in.in: Upgrade to gettext-0.10.40.
-       * cat-id-tbl.c: Remove file.
-       * stamp-cat-id: Remove file.
-
diff --git a/linphone/po/Makefile.in.in b/linphone/po/Makefile.in.in
deleted file mode 100644 (file)
index c7e8302..0000000
+++ /dev/null
@@ -1,217 +0,0 @@
-# Makefile for program source directory in GNU NLS utilities package.
-# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
-# Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns@gmail.com>
-#
-# This file may be copied and used freely without restrictions.  It may
-# be used in projects which are not available under a GNU Public License,
-# but which still want to provide support for the GNU gettext functionality.
-#
-# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
-#   instead of PACKAGE and to look for po2tbl in ./ not in intl/
-#
-# - Modified by jacob berkman <jacob@ximian.com> to install
-#   Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
-#
-# - Modified by Rodney Dawes <dobey.pwns@gmail.com> for use with intltool
-#
-# We have the following line for use by intltoolize:
-# INTLTOOL_MAKEFILE
-
-GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-PACKAGE = @PACKAGE@
-VERSION = @VERSION@
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = @top_builddir@
-VPATH = @srcdir@
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-datadir = @datadir@
-datarootdir = @datarootdir@
-libdir = @libdir@
-DATADIRNAME = @DATADIRNAME@
-itlocaledir = $(prefix)/$(DATADIRNAME)/locale
-subdir = po
-install_sh = @install_sh@
-# Automake >= 1.8 provides @mkdir_p@.
-# Until it can be supposed, use the safe fallback:
-mkdir_p = $(install_sh) -d
-
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-
-GMSGFMT = @GMSGFMT@
-MSGFMT = @MSGFMT@
-XGETTEXT = @XGETTEXT@
-INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
-INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
-GENPOT   = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
-
-ALL_LINGUAS = @ALL_LINGUAS@
-
-PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
-
-USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep '^$$lang$$' $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep '^$$lang$$'`"; then printf "$$lang "; fi; done; fi)
-
-USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
-
-POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
-
-DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
-EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS
-
-POTFILES = \
-# This comment gets stripped out
-
-CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
-
-.SUFFIXES:
-.SUFFIXES: .po .pox .gmo .mo .msg .cat
-
-.po.pox:
-       $(MAKE) $(GETTEXT_PACKAGE).pot
-       $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
-
-.po.mo:
-       $(MSGFMT) -o $@ $<
-
-.po.gmo:
-       file=`echo $* | sed 's,.*/,,'`.gmo \
-         && rm -f $$file && $(GMSGFMT) -o $$file $<
-
-.po.cat:
-       sed -f ../intl/po2msg.sed < $< > $*.msg \
-         && rm -f $@ && gencat $@ $*.msg
-
-
-all: all-@USE_NLS@
-
-all-yes: $(CATALOGS)
-all-no:
-
-$(GETTEXT_PACKAGE).pot: $(POTFILES)
-       $(GENPOT)
-
-install: install-data
-install-data: install-data-@USE_NLS@
-install-data-no: all
-install-data-yes: all
-       linguas="$(USE_LINGUAS)"; \
-       for lang in $$linguas; do \
-         dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
-         $(mkdir_p) $$dir; \
-         if test -r $$lang.gmo; then \
-           $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
-           echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
-         else \
-           $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
-           echo "installing $(srcdir)/$$lang.gmo as" \
-                "$$dir/$(GETTEXT_PACKAGE).mo"; \
-         fi; \
-         if test -r $$lang.gmo.m; then \
-           $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
-           echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
-         else \
-           if test -r $(srcdir)/$$lang.gmo.m ; then \
-             $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
-               $$dir/$(GETTEXT_PACKAGE).mo.m; \
-             echo "installing $(srcdir)/$$lang.gmo.m as" \
-                  "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
-           else \
-             true; \
-           fi; \
-         fi; \
-       done
-
-# Empty stubs to satisfy archaic automake needs
-dvi info tags TAGS ID:
-
-# Define this as empty until I found a useful application.
-install-exec installcheck:
-
-uninstall:
-       linguas="$(USE_LINGUAS)"; \
-       for lang in $$linguas; do \
-         rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
-         rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
-       done
-
-check: all $(GETTEXT_PACKAGE).pot
-       rm -f missing notexist
-       srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
-       if [ -r missing -o -r notexist ]; then \
-         exit 1; \
-       fi
-
-mostlyclean:
-       rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
-       rm -f .intltool-merge-cache
-
-clean: mostlyclean
-
-distclean: clean
-       rm -f Makefile Makefile.in POTFILES stamp-it
-       rm -f *.mo *.msg *.cat *.cat.m *.gmo
-
-maintainer-clean: distclean
-       @echo "This command is intended for maintainers to use;"
-       @echo "it deletes files that may require special tools to rebuild."
-       rm -f Makefile.in.in
-
-distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
-dist distdir: $(DISTFILES)
-       dists="$(DISTFILES)"; \
-       extra_dists="$(EXTRA_DISTFILES)"; \
-       for file in $$extra_dists; do \
-         test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
-       done; \
-       for file in $$dists; do \
-         test -f $$file || file="$(srcdir)/$$file"; \
-         ln $$file $(distdir) 2> /dev/null \
-           || cp -p $$file $(distdir); \
-       done
-
-update-po: Makefile
-       $(MAKE) $(GETTEXT_PACKAGE).pot
-       tmpdir=`pwd`; \
-       linguas="$(USE_LINGUAS)"; \
-       for lang in $$linguas; do \
-         echo "$$lang:"; \
-         result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
-         if $$result; then \
-           if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
-             rm -f $$tmpdir/$$lang.new.po; \
-            else \
-             if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
-               :; \
-             else \
-               echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
-               rm -f $$tmpdir/$$lang.new.po; \
-               exit 1; \
-             fi; \
-           fi; \
-         else \
-           echo "msgmerge for $$lang.gmo failed!"; \
-           rm -f $$tmpdir/$$lang.new.po; \
-         fi; \
-       done
-
-Makefile POTFILES: stamp-it
-       @if test ! -f $@; then \
-         rm -f stamp-it; \
-         $(MAKE) stamp-it; \
-       fi
-
-stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
-       cd $(top_builddir) \
-         && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
-              $(SHELL) ./config.status
-
-# Tell versions [3.59,3.63) of GNU make not to export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/linphone/po/Makevars b/linphone/po/Makevars
deleted file mode 100644 (file)
index 32692ab..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-# Makefile variables for PO directory in any package using GNU gettext.
-
-# Usually the message domain is the same as the package name.
-DOMAIN = $(PACKAGE)
-
-# These two variables depend on the location of this directory.
-subdir = po
-top_builddir = ..
-
-# These options get passed to xgettext.
-XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
-
-# This is the copyright holder that gets inserted into the header of the
-# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
-# package.  (Note that the msgstr strings, extracted from the package's
-# sources, belong to the copyright holder of the package.)  Translators are
-# expected to transfer the copyright for their translations to this person
-# or entity, or to disclaim their copyright.  The empty string stands for
-# the public domain; in this case the translators are expected to disclaim
-# their copyright.
-COPYRIGHT_HOLDER = Free Software Foundation, Inc.
-
-# This is the email address or URL to which the translators shall report
-# bugs in the untranslated strings:
-# - Strings which are not entire sentences, see the maintainer guidelines
-#   in the GNU gettext documentation, section 'Preparing Strings'.
-# - Strings which use unclear terms or require additional context to be
-#   understood.
-# - Strings which make invalid assumptions about notation of date, time or
-#   money.
-# - Pluralisation problems.
-# - Incorrect English spelling.
-# - Incorrect formatting.
-# It can be your email address, or a mailing list address where translators
-# can write to without being subscribed, or the URL of a web page through
-# which the translators can contact you.
-MSGID_BUGS_ADDRESS =
-
-# This is the list of locale categories, beyond LC_MESSAGES, for which the
-# message catalogs shall be used.  It is usually empty.
-EXTRA_LOCALE_CATEGORIES =
diff --git a/linphone/po/Makevars.template b/linphone/po/Makevars.template
deleted file mode 100644 (file)
index 32692ab..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-# Makefile variables for PO directory in any package using GNU gettext.
-
-# Usually the message domain is the same as the package name.
-DOMAIN = $(PACKAGE)
-
-# These two variables depend on the location of this directory.
-subdir = po
-top_builddir = ..
-
-# These options get passed to xgettext.
-XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
-
-# This is the copyright holder that gets inserted into the header of the
-# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
-# package.  (Note that the msgstr strings, extracted from the package's
-# sources, belong to the copyright holder of the package.)  Translators are
-# expected to transfer the copyright for their translations to this person
-# or entity, or to disclaim their copyright.  The empty string stands for
-# the public domain; in this case the translators are expected to disclaim
-# their copyright.
-COPYRIGHT_HOLDER = Free Software Foundation, Inc.
-
-# This is the email address or URL to which the translators shall report
-# bugs in the untranslated strings:
-# - Strings which are not entire sentences, see the maintainer guidelines
-#   in the GNU gettext documentation, section 'Preparing Strings'.
-# - Strings which use unclear terms or require additional context to be
-#   understood.
-# - Strings which make invalid assumptions about notation of date, time or
-#   money.
-# - Pluralisation problems.
-# - Incorrect English spelling.
-# - Incorrect formatting.
-# It can be your email address, or a mailing list address where translators
-# can write to without being subscribed, or the URL of a web page through
-# which the translators can contact you.
-MSGID_BUGS_ADDRESS =
-
-# This is the list of locale categories, beyond LC_MESSAGES, for which the
-# message catalogs shall be used.  It is usually empty.
-EXTRA_LOCALE_CATEGORIES =
diff --git a/linphone/po/POTFILES.in b/linphone/po/POTFILES.in
deleted file mode 100644 (file)
index 09fc22e..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-# List of source files containing translatable strings.
-gtk-glade/calllogs.c
-gtk-glade/logging.c
-gtk-glade/support.c
-gtk-glade/chat.c
-gtk-glade/main.c
-gtk-glade/friendlist.c
-gtk-glade/propertybox.c
-gtk-glade/update.c
-gtk-glade/buddylookup.c
-gtk-glade/setupwizard.c
-gtk-glade/incall_view.c
-gtk-glade/loginframe.c
-gtk-glade/main.glade
-gtk-glade/about.glade
-gtk-glade/contact.glade
-gtk-glade/log.glade
-gtk-glade/password.glade
-gtk-glade/call_logs.glade
-gtk-glade/main.glade
-gtk-glade/sip_account.glade
-gtk-glade/chatroom.glade
-gtk-glade/incoming_call.glade
-gtk-glade/parameters.glade
-gtk-glade/buddylookup.glade
-gtk-glade/waiting.glade
-coreapi/linphonecore.c
-coreapi/misc.c
-coreapi/exevents.c
-coreapi/presence.c
-coreapi/friend.c
-coreapi/proxy.c
-mediastreamer2/src/alaw.c
-mediastreamer2/src/alsa.c
-mediastreamer2/src/aqsnd.c
-mediastreamer2/src/dtmfgen.c
-mediastreamer2/src/gsm.c
-mediastreamer2/src/macsnd.c
-mediastreamer2/src/msconf.c
-mediastreamer2/src/msfileplayer.c
-mediastreamer2/src/msfilerec.c
-mediastreamer2/src/msfilerec_win.c
-mediastreamer2/src/msjoin.c
-mediastreamer2/src/msresample.c
-mediastreamer2/src/msrtp.c
-mediastreamer2/src/msspeex.c
-mediastreamer2/src/msvolume.c
-mediastreamer2/src/msv4l.c
-mediastreamer2/src/msv4l2.c
-mediastreamer2/src/msv4m.m
-mediastreamer2/src/nowebcam.c
-mediastreamer2/src/oss.c
-mediastreamer2/src/pixconv.c
-mediastreamer2/src/sizeconv.c
-mediastreamer2/src/speexec.c
-mediastreamer2/src/tee.c
-mediastreamer2/src/theora.c
-mediastreamer2/src/ulaw.c
-mediastreamer2/src/videodec.c
-mediastreamer2/src/videoenc.c
-mediastreamer2/src/videoout.c
-mediastreamer2/src/wincevideods.c
-mediastreamer2/src/winvideo.c
-mediastreamer2/src/winvideods.c
-mediastreamer2/src/winvideo2.c
-mediastreamer2/src/ice.c
-mediastreamer2/src/void.c
-mediastreamer2/src/equalizer.c
-mediastreamer2/src/msdscap-mingw.cc
-
-
diff --git a/linphone/po/POTFILES.skip b/linphone/po/POTFILES.skip
deleted file mode 100755 (executable)
index 8b13789..0000000
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/linphone/po/Rules-quot b/linphone/po/Rules-quot
deleted file mode 100644 (file)
index 9c2a995..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-# Special Makefile rules for English message catalogs with quotation marks.
-
-DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
-
-.SUFFIXES: .insert-header .po-update-en
-
-en@quot.po-create:
-       $(MAKE) en@quot.po-update
-en@boldquot.po-create:
-       $(MAKE) en@boldquot.po-update
-
-en@quot.po-update: en@quot.po-update-en
-en@boldquot.po-update: en@boldquot.po-update-en
-
-.insert-header.po-update-en:
-       @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
-       if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
-       tmpdir=`pwd`; \
-       echo "$$lang:"; \
-       ll=`echo $$lang | sed -e 's/@.*//'`; \
-       LC_ALL=C; export LC_ALL; \
-       cd $(srcdir); \
-       if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
-         if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
-           rm -f $$tmpdir/$$lang.new.po; \
-         else \
-           if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
-             :; \
-           else \
-             echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
-             exit 1; \
-           fi; \
-         fi; \
-       else \
-         echo "creation of $$lang.po failed!" 1>&2; \
-         rm -f $$tmpdir/$$lang.new.po; \
-       fi
-
-en@quot.insert-header: insert-header.sin
-       sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
-
-en@boldquot.insert-header: insert-header.sin
-       sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
-
-mostlyclean: mostlyclean-quot
-mostlyclean-quot:
-       rm -f *.insert-header
diff --git a/linphone/po/boldquot.sed b/linphone/po/boldquot.sed
deleted file mode 100644 (file)
index 4b937aa..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-s/"\([^"]*\)"/“\1”/g
-s/`\([^`']*\)'/‘\1’/g
-s/ '\([^`']*\)' / ‘\1’ /g
-s/ '\([^`']*\)'$/ ‘\1’/g
-s/^'\([^`']*\)' /‘\1’ /g
-s/“”/""/g
-s/“/“\e[1m/g
-s/”/\e[0m”/g
-s/‘/‘\e[1m/g
-s/’/\e[0m’/g
diff --git a/linphone/po/cat-id-tbl.c b/linphone/po/cat-id-tbl.c
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/linphone/po/cs.po b/linphone/po/cs.po
deleted file mode 100644 (file)
index 1329052..0000000
+++ /dev/null
@@ -1,2066 +0,0 @@
-# translation of linphone.po to cs_CZ
-# This file is distributed under the same license as the linphone package.
-# Copyright (C) 2009 Simon Morlat (msgids)
-# Klara Cihlarova <koty@seznam.cz>, 2005.
-# Petr Pisar <petr.pisar@atlas.cz>, 2006, 2007, 2008, 2009.
-#
-# XXX: Don't translate gtk-* messages. They will be replaced from GTK+
-# catalogue.
-msgid ""
-msgstr ""
-"Project-Id-Version: linphone-3.2.0-r659\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-10-16 15:24+0200\n"
-"PO-Revision-Date: 2009-09-21 21:44+0200\n"
-"Last-Translator: Petr Pisar <petr.pisar@atlas.cz>\n"
-"Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-
-#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
-#: ../gtk-glade/support.c:102
-#, c-format
-msgid "Couldn't find pixmap file: %s"
-msgstr "Nelze najít soubor s obrázkem: %s"
-
-#: ../gtk-glade/chat.c:27
-#, c-format
-msgid "Chat with %s"
-msgstr "Diskuze s %s"
-
-#: ../gtk-glade/main.c:90
-msgid "log to stdout some debug information while running."
-msgstr "za běhu vypisovat některé ladicí informace na standardní výstup."
-
-#: ../gtk-glade/main.c:97
-msgid "Start only in the system tray, do not show the main interface."
-msgstr ""
-
-#: ../gtk-glade/main.c:104
-msgid "address to call right now"
-msgstr "zavolat právě teď na tuto adresu"
-
-#: ../gtk-glade/main.c:111
-msgid "if set automatically answer incoming calls"
-msgstr "je-li nastaveno, automaticky zvedne příchozí hovor"
-
-#: ../gtk-glade/main.c:119
-msgid ""
-"Specifiy a working directory (should be the base of the installation, eg: c:"
-"\\Program Files\\Linphone)"
-msgstr ""
-
-#: ../gtk-glade/main.c:675
-#, c-format
-msgid "Incoming call from %s"
-msgstr "Příchozí hovor od %s"
-
-#: ../gtk-glade/main.c:707
-#, c-format
-msgid ""
-"%s would like to add you to his contact list.\n"
-"Would you allow him to see your presence status or add him to your contact "
-"list ?\n"
-"If you answer no, this person will be temporarily blacklisted."
-msgstr ""
-"%s si vás chce přidat do svého adresáře.\n"
-"Dovolíte mu, aby viděl váš stav přítomnosti, nebo si ho také chcete přidat "
-"do svého adresáře?\n"
-"Odpovíte-li ne, tato osobo bude dočasně blokována."
-
-#: ../gtk-glade/main.c:777
-#, fuzzy, c-format
-msgid ""
-"Please enter your password for username <i>%s</i>\n"
-" at domain <i>%s</i>:"
-msgstr "Prosím, zadejte svoje heslo pro doménu %s:"
-
-#: ../gtk-glade/main.c:871
-msgid "Website link"
-msgstr ""
-
-#: ../gtk-glade/main.c:907
-msgid "Linphone - a video internet phone"
-msgstr "Lipnhone – internetový videofon"
-
-#: ../gtk-glade/main.c:926
-#, c-format
-msgid "%s (Default)"
-msgstr "%s (Výchozí)"
-
-#: ../gtk-glade/main.c:1168
-msgid "A free SIP video-phone"
-msgstr "Volný SIP videofon"
-
-#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
-#: ../gtk-glade/contact.glade.h:3
-msgid "Name"
-msgstr "Jméno"
-
-#: ../gtk-glade/friendlist.c:212
-msgid "Presence status"
-msgstr "Stav"
-
-#: ../gtk-glade/friendlist.c:243
-#, c-format
-msgid "Search in %s directory"
-msgstr "Hledat v adresáři %s"
-
-#: ../gtk-glade/friendlist.c:432
-msgid "Invalid sip contact !"
-msgstr "Neplatný sipový kontakt!"
-
-#: ../gtk-glade/friendlist.c:474
-#, c-format
-msgid "Call %s"
-msgstr "Volat komu: %s"
-
-#: ../gtk-glade/friendlist.c:475
-#, c-format
-msgid "Send text to %s"
-msgstr "Poslat text komu: %s"
-
-#: ../gtk-glade/friendlist.c:476
-#, c-format
-msgid "Edit contact '%s'"
-msgstr "Upravit kontakt „%s“"
-
-#: ../gtk-glade/friendlist.c:477
-#, c-format
-msgid "Delete contact '%s'"
-msgstr "Odstranit kontakt „%s“"
-
-#: ../gtk-glade/friendlist.c:519
-#, c-format
-msgid "Add new contact from %s directory"
-msgstr "Přidat nový kontakt z adresáře %s"
-
-#: ../gtk-glade/propertybox.c:251
-msgid "Rate (Hz)"
-msgstr "Rychlost (Hz)"
-
-#: ../gtk-glade/propertybox.c:257
-msgid "Status"
-msgstr "Stav"
-
-#: ../gtk-glade/propertybox.c:263
-msgid "Min bitrate (kbit/s)"
-msgstr "Min. rychlost (kbit/s)"
-
-#: ../gtk-glade/propertybox.c:269
-msgid "Parameters"
-msgstr "Parametry"
-
-#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
-msgid "Enabled"
-msgstr "Povoleno"
-
-#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
-msgid "Disabled"
-msgstr "Zakázáno"
-
-#: ../gtk-glade/propertybox.c:480
-msgid "Account"
-msgstr "Účet"
-
-#: ../gtk-glade/propertybox.c:620
-msgid "English"
-msgstr "angličtina"
-
-#: ../gtk-glade/propertybox.c:621
-msgid "French"
-msgstr "francouzština"
-
-#: ../gtk-glade/propertybox.c:622
-msgid "Swedish"
-msgstr "švédština"
-
-#: ../gtk-glade/propertybox.c:623
-msgid "Italian"
-msgstr "italština"
-
-#: ../gtk-glade/propertybox.c:624
-msgid "Spanish"
-msgstr "španělština"
-
-#: ../gtk-glade/propertybox.c:625
-msgid "Brazilian Portugese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:626
-msgid "Polish"
-msgstr "polština"
-
-#: ../gtk-glade/propertybox.c:627
-msgid "German"
-msgstr "němčina"
-
-#: ../gtk-glade/propertybox.c:628
-msgid "Russian"
-msgstr "ruština"
-
-#: ../gtk-glade/propertybox.c:629
-msgid "Japanese"
-msgstr "japonština"
-
-#: ../gtk-glade/propertybox.c:630
-msgid "Dutch"
-msgstr "dánština"
-
-#: ../gtk-glade/propertybox.c:631
-msgid "Hungarian"
-msgstr "maďarština"
-
-#: ../gtk-glade/propertybox.c:632
-msgid "Czech"
-msgstr "čeština"
-
-#: ../gtk-glade/propertybox.c:633
-msgid "Chinese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:690
-msgid ""
-"You need to restart linphone for the new language selection to take effect."
-msgstr "Aby se projevil výběr nového jazyka, je nutné znovu spustit linphone."
-
-#: ../gtk-glade/update.c:80
-#, c-format
-msgid ""
-"A more recent version is availalble from %s.\n"
-"Would you like to open a browser to download it ?"
-msgstr ""
-"Na %s je dostupná novější verze.\n"
-"Přejete si otevřít prohlížeč, abyste si ji mohli stáhnout?"
-
-#: ../gtk-glade/update.c:91
-msgid "You are running the lastest version."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:66
-msgid "Firstname, Lastname"
-msgstr "První jméno, Poslední jméno"
-
-#: ../gtk-glade/buddylookup.c:73
-msgid "SIP address"
-msgstr "SIP adresa"
-
-#: ../gtk-glade/buddylookup.c:121
-msgid "Error communicating with server."
-msgstr "Chyba komunikace se serverem."
-
-#: ../gtk-glade/buddylookup.c:125
-msgid "Connecting..."
-msgstr "Připojuje se…"
-
-#: ../gtk-glade/buddylookup.c:129
-msgid "Connected"
-msgstr "Připojeno"
-
-#: ../gtk-glade/buddylookup.c:133
-msgid "Receiving data..."
-msgstr "Přijímají se data…"
-
-#: ../gtk-glade/buddylookup.c:141
-#, c-format
-msgid "Found %i contact"
-msgid_plural "Found %i contacts"
-msgstr[0] "Nalezen %i kontakt"
-msgstr[1] "Nalezeny %i kontakty"
-msgstr[2] "Nalezeno %i kontaktů"
-
-#: ../gtk-glade/setupwizard.c:25
-msgid ""
-"Welcome !\n"
-"This assistant will help you to use a SIP account for your calls."
-msgstr ""
-"Vítejte!\n"
-"Tento průvodce vám pomůže používat sipový účet při vašich hovorech."
-
-#: ../gtk-glade/setupwizard.c:34
-msgid "Create an account by choosing a username"
-msgstr "Vytvořit účet vybráním uživatelského jména"
-
-#: ../gtk-glade/setupwizard.c:35
-msgid "I have already an account and just want to use it"
-msgstr "Účet již mám a chci jej použít"
-
-#: ../gtk-glade/setupwizard.c:53
-msgid "Please choose a username:"
-msgstr "Prosím, vyberte si uživatelské jméno:"
-
-#: ../gtk-glade/setupwizard.c:54
-msgid "Username:"
-msgstr "Uživatelské jméno:"
-
-#: ../gtk-glade/setupwizard.c:92
-#, c-format
-msgid "Checking if '%s' is available..."
-msgstr "Zjišťuji, zda-li je „%s“ přípustné…"
-
-#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
-msgid "Please wait..."
-msgstr "Prosím, čekejte…"
-
-#: ../gtk-glade/setupwizard.c:101
-msgid "Sorry this username already exists. Please try a new one."
-msgstr "Je nám líto, ale toto jméno již existuje. Prosím, zvolte jiné."
-
-#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
-msgid "Ok !"
-msgstr "V pořádku!"
-
-#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
-msgid "Communication problem, please try again later."
-msgstr "Chyba při komunikaci. Prosím, zkuste to později."
-
-#: ../gtk-glade/setupwizard.c:134
-msgid "Thank you. Your account is now configured and ready for use."
-msgstr "Děkujeme vám. Váš účet je nyní nastaven a připraven k použití."
-
-#: ../gtk-glade/setupwizard.c:228
-msgid "Welcome to the account setup assistant"
-msgstr "Vítejte v průvodci nastavení účtu"
-
-#: ../gtk-glade/setupwizard.c:232
-msgid "Account setup assistant"
-msgstr "Průvodce nastavením účtu"
-
-#: ../gtk-glade/setupwizard.c:236
-msgid "Choosing a username"
-msgstr "Výběr uživatelského jména"
-
-#: ../gtk-glade/setupwizard.c:240
-msgid "Verifying"
-msgstr "Ověřování"
-
-#: ../gtk-glade/setupwizard.c:244
-msgid "Confirmation"
-msgstr "Potvrzení"
-
-#: ../gtk-glade/setupwizard.c:249
-msgid "Creating your account"
-msgstr "Vytváření účtu"
-
-#: ../gtk-glade/setupwizard.c:253
-msgid "Now ready !"
-msgstr "Připraveno!"
-
-#: ../gtk-glade/incall_view.c:98
-msgid "<b>Calling...</b>"
-msgstr "<b>Volá se…</b>"
-
-#: ../gtk-glade/incall_view.c:122
-msgid "<b>In call with</b>"
-msgstr "<b>Hovor s</b>"
-
-#: ../gtk-glade/incall_view.c:124
-msgid "00::00::00"
-msgstr "00:00:00"
-
-#: ../gtk-glade/incall_view.c:140
-#, c-format
-msgid "%02i::%02i::%02i"
-msgstr "%02i:%02i:%02i"
-
-#: ../gtk-glade/incall_view.c:158
-msgid "<b>Call ended.</b>"
-msgstr "<b>Hovor skončil.</b>"
-
-#: ../gtk-glade/incall_view.c:176
-#, fuzzy
-msgid "Unmute"
-msgstr "Neomezená"
-
-#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
-msgid "Mute"
-msgstr "Ztlumit"
-
-#: ../gtk-glade/loginframe.c:82
-#, c-format
-msgid "Please enter login information for %s"
-msgstr "Prosím, zadejte své přihlašovací jméno pro %s:"
-
-#: ../gtk-glade/main.glade.h:1
-msgid "#"
-msgstr "#"
-
-#: ../gtk-glade/main.glade.h:2
-msgid "*"
-msgstr "*"
-
-#: ../gtk-glade/main.glade.h:3
-msgid "0"
-msgstr "0"
-
-#: ../gtk-glade/main.glade.h:4
-msgid "1"
-msgstr "1"
-
-#: ../gtk-glade/main.glade.h:5
-msgid "2"
-msgstr "2"
-
-#: ../gtk-glade/main.glade.h:6
-msgid "3"
-msgstr "3"
-
-#: ../gtk-glade/main.glade.h:7
-msgid "4"
-msgstr "4"
-
-#: ../gtk-glade/main.glade.h:8
-msgid "5"
-msgstr "5"
-
-#: ../gtk-glade/main.glade.h:9
-msgid "6"
-msgstr "6"
-
-#: ../gtk-glade/main.glade.h:10
-msgid "7"
-msgstr "7"
-
-#: ../gtk-glade/main.glade.h:11
-msgid "8"
-msgstr "8"
-
-#: ../gtk-glade/main.glade.h:12
-msgid "9"
-msgstr "9"
-
-#: ../gtk-glade/main.glade.h:13
-msgid "<b>Contact list</b>"
-msgstr "<b>Seznam kontaktů</b>"
-
-#: ../gtk-glade/main.glade.h:14
-msgid "<b>Terminate call</b>"
-msgstr "<b>Ukončit hovor</b>"
-
-#: ../gtk-glade/main.glade.h:15
-msgid "<b>Welcome !</b>"
-msgstr "<b>Vítejte!</b>"
-
-#: ../gtk-glade/main.glade.h:16
-msgid "A"
-msgstr "A"
-
-#: ../gtk-glade/main.glade.h:17
-msgid ""
-"ADSL\n"
-"Fiber Channel"
-msgstr ""
-"ADSL\n"
-"Fiber Channel"
-
-#: ../gtk-glade/main.glade.h:19
-msgid ""
-"All users\n"
-"Online users"
-msgstr ""
-"všech uživatelích\n"
-"připojených uživatelích"
-
-#: ../gtk-glade/main.glade.h:21
-msgid "Assistant"
-msgstr "Průvodce"
-
-#: ../gtk-glade/main.glade.h:22
-msgid "Audio & Video"
-msgstr "Zvuk i obraz"
-
-#: ../gtk-glade/main.glade.h:23
-msgid "Audio only"
-msgstr "Pouze zvuk"
-
-#: ../gtk-glade/main.glade.h:24
-#, fuzzy
-msgid "Automatically log me in"
-msgstr "Automaticky uhodnout platné jméno"
-
-#: ../gtk-glade/main.glade.h:25
-msgid "B"
-msgstr "B"
-
-#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
-msgid "C"
-msgstr "C"
-
-#: ../gtk-glade/main.glade.h:27
-msgid "Check for updates"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:28
-msgid "D"
-msgstr "D"
-
-#: ../gtk-glade/main.glade.h:29
-msgid "Default"
-msgstr "Výchozí"
-
-#: ../gtk-glade/main.glade.h:30
-msgid "Digits"
-msgstr "Číslice"
-
-#: ../gtk-glade/main.glade.h:31
-msgid "Duration"
-msgstr "Délka"
-
-#: ../gtk-glade/main.glade.h:32
-msgid "Duration:"
-msgstr "Délka:"
-
-#: ../gtk-glade/main.glade.h:33
-msgid "Enable self-view"
-msgstr "Zobrazovat sám sebe"
-
-#: ../gtk-glade/main.glade.h:34
-msgid "Enter username, phone number, or full sip address"
-msgstr "Zadejte uživatelské jméno, telefonní číslo nebo plnou sipovou adresu"
-
-#: ../gtk-glade/main.glade.h:35
-msgid "In call"
-msgstr "Telefonuje se"
-
-#: ../gtk-glade/main.glade.h:36
-msgid "Internet connection:"
-msgstr "Připojení k Internetu:"
-
-#: ../gtk-glade/main.glade.h:37
-msgid "Login information"
-msgstr "Informace o přihlášení"
-
-#: ../gtk-glade/main.glade.h:38
-msgid "Lookup:"
-msgstr "Hledat:"
-
-#: ../gtk-glade/main.glade.h:39
-msgid "Main view"
-msgstr "Hlavní zobrazení"
-
-#: ../gtk-glade/main.glade.h:41
-msgid "My current identity:"
-msgstr "Moje současná totožnost:"
-
-#: ../gtk-glade/main.glade.h:42
-msgid "Password"
-msgstr "Heslo"
-
-#: ../gtk-glade/main.glade.h:43
-msgid "SIP address or phone number:"
-msgstr "SIP adresa nebo telefonní číslo:"
-
-#: ../gtk-glade/main.glade.h:44
-msgid "Show current call"
-msgstr "Zobrazit současný hovor"
-
-#: ../gtk-glade/main.glade.h:45
-msgid "Start call"
-msgstr "Zahájit hovor"
-
-#: ../gtk-glade/main.glade.h:46
-msgid "Terminate call"
-msgstr "Ukončit hovor"
-
-#: ../gtk-glade/main.glade.h:47
-msgid "Username"
-msgstr "Uživatelské jméno"
-
-#: ../gtk-glade/main.glade.h:48
-msgid "_Linphone"
-msgstr "_Linphone"
-
-#: ../gtk-glade/main.glade.h:49
-msgid "_Modes"
-msgstr "Reži_my"
-
-#: ../gtk-glade/main.glade.h:50
-msgid "gtk-connect"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:51
-msgid "gtk-find"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:52
-msgid "in"
-msgstr "ve"
-
-# XXX: Dummy string. Make it not translatable or use real message
-#: ../gtk-glade/main.glade.h:53
-msgid "label"
-msgstr ""
-
-#: ../gtk-glade/about.glade.h:1
-msgid "About linphone"
-msgstr "O Linphonu"
-
-# FIXME: standart
-#: ../gtk-glade/about.glade.h:2
-msgid "An internet video phone using the standart SIP (rfc3261) protocol."
-msgstr "Internetový videofon používající standardní protokol SIP (RFC 3261)."
-
-#: ../gtk-glade/about.glade.h:3
-msgid "Created by Simon Morlat\n"
-msgstr "Vytvořil Simon Morlat\n"
-
-#: ../gtk-glade/about.glade.h:5
-msgid ""
-"fr: Simon Morlat\n"
-"en: Simon Morlat and Delphine Perreau\n"
-"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
-"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
-"sv: Daniel Nylander <po@danielnylander.se>\n"
-"es: Jesus Benitez <gnelson at inMail dot sk>\n"
-"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
-"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
-"pl: Robert Nasiadek <darkone@darkone.pl>\n"
-"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
-"hu: anonymous\n"
-msgstr ""
-"fr: Simon Morlat\n"
-"en: Simon Morlat a Delphine Perreau\n"
-"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
-"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
-"sv: Daniel Nylander <po@danielnylander.se>\n"
-"es: Jesus Benitez <gnelson at inMail dot sk>\n"
-"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
-"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
-"pl: Robert Nasiadek <darkone@darkone.pl>\n"
-"cs: Petr Písař <petr.pisar@atlas.cz>\n"
-"hu: anonym\n"
-
-#: ../gtk-glade/contact.glade.h:1
-#, fuzzy
-msgid "<b>Contact information</b>"
-msgstr "Informace o kontaktu"
-
-#: ../gtk-glade/contact.glade.h:2
-msgid "Allow this contact to see my presence status"
-msgstr "Dovolit tomuto kontaktu, aby viděl můj stav přítomnosti"
-
-#: ../gtk-glade/contact.glade.h:4
-msgid "SIP Address"
-msgstr "SIP adresa"
-
-#: ../gtk-glade/contact.glade.h:5
-msgid "Show this contact presence status"
-msgstr "U tohoto kontaktu zobrazovat stav přítomnosti"
-
-#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
-#: ../gtk-glade/sip_account.glade.h:9
-msgid "gtk-cancel"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
-#: ../gtk-glade/sip_account.glade.h:10
-msgid "gtk-ok"
-msgstr ""
-
-#: ../gtk-glade/log.glade.h:1
-msgid "Linphone debug window"
-msgstr "Ladicí okno Linphonu"
-
-#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
-#: ../gtk-glade/chatroom.glade.h:2
-msgid "gtk-close"
-msgstr ""
-
-#: ../gtk-glade/password.glade.h:1
-msgid "Linphone - Authentication required"
-msgstr "Linphone – Ověření totožnosti vyžadováno"
-
-#: ../gtk-glade/password.glade.h:2
-msgid "Password:"
-msgstr "Heslo:"
-
-#: ../gtk-glade/password.glade.h:3
-msgid "Please enter the domain password"
-msgstr "Prosím, zadejte heslo pro doménu"
-
-#: ../gtk-glade/password.glade.h:4
-msgid "UserID"
-msgstr ""
-
-#: ../gtk-glade/call_logs.glade.h:1
-msgid "Call history"
-msgstr "Historie volání"
-
-#: ../gtk-glade/sip_account.glade.h:1
-msgid "Configure a SIP account"
-msgstr "Nastavit SIP účet"
-
-#: ../gtk-glade/sip_account.glade.h:2
-msgid "Linphone - Configure a SIP account"
-msgstr "Linphone – Nastav SIP účet"
-
-#: ../gtk-glade/sip_account.glade.h:3
-msgid "Publish presence information"
-msgstr "Zveřejnit stav přítomnosti"
-
-#: ../gtk-glade/sip_account.glade.h:4
-msgid "Register at startup"
-msgstr "Zaregistrovat při spuštění"
-
-#: ../gtk-glade/sip_account.glade.h:5
-msgid "Registration duration (sec):"
-msgstr "Registrační období (s):"
-
-#: ../gtk-glade/sip_account.glade.h:6
-msgid "Route (optional):"
-msgstr "Směrování (volitelné):"
-
-#: ../gtk-glade/sip_account.glade.h:7
-msgid "SIP Proxy address:"
-msgstr "Adresa SIP proxy:"
-
-#: ../gtk-glade/sip_account.glade.h:8
-msgid "Your SIP identity:"
-msgstr "Vaše SIP totožnost:"
-
-#: ../gtk-glade/sip_account.glade.h:11
-msgid "sip:"
-msgstr "sip:"
-
-#: ../gtk-glade/chatroom.glade.h:1
-msgid "Send"
-msgstr "Odeslat"
-
-#: ../gtk-glade/incoming_call.glade.h:1
-msgid "Accept"
-msgstr "Přijmout"
-
-#: ../gtk-glade/incoming_call.glade.h:2
-msgid "Decline"
-msgstr "Odmítnout"
-
-#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
-msgid "Incoming call"
-msgstr "Příchozí hovor"
-
-#: ../gtk-glade/incoming_call.glade.h:4
-msgid "Incoming call from"
-msgstr "Příchozí hovor od"
-
-#: ../gtk-glade/incoming_call.glade.h:5
-msgid "Linphone - Incoming call"
-msgstr "Linphone – Příchozí hovor"
-
-#: ../gtk-glade/parameters.glade.h:1
-msgid "0 stands for \"unlimited\""
-msgstr "0 znamená „neomezeno“"
-
-#: ../gtk-glade/parameters.glade.h:2
-msgid "<b>Audio</b>"
-msgstr "<b>Zvuk</b>"
-
-#: ../gtk-glade/parameters.glade.h:3
-msgid "<b>Bandwidth control</b>"
-msgstr "<b>Využití šířky pásma</b>"
-
-#: ../gtk-glade/parameters.glade.h:4
-msgid "<b>Codecs</b>"
-msgstr "<b>Kodeky</b>"
-
-#: ../gtk-glade/parameters.glade.h:5
-msgid "<b>Default identity</b>"
-msgstr "<b>Implicitní totožnost</b>"
-
-#: ../gtk-glade/parameters.glade.h:6
-msgid "<b>Language</b>"
-msgstr "<b>Jazyk</b>"
-
-#: ../gtk-glade/parameters.glade.h:7
-msgid "<b>NAT and Firewall</b>"
-msgstr "<b>NAT a firewall</b>"
-
-#: ../gtk-glade/parameters.glade.h:8
-msgid "<b>Ports</b>"
-msgstr "<b>Porty</b>"
-
-#: ../gtk-glade/parameters.glade.h:9
-msgid "<b>Privacy</b>"
-msgstr "<b>Soukromí</b>"
-
-#: ../gtk-glade/parameters.glade.h:10
-msgid "<b>Proxy accounts</b>"
-msgstr "<b>Proxy účty</b>"
-
-#: ../gtk-glade/parameters.glade.h:11
-msgid "<b>Transport</b>"
-msgstr "<b>Přenos</b>"
-
-#: ../gtk-glade/parameters.glade.h:12
-msgid "<b>Video</b>"
-msgstr "<b>Obraz</b>"
-
-#: ../gtk-glade/parameters.glade.h:13
-msgid "ALSA special device (optional):"
-msgstr "Zvláštní ALSA zařízení (volitelné):"
-
-#: ../gtk-glade/parameters.glade.h:14
-msgid "Add"
-msgstr "Přidat"
-
-#: ../gtk-glade/parameters.glade.h:15
-msgid "Audio RTP/UDP:"
-msgstr "Zvukový RTP/UDP:"
-
-#: ../gtk-glade/parameters.glade.h:16
-msgid ""
-"Audio codecs\n"
-"Video codecs"
-msgstr ""
-"Kodeky zvuku\n"
-"Kodeky obrazu"
-
-#: ../gtk-glade/parameters.glade.h:18
-msgid "Behind NAT / Firewall (specify gateway IP below)"
-msgstr "Za NAT/firewallem (adresu brány zadejte níže)"
-
-#: ../gtk-glade/parameters.glade.h:19
-msgid "Behind NAT / Firewall (use STUN to resolve)"
-msgstr "Za NAT/firewallem (adresu určí STUN)"
-
-#: ../gtk-glade/parameters.glade.h:21
-msgid "CIF"
-msgstr "CIF"
-
-#: ../gtk-glade/parameters.glade.h:22
-msgid "Capture device:"
-msgstr "Zařízení pro nahrávání:"
-
-#: ../gtk-glade/parameters.glade.h:23
-msgid "Codecs"
-msgstr "Kodeky"
-
-#: ../gtk-glade/parameters.glade.h:24
-msgid "Direct connection to the Internet"
-msgstr "Přímé připojení do Internetu"
-
-#: ../gtk-glade/parameters.glade.h:25
-msgid "Disable"
-msgstr "Zakázat"
-
-#: ../gtk-glade/parameters.glade.h:26
-msgid "Done"
-msgstr "Hotovo"
-
-#: ../gtk-glade/parameters.glade.h:27
-msgid "Download speed limit in Kbit/sec:"
-msgstr "Omezení příchozí rychlosti (kb/s):"
-
-#: ../gtk-glade/parameters.glade.h:28
-msgid "Edit"
-msgstr "Upravit"
-
-#: ../gtk-glade/parameters.glade.h:29
-msgid "Enable"
-msgstr "Povolit"
-
-#: ../gtk-glade/parameters.glade.h:30
-msgid "Enable echo cancellation"
-msgstr "Zapnout potlačení ozvěny"
-
-#: ../gtk-glade/parameters.glade.h:31
-msgid "Erase all passwords"
-msgstr "Vymazat všechna hesla"
-
-#: ../gtk-glade/parameters.glade.h:32
-msgid "Manage SIP Accounts"
-msgstr "Nastavení SIP účtů"
-
-#: ../gtk-glade/parameters.glade.h:33
-msgid "Multimedia settings"
-msgstr "Nastavení multimédií"
-
-#: ../gtk-glade/parameters.glade.h:34
-msgid "Network settings"
-msgstr "Nastavení sítě"
-
-#: ../gtk-glade/parameters.glade.h:35
-msgid "Playback device:"
-msgstr "Zařízení pro přehrávání:"
-
-#: ../gtk-glade/parameters.glade.h:36
-msgid "Prefered video resolution:"
-msgstr "Upřednostňované rozlišení obrazu:"
-
-#: ../gtk-glade/parameters.glade.h:37
-msgid "Public IP address:"
-msgstr "Veřejná IP adresa:"
-
-#: ../gtk-glade/parameters.glade.h:38
-msgid ""
-"Register to FONICS\n"
-"virtual network !"
-msgstr ""
-"Zaregistrovat se do\n"
-"virtuální sítě FONICS!"
-
-#: ../gtk-glade/parameters.glade.h:40
-msgid "Remove"
-msgstr "Odstranit"
-
-#: ../gtk-glade/parameters.glade.h:41
-msgid "Ring device:"
-msgstr "Zařízení pro vyzvánění:"
-
-#: ../gtk-glade/parameters.glade.h:42
-msgid "Ring sound:"
-msgstr "Vyzvánění:"
-
-#: ../gtk-glade/parameters.glade.h:43
-msgid "SIP (UDP):"
-msgstr "SIP (UDP):"
-
-#: ../gtk-glade/parameters.glade.h:44
-msgid "Send DTMFs as SIP info"
-msgstr "Odesílat tóny DTMF jako SIP INFO zprávy"
-
-#: ../gtk-glade/parameters.glade.h:45
-msgid "Set Maximum Transmission Unit:"
-msgstr "Nastavit MTU (největší přenositelná zpráva):"
-
-#: ../gtk-glade/parameters.glade.h:46
-msgid "Settings"
-msgstr "Nastavení"
-
-#: ../gtk-glade/parameters.glade.h:47
-msgid "Stun server:"
-msgstr "STUN server:"
-
-#: ../gtk-glade/parameters.glade.h:48
-msgid "This section defines your SIP address when not using a SIP account"
-msgstr "Tento oddíl určuje vaši SIP adresu, když se nepoužívá žádný účet"
-
-#: ../gtk-glade/parameters.glade.h:49
-msgid "Upload speed limit in Kbit/sec:"
-msgstr "Omezení odchozí rychlosti (kb/s):"
-
-#: ../gtk-glade/parameters.glade.h:50
-msgid "Use IPv6 instead of IPv4"
-msgstr "Používat IPv6 místo IPv4"
-
-#: ../gtk-glade/parameters.glade.h:51
-msgid "User interface"
-msgstr "Uživatelské rozhraní"
-
-#: ../gtk-glade/parameters.glade.h:52
-msgid "Video RTP/UDP:"
-msgstr "Obrazový RTP/UDP:"
-
-#: ../gtk-glade/parameters.glade.h:53
-msgid "Video input device:"
-msgstr "Vstupní zařízení obrazu:"
-
-#: ../gtk-glade/parameters.glade.h:54
-msgid "Your display name (eg: John Doe):"
-msgstr "Vaše zobrazované jméno (např. Jan Novák):"
-
-#: ../gtk-glade/parameters.glade.h:55
-msgid "Your resulting SIP address:"
-msgstr "Vaše výsledná SIP adresa:"
-
-#: ../gtk-glade/parameters.glade.h:56
-msgid "Your username:"
-msgstr "Vaše uživatelské jméno:"
-
-#: ../gtk-glade/parameters.glade.h:57
-msgid "a sound card\n"
-msgstr "zvuková karta\n"
-
-#: ../gtk-glade/parameters.glade.h:59
-msgid "default camera"
-msgstr "implicitní kamera"
-
-#: ../gtk-glade/parameters.glade.h:60
-msgid "default soundcard"
-msgstr "implicitní zvuková karta"
-
-#: ../gtk-glade/parameters.glade.h:61
-msgid "default soundcard\n"
-msgstr "implicitní zvuková karta\n"
-
-#: ../gtk-glade/parameters.glade.h:63
-msgid "gtk-go-down"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:64
-msgid "gtk-go-up"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:65
-msgid "gtk-media-play"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:1
-msgid "<b>Search somebody</b>"
-msgstr "<b>Hledat někoho</b>"
-
-#: ../gtk-glade/buddylookup.glade.h:2
-msgid "Add to my list"
-msgstr "Přidat na svůj seznam"
-
-#: ../gtk-glade/buddylookup.glade.h:3
-msgid "Search contacts in directory"
-msgstr "Hledat kontakty v adresáři"
-
-#: ../gtk-glade/waiting.glade.h:1
-msgid "Linphone"
-msgstr "Linphone"
-
-#: ../gtk-glade/waiting.glade.h:2
-msgid "Please wait"
-msgstr "Prosím, čekejte"
-
-#: ../coreapi/linphonecore.c:195
-#, c-format
-msgid "You have missed %i call."
-msgid_plural "You have missed %i calls."
-msgstr[0] "Máte %i zmeškaný hovor."
-msgstr[1] "Máte %i zmeškané hovory."
-msgstr[2] "Máte %i zmeškaných hovorů."
-
-#: ../coreapi/linphonecore.c:223
-msgid "aborted"
-msgstr "přerušen"
-
-#: ../coreapi/linphonecore.c:226
-msgid "completed"
-msgstr "dokončen"
-
-#: ../coreapi/linphonecore.c:229
-msgid "missed"
-msgstr "promeškán"
-
-#: ../coreapi/linphonecore.c:234
-#, c-format
-msgid ""
-"%s at %s\n"
-"From: %s\n"
-"To: %s\n"
-"Status: %s\n"
-"Duration: %i mn %i sec\n"
-msgstr ""
-"%s v %s\n"
-"Od: %s\n"
-"Pro: %s\n"
-"Stav: %s\n"
-"Délka: %i min %i s\n"
-
-#: ../coreapi/linphonecore.c:235
-msgid "Outgoing call"
-msgstr "Odchozí hovor"
-
-#: ../coreapi/linphonecore.c:445
-msgid ""
-"Your machine appears to be connected to an IPv6 network. By default linphone "
-"always uses IPv4. Please update your configuration if you want to use IPv6"
-msgstr ""
-"Zdá se, že váš počítač je připojen do IPv6 sítě. Standardně linphone používá "
-"pouze IPv4. Prosím, změňte nastavení programu, pokud chcete používat IPv6."
-
-#: ../coreapi/linphonecore.c:739
-msgid "Ready"
-msgstr "Připraven."
-
-#: ../coreapi/linphonecore.c:1014
-msgid "Remote end seems to have disconnected, the call is going to be closed."
-msgstr "Vzdálený konec se asi odpojil, hovor bude ukončen."
-
-#: ../coreapi/linphonecore.c:1172
-msgid "Looking for telephone number destination..."
-msgstr "Vyhledává se umístění čísla…"
-
-#: ../coreapi/linphonecore.c:1174
-msgid "Could not resolve this number."
-msgstr "Toto číslo nelze vyhledat."
-
-#: ../coreapi/linphonecore.c:1239
-msgid ""
-"Could not parse given sip address. A sip url usually looks like sip:"
-"user@domain"
-msgstr ""
-"Špatně zadaná SIP adresa. Adresa má mít tento formát <sip:uživatel@doména>"
-
-#: ../coreapi/linphonecore.c:1340
-msgid "Sorry, having multiple simultaneous calls is not supported yet !"
-msgstr "Promiňte, vedení více současných hovorů není podporováno!"
-
-#: ../coreapi/linphonecore.c:1387
-msgid "Contacting"
-msgstr "Kontaktuji"
-
-#: ../coreapi/linphonecore.c:1402
-msgid "could not call"
-msgstr "Nelze volat."
-
-#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
-msgid "Connected."
-msgstr "Připojeno."
-
-#: ../coreapi/linphonecore.c:1813
-msgid "Call ended"
-msgstr "Hovor skončil."
-
-#: ../coreapi/linphonecore.c:2175
-msgid "No nat/firewall address supplied !"
-msgstr "Žádná adresa NATu/firewallu nebyla zadána!"
-
-#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
-#, c-format
-msgid "Invalid nat address '%s' : %s"
-msgstr "Neplatná adresa NATu '%s': '%s"
-
-#: ../coreapi/misc.c:134
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the pcm oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-"'modprobe snd-pcm-oss' as root to load it."
-msgstr ""
-"Váš počítač používá zvukový ovladač ALSA. Jde o nejlepší\n"
-"volbu. Linphone však potřebuje ke své práci modul emulace\n"
-"oss, který chybí. Prosím zadejte jako uživatel root příkaz\n"
-"'modprobe snd-pcm-oss', kterým modul zavede."
-
-#: ../coreapi/misc.c:137
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the mixer oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-" 'modprobe snd-mixer-oss' as root to load it."
-msgstr ""
-"Váš počítač používá zvukový ovladač ALSA. Jde o nejlepší\n"
-"volbu. Linphone však potřebuje ke své práci modul mixer emulace\n"
-"oss, který chybí. Prosím zadejte jako uživatel root příkaz\n"
-"'modprobe snd-mixer-oss', kterým modul zavede."
-
-#: ../coreapi/misc.c:610
-msgid "Stun lookup in progress..."
-msgstr "Hledá se adresa pomocí STUN…"
-
-#: ../coreapi/exevents.c:127
-msgid "Call terminated."
-msgstr "Hovor ukončen."
-
-#: ../coreapi/exevents.c:149
-msgid "Could not reach destination."
-msgstr "Cíl je nedostupný."
-
-#: ../coreapi/exevents.c:158
-msgid "User is busy."
-msgstr "Uživatel je zaneprázdněn."
-
-#: ../coreapi/exevents.c:159
-msgid "User is temporarily unavailable."
-msgstr "Uživatel je dočasně nedostupný."
-
-#: ../coreapi/exevents.c:160
-msgid "Request Cancelled."
-msgstr "Dotaz přerušen."
-
-#. char *retrymsg=_("%s. Retry after %i minute(s).");
-#: ../coreapi/exevents.c:162
-msgid "User does not want to be disturbed."
-msgstr "Uživatel si nepřeje být rušen."
-
-#: ../coreapi/exevents.c:163
-msgid "Call declined."
-msgstr "Volání odmítnuto."
-
-#: ../coreapi/exevents.c:191
-msgid "Bad request"
-msgstr "Chybný dotaz"
-
-#: ../coreapi/exevents.c:194
-msgid "User cannot be found at given address."
-msgstr "Uživatele nelze na dané adrese zastihnout."
-
-#: ../coreapi/exevents.c:197
-msgid "Remote user cannot support any of proposed codecs."
-msgstr "Vzdálený uživatel nemá podporu pro žádný z navržených kodeků."
-
-#. time out, call leg is lost
-#: ../coreapi/exevents.c:227
-msgid "Timeout."
-msgstr "Vypršení časového limitu."
-
-#: ../coreapi/exevents.c:230
-msgid "Remote host was found but refused connection."
-msgstr "Vzdálený počítač byl nalezen, ale odmítl připojení."
-
-#: ../coreapi/exevents.c:339
-msgid "is contacting you."
-msgstr "vás volá."
-
-#: ../coreapi/exevents.c:424
-#, c-format
-msgid "Redirected to %s..."
-msgstr "Přesměrováno na %s…"
-
-#: ../coreapi/exevents.c:440
-msgid ""
-"User is not reachable at the moment but he invites you\n"
-"to contact him using the following alternate resource:"
-msgstr ""
-"Uživatel je nedostupný, ale navrhuje tyto alternativní\n"
-"setkání:"
-
-#: ../coreapi/exevents.c:861
-msgid "Early media."
-msgstr "Časná média."
-
-#: ../coreapi/exevents.c:972
-#, c-format
-msgid "Registration on %s failed: %s"
-msgstr "Registrace na %s selhala: %s"
-
-#: ../coreapi/exevents.c:972
-msgid "no response timeout"
-msgstr "odpověď nedorazila včas"
-
-#: ../coreapi/exevents.c:998
-#, c-format
-msgid "Registration on %s successful."
-msgstr "Registrace na %s byla úspěšná."
-
-#: ../coreapi/exevents.c:999
-#, fuzzy, c-format
-msgid "Unregistration on %s done."
-msgstr "Registrace na %s byla úspěšná."
-
-#. people for which we don't have yet an answer should appear as offline
-#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
-msgid "Gone"
-msgstr "Pryč"
-
-#: ../coreapi/presence.c:129
-msgid "Waiting for Approval"
-msgstr "Čekám na schválení"
-
-#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
-msgid "Online"
-msgstr "Připojeno"
-
-#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
-msgid "Busy"
-msgstr "Zaneprázdněn"
-
-#: ../coreapi/presence.c:142
-msgid "Be Right Back"
-msgstr "Na chvíli pryč"
-
-#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
-msgid "Away"
-msgstr "Pryč"
-
-#: ../coreapi/presence.c:151
-msgid "On The Phone"
-msgstr "Na příjmu"
-
-#: ../coreapi/presence.c:156
-msgid "Out To Lunch"
-msgstr "Na obědě"
-
-#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
-msgid "Closed"
-msgstr "Zavřeno"
-
-#: ../coreapi/friend.c:35
-msgid "Unknown"
-msgstr "Stav není znám"
-
-#: ../coreapi/friend.c:44
-msgid "Be right back"
-msgstr "Za chvíli se vrátím"
-
-#: ../coreapi/friend.c:50
-msgid "On the phone"
-msgstr "U telefonu"
-
-#: ../coreapi/friend.c:53
-msgid "Out to lunch"
-msgstr "Na obědě"
-
-#: ../coreapi/friend.c:56
-msgid "Do not disturb"
-msgstr "Nerušit"
-
-#: ../coreapi/friend.c:59
-msgid "Moved"
-msgstr "Přestěhoval se"
-
-#: ../coreapi/friend.c:62
-msgid "Using another messaging service"
-msgstr "Používá jinou službu přenosu zpráv"
-
-#: ../coreapi/friend.c:65
-msgid "Offline"
-msgstr "Odpojeno"
-
-#: ../coreapi/friend.c:68
-msgid "Pending"
-msgstr "Čeká"
-
-#: ../coreapi/friend.c:74
-msgid "Unknown-bug"
-msgstr "Neznámá chyba"
-
-#: ../coreapi/proxy.c:221
-msgid ""
-"The sip proxy address you entered is invalid, it must start with \"sip:\" "
-"followed by a hostname."
-msgstr ""
-"Adresa SIP proxy, kterou jste zadali, není platná. Musí začínat na „sip:“ a "
-"pak musí následovat jméno stroje."
-
-#: ../coreapi/proxy.c:227
-msgid ""
-"The sip identity you entered is invalid.\n"
-"It should look like sip:username@proxydomain, such as sip:alice@example.net"
-msgstr ""
-"SIP identita, kterou jste zadali, není platná.\n"
-"Měla by mít tvar sip:uživatel@proxydoména, například sip:alice@example.net"
-
-#: ../coreapi/proxy.c:634
-#, c-format
-msgid "Could not login as %s"
-msgstr "Nelze se přihlásit jako %s"
-
-#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
-msgid "ITU-G.711 alaw encoder"
-msgstr "Kodér a-law ITU-G.711"
-
-#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
-msgid "ITU-G.711 alaw decoder"
-msgstr "Dekodér a-law ITU-G.711"
-
-#: ../mediastreamer2/src/alsa.c:923
-msgid "Alsa sound source"
-msgstr "Zdroj zvuku ALSA"
-
-#: ../mediastreamer2/src/alsa.c:1027
-msgid "Alsa sound output"
-msgstr "Zvukový výstup ALSA"
-
-#: ../mediastreamer2/src/aqsnd.c:891
-msgid "Sound capture filter for MacOS X Audio Queue Service"
-msgstr "Filtr zachytávání zvuku přes MacOS X službu zvukové fronty"
-
-#: ../mediastreamer2/src/aqsnd.c:915
-msgid "Sound playback filter for MacOS X Audio Queue Service"
-msgstr "Filtr přehrávání zvuku přes MacOS X službu zvukové fronty"
-
-#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
-msgid "DTMF generator"
-msgstr "Generátor DTMF"
-
-#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
-msgid "The GSM full-rate codec"
-msgstr "Kodek plnopásmového GSM"
-
-#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
-msgid "The GSM codec"
-msgstr "GSM kodek"
-
-#: ../mediastreamer2/src/macsnd.c:670
-msgid "Sound capture filter for MacOS X Core Audio drivers"
-msgstr "Filtr zachytávání zvuku přes MacOS X ovladače Core Audio"
-
-#: ../mediastreamer2/src/macsnd.c:684
-msgid "Sound playback filter for MacOS X Core Audio drivers"
-msgstr "Filtr přehrávání zvuku přes MacOS X ovladače Core Audio"
-
-#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
-msgid "A filter to make conferencing"
-msgstr "Filtr pro vytváření konferencí"
-
-#: ../mediastreamer2/src/msfileplayer.c:295
-#: ../mediastreamer2/src/msfileplayer.c:313
-msgid "Raw files and wav reader"
-msgstr "Čtení syrových souborů a souborů WAV"
-
-#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
-#: ../mediastreamer2/src/msfilerec_win.c:216
-#: ../mediastreamer2/src/msfilerec_win.c:234
-msgid "Wav file recorder"
-msgstr "Nahrávání do souborů WAV"
-
-#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
-msgid "A filter that send several inputs to one output."
-msgstr "Filtr, který směšuje několik vstupů do jednoho výstupu."
-
-#: ../mediastreamer2/src/msresample.c:221
-#: ../mediastreamer2/src/msresample.c:239
-msgid "frequency resampler"
-msgstr "měnič frekvence"
-
-#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
-msgid "RTP output filter"
-msgstr "Filtr RTP výstupu"
-
-#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
-msgid "RTP input filter"
-msgstr "Filtr RTP vstupu"
-
-#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
-#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
-msgid "The free and wonderful speex codec"
-msgstr "Svobodný a úžasný kodek speex"
-
-#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
-msgid "A filter that controls and measure sound volume"
-msgstr "Filtr, který měří a řídí hlasitost zvuku"
-
-#: ../mediastreamer2/src/msv4l.c:1009
-msgid "A video4linux compatible source filter to stream pictures."
-msgstr "Zdrojový filtr kompatibilní s Video4Linux proudující obrázky."
-
-#: ../mediastreamer2/src/msv4l2.c:458
-msgid "A filter to grab pictures from Video4Linux2-powered cameras"
-msgstr "Filtr zachytávající obrázky z Video4Linux2 kamer"
-
-#: ../mediastreamer2/src/nowebcam.c:1780
-msgid "A filter that outputs a static image."
-msgstr "Filtr, který vydává nehybný obrázek."
-
-#: ../mediastreamer2/src/oss.c:567
-msgid "Sound capture filter for OSS drivers"
-msgstr "Zvukový zachytávací filtr pro ovladače OSS"
-
-#: ../mediastreamer2/src/oss.c:581
-msgid "Sound playback filter for OSS drivers"
-msgstr "Zvukový přehrávací filtr pro ovladače OSS"
-
-#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
-msgid "A pixel format converter"
-msgstr "Převodník formátu pixelů"
-
-#: ../mediastreamer2/src/sizeconv.c:204
-msgid "A video size converter"
-msgstr "Převaděč velikosti videa"
-
-#: ../mediastreamer2/src/sizeconv.c:222
-msgid "a small video size converter"
-msgstr "Převaděč velikosti malých videí"
-
-#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
-msgid "Echo canceler using speex library"
-msgstr "Potlačení ozvěny používající knihovnu speex"
-
-#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
-msgid "A filter that reads from input and copy to its multiple outputs."
-msgstr "Filtr, který čte vstup a kopíruje ho více výstupů."
-
-#: ../mediastreamer2/src/theora.c:375
-msgid "The theora video encoder from xiph.org"
-msgstr "Kodér videa do theory od xiph.org"
-
-#: ../mediastreamer2/src/theora.c:393
-msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
-msgstr ""
-"Kodek pro video „theora“ od xiph.org, který má otevřený zdrojový kód a je "
-"prostý licenčních poplatků"
-
-#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
-msgid "The theora video decoder from xiph.org"
-msgstr "Dekodér theora videa od xiph.org"
-
-#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
-msgid "ITU-G.711 ulaw encoder"
-msgstr "Kodér µ-law ITU-G.711"
-
-#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
-msgid "ITU-G.711 ulaw decoder"
-msgstr "Dekodér µ-law ITU-G.711"
-
-#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
-#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
-msgid "A H.263 decoder using ffmpeg library"
-msgstr "Dekodér H.263 používající knihovnu ffmpeg"
-
-#: ../mediastreamer2/src/videodec.c:688
-msgid "A MPEG4 decoder using ffmpeg library"
-msgstr "Dekodér MPEG4 používající knihovnu ffmpeg"
-
-#: ../mediastreamer2/src/videodec.c:704
-#, fuzzy
-msgid "A RTP/JPEG decoder using ffmpeg library"
-msgstr "Dekodér MPEG používající knihovnu ffmpeg"
-
-#: ../mediastreamer2/src/videodec.c:720
-msgid "A MJPEG decoder using ffmpeg library"
-msgstr "Dekodér MPEG používající knihovnu ffmpeg"
-
-#: ../mediastreamer2/src/videodec.c:736
-msgid "A snow decoder using ffmpeg library"
-msgstr "Dekodér snow používající knihovnu ffmpeg"
-
-#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
-msgid "A video H.263 encoder using ffmpeg library."
-msgstr "Kodér H.263 používající knihovnu ffmpeg."
-
-#: ../mediastreamer2/src/videoenc.c:856
-msgid ""
-"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
-"spec."
-msgstr ""
-"Kodér H.263 videa používající knihovnu ffmpeg. Vyhovuje staré specifikaci "
-"RFC 2190."
-
-#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
-msgid "A video MPEG4 encoder using ffmpeg library."
-msgstr "Kodér MPEG4 videa používající knihovnu ffmpeg."
-
-#: ../mediastreamer2/src/videoenc.c:888
-msgid "A video snow encoder using ffmpeg library."
-msgstr "Kodér snow videa používající knihovnu ffmpeg."
-
-#: ../mediastreamer2/src/videoenc.c:904
-#, fuzzy
-msgid "A RTP/MJPEG encoder using ffmpeg library."
-msgstr "Dekodér MPEG používající knihovnu ffmpeg"
-
-#: ../mediastreamer2/src/videoenc.c:938
-msgid ""
-"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
-msgstr ""
-"Kodér H.263 videa používající knihovnu ffmpeg, vyhovuje staré specifikaci "
-"RFC 2190."
-
-#: ../mediastreamer2/src/videoenc.c:970
-msgid ""
-"The snow codec is royalty-free and is open-source. \n"
-"It uses innovative techniques that makes it one of most promising video "
-"codec. It is implemented within the ffmpeg project.\n"
-"However it is under development, quite unstable and compatibility with other "
-"versions cannot be guaranteed."
-msgstr ""
-"Kodek snow není zatížen poplatky a má otevřený zdrojový kód.\n"
-"Využívá průkopnické techniky, které jej činí jedním z nejslibnějších video "
-"kodeků. Je implementován v projektu ffmpeg.\n"
-"Avšak stále se vyvíjí, je trochu nestabilní a kompatibilita s ostatními "
-"verzemi není zaručena."
-
-#: ../mediastreamer2/src/videoenc.c:990
-#, fuzzy
-msgid "A MJPEG encoder using ffmpeg library."
-msgstr "Dekodér MPEG používající knihovnu ffmpeg"
-
-#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
-msgid "A generic video display"
-msgstr "Obecné zobrazování videa"
-
-#: ../mediastreamer2/src/wincevideods.c:966
-#: ../mediastreamer2/src/wincevideods.c:984
-#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
-#: ../mediastreamer2/src/winvideods.c:1306
-#: ../mediastreamer2/src/winvideods.c:1324
-msgid "A video4windows compatible source filter to stream pictures."
-msgstr "Zdrojový filtr kompatibilní s video4windows proudující obrázky."
-
-#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
-msgid "A video for windows (vfw.h) based source filter to grab pictures."
-msgstr ""
-"Zdrojový filtr založený na videu pro windows (vwf.h) pro zachytávání obrázků."
-
-#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
-msgid "ICE filter"
-msgstr "Filtr ICE"
-
-#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
-msgid "A filter that trashes its input (useful for terminating some graphs)."
-msgstr ""
-"Filtr, který zahazuje svůj vstup (užitečné na zakončení některých grafů)."
-
-#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
-msgid "Parametric sound equalizer."
-msgstr "Parametrický ekvalizér zvuku."
-
-#: ../mediastreamer2/src/msdscap-mingw.cc:1003
-msgid "A webcam grabber based on directshow."
-msgstr "Snímač kamer postavený na directshow."
-
-#~ msgid "Bresilian"
-#~ msgstr "brazilská portugalština"
-
-#~ msgid "Homepage"
-#~ msgstr "Domovská stránka"
-
-#~ msgid "Show debug window"
-#~ msgstr "Zobrazit ladicí okno"
-
-#~ msgid "_View"
-#~ msgstr "_Zobrazit"
-
-#~ msgid "A filter to make level measurements on 16 bits pcm audio stream"
-#~ msgstr "Filtr, který měří hlasitost na 16b zvukovém PCM proudu"
-
-#~ msgid "A video for macosx compatible source filter to stream pictures."
-#~ msgstr "Zdrojový filtr kompatibilní s MacOS X videem proudující obrázky."
-
-#~ msgid "A video display window using SDL"
-#~ msgstr "Zobrazovaní videa v SDL okně"
-
-#~ msgid ""
-#~ "Show All\n"
-#~ "Show Online"
-#~ msgstr ""
-#~ "Zobrazovat vše\n"
-#~ "Zobrazovat připojené"
-
-#~ msgid "Search:"
-#~ msgstr "Hledat:"
-
-#~ msgid "Display filters"
-#~ msgstr "Filtry pro zobrazení"
-
-#~ msgid "I'm not behing a firewall"
-#~ msgstr "Nejsem za firewallem"
-
-#~ msgid "I'm behind a firewall, use supplied public IP address"
-#~ msgstr "Jsem za firewallem, použij zadanou veřejnou IP adresu"
-
-#~ msgid "Use the supplied stun server above and do as best as possible"
-#~ msgstr "Použij výše zadaný STUN server a snaž se, jak nejlépe umíš"
-
-#~ msgid "<b>Miscelaneous</b>"
-#~ msgstr "<b>Různé</b>"
-
-#~ msgid "Go"
-#~ msgstr "Soubor"
-
-#~ msgid "Address book"
-#~ msgstr "Adresář"
-
-#~ msgid "Shows calls"
-#~ msgstr "Zobrazit volání"
-
-#~ msgid "Exit"
-#~ msgstr "Ukončit"
-
-#~ msgid "Help"
-#~ msgstr "Nápověda"
-
-#~ msgid "Shows the address book"
-#~ msgstr "Zobrazit adresář"
-
-#~ msgid "..."
-#~ msgstr "…"
-
-#~ msgid "Proxy to use:"
-#~ msgstr "Proxy:"
-
-#~ msgid ""
-#~ "Call or\n"
-#~ "answer"
-#~ msgstr ""
-#~ "Volat nebo\n"
-#~ "přijmout"
-
-#~ msgid ""
-#~ "Hangup\n"
-#~ "or refuse"
-#~ msgstr ""
-#~ "Zavěsit nebo\n"
-#~ "odmítnout"
-
-#~ msgid "Or chat !"
-#~ msgstr "Nebo poslat zprávu!"
-
-#~ msgid "Show more..."
-#~ msgstr "Zobrazit více…"
-
-#~ msgid "Playback level:"
-#~ msgstr "Úroveň přehrávání:"
-
-#~ msgid "Recording level:"
-#~ msgstr "Úroveň nahrávání:"
-
-#~ msgid "Ring level:"
-#~ msgstr "Úroveň vyzvánění:"
-
-#~ msgid "Controls"
-#~ msgstr "Ovládání"
-
-#~ msgid "Reachable"
-#~ msgstr "Dosažitelný"
-
-#~ msgid "Busy, I'll be back in "
-#~ msgstr "Mám práci, jsem zpět za "
-
-#~ msgid "The other party will be informed that you'll be back in X minutes"
-#~ msgstr "Druhá strana bude informována, že se vrátíte za X minut"
-
-#~ msgid "mn"
-#~ msgstr "min"
-
-#~ msgid "Moved temporarily"
-#~ msgstr "Dočasně mimo"
-
-#~ msgid "Alternative service"
-#~ msgstr "Alternativní služba"
-
-#~ msgid "URL:"
-#~ msgstr "URL:"
-
-#~ msgid "Presence"
-#~ msgstr "Přítomnost"
-
-#~ msgid "Press digits to send DTMFs."
-#~ msgstr "Zadejte čísla pro zaslání DTMF."
-
-#~ msgid ""
-#~ "  3\n"
-#~ "def"
-#~ msgstr ""
-#~ "  3\n"
-#~ "def"
-
-#~ msgid ""
-#~ "  2\n"
-#~ "abc"
-#~ msgstr ""
-#~ "  2\n"
-#~ "abc"
-
-#~ msgid ""
-#~ "  4\n"
-#~ "ghi"
-#~ msgstr ""
-#~ "  4\n"
-#~ "ghi"
-
-#~ msgid ""
-#~ " 5\n"
-#~ "jkl"
-#~ msgstr ""
-#~ " 5\n"
-#~ "jkl"
-
-#~ msgid ""
-#~ "  6\n"
-#~ "mno"
-#~ msgstr ""
-#~ "  6\n"
-#~ "mno"
-
-#~ msgid ""
-#~ "   7\n"
-#~ "pqrs"
-#~ msgstr ""
-#~ "   7\n"
-#~ "pqrs"
-
-#~ msgid ""
-#~ "  8\n"
-#~ "tuv"
-#~ msgstr ""
-#~ "  8\n"
-#~ "tuv"
-
-#~ msgid ""
-#~ "   9\n"
-#~ "wxyz"
-#~ msgstr ""
-#~ "   9\n"
-#~ "wxyz"
-
-#~ msgid "DTMF"
-#~ msgstr "DTMF"
-
-#~ msgid "My online friends"
-#~ msgstr "Přátelé online"
-
-#~ msgid ""
-#~ "C: 2001\n"
-#~ "Made in Old Europe"
-#~ msgstr ""
-#~ "© 2001\n"
-#~ "Vyrobeno ve Staré Dobré Evropě"
-
-#~ msgid ""
-#~ "Linphone is a web-phone.\n"
-#~ "It is compatible with SIP and RTP protocols."
-#~ msgstr ""
-#~ "Linphone je program pro IP telefonii.\n"
-#~ "Je kompatibilní s protokoly SIP a RTP."
-
-#~ msgid "http://www.linphone.org"
-#~ msgstr "http://www.linphone.org/"
-
-#~ msgid "Use IPv6 network (if available)"
-#~ msgstr "Použít IPv6 síť (je-li dostupná)"
-
-#~ msgid ""
-#~ "Toggle this if you are on an ipv6 network and you wish linphone to use it."
-#~ msgstr ""
-#~ "Jestliže jste v síti podporující IPv6 protokol a chcete-li, aby jej "
-#~ "linphone používal, zapněte tuto volbu."
-
-#~ msgid "Global"
-#~ msgstr "Obecné"
-
-#~ msgid ""
-#~ "These options is only for users in a private network, behind a gateway. "
-#~ "If you are not in this situation, then leave this empty."
-#~ msgstr ""
-#~ "Tato volba je určena pouze pro uživatele v intranetu za firewallem. Pokud "
-#~ "to není váš případ, nevyplňujte."
-
-#~ msgid "No firewall"
-#~ msgstr "Bez firewallu"
-
-#~ msgid "Use this STUN server to guess firewall address :"
-#~ msgstr "Pro odhad veřejné adresy použít tento STUN server:"
-
-#~ msgid "Specify firewall address manually:"
-#~ msgstr "Veřejná adresa firewallu:"
-
-#~ msgid "NAT traversal options (experimental)"
-#~ msgstr "Volby průchodu NATem (experimentální)"
-
-#~ msgid "Number of buffered miliseconds (jitter compensation):"
-#~ msgstr "Velikosti vyrovnávací fronty v milisekundách (potlačení rozptylu):"
-
-#~ msgid "RTP port used for audio:"
-#~ msgstr "RTP port pro zvuk:"
-
-#~ msgid "RTP properties"
-#~ msgstr "RTP vlastnosti"
-
-#~ msgid "Use SIP INFO message instead of RTP rfc2833 for DTMF transmitting"
-#~ msgstr "Místo RTP rfc2833 použít pro DTMF přenos SIP INFO zprávu"
-
-#~ msgid "RTP-RFC2833 is the recommended way."
-#~ msgstr "Doporučeno je RTP-RFC2833."
-
-#~ msgid "Other"
-#~ msgstr "Ostatní"
-
-#~ msgid "micro"
-#~ msgstr "mikrofon"
-
-#~ msgid "Recording source:"
-#~ msgstr "Zdroj nahrávání:"
-
-#~ msgid "Enable echo-canceler (cancels the echo heard by the remote party)"
-#~ msgstr "Potlačit ozvěnu (projeví se na druhém konci)"
-
-#~ msgid "Choose file"
-#~ msgstr "Vyberte soubor"
-
-#~ msgid "Listen"
-#~ msgstr "Test"
-
-#~ msgid "Sound properties"
-#~ msgstr "Vlastnosti zvuku"
-
-#~ msgid "Run sip user agent on port:"
-#~ msgstr "Spustit uživatelského agenta SIP na portu:"
-
-#~ msgid "It is strongly recommended to use port 5060."
-#~ msgstr "Je doporučeno používat port 5060."
-
-#~ msgid "SIP port"
-#~ msgstr "SIP port"
-
-#~ msgid "@"
-#~ msgstr "@"
-
-#~ msgid "Identity"
-#~ msgstr "Identita"
-
-#~ msgid "Add proxy/registrar"
-#~ msgstr "Přidat proxy/registraci"
-
-#~ msgid "Remote services"
-#~ msgstr "Vzdálené služby"
-
-#~ msgid "Clear all stored authentication information (username,password...)"
-#~ msgstr "Vyprázdnit všechny ověřovací informace (uživatelské jméno, heslo…)"
-
-#~ msgid "Authentication information"
-#~ msgstr "Ověřovací informace"
-
-#~ msgid "SIP"
-#~ msgstr "SIP"
-
-#~ msgid "List of audio codecs, in order of preference:"
-#~ msgstr "Seznam audio kodeků podle preference:"
-
-#~ msgid "Video Codecs"
-#~ msgstr "Kodeky obrazu"
-
-#~ msgid ""
-#~ "Note: Codecs in red are not usable regarding to your connection type to "
-#~ "the internet."
-#~ msgstr ""
-#~ "Poznámka: Kodeky označené červeně nelze u vašeho typu připojení použít."
-
-#~ msgid "No information availlable"
-#~ msgstr "Nejsou dostupné žádné informace"
-
-#~ msgid "Codec information"
-#~ msgstr "Informace o kodeku"
-
-#~ msgid "Address Book"
-#~ msgstr "Adresář"
-
-#~ msgid "Select"
-#~ msgstr "Vybrat"
-
-#~ msgid ""
-#~ "User is not reachable at the moment but he invites you to contact him "
-#~ "using the following alternate ressource:"
-#~ msgstr ""
-#~ "Uživatel je momentálně nedostupný, ale navrhuje tyto alternativní formy "
-#~ "kontaktu:"
-
-#~ msgid "None."
-#~ msgstr "Žádné."
-
-#~ msgid "Proxy/Registrar configuration box"
-#~ msgstr "Konfigurace proxy a registrace"
-
-#~ msgid "Send registration:"
-#~ msgstr "Odeslat registraci:"
-
-#~ msgid "Name:"
-#~ msgstr "Jméno:"
-
-#~ msgid "Subscribe policy:"
-#~ msgstr "Pravidlo přihlášení:"
-
-#~ msgid "Send subscription (see person's online status)"
-#~ msgstr "Odeslat přihlášení (podle online stavu osoby)"
-
-#~ msgid "New incoming subscription"
-#~ msgstr "Nové příchozí přihlášení"
-
-#~ msgid "You have received a new subscription..."
-#~ msgstr "Obdrželi jste nové přihlášení…"
-
-#~ msgid "Refuse"
-#~ msgstr "Odmítnout"
-
-#~ msgid "Authentication required for realm"
-#~ msgstr "pro doménu je vyžadováno ověření"
-
-#~ msgid "userid:"
-#~ msgstr "ID uživatele:"
-
-#~ msgid "realm:"
-#~ msgstr "doména:"
-
-#~ msgid "Chat Room"
-#~ msgstr "Diskuzní skupina"
-
-#~ msgid "Text:"
-#~ msgstr "Text:"
-
-#~ msgid "The caller asks for resource reservation. Do you agree ?"
-#~ msgstr "Volající žádá o rezervaci zdrojů. Souhlasíte?"
-
-#~ msgid ""
-#~ "The caller doesn't use resource reservation. \t\t\t\t\tDo you wish to "
-#~ "continue anyway ?"
-#~ msgstr ""
-#~ "Volající nepoužívá rezervaci zdrojů. \t\t\t\t\tChcete přesto pokračovat?"
-
-#~ msgid "linphone - receiving call from %s"
-#~ msgstr "linphone – příchozí hovor z %s"
-
-#~ msgid ""
-#~ "You have received a subscription from %s.This means that this person "
-#~ "wishes to be notified of your presence information (online, busy, "
-#~ "away...).\n"
-#~ "Do you agree ?"
-#~ msgstr ""
-#~ "Obdrželi jste přihlášení od %s. Znamená to, že si tato osoba přeje být "
-#~ "informována o vašem stavu přítomnosti (online, zaneprázdněn, pryč…).\n"
-#~ "Souhlasíte?"
-
-#~ msgid "Authentication required for realm %s"
-#~ msgstr "Pro doménu %s je vyžadováno ověření"
-
-#~ msgid "None"
-#~ msgstr "Žádná"
-
-#~ msgid "Wait"
-#~ msgstr "Zdržet"
-
-#~ msgid "Deny"
-#~ msgstr "Odmítnout"
-
-#~ msgid "Bad sip address: a sip address looks like sip:user@domain"
-#~ msgstr "Špatně zadaná SIP adresa: SIP adresa má tvar sip:uživatel@doména"
-
-#~ msgid "Stun lookup done..."
-#~ msgstr "STUN vyhledávání dokončeno…"
-
-#~ msgid "enter sip uri here"
-#~ msgstr "Sem zadejte SIP URI"
-
-#~ msgid "User manual"
-#~ msgstr "Uživatelská příručka"
-
-#~ msgid "Ring sound selection"
-#~ msgstr "Výběr zvonění"
-
-#~ msgid "Communication ended."
-#~ msgstr "Komunikace ukončena."
-
-#~ msgid "Call cancelled."
-#~ msgstr "Volání přerušeno."
-
-#~ msgid "Firewall 's external ip address (in dot notations):"
-#~ msgstr "Vnější IP adresa firewallu (v tečkové notaci):"
-
-#~ msgid "Index"
-#~ msgstr "Rejstřík"
-
-#~ msgid "28k modem"
-#~ msgstr "28k modem"
-
-#~ msgid "56k modem"
-#~ msgstr "56k modem"
-
-#~ msgid "64k modem (numeris)"
-#~ msgstr "64k modem"
-
-#~ msgid "ADSL or Cable modem"
-#~ msgstr "ADSL nebo kabelový modem"
-
-#~ msgid "Ethernet or equivalent"
-#~ msgstr "Ethernet nebo podobný"
-
-#~ msgid "Connection type:"
-#~ msgstr "Typ připojení:"
-
-#~ msgid "Server address"
-#~ msgstr "Adresa serveru:"
-
-#~ msgid ""
-#~ "Linphone could not open audio device %s. Check if your sound card is "
-#~ "fully configured and working."
-#~ msgstr ""
-#~ "Linphone nemůže otevřít zvukové zařízení %s. Překontrolujte nastavení a "
-#~ "funkčnost zvukové karty."
-
-#~ msgid "Type here the sip address of the person you want to call."
-#~ msgstr "Zde zadejte SIP adresu osoby, které si přejete volat."
-
-#~ msgid ""
-#~ "Release or\n"
-#~ "Refuse"
-#~ msgstr ""
-#~ "Přijmout nebo\n"
-#~ "odmítnout"
-
-#~ msgid "%s. Retry after %i minute(s)."
-#~ msgstr "%s. Zkusit znovu po %i min."
diff --git a/linphone/po/de.po b/linphone/po/de.po
deleted file mode 100644 (file)
index eac8409..0000000
+++ /dev/null
@@ -1,2192 +0,0 @@
-# SIP Telephony Application.
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-# Simon Morlat <linphone@free.fr>, 2001.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: linphone 0.7.1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-10-16 15:24+0200\n"
-"PO-Revision-Date: 2003-05-23 17:51-0400\n"
-"Last-Translator: Jean-Jacques Sarton <jj.sarton@t-online.de>, Ursula Herles-"
-"Hartz <UAHartz@t-online.de>\n"
-"Language-Team: Deutsch <de@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8-bit\n"
-
-#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
-#: ../gtk-glade/support.c:102
-#, c-format
-msgid "Couldn't find pixmap file: %s"
-msgstr "Pixmapdatei %s nicht gefunden"
-
-#: ../gtk-glade/chat.c:27
-#, c-format
-msgid "Chat with %s"
-msgstr "Chat mit %s"
-
-#: ../gtk-glade/main.c:90
-msgid "log to stdout some debug information while running."
-msgstr ""
-
-#: ../gtk-glade/main.c:97
-msgid "Start only in the system tray, do not show the main interface."
-msgstr ""
-
-#: ../gtk-glade/main.c:104
-msgid "address to call right now"
-msgstr ""
-
-#: ../gtk-glade/main.c:111
-msgid "if set automatically answer incoming calls"
-msgstr ""
-
-#: ../gtk-glade/main.c:119
-msgid ""
-"Specifiy a working directory (should be the base of the installation, eg: c:"
-"\\Program Files\\Linphone)"
-msgstr ""
-
-#: ../gtk-glade/main.c:675
-#, fuzzy, c-format
-msgid "Incoming call from %s"
-msgstr "Eingehendes Gespr�h"
-
-#: ../gtk-glade/main.c:707
-#, c-format
-msgid ""
-"%s would like to add you to his contact list.\n"
-"Would you allow him to see your presence status or add him to your contact "
-"list ?\n"
-"If you answer no, this person will be temporarily blacklisted."
-msgstr ""
-
-#: ../gtk-glade/main.c:777
-#, c-format
-msgid ""
-"Please enter your password for username <i>%s</i>\n"
-" at domain <i>%s</i>:"
-msgstr ""
-
-#: ../gtk-glade/main.c:871
-msgid "Website link"
-msgstr ""
-
-#: ../gtk-glade/main.c:907
-msgid "Linphone - a video internet phone"
-msgstr ""
-
-#: ../gtk-glade/main.c:926
-#, c-format
-msgid "%s (Default)"
-msgstr ""
-
-#: ../gtk-glade/main.c:1168
-msgid "A free SIP video-phone"
-msgstr "Ein freies SIP Video-Fone"
-
-#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
-#: ../gtk-glade/contact.glade.h:3
-msgid "Name"
-msgstr "Name"
-
-#: ../gtk-glade/friendlist.c:212
-msgid "Presence status"
-msgstr "Anwesenheitsstatus"
-
-#: ../gtk-glade/friendlist.c:243
-#, c-format
-msgid "Search in %s directory"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:432
-msgid "Invalid sip contact !"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:474
-#, fuzzy, c-format
-msgid "Call %s"
-msgstr "Gesprächsverlauf"
-
-#: ../gtk-glade/friendlist.c:475
-#, c-format
-msgid "Send text to %s"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:476
-#, fuzzy, c-format
-msgid "Edit contact '%s'"
-msgstr "Bearbeite Kontaktinformationen"
-
-#: ../gtk-glade/friendlist.c:477
-#, c-format
-msgid "Delete contact '%s'"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:519
-#, c-format
-msgid "Add new contact from %s directory"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:251
-msgid "Rate (Hz)"
-msgstr "Rate (Hz)"
-
-#: ../gtk-glade/propertybox.c:257
-msgid "Status"
-msgstr "Status"
-
-#: ../gtk-glade/propertybox.c:263
-msgid "Min bitrate (kbit/s)"
-msgstr "Min Bitrate (kbit/s)"
-
-#: ../gtk-glade/propertybox.c:269
-msgid "Parameters"
-msgstr "Parameter"
-
-#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
-msgid "Enabled"
-msgstr "Freigegeben"
-
-#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
-msgid "Disabled"
-msgstr "Gesperrt"
-
-#: ../gtk-glade/propertybox.c:480
-msgid "Account"
-msgstr "Konto"
-
-#: ../gtk-glade/propertybox.c:620
-msgid "English"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:621
-msgid "French"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:622
-msgid "Swedish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:623
-msgid "Italian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:624
-msgid "Spanish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:625
-msgid "Brazilian Portugese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:626
-msgid "Polish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:627
-msgid "German"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:628
-msgid "Russian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:629
-msgid "Japanese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:630
-msgid "Dutch"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:631
-msgid "Hungarian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:632
-msgid "Czech"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:633
-msgid "Chinese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:690
-msgid ""
-"You need to restart linphone for the new language selection to take effect."
-msgstr ""
-
-#: ../gtk-glade/update.c:80
-#, c-format
-msgid ""
-"A more recent version is availalble from %s.\n"
-"Would you like to open a browser to download it ?"
-msgstr ""
-
-#: ../gtk-glade/update.c:91
-msgid "You are running the lastest version."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:66
-msgid "Firstname, Lastname"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:73
-#, fuzzy
-msgid "SIP address"
-msgstr "Adresse"
-
-#: ../gtk-glade/buddylookup.c:121
-msgid "Error communicating with server."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:125
-#, fuzzy
-msgid "Connecting..."
-msgstr "Verbindung"
-
-#: ../gtk-glade/buddylookup.c:129
-#, fuzzy
-msgid "Connected"
-msgstr "Verbunden."
-
-#: ../gtk-glade/buddylookup.c:133
-msgid "Receiving data..."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:141
-#, c-format
-msgid "Found %i contact"
-msgid_plural "Found %i contacts"
-msgstr[0] ""
-msgstr[1] ""
-
-#: ../gtk-glade/setupwizard.c:25
-msgid ""
-"Welcome !\n"
-"This assistant will help you to use a SIP account for your calls."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:34
-msgid "Create an account by choosing a username"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:35
-msgid "I have already an account and just want to use it"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:53
-msgid "Please choose a username:"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:54
-#, fuzzy
-msgid "Username:"
-msgstr "Benutzername:"
-
-#: ../gtk-glade/setupwizard.c:92
-#, c-format
-msgid "Checking if '%s' is available..."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
-msgid "Please wait..."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:101
-msgid "Sorry this username already exists. Please try a new one."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
-msgid "Ok !"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
-msgid "Communication problem, please try again later."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:134
-msgid "Thank you. Your account is now configured and ready for use."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:228
-msgid "Welcome to the account setup assistant"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:232
-msgid "Account setup assistant"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:236
-#, fuzzy
-msgid "Choosing a username"
-msgstr "Benutzername:"
-
-#: ../gtk-glade/setupwizard.c:240
-msgid "Verifying"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:244
-#, fuzzy
-msgid "Confirmation"
-msgstr "Information"
-
-#: ../gtk-glade/setupwizard.c:249
-msgid "Creating your account"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:253
-msgid "Now ready !"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:98
-#, fuzzy
-msgid "<b>Calling...</b>"
-msgstr "Kontaktliste"
-
-#: ../gtk-glade/incall_view.c:122
-#, fuzzy
-msgid "<b>In call with</b>"
-msgstr "Kontaktliste"
-
-#: ../gtk-glade/incall_view.c:124
-msgid "00::00::00"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:140
-#, c-format
-msgid "%02i::%02i::%02i"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:158
-#, fuzzy
-msgid "<b>Call ended.</b>"
-msgstr "Anruf beendet"
-
-#: ../gtk-glade/incall_view.c:176
-#, fuzzy
-msgid "Unmute"
-msgstr "Unbegrenzt"
-
-#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
-msgid "Mute"
-msgstr ""
-
-#: ../gtk-glade/loginframe.c:82
-#, c-format
-msgid "Please enter login information for %s"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:1
-msgid "#"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:2
-msgid "*"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:3
-msgid "0"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:4
-msgid "1"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:5
-msgid "2"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:6
-msgid "3"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:7
-msgid "4"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:8
-msgid "5"
-msgstr "5"
-
-#: ../gtk-glade/main.glade.h:9
-msgid "6"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:10
-msgid "7"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:11
-msgid "8"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:12
-msgid "9"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:13
-#, fuzzy
-msgid "<b>Contact list</b>"
-msgstr "Kontaktliste"
-
-#: ../gtk-glade/main.glade.h:14
-#, fuzzy
-msgid "<b>Terminate call</b>"
-msgstr "Kontaktliste"
-
-#: ../gtk-glade/main.glade.h:15
-#, fuzzy
-msgid "<b>Welcome !</b>"
-msgstr "Kontaktliste"
-
-#: ../gtk-glade/main.glade.h:16
-msgid "A"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:17
-msgid ""
-"ADSL\n"
-"Fiber Channel"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:19
-msgid ""
-"All users\n"
-"Online users"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:21
-msgid "Assistant"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:22
-#, fuzzy
-msgid "Audio & Video"
-msgstr "Eigenschaften des Audiocodecs"
-
-#: ../gtk-glade/main.glade.h:23
-#, fuzzy
-msgid "Audio only"
-msgstr "Audio"
-
-#: ../gtk-glade/main.glade.h:24
-#, fuzzy
-msgid "Automatically log me in"
-msgstr "Automatisch einen gültigen Hostnamen erraten"
-
-#: ../gtk-glade/main.glade.h:25
-msgid "B"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
-msgid "C"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:27
-msgid "Check for updates"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:28
-msgid "D"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:29
-msgid "Default"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:30
-msgid "Digits"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:31
-#, fuzzy
-msgid "Duration"
-msgstr "Information"
-
-#: ../gtk-glade/main.glade.h:32
-#, fuzzy
-msgid "Duration:"
-msgstr "Information"
-
-#: ../gtk-glade/main.glade.h:33
-#, fuzzy
-msgid "Enable self-view"
-msgstr "Video einschalten"
-
-#: ../gtk-glade/main.glade.h:34
-msgid "Enter username, phone number, or full sip address"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:35
-#, fuzzy
-msgid "In call"
-msgstr "Eingehendes Gespr�h"
-
-#: ../gtk-glade/main.glade.h:36
-msgid "Internet connection:"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:37
-#, fuzzy
-msgid "Login information"
-msgstr "Kontaktinformationen"
-
-#: ../gtk-glade/main.glade.h:38
-msgid "Lookup:"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:39
-msgid "Main view"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:41
-#, fuzzy
-msgid "My current identity:"
-msgstr "SIP Identität"
-
-#: ../gtk-glade/main.glade.h:42
-#, fuzzy
-msgid "Password"
-msgstr "Passwort"
-
-#: ../gtk-glade/main.glade.h:43
-#, fuzzy
-msgid "SIP address or phone number:"
-msgstr "Sip-Adresse oder Telefonnummer eingeben."
-
-#: ../gtk-glade/main.glade.h:44
-#, fuzzy
-msgid "Show current call"
-msgstr "Konnte kein Anruf vornehmen"
-
-#: ../gtk-glade/main.glade.h:45
-msgid "Start call"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:46
-msgid "Terminate call"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:47
-#, fuzzy
-msgid "Username"
-msgstr "Benutzername:"
-
-#: ../gtk-glade/main.glade.h:48
-#, fuzzy
-msgid "_Linphone"
-msgstr "Linphone"
-
-#: ../gtk-glade/main.glade.h:49
-#, fuzzy
-msgid "_Modes"
-msgstr "Codecs"
-
-#: ../gtk-glade/main.glade.h:50
-#, fuzzy
-msgid "gtk-connect"
-msgstr "Verbunden."
-
-#: ../gtk-glade/main.glade.h:51
-msgid "gtk-find"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:52
-msgid "in"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:53
-#, fuzzy
-msgid "label"
-msgstr "label37"
-
-#: ../gtk-glade/about.glade.h:1
-#, fuzzy
-msgid "About linphone"
-msgstr "linphone"
-
-#: ../gtk-glade/about.glade.h:2
-msgid "An internet video phone using the standart SIP (rfc3261) protocol."
-msgstr ""
-
-#: ../gtk-glade/about.glade.h:3
-msgid "Created by Simon Morlat\n"
-msgstr ""
-
-#: ../gtk-glade/about.glade.h:5
-msgid ""
-"fr: Simon Morlat\n"
-"en: Simon Morlat and Delphine Perreau\n"
-"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
-"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
-"sv: Daniel Nylander <po@danielnylander.se>\n"
-"es: Jesus Benitez <gnelson at inMail dot sk>\n"
-"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
-"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
-"pl: Robert Nasiadek <darkone@darkone.pl>\n"
-"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
-"hu: anonymous\n"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:1
-#, fuzzy
-msgid "<b>Contact information</b>"
-msgstr "Kontaktinformationen"
-
-#: ../gtk-glade/contact.glade.h:2
-msgid "Allow this contact to see my presence status"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:4
-#, fuzzy
-msgid "SIP Address"
-msgstr "Adresse"
-
-#: ../gtk-glade/contact.glade.h:5
-msgid "Show this contact presence status"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
-#: ../gtk-glade/sip_account.glade.h:9
-msgid "gtk-cancel"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
-#: ../gtk-glade/sip_account.glade.h:10
-msgid "gtk-ok"
-msgstr ""
-
-#: ../gtk-glade/log.glade.h:1
-#, fuzzy
-msgid "Linphone debug window"
-msgstr "Linphone Ende"
-
-#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
-#: ../gtk-glade/chatroom.glade.h:2
-msgid "gtk-close"
-msgstr ""
-
-#: ../gtk-glade/password.glade.h:1
-#, fuzzy
-msgid "Linphone - Authentication required"
-msgstr "Authentifikation erfordert"
-
-#: ../gtk-glade/password.glade.h:2
-#, fuzzy
-msgid "Password:"
-msgstr "Passwort"
-
-#: ../gtk-glade/password.glade.h:3
-msgid "Please enter the domain password"
-msgstr ""
-
-#: ../gtk-glade/password.glade.h:4
-msgid "UserID"
-msgstr ""
-
-#: ../gtk-glade/call_logs.glade.h:1
-#, fuzzy
-msgid "Call history"
-msgstr "Linphone - Gesprächsverlauf"
-
-#: ../gtk-glade/sip_account.glade.h:1
-msgid "Configure a SIP account"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:2
-msgid "Linphone - Configure a SIP account"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:3
-#, fuzzy
-msgid "Publish presence information"
-msgstr "Anwesenheit Information publzieren"
-
-#: ../gtk-glade/sip_account.glade.h:4
-msgid "Register at startup"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:5
-#, fuzzy
-msgid "Registration duration (sec):"
-msgstr "Registrierungsdauer."
-
-#: ../gtk-glade/sip_account.glade.h:6
-msgid "Route (optional):"
-msgstr "Route (optional):"
-
-#: ../gtk-glade/sip_account.glade.h:7
-#, fuzzy
-msgid "SIP Proxy address:"
-msgstr "SIP Proxy:"
-
-#: ../gtk-glade/sip_account.glade.h:8
-#, fuzzy
-msgid "Your SIP identity:"
-msgstr "SIP Identität"
-
-#: ../gtk-glade/sip_account.glade.h:11
-msgid "sip:"
-msgstr "sip:"
-
-#: ../gtk-glade/chatroom.glade.h:1
-#, fuzzy
-msgid "Send"
-msgstr "Ton"
-
-#: ../gtk-glade/incoming_call.glade.h:1
-msgid "Accept"
-msgstr "Annehmen"
-
-#: ../gtk-glade/incoming_call.glade.h:2
-#, fuzzy
-msgid "Decline"
-msgstr "Leitung"
-
-#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
-msgid "Incoming call"
-msgstr "Eingehendes Gespr�h"
-
-#: ../gtk-glade/incoming_call.glade.h:4
-#, fuzzy
-msgid "Incoming call from"
-msgstr "Eingehendes Gespr�h"
-
-#: ../gtk-glade/incoming_call.glade.h:5
-#, fuzzy
-msgid "Linphone - Incoming call"
-msgstr "Eingehendes Gespr�h"
-
-#: ../gtk-glade/parameters.glade.h:1
-msgid "0 stands for \"unlimited\""
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:2
-#, fuzzy
-msgid "<b>Audio</b>"
-msgstr "Kontaktliste"
-
-#: ../gtk-glade/parameters.glade.h:3
-msgid "<b>Bandwidth control</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:4
-#, fuzzy
-msgid "<b>Codecs</b>"
-msgstr "Kontaktliste"
-
-#: ../gtk-glade/parameters.glade.h:5
-msgid "<b>Default identity</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:6
-msgid "<b>Language</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:7
-msgid "<b>NAT and Firewall</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:8
-#, fuzzy
-msgid "<b>Ports</b>"
-msgstr "Kontaktliste"
-
-#: ../gtk-glade/parameters.glade.h:9
-msgid "<b>Privacy</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:10
-#, fuzzy
-msgid "<b>Proxy accounts</b>"
-msgstr "Kontaktliste"
-
-#: ../gtk-glade/parameters.glade.h:11
-#, fuzzy
-msgid "<b>Transport</b>"
-msgstr "Kontaktliste"
-
-#: ../gtk-glade/parameters.glade.h:12
-msgid "<b>Video</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:13
-msgid "ALSA special device (optional):"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:14
-msgid "Add"
-msgstr "Hinzufgen"
-
-#: ../gtk-glade/parameters.glade.h:15
-msgid "Audio RTP/UDP:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:16
-#, fuzzy
-msgid ""
-"Audio codecs\n"
-"Video codecs"
-msgstr "Audio und Video Codecs"
-
-#: ../gtk-glade/parameters.glade.h:18
-msgid "Behind NAT / Firewall (specify gateway IP below)"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:19
-msgid "Behind NAT / Firewall (use STUN to resolve)"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:21
-msgid "CIF"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:22
-#, fuzzy
-msgid "Capture device:"
-msgstr "Audio Aufnahmegerät:"
-
-#: ../gtk-glade/parameters.glade.h:23
-#, fuzzy
-msgid "Codecs"
-msgstr "Codecs"
-
-#: ../gtk-glade/parameters.glade.h:24
-msgid "Direct connection to the Internet"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:25
-msgid "Disable"
-msgstr "Sperren"
-
-#: ../gtk-glade/parameters.glade.h:26
-#, fuzzy
-msgid "Done"
-msgstr "Gegangen"
-
-#: ../gtk-glade/parameters.glade.h:27
-#, fuzzy
-msgid "Download speed limit in Kbit/sec:"
-msgstr "Download-Bandbreite (kbit/sec):"
-
-#: ../gtk-glade/parameters.glade.h:28
-msgid "Edit"
-msgstr "Bearbeiten"
-
-#: ../gtk-glade/parameters.glade.h:29
-msgid "Enable"
-msgstr "Freigeben"
-
-#: ../gtk-glade/parameters.glade.h:30
-msgid "Enable echo cancellation"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:31
-msgid "Erase all passwords"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:32
-msgid "Manage SIP Accounts"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:33
-msgid "Multimedia settings"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:34
-#, fuzzy
-msgid "Network settings"
-msgstr "Netzwerk"
-
-#: ../gtk-glade/parameters.glade.h:35
-#, fuzzy
-msgid "Playback device:"
-msgstr "Ton Wiedergabegerät:"
-
-#: ../gtk-glade/parameters.glade.h:36
-msgid "Prefered video resolution:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:37
-#, fuzzy
-msgid "Public IP address:"
-msgstr "Sip-Adresse:"
-
-#: ../gtk-glade/parameters.glade.h:38
-msgid ""
-"Register to FONICS\n"
-"virtual network !"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:40
-msgid "Remove"
-msgstr "Entfernen"
-
-#: ../gtk-glade/parameters.glade.h:41
-#, fuzzy
-msgid "Ring device:"
-msgstr "Klingel Wiedergabegerät:"
-
-#: ../gtk-glade/parameters.glade.h:42
-#, fuzzy
-msgid "Ring sound:"
-msgstr "Klingelton:"
-
-#: ../gtk-glade/parameters.glade.h:43
-msgid "SIP (UDP):"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:44
-msgid "Send DTMFs as SIP info"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:45
-msgid "Set Maximum Transmission Unit:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:46
-msgid "Settings"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:47
-#, fuzzy
-msgid "Stun server:"
-msgstr "Umleitungs-Server"
-
-#: ../gtk-glade/parameters.glade.h:48
-msgid "This section defines your SIP address when not using a SIP account"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:49
-#, fuzzy
-msgid "Upload speed limit in Kbit/sec:"
-msgstr "Upload-Bandbreite (kbit/sec):"
-
-#: ../gtk-glade/parameters.glade.h:50
-msgid "Use IPv6 instead of IPv4"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:51
-#, fuzzy
-msgid "User interface"
-msgstr "Benutzername:"
-
-#: ../gtk-glade/parameters.glade.h:52
-msgid "Video RTP/UDP:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:53
-#, fuzzy
-msgid "Video input device:"
-msgstr "Audiogerät"
-
-#: ../gtk-glade/parameters.glade.h:54
-msgid "Your display name (eg: John Doe):"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:55
-#, fuzzy
-msgid "Your resulting SIP address:"
-msgstr "Ihre Sip-Adresse:"
-
-#: ../gtk-glade/parameters.glade.h:56
-#, fuzzy
-msgid "Your username:"
-msgstr "Benutzername:"
-
-#: ../gtk-glade/parameters.glade.h:57
-msgid "a sound card\n"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:59
-msgid "default camera"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:60
-msgid "default soundcard"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:61
-msgid "default soundcard\n"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:63
-msgid "gtk-go-down"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:64
-msgid "gtk-go-up"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:65
-msgid "gtk-media-play"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:1
-msgid "<b>Search somebody</b>"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:2
-msgid "Add to my list"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:3
-msgid "Search contacts in directory"
-msgstr ""
-
-#: ../gtk-glade/waiting.glade.h:1
-msgid "Linphone"
-msgstr "Linphone"
-
-#: ../gtk-glade/waiting.glade.h:2
-msgid "Please wait"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:195
-#, fuzzy, c-format
-msgid "You have missed %i call."
-msgid_plural "You have missed %i calls."
-msgstr[0] "Sie haben %i Anruf(e) in Abwesenheit."
-msgstr[1] "Sie haben %i Anruf(e) in Abwesenheit."
-
-#: ../coreapi/linphonecore.c:223
-msgid "aborted"
-msgstr "abgebrochen"
-
-#: ../coreapi/linphonecore.c:226
-msgid "completed"
-msgstr "beendet"
-
-#: ../coreapi/linphonecore.c:229
-msgid "missed"
-msgstr "verpasst"
-
-#: ../coreapi/linphonecore.c:234
-#, c-format
-msgid ""
-"%s at %s\n"
-"From: %s\n"
-"To: %s\n"
-"Status: %s\n"
-"Duration: %i mn %i sec\n"
-msgstr ""
-"%s am %sVon: %s\n"
-"An: %s\n"
-"Status: %s\n"
-"Dauer: %i mn %i sec\n"
-
-#: ../coreapi/linphonecore.c:235
-msgid "Outgoing call"
-msgstr "Abgehendes Gespräch"
-
-#: ../coreapi/linphonecore.c:445
-msgid ""
-"Your machine appears to be connected to an IPv6 network. By default linphone "
-"always uses IPv4. Please update your configuration if you want to use IPv6"
-msgstr ""
-"Ihr Rechner scheint an einen IPv6 Netz angeschlossen zu sein. "
-"Linphoneverwendet normalerweise IPv4. Bitte Konfiguration anpassen wenn sie "
-"IPv6 verwenden wollen"
-
-#: ../coreapi/linphonecore.c:739
-msgid "Ready"
-msgstr "Bereit"
-
-#: ../coreapi/linphonecore.c:1014
-msgid "Remote end seems to have disconnected, the call is going to be closed."
-msgstr ""
-
-#: ../coreapi/linphonecore.c:1172
-msgid "Looking for telephone number destination..."
-msgstr "Suche Telefonnummernziel.."
-
-#: ../coreapi/linphonecore.c:1174
-msgid "Could not resolve this number."
-msgstr "Konnte dies Nummer nicht auflösen."
-
-#: ../coreapi/linphonecore.c:1239
-msgid ""
-"Could not parse given sip address. A sip url usually looks like sip:"
-"user@domain"
-msgstr ""
-"Sip-Adresse kann nicht bestimmt werden. Eine Sip-Adresse hat folgenden "
-"Aufbau <sip:anwendername@domainname>"
-
-#: ../coreapi/linphonecore.c:1340
-msgid "Sorry, having multiple simultaneous calls is not supported yet !"
-msgstr "Mehrfachen gleichzeitigen Anrufen nicht unterstützt !"
-
-#: ../coreapi/linphonecore.c:1387
-msgid "Contacting"
-msgstr "Rufe an"
-
-#: ../coreapi/linphonecore.c:1402
-msgid "could not call"
-msgstr "Konnte kein Anruf vornehmen"
-
-#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
-msgid "Connected."
-msgstr "Verbunden."
-
-#: ../coreapi/linphonecore.c:1813
-msgid "Call ended"
-msgstr "Anruf beendet"
-
-#: ../coreapi/linphonecore.c:2175
-msgid "No nat/firewall address supplied !"
-msgstr "Keine Nat/Firewall Adresse vorgegeben !"
-
-#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
-#, c-format
-msgid "Invalid nat address '%s' : %s"
-msgstr "Ungültige NAT Adresse '%s' : '%s'"
-
-#: ../coreapi/misc.c:134
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the pcm oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-"'modprobe snd-pcm-oss' as root to load it."
-msgstr ""
-"Ihre Rechner verwendet anscheinend einen ALSA-Soundtreiber.\n"
-"Dies ist die beste Lösung; allerdings ist die von Linphone benötigte pcm OSS "
-"Emulation\n"
-"nicht vorhanden. Für die Einbindung des Moduls\n"
-"bitte den Befehl 'modprobe snd-pcm-oss' als Anwender-Root verwenden."
-
-#: ../coreapi/misc.c:137
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the mixer oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-" 'modprobe snd-mixer-oss' as root to load it."
-msgstr ""
-"Ihre Rechner verwendet anscheinend einen ALSA-Soundtreiber.\n"
-"Dies ist die beste Lösung; allerdings ist die von Linphone benötigte pcm OSS "
-"Emulation\n"
-"nicht vorhanden. Fr die Einbindung des Moduls\n"
-"bitte den Befehl 'modprobe snd-pcm-oss' als Anwender-Root verwenden."
-
-#: ../coreapi/misc.c:610
-msgid "Stun lookup in progress..."
-msgstr "Stun Ermittlung läuft..."
-
-#: ../coreapi/exevents.c:127
-msgid "Call terminated."
-msgstr "Anruf beendet"
-
-#: ../coreapi/exevents.c:149
-msgid "Could not reach destination."
-msgstr "Konnte Ziel nicht erreichen"
-
-#: ../coreapi/exevents.c:158
-msgid "User is busy."
-msgstr "Besetzt."
-
-#: ../coreapi/exevents.c:159
-msgid "User is temporarily unavailable."
-msgstr "Teilnehmer zur Zeit nicht ansprechbar."
-
-#: ../coreapi/exevents.c:160
-msgid "Request Cancelled."
-msgstr "Anruf annulliert."
-
-#. char *retrymsg=_("%s. Retry after %i minute(s).");
-#: ../coreapi/exevents.c:162
-msgid "User does not want to be disturbed."
-msgstr "Teilnehmer möchte nicht gestört werden."
-
-#: ../coreapi/exevents.c:163
-msgid "Call declined."
-msgstr "Anruf abgewiesen"
-
-#: ../coreapi/exevents.c:191
-msgid "Bad request"
-msgstr "Fehlerhafte Anfrage"
-
-#: ../coreapi/exevents.c:194
-msgid "User cannot be found at given address."
-msgstr "Teilnehmer ist unter der angegebene Adresse nicht erreichbar."
-
-#: ../coreapi/exevents.c:197
-msgid "Remote user cannot support any of proposed codecs."
-msgstr "Die Gegenstelle untersttzt die angebotenen Codecs nicht."
-
-#. time out, call leg is lost
-#: ../coreapi/exevents.c:227
-msgid "Timeout."
-msgstr "Zeitberschreitung."
-
-#: ../coreapi/exevents.c:230
-msgid "Remote host was found but refused connection."
-msgstr "Die Gegenstelle hat die Verbindung abgewiesen."
-
-#: ../coreapi/exevents.c:339
-msgid "is contacting you."
-msgstr "ruft Sie an"
-
-#: ../coreapi/exevents.c:424
-#, c-format
-msgid "Redirected to %s..."
-msgstr "Nach %s umgeleitet..."
-
-#: ../coreapi/exevents.c:440
-msgid ""
-"User is not reachable at the moment but he invites you\n"
-"to contact him using the following alternate resource:"
-msgstr ""
-"Teilnehmer nicht erreichbar. Bitte versuchen Sie es unter nachstehender "
-"Ressource:"
-
-#: ../coreapi/exevents.c:861
-msgid "Early media."
-msgstr ""
-
-#: ../coreapi/exevents.c:972
-#, fuzzy, c-format
-msgid "Registration on %s failed: %s"
-msgstr "Registrierung auf %s schlug fehl (Zeitberschreitung)."
-
-#: ../coreapi/exevents.c:972
-msgid "no response timeout"
-msgstr ""
-
-#: ../coreapi/exevents.c:998
-#, c-format
-msgid "Registration on %s successful."
-msgstr "Registrierung auf %s erfolgreich."
-
-#: ../coreapi/exevents.c:999
-#, fuzzy, c-format
-msgid "Unregistration on %s done."
-msgstr "Registrierung auf %s erfolgreich."
-
-#. people for which we don't have yet an answer should appear as offline
-#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
-msgid "Gone"
-msgstr "Gegangen"
-
-#: ../coreapi/presence.c:129
-msgid "Waiting for Approval"
-msgstr "Warte aud Bestätigung"
-
-#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
-msgid "Online"
-msgstr "Verbunden"
-
-#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
-msgid "Busy"
-msgstr "Besetzt"
-
-#: ../coreapi/presence.c:142
-msgid "Be Right Back"
-msgstr "Bald wieder da"
-
-#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
-msgid "Away"
-msgstr "Abwesend"
-
-#: ../coreapi/presence.c:151
-msgid "On The Phone"
-msgstr "Am Höhrer"
-
-#: ../coreapi/presence.c:156
-msgid "Out To Lunch"
-msgstr "Beim Essen"
-
-#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
-msgid "Closed"
-msgstr ""
-
-#: ../coreapi/friend.c:35
-msgid "Unknown"
-msgstr ""
-
-#: ../coreapi/friend.c:44
-#, fuzzy
-msgid "Be right back"
-msgstr "Bald wieder da"
-
-#: ../coreapi/friend.c:50
-#, fuzzy
-msgid "On the phone"
-msgstr "Am Höhrer"
-
-#: ../coreapi/friend.c:53
-#, fuzzy
-msgid "Out to lunch"
-msgstr "Beim Essen"
-
-#: ../coreapi/friend.c:56
-msgid "Do not disturb"
-msgstr "Nicht stören"
-
-#: ../coreapi/friend.c:59
-#, fuzzy
-msgid "Moved"
-msgstr "Codecs"
-
-#: ../coreapi/friend.c:62
-msgid "Using another messaging service"
-msgstr ""
-
-#: ../coreapi/friend.c:65
-#, fuzzy
-msgid "Offline"
-msgstr "Verbunden"
-
-#: ../coreapi/friend.c:68
-msgid "Pending"
-msgstr ""
-
-#: ../coreapi/friend.c:74
-msgid "Unknown-bug"
-msgstr ""
-
-#: ../coreapi/proxy.c:221
-msgid ""
-"The sip proxy address you entered is invalid, it must start with \"sip:\" "
-"followed by a hostname."
-msgstr ""
-
-#: ../coreapi/proxy.c:227
-msgid ""
-"The sip identity you entered is invalid.\n"
-"It should look like sip:username@proxydomain, such as sip:alice@example.net"
-msgstr ""
-
-#: ../coreapi/proxy.c:634
-#, fuzzy, c-format
-msgid "Could not login as %s"
-msgstr "Pixmapdatei %s nicht gefunden"
-
-#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
-msgid "ITU-G.711 alaw encoder"
-msgstr ""
-
-#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
-msgid "ITU-G.711 alaw decoder"
-msgstr ""
-
-#: ../mediastreamer2/src/alsa.c:923
-msgid "Alsa sound source"
-msgstr ""
-
-#: ../mediastreamer2/src/alsa.c:1027
-msgid "Alsa sound output"
-msgstr ""
-
-#: ../mediastreamer2/src/aqsnd.c:891
-msgid "Sound capture filter for MacOS X Audio Queue Service"
-msgstr ""
-
-#: ../mediastreamer2/src/aqsnd.c:915
-msgid "Sound playback filter for MacOS X Audio Queue Service"
-msgstr ""
-
-#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
-msgid "DTMF generator"
-msgstr ""
-
-#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
-msgid "The GSM full-rate codec"
-msgstr ""
-
-#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
-msgid "The GSM codec"
-msgstr ""
-
-#: ../mediastreamer2/src/macsnd.c:670
-msgid "Sound capture filter for MacOS X Core Audio drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/macsnd.c:684
-msgid "Sound playback filter for MacOS X Core Audio drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
-msgid "A filter to make conferencing"
-msgstr ""
-
-#: ../mediastreamer2/src/msfileplayer.c:295
-#: ../mediastreamer2/src/msfileplayer.c:313
-msgid "Raw files and wav reader"
-msgstr ""
-
-#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
-#: ../mediastreamer2/src/msfilerec_win.c:216
-#: ../mediastreamer2/src/msfilerec_win.c:234
-msgid "Wav file recorder"
-msgstr ""
-
-#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
-msgid "A filter that send several inputs to one output."
-msgstr ""
-
-#: ../mediastreamer2/src/msresample.c:221
-#: ../mediastreamer2/src/msresample.c:239
-msgid "frequency resampler"
-msgstr ""
-
-#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
-msgid "RTP output filter"
-msgstr ""
-
-#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
-msgid "RTP input filter"
-msgstr ""
-
-#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
-#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
-msgid "The free and wonderful speex codec"
-msgstr ""
-
-#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
-msgid "A filter that controls and measure sound volume"
-msgstr ""
-
-#: ../mediastreamer2/src/msv4l.c:1009
-msgid "A video4linux compatible source filter to stream pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/msv4l2.c:458
-msgid "A filter to grab pictures from Video4Linux2-powered cameras"
-msgstr ""
-
-#: ../mediastreamer2/src/nowebcam.c:1780
-msgid "A filter that outputs a static image."
-msgstr ""
-
-#: ../mediastreamer2/src/oss.c:567
-msgid "Sound capture filter for OSS drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/oss.c:581
-msgid "Sound playback filter for OSS drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
-msgid "A pixel format converter"
-msgstr ""
-
-#: ../mediastreamer2/src/sizeconv.c:204
-msgid "A video size converter"
-msgstr ""
-
-#: ../mediastreamer2/src/sizeconv.c:222
-msgid "a small video size converter"
-msgstr ""
-
-#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
-msgid "Echo canceler using speex library"
-msgstr ""
-
-#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
-msgid "A filter that reads from input and copy to its multiple outputs."
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:375
-msgid "The theora video encoder from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:393
-msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
-msgid "The theora video decoder from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
-msgid "ITU-G.711 ulaw encoder"
-msgstr ""
-
-#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
-msgid "ITU-G.711 ulaw decoder"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
-#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
-msgid "A H.263 decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:688
-msgid "A MPEG4 decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:704
-msgid "A RTP/JPEG decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:720
-msgid "A MJPEG decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:736
-msgid "A snow decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
-msgid "A video H.263 encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:856
-msgid ""
-"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
-"spec."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
-msgid "A video MPEG4 encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:888
-msgid "A video snow encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:904
-msgid "A RTP/MJPEG encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:938
-msgid ""
-"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:970
-msgid ""
-"The snow codec is royalty-free and is open-source. \n"
-"It uses innovative techniques that makes it one of most promising video "
-"codec. It is implemented within the ffmpeg project.\n"
-"However it is under development, quite unstable and compatibility with other "
-"versions cannot be guaranteed."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:990
-msgid "A MJPEG encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
-msgid "A generic video display"
-msgstr ""
-
-#: ../mediastreamer2/src/wincevideods.c:966
-#: ../mediastreamer2/src/wincevideods.c:984
-#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
-#: ../mediastreamer2/src/winvideods.c:1306
-#: ../mediastreamer2/src/winvideods.c:1324
-msgid "A video4windows compatible source filter to stream pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
-msgid "A video for windows (vfw.h) based source filter to grab pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
-msgid "ICE filter"
-msgstr ""
-
-#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
-msgid "A filter that trashes its input (useful for terminating some graphs)."
-msgstr ""
-
-#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
-msgid "Parametric sound equalizer."
-msgstr ""
-
-#: ../mediastreamer2/src/msdscap-mingw.cc:1003
-msgid "A webcam grabber based on directshow."
-msgstr ""
-
-#, fuzzy
-#~ msgid "_View"
-#~ msgstr "Video"
-
-#, fuzzy
-#~ msgid "Display filters"
-#~ msgstr "Angezeigter Name:"
-
-#, fuzzy
-#~ msgid "_Properties"
-#~ msgstr "RTP-Eigenschaften"
-
-#, fuzzy
-#~ msgid "Show logs"
-#~ msgstr "Zeigt Gespräche"
-
-#, fuzzy
-#~ msgid "_About"
-#~ msgstr "Konto"
-
-#, fuzzy
-#~ msgid "gtk-remove"
-#~ msgstr "Entfernen"
-
-#, fuzzy
-#~ msgid "Proxy in use"
-#~ msgstr "Benutze Proxy-Server:"
-
-#~ msgid "Sound"
-#~ msgstr "Ton"
-
-#, fuzzy
-#~ msgid "Default identity"
-#~ msgstr "SIP Identität"
-
-#, fuzzy
-#~ msgid "Proxy accounts"
-#~ msgstr "Benutze Proxy-Server:"
-
-#~ msgid "Go"
-#~ msgstr "Start"
-
-#~ msgid "Address book"
-#~ msgstr "Adressbuch"
-
-#~ msgid "Exit"
-#~ msgstr "Beenden"
-
-#~ msgid "Help"
-#~ msgstr "Hilfe"
-
-#~ msgid "Shows the address book"
-#~ msgstr "Adressbuch"
-
-#~ msgid "..."
-#~ msgstr "..."
-
-#~ msgid ""
-#~ "Call or\n"
-#~ "answer"
-#~ msgstr ""
-#~ "Anrufen oder\n"
-#~ "Entgegennehmen"
-
-#~ msgid ""
-#~ "Hangup\n"
-#~ "or refuse"
-#~ msgstr ""
-#~ "Auflegen\n"
-#~ "oder Abweisen"
-
-#~ msgid "Or chat !"
-#~ msgstr "Oder Chat"
-
-#~ msgid "Show more..."
-#~ msgstr "Mehr anzeigen"
-
-#~ msgid "Playback level:"
-#~ msgstr "Abhörpegel"
-
-#~ msgid "Recording level:"
-#~ msgstr "Aufnamepegel"
-
-#~ msgid "Ring level:"
-#~ msgstr "Klingelpegel"
-
-#~ msgid "Controls"
-#~ msgstr "Kontrolle"
-
-#~ msgid "Reachable"
-#~ msgstr "Erreichbar"
-
-#~ msgid "Busy, I'll be back in "
-#~ msgstr "Beschäftigt, wieder erreichbar in "
-
-#~ msgid "The other party will be informed that you'll be back in X minutes"
-#~ msgstr ""
-#~ "Der Teilnehmer wird informiert, dass Sie in X Minuten wieder anwesend "
-#~ "sind."
-
-#~ msgid "mn"
-#~ msgstr "mn"
-
-#~ msgid "Moved temporarily"
-#~ msgstr "Unterwegs"
-
-#~ msgid "Alternative service"
-#~ msgstr "Andere Dienste"
-
-#~ msgid "URL:"
-#~ msgstr "URL:"
-
-#~ msgid "Presence"
-#~ msgstr "Anwesenheit"
-
-#~ msgid "Press digits to send DTMFs."
-#~ msgstr "Zifferntasten drücken, um DTMF zu senden"
-
-#~ msgid "DTMF"
-#~ msgstr "DTMF"
-
-#~ msgid "My online friends"
-#~ msgstr "Meine online Freunde"
-
-#~ msgid ""
-#~ "C: 2001\n"
-#~ "Made in Old Europe"
-#~ msgstr ""
-#~ "C: 2001\n"
-#~ "In Alt Europa erzeugt"
-
-#~ msgid ""
-#~ "Linphone is a web-phone.\n"
-#~ "It is compatible with SIP and RTP protocols."
-#~ msgstr ""
-#~ "Linphone ist ein web-phone.\n"
-#~ "Es ist mit den SIP- und RTP-Protokollen kompatibel."
-
-#~ msgid "Use IPv6 network (if available)"
-#~ msgstr "IPv6 Netzwerk (falls vorhanden) verwenden"
-
-# msgstr "Teilnehmer zur Zeit nicht ansprechbar."
-#~ msgid ""
-#~ "Toggle this if you are on an ipv6 network and you wish linphone to use it."
-#~ msgstr ""
-#~ "Ankreuzen wenn Sie ein ipv6 Netz haben und wenn Sie es wünschen dass "
-#~ "linphone es verwendet"
-
-#~ msgid ""
-#~ "These options is only for users in a private network, behind a gateway. "
-#~ "If you are not in this situation, then leave this empty."
-#~ msgstr ""
-#~ "Diese Option gilt nur für Anwender in einem privaten Netzwerk oder wenn "
-#~ "der Rechner durch einen Firewall geschützt ist. Andernfalls wird das Feld "
-#~ "nicht ausgefüllt"
-
-#~ msgid "No firewall"
-#~ msgstr "Kein Firewall"
-
-#~ msgid "Use this STUN server to guess firewall address :"
-#~ msgstr "Dieses STUN Server verwenden um die Firewalladresse zu Ermitteln"
-
-#~ msgid "Specify firewall address manually:"
-#~ msgstr "Firewall Adresse von Hand angeben"
-
-#~ msgid "NAT traversal options (experimental)"
-#~ msgstr "NAT-Transversaloptionen (experimentell)"
-
-#~ msgid "Number of buffered miliseconds (jitter compensation):"
-#~ msgstr "Anzahl der gepufferten Pakete (Jitterausgleich):"
-
-#~ msgid "RTP port used for audio:"
-#~ msgstr "Sound RTP Port:"
-
-#~ msgid "Use SIP INFO message instead of RTP rfc2833 for DTMF transmitting"
-#~ msgstr "Benutze SIP INFO Nachricht statt RTP rfc2833 für DTMF Übertragung"
-
-#~ msgid "RTP-RFC2833 is the recommended way."
-#~ msgstr "RTP-RFC2833 wird empfohlen"
-
-#~ msgid "Other"
-#~ msgstr "Andere"
-
-#~ msgid "micro"
-#~ msgstr "Mikrofon"
-
-#~ msgid "Recording source:"
-#~ msgstr "Aufnahmequelle:"
-
-#~ msgid "Enable echo-canceler (cancels the echo heard by the remote party)"
-#~ msgstr ""
-#~ "Echounterdrückung einschalten (eliminiert das von Gesprächspartnet "
-#~ "gehörter Echo)"
-
-#~ msgid "Listen"
-#~ msgstr "Anhören"
-
-#~ msgid "Sound properties"
-#~ msgstr "Audio Eigenschaften"
-
-#~ msgid "Run sip user agent on port:"
-#~ msgstr "Sip \"user agent\" an Port:"
-
-#~ msgid "It is strongly recommended to use port 5060."
-#~ msgstr "Wir empfehlen, Port 5060 zu verwenden"
-
-#~ msgid "SIP port"
-#~ msgstr "SIP-Port"
-
-#~ msgid "@"
-#~ msgstr "@"
-
-#~ msgid "Identity"
-#~ msgstr "Identität"
-
-#~ msgid "Add proxy/registrar"
-#~ msgstr "Proxy/Registrator hinzufügen"
-
-#~ msgid "Remote services"
-#~ msgstr "Dienste auf entferntem Server"
-
-#~ msgid "Clear all stored authentication information (username,password...)"
-#~ msgstr ""
-#~ "Alle gespeicherten Authentifikationsinformationen löschen (Benutzername, "
-#~ "Passwort,...)"
-
-#~ msgid "Authentication information"
-#~ msgstr "Authentifikationsinformation"
-
-#~ msgid "SIP"
-#~ msgstr "SIP"
-
-#~ msgid "List of audio codecs, in order of preference:"
-#~ msgstr "Liste von Audio-CoDecs in der Reihenfolge ihrer Präferenz"
-
-#~ msgid "Video Codecs"
-#~ msgstr "Videocodecs"
-
-#~ msgid ""
-#~ "Note: Codecs in red are not usable regarding to your connection type to "
-#~ "the internet."
-#~ msgstr ""
-#~ "Notiz: Rot markierten Codecs können bei Ihrer Internetverbindungsart "
-#~ "nicht verwendet werden."
-
-#~ msgid "No information availlable"
-#~ msgstr "Informationen nicht verfügbar"
-
-#~ msgid "Codec information"
-#~ msgstr "Codec Information"
-
-#~ msgid "Address Book"
-#~ msgstr "Adressbuch"
-
-#~ msgid "Select"
-#~ msgstr "Auswählen"
-
-#~ msgid ""
-#~ "User is not reachable at the moment but he invites you to contact him "
-#~ "using the following alternate ressource:"
-#~ msgstr ""
-#~ "Teilnehmer nicht erreichbar. Bitte stattdessen nachstehende Ressource "
-#~ "verwenden:"
-
-#~ msgid "None."
-#~ msgstr "Nichts."
-
-#~ msgid "Proxy/Registrar configuration box"
-#~ msgstr "Proxy/Registrator Konfigurationsbox"
-
-#~ msgid "Send registration:"
-#~ msgstr "Sende Registrierung:"
-
-#~ msgid "Name:"
-#~ msgstr "Name:"
-
-#~ msgid "Subscribe policy:"
-#~ msgstr "Subskription Police"
-
-#~ msgid "Send subscription (see person's online status)"
-#~ msgstr "Sende Subskription (zeige Onlinestatus der Person an)"
-
-#~ msgid "New incoming subscription"
-#~ msgstr "Neu ankommende Subskription"
-
-#~ msgid "You have received a new subscription..."
-#~ msgstr "Sie haben eine neue Subskription empfangen"
-
-#~ msgid "Refuse"
-#~ msgstr "Ablehnen"
-
-#~ msgid "Authentication required for realm"
-#~ msgstr "Authentifikation erforderlich für Bereich"
-
-#~ msgid "userid:"
-#~ msgstr "Benutzer ID:"
-
-#~ msgid "realm:"
-#~ msgstr "Bereich:"
-
-#~ msgid "Chat Room"
-#~ msgstr "Chat Raum"
-
-#~ msgid "Text:"
-#~ msgstr "Text"
-
-#~ msgid "The caller asks for resource reservation. Do you agree ?"
-#~ msgstr "Der Anrufer erbittet Resourcenreservierung. Sind Sie einverstanden?"
-
-#~ msgid ""
-#~ "The caller doesn't use resource reservation. \t\t\t\t\tDo you wish to "
-#~ "continue anyway ?"
-#~ msgstr ""
-#~ "Der Anrufer benutzt keine Resourcenreservierung. \t\t\t\t\tWollen Sie "
-#~ "dennoch fortfahren?"
-
-#~ msgid "linphone - receiving call from %s"
-#~ msgstr "Linphone- empfängt ein Anruf von %s"
-
-#~ msgid ""
-#~ "You have received a subscription from %s.This means that this person "
-#~ "wishes to be notified of your presence information (online, busy, "
-#~ "away...).\n"
-#~ "Do you agree ?"
-#~ msgstr ""
-#~ "Sie haben eine Subskription von %s empfangen. Das heißt, dass diese "
-#~ "Person ber Ihre Anwesenheitsinformation benachrichtigt werden will "
-#~ "(erreichbar, beschäftig, abwesend...).\n"
-#~ "Sind Sie einverstanden ?"
-
-#~ msgid "Authentication required for realm %s"
-#~ msgstr "Authentifikation erforderlich für Bereich %s"
-
-#~ msgid "None"
-#~ msgstr "Keinen"
-
-#~ msgid "Wait"
-#~ msgstr "Warten"
-
-#~ msgid "Deny"
-#~ msgstr "Abweisen"
-
-#~ msgid "Bad sip address: a sip address looks like sip:user@domain"
-#~ msgstr ""
-#~ "Fehlerhafte Sip-Adresse. Eine Sip-Adresse hat folgenden Aufbau <sip:"
-#~ "anwendername@domainname>"
-
-#~ msgid "Stun lookup done..."
-#~ msgstr "Stun Ermittlung beendet..."
-
-#~ msgid "enter sip uri here"
-#~ msgstr "Sip URI eingeben"
-
-#~ msgid "User manual"
-#~ msgstr "Anwender-Handbuch"
-
-#~ msgid "Ring sound selection"
-#~ msgstr "Klingelton ausw�len"
-
-#~ msgid "Communication ended."
-#~ msgstr "Kommunikation beendet."
-
-#~ msgid "Call cancelled."
-#~ msgstr "Anruf annulliert"
-
-#, fuzzy
-#~ msgid "Firewall 's external ip address (in dot notations):"
-#~ msgstr "IP-Adresse des Firewall (in Punktnotation)"
-
-#, fuzzy
-#~ msgid "Server address"
-#~ msgstr "Server-Adresse:"
-
-#~ msgid "28k modem"
-#~ msgstr "28K Modem"
-
-#~ msgid "56k modem"
-#~ msgstr "56K Modem"
-
-#~ msgid "64k modem (numeris)"
-#~ msgstr "64K Modem (ISDN)"
-
-#~ msgid "ADSL or Cable modem"
-#~ msgstr "ADSL oder Kabel-Modem"
-
-#~ msgid "Ethernet or equivalent"
-#~ msgstr "Ethernet oder äquivalent"
-
-#~ msgid "Connection type:"
-#~ msgstr "Verbindungstyp:"
-
-#, fuzzy
-#~ msgid ""
-#~ "Linphone could not open audio device %s. Check if your sound card is "
-#~ "fully configured and working."
-#~ msgstr ""
-#~ "Linphone kann das Soundgerät nicht öffnen. Prfen Sie nach, ob die "
-#~ "Soundkarte vollst�dig konfiguriert und funktionsfähig ist."
-
-#~ msgid "Type here the sip address of the person you want to call."
-#~ msgstr ""
-#~ "Geben Sie die Sip-Adresse des Anwenders, den Sie anrufen möchten, hier "
-#~ "ein."
-
-#~ msgid ""
-#~ "Release or\n"
-#~ "Refuse"
-#~ msgstr ""
-#~ "Auflegen oder\n"
-#~ "Abweisen"
-
-#~ msgid "%s. Retry after %i minute(s)."
-#~ msgstr "%s. In %i Minuten wieder versuchen."
-
-#~ msgid "Timeout..."
-#~ msgstr "Zeitüberschreitung..."
-
-#, fuzzy
-#~ msgid ""
-#~ "Add address\n"
-#~ "book"
-#~ msgstr "Adressbuch"
-
-#~ msgid "Toggle this if you want to be registered on a remote server."
-#~ msgstr ""
-#~ "Bitte ankreuzen, wenn Sie auf einem Sip-Server registriert werden wollen."
-
-#~ msgid "Address of record:"
-#~ msgstr "Adresse des Eintrags:"
-
-#~ msgid ""
-#~ "The password used for registration. On some servers it is not necessary"
-#~ msgstr ""
-#~ "Passwort für die Registrierung.  Bei manchen Servern nicht erforderlich."
-
-#~ msgid "Use this registrar server as outbound proxy."
-#~ msgstr "Verwenden Sie diesen Registrarserver als externen proxy."
-
-#~ msgid "sip address:"
-#~ msgstr "SIP-Adresse:"
-
-#~ msgid "Modify"
-#~ msgstr "Ändern"
-
-#~ msgid "Registering..."
-#~ msgstr "Registrierung"
-
-#~ msgid ""
-#~ "You are currently using the i810_audio driver.\n"
-#~ "This driver is buggy and so does not work with Linphone.\n"
-#~ "We suggest that you replace it by its equivalent ALSA driver,\n"
-#~ "either with packages from your distribution, or by downloading\n"
-#~ "ALSA drivers at http://www.alsa-project.org."
-#~ msgstr ""
-#~ "Sie verwenden zur Zeit den i810_audio Treiber.\n"
-#~ "Diese Treiber ist fehlerhaft und funktioniert nicht mit Linphone\n"
-#~ "Wir empfehlen, den Treiber entweder durch das ALSA-Treiber-Paket von "
-#~ "ihrer Distribution\n"
-#~ "zu ersetzen oder die gewnschten ALSA-Treiber von http://www.alsa-project."
-#~ "org\n"
-#~ "zu beziehen und zu installieren"
-
-#~ msgid "Unregistration successfull."
-#~ msgstr "Abmeldung erfolgreich."
-
-#~ msgid "Select network interface to use:"
-#~ msgstr "Netzwerkschnittstelle wählen:"
-
-#~ msgid "Network interface properties"
-#~ msgstr "Eigenschaften der Netzwerkschnittstelle"
-
-#~ msgid "RTP"
-#~ msgstr "RTP"
-
-#~ msgid "C: 2001"
-#~ msgstr "April 2001"
-
-#~ msgid "Threads not supported by glib. Upgrade your glib.\n"
-#~ msgstr ""
-#~ "Threads werden von glib nicht unterstützt.  Bitte aktualisieren Sie Ihre "
-#~ "glib.\n"
-
-#~ msgid "Run linphone as a gnome-applet."
-#~ msgstr "Linphone als gnome-Applet ausfhren."
-
-#~ msgid "Run linphone as a daemon (for use without gnome)."
-#~ msgstr "Linphone als daemon ausführen (Verwendung ohne Gnome)."
-
-#~ msgid ""
-#~ "Cannot find network previously used interface %s.\n"
-#~ "If your computer is temporary connected to the internet, please connect "
-#~ "and then run linphone.\n"
-#~ "If you want to change your default network interface, go to the "
-#~ "parameters 'box."
-#~ msgstr ""
-#~ "Linphone konnte die zuvor verwendete Netzwerkschnittstelle %s nicht "
-#~ "finden.\n"
-#~ "Wenn linphone nur temporär am Internet angeschlossen ist, stellen Sie "
-#~ "eine Verbindung her und rufen Sie linphone erneut auf.\n"
-#~ "Wenn Sie die vorgegebene Netzwerkschnittstelle ändern wollen, wählen Sie "
-#~ "bitte \"Einstellungen\"."
-
-#~ msgid ""
-#~ "Linphone cannot open the audio device.\n"
-#~ "It may be caused by other programs using it.\n"
-#~ "Do you want linphone to kill these programs (esd or artsd) ?"
-#~ msgstr ""
-#~ "Linphone kann die Soundschnittstelle nicht öffnen.\n"
-#~ "Dies kann durch andere Applikationen verursacht sein.\n"
-#~ "Möchten sie diese Programme (esd oder artsd) beenden?"
-
-#~ msgid "Use it as a:"
-#~ msgstr "Verwenden als:"
-
-#~ msgid "Outbound proxy"
-#~ msgstr "Ausgehender Proxy-Server"
-
-#~ msgid ""
-#~ "Toggle this button if the registrar must be used to proxy calls through a "
-#~ "firewall."
-#~ msgstr ""
-#~ "Verwenden Sie diesen Knopf, falls der Registrar zum Tunneln durch einen "
-#~ "Firewall verwendet werden muß"
-
-#~ msgid "kbit/s"
-#~ msgstr "Kbits/s"
-
-#~ msgid "OSS"
-#~ msgstr "OSS"
-
-#~ msgid "ALSA"
-#~ msgstr "ALSA"
-
-#~ msgid "Automatically kill applications using soundcard when needed"
-#~ msgstr "Applikationen die die Soundkarte verwenden, automatisch beenden."
-
-#~ msgid ""
-#~ "Your computer is connected to several networks. Check in the global "
-#~ "parameters if Linphone uses the one that you want."
-#~ msgstr ""
-#~ "Ihr Rechner ist an mehere Netze angeschlossen. Stellen Sie sicher, daß in "
-#~ "den Globalen Parametern die richtige Schnittstelle selektiert ist."
-
-#~ msgid ""
-#~ "Linphone failed to open the sound device. See the README file included in "
-#~ "the distribution for details."
-#~ msgstr ""
-#~ "Linphone konnte die Soundschnittstelle nicht öffnen. Weitere "
-#~ "Informationen finden Sie in der README-Datei (enthalten in der "
-#~ "Distribution)."
-
-#~ msgid "Interface not found."
-#~ msgstr "Schnittstelle nicht gefunden."
-
-#~ msgid "Warning"
-#~ msgstr "Warnung"
-
-#~ msgid ""
-#~ "Linphone cannot open the sound device. It may be caused by other programs "
-#~ "using it. Do you want linphone to kill these programs (esd or artsd) ?"
-#~ msgstr ""
-#~ "Linphone kann die Soundschnittstelle nicht öffnen. Dies kann durch andere "
-#~ "Applikationen verursacht sein. Möchten sie diese Programme (esd oder "
-#~ "artsd) beenden?"
-
-#~ msgid "Linphone shutdowns..."
-#~ msgstr "Linphone Ende..."
-
-#~ msgid ""
-#~ "Please, wait a few seconds untils linphone unregisters your sip addess "
-#~ "from registrar server..."
-#~ msgstr "Bitte einige Sekunden warten, bis Sip-Adresse ausgetragen ist."
-
-#~ msgid "Bad formuled sip address."
-#~ msgstr "SIP-Adresse fehlerhaft."
-
-#~ msgid "Couldn't create pixmap from file: %s"
-#~ msgstr "Konnte Pixmap nicht aus Datei %s erzeugen."
-
-#~ msgid ""
-#~ "Linphone did not detect any valid network interface. If you use a "
-#~ "temporary internet connection, please connect and then run linphone again."
-#~ msgstr ""
-#~ "Linphone konnte keine Netzwerkschnittstelle finden. Wenn Sie nur eine "
-#~ "temporäre Internetverbindung haben, bitte erneut eine Internetverbindung "
-#~ "herstellen und linphone nochmals starten."
-
-#~ msgid "List of network interfaces on your system."
-#~ msgstr "Vorhandene Netzwerkschnittstellen ihres Systems"
diff --git a/linphone/po/en@boldquot.header b/linphone/po/en@boldquot.header
deleted file mode 100644 (file)
index fedb6a0..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-# All this catalog "translates" are quotation characters.
-# The msgids must be ASCII and therefore cannot contain real quotation
-# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
-# and double quote (0x22). These substitutes look strange; see
-# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
-#
-# This catalog translates grave accent (0x60) and apostrophe (0x27) to
-# left single quotation mark (U+2018) and right single quotation mark (U+2019).
-# It also translates pairs of apostrophe (0x27) to
-# left single quotation mark (U+2018) and right single quotation mark (U+2019)
-# and pairs of quotation mark (0x22) to
-# left double quotation mark (U+201C) and right double quotation mark (U+201D).
-#
-# When output to an UTF-8 terminal, the quotation characters appear perfectly.
-# When output to an ISO-8859-1 terminal, the single quotation marks are
-# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
-# grave/acute accent (by libiconv), and the double quotation marks are
-# transliterated to 0x22.
-# When output to an ASCII terminal, the single quotation marks are
-# transliterated to apostrophes, and the double quotation marks are
-# transliterated to 0x22.
-#
-# This catalog furthermore displays the text between the quotation marks in
-# bold face, assuming the VT100/XTerm escape sequences.
-#
diff --git a/linphone/po/en@quot.header b/linphone/po/en@quot.header
deleted file mode 100644 (file)
index a9647fc..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-# All this catalog "translates" are quotation characters.
-# The msgids must be ASCII and therefore cannot contain real quotation
-# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
-# and double quote (0x22). These substitutes look strange; see
-# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
-#
-# This catalog translates grave accent (0x60) and apostrophe (0x27) to
-# left single quotation mark (U+2018) and right single quotation mark (U+2019).
-# It also translates pairs of apostrophe (0x27) to
-# left single quotation mark (U+2018) and right single quotation mark (U+2019)
-# and pairs of quotation mark (0x22) to
-# left double quotation mark (U+201C) and right double quotation mark (U+201D).
-#
-# When output to an UTF-8 terminal, the quotation characters appear perfectly.
-# When output to an ISO-8859-1 terminal, the single quotation marks are
-# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
-# grave/acute accent (by libiconv), and the double quotation marks are
-# transliterated to 0x22.
-# When output to an ASCII terminal, the single quotation marks are
-# transliterated to apostrophes, and the double quotation marks are
-# transliterated to 0x22.
-#
diff --git a/linphone/po/es.po b/linphone/po/es.po
deleted file mode 100644 (file)
index 5f486ce..0000000
+++ /dev/null
@@ -1,2041 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: Linphone 0.9.1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-10-16 15:24+0200\n"
-"PO-Revision-Date: 2002-10-15 HO:MI+ZONE\n"
-"Last-Translator: Nelson Benitez <gnelson@inMail.sk>\n"
-"Language-Team: es <es@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
-#: ../gtk-glade/support.c:102
-#, c-format
-msgid "Couldn't find pixmap file: %s"
-msgstr "No se pudo encontrar el archivo pixmap: %s"
-
-#: ../gtk-glade/chat.c:27
-#, c-format
-msgid "Chat with %s"
-msgstr ""
-
-#: ../gtk-glade/main.c:90
-msgid "log to stdout some debug information while running."
-msgstr ""
-
-#: ../gtk-glade/main.c:97
-msgid "Start only in the system tray, do not show the main interface."
-msgstr ""
-
-#: ../gtk-glade/main.c:104
-msgid "address to call right now"
-msgstr ""
-
-#: ../gtk-glade/main.c:111
-msgid "if set automatically answer incoming calls"
-msgstr ""
-
-#: ../gtk-glade/main.c:119
-msgid ""
-"Specifiy a working directory (should be the base of the installation, eg: c:"
-"\\Program Files\\Linphone)"
-msgstr ""
-
-#: ../gtk-glade/main.c:675
-#, c-format
-msgid "Incoming call from %s"
-msgstr ""
-
-#: ../gtk-glade/main.c:707
-#, c-format
-msgid ""
-"%s would like to add you to his contact list.\n"
-"Would you allow him to see your presence status or add him to your contact "
-"list ?\n"
-"If you answer no, this person will be temporarily blacklisted."
-msgstr ""
-
-#: ../gtk-glade/main.c:777
-#, c-format
-msgid ""
-"Please enter your password for username <i>%s</i>\n"
-" at domain <i>%s</i>:"
-msgstr ""
-
-#: ../gtk-glade/main.c:871
-msgid "Website link"
-msgstr ""
-
-#: ../gtk-glade/main.c:907
-msgid "Linphone - a video internet phone"
-msgstr ""
-
-#: ../gtk-glade/main.c:926
-#, c-format
-msgid "%s (Default)"
-msgstr ""
-
-#: ../gtk-glade/main.c:1168
-msgid "A free SIP video-phone"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
-#: ../gtk-glade/contact.glade.h:3
-msgid "Name"
-msgstr "Nombre"
-
-#: ../gtk-glade/friendlist.c:212
-#, fuzzy
-msgid "Presence status"
-msgstr "Estado"
-
-#: ../gtk-glade/friendlist.c:243
-#, c-format
-msgid "Search in %s directory"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:432
-msgid "Invalid sip contact !"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:474
-#, c-format
-msgid "Call %s"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:475
-#, c-format
-msgid "Send text to %s"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:476
-#, fuzzy, c-format
-msgid "Edit contact '%s'"
-msgstr "(Ninguna informacion de contacto !)"
-
-#: ../gtk-glade/friendlist.c:477
-#, c-format
-msgid "Delete contact '%s'"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:519
-#, c-format
-msgid "Add new contact from %s directory"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:251
-msgid "Rate (Hz)"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:257
-msgid "Status"
-msgstr "Estado"
-
-#: ../gtk-glade/propertybox.c:263
-msgid "Min bitrate (kbit/s)"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:269
-msgid "Parameters"
-msgstr "Parametros"
-
-#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
-msgid "Enabled"
-msgstr "Activado"
-
-#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
-msgid "Disabled"
-msgstr "Desactivado"
-
-#: ../gtk-glade/propertybox.c:480
-msgid "Account"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:620
-msgid "English"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:621
-msgid "French"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:622
-msgid "Swedish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:623
-msgid "Italian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:624
-msgid "Spanish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:625
-msgid "Brazilian Portugese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:626
-msgid "Polish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:627
-msgid "German"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:628
-msgid "Russian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:629
-msgid "Japanese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:630
-msgid "Dutch"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:631
-msgid "Hungarian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:632
-msgid "Czech"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:633
-msgid "Chinese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:690
-msgid ""
-"You need to restart linphone for the new language selection to take effect."
-msgstr ""
-
-#: ../gtk-glade/update.c:80
-#, c-format
-msgid ""
-"A more recent version is availalble from %s.\n"
-"Would you like to open a browser to download it ?"
-msgstr ""
-
-#: ../gtk-glade/update.c:91
-msgid "You are running the lastest version."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:66
-msgid "Firstname, Lastname"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:73
-#, fuzzy
-msgid "SIP address"
-msgstr "Direccion"
-
-#: ../gtk-glade/buddylookup.c:121
-msgid "Error communicating with server."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:125
-#, fuzzy
-msgid "Connecting..."
-msgstr "Conexion"
-
-#: ../gtk-glade/buddylookup.c:129
-#, fuzzy
-msgid "Connected"
-msgstr "Conectado."
-
-#: ../gtk-glade/buddylookup.c:133
-msgid "Receiving data..."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:141
-#, c-format
-msgid "Found %i contact"
-msgid_plural "Found %i contacts"
-msgstr[0] ""
-msgstr[1] ""
-
-#: ../gtk-glade/setupwizard.c:25
-msgid ""
-"Welcome !\n"
-"This assistant will help you to use a SIP account for your calls."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:34
-msgid "Create an account by choosing a username"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:35
-msgid "I have already an account and just want to use it"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:53
-msgid "Please choose a username:"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:54
-#, fuzzy
-msgid "Username:"
-msgstr "Manual de Usuario"
-
-#: ../gtk-glade/setupwizard.c:92
-#, c-format
-msgid "Checking if '%s' is available..."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
-msgid "Please wait..."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:101
-msgid "Sorry this username already exists. Please try a new one."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
-msgid "Ok !"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
-msgid "Communication problem, please try again later."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:134
-msgid "Thank you. Your account is now configured and ready for use."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:228
-msgid "Welcome to the account setup assistant"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:232
-msgid "Account setup assistant"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:236
-msgid "Choosing a username"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:240
-msgid "Verifying"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:244
-#, fuzzy
-msgid "Confirmation"
-msgstr "Informacion"
-
-#: ../gtk-glade/setupwizard.c:249
-msgid "Creating your account"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:253
-msgid "Now ready !"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:98
-#, fuzzy
-msgid "<b>Calling...</b>"
-msgstr "Contactando "
-
-#: ../gtk-glade/incall_view.c:122
-#, fuzzy
-msgid "<b>In call with</b>"
-msgstr "Contactando "
-
-#: ../gtk-glade/incall_view.c:124
-msgid "00::00::00"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:140
-#, c-format
-msgid "%02i::%02i::%02i"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:158
-#, fuzzy
-msgid "<b>Call ended.</b>"
-msgstr "Llamada cancelada."
-
-#: ../gtk-glade/incall_view.c:176
-msgid "Unmute"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
-msgid "Mute"
-msgstr ""
-
-#: ../gtk-glade/loginframe.c:82
-#, c-format
-msgid "Please enter login information for %s"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:1
-msgid "#"
-msgstr "#"
-
-#: ../gtk-glade/main.glade.h:2
-msgid "*"
-msgstr "*"
-
-#: ../gtk-glade/main.glade.h:3
-msgid "0"
-msgstr "0"
-
-#: ../gtk-glade/main.glade.h:4
-msgid "1"
-msgstr "1"
-
-#: ../gtk-glade/main.glade.h:5
-msgid "2"
-msgstr "2"
-
-#: ../gtk-glade/main.glade.h:6
-msgid "3"
-msgstr "3"
-
-#: ../gtk-glade/main.glade.h:7
-msgid "4"
-msgstr "4"
-
-#: ../gtk-glade/main.glade.h:8
-msgid "5"
-msgstr "10"
-
-#: ../gtk-glade/main.glade.h:9
-msgid "6"
-msgstr "6"
-
-#: ../gtk-glade/main.glade.h:10
-msgid "7"
-msgstr "7"
-
-#: ../gtk-glade/main.glade.h:11
-msgid "8"
-msgstr "8"
-
-#: ../gtk-glade/main.glade.h:12
-msgid "9"
-msgstr "9"
-
-#: ../gtk-glade/main.glade.h:13
-#, fuzzy
-msgid "<b>Contact list</b>"
-msgstr "Contactando "
-
-#: ../gtk-glade/main.glade.h:14
-#, fuzzy
-msgid "<b>Terminate call</b>"
-msgstr "Contactando "
-
-#: ../gtk-glade/main.glade.h:15
-#, fuzzy
-msgid "<b>Welcome !</b>"
-msgstr "Contactando "
-
-#: ../gtk-glade/main.glade.h:16
-msgid "A"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:17
-msgid ""
-"ADSL\n"
-"Fiber Channel"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:19
-msgid ""
-"All users\n"
-"Online users"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:21
-msgid "Assistant"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:22
-#, fuzzy
-msgid "Audio & Video"
-msgstr "Propiedades del codec de Audio"
-
-#: ../gtk-glade/main.glade.h:23
-#, fuzzy
-msgid "Audio only"
-msgstr "Propiedades del codec de Audio"
-
-#: ../gtk-glade/main.glade.h:24
-msgid "Automatically log me in"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:25
-msgid "B"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
-msgid "C"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:27
-msgid "Check for updates"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:28
-msgid "D"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:29
-msgid "Default"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:30
-msgid "Digits"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:31
-#, fuzzy
-msgid "Duration"
-msgstr "Informacion"
-
-#: ../gtk-glade/main.glade.h:32
-#, fuzzy
-msgid "Duration:"
-msgstr "Informacion"
-
-#: ../gtk-glade/main.glade.h:33
-#, fuzzy
-msgid "Enable self-view"
-msgstr "Activado"
-
-#: ../gtk-glade/main.glade.h:34
-msgid "Enter username, phone number, or full sip address"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:35
-msgid "In call"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:36
-msgid "Internet connection:"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:37
-#, fuzzy
-msgid "Login information"
-msgstr "Informacion de codec"
-
-#: ../gtk-glade/main.glade.h:38
-msgid "Lookup:"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:39
-msgid "Main view"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:41
-#, fuzzy
-msgid "My current identity:"
-msgstr "Identidad"
-
-#: ../gtk-glade/main.glade.h:42
-#, fuzzy
-msgid "Password"
-msgstr "Tu Contraseña:"
-
-#: ../gtk-glade/main.glade.h:43
-#, fuzzy
-msgid "SIP address or phone number:"
-msgstr "La direccion SIP del servidor de registro."
-
-#: ../gtk-glade/main.glade.h:44
-msgid "Show current call"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:45
-msgid "Start call"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:46
-msgid "Terminate call"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:47
-#, fuzzy
-msgid "Username"
-msgstr "Manual de Usuario"
-
-#: ../gtk-glade/main.glade.h:48
-#, fuzzy
-msgid "_Linphone"
-msgstr "linphone"
-
-#: ../gtk-glade/main.glade.h:49
-#, fuzzy
-msgid "_Modes"
-msgstr "Codecs"
-
-#: ../gtk-glade/main.glade.h:50
-#, fuzzy
-msgid "gtk-connect"
-msgstr "Conectado."
-
-#: ../gtk-glade/main.glade.h:51
-msgid "gtk-find"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:52
-msgid "in"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:53
-msgid "label"
-msgstr ""
-
-#: ../gtk-glade/about.glade.h:1
-#, fuzzy
-msgid "About linphone"
-msgstr "linphone"
-
-#: ../gtk-glade/about.glade.h:2
-msgid "An internet video phone using the standart SIP (rfc3261) protocol."
-msgstr ""
-
-#: ../gtk-glade/about.glade.h:3
-msgid "Created by Simon Morlat\n"
-msgstr ""
-
-#: ../gtk-glade/about.glade.h:5
-msgid ""
-"fr: Simon Morlat\n"
-"en: Simon Morlat and Delphine Perreau\n"
-"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
-"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
-"sv: Daniel Nylander <po@danielnylander.se>\n"
-"es: Jesus Benitez <gnelson at inMail dot sk>\n"
-"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
-"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
-"pl: Robert Nasiadek <darkone@darkone.pl>\n"
-"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
-"hu: anonymous\n"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:1
-#, fuzzy
-msgid "<b>Contact information</b>"
-msgstr "Informacion de codec"
-
-#: ../gtk-glade/contact.glade.h:2
-msgid "Allow this contact to see my presence status"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:4
-#, fuzzy
-msgid "SIP Address"
-msgstr "Direccion"
-
-#: ../gtk-glade/contact.glade.h:5
-msgid "Show this contact presence status"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
-#: ../gtk-glade/sip_account.glade.h:9
-msgid "gtk-cancel"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
-#: ../gtk-glade/sip_account.glade.h:10
-msgid "gtk-ok"
-msgstr ""
-
-#: ../gtk-glade/log.glade.h:1
-#, fuzzy
-msgid "Linphone debug window"
-msgstr "Linphone esta terminando..."
-
-#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
-#: ../gtk-glade/chatroom.glade.h:2
-msgid "gtk-close"
-msgstr ""
-
-#: ../gtk-glade/password.glade.h:1
-msgid "Linphone - Authentication required"
-msgstr ""
-
-#: ../gtk-glade/password.glade.h:2
-#, fuzzy
-msgid "Password:"
-msgstr "Tu Contraseña:"
-
-#: ../gtk-glade/password.glade.h:3
-msgid "Please enter the domain password"
-msgstr ""
-
-#: ../gtk-glade/password.glade.h:4
-msgid "UserID"
-msgstr ""
-
-#: ../gtk-glade/call_logs.glade.h:1
-msgid "Call history"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:1
-msgid "Configure a SIP account"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:2
-msgid "Linphone - Configure a SIP account"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:3
-#, fuzzy
-msgid "Publish presence information"
-msgstr "Informacion de codec"
-
-#: ../gtk-glade/sip_account.glade.h:4
-msgid "Register at startup"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:5
-#, fuzzy
-msgid "Registration duration (sec):"
-msgstr "Se ha registrado con exito."
-
-#: ../gtk-glade/sip_account.glade.h:6
-msgid "Route (optional):"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:7
-#, fuzzy
-msgid "SIP Proxy address:"
-msgstr "Direccion SIP"
-
-#: ../gtk-glade/sip_account.glade.h:8
-#, fuzzy
-msgid "Your SIP identity:"
-msgstr "Identidad"
-
-#: ../gtk-glade/sip_account.glade.h:11
-msgid "sip:"
-msgstr "SIP:"
-
-#: ../gtk-glade/chatroom.glade.h:1
-#, fuzzy
-msgid "Send"
-msgstr "Sonido"
-
-#: ../gtk-glade/incoming_call.glade.h:1
-msgid "Accept"
-msgstr ""
-
-#: ../gtk-glade/incoming_call.glade.h:2
-#, fuzzy
-msgid "Decline"
-msgstr "linea"
-
-#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
-msgid "Incoming call"
-msgstr ""
-
-#: ../gtk-glade/incoming_call.glade.h:4
-msgid "Incoming call from"
-msgstr ""
-
-#: ../gtk-glade/incoming_call.glade.h:5
-msgid "Linphone - Incoming call"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:1
-msgid "0 stands for \"unlimited\""
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:2
-#, fuzzy
-msgid "<b>Audio</b>"
-msgstr "Contactando "
-
-#: ../gtk-glade/parameters.glade.h:3
-msgid "<b>Bandwidth control</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:4
-#, fuzzy
-msgid "<b>Codecs</b>"
-msgstr "Contactando "
-
-#: ../gtk-glade/parameters.glade.h:5
-msgid "<b>Default identity</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:6
-msgid "<b>Language</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:7
-msgid "<b>NAT and Firewall</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:8
-#, fuzzy
-msgid "<b>Ports</b>"
-msgstr "Contactando "
-
-#: ../gtk-glade/parameters.glade.h:9
-msgid "<b>Privacy</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:10
-#, fuzzy
-msgid "<b>Proxy accounts</b>"
-msgstr "Contactando "
-
-#: ../gtk-glade/parameters.glade.h:11
-#, fuzzy
-msgid "<b>Transport</b>"
-msgstr "Contactando "
-
-#: ../gtk-glade/parameters.glade.h:12
-msgid "<b>Video</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:13
-msgid "ALSA special device (optional):"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:14
-msgid "Add"
-msgstr "Añadir"
-
-#: ../gtk-glade/parameters.glade.h:15
-msgid "Audio RTP/UDP:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:16
-#, fuzzy
-msgid ""
-"Audio codecs\n"
-"Video codecs"
-msgstr "Propiedades del codec de Audio"
-
-#: ../gtk-glade/parameters.glade.h:18
-msgid "Behind NAT / Firewall (specify gateway IP below)"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:19
-msgid "Behind NAT / Firewall (use STUN to resolve)"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:21
-msgid "CIF"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:22
-#, fuzzy
-msgid "Capture device:"
-msgstr "Usar dispositivo de sonido:"
-
-#: ../gtk-glade/parameters.glade.h:23
-#, fuzzy
-msgid "Codecs"
-msgstr "Codecs"
-
-#: ../gtk-glade/parameters.glade.h:24
-msgid "Direct connection to the Internet"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:25
-msgid "Disable"
-msgstr "Desactivado"
-
-#: ../gtk-glade/parameters.glade.h:26
-#, fuzzy
-msgid "Done"
-msgstr "Ninguno."
-
-#: ../gtk-glade/parameters.glade.h:27
-msgid "Download speed limit in Kbit/sec:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:28
-msgid "Edit"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:29
-msgid "Enable"
-msgstr "Activado"
-
-#: ../gtk-glade/parameters.glade.h:30
-msgid "Enable echo cancellation"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:31
-msgid "Erase all passwords"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:32
-msgid "Manage SIP Accounts"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:33
-msgid "Multimedia settings"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:34
-#, fuzzy
-msgid "Network settings"
-msgstr "Red"
-
-#: ../gtk-glade/parameters.glade.h:35
-#, fuzzy
-msgid "Playback device:"
-msgstr "Usar dispositivo de sonido:"
-
-#: ../gtk-glade/parameters.glade.h:36
-msgid "Prefered video resolution:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:37
-#, fuzzy
-msgid "Public IP address:"
-msgstr "Direccion SIP"
-
-#: ../gtk-glade/parameters.glade.h:38
-msgid ""
-"Register to FONICS\n"
-"virtual network !"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:40
-msgid "Remove"
-msgstr "Borrar"
-
-#: ../gtk-glade/parameters.glade.h:41
-#, fuzzy
-msgid "Ring device:"
-msgstr "Usar dispositivo de sonido:"
-
-#: ../gtk-glade/parameters.glade.h:42
-#, fuzzy
-msgid "Ring sound:"
-msgstr "Fuente de grabacion:"
-
-#: ../gtk-glade/parameters.glade.h:43
-msgid "SIP (UDP):"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:44
-msgid "Send DTMFs as SIP info"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:45
-msgid "Set Maximum Transmission Unit:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:46
-msgid "Settings"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:47
-#, fuzzy
-msgid "Stun server:"
-msgstr "Servidor de Redireccionamiento"
-
-#: ../gtk-glade/parameters.glade.h:48
-msgid "This section defines your SIP address when not using a SIP account"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:49
-msgid "Upload speed limit in Kbit/sec:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:50
-msgid "Use IPv6 instead of IPv4"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:51
-#, fuzzy
-msgid "User interface"
-msgstr "Manual de Usuario"
-
-#: ../gtk-glade/parameters.glade.h:52
-msgid "Video RTP/UDP:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:53
-#, fuzzy
-msgid "Video input device:"
-msgstr "Usar dispositivo de sonido:"
-
-#: ../gtk-glade/parameters.glade.h:54
-msgid "Your display name (eg: John Doe):"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:55
-#, fuzzy
-msgid "Your resulting SIP address:"
-msgstr "Tu direccion SIP:"
-
-#: ../gtk-glade/parameters.glade.h:56
-msgid "Your username:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:57
-msgid "a sound card\n"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:59
-msgid "default camera"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:60
-msgid "default soundcard"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:61
-msgid "default soundcard\n"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:63
-msgid "gtk-go-down"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:64
-msgid "gtk-go-up"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:65
-msgid "gtk-media-play"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:1
-msgid "<b>Search somebody</b>"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:2
-msgid "Add to my list"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:3
-msgid "Search contacts in directory"
-msgstr ""
-
-#: ../gtk-glade/waiting.glade.h:1
-#, fuzzy
-msgid "Linphone"
-msgstr "linphone"
-
-#: ../gtk-glade/waiting.glade.h:2
-msgid "Please wait"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:195
-#, c-format
-msgid "You have missed %i call."
-msgid_plural "You have missed %i calls."
-msgstr[0] ""
-msgstr[1] ""
-
-#: ../coreapi/linphonecore.c:223
-msgid "aborted"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:226
-msgid "completed"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:229
-msgid "missed"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:234
-#, c-format
-msgid ""
-"%s at %s\n"
-"From: %s\n"
-"To: %s\n"
-"Status: %s\n"
-"Duration: %i mn %i sec\n"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:235
-msgid "Outgoing call"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:445
-msgid ""
-"Your machine appears to be connected to an IPv6 network. By default linphone "
-"always uses IPv4. Please update your configuration if you want to use IPv6"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:739
-#, fuzzy
-msgid "Ready"
-msgstr "Preparado."
-
-#: ../coreapi/linphonecore.c:1014
-msgid "Remote end seems to have disconnected, the call is going to be closed."
-msgstr ""
-
-#: ../coreapi/linphonecore.c:1172
-msgid "Looking for telephone number destination..."
-msgstr ""
-
-#: ../coreapi/linphonecore.c:1174
-msgid "Could not resolve this number."
-msgstr ""
-
-#: ../coreapi/linphonecore.c:1239
-#, fuzzy
-msgid ""
-"Could not parse given sip address. A sip url usually looks like sip:"
-"user@domain"
-msgstr ""
-"Direccion SIP mal escrita. Una direccion SIP es <sip:username@domainname>"
-
-#: ../coreapi/linphonecore.c:1340
-msgid "Sorry, having multiple simultaneous calls is not supported yet !"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:1387
-#, fuzzy
-msgid "Contacting"
-msgstr "Contactando "
-
-#: ../coreapi/linphonecore.c:1402
-msgid "could not call"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
-msgid "Connected."
-msgstr "Conectado."
-
-#: ../coreapi/linphonecore.c:1813
-#, fuzzy
-msgid "Call ended"
-msgstr "Llamada cancelada."
-
-#: ../coreapi/linphonecore.c:2175
-msgid "No nat/firewall address supplied !"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
-#, c-format
-msgid "Invalid nat address '%s' : %s"
-msgstr ""
-
-#: ../coreapi/misc.c:134
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the pcm oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-"'modprobe snd-pcm-oss' as root to load it."
-msgstr ""
-"Tu ordenador parece estar usando los controladores de ALSA.\n"
-"Esa es la mejor eleccion. Sin embargo el modulo de emulacion pcm de OSS\n"
-"no se encuentra y linphone lo necesita. Por favor ejecute\n"
-"'modprobe snd-pcm-oss' como root para cargarlo."
-
-#: ../coreapi/misc.c:137
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the mixer oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-" 'modprobe snd-mixer-oss' as root to load it."
-msgstr ""
-"Tu ordenador parece estar usando los controladores de ALSA.\n"
-"Esa es la mejor eleccion. Sin embargo el modulo de emulacion mixer de OSS\n"
-"no se encuentra y linphone lo necesita. Por favor ejecute\n"
-" 'modprobe snd-mixer-oss' como root para cargarlo."
-
-#: ../coreapi/misc.c:610
-msgid "Stun lookup in progress..."
-msgstr ""
-
-#: ../coreapi/exevents.c:127
-#, fuzzy
-msgid "Call terminated."
-msgstr "Llamada cancelada."
-
-#: ../coreapi/exevents.c:149
-msgid "Could not reach destination."
-msgstr ""
-
-#: ../coreapi/exevents.c:158
-msgid "User is busy."
-msgstr "El usuario esta ocupado."
-
-#: ../coreapi/exevents.c:159
-msgid "User is temporarily unavailable."
-msgstr "El usuario le dice que volvera enseguida."
-
-#: ../coreapi/exevents.c:160
-#, fuzzy
-msgid "Request Cancelled."
-msgstr "Llamada cancelada."
-
-#. char *retrymsg=_("%s. Retry after %i minute(s).");
-#: ../coreapi/exevents.c:162
-msgid "User does not want to be disturbed."
-msgstr "El usuario no quiere que lo molesten."
-
-#: ../coreapi/exevents.c:163
-msgid "Call declined."
-msgstr "Llamada cancelada."
-
-#: ../coreapi/exevents.c:191
-msgid "Bad request"
-msgstr ""
-
-#: ../coreapi/exevents.c:194
-msgid "User cannot be found at given address."
-msgstr "No se encontro ningun usuario en la direccion indicada."
-
-#: ../coreapi/exevents.c:197
-msgid "Remote user cannot support any of proposed codecs."
-msgstr "El usuario remoto no soporta ninguno de los codecs propuestos."
-
-#. time out, call leg is lost
-#: ../coreapi/exevents.c:227
-msgid "Timeout."
-msgstr "Tiempo agotado."
-
-#: ../coreapi/exevents.c:230
-msgid "Remote host was found but refused connection."
-msgstr "Se encontro host remoto pero rechazo la conexion."
-
-#: ../coreapi/exevents.c:339
-#, fuzzy
-msgid "is contacting you."
-msgstr "le esta llamando."
-
-#: ../coreapi/exevents.c:424
-#, c-format
-msgid "Redirected to %s..."
-msgstr ""
-
-#: ../coreapi/exevents.c:440
-msgid ""
-"User is not reachable at the moment but he invites you\n"
-"to contact him using the following alternate resource:"
-msgstr ""
-"Usuario no disponible en este momento pero le invita\n"
-"a contactarle usando el siguiente recurso alternativo:"
-
-#: ../coreapi/exevents.c:861
-msgid "Early media."
-msgstr ""
-
-#: ../coreapi/exevents.c:972
-#, fuzzy, c-format
-msgid "Registration on %s failed: %s"
-msgstr "Se ha registrado con exito."
-
-#: ../coreapi/exevents.c:972
-msgid "no response timeout"
-msgstr ""
-
-#: ../coreapi/exevents.c:998
-#, fuzzy, c-format
-msgid "Registration on %s successful."
-msgstr "Se ha registrado con exito."
-
-#: ../coreapi/exevents.c:999
-#, fuzzy, c-format
-msgid "Unregistration on %s done."
-msgstr "Se ha registrado con exito."
-
-#. people for which we don't have yet an answer should appear as offline
-#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
-#, fuzzy
-msgid "Gone"
-msgstr "Ninguno."
-
-#: ../coreapi/presence.c:129
-msgid "Waiting for Approval"
-msgstr ""
-
-#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
-#, fuzzy
-msgid "Online"
-msgstr "linea"
-
-#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
-msgid "Busy"
-msgstr ""
-
-#: ../coreapi/presence.c:142
-msgid "Be Right Back"
-msgstr ""
-
-#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
-msgid "Away"
-msgstr "Ausente"
-
-#: ../coreapi/presence.c:151
-msgid "On The Phone"
-msgstr ""
-
-#: ../coreapi/presence.c:156
-msgid "Out To Lunch"
-msgstr ""
-
-#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
-msgid "Closed"
-msgstr ""
-
-#: ../coreapi/friend.c:35
-msgid "Unknown"
-msgstr ""
-
-#: ../coreapi/friend.c:44
-msgid "Be right back"
-msgstr ""
-
-#: ../coreapi/friend.c:50
-#, fuzzy
-msgid "On the phone"
-msgstr "linphone"
-
-#: ../coreapi/friend.c:53
-msgid "Out to lunch"
-msgstr ""
-
-#: ../coreapi/friend.c:56
-msgid "Do not disturb"
-msgstr "No molestar"
-
-#: ../coreapi/friend.c:59
-#, fuzzy
-msgid "Moved"
-msgstr "Codecs"
-
-#: ../coreapi/friend.c:62
-msgid "Using another messaging service"
-msgstr ""
-
-#: ../coreapi/friend.c:65
-#, fuzzy
-msgid "Offline"
-msgstr "linea"
-
-#: ../coreapi/friend.c:68
-msgid "Pending"
-msgstr ""
-
-#: ../coreapi/friend.c:74
-msgid "Unknown-bug"
-msgstr ""
-
-#: ../coreapi/proxy.c:221
-msgid ""
-"The sip proxy address you entered is invalid, it must start with \"sip:\" "
-"followed by a hostname."
-msgstr ""
-
-#: ../coreapi/proxy.c:227
-msgid ""
-"The sip identity you entered is invalid.\n"
-"It should look like sip:username@proxydomain, such as sip:alice@example.net"
-msgstr ""
-
-#: ../coreapi/proxy.c:634
-#, fuzzy, c-format
-msgid "Could not login as %s"
-msgstr "No se pudo encontrar el archivo pixmap: %s"
-
-#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
-msgid "ITU-G.711 alaw encoder"
-msgstr ""
-
-#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
-msgid "ITU-G.711 alaw decoder"
-msgstr ""
-
-#: ../mediastreamer2/src/alsa.c:923
-msgid "Alsa sound source"
-msgstr ""
-
-#: ../mediastreamer2/src/alsa.c:1027
-msgid "Alsa sound output"
-msgstr ""
-
-#: ../mediastreamer2/src/aqsnd.c:891
-msgid "Sound capture filter for MacOS X Audio Queue Service"
-msgstr ""
-
-#: ../mediastreamer2/src/aqsnd.c:915
-msgid "Sound playback filter for MacOS X Audio Queue Service"
-msgstr ""
-
-#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
-msgid "DTMF generator"
-msgstr ""
-
-#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
-msgid "The GSM full-rate codec"
-msgstr ""
-
-#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
-msgid "The GSM codec"
-msgstr ""
-
-#: ../mediastreamer2/src/macsnd.c:670
-msgid "Sound capture filter for MacOS X Core Audio drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/macsnd.c:684
-msgid "Sound playback filter for MacOS X Core Audio drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
-msgid "A filter to make conferencing"
-msgstr ""
-
-#: ../mediastreamer2/src/msfileplayer.c:295
-#: ../mediastreamer2/src/msfileplayer.c:313
-msgid "Raw files and wav reader"
-msgstr ""
-
-#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
-#: ../mediastreamer2/src/msfilerec_win.c:216
-#: ../mediastreamer2/src/msfilerec_win.c:234
-msgid "Wav file recorder"
-msgstr ""
-
-#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
-msgid "A filter that send several inputs to one output."
-msgstr ""
-
-#: ../mediastreamer2/src/msresample.c:221
-#: ../mediastreamer2/src/msresample.c:239
-msgid "frequency resampler"
-msgstr ""
-
-#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
-msgid "RTP output filter"
-msgstr ""
-
-#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
-msgid "RTP input filter"
-msgstr ""
-
-#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
-#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
-msgid "The free and wonderful speex codec"
-msgstr ""
-
-#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
-msgid "A filter that controls and measure sound volume"
-msgstr ""
-
-#: ../mediastreamer2/src/msv4l.c:1009
-msgid "A video4linux compatible source filter to stream pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/msv4l2.c:458
-msgid "A filter to grab pictures from Video4Linux2-powered cameras"
-msgstr ""
-
-#: ../mediastreamer2/src/nowebcam.c:1780
-msgid "A filter that outputs a static image."
-msgstr ""
-
-#: ../mediastreamer2/src/oss.c:567
-msgid "Sound capture filter for OSS drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/oss.c:581
-msgid "Sound playback filter for OSS drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
-msgid "A pixel format converter"
-msgstr ""
-
-#: ../mediastreamer2/src/sizeconv.c:204
-msgid "A video size converter"
-msgstr ""
-
-#: ../mediastreamer2/src/sizeconv.c:222
-msgid "a small video size converter"
-msgstr ""
-
-#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
-msgid "Echo canceler using speex library"
-msgstr ""
-
-#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
-msgid "A filter that reads from input and copy to its multiple outputs."
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:375
-msgid "The theora video encoder from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:393
-msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
-msgid "The theora video decoder from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
-msgid "ITU-G.711 ulaw encoder"
-msgstr ""
-
-#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
-msgid "ITU-G.711 ulaw decoder"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
-#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
-msgid "A H.263 decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:688
-msgid "A MPEG4 decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:704
-msgid "A RTP/JPEG decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:720
-msgid "A MJPEG decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:736
-msgid "A snow decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
-msgid "A video H.263 encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:856
-msgid ""
-"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
-"spec."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
-msgid "A video MPEG4 encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:888
-msgid "A video snow encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:904
-msgid "A RTP/MJPEG encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:938
-msgid ""
-"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:970
-msgid ""
-"The snow codec is royalty-free and is open-source. \n"
-"It uses innovative techniques that makes it one of most promising video "
-"codec. It is implemented within the ffmpeg project.\n"
-"However it is under development, quite unstable and compatibility with other "
-"versions cannot be guaranteed."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:990
-msgid "A MJPEG encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
-msgid "A generic video display"
-msgstr ""
-
-#: ../mediastreamer2/src/wincevideods.c:966
-#: ../mediastreamer2/src/wincevideods.c:984
-#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
-#: ../mediastreamer2/src/winvideods.c:1306
-#: ../mediastreamer2/src/winvideods.c:1324
-msgid "A video4windows compatible source filter to stream pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
-msgid "A video for windows (vfw.h) based source filter to grab pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
-msgid "ICE filter"
-msgstr ""
-
-#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
-msgid "A filter that trashes its input (useful for terminating some graphs)."
-msgstr ""
-
-#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
-msgid "Parametric sound equalizer."
-msgstr ""
-
-#: ../mediastreamer2/src/msdscap-mingw.cc:1003
-msgid "A webcam grabber based on directshow."
-msgstr ""
-
-#, fuzzy
-#~ msgid "Display filters"
-#~ msgstr "Nombre a mostrar:"
-
-#, fuzzy
-#~ msgid "_Properties"
-#~ msgstr "Propiedades de RTP"
-
-#, fuzzy
-#~ msgid "gtk-remove"
-#~ msgstr "Borrar"
-
-#, fuzzy
-#~ msgid "Proxy in use"
-#~ msgstr "Servidor Proxy"
-
-#~ msgid "Sound"
-#~ msgstr "Sonido"
-
-#, fuzzy
-#~ msgid "Default identity"
-#~ msgstr "Identidad"
-
-#, fuzzy
-#~ msgid "Proxy accounts"
-#~ msgstr "Servidor Proxy"
-
-#~ msgid "Address book"
-#~ msgstr "Agenda"
-
-#, fuzzy
-#~ msgid "Shows the address book"
-#~ msgstr "Muestra la Agenda"
-
-#, fuzzy
-#~ msgid ""
-#~ "Call or\n"
-#~ "answer"
-#~ msgstr ""
-#~ "Llamar o\n"
-#~ "Responder"
-
-#~ msgid "Show more..."
-#~ msgstr "Mostrar mas..."
-
-#~ msgid "Playback level:"
-#~ msgstr "Nivel de reproduccion:"
-
-#~ msgid "Recording level:"
-#~ msgstr "Nivel de Grabacion:"
-
-#, fuzzy
-#~ msgid "Ring level:"
-#~ msgstr "Nivel de Grabacion:"
-
-#~ msgid "Reachable"
-#~ msgstr "Disponible"
-
-#~ msgid "Busy, I'll be back in "
-#~ msgstr "Ocupado, estare de vuelta en "
-
-#~ msgid "The other party will be informed that you'll be back in X minutes"
-#~ msgstr ""
-#~ "Se le comunicara a la otra persona que estaras de vuelta en X minutos"
-
-#~ msgid "mn"
-#~ msgstr "min"
-
-#~ msgid "Moved temporarily"
-#~ msgstr "Vengo enseguida"
-
-#~ msgid "Alternative service"
-#~ msgstr "Servicio alternativo"
-
-#~ msgid "URL:"
-#~ msgstr "URL:"
-
-#~ msgid "Presence"
-#~ msgstr "Estado"
-
-#~ msgid "Press digits to send DTMFs."
-#~ msgstr "Pulsa los digitos para mandar DTMFs."
-
-#~ msgid "DTMF"
-#~ msgstr "DTMF"
-
-#~ msgid ""
-#~ "Linphone is a web-phone.\n"
-#~ "It is compatible with SIP and RTP protocols."
-#~ msgstr ""
-#~ "Linphone es un telefono para Internet.\n"
-#~ "Es compatible con los protocolos SIP y RTP."
-
-#, fuzzy
-#~ msgid "Use IPv6 network (if available)"
-#~ msgstr "El usuario le dice que volvera enseguida."
-
-#, fuzzy
-#~ msgid ""
-#~ "These options is only for users in a private network, behind a gateway. "
-#~ "If you are not in this situation, then leave this empty."
-#~ msgstr ""
-#~ "Esta opcion es solo para usuarios en una red privada, detras de un "
-#~ "cortafuegos. Siese no es tu caso, deja esto vacio."
-
-#, fuzzy
-#~ msgid "NAT traversal options (experimental)"
-#~ msgstr "Opciones para NAT transversal (experimental)"
-
-#, fuzzy
-#~ msgid "Number of buffered miliseconds (jitter compensation):"
-#~ msgstr "Numero de milisegundos en el buffer(compensacion jitter):"
-
-#~ msgid "RTP port used for audio:"
-#~ msgstr "Puerto RTP usado para audio:"
-
-#~ msgid "micro"
-#~ msgstr "microfono"
-
-#~ msgid "Recording source:"
-#~ msgstr "Fuente de grabacion:"
-
-#~ msgid "Sound properties"
-#~ msgstr "Propiedades de sonido"
-
-#~ msgid "Run sip user agent on port:"
-#~ msgstr "Ejecutar SIP user agent en el puerto:"
-
-#~ msgid "It is strongly recommended to use port 5060."
-#~ msgstr "Se recomienda encarecidamente usar el puerto 5060."
-
-#~ msgid "SIP port"
-#~ msgstr "Puerto SIP"
-
-#~ msgid "@"
-#~ msgstr "@"
-
-#~ msgid "Identity"
-#~ msgstr "Identidad"
-
-#, fuzzy
-#~ msgid "Add proxy/registrar"
-#~ msgstr "Usar el registro SIP"
-
-#~ msgid "Remote services"
-#~ msgstr "Servicios Remotos:"
-
-#, fuzzy
-#~ msgid "Authentication information"
-#~ msgstr "Informacion de codec"
-
-#~ msgid "SIP"
-#~ msgstr "SIP"
-
-#~ msgid "List of audio codecs, in order of preference:"
-#~ msgstr "Lista de codecs de audio, en orden de preferencia:"
-
-#, fuzzy
-#~ msgid "Video Codecs"
-#~ msgstr "Propiedades del codec de Audio"
-
-#~ msgid ""
-#~ "Note: Codecs in red are not usable regarding to your connection type to "
-#~ "the internet."
-#~ msgstr ""
-#~ "Nota: Los codecs en ROJO no son adecuados para tu conexion a internet."
-
-#, fuzzy
-#~ msgid "No information availlable"
-#~ msgstr "Informacion no disponible"
-
-#, fuzzy
-#~ msgid "Codec information"
-#~ msgstr "Informacion de codec"
-
-#~ msgid "Address Book"
-#~ msgstr "Agenda"
-
-#~ msgid "Select"
-#~ msgstr "Seleccionar"
-
-#~ msgid ""
-#~ "User is not reachable at the moment but he invites you to contact him "
-#~ "using the following alternate ressource:"
-#~ msgstr ""
-#~ "Usuario no disponible en este momento pero le invita a contactarle usando "
-#~ "el siguiente recurso alternativo:"
-
-#~ msgid "None."
-#~ msgstr "Ninguno."
-
-#, fuzzy
-#~ msgid "Name:"
-#~ msgstr "Nombre"
-
-#, fuzzy
-#~ msgid "None"
-#~ msgstr "Ninguno."
-
-#, fuzzy
-#~ msgid "Bad sip address: a sip address looks like sip:user@domain"
-#~ msgstr ""
-#~ "Direccion SIP mal escrita. Una direccion SIP es <sip:username@domainname>"
-
-#~ msgid "Communication ended."
-#~ msgstr "Comunicacion finalizada."
-
-#~ msgid "Call cancelled."
-#~ msgstr "Llamada cancelada."
-
-#, fuzzy
-#~ msgid "Firewall 's external ip address (in dot notations):"
-#~ msgstr "Direccion IP del cortafuegos (en notacion con puntos):"
-
-#~ msgid "Index"
-#~ msgstr "Indice"
-
-#, fuzzy
-#~ msgid "Server address"
-#~ msgstr "Direccion del Servidor:"
-
-#~ msgid "28k modem"
-#~ msgstr "modem 28k"
-
-#~ msgid "56k modem"
-#~ msgstr "modem 56k"
-
-#~ msgid "64k modem (numeris)"
-#~ msgstr "modem 64k (numeris)"
-
-#~ msgid "ADSL or Cable modem"
-#~ msgstr "ADSL o Cable"
-
-#~ msgid "Ethernet or equivalent"
-#~ msgstr "Ethernet o equivalente"
-
-#~ msgid "Connection type:"
-#~ msgstr "Tipo de conexion:"
-
-#, fuzzy
-#~ msgid ""
-#~ "Linphone could not open audio device %s. Check if your sound card is "
-#~ "fully configured and working."
-#~ msgstr ""
-#~ "Linphone no pudo abrir el dispositivo de audio. Asegurese que su tarjeta "
-#~ "de sonido esta completamente configurada y operativa."
-
-#~ msgid "Type here the sip address of the person you want to call."
-#~ msgstr "Escribe aqui la direccion SIP de la persona que quieres llamar."
-
-#~ msgid ""
-#~ "Release or\n"
-#~ "Refuse"
-#~ msgstr ""
-#~ "Descolgar o\n"
-#~ "Rechazar"
-
-#~ msgid "%s. Retry after %i minute(s)."
-#~ msgstr "%s. Reintentar tras %i minutos."
-
-#, fuzzy
-#~ msgid "Timeout..."
-#~ msgstr "Tiempo agotado."
-
-#, fuzzy
-#~ msgid ""
-#~ "Add address\n"
-#~ "book"
-#~ msgstr "Agenda"
-
-#~ msgid "Toggle this if you want to be registered on a remote server."
-#~ msgstr "Marcar opcion si desea registrarse en un servidor remoto."
-
-#~ msgid "Address of record:"
-#~ msgstr "Nombre de registro:"
-
-#~ msgid ""
-#~ "The password used for registration. On some servers it is not necessary"
-#~ msgstr ""
-#~ "La contraseña usada para registrarse. En algunos servidores no es "
-#~ "necesaria"
-
-#~ msgid "Use this registrar server as outbound proxy."
-#~ msgstr "Usar el servidor de registro como outbound proxy."
-
-#~ msgid "sip address:"
-#~ msgstr "Direccion SIP:"
-
-#~ msgid "Modify"
-#~ msgstr "Modificar"
-
-#~ msgid "Registering..."
-#~ msgstr "Registrando..."
-
-#~ msgid ""
-#~ "You are currently using the i810_audio driver.\n"
-#~ "This driver is buggy and so does not work with Linphone.\n"
-#~ "We suggest that you replace it by its equivalent ALSA driver,\n"
-#~ "either with packages from your distribution, or by downloading\n"
-#~ "ALSA drivers at http://www.alsa-project.org."
-#~ msgstr ""
-#~ "Estas usando actualmente el controlador i810_audio.\n"
-#~ "Ese controlador tiene errores y por tanto no funciona con Linphone.\n"
-#~ "Le recomendamos que lo sustituya por su controlador equivalente de ALSA,\n"
-#~ "ya sea mediante paquetes de su distribucion, o descargando\n"
-#~ "controladores ALSA de http://www.alsa-project.org."
-
-#~ msgid "Unregistration successfull."
-#~ msgstr "Cancelacion del registro completada."
-
-#~ msgid "C: 2001"
-#~ msgstr "Abril 2001"
-
-#~ msgid "Select network interface to use:"
-#~ msgstr "Selecciona la interfaz de red para usar:"
-
-#~ msgid "Network interface properties"
-#~ msgstr "Propiedades de Interfaz de Red:"
-
-#~ msgid "RTP"
-#~ msgstr "RTP"
-
-#~ msgid "Threads not supported by glib. Upgrade your glib.\n"
-#~ msgstr "Threads no soportados por glib. Actualize su glib.\n"
-
-#~ msgid "Run linphone as a gnome-applet."
-#~ msgstr "Lanzar linphone como un gnome-applet."
-
-#~ msgid "Run linphone as a daemon (for use without gnome)."
-#~ msgstr "Ejecutar linphone como demonio (para uso sin gnome)."
-
-#~ msgid ""
-#~ "Cannot find network previously used interface %s.\n"
-#~ "If your computer is temporary connected to the internet, please connect "
-#~ "and then run linphone.\n"
-#~ "If you want to change your default network interface, go to the "
-#~ "parameters 'box."
-#~ msgstr ""
-#~ "No se puede encontrar la interfaz de red usada previamente %s.\n"
-#~ "Si tu ordenador esta conectado temporalmente a Internet, por favor "
-#~ "conecta y entonces ejecuta linphone.\n"
-#~ "Si quieres cambiar tu interfaz de red predeterminada, ve a la opcion "
-#~ "Parametros."
-
-#, fuzzy
-#~ msgid ""
-#~ "Linphone cannot open the audio device.\n"
-#~ "It may be caused by other programs using it.\n"
-#~ "Do you want linphone to kill these programs (esd or artsd) ?"
-#~ msgstr ""
-#~ "Linphone no puede abrir el dispositivo de audio.\n"
-#~ " Puede deberse a que otros programas lo esten usando.\n"
-#~ "¿ Quiere que Linphone cierre esos programas (esd o artsd) ?"
-
-#~ msgid "Use it as a:"
-#~ msgstr "Usarlo como un:"
-
-#~ msgid "Outbound proxy"
-#~ msgstr "Outbound proxy"
-
-#~ msgid ""
-#~ "Togle this button if the registrar must be used to proxy calls through a "
-#~ "firewall."
-#~ msgstr ""
-#~ "Marcar esta opcion si el servidor de registro debe ser usado para "
-#~ "llamadas a proxy a traves de un cortafuegos."
-
-#~ msgid "OSS"
-#~ msgstr "OSS"
-
-#~ msgid "ALSA"
-#~ msgstr "ALSA"
-
-#~ msgid "Automatically kill applications using soundcard when needed"
-#~ msgstr ""
-#~ "Cerrar aplicaciones que usen la tarjeta de sonido cuando se necesite."
-
-#~ msgid ""
-#~ "Your computer is connected to several networks. Check in the global "
-#~ "parameters if Linphone uses the one that you want."
-#~ msgstr ""
-#~ "Tu ordenador esta conectado a varias redes. Revisa en los Parametros "
-#~ "globales si Linphone usa la que necesitas."
-
-#~ msgid ""
-#~ "Linphone failed to open the sound device. See the README file included in "
-#~ "the distribution for details."
-#~ msgstr ""
-#~ "Linphone fallo al abrir el dispositivo de sonido. Vea el archivo README "
-#~ "incluido en la distribucion para mas detalles."
-
-#~ msgid "Interface not found."
-#~ msgstr "Interfaz no encontrada."
-
-#~ msgid "Warning"
-#~ msgstr "Atencion"
-
-#~ msgid ""
-#~ "Linphone cannot open the sound device. It may be caused by other programs "
-#~ "using it. Do you want linphone to kill these programs (esd or artsd) ?"
-#~ msgstr ""
-#~ "Linphone no puede abrir el dispositivo de sonido. Puede deberse a que "
-#~ "otros programaslo esten usando. ¿ Quiere que Linphone cierre esos "
-#~ "programas (esd o artsd) ?"
-
-#~ msgid "Linphone shutdowns..."
-#~ msgstr "Linphone esta terminando..."
-
-#~ msgid ""
-#~ "Please, wait a few seconds untils linphone unregisters your sip addess "
-#~ "from registrar server..."
-#~ msgstr ""
-#~ "Por favor, espere unos segundos hasta que Linphone cancele el registro de "
-#~ "su direccion SIP en el servidor de registros..."
-
-#~ msgid "Bad formuled sip address."
-#~ msgstr "Direccion SIP mal escrita."
-
-#~ msgid "Couldn't create pixmap from file: %s"
-#~ msgstr "No se pudo crear pixmap desde el archivo: %s"
-
-#~ msgid ""
-#~ "Linphone did not detect any valid network interface. If you use a "
-#~ "temporary internet connection, please connect and then run linphone again."
-#~ msgstr ""
-#~ "Linphone no detecto ninguna interfaz de red valida. Si usas una conexion "
-#~ "temporal a Internet, por favor conecta y vuelve a ejecutar Linphone."
-
-#~ msgid "List of network interfaces on your system."
-#~ msgstr "Lista de interfaces de red en tu sistema."
-
-#~ msgid ""
-#~ "RTP est le mode de transport de la voix. Modifier ces paramètres pour "
-#~ "tenter d'améliorer la qualité de la communication si celle-ci est "
-#~ "dégradée."
-#~ msgstr ""
-#~ "RTP es el modelo de transporte de la voz. Modifica estos parametros para "
-#~ "intentar mejorar la calidad de la comunicacion, si es que.es mala."
-
-#~ msgid "Use rtp port:"
-#~ msgstr "Puerto RTP:"
-
-#~ msgid ""
-#~ "Les codecs ou vocodeurs sont les algorithmes utilisés pour compresser la "
-#~ "voix."
-#~ msgstr ""
-#~ "Los codecs o codificadores/decodificadores son los algoritmos usados para "
-#~ "comprimir la voz."
-
-#~ msgid ""
-#~ "Vous pouvez ajuster avec cet onglet des paramètre liés à votre carte son."
-#~ msgstr "Puede modificar estos parametros a su gusto."
diff --git a/linphone/po/fr.po b/linphone/po/fr.po
deleted file mode 100644 (file)
index 5126073..0000000
+++ /dev/null
@@ -1,1549 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) 2001 Free Software Foundation, Inc.
-# Simon Morlat <simon.morlat@linphone.org>, 2001.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Linphone 0.9.1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-10-16 15:24+0200\n"
-"PO-Revision-Date: 2002-12-06 17:33+0100\n"
-"Last-Translator: Simon Morlat <simon.morlat@linphone.org>\n"
-"Language-Team: french <fr@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
-#: ../gtk-glade/support.c:102
-#, c-format
-msgid "Couldn't find pixmap file: %s"
-msgstr "Icone non trouvée: %s"
-
-#: ../gtk-glade/chat.c:27
-#, c-format
-msgid "Chat with %s"
-msgstr "Chat avec %s"
-
-#: ../gtk-glade/main.c:90
-msgid "log to stdout some debug information while running."
-msgstr ""
-
-#: ../gtk-glade/main.c:97
-msgid "Start only in the system tray, do not show the main interface."
-msgstr ""
-
-#: ../gtk-glade/main.c:104
-msgid "address to call right now"
-msgstr ""
-
-#: ../gtk-glade/main.c:111
-msgid "if set automatically answer incoming calls"
-msgstr ""
-
-#: ../gtk-glade/main.c:119
-msgid ""
-"Specifiy a working directory (should be the base of the installation, eg: c:"
-"\\Program Files\\Linphone)"
-msgstr ""
-
-#: ../gtk-glade/main.c:675
-#, c-format
-msgid "Incoming call from %s"
-msgstr "Appel entrant de %s"
-
-#: ../gtk-glade/main.c:707
-#, c-format
-msgid ""
-"%s would like to add you to his contact list.\n"
-"Would you allow him to see your presence status or add him to your contact "
-"list ?\n"
-"If you answer no, this person will be temporarily blacklisted."
-msgstr ""
-
-#: ../gtk-glade/main.c:777
-#, fuzzy, c-format
-msgid ""
-"Please enter your password for username <i>%s</i>\n"
-" at domain <i>%s</i>:"
-msgstr "Entrez votre mot de passe pour le domaine %s"
-
-#: ../gtk-glade/main.c:871
-msgid "Website link"
-msgstr ""
-
-#: ../gtk-glade/main.c:907
-msgid "Linphone - a video internet phone"
-msgstr "Linphone - un téléphone video pour l'internet"
-
-#: ../gtk-glade/main.c:926
-#, c-format
-msgid "%s (Default)"
-msgstr "%s (par défaut)"
-
-#: ../gtk-glade/main.c:1168
-msgid "A free SIP video-phone"
-msgstr "Un visiophone libre"
-
-#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
-#: ../gtk-glade/contact.glade.h:3
-msgid "Name"
-msgstr "Nom"
-
-#: ../gtk-glade/friendlist.c:212
-msgid "Presence status"
-msgstr "Info de présence"
-
-#: ../gtk-glade/friendlist.c:243
-#, fuzzy, c-format
-msgid "Search in %s directory"
-msgstr "Rechercher dans l'annuaire"
-
-#: ../gtk-glade/friendlist.c:432
-msgid "Invalid sip contact !"
-msgstr "Contact sip invalide !"
-
-#: ../gtk-glade/friendlist.c:474
-#, c-format
-msgid "Call %s"
-msgstr "Appeler %s"
-
-#: ../gtk-glade/friendlist.c:475
-#, c-format
-msgid "Send text to %s"
-msgstr "Chatter avec %s"
-
-#: ../gtk-glade/friendlist.c:476
-#, c-format
-msgid "Edit contact '%s'"
-msgstr "Editer le contact '%s'"
-
-#: ../gtk-glade/friendlist.c:477
-#, c-format
-msgid "Delete contact '%s'"
-msgstr "Supprimer le contact '%s'"
-
-#: ../gtk-glade/friendlist.c:519
-#, c-format
-msgid "Add new contact from %s directory"
-msgstr "Ajouter un contact depuis l'annuaire %s"
-
-#: ../gtk-glade/propertybox.c:251
-msgid "Rate (Hz)"
-msgstr "Fréquence (Hz)"
-
-#: ../gtk-glade/propertybox.c:257
-msgid "Status"
-msgstr "Etat"
-
-#: ../gtk-glade/propertybox.c:263
-msgid "Min bitrate (kbit/s)"
-msgstr "Débit min. (kbit/s)"
-
-#: ../gtk-glade/propertybox.c:269
-msgid "Parameters"
-msgstr "Paramètres"
-
-#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
-msgid "Enabled"
-msgstr "Activé"
-
-#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
-msgid "Disabled"
-msgstr "Désactivé"
-
-#: ../gtk-glade/propertybox.c:480
-msgid "Account"
-msgstr "Compte"
-
-#: ../gtk-glade/propertybox.c:620
-msgid "English"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:621
-msgid "French"
-msgstr "Français"
-
-#: ../gtk-glade/propertybox.c:622
-msgid "Swedish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:623
-msgid "Italian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:624
-msgid "Spanish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:625
-msgid "Brazilian Portugese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:626
-msgid "Polish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:627
-msgid "German"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:628
-msgid "Russian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:629
-msgid "Japanese"
-msgstr "日本語"
-
-#: ../gtk-glade/propertybox.c:630
-msgid "Dutch"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:631
-msgid "Hungarian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:632
-msgid "Czech"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:633
-msgid "Chinese"
-msgstr "简体中文"
-
-#: ../gtk-glade/propertybox.c:690
-msgid ""
-"You need to restart linphone for the new language selection to take effect."
-msgstr ""
-"La nouvelle selection de langue prendra effet au prochain démarrage de "
-"linphone."
-
-#: ../gtk-glade/update.c:80
-#, c-format
-msgid ""
-"A more recent version is availalble from %s.\n"
-"Would you like to open a browser to download it ?"
-msgstr ""
-
-#: ../gtk-glade/update.c:91
-msgid "You are running the lastest version."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:66
-msgid "Firstname, Lastname"
-msgstr "Prénom, Nom"
-
-#: ../gtk-glade/buddylookup.c:73
-msgid "SIP address"
-msgstr "Adresse SIP"
-
-#: ../gtk-glade/buddylookup.c:121
-msgid "Error communicating with server."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:125
-msgid "Connecting..."
-msgstr "Connexion..."
-
-#: ../gtk-glade/buddylookup.c:129
-msgid "Connected"
-msgstr "Connecté"
-
-#: ../gtk-glade/buddylookup.c:133
-msgid "Receiving data..."
-msgstr "Reception des données"
-
-#: ../gtk-glade/buddylookup.c:141
-#, c-format
-msgid "Found %i contact"
-msgid_plural "Found %i contacts"
-msgstr[0] "%i contact trouvé."
-msgstr[1] "%i contacts trouvés."
-
-#: ../gtk-glade/setupwizard.c:25
-msgid ""
-"Welcome !\n"
-"This assistant will help you to use a SIP account for your calls."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:34
-msgid "Create an account by choosing a username"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:35
-msgid "I have already an account and just want to use it"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:53
-msgid "Please choose a username:"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:54
-msgid "Username:"
-msgstr "Nom d'utilisateur:"
-
-#: ../gtk-glade/setupwizard.c:92
-#, c-format
-msgid "Checking if '%s' is available..."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
-msgid "Please wait..."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:101
-msgid "Sorry this username already exists. Please try a new one."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
-msgid "Ok !"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
-msgid "Communication problem, please try again later."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:134
-msgid "Thank you. Your account is now configured and ready for use."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:228
-msgid "Welcome to the account setup assistant"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:232
-msgid "Account setup assistant"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:236
-#, fuzzy
-msgid "Choosing a username"
-msgstr "Votre nom d'utilisateur"
-
-#: ../gtk-glade/setupwizard.c:240
-msgid "Verifying"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:244
-#, fuzzy
-msgid "Confirmation"
-msgstr "Information sur le contact"
-
-#: ../gtk-glade/setupwizard.c:249
-msgid "Creating your account"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:253
-msgid "Now ready !"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:98
-#, fuzzy
-msgid "<b>Calling...</b>"
-msgstr "<b>Usage de l'IPv6</b>"
-
-#: ../gtk-glade/incall_view.c:122
-#, fuzzy
-msgid "<b>In call with</b>"
-msgstr "Raccrocher"
-
-#: ../gtk-glade/incall_view.c:124
-msgid "00::00::00"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:140
-#, c-format
-msgid "%02i::%02i::%02i"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:158
-#, fuzzy
-msgid "<b>Call ended.</b>"
-msgstr "Appel terminé."
-
-#: ../gtk-glade/incall_view.c:176
-msgid "Unmute"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
-msgid "Mute"
-msgstr ""
-
-#: ../gtk-glade/loginframe.c:82
-#, fuzzy, c-format
-msgid "Please enter login information for %s"
-msgstr "Entrez votre mot de passe pour le domaine %s"
-
-#: ../gtk-glade/main.glade.h:1
-msgid "#"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:2
-msgid "*"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:3
-msgid "0"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:4
-msgid "1"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:5
-msgid "2"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:6
-msgid "3"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:7
-msgid "4"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:8
-msgid "5"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:9
-msgid "6"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:10
-msgid "7"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:11
-msgid "8"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:12
-msgid "9"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:13
-msgid "<b>Contact list</b>"
-msgstr "<b>List de contacts</b>"
-
-#: ../gtk-glade/main.glade.h:14
-msgid "<b>Terminate call</b>"
-msgstr "Raccrocher"
-
-#: ../gtk-glade/main.glade.h:15
-#, fuzzy
-msgid "<b>Welcome !</b>"
-msgstr "<b>Rechercher une personne</b>"
-
-#: ../gtk-glade/main.glade.h:16
-msgid "A"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:17
-msgid ""
-"ADSL\n"
-"Fiber Channel"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:19
-msgid ""
-"All users\n"
-"Online users"
-msgstr ""
-"Tous\n"
-"En ligne"
-
-#: ../gtk-glade/main.glade.h:21
-msgid "Assistant"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:22
-msgid "Audio & Video"
-msgstr "Audio et video"
-
-#: ../gtk-glade/main.glade.h:23
-msgid "Audio only"
-msgstr "Audio seul"
-
-#: ../gtk-glade/main.glade.h:24
-msgid "Automatically log me in"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:25
-msgid "B"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
-msgid "C"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:27
-msgid "Check for updates"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:28
-msgid "D"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:29
-msgid "Default"
-msgstr "Par défaut"
-
-#: ../gtk-glade/main.glade.h:30
-msgid "Digits"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:31
-msgid "Duration"
-msgstr "Durée"
-
-#: ../gtk-glade/main.glade.h:32
-msgid "Duration:"
-msgstr "Durée:"
-
-#: ../gtk-glade/main.glade.h:33
-msgid "Enable self-view"
-msgstr "Se voir"
-
-#: ../gtk-glade/main.glade.h:34
-msgid "Enter username, phone number, or full sip address"
-msgstr ""
-"Entrez un nom d'utilisateur, un numéro de téléphone, ou une addresse SIP"
-
-#: ../gtk-glade/main.glade.h:35
-msgid "In call"
-msgstr "Appel en cours"
-
-#: ../gtk-glade/main.glade.h:36
-msgid "Internet connection:"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:37
-#, fuzzy
-msgid "Login information"
-msgstr "Information sur le contact"
-
-#: ../gtk-glade/main.glade.h:38
-msgid "Lookup:"
-msgstr "Rechercher:"
-
-#: ../gtk-glade/main.glade.h:39
-msgid "Main view"
-msgstr "Vue principale"
-
-#: ../gtk-glade/main.glade.h:41
-msgid "My current identity:"
-msgstr "Mon identité sip :"
-
-#: ../gtk-glade/main.glade.h:42
-#, fuzzy
-msgid "Password"
-msgstr "Mot de passe:"
-
-#: ../gtk-glade/main.glade.h:43
-msgid "SIP address or phone number:"
-msgstr "Addresse SIP ou numéro"
-
-#: ../gtk-glade/main.glade.h:44
-msgid "Show current call"
-msgstr "Voir l'appel en cours"
-
-#: ../gtk-glade/main.glade.h:45
-msgid "Start call"
-msgstr "Démarrer l'appel"
-
-#: ../gtk-glade/main.glade.h:46
-msgid "Terminate call"
-msgstr "Raccrocher"
-
-#: ../gtk-glade/main.glade.h:47
-#, fuzzy
-msgid "Username"
-msgstr "Nom d'utilisateur:"
-
-#: ../gtk-glade/main.glade.h:48
-msgid "_Linphone"
-msgstr "_Linphone"
-
-#: ../gtk-glade/main.glade.h:49
-msgid "_Modes"
-msgstr "_Modes"
-
-#: ../gtk-glade/main.glade.h:50
-#, fuzzy
-msgid "gtk-connect"
-msgstr "Connecté"
-
-#: ../gtk-glade/main.glade.h:51
-msgid "gtk-find"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:52
-msgid "in"
-msgstr "dans"
-
-#: ../gtk-glade/main.glade.h:53
-msgid "label"
-msgstr ""
-
-#: ../gtk-glade/about.glade.h:1
-msgid "About linphone"
-msgstr "A propos de linphone"
-
-#: ../gtk-glade/about.glade.h:2
-msgid "An internet video phone using the standart SIP (rfc3261) protocol."
-msgstr "Un visiophone pour l'internet, compatible SIP (rfc3261)"
-
-#: ../gtk-glade/about.glade.h:3
-msgid "Created by Simon Morlat\n"
-msgstr "Créé par Simon Morlat\n"
-
-#: ../gtk-glade/about.glade.h:5
-msgid ""
-"fr: Simon Morlat\n"
-"en: Simon Morlat and Delphine Perreau\n"
-"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
-"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
-"sv: Daniel Nylander <po@danielnylander.se>\n"
-"es: Jesus Benitez <gnelson at inMail dot sk>\n"
-"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
-"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
-"pl: Robert Nasiadek <darkone@darkone.pl>\n"
-"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
-"hu: anonymous\n"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:1
-#, fuzzy
-msgid "<b>Contact information</b>"
-msgstr "Information sur le contact"
-
-#: ../gtk-glade/contact.glade.h:2
-msgid "Allow this contact to see my presence status"
-msgstr "Autoriser ce contact à voir ma présence"
-
-#: ../gtk-glade/contact.glade.h:4
-msgid "SIP Address"
-msgstr "Adresse SIP"
-
-#: ../gtk-glade/contact.glade.h:5
-msgid "Show this contact presence status"
-msgstr "Voir l'état de présence de ce contact"
-
-#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
-#: ../gtk-glade/sip_account.glade.h:9
-msgid "gtk-cancel"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
-#: ../gtk-glade/sip_account.glade.h:10
-msgid "gtk-ok"
-msgstr ""
-
-#: ../gtk-glade/log.glade.h:1
-msgid "Linphone debug window"
-msgstr "Fenêtre de débogage de linphone"
-
-#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
-#: ../gtk-glade/chatroom.glade.h:2
-msgid "gtk-close"
-msgstr ""
-
-#: ../gtk-glade/password.glade.h:1
-msgid "Linphone - Authentication required"
-msgstr "Linphone - Autentification requise"
-
-#: ../gtk-glade/password.glade.h:2
-msgid "Password:"
-msgstr "Mot de passe:"
-
-#: ../gtk-glade/password.glade.h:3
-msgid "Please enter the domain password"
-msgstr "Entrez votre mot de passe pour le domaine"
-
-#: ../gtk-glade/password.glade.h:4
-msgid "UserID"
-msgstr ""
-
-#: ../gtk-glade/call_logs.glade.h:1
-msgid "Call history"
-msgstr "Historique des appels"
-
-#: ../gtk-glade/sip_account.glade.h:1
-msgid "Configure a SIP account"
-msgstr "Configuer un compte SIP"
-
-#: ../gtk-glade/sip_account.glade.h:2
-msgid "Linphone - Configure a SIP account"
-msgstr "Linphone - Configurer un compte SIP"
-
-#: ../gtk-glade/sip_account.glade.h:3
-msgid "Publish presence information"
-msgstr "Publier la présence"
-
-#: ../gtk-glade/sip_account.glade.h:4
-msgid "Register at startup"
-msgstr "S'enregistrer au démarrage"
-
-#: ../gtk-glade/sip_account.glade.h:5
-msgid "Registration duration (sec):"
-msgstr "Période d'enregistrement (secondes):"
-
-#: ../gtk-glade/sip_account.glade.h:6
-msgid "Route (optional):"
-msgstr "Route (optionnel):"
-
-#: ../gtk-glade/sip_account.glade.h:7
-msgid "SIP Proxy address:"
-msgstr "Addresse du proxy SIP:"
-
-#: ../gtk-glade/sip_account.glade.h:8
-msgid "Your SIP identity:"
-msgstr "Votre identité SIP:"
-
-#: ../gtk-glade/sip_account.glade.h:11
-msgid "sip:"
-msgstr ""
-
-#: ../gtk-glade/chatroom.glade.h:1
-msgid "Send"
-msgstr "Envoyer"
-
-#: ../gtk-glade/incoming_call.glade.h:1
-msgid "Accept"
-msgstr "Accepter"
-
-#: ../gtk-glade/incoming_call.glade.h:2
-msgid "Decline"
-msgstr "Refuser"
-
-#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
-msgid "Incoming call"
-msgstr "Appel entrant"
-
-#: ../gtk-glade/incoming_call.glade.h:4
-msgid "Incoming call from"
-msgstr "Appel entrant de"
-
-#: ../gtk-glade/incoming_call.glade.h:5
-msgid "Linphone - Incoming call"
-msgstr "Linphone - Appel entrant"
-
-#: ../gtk-glade/parameters.glade.h:1
-msgid "0 stands for \"unlimited\""
-msgstr "Indiquez 0 pour ne pas mettre de limite"
-
-#: ../gtk-glade/parameters.glade.h:2
-msgid "<b>Audio</b>"
-msgstr "<b>Son</b>"
-
-#: ../gtk-glade/parameters.glade.h:3
-msgid "<b>Bandwidth control</b>"
-msgstr "<b>Gestion de la bande passante</b>"
-
-#: ../gtk-glade/parameters.glade.h:4
-msgid "<b>Codecs</b>"
-msgstr "<b>Codecs</b>"
-
-#: ../gtk-glade/parameters.glade.h:5
-msgid "<b>Default identity</b>"
-msgstr "<b>Identité par défaut</b>"
-
-#: ../gtk-glade/parameters.glade.h:6
-#, fuzzy
-msgid "<b>Language</b>"
-msgstr "<b>Usage de l'IPv6</b>"
-
-#: ../gtk-glade/parameters.glade.h:7
-msgid "<b>NAT and Firewall</b>"
-msgstr "<b>Paramètres liés au pare-feu</b>"
-
-#: ../gtk-glade/parameters.glade.h:8
-msgid "<b>Ports</b>"
-msgstr "<b>Ports utilisés</b>"
-
-#: ../gtk-glade/parameters.glade.h:9
-msgid "<b>Privacy</b>"
-msgstr "<b>Sécurité</b>"
-
-#: ../gtk-glade/parameters.glade.h:10
-msgid "<b>Proxy accounts</b>"
-msgstr "<b>Comptes SIP via des proxy</b>"
-
-#: ../gtk-glade/parameters.glade.h:11
-msgid "<b>Transport</b>"
-msgstr "<b>Transport</b>"
-
-#: ../gtk-glade/parameters.glade.h:12
-msgid "<b>Video</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:13
-msgid "ALSA special device (optional):"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:14
-msgid "Add"
-msgstr "Ajouter"
-
-#: ../gtk-glade/parameters.glade.h:15
-msgid "Audio RTP/UDP:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:16
-msgid ""
-"Audio codecs\n"
-"Video codecs"
-msgstr ""
-"Codecs audio\n"
-"Codecs video"
-
-#: ../gtk-glade/parameters.glade.h:18
-msgid "Behind NAT / Firewall (specify gateway IP below)"
-msgstr "Derrière un pare-feu (spécifier la passerelle ci dessous)"
-
-#: ../gtk-glade/parameters.glade.h:19
-msgid "Behind NAT / Firewall (use STUN to resolve)"
-msgstr "Derrière un pare-feu (utiliser STUN)"
-
-#: ../gtk-glade/parameters.glade.h:21
-msgid "CIF"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:22
-msgid "Capture device:"
-msgstr "Périphérique de capture:"
-
-#: ../gtk-glade/parameters.glade.h:23
-msgid "Codecs"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:24
-msgid "Direct connection to the Internet"
-msgstr "Connection directe à l'Internet"
-
-#: ../gtk-glade/parameters.glade.h:25
-msgid "Disable"
-msgstr "Désactive"
-
-#: ../gtk-glade/parameters.glade.h:26
-msgid "Done"
-msgstr "Fermer"
-
-#: ../gtk-glade/parameters.glade.h:27
-msgid "Download speed limit in Kbit/sec:"
-msgstr "Limite de débit descendant en kbits/sec:"
-
-#: ../gtk-glade/parameters.glade.h:28
-msgid "Edit"
-msgstr "Editer"
-
-#: ../gtk-glade/parameters.glade.h:29
-msgid "Enable"
-msgstr "Active"
-
-#: ../gtk-glade/parameters.glade.h:30
-msgid "Enable echo cancellation"
-msgstr "Activer l'annulation d'écho"
-
-#: ../gtk-glade/parameters.glade.h:31
-msgid "Erase all passwords"
-msgstr "Effacer tous les mots de passe"
-
-#: ../gtk-glade/parameters.glade.h:32
-msgid "Manage SIP Accounts"
-msgstr "Gérer mes comptes SIP"
-
-#: ../gtk-glade/parameters.glade.h:33
-msgid "Multimedia settings"
-msgstr "Paramètres multimedia"
-
-#: ../gtk-glade/parameters.glade.h:34
-msgid "Network settings"
-msgstr "Paramètres réseau"
-
-#: ../gtk-glade/parameters.glade.h:35
-msgid "Playback device:"
-msgstr "Périphérique d'écoute:"
-
-#: ../gtk-glade/parameters.glade.h:36
-msgid "Prefered video resolution:"
-msgstr "Résolution video préférée:"
-
-#: ../gtk-glade/parameters.glade.h:37
-msgid "Public IP address:"
-msgstr "Addresse IP publique:"
-
-#: ../gtk-glade/parameters.glade.h:38
-msgid ""
-"Register to FONICS\n"
-"virtual network !"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:40
-msgid "Remove"
-msgstr "Enlever"
-
-#: ../gtk-glade/parameters.glade.h:41
-msgid "Ring device:"
-msgstr "Périphérique de sonnerie:"
-
-#: ../gtk-glade/parameters.glade.h:42
-msgid "Ring sound:"
-msgstr "Sonnerie:"
-
-#: ../gtk-glade/parameters.glade.h:43
-msgid "SIP (UDP):"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:44
-msgid "Send DTMFs as SIP info"
-msgstr "Envoyer les digits en tant que SIP INFO"
-
-#: ../gtk-glade/parameters.glade.h:45
-msgid "Set Maximum Transmission Unit:"
-msgstr "Spécifier la Maximum Transmission Unit"
-
-#: ../gtk-glade/parameters.glade.h:46
-msgid "Settings"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:47
-msgid "Stun server:"
-msgstr "Serveur STUN:"
-
-#: ../gtk-glade/parameters.glade.h:48
-msgid "This section defines your SIP address when not using a SIP account"
-msgstr ""
-"Cette rubrique permet de définir son addresse SIP lorsqu'on ne possède pas "
-"de compte SIP"
-
-#: ../gtk-glade/parameters.glade.h:49
-msgid "Upload speed limit in Kbit/sec:"
-msgstr "Limite de débit montant en kbits/sec:"
-
-#: ../gtk-glade/parameters.glade.h:50
-msgid "Use IPv6 instead of IPv4"
-msgstr "Utiliser l'IPv6 au lieu d'IPv4"
-
-#: ../gtk-glade/parameters.glade.h:51
-msgid "User interface"
-msgstr "Interface utilisateur"
-
-#: ../gtk-glade/parameters.glade.h:52
-msgid "Video RTP/UDP:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:53
-msgid "Video input device:"
-msgstr "Périphérique d'entrée video"
-
-#: ../gtk-glade/parameters.glade.h:54
-msgid "Your display name (eg: John Doe):"
-msgstr "Votre nom d'affichage (ex: James Bond)"
-
-#: ../gtk-glade/parameters.glade.h:55
-msgid "Your resulting SIP address:"
-msgstr "Votre addresse SIP:"
-
-#: ../gtk-glade/parameters.glade.h:56
-msgid "Your username:"
-msgstr "Votre nom d'utilisateur"
-
-#: ../gtk-glade/parameters.glade.h:57
-msgid "a sound card\n"
-msgstr "une carte son\n"
-
-#: ../gtk-glade/parameters.glade.h:59
-msgid "default camera"
-msgstr "camera par défaut"
-
-#: ../gtk-glade/parameters.glade.h:60
-msgid "default soundcard"
-msgstr "Carte son par défaut"
-
-#: ../gtk-glade/parameters.glade.h:61
-msgid "default soundcard\n"
-msgstr "Carte son par défaut\n"
-
-#: ../gtk-glade/parameters.glade.h:63
-msgid "gtk-go-down"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:64
-msgid "gtk-go-up"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:65
-msgid "gtk-media-play"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:1
-msgid "<b>Search somebody</b>"
-msgstr "<b>Rechercher une personne</b>"
-
-#: ../gtk-glade/buddylookup.glade.h:2
-msgid "Add to my list"
-msgstr "Ajouter à ma liste"
-
-#: ../gtk-glade/buddylookup.glade.h:3
-msgid "Search contacts in directory"
-msgstr "Rechercher dans l'annuaire"
-
-#: ../gtk-glade/waiting.glade.h:1
-msgid "Linphone"
-msgstr "Linphone"
-
-#: ../gtk-glade/waiting.glade.h:2
-msgid "Please wait"
-msgstr "En attente"
-
-#: ../coreapi/linphonecore.c:195
-#, c-format
-msgid "You have missed %i call."
-msgid_plural "You have missed %i calls."
-msgstr[0] "Vous avez manqué %i appel"
-msgstr[1] "Vous avez manqué %i appels"
-
-#: ../coreapi/linphonecore.c:223
-msgid "aborted"
-msgstr "abandonné"
-
-#: ../coreapi/linphonecore.c:226
-msgid "completed"
-msgstr "terminé"
-
-#: ../coreapi/linphonecore.c:229
-msgid "missed"
-msgstr "manqué"
-
-#: ../coreapi/linphonecore.c:234
-#, c-format
-msgid ""
-"%s at %s\n"
-"From: %s\n"
-"To: %s\n"
-"Status: %s\n"
-"Duration: %i mn %i sec\n"
-msgstr ""
-"%s le %s\nDe: %s\n"
-"A destination de: %s\n"
-"Etat: %s\n"
-"Durée: %i mn %i sec\n"
-
-#: ../coreapi/linphonecore.c:235
-msgid "Outgoing call"
-msgstr "Appel sortant"
-
-#: ../coreapi/linphonecore.c:445
-msgid ""
-"Your machine appears to be connected to an IPv6 network. By default linphone "
-"always uses IPv4. Please update your configuration if you want to use IPv6"
-msgstr ""
-"Votre machine semble être connectée à un réseau IPv6. Par defaut linphone "
-"utilise toujours de l'IPv4. Merci de mettre à jour votre configuration si "
-"vous souhaitez utilisez un réseau IPv6."
-
-#: ../coreapi/linphonecore.c:739
-msgid "Ready"
-msgstr "Prêt."
-
-#: ../coreapi/linphonecore.c:1014
-msgid "Remote end seems to have disconnected, the call is going to be closed."
-msgstr "Votre correspondant a du se déconnecter, l'appel va être raccroché."
-
-#: ../coreapi/linphonecore.c:1172
-msgid "Looking for telephone number destination..."
-msgstr "Recherche de la destination du numéro de téléphone..."
-
-#: ../coreapi/linphonecore.c:1174
-msgid "Could not resolve this number."
-msgstr "La destination n'a pu être trouvée."
-
-#: ../coreapi/linphonecore.c:1239
-msgid ""
-"Could not parse given sip address. A sip url usually looks like sip:"
-"user@domain"
-msgstr ""
-"Adresse SIP mal formulée. Une address sip ressemble à <sip:nom@domaine>"
-
-#: ../coreapi/linphonecore.c:1340
-msgid "Sorry, having multiple simultaneous calls is not supported yet !"
-msgstr "Désolé, vous ne pouvez appeler plusieurs personnes simultanément !"
-
-#: ../coreapi/linphonecore.c:1387
-msgid "Contacting"
-msgstr "Appel de"
-
-#: ../coreapi/linphonecore.c:1402
-msgid "could not call"
-msgstr "Echec"
-
-#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
-msgid "Connected."
-msgstr "En ligne."
-
-#: ../coreapi/linphonecore.c:1813
-msgid "Call ended"
-msgstr "Appel terminé."
-
-#: ../coreapi/linphonecore.c:2175
-msgid "No nat/firewall address supplied !"
-msgstr "Pas d'addresse NAT fournie"
-
-#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
-#, c-format
-msgid "Invalid nat address '%s' : %s"
-msgstr "Adresse nat invalide '%s' : %s"
-
-#: ../coreapi/misc.c:134
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the pcm oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-"'modprobe snd-pcm-oss' as root to load it."
-msgstr ""
-"Votre ordinateur semble utiliser les pilotes sons ALSA.\n"
-"C'est en g��al le meilleur choix, cependant un module\n"
-"d'emulation oss est manquant et linphone en a besoin.\n"
-"Veuillez s'il vous plait executer la commande\n"
-"'modprobe snd-pcm-oss' en tant que root afin de le charger."
-
-#: ../coreapi/misc.c:137
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the mixer oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-" 'modprobe snd-mixer-oss' as root to load it."
-msgstr ""
-"Votre ordinateur semble utiliser les pilotes sons ALSA. C'est en g��al le\n"
-"meilleur choix, cependant un module d'emulation est manquant et linphone en\n"
-"a besoin. Veuillez s'il vous plait executer la commande\n"
-"'modprobe snd-mixer-oss' en tant que root afin de le charger."
-
-#: ../coreapi/misc.c:610
-msgid "Stun lookup in progress..."
-msgstr "Découverte STUN en cours"
-
-#: ../coreapi/exevents.c:127
-msgid "Call terminated."
-msgstr "Appel terminé."
-
-#: ../coreapi/exevents.c:149
-msgid "Could not reach destination."
-msgstr "Impossible de joindre votre correspondant."
-
-#: ../coreapi/exevents.c:158
-msgid "User is busy."
-msgstr "Occupé..."
-
-#: ../coreapi/exevents.c:159
-msgid "User is temporarily unavailable."
-msgstr "L'usager est temporairement indisponible."
-
-#: ../coreapi/exevents.c:160
-msgid "Request Cancelled."
-msgstr "Requête annulée."
-
-#. char *retrymsg=_("%s. Retry after %i minute(s).");
-#: ../coreapi/exevents.c:162
-msgid "User does not want to be disturbed."
-msgstr "L'usager ne souhaite pas être dérangé"
-
-#: ../coreapi/exevents.c:163
-msgid "Call declined."
-msgstr "Appel décliné."
-
-#: ../coreapi/exevents.c:191
-msgid "Bad request"
-msgstr "Requete erronée"
-
-#: ../coreapi/exevents.c:194
-msgid "User cannot be found at given address."
-msgstr "L'utilisateur n'a pu être trouvé à l'addresse spécifiée"
-
-#: ../coreapi/exevents.c:197
-msgid "Remote user cannot support any of proposed codecs."
-msgstr "Votre correspondant ne supporte aucun des codecs proposés."
-
-#. time out, call leg is lost
-#: ../coreapi/exevents.c:227
-msgid "Timeout."
-msgstr "Temps d'attente dépassé..."
-
-#: ../coreapi/exevents.c:230
-msgid "Remote host was found but refused connection."
-msgstr "La machine distante a été trouvée mais a refusé la connexion."
-
-#: ../coreapi/exevents.c:339
-msgid "is contacting you."
-msgstr "vous appelle."
-
-#: ../coreapi/exevents.c:424
-#, c-format
-msgid "Redirected to %s..."
-msgstr "Redirigé vers %s ..."
-
-#: ../coreapi/exevents.c:440
-msgid ""
-"User is not reachable at the moment but he invites you\n"
-"to contact him using the following alternate resource:"
-msgstr ""
-"Votre correspondant n'est pas joignable actuellement mais il vous propose\n"
-"de le contacter en utilisant le moyen alternatif suivant:"
-
-#: ../coreapi/exevents.c:861
-msgid "Early media."
-msgstr "Prise d'appel anticipée"
-
-#: ../coreapi/exevents.c:972
-#, c-format
-msgid "Registration on %s failed: %s"
-msgstr "Echec de l'enregistrement sur %s: %s"
-
-#: ../coreapi/exevents.c:972
-msgid "no response timeout"
-msgstr "Pas de réponse."
-
-#: ../coreapi/exevents.c:998
-#, c-format
-msgid "Registration on %s successful."
-msgstr "Enregistrement sur %s effectué."
-
-#: ../coreapi/exevents.c:999
-#, fuzzy, c-format
-msgid "Unregistration on %s done."
-msgstr "Enregistrement sur %s effectué."
-
-#. people for which we don't have yet an answer should appear as offline
-#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
-msgid "Gone"
-msgstr "Parti"
-
-#: ../coreapi/presence.c:129
-msgid "Waiting for Approval"
-msgstr "En attente"
-
-#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
-msgid "Online"
-msgstr "Disponible"
-
-#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
-msgid "Busy"
-msgstr "Occupé"
-
-#: ../coreapi/presence.c:142
-msgid "Be Right Back"
-msgstr "De retour"
-
-#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
-msgid "Away"
-msgstr "Absent"
-
-#: ../coreapi/presence.c:151
-msgid "On The Phone"
-msgstr "Au téléphone"
-
-#: ../coreapi/presence.c:156
-msgid "Out To Lunch"
-msgstr "A table"
-
-#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
-msgid "Closed"
-msgstr "Eteint"
-
-#: ../coreapi/friend.c:35
-msgid "Unknown"
-msgstr ""
-
-#: ../coreapi/friend.c:44
-msgid "Be right back"
-msgstr "De retour"
-
-#: ../coreapi/friend.c:50
-msgid "On the phone"
-msgstr "Au téléphone"
-
-#: ../coreapi/friend.c:53
-msgid "Out to lunch"
-msgstr "A table"
-
-#: ../coreapi/friend.c:56
-msgid "Do not disturb"
-msgstr ""
-
-#: ../coreapi/friend.c:59
-msgid "Moved"
-msgstr ""
-
-#: ../coreapi/friend.c:62
-msgid "Using another messaging service"
-msgstr ""
-
-#: ../coreapi/friend.c:65
-msgid "Offline"
-msgstr "Non connecté"
-
-#: ../coreapi/friend.c:68
-msgid "Pending"
-msgstr "En attente"
-
-#: ../coreapi/friend.c:74
-msgid "Unknown-bug"
-msgstr "Bug inconnu"
-
-#: ../coreapi/proxy.c:221
-msgid ""
-"The sip proxy address you entered is invalid, it must start with \"sip:\" "
-"followed by a hostname."
-msgstr ""
-
-#: ../coreapi/proxy.c:227
-msgid ""
-"The sip identity you entered is invalid.\n"
-"It should look like sip:username@proxydomain, such as sip:alice@example.net"
-msgstr ""
-
-#: ../coreapi/proxy.c:634
-#, fuzzy, c-format
-msgid "Could not login as %s"
-msgstr "Icone non trouvée: %s"
-
-#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
-msgid "ITU-G.711 alaw encoder"
-msgstr ""
-
-#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
-msgid "ITU-G.711 alaw decoder"
-msgstr ""
-
-#: ../mediastreamer2/src/alsa.c:923
-msgid "Alsa sound source"
-msgstr "Source alsa"
-
-#: ../mediastreamer2/src/alsa.c:1027
-msgid "Alsa sound output"
-msgstr "Sortie alsa"
-
-#: ../mediastreamer2/src/aqsnd.c:891
-msgid "Sound capture filter for MacOS X Audio Queue Service"
-msgstr ""
-
-#: ../mediastreamer2/src/aqsnd.c:915
-msgid "Sound playback filter for MacOS X Audio Queue Service"
-msgstr ""
-
-#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
-msgid "DTMF generator"
-msgstr ""
-
-#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
-msgid "The GSM full-rate codec"
-msgstr "Le codec GSM full-rate"
-
-#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
-msgid "The GSM codec"
-msgstr ""
-
-#: ../mediastreamer2/src/macsnd.c:670
-msgid "Sound capture filter for MacOS X Core Audio drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/macsnd.c:684
-msgid "Sound playback filter for MacOS X Core Audio drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
-msgid "A filter to make conferencing"
-msgstr ""
-
-#: ../mediastreamer2/src/msfileplayer.c:295
-#: ../mediastreamer2/src/msfileplayer.c:313
-msgid "Raw files and wav reader"
-msgstr ""
-
-#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
-#: ../mediastreamer2/src/msfilerec_win.c:216
-#: ../mediastreamer2/src/msfilerec_win.c:234
-msgid "Wav file recorder"
-msgstr ""
-
-#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
-msgid "A filter that send several inputs to one output."
-msgstr ""
-
-#: ../mediastreamer2/src/msresample.c:221
-#: ../mediastreamer2/src/msresample.c:239
-msgid "frequency resampler"
-msgstr ""
-
-#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
-msgid "RTP output filter"
-msgstr ""
-
-#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
-msgid "RTP input filter"
-msgstr ""
-
-#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
-#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
-msgid "The free and wonderful speex codec"
-msgstr ""
-
-#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
-msgid "A filter that controls and measure sound volume"
-msgstr ""
-
-#: ../mediastreamer2/src/msv4l.c:1009
-msgid "A video4linux compatible source filter to stream pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/msv4l2.c:458
-msgid "A filter to grab pictures from Video4Linux2-powered cameras"
-msgstr ""
-
-#: ../mediastreamer2/src/nowebcam.c:1780
-msgid "A filter that outputs a static image."
-msgstr ""
-
-#: ../mediastreamer2/src/oss.c:567
-msgid "Sound capture filter for OSS drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/oss.c:581
-msgid "Sound playback filter for OSS drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
-msgid "A pixel format converter"
-msgstr ""
-
-#: ../mediastreamer2/src/sizeconv.c:204
-msgid "A video size converter"
-msgstr ""
-
-#: ../mediastreamer2/src/sizeconv.c:222
-msgid "a small video size converter"
-msgstr ""
-
-#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
-msgid "Echo canceler using speex library"
-msgstr ""
-
-#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
-msgid "A filter that reads from input and copy to its multiple outputs."
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:375
-msgid "The theora video encoder from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:393
-msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
-msgid "The theora video decoder from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
-msgid "ITU-G.711 ulaw encoder"
-msgstr ""
-
-#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
-msgid "ITU-G.711 ulaw decoder"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
-#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
-msgid "A H.263 decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:688
-msgid "A MPEG4 decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:704
-msgid "A RTP/JPEG decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:720
-msgid "A MJPEG decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:736
-msgid "A snow decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
-msgid "A video H.263 encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:856
-msgid ""
-"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
-"spec."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
-msgid "A video MPEG4 encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:888
-msgid "A video snow encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:904
-msgid "A RTP/MJPEG encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:938
-msgid ""
-"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:970
-msgid ""
-"The snow codec is royalty-free and is open-source. \n"
-"It uses innovative techniques that makes it one of most promising video "
-"codec. It is implemented within the ffmpeg project.\n"
-"However it is under development, quite unstable and compatibility with other "
-"versions cannot be guaranteed."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:990
-msgid "A MJPEG encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
-msgid "A generic video display"
-msgstr ""
-
-#: ../mediastreamer2/src/wincevideods.c:966
-#: ../mediastreamer2/src/wincevideods.c:984
-#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
-#: ../mediastreamer2/src/winvideods.c:1306
-#: ../mediastreamer2/src/winvideods.c:1324
-msgid "A video4windows compatible source filter to stream pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
-msgid "A video for windows (vfw.h) based source filter to grab pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
-msgid "ICE filter"
-msgstr ""
-
-#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
-msgid "A filter that trashes its input (useful for terminating some graphs)."
-msgstr ""
-
-#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
-msgid "Parametric sound equalizer."
-msgstr ""
-
-#: ../mediastreamer2/src/msdscap-mingw.cc:1003
-msgid "A webcam grabber based on directshow."
-msgstr ""
diff --git a/linphone/po/hu.po b/linphone/po/hu.po
deleted file mode 100644 (file)
index 03f5fe6..0000000
+++ /dev/null
@@ -1,2002 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-10-16 15:24+0200\n"
-"PO-Revision-Date: 2007-12-14 11:12+0100\n"
-"Last-Translator: \n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
-#: ../gtk-glade/support.c:102
-#, c-format
-msgid "Couldn't find pixmap file: %s"
-msgstr "Nemtalálható a pixmap fájl: %s"
-
-#: ../gtk-glade/chat.c:27
-#, c-format
-msgid "Chat with %s"
-msgstr "Chat-elés %s -el"
-
-#: ../gtk-glade/main.c:90
-msgid "log to stdout some debug information while running."
-msgstr ""
-
-#: ../gtk-glade/main.c:97
-msgid "Start only in the system tray, do not show the main interface."
-msgstr ""
-
-#: ../gtk-glade/main.c:104
-msgid "address to call right now"
-msgstr ""
-
-#: ../gtk-glade/main.c:111
-msgid "if set automatically answer incoming calls"
-msgstr ""
-
-#: ../gtk-glade/main.c:119
-msgid ""
-"Specifiy a working directory (should be the base of the installation, eg: c:"
-"\\Program Files\\Linphone)"
-msgstr ""
-
-#: ../gtk-glade/main.c:675
-#, fuzzy, c-format
-msgid "Incoming call from %s"
-msgstr "Beérkező hívás"
-
-#: ../gtk-glade/main.c:707
-#, c-format
-msgid ""
-"%s would like to add you to his contact list.\n"
-"Would you allow him to see your presence status or add him to your contact "
-"list ?\n"
-"If you answer no, this person will be temporarily blacklisted."
-msgstr ""
-
-#: ../gtk-glade/main.c:777
-#, c-format
-msgid ""
-"Please enter your password for username <i>%s</i>\n"
-" at domain <i>%s</i>:"
-msgstr ""
-
-#: ../gtk-glade/main.c:871
-msgid "Website link"
-msgstr ""
-
-#: ../gtk-glade/main.c:907
-msgid "Linphone - a video internet phone"
-msgstr ""
-
-#: ../gtk-glade/main.c:926
-#, c-format
-msgid "%s (Default)"
-msgstr ""
-
-#: ../gtk-glade/main.c:1168
-msgid "A free SIP video-phone"
-msgstr "Egy ingyenes SIP video-telefon"
-
-#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
-#: ../gtk-glade/contact.glade.h:3
-msgid "Name"
-msgstr "Név"
-
-#: ../gtk-glade/friendlist.c:212
-msgid "Presence status"
-msgstr "Jelenlét státusz"
-
-#: ../gtk-glade/friendlist.c:243
-#, c-format
-msgid "Search in %s directory"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:432
-msgid "Invalid sip contact !"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:474
-#, fuzzy, c-format
-msgid "Call %s"
-msgstr "Hivás előzmények"
-
-#: ../gtk-glade/friendlist.c:475
-#, c-format
-msgid "Send text to %s"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:476
-#, fuzzy, c-format
-msgid "Edit contact '%s'"
-msgstr "Kapcsolatinformációk szerkesztése"
-
-#: ../gtk-glade/friendlist.c:477
-#, c-format
-msgid "Delete contact '%s'"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:519
-#, c-format
-msgid "Add new contact from %s directory"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:251
-msgid "Rate (Hz)"
-msgstr "Érték (Hz)"
-
-#: ../gtk-glade/propertybox.c:257
-msgid "Status"
-msgstr "Állapot"
-
-#: ../gtk-glade/propertybox.c:263
-msgid "Min bitrate (kbit/s)"
-msgstr "Min bitrate (kbit/s)"
-
-#: ../gtk-glade/propertybox.c:269
-msgid "Parameters"
-msgstr "Paraméterek"
-
-#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
-msgid "Enabled"
-msgstr "Engedélyezve"
-
-#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
-msgid "Disabled"
-msgstr "Tiltva"
-
-#: ../gtk-glade/propertybox.c:480
-msgid "Account"
-msgstr "Hozzáférés"
-
-#: ../gtk-glade/propertybox.c:620
-msgid "English"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:621
-msgid "French"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:622
-msgid "Swedish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:623
-msgid "Italian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:624
-msgid "Spanish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:625
-msgid "Brazilian Portugese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:626
-msgid "Polish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:627
-msgid "German"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:628
-msgid "Russian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:629
-msgid "Japanese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:630
-msgid "Dutch"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:631
-msgid "Hungarian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:632
-msgid "Czech"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:633
-msgid "Chinese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:690
-msgid ""
-"You need to restart linphone for the new language selection to take effect."
-msgstr ""
-
-#: ../gtk-glade/update.c:80
-#, c-format
-msgid ""
-"A more recent version is availalble from %s.\n"
-"Would you like to open a browser to download it ?"
-msgstr ""
-
-#: ../gtk-glade/update.c:91
-msgid "You are running the lastest version."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:66
-msgid "Firstname, Lastname"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:73
-#, fuzzy
-msgid "SIP address"
-msgstr "Sip cím:"
-
-#: ../gtk-glade/buddylookup.c:121
-msgid "Error communicating with server."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:125
-#, fuzzy
-msgid "Connecting..."
-msgstr "Kapcsolódás"
-
-#: ../gtk-glade/buddylookup.c:129
-#, fuzzy
-msgid "Connected"
-msgstr "Kapcsolódva."
-
-#: ../gtk-glade/buddylookup.c:133
-msgid "Receiving data..."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:141
-#, c-format
-msgid "Found %i contact"
-msgid_plural "Found %i contacts"
-msgstr[0] ""
-msgstr[1] ""
-
-#: ../gtk-glade/setupwizard.c:25
-msgid ""
-"Welcome !\n"
-"This assistant will help you to use a SIP account for your calls."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:34
-msgid "Create an account by choosing a username"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:35
-msgid "I have already an account and just want to use it"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:53
-msgid "Please choose a username:"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:54
-#, fuzzy
-msgid "Username:"
-msgstr "felhasználónév:"
-
-#: ../gtk-glade/setupwizard.c:92
-#, c-format
-msgid "Checking if '%s' is available..."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
-msgid "Please wait..."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:101
-msgid "Sorry this username already exists. Please try a new one."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
-msgid "Ok !"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
-msgid "Communication problem, please try again later."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:134
-msgid "Thank you. Your account is now configured and ready for use."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:228
-msgid "Welcome to the account setup assistant"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:232
-msgid "Account setup assistant"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:236
-#, fuzzy
-msgid "Choosing a username"
-msgstr "felhasználónév:"
-
-#: ../gtk-glade/setupwizard.c:240
-msgid "Verifying"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:244
-#, fuzzy
-msgid "Confirmation"
-msgstr "Információk"
-
-#: ../gtk-glade/setupwizard.c:249
-msgid "Creating your account"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:253
-msgid "Now ready !"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:98
-#, fuzzy
-msgid "<b>Calling...</b>"
-msgstr "Kapcsolatilista"
-
-#: ../gtk-glade/incall_view.c:122
-#, fuzzy
-msgid "<b>In call with</b>"
-msgstr "Kapcsolatilista"
-
-#: ../gtk-glade/incall_view.c:124
-msgid "00::00::00"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:140
-#, c-format
-msgid "%02i::%02i::%02i"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:158
-#, fuzzy
-msgid "<b>Call ended.</b>"
-msgstr "Hívás vége"
-
-#: ../gtk-glade/incall_view.c:176
-#, fuzzy
-msgid "Unmute"
-msgstr "Korlátlan"
-
-#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
-msgid "Mute"
-msgstr ""
-
-#: ../gtk-glade/loginframe.c:82
-#, c-format
-msgid "Please enter login information for %s"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:1
-msgid "#"
-msgstr "#"
-
-#: ../gtk-glade/main.glade.h:2
-msgid "*"
-msgstr "*"
-
-#: ../gtk-glade/main.glade.h:3
-msgid "0"
-msgstr "0"
-
-#: ../gtk-glade/main.glade.h:4
-msgid "1"
-msgstr "1"
-
-#: ../gtk-glade/main.glade.h:5
-msgid "2"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:6
-msgid "3"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:7
-msgid "4"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:8
-msgid "5"
-msgstr "5"
-
-#: ../gtk-glade/main.glade.h:9
-msgid "6"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:10
-msgid "7"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:11
-msgid "8"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:12
-msgid "9"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:13
-#, fuzzy
-msgid "<b>Contact list</b>"
-msgstr "Kapcsolatilista"
-
-#: ../gtk-glade/main.glade.h:14
-#, fuzzy
-msgid "<b>Terminate call</b>"
-msgstr "Kapcsolatilista"
-
-#: ../gtk-glade/main.glade.h:15
-#, fuzzy
-msgid "<b>Welcome !</b>"
-msgstr "Kapcsolatilista"
-
-#: ../gtk-glade/main.glade.h:16
-msgid "A"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:17
-msgid ""
-"ADSL\n"
-"Fiber Channel"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:19
-msgid ""
-"All users\n"
-"Online users"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:21
-msgid "Assistant"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:22
-#, fuzzy
-msgid "Audio & Video"
-msgstr "Audio kodekek"
-
-#: ../gtk-glade/main.glade.h:23
-#, fuzzy
-msgid "Audio only"
-msgstr "Audio kodekek"
-
-#: ../gtk-glade/main.glade.h:24
-#, fuzzy
-msgid "Automatically log me in"
-msgstr "Automatikus valós hostnév megállapítása"
-
-#: ../gtk-glade/main.glade.h:25
-msgid "B"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
-msgid "C"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:27
-msgid "Check for updates"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:28
-msgid "D"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:29
-msgid "Default"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:30
-msgid "Digits"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:31
-#, fuzzy
-msgid "Duration"
-msgstr "Információk"
-
-#: ../gtk-glade/main.glade.h:32
-#, fuzzy
-msgid "Duration:"
-msgstr "Információk"
-
-#: ../gtk-glade/main.glade.h:33
-#, fuzzy
-msgid "Enable self-view"
-msgstr "Video engedélyezés"
-
-#: ../gtk-glade/main.glade.h:34
-msgid "Enter username, phone number, or full sip address"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:35
-#, fuzzy
-msgid "In call"
-msgstr "Beérkező hívás"
-
-#: ../gtk-glade/main.glade.h:36
-msgid "Internet connection:"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:37
-#, fuzzy
-msgid "Login information"
-msgstr "Kapcsolatiinformáció"
-
-#: ../gtk-glade/main.glade.h:38
-msgid "Lookup:"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:39
-msgid "Main view"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:41
-#, fuzzy
-msgid "My current identity:"
-msgstr "SIP azonosító:"
-
-#: ../gtk-glade/main.glade.h:42
-#, fuzzy
-msgid "Password"
-msgstr "jelszó:"
-
-#: ../gtk-glade/main.glade.h:43
-#, fuzzy
-msgid "SIP address or phone number:"
-msgstr "Gépeld ide a sip címet vagy a telefonszámot"
-
-#: ../gtk-glade/main.glade.h:44
-#, fuzzy
-msgid "Show current call"
-msgstr "nem sikerült hívni"
-
-#: ../gtk-glade/main.glade.h:45
-msgid "Start call"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:46
-msgid "Terminate call"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:47
-#, fuzzy
-msgid "Username"
-msgstr "felhasználónév:"
-
-#: ../gtk-glade/main.glade.h:48
-#, fuzzy
-msgid "_Linphone"
-msgstr "Linphone"
-
-#: ../gtk-glade/main.glade.h:49
-#, fuzzy
-msgid "_Modes"
-msgstr "Kodekek"
-
-#: ../gtk-glade/main.glade.h:50
-#, fuzzy
-msgid "gtk-connect"
-msgstr "Kapcsolódva."
-
-#: ../gtk-glade/main.glade.h:51
-msgid "gtk-find"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:52
-msgid "in"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:53
-msgid "label"
-msgstr ""
-
-#: ../gtk-glade/about.glade.h:1
-#, fuzzy
-msgid "About linphone"
-msgstr "linphone"
-
-#: ../gtk-glade/about.glade.h:2
-msgid "An internet video phone using the standart SIP (rfc3261) protocol."
-msgstr ""
-
-#: ../gtk-glade/about.glade.h:3
-msgid "Created by Simon Morlat\n"
-msgstr ""
-
-#: ../gtk-glade/about.glade.h:5
-msgid ""
-"fr: Simon Morlat\n"
-"en: Simon Morlat and Delphine Perreau\n"
-"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
-"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
-"sv: Daniel Nylander <po@danielnylander.se>\n"
-"es: Jesus Benitez <gnelson at inMail dot sk>\n"
-"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
-"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
-"pl: Robert Nasiadek <darkone@darkone.pl>\n"
-"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
-"hu: anonymous\n"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:1
-#, fuzzy
-msgid "<b>Contact information</b>"
-msgstr "Kapcsolatiinformáció"
-
-#: ../gtk-glade/contact.glade.h:2
-msgid "Allow this contact to see my presence status"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:4
-#, fuzzy
-msgid "SIP Address"
-msgstr "Sip cím:"
-
-#: ../gtk-glade/contact.glade.h:5
-msgid "Show this contact presence status"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
-#: ../gtk-glade/sip_account.glade.h:9
-msgid "gtk-cancel"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
-#: ../gtk-glade/sip_account.glade.h:10
-msgid "gtk-ok"
-msgstr ""
-
-#: ../gtk-glade/log.glade.h:1
-msgid "Linphone debug window"
-msgstr ""
-
-#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
-#: ../gtk-glade/chatroom.glade.h:2
-msgid "gtk-close"
-msgstr ""
-
-#: ../gtk-glade/password.glade.h:1
-#, fuzzy
-msgid "Linphone - Authentication required"
-msgstr "Hitelesítést kértek"
-
-#: ../gtk-glade/password.glade.h:2
-#, fuzzy
-msgid "Password:"
-msgstr "jelszó:"
-
-#: ../gtk-glade/password.glade.h:3
-msgid "Please enter the domain password"
-msgstr ""
-
-#: ../gtk-glade/password.glade.h:4
-msgid "UserID"
-msgstr ""
-
-#: ../gtk-glade/call_logs.glade.h:1
-#, fuzzy
-msgid "Call history"
-msgstr "Linphone - Híváselőzmények"
-
-#: ../gtk-glade/sip_account.glade.h:1
-msgid "Configure a SIP account"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:2
-msgid "Linphone - Configure a SIP account"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:3
-#, fuzzy
-msgid "Publish presence information"
-msgstr "Jelenléti információ közlése:"
-
-#: ../gtk-glade/sip_account.glade.h:4
-msgid "Register at startup"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:5
-#, fuzzy
-msgid "Registration duration (sec):"
-msgstr "Regisztrálási Időköz:"
-
-#: ../gtk-glade/sip_account.glade.h:6
-msgid "Route (optional):"
-msgstr "Út (nem kötelező):"
-
-#: ../gtk-glade/sip_account.glade.h:7
-#, fuzzy
-msgid "SIP Proxy address:"
-msgstr "SIP Proxy:"
-
-#: ../gtk-glade/sip_account.glade.h:8
-#, fuzzy
-msgid "Your SIP identity:"
-msgstr "SIP azonosító:"
-
-#: ../gtk-glade/sip_account.glade.h:11
-msgid "sip:"
-msgstr "sip:"
-
-#: ../gtk-glade/chatroom.glade.h:1
-#, fuzzy
-msgid "Send"
-msgstr "Hang"
-
-#: ../gtk-glade/incoming_call.glade.h:1
-msgid "Accept"
-msgstr "Elfogad"
-
-#: ../gtk-glade/incoming_call.glade.h:2
-#, fuzzy
-msgid "Decline"
-msgstr "line"
-
-#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
-msgid "Incoming call"
-msgstr "Beérkező hívás"
-
-#: ../gtk-glade/incoming_call.glade.h:4
-#, fuzzy
-msgid "Incoming call from"
-msgstr "Beérkező hívás"
-
-#: ../gtk-glade/incoming_call.glade.h:5
-#, fuzzy
-msgid "Linphone - Incoming call"
-msgstr "Beérkező hívás"
-
-#: ../gtk-glade/parameters.glade.h:1
-msgid "0 stands for \"unlimited\""
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:2
-#, fuzzy
-msgid "<b>Audio</b>"
-msgstr "Kapcsolatilista"
-
-#: ../gtk-glade/parameters.glade.h:3
-msgid "<b>Bandwidth control</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:4
-#, fuzzy
-msgid "<b>Codecs</b>"
-msgstr "Kapcsolatilista"
-
-#: ../gtk-glade/parameters.glade.h:5
-msgid "<b>Default identity</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:6
-msgid "<b>Language</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:7
-msgid "<b>NAT and Firewall</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:8
-#, fuzzy
-msgid "<b>Ports</b>"
-msgstr "Kapcsolatilista"
-
-#: ../gtk-glade/parameters.glade.h:9
-msgid "<b>Privacy</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:10
-#, fuzzy
-msgid "<b>Proxy accounts</b>"
-msgstr "Kapcsolatilista"
-
-#: ../gtk-glade/parameters.glade.h:11
-#, fuzzy
-msgid "<b>Transport</b>"
-msgstr "Kapcsolatilista"
-
-#: ../gtk-glade/parameters.glade.h:12
-msgid "<b>Video</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:13
-msgid "ALSA special device (optional):"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:14
-msgid "Add"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:15
-msgid "Audio RTP/UDP:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:16
-#, fuzzy
-msgid ""
-"Audio codecs\n"
-"Video codecs"
-msgstr "Audio és video kodekek"
-
-#: ../gtk-glade/parameters.glade.h:18
-msgid "Behind NAT / Firewall (specify gateway IP below)"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:19
-msgid "Behind NAT / Firewall (use STUN to resolve)"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:21
-msgid "CIF"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:22
-#, fuzzy
-msgid "Capture device:"
-msgstr "Felvevő hang eszköz:"
-
-#: ../gtk-glade/parameters.glade.h:23
-#, fuzzy
-msgid "Codecs"
-msgstr "Kodekek"
-
-#: ../gtk-glade/parameters.glade.h:24
-msgid "Direct connection to the Internet"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:25
-msgid "Disable"
-msgstr "Tiltás"
-
-#: ../gtk-glade/parameters.glade.h:26
-#, fuzzy
-msgid "Done"
-msgstr "Elveszítve"
-
-#: ../gtk-glade/parameters.glade.h:27
-#, fuzzy
-msgid "Download speed limit in Kbit/sec:"
-msgstr "Letöltési sávszélesség (kbit/sec):"
-
-#: ../gtk-glade/parameters.glade.h:28
-msgid "Edit"
-msgstr "Szerkesztés"
-
-#: ../gtk-glade/parameters.glade.h:29
-msgid "Enable"
-msgstr "Engedélyezés"
-
-#: ../gtk-glade/parameters.glade.h:30
-msgid "Enable echo cancellation"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:31
-msgid "Erase all passwords"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:32
-msgid "Manage SIP Accounts"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:33
-msgid "Multimedia settings"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:34
-#, fuzzy
-msgid "Network settings"
-msgstr "Hálózat"
-
-#: ../gtk-glade/parameters.glade.h:35
-#, fuzzy
-msgid "Playback device:"
-msgstr "Lejátszó hang eszköz:"
-
-#: ../gtk-glade/parameters.glade.h:36
-msgid "Prefered video resolution:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:37
-#, fuzzy
-msgid "Public IP address:"
-msgstr "Sip cím:"
-
-#: ../gtk-glade/parameters.glade.h:38
-msgid ""
-"Register to FONICS\n"
-"virtual network !"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:40
-msgid "Remove"
-msgstr "Eltávolítás"
-
-#: ../gtk-glade/parameters.glade.h:41
-#, fuzzy
-msgid "Ring device:"
-msgstr "Csengőhang forrás:"
-
-#: ../gtk-glade/parameters.glade.h:42
-#, fuzzy
-msgid "Ring sound:"
-msgstr "Csengőhang:"
-
-#: ../gtk-glade/parameters.glade.h:43
-msgid "SIP (UDP):"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:44
-msgid "Send DTMFs as SIP info"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:45
-msgid "Set Maximum Transmission Unit:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:46
-msgid "Settings"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:47
-#, fuzzy
-msgid "Stun server:"
-msgstr "Hang eszköz"
-
-#: ../gtk-glade/parameters.glade.h:48
-msgid "This section defines your SIP address when not using a SIP account"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:49
-#, fuzzy
-msgid "Upload speed limit in Kbit/sec:"
-msgstr "Feltöltési sávszélesség (kbit/sec):"
-
-#: ../gtk-glade/parameters.glade.h:50
-msgid "Use IPv6 instead of IPv4"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:51
-#, fuzzy
-msgid "User interface"
-msgstr "felhasználónév:"
-
-#: ../gtk-glade/parameters.glade.h:52
-msgid "Video RTP/UDP:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:53
-#, fuzzy
-msgid "Video input device:"
-msgstr "Hang eszköz"
-
-#: ../gtk-glade/parameters.glade.h:54
-msgid "Your display name (eg: John Doe):"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:55
-#, fuzzy
-msgid "Your resulting SIP address:"
-msgstr "Saját sip cím:"
-
-#: ../gtk-glade/parameters.glade.h:56
-#, fuzzy
-msgid "Your username:"
-msgstr "felhasználónév:"
-
-#: ../gtk-glade/parameters.glade.h:57
-msgid "a sound card\n"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:59
-msgid "default camera"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:60
-msgid "default soundcard"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:61
-msgid "default soundcard\n"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:63
-msgid "gtk-go-down"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:64
-msgid "gtk-go-up"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:65
-msgid "gtk-media-play"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:1
-msgid "<b>Search somebody</b>"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:2
-msgid "Add to my list"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:3
-msgid "Search contacts in directory"
-msgstr ""
-
-#: ../gtk-glade/waiting.glade.h:1
-msgid "Linphone"
-msgstr "Linphone"
-
-#: ../gtk-glade/waiting.glade.h:2
-msgid "Please wait"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:195
-#, fuzzy, c-format
-msgid "You have missed %i call."
-msgid_plural "You have missed %i calls."
-msgstr[0] "Van %i elhibázott hivás."
-msgstr[1] "Van %i elhibázott hivás."
-
-#: ../coreapi/linphonecore.c:223
-msgid "aborted"
-msgstr "megszakítva"
-
-#: ../coreapi/linphonecore.c:226
-msgid "completed"
-msgstr "befejezve"
-
-#: ../coreapi/linphonecore.c:229
-msgid "missed"
-msgstr "elhibázva"
-
-#: ../coreapi/linphonecore.c:234
-#, c-format
-msgid ""
-"%s at %s\n"
-"From: %s\n"
-"To: %s\n"
-"Status: %s\n"
-"Duration: %i mn %i sec\n"
-msgstr ""
-"%s nél %s\n"
-"Tól: %s\n"
-"Ig: %s\n"
-"Állapot: %s\n"
-"Időtartam: %i perc %i másodperc\n"
-
-#: ../coreapi/linphonecore.c:235
-msgid "Outgoing call"
-msgstr "Kimenő hívás"
-
-#: ../coreapi/linphonecore.c:445
-msgid ""
-"Your machine appears to be connected to an IPv6 network. By default linphone "
-"always uses IPv4. Please update your configuration if you want to use IPv6"
-msgstr ""
-"A géped úgy tűnik, hogy csatlakozik egy IPv6 hálózathoz. Alapból a linphone "
-"mindig az IPv4-et használja. Frissítsd a konfigurációdat, ha használni "
-"akarod az IPv6-ot"
-
-#: ../coreapi/linphonecore.c:739
-msgid "Ready"
-msgstr "Kész"
-
-#: ../coreapi/linphonecore.c:1014
-msgid "Remote end seems to have disconnected, the call is going to be closed."
-msgstr ""
-
-#: ../coreapi/linphonecore.c:1172
-msgid "Looking for telephone number destination..."
-msgstr "Telefonszám-cél keresése..."
-
-#: ../coreapi/linphonecore.c:1174
-msgid "Could not resolve this number."
-msgstr "Nem sikkerült értelmezni a számot."
-
-#: ../coreapi/linphonecore.c:1239
-msgid ""
-"Could not parse given sip address. A sip url usually looks like sip:"
-"user@domain"
-msgstr ""
-"Az adott szám nem értelmezhető. Egy sip cím általában így néz ki: user@domain"
-
-#: ../coreapi/linphonecore.c:1340
-msgid "Sorry, having multiple simultaneous calls is not supported yet !"
-msgstr "Bocsánat, a többszörös egyidejű hívások még nem támogatottak!"
-
-#: ../coreapi/linphonecore.c:1387
-msgid "Contacting"
-msgstr "Kapcsolódás"
-
-#: ../coreapi/linphonecore.c:1402
-msgid "could not call"
-msgstr "nem sikerült hívni"
-
-#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
-msgid "Connected."
-msgstr "Kapcsolódva."
-
-#: ../coreapi/linphonecore.c:1813
-msgid "Call ended"
-msgstr "Hívás vége"
-
-#: ../coreapi/linphonecore.c:2175
-msgid "No nat/firewall address supplied !"
-msgstr "Nincs nat/tűzfal cím megadva!"
-
-#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
-#, c-format
-msgid "Invalid nat address '%s' : %s"
-msgstr "Hibás nat cím '%s' : %s"
-
-#: ../coreapi/misc.c:134
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the pcm oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-"'modprobe snd-pcm-oss' as root to load it."
-msgstr ""
-"A számítógéped úgy tűnik, hogy ALSA hangot használ.\n"
-"Ez a legjobb választás. Mindazonáltal a pcm* OSS emuláció modulra\n"
-" a linphone-nak szüksége van és ez hiányzik. Kérem futassa le a\n"
-"'modprobe snd-pcm-oss' parancsot rendszergazdaként."
-
-#: ../coreapi/misc.c:137
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the mixer oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-" 'modprobe snd-mixer-oss' as root to load it."
-msgstr ""
-"A számítógéped úgy tűnik, hogy ALSA hangot használ.\n"
-"Ez a legjobb választás. Mindazonáltal a mixer OSS emuláció modulra\n"
-" a linphone-nak szüksége van és ez hiányzik. Kérem futassa le a\n"
-"'modprobe snd-pcm-oss' parancsot rendszergazdaként."
-
-#: ../coreapi/misc.c:610
-msgid "Stun lookup in progress..."
-msgstr "Stun keresés folyamatban..."
-
-#: ../coreapi/exevents.c:127
-msgid "Call terminated."
-msgstr "A hívás befejezve."
-
-#: ../coreapi/exevents.c:149
-msgid "Could not reach destination."
-msgstr "A cél elérhetetlen."
-
-#: ../coreapi/exevents.c:158
-msgid "User is busy."
-msgstr "A felhasználó foglalt."
-
-#: ../coreapi/exevents.c:159
-msgid "User is temporarily unavailable."
-msgstr "A felhasználó ideiglenesen nem elérhető"
-
-#: ../coreapi/exevents.c:160
-msgid "Request Cancelled."
-msgstr "Kérelem elutasítva."
-
-#. char *retrymsg=_("%s. Retry after %i minute(s).");
-#: ../coreapi/exevents.c:162
-msgid "User does not want to be disturbed."
-msgstr "A felhasználó nem akarja, hogy zavarják."
-
-#: ../coreapi/exevents.c:163
-msgid "Call declined."
-msgstr "Hívás elutasítva"
-
-#: ../coreapi/exevents.c:191
-msgid "Bad request"
-msgstr "Rossz kérés"
-
-#: ../coreapi/exevents.c:194
-msgid "User cannot be found at given address."
-msgstr "Nem telálható felhasználó at adott címen."
-
-#: ../coreapi/exevents.c:197
-msgid "Remote user cannot support any of proposed codecs."
-msgstr ""
-"A távoli felhasználó nem rendelkezik a javasolt kódoló-dekódolókkal (codecs)"
-
-#. time out, call leg is lost
-#: ../coreapi/exevents.c:227
-msgid "Timeout."
-msgstr "Időtúllépés."
-
-#: ../coreapi/exevents.c:230
-msgid "Remote host was found but refused connection."
-msgstr "A távoli gép elérhető, de a kapcsolatot visszautasította."
-
-#: ../coreapi/exevents.c:339
-msgid "is contacting you."
-msgstr "kapcsolatba lép veled."
-
-#: ../coreapi/exevents.c:424
-#, c-format
-msgid "Redirected to %s..."
-msgstr "Átirányítva idw %s..."
-
-#: ../coreapi/exevents.c:440
-msgid ""
-"User is not reachable at the moment but he invites you\n"
-"to contact him using the following alternate resource:"
-msgstr ""
-"A felhasználó nem elérhető pillanatnyilag de meghívja Önt\n"
-"thogy lépjen kapcsolatba vele miközben használja a következő alternatív "
-"erőforrást:"
-
-#: ../coreapi/exevents.c:861
-msgid "Early media."
-msgstr "Korai médiák."
-
-#: ../coreapi/exevents.c:972
-#, c-format
-msgid "Registration on %s failed: %s"
-msgstr "A regisztáció a %s -n nem sikerült: %s"
-
-#: ../coreapi/exevents.c:972
-msgid "no response timeout"
-msgstr "időtúllépés után nincs válasz"
-
-#: ../coreapi/exevents.c:998
-#, c-format
-msgid "Registration on %s successful."
-msgstr "A regisztáció a %s -n sikerült."
-
-#: ../coreapi/exevents.c:999
-#, fuzzy, c-format
-msgid "Unregistration on %s done."
-msgstr "A regisztáció a %s -n sikerült."
-
-#. people for which we don't have yet an answer should appear as offline
-#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
-msgid "Gone"
-msgstr "Elveszítve"
-
-#: ../coreapi/presence.c:129
-msgid "Waiting for Approval"
-msgstr "Jóváhagyásra vár"
-
-#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
-msgid "Online"
-msgstr "Elérhető"
-
-#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
-msgid "Busy"
-msgstr "Foglalt"
-
-#: ../coreapi/presence.c:142
-msgid "Be Right Back"
-msgstr "Legyen igazad"
-
-#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
-msgid "Away"
-msgstr "Nem elérhető"
-
-#: ../coreapi/presence.c:151
-msgid "On The Phone"
-msgstr "Telefonál"
-
-#: ../coreapi/presence.c:156
-msgid "Out To Lunch"
-msgstr "Ebédelni ment"
-
-#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
-msgid "Closed"
-msgstr "Lezárva"
-
-#: ../coreapi/friend.c:35
-msgid "Unknown"
-msgstr ""
-
-#: ../coreapi/friend.c:44
-#, fuzzy
-msgid "Be right back"
-msgstr "Legyen igazad"
-
-#: ../coreapi/friend.c:50
-#, fuzzy
-msgid "On the phone"
-msgstr "Telefonál"
-
-#: ../coreapi/friend.c:53
-#, fuzzy
-msgid "Out to lunch"
-msgstr "Ebédelni ment"
-
-#: ../coreapi/friend.c:56
-msgid "Do not disturb"
-msgstr "Ne zavarj"
-
-#: ../coreapi/friend.c:59
-#, fuzzy
-msgid "Moved"
-msgstr "Kodekek"
-
-#: ../coreapi/friend.c:62
-msgid "Using another messaging service"
-msgstr ""
-
-#: ../coreapi/friend.c:65
-#, fuzzy
-msgid "Offline"
-msgstr "Elérhető"
-
-#: ../coreapi/friend.c:68
-msgid "Pending"
-msgstr ""
-
-#: ../coreapi/friend.c:74
-msgid "Unknown-bug"
-msgstr ""
-
-#: ../coreapi/proxy.c:221
-msgid ""
-"The sip proxy address you entered is invalid, it must start with \"sip:\" "
-"followed by a hostname."
-msgstr ""
-
-#: ../coreapi/proxy.c:227
-msgid ""
-"The sip identity you entered is invalid.\n"
-"It should look like sip:username@proxydomain, such as sip:alice@example.net"
-msgstr ""
-
-#: ../coreapi/proxy.c:634
-#, fuzzy, c-format
-msgid "Could not login as %s"
-msgstr "Nemtalálható a pixmap fájl: %s"
-
-#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
-msgid "ITU-G.711 alaw encoder"
-msgstr ""
-
-#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
-msgid "ITU-G.711 alaw decoder"
-msgstr ""
-
-#: ../mediastreamer2/src/alsa.c:923
-msgid "Alsa sound source"
-msgstr ""
-
-#: ../mediastreamer2/src/alsa.c:1027
-msgid "Alsa sound output"
-msgstr ""
-
-#: ../mediastreamer2/src/aqsnd.c:891
-msgid "Sound capture filter for MacOS X Audio Queue Service"
-msgstr ""
-
-#: ../mediastreamer2/src/aqsnd.c:915
-msgid "Sound playback filter for MacOS X Audio Queue Service"
-msgstr ""
-
-#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
-msgid "DTMF generator"
-msgstr ""
-
-#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
-msgid "The GSM full-rate codec"
-msgstr ""
-
-#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
-msgid "The GSM codec"
-msgstr ""
-
-#: ../mediastreamer2/src/macsnd.c:670
-msgid "Sound capture filter for MacOS X Core Audio drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/macsnd.c:684
-msgid "Sound playback filter for MacOS X Core Audio drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
-msgid "A filter to make conferencing"
-msgstr ""
-
-#: ../mediastreamer2/src/msfileplayer.c:295
-#: ../mediastreamer2/src/msfileplayer.c:313
-msgid "Raw files and wav reader"
-msgstr ""
-
-#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
-#: ../mediastreamer2/src/msfilerec_win.c:216
-#: ../mediastreamer2/src/msfilerec_win.c:234
-msgid "Wav file recorder"
-msgstr ""
-
-#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
-msgid "A filter that send several inputs to one output."
-msgstr ""
-
-#: ../mediastreamer2/src/msresample.c:221
-#: ../mediastreamer2/src/msresample.c:239
-msgid "frequency resampler"
-msgstr ""
-
-#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
-msgid "RTP output filter"
-msgstr ""
-
-#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
-msgid "RTP input filter"
-msgstr ""
-
-#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
-#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
-msgid "The free and wonderful speex codec"
-msgstr ""
-
-#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
-msgid "A filter that controls and measure sound volume"
-msgstr ""
-
-#: ../mediastreamer2/src/msv4l.c:1009
-msgid "A video4linux compatible source filter to stream pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/msv4l2.c:458
-msgid "A filter to grab pictures from Video4Linux2-powered cameras"
-msgstr ""
-
-#: ../mediastreamer2/src/nowebcam.c:1780
-msgid "A filter that outputs a static image."
-msgstr ""
-
-#: ../mediastreamer2/src/oss.c:567
-msgid "Sound capture filter for OSS drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/oss.c:581
-msgid "Sound playback filter for OSS drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
-msgid "A pixel format converter"
-msgstr ""
-
-#: ../mediastreamer2/src/sizeconv.c:204
-msgid "A video size converter"
-msgstr ""
-
-#: ../mediastreamer2/src/sizeconv.c:222
-msgid "a small video size converter"
-msgstr ""
-
-#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
-msgid "Echo canceler using speex library"
-msgstr ""
-
-#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
-msgid "A filter that reads from input and copy to its multiple outputs."
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:375
-msgid "The theora video encoder from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:393
-msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
-msgid "The theora video decoder from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
-msgid "ITU-G.711 ulaw encoder"
-msgstr ""
-
-#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
-msgid "ITU-G.711 ulaw decoder"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
-#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
-msgid "A H.263 decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:688
-msgid "A MPEG4 decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:704
-msgid "A RTP/JPEG decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:720
-msgid "A MJPEG decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:736
-msgid "A snow decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
-msgid "A video H.263 encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:856
-msgid ""
-"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
-"spec."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
-msgid "A video MPEG4 encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:888
-msgid "A video snow encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:904
-msgid "A RTP/MJPEG encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:938
-msgid ""
-"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:970
-msgid ""
-"The snow codec is royalty-free and is open-source. \n"
-"It uses innovative techniques that makes it one of most promising video "
-"codec. It is implemented within the ffmpeg project.\n"
-"However it is under development, quite unstable and compatibility with other "
-"versions cannot be guaranteed."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:990
-msgid "A MJPEG encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
-msgid "A generic video display"
-msgstr ""
-
-#: ../mediastreamer2/src/wincevideods.c:966
-#: ../mediastreamer2/src/wincevideods.c:984
-#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
-#: ../mediastreamer2/src/winvideods.c:1306
-#: ../mediastreamer2/src/winvideods.c:1324
-msgid "A video4windows compatible source filter to stream pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
-msgid "A video for windows (vfw.h) based source filter to grab pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
-msgid "ICE filter"
-msgstr ""
-
-#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
-msgid "A filter that trashes its input (useful for terminating some graphs)."
-msgstr ""
-
-#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
-msgid "Parametric sound equalizer."
-msgstr ""
-
-#: ../mediastreamer2/src/msdscap-mingw.cc:1003
-msgid "A webcam grabber based on directshow."
-msgstr ""
-
-#, fuzzy
-#~ msgid "_View"
-#~ msgstr "Video"
-
-#, fuzzy
-#~ msgid "_Properties"
-#~ msgstr "RTP beállítások"
-
-#, fuzzy
-#~ msgid "Show logs"
-#~ msgstr "Mutasd a hívásokat"
-
-#, fuzzy
-#~ msgid "_About"
-#~ msgstr "Hozzáférés"
-
-#, fuzzy
-#~ msgid "gtk-remove"
-#~ msgstr "Eltávolítás"
-
-#, fuzzy
-#~ msgid "Proxy in use"
-#~ msgstr "Használt SIP Proxy:"
-
-#~ msgid "Sound"
-#~ msgstr "Hang"
-
-#, fuzzy
-#~ msgid "Default identity"
-#~ msgstr "SIP azonosító:"
-
-#, fuzzy
-#~ msgid "Proxy accounts"
-#~ msgstr "Használt SIP Proxy:"
-
-#~ msgid "Go"
-#~ msgstr "Ugrás"
-
-#~ msgid "Address book"
-#~ msgstr "Címjegyzék"
-
-#~ msgid "Exit"
-#~ msgstr "Kilépés"
-
-#~ msgid "Help"
-#~ msgstr "Help"
-
-#~ msgid "Shows the address book"
-#~ msgstr "Mutasd a címjegyzéket"
-
-#~ msgid "..."
-#~ msgstr "..."
-
-#~ msgid ""
-#~ "Call or\n"
-#~ "answer"
-#~ msgstr ""
-#~ "Hívás vagy\n"
-#~ "Válasz"
-
-#~ msgid ""
-#~ "Hangup\n"
-#~ "or refuse"
-#~ msgstr ""
-#~ "Lerak vagy\n"
-#~ "Nem válaszol"
-
-#~ msgid "Or chat !"
-#~ msgstr "Vagy chat-elj!"
-
-#~ msgid "Show more..."
-#~ msgstr "További beállítások..."
-
-#~ msgid "Playback level:"
-#~ msgstr "Lejátszási hangerő:"
-
-#~ msgid "Recording level:"
-#~ msgstr "Felvételi hangerő:"
-
-#~ msgid "Ring level:"
-#~ msgstr "Csengetési hangerő:"
-
-#~ msgid "Controls"
-#~ msgstr "Vezérlés"
-
-#~ msgid "Reachable"
-#~ msgstr "Elérhető"
-
-#~ msgid "Busy, I'll be back in "
-#~ msgstr "Foglalt vagyok, jövök vissza"
-
-#~ msgid "The other party will be informed that you'll be back in X minutes"
-#~ msgstr "A másik fél tájékoztatva lesz, hogy X perc alatt vissza fogsz jönni"
-
-#~ msgid "mn"
-#~ msgstr "perc"
-
-#~ msgid "Moved temporarily"
-#~ msgstr "Ideiglenesen nem elérhető"
-
-#~ msgid "Alternative service"
-#~ msgstr "Átirányítás"
-
-#~ msgid "URL:"
-#~ msgstr "URL:"
-
-#~ msgid "Presence"
-#~ msgstr "Elérhető"
-
-#~ msgid "Press digits to send DTMFs."
-#~ msgstr "Nyomja le a számokat a DTMF küldéshez"
-
-#~ msgid ""
-#~ "  3\n"
-#~ "def"
-#~ msgstr ""
-#~ "  3\n"
-#~ "def"
-
-#~ msgid ""
-#~ "  2\n"
-#~ "abc"
-#~ msgstr ""
-#~ "  2\n"
-#~ "abc"
-
-#~ msgid ""
-#~ "  4\n"
-#~ "ghi"
-#~ msgstr ""
-#~ "  4\n"
-#~ "ghi"
-
-#~ msgid ""
-#~ " 5\n"
-#~ "jkl"
-#~ msgstr ""
-#~ " 5\n"
-#~ "jkl"
-
-#~ msgid ""
-#~ "  6\n"
-#~ "mno"
-#~ msgstr ""
-#~ "  6\n"
-#~ "mno"
-
-#~ msgid ""
-#~ "   7\n"
-#~ "pqrs"
-#~ msgstr ""
-#~ "   7\n"
-#~ "pqrs"
-
-#~ msgid ""
-#~ "  8\n"
-#~ "tuv"
-#~ msgstr ""
-#~ "  8\n"
-#~ "tuv"
-
-#~ msgid ""
-#~ "   9\n"
-#~ "wxyz"
-#~ msgstr ""
-#~ "   9\n"
-#~ "wxyz"
-
-#~ msgid "DTMF"
-#~ msgstr "DTMF"
-
-#~ msgid "My online friends"
-#~ msgstr "Elérhető partnerek"
-
-#~ msgid ""
-#~ "C: 2001\n"
-#~ "Made in Old Europe"
-#~ msgstr ""
-#~ "C: 2001\n"
-#~ "Made in Old Europe"
-
-#~ msgid ""
-#~ "Linphone is a web-phone.\n"
-#~ "It is compatible with SIP and RTP protocols."
-#~ msgstr ""
-#~ "A Linphone egy web-telefon.\n"
-#~ "SIP és RTP kompatíbilis."
-
-#~ msgid "http://www.linphone.org"
-#~ msgstr "http://www.linphone.org"
-
-#~ msgid "Use IPv6 network (if available)"
-#~ msgstr "IPv6 hálózat használata (ha elérhető)"
-
-#~ msgid ""
-#~ "Toggle this if you are on an ipv6 network and you wish linphone to use it."
-#~ msgstr "Ha egy IPv6 hálózat elérhető, akkor a linphone használja azt."
-
-#~ msgid "Global"
-#~ msgstr "Általános"
-
-#~ msgid ""
-#~ "These options is only for users in a private network, behind a gateway. "
-#~ "If you are not in this situation, then leave this empty."
-#~ msgstr ""
-#~ "Ez az opció azoknak a felhasználóknak kell, akik egy privát hálózaton "
-#~ "tűzfal mögül interneteznek. Egyébként üresen kell hagyni."
-
-#~ msgid "No firewall"
-#~ msgstr "Nincs tűzfal"
-
-#~ msgid "Use this STUN server to guess firewall address :"
-#~ msgstr "STUN szerver használata a tűzfal címének meghatározásához."
-
-#~ msgid "Specify firewall address manually:"
-#~ msgstr "Tűzfal külső címe:"
-
-#~ msgid "NAT traversal options (experimental)"
-#~ msgstr "NAT beállítások áttekintése (kísérleti)"
-
-#~ msgid "Number of buffered miliseconds (jitter compensation):"
-#~ msgstr "A pufferelt milisecondok száma (jitter compensation):"
-
-#~ msgid "RTP port used for audio:"
-#~ msgstr "RTP port, audió használatra:"
-
-#~ msgid "Use SIP INFO message instead of RTP rfc2833 for DTMF transmitting"
-#~ msgstr "Használj SIP INFO üzenetet RTP rfc2833 helyett a DTMF átvitelnél"
-
-#~ msgid "RTP-RFC2833 is the recommended way."
-#~ msgstr "RTP-RFC2833 az ajánlott."
-
-#~ msgid "Other"
-#~ msgstr "Egyéb"
-
-#~ msgid "micro"
-#~ msgstr "mikrofon"
-
-#~ msgid "Recording source:"
-#~ msgstr "Felvételi forrás:"
-
-#~ msgid "Enable echo-canceler (cancels the echo heard by the remote party)"
-#~ msgstr ""
-#~ "Visszhang törlés engedélyezése (törli a visszhangot, amit hall a távoli "
-#~ "partner"
-
-#~ msgid "Choose file"
-#~ msgstr "Fájl kiválasztás"
-
-#~ msgid "Listen"
-#~ msgstr "Hallgatás"
-
-#~ msgid "Sound properties"
-#~ msgstr "Hang beállítások"
-
-#~ msgid "Run sip user agent on port:"
-#~ msgstr "SIP felhasználó ügynök által használt port:"
-
-#~ msgid "It is strongly recommended to use port 5060."
-#~ msgstr "Erősen ajánlott az 5060-as port használata."
-
-#~ msgid "SIP port"
-#~ msgstr "SIP port"
-
-#~ msgid "@"
-#~ msgstr "@"
-
-#~ msgid "Identity"
-#~ msgstr "Azonosító"
-
-#~ msgid "Add proxy/registrar"
-#~ msgstr "Proxy vagy regisztráció hozzáadás"
-
-#~ msgid "Remote services"
-#~ msgstr "Távoli szolgáltatások"
-
-#~ msgid "Clear all stored authentication information (username,password...)"
-#~ msgstr ""
-#~ "Az összes tárolt hitelesítési információ törlése (felhasználónév, "
-#~ "jelszó...)"
-
-#~ msgid "Authentication information"
-#~ msgstr "Hitelesítési információ"
-
-#~ msgid "SIP"
-#~ msgstr "SIP"
-
-#~ msgid "List of audio codecs, in order of preference:"
-#~ msgstr "Az audió kódoló-dekódolók listája, a preferencia rendjében:"
-
-#~ msgid "Video Codecs"
-#~ msgstr "Audio kodekek"
-
-#~ msgid ""
-#~ "Note: Codecs in red are not usable regarding to your connection type to "
-#~ "the internet."
-#~ msgstr ""
-#~ "Figyelem: A pirosban lévő kodekek nem használhatók a jelenlegi "
-#~ "internetkapcsolattal."
-
-#~ msgid "No information availlable"
-#~ msgstr "Nem érhető el információ"
-
-#~ msgid "Codec information"
-#~ msgstr "Kodekinformáció"
-
-#~ msgid "Address Book"
-#~ msgstr "Címjegyzék"
-
-#~ msgid "Select"
-#~ msgstr "Kiválasztás"
-
-#~ msgid ""
-#~ "User is not reachable at the moment but he invites you to contact him "
-#~ "using the following alternate ressource:"
-#~ msgstr ""
-#~ "A felhasználó jelenleg nem elérhető, de kéri, hogy lépj vele kapcsolatba "
-#~ "itt:"
-
-#~ msgid "None."
-#~ msgstr "Nincs."
-
-#~ msgid "Proxy/Registrar configuration box"
-#~ msgstr "Proxy/Regisztráció konfigurációs doboz"
-
-#~ msgid "Send registration:"
-#~ msgstr "Regisztárció küldés:"
-
-#~ msgid "Name:"
-#~ msgstr "Név:"
-
-#~ msgid "Subscribe policy:"
-#~ msgstr "Láthatósági szabály:"
-
-#~ msgid "Send subscription (see person's online status)"
-#~ msgstr "Láthatóság küldése (látszik a személy elérhetőségi státusza)"
-
-#~ msgid "New incoming subscription"
-#~ msgstr "Új beérkező előfizetés"
-
-#~ msgid "You have received a new subscription..."
-#~ msgstr "Megkaptál egy új előfizetést."
-
-#~ msgid "Refuse"
-#~ msgstr "Hulladék"
-
-#~ msgid "Authentication required for realm"
-#~ msgstr "Hitelesítési kérelem a tartománynak"
-
-#~ msgid "userid:"
-#~ msgstr "felhasználói azonosító:"
-
-#~ msgid "realm:"
-#~ msgstr "tartomány:"
-
-#~ msgid "Chat Room"
-#~ msgstr "Chat szoba"
-
-#~ msgid "Text:"
-#~ msgstr "Szöveg:"
-
-#~ msgid "The caller asks for resource reservation. Do you agree ?"
-#~ msgstr "A hívó forrásfoglalást kér. Egyetértesz?"
-
-#~ msgid ""
-#~ "The caller doesn't use resource reservation. \t\t\t\t\tDo you wish to "
-#~ "continue anyway ?"
-#~ msgstr ""
-#~ "A hívó nem használ forrásfoglalást. \t\t\t\t\tÍgy is szeretnéd folytatni?"
-
-#~ msgid "linphone - receiving call from %s"
-#~ msgstr "linphone - hívást fogad innen %s"
-
-#~ msgid ""
-#~ "You have received a subscription from %s.This means that this person "
-#~ "wishes to be notified of your presence information (online, busy, "
-#~ "away...).\n"
-#~ "Do you agree ?"
-#~ msgstr ""
-#~ "Kaptál egy előfizetést tőle %s. Ez azt jelenti, hogy ez a személy "
-#~ "szeretné, hogy értesítsék a jelenlétinformációd (online, elfoglalt, "
-#~ "away...).\n"
-#~ "Egyetértesz?"
-
-#~ msgid "Authentication required for realm %s"
-#~ msgstr "Hitelesítési kérelem ebből a tartományból %s"
-
-#~ msgid "None"
-#~ msgstr "Nincs"
-
-#~ msgid "Wait"
-#~ msgstr "Várakozás"
-
-#~ msgid "Deny"
-#~ msgstr "Tiltás"
-
-#~ msgid "Bad sip address: a sip address looks like sip:user@domain"
-#~ msgstr "Rossz sip cím: egy sip cím általában így néz ki: user@domain"
-
-#~ msgid "Stun lookup done..."
-#~ msgstr "Stun keresés kész..."
diff --git a/linphone/po/insert-header.sin b/linphone/po/insert-header.sin
deleted file mode 100644 (file)
index b26de01..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# Sed script that inserts the file called HEADER before the header entry.
-#
-# At each occurrence of a line starting with "msgid ", we execute the following
-# commands. At the first occurrence, insert the file. At the following
-# occurrences, do nothing. The distinction between the first and the following
-# occurrences is achieved by looking at the hold space.
-/^msgid /{
-x
-# Test if the hold space is empty.
-s/m/m/
-ta
-# Yes it was empty. First occurrence. Read the file.
-r HEADER
-# Output the file's contents by reading the next line. But don't lose the
-# current line while doing this.
-g
-N
-bb
-:a
-# The hold space was nonempty. Following occurrences. Do nothing.
-x
-:b
-}
diff --git a/linphone/po/it.po b/linphone/po/it.po
deleted file mode 100644 (file)
index 2c3b11a..0000000
+++ /dev/null
@@ -1,1556 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Linphone 3.2.0\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-10-16 15:24+0200\n"
-"PO-Revision-Date: 2002-10-15 HO:MI+ZONE\n"
-"Last-Translator: Matteo Piazza <matteo.piazza@trentinonetwork.it>\n"
-"Language-Team: it <it@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
-#: ../gtk-glade/support.c:102
-#, c-format
-msgid "Couldn't find pixmap file: %s"
-msgstr ""
-
-#: ../gtk-glade/chat.c:27
-#, c-format
-msgid "Chat with %s"
-msgstr "Chat con %s"
-
-#: ../gtk-glade/main.c:90
-msgid "log to stdout some debug information while running."
-msgstr ""
-
-#: ../gtk-glade/main.c:97
-msgid "Start only in the system tray, do not show the main interface."
-msgstr ""
-
-#: ../gtk-glade/main.c:104
-msgid "address to call right now"
-msgstr ""
-
-#: ../gtk-glade/main.c:111
-msgid "if set automatically answer incoming calls"
-msgstr ""
-
-#: ../gtk-glade/main.c:119
-msgid ""
-"Specifiy a working directory (should be the base of the installation, eg: c:"
-"\\Program Files\\Linphone)"
-msgstr ""
-
-#: ../gtk-glade/main.c:675
-#, c-format
-msgid "Incoming call from %s"
-msgstr "Chiamata proveniente da %s"
-
-#: ../gtk-glade/main.c:707
-#, c-format
-msgid ""
-"%s would like to add you to his contact list.\n"
-"Would you allow him to see your presence status or add him to your contact "
-"list ?\n"
-"If you answer no, this person will be temporarily blacklisted."
-msgstr ""
-"%s voui aggiungere il tuo contatto alla sua listaVoui permettere che lui "
-"veda il tuo stato o aggiungerlo alla tua lista dei contatti Se rispondi no "
-"questo utente sarà momentaneamente bloccato."
-
-#: ../gtk-glade/main.c:777
-#, c-format
-msgid ""
-"Please enter your password for username <i>%s</i>\n"
-" at domain <i>%s</i>:"
-msgstr "Prego inserire la password per username <i>%s</i> e dominio <i>%s<i>"
-
-#: ../gtk-glade/main.c:871
-msgid "Website link"
-msgstr ""
-
-#: ../gtk-glade/main.c:907
-msgid "Linphone - a video internet phone"
-msgstr ""
-
-#: ../gtk-glade/main.c:926
-#, c-format
-msgid "%s (Default)"
-msgstr "%s (Default)"
-
-#: ../gtk-glade/main.c:1168
-msgid "A free SIP video-phone"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
-#: ../gtk-glade/contact.glade.h:3
-msgid "Name"
-msgstr "Nome"
-
-#: ../gtk-glade/friendlist.c:212
-msgid "Presence status"
-msgstr "Presenza"
-
-#: ../gtk-glade/friendlist.c:243
-#, c-format
-msgid "Search in %s directory"
-msgstr "Cerca contatti nella directory %s"
-
-#: ../gtk-glade/friendlist.c:432
-msgid "Invalid sip contact !"
-msgstr "Contatto SIP non valido"
-
-#: ../gtk-glade/friendlist.c:474
-#, c-format
-msgid "Call %s"
-msgstr "Chiamata %s"
-
-#: ../gtk-glade/friendlist.c:475
-#, c-format
-msgid "Send text to %s"
-msgstr "Invia testo a %s"
-
-#: ../gtk-glade/friendlist.c:476
-#, c-format
-msgid "Edit contact '%s'"
-msgstr "Modifica contatto %s"
-
-#: ../gtk-glade/friendlist.c:477
-#, c-format
-msgid "Delete contact '%s'"
-msgstr "Elimina contatto %s"
-
-#: ../gtk-glade/friendlist.c:519
-#, c-format
-msgid "Add new contact from %s directory"
-msgstr "Aggiungi nuovo contatto dalla directory %s"
-
-#: ../gtk-glade/propertybox.c:251
-msgid "Rate (Hz)"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:257
-msgid "Status"
-msgstr "Stato"
-
-#: ../gtk-glade/propertybox.c:263
-msgid "Min bitrate (kbit/s)"
-msgstr "Bitrate Min (kbit/s)"
-
-#: ../gtk-glade/propertybox.c:269
-msgid "Parameters"
-msgstr "Parametri"
-
-#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
-msgid "Enabled"
-msgstr "Attivato"
-
-#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
-msgid "Disabled"
-msgstr "Disattivato"
-
-#: ../gtk-glade/propertybox.c:480
-msgid "Account"
-msgstr "Account"
-
-#: ../gtk-glade/propertybox.c:620
-msgid "English"
-msgstr "Inglese"
-
-#: ../gtk-glade/propertybox.c:621
-msgid "French"
-msgstr "Francese"
-
-#: ../gtk-glade/propertybox.c:622
-msgid "Swedish"
-msgstr "Svedese"
-
-#: ../gtk-glade/propertybox.c:623
-msgid "Italian"
-msgstr "Italiano"
-
-#: ../gtk-glade/propertybox.c:624
-msgid "Spanish"
-msgstr "Spagnolo"
-
-#: ../gtk-glade/propertybox.c:625
-msgid "Brazilian Portugese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:626
-msgid "Polish"
-msgstr "Polacco"
-
-#: ../gtk-glade/propertybox.c:627
-msgid "German"
-msgstr "Tedesco"
-
-#: ../gtk-glade/propertybox.c:628
-msgid "Russian"
-msgstr "Russo"
-
-#: ../gtk-glade/propertybox.c:629
-msgid "Japanese"
-msgstr "Giapponese"
-
-#: ../gtk-glade/propertybox.c:630
-msgid "Dutch"
-msgstr "Olandese"
-
-#: ../gtk-glade/propertybox.c:631
-msgid "Hungarian"
-msgstr "Ungherese"
-
-#: ../gtk-glade/propertybox.c:632
-msgid "Czech"
-msgstr "Ceco"
-
-#: ../gtk-glade/propertybox.c:633
-msgid "Chinese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:690
-msgid ""
-"You need to restart linphone for the new language selection to take effect."
-msgstr "Riavviare il software per utilizzare la nuova lingua selezionata"
-
-#: ../gtk-glade/update.c:80
-#, c-format
-msgid ""
-"A more recent version is availalble from %s.\n"
-"Would you like to open a browser to download it ?"
-msgstr ""
-"Una versione più recente è disponibile da %s.\n"
-"Vuoi aprire un browser per eseguire il download ?"
-
-#: ../gtk-glade/update.c:91
-msgid "You are running the lastest version."
-msgstr "Non è stato trovato alcun aggiornamento"
-
-#: ../gtk-glade/buddylookup.c:66
-msgid "Firstname, Lastname"
-msgstr "Nome, Cognome"
-
-#: ../gtk-glade/buddylookup.c:73
-msgid "SIP address"
-msgstr "Indirizzi SIP"
-
-#: ../gtk-glade/buddylookup.c:121
-msgid "Error communicating with server."
-msgstr "Errore di comunicazione"
-
-#: ../gtk-glade/buddylookup.c:125
-msgid "Connecting..."
-msgstr "In connessione..."
-
-#: ../gtk-glade/buddylookup.c:129
-msgid "Connected"
-msgstr "Connessione"
-
-#: ../gtk-glade/buddylookup.c:133
-msgid "Receiving data..."
-msgstr "Ricezione data..."
-
-#: ../gtk-glade/buddylookup.c:141
-#, c-format
-msgid "Found %i contact"
-msgid_plural "Found %i contacts"
-msgstr[0] "Trovato %i contatto"
-msgstr[1] "Trovato %i contatti"
-
-#: ../gtk-glade/setupwizard.c:25
-msgid ""
-"Welcome !\n"
-"This assistant will help you to use a SIP account for your calls."
-msgstr ""
-"Benvenuti !\n"
-"La procedura vi aiutera a configurare un account SIP."
-
-#: ../gtk-glade/setupwizard.c:34
-msgid "Create an account by choosing a username"
-msgstr "Creare un account scegliendo l'username"
-
-#: ../gtk-glade/setupwizard.c:35
-msgid "I have already an account and just want to use it"
-msgstr "Ho gia un account e voglio usarlo"
-
-#: ../gtk-glade/setupwizard.c:53
-msgid "Please choose a username:"
-msgstr "Prego scegliere un username"
-
-#: ../gtk-glade/setupwizard.c:54
-msgid "Username:"
-msgstr "Manuale utente"
-
-#: ../gtk-glade/setupwizard.c:92
-#, c-format
-msgid "Checking if '%s' is available..."
-msgstr "Controllo se '%s' è disponibile..."
-
-#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
-msgid "Please wait..."
-msgstr "Prego attendere ..."
-
-#: ../gtk-glade/setupwizard.c:101
-msgid "Sorry this username already exists. Please try a new one."
-msgstr "Spiacenti, questo usernsame è gia utilizzato. Prego riprovare"
-
-#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
-msgid "Ok !"
-msgstr "Ok !"
-
-#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
-msgid "Communication problem, please try again later."
-msgstr "Errore di comunicazione, prego riprovare."
-
-#: ../gtk-glade/setupwizard.c:134
-msgid "Thank you. Your account is now configured and ready for use."
-msgstr "Grazie. Il tuo account è configurato e pronto all'uso"
-
-#: ../gtk-glade/setupwizard.c:228
-msgid "Welcome to the account setup assistant"
-msgstr "Benvenuto nel configuratore di account"
-
-#: ../gtk-glade/setupwizard.c:232
-msgid "Account setup assistant"
-msgstr "Configuratore di account"
-
-#: ../gtk-glade/setupwizard.c:236
-msgid "Choosing a username"
-msgstr "Scegli un username"
-
-#: ../gtk-glade/setupwizard.c:240
-msgid "Verifying"
-msgstr "Verifica"
-
-#: ../gtk-glade/setupwizard.c:244
-msgid "Confirmation"
-msgstr "Informazioni"
-
-#: ../gtk-glade/setupwizard.c:249
-msgid "Creating your account"
-msgstr "Creazione account"
-
-#: ../gtk-glade/setupwizard.c:253
-msgid "Now ready !"
-msgstr "Pronto !"
-
-#: ../gtk-glade/incall_view.c:98
-#, fuzzy
-msgid "<b>Calling...</b>"
-msgstr "<b>Linguaggio</b>"
-
-#: ../gtk-glade/incall_view.c:122
-msgid "<b>In call with</b>"
-msgstr "<b>In chiamata con</b>"
-
-#: ../gtk-glade/incall_view.c:124
-msgid "00::00::00"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:140
-#, c-format
-msgid "%02i::%02i::%02i"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:158
-msgid "<b>Call ended.</b>"
-msgstr "<b>Chiamata terminata.</b>"
-
-#: ../gtk-glade/incall_view.c:176
-msgid "Unmute"
-msgstr "Attiva\nmicrofono"
-
-#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
-msgid "Mute"
-msgstr "Chiudi\nmicrofono"
-
-#: ../gtk-glade/loginframe.c:82
-#, c-format
-msgid "Please enter login information for %s"
-msgstr "Prego inserire le proprie credenziali di accesso per %s"
-
-#: ../gtk-glade/main.glade.h:1
-msgid "#"
-msgstr "#"
-
-#: ../gtk-glade/main.glade.h:2
-msgid "*"
-msgstr "*"
-
-#: ../gtk-glade/main.glade.h:3
-msgid "0"
-msgstr "0"
-
-#: ../gtk-glade/main.glade.h:4
-msgid "1"
-msgstr "1"
-
-#: ../gtk-glade/main.glade.h:5
-msgid "2"
-msgstr "2"
-
-#: ../gtk-glade/main.glade.h:6
-msgid "3"
-msgstr "3"
-
-#: ../gtk-glade/main.glade.h:7
-msgid "4"
-msgstr "4"
-
-#: ../gtk-glade/main.glade.h:8
-msgid "5"
-msgstr "5"
-
-#: ../gtk-glade/main.glade.h:9
-msgid "6"
-msgstr "6"
-
-#: ../gtk-glade/main.glade.h:10
-msgid "7"
-msgstr "7"
-
-#: ../gtk-glade/main.glade.h:11
-msgid "8"
-msgstr "8"
-
-#: ../gtk-glade/main.glade.h:12
-msgid "9"
-msgstr "9"
-
-#: ../gtk-glade/main.glade.h:13
-msgid "<b>Contact list</b>"
-msgstr "<b>Lista contatti</b>"
-
-#: ../gtk-glade/main.glade.h:14
-msgid "<b>Terminate call</b>"
-msgstr "<b>Termina chiamata</b>"
-
-#: ../gtk-glade/main.glade.h:15
-msgid "<b>Welcome !</b>"
-msgstr "<b>Benvenuto !</b>"
-
-#: ../gtk-glade/main.glade.h:16
-msgid "A"
-msgstr "A"
-
-#: ../gtk-glade/main.glade.h:17
-msgid ""
-"ADSL\n"
-"Fiber Channel"
-msgstr ""
-"ADSL\n"
-"Fibra Ottica"
-
-#: ../gtk-glade/main.glade.h:19
-msgid ""
-"All users\n"
-"Online users"
-msgstr ""
-"Tutti gli utenti\n"
-"Utenti Online"
-
-#: ../gtk-glade/main.glade.h:21
-msgid "Assistant"
-msgstr "Configuratore"
-
-#: ../gtk-glade/main.glade.h:22
-msgid "Audio & Video"
-msgstr "Audio & Video"
-
-#: ../gtk-glade/main.glade.h:23
-msgid "Audio only"
-msgstr "Solo Audio"
-
-#: ../gtk-glade/main.glade.h:24
-msgid "Automatically log me in"
-msgstr "Login Automatico"
-
-#: ../gtk-glade/main.glade.h:25
-msgid "B"
-msgstr "B"
-
-#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
-msgid "C"
-msgstr "C"
-
-#: ../gtk-glade/main.glade.h:27
-msgid "Check for updates"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:28
-msgid "D"
-msgstr "D"
-
-#: ../gtk-glade/main.glade.h:29
-msgid "Default"
-msgstr "Default"
-
-#: ../gtk-glade/main.glade.h:30
-msgid "Digits"
-msgstr "Caratteri"
-
-#: ../gtk-glade/main.glade.h:31
-msgid "Duration"
-msgstr "Durata"
-
-#: ../gtk-glade/main.glade.h:32
-msgid "Duration:"
-msgstr "Durata:"
-
-#: ../gtk-glade/main.glade.h:33
-msgid "Enable self-view"
-msgstr "Self-view abilitato"
-
-#: ../gtk-glade/main.glade.h:34
-msgid "Enter username, phone number, or full sip address"
-msgstr "Inserisci username, numero o indirizzo sip"
-
-#: ../gtk-glade/main.glade.h:35
-msgid "In call"
-msgstr "In chiamata"
-
-#: ../gtk-glade/main.glade.h:36
-msgid "Internet connection:"
-msgstr "Connessione Internet:"
-
-#: ../gtk-glade/main.glade.h:37
-msgid "Login information"
-msgstr "Credenziali di accesso"
-
-#: ../gtk-glade/main.glade.h:38
-msgid "Lookup:"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:39
-msgid "Main view"
-msgstr "Vista principale"
-
-#: ../gtk-glade/main.glade.h:41
-msgid "My current identity:"
-msgstr "Identità corrente"
-
-#: ../gtk-glade/main.glade.h:42
-msgid "Password"
-msgstr "Password"
-
-#: ../gtk-glade/main.glade.h:43
-msgid "SIP address or phone number:"
-msgstr "Indirizzo sip o numero."
-
-#: ../gtk-glade/main.glade.h:44
-msgid "Show current call"
-msgstr "Mostra chiamata corrente"
-
-#: ../gtk-glade/main.glade.h:45
-msgid "Start call"
-msgstr "Inizia chiamata"
-
-#: ../gtk-glade/main.glade.h:46
-msgid "Terminate call"
-msgstr "Termina chiamata"
-
-#: ../gtk-glade/main.glade.h:47
-msgid "Username"
-msgstr "Username"
-
-#: ../gtk-glade/main.glade.h:48
-msgid "_Linphone"
-msgstr "_Linphone"
-
-#: ../gtk-glade/main.glade.h:49
-msgid "_Modes"
-msgstr "_Modi"
-
-#: ../gtk-glade/main.glade.h:50
-msgid "gtk-connect"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:51
-msgid "gtk-find"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:52
-msgid "in"
-msgstr "in"
-
-#: ../gtk-glade/main.glade.h:53
-msgid "label"
-msgstr "etichetta"
-
-#: ../gtk-glade/about.glade.h:1
-msgid "About linphone"
-msgstr "Info Linphone"
-
-#: ../gtk-glade/about.glade.h:2
-msgid "An internet video phone using the standart SIP (rfc3261) protocol."
-msgstr "Un internet video telefono basato sullo standard SIP (rfc3261)"
-
-#: ../gtk-glade/about.glade.h:3
-msgid "Created by Simon Morlat\n"
-msgstr "Creato da Simon Morlat\n"
-
-#: ../gtk-glade/about.glade.h:5
-msgid ""
-"fr: Simon Morlat\n"
-"en: Simon Morlat and Delphine Perreau\n"
-"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
-"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
-"sv: Daniel Nylander <po@danielnylander.se>\n"
-"es: Jesus Benitez <gnelson at inMail dot sk>\n"
-"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
-"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
-"pl: Robert Nasiadek <darkone@darkone.pl>\n"
-"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
-"hu: anonymous\n"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:1
-msgid "<b>Contact information</b>"
-msgstr "<b>Contact informazioni</b>"
-
-#: ../gtk-glade/contact.glade.h:2
-msgid "Allow this contact to see my presence status"
-msgstr "Permitti al contatto di vedere il mio stato di presenza"
-
-#: ../gtk-glade/contact.glade.h:4
-msgid "SIP Address"
-msgstr "Rubrica"
-
-#: ../gtk-glade/contact.glade.h:5
-msgid "Show this contact presence status"
-msgstr "Mostra lo stato di presenza del contatto"
-
-#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
-#: ../gtk-glade/sip_account.glade.h:9
-msgid "gtk-cancel"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
-#: ../gtk-glade/sip_account.glade.h:10
-msgid "gtk-ok"
-msgstr ""
-
-#: ../gtk-glade/log.glade.h:1
-msgid "Linphone debug window"
-msgstr "Linphone debug window"
-
-#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
-#: ../gtk-glade/chatroom.glade.h:2
-msgid "gtk-close"
-msgstr ""
-
-#: ../gtk-glade/password.glade.h:1
-msgid "Linphone - Authentication required"
-msgstr "Linphone - Autenticazione richiesta"
-
-#: ../gtk-glade/password.glade.h:2
-msgid "Password:"
-msgstr "Password:"
-
-#: ../gtk-glade/password.glade.h:3
-msgid "Please enter the domain password"
-msgstr "Prego inserire la password di dominio"
-
-#: ../gtk-glade/password.glade.h:4
-msgid "UserID"
-msgstr ""
-
-#: ../gtk-glade/call_logs.glade.h:1
-msgid "Call history"
-msgstr "Cronologia"
-
-#: ../gtk-glade/sip_account.glade.h:1
-msgid "Configure a SIP account"
-msgstr "Configurazione SIP account"
-
-#: ../gtk-glade/sip_account.glade.h:2
-msgid "Linphone - Configure a SIP account"
-msgstr "Linphone - Configurazione SIP account"
-
-#: ../gtk-glade/sip_account.glade.h:3
-msgid "Publish presence information"
-msgstr "Pubblica stato della presenza"
-
-#: ../gtk-glade/sip_account.glade.h:4
-msgid "Register at startup"
-msgstr "Registra all'avvio"
-
-#: ../gtk-glade/sip_account.glade.h:5
-msgid "Registration duration (sec):"
-msgstr "Durata registrazione (sec)"
-
-#: ../gtk-glade/sip_account.glade.h:6
-msgid "Route (optional):"
-msgstr "Rotta (opzionale)"
-
-#: ../gtk-glade/sip_account.glade.h:7
-msgid "SIP Proxy address:"
-msgstr "Indirizzo sip proxy:"
-
-#: ../gtk-glade/sip_account.glade.h:8
-msgid "Your SIP identity:"
-msgstr "Identità SIP"
-
-#: ../gtk-glade/sip_account.glade.h:11
-msgid "sip:"
-msgstr "sip:"
-
-#: ../gtk-glade/chatroom.glade.h:1
-msgid "Send"
-msgstr "Invia"
-
-#: ../gtk-glade/incoming_call.glade.h:1
-msgid "Accept"
-msgstr "Accetta"
-
-#: ../gtk-glade/incoming_call.glade.h:2
-msgid "Decline"
-msgstr "Rifiuta"
-
-#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
-msgid "Incoming call"
-msgstr "Chimata in entrata"
-
-#: ../gtk-glade/incoming_call.glade.h:4
-msgid "Incoming call from"
-msgstr "Chiama in entrata da"
-
-#: ../gtk-glade/incoming_call.glade.h:5
-msgid "Linphone - Incoming call"
-msgstr "Linphone - Chiamata in entrata"
-
-#: ../gtk-glade/parameters.glade.h:1
-msgid "0 stands for \"unlimited\""
-msgstr "0 sta per illimitato"
-
-#: ../gtk-glade/parameters.glade.h:2
-msgid "<b>Audio</b>"
-msgstr "<b>Audio</b>"
-
-#: ../gtk-glade/parameters.glade.h:3
-msgid "<b>Bandwidth control</b>"
-msgstr "<b>Gestione banda</b>"
-
-#: ../gtk-glade/parameters.glade.h:4
-msgid "<b>Codecs</b>"
-msgstr "<b>Codecs</b>"
-
-#: ../gtk-glade/parameters.glade.h:5
-msgid "<b>Default identity</b>"
-msgstr "<b>Identità di default</b>"
-
-#: ../gtk-glade/parameters.glade.h:6
-msgid "<b>Language</b>"
-msgstr "<b>Linguaggio</b>"
-
-#: ../gtk-glade/parameters.glade.h:7
-msgid "<b>NAT and Firewall</b>"
-msgstr "<b>NAT and Firewall</b>"
-
-#: ../gtk-glade/parameters.glade.h:8
-msgid "<b>Ports</b>"
-msgstr "<b>Porte</b>"
-
-#: ../gtk-glade/parameters.glade.h:9
-msgid "<b>Privacy</b>"
-msgstr "<b>Privacy</b>"
-
-#: ../gtk-glade/parameters.glade.h:10
-msgid "<b>Proxy accounts</b>"
-msgstr "<b>Account proxy</b>"
-
-#: ../gtk-glade/parameters.glade.h:11
-msgid "<b>Transport</b>"
-msgstr "<b>Transporto</b>"
-
-#: ../gtk-glade/parameters.glade.h:12
-msgid "<b>Video</b>"
-msgstr "<b>Video</b>"
-
-#: ../gtk-glade/parameters.glade.h:13
-msgid "ALSA special device (optional):"
-msgstr "Dispositivo ALSA (optional):"
-
-#: ../gtk-glade/parameters.glade.h:14
-msgid "Add"
-msgstr "Aggiungi"
-
-#: ../gtk-glade/parameters.glade.h:15
-msgid "Audio RTP/UDP:"
-msgstr "Audio RTP/UDP:"
-
-#: ../gtk-glade/parameters.glade.h:16
-msgid ""
-"Audio codecs\n"
-"Video codecs"
-msgstr ""
-"Audio codecs\n"
-"Video codecs"
-
-#: ../gtk-glade/parameters.glade.h:18
-msgid "Behind NAT / Firewall (specify gateway IP below)"
-msgstr "Dietro NAT / Firewall (IP del gateway)"
-
-#: ../gtk-glade/parameters.glade.h:19
-msgid "Behind NAT / Firewall (use STUN to resolve)"
-msgstr "Dietro NAT / Firewall (utilizza STUN)"
-
-#: ../gtk-glade/parameters.glade.h:21
-msgid "CIF"
-msgstr "CIF"
-
-#: ../gtk-glade/parameters.glade.h:22
-msgid "Capture device:"
-msgstr "Dispositivo microfono:"
-
-#: ../gtk-glade/parameters.glade.h:23
-msgid "Codecs"
-msgstr "Codec"
-
-#: ../gtk-glade/parameters.glade.h:24
-msgid "Direct connection to the Internet"
-msgstr "Connessione diretta a internet"
-
-#: ../gtk-glade/parameters.glade.h:25
-msgid "Disable"
-msgstr "Disattivato"
-
-#: ../gtk-glade/parameters.glade.h:26
-msgid "Done"
-msgstr "Fatto"
-
-#: ../gtk-glade/parameters.glade.h:27
-msgid "Download speed limit in Kbit/sec:"
-msgstr "Velocita massima in Dowload Kbit/sec"
-
-#: ../gtk-glade/parameters.glade.h:28
-msgid "Edit"
-msgstr "Edita"
-
-#: ../gtk-glade/parameters.glade.h:29
-msgid "Enable"
-msgstr "Attivato"
-
-#: ../gtk-glade/parameters.glade.h:30
-msgid "Enable echo cancellation"
-msgstr "Attiva cancellazione eco"
-
-#: ../gtk-glade/parameters.glade.h:31
-msgid "Erase all passwords"
-msgstr "Cancella tutte le password"
-
-#: ../gtk-glade/parameters.glade.h:32
-msgid "Manage SIP Accounts"
-msgstr "Gestici SIP Account"
-
-#: ../gtk-glade/parameters.glade.h:33
-msgid "Multimedia settings"
-msgstr "Impostazioni multimediali"
-
-#: ../gtk-glade/parameters.glade.h:34
-msgid "Network settings"
-msgstr "Impostazioni di rete"
-
-#: ../gtk-glade/parameters.glade.h:35
-msgid "Playback device:"
-msgstr "Dispositivo uscita audio:"
-
-#: ../gtk-glade/parameters.glade.h:36
-msgid "Prefered video resolution:"
-msgstr "Risoluzione video preferita"
-
-#: ../gtk-glade/parameters.glade.h:37
-msgid "Public IP address:"
-msgstr "Indirizzo ip pubblico:"
-
-#: ../gtk-glade/parameters.glade.h:38
-msgid ""
-"Register to FONICS\n"
-"virtual network !"
-msgstr ""
-"Registrati a  FONICS\n"
-"virtual network !"
-
-#: ../gtk-glade/parameters.glade.h:40
-msgid "Remove"
-msgstr "Rimuovi"
-
-#: ../gtk-glade/parameters.glade.h:41
-msgid "Ring device:"
-msgstr "Dispositivo squillo:"
-
-#: ../gtk-glade/parameters.glade.h:42
-msgid "Ring sound:"
-msgstr "Suoneria:"
-
-#: ../gtk-glade/parameters.glade.h:43
-msgid "SIP (UDP):"
-msgstr "SIP (UDP)"
-
-#: ../gtk-glade/parameters.glade.h:44
-msgid "Send DTMFs as SIP info"
-msgstr "Invia DTMF come SIP info"
-
-#: ../gtk-glade/parameters.glade.h:45
-msgid "Set Maximum Transmission Unit:"
-msgstr "Imposta Maximum Transmission Unit:"
-
-#: ../gtk-glade/parameters.glade.h:46
-msgid "Settings"
-msgstr "Preferenze"
-
-#: ../gtk-glade/parameters.glade.h:47
-msgid "Stun server:"
-msgstr "Stun server:"
-
-#: ../gtk-glade/parameters.glade.h:48
-msgid "This section defines your SIP address when not using a SIP account"
-msgstr ""
-"questa sezione definisce il tuo indirizzo SIP se non hai account attivi"
-
-#: ../gtk-glade/parameters.glade.h:49
-msgid "Upload speed limit in Kbit/sec:"
-msgstr "Velocità massima in upload Kbit/sec:"
-
-#: ../gtk-glade/parameters.glade.h:50
-msgid "Use IPv6 instead of IPv4"
-msgstr "Usa IPv6 invece che IPv4"
-
-#: ../gtk-glade/parameters.glade.h:51
-msgid "User interface"
-msgstr "Interfaccia utente"
-
-#: ../gtk-glade/parameters.glade.h:52
-msgid "Video RTP/UDP:"
-msgstr "Video RTP/UDP"
-
-#: ../gtk-glade/parameters.glade.h:53
-msgid "Video input device:"
-msgstr "Dispositivo Video:"
-
-#: ../gtk-glade/parameters.glade.h:54
-msgid "Your display name (eg: John Doe):"
-msgstr "Nome visualizzato (es: Mario Rossi):"
-
-#: ../gtk-glade/parameters.glade.h:55
-msgid "Your resulting SIP address:"
-msgstr "Il tuo indirizzo sip:"
-
-#: ../gtk-glade/parameters.glade.h:56
-msgid "Your username:"
-msgstr "Username"
-
-#: ../gtk-glade/parameters.glade.h:57
-msgid "a sound card\n"
-msgstr "una scheda audio\n"
-
-#: ../gtk-glade/parameters.glade.h:59
-msgid "default camera"
-msgstr "default videocamera"
-
-#: ../gtk-glade/parameters.glade.h:60
-msgid "default soundcard"
-msgstr "default scheda audio"
-
-#: ../gtk-glade/parameters.glade.h:61
-msgid "default soundcard\n"
-msgstr "default scheda audio\n"
-
-#: ../gtk-glade/parameters.glade.h:63
-msgid "gtk-go-down"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:64
-msgid "gtk-go-up"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:65
-msgid "gtk-media-play"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:1
-msgid "<b>Search somebody</b>"
-msgstr "<b>Cerca</b>"
-
-#: ../gtk-glade/buddylookup.glade.h:2
-msgid "Add to my list"
-msgstr "Aggiungi alla mia lista"
-
-#: ../gtk-glade/buddylookup.glade.h:3
-msgid "Search contacts in directory"
-msgstr "Cerca contatti nella directory"
-
-#: ../gtk-glade/waiting.glade.h:1
-msgid "Linphone"
-msgstr "Linphone"
-
-#: ../gtk-glade/waiting.glade.h:2
-msgid "Please wait"
-msgstr "Prego attendere"
-
-#: ../coreapi/linphonecore.c:195
-#, c-format
-msgid "You have missed %i call."
-msgid_plural "You have missed %i calls."
-msgstr[0] ""
-msgstr[1] ""
-
-#: ../coreapi/linphonecore.c:223
-msgid "aborted"
-msgstr "annullato"
-
-#: ../coreapi/linphonecore.c:226
-msgid "completed"
-msgstr "comletato"
-
-#: ../coreapi/linphonecore.c:229
-msgid "missed"
-msgstr "mancante"
-
-#: ../coreapi/linphonecore.c:234
-#, c-format
-msgid ""
-"%s at %s\n"
-"From: %s\n"
-"To: %s\n"
-"Status: %s\n"
-"Duration: %i mn %i sec\n"
-msgstr ""
-"%s at %s\n"
-"Da: %s\n"
-"Verso: %s\n"
-"Stato: %s\n"
-"Durata: %i mn %i sec\n"
-
-#: ../coreapi/linphonecore.c:235
-msgid "Outgoing call"
-msgstr "Chiamata in uscita"
-
-#: ../coreapi/linphonecore.c:445
-msgid ""
-"Your machine appears to be connected to an IPv6 network. By default linphone "
-"always uses IPv4. Please update your configuration if you want to use IPv6"
-msgstr ""
-"La tua macchina sembra connessa ad una rete IPv6. Di default linphone "
-"utilizza IPv4. Prego aggiorna la tua configurazione se vuoi usare IPv6"
-
-#: ../coreapi/linphonecore.c:739
-msgid "Ready"
-msgstr "Pronto"
-
-#: ../coreapi/linphonecore.c:1014
-msgid "Remote end seems to have disconnected, the call is going to be closed."
-msgstr "L'utente remoto sembra disconesso, la chiamata verrà terminata"
-
-#: ../coreapi/linphonecore.c:1172
-msgid "Looking for telephone number destination..."
-msgstr "Ricerca numero destinazione..."
-
-#: ../coreapi/linphonecore.c:1174
-msgid "Could not resolve this number."
-msgstr "Impossibile risolvere il numero."
-
-#: ../coreapi/linphonecore.c:1239
-msgid ""
-"Could not parse given sip address. A sip url usually looks like sip:"
-"user@domain"
-msgstr ""
-"Errore nel formato del contatto sip. Usualmente un indirizzo appare sip:"
-"user@domain"
-
-#: ../coreapi/linphonecore.c:1340
-msgid "Sorry, having multiple simultaneous calls is not supported yet !"
-msgstr "Spiacenti, le chiamate multiple non sono supportate"
-
-#: ../coreapi/linphonecore.c:1387
-msgid "Contacting"
-msgstr "In connessione"
-
-#: ../coreapi/linphonecore.c:1402
-msgid "could not call"
-msgstr "chiamata fallita"
-
-#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
-msgid "Connected."
-msgstr "Connessione"
-
-#: ../coreapi/linphonecore.c:1813
-msgid "Call ended"
-msgstr "Chiamata terminata"
-
-#: ../coreapi/linphonecore.c:2175
-msgid "No nat/firewall address supplied !"
-msgstr "Non è stato fornito un indirizzo nat/firewall!"
-
-#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
-#, c-format
-msgid "Invalid nat address '%s' : %s"
-msgstr "Indirizzo NAT invalido '%s' : %s"
-
-#: ../coreapi/misc.c:134
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the pcm oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-"'modprobe snd-pcm-oss' as root to load it."
-msgstr ""
-"Il tuo computer appare utlizzare il driver ALSA.\n"
-"Questa è la scelta migliore. Tuttavia il modulo di emulazione pcm oss\n"
-"è assente e linphone lo richede. Prego eseguire\n"
-"'modprobe snd-pcm-oss' da utente root per caricarlo."
-
-#: ../coreapi/misc.c:137
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the mixer oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-" 'modprobe snd-mixer-oss' as root to load it."
-msgstr ""
-"Il tuo computer appare utlizzare il driver ALSA.\n"
-"Questa è la scelta migliore. Tuttavia il modulo di emulazione mixer oss\n"
-"è assente e linphone lo richede. Prego eseguire\n"
-"'modprobe snd-mixer-oss' da utente root per caricarlo."
-
-#: ../coreapi/misc.c:610
-msgid "Stun lookup in progress..."
-msgstr "Ricerca Stun in progresso ..."
-
-#: ../coreapi/exevents.c:127
-msgid "Call terminated."
-msgstr "Chiamata terminata."
-
-#: ../coreapi/exevents.c:149
-msgid "Could not reach destination."
-msgstr "Non posso raggiungere la destinazione"
-
-#: ../coreapi/exevents.c:158
-msgid "User is busy."
-msgstr "Utente occupato"
-
-#: ../coreapi/exevents.c:159
-msgid "User is temporarily unavailable."
-msgstr "Utente non disponibile"
-
-#: ../coreapi/exevents.c:160
-msgid "Request Cancelled."
-msgstr "Richiesta cancellata"
-
-#. char *retrymsg=_("%s. Retry after %i minute(s).");
-#: ../coreapi/exevents.c:162
-msgid "User does not want to be disturbed."
-msgstr "L'utente non vuole essere disturbato"
-
-#: ../coreapi/exevents.c:163
-msgid "Call declined."
-msgstr "Chiamata rifiutata"
-
-#: ../coreapi/exevents.c:191
-msgid "Bad request"
-msgstr "Richiesta errata"
-
-#: ../coreapi/exevents.c:194
-msgid "User cannot be found at given address."
-msgstr "L'utente non trovato."
-
-#: ../coreapi/exevents.c:197
-msgid "Remote user cannot support any of proposed codecs."
-msgstr "L'utente remoto non supporta alcun code proposto."
-
-#. time out, call leg is lost
-#: ../coreapi/exevents.c:227
-msgid "Timeout."
-msgstr "Timeout."
-
-#: ../coreapi/exevents.c:230
-msgid "Remote host was found but refused connection."
-msgstr "Utente remoto trovato ma ha rifiutato la connessione."
-
-#: ../coreapi/exevents.c:339
-msgid "is contacting you."
-msgstr "ti sta conttatando."
-
-#: ../coreapi/exevents.c:424
-#, c-format
-msgid "Redirected to %s..."
-msgstr "Rediretto verso %s..."
-
-#: ../coreapi/exevents.c:440
-msgid ""
-"User is not reachable at the moment but he invites you\n"
-"to contact him using the following alternate resource:"
-msgstr ""
-"L'utente non è raggiungibile ma ti ha invitato\n"
-"per contattarlo usare l'indirizzo alternativo:"
-
-#: ../coreapi/exevents.c:861
-msgid "Early media."
-msgstr ""
-
-#: ../coreapi/exevents.c:972
-#, c-format
-msgid "Registration on %s failed: %s"
-msgstr "Registrazione su %s fallita: %s"
-
-#: ../coreapi/exevents.c:972
-msgid "no response timeout"
-msgstr "timeout no risposta"
-
-#: ../coreapi/exevents.c:998
-#, c-format
-msgid "Registration on %s successful."
-msgstr "Registrazione su %s attiva"
-
-#: ../coreapi/exevents.c:999
-#, c-format
-msgid "Unregistration on %s done."
-msgstr "Unregistrazione su %s"
-
-#. people for which we don't have yet an answer should appear as offline
-#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
-msgid "Gone"
-msgstr "Uscita"
-
-#: ../coreapi/presence.c:129
-msgid "Waiting for Approval"
-msgstr "In attesa di approvazione"
-
-#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
-msgid "Online"
-msgstr "Onlinea"
-
-#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
-msgid "Busy"
-msgstr "Occupato"
-
-#: ../coreapi/presence.c:142
-msgid "Be Right Back"
-msgstr "Torno subito"
-
-#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
-msgid "Away"
-msgstr "Assente"
-
-#: ../coreapi/presence.c:151
-msgid "On The Phone"
-msgstr "Al telefono"
-
-#: ../coreapi/presence.c:156
-msgid "Out To Lunch"
-msgstr "Fuori per pranzo"
-
-#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
-msgid "Closed"
-msgstr "Chiuso"
-
-#: ../coreapi/friend.c:35
-msgid "Unknown"
-msgstr "Sconosciuto"
-
-#: ../coreapi/friend.c:44
-msgid "Be right back"
-msgstr "Torno subito"
-
-#: ../coreapi/friend.c:50
-msgid "On the phone"
-msgstr "Al telefono"
-
-#: ../coreapi/friend.c:53
-msgid "Out to lunch"
-msgstr "Fuori per pranzo"
-
-#: ../coreapi/friend.c:56
-msgid "Do not disturb"
-msgstr "Non disturbare"
-
-#: ../coreapi/friend.c:59
-msgid "Moved"
-msgstr "Mosso"
-
-#: ../coreapi/friend.c:62
-msgid "Using another messaging service"
-msgstr "Utilizza una altro servizio di meesaggistica"
-
-#: ../coreapi/friend.c:65
-msgid "Offline"
-msgstr "Offline"
-
-#: ../coreapi/friend.c:68
-msgid "Pending"
-msgstr "Pendente"
-
-#: ../coreapi/friend.c:74
-msgid "Unknown-bug"
-msgstr "Bug-sconosciuto"
-
-#: ../coreapi/proxy.c:221
-msgid ""
-"The sip proxy address you entered is invalid, it must start with \"sip:\" "
-"followed by a hostname."
-msgstr ""
-"L'indirizzo sip proxy utilizzato è invalido, deve iniziare con  \"sip:\" "
-"seguito dall' hostaname."
-
-#: ../coreapi/proxy.c:227
-msgid ""
-"The sip identity you entered is invalid.\n"
-"It should look like sip:username@proxydomain, such as sip:alice@example.net"
-msgstr ""
-"L'identità sip utilizza è invalida.\n"
-"Dovrebbre essere sip:username@proxydomain, esempio: sip:alice@example.net"
-
-#: ../coreapi/proxy.c:634
-#, c-format
-msgid "Could not login as %s"
-msgstr "impossibile login come %s"
-
-#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
-msgid "ITU-G.711 alaw encoder"
-msgstr "ITU-G.711 alaw encoder"
-
-#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
-msgid "ITU-G.711 alaw decoder"
-msgstr "ITU-G.711 alaw decoder"
-
-#: ../mediastreamer2/src/alsa.c:923
-msgid "Alsa sound source"
-msgstr "Alsa sound sorgente"
-
-#: ../mediastreamer2/src/alsa.c:1027
-msgid "Alsa sound output"
-msgstr "Alsa sound riproduzione"
-
-#: ../mediastreamer2/src/aqsnd.c:891
-msgid "Sound capture filter for MacOS X Audio Queue Service"
-msgstr "Sound capture filter for MacOS X Audio Queue Service"
-
-#: ../mediastreamer2/src/aqsnd.c:915
-msgid "Sound playback filter for MacOS X Audio Queue Service"
-msgstr "Sound playback filter for MacOS X Audio Queue Service"
-
-#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
-msgid "DTMF generator"
-msgstr "Generatore DTMF"
-
-#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
-msgid "The GSM full-rate codec"
-msgstr "GSM full-rate codec"
-
-#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
-msgid "The GSM codec"
-msgstr "GSM codec"
-
-#: ../mediastreamer2/src/macsnd.c:670
-msgid "Sound capture filter for MacOS X Core Audio drivers"
-msgstr "Sound capture filter for MacOS X Core Audio drivers"
-
-#: ../mediastreamer2/src/macsnd.c:684
-msgid "Sound playback filter for MacOS X Core Audio drivers"
-msgstr "Sound playback filter for MacOS X Core Audio drivers"
-
-#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
-msgid "A filter to make conferencing"
-msgstr "Un filtro per fare conferenze"
-
-#: ../mediastreamer2/src/msfileplayer.c:295
-#: ../mediastreamer2/src/msfileplayer.c:313
-msgid "Raw files and wav reader"
-msgstr "Raw files and wav reader"
-
-#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
-#: ../mediastreamer2/src/msfilerec_win.c:216
-#: ../mediastreamer2/src/msfilerec_win.c:234
-msgid "Wav file recorder"
-msgstr "Registratore Wav file"
-
-#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
-msgid "A filter that send several inputs to one output."
-msgstr "Un filtro che invia alcuni inputs in un unico output"
-
-#: ../mediastreamer2/src/msresample.c:221
-#: ../mediastreamer2/src/msresample.c:239
-msgid "frequency resampler"
-msgstr "campionatore di frequenza"
-
-#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
-msgid "RTP output filter"
-msgstr "RTP output filter"
-
-#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
-msgid "RTP input filter"
-msgstr "RTP imput filter"
-
-#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
-#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
-msgid "The free and wonderful speex codec"
-msgstr "The free and wonderful speex codec"
-
-#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
-msgid "A filter that controls and measure sound volume"
-msgstr "Un filtro che controlla e misura il volume"
-
-#: ../mediastreamer2/src/msv4l.c:1009
-msgid "A video4linux compatible source filter to stream pictures."
-msgstr "Un video4linux filtro per inviare immagini"
-
-#: ../mediastreamer2/src/msv4l2.c:458
-msgid "A filter to grab pictures from Video4Linux2-powered cameras"
-msgstr "un filtro per catturare immagini da video4linux2 videocamere"
-
-#: ../mediastreamer2/src/nowebcam.c:1780
-msgid "A filter that outputs a static image."
-msgstr "Un filtro che invia una immagine statica"
-
-#: ../mediastreamer2/src/oss.c:567
-msgid "Sound capture filter for OSS drivers"
-msgstr "Filtro per la cattura audio per i driver OSS"
-
-#: ../mediastreamer2/src/oss.c:581
-msgid "Sound playback filter for OSS drivers"
-msgstr "Filtro per la riproduzione audio per i driver OSS"
-
-#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
-msgid "A pixel format converter"
-msgstr "Un convertitore di formati pixel"
-
-#: ../mediastreamer2/src/sizeconv.c:204
-msgid "A video size converter"
-msgstr "Un convertitore dimesione video "
-
-#: ../mediastreamer2/src/sizeconv.c:222
-msgid "a small video size converter"
-msgstr "un piccolo convertitore dimesione video"
-
-#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
-msgid "Echo canceler using speex library"
-msgstr "Cancellazione eco utilizzando la libreria speex"
-
-#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
-msgid "A filter that reads from input and copy to its multiple outputs."
-msgstr "Un filtro che legge gli inout e copia su multipli output."
-
-#: ../mediastreamer2/src/theora.c:375
-msgid "The theora video encoder from xiph.org"
-msgstr "Theora video encoder da xiph.org"
-
-#: ../mediastreamer2/src/theora.c:393
-msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
-msgstr "Open-source and royalty-free 'theora' video codec da xiph.org"
-
-#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
-msgid "The theora video decoder from xiph.org"
-msgstr "Theora video decoder from xiph.org"
-
-#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
-msgid "ITU-G.711 ulaw encoder"
-msgstr "ITU-G.711 ulaw encoder"
-
-#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
-msgid "ITU-G.711 ulaw decoder"
-msgstr "ITU-G.711 ulaw decoder"
-
-#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
-#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
-msgid "A H.263 decoder using ffmpeg library"
-msgstr "Un H.263 decoder che utilizza le librerie ffmpeg"
-
-#: ../mediastreamer2/src/videodec.c:688
-msgid "A MPEG4 decoder using ffmpeg library"
-msgstr "Un MPEG4 decoder che utilizza le librerie ffmpeg"
-
-#: ../mediastreamer2/src/videodec.c:704
-msgid "A RTP/JPEG decoder using ffmpeg library"
-msgstr "Un RTP/JPEG decoder che utilizza le librerie ffmpeg"
-
-#: ../mediastreamer2/src/videodec.c:720
-msgid "A MJPEG decoder using ffmpeg library"
-msgstr "Un MJPEG decoder che utilizza le librerie ffmpeg"
-
-#: ../mediastreamer2/src/videodec.c:736
-msgid "A snow decoder using ffmpeg library"
-msgstr "Un snow decoder che utilizza le librerie ffmpeg"
-
-#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
-msgid "A video H.263 encoder using ffmpeg library."
-msgstr "Un H.263 encoder che utilizza le librerie ffmpeg"
-
-#: ../mediastreamer2/src/videoenc.c:856
-msgid ""
-"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
-"spec."
-msgstr ""
-"Un H.263 encoder che utilizza le librerie ffmpeg. Compliante con RFC2190 "
-"spec."
-
-#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
-msgid "A video MPEG4 encoder using ffmpeg library."
-msgstr "Un MPEG4 encoder che utilizza le librerie ffmpeg"
-
-#: ../mediastreamer2/src/videoenc.c:888
-msgid "A video snow encoder using ffmpeg library."
-msgstr "Un snow encoder che utilizza le librerie ffmpeg"
-
-#: ../mediastreamer2/src/videoenc.c:904
-msgid "A RTP/MJPEG encoder using ffmpeg library."
-msgstr "Un RTP/JPEG decoder che utilizza le librerie ffmpeg"
-
-#: ../mediastreamer2/src/videoenc.c:938
-msgid ""
-"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
-msgstr ""
-"Un H.263 encoder che utilizza le librerie ffmpeg. Compliante con RFC2190 "
-"spec."
-
-#: ../mediastreamer2/src/videoenc.c:970
-msgid ""
-"The snow codec is royalty-free and is open-source. \n"
-"It uses innovative techniques that makes it one of most promising video "
-"codec. It is implemented within the ffmpeg project.\n"
-"However it is under development, quite unstable and compatibility with other "
-"versions cannot be guaranteed."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:990
-msgid "A MJPEG encoder using ffmpeg library."
-msgstr "Un MJPEG encoder che utilizza le librerie ffmpeg"
-
-#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
-msgid "A generic video display"
-msgstr "Un generico video display"
-
-#: ../mediastreamer2/src/wincevideods.c:966
-#: ../mediastreamer2/src/wincevideods.c:984
-#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
-#: ../mediastreamer2/src/winvideods.c:1306
-#: ../mediastreamer2/src/winvideods.c:1324
-msgid "A video4windows compatible source filter to stream pictures."
-msgstr "Un filtro video4windows per lo streaming delle immagini."
-
-#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
-msgid "A video for windows (vfw.h) based source filter to grab pictures."
-msgstr "Un filtro (vfw.h) per catturare immagini."
-
-#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
-msgid "ICE filter"
-msgstr "Filtro ICE"
-
-#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
-msgid "A filter that trashes its input (useful for terminating some graphs)."
-msgstr ""
-
-#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
-msgid "Parametric sound equalizer."
-msgstr "Equalizzatore di suono."
-
-#: ../mediastreamer2/src/msdscap-mingw.cc:1003
-msgid "A webcam grabber based on directshow."
-msgstr "Un webcam grabber basato su directshow."
-
-#~ msgid "Bresilian"
-#~ msgstr "Brasiliano"
diff --git a/linphone/po/ja.po b/linphone/po/ja.po
deleted file mode 100644 (file)
index d17f37b..0000000
+++ /dev/null
@@ -1,1900 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# 山口善也 <yushiya@anet.ne.jp>, 2002.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: linphone 0.10\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-10-16 15:24+0200\n"
-"PO-Revision-Date: 2003-01-21 00:05+9000\n"
-"Last-Translator: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
-"Language-Team: <ja@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
-#: ../gtk-glade/support.c:102
-#, c-format
-msgid "Couldn't find pixmap file: %s"
-msgstr "pixmapファイルが見つかりません %s"
-
-#: ../gtk-glade/chat.c:27
-#, c-format
-msgid "Chat with %s"
-msgstr ""
-
-#: ../gtk-glade/main.c:90
-msgid "log to stdout some debug information while running."
-msgstr ""
-
-#: ../gtk-glade/main.c:97
-msgid "Start only in the system tray, do not show the main interface."
-msgstr ""
-
-#: ../gtk-glade/main.c:104
-msgid "address to call right now"
-msgstr ""
-
-#: ../gtk-glade/main.c:111
-msgid "if set automatically answer incoming calls"
-msgstr ""
-
-#: ../gtk-glade/main.c:119
-msgid ""
-"Specifiy a working directory (should be the base of the installation, eg: c:"
-"\\Program Files\\Linphone)"
-msgstr ""
-
-#: ../gtk-glade/main.c:675
-#, c-format
-msgid "Incoming call from %s"
-msgstr ""
-
-#: ../gtk-glade/main.c:707
-#, c-format
-msgid ""
-"%s would like to add you to his contact list.\n"
-"Would you allow him to see your presence status or add him to your contact "
-"list ?\n"
-"If you answer no, this person will be temporarily blacklisted."
-msgstr ""
-
-#: ../gtk-glade/main.c:777
-#, c-format
-msgid ""
-"Please enter your password for username <i>%s</i>\n"
-" at domain <i>%s</i>:"
-msgstr ""
-
-#: ../gtk-glade/main.c:871
-msgid "Website link"
-msgstr ""
-
-#: ../gtk-glade/main.c:907
-msgid "Linphone - a video internet phone"
-msgstr ""
-
-#: ../gtk-glade/main.c:926
-#, c-format
-msgid "%s (Default)"
-msgstr ""
-
-#: ../gtk-glade/main.c:1168
-msgid "A free SIP video-phone"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
-#: ../gtk-glade/contact.glade.h:3
-msgid "Name"
-msgstr "名前"
-
-#: ../gtk-glade/friendlist.c:212
-#, fuzzy
-msgid "Presence status"
-msgstr "状態"
-
-#: ../gtk-glade/friendlist.c:243
-#, c-format
-msgid "Search in %s directory"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:432
-msgid "Invalid sip contact !"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:474
-#, c-format
-msgid "Call %s"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:475
-#, c-format
-msgid "Send text to %s"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:476
-#, fuzzy, c-format
-msgid "Edit contact '%s'"
-msgstr "(接続するための情報がありません!)"
-
-#: ../gtk-glade/friendlist.c:477
-#, c-format
-msgid "Delete contact '%s'"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:519
-#, c-format
-msgid "Add new contact from %s directory"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:251
-msgid "Rate (Hz)"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:257
-msgid "Status"
-msgstr "状態"
-
-#: ../gtk-glade/propertybox.c:263
-msgid "Min bitrate (kbit/s)"
-msgstr "最低限のビットレート (kbit/s)"
-
-#: ../gtk-glade/propertybox.c:269
-msgid "Parameters"
-msgstr "パラメーター"
-
-#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
-msgid "Enabled"
-msgstr "使用する"
-
-#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
-msgid "Disabled"
-msgstr "使用しない"
-
-#: ../gtk-glade/propertybox.c:480
-msgid "Account"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:620
-msgid "English"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:621
-msgid "French"
-msgstr "Français"
-
-#: ../gtk-glade/propertybox.c:622
-msgid "Swedish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:623
-msgid "Italian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:624
-msgid "Spanish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:625
-msgid "Brazilian Portugese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:626
-msgid "Polish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:627
-msgid "German"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:628
-msgid "Russian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:629
-msgid "Japanese"
-msgstr "日本語"
-
-#: ../gtk-glade/propertybox.c:630
-msgid "Dutch"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:631
-msgid "Hungarian"
-msgstr "Magyar"
-
-#: ../gtk-glade/propertybox.c:632
-msgid "Czech"
-msgstr "čeština"
-
-#: ../gtk-glade/propertybox.c:633
-msgid "Chinese"
-msgstr "简体中文"
-
-#: ../gtk-glade/propertybox.c:690
-msgid ""
-"You need to restart linphone for the new language selection to take effect."
-msgstr ""
-
-#: ../gtk-glade/update.c:80
-#, c-format
-msgid ""
-"A more recent version is availalble from %s.\n"
-"Would you like to open a browser to download it ?"
-msgstr ""
-
-#: ../gtk-glade/update.c:91
-msgid "You are running the lastest version."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:66
-msgid "Firstname, Lastname"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:73
-#, fuzzy
-msgid "SIP address"
-msgstr "アドレス"
-
-#: ../gtk-glade/buddylookup.c:121
-msgid "Error communicating with server."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:125
-#, fuzzy
-msgid "Connecting..."
-msgstr "コネクション"
-
-#: ../gtk-glade/buddylookup.c:129
-#, fuzzy
-msgid "Connected"
-msgstr "接続しました。"
-
-#: ../gtk-glade/buddylookup.c:133
-msgid "Receiving data..."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:141
-#, c-format
-msgid "Found %i contact"
-msgid_plural "Found %i contacts"
-msgstr[0] ""
-msgstr[1] ""
-
-#: ../gtk-glade/setupwizard.c:25
-msgid ""
-"Welcome !\n"
-"This assistant will help you to use a SIP account for your calls."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:34
-msgid "Create an account by choosing a username"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:35
-msgid "I have already an account and just want to use it"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:53
-msgid "Please choose a username:"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:54
-#, fuzzy
-msgid "Username:"
-msgstr "ユーザーマニュアル"
-
-#: ../gtk-glade/setupwizard.c:92
-#, c-format
-msgid "Checking if '%s' is available..."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
-msgid "Please wait..."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:101
-msgid "Sorry this username already exists. Please try a new one."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
-msgid "Ok !"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
-msgid "Communication problem, please try again later."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:134
-msgid "Thank you. Your account is now configured and ready for use."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:228
-msgid "Welcome to the account setup assistant"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:232
-msgid "Account setup assistant"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:236
-msgid "Choosing a username"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:240
-msgid "Verifying"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:244
-#, fuzzy
-msgid "Confirmation"
-msgstr "情報"
-
-#: ../gtk-glade/setupwizard.c:249
-msgid "Creating your account"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:253
-msgid "Now ready !"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:98
-#, fuzzy
-msgid "<b>Calling...</b>"
-msgstr "接続中"
-
-#: ../gtk-glade/incall_view.c:122
-#, fuzzy
-msgid "<b>In call with</b>"
-msgstr "接続中"
-
-#: ../gtk-glade/incall_view.c:124
-msgid "00::00::00"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:140
-#, c-format
-msgid "%02i::%02i::%02i"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:158
-#, fuzzy
-msgid "<b>Call ended.</b>"
-msgstr "通話は拒否されました。"
-
-#: ../gtk-glade/incall_view.c:176
-msgid "Unmute"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
-msgid "Mute"
-msgstr ""
-
-#: ../gtk-glade/loginframe.c:82
-#, c-format
-msgid "Please enter login information for %s"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:1
-msgid "#"
-msgstr "#"
-
-#: ../gtk-glade/main.glade.h:2
-msgid "*"
-msgstr "*"
-
-#: ../gtk-glade/main.glade.h:3
-msgid "0"
-msgstr "0"
-
-#: ../gtk-glade/main.glade.h:4
-msgid "1"
-msgstr "1"
-
-#: ../gtk-glade/main.glade.h:5
-msgid "2"
-msgstr "2"
-
-#: ../gtk-glade/main.glade.h:6
-msgid "3"
-msgstr "3"
-
-#: ../gtk-glade/main.glade.h:7
-msgid "4"
-msgstr "4"
-
-#: ../gtk-glade/main.glade.h:8
-msgid "5"
-msgstr "5"
-
-#: ../gtk-glade/main.glade.h:9
-msgid "6"
-msgstr "6"
-
-#: ../gtk-glade/main.glade.h:10
-msgid "7"
-msgstr "7"
-
-#: ../gtk-glade/main.glade.h:11
-msgid "8"
-msgstr "8"
-
-#: ../gtk-glade/main.glade.h:12
-msgid "9"
-msgstr "9"
-
-#: ../gtk-glade/main.glade.h:13
-#, fuzzy
-msgid "<b>Contact list</b>"
-msgstr "接続中"
-
-#: ../gtk-glade/main.glade.h:14
-#, fuzzy
-msgid "<b>Terminate call</b>"
-msgstr "接続中"
-
-#: ../gtk-glade/main.glade.h:15
-#, fuzzy
-msgid "<b>Welcome !</b>"
-msgstr "接続中"
-
-#: ../gtk-glade/main.glade.h:16
-msgid "A"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:17
-msgid ""
-"ADSL\n"
-"Fiber Channel"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:19
-msgid ""
-"All users\n"
-"Online users"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:21
-msgid "Assistant"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:22
-#, fuzzy
-msgid "Audio & Video"
-msgstr "オーディオコーデックのプロパティー"
-
-#: ../gtk-glade/main.glade.h:23
-#, fuzzy
-msgid "Audio only"
-msgstr "オーディオ"
-
-#: ../gtk-glade/main.glade.h:24
-msgid "Automatically log me in"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:25
-msgid "B"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
-msgid "C"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:27
-msgid "Check for updates"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:28
-msgid "D"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:29
-msgid "Default"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:30
-msgid "Digits"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:31
-#, fuzzy
-msgid "Duration"
-msgstr "情報"
-
-#: ../gtk-glade/main.glade.h:32
-#, fuzzy
-msgid "Duration:"
-msgstr "情報"
-
-#: ../gtk-glade/main.glade.h:33
-#, fuzzy
-msgid "Enable self-view"
-msgstr "使用する"
-
-#: ../gtk-glade/main.glade.h:34
-msgid "Enter username, phone number, or full sip address"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:35
-msgid "In call"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:36
-msgid "Internet connection:"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:37
-#, fuzzy
-msgid "Login information"
-msgstr "コーデックの情報"
-
-#: ../gtk-glade/main.glade.h:38
-msgid "Lookup:"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:39
-msgid "Main view"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:41
-#, fuzzy
-msgid "My current identity:"
-msgstr "個人情報"
-
-#: ../gtk-glade/main.glade.h:42
-#, fuzzy
-msgid "Password"
-msgstr "パスワード"
-
-#: ../gtk-glade/main.glade.h:43
-#, fuzzy
-msgid "SIP address or phone number:"
-msgstr "レジストラサーバーのSIPアドレス"
-
-#: ../gtk-glade/main.glade.h:44
-msgid "Show current call"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:45
-msgid "Start call"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:46
-msgid "Terminate call"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:47
-#, fuzzy
-msgid "Username"
-msgstr "ユーザーマニュアル"
-
-#: ../gtk-glade/main.glade.h:48
-#, fuzzy
-msgid "_Linphone"
-msgstr "Linphone"
-
-#: ../gtk-glade/main.glade.h:49
-#, fuzzy
-msgid "_Modes"
-msgstr "コーデック"
-
-#: ../gtk-glade/main.glade.h:50
-#, fuzzy
-msgid "gtk-connect"
-msgstr "接続しました。"
-
-#: ../gtk-glade/main.glade.h:51
-msgid "gtk-find"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:52
-msgid "in"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:53
-msgid "label"
-msgstr ""
-
-#: ../gtk-glade/about.glade.h:1
-#, fuzzy
-msgid "About linphone"
-msgstr "Linphone"
-
-#: ../gtk-glade/about.glade.h:2
-msgid "An internet video phone using the standart SIP (rfc3261) protocol."
-msgstr ""
-
-#: ../gtk-glade/about.glade.h:3
-msgid "Created by Simon Morlat\n"
-msgstr ""
-
-#: ../gtk-glade/about.glade.h:5
-msgid ""
-"fr: Simon Morlat\n"
-"en: Simon Morlat and Delphine Perreau\n"
-"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
-"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
-"sv: Daniel Nylander <po@danielnylander.se>\n"
-"es: Jesus Benitez <gnelson at inMail dot sk>\n"
-"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
-"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
-"pl: Robert Nasiadek <darkone@darkone.pl>\n"
-"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
-"hu: anonymous\n"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:1
-#, fuzzy
-msgid "<b>Contact information</b>"
-msgstr "コーデックの情報"
-
-#: ../gtk-glade/contact.glade.h:2
-msgid "Allow this contact to see my presence status"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:4
-#, fuzzy
-msgid "SIP Address"
-msgstr "アドレス"
-
-#: ../gtk-glade/contact.glade.h:5
-msgid "Show this contact presence status"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
-#: ../gtk-glade/sip_account.glade.h:9
-msgid "gtk-cancel"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
-#: ../gtk-glade/sip_account.glade.h:10
-msgid "gtk-ok"
-msgstr ""
-
-#: ../gtk-glade/log.glade.h:1
-msgid "Linphone debug window"
-msgstr ""
-
-#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
-#: ../gtk-glade/chatroom.glade.h:2
-msgid "gtk-close"
-msgstr ""
-
-#: ../gtk-glade/password.glade.h:1
-msgid "Linphone - Authentication required"
-msgstr ""
-
-#: ../gtk-glade/password.glade.h:2
-#, fuzzy
-msgid "Password:"
-msgstr "パスワード"
-
-#: ../gtk-glade/password.glade.h:3
-msgid "Please enter the domain password"
-msgstr ""
-
-#: ../gtk-glade/password.glade.h:4
-msgid "UserID"
-msgstr ""
-
-#: ../gtk-glade/call_logs.glade.h:1
-msgid "Call history"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:1
-msgid "Configure a SIP account"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:2
-msgid "Linphone - Configure a SIP account"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:3
-#, fuzzy
-msgid "Publish presence information"
-msgstr "コーデックの情報"
-
-#: ../gtk-glade/sip_account.glade.h:4
-msgid "Register at startup"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:5
-#, fuzzy
-msgid "Registration duration (sec):"
-msgstr "登録しました。"
-
-#: ../gtk-glade/sip_account.glade.h:6
-msgid "Route (optional):"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:7
-#, fuzzy
-msgid "SIP Proxy address:"
-msgstr "Sipアドレス:"
-
-#: ../gtk-glade/sip_account.glade.h:8
-#, fuzzy
-msgid "Your SIP identity:"
-msgstr "個人情報"
-
-#: ../gtk-glade/sip_account.glade.h:11
-msgid "sip:"
-msgstr "sip:"
-
-#: ../gtk-glade/chatroom.glade.h:1
-#, fuzzy
-msgid "Send"
-msgstr "サウンド"
-
-#: ../gtk-glade/incoming_call.glade.h:1
-msgid "Accept"
-msgstr ""
-
-#: ../gtk-glade/incoming_call.glade.h:2
-#, fuzzy
-msgid "Decline"
-msgstr "ライン入力"
-
-#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
-msgid "Incoming call"
-msgstr ""
-
-#: ../gtk-glade/incoming_call.glade.h:4
-msgid "Incoming call from"
-msgstr ""
-
-#: ../gtk-glade/incoming_call.glade.h:5
-msgid "Linphone - Incoming call"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:1
-msgid "0 stands for \"unlimited\""
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:2
-#, fuzzy
-msgid "<b>Audio</b>"
-msgstr "接続中"
-
-#: ../gtk-glade/parameters.glade.h:3
-msgid "<b>Bandwidth control</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:4
-#, fuzzy
-msgid "<b>Codecs</b>"
-msgstr "接続中"
-
-#: ../gtk-glade/parameters.glade.h:5
-msgid "<b>Default identity</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:6
-msgid "<b>Language</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:7
-msgid "<b>NAT and Firewall</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:8
-#, fuzzy
-msgid "<b>Ports</b>"
-msgstr "接続中"
-
-#: ../gtk-glade/parameters.glade.h:9
-msgid "<b>Privacy</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:10
-#, fuzzy
-msgid "<b>Proxy accounts</b>"
-msgstr "接続中"
-
-#: ../gtk-glade/parameters.glade.h:11
-#, fuzzy
-msgid "<b>Transport</b>"
-msgstr "接続中"
-
-#: ../gtk-glade/parameters.glade.h:12
-msgid "<b>Video</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:13
-msgid "ALSA special device (optional):"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:14
-msgid "Add"
-msgstr "追加する"
-
-#: ../gtk-glade/parameters.glade.h:15
-msgid "Audio RTP/UDP:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:16
-#, fuzzy
-msgid ""
-"Audio codecs\n"
-"Video codecs"
-msgstr "オーディオコーデックのプロパティー"
-
-#: ../gtk-glade/parameters.glade.h:18
-msgid "Behind NAT / Firewall (specify gateway IP below)"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:19
-msgid "Behind NAT / Firewall (use STUN to resolve)"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:21
-msgid "CIF"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:22
-#, fuzzy
-msgid "Capture device:"
-msgstr "使用するサウンドデバイス"
-
-#: ../gtk-glade/parameters.glade.h:23
-#, fuzzy
-msgid "Codecs"
-msgstr "コーデック"
-
-#: ../gtk-glade/parameters.glade.h:24
-msgid "Direct connection to the Internet"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:25
-msgid "Disable"
-msgstr "使用しない"
-
-#: ../gtk-glade/parameters.glade.h:26
-#, fuzzy
-msgid "Done"
-msgstr "ありません。"
-
-#: ../gtk-glade/parameters.glade.h:27
-msgid "Download speed limit in Kbit/sec:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:28
-msgid "Edit"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:29
-msgid "Enable"
-msgstr "使用する"
-
-#: ../gtk-glade/parameters.glade.h:30
-msgid "Enable echo cancellation"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:31
-msgid "Erase all passwords"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:32
-msgid "Manage SIP Accounts"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:33
-msgid "Multimedia settings"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:34
-#, fuzzy
-msgid "Network settings"
-msgstr "ネットワーク"
-
-#: ../gtk-glade/parameters.glade.h:35
-#, fuzzy
-msgid "Playback device:"
-msgstr "使用するサウンドデバイス"
-
-#: ../gtk-glade/parameters.glade.h:36
-msgid "Prefered video resolution:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:37
-#, fuzzy
-msgid "Public IP address:"
-msgstr "Sipアドレス:"
-
-#: ../gtk-glade/parameters.glade.h:38
-msgid ""
-"Register to FONICS\n"
-"virtual network !"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:40
-msgid "Remove"
-msgstr "削除する"
-
-#: ../gtk-glade/parameters.glade.h:41
-#, fuzzy
-msgid "Ring device:"
-msgstr "使用するサウンドデバイス"
-
-#: ../gtk-glade/parameters.glade.h:42
-#, fuzzy
-msgid "Ring sound:"
-msgstr "録音する音源"
-
-#: ../gtk-glade/parameters.glade.h:43
-msgid "SIP (UDP):"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:44
-msgid "Send DTMFs as SIP info"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:45
-msgid "Set Maximum Transmission Unit:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:46
-msgid "Settings"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:47
-#, fuzzy
-msgid "Stun server:"
-msgstr "使用するサウンドデバイス"
-
-#: ../gtk-glade/parameters.glade.h:48
-msgid "This section defines your SIP address when not using a SIP account"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:49
-msgid "Upload speed limit in Kbit/sec:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:50
-msgid "Use IPv6 instead of IPv4"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:51
-#, fuzzy
-msgid "User interface"
-msgstr "ユーザーマニュアル"
-
-#: ../gtk-glade/parameters.glade.h:52
-msgid "Video RTP/UDP:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:53
-#, fuzzy
-msgid "Video input device:"
-msgstr "使用するサウンドデバイス"
-
-#: ../gtk-glade/parameters.glade.h:54
-msgid "Your display name (eg: John Doe):"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:55
-#, fuzzy
-msgid "Your resulting SIP address:"
-msgstr "あなたのSIPアドレス"
-
-#: ../gtk-glade/parameters.glade.h:56
-msgid "Your username:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:57
-msgid "a sound card\n"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:59
-msgid "default camera"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:60
-msgid "default soundcard"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:61
-msgid "default soundcard\n"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:63
-msgid "gtk-go-down"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:64
-msgid "gtk-go-up"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:65
-msgid "gtk-media-play"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:1
-msgid "<b>Search somebody</b>"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:2
-msgid "Add to my list"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:3
-msgid "Search contacts in directory"
-msgstr ""
-
-#: ../gtk-glade/waiting.glade.h:1
-#, fuzzy
-msgid "Linphone"
-msgstr "Linphone"
-
-#: ../gtk-glade/waiting.glade.h:2
-msgid "Please wait"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:195
-#, c-format
-msgid "You have missed %i call."
-msgid_plural "You have missed %i calls."
-msgstr[0] ""
-msgstr[1] ""
-
-#: ../coreapi/linphonecore.c:223
-msgid "aborted"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:226
-msgid "completed"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:229
-msgid "missed"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:234
-#, c-format
-msgid ""
-"%s at %s\n"
-"From: %s\n"
-"To: %s\n"
-"Status: %s\n"
-"Duration: %i mn %i sec\n"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:235
-msgid "Outgoing call"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:445
-msgid ""
-"Your machine appears to be connected to an IPv6 network. By default linphone "
-"always uses IPv4. Please update your configuration if you want to use IPv6"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:739
-#, fuzzy
-msgid "Ready"
-msgstr "準備完了。"
-
-#: ../coreapi/linphonecore.c:1014
-msgid "Remote end seems to have disconnected, the call is going to be closed."
-msgstr ""
-
-#: ../coreapi/linphonecore.c:1172
-msgid "Looking for telephone number destination..."
-msgstr ""
-
-#: ../coreapi/linphonecore.c:1174
-msgid "Could not resolve this number."
-msgstr ""
-
-#: ../coreapi/linphonecore.c:1239
-#, fuzzy
-msgid ""
-"Could not parse given sip address. A sip url usually looks like sip:"
-"user@domain"
-msgstr ""
-"SIPアドレスの形式エラーです。SIPアドレスは、<sip:username@domainname>のような"
-"形式です。"
-
-#: ../coreapi/linphonecore.c:1340
-msgid "Sorry, having multiple simultaneous calls is not supported yet !"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:1387
-#, fuzzy
-msgid "Contacting"
-msgstr "接続中"
-
-#: ../coreapi/linphonecore.c:1402
-msgid "could not call"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
-msgid "Connected."
-msgstr "接続しました。"
-
-#: ../coreapi/linphonecore.c:1813
-#, fuzzy
-msgid "Call ended"
-msgstr "通話は拒否されました。"
-
-#: ../coreapi/linphonecore.c:2175
-msgid "No nat/firewall address supplied !"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
-#, c-format
-msgid "Invalid nat address '%s' : %s"
-msgstr ""
-
-#: ../coreapi/misc.c:134
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the pcm oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-"'modprobe snd-pcm-oss' as root to load it."
-msgstr ""
-"このコンピューターはALSAサウンドドライバーを使用しているようです。\n"
-"それは最良の選択です。しかし、Linphoneが必要とする\n"
-"pcm ossエミュレーションモジュールが見つかりません。\n"
-"ロードするために、ルート権限で'modprobe snd-pcm-oss'を実行してください。"
-
-#: ../coreapi/misc.c:137
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the mixer oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-" 'modprobe snd-mixer-oss' as root to load it."
-msgstr ""
-"このコンピューターはALSAサウンドドライバーを使用しているようです。\n"
-"それは最良の選択です。しかし、Linphoneが必要とする\n"
-"mixer ossエミュレーションモジュールが見つかりません。\n"
-"ロードするために、ルート権限で'modprobe snd-mixer-oss'を実行してください。"
-
-#: ../coreapi/misc.c:610
-msgid "Stun lookup in progress..."
-msgstr ""
-
-#: ../coreapi/exevents.c:127
-#, fuzzy
-msgid "Call terminated."
-msgstr "通話は拒否されました。"
-
-#: ../coreapi/exevents.c:149
-msgid "Could not reach destination."
-msgstr ""
-
-#: ../coreapi/exevents.c:158
-msgid "User is busy."
-msgstr "ユーザーはビジーです"
-
-#: ../coreapi/exevents.c:159
-msgid "User is temporarily unavailable."
-msgstr "ユーザーは、今出られません。"
-
-#: ../coreapi/exevents.c:160
-#, fuzzy
-msgid "Request Cancelled."
-msgstr "通話はキャンセルされました。"
-
-#. char *retrymsg=_("%s. Retry after %i minute(s).");
-#: ../coreapi/exevents.c:162
-msgid "User does not want to be disturbed."
-msgstr "ユーザーは手が離せないようです。"
-
-#: ../coreapi/exevents.c:163
-msgid "Call declined."
-msgstr "通話は拒否されました。"
-
-#: ../coreapi/exevents.c:191
-msgid "Bad request"
-msgstr ""
-
-#: ../coreapi/exevents.c:194
-msgid "User cannot be found at given address."
-msgstr "ユーザーが見つかりません。"
-
-#: ../coreapi/exevents.c:197
-msgid "Remote user cannot support any of proposed codecs."
-msgstr "相手側では、提案したコーデックを一つもサポートしていません。"
-
-#. time out, call leg is lost
-#: ../coreapi/exevents.c:227
-msgid "Timeout."
-msgstr "時間切れです。"
-
-#: ../coreapi/exevents.c:230
-msgid "Remote host was found but refused connection."
-msgstr "リモートホストが見つかりましたが、接続を拒否されました。"
-
-#: ../coreapi/exevents.c:339
-#, fuzzy
-msgid "is contacting you."
-msgstr "から電話です。"
-
-#: ../coreapi/exevents.c:424
-#, c-format
-msgid "Redirected to %s..."
-msgstr ""
-
-#: ../coreapi/exevents.c:440
-msgid ""
-"User is not reachable at the moment but he invites you\n"
-"to contact him using the following alternate resource:"
-msgstr ""
-"ユーザーに接続することができませんが、ユーザーは代わりの手段に招待していま"
-"す。\n"
-"他の手段で連絡をとってください。"
-
-#: ../coreapi/exevents.c:861
-msgid "Early media."
-msgstr ""
-
-#: ../coreapi/exevents.c:972
-#, fuzzy, c-format
-msgid "Registration on %s failed: %s"
-msgstr "登録しました。"
-
-#: ../coreapi/exevents.c:972
-msgid "no response timeout"
-msgstr ""
-
-#: ../coreapi/exevents.c:998
-#, fuzzy, c-format
-msgid "Registration on %s successful."
-msgstr "登録しました。"
-
-#: ../coreapi/exevents.c:999
-#, fuzzy, c-format
-msgid "Unregistration on %s done."
-msgstr "登録しました。"
-
-#. people for which we don't have yet an answer should appear as offline
-#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
-#, fuzzy
-msgid "Gone"
-msgstr "ありません。"
-
-#: ../coreapi/presence.c:129
-msgid "Waiting for Approval"
-msgstr ""
-
-#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
-#, fuzzy
-msgid "Online"
-msgstr "ライン入力"
-
-#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
-msgid "Busy"
-msgstr ""
-
-#: ../coreapi/presence.c:142
-msgid "Be Right Back"
-msgstr ""
-
-#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
-msgid "Away"
-msgstr "退席中"
-
-#: ../coreapi/presence.c:151
-msgid "On The Phone"
-msgstr ""
-
-#: ../coreapi/presence.c:156
-msgid "Out To Lunch"
-msgstr ""
-
-#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
-msgid "Closed"
-msgstr ""
-
-#: ../coreapi/friend.c:35
-msgid "Unknown"
-msgstr ""
-
-#: ../coreapi/friend.c:44
-msgid "Be right back"
-msgstr ""
-
-#: ../coreapi/friend.c:50
-#, fuzzy
-msgid "On the phone"
-msgstr "Linphone"
-
-#: ../coreapi/friend.c:53
-msgid "Out to lunch"
-msgstr ""
-
-#: ../coreapi/friend.c:56
-msgid "Do not disturb"
-msgstr "手が離せません"
-
-#: ../coreapi/friend.c:59
-#, fuzzy
-msgid "Moved"
-msgstr "コーデック"
-
-#: ../coreapi/friend.c:62
-msgid "Using another messaging service"
-msgstr ""
-
-#: ../coreapi/friend.c:65
-#, fuzzy
-msgid "Offline"
-msgstr "ライン入力"
-
-#: ../coreapi/friend.c:68
-msgid "Pending"
-msgstr ""
-
-#: ../coreapi/friend.c:74
-msgid "Unknown-bug"
-msgstr ""
-
-#: ../coreapi/proxy.c:221
-msgid ""
-"The sip proxy address you entered is invalid, it must start with \"sip:\" "
-"followed by a hostname."
-msgstr ""
-
-#: ../coreapi/proxy.c:227
-msgid ""
-"The sip identity you entered is invalid.\n"
-"It should look like sip:username@proxydomain, such as sip:alice@example.net"
-msgstr ""
-
-#: ../coreapi/proxy.c:634
-#, fuzzy, c-format
-msgid "Could not login as %s"
-msgstr "pixmapファイルが見つかりません %s"
-
-#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
-msgid "ITU-G.711 alaw encoder"
-msgstr ""
-
-#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
-msgid "ITU-G.711 alaw decoder"
-msgstr ""
-
-#: ../mediastreamer2/src/alsa.c:923
-msgid "Alsa sound source"
-msgstr ""
-
-#: ../mediastreamer2/src/alsa.c:1027
-msgid "Alsa sound output"
-msgstr ""
-
-#: ../mediastreamer2/src/aqsnd.c:891
-msgid "Sound capture filter for MacOS X Audio Queue Service"
-msgstr ""
-
-#: ../mediastreamer2/src/aqsnd.c:915
-msgid "Sound playback filter for MacOS X Audio Queue Service"
-msgstr ""
-
-#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
-msgid "DTMF generator"
-msgstr ""
-
-#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
-msgid "The GSM full-rate codec"
-msgstr ""
-
-#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
-msgid "The GSM codec"
-msgstr ""
-
-#: ../mediastreamer2/src/macsnd.c:670
-msgid "Sound capture filter for MacOS X Core Audio drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/macsnd.c:684
-msgid "Sound playback filter for MacOS X Core Audio drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
-msgid "A filter to make conferencing"
-msgstr ""
-
-#: ../mediastreamer2/src/msfileplayer.c:295
-#: ../mediastreamer2/src/msfileplayer.c:313
-msgid "Raw files and wav reader"
-msgstr ""
-
-#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
-#: ../mediastreamer2/src/msfilerec_win.c:216
-#: ../mediastreamer2/src/msfilerec_win.c:234
-msgid "Wav file recorder"
-msgstr ""
-
-#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
-msgid "A filter that send several inputs to one output."
-msgstr ""
-
-#: ../mediastreamer2/src/msresample.c:221
-#: ../mediastreamer2/src/msresample.c:239
-msgid "frequency resampler"
-msgstr ""
-
-#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
-msgid "RTP output filter"
-msgstr ""
-
-#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
-msgid "RTP input filter"
-msgstr ""
-
-#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
-#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
-msgid "The free and wonderful speex codec"
-msgstr ""
-
-#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
-msgid "A filter that controls and measure sound volume"
-msgstr ""
-
-#: ../mediastreamer2/src/msv4l.c:1009
-msgid "A video4linux compatible source filter to stream pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/msv4l2.c:458
-msgid "A filter to grab pictures from Video4Linux2-powered cameras"
-msgstr ""
-
-#: ../mediastreamer2/src/nowebcam.c:1780
-msgid "A filter that outputs a static image."
-msgstr ""
-
-#: ../mediastreamer2/src/oss.c:567
-msgid "Sound capture filter for OSS drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/oss.c:581
-msgid "Sound playback filter for OSS drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
-msgid "A pixel format converter"
-msgstr ""
-
-#: ../mediastreamer2/src/sizeconv.c:204
-msgid "A video size converter"
-msgstr ""
-
-#: ../mediastreamer2/src/sizeconv.c:222
-msgid "a small video size converter"
-msgstr ""
-
-#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
-msgid "Echo canceler using speex library"
-msgstr ""
-
-#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
-msgid "A filter that reads from input and copy to its multiple outputs."
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:375
-msgid "The theora video encoder from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:393
-msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
-msgid "The theora video decoder from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
-msgid "ITU-G.711 ulaw encoder"
-msgstr ""
-
-#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
-msgid "ITU-G.711 ulaw decoder"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
-#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
-msgid "A H.263 decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:688
-msgid "A MPEG4 decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:704
-msgid "A RTP/JPEG decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:720
-msgid "A MJPEG decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:736
-msgid "A snow decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
-msgid "A video H.263 encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:856
-msgid ""
-"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
-"spec."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
-msgid "A video MPEG4 encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:888
-msgid "A video snow encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:904
-msgid "A RTP/MJPEG encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:938
-msgid ""
-"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:970
-msgid ""
-"The snow codec is royalty-free and is open-source. \n"
-"It uses innovative techniques that makes it one of most promising video "
-"codec. It is implemented within the ffmpeg project.\n"
-"However it is under development, quite unstable and compatibility with other "
-"versions cannot be guaranteed."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:990
-msgid "A MJPEG encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
-msgid "A generic video display"
-msgstr ""
-
-#: ../mediastreamer2/src/wincevideods.c:966
-#: ../mediastreamer2/src/wincevideods.c:984
-#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
-#: ../mediastreamer2/src/winvideods.c:1306
-#: ../mediastreamer2/src/winvideods.c:1324
-msgid "A video4windows compatible source filter to stream pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
-msgid "A video for windows (vfw.h) based source filter to grab pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
-msgid "ICE filter"
-msgstr ""
-
-#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
-msgid "A filter that trashes its input (useful for terminating some graphs)."
-msgstr ""
-
-#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
-msgid "Parametric sound equalizer."
-msgstr ""
-
-#: ../mediastreamer2/src/msdscap-mingw.cc:1003
-msgid "A webcam grabber based on directshow."
-msgstr ""
-
-#, fuzzy
-#~ msgid "Display filters"
-#~ msgstr "表示される名前"
-
-#, fuzzy
-#~ msgid "_Properties"
-#~ msgstr "RTPのプロパティー"
-
-#, fuzzy
-#~ msgid "gtk-remove"
-#~ msgstr "削除する"
-
-#~ msgid "Sound"
-#~ msgstr "サウンド"
-
-#, fuzzy
-#~ msgid "Default identity"
-#~ msgstr "個人情報"
-
-#~ msgid "Address book"
-#~ msgstr "電話帳"
-
-#, fuzzy
-#~ msgid "Shows the address book"
-#~ msgstr "電話帳"
-
-#, fuzzy
-#~ msgid ""
-#~ "Call or\n"
-#~ "answer"
-#~ msgstr ""
-#~ "電話をかける\n"
-#~ "電話に出る"
-
-#~ msgid "Show more..."
-#~ msgstr "詳細"
-
-#~ msgid "Playback level:"
-#~ msgstr "受話音量"
-
-#~ msgid "Recording level:"
-#~ msgstr "送話音量"
-
-#, fuzzy
-#~ msgid "Ring level:"
-#~ msgstr "送話音量"
-
-#~ msgid "Reachable"
-#~ msgstr "在席中"
-
-#~ msgid "Busy, I'll be back in "
-#~ msgstr "今席をはずしています。"
-
-#~ msgid "The other party will be informed that you'll be back in X minutes"
-#~ msgstr "発信者は、あなたがX分後に戻ってくることが分かります。"
-
-#~ msgid "mn"
-#~ msgstr "分"
-
-#~ msgid "Moved temporarily"
-#~ msgstr "すぐ戻ります"
-
-#~ msgid "Alternative service"
-#~ msgstr "他の連絡手段を使って下さい"
-
-#~ msgid "URL:"
-#~ msgstr "URL:"
-
-#~ msgid "Presence"
-#~ msgstr "状態"
-
-#~ msgid "Press digits to send DTMFs."
-#~ msgstr "DTMFを送信するための数字を押して下さい。"
-
-#~ msgid "DTMF"
-#~ msgstr "DTMF"
-
-#~ msgid ""
-#~ "Linphone is a web-phone.\n"
-#~ "It is compatible with SIP and RTP protocols."
-#~ msgstr ""
-#~ "Linphoneはインターネット電話です。\n"
-#~ "SIP・RTPプロトコルと互換性があります。"
-
-#, fuzzy
-#~ msgid "Use IPv6 network (if available)"
-#~ msgstr "ユーザーは、今出られません。"
-
-#, fuzzy
-#~ msgid "Number of buffered miliseconds (jitter compensation):"
-#~ msgstr ""
-#~ "バッファするミリ秒\n"
-#~ "(音声が途切れるときは大きくします)"
-
-#~ msgid "RTP port used for audio:"
-#~ msgstr "オーディオに使用するRTPポート番号"
-
-#~ msgid "micro"
-#~ msgstr "マイク入力"
-
-#~ msgid "Recording source:"
-#~ msgstr "録音する音源"
-
-#~ msgid "Sound properties"
-#~ msgstr "サウンドのプロパティー"
-
-#~ msgid "Run sip user agent on port:"
-#~ msgstr "SIPユーザーエージェントが起動するポート"
-
-#~ msgid "It is strongly recommended to use port 5060."
-#~ msgstr "5060番ポートを使うことを強く推奨します。"
-
-#~ msgid "SIP port"
-#~ msgstr "SIPのポート"
-
-#~ msgid "@"
-#~ msgstr "@"
-
-#~ msgid "Identity"
-#~ msgstr "個人情報"
-
-#, fuzzy
-#~ msgid "Add proxy/registrar"
-#~ msgstr "SIPレジストラを使う"
-
-#~ msgid "Remote services"
-#~ msgstr "リモートのサービス"
-
-#, fuzzy
-#~ msgid "Authentication information"
-#~ msgstr "コーデックの情報"
-
-#~ msgid "SIP"
-#~ msgstr "SIP"
-
-#~ msgid "List of audio codecs, in order of preference:"
-#~ msgstr "コーデックのリストです。使いたい順に並べてください。"
-
-#, fuzzy
-#~ msgid "Video Codecs"
-#~ msgstr "オーディオコーデックのプロパティー"
-
-#~ msgid ""
-#~ "Note: Codecs in red are not usable regarding to your connection type to "
-#~ "the internet."
-#~ msgstr ""
-#~ "注意:赤い色のコーデックは、現在のネットワーク接続方法では使えません。"
-
-#, fuzzy
-#~ msgid "No information availlable"
-#~ msgstr "特に情報はありません"
-
-#~ msgid "Codec information"
-#~ msgstr "コーデックの情報"
-
-#~ msgid "Address Book"
-#~ msgstr "電話帳"
-
-#~ msgid "Select"
-#~ msgstr "選択する"
-
-#~ msgid ""
-#~ "User is not reachable at the moment but he invites you to contact him "
-#~ "using the following alternate ressource:"
-#~ msgstr ""
-#~ "ユーザーに接続することができませんが、ユーザーは代わりの手段に招待していま"
-#~ "す。他の手段で連絡をとってください。"
-
-#~ msgid "None."
-#~ msgstr "ありません。"
-
-#, fuzzy
-#~ msgid "Name:"
-#~ msgstr "名前"
-
-#, fuzzy
-#~ msgid "None"
-#~ msgstr "ありません。"
-
-#, fuzzy
-#~ msgid "Bad sip address: a sip address looks like sip:user@domain"
-#~ msgstr ""
-#~ "SIPアドレスの形式エラーです。SIPアドレスは、<sip:username@domainname>のよ"
-#~ "うな形式です。"
-
-#~ msgid "Communication ended."
-#~ msgstr "会話は終了しました。"
-
-#~ msgid "Call cancelled."
-#~ msgstr "通話はキャンセルされました。"
-
-#, fuzzy
-#~ msgid "Server address"
-#~ msgstr "サーバーのアドレス"
-
-#~ msgid "28k modem"
-#~ msgstr "28kのモデム"
-
-#~ msgid "56k modem"
-#~ msgstr "56kのモデム"
-
-#~ msgid "64k modem (numeris)"
-#~ msgstr "64Kのモデム(ISDN)"
-
-#~ msgid "ADSL or Cable modem"
-#~ msgstr "ADSL・CATVモデム"
-
-#~ msgid "Ethernet or equivalent"
-#~ msgstr "イーサネットなど"
-
-#~ msgid "Connection type:"
-#~ msgstr "接続のタイプ"
-
-#, fuzzy
-#~ msgid ""
-#~ "Linphone could not open audio device %s. Check if your sound card is "
-#~ "fully configured and working."
-#~ msgstr ""
-#~ "Linphoneはオーディオデバイスをオープンできませんでした。サウンドカードの設"
-#~ "定が完全で、正しく動いているかどうか確認して下さい。"
-
-#~ msgid "Type here the sip address of the person you want to call."
-#~ msgstr "電話をかけたい相手のSIPアドレスを入力して下さい。"
-
-#~ msgid ""
-#~ "Release or\n"
-#~ "Refuse"
-#~ msgstr ""
-#~ "電話を切る\n"
-#~ "会話を拒否"
-
-#~ msgid "%s. Retry after %i minute(s)."
-#~ msgstr "%s。%i 分後にかけ直して下さい。"
-
-#, fuzzy
-#~ msgid "Timeout..."
-#~ msgstr "時間切れです。"
-
-#, fuzzy
-#~ msgid ""
-#~ "Add address\n"
-#~ "book"
-#~ msgstr "電話帳"
-
-#~ msgid "Toggle this if you want to be registered on a remote server."
-#~ msgstr "リモートサーバーに登録するときは、チェックして下さい。"
-
-#~ msgid "Address of record:"
-#~ msgstr "登録するアドレス"
-
-#~ msgid ""
-#~ "The password used for registration. On some servers it is not necessary"
-#~ msgstr "登録にパスワードを用います。必須でないサーバーもあります。"
-
-#~ msgid "Use this registrar server as outbound proxy."
-#~ msgstr "レジストラサーバーをアウトバウンドプロクシとして使用します。"
-
-#~ msgid "sip address:"
-#~ msgstr "SIPアドレス"
-
-#~ msgid "Modify"
-#~ msgstr "修正"
-
-#~ msgid "Registering..."
-#~ msgstr "登録中……"
-
-#, fuzzy
-#~ msgid ""
-#~ "You are currently using the i810_audio driver.\n"
-#~ "This driver is buggy and so does not work with Linphone.\n"
-#~ "We suggest that you replace it by its equivalent ALSA driver,\n"
-#~ "either with packages from your distribution, or by downloading\n"
-#~ "ALSA drivers at http://www.alsa-project.org."
-#~ msgstr ""
-#~ "現在、i810オーディオドライバーを使っています。\n"
-#~ "このドライバーにはバグがあり、Linphoneではうまく動作しません。\n"
-#~ "ALSAドライバーに相当する\n"
-#~ "あなたのディストリビュージョンのパッケージか、\n"
-#~ "ALSAドライバー(http://www.alsa-project.org)への交換を推奨します。"
-
-#~ msgid "Unregistration successfull."
-#~ msgstr "登録を解除しました。"
-
-#~ msgid "Select network interface to use:"
-#~ msgstr "使用するネットワークインターフェースを選んで下さい"
-
-#~ msgid "Network interface properties"
-#~ msgstr "ネットワークインターフェースのプロパティー"
-
-#~ msgid "RTP"
-#~ msgstr "RTP"
-
-#~ msgid "C: 2001"
-#~ msgstr "C: 2001"
-
-#~ msgid "/dev/dsp"
-#~ msgstr "/dev/dsp"
-
-#~ msgid "/dev/dsp1"
-#~ msgstr "/dev/dsp1"
-
-#~ msgid "/dev/dsp2"
-#~ msgstr "/dev/dsp2"
-
-#~ msgid "/dev/dsp3"
-#~ msgstr "/dev/dsp3"
-
-#~ msgid "Set the selected address in linphone'main window."
-#~ msgstr "選択したアドレスがLinphoneのメインウインドウに現れます。"
diff --git a/linphone/po/nl.po b/linphone/po/nl.po
deleted file mode 100644 (file)
index 021dfae..0000000
+++ /dev/null
@@ -1,2071 +0,0 @@
-# translation of nl.po to Nederlands
-# Dutch translation of linphone.
-# Copyright (C) 2005 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the linphone package.
-# Taco Witte <tcwitte@cs.uu.nl>, 2005.
-# Hendrik-Jan Heins <hjh@passys.nl>, 2005.
-# Hendrik-Jan Heins <hjh@passys.nl>, 2007.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: nl\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-10-16 15:24+0200\n"
-"PO-Revision-Date: 2007-09-05 10:40+0200\n"
-"Last-Translator: Hendrik-Jan Heins <hjheins@gmail.com>\n"
-"Language-Team: Nederlands <vertaling@nl.linux.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
-#: ../gtk-glade/support.c:102
-#, c-format
-msgid "Couldn't find pixmap file: %s"
-msgstr "Kon pixmap bestand %s niet vinden"
-
-#: ../gtk-glade/chat.c:27
-#, c-format
-msgid "Chat with %s"
-msgstr "Chat met %s"
-
-#: ../gtk-glade/main.c:90
-msgid "log to stdout some debug information while running."
-msgstr ""
-
-#: ../gtk-glade/main.c:97
-msgid "Start only in the system tray, do not show the main interface."
-msgstr ""
-
-#: ../gtk-glade/main.c:104
-msgid "address to call right now"
-msgstr ""
-
-#: ../gtk-glade/main.c:111
-msgid "if set automatically answer incoming calls"
-msgstr ""
-
-#: ../gtk-glade/main.c:119
-msgid ""
-"Specifiy a working directory (should be the base of the installation, eg: c:"
-"\\Program Files\\Linphone)"
-msgstr ""
-
-#: ../gtk-glade/main.c:675
-#, fuzzy, c-format
-msgid "Incoming call from %s"
-msgstr "Inkomende oproep"
-
-#: ../gtk-glade/main.c:707
-#, c-format
-msgid ""
-"%s would like to add you to his contact list.\n"
-"Would you allow him to see your presence status or add him to your contact "
-"list ?\n"
-"If you answer no, this person will be temporarily blacklisted."
-msgstr ""
-
-#: ../gtk-glade/main.c:777
-#, c-format
-msgid ""
-"Please enter your password for username <i>%s</i>\n"
-" at domain <i>%s</i>:"
-msgstr ""
-
-#: ../gtk-glade/main.c:871
-msgid "Website link"
-msgstr ""
-
-#: ../gtk-glade/main.c:907
-msgid "Linphone - a video internet phone"
-msgstr ""
-
-#: ../gtk-glade/main.c:926
-#, c-format
-msgid "%s (Default)"
-msgstr ""
-
-#: ../gtk-glade/main.c:1168
-msgid "A free SIP video-phone"
-msgstr "Een Vrije SIP video-telefoon"
-
-#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
-#: ../gtk-glade/contact.glade.h:3
-msgid "Name"
-msgstr "Naam"
-
-#: ../gtk-glade/friendlist.c:212
-msgid "Presence status"
-msgstr "Aanwezigheidsstatus"
-
-#: ../gtk-glade/friendlist.c:243
-#, c-format
-msgid "Search in %s directory"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:432
-msgid "Invalid sip contact !"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:474
-#, fuzzy, c-format
-msgid "Call %s"
-msgstr "Oproepgeschiedenis"
-
-#: ../gtk-glade/friendlist.c:475
-#, c-format
-msgid "Send text to %s"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:476
-#, fuzzy, c-format
-msgid "Edit contact '%s'"
-msgstr "Bewerk contactgegevens"
-
-#: ../gtk-glade/friendlist.c:477
-#, c-format
-msgid "Delete contact '%s'"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:519
-#, c-format
-msgid "Add new contact from %s directory"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:251
-msgid "Rate (Hz)"
-msgstr "Frequentie (Hz)"
-
-#: ../gtk-glade/propertybox.c:257
-msgid "Status"
-msgstr "Status"
-
-#: ../gtk-glade/propertybox.c:263
-msgid "Min bitrate (kbit/s)"
-msgstr "Minimale bitrate (kbit/s)"
-
-#: ../gtk-glade/propertybox.c:269
-msgid "Parameters"
-msgstr "Parameters"
-
-#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
-msgid "Enabled"
-msgstr "Aan"
-
-#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
-msgid "Disabled"
-msgstr "Uit"
-
-#: ../gtk-glade/propertybox.c:480
-msgid "Account"
-msgstr "Account"
-
-#: ../gtk-glade/propertybox.c:620
-msgid "English"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:621
-msgid "French"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:622
-msgid "Swedish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:623
-msgid "Italian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:624
-msgid "Spanish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:625
-msgid "Brazilian Portugese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:626
-msgid "Polish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:627
-msgid "German"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:628
-msgid "Russian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:629
-msgid "Japanese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:630
-msgid "Dutch"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:631
-msgid "Hungarian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:632
-msgid "Czech"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:633
-msgid "Chinese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:690
-msgid ""
-"You need to restart linphone for the new language selection to take effect."
-msgstr ""
-
-#: ../gtk-glade/update.c:80
-#, c-format
-msgid ""
-"A more recent version is availalble from %s.\n"
-"Would you like to open a browser to download it ?"
-msgstr ""
-
-#: ../gtk-glade/update.c:91
-msgid "You are running the lastest version."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:66
-msgid "Firstname, Lastname"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:73
-#, fuzzy
-msgid "SIP address"
-msgstr "Adres"
-
-#: ../gtk-glade/buddylookup.c:121
-msgid "Error communicating with server."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:125
-#, fuzzy
-msgid "Connecting..."
-msgstr "Verbinden"
-
-#: ../gtk-glade/buddylookup.c:129
-#, fuzzy
-msgid "Connected"
-msgstr "Verbonden."
-
-#: ../gtk-glade/buddylookup.c:133
-msgid "Receiving data..."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:141
-#, c-format
-msgid "Found %i contact"
-msgid_plural "Found %i contacts"
-msgstr[0] ""
-msgstr[1] ""
-
-#: ../gtk-glade/setupwizard.c:25
-msgid ""
-"Welcome !\n"
-"This assistant will help you to use a SIP account for your calls."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:34
-msgid "Create an account by choosing a username"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:35
-msgid "I have already an account and just want to use it"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:53
-msgid "Please choose a username:"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:54
-#, fuzzy
-msgid "Username:"
-msgstr "gebruikersnaam:"
-
-#: ../gtk-glade/setupwizard.c:92
-#, c-format
-msgid "Checking if '%s' is available..."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
-msgid "Please wait..."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:101
-msgid "Sorry this username already exists. Please try a new one."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
-msgid "Ok !"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
-msgid "Communication problem, please try again later."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:134
-msgid "Thank you. Your account is now configured and ready for use."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:228
-msgid "Welcome to the account setup assistant"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:232
-msgid "Account setup assistant"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:236
-#, fuzzy
-msgid "Choosing a username"
-msgstr "gebruikersnaam:"
-
-#: ../gtk-glade/setupwizard.c:240
-msgid "Verifying"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:244
-#, fuzzy
-msgid "Confirmation"
-msgstr "Informatie"
-
-#: ../gtk-glade/setupwizard.c:249
-msgid "Creating your account"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:253
-msgid "Now ready !"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:98
-#, fuzzy
-msgid "<b>Calling...</b>"
-msgstr "Contactlijst"
-
-#: ../gtk-glade/incall_view.c:122
-#, fuzzy
-msgid "<b>In call with</b>"
-msgstr "Contactlijst"
-
-#: ../gtk-glade/incall_view.c:124
-msgid "00::00::00"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:140
-#, c-format
-msgid "%02i::%02i::%02i"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:158
-#, fuzzy
-msgid "<b>Call ended.</b>"
-msgstr "Oproep beeindigd"
-
-#: ../gtk-glade/incall_view.c:176
-#, fuzzy
-msgid "Unmute"
-msgstr "Ongelimiteerd"
-
-#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
-msgid "Mute"
-msgstr ""
-
-#: ../gtk-glade/loginframe.c:82
-#, c-format
-msgid "Please enter login information for %s"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:1
-msgid "#"
-msgstr "#"
-
-#: ../gtk-glade/main.glade.h:2
-msgid "*"
-msgstr "*"
-
-#: ../gtk-glade/main.glade.h:3
-msgid "0"
-msgstr "0"
-
-#: ../gtk-glade/main.glade.h:4
-msgid "1"
-msgstr "1"
-
-#: ../gtk-glade/main.glade.h:5
-msgid "2"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:6
-msgid "3"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:7
-msgid "4"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:8
-msgid "5"
-msgstr "5"
-
-#: ../gtk-glade/main.glade.h:9
-msgid "6"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:10
-msgid "7"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:11
-msgid "8"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:12
-msgid "9"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:13
-#, fuzzy
-msgid "<b>Contact list</b>"
-msgstr "Contactlijst"
-
-#: ../gtk-glade/main.glade.h:14
-#, fuzzy
-msgid "<b>Terminate call</b>"
-msgstr "Contactlijst"
-
-#: ../gtk-glade/main.glade.h:15
-#, fuzzy
-msgid "<b>Welcome !</b>"
-msgstr "Contactlijst"
-
-#: ../gtk-glade/main.glade.h:16
-msgid "A"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:17
-msgid ""
-"ADSL\n"
-"Fiber Channel"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:19
-msgid ""
-"All users\n"
-"Online users"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:21
-msgid "Assistant"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:22
-#, fuzzy
-msgid "Audio & Video"
-msgstr "Audio codecs"
-
-#: ../gtk-glade/main.glade.h:23
-#, fuzzy
-msgid "Audio only"
-msgstr "Audio codecs"
-
-#: ../gtk-glade/main.glade.h:24
-#, fuzzy
-msgid "Automatically log me in"
-msgstr "Automatisch een geldige hostnaam raden"
-
-#: ../gtk-glade/main.glade.h:25
-msgid "B"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
-msgid "C"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:27
-msgid "Check for updates"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:28
-msgid "D"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:29
-msgid "Default"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:30
-msgid "Digits"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:31
-#, fuzzy
-msgid "Duration"
-msgstr "Informatie"
-
-#: ../gtk-glade/main.glade.h:32
-#, fuzzy
-msgid "Duration:"
-msgstr "Informatie"
-
-#: ../gtk-glade/main.glade.h:33
-#, fuzzy
-msgid "Enable self-view"
-msgstr "Video aan"
-
-#: ../gtk-glade/main.glade.h:34
-msgid "Enter username, phone number, or full sip address"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:35
-#, fuzzy
-msgid "In call"
-msgstr "Inkomende oproep"
-
-#: ../gtk-glade/main.glade.h:36
-msgid "Internet connection:"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:37
-#, fuzzy
-msgid "Login information"
-msgstr "Contact informatie"
-
-#: ../gtk-glade/main.glade.h:38
-msgid "Lookup:"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:39
-msgid "Main view"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:41
-#, fuzzy
-msgid "My current identity:"
-msgstr "SIP-identiteit:"
-
-#: ../gtk-glade/main.glade.h:42
-#, fuzzy
-msgid "Password"
-msgstr "wachtwoord:"
-
-#: ../gtk-glade/main.glade.h:43
-#, fuzzy
-msgid "SIP address or phone number:"
-msgstr "Geef het SIP adres of telefoonnummer in"
-
-#: ../gtk-glade/main.glade.h:44
-#, fuzzy
-msgid "Show current call"
-msgstr "Kon niet oproepen"
-
-#: ../gtk-glade/main.glade.h:45
-msgid "Start call"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:46
-msgid "Terminate call"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:47
-#, fuzzy
-msgid "Username"
-msgstr "gebruikersnaam:"
-
-#: ../gtk-glade/main.glade.h:48
-#, fuzzy
-msgid "_Linphone"
-msgstr "linphone"
-
-#: ../gtk-glade/main.glade.h:49
-#, fuzzy
-msgid "_Modes"
-msgstr "Codecs"
-
-#: ../gtk-glade/main.glade.h:50
-#, fuzzy
-msgid "gtk-connect"
-msgstr "Verbonden."
-
-#: ../gtk-glade/main.glade.h:51
-msgid "gtk-find"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:52
-msgid "in"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:53
-msgid "label"
-msgstr ""
-
-#: ../gtk-glade/about.glade.h:1
-#, fuzzy
-msgid "About linphone"
-msgstr "linphone"
-
-#: ../gtk-glade/about.glade.h:2
-msgid "An internet video phone using the standart SIP (rfc3261) protocol."
-msgstr ""
-
-#: ../gtk-glade/about.glade.h:3
-msgid "Created by Simon Morlat\n"
-msgstr ""
-
-#: ../gtk-glade/about.glade.h:5
-msgid ""
-"fr: Simon Morlat\n"
-"en: Simon Morlat and Delphine Perreau\n"
-"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
-"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
-"sv: Daniel Nylander <po@danielnylander.se>\n"
-"es: Jesus Benitez <gnelson at inMail dot sk>\n"
-"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
-"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
-"pl: Robert Nasiadek <darkone@darkone.pl>\n"
-"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
-"hu: anonymous\n"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:1
-#, fuzzy
-msgid "<b>Contact information</b>"
-msgstr "Contact informatie"
-
-#: ../gtk-glade/contact.glade.h:2
-msgid "Allow this contact to see my presence status"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:4
-#, fuzzy
-msgid "SIP Address"
-msgstr "Adres"
-
-#: ../gtk-glade/contact.glade.h:5
-msgid "Show this contact presence status"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
-#: ../gtk-glade/sip_account.glade.h:9
-msgid "gtk-cancel"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
-#: ../gtk-glade/sip_account.glade.h:10
-msgid "gtk-ok"
-msgstr ""
-
-#: ../gtk-glade/log.glade.h:1
-msgid "Linphone debug window"
-msgstr ""
-
-#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
-#: ../gtk-glade/chatroom.glade.h:2
-msgid "gtk-close"
-msgstr ""
-
-#: ../gtk-glade/password.glade.h:1
-#, fuzzy
-msgid "Linphone - Authentication required"
-msgstr "Authorisatie gevraagd"
-
-#: ../gtk-glade/password.glade.h:2
-#, fuzzy
-msgid "Password:"
-msgstr "wachtwoord:"
-
-#: ../gtk-glade/password.glade.h:3
-msgid "Please enter the domain password"
-msgstr ""
-
-#: ../gtk-glade/password.glade.h:4
-msgid "UserID"
-msgstr ""
-
-#: ../gtk-glade/call_logs.glade.h:1
-#, fuzzy
-msgid "Call history"
-msgstr "Linphone - Oproepgeschiedenis"
-
-#: ../gtk-glade/sip_account.glade.h:1
-msgid "Configure a SIP account"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:2
-msgid "Linphone - Configure a SIP account"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:3
-#, fuzzy
-msgid "Publish presence information"
-msgstr "Toon informatie over aanwezigheid:"
-
-#: ../gtk-glade/sip_account.glade.h:4
-msgid "Register at startup"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:5
-#, fuzzy
-msgid "Registration duration (sec):"
-msgstr "Registratieperiode:"
-
-#: ../gtk-glade/sip_account.glade.h:6
-msgid "Route (optional):"
-msgstr "Route (optioneel):"
-
-#: ../gtk-glade/sip_account.glade.h:7
-#, fuzzy
-msgid "SIP Proxy address:"
-msgstr "SIP-proxy:"
-
-#: ../gtk-glade/sip_account.glade.h:8
-#, fuzzy
-msgid "Your SIP identity:"
-msgstr "SIP-identiteit:"
-
-#: ../gtk-glade/sip_account.glade.h:11
-msgid "sip:"
-msgstr "sip:"
-
-#: ../gtk-glade/chatroom.glade.h:1
-#, fuzzy
-msgid "Send"
-msgstr "Geluid"
-
-#: ../gtk-glade/incoming_call.glade.h:1
-msgid "Accept"
-msgstr "Accepteren"
-
-#: ../gtk-glade/incoming_call.glade.h:2
-#, fuzzy
-msgid "Decline"
-msgstr "lijn"
-
-#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
-msgid "Incoming call"
-msgstr "Inkomende oproep"
-
-#: ../gtk-glade/incoming_call.glade.h:4
-#, fuzzy
-msgid "Incoming call from"
-msgstr "Inkomende oproep"
-
-#: ../gtk-glade/incoming_call.glade.h:5
-#, fuzzy
-msgid "Linphone - Incoming call"
-msgstr "Inkomende oproep"
-
-#: ../gtk-glade/parameters.glade.h:1
-msgid "0 stands for \"unlimited\""
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:2
-#, fuzzy
-msgid "<b>Audio</b>"
-msgstr "Contactlijst"
-
-#: ../gtk-glade/parameters.glade.h:3
-msgid "<b>Bandwidth control</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:4
-#, fuzzy
-msgid "<b>Codecs</b>"
-msgstr "Contactlijst"
-
-#: ../gtk-glade/parameters.glade.h:5
-msgid "<b>Default identity</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:6
-msgid "<b>Language</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:7
-msgid "<b>NAT and Firewall</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:8
-#, fuzzy
-msgid "<b>Ports</b>"
-msgstr "Contactlijst"
-
-#: ../gtk-glade/parameters.glade.h:9
-msgid "<b>Privacy</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:10
-#, fuzzy
-msgid "<b>Proxy accounts</b>"
-msgstr "Contactlijst"
-
-#: ../gtk-glade/parameters.glade.h:11
-#, fuzzy
-msgid "<b>Transport</b>"
-msgstr "Contactlijst"
-
-#: ../gtk-glade/parameters.glade.h:12
-msgid "<b>Video</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:13
-msgid "ALSA special device (optional):"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:14
-#, fuzzy
-msgid "Add"
-msgstr "Adres"
-
-#: ../gtk-glade/parameters.glade.h:15
-msgid "Audio RTP/UDP:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:16
-#, fuzzy
-msgid ""
-"Audio codecs\n"
-"Video codecs"
-msgstr "Audio en video codecs"
-
-#: ../gtk-glade/parameters.glade.h:18
-msgid "Behind NAT / Firewall (specify gateway IP below)"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:19
-msgid "Behind NAT / Firewall (use STUN to resolve)"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:21
-msgid "CIF"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:22
-#, fuzzy
-msgid "Capture device:"
-msgstr "Geluidsapparaat gebruiken:"
-
-#: ../gtk-glade/parameters.glade.h:23
-#, fuzzy
-msgid "Codecs"
-msgstr "Codecs"
-
-#: ../gtk-glade/parameters.glade.h:24
-msgid "Direct connection to the Internet"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:25
-msgid "Disable"
-msgstr "Uit"
-
-#: ../gtk-glade/parameters.glade.h:26
-#, fuzzy
-msgid "Done"
-msgstr "Weg"
-
-#: ../gtk-glade/parameters.glade.h:27
-#, fuzzy
-msgid "Download speed limit in Kbit/sec:"
-msgstr "Download bandbreedte (kbit/sec):"
-
-#: ../gtk-glade/parameters.glade.h:28
-msgid "Edit"
-msgstr "Bewerken"
-
-#: ../gtk-glade/parameters.glade.h:29
-msgid "Enable"
-msgstr "Aan"
-
-#: ../gtk-glade/parameters.glade.h:30
-msgid "Enable echo cancellation"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:31
-msgid "Erase all passwords"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:32
-msgid "Manage SIP Accounts"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:33
-msgid "Multimedia settings"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:34
-#, fuzzy
-msgid "Network settings"
-msgstr "Netwerk"
-
-#: ../gtk-glade/parameters.glade.h:35
-#, fuzzy
-msgid "Playback device:"
-msgstr "Geluidsapparaat gebruiken:"
-
-#: ../gtk-glade/parameters.glade.h:36
-msgid "Prefered video resolution:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:37
-#, fuzzy
-msgid "Public IP address:"
-msgstr "SIP-adres:"
-
-#: ../gtk-glade/parameters.glade.h:38
-msgid ""
-"Register to FONICS\n"
-"virtual network !"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:40
-msgid "Remove"
-msgstr "Verwijderen"
-
-#: ../gtk-glade/parameters.glade.h:41
-#, fuzzy
-msgid "Ring device:"
-msgstr "Geluidsapparaat gebruiken:"
-
-#: ../gtk-glade/parameters.glade.h:42
-#, fuzzy
-msgid "Ring sound:"
-msgstr "Belgeluid:"
-
-#: ../gtk-glade/parameters.glade.h:43
-msgid "SIP (UDP):"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:44
-msgid "Send DTMFs as SIP info"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:45
-msgid "Set Maximum Transmission Unit:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:46
-msgid "Settings"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:47
-#, fuzzy
-msgid "Stun server:"
-msgstr "Geluidsapparaat"
-
-#: ../gtk-glade/parameters.glade.h:48
-msgid "This section defines your SIP address when not using a SIP account"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:49
-#, fuzzy
-msgid "Upload speed limit in Kbit/sec:"
-msgstr "Upload bandbreedte (kbit/sec):"
-
-#: ../gtk-glade/parameters.glade.h:50
-msgid "Use IPv6 instead of IPv4"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:51
-#, fuzzy
-msgid "User interface"
-msgstr "gebruikersnaam:"
-
-#: ../gtk-glade/parameters.glade.h:52
-msgid "Video RTP/UDP:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:53
-#, fuzzy
-msgid "Video input device:"
-msgstr "Geluidsapparaat"
-
-#: ../gtk-glade/parameters.glade.h:54
-msgid "Your display name (eg: John Doe):"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:55
-#, fuzzy
-msgid "Your resulting SIP address:"
-msgstr "Uw SIP-adres:"
-
-#: ../gtk-glade/parameters.glade.h:56
-#, fuzzy
-msgid "Your username:"
-msgstr "gebruikersnaam:"
-
-#: ../gtk-glade/parameters.glade.h:57
-msgid "a sound card\n"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:59
-msgid "default camera"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:60
-msgid "default soundcard"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:61
-msgid "default soundcard\n"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:63
-msgid "gtk-go-down"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:64
-msgid "gtk-go-up"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:65
-msgid "gtk-media-play"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:1
-msgid "<b>Search somebody</b>"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:2
-msgid "Add to my list"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:3
-msgid "Search contacts in directory"
-msgstr ""
-
-#: ../gtk-glade/waiting.glade.h:1
-#, fuzzy
-msgid "Linphone"
-msgstr "linphone"
-
-#: ../gtk-glade/waiting.glade.h:2
-msgid "Please wait"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:195
-#, fuzzy, c-format
-msgid "You have missed %i call."
-msgid_plural "You have missed %i calls."
-msgstr[0] "U heeft %i oproep(en) gemist."
-msgstr[1] "U heeft %i oproep(en) gemist."
-
-#: ../coreapi/linphonecore.c:223
-msgid "aborted"
-msgstr "afgebroken"
-
-#: ../coreapi/linphonecore.c:226
-msgid "completed"
-msgstr "voltooid"
-
-#: ../coreapi/linphonecore.c:229
-msgid "missed"
-msgstr "gemist"
-
-#: ../coreapi/linphonecore.c:234
-#, c-format
-msgid ""
-"%s at %s\n"
-"From: %s\n"
-"To: %s\n"
-"Status: %s\n"
-"Duration: %i mn %i sec\n"
-msgstr ""
-"%s op %s\n"
-"Van: %s\n"
-"Aan: %s\n"
-"Status: %s\n"
-"Tijdsduur: %i mins %i secs\n"
-
-#: ../coreapi/linphonecore.c:235
-msgid "Outgoing call"
-msgstr "Uitgaande oproep"
-
-#: ../coreapi/linphonecore.c:445
-msgid ""
-"Your machine appears to be connected to an IPv6 network. By default linphone "
-"always uses IPv4. Please update your configuration if you want to use IPv6"
-msgstr ""
-"Uw machine lijkt verbonden te zijn met een IPv6 netwerk. Standaard gebruikt "
-"linphone altijd IPv4. Wijzig uw configuratie wanneer u IPv6 wilt gebruiken."
-
-#: ../coreapi/linphonecore.c:739
-msgid "Ready"
-msgstr "Gereed."
-
-#: ../coreapi/linphonecore.c:1014
-msgid "Remote end seems to have disconnected, the call is going to be closed."
-msgstr ""
-
-#: ../coreapi/linphonecore.c:1172
-msgid "Looking for telephone number destination..."
-msgstr "Zoekt de lokatie van het telefoonnummer..."
-
-#: ../coreapi/linphonecore.c:1174
-msgid "Could not resolve this number."
-msgstr "Kon dit nummer niet vinden."
-
-#: ../coreapi/linphonecore.c:1239
-msgid ""
-"Could not parse given sip address. A sip url usually looks like sip:"
-"user@domain"
-msgstr ""
-"Slecht geformuleerd SIP-adres. Een SIP-adres ziet er uit als sip:"
-"gebruikersnaam@domeinnaam"
-
-#: ../coreapi/linphonecore.c:1340
-msgid "Sorry, having multiple simultaneous calls is not supported yet !"
-msgstr "Helaas, meerdere gelijktijdige gesprekken wordt nog niet ondersteund!"
-
-#: ../coreapi/linphonecore.c:1387
-msgid "Contacting"
-msgstr "Verbinden"
-
-#: ../coreapi/linphonecore.c:1402
-msgid "could not call"
-msgstr "Kon niet oproepen"
-
-#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
-msgid "Connected."
-msgstr "Verbonden."
-
-#: ../coreapi/linphonecore.c:1813
-msgid "Call ended"
-msgstr "Oproep beeindigd"
-
-#: ../coreapi/linphonecore.c:2175
-msgid "No nat/firewall address supplied !"
-msgstr "Geen NAT/firewall adres opgegeven"
-
-#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
-#, c-format
-msgid "Invalid nat address '%s' : %s"
-msgstr "Ongeldig NAT adres '%s' : %s"
-
-#: ../coreapi/misc.c:134
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the pcm oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-"'modprobe snd-pcm-oss' as root to load it."
-msgstr ""
-"Uw computer maakt schijnbaar gebruik van ALSA geluidsdrivers.\n"
-"Dit is de beste keuze. Maar de pcm oss emulatie module mist\n"
-"en linphone heeft deze nodig. Geeft u alstublieft het commando\n"
-"'modprobe snd-pcm-oss' als root om de module te laden."
-
-#: ../coreapi/misc.c:137
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the mixer oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-" 'modprobe snd-mixer-oss' as root to load it."
-msgstr ""
-"Uw computer maakt schijnbaar gebruik van ALSA geluidsdrivers.\n"
-"Dit is de beste keuze. Maar de mixer oss emulatie module mist\n"
-"en linphone heeft deze nodig. Geeft u alstublieft het commando\n"
-"'modprobe snd-mixer-oss' als root om de module te laden."
-
-#: ../coreapi/misc.c:610
-msgid "Stun lookup in progress..."
-msgstr "STUN adres wordt opgezocht..."
-
-#: ../coreapi/exevents.c:127
-msgid "Call terminated."
-msgstr "Oproep beeindigd."
-
-#: ../coreapi/exevents.c:149
-msgid "Could not reach destination."
-msgstr "Kon bestemming niet bereiken."
-
-#: ../coreapi/exevents.c:158
-msgid "User is busy."
-msgstr "Gebruiker is bezet."
-
-#: ../coreapi/exevents.c:159
-msgid "User is temporarily unavailable."
-msgstr "Gebruiker is tijdelijk niet beschikbaar."
-
-#: ../coreapi/exevents.c:160
-msgid "Request Cancelled."
-msgstr "Verzoek geannuleerd."
-
-#. char *retrymsg=_("%s. Retry after %i minute(s).");
-#: ../coreapi/exevents.c:162
-msgid "User does not want to be disturbed."
-msgstr "De gebruiker wenst niet gestoord te worden."
-
-#: ../coreapi/exevents.c:163
-msgid "Call declined."
-msgstr "Oproep geweigerd."
-
-#: ../coreapi/exevents.c:191
-msgid "Bad request"
-msgstr "Slecht geformuleerd verzoek"
-
-#: ../coreapi/exevents.c:194
-msgid "User cannot be found at given address."
-msgstr "Gebruiker kan niet worden gevonden bij opgegeven adres."
-
-#: ../coreapi/exevents.c:197
-msgid "Remote user cannot support any of proposed codecs."
-msgstr "De externe gebruiker ondersteunt geen van de voorgestelde codecs."
-
-#. time out, call leg is lost
-#: ../coreapi/exevents.c:227
-msgid "Timeout."
-msgstr "Time-out."
-
-#: ../coreapi/exevents.c:230
-msgid "Remote host was found but refused connection."
-msgstr "Externe machine is gevonden, maar verbinding is geweigerd."
-
-#: ../coreapi/exevents.c:339
-msgid "is contacting you."
-msgstr "belt u."
-
-#: ../coreapi/exevents.c:424
-#, c-format
-msgid "Redirected to %s..."
-msgstr "Doorgeschakeld naar %s..."
-
-#: ../coreapi/exevents.c:440
-msgid ""
-"User is not reachable at the moment but he invites you\n"
-"to contact him using the following alternate resource:"
-msgstr ""
-"De gebruiker is op dit moment niet bereikbaar, maar hij nodigt u uit om\n"
-"op de volgende, alternatieve, manier contact met hem op te nemen:"
-
-#: ../coreapi/exevents.c:861
-msgid "Early media."
-msgstr ""
-
-#: ../coreapi/exevents.c:972
-#, fuzzy, c-format
-msgid "Registration on %s failed: %s"
-msgstr "Registratie op %s mislukt (time-out)."
-
-#: ../coreapi/exevents.c:972
-msgid "no response timeout"
-msgstr ""
-
-#: ../coreapi/exevents.c:998
-#, c-format
-msgid "Registration on %s successful."
-msgstr "Registratie op %s gelukt."
-
-#: ../coreapi/exevents.c:999
-#, fuzzy, c-format
-msgid "Unregistration on %s done."
-msgstr "Registratie op %s gelukt."
-
-#. people for which we don't have yet an answer should appear as offline
-#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
-msgid "Gone"
-msgstr "Weg"
-
-#: ../coreapi/presence.c:129
-msgid "Waiting for Approval"
-msgstr "Wachten op accoord"
-
-#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
-msgid "Online"
-msgstr "Aanwezig"
-
-#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
-msgid "Busy"
-msgstr "Bezet"
-
-#: ../coreapi/presence.c:142
-msgid "Be Right Back"
-msgstr "Kom zo terug"
-
-#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
-msgid "Away"
-msgstr "Afwezig"
-
-#: ../coreapi/presence.c:151
-msgid "On The Phone"
-msgstr "Aan de telefoon"
-
-#: ../coreapi/presence.c:156
-msgid "Out To Lunch"
-msgstr "Aan het lunchen"
-
-#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
-msgid "Closed"
-msgstr "Gesloten"
-
-#: ../coreapi/friend.c:35
-msgid "Unknown"
-msgstr ""
-
-#: ../coreapi/friend.c:44
-#, fuzzy
-msgid "Be right back"
-msgstr "Kom zo terug"
-
-#: ../coreapi/friend.c:50
-#, fuzzy
-msgid "On the phone"
-msgstr "Aan de telefoon"
-
-#: ../coreapi/friend.c:53
-#, fuzzy
-msgid "Out to lunch"
-msgstr "Aan het lunchen"
-
-#: ../coreapi/friend.c:56
-msgid "Do not disturb"
-msgstr "Niet storen"
-
-#: ../coreapi/friend.c:59
-#, fuzzy
-msgid "Moved"
-msgstr "Codecs"
-
-#: ../coreapi/friend.c:62
-msgid "Using another messaging service"
-msgstr ""
-
-#: ../coreapi/friend.c:65
-#, fuzzy
-msgid "Offline"
-msgstr "Aanwezig"
-
-#: ../coreapi/friend.c:68
-msgid "Pending"
-msgstr ""
-
-#: ../coreapi/friend.c:74
-msgid "Unknown-bug"
-msgstr ""
-
-#: ../coreapi/proxy.c:221
-msgid ""
-"The sip proxy address you entered is invalid, it must start with \"sip:\" "
-"followed by a hostname."
-msgstr ""
-
-#: ../coreapi/proxy.c:227
-msgid ""
-"The sip identity you entered is invalid.\n"
-"It should look like sip:username@proxydomain, such as sip:alice@example.net"
-msgstr ""
-
-#: ../coreapi/proxy.c:634
-#, fuzzy, c-format
-msgid "Could not login as %s"
-msgstr "Kon pixmap bestand %s niet vinden"
-
-#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
-msgid "ITU-G.711 alaw encoder"
-msgstr ""
-
-#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
-msgid "ITU-G.711 alaw decoder"
-msgstr ""
-
-#: ../mediastreamer2/src/alsa.c:923
-msgid "Alsa sound source"
-msgstr ""
-
-#: ../mediastreamer2/src/alsa.c:1027
-msgid "Alsa sound output"
-msgstr ""
-
-#: ../mediastreamer2/src/aqsnd.c:891
-msgid "Sound capture filter for MacOS X Audio Queue Service"
-msgstr ""
-
-#: ../mediastreamer2/src/aqsnd.c:915
-msgid "Sound playback filter for MacOS X Audio Queue Service"
-msgstr ""
-
-#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
-msgid "DTMF generator"
-msgstr ""
-
-#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
-msgid "The GSM full-rate codec"
-msgstr ""
-
-#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
-msgid "The GSM codec"
-msgstr ""
-
-#: ../mediastreamer2/src/macsnd.c:670
-msgid "Sound capture filter for MacOS X Core Audio drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/macsnd.c:684
-msgid "Sound playback filter for MacOS X Core Audio drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
-msgid "A filter to make conferencing"
-msgstr ""
-
-#: ../mediastreamer2/src/msfileplayer.c:295
-#: ../mediastreamer2/src/msfileplayer.c:313
-msgid "Raw files and wav reader"
-msgstr ""
-
-#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
-#: ../mediastreamer2/src/msfilerec_win.c:216
-#: ../mediastreamer2/src/msfilerec_win.c:234
-msgid "Wav file recorder"
-msgstr ""
-
-#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
-msgid "A filter that send several inputs to one output."
-msgstr ""
-
-#: ../mediastreamer2/src/msresample.c:221
-#: ../mediastreamer2/src/msresample.c:239
-msgid "frequency resampler"
-msgstr ""
-
-#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
-msgid "RTP output filter"
-msgstr ""
-
-#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
-msgid "RTP input filter"
-msgstr ""
-
-#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
-#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
-msgid "The free and wonderful speex codec"
-msgstr ""
-
-#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
-msgid "A filter that controls and measure sound volume"
-msgstr ""
-
-#: ../mediastreamer2/src/msv4l.c:1009
-msgid "A video4linux compatible source filter to stream pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/msv4l2.c:458
-msgid "A filter to grab pictures from Video4Linux2-powered cameras"
-msgstr ""
-
-#: ../mediastreamer2/src/nowebcam.c:1780
-msgid "A filter that outputs a static image."
-msgstr ""
-
-#: ../mediastreamer2/src/oss.c:567
-msgid "Sound capture filter for OSS drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/oss.c:581
-msgid "Sound playback filter for OSS drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
-msgid "A pixel format converter"
-msgstr ""
-
-#: ../mediastreamer2/src/sizeconv.c:204
-msgid "A video size converter"
-msgstr ""
-
-#: ../mediastreamer2/src/sizeconv.c:222
-msgid "a small video size converter"
-msgstr ""
-
-#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
-msgid "Echo canceler using speex library"
-msgstr ""
-
-#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
-msgid "A filter that reads from input and copy to its multiple outputs."
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:375
-msgid "The theora video encoder from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:393
-msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
-msgid "The theora video decoder from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
-msgid "ITU-G.711 ulaw encoder"
-msgstr ""
-
-#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
-msgid "ITU-G.711 ulaw decoder"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
-#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
-msgid "A H.263 decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:688
-msgid "A MPEG4 decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:704
-msgid "A RTP/JPEG decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:720
-msgid "A MJPEG decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:736
-msgid "A snow decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
-msgid "A video H.263 encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:856
-msgid ""
-"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
-"spec."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
-msgid "A video MPEG4 encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:888
-msgid "A video snow encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:904
-msgid "A RTP/MJPEG encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:938
-msgid ""
-"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:970
-msgid ""
-"The snow codec is royalty-free and is open-source. \n"
-"It uses innovative techniques that makes it one of most promising video "
-"codec. It is implemented within the ffmpeg project.\n"
-"However it is under development, quite unstable and compatibility with other "
-"versions cannot be guaranteed."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:990
-msgid "A MJPEG encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
-msgid "A generic video display"
-msgstr ""
-
-#: ../mediastreamer2/src/wincevideods.c:966
-#: ../mediastreamer2/src/wincevideods.c:984
-#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
-#: ../mediastreamer2/src/winvideods.c:1306
-#: ../mediastreamer2/src/winvideods.c:1324
-msgid "A video4windows compatible source filter to stream pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
-msgid "A video for windows (vfw.h) based source filter to grab pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
-msgid "ICE filter"
-msgstr ""
-
-#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
-msgid "A filter that trashes its input (useful for terminating some graphs)."
-msgstr ""
-
-#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
-msgid "Parametric sound equalizer."
-msgstr ""
-
-#: ../mediastreamer2/src/msdscap-mingw.cc:1003
-msgid "A webcam grabber based on directshow."
-msgstr ""
-
-#, fuzzy
-#~ msgid "_View"
-#~ msgstr "Video"
-
-#, fuzzy
-#~ msgid "_Properties"
-#~ msgstr "RTP-eigenschappen"
-
-#, fuzzy
-#~ msgid "Show logs"
-#~ msgstr "Oproepen weergeven"
-
-#, fuzzy
-#~ msgid "_About"
-#~ msgstr "Account"
-
-#, fuzzy
-#~ msgid "gtk-remove"
-#~ msgstr "Verwijderen"
-
-#, fuzzy
-#~ msgid "Proxy in use"
-#~ msgstr "Te gebruiken proxy:"
-
-#~ msgid "Sound"
-#~ msgstr "Geluid"
-
-#, fuzzy
-#~ msgid "Default identity"
-#~ msgstr "SIP-identiteit:"
-
-#, fuzzy
-#~ msgid "Proxy accounts"
-#~ msgstr "Te gebruiken proxy:"
-
-#~ msgid "Go"
-#~ msgstr "Ga"
-
-#~ msgid "Address book"
-#~ msgstr "Adresboek"
-
-#~ msgid "Exit"
-#~ msgstr "Einde"
-
-#~ msgid "Help"
-#~ msgstr "Help"
-
-#~ msgid "Shows the address book"
-#~ msgstr "Het adresboek weergeven"
-
-#~ msgid "..."
-#~ msgstr "..."
-
-#~ msgid ""
-#~ "Call or\n"
-#~ "answer"
-#~ msgstr ""
-#~ "Oproepen of\n"
-#~ "beantwoorden"
-
-#~ msgid ""
-#~ "Hangup\n"
-#~ "or refuse"
-#~ msgstr ""
-#~ "Ophangen\n"
-#~ "of weigeren"
-
-#~ msgid "Or chat !"
-#~ msgstr "Of chat!"
-
-#~ msgid "Show more..."
-#~ msgstr "Meer weergeven..."
-
-#~ msgid "Playback level:"
-#~ msgstr "Geluidssterkte afspelen:"
-
-#~ msgid "Recording level:"
-#~ msgstr "Geluidssterkte opname:"
-
-#, fuzzy
-#~ msgid "Ring level:"
-#~ msgstr "Geluidssterkte opname:"
-
-#~ msgid "Controls"
-#~ msgstr "Functies"
-
-#~ msgid "Reachable"
-#~ msgstr "Bereikbaar"
-
-#~ msgid "Busy, I'll be back in "
-#~ msgstr "Bezig; ik ben terug over "
-
-#~ msgid "The other party will be informed that you'll be back in X minutes"
-#~ msgstr ""
-#~ "De andere partij zal worden geïnformeerd dat u over X minuten terug bent"
-
-#~ msgid "mn"
-#~ msgstr "min"
-
-#~ msgid "Moved temporarily"
-#~ msgstr "Tijdelijk verplaatst"
-
-#~ msgid "Alternative service"
-#~ msgstr "Alternatieve dienst"
-
-#~ msgid "URL:"
-#~ msgstr "URL:"
-
-#~ msgid "Presence"
-#~ msgstr "Aanwezigheid"
-
-#~ msgid "Press digits to send DTMFs."
-#~ msgstr "Druk op de cijfers om DTMF's te sturen"
-
-#~ msgid ""
-#~ "  3\n"
-#~ "def"
-#~ msgstr ""
-#~ "  3\n"
-#~ "def"
-
-#~ msgid ""
-#~ "  2\n"
-#~ "abc"
-#~ msgstr ""
-#~ "  2\n"
-#~ "abc"
-
-#~ msgid ""
-#~ "  4\n"
-#~ "ghi"
-#~ msgstr ""
-#~ "  4\n"
-#~ "ghi"
-
-#~ msgid ""
-#~ " 5\n"
-#~ "jkl"
-#~ msgstr ""
-#~ " 5\n"
-#~ "jkl"
-
-#~ msgid ""
-#~ "  6\n"
-#~ "mno"
-#~ msgstr ""
-#~ "  6\n"
-#~ "mno"
-
-#~ msgid ""
-#~ "   7\n"
-#~ "pqrs"
-#~ msgstr ""
-#~ "   7\n"
-#~ "pqrs"
-
-#~ msgid ""
-#~ "  8\n"
-#~ "tuv"
-#~ msgstr ""
-#~ "  8\n"
-#~ "tuv"
-
-#~ msgid ""
-#~ "   9\n"
-#~ "wxyz"
-#~ msgstr ""
-#~ "   9\n"
-#~ "wxyz"
-
-#~ msgid "DTMF"
-#~ msgstr "DTMF"
-
-#~ msgid "My online friends"
-#~ msgstr "Mijn online vrienden"
-
-#~ msgid ""
-#~ "C: 2001\n"
-#~ "Made in Old Europe"
-#~ msgstr ""
-#~ "C: 2001\n"
-#~ "Gemaakt in antiek Europa"
-
-#~ msgid ""
-#~ "Linphone is a web-phone.\n"
-#~ "It is compatible with SIP and RTP protocols."
-#~ msgstr ""
-#~ "Linphone is een webtelefoon.\n"
-#~ "Het werkt met de SIP- en RTP-protocollen."
-
-#~ msgid "http://www.linphone.org"
-#~ msgstr "http://www.linphone.org"
-
-#~ msgid "Use IPv6 network (if available)"
-#~ msgstr "Gebruik IPv6 netwerk (wanneer het beschikbaar is)"
-
-#~ msgid ""
-#~ "Toggle this if you are on an ipv6 network and you wish linphone to use it."
-#~ msgstr ""
-#~ "Wijzig dit wanneer u op een IPv6 netwerk zit en linphone daarop wilt "
-#~ "gebruiken."
-
-#~ msgid "Global"
-#~ msgstr "Globaal"
-
-#~ msgid ""
-#~ "These options is only for users in a private network, behind a gateway. "
-#~ "If you are not in this situation, then leave this empty."
-#~ msgstr ""
-#~ "Deze optie is alleen voor gebruikers in een lokaal netwerk, achter een "
-#~ "gateway: Wanneer u niet in deze situatie zit, laat dit dan leeg."
-
-#~ msgid "No firewall"
-#~ msgstr "Geen firewall"
-
-#~ msgid "Use this STUN server to guess firewall address :"
-#~ msgstr "Gebruik deze STUN server om het firewall adres te achterhalen"
-
-#~ msgid "Specify firewall address manually:"
-#~ msgstr "Geef het firewall adres handmatig op"
-
-#~ msgid "NAT traversal options (experimental)"
-#~ msgstr "NAT-doorstuur opties (experimenteel)"
-
-#~ msgid "Number of buffered miliseconds (jitter compensation):"
-#~ msgstr "Aantal gebufferde miliseconden (jitter compensatie):"
-
-#~ msgid "RTP port used for audio:"
-#~ msgstr "RTP-poort voor geluid:"
-
-#~ msgid "Use SIP INFO message instead of RTP rfc2833 for DTMF transmitting"
-#~ msgstr ""
-#~ "Gebruik SIP INFO bericht in plaats van RTP rfc2833 voor DTMF berichten"
-
-#~ msgid "RTP-RFC2833 is the recommended way."
-#~ msgstr "RTP-RFC2833 is de aanbevolen manier."
-
-#~ msgid "Other"
-#~ msgstr "Overige"
-
-#~ msgid "micro"
-#~ msgstr "microfoon"
-
-#~ msgid "Recording source:"
-#~ msgstr "Bron voor opname:"
-
-#~ msgid "Enable echo-canceler (cancels the echo heard by the remote party)"
-#~ msgstr ""
-#~ "Activeer de echo-onderdrukking (onderdrukt de echo die de andere partij "
-#~ "hoort)"
-
-#~ msgid "Choose file"
-#~ msgstr "Kies bestand"
-
-#~ msgid "Listen"
-#~ msgstr "Luisteren"
-
-#~ msgid "Sound properties"
-#~ msgstr "Geluidseigenschappen"
-
-#~ msgid "Run sip user agent on port:"
-#~ msgstr "Start SIP gebruikerssysteem op poort:"
-
-#~ msgid "It is strongly recommended to use port 5060."
-#~ msgstr "Het wordt sterk aangeraden om poort 5060 te gebruiken."
-
-#~ msgid "SIP port"
-#~ msgstr "SIP-poort"
-
-#~ msgid "@"
-#~ msgstr "@"
-
-#~ msgid "Identity"
-#~ msgstr "Identiteit"
-
-#~ msgid "Add proxy/registrar"
-#~ msgstr "Voeg proxy/registratieserver toe"
-
-#~ msgid "Remote services"
-#~ msgstr "Externe diensten"
-
-#~ msgid "Clear all stored authentication information (username,password...)"
-#~ msgstr ""
-#~ "Schoon alle opgeslagen authorisatie gegevens op (gebruikersnaam, "
-#~ "wachtwoord...)"
-
-#~ msgid "Authentication information"
-#~ msgstr "Authorisatie gegevens"
-
-#~ msgid "SIP"
-#~ msgstr "SIP"
-
-#~ msgid "List of audio codecs, in order of preference:"
-#~ msgstr "Lijst met audio codecs, in volgorde van voorkeur:"
-
-#~ msgid "Video Codecs"
-#~ msgstr "Video codecs"
-
-#~ msgid ""
-#~ "Note: Codecs in red are not usable regarding to your connection type to "
-#~ "the internet."
-#~ msgstr ""
-#~ "Opmerking: Met rood weergegeven codecs zijn niet bruikbaar vanwege het "
-#~ "soort internetverbinding dat u heeft"
-
-#, fuzzy
-#~ msgid "No information availlable"
-#~ msgstr "Geen informatie beschikbaar"
-
-#~ msgid "Codec information"
-#~ msgstr "Codec informatie"
-
-#~ msgid "Address Book"
-#~ msgstr "Adresboek"
-
-#~ msgid "Select"
-#~ msgstr "Kiezen"
-
-#~ msgid ""
-#~ "User is not reachable at the moment but he invites you to contact him "
-#~ "using the following alternate ressource:"
-#~ msgstr ""
-#~ "De gebruiker is op dit moment niet bereikbaar, maar hij nodigt u uit op "
-#~ "de volgende, alternatieve, manier contact met hem op te nemen:"
-
-#~ msgid "None."
-#~ msgstr "Geen."
-
-#~ msgid "Proxy/Registrar configuration box"
-#~ msgstr "Proxy/registratieserver registratieveld"
-
-#~ msgid "Send registration:"
-#~ msgstr "Verstruur registratie:"
-
-#~ msgid "Name:"
-#~ msgstr "Naam:"
-
-#~ msgid "Subscribe policy:"
-#~ msgstr "Aanmeldbeleid:"
-
-#~ msgid "Send subscription (see person's online status)"
-#~ msgstr "Verstruur aanmelding (bekijk de online status van een persoon)"
-
-#~ msgid "New incoming subscription"
-#~ msgstr "Nieuwe inkomende aanmelding"
-
-#~ msgid "You have received a new subscription..."
-#~ msgstr "U heeft een nieuwe aanmelding ontvangen..."
-
-#~ msgid "Refuse"
-#~ msgstr "Weigeren"
-
-#~ msgid "Authentication required for realm"
-#~ msgstr "Authorisatie benodigd voor gebied"
-
-#~ msgid "userid:"
-#~ msgstr "gebruikersID:"
-
-#~ msgid "realm:"
-#~ msgstr "gebied:"
-
-#~ msgid "Chat Room"
-#~ msgstr "Chat box"
-
-#~ msgid "Text:"
-#~ msgstr "Tekst:"
-
-#~ msgid "The caller asks for resource reservation. Do you agree ?"
-#~ msgstr "De beller vraagt om reservering van bronnen. Gaat u accoord?"
-
-#~ msgid ""
-#~ "The caller doesn't use resource reservation. \t\t\t\t\tDo you wish to "
-#~ "continue anyway ?"
-#~ msgstr ""
-#~ "De beller gebruikt geen bron reservatie. \t\t\t\t\tWilt u toch doorgaan?"
-
-#~ msgid "linphone - receiving call from %s"
-#~ msgstr "Linphone - binnenkomend gesprek van %s"
-
-#~ msgid ""
-#~ "You have received a subscription from %s.This means that this person "
-#~ "wishes to be notified of your presence information (online, busy, "
-#~ "away...).\n"
-#~ "Do you agree ?"
-#~ msgstr ""
-#~ "U heeft een aanmelding ontvangen van %s. Dit betekent dat deze persoon "
-#~ "een melding wil ontvangen wat betreft uw status (online, bezig, weg...).\n"
-#~ "Gaat u accoord?"
-
-#~ msgid "Authentication required for realm %s"
-#~ msgstr "Authorisatie benodigd voor gebied %s"
-
-#~ msgid "None"
-#~ msgstr "Geen"
-
-#~ msgid "Wait"
-#~ msgstr "Wachten"
-
-#~ msgid "Deny"
-#~ msgstr "Weigeren"
-
-#~ msgid "Bad sip address: a sip address looks like sip:user@domain"
-#~ msgstr ""
-#~ "Slecht geformuleerd SIP-adres. Een SIP-adres ziet er uit als sip:"
-#~ "gebruikersnaam@domeinnaam"
-
-#~ msgid "Stun lookup done..."
-#~ msgstr "STUN adres gevonden..."
-
-#~ msgid "User manual"
-#~ msgstr "Handleiding"
-
-#~ msgid "Ring sound selection"
-#~ msgstr "Belgeluid keuze"
-
-#~ msgid "Communication ended."
-#~ msgstr "Communicatie beëindigd."
-
-#~ msgid "Call cancelled."
-#~ msgstr "Oproep geannuleerd."
-
-#~ msgid "Firewall 's external ip address (in dot notations):"
-#~ msgstr "Extern IP adres van de firewall (in  x.x.x.x notatie):"
-
-#~ msgid "Index"
-#~ msgstr "Index"
-
-#~ msgid "Server address"
-#~ msgstr "Serveradres"
-
-#~ msgid "28k modem"
-#~ msgstr "28k modem"
-
-#~ msgid "56k modem"
-#~ msgstr "56k modem"
-
-#~ msgid "64k modem (numeris)"
-#~ msgstr "64k modem (ISDN)"
-
-#~ msgid "ADSL or Cable modem"
-#~ msgstr "ADSL- of kabelmodem"
-
-#~ msgid "Ethernet or equivalent"
-#~ msgstr "Ethernet of vergelijkbaar"
-
-#~ msgid "Connection type:"
-#~ msgstr "Soort verbinding:"
-
-#~ msgid ""
-#~ "Linphone could not open audio device %s. Check if your sound card is "
-#~ "fully configured and working."
-#~ msgstr ""
-#~ "Linphone kon het geluidsapparaat %s niet openen. Controleer of uw "
-#~ "geluidskaart goed is ingesteld en werkt."
-
-#~ msgid "Type here the sip address of the person you want to call."
-#~ msgstr "Geef hier het SIP-adres op van de persoon die u wilt bellen."
-
-#~ msgid ""
-#~ "Release or\n"
-#~ "Refuse"
-#~ msgstr ""
-#~ "Ophangen\n"
-#~ "of weigeren"
-
-#~ msgid "%s. Retry after %i minute(s)."
-#~ msgstr "%s. Opnieuw proberen na %i minu(u)t(en)."
diff --git a/linphone/po/pl.po b/linphone/po/pl.po
deleted file mode 100644 (file)
index 11dfd8c..0000000
+++ /dev/null
@@ -1,1881 +0,0 @@
-# SIP Telephony Application.
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-# Simon Morlat <linphone@free.fr>, 2001.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: linphone 0.7.1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-10-16 15:24+0200\n"
-"PO-Revision-Date: 2003-08-22 12:50+0200\n"
-"Last-Translator: Robert Nasiadek <darkone@darkone.pl>\n"
-"Language-Team: Polski <pl@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8-bit\n"
-
-#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
-#: ../gtk-glade/support.c:102
-#, c-format
-msgid "Couldn't find pixmap file: %s"
-msgstr "Nie można znaleźć pixmapy: %s"
-
-#: ../gtk-glade/chat.c:27
-#, c-format
-msgid "Chat with %s"
-msgstr ""
-
-#: ../gtk-glade/main.c:90
-msgid "log to stdout some debug information while running."
-msgstr ""
-
-#: ../gtk-glade/main.c:97
-msgid "Start only in the system tray, do not show the main interface."
-msgstr ""
-
-#: ../gtk-glade/main.c:104
-msgid "address to call right now"
-msgstr ""
-
-#: ../gtk-glade/main.c:111
-msgid "if set automatically answer incoming calls"
-msgstr ""
-
-#: ../gtk-glade/main.c:119
-msgid ""
-"Specifiy a working directory (should be the base of the installation, eg: c:"
-"\\Program Files\\Linphone)"
-msgstr ""
-
-#: ../gtk-glade/main.c:675
-#, c-format
-msgid "Incoming call from %s"
-msgstr ""
-
-#: ../gtk-glade/main.c:707
-#, c-format
-msgid ""
-"%s would like to add you to his contact list.\n"
-"Would you allow him to see your presence status or add him to your contact "
-"list ?\n"
-"If you answer no, this person will be temporarily blacklisted."
-msgstr ""
-
-#: ../gtk-glade/main.c:777
-#, c-format
-msgid ""
-"Please enter your password for username <i>%s</i>\n"
-" at domain <i>%s</i>:"
-msgstr ""
-
-#: ../gtk-glade/main.c:871
-msgid "Website link"
-msgstr ""
-
-#: ../gtk-glade/main.c:907
-msgid "Linphone - a video internet phone"
-msgstr ""
-
-#: ../gtk-glade/main.c:926
-#, c-format
-msgid "%s (Default)"
-msgstr ""
-
-#: ../gtk-glade/main.c:1168
-msgid "A free SIP video-phone"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
-#: ../gtk-glade/contact.glade.h:3
-msgid "Name"
-msgstr "Nazwa"
-
-#: ../gtk-glade/friendlist.c:212
-#, fuzzy
-msgid "Presence status"
-msgstr "Obecność"
-
-#: ../gtk-glade/friendlist.c:243
-#, c-format
-msgid "Search in %s directory"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:432
-msgid "Invalid sip contact !"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:474
-#, c-format
-msgid "Call %s"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:475
-#, c-format
-msgid "Send text to %s"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:476
-#, fuzzy, c-format
-msgid "Edit contact '%s'"
-msgstr "(Brak informacji kontaktowych !)"
-
-#: ../gtk-glade/friendlist.c:477
-#, c-format
-msgid "Delete contact '%s'"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:519
-#, c-format
-msgid "Add new contact from %s directory"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:251
-msgid "Rate (Hz)"
-msgstr "Jakość (Hz)"
-
-#: ../gtk-glade/propertybox.c:257
-msgid "Status"
-msgstr "Status"
-
-#: ../gtk-glade/propertybox.c:263
-msgid "Min bitrate (kbit/s)"
-msgstr "Min przepustowość (kbit/s)"
-
-#: ../gtk-glade/propertybox.c:269
-msgid "Parameters"
-msgstr "Parametr"
-
-#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
-msgid "Enabled"
-msgstr "Włączone"
-
-#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
-msgid "Disabled"
-msgstr "Wyłączone"
-
-#: ../gtk-glade/propertybox.c:480
-msgid "Account"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:620
-msgid "English"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:621
-msgid "French"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:622
-msgid "Swedish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:623
-msgid "Italian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:624
-msgid "Spanish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:625
-msgid "Brazilian Portugese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:626
-msgid "Polish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:627
-msgid "German"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:628
-msgid "Russian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:629
-msgid "Japanese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:630
-msgid "Dutch"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:631
-msgid "Hungarian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:632
-msgid "Czech"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:633
-msgid "Chinese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:690
-msgid ""
-"You need to restart linphone for the new language selection to take effect."
-msgstr ""
-
-#: ../gtk-glade/update.c:80
-#, c-format
-msgid ""
-"A more recent version is availalble from %s.\n"
-"Would you like to open a browser to download it ?"
-msgstr ""
-
-#: ../gtk-glade/update.c:91
-msgid "You are running the lastest version."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:66
-msgid "Firstname, Lastname"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:73
-#, fuzzy
-msgid "SIP address"
-msgstr "Adres"
-
-#: ../gtk-glade/buddylookup.c:121
-msgid "Error communicating with server."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:125
-#, fuzzy
-msgid "Connecting..."
-msgstr "Lącze"
-
-#: ../gtk-glade/buddylookup.c:129
-#, fuzzy
-msgid "Connected"
-msgstr "Połączony"
-
-#: ../gtk-glade/buddylookup.c:133
-msgid "Receiving data..."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:141
-#, c-format
-msgid "Found %i contact"
-msgid_plural "Found %i contacts"
-msgstr[0] ""
-msgstr[1] ""
-
-#: ../gtk-glade/setupwizard.c:25
-msgid ""
-"Welcome !\n"
-"This assistant will help you to use a SIP account for your calls."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:34
-msgid "Create an account by choosing a username"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:35
-msgid "I have already an account and just want to use it"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:53
-msgid "Please choose a username:"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:54
-#, fuzzy
-msgid "Username:"
-msgstr "Podręcznik"
-
-#: ../gtk-glade/setupwizard.c:92
-#, c-format
-msgid "Checking if '%s' is available..."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
-msgid "Please wait..."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:101
-msgid "Sorry this username already exists. Please try a new one."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
-msgid "Ok !"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
-msgid "Communication problem, please try again later."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:134
-msgid "Thank you. Your account is now configured and ready for use."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:228
-msgid "Welcome to the account setup assistant"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:232
-msgid "Account setup assistant"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:236
-msgid "Choosing a username"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:240
-msgid "Verifying"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:244
-#, fuzzy
-msgid "Confirmation"
-msgstr "Informacja"
-
-#: ../gtk-glade/setupwizard.c:249
-msgid "Creating your account"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:253
-msgid "Now ready !"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:98
-#, fuzzy
-msgid "<b>Calling...</b>"
-msgstr "Dzwonie do "
-
-#: ../gtk-glade/incall_view.c:122
-#, fuzzy
-msgid "<b>In call with</b>"
-msgstr "Dzwonie do "
-
-#: ../gtk-glade/incall_view.c:124
-msgid "00::00::00"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:140
-#, c-format
-msgid "%02i::%02i::%02i"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:158
-#, fuzzy
-msgid "<b>Call ended.</b>"
-msgstr "Rozmowa odrzucona."
-
-#: ../gtk-glade/incall_view.c:176
-msgid "Unmute"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
-msgid "Mute"
-msgstr ""
-
-#: ../gtk-glade/loginframe.c:82
-#, c-format
-msgid "Please enter login information for %s"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:1
-msgid "#"
-msgstr "#"
-
-#: ../gtk-glade/main.glade.h:2
-msgid "*"
-msgstr "*"
-
-#: ../gtk-glade/main.glade.h:3
-msgid "0"
-msgstr "0"
-
-#: ../gtk-glade/main.glade.h:4
-msgid "1"
-msgstr "1"
-
-#: ../gtk-glade/main.glade.h:5
-msgid "2"
-msgstr "2"
-
-#: ../gtk-glade/main.glade.h:6
-msgid "3"
-msgstr "3"
-
-#: ../gtk-glade/main.glade.h:7
-msgid "4"
-msgstr "4"
-
-#: ../gtk-glade/main.glade.h:8
-msgid "5"
-msgstr "5"
-
-#: ../gtk-glade/main.glade.h:9
-msgid "6"
-msgstr "6"
-
-#: ../gtk-glade/main.glade.h:10
-msgid "7"
-msgstr "7"
-
-#: ../gtk-glade/main.glade.h:11
-msgid "8"
-msgstr "8"
-
-#: ../gtk-glade/main.glade.h:12
-msgid "9"
-msgstr "9"
-
-#: ../gtk-glade/main.glade.h:13
-#, fuzzy
-msgid "<b>Contact list</b>"
-msgstr "Dzwonie do "
-
-#: ../gtk-glade/main.glade.h:14
-#, fuzzy
-msgid "<b>Terminate call</b>"
-msgstr "Dzwonie do "
-
-#: ../gtk-glade/main.glade.h:15
-#, fuzzy
-msgid "<b>Welcome !</b>"
-msgstr "Dzwonie do "
-
-#: ../gtk-glade/main.glade.h:16
-msgid "A"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:17
-msgid ""
-"ADSL\n"
-"Fiber Channel"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:19
-msgid ""
-"All users\n"
-"Online users"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:21
-msgid "Assistant"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:22
-#, fuzzy
-msgid "Audio & Video"
-msgstr "Kodeki audio"
-
-#: ../gtk-glade/main.glade.h:23
-#, fuzzy
-msgid "Audio only"
-msgstr "Kodeki audio"
-
-#: ../gtk-glade/main.glade.h:24
-msgid "Automatically log me in"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:25
-msgid "B"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
-msgid "C"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:27
-msgid "Check for updates"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:28
-msgid "D"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:29
-msgid "Default"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:30
-msgid "Digits"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:31
-#, fuzzy
-msgid "Duration"
-msgstr "Informacja"
-
-#: ../gtk-glade/main.glade.h:32
-#, fuzzy
-msgid "Duration:"
-msgstr "Informacja"
-
-#: ../gtk-glade/main.glade.h:33
-#, fuzzy
-msgid "Enable self-view"
-msgstr "Włączone"
-
-#: ../gtk-glade/main.glade.h:34
-msgid "Enter username, phone number, or full sip address"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:35
-msgid "In call"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:36
-msgid "Internet connection:"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:37
-#, fuzzy
-msgid "Login information"
-msgstr "Informacje o kodeku"
-
-#: ../gtk-glade/main.glade.h:38
-msgid "Lookup:"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:39
-msgid "Main view"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:41
-#, fuzzy
-msgid "My current identity:"
-msgstr "Tożsamość"
-
-#: ../gtk-glade/main.glade.h:42
-#, fuzzy
-msgid "Password"
-msgstr "Twoje hasło:"
-
-#: ../gtk-glade/main.glade.h:43
-#, fuzzy
-msgid "SIP address or phone number:"
-msgstr "Adres serwera rejestracji sip"
-
-#: ../gtk-glade/main.glade.h:44
-msgid "Show current call"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:45
-msgid "Start call"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:46
-msgid "Terminate call"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:47
-#, fuzzy
-msgid "Username"
-msgstr "Podręcznik"
-
-#: ../gtk-glade/main.glade.h:48
-#, fuzzy
-msgid "_Linphone"
-msgstr "linphone"
-
-#: ../gtk-glade/main.glade.h:49
-#, fuzzy
-msgid "_Modes"
-msgstr "Kodeki"
-
-#: ../gtk-glade/main.glade.h:50
-#, fuzzy
-msgid "gtk-connect"
-msgstr "Połączony"
-
-#: ../gtk-glade/main.glade.h:51
-msgid "gtk-find"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:52
-msgid "in"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:53
-msgid "label"
-msgstr ""
-
-#: ../gtk-glade/about.glade.h:1
-#, fuzzy
-msgid "About linphone"
-msgstr "linphone"
-
-#: ../gtk-glade/about.glade.h:2
-msgid "An internet video phone using the standart SIP (rfc3261) protocol."
-msgstr ""
-
-#: ../gtk-glade/about.glade.h:3
-msgid "Created by Simon Morlat\n"
-msgstr ""
-
-#: ../gtk-glade/about.glade.h:5
-msgid ""
-"fr: Simon Morlat\n"
-"en: Simon Morlat and Delphine Perreau\n"
-"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
-"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
-"sv: Daniel Nylander <po@danielnylander.se>\n"
-"es: Jesus Benitez <gnelson at inMail dot sk>\n"
-"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
-"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
-"pl: Robert Nasiadek <darkone@darkone.pl>\n"
-"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
-"hu: anonymous\n"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:1
-#, fuzzy
-msgid "<b>Contact information</b>"
-msgstr "Informacje o kodeku"
-
-#: ../gtk-glade/contact.glade.h:2
-msgid "Allow this contact to see my presence status"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:4
-#, fuzzy
-msgid "SIP Address"
-msgstr "Adres"
-
-#: ../gtk-glade/contact.glade.h:5
-msgid "Show this contact presence status"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
-#: ../gtk-glade/sip_account.glade.h:9
-msgid "gtk-cancel"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
-#: ../gtk-glade/sip_account.glade.h:10
-msgid "gtk-ok"
-msgstr ""
-
-#: ../gtk-glade/log.glade.h:1
-msgid "Linphone debug window"
-msgstr ""
-
-#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
-#: ../gtk-glade/chatroom.glade.h:2
-msgid "gtk-close"
-msgstr ""
-
-#: ../gtk-glade/password.glade.h:1
-msgid "Linphone - Authentication required"
-msgstr ""
-
-#: ../gtk-glade/password.glade.h:2
-#, fuzzy
-msgid "Password:"
-msgstr "Twoje hasło:"
-
-#: ../gtk-glade/password.glade.h:3
-msgid "Please enter the domain password"
-msgstr ""
-
-#: ../gtk-glade/password.glade.h:4
-msgid "UserID"
-msgstr ""
-
-#: ../gtk-glade/call_logs.glade.h:1
-msgid "Call history"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:1
-msgid "Configure a SIP account"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:2
-msgid "Linphone - Configure a SIP account"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:3
-#, fuzzy
-msgid "Publish presence information"
-msgstr "Informacje o kodeku"
-
-#: ../gtk-glade/sip_account.glade.h:4
-msgid "Register at startup"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:5
-#, fuzzy
-msgid "Registration duration (sec):"
-msgstr "Rejestracja powiodła się."
-
-#: ../gtk-glade/sip_account.glade.h:6
-msgid "Route (optional):"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:7
-#, fuzzy
-msgid "SIP Proxy address:"
-msgstr "Adres sip:"
-
-#: ../gtk-glade/sip_account.glade.h:8
-#, fuzzy
-msgid "Your SIP identity:"
-msgstr "Tożsamość"
-
-#: ../gtk-glade/sip_account.glade.h:11
-msgid "sip:"
-msgstr "sip:"
-
-#: ../gtk-glade/chatroom.glade.h:1
-#, fuzzy
-msgid "Send"
-msgstr "Dźwięk"
-
-#: ../gtk-glade/incoming_call.glade.h:1
-msgid "Accept"
-msgstr ""
-
-#: ../gtk-glade/incoming_call.glade.h:2
-#, fuzzy
-msgid "Decline"
-msgstr "linia"
-
-#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
-msgid "Incoming call"
-msgstr ""
-
-#: ../gtk-glade/incoming_call.glade.h:4
-msgid "Incoming call from"
-msgstr ""
-
-#: ../gtk-glade/incoming_call.glade.h:5
-msgid "Linphone - Incoming call"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:1
-msgid "0 stands for \"unlimited\""
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:2
-#, fuzzy
-msgid "<b>Audio</b>"
-msgstr "Dzwonie do "
-
-#: ../gtk-glade/parameters.glade.h:3
-msgid "<b>Bandwidth control</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:4
-#, fuzzy
-msgid "<b>Codecs</b>"
-msgstr "Dzwonie do "
-
-#: ../gtk-glade/parameters.glade.h:5
-msgid "<b>Default identity</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:6
-msgid "<b>Language</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:7
-msgid "<b>NAT and Firewall</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:8
-#, fuzzy
-msgid "<b>Ports</b>"
-msgstr "Dzwonie do "
-
-#: ../gtk-glade/parameters.glade.h:9
-msgid "<b>Privacy</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:10
-#, fuzzy
-msgid "<b>Proxy accounts</b>"
-msgstr "Dzwonie do "
-
-#: ../gtk-glade/parameters.glade.h:11
-#, fuzzy
-msgid "<b>Transport</b>"
-msgstr "Dzwonie do "
-
-#: ../gtk-glade/parameters.glade.h:12
-msgid "<b>Video</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:13
-msgid "ALSA special device (optional):"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:14
-#, fuzzy
-msgid "Add"
-msgstr "Adres"
-
-#: ../gtk-glade/parameters.glade.h:15
-msgid "Audio RTP/UDP:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:16
-#, fuzzy
-msgid ""
-"Audio codecs\n"
-"Video codecs"
-msgstr "Kodeki audio"
-
-#: ../gtk-glade/parameters.glade.h:18
-msgid "Behind NAT / Firewall (specify gateway IP below)"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:19
-msgid "Behind NAT / Firewall (use STUN to resolve)"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:21
-msgid "CIF"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:22
-#, fuzzy
-msgid "Capture device:"
-msgstr "Użyj tego urządzenia dźwięku:"
-
-#: ../gtk-glade/parameters.glade.h:23
-#, fuzzy
-msgid "Codecs"
-msgstr "Kodeki"
-
-#: ../gtk-glade/parameters.glade.h:24
-msgid "Direct connection to the Internet"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:25
-msgid "Disable"
-msgstr "Wyłącz"
-
-#: ../gtk-glade/parameters.glade.h:26
-#, fuzzy
-msgid "Done"
-msgstr "Brak."
-
-#: ../gtk-glade/parameters.glade.h:27
-msgid "Download speed limit in Kbit/sec:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:28
-msgid "Edit"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:29
-msgid "Enable"
-msgstr "Włączony"
-
-#: ../gtk-glade/parameters.glade.h:30
-msgid "Enable echo cancellation"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:31
-msgid "Erase all passwords"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:32
-msgid "Manage SIP Accounts"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:33
-msgid "Multimedia settings"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:34
-#, fuzzy
-msgid "Network settings"
-msgstr "Sieć"
-
-#: ../gtk-glade/parameters.glade.h:35
-#, fuzzy
-msgid "Playback device:"
-msgstr "Użyj tego urządzenia dźwięku:"
-
-#: ../gtk-glade/parameters.glade.h:36
-msgid "Prefered video resolution:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:37
-#, fuzzy
-msgid "Public IP address:"
-msgstr "Adres sip:"
-
-#: ../gtk-glade/parameters.glade.h:38
-msgid ""
-"Register to FONICS\n"
-"virtual network !"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:40
-msgid "Remove"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:41
-#, fuzzy
-msgid "Ring device:"
-msgstr "Użyj tego urządzenia dźwięku:"
-
-#: ../gtk-glade/parameters.glade.h:42
-#, fuzzy
-msgid "Ring sound:"
-msgstr "Źródło nagrywania:"
-
-#: ../gtk-glade/parameters.glade.h:43
-msgid "SIP (UDP):"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:44
-msgid "Send DTMFs as SIP info"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:45
-msgid "Set Maximum Transmission Unit:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:46
-msgid "Settings"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:47
-#, fuzzy
-msgid "Stun server:"
-msgstr "Dźwięk"
-
-#: ../gtk-glade/parameters.glade.h:48
-msgid "This section defines your SIP address when not using a SIP account"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:49
-msgid "Upload speed limit in Kbit/sec:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:50
-msgid "Use IPv6 instead of IPv4"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:51
-#, fuzzy
-msgid "User interface"
-msgstr "Podręcznik"
-
-#: ../gtk-glade/parameters.glade.h:52
-msgid "Video RTP/UDP:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:53
-#, fuzzy
-msgid "Video input device:"
-msgstr "Dźwięk"
-
-#: ../gtk-glade/parameters.glade.h:54
-msgid "Your display name (eg: John Doe):"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:55
-#, fuzzy
-msgid "Your resulting SIP address:"
-msgstr "Twój adres sip:"
-
-#: ../gtk-glade/parameters.glade.h:56
-msgid "Your username:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:57
-msgid "a sound card\n"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:59
-msgid "default camera"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:60
-msgid "default soundcard"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:61
-msgid "default soundcard\n"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:63
-msgid "gtk-go-down"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:64
-msgid "gtk-go-up"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:65
-msgid "gtk-media-play"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:1
-msgid "<b>Search somebody</b>"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:2
-msgid "Add to my list"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:3
-msgid "Search contacts in directory"
-msgstr ""
-
-#: ../gtk-glade/waiting.glade.h:1
-#, fuzzy
-msgid "Linphone"
-msgstr "linphone"
-
-#: ../gtk-glade/waiting.glade.h:2
-msgid "Please wait"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:195
-#, c-format
-msgid "You have missed %i call."
-msgid_plural "You have missed %i calls."
-msgstr[0] ""
-msgstr[1] ""
-
-#: ../coreapi/linphonecore.c:223
-msgid "aborted"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:226
-msgid "completed"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:229
-msgid "missed"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:234
-#, c-format
-msgid ""
-"%s at %s\n"
-"From: %s\n"
-"To: %s\n"
-"Status: %s\n"
-"Duration: %i mn %i sec\n"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:235
-msgid "Outgoing call"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:445
-msgid ""
-"Your machine appears to be connected to an IPv6 network. By default linphone "
-"always uses IPv4. Please update your configuration if you want to use IPv6"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:739
-#, fuzzy
-msgid "Ready"
-msgstr "Gotowy."
-
-#: ../coreapi/linphonecore.c:1014
-msgid "Remote end seems to have disconnected, the call is going to be closed."
-msgstr ""
-
-#: ../coreapi/linphonecore.c:1172
-msgid "Looking for telephone number destination..."
-msgstr ""
-
-#: ../coreapi/linphonecore.c:1174
-msgid "Could not resolve this number."
-msgstr ""
-
-#: ../coreapi/linphonecore.c:1239
-#, fuzzy
-msgid ""
-"Could not parse given sip address. A sip url usually looks like sip:"
-"user@domain"
-msgstr "Nie poprawny adres sip. Adres sip wygląda tak <sip:osoba@serwer>"
-
-#: ../coreapi/linphonecore.c:1340
-msgid "Sorry, having multiple simultaneous calls is not supported yet !"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:1387
-#, fuzzy
-msgid "Contacting"
-msgstr "Dzwonie do "
-
-#: ../coreapi/linphonecore.c:1402
-msgid "could not call"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
-msgid "Connected."
-msgstr "Połączony"
-
-#: ../coreapi/linphonecore.c:1813
-#, fuzzy
-msgid "Call ended"
-msgstr "Rozmowa odrzucona."
-
-#: ../coreapi/linphonecore.c:2175
-msgid "No nat/firewall address supplied !"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
-#, c-format
-msgid "Invalid nat address '%s' : %s"
-msgstr ""
-
-#: ../coreapi/misc.c:134
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the pcm oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-"'modprobe snd-pcm-oss' as root to load it."
-msgstr ""
-"Używasz sterowników ALSA do dźwięku.\n"
-"To jest najlepszy wybór. Jednak brakuje modułu emulacji pcm oss,\n"
-"a Linphone go wymaga. Uruchom 'modprobe snd-pcm-oss' jako root,\n"
-"aby go załadować"
-
-#: ../coreapi/misc.c:137
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the mixer oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-" 'modprobe snd-mixer-oss' as root to load it."
-msgstr ""
-"Używasz sterowników ALSA do dźwięku.\n"
-"To jest najlepszy wybór. Jednak brakuje modułu emulacji mixera oss,\n"
-"a Linphone go wymaga. Uruchom 'modprobe snd-mixer-oss' jako root,\n"
-"aby go załadować"
-
-#: ../coreapi/misc.c:610
-msgid "Stun lookup in progress..."
-msgstr ""
-
-#: ../coreapi/exevents.c:127
-#, fuzzy
-msgid "Call terminated."
-msgstr "Rozmowa odrzucona."
-
-#: ../coreapi/exevents.c:149
-msgid "Could not reach destination."
-msgstr ""
-
-#: ../coreapi/exevents.c:158
-msgid "User is busy."
-msgstr "Osoba jest zajęta."
-
-#: ../coreapi/exevents.c:159
-msgid "User is temporarily unavailable."
-msgstr "Osoba jest tymczasowo niedostępna."
-
-#: ../coreapi/exevents.c:160
-#, fuzzy
-msgid "Request Cancelled."
-msgstr "Połączenie odwołane."
-
-#. char *retrymsg=_("%s. Retry after %i minute(s).");
-#: ../coreapi/exevents.c:162
-msgid "User does not want to be disturbed."
-msgstr "Osoba nie chce, aby jej przeszkadzać."
-
-#: ../coreapi/exevents.c:163
-msgid "Call declined."
-msgstr "Rozmowa odrzucona."
-
-#: ../coreapi/exevents.c:191
-msgid "Bad request"
-msgstr ""
-
-#: ../coreapi/exevents.c:194
-msgid "User cannot be found at given address."
-msgstr "Osoba nie istnieje pod tym adresem."
-
-#: ../coreapi/exevents.c:197
-msgid "Remote user cannot support any of proposed codecs."
-msgstr "Osoba nie posiada żadnych zaproponowanych kodeków."
-
-#. time out, call leg is lost
-#: ../coreapi/exevents.c:227
-msgid "Timeout."
-msgstr "Upłynął limit czasu."
-
-#: ../coreapi/exevents.c:230
-msgid "Remote host was found but refused connection."
-msgstr "Serwer istnieje, ale odrzucił połączenie."
-
-#: ../coreapi/exevents.c:339
-#, fuzzy
-msgid "is contacting you."
-msgstr "dzwoni do Ciebie."
-
-#: ../coreapi/exevents.c:424
-#, c-format
-msgid "Redirected to %s..."
-msgstr ""
-
-#: ../coreapi/exevents.c:440
-msgid ""
-"User is not reachable at the moment but he invites you\n"
-"to contact him using the following alternate resource:"
-msgstr ""
-"Użytkownik nie jest dostępny, ale proponuje kontakt poprzez alternatywny "
-"adres:"
-
-#: ../coreapi/exevents.c:861
-msgid "Early media."
-msgstr ""
-
-#: ../coreapi/exevents.c:972
-#, fuzzy, c-format
-msgid "Registration on %s failed: %s"
-msgstr "Rejestracja powiodła się."
-
-#: ../coreapi/exevents.c:972
-msgid "no response timeout"
-msgstr ""
-
-#: ../coreapi/exevents.c:998
-#, fuzzy, c-format
-msgid "Registration on %s successful."
-msgstr "Rejestracja powiodła się."
-
-#: ../coreapi/exevents.c:999
-#, fuzzy, c-format
-msgid "Unregistration on %s done."
-msgstr "Rejestracja powiodła się."
-
-#. people for which we don't have yet an answer should appear as offline
-#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
-#, fuzzy
-msgid "Gone"
-msgstr "Brak."
-
-#: ../coreapi/presence.c:129
-msgid "Waiting for Approval"
-msgstr ""
-
-#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
-#, fuzzy
-msgid "Online"
-msgstr "linia"
-
-#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
-msgid "Busy"
-msgstr ""
-
-#: ../coreapi/presence.c:142
-msgid "Be Right Back"
-msgstr ""
-
-#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
-msgid "Away"
-msgstr "Zajęty"
-
-#: ../coreapi/presence.c:151
-msgid "On The Phone"
-msgstr ""
-
-#: ../coreapi/presence.c:156
-msgid "Out To Lunch"
-msgstr ""
-
-#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
-msgid "Closed"
-msgstr ""
-
-#: ../coreapi/friend.c:35
-msgid "Unknown"
-msgstr ""
-
-#: ../coreapi/friend.c:44
-msgid "Be right back"
-msgstr ""
-
-#: ../coreapi/friend.c:50
-#, fuzzy
-msgid "On the phone"
-msgstr "linphone"
-
-#: ../coreapi/friend.c:53
-msgid "Out to lunch"
-msgstr ""
-
-#: ../coreapi/friend.c:56
-msgid "Do not disturb"
-msgstr "Nie przeszkadzać"
-
-#: ../coreapi/friend.c:59
-#, fuzzy
-msgid "Moved"
-msgstr "Kodeki"
-
-#: ../coreapi/friend.c:62
-msgid "Using another messaging service"
-msgstr ""
-
-#: ../coreapi/friend.c:65
-#, fuzzy
-msgid "Offline"
-msgstr "linia"
-
-#: ../coreapi/friend.c:68
-msgid "Pending"
-msgstr ""
-
-#: ../coreapi/friend.c:74
-msgid "Unknown-bug"
-msgstr ""
-
-#: ../coreapi/proxy.c:221
-msgid ""
-"The sip proxy address you entered is invalid, it must start with \"sip:\" "
-"followed by a hostname."
-msgstr ""
-
-#: ../coreapi/proxy.c:227
-msgid ""
-"The sip identity you entered is invalid.\n"
-"It should look like sip:username@proxydomain, such as sip:alice@example.net"
-msgstr ""
-
-#: ../coreapi/proxy.c:634
-#, fuzzy, c-format
-msgid "Could not login as %s"
-msgstr "Nie można znaleźć pixmapy: %s"
-
-#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
-msgid "ITU-G.711 alaw encoder"
-msgstr ""
-
-#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
-msgid "ITU-G.711 alaw decoder"
-msgstr ""
-
-#: ../mediastreamer2/src/alsa.c:923
-msgid "Alsa sound source"
-msgstr ""
-
-#: ../mediastreamer2/src/alsa.c:1027
-msgid "Alsa sound output"
-msgstr ""
-
-#: ../mediastreamer2/src/aqsnd.c:891
-msgid "Sound capture filter for MacOS X Audio Queue Service"
-msgstr ""
-
-#: ../mediastreamer2/src/aqsnd.c:915
-msgid "Sound playback filter for MacOS X Audio Queue Service"
-msgstr ""
-
-#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
-msgid "DTMF generator"
-msgstr ""
-
-#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
-msgid "The GSM full-rate codec"
-msgstr ""
-
-#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
-msgid "The GSM codec"
-msgstr ""
-
-#: ../mediastreamer2/src/macsnd.c:670
-msgid "Sound capture filter for MacOS X Core Audio drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/macsnd.c:684
-msgid "Sound playback filter for MacOS X Core Audio drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
-msgid "A filter to make conferencing"
-msgstr ""
-
-#: ../mediastreamer2/src/msfileplayer.c:295
-#: ../mediastreamer2/src/msfileplayer.c:313
-msgid "Raw files and wav reader"
-msgstr ""
-
-#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
-#: ../mediastreamer2/src/msfilerec_win.c:216
-#: ../mediastreamer2/src/msfilerec_win.c:234
-msgid "Wav file recorder"
-msgstr ""
-
-#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
-msgid "A filter that send several inputs to one output."
-msgstr ""
-
-#: ../mediastreamer2/src/msresample.c:221
-#: ../mediastreamer2/src/msresample.c:239
-msgid "frequency resampler"
-msgstr ""
-
-#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
-msgid "RTP output filter"
-msgstr ""
-
-#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
-msgid "RTP input filter"
-msgstr ""
-
-#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
-#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
-msgid "The free and wonderful speex codec"
-msgstr ""
-
-#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
-msgid "A filter that controls and measure sound volume"
-msgstr ""
-
-#: ../mediastreamer2/src/msv4l.c:1009
-msgid "A video4linux compatible source filter to stream pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/msv4l2.c:458
-msgid "A filter to grab pictures from Video4Linux2-powered cameras"
-msgstr ""
-
-#: ../mediastreamer2/src/nowebcam.c:1780
-msgid "A filter that outputs a static image."
-msgstr ""
-
-#: ../mediastreamer2/src/oss.c:567
-msgid "Sound capture filter for OSS drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/oss.c:581
-msgid "Sound playback filter for OSS drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
-msgid "A pixel format converter"
-msgstr ""
-
-#: ../mediastreamer2/src/sizeconv.c:204
-msgid "A video size converter"
-msgstr ""
-
-#: ../mediastreamer2/src/sizeconv.c:222
-msgid "a small video size converter"
-msgstr ""
-
-#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
-msgid "Echo canceler using speex library"
-msgstr ""
-
-#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
-msgid "A filter that reads from input and copy to its multiple outputs."
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:375
-msgid "The theora video encoder from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:393
-msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
-msgid "The theora video decoder from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
-msgid "ITU-G.711 ulaw encoder"
-msgstr ""
-
-#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
-msgid "ITU-G.711 ulaw decoder"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
-#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
-msgid "A H.263 decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:688
-msgid "A MPEG4 decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:704
-msgid "A RTP/JPEG decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:720
-msgid "A MJPEG decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:736
-msgid "A snow decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
-msgid "A video H.263 encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:856
-msgid ""
-"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
-"spec."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
-msgid "A video MPEG4 encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:888
-msgid "A video snow encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:904
-msgid "A RTP/MJPEG encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:938
-msgid ""
-"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:970
-msgid ""
-"The snow codec is royalty-free and is open-source. \n"
-"It uses innovative techniques that makes it one of most promising video "
-"codec. It is implemented within the ffmpeg project.\n"
-"However it is under development, quite unstable and compatibility with other "
-"versions cannot be guaranteed."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:990
-msgid "A MJPEG encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
-msgid "A generic video display"
-msgstr ""
-
-#: ../mediastreamer2/src/wincevideods.c:966
-#: ../mediastreamer2/src/wincevideods.c:984
-#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
-#: ../mediastreamer2/src/winvideods.c:1306
-#: ../mediastreamer2/src/winvideods.c:1324
-msgid "A video4windows compatible source filter to stream pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
-msgid "A video for windows (vfw.h) based source filter to grab pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
-msgid "ICE filter"
-msgstr ""
-
-#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
-msgid "A filter that trashes its input (useful for terminating some graphs)."
-msgstr ""
-
-#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
-msgid "Parametric sound equalizer."
-msgstr ""
-
-#: ../mediastreamer2/src/msdscap-mingw.cc:1003
-msgid "A webcam grabber based on directshow."
-msgstr ""
-
-#, fuzzy
-#~ msgid "Display filters"
-#~ msgstr "Wyświetlana nazwa:"
-
-#, fuzzy
-#~ msgid "_Properties"
-#~ msgstr "Właściwości RTP"
-
-#~ msgid "Sound"
-#~ msgstr "Dźwięk"
-
-#, fuzzy
-#~ msgid "Default identity"
-#~ msgstr "Tożsamość"
-
-#~ msgid "Address book"
-#~ msgstr "Książka adresowa"
-
-#~ msgid "Shows the address book"
-#~ msgstr "Pokazuje książkę adresową"
-
-#~ msgid "..."
-#~ msgstr "..."
-
-#, fuzzy
-#~ msgid ""
-#~ "Call or\n"
-#~ "answer"
-#~ msgstr ""
-#~ "Zadzwoń lub\n"
-#~ "Odpowiedz"
-
-#~ msgid "Show more..."
-#~ msgstr "Pokaż więcej"
-
-#~ msgid "Playback level:"
-#~ msgstr "Poziom odtwarzania:"
-
-#~ msgid "Recording level:"
-#~ msgstr "Poziom nagrywania:"
-
-#, fuzzy
-#~ msgid "Ring level:"
-#~ msgstr "Poziom nagrywania:"
-
-#~ msgid "Reachable"
-#~ msgstr "Dostępny"
-
-#~ msgid "Busy, I'll be back in "
-#~ msgstr "Zajęty, wrócę za "
-
-#~ msgid "The other party will be informed that you'll be back in X minutes"
-#~ msgstr "Osoba zostanie powiadomiona, że wrócisz za X minut."
-
-#~ msgid "mn"
-#~ msgstr "mn"
-
-#~ msgid "Moved temporarily"
-#~ msgstr "Tymczasowo niedostępny"
-
-#~ msgid "Alternative service"
-#~ msgstr "Alternatywny adres"
-
-#~ msgid "URL:"
-#~ msgstr "URL:"
-
-#~ msgid "Presence"
-#~ msgstr "Obecność"
-
-#~ msgid "Press digits to send DTMFs."
-#~ msgstr "Nacisnij cyfry, aby wysłać DTMFy."
-
-#~ msgid "DTMF"
-#~ msgstr "DTMF"
-
-#~ msgid ""
-#~ "Linphone is a web-phone.\n"
-#~ "It is compatible with SIP and RTP protocols."
-#~ msgstr ""
-#~ "Linphone jest telefonem internetowym.\n"
-#~ "Jest kompatybilny z protokolami SIP i RTP."
-
-#, fuzzy
-#~ msgid "Use IPv6 network (if available)"
-#~ msgstr "Osoba jest tymczasowo niedostępna."
-
-#, fuzzy
-#~ msgid ""
-#~ "These options is only for users in a private network, behind a gateway. "
-#~ "If you are not in this situation, then leave this empty."
-#~ msgstr ""
-#~ "Ta opcja jest tylko dla osób w sieci prywatnej, znajdujących się za "
-#~ "firewallem. Jeżeli nie jesteś w takiej sytuacji, nie zmieniaj tej opcji."
-
-#~ msgid "NAT traversal options (experimental)"
-#~ msgstr "Opcje NAT traversal (eksperymentalne)"
-
-#, fuzzy
-#~ msgid "Number of buffered miliseconds (jitter compensation):"
-#~ msgstr "Czas bufora w milisekundach (kompensacja jitter):"
-
-#~ msgid "RTP port used for audio:"
-#~ msgstr "Port RTP dla dźwięku:"
-
-#~ msgid "micro"
-#~ msgstr "mikrofon"
-
-#~ msgid "Recording source:"
-#~ msgstr "Źródło nagrywania:"
-
-#~ msgid "Sound properties"
-#~ msgstr "Właściwości dźwięku"
-
-#~ msgid "Run sip user agent on port:"
-#~ msgstr "Uruchom agenta sip na porcie:"
-
-#~ msgid "It is strongly recommended to use port 5060."
-#~ msgstr "Rekomendowane jest użycie portu 5060."
-
-#~ msgid "SIP port"
-#~ msgstr "Port SIP"
-
-#~ msgid "@"
-#~ msgstr "@"
-
-#~ msgid "Identity"
-#~ msgstr "Tożsamość"
-
-#, fuzzy
-#~ msgid "Add proxy/registrar"
-#~ msgstr "Użyj rejestracji sip"
-
-#~ msgid "Remote services"
-#~ msgstr "Zdalne usługi"
-
-#, fuzzy
-#~ msgid "Authentication information"
-#~ msgstr "Informacje o kodeku"
-
-#~ msgid "SIP"
-#~ msgstr "SIP"
-
-#~ msgid "List of audio codecs, in order of preference:"
-#~ msgstr "Lista kodeków audio, w kolejności preferencji:"
-
-#, fuzzy
-#~ msgid "Video Codecs"
-#~ msgstr "Kodeki audio"
-
-#~ msgid ""
-#~ "Note: Codecs in red are not usable regarding to your connection type to "
-#~ "the internet."
-#~ msgstr ""
-#~ "Uwaga: Czerwone kodeki nie mogą być użyte, ze względu na typTwojego "
-#~ "połącznia z internetem."
-
-#, fuzzy
-#~ msgid "No information availlable"
-#~ msgstr "Brak informacji"
-
-#~ msgid "Codec information"
-#~ msgstr "Informacje o kodeku"
-
-#~ msgid "Address Book"
-#~ msgstr "Książka adresowa"
-
-#~ msgid "Select"
-#~ msgstr "Wybierz"
-
-#~ msgid ""
-#~ "User is not reachable at the moment but he invites you to contact him "
-#~ "using the following alternate ressource:"
-#~ msgstr ""
-#~ "Użytkownik nie jest dostępny, ale proponuje kontakt poprzez alternatywny "
-#~ "adres:"
-
-#~ msgid "None."
-#~ msgstr "Brak."
-
-#, fuzzy
-#~ msgid "Name:"
-#~ msgstr "Nazwa"
-
-#, fuzzy
-#~ msgid "None"
-#~ msgstr "Brak."
-
-#, fuzzy
-#~ msgid "Bad sip address: a sip address looks like sip:user@domain"
-#~ msgstr "Nie poprawny adres sip. Adres sip wygląda tak <sip:osoba@serwer>"
-
-#~ msgid "Communication ended."
-#~ msgstr "Komunikacja zakończona."
-
-#~ msgid "Call cancelled."
-#~ msgstr "Połączenie odwołane."
-
-#, fuzzy
-#~ msgid "Firewall 's external ip address (in dot notations):"
-#~ msgstr "Adres IP firewall'u (w notacji kropkowej):"
-
-#~ msgid "Index"
-#~ msgstr "Indeks"
-
-#, fuzzy
-#~ msgid "Server address"
-#~ msgstr "Adres serwera:"
-
-#~ msgid "28k modem"
-#~ msgstr "Modem 28K"
-
-#~ msgid "56k modem"
-#~ msgstr "Modem 56K"
-
-#~ msgid "64k modem (numeris)"
-#~ msgstr "Modem ISDN 64K"
-
-#~ msgid "ADSL or Cable modem"
-#~ msgstr "ADSL lub połączenie kablowe"
-
-#~ msgid "Ethernet or equivalent"
-#~ msgstr "LAN lub podobne"
-
-#~ msgid "Connection type:"
-#~ msgstr "Typ połączenia:"
-
-#, fuzzy
-#~ msgid ""
-#~ "Linphone could not open audio device %s. Check if your sound card is "
-#~ "fully configured and working."
-#~ msgstr ""
-#~ "Linphone nie mógł otworzyć urządzenia dźwięku. Sprawdź czy Twoja karta "
-#~ "jest dobrze skonfigurowana."
-
-#~ msgid "Type here the sip address of the person you want to call."
-#~ msgstr "Tutaj wpisz adres sip osoby, do której chcesz zadzwonić"
-
-#~ msgid ""
-#~ "Release or\n"
-#~ "Refuse"
-#~ msgstr ""
-#~ "Rozłącz lub\n"
-#~ "Odmów"
-
-#~ msgid "%s. Retry after %i minute(s)."
-#~ msgstr "%s. Spróbuj za %i minut."
-
-#, fuzzy
-#~ msgid "Timeout..."
-#~ msgstr "Upłynął limit czasu."
-
-#, fuzzy
-#~ msgid ""
-#~ "Add address\n"
-#~ "book"
-#~ msgstr "Książka adresowa"
-
-#~ msgid "Toggle this if you want to be registered on a remote server."
-#~ msgstr "Włącz to, jeżeli chcesz się zarejestrować na zdalnym serwerze."
-
-#~ msgid "Address of record:"
-#~ msgstr "Adres do rejestracji:"
-
-#~ msgid ""
-#~ "The password used for registration. On some servers it is not necessary"
-#~ msgstr "Hasło do rejestracji. Na niektórych serwerach nie jest wymagane"
-
-#~ msgid "Use this registrar server as outbound proxy."
-#~ msgstr "Użyj tego serwera rejestracji jako zewnętrznego proxy"
-
-#~ msgid "sip address:"
-#~ msgstr "Adres SIP:"
-
-#~ msgid "Modify"
-#~ msgstr "Zmień"
-
-#~ msgid "Registering..."
-#~ msgstr "Rejestruje..."
-
-#~ msgid ""
-#~ "You are currently using the i810_audio driver.\n"
-#~ "This driver is buggy and so does not work with Linphone.\n"
-#~ "We suggest that you replace it by its equivalent ALSA driver,\n"
-#~ "either with packages from your distribution, or by downloading\n"
-#~ "ALSA drivers at http://www.alsa-project.org."
-#~ msgstr ""
-#~ "Używasz sterownika i810_audio.\n"
-#~ "Ten sterownik ma błędy i nie działa z Linphone\n"
-#~ "Sugerujemy zmiane sterowników na ich odpowiedniki ALSA z pakietów Twojej "
-#~ "dystrybucji,\n"
-#~ "lub ze strony http://www.alsa-project.org/."
-
-#~ msgid "Unregistration successfull."
-#~ msgstr "Derejestracja powiodła się."
diff --git a/linphone/po/pt_BR.po b/linphone/po/pt_BR.po
deleted file mode 100644 (file)
index b25b8b3..0000000
+++ /dev/null
@@ -1,1846 +0,0 @@
-# Portuguese translations for gnomebaker package.
-# Copyright (C) 2005 THE linphone COPYRIGHT HOLDER
-# This file is distributed under the same license as the linphone package.
-# Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>, 2005.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: linphone-1.1.0\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-10-16 15:24+0200\n"
-"PO-Revision-Date: 2006-07-11 23:30+0200\n"
-"Last-Translator: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
-"Language-Team: pt_BR <pt_BR@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
-#: ../gtk-glade/support.c:102
-#, c-format
-msgid "Couldn't find pixmap file: %s"
-msgstr "Não é possível achar arquivo pixmap: %s"
-
-#: ../gtk-glade/chat.c:27
-#, c-format
-msgid "Chat with %s"
-msgstr "Bate-papo com %s"
-
-#: ../gtk-glade/main.c:90
-msgid "log to stdout some debug information while running."
-msgstr ""
-
-#: ../gtk-glade/main.c:97
-msgid "Start only in the system tray, do not show the main interface."
-msgstr ""
-
-#: ../gtk-glade/main.c:104
-msgid "address to call right now"
-msgstr ""
-
-#: ../gtk-glade/main.c:111
-msgid "if set automatically answer incoming calls"
-msgstr ""
-
-#: ../gtk-glade/main.c:119
-msgid ""
-"Specifiy a working directory (should be the base of the installation, eg: c:"
-"\\Program Files\\Linphone)"
-msgstr ""
-
-#: ../gtk-glade/main.c:675
-#, fuzzy, c-format
-msgid "Incoming call from %s"
-msgstr "Camadas recebidas"
-
-#: ../gtk-glade/main.c:707
-#, c-format
-msgid ""
-"%s would like to add you to his contact list.\n"
-"Would you allow him to see your presence status or add him to your contact "
-"list ?\n"
-"If you answer no, this person will be temporarily blacklisted."
-msgstr ""
-
-#: ../gtk-glade/main.c:777
-#, c-format
-msgid ""
-"Please enter your password for username <i>%s</i>\n"
-" at domain <i>%s</i>:"
-msgstr ""
-
-#: ../gtk-glade/main.c:871
-msgid "Website link"
-msgstr ""
-
-#: ../gtk-glade/main.c:907
-msgid "Linphone - a video internet phone"
-msgstr ""
-
-#: ../gtk-glade/main.c:926
-#, c-format
-msgid "%s (Default)"
-msgstr ""
-
-#: ../gtk-glade/main.c:1168
-msgid "A free SIP video-phone"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
-#: ../gtk-glade/contact.glade.h:3
-msgid "Name"
-msgstr "Nome"
-
-#: ../gtk-glade/friendlist.c:212
-msgid "Presence status"
-msgstr "Status de presença"
-
-#: ../gtk-glade/friendlist.c:243
-#, c-format
-msgid "Search in %s directory"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:432
-msgid "Invalid sip contact !"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:474
-#, fuzzy, c-format
-msgid "Call %s"
-msgstr "Histórico de chamadas"
-
-#: ../gtk-glade/friendlist.c:475
-#, c-format
-msgid "Send text to %s"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:476
-#, fuzzy, c-format
-msgid "Edit contact '%s'"
-msgstr "Edicar informação de contato"
-
-#: ../gtk-glade/friendlist.c:477
-#, c-format
-msgid "Delete contact '%s'"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:519
-#, c-format
-msgid "Add new contact from %s directory"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:251
-msgid "Rate (Hz)"
-msgstr "Taxa (Hz)"
-
-#: ../gtk-glade/propertybox.c:257
-msgid "Status"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:263
-msgid "Min bitrate (kbit/s)"
-msgstr "Bitrate mínimo (kbits/s)"
-
-#: ../gtk-glade/propertybox.c:269
-msgid "Parameters"
-msgstr "Parâmetros"
-
-#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
-msgid "Enabled"
-msgstr "Ativado"
-
-#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
-msgid "Disabled"
-msgstr "Desativado"
-
-#: ../gtk-glade/propertybox.c:480
-#, fuzzy
-msgid "Account"
-msgstr "Aceitar"
-
-#: ../gtk-glade/propertybox.c:620
-msgid "English"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:621
-msgid "French"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:622
-msgid "Swedish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:623
-msgid "Italian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:624
-msgid "Spanish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:625
-msgid "Brazilian Portugese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:626
-msgid "Polish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:627
-msgid "German"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:628
-msgid "Russian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:629
-msgid "Japanese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:630
-msgid "Dutch"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:631
-msgid "Hungarian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:632
-msgid "Czech"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:633
-msgid "Chinese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:690
-msgid ""
-"You need to restart linphone for the new language selection to take effect."
-msgstr ""
-
-#: ../gtk-glade/update.c:80
-#, c-format
-msgid ""
-"A more recent version is availalble from %s.\n"
-"Would you like to open a browser to download it ?"
-msgstr ""
-
-#: ../gtk-glade/update.c:91
-msgid "You are running the lastest version."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:66
-msgid "Firstname, Lastname"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:73
-#, fuzzy
-msgid "SIP address"
-msgstr "Endereço"
-
-#: ../gtk-glade/buddylookup.c:121
-msgid "Error communicating with server."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:125
-#, fuzzy
-msgid "Connecting..."
-msgstr "Contatando "
-
-#: ../gtk-glade/buddylookup.c:129
-#, fuzzy
-msgid "Connected"
-msgstr "Conectado."
-
-#: ../gtk-glade/buddylookup.c:133
-msgid "Receiving data..."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:141
-#, c-format
-msgid "Found %i contact"
-msgid_plural "Found %i contacts"
-msgstr[0] ""
-msgstr[1] ""
-
-#: ../gtk-glade/setupwizard.c:25
-msgid ""
-"Welcome !\n"
-"This assistant will help you to use a SIP account for your calls."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:34
-msgid "Create an account by choosing a username"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:35
-msgid "I have already an account and just want to use it"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:53
-msgid "Please choose a username:"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:54
-#, fuzzy
-msgid "Username:"
-msgstr "Usuário"
-
-#: ../gtk-glade/setupwizard.c:92
-#, c-format
-msgid "Checking if '%s' is available..."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
-msgid "Please wait..."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:101
-msgid "Sorry this username already exists. Please try a new one."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
-msgid "Ok !"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
-msgid "Communication problem, please try again later."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:134
-msgid "Thank you. Your account is now configured and ready for use."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:228
-msgid "Welcome to the account setup assistant"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:232
-msgid "Account setup assistant"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:236
-#, fuzzy
-msgid "Choosing a username"
-msgstr "Usuário"
-
-#: ../gtk-glade/setupwizard.c:240
-msgid "Verifying"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:244
-#, fuzzy
-msgid "Confirmation"
-msgstr "Informações"
-
-#: ../gtk-glade/setupwizard.c:249
-msgid "Creating your account"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:253
-msgid "Now ready !"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:98
-#, fuzzy
-msgid "<b>Calling...</b>"
-msgstr "Contatando "
-
-#: ../gtk-glade/incall_view.c:122
-#, fuzzy
-msgid "<b>In call with</b>"
-msgstr "Contatando "
-
-#: ../gtk-glade/incall_view.c:124
-msgid "00::00::00"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:140
-#, c-format
-msgid "%02i::%02i::%02i"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:158
-#, fuzzy
-msgid "<b>Call ended.</b>"
-msgstr "Chamada cancelada."
-
-#: ../gtk-glade/incall_view.c:176
-msgid "Unmute"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
-msgid "Mute"
-msgstr ""
-
-#: ../gtk-glade/loginframe.c:82
-#, c-format
-msgid "Please enter login information for %s"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:1
-msgid "#"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:2
-msgid "*"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:3
-msgid "0"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:4
-msgid "1"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:5
-msgid "2"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:6
-msgid "3"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:7
-msgid "4"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:8
-msgid "5"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:9
-msgid "6"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:10
-msgid "7"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:11
-msgid "8"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:12
-msgid "9"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:13
-#, fuzzy
-msgid "<b>Contact list</b>"
-msgstr "Contatando "
-
-#: ../gtk-glade/main.glade.h:14
-#, fuzzy
-msgid "<b>Terminate call</b>"
-msgstr "Contatando "
-
-#: ../gtk-glade/main.glade.h:15
-#, fuzzy
-msgid "<b>Welcome !</b>"
-msgstr "Contatando "
-
-#: ../gtk-glade/main.glade.h:16
-msgid "A"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:17
-msgid ""
-"ADSL\n"
-"Fiber Channel"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:19
-msgid ""
-"All users\n"
-"Online users"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:21
-msgid "Assistant"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:22
-#, fuzzy
-msgid "Audio & Video"
-msgstr "Codec's de áudio"
-
-#: ../gtk-glade/main.glade.h:23
-#, fuzzy
-msgid "Audio only"
-msgstr "Codec's de áudio"
-
-#: ../gtk-glade/main.glade.h:24
-#, fuzzy
-msgid "Automatically log me in"
-msgstr "Adquirir automaticamente um nome de servidor válido."
-
-#: ../gtk-glade/main.glade.h:25
-msgid "B"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
-msgid "C"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:27
-msgid "Check for updates"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:28
-msgid "D"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:29
-msgid "Default"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:30
-msgid "Digits"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:31
-#, fuzzy
-msgid "Duration"
-msgstr "Informações"
-
-#: ../gtk-glade/main.glade.h:32
-#, fuzzy
-msgid "Duration:"
-msgstr "Informações"
-
-#: ../gtk-glade/main.glade.h:33
-#, fuzzy
-msgid "Enable self-view"
-msgstr "Ativado"
-
-#: ../gtk-glade/main.glade.h:34
-msgid "Enter username, phone number, or full sip address"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:35
-#, fuzzy
-msgid "In call"
-msgstr "Camadas recebidas"
-
-#: ../gtk-glade/main.glade.h:36
-msgid "Internet connection:"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:37
-#, fuzzy
-msgid "Login information"
-msgstr "Informação de contato"
-
-#: ../gtk-glade/main.glade.h:38
-msgid "Lookup:"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:39
-msgid "Main view"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:41
-#, fuzzy
-msgid "My current identity:"
-msgstr "Identificação SIP:"
-
-#: ../gtk-glade/main.glade.h:42
-#, fuzzy
-msgid "Password"
-msgstr "Senha:"
-
-#: ../gtk-glade/main.glade.h:43
-msgid "SIP address or phone number:"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:44
-msgid "Show current call"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:45
-msgid "Start call"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:46
-msgid "Terminate call"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:47
-#, fuzzy
-msgid "Username"
-msgstr "Usuário"
-
-#: ../gtk-glade/main.glade.h:48
-msgid "_Linphone"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:49
-msgid "_Modes"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:50
-#, fuzzy
-msgid "gtk-connect"
-msgstr "Conectado."
-
-#: ../gtk-glade/main.glade.h:51
-msgid "gtk-find"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:52
-msgid "in"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:53
-msgid "label"
-msgstr ""
-
-#: ../gtk-glade/about.glade.h:1
-msgid "About linphone"
-msgstr ""
-
-#: ../gtk-glade/about.glade.h:2
-msgid "An internet video phone using the standart SIP (rfc3261) protocol."
-msgstr ""
-
-#: ../gtk-glade/about.glade.h:3
-msgid "Created by Simon Morlat\n"
-msgstr ""
-
-#: ../gtk-glade/about.glade.h:5
-msgid ""
-"fr: Simon Morlat\n"
-"en: Simon Morlat and Delphine Perreau\n"
-"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
-"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
-"sv: Daniel Nylander <po@danielnylander.se>\n"
-"es: Jesus Benitez <gnelson at inMail dot sk>\n"
-"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
-"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
-"pl: Robert Nasiadek <darkone@darkone.pl>\n"
-"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
-"hu: anonymous\n"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:1
-#, fuzzy
-msgid "<b>Contact information</b>"
-msgstr "Informação de contato"
-
-#: ../gtk-glade/contact.glade.h:2
-msgid "Allow this contact to see my presence status"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:4
-#, fuzzy
-msgid "SIP Address"
-msgstr "Endereço"
-
-#: ../gtk-glade/contact.glade.h:5
-msgid "Show this contact presence status"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
-#: ../gtk-glade/sip_account.glade.h:9
-msgid "gtk-cancel"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
-#: ../gtk-glade/sip_account.glade.h:10
-msgid "gtk-ok"
-msgstr ""
-
-#: ../gtk-glade/log.glade.h:1
-msgid "Linphone debug window"
-msgstr ""
-
-#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
-#: ../gtk-glade/chatroom.glade.h:2
-msgid "gtk-close"
-msgstr ""
-
-#: ../gtk-glade/password.glade.h:1
-#, fuzzy
-msgid "Linphone - Authentication required"
-msgstr "Autenticação requerida"
-
-#: ../gtk-glade/password.glade.h:2
-#, fuzzy
-msgid "Password:"
-msgstr "Senha:"
-
-#: ../gtk-glade/password.glade.h:3
-msgid "Please enter the domain password"
-msgstr ""
-
-#: ../gtk-glade/password.glade.h:4
-msgid "UserID"
-msgstr ""
-
-#: ../gtk-glade/call_logs.glade.h:1
-#, fuzzy
-msgid "Call history"
-msgstr "Linphone - Histórico de chamadas"
-
-#: ../gtk-glade/sip_account.glade.h:1
-msgid "Configure a SIP account"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:2
-msgid "Linphone - Configure a SIP account"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:3
-#, fuzzy
-msgid "Publish presence information"
-msgstr "Informar informação de presença"
-
-#: ../gtk-glade/sip_account.glade.h:4
-msgid "Register at startup"
-msgstr ""
-
-#: ../gtk-glade/sip_account.glade.h:5
-#, fuzzy
-msgid "Registration duration (sec):"
-msgstr "Período do registo:"
-
-#: ../gtk-glade/sip_account.glade.h:6
-msgid "Route (optional):"
-msgstr "Rota (opcional):"
-
-#: ../gtk-glade/sip_account.glade.h:7
-#, fuzzy
-msgid "SIP Proxy address:"
-msgstr "Proxy SIP:"
-
-#: ../gtk-glade/sip_account.glade.h:8
-#, fuzzy
-msgid "Your SIP identity:"
-msgstr "Identificação SIP:"
-
-#: ../gtk-glade/sip_account.glade.h:11
-msgid "sip:"
-msgstr ""
-
-#: ../gtk-glade/chatroom.glade.h:1
-#, fuzzy
-msgid "Send"
-msgstr "Som"
-
-#: ../gtk-glade/incoming_call.glade.h:1
-msgid "Accept"
-msgstr "Aceitar"
-
-#: ../gtk-glade/incoming_call.glade.h:2
-#, fuzzy
-msgid "Decline"
-msgstr "linha"
-
-#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
-msgid "Incoming call"
-msgstr "Camadas recebidas"
-
-#: ../gtk-glade/incoming_call.glade.h:4
-#, fuzzy
-msgid "Incoming call from"
-msgstr "Camadas recebidas"
-
-#: ../gtk-glade/incoming_call.glade.h:5
-#, fuzzy
-msgid "Linphone - Incoming call"
-msgstr "Camadas recebidas"
-
-#: ../gtk-glade/parameters.glade.h:1
-msgid "0 stands for \"unlimited\""
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:2
-#, fuzzy
-msgid "<b>Audio</b>"
-msgstr "Contatando "
-
-#: ../gtk-glade/parameters.glade.h:3
-msgid "<b>Bandwidth control</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:4
-#, fuzzy
-msgid "<b>Codecs</b>"
-msgstr "Contatando "
-
-#: ../gtk-glade/parameters.glade.h:5
-msgid "<b>Default identity</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:6
-msgid "<b>Language</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:7
-msgid "<b>NAT and Firewall</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:8
-#, fuzzy
-msgid "<b>Ports</b>"
-msgstr "Contatando "
-
-#: ../gtk-glade/parameters.glade.h:9
-msgid "<b>Privacy</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:10
-#, fuzzy
-msgid "<b>Proxy accounts</b>"
-msgstr "Contatando "
-
-#: ../gtk-glade/parameters.glade.h:11
-#, fuzzy
-msgid "<b>Transport</b>"
-msgstr "Contatando "
-
-#: ../gtk-glade/parameters.glade.h:12
-msgid "<b>Video</b>"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:13
-msgid "ALSA special device (optional):"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:14
-#, fuzzy
-msgid "Add"
-msgstr "Endereço"
-
-#: ../gtk-glade/parameters.glade.h:15
-msgid "Audio RTP/UDP:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:16
-#, fuzzy
-msgid ""
-"Audio codecs\n"
-"Video codecs"
-msgstr "Codec's de áudio"
-
-#: ../gtk-glade/parameters.glade.h:18
-msgid "Behind NAT / Firewall (specify gateway IP below)"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:19
-msgid "Behind NAT / Firewall (use STUN to resolve)"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:21
-msgid "CIF"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:22
-#, fuzzy
-msgid "Capture device:"
-msgstr "Dispositivo de captura de som:"
-
-#: ../gtk-glade/parameters.glade.h:23
-#, fuzzy
-msgid "Codecs"
-msgstr "Codec's de áudio"
-
-#: ../gtk-glade/parameters.glade.h:24
-msgid "Direct connection to the Internet"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:25
-msgid "Disable"
-msgstr "Desativar"
-
-#: ../gtk-glade/parameters.glade.h:26
-#, fuzzy
-msgid "Done"
-msgstr "Nenhum"
-
-#: ../gtk-glade/parameters.glade.h:27
-msgid "Download speed limit in Kbit/sec:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:28
-msgid "Edit"
-msgstr "Editar"
-
-#: ../gtk-glade/parameters.glade.h:29
-msgid "Enable"
-msgstr "Ativado"
-
-#: ../gtk-glade/parameters.glade.h:30
-msgid "Enable echo cancellation"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:31
-msgid "Erase all passwords"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:32
-msgid "Manage SIP Accounts"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:33
-msgid "Multimedia settings"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:34
-#, fuzzy
-msgid "Network settings"
-msgstr "Rede"
-
-#: ../gtk-glade/parameters.glade.h:35
-#, fuzzy
-msgid "Playback device:"
-msgstr "Dispositivo de som:"
-
-#: ../gtk-glade/parameters.glade.h:36
-msgid "Prefered video resolution:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:37
-#, fuzzy
-msgid "Public IP address:"
-msgstr "Endereço sip:"
-
-#: ../gtk-glade/parameters.glade.h:38
-msgid ""
-"Register to FONICS\n"
-"virtual network !"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:40
-msgid "Remove"
-msgstr "Remover"
-
-#: ../gtk-glade/parameters.glade.h:41
-#, fuzzy
-msgid "Ring device:"
-msgstr "Dispositivo de som"
-
-#: ../gtk-glade/parameters.glade.h:42
-#, fuzzy
-msgid "Ring sound:"
-msgstr "Som do toque:"
-
-#: ../gtk-glade/parameters.glade.h:43
-msgid "SIP (UDP):"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:44
-msgid "Send DTMFs as SIP info"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:45
-msgid "Set Maximum Transmission Unit:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:46
-msgid "Settings"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:47
-#, fuzzy
-msgid "Stun server:"
-msgstr "Dispositivo de som"
-
-#: ../gtk-glade/parameters.glade.h:48
-msgid "This section defines your SIP address when not using a SIP account"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:49
-msgid "Upload speed limit in Kbit/sec:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:50
-msgid "Use IPv6 instead of IPv4"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:51
-#, fuzzy
-msgid "User interface"
-msgstr "Usuário"
-
-#: ../gtk-glade/parameters.glade.h:52
-msgid "Video RTP/UDP:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:53
-#, fuzzy
-msgid "Video input device:"
-msgstr "Dispositivo de som"
-
-#: ../gtk-glade/parameters.glade.h:54
-msgid "Your display name (eg: John Doe):"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:55
-#, fuzzy
-msgid "Your resulting SIP address:"
-msgstr "Seu endereço SIP:"
-
-#: ../gtk-glade/parameters.glade.h:56
-#, fuzzy
-msgid "Your username:"
-msgstr "Usuário"
-
-#: ../gtk-glade/parameters.glade.h:57
-msgid "a sound card\n"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:59
-msgid "default camera"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:60
-msgid "default soundcard"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:61
-msgid "default soundcard\n"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:63
-msgid "gtk-go-down"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:64
-msgid "gtk-go-up"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:65
-msgid "gtk-media-play"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:1
-msgid "<b>Search somebody</b>"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:2
-msgid "Add to my list"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:3
-msgid "Search contacts in directory"
-msgstr ""
-
-#: ../gtk-glade/waiting.glade.h:1
-msgid "Linphone"
-msgstr ""
-
-#: ../gtk-glade/waiting.glade.h:2
-msgid "Please wait"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:195
-#, fuzzy, c-format
-msgid "You have missed %i call."
-msgid_plural "You have missed %i calls."
-msgstr[0] "Você perdeu %i ligação(ões)."
-msgstr[1] "Você perdeu %i ligação(ões)."
-
-#: ../coreapi/linphonecore.c:223
-msgid "aborted"
-msgstr "Abortado"
-
-#: ../coreapi/linphonecore.c:226
-msgid "completed"
-msgstr "Competado"
-
-#: ../coreapi/linphonecore.c:229
-msgid "missed"
-msgstr "Perdido"
-
-#: ../coreapi/linphonecore.c:234
-#, fuzzy, c-format
-msgid ""
-"%s at %s\n"
-"From: %s\n"
-"To: %s\n"
-"Status: %s\n"
-"Duration: %i mn %i sec\n"
-msgstr ""
-"%s em %sDe: %s\n"
-"Para: %s\n"
-"Status: %s\n"
-"Duração: %i min %i seg\n"
-
-#: ../coreapi/linphonecore.c:235
-msgid "Outgoing call"
-msgstr "Chamadas efetuadas"
-
-#: ../coreapi/linphonecore.c:445
-msgid ""
-"Your machine appears to be connected to an IPv6 network. By default linphone "
-"always uses IPv4. Please update your configuration if you want to use IPv6"
-msgstr ""
-"Sua máquina aparentemente está conectada em uma rede IPv6. Por padrão o "
-"linphone sempre usa IPv4. Por favor atualize sua configuração se deseja usar "
-"IPv6"
-
-#: ../coreapi/linphonecore.c:739
-#, fuzzy
-msgid "Ready"
-msgstr "Pronto."
-
-#: ../coreapi/linphonecore.c:1014
-msgid "Remote end seems to have disconnected, the call is going to be closed."
-msgstr ""
-
-#: ../coreapi/linphonecore.c:1172
-msgid "Looking for telephone number destination..."
-msgstr "Procurando por telefone de destino..."
-
-#: ../coreapi/linphonecore.c:1174
-msgid "Could not resolve this number."
-msgstr "Não foi possível encontrar este número."
-
-#: ../coreapi/linphonecore.c:1239
-msgid ""
-"Could not parse given sip address. A sip url usually looks like sip:"
-"user@domain"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:1340
-msgid "Sorry, having multiple simultaneous calls is not supported yet !"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:1387
-#, fuzzy
-msgid "Contacting"
-msgstr "Contatando "
-
-#: ../coreapi/linphonecore.c:1402
-msgid "could not call"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
-msgid "Connected."
-msgstr "Conectado."
-
-#: ../coreapi/linphonecore.c:1813
-#, fuzzy
-msgid "Call ended"
-msgstr "Chamada cancelada."
-
-#: ../coreapi/linphonecore.c:2175
-msgid "No nat/firewall address supplied !"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
-#, c-format
-msgid "Invalid nat address '%s' : %s"
-msgstr ""
-
-#: ../coreapi/misc.c:134
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the pcm oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-"'modprobe snd-pcm-oss' as root to load it."
-msgstr ""
-
-#: ../coreapi/misc.c:137
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the mixer oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-" 'modprobe snd-mixer-oss' as root to load it."
-msgstr ""
-
-#: ../coreapi/misc.c:610
-msgid "Stun lookup in progress..."
-msgstr ""
-
-#: ../coreapi/exevents.c:127
-msgid "Call terminated."
-msgstr ""
-
-#: ../coreapi/exevents.c:149
-msgid "Could not reach destination."
-msgstr "Não foi possível alcançar o detino."
-
-#: ../coreapi/exevents.c:158
-msgid "User is busy."
-msgstr "Usuário está ocupado."
-
-#: ../coreapi/exevents.c:159
-msgid "User is temporarily unavailable."
-msgstr "Usuário está temporáriamente indisponível."
-
-#: ../coreapi/exevents.c:160
-msgid "Request Cancelled."
-msgstr "Pedido cancelado."
-
-#. char *retrymsg=_("%s. Retry after %i minute(s).");
-#: ../coreapi/exevents.c:162
-msgid "User does not want to be disturbed."
-msgstr ""
-
-#: ../coreapi/exevents.c:163
-msgid "Call declined."
-msgstr ""
-
-#: ../coreapi/exevents.c:191
-msgid "Bad request"
-msgstr ""
-
-#: ../coreapi/exevents.c:194
-msgid "User cannot be found at given address."
-msgstr "Usuário não pode ser encontrado no endereço especificado."
-
-#: ../coreapi/exevents.c:197
-msgid "Remote user cannot support any of proposed codecs."
-msgstr ""
-
-#. time out, call leg is lost
-#: ../coreapi/exevents.c:227
-msgid "Timeout."
-msgstr "Tempo esgotado."
-
-#: ../coreapi/exevents.c:230
-msgid "Remote host was found but refused connection."
-msgstr "Servidor de destino encontrado, porém recusou a conexão."
-
-#: ../coreapi/exevents.c:339
-#, fuzzy
-msgid "is contacting you."
-msgstr "está chamado você."
-
-#: ../coreapi/exevents.c:424
-#, c-format
-msgid "Redirected to %s..."
-msgstr "Redirecionado para %s..."
-
-#: ../coreapi/exevents.c:440
-msgid ""
-"User is not reachable at the moment but he invites you\n"
-"to contact him using the following alternate resource:"
-msgstr ""
-
-#: ../coreapi/exevents.c:861
-msgid "Early media."
-msgstr ""
-
-#: ../coreapi/exevents.c:972
-#, fuzzy, c-format
-msgid "Registration on %s failed: %s"
-msgstr "Registro falhou (tempo esgotado)."
-
-#: ../coreapi/exevents.c:972
-msgid "no response timeout"
-msgstr ""
-
-#: ../coreapi/exevents.c:998
-#, fuzzy, c-format
-msgid "Registration on %s successful."
-msgstr "Registro em %s efetuado."
-
-#: ../coreapi/exevents.c:999
-#, fuzzy, c-format
-msgid "Unregistration on %s done."
-msgstr "Registro em %s efetuado."
-
-#. people for which we don't have yet an answer should appear as offline
-#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
-#, fuzzy
-msgid "Gone"
-msgstr "Nenhum"
-
-#: ../coreapi/presence.c:129
-msgid "Waiting for Approval"
-msgstr ""
-
-#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
-#, fuzzy
-msgid "Online"
-msgstr "linha"
-
-#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
-msgid "Busy"
-msgstr ""
-
-#: ../coreapi/presence.c:142
-msgid "Be Right Back"
-msgstr ""
-
-#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
-msgid "Away"
-msgstr "Ocupado"
-
-#: ../coreapi/presence.c:151
-msgid "On The Phone"
-msgstr ""
-
-#: ../coreapi/presence.c:156
-msgid "Out To Lunch"
-msgstr ""
-
-#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
-msgid "Closed"
-msgstr ""
-
-#: ../coreapi/friend.c:35
-msgid "Unknown"
-msgstr ""
-
-#: ../coreapi/friend.c:44
-msgid "Be right back"
-msgstr ""
-
-#: ../coreapi/friend.c:50
-msgid "On the phone"
-msgstr ""
-
-#: ../coreapi/friend.c:53
-msgid "Out to lunch"
-msgstr ""
-
-#: ../coreapi/friend.c:56
-msgid "Do not disturb"
-msgstr "Não perturbe"
-
-#: ../coreapi/friend.c:59
-msgid "Moved"
-msgstr ""
-
-#: ../coreapi/friend.c:62
-msgid "Using another messaging service"
-msgstr ""
-
-#: ../coreapi/friend.c:65
-#, fuzzy
-msgid "Offline"
-msgstr "linha"
-
-#: ../coreapi/friend.c:68
-msgid "Pending"
-msgstr ""
-
-#: ../coreapi/friend.c:74
-msgid "Unknown-bug"
-msgstr ""
-
-#: ../coreapi/proxy.c:221
-msgid ""
-"The sip proxy address you entered is invalid, it must start with \"sip:\" "
-"followed by a hostname."
-msgstr ""
-
-#: ../coreapi/proxy.c:227
-msgid ""
-"The sip identity you entered is invalid.\n"
-"It should look like sip:username@proxydomain, such as sip:alice@example.net"
-msgstr ""
-
-#: ../coreapi/proxy.c:634
-#, fuzzy, c-format
-msgid "Could not login as %s"
-msgstr "Não é possível achar arquivo pixmap: %s"
-
-#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
-msgid "ITU-G.711 alaw encoder"
-msgstr ""
-
-#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
-msgid "ITU-G.711 alaw decoder"
-msgstr ""
-
-#: ../mediastreamer2/src/alsa.c:923
-msgid "Alsa sound source"
-msgstr ""
-
-#: ../mediastreamer2/src/alsa.c:1027
-msgid "Alsa sound output"
-msgstr ""
-
-#: ../mediastreamer2/src/aqsnd.c:891
-msgid "Sound capture filter for MacOS X Audio Queue Service"
-msgstr ""
-
-#: ../mediastreamer2/src/aqsnd.c:915
-msgid "Sound playback filter for MacOS X Audio Queue Service"
-msgstr ""
-
-#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
-msgid "DTMF generator"
-msgstr ""
-
-#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
-msgid "The GSM full-rate codec"
-msgstr ""
-
-#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
-msgid "The GSM codec"
-msgstr ""
-
-#: ../mediastreamer2/src/macsnd.c:670
-msgid "Sound capture filter for MacOS X Core Audio drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/macsnd.c:684
-msgid "Sound playback filter for MacOS X Core Audio drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
-msgid "A filter to make conferencing"
-msgstr ""
-
-#: ../mediastreamer2/src/msfileplayer.c:295
-#: ../mediastreamer2/src/msfileplayer.c:313
-msgid "Raw files and wav reader"
-msgstr ""
-
-#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
-#: ../mediastreamer2/src/msfilerec_win.c:216
-#: ../mediastreamer2/src/msfilerec_win.c:234
-msgid "Wav file recorder"
-msgstr ""
-
-#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
-msgid "A filter that send several inputs to one output."
-msgstr ""
-
-#: ../mediastreamer2/src/msresample.c:221
-#: ../mediastreamer2/src/msresample.c:239
-msgid "frequency resampler"
-msgstr ""
-
-#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
-msgid "RTP output filter"
-msgstr ""
-
-#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
-msgid "RTP input filter"
-msgstr ""
-
-#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
-#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
-msgid "The free and wonderful speex codec"
-msgstr ""
-
-#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
-msgid "A filter that controls and measure sound volume"
-msgstr ""
-
-#: ../mediastreamer2/src/msv4l.c:1009
-msgid "A video4linux compatible source filter to stream pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/msv4l2.c:458
-msgid "A filter to grab pictures from Video4Linux2-powered cameras"
-msgstr ""
-
-#: ../mediastreamer2/src/nowebcam.c:1780
-msgid "A filter that outputs a static image."
-msgstr ""
-
-#: ../mediastreamer2/src/oss.c:567
-msgid "Sound capture filter for OSS drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/oss.c:581
-msgid "Sound playback filter for OSS drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
-msgid "A pixel format converter"
-msgstr ""
-
-#: ../mediastreamer2/src/sizeconv.c:204
-msgid "A video size converter"
-msgstr ""
-
-#: ../mediastreamer2/src/sizeconv.c:222
-msgid "a small video size converter"
-msgstr ""
-
-#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
-msgid "Echo canceler using speex library"
-msgstr ""
-
-#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
-msgid "A filter that reads from input and copy to its multiple outputs."
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:375
-msgid "The theora video encoder from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:393
-msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
-msgid "The theora video decoder from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
-msgid "ITU-G.711 ulaw encoder"
-msgstr ""
-
-#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
-msgid "ITU-G.711 ulaw decoder"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
-#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
-msgid "A H.263 decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:688
-msgid "A MPEG4 decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:704
-msgid "A RTP/JPEG decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:720
-msgid "A MJPEG decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:736
-msgid "A snow decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
-msgid "A video H.263 encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:856
-msgid ""
-"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
-"spec."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
-msgid "A video MPEG4 encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:888
-msgid "A video snow encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:904
-msgid "A RTP/MJPEG encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:938
-msgid ""
-"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:970
-msgid ""
-"The snow codec is royalty-free and is open-source. \n"
-"It uses innovative techniques that makes it one of most promising video "
-"codec. It is implemented within the ffmpeg project.\n"
-"However it is under development, quite unstable and compatibility with other "
-"versions cannot be guaranteed."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:990
-msgid "A MJPEG encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
-msgid "A generic video display"
-msgstr ""
-
-#: ../mediastreamer2/src/wincevideods.c:966
-#: ../mediastreamer2/src/wincevideods.c:984
-#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
-#: ../mediastreamer2/src/winvideods.c:1306
-#: ../mediastreamer2/src/winvideods.c:1324
-msgid "A video4windows compatible source filter to stream pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
-msgid "A video for windows (vfw.h) based source filter to grab pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
-msgid "ICE filter"
-msgstr ""
-
-#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
-msgid "A filter that trashes its input (useful for terminating some graphs)."
-msgstr ""
-
-#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
-msgid "Parametric sound equalizer."
-msgstr ""
-
-#: ../mediastreamer2/src/msdscap-mingw.cc:1003
-msgid "A webcam grabber based on directshow."
-msgstr ""
-
-#, fuzzy
-#~ msgid "_Properties"
-#~ msgstr "Propriedades RTP:"
-
-#, fuzzy
-#~ msgid "Show logs"
-#~ msgstr "Exibir chamadas"
-
-#, fuzzy
-#~ msgid "_About"
-#~ msgstr "Aceitar"
-
-#, fuzzy
-#~ msgid "gtk-remove"
-#~ msgstr "Remover"
-
-#, fuzzy
-#~ msgid "Proxy in use"
-#~ msgstr "Proxy à usar:"
-
-#~ msgid "Sound"
-#~ msgstr "Som"
-
-#, fuzzy
-#~ msgid "Default identity"
-#~ msgstr "Identificação SIP:"
-
-#, fuzzy
-#~ msgid "Proxy accounts"
-#~ msgstr "Proxy à usar:"
-
-#~ msgid "Go"
-#~ msgstr "Ir"
-
-#~ msgid "Address book"
-#~ msgstr "Catálogo de endereços"
-
-#, fuzzy
-#~ msgid "Exit"
-#~ msgstr "Editar"
-
-#~ msgid "Shows the address book"
-#~ msgstr "Exibe o catálogo de endereços"
-
-#~ msgid ""
-#~ "Call or\n"
-#~ "answer"
-#~ msgstr ""
-#~ "Ligar ou\n"
-#~ "atender"
-
-#~ msgid ""
-#~ "Hangup\n"
-#~ "or refuse"
-#~ msgstr ""
-#~ "Desligar\n"
-#~ "ou recusar"
-
-#~ msgid "Or chat !"
-#~ msgstr "Ou bate-papo!"
-
-#~ msgid "Show more..."
-#~ msgstr "Exibir mais..."
-
-#~ msgid "Playback level:"
-#~ msgstr "Volume do auto-falante:"
-
-#~ msgid "Recording level:"
-#~ msgstr "Volume do microfone:"
-
-#, fuzzy
-#~ msgid "Ring level:"
-#~ msgstr "Volume do microfone:"
-
-#~ msgid "Busy, I'll be back in "
-#~ msgstr "Ocupado, volto em "
-
-#~ msgid "mn"
-#~ msgstr "min"
-
-#~ msgid "Moved temporarily"
-#~ msgstr "Movido temporáriamente"
-
-#~ msgid "Alternative service"
-#~ msgstr "Serviço alternativo"
-
-#~ msgid "Presence"
-#~ msgstr "Presença"
-
-#~ msgid "My online friends"
-#~ msgstr "Meus amigos online"
-
-#~ msgid ""
-#~ "Linphone is a web-phone.\n"
-#~ "It is compatible with SIP and RTP protocols."
-#~ msgstr ""
-#~ "Linphone é um web-fone.\n"
-#~ "Ele é compatível com os protocolos SIP e RTP."
-
-#~ msgid "Use IPv6 network (if available)"
-#~ msgstr "Usar rede IPv6 (se disponível)"
-
-#~ msgid ""
-#~ "Toggle this if you are on an ipv6 network and you wish linphone to use it."
-#~ msgstr ""
-#~ "Marque isto se você estiver em uma rede IPv6, e deseja que o linphone "
-#~ "este protocolo."
-
-#, fuzzy
-#~ msgid ""
-#~ "These options is only for users in a private network, behind a gateway. "
-#~ "If you are not in this situation, then leave this empty."
-#~ msgstr ""
-#~ "Esta opção é somente para usuários de uma rede privada, atrás de um "
-#~ "gateway. Se você não está nesta situação, deixe isto em braco."
-
-#~ msgid "NAT traversal options (experimental)"
-#~ msgstr "Opções de NAT(Experimental)"
-
-#~ msgid "Number of buffered miliseconds (jitter compensation):"
-#~ msgstr "Número de segundos em bueffer:"
-
-#~ msgid "RTP port used for audio:"
-#~ msgstr "Porta RTP usada para audio:"
-
-#~ msgid "Use SIP INFO message instead of RTP rfc2833 for DTMF transmitting"
-#~ msgstr ""
-#~ "Usar mensagem SIP INFO em vez de RTP rfc2833 para transmissão de DTMF"
-
-#~ msgid "RTP-RFC2833 is the recommended way."
-#~ msgstr "RTP-RFC2833 é a maneira recomendada."
-
-#~ msgid "Other"
-#~ msgstr "Outro"
-
-#~ msgid "micro"
-#~ msgstr "microfone"
-
-#~ msgid "Recording source:"
-#~ msgstr "Origem de gravação:"
-
-#~ msgid "Listen"
-#~ msgstr "Escutar"
-
-#~ msgid "Sound properties"
-#~ msgstr "Propriedades de som"
-
-#~ msgid "Run sip user agent on port:"
-#~ msgstr "Executar agente sip na porta:"
-
-#~ msgid "It is strongly recommended to use port 5060."
-#~ msgstr "É altamente recomendavel usar a porta 5060."
-
-#~ msgid "SIP port"
-#~ msgstr "Porta SIP"
-
-#~ msgid "Identity"
-#~ msgstr "Identificação"
-
-#~ msgid "Add proxy/registrar"
-#~ msgstr "Adicionar proxy/registrador"
-
-#~ msgid "Remote services"
-#~ msgstr "Serviços remotos"
-
-#~ msgid "Clear all stored authentication information (username,password...)"
-#~ msgstr ""
-#~ "Limpar todas as informações de autenticação (nomes de usuário, senha...)"
-
-#~ msgid "Authentication information"
-#~ msgstr "Informações de autenticação"
-
-#~ msgid "List of audio codecs, in order of preference:"
-#~ msgstr "Lista de codecs de audio, em ordem de preferência:"
-
-#~ msgid "No information availlable"
-#~ msgstr "Informações não disponíveis"
-
-#~ msgid "Codec information"
-#~ msgstr "Informações sobre o codec"
-
-#~ msgid "Address Book"
-#~ msgstr "Catálogo de endereços"
-
-#~ msgid "Select"
-#~ msgstr "Selecionar"
-
-#~ msgid "None."
-#~ msgstr "Nenhum"
-
-#~ msgid "Proxy/Registrar configuration box"
-#~ msgstr "Configuração de proxy/registrador"
-
-#~ msgid "Send registration:"
-#~ msgstr "Enviar registro:"
-
-#~ msgid "Name:"
-#~ msgstr "Nome:"
-
-#~ msgid "Refuse"
-#~ msgstr "Recusar"
-
-#~ msgid "userid:"
-#~ msgstr "Identificação:"
-
-#~ msgid "Chat Room"
-#~ msgstr "Sala de bate-papo"
-
-#~ msgid "Text:"
-#~ msgstr "Texto:"
-
-#~ msgid "linphone - receiving call from %s"
-#~ msgstr "Linphone - Recebendo chamada de %s"
-
-#~ msgid "None"
-#~ msgstr "Nenhum"
-
-#~ msgid "User manual"
-#~ msgstr "Manual do usuário"
-
-#~ msgid "Ring sound selection"
-#~ msgstr "Seleção de toque"
-
-#~ msgid "Communication ended."
-#~ msgstr "Comunicação encerrada."
-
-#~ msgid "Firewall 's external ip address (in dot notations):"
-#~ msgstr "Endereço externo do firewall:"
-
-#~ msgid "Index"
-#~ msgstr "Índice"
-
-#~ msgid "Server address"
-#~ msgstr "Endereço do servidor"
-
-#~ msgid "28k modem"
-#~ msgstr "Modem 28k"
-
-#~ msgid "56k modem"
-#~ msgstr "Modem 56l"
-
-#~ msgid "64k modem (numeris)"
-#~ msgstr "Modem 64k"
-
-#~ msgid "ADSL or Cable modem"
-#~ msgstr "ADSL ou Cable modem"
-
-#~ msgid "Ethernet or equivalent"
-#~ msgstr "Ethernet ou equivalente"
-
-#~ msgid "Connection type:"
-#~ msgstr "Tipo de conexão:"
-
-#~ msgid ""
-#~ "Linphone could not open audio device %s. Check if your sound card is "
-#~ "fully configured and working."
-#~ msgstr ""
-#~ "Linphone não pode abrir dispositivo de áudio %s. Verifique se sua placa "
-#~ "de som está configurada e funcionando."
-
-#~ msgid "Type here the sip address of the person you want to call."
-#~ msgstr "Escreva aqui o endereço sip da pessoa que você quer ligar."
diff --git a/linphone/po/quot.sed b/linphone/po/quot.sed
deleted file mode 100644 (file)
index 0122c46..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-s/"\([^"]*\)"/“\1”/g
-s/`\([^`']*\)'/‘\1’/g
-s/ '\([^`']*\)' / ‘\1’ /g
-s/ '\([^`']*\)'$/ ‘\1’/g
-s/^'\([^`']*\)' /‘\1’ /g
-s/“”/""/g
diff --git a/linphone/po/remove-potcdate.sin b/linphone/po/remove-potcdate.sin
deleted file mode 100644 (file)
index 2436c49..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-# Sed script that remove the POT-Creation-Date line in the header entry
-# from a POT file.
-#
-# The distinction between the first and the following occurrences of the
-# pattern is achieved by looking at the hold space.
-/^"POT-Creation-Date: .*"$/{
-x
-# Test if the hold space is empty.
-s/P/P/
-ta
-# Yes it was empty. First occurrence. Remove the line.
-g
-d
-bb
-:a
-# The hold space was nonempty. Following occurrences. Do nothing.
-x
-:b
-}
diff --git a/linphone/po/ru.po b/linphone/po/ru.po
deleted file mode 100644 (file)
index 669a5a9..0000000
+++ /dev/null
@@ -1,2266 +0,0 @@
-# SIP Telephony Application.
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-# Simon Morlat <linphone@free.fr>, 2001.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: linphone 0.7.1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-10-16 15:24+0200\n"
-"PO-Revision-Date: 2008-11-25 18:39+0300\n"
-"Last-Translator: Grigory Fateyev <greg@dial.com.ru>\n"
-"Language-Team: Russian <greg@dial.com.ru>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
-#: ../gtk-glade/support.c:102
-#, c-format
-msgid "Couldn't find pixmap file: %s"
-msgstr "Невозможно найти картинку: %s"
-
-#: ../gtk-glade/chat.c:27
-#, c-format
-msgid "Chat with %s"
-msgstr "Чат с %s"
-
-#: ../gtk-glade/main.c:90
-msgid "log to stdout some debug information while running."
-msgstr ""
-
-#: ../gtk-glade/main.c:97
-msgid "Start only in the system tray, do not show the main interface."
-msgstr ""
-
-#: ../gtk-glade/main.c:104
-msgid "address to call right now"
-msgstr ""
-
-#: ../gtk-glade/main.c:111
-msgid "if set automatically answer incoming calls"
-msgstr ""
-
-#: ../gtk-glade/main.c:119
-msgid ""
-"Specifiy a working directory (should be the base of the installation, eg: c:"
-"\\Program Files\\Linphone)"
-msgstr ""
-
-#: ../gtk-glade/main.c:675
-#, c-format
-msgid "Incoming call from %s"
-msgstr "Входящий звонок %s"
-
-#: ../gtk-glade/main.c:707
-#, c-format
-msgid ""
-"%s would like to add you to his contact list.\n"
-"Would you allow him to see your presence status or add him to your contact "
-"list ?\n"
-"If you answer no, this person will be temporarily blacklisted."
-msgstr ""
-"%s вы бы хотели быть добавленным в этот контактный лист.\n"
-"Вы разрешаете ему(ей) видеть ваш статус присутствия или добавить в "
-"контактный лист?\n"
-"Если вы ответите Нет, эта персона будет временно заблокированна."
-
-#: ../gtk-glade/main.c:777
-#, fuzzy, c-format
-msgid ""
-"Please enter your password for username <i>%s</i>\n"
-" at domain <i>%s</i>:"
-msgstr "Пожалуйста, введите пароль для домена %s:"
-
-#: ../gtk-glade/main.c:871
-msgid "Website link"
-msgstr ""
-
-#: ../gtk-glade/main.c:907
-msgid "Linphone - a video internet phone"
-msgstr "Linphone - Интернет видео телефон"
-
-#: ../gtk-glade/main.c:926
-#, c-format
-msgid "%s (Default)"
-msgstr "%s (По умолчанию)"
-
-#: ../gtk-glade/main.c:1168
-msgid "A free SIP video-phone"
-msgstr "Свободный SIP видео-телефон"
-
-#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
-#: ../gtk-glade/contact.glade.h:3
-msgid "Name"
-msgstr "Имя"
-
-#: ../gtk-glade/friendlist.c:212
-msgid "Presence status"
-msgstr "Статус присутствия"
-
-#: ../gtk-glade/friendlist.c:243
-#, c-format
-msgid "Search in %s directory"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:432
-msgid "Invalid sip contact !"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:474
-#, c-format
-msgid "Call %s"
-msgstr "Звонк %s"
-
-#: ../gtk-glade/friendlist.c:475
-#, c-format
-msgid "Send text to %s"
-msgstr "Послать текст к %s"
-
-#: ../gtk-glade/friendlist.c:476
-#, fuzzy, c-format
-msgid "Edit contact '%s'"
-msgstr "Редактировать контактную информацию"
-
-#: ../gtk-glade/friendlist.c:477
-#, c-format
-msgid "Delete contact '%s'"
-msgstr ""
-
-#: ../gtk-glade/friendlist.c:519
-#, c-format
-msgid "Add new contact from %s directory"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:251
-msgid "Rate (Hz)"
-msgstr "Частота (Hz)"
-
-#: ../gtk-glade/propertybox.c:257
-msgid "Status"
-msgstr "Статус"
-
-#: ../gtk-glade/propertybox.c:263
-msgid "Min bitrate (kbit/s)"
-msgstr "Минимальный битрейт (kbit/s)"
-
-#: ../gtk-glade/propertybox.c:269
-msgid "Parameters"
-msgstr "Параметры"
-
-#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
-msgid "Enabled"
-msgstr "Включить"
-
-#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
-msgid "Disabled"
-msgstr "Выключить"
-
-#: ../gtk-glade/propertybox.c:480
-msgid "Account"
-msgstr "Аккаунт"
-
-#: ../gtk-glade/propertybox.c:620
-msgid "English"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:621
-msgid "French"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:622
-msgid "Swedish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:623
-msgid "Italian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:624
-msgid "Spanish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:625
-msgid "Brazilian Portugese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:626
-msgid "Polish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:627
-msgid "German"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:628
-msgid "Russian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:629
-msgid "Japanese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:630
-msgid "Dutch"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:631
-msgid "Hungarian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:632
-msgid "Czech"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:633
-msgid "Chinese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:690
-msgid ""
-"You need to restart linphone for the new language selection to take effect."
-msgstr ""
-
-#: ../gtk-glade/update.c:80
-#, c-format
-msgid ""
-"A more recent version is availalble from %s.\n"
-"Would you like to open a browser to download it ?"
-msgstr ""
-
-#: ../gtk-glade/update.c:91
-msgid "You are running the lastest version."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:66
-msgid "Firstname, Lastname"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:73
-#, fuzzy
-msgid "SIP address"
-msgstr "SIP Адрес"
-
-#: ../gtk-glade/buddylookup.c:121
-msgid "Error communicating with server."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:125
-#, fuzzy
-msgid "Connecting..."
-msgstr "Verbindung"
-
-#: ../gtk-glade/buddylookup.c:129
-#, fuzzy
-msgid "Connected"
-msgstr "Соединён."
-
-#: ../gtk-glade/buddylookup.c:133
-msgid "Receiving data..."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:141
-#, c-format
-msgid "Found %i contact"
-msgid_plural "Found %i contacts"
-msgstr[0] ""
-msgstr[1] ""
-
-#: ../gtk-glade/setupwizard.c:25
-msgid ""
-"Welcome !\n"
-"This assistant will help you to use a SIP account for your calls."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:34
-msgid "Create an account by choosing a username"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:35
-msgid "I have already an account and just want to use it"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:53
-msgid "Please choose a username:"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:54
-#, fuzzy
-msgid "Username:"
-msgstr "Имя пользователя:"
-
-#: ../gtk-glade/setupwizard.c:92
-#, c-format
-msgid "Checking if '%s' is available..."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
-msgid "Please wait..."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:101
-msgid "Sorry this username already exists. Please try a new one."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
-msgid "Ok !"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
-msgid "Communication problem, please try again later."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:134
-msgid "Thank you. Your account is now configured and ready for use."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:228
-msgid "Welcome to the account setup assistant"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:232
-msgid "Account setup assistant"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:236
-#, fuzzy
-msgid "Choosing a username"
-msgstr "Ваше имя пользователя:"
-
-#: ../gtk-glade/setupwizard.c:240
-msgid "Verifying"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:244
-#, fuzzy
-msgid "Confirmation"
-msgstr "Информация"
-
-#: ../gtk-glade/setupwizard.c:249
-msgid "Creating your account"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:253
-msgid "Now ready !"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:98
-#, fuzzy
-msgid "<b>Calling...</b>"
-msgstr "<b>IPv6 использовать</b>"
-
-#: ../gtk-glade/incall_view.c:122
-#, fuzzy
-msgid "<b>In call with</b>"
-msgstr "Прервать звонок"
-
-#: ../gtk-glade/incall_view.c:124
-msgid "00::00::00"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:140
-#, c-format
-msgid "%02i::%02i::%02i"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:158
-#, fuzzy
-msgid "<b>Call ended.</b>"
-msgstr "Разговор окончен"
-
-#: ../gtk-glade/incall_view.c:176
-#, fuzzy
-msgid "Unmute"
-msgstr "Безлимитный"
-
-#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
-msgid "Mute"
-msgstr ""
-
-#: ../gtk-glade/loginframe.c:82
-#, fuzzy, c-format
-msgid "Please enter login information for %s"
-msgstr "Пожалуйста, введите пароль для домена %s:"
-
-#: ../gtk-glade/main.glade.h:1
-msgid "#"
-msgstr "#"
-
-#: ../gtk-glade/main.glade.h:2
-msgid "*"
-msgstr "*"
-
-#: ../gtk-glade/main.glade.h:3
-msgid "0"
-msgstr "0"
-
-#: ../gtk-glade/main.glade.h:4
-msgid "1"
-msgstr "1"
-
-#: ../gtk-glade/main.glade.h:5
-msgid "2"
-msgstr "2"
-
-#: ../gtk-glade/main.glade.h:6
-msgid "3"
-msgstr "3"
-
-#: ../gtk-glade/main.glade.h:7
-msgid "4"
-msgstr "4"
-
-#: ../gtk-glade/main.glade.h:8
-msgid "5"
-msgstr "5"
-
-#: ../gtk-glade/main.glade.h:9
-msgid "6"
-msgstr "6"
-
-#: ../gtk-glade/main.glade.h:10
-msgid "7"
-msgstr "7"
-
-#: ../gtk-glade/main.glade.h:11
-msgid "8"
-msgstr "8"
-
-#: ../gtk-glade/main.glade.h:12
-msgid "9"
-msgstr "9"
-
-#: ../gtk-glade/main.glade.h:13
-msgid "<b>Contact list</b>"
-msgstr "<b>Контактный лист</b>"
-
-#: ../gtk-glade/main.glade.h:14
-#, fuzzy
-msgid "<b>Terminate call</b>"
-msgstr "Прервать звонок"
-
-#: ../gtk-glade/main.glade.h:15
-#, fuzzy
-msgid "<b>Welcome !</b>"
-msgstr "<b>Видео</b>"
-
-#: ../gtk-glade/main.glade.h:16
-msgid "A"
-msgstr "А"
-
-#: ../gtk-glade/main.glade.h:17
-msgid ""
-"ADSL\n"
-"Fiber Channel"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:19
-msgid ""
-"All users\n"
-"Online users"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:21
-msgid "Assistant"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:22
-msgid "Audio & Video"
-msgstr "Аудио & Видео"
-
-#: ../gtk-glade/main.glade.h:23
-msgid "Audio only"
-msgstr "Только аудио"
-
-#: ../gtk-glade/main.glade.h:24
-#, fuzzy
-msgid "Automatically log me in"
-msgstr "Автоматически определить верный hostname"
-
-#: ../gtk-glade/main.glade.h:25
-msgid "B"
-msgstr "Б"
-
-#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
-msgid "C"
-msgstr "В"
-
-#: ../gtk-glade/main.glade.h:27
-msgid "Check for updates"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:28
-msgid "D"
-msgstr "Г"
-
-#: ../gtk-glade/main.glade.h:29
-msgid "Default"
-msgstr "По умолчанию"
-
-#: ../gtk-glade/main.glade.h:30
-msgid "Digits"
-msgstr "Цифры"
-
-#: ../gtk-glade/main.glade.h:31
-#, fuzzy
-msgid "Duration"
-msgstr "Информация"
-
-#: ../gtk-glade/main.glade.h:32
-#, fuzzy
-msgid "Duration:"
-msgstr "Информация"
-
-#: ../gtk-glade/main.glade.h:33
-#, fuzzy
-msgid "Enable self-view"
-msgstr "Включить видео"
-
-#: ../gtk-glade/main.glade.h:34
-msgid "Enter username, phone number, or full sip address"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:35
-#, fuzzy
-msgid "In call"
-msgstr "Входящие звонки"
-
-#: ../gtk-glade/main.glade.h:36
-msgid "Internet connection:"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:37
-#, fuzzy
-msgid "Login information"
-msgstr "Контактная информация"
-
-#: ../gtk-glade/main.glade.h:38
-msgid "Lookup:"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:39
-msgid "Main view"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:41
-#, fuzzy
-msgid "My current identity:"
-msgstr "Мой идентификатор:"
-
-#: ../gtk-glade/main.glade.h:42
-#, fuzzy
-msgid "Password"
-msgstr "Пароль"
-
-#: ../gtk-glade/main.glade.h:43
-#, fuzzy
-msgid "SIP address or phone number:"
-msgstr "Введите sip адрес или телефонный номер."
-
-#: ../gtk-glade/main.glade.h:44
-#, fuzzy
-msgid "Show current call"
-msgstr "Текущий звонок"
-
-#: ../gtk-glade/main.glade.h:45
-msgid "Start call"
-msgstr "Позвонить"
-
-#: ../gtk-glade/main.glade.h:46
-msgid "Terminate call"
-msgstr "Прервать звонок"
-
-#: ../gtk-glade/main.glade.h:47
-#, fuzzy
-msgid "Username"
-msgstr "Имя пользователя:"
-
-#: ../gtk-glade/main.glade.h:48
-#, fuzzy
-msgid "_Linphone"
-msgstr "Linphone"
-
-#: ../gtk-glade/main.glade.h:49
-msgid "_Modes"
-msgstr "_Режимы"
-
-#: ../gtk-glade/main.glade.h:50
-#, fuzzy
-msgid "gtk-connect"
-msgstr "Закрыть"
-
-#: ../gtk-glade/main.glade.h:51
-#, fuzzy
-msgid "gtk-find"
-msgstr "Выход"
-
-#: ../gtk-glade/main.glade.h:52
-msgid "in"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:53
-#, fuzzy
-msgid "label"
-msgstr "label37"
-
-#: ../gtk-glade/about.glade.h:1
-msgid "About linphone"
-msgstr "Про linphone"
-
-#: ../gtk-glade/about.glade.h:2
-msgid "An internet video phone using the standart SIP (rfc3261) protocol."
-msgstr "Интернет видео телефон использующий стандарт SIP (rfc3261) протокола."
-
-#: ../gtk-glade/about.glade.h:3
-msgid "Created by Simon Morlat\n"
-msgstr "Создан Simon Morlat\n"
-
-#: ../gtk-glade/about.glade.h:5
-msgid ""
-"fr: Simon Morlat\n"
-"en: Simon Morlat and Delphine Perreau\n"
-"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
-"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
-"sv: Daniel Nylander <po@danielnylander.se>\n"
-"es: Jesus Benitez <gnelson at inMail dot sk>\n"
-"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
-"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
-"pl: Robert Nasiadek <darkone@darkone.pl>\n"
-"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
-"hu: anonymous\n"
-msgstr ""
-"fr: Simon Morlat\n"
-"en: Simon Morlat and Delphine Perreau\n"
-"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
-"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
-"sv: Daniel Nylander <po@danielnylander.se>\n"
-"es: Jesus Benitez <gnelson at inMail dot sk>\n"
-"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
-"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
-"pl: Robert Nasiadek <darkone@darkone.pl>\n"
-"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
-"hu: anonymous\n"
-
-#: ../gtk-glade/contact.glade.h:1
-#, fuzzy
-msgid "<b>Contact information</b>"
-msgstr "Контактная информация"
-
-#: ../gtk-glade/contact.glade.h:2
-msgid "Allow this contact to see my presence status"
-msgstr "Разрешить этому контакту видеть мой статус присутствия"
-
-#: ../gtk-glade/contact.glade.h:4
-msgid "SIP Address"
-msgstr "SIP Адрес"
-
-#: ../gtk-glade/contact.glade.h:5
-msgid "Show this contact presence status"
-msgstr "Показывать этому контакту статус присутствия"
-
-#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
-#: ../gtk-glade/sip_account.glade.h:9
-msgid "gtk-cancel"
-msgstr "Выход"
-
-#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
-#: ../gtk-glade/sip_account.glade.h:10
-msgid "gtk-ok"
-msgstr "Ок"
-
-#: ../gtk-glade/log.glade.h:1
-msgid "Linphone debug window"
-msgstr "Linphone окно ошибок"
-
-#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
-#: ../gtk-glade/chatroom.glade.h:2
-msgid "gtk-close"
-msgstr "Закрыть"
-
-#: ../gtk-glade/password.glade.h:1
-msgid "Linphone - Authentication required"
-msgstr "Linphone - Регистрация необходима"
-
-#: ../gtk-glade/password.glade.h:2
-msgid "Password:"
-msgstr "Пароль"
-
-#: ../gtk-glade/password.glade.h:3
-#, fuzzy
-msgid "Please enter the domain password"
-msgstr "Пожалуйста, введите свой паспорт для домена..."
-
-#: ../gtk-glade/password.glade.h:4
-msgid "UserID"
-msgstr ""
-
-#: ../gtk-glade/call_logs.glade.h:1
-msgid "Call history"
-msgstr "История звонков"
-
-#: ../gtk-glade/sip_account.glade.h:1
-msgid "Configure a SIP account"
-msgstr "Настроить SIP аккаунт"
-
-#: ../gtk-glade/sip_account.glade.h:2
-msgid "Linphone - Configure a SIP account"
-msgstr "Linphone - Настроить SIP аккаунт"
-
-#: ../gtk-glade/sip_account.glade.h:3
-msgid "Publish presence information"
-msgstr "Показывать статус присутствия"
-
-#: ../gtk-glade/sip_account.glade.h:4
-msgid "Register at startup"
-msgstr "Регистрировать при старте"
-
-#: ../gtk-glade/sip_account.glade.h:5
-#, fuzzy
-msgid "Registration duration (sec):"
-msgstr "Период регистрации (сек):"
-
-#: ../gtk-glade/sip_account.glade.h:6
-msgid "Route (optional):"
-msgstr "Маршрут (необязательно):"
-
-#: ../gtk-glade/sip_account.glade.h:7
-msgid "SIP Proxy address:"
-msgstr "Адрес SIP прокси:"
-
-#: ../gtk-glade/sip_account.glade.h:8
-msgid "Your SIP identity:"
-msgstr "Ваш SIP идентификатор:"
-
-#: ../gtk-glade/sip_account.glade.h:11
-msgid "sip:"
-msgstr "sip:"
-
-#: ../gtk-glade/chatroom.glade.h:1
-msgid "Send"
-msgstr "Отправить"
-
-#: ../gtk-glade/incoming_call.glade.h:1
-msgid "Accept"
-msgstr "Принять"
-
-#: ../gtk-glade/incoming_call.glade.h:2
-msgid "Decline"
-msgstr "Понижение"
-
-#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
-msgid "Incoming call"
-msgstr "Входящие звонки"
-
-#: ../gtk-glade/incoming_call.glade.h:4
-msgid "Incoming call from"
-msgstr "Входящий звонок от"
-
-#: ../gtk-glade/incoming_call.glade.h:5
-msgid "Linphone - Incoming call"
-msgstr "Linphone - Входящий звонок"
-
-#: ../gtk-glade/parameters.glade.h:1
-msgid "0 stands for \"unlimited\""
-msgstr "0 поставить для \"безлимитный\""
-
-#: ../gtk-glade/parameters.glade.h:2
-#, fuzzy
-msgid "<b>Audio</b>"
-msgstr "<b>Звук</b>"
-
-#: ../gtk-glade/parameters.glade.h:3
-#, fuzzy
-msgid "<b>Bandwidth control</b>"
-msgstr "<b>Пропускная способность</b>"
-
-#: ../gtk-glade/parameters.glade.h:4
-msgid "<b>Codecs</b>"
-msgstr "<b>Кодеки</b>"
-
-#: ../gtk-glade/parameters.glade.h:5
-msgid "<b>Default identity</b>"
-msgstr "<b>Личность по умолчанию</b>"
-
-#: ../gtk-glade/parameters.glade.h:6
-#, fuzzy
-msgid "<b>Language</b>"
-msgstr "<b>IPv6 использовать</b>"
-
-#: ../gtk-glade/parameters.glade.h:7
-#, fuzzy
-msgid "<b>NAT and Firewall</b>"
-msgstr "<b>Настройки firewall</b>"
-
-#: ../gtk-glade/parameters.glade.h:8
-#, fuzzy
-msgid "<b>Ports</b>"
-msgstr "<b>Используемые порты</b>"
-
-#: ../gtk-glade/parameters.glade.h:9
-msgid "<b>Privacy</b>"
-msgstr "<b>Секретность</b>"
-
-#: ../gtk-glade/parameters.glade.h:10
-msgid "<b>Proxy accounts</b>"
-msgstr "<b>Proxy аккаунт</b>"
-
-#: ../gtk-glade/parameters.glade.h:11
-#, fuzzy
-msgid "<b>Transport</b>"
-msgstr "<b>Используемые порты</b>"
-
-#: ../gtk-glade/parameters.glade.h:12
-msgid "<b>Video</b>"
-msgstr "<b>Видео</b>"
-
-#: ../gtk-glade/parameters.glade.h:13
-#, fuzzy
-msgid "ALSA special device (optional):"
-msgstr "Специальное устройство ALSA (необязательно)"
-
-#: ../gtk-glade/parameters.glade.h:14
-msgid "Add"
-msgstr "Добавить"
-
-#: ../gtk-glade/parameters.glade.h:15
-#, fuzzy
-msgid "Audio RTP/UDP:"
-msgstr "Аудио RTP/UDP"
-
-#: ../gtk-glade/parameters.glade.h:16
-msgid ""
-"Audio codecs\n"
-"Video codecs"
-msgstr ""
-"Аудио кодеки\n"
-" и Видео кодеки"
-
-#: ../gtk-glade/parameters.glade.h:18
-msgid "Behind NAT / Firewall (specify gateway IP below)"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:19
-msgid "Behind NAT / Firewall (use STUN to resolve)"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:21
-msgid "CIF"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:22
-#, fuzzy
-msgid "Capture device:"
-msgstr "Устройство захвата"
-
-#: ../gtk-glade/parameters.glade.h:23
-msgid "Codecs"
-msgstr "Кодеки"
-
-#: ../gtk-glade/parameters.glade.h:24
-msgid "Direct connection to the Internet"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:25
-msgid "Disable"
-msgstr "Выключить"
-
-#: ../gtk-glade/parameters.glade.h:26
-#, fuzzy
-msgid "Done"
-msgstr "Ушёл"
-
-#: ../gtk-glade/parameters.glade.h:27
-#, fuzzy
-msgid "Download speed limit in Kbit/sec:"
-msgstr "Исходящий поток kbit/sec"
-
-#: ../gtk-glade/parameters.glade.h:28
-msgid "Edit"
-msgstr "Изменить"
-
-#: ../gtk-glade/parameters.glade.h:29
-msgid "Enable"
-msgstr "Включить"
-
-#: ../gtk-glade/parameters.glade.h:30
-#, fuzzy
-msgid "Enable echo cancellation"
-msgstr "Включить подавление эхо"
-
-#: ../gtk-glade/parameters.glade.h:31
-msgid "Erase all passwords"
-msgstr "Стереть все пароли"
-
-#: ../gtk-glade/parameters.glade.h:32
-msgid "Manage SIP Accounts"
-msgstr "Управление SIP аккаунтами"
-
-#: ../gtk-glade/parameters.glade.h:33
-msgid "Multimedia settings"
-msgstr "Настройка мультимедиа"
-
-#: ../gtk-glade/parameters.glade.h:34
-msgid "Network settings"
-msgstr "Настройки сети"
-
-#: ../gtk-glade/parameters.glade.h:35
-#, fuzzy
-msgid "Playback device:"
-msgstr "Устройство воспроизведения"
-
-#: ../gtk-glade/parameters.glade.h:36
-msgid "Prefered video resolution:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:37
-#, fuzzy
-msgid "Public IP address:"
-msgstr "Публичный IP адрес"
-
-#: ../gtk-glade/parameters.glade.h:38
-msgid ""
-"Register to FONICS\n"
-"virtual network !"
-msgstr ""
-"Регистрация в FONICS\n"
-"вирнтуальной сети!"
-
-#: ../gtk-glade/parameters.glade.h:40
-msgid "Remove"
-msgstr "Удалить"
-
-#: ../gtk-glade/parameters.glade.h:41
-#, fuzzy
-msgid "Ring device:"
-msgstr "Устройство звонка"
-
-#: ../gtk-glade/parameters.glade.h:42
-#, fuzzy
-msgid "Ring sound:"
-msgstr "Звук звонка"
-
-#: ../gtk-glade/parameters.glade.h:43
-#, fuzzy
-msgid "SIP (UDP):"
-msgstr "SIP (UDP)"
-
-#: ../gtk-glade/parameters.glade.h:44
-msgid "Send DTMFs as SIP info"
-msgstr "Отправить DTFMы как SIP инфо"
-
-#: ../gtk-glade/parameters.glade.h:45
-#, fuzzy
-msgid "Set Maximum Transmission Unit:"
-msgstr "Установка максимального числа передаваемых единиц"
-
-#: ../gtk-glade/parameters.glade.h:46
-msgid "Settings"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:47
-#, fuzzy
-msgid "Stun server:"
-msgstr "Stun сервер"
-
-#: ../gtk-glade/parameters.glade.h:48
-msgid "This section defines your SIP address when not using a SIP account"
-msgstr "Поле определяет ваш SIP адрес когда вы не используете SIP аккаунт"
-
-#: ../gtk-glade/parameters.glade.h:49
-#, fuzzy
-msgid "Upload speed limit in Kbit/sec:"
-msgstr "Входящий поток kbit/sec"
-
-#: ../gtk-glade/parameters.glade.h:50
-msgid "Use IPv6 instead of IPv4"
-msgstr "Использовать IPv6 вместо IPv4"
-
-#: ../gtk-glade/parameters.glade.h:51
-#, fuzzy
-msgid "User interface"
-msgstr "Имя пользователя:"
-
-#: ../gtk-glade/parameters.glade.h:52
-#, fuzzy
-msgid "Video RTP/UDP:"
-msgstr "Видео RTP/UDP"
-
-#: ../gtk-glade/parameters.glade.h:53
-#, fuzzy
-msgid "Video input device:"
-msgstr "Видео устройсво вывода"
-
-#: ../gtk-glade/parameters.glade.h:54
-msgid "Your display name (eg: John Doe):"
-msgstr "Ваше видимое имя (Иван Сидоров):"
-
-#: ../gtk-glade/parameters.glade.h:55
-msgid "Your resulting SIP address:"
-msgstr "Ваш результирующий sip адрес:"
-
-#: ../gtk-glade/parameters.glade.h:56
-msgid "Your username:"
-msgstr "Ваше имя пользователя:"
-
-#: ../gtk-glade/parameters.glade.h:57
-msgid "a sound card\n"
-msgstr "звуковая карта\n"
-
-#: ../gtk-glade/parameters.glade.h:59
-msgid "default camera"
-msgstr "камера по умолчаию"
-
-#: ../gtk-glade/parameters.glade.h:60
-msgid "default soundcard"
-msgstr "звуковая карта по умолчанию"
-
-#: ../gtk-glade/parameters.glade.h:61
-msgid "default soundcard\n"
-msgstr "звуковая карта по умолчанию\n"
-
-#: ../gtk-glade/parameters.glade.h:63
-msgid "gtk-go-down"
-msgstr "Свернуть"
-
-#: ../gtk-glade/parameters.glade.h:64
-msgid "gtk-go-up"
-msgstr "Развернуть"
-
-#: ../gtk-glade/parameters.glade.h:65
-msgid "gtk-media-play"
-msgstr "Медиа-play"
-
-#: ../gtk-glade/buddylookup.glade.h:1
-msgid "<b>Search somebody</b>"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:2
-msgid "Add to my list"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:3
-msgid "Search contacts in directory"
-msgstr ""
-
-#: ../gtk-glade/waiting.glade.h:1
-msgid "Linphone"
-msgstr "Linphone"
-
-#: ../gtk-glade/waiting.glade.h:2
-msgid "Please wait"
-msgstr ""
-
-#: ../coreapi/linphonecore.c:195
-#, fuzzy, c-format
-msgid "You have missed %i call."
-msgid_plural "You have missed %i calls."
-msgstr[0] "У вас пропущено %i звонков."
-msgstr[1] "У вас пропущено %i звонков."
-
-#: ../coreapi/linphonecore.c:223
-msgid "aborted"
-msgstr "остановленный"
-
-#: ../coreapi/linphonecore.c:226
-msgid "completed"
-msgstr "заверщённый"
-
-#: ../coreapi/linphonecore.c:229
-msgid "missed"
-msgstr "пропущен"
-
-#: ../coreapi/linphonecore.c:234
-#, c-format
-msgid ""
-"%s at %s\n"
-"From: %s\n"
-"To: %s\n"
-"Status: %s\n"
-"Duration: %i mn %i sec\n"
-msgstr ""
-"%s в %s\n"
-"От: %s\n"
-"К: %s\n"
-"Статус: %s\n"
-"Длительность: %i мн %i сек\n"
-
-#: ../coreapi/linphonecore.c:235
-msgid "Outgoing call"
-msgstr "Исходящие звонки"
-
-#: ../coreapi/linphonecore.c:445
-msgid ""
-"Your machine appears to be connected to an IPv6 network. By default linphone "
-"always uses IPv4. Please update your configuration if you want to use IPv6"
-msgstr ""
-"Похоже Ваш компьютер подключен по сети с IPv6. Linphone по умолчанию "
-"использует IPv4. Пожалуйста, обновите настройки если хотите использовать "
-"IPv6."
-
-#: ../coreapi/linphonecore.c:739
-msgid "Ready"
-msgstr "Готов"
-
-#: ../coreapi/linphonecore.c:1014
-msgid "Remote end seems to have disconnected, the call is going to be closed."
-msgstr "Удалённый узел отключился, звонок завершён."
-
-#: ../coreapi/linphonecore.c:1172
-msgid "Looking for telephone number destination..."
-msgstr "Поиск назначения для телефонного номера.."
-
-#: ../coreapi/linphonecore.c:1174
-msgid "Could not resolve this number."
-msgstr "Не может принять решение по этому номеру."
-
-#: ../coreapi/linphonecore.c:1239
-msgid ""
-"Could not parse given sip address. A sip url usually looks like sip:"
-"user@domain"
-msgstr ""
-"Не могу опознать sip адрес. SIP url обычно выглядит как: <sip:"
-"username@domainname>"
-
-#: ../coreapi/linphonecore.c:1340
-msgid "Sorry, having multiple simultaneous calls is not supported yet !"
-msgstr "Извините, несколько одновременных вызовов не поддерживаются пока!"
-
-#: ../coreapi/linphonecore.c:1387
-msgid "Contacting"
-msgstr "Соединение"
-
-#: ../coreapi/linphonecore.c:1402
-msgid "could not call"
-msgstr "невозможно позвонить"
-
-#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
-msgid "Connected."
-msgstr "Соединён."
-
-#: ../coreapi/linphonecore.c:1813
-msgid "Call ended"
-msgstr "Разговор окончен"
-
-#: ../coreapi/linphonecore.c:2175
-msgid "No nat/firewall address supplied !"
-msgstr "NAT/firewall адрес не установлен !"
-
-#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
-#, c-format
-msgid "Invalid nat address '%s' : %s"
-msgstr "Неверный NAT адрес '%s' : '%s'"
-
-#: ../coreapi/misc.c:134
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the pcm oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-"'modprobe snd-pcm-oss' as root to load it."
-msgstr ""
-"Ваш компьютер использует ALSA звуковой драйвер.\n"
-"Это лучший выбор. Однако, pcm oss модуль эмуляции\n"
-"не найден и он нужен для linphone.\n"
-"Пожалуйста, выполните от пользователя root 'modprobe snd-pcm-oss' чтоб "
-"загрузить его."
-
-#: ../coreapi/misc.c:137
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the mixer oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-" 'modprobe snd-mixer-oss' as root to load it."
-msgstr ""
-"Ваш компьютер использует ALSA звуковой драйвер.\n"
-"Это лучший выбор. Однако, oss микшера модуля\n"
-"не найден и он нужен для linphone.\n"
-"Пожалуйста, выполните от пользователя root 'modprobe snd-pcm-oss' чтоб "
-"загрузить его."
-
-#: ../coreapi/misc.c:610
-msgid "Stun lookup in progress..."
-msgstr "Поиск Stun продолжается..."
-
-#: ../coreapi/exevents.c:127
-msgid "Call terminated."
-msgstr "Звонок прерван."
-
-#: ../coreapi/exevents.c:149
-msgid "Could not reach destination."
-msgstr "Невозможно соединиться."
-
-#: ../coreapi/exevents.c:158
-msgid "User is busy."
-msgstr "Пользователь занят."
-
-#: ../coreapi/exevents.c:159
-msgid "User is temporarily unavailable."
-msgstr "Пользователь временно недоступен."
-
-#: ../coreapi/exevents.c:160
-msgid "Request Cancelled."
-msgstr "Запрос отменён."
-
-#. char *retrymsg=_("%s. Retry after %i minute(s).");
-#: ../coreapi/exevents.c:162
-msgid "User does not want to be disturbed."
-msgstr "Пользователь не хочет чтоб его беспокоили."
-
-#: ../coreapi/exevents.c:163
-msgid "Call declined."
-msgstr "Звонок отклонён."
-
-#: ../coreapi/exevents.c:191
-msgid "Bad request"
-msgstr "Неверный запрос"
-
-#: ../coreapi/exevents.c:194
-msgid "User cannot be found at given address."
-msgstr "Пользователь не может быть найден."
-
-#: ../coreapi/exevents.c:197
-msgid "Remote user cannot support any of proposed codecs."
-msgstr ""
-"Удалённый пользователь не поддерживает ни одного из предложенных кодеков."
-
-#. time out, call leg is lost
-#: ../coreapi/exevents.c:227
-msgid "Timeout."
-msgstr "Время закончилось."
-
-#: ../coreapi/exevents.c:230
-msgid "Remote host was found but refused connection."
-msgstr "Удалённый узел был найден, но отказал в соединении."
-
-#: ../coreapi/exevents.c:339
-msgid "is contacting you."
-msgstr "контактирует с вами."
-
-#: ../coreapi/exevents.c:424
-#, c-format
-msgid "Redirected to %s..."
-msgstr "Перенаправлен на %s..."
-
-#: ../coreapi/exevents.c:440
-msgid ""
-"User is not reachable at the moment but he invites you\n"
-"to contact him using the following alternate resource:"
-msgstr ""
-"Пользователь не доступен в данный момент, но\n"
-" приглашает Вас пообщаться на альтернативном ресурсе:"
-
-#: ../coreapi/exevents.c:861
-msgid "Early media."
-msgstr "Прошлые медиа."
-
-#: ../coreapi/exevents.c:972
-#, c-format
-msgid "Registration on %s failed: %s"
-msgstr "Регистрация на %s не удалась: %s"
-
-#: ../coreapi/exevents.c:972
-msgid "no response timeout"
-msgstr "нет ответа"
-
-#: ../coreapi/exevents.c:998
-#, c-format
-msgid "Registration on %s successful."
-msgstr "Регистрация на %s прошла успешно."
-
-#: ../coreapi/exevents.c:999
-#, fuzzy, c-format
-msgid "Unregistration on %s done."
-msgstr "Регистрация на %s прошла успешно."
-
-#. people for which we don't have yet an answer should appear as offline
-#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
-msgid "Gone"
-msgstr "Ушёл"
-
-#: ../coreapi/presence.c:129
-msgid "Waiting for Approval"
-msgstr "Ждать одобрения"
-
-#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
-msgid "Online"
-msgstr "В сети"
-
-#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
-msgid "Busy"
-msgstr "Занят"
-
-#: ../coreapi/presence.c:142
-msgid "Be Right Back"
-msgstr "Скоро вернусь"
-
-#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
-msgid "Away"
-msgstr "Отошёл"
-
-#: ../coreapi/presence.c:151
-msgid "On The Phone"
-msgstr "На телефоне"
-
-#: ../coreapi/presence.c:156
-msgid "Out To Lunch"
-msgstr "На обеде"
-
-#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
-msgid "Closed"
-msgstr "Закрыто"
-
-#: ../coreapi/friend.c:35
-msgid "Unknown"
-msgstr ""
-
-#: ../coreapi/friend.c:44
-#, fuzzy
-msgid "Be right back"
-msgstr "Скоро вернусь"
-
-#: ../coreapi/friend.c:50
-#, fuzzy
-msgid "On the phone"
-msgstr "На телефоне"
-
-#: ../coreapi/friend.c:53
-#, fuzzy
-msgid "Out to lunch"
-msgstr "На обеде"
-
-#: ../coreapi/friend.c:56
-msgid "Do not disturb"
-msgstr "Не беспокоить"
-
-#: ../coreapi/friend.c:59
-msgid "Moved"
-msgstr ""
-
-#: ../coreapi/friend.c:62
-msgid "Using another messaging service"
-msgstr ""
-
-#: ../coreapi/friend.c:65
-#, fuzzy
-msgid "Offline"
-msgstr "В сети"
-
-#: ../coreapi/friend.c:68
-msgid "Pending"
-msgstr ""
-
-#: ../coreapi/friend.c:74
-msgid "Unknown-bug"
-msgstr ""
-
-#: ../coreapi/proxy.c:221
-msgid ""
-"The sip proxy address you entered is invalid, it must start with \"sip:\" "
-"followed by a hostname."
-msgstr ""
-
-#: ../coreapi/proxy.c:227
-msgid ""
-"The sip identity you entered is invalid.\n"
-"It should look like sip:username@proxydomain, such as sip:alice@example.net"
-msgstr ""
-
-#: ../coreapi/proxy.c:634
-#, fuzzy, c-format
-msgid "Could not login as %s"
-msgstr "Невозможно найти картинку: %s"
-
-#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
-msgid "ITU-G.711 alaw encoder"
-msgstr ""
-
-#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
-msgid "ITU-G.711 alaw decoder"
-msgstr ""
-
-#: ../mediastreamer2/src/alsa.c:923
-#, fuzzy
-msgid "Alsa sound source"
-msgstr "звуковая карта\n"
-
-#: ../mediastreamer2/src/alsa.c:1027
-msgid "Alsa sound output"
-msgstr ""
-
-#: ../mediastreamer2/src/aqsnd.c:891
-msgid "Sound capture filter for MacOS X Audio Queue Service"
-msgstr ""
-
-#: ../mediastreamer2/src/aqsnd.c:915
-msgid "Sound playback filter for MacOS X Audio Queue Service"
-msgstr ""
-
-#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
-msgid "DTMF generator"
-msgstr ""
-
-#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
-msgid "The GSM full-rate codec"
-msgstr ""
-
-#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
-msgid "The GSM codec"
-msgstr ""
-
-#: ../mediastreamer2/src/macsnd.c:670
-msgid "Sound capture filter for MacOS X Core Audio drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/macsnd.c:684
-msgid "Sound playback filter for MacOS X Core Audio drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
-msgid "A filter to make conferencing"
-msgstr ""
-
-#: ../mediastreamer2/src/msfileplayer.c:295
-#: ../mediastreamer2/src/msfileplayer.c:313
-msgid "Raw files and wav reader"
-msgstr ""
-
-#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
-#: ../mediastreamer2/src/msfilerec_win.c:216
-#: ../mediastreamer2/src/msfilerec_win.c:234
-msgid "Wav file recorder"
-msgstr ""
-
-#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
-msgid "A filter that send several inputs to one output."
-msgstr ""
-
-#: ../mediastreamer2/src/msresample.c:221
-#: ../mediastreamer2/src/msresample.c:239
-msgid "frequency resampler"
-msgstr ""
-
-#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
-msgid "RTP output filter"
-msgstr ""
-
-#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
-msgid "RTP input filter"
-msgstr ""
-
-#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
-#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
-msgid "The free and wonderful speex codec"
-msgstr ""
-
-#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
-msgid "A filter that controls and measure sound volume"
-msgstr ""
-
-#: ../mediastreamer2/src/msv4l.c:1009
-msgid "A video4linux compatible source filter to stream pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/msv4l2.c:458
-msgid "A filter to grab pictures from Video4Linux2-powered cameras"
-msgstr ""
-
-#: ../mediastreamer2/src/nowebcam.c:1780
-msgid "A filter that outputs a static image."
-msgstr ""
-
-#: ../mediastreamer2/src/oss.c:567
-msgid "Sound capture filter for OSS drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/oss.c:581
-msgid "Sound playback filter for OSS drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
-msgid "A pixel format converter"
-msgstr ""
-
-#: ../mediastreamer2/src/sizeconv.c:204
-msgid "A video size converter"
-msgstr ""
-
-#: ../mediastreamer2/src/sizeconv.c:222
-msgid "a small video size converter"
-msgstr ""
-
-#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
-msgid "Echo canceler using speex library"
-msgstr ""
-
-#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
-msgid "A filter that reads from input and copy to its multiple outputs."
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:375
-msgid "The theora video encoder from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:393
-msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
-msgid "The theora video decoder from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
-msgid "ITU-G.711 ulaw encoder"
-msgstr ""
-
-#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
-msgid "ITU-G.711 ulaw decoder"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
-#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
-msgid "A H.263 decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:688
-msgid "A MPEG4 decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:704
-msgid "A RTP/JPEG decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:720
-msgid "A MJPEG decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:736
-msgid "A snow decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
-msgid "A video H.263 encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:856
-msgid ""
-"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
-"spec."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
-msgid "A video MPEG4 encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:888
-msgid "A video snow encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:904
-msgid "A RTP/MJPEG encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:938
-msgid ""
-"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:970
-msgid ""
-"The snow codec is royalty-free and is open-source. \n"
-"It uses innovative techniques that makes it one of most promising video "
-"codec. It is implemented within the ffmpeg project.\n"
-"However it is under development, quite unstable and compatibility with other "
-"versions cannot be guaranteed."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:990
-msgid "A MJPEG encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
-msgid "A generic video display"
-msgstr ""
-
-#: ../mediastreamer2/src/wincevideods.c:966
-#: ../mediastreamer2/src/wincevideods.c:984
-#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
-#: ../mediastreamer2/src/winvideods.c:1306
-#: ../mediastreamer2/src/winvideods.c:1324
-msgid "A video4windows compatible source filter to stream pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
-msgid "A video for windows (vfw.h) based source filter to grab pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
-msgid "ICE filter"
-msgstr ""
-
-#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
-msgid "A filter that trashes its input (useful for terminating some graphs)."
-msgstr ""
-
-#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
-msgid "Parametric sound equalizer."
-msgstr ""
-
-#: ../mediastreamer2/src/msdscap-mingw.cc:1003
-msgid "A webcam grabber based on directshow."
-msgstr ""
-
-#~ msgid "Show debug window"
-#~ msgstr "Показать окно ошибок"
-
-#~ msgid "_View"
-#~ msgstr "_Вид"
-
-#~ msgid "gtk-about"
-#~ msgstr "О программе"
-
-#~ msgid "gtk-help"
-#~ msgstr "Помощь"
-
-#~ msgid "gtk-preferences"
-#~ msgstr "Параметры"
-
-#~ msgid ""
-#~ "Show All\n"
-#~ "Show Online"
-#~ msgstr ""
-#~ "Показать все\n"
-#~ "Показать Online"
-
-#~ msgid "Search:"
-#~ msgstr "Поиск:"
-
-#~ msgid "Display filters"
-#~ msgstr "Показать фильтры"
-
-#~ msgid "I'm not behing a firewall"
-#~ msgstr "Я не за firewall"
-
-#~ msgid "I'm behind a firewall, use supplied public IP address"
-#~ msgstr "Я за firewall, использовать доступный IP адрес"
-
-#~ msgid "Use the supplied stun server above and do as best as possible"
-#~ msgstr "Использовать доступный Stun сервер и делать так хорошо как возможно"
-
-#~ msgid "<b>Miscelaneous</b>"
-#~ msgstr "<b>Разное</b>"
-
-#~ msgid "Go"
-#~ msgstr "Старт"
-
-#~ msgid "Address book"
-#~ msgstr "Адресная книга"
-
-#~ msgid "Shows calls"
-#~ msgstr "Показать звонки"
-
-#~ msgid "Exit"
-#~ msgstr "Выход"
-
-#~ msgid "Help"
-#~ msgstr "Помощь"
-
-#~ msgid "Shows the address book"
-#~ msgstr "Показать адресную книгу"
-
-#~ msgid "..."
-#~ msgstr "..."
-
-#~ msgid "Proxy to use:"
-#~ msgstr "Какой узел использовать:"
-
-#~ msgid ""
-#~ "Call or\n"
-#~ "answer"
-#~ msgstr ""
-#~ "Позвонить\n"
-#~ "или ответить"
-
-#~ msgid ""
-#~ "Hangup\n"
-#~ "or refuse"
-#~ msgstr ""
-#~ "Прервать\n"
-#~ "или отказать"
-
-#~ msgid "Or chat !"
-#~ msgstr "Или Чат ! "
-
-#~ msgid "Show more..."
-#~ msgstr "Показать больше..."
-
-#~ msgid "Playback level:"
-#~ msgstr "Уровень воспроизведения:"
-
-#~ msgid "Recording level:"
-#~ msgstr "Уровень записи:"
-
-#~ msgid "Ring level:"
-#~ msgstr "Уровень звонка:"
-
-#~ msgid "Controls"
-#~ msgstr "Управление"
-
-#~ msgid "Reachable"
-#~ msgstr "Доступен"
-
-#~ msgid "Busy, I'll be back in "
-#~ msgstr "Занят, я вернусь через "
-
-#~ msgid "The other party will be informed that you'll be back in X minutes"
-#~ msgstr "Другая часть информирует, что Вы вернётесь через X минут"
-
-#~ msgid "mn"
-#~ msgstr "мн"
-
-#~ msgid "Moved temporarily"
-#~ msgstr "Временно переехал"
-
-#~ msgid "Alternative service"
-#~ msgstr "Альтернативный сервис"
-
-#~ msgid "URL:"
-#~ msgstr "URL:"
-
-#~ msgid "Presence"
-#~ msgstr "Статус"
-
-#~ msgid "Press digits to send DTMFs."
-#~ msgstr "Введите цифры, чтоб отправить DTMF."
-
-#~ msgid ""
-#~ "  3\n"
-#~ "def"
-#~ msgstr ""
-#~ "  3\n"
-#~ "где"
-
-#~ msgid ""
-#~ "  2\n"
-#~ "abc"
-#~ msgstr ""
-#~ "  2\n"
-#~ "абв"
-
-#~ msgid ""
-#~ "  4\n"
-#~ "ghi"
-#~ msgstr ""
-#~ "  4\n"
-#~ "жзи"
-
-#~ msgid ""
-#~ " 5\n"
-#~ "jkl"
-#~ msgstr ""
-#~ "  5\n"
-#~ "клм"
-
-#~ msgid ""
-#~ "  6\n"
-#~ "mno"
-#~ msgstr ""
-#~ "  6\n"
-#~ "ноп"
-
-#~ msgid ""
-#~ "   7\n"
-#~ "pqrs"
-#~ msgstr ""
-#~ "  7\n"
-#~ "рст"
-
-#~ msgid ""
-#~ "  8\n"
-#~ "tuv"
-#~ msgstr ""
-#~ "  8\n"
-#~ "уфх"
-
-#~ msgid ""
-#~ "   9\n"
-#~ "wxyz"
-#~ msgstr ""
-#~ "  9\n"
-#~ "шюя"
-
-#~ msgid "DTMF"
-#~ msgstr "DTMF"
-
-#~ msgid "My online friends"
-#~ msgstr "Мои друзья онлайн:"
-
-#~ msgid ""
-#~ "C: 2001\n"
-#~ "Made in Old Europe"
-#~ msgstr ""
-#~ "C: 2001\n"
-#~ "Сделано в старой Европе"
-
-#~ msgid ""
-#~ "Linphone is a web-phone.\n"
-#~ "It is compatible with SIP and RTP protocols."
-#~ msgstr ""
-#~ "Linphone - это интернет телефон.\n"
-#~ "Он совместим с SIP и RTP протоколами."
-
-#~ msgid "http://www.linphone.org"
-#~ msgstr "http://www.linphone.org/"
-
-#~ msgid "Use IPv6 network (if available)"
-#~ msgstr "Использовать IPv6 сеть (если доступно)"
-
-# msgstr "Teilnehmer zur Zeit nicht ansprechbar."
-#~ msgid ""
-#~ "Toggle this if you are on an ipv6 network and you wish linphone to use it."
-#~ msgstr "Отметьте, если Вы в сети с ipv6 и будите использовать linphone."
-
-#~ msgid "Global"
-#~ msgstr "Основные"
-
-#~ msgid ""
-#~ "These options is only for users in a private network, behind a gateway. "
-#~ "If you are not in this situation, then leave this empty."
-#~ msgstr ""
-#~ "Эта опция используется в частных сетях, за шлюзом. Если вы не в этой "
-#~ "ситуации, просто оставьте пустой."
-
-#~ msgid "No firewall"
-#~ msgstr "Нет firewall'a"
-
-#~ msgid "Use this STUN server to guess firewall address :"
-#~ msgstr "Используйте этот STUN сервер чтоб определить адрес firewall :"
-
-#~ msgid "Specify firewall address manually:"
-#~ msgstr "Определить адрес Firewall вручную:"
-
-#~ msgid "NAT traversal options (experimental)"
-#~ msgstr "NAT опции (экспериментально)"
-
-#~ msgid "Number of buffered miliseconds (jitter compensation):"
-#~ msgstr "Число милисекунд для буферизации (компенсация дрожания):"
-
-#~ msgid "RTP port used for audio:"
-#~ msgstr "RTP порт для аудио:"
-
-#~ msgid "RTP properties"
-#~ msgstr "RTP свойства"
-
-#~ msgid "Use SIP INFO message instead of RTP rfc2833 for DTMF transmitting"
-#~ msgstr ""
-#~ "Используйте SIP INFO сообщения вместо RTP rfc2833 для DTMF препровождения"
-
-#~ msgid "RTP-RFC2833 is the recommended way."
-#~ msgstr "RTP-RFC2833 рекомендуемый."
-
-#~ msgid "Other"
-#~ msgstr "Другое"
-
-#~ msgid "micro"
-#~ msgstr "Микрофон"
-
-#~ msgid "Recording source:"
-#~ msgstr "Источник записи:"
-
-#~ msgid "Enable echo-canceler (cancels the echo heard by the remote party)"
-#~ msgstr ""
-#~ "Включить подавление эхо (подавляет эхо слышимое с удалённого устройства)"
-
-#~ msgid "Choose file"
-#~ msgstr "Выберите файл"
-
-#~ msgid "Listen"
-#~ msgstr "Слушать"
-
-#~ msgid "Sound properties"
-#~ msgstr "Настройки звука"
-
-#~ msgid "Sound device"
-#~ msgstr "Устройство звука"
-
-#~ msgid "Run sip user agent on port:"
-#~ msgstr "Запустить \"user agent\" на порту:"
-
-#~ msgid "It is strongly recommended to use port 5060."
-#~ msgstr "Рекомендуется использовать порт 5060."
-
-#~ msgid "SIP port"
-#~ msgstr "SIP порт"
-
-#~ msgid "@"
-#~ msgstr "@"
-
-#~ msgid "Identity"
-#~ msgstr "Личность"
-
-#~ msgid "Add proxy/registrar"
-#~ msgstr "Добавить прокси/регистратора"
-
-#~ msgid "Remote services"
-#~ msgstr "Удалённые сервисы"
-
-#~ msgid "Clear all stored authentication information (username,password...)"
-#~ msgstr "Удалить всю информацию аунтефикации (логин, пароль...)"
-
-#~ msgid "Authentication information"
-#~ msgstr "Информация аунтефикации"
-
-#~ msgid "SIP"
-#~ msgstr "SIP"
-
-#~ msgid "List of audio codecs, in order of preference:"
-#~ msgstr "Список аудио кодеков в приоритетном порядке:"
-
-#~ msgid ""
-#~ "Note: Codecs in red are not usable regarding to your connection type to "
-#~ "the internet."
-#~ msgstr ""
-#~ "Заметка: Кодеки отмеченные красным не подходят для вашего соединения в "
-#~ "Internet."
-
-#~ msgid "No information availlable"
-#~ msgstr "Информация недоступна"
-
-#~ msgid "Codec information"
-#~ msgstr "Информация о кодеке"
-
-#~ msgid "Address Book"
-#~ msgstr "Адресная книга"
-
-#~ msgid "Select"
-#~ msgstr "Выбор"
-
-#~ msgid ""
-#~ "User is not reachable at the moment but he invites you to contact him "
-#~ "using the following alternate ressource:"
-#~ msgstr ""
-#~ "Пользователь не доступен в данный момент, но приглашает пообщаться на "
-#~ "альтернативном ресурсе:"
-
-#~ msgid "None."
-#~ msgstr "Нет."
-
-#~ msgid "Proxy/Registrar configuration box"
-#~ msgstr "Прокси/Регистратор конфигуратор"
-
-#~ msgid "Send registration:"
-#~ msgstr "Отправить регистрацию:"
-
-#~ msgid "Name:"
-#~ msgstr "Имя:"
-
-#~ msgid "Subscribe policy:"
-#~ msgstr "Правило подписки:"
-
-#~ msgid "Send subscription (see person's online status)"
-#~ msgstr "Отправить подписку (смотреть статус персоны в сети)"
-
-#~ msgid "New incoming subscription"
-#~ msgstr "Подтверждение новой подписки"
-
-#~ msgid "You have received a new subscription..."
-#~ msgstr "Вы получили новое подтверждение..."
-
-#~ msgid "Refuse"
-#~ msgstr "Отказать"
-
-#~ msgid "Authentication required for realm"
-#~ msgstr "Регистрация для"
-
-#~ msgid "userid:"
-#~ msgstr "ID пользователя:"
-
-#~ msgid "realm:"
-#~ msgstr "Название:"
-
-#~ msgid "Linphone - Call history"
-#~ msgstr "Linphone - История звонков"
-
-#~ msgid "Chat Room"
-#~ msgstr "Комната чата"
-
-#~ msgid "Text:"
-#~ msgstr "Текст"
-
-#~ msgid "The caller asks for resource reservation. Do you agree ?"
-#~ msgstr ""
-#~ "Вызывающий абонент спрашивает о резервировании ресурса. Вы согласны ?"
-
-#~ msgid ""
-#~ "The caller doesn't use resource reservation. \t\t\t\t\tDo you wish to "
-#~ "continue anyway ?"
-#~ msgstr ""
-#~ "Вызывающий не использует резервирование ресурса. \t\t\t\t\tВы всё равно "
-#~ "желаете продолжить?"
-
-#~ msgid "linphone - receiving call from %s"
-#~ msgstr "Linphone - принял звонок от %s"
-
-#~ msgid ""
-#~ "You have received a subscription from %s.This means that this person "
-#~ "wishes to be notified of your presence information (online, busy, "
-#~ "away...).\n"
-#~ "Do you agree ?"
-#~ msgstr ""
-#~ "Вы получили запрос на подключение от %s. Это значит что этот человек "
-#~ "хочет знать ваш статус (онлайн, занят, отошёл...).\n"
-#~ "Вы согласны ?"
-
-#~ msgid "Authentication required for realm %s"
-#~ msgstr "Регистрация для %s"
-
-#~ msgid "None"
-#~ msgstr "Нет"
-
-#~ msgid "Wait"
-#~ msgstr "Подождать"
-
-#~ msgid "Deny"
-#~ msgstr "Отказать"
-
-#~ msgid "Bad sip address: a sip address looks like sip:user@domain"
-#~ msgstr "Неправильный sip адрес, он выглядит как: <sip:username@domainname>"
-
-#~ msgid "Stun lookup done..."
-#~ msgstr "Поиск Stun завершён..."
-
-#~ msgid "enter sip uri here"
-#~ msgstr "Sip URI eingeben"
-
-#~ msgid "User manual"
-#~ msgstr "Anwender-Handbuch"
-
-#~ msgid "Ring sound selection"
-#~ msgstr "Klingelton ausw�len"
-
-#~ msgid "Communication ended."
-#~ msgstr "Kommunikation beendet."
-
-#~ msgid "Call cancelled."
-#~ msgstr "Anruf annulliert"
-
-#, fuzzy
-#~ msgid "Firewall 's external ip address (in dot notations):"
-#~ msgstr "IP-Adresse des Firewall (in Punktnotation)"
-
-#, fuzzy
-#~ msgid "Server address"
-#~ msgstr "Server-Adresse:"
-
-#~ msgid "28k modem"
-#~ msgstr "28K Modem"
-
-#~ msgid "56k modem"
-#~ msgstr "56K Modem"
-
-#~ msgid "64k modem (numeris)"
-#~ msgstr "64K Modem (ISDN)"
-
-#~ msgid "ADSL or Cable modem"
-#~ msgstr "ADSL oder Kabel-Modem"
-
-#~ msgid "Ethernet or equivalent"
-#~ msgstr "Ethernet oder �uivalent"
-
-#~ msgid "Connection type:"
-#~ msgstr "Verbindungstyp:"
-
-#, fuzzy
-#~ msgid ""
-#~ "Linphone could not open audio device %s. Check if your sound card is "
-#~ "fully configured and working."
-#~ msgstr ""
-#~ "Linphone kann das Soundger� nicht �fnen. Prfen Sie nach, ob dieSoundkarte "
-#~ "vollst�dig konfiguriert und funktionsf�ig ist."
-
-#~ msgid "Type here the sip address of the person you want to call."
-#~ msgstr ""
-#~ "Geben Sie die Sip-Adresse des Anwenders, den Sie anrufen m�hten, hier ein."
-
-#~ msgid ""
-#~ "Release or\n"
-#~ "Refuse"
-#~ msgstr ""
-#~ "Auflegen oder\n"
-#~ "Abweisen"
-
-#~ msgid "%s. Retry after %i minute(s)."
-#~ msgstr "%s. In %i Minuten wieder versuchen."
-
-#~ msgid "Timeout..."
-#~ msgstr "Zeitberschreitung..."
-
-#, fuzzy
-#~ msgid ""
-#~ "Add address\n"
-#~ "book"
-#~ msgstr "Adressbuch"
-
-#~ msgid "Toggle this if you want to be registered on a remote server."
-#~ msgstr ""
-#~ "Bitte ankreuzen, wenn Sie auf einem Sip-Server registriert werden wollen."
-
-#~ msgid "Address of record:"
-#~ msgstr "Adresse des Eintrags:"
-
-#~ msgid ""
-#~ "The password used for registration. On some servers it is not necessary"
-#~ msgstr ""
-#~ "Passwort fr die Registrierung.  Bei manchen Servern nicht erforderlich."
-
-#~ msgid "Use this registrar server as outbound proxy."
-#~ msgstr "Verwenden Sie diesen Registrarserver als externen proxy."
-
-#~ msgid "sip address:"
-#~ msgstr "SIP-Adresse:"
-
-#~ msgid "Modify"
-#~ msgstr "�dern"
-
-#~ msgid "Registering..."
-#~ msgstr "Registrierung"
-
-#~ msgid ""
-#~ "You are currently using the i810_audio driver.\n"
-#~ "This driver is buggy and so does not work with Linphone.\n"
-#~ "We suggest that you replace it by its equivalent ALSA driver,\n"
-#~ "either with packages from your distribution, or by downloading\n"
-#~ "ALSA drivers at http://www.alsa-project.org."
-#~ msgstr ""
-#~ "Sie verwenden zur Zeit den i810_audio Treiber.\n"
-#~ "Diese Treiber ist fehlerhaft und funktioniert nicht mit Linphone\n"
-#~ "Wir empfehlen, den Treiber entweder durch das ALSA-Treiber-Paket von "
-#~ "ihrer Distribution\n"
-#~ "zu ersetzen oder die gewnschten ALSA-Treiber von http://www.alsa-project."
-#~ "org\n"
-#~ "zu beziehen und zu installieren"
-
-#~ msgid "Unregistration successfull."
-#~ msgstr "Abmeldung erfolgreich."
-
-#~ msgid "Select network interface to use:"
-#~ msgstr "Netzwerkschnittstelle w�len:"
-
-#~ msgid "Network interface properties"
-#~ msgstr "Eigenschaften der Netzwerkschnittstelle"
-
-#~ msgid "RTP"
-#~ msgstr "RTP"
-
-#~ msgid "C: 2001"
-#~ msgstr "April 2001"
-
-#~ msgid "Threads not supported by glib. Upgrade your glib.\n"
-#~ msgstr ""
-#~ "Threads werden von glib nicht untersttzt.  Bitte aktualisieren Sie Ihre "
-#~ "glib.\n"
-
-#~ msgid "Run linphone as a gnome-applet."
-#~ msgstr "Linphone als gnome-Applet ausfhren."
-
-#~ msgid "Run linphone as a daemon (for use without gnome)."
-#~ msgstr "Linphone als daemon ausfhren (Verwendung ohne Gnome)."
-
-#~ msgid ""
-#~ "Cannot find network previously used interface %s.\n"
-#~ "If your computer is temporary connected to the internet, please connect "
-#~ "and then run linphone.\n"
-#~ "If you want to change your default network interface, go to the "
-#~ "parameters 'box."
-#~ msgstr ""
-#~ "Linphone konnte die zuvor verwendete Netzwerkschnittstelle %s nicht "
-#~ "finden.\n"
-#~ "Wenn linphone nur tempor� am Internet angeschlossen ist, stellen Sie eine "
-#~ "Verbindung her und rufen Sie linphone erneut auf.\n"
-#~ "Wenn Sie die vorgegebene Netzwerkschnittstelle �dern wollen, w�len Sie "
-#~ "bitte \"Einstellungen\"."
-
-#~ msgid ""
-#~ "Linphone cannot open the audio device.\n"
-#~ "It may be caused by other programs using it.\n"
-#~ "Do you want linphone to kill these programs (esd or artsd) ?"
-#~ msgstr ""
-#~ "Linphone kann die Soundschnittstelle nicht �fnen.\n"
-#~ "Dies kann durch andere Applikationen verursacht sein.\n"
-#~ "M�hten sie diese Programme (esd oder artsd) beenden?"
-
-#~ msgid "Use it as a:"
-#~ msgstr "Verwenden als:"
-
-#~ msgid "Outbound proxy"
-#~ msgstr "Ausgehender Proxy-Server"
-
-#~ msgid ""
-#~ "Toggle this button if the registrar must be used to proxy calls through a "
-#~ "firewall."
-#~ msgstr ""
-#~ "Verwenden Sie diesen Knopf, falls der Registrar zum Tunneln durch einen "
-#~ "Firewall verwendet werden mu�"
-
-#~ msgid "kbit/s"
-#~ msgstr "Kbits/s"
-
-#~ msgid "OSS"
-#~ msgstr "OSS"
-
-#~ msgid "ALSA"
-#~ msgstr "ALSA"
-
-#~ msgid "Automatically kill applications using soundcard when needed"
-#~ msgstr "Applikationen die die Soundkarte verwenden, automatisch beenden."
-
-#~ msgid ""
-#~ "Your computer is connected to several networks. Check in the global "
-#~ "parameters if Linphone uses the one that you want."
-#~ msgstr ""
-#~ "Ihr Rechner ist an mehere Netze angeschlossen. Stellen Sie sicher, da�in "
-#~ "den Globalen Parametern die richtige Schnittstelle selektiert ist."
-
-#~ msgid ""
-#~ "Linphone failed to open the sound device. See the README file included in "
-#~ "the distribution for details."
-#~ msgstr ""
-#~ "Linphone konnte die Soundschnittstelle nicht �fnen. Weitere Informationen "
-#~ "finden Sie in der README-Datei (enthalten in der Distribution)."
-
-#~ msgid "Interface not found."
-#~ msgstr "Schnittstelle nicht gefunden."
-
-#~ msgid "Warning"
-#~ msgstr "Warnung"
-
-#~ msgid ""
-#~ "Linphone cannot open the sound device. It may be caused by other programs "
-#~ "using it. Do you want linphone to kill these programs (esd or artsd) ?"
-#~ msgstr ""
-#~ "Linphone kann die Soundschnittstelle nicht �fnen. Dies kann durch andere "
-#~ "Applikationen verursacht sein. M�hten sie diese Programme (esd oder "
-#~ "artsd) beenden?"
-
-#~ msgid "Linphone shutdowns..."
-#~ msgstr "Linphone Ende..."
-
-#~ msgid ""
-#~ "Please, wait a few seconds untils linphone unregisters your sip addess "
-#~ "from registrar server..."
-#~ msgstr "Bitte einige Sekunden warten, bis Sip-Adresse ausgetragen ist."
-
-#~ msgid "Bad formuled sip address."
-#~ msgstr "SIP-Adresse fehlerhaft."
-
-#~ msgid "Couldn't create pixmap from file: %s"
-#~ msgstr "Konnte Pixmap nicht aus Datei %s erzeugen."
-
-#~ msgid ""
-#~ "Linphone did not detect any valid network interface. If you use a "
-#~ "temporary internet connection, please connect and then run linphone again."
-#~ msgstr ""
-#~ "Linphone konnte keine Netzwerkschnittstelle finden. Wenn Sie nur eine "
-#~ "tempor�e Internetverbindung haben, bitte erneut eine Internetverbindung "
-#~ "herstellen und linphone nochmals starten."
-
-#~ msgid "List of network interfaces on your system."
-#~ msgstr "Vorhandene Netzwerkschnittstellen ihres Systems"
diff --git a/linphone/po/sv.po b/linphone/po/sv.po
deleted file mode 100644 (file)
index 41956ed..0000000
+++ /dev/null
@@ -1,1590 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-10-16 15:24+0200\n"
-"PO-Revision-Date: 2009-02-17 15:22+0100\n"
-"Last-Translator: Emmanuel Frécon <emmanuel.frecon@myjoice.com>\n"
-"Language-Team: SWEDISH <SE@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
-#: ../gtk-glade/support.c:102
-#, c-format
-msgid "Couldn't find pixmap file: %s"
-msgstr "Kunde inte hitta pixmap filen: %s"
-
-#: ../gtk-glade/chat.c:27
-#, c-format
-msgid "Chat with %s"
-msgstr "Chatta med %s"
-
-#: ../gtk-glade/main.c:90
-msgid "log to stdout some debug information while running."
-msgstr "skriv loggning information under körning"
-
-#: ../gtk-glade/main.c:97
-msgid "Start only in the system tray, do not show the main interface."
-msgstr "Starta ikonifierat, visa inte huvudfönstret"
-
-#: ../gtk-glade/main.c:104
-msgid "address to call right now"
-msgstr "Samtalsmottagare"
-
-#: ../gtk-glade/main.c:111
-msgid "if set automatically answer incoming calls"
-msgstr "Om på, besvara automatisk alla inkommande samtal"
-
-#: ../gtk-glade/main.c:119
-msgid ""
-"Specifiy a working directory (should be the base of the installation, eg: c:"
-"\\Program Files\\Linphone)"
-msgstr ""
-
-#: ../gtk-glade/main.c:675
-#, c-format
-msgid "Incoming call from %s"
-msgstr "Inkommande samtal från %s"
-
-#: ../gtk-glade/main.c:707
-#, c-format
-msgid ""
-"%s would like to add you to his contact list.\n"
-"Would you allow him to see your presence status or add him to your contact "
-"list ?\n"
-"If you answer no, this person will be temporarily blacklisted."
-msgstr ""
-"%s skulle vilja lägga till dig till hans/hennes kontaktlista.\n"
-"Vill du tillåta honom/henne att se din närvarostatus eller lägga till honom/"
-"henne till din kontaktlista?\n"
-"Om du svarar nej, personen kommer att vara bannlyst."
-
-#: ../gtk-glade/main.c:777
-#, c-format
-msgid ""
-"Please enter your password for username <i>%s</i>\n"
-" at domain <i>%s</i>:"
-msgstr ""
-"Mata in ditt lösenord för användaren <i>%s</i>\n"
-"vid domänen <i>%s</i>:"
-
-#: ../gtk-glade/main.c:871
-msgid "Website link"
-msgstr "Webbsajt"
-
-#: ../gtk-glade/main.c:907
-msgid "Linphone - a video internet phone"
-msgstr "Linphone - en video Internet telefon"
-
-#: ../gtk-glade/main.c:926
-#, c-format
-msgid "%s (Default)"
-msgstr "%s (Default)"
-
-#: ../gtk-glade/main.c:1168
-msgid "A free SIP video-phone"
-msgstr "En gratis SIP video-telefon"
-
-#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
-#: ../gtk-glade/contact.glade.h:3
-msgid "Name"
-msgstr "Namn"
-
-#: ../gtk-glade/friendlist.c:212
-msgid "Presence status"
-msgstr "Närvarostatus"
-
-#: ../gtk-glade/friendlist.c:243
-#, c-format
-msgid "Search in %s directory"
-msgstr "Sök i %s katalogen"
-
-#: ../gtk-glade/friendlist.c:432
-msgid "Invalid sip contact !"
-msgstr "ogiltig SIP kontakt!"
-
-#: ../gtk-glade/friendlist.c:474
-#, c-format
-msgid "Call %s"
-msgstr "Ringer %s"
-
-#: ../gtk-glade/friendlist.c:475
-#, c-format
-msgid "Send text to %s"
-msgstr "Skicka text till %s"
-
-#: ../gtk-glade/friendlist.c:476
-#, c-format
-msgid "Edit contact '%s'"
-msgstr "Ändra kontakt '%s'"
-
-#: ../gtk-glade/friendlist.c:477
-#, c-format
-msgid "Delete contact '%s'"
-msgstr "Ta bort kontakt '%s'"
-
-#: ../gtk-glade/friendlist.c:519
-#, c-format
-msgid "Add new contact from %s directory"
-msgstr "Lägg till kontakt ifrån %s katalogen"
-
-#: ../gtk-glade/propertybox.c:251
-msgid "Rate (Hz)"
-msgstr "Frekvens (Hz)"
-
-#: ../gtk-glade/propertybox.c:257
-msgid "Status"
-msgstr "Status"
-
-#: ../gtk-glade/propertybox.c:263
-msgid "Min bitrate (kbit/s)"
-msgstr "Min. datahastighet (kbit/s)"
-
-#: ../gtk-glade/propertybox.c:269
-msgid "Parameters"
-msgstr "Parametrar"
-
-#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
-msgid "Enabled"
-msgstr "På"
-
-#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
-msgid "Disabled"
-msgstr "Av"
-
-#: ../gtk-glade/propertybox.c:480
-msgid "Account"
-msgstr "Konto"
-
-#: ../gtk-glade/propertybox.c:620
-msgid "English"
-msgstr "Engelska"
-
-#: ../gtk-glade/propertybox.c:621
-msgid "French"
-msgstr "Fransk"
-
-#: ../gtk-glade/propertybox.c:622
-msgid "Swedish"
-msgstr "Svenska"
-
-#: ../gtk-glade/propertybox.c:623
-msgid "Italian"
-msgstr "Italiensk"
-
-#: ../gtk-glade/propertybox.c:624
-msgid "Spanish"
-msgstr "Spansk"
-
-#: ../gtk-glade/propertybox.c:625
-msgid "Brazilian Portugese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:626
-msgid "Polish"
-msgstr "Polska"
-
-#: ../gtk-glade/propertybox.c:627
-msgid "German"
-msgstr "Tyska"
-
-#: ../gtk-glade/propertybox.c:628
-msgid "Russian"
-msgstr "Ryska"
-
-#: ../gtk-glade/propertybox.c:629
-msgid "Japanese"
-msgstr "Japanska"
-
-#: ../gtk-glade/propertybox.c:630
-msgid "Dutch"
-msgstr "Nederländksa"
-
-#: ../gtk-glade/propertybox.c:631
-msgid "Hungarian"
-msgstr "Hungerska"
-
-#: ../gtk-glade/propertybox.c:632
-msgid "Czech"
-msgstr "Tjekiska"
-
-#: ../gtk-glade/propertybox.c:633
-#, fuzzy
-msgid "Chinese"
-msgstr "Kinesiska"
-
-#: ../gtk-glade/propertybox.c:690
-msgid ""
-"You need to restart linphone for the new language selection to take effect."
-msgstr "Du behöver starta om programmet för att det nya språket ska synas."
-
-#: ../gtk-glade/update.c:80
-#, c-format
-msgid ""
-"A more recent version is availalble from %s.\n"
-"Would you like to open a browser to download it ?"
-msgstr ""
-"En nyare version är tillgänglig på %s.\n"
-"Vill du öppna en browser för att ladda ner den?"
-
-#: ../gtk-glade/update.c:91
-msgid "You are running the lastest version."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:66
-msgid "Firstname, Lastname"
-msgstr "Förnamn, Efternamn"
-
-#: ../gtk-glade/buddylookup.c:73
-msgid "SIP address"
-msgstr "SIP Adress"
-
-#: ../gtk-glade/buddylookup.c:121
-msgid "Error communicating with server."
-msgstr "Error med förbindelsen till servern."
-
-#: ../gtk-glade/buddylookup.c:125
-msgid "Connecting..."
-msgstr "Kontaktar"
-
-#: ../gtk-glade/buddylookup.c:129
-msgid "Connected"
-msgstr "Kopplad"
-
-#: ../gtk-glade/buddylookup.c:133
-msgid "Receiving data..."
-msgstr "Tar emot data..."
-
-#: ../gtk-glade/buddylookup.c:141
-#, c-format
-msgid "Found %i contact"
-msgid_plural "Found %i contacts"
-msgstr[0] "Hittat kontakt %i"
-msgstr[1] "Hittat kontakt %i"
-
-#: ../gtk-glade/setupwizard.c:25
-msgid ""
-"Welcome !\n"
-"This assistant will help you to use a SIP account for your calls."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:34
-msgid "Create an account by choosing a username"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:35
-msgid "I have already an account and just want to use it"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:53
-msgid "Please choose a username:"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:54
-msgid "Username:"
-msgstr "Användarnamn:"
-
-#: ../gtk-glade/setupwizard.c:92
-#, c-format
-msgid "Checking if '%s' is available..."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
-msgid "Please wait..."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:101
-msgid "Sorry this username already exists. Please try a new one."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
-msgid "Ok !"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
-msgid "Communication problem, please try again later."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:134
-msgid "Thank you. Your account is now configured and ready for use."
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:228
-msgid "Welcome to the account setup assistant"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:232
-msgid "Account setup assistant"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:236
-msgid "Choosing a username"
-msgstr "Välj ditt användarnamn:"
-
-#: ../gtk-glade/setupwizard.c:240
-msgid "Verifying"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:244
-#, fuzzy
-msgid "Confirmation"
-msgstr "Kontakt information"
-
-#: ../gtk-glade/setupwizard.c:249
-msgid "Creating your account"
-msgstr ""
-
-#: ../gtk-glade/setupwizard.c:253
-msgid "Now ready !"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:98
-msgid "<b>Calling...</b>"
-msgstr "<b>Kontaktar...</b>"
-
-#: ../gtk-glade/incall_view.c:122
-msgid "<b>In call with</b>"
-msgstr "<b>I samtal med</b>"
-
-#: ../gtk-glade/incall_view.c:124
-msgid "00::00::00"
-msgstr "00:00:00"
-
-#: ../gtk-glade/incall_view.c:140
-#, c-format
-msgid "%02i::%02i::%02i"
-msgstr "%02i:%02i:%02i"
-
-#: ../gtk-glade/incall_view.c:158
-msgid "<b>Call ended.</b>"
-msgstr "<b>Samtalet slut</b>"
-
-#: ../gtk-glade/incall_view.c:176
-#, fuzzy
-msgid "Unmute"
-msgstr "Tyst"
-
-#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
-msgid "Mute"
-msgstr "Tyst"
-
-#: ../gtk-glade/loginframe.c:82
-#, c-format
-msgid "Please enter login information for %s"
-msgstr "Mata in ditt lösenord för domänen %s:"
-
-#: ../gtk-glade/main.glade.h:1
-msgid "#"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:2
-msgid "*"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:3
-msgid "0"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:4
-msgid "1"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:5
-msgid "2"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:6
-msgid "3"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:7
-msgid "4"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:8
-msgid "5"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:9
-msgid "6"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:10
-msgid "7"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:11
-msgid "8"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:12
-msgid "9"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:13
-msgid "<b>Contact list</b>"
-msgstr "<b>Kontaktlista</b>"
-
-#: ../gtk-glade/main.glade.h:14
-msgid "<b>Terminate call</b>"
-msgstr "<b>Lägg på</b>"
-
-#: ../gtk-glade/main.glade.h:15
-msgid "<b>Welcome !</b>"
-msgstr "<b>Välkommen!</b>"
-
-#: ../gtk-glade/main.glade.h:16
-msgid "A"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:17
-msgid ""
-"ADSL\n"
-"Fiber Channel"
-msgstr ""
-"ADSL\n"
-"Fiber"
-
-#: ../gtk-glade/main.glade.h:19
-msgid ""
-"All users\n"
-"Online users"
-msgstr ""
-"Alla användare\n"
-"Online användare"
-
-#: ../gtk-glade/main.glade.h:21
-msgid "Assistant"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:22
-msgid "Audio & Video"
-msgstr "Audio & Video"
-
-#: ../gtk-glade/main.glade.h:23
-msgid "Audio only"
-msgstr "Enbart audio"
-
-#: ../gtk-glade/main.glade.h:24
-msgid "Automatically log me in"
-msgstr "Logga mig automatiskt"
-
-#: ../gtk-glade/main.glade.h:25
-msgid "B"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
-msgid "C"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:27
-msgid "Check for updates"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:28
-msgid "D"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:29
-msgid "Default"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:30
-msgid "Digits"
-msgstr "Tangenter"
-
-#: ../gtk-glade/main.glade.h:31
-msgid "Duration"
-msgstr "Förlopp"
-
-#: ../gtk-glade/main.glade.h:32
-msgid "Duration:"
-msgstr "Förlopp:"
-
-#: ../gtk-glade/main.glade.h:33
-msgid "Enable self-view"
-msgstr "Själv bild"
-
-#: ../gtk-glade/main.glade.h:34
-msgid "Enter username, phone number, or full sip address"
-msgstr "Mata in användarnamn, telefonnummer eller SIP adress"
-
-#: ../gtk-glade/main.glade.h:35
-msgid "In call"
-msgstr "I samtal"
-
-#: ../gtk-glade/main.glade.h:36
-msgid "Internet connection:"
-msgstr "Internet förbindelse:"
-
-#: ../gtk-glade/main.glade.h:37
-msgid "Login information"
-msgstr "Login information"
-
-#: ../gtk-glade/main.glade.h:38
-msgid "Lookup:"
-msgstr "Sök:"
-
-#: ../gtk-glade/main.glade.h:39
-msgid "Main view"
-msgstr "Huvud vy"
-
-#: ../gtk-glade/main.glade.h:41
-msgid "My current identity:"
-msgstr "Min nuvarande identitet"
-
-#: ../gtk-glade/main.glade.h:42
-msgid "Password"
-msgstr "Lösenord"
-
-#: ../gtk-glade/main.glade.h:43
-msgid "SIP address or phone number:"
-msgstr "Användarnamn"
-
-#: ../gtk-glade/main.glade.h:44
-msgid "Show current call"
-msgstr "Nuvarande samtal"
-
-#: ../gtk-glade/main.glade.h:45
-msgid "Start call"
-msgstr "Ring"
-
-#: ../gtk-glade/main.glade.h:46
-msgid "Terminate call"
-msgstr "Lägg på"
-
-#: ../gtk-glade/main.glade.h:47
-msgid "Username"
-msgstr "Användarnamn:"
-
-#: ../gtk-glade/main.glade.h:48
-#, fuzzy
-msgid "_Linphone"
-msgstr "Apropå linphone"
-
-#: ../gtk-glade/main.glade.h:49
-msgid "_Modes"
-msgstr "_Media"
-
-#: ../gtk-glade/main.glade.h:50
-#, fuzzy
-msgid "gtk-connect"
-msgstr "Kopplad"
-
-#: ../gtk-glade/main.glade.h:51
-msgid "gtk-find"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:52
-msgid "in"
-msgstr "i"
-
-#: ../gtk-glade/main.glade.h:53
-msgid "label"
-msgstr ""
-
-#: ../gtk-glade/about.glade.h:1
-msgid "About linphone"
-msgstr "Apropå linphone"
-
-#: ../gtk-glade/about.glade.h:2
-msgid "An internet video phone using the standart SIP (rfc3261) protocol."
-msgstr "En Internet video telefon baserat på SIP protokoll."
-
-#: ../gtk-glade/about.glade.h:3
-msgid "Created by Simon Morlat\n"
-msgstr "Skapad av Simon Morlat\n"
-
-#: ../gtk-glade/about.glade.h:5
-msgid ""
-"fr: Simon Morlat\n"
-"en: Simon Morlat and Delphine Perreau\n"
-"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
-"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
-"sv: Daniel Nylander <po@danielnylander.se>\n"
-"es: Jesus Benitez <gnelson at inMail dot sk>\n"
-"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
-"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
-"pl: Robert Nasiadek <darkone@darkone.pl>\n"
-"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
-"hu: anonymous\n"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:1
-#, fuzzy
-msgid "<b>Contact information</b>"
-msgstr "Kontakt information"
-
-#: ../gtk-glade/contact.glade.h:2
-msgid "Allow this contact to see my presence status"
-msgstr "Tillåt den här kontakten att se min närvarostatus"
-
-#: ../gtk-glade/contact.glade.h:4
-msgid "SIP Address"
-msgstr "SIP Adress"
-
-#: ../gtk-glade/contact.glade.h:5
-msgid "Show this contact presence status"
-msgstr "Visa kontaktens närvarostatus"
-
-#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
-#: ../gtk-glade/sip_account.glade.h:9
-msgid "gtk-cancel"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
-#: ../gtk-glade/sip_account.glade.h:10
-msgid "gtk-ok"
-msgstr ""
-
-#: ../gtk-glade/log.glade.h:1
-msgid "Linphone debug window"
-msgstr "Linphone debug fönster"
-
-#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
-#: ../gtk-glade/chatroom.glade.h:2
-msgid "gtk-close"
-msgstr ""
-
-#: ../gtk-glade/password.glade.h:1
-msgid "Linphone - Authentication required"
-msgstr "Linphone - Autentisering krävs"
-
-#: ../gtk-glade/password.glade.h:2
-msgid "Password:"
-msgstr "Lösenord:"
-
-#: ../gtk-glade/password.glade.h:3
-msgid "Please enter the domain password"
-msgstr "Mata in lösenordet för domänen"
-
-#: ../gtk-glade/password.glade.h:4
-msgid "UserID"
-msgstr ""
-
-#: ../gtk-glade/call_logs.glade.h:1
-msgid "Call history"
-msgstr "Samtalshistorik"
-
-#: ../gtk-glade/sip_account.glade.h:1
-msgid "Configure a SIP account"
-msgstr "Konfigurera ett SIP konto"
-
-#: ../gtk-glade/sip_account.glade.h:2
-msgid "Linphone - Configure a SIP account"
-msgstr "Linphone - Konfigurera ett SIP konto"
-
-#: ../gtk-glade/sip_account.glade.h:3
-msgid "Publish presence information"
-msgstr "Publicera närvaro information"
-
-#: ../gtk-glade/sip_account.glade.h:4
-msgid "Register at startup"
-msgstr "Registrera vid start"
-
-#: ../gtk-glade/sip_account.glade.h:5
-msgid "Registration duration (sec):"
-msgstr "Registreringsfrekvens (sek.):"
-
-#: ../gtk-glade/sip_account.glade.h:6
-msgid "Route (optional):"
-msgstr "Route (tillval):"
-
-#: ../gtk-glade/sip_account.glade.h:7
-msgid "SIP Proxy address:"
-msgstr "SIP Proxy adress:"
-
-#: ../gtk-glade/sip_account.glade.h:8
-msgid "Your SIP identity:"
-msgstr "Din SIP identitet:"
-
-#: ../gtk-glade/sip_account.glade.h:11
-msgid "sip:"
-msgstr "sip:"
-
-#: ../gtk-glade/chatroom.glade.h:1
-msgid "Send"
-msgstr "Skicka"
-
-#: ../gtk-glade/incoming_call.glade.h:1
-msgid "Accept"
-msgstr "Godkänn"
-
-#: ../gtk-glade/incoming_call.glade.h:2
-msgid "Decline"
-msgstr "Avböj"
-
-#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
-msgid "Incoming call"
-msgstr "Inkommande samtal"
-
-#: ../gtk-glade/incoming_call.glade.h:4
-msgid "Incoming call from"
-msgstr "Inkommande samtal från"
-
-#: ../gtk-glade/incoming_call.glade.h:5
-msgid "Linphone - Incoming call"
-msgstr "Linphone - Inkommande samtal"
-
-#: ../gtk-glade/parameters.glade.h:1
-msgid "0 stands for \"unlimited\""
-msgstr "0 står för \"utan begränsning\""
-
-#: ../gtk-glade/parameters.glade.h:2
-msgid "<b>Audio</b>"
-msgstr "<b>Audio</b>"
-
-#: ../gtk-glade/parameters.glade.h:3
-msgid "<b>Bandwidth control</b>"
-msgstr "<b>Bandbreddskontroll</b>"
-
-#: ../gtk-glade/parameters.glade.h:4
-msgid "<b>Codecs</b>"
-msgstr "<b>Codecs</b>"
-
-#: ../gtk-glade/parameters.glade.h:5
-msgid "<b>Default identity</b>"
-msgstr "<b>Default identitet</b>"
-
-#: ../gtk-glade/parameters.glade.h:6
-msgid "<b>Language</b>"
-msgstr "<b>Språk</b>"
-
-#: ../gtk-glade/parameters.glade.h:7
-msgid "<b>NAT and Firewall</b>"
-msgstr "<b>NAT och Brandvägg</b>"
-
-#: ../gtk-glade/parameters.glade.h:8
-msgid "<b>Ports</b>"
-msgstr "<b>Portar</b>"
-
-#: ../gtk-glade/parameters.glade.h:9
-msgid "<b>Privacy</b>"
-msgstr "<b>Integritet</b>"
-
-#: ../gtk-glade/parameters.glade.h:10
-msgid "<b>Proxy accounts</b>"
-msgstr "<b>Proxy konton</b>"
-
-#: ../gtk-glade/parameters.glade.h:11
-msgid "<b>Transport</b>"
-msgstr "<b>Transport</b>"
-
-#: ../gtk-glade/parameters.glade.h:12
-msgid "<b>Video</b>"
-msgstr "<b>Video</b>"
-
-#: ../gtk-glade/parameters.glade.h:13
-msgid "ALSA special device (optional):"
-msgstr "ALSA speciell enhet (tillval):"
-
-#: ../gtk-glade/parameters.glade.h:14
-msgid "Add"
-msgstr "Lägg till"
-
-#: ../gtk-glade/parameters.glade.h:15
-msgid "Audio RTP/UDP:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:16
-msgid ""
-"Audio codecs\n"
-"Video codecs"
-msgstr ""
-"Audio codecs\n"
-"Video codecs"
-
-#: ../gtk-glade/parameters.glade.h:18
-msgid "Behind NAT / Firewall (specify gateway IP below)"
-msgstr "Bakom en NAT / brandvägg (specificera gatewap IP adress nedan)"
-
-#: ../gtk-glade/parameters.glade.h:19
-msgid "Behind NAT / Firewall (use STUN to resolve)"
-msgstr "Bakom en NAT / brandvägg (använd STUN för att avgöra adressen)"
-
-#: ../gtk-glade/parameters.glade.h:21
-msgid "CIF"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:22
-msgid "Capture device:"
-msgstr "Mikrofon enhet:"
-
-#: ../gtk-glade/parameters.glade.h:23
-msgid "Codecs"
-msgstr "Codecs"
-
-#: ../gtk-glade/parameters.glade.h:24
-msgid "Direct connection to the Internet"
-msgstr "Direkt förbindelse till Internet"
-
-#: ../gtk-glade/parameters.glade.h:25
-msgid "Disable"
-msgstr "Inaktivera"
-
-#: ../gtk-glade/parameters.glade.h:26
-msgid "Done"
-msgstr "Klar"
-
-#: ../gtk-glade/parameters.glade.h:27
-msgid "Download speed limit in Kbit/sec:"
-msgstr "Max downstream bandbreddshastighet i kbit/sek:"
-
-#: ../gtk-glade/parameters.glade.h:28
-msgid "Edit"
-msgstr "Editera"
-
-#: ../gtk-glade/parameters.glade.h:29
-msgid "Enable"
-msgstr "Möjliggör"
-
-#: ../gtk-glade/parameters.glade.h:30
-msgid "Enable echo cancellation"
-msgstr "Tillåta ekokancellering"
-
-#: ../gtk-glade/parameters.glade.h:31
-msgid "Erase all passwords"
-msgstr "Glöm alla lösenord"
-
-#: ../gtk-glade/parameters.glade.h:32
-msgid "Manage SIP Accounts"
-msgstr "Hantera SIP konton"
-
-#: ../gtk-glade/parameters.glade.h:33
-msgid "Multimedia settings"
-msgstr "Multimedia inställningar"
-
-#: ../gtk-glade/parameters.glade.h:34
-msgid "Network settings"
-msgstr "Nätverksinställningar"
-
-#: ../gtk-glade/parameters.glade.h:35
-msgid "Playback device:"
-msgstr "Uppspelningsenhet:"
-
-#: ../gtk-glade/parameters.glade.h:36
-msgid "Prefered video resolution:"
-msgstr "Video upplösning:"
-
-#: ../gtk-glade/parameters.glade.h:37
-msgid "Public IP address:"
-msgstr "Publik IP adress:"
-
-#: ../gtk-glade/parameters.glade.h:38
-msgid ""
-"Register to FONICS\n"
-"virtual network !"
-msgstr ""
-"Registrera hos FONICS\n"
-"virtuella nätverk!"
-
-#: ../gtk-glade/parameters.glade.h:40
-msgid "Remove"
-msgstr "Ta bort"
-
-#: ../gtk-glade/parameters.glade.h:41
-msgid "Ring device:"
-msgstr "Ringning enhet:"
-
-#: ../gtk-glade/parameters.glade.h:42
-msgid "Ring sound:"
-msgstr "Ring signal:"
-
-#: ../gtk-glade/parameters.glade.h:43
-msgid "SIP (UDP):"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:44
-msgid "Send DTMFs as SIP info"
-msgstr "Kicka DTMF koder som SIP info"
-
-#: ../gtk-glade/parameters.glade.h:45
-msgid "Set Maximum Transmission Unit:"
-msgstr "Välj MTU (Maximum Transmission Unit):"
-
-#: ../gtk-glade/parameters.glade.h:46
-msgid "Settings"
-msgstr "Inställningar"
-
-#: ../gtk-glade/parameters.glade.h:47
-msgid "Stun server:"
-msgstr "STUN server:"
-
-#: ../gtk-glade/parameters.glade.h:48
-msgid "This section defines your SIP address when not using a SIP account"
-msgstr ""
-"Denna sektion specificerar din SIP adress när du inte använder ett SIP konto"
-
-#: ../gtk-glade/parameters.glade.h:49
-msgid "Upload speed limit in Kbit/sec:"
-msgstr "Max upstream bandbreddshastighet i kbit/sek:"
-
-#: ../gtk-glade/parameters.glade.h:50
-msgid "Use IPv6 instead of IPv4"
-msgstr "Använd IPv6 istället av IPv4"
-
-#: ../gtk-glade/parameters.glade.h:51
-msgid "User interface"
-msgstr "Användarinterface:"
-
-#: ../gtk-glade/parameters.glade.h:52
-msgid "Video RTP/UDP:"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:53
-msgid "Video input device:"
-msgstr "Video ingångsenhet:"
-
-#: ../gtk-glade/parameters.glade.h:54
-msgid "Your display name (eg: John Doe):"
-msgstr "Ditt synliga namn, e.g. Kalle Karlsson:"
-
-#: ../gtk-glade/parameters.glade.h:55
-msgid "Your resulting SIP address:"
-msgstr "Din SIP adress:"
-
-#: ../gtk-glade/parameters.glade.h:56
-msgid "Your username:"
-msgstr "Ditt användarnamn:"
-
-#: ../gtk-glade/parameters.glade.h:57
-msgid "a sound card\n"
-msgstr "ett ljud kort\n"
-
-#: ../gtk-glade/parameters.glade.h:59
-msgid "default camera"
-msgstr "default kamera"
-
-#: ../gtk-glade/parameters.glade.h:60
-msgid "default soundcard"
-msgstr "default ljudkort"
-
-#: ../gtk-glade/parameters.glade.h:61
-msgid "default soundcard\n"
-msgstr "default ljudkort\n"
-
-#: ../gtk-glade/parameters.glade.h:63
-msgid "gtk-go-down"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:64
-msgid "gtk-go-up"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:65
-msgid "gtk-media-play"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:1
-msgid "<b>Search somebody</b>"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:2
-msgid "Add to my list"
-msgstr "Lägg till till min lista"
-
-#: ../gtk-glade/buddylookup.glade.h:3
-msgid "Search contacts in directory"
-msgstr "Sök för kontakter i katalogen"
-
-#: ../gtk-glade/waiting.glade.h:1
-msgid "Linphone"
-msgstr "Apropå linphone"
-
-#: ../gtk-glade/waiting.glade.h:2
-msgid "Please wait"
-msgstr "Vänta"
-
-#: ../coreapi/linphonecore.c:195
-#, c-format
-msgid "You have missed %i call."
-msgid_plural "You have missed %i calls."
-msgstr[0] "Du har %i missat samtal"
-msgstr[1] "Du har %i missade samtal"
-
-#: ../coreapi/linphonecore.c:223
-msgid "aborted"
-msgstr "avbrytade"
-
-#: ../coreapi/linphonecore.c:226
-msgid "completed"
-msgstr "avslutade"
-
-#: ../coreapi/linphonecore.c:229
-msgid "missed"
-msgstr "missade"
-
-#: ../coreapi/linphonecore.c:234
-#, c-format
-msgid ""
-"%s at %s\n"
-"From: %s\n"
-"To: %s\n"
-"Status: %s\n"
-"Duration: %i mn %i sec\n"
-msgstr ""
-"%s på %s\n"
-"Från: %s\n"
-"Till: %s\n"
-"Status: %s\n"
-"Längd: %i min %i sek\n"
-
-#: ../coreapi/linphonecore.c:235
-msgid "Outgoing call"
-msgstr "Utgående samtal"
-
-#: ../coreapi/linphonecore.c:445
-msgid ""
-"Your machine appears to be connected to an IPv6 network. By default linphone "
-"always uses IPv4. Please update your configuration if you want to use IPv6"
-msgstr ""
-"Din dator verkar vara kopplad till ett IPv6 nätverk. Default, använder "
-"linphone IPv4. Uppdatera din konfiguration om du vill använda IPv6."
-
-#: ../coreapi/linphonecore.c:739
-msgid "Ready"
-msgstr "Redo"
-
-#: ../coreapi/linphonecore.c:1014
-msgid "Remote end seems to have disconnected, the call is going to be closed."
-msgstr "Motparten verkar ha avbrutit samtalet, samtalet kommer att avslutas."
-
-#: ../coreapi/linphonecore.c:1172
-msgid "Looking for telephone number destination..."
-msgstr "Leta efter telefonnummer för destinationen..."
-
-#: ../coreapi/linphonecore.c:1174
-msgid "Could not resolve this number."
-msgstr "Kan inte nå dett nummer."
-
-#: ../coreapi/linphonecore.c:1239
-msgid ""
-"Could not parse given sip address. A sip url usually looks like sip:"
-"user@domain"
-msgstr ""
-"Kan inte förstå angiven SIP adress. En SIP adress vanligen ser ut som sip:"
-"användare@domänen"
-
-#: ../coreapi/linphonecore.c:1340
-msgid "Sorry, having multiple simultaneous calls is not supported yet !"
-msgstr "Förlåt, men linphone stödjer inte flera samtliga samtal än!"
-
-#: ../coreapi/linphonecore.c:1387
-msgid "Contacting"
-msgstr "Kontaktar"
-
-#: ../coreapi/linphonecore.c:1402
-msgid "could not call"
-msgstr "Kunde inte ringa"
-
-#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
-msgid "Connected."
-msgstr "Kopplad"
-
-#: ../coreapi/linphonecore.c:1813
-msgid "Call ended"
-msgstr "Samtalet slut"
-
-#: ../coreapi/linphonecore.c:2175
-msgid "No nat/firewall address supplied !"
-msgstr "Ingen NAT / brandväggs adress angiven!"
-
-#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
-#, c-format
-msgid "Invalid nat address '%s' : %s"
-msgstr "Fel NAT adress '%s': %s"
-
-#: ../coreapi/misc.c:134
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the pcm oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-"'modprobe snd-pcm-oss' as root to load it."
-msgstr ""
-"Din dator verkar använda ALSA drivrutiner för ljud.\n"
-"Detta är det bästa valet. Dock PCM OSS emuleringsmodulen\n"
-"saknas och linphone behöver ha det. Var god exekvera\n"
-"'modprobe snd-pcm-oss' som root för att ladda in den."
-
-#: ../coreapi/misc.c:137
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the mixer oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-" 'modprobe snd-mixer-oss' as root to load it."
-msgstr ""
-"Din dator verkar använda ALSA drivrutiner för ljud.\n"
-"Detta är det bästa valet. Dock OSS mixer emuleringsmodulen\n"
-"saknas och linphone behöver ha det. Var god exekvera\n"
-"'modprobe snd-mixer-oss' som root för att ladda in den."
-
-#: ../coreapi/misc.c:610
-msgid "Stun lookup in progress..."
-msgstr "STUN uppslagning pågår..."
-
-#: ../coreapi/exevents.c:127
-msgid "Call terminated."
-msgstr "Samtalet slut."
-
-#: ../coreapi/exevents.c:149
-msgid "Could not reach destination."
-msgstr "Kunde inte nå motparten."
-
-#: ../coreapi/exevents.c:158
-msgid "User is busy."
-msgstr "Användare upptagen."
-
-#: ../coreapi/exevents.c:159
-msgid "User is temporarily unavailable."
-msgstr "Användaren temporärt inte tillgänglig."
-
-#: ../coreapi/exevents.c:160
-msgid "Request Cancelled."
-msgstr "Förfrågan avbruten."
-
-#. char *retrymsg=_("%s. Retry after %i minute(s).");
-#: ../coreapi/exevents.c:162
-msgid "User does not want to be disturbed."
-msgstr "Användaren vill inte bli störd."
-
-#: ../coreapi/exevents.c:163
-msgid "Call declined."
-msgstr "Samtalet avböjdes."
-
-#: ../coreapi/exevents.c:191
-msgid "Bad request"
-msgstr "Fel förfråga."
-
-#: ../coreapi/exevents.c:194
-msgid "User cannot be found at given address."
-msgstr "Användaren kan inte hittas vid den angivna adressen."
-
-#: ../coreapi/exevents.c:197
-msgid "Remote user cannot support any of proposed codecs."
-msgstr "Motparten stödjer ingen av de föreslagna codecs."
-
-#. time out, call leg is lost
-#: ../coreapi/exevents.c:227
-msgid "Timeout."
-msgstr "time out."
-
-#: ../coreapi/exevents.c:230
-msgid "Remote host was found but refused connection."
-msgstr "Motparten hittades men ville inte ta emot samtalet."
-
-#: ../coreapi/exevents.c:339
-msgid "is contacting you."
-msgstr "kontaktar dig."
-
-#: ../coreapi/exevents.c:424
-#, c-format
-msgid "Redirected to %s..."
-msgstr "Omdirigerat till %s..."
-
-#: ../coreapi/exevents.c:440
-msgid ""
-"User is not reachable at the moment but he invites you\n"
-"to contact him using the following alternate resource:"
-msgstr ""
-"Användaren kan inte nås för tillfället men han/hon ber dig\att kontakta "
-"honom/henna vid följande resurs:"
-
-#: ../coreapi/exevents.c:861
-msgid "Early media."
-msgstr "Tidig media"
-
-#: ../coreapi/exevents.c:972
-#, c-format
-msgid "Registration on %s failed: %s"
-msgstr "Registrering hos %s mislyckades: %s"
-
-#: ../coreapi/exevents.c:972
-msgid "no response timeout"
-msgstr "Inget svar inom angiven tid"
-
-#: ../coreapi/exevents.c:998
-#, c-format
-msgid "Registration on %s successful."
-msgstr "Registrering hos %s lyckades."
-
-#: ../coreapi/exevents.c:999
-#, c-format
-msgid "Unregistration on %s done."
-msgstr "Avregistrering hos %s lyckades."
-
-#. people for which we don't have yet an answer should appear as offline
-#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
-msgid "Gone"
-msgstr "Har gått"
-
-#: ../coreapi/presence.c:129
-msgid "Waiting for Approval"
-msgstr "Väntar för godkännandet"
-
-#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
-msgid "Online"
-msgstr "Online"
-
-#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
-msgid "Busy"
-msgstr "Upptagen"
-
-#: ../coreapi/presence.c:142
-msgid "Be Right Back"
-msgstr "Kommer strax tillbaka"
-
-#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
-msgid "Away"
-msgstr "Borta"
-
-#: ../coreapi/presence.c:151
-msgid "On The Phone"
-msgstr "På telefon"
-
-#: ../coreapi/presence.c:156
-msgid "Out To Lunch"
-msgstr "Lunchar"
-
-#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
-msgid "Closed"
-msgstr "Stängt"
-
-#: ../coreapi/friend.c:35
-msgid "Unknown"
-msgstr "Okänd"
-
-#: ../coreapi/friend.c:44
-#, fuzzy
-msgid "Be right back"
-msgstr "Kommer strax tillbaka"
-
-#: ../coreapi/friend.c:50
-#, fuzzy
-msgid "On the phone"
-msgstr "På telefon"
-
-#: ../coreapi/friend.c:53
-#, fuzzy
-msgid "Out to lunch"
-msgstr "Lunchar"
-
-#: ../coreapi/friend.c:56
-msgid "Do not disturb"
-msgstr "Stör ej"
-
-#: ../coreapi/friend.c:59
-msgid "Moved"
-msgstr "Flyttat"
-
-#: ../coreapi/friend.c:62
-msgid "Using another messaging service"
-msgstr "Använder en annan tjänst"
-
-#: ../coreapi/friend.c:65
-msgid "Offline"
-msgstr "Offline"
-
-#: ../coreapi/friend.c:68
-msgid "Pending"
-msgstr "Pågående"
-
-#: ../coreapi/friend.c:74
-msgid "Unknown-bug"
-msgstr ""
-
-#: ../coreapi/proxy.c:221
-msgid ""
-"The sip proxy address you entered is invalid, it must start with \"sip:\" "
-"followed by a hostname."
-msgstr ""
-"SIP proxy adressen som du matade in är inte rätt, adressen måste starta med "
-"\"sip:\", följd av ett hostnamn"
-
-#: ../coreapi/proxy.c:227
-msgid ""
-"The sip identity you entered is invalid.\n"
-"It should look like sip:username@proxydomain, such as sip:alice@example.net"
-msgstr ""
-"SIP adressen som du matade in är inte rätt. Adressen borde se ut som sip:"
-"namn@domän, såsom sip:peter@exempel.se"
-
-#: ../coreapi/proxy.c:634
-#, c-format
-msgid "Could not login as %s"
-msgstr "Kunde inte logga in som %s"
-
-#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
-msgid "ITU-G.711 alaw encoder"
-msgstr ""
-
-#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
-msgid "ITU-G.711 alaw decoder"
-msgstr ""
-
-#: ../mediastreamer2/src/alsa.c:923
-msgid "Alsa sound source"
-msgstr "Alsa ljud ingång"
-
-#: ../mediastreamer2/src/alsa.c:1027
-msgid "Alsa sound output"
-msgstr "Also ljud utgång"
-
-#: ../mediastreamer2/src/aqsnd.c:891
-msgid "Sound capture filter for MacOS X Audio Queue Service"
-msgstr ""
-
-#: ../mediastreamer2/src/aqsnd.c:915
-msgid "Sound playback filter for MacOS X Audio Queue Service"
-msgstr ""
-
-#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
-msgid "DTMF generator"
-msgstr "DTMF generare"
-
-#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
-msgid "The GSM full-rate codec"
-msgstr "Hög hastighet GSM codec"
-
-#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
-msgid "The GSM codec"
-msgstr "GSM codec"
-
-#: ../mediastreamer2/src/macsnd.c:670
-msgid "Sound capture filter for MacOS X Core Audio drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/macsnd.c:684
-msgid "Sound playback filter for MacOS X Core Audio drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
-msgid "A filter to make conferencing"
-msgstr "Ett filter för konferens"
-
-#: ../mediastreamer2/src/msfileplayer.c:295
-#: ../mediastreamer2/src/msfileplayer.c:313
-msgid "Raw files and wav reader"
-msgstr "Raw filer och WAV läsare"
-
-#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
-#: ../mediastreamer2/src/msfilerec_win.c:216
-#: ../mediastreamer2/src/msfilerec_win.c:234
-msgid "Wav file recorder"
-msgstr "WAV fil inspelare"
-
-#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
-msgid "A filter that send several inputs to one output."
-msgstr "En filter som skickar flera ingångar till en utgång"
-
-#: ../mediastreamer2/src/msresample.c:221
-#: ../mediastreamer2/src/msresample.c:239
-msgid "frequency resampler"
-msgstr ""
-
-#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
-msgid "RTP output filter"
-msgstr ""
-
-#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
-msgid "RTP input filter"
-msgstr ""
-
-#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
-#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
-msgid "The free and wonderful speex codec"
-msgstr "Den fria speex codec"
-
-#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
-msgid "A filter that controls and measure sound volume"
-msgstr "Ett filter som kontrollerar och mäter ljudvolym"
-
-#: ../mediastreamer2/src/msv4l.c:1009
-msgid "A video4linux compatible source filter to stream pictures."
-msgstr "En video4linux kompatibel ingångsfilter för att strömma bilder"
-
-#: ../mediastreamer2/src/msv4l2.c:458
-msgid "A filter to grab pictures from Video4Linux2-powered cameras"
-msgstr "En filter för att fånga bilder från Video4Linux-2 capabla kameror"
-
-#: ../mediastreamer2/src/nowebcam.c:1780
-msgid "A filter that outputs a static image."
-msgstr "En filter med statisk bild"
-
-#: ../mediastreamer2/src/oss.c:567
-msgid "Sound capture filter for OSS drivers"
-msgstr "Fånga ljud med OSS drivrutiner"
-
-#: ../mediastreamer2/src/oss.c:581
-msgid "Sound playback filter for OSS drivers"
-msgstr "Ljud utgång med OSS drivrutiner"
-
-#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
-msgid "A pixel format converter"
-msgstr "En pixel format konverterare"
-
-#: ../mediastreamer2/src/sizeconv.c:204
-msgid "A video size converter"
-msgstr "En video storlek konverterare"
-
-#: ../mediastreamer2/src/sizeconv.c:222
-msgid "a small video size converter"
-msgstr "En liten video storlek konverterare"
-
-#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
-msgid "Echo canceler using speex library"
-msgstr "Echo cancellering med hjälp av speex"
-
-#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
-msgid "A filter that reads from input and copy to its multiple outputs."
-msgstr ""
-"En filter som läser från sin ingång och kopierar till multipla utgångar"
-
-#: ../mediastreamer2/src/theora.c:375
-msgid "The theora video encoder from xiph.org"
-msgstr "Theora video encoder från xiph.org"
-
-#: ../mediastreamer2/src/theora.c:393
-msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
-msgstr "Theora video codec från xiph.org, öppen källkod och utan royalties"
-
-#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
-msgid "The theora video decoder from xiph.org"
-msgstr "Theora video decoder från xiph.org"
-
-#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
-msgid "ITU-G.711 ulaw encoder"
-msgstr ""
-
-#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
-msgid "ITU-G.711 ulaw decoder"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
-#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
-msgid "A H.263 decoder using ffmpeg library"
-msgstr "En h.263 decoder via ffmpeg"
-
-#: ../mediastreamer2/src/videodec.c:688
-msgid "A MPEG4 decoder using ffmpeg library"
-msgstr "En MPEG4 decoder via ffmpeg"
-
-#: ../mediastreamer2/src/videodec.c:704
-#, fuzzy
-msgid "A RTP/JPEG decoder using ffmpeg library"
-msgstr "En MJPEG decode via ffmpeg"
-
-#: ../mediastreamer2/src/videodec.c:720
-msgid "A MJPEG decoder using ffmpeg library"
-msgstr "En MJPEG decode via ffmpeg"
-
-#: ../mediastreamer2/src/videodec.c:736
-msgid "A snow decoder using ffmpeg library"
-msgstr "En snow decoder via ffmpeg"
-
-#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
-msgid "A video H.263 encoder using ffmpeg library."
-msgstr "En video h.263 encoder via ffmpeg"
-
-#: ../mediastreamer2/src/videoenc.c:856
-msgid ""
-"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
-"spec."
-msgstr ""
-"En video h.263 encoder via ffmpeg, kompatibel med den gamla RFC2190 "
-"specificationen."
-
-#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
-msgid "A video MPEG4 encoder using ffmpeg library."
-msgstr "En video MPEG4 encoder via ffmpeg"
-
-#: ../mediastreamer2/src/videoenc.c:888
-msgid "A video snow encoder using ffmpeg library."
-msgstr "En video snow encoder via ffmpeg"
-
-#: ../mediastreamer2/src/videoenc.c:904
-#, fuzzy
-msgid "A RTP/MJPEG encoder using ffmpeg library."
-msgstr "En MJPEG decode via ffmpeg"
-
-#: ../mediastreamer2/src/videoenc.c:938
-msgid ""
-"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
-msgstr ""
-"En video h.263 encoder via ffmpeg, kompatible med den gamla RFC2190 "
-"specifikationen."
-
-#: ../mediastreamer2/src/videoenc.c:970
-msgid ""
-"The snow codec is royalty-free and is open-source. \n"
-"It uses innovative techniques that makes it one of most promising video "
-"codec. It is implemented within the ffmpeg project.\n"
-"However it is under development, quite unstable and compatibility with other "
-"versions cannot be guaranteed."
-msgstr ""
-"Snow codec:en är öppen källkod och utan royalties.\n"
-"Den använder sig av innovativa tekniker som gör den en av de bästa. Codec:en "
-"implementeras inom ffmpeg projektet.\n"
-"Dock, den är under utveckling och kompatibiliteten mellan versioner kan inte "
-"garanteras."
-
-#: ../mediastreamer2/src/videoenc.c:990
-#, fuzzy
-msgid "A MJPEG encoder using ffmpeg library."
-msgstr "En MJPEG decode via ffmpeg"
-
-#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
-msgid "A generic video display"
-msgstr "En generisk video utgång"
-
-#: ../mediastreamer2/src/wincevideods.c:966
-#: ../mediastreamer2/src/wincevideods.c:984
-#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
-#: ../mediastreamer2/src/winvideods.c:1306
-#: ../mediastreamer2/src/winvideods.c:1324
-msgid "A video4windows compatible source filter to stream pictures."
-msgstr "En video4windows kompatibel ingångsfilter för att strömma bilder."
-
-#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
-msgid "A video for windows (vfw.h) based source filter to grab pictures."
-msgstr "En video för windows kompatibel ingångsfilter för att fånga bilder."
-
-#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
-msgid "ICE filter"
-msgstr ""
-
-#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
-msgid "A filter that trashes its input (useful for terminating some graphs)."
-msgstr ""
-
-#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
-msgid "Parametric sound equalizer."
-msgstr ""
-
-#: ../mediastreamer2/src/msdscap-mingw.cc:1003
-msgid "A webcam grabber based on directshow."
-msgstr ""
-
-#~ msgid "Bresilian"
-#~ msgstr "Brasiliansk"
-
-#~ msgid "Homepage"
-#~ msgstr "Hemsidan"
-
-#~ msgid "Show debug window"
-#~ msgstr "Visa debugfönstret"
-
-#~ msgid "_View"
-#~ msgstr "_Vy"
-
-#~ msgid "A filter to make level measurements on 16 bits pcm audio stream"
-#~ msgstr "En filter för att mäta nivåer på 16 bitars PCM audio strömmar"
-
-#~ msgid "A video display window using SDL"
-#~ msgstr "En video utgångsfönster med SDL"
diff --git a/linphone/po/zh_CN.po b/linphone/po/zh_CN.po
deleted file mode 100644 (file)
index d2817bb..0000000
+++ /dev/null
@@ -1,1583 +0,0 @@
-# SIP Telephony Application.
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-# Simon Morlat <linphone@free.fr>, 2001.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: linphone 0.7.1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-10-16 15:24+0200\n"
-"PO-Revision-Date: 2009-09-24 18:39+0300\n"
-"Last-Translator: Jiang Honglei<jhonglei@gmail.com>\n"
-"Language-Team: Jiang Honglei<jhonglei@gmail.com>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
-#: ../gtk-glade/support.c:102
-#, c-format
-msgid "Couldn't find pixmap file: %s"
-msgstr "无法打开图像文件: %s"
-
-#: ../gtk-glade/chat.c:27
-#, c-format
-msgid "Chat with %s"
-msgstr "与 %s 聊天"
-
-#: ../gtk-glade/main.c:90
-msgid "log to stdout some debug information while running."
-msgstr ""
-
-#: ../gtk-glade/main.c:97
-msgid "Start only in the system tray, do not show the main interface."
-msgstr ""
-
-#: ../gtk-glade/main.c:104
-msgid "address to call right now"
-msgstr ""
-
-#: ../gtk-glade/main.c:111
-msgid "if set automatically answer incoming calls"
-msgstr "是否设置呼叫自动应答"
-
-#: ../gtk-glade/main.c:119
-msgid ""
-"Specifiy a working directory (should be the base of the installation, eg: c:"
-"\\Program Files\\Linphone)"
-msgstr ""
-
-#: ../gtk-glade/main.c:675
-#, c-format
-msgid "Incoming call from %s"
-msgstr "来自 %s 的呼叫"
-
-#: ../gtk-glade/main.c:707
-#, c-format
-msgid ""
-"%s would like to add you to his contact list.\n"
-"Would you allow him to see your presence status or add him to your contact "
-"list ?\n"
-"If you answer no, this person will be temporarily blacklisted."
-msgstr ""
-"%s 想加你为好友。\n"
-"你是否允许他看到你的在线状态或者将它加为你的好友允许?\n"
-"如果你回答否,则会将该人临时性的放入黑名单"
-
-#: ../gtk-glade/main.c:777
-#, fuzzy, c-format
-msgid ""
-"Please enter your password for username <i>%s</i>\n"
-" at domain <i>%s</i>:"
-msgstr "请输入你的密码 %s:"
-
-#: ../gtk-glade/main.c:871
-msgid "Website link"
-msgstr ""
-
-#: ../gtk-glade/main.c:907
-msgid "Linphone - a video internet phone"
-msgstr "Linphone - 互联网视频电话"
-
-#: ../gtk-glade/main.c:926
-#, c-format
-msgid "%s (Default)"
-msgstr "%s (缺省)"
-
-#: ../gtk-glade/main.c:1168
-msgid "A free SIP video-phone"
-msgstr "免费的 SIP 视频电话"
-
-#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
-#: ../gtk-glade/contact.glade.h:3
-msgid "Name"
-msgstr "名字"
-
-#: ../gtk-glade/friendlist.c:212
-msgid "Presence status"
-msgstr "在线状态"
-
-#: ../gtk-glade/friendlist.c:243
-#, c-format
-msgid "Search in %s directory"
-msgstr "在 %s 目录中查找 "
-
-#: ../gtk-glade/friendlist.c:432
-msgid "Invalid sip contact !"
-msgstr "无效的SIP contact"
-
-#: ../gtk-glade/friendlist.c:474
-#, c-format
-msgid "Call %s"
-msgstr "呼叫 %s"
-
-#: ../gtk-glade/friendlist.c:475
-#, c-format
-msgid "Send text to %s"
-msgstr "发送消息给 %s"
-
-#: ../gtk-glade/friendlist.c:476
-#, c-format
-msgid "Edit contact '%s'"
-msgstr "编辑好友 '%s'"
-
-#: ../gtk-glade/friendlist.c:477
-#, c-format
-msgid "Delete contact '%s'"
-msgstr "删除好友 '%s'"
-
-#: ../gtk-glade/friendlist.c:519
-#, c-format
-msgid "Add new contact from %s directory"
-msgstr "从 %s 目录增加好友 "
-
-#: ../gtk-glade/propertybox.c:251
-msgid "Rate (Hz)"
-msgstr "采样率 (Hz)"
-
-#: ../gtk-glade/propertybox.c:257
-msgid "Status"
-msgstr "状态"
-
-#: ../gtk-glade/propertybox.c:263
-msgid "Min bitrate (kbit/s)"
-msgstr "最小速率 (kbit/s)"
-
-#: ../gtk-glade/propertybox.c:269
-msgid "Parameters"
-msgstr "参数设置"
-
-#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
-msgid "Enabled"
-msgstr "启用"
-
-#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
-msgid "Disabled"
-msgstr "禁用"
-
-#: ../gtk-glade/propertybox.c:480
-msgid "Account"
-msgstr "账号"
-
-#: ../gtk-glade/propertybox.c:620
-msgid "English"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:621
-msgid "French"
-msgstr "Français"
-
-#: ../gtk-glade/propertybox.c:622
-msgid "Swedish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:623
-msgid "Italian"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:624
-msgid "Spanish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:625
-msgid "Brazilian Portugese"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:626
-msgid "Polish"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:627
-msgid "German"
-msgstr ""
-
-#: ../gtk-glade/propertybox.c:628
-msgid "Russian"
-msgstr "русский язык"
-
-#: ../gtk-glade/propertybox.c:629
-msgid "Japanese"
-msgstr "日本語"
-
-#: ../gtk-glade/propertybox.c:630
-msgid "Dutch"
-msgstr "Nederlands"
-
-#: ../gtk-glade/propertybox.c:631
-msgid "Hungarian"
-msgstr "Magyar"
-
-#: ../gtk-glade/propertybox.c:632
-msgid "Czech"
-msgstr "čeština"
-
-#: ../gtk-glade/propertybox.c:633
-msgid "Chinese"
-msgstr "简体中文"
-
-#: ../gtk-glade/propertybox.c:690
-msgid ""
-"You need to restart linphone for the new language selection to take effect."
-msgstr "你需要重新启动linphone以使你的语言选择生效"
-
-#: ../gtk-glade/update.c:80
-#, c-format
-msgid ""
-"A more recent version is availalble from %s.\n"
-"Would you like to open a browser to download it ?"
-msgstr ""
-
-#: ../gtk-glade/update.c:91
-msgid "You are running the lastest version."
-msgstr ""
-
-#: ../gtk-glade/buddylookup.c:66
-msgid "Firstname, Lastname"
-msgstr "姓 ,名"
-
-#: ../gtk-glade/buddylookup.c:73
-#, fuzzy
-msgid "SIP address"
-msgstr "SIP 地址"
-
-#: ../gtk-glade/buddylookup.c:121
-msgid "Error communicating with server."
-msgstr "与服务器通讯失败"
-
-#: ../gtk-glade/buddylookup.c:125
-msgid "Connecting..."
-msgstr "正在连接..."
-
-#: ../gtk-glade/buddylookup.c:129
-msgid "Connected"
-msgstr "已连接"
-
-#: ../gtk-glade/buddylookup.c:133
-msgid "Receiving data..."
-msgstr "正在接收数据..."
-
-#: ../gtk-glade/buddylookup.c:141
-#, c-format
-msgid "Found %i contact"
-msgid_plural "Found %i contacts"
-msgstr[0] "找到 %i 联系方式"
-msgstr[1] "找到 %i 联系方式(多个)"
-
-#: ../gtk-glade/setupwizard.c:25
-msgid ""
-"Welcome !\n"
-"This assistant will help you to use a SIP account for your calls."
-msgstr ""
-"欢迎使用linphone!\n"
-"该设置向导用于帮助你配置打网络电话的SIP账号"
-
-#: ../gtk-glade/setupwizard.c:34
-msgid "Create an account by choosing a username"
-msgstr "通过选择一个用户名创建一个新的账户"
-
-#: ../gtk-glade/setupwizard.c:35
-msgid "I have already an account and just want to use it"
-msgstr "我已经有一个账号,并想使用原来的账号"
-
-#: ../gtk-glade/setupwizard.c:53
-msgid "Please choose a username:"
-msgstr "请选择用户名:"
-
-#: ../gtk-glade/setupwizard.c:54
-msgid "Username:"
-msgstr "用户名:"
-
-#: ../gtk-glade/setupwizard.c:92
-#, c-format
-msgid "Checking if '%s' is available..."
-msgstr "检查'%s'是否可用"
-
-#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
-msgid "Please wait..."
-msgstr "请等待..."
-
-#: ../gtk-glade/setupwizard.c:101
-msgid "Sorry this username already exists. Please try a new one."
-msgstr "对不起,该用户已经存在"
-
-#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
-msgid "Ok !"
-msgstr "成功!"
-
-#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
-msgid "Communication problem, please try again later."
-msgstr "连接错误,请稍后重试。"
-
-#: ../gtk-glade/setupwizard.c:134
-msgid "Thank you. Your account is now configured and ready for use."
-msgstr "Thank you.你的账号已经可以使用"
-
-#: ../gtk-glade/setupwizard.c:228
-msgid "Welcome to the account setup assistant"
-msgstr "欢迎使用账号设置向导"
-
-#: ../gtk-glade/setupwizard.c:232
-msgid "Account setup assistant"
-msgstr "账号设置向导"
-
-#: ../gtk-glade/setupwizard.c:236
-#, fuzzy
-msgid "Choosing a username"
-msgstr "选择用户名:"
-
-#: ../gtk-glade/setupwizard.c:240
-msgid "Verifying"
-msgstr "验证中"
-
-#: ../gtk-glade/setupwizard.c:244
-#, fuzzy
-msgid "Confirmation"
-msgstr "确认"
-
-#: ../gtk-glade/setupwizard.c:249
-msgid "Creating your account"
-msgstr "正在创建您的账号"
-
-#: ../gtk-glade/setupwizard.c:253
-msgid "Now ready !"
-msgstr "就绪!"
-
-#: ../gtk-glade/incall_view.c:98
-#, fuzzy
-msgid "<b>Calling...</b>"
-msgstr "<b>正在呼叫...</b>"
-
-#: ../gtk-glade/incall_view.c:122
-#, fuzzy
-msgid "<b>In call with</b>"
-msgstr "<b>呼入</b>"
-
-#: ../gtk-glade/incall_view.c:124
-msgid "00::00::00"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:140
-#, c-format
-msgid "%02i::%02i::%02i"
-msgstr ""
-
-#: ../gtk-glade/incall_view.c:158
-#, fuzzy
-msgid "<b>Call ended.</b>"
-msgstr "<b>通话结束</b>"
-
-#: ../gtk-glade/incall_view.c:176
-#, fuzzy
-msgid "Unmute"
-msgstr "静音"
-
-#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
-msgid "Mute"
-msgstr "静音"
-
-#: ../gtk-glade/loginframe.c:82
-#, fuzzy, c-format
-msgid "Please enter login information for %s"
-msgstr "请输入 %s 的登录信息:"
-
-#: ../gtk-glade/main.glade.h:1
-msgid "#"
-msgstr "#"
-
-#: ../gtk-glade/main.glade.h:2
-msgid "*"
-msgstr "*"
-
-#: ../gtk-glade/main.glade.h:3
-msgid "0"
-msgstr "0"
-
-#: ../gtk-glade/main.glade.h:4
-msgid "1"
-msgstr "1"
-
-#: ../gtk-glade/main.glade.h:5
-msgid "2"
-msgstr "2"
-
-#: ../gtk-glade/main.glade.h:6
-msgid "3"
-msgstr "3"
-
-#: ../gtk-glade/main.glade.h:7
-msgid "4"
-msgstr "4"
-
-#: ../gtk-glade/main.glade.h:8
-msgid "5"
-msgstr "5"
-
-#: ../gtk-glade/main.glade.h:9
-msgid "6"
-msgstr "6"
-
-#: ../gtk-glade/main.glade.h:10
-msgid "7"
-msgstr "7"
-
-#: ../gtk-glade/main.glade.h:11
-msgid "8"
-msgstr "8"
-
-#: ../gtk-glade/main.glade.h:12
-msgid "9"
-msgstr "9"
-
-#: ../gtk-glade/main.glade.h:13
-msgid "<b>Contact list</b>"
-msgstr "<b>好友列表</b>"
-
-#: ../gtk-glade/main.glade.h:14
-msgid "<b>Terminate call</b>"
-msgstr "挂断电话"
-
-#: ../gtk-glade/main.glade.h:15
-#, fuzzy
-msgid "<b>Welcome !</b>"
-msgstr "<b>欢迎 !</b>"
-
-#: ../gtk-glade/main.glade.h:16
-msgid "A"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:17
-msgid ""
-"ADSL\n"
-"Fiber Channel"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:19
-msgid ""
-"All users\n"
-"Online users"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:21
-msgid "Assistant"
-msgstr "配置向导"
-
-#: ../gtk-glade/main.glade.h:22
-msgid "Audio & Video"
-msgstr "音频 & 视频"
-
-#: ../gtk-glade/main.glade.h:23
-msgid "Audio only"
-msgstr "音频"
-
-#: ../gtk-glade/main.glade.h:24
-msgid "Automatically log me in"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:25
-msgid "B"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
-msgid "C"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:27
-msgid "Check for updates"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:28
-msgid "D"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:29
-msgid "Default"
-msgstr "缺省"
-
-#: ../gtk-glade/main.glade.h:30
-msgid "Digits"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:31
-msgid "Duration"
-msgstr "通话时间"
-
-#: ../gtk-glade/main.glade.h:32
-msgid "Duration:"
-msgstr "通话计时:"
-
-#: ../gtk-glade/main.glade.h:33
-msgid "Enable self-view"
-msgstr "启用self-view"
-
-#: ../gtk-glade/main.glade.h:34
-msgid "Enter username, phone number, or full sip address"
-msgstr "请输入用户名、电话号码或者SIP地址"
-
-#: ../gtk-glade/main.glade.h:35
-msgid "In call"
-msgstr "呼入"
-
-#: ../gtk-glade/main.glade.h:36
-msgid "Internet connection:"
-msgstr "网络连接:"
-
-#: ../gtk-glade/main.glade.h:37
-#, fuzzy
-msgid "Login information"
-msgstr "登陆信息"
-
-#: ../gtk-glade/main.glade.h:38
-msgid "Lookup:"
-msgstr "查找:"
-
-#: ../gtk-glade/main.glade.h:39
-msgid "Main view"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:41
-#, fuzzy
-msgid "My current identity:"
-msgstr "我的当前ID:"
-
-#: ../gtk-glade/main.glade.h:42
-#, fuzzy
-msgid "Password"
-msgstr "密码"
-
-#: ../gtk-glade/main.glade.h:43
-#, fuzzy
-msgid "SIP address or phone number:"
-msgstr "SIP地址或电话号码"
-
-#: ../gtk-glade/main.glade.h:44
-msgid "Show current call"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:45
-msgid "Start call"
-msgstr "开始呼叫"
-
-#: ../gtk-glade/main.glade.h:46
-msgid "Terminate call"
-msgstr "终止呼叫"
-
-#: ../gtk-glade/main.glade.h:47
-#, fuzzy
-msgid "Username"
-msgstr "用户名:"
-
-#: ../gtk-glade/main.glade.h:48
-#, fuzzy
-msgid "_Linphone"
-msgstr "_Linphone"
-
-#: ../gtk-glade/main.glade.h:49
-msgid "_Modes"
-msgstr "_模式"
-
-#: ../gtk-glade/main.glade.h:50
-#, fuzzy
-msgid "gtk-connect"
-msgstr "连接"
-
-#: ../gtk-glade/main.glade.h:51
-msgid "gtk-find"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:52
-msgid "in"
-msgstr ""
-
-#: ../gtk-glade/main.glade.h:53
-#, fuzzy
-msgid "label"
-msgstr "label"
-
-#: ../gtk-glade/about.glade.h:1
-msgid "About linphone"
-msgstr "关于 linphone"
-
-#: ../gtk-glade/about.glade.h:2
-msgid "An internet video phone using the standart SIP (rfc3261) protocol."
-msgstr "一个采用标准 SIP (rfc3261) 协议的互联网视频电话."
-
-#: ../gtk-glade/about.glade.h:3
-msgid "Created by Simon Morlat\n"
-msgstr "由Simon Morlat创建\n"
-
-#: ../gtk-glade/about.glade.h:5
-msgid ""
-"fr: Simon Morlat\n"
-"en: Simon Morlat and Delphine Perreau\n"
-"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
-"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
-"sv: Daniel Nylander <po@danielnylander.se>\n"
-"es: Jesus Benitez <gnelson at inMail dot sk>\n"
-"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
-"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
-"pl: Robert Nasiadek <darkone@darkone.pl>\n"
-"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
-"hu: anonymous\n"
-msgstr ""
-"fr: Simon Morlat\n"
-"en: Simon Morlat and Delphine Perreau\n"
-"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
-"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
-"sv: Daniel Nylander <po@danielnylander.se>\n"
-"es: Jesus Benitez <gnelson at inMail dot sk>\n"
-"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
-"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
-"pl: Robert Nasiadek <darkone@darkone.pl>\n"
-"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
-"hu: anonymous\n"
-"zh_CN: Jiang Honglei <hongleij@126.com>\n"
-
-#: ../gtk-glade/contact.glade.h:1
-#, fuzzy
-msgid "<b>Contact information</b>"
-msgstr "好友信息"
-
-#: ../gtk-glade/contact.glade.h:2
-msgid "Allow this contact to see my presence status"
-msgstr "允许此人看到我的在线状态"
-
-#: ../gtk-glade/contact.glade.h:4
-msgid "SIP Address"
-msgstr "SIP 地址"
-
-#: ../gtk-glade/contact.glade.h:5
-msgid "Show this contact presence status"
-msgstr "显示该好友的在线状态"
-
-#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
-#: ../gtk-glade/sip_account.glade.h:9
-msgid "gtk-cancel"
-msgstr ""
-
-#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
-#: ../gtk-glade/sip_account.glade.h:10
-msgid "gtk-ok"
-msgstr ""
-
-#: ../gtk-glade/log.glade.h:1
-msgid "Linphone debug window"
-msgstr "Linphone 调试窗口"
-
-#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
-#: ../gtk-glade/chatroom.glade.h:2
-msgid "gtk-close"
-msgstr ""
-
-#: ../gtk-glade/password.glade.h:1
-msgid "Linphone - Authentication required"
-msgstr "Linphone - 需要认证"
-
-#: ../gtk-glade/password.glade.h:2
-msgid "Password:"
-msgstr "密码:"
-
-#: ../gtk-glade/password.glade.h:3
-#, fuzzy
-msgid "Please enter the domain password"
-msgstr "请输入密码..."
-
-#: ../gtk-glade/password.glade.h:4
-msgid "UserID"
-msgstr ""
-
-#: ../gtk-glade/call_logs.glade.h:1
-msgid "Call history"
-msgstr "呼叫历史"
-
-#: ../gtk-glade/sip_account.glade.h:1
-msgid "Configure a SIP account"
-msgstr "配置 SIP 账户"
-
-#: ../gtk-glade/sip_account.glade.h:2
-msgid "Linphone - Configure a SIP account"
-msgstr "Linphone - 配置 SIP 账户"
-
-#: ../gtk-glade/sip_account.glade.h:3
-msgid "Publish presence information"
-msgstr "发布自己的在线状态"
-
-#: ../gtk-glade/sip_account.glade.h:4
-msgid "Register at startup"
-msgstr "在启动时注册"
-
-#: ../gtk-glade/sip_account.glade.h:5
-msgid "Registration duration (sec):"
-msgstr "注册间隔(秒):"
-
-#: ../gtk-glade/sip_account.glade.h:6
-msgid "Route (optional):"
-msgstr "路由 (可选项):"
-
-#: ../gtk-glade/sip_account.glade.h:7
-msgid "SIP Proxy address:"
-msgstr "SIP Proxy地址:"
-
-#: ../gtk-glade/sip_account.glade.h:8
-msgid "Your SIP identity:"
-msgstr "你的 SIP 账号:"
-
-#: ../gtk-glade/sip_account.glade.h:11
-msgid "sip:"
-msgstr "sip:"
-
-#: ../gtk-glade/chatroom.glade.h:1
-msgid "Send"
-msgstr "发送"
-
-#: ../gtk-glade/incoming_call.glade.h:1
-msgid "Accept"
-msgstr "接受"
-
-#: ../gtk-glade/incoming_call.glade.h:2
-msgid "Decline"
-msgstr "拒绝"
-
-#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
-msgid "Incoming call"
-msgstr "呼入"
-
-#: ../gtk-glade/incoming_call.glade.h:4
-msgid "Incoming call from"
-msgstr "来自"
-
-#: ../gtk-glade/incoming_call.glade.h:5
-msgid "Linphone - Incoming call"
-msgstr "Linphone - 呼入"
-
-#: ../gtk-glade/parameters.glade.h:1
-msgid "0 stands for \"unlimited\""
-msgstr "0 表示 \"没有限制\""
-
-#: ../gtk-glade/parameters.glade.h:2
-#, fuzzy
-msgid "<b>Audio</b>"
-msgstr "<b>音频</b>"
-
-#: ../gtk-glade/parameters.glade.h:3
-#, fuzzy
-msgid "<b>Bandwidth control</b>"
-msgstr "<b>带宽控制</b>"
-
-#: ../gtk-glade/parameters.glade.h:4
-msgid "<b>Codecs</b>"
-msgstr "<b>编码</b>"
-
-#: ../gtk-glade/parameters.glade.h:5
-msgid "<b>Default identity</b>"
-msgstr "<b>缺省账户</b>"
-
-#: ../gtk-glade/parameters.glade.h:6
-#, fuzzy
-msgid "<b>Language</b>"
-msgstr "<b>语言设置</b>"
-
-#: ../gtk-glade/parameters.glade.h:7
-#, fuzzy
-msgid "<b>NAT and Firewall</b>"
-msgstr "<b>NAT及防火墙</b>"
-
-#: ../gtk-glade/parameters.glade.h:8
-msgid "<b>Ports</b>"
-msgstr "<b>端口</b>"
-
-#: ../gtk-glade/parameters.glade.h:9
-msgid "<b>Privacy</b>"
-msgstr "<b>隐私</b>"
-
-#: ../gtk-glade/parameters.glade.h:10
-msgid "<b>Proxy accounts</b>"
-msgstr "<b>Proxy 账户</b>"
-
-#: ../gtk-glade/parameters.glade.h:11
-#, fuzzy
-msgid "<b>Transport</b>"
-msgstr "<b>传输协议</b>"
-
-#: ../gtk-glade/parameters.glade.h:12
-msgid "<b>Video</b>"
-msgstr "<b>视频</b>"
-
-#: ../gtk-glade/parameters.glade.h:13
-msgid "ALSA special device (optional):"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:14
-msgid "Add"
-msgstr "添加"
-
-#: ../gtk-glade/parameters.glade.h:15
-#, fuzzy
-msgid "Audio RTP/UDP:"
-msgstr "音频 RTP/UDP"
-
-#: ../gtk-glade/parameters.glade.h:16
-msgid ""
-"Audio codecs\n"
-"Video codecs"
-msgstr ""
-"音频编码\n"
-"视频编码"
-
-#: ../gtk-glade/parameters.glade.h:18
-msgid "Behind NAT / Firewall (specify gateway IP below)"
-msgstr "位于NAT或防火墙之后(请填写防火墙地址)"
-
-#: ../gtk-glade/parameters.glade.h:19
-msgid "Behind NAT / Firewall (use STUN to resolve)"
-msgstr "STUN服务器地址"
-
-#: ../gtk-glade/parameters.glade.h:21
-msgid "CIF"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:22
-#, fuzzy
-msgid "Capture device:"
-msgstr "录音设备"
-
-#: ../gtk-glade/parameters.glade.h:23
-msgid "Codecs"
-msgstr "编码"
-
-#: ../gtk-glade/parameters.glade.h:24
-msgid "Direct connection to the Internet"
-msgstr "直连"
-
-#: ../gtk-glade/parameters.glade.h:25
-msgid "Disable"
-msgstr "禁用"
-
-#: ../gtk-glade/parameters.glade.h:26
-msgid "Done"
-msgstr "确认"
-
-#: ../gtk-glade/parameters.glade.h:27
-#, fuzzy
-msgid "Download speed limit in Kbit/sec:"
-msgstr "下传速率限制 kbit/sec"
-
-#: ../gtk-glade/parameters.glade.h:28
-msgid "Edit"
-msgstr "编辑"
-
-#: ../gtk-glade/parameters.glade.h:29
-msgid "Enable"
-msgstr "启用"
-
-#: ../gtk-glade/parameters.glade.h:30
-msgid "Enable echo cancellation"
-msgstr "启用回声抑制"
-
-#: ../gtk-glade/parameters.glade.h:31
-msgid "Erase all passwords"
-msgstr "删除所有编码"
-
-#: ../gtk-glade/parameters.glade.h:32
-msgid "Manage SIP Accounts"
-msgstr "SIP账户管理"
-
-#: ../gtk-glade/parameters.glade.h:33
-msgid "Multimedia settings"
-msgstr "音视频设置"
-
-#: ../gtk-glade/parameters.glade.h:34
-msgid "Network settings"
-msgstr "网络设置"
-
-#: ../gtk-glade/parameters.glade.h:35
-msgid "Playback device:"
-msgstr "回放设备"
-
-#: ../gtk-glade/parameters.glade.h:36
-msgid "Prefered video resolution:"
-msgstr "视频分辨率"
-
-#: ../gtk-glade/parameters.glade.h:37
-msgid "Public IP address:"
-msgstr "公网 IP 地址"
-
-#: ../gtk-glade/parameters.glade.h:38
-msgid ""
-"Register to FONICS\n"
-"virtual network !"
-msgstr ""
-"注册到 FONICS\n"
-"虚拟网络!"
-
-#: ../gtk-glade/parameters.glade.h:40
-msgid "Remove"
-msgstr "移除"
-
-#: ../gtk-glade/parameters.glade.h:41
-msgid "Ring device:"
-msgstr "响铃设备"
-
-#: ../gtk-glade/parameters.glade.h:42
-msgid "Ring sound:"
-msgstr "铃声:"
-
-#: ../gtk-glade/parameters.glade.h:43
-msgid "SIP (UDP):"
-msgstr "SIP (UDP)"
-
-#: ../gtk-glade/parameters.glade.h:44
-msgid "Send DTMFs as SIP info"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:45
-msgid "Set Maximum Transmission Unit:"
-msgstr "设置Maximum Transmission Unit(MTU):"
-
-#: ../gtk-glade/parameters.glade.h:46
-msgid "Settings"
-msgstr "设置"
-
-#: ../gtk-glade/parameters.glade.h:47
-#, fuzzy
-msgid "Stun server:"
-msgstr "Stun 服务器地址:"
-
-#: ../gtk-glade/parameters.glade.h:48
-msgid "This section defines your SIP address when not using a SIP account"
-msgstr "该段在你不使用SIP账号时的SIP地址"
-
-#: ../gtk-glade/parameters.glade.h:49
-#, fuzzy
-msgid "Upload speed limit in Kbit/sec:"
-msgstr "上传速率限制 kbit/sec"
-
-#: ../gtk-glade/parameters.glade.h:50
-msgid "Use IPv6 instead of IPv4"
-msgstr "使用 IPv6"
-
-#: ../gtk-glade/parameters.glade.h:51
-#, fuzzy
-msgid "User interface"
-msgstr "界面设置:"
-
-#: ../gtk-glade/parameters.glade.h:52
-#, fuzzy
-msgid "Video RTP/UDP:"
-msgstr "视频 RTP/UDP"
-
-#: ../gtk-glade/parameters.glade.h:53
-#, fuzzy
-msgid "Video input device:"
-msgstr "视频输入设备"
-
-#: ../gtk-glade/parameters.glade.h:54
-msgid "Your display name (eg: John Doe):"
-msgstr "你的显示名 (如:张三):"
-
-#: ../gtk-glade/parameters.glade.h:55
-msgid "Your resulting SIP address:"
-msgstr "你的SIP地址结果:"
-
-#: ../gtk-glade/parameters.glade.h:56
-msgid "Your username:"
-msgstr "你的用户名:"
-
-#: ../gtk-glade/parameters.glade.h:57
-msgid "a sound card\n"
-msgstr "声卡\n"
-
-#: ../gtk-glade/parameters.glade.h:59
-msgid "default camera"
-msgstr "缺省摄像头"
-
-#: ../gtk-glade/parameters.glade.h:60
-msgid "default soundcard"
-msgstr "缺省声卡"
-
-#: ../gtk-glade/parameters.glade.h:61
-msgid "default soundcard\n"
-msgstr "缺省声卡\n"
-
-#: ../gtk-glade/parameters.glade.h:63
-msgid "gtk-go-down"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:64
-msgid "gtk-go-up"
-msgstr ""
-
-#: ../gtk-glade/parameters.glade.h:65
-msgid "gtk-media-play"
-msgstr ""
-
-#: ../gtk-glade/buddylookup.glade.h:1
-msgid "<b>Search somebody</b>"
-msgstr "<b>查找用户</b>"
-
-#: ../gtk-glade/buddylookup.glade.h:2
-msgid "Add to my list"
-msgstr "添加为好友"
-
-#: ../gtk-glade/buddylookup.glade.h:3
-msgid "Search contacts in directory"
-msgstr "查找好友"
-
-#: ../gtk-glade/waiting.glade.h:1
-msgid "Linphone"
-msgstr "Linphone"
-
-#: ../gtk-glade/waiting.glade.h:2
-msgid "Please wait"
-msgstr "请等待"
-
-#: ../coreapi/linphonecore.c:195
-#, fuzzy, c-format
-msgid "You have missed %i call."
-msgid_plural "You have missed %i calls."
-msgstr[0] "你丢失 %i 呼叫."
-msgstr[1] "你共丢失 %i 次呼叫."
-
-#: ../coreapi/linphonecore.c:223
-msgid "aborted"
-msgstr "中断"
-
-#: ../coreapi/linphonecore.c:226
-msgid "completed"
-msgstr "完成"
-
-#: ../coreapi/linphonecore.c:229
-msgid "missed"
-msgstr "丢失"
-
-#: ../coreapi/linphonecore.c:234
-#, c-format
-msgid ""
-"%s at %s\n"
-"From: %s\n"
-"To: %s\n"
-"Status: %s\n"
-"Duration: %i mn %i sec\n"
-msgstr ""
-"%s at %s\n"
-"From: %s\n"
-"To: %s\n"
-"Status: %s\n"
-"Status: %i min %i sec\n"
-
-#: ../coreapi/linphonecore.c:235
-msgid "Outgoing call"
-msgstr "呼出"
-
-#: ../coreapi/linphonecore.c:445
-msgid ""
-"Your machine appears to be connected to an IPv6 network. By default linphone "
-"always uses IPv4. Please update your configuration if you want to use IPv6"
-msgstr ""
-"你的机器缺省配置为IPv6. Linphone 缺省使用IPv4. 请修改配置如果你想使用IPv6. "
-
-#: ../coreapi/linphonecore.c:739
-msgid "Ready"
-msgstr "就绪"
-
-#: ../coreapi/linphonecore.c:1014
-msgid "Remote end seems to have disconnected, the call is going to be closed."
-msgstr "对方断开连接, 通话终止."
-
-#: ../coreapi/linphonecore.c:1172
-msgid "Looking for telephone number destination..."
-msgstr "查询对方电话号码.."
-
-#: ../coreapi/linphonecore.c:1174
-msgid "Could not resolve this number."
-msgstr "该号码无法解析."
-
-#: ../coreapi/linphonecore.c:1239
-msgid ""
-"Could not parse given sip address. A sip url usually looks like sip:"
-"user@domain"
-msgstr "无法解析给定的SIP地址. SIP url 应有如下格式: <sip:username@domainname>"
-
-#: ../coreapi/linphonecore.c:1340
-msgid "Sorry, having multiple simultaneous calls is not supported yet !"
-msgstr "抱歉, 还不支持并发多路呼叫!"
-
-#: ../coreapi/linphonecore.c:1387
-msgid "Contacting"
-msgstr "联系中"
-
-#: ../coreapi/linphonecore.c:1402
-msgid "could not call"
-msgstr "无法呼叫"
-
-#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
-msgid "Connected."
-msgstr "连接建立."
-
-#: ../coreapi/linphonecore.c:1813
-msgid "Call ended"
-msgstr "呼叫结束"
-
-#: ../coreapi/linphonecore.c:2175
-msgid "No nat/firewall address supplied !"
-msgstr "没有提供NAT/firewall地址!"
-
-#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
-#, c-format
-msgid "Invalid nat address '%s' : %s"
-msgstr "无效NAT地址 '%s' : '%s'"
-
-#: ../coreapi/misc.c:134
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the pcm oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-"'modprobe snd-pcm-oss' as root to load it."
-msgstr ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the pcm oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-"'modprobe snd-pcm-oss' as root to load it."
-
-#: ../coreapi/misc.c:137
-msgid ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the mixer oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-" 'modprobe snd-mixer-oss' as root to load it."
-msgstr ""
-"Your computer appears to be using ALSA sound drivers.\n"
-"This is the best choice. However the mixer oss emulation module\n"
-"is missing and linphone needs it. Please execute\n"
-" 'modprobe snd-mixer-oss' as root to load it."
-
-#: ../coreapi/misc.c:610
-msgid "Stun lookup in progress..."
-msgstr "正在进行Stun查找..."
-
-#: ../coreapi/exevents.c:127
-msgid "Call terminated."
-msgstr "通话结束."
-
-#: ../coreapi/exevents.c:149
-msgid "Could not reach destination."
-msgstr "目标不可达."
-
-#: ../coreapi/exevents.c:158
-msgid "User is busy."
-msgstr "被叫忙."
-
-#: ../coreapi/exevents.c:159
-msgid "User is temporarily unavailable."
-msgstr "你呼叫的用户无法接通."
-
-#: ../coreapi/exevents.c:160
-msgid "Request Cancelled."
-msgstr "取消请求."
-
-#. char *retrymsg=_("%s. Retry after %i minute(s).");
-#: ../coreapi/exevents.c:162
-msgid "User does not want to be disturbed."
-msgstr "用户开启免打扰功能."
-
-#: ../coreapi/exevents.c:163
-msgid "Call declined."
-msgstr "呼叫被拒绝."
-
-#: ../coreapi/exevents.c:191
-msgid "Bad request"
-msgstr "错误请求"
-
-#: ../coreapi/exevents.c:194
-msgid "User cannot be found at given address."
-msgstr "用给定地址无法找到该用户."
-
-#: ../coreapi/exevents.c:197
-msgid "Remote user cannot support any of proposed codecs."
-msgstr "对方不支持相关编码."
-
-#. time out, call leg is lost
-#: ../coreapi/exevents.c:227
-msgid "Timeout."
-msgstr "超时."
-
-#: ../coreapi/exevents.c:230
-msgid "Remote host was found but refused connection."
-msgstr "找到该用户,但是连接被拒绝."
-
-#: ../coreapi/exevents.c:339
-msgid "is contacting you."
-msgstr "真正联系你."
-
-#: ../coreapi/exevents.c:424
-#, c-format
-msgid "Redirected to %s..."
-msgstr "重定向到 %s..."
-
-#: ../coreapi/exevents.c:440
-msgid ""
-"User is not reachable at the moment but he invites you\n"
-"to contact him using the following alternate resource:"
-msgstr ""
-"用户当前不可达,但是他向你发出呼叫请求\n"
-" 要联系该用户,请使用如下地址:"
-
-#: ../coreapi/exevents.c:861
-msgid "Early media."
-msgstr ""
-
-#: ../coreapi/exevents.c:972
-#, c-format
-msgid "Registration on %s failed: %s"
-msgstr "注册到 %s 失败: %s"
-
-#: ../coreapi/exevents.c:972
-msgid "no response timeout"
-msgstr "没有响应,超时"
-
-#: ../coreapi/exevents.c:998
-#, c-format
-msgid "Registration on %s successful."
-msgstr "成功注册到 %s "
-
-#: ../coreapi/exevents.c:999
-#, fuzzy, c-format
-msgid "Unregistration on %s done."
-msgstr "成功注册到 %s "
-
-#. people for which we don't have yet an answer should appear as offline
-#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
-msgid "Gone"
-msgstr "离开"
-
-#: ../coreapi/presence.c:129
-msgid "Waiting for Approval"
-msgstr "等待批准"
-
-#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
-msgid "Online"
-msgstr "在线"
-
-#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
-msgid "Busy"
-msgstr "用户忙"
-
-#: ../coreapi/presence.c:142
-msgid "Be Right Back"
-msgstr "马上回来"
-
-#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
-msgid "Away"
-msgstr "离开"
-
-#: ../coreapi/presence.c:151
-msgid "On The Phone"
-msgstr "通话中"
-
-#: ../coreapi/presence.c:156
-msgid "Out To Lunch"
-msgstr "外出就餐"
-
-#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
-msgid "Closed"
-msgstr "离线"
-
-#: ../coreapi/friend.c:35
-#, fuzzy
-msgid "Unknown"
-msgstr "未知错误"
-
-#: ../coreapi/friend.c:44
-#, fuzzy
-msgid "Be right back"
-msgstr "离开"
-
-#: ../coreapi/friend.c:50
-#, fuzzy
-msgid "On the phone"
-msgstr "通话中"
-
-#: ../coreapi/friend.c:53
-#, fuzzy
-msgid "Out to lunch"
-msgstr "外出吃饭中.."
-
-#: ../coreapi/friend.c:56
-msgid "Do not disturb"
-msgstr "请勿打扰"
-
-#: ../coreapi/friend.c:59
-msgid "Moved"
-msgstr ""
-
-#: ../coreapi/friend.c:62
-msgid "Using another messaging service"
-msgstr ""
-
-#: ../coreapi/friend.c:65
-#, fuzzy
-msgid "Offline"
-msgstr "离线"
-
-#: ../coreapi/friend.c:68
-msgid "Pending"
-msgstr "挂起"
-
-#: ../coreapi/friend.c:74
-msgid "Unknown-bug"
-msgstr "未知错误"
-
-#: ../coreapi/proxy.c:221
-msgid ""
-"The sip proxy address you entered is invalid, it must start with \"sip:\" "
-"followed by a hostname."
-msgstr ""
-
-#: ../coreapi/proxy.c:227
-msgid ""
-"The sip identity you entered is invalid.\n"
-"It should look like sip:username@proxydomain, such as sip:alice@example.net"
-msgstr ""
-
-#: ../coreapi/proxy.c:634
-#, fuzzy, c-format
-msgid "Could not login as %s"
-msgstr "无法登陆: %s"
-
-#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
-msgid "ITU-G.711 alaw encoder"
-msgstr ""
-
-#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
-msgid "ITU-G.711 alaw decoder"
-msgstr ""
-
-#: ../mediastreamer2/src/alsa.c:923
-#, fuzzy
-msgid "Alsa sound source"
-msgstr "ALSA音频源"
-
-#: ../mediastreamer2/src/alsa.c:1027
-msgid "Alsa sound output"
-msgstr "ALSA音频输出"
-
-#: ../mediastreamer2/src/aqsnd.c:891
-msgid "Sound capture filter for MacOS X Audio Queue Service"
-msgstr ""
-
-#: ../mediastreamer2/src/aqsnd.c:915
-msgid "Sound playback filter for MacOS X Audio Queue Service"
-msgstr ""
-
-#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
-msgid "DTMF generator"
-msgstr ""
-
-#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
-msgid "The GSM full-rate codec"
-msgstr ""
-
-#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
-msgid "The GSM codec"
-msgstr ""
-
-#: ../mediastreamer2/src/macsnd.c:670
-msgid "Sound capture filter for MacOS X Core Audio drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/macsnd.c:684
-msgid "Sound playback filter for MacOS X Core Audio drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
-msgid "A filter to make conferencing"
-msgstr ""
-
-#: ../mediastreamer2/src/msfileplayer.c:295
-#: ../mediastreamer2/src/msfileplayer.c:313
-msgid "Raw files and wav reader"
-msgstr ""
-
-#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
-#: ../mediastreamer2/src/msfilerec_win.c:216
-#: ../mediastreamer2/src/msfilerec_win.c:234
-msgid "Wav file recorder"
-msgstr ""
-
-#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
-msgid "A filter that send several inputs to one output."
-msgstr ""
-
-#: ../mediastreamer2/src/msresample.c:221
-#: ../mediastreamer2/src/msresample.c:239
-msgid "frequency resampler"
-msgstr ""
-
-#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
-msgid "RTP output filter"
-msgstr ""
-
-#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
-msgid "RTP input filter"
-msgstr ""
-
-#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
-#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
-msgid "The free and wonderful speex codec"
-msgstr ""
-
-#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
-msgid "A filter that controls and measure sound volume"
-msgstr ""
-
-#: ../mediastreamer2/src/msv4l.c:1009
-msgid "A video4linux compatible source filter to stream pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/msv4l2.c:458
-msgid "A filter to grab pictures from Video4Linux2-powered cameras"
-msgstr ""
-
-#: ../mediastreamer2/src/nowebcam.c:1780
-msgid "A filter that outputs a static image."
-msgstr ""
-
-#: ../mediastreamer2/src/oss.c:567
-msgid "Sound capture filter for OSS drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/oss.c:581
-msgid "Sound playback filter for OSS drivers"
-msgstr ""
-
-#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
-msgid "A pixel format converter"
-msgstr ""
-
-#: ../mediastreamer2/src/sizeconv.c:204
-msgid "A video size converter"
-msgstr ""
-
-#: ../mediastreamer2/src/sizeconv.c:222
-msgid "a small video size converter"
-msgstr ""
-
-#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
-msgid "Echo canceler using speex library"
-msgstr ""
-
-#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
-msgid "A filter that reads from input and copy to its multiple outputs."
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:375
-msgid "The theora video encoder from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:393
-msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
-msgid "The theora video decoder from xiph.org"
-msgstr ""
-
-#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
-msgid "ITU-G.711 ulaw encoder"
-msgstr ""
-
-#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
-msgid "ITU-G.711 ulaw decoder"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
-#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
-msgid "A H.263 decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:688
-msgid "A MPEG4 decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:704
-msgid "A RTP/JPEG decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:720
-msgid "A MJPEG decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videodec.c:736
-msgid "A snow decoder using ffmpeg library"
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
-msgid "A video H.263 encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:856
-msgid ""
-"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
-"spec."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
-msgid "A video MPEG4 encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:888
-msgid "A video snow encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:904
-msgid "A RTP/MJPEG encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:938
-msgid ""
-"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:970
-msgid ""
-"The snow codec is royalty-free and is open-source. \n"
-"It uses innovative techniques that makes it one of most promising video "
-"codec. It is implemented within the ffmpeg project.\n"
-"However it is under development, quite unstable and compatibility with other "
-"versions cannot be guaranteed."
-msgstr ""
-
-#: ../mediastreamer2/src/videoenc.c:990
-msgid "A MJPEG encoder using ffmpeg library."
-msgstr ""
-
-#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
-msgid "A generic video display"
-msgstr ""
-
-#: ../mediastreamer2/src/wincevideods.c:966
-#: ../mediastreamer2/src/wincevideods.c:984
-#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
-#: ../mediastreamer2/src/winvideods.c:1306
-#: ../mediastreamer2/src/winvideods.c:1324
-msgid "A video4windows compatible source filter to stream pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
-msgid "A video for windows (vfw.h) based source filter to grab pictures."
-msgstr ""
-
-#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
-msgid "ICE filter"
-msgstr ""
-
-#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
-msgid "A filter that trashes its input (useful for terminating some graphs)."
-msgstr ""
-
-#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
-msgid "Parametric sound equalizer."
-msgstr ""
-
-#: ../mediastreamer2/src/msdscap-mingw.cc:1003
-msgid "A webcam grabber based on directshow."
-msgstr ""
diff --git a/linphone/scripts/Makefile.am b/linphone/scripts/Makefile.am
deleted file mode 100644 (file)
index f24d99f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-EXTRA_DIST=builder-mingw.mk Portfile.tmpl Portfile-devel.tmpl
-
diff --git a/linphone/scripts/Portfile-devel.tmpl b/linphone/scripts/Portfile-devel.tmpl
deleted file mode 100644 (file)
index 418c0a9..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
-# $Id: PortFile 57236 2009-09-08 00:18:44Z macsforever2000@macports.org $
-
-PortSystem            1.0
-
-name                  linphone-devel
-version               @VERSION@
-categories            net
-maintainers           linphone.org:jehan.monnier
-description           voice over IP sip phone
-long_description      With linphone you can communicate freely with people over the internet, with voice and text instant messaging.
-homepage              http://www.linphone.org/index.php
-platforms             darwin
-master_sites          http://download.savannah.gnu.org/releases-noredirect/linphone/unstable/source/
-                       
-distname              linphone-${version}
-
-checksums             md5 @LINPHONE_MD5@
-
-depends_lib           port:libglade2 \
-                      port:speex-devel \
-                      port:libeXosip2 
-
-configure.args-append --disable-video --with-readline=none
diff --git a/linphone/scripts/Portfile.tmpl b/linphone/scripts/Portfile.tmpl
deleted file mode 100644 (file)
index e5ccd58..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
-# $Id: PortFile 57236 2009-09-08 00:18:44Z macsforever2000@macports.org $
-
-PortSystem            1.0
-
-name                  linphone
-version               @VERSION@
-categories            net
-maintainers           linphone.org:jehan.monnier
-description           voice over IP sip phone
-long_description      With linphone you can communicate freely with people over the internet, with voice and text instant messaging.
-homepage              http://www.linphone.org/index.php
-platforms             darwin
-master_sites          http://download.savannah.gnu.org/releases-noredirect/linphone/3.2.x/sources/
-                       
-checksums             md5 @LINPHONE_MD5@
-
-depends_lib           port:libglade2 \
-                      port:speex-devel \
-                      port:libeXosip2 
-
-configure.args-append --disable-video --with-readline=none
diff --git a/linphone/scripts/builder-mingw.mk b/linphone/scripts/builder-mingw.mk
deleted file mode 100644 (file)
index 3559ee8..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-prefix=/opt/linphone\r
-\r
-\r
-MSX264_SRC_DIR=$(LINPHONE_SRC_DIR)/mediastreamer2/plugins/msx264\r
-BUDDYLOOKUP_SRC_DIR=$(LINPHONE_SRC_DIR)/coreapi/plugins/buddylookup\r
-LOCALDIR=$(shell pwd)\r
-WORKDIR=$(LOCALDIR)/build\r
-LINPHONE_ZIP=$(WORKDIR)/linphone.zip\r
-BUDDYLOOKUP_ZIP=$(WORKDIR)/buddylookup.zip\r
-MSX264_ZIP=$(WORKDIR)/msx264.zip\r
-INSTALL_ROOT=$(WORKDIR)/root\r
-FILELIST=$(WORKDIR)/linphone-bundle.filelist\r
-\r
-LINPHONE_VERSION=strings $(INSTALL_ROOT)/bin/linphone-3.exe |grep linphone_ident | sed 's/linphone_ident_string=//'\r
-\r
-$(WORKDIR):\r
-       mkdir -p $(WORKDIR)\r
-\r
-$(INSTALL_ROOT): $(WORKDIR)\r
-       mkdir -p $(INSTALL_ROOT)\r
-\r
-\r
-\r
-#Inno Setup 5 compiler\r
-ISCC=ISCC.exe\r
-\r
-$(LINPHONE_SRC_DIR)/configure:\r
-       cd $(LINPHONE_SRC_DIR) && ./autogen.sh\r
-\r
-$(LINPHONE_SRC_DIR)/Makefile: $(LINPHONE_SRC_DIR)/configure\r
-       cd $(LINPHONE_SRC_DIR) && \\r
-       ./configure --prefix=$(prefix) --enable-shared --disable-static $(LINPHONE_CONFIGURE_EXTRA_OPTIONS)\r
-\r
-build-linphone:        $(LINPHONE_SRC_DIR)/Makefile\r
-       cd $(LINPHONE_SRC_DIR) && make newdate && make $(LINPHONE_MAKE_OPTS) && make install $(LINPHONE_MAKE_OPTS)\r
-\r
-$(LINPHONE_ZIP):       build-linphone $(WORKDIR)\r
-       cd $(LINPHONE_SRC_DIR) && make zip ZIPFILE=$(LINPHONE_ZIP) $(LINPHONE_MAKE_OPTS)\r
-\r
-install-linphone: $(LINPHONE_ZIP) $(INSTALL_ROOT)\r
-       cd $(INSTALL_ROOT) && unzip -o $(LINPHONE_ZIP)\r
-\r
-clean-linphone:\r
-       - cd  $(LINPHONE_SRC_DIR) && make clean\r
-\r
-veryclean-linphone:\r
-       - cd $(LINPHONE_SRC_DIR) && make distclean\r
-       - cd $(LINPHONE_SRC_DIR) && rm configure\r
-\r
-##### msx264 rules\r
-\r
-$(MSX264_SRC_DIR)/configure:\r
-       cd $(MSX264_SRC_DIR) && ./autogen.sh\r
-\r
-\r
-$(MSX264_SRC_DIR)/Makefile:    $(MSX264_SRC_DIR)/configure\r
-       cd $(MSX264_SRC_DIR) && \\r
-       PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig ./configure --prefix=$(prefix) --enable-shared --disable-static --enable-hacked-x264\r
-\r
-\r
-build-msx264:  build-linphone $(MSX264_SRC_DIR)/Makefile\r
-       cd $(MSX264_SRC_DIR) && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig make\r
-\r
-$(MSX264_ZIP): build-msx264\r
-       cd $(MSX264_SRC_DIR) && make zip ZIPFILE=$(MSX264_ZIP)\r
-\r
-install-msx264:        $(MSX264_ZIP) $(INSTALL_ROOT)\r
-       cd $(INSTALL_ROOT) && unzip -o $(MSX264_ZIP)\r
-\r
-clean-msx264:\r
-       - cd  $(MSX264_SRC_DIR) && make clean\r
-\r
-veryclean-msx264:\r
-       - cd $(MSX264_SRC_DIR) && make distclean\r
-       - cd $(MSX264_SRC_DIR) && rm configure\r
-\r
-###### buddylookup rules\r
-\r
-$(BUDDYLOOKUP_SRC_DIR)/configure:\r
-       cd $(BUDDYLOOKUP_SRC_DIR) && ./autogen.sh\r
-\r
-\r
-$(BUDDYLOOKUP_SRC_DIR)/Makefile:       $(BUDDYLOOKUP_SRC_DIR)/configure\r
-       cd $(BUDDYLOOKUP_SRC_DIR) && \\r
-       PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig ./configure --prefix=$(prefix) --enable-shared --disable-static\r
-\r
-\r
-build-buddylookup:     build-linphone $(BUDDYLOOKUP_SRC_DIR)/Makefile\r
-       cd $(BUDDYLOOKUP_SRC_DIR) && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig make\r
-\r
-$(BUDDYLOOKUP_ZIP):    build-buddylookup\r
-       cd $(BUDDYLOOKUP_SRC_DIR) && make zip ZIPFILE=$(BUDDYLOOKUP_ZIP)\r
-\r
-install-buddylookup:   $(BUDDYLOOKUP_ZIP) $(INSTALL_ROOT)\r
-       cd $(INSTALL_ROOT) && unzip -o $(BUDDYLOOKUP_ZIP)\r
-\r
-clean-buddylookup:\r
-       - cd  $(BUDDYLOOKUP_SRC_DIR) && make clean\r
-\r
-veryclean-buddylookup:\r
-       - cd $(BUDDYLOOKUP_SRC_DIR) && make distclean\r
-       - cd $(BUDDYLOOKUP_SRC_DIR) && rm configure\r
-\r
-\r
-$(FILELIST): \r
-       cd $(INSTALL_ROOT) && \\r
-       rm -f $(FILELIST) && \\r
-       for file in `find` ; do \\r
-               if ! test -d $$file ; then \\r
-                       echo "Source: $$file; Destdir: {app}\\`dirname $$file`; Flags: ignoreversion" \\r
-                       >> $(FILELIST) ;\\r
-               fi \\r
-       done\r
-\r
-clean-install:\r
-       rm -rf $(INSTALL_ROOT)\r
diff --git a/linphone/share/.gitignore b/linphone/share/.gitignore
deleted file mode 100644 (file)
index 3d11e02..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-Makefile
-Makefile.in
-*.raw
-linphone.pc
diff --git a/linphone/share/C/.gitignore b/linphone/share/C/.gitignore
deleted file mode 100644 (file)
index e1d2077..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-Makefile
-Makefile.in
-manual
-manual.junk
-manual.html
diff --git a/linphone/share/C/Makefile.am b/linphone/share/C/Makefile.am
deleted file mode 100644 (file)
index ecd7c9e..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-
-HELPLANG=C
-
-include ../Makefile.inc
-
-man_MANS = linphone.1 linphonec.1 sipomatic.1 linphonecsh.1
-
-EXTRA_DIST+=$(man_MANS)
diff --git a/linphone/share/C/linphone.1 b/linphone/share/C/linphone.1
deleted file mode 100644 (file)
index 8c87c64..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-.\" Linphone is an internet phone compatible with the Session Initiation Protocol (SIP: RFC3261 )
-.TH "linphone" "1" "1.0.0" "Simon Morlat" "linphone"
-.SH "NAME"
-.LP 
-linphone \- Gnome interface of linphone, a SIP compatible
-internet phone.
-.SH "SYNTAX"
-.LP 
-linphone [\fI\-\-help\fP] [\fI\-\-verbose\fP] 
-
-.SH "DESCRIPTION"
-.LP 
-Linphone can be started without any extra argument. All parameters are accessible from the property box.
-
-.SH "OPTIONS"
-.LP 
-.TP 
-\fB\-\-help\fR
-Output help information and exit.
-.TP 
-\fB\-\-version\fR
-Output version information and exit.
-\fB\-\-verbose\fR
-Output internal messages on stdout, this is useful for debugging.
-.SH "FILES"
-.LP 
-\fI~/.gnome2/linphone\fP 
-.br 
-This is where linphone reads its config information. You do not have to modify or edit this file.
-.br 
-
-.SH "ENVIRONMENT VARIABLES"
-
-.SH "EXAMPLES"
-
-.SH "AUTHORS"
-.LP 
-Simon MORLAT <simon.morlat@linphone.org>
-See the AUTHORS file inside linphone's source for more details.
-.SH "SEE ALSO"
-.LP 
-linphonec(1) sipomatic(1)
diff --git a/linphone/share/C/linphonec.1 b/linphone/share/C/linphonec.1
deleted file mode 100644 (file)
index c19bf21..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-.\" Linphone is an internet phone compatible with the Session Initiation Protocol (SIP: RFC3261 )
-.TH "linphonec" "1" "1.0.0" "Florian Winterstein & Simon MORLAT" "linphone, internet phone"
-.SH "NAME"
-.LP 
-linphonec \- Console interface of linphone, a SIP compatible
-internet phone.
-.SH "SYNTAX"
-.LP 
-linphonec [\fI\-d\fP] <\fIdebug_level\fP> [\fI\-l\fP] <\fIdebug_file\fP> [\fI\-c\fP] <\fIconfig_file\fP> 
-.br 
-linphonec \fI\-v\fP
-.SH "DESCRIPTION"
-.LP 
-Linphonec is the console version of originally Gnome internet phone linphone (http://www.linphone.org) .
-.br 
-Linphonec can be started without arguments. It doesn't need any config file to start correctly and will create a default one at the first startup if the file does not exist.
-By default the path of the config file is ~/.linphonerc .
-Most parameters (proxy, passwords) can be changed from the command line, for some of them (path of sound rings), you'll need
-to edit the .linphonerc config file.
-.br 
-Once linphonec has started, linphonec wait for some commands and is ready to receive calls.
-.br 
-The most important commands are
-.br 
-.TP 
-call <sip url> : to call someone. A sip url is in the form sip:user@host
-.TP 
-terminate      : to terminate a call
-.TP 
-answer : to accept an incoming call.
-.TP 
-help   : to display interactive help.
-.TP 
-
-
-
-.SH "OPTIONS"
-.LP 
-.TP 
-\fB\-d\fR <\fIdebug_level\fP>
-Use debug mode with given verbosity (debug_level). The debug_level is an integer in the range 0..5 .
-.TP 
-\fB\-h\fR
-Output help information and exit.
-.TP 
-\fB\-l\fR <\fIlog_file\fP>
-Specifies a file where debug information will be written. Default is stdout.
-.TP 
-\fB\-c\fR <\fIconfig_file\fP>
-Specifies the config file to read at startup.
-.TP 
-.SH "FILES"
-.LP 
-\fI~/.linphonec\fP 
-.br 
-.SH "ENVIRONMENT VARIABLES"
-.LP 
-.SH "EXAMPLES"
-.LP 
-
-.SH "AUTHORS"
-.LP 
-Florian Winterstein <fwin at gmx.de>
-.br 
-Simon Morlat <simon.morlat at linphone.org>
-.SH "SEE ALSO"
-.LP 
-linphone(1) sipomatic(1)
diff --git a/linphone/share/C/linphonecsh.1 b/linphone/share/C/linphonecsh.1
deleted file mode 100644 (file)
index 6c7b77f..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-.\" Linphone is an internet phone compatible with the Session Initiation Protocol (SIP: RFC3261 )
-.TH "linphonecsh" "1" "3.0.0" "Simon MORLAT" "linphone, internet phone"
-.SH "NAME"
-.LP 
-linphonecsh \- Sends a command to a linphonec running in daemon mode, and exits.
-.SH "SYNTAX"
-.LP 
-linphonecsh \fIinit\fP  <\fIoptional linphonec args\fP> 
-.br 
-linphonecsh \fIexit\fP
-.br 
-linphonecsh \fIgeneric\fP  <\fIlinphonec command line surrounded by quotes\fP>
-.br
-linphonecsh \fIregister\fP  \fI--username\fP <\fIusername\fP> \fI--host\fP <\fIproxy\fP> \fI--password\fP <\fIpassword\fP>
-.br
-linphonecsh \fIunregister\fP
-.br
-linphonecsh \fIdial\fP <\fIsip address or number\fP>
-.br
-linphonecsh \fIstatus\fP <\fIdomain = one of 'register', 'hook', 'autoanswer'\fP>
-.br
-linphonecsh \fI\--help\fP
-.SH "DESCRIPTION"
-.LP 
-Linphonecsh is a small utility to send basic commands to a linphonec (console mode linphone) process.
-Unlike linphonec, linphonecsh does not wait commands from standart input: it takes the command from its arguments 
-and sends it using unix pipe to a linphonec process started in daemon mode.
-The motivation for this tool is for example to simply execute voip calls from scripts, web-servers, or javascript web pages.
-.br 
-
-The very first thing to do before doing actions is to ask linphonecsh to spawn a linphonec daemon using
-.TP
-\fBlinphonecsh init\fR
-.br
-The resulting linphonec daemon does not read or write any configuration file.
-
-When the linphonec daemon is no more needed, the following commands makes it exit properly:
-.TP
-\fBlinphonecsh exit\fR
-.br
-
-
-.SH "FILES"
-.LP 
-By default a linphonec started as a daemon by 'linphonecsh init' does not use a config file.
-.br 
-.SH "ENVIRONMENT VARIABLES"
-.LP 
-.SH "EXAMPLES"
-.LP 
-
-.SH "AUTHORS"
-.LP 
-.br 
-Simon Morlat <simon.morlat at linphone.org>
-.SH "SEE ALSO"
-.LP 
-linphonec(1) sipomatic(1) linphone(1)
-.TH <program> <section number> "<date>" "" "Linux User's Manual"
-
diff --git a/linphone/share/C/manual.lyx b/linphone/share/C/manual.lyx
deleted file mode 100644 (file)
index e11ca3b..0000000
+++ /dev/null
@@ -1,654 +0,0 @@
-#LyX 1.4.4 created this file. For more info see http://www.lyx.org/
-\lyxformat 245
-\begin_document
-\begin_header
-\textclass docbook
-\language english
-\inputencoding default
-\fontscheme default
-\graphics default
-\paperfontsize default
-\spacing single
-\papersize default
-\use_geometry false
-\use_amsmath 1
-\cite_engine basic
-\use_bibtopic false
-\paperorientation portrait
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\defskip medskip
-\quotes_language french
-\papercolumns 1
-\papersides 1
-\paperpagestyle default
-\tracking_changes false
-\output_changes true
-\end_header
-
-\begin_body
-
-\begin_layout Title
-Linphone's User Manual
-\end_layout
-
-\begin_layout Date
-July, 24th 2004
-\end_layout
-
-\begin_layout Section
-Introduction
-\end_layout
-
-\begin_layout Standard
-Linphone is a simple web-phone.
- It allows you to make two party-calls using an IP network like the internet.
- What you need to run Linphone is :
-\end_layout
-
-\begin_layout Itemize
-a computer running the GNU/Linux operating system
-\end_layout
-
-\begin_layout Itemize
-gtk+>=2.4, in order to use the graphical interface (highly recommended!).
- The console-only application (linphonec) does not need gtk but libreadline.
-\end_layout
-
-\begin_layout Itemize
-a sound card correctly configured to use the ALSA linux sound system
-\end_layout
-
-\begin_layout Itemize
-headphones or speakers
-\end_layout
-
-\begin_layout Itemize
-a microphone
-\end_layout
-
-\begin_layout Itemize
-a connection to a network (the Internet for example), using a modem, an
- ethernet card, a Wifi adapter or anything else
-\end_layout
-
-\begin_layout Standard
-Since linphone needs to use the computer's sound system,  before running
- linphone, please make sure that no other application is using the audio
- device.
-\end_layout
-
-\begin_layout Standard
-Linphone is free, it is released under 
-\emph on
-GNU Public License
-\emph default
-.
-\end_layout
-
-\begin_layout Standard
-
-\emph on
-WARNING: This software is provided with NO WARRANTY see file COPYING for
- details.
- This means you SHOULD NOT use linphone for confidential conversations:
- there is NO encryption, so it is easy for any bad-intentioned person to
- monitor the audio streams, and thus your conversation.
- Note also that it is not recommended to run Linphone as root.
-\end_layout
-
-\begin_layout Section
-Running linphone
-\end_layout
-
-\begin_layout Standard
-Linphone can be run in three different ways:
-\end_layout
-
-\begin_layout Itemize
-as a normal application: in the gnome menu, linphone should appear in the
- network sub-menu.
- If you are not running gnome, you can execute linphone directly by typing
- linphone in a terminal, for example.
- Please note, that when linphone is not running, you cannot receive calls.
-\end_layout
-
-\begin_layout Itemize
-as a gnome applet: add the linphone applet by right-clicking on the gnome
- panel, linphone appears in the network menu.
- When linphone is running silently as a gnome panel, it is able to receive
- calls even if its window is not shown.
- If you want the main linphone window to appear, click on the applet.
- When somebody calls you, the main window is shown and you will hear the
- ring normally.
-\end_layout
-
-\begin_layout Section
-Making a call
-\end_layout
-
-\begin_layout Subsection
-Basic principles
-\end_layout
-
-\begin_layout Standard
-Linphone uses the Session Initiation Protocol (SIP) to establish a connection
- with a remote host.
- In this protocol each caller or callee is identified by a SIP url: sip:user_nam
-e@host_name.
- A SIP url's syntax like an email address, with a 
-\begin_inset Quotes sld
-\end_inset
-
-sip:
-\begin_inset Quotes sld
-\end_inset
-
- prefix.
-\end_layout
-
-\begin_layout Standard
-User_name is probably your login account on a Unix machine, and host_name
- is the machines fully qualified domain name (FQDN) or IP address.
-\end_layout
-
-\begin_layout Standard
-Note that SIP is a new telecommunication protocol designed to be simple,
- and it is not compatible with H323 at all.
-\end_layout
-
-\begin_layout Subsection
-When IP address are not static, or not routable.
-\end_layout
-
-\begin_layout Standard
-For that purpose, you can register to a SIP provider or SIP proxy.
- There exist several SIP proxies on the net, and some of them are free.
- See, for example, http://iptel.org.
- You'll have to get an account on the proxy and then tell linphone to use
- it.
- In this case, the user_name will assigned to you by the VoIP provider,
- when you register, and host_name is the provider's host name (usually something
- like sip.example.com).
-\end_layout
-
-\begin_layout Subsection
-Test trial: If you have no friends to call at the moment (because it is
- too late for example), but would like to know if linphone is really working.
-\end_layout
-
-\begin_layout Standard
-\begin_inset LatexCommand \label{sipomatic}
-
-\end_inset
-
-Since version 0.3.0, linphone comes with a test program called '
-\emph on
-sipomatic
-\emph default
-'.
- Sipomatic can answer automatically calls from linphone.
- To do this:
-\end_layout
-
-\begin_layout Itemize
-run sipomatic from a terminal.
- Sipomatic does not have a graphical interface, but you don't have to interact
- with it, so it doesn't need one.
-\end_layout
-
-\begin_layout Itemize
-Then type the following SIP url in the main window of linphone: sip:robot@127.0.0.1
-:5064 .
- 127.0.0.1 is the local address for your computer, and robot is the name to
- use for calling sipomatic.
- 5064 is the port that sipomatic is listening to.
- Normally you should always use 5060 (i.e the default port when no port is
- specified) to call somebody, but sipomatic is the exception: it runs on
- port 5064.
- The reason for this is that linphone itself already runs on 5060, and you
- cannot have two applications running on the same port, at the same time
- and on the same machine.
-\end_layout
-
-\begin_layout Itemize
-Then press the call button.
- After one second, sipomatic should answer to your call and you should hear
- a short announcement.
-\end_layout
-
-\begin_layout Section
-\begin_inset LatexCommand \label{params}
-
-\end_inset
-
-Call parameters
-\end_layout
-
-\begin_layout Subsection
-\begin_inset LatexCommand \label{paramnetwork}
-
-\end_inset
-
-Network
-\end_layout
-
-\begin_layout Standard
-Linphone allows you to set your firewall address (see section 7) or a stun
- server address that might help linphone calling and receiving calls.
-\end_layout
-
-\begin_layout Standard
-Linphone supports ipv6: you can enable it by toggling the 
-\begin_inset Quotes fld
-\end_inset
-
-Enable ipv6
-\begin_inset Quotes frd
-\end_inset
-
- checkbox.
- However it can support Ipv6 and Ipv4 together.
-\end_layout
-
-\begin_layout Subsection
-\begin_inset LatexCommand \label{paramrtp}
-
-\end_inset
-
-RTP
-\end_layout
-
-\begin_layout Standard
-RTP (Real Time Protocol) is a protocol used to send media streams over networks.
-\end_layout
-
-\begin_layout Itemize
-RTP port: linphone uses default port 7078 to send and receive audio streams.
- If you think port 7078 is used by another application, change it as you
- wish.
-\end_layout
-
-\begin_layout Itemize
-Jitter compensation: This number represents the number of audio packets
- linphone is waiting for before starting to play them.
- If sometimes some audio packets are late, they have a greater chance to
- be played.
- Increase this parameter, if the other person's voice sounds 'chopped',
- in order to improve the quality of the transmission.
- This will however increase the delay (you will hear the remote user's talk
- with a few seconds delay).
- If, on the other hand, you are using a fast network, and you have good
- audio drivers, you can set this parameters down to three packets, and you
- will have a very small delay.
-\end_layout
-
-\begin_layout Subsection
-\begin_inset LatexCommand \label{paramsip}
-
-\end_inset
-
-SIP
-\end_layout
-
-\begin_layout Standard
-SIP (Session Initiation Protocol) is a protocol to establish and destroy
- media sessions over a network.
- In simple words, it's responsible for controlling calls.
- It rings the remote user, initiates the call and terminates it when one
- of the two parties hangs up.
-\end_layout
-
-\begin_layout Itemize
-SIP port: linphone uses default port 5060 to send and receive SIP packets.
- It is highly recommended by SIP's RFC to use port 5060.
- So, please don't change this unless you really know what you are doing.
-\end_layout
-
-\begin_layout Itemize
-Use registrar: toggle this button if you need the services of a remote SIP
- server.
- See section 
-\begin_inset Quotes eld
-\end_inset
-
-Registering on a remote server
-\begin_inset Quotes erd
-\end_inset
-
- for details about this.
-\end_layout
-
-\begin_layout Subsection
-\begin_inset LatexCommand \label{paramcodec}
-
-\end_inset
-
-Codecs
-\end_layout
-
-\begin_layout Standard
-Codecs are algorithms especially designed to compress voice data.
- For example, digitized voice in 16bit / 8000 Hz represents a data flow
- of 128 kbits/second.
- Using the GSM codec, this flow is reduced to 13 kbits/second, without significa
-nt loss of quality.
- Currently the best bitrate/quality compromise is achieved by using the
- speex codec.
-\end_layout
-
-\begin_layout Itemize
-Codec choice: linphone can use several codecs.
- Use buttons at the bottom of the codec list to put them in order of preference.
- Note, that according to your network connection type, some codecs are not
- usable.
- They appear in red and they are not selectable.
- You can decide to use or not a usable codec (in blue) by changing its status
- with the enable/disable buttons at the bottom of the list.
-\end_layout
-
-\begin_layout Itemize
-Connection type: select how you are connected to the network you want to
- use (in most cases that will be the internet).
- This helps linphone configure itself according to the bandwidth of your
- connection type.
- For example some some high-bitrate codecs will be automatically disabled,
- if you select connection with a 56k modem.
-\end_layout
-
-\begin_layout Subsection
-\begin_inset LatexCommand \label{paramaudio}
-
-\end_inset
-
-Audio parameters
-\end_layout
-
-\begin_layout Standard
-In this section you will find parameters related to your sound equipment.
-\end_layout
-
-\begin_layout Itemize
-Sound card choice: if you have several sound cards on your PC, you can select
- the one to be used by linphone.
-\end_layout
-
-\begin_layout Itemize
-Source choice: in this combo box you can choose the recording source for
- your voice.
- In most cases it will be the microphone (mic).
-\end_layout
-
-\begin_layout Section
-Address book
-\end_layout
-
-\begin_layout Standard
-The address book lets you store and recall names and sip addresses of people.
-\end_layout
-
-\begin_layout Standard
-When adding a new contact, a little contact box is displayed, where you
- can fill in information about the person, mainly of course his SIP address.
- Additionally you can toggle the 
-\begin_inset Quotes fld
-\end_inset
-
-send subscription
-\begin_inset Quotes frd
-\end_inset
-
- button if you want the person to keep you informed of his online status
- (ready, busy, gone...).
- You can also choose to reject subscription from this person, meaning that
- he will not be informed of your online status.
-\end_layout
-
-\begin_layout Section
-Using SIP proxies and registrar.
-\end_layout
-
-\begin_layout Standard
-Registering with a SIP server can be useful in two main cases:
-\end_layout
-
-\begin_layout Itemize
-Your machine does not have a public domain name, which prevents other users
- to call you as they can't guess your IP address.
- In this case, you can register with a proxy or redirect SIP server to get
- a public SIP address.
- For example, you are <sip:bob@no-host-name> and let's suppose that there
- exists a redirect or proxy SIP server at <sip:myserver.org>.
- By registering as 'bob' with <sip:myserver.org>, your friends will be able
- to call you at the address <sip:bob@myserver.org> .
- Of course, the user_name assigned to you by the SIP server may be different
- from your login name on the local machine.
- It can even be a number resembling a regular (PSTN) phone number, eg.
- 5002000307.
- The proxy or redirect server myserver.org will forward or redirect the calls
- from your friends to your exact location.
-\end_layout
-
-\begin_layout Standard
-With linphone>=1.0.0 you can choose to use several proxies simultaneously.
- Go to the property box, section sip, and click on add proxy.
- You'll be prompted for a proxy address, route and your identity (also known
- as address of record).
- This information should be given to you by the SIP provider you registered
- with.
- Route can be omitted (ie.
- is optional), so leave it empty in case you don't know what to put there.
- The identity is the SIP address you are known by the proxy.
- Other users on the network are supposed to always be able to find you at
- this SIP address.
-\end_layout
-
-\begin_layout Section
-Behind a firewall
-\end_layout
-
-\begin_layout Standard
-In some cases the configuration of your network is such that linphone (or
- any other SIP phone program) cannot tell with certainty, how other computers
- on the network can talk to your computer.
- This is usually the case, when your machine is behind a firewall/router
- that uses the Network Address Translation (NAT) protocol (RFC 1631).
- In order to find out linphone can use the services of a "Simple Traversal
- of User datagram through Network address translators" (STUN) server (RFC
- 3489).
- If you are behind a NAT firewall/router put the name of your STUN server
- in the respective field.
- This information is usually provided to you by your SIP proxy/server and
- most times, assuming that your SIP server is 'sip.example.com', it looks
- like 'stun.example.com'.
- You may also have to specify the port your STUN server listens to (default
- 3478).
-\end_layout
-
-\begin_layout Section
-Problems
-\end_layout
-
-\begin_layout Subsection
-Connection problems
-\end_layout
-
-\begin_layout Standard
-Firewalls are the main cause of problems in call routing.
- Check that udp ports are opened and masqueraded, and subscribe to a SIP
- proxy outside: most proxies are able to handle firewalls issues themselves.
- If not possible read section 7 (Behind a firewall).
-\end_layout
-
-\begin_layout Subsection
-Audio problems
-\end_layout
-
-\begin_layout Quotation
-Linphone seems to connect to the remote SIP url, it rings, but when the
- callee answers, nothing happens and we can't hear each other.
-\end_layout
-
-\begin_layout Itemize
-Using your audio mixer program (eg.
- 'alsamixer', 'kmix', or 'aumix') make make sure the audio output is not
- muted and that the playback (master volume, PCM) and recording (mic) controls
- are set to at least their medium values.
-\end_layout
-
-\begin_layout Itemize
-If the voice is sometimes interrupted, you can modify parameter RTP->jitter
- compensation in the property box to greater values to avoid this.
- But this will also increase the transmission delay.
-\end_layout
-
-\begin_layout Itemize
-If linphone cannot open the audio device, check if the user has the right
- permissions to open /dev/dsp, and close all programs able to use audio
- device (xmms, kaiman...), as at this point linphone cannot share the audio
- device with other applications.
-\end_layout
-
-\begin_layout Itemize
-Use ALSA drivers (see 
-\begin_inset LatexCommand \url[http://www.alsa-project.org]{http://www.alsa-project.org}
-
-\end_inset
-
-).
- Most distributions still use the old OSS kernel-official drivers, that
- have big latency problems and are often buggy.
- ALSA drivers are much better.
-\end_layout
-
-\begin_layout Section
-Bugs reporting and suggestions
-\end_layout
-
-\begin_layout Standard
-First go to linphone's home page at 
-\begin_inset LatexCommand \url[http://www.linphone.org]{http://www.linphone.org}
-
-\end_inset
-
- to check if you have the latest version if linphone.
-\end_layout
-
-\begin_layout Standard
-If linphone crashes, send a report to the mailing list, linphone-users@nongnu.org.
- If linphone does not work, but does not crash, please ensure you have read
- this manual in its entirety before sending a bug report at the above address.
- You can also send e-mail to the mailing list to request a specific feature,
- that you think is missing from linphone.
- Note that video support, and conferencing are planned features.
- If someone is interested in helping with the translations of linphone to
- other languages, s/he can send me a xx.po file based on the po/linphone.pot
- file of the distribution.
- You can also translate this user manual in other languages.
- In any case, please contact me if you want more details.
-\end_layout
-
-\begin_layout Section
-Authors
-\end_layout
-
-\begin_layout Standard
-Simon MORLAT (simon.morlat@linphone.org) wrote: 
-\end_layout
-
-\begin_layout Itemize
-main library (coreapi)
-\end_layout
-
-\begin_layout Itemize
-gnome interface (thanks to glade !)
-\end_layout
-
-\begin_layout Itemize
-RTP library (oRTP)
-\end_layout
-
-\begin_layout Itemize
-audio/video framework and wrappers (mediastreamer)
-\end_layout
-
-\begin_layout Standard
-Aymeric Moizard (jack@atosc.org) wrotes the osip and eXosip stacks that is
- used by linphone.
-\end_layout
-
-\begin_layout Standard
-The speex codec 
-\begin_inset LatexCommand \url[http://www.speex.org]{http://www.speex.org}
-
-\end_inset
-
- is a high quality low bitrate codec by Jean Marc Valin.
-\end_layout
-
-\begin_layout Standard
-The GSM library was written by : Jutta Degener and Carsten Bormann,Technische
- Universitaet Berlin.
-\end_layout
-
-\begin_layout Standard
-The LPC10-1.5 library was written by: Andy Fingerhut Applied Research Laboratory
- <-- this line is optional if Washington University, Campus Box 1045/Bryan
- 509 you have limited space One Brookings Drive Saint Louis, MO 63130-4899
- jaf@arl.wustl.edu http://www.arl.wustl.edu/~jaf/ See text files in gsmlib and
- lpc10-1.5 directories for further information.
-\end_layout
-
-\begin_layout Standard
-Icons by Pablo Marcelo Moia.
-\end_layout
-
-\begin_layout Section
-Thanks
-\end_layout
-
-\begin_layout Standard
-Thanks to Daemon Chaplin, for having done Glade, the gtk interface builder.
-\end_layout
-
-\begin_layout Standard
-Thanks to Aymeric Moizard, for his famous oSIP library.
-\end_layout
-
-\begin_layout Standard
-Thanks to Florian Winstertein, for the console interface of linphone.
-\end_layout
-
-\begin_layout Standard
-Thanks to Jean Marc Valin, for his great speex codec.
-\end_layout
-
-\begin_layout Standard
-Thanks to the authors of LPC10-1.5 and GSM code.
-\end_layout
-
-\begin_layout Standard
-Thanks to Joel Barrios ( jbarrios@-NO-SPAM-linuxparatodos.com ) for his RPMS.
-\end_layout
-
-\begin_layout Standard
-Thanks to Pablo Marcelo Moia for the great icons he has made for linphone.
-\end_layout
-
-\begin_layout Standard
-\begin_inset LatexCommand \tableofcontents{}
-
-\end_inset
-
-
-\end_layout
-
-\end_body
-\end_document
diff --git a/linphone/share/C/manual.sgml b/linphone/share/C/manual.sgml
deleted file mode 100644 (file)
index 4d4155e..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-<!DOCTYPE article  PUBLIC "-//OASIS//DTD DocBook V4.2//EN"
- [ <!ENTITY % output.print.png "IGNORE">
-<!ENTITY % output.print.pdf "IGNORE">
-<!ENTITY % output.print.eps "IGNORE">
-<!ENTITY % output.print.bmp "IGNORE">
- ]>
-
-<!-- SGML file was created by LyX 1.4.4
-  See http://www.lyx.org/ for more information -->
-<article lang="en">
-<articleinfo>
-<title>Linphone's User Manual</title>
-<date>July, 24th 2004</date></articleinfo><sect1>
-<title>Introduction</title>
-<para>Linphone is a simple web-phone. It allows you to make two party-calls using an IP network like the internet. What you need to run Linphone is :</para><itemizedlist>
-<listitem><para>a computer running the GNU/Linux operating system</para></listitem><listitem><para>gtk+&gt;=2.4, in order to use the graphical interface (highly recommended!). The console-only application (linphonec) does not need gtk but libreadline.</para></listitem><listitem><para>a sound card correctly configured to use the ALSA linux sound system</para></listitem><listitem><para>headphones or speakers</para></listitem><listitem><para>a microphone</para></listitem><listitem><para>a connection to a network (the Internet for example), using a modem, an ethernet card, a Wifi adapter or anything else</para></listitem></itemizedlist><para>Since linphone needs to use the computer's sound system,  before running linphone, please make sure that no other application is using the audio device. </para>
-<para>Linphone is free, it is released under <emphasis>GNU Public License</emphasis>.</para>
-<para><emphasis>WARNING: This software is provided with NO WARRANTY see file COPYING for details. This means you SHOULD NOT use linphone for confidential conversations: there is NO encryption, so it is easy for any bad-intentioned person to monitor the audio streams, and thus your conversation. Note also that it is not recommended to run Linphone as root.</emphasis></para></sect1><sect1>
-<title>Running linphone</title>
-<para>Linphone can be run in three different ways:</para><itemizedlist>
-<listitem><para>as a normal application: in the gnome menu, linphone should appear in the network sub-menu. If you are not running gnome, you can execute linphone directly by typing linphone in a terminal, for example. Please note, that when linphone is not running, you cannot receive calls.</para></listitem><listitem><para>as a gnome applet: add the linphone applet by right-clicking on the gnome panel, linphone appears in the network menu. When linphone is running silently as a gnome panel, it is able to receive calls even if its window is not shown. If you want the main linphone window to appear, click on the applet. When somebody calls you, the main window is shown and you will hear the ring normally.</para></listitem></itemizedlist></sect1><sect1>
-<title>Making a call</title>
-<sect2>
-<title>Basic principles</title>
-<para>Linphone uses the Session Initiation Protocol (SIP) to establish a connection with a remote host. In this protocol each caller or callee is identified by a SIP url: sip:user_name@host_name. A SIP url's syntax like an email address, with a &ldquo;sip:&ldquo; prefix.</para>
-<para>User_name is probably your login account on a Unix machine, and host_name is the machines fully qualified domain name (FQDN) or IP address.</para>
-<para>Note that SIP is a new telecommunication protocol designed to be simple, and it is not compatible with H323 at all.</para></sect2><sect2>
-<title>When IP address are not static, or not routable.</title>
-<para>For that purpose, you can register to a SIP provider or SIP proxy. There exist several SIP proxies on the net, and some of them are free. See, for example, http://iptel.org. You'll have to get an account on the proxy and then tell linphone to use it. In this case, the user_name will assigned to you by the VoIP provider, when you register, and host_name is the provider's host name (usually something like sip.example.com). </para></sect2><sect2>
-<title>Test trial: If you have no friends to call at the moment (because it is too late for example), but would like to know if linphone is really working.</title>
-<para id="sipomatic" ><!-- anchor id="sipomatic" -->Since version 0.3.0, linphone comes with a test program called '<emphasis>sipomatic</emphasis>'. Sipomatic can answer automatically calls from linphone. To do this:</para><itemizedlist>
-<listitem><para>run sipomatic from a terminal. Sipomatic does not have a graphical interface, but you don't have to interact with it, so it doesn't need one. </para></listitem><listitem><para>Then type the following SIP url in the main window of linphone: sip:robot@127.0.0.1:5064 . 127.0.0.1 is the local address for your computer, and robot is the name to use for calling sipomatic. 5064 is the port that sipomatic is listening to. Normally you should always use 5060 (i.e the default port when no port is specified) to call somebody, but sipomatic is the exception: it runs on port 5064. The reason for this is that linphone itself already runs on 5060, and you cannot have two applications running on the same port, at the same time and on the same machine.</para></listitem><listitem><para>Then press the call button. After one second, sipomatic should answer to your call and you should hear a short announcement.</para></listitem></itemizedlist></sect2></sect1><sect1 id="params" >
-<title><!-- anchor id="params" -->Call parameters</title>
-<sect2 id="paramnetwork" >
-<title><!-- anchor id="paramnetwork" -->Network</title>
-<para>Linphone allows you to set your firewall address (see section 7) or a stun server address that might help linphone calling and receiving calls.</para>
-<para>Linphone supports ipv6: you can enable it by toggling the &ldquo;Enable ipv6&rdquo; checkbox. However it can support Ipv6 and Ipv4 together.</para></sect2><sect2 id="paramrtp" >
-<title><!-- anchor id="paramrtp" -->RTP</title>
-<para>RTP (Real Time Protocol) is a protocol used to send media streams over networks.</para><itemizedlist>
-<listitem><para>RTP port: linphone uses default port 7078 to send and receive audio streams. If you think port 7078 is used by another application, change it as you wish.</para></listitem><listitem><para>Jitter compensation: This number represents the number of audio packets linphone is waiting for before starting to play them. If sometimes some audio packets are late, they have a greater chance to be played. Increase this parameter, if the other person's voice sounds 'chopped', in order to improve the quality of the transmission. This will however increase the delay (you will hear the remote user's talk with a few seconds delay). If, on the other hand, you are using a fast network, and you have good audio drivers, you can set this parameters down to three packets, and you will have a very small delay.</para></listitem></itemizedlist></sect2><sect2 id="paramsip" >
-<title><!-- anchor id="paramsip" -->SIP</title>
-<para>SIP (Session Initiation Protocol) is a protocol to establish and destroy media sessions over a network. In simple words, it's responsible for controlling calls. It rings the remote user, initiates the call and terminates it when one of the two parties hangs up.</para><itemizedlist>
-<listitem><para>SIP port: linphone uses default port 5060 to send and receive SIP packets. It is highly recommended by SIP's RFC to use port 5060. So, please don't change this unless you really know what you are doing.</para></listitem><listitem><para>Use registrar: toggle this button if you need the services of a remote SIP server. See section &ldquo;Registering on a remote server&rdquo; for details about this.</para></listitem></itemizedlist></sect2><sect2 id="paramcodec" >
-<title><!-- anchor id="paramcodec" -->Codecs</title>
-<para>Codecs are algorithms especially designed to compress voice data. For example, digitized voice in 16bit / 8000 Hz represents a data flow of 128 kbits/second. Using the GSM codec, this flow is reduced to 13 kbits/second, without significant loss of quality. Currently the best bitrate/quality compromise is achieved by using the speex codec.</para><itemizedlist>
-<listitem><para>Codec choice: linphone can use several codecs. Use buttons at the bottom of the codec list to put them in order of preference. Note, that according to your network connection type, some codecs are not usable. They appear in red and they are not selectable. You can decide to use or not a usable codec (in blue) by changing its status with the enable/disable buttons at the bottom of the list.</para></listitem><listitem><para>Connection type: select how you are connected to the network you want to use (in most cases that will be the internet). This helps linphone configure itself according to the bandwidth of your connection type. For example some some high-bitrate codecs will be automatically disabled, if you select connection with a 56k modem.</para></listitem></itemizedlist></sect2><sect2 id="paramaudio" >
-<title><!-- anchor id="paramaudio" -->Audio parameters</title>
-<para>In this section you will find parameters related to your sound equipment.</para><itemizedlist>
-<listitem><para>Sound card choice: if you have several sound cards on your PC, you can select the one to be used by linphone.</para></listitem><listitem><para>Source choice: in this combo box you can choose the recording source for your voice. In most cases it will be the microphone (mic).</para></listitem></itemizedlist></sect2></sect1><sect1>
-<title>Address book</title>
-<para>The address book lets you store and recall names and sip addresses of people. </para>
-<para>When adding a new contact, a little contact box is displayed, where you can fill in information about the person, mainly of course his SIP address. Additionally you can toggle the &ldquo;send subscription&rdquo; button if you want the person to keep you informed of his online status (ready, busy, gone...). You can also choose to reject subscription from this person, meaning that he will not be informed of your online status.</para></sect1><sect1>
-<title>Using SIP proxies and registrar.</title>
-<para>Registering with a SIP server can be useful in two main cases:</para><itemizedlist>
-<listitem><para>Your machine does not have a public domain name, which prevents other users to call you as they can't guess your IP address. In this case, you can register with a proxy or redirect SIP server to get a public SIP address. For example, you are &lt;sip:bob@no-host-name&gt; and let's suppose that there exists a redirect or proxy SIP server at &lt;sip:myserver.org&gt;. By registering as 'bob' with &lt;sip:myserver.org&gt;, your friends will be able to call you at the address &lt;sip:bob@myserver.org&gt; . Of course, the user_name assigned to you by the SIP server may be different from your login name on the local machine. It can even be a number resembling a regular (PSTN) phone number, eg. 5002000307. The proxy or redirect server myserver.org will forward or redirect the calls from your friends to your exact location.</para></listitem></itemizedlist><para>With linphone&gt;=1.0.0 you can choose to use several proxies simultaneously. Go to the property box, section sip, and click on add proxy. You'll be prompted for a proxy address, route and your identity (also known as address of record). This information should be given to you by the SIP provider you registered with. Route can be omitted (ie. is optional), so leave it empty in case you don't know what to put there. The identity is the SIP address you are known by the proxy. Other users on the network are supposed to always be able to find you at this SIP address.</para></sect1><sect1>
-<title>Behind a firewall</title>
-<para>In some cases the configuration of your network is such that linphone (or any other SIP phone program) cannot tell with certainty, how other computers on the network can talk to your computer. This is usually the case, when your machine is behind a firewall/router that uses the Network Address Translation (NAT) protocol (RFC 1631). In order to find out linphone can use the services of a "Simple Traversal of User datagram through Network address translators" (STUN) server (RFC 3489). If you are behind a NAT firewall/router put the name of your STUN server in the respective field. This information is usually provided to you by your SIP proxy/server and most times, assuming that your SIP server is 'sip.example.com', it looks like 'stun.example.com'. You may also have to specify the port your STUN server listens to (default 3478).</para></sect1><sect1>
-<title>Problems</title>
-<sect2>
-<title>Connection problems</title>
-<para>Firewalls are the main cause of problems in call routing. Check that udp ports are opened and masqueraded, and subscribe to a SIP proxy outside: most proxies are able to handle firewalls issues themselves. If not possible read section 7 (Behind a firewall).</para></sect2><sect2>
-<title>Audio problems</title>
-<blockquote>
-<para>Linphone seems to connect to the remote SIP url, it rings, but when the callee answers, nothing happens and we can't hear each other.</para>
-</blockquote><itemizedlist>
-<listitem><para>Using your audio mixer program (eg. 'alsamixer', 'kmix', or 'aumix') make make sure the audio output is not muted and that the playback (master volume, PCM) and recording (mic) controls are set to at least their medium values.</para></listitem><listitem><para>If the voice is sometimes interrupted, you can modify parameter RTP-&gt;jitter compensation in the property box to greater values to avoid this. But this will also increase the transmission delay.</para></listitem><listitem><para>If linphone cannot open the audio device, check if the user has the right permissions to open /dev/dsp, and close all programs able to use audio device (xmms, kaiman...), as at this point linphone cannot share the audio device with other applications.</para></listitem><listitem><para>Use ALSA drivers (see <ulink url="http://www.alsa-project.org">http://www.alsa-project.org</ulink>). Most distributions still use the old OSS kernel-official drivers, that have big latency problems and are often buggy. ALSA drivers are much better. </para></listitem></itemizedlist></sect2></sect1><sect1>
-<title>Bugs reporting and suggestions</title>
-<para>First go to linphone's home page at <ulink url="http://www.linphone.org">http://www.linphone.org</ulink> to check if you have the latest version if linphone.</para>
-<para>If linphone crashes, send a report to the mailing list, linphone-users@nongnu.org. If linphone does not work, but does not crash, please ensure you have read this manual in its entirety before sending a bug report at the above address. You can also send e-mail to the mailing list to request a specific feature, that you think is missing from linphone. Note that video support, and conferencing are planned features. If someone is interested in helping with the translations of linphone to other languages, s/he can send me a xx.po file based on the po/linphone.pot file of the distribution. You can also translate this user manual in other languages. In any case, please contact me if you want more details.</para></sect1><sect1>
-<title>Authors</title>
-<para>Simon MORLAT (simon.morlat@linphone.org) wrote: </para><itemizedlist>
-<listitem><para>main library (coreapi)</para></listitem><listitem><para>gnome interface (thanks to glade !)</para></listitem><listitem><para>RTP library (oRTP)</para></listitem><listitem><para>audio/video framework and wrappers (mediastreamer)</para></listitem></itemizedlist><para>Aymeric Moizard (jack@atosc.org) wrotes the osip and eXosip stacks that is used by linphone. </para>
-<para>The speex codec <ulink url="http://www.speex.org">http://www.speex.org</ulink> is a high quality low bitrate codec by Jean Marc Valin.</para>
-<para>The GSM library was written by : Jutta Degener and Carsten Bormann,Technische Universitaet Berlin.</para>
-<para>The LPC10-1.5 library was written by: Andy Fingerhut Applied Research Laboratory &lt;-- this line is optional if Washington University, Campus Box 1045/Bryan 509 you have limited space One Brookings Drive Saint Louis, MO 63130-4899 jaf@arl.wustl.edu http://www.arl.wustl.edu/~jaf/ See text files in gsmlib and lpc10-1.5 directories for further information.</para>
-<para>Icons by Pablo Marcelo Moia.</para></sect1><sect1>
-<title>Thanks</title>
-<para>Thanks to Daemon Chaplin, for having done Glade, the gtk interface builder.</para>
-<para>Thanks to Aymeric Moizard, for his famous oSIP library.</para>
-<para>Thanks to Florian Winstertein, for the console interface of linphone.</para>
-<para>Thanks to Jean Marc Valin, for his great speex codec.</para>
-<para>Thanks to the authors of LPC10-1.5 and GSM code.</para>
-<para>Thanks to Joel Barrios ( jbarrios@-NO-SPAM-linuxparatodos.com ) for his RPMS.</para>
-<para>Thanks to Pablo Marcelo Moia for the great icons he has made for linphone.</para>
-<toc></toc></sect1></article>
\ No newline at end of file
diff --git a/linphone/share/C/sipomatic.1 b/linphone/share/C/sipomatic.1
deleted file mode 100644 (file)
index a1f21e8..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-.\" Sipomatic is a SIP phone server. It answers automatically to incoming calls by playing a short message.
-.TH "sipomatic" "1" "1.0.0" "Simon Morlat" "linphone"
-.SH "NAME"
-.LP 
-sipomatic \- SIP auto\-responder from the linphone project.
-.SH "SYNTAX"
-.LP 
-sipomatic [\fI\-u\fP] <\fIsip\-url\fP> [\fI\-f\fP] <\fIannouce\-file\fP> [\fI\-s\fP] <\fIsend\-port\fP> 
-.LP 
-sipomatic \fI\-v\fP
-.br 
-sipomatic \fI\-\-version\fP
-.LP 
-sipomatic \fI\-h\fP
-.br 
-sipomatic \fI\-\-help\fP
-.SH "DESCRIPTION"
-.LP 
-Sipomatic is primilarly a test tool for linphone.
-It waits for incoming sip calls, and answer to them by playing a wav sound file on disk. The sended stream is encoded using the preferred codec of the calling sip\-phone.
-.br 
-The default address of sipomatic is <sip:robot@127.0.0.1:5064>
-It can be overriden with the \-u option.
-.br 
-The default annouce file 'hello.wav' can be overriden with the \-f option.
-.br 
-If you attempt to run several sipomatic on the same machine, then you will require the \-s option to specify explicitely the UDP port used by sipomatic to send its SIP messages.
-
-.SH "OPTIONS"
-.LP 
-.TP 
-\fB\-u\fR <\fIurl\fP>
-Set the sip url sipomatic listens to. The host part of address MUST always be a numerical ip address. The default url is sip:robot@127.0.0.1:5064 .
-.TP 
-\fB\-f\fR <\fIannouce\-file\fP>
-Specifies a 8000Hz 16 bits wav file to be played to the calling users. Default is usually /usr/share/sounds/linphone/hello.wav.
-.TP 
-\fB\-s\fR <\fIsend\-port\fP>
-Specifies explicitely the udp port number to be used to send SIP messages.
-.TP 
-\fB\-v\fR
-\fB\-\-version\fR
-Output version information and exits.
-.TP 
-\fB\-h\fR
-\fB\-\-help\fR
-Output help information and exits.
-.TP 
-.SH "FILES"
-.LP 
-\fI/usr/share/sounds/linphone/hello.raw\fP 
-.br 
-This is the file that sipomatic plays by default to the calling phones.
-The format of this file is a 8000 Hz 16 bit wav file.
-.br 
-
-.SH "ENVIRONMENT VARIABLES"
-.LP 
-.TP 
-\fBSIPOMATIC_URL\fP
-Specifies the address sipomatic listens to. By default it is
-<sip:robot@127.0.0.1:5064> . 
-.SH "EXAMPLES"
-
-.SH "AUTHORS"
-.LP 
-Simon MORLAT <simon.morlat@linphone.org>
-.SH "SEE ALSO"
-.LP 
-linphone(1) linphonec(1)
diff --git a/linphone/share/Makefile.am b/linphone/share/Makefile.am
deleted file mode 100644 (file)
index a15fe2e..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-
-SUBDIRS=C fr it ja cs
-
-LINPHONE_SOUNDS=ringback.wav hello8000.wav hello16000.wav
-LINPHONE_RINGS=rings/orig.wav \
-                               rings/oldphone.wav \
-                               rings/rock.wav \
-                               rings/bigben.wav \
-                               rings/toy.wav \
-                               rings/sweet.wav \
-                               rings/synth.wav \
-                               rings/tapping.wav
-
-sounddir=$(datadir)/sounds/linphone
-
-sound_DATA=$(LINPHONE_SOUNDS)
-
-ringdir=$(datadir)/sounds/linphone/rings
-
-ring_DATA=$(LINPHONE_RINGS)
-
-#to be compliant with freedesktop.org:
-linphone_fddir= $(datadir)/applications
-linphone_fd_DATA= linphone.desktop
-
-
-pkgconfigdir=$(libdir)/pkgconfig
-pkgconfig_DATA=linphone.pc
-
-EXTRA_DIST =                                   $(LINPHONE_SOUNDS) \
-                                                               $(LINPHONE_RINGS) \
-                                                       linphone.gnorba     \
-                                                       linphone.desktop   \
-                                                       linphone_applet.desktop \
-                                                               linphone.pc.in \
-                                                               Makefile.inc
diff --git a/linphone/share/Makefile.inc b/linphone/share/Makefile.inc
deleted file mode 100644 (file)
index 47c0178..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-linphone_manualdir = $(datadir)/gnome/help/linphone/$(HELPLANG)/
-
-linphone_help = \
-        $(top_builddir)/share/$(HELPLANG)
-
-if ENABLE_MANUAL
-all-local:     $(linphone_help)/manual.html
-else
-all-local:
-endif
-
-$(linphone_help)/manual.html:
-       rm -f $(linphone_help)/manual.html
-       sgmltools $(srcdir)/manual.sgml
-
-install-data-local:
-                       $(mkdir_p) $(DESTDIR)$(linphone_manualdir)
-                       -cp -f $(linphone_help)/*.html $(DESTDIR)/$(linphone_manualdir)/.
-                       -cp -f $(linphone_help)/*.css $(DESTDIR)/$(linphone_manualdir)/.
-
-uninstall-local:
-                       rm -rf $(linphone_manualdir)
-
-
-EXTRA_DIST=  manual.lyx manual.sgml
diff --git a/linphone/share/cs/.gitignore b/linphone/share/cs/.gitignore
deleted file mode 100644 (file)
index 3dda729..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile.in
-Makefile
diff --git a/linphone/share/cs/Makefile.am b/linphone/share/cs/Makefile.am
deleted file mode 100644 (file)
index 8bd5c40..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-
-HELPLANG=cs
-
-mandir=@mandir@/$(HELPLANG)
-
-man_MANS = linphone.1 linphonec.1 sipomatic.1
-
-EXTRA_DIST=$(man_MANS)
diff --git a/linphone/share/cs/linphone.1 b/linphone/share/cs/linphone.1
deleted file mode 100644 (file)
index 2e9967c..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-.\" Encoding: ISO-8859-2
-.\" Linphone is an internet phone compatible with the Session Initiation Protocol (SIP: RFC3261 )
-.\" Translation into Czech by Petr Písaø <petr.pisar@atlas.cz>, 2006-02-26
-.TH "linphone" "1" "1.0.0" "Simon Morlat" "linphone"
-.do hla cs
-.do hpf hyphen.cs
-.SH "JMÉNO"
-.LP 
-linphone \- Gnome rozhraní pro linphone, internetový telefon podporující SIP.
-.SH "SYNTAXE"
-.LP 
-linphone [\fI\-\-help\fP] [\fI\-\-verbose\fP] 
-
-.SH "POPIS"
-.LP 
-Linphone mù¾e být spu¹tìn bez jakýchkoliv parametrù. V¹echny parametry jsou
-mìnitelné v nabídce Nastavení.
-
-.SH "VOLBY"
-.LP 
-.TP 
-\fB\-\-help\fR
-Vypí¹e tuto nápovìdu a skonèí.
-.TP 
-\fB\-\-version\fR
-Vypí¹e verzi programu a skonèí.
-.TP
-\fB\-\-verbose\fR
-Na standardní výstup vypisuje vnitøní hlá¹ení programu. Toto je vhodné pøi
-ladìní.
-.SH "SOUBORY"
-.LP 
-\fI~/.gnome2/linphone\fP 
-.br 
-Odtud linphone naèítá svoji konfiguraci. Tento soubor nemusíte mìnit.
-.br 
-
-.SH "PROMÌNNÉ PROSTØEDÍ"
-
-.SH "PØÍKLADY"
-
-.SH "AUTOØI"
-.LP 
-Simon MORLAT <simon.morlat@linphone.org>
-Pro podrobnosti nahlédnìte do souboru AUTHORS, který je souèástí zdrojových
-kódù linphone.
-.SH "VIZ TAKÉ"
-.LP 
-linphonec(1) sipomatic(1)
diff --git a/linphone/share/cs/linphonec.1 b/linphone/share/cs/linphonec.1
deleted file mode 100644 (file)
index 3073c82..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-.\" Encoding: ISO-8859-2
-.\" Linphone is an internet phone compatible with the Session Initiation Protocol (SIP: RFC3261 )
-.\" Translation into Czech by Petr Písaø <petr.pisar@atlas.cz>, 2006-02-26
-.TH "linphonec" "1" "1.0.0" "Florian Winterstein & Simon MORLAT" "linphone, internetový telefon"
-.do hla cs
-.do hpf hyphen.cs
-.SH "JMÉNO"
-.LP 
-linphonec \- Øádkové rozhraní k linphone, internetový telefon podporující SIP.
-.SH "SYNTAXE"
-.LP 
-linphonec [\fI\-d\fP] <\fIúroveò_ladìní\fP> [\fI\-l\fP] <\fIlogovací_soubor\fP>
-[\fI\-c\fP] <\fIkonfiguraèní_soubor\fP> 
-.br 
-linphonec \fI\-v\fP
-.SH "POPIS"
-.LP 
-Linphonec je konzolová verze internetového telefonu linphone urèeného pro
-Gnome prostøedí (http://www.linphone.org).
-.LP 
-Linphonec mù¾e být spu¹tìn bez jakýchkoliv parametrù. Pro správné spu¹tìní
-nepotøebuje ¾ádný konfiguraèní soubor. Pokud ten neexistuje, pøi prvním spu¹tìní
-bude vytvoøen vzorový.
-Standardnì je konfiguraèní soubor ulo¾en v ~/.linphonerc.
-Vìt¹ina parametrù (proxy, hesla) mù¾e být zmìnìna z pøíkazové øádky. Nìkteré
-z nich (cesta k souboru s vyzvánìním) v¹ak lze zmìnit jen úpravou
-konfiguraèního souboru .linponerc.
-.LP 
-Jakmile je linphonec spu¹tìn, oèekává pøíkazy a je pøipraven pøijímat hovory.
-.LP
-Nejdùle¾itìj¹í pøíkazy jsou:
-.br 
-.TP 
-call <sip_url>  zavolat nìkomu. sip_url je ve tvaru sip:user@host
-.TP 
-terminate       ukonèit hovor
-.TP 
-answer          pøijmout pøíchozí hovor
-.TP 
-help            zobrazit interaktivní nápovìdu
-
-.SH "VOLBY"
-.LP 
-.TP 
-\fB\-d\fR <\fIúroveò_ladìní\fP>
-Pou¾ije ladící re¾im s danou mírou upovídanosti (úroveò_ladìní). úroveò_ladìní
-je celé èíslo v rozsahu 0..5.
-.TP 
-\fB\-h\fR
-Vypí¹e nápovìdu a skonèí.
-.TP 
-\fB\-l\fR <\fIlogovací_soubor\fP>
-Urèuje soubor, kam budou zapisovány ladící informace. Jinak se pou¾ije
-standardní výstup.
-.TP 
-\fB\-c\fR <\fIkonfiguraèní_soubor\fP>
-Urèuje konfiguraèní soubor, který bude naèten pøi spu¹tìní.
-.SH "SOUBORY"
-.LP 
-\fI~/.linphonec\fP 
-.br 
-.SH "PROMÌNNÉ PROSTØEDÍ"
-.LP 
-.SH "PØÍKLADY"
-.LP 
-
-.SH "AUTOØI"
-.LP 
-Florian Winterstein <fwin at gmx.de>
-.br 
-Simon Morlat <simon.morlat at linphone.org>
-.SH "VIZ TAKÉ"
-.LP 
-linphone(1) sipomatic(1)
diff --git a/linphone/share/cs/sipomatic.1 b/linphone/share/cs/sipomatic.1
deleted file mode 100644 (file)
index bf9d35c..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-.\" Encoding: ISO-8859-2
-.\" Sipomatic is a SIP phone server. It answers automatically to incoming calls by playing a short message.
-.\" Translation into Czech by Petr Písaø <petr.pisar@atlas.cz>, 2006-02-26
-.TH "sipomatic" "1" "1.0.0" "Simon Morlat" "linphone"
-.do hla cs
-.do hpf hyphen.cs
-.SH "JMÉNO"
-.LP 
-sipomatic \- SIP auto\-responder z projektu linphone.
-.SH "SYNTAXE"
-.LP 
-sipomatic [\fI\-u\fP] <\fIsip\-url\fP> [\fI\-f\fP] <\fInahrávka\fP>
-[\fI\-s\fP] <\fIodchozí_port\fP> 
-.LP 
-sipomatic \fI\-v\fP
-.br 
-sipomatic \fI\-\-version\fP
-.LP 
-sipomatic \fI\-h\fP
-.br 
-sipomatic \fI\-\-help\fP
-.SH "POPIS"
-.LP
-Sipomatic je základní testovací nástroj pro linphone.
-Èeká na pøíchozí sipový hovor a odpoví na nìj pøehráním zvukového souboru typu
-WAV z disku. Odeslaný zvukový proud je kódován preferovaným kodekem volajícího
-sipového telefonu.
-.LP 
-Výchozí adresa sipomaticu je <sip:robot@127.0.0.1:5064>. Mù¾e být zmìnìna
-volbou \-u.
-.br 
-Namísto výchozího oznamovacího souboru "hello.wav" lze vybrat jiný volbou \-f. 
-.br
-Jestli¾e se budete pokou¹et spustit více sipomatic klientù na jednom stroji,
-pak budete potøebovat volbou \-s explicitnì urèit UDP port, který bude pou¾it
-k odeslání vlastních SIP zpráv.
-
-.SH "VOLBY"
-.LP 
-.TP 
-\fB\-u\fR <\fIurl\fP>
-Nastaví SIP URL, na které bude sipomatic poslouchat. Èást adresy se jménem
-poèítaèe MUSÍ být v¾dy èíselná IP adresa. Výchozí URL je sip:robot@127.0.0.1:5064
-.TP 
-\fB\-f\fR <\fInahrávka\fP>
-Urèuje 8000Hz 16bitový WAV soubor, který bude pøehrán volajícímu u¾ivateli.
-Výchozí cesta bývá /usr/share/sounds/linphone/hello.wav.
-.TP 
-\fB\-s\fR <\fIodchozí_port\fP>
-Explicitnì definuje èíslo UDP portu, který bude pou¾it pro odchozí SIP zprávy. 
-.TP 
-\fB\-v\fR
-\fB\-\-version\fR
-Vytiskne informace o verzi a skonèí.
-.TP 
-\fB\-h\fR
-\fB\-\-help\fR
-Vypí¹e nápovìdu a skonèí.
-.LP 
-.SH "SOUBORY"
-.LP 
-\fI/usr/share/sounds/linphone/hello.raw\fP 
-.br
-Toto je soubor, který sipomatic standardnì pøehraje volajícímu telefonu.
-Formát tohoto souboru je WAV vzorkovaný 16bitovou hodnotou s frekvencí
-8000 Hz.
-.br 
-
-.SH "PROMÌNNÉ PROSTØEDÍ"
-.LP 
-.TP 
-\fBSIPOMATIC_URL\fP
-Definuje adresu, na které sipomatic poslouchá. Jinak je pou¾ita 
-<sip:robot@127.0.0.1:5064> 
-.SH "PØÍKLADY"
-
-.SH "AUTOØI"
-.LP 
-Simon MORLAT <simon.morlat@linphone.org>
-.SH "VIZ TAKÉ"
-.LP 
-linphone(1) linphonec(1)
diff --git a/linphone/share/fr/.gitignore b/linphone/share/fr/.gitignore
deleted file mode 100644 (file)
index e1d2077..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-Makefile
-Makefile.in
-manual
-manual.junk
-manual.html
diff --git a/linphone/share/fr/Makefile.am b/linphone/share/fr/Makefile.am
deleted file mode 100644 (file)
index 6da5a81..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-HELPLANG=fr
-
-include ../Makefile.inc
diff --git a/linphone/share/fr/manual.lyx b/linphone/share/fr/manual.lyx
deleted file mode 100644 (file)
index 793c7f4..0000000
+++ /dev/null
@@ -1,745 +0,0 @@
-#LyX 1.1 created this file. For more info see http://www.lyx.org/
-\lyxformat 218
-\textclass docbook
-\language french
-\inputencoding latin1
-\fontscheme default
-\graphics default
-\paperfontsize default
-\spacing single 
-\papersize Default
-\paperpackage a4
-\use_geometry 0
-\use_amsmath 0
-\paperorientation portrait
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\defskip medskip
-\quotes_language french
-\quotes_times 2
-\papercolumns 1
-\papersides 1
-\paperpagestyle default
-
-\layout Title
-
-
-\begin_inset LatexCommand \label{manual}
-
-\end_inset 
-
-MANUEL DE L'UTILISATEUR DE LINPHONE
-\layout Author
-
-Simon Morlat (simon.morlat@linphone.org)
-\layout Date
-
-11-13-2001
-\layout Section
-
-Introduction
-\layout Standard
-
-Linphone est un simple logiciel de téléphonie sur le web.
- Il permet d'effectuer des conversations comprenants deux participants en
- utilisant un réseau IP comme Internet.
- Ainsi, voici l'équipement nécessaire pour utiliser Linphone : 
-\layout Itemize
-
-Linux ( Peut fonctionner dans d'autres environnements tels que BSD ou d'autres
- UNIX, mais personne ne l'a encore testé.)
-\layout Itemize
-
-Gnome 1.2 ou supérieur, installé mais pas nécessairement utilisé.
-\layout Itemize
-
-Une carte son configuré correctement.
-\layout Itemize
-
-Des écouteurs ou haut-parleurs.
-\layout Itemize
-
-Un micro.
-\layout Itemize
-
-Une connection réseau (Internet par exemple), par modem, carte réseau Ethernet
- ...
-\layout Standard
-
-Il est préférable de fermer toutes les applications utilisant la carte son
- avant d'utiliser Linphone.
- Linphone est un logiciel libre, il est distribué sous la license publique
- GNU.
-\layout Standard
-
-
-\emph on 
-ATTENTION : Ce logiciel est distribué SANS GARANTIE.
- Lisez le fichier COPYING pour plus de détails.
- Ceci signifie entre autre que vous ne devez pas utiliser Linphone pour
- des conversations confidentielles : il y a AUCUN CRYPTAGE, de ce fait,
- il est peut-être facile pour quelqu'un de mal intentionné de pirater les
- flux audios.
- Notez toutefois, qu'il n'est pas recommandé d'utiliser Linphone en tant
- qu'utilisateur root.
-\layout Section
-
-Utilisation
-\layout Standard
-
-Linphone peut être utilisé suivant 3 modes différents : 
-\layout Itemize
-
-En tant qu'application (normale) : Dans le menu de Gnome, Linphone devrait
- apparaître dans la section Réseau ( "Network" ).
- Si vous n'utilisez pas Gnome, vous pouvez démarrer Linphone dans une fenêtre
- terminal par exemple.
- Quand Linphone n'est pas en cours d'éxecution, vous ne pouvez pas recevoir
- d'appel(s).
-\layout Itemize
-
-En tant qu'applet Gnome : en cliquant sur le panneau Gnome du bouton droit,
- ajoutez l'applet.
- Linphone apparait dans la section Réseau.
- En tournant en tâche de fond dans le panneau Gnome, Linphone est capable
- de recevoir des appel(s) même si sa fenêtre n'est pas visible.
- Si vous voulez voir la fenêtre principale, cliquez sur l'applet.
- Quand un appel arrive, la fenêtre principale passe en premier plan,et vous
- entendrez normalement la sonnerie retentir.
-\layout Itemize
-
-En tant que démon : Ceci est intéressant pour les non-utilisateurs de Gnome.
- Par exemple pour KDE, vous avez un repertoire /home/user/.kde2/AutoStart/
- où vous pouvez rajouter les applications que vous voulez voir démarrer
- à votre début de session.
- Ainsi, dans le repertoire cité, à l'aide du gestionnaire de fichiers, ajouter
- un lien en cliquant du bouton droit.
- La commande à rentrer est "linphone -daemon".
- Vous ne verrez pas l'interface de Linphone, donc, pour la faire apparaitre,
- démarrez Linphone normalement, par exemple à travers une fenêtre terminal.
-\layout Section
-
-Comment appeler
-\layout Subsection
-
-Principes de base
-\layout Standard
-
-Linphone utilise le protocole SIP (Session Initiation Protocol) pour établir
- les appels avec vos correspondants.
- Le protocole spécifie que chaque personne doit être identifié par une URL
- sip de la forme: sip:user_name@host_name.
- Cette manière d'adresser les personnes est très proche de celle utilisée
- pour le courrier électronique.
-\layout Standard
-
-User_name est un nom d'utilisateurs sur une machine, comme un nom de login
- sur une machine linux, par exemple.
- Host_name est le nom d'une machine, soit sous forme d'adresse IP, ou plus
- simplement sous forme de nom de domaine (ex: linphone.org)
-\layout Standard
-
-Notez que SIP est un nouveau protocole de télécommunication fait pour être
- simple et efficace sur l'internet, et qu'il est totalement différent et
- incompatible avec H.323.
- H.323 est le protocole actuellement utilisé par NetMeeting ou GnomeMeeting.
-\layout Subsection
-
-Application: deux personnes (Bob et Tom) se connectent à internet par un
- modem analogique classique.
-\layout Standard
-
-Voici la manière la plus simple de procéder : 
-\layout Standard
-
-Pré-requis : 
-\layout Itemize
-
-Un modem 28.8 Baud ou plus.
-\layout Standard
-
-Déroulement : 
-\layout Itemize
-
-Il est convenu que Bob doit appeler Tom à 21h00.
- A 21h00, Tom se connecte à Internet en utilisant kppp, gppp ou wvdial (ou
- un autre).
- Dès qu'il est connecté sur l'Internet, il peut lancer Linphone.En ouvrant
- la fenêtre de statistiques de kppp ou gppp, il peut voir son adresse IP
- (sinon, il peut taper /sbin/ifconfig pour l'obtenir).
- Le nom de l'interface modem doit être ppp0.
-\layout Itemize
-
-Ensuite, il envoit un email à Bob disant : "Mon adresse IP estxxx.xxx.xxx.xxx".
-\layout Itemize
-
-Bob recoit l'email et tape dans la fenêtre de Linphone le nom est l'adresse
- IP de la personne à contacter : Tom@xxx.xxx.xxx.xxx(L'adresse IP de Tom) et
- pour finir, il appuit sur le bouton Appeler.
-\layout Itemize
-
-Linphone sonne à la maison de Tom ...Tom a juste à répondre à l'appel en cliquant
- sur le bouton "répondre" et ainsi devrait pouvoir commencer la discussion.
-\layout Standard
-
-Si vous rencontrez des problèmes dans une de ces étapes, allez à la section
- 4-Problèmes.
-\layout Subsection
-
-Essai en local: vous n'avez personne à appeler pour l'instant, mais vous
- souhaiteriez voir si linphone marche vraiment.
-\layout Standard
-
-
-\begin_inset LatexCommand \label{sipomatic}
-
-\end_inset 
-
-Depuis la version 0.3.0, Linphone est livré avec un programme de test appelé
- "sipomatic".
- Sipomatic peut répondre automatiquement aux appels provenant de Linphone.
- A vous d'essayer : 
-\layout Itemize
-
-Demarrez linphone.
-\layout Itemize
-
-Démarrez sipomatic dans une fenêtre terminal.
- Ne soyez pas supris, sipomatic ne possède aucune interface graphique, mais
- vous n'avez pas besoin de modifier quoi-que-ce-soit.
-\layout Itemize
-
-Dans Linphone, allez dans les propriétés, section réseau, et choisissez
- "lo" comme interface par défaut.
- Appliquez les changements en cliquant sur OK.
- Tapez l'adresse S.I.P suivante dans la fenêtre principale : sip:robot@127.0.0.1:5064.
- 127.0.0.1 est l'adresse locale de votre ordinateur, et robot est le nom à
- utiliser pour appeler sipomatic.
- 5064 est le port par lequel sipomatic peut-être contacté.
- Normalement, vous devez toujours utiliser 5060 pour appeler quelqu'un,
- mais sipomatic est une exception : il fonctionne sur le port 5064.
- La raison est que Linphone fonctionne déjà sur le port 5060, et il est
- impossible d'avoir deux applications utilisant le même port au même instant,
- sur la même machine.
-\layout Itemize
-
-Appuyez sur le bouton "Appeler".
- Après quelques secondes, sipomatic devrait répondre à votre appel et vous
- devez entendre une courte annonce.
-\layout Section
-
-
-\begin_inset LatexCommand \label{params}
-
-\end_inset 
-
-Paramètres des appels
-\layout Subsection
-
-
-\begin_inset LatexCommand \label{paramnetwork}
-
-\end_inset 
-
-Réseau
-\layout Itemize
-
-Liste des interfaces réseau: vous devez choisir une interface réseau à utiliser
- avec Linphone.
- Si vous voulez contacter quelqu'un sur l'Internet, vous devez choisir l'interfa
-ce réseau connectée à l'Internet.
- Par exemple, si vous utilisez un modem, celle-ci devrait être ppp0.
- Si vous n'êtes connecté à aucun réseau, seulement l'interface réseau locale
- appelé lo apparaitra dans la liste.
- La seule chose que vous pouvez faire dans ce cas la est d'appeler 
-\begin_inset LatexCommand \ref[sipomatic]{sipomatic}
-
-\end_inset 
-
-.
-\layout Itemize
-
-Type de connection: choisissez le type de connection que vous utilisez pour
- vous connecter au réseau que vous désirez utiliser.
- Ceci aidera Linphone à s'auto-configurer en fonction de la bande passante
- de votre type de connection.
-\layout Subsection
-
-
-\begin_inset LatexCommand \label{paramrtp}
-
-\end_inset 
-
-RTP
-\layout Standard
-
-RTP signifie Real Time Protocol, il permet d'envoyer des flux de données
- multimedia.
-\layout Itemize
-
-port RTP: Linphone utilise le port 7072 par défaut pour envoyer et recevoir
- des signaux audios.
- Si vous pensez que le port 7072 est utilisé par une autre application,
- changez le comme vous voulez.
-\layout Itemize
-
-Jitter compensation: ce nombre représente le nombre de paquets audios que
- Linphone attend avant de vous les faire entendre.
- Augmentez ce nombre si vous entendez une voix hachée de manière à améliorer
- la qualité de la transmission, mais attention, ceci augmente le delai (vous
- entendrez la voix de l'utilisateur distant quelques millisecondes plus
- tard).D'un autre côté, si vous utilisez un réseau parfait, et que vous disposez
- de bon drivers audios, vous pouvez descendre ces paramètres très bas jusqu'à
- 3 paquets, ainsi vous aurez un délai très faible.
-\layout Subsection
-
-
-\begin_inset LatexCommand \label{paramsip}
-
-\end_inset 
-
-SIP
-\layout Standard
-
-SIP (Session Initiation Protocol) est un protocole qui permet d'établir
- des sessions de téléphonie par l'intermédiaire d'un réseau IP.
- En simplifiant, c'est la chose qui permet de faire sonner chez l'autre
- utilisateur, démarrer ou terminer l'appel quand l'un des deux correspondants
- raccroche.
-\layout Itemize
-
-port SIP: Linphone utilise par défaut le port 5060 pour envoyer / recevoir
- des paquets SIP.
- Il est hautement recommandé par la RFC du protocole SIP d'utiliser celui-ci.
- Donc, ne le changez pas à moins que vous n'ayez vraiment pas le choix.
-\layout Itemize
-
-Votre adresse SIP: modifiez ici votre nom d'utilisateur et votre nom de
- machine à votre gré.
- Bien entendu donner un nom de machine ici ne signifie pas que ce nom soit
- connue des autres machines du réseau.
- Néammoins linphone utilisera peu ce nom de machine et préfèrera utiliser
- votre adresse IP pour communiquer avec d'autres machines.
-\layout Itemize
-
-Utiliser un serveur sip registrar: Cochez ce choix, si vous voulez vous
- enregistrer sur un serveur SIP (registrar) pour obtenir différents services.
- Quand vous n'avez pas d'adresse IP fixe, cela peut-être très intéressant
- pour permettre à vos amis de vous appeler.
- Regardez la section intitulée "
-\begin_inset LatexCommand \ref[enregistrement sur un serveur sip]{registering}
-
-\end_inset 
-
-".
-\layout Subsection
-
-
-\begin_inset LatexCommand \label{paramcodec}
-
-\end_inset 
-
-Codecs
-\layout Standard
-
-Les codecs sont des algorithmes utilisés pour compresser la voix.
- Par exemple, une voix digitalisée en 16bit/8000Hz représente un flux de
- données de 128kbits/seconde.
- En utilisant le vocodeur GSM, ce flux est réduit à 13kbits/seconde, sans
- perte significative de qualité.
-\layout Itemize
-
-Choix de codecs: Linphone peut utiliser plusieurs codecs.
- Utilisez les boutons situés en dessous de la liste des codecs de manière
- à les placer dans un order de préférence.
- Notez bien, qu'en fonction de votre type de connection réseau, certains
- codecs sont inutilisables.Ils apparaitront en rouge et ne seront pas sélectionna
-ble.
- Vous pouvez décider d'utiliser ou non un codec "utilisable" (en bleu) en
- changeant son état à l'aide du bouton activer/désactiver en dessous de
- la liste.
-\layout Subsection
-
-
-\begin_inset LatexCommand \label{paramaudio}
-
-\end_inset 
-
-Audio parameters
-\layout Itemize
-
-Mode de pilotage: si vous avez installé des drivers ALSA avec une librairie
- ALSA <0.9, choisissez ALSA pour avoir de meilleires performances.
- Sinon, ou si vous n'en savez rien, choisissez OSS, cela marche suffisemment
- bien.
-\layout Itemize
-
-Choix de la source d'enregistrement: vous pouvez choisir votre source d'enregist
-rement pour la voix.
- Dans la plupart des cas, celle-ci sera le microphone.
-\layout Itemize
-
-Auto-kill option: en choissant cette option, Linphone essaiera de stopper
- les processus sonores (esd & artsd) qui peuvent bloquer votre périphérique
- sonore et ainsi provoquer des problèmes d'ouverture des périphériques par
- Linphone quand il en a besoin.
- Il est recommandé d'activer cette option.
-\layout Section
-
-Carnet d'adresses
-\layout Standard
-
-Depuis la version 0.4.1 linphone dispose d'un carnet d'adresses (menu connexion,
- carnet d'addresses), avec lequel vous pouvez memoriser des adresses, et
- les rappeler facilement lorsque vous souhaitez appeler.
-\layout Section
-
-
-\begin_inset LatexCommand \label{registering}
-
-\end_inset 
-
-Enregistrement sur un serveur sip
-\layout Standard
-
-Vous pouvez souscrire des services sur des serveurs sip distants appelés
- registrar, proxy ou redirect server.
- Ces services peuvent être:
-\layout Standard
-
-You can suscribe for services on remote SIP servers.
- These services can be:
-\layout Itemize
-
-redirection: linphone va demander au serveur la création d' un compte <sip:votre
-_nom@le_serveur_sip>.
- Cette adresse pourra alors être utilisée par vos correspondants pour vous
- joindre.
- Un petit example concret pour bien comprendre: vous n'êtes qu'un pauvre
- internaute connecté temporairement grace à un modem 56k.
- Votre machine n'a pas de nom de domaine connu et votre adresse IP change
- à chaque nouvelle connexion.
- Il est impossible pour vos amis de vous joindre car il ne peuvent deviner
- votre adresse IP, à moins que vous ne leur donniez en envoyant un courriel,
- par exemple.
- Pour palier à ce problème, vous pouvez demander à avoir un compte sur un
- serveur sip connu de vos amis, qui lui est fixe et tout le temps connecté.
- Pour cela, spécifiez l'adresse du serveur dans la boite de propriété, section
- sip.
- Cette adresse est par exemple <sip:serveur_exemple.com> et votre nom d'utilisate
-ur est 
-\begin_inset Quotes fld
-\end_inset 
-
-Bob
-\begin_inset Quotes frd
-\end_inset 
-
-.
- Linphone va alors envoyer au serveur un message pour l'informer de la correspon
-dance entre l'adresse <sip:bob@serveur_exemple.com> et votre adresse IP actuelle.
- Desormais vos amis peuvent vous appeler en utilisant cette nouvelle adresse,
- leurs appels seront alors automatiquement redirigés vers votre machine.
- Il n'ont plus besoin de connaitre votre adresse IP qui change tout le temps
- pour vous joindre.
- Bien sur, <sip:serveur_exemple.com> est supposée être bien connue de tout
- vos amis.
-\layout Itemize
-
-proxy: c'est exactement le meme principe, excepté que la redirection se
- fait de manière transparente et invisible le linphone de l'appelant.
-\layout Standard
-
-Le registrar que vous avez spécifié peut aussi être utilisé comme proxy
- sortant.
- Dans ce cas tous les appels émanant de votre linphone seront dirigé vers
- ce serveur, et il sera supposé les faire suivre vers les bonnes personnes.
- Ceci est très utile et même indispensable lorsque vous utilisez linphone
- dans un réseau privé abrité par un firewall, si bien sur un proxy sip est
- actif sur le firewall.
-\layout Standard
-
-Pour utiliser solliciter un serveur sip, vous devez aller à la boîte de
- propriété, rubrique SIP, et cocher le bouton qui se trouve en face de "use
- registrar".
- Tapez l'adresse du registrar, et choisissez un nom d'utilisateur qui n'est
- pas trop fréquent de manière à éviter les conflits de noms.
- Donnez une indication du service que le serveur doit effectuer pour vous
- en cochant les boutons 
-\begin_inset Quotes fld
-\end_inset 
-
-redirection
-\begin_inset Quotes frd
-\end_inset 
-
- ou 
-\begin_inset Quotes fld
-\end_inset 
-
-proxy
-\begin_inset Quotes frd
-\end_inset 
-
-.
- Sélectionnez aussi l'option 
-\begin_inset Quotes fld
-\end_inset 
-
-le serveur est un proxy sortant
-\begin_inset Quotes frd
-\end_inset 
-
- si vous êtes derrière un pare-feu.
-\layout Standard
-
-Enfin en fermant la boite de propriétés linphone communiquera immédiatement
- avec le serveur SIP pour y obtenir les services demandés.
- De même lorsque vous fermez linphone, celui ci prendra quelques secondes
- pour se désenregistrer auprès du serveur.
-\layout Standard
-
-Une liste de serveurs sip peut être trouvée à cette addresse: 
-\begin_inset LatexCommand \url[http://www.cs.columbia.edu/~hgs/sip/servers.html]{http://www.cs.columbia.edu/~hgs/sip/servers.html}
-
-\end_inset 
-
-.
- Malheureusement, beaucoup de ces serveurs ne fonctionnent plus, peut-être
- à cause de la crise et de ses faillites.
- Certains ne sont pas utilisables car ils requierent des méthodes d'autentificat
-ion qui ne sont pas encore implémentées dans linphone.
- Afin donc de ne pas vous faire perdre votre temps, une liste des serveurs
- sip publiques fonctionnant avec linphone est disponible sur 
-\begin_inset LatexCommand \url[http://simon.morlat.free.fr/english/servers.html]{http://simon.morlat.free.fr/english/servers.html}
-
-\end_inset 
-
-.
-\layout Section
-
-Utilisation derrière les pares-feux
-\layout Standard
-
-Linphone est capable de fonctionner derrière les firewalls grâce à un serveur
- proxy SIP fonctionnant sur la machine firewall.
- Un tel serveur est en cours de développement sur 
-\begin_inset LatexCommand \url[http://osipproxy.sourceforge.net]{http://osipproxy.sourceforge.net}
-
-\end_inset 
-
-.
- Bien sûr il sera libre et basé sur la librairie LGPL oSIP.
-\layout Standard
-
-Une fois le proxy serveur mis en place, il vous faut configurer linphone
- pour qu'il l'utilise.
- Pour cela rendez vous dans la boite de propriétés, section SIP et cochez
- la case 
-\begin_inset Quotes fld
-\end_inset 
-
-Utiliser un registrar SIP
-\begin_inset Quotes frd
-\end_inset 
-
-, indiquez son adresse, et cocher l'option 
-\begin_inset Quotes fld
-\end_inset 
-
-le serveur est un proxy sortant
-\begin_inset Quotes frd
-\end_inset 
-
-.
-\layout Standard
-
-Il y a un cas pour lequel le proxy n'est pas indispensable: c'est le cas
- où les machines du réseau privé possèdent une adresse publique, le firewall
- étant là pour filtrer les paquets entrants ou sortants.
- Vous devez pour permettre a linphone de fonctionner avec des machines exterieur
-es, autoriser le traffic UDP sur le port SIP (par defaut 5060, il est deconseill
-é de le changer), et sur le port RTP de chaque linphone du sous réseau.
- Le port RTP est paramètrable comme bon vous semble dans la boite de proprietés.
-\layout Section
-
-Problèmes divers
-\layout Subsection
-
-Problèmes de connexion
-\layout Quotation
-
-J'essaye d'appeler mon pote <sip:toto@example.com>, mais rien ne se passe,
- pas de sonnerie.
-\layout Standard
-
-Vous devez vérifier que linphone utilise l'interface réseau qui vous connecte
- sur le réseau ou se trouve votre ami.
- La liste des interface disponibles est donnée dans la boite de propriété,
- section réseau.
- Sélectionnez la bonne.
-\layout Standard
-
-Si le problème persiste, il y a fort à parier que votre ami ne soit pas
- joignable actuellement.
-\layout Subsection
-
-Problèmes audio
-\layout Quotation
-
-Linphone semble correctement établir l'appel, il sonne, mais une fois que
- le correspondant a décrocher, plus rien ne se passe et on ne s'entend pas.
-\layout Itemize
-
-La plupart des gens ont ce genre de symptome car ils n'ont pas choisi la
- bonne interface réseau.
- Si vous êtes connectés par modem, ce doit être ppp0.
- En aucun cas l'interface 
-\begin_inset Quotes fld
-\end_inset 
-
-lo
-\begin_inset Quotes frd
-\end_inset 
-
- ne peut permettre d'avoir une communication via le réseau.
- Elle ne sert que pour le test local avec sipomatic (voir plus haut).
-\layout Itemize
-
-Augmentez le niveau sonore d'acquisition et de restitution, à l'aide des
- potentiomètres situés en bas de la fenêtre principale.
-\layout Itemize
-
-Si la voix de votre correspondant vous semble coupée ou hachée, vous pouvez
- essayer d'augmenter le paramètre jitter compensation de l'onglet RTP de
- la boite de propriété.
- Mais attention, cela augmente la latence en contrepartie.
-\layout Itemize
-
-Si linphone ne peut se servir de la carte son, vérifiez que celle ci n'est
- pas utilisée au meme moment par d'autres programmes audio.
-\layout Itemize
-
-Enfin utilisez les drivers sons alsa (voir 
-\begin_inset LatexCommand \url[http://www.alsa-project.org]{http://www.alsa-project.org}
-
-\end_inset 
-
-) , plutôt que les oss fournit avec le kernel linux.
- Malheureusement la plupart des distributions utilsent encore ces vieux
- pilotes alors qu'ils presentent de nombreux bugs et problèmes de latence.
- Les drivers ALSA sont beaucoup plus performants.
- Notez que si vous changer vos drivers, vous n'avez nul besoin de recompiler
- linphone ou de changer quoi que ce soit a sa configuration.
-\layout Section
-
-Rapports de bogues et suggestions
-\layout Standard
-
-En premier lieu, allez sur le site de Linphone 
-\begin_inset LatexCommand \url[http://www.linphone.org]{http://www.linphone.org}
-
-\end_inset 
-
- afin de vérifier que vous ayez bien la dernière version de Linphone.
-\layout Standard
-
-Si linphone plante, envoyez moi directement un message à bugs@linphone.org.
- Si Linphone ne fonctionne pas, mais ne se plante pas, vérifiez bien que
- vous avez bien lu ce manuel entièrement avant de m'envoyer un compte rendu
- à l'adresse précédente.
- Dans tous les cas veillez à m'envoyer le plus d'information possible relatifs
- à votre problème, notamment la sortie de debug que linphone écrit lorsque
- vous l'executez depuis un terminal.
- Si vous désirez autre chose, n'hésitez pas à m'envoyer un email à l'adresse
- help@linphone.org.
- Prenez note que l'ajout de la vidéo et du mode conférence sont planifiés.
-\layout Standard
-
-Si quelqu'un est interessé pour faire des traductions de Linphone, envoyez
- moi un fichier xx.po basé sur celui se trouvant dans po/linphone.pot de la
- distribution.
- Vous pouvez aussi traduire ce manuel utilisateur dans d'autres langues.
- Dans tous les cas, contactez moi si vous voulez plus de détails.
-\layout Section
-
-Auteurs
-\layout Standard
-
-Simon MORLAT (simon.morlat@linphone.org) a ecrit: 
-\layout Itemize
-
-Programme principal (src)
-\layout Itemize
-
-librairie RTP (lprtplib)
-\layout Itemize
-
-osipua : la librarie sip User Agent au dessus d'osip.
-\layout Itemize
-
-interface pour les drivers audio (audio)
-\layout Itemize
-
-les wrappers pour les codecs lpc10-1.5, gsm et g711.
-\layout Standard
-
-Aymeric Moizard (jack@atosc.org) a ecrit la pile SIP oSIP utilisé par linphone.
-\layout Standard
-
-La librairie GSM a été écrite par: Jutta Degener and Carsten Bormann,Technische
- Universitaet Berlin.
-\layout Standard
-
-La librairie LPC10-1.5 par: Andy Fingerhut Applied Research Laboratory <--
- this line is optional if Washington University, Campus Box 1045/Bryan 509
- you have limited space One Brookings Drive Saint Louis, MO 63130-4899 jaf@arl.wu
-stl.edu http://www.arl.wustl.edu/~jaf/ Lisez les fichiers textes README dans
- les repertoire gsmlib et lpc10-1.5 pour plus d'informations.
-\layout Standard
-
-Les icones sont de Pablo Marcelo Moia et le logo de Philippe Beau.
-\layout Section
-
-Remerciements
-\layout Standard
-
-Merci à Daemon Chaplin pour avoir fait Glade, le constructeur d'interface
- graphique GTK+.
-\layout Standard
-
-Merci aux auteurs du code des LPC10-1.5 et GSM.
-\layout Standard
-
-Merci à Joel Barrios ( jbarrios@-NO-SPAM-linuxparatodos.com ) pour ses RPMS.
-\layout Standard
-
-Merci à Pablo Marcelo Moia pour les icones.
-\layout Standard
-
-Merci à Philippe Beau pour la traduction de ce manuel en Francais, pour
- le logo, et pour le nouveau site web qu'il a fait pour linphone.
-\layout Standard
-
-
-\begin_inset LatexCommand \tableofcontents{}
-
-\end_inset 
-
-
-\the_end
diff --git a/linphone/share/fr/manual.sgml b/linphone/share/fr/manual.sgml
deleted file mode 100644 (file)
index e800f05..0000000
+++ /dev/null
@@ -1,488 +0,0 @@
-<!doctype article public "-//OASIS//DTD DocBook V3.1//EN">
-
-<article lang="fr">
-<!-- DocBook file was created by LyX 1.1
-  See http://www.lyx.org/ for more information -->
-  <artheader id="manual">
-   <title>
-   MANUEL DE L'UTILISATEUR DE LINPHONE
-  </title>
-  <author>
-   Simon Morlat (simon.morlat@linphone.org)
-  </author>
-  <date>
-   11-13-2001
-  </date>
-  </artheader>
-  <sect1>
-   <title>
-   Introduction
-  </title>
-  <para>
-   Linphone est un simple logiciel de téléphonie sur le web. Il permet d'effectuer des conversations comprenants deux participants en utilisant un réseau IP comme Internet. Ainsi, voici l'équipement nécessaire pour utiliser Linphone : 
-  </para>
-  <itemizedlist>
-   <listitem>
-   <para>
-   Linux ( Peut fonctionner dans d'autres environnements tels que BSD ou d'autres UNIX, mais personne ne l'a encore testé.)
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   Gnome 1.2 ou supérieur, installé mais pas nécessairement utilisé.
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   Une carte son configuré correctement.
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   Des écouteurs ou haut-parleurs.
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   Un micro.
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   Une connection réseau (Internet par exemple), par modem, carte réseau Ethernet ...
-   </para>
-  </listitem>
-  </itemizedlist>
-  <para>
-   Il est préférable de fermer toutes les applications utilisant la carte son avant d'utiliser Linphone. Linphone est un logiciel libre, il est distribué sous la license publique GNU.
-  </para>
-  <para>
-   ATTENTION : Ce logiciel est distribué SANS GARANTIE. Lisez le fichier COPYING pour plus de détails. Ceci signifie entre autre que vous ne devez pas utiliser Linphone pour des conversations confidentielles : il y a AUCUN CRYPTAGE, de ce fait, il est peut-être facile pour quelqu'un de mal intentionné de pirater les flux audios. Notez toutefois, qu'il n'est pas recommandé d'utiliser Linphone en tant qu'utilisateur root.
-  </para>
-  </sect1>
-  <sect1>
-   <title>
-   Utilisation
-  </title>
-  <para>
-   Linphone peut être utilisé suivant 3 modes différents : 
-  </para>
-  <itemizedlist>
-   <listitem>
-   <para>
-   En tant qu'application (normale) : Dans le menu de Gnome, Linphone devrait apparaître dans la section Réseau ( &quot;Network&quot; ). Si vous n'utilisez pas Gnome, vous pouvez démarrer Linphone dans une fenêtre terminal par exemple. Quand Linphone n'est pas en cours d'éxecution, vous ne pouvez pas recevoir d'appel(s).
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   En tant qu'applet Gnome : en cliquant sur le panneau Gnome du bouton droit, ajoutez l'applet. Linphone apparait dans la section Réseau. En tournant en tâche de fond dans le panneau Gnome, Linphone est capable de recevoir des appel(s) même si sa fenêtre n'est pas visible. Si vous voulez voir la fenêtre principale, cliquez sur l'applet. Quand un appel arrive, la fenêtre principale passe en premier plan,et vous entendrez normalement la sonnerie retentir.
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   En tant que démon : Ceci est intéressant pour les non-utilisateurs de Gnome. Par exemple pour KDE, vous avez un repertoire /home/user/.kde2/AutoStart/ où vous pouvez rajouter les applications que vous voulez voir démarrer à votre début de session. Ainsi, dans le repertoire cité, à l'aide du gestionnaire de fichiers, ajouter un lien en cliquant du bouton droit. La commande à rentrer est &quot;linphone -daemon&quot;. Vous ne verrez pas l'interface de Linphone, donc, pour la faire apparaitre, démarrez Linphone normalement, par exemple à travers une fenêtre terminal.
-   </para>
-  </listitem>
-  </itemizedlist>
-  </sect1>
-  <sect1>
-   <title>
-   Comment appeler
-  </title>
-   <sect2>
-    <title>
-    Principes de base
-   </title>
-   <para>
-    Linphone utilise le protocole SIP (Session Initiation Protocol) pour établir les appels avec vos correspondants. Le protocole spécifie que chaque personne doit être identifié par une URL sip de la forme: sip:user_name@host_name. Cette manière d'adresser les personnes est très proche de celle utilisée pour le courrier électronique.
-   </para>
-   <para>
-    User_name est un nom d'utilisateurs sur une machine, comme un nom de login sur une machine linux, par exemple. Host_name est le nom d'une machine, soit sous forme d'adresse IP, ou plus simplement sous forme de nom de domaine (ex: linphone.org)
-   </para>
-   <para>
-    Notez que SIP est un nouveau protocole de télécommunication fait pour être simple et efficace sur l'internet, et qu'il est totalement différent et incompatible avec H.323. H.323 est le protocole actuellement utilisé par NetMeeting ou GnomeMeeting.
-   </para>
-   </sect2>
-   <sect2>
-    <title>
-    Application: deux personnes (Bob et Tom) se connectent à internet par un modem analogique classique.
-   </title>
-   <para>
-    Voici la manière la plus simple de procéder : 
-   </para>
-   <para>
-    Pré-requis : 
-   </para>
-   <itemizedlist>
-    <listitem>
-    <para>
-    Un modem 28.8 Baud ou plus. 
-    </para>
-   </listitem>
-   </itemizedlist>
-   <para>
-    Déroulement : 
-   </para>
-   <itemizedlist>
-    <listitem>
-    <para>
-    Il est convenu que Bob doit appeler Tom à 21h00. A 21h00, Tom se connecte à Internet en utilisant kppp, gppp ou wvdial (ou un autre). Dès qu'il est connecté sur l'Internet, il peut lancer Linphone.En ouvrant la fenêtre de statistiques de kppp ou gppp, il peut voir son adresse IP (sinon, il peut taper /sbin/ifconfig pour l'obtenir). Le nom de l'interface modem doit être ppp0.
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Ensuite, il envoit un email à Bob disant : &quot;Mon adresse IP estxxx.xxx.xxx.xxx&quot;.
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Bob recoit l'email et tape dans la fenêtre de Linphone le nom est l'adresse IP de la personne à contacter : Tom@xxx.xxx.xxx.xxx(L'adresse IP de Tom) et pour finir, il appuit sur le bouton Appeler. 
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Linphone sonne à la maison de Tom ...Tom a juste à répondre à l'appel en cliquant sur le bouton &quot;répondre&quot; et ainsi devrait pouvoir commencer la discussion. 
-    </para>
-   </listitem>
-   </itemizedlist>
-   <para>
-    Si vous rencontrez des problèmes dans une de ces étapes, allez à la section 4-Problèmes.
-   </para>
-   </sect2>
-   <sect2>
-    <title>
-    Essai en local: vous n'avez personne à appeler pour l'instant, mais vous souhaiteriez voir si linphone marche vraiment.
-   </title>
-   <para>
-    <anchor id="sipomatic" ></anchor>Depuis la version 0.3.0, Linphone est livré avec un programme de test appelé &quot;sipomatic&quot;. Sipomatic peut répondre automatiquement aux appels provenant de Linphone. A vous d'essayer : 
-   </para>
-   <itemizedlist>
-    <listitem>
-    <para>
-    Demarrez linphone.
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Démarrez sipomatic dans une fenêtre terminal. Ne soyez pas supris, sipomatic ne possède aucune interface graphique, mais vous n'avez pas besoin de modifier quoi-que-ce-soit. 
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Dans Linphone, allez dans les propriétés, section réseau, et choisissez &quot;lo&quot; comme interface par défaut. Appliquez les changements en cliquant sur OK. Tapez l'adresse S.I.P suivante dans la fenêtre principale : sip:robot@127.0.0.1:5064. 127.0.0.1 est l'adresse locale de votre ordinateur, et robot est le nom à utiliser pour appeler sipomatic. 5064 est le port par lequel sipomatic peut-être contacté. Normalement, vous devez toujours utiliser 5060 pour appeler quelqu'un, mais sipomatic est une exception : il fonctionne sur le port 5064. La raison est que Linphone fonctionne déjà sur le port 5060, et il est impossible d'avoir deux applications utilisant le même port au même instant, sur la même machine. 
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Appuyez sur le bouton &quot;Appeler&quot;. Après quelques secondes, sipomatic devrait répondre à votre appel et vous devez entendre une courte annonce.
-    </para>
-   </listitem>
-   </itemizedlist>
-   </sect2>
-  </sect1>
-  <sect1 id="params">
-   <title>
-   Paramètres des appels
-  </title>
-   <sect2 id="paramnetwork">
-    <title>
-    Réseau
-   </title>
-   <itemizedlist>
-    <listitem>
-    <para>
-    Liste des interfaces réseau: vous devez choisir une interface réseau à utiliser avec Linphone. Si vous voulez contacter quelqu'un sur l'Internet, vous devez choisir l'interface réseau connectée à l'Internet. Par exemple, si vous utilisez un modem, celle-ci devrait être ppp0. Si vous n'êtes connecté à aucun réseau, seulement l'interface réseau locale appelé lo apparaitra dans la liste. La seule chose que vous pouvez faire dans ce cas la est d'appeler <link linkend="sipomatic">sipomatic</link>.
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Type de connection: choisissez le type de connection que vous utilisez pour vous connecter au réseau que vous désirez utiliser. Ceci aidera Linphone à s'auto-configurer en fonction de la bande passante de votre type de connection.
-    </para>
-   </listitem>
-   </itemizedlist>
-   </sect2>
-   <sect2 id="paramrtp">
-    <title>
-    RTP
-   </title>
-   <para>
-    RTP signifie Real Time Protocol, il permet d'envoyer des flux de données multimedia.
-   </para>
-   <itemizedlist>
-    <listitem>
-    <para>
-    port RTP: Linphone utilise le port 7072 par défaut pour envoyer et recevoir des signaux audios. Si vous pensez que le port 7072 est utilisé par une autre application, changez le comme vous voulez.
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Jitter compensation: ce nombre représente le nombre de paquets audios que Linphone attend avant de vous les faire entendre. Augmentez ce nombre si vous entendez une voix hachée de manière à améliorer la qualité de la transmission, mais attention, ceci augmente le delai (vous entendrez la voix de l'utilisateur distant quelques millisecondes plus tard).D'un autre côté, si vous utilisez un réseau parfait, et que vous disposez de bon drivers audios, vous pouvez descendre ces paramètres très bas jusqu'à 3 paquets, ainsi vous aurez un délai très faible.
-    </para>
-   </listitem>
-   </itemizedlist>
-   </sect2>
-   <sect2 id="paramsip">
-    <title>
-    SIP
-   </title>
-   <para>
-    SIP (Session Initiation Protocol) est un protocole qui permet d'établir des sessions de téléphonie par l'intermédiaire d'un réseau IP. En simplifiant, c'est la chose qui permet de faire sonner chez l'autre utilisateur, démarrer ou terminer l'appel quand l'un des deux correspondants raccroche.
-   </para>
-   <itemizedlist>
-    <listitem>
-    <para>
-    port SIP: Linphone utilise par défaut le port 5060 pour envoyer / recevoir des paquets SIP. Il est hautement recommandé par la RFC du protocole SIP d'utiliser celui-ci. Donc, ne le changez pas à moins que vous n'ayez vraiment pas le choix.
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Votre adresse SIP: modifiez ici votre nom d'utilisateur et votre nom de machine à votre gré. Bien entendu donner un nom de machine ici ne signifie pas que ce nom soit connue des autres machines du réseau. Néammoins linphone utilisera peu ce nom de machine et préfèrera utiliser votre adresse IP pour communiquer avec d'autres machines.
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Utiliser un serveur sip registrar: Cochez ce choix, si vous voulez vous enregistrer sur un serveur SIP (registrar) pour obtenir différents services. Quand vous n'avez pas d'adresse IP fixe, cela peut-être très intéressant pour permettre à vos amis de vous appeler. Regardez la section intitulée &quot;<link linkend="registering">enregistrement sur un serveur sip</link>&quot;.
-    </para>
-   </listitem>
-   </itemizedlist>
-   </sect2>
-   <sect2 id="paramcodec">
-    <title>
-    Codecs
-   </title>
-   <para>
-    Les codecs sont des algorithmes utilisés pour compresser la voix. Par exemple, une voix digitalisée en 16bit/8000Hz représente un flux de données de 128kbits/seconde. En utilisant le vocodeur GSM, ce flux est réduit à 13kbits/seconde, sans perte significative de qualité.
-   </para>
-   <itemizedlist>
-    <listitem>
-    <para>
-    Choix de codecs: Linphone peut utiliser plusieurs codecs. Utilisez les boutons situés en dessous de la liste des codecs de manière à les placer dans un order de préférence. Notez bien, qu'en fonction de votre type de connection réseau, certains codecs sont inutilisables.Ils apparaitront en rouge et ne seront pas sélectionnable. Vous pouvez décider d'utiliser ou non un codec &quot;utilisable&quot; (en bleu) en changeant son état à l'aide du bouton activer/désactiver en dessous de la liste.
-    </para>
-   </listitem>
-   </itemizedlist>
-   </sect2>
-   <sect2 id="paramaudio">
-    <title>
-    Audio parameters
-   </title>
-   <itemizedlist>
-    <listitem>
-    <para>
-    Mode de pilotage: si vous avez installé des drivers ALSA avec une librairie ALSA &lt;0.9, choisissez ALSA pour avoir de meilleires performances. Sinon, ou si vous n'en savez rien, choisissez OSS, cela marche suffisemment bien.
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Choix de la source d'enregistrement: vous pouvez choisir votre source d'enregistrement pour la voix. Dans la plupart des cas, celle-ci sera le microphone.
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Auto-kill option: en choissant cette option, Linphone essaiera de stopper les processus sonores (esd &amp; artsd) qui peuvent bloquer votre périphérique sonore et ainsi provoquer des problèmes d'ouverture des périphériques par Linphone quand il en a besoin. Il est recommandé d'activer cette option.
-    </para>
-   </listitem>
-   </itemizedlist>
-   </sect2>
-  </sect1>
-  <sect1>
-   <title>
-   Carnet d'adresses
-  </title>
-  <para>
-   Depuis la version 0.4.1 linphone dispose d'un carnet d'adresses (menu connexion, carnet d'addresses), avec lequel vous pouvez memoriser des adresses, et les rappeler facilement lorsque vous souhaitez appeler.
-  </para>
-  </sect1>
-  <sect1 id="registering">
-   <title>
-   Enregistrement sur un serveur sip
-  </title>
-  <para>
-   Vous pouvez souscrire des services sur des serveurs sip distants appelés registrar, proxy ou redirect server. Ces services peuvent être:
-  </para>
-  <para>
-   You can suscribe for services on remote SIP servers. These services can be:
-  </para>
-  <itemizedlist>
-   <listitem>
-   <para>
-   redirection: linphone va demander au serveur la création d' un compte &lt;sip:votre_nom@le_serveur_sip&gt;. Cette adresse pourra alors être utilisée par vos correspondants pour vous joindre. Un petit example concret pour bien comprendre: vous n'êtes qu'un pauvre internaute connecté temporairement grace à un modem 56k. Votre machine n'a pas de nom de domaine connu et votre adresse IP change à chaque nouvelle connexion. Il est impossible pour vos amis de vous joindre car il ne peuvent deviner votre adresse IP, à moins que vous ne leur donniez en envoyant un courriel, par exemple. Pour palier à ce problème, vous pouvez demander à avoir un compte sur un serveur sip connu de vos amis, qui lui est fixe et tout le temps connecté. Pour cela, spécifiez l'adresse du serveur dans la boite de propriété, section sip. Cette adresse est par exemple &lt;sip:serveur_exemple.com&gt; et votre nom d'utilisateur est &ldquo;Bob&rdquo;. Linphone va alors envoyer au serveur un message pour l'informer de la correspondance entre l'adresse &lt;sip:bob@serveur_exemple.com&gt; et votre adresse IP actuelle. Desormais vos amis peuvent vous appeler en utilisant cette nouvelle adresse, leurs appels seront alors automatiquement redirigés vers votre machine. Il n'ont plus besoin de connaitre votre adresse IP qui change tout le temps pour vous joindre. Bien sur, &lt;sip:serveur_exemple.com&gt; est supposée être bien connue de tout vos amis. 
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   proxy: c'est exactement le meme principe, excepté que la redirection se fait de manière transparente et invisible le linphone de l'appelant.
-   </para>
-  </listitem>
-  </itemizedlist>
-  <para>
-   Le registrar que vous avez spécifié peut aussi être utilisé comme proxy sortant. Dans ce cas tous les appels émanant de votre linphone seront dirigé vers ce serveur, et il sera supposé les faire suivre vers les bonnes personnes. Ceci est très utile et même indispensable lorsque vous utilisez linphone dans un réseau privé abrité par un firewall, si bien sur un proxy sip est actif sur le firewall. 
-  </para>
-  <para>
-   Pour utiliser solliciter un serveur sip, vous devez aller à la boîte de propriété, rubrique SIP, et cocher le bouton qui se trouve en face de &quot;use registrar&quot;. Tapez l'adresse du registrar, et choisissez un nom d'utilisateur qui n'est pas trop fréquent de manière à éviter les conflits de noms. Donnez une indication du service que le serveur doit effectuer pour vous en cochant les boutons &ldquo;redirection&rdquo; ou &ldquo;proxy&rdquo;. Sélectionnez aussi l'option &ldquo;le serveur est un proxy sortant&rdquo; si vous êtes derrière un pare-feu.
-  </para>
-  <para>
-   Enfin en fermant la boite de propriétés linphone communiquera immédiatement avec le serveur SIP pour y obtenir les services demandés. De même lorsque vous fermez linphone, celui ci prendra quelques secondes pour se désenregistrer auprès du serveur.
-  </para>
-  <para>
-   Une liste de serveurs sip peut être trouvée à cette addresse: <ulink url="http://www.cs.columbia.edu/~hgs/sip/servers.html">http://www.cs.columbia.edu/~hgs/sip/servers.html</ulink>. Malheureusement, beaucoup de ces serveurs ne fonctionnent plus, peut-être à cause de la crise et de ses faillites. Certains ne sont pas utilisables car ils requierent des méthodes d'autentification qui ne sont pas encore implémentées dans linphone. Afin donc de ne pas vous faire perdre votre temps, une liste des serveurs sip publiques fonctionnant avec linphone est disponible sur <ulink url="http://simon.morlat.free.fr/english/servers.html">http://simon.morlat.free.fr/english/servers.html</ulink>.
-  </para>
-  </sect1>
-  <sect1>
-   <title>
-   Utilisation derrière les pares-feux
-  </title>
-  <para>
-   Linphone est capable de fonctionner derrière les firewalls grâce à un serveur proxy SIP fonctionnant sur la machine firewall. Un tel serveur est en cours de développement sur <ulink url="http://osipproxy.sourceforge.net">http://osipproxy.sourceforge.net</ulink>. Bien sûr il sera libre et basé sur la librairie LGPL oSIP.
-  </para>
-  <para>
-   Une fois le proxy serveur mis en place, il vous faut configurer linphone pour qu'il l'utilise. Pour cela rendez vous dans la boite de propriétés, section SIP et cochez la case &ldquo;Utiliser un registrar SIP&rdquo;, indiquez son adresse, et cocher l'option &ldquo;le serveur est un proxy sortant&rdquo;.
-  </para>
-  <para>
-   Il y a un cas pour lequel le proxy n'est pas indispensable: c'est le cas où les machines du réseau privé possèdent une adresse publique, le firewall étant là pour filtrer les paquets entrants ou sortants. Vous devez pour permettre a linphone de fonctionner avec des machines exterieures, autoriser le traffic UDP sur le port SIP (par defaut 5060, il est deconseillé de le changer), et sur le port RTP de chaque linphone du sous réseau. Le port RTP est paramètrable comme bon vous semble dans la boite de proprietés.
-  </para>
-  </sect1>
-  <sect1>
-   <title>
-   Problèmes divers
-  </title>
-   <sect2>
-    <title>
-    Problèmes de connexion
-   </title>
-   <blockquote>
-   <para>
-    J'essaye d'appeler mon pote &lt;sip:toto@example.com&gt;, mais rien ne se passe, pas de sonnerie.
-   </para>
-   </blockquote>
-   <para>
-    Vous devez vérifier que linphone utilise l'interface réseau qui vous connecte sur le réseau ou se trouve votre ami. La liste des interface disponibles est donnée dans la boite de propriété, section réseau. Sélectionnez la bonne. 
-   </para>
-   <para>
-    Si le problème persiste, il y a fort à parier que votre ami ne soit pas joignable actuellement.
-   </para>
-   </sect2>
-   <sect2>
-    <title>
-    Problèmes audio
-   </title>
-   <blockquote>
-   <para>
-    Linphone semble correctement établir l'appel, il sonne, mais une fois que le correspondant a décrocher, plus rien ne se passe et on ne s'entend pas.
-   </para>
-   </blockquote>
-   <itemizedlist>
-    <listitem>
-    <para>
-    La plupart des gens ont ce genre de symptome car ils n'ont pas choisi la bonne interface réseau. Si vous êtes connectés par modem, ce doit être ppp0. En aucun cas l'interface &ldquo;lo&rdquo; ne peut permettre d'avoir une communication via le réseau. Elle ne sert que pour le test local avec sipomatic (voir plus haut).
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Augemtez le niveau sonore d'acquisition et de restitution, à l'aide des potentiomètres situés en bas de la fenêtre principale.
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Si la voix de votre correspondant vous semble coupée ou hachée, vous pouvez essayer d'augmenter le paramètre jitter compensation de l'onglet RTP de la boite de propriété. Mais attention, cela augmente la latence en contrepartie.
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Si linphone ne peut se servir de la carte son, vérifiez que celle ci n'est pas utilisée au meme moment par d'autres programmes audio. 
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Enfin utilisez les drivers sons alsa (voir <ulink url="http://www.alsa-project.org">http://www.alsa-project.org</ulink>) , plutôt que les oss fournit avec le kernel linux. Malheureusement la plupart des distributions utilsent encore ces vieux pilotes alors qu'ils presentent de nombreux bugs et problèmes de latence. Les drviers ALSA sont beaucoup plus performants. Notez que si vous changer vos drivers, vous n'avez nul besoin de recompiler linphone ou de changer quoi que ce soit a sa configuration. 
-    </para>
-   </listitem>
-   </itemizedlist>
-   </sect2>
-  </sect1>
-  <sect1>
-   <title>
-   Rapports de bogues et suggestions
-  </title>
-  <para>
-   En premier lieu, allez sur le site de Linphone <ulink url="http://www.linphone.org">http://www.linphone.org</ulink> afin de vérifier que vous ayez bien la dernière version de Linphone. 
-  </para>
-  <para>
-   Si linphone plante, envoyez moi durectement un message à bugs@linphone.org. Si Linphone ne fonctionne pas, mais ne se plante pas, vérifiez bien que vous avez bien lu ce manuel entièrement avant de m'envoyer un compte rendu à l'adresse précédente. Dans tous les cas veillez à m'envoyer le plus d'information possible relatifs à votre problème, notamment la sortie de debug que linphone ecrit lorsque vous l'executez depuis un terminal. Si vous désirez autre chose, n'hésitez pas à m'envoyer un email à l'adresse help@linphone.org. Prenez note que l'ajout de la vidéo et du mode conférence sont planifiés. 
-  </para>
-  <para>
-   Si quelqu'un est interessé pour faire des traductions de Linphone, envoyez moi un fichier xx.po basé sur celui se trouvant dans po/linphone.pot de la distribution. Vous pouvez aussi traduire ce manuel utiisateur dans d'autres langues. Dans tous les cas, contactez moi si vous voulez plus de détails.
-  </para>
-  </sect1>
-  <sect1>
-   <title>
-   Auteurs
-  </title>
-  <para>
-   Simon MORLAT (simon.morlat@linphone.org) a ecrit: 
-  </para>
-  <itemizedlist>
-   <listitem>
-   <para>
-   Programme principal (src)
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   librairie RTP (lprtplib)
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   osipua : la librarie sip User Agent au dessus d'osip.
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   interface pour les drivers audio (audio)
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   les wrappers pour les codecs lpc10-1.5, gsm et g711. 
-   </para>
-  </listitem>
-  </itemizedlist>
-  <para>
-   Aymeric Moizard (jack@atosc.org) a ecrit la pile SIP oSIP utilisé par linphone. 
-  </para>
-  <para>
-   La librairie GSM a été écrite par: Jutta Degener and Carsten Bormann,Technische Universitaet Berlin.
-  </para>
-  <para>
-   La librairie LPC10-1.5 par: Andy Fingerhut Applied Research Laboratory &lt;-- this line is optional if Washington University, Campus Box 1045/Bryan 509 you have limited space One Brookings Drive Saint Louis, MO 63130-4899 jaf@arl.wustl.edu http://www.arl.wustl.edu/&tilde;jaf/ Lisez les fichiers textes README dans les repertoire gsmlib et lpc10-1.5 pour plus d'informations.
-  </para>
-  <para>
-   Les icones sont de Pablo Marcelo Moia et le logo de Philippe Beau.
-  </para>
-  </sect1>
-  <sect1>
-   <title>
-   Remerciements
-  </title>
-  <para>
-   Merci à Daemon Chaplin pour avoir fait Glade, le constructeur d'interface graphique GTK+.
-  </para>
-  <para>
-   Merci aux auteurs du code des LPC10-1.5 et GSM.
-  </para>
-  <para>
-   Merci à Joel Barrios ( jbarrios@-NO-SPAM-linuxparatodos.com ) pour ses RPMS.
-  </para>
-  <para>
-   Merci à Pablo Marcelo Moia pour les icones.
-  </para>
-  <para>
-   Merci à Philippe Beau pour la traduction de ce manuel en Francais, pour le logo, et pour le nouveau site web qu'il a fait pour linphone.
-  </para>
-  <para>
-   <toc></toc>
-  </para>
-  </sect1>
-
-
-</article>
diff --git a/linphone/share/hello16000.wav b/linphone/share/hello16000.wav
deleted file mode 100644 (file)
index 92d44b1..0000000
Binary files a/linphone/share/hello16000.wav and /dev/null differ
diff --git a/linphone/share/hello8000.wav b/linphone/share/hello8000.wav
deleted file mode 100644 (file)
index b787b20..0000000
Binary files a/linphone/share/hello8000.wav and /dev/null differ
diff --git a/linphone/share/it/.gitignore b/linphone/share/it/.gitignore
deleted file mode 100644 (file)
index e1d2077..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-Makefile
-Makefile.in
-manual
-manual.junk
-manual.html
diff --git a/linphone/share/it/Makefile.am b/linphone/share/it/Makefile.am
deleted file mode 100644 (file)
index e194637..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-HELPLANG=it
-
-include ../Makefile.inc
diff --git a/linphone/share/it/manual.lyx b/linphone/share/it/manual.lyx
deleted file mode 100644 (file)
index d0a0b06..0000000
+++ /dev/null
@@ -1,741 +0,0 @@
-#LyX 1.1 created this file. For more info see http://www.lyx.org/
-\lyxformat 218
-\textclass docbook
-\language french
-\inputencoding latin1
-\fontscheme default
-\graphics default
-\paperfontsize default
-\spacing single 
-\papersize Default
-\paperpackage a4
-\use_geometry 0
-\use_amsmath 0
-\paperorientation portrait
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\defskip medskip
-\quotes_language french
-\quotes_times 2
-\papercolumns 1
-\papersides 1
-\paperpagestyle default
-
-\layout Title
-
-
-\begin_inset LatexCommand \label{manual}
-
-\end_inset 
-
-MANUALE UTENTE LINPHONE
-\layout Author
-
-Simon Morlat (simon.morlat@linphone.org)
-\layout Date
-
-11-13-2001
-\layout Section
-
-Introduzione
-\layout Standard
-
-Linphone è un semplice strumento di telefonia su rete.
- Permette di effettuare conversazioni tra due utenti utilizzando una modalità
- IP come Internet.
- Ecco l'equipaggiamento necessario per usare Linphone : 
-\layout Itemize
-
-Linux ( Può funzionare anche in altri ambienti come BSD, o altri\SpecialChar ~
- UNIX, ma
- non l'ho ancora testato personalmente.)
-\layout Itemize
-
-Gnome 1.2 o superiore, installato ma non necessariamente usato.
-\layout Itemize
-
-Una scheda sonora correttamente configurata.
-\layout Itemize
-
-Cuffie o altoparlanti.
-\layout Itemize
-
-Un microfono.
-\layout Itemize
-
-Una connessione rete (Internet ad esempio), modem, scheda Ethernet ...
-\layout Standard
-
-\SpecialChar ~
-E' consigliabile chiudere tutte le applicazioni che fanno uso della scheda
- sonora prima di usare Linphone.
- Linphone è un programma libero, distribuito sotto la licenza pubblica GNU.
-\layout Standard
-
-
-\emph on 
-ATTENZIONE : Questo strumento è distribuito SENZA GARANZIA.
- Leggere il file COPYING per maggiori dettagli.
- Questo significa tra l'altro che non dovete usare Linphone per chiamate
- confidenziali: non ha ALCUNA CODIFICA DI PROTEZIONE, e quindi può essere
- molto facile per qualche malintenzionato captare i flussi audio.
- Si noti inoltre che si raccomanda di non usare Linphone come utente root.
-\layout Section
-
-Uso
-\layout Standard
-
-Linphone può essere usato in 3 modi diversi : 
-\layout Itemize
-
-Come applicazione (normale) : nel menu Gnome, Linphone dovrebbe apparire
- nella sezione Rete.
- Se non utilizzi Gnome, puoi lanciare Linphone da una finestra terminale,
- per esempio.
- Quando Linphone non è in esecuzione, non è possibile ricevere chiamate.
-\layout Itemize
-
-Come applet Gnome : cliccando sul pannello Gnome col pulsante destro, aggiungere
- l'applet.
- Linphone apparirà nella sezione Rete.
- Apparendo nel pannello Gnome, Linphone è capace di ricevere chiamate anche
- se la sua finestra non è visibile.
- Se si vuol vedere la finestra principale, cliccare sull'applet.
- Quando c'è una chiamata, la finestra principale passa in primo piano, e
- sentirai gli squilli della chiamata.
-\layout Itemize
-
-Come demone : questo è interessante per coloro che non utilizzano Gnome.
- Per esempio, per KDE, c'é una directory /home/user/.kde2/AutoStart/ dove
- si possono inserire le applicazioni che si vogliono lanciare ad inizio
- sessione.
- Nella directory citata, con l'aiuto di un gestore di file, aggiungere un
- collegamento cliccando col pulsante destro.
- Il comando da inserire è "linphone -daemon".
- L'interfaccia prinicipale di Linphone non sarà visibile, e dunque, per
- farla apparire, si lanci Linphone normalmente, per esempio da una finestra
- terminale.
-\layout Section
-
-Come lanciarlo
-\layout Subsection
-
-Principi di base
-\layout Standard
-
-Linphone utilizza il protocollo SIP (Session Initiation Protocol) per effettuare
- chiamate con altri interlocutori.
- Il protocollo specifica che ciascuna persona dev'essere identificata da
- un URL sip della forma: sip:nome_utente@nome_host.
- Questo modo di chiamare le persone è molto simile a quello utilizzato per
- la posta elettronica.
-\layout Standard
-
-Nome_utente è il nome di un utente su una macchina, come il login su una
- macchina linux, per esempio.
- Nome_host è il nome di una macchina sotto forma di indirizzo IP, o più
- semplicemente sotto forma di dominio (es: linphone.org).
-\layout Standard
-
-Si noti che SIP è un nuovo protocollo di telecomunicazione fatto per essere
- semplice ed efficace su internet, che è totalmente diverso ed incompatibile
- con H.323.
- H.323 è il protocollo attualmente usato da NetMeeting e GnomeMeeting.
-\layout Subsection
-
-Applicazione: due persone (Bob e Tom) si connettono ad internet con un modem
- analogico classico.
-\layout Standard
-
-Ecco il modo più semplice di procedere : 
-\layout Standard
-
-Prerequisito : 
-\layout Itemize
-
-Un modem da 28.8 Baud o più.
-\layout Standard
-
-Procedimento: 
-\layout Itemize
-
-Si è convenuto che Bob debba chiamare Tom alle 21.00.
- Alle 21.00, Tom si connette ad Internet utilizzando kppp, gppp o wvdial
- (o un altro).
- Una volta connesso ad internet, può lanciare Linphone.
- Aprendo la finestra delle statistiche di kppp o gppp, può vedere il suo
- indirizzo IP (altrimenti può digitare /sbin/ifconfig per vederlo).
- Il nome dell'interfaccia modem dev'essere ppp0.
-\layout Itemize
-
-Di seguito, manda un messaggio a Bob dicendo : "Il mio indirizzo IP è xxx.xxx.xxx.x
-xx".
-\layout Itemize
-
-Bob legge l'email e riporta nella finestra di Linphone il nome e l'indirizzo
- IP della personne da contattare : Tom@xxx.xxx.xxx.xxx(L'indirizzo IP di Tom)
- e per finire, clicca sul pulsante Chiamare.
-\layout Itemize
-
-Linphone suona a casa di Tom ...Tom risponde alla chiamata cliccando sul pulsante
- "Rispondere" ed a questo punto la conversazione può iniziare.
-\layout Standard
-
-Se si incontrassero problemi in uno di questi punti, si vada alla sezione
- 4 - Problemi.
-\layout Subsection
-
-Test in locale: non hai nessuno da chiamare per il momento, ma vuoi controllare
- se Linphone funzioni davvero.
-\layout Standard
-
-
-\begin_inset LatexCommand \label{sipomatic}
-
-\end_inset 
-
-A partire dalla versione 0.3.0, Linphone è dotato di un programma di test
- chiamato "sipomatic".
- Sipomatic può rispondere automaticamente alle chiamate provenienti da Linphone.
- A voi la scelta :
-\layout Itemize
-
-Lanciare linphone.
-\layout Itemize
-
-Lanciare sipomatic in una finestra terminale.
- Non siate sorpresi, sipomatic non possiede alcuna interfaccia grafica,
- ma non c'è bisogno di modificare quello che sta sotto.
-\layout Itemize
-
-In Linphone, menu Parametri, sezione Rete, scegliere "lo" come interfaccia
- di default.
- Applicare il cambiamento cliccando su OK.
- Digitare l'indirizzo S.I.P seguente nella finestra principale : sip:robot@127.0.0.1:
-5064.
- 127.0.0.1 è l'indirizzo locale del tuo computer, e robot è il nome da usare
- per chiamare sipomatic.
- 5064 è la porta con cui sipomatic può essere contattato.
- Normalmente si deve utilizzare 5060 per chiamare qualcuno, ma sipomatic
- fa eccezione : funziona con la porta 5064.
- Il motivo è che Linphone funziona già sulla porta 5060, ed è impossibile
- avere due applicazioni che utilizzino la stessa porta nello stesso momento,
- sulla stessa macchina.
-\layout Itemize
-
-Cliccare sul pulsante "Chiamare".
- Dopo qualche secondo, sipomatic dovrebbe rispondere alla chiamata e vi
- dovrebbe dire un breve messaggio.
-\layout Section
-
-
-\begin_inset LatexCommand \label{params}
-
-\end_inset 
-
-Parametri di chiamata
-\layout Subsection
-
-
-\begin_inset LatexCommand \label{paramnetwork}
-
-\end_inset 
-
-Rete
-\layout Itemize
-
-Lista delle interfacce di rete: bisogna scegliere un'interfaccia di rete
- da usare con Linphone.
- Se si vuole contattare qualcuno su Internet, bisogna scegliere l'interfaccia
- di rete connessa ad Internet.
- Per esempio, se si utilizza un modem, dovrà essere ppp0.
- Se non si è connessi ad alcuna rete, solo l'interfaccia di rete locale,
- chiamata lo, apparirà nella lista.
- L'unica scelta che si può fare in questo caso è chiamare 
-\begin_inset LatexCommand \ref[sipomatic]{sipomatic}
-
-\end_inset 
-
-.
-\layout Itemize
-
-Tipo di connessione: scegliere il tipo di connessione utilizzata per connettervi
- alla rete che si desidera utilizzare.
- Questo aiuterà Linphone ad autoconfigurarsi in funzione della banda passante
- del tipo di connessione.
-\layout Subsection
-
-
-\begin_inset LatexCommand \label{paramrtp}
-
-\end_inset 
-
-RTP
-\layout Standard
-
-RTP 
-\layout Itemize
-
-porta RTP: \SpecialChar ~
-Linphone utilizza la porta 7072 di default per inviare e ricevere
- segnali audio.
- Se la porta 7072 è usata da un'altra applicazione, la si cambi a piacere.
-\layout Itemize
-
-Compensazione Jitter: questo numero rappresenta il numero di pacchetti audio
- che Linphone aspetta prima di farli sentire.
- Si aumenti questo numero se si sente male la voce, in modo da migliorare
- la qualità di trasmissione, ma attenzione: questo aumenta il ritardo (Si
- sentirà la voce dell'interlocutore qualche millisecondo più tardi).
- D'altro canto, se si utilizza un server perfetto, e si dispone di buoni
- driver audio, si può scegliere un valore basso fino a 3 pacchetti, sentendo
- così un ritardo trascurabile.
-\layout Subsection
-
-
-\begin_inset LatexCommand \label{paramsip}
-
-\end_inset 
-
-SIP
-\layout Standard
-
-SIP (Session Initiation Protocol) è un protocollo che permette di stabilire
- sessioni telefoniche grazie ad un server IP.
- Semplificando, è ciò che permette di far suonare il telefono all'altro
- interlocutore, sospendere o terminare una chiamata quando uno dei due riattacca.
-\layout Itemize
-
-porta SIP: Linphone utilizza di default la porta 5060 per inviare / ricevere
- pacchetti SIP.
- Si raccomanda caldamente per la RFC del protocollo SIP di utilizzare questo
- valore.
- Non lo si cambi a meno che non si sappia davvero cosa si stia facendo.
-\layout Itemize
-
-Indirizzo SIP: modifica nome utente e macchina a piacere.
- Beninteso, dare un nome di macchina quinon significa che questo nome sia
- conosciuto da altre macchine del server.
- Nemmeno Linphone userà il nome della macchina e preferirà usare l'indirizzo
- IP per comunicare con altre macchine.
-\layout Itemize
-
-Usare un server segretario sip: si faccia questa scelta, se ci si vuole
- registrare su un server SIP (segretario) per ottenere servizi vari.
- Quando non si ha un indirizzo IP fisso, questo può essere interessante
- per permettere agli amici di chiamare.
- Vedere la sezione "
-\begin_inset LatexCommand \ref[enregistrement sur un serveur sip]{registering}
-
-\end_inset 
-
-".
-\layout Subsection
-
-
-\begin_inset LatexCommand \label{paramcodec}
-
-\end_inset 
-
-Codec
-\layout Standard
-
-I codecs sono algoritmi per comprimere la voce.
- Per esempio, una voce digitalizzata a 16bit/8000Hz rappresenta un flusso
- di dati di 128kbits/secondo.
- Usando il codificatore vocale GSM, questo flusso è ridotto a 13kbits/secondo,
- senza perdita significativa di qualità.
-\layout Itemize
-
-Scelta dei codecs: Linphone può usare diversi codec.
- Usare i pulsanti posti a lato della lista dei codec in modo da porli nell'ordin
-e preferito.
- Si badi bene, che in funzione del tipo di connessione alla rete, alcuni
- codec sono inutilizzabili.
- Questi appariranno in rosso e non saranno selezionabili.
- Si può decidere di usare o no un codec "utilizzabile" (in blu) cambiando
- il suo stato con l'aiuto del pulsante Attiva / Disattiva in fianco alla
- lista.
-\layout Subsection
-
-
-\begin_inset LatexCommand \label{paramaudio}
-
-\end_inset 
-
-Parametri audio
-\layout Itemize
-
-Modo d'uso: se si ha installato il driver ALSA con una libreria ALSA <0.9,
- si scelga ALSA per avere risultati migliori.
- Altrimenti, o se non si sa, usare OSS, che funziona sufficientemente bene.
-\layout Itemize
-
-\SpecialChar ~
-Scelta della fonte di registrazione: si può scegliere la fonte di registrazione
- per la voce.
- Nella maggior parte dei casi, sarà il microfono.
-\layout Itemize
-
-Opzione auto-kill: scegliendo questa opzione, Linphone fermerà i server
- sonori (esd &#38; artsd) che possono bloccare la periferica sonora e provocare
- così problemi problemi d'apertura delle periferiche da parte di Linphone
- in caso di bisogno.
- Si raccomanda di attivare questa opzione.
-\layout Section
-
-Rubrica
-\layout Standard
-
-A partire dalla versione 0.4.1 Linphone dispone di una rubrica (menu connessione,
- rubrica), con la quale memorizzare indirizzi, e richiamarli facilmente
- quando si vuol chiamare.
-\layout Section
-
-
-\begin_inset LatexCommand \label{registering}
-
-\end_inset 
-
-Registrazione su un server sip
-\layout Standard
-
-E' possibile sottoscrivere alcuni servizi sui server sip remoti chiamati
- segretari, proxy o server ridiretti.
- Questi servizi possono essere:
-\layout Itemize
-
-ridirezione: Linphone chiede al server la creazione di un account <sip:votre_nom
-@le_serveur_sip>.
- Questo indirizzo potrà allora essere utilizzato dai tuoi interlocutori
- per connetterti.
- Un piccolo esempio concreto può essere utile: tu non sei altro che un internaut
-a poverino, connesso temporaneamente grazie ad un modem 56k.
- La tua macchina non ha un nome di dominio conosciuto ed il tuo indirizzo
- IP cambia ad ogni connessione.
- E' impossibile per gli amici chiamare in mancanza dell'indirizzo IP, a
- meno che non lo si comunichi via posta elettronica, per esempio.
- Per risolvere questo problema, si può chiedere di avere un indirizzo su
- un server sip conosciuto dagli amici, fisso e sempre connesso.
- Per far ciò, specificare l'indirizzo del server nel menu parametri, sezione
- sip.
- Questo indirizzo è, per esempio, <sip:server_esempio.com> ed il nome utente
- è 
-\begin_inset Quotes fld
-\end_inset 
-
-Bob
-\begin_inset Quotes frd
-\end_inset 
-
-.
- Linphone invia allora al server un messaggio per informare della corrispondenza
- tra l'indirizzo <sip:bob@server_esempio.com> e l'indirizzo IP attuale.
- D'ora in poi gli amici potranno chiamare usando questo nuovo indirizzo:
- le chiamate saranno ridirette automaticamente verso la tua macchina.
- Non ci sarà più bisogno di conoscere l'indirizzo IP, che cambia ogni volta,
- per contattarti.
- Ovviamente, si suppone che <sip:server_esempio.com> sia conosciuto da tutti
- gli amici.
-\layout Itemize
-
-Proxy: è esattamente lo stesso principio, tranne che la ridirezione viene
- fatta in maniera trasparente ed invisibile dal Linphone del chiamante.
-\layout Standard
-
-Il segretario specificato può essere utilizzato come proxy in uscita.
- In questo caso tutte le chiamate in uscita dal tuo Linphone saranno dirette
- verso tale server, che si suppone sia gestito da brave persone.
- E' quindi molto utile, per non dire indispensabile, che si usi Linphone
- su una rete privata, gestita da un firewall, anche se su un proxy sip è
- sicuramente attivo un firewall.
-\layout Standard
-
-Per usare fin da subito un server sip, bisogna aprire il menu Parametri,
- SIP, e cliccare sul pulsante in fianco a "Usa il segretario sip".
- Digitare l'indirizzo del segretario, e scegliere un nome utente non troppo
- comune, in modo da evitare conflitti di nomi.
- Dare un'indicazione del servizio che il server deve effettuare per te e
- cliccare sui pulsanti 
-\begin_inset Quotes fld
-\end_inset 
-
-ridirezione
-\begin_inset Quotes frd
-\end_inset 
-
- o 
-\begin_inset Quotes fld
-\end_inset 
-
-proxy
-\begin_inset Quotes frd
-\end_inset 
-
-.
- Selezionare anche l'opzione 
-\begin_inset Quotes fld
-\end_inset 
-
-il server è un proxy in uscita
-\begin_inset Quotes frd
-\end_inset 
-
- \SpecialChar ~
-se sei dietro ad un firewall.
-\layout Standard
-
-Infine, confermando la scelta, Linphone comunicherà immediatamente con il\SpecialChar ~
-
- server SIP per ottenere i servizi richiesti.
- Allo stesso modo, in fase di uscita da Linphone, ci vorrà qualche secondo
- per togliere la registrazione dal server.
-\layout Standard
-
-Una lista di server sip può essere trovata a questo indirizzo: 
-\begin_inset LatexCommand \url[http://www.cs.columbia.edu/~hgs/sip/servers.html]{http://www.cs.columbia.edu/~hgs/sip/servers.html}
-
-\end_inset 
-
-.
-\layout Standard
-
-Sfortunatamente, poiché alcuni di questi server non funzionano più, forse
- a causa della crisi e di fallimenti di società.
- Alcuni non sono utilizzabili poiché richiedono metodi di autentificazione
- non ancora implementati in Linphone.
- Per non perdere tempo, una lista di server sip pubblici funzionanti con
- Linphone è reperibile su 
-\begin_inset LatexCommand \url[http://simon.morlat.free.fr/english/servers.html]{http://simon.morlat.free.fr/english/servers.html}
-
-\end_inset 
-
-.
-\layout Section
-
-Uso dietro i firewall
-\layout Standard
-
-Linphone è in grado di funzionare dietro i firewall grazie ad un server
- proxy SIP in funzione sulla macchina firewall.
- Un tale server è in corso di sviluppo su 
-\begin_inset LatexCommand \url[http://osipproxy.sourceforge.net]{http://osipproxy.sourceforge.net}
-
-\end_inset 
-
-.
- Ovviamente sarà libero e basato sulla libreria LGPL oSIP.
-\layout Standard
-
-Una volta che il server proxy sarà attivo, si potrà configurare Linphone
- per utilizzarlo.
- Per far ciò, andare in Parametri, sezione SIP e attivare la casella 
-\begin_inset Quotes fld
-\end_inset 
-
-Usa il segretario SIP
-\begin_inset Quotes frd
-\end_inset 
-
-, indicare il suo indirizzo, ed attivare l'opzione 
-\begin_inset Quotes fld
-\end_inset 
-
-il server è un proxy in uscita
-\begin_inset Quotes frd
-\end_inset 
-
-.
-\layout Standard
-
-C'è un caso in cui il\SpecialChar ~
- proxy non è indispensabile: quello in cui le macchine
- di reti private possiedano un indirizzo pubblico: il firewall filtra i
- pacchetti in entrata o uscita.
- Bisogna permettere a Linphone di funzionare con le macchine esterne, autorizzar
-e il traffico UDP sulla porta SIP (di default 5060, è possibile cambiarla),
- e sulla porta RTP di ciascun Linphone nelle sottoreti.
- La porta RTP è parametrizzabile, come si è visto, nel menu Parametri.
-\layout Section
-
-Problemi vari
-\layout Subsection
-
-Problemi di connessione
-\layout Quotation
-
-Tento di chiamare il mio amico <sip:toto@esempio.com>, ma niente da fare,
- nessuno squillo.
-\layout Standard
-
-Bisogna verificare che Linphone usi l'interfaccia di rete a cui sei connesso
- con la rete su cui si trova il tuo amico.
- La lista delle interfacce disponibili si trova in Parametri, sezione Rete.
- Selezionarla.
-\layout Standard
-
-Se il problema persistesse, potrebbe essere che il tuo amico non sia al
- momento raggiungibile.
-\layout Subsection
-
-Problemi audio
-\layout Quotation
-
-Linphone sembra connettersi correttamente, si sentono gli squilli, ma appena
- l'interlocutore risponde, non si sente o si capisce più nulla.
-\layout Itemize
-
-La maggior parte degli utenti ha di questi problemi poiché non è stata scelta
- l'interfaccia di rete corretta.
- Se si usa il modem, dev'essere ppp0.
- In ogni caso, l'interfaccia 
-\begin_inset Quotes fld
-\end_inset 
-
-lo
-\begin_inset Quotes frd
-\end_inset 
-
- non permette di avere una comunicazione via rete.
- Serve solo per il test locale con sipomatic (vedere più avanti).
-\layout Itemize
-
-Aumentare il livello sonoro di acquisizione ed emissione, usando i potenziometri
- posti nella finestra principale.
-\layout Itemize
-
-Se la voce dell'interlocutore sembra vibrare o echeggiare, si può tentaredi
- aumentare il parametro comensazione jitter (Parametri, RTP).
- Ma attenzione, questo aumenta il ritardo nella controparte.
-\layout Itemize
-
-Se Linphone nonriesce ad usare la scheda sonora, verificare che non sia
- utilizzata da qualche altro programma audio.
-\layout Itemize
-
-Infine, utilizzare il driver sonoro ALSA (vedere 
-\begin_inset LatexCommand \url[http://www.alsa-project.org]{http://www.alsa-project.org}
-
-\end_inset 
-
-) , piuttosto che OSS, fornito con il kernel linux.
- Sfortunatamente la maggior parte delle distribuzioni usano ancora vecchi
- driver che hanno vari errori e problemi di ritardo.
- I driver ALSA danno risultati migliori.
- Si noti che se si cambiano driver, non c'è bisogno di ricompilare Linphone
- o di cambiare una qualsiasi configurazione.
-\layout Section
-
-Errori e suggerimenti
-\layout Standard
-
-In primo luogo, andare sul sito di Linphone 
-\begin_inset LatexCommand \url[http://www.linphone.org]{http://www.linphone.org}
-
-\end_inset 
-
- e verificare di avere la versione più recente di Linphone.
-\layout Standard
-
-Se Linphone si bloccassse, inviami direttamente un messaggio a bugs@linphone.org.
- Qualora Linphone non funzionasse, ma non si bloccasse, verificare bene
- di aver letto tutto il manuale prima di mandare un resoconto all'indirizzo
- indicato.
- In ogni caso invia più informazioni possibili relativamente al problema,
- in particolar modo i messaggi che compaiono quando lo si lancia da un terminale.
- Se desideri qualche altra cosa, non esitare ad inviarmi un messaggio a
- help@linphone.org.Tieni presente che l'aggiunta della modalità video e conferenza
- sono in programma.
-\layout Standard
-
-Se qualcuno fosse interessato a fare traduzioni di Linphone, mi invii un
- file xx.po basato su quello in po/linphone.pot della distribuzione.
- Si può anche tradurre il manuale utente in altre lingue.
- In ogni caso, contattami qualora volessi maggiori dettagli.
-\layout Section
-
-Autori
-\layout Standard
-
-Simon MORLAT (simon.morlat@linphone.org) ha scritto: 
-\layout Itemize
-
-Programma principale (src)
-\layout Itemize
-
-Libreria RTP (lprtplib)
-\layout Itemize
-
-osipua : la libreria Agente utente sip .
-\layout Itemize
-
-Interfaccia per i driver audio (audio)
-\layout Itemize
-
-Wrappers per i codecs lpc10-1.5, gsm e g711.
-\layout Standard
-
-Aymeric Moizard (jack@atosc.org) ha scritto la pila SIP oSIP usata da linphone.
-\layout Standard
-
-La libreria GSM è stata scritta da: Jutta Degener and Carsten Bormann,Technische
- Universitaet Berlin.
-\layout Standard
-
-La librairie LPC10-1.5 par: Andy Fingerhut Applied Research Laboratory Washington
- University, Campus Box 1045/Bryan 509 One Brookings Drive Saint Louis,
- MO 63130-4899 jaf@arl.wustl.edu http://www.arl.wustl.edu/~jaf/
-\layout Standard
-
-Leggere i file di testo README nella directory gsmlib e lpc10-1.5 per maggiori
- informazioni.
-\layout Standard
-
-Le icone sono di Pablo Marcelo Moia ed il logo di Philippe Beau.
-\layout Section
-
-Ringraziamenti
-\layout Standard
-
-Grazie a Daemon Chaplin per aver scritto Glade, il costruttore d'interfaccia
- grafica GTK+.
-\layout Standard
-
-Grazie agli autori del codice di LPC10-1.5 e GSM.
-\layout Standard
-
-Grazie a Joel Barrios ( jbarrios@-NO-SPAM-linuxparatodos.com ) per i suoi
- RPMS.
-\layout Standard
-
-Grazie a Pablo Marcelo Moiaper le icone.
-\layout Standard
-
-Grazie a Philippe Beau per la traduzione di questo manuale in francese,
- per il logo, e per il nuovo sito web che ha creato per Linphone.
-\layout Standard
-
-Grazie a Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it> per
- la traduzione di linphone e questo manuale in Italiano.
-\layout Standard
-
-
-\begin_inset LatexCommand \tableofcontents{}
-
-\end_inset 
-
-
-\the_end
diff --git a/linphone/share/it/manual.sgml b/linphone/share/it/manual.sgml
deleted file mode 100644 (file)
index 3465759..0000000
+++ /dev/null
@@ -1,494 +0,0 @@
-<!doctype article public "-//OASIS//DTD DocBook V3.1//EN">
-
-<article lang="fr">
-<!-- DocBook file was created by LyX 1.1
-  See http://www.lyx.org/ for more information -->
-  <artheader id="manual">
-   <title>
-   MANUALE UTENTE LINPHONE
-  </title>
-  <author>
-   Simon Morlat (simon.morlat@linphone.org)
-  </author>
-  <date>
-   11-13-2001
-  </date>
-  </artheader>
-  <sect1>
-   <title>
-   Introduzione
-  </title>
-  <para>
-   Linphone è un semplice strumento di telefonia su rete. Permette di effettuare conversazioni tra due utenti utilizzando una modalità IP come Internet. Ecco l'equipaggiamento necessario per usare Linphone : 
-  </para>
-  <itemizedlist>
-   <listitem>
-   <para>
-   Linux ( Può funzionare anche in altri ambienti come BSD, o altri  UNIX, ma non l'ho ancora testato personalmente.)
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   Gnome 1.2 o superiore, installato ma non necessariamente usato.
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   Una scheda sonora correttamente configurata.
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   Cuffie o altoparlanti.
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   Un microfono.
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   Una connessione rete (Internet ad esempio), modem, scheda Ethernet ...
-   </para>
-  </listitem>
-  </itemizedlist>
-  <para>
-    E' consigliabile chiudere tutte le applicazioni che fanno uso della scheda sonora prima di usare Linphone. Linphone è un programma libero, distribuito sotto la licenza pubblica GNU.
-  </para>
-  <para>
-   ATTENZIONE : Questo strumento è distribuito SENZA GARANZIA. Leggere il file COPYING per maggiori dettagli. Questo significa tra l'altro che non dovete usare Linphone per chiamate confidenziali: non ha ALCUNA CODIFICA DI PROTEZIONE, e quindi può essere molto facile per qualche malintenzionato captare i flussi audio. Si noti inoltre che si raccomanda di non usare Linphone come utente root.
-  </para>
-  </sect1>
-  <sect1>
-   <title>
-   Uso
-  </title>
-  <para>
-   Linphone può essere usato in 3 modi diversi : 
-  </para>
-  <itemizedlist>
-   <listitem>
-   <para>
-   Come applicazione (normale) : nel menu Gnome, Linphone dovrebbe apparire nella sezione Rete. Se non utilizzi Gnome, puoi lanciare Linphone da una finestra terminale, per esempio. Quando Linphone non è in esecuzione, non è possibile ricevere chiamate.
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   Come applet Gnome : cliccando sul pannello Gnome col pulsante destro, aggiungere l'applet. Linphone apparirà nella sezione Rete. Apparendo nel pannello Gnome, Linphone è capace di ricevere chiamate anche se la sua finestra non è visibile. Se si vuol vedere la finestra principale, cliccare sull'applet. Quando c'è una chiamata, la finestra principale passa in primo piano, e sentirai gli squilli della chiamata.
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   Come demone : questo è interessante per coloro che non utilizzano Gnome. Per esempio, per KDE, c'é una directory /home/user/.kde2/AutoStart/ dove si possono inserire le applicazioni che si vogliono lanciare ad inizio sessione. Nella directory citata, con l'aiuto di un gestore di file, aggiungere un collegamento cliccando col pulsante destro. Il comando da inserire è &quot;linphone -daemon&quot;. L'interfaccia prinicipale di Linphone non sarà visibile, e dunque, per farla apparire, si lanci Linphone normalmente, per esempio da una finestra terminale.
-   </para>
-  </listitem>
-  </itemizedlist>
-  </sect1>
-  <sect1>
-   <title>
-   Come lanciarlo
-  </title>
-   <sect2>
-    <title>
-    Principi di base
-   </title>
-   <para>
-    Linphone utilizza il protocollo SIP (Session Initiation Protocol) per effettuare chiamate con altri interlocutori. Il protocollo specifica che ciascuna persona dev'essere identificata da un URL sip della forma: sip:nome_utente@nome_host. Questo modo di chiamare le persone è molto simile a quello utilizzato per la posta elettronica.
-   </para>
-   <para>
-    Nome_utente è il nome di un utente su una macchina, come il login su una macchina linux, per esempio. Nome_host è il nome di una macchina sotto forma di indirizzo IP, o più semplicemente sotto forma di dominio (es: linphone.org).
-   </para>
-   <para>
-    Si noti che SIP è un nuovo protocollo di telecomunicazione fatto per essere semplice ed efficace su internet, che è totalmente diverso ed incompatibile con H.323. H.323 è il protocollo attualmente usato da NetMeeting e GnomeMeeting.
-   </para>
-   </sect2>
-   <sect2>
-    <title>
-    Applicazione: due persone (Bob e Tom) si connettono ad internet con un modem analogico classico.
-   </title>
-   <para>
-    Ecco il modo più semplice di procedere : 
-   </para>
-   <para>
-    Prerequisito : 
-   </para>
-   <itemizedlist>
-    <listitem>
-    <para>
-    Un modem da 28.8 Baud o più. 
-    </para>
-   </listitem>
-   </itemizedlist>
-   <para>
-    Procedimento: 
-   </para>
-   <itemizedlist>
-    <listitem>
-    <para>
-    Si è convenuto che Bob debba chiamare Tom alle 21.00. Alle 21.00, Tom si connette ad Internet utilizzando kppp, gppp o wvdial (o un altro). Una volta connesso ad internet, può lanciare Linphone. Aprendo la finestra delle statistiche di kppp o gppp, può vedere il suo indirizzo IP (altrimenti può digitare /sbin/ifconfig per vederlo). Il nome dell'interfaccia modem dev'essere ppp0.
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Di seguito, manda un messaggio a Bob dicendo : &quot;Il mio indirizzo IP è xxx.xxx.xxx.xxx&quot;.
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Bob legge l'email e riporta nella finestra di Linphone il nome e l'indirizzo IP della personne da contattare : Tom@xxx.xxx.xxx.xxx(L'indirizzo IP di Tom) e per finire, clicca sul pulsante Chiamare.
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Linphone suona a casa di Tom ...Tom risponde alla chiamata cliccando sul pulsante &quot;Rispondere&quot; ed a questo punto la conversazione può iniziare. 
-    </para>
-   </listitem>
-   </itemizedlist>
-   <para>
-    Se si incontrassero problemi in uno di questi punti, si vada alla sezione 4 - Problemi.
-   </para>
-   </sect2>
-   <sect2>
-    <title>
-    Test in locale: non hai nessuno da chiamare per il momento, ma vuoi controllare se Linphone funzioni davvero.
-   </title>
-   <para>
-    <anchor id="sipomatic" ></anchor>A partire dalla versione 0.3.0, Linphone è dotato di un programma di test chiamato &quot;sipomatic&quot;. Sipomatic può rispondere automaticamente alle chiamate provenienti da Linphone. A voi la scelta :
-   </para>
-   <itemizedlist>
-    <listitem>
-    <para>
-    Lanciare linphone.
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Lanciare sipomatic in una finestra terminale. Non siate sorpresi, sipomatic non possiede alcuna interfaccia grafica, ma non c'è bisogno di modificare quello che sta sotto. 
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    In Linphone, menu Parametri, sezione Rete, scegliere &quot;lo&quot; come interfaccia di default. Applicare il cambiamento cliccando su OK. Digitare l'indirizzo S.I.P seguente nella finestra principale : sip:robot@127.0.0.1:5064. 127.0.0.1 è l'indirizzo locale del tuo computer, e robot è il nome da usare per chiamare sipomatic. 5064 è la porta con cui sipomatic può essere contattato. Normalmente si deve utilizzare 5060 per chiamare qualcuno, ma sipomatic fa eccezione : funziona con la porta 5064. Il motivo è che Linphone funziona già sulla porta 5060, ed è impossibile avere due applicazioni che utilizzino la stessa porta nello stesso momento, sulla stessa macchina. 
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Cliccare sul pulsante &quot;Chiamare&quot;. Dopo qualche secondo, sipomatic dovrebbe rispondere alla chiamata e vi dovrebbe dire un breve messaggio.
-    </para>
-   </listitem>
-   </itemizedlist>
-   </sect2>
-  </sect1>
-  <sect1 id="params">
-   <title>
-   Parametri di chiamata
-  </title>
-   <sect2 id="paramnetwork">
-    <title>
-    Rete
-   </title>
-   <itemizedlist>
-    <listitem>
-    <para>
-    Lista delle interfacce di rete: bisogna scegliere un'interfaccia di rete da usare con Linphone. Se si vuole contattare qualcuno su Internet, bisogna scegliere l'interfaccia di rete connessa ad Internet. Per esempio, se si utilizza un modem, dovrà essere ppp0. Se non si è connessi ad alcuna rete, solo l'interfaccia di rete locale, chiamata lo, apparirà nella lista. L'unica scelta che si può fare in questo caso è chiamare <link linkend="sipomatic">sipomatic</link>.
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Tipo di connessione: scegliere il tipo di connessione utilizzata per connettervi alla rete che si desidera utilizzare. Questo aiuterà Linphone ad autoconfigurarsi in funzione della banda passante del tipo di connessione.
-    </para>
-   </listitem>
-   </itemizedlist>
-   </sect2>
-   <sect2 id="paramrtp">
-    <title>
-    RTP
-   </title>
-   <para>
-    RTP 
-   </para>
-   <itemizedlist>
-    <listitem>
-    <para>
-    porta RTP:  Linphone utilizza la porta 7072 di default per inviare e ricevere segnali audio. Se la porta 7072 è usata da un'altra applicazione, la si cambi a piacere.
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Compensazione Jitter: questo numero rappresenta il numero di pacchetti audio che Linphone aspetta prima di farli sentire. Si aumenti questo numero se si sente male la voce, in modo da migliorare la qualità di trasmissione, ma attenzione: questo aumenta il ritardo (Si sentirà la voce dell'interlocutore qualche millisecondo più tardi). D'altro canto, se si utilizza un server perfetto, e si dispone di buoni driver audio, si può scegliere un valore basso fino a 3 pacchetti, sentendo così un ritardo trascurabile.
-    </para>
-   </listitem>
-   </itemizedlist>
-   </sect2>
-   <sect2 id="paramsip">
-    <title>
-    SIP
-   </title>
-   <para>
-    SIP (Session Initiation Protocol) è un protocollo che permette di stabilire sessioni telefoniche grazie ad un server IP. Semplificando, è ciò che permette di far suonare il telefono all'altro interlocutore, sospendere o terminare una chiamata quando uno dei due riattacca.
-   </para>
-   <itemizedlist>
-    <listitem>
-    <para>
-    porta SIP: Linphone utilizza di default la porta 5060 per inviare / ricevere pacchetti SIP. Si raccomanda caldamente per la RFC del protocollo SIP di utilizzare questo valore. Non lo si cambi a meno che non si sappia davvero cosa si stia facendo.
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Indirizzo SIP: modifica nome utente e macchina a piacere. Beninteso, dare un nome di macchina quinon significa che questo nome sia conosciuto da altre macchine del server. Nemmeno Linphone userà il nome della macchina e preferirà usare l'indirizzo IP per comunicare con altre macchine.
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Usare un server segretario sip: si faccia questa scelta, se ci si vuole registrare su un server SIP (segretario) per ottenere servizi vari. Quando non si ha un indirizzo IP fisso, questo può essere interessante per permettere agli amici di chiamare. Vedere la sezione &quot;<link linkend="registering">enregistrement sur un serveur sip</link>&quot;.
-    </para>
-   </listitem>
-   </itemizedlist>
-   </sect2>
-   <sect2 id="paramcodec">
-    <title>
-    Codec
-   </title>
-   <para>
-    I codecs sono algoritmi per comprimere la voce. Per esempio, una voce digitalizzata a 16bit/8000Hz rappresenta un flusso di dati di 128kbits/secondo. Usando il codificatore vocale GSM, questo flusso è ridotto a 13kbits/secondo, senza perdita significativa di qualità.
-   </para>
-   <itemizedlist>
-    <listitem>
-    <para>
-    Scelta dei codecs: Linphone può usare diversi codec. Usare i pulsanti posti a lato della lista dei codec in modo da porli nell'ordine preferito. Si badi bene, che in funzione del tipo di connessione alla rete, alcuni codec sono inutilizzabili. Questi appariranno in rosso e non saranno selezionabili. Si può decidere di usare o no un codec &quot;utilizzabile&quot; (in blu) cambiando il suo stato con l'aiuto del pulsante Attiva / Disattiva in fianco alla lista.
-    </para>
-   </listitem>
-   </itemizedlist>
-   </sect2>
-   <sect2 id="paramaudio">
-    <title>
-    Parametri audio
-   </title>
-   <itemizedlist>
-    <listitem>
-    <para>
-    Modo d'uso: se si ha installato il driver ALSA con una libreria ALSA &lt;0.9, si scelga ALSA per avere risultati migliori. Altrimenti, o se non si sa, usare OSS, che funziona sufficientemente bene.
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-     Scelta della fonte di registrazione: si può scegliere la fonte di registrazione per la voce. Nella maggior parte dei casi, sarà il microfono.
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Opzione auto-kill: scegliendo questa opzione, Linphone fermerà i server sonori (esd &amp;&num;38; artsd) che possono bloccare la periferica sonora e provocare così problemi problemi d'apertura delle periferiche da parte di Linphone in caso di bisogno. Si raccomanda di attivare questa opzione.
-    </para>
-   </listitem>
-   </itemizedlist>
-   </sect2>
-  </sect1>
-  <sect1>
-   <title>
-   Rubrica
-  </title>
-  <para>
-   A partire dalla versione 0.4.1 Linphone dispone di una rubrica (menu connessione, rubrica), con la quale memorizzare indirizzi, e richiamarli facilmente quando si vuol chiamare.
-  </para>
-  </sect1>
-  <sect1 id="registering">
-   <title>
-   Registrazione su un server sip
-  </title>
-  <para>
-   E' possibile sottoscrivere alcuni servizi sui server sip remoti chiamati segretari, proxy o server ridiretti. Questi servizi possono essere:
-  </para>
-  <itemizedlist>
-   <listitem>
-   <para>
-   ridirezione: Linphone chiede al server la creazione di un account &lt;sip:votre_nom@le_serveur_sip&gt;. Questo indirizzo potrà allora essere utilizzato dai tuoi interlocutori per connetterti. Un piccolo esempio concreto può essere utile: tu non sei altro che un internauta poverino, connesso temporaneamente grazie ad un modem 56k. La tua macchina non ha un nome di dominio conosciuto ed il tuo indirizzo IP cambia ad ogni connessione. E' impossibile per gli amici chiamare in mancanza dell'indirizzo IP, a meno che non lo si comunichi via posta elettronica, per esempio. Per risolvere questo problema, si può chiedere di avere un indirizzo su un server sip conosciuto dagli amici, fisso e sempre connesso. Per far ciò, specificare l'indirizzo del server nel menu parametri, sezione sip. Questo indirizzo è, per esempio, &lt;sip:server_esempio.com&gt; ed il nome utente è &ldquo;Bob&rdquo;. Linphone invia allora al server un messaggio per informare della corrispondenza tra l'indirizzo &lt;sip:bob@server_esempio.com&gt; e l'indirizzo IP attuale. D'ora in poi gli amici potranno chiamare usando questo nuovo indirizzo: le chiamate saranno ridirette automaticamente verso la tua macchina. Non ci sarà più bisogno di conoscere l'indirizzo IP, che cambia ogni volta, per contattarti. Ovviamente, si suppone che &lt;sip:server_esempio.com&gt; sia conosciuto da tutti gli amici.
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   Proxy: è esattamente lo stesso principio, tranne che la ridirezione viene fatta in maniera trasparente ed invisibile dal Linphone del chiamante.
-   </para>
-  </listitem>
-  </itemizedlist>
-  <para>
-   Il segretario specificato può essere utilizzato come proxy in uscita. In questo caso tutte le chiamate in uscita dal tuo Linphone saranno dirette verso tale server, che si suppone sia gestito da brave persone. E' quindi molto utile, per non dire indispensabile, che si usi Linphone su una rete privata, gestita da un firewall, anche se su un proxy sip è sicuramente attivo un firewall. 
-  </para>
-  <para>
-   Per usare fin da subito un server sip, bisogna aprire il menu Parametri, SIP, e cliccare sul pulsante in fianco a &quot;Usa il segretario sip&quot;. Digitare l'indirizzo del segretario, e scegliere un nome utente non troppo comune, in modo da evitare conflitti di nomi. Dare un'indicazione del servizio che il server deve effettuare per te e cliccare sui pulsanti &ldquo;ridirezione&rdquo; o &ldquo;proxy&rdquo;. Selezionare anche l'opzione &ldquo;il server è un proxy in uscita&rdquo;  se sei dietro ad un firewall.
-  </para>
-  <para>
-   Infine, confermando la scelta, Linphone comunicherà immediatamente con il  server SIP per ottenere i servizi richiesti. Allo stesso modo, in fase di uscita da Linphone, ci vorrà qualche secondo per togliere la registrazione dal server.
-  </para>
-  <para>
-   Una lista di server sip può essere trovata a questo indirizzo: <ulink url="http://www.cs.columbia.edu/~hgs/sip/servers.html">http://www.cs.columbia.edu/~hgs/sip/servers.html</ulink>.
-  </para>
-  <para>
-   Sfortunatamente, poiché alcuni di questi server non funzionano più, forse a causa della crisi e di fallimenti di società. Alcuni non sono utilizzabili poiché richiedono metodi di autentificazione non ancora implementati in Linphone. Per non perdere tempo, una lista di server sip pubblici funzionanti con Linphone è reperibile su <ulink url="http://simon.morlat.free.fr/english/servers.html">http://simon.morlat.free.fr/english/servers.html</ulink>.
-  </para>
-  </sect1>
-  <sect1>
-   <title>
-   Uso dietro i firewall
-  </title>
-  <para>
-   Linphone è in grado di funzionare dietro i firewall grazie ad un server proxy SIP in funzione sulla macchina firewall. Un tale server è in corso di sviluppo su <ulink url="http://osipproxy.sourceforge.net">http://osipproxy.sourceforge.net</ulink>. Ovviamente sarà libero e basato sulla libreria LGPL oSIP.
-  </para>
-  <para>
-   Una volta che il server proxy sarà attivo, si potrà configurare Linphone per utilizzarlo. Per far ciò, andare in Parametri, sezione SIP e attivare la casella &ldquo;Usa il segretario SIP&rdquo;, indicare il suo indirizzo, ed attivare l'opzione &ldquo;il server è un proxy in uscita&rdquo;.
-  </para>
-  <para>
-   C'è un caso in cui il  proxy non è indispensabile: quello in cui le macchine di reti private possiedano un indirizzo pubblico: il firewall filtra i pacchetti in entrata o uscita. Bisogna permettere a Linphone di funzionare con le macchine esterne, autorizzare il traffico UDP sulla porta SIP (di default 5060, è possibile cambiarla), e sulla porta RTP di ciascun Linphone nelle sottoreti. La porta RTP è parametrizzabile, come si è visto, nel menu Parametri.
-  </para>
-  </sect1>
-  <sect1>
-   <title>
-   Problemi vari
-  </title>
-   <sect2>
-    <title>
-    Problemi di connessione
-   </title>
-   <blockquote>
-   <para>
-    Tento di chiamare il mio amico &lt;sip:toto@esempio.com&gt;, ma niente da fare, nessuno squillo.
-   </para>
-   </blockquote>
-   <para>
-    Bisogna verificare che Linphone usi l'interfaccia di rete a cui sei connesso con la rete su cui si trova il tuo amico. La lista delle interfacce disponibili si trova in Parametri, sezione Rete. Selezionarla. 
-   </para>
-   <para>
-    Se il problema persistesse, potrebbe essere che il tuo amico non sia al momento raggiungibile.
-   </para>
-   </sect2>
-   <sect2>
-    <title>
-    Problemi audio
-   </title>
-   <blockquote>
-   <para>
-    Linphone sembra connettersi correttamente, si sentono gli squilli, ma appena l'interlocutore risponde, non si sente o si capisce più nulla.
-   </para>
-   </blockquote>
-   <itemizedlist>
-    <listitem>
-    <para>
-    La maggior parte degli utenti ha di questi problemi poiché non è stata scelta l'interfaccia di rete corretta. Se si usa il modem, dev'essere ppp0. In ogni caso, l'interfaccia &ldquo;lo&rdquo; non permette di avere una comunicazione via rete. Serve solo per il test locale con sipomatic (vedere più avanti).
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Aumentare il livello sonoro di acquisizione ed emissione, usando i potenziometri posti nella finestra principale.
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Se la voce dell'interlocutore sembra vibrare o echeggiare, si può tentaredi aumentare il parametro comensazione jitter (Parametri, RTP). Ma attenzione, questo aumenta il ritardo nella controparte.
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Se Linphone nonriesce ad usare la scheda sonora, verificare che non sia utilizzata da qualche altro programma audio. 
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Infine, utilizzare il driver sonoro ALSA (vedere <ulink url="http://www.alsa-project.org">http://www.alsa-project.org</ulink>) , piuttosto che OSS, fornito con il kernel linux. Sfortunatamente la maggior parte delle distribuzioni usano ancora vecchi driver che hanno vari errori e problemi di ritardo. I driver ALSA danno risultati migliori. Si noti che se si cambiano driver, non c'è bisogno di ricompilare Linphone o di cambiare una qualsiasi configurazione. 
-    </para>
-   </listitem>
-   </itemizedlist>
-   </sect2>
-  </sect1>
-  <sect1>
-   <title>
-   Errori e suggerimenti
-  </title>
-  <para>
-   In primo luogo, andare sul sito di Linphone <ulink url="http://www.linphone.org">http://www.linphone.org</ulink> e verificare di avere la versione più recente di Linphone. 
-  </para>
-  <para>
-   Se Linphone si bloccassse, inviami direttamente un messaggio a bugs@linphone.org. Qualora Linphone non funzionasse, ma non si bloccasse, verificare bene di aver letto tutto il manuale prima di mandare un resoconto all'indirizzo indicato. In ogni caso invia più informazioni possibili relativamente al problema, in particolar modo i messaggi che compaiono quando lo si lancia da un terminale. Se desideri qualche altra cosa, non esitare ad inviarmi un messaggio a help@linphone.org.Tieni presente che l'aggiunta della modalità video e conferenza sono in programma. 
-  </para>
-  <para>
-   Se qualcuno fosse interessato a fare traduzioni di Linphone, mi invii un file xx.po basato su quello in po/linphone.pot della distribuzione. Si può anche tradurre il manuale utente in altre lingue. In ogni caso, contattami qualora volessi maggiori dettagli.
-  </para>
-  </sect1>
-  <sect1>
-   <title>
-   Autori
-  </title>
-  <para>
-   Simon MORLAT (simon.morlat@linphone.org) ha scritto: 
-  </para>
-  <itemizedlist>
-   <listitem>
-   <para>
-   Programma principale (src)
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   Libreria RTP (lprtplib)
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   osipua : la libreria Agente utente sip .
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   Interfaccia per i driver audio (audio)
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   Wrappers per i codecs lpc10-1.5, gsm e g711. 
-   </para>
-  </listitem>
-  </itemizedlist>
-  <para>
-   Aymeric Moizard (jack@atosc.org) ha scritto la pila SIP oSIP usata da linphone. 
-  </para>
-  <para>
-   La libreria GSM è stata scritta da: Jutta Degener and Carsten Bormann,Technische Universitaet Berlin.
-  </para>
-  <para>
-   La librairie LPC10-1.5 par: Andy Fingerhut Applied Research Laboratory Washington University, Campus Box 1045/Bryan 509 One Brookings Drive Saint Louis, MO 63130-4899 jaf@arl.wustl.edu http://www.arl.wustl.edu/&tilde;jaf/
-  </para>
-  <para>
-   Leggere i file di testo README nella directory gsmlib e lpc10-1.5 per maggiori informazioni.
-  </para>
-  <para>
-   Le icone sono di Pablo Marcelo Moia ed il logo di Philippe Beau.
-  </para>
-  </sect1>
-  <sect1>
-   <title>
-   Ringraziamenti
-  </title>
-  <para>
-   Grazie a Daemon Chaplin per aver scritto Glade, il costruttore d'interfaccia grafica GTK+.
-  </para>
-  <para>
-   Grazie agli autori del codice di LPC10-1.5 e GSM.
-  </para>
-  <para>
-   Grazie a Joel Barrios ( jbarrios@-NO-SPAM-linuxparatodos.com ) per i suoi RPMS.
-  </para>
-  <para>
-   Grazie a Pablo Marcelo Moiaper le icone.
-  </para>
-  <para>
-   Grazie a Philippe Beau per la traduzione di questo manuale in francese, per il logo, e per il nuovo sito web che ha creato per Linphone.
-  </para>
-  <para>
-   Grazie a Alberto Zanoni &lt;alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it&gt; per la traduzione di linphone e questo manuale in Italiano.
-  </para>
-  <para>
-   <toc></toc>
-  </para>
-  </sect1>
-
-
-</article>
diff --git a/linphone/share/ja/.gitignore b/linphone/share/ja/.gitignore
deleted file mode 100644 (file)
index e1d2077..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-Makefile
-Makefile.in
-manual
-manual.junk
-manual.html
diff --git a/linphone/share/ja/Makefile.am b/linphone/share/ja/Makefile.am
deleted file mode 100644 (file)
index 1d3028c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-HELPLANG=ja
-
-include ../Makefile.inc
diff --git a/linphone/share/ja/manual.lyx b/linphone/share/ja/manual.lyx
deleted file mode 100644 (file)
index c1777bd..0000000
+++ /dev/null
@@ -1,505 +0,0 @@
-#LyX 1.1 created this file. For more info see http://www.lyx.org/
-\lyxformat 218
-\textclass docbook
-\language english
-\inputencoding default
-\fontscheme default
-\graphics default
-\paperfontsize default
-\spacing single 
-\papersize Default
-\paperpackage a4
-\use_geometry 0
-\use_amsmath 0
-\paperorientation portrait
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\defskip medskip
-\quotes_language english
-\quotes_times 2
-\papercolumns 1
-\papersides 1
-\paperpagestyle default
-
-\layout Title
-
-LINPHONE¥æ¡¼¥¶¡¼¥Þ¥Ë¥å¥¢¥ë
-\layout Author
-
-Simon Morlat (simon.morlat@linphone.org)
-\layout Author
-
-Ìõ¡§»³¸ýÁ±Ìé(yushiya@anet.ne.jp)
-\layout Date
-
-11-13-2001
-\layout Section
-
-¤Ï¤¸¤á¤Ë
-\layout Standard
-
-Linphone¤Ï¡¢¥·¥ó¥×¥ë¤Ê¥¤¥ó¥¿¡¼¥Í¥Ã¥ÈÅÅÏäǤ¢¤ê¡¢Æó¼Ô´Ö¤ÎÄÌÏäò¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Ê¤É¤ÎIPÌÖ¤òÄ̤¸¤Æ²Äǽ¤Ë¤¹¤ë¤â¤Î¤Ç¤¢¤ë¡£Linphone¤òµ¯Æ°¤¹¤ë¤Ë¤Ï°Ê²¼
-¤Î¤â¤Î¤¬É¬ÍפȤʤ롣
-\layout Itemize
-
-Linux(BSD¤Î¤è¤¦¤Ê¾¤ÎUNIX¤Ç¤âµ¯Æ°¤¹¤ë¤À¤í¤¦¤¬¡¢Linux´Ä¶­¤Û¤É¾¤Î´Ä¶­¤Ï¥Æ¥¹¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¡£) 
-\layout Itemize
-
-gnome1.2°Ê¾å¤¬¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¤³¤È¡£É¬¤º¤·¤âµ¯Æ°¤·¤Æ¤¤¤ëɬÍפϤʤ¤¡£
-\layout Itemize
-
-¥Ø¥Ã¥É¥Û¥ó¤«¥¹¥Ô¡¼¥«¡¼¡£
-\layout Itemize
-
-¥µ¥¦¥ó¥É¥«¡¼¥É¤¬Àµ¤·¤¯ÀßÄꤵ¤ì¤Æ¤¤¤ë¤³¤È¡£ 
-\layout Itemize
-
-¥Þ¥¤¥¯¥í¥Õ¥©¥ó 
-\layout Itemize
-
-¥â¥Ç¥à¤ä¥¤¡¼¥µ¥Í¥Ã¥ÈÅù¤òÍѤ¤¤¿¡¢¥Í¥Ã¥È¥ï¡¼¥¯(¥¤¥ó¥¿¡¼¥Í¥Ã¥ÈÅù)¤Ø¤ÎÀܳ¡£ 
-\layout Standard
-
-¤Ê¤ª¡¢Linphone¤òµ¯Æ°¤¹¤ëÁ°¤Ë¥ª¡¼¥Ç¥£¥ª¥Ç¥Ð¥¤¥¹¤ò»ÈÍѤ¹¤ë¤¹¤Ù¤Æ¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ò½ªÎ»¤·¤Æ¤ª¤¯¤Î¤¬¤è¤¤¤À¤í¤¦¡£
-\layout Standard
-
-Linphone¤Ï¥Õ¥ê¡¼¥¦¥§¥¢¤Ç¤¢¤ê¡¢GNU Public Licence¤Ë½¾¤Ã¤ÆÇÛÉÛ¤µ¤ì¤ë¡£
-\layout Standard
-
-·Ù¹ð - Åö¥½¥Õ¥È¥¦¥§¥¢¤ÏÊݾڤʤ·¤ËÄ󶡤µ¤ì¤ë¤â¤Î¤Ç¤¢¤ë¡£¾Ü¤·¤¯¤ÏCOPYING¥Õ¥¡¥¤¥ë¤ò»²¾È¤µ¤ì¤¿¤¤¡£¤Ê¤ª¡¢Linphone¤Ï°Å¹æ²½¤òÍѤ¤¤Ê¤¤¤¿¤á¡¢°­°Õ¤¢¤ë¿Í
-ʪ¤¬Íưפ˲»À¼¾ðÊó¤ò½¦¤¦¤³¤È¤¬¤Ç¤­¤ë¡£¤Ä¤Þ¤ê¡¢Linphone¤ÏÈëÌ©¤Î²ñÏäËÍѤ¤¤ë¤Ù¤­¤Ç¤Ï¤Ê¤¤¡£¤Þ¤¿¡¢Linphone¤Ï¥ë¡¼¥È¸¢¸Â¤Çµ¯Æ°¤·¤Ê¤¤¿ä¾©¤¹¤ë¡£
-\layout Section
-
-Linphone¤Îµ¯Æ°
-\layout Standard
-
-Linphone¤Ï»°¤Ä¤ÎÊýË¡¤Çµ¯Æ°¤Ç¤­¤ë¡£
-\layout Itemize
-
-Ä̾ï¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤È¤·¤Æ - Linphone¤Ï¡¢gnome¥á¥Ë¥å¡¼¤ÎÃæ¤Î¥Í¥Ã¥È¥ï¡¼¥¯¥µ¥Ö¥á¥Ë¥å¡¼¤Ë¸½¤ì¤ë¡£¤â¤·¡¢gnome¤òµ¯Æ°¤·¤Æ¤Ê¤¤¤Î¤Ç¤¢¤ì¤Ð¡¢Î㤨¤Ð
-¥¿¡¼¥ß¥Ê¥ë¤Ë
-\begin_inset Quotes eld
-\end_inset 
-
-linphone
-\begin_inset Quotes erd
-\end_inset 
-
-¤È¥¿¥¤¥×¤¹¤ë¤³¤È¤Ç¼Â¹Ô¤Ç¤­¤ë¡£Linphone¤¬µ¯Æ°¤·¤Æ¤¤¤Ê¤¤¤È¤­¤Ï¡¢ÅÅÏäò¼õ¤±¤ë¤³¤È¤Ï¤Ç¤­¤Ê¤¤¡£ 
-\layout Itemize
-
-gnome¥¢¥×¥ì¥Ã¥È¤È¤·¤Æ - gnome¥Ñ¥Í¥ë¤ò±¦¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¢¥Ñ¥Í¥ë¤ËLinphone¤òÄɲ乤뤳¤È¤¬¤Ç¤­¤ë¡£Linphone¤Ï¥Í¥Ã¥È¡¼¥ï¡¼¥¯¥á¥Ë¥å¡¼¤ÎÃæ
-¤Ë¤¢¤ë¡£¤Ò¤Ã¤½¤ê¤È¥Ñ¥Í¥ë¤ÎÃæ¤Çµ¯Æ°¤¹¤ë¤³¤È¤Ç¡¢Linphone¤Ï¡¢¤¿¤È¤¨¥¦¥¤¥ó¥É¥¦¤¬¸½¤ì¤Æ¤¤¤Ê¤¯¤Æ¤âÅÅÏäò¼õ¤±¤ë¤³¤È¤¬¤Ç¤­¤ë¡£¥á¥¤¥ó¥¦¥¤¥ó¥É¥¦¤Ëɽ¼¨¤µ¤»¤¿¤¤¤È¤­
-¤Ë¤Ï¡¢¥¢¥×¥ì¥Ã¥È¤ò¥¯¥ê¥Ã¥¯¤¹¤ì¤Ð¤è¤¤¡£ÅÅÏ䬤«¤«¤Ã¤Æ¤­¤¿¤È¤­¤Ë¤Ï¡¢¥á¥¤¥ó¥¦¥¤¥ó¥É¥¦¤¬É½¤ì¤Æ¡¢Ä̾ïÄ̤ê¤Ë¥Ù¥ë¤¬ÌĤäƤ¤¤ë¤Î¤¬Ê¹¤³¤¨¤ë¤À¤í¤¦¡£ 
-\layout Itemize
-
-¤Ò¤Ã¤½¤ê¤È¥Ç¡¼¥â¥ó¤È¤·¤Æ - ¤³¤ì¤Ï¡¢Èógnome¥æ¡¼¥¶¡¼¤Î¤¿¤á¤Î¤â¤Î¤Ç¤¢¤ë¡£Î㤨¤Ðkde¤Ç¤Ï¡¢/home/user/.kde2/AutoStart¥Ç¥£¥ì¥¯¥È¥ê¤Ë
-¡¢¥í¥°¥¤¥ó»þ¤Ëµ¯Æ°¤·¤¿¤¤¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î¥ê¥ó¥¯¤òŽ¤ë¡£¤·¤¿¤¬¤Ã¤Æ¡¢¾å½Ò¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ë¥Õ¥¡¥¤¥ë¥Þ¥Í¡¼¥¸¥ã¡¼¤Ç°ÜÆ°¤·¡¢±¦¥¯¥ê¥Ã¥¯¤Ç¸½¤ì¤ë¥¢¥×¥ì¥Ã¥È¤«¤é¡¢¡Ö¥ê¥ó¥¯
-¤ÎÄɲáפò¼Â¹Ô¤¹¤ì¤Ð¤è¤¤¡£¤Ê¤ª¡¢µ¯Æ°¤¹¤ë¥³¥Þ¥ó¥É¤Ï¡¢
-\begin_inset Quotes eld
-\end_inset 
-
- linphone -deamon
-\begin_inset Quotes erd
-\end_inset 
-
-¤Ç¤¢¤ë¡£¤³¤Î¾ì¹ç¡¢Linphone¤Î¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤ò¸«¤ë¤³¤È¤Ï¤Ê¤¤¤¬¡¢É½¼¨¤µ¤»¤¿¤¤¤È¤­¤Ë¤Ï¥¿¡¼¥ß¥Ê¥ëÅù¤«¤éLinphone¤òµ¯Æ°¤µ¤»¤ë¤Î¤ÈƱÍͤ˥¿¥¤¥×¤¹¤ì¤Ð¤è
-¤¤¡£ 
-\layout Section
-
-ÅÅÏäò¤«¤±¤ë
-\layout Subsection
-
-´ðËÜŪ¤Ê¸¶Â§
-\layout Standard
-
-¡Ösip:¥æ¡¼¥¶¡¼Ì¾@¥Û¥¹¥È̾¡×¤Î¤è¤¦¤ÊSIP URL¤Ë¤è¤Ã¤Æ¶èÊ̤µ¤ì¤ë¡£SIP URL¤Ï¡¢Æ¬¤Î¡Ösip:¡×¤ò½ü¤±¤ÐÈó¾ï¤Ëe-mail¥¢¥É¥ì¥¹¤È»÷¤Æ¤¤¤ë¡£
-\layout Standard
-
-¥æ¡¼¥¶¡¼Ì¾¤Ï¡¢UNIX¥Þ¥·¥ó¤Î¥í¥°¥¤¥ó¥Í¡¼¥à¤Î¤è¤¦¤Ê¤â¤Î¤Ç¡¢¥Û¥¹¥È̾¤Ï¥æ¡¼¥¶¡¼¤¬Àܳ¤¹¤ë¥Þ¥·¥ó¤Î̾Á°¤äIP¥¢¥É¥ì¥¹¤Ç¤¢¤ë¡£
-\layout Standard
-
-¤Ê¤ª¡¢SIP¤Ï¥·¥ó¥×¥ë¤ËÀ߷פµ¤ì¤¿¿·¤·¤¤ÄÌ¿®¤Î¥×¥í¥È¥³¥ë¤Ç¤¢¤ê¡¢H323¤È¤Ï¤Þ¤Ã¤¿¤¯¸ß´¹À­¤¬¤Ê¤¤¤³¤È¤ËÃí°Õ¤µ¤ì¤¿¤¤¡£
-\layout Subsection
-
-»ÈÍÑÎã:Æó¿Í¤Î¥æ¡¼¥¶¡¼¤¬¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Ë¥â¥Ç¥à¤ÇÀܳ¤·¤Æ¤¤¤ë¤È¤­
-\layout Standard
-
-¤³¤ì¤Ï¡¢Ã±½ã¤Ê¼ê³¤­¤Ç¤¢¤ë¡£É¬ÍפȤµ¤ì¤ë¥Í¥Ã¥È¥ï¡¼¥¯¤Ï¡¢
-\layout Itemize
-
-28k°Ê¾å¤Î¥â¥Ç¥à 
-\layout Standard
-
-¤Ç¤¢¤ë¡£
-\layout Standard
-
-¥·¥Ê¥ê¥ª¤Ï¡¢°Ê²¼¤ÎÄ̤ê¤Ç¤¢¤ë¡£
-\layout Itemize
-
-¥Ü¥Ö¤Ï¥È¥à¤Ë21:00¤ËÅÅÏ乤뤳¤È¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£¥È¥à¤Ï¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Ëkppp¤ägppp¤äwmdial¤Ê¤É¤ÇÀܳ¤·¤Æ¤¤¤ë¡£ 
-\layout Itemize
-
-¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤ËÀܳ¤·¤¿¤é¡¢¥Ü¥Ö¤ÏLinphone¤òµ¯Æ°¤Ç¤­¤ë¡£kppp¤ägppp¤Ê¤É¤ÎÅý·×¥Ü¥Ã¥¯¥¹¤ò³«¤¤¤Æ¡¢¥Ü¥Ö¤Ï¼«Ê¬¤ÎIP¥¢¥É¥ì¥¹¤òÃΤ뤳¤È¤¬¤Ç¤­¤ë¡£(/s
-bin/ifconfig¤ò»È¤ï¤Ê¤¯¤Æ¤â³Îǧ¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë)¡£ 
-\layout Itemize
-
-¼¡¤Ë¡¢¥È¥à¤Ï¥Ü¥Ö¤Ë¡ÖËͤÎIP¥¢¥É¥ì¥¹¤Ï¡¢xxx.xxx.xxx.xxx¤À¤è¡£¡×¤È¤¤¤¦ÆâÍÆ ¤Îe¥á¡¼¥ë¤òÁ÷¤ë¡£ 
-\layout Itemize
-
-¤½¤Î¤¹¤°¤¢¤È¤Ç¡¢¥È¥à¤Î²È¤ÎLinphone¤Î¥Ù¥ë¤¬ÌĤ롣¤½¤Î¤È¤­¡¢¥Ü¥Ö¤Ë¤â¸þ¤³¤¦¤Ç¥Ù¥ë¤¬ÌĤäƤ¤¤ë¤Î¤¬Ê¬¤«¤ë¤è¤¦¤Ë¥Ù¥ë¤Î²»¤¬Ê¹¤³¤¨¤ë¡£¤½¤³¤Ç¡¢¥È¥à¤¬ÅÅÏä˽Ф뤿
-¤á¤Ë¡ÖÅÅÏäò¤È¤ë¡×¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤À¤±¤Ç¤è¤¤¡£¤½¤¦¤¹¤ì¤Ð¡¢¸ß¤¤¤Ë²ñÏ䬤Ǥ­¤ë¤Ï¤º¤Ç¤¢¤ë¡£ 
-\layout Standard
-
-ÌäÂ꤬¤¢¤Ã¤¿¤é¡¢Âè4Àá¤ÎÌäÂê¤ò»²¾È¤·¤ÆÍߤ·¤¤¡£
-\layout Subsection
-
-¥Æ¥¹¥È¤Î»î¹Ô - ¸½ºß(Î㤨¤Ð¿¼Ìë¤Ê¤É¤Ç)ÅÅÏäò¤«¤±¤ëͧ¿Í¤¬¤¤¤Ê¤¤¤¬¡¢Linphone¤¬ËÜÅö¤ËÆ°¤¤¤Æ¤¤¤ë¤«¤É¤¦¤«ÃΤꤿ¤¤¤È¤­
-\layout Standard
-
-
-\begin_inset LatexCommand \label{sipomatic}
-
-\end_inset 
-
-¥Ð¡¼¥¸¥ç¥ó3.0¤«¤é¤Ï¡¢Linphone¤Ë¤Ï¡Ösiptomatic¡×¤È¤¤¤¦¥×¥í¥°¥é¥à¤¬ÉÕ°¤·¤Æ¤¤¤ë¡£¤³¤ì¤Ï¡¢°Ê²¼¤Î¼ê½ç¤Ç»ÈÍѤǤ­¤ë¡£
-\layout Itemize
-
-siptomatic¤ò¥¿¡¼¥ß¥Ê¥ë¤«¤éµ¯Æ°¤¹¤ë¡£siptomatic¤Ï¥°¥é¥Õ¥£¥«¥ë¥¤¥ó¥¿¡¼¥Õ¥§¥¤¥¹¤òÈ÷¤¨¤Æ¤¤¤Ê¤¤¤¬¡¢¶Ã¤«¤Ê¤¤¤ÇÍߤ·¤¤¡£Áê¸ßŪ¤Ê¤ä¤ê¤È¤ê¤ò¤¹¤ëɬÍפ¬
-¤Ê¤¤¤«¤é¤Ç¤¢¤ë¡£ 
-\layout Itemize
-
-Linphone¤Î¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤Î¥¿¥Ö¤«¤é¡¢¡Ölo¡×¤ò¥Ç¥Õ¥©¥ë¥È¤Î¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ë·èÄꤷ¡¢Êѹ¹¤òOK¤ò¥¯¥ê¥Ã¥¯¤·¤ÆŬÍѤ¹¤ë¡£
-\layout Itemize
-
-¡Ösip:robot@127.0.0.1:5064¡×¤È¤¤¤¦SIP URL¤ò¥á¥¤¥ó¥¦¥¤¥ó¥É¥¦¤ËÆþÎϤ¹¤ë¡£127.0.0.1¤Ï¡¢¤¢¤Ê¤¿¤Î¥³¥ó¥Ô¥å¡¼¥¿¡¼¤Î ¥í¡¼¥«¥ë¥¢¥É¥ì¥¹¤Ç¡¢r
-obot¤Ïsipomatic¤ËÅÅÏäò¤«¤±¤ëºÝ¤Î̾Á°¤Ç¤¢¤ë¡£5064¥Ý¡¼¥È¤¬¡¢sipomatic¤ËÀܳ²Äǽ¤Ê¥Ý¡¼¥È¤Ç¤¢¤ë¡£Ä̾ï¤ÏÅÅÏäò¤«¤±¤ë¤Î¤Ë5060È֥ݡ¼¥È¤ò
-ÍѤ¤¤ë¤¬¡¢sipomatic¤ÏÎã³°¤Ç5064È֥ݡ¼¥È¤Çµ¯Æ°¤·¤Æ¤¤¤ë¡£¤³¤ì¤Ï¡¢Linphone¤¬¤¹¤Ç¤Ë5060È֥ݡ¼¥È(¤¹¤Ê¤ï¤Á¡¢¥Ý¡¼¥È¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¥Ç¥Õ
-¥©¥ë¥È¤Î¥Ý¡¼¥È¤È¤·¤Æ)¤Çµ¯Æ°¤·¤Æ¤¤¤ë¤«¤é¤Ç¤¢¤ê¡¢Æ±¤¸¥Ý¡¼¥È¤ò»È¤¦2¤Ä¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤òƱ»þ¤ËƱ¤¸¥³¥ó¥Ô¥å¡¼¥¿¡¼¤Çµ¯Æ°¤¹¤ë¤³¤È¤¬¤Ç¤­¤Ê¤¤¤«¤é¤Ç¤¢¤ë¡£
-\layout Itemize
-
-¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¢¿ôÉøå¤Ësiptomatic¤¬¤¢¤Ê¤¿¤ÎÅÅÏäËÊÖÅú¤·¡¢Ã»¤¤¥¢¥Ê¥¦¥ó¥¹¤¬Ê¹¤³¤¨¤ë¤À¤í¤¦¡£ 
-\layout Section
-
-
-\begin_inset LatexCommand \label{params}
-
-\end_inset 
-
-ÅÅÏäΥѥé¥á¡¼¥¿¡¼
-\layout Subsection
-
-
-\begin_inset LatexCommand \label{paramnetwork}
-
-\end_inset 
-
-¥Í¥Ã¥È¥ï¡¼¥¯
-\layout Itemize
-
-¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Î¥ê¥¹¥È - ¤¢¤Ê¤¿¤Ï¡¢Linphone¤Ë»È¤¦¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤òÁª¤ÖɬÍפ¬¤¢¤ë¡£¤â¤·¡¢¥¤¥ó¥¿¡¼¥Í¥Ã¥È¾å¤Î狼¤ËÏ¢Íí¤ò¤·¤¿
-¤¤¤Î¤Ê¤é¡¢¤¢¤Ê¤¿¤Î¥³¥ó¥Ô¥å¡¼¥¿¡¼¤¬¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤ËÀܳ¤·¤Æ¤¤¤ë¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤òÁª¤Ö¤Ù¤­¤Ç¤¢¤ë¡£²¿¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤Ë¤â¤Ä¤Ê¤¬¤Ã¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢¡Ölo
-¡×¤È¸Æ¤Ð¤ì¤ë¥í¡¼¥«¥ë¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤À¤±¤¬¥ê¥¹¥È¤Ë¸½¤ì¤ë¤À¤í¤¦¡£¤½¤ì¤Ï¡¢siptomatic¤ËÅÅÏäò¤¹¤ë¤³¤È¤À¤±¤¬¤Ç¤­¤ë¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ç¤¢¤ë¡£
-\layout Itemize
-
-Àܳ¤Î¥¿¥¤¥× - »È¤¤¤¿¤¤¥Í¥Ã¥È¥ï¡¼¥¯¤Ø¤ÎÀܳ¤ÎÊýË¡¤òÁªÂò¤¹¤ë(ÂçÄñ¤Î¾ì¹ç¤Ï¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Ç¤¢¤ë)¡£¤³¤ì¤Ï¡¢Linphone¤¬¤¢¤Ê¤¿¤ÎÂÓ°è¤òÀßÄꤹ¤ë¤Î¤òÊä½õ¤¹¤ë
-¤¿¤á¤Ç¤¢¤ë¡£ 
-\layout Subsection
-
-
-\begin_inset LatexCommand \label{paramrtp}
-
-\end_inset 
-
-RTP
-\layout Standard
-
-RTP(Real Time Protocol)¤Ï¡¢¥á¥Ç¥£¥¢¥¹¥È¥ê¡¼¥à¤ò¥Í¥Ã¥È¥ï¡¼¥¯±Û¤·¤ËÁ÷¿®¤¹¤ëºÝ¤ËÍѤ¤¤ë¥×¥í¥È¥³¥ë¤Ç¤¢¤ë¡£
-\layout Itemize
-
-RTP¥Ý¡¼¥È - Linphone¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤Ç²»À¼¥Ç¡¼¥¿¤ÎÁ÷¼õ¿®¤Ë7000È֥ݡ¼¥È¤òÍøÍѤ¹¤ë¡£7000È֥ݡ¼¥È¤¬Â¾¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ë»È¤ï¤ì¤Æ¤¤¤ë¤È»×¤ï¤ì¤ë
-¾ì¹ç¤Ë¤Ï¡¢Ç¤°Õ¤Î¥Ý¡¼¥È¤ËÊѹ¹¤¹¤ë¡£
-\layout Itemize
-
-¥Ð¥Ã¥Õ¥¡¤¹¤ë¥ß¥êÉà- ¤³¤Î¿ô»ú¤Ï¡¢Linphone¤¬ºÆÀ¸¤òÂÔµ¡¤¹¤ë²»À¼¥Ñ¥±¥Ã¥È¤Î¿ô¤òɽ¤·¤Æ¤¤¤ë¡£²»À¼¥Ñ¥±¥Ã¥È¤¬Á÷¤ì¤¬¤Á¤Ê¾ì¹ç¤Ë¡¢ºÆÀ¸¤µ¤ì¤º¤ËÇË´þ¤µ¤ì¤ë²»À¼¥Ñ¥±
-¥Ã¥È¤ò¸º¤é¤¹¤³¤È¤¬¤Ç¤­¤ë¡£¡ÖÅÓÀÚ¤ìÅÓÀڤ첻¡×¤¬Ê¹¤³¤¨¤ë¾ì¹ç¡¢¤³¤ÎÃͤòÂ礭¤¯¤¹¤ë¤ÈÅÁÁ÷¤Î¸úΨ¤ò¾å¤²¤ë¤³¤È¤¬¤Ç¤­¤ë¤¬¡¢²»À¼¤ÎÃٱ䤬Â礭¤¯¤Ê¤ë(Áê¼ê¤ÎÀ¼¤¬¾¯¤·ÃÙ¤ì¤Æʹ
-¤³¤¨¤ë)¡£¤æ¤¨¤Ë¡¢¥Í¥Ã¥È¥ï¡¼¥¯¤¬´°Á´¤Ç¹âÉʼÁ¤Î¥ª¡¼¥Ç¥£¥ª¥É¥é¥¤¥Ð¤ò»ÈÍѤ·¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢¤³¤ÎÃͤò3¥Ñ¥±¥Ã¥È¤Ë²¼¤²¤ì¤Ðû¤¤ÃÙ±ä»þ´Ö¤ÇÏ令ë¤è¤¦¤Ë¤Ê¤ë¡£
-\layout Subsection
-
-
-\begin_inset LatexCommand \label{paramsip}
-
-\end_inset 
-
-SIP
-\layout Standard
-
-SIP(Session Initiation Protocol)¤Ï¡¢¥Í¥Ã¥È¥ï¡¼¥¯±Û¤·¤Ë¥á¥Ç¥£¥¢¤Î¥»¥Ã¥·¥ç¥ó¤ò³ÎΩ¤¹¤ë¥×¥í¥È¥³¥ë¤Ç¤¢¤ë¡£¤Ä¤Þ¤ê¤Ï¡¢¥ê¥â¡¼¥È¥æ¡¼¥¶¡¼
-´Ö¤Î²ñÏäò³«»Ï¤·¤¿¤ê¡¢ÊÒÊý¤¬ÅÅÏäòÀڤ俤Ȥ­¤Ë²ñÏäò½ªÎ»¤·¤¿¤ê¤¹¤ë¥×¥í¥È¥³¥ë¤Ç¤¢¤ë¡£
-\layout Itemize
-
-SIP¥Ý¡¼¥È - Linphone¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤ÇSIP¥Ñ¥±¥Ã¥È¤ÎÁ÷¼õ¿®¤Ë5060È֥ݡ¼¥È¤òÍѤ¤¤ë¡£SIP¤Î¥Ý¡¼¥È¤Ï¡¢RFC¤Ë5060ÈÖ¤òÍѤ¤¤ë¤³¤È¤¬¶¯¤¯¿ä¾©¤µ
-¤ì¤Æ¤¤¤ë¡£¤è¤Ã¤Æ¡¢²¿¤ò¤·¤¿¤¤¤Î¤«¤òÌÀ³Î¤ËÍý²ò¤·¤Æ¤¤¤ë¤È¤­¤ò½ü¤¤¤Æ¤Ï¡¢¤³¤ì¤òÊѹ¹¤¹¤Ù¤­¤Ç¤Ï¤Ê¤¤¡£
-\layout Itemize
-
-SIP¤ÎÅÐÏ¿¤Ë¤¹¤ë - ¥ê¥â¡¼¥È¤ÎSIP¥µ¡¼¥Ð¡¼¤ËÅÐÏ¿¤¹¤·¤¿¤¤¤È¤­¤Ë¤Ï¡¢¤³¤Î¥Ü¥¿¥ó¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£SIP¥µ¡¼¥Ð¡¼¤Î¥µ¡¼¥Ó¥¹¤Ë¤Ï¡¢Å¾Á÷¤ä¥¢¥¦¥È¥Ð¥¦¥ó¥É¥×¥í¥¯¥·¤¬¤¢
-¤ë¡£¾Ü¤·¤¯¤Ï¡¢¡Ö¥ê¥â¡¼¥È¤Î¥µ¡¼¥Ð¡¼¤ËÀܳ¤¹¤ë¡×¤ÎÀá¤ò»²¾È¤µ¤ì¤¿¤¤¡£ 
-\layout Subsection
-
-
-\begin_inset LatexCommand \label{paramcodec}
-
-\end_inset 
-
-¥³¡¼¥Ç¥Ã¥¯
-\layout Standard
-
-¥³¡¼¥Ç¥Ã¥¯¤È¤Ï¡¢Æä˲»À¼¥Ç¡¼¥¿¤Î°µ½Ì¤Î¤¿¤á¤ËÀ߷פµ¤ì¤¿¥¢¥ë¥´¥ê¥º¥à¤Î¤³¤È¤ò¸À¤¦¡£Î㤨¤Ð¡¢16bit/8000Hz¤Î¥Ç¥¸¥¿¥ë²½¤µ¤ì¤¿²»À¼¤È¸À¤¨¤Ð¡¢128kbit/
-ÉäΥǡ¼¥¿¤Îή¤ì¤òɽ¤·¤Æ¤¤¤ë¡£GSM¥Ü¥³¡¼¥À¡¼¤ò»ÈÍѤ¹¤ë¤È¡¢¤³¤ì¤Ï13bit kbit/Éä˽̾®¤µ¤ì¤ë¡£
-\layout Itemize
-
-¥³¡¼¥Ç¥Ã¥¯¤ÎÁªÂò - Linphone¤Ï¿ô¼ïÎà¤Î¥³¡¼¥Ç¥Ã¥¯¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤ë¡£ ¥³¡¼¥Ç¥Ã¥¯¤Î¥ê¥¹¥È¤Î²¼Éô¤Ë¤¢¤ë¥Ü¥¿¥ó¤ò»È¤¦¤È¡¢»È¤¤¤¿¤¤½çÈÖ¤Ëʤ٤뤳¤È¤¬¤Ç¤­¤ë¡£
-¤À¤¬¡¢¥Í¥Ã¥È¥ï¡¼¥¯Àܳ¤Î¥¿¥¤¥×¤Ë¤è¤Ã¤Æ¤Ï(¥Í¥Ã¥È¥ï¡¼¥¯¤ÎÀá¤ò»²¾È)¡¢»È¤¨¤Ê¤¤¥³¡¼¥Ç¥Ã¥¯¤Î¼ïÎà¤â¡¢»ÈÍѤ¹¤ë¤«¤É¤¦¤«¤ò·èÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤ë¡£ 
-\layout Subsection
-
-
-\begin_inset LatexCommand \label{paramaudio}
-
-\end_inset 
-
-¥ª¡¼¥Ç¥£¥ª¥Ñ¥é¥á¡¼¥¿¡¼
-\layout Standard
-
-¤³¤ÎÀá¤Ç¤Ï¡¢²»À¼µ»½Ñ¤Ë´Ø¤¹¤ë¥Ñ¥é¥á¡¼¥¿¡¼¤ò²òÀ⤹¤ë¡£
-\layout Itemize
-
-¥É¥é¥¤¥Ð¤ÎÁªÂò - Linux¤Ç¤Ï¡¢OSS(¥«¡¼¥Í¥ë¥É¥é¥¤¥Ð¡¼¤È¤â¸Æ¤Ð¤ì¤ë)¤ÈALSA¤È¡¢°Û¤Ê¤ë2¼ïÎà¤Î¥µ¥¦¥ó¥É¥«¡¼¥É¥é¥¤¥Ð¤ò»ÈÍѤ¹¤ë¤³¤È¤¬¤Ç¤­¤ë¤¬¡¢ALSA¥É
-¥é¥¤¥Ð¤ÏALSA¥é¥¤¥Ö¥é¥ê¤òÄ̤¹¤³¤È¤Ç¡¢¤µ¤é¤Ê ¤ë¥Ñ¥Õ¥©¡¼¥Þ¥ó¥¹¤òȯ´ø¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£¤·¤¿¤¬¤Ã¤Æ¡¢ALSA¥É¥é¥¤¥Ð¡¼(snd_*¤Ç»Ï¤Þ¤ë̾Á°¤Ç¤¢¤ë)¤ò»ÈÍѤ·¤Æ
-¤¤¤ë¾ì¹ç¤Ï¡¢ALSA¥â¡¼¥É¤òÁªÂò¤¹¤ë¤Î¤¬¤è¤¤¡£Ê¬¤«¤é¤Ê¤±¤ì¤Ð¡¢OSS¤òÁªÂò¤¹¤ë¡£
-\layout Itemize
-
-Auto-kill¥ª¥×¥·¥ç¥ó - ¤³¤Î¥ª¥×¥·¥ç¥ó¤ò»È¤¦¤È¡¢linphone¤Ï¥µ¥¦¥ó¥É¥Ç¡¼¥â¥ó(esd¤Èartsd)¤òÄä»ß¤·¤è¤¦¤È¤¹¤ë¡£¤³¤ì¤Ï¡¢¥ª¡¼¥Ç¥£¥ª¥Ç¥Ð¥¤¥¹
-¤Ë¹±µ×Ū¤Ê¼è¤ê³°¤»¤Ê¤¤¥í¥Ã¥¯¤ò¤«¤±¤Æ¤·¤Þ¤¤¡¢Linphone¤¬É¬ÍפȤ·¤Æ¤¤¤ë¥ª¡¼¥Ç¥£¥ª¥Ç¥Ð¥¤¥¹¤ò¥ª¡¼¥×¥ó¤µ¤»¤Ê¤¤¤è¤¦¤Ë¤¹¤ë¤â¤Î¤Ç¤¢¤ë¡¢¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï¡¢¥ª¥ó¤Ë¤·
-¤Æ¤ª¤¯¤³¤È¤ò¿ä¾©¤¹¤ë¡£ 
-\layout Section
-
-ÅÅÏÃÄ¢
-\layout Standard
-
-ÅÅÏÃÄ¢(conection¤Î¥á¥Ë¥å¡¼¤ÎÃæ¤Ë¤¢¤ë)¤ò»È¤¦¤È¡¢SIP¥¢¥É¥ì¥¹¤òµ­²±¤È¸Æ½Ð¤·¤¬¤Ç¤­¤ë¡£SIP¥¢¥É¥ì¥¹¤Ï¡¢sip:¥æ¡¼¥¶¡¼Ì¾@¥É¥á¥¤¥ó̾¤Î·Á¼°¤Ç¤¢¤ë¡£¤Þ
-¤¿¡¢¼«Ê¬¤¬Ê¬¤«¤ê¤ä¤¹¤¯¤¹¤ë¤¿¤á¤Ë¡¢É½¼¨¤µ¤ì¤ë̾Á°¤òÄɲ乤뤳¤È¤â¤Ç¤­¤ë¡£SIP¥¢¥É¥ì¥¹¤ò¸Æ¤Ó½Ð¤¹¤Ë¤Ï¡¢¥¢¥É¥ì¥¹¤Î¥ê¥¹¥È¤«¤éÁªÂò¤·¡¢¡ÖOK¡×¤Î¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë
-¡£¤¹¤ë¤È¡¢ÁªÂò¤·¤¿¥¢¥É¥ì¥¹¤¬¥á¥¤¥ó¥¦¥¤¥ó¥É¥¦¤Ë¸½¤ì¤ë¤Î¤¬³Îǧ¤Ç¤­¤ë¤À¤í¤¦¡£¸å¤Ï¡¢ÅÅÏäò¤«¤±¤ë¤¿¤á¤Ë¡ÖÅÅÏäò¤«¤±¤ë¡×¤Î¥Ü¥¿¥ó¤ò²¡¤»¤Ð¤è¤¤¤À¤±¤Ç¤¢¤ë¡£
-\layout Section
-
-SIP¥µ¡¼¥Ð¡¼¤ËÅÐÏ¿¤¹¤ë
-\layout Standard
-
-¥ê¥â¡¼¥È¤ÎSIP¥µ¡¼¥Ð¡¼¤Î¥µ¡¼¥Ó¥¹¤ËÅÐÏ¿¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¢¤ë¡£¤³¤Î¤è¤¦¤Ê¥µ¡¼¥Ó¥¹¤Ë¤Ï¡¢°Ê²¼¤Î¤è¤¦¤Ê¤â¤Î¤¬¤¢¤ë¡£
-\layout Itemize
-
-žÁ÷ - Linphon¤Ï¡¢¥µ¡¼¥Ð¡¼¤Ë<sip:example_registrar.com>¤Î¤è¤¦¤ÊSIP¥¢¥«¥¦¥ó¥È¤òºîÀ®¤¹¤ë¤è¤¦Í×ÀÁ¤¹¤ë¡£Î㤨¤Ð¡¢56k¤Î¥â¥Ç¥à
-¤ò»È¤Ã¤Æñ½ã¤Ë¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤ËÀܳ¤·¤Æ¤¤¤ë¾ì¹ç¡¢¤¢¤Ê¤¿¤ÎIP¥¢¥É¥ì¥¹¤ÏÀÅŪ¤Ç¤Ï¤Ê¤¯¡¢¥Í¡¼¥à¥µ¡¼¥Ð¡¼¤ËÃΤé¤ì¤Æ¤¤¤ë¥Û¥¹¥È̾¤â»ý¤Ã¤Æ¤¤¤Ê¤¤¡£¤³¤ì¤Ç¤Ï¡¢Í§Ã£¤Ï¤¢¤Ê¤¿¤¬
-IP¥¢¥É¥ì¥¹¤òÄÌÃΤ¹¤ë¥á¡¼¥ë¤òÁ÷¤é¤Ê¤¤¸Â¤ê¡¢¤¢¤Ê¤¿¤ËÏ¢Íí¤ò¤¹¤ë¤³¤È¤¬¤Ç¤­¤Ê¤¤¡£Îã¤È¤·¤Æ¡¢<sip:example_registrar.com>¤ËÅÐÏ¿¤ò¹Ô¤¦¤Î¤Ï´Êñ
-¤Ç¤¢¤ë¡£¤¢¤Ê¤¿¤Î¥æ¡¼¥¶¡¼Ì¾¤Ï¡Öbob¡×¤À¤È¤¹¤ë¡£¥µ¡¼¥Ð¡¼¤ËÅÐÏ¿¤¹¤ëºÝ¤Ë¡¢Linphone¤Ï¤¢¤Ê¤¿¤ÎIP¥¢¥É¥ì¥¹¤ò¥µ¡¼¥Ð¡¼¤ËÁ÷¿®¤·¡¢¥¢¥«¥¦¥ó¥È¡Ösip:bob@e
-xample_registrar.com¡×¤¬ºîÀ®¤µ¤ì¤ë¡£¤½¤¦¤¹¤ë¤È¡¢¤¢¤Ê¤¿¤Îͧã¤Î¥¸¥à¤Ï¡¢<sip:bob@example_registrar.com>¤È¤¤¤¦¥¢¥É¥ì
-¥¹¤ËÅÅÏäò¤«¤±¤ë¤³¤È¤¬¤Ç¤­¤ë¡£ÅöÁ³¤Î¤³¤È¤Ê¤¬¤é¡¢
-\begin_inset Quotes eld
-\end_inset 
-
-example_registar.com
-\begin_inset Quotes erd
-\end_inset 
-
-¤Ï¡¢¥¦¥§¥ë¥Î¥ó¡¦¥É¥á¥¤¥ó¥Í¡¼¥à¤Ç¤¢¤ë¡£¼¡¤Ë¡¢¥¸¥à¤ÎLinphone¤Ï¥Ü¥Ö¤Î³Î¼Â¤Ê¥í¥±¡¼¥·¥ç¥ó¤ò¼¨¤¹Å¾Á÷¥á¥Ã¥»¡¼¥¸¤ò¼õ¤±¼è¤ë¡£¤½¤¦¤·¤Æ¡¢¥Ü¥Ö¤Î²È¤Ç¥Ù¥ë¤¬ÌĤë¤Î¤Ç¤¢
-¤ë¡£
-\layout Itemize
-
-¥×¥í¥¯¥· - ¤³¤ì¤â¡¢Å¾Á÷¥á¥Ã¥»¡¼¥¸¤¬¥¸¥à¤ÎÅÅÏäËÁ÷¿®¤µ¤ì¤Ê¤¤¤³¤È¤ò¤Î¤¾¤±¤Ð¡¢Æ±Íͤθ¶Íý¤Ç¤¢¤ë¡£¤½¤ÎÂå¤ï¤ê¤Ë¡¢¥×¥í¥¯¥·¤Ï¥Ü¥Ö¤ÎLinphone¤Þ¤Ç¥À¥¤¥ì¥¯¥È¤Êž
-Á÷¤ò¹Ô¤¦¡£ 
-\layout Standard
-
-¤³¤Î¤è¤¦¤ÊÅÐÏ¿¤Ï¡¢¥¢¥¦¥È¥Ð¥¦¥ó¥É¥×¥í¥¯¥·¤Ë¤ª¤¤¤Æ¤âƱÍͤ˹Ԥï¤ì¤ë¡£¤³¤ì¤Ï¡¢Linphone¤ò¥Õ¥¡¥¤¥ä¡¼¥¦¥©¡¼¥ë¤ÎÃæ¤Ç»È¤¦¤È¤­¤ËÍ­¸ú¤Ç¤¢¤ë¡£¥¢¥¦¥È¥Ð¥¦¥ó¥É¥×¥í¥¯¥·
-¤Ï¡¢¥×¥é¥¤¥Ù¡¼¥È¥µ¥Ö¥Í¥Ã¥È¤Ë¤¢¤ëHTTP¥×¥í¥¯¥·¤ÈƱÍͤÎÌò³ä¤ò²Ì¤¿¤¹¡£³°Éô¤Ø¤Î²ñÏäϥ¢¥¦¥È¥Ð¥¦¥ó¥É¥×¥í¥¯¥·¤¬°·¤¤¡¢¥Í¥Ã¥È¥ï¡¼¥¯³°¤Ë¤¤¤ë¤È»×¤ï¤ì¤ë¿Í¤Ø¤Î²ñÏäΞÁ÷
-¤ÎǤ¤òÉ餦¡£
-\layout Standard
-
-ÅÐÏ¿¥µ¡¼¥Ð¡¼¤òLinphone¤Ç»È¤¦¤Ë¤Ï¡¢¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤«¤éSIP¤Î¥¿¥Ö¤òÁªÂò¤·¡¢¡ÖSIP¥¢¥É¥ì¥¹¤òÅÐÏ¿¤¹¤ë¡×¤Î¥Ü¥Ã¥¯¥¹¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£ÅÐÏ¿¤¹¤ë¥¢¥É¥ì¥¹¤ò
-ŬÀڤʥե£¡¼¥ë¥É¤ËÆþÎϤ·¤¿¤é¡¢¼¡¤Ë¡¢Å¾Á÷¤«¥×¥í¥¯¥·¤«¡¢Âбþ¤¹¤ë¥Ü¥Ã¥¯¥¹¤ò¥Á¥§¥Ã¥¯¤·¡¢ÅÐÏ¿¤òÍ׵᤹¤ë¥µ¡¼¥Ó¥¹¤Î¥¿¥¤¥×¤òÁªÂò¤¹¤ë¡£¤Þ¤¿¡¢³°Éô¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤Ø²ñÏäòÆ©
-²á¤µ¤»¤ë¤¿¤á¤ÎÅÐÏ¿¥µ¡¼¥Ð¡¼¤¬É¬ÍפʤȤ­¤Ë¤Ï¡¢¡Ö¥¢¥¦¥È¥Ð¥¦¥ó¥É¥×¥í¥¯¥·¤È¤·¤Æ»È¤¦¡×¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£
-\layout Standard
-
-ºÇ¸å¤Ë¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤ÎOK¥Ü¥¿¥ó¤ò²¡¤¹¤È¡¢¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤ÏÊĤ¸¤é¤ì¡¢¤¿¤À¤Á¤ËÅÐÏ¿¥µ¡¼¥Ð¡¼¤Ë¤¢¤Ê¤¿¤ÎÀµ³Î¤Ê¾ì½ê¤òÃΤ餻¤ë¤¿¤á¤Î¸ò¾Ä¤¬»Ï¤Þ¤ë¡£Linph
-one¤ò¥·¥ã¥Ã¥È¥À¥¦¥ó¤¹¤ë¤È¤­¤Ë¤Ï¡¢ÅÐÏ¿¥µ¡¼¥Ð¡¼¤«¤é¤¢¤Ê¤¿¤Î¾ì½ê¤ÎÅÐÏ¿¤ò²ò½ü¤¹¤ë¤¿¤á¡¢¿ôÉô֤«¤«¤ë¡£
-\layout Standard
-
-¥Ñ¥Ö¥ê¥Ã¥¯¤ÊÅÐÏ¿¥µ¡¼¥Ð¡¼¤Î¥ê¥¹¥È¤Ï¡¢°Ê²¼¤Ë·ÇºÜ¤µ¤ì¤Æ¤¤¤ë¡£
-\begin_inset LatexCommand \url[http://www.cs.columbia.edu/~hgs/sip/servers.html]{http://www.cs.columbia.edu/~hgs/sip/servers.html}
-
-\end_inset 
-
-
-\layout Standard
-
-¤À¤¬¡¢»ÄÇ°¤Ê¤³¤È¤Ë¡¢¤³¤ì¤é¤Î¥µ¡¼¥Ð¡¼¤Î¿¤¯¤Ï¤â¤¦Æ°¤¤¤Æ¤¤¤Ê¤¤¡£¤ª¤½¤é¤¯¡¢¶áº¢¤ÎÅŵ¤ÄÌ¿®¶È³¦¤Î´íµ¡¤Ë¤è¤ë¤â¤Î¤Ç¤¢¤í¤¦¡£Â¾¤ÎɬÍפȤµ¤ì¤ëǧ¾ÚÊýË¡¤Ï¡¢¸½ºßLinpho
-ne¤Ç¤Ï¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
-\layout Standard
-
-̵ÍѤʼê´Ö¤òÈò¤±¤¿¤¤¤È¤­¤Ë¤Ï¡¢»ÈÍѲÄǽ¤ÊÆ°ºî¤·¤Æ¤¤¤ë¥Ñ¥Ö¥ê¥Ã¥¯¤ÊSIP¥µ¡¼¥Ð¡¼¤Î¥ê¥¹¥È¤¬¡¢Linphoe¤Î°ÊÁ°¤ÎWEB¥µ¥¤¥È¤Î¥ê¥¹¥È¤¬
-\begin_inset LatexCommand \url[http://simon.morlat.free.fr/english/servers.html]{http://simon.morlat.free.fr/english/servers.html}
-
-\end_inset 
-
-¤Ç»²¾È¤Ç¤­¤ë¡£
-\layout Section
-
-¥Õ¥¡¥¤¥ä¡¼¥¦¥©¡¼¥ë¤ÎÆ⦤Ç
-\layout Standard
-
-¸½ºß¤Ç¤Ï¡¢SIP¥×¥í¥¯¥·¤òÍѤ¤¤ë¤³¤È¤Ç¡¢Linphone¤Ï¥Õ¥¡¥¤¥ä¡¼¥¦¥©¡¼¥ë¤ÎÆ⦤ÇÍøÍѲÄǽ¤Ç¤¢¤ë¡£SIP¥µ¡¼¥Ð¡¼¤Ï¡¢¥×¥é¥¤¥Ù¡¼¥È¥Í¥Ã¥È¥ï¡¼¥¯¤«¤é¤Î²ñÏäò³°Éô¤Î
-¥Í¥Ã¥È¥ï¡¼¥¯¤ØžÁ÷¤¹¤ëǤ¤òÉ餦¡£oSIP¥é¥¤¥Ö¥é¥ê¤òÍøÍѤ·¤¿SIP¥×¥í¥¯¥·¤Ï¡¢
-\begin_inset LatexCommand \url[http://osipproxy.sourceforge.net]{http://osipproxy.sourceforge.net}
-
-\end_inset 
-
-¤Ç³«È¯¤µ¤ì¤Æ¤¤¤ë¡£
-\layout Standard
-
-SIP¤ÎÀá¤Î¡¢¡ÖSIP¤ËÅÐÏ¿¤¹¤ë¡×¤Î¹àÌܤò»²¹Í¤Ë¡¢¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤ÇÍѤ¤¤ëSIP¥×¥í¥¯¥·¤ò»ØÄꤷ¤ÆÍߤ·¤¤¡£ÀßÄꤹ¤ë¤Ë¤Ï¡¢SIP¥×¥í¥¯¥·¤Î¥¢¥É¥ì¥¹¤òÆþÎϤ·¡¢¡Ö
-¥¢¥¦¥È¥Ð¥¦¥ó¥É¥×¥í¥¯¥·¤È¤·¤ÆÅÐÏ¿¤¹¤ë¡×¤Î¥Ü¥¿¥ó¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£
-\layout Standard
-
-¤Ê¤ª¡¢SIP¥×¥í¥¯¥·¤¬É¬Íפʤ¤¾ì¹ç¤â¤¢¤ë¡£¥Ñ¥Ö¥ê¥Ã¥¯¥¢¥É¥ì¥¹¤ò»ý¤Ã¤Æ¤¤¤ë¥Í¥Ã¥È¥ï¡¼¥¯²¼¤Ë¤¢¤Ê¤¿¤Î¥³¥ó¥Ô¥å¡¼¥¿¡¼¤¬¤¢¤ê¡¢¥Õ¥¡¥¤¥ä¡¼¥¦¥©¡¼¥ë¤Ï³°Éô¥Í¥Ã¥È¥ï¡¼¥¯¤«¤é¤Î
-¥Ñ¥±¥Ã¥È¤ÎÁ÷¼õ¿®¤ò¥Õ¥£¥ë¥¿¡¼¤¹¤ë¤À¤±¤Î¾ì¹ç¤Ç¤¢¤ë¡£¤³¤Î¾ì¹ç¤Ë¤Ï¡¢¥Õ¥¡¥¤¥ä¡¼¥¦¥©¡¼¥ë¤Î¥Þ¥·¥ó¤ÎSIP¤ÈRTP¤Î¥Ý¡¼¥È¤ò¥ª¡¼¥×¥ó¤¹¤ë¤À¤±¤Ç¤è¤¤¡£SIP¥Ý¡¼¥È¤Ï¥×¥í¥Ñ
-¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤ÎSIP¤Î¥¿¥Ö¤Ë¡¢RTP¥Ý¡¼¥È¤Ï¡¢RTP¥Ý¡¼¥È¤ÏRTP¤Î¥¿¥Ö¤Ë¤¢¤ë¡£Î¾¼Ô¤È¤â¤ËÊѹ¹²Äǽ¤Ç¤¢¤ë¤¬¡¢SIP¥Ý¡¼¥È(5060ÈÖ)¤Ï¡¢Êѹ¹¤·¤Ê¤¤¤Ç¤ª¤¯¤³¤È
-¤¬¶¯¤¯¿ä¾©¤µ¤ì¤ë¡£
-\layout Section
-
-º¤¤Ã¤¿¤È¤­¤Ë¤Ï
-\layout Subsection
-
-Àܳ¾å¤Ë¤ª¤±¤ëÌäÂê
-\layout Quotation
-
-»ä¤Ï¡¢Í§¿Í<sip:toto@example.com>¤ËÅÅÏäò¤«¤±¤è¤¦¤È¤·¤¿¤À¤¬¡¢¤Ê¤Ë¤âµ¯¤­¤Ê¤¤¡£¥Ù¥ë¤âÌĤé¤Ê¤¤¡¢¤Þ¤Ã¤¿¤¯²¿¤âµ¯¤³¤é¤Ê¤¤¡£
-\layout Standard
-
-Linphone¤¬»ÈÍѤ·¤Æ¤¤¤ë¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤ØÀܳ¤·¤Æ¤¤¤ë¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹(¤Þ¤¿¤Ï¡¢²ñÏ䬽ФƤ¤¤¯¤Ù¤­¥Í¥Ã¥È¥ï¡¼¥¯)¤ò¸¡¾Ú¤·¤Æ¤ß¤ë¤Ù¤­¤Ç¤¢¤í¤¦¡£¥×¥í
-¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤Î¡¢¥Í¥Ã¥È¥ï¡¼¥¯¥¿¥Ö¤«¤é¡¢Àµ¤·¤¤¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤òÁª¤ó¤Ç¤ß¤ë¤Î¤¬¤è¤¤¤À¤í¤¦¡£
-\layout Standard
-
-¤¢¤ë¤¤¤Ï¡¢¤¢¤Ê¤¿¤¬Àܳ¤·¤è¤¦¤È¤·¤Æ¤¤¤ë¿Í¤¬¡¢¸½ºß·ÐÏ©¤¬Àܳ¤Ç¤­¤Ê¤¤¾õ¶·¤Ë¤¢¤ë¤Î¤«¤âÃΤì¤Ê¤¤¡Ä¡Ä¡£
-\layout Subsection
-
-²»À¼¤Ë¤ª¤±¤ëÌäÂê
-\layout Quotation
-
-Linphone¤Ï¡¢¥ê¥â¡¼¥È¤ÎSIP URL¤ËÀܳ¤·¤Æ¤¤¤ë¤è¤¦¤Ç¡¢¥Ù¥ë¤ÏÌĤäƤ¤¤ë¤è¤¦¤À¡£¤±¤ì¤É¤â¡¢Áê¼ê¤¬ÅÅÏä˽Ф¿¤È¤­¤Ë¤Ï²¿¤âµ¯¤³¤é¤º¡¢¤ª¸ß¤¤¤ÎÀ¼¤¬Ê¹¤³¤¨¤Ê¤¤
-¡£
-\layout Itemize
-
-ÂçÄñ¤Î¿Í¤Ï¡¢¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤«¤é¡¢Àµ¤·¤¤¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤òÁª¤ó¤Ç¤¤¤Ê¤¤¤¿¤á¤Ë¡¢ÌäÂê¤òÀ¸¤¸¤µ¤»¤Æ¤·¤Þ¤¦¡£¥À¥¤¥ä¥ë¥¢¥Ã¥×Àܳ¤Ç¤Ï¡¢¡Öppp0¡×¤Ë¤Ê¤ë
-¤Ï¤º¤Ç¤¢¤ë¡£¡Ö\i \"{}
-lo¡×¤Ï¡¢¥Æ¥¹¥ÈÍѤˡ¢sipomatic¤À¤±¤Ë»ÈÍѤµ¤ì¤ë¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ç¤¢¤ë¤³¤È¤ËÃí°Õ¤µ¤ì¤¿¤¤¡£¤½¤Î¾¤Î¾ì¹ç¤Ç¤Ï µ¡Ç½¤·¤Ê¤¤¡£
-\layout Itemize
-
-¤Þ¤º¤Ï¡¢Á÷Ïò»Î̤ȼõÏò»Î̤ò¾å¤²¤Æ¤ß¤ë¤Î¤¬¤è¤¤¤À¤í¤¦¡£
-\layout Itemize
-
-²»À¼¤¬¤È¤®¤ì¤È¤®¤ì¤Ë¤Ê¤ë¾ì¹ç¤Ï¡¢¤³¤ì¤ò²óÈò¤¹¤ë¤¿¤á¤Ë¡¢¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤ÎRTP¥¿¥Ö¤Î¡Ö¥Ð¥Ã¥Õ¥¡¤¹¤ë¥ß¥êÉáפÎÃͤòÂ礭¤¯¤·¤Æ¤ß¤ë¤Î¤¬¤è¤¤¤À¤í¤¦¡£¤·¤«¤·¡¢¤³¤ì¤Ï
-ÄÌ¿®¤ÎÃÙ±ä¤òÁýÂ礵¤»¤ë¡£
-\layout Itemize
-
-Linphone¤¬¡¢¥ª¡¼¥Ç¥£¥ª¥Ç¥Ð¥¤¥¹¤ò¥ª¡¼¥×¥ó¤Ç¤­¤Ê¤¤¤È¤­¤Ë¤Ï¡¢/dev/dsp¤Î¥Ñ¡¼¥ß¥Ã¥·¥ç¥ó¤ò³Îǧ¤·¡¢¥ª¡¼¥Ç¥£¥ª¥Ç¥Ð¥¤¥¹¤ò»ÈÍѤ¹¤ë¤¹¤Ù¤Æ¤Î¥×¥í¥°¥é¥à(xm
-ms kaimanÅù)¤òÄä»ß¤¹¤ë¤Î¤¬¤è¤¤¤À¤í¤¦¡£
-\layout Itemize
-
-ALSA¥É¥é¥¤¥Ð¡¼¤ò»ÈÍѤ¹¤ë(
-\begin_inset LatexCommand \url[http://www.alsa-project.org]{http://www.alsa-project.org}
-
-\end_inset 
-
-¤ò»²¾È¤µ¤ì¤¿¤¤)¡£ÂçÄñ¤Î¥Ç¥£¥¹¥È¥ê¥Ó¥å¡¼¥¸¥ç¥ó¤Ï¡¢¤Þ¤À¸Å¤¤¥«¡¼¥Í¥ë¸øǧ¤Î¥É¥é¥¤¥Ð¡¼¤ò»ÈÍѤ·¤Æ¤¤¤ë¤¬¡¢¤³¤ì¤ÏÂ礭¤ÊÃÙ±ä¤È¿¤¯¤Î¥Ð¥°¤ò´Þ¤ó¤Ç¤¤¤ë¡£Linphone¤Ï
-¡¢ALSA¥É¥é¥¤¥Ð¡¼¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿¸å¤Î¥ê¥³¥ó¥Ñ¥¤¥ë¤òɬÍפȤ·¤Ê¤¤¤³¤È¡¢¤Þ¤¿¡¢¥ª¡¼¥Ç¥£¥ª¤ÎÀá¤Î¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤«¤é¤ÎALSA¥â¡¼¥É¤Ø¤ÎÊѹ¹¤Ïɬ¿Ü¤Ç¤Ï¤Ê¤¤¤³
-¤È¤â½Ò¤Ù¤Æ¤ª¤³¤¦¡£ 
-\layout Section
-
-¥Ð¥°Êó¹ð¤ÈÄó°Æ
-\layout Standard
-
-¤Þ¤º¤Ï¡¢Linphone¤Î¥Û¡¼¥à¥Ú¡¼¥¸
-\begin_inset LatexCommand \url[http://www.linphone.org]{http://www.linphone.org}
-
-\end_inset 
-
-¤«¤é¡¢ºÇ¿·¤ÎLinphone¤ò»ÈÍѤ·¤Æ¤¤¤ë¤«¤ò³Îǧ¤·¤ÆÍߤ·¤¤¡£ 
-\layout Standard
-
-¤â¤·¡¢Linphone¤¬¥¯¥é¥Ã¥·¥å¤·¤¿¤È¤­¤Ë¤Ï¡¢¥Ð¥°¥ì¥Ý¡¼¥È¤òľÀÜbugs@linphone.org¤Þ¤ÇÁ÷¤Ã¤ÆÍߤ·¤¤¡£¤â¤·¡¢¥¯¥é¥Ã¥·¥å¤Ï¤·¤Ê¤¤¤¬Linphone¤¬
-Æ°ºî¤·¤Ê¤¤¤È¤­¤Ë¤Ï¡¢¾å¤Î¥¢¥É¥ì¥¹¤Ë¥Ð¥°¥ì¥Ý¡¼¥È¤òÁ÷¤ëÁ°¤Ë¡¢¥Þ¥Ë¥å¥¢¥ë¤ò ¤â¤¦°ìÅÙÆɤߤ«¤¨¤·¤ÆÍߤ·¤¤¡£¤â¤·¡¢²¿¤«¤òÄó°Æ¤·¤¿¤¤¤È¤­¤Ë¤Ï¡¢±ó褻¤º¤Ë¡¢help@lin
-phone.org¤Þ¤Ç¥á¡¼¥ë¤òÁ÷¤Ã¤ÆÍߤ·¤¤¡£¤Ê¤ª¡¢¥Ó¥Ç¥ª¥µ¥Ý¡¼¥È¤È²ñµÄ¤Ï¡¢¾­Íè¤Î·×²è¤Ë¤¢¤ë¤³¤È¤ò½Ò¤Ù¤Æ¤ª¤³¤¦¡£¤Þ¤¿¡¢Linphonr¤ÎËÝÌõ¤Ë¶½Ì£¤ò»ý¤Ã¤¿¿Í¤Ï¡¢ÇÛÉÛ
-¤µ¤ì¤Æ¤¤¤ëpo/linpyhone.pot¤Ë´ð¤Å¤¤¤¿xx.po¥Õ¥¡¥¤¥ë¤ò»ä¤ËÁ÷¤Ã¤ÆÍߤ·¤¤¡£¤Þ¤¿¡¢¤³¤Î¥Þ¥Ë¥å¥¢¥ë¤ò¾¤Î¸À¸ì¤ËËÝÌõ¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¢¤ë¡£¤¤¤º¤ì¤Ë¤·¤Æ¤â¡¢
-¾Ü¤·¤¤¤³¤È¤¬ÃΤꤿ¤¤¤È¤­¤Ï»ä¤ËÏ¢Íí¤·¤ÆÍߤ·¤¤¡£
-\layout Section
-
-ºî¼Ô
-\layout Standard
-
-Simon MORLAT (simon.morlat@free.fr) ¤¬À½ºî¤·¤¿Éôʬ¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¢¤ë¡£
-\layout Itemize
-
-¥á¥¤¥ó¥×¥í¥°¥é¥à(src) 
-\layout Itemize
-
-RTP ¥é¥¤¥Ö¥é¥ê (lprtplib) 
-\layout Itemize
-
-osipua -- osip¥¹¥¿¥Ã¥¯¤Ë´ð¤Å¤¤¤¿¥æ¡¼¥¶¡¼¥¨¡¼¥¸¥§¥ó¥È¤ÎAPI¡£oss¤ÈALSA¥É¥é¥¤¥Ð¡¼¤Î²»À¼¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¡£
-\layout Itemize
-
-(²»À¼) lpc10-1.5ÍѤÎwrappers, gsm and g711 ¥³¡¼¥Ç¥Ã¥¯ 
-\layout Standard
-
-Aymeric Moizard (jack@atosc.org)¤Ï¡¢ Linphone¤¬ÍøÍѤ·¤Æ¤¤¤ëosip¥¹¥¿¥Ã¥¯¤òÀ½ºî¤·¤¿¡£
-\layout Standard
-
-GSM¥é¥¤¥Ö¥é¥ê¤Ï¡¢Jutta Degener¤ÈCarsten Bormann(Technische Universitaet Berlin)¤Ë¤è¤Ã¤Æ½ñ¤«¤ì¤¿¡£
-\layout Standard
-
-The LPC10-1.5 ¥é¥¤¥Ö¥é¥ê¤Ï¡¢Andy Fingerhut(Applied Research Laboratory)¤Ë¤è¤Ã¤Æ½ñ¤«¤ì¤¿¡£
- <-- ¤³¤ÎÉôʬ¤Ï¥¹¥Ú¡¼¥¹¤ÎÅÔ¹ç¤Ë¤è¤ê¾Êά²Äǽ¤Ç¤¢¤ë¡£ Washington University, Campus Box 1045/Bryan
- 509 ¥¹¥Ú¡¼¥¹¤Ë¸Â¤ê¤¬¤¢¤ë¾ì¹ç¤Ï¡¢¤³¤³¤«¤é¡£One Brookings Drive Saint Louis, MO 63130-4899 jaf@arl.wu
-stl.edu http://www.arl.wustl.edu/~jaf/¤µ¤é¤Ê¤ë¾ðÊó¤Ï¡¢gsmlib¤Èlpc10-1.5¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Î¥Æ¥­¥¹¥È¥Õ¥¡¥¤¥ë¤ò»²¾È¤µ¤ì¤¿¤¤
-¡£
-\layout Standard
-
-Pablo Marcelo Moia -- ¥¢¥¤¥³¥óÀ½ºî
-\layout Section
-
-¼Õ¼­
-\layout Standard
-
-GTK¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¥Ó¥ë¥À¡¼¤ÎDaemon Chaplin¤Ë´¶¼Õ¤ò¡£
-\layout Standard
-
-ÃøÌÀ¤ÊoSIP¥é¥¤¥Ö¥é¥ê¡¼¤ÎAymeric Moizard¤Ë´¶¼Õ¤ò¡£
-\layout Standard
-
-LPC10-1.5¤ÈGSM¥³¡¼¥É¤Îºî¼Ô¤Ë´¶¼Õ¤ò¡£
-\layout Standard
-
-RPM¤òÄ󶡤·¤Æ¤¯¤ì¤¿¡¢Joel Barrios ( jbarrios@-NO-SPAM-linuxparatodos.com )¤Ë´¶¼Õ¤ò¡£
-\layout Standard
-
-Linphone¤ËÁÇŨ¤Ê¥¢¥¤¥³¥ó¤òÄ󶡤·¤Æ¤¯¤ì¤¿¡¢Pablo Marcelo Moia¤Ë´¶¼Õ¤ò¡£
-\layout Standard
-
-
-\begin_inset LatexCommand \tableofcontents{}
-
-\end_inset 
-
-
-\the_end
diff --git a/linphone/share/ja/manual.sgml b/linphone/share/ja/manual.sgml
deleted file mode 100644 (file)
index f36f0eb..0000000
+++ /dev/null
@@ -1,480 +0,0 @@
-<!doctype article public "-//OASIS//DTD DocBook V3.1//EN">
-
-<article lang="en">
-<!-- DocBook file was created by LyX 1.1
-  See http://www.lyx.org/ for more information -->
-  <artheader>
-   <title>
-   LINPHONE¥æ¡¼¥¶¡¼¥Þ¥Ë¥å¥¢¥ë
-  </title>
-  <author>
-   Simon Morlat (simon.morlat@linphone.org)
-   Ìõ¡§»³¸ýÁ±Ìé(yushiya@anet.ne.jp)
-  </author>
-  <date>
-   11-13-2001
-  </date>
-  </artheader>
-  <sect1>
-   <title>
-   ¤Ï¤¸¤á¤Ë
-  </title>
-  <para>
-   Linphone¤Ï¡¢¥·¥ó¥×¥ë¤Ê¥¤¥ó¥¿¡¼¥Í¥Ã¥ÈÅÅÏäǤ¢¤ê¡¢Æó¼Ô´Ö¤ÎÄÌÏäò¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Ê¤É¤ÎIPÌÖ¤òÄ̤¸¤Æ²Äǽ¤Ë¤¹¤ë¤â¤Î¤Ç¤¢¤ë¡£Linphone¤òµ¯Æ°¤¹¤ë¤Ë¤Ï°Ê²¼¤Î¤â¤Î¤¬É¬ÍפȤʤ롣
-  </para>
-  <itemizedlist>
-   <listitem>
-   <para>
-   Linux(BSD¤Î¤è¤¦¤Ê¾¤ÎUNIX¤Ç¤âµ¯Æ°¤¹¤ë¤À¤í¤¦¤¬¡¢Linux´Ä¶­¤Û¤É¾¤Î´Ä¶­¤Ï¥Æ¥¹¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¡£) 
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   gnome1.2°Ê¾å¤¬¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¤³¤È¡£É¬¤º¤·¤âµ¯Æ°¤·¤Æ¤¤¤ëɬÍפϤʤ¤¡£
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   ¥Ø¥Ã¥É¥Û¥ó¤«¥¹¥Ô¡¼¥«¡¼¡£
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   ¥µ¥¦¥ó¥É¥«¡¼¥É¤¬Àµ¤·¤¯ÀßÄꤵ¤ì¤Æ¤¤¤ë¤³¤È¡£ 
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   ¥Þ¥¤¥¯¥í¥Õ¥©¥ó 
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   ¥â¥Ç¥à¤ä¥¤¡¼¥µ¥Í¥Ã¥ÈÅù¤òÍѤ¤¤¿¡¢¥Í¥Ã¥È¥ï¡¼¥¯(¥¤¥ó¥¿¡¼¥Í¥Ã¥ÈÅù)¤Ø¤ÎÀܳ¡£ 
-   </para>
-  </listitem>
-  </itemizedlist>
-  <para>
-   ¤Ê¤ª¡¢Linphone¤òµ¯Æ°¤¹¤ëÁ°¤Ë¥ª¡¼¥Ç¥£¥ª¥Ç¥Ð¥¤¥¹¤ò»ÈÍѤ¹¤ë¤¹¤Ù¤Æ¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ò½ªÎ»¤·¤Æ¤ª¤¯¤Î¤¬¤è¤¤¤À¤í¤¦¡£
-  </para>
-  <para>
-   Linphone¤Ï¥Õ¥ê¡¼¥¦¥§¥¢¤Ç¤¢¤ê¡¢GNU Public Licence¤Ë½¾¤Ã¤ÆÇÛÉÛ¤µ¤ì¤ë¡£
-  </para>
-  <para>
-   ·Ù¹ð - Åö¥½¥Õ¥È¥¦¥§¥¢¤ÏÊݾڤʤ·¤ËÄ󶡤µ¤ì¤ë¤â¤Î¤Ç¤¢¤ë¡£¾Ü¤·¤¯¤ÏCOPYING¥Õ¥¡¥¤¥ë¤ò»²¾È¤µ¤ì¤¿¤¤¡£¤Ê¤ª¡¢Linphone¤Ï°Å¹æ²½¤òÍѤ¤¤Ê¤¤¤¿¤á¡¢°­°Õ¤¢¤ë¿Íʪ¤¬Íưפ˲»À¼¾ðÊó¤ò½¦¤¦¤³¤È¤¬¤Ç¤­¤ë¡£¤Ä¤Þ¤ê¡¢Linphone¤ÏÈëÌ©¤Î²ñÏäËÍѤ¤¤ë¤Ù¤­¤Ç¤Ï¤Ê¤¤¡£¤Þ¤¿¡¢Linphone¤Ï¥ë¡¼¥È¸¢¸Â¤Çµ¯Æ°¤·¤Ê¤¤¿ä¾©¤¹¤ë¡£
-  </para>
-  </sect1>
-  <sect1>
-   <title>
-   Linphone¤Îµ¯Æ°
-  </title>
-  <para>
-   Linphone¤Ï»°¤Ä¤ÎÊýË¡¤Çµ¯Æ°¤Ç¤­¤ë¡£
-  </para>
-  <itemizedlist>
-   <listitem>
-   <para>
-   Ä̾ï¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤È¤·¤Æ - Linphone¤Ï¡¢gnome¥á¥Ë¥å¡¼¤ÎÃæ¤Î¥Í¥Ã¥È¥ï¡¼¥¯¥µ¥Ö¥á¥Ë¥å¡¼¤Ë¸½¤ì¤ë¡£¤â¤·¡¢gnome¤òµ¯Æ°¤·¤Æ¤Ê¤¤¤Î¤Ç¤¢¤ì¤Ð¡¢Î㤨¤Ð¥¿¡¼¥ß¥Ê¥ë¤Ë&ldquo;linphone&rdquo;¤È¥¿¥¤¥×¤¹¤ë¤³¤È¤Ç¼Â¹Ô¤Ç¤­¤ë¡£Linphone¤¬µ¯Æ°¤·¤Æ¤¤¤Ê¤¤¤È¤­¤Ï¡¢ÅÅÏäò¼õ¤±¤ë¤³¤È¤Ï¤Ç¤­¤Ê¤¤¡£ 
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   gnome¥¢¥×¥ì¥Ã¥È¤È¤·¤Æ - gnome¥Ñ¥Í¥ë¤ò±¦¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¢¥Ñ¥Í¥ë¤ËLinphone¤òÄɲ乤뤳¤È¤¬¤Ç¤­¤ë¡£Linphone¤Ï¥Í¥Ã¥È¡¼¥ï¡¼¥¯¥á¥Ë¥å¡¼¤ÎÃæ¤Ë¤¢¤ë¡£¤Ò¤Ã¤½¤ê¤È¥Ñ¥Í¥ë¤ÎÃæ¤Çµ¯Æ°¤¹¤ë¤³¤È¤Ç¡¢Linphone¤Ï¡¢¤¿¤È¤¨¥¦¥¤¥ó¥É¥¦¤¬¸½¤ì¤Æ¤¤¤Ê¤¯¤Æ¤âÅÅÏäò¼õ¤±¤ë¤³¤È¤¬¤Ç¤­¤ë¡£¥á¥¤¥ó¥¦¥¤¥ó¥É¥¦¤Ëɽ¼¨¤µ¤»¤¿¤¤¤È¤­¤Ë¤Ï¡¢¥¢¥×¥ì¥Ã¥È¤ò¥¯¥ê¥Ã¥¯¤¹¤ì¤Ð¤è¤¤¡£ÅÅÏ䬤«¤«¤Ã¤Æ¤­¤¿¤È¤­¤Ë¤Ï¡¢¥á¥¤¥ó¥¦¥¤¥ó¥É¥¦¤¬É½¤ì¤Æ¡¢Ä̾ïÄ̤ê¤Ë¥Ù¥ë¤¬ÌĤäƤ¤¤ë¤Î¤¬Ê¹¤³¤¨¤ë¤À¤í¤¦¡£ 
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   ¤Ò¤Ã¤½¤ê¤È¥Ç¡¼¥â¥ó¤È¤·¤Æ - ¤³¤ì¤Ï¡¢Èógnome¥æ¡¼¥¶¡¼¤Î¤¿¤á¤Î¤â¤Î¤Ç¤¢¤ë¡£Î㤨¤Ðkde¤Ç¤Ï¡¢/home/user/.kde2/AutoStart¥Ç¥£¥ì¥¯¥È¥ê¤Ë¡¢¥í¥°¥¤¥ó»þ¤Ëµ¯Æ°¤·¤¿¤¤¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î¥ê¥ó¥¯¤òŽ¤ë¡£¤·¤¿¤¬¤Ã¤Æ¡¢¾å½Ò¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ë¥Õ¥¡¥¤¥ë¥Þ¥Í¡¼¥¸¥ã¡¼¤Ç°ÜÆ°¤·¡¢±¦¥¯¥ê¥Ã¥¯¤Ç¸½¤ì¤ë¥¢¥×¥ì¥Ã¥È¤«¤é¡¢¡Ö¥ê¥ó¥¯¤ÎÄɲáפò¼Â¹Ô¤¹¤ì¤Ð¤è¤¤¡£¤Ê¤ª¡¢µ¯Æ°¤¹¤ë¥³¥Þ¥ó¥É¤Ï¡¢&ldquo; linphone -deamon&rdquo;¤Ç¤¢¤ë¡£¤³¤Î¾ì¹ç¡¢Linphone¤Î¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤ò¸«¤ë¤³¤È¤Ï¤Ê¤¤¤¬¡¢É½¼¨¤µ¤»¤¿¤¤¤È¤­¤Ë¤Ï¥¿¡¼¥ß¥Ê¥ëÅù¤«¤éLinphone¤òµ¯Æ°¤µ¤»¤ë¤Î¤ÈƱÍͤ˥¿¥¤¥×¤¹¤ì¤Ð¤è¤¤¡£ 
-   </para>
-  </listitem>
-  </itemizedlist>
-  </sect1>
-  <sect1>
-   <title>
-   ÅÅÏäò¤«¤±¤ë
-  </title>
-   <sect2>
-    <title>
-    ´ðËÜŪ¤Ê¸¶Â§
-   </title>
-   <para>
-    ¡Ösip:¥æ¡¼¥¶¡¼Ì¾@¥Û¥¹¥È̾¡×¤Î¤è¤¦¤ÊSIP URL¤Ë¤è¤Ã¤Æ¶èÊ̤µ¤ì¤ë¡£SIP URL¤Ï¡¢Æ¬¤Î¡Ösip:¡×¤ò½ü¤±¤ÐÈó¾ï¤Ëe-mail¥¢¥É¥ì¥¹¤È»÷¤Æ¤¤¤ë¡£
-   </para>
-   <para>
-    ¥æ¡¼¥¶¡¼Ì¾¤Ï¡¢UNIX¥Þ¥·¥ó¤Î¥í¥°¥¤¥ó¥Í¡¼¥à¤Î¤è¤¦¤Ê¤â¤Î¤Ç¡¢¥Û¥¹¥È̾¤Ï¥æ¡¼¥¶¡¼¤¬Àܳ¤¹¤ë¥Þ¥·¥ó¤Î̾Á°¤äIP¥¢¥É¥ì¥¹¤Ç¤¢¤ë¡£
-   </para>
-   <para>
-    ¤Ê¤ª¡¢SIP¤Ï¥·¥ó¥×¥ë¤ËÀ߷פµ¤ì¤¿¿·¤·¤¤ÄÌ¿®¤Î¥×¥í¥È¥³¥ë¤Ç¤¢¤ê¡¢H323¤È¤Ï¤Þ¤Ã¤¿¤¯¸ß´¹À­¤¬¤Ê¤¤¤³¤È¤ËÃí°Õ¤µ¤ì¤¿¤¤¡£
-   </para>
-   </sect2>
-   <sect2>
-    <title>
-    »ÈÍÑÎã:Æó¿Í¤Î¥æ¡¼¥¶¡¼¤¬¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Ë¥â¥Ç¥à¤ÇÀܳ¤·¤Æ¤¤¤ë¤È¤­
-   </title>
-   <para>
-    ¤³¤ì¤Ï¡¢Ã±½ã¤Ê¼ê³¤­¤Ç¤¢¤ë¡£É¬ÍפȤµ¤ì¤ë¥Í¥Ã¥È¥ï¡¼¥¯¤Ï¡¢
-   </para>
-   <itemizedlist>
-    <listitem>
-    <para>
-    28k°Ê¾å¤Î¥â¥Ç¥à 
-    </para>
-   </listitem>
-   </itemizedlist>
-   <para>
-    ¤Ç¤¢¤ë¡£
-   </para>
-   <para>
-    ¥·¥Ê¥ê¥ª¤Ï¡¢°Ê²¼¤ÎÄ̤ê¤Ç¤¢¤ë¡£
-   </para>
-   <itemizedlist>
-    <listitem>
-    <para>
-    ¥Ü¥Ö¤Ï¥È¥à¤Ë21:00¤ËÅÅÏ乤뤳¤È¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£¥È¥à¤Ï¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Ëkppp¤ägppp¤äwmdial¤Ê¤É¤ÇÀܳ¤·¤Æ¤¤¤ë¡£ 
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    ¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤ËÀܳ¤·¤¿¤é¡¢¥Ü¥Ö¤ÏLinphone¤òµ¯Æ°¤Ç¤­¤ë¡£kppp¤ägppp¤Ê¤É¤ÎÅý·×¥Ü¥Ã¥¯¥¹¤ò³«¤¤¤Æ¡¢¥Ü¥Ö¤Ï¼«Ê¬¤ÎIP¥¢¥É¥ì¥¹¤òÃΤ뤳¤È¤¬¤Ç¤­¤ë¡£(/sbin/ifconfig¤ò»È¤ï¤Ê¤¯¤Æ¤â³Îǧ¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë)¡£ 
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    ¼¡¤Ë¡¢¥È¥à¤Ï¥Ü¥Ö¤Ë¡ÖËͤÎIP¥¢¥É¥ì¥¹¤Ï¡¢xxx.xxx.xxx.xxx¤À¤è¡£¡×¤È¤¤¤¦ÆâÍÆ ¤Îe¥á¡¼¥ë¤òÁ÷¤ë¡£ 
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    ¤½¤Î¤¹¤°¤¢¤È¤Ç¡¢¥È¥à¤Î²È¤ÎLinphone¤Î¥Ù¥ë¤¬ÌĤ롣¤½¤Î¤È¤­¡¢¥Ü¥Ö¤Ë¤â¸þ¤³¤¦¤Ç¥Ù¥ë¤¬ÌĤäƤ¤¤ë¤Î¤¬Ê¬¤«¤ë¤è¤¦¤Ë¥Ù¥ë¤Î²»¤¬Ê¹¤³¤¨¤ë¡£¤½¤³¤Ç¡¢¥È¥à¤¬ÅÅÏä˽Ф뤿¤á¤Ë¡ÖÅÅÏäò¤È¤ë¡×¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤À¤±¤Ç¤è¤¤¡£¤½¤¦¤¹¤ì¤Ð¡¢¸ß¤¤¤Ë²ñÏ䬤Ǥ­¤ë¤Ï¤º¤Ç¤¢¤ë¡£ 
-    </para>
-   </listitem>
-   </itemizedlist>
-   <para>
-    ÌäÂ꤬¤¢¤Ã¤¿¤é¡¢Âè4Àá¤ÎÌäÂê¤ò»²¾È¤·¤ÆÍߤ·¤¤¡£
-   </para>
-   </sect2>
-   <sect2>
-    <title>
-    ¥Æ¥¹¥È¤Î»î¹Ô - ¸½ºß(Î㤨¤Ð¿¼Ìë¤Ê¤É¤Ç)ÅÅÏäò¤«¤±¤ëͧ¿Í¤¬¤¤¤Ê¤¤¤¬¡¢Linphone¤¬ËÜÅö¤ËÆ°¤¤¤Æ¤¤¤ë¤«¤É¤¦¤«ÃΤꤿ¤¤¤È¤­
-   </title>
-   <para>
-    <anchor id="sipomatic" ></anchor>¥Ð¡¼¥¸¥ç¥ó3.0¤«¤é¤Ï¡¢Linphone¤Ë¤Ï¡Ösiptomatic¡×¤È¤¤¤¦¥×¥í¥°¥é¥à¤¬ÉÕ°¤·¤Æ¤¤¤ë¡£¤³¤ì¤Ï¡¢°Ê²¼¤Î¼ê½ç¤Ç»ÈÍѤǤ­¤ë¡£
-   </para>
-   <itemizedlist>
-    <listitem>
-    <para>
-    siptomatic¤ò¥¿¡¼¥ß¥Ê¥ë¤«¤éµ¯Æ°¤¹¤ë¡£siptomatic¤Ï¥°¥é¥Õ¥£¥«¥ë¥¤¥ó¥¿¡¼¥Õ¥§¥¤¥¹¤òÈ÷¤¨¤Æ¤¤¤Ê¤¤¤¬¡¢¶Ã¤«¤Ê¤¤¤ÇÍߤ·¤¤¡£Áê¸ßŪ¤Ê¤ä¤ê¤È¤ê¤ò¤¹¤ëɬÍפ¬¤Ê¤¤¤«¤é¤Ç¤¢¤ë¡£ 
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Linphone¤Î¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤Î¥¿¥Ö¤«¤é¡¢¡Ölo¡×¤ò¥Ç¥Õ¥©¥ë¥È¤Î¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ë·èÄꤷ¡¢Êѹ¹¤òOK¤ò¥¯¥ê¥Ã¥¯¤·¤ÆŬÍѤ¹¤ë¡£ 
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    ¡Ösip:robot@127.0.0.1:5064¡×¤È¤¤¤¦SIP URL¤ò¥á¥¤¥ó¥¦¥¤¥ó¥É¥¦¤ËÆþÎϤ¹¤ë¡£127.0.0.1¤Ï¡¢¤¢¤Ê¤¿¤Î¥³¥ó¥Ô¥å¡¼¥¿¡¼¤Î ¥í¡¼¥«¥ë¥¢¥É¥ì¥¹¤Ç¡¢robot¤Ïsipomatic¤ËÅÅÏäò¤«¤±¤ëºÝ¤Î̾Á°¤Ç¤¢¤ë¡£5064¥Ý¡¼¥È¤¬¡¢sipomatic¤ËÀܳ²Äǽ¤Ê¥Ý¡¼¥È¤Ç¤¢¤ë¡£Ä̾ï¤ÏÅÅÏäò¤«¤±¤ë¤Î¤Ë5060È֥ݡ¼¥È¤òÍѤ¤¤ë¤¬¡¢sipomatic¤ÏÎã³°¤Ç5064È֥ݡ¼¥È¤Çµ¯Æ°¤·¤Æ¤¤¤ë¡£¤³¤ì¤Ï¡¢Linphone¤¬¤¹¤Ç¤Ë5060È֥ݡ¼¥È(¤¹¤Ê¤ï¤Á¡¢¥Ý¡¼¥È¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¥Ç¥Õ¥©¥ë¥È¤Î¥Ý¡¼¥È¤È¤·¤Æ)¤Çµ¯Æ°¤·¤Æ¤¤¤ë¤«¤é¤Ç¤¢¤ê¡¢Æ±¤¸¥Ý¡¼¥È¤ò»È¤¦2¤Ä¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤òƱ»þ¤ËƱ¤¸¥³¥ó¥Ô¥å¡¼¥¿¡¼¤Çµ¯Æ°¤¹¤ë¤³¤È¤¬¤Ç¤­¤Ê¤¤¤«¤é¤Ç¤¢¤ë¡£
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    ¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¢¿ôÉøå¤Ësiptomatic¤¬¤¢¤Ê¤¿¤ÎÅÅÏäËÊÖÅú¤·¡¢Ã»¤¤¥¢¥Ê¥¦¥ó¥¹¤¬Ê¹¤³¤¨¤ë¤À¤í¤¦¡£ 
-    </para>
-   </listitem>
-   </itemizedlist>
-   </sect2>
-  </sect1>
-  <sect1 id="params">
-   <title>
-   ÅÅÏäΥѥé¥á¡¼¥¿¡¼
-  </title>
-   <sect2 id="paramnetwork">
-    <title>
-    ¥Í¥Ã¥È¥ï¡¼¥¯
-   </title>
-   <itemizedlist>
-    <listitem>
-    <para>
-    ¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Î¥ê¥¹¥È - ¤¢¤Ê¤¿¤Ï¡¢Linphone¤Ë»È¤¦¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤òÁª¤ÖɬÍפ¬¤¢¤ë¡£¤â¤·¡¢¥¤¥ó¥¿¡¼¥Í¥Ã¥È¾å¤Î狼¤ËÏ¢Íí¤ò¤·¤¿¤¤¤Î¤Ê¤é¡¢¤¢¤Ê¤¿¤Î¥³¥ó¥Ô¥å¡¼¥¿¡¼¤¬¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤ËÀܳ¤·¤Æ¤¤¤ë¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤òÁª¤Ö¤Ù¤­¤Ç¤¢¤ë¡£²¿¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤Ë¤â¤Ä¤Ê¤¬¤Ã¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢¡Ölo¡×¤È¸Æ¤Ð¤ì¤ë¥í¡¼¥«¥ë¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤À¤±¤¬¥ê¥¹¥È¤Ë¸½¤ì¤ë¤À¤í¤¦¡£¤½¤ì¤Ï¡¢siptomatic¤ËÅÅÏäò¤¹¤ë¤³¤È¤À¤±¤¬¤Ç¤­¤ë¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ç¤¢¤ë¡£ 
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Àܳ¤Î¥¿¥¤¥× - »È¤¤¤¿¤¤¥Í¥Ã¥È¥ï¡¼¥¯¤Ø¤ÎÀܳ¤ÎÊýË¡¤òÁªÂò¤¹¤ë(ÂçÄñ¤Î¾ì¹ç¤Ï¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Ç¤¢¤ë)¡£¤³¤ì¤Ï¡¢Linphone¤¬¤¢¤Ê¤¿¤ÎÂÓ°è¤òÀßÄꤹ¤ë¤Î¤òÊä½õ¤¹¤ë¤¿¤á¤Ç¤¢¤ë¡£ 
-    </para>
-   </listitem>
-   </itemizedlist>
-   </sect2>
-   <sect2 id="paramrtp">
-    <title>
-    RTP
-   </title>
-   <para>
-    RTP(Real Time Protocol)¤Ï¡¢¥á¥Ç¥£¥¢¥¹¥È¥ê¡¼¥à¤ò¥Í¥Ã¥È¥ï¡¼¥¯±Û¤·¤ËÁ÷¿®¤¹¤ëºÝ¤ËÍѤ¤¤ë¥×¥í¥È¥³¥ë¤Ç¤¢¤ë¡£
-   </para>
-   <itemizedlist>
-    <listitem>
-    <para>
-    RTP¥Ý¡¼¥È - Linphone¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤Ç²»À¼¥Ç¡¼¥¿¤ÎÁ÷¼õ¿®¤Ë7000È֥ݡ¼¥È¤òÍøÍѤ¹¤ë¡£7000È֥ݡ¼¥È¤¬Â¾¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ë»È¤ï¤ì¤Æ¤¤¤ë¤È»×¤ï¤ì¤ë¾ì¹ç¤Ë¤Ï¡¢Ç¤°Õ¤Î¥Ý¡¼¥È¤ËÊѹ¹¤¹¤ë¡£
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    ¥Ð¥Ã¥Õ¥¡¤¹¤ë¥ß¥êÉà- ¤³¤Î¿ô»ú¤Ï¡¢Linphone¤¬ºÆÀ¸¤òÂÔµ¡¤¹¤ë²»À¼¥Ñ¥±¥Ã¥È¤Î¿ô¤òɽ¤·¤Æ¤¤¤ë¡£²»À¼¥Ñ¥±¥Ã¥È¤¬Á÷¤ì¤¬¤Á¤Ê¾ì¹ç¤Ë¡¢ºÆÀ¸¤µ¤ì¤º¤ËÇË´þ¤µ¤ì¤ë²»À¼¥Ñ¥±¥Ã¥È¤ò¸º¤é¤¹¤³¤È¤¬¤Ç¤­¤ë¡£¡ÖÅÓÀÚ¤ìÅÓÀڤ첻¡×¤¬Ê¹¤³¤¨¤ë¾ì¹ç¡¢¤³¤ÎÃͤòÂ礭¤¯¤¹¤ë¤ÈÅÁÁ÷¤Î¸úΨ¤ò¾å¤²¤ë¤³¤È¤¬¤Ç¤­¤ë¤¬¡¢²»À¼¤ÎÃٱ䤬Â礭¤¯¤Ê¤ë(Áê¼ê¤ÎÀ¼¤¬¾¯¤·ÃÙ¤ì¤Æʹ¤³¤¨¤ë)¡£¤æ¤¨¤Ë¡¢¥Í¥Ã¥È¥ï¡¼¥¯¤¬´°Á´¤Ç¹âÉʼÁ¤Î¥ª¡¼¥Ç¥£¥ª¥É¥é¥¤¥Ð¤ò»ÈÍѤ·¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢¤³¤ÎÃͤò3¥Ñ¥±¥Ã¥È¤Ë²¼¤²¤ì¤Ðû¤¤ÃÙ±ä»þ´Ö¤ÇÏ令ë¤è¤¦¤Ë¤Ê¤ë¡£
-    </para>
-   </listitem>
-   </itemizedlist>
-   </sect2>
-   <sect2 id="paramsip">
-    <title>
-    SIP
-   </title>
-   <para>
-    SIP(Session Initiation Protocol)¤Ï¡¢¥Í¥Ã¥È¥ï¡¼¥¯±Û¤·¤Ë¥á¥Ç¥£¥¢¤Î¥»¥Ã¥·¥ç¥ó¤ò³ÎΩ¤¹¤ë¥×¥í¥È¥³¥ë¤Ç¤¢¤ë¡£¤Ä¤Þ¤ê¤Ï¡¢¥ê¥â¡¼¥È¥æ¡¼¥¶¡¼´Ö¤Î²ñÏäò³«»Ï¤·¤¿¤ê¡¢ÊÒÊý¤¬ÅÅÏäòÀڤ俤Ȥ­¤Ë²ñÏäò½ªÎ»¤·¤¿¤ê¤¹¤ë¥×¥í¥È¥³¥ë¤Ç¤¢¤ë¡£
-   </para>
-   <itemizedlist>
-    <listitem>
-    <para>
-    SIP¥Ý¡¼¥È - Linphone¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤ÇSIP¥Ñ¥±¥Ã¥È¤ÎÁ÷¼õ¿®¤Ë5060È֥ݡ¼¥È¤òÍѤ¤¤ë¡£SIP¤Î¥Ý¡¼¥È¤Ï¡¢RFC¤Ë5060ÈÖ¤òÍѤ¤¤ë¤³¤È¤¬¶¯¤¯¿ä¾©¤µ¤ì¤Æ¤¤¤ë¡£¤è¤Ã¤Æ¡¢²¿¤ò¤·¤¿¤¤¤Î¤«¤òÌÀ³Î¤ËÍý²ò¤·¤Æ¤¤¤ë¤È¤­¤ò½ü¤¤¤Æ¤Ï¡¢¤³¤ì¤òÊѹ¹¤¹¤Ù¤­¤Ç¤Ï¤Ê¤¤¡£
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    SIP¤ÎÅÐÏ¿¤Ë¤¹¤ë - ¥ê¥â¡¼¥È¤ÎSIP¥µ¡¼¥Ð¡¼¤ËÅÐÏ¿¤¹¤·¤¿¤¤¤È¤­¤Ë¤Ï¡¢¤³¤Î¥Ü¥¿¥ó¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£SIP¥µ¡¼¥Ð¡¼¤Î¥µ¡¼¥Ó¥¹¤Ë¤Ï¡¢Å¾Á÷¤ä¥¢¥¦¥È¥Ð¥¦¥ó¥É¥×¥í¥¯¥·¤¬¤¢¤ë¡£¾Ü¤·¤¯¤Ï¡¢¡Ö¥ê¥â¡¼¥È¤Î¥µ¡¼¥Ð¡¼¤ËÀܳ¤¹¤ë¡×¤ÎÀá¤ò»²¾È¤µ¤ì¤¿¤¤¡£ 
-    </para>
-   </listitem>
-   </itemizedlist>
-   </sect2>
-   <sect2 id="paramcodec">
-    <title>
-    ¥³¡¼¥Ç¥Ã¥¯
-   </title>
-   <para>
-    ¥³¡¼¥Ç¥Ã¥¯¤È¤Ï¡¢Æä˲»À¼¥Ç¡¼¥¿¤Î°µ½Ì¤Î¤¿¤á¤ËÀ߷פµ¤ì¤¿¥¢¥ë¥´¥ê¥º¥à¤Î¤³¤È¤ò¸À¤¦¡£Î㤨¤Ð¡¢16bit/8000Hz¤Î¥Ç¥¸¥¿¥ë²½¤µ¤ì¤¿²»À¼¤È¸À¤¨¤Ð¡¢128kbit/ÉäΥǡ¼¥¿¤Îή¤ì¤òɽ¤·¤Æ¤¤¤ë¡£GSM¥Ü¥³¡¼¥À¡¼¤ò»ÈÍѤ¹¤ë¤È¡¢¤³¤ì¤Ï13bit kbit/Éä˽̾®¤µ¤ì¤ë¡£
-   </para>
-   <itemizedlist>
-    <listitem>
-    <para>
-    ¥³¡¼¥Ç¥Ã¥¯¤ÎÁªÂò - Linphone¤Ï¿ô¼ïÎà¤Î¥³¡¼¥Ç¥Ã¥¯¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤ë¡£ ¥³¡¼¥Ç¥Ã¥¯¤Î¥ê¥¹¥È¤Î²¼Éô¤Ë¤¢¤ë¥Ü¥¿¥ó¤ò»È¤¦¤È¡¢»È¤¤¤¿¤¤½çÈÖ¤Ëʤ٤뤳¤È¤¬¤Ç¤­¤ë¡£¤À¤¬¡¢¥Í¥Ã¥È¥ï¡¼¥¯Àܳ¤Î¥¿¥¤¥×¤Ë¤è¤Ã¤Æ¤Ï(¥Í¥Ã¥È¥ï¡¼¥¯¤ÎÀá¤ò»²¾È)¡¢»È¤¨¤Ê¤¤¥³¡¼¥Ç¥Ã¥¯¤Î¼ïÎà¤â¡¢»ÈÍѤ¹¤ë¤«¤É¤¦¤«¤ò·èÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤ë¡£ 
-    </para>
-   </listitem>
-   </itemizedlist>
-   </sect2>
-   <sect2 id="paramaudio">
-    <title>
-    ¥ª¡¼¥Ç¥£¥ª¥Ñ¥é¥á¡¼¥¿¡¼
-   </title>
-   <para>
-    ¤³¤ÎÀá¤Ç¤Ï¡¢²»À¼µ»½Ñ¤Ë´Ø¤¹¤ë¥Ñ¥é¥á¡¼¥¿¡¼¤ò²òÀ⤹¤ë¡£
-   </para>
-   <itemizedlist>
-    <listitem>
-    <para>
-    ¥É¥é¥¤¥Ð¤ÎÁªÂò - Linux¤Ç¤Ï¡¢OSS(¥«¡¼¥Í¥ë¥É¥é¥¤¥Ð¡¼¤È¤â¸Æ¤Ð¤ì¤ë)¤ÈALSA¤È¡¢°Û¤Ê¤ë2¼ïÎà¤Î¥µ¥¦¥ó¥É¥«¡¼¥É¥é¥¤¥Ð¤ò»ÈÍѤ¹¤ë¤³¤È¤¬¤Ç¤­¤ë¤¬¡¢ALSA¥É¥é¥¤¥Ð¤ÏALSA¥é¥¤¥Ö¥é¥ê¤òÄ̤¹¤³¤È¤Ç¡¢¤µ¤é¤Ê ¤ë¥Ñ¥Õ¥©¡¼¥Þ¥ó¥¹¤òȯ´ø¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£¤·¤¿¤¬¤Ã¤Æ¡¢ALSA¥É¥é¥¤¥Ð¡¼(snd_*¤Ç»Ï¤Þ¤ë̾Á°¤Ç¤¢¤ë)¤ò»ÈÍѤ·¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢ALSA¥â¡¼¥É¤òÁªÂò¤¹¤ë¤Î¤¬¤è¤¤¡£Ê¬¤«¤é¤Ê¤±¤ì¤Ð¡¢OSS¤òÁªÂò¤¹¤ë¡£
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Auto-kill¥ª¥×¥·¥ç¥ó - ¤³¤Î¥ª¥×¥·¥ç¥ó¤ò»È¤¦¤È¡¢linphone¤Ï¥µ¥¦¥ó¥É¥Ç¡¼¥â¥ó(esd¤Èartsd)¤òÄä»ß¤·¤è¤¦¤È¤¹¤ë¡£¤³¤ì¤Ï¡¢¥ª¡¼¥Ç¥£¥ª¥Ç¥Ð¥¤¥¹¤Ë¹±µ×Ū¤Ê¼è¤ê³°¤»¤Ê¤¤¥í¥Ã¥¯¤ò¤«¤±¤Æ¤·¤Þ¤¤¡¢Linphone¤¬É¬ÍפȤ·¤Æ¤¤¤ë¥ª¡¼¥Ç¥£¥ª¥Ç¥Ð¥¤¥¹¤ò¥ª¡¼¥×¥ó¤µ¤»¤Ê¤¤¤è¤¦¤Ë¤¹¤ë¤â¤Î¤Ç¤¢¤ë¡¢¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï¡¢¥ª¥ó¤Ë¤·¤Æ¤ª¤¯¤³¤È¤ò¿ä¾©¤¹¤ë¡£ 
-    </para>
-   </listitem>
-   </itemizedlist>
-   </sect2>
-  </sect1>
-  <sect1>
-   <title>
-   ÅÅÏÃÄ¢
-  </title>
-  <para>
-   ÅÅÏÃÄ¢(conection¤Î¥á¥Ë¥å¡¼¤ÎÃæ¤Ë¤¢¤ë)¤ò»È¤¦¤È¡¢SIP¥¢¥É¥ì¥¹¤òµ­²±¤È¸Æ½Ð¤·¤¬¤Ç¤­¤ë¡£SIP¥¢¥É¥ì¥¹¤Ï¡¢sip:¥æ¡¼¥¶¡¼Ì¾@¥É¥á¥¤¥ó̾¤Î·Á¼°¤Ç¤¢¤ë¡£¤Þ¤¿¡¢¼«Ê¬¤¬Ê¬¤«¤ê¤ä¤¹¤¯¤¹¤ë¤¿¤á¤Ë¡¢É½¼¨¤µ¤ì¤ë̾Á°¤òÄɲ乤뤳¤È¤â¤Ç¤­¤ë¡£SIP¥¢¥É¥ì¥¹¤ò¸Æ¤Ó½Ð¤¹¤Ë¤Ï¡¢¥¢¥É¥ì¥¹¤Î¥ê¥¹¥È¤«¤éÁªÂò¤·¡¢¡ÖOK¡×¤Î¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¡£¤¹¤ë¤È¡¢ÁªÂò¤·¤¿¥¢¥É¥ì¥¹¤¬¥á¥¤¥ó¥¦¥¤¥ó¥É¥¦¤Ë¸½¤ì¤ë¤Î¤¬³Îǧ¤Ç¤­¤ë¤À¤í¤¦¡£¸å¤Ï¡¢ÅÅÏäò¤«¤±¤ë¤¿¤á¤Ë¡ÖÅÅÏäò¤«¤±¤ë¡×¤Î¥Ü¥¿¥ó¤ò²¡¤»¤Ð¤è¤¤¤À¤±¤Ç¤¢¤ë¡£
-  </para>
-  </sect1>
-  <sect1>
-   <title>
-   SIP¥µ¡¼¥Ð¡¼¤ËÅÐÏ¿¤¹¤ë
-  </title>
-  <para>
-   ¥ê¥â¡¼¥È¤ÎSIP¥µ¡¼¥Ð¡¼¤Î¥µ¡¼¥Ó¥¹¤ËÅÐÏ¿¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¢¤ë¡£¤³¤Î¤è¤¦¤Ê¥µ¡¼¥Ó¥¹¤Ë¤Ï¡¢°Ê²¼¤Î¤è¤¦¤Ê¤â¤Î¤¬¤¢¤ë¡£
-  </para>
-  <itemizedlist>
-   <listitem>
-   <para>
-   Å¾Á÷ - Linphon¤Ï¡¢¥µ¡¼¥Ð¡¼¤Ë&lt;sip:example_registrar.com&gt;¤Î¤è¤¦¤ÊSIP¥¢¥«¥¦¥ó¥È¤òºîÀ®¤¹¤ë¤è¤¦Í×ÀÁ¤¹¤ë¡£Î㤨¤Ð¡¢56k¤Î¥â¥Ç¥à¤ò»È¤Ã¤Æñ½ã¤Ë¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤ËÀܳ¤·¤Æ¤¤¤ë¾ì¹ç¡¢¤¢¤Ê¤¿¤ÎIP¥¢¥É¥ì¥¹¤ÏÀÅŪ¤Ç¤Ï¤Ê¤¯¡¢¥Í¡¼¥à¥µ¡¼¥Ð¡¼¤ËÃΤé¤ì¤Æ¤¤¤ë¥Û¥¹¥È̾¤â»ý¤Ã¤Æ¤¤¤Ê¤¤¡£¤³¤ì¤Ç¤Ï¡¢Í§Ã£¤Ï¤¢¤Ê¤¿¤¬IP¥¢¥É¥ì¥¹¤òÄÌÃΤ¹¤ë¥á¡¼¥ë¤òÁ÷¤é¤Ê¤¤¸Â¤ê¡¢¤¢¤Ê¤¿¤ËÏ¢Íí¤ò¤¹¤ë¤³¤È¤¬¤Ç¤­¤Ê¤¤¡£Îã¤È¤·¤Æ¡¢&lt;sip:example_registrar.com&gt;¤ËÅÐÏ¿¤ò¹Ô¤¦¤Î¤Ï´Êñ¤Ç¤¢¤ë¡£¤¢¤Ê¤¿¤Î¥æ¡¼¥¶¡¼Ì¾¤Ï¡Öbob¡×¤À¤È¤¹¤ë¡£¥µ¡¼¥Ð¡¼¤ËÅÐÏ¿¤¹¤ëºÝ¤Ë¡¢Linphone¤Ï¤¢¤Ê¤¿¤ÎIP¥¢¥É¥ì¥¹¤ò¥µ¡¼¥Ð¡¼¤ËÁ÷¿®¤·¡¢¥¢¥«¥¦¥ó¥È¡Ösip:bob@example_registrar.com¡×¤¬ºîÀ®¤µ¤ì¤ë¡£¤½¤¦¤¹¤ë¤È¡¢¤¢¤Ê¤¿¤Îͧã¤Î¥¸¥à¤Ï¡¢&lt;sip:bob@example_registrar.com&gt;¤È¤¤¤¦¥¢¥É¥ì¥¹¤ËÅÅÏäò¤«¤±¤ë¤³¤È¤¬¤Ç¤­¤ë¡£ÅöÁ³¤Î¤³¤È¤Ê¤¬¤é¡¢&ldquo;example_registar.com&rdquo;¤Ï¡¢¥¦¥§¥ë¥Î¥ó¡¦¥É¥á¥¤¥ó¥Í¡¼¥à¤Ç¤¢¤ë¡£¼¡¤Ë¡¢¥¸¥à¤ÎLinphone¤Ï¥Ü¥Ö¤Î³Î¼Â¤Ê¥í¥±¡¼¥·¥ç¥ó¤ò¼¨¤¹Å¾Á÷¥á¥Ã¥»¡¼¥¸¤ò¼õ¤±¼è¤ë¡£¤½¤¦¤·¤Æ¡¢¥Ü¥Ö¤Î²È¤Ç¥Ù¥ë¤¬ÌĤë¤Î¤Ç¤¢¤ë¡£
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   ¥×¥í¥¯¥· - ¤³¤ì¤â¡¢Å¾Á÷¥á¥Ã¥»¡¼¥¸¤¬¥¸¥à¤ÎÅÅÏäËÁ÷¿®¤µ¤ì¤Ê¤¤¤³¤È¤ò¤Î¤¾¤±¤Ð¡¢Æ±Íͤθ¶Íý¤Ç¤¢¤ë¡£¤½¤ÎÂå¤ï¤ê¤Ë¡¢¥×¥í¥¯¥·¤Ï¥Ü¥Ö¤ÎLinphone¤Þ¤Ç¥À¥¤¥ì¥¯¥È¤ÊžÁ÷¤ò¹Ô¤¦¡£ 
-   </para>
-  </listitem>
-  </itemizedlist>
-  <para>
-   ¤³¤Î¤è¤¦¤ÊÅÐÏ¿¤Ï¡¢¥¢¥¦¥È¥Ð¥¦¥ó¥É¥×¥í¥¯¥·¤Ë¤ª¤¤¤Æ¤âƱÍͤ˹Ԥï¤ì¤ë¡£¤³¤ì¤Ï¡¢Linphone¤ò¥Õ¥¡¥¤¥ä¡¼¥¦¥©¡¼¥ë¤ÎÃæ¤Ç»È¤¦¤È¤­¤ËÍ­¸ú¤Ç¤¢¤ë¡£¥¢¥¦¥È¥Ð¥¦¥ó¥É¥×¥í¥¯¥·¤Ï¡¢¥×¥é¥¤¥Ù¡¼¥È¥µ¥Ö¥Í¥Ã¥È¤Ë¤¢¤ëHTTP¥×¥í¥¯¥·¤ÈƱÍͤÎÌò³ä¤ò²Ì¤¿¤¹¡£³°Éô¤Ø¤Î²ñÏäϥ¢¥¦¥È¥Ð¥¦¥ó¥É¥×¥í¥¯¥·¤¬°·¤¤¡¢¥Í¥Ã¥È¥ï¡¼¥¯³°¤Ë¤¤¤ë¤È»×¤ï¤ì¤ë¿Í¤Ø¤Î²ñÏäΞÁ÷¤ÎǤ¤òÉ餦¡£
-  </para>
-  <para>
-   ÅÐÏ¿¥µ¡¼¥Ð¡¼¤òLinphone¤Ç»È¤¦¤Ë¤Ï¡¢¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤«¤éSIP¤Î¥¿¥Ö¤òÁªÂò¤·¡¢¡ÖSIP¥¢¥É¥ì¥¹¤òÅÐÏ¿¤¹¤ë¡×¤Î¥Ü¥Ã¥¯¥¹¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£ÅÐÏ¿¤¹¤ë¥¢¥É¥ì¥¹¤òŬÀڤʥե£¡¼¥ë¥É¤ËÆþÎϤ·¤¿¤é¡¢¼¡¤Ë¡¢Å¾Á÷¤«¥×¥í¥¯¥·¤«¡¢Âбþ¤¹¤ë¥Ü¥Ã¥¯¥¹¤ò¥Á¥§¥Ã¥¯¤·¡¢ÅÐÏ¿¤òÍ׵᤹¤ë¥µ¡¼¥Ó¥¹¤Î¥¿¥¤¥×¤òÁªÂò¤¹¤ë¡£¤Þ¤¿¡¢³°Éô¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤Ø²ñÏäòÆ©²á¤µ¤»¤ë¤¿¤á¤ÎÅÐÏ¿¥µ¡¼¥Ð¡¼¤¬É¬ÍפʤȤ­¤Ë¤Ï¡¢¡Ö¥¢¥¦¥È¥Ð¥¦¥ó¥É¥×¥í¥¯¥·¤È¤·¤Æ»È¤¦¡×¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£
-  </para>
-  <para>
-   ºÇ¸å¤Ë¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤ÎOK¥Ü¥¿¥ó¤ò²¡¤¹¤È¡¢¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤ÏÊĤ¸¤é¤ì¡¢¤¿¤À¤Á¤ËÅÐÏ¿¥µ¡¼¥Ð¡¼¤Ë¤¢¤Ê¤¿¤ÎÀµ³Î¤Ê¾ì½ê¤òÃΤ餻¤ë¤¿¤á¤Î¸ò¾Ä¤¬»Ï¤Þ¤ë¡£Linphone¤ò¥·¥ã¥Ã¥È¥À¥¦¥ó¤¹¤ë¤È¤­¤Ë¤Ï¡¢ÅÐÏ¿¥µ¡¼¥Ð¡¼¤«¤é¤¢¤Ê¤¿¤Î¾ì½ê¤ÎÅÐÏ¿¤ò²ò½ü¤¹¤ë¤¿¤á¡¢¿ôÉô֤«¤«¤ë¡£
-  </para>
-  <para>
-   ¥Ñ¥Ö¥ê¥Ã¥¯¤ÊÅÐÏ¿¥µ¡¼¥Ð¡¼¤Î¥ê¥¹¥È¤Ï¡¢°Ê²¼¤Ë·ÇºÜ¤µ¤ì¤Æ¤¤¤ë¡£<ulink url="http://www.cs.columbia.edu/~hgs/sip/servers.html">http://www.cs.columbia.edu/~hgs/sip/servers.html</ulink>
-  </para>
-  <para>
-   ¤À¤¬¡¢»ÄÇ°¤Ê¤³¤È¤Ë¡¢¤³¤ì¤é¤Î¥µ¡¼¥Ð¡¼¤Î¿¤¯¤Ï¤â¤¦Æ°¤¤¤Æ¤¤¤Ê¤¤¡£¤ª¤½¤é¤¯¡¢¶áº¢¤ÎÅŵ¤ÄÌ¿®¶È³¦¤Î´íµ¡¤Ë¤è¤ë¤â¤Î¤Ç¤¢¤í¤¦¡£Â¾¤ÎɬÍפȤµ¤ì¤ëǧ¾ÚÊýË¡¤Ï¡¢¸½ºßLinphone¤Ç¤Ï¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
-  </para>
-  <para>
-   ÌµÍѤʼê´Ö¤òÈò¤±¤¿¤¤¤È¤­¤Ë¤Ï¡¢»ÈÍѲÄǽ¤ÊÆ°ºî¤·¤Æ¤¤¤ë¥Ñ¥Ö¥ê¥Ã¥¯¤ÊSIP¥µ¡¼¥Ð¡¼¤Î¥ê¥¹¥È¤¬¡¢Linphoe¤Î°ÊÁ°¤ÎWEB¥µ¥¤¥È¤Î¥ê¥¹¥È¤¬<ulink url="http://simon.morlat.free.fr/english/servers.html">http://simon.morlat.free.fr/english/servers.html</ulink>¤Ç»²¾È¤Ç¤­¤ë¡£
-  </para>
-  </sect1>
-  <sect1>
-   <title>
-   ¥Õ¥¡¥¤¥ä¡¼¥¦¥©¡¼¥ë¤ÎÆ⦤Ç
-  </title>
-  <para>
-   ¸½ºß¤Ç¤Ï¡¢SIP¥×¥í¥¯¥·¤òÍѤ¤¤ë¤³¤È¤Ç¡¢Linphone¤Ï¥Õ¥¡¥¤¥ä¡¼¥¦¥©¡¼¥ë¤ÎÆ⦤ÇÍøÍѲÄǽ¤Ç¤¢¤ë¡£SIP¥µ¡¼¥Ð¡¼¤Ï¡¢¥×¥é¥¤¥Ù¡¼¥È¥Í¥Ã¥È¥ï¡¼¥¯¤«¤é¤Î²ñÏäò³°Éô¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤ØžÁ÷¤¹¤ëǤ¤òÉ餦¡£oSIP¥é¥¤¥Ö¥é¥ê¤òÍøÍѤ·¤¿SIP¥×¥í¥¯¥·¤Ï¡¢<ulink url="http://osipproxy.sourceforge.net">http://osipproxy.sourceforge.net</ulink>¤Ç³«È¯¤µ¤ì¤Æ¤¤¤ë¡£
-  </para>
-  <para>
-   SIP¤ÎÀá¤Î¡¢¡ÖSIP¤ËÅÐÏ¿¤¹¤ë¡×¤Î¹àÌܤò»²¹Í¤Ë¡¢¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤ÇÍѤ¤¤ëSIP¥×¥í¥¯¥·¤ò»ØÄꤷ¤ÆÍߤ·¤¤¡£ÀßÄꤹ¤ë¤Ë¤Ï¡¢SIP¥×¥í¥¯¥·¤Î¥¢¥É¥ì¥¹¤òÆþÎϤ·¡¢¡Ö¥¢¥¦¥È¥Ð¥¦¥ó¥É¥×¥í¥¯¥·¤È¤·¤ÆÅÐÏ¿¤¹¤ë¡×¤Î¥Ü¥¿¥ó¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£
-  </para>
-  <para>
-   ¤Ê¤ª¡¢SIP¥×¥í¥¯¥·¤¬É¬Íפʤ¤¾ì¹ç¤â¤¢¤ë¡£¥Ñ¥Ö¥ê¥Ã¥¯¥¢¥É¥ì¥¹¤ò»ý¤Ã¤Æ¤¤¤ë¥Í¥Ã¥È¥ï¡¼¥¯²¼¤Ë¤¢¤Ê¤¿¤Î¥³¥ó¥Ô¥å¡¼¥¿¡¼¤¬¤¢¤ê¡¢¥Õ¥¡¥¤¥ä¡¼¥¦¥©¡¼¥ë¤Ï³°Éô¥Í¥Ã¥È¥ï¡¼¥¯¤«¤é¤Î¥Ñ¥±¥Ã¥È¤ÎÁ÷¼õ¿®¤ò¥Õ¥£¥ë¥¿¡¼¤¹¤ë¤À¤±¤Î¾ì¹ç¤Ç¤¢¤ë¡£¤³¤Î¾ì¹ç¤Ë¤Ï¡¢¥Õ¥¡¥¤¥ä¡¼¥¦¥©¡¼¥ë¤Î¥Þ¥·¥ó¤ÎSIP¤ÈRTP¤Î¥Ý¡¼¥È¤ò¥ª¡¼¥×¥ó¤¹¤ë¤À¤±¤Ç¤è¤¤¡£SIP¥Ý¡¼¥È¤Ï¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤ÎSIP¤Î¥¿¥Ö¤Ë¡¢RTP¥Ý¡¼¥È¤Ï¡¢RTP¥Ý¡¼¥È¤ÏRTP¤Î¥¿¥Ö¤Ë¤¢¤ë¡£Î¾¼Ô¤È¤â¤ËÊѹ¹²Äǽ¤Ç¤¢¤ë¤¬¡¢SIP¥Ý¡¼¥È(5060ÈÖ)¤Ï¡¢Êѹ¹¤·¤Ê¤¤¤Ç¤ª¤¯¤³¤È¤¬¶¯¤¯¿ä¾©¤µ¤ì¤ë¡£
-  </para>
-  </sect1>
-  <sect1>
-   <title>
-   º¤¤Ã¤¿¤È¤­¤Ë¤Ï
-  </title>
-   <sect2>
-    <title>
-    Àܳ¾å¤Ë¤ª¤±¤ëÌäÂê
-   </title>
-   <blockquote>
-   <para>
-    »ä¤Ï¡¢Í§¿Í&lt;sip:toto@example.com&gt;¤ËÅÅÏäò¤«¤±¤è¤¦¤È¤·¤¿¤À¤¬¡¢¤Ê¤Ë¤âµ¯¤­¤Ê¤¤¡£¥Ù¥ë¤âÌĤé¤Ê¤¤¡¢¤Þ¤Ã¤¿¤¯²¿¤âµ¯¤³¤é¤Ê¤¤¡£
-   </para>
-   </blockquote>
-   <para>
-    Linphone¤¬»ÈÍѤ·¤Æ¤¤¤ë¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤ØÀܳ¤·¤Æ¤¤¤ë¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹(¤Þ¤¿¤Ï¡¢²ñÏ䬽ФƤ¤¤¯¤Ù¤­¥Í¥Ã¥È¥ï¡¼¥¯)¤ò¸¡¾Ú¤·¤Æ¤ß¤ë¤Ù¤­¤Ç¤¢¤í¤¦¡£¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤Î¡¢¥Í¥Ã¥È¥ï¡¼¥¯¥¿¥Ö¤«¤é¡¢Àµ¤·¤¤¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤òÁª¤ó¤Ç¤ß¤ë¤Î¤¬¤è¤¤¤À¤í¤¦¡£
-   </para>
-   <para>
-    ¤¢¤ë¤¤¤Ï¡¢¤¢¤Ê¤¿¤¬Àܳ¤·¤è¤¦¤È¤·¤Æ¤¤¤ë¿Í¤¬¡¢¸½ºß·ÐÏ©¤¬Àܳ¤Ç¤­¤Ê¤¤¾õ¶·¤Ë¤¢¤ë¤Î¤«¤âÃΤì¤Ê¤¤¡Ä¡Ä¡£
-   </para>
-   </sect2>
-   <sect2>
-    <title>
-    ²»À¼¤Ë¤ª¤±¤ëÌäÂê
-   </title>
-   <blockquote>
-   <para>
-    Linphone¤Ï¡¢¥ê¥â¡¼¥È¤ÎSIP URL¤ËÀܳ¤·¤Æ¤¤¤ë¤è¤¦¤Ç¡¢¥Ù¥ë¤ÏÌĤäƤ¤¤ë¤è¤¦¤À¡£¤±¤ì¤É¤â¡¢Áê¼ê¤¬ÅÅÏä˽Ф¿¤È¤­¤Ë¤Ï²¿¤âµ¯¤³¤é¤º¡¢¤ª¸ß¤¤¤ÎÀ¼¤¬Ê¹¤³¤¨¤Ê¤¤¡£
-   </para>
-   </blockquote>
-   <itemizedlist>
-    <listitem>
-    <para>
-    ÂçÄñ¤Î¿Í¤Ï¡¢¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤«¤é¡¢Àµ¤·¤¤¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤òÁª¤ó¤Ç¤¤¤Ê¤¤¤¿¤á¤Ë¡¢ÌäÂê¤òÀ¸¤¸¤µ¤»¤Æ¤·¤Þ¤¦¡£¥À¥¤¥ä¥ë¥¢¥Ã¥×Àܳ¤Ç¤Ï¡¢¡Öppp0¡×¤Ë¤Ê¤ë¤Ï¤º¤Ç¤¢¤ë¡£¡Ö\"{}lo¡×¤Ï¡¢¥Æ¥¹¥ÈÍѤˡ¢sipomatic¤À¤±¤Ë»ÈÍѤµ¤ì¤ë¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ç¤¢¤ë¤³¤È¤ËÃí°Õ¤µ¤ì¤¿¤¤¡£¤½¤Î¾¤Î¾ì¹ç¤Ç¤Ï µ¡Ç½¤·¤Ê¤¤¡£
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    ¤Þ¤º¤Ï¡¢Á÷Ïò»Î̤ȼõÏò»Î̤ò¾å¤²¤Æ¤ß¤ë¤Î¤¬¤è¤¤¤À¤í¤¦¡£
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    ²»À¼¤¬¤È¤®¤ì¤È¤®¤ì¤Ë¤Ê¤ë¾ì¹ç¤Ï¡¢¤³¤ì¤ò²óÈò¤¹¤ë¤¿¤á¤Ë¡¢¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤ÎRTP¥¿¥Ö¤Î¡Ö¥Ð¥Ã¥Õ¥¡¤¹¤ë¥ß¥êÉáפÎÃͤòÂ礭¤¯¤·¤Æ¤ß¤ë¤Î¤¬¤è¤¤¤À¤í¤¦¡£¤·¤«¤·¡¢¤³¤ì¤ÏÄÌ¿®¤ÎÃÙ±ä¤òÁýÂ礵¤»¤ë¡£
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    Linphone¤¬¡¢¥ª¡¼¥Ç¥£¥ª¥Ç¥Ð¥¤¥¹¤ò¥ª¡¼¥×¥ó¤Ç¤­¤Ê¤¤¤È¤­¤Ë¤Ï¡¢/dev/dsp¤Î¥Ñ¡¼¥ß¥Ã¥·¥ç¥ó¤ò³Îǧ¤·¡¢¥ª¡¼¥Ç¥£¥ª¥Ç¥Ð¥¤¥¹¤ò»ÈÍѤ¹¤ë¤¹¤Ù¤Æ¤Î¥×¥í¥°¥é¥à(xmms kaimanÅù)¤òÄä»ß¤¹¤ë¤Î¤¬¤è¤¤¤À¤í¤¦¡£
-    </para>
-   </listitem>
-    <listitem>
-    <para>
-    ALSA¥É¥é¥¤¥Ð¡¼¤ò»ÈÍѤ¹¤ë(<ulink url="http://www.alsa-project.org">http://www.alsa-project.org</ulink>¤ò»²¾È¤µ¤ì¤¿¤¤)¡£ÂçÄñ¤Î¥Ç¥£¥¹¥È¥ê¥Ó¥å¡¼¥¸¥ç¥ó¤Ï¡¢¤Þ¤À¸Å¤¤¥«¡¼¥Í¥ë¸øǧ¤Î¥É¥é¥¤¥Ð¡¼¤ò»ÈÍѤ·¤Æ¤¤¤ë¤¬¡¢¤³¤ì¤ÏÂ礭¤ÊÃÙ±ä¤È¿¤¯¤Î¥Ð¥°¤ò´Þ¤ó¤Ç¤¤¤ë¡£Linphone¤Ï¡¢ALSA¥É¥é¥¤¥Ð¡¼¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿¸å¤Î¥ê¥³¥ó¥Ñ¥¤¥ë¤òɬÍפȤ·¤Ê¤¤¤³¤È¡¢¤Þ¤¿¡¢¥ª¡¼¥Ç¥£¥ª¤ÎÀá¤Î¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤«¤é¤ÎALSA¥â¡¼¥É¤Ø¤ÎÊѹ¹¤Ïɬ¿Ü¤Ç¤Ï¤Ê¤¤¤³¤È¤â½Ò¤Ù¤Æ¤ª¤³¤¦¡£ 
-    </para>
-   </listitem>
-   </itemizedlist>
-   </sect2>
-  </sect1>
-  <sect1>
-   <title>
-   ¥Ð¥°Êó¹ð¤ÈÄó°Æ
-  </title>
-  <para>
-   ¤Þ¤º¤Ï¡¢Linphone¤Î¥Û¡¼¥à¥Ú¡¼¥¸<ulink url="http://www.linphone.org">http://www.linphone.org</ulink>¤«¤é¡¢ºÇ¿·¤ÎLinphone¤ò»ÈÍѤ·¤Æ¤¤¤ë¤«¤ò³Îǧ¤·¤ÆÍߤ·¤¤¡£ 
-  </para>
-  <para>
-   ¤â¤·¡¢Linphone¤¬¥¯¥é¥Ã¥·¥å¤·¤¿¤È¤­¤Ë¤Ï¡¢¥Ð¥°¥ì¥Ý¡¼¥È¤òľÀÜbugs@linphone.org¤Þ¤ÇÁ÷¤Ã¤ÆÍߤ·¤¤¡£¤â¤·¡¢¥¯¥é¥Ã¥·¥å¤Ï¤·¤Ê¤¤¤¬Linphone¤¬Æ°ºî¤·¤Ê¤¤¤È¤­¤Ë¤Ï¡¢¾å¤Î¥¢¥É¥ì¥¹¤Ë¥Ð¥°¥ì¥Ý¡¼¥È¤òÁ÷¤ëÁ°¤Ë¡¢¥Þ¥Ë¥å¥¢¥ë¤ò ¤â¤¦°ìÅÙÆɤߤ«¤¨¤·¤ÆÍߤ·¤¤¡£¤â¤·¡¢²¿¤«¤òÄó°Æ¤·¤¿¤¤¤È¤­¤Ë¤Ï¡¢±ó褻¤º¤Ë¡¢help@linphone.org¤Þ¤Ç¥á¡¼¥ë¤òÁ÷¤Ã¤ÆÍߤ·¤¤¡£¤Ê¤ª¡¢¥Ó¥Ç¥ª¥µ¥Ý¡¼¥È¤È²ñµÄ¤Ï¡¢¾­Íè¤Î·×²è¤Ë¤¢¤ë¤³¤È¤ò½Ò¤Ù¤Æ¤ª¤³¤¦¡£¤Þ¤¿¡¢Linphonr¤ÎËÝÌõ¤Ë¶½Ì£¤ò»ý¤Ã¤¿¿Í¤Ï¡¢ÇÛÉÛ¤µ¤ì¤Æ¤¤¤ëpo/linpyhone.pot¤Ë´ð¤Å¤¤¤¿xx.po¥Õ¥¡¥¤¥ë¤ò»ä¤ËÁ÷¤Ã¤ÆÍߤ·¤¤¡£¤Þ¤¿¡¢¤³¤Î¥Þ¥Ë¥å¥¢¥ë¤ò¾¤Î¸À¸ì¤ËËÝÌõ¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¢¤ë¡£¤¤¤º¤ì¤Ë¤·¤Æ¤â¡¢¾Ü¤·¤¤¤³¤È¤¬ÃΤꤿ¤¤¤È¤­¤Ï»ä¤ËÏ¢Íí¤·¤ÆÍߤ·¤¤¡£
-  </para>
-  </sect1>
-  <sect1>
-   <title>
-   ºî¼Ô
-  </title>
-  <para>
-   Simon MORLAT (simon.morlat@free.fr) ¤¬À½ºî¤·¤¿Éôʬ¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¢¤ë¡£
-  </para>
-  <itemizedlist>
-   <listitem>
-   <para>
-   ¥á¥¤¥ó¥×¥í¥°¥é¥à(src) 
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   RTP ¥é¥¤¥Ö¥é¥ê (lprtplib) 
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   osipua -- osip¥¹¥¿¥Ã¥¯¤Ë´ð¤Å¤¤¤¿¥æ¡¼¥¶¡¼¥¨¡¼¥¸¥§¥ó¥È¤ÎAPI¡£oss¤ÈALSA¥É¥é¥¤¥Ð¡¼¤Î²»À¼¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¡£
-   </para>
-  </listitem>
-   <listitem>
-   <para>
-   (²»À¼) lpc10-1.5ÍѤÎwrappers, gsm and g711 ¥³¡¼¥Ç¥Ã¥¯ 
-   </para>
-  </listitem>
-  </itemizedlist>
-  <para>
-   Aymeric Moizard (jack@atosc.org)¤Ï¡¢ Linphone¤¬ÍøÍѤ·¤Æ¤¤¤ëosip¥¹¥¿¥Ã¥¯¤òÀ½ºî¤·¤¿¡£
-  </para>
-  <para>
-   GSM¥é¥¤¥Ö¥é¥ê¤Ï¡¢Jutta Degener¤ÈCarsten Bormann(Technische Universitaet Berlin)¤Ë¤è¤Ã¤Æ½ñ¤«¤ì¤¿¡£
-  </para>
-  <para>
-   The LPC10-1.5 ¥é¥¤¥Ö¥é¥ê¤Ï¡¢Andy Fingerhut(Applied Research Laboratory)¤Ë¤è¤Ã¤Æ½ñ¤«¤ì¤¿¡£ &lt;-- ¤³¤ÎÉôʬ¤Ï¥¹¥Ú¡¼¥¹¤ÎÅÔ¹ç¤Ë¤è¤ê¾Êά²Äǽ¤Ç¤¢¤ë¡£ Washington University, Campus Box 1045/Bryan 509 ¥¹¥Ú¡¼¥¹¤Ë¸Â¤ê¤¬¤¢¤ë¾ì¹ç¤Ï¡¢¤³¤³¤«¤é¡£One Brookings Drive Saint Louis, MO 63130-4899 jaf@arl.wustl.edu http://www.arl.wustl.edu/&tilde;jaf/¤µ¤é¤Ê¤ë¾ðÊó¤Ï¡¢gsmlib¤Èlpc10-1.5¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Î¥Æ¥­¥¹¥È¥Õ¥¡¥¤¥ë¤ò»²¾È¤µ¤ì¤¿¤¤¡£
-  </para>
-  <para>
-   Pablo Marcelo Moia -- ¥¢¥¤¥³¥óÀ½ºî
-  </para>
-  </sect1>
-  <sect1>
-   <title>
-   ¼Õ¼­
-  </title>
-  <para>
-   GTK¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¥Ó¥ë¥À¡¼¤ÎDaemon Chaplin¤Ë´¶¼Õ¤ò¡£
-  </para>
-  <para>
-   ÃøÌÀ¤ÊoSIP¥é¥¤¥Ö¥é¥ê¡¼¤ÎAymeric Moizard¤Ë´¶¼Õ¤ò¡£
-  </para>
-  <para>
-   LPC10-1.5¤ÈGSM¥³¡¼¥É¤Îºî¼Ô¤Ë´¶¼Õ¤ò¡£
-  </para>
-  <para>
-   RPM¤òÄ󶡤·¤Æ¤¯¤ì¤¿¡¢Joel Barrios ( jbarrios@-NO-SPAM-linuxparatodos.com )¤Ë´¶¼Õ¤ò¡£
-  </para>
-  <para>
-   Linphone¤ËÁÇŨ¤Ê¥¢¥¤¥³¥ó¤òÄ󶡤·¤Æ¤¯¤ì¤¿¡¢Pablo Marcelo Moia¤Ë´¶¼Õ¤ò¡£
-  </para>
-  <para>
-   <toc></toc>
-  </para>
-  </sect1>
-
-
-</article>
diff --git a/linphone/share/linphone.desktop b/linphone/share/linphone.desktop
deleted file mode 100644 (file)
index 09e1104..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-[Desktop Entry]
-Name=Linphone
-Comment=Linphone is a web-phone
-Comment[fr]=Linphone est un web-phone.
-Comment[de]=Linphone ist ein web-phone.
-Type=Application
-Exec=linphone-3
-Icon=linphone/linphone2.png
-Terminal=false
-Categories=Application;Network;
\ No newline at end of file
diff --git a/linphone/share/linphone.gnorba b/linphone/share/linphone.gnorba
deleted file mode 100644 (file)
index b9e5059..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-[linphone_applet]
-type=exe
-repo_id=IDL:GNOME/Applet:1.0
-description=Linphone is a web phone.
-location_info=linphone --applet
\ No newline at end of file
diff --git a/linphone/share/linphone.pc.in b/linphone/share/linphone.pc.in
deleted file mode 100644 (file)
index f44eb23..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Requires: mediastreamer ortp
-Name: liblinphone
-Description: All in one linphone libs.
-Version: @VERSION@
-Libs: @LINPHONE_LIBS@
-Cflags: @LINPHONE_CFLAGS@
diff --git a/linphone/share/linphone_applet.desktop b/linphone/share/linphone_applet.desktop
deleted file mode 100644 (file)
index 4840327..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-[Desktop Entry]
-Name=Linphone Applet
-Comment=Linphone is a web-phone
-Comment[fr]=Linphone est un web-phone.
-Comment[de]=Linphone ist ein web-phone.
-Type=Application
-Exec=linphone --applet --activate-goad-server=linphone_applet
-Icon=linphone/linphone2.png
-Terminal=0
\ No newline at end of file
diff --git a/linphone/share/ringback.wav b/linphone/share/ringback.wav
deleted file mode 100644 (file)
index 21f4b5b..0000000
Binary files a/linphone/share/ringback.wav and /dev/null differ
diff --git a/linphone/share/rings/bigben.wav b/linphone/share/rings/bigben.wav
deleted file mode 100644 (file)
index f1ba850..0000000
Binary files a/linphone/share/rings/bigben.wav and /dev/null differ
diff --git a/linphone/share/rings/oldphone.wav b/linphone/share/rings/oldphone.wav
deleted file mode 100644 (file)
index e3056cc..0000000
Binary files a/linphone/share/rings/oldphone.wav and /dev/null differ
diff --git a/linphone/share/rings/orig.wav b/linphone/share/rings/orig.wav
deleted file mode 100644 (file)
index af74b54..0000000
Binary files a/linphone/share/rings/orig.wav and /dev/null differ
diff --git a/linphone/share/rings/rock.wav b/linphone/share/rings/rock.wav
deleted file mode 100644 (file)
index 12374c0..0000000
Binary files a/linphone/share/rings/rock.wav and /dev/null differ
diff --git a/linphone/share/rings/sweet.wav b/linphone/share/rings/sweet.wav
deleted file mode 100644 (file)
index e514548..0000000
Binary files a/linphone/share/rings/sweet.wav and /dev/null differ
diff --git a/linphone/share/rings/synth.wav b/linphone/share/rings/synth.wav
deleted file mode 100644 (file)
index 7142f7a..0000000
Binary files a/linphone/share/rings/synth.wav and /dev/null differ
diff --git a/linphone/share/rings/tapping.wav b/linphone/share/rings/tapping.wav
deleted file mode 100644 (file)
index 862fd79..0000000
Binary files a/linphone/share/rings/tapping.wav and /dev/null differ
diff --git a/linphone/share/rings/toy.wav b/linphone/share/rings/toy.wav
deleted file mode 100644 (file)
index 7a51984..0000000
Binary files a/linphone/share/rings/toy.wav and /dev/null differ
diff --git a/linphone/stamp-h.in b/linphone/stamp-h.in
deleted file mode 100644 (file)
index 9788f70..0000000
+++ /dev/null
@@ -1 +0,0 @@
-timestamp
diff --git a/m4/.gitignore b/m4/.gitignore
new file mode 100644 (file)
index 0000000..79171ee
--- /dev/null
@@ -0,0 +1,9 @@
+Makefile
+Makefile.in
+intltool.m4
+libtool.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+lt~obsolete.m4
+
diff --git a/m4/Makefile.am b/m4/Makefile.am
new file mode 100644 (file)
index 0000000..562029e
--- /dev/null
@@ -0,0 +1,2 @@
+EXTRA_DIST= $(shell cd $(srcdir) && ls *.m4)
+
diff --git a/m4/codeset.m4 b/m4/codeset.m4
new file mode 100644 (file)
index 0000000..223955b
--- /dev/null
@@ -0,0 +1,21 @@
+# codeset.m4 serial 2 (gettext-0.16)
+dnl Copyright (C) 2000-2002, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_LANGINFO_CODESET],
+[
+  AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
+    [AC_TRY_LINK([#include <langinfo.h>],
+      [char* cs = nl_langinfo(CODESET); return !cs;],
+      am_cv_langinfo_codeset=yes,
+      am_cv_langinfo_codeset=no)
+    ])
+  if test $am_cv_langinfo_codeset = yes; then
+    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
+      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+  fi
+])
diff --git a/m4/exosip.m4 b/m4/exosip.m4
new file mode 100644 (file)
index 0000000..d3f89ee
--- /dev/null
@@ -0,0 +1,36 @@
+dnl -*- autoconf -*-
+AC_DEFUN([LP_SETUP_EXOSIP],[
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([LP_CHECK_OSIP2])
+
+dnl eXosip embeded stuff
+EXOSIP_CFLAGS="$OSIP_CFLAGS -DOSIP_MT "
+EXOSIP_LIBS="$OSIP_LIBS -leXosip2  "
+
+CPPFLAGS_save=$CPPFLAGS
+CPPFLAGS="$OSIP_CFLAGS $CPPFLAGS"
+AC_CHECK_HEADER([eXosip2/eXosip.h], ,AC_MSG_ERROR([Could not find eXosip2 headers !]))
+CPPFLAGS=$CPPFLAGS_save
+
+dnl check for eXosip2 libs
+LDFLAGS_save=$LDFLAGS
+LDFLAGS="$OSIP_LIBS $LDFLAGS"
+LIBS_save=$LIBS
+AC_CHECK_LIB([eXosip2],[eXosip_subscribe_remove],
+       [],
+       [AC_MSG_ERROR([Could not find eXosip2 library with version >= 3.0.2 !])],
+       [-losipparser2 -losip2 ])
+AC_CHECK_LIB([eXosip2],[eXosip_get_version],
+       [AC_DEFINE([HAVE_EXOSIP_GET_VERSION],[1],[Defined when eXosip_get_version is available])],
+       [],
+       [-losipparser2 -losip2 ])
+dnl AC_CHECK_LIB([eXosip2],[eXosip_get_naptr],
+dnl    [AC_DEFINE([HAVE_EXOSIP_NAPTR_SUPPORT],[1],[Defined when eXosip_get_naptr is available])],
+dnl    [],
+dnl    [-losipparser2 -losip2 ])
+LIBS=$LIBS_save
+LDFLAGS=$LDFLAGS_save
+
+AC_SUBST(EXOSIP_CFLAGS)
+AC_SUBST(EXOSIP_LIBS)
+])
diff --git a/m4/gettext.m4 b/m4/gettext.m4
new file mode 100644 (file)
index 0000000..91c345e
--- /dev/null
@@ -0,0 +1,419 @@
+# gettext.m4 serial 59 (gettext-0.16.1)
+dnl Copyright (C) 1995-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2006.
+
+dnl Macro to add for using GNU gettext.
+
+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
+dnl    default (if it is not specified or empty) is 'no-libtool'.
+dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
+dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
+dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
+dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
+dnl    depending on --{enable,disable}-{shared,static} and on the presence of
+dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
+dnl    $(top_builddir)/intl/libintl.a will be created.
+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
+dnl    implementations (in libc or libintl) without the ngettext() function
+dnl    will be ignored.  If NEEDSYMBOL is specified and is
+dnl    'need-formatstring-macros', then GNU gettext implementations that don't
+dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
+dnl INTLDIR is used to find the intl libraries.  If empty,
+dnl    the value `$(top_builddir)/intl/' is used.
+dnl
+dnl The result of the configuration is one of three cases:
+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
+dnl    and used.
+dnl    Catalog format: GNU --> install in $(datadir)
+dnl    Catalog extension: .mo after installation, .gmo in source tree
+dnl 2) GNU gettext has been found in the system's C library.
+dnl    Catalog format: GNU --> install in $(datadir)
+dnl    Catalog extension: .mo after installation, .gmo in source tree
+dnl 3) No internationalization, always use English msgid.
+dnl    Catalog format: none
+dnl    Catalog extension: none
+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
+dnl The use of .gmo is historical (it was needed to avoid overwriting the
+dnl GNU format catalogs when building on a platform with an X/Open gettext),
+dnl but we keep it in order not to force irrelevant filename changes on the
+dnl maintainers.
+dnl
+AC_DEFUN([AM_GNU_GETTEXT],
+[
+  dnl Argument checking.
+  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
+    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
+])])])])])
+  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
+    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
+])])])])
+  define([gt_included_intl],
+    ifelse([$1], [external],
+      ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
+      [yes]))
+  define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
+  gt_NEEDS_INIT
+  AM_GNU_GETTEXT_NEED([$2])
+
+  AC_REQUIRE([AM_PO_SUBDIRS])dnl
+  ifelse(gt_included_intl, yes, [
+    AC_REQUIRE([AM_INTL_SUBDIR])dnl
+  ])
+
+  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+
+  dnl Sometimes libintl requires libiconv, so first search for libiconv.
+  dnl Ideally we would do this search only after the
+  dnl      if test "$USE_NLS" = "yes"; then
+  dnl        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+  dnl the configure script would need to contain the same shell code
+  dnl again, outside any 'if'. There are two solutions:
+  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
+  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
+  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
+  dnl documented, we avoid it.
+  ifelse(gt_included_intl, yes, , [
+    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+  ])
+
+  dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
+  gt_INTL_MACOSX
+
+  dnl Set USE_NLS.
+  AC_REQUIRE([AM_NLS])
+
+  ifelse(gt_included_intl, yes, [
+    BUILD_INCLUDED_LIBINTL=no
+    USE_INCLUDED_LIBINTL=no
+  ])
+  LIBINTL=
+  LTLIBINTL=
+  POSUB=
+
+  dnl Add a version number to the cache macros.
+  case " $gt_needs " in
+    *" need-formatstring-macros "*) gt_api_version=3 ;;
+    *" need-ngettext "*) gt_api_version=2 ;;
+    *) gt_api_version=1 ;;
+  esac
+  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+  dnl If we use NLS figure out what method
+  if test "$USE_NLS" = "yes"; then
+    gt_use_preinstalled_gnugettext=no
+    ifelse(gt_included_intl, yes, [
+      AC_MSG_CHECKING([whether included gettext is requested])
+      AC_ARG_WITH(included-gettext,
+        [  --with-included-gettext use the GNU gettext library included here],
+        nls_cv_force_use_gnu_gettext=$withval,
+        nls_cv_force_use_gnu_gettext=no)
+      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
+
+      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+    ])
+        dnl User does not insist on using GNU NLS library.  Figure out what
+        dnl to use.  If GNU gettext is available we use this.  Else we have
+        dnl to fall back to GNU NLS library.
+
+        if test $gt_api_version -ge 3; then
+          gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+'
+        else
+          gt_revision_test_code=
+        fi
+        if test $gt_api_version -ge 2; then
+          gt_expression_test_code=' + * ngettext ("", "", 0)'
+        else
+          gt_expression_test_code=
+        fi
+
+        AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
+         [AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;],
+            [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
+            [eval "$gt_func_gnugettext_libc=yes"],
+            [eval "$gt_func_gnugettext_libc=no"])])
+
+        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+          dnl Sometimes libintl requires libiconv, so first search for libiconv.
+          ifelse(gt_included_intl, yes, , [
+            AM_ICONV_LINK
+          ])
+          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
+          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
+          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
+          dnl even if libiconv doesn't exist.
+          AC_LIB_LINKFLAGS_BODY([intl])
+          AC_CACHE_CHECK([for GNU gettext in libintl],
+            [$gt_func_gnugettext_libintl],
+           [gt_save_CPPFLAGS="$CPPFLAGS"
+            CPPFLAGS="$CPPFLAGS $INCINTL"
+            gt_save_LIBS="$LIBS"
+            LIBS="$LIBS $LIBINTL"
+            dnl Now see whether libintl exists and does not depend on libiconv.
+            AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);],
+              [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+              [eval "$gt_func_gnugettext_libintl=yes"],
+              [eval "$gt_func_gnugettext_libintl=no"])
+            dnl Now see whether libintl exists and depends on libiconv.
+            if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+              LIBS="$LIBS $LIBICONV"
+              AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);],
+                [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+               [LIBINTL="$LIBINTL $LIBICONV"
+                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+                eval "$gt_func_gnugettext_libintl=yes"
+               ])
+            fi
+            CPPFLAGS="$gt_save_CPPFLAGS"
+            LIBS="$gt_save_LIBS"])
+        fi
+
+        dnl If an already present or preinstalled GNU gettext() is found,
+        dnl use it.  But if this macro is used in GNU gettext, and GNU
+        dnl gettext is already preinstalled in libintl, we update this
+        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
+        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+                && test "$PACKAGE" != gettext-runtime \
+                && test "$PACKAGE" != gettext-tools; }; then
+          gt_use_preinstalled_gnugettext=yes
+        else
+          dnl Reset the values set by searching for libintl.
+          LIBINTL=
+          LTLIBINTL=
+          INCINTL=
+        fi
+
+    ifelse(gt_included_intl, yes, [
+        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+          dnl GNU gettext is not found in the C library.
+          dnl Fall back on included GNU gettext library.
+          nls_cv_use_gnu_gettext=yes
+        fi
+      fi
+
+      if test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Mark actions used to generate GNU NLS library.
+        BUILD_INCLUDED_LIBINTL=yes
+        USE_INCLUDED_LIBINTL=yes
+        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
+        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
+        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+      fi
+
+      CATOBJEXT=
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Mark actions to use GNU gettext tools.
+        CATOBJEXT=.gmo
+      fi
+    ])
+
+    if test -n "$INTL_MACOSX_LIBS"; then
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Some extra flags are needed during linking.
+        LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+      fi
+    fi
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes" \
+       || test "$nls_cv_use_gnu_gettext" = "yes"; then
+      AC_DEFINE(ENABLE_NLS, 1,
+        [Define to 1 if translation of program messages to the user's native language
+   is requested.])
+    else
+      USE_NLS=no
+    fi
+  fi
+
+  AC_MSG_CHECKING([whether to use NLS])
+  AC_MSG_RESULT([$USE_NLS])
+  if test "$USE_NLS" = "yes"; then
+    AC_MSG_CHECKING([where the gettext function comes from])
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+        gt_source="external libintl"
+      else
+        gt_source="libc"
+      fi
+    else
+      gt_source="included intl directory"
+    fi
+    AC_MSG_RESULT([$gt_source])
+  fi
+
+  if test "$USE_NLS" = "yes"; then
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+        AC_MSG_CHECKING([how to link with libintl])
+        AC_MSG_RESULT([$LIBINTL])
+        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+      fi
+
+      dnl For backward compatibility. Some packages may be using this.
+      AC_DEFINE(HAVE_GETTEXT, 1,
+       [Define if the GNU gettext() function is already present or preinstalled.])
+      AC_DEFINE(HAVE_DCGETTEXT, 1,
+       [Define if the GNU dcgettext() function is already present or preinstalled.])
+    fi
+
+    dnl We need to process the po/ directory.
+    POSUB=po
+  fi
+
+  ifelse(gt_included_intl, yes, [
+    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
+    dnl to 'yes' because some of the testsuite requires it.
+    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
+      BUILD_INCLUDED_LIBINTL=yes
+    fi
+
+    dnl Make all variables we use known to autoconf.
+    AC_SUBST(BUILD_INCLUDED_LIBINTL)
+    AC_SUBST(USE_INCLUDED_LIBINTL)
+    AC_SUBST(CATOBJEXT)
+
+    dnl For backward compatibility. Some configure.ins may be using this.
+    nls_cv_header_intl=
+    nls_cv_header_libgt=
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    DATADIRNAME=share
+    AC_SUBST(DATADIRNAME)
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    INSTOBJEXT=.mo
+    AC_SUBST(INSTOBJEXT)
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    GENCAT=gencat
+    AC_SUBST(GENCAT)
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    INTLOBJS=
+    if test "$USE_INCLUDED_LIBINTL" = yes; then
+      INTLOBJS="\$(GETTOBJS)"
+    fi
+    AC_SUBST(INTLOBJS)
+
+    dnl Enable libtool support if the surrounding package wishes it.
+    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
+    AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
+  ])
+
+  dnl For backward compatibility. Some Makefiles may be using this.
+  INTLLIBS="$LIBINTL"
+  AC_SUBST(INTLLIBS)
+
+  dnl Make all documented variables known to autoconf.
+  AC_SUBST(LIBINTL)
+  AC_SUBST(LTLIBINTL)
+  AC_SUBST(POSUB)
+])
+
+
+dnl Checks for special options needed on MacOS X.
+dnl Defines INTL_MACOSX_LIBS.
+AC_DEFUN([gt_INTL_MACOSX],
+[
+  dnl Check for API introduced in MacOS X 10.2.
+  AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
+    gt_cv_func_CFPreferencesCopyAppValue,
+    [gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
+       [CFPreferencesCopyAppValue(NULL, NULL)],
+       [gt_cv_func_CFPreferencesCopyAppValue=yes],
+       [gt_cv_func_CFPreferencesCopyAppValue=no])
+     LIBS="$gt_save_LIBS"])
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+    AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
+      [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
+  fi
+  dnl Check for API introduced in MacOS X 10.3.
+  AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
+    [gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
+       [gt_cv_func_CFLocaleCopyCurrent=yes],
+       [gt_cv_func_CFLocaleCopyCurrent=no])
+     LIBS="$gt_save_LIBS"])
+  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+    AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
+      [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
+  fi
+  INTL_MACOSX_LIBS=
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+  fi
+  AC_SUBST([INTL_MACOSX_LIBS])
+])
+
+
+dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
+m4_define([gt_NEEDS_INIT],
+[
+  m4_divert_text([DEFAULTS], [gt_needs=])
+  m4_define([gt_NEEDS_INIT], [])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
+AC_DEFUN([AM_GNU_GETTEXT_NEED],
+[
+  m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
diff --git a/m4/glibc2.m4 b/m4/glibc2.m4
new file mode 100644 (file)
index 0000000..e8f5bfe
--- /dev/null
@@ -0,0 +1,30 @@
+# glibc2.m4 serial 1
+dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Test for the GNU C Library, version 2.0 or newer.
+# From Bruno Haible.
+
+AC_DEFUN([gt_GLIBC2],
+  [
+    AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer,
+      ac_cv_gnu_library_2,
+      [AC_EGREP_CPP([Lucky GNU user],
+       [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ >= 2)
+  Lucky GNU user
+ #endif
+#endif
+       ],
+       ac_cv_gnu_library_2=yes,
+       ac_cv_gnu_library_2=no)
+      ]
+    )
+    AC_SUBST(GLIBC2)
+    GLIBC2="$ac_cv_gnu_library_2"
+  ]
+)
diff --git a/m4/glibc21.m4 b/m4/glibc21.m4
new file mode 100644 (file)
index 0000000..d95fd98
--- /dev/null
@@ -0,0 +1,30 @@
+# glibc21.m4 serial 3
+dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Test for the GNU C Library, version 2.1 or newer.
+# From Bruno Haible.
+
+AC_DEFUN([gl_GLIBC21],
+  [
+    AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
+      ac_cv_gnu_library_2_1,
+      [AC_EGREP_CPP([Lucky GNU user],
+       [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+  Lucky GNU user
+ #endif
+#endif
+       ],
+       ac_cv_gnu_library_2_1=yes,
+       ac_cv_gnu_library_2_1=no)
+      ]
+    )
+    AC_SUBST(GLIBC21)
+    GLIBC21="$ac_cv_gnu_library_2_1"
+  ]
+)
diff --git a/m4/iconv.m4 b/m4/iconv.m4
new file mode 100644 (file)
index 0000000..654c415
--- /dev/null
@@ -0,0 +1,101 @@
+# iconv.m4 serial AM4 (gettext-0.11.3)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+
+  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+  dnl accordingly.
+  AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+  dnl those with the standalone portable GNU libiconv installed).
+
+  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+  dnl accordingly.
+  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+  dnl because if the user has installed libiconv and not disabled its use
+  dnl via --without-libiconv-prefix, he wants to use it. The first
+  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+  am_save_CPPFLAGS="$CPPFLAGS"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
+    am_cv_func_iconv="no, consider installing GNU libiconv"
+    am_cv_lib_iconv=no
+    AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+      [iconv_t cd = iconv_open("","");
+       iconv(cd,NULL,NULL,NULL,NULL);
+       iconv_close(cd);],
+      am_cv_func_iconv=yes)
+    if test "$am_cv_func_iconv" != yes; then
+      am_save_LIBS="$LIBS"
+      LIBS="$LIBS $LIBICONV"
+      AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+        [iconv_t cd = iconv_open("","");
+         iconv(cd,NULL,NULL,NULL,NULL);
+         iconv_close(cd);],
+        am_cv_lib_iconv=yes
+        am_cv_func_iconv=yes)
+      LIBS="$am_save_LIBS"
+    fi
+  ])
+  if test "$am_cv_func_iconv" = yes; then
+    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
+  fi
+  if test "$am_cv_lib_iconv" = yes; then
+    AC_MSG_CHECKING([how to link with libiconv])
+    AC_MSG_RESULT([$LIBICONV])
+  else
+    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+    dnl either.
+    CPPFLAGS="$am_save_CPPFLAGS"
+    LIBICONV=
+    LTLIBICONV=
+  fi
+  AC_SUBST(LIBICONV)
+  AC_SUBST(LTLIBICONV)
+])
+
+AC_DEFUN([AM_ICONV],
+[
+  AM_ICONV_LINK
+  if test "$am_cv_func_iconv" = yes; then
+    AC_MSG_CHECKING([for iconv declaration])
+    AC_CACHE_VAL(am_cv_proto_iconv, [
+      AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
+      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+    AC_MSG_RESULT([$]{ac_t:-
+         }[$]am_cv_proto_iconv)
+    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
+      [Define as const if the declaration of iconv() needs const.])
+  fi
+])
diff --git a/m4/ilbc.m4 b/m4/ilbc.m4
new file mode 100644 (file)
index 0000000..465f850
--- /dev/null
@@ -0,0 +1,33 @@
+AC_DEFUN([LP_CHECK_ILBC],[
+
+AC_ARG_WITH( ilbc,
+      [  --with-ilbc      Set prefix where ilbc headers and libs can be found (ex:/usr, /usr/local, none to disable ilbc support) [default=/usr] ],
+      [ ilbc_prefix=${withval}],[ ilbc_prefix="/usr" ])
+
+if test "$ilbc_prefix" = "none" ; then
+       AC_MSG_NOTICE([iLBC codec support disabled. ])
+else
+       ILBC_CFLAGS=" -I${ilbc_prefix}/include/ilbc"
+       ILBC_LIBS="-L${ilbc_prefix}/lib -lilbc -lm"
+       CPPFLAGS_save=$CPPFLAGS
+       CPPFLAGS=$ILBC_CFLAGS
+       LDFLAGS_save=$LDFLAGS
+       LDFLAGS=$ILBC_LIBS
+       AC_CHECK_HEADERS(iLBC_decode.h,[AC_CHECK_LIB(ilbc,iLBC_decode,ilbc_found=yes,ilbc_found=no)
+       ],ilbc_found=no)
+       
+       CPPFLAGS=$CPPFLAGS_save
+       LDFLAGS=$LDFLAGS_save
+       
+       if test "$ilbc_found" = "no" ; then
+               AC_MSG_WARN([Could not find ilbc headers or libs. Please install ilbc package from http://www.linphone.org if you want iLBC codec support in linphone.])
+               ILBC_CFLAGS=
+               ILBC_LIBS=
+       else
+               AC_DEFINE(HAVE_ILBC,1,[Defined when we have ilbc codec lib])
+               AC_SUBST(ILBC_CFLAGS)
+               AC_SUBST(ILBC_LIBS)
+       fi      
+fi
+
+])
diff --git a/m4/intdiv0.m4 b/m4/intdiv0.m4
new file mode 100644 (file)
index 0000000..b8d7817
--- /dev/null
@@ -0,0 +1,70 @@
+# intdiv0.m4 serial 1 (gettext-0.11.3)
+dnl Copyright (C) 2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gt_INTDIV0],
+[
+  AC_REQUIRE([AC_PROG_CC])dnl
+  AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+  AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
+    gt_cv_int_divbyzero_sigfpe,
+    [
+      AC_TRY_RUN([
+#include <stdlib.h>
+#include <signal.h>
+
+static void
+#ifdef __cplusplus
+sigfpe_handler (int sig)
+#else
+sigfpe_handler (sig) int sig;
+#endif
+{
+  /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
+  exit (sig != SIGFPE);
+}
+
+int x = 1;
+int y = 0;
+int z;
+int nan;
+
+int main ()
+{
+  signal (SIGFPE, sigfpe_handler);
+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */
+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
+  signal (SIGTRAP, sigfpe_handler);
+#endif
+/* Linux/SPARC yields signal SIGILL.  */
+#if defined (__sparc__) && defined (__linux__)
+  signal (SIGILL, sigfpe_handler);
+#endif
+
+  z = x / y;
+  nan = y / y;
+  exit (1);
+}
+], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
+        [
+          # Guess based on the CPU.
+          case "$host_cpu" in
+            alpha* | i[34567]86 | m68k | s390*)
+              gt_cv_int_divbyzero_sigfpe="guessing yes";;
+            *)
+              gt_cv_int_divbyzero_sigfpe="guessing no";;
+          esac
+        ])
+    ])
+  case "$gt_cv_int_divbyzero_sigfpe" in
+    *yes) value=1;;
+    *) value=0;;
+  esac
+  AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
+    [Define if integer division by zero raises signal SIGFPE.])
+])
diff --git a/m4/intl.m4 b/m4/intl.m4
new file mode 100644 (file)
index 0000000..dcefb11
--- /dev/null
@@ -0,0 +1,259 @@
+# intl.m4 serial 3 (gettext-0.16)
+dnl Copyright (C) 1995-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2006.
+
+AC_PREREQ(2.52)
+
+dnl Checks for all prerequisites of the intl subdirectory,
+dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
+dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
+AC_DEFUN([AM_INTL_SUBDIR],
+[
+  AC_REQUIRE([AC_PROG_INSTALL])dnl
+  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+  AC_REQUIRE([AC_PROG_CC])dnl
+  AC_REQUIRE([AC_CANONICAL_HOST])dnl
+  AC_REQUIRE([gt_GLIBC2])dnl
+  AC_REQUIRE([AC_PROG_RANLIB])dnl
+  AC_REQUIRE([gl_VISIBILITY])dnl
+  AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl
+  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl
+  AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
+  AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
+  AC_REQUIRE([gt_TYPE_WINT_T])dnl
+  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+  AC_REQUIRE([gt_TYPE_INTMAX_T])
+  AC_REQUIRE([gt_PRINTF_POSIX])
+  AC_REQUIRE([gl_GLIBC21])dnl
+  AC_REQUIRE([gl_XSIZE])dnl
+  AC_REQUIRE([gt_INTL_MACOSX])dnl
+
+  AC_CHECK_TYPE([ptrdiff_t], ,
+    [AC_DEFINE([ptrdiff_t], [long],
+       [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
+    ])
+  AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
+  AC_CHECK_FUNCS([asprintf fwprintf putenv setenv setlocale snprintf wcslen])
+
+  dnl Use the _snprintf function only if it is declared (because on NetBSD it
+  dnl is defined as a weak alias of snprintf; we prefer to use the latter).
+  gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
+  gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
+
+  dnl Use the *_unlocked functions only if they are declared.
+  dnl (because some of them were defined without being declared in Solaris
+  dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
+  dnl on Solaris 2.5.1 to run on Solaris 2.6).
+  dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
+  gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
+
+  case $gt_cv_func_printf_posix in
+    *yes) HAVE_POSIX_PRINTF=1 ;;
+    *) HAVE_POSIX_PRINTF=0 ;;
+  esac
+  AC_SUBST([HAVE_POSIX_PRINTF])
+  if test "$ac_cv_func_asprintf" = yes; then
+    HAVE_ASPRINTF=1
+  else
+    HAVE_ASPRINTF=0
+  fi
+  AC_SUBST([HAVE_ASPRINTF])
+  if test "$ac_cv_func_snprintf" = yes; then
+    HAVE_SNPRINTF=1
+  else
+    HAVE_SNPRINTF=0
+  fi
+  AC_SUBST([HAVE_SNPRINTF])
+  if test "$ac_cv_func_wprintf" = yes; then
+    HAVE_WPRINTF=1
+  else
+    HAVE_WPRINTF=0
+  fi
+  AC_SUBST([HAVE_WPRINTF])
+
+  AM_LANGINFO_CODESET
+  gt_LC_MESSAGES
+
+  dnl Compilation on mingw and Cygwin needs special Makefile rules, because
+  dnl 1. when we install a shared library, we must arrange to export
+  dnl    auxiliary pointer variables for every exported variable,
+  dnl 2. when we install a shared library and a static library simultaneously,
+  dnl    the include file specifies __declspec(dllimport) and therefore we
+  dnl    must arrange to define the auxiliary pointer variables for the
+  dnl    exported variables _also_ in the static library.
+  if test "$enable_shared" = yes; then
+    case "$host_os" in
+      cygwin*) is_woe32dll=yes ;;
+      *) is_woe32dll=no ;;
+    esac
+  else
+    is_woe32dll=no
+  fi
+  WOE32DLL=$is_woe32dll
+  AC_SUBST([WOE32DLL])
+
+  dnl Rename some macros and functions used for locking.
+  AH_BOTTOM([
+#define __libc_lock_t                   gl_lock_t
+#define __libc_lock_define              gl_lock_define
+#define __libc_lock_define_initialized  gl_lock_define_initialized
+#define __libc_lock_init                gl_lock_init
+#define __libc_lock_lock                gl_lock_lock
+#define __libc_lock_unlock              gl_lock_unlock
+#define __libc_lock_recursive_t                   gl_recursive_lock_t
+#define __libc_lock_define_recursive              gl_recursive_lock_define
+#define __libc_lock_define_initialized_recursive  gl_recursive_lock_define_initialized
+#define __libc_lock_init_recursive                gl_recursive_lock_init
+#define __libc_lock_lock_recursive                gl_recursive_lock_lock
+#define __libc_lock_unlock_recursive              gl_recursive_lock_unlock
+#define glthread_in_use  libintl_thread_in_use
+#define glthread_lock_init     libintl_lock_init
+#define glthread_lock_lock     libintl_lock_lock
+#define glthread_lock_unlock   libintl_lock_unlock
+#define glthread_lock_destroy  libintl_lock_destroy
+#define glthread_rwlock_init     libintl_rwlock_init
+#define glthread_rwlock_rdlock   libintl_rwlock_rdlock
+#define glthread_rwlock_wrlock   libintl_rwlock_wrlock
+#define glthread_rwlock_unlock   libintl_rwlock_unlock
+#define glthread_rwlock_destroy  libintl_rwlock_destroy
+#define glthread_recursive_lock_init     libintl_recursive_lock_init
+#define glthread_recursive_lock_lock     libintl_recursive_lock_lock
+#define glthread_recursive_lock_unlock   libintl_recursive_lock_unlock
+#define glthread_recursive_lock_destroy  libintl_recursive_lock_destroy
+#define glthread_once                 libintl_once
+#define glthread_once_call            libintl_once_call
+#define glthread_once_singlethreaded  libintl_once_singlethreaded
+])
+])
+
+
+dnl Checks for the core files of the intl subdirectory:
+dnl   dcigettext.c
+dnl   eval-plural.h
+dnl   explodename.c
+dnl   finddomain.c
+dnl   gettextP.h
+dnl   gmo.h
+dnl   hash-string.h hash-string.c
+dnl   l10nflist.c
+dnl   libgnuintl.h.in (except the *printf stuff)
+dnl   loadinfo.h
+dnl   loadmsgcat.c
+dnl   localealias.c
+dnl   log.c
+dnl   plural-exp.h plural-exp.c
+dnl   plural.y
+dnl Used by libglocale.
+AC_DEFUN([gt_INTL_SUBDIR_CORE],
+[
+  AC_REQUIRE([AC_C_INLINE])dnl
+  AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+  AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+  AC_REQUIRE([AC_FUNC_MMAP])dnl
+  AC_REQUIRE([gt_INTDIV0])dnl
+  AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
+  AC_REQUIRE([gt_INTTYPES_PRI])dnl
+  AC_REQUIRE([gl_LOCK])dnl
+
+  AC_TRY_LINK(
+    [int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }],
+    [],
+    [AC_DEFINE([HAVE_BUILTIN_EXPECT], 1,
+       [Define to 1 if the compiler understands __builtin_expect.])])
+
+  AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h])
+  AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \
+    stpcpy strcasecmp strdup strtoul tsearch argz_count argz_stringify \
+    argz_next __fsetlocking])
+
+  dnl Use the *_unlocked functions only if they are declared.
+  dnl (because some of them were defined without being declared in Solaris
+  dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
+  dnl on Solaris 2.5.1 to run on Solaris 2.6).
+  dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
+  gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
+  gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
+
+  AM_ICONV
+
+  dnl glibc >= 2.4 has a NL_LOCALE_NAME macro when _GNU_SOURCE is defined,
+  dnl and a _NL_LOCALE_NAME macro always.
+  AC_CACHE_CHECK([for NL_LOCALE_NAME macro], gt_cv_nl_locale_name,
+    [AC_TRY_LINK([#include <langinfo.h>
+#include <locale.h>],
+      [char* cs = nl_langinfo(_NL_LOCALE_NAME(LC_MESSAGES));],
+      gt_cv_nl_locale_name=yes,
+      gt_cv_nl_locale_name=no)
+    ])
+  if test $gt_cv_nl_locale_name = yes; then
+    AC_DEFINE(HAVE_NL_LOCALE_NAME, 1,
+      [Define if you have <langinfo.h> and it defines the NL_LOCALE_NAME macro if _GNU_SOURCE is defined.])
+  fi
+
+  dnl intl/plural.c is generated from intl/plural.y. It requires bison,
+  dnl because plural.y uses bison specific features. It requires at least
+  dnl bison-1.26 because earlier versions generate a plural.c that doesn't
+  dnl compile.
+  dnl bison is only needed for the maintainer (who touches plural.y). But in
+  dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
+  dnl the rule in general Makefile. Now, some people carelessly touch the
+  dnl files or have a broken "make" program, hence the plural.c rule will
+  dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
+  dnl present or too old.
+  AC_CHECK_PROGS([INTLBISON], [bison])
+  if test -z "$INTLBISON"; then
+    ac_verc_fail=yes
+  else
+    dnl Found it, now check the version.
+    AC_MSG_CHECKING([version of bison])
+changequote(<<,>>)dnl
+    ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+    case $ac_prog_version in
+      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+      1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
+changequote([,])dnl
+         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+      *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+    esac
+    AC_MSG_RESULT([$ac_prog_version])
+  fi
+  if test $ac_verc_fail = yes; then
+    INTLBISON=:
+  fi
+])
+
+
+dnl gt_CHECK_DECL(FUNC, INCLUDES)
+dnl Check whether a function is declared.
+AC_DEFUN([gt_CHECK_DECL],
+[
+  AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
+    [AC_TRY_COMPILE([$2], [
+#ifndef $1
+  char *p = (char *) $1;
+#endif
+], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
+  if test $ac_cv_have_decl_$1 = yes; then
+    gt_value=1
+  else
+    gt_value=0
+  fi
+  AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
+    [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
+])
diff --git a/m4/intldir.m4 b/m4/intldir.m4
new file mode 100644 (file)
index 0000000..7a28843
--- /dev/null
@@ -0,0 +1,19 @@
+# intldir.m4 serial 1 (gettext-0.16)
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+AC_PREREQ(2.52)
+
+dnl Tells the AM_GNU_GETTEXT macro to consider an intl/ directory.
+AC_DEFUN([AM_GNU_GETTEXT_INTL_SUBDIR], [])
diff --git a/m4/intmax.m4 b/m4/intmax.m4
new file mode 100644 (file)
index 0000000..ce7a8a4
--- /dev/null
@@ -0,0 +1,33 @@
+# intmax.m4 serial 3 (gettext-0.16)
+dnl Copyright (C) 2002-2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether the system has the 'intmax_t' type, but don't attempt to
+dnl find a replacement if it is lacking.
+
+AC_DEFUN([gt_TYPE_INTMAX_T],
+[
+  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+  AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
+    [AC_TRY_COMPILE([
+#include <stddef.h>
+#include <stdlib.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+#include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+#include <inttypes.h>
+#endif
+],     [intmax_t x = -1;
+        return !x;],
+       gt_cv_c_intmax_t=yes,
+       gt_cv_c_intmax_t=no)])
+  if test $gt_cv_c_intmax_t = yes; then
+    AC_DEFINE(HAVE_INTMAX_T, 1,
+      [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
+  fi
+])
diff --git a/m4/inttypes-pri.m4 b/m4/inttypes-pri.m4
new file mode 100644 (file)
index 0000000..7c7f894
--- /dev/null
@@ -0,0 +1,36 @@
+# inttypes-pri.m4 serial 4 (gettext-0.16)
+dnl Copyright (C) 1997-2002, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ(2.52)
+
+# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
+# macros to non-string values.  This is the case on AIX 4.3.3.
+
+AC_DEFUN([gt_INTTYPES_PRI],
+[
+  AC_CHECK_HEADERS([inttypes.h])
+  if test $ac_cv_header_inttypes_h = yes; then
+    AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
+      gt_cv_inttypes_pri_broken,
+      [
+        AC_TRY_COMPILE([#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
+      ])
+  fi
+  if test "$gt_cv_inttypes_pri_broken" = yes; then
+    AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
+      [Define if <inttypes.h> exists and defines unusable PRI* macros.])
+    PRI_MACROS_BROKEN=1
+  else
+    PRI_MACROS_BROKEN=0
+  fi
+  AC_SUBST([PRI_MACROS_BROKEN])
+])
diff --git a/m4/inttypes.m4 b/m4/inttypes.m4
new file mode 100644 (file)
index 0000000..779bcea
--- /dev/null
@@ -0,0 +1,25 @@
+# inttypes.m4 serial 1 (gettext-0.11.4)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
+# <sys/types.h>.
+
+AC_DEFUN([gt_HEADER_INTTYPES_H],
+[
+  AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
+  [
+    AC_TRY_COMPILE(
+      [#include <sys/types.h>
+#include <inttypes.h>],
+      [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
+  ])
+  if test $gt_cv_header_inttypes_h = yes; then
+    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
+      [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
+  fi
+])
diff --git a/m4/inttypes_h.m4 b/m4/inttypes_h.m4
new file mode 100644 (file)
index 0000000..edc8ecb
--- /dev/null
@@ -0,0 +1,26 @@
+# inttypes_h.m4 serial 7
+dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
+[
+  AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h,
+  [AC_TRY_COMPILE(
+    [#include <sys/types.h>
+#include <inttypes.h>],
+    [uintmax_t i = (uintmax_t) -1; return !i;],
+    gl_cv_header_inttypes_h=yes,
+    gl_cv_header_inttypes_h=no)])
+  if test $gl_cv_header_inttypes_h = yes; then
+    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
+      [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
+       and declares uintmax_t. ])
+  fi
+])
diff --git a/m4/isc-posix.m4 b/m4/isc-posix.m4
new file mode 100644 (file)
index 0000000..74dc8f2
--- /dev/null
@@ -0,0 +1,24 @@
+# isc-posix.m4 serial 2 (gettext-0.11.2)
+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# This file is not needed with autoconf-2.53 and newer.  Remove it in 2005.
+
+# This test replaces the one in autoconf.
+# Currently this macro should have the same name as the autoconf macro
+# because gettext's gettext.m4 (distributed in the automake package)
+# still uses it.  Otherwise, the use in gettext.m4 makes autoheader
+# give these diagnostics:
+#   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
+#   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
+
+undefine([AC_ISC_POSIX])
+
+AC_DEFUN([AC_ISC_POSIX],
+  [
+    dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
+    AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
+  ]
+)
diff --git a/m4/lcmessage.m4 b/m4/lcmessage.m4
new file mode 100644 (file)
index 0000000..19aa77e
--- /dev/null
@@ -0,0 +1,30 @@
+# lcmessage.m4 serial 4 (gettext-0.14.2)
+dnl Copyright (C) 1995-2002, 2004-2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995.
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+
+AC_DEFUN([gt_LC_MESSAGES],
+[
+  AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES,
+    [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+       gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)])
+  if test $gt_cv_val_LC_MESSAGES = yes; then
+    AC_DEFINE(HAVE_LC_MESSAGES, 1,
+      [Define if your <locale.h> file defines LC_MESSAGES.])
+  fi
+])
diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4
new file mode 100644 (file)
index 0000000..96c4e2c
--- /dev/null
@@ -0,0 +1,110 @@
+# lib-ld.m4 serial 3 (gettext-0.13)
+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
+dnl with libtool.m4.
+
+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  acl_cv_prog_gnu_ld=yes ;;
+*)
+  acl_cv_prog_gnu_ld=no ;;
+esac])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-1.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_ARG_WITH(gnu-ld,
+[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by GCC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]* | [A-Za-z]:[\\/]*)]
+      [re_direlt='/[^/][^/]*/\.\./']
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+       ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(acl_cv_path_LD,
+[if test -z "$LD"; then
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      acl_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+      *GNU* | *'with BFD'*)
+       test "$with_gnu_ld" != no && break ;;
+      *)
+       test "$with_gnu_ld" != yes && break ;;
+      esac
+    fi
+  done
+  IFS="$ac_save_ifs"
+else
+  acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4
new file mode 100644 (file)
index 0000000..f95b7ba
--- /dev/null
@@ -0,0 +1,644 @@
+# lib-link.m4 serial 9 (gettext-0.16)
+dnl Copyright (C) 2001-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ(2.50)
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+  define([Name],[translit([$1],[./-], [___])])
+  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+    AC_LIB_LINKFLAGS_BODY([$1], [$2])
+    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+  ])
+  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+  AC_SUBST([LIB]NAME)
+  AC_SUBST([LTLIB]NAME)
+  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+  dnl results of this search when this library appears as a dependency.
+  HAVE_LIB[]NAME=yes
+  undefine([Name])
+  undefine([NAME])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. If found, it
+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+  define([Name],[translit([$1],[./-], [___])])
+  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+
+  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+  dnl accordingly.
+  AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+  dnl because if the user has installed lib[]Name and not disabled its use
+  dnl via --without-lib[]Name-prefix, he wants to use it.
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+    ac_save_LIBS="$LIBS"
+    LIBS="$LIBS $LIB[]NAME"
+    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
+    LIBS="$ac_save_LIBS"
+  ])
+  if test "$ac_cv_lib[]Name" = yes; then
+    HAVE_LIB[]NAME=yes
+    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
+    AC_MSG_CHECKING([how to link with lib[]$1])
+    AC_MSG_RESULT([$LIB[]NAME])
+  else
+    HAVE_LIB[]NAME=no
+    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+    dnl $INC[]NAME either.
+    CPPFLAGS="$ac_save_CPPFLAGS"
+    LIB[]NAME=
+    LTLIB[]NAME=
+  fi
+  AC_SUBST([HAVE_LIB]NAME)
+  AC_SUBST([LIB]NAME)
+  AC_SUBST([LTLIB]NAME)
+  undefine([Name])
+  undefine([NAME])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
+dnl hardcode_direct, hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
+  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
+  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
+  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
+  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
+  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
+    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+    . ./conftest.sh
+    rm -f ./conftest.sh
+    acl_cv_rpath=done
+  ])
+  wl="$acl_cv_wl"
+  libext="$acl_cv_libext"
+  shlibext="$acl_cv_shlibext"
+  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+  hardcode_direct="$acl_cv_hardcode_direct"
+  hardcode_minus_L="$acl_cv_hardcode_minus_L"
+  dnl Determine whether the user wants rpath handling at all.
+  AC_ARG_ENABLE(rpath,
+    [  --disable-rpath         do not hardcode runtime library paths],
+    :, enable_rpath=yes)
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  dnl By default, look in $includedir and $libdir.
+  use_additional=yes
+  AC_LIB_WITH_FINAL_PREFIX([
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+  ])
+  AC_LIB_ARG_WITH([lib$1-prefix],
+[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
+  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
+[
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+        AC_LIB_WITH_FINAL_PREFIX([
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+        ])
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+      fi
+    fi
+])
+  dnl Search the library and its dependencies in $additional_libdir and
+  dnl $LDFLAGS. Using breadth-first-seach.
+  LIB[]NAME=
+  LTLIB[]NAME=
+  INC[]NAME=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='$1 $2'
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+        dnl or AC_LIB_HAVE_LINKFLAGS call.
+        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+          else
+            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+            dnl that this library doesn't exist. So just drop it.
+            :
+          fi
+        else
+          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+          dnl and the already constructed $LIBNAME/$LTLIBNAME.
+          found_dir=
+          found_la=
+          found_so=
+          found_a=
+          if test $use_additional = yes; then
+            if test -n "$shlibext" \
+               && { test -f "$additional_libdir/lib$name.$shlibext" \
+                    || { test "$shlibext" = dll \
+                         && test -f "$additional_libdir/lib$name.dll.a"; }; }; then
+              found_dir="$additional_libdir"
+              if test -f "$additional_libdir/lib$name.$shlibext"; then
+                found_so="$additional_libdir/lib$name.$shlibext"
+              else
+                found_so="$additional_libdir/lib$name.dll.a"
+              fi
+              if test -f "$additional_libdir/lib$name.la"; then
+                found_la="$additional_libdir/lib$name.la"
+              fi
+            else
+              if test -f "$additional_libdir/lib$name.$libext"; then
+                found_dir="$additional_libdir"
+                found_a="$additional_libdir/lib$name.$libext"
+                if test -f "$additional_libdir/lib$name.la"; then
+                  found_la="$additional_libdir/lib$name.la"
+                fi
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIB[]NAME; do
+              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                  if test -n "$shlibext" \
+                     && { test -f "$dir/lib$name.$shlibext" \
+                          || { test "$shlibext" = dll \
+                               && test -f "$dir/lib$name.dll.a"; }; }; then
+                    found_dir="$dir"
+                    if test -f "$dir/lib$name.$shlibext"; then
+                      found_so="$dir/lib$name.$shlibext"
+                    else
+                      found_so="$dir/lib$name.dll.a"
+                    fi
+                    if test -f "$dir/lib$name.la"; then
+                      found_la="$dir/lib$name.la"
+                    fi
+                  else
+                    if test -f "$dir/lib$name.$libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/lib$name.$libext"
+                      if test -f "$dir/lib$name.la"; then
+                        found_la="$dir/lib$name.la"
+                      fi
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+            dnl Found the library.
+            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+              dnl Linking with a shared library. We attempt to hardcode its
+              dnl directory into the executable's runpath, unless it's the
+              dnl standard /usr/lib.
+              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
+                dnl No hardcoding is needed.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+              else
+                dnl Use an explicit option to hardcode DIR into the resulting
+                dnl binary.
+                dnl Potentially add DIR to ltrpathdirs.
+                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                dnl The hardcoding into $LIBNAME is system dependent.
+                if test "$hardcode_direct" = yes; then
+                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+                  dnl resulting binary.
+                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                else
+                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+                    dnl Use an explicit option to hardcode DIR into the resulting
+                    dnl binary.
+                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                    dnl Potentially add DIR to rpathdirs.
+                    dnl The rpathdirs will be appended to $LIBNAME at the end.
+                    haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                    dnl Rely on "-L$found_dir".
+                    dnl But don't add it if it's already contained in the LDFLAGS
+                    dnl or the already constructed $LIBNAME
+                    haveit=
+                    for x in $LDFLAGS $LIB[]NAME; do
+                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+                    fi
+                    if test "$hardcode_minus_L" != no; then
+                      dnl FIXME: Not sure whether we should use
+                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+                      dnl here.
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                    else
+                      dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
+                      dnl here, because this doesn't fit in flags passed to the
+                      dnl compiler. So give up. No hardcoding. This affects only
+                      dnl very old systems.
+                      dnl FIXME: Not sure whether we should use
+                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+                      dnl here.
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                dnl Linking with a static library.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+              else
+                dnl We shouldn't come here, but anyway it's good to have a
+                dnl fallback.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+              fi
+            fi
+            dnl Assume the include files are nearby.
+            additional_includedir=
+            case "$found_dir" in
+              */$acl_libdirstem | */$acl_libdirstem/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+              dnl Potentially add $additional_includedir to $INCNAME.
+              dnl But don't add it
+              dnl   1. if it's the standard /usr/include,
+              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
+              dnl   3. if it's already present in $CPPFLAGS or the already
+              dnl      constructed $INCNAME,
+              dnl   4. if it doesn't exist as a directory.
+              if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INC[]NAME; do
+                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                      dnl Really add $additional_includedir to $INCNAME.
+                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+            dnl Look for dependencies.
+            if test -n "$found_la"; then
+              dnl Read the .la file. It defines the variables
+              dnl dlname, library_names, old_library, dependency_libs, current,
+              dnl age, revision, installed, dlopen, dlpreopen, libdir.
+              save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+              dnl We use only dependency_libs.
+              for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+                    dnl But don't add it
+                    dnl   1. if it's the standard /usr/lib,
+                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
+                    dnl   3. if it's already present in $LDFLAGS or the already
+                    dnl      constructed $LIBNAME,
+                    dnl   4. if it doesn't exist as a directory.
+                    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIB[]NAME; do
+                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                            dnl Really add $additional_libdir to $LIBNAME.
+                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIB[]NAME; do
+                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                            dnl Really add $additional_libdir to $LTLIBNAME.
+                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                      dnl Potentially add DIR to rpathdirs.
+                      dnl The rpathdirs will be appended to $LIBNAME at the end.
+                      haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                      dnl Potentially add DIR to ltrpathdirs.
+                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+                      haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                    dnl Handle this in the next round.
+                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                    ;;
+                  *.la)
+                    dnl Handle this in the next round. Throw away the .la's
+                    dnl directory; it is already contained in a preceding -L
+                    dnl option.
+                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                    dnl Most likely an immediate library name.
+                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+            dnl Didn't find the library; assume it is in the system directories
+            dnl known to the linker and runtime loader. (All the system
+            dnl directories known to the linker should also be known to the
+            dnl runtime loader, otherwise the system is severely misconfigured.)
+            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$hardcode_libdir_separator"; then
+      dnl Weird platform: only the last -rpath option counts, the user must
+      dnl pass all path elements in one option. We can arrange that for a
+      dnl single library, but not when more than one $LIBNAMEs are used.
+      alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+      done
+      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
+      acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+    else
+      dnl The -rpath options are cumulative.
+      for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+    dnl When using libtool, the option that works for both libraries and
+    dnl executables is -R. The -R options are cumulative.
+    for found_dir in $ltrpathdirs; do
+      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+    done
+  fi
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+  for element in [$2]; do
+    haveit=
+    for x in $[$1]; do
+      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      [$1]="${[$1]}${[$1]:+ }$element"
+    fi
+  done
+])
+
+dnl For those cases where a variable contains several -L and -l options
+dnl referring to unknown libraries and directories, this macro determines the
+dnl necessary additional linker options for the runtime path.
+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
+dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
+dnl otherwise linking without libtool is assumed.
+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
+[
+  AC_REQUIRE([AC_LIB_RPATH])
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  $1=
+  if test "$enable_rpath" != no; then
+    if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+      dnl Use an explicit option to hardcode directories into the resulting
+      dnl binary.
+      rpathdirs=
+      next=
+      for opt in $2; do
+        if test -n "$next"; then
+          dir="$next"
+          dnl No need to hardcode the standard /usr/lib.
+          if test "X$dir" != "X/usr/$acl_libdirstem"; then
+            rpathdirs="$rpathdirs $dir"
+          fi
+          next=
+        else
+          case $opt in
+            -L) next=yes ;;
+            -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
+                 dnl No need to hardcode the standard /usr/lib.
+                 if test "X$dir" != "X/usr/$acl_libdirstem"; then
+                   rpathdirs="$rpathdirs $dir"
+                 fi
+                 next= ;;
+            *) next= ;;
+          esac
+        fi
+      done
+      if test "X$rpathdirs" != "X"; then
+        if test -n ""$3""; then
+          dnl libtool is used for linking. Use -R options.
+          for dir in $rpathdirs; do
+            $1="${$1}${$1:+ }-R$dir"
+          done
+        else
+          dnl The linker is used for linking directly.
+          if test -n "$hardcode_libdir_separator"; then
+            dnl Weird platform: only the last -rpath option counts, the user
+            dnl must pass all path elements in one option.
+            alldirs=
+            for dir in $rpathdirs; do
+              alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir"
+            done
+            acl_save_libdir="$libdir"
+            libdir="$alldirs"
+            eval flag=\"$hardcode_libdir_flag_spec\"
+            libdir="$acl_save_libdir"
+            $1="$flag"
+          else
+            dnl The -rpath options are cumulative.
+            for dir in $rpathdirs; do
+              acl_save_libdir="$libdir"
+              libdir="$dir"
+              eval flag=\"$hardcode_libdir_flag_spec\"
+              libdir="$acl_save_libdir"
+              $1="${$1}${$1:+ }$flag"
+            done
+          fi
+        fi
+      fi
+    fi
+  fi
+  AC_SUBST([$1])
+])
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4
new file mode 100644 (file)
index 0000000..a8684e1
--- /dev/null
@@ -0,0 +1,185 @@
+# lib-prefix.m4 serial 5 (gettext-0.15)
+dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
+dnl require excessive bracketing.
+ifdef([AC_HELP_STRING],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  dnl By default, look in $includedir and $libdir.
+  use_additional=yes
+  AC_LIB_WITH_FINAL_PREFIX([
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+  ])
+  AC_LIB_ARG_WITH([lib-prefix],
+[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+  --without-lib-prefix    don't search for libraries in includedir and libdir],
+[
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+        AC_LIB_WITH_FINAL_PREFIX([
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+        ])
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+      fi
+    fi
+])
+  if test $use_additional = yes; then
+    dnl Potentially add $additional_includedir to $CPPFLAGS.
+    dnl But don't add it
+    dnl   1. if it's the standard /usr/include,
+    dnl   2. if it's already present in $CPPFLAGS,
+    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
+    dnl   4. if it doesn't exist as a directory.
+    if test "X$additional_includedir" != "X/usr/include"; then
+      haveit=
+      for x in $CPPFLAGS; do
+        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+        if test "X$x" = "X-I$additional_includedir"; then
+          haveit=yes
+          break
+        fi
+      done
+      if test -z "$haveit"; then
+        if test "X$additional_includedir" = "X/usr/local/include"; then
+          if test -n "$GCC"; then
+            case $host_os in
+              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+            esac
+          fi
+        fi
+        if test -z "$haveit"; then
+          if test -d "$additional_includedir"; then
+            dnl Really add $additional_includedir to $CPPFLAGS.
+            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+          fi
+        fi
+      fi
+    fi
+    dnl Potentially add $additional_libdir to $LDFLAGS.
+    dnl But don't add it
+    dnl   1. if it's the standard /usr/lib,
+    dnl   2. if it's already present in $LDFLAGS,
+    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
+    dnl   4. if it doesn't exist as a directory.
+    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+      haveit=
+      for x in $LDFLAGS; do
+        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+        if test "X$x" = "X-L$additional_libdir"; then
+          haveit=yes
+          break
+        fi
+      done
+      if test -z "$haveit"; then
+        if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+          if test -n "$GCC"; then
+            case $host_os in
+              linux*) haveit=yes;;
+            esac
+          fi
+        fi
+        if test -z "$haveit"; then
+          if test -d "$additional_libdir"; then
+            dnl Really add $additional_libdir to $LDFLAGS.
+            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+          fi
+        fi
+      fi
+    fi
+  fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+  dnl Unfortunately, prefix and exec_prefix get only finally determined
+  dnl at the end of configure.
+  if test "X$prefix" = "XNONE"; then
+    acl_final_prefix="$ac_default_prefix"
+  else
+    acl_final_prefix="$prefix"
+  fi
+  if test "X$exec_prefix" = "XNONE"; then
+    acl_final_exec_prefix='${prefix}'
+  else
+    acl_final_exec_prefix="$exec_prefix"
+  fi
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+  prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  $1
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
+dnl the basename of the libdir, either "lib" or "lib64".
+AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
+[
+  dnl There is no formal standard regarding lib and lib64. The current
+  dnl practice is that on a system supporting 32-bit and 64-bit instruction
+  dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
+  dnl libraries go under $prefix/lib. We determine the compiler's default
+  dnl mode by looking at the compiler's library search path. If at least
+  dnl of its elements ends in /lib64 or points to a directory whose absolute
+  dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
+  dnl default, namely "lib".
+  acl_libdirstem=lib
+  searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+  if test -n "$searchpath"; then
+    acl_save_IFS="${IFS=       }"; IFS=":"
+    for searchdir in $searchpath; do
+      if test -d "$searchdir"; then
+        case "$searchdir" in
+          */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+          *) searchdir=`cd "$searchdir" && pwd`
+             case "$searchdir" in
+               */lib64 ) acl_libdirstem=lib64 ;;
+             esac ;;
+        esac
+      fi
+    done
+    IFS="$acl_save_IFS"
+  fi
+])
diff --git a/m4/lock.m4 b/m4/lock.m4
new file mode 100644 (file)
index 0000000..0224f2f
--- /dev/null
@@ -0,0 +1,311 @@
+# lock.m4 serial 6 (gettext-0.16)
+dnl Copyright (C) 2005-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl Tests for a multithreading library to be used.
+dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS,
+dnl USE_PTH_THREADS, USE_WIN32_THREADS
+dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use
+dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with
+dnl libtool).
+dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for
+dnl programs that really need multithread functionality. The difference
+dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak
+dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread".
+dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
+dnl multithread-safe programs.
+
+AC_DEFUN([gl_LOCK_EARLY],
+[
+  AC_REQUIRE([gl_LOCK_EARLY_BODY])
+])
+
+dnl The guts of gl_LOCK_EARLY. Needs to be expanded only once.
+
+AC_DEFUN([gl_LOCK_EARLY_BODY],
+[
+  dnl Ordering constraints: This macro modifies CPPFLAGS in a way that
+  dnl influences the result of the autoconf tests that test for *_unlocked
+  dnl declarations, on AIX 5 at least. Therefore it must come early.
+  AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl
+  AC_BEFORE([$0], [gl_ARGP])dnl
+
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([AC_GNU_SOURCE]) dnl needed for pthread_rwlock_t on glibc systems
+  dnl Check for multithreading.
+  AC_ARG_ENABLE(threads,
+AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API])
+AC_HELP_STRING([--disable-threads], [build without multithread safety]),
+    [gl_use_threads=$enableval],
+    [case "$host_os" in
+       dnl Disable multithreading by default on OSF/1, because it interferes
+       dnl with fork()/exec(): When msgexec is linked with -lpthread, its child
+       dnl process gets an endless segmentation fault inside execvp().
+       osf*) gl_use_threads=no ;;
+       *)    gl_use_threads=yes ;;
+     esac
+    ])
+  if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+    # For using <pthread.h>:
+    case "$host_os" in
+      osf*)
+        # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
+        # groks <pthread.h>. cc also understands the flag -pthread, but
+        # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
+        # 2. putting a flag into CPPFLAGS that has an effect on the linker
+        # causes the AC_TRY_LINK test below to succeed unexpectedly,
+        # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
+        CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+        ;;
+    esac
+    # Some systems optimize for single-threaded programs by default, and
+    # need special flags to disable these optimizations. For example, the
+    # definition of 'errno' in <errno.h>.
+    case "$host_os" in
+      aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
+      solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
+    esac
+  fi
+])
+
+dnl The guts of gl_LOCK. Needs to be expanded only once.
+
+AC_DEFUN([gl_LOCK_BODY],
+[
+  AC_REQUIRE([gl_LOCK_EARLY_BODY])
+  gl_threads_api=none
+  LIBTHREAD=
+  LTLIBTHREAD=
+  LIBMULTITHREAD=
+  LTLIBMULTITHREAD=
+  if test "$gl_use_threads" != no; then
+    dnl Check whether the compiler and linker support weak declarations.
+    AC_MSG_CHECKING([whether imported symbols can be declared weak])
+    gl_have_weak=no
+    AC_TRY_LINK([extern void xyzzy ();
+#pragma weak xyzzy], [xyzzy();], [gl_have_weak=yes])
+    AC_MSG_RESULT([$gl_have_weak])
+    if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+      # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
+      # it groks <pthread.h>. It's added above, in gl_LOCK_EARLY_BODY.
+      AC_CHECK_HEADER(pthread.h, gl_have_pthread_h=yes, gl_have_pthread_h=no)
+      if test "$gl_have_pthread_h" = yes; then
+        # Other possible tests:
+        #   -lpthreads (FSU threads, PCthreads)
+        #   -lgthreads
+        gl_have_pthread=
+        # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
+        # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
+        # the second one only in libpthread, and lock.c needs it.
+        AC_TRY_LINK([#include <pthread.h>],
+          [pthread_mutex_lock((pthread_mutex_t*)0);
+           pthread_mutexattr_init((pthread_mutexattr_t*)0);],
+          [gl_have_pthread=yes])
+        # Test for libpthread by looking for pthread_kill. (Not pthread_self,
+        # since it is defined as a macro on OSF/1.)
+        if test -n "$gl_have_pthread"; then
+          # The program links fine without libpthread. But it may actually
+          # need to link with libpthread in order to create multiple threads.
+          AC_CHECK_LIB(pthread, pthread_kill,
+            [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
+             # On Solaris and HP-UX, most pthread functions exist also in libc.
+             # Therefore pthread_in_use() needs to actually try to create a
+             # thread: pthread_create from libc will fail, whereas
+             # pthread_create will actually create a thread.
+             case "$host_os" in
+               solaris* | hpux*)
+                 AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], 1,
+                   [Define if the pthread_in_use() detection is hard.])
+             esac
+            ])
+        else
+          # Some library is needed. Try libpthread and libc_r.
+          AC_CHECK_LIB(pthread, pthread_kill,
+            [gl_have_pthread=yes
+             LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
+             LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread])
+          if test -z "$gl_have_pthread"; then
+            # For FreeBSD 4.
+            AC_CHECK_LIB(c_r, pthread_kill,
+              [gl_have_pthread=yes
+               LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
+               LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r])
+          fi
+        fi
+        if test -n "$gl_have_pthread"; then
+          gl_threads_api=posix
+          AC_DEFINE([USE_POSIX_THREADS], 1,
+            [Define if the POSIX multithreading library can be used.])
+          if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
+            if test $gl_have_weak = yes; then
+              AC_DEFINE([USE_POSIX_THREADS_WEAK], 1,
+                [Define if references to the POSIX multithreading library should be made weak.])
+              LIBTHREAD=
+              LTLIBTHREAD=
+            fi
+          fi
+          # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the
+          # pthread_rwlock_* functions.
+          AC_CHECK_TYPE([pthread_rwlock_t],
+            [AC_DEFINE([HAVE_PTHREAD_RWLOCK], 1,
+               [Define if the POSIX multithreading library has read/write locks.])],
+            [],
+            [#include <pthread.h>])
+          # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
+          AC_TRY_COMPILE([#include <pthread.h>],
+            [#if __FreeBSD__ == 4
+error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
+#else
+int x = (int)PTHREAD_MUTEX_RECURSIVE;
+return !x;
+#endif],
+            [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], 1,
+               [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])])
+        fi
+      fi
+    fi
+    if test -z "$gl_have_pthread"; then
+      if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
+        gl_have_solaristhread=
+        gl_save_LIBS="$LIBS"
+        LIBS="$LIBS -lthread"
+        AC_TRY_LINK([#include <thread.h>
+#include <synch.h>],
+          [thr_self();],
+          [gl_have_solaristhread=yes])
+        LIBS="$gl_save_LIBS"
+        if test -n "$gl_have_solaristhread"; then
+          gl_threads_api=solaris
+          LIBTHREAD=-lthread
+          LTLIBTHREAD=-lthread
+          LIBMULTITHREAD="$LIBTHREAD"
+          LTLIBMULTITHREAD="$LTLIBTHREAD"
+          AC_DEFINE([USE_SOLARIS_THREADS], 1,
+            [Define if the old Solaris multithreading library can be used.])
+          if test $gl_have_weak = yes; then
+            AC_DEFINE([USE_SOLARIS_THREADS_WEAK], 1,
+              [Define if references to the old Solaris multithreading library should be made weak.])
+            LIBTHREAD=
+            LTLIBTHREAD=
+          fi
+        fi
+      fi
+    fi
+    if test "$gl_use_threads" = pth; then
+      gl_save_CPPFLAGS="$CPPFLAGS"
+      AC_LIB_LINKFLAGS(pth)
+      gl_have_pth=
+      gl_save_LIBS="$LIBS"
+      LIBS="$LIBS -lpth"
+      AC_TRY_LINK([#include <pth.h>], [pth_self();], gl_have_pth=yes)
+      LIBS="$gl_save_LIBS"
+      if test -n "$gl_have_pth"; then
+        gl_threads_api=pth
+        LIBTHREAD="$LIBPTH"
+        LTLIBTHREAD="$LTLIBPTH"
+        LIBMULTITHREAD="$LIBTHREAD"
+        LTLIBMULTITHREAD="$LTLIBTHREAD"
+        AC_DEFINE([USE_PTH_THREADS], 1,
+          [Define if the GNU Pth multithreading library can be used.])
+        if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
+          if test $gl_have_weak = yes; then
+            AC_DEFINE([USE_PTH_THREADS_WEAK], 1,
+              [Define if references to the GNU Pth multithreading library should be made weak.])
+            LIBTHREAD=
+            LTLIBTHREAD=
+          fi
+        fi
+      else
+        CPPFLAGS="$gl_save_CPPFLAGS"
+      fi
+    fi
+    if test -z "$gl_have_pthread"; then
+      if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then
+        if { case "$host_os" in
+               mingw*) true;;
+               *) false;;
+             esac
+           }; then
+          gl_threads_api=win32
+          AC_DEFINE([USE_WIN32_THREADS], 1,
+            [Define if the Win32 multithreading API can be used.])
+        fi
+      fi
+    fi
+  fi
+  AC_MSG_CHECKING([for multithread API to use])
+  AC_MSG_RESULT([$gl_threads_api])
+  AC_SUBST(LIBTHREAD)
+  AC_SUBST(LTLIBTHREAD)
+  AC_SUBST(LIBMULTITHREAD)
+  AC_SUBST(LTLIBMULTITHREAD)
+])
+
+AC_DEFUN([gl_LOCK],
+[
+  AC_REQUIRE([gl_LOCK_EARLY])
+  AC_REQUIRE([gl_LOCK_BODY])
+  gl_PREREQ_LOCK
+])
+
+# Prerequisites of lib/lock.c.
+AC_DEFUN([gl_PREREQ_LOCK], [
+  AC_REQUIRE([AC_C_INLINE])
+])
+
+dnl Survey of platforms:
+dnl
+dnl Platform          Available   Compiler    Supports   test-lock
+dnl                   flavours    option      weak       result
+dnl ---------------   ---------   ---------   --------   ---------
+dnl Linux 2.4/glibc   posix       -lpthread       Y      OK
+dnl
+dnl GNU Hurd/glibc    posix
+dnl
+dnl FreeBSD 5.3       posix       -lc_r           Y
+dnl                   posix       -lkse ?         Y
+dnl                   posix       -lpthread ?     Y
+dnl                   posix       -lthr           Y
+dnl
+dnl FreeBSD 5.2       posix       -lc_r           Y
+dnl                   posix       -lkse           Y
+dnl                   posix       -lthr           Y
+dnl
+dnl FreeBSD 4.0,4.10  posix       -lc_r           Y      OK
+dnl
+dnl NetBSD 1.6        --
+dnl
+dnl OpenBSD 3.4       posix       -lpthread       Y      OK
+dnl
+dnl MacOS X 10.[123]  posix       -lpthread       Y      OK
+dnl
+dnl Solaris 7,8,9     posix       -lpthread       Y      Sol 7,8: 0.0; Sol 9: OK
+dnl                   solaris     -lthread        Y      Sol 7,8: 0.0; Sol 9: OK
+dnl
+dnl HP-UX 11          posix       -lpthread       N (cc) OK
+dnl                                               Y (gcc)
+dnl
+dnl IRIX 6.5          posix       -lpthread       Y      0.5
+dnl
+dnl AIX 4.3,5.1       posix       -lpthread       N      AIX 4: 0.5; AIX 5: OK
+dnl
+dnl OSF/1 4.0,5.1     posix       -pthread (cc)   N      OK
+dnl                               -lpthread (gcc) Y
+dnl
+dnl Cygwin            posix       -lpthread       Y      OK
+dnl
+dnl Any of the above  pth         -lpth                  0.0
+dnl
+dnl Mingw             win32                       N      OK
+dnl
+dnl BeOS 5            --
+dnl
+dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is
+dnl turned off:
+dnl   OK if all three tests terminate OK,
+dnl   0.5 if the first test terminates OK but the second one loops endlessly,
+dnl   0.0 if the first test already loops endlessly.
diff --git a/m4/longdouble.m4 b/m4/longdouble.m4
new file mode 100644 (file)
index 0000000..25590f4
--- /dev/null
@@ -0,0 +1,31 @@
+# longdouble.m4 serial 2 (gettext-0.15)
+dnl Copyright (C) 2002-2003, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether the compiler supports the 'long double' type.
+dnl Prerequisite: AC_PROG_CC
+
+dnl This file is only needed in autoconf <= 2.59.  Newer versions of autoconf
+dnl have a macro AC_TYPE_LONG_DOUBLE with identical semantics.
+
+AC_DEFUN([gt_TYPE_LONGDOUBLE],
+[
+  AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
+    [if test "$GCC" = yes; then
+       gt_cv_c_long_double=yes
+     else
+       AC_TRY_COMPILE([
+         /* The Stardent Vistra knows sizeof(long double), but does not support it.  */
+         long double foo = 0.0;
+         /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
+         int array [2*(sizeof(long double) >= sizeof(double)) - 1];
+         ], ,
+         gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
+     fi])
+  if test $gt_cv_c_long_double = yes; then
+    AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
+  fi
+])
diff --git a/m4/longlong.m4 b/m4/longlong.m4
new file mode 100644 (file)
index 0000000..3716c09
--- /dev/null
@@ -0,0 +1,48 @@
+# longlong.m4 serial 8
+dnl Copyright (C) 1999-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_LONG_LONG_INT if 'long long int' works.
+# This fixes a bug in Autoconf 2.60, but can be removed once we
+# assume 2.61 everywhere.
+
+# Note: If the type 'long long int' exists but is only 32 bits large
+# (as on some very old compilers), AC_TYPE_LONG_LONG_INT will not be
+# defined. In this case you can treat 'long long int' like 'long int'.
+
+AC_DEFUN([AC_TYPE_LONG_LONG_INT],
+[
+  AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
+    [AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+         [[long long int ll = 9223372036854775807ll;
+           long long int nll = -9223372036854775807LL;
+           typedef int a[((-9223372036854775807LL < 0
+                           && 0 < 9223372036854775807ll)
+                          ? 1 : -1)];
+           int i = 63;]],
+         [[long long int llmax = 9223372036854775807ll;
+           return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+                   | (llmax / ll) | (llmax % ll));]])],
+       [ac_cv_type_long_long_int=yes],
+       [ac_cv_type_long_long_int=no])])
+  if test $ac_cv_type_long_long_int = yes; then
+    AC_DEFINE([HAVE_LONG_LONG_INT], 1,
+      [Define to 1 if the system has the type `long long int'.])
+  fi
+])
+
+# This macro is obsolescent and should go away soon.
+AC_DEFUN([gl_AC_TYPE_LONG_LONG],
+[
+  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+  ac_cv_type_long_long=$ac_cv_type_long_long_int
+  if test $ac_cv_type_long_long = yes; then
+    AC_DEFINE(HAVE_LONG_LONG, 1,
+      [Define if you have the 'long long' type.])
+  fi
+])
diff --git a/m4/nls.m4 b/m4/nls.m4
new file mode 100644 (file)
index 0000000..7967cc2
--- /dev/null
+++ b/m4/nls.m4
@@ -0,0 +1,31 @@
+# nls.m4 serial 3 (gettext-0.15)
+dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ(2.50)
+
+AC_DEFUN([AM_NLS],
+[
+  AC_MSG_CHECKING([whether NLS is requested])
+  dnl Default is enabled NLS
+  AC_ARG_ENABLE(nls,
+    [  --disable-nls           do not use Native Language Support],
+    USE_NLS=$enableval, USE_NLS=yes)
+  AC_MSG_RESULT($USE_NLS)
+  AC_SUBST(USE_NLS)
+])
diff --git a/m4/ortp.m4 b/m4/ortp.m4
new file mode 100644 (file)
index 0000000..e0f36ef
--- /dev/null
@@ -0,0 +1,16 @@
+AC_DEFUN([LP_CHECK_ORTP],[
+
+ortp_pkgconfig=true
+
+PKG_CHECK_MODULES([ORTP], [ortp], , [ortp_pkgconfig=false])
+
+if test $ortp_pkgconfig = false; then
+       AC_CHECK_HEADER([ortp/ortp.h], ,AC_MSG_ERROR([Could not find oRTP headers !]))
+       LIBS_save=$LIBS
+       AC_CHECK_LIB([ortp], [ortp_init], , AC_MSG_ERROR([Could not find oRTP library]))
+       ORTP_LIBS='-lortp'
+       LIBS=$LIBS_save
+fi
+AC_SUBST([ORTP_LIBS])
+AC_SUBST([ORTP_CFLAGS])
+])
diff --git a/m4/osip.m4 b/m4/osip.m4
new file mode 100644 (file)
index 0000000..629f92a
--- /dev/null
@@ -0,0 +1,61 @@
+dnl -*- autoconf -*-
+AC_DEFUN([LP_CHECK_OSIP2],[
+
+AC_ARG_WITH( osip,
+      [  --with-osip      Set prefix where osip can be found (ex:/usr or /usr/local)[default=/usr] ],
+      [ osip_prefix=${withval}],[ osip_prefix=/usr ])
+
+dnl FC6's compat-osip2 headers live into "/usr/include/osip2-2.2.2",
+dnl while  libraries are "/usr/lib/libosipparser2-2.2.2.so*".
+AC_ARG_WITH( osip-version,dnl
+AC_HELP_STRING([--with-osip-version=VERSION],
+       [Set osip legacy version @<:@empty@:>@]),
+       [osip_legacy_version="-${withval}"],
+       [osip_legacy_version=""])
+
+osip_pkgconfig=true
+osip_pkgconfig_file=libosip2
+if test -n "$osip_legacy_version"; then
+       osip_pkgconfig_file=libosip2${osip_legacy_version}
+fi
+
+PKG_CHECK_MODULES(OSIP, $osip_pkgconfig_file >= 3.0.0, ,osip_pkgconfig=false)
+
+if test $osip_pkgconfig = false; then
+
+       if test -z "$osip_legacy_version"; then
+               OSIP_CFLAGS="-I${osip_prefix}/include"
+       else
+               OSIP_CFLAGS="-I${osip_prefix}/include/osip2${osip_legacy_version}"
+       fi
+
+dnl check osip2 headers
+       CPPFLAGS_save=$CPPFLAGS
+       CPPFLAGS=$OSIP_CFLAGS
+       AC_CHECK_HEADER([osip2/osip.h], ,AC_MSG_ERROR([Could not find osip2 headers !]))
+       CPPFLAGS=$CPPFLAGS_save
+
+dnl check for osip2 libs
+       OSIP_LIBS="-L$osip_prefix/lib -losipparser2${osip_legacy_version}"
+       LDFLAGS_save=$LDFLAGS
+       LDFLAGS=$OSIP_LIBS
+       LIBS_save=$LIBS
+       case "$target_os" in
+               *mingw*)
+                       osip_aux_libs=
+                       ;;
+               *)
+                       osip_aux_libs=-lpthread
+                       ;;
+       esac
+       OSIP_LIBS="$OSIP_LIBS $osip_aux_libs"
+       AC_CHECK_LIB(osip2${osip_legacy_version},osip_init, , AC_MSG_ERROR([Could not find osip2 library !]),[-losipparser2${osip_legacy_version} $osip_aux_libs ])
+       AC_CHECK_LIB(osipparser2${osip_legacy_version},osip_message_init, , AC_MSG_ERROR([Could not find osipparser2 library !]),[$osip_aux_libs])
+       LDFLAGS=$LDFLAGS_save
+       LIBS=$LIBS_save
+fi
+
+AC_SUBST(OSIP_CFLAGS)
+AC_SUBST(OSIP_LIBS)
+
+])
diff --git a/m4/po.m4 b/m4/po.m4
new file mode 100644 (file)
index 0000000..00133ef
--- /dev/null
+++ b/m4/po.m4
@@ -0,0 +1,428 @@
+# po.m4 serial 13 (gettext-0.15)
+dnl Copyright (C) 1995-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ(2.50)
+
+dnl Checks for all prerequisites of the po subdirectory.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+  AC_REQUIRE([AC_PROG_INSTALL])dnl
+  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+  AC_REQUIRE([AM_NLS])dnl
+
+  dnl Perform the following tests also if --disable-nls has been given,
+  dnl because they are needed for "make dist" to work.
+
+  dnl Search for GNU msgfmt in the PATH.
+  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+  dnl The second test excludes FreeBSD msgfmt.
+  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+    [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+    :)
+  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+
+  dnl Test whether it is GNU msgfmt >= 0.15.
+changequote(,)dnl
+  case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+    *) MSGFMT_015=$MSGFMT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([MSGFMT_015])
+changequote(,)dnl
+  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+    *) GMSGFMT_015=$GMSGFMT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([GMSGFMT_015])
+
+  dnl Search for GNU xgettext 0.12 or newer in the PATH.
+  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+  dnl The second test excludes FreeBSD xgettext.
+  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+     (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+    :)
+  dnl Remove leftover from FreeBSD xgettext call.
+  rm -f messages.po
+
+  dnl Test whether it is GNU xgettext >= 0.15.
+changequote(,)dnl
+  case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+    *) XGETTEXT_015=$XGETTEXT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([XGETTEXT_015])
+
+  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+    [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
+
+  dnl Installation directories.
+  dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
+  dnl have to define it here, so that it can be used in po/Makefile.
+  test -n "$localedir" || localedir='${datadir}/locale'
+  AC_SUBST([localedir])
+
+  AC_CONFIG_COMMANDS([po-directories], [[
+    for ac_file in $CONFIG_FILES; do
+      # Support "outfile[:infile[:infile...]]"
+      case "$ac_file" in
+        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+      esac
+      # PO directories have a Makefile.in generated from Makefile.in.in.
+      case "$ac_file" in */Makefile.in)
+        # Adjust a relative srcdir.
+        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+        # In autoconf-2.13 it is called $ac_given_srcdir.
+        # In autoconf-2.50 it is called $srcdir.
+        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+        case "$ac_given_srcdir" in
+          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+          /*) top_srcdir="$ac_given_srcdir" ;;
+          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+        esac
+        # Treat a directory as a PO directory if and only if it has a
+        # POTFILES.in file. This allows packages to have multiple PO
+        # directories under different names or in different locations.
+        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+          rm -f "$ac_dir/POTFILES"
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[  ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+          POMAKEFILEDEPS="POTFILES.in"
+          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+          # on $ac_dir but don't depend on user-specified configuration
+          # parameters.
+          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+            # The LINGUAS file contains the set of available languages.
+            if test -n "$OBSOLETE_ALL_LINGUAS"; then
+              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+            fi
+            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+            # Hide the ALL_LINGUAS assigment from automake < 1.5.
+            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+          else
+            # The set of available languages was given in configure.in.
+            # Hide the ALL_LINGUAS assigment from automake < 1.5.
+            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+          fi
+          # Compute POFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+          # Compute UPDATEPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+          # Compute DUMMYPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+          # Compute GMOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+          case "$ac_given_srcdir" in
+            .) srcdirpre= ;;
+            *) srcdirpre='$(srcdir)/' ;;
+          esac
+          POFILES=
+          UPDATEPOFILES=
+          DUMMYPOFILES=
+          GMOFILES=
+          for lang in $ALL_LINGUAS; do
+            POFILES="$POFILES $srcdirpre$lang.po"
+            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+          done
+          # CATALOGS depends on both $ac_dir and the user's LINGUAS
+          # environment variable.
+          INST_LINGUAS=
+          if test -n "$ALL_LINGUAS"; then
+            for presentlang in $ALL_LINGUAS; do
+              useit=no
+              if test "%UNSET%" != "$LINGUAS"; then
+                desiredlanguages="$LINGUAS"
+              else
+                desiredlanguages="$ALL_LINGUAS"
+              fi
+              for desiredlang in $desiredlanguages; do
+                # Use the presentlang catalog if desiredlang is
+                #   a. equal to presentlang, or
+                #   b. a variant of presentlang (because in this case,
+                #      presentlang can be used as a fallback for messages
+                #      which are not translated in the desiredlang catalog).
+                case "$desiredlang" in
+                  "$presentlang"*) useit=yes;;
+                esac
+              done
+              if test $useit = yes; then
+                INST_LINGUAS="$INST_LINGUAS $presentlang"
+              fi
+            done
+          fi
+          CATALOGS=
+          if test -n "$INST_LINGUAS"; then
+            for lang in $INST_LINGUAS; do
+              CATALOGS="$CATALOGS $lang.gmo"
+            done
+          fi
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+            if test -f "$f"; then
+              case "$f" in
+                *.orig | *.bak | *~) ;;
+                *) cat "$f" >> "$ac_dir/Makefile" ;;
+              esac
+            fi
+          done
+        fi
+        ;;
+      esac
+    done]],
+   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+    # from automake < 1.5.
+    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+    # Capture the value of LINGUAS because we need it to compute CATALOGS.
+    LINGUAS="${LINGUAS-%UNSET%}"
+   ])
+])
+
+dnl Postprocesses a Makefile in a directory containing PO files.
+AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
+[
+  # When this code is run, in config.status, two variables have already been
+  # set:
+  # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
+  # - LINGUAS is the value of the environment variable LINGUAS at configure
+  #   time.
+
+changequote(,)dnl
+  # Adjust a relative srcdir.
+  ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+  ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+  ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+  # In autoconf-2.13 it is called $ac_given_srcdir.
+  # In autoconf-2.50 it is called $srcdir.
+  test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+  case "$ac_given_srcdir" in
+    .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+    /*) top_srcdir="$ac_given_srcdir" ;;
+    *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+  # Find a way to echo strings without interpreting backslash.
+  if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
+    gt_echo='echo'
+  else
+    if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
+      gt_echo='printf %s\n'
+    else
+      echo_func () {
+        cat <<EOT
+$*
+EOT
+      }
+      gt_echo='echo_func'
+    fi
+  fi
+
+  # A sed script that extracts the value of VARIABLE from a Makefile.
+  sed_x_variable='
+# Test if the hold space is empty.
+x
+s/P/P/
+x
+ta
+# Yes it was empty. Look if we have the expected variable definition.
+/^[     ]*VARIABLE[     ]*=/{
+  # Seen the first line of the variable definition.
+  s/^[  ]*VARIABLE[     ]*=//
+  ba
+}
+bd
+:a
+# Here we are processing a line from the variable definition.
+# Remove comment, more precisely replace it with a space.
+s/#.*$/ /
+# See if the line ends in a backslash.
+tb
+:b
+s/\\$//
+# Print the line, without the trailing backslash.
+p
+tc
+# There was no trailing backslash. The end of the variable definition is
+# reached. Clear the hold space.
+s/^.*$//
+x
+bd
+:c
+# A trailing backslash means that the variable definition continues in the
+# next line. Put a nonempty string into the hold space to indicate this.
+s/^.*$/P/
+x
+:d
+'
+changequote([,])dnl
+
+  # Set POTFILES to the value of the Makefile variable POTFILES.
+  sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
+  POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
+  # Compute POTFILES_DEPS as
+  #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
+  POTFILES_DEPS=
+  for file in $POTFILES; do
+    POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
+  done
+  POMAKEFILEDEPS=""
+
+  if test -n "$OBSOLETE_ALL_LINGUAS"; then
+    test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+  fi
+  if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+    # The LINGUAS file contains the set of available languages.
+    ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+    POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+  else
+    # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
+    sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
+    ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
+  fi
+  # Hide the ALL_LINGUAS assigment from automake < 1.5.
+  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+  # Compute POFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+  # Compute UPDATEPOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+  # Compute DUMMYPOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+  # Compute GMOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+  # Compute PROPERTIESFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
+  # Compute CLASSFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
+  # Compute QMFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
+  # Compute MSGFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
+  # Compute RESOURCESDLLFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
+  case "$ac_given_srcdir" in
+    .) srcdirpre= ;;
+    *) srcdirpre='$(srcdir)/' ;;
+  esac
+  POFILES=
+  UPDATEPOFILES=
+  DUMMYPOFILES=
+  GMOFILES=
+  PROPERTIESFILES=
+  CLASSFILES=
+  QMFILES=
+  MSGFILES=
+  RESOURCESDLLFILES=
+  for lang in $ALL_LINGUAS; do
+    POFILES="$POFILES $srcdirpre$lang.po"
+    UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+    DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+    GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+    PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
+    CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
+    QMFILES="$QMFILES $srcdirpre$lang.qm"
+    frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+    MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
+    frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+    RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
+  done
+  # CATALOGS depends on both $ac_dir and the user's LINGUAS
+  # environment variable.
+  INST_LINGUAS=
+  if test -n "$ALL_LINGUAS"; then
+    for presentlang in $ALL_LINGUAS; do
+      useit=no
+      if test "%UNSET%" != "$LINGUAS"; then
+        desiredlanguages="$LINGUAS"
+      else
+        desiredlanguages="$ALL_LINGUAS"
+      fi
+      for desiredlang in $desiredlanguages; do
+        # Use the presentlang catalog if desiredlang is
+        #   a. equal to presentlang, or
+        #   b. a variant of presentlang (because in this case,
+        #      presentlang can be used as a fallback for messages
+        #      which are not translated in the desiredlang catalog).
+        case "$desiredlang" in
+          "$presentlang"*) useit=yes;;
+        esac
+      done
+      if test $useit = yes; then
+        INST_LINGUAS="$INST_LINGUAS $presentlang"
+      fi
+    done
+  fi
+  CATALOGS=
+  JAVACATALOGS=
+  QTCATALOGS=
+  TCLCATALOGS=
+  CSHARPCATALOGS=
+  if test -n "$INST_LINGUAS"; then
+    for lang in $INST_LINGUAS; do
+      CATALOGS="$CATALOGS $lang.gmo"
+      JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
+      QTCATALOGS="$QTCATALOGS $lang.qm"
+      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+      TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
+      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+      CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
+    done
+  fi
+
+  sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
+  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
+    # Add dependencies that cannot be formulated as a simple suffix rule.
+    for lang in $ALL_LINGUAS; do
+      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+      cat >> "$ac_file.tmp" <<EOF
+$frobbedlang.msg: $lang.po
+       @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+       \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+    done
+  fi
+  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
+    # Add dependencies that cannot be formulated as a simple suffix rule.
+    for lang in $ALL_LINGUAS; do
+      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+      cat >> "$ac_file.tmp" <<EOF
+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
+       @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
+       \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+    done
+  fi
+  if test -n "$POMAKEFILEDEPS"; then
+    cat >> "$ac_file.tmp" <<EOF
+Makefile: $POMAKEFILEDEPS
+EOF
+  fi
+  mv "$ac_file.tmp" "$ac_file"
+])
diff --git a/m4/printf-posix.m4 b/m4/printf-posix.m4
new file mode 100644 (file)
index 0000000..af10170
--- /dev/null
@@ -0,0 +1,44 @@
+# printf-posix.m4 serial 2 (gettext-0.13.1)
+dnl Copyright (C) 2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether the printf() function supports POSIX/XSI format strings with
+dnl positions.
+
+AC_DEFUN([gt_PRINTF_POSIX],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
+    gt_cv_func_printf_posix,
+    [
+      AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+/* The string "%2$d %1$d", with dollar characters protected from the shell's
+   dollar expansion (possibly an autoconf bug).  */
+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
+static char buf[100];
+int main ()
+{
+  sprintf (buf, format, 33, 55);
+  return (strcmp (buf, "55 33") != 0);
+}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
+      [
+        AC_EGREP_CPP(notposix, [
+#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
+  notposix
+#endif
+        ], gt_cv_func_printf_posix="guessing no",
+           gt_cv_func_printf_posix="guessing yes")
+      ])
+    ])
+  case $gt_cv_func_printf_posix in
+    *yes)
+      AC_DEFINE(HAVE_POSIX_PRINTF, 1,
+        [Define if your printf() function supports format strings with positions.])
+      ;;
+  esac
+])
diff --git a/m4/progtest.m4 b/m4/progtest.m4
new file mode 100644 (file)
index 0000000..a56365c
--- /dev/null
@@ -0,0 +1,92 @@
+# progtest.m4 serial 4 (gettext-0.14.2)
+dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+AC_PREREQ(2.50)
+
+# Search path for a program which passes the given test.
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
+[
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  ac_executable_p="test -x"
+else
+  ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+  [[\\/]]* | ?:[[\\/]]*)
+    ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+    ;;
+  *)
+    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in ifelse([$5], , $PATH, [$5]); do
+      IFS="$ac_save_IFS"
+      test -z "$ac_dir" && ac_dir=.
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+          echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
+          if [$3]; then
+            ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
+            break 2
+          fi
+        fi
+      done
+    done
+    IFS="$ac_save_IFS"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+    ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+  AC_MSG_RESULT([$]$1)
+else
+  AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
diff --git a/m4/readline.m4 b/m4/readline.m4
new file mode 100644 (file)
index 0000000..8c4e185
--- /dev/null
@@ -0,0 +1,44 @@
+##################################################
+# Check for readline support.
+##################################################
+
+AC_DEFUN([LP_CHECK_READLINE],[
+
+AC_ARG_WITH( readline,
+      [  --with-readline      Set prefix where gnu readline headers and libs can be found (ex:/usr, /usr/local, none) [default=/usr] ],
+      [ readline_prefix=${withval}],[ readline_prefix="/usr" ])
+
+if test "$readline_prefix" != "none"; then
+
+       if test "$readline_prefix" != "/usr"; then
+               READLINE_CFLAGS="-I$readline_prefix/include"
+               READLINE_LIBS="-L$readline_prefix/lib"
+       fi
+       
+       CPPFLAGS_save=$CPPFLAGS
+       LIBS_save=$LIBS
+       CPPFLAGS="$CPPFLAGS $READLINE_CFLAGS"
+       LIBS="$LIBS $READLINE_LIBS"
+       AC_CHECK_HEADERS(readline.h readline/readline.h, readline_h_found=yes)
+       AC_CHECK_HEADERS(history.h readline/history.h)
+       
+       AC_CHECK_LIB(readline, readline, [readline_libs_found=yes],[],[-lncurses])
+       
+       LIBS=$LIBS_save
+       CPPFLAGS=$CPPFLAGS_save
+       
+       if test "$readline_libs_found$readline_h_found" != "yesyes" ; then
+               AC_MSG_WARN("Could not find libreadline headers or library, linphonec will have limited prompt features")
+       else
+               READLINE_LIBS="$READLINE_LIBS -lreadline -lncurses"
+       fi
+       
+       
+       AC_SUBST(READLINE_CFLAGS)
+       AC_SUBST(READLINE_LIBS)
+
+else
+       AC_MSG_NOTICE([Readline support disabled.])
+fi
+
+])
diff --git a/m4/signed.m4 b/m4/signed.m4
new file mode 100644 (file)
index 0000000..048f593
--- /dev/null
@@ -0,0 +1,17 @@
+# signed.m4 serial 1 (gettext-0.10.40)
+dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([bh_C_SIGNED],
+[
+  AC_CACHE_CHECK([for signed], bh_cv_c_signed,
+   [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
+  if test $bh_cv_c_signed = no; then
+    AC_DEFINE(signed, ,
+              [Define to empty if the C compiler doesn't support this keyword.])
+  fi
+])
diff --git a/m4/size_max.m4 b/m4/size_max.m4
new file mode 100644 (file)
index 0000000..bfba811
--- /dev/null
@@ -0,0 +1,62 @@
+# size_max.m4 serial 5
+dnl Copyright (C) 2003, 2005-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gl_SIZE_MAX],
+[
+  AC_CHECK_HEADERS(stdint.h)
+  dnl First test whether the system already has SIZE_MAX.
+  AC_MSG_CHECKING([for SIZE_MAX])
+  AC_CACHE_VAL([gl_cv_size_max], [
+    gl_cv_size_max=
+    AC_EGREP_CPP([Found it], [
+#include <limits.h>
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#ifdef SIZE_MAX
+Found it
+#endif
+], gl_cv_size_max=yes)
+    if test -z "$gl_cv_size_max"; then
+      dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
+      dnl than the type 'unsigned long'. Try hard to find a definition that can
+      dnl be used in a preprocessor #if, i.e. doesn't contain a cast.
+      _AC_COMPUTE_INT([sizeof (size_t) * CHAR_BIT - 1], size_t_bits_minus_1,
+        [#include <stddef.h>
+#include <limits.h>], size_t_bits_minus_1=)
+      _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
+        [#include <stddef.h>], fits_in_uint=)
+      if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
+        if test $fits_in_uint = 1; then
+          dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
+          dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
+          AC_TRY_COMPILE([#include <stddef.h>
+            extern size_t foo;
+            extern unsigned long foo;
+            ], [], fits_in_uint=0)
+        fi
+        dnl We cannot use 'expr' to simplify this expression, because 'expr'
+        dnl works only with 'long' integers in the host environment, while we
+        dnl might be cross-compiling from a 32-bit platform to a 64-bit platform.
+        if test $fits_in_uint = 1; then
+          gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
+        else
+          gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
+        fi
+      else
+        dnl Shouldn't happen, but who knows...
+        gl_cv_size_max='((size_t)~(size_t)0)'
+      fi
+    fi
+  ])
+  AC_MSG_RESULT([$gl_cv_size_max])
+  if test "$gl_cv_size_max" != yes; then
+    AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max],
+      [Define as the maximum value of type 'size_t', if the system doesn't define it.])
+  fi
+])
diff --git a/m4/stdint_h.m4 b/m4/stdint_h.m4
new file mode 100644 (file)
index 0000000..db9a8ac
--- /dev/null
@@ -0,0 +1,26 @@
+# stdint_h.m4 serial 6
+dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([gl_AC_HEADER_STDINT_H],
+[
+  AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h,
+  [AC_TRY_COMPILE(
+    [#include <sys/types.h>
+#include <stdint.h>],
+    [uintmax_t i = (uintmax_t) -1; return !i;],
+    gl_cv_header_stdint_h=yes,
+    gl_cv_header_stdint_h=no)])
+  if test $gl_cv_header_stdint_h = yes; then
+    AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
+      [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
+       and declares uintmax_t. ])
+  fi
+])
diff --git a/m4/uintmax_t.m4 b/m4/uintmax_t.m4
new file mode 100644 (file)
index 0000000..bf83ed7
--- /dev/null
@@ -0,0 +1,30 @@
+# uintmax_t.m4 serial 9
+dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+AC_PREREQ(2.13)
+
+# Define uintmax_t to 'unsigned long' or 'unsigned long long'
+# if it is not already defined in <stdint.h> or <inttypes.h>.
+
+AC_DEFUN([gl_AC_TYPE_UINTMAX_T],
+[
+  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+  if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
+    AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG])
+    test $ac_cv_type_unsigned_long_long = yes \
+      && ac_type='unsigned long long' \
+      || ac_type='unsigned long'
+    AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
+      [Define to unsigned long or unsigned long long
+       if <stdint.h> and <inttypes.h> don't define.])
+  else
+    AC_DEFINE(HAVE_UINTMAX_T, 1,
+      [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
+  fi
+])
diff --git a/m4/ulonglong.m4 b/m4/ulonglong.m4
new file mode 100644 (file)
index 0000000..9fae98e
--- /dev/null
@@ -0,0 +1,48 @@
+# ulonglong.m4 serial 6
+dnl Copyright (C) 1999-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
+# This fixes a bug in Autoconf 2.60, but can be removed once we
+# assume 2.61 everywhere.
+
+# Note: If the type 'unsigned long long int' exists but is only 32 bits
+# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
+# will not be defined. In this case you can treat 'unsigned long long int'
+# like 'unsigned long int'.
+
+AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
+[
+  AC_CACHE_CHECK([for unsigned long long int],
+    [ac_cv_type_unsigned_long_long_int],
+    [AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+         [[unsigned long long int ull = 18446744073709551615ULL;
+           typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1
+                          ? 1 : -1)];
+          int i = 63;]],
+         [[unsigned long long int ullmax = 18446744073709551615ull;
+           return (ull << 63 | ull >> 63 | ull << i | ull >> i
+                   | ullmax / ull | ullmax % ull);]])],
+       [ac_cv_type_unsigned_long_long_int=yes],
+       [ac_cv_type_unsigned_long_long_int=no])])
+  if test $ac_cv_type_unsigned_long_long_int = yes; then
+    AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], 1,
+      [Define to 1 if the system has the type `unsigned long long int'.])
+  fi
+])
+
+# This macro is obsolescent and should go away soon.
+AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG],
+[
+  AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
+  ac_cv_type_unsigned_long_long=$ac_cv_type_unsigned_long_long_int
+  if test $ac_cv_type_unsigned_long_long = yes; then
+    AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
+      [Define if you have the 'unsigned long long' type.])
+  fi
+])
diff --git a/m4/video.m4 b/m4/video.m4
new file mode 100644 (file)
index 0000000..73cdf9f
--- /dev/null
@@ -0,0 +1,89 @@
+AC_DEFUN([LP_CHECK_DEP],[
+       dnl $1=dependency description
+       dnl $2=dependency short name, will be suffixed with _CFLAGS and _LIBS
+       dnl $3=headers's place
+       dnl $4=lib's place
+       dnl $5=header to check
+       dnl $6=lib to check
+       dnl $7=function to check in library
+       
+       NAME=$2
+       dep_headersdir=$3
+       dep_libsdir=$4
+       dep_header=$5
+       dep_lib=$6
+       dep_funclib=$7
+       other_libs=$8   
+       
+       if test "$dep_headersdir" != "/usr/include" ; then
+               eval ${NAME}_CFLAGS=\"-I$dep_headersdir \"
+       fi
+       eval ${NAME}_LIBS=\"-L$dep_libsdir -l$dep_lib\"
+       
+       CPPFLAGS_save=$CPPFLAGS
+       LDFLAGS_save=$LDFLAGS
+       CPPFLAGS="-I$dep_headersdir "
+       LDFLAGS="-L$dep_libsdir "
+       
+       AC_CHECK_HEADERS([$dep_header],[AC_CHECK_LIB([$dep_lib],[$dep_funclib],found=yes,found=no, [$other_libs])
+       ],found=no)
+       
+       if test "$found" = "yes" ; then
+               eval ${NAME}_found=yes
+               AC_DEFINE([HAVE_${NAME}],1,[Defined when we have found $1])
+               AC_SUBST(${NAME}_CFLAGS)
+               AC_SUBST(${NAME}_LIBS)
+       else
+               eval ${NAME}_found=no
+               eval ${NAME}_CFLAGS=
+               eval ${NAME}_LIBS=
+       fi
+       CPPFLAGS=$CPPFLAGS_save
+       LDFLAGS=$LDFLAGS_save
+       
+])
+
+
+AC_DEFUN([LP_CHECK_VIDEO],[
+
+       dnl conditionnal build of video support
+       AC_ARG_ENABLE(video,
+                 [  --enable-video    Turn on video support compiling: not functionnal for the moment],
+                 [case "${enableval}" in
+                       yes) video=true ;;
+                       no)  video=false ;;
+                       *) AC_MSG_ERROR(bad value ${enableval} for --enable-video) ;;
+                 esac],[video=false])
+                 
+       AC_ARG_WITH( ffmpeg,
+                 [  --with-ffmpeg              Sets the installation prefix of ffmpeg, needed for video support. [default=/usr] ],
+                 [ ffmpegdir=${withval}],[ ffmpegdir=/usr ])
+       
+       AC_ARG_WITH( sdl,
+                 [  --with-sdl         Sets the installation prefix of libSDL, needed for video support. [default=/usr] ],
+                 [ libsdldir=${withval}],[ libsdldir=/usr ])
+       
+       if test "$video" = "true"; then
+               
+               dnl test for ffmpeg presence
+               dnl LP_CHECK_DEP([ffmpeg],[FFMPEG],[${ffmpegdir}/include/ffmpeg],[${ffmpegdir}/lib],[avcodec.h],[avcodec],[avcodec_init], [-lavutils -lm])
+               dnl if test "$FFMPEG_found" = "no" ; then
+               dnl     AC_MSG_ERROR([Could not find ffmpeg headers and library. This is mandatory for video support])
+               dnl fi
+               PKG_CHECK_MODULES(FFMPEG, [libavcodec >= 50.0.0 ], , [ AC_MSG_ERROR([Could not find ffmpeg headers and library. This is mandatory for video support]) ])
+               
+               LP_CHECK_DEP([SDL],[SDL],[${libsdldir}/include],[${libsdldir}/lib],[SDL/SDL.h],[SDL],[SDL_Init])
+               if test "$SDL_found" = "no" ; then
+                       AC_MSG_ERROR([Could not find libsdl headers and library. This is mandatory for video support])
+               fi
+       
+               VIDEO_CFLAGS=" $FFMPEG_CFLAGS $SDL_CFLAGS"
+               VIDEO_LIBS=" $FFMPEG_LIBS $SDL_LIBS"
+               
+               AC_DEFINE(VIDEO_ENABLED,1,[Set when video support is enabled])
+               
+       fi
+       
+       AC_SUBST(VIDEO_CFLAGS)
+       AC_SUBST(VIDEO_LIBS)
+])
diff --git a/m4/visibility.m4 b/m4/visibility.m4
new file mode 100644 (file)
index 0000000..2ff6330
--- /dev/null
@@ -0,0 +1,52 @@
+# visibility.m4 serial 1 (gettext-0.15)
+dnl Copyright (C) 2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl Tests whether the compiler supports the command-line option
+dnl -fvisibility=hidden and the function and variable attributes
+dnl __attribute__((__visibility__("hidden"))) and
+dnl __attribute__((__visibility__("default"))).
+dnl Does *not* test for __visibility__("protected") - which has tricky
+dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
+dnl MacOS X.
+dnl Does *not* test for __visibility__("internal") - which has processor
+dnl dependent semantics.
+dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
+dnl "really only recommended for legacy code".
+dnl Set the variable CFLAG_VISIBILITY.
+dnl Defines and sets the variable HAVE_VISIBILITY.
+
+AC_DEFUN([gl_VISIBILITY],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  CFLAG_VISIBILITY=
+  HAVE_VISIBILITY=0
+  if test -n "$GCC"; then
+    AC_MSG_CHECKING([for simple visibility declarations])
+    AC_CACHE_VAL(gl_cv_cc_visibility, [
+      gl_save_CFLAGS="$CFLAGS"
+      CFLAGS="$CFLAGS -fvisibility=hidden"
+      AC_TRY_COMPILE(
+        [extern __attribute__((__visibility__("hidden"))) int hiddenvar;
+         extern __attribute__((__visibility__("default"))) int exportedvar;
+         extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
+         extern __attribute__((__visibility__("default"))) int exportedfunc (void);],
+        [],
+        gl_cv_cc_visibility=yes,
+        gl_cv_cc_visibility=no)
+      CFLAGS="$gl_save_CFLAGS"])
+    AC_MSG_RESULT([$gl_cv_cc_visibility])
+    if test $gl_cv_cc_visibility = yes; then
+      CFLAG_VISIBILITY="-fvisibility=hidden"
+      HAVE_VISIBILITY=1
+    fi
+  fi
+  AC_SUBST([CFLAG_VISIBILITY])
+  AC_SUBST([HAVE_VISIBILITY])
+  AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
+    [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
+])
diff --git a/m4/wchar_t.m4 b/m4/wchar_t.m4
new file mode 100644 (file)
index 0000000..cde2129
--- /dev/null
@@ -0,0 +1,20 @@
+# wchar_t.m4 serial 1 (gettext-0.12)
+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether <stddef.h> has the 'wchar_t' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_WCHAR_T],
+[
+  AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
+    [AC_TRY_COMPILE([#include <stddef.h>
+       wchar_t foo = (wchar_t)'\0';], ,
+       gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
+  if test $gt_cv_c_wchar_t = yes; then
+    AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
+  fi
+])
diff --git a/m4/wint_t.m4 b/m4/wint_t.m4
new file mode 100644 (file)
index 0000000..b8fff9c
--- /dev/null
@@ -0,0 +1,20 @@
+# wint_t.m4 serial 1 (gettext-0.12)
+dnl Copyright (C) 2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether <wchar.h> has the 'wint_t' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_WINT_T],
+[
+  AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
+    [AC_TRY_COMPILE([#include <wchar.h>
+       wint_t foo = (wchar_t)'\0';], ,
+       gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
+  if test $gt_cv_c_wint_t = yes; then
+    AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
+  fi
+])
diff --git a/m4/xsize.m4 b/m4/xsize.m4
new file mode 100644 (file)
index 0000000..85bb721
--- /dev/null
@@ -0,0 +1,13 @@
+# xsize.m4 serial 3
+dnl Copyright (C) 2003-2004 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_XSIZE],
+[
+  dnl Prerequisites of lib/xsize.h.
+  AC_REQUIRE([gl_SIZE_MAX])
+  AC_REQUIRE([AC_C_INLINE])
+  AC_CHECK_HEADERS(stdint.h)
+])
diff --git a/media_api/.gitignore b/media_api/.gitignore
new file mode 100644 (file)
index 0000000..e995588
--- /dev/null
@@ -0,0 +1,3 @@
+.deps
+Makefile
+Makefile.in
diff --git a/media_api/DESIGN.txt b/media_api/DESIGN.txt
new file mode 100644 (file)
index 0000000..f7c9cfc
--- /dev/null
@@ -0,0 +1,135 @@
+MEDIA API DESIGN DRAFT
+**********************
+
+
+The objective of the media_api is to construct and run the necessary
+processing on audio and video data flows for a given call (two party call) or
+conference.
+The media_api must support calls where callmember can be remote as well
+local hosted, in other words the media_api can be used inside linphone as
+well as in sip conferencing server. The api must support multiples way of
+getting media data: from disk, from rtp, from soundcard...
+The media_api is object oriented in C, and is based on the mediastreamer library
+to deal with audio or video signals, and on glib for types and usefull routines.
+
+The api must provide object and methods that describes the call, and then functions
+that executes the processing (using the mediastreamer) that is necessary for the
+call described.
+
+Proposed API:
+
+************************************************************************
+object: MediaFlow
+This object reprensent a media that is shared between all members of the call,
+for example voice.
+methods:
+MediaFlow *media_flow_new(char *id_string,gint type,gint duplex);
+type can be FLOW_AUDIO, FLOW_VIDEO.
+if duplex is 1, it means that the media flow is used by every member in both
+receiving and sending mode.
+id_string is just a string to identify the flow.
+
+void media_flow_destroy(MediaFlow *flow);
+destructor
+
+**************************************************************************
+object: CallMember
+This object reprensent a member of a call.
+methods:
+CallMember *call_member_new();
+
+gint call_member_setup_flow(CallMember *member, MediaFlow *flow,
+                                                                                                         char *rx_endpoint, char *tx_endpoint);
+       This is the most important function of the API. It describes the way each
+       call member receives and send a given media flow.
+       The MediaFlow "flow" is added to the list of flows used by the member "member".
+       rx_endpoint is a string that described how data is received by the call member.
+       It should be an url, for example "rtp://213.21.54.127:7080". In this case it
+       means that data will be received on port 7080 at ip address 213.21.54.127.
+       tx_endpoint is a string that described how data is sent by the call member.
+       The role of url is very important. They can be:
+       "rtp://213.21.54.127:7080"
+       "file://tmp/media.out"  -a file on disk
+       "oss://0"               -souncard 0 using oss api
+       "alsa://0"                                                      -soundcard 0 using alsa api.
+       In order to work, the call member must be part of a BasicCall, as well as
+       the flow must be part of the BasicCall too (using basic_call_add_flow())
+       This function may (on the backend) create a MediaEndpoint object that stores
+       the rx_endpoint and tx_endpoint parameter. This object is added to:
+       -the list of MediaEndpoint maintained by the member (list per member)
+       -the list of MediaEndpoint maintained by the flow (list per flow)
+
+
+**************************************************************************
+object: BasicCall
+This object handles simple calls (two party calls). It defines inside itself
+two CallMember objects.
+method:
+BasicCall *basic_call_new();
+
+CallMember *basic_call_get_member(BasicCall *call, gint member_number);
+       Returns a member of a BasicCall according to a number.
+       
+void basic_call_add_flow(BasicCall *call, MediaFlow *flow);
+       Adds a flow to the call's list of flow.
+       
+gint basic_call_start_flow(BasicCall *call, MediaFlow *flow);
+       This function construct the mediastreamer processing chain necessary to make
+       the call running, if not done, and runs it using ms_start()
+       
+gint basic_call_stop_flow(BasicCall *call, MediaFlow *flow);
+
+gint basic_call_start_all_flows(BasicCall *call);
+       
+void basic_call_destroy(BasicCall *call);
+       Destroy all data used by the call: call members, call flows.
+
+**************************************************************************
+object: ConferenceCall
+This object handles conference call (which are quite much complicated than basic
+calls). But this object should have the same method as the BasicCall object.
+
+*******************************************************************
+                       EXAMPLE
+*******************************************************************
+
+Two party call between call member A on machine "linphone.org" and call member B on machine "home.com". 
+The media_api is running on "home.com".
+
+       A (on linphone.org)                                                             B (on home.com)
+
+------>(send to rtp://home.com:7080              MSRTPReceiver------>Decode----->(send to oss:/0)
+
+------<(recv on rtp://linphone.org:7020                  MSRTPSender<--------Encode<-----(read on oss://0)
+
+This is how to setup this call using the media_api:
+BasicCall *call;
+CallMember *memberA,*memberB;
+MediaFlow *flow;
+
+/* create a basic call*/
+call=basic_call_new();
+/* get a pointer to the pre-define members of the call */
+memberA=basic_call_get_member(call,0);
+memberB=basic_call_get_member(call,1);
+
+/* create a media flow */
+flow=media_flow_new("voice",FLOW_AUDIO,1);
+/* tell that the flow is used by the call */
+basic_call_add_flow(call,flow);
+/* tell how each member uses the flow (how is the interface ?)*/
+call_member_setup_flow(memberA,flow,"rtp://linphone.org:7020","rtp://home.com:7080");
+/* note: it is not efficient to do name resolution at this stage: that's why in reality numeric ip address
+should be given instead of host name */
+call_member_setup_flow(memberB,flow,"oss://0","oss://0");
+
+/* start the flow */
+basic_call_start_flow(call,flow);
+
+In case where the media api is running on another host called "toto" (in a media translator application for example),
+ the only thing that would change is the url given to memberB: tx="rtp://home.com:8820" for example and
+ rx="rtp://toto:9522".
+In the sipomatic application (the test application I use to test linphone (it answers to call and plays
+a short annoucement)), I would write rx="file://path_to_annoucement.raw" and tx="file://dev/null" instead of
+"oss://0".
diff --git a/media_api/Makefile.am b/media_api/Makefile.am
new file mode 100644 (file)
index 0000000..38dcf06
--- /dev/null
@@ -0,0 +1,31 @@
+## Process this file with automake to produce Makefile.in
+if BUILD_MEDIA_API
+
+#the media_api library is the only one we have to build here
+lib_LTLIBRARIES=libmedia_api.la
+
+#definition of the sources of libmedia_api
+libmedia_api_la_SOURCES=       basiccall.c callmember.c mediaflow.c
+
+# libmedia_api  needs libmediastreamer
+libmedia_api_la_LIBADD=$(top_srcdir)/mediastreamer/libmediastreamer.la
+
+#the media_api test program
+bin_PROGRAMS=apitest
+
+apitest_SOURCES= apitest.c
+# the test program links to libmedia_api
+apitest_LDADD=libmedia_api.la
+
+endif
+
+DEFS=@DEFS@ @SOUNDDEFS@ -DDEBUG -DG_LOG_DOMAIN=\"MediaApi\" 
+
+INCLUDES=-I$(top_srcdir)/mediastreamer \
+               -I$(top_srcdir)/speex \
+               -I$(top_srcdir)/gsmlib \
+               $(ORTP_CFLAGS) \
+               -I$(top_srcdir)/lpc10-1.5 \
+               -I$(top_srcdir)/ffmpeg 
+
+
diff --git a/media_api/apitest.c b/media_api/apitest.c
new file mode 100644 (file)
index 0000000..cd4ac9e
--- /dev/null
@@ -0,0 +1,36 @@
+#include "basiccall.h"
+#include <signal.h>
+static int flag = 1;
+void stop(int sign){
+       flag = 0;
+}
+
+
+int main(){
+       BasicCall *call;
+       char *id;
+       CallMember *memberA, *memberB;
+       MediaFlow *flow, *flow1;
+
+       signal(SIGINT, stop);
+       call = basic_call_new();
+       memberA = basic_call_get_member(call,MemberA);
+       memberB = basic_call_get_member(call,MemberB);
+
+       id = "test_voice";
+       printf("\n");
+       flow = media_flow_new(id, MEDIA_FLOW_VOICE);
+       
+       basic_call_add_flow(call, flow);
+
+       call_member_setup_flow(memberA, flow, "file://temp", "oss://0");
+       call_member_setup_flow(memberB, flow, "oss://0", "oss://0");
+
+       media_flow_setup_fd(flow, memberA, memberB, MEDIA_FLOW_HALF_DUPLEX); 
+       basic_call_start_flow(call, flow);
+
+       while(flag){
+               sleep(1);
+       }
+
+}
diff --git a/media_api/apitest.h b/media_api/apitest.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/media_api/basiccall.c b/media_api/basiccall.c
new file mode 100644 (file)
index 0000000..8a00447
--- /dev/null
@@ -0,0 +1,170 @@
+/*\r
+       The objective of the media_api is to construct and run the necessary processing \r
+       on audio and video data flows for a given call (two party call) or conference.\r
+       Copyright (C) 2001  Sharath Udupa skuds@gmx.net\r
+\r
+       This library is free software; you can redistribute it and/or\r
+       modify it under the terms of the GNU Lesser General Public\r
+       License as published by the Free Software Foundation; either\r
+       version 2.1 of the License, or (at your option) any later version.\r
+\r
+       This library is distributed in the hope that it will be useful,\r
+       but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+       Lesser General Public License for more details.\r
+\r
+       You should have received a copy of the GNU Lesser General Public\r
+       License along with this library; if not, write to the Free Software\r
+       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+*/\r
+\r
+#include "basiccall.h"\r
+#include "../mediastreamer/mscodec.h"\r
+\r
+#define ONESYNC 10\r
+#define MULTISYNC 20\r
+\r
+BasicCall *basic_call_new(){\r
+       BasicCall *bc = (BasicCall*) g_malloc(sizeof(BasicCall));\r
+       api_trace("basic_call_new: creating a basic call");\r
+       bc->memberA = call_member_new("memberA");\r
+       bc->memberB = call_member_new("memberB");\r
+       return bc;\r
+}\r
+\r
+CallMember *basic_call_get_member(BasicCall *call, int member_nu){\r
+       api_trace("basic_call_get_member: called for %d",member_nu);\r
+       if(member_nu == MemberA){\r
+               return call->memberA;\r
+       }\r
+       else if(member_nu == MemberB){\r
+               return call->memberB;\r
+       }\r
+}\r
+\r
+void basic_call_add_flow(BasicCall *call, MediaFlow *flow){\r
+       api_trace("basic_call_add_flow: called for %s",flow->id);\r
+       call->flows = g_list_append( call->flows, flow);\r
+       return 1;\r
+}\r
+\r
+int find_mediaflow(gconstpointer llist, gconstpointer flow){\r
+       //MediaFlow *mf = (MediaFlow *) ((BasicCallFlow*)llist)->mediaFlow;\r
+       if(((MediaFlow*)flow)->id == ((MediaFlow*)llist)->id){\r
+               return 0;\r
+       }\r
+       return 1;\r
+}\r
+\r
+int basic_call_start_flow(BasicCall *call, MediaFlow *flow){\r
+       int i=0;\r
+       int syncFlag=0;\r
+       int nFlowDirections;\r
+       MSSync *sync;\r
+       Members *source, *destination;\r
+       FlowDirections *fd;\r
+       GList *elem, *selem;\r
+       GList *snd_read = NULL, *snd_write = NULL, *filter = NULL;\r
+       \r
+       //Commented by Sharat\r
+       //This is initialized in media_api.c\r
+       //when should these functions be really called?\r
+       //ms_init(); \r
+       //ortp_init(); \r
+       \r
+       api_trace("basic_call_start_flow: called for flow %s", flow->id);\r
+       \r
+       elem = g_list_find_custom( call->flows, flow, &find_mediaflow);\r
+       if(elem == NULL){\r
+               api_error("basic_call_start_flow: Called for unregistered mediaflow %s", flow->id);\r
+       }\r
+       \r
+       nFlowDirections = g_list_length(flow->flowDirections);\r
+       if(flow->type == MEDIA_FLOW_VOICE){\r
+               syncFlag = ONESYNC;\r
+               sync = ms_timer_new();\r
+       }\r
+       else{\r
+               syncFlag = MULTISYNC;\r
+       }\r
+\r
+       for(i=0;i< nFlowDirections; i++){\r
+               \r
+               if(syncFlag == MULTISYNC){\r
+                       sync = ms_timer_new();\r
+               }\r
+               fd = (FlowDirections*)g_list_nth_data(flow->flowDirections,i);\r
+               source = fd->source;\r
+               destination = fd->destination;\r
+\r
+               media_flow_start_fd(fd, sync);\r
+               if(fd->type == MEDIA_FLOW_DUPLEX){\r
+                       switch(source->tx_endpoint->protocol){\r
+                               case MEDIA_ALSA:\r
+                               case MEDIA_OSS:\r
+                                       snd_read = g_list_append(snd_read, fd->recv);\r
+                       }\r
+                       switch(destination->rx_endpoint->protocol){\r
+                               case MEDIA_ALSA:\r
+                               case MEDIA_OSS:\r
+                                       snd_write = g_list_append(snd_write, fd->play);\r
+                       }\r
+                       \r
+                       switch(destination->tx_endpoint->protocol){\r
+                               case MEDIA_ALSA:\r
+                               case MEDIA_OSS:\r
+                                       snd_read = g_list_append(snd_read, fd->read);\r
+                       }\r
+                       \r
+                       switch(source->rx_endpoint->protocol){\r
+                               case MEDIA_ALSA:\r
+                               case MEDIA_OSS:\r
+                                       snd_write = g_list_append(snd_write, fd->send);\r
+                       }\r
+                       \r
+               }\r
+               else if(fd->type == MEDIA_FLOW_HALF_DUPLEX){\r
+                       \r
+                       switch(source->tx_endpoint->protocol){\r
+                               case MEDIA_ALSA:\r
+                               case MEDIA_OSS:\r
+                                       snd_read = g_list_append(snd_read, fd->recv);\r
+                       }\r
+                       switch(destination->rx_endpoint->protocol){\r
+                               case MEDIA_ALSA:\r
+                               case MEDIA_OSS:\r
+                                       snd_write = g_list_append(snd_write, fd->play);\r
+                       }\r
+               }\r
+               if(syncFlag == MULTISYNC){\r
+                       flow->sync = g_list_append(flow->sync, sync);\r
+               }\r
+       }\r
+       if(syncFlag == ONESYNC){\r
+               ms_start(sync);\r
+               flow->sync = g_list_append(flow->sync, sync);\r
+       }\r
+       if(syncFlag == MULTISYNC){\r
+               selem = flow->sync;\r
+               while(selem != NULL){\r
+                       ms_start(selem->data);\r
+                       selem = g_list_next(selem);\r
+               }\r
+       }\r
+       filter = snd_read;\r
+       while(filter != NULL){\r
+               ms_sound_read_start(MS_SOUND_READ((MSFilter*)filter->data));\r
+               filter = g_list_next(filter);\r
+       }\r
+\r
+       filter = snd_write;\r
+       while(filter != NULL){\r
+               ms_sound_write_start(MS_SOUND_WRITE((MSFilter*)filter->data));\r
+               filter = g_list_next(filter);\r
+       }\r
+       return 1;\r
+}\r
+\r
+int basic_call_stop_flow(BasicCall *call, MediaFlow *flow){\r
+\r
+}\r
diff --git a/media_api/basiccall.h b/media_api/basiccall.h
new file mode 100644 (file)
index 0000000..2351fac
--- /dev/null
@@ -0,0 +1,51 @@
+/*\r
+       The objective of the media_api is to construct and run the necessary processing \r
+       on audio and video data flows for a given call (two party call) or conference.\r
+       Copyright (C) 2001  Sharath Udupa skuds@gmx.net \r
+\r
+       This library is free software; you can redistribute it and/or\r
+       modify it under the terms of the GNU Lesser General Public\r
+       License as published by the Free Software Foundation; either\r
+       version 2.1 of the License, or (at your option) any later version.\r
+\r
+       This library is distributed in the hope that it will be useful,\r
+       but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+       Lesser General Public License for more details.\r
+\r
+       You should have received a copy of the GNU Lesser General Public\r
+       License along with this library; if not, write to the Free Software\r
+       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+*/\r
+\r
+#include "common.h"\r
+#include "mediaflow.h"\r
+#include "callmember.h"\r
+\r
+//other includes required to be done here\r
+#define MemberA 1\r
+#define MemberB 2\r
+\r
+\r
+struct _BasicCall{\r
+       CallMember *memberA, *memberB;\r
+       GList *flows;                   //linked list of MediaFlows\r
+};\r
+\r
+typedef struct _BasicCall BasicCall;\r
+\r
+\r
+BasicCall *basic_call_new();\r
+\r
+CallMember *basic_call_get_member(BasicCall *call, int member_nu);\r
+\r
+void basic_call_add_flow(BasicCall *call, MediaFlow *flow);\r
+\r
+int basic_call_start_flow(BasicCall *call, MediaFlow *flow);\r
+\r
+int basic_call_stop_flow(BasicCall *call, MediaFlow *flow);\r
+\r
+int basic_call_start_all_flows(BasicCall *call);\r
+\r
+int basic_call_destroy(BasicCall *call);\r
+\r
diff --git a/media_api/callmember.c b/media_api/callmember.c
new file mode 100644 (file)
index 0000000..643ba7b
--- /dev/null
@@ -0,0 +1,153 @@
+/*\r
+       The objective of the media_api is to construct and run the necessary processing \r
+       on audio and video data flows for a given call (two party call) or conference.\r
+       Copyright (C) 2001  Sharath Udupa skuds@gmx.net\r
+\r
+       This library is free software; you can redistribute it and/or\r
+       modify it under the terms of the GNU Lesser General Public\r
+       License as published by the Free Software Foundation; either\r
+       version 2.1 of the License, or (at your option) any later version.\r
+\r
+       This library is distributed in the hope that it will be useful,\r
+       but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+       Lesser General Public License for more details.\r
+\r
+       You should have received a copy of the GNU Lesser General Public\r
+       License along with this library; if not, write to the Free Software\r
+       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+*/\r
+#include <string.h>\r
+#include "common.h"\r
+#include "callmember.h"\r
+#include "mediaflow.h"\r
+\r
+\r
+CallMember *call_member_new(char *name){\r
+  CallMember *member = (CallMember*) g_malloc(sizeof(CallMember));\r
+  api_trace("call_member_new: creating %s", name);\r
+  member->name = name;\r
+  member->flows = NULL;\r
+  member->profile = NULL;\r
+  return member;\r
+}\r
+\r
+int call_member_set_rtp_profile(CallMember *member, RtpProfile *profile){\r
+       member->profile = profile;\r
+       return 1;\r
+}\r
+\r
+int call_member_setup_flow(CallMember *member, MediaFlow *flow, char* rx, char *tx){\r
+  Members *mem = (Members*) g_malloc(sizeof(Members));\r
+  Flows *flows = (Flows*) g_malloc(sizeof(Flows));\r
+  api_trace("call_member_setup_flow: setting up flow for: CallMember->%s , MediaFlow->%s", member->name, flow->id);\r
+  mem->member = member;\r
+  mem->rx_endpoint = parse_end_point(rx);\r
+  mem->tx_endpoint = parse_end_point(tx);\r
+  flow->members = g_list_append(flow->members, mem);\r
+\r
+  flows->flow = flow;\r
+  flows->rx_endpoint = parse_end_point(rx);\r
+  flows->tx_endpoint = parse_end_point(tx);\r
+  member->flows = g_list_append(member->flows, flows);\r
+  return 1;\r
+}\r
+\r
+EndPoint *parse_end_point(char *endpoint){\r
+       EndPoint *result = (EndPoint*) g_malloc(sizeof(EndPoint));\r
+       int i=0,len1,len2,len, tlen;\r
+       char *str2, temp[30], *host_str;\r
+       //api_trace("parse_end_point: parsing %s\n", endpoint);\r
+       result->pt = -1;\r
+       while(1){\r
+               str2 = (char*) strpbrk(endpoint, ":");\r
+               if(str2 == NULL){ \r
+                       str2 = (char*) strpbrk(endpoint, ";");\r
+                       if(str2 == NULL){\r
+                               len = strlen(endpoint); \r
+                       }\r
+                       else{\r
+                               len1 = strlen(endpoint);\r
+                               len2 = strlen(str2);\r
+                               len = len1-len2;\r
+                       }\r
+               }\r
+               else{\r
+                       len1 = strlen(endpoint);\r
+                       len2 = strlen(str2);\r
+                       len = len1-len2;\r
+               }\r
+               strncpy(temp,endpoint,len);\r
+               temp[len] = '\0';\r
+               tlen = strlen(temp);\r
+               if((tlen >= 2)&&(temp[0] == '/')&&(temp[1] == '/')){\r
+                       host_str = remove_slash(temp);\r
+               }\r
+               switch(i){\r
+                       case 0: if(strcmp(temp,"rtp")==0){\r
+                                       result->protocol=MEDIA_RTP;\r
+                               }\r
+                               else if(strcmp(temp,"oss")==0){\r
+                                       result->protocol=MEDIA_OSS;\r
+                               }\r
+                               else if(strcmp(temp,"alsa")==0){\r
+                                       result->protocol=MEDIA_ALSA;\r
+                               }\r
+                               else if(strcmp(temp,"file")==0){\r
+                                       result->protocol=MEDIA_FILE;\r
+                               }\r
+                               break;\r
+                       case 1: if(result->protocol==MEDIA_FILE){\r
+                                       result->file=host_str;\r
+                               }\r
+                               else{\r
+                                       result->host = host_str;\r
+                               }\r
+                               break;\r
+                       case 2: result->port = to_digits(temp);\r
+                               break;\r
+                       case 3: result->pt = pt_digits(temp);\r
+                               break;\r
+                       default://result->options[result->nOptions++] = temp;\r
+                               break;\r
+               }\r
+               if(str2 != NULL) endpoint = str2+1;\r
+               else break;\r
+               i++;\r
+       }\r
+       return result;          \r
+}\r
+\r
+int to_digits(char *str){\r
+       int nu=0,a,len,i;\r
+       len = strlen(str);\r
+       for(i=0;i<len;i++){\r
+               a=str[i];\r
+               a=a-'0';\r
+               nu = nu*10+a;\r
+       }\r
+       return nu;\r
+}\r
+\r
+int pt_digits(char *str){\r
+       int len;\r
+       len = strlen(str);\r
+       if((len>3)&&(str[0]=='p')&&(str[1]=='t')&&(str[2]=='=')){\r
+               return to_digits(str+3);\r
+       }\r
+       else{\r
+               api_warn("Wrong parameters passed in the endpoints");\r
+               return 0;\r
+               //ERROR handling\r
+       }\r
+}\r
+char *remove_slash(char var[]){\r
+       char *temp = (char*) g_malloc(10*sizeof(char));\r
+       int len,i;\r
+       len=strlen(var);\r
+       for(i=2;i<len;i++){\r
+               temp[i-2]=var[i];\r
+       }\r
+       return temp;\r
+}\r
+\r
diff --git a/media_api/callmember.h b/media_api/callmember.h
new file mode 100644 (file)
index 0000000..1c40746
--- /dev/null
@@ -0,0 +1,59 @@
+/*\r
+       The objective of the media_api is to construct and run the necessary processing \r
+       on audio and video data flows for a given call (two party call) or conference.\r
+       Copyright (C) 2001  Sharath Udupa skuds@gmx.net\r
+\r
+       This library is free software; you can redistribute it and/or\r
+       modify it under the terms of the GNU Lesser General Public\r
+       License as published by the Free Software Foundation; either\r
+       version 2.1 of the License, or (at your option) any later version.\r
+\r
+       This library is distributed in the hope that it will be useful,\r
+       but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+       Lesser General Public License for more details.\r
+\r
+       You should have received a copy of the GNU Lesser General Public\r
+       License along with this library; if not, write to the Free Software\r
+       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+*/\r
+\r
+struct _CallMember{\r
+       char *name;\r
+       GList *flows;\r
+       RtpProfile *profile;\r
+};\r
+\r
+typedef struct _CallMember CallMember;\r
+\r
+struct _EndPoint{\r
+       int protocol;\r
+       char *host;\r
+       char *file;\r
+       int port;\r
+       int pt;\r
+};\r
+\r
+typedef struct _EndPoint EndPoint;\r
+\r
+struct _Flows{\r
+  struct _MediaFlow *flow;\r
+  EndPoint *rx_endpoint;\r
+  EndPoint *tx_endpoint;\r
+};\r
+\r
+typedef struct _Flows Flows;\r
+\r
+CallMember *call_member_new(char *);\r
+\r
+int call_member_setup_flow(CallMember *member, struct _MediaFlow *flow, char *rx_enndpoint, char *tx_endpoint);\r
+\r
+/* Internal functions */\r
+EndPoint *parse_end_point(char *endpoint);\r
+\r
+char *remove_slash(char[]);\r
+\r
+int to_digits(char*);\r
+\r
+int pt_digits(char*);\r
+\r
diff --git a/media_api/ccl b/media_api/ccl
new file mode 100644 (file)
index 0000000..d814341
--- /dev/null
@@ -0,0 +1 @@
+gcc -I/home/skudupa/linphone/mediastreamer -I/home/skudupa/linphone/ffmpeg/libavcodec -I/home/skudupa/linphone/gsmlib -I/home/skudupa/linphone/lpc10-1.5 -I/home/skudupa/linphone/oRTP/src -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -I/home/skudupa/linphone/oRTP mediaflow.c
diff --git a/media_api/common.h b/media_api/common.h
new file mode 100644 (file)
index 0000000..a2294c2
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef COMMON_H
+#define COMMON_H
+
+
+#include "media_api.h"
+#include <glib.h>
+
+#define api_trace g_message
+#define api_error g_error
+#define api_warn g_warning
+
+#define MEDIA_FLOW_DUPLEX 1
+#define MEDIA_FLOW_HALF_DUPLEX 2
+
+//Mediaflow type
+#define MEDIA_FLOW_VIDEO 1
+#define MEDIA_FLOW_VOICE 2
+
+//Mediaflow protocols
+#define MEDIA_RTP 1
+#define MEDIA_OSS 2
+#define MEDIA_ALSA 3
+#define MEDIA_FILE 4
+
+//Mediaflow codec function
+#define MEDIA_API_DECODER 1
+#define MEDIA_API_ENCODER 2
+
+#endif
+
+
diff --git a/media_api/media_api.c b/media_api/media_api.c
new file mode 100644 (file)
index 0000000..28ed3c1
--- /dev/null
@@ -0,0 +1,69 @@
+/*\r
+       The objective of the media_api is to construct and run the necessary processing \r
+       on audio and video data flows for a given call (two party call) or conference.\r
+       Copyright (C) 2001  Sharath Udupa skuds@gmx.net\r
+\r
+       This library is free software; you can redistribute it and/or\r
+       modify it under the terms of the GNU Lesser General Public\r
+       License as published by the Free Software Foundation; either\r
+       version 2.1 of the License, or (at your option) any later version.\r
+\r
+       This library is distributed in the hope that it will be useful,\r
+       but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+       Lesser General Public License for more details.\r
+\r
+       You should have received a copy of the GNU Lesser General Public\r
+       License along with this library; if not, write to the Free Software\r
+       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+*/\r
+
+#include "media_api.h"
+
+/* non-standart payload types for oRTP */
+PayloadType lpc1015={
+    PAYLOAD_AUDIO_PACKETIZED,
+    8000,
+    0,
+    NULL,
+    0,
+    2400,
+    "1015/8000/1"
+};
+
+PayloadType speex_nb={
+    PAYLOAD_AUDIO_PACKETIZED,
+    8000,
+    0,
+    NULL,
+    0,
+    15000,
+    "speex/8000/1"
+};
+
+PayloadType speex_nb_lbr={
+    PAYLOAD_AUDIO_PACKETIZED,
+    8000,
+    0,
+    NULL,
+    0,
+    8000,
+    "speex-lbr/8000/1"
+};
+
+void media_api_init()
+{
+       ortp_init();
+       ortp_set_debug_file("oRTP",NULL);
+       rtp_profile_set_payload(&av_profile,115,&lpc1015);
+       rtp_profile_set_payload(&av_profile,110,&speex_nb);
+       rtp_profile_set_payload(&av_profile,111,&speex_nb_lbr);
+       rtp_profile_set_payload(&av_profile,101,&telephone_event);
+       ms_init();
+       ms_speex_codec_init();
+#ifdef HAVE_AVCODEC
+       ms_AVCodec_init();
+#endif
+}
+
+
diff --git a/media_api/media_api.h b/media_api/media_api.h
new file mode 100644 (file)
index 0000000..b7341fc
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+       The objective of the media_api is to construct and run the necessary processing 
+       on audio and video data flows for a given call (two party call) or conference.
+       Copyright (C) 2001  Sharath Udupa skuds@gmx.net
+
+       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 MEDIA_API_H
+#define MEDIA_API_H
+
+/* some mediastreamer include files....*/
+
+#include "ms.h"
+
+/* audio codecs ; all these header are not really required as we should use ms_codec_new..() to 
+create codec filters*/
+/*Commented by Sharath Udupa
+#include <mscodec.h>
+#include <msMUlawdec.h>
+#include <msMUlawenc.h>
+#include <msAlawdec.h>
+#include <msAlawenc.h>
+#include <msGSMdecoder.h>
+#include <msGSMencoder.h>
+#include <msLPC10decoder.h>
+#include <msLPC10encoder.h>
+
+#ifdef BUILD_FFMPEG
+#include <msavdecoder.h>
+#include <msavencoder.h>*/
+#endif
+
+/* some usefull filters of the mediastreamer */
+#include "mscopy.h"
+#include "msfdispatcher.h"
+#include "msqdispatcher.h"
+
+/* some synchronisation sources */
+#include <msnosync.h>
+#include <mstimer.h>
+
+/* some streams sources and sinks */
+#include <msossread.h>
+#include <msosswrite.h>
+#include <msread.h>
+#include <mswrite.h>
+#include <msringplayer.h>
+#include <msrtprecv.h>
+#include <msrtpsend.h>
+#include <msv4l.h>
+#include <msvideooutput.h>
+
+#endif
+
+
+
diff --git a/media_api/mediaflow.c b/media_api/mediaflow.c
new file mode 100644 (file)
index 0000000..8ccdadb
--- /dev/null
@@ -0,0 +1,179 @@
+/*\r
+       The objective of the media_api is to construct and run the necessary processing \r
+       on audio and video data flows for a given call (two party call) or conference.\r
+       Copyright (C) 2001  Sharath Udupa skuds@gmx.net\r
+\r
+       This library is free software; you can redistribute it and/or\r
+       modify it under the terms of the GNU Lesser General Public\r
+       License as published by the Free Software Foundation; either\r
+       version 2.1 of the License, or (at your option) any later version.\r
+\r
+       This library is distributed in the hope that it will be useful,\r
+       but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+       Lesser General Public License for more details.\r
+\r
+       You should have received a copy of the GNU Lesser General Public\r
+       License along with this library; if not, write to the Free Software\r
+       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+*/\r
+#include "common.h"\r
+#include "mediaflow.h"\r
+#include "callmember.h"\r
+\r
+\r
+MediaFlow *media_flow_new(char *id_string, int type){\r
+  MediaFlow *flow = (MediaFlow *) g_malloc(sizeof(MediaFlow));  //malloc required?\r
+  api_trace("media_flow_new: creating %s",id_string);\r
+  flow->id = id_string;\r
+  flow->type = type;\r
+  flow->flowDirections = NULL;\r
+  flow->members = NULL;\r
+  return flow;\r
+}\r
+\r
+int media_flow_destroy(MediaFlow *flow){\r
+       g_free(flow);\r
+       return 1;\r
+}\r
+\r
+int media_flow_setup_fd(MediaFlow *flow, CallMember* csource, CallMember *cdestination, int direction){\r
+       GList *source, *destination;\r
+       char *dir;\r
+       FlowDirections *fd = (FlowDirections *) g_malloc(sizeof(FlowDirections));\r
+       if(direction == MEDIA_FLOW_DUPLEX) dir = "DUPLEX";\r
+       else if(direction == MEDIA_FLOW_HALF_DUPLEX) dir = "HALF_DUPLEX";\r
+       api_trace("media_flow_setup_fd: setting up %s flow for %s , %s",dir, csource->name, cdestination->name);\r
+       source = g_list_find_custom(flow->members, csource, &find);\r
+       destination =g_list_find_custom(flow->members, cdestination, &find);\r
+       if(source == NULL){\r
+               api_error("media_flow_setup_fd: Invalid source %s specified", csource->name);\r
+       }\r
+       if(destination == NULL){\r
+               api_error("media_flow_setup_fd: Invalid destination %s specified", cdestination->name);\r
+               //ERROR handling to be done here\r
+       }\r
+       fd->source = (Members*)source->data;\r
+       fd->destination = (Members*)destination->data;\r
+       fd->type = direction;\r
+       flow->flowDirections = g_list_append(flow->flowDirections, fd);\r
+       return 1;\r
+}\r
+\r
+int find(gconstpointer mem, gconstpointer cmember){\r
+       if(!strcmp(((Members*)mem)->member->name, ((CallMember*)cmember)->name)){\r
+               return 0;\r
+       }\r
+       return 1;\r
+}\r
+\r
+int media_flow_start_fd(FlowDirections *fd, MSSync *sync){\r
+       Members *source, *destination;\r
+       source = fd->source;\r
+       destination = fd->destination;\r
+       if(fd->type == MEDIA_FLOW_DUPLEX){\r
+               fd->recv = set_MSFilter(source->tx_endpoint,1,fd);\r
+               fd->dec = set_CODECFilter(source->member->profile, source->tx_endpoint->pt,MEDIA_API_DECODER);\r
+               fd->play = set_MSFilter(destination->rx_endpoint,0,fd);\r
+               \r
+               ms_filter_add_link(fd->recv,fd->dec);\r
+               ms_filter_add_link(fd->dec,fd->play);\r
+               ms_sync_attach(sync, fd->recv);\r
+               \r
+               fd->read = set_MSFilter(destination->tx_endpoint,1,fd);\r
+               fd->enc = set_CODECFilter(destination->member->profile, destination->tx_endpoint->pt,MEDIA_API_ENCODER);\r
+               fd->send = set_MSFilter(source->rx_endpoint,0,fd);\r
+               \r
+               ms_filter_add_link(fd->read, fd->enc);\r
+               ms_filter_add_link(fd->enc, fd->send);\r
+               ms_sync_attach(sync, fd->read);\r
+               \r
+       }\r
+       else if(fd->type == MEDIA_FLOW_HALF_DUPLEX){\r
+       \r
+               fd->recv = set_MSFilter(source->tx_endpoint,1,fd);\r
+               fd->dec = set_CODECFilter(sourcec->member->profile, source->tx_endpoint->pt,MEDIA_API_DECODER);\r
+               fd->play = set_MSFilter(destination->rx_endpoint,0,fd);\r
+               \r
+               ms_filter_add_link(fd->recv,fd->dec);\r
+               ms_filter_add_link(fd->dec,fd->play);\r
+               ms_sync_attach(sync, fd->recv); \r
+       }\r
+       return 1;\r
+}\r
+\r
+\r
+MSFilter *set_MSFilter(EndPoint *endpoint, int type, FlowDirections *fdir){\r
+       MSFilter *filter;\r
+       RtpSession *rtps;\r
+       switch(endpoint->protocol){\r
+               case MEDIA_RTP:\r
+                       rtps = rtp_session_new(RTP_SESSION_RECVONLY);\r
+                       rtp_session_set_local_addr(rtps,"0.0.0.0",8000);\r
+                       rtp_session_set_scheduling_mode(rtps,0);\r
+                       rtp_session_set_blocking_mode(rtps,0);\r
+                       \r
+                       if(type == 1){\r
+                               filter = ms_rtp_recv_new();\r
+                               ms_rtp_recv_set_session(MS_RTP_RECV(filter), rtps);\r
+                               fdir->rtpSessions = g_list_append(fdir->rtpSessions, rtps);\r
+                               return filter;\r
+                       }\r
+                       else{\r
+                               //ms_rtp_send_new\r
+                       }\r
+               case MEDIA_OSS:\r
+                       if(type == 1){\r
+                               filter = ms_oss_read_new();\r
+                               ms_sound_read_set_device(MS_SOUND_READ(filter),0);\r
+                               return filter;\r
+                       }\r
+                       else{\r
+                               filter = ms_oss_write_new();\r
+                               ms_sound_write_set_device(MS_SOUND_WRITE(filter),0);\r
+                               return filter;\r
+                       }\r
+               case MEDIA_FILE:\r
+                       if(type == 1){\r
+                               filter = ms_read_new(endpoint->file);\r
+                               return filter;\r
+                       }\r
+                       if(type == 0){\r
+                               filter = ms_write_new(endpoint->file);\r
+                               return filter;\r
+                       }\r
+\r
+       }\r
+}\r
+\r
+MSFilter *set_CODECFilter(RtpProfile *profile, int pt, int mode){\r
+       PayloadType *payload;\r
+       \r
+       switch(mode){\r
+               case MEDIA_API_DECODER: \r
+                       payload = rtp_profile_get_payload(profile, pt);\r
+                       if(payload == NULL){\r
+                               api_error("media_api: undefined payload in URL\n");\r
+                               return NULL;\r
+                       }\r
+                       return ms_decoder_new_with_string_id(payload->mime_type);\r
+                       \r
+                       //Commented this to include the new RtpProfile\r
+                       /*if(pt != -1) return ms_decoder_new_with_pt(pt);\r
+                        *else return ms_copy_new();\r
+                        */\r
+               case MEDIA_API_ENCODER: \r
+                       \r
+                       payload = rtp_profile_get_payload(profile, pt);\r
+                       if(payload == NULL){\r
+                               api_error("media_api: undefined payload in URL\n");\r
+                               return NULL;\r
+                       }\r
+                       return ms_encoder_new_with_string_id(payload->mime_type);\r
+                       /*if(pt != -1) return ms_encoder_new_with_pt(pt);\r
+                        *else return ms_copy_new();\r
+                        */\r
+       }\r
+}\r
+       \r
+\r
diff --git a/media_api/mediaflow.h b/media_api/mediaflow.h
new file mode 100644 (file)
index 0000000..598df4d
--- /dev/null
@@ -0,0 +1,68 @@
+/*\r
+       The objective of the media_api is to construct and run the necessary processing \r
+       on audio and video data flows for a given call (two party call) or conference.\r
+       Copyright (C) 2001  Sharath Udupa skuds@gmx.net\r
+\r
+       This library is free software; you can redistribute it and/or\r
+       modify it under the terms of the GNU Lesser General Public\r
+       License as published by the Free Software Foundation; either\r
+       version 2.1 of the License, or (at your option) any later version.\r
+\r
+       This library is distributed in the hope that it will be useful,\r
+       but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+       Lesser General Public License for more details.\r
+\r
+       You should have received a c:opy of the GNU Lesser General Public\r
+       License along with this library; if not, write to the Free Software\r
+       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+*/\r
+\r
+struct _MediaFlow{\r
+       char *id;\r
+       int type;\r
+       GList *members;\r
+       GList *flowDirections;\r
+       GList *sync; //holds all the filters in this MediaFlow\r
+};\r
+\r
+typedef struct _MediaFlow MediaFlow;\r
+\r
+struct _Members{\r
+  struct _CallMember *member;\r
+  struct _EndPoint *rx_endpoint;\r
+  struct _EndPoint *tx_endpoint;\r
+};\r
+\r
+typedef struct _Members Members;\r
+\r
+struct _FlowDirections{\r
+       Members *source, *destination;\r
+       MSFilter *recv,\r
+                *dec,\r
+                *play;\r
+       MSFilter *read,         //Filters used \r
+                *enc,          //if type==DUPLEX\r
+                *send;\r
+       GList *rtpSessions;\r
+       int type;\r
+};\r
+\r
+typedef struct _FlowDirections FlowDirections;\r
+\r
+\r
+MediaFlow *media_flow_new(char *id_string, int type);\r
+\r
+int media_flow_setup_fd(MediaFlow*, struct _CallMember *, struct _CallMember *, int);\r
+\r
+int media_flow_start_fd(FlowDirections *fd, MSSync *sync);\r
+\r
+int media_flow_destroy(MediaFlow *flow);\r
+\r
+/* Internal functions */\r
+int find(gconstpointer, gconstpointer);\r
+\r
+MSFilter *set_MSFilter(struct _EndPoint *, int, FlowDirections *);\r
+\r
+MSFilter *set_CODECFilter(RtpProfile* , int, int);\r
+\r
diff --git a/p2pproxy/.classpath b/p2pproxy/.classpath
deleted file mode 100644 (file)
index d4307de..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-       <classpathentry kind="lib" path="dependencies/log4j.jar"/>
-       <classpathentry kind="lib" path="dependencies/sip.jar" sourcepath="/mjsip_1.6/src"/>
-       <classpathentry kind="lib" path="dependencies/bcprov-jdk14.jar"/>
-       <classpathentry kind="lib" path="dependencies/javax.servlet.jar"/>
-       <classpathentry kind="lib" path="dependencies/org.mortbay.jetty.jar"/>
-       <classpathentry kind="src" path="src"/>
-       <classpathentry kind="src" path="dependencies-src/jstun-src-0.7.1"/>
-       <classpathentry kind="src" path="dependencies-src/jxse-src-2.5/impl/src"/>
-       <classpathentry kind="src" path="dependencies-src/jxse-src-2.5/api/src"/>
-       <classpathentry kind="src" path="test-src"/>
-       <classpathentry kind="src" path="jni_src"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
-       <classpathentry kind="lib" path="dependencies/junit-4.3.1.jar"/>
-       <classpathentry kind="output" path="eclipsebuild"/>
-</classpath>
diff --git a/p2pproxy/.cvsignore b/p2pproxy/.cvsignore
deleted file mode 100644 (file)
index da41270..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-eclipsebuild
-.settings
-antbuild*
-P2pNetwork-*
-sipp2
diff --git a/p2pproxy/.gcjbuilder b/p2pproxy/.gcjbuilder
deleted file mode 100644 (file)
index 1084bf2..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<gcjbuilder>
-  <projectType>0</projectType>
-  <buildType>0</buildType>
-  <mainClass></mainClass>
-  <classpathCompile>0</classpathCompile>
-  <classpathDll></classpathDll>
-  <classpathJars/>
-  <resources/>
-  <optLevel>0</optLevel>
-  <optFlags></optFlags>
-  <debugLevel>2</debugLevel>
-  <debugFlags></debugFlags>
-  <gcjMisc></gcjMisc>
-  <linkLib/>
-  <linkObj/>
-  <linkPath/>
-  <linkMisc></linkMisc>
-  <buildFolder>debug</buildFolder>
-  <buildFile>p2pproxy</buildFile>
-  <buildCommand>make</buildCommand>
-</gcjbuilder>
\ No newline at end of file
diff --git a/p2pproxy/.project b/p2pproxy/.project
deleted file mode 100644 (file)
index fbea507..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>p2pproxy</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-       </natures>
-       <linkedResources>
-               <link>
-                       <name>jni_src</name>
-                       <type>2</type>
-                       <locationURI>jni_src</locationURI>
-               </link>
-       </linkedResources>
-</projectDescription>
diff --git a/p2pproxy/AUTHORS b/p2pproxy/AUTHORS
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/p2pproxy/COPYING b/p2pproxy/COPYING
deleted file mode 100644 (file)
index 94a9ed0..0000000
+++ /dev/null
@@ -1,674 +0,0 @@
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  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
-them 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 prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  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.
-
-  Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
-  For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
-  Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
-  Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                       TERMS AND CONDITIONS
-
-  0. Definitions.
-
-  "This License" refers to version 3 of the GNU General Public License.
-
-  "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
-  "The Program" refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as "you".  "Licensees" and
-"recipients" may be individuals or organizations.
-
-  To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
-  A "covered work" means either the unmodified Program or a work based
-on the Program.
-
-  To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-  To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
-  An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
-  1. Source Code.
-
-  The "source code" for a work means the preferred form of the work
-for making modifications to it.  "Object code" means any non-source
-form of a work.
-
-  A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-  The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-  The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-  The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
-  The Corresponding Source for a work in source code form is that
-same work.
-
-  2. Basic Permissions.
-
-  All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-  You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
-  Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
-  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-  No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-  When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
-  4. Conveying Verbatim Copies.
-
-  You may convey 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;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-  You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
-  5. Conveying Modified Source Versions.
-
-  You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
-    a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.
-
-    b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    "keep intact all notices".
-
-    c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.
-
-    d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.
-
-  A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
-  6. Conveying Non-Source Forms.
-
-  You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
-    a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.
-
-    b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.
-
-    c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.
-
-    d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.
-
-    e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.
-
-  A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-  A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
-  "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
-  If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-  The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
-  Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
-  7. Additional Terms.
-
-  "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-  When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-  Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
-    a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or
-
-    b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or
-
-    c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or
-
-    d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or
-
-    e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or
-
-    f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.
-
-  All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-  If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-  Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
-  8. Termination.
-
-  You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-  However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
-  Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-  Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
-  9. Acceptance Not Required for Having Copies.
-
-  You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
-  10. Automatic Licensing of Downstream Recipients.
-
-  Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-  An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-  You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
-  11. Patents.
-
-  A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's "contributor version".
-
-  A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-  Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-  In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-  If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
-  If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-  A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
-  Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
-  12. No Surrender of Others' Freedom.
-
-  If 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 convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
-  13. Use with the GNU Affero General Public License.
-
-  Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
-  14. Revised Versions of this License.
-
-  The Free Software Foundation may publish revised and/or new versions of
-the GNU 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 that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
-  If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
-  Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
-  15. Disclaimer of Warranty.
-
-  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.
-
-  16. Limitation of Liability.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-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.
-
-  17. Interpretation of Sections 15 and 16.
-
-  If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
-                     END OF TERMS AND CONDITIONS
-
-            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
-state 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) <year>  <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 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
-  If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
-    <program>  Copyright (C) <year>  <name of author>
-    This program 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, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
-  You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
-  The GNU 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 Lesser General
-Public License instead of this License.  But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/p2pproxy/ChangeLog b/p2pproxy/ChangeLog
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/p2pproxy/INSTALL b/p2pproxy/INSTALL
deleted file mode 100644 (file)
index 8b82ade..0000000
+++ /dev/null
@@ -1,291 +0,0 @@
-Installation Instructions
-*************************
-
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007, 2008 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.
-
-  6. Often, you can also type `make uninstall' to remove the installed
-     files again.
-
-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.
-
-   On MacOS X 10.5 and later systems, you can create libraries and
-executables that work on multiple system types--known as "fat" or
-"universal" binaries--by specifying multiple `-arch' options to the
-compiler but only a single `-arch' option to the preprocessor.  Like
-this:
-
-     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
-                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
-                 CPP="gcc -E" CXXCPP="g++ -E"
-
-   This is not guaranteed to produce working output in all cases, you
-may have to build one architecture at a time and combine the results
-using the `lipo' tool if you have problems.
-
-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.
-
-Particular systems
-==================
-
-   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
-CC is not installed, it is recommended to use the following options in
-order to use an ANSI C compiler:
-
-     ./configure CC="cc -Ae"
-
-and if that doesn't work, install pre-built binaries of GCC for HP-UX.
-
-   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
-parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
-a workaround.  If GNU CC is not installed, it is therefore recommended
-to try
-
-     ./configure CC="cc"
-
-and if that doesn't work, try
-
-     ./configure CC="cc -nodtk"
-
-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 all of the options to `configure', and exit.
-
-`--help=short'
-`--help=recursive'
-     Print a summary of the options unique to this package's
-     `configure', and exit.  The `short' variant lists options used
-     only in the top level, while the `recursive' variant lists options
-     also present in any nested packages.
-
-`--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.
-
-`--prefix=DIR'
-     Use DIR as the installation prefix.  *Note Installation Names::
-     for more details, including other options available for fine-tuning
-     the installation locations.
-
-`--no-create'
-`-n'
-     Run the configure checks, but stop before creating any output
-     files.
-
-`configure' also accepts some other, not widely useful, options.  Run
-`configure --help' for more details.
-
diff --git a/p2pproxy/Makefile.am b/p2pproxy/Makefile.am
deleted file mode 100644 (file)
index aaa51ae..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-EXTRA_DIST=dependencies dependencies-src src test-src
-
-SUBDIRS=launcher plugin-src
-
-ALL_JARS= \
-       $(top_builddir)/antbuild/dist/p2pproxy_0.1/bcprov-jdk14.jar   $(top_builddir)/antbuild/dist/p2pproxy_0.1/log4j.jar \
-       $(top_builddir)/antbuild/dist/p2pproxy_0.1/javax.servlet.jar  $(top_builddir)/antbuild/dist/p2pproxy_0.1/org.mortbay.jetty.jar \
-       $(top_builddir)/antbuild/dist/p2pproxy_0.1/jstun-0.7.0.jar    $(top_builddir)/antbuild/dist/p2pproxy_0.1/p2pproxy.jar \
-       $(top_builddir)/antbuild/dist/p2pproxy_0.1/junit-4.3.1.jar    $(top_builddir)/antbuild/dist/p2pproxy_0.1/sip.jar
-
-$(ALL_JARS):   src/org/linphone/p2pproxy/*/*.java
-       $(ANT) dist
-
-jarsdir=$(datadir)/java/fonis
-
-jars_DATA=$(ALL_JARS)
-
-clean-local:
-       $(ANT) clean
diff --git a/p2pproxy/NEWS b/p2pproxy/NEWS
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/p2pproxy/README b/p2pproxy/README
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/p2pproxy/autogen.sh b/p2pproxy/autogen.sh
deleted file mode 100755 (executable)
index d342f28..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-#AM_VERSION=1.10
-#1.9 was the recommended version
-if test -n "$AM_VERSION" ; then
-       ACLOCAL=aclocal-${AM_VERSION}
-       AUTOMAKE=automake-${AM_VERSION}
-else
-       ACLOCAL=aclocal
-       AUTOMAKE=automake
-fi
-
-echo "Generating build scripts in this mediastreamer plugin"
-set -x
-libtoolize --copy --force
-$ACLOCAL
-$AUTOMAKE --force-missing --add-missing --copy
-autoconf
-rm -rf config.cache
-
diff --git a/p2pproxy/bin/p2pproxy-cmd.bat b/p2pproxy/bin/p2pproxy-cmd.bat
deleted file mode 100644 (file)
index f1fc5f0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-@echo off
-"%JAVA_HOME%\bin\java.exe" -cp p2pproxy.jar org.linphone.p2pproxy.core.utils.AccountManagerCli %1 %2 %3 %4 %5 %6 %7 %8 %9
\ No newline at end of file
diff --git a/p2pproxy/bin/p2pproxy-cmd.sh b/p2pproxy/bin/p2pproxy-cmd.sh
deleted file mode 100644 (file)
index 1598057..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec ${JAVA_HOME}/bin/java -cp p2pproxy.jar org.linphone.p2pproxy.core.utils.AccountManagerCli $*
\ No newline at end of file
diff --git a/p2pproxy/bin/p2pproxy.bat b/p2pproxy/bin/p2pproxy.bat
deleted file mode 100644 (file)
index 21eaf93..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-@echo off
-"%JAVA_HOME%\bin\java.exe" -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=6789 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -jar p2pproxy.jar  %1 %2 %3 %4 %5 %6 %7 %8 %9
\ No newline at end of file
diff --git a/p2pproxy/bin/p2pproxy.sh b/p2pproxy/bin/p2pproxy.sh
deleted file mode 100644 (file)
index 91f3191..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-if [ -z "$P2P_JMX_PORT"] ; then
-       P2P_JMX_PORT=6789
-fi
-exec ${JAVA_HOME}/bin/java -Dcom.sun.management.jmxremote \
-               -Dcom.sun.management.jmxremote.port=${P2P_JMX_PORT} \
-               -Dcom.sun.management.jmxremote.authenticate=false \
-               -Dcom.sun.management.jmxremote.ssl=false \
-               -jar p2pproxy.jar $*
\ No newline at end of file
diff --git a/p2pproxy/build.xml b/p2pproxy/build.xml
deleted file mode 100644 (file)
index 02d3a75..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
-<?xml version="1.0"?>
-<!-- WARNING: Eclipse auto-generated file.
-              Any modifications will be overwritten.
-              To include a user specific buildfile here, simply create one in the same
-              directory with the processing instruction <?eclipse.ant.import?>
-              as the first entry and export the buildfile again. -->
-<project name="p2pproxy" default="build" basedir=".">
-  <property environment="env"/>
-  <property name="junit.output.dir" value="junit"/>
-  <property name="debuglevel" value="source,lines,vars"/>
-  <property name="target" value="1.5"/>
-  <property name="source" value="1.5"/>
-  <property name="seeding-address" value="tcp://localhost:9701"/>
-  <property name="public-address" value="127.0.0.1"/>
-  <property name="public-address-user" value="root"/>   
-  <property name="version" value="0.1"/>     
-  <property name="jxta-src" location="dependencies-src/jxse-src-2.5"/>
-  <property name="jstun-src" location="dependencies-src/jstun-src-0.7.1"/>
-  <property name="dist.dir" location="antbuild/dist/p2pproxy_${version}"/>
-  <property name="jni-src" location="antbuild/p2pproxy/jni_src/org/linphone/p2pproxy/launcher"/>
-  
-   <path id="p2pproxy.classpath">
-    <pathelement location="antbuild/p2pproxy"/>
-    <pathelement location="dependencies/log4j.jar"/>
-    <pathelement location="dependencies/sip.jar"/>
-    <pathelement location="dependencies/bcprov-jdk14.jar"/>
-    <pathelement location="dependencies/junit-4.3.1.jar"/>
-    <pathelement location="dependencies/javax.servlet.jar"/>
-    <pathelement location="dependencies/org.mortbay.jetty.jar"/>
-  </path>
-  <target name="init">
-   <mkdir dir="antbuild"/>
-   <mkdir dir="antbuild/p2pproxy"/>
-   <mkdir dir="antbuild/p2pproxy-tester"/>
-   <mkdir dir="${dist.dir}"/>
-   <mkdir dir="antbuild/META-INF"/>
-   <copy overwrite="true" todir="antbuild" includeemptydirs="false">
-     <fileset dir="src" excludes="**/*.launch, **/*.java"/>
-   </copy>
-  </target>
-  <target name="clean">
-    <delete dir="antbuild"/>
-  </target>
-  <target name="cleanall" depends="clean"/>
-  <target name="build" depends="build-subprojects,build-project"/>
-  <target name="build-subprojects"/>
-  
-       <target name="jni-src" depends="init" >
-               <property name="p2pproxy-h"     location="launcher/src/p2pproxy.h"/>
-               <mkdir dir="${jni-src}"/>
-                               <exec failonerror="yes" executable="swig">
-                                       <arg line=" -java -outdir ${jni-src} -package org.linphone.p2pproxy.launcher"/>
-                                       <arg line=" ${p2pproxy-h} "/>
-                               </exec>         
-       </target>
-
-       <target name="build-project" depends="init,jni-src">
-    <echo message="${ant.project.name}: ${ant.file}"/>
-      <javac destdir="antbuild/p2pproxy" debug="true" debuglevel="${debuglevel}" source="${source}" target="${target}">
-      <src path="src"/>
-      <src path="${jxta-src}/api/src"/>
-      <src path="${jxta-src}/impl/src"/> 
-      <src path="${jstun-src}" />
-      <src path="${jni-src}" />
-      <exclude name="**/*Tester.java"/> 
-      <classpath refid="p2pproxy.classpath"/>
-    </javac>
-    <copy overwrite="true" todir="antbuild/p2pproxy">
-         <fileset dir="${jxta-src}/impl/src">
-            <include name="**/*.properties"/>
-               <include name="META-INF/**/*"/>
-         </fileset>  
-   </copy> 
-   <copy overwrite="true" todir="antbuild/p2pproxy">
-            <fileset dir="${jxta-src}/api/src">
-               <include name="**/*.properties"/>
-             </fileset>  
-      </copy> 
-      <javac destdir="antbuild/p2pproxy-tester" debug="true" debuglevel="${debuglevel}" source="${source}" target="${target}">
-     <src path="test-src"/>
-    <!-- include api for Class loader isolation --> 
-      <!--src path="${jxta-src}/api/src"/-->  
-      <!--include name="**/*Tester.java"/--> 
-      <!--include name="**/*Tester.java"/-->
-      <src path="src"/>
-      <include name="**/*.java"/>  
-      <include name="org/linphone/p2pproxy/api/P2pProxyInstance.java"/>   
-      <exclude name="org/linphone/p2pproxy/core/**/*.java"/>  
-     <classpath refid="p2pproxy.classpath"/>
-   </javac>
-  </target>
-  
-   <target name="build-refprojects" description="Build all projects which reference this project. Useful to propagate changes."/>
-  <target name="P2pProxyMain-relay">
-    <java fork="yes" classname="org.linphone.p2pproxy.core.P2pProxyMain" failonerror="true">
-      <jvmarg value="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"/> 
-      <arg value="-jxta"/>
-      <arg path="${user.home}/relay"/>
-         <arg line="-sip 5041 -relay -seeding-relay ${seeding-address} -seeding-rdv ${seeding-address}"/>
-      <classpath refid="p2pproxy.classpath"/>
-    </java>
-  </target>
-  <target name="P2pProxyMain-edge">
-    <java fork="yes" classname="org.linphone.p2pproxy.core.P2pProxyMain" failonerror="true">
-      <jvmarg value="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"/> 
-      <arg value="-jxta"/>
-      <arg path="${user.home}/edge"/>
-      <arg line="-sip 5042 -edge-only -seeding-relay ${seeding-address} -seeding-rdv ${seeding-address}"/>
-      <classpath refid="p2pproxy.classpath"/>
-    </java>
-  </target>
-  <target name="junit-test">
-      <junit printsummary="withOutAndErr" haltonfailure="no" showoutput="yes" fork="yes">
-      <jvmarg value="-Xdebug"/> 
-      <jvmarg value="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"/> 
-         <formatter type="plain" />
-           <classpath>
-                   <pathelement location="dependencies/junit-4.3.1.jar" />
-                   <pathelement location="antbuild/p2pproxy-tester" />
-                   <pathelement location="dependencies/log4j.jar"/>
-                   <pathelement location="dependencies/sip.jar"/>
-           </classpath>
-           <batchtest>
-                   <fileset dir="antbuild/p2pproxy-tester">
-                           <include name="org/linphone/p2pproxy/test/P2pProxyNetworkingTester.class" />
-                           <!--include name="org/linphone/p2pproxy/test/P2pProxyNatedNetworkTester.class" /--> 
-                   </fileset>
-           </batchtest>
-   </junit>
- </target>
-     <target name="junit-test-nat">
-         <junit printsummary="withOutAndErr" haltonfailure="no" showoutput="yes" fork="yes">
-         <jvmarg value="-Xdebug"/> 
-         <jvmarg value="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"/> 
-         <jvmarg value="-Dp2pproxy.publicAddress=${public-address}"/>
-         <jvmarg value="-Dp2pproxy.publicAddressUser=${public-address-user}"/>  
-            <formatter type="plain" />
-              <classpath>
-                      <pathelement location="dependencies/junit-4.3.1.jar" />
-                      <pathelement location="antbuild/p2pproxy-tester" />
-                      <pathelement location="dependencies/log4j.jar"/>
-                      <pathelement location="dependencies/sip.jar"/>
-              </classpath>
-              <batchtest>
-                      <fileset dir="antbuild/p2pproxy-tester">
-                              <include name="org/linphone/p2pproxy/test/P2pProxyNatedNetworkTester.class" /> 
-                      </fileset>
-              </batchtest>
-      </junit>
-    </target>
-   
-  <target name="junitreport">
-    <junitreport todir="${junit.output.dir}">
-      <fileset dir="${junit.output.dir}">
-        <include name="TEST-*.xml"/>
-      </fileset>
-      <report format="frames" todir="${junit.output.dir}"/>
-    </junitreport>
-  </target>
-  <target name="dist" depends="build-project">
-   <!--prep-->
-   <copy overwrite="true" todir="${dist.dir}" >
-            <fileset dir="dependencies">
-               <include name="*"/>
-             </fileset>  
-   </copy> 
-   
-   <copy file="log4j.properties" tofile="${dist.dir}/log4j.properties"/>
-   <copy file="bin/p2pproxy.sh" tofile="${dist.dir}/p2pproxy.sh"/>
-   <copy file="bin/p2pproxy.bat" tofile="${dist.dir}/p2pproxy.bat"/>
-   <copy file="bin/p2pproxy-cmd.sh" tofile="${dist.dir}/p2pproxy-cmd.sh"/>
-   <copy file="bin/p2pproxy-cmd.bat" tofile="${dist.dir}/p2pproxy-cmd.bat"/>
-
-      <fixcrlf srcdir="${dist.dir}" includes="*.sh"
-            eol="lf" eof="remove" />
-   <fixcrlf srcdir="${dist.dir}"
-            includes="*.bat" eol="crlf" />
-   <chmod file="${dist.dir}/*.sh" perm="ugo+rx"/>
-   
-   <!-- build jar-->
-   <jar jarfile="${dist.dir}/p2pproxy.jar" basedir="antbuild/p2pproxy"/>
-
-   <manifest file="antbuild/META-INF/MANIFEST.MF">
-     <attribute name="Built-By" value="${user.name}"/>
-     <attribute name="Main-Class" value="org.linphone.p2pproxy.core.P2pProxyMain"/>
-     <attribute name="Class-Path" value="log4j.jar bcprov-jdk14.jar javax.servlet.jar org.mortbay.jetty.jar sip.jar"/>   
-   </manifest>
-   <!-- put manifest + log4j.properties -->
-   <jar jarfile="${dist.dir}/p2pproxy.jar" compress="false" keepcompression="true" update="true"  manifest="antbuild/META-INF/MANIFEST.MF" basedir="." includes="log4j.properties"/>
-   
-   <zip destfile="antbuild/p2pproxy_${version}.zip"  basedir="antbuild/dist" />
-   
-  </target>  
-</project>
diff --git a/p2pproxy/configure.ac b/p2pproxy/configure.ac
deleted file mode 100644 (file)
index fffaf61..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-AC_INIT([p2pproxy],[0.0.1])
-
-AM_INIT_AUTOMAKE([tar-ustar])
-
-AC_CANONICAL_SYSTEM
-
-AC_MSG_CHECKING([warning make an error on compilation])
-AC_ARG_ENABLE(strict,
-[  --enable-strict       Enable error on compilation warning [default=no]],
-[wall_werror=$enableval],
-[wall_werror=no]
-)
-
-
-dnl Checks for programs.
-AC_PROG_CC
-AC_PROG_LIBTOOL
-AC_DISABLE_STATIC
-
-
-CFLAGS="$CFLAGS -Wall"
-
-
-dnl Checks for header files.
-AC_HEADER_STDC
-
-dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_C_INLINE
-AC_HEADER_TIME
-AC_WORDS_BIGENDIAN
-if test x$ac_cv_c_bigendian = xyes ; then
-       CFLAGS="$CFLAGS -D_BIGENDIAN"
-fi
-
-if test $GCC = yes && test $wall_werror = yes;  then
-       CFLAGS="$CFLAGS -Werror "
-fi
-
-AC_ARG_WITH(java,
-               [  --with-java  Sets directory of java home,  [default=/usr/lib/jvm/java-6-sun] ],
-               [ javadir=${withval}],[javadir=/usr/lib/jvm/java-6-sun/])
-
-AC_SUBST(javadir)
-
-AC_PATH_PROG(ANT,ant,false)
-
-AC_PATH_PROG(SWIG,swig,false)
-
-if test x$ANT = xfalse ; then
-       AC_MSG_ERROR([ant not found: you must install ant to build this package.])
-fi
-
-if test x$prefix = xNONE ; then
-       jarsdir="/usr/local/share/java/fonis"
-else
-       jarsdir="$prefix/share/java/fonis"
-fi
-
-AC_DEFINE_UNQUOTED(P2PPROXY_INSTALLDIR,"$jarsdir",[path of jars])
-
-PKG_CHECK_MODULES(LIBLINPHONE, linphone >= 3.0.0)
-
-LINPHONE_PLUGINS_DIR="\$(libdir)/liblinphone/plugins/"
-AC_SUBST(LINPHONE_PLUGINS_DIR)
-
-dnl ##################################################
-dnl # Check for ESP Packager
-dnl ##################################################
-
-AC_PATH_PROG(EPM,epm,false)
-AC_PATH_PROG(MKEPMLIST,mkepmlist,false)
-AC_PATH_PROG(EPMINSTALL,epminstall,false)
-AM_CONDITIONAL(WITH_EPM,test $EPM != false && test $MKEPMLIST != false && test $EPMINSTALL != false)
-
-
-# Preferred packaging system, as per EPM terminology
-case $target in
-*-*-linux*)
-       if test -f /etc/debian_version ; then
-               EPM_PKG_EXT=deb
-       else
-               EPM_PKG_EXT=rpm
-       fi
-       ;;
-*-hp-hpux*)
-       EPM_PKG_EXT=depot.gz;;
-*-dec-osf*)
-       EPM_PKG_EXT=setld;;
-esac
-AC_SUBST(EPM_PKG_EXT)
-
-# System software User & Group names
-case $target in
-*-*-linux*)
-       SYS_USER=root
-       SYS_GROUP=root
-       ;;
-*-*-hpux*|*-dec-osf*)
-       SYS_USER=bin
-       SYS_GROUP=bin
-       ;;
-esac
-AC_SUBST(SYS_USER)
-AC_SUBST(SYS_GROUP)
-
-# CPU Architecture
-case $target_cpu in
-i?86)          ARCH=i386;;
-*)             ARCH=$target_cpu;;
-esac
-AC_SUBST(ARCH)
-
-# Various other packaging variables, that can be over-ridden ad `make
-# package' time
-SUMMARY="A SIP P2P proxy and toolkit"
-AC_SUBST(SUMMARY)
-PACKAGER=anonymous
-AC_SUBST(PACKAGER)
-LICENSE=GPL
-AC_SUBST(LICENSE)
-VENDOR=Linphone
-AC_SUBST(VENDOR)
-RELEASE=1
-AC_SUBST(RELEASE)
-
-
-AC_OUTPUT(
-Makefile
-launcher/Makefile
-launcher/src/Makefile
-plugin-src/Makefile
-)
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/ChangeRequest.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/ChangeRequest.java
deleted file mode 100644 (file)
index bf83df6..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.attribute;
-
-import de.javawi.jstun.util.*;
-
-public class ChangeRequest extends MessageAttribute {
-   /* 
-    *  0                   1                   2                   3
-    *  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-    * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-    * |0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 A B 0|
-    * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-    */
-       boolean changeIP = false;
-       boolean changePort = false;
-       
-       public ChangeRequest() {
-               super(MessageAttribute.MessageAttributeType.ChangeRequest);
-       }
-       
-       public boolean isChangeIP() {
-               return changeIP;
-       }
-       
-       public boolean isChangePort() {
-               return changePort;
-       }
-       
-       public void setChangeIP() {
-               changeIP = true;
-       }
-       
-       public void setChangePort() {
-               changePort = true;
-       }
-       
-       public byte[] getBytes() throws UtilityException {
-               byte[] result = new byte[8];
-               // message attribute header
-               // type
-               System.arraycopy(Utility.integerToTwoBytes(typeToInteger(type)), 0, result, 0, 2);
-               // length
-               System.arraycopy(Utility.integerToTwoBytes(4), 0, result, 2, 2);
-               
-               // change request header
-               if (changeIP) result[7] = Utility.integerToOneByte(4);
-               if (changePort) result[7] = Utility.integerToOneByte(2);
-               if (changeIP && changePort) result[7] = Utility.integerToOneByte(6);
-               return result;
-       }
-       
-       public static ChangeRequest parse(byte[] data) throws MessageAttributeParsingException {
-               try {
-                       if (data.length < 4) {
-                               throw new MessageAttributeParsingException("Data array too short");
-                       }
-                       ChangeRequest cr = new ChangeRequest();
-                       int status = Utility.oneByteToInteger(data[3]);
-                       switch (status) {
-                       case 0: break;
-                       case 2: cr.setChangePort(); break;
-                       case 4: cr.setChangeIP(); break;
-                       case 6: cr.setChangeIP(); cr.setChangePort(); break;
-                       default: throw new MessageAttributeParsingException("Status parsing error"); 
-                       }
-                       return cr;
-               } catch (UtilityException ue) {
-                       throw new MessageAttributeParsingException("Parsing error");
-               }
-       }
-}
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/ChangedAddress.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/ChangedAddress.java
deleted file mode 100644 (file)
index ce06b60..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.attribute;
-
-import java.util.logging.Logger;
-
-
-public class ChangedAddress extends MappedResponseChangedSourceAddressReflectedFrom {
-       private static Logger logger = Logger.getLogger("de.javawi.stun.attribute.ChangedAddress");
-       
-       public ChangedAddress() {
-               super(MessageAttribute.MessageAttributeType.ChangedAddress);
-       }
-       
-       public static MessageAttribute parse(byte[] data) throws MessageAttributeParsingException {
-               ChangedAddress ca = new ChangedAddress();
-               MappedResponseChangedSourceAddressReflectedFrom.parse(ca, data);
-               logger.finer("Message Attribute: Changed Address parsed: " + ca.toString() + ".");
-               return ca;
-       }
-}
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/Data.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/Data.java
deleted file mode 100644 (file)
index 71452ad..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-package de.javawi.jstun.attribute;
-
-import java.util.logging.Logger;
-
-import de.javawi.jstun.util.UtilityException;
-
-public class Data extends MessageAttribute {
-       private static Logger logger = Logger.getLogger(Data.class.getName());
-       @Override
-       public byte[] getBytes() throws UtilityException {
-               // TODO Auto-generated method stub
-               return null;
-       }
-       public static MessageAttribute parse(byte[] data) throws MessageAttributeParsingException {
-               Data ma = new Data();
-               
-               logger.finer("Message Attribute: Data Address parsed: " + ma.toString() + ".");
-               return ma;
-       }
-}
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/Dummy.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/Dummy.java
deleted file mode 100644 (file)
index 8e780dc..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.attribute;
-
-import de.javawi.jstun.util.Utility;
-import de.javawi.jstun.util.UtilityException;
-
-public class Dummy extends MessageAttribute {
-       int lengthValue;
-       public Dummy() {
-               super(MessageAttributeType.Dummy);
-       }
-       
-       public void setLengthValue(int length) {
-               this.lengthValue = length;
-       }
-
-       public byte[] getBytes() throws UtilityException {
-               byte[] result = new byte[lengthValue + 4];
-               //      message attribute header
-               // type
-               System.arraycopy(Utility.integerToTwoBytes(typeToInteger(type)), 0, result, 0, 2);
-               // length
-               System.arraycopy(Utility.integerToTwoBytes(lengthValue), 0, result, 2, 2);
-               return result;
-       }
-       
-       public static Dummy parse(byte[] data) {
-               Dummy dummy = new Dummy();
-               dummy.setLengthValue(data.length);
-               return dummy;
-       }
-}
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/ErrorCode.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/ErrorCode.java
deleted file mode 100644 (file)
index 04436dd..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.attribute;
-
-import de.javawi.jstun.util.Utility;
-import de.javawi.jstun.util.UtilityException;
-
-public class ErrorCode extends MessageAttribute {
-   /* 
-    *  0                   1                   2                   3
-    *  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-    * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-    * |                   0                     |Class|     Number    |
-    * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-    * |      Reason Phrase (variable)                                ..
-    * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-    */
-       
-       int responseCode;
-       String reason;
-       
-       public ErrorCode() {
-               super(MessageAttribute.MessageAttributeType.ErrorCode);
-       }
-       
-       public void setResponseCode(int responseCode) throws MessageAttributeException {
-               switch (responseCode) {
-               case 400: reason = "Bad Request"; break;
-               case 401: reason = "Unauthorized"; break;
-               case 420: reason = "Unkown Attribute"; break;
-               case 430: reason = "Stale Credentials"; break;
-               case 431: reason = "Integrity Check Failure"; break;
-               case 432: reason = "Missing Username"; break;
-               case 433: reason = "Use TLS"; break;
-               case 500: reason = "Server Error"; break;
-               case 600: reason = "Global Failure"; break;
-               default: throw new MessageAttributeException("Response Code is not valid");
-               }
-               this.responseCode = responseCode;
-       }
-       
-       public int getResponseCode() {
-               return responseCode;
-       }
-       
-       public String getReason() {
-               return reason;
-       }
-
-       public byte[] getBytes() throws UtilityException {
-               int length = reason.length();
-               // length adjustment
-               if ((length % 4) != 0) {
-                       length += 4 - (length % 4);
-               }
-               // message attribute header
-               length += 4;
-               byte[] result = new byte[length];
-               // message attribute header
-               // type
-               System.arraycopy(Utility.integerToTwoBytes(typeToInteger(type)), 0, result, 0, 2);
-               // length
-               System.arraycopy(Utility.integerToTwoBytes(length-4), 0, result, 2, 2);
-               
-               // error code header
-               int classHeader = (int) Math.floor(((double)responseCode)/100);
-               result[6] = Utility.integerToOneByte(classHeader);
-               result[7] = Utility.integerToOneByte(responseCode%100);
-               byte[] reasonArray = reason.getBytes();
-               System.arraycopy(reasonArray, 0, result, 8, reasonArray.length);                
-               return result;
-       }
-       
-       public static ErrorCode parse(byte[] data) throws MessageAttributeParsingException {
-               try {
-                       if (data.length < 4) {
-                               throw new MessageAttributeParsingException("Data array too short");
-                       }
-                       byte classHeaderByte = data[3];
-                       int classHeader = Utility.oneByteToInteger(classHeaderByte);
-                       if ((classHeader < 1) || (classHeader > 6)) throw new MessageAttributeParsingException("Class parsing error");
-                       byte numberByte = data[4];
-                       int number = Utility.oneByteToInteger(numberByte);
-                       if ((number < 0) || (number > 99)) throw new MessageAttributeParsingException("Number parsing error");
-                       int responseCode = (classHeader * 100) + number;
-                       ErrorCode result = new ErrorCode();
-                       result.setResponseCode(responseCode);
-                       return result;
-               } catch (UtilityException ue) {
-                       throw new MessageAttributeParsingException("Parsing error");
-               } catch (MessageAttributeException mae) {
-                       throw new MessageAttributeParsingException("Parsing error");
-               }               
-       }
-}
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/MappedAddress.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/MappedAddress.java
deleted file mode 100644 (file)
index bdb84ac..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.attribute;
-
-import java.util.logging.Logger;
-
-
-public class MappedAddress extends MappedResponseChangedSourceAddressReflectedFrom {
-       private static Logger logger = Logger.getLogger("de.javawi.stun.attribute.MappedAddress");
-       public MappedAddress() {
-               super(MessageAttribute.MessageAttributeType.MappedAddress);
-       }
-       
-       public static MessageAttribute parse(byte[] data) throws MessageAttributeParsingException {
-               MappedAddress ma = new MappedAddress();
-               MappedResponseChangedSourceAddressReflectedFrom.parse(ma, data);
-               logger.finer("Message Attribute: Mapped Address parsed: " + ma.toString() + ".");
-               return ma;
-       }
-}
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/MappedResponseChangedSourceAddressReflectedFrom.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/MappedResponseChangedSourceAddressReflectedFrom.java
deleted file mode 100644 (file)
index 252e960..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.attribute;
-
-import de.javawi.jstun.util.*;
-
-public class MappedResponseChangedSourceAddressReflectedFrom extends MessageAttribute {
-       int port;
-       Address address;
-       
-       /*  
-        *  0                   1                   2                   3
-        *  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-        * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-        * |x x x x x x x x|    Family     |           Port                |
-        * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-        * |                             Address                           |
-        * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-        */
-       public MappedResponseChangedSourceAddressReflectedFrom() {
-               super();
-               try {
-                       port = 0;
-                       address = new Address("0.0.0.0");
-               } catch (UtilityException ue) {
-                       ue.getMessage();
-                       ue.printStackTrace();
-               }
-       }
-       
-       public MappedResponseChangedSourceAddressReflectedFrom(MessageAttribute.MessageAttributeType type) {
-               super(type);
-       }
-       
-       public int getPort() {
-               return port;
-       }
-       
-       public Address getAddress() {
-               return address;
-       }
-       
-       public void setPort(int port) throws MessageAttributeException {
-               if ((port > 65536) || (port < 0)) {
-                       throw new MessageAttributeException("Port value " + port + " out of range.");
-               }
-               this.port = port;
-       }
-       
-       public void setAddress(Address address) {
-               this.address = address;
-       }
-       
-       public byte[] getBytes() throws UtilityException {
-               byte[] result = new byte[12];
-               // message attribute header
-               // type
-               System.arraycopy(Utility.integerToTwoBytes(typeToInteger(type)), 0, result, 0, 2);
-               // length
-               System.arraycopy(Utility.integerToTwoBytes(8), 0, result, 2, 2);
-               
-               // mappedaddress header
-               // family
-               result[5] = Utility.integerToOneByte(0x01); 
-               // port
-               System.arraycopy(Utility.integerToTwoBytes(port), 0, result, 6, 2);
-               // address
-               System.arraycopy(address.getBytes(), 0, result, 8, 4);
-               return result;
-       }
-       
-       protected static MappedResponseChangedSourceAddressReflectedFrom parse(MappedResponseChangedSourceAddressReflectedFrom ma, byte[] data) throws MessageAttributeParsingException {
-               try {
-                       if (data.length < 8) {
-                               throw new MessageAttributeParsingException("Data array too short");
-                       }
-                       int family = Utility.oneByteToInteger(data[1]);
-                       if (family != 0x01) throw new MessageAttributeParsingException("Family " + family + " is not supported");
-                       byte[] portArray = new byte[2];
-                       System.arraycopy(data, 2, portArray, 0, 2);
-                       ma.setPort(Utility.twoBytesToInteger(portArray));
-                       int firstOctet = Utility.oneByteToInteger(data[4]);
-                       int secondOctet = Utility.oneByteToInteger(data[5]);
-                       int thirdOctet = Utility.oneByteToInteger(data[6]);
-                       int fourthOctet = Utility.oneByteToInteger(data[7]);
-                       ma.setAddress(new Address(firstOctet, secondOctet, thirdOctet, fourthOctet));
-                       return ma;
-               } catch (UtilityException ue) {
-                       throw new MessageAttributeParsingException("Parsing error");
-               } catch (MessageAttributeException mae) {
-                       throw new MessageAttributeParsingException("Port parsing error");
-               }
-       }
-       
-       public String toString() {
-               return "Address " +address.toString() + ", Port " + port;
-       }
-}
\ No newline at end of file
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/MessageAttribute.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/MessageAttribute.java
deleted file mode 100644 (file)
index 2c1f1ef..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.attribute;
-
-import java.util.logging.*;
-
-import de.javawi.jstun.util.*;
-
-
-public abstract class MessageAttribute implements MessageAttributeInterface {
-       private static Logger logger = Logger.getLogger("de.javawi.stun.util.MessageAttribute");
-       MessageAttributeType type;
-       
-       public MessageAttribute() {
-       }
-       
-       public MessageAttribute(MessageAttributeType type) {
-               setType(type);
-       }
-       
-       public void setType(MessageAttributeType type) {
-               this.type = type;
-       }
-       
-       public MessageAttribute.MessageAttributeType getType() {
-               return type;
-       }
-       
-       public static int typeToInteger(MessageAttributeType type) {
-               if (type == MessageAttributeType.MappedAddress) return MAPPEDADDRESS;
-               if (type == MessageAttributeType.ResponseAddress) return RESPONSEADDRESS;
-               if (type == MessageAttributeType.ChangeRequest) return CHANGEREQUEST;
-               if (type == MessageAttributeType.SourceAddress) return SOURCEADDRESS;
-               if (type == MessageAttributeType.ChangedAddress) return CHANGEDADDRESS;
-               if (type == MessageAttributeType.Username) return USERNAME;
-               if (type == MessageAttributeType.Password) return PASSWORD;
-               if (type == MessageAttributeType.MessageIntegrity) return MESSAGEINTEGRITY;
-               if (type == MessageAttributeType.ErrorCode) return ERRORCODE;
-               if (type == MessageAttributeType.UnknownAttribute) return UNKNOWNATTRIBUTE;
-               if (type == MessageAttributeType.ReflectedFrom) return REFLECTEDFROM;
-               if (type == MessageAttributeType.Dummy) return DUMMY;
-               //turn
-               if (type == MessageAttributeType.ChannelNumber) return CHANNELNUMBER;
-               if (type == MessageAttributeType.LifeTime) return LIFETIME;
-               if (type == MessageAttributeType.Bandwidth ) return BANDWIDTH;
-               if (type == MessageAttributeType.PeerAddress ) return PEERADDRESS;
-               if (type == MessageAttributeType.Data ) return DATA;
-               if (type == MessageAttributeType.RelayAddress ) return RELAYADDRESS;
-               if (type == MessageAttributeType.RequestedProps ) return REQUESTEDPROPS;
-               if (type == MessageAttributeType.RequestedTransport ) return REQUESTEDTRANSPORT;
-               if (type == MessageAttributeType.ReservationToken ) return RESERVATIONTOKEN;
-               return -1;
-       }
-       
-       public static MessageAttributeType intToType(long type) {
-               if (type == MAPPEDADDRESS) return MessageAttributeType.MappedAddress;
-               if (type == RESPONSEADDRESS) return MessageAttributeType.ResponseAddress;
-               if (type == CHANGEREQUEST) return MessageAttributeType.ChangeRequest;
-               if (type == SOURCEADDRESS) return MessageAttributeType.SourceAddress;
-               if (type == CHANGEDADDRESS) return MessageAttributeType.ChangedAddress;
-               if (type == USERNAME) return MessageAttributeType.Username;
-               if (type == PASSWORD) return MessageAttributeType.Password;
-               if (type == MESSAGEINTEGRITY) return MessageAttributeType.MessageIntegrity;
-               if (type == ERRORCODE) return MessageAttributeType.ErrorCode;
-               if (type == UNKNOWNATTRIBUTE) return MessageAttributeType.UnknownAttribute;
-               if (type == REFLECTEDFROM) return MessageAttributeType.ReflectedFrom;
-               if (type == DUMMY) return MessageAttributeType.Dummy;
-               //turn
-               if (type == CHANNELNUMBER) return MessageAttributeType.ChannelNumber;
-               if (type == LIFETIME) return MessageAttributeType.LifeTime;
-               if (type == BANDWIDTH) return MessageAttributeType.Bandwidth;
-               if (type == PEERADDRESS) return MessageAttributeType.PeerAddress;
-               if (type == DATA) return MessageAttributeType.Data;
-               if (type == RELAYADDRESS) return MessageAttributeType.RelayAddress;
-               if (type == REQUESTEDPROPS) return MessageAttributeType.RequestedProps;
-               if (type == REQUESTEDTRANSPORT) return MessageAttributeType.RequestedTransport;
-               if (type == RESERVATIONTOKEN) return MessageAttributeType.ReservationToken;
-               return null;
-       }
-       
-       abstract public byte[] getBytes() throws UtilityException;
-       //abstract public MessageAttribute parse(byte[] data) throws MessageAttributeParsingException;
-       
-       public int getLength() throws UtilityException {
-               int length = getBytes().length;
-               return length;
-       }
-       
-       public static MessageAttribute parseCommonHeader(byte[] data) throws MessageAttributeParsingException {
-               try {                   
-                       byte[] typeArray = new byte[2];
-                       System.arraycopy(data, 0, typeArray, 0, 2);
-                       int type = Utility.twoBytesToInteger(typeArray);
-                       byte[] lengthArray = new byte[2];
-                       System.arraycopy(data, 2, lengthArray, 0, 2);
-                       int lengthValue = Utility.twoBytesToInteger(lengthArray);
-                       byte[] valueArray = new byte[lengthValue];
-                       System.arraycopy(data, 4, valueArray, 0, lengthValue);
-                       MessageAttribute ma;
-                       switch (type) {
-                       case MAPPEDADDRESS: ma = MappedAddress.parse(valueArray); break;
-                       case RESPONSEADDRESS: ma = ResponseAddress.parse(valueArray); break;
-                       case CHANGEREQUEST: ma = ChangeRequest.parse(valueArray); break;
-                       case SOURCEADDRESS: ma = SourceAddress.parse(valueArray); break;
-                       case CHANGEDADDRESS: ma = ChangedAddress.parse(valueArray); break;
-                       case USERNAME: ma = Username.parse(valueArray); break;
-                       case PASSWORD: ma = Password.parse(valueArray); break;
-                       case MESSAGEINTEGRITY: ma = MessageIntegrity.parse(valueArray); break;
-                       case ERRORCODE: ma = ErrorCode.parse(valueArray); break;
-                       case UNKNOWNATTRIBUTE: ma = UnknownAttribute.parse(valueArray); break;
-                       case REFLECTEDFROM: ma = ReflectedFrom.parse(valueArray); break;
-                       default:
-                               if (type <= 0x7fff) {
-                                       throw new UnknownMessageAttributeException("Unkown mandatory message attribute", intToType(type));
-                               } else {
-                                       logger.finer("MessageAttribute with type " + type + " unkown.");
-                                       ma = Dummy.parse(valueArray);
-                                       break;
-                               }
-                       }
-                       return ma;
-               } catch (UtilityException ue) {
-                       throw new MessageAttributeParsingException("Parsing error");
-               }
-       }
-}
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/MessageAttributeException.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/MessageAttributeException.java
deleted file mode 100644 (file)
index a8109cf..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.attribute;
-
-public class MessageAttributeException extends Exception {
-       private static final long serialVersionUID = 3258131345099404850L;
-
-       public MessageAttributeException(String mesg) {
-               super(mesg);
-       }
-}
\ No newline at end of file
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/MessageAttributeInterface.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/MessageAttributeInterface.java
deleted file mode 100644 (file)
index 8c55d78..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.attribute;
-
-public interface MessageAttributeInterface {
-       public enum MessageAttributeType { MappedAddress
-                                                                               , ResponseAddress
-                                                                               , ChangeRequest
-                                                                               , SourceAddress
-                                                                               , ChangedAddress
-                                                                               , Username
-                                                                               , Password
-                                                                               , MessageIntegrity
-                                                                               , ErrorCode
-                                                                               , UnknownAttribute
-                                                                               , ReflectedFrom
-                                                                               , Dummy
-                                                                               , ChannelNumber
-                                                                               , LifeTime
-                                                                               , Bandwidth
-                                                                               , PeerAddress
-                                                                               , Data
-                                                                               , RelayAddress
-                                                                               , RequestedProps
-                                                                               , RequestedTransport
-                                                                               , ReservationToken};
-       final static int MAPPEDADDRESS = 0x0001;
-       final static int RESPONSEADDRESS = 0x0002;
-       final static int CHANGEREQUEST = 0x0003;
-       final static int SOURCEADDRESS = 0x0004;
-       final static int CHANGEDADDRESS = 0x0005;
-       final static int USERNAME = 0x0006;
-       final static int PASSWORD = 0x0007;
-       final static int MESSAGEINTEGRITY = 0x0008;
-       final static int ERRORCODE = 0x0009;
-       final static int UNKNOWNATTRIBUTE = 0x000a;
-       final static int REFLECTEDFROM = 0x000b;
-       final static int DUMMY = 0x0000;
-// turn attributes
-//    0x000C: CHANNEL-NUMBER
-//    0x000D: LIFETIME
-//    0x0010: BANDWIDTH
-//    0x0012: PEER-ADDRESS
-//    0x0013: DATA
-//    0x0016: RELAY-ADDRESS
-//    0x0018: REQUESTED-PROPS
-//    0x0019: REQUESTED-TRANSPORT
-//    0x0022: RESERVATION-TOKEN
-       final static int CHANNELNUMBER = 0x000C;
-       final static int LIFETIME = 0x000D;
-       final static int BANDWIDTH = 0x0010;
-       final static int PEERADDRESS = 0x0012;
-       final static int DATA = 0x0013;
-       final static int RELAYADDRESS = 0x0016;
-       final static int REQUESTEDPROPS = 0x0018;
-       final static int REQUESTEDTRANSPORT = 0x0019;
-       final static int RESERVATIONTOKEN = 0x0022;
-       
-}
\ No newline at end of file
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/MessageAttributeParsingException.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/MessageAttributeParsingException.java
deleted file mode 100644 (file)
index d202789..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.attribute;
-
-public class MessageAttributeParsingException extends MessageAttributeException { 
-       private static final long serialVersionUID = 3258409534426263605L;
-
-       public MessageAttributeParsingException(String mesg) {
-               super(mesg);
-       }
-}
\ No newline at end of file
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/MessageIntegrity.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/MessageIntegrity.java
deleted file mode 100644 (file)
index 7aa7df3..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.attribute;
-
-public class MessageIntegrity extends MessageAttribute {
-       // incomplete message integrity implementation
-       public MessageIntegrity() {
-               super(MessageAttribute.MessageAttributeType.MessageIntegrity);
-       }
-       
-       public byte[] getBytes() {
-               return new byte[0];
-       }
-       
-       public static MessageIntegrity parse(byte[] data) {
-               return new MessageIntegrity();
-       }
-}
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/Password.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/Password.java
deleted file mode 100644 (file)
index 679a193..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.attribute;
-
-import de.javawi.jstun.util.Utility;
-import de.javawi.jstun.util.UtilityException;
-
-public class Password extends MessageAttribute {
-       String password;
-       
-       public Password() {
-               super(MessageAttribute.MessageAttributeType.Password);
-       }
-       
-       public Password(String password) {
-               super(MessageAttribute.MessageAttributeType.Password);
-               setPassword(password);
-       }
-       
-       public String getPassword() {
-               return password;
-       }
-       
-       public void setPassword(String password) {
-               this.password = password;
-       }
-       
-       public byte[] getBytes() throws UtilityException {
-               int length = password.length();
-               // password header
-               if ((length % 4) != 0) {
-                       length += 4 - (length % 4);
-               }
-               // message attribute header
-               length += 4;
-               byte[] result = new byte[length];
-               // message attribute header
-               // type
-               System.arraycopy(Utility.integerToTwoBytes(typeToInteger(type)), 0, result, 0, 2);
-               // length
-               System.arraycopy(Utility.integerToTwoBytes(length - 4), 0, result, 2, 2);
-               
-               // password header
-               byte[] temp = password.getBytes();
-               System.arraycopy(temp, 0, result, 4, temp.length);
-               return result;
-       }
-       
-       public static Password parse(byte[] data) {
-               Password result = new Password();
-               String password = new String(data);
-               result.setPassword(password);
-               return result;
-       }
-}
\ No newline at end of file
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/ReflectedFrom.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/ReflectedFrom.java
deleted file mode 100644 (file)
index e298314..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.attribute;
-
-import java.util.logging.Logger;
-
-public class ReflectedFrom extends MappedResponseChangedSourceAddressReflectedFrom {
-       private static Logger logger = Logger.getLogger("de.javawi.stun.attribute.ReflectedFrom");
-       
-       public ReflectedFrom() {
-               super(MessageAttribute.MessageAttributeType.ReflectedFrom);
-       }
-       
-       public static ReflectedFrom parse(byte[] data) throws MessageAttributeParsingException {
-               ReflectedFrom result = new ReflectedFrom();
-               MappedResponseChangedSourceAddressReflectedFrom.parse(result, data);
-               logger.finer("Message Attribute: ReflectedFrom parsed: " + result.toString() + ".");
-               return result;
-       }
-
-       
-}
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/ResponseAddress.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/ResponseAddress.java
deleted file mode 100644 (file)
index 40c73bd..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.attribute;
-
-import java.util.logging.Logger;
-
-
-public class ResponseAddress extends MappedResponseChangedSourceAddressReflectedFrom {
-       private static Logger logger = Logger.getLogger("de.javawi.stun.attribute.ResponseAddress");
-       public ResponseAddress() {
-               super(MessageAttribute.MessageAttributeType.ResponseAddress);
-       }
-       
-       public static MessageAttribute parse(byte[] data) throws MessageAttributeParsingException {
-               ResponseAddress ra = new ResponseAddress();
-               MappedResponseChangedSourceAddressReflectedFrom.parse(ra, data);
-               logger.finer("Message Attribute: Response Address parsed: " + ra.toString() + ".");
-               return ra;
-       }
-}
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/SourceAddress.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/SourceAddress.java
deleted file mode 100644 (file)
index 070d7d8..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.attribute;
-
-import java.util.logging.Logger;
-
-
-public class SourceAddress extends MappedResponseChangedSourceAddressReflectedFrom {
-       private static Logger logger = Logger.getLogger("de.javawi.stun.attribute.SourceAddress");
-       public SourceAddress() {
-               super(MessageAttribute.MessageAttributeType.SourceAddress);
-       }
-       
-       public static MessageAttribute parse(byte[] data) throws MessageAttributeParsingException {
-               SourceAddress sa = new SourceAddress();
-               MappedResponseChangedSourceAddressReflectedFrom.parse(sa, data);
-               logger.finer("Message Attribute: Source Address parsed: " + sa.toString() + ".");
-               return sa;
-       }
-}
\ No newline at end of file
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/UnknownAttribute.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/UnknownAttribute.java
deleted file mode 100644 (file)
index 04f1abb..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.attribute;
-
-import java.util.*;
-
-import de.javawi.jstun.util.Utility;
-import de.javawi.jstun.util.UtilityException;
-
-public class UnknownAttribute extends MessageAttribute {
-       /* 
-        *  0                   1                   2                   3
-        *  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-        * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-        * |      Attribute 1 Type           |     Attribute 2 Type        |
-        * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-        * |      Attribute 3 Type           |     Attribute 4 Type    ...
-        * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-        */
-       
-       Vector<MessageAttributeType> unkown = new Vector<MessageAttributeType>();
-       
-       public UnknownAttribute() {
-               super(MessageAttribute.MessageAttributeType.UnknownAttribute);
-       }
-       
-       public void addAttribute(MessageAttributeType attribute) {
-               unkown.add(attribute);
-       }
-       
-       public byte[] getBytes() throws UtilityException {
-               int length = 0;
-               if (unkown.size()%2 == 1) {
-                       length = 2 * (unkown.size() + 1) + 4;
-               } else {
-                       length = 2 * unkown.size() + 4;
-               }
-               byte[] result = new byte[length];
-               // message attribute header
-               // type
-               System.arraycopy(Utility.integerToTwoBytes(typeToInteger(type)), 0, result, 0, 2);
-               // length
-               System.arraycopy(Utility.integerToTwoBytes(length - 4), 0, result, 2, 2);
-               
-               // unkown attribute header
-               Iterator<MessageAttributeType> it = unkown.iterator();
-               while(it.hasNext()) {
-                       MessageAttributeType attri = it.next();
-                       System.arraycopy(Utility.integerToTwoBytes(typeToInteger(attri)), 0, result, 4, 2);
-               }
-               // padding
-               if (unkown.size()%2 == 1) {
-                       System.arraycopy(Utility.integerToTwoBytes(typeToInteger(unkown.elementAt(1))), 0, result, 4, 2);
-               }
-               return result;
-       }
-
-       public static UnknownAttribute parse(byte[] data) throws MessageAttributeParsingException {
-               try {
-                       UnknownAttribute result = new UnknownAttribute();
-                       if (data.length % 4 != 0) throw new MessageAttributeParsingException("Data array too short");
-                       for (int i = 0; i < data.length; i += 4) {
-                               byte[] temp = new byte[4];
-                               System.arraycopy(data, i, temp, 0, 4);
-                               long attri = Utility.fourBytesToLong(temp);
-                               result.addAttribute(MessageAttribute.intToType(attri));
-                       }
-                       return result;
-               } catch (UtilityException ue) {
-                       throw new MessageAttributeParsingException("Parsing error");
-               }
-       }
-}
\ No newline at end of file
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/UnknownMessageAttributeException.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/UnknownMessageAttributeException.java
deleted file mode 100644 (file)
index 4ddd492..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-package de.javawi.jstun.attribute;
-
-import de.javawi.jstun.attribute.MessageAttributeInterface.MessageAttributeType;
-
-public class UnknownMessageAttributeException extends MessageAttributeParsingException {
-       private static final long serialVersionUID = 5375193544145543299L;
-       
-       private MessageAttributeType type;
-       
-       public UnknownMessageAttributeException(String mesg, MessageAttributeType type) {
-               super(mesg);
-               this.type = type;
-       }
-       
-       public MessageAttributeType getType() {
-               return type;
-       }
-}
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/Username.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/attribute/Username.java
deleted file mode 100644 (file)
index 1afaec7..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.attribute;
-
-import de.javawi.jstun.util.Utility;
-import de.javawi.jstun.util.UtilityException;
-
-public class Username extends MessageAttribute {
-       String username;
-       
-       public Username() {
-               super(MessageAttribute.MessageAttributeType.Username);
-       }
-       
-       public Username(String username) {
-               super(MessageAttribute.MessageAttributeType.Username);
-               setUsername(username);
-       }
-       
-       public String getUsername() {
-               return username;
-       }
-       
-       public void setUsername(String username) {
-               this.username = username;
-       }
-       
-       public byte[] getBytes() throws UtilityException {
-               int length = username.length();
-               // username header
-               if ((length % 4) != 0) {
-                       length += 4 - (length % 4);
-               }
-               // message attribute header
-               length += 4;
-               byte[] result = new byte[length];
-               // message attribute header
-               // type
-               System.arraycopy(Utility.integerToTwoBytes(typeToInteger(type)), 0, result, 0, 2);
-               // length
-               System.arraycopy(Utility.integerToTwoBytes(length-4), 0, result, 2, 2);
-               
-               // username header
-               byte[] temp = username.getBytes();
-               System.arraycopy(temp, 0, result, 4, temp.length);
-               return result;
-       }
-       
-       public static Username parse(byte[] data) {
-               Username result = new Username();
-               String username = new String(data);
-               result.setUsername(username);
-               return result;
-       }
-}
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/header/MessageHeader.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/header/MessageHeader.java
deleted file mode 100644 (file)
index 1e6dab5..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.header;
-
-import de.javawi.jstun.attribute.*;
-import de.javawi.jstun.util.*;
-
-import java.util.*;
-import java.util.logging.*;
-
-public class MessageHeader implements MessageHeaderInterface {
-       /*
-        *  0                   1                   2                   3
-     *  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-     * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-     * |      STUN Message Type        |         Message Length        |
-     * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-     * |
-     * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-     *
-     * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-     *                          Transaction ID
-     * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-     *                                                                 |
-     * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-        */
-       private static Logger logger = Logger.getLogger("de.javawi.stun.header.MessageHeader");
-       MessageHeaderType type;
-       byte[] id = new byte[16];
-       
-       TreeMap<MessageAttribute.MessageAttributeType, MessageAttribute> ma = new TreeMap<MessageAttribute.MessageAttributeType, MessageAttribute>();
-       
-       public MessageHeader() {
-               super();
-       }
-       
-       public MessageHeader(MessageHeaderType type) {
-               super();
-               setType(type);
-       }
-               
-    public void setType(MessageHeaderType type) {
-               this.type = type;
-    }
-    
-    public MessageHeaderType getType() {
-       return type;
-    }
-       
-       public static int typeToInteger(MessageHeaderType type) {
-               if (type == MessageHeaderType.BindingRequest) return BINDINGREQUEST;
-               if (type == MessageHeaderType.BindingResponse) return BINDINGRESPONSE;
-               if (type == MessageHeaderType.BindingErrorResponse) return BINDINGERRORRESPONSE;
-               if (type == MessageHeaderType.SharedSecretRequest) return SHAREDSECRETREQUEST;
-               if (type == MessageHeaderType.SharedSecretResponse) return SHAREDSECRETRESPONSE;
-               if (type == MessageHeaderType.SharedSecretErrorResponse) return SHAREDSECRETERRORRESPONSE;
-               //turn headers
-               if (type == MessageHeaderType.AllocateRequest) return ALLOCATEREQUEST;
-               if (type == MessageHeaderType.AllocateResponse) return ALLOCATERESPONSE;
-               if (type == MessageHeaderType.AllocateErrorResponse) return ALLOCATEERRORRESPONSE;
-               if (type == MessageHeaderType.RefreshRequest) return REFRESHREQUEST;
-               if (type == MessageHeaderType.RefreshResponse) return REFRESHRESPONSE;
-               if (type == MessageHeaderType.RefreshErrorResponse) return REFRESHERRORRESPONSE;
-               if (type == MessageHeaderType.ChannelBindRequest) return CHANNELBINDREQUEST;
-               if (type == MessageHeaderType.ChannelBindResponse) return CHANNELBINDRESPONSE;
-               if (type == MessageHeaderType.ChannelBindErrorResponse) return CHANNELBINDERRORRESPONSE;
-               
-               
-               return -1;
-       }
-       
-       public void setTransactionID(byte[] id) {
-               System.arraycopy(id, 0, this.id, 0, 16);
-       }
-       
-       public void generateTransactionID() throws UtilityException {
-               System.arraycopy(Utility.integerToTwoBytes((int)(Math.random() * 65536)), 0, id, 0, 2);
-               System.arraycopy(Utility.integerToTwoBytes((int)(Math.random() * 65536)), 0, id, 2, 2);
-               System.arraycopy(Utility.integerToTwoBytes((int)(Math.random() * 65536)), 0, id, 4, 2);
-               System.arraycopy(Utility.integerToTwoBytes((int)(Math.random() * 65536)), 0, id, 6, 2);
-               System.arraycopy(Utility.integerToTwoBytes((int)(Math.random() * 65536)), 0, id, 8, 2);
-               System.arraycopy(Utility.integerToTwoBytes((int)(Math.random() * 65536)), 0, id, 10, 2);
-               System.arraycopy(Utility.integerToTwoBytes((int)(Math.random() * 65536)), 0, id, 12, 2);
-               System.arraycopy(Utility.integerToTwoBytes((int)(Math.random() * 65536)), 0, id, 14, 2);
-       }
-       
-       public byte[] getTransactionID() {
-               byte[] idCopy = new byte[id.length];
-               System.arraycopy(id, 0, idCopy, 0, id.length);
-               return idCopy;
-       }
-       
-       public boolean equalTransactionID(MessageHeader header) {
-               byte[] idHeader = header.getTransactionID();
-               if (idHeader.length != 16) return false;
-               if ((idHeader[0] == id[0]) && (idHeader[1] == id[1]) && (idHeader[2] == id[2]) && (idHeader[3] == id[3]) && 
-                       (idHeader[4] == id[4]) && (idHeader[5] == id[5]) && (idHeader[6] == id[6]) && (idHeader[7] == id[7]) && 
-                       (idHeader[8] == id[8]) && (idHeader[9] == id[9]) && (idHeader[10] == id[10]) && (idHeader[11] == id[11]) &&
-                       (idHeader[12] == id[12]) && (idHeader[13] == id[13]) && (idHeader[14] == id[14]) && (idHeader[15] == id[15])) {
-                       return true;
-               } else {
-                       return false;
-               }
-       }
-       
-       public void addMessageAttribute(MessageAttribute attri) {
-               ma.put(attri.getType(), attri);
-       }
-       
-       public MessageAttribute getMessageAttribute(MessageAttribute.MessageAttributeType type) {
-               return ma.get(type);
-       }
-       
-       public byte[] getBytes() throws UtilityException {
-               int length = 20;
-               Iterator<MessageAttribute.MessageAttributeType> it = ma.keySet().iterator();
-               while (it.hasNext()) {
-                       MessageAttribute attri = ma.get(it.next());
-                       length += attri.getLength();
-               }
-               // add attribute size + attributes.getSize();
-               byte[] result = new byte[length];
-               System.arraycopy(Utility.integerToTwoBytes(typeToInteger(type)), 0, result, 0, 2);
-               System.arraycopy(Utility.integerToTwoBytes(length-20), 0, result, 2, 2);
-               System.arraycopy(id, 0, result, 4, 16);
-               
-               // arraycopy of attributes
-               int offset = 20;
-               it = ma.keySet().iterator();
-               while (it.hasNext()) {
-                       MessageAttribute attri = ma.get(it.next());
-                       System.arraycopy(attri.getBytes(), 0, result, offset, attri.getLength());
-                       offset += attri.getLength();
-               }
-               return result;
-       }
-       
-       public int getLength() throws UtilityException {
-               return getBytes().length;
-       }
-       
-       public void parseAttributes(byte[] data) throws MessageAttributeParsingException {
-               try {
-                       byte[] lengthArray = new byte[2];
-                       System.arraycopy(data, 2, lengthArray, 0, 2);
-                       int length = Utility.twoBytesToInteger(lengthArray);
-                       System.arraycopy(data, 4, id, 0, 16);
-                       byte[] cuttedData;
-                       int offset = 20;
-                       while (length > 0) {
-                               cuttedData = new byte[length];
-                               System.arraycopy(data, offset, cuttedData, 0, length);
-                               MessageAttribute ma = MessageAttribute.parseCommonHeader(cuttedData); 
-                               addMessageAttribute(ma);
-                               length -= ma.getLength();
-                               offset += ma.getLength();
-                       }
-               } catch (UtilityException ue) {
-                       throw new MessageAttributeParsingException("Parsing error");
-               }
-       }
-       
-       public static MessageHeader parseHeader(byte[] data) throws MessageHeaderParsingException {
-               try {
-                       MessageHeader mh = new MessageHeader();
-                       byte[] typeArray = new byte[2];
-                       System.arraycopy(data, 0, typeArray, 0, 2);
-                       int type = Utility.twoBytesToInteger(typeArray);
-                       switch (type) {
-                       case BINDINGREQUEST: mh.setType(MessageHeaderType.BindingRequest); logger.finer("Binding Request received."); break;
-                       case BINDINGRESPONSE: mh.setType(MessageHeaderType.BindingResponse); logger.finer("Binding Response received."); break;
-                       case BINDINGERRORRESPONSE: mh.setType(MessageHeaderType.BindingErrorResponse); logger.finer("Binding Error Response received."); break;
-                       case SHAREDSECRETREQUEST: mh.setType(MessageHeaderType.SharedSecretRequest); logger.finer("Shared Secret Request received."); break;
-                       case SHAREDSECRETRESPONSE: mh.setType(MessageHeaderType.SharedSecretResponse); logger.finer("Shared Secret Response received."); break;
-                       case SHAREDSECRETERRORRESPONSE: mh.setType(MessageHeaderType.SharedSecretErrorResponse); logger.finer("Shared Secret Error Response received.");break;
-                       //turn
-                       case ALLOCATEREQUEST: mh.setType(MessageHeaderType.AllocateRequest); logger.finer("Allocate Request received."); break;
-                       case ALLOCATERESPONSE: mh.setType(MessageHeaderType.AllocateResponse); logger.finer("Allocate Response received."); break;
-                       case ALLOCATEERRORRESPONSE: mh.setType(MessageHeaderType.AllocateErrorResponse); logger.finer("Allocate Errro received."); break;
-                       case REFRESHREQUEST: mh.setType(MessageHeaderType.RefreshRequest); logger.finer("Refresh Request received."); break;
-                       case REFRESHRESPONSE: mh.setType(MessageHeaderType.RefreshResponse); logger.finer("Refresh Response received."); break;
-                       case REFRESHERRORRESPONSE: mh.setType(MessageHeaderType.RefreshErrorResponse); logger.finer("Refresh Error received."); break;
-                       case CHANNELBINDREQUEST: mh.setType(MessageHeaderType.ChannelBindRequest); logger.finer("ChannelBind Request received."); break;
-                       case CHANNELBINDRESPONSE: mh.setType(MessageHeaderType.ChannelBindResponse); logger.finer("ChannelBind Response received."); break;
-                       case CHANNELBINDERRORRESPONSE: mh.setType(MessageHeaderType.ChannelBindErrorResponse); logger.finer("ChannelBind Error received."); break;
-                       default: throw new MessageHeaderParsingException("Message type " + type + "is not supported"); 
-                       }
-                       return mh;
-               } catch (UtilityException ue) {
-                       throw new MessageHeaderParsingException("Parsing error");
-               }
-       }
-}
\ No newline at end of file
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/header/MessageHeaderException.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/header/MessageHeaderException.java
deleted file mode 100644 (file)
index f4a9fa4..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.header;
-
-public class MessageHeaderException extends Exception {
-       private static final long serialVersionUID = 3689066248944103737L;
-
-       public MessageHeaderException(String mesg) {
-               super(mesg);
-       }
-}
\ No newline at end of file
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/header/MessageHeaderInterface.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/header/MessageHeaderInterface.java
deleted file mode 100644 (file)
index 1b7a2cf..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.header;
-
-public interface MessageHeaderInterface {
-       public enum MessageHeaderType { BindingRequest
-                                        , BindingResponse
-                                        , BindingErrorResponse
-                                        , SharedSecretRequest
-                                        , SharedSecretResponse
-                                        , SharedSecretErrorResponse
-                                        , AllocateRequest
-                                        , AllocateResponse
-                                        , AllocateErrorResponse
-                                        , RefreshRequest
-                                        , RefreshResponse
-                                        , RefreshErrorResponse
-                                        , ChannelBindRequest
-                                        , ChannelBindResponse
-                                        , ChannelBindErrorResponse
-                                        ,SendIndication
-                                        ,DataIndication};
-       final static int BINDINGREQUEST = 0x0001;
-       final static int BINDINGRESPONSE = 0x0101;
-       final static int BINDINGERRORRESPONSE = 0x0111;
-       final static int SHAREDSECRETREQUEST = 0x0002;
-       final static int SHAREDSECRETRESPONSE = 0x0102;
-       final static int SHAREDSECRETERRORRESPONSE = 0x0112;
-
-//       TURN defines ten new Message Types:
-//Request/Response Transactions
-//0x003  :  Allocate
-//0x004  :  Refresh
-//0x009  :  ChannelBind
-//0x006  :  Send
-//0x007  :  Data
-
-
-       final static int ALLOCATEREQUEST = 0x0003;
-       final static int ALLOCATERESPONSE = 0x0103;
-       final static int ALLOCATEERRORRESPONSE = 0x0113;
-       final static int REFRESHREQUEST = 0x0004;
-       final static int REFRESHRESPONSE = 0x0104;
-       final static int REFRESHERRORRESPONSE = 0x0114;
-    final static int CHANNELBINDREQUEST = 0x0009;
-    final static int CHANNELBINDRESPONSE = 0x0109;
-    final static int CHANNELBINDERRORRESPONSE = 0x0119;
-    final static int SENDINDICATION = 0x0006;
-    final static int DATAINDICATION = 0x0007;
-       
-       
-}
\ No newline at end of file
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/header/MessageHeaderParsingException.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/header/MessageHeaderParsingException.java
deleted file mode 100644 (file)
index d5192ef..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.header;
-
-public class MessageHeaderParsingException extends MessageHeaderException {
-       private static final long serialVersionUID = 3544393617029607478L;
-
-       public MessageHeaderParsingException(String mesg) {
-               super(mesg);
-       }
-}
\ No newline at end of file
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/test/BindingLifetimeTest.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/test/BindingLifetimeTest.java
deleted file mode 100644 (file)
index 1dca91b..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.test;
-
-import java.util.logging.*;
-import java.util.*;
-import java.io.*;
-import java.net.*;
-
-import de.javawi.jstun.attribute.*;
-import de.javawi.jstun.header.*;
-import de.javawi.jstun.util.UtilityException;
-
-public class BindingLifetimeTest {
-       private static Logger logger = Logger.getLogger("de.javawi.stun.test.BindingLifetimeTest");
-       String stunServer;
-       int port;
-       int timeout = 300; //ms
-       MappedAddress ma;
-       Timer timer;
-       DatagramSocket initialSocket;
-       
-       // start value for binary search - should be carefully choosen
-       int upperBinarySearchLifetime = 345000; // ms
-       int lowerBinarySearchLifetime = 0;
-       int binarySearchLifetime = ( upperBinarySearchLifetime + lowerBinarySearchLifetime ) / 2;
-       
-       // lifetime value
-       int lifetime = -1; // -1 means undefined.
-       boolean completed = false;
-               
-       public BindingLifetimeTest(String stunServer, int port) {
-               super();
-               this.stunServer = stunServer;
-               this.port = port;
-               timer = new Timer(true);
-       }
-       
-       public void test() throws UtilityException, SocketException, UnknownHostException, IOException, MessageAttributeParsingException, MessageAttributeException, MessageHeaderParsingException {
-               initialSocket = new DatagramSocket();
-               initialSocket.connect(InetAddress.getByName(stunServer), port);
-               initialSocket.setSoTimeout(timeout);
-               
-               if (bindingCommunicationInitialSocket()) {
-                       return;
-               }
-               BindingLifetimeTask task = new BindingLifetimeTask();
-               timer.schedule(task, binarySearchLifetime);
-               logger.finer("Timer scheduled initially: " + binarySearchLifetime + ".");
-       }
-       
-       private boolean bindingCommunicationInitialSocket() throws UtilityException, IOException, MessageHeaderParsingException, MessageAttributeParsingException {
-               MessageHeader sendMH = new MessageHeader(MessageHeader.MessageHeaderType.BindingRequest);
-               sendMH.generateTransactionID();
-               ChangeRequest changeRequest = new ChangeRequest();
-               sendMH.addMessageAttribute(changeRequest);
-               byte[] data = sendMH.getBytes();
-               
-               DatagramPacket send = new DatagramPacket(data, data.length, InetAddress.getByName(stunServer), port);
-               initialSocket.send(send);
-               logger.finer("Binding Request sent.");
-       
-               MessageHeader receiveMH = new MessageHeader();
-               while (!(receiveMH.equalTransactionID(sendMH))) {
-                       DatagramPacket receive = new DatagramPacket(new byte[200], 200);
-                       initialSocket.receive(receive);
-                       receiveMH = MessageHeader.parseHeader(receive.getData());
-                       receiveMH.parseAttributes(receive.getData());
-               }
-               ma = (MappedAddress) receiveMH.getMessageAttribute(MessageAttribute.MessageAttributeType.MappedAddress);
-               ErrorCode ec = (ErrorCode) receiveMH.getMessageAttribute(MessageAttribute.MessageAttributeType.ErrorCode);
-               if (ec != null) {
-                       logger.config("Message header contains an Errorcode message attribute.");
-                       return true;
-               }
-               if (ma == null) {
-                       logger.config("Response does not contain a Mapped Address message attribute.");
-                       return true;
-               }
-               return false;
-       }
-       
-       public int getLifetime() {
-               return lifetime;
-       }
-       
-       public boolean isCompleted() {
-               return completed;
-       }
-       
-       public void setUpperBinarySearchLifetime(int upperBinarySearchLifetime) {
-               this.upperBinarySearchLifetime = upperBinarySearchLifetime;
-               binarySearchLifetime = ( upperBinarySearchLifetime + lowerBinarySearchLifetime ) / 2;
-       }
-       
-       class BindingLifetimeTask extends TimerTask {
-               
-               public BindingLifetimeTask() {
-                       super();
-               }
-               
-               public void run() {
-                       try {
-                               lifetimeQuery();
-                       } catch (Exception e) {
-                               logger.config("Unhandled Exception. BindLifetimeTasks stopped.");
-                               e.printStackTrace();
-                       }
-               }
-               
-               public void lifetimeQuery() throws UtilityException, MessageAttributeException, MessageHeaderParsingException, MessageAttributeParsingException, IOException {
-                       try {
-                               DatagramSocket socket = new DatagramSocket();
-                               socket.connect(InetAddress.getByName(stunServer), port);
-                               socket.setSoTimeout(timeout);
-                       
-                               MessageHeader sendMH = new MessageHeader(MessageHeader.MessageHeaderType.BindingRequest);
-                               sendMH.generateTransactionID();
-                               ChangeRequest changeRequest = new ChangeRequest();
-                               ResponseAddress responseAddress = new ResponseAddress();
-                               responseAddress.setAddress(ma.getAddress());
-                               responseAddress.setPort(ma.getPort());
-                               sendMH.addMessageAttribute(changeRequest);
-                               sendMH.addMessageAttribute(responseAddress);
-                               byte[] data = sendMH.getBytes();
-                       
-                               DatagramPacket send = new DatagramPacket(data, data.length, InetAddress.getByName(stunServer), port);
-                               socket.send(send);
-                               logger.finer("Binding Request sent.");
-               
-                               MessageHeader receiveMH = new MessageHeader();
-                               while (!(receiveMH.equalTransactionID(sendMH))) {
-                                       DatagramPacket receive = new DatagramPacket(new byte[200], 200);
-                                       initialSocket.receive(receive);
-                                       receiveMH = MessageHeader.parseHeader(receive.getData());
-                                       receiveMH.parseAttributes(receive.getData());
-                               }
-                               ErrorCode ec = (ErrorCode) receiveMH.getMessageAttribute(MessageAttribute.MessageAttributeType.ErrorCode);
-                               if (ec != null) {
-                                       logger.config("Message header contains errorcode message attribute.");
-                                       return;
-                               }
-                               logger.finer("Binding Response received.");
-                               if (upperBinarySearchLifetime == (lowerBinarySearchLifetime + 1)) {
-                                       logger.config("BindingLifetimeTest completed. UDP binding lifetime: " + binarySearchLifetime + ".");
-                                       completed = true;
-                                       return;
-                               }
-                               lifetime = binarySearchLifetime;
-                               logger.finer("Lifetime update: " + lifetime + ".");
-                               lowerBinarySearchLifetime = binarySearchLifetime;
-                               binarySearchLifetime = ( upperBinarySearchLifetime + lowerBinarySearchLifetime ) / 2;
-                               if (binarySearchLifetime > 0) {
-                                       BindingLifetimeTask task = new BindingLifetimeTask();
-                                       timer.schedule(task, binarySearchLifetime);
-                                       logger.finer("Timer scheduled: " + binarySearchLifetime + ".");
-                               } else {
-                                       completed = true;
-                               }
-                       } catch (SocketTimeoutException ste) {
-                               logger.finest("Read operation at query socket timeout.");
-                               if (upperBinarySearchLifetime == (lowerBinarySearchLifetime + 1)) {
-                                       logger.config("BindingLifetimeTest completed. UDP binding lifetime: " + binarySearchLifetime + ".");
-                                       completed = true;
-                                       return;
-                               }
-                               upperBinarySearchLifetime = binarySearchLifetime;
-                               binarySearchLifetime = ( upperBinarySearchLifetime + lowerBinarySearchLifetime ) / 2;
-                               if (binarySearchLifetime > 0) {
-                                       if (bindingCommunicationInitialSocket()) {
-                                               return;
-                                       }
-                                       BindingLifetimeTask task = new BindingLifetimeTask();
-                                       timer.schedule(task, binarySearchLifetime);
-                                       logger.finer("Timer scheduled: " + binarySearchLifetime + ".");
-                               } else {
-                                       completed = true;
-                               }
-                       }
-               }
-       }
-}
-
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/test/DiscoveryInfo.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/test/DiscoveryInfo.java
deleted file mode 100644 (file)
index abaab15..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.test;
-
-import java.net.*;
-
-public class DiscoveryInfo {
-       private InetAddress testIP;
-       private boolean error = false;
-       private int errorResponseCode = 0;
-       private String errorReason;
-       private boolean openAccess = false;
-       private boolean blockedUDP = false;
-       private boolean fullCone = false;
-       private boolean restrictedCone = false;
-       private boolean portRestrictedCone = false;
-       private boolean symmetric = false;
-       private boolean symmetricUDPFirewall = false;
-       private InetAddress publicIP;
-       
-       public DiscoveryInfo(InetAddress testIP) {
-               this.testIP = testIP;
-       }
-       
-       public boolean isError() {
-               return error;
-       }
-       
-       public void setError(int responseCode, String reason) {
-               this.error = true;
-               this.errorResponseCode = responseCode;
-               this.errorReason = reason;
-       }
-       
-       public boolean isOpenAccess() {
-               if (error) return false;
-               return openAccess;
-       }
-
-       public void setOpenAccess() {
-               this.openAccess = true;
-       }
-
-       public boolean isBlockedUDP() {
-               if (error) return false;
-               return blockedUDP;
-       }
-
-       public void setBlockedUDP() {
-               this.blockedUDP = true;
-       }
-       
-       public boolean isFullCone() {
-               if (error) return false;
-               return fullCone;
-       }
-
-       public void setFullCone() {
-               this.fullCone = true;
-       }
-
-       public boolean isPortRestrictedCone() {
-               if (error) return false;
-               return portRestrictedCone;
-       }
-
-       public void setPortRestrictedCone() {
-               this.portRestrictedCone = true;
-       }
-
-       public boolean isRestrictedCone() {
-               if (error) return false;
-               return restrictedCone;
-       }
-
-       public void setRestrictedCone() {
-               this.restrictedCone = true;
-       }
-
-       public boolean isSymmetric() {
-               if (error) return false;
-               return symmetric;
-       }
-
-       public void setSymmetric() {
-               this.symmetric = true;
-       }
-
-       public boolean isSymmetricUDPFirewall() {
-               if (error) return false;
-               return symmetricUDPFirewall;
-       }
-
-       public void setSymmetricUDPFirewall() {
-               this.symmetricUDPFirewall = true;
-       }
-       
-       public InetAddress getPublicIP() {
-               return publicIP;
-       }
-       
-       public InetAddress getLocalIP() {
-               return testIP;
-       }
-       
-       public void setPublicIP(InetAddress publicIP) {
-               this.publicIP = publicIP;
-       }
-       
-       public String toString() {
-               StringBuffer sb = new StringBuffer();
-               sb.append("Network interface: ");
-               try {
-                       sb.append(NetworkInterface.getByInetAddress(testIP).getName());
-               } catch (SocketException se) {
-                       sb.append("unknown");
-               }
-               sb.append("\n");
-               sb.append("Local IP address: ");
-               sb.append(testIP.getHostAddress());
-               sb.append("\n");
-               if (error) {
-                       sb.append(errorReason + " - Responsecode: " + errorResponseCode);
-                       return sb.toString();
-               }
-               sb.append("Result: ");
-               if (openAccess) sb.append("Open access to the Internet.\n");
-               if (blockedUDP) sb.append("Firewall blocks UDP.\n");
-               if (fullCone) sb.append("Full Cone NAT handles connections.\n");
-               if (restrictedCone) sb.append("Restricted Cone NAT handles connections.\n");
-               if (portRestrictedCone) sb.append("Port restricted Cone NAT handles connections.\n");
-               if (symmetric) sb.append("Symmetric Cone NAT handles connections.\n");
-               if (symmetricUDPFirewall) sb.append ("Symmetric UDP Firewall handles connections.\n");
-               if (!openAccess && !blockedUDP && !fullCone && !restrictedCone && !portRestrictedCone && !symmetric && !symmetricUDPFirewall) sb.append("unkown\n");
-               sb.append("Public IP address: ");
-               if (publicIP != null) {
-                       sb.append(publicIP.getHostAddress());
-               } else {
-                       sb.append("unknown");
-               }
-               sb.append("\n");
-               return sb.toString();
-       }       
-}
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/test/DiscoveryTest.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/test/DiscoveryTest.java
deleted file mode 100644 (file)
index 4f940ad..0000000
+++ /dev/null
@@ -1,351 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.test;
-
-import java.io.IOException;
-import java.net.DatagramPacket;
-import java.net.DatagramSocket;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.SocketException;
-import java.net.SocketTimeoutException;
-import java.net.UnknownHostException;
-import java.util.logging.Logger;
-
-
-
-
-
-import de.javawi.jstun.attribute.ChangeRequest;
-import de.javawi.jstun.attribute.ChangedAddress;
-import de.javawi.jstun.attribute.ErrorCode;
-import de.javawi.jstun.attribute.MappedAddress;
-import de.javawi.jstun.attribute.MessageAttribute;
-import de.javawi.jstun.attribute.MessageAttributeException;
-import de.javawi.jstun.attribute.MessageAttributeParsingException;
-import de.javawi.jstun.header.MessageHeader;
-import de.javawi.jstun.header.MessageHeaderParsingException;
-import de.javawi.jstun.util.UtilityException;
-
-public class DiscoveryTest {
-       private static Logger logger = Logger.getLogger("de.javawi.stun.test.DiscoveryTest");
-       InetAddress iaddress;
-       String stunServer;
-       int port;
-       int timeoutInitValue = 300; //ms
-       MappedAddress ma = null;
-       ChangedAddress ca = null;
-       boolean nodeNatted = true;
-       DatagramSocket socketTest1 = null;
-       DiscoveryInfo di = null;
-       
-       public DiscoveryTest(InetAddress iaddress , String stunServer, int port) {
-               super();
-               this.iaddress = iaddress;
-               this.stunServer = stunServer;
-               this.port = port;
-       }
-               
-       public DiscoveryInfo test() throws UtilityException, SocketException, UnknownHostException, IOException, MessageAttributeParsingException, MessageAttributeException, MessageHeaderParsingException{
-               ma = null;
-               ca = null;
-               nodeNatted = true;
-               socketTest1 = null;
-               di = new DiscoveryInfo(iaddress);
-               
-               if (test1()) {
-                       if (test2()) {
-                               if (test1Redo()) {
-                                       test3();
-                               }
-                       }
-               }
-               
-               socketTest1.close();
-               
-               return di;
-       }
-       
-       private boolean test1() throws UtilityException, SocketException, UnknownHostException, IOException, MessageAttributeParsingException, MessageHeaderParsingException {
-               int timeSinceFirstTransmission = 0;
-               int timeout = timeoutInitValue;
-               while (true) {
-                       try {
-                               // Test 1 including response
-                               socketTest1 = new DatagramSocket(new InetSocketAddress(iaddress, 0));
-                               socketTest1.setReuseAddress(true);
-                               socketTest1.connect(InetAddress.getByName(stunServer), port);
-                               socketTest1.setSoTimeout(timeout);
-                               
-                               MessageHeader sendMH = new MessageHeader(MessageHeader.MessageHeaderType.BindingRequest);
-                               sendMH.generateTransactionID();
-                               
-                               ChangeRequest changeRequest = new ChangeRequest();
-                               sendMH.addMessageAttribute(changeRequest);
-                               
-                               byte[] data = sendMH.getBytes();
-                               DatagramPacket send = new DatagramPacket(data, data.length);
-                               socketTest1.send(send);
-                               logger.finer("Test 1: Binding Request sent.");
-                       
-                               MessageHeader receiveMH = new MessageHeader();
-                               while (!(receiveMH.equalTransactionID(sendMH))) {
-                                       DatagramPacket receive = new DatagramPacket(new byte[200], 200);
-                                       socketTest1.receive(receive);
-                                       receiveMH = MessageHeader.parseHeader(receive.getData());
-                                       receiveMH.parseAttributes(receive.getData());
-                               }
-                               
-                               ma = (MappedAddress) receiveMH.getMessageAttribute(MessageAttribute.MessageAttributeType.MappedAddress);
-                               ca = (ChangedAddress) receiveMH.getMessageAttribute(MessageAttribute.MessageAttributeType.ChangedAddress);
-                               ErrorCode ec = (ErrorCode) receiveMH.getMessageAttribute(MessageAttribute.MessageAttributeType.ErrorCode);
-                               if (ec != null) {
-                                       di.setError(ec.getResponseCode(), ec.getReason());
-                                       logger.config("Message header contains an Errorcode message attribute.");
-                                       return false;
-                               }
-                               if ((ma == null) || (ca == null)) {
-                                       di.setError(700, "The server is sending an incomplete response (Mapped Address and Changed Address message attributes are missing). The client should not retry.");
-                                       logger.config("Response does not contain a Mapped Address or Changed Address message attribute.");
-                                       return false;
-                               } else {
-                                       di.setPublicIP(ma.getAddress().getInetAddress());
-                                       if ((ma.getPort() == socketTest1.getLocalPort()) && (ma.getAddress().getInetAddress().equals(socketTest1.getLocalAddress()))) {
-                                               logger.fine("Node is not natted.");
-                                               nodeNatted = false;
-                                       } else {
-                                               logger.fine("Node is natted.");
-                                       }
-                                       return true;
-                               }
-                       } catch (SocketTimeoutException ste) {
-                               if (timeSinceFirstTransmission < 7900) {
-                                       logger.finer("Test 1: Socket timeout while receiving the response.");
-                                       timeSinceFirstTransmission += timeout;
-                                       int timeoutAddValue = (timeSinceFirstTransmission * 2);
-                                       if (timeoutAddValue > 1600) timeoutAddValue = 1600;
-                                       timeout = timeoutAddValue;
-                               } else {
-                                       // node is not capable of udp communication
-                                       logger.finer("Test 1: Socket timeout while receiving the response. Maximum retry limit exceed. Give up.");
-                                       di.setBlockedUDP();
-                                       logger.fine("Node is not capable of UDP communication.");
-                                       return false;
-                               }
-                       } 
-               }
-       }
-               
-       private boolean test2() throws UtilityException, SocketException, UnknownHostException, IOException, MessageAttributeParsingException, MessageAttributeException, MessageHeaderParsingException {
-               int timeSinceFirstTransmission = 0;
-               int timeout = timeoutInitValue;
-               while (true) {
-                       try {
-                               // Test 2 including response
-                               DatagramSocket sendSocket = new DatagramSocket(new InetSocketAddress(iaddress, 0));
-                               sendSocket.connect(InetAddress.getByName(stunServer), port);
-                               sendSocket.setSoTimeout(timeout);
-                               
-                               MessageHeader sendMH = new MessageHeader(MessageHeader.MessageHeaderType.BindingRequest);
-                               sendMH.generateTransactionID();
-                               
-                               ChangeRequest changeRequest = new ChangeRequest();
-                               changeRequest.setChangeIP();
-                               changeRequest.setChangePort();
-                               sendMH.addMessageAttribute(changeRequest);
-                                        
-                               byte[] data = sendMH.getBytes(); 
-                               DatagramPacket send = new DatagramPacket(data, data.length);
-                               sendSocket.send(send);
-                               logger.finer("Test 2: Binding Request sent.");
-                               
-                               int localPort = sendSocket.getLocalPort();
-                               InetAddress localAddress = sendSocket.getLocalAddress();
-                               
-                               sendSocket.close();
-                               
-                               DatagramSocket receiveSocket = new DatagramSocket(localPort, localAddress);
-                               receiveSocket.connect(ca.getAddress().getInetAddress(), ca.getPort());
-                               receiveSocket.setSoTimeout(timeout);
-                               
-                               MessageHeader receiveMH = new MessageHeader();
-                               while(!(receiveMH.equalTransactionID(sendMH))) {
-                                       DatagramPacket receive = new DatagramPacket(new byte[200], 200);
-                                       receiveSocket.receive(receive);
-                                       receiveMH = MessageHeader.parseHeader(receive.getData());
-                                       receiveMH.parseAttributes(receive.getData());
-                               }
-                               ErrorCode ec = (ErrorCode) receiveMH.getMessageAttribute(MessageAttribute.MessageAttributeType.ErrorCode);
-                               if (ec != null) {
-                                       di.setError(ec.getResponseCode(), ec.getReason());
-                                       logger.config("Message header contains an Errorcode message attribute.");
-                                       return false;
-                               }
-                               if (!nodeNatted) {
-                                       di.setOpenAccess();
-                                       logger.fine("Node has open access to the Internet (or, at least the node is behind a full-cone NAT without translation).");
-                               } else {
-                                       di.setFullCone();
-                                       logger.fine("Node is behind a full-cone NAT.");
-                               }
-                               return false;
-                       } catch (SocketTimeoutException ste) {
-                               if (timeSinceFirstTransmission < 7900) {
-                                       logger.finer("Test 2: Socket timeout while receiving the response.");
-                                       timeSinceFirstTransmission += timeout;
-                                       int timeoutAddValue = (timeSinceFirstTransmission * 2);
-                                       if (timeoutAddValue > 1600) timeoutAddValue = 1600;
-                                       timeout = timeoutAddValue;
-                               } else {
-                                       logger.finer("Test 2: Socket timeout while receiving the response. Maximum retry limit exceed. Give up.");
-                                       if (!nodeNatted) {
-                                               di.setSymmetricUDPFirewall();
-                                               logger.fine("Node is behind a symmetric UDP firewall.");
-                                               return false;
-                                       } else {
-                                               // not is natted
-                                               // redo test 1 with address and port as offered in the changed-address message attribute
-                                               return true;
-                                       }
-                               }
-                       }
-               }
-       }
-       
-       private boolean test1Redo() throws UtilityException, SocketException, UnknownHostException, IOException, MessageAttributeParsingException, MessageHeaderParsingException{
-               int timeSinceFirstTransmission = 0;
-               int timeout = timeoutInitValue;
-               while (true) {
-                       // redo test 1 with address and port as offered in the changed-address message attribute
-                       try {
-                               // Test 1 with changed port and address values
-                               socketTest1.connect(ca.getAddress().getInetAddress(), ca.getPort());
-                               socketTest1.setSoTimeout(timeout);
-                               
-                               MessageHeader sendMH = new MessageHeader(MessageHeader.MessageHeaderType.BindingRequest);
-                               sendMH.generateTransactionID();
-                               
-                               ChangeRequest changeRequest = new ChangeRequest();
-                               sendMH.addMessageAttribute(changeRequest);
-                               
-                               byte[] data = sendMH.getBytes();
-                               DatagramPacket send = new DatagramPacket(data, data.length);
-                               socketTest1.send(send);
-                               logger.finer("Test 1 redo with changed address: Binding Request sent.");
-                               
-                               MessageHeader receiveMH = new MessageHeader();
-                               while (!(receiveMH.equalTransactionID(sendMH))) {
-                                       DatagramPacket receive = new DatagramPacket(new byte[200], 200);
-                                       socketTest1.receive(receive);
-                                       receiveMH = MessageHeader.parseHeader(receive.getData());
-                                       receiveMH.parseAttributes(receive.getData());
-                               }
-                               MappedAddress ma2 = (MappedAddress) receiveMH.getMessageAttribute(MessageAttribute.MessageAttributeType.MappedAddress);
-                               ErrorCode ec = (ErrorCode) receiveMH.getMessageAttribute(MessageAttribute.MessageAttributeType.ErrorCode);
-                               if (ec != null) {
-                                       di.setError(ec.getResponseCode(), ec.getReason());
-                                       logger.config("Message header contains an Errorcode message attribute.");
-                                       return false;
-                               }
-                               if (ma2 == null) {
-                                       di.setError(700, "The server is sending an incomplete response (Mapped Address message attribute is missing). The client should not retry.");
-                                       logger.config("Response does not contain a Mapped Address message attribute.");
-                                       return false;
-                               } else {
-                                       if ((ma.getPort() != ma2.getPort()) || (!(ma.getAddress().getInetAddress().equals(ma2.getAddress().getInetAddress())))) {
-                                               di.setSymmetric();
-                                               logger.fine("Node is behind a symmetric NAT.");
-                                               return false;
-                                       }
-                               }
-                               return true;
-                       } catch (SocketTimeoutException ste2) {
-                               if (timeSinceFirstTransmission < 7900) {
-                                       logger.config("Test 1 redo with changed address: Socket timeout while receiving the response.");
-                                       timeSinceFirstTransmission += timeout;
-                                       int timeoutAddValue = (timeSinceFirstTransmission * 2);
-                                       if (timeoutAddValue > 1600) timeoutAddValue = 1600;
-                                       timeout = timeoutAddValue;
-                               } else {
-                                       logger.config("Test 1 redo with changed address: Socket timeout while receiving the response.  Maximum retry limit exceed. Give up.");
-                                       return false;
-                               }
-                       }
-               }
-       }
-       
-       private void test3() throws UtilityException, SocketException, UnknownHostException, IOException, MessageAttributeParsingException, MessageAttributeException, MessageHeaderParsingException {
-               int timeSinceFirstTransmission = 0;
-               int timeout = timeoutInitValue;
-               while (true) {
-                       try {
-                               // Test 3 including response
-                               DatagramSocket sendSocket = new DatagramSocket(new InetSocketAddress(iaddress, 0));
-                               sendSocket.connect(InetAddress.getByName(stunServer), port);
-                               sendSocket.setSoTimeout(timeout);
-                               
-                               MessageHeader sendMH = new MessageHeader(MessageHeader.MessageHeaderType.BindingRequest);
-                               sendMH.generateTransactionID();
-                               
-                               ChangeRequest changeRequest = new ChangeRequest();
-                               changeRequest.setChangePort();
-                               sendMH.addMessageAttribute(changeRequest);
-                               
-                               byte[] data = sendMH.getBytes();
-                               DatagramPacket send = new DatagramPacket(data, data.length);
-                               sendSocket.send(send);
-                               logger.finer("Test 3: Binding Request sent.");
-                               
-                               int localPort = sendSocket.getLocalPort();
-                               InetAddress localAddress = sendSocket.getLocalAddress();
-                               
-                               sendSocket.close();
-                               
-                               DatagramSocket receiveSocket = new DatagramSocket(localPort, localAddress);
-                               receiveSocket.connect(InetAddress.getByName(stunServer), ca.getPort());
-                               receiveSocket.setSoTimeout(timeout);
-                               
-                               MessageHeader receiveMH = new MessageHeader();
-                               while (!(receiveMH.equalTransactionID(sendMH))) {
-                                       DatagramPacket receive = new DatagramPacket(new byte[200], 200);
-                                       receiveSocket.receive(receive);
-                                       receiveMH = MessageHeader.parseHeader(receive.getData());
-                                       receiveMH.parseAttributes(receive.getData());
-                               }
-                               ErrorCode ec = (ErrorCode) receiveMH.getMessageAttribute(MessageAttribute.MessageAttributeType.ErrorCode);
-                               if (ec != null) {
-                                       di.setError(ec.getResponseCode(), ec.getReason());
-                                       logger.config("Message header contains an Errorcode message attribute.");
-                                       return;
-                               }
-                               if (nodeNatted) {
-                                       di.setRestrictedCone();
-                                       logger.fine("Node is behind a restricted NAT.");
-                                       return;
-                               }
-                       } catch (SocketTimeoutException ste) {
-                               if (timeSinceFirstTransmission < 7900) {
-                                       logger.finer("Test 3: Socket timeout while receiving the response.");
-                                       timeSinceFirstTransmission += timeout;
-                                       int timeoutAddValue = (timeSinceFirstTransmission * 2);
-                                       if (timeoutAddValue > 1600) timeoutAddValue = 1600;
-                                       timeout = timeoutAddValue;
-                               } else {
-                                       logger.finer("Test 3: Socket timeout while receiving the response. Maximum retry limit exceed. Give up.");
-                                       di.setPortRestrictedCone();
-                                       logger.fine("Node is behind a port restricted NAT.");
-                                       return;
-                               }
-                       }
-               }
-       }
-}
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/test/demo/BindingLifetimeTestDemo.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/test/demo/BindingLifetimeTestDemo.java
deleted file mode 100644 (file)
index 37e20f8..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.test.demo;
-
-import java.util.logging.FileHandler;
-import java.util.logging.Handler;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.util.logging.SimpleFormatter;
-
-import de.javawi.jstun.test.BindingLifetimeTest;
-
-public class BindingLifetimeTestDemo {
-       public static void main(String args[]) {
-               try {
-                       Handler fh = new FileHandler("logging.txt");
-                       fh.setFormatter(new SimpleFormatter());
-                       Logger.getLogger("de.javawi.stun").addHandler(fh);
-                       Logger.getLogger("de.javawi.stun").setLevel(Level.ALL);
-                       BindingLifetimeTest test = new BindingLifetimeTest("iphone-stun.freenet.de", 3478);
-                       // iphone-stun.freenet.de:3478
-                       // larry.gloo.net:3478
-                       // stun.xten.net:3478
-                       test.test();
-                       boolean continueWhile = true;
-                       while(continueWhile) {
-                               Thread.sleep(5000);
-                               if (test.getLifetime() != -1) {
-                                       System.out.println("Lifetime: " + test.getLifetime() + " Finished: " + test.isCompleted());
-                                       if (test.isCompleted()) continueWhile = false;
-                               }
-                       }
-               } catch (Exception e) {
-                       System.out.println(e.getMessage());
-                       e.printStackTrace();
-               }
-       }
-}
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/test/demo/DiscoveryTestDemo.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/test/demo/DiscoveryTestDemo.java
deleted file mode 100644 (file)
index 76a6c17..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.test.demo;
-
-import java.net.BindException;
-import java.net.InetAddress;
-import java.net.NetworkInterface;
-import java.util.Enumeration;
-import java.util.logging.FileHandler;
-import java.util.logging.Handler;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.util.logging.SimpleFormatter;
-
-import de.javawi.jstun.test.DiscoveryTest;
-
-public class DiscoveryTestDemo implements Runnable {
-       InetAddress iaddress;
-       
-       public DiscoveryTestDemo(InetAddress iaddress) {
-               this.iaddress = iaddress;
-       }
-       
-       public void run() {
-               try {
-                       DiscoveryTest test = new DiscoveryTest(iaddress, "jstun.javawi.de", 3478);
-                       //DiscoveryTest test = new DiscoveryTest(iaddress, "stun.sipgate.net", 10000);
-                       // iphone-stun.freenet.de:3478
-                       // larry.gloo.net:3478
-                       // stun.xten.net:3478
-                       // stun.sipgate.net:10000
-                       System.out.println(test.test());
-               } catch (BindException be) {
-                       System.out.println(iaddress.toString() + ": " + be.getMessage());
-               } catch (Exception e) {
-                       System.out.println(e.getMessage());
-                       e.printStackTrace();
-               }
-       }
-       
-       public static void main(String args[]) {
-               try {
-                       Handler fh = new FileHandler("logging.txt");
-                       fh.setFormatter(new SimpleFormatter());
-                       Logger.getLogger("de.javawi.stun").addHandler(fh);
-                       Logger.getLogger("de.javawi.stun").setLevel(Level.ALL);
-
-                       Enumeration<NetworkInterface> ifaces = NetworkInterface.getNetworkInterfaces();
-                       while (ifaces.hasMoreElements()) {
-                               NetworkInterface iface = ifaces.nextElement();
-                               Enumeration<InetAddress> iaddresses = iface.getInetAddresses();
-                               while (iaddresses.hasMoreElements()) {
-                                       InetAddress iaddress = iaddresses.nextElement();
-                                       if (Class.forName("java.net.Inet4Address").isInstance(iaddress)) {
-                                               if ((!iaddress.isLoopbackAddress()) && (!iaddress.isLinkLocalAddress())) {
-                                                       Thread thread = new Thread(new DiscoveryTestDemo(iaddress));
-                                                       thread.start();
-                                               }
-                                       }
-                               }
-                       }
-               } catch (Exception e) {
-                       System.out.println(e.getMessage());
-               }
-       }
-}
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/test/demo/StunServer.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/test/demo/StunServer.java
deleted file mode 100644 (file)
index b72ffe7..0000000
+++ /dev/null
@@ -1,263 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.test.demo;
-
-import java.io.IOException;
-import java.net.DatagramPacket;
-import java.net.DatagramSocket;
-import java.net.InetAddress;
-import java.net.SocketException;
-import java.net.UnknownHostException;
-import java.util.Vector;
-import java.util.logging.FileHandler;
-import java.util.logging.Handler;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.util.logging.SimpleFormatter;
-
-import de.javawi.jstun.attribute.ChangeRequest;
-import de.javawi.jstun.attribute.ChangedAddress;
-import de.javawi.jstun.attribute.MappedAddress;
-import de.javawi.jstun.attribute.MessageAttributeException;
-import de.javawi.jstun.attribute.MessageAttributeParsingException;
-import de.javawi.jstun.attribute.ResponseAddress;
-import de.javawi.jstun.attribute.SourceAddress;
-import de.javawi.jstun.attribute.UnknownAttribute;
-import de.javawi.jstun.attribute.UnknownMessageAttributeException;
-import de.javawi.jstun.attribute.MessageAttributeInterface.MessageAttributeType;
-import de.javawi.jstun.header.MessageHeader;
-import de.javawi.jstun.header.MessageHeaderParsingException;
-import de.javawi.jstun.header.MessageHeaderInterface.MessageHeaderType;
-import de.javawi.jstun.util.Address;
-import de.javawi.jstun.util.UtilityException;
-
-/*
- * This class implements a STUN server as described in RFC 3489.
- * The server requires a machine that is dual-homed to be functional. 
- */
-public class StunServer {
-       private static Logger logger = Logger.getLogger("de.javawi.stun.test.StunServer");
-       Vector<DatagramSocket> sockets;
-       
-       public StunServer(int primaryPort, InetAddress primary, int secondaryPort, InetAddress secondary) throws SocketException {
-               sockets = new Vector<DatagramSocket>();
-               sockets.add(new DatagramSocket(primaryPort, primary));
-               sockets.add(new DatagramSocket(secondaryPort, primary));
-               sockets.add(new DatagramSocket(primaryPort, secondary));
-               sockets.add(new DatagramSocket(secondaryPort, secondary));
-       }
-       
-       public void start() throws SocketException {
-               for (DatagramSocket socket : sockets) {
-                       socket.setReceiveBufferSize(2000);
-                       StunServerReceiverThread ssrt = new StunServerReceiverThread(socket);
-                       ssrt.start();
-               }
-       }
-       
-       /*
-        * Inner class to handle incoming packets and react accordingly.
-        * I decided not to start a thread for every received Binding Request, because the time
-        * required to receive a Binding Request, parse it, generate a Binding Response and send
-        * it varies only between 2 and 4 milliseconds. This amount of time is small enough so
-        * that no extra thread is needed for incoming Binding Request. 
-        */
-       class StunServerReceiverThread extends Thread {
-               private DatagramSocket receiverSocket;
-               private DatagramSocket changedPort;
-               private DatagramSocket changedIP;
-               private DatagramSocket changedPortIP;
-               
-               StunServerReceiverThread(DatagramSocket datagramSocket) {
-                       this.receiverSocket = datagramSocket;
-                       for (DatagramSocket socket : sockets) {
-                               if ((socket.getLocalPort() != receiverSocket.getLocalPort()) &&
-                                       (socket.getLocalAddress().equals(receiverSocket.getLocalAddress())))
-                                       changedPort = socket;
-                               if ((socket.getLocalPort() == receiverSocket.getLocalPort()) &&
-                                       (!socket.getLocalAddress().equals(receiverSocket.getLocalAddress())))
-                                       changedIP = socket;
-                               if ((socket.getLocalPort() != receiverSocket.getLocalPort()) &&
-                                       (!socket.getLocalAddress().equals(receiverSocket.getLocalAddress())))
-                                       changedPortIP = socket;
-                       }
-               }
-               
-               public void run() {
-                       while (true) {
-                               try {
-                                       DatagramPacket receive = new DatagramPacket(new byte[200], 200);
-                                       receiverSocket.receive(receive);
-                                       logger.finest(receiverSocket.getLocalAddress().getHostAddress() + ":" + receiverSocket.getLocalPort() + " datagram received from " + receive.getAddress().getHostAddress() + ":" + receive.getPort());
-                                       MessageHeader receiveMH = MessageHeader.parseHeader(receive.getData()); 
-                                       try {
-                                               receiveMH.parseAttributes(receive.getData());
-                                               if (receiveMH.getType() == MessageHeaderType.BindingRequest) {
-                                                       logger.config(receiverSocket.getLocalAddress().getHostAddress() + ":" + receiverSocket.getLocalPort() + " Binding Request received from " + receive.getAddress().getHostAddress() + ":" + receive.getPort());
-                                                       ChangeRequest cr = (ChangeRequest) receiveMH.getMessageAttribute(MessageAttributeType.ChangeRequest);
-                                                       if (cr == null) throw new MessageAttributeException("Message attribute change request is not set.");
-                                                       ResponseAddress ra = (ResponseAddress) receiveMH.getMessageAttribute(MessageAttributeType.ResponseAddress);
-                                               
-                                                       MessageHeader sendMH = new MessageHeader(MessageHeaderType.BindingResponse);
-                                                       sendMH.setTransactionID(receiveMH.getTransactionID());
-                                               
-                                                       // Mapped address attribute
-                                                       MappedAddress ma = new MappedAddress();
-                                                       ma.setAddress(new Address(receive.getAddress().getAddress()));
-                                                       ma.setPort(receive.getPort());
-                                                       sendMH.addMessageAttribute(ma);
-                                                       // Changed address attribute
-                                                       ChangedAddress ca = new ChangedAddress();
-                                                       ca.setAddress(new Address(changedPortIP.getLocalAddress().getAddress()));
-                                                       ca.setPort(changedPortIP.getLocalPort());
-                                                       sendMH.addMessageAttribute(ca);
-                                                       if (cr.isChangePort() && (!cr.isChangeIP())) {
-                                                               logger.finer("Change port received in Change Request attribute");
-                                                               // Source address attribute
-                                                               SourceAddress sa = new SourceAddress();
-                                                               sa.setAddress(new Address(changedPort.getLocalAddress().getAddress()));
-                                                               sa.setPort(changedPort.getLocalPort());
-                                                               sendMH.addMessageAttribute(sa);
-                                                               byte[] data = sendMH.getBytes();
-                                                               DatagramPacket send = new DatagramPacket(data, data.length);
-                                                               if (ra != null) {
-                                                                       send.setPort(ra.getPort());
-                                                                       send.setAddress(ra.getAddress().getInetAddress());
-                                                               } else {
-                                                                       send.setPort(receive.getPort());
-                                                                       send.setAddress(receive.getAddress());
-                                                               }
-                                                               changedPort.send(send);
-                                                               logger.config(changedPort.getLocalAddress().getHostAddress() + ":" + changedPort.getLocalPort() + " send Binding Response to " + send.getAddress().getHostAddress() + ":" + send.getPort());
-                                                       } else if ((!cr.isChangePort()) && cr.isChangeIP()) {
-                                                               logger.finer("Change ip received in Change Request attribute");
-                                                               // Source address attribute
-                                                               SourceAddress sa = new SourceAddress();
-                                                               sa.setAddress(new Address(changedIP.getLocalAddress().getAddress()));
-                                                               sa.setPort(changedIP.getLocalPort());
-                                                               sendMH.addMessageAttribute(sa);
-                                                               byte[] data = sendMH.getBytes();
-                                                               DatagramPacket send = new DatagramPacket(data, data.length);
-                                                               if (ra != null) {
-                                                                       send.setPort(ra.getPort());
-                                                                       send.setAddress(ra.getAddress().getInetAddress());
-                                                               } else {
-                                                                       send.setPort(receive.getPort());
-                                                                       send.setAddress(receive.getAddress());
-                                                               }
-                                                               changedIP.send(send);
-                                                               logger.config(changedIP.getLocalAddress().getHostAddress() + ":" + changedIP.getLocalPort() + " send Binding Response to " + send.getAddress().getHostAddress() + ":" + send.getPort());
-                                                       } else if ((!cr.isChangePort()) && (!cr.isChangeIP())) {
-                                                               logger.finer("Nothing received in Change Request attribute");
-                                                               // Source address attribute
-                                                               SourceAddress sa = new SourceAddress();
-                                                               sa.setAddress(new Address(receiverSocket.getLocalAddress().getAddress()));
-                                                               sa.setPort(receiverSocket.getLocalPort());
-                                                               sendMH.addMessageAttribute(sa);
-                                                               byte[] data = sendMH.getBytes();
-                                                               DatagramPacket send = new DatagramPacket(data, data.length);
-                                                               if (ra != null) {
-                                                                       send.setPort(ra.getPort());
-                                                                       send.setAddress(ra.getAddress().getInetAddress());
-                                                               } else {
-                                                                       send.setPort(receive.getPort());
-                                                                       send.setAddress(receive.getAddress());
-                                                               }
-                                                               receiverSocket.send(send);
-                                                               logger.config(receiverSocket.getLocalAddress().getHostAddress() + ":" + receiverSocket.getLocalPort() + " send Binding Response to " + send.getAddress().getHostAddress() + ":" + send.getPort());
-                                                       } else if (cr.isChangePort() && cr.isChangeIP()) {
-                                                               logger.finer("Change port and ip received in Change Request attribute");
-                                                               // Source address attribute
-                                                               SourceAddress sa = new SourceAddress();
-                                                               sa.setAddress(new Address(changedPortIP.getLocalAddress().getAddress()));
-                                                               sa.setPort(changedPortIP.getLocalPort());
-                                                               sendMH.addMessageAttribute(sa);
-                                                               byte[] data = sendMH.getBytes();
-                                                               DatagramPacket send = new DatagramPacket(data, data.length);
-                                                               if (ra != null) {
-                                                                       send.setPort(ra.getPort());
-                                                                       send.setAddress(ra.getAddress().getInetAddress());
-                                                               } else {
-                                                                       send.setPort(receive.getPort());
-                                                                       send.setAddress(receive.getAddress());
-                                                               }
-                                                               changedPortIP.send(send);
-                                                               logger.config(changedPortIP.getLocalAddress().getHostAddress() + ":" + changedPortIP.getLocalPort() + " send Binding Response to " + send.getAddress().getHostAddress() + ":" + send.getPort());
-                                                       }
-                                               }
-                                       } catch (UnknownMessageAttributeException umae) {
-                                               umae.printStackTrace();
-                                               // Generate Binding error response
-                                               MessageHeader sendMH = new MessageHeader(MessageHeaderType.BindingErrorResponse);
-                                               sendMH.setTransactionID(receiveMH.getTransactionID());
-                                               
-                                               // Unknown attributes
-                                               UnknownAttribute ua = new UnknownAttribute();
-                                               ua.addAttribute(umae.getType());
-                                               sendMH.addMessageAttribute(ua);
-                                               
-                                               byte[] data = sendMH.getBytes();
-                                               DatagramPacket send = new DatagramPacket(data, data.length);
-                                               send.setPort(receive.getPort());
-                                               send.setAddress(receive.getAddress());
-                                               receiverSocket.send(send);
-                                               logger.config(changedPortIP.getLocalAddress().getHostAddress() + ":" + changedPortIP.getLocalPort() + " send Binding Error Response to " + send.getAddress().getHostAddress() + ":" + send.getPort());
-                                       }       
-                               } catch (IOException ioe) {
-                                       ioe.printStackTrace();
-                               } catch (MessageAttributeParsingException mape) {
-                                       mape.printStackTrace();
-                               } catch (MessageAttributeException mae) {
-                                       mae.printStackTrace();
-                               } catch (MessageHeaderParsingException mhpe) {
-                                       mhpe.printStackTrace();
-                               } catch (UtilityException ue) {
-                                       ue.printStackTrace();
-                               } catch (ArrayIndexOutOfBoundsException aioobe) {
-                                       aioobe.printStackTrace();
-                               }
-                       }
-               }
-       }
-       
-       /*
-        * To invoke the STUN server two IP addresses and two ports are required.
-        */
-       public static void main(String args[]) {
-               try {
-                       if (args.length != 4) {
-                               System.out.println("usage: java de.javawi.jstun.test.demo.StunServer PORT1 IP1 PORT2 IP2");
-                               System.out.println();
-                               System.out.println(" PORT1 - the first port that should be used by the server");
-                               System.out.println("   IP1 - the first ip address that should be used by the server");
-                               System.out.println(" PORT2 - the second port that should be used by the server");
-                               System.out.println("   IP2 - the second ip address that should be used by the server");
-                               System.exit(0);
-                       }
-                       Handler fh = new FileHandler("logging_server.txt");
-                       fh.setFormatter(new SimpleFormatter());
-                       Logger.getLogger("de.javawi.stun").addHandler(fh);
-                       Logger.getLogger("de.javawi.stun").setLevel(Level.ALL);
-                       StunServer ss = new StunServer(Integer.parseInt(args[0]),
-                                                                                  InetAddress.getByName(args[1]),
-                                                                                  Integer.parseInt(args[2]),
-                                                                                  InetAddress.getByName(args[3]));
-                       ss.start();
-               } catch (SocketException se) {
-                       se.printStackTrace();
-               } catch (UnknownHostException uhe) {
-                       uhe.printStackTrace();
-               } catch (IOException ioe) {
-                       ioe.printStackTrace();
-               }
-       }
-}
\ No newline at end of file
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/test/demo/ice/Candidate.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/test/demo/ice/Candidate.java
deleted file mode 100644 (file)
index 22dd58f..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.test.demo.ice;
-
-import java.net.DatagramSocket;
-import java.net.SocketException;
-import java.net.UnknownHostException;
-
-import de.javawi.jstun.util.Address;
-import de.javawi.jstun.util.UtilityException;
-
-public class Candidate implements Comparable {
-       // The ieft-mmusic-ice-12 draft is not non-ambigious about the number of types.
-       // Chapter 5.1 defines 3 and 4 types on page 16 and page 17, respectively. 
-       public enum CandidateType { Local, ServerReflexive, PeerReflexive, Relayed };
-       
-       private DatagramSocket socket;
-       private CandidateType type;
-       private short componentId;
-       private int priority;
-       private int foundationId;
-       private Candidate base;
-       private boolean isInUse;
-       
-       public Candidate(Address address, short componentId) throws SocketException, UnknownHostException, UtilityException {
-               this.socket = new DatagramSocket(0, address.getInetAddress());
-               this.type = CandidateType.Local;
-               this.componentId = componentId;
-               this.priority = 0;
-               this.base = this;
-               this.isInUse = false;
-       }
-       
-       public Candidate(Address address, CandidateType type, short componentId, Candidate base) throws SocketException, UnknownHostException, UtilityException {
-               this.socket = new DatagramSocket(0, address.getInetAddress());
-               this.type = type;
-               setComponentId(componentId);
-               this.priority = 0;
-               this.base = base;
-               this.isInUse = false;
-       }
-
-       public void setBase(Candidate base) {
-               this.base = base;
-       }
-       
-       public Candidate getBase() {
-               return base;
-       }
-       
-       public CandidateType getCandidateType() {
-               return type;
-       }
-       
-       public void setComponentId(short componentId) {
-               if ((componentId < 1) || (componentId > 256)) throw new IllegalArgumentException(componentId + " is not between 1 and 256 inclusive.");
-               this.componentId = componentId;
-       }
-       
-       public short getComponentId() {
-               return componentId;
-       }
-       
-       public void setFoundationId(int foundationId) {
-               this.foundationId = foundationId;
-       }
-       
-       public int getFoundationId() {
-               return foundationId;
-       }
-       
-       public void setPriority(int priority) {
-               this.priority = priority;
-       }
-       
-       public int getPriority() {
-               return priority;
-       }
-       
-       public Address getAddress() throws UtilityException {
-               return new Address(socket.getLocalAddress().getAddress());
-       }
-
-       public int getPort() {
-               return socket.getLocalPort();
-       }
-       
-       public void setInUse(boolean isInUse) {
-               this.isInUse = isInUse;
-       }
-       
-       public boolean getInUse() {
-               return isInUse;
-       }
-       
-       public int compareTo(Object arg0) {
-               Candidate cand = (Candidate) arg0;
-               return cand.getPriority() - getPriority();
-       }
-       
-       public boolean equals(Object o) {
-               if (o == null) return false;
-               if ((((Candidate) o).socket.equals(socket)) && (((Candidate) o).base.equals(base))) return true;
-               return false;
-       }
-}
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/test/demo/ice/ICENegociator.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/test/demo/ice/ICENegociator.java
deleted file mode 100644 (file)
index 502528c..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.test.demo.ice;
-
-import java.net.InetAddress;
-import java.net.NetworkInterface;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import de.javawi.jstun.test.DiscoveryInfo;
-import de.javawi.jstun.test.DiscoveryTest;
-import de.javawi.jstun.test.demo.ice.Candidate.CandidateType;
-import de.javawi.jstun.util.Address;
-
-public class ICENegociator {
-       // type preference must be an integere from 0 (=lowest) to 126 (=highest) (inclusive)
-       private final static int LOCAL_PREFERENCE = 0;
-       private final static int SERVER_REFLEXIVE_PREFERENCE = 42;
-       private final static int PEER_REFLEXIVE_PREFERENCE = 84;
-       private final static int RELAYED_PREFERENCE = 126;
-       
-       // component id
-       private short componentId;
-       
-       // candidates
-       HashSet<Candidate> candidates;
-       
-       public ICENegociator(short componentId) {
-               this.componentId = componentId;
-               candidates = new HashSet<Candidate>();
-       }
-
-       /*
-        * This method gathers candidate addresses as described in draft-ietf-mmusic-ice-12.txt Chapter 2.1
-        * Unfortunately, only the candidates of the direct attached network interfaces and server reflexive
-        * addreses are gathered. So far, no support for relayed candidates is available (because I am not
-        * aware of any STUN relay server).
-        */
-       public void gatherCandidateAddresses() {
-               candidates = new HashSet<Candidate>();
-               try {
-                       Enumeration<NetworkInterface> ifaces = NetworkInterface.getNetworkInterfaces();
-                       while (ifaces.hasMoreElements()) {
-                               NetworkInterface iface = ifaces.nextElement();
-                               Enumeration<InetAddress> iaddresses = iface.getInetAddresses();
-                               while (iaddresses.hasMoreElements()) {
-                                       InetAddress iaddress = iaddresses.nextElement();
-                                       if (!iaddress.isLoopbackAddress() && !iaddress.isLinkLocalAddress()) {
-                                               // add host candidate
-                                               Candidate local = new Candidate(new Address(iaddress.getAddress()), componentId);
-                                               candidates.add(local);
-                                               // add server reflexive address
-                                               DiscoveryTest test = new DiscoveryTest(iaddress, "iphone-stun.freenet.de", 3478);
-                                               DiscoveryInfo di = test.test();
-                                               if (di.getPublicIP() != null) {
-                                                       Candidate cand = new Candidate(new Address(di.getPublicIP().getAddress()), CandidateType.ServerReflexive, componentId, local);
-                                                       cand.setComponentId(componentId);
-                                                       candidates.add(cand);
-                                               }
-                                       }
-                               }
-                       }
-               } catch (Exception e) {
-                       e.printStackTrace();
-               }
-       }
-       
-       public void prioritizeCandidates() {
-               // count number of candidate types
-               int numberLocal = 0;
-               int numberServerReflexive = 0;
-               int numberPeerReflexive = 0;
-               int numberRelayed = 0;
-               // count number of candidates of a particular type
-               Iterator<Candidate> iterCandidates = candidates.iterator();
-               while (iterCandidates.hasNext()) {
-                       Candidate cand = iterCandidates.next();
-                       CandidateType type = cand.getCandidateType();
-                       if (type == CandidateType.Local) numberLocal++;
-                       else if (type == CandidateType.ServerReflexive) numberServerReflexive++;
-                       else if (type == CandidateType.PeerReflexive) numberPeerReflexive++;
-                       else if (type == CandidateType.Relayed) numberRelayed++;
-               }
-               // assign priorities
-               iterCandidates = candidates.iterator();
-               while (iterCandidates.hasNext()) {
-                       int typeValue = 0;
-                       int localValue = 0;
-                       int componentValue = 0;
-                       Candidate cand = iterCandidates.next();
-                       CandidateType type = cand.getCandidateType();
-                       if (type == CandidateType.Local) {
-                               typeValue = LOCAL_PREFERENCE;
-                               localValue = numberLocal--;
-                       }
-                       else if (type == CandidateType.ServerReflexive) {
-                               typeValue = SERVER_REFLEXIVE_PREFERENCE;
-                               localValue = numberServerReflexive--;
-                       }
-                       else if (type == CandidateType.PeerReflexive) {
-                               typeValue = PEER_REFLEXIVE_PREFERENCE;
-                               localValue = numberPeerReflexive--;
-                       }
-                       else if (type == CandidateType.Relayed) {
-                               typeValue = RELAYED_PREFERENCE;
-                               localValue = numberRelayed--;
-                       }
-                       componentValue = cand.getComponentId();
-                       int priority = ((2 ^ 24) * typeValue) + ((2 ^ 8) * localValue) + componentValue;
-                       cand.setPriority(priority);
-               }
-       }
-       
-       public List<Candidate> getSortedCandidates() {
-               Vector<Candidate> sortedCandidates = new Vector<Candidate>(candidates);
-               Collections.sort(sortedCandidates);
-               return sortedCandidates;
-       }
-
-       public static void main(String args[]) {
-               ICENegociator cc = new ICENegociator((short) 1);
-               // gather candidates
-               cc.gatherCandidateAddresses();
-               // priorize candidates
-               cc.prioritizeCandidates();
-               // get SortedCandidates
-               List<Candidate> sortedCandidates = cc.getSortedCandidates();
-               
-               // sent sorted candidate addresses to peer over SDP
-               // received sorted candidate addresses of peer over SDP
-               
-       }
-}
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/util/Address.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/util/Address.java
deleted file mode 100644 (file)
index 46ad1a0..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.util;
-
-import java.util.*;
-import java.net.*;
-
-public class Address {
-       int firstOctet;
-       int secondOctet;
-       int thirdOctet;
-       int fourthOctet;
-       
-       public Address(int firstOctet, int secondOctet, int thirdOctet, int fourthOctet) throws UtilityException {
-               if ((firstOctet < 0) || (firstOctet > 255) || (secondOctet < 0) || (secondOctet > 255) || (thirdOctet < 0) || (thirdOctet > 255) || (fourthOctet < 0) || (fourthOctet > 255)) {
-                       throw new UtilityException("Address is malformed.");
-               }
-               this.firstOctet = firstOctet;
-               this.secondOctet = secondOctet;
-               this.thirdOctet = thirdOctet;
-               this.fourthOctet = fourthOctet;
-       }
-       
-       public Address(String address) throws UtilityException {
-               StringTokenizer st = new StringTokenizer(address, ".");
-               if (st.countTokens() != 4) {
-                       throw new UtilityException("4 octets in address string are required.");
-               }
-               int i = 0;
-               while (st.hasMoreTokens()) {
-                       int temp = Integer.parseInt(st.nextToken());
-                       if ((temp < 0) || (temp > 255)) {
-                               throw new UtilityException("Address is in incorrect format.");
-                       }
-                       switch (i) {
-                       case 0: firstOctet = temp; ++i; break;
-                       case 1: secondOctet = temp; ++i; break;
-                       case 2: thirdOctet = temp; ++i; break;
-                       case 3: fourthOctet = temp; ++i; break;
-                       }
-               }
-       }
-       
-       public Address(byte[] address) throws UtilityException {
-               if (address.length < 4) {
-                       throw new UtilityException("4 bytes are required.");
-               }
-               firstOctet = Utility.oneByteToInteger(address[0]);
-               secondOctet = Utility.oneByteToInteger(address[1]);
-               thirdOctet = Utility.oneByteToInteger(address[2]);
-               fourthOctet = Utility.oneByteToInteger(address[3]);
-       }
-       
-       public String toString() {
-               return firstOctet + "." + secondOctet + "." + thirdOctet + "." + fourthOctet;
-       }
-       
-       public byte[] getBytes() throws UtilityException {
-               byte[] result = new byte[4];
-               result[0] = Utility.integerToOneByte(firstOctet);
-               result[1] = Utility.integerToOneByte(secondOctet);
-               result[2] = Utility.integerToOneByte(thirdOctet);
-               result[3] = Utility.integerToOneByte(fourthOctet);
-               return result;
-       }
-       
-       public InetAddress getInetAddress() throws UtilityException, UnknownHostException {
-               byte[] address = new byte[4];
-               address[0] = Utility.integerToOneByte(firstOctet);
-               address[1] = Utility.integerToOneByte(secondOctet);
-               address[2] = Utility.integerToOneByte(thirdOctet);
-               address[3] = Utility.integerToOneByte(fourthOctet);
-               return InetAddress.getByAddress(address);
-       }
-       
-       public boolean equals(Object obj) {
-               if (obj == null) return false;
-               try {
-                       byte[] data1 = this.getBytes();
-                       byte[] data2 = ((Address) obj).getBytes();
-                       if ((data1[0] == data2[0]) && (data1[1] == data2[1]) &&
-                           (data1[2] == data2[2]) && (data1[3] == data2[3])) return true;
-                       return false;
-               } catch (UtilityException ue) {
-                       return false;
-               }
-       }
-       
-       public int hashCode() {
-               return (firstOctet << 24) + (secondOctet << 16) + (thirdOctet << 8) + fourthOctet; 
-       }
-
-}
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/util/Utility.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/util/Utility.java
deleted file mode 100644 (file)
index 91c2d88..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.util;
-
-public class Utility {
-
-       public static final byte integerToOneByte(int value) throws UtilityException {
-               if ((value > Math.pow(2,15)) || (value < 0)) {
-                       throw new UtilityException("Integer value " + value + " is larger than 2^15");
-               }
-               return (byte)(value & 0xFF);
-       }
-       
-       public static final byte[] integerToTwoBytes(int value) throws UtilityException {
-               byte[] result = new byte[2];
-               if ((value > Math.pow(2,31)) || (value < 0)) {
-                       throw new UtilityException("Integer value " + value + " is larger than 2^31");
-               }
-        result[0] = (byte)((value >>> 8) & 0xFF);
-        result[1] = (byte)(value & 0xFF);
-               return result; 
-       }
-       
-       public static final byte[] integerToFourBytes(int value) throws UtilityException {
-               byte[] result = new byte[4];
-               if ((value > Math.pow(2,63)) || (value < 0)) {
-                       throw new UtilityException("Integer value " + value + " is larger than 2^63");
-               }
-        result[0] = (byte)((value >>> 24) & 0xFF);
-               result[1] = (byte)((value >>> 16) & 0xFF);
-               result[2] = (byte)((value >>> 8) & 0xFF);
-        result[3] = (byte)(value & 0xFF);
-               return result; 
-       }
-       
-       public static final int oneByteToInteger(byte value) throws UtilityException {
-               return (int)value & 0xFF;
-       }
-       
-       public static final int twoBytesToInteger(byte[] value) throws UtilityException {
-               if (value.length < 2) {
-                       throw new UtilityException("Byte array too short!");
-               }
-        int temp0 = value[0] & 0xFF;
-        int temp1 = value[1] & 0xFF;
-        return ((temp0 << 8) + temp1);
-       }
-       
-       public static final long fourBytesToLong(byte[] value) throws UtilityException {
-               if (value.length < 4) {
-                       throw new UtilityException("Byte array too short!");
-               }
-        int temp0 = value[0] & 0xFF;
-        int temp1 = value[1] & 0xFF;
-               int temp2 = value[2] & 0xFF;
-               int temp3 = value[3] & 0xFF;
-        return (((long)temp0 << 24) + (temp1 << 16) + (temp2 << 8) + temp3);
-       }                                             
-}
diff --git a/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/util/UtilityException.java b/p2pproxy/dependencies-src/jstun-src-0.7.1/de/javawi/jstun/util/UtilityException.java
deleted file mode 100644 (file)
index d6f65fa..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package de.javawi.jstun.util;
-
-public class UtilityException extends Exception {
-       private static final long serialVersionUID = 3545800974716581680L;
-
-       UtilityException(String mesg) {
-               super(mesg);
-       }
-
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/pom.xml b/p2pproxy/dependencies-src/jxse-src-2.5/api/pom.xml
deleted file mode 100644 (file)
index 4f467d1..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<project>
-    <parent>
-        <groupId>net.jxta.platform</groupId>
-        <artifactId>jxta</artifactId>
-        <version>1.0</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-    <name>jxta-api</name>
-    <groupId>net.jxta.platform</groupId>
-    <artifactId>jxta-api</artifactId>
-    <packaging>jar</packaging>
-    <version>1.0</version>
-
-</project>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/Version.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/Version.java
deleted file mode 100644 (file)
index f6604de..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- *
- * ====================================================================
- *
- * Copyright (c) 2001 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta;
-
-import java.lang.Package;
-
-/**
- * Provides easy access to Java Package information for the JXSE API.
- */
-public final class Version {
-    
-    /**
-     *  Returns the package.
-     *
-     *  @return The specification title.
-     */
-    public static Package getPackage() {
-        return Version.class.getPackage();
-    }
-    
-    /**
-     *  Returns the specification title.
-     *
-     *  @return The specification title.
-     */
-    public static String getSpecTitle() {
-        Package versionPackage = Version.class.getPackage();
-        
-        return versionPackage.getSpecificationTitle();
-    }
-            
-    /**
-     *  Returns the specification vendor.
-     *
-     *  @return The specification vendor.
-     */
-    public static String getSpecVendor() {
-        Package versionPackage = Version.class.getPackage();
-        
-        return versionPackage.getSpecificationVendor();
-    }
-            
-    /**
-     *  Returns the specification version.
-     *
-     *  @return The specification version.
-     */
-    public static String getSpecVersion() {
-        Package versionPackage = Version.class.getPackage();
-        
-        return versionPackage.getSpecificationVersion();
-    }
-            
-    /**
-     *  Returns the specification title.
-     *
-     *  @return The specification title.
-     */
-    public static String getImplTitle() {
-        Package versionPackage = Version.class.getPackage();
-        
-        return versionPackage.getImplementationTitle();
-    }
-            
-    /**
-     *  Returns the specification vendor.
-     *
-     *  @return The specification vendor.
-     */
-    public static String getImplVendor() {
-        Package versionPackage = Version.class.getPackage();
-        
-        return versionPackage.getImplementationVendor();
-    }
-            
-    /**
-     *  Returns the specification version.
-     *
-     *  @return The specification version.
-     */
-    public static String getImplVersion() {
-        Package versionPackage = Version.class.getPackage();
-        
-        return versionPackage.getImplementationVersion();
-    }
-            
-    /** 
-     *  This class is a singleton.
-     */
-    private Version() {
-    }    
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/access/AccessService.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/access/AccessService.java
deleted file mode 100644 (file)
index e5183e8..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- *
- * ====================================================================
- *
- * Copyright (c) 2001 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.access;
-
-
-import net.jxta.credential.Credential;
-import net.jxta.credential.PrivilegedOperation;
-import net.jxta.document.Element;
-import net.jxta.service.Service;
-
-
-/**
- *  The Access Service is used by JXTA Applications and Services to determine if 
- specific operations are permitted for a particular identity.
- *
- *  <p/>Each Access Service implementation provides a mechanism for determining
- *  if, for a given operation and identity, the operation is permitted.
- **/
-public interface AccessService extends Service {
-    
-    /**
-     *  The result of an access check.
-     **/
-    public enum AccessResult {
-        
-        /**
-         *  State is unknown or could not be established.
-         *
-         *  <p/><strong>The operation should not be performed.</strong>
-         *
-         *  <p/>This result may not be used by all Access Service
-         *  implementations.
-         **/
-        UNDETERMINED, /**
-         *  Operation is disallowed.
-         *
-         *  <p/><strong>The operation should not be performed.</strong>
-         *
-         **/ DISALLOWED, /**
-         *  Operation is permitted.
-         *
-         *  <p/><strong>The operation should be performed.</strong>
-         *
-         **/ PERMITTED, /**
-         *  Operation would be permitted, but one (or more) of the provided
-         *  credentials was expired.
-         *
-         *  <p/><strong>The operation should not be performed.</strong>
-         *
-         *  <p/>This result may not be used by all Access Service
-         *  implementations.
-         **/ PERMITTED_EXPIRED
-    }
-    
-    /**
-     *  Determine if a privileged operation is permitted for a given identity.
-     *  
-     *  @param operation The operation which is being requested or {@code null}.
-     *  {@code null} signifies that the operation is unimportant though the
-     *  credential must be valid.
-     *  @param credential The identity which is requesting or {@code null}. A
-     *  {@code null} value indicates that no credential is available.
-     *  @return the result of the access check.
-     **/
-    public AccessResult doAccessCheck(PrivilegedOperation operation, Credential credential);
-    
-    /**
-     *  Create a new privileged operation with the specified subject. Each
-     *  operation is also associated with an identity, the offerer. Generally
-     *  the privileged operation is cryptographically signed by the offerer. 
-     *
-     *  @see net.jxta.credential.Credential
-     *  
-     *  @param subject The subject of the operation. This usually identifies
-     *  what operation is being requested.
-     *  @param offerer The identity which is offering the operation.
-     *  @return The privileged operation object
-     **/
-    public PrivilegedOperation newPrivilegedOperation(Object subject, Credential offerer);
-    
-    /**
-     *  Read a privileged operation from a portion of a structured document.
-     *
-     *  @param source The root of the document portion containing the serialized
-     *  representation of the privileged operation.
-     *  @return The privileged operation object.
-     **/
-    public PrivilegedOperation newPrivilegedOperation(Element source);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/access/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/access/package.html
deleted file mode 100644 (file)
index e9f7516..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    The Access Service provides a framework for using the identities created
-    with the Membership Service to control whether specific operations are
-    permitted. 
-
-    <p/>The Access Service, like the Membership Service, is not associated with 
-    a particular JXTA protocol. Each Access Service implementation is  
-    responsible for its own protocol definition (if any). This approach is used 
-    primarily so that JXTA bridges well to existing common Membership and Access 
-    technologies. For example; PKI, LDAP Kerberos, NTLM and API based interfaces 
-    such as PAM and JAAS.
-                               
-    @see net.jxta.credential.Credential
-    @see net.jxta.credential.PrivilegedOperation
-    @see net.jxta.membership.MembershipService
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto" target='_blank'>JXTA Protocols Specification : Protocols</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/codat/Codat.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/codat/Codat.java
deleted file mode 100644 (file)
index 75a4584..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.codat;
-
-
-import net.jxta.document.Document;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.peergroup.PeerGroupID;
-
-import java.io.IOException;
-
-
-/**
- * The common container for managing content within JXTA. A Codat consists of:
- * <ul>
- * <li>Content data for the Codat in the form of a JXTA
- * {@link net.jxta.document.Document}.</li>
- * <li>A persistent canonical identifier for the Codat in the form of a
- * {@link net.jxta.codat.CodatID}.</li>
- * <li>An optional CodatID for an associated Codat for which this Codat is
- * metadata.</li>
- * </ul>
- *
- * @see net.jxta.codat.CodatID
- * @see net.jxta.document.Document
- */
-public class Codat {
-
-    /**
-     * CodatID of this Codat. A persistent canonical identifier for this Codat.
-     */
-    private final CodatID id;
-
-    /**
-     * CodatID for an associated Codat for which this Codat is metadata. This
-     * may be the CodatId of another Codat in the same Peer Group or
-     * <tt>null</tt>.
-     */
-    private final CodatID metaId;
-
-    /**
-     * Contains the data of this Codat.
-     */
-    private final Document doc;
-
-    /**
-     * Constructs a Codat instance with a new CodatId given a PeerGroupID and
-     * a Document.
-     *
-     * @param groupID  The peer group to which this Codat will belong.
-     * @param about    The CodatID of an associated Codat for which this Codat is
-     *                 metadata or <tt>null</tt> if there is no associated Codat.
-     * @param document Document which contains the content data for this Codat.
-     * @throws IOException if there is an error accessing the document.
-     */
-    public Codat(PeerGroupID groupID, CodatID about, Document document) throws IOException {
-        this(IDFactory.newCodatID(groupID, document.getStream()), about, document);
-    }
-
-    /**
-     * Constructs a Codat instance for an existing Codat given it's
-     * CodatID and a document.
-     * <p/>
-     * <p/>This implementation does not verify that the CodatID matches the
-     * provided Document.
-     *
-     * @param id       CodatId of the new Codat.
-     * @param about    CodatID of an associated Codat for which this Codat is metadata.
-     * @param document Document which contains the content data for this Codat.
-     */
-    public Codat(CodatID id, CodatID about, Document document) {
-        if (null == id) {
-            throw new IllegalArgumentException("CodatID may not be null.");
-        }
-
-        if (null == document) {
-            throw new IllegalArgumentException("Document may not be null.");
-        }
-
-        this.id = id;
-        this.metaId = about;
-        this.doc = document;
-    }
-
-    /**
-     * Returns the CodatID of this Codat.
-     *
-     * @return The CodatID of this Codat.
-     */
-    public ID getCodatID() {
-        return id;
-    }
-
-    /**
-     * Returns the CodatID of an associated Codat for which this Codat is
-     * metadata or <tt>null</tt> if there is no associated Codat.
-     *
-     * @return CodatID The CodatID of an associated Codat for which this Codat
-     *         is metadata or <tt>null</tt> if there is no associated Codat.
-     */
-    public ID getMetaID() {
-        return metaId;
-    }
-
-    /**
-     * Returns a Document containing the data of this Codat.
-     *
-     * @return A Document containing the data of this Codat.
-     */
-    public Document getDocument() {
-        return doc;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/codat/CodatID.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/codat/CodatID.java
deleted file mode 100644 (file)
index 5e7c94d..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.codat;
-
-
-import java.net.URI;
-import net.jxta.id.ID;
-
-
-/**
- * An identifier that enables canonical references to be made to a Codat within
- * the context of a specific peer group.
- * <p/>
- * <p/>A CodatID is formed by the conjuction of:<ul>
- * <li>a PeerGroupID</li>
- * <li>a randomly chosen value that has a high probability of being unique</li>
- * <li>an optional SHA1 cryptographic hash of the Codat contents</li></ul>
- * <p/>
- * <p/>Codats which contain static content will normally include the hash value
- * as part of their CodatID.
- *
- * @see net.jxta.codat.Codat
- * @see net.jxta.peergroup.PeerGroupID
- */
-public abstract class CodatID extends ID {
-
-    /**
-     * Creates an ID by parsing the given URI.
-     *
-     * <p>This convenience factory method works as if by invoking the
-     * {@link net.jxta.id.IDFactory#fromURI(URI)} method; any 
-     * {@link java.net.URISyntaxException} thrown is caught and wrapped in a 
-     * new {@link IllegalArgumentException} object, which is then thrown.  
-     *
-     * <p> This method is provided for use in situations where it is known that
-     * the given string is a legal ID, for example for ID constants declared
-     * within in a program, and so it would be considered a programming error
-     * for the URI not to parse as such.  The {@link net.jxta.id.IDFactory}, 
-     * which throws {@link java.net.URISyntaxException} directly, should be used 
-     * situations where a ID is being constructed from user input or from some 
-     * other source that may be prone to errors. 
-     *
-     * @param  fromURI   The URI to be parsed into an ID
-     * @return The new ID
-     *
-     * @throws  NullPointerException If {@code fromURI} is {@code null}.
-     * @throws  IllegalArgumentException If the given URI is not a valid ID.
-     */
-    public static CodatID create(URI fromURI) {
-        return (CodatID) ID.create(fromURI);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public CodatID intern() {
-        return (CodatID) super.intern();
-    }
-    
-    /**
-     * Returns PeerGroupID of the Peer Group to which this Codat ID belongs.
-     *
-     * @return PeerGroupID of the Peer Group which this ID is part of.
-     */
-    public abstract ID getPeerGroupID();
-
-    /**
-     * Returns <tt>true</tt> if this CodatID is associated with a static Codat.
-     *
-     * @return <tt>true</tt> if the codatId is for a Codat with static content
-     *         otherwise <tt>false</tt>.
-     */
-    public abstract boolean isStatic();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/codat/Metadata.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/codat/Metadata.java
deleted file mode 100644 (file)
index 1d1f7bb..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.codat;
-
-
-import net.jxta.document.Document;
-import net.jxta.peergroup.PeerGroupID;
-
-import java.io.IOException;
-
-
-/**
- * Medata Codats are special codats that contain information about another
- * Codat. Multiple medata Codats can refer to the same Codat. Medata codats can
- * hold any kind of information about a codat, such as a symbolic name,
- * description, index and searching information, etc.
- *
- * @see net.jxta.codat.Codat
- * @see net.jxta.codat.CodatID
- * @see net.jxta.document.Document
- */
-public class Metadata extends Codat {
-
-    /**
-     * Constructs a Metadata instance with a new CodatId given a PeerGroupID,
-     * the CodatID of the associated Codat and a Document.
-     *
-     * @param groupID  The peer group to which this Codat will belong.
-     * @param about    The CodatID of an associated Codat for which this Codat is
-     *                 metadata or <tt>null</tt> if there is no associated Codat.
-     * @param document Document which contains the content data for this Codat.
-     * @throws IOException if there is an error accessing the document.
-     */
-    public Metadata(PeerGroupID groupID, CodatID about, Document document) throws IOException {
-        super(groupID, about, document);
-    }
-
-    /**
-     * Constructs a Metadata instance for an existing Codat given it's
-     * CodatID, the CodatID of the associated Codat and a Document.
-     * <p/>
-     * <p/>This implementation does not verify that the CodatID matches the
-     * provided Document.
-     *
-     * @param id       CodatId of the new Codat.
-     * @param about    CodatID of an associated Codat for which this Codat is metadata.
-     * @param document Document which contains the content data for this Codat.
-     */
-    public Metadata(CodatID id, CodatID about, Document document) {
-        super(id, about, document);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/codat/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/codat/package.html
deleted file mode 100644 (file)
index 7b4aa9a..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-<HEAD>
-</HEAD>
-<BODY>
-Codats are container objects that can hold both data or code and are
-associated with a JXTA ID.
-
-@see net.jxta.id
-@see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto" target='_blank'>JXTA Protocols
-    Specification : Protocols</a>
-</BODY>
-</HTML>
-file:///home/mike/code/jxta/spec/www/v1.0/docbook/JXTAProtocols.html#overview-codats
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/credential/AuthenticationCredential.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/credential/AuthenticationCredential.java
deleted file mode 100644 (file)
index 081e836..0000000
+++ /dev/null
@@ -1,386 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.credential;
-
-import net.jxta.document.*;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.service.Service;
-
-import java.util.logging.Level;
-
-import net.jxta.logging.Logging;
-
-import java.util.logging.Logger;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Enumeration;
-
-/**
- * Authenication credentials are used by JXTA Membership Services as the
- * basis for applications for peergroup membership. The AuthenticationCredential
- * provides two important pieces of inforamtion:
- * <ul>
- * <li>the authetication method being requested</li>
- * <li>identity information which will be provided to that authentication
- * method.</li>
- * <ul>
- * <p/>
- * Not all authentication methods use the identity nformation.
- *
- * @see net.jxta.credential.Credential
- * @see net.jxta.membership.MembershipService
- * @see net.jxta.membership.Authenticator
- */
-public final class AuthenticationCredential implements Credential {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(AuthenticationCredential.class.getName());
-
-    /**
-     * the authentication method which will be requested when this credential is
-     * provided during "apply" to a peergroup membership service.
-     */
-    private String authenticationMethod = null;
-
-    /**
-     * Any optional information which is required by the requested authentication method.
-     */
-    private Element identityInfo = null;
-
-    /**
-     * The peergroup of this AuthenticationCredential
-     */
-    private final PeerGroup peergroup;
-
-    /**
-     * Creates new AuthenticationCredential
-     *
-     * @param peergroup     The peergroup context in which this
-     *                      AuthenticationCredential is created.
-     * @param method        The authentication method which will be requested when the
-     *                      AuthentiationCredential is provided to the peergroup Membership Service.
-     *                      Authentication methods are specific to Membership services. Consult the
-     *                      Documentation for the Membership service you will be authenticating
-     *                      against in order to determine the valid <tt>method</tt> values. Every
-     *                      Membership service should support a default authentication method which
-     *                      can be specified as <tt>null</null>.
-     * @param indentityInfo Optional additional information which is used by the
-     *                      authentication method or <tt>null</tt>. This information is passed to the
-     *                      authentication method during the apply operation of the Membership
-     *                      Service. Consult the documentation for the specific Membership Service
-     *                      you are using for details on how this information is used (if at all).
-     */
-    public AuthenticationCredential(PeerGroup peergroup, String method, Element indentityInfo) {
-        this.peergroup = peergroup;
-
-        authenticationMethod = method;
-
-        if (null != indentityInfo) {
-            this.identityInfo = StructuredDocumentUtils.copyAsDocument(indentityInfo);
-        }
-    }
-
-    /**
-     * Creates new AuthenticationCredential
-     *
-     * @param peergroup The peergroup context in which this
-     *                  AuthenticationCredential is created.
-     * @param root      the document containing the serialized representation of the
-     *                  AuthenticationCredential.
-     */
-    public AuthenticationCredential(PeerGroup peergroup, Element root) {
-
-        this.peergroup = peergroup;
-
-        initialize(root);
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * AuthenticationCredentials are created in the context of a PeerGroup
-     * though they are generally independant of peergroups. The intent is that
-     * the AuthenticationCredential will be passed to the MembershipService
-     * service of the same peergroup as the AuthenticationCredenitals.
-     *
-     * @return PeerGroupID associated with this AuthenticationCredential.
-     */
-    public ID getPeerGroupID() {
-        return peergroup.getPeerGroupID();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ID getPeerID() {
-        return peergroup.getPeerID();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Service getSourceService() {
-        return null;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * AuthenticationCredential are never expired. The Authenticator will
-     * determine the true validity from the included identity info.
-     */
-    public boolean isExpired() {
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * AuthenticationCredential are always valid, the Authenticator will
-     * determine the true validity from the included identity info.
-     */
-    public boolean isValid() {
-        return true;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * There is no straightforward mechansim for identifying the subject
-     * unfortunately.
-     */
-    public Object getSubject() {
-        return null;
-    }
-
-    /**
-     * Write credential into a document. as is a mime media-type
-     * specification and provides the form of the document which is being
-     * requested. Two standard document forms are defined. "text/text" encodes
-     * the document in a form nice for printing out and "text/xml" which
-     * provides an XML format.
-     *
-     * @param as The mime media type of the encoding format being requested.
-     * @return the StructuredDocument which represents this credential.
-     * @throws Exception When errors occur.
-     */
-    public StructuredDocument getDocument(MimeMediaType as) throws Exception {
-
-        StructuredDocument doc = StructuredDocumentFactory.newStructuredDocument(as, "jxta:Cred");
-
-        if (doc instanceof Attributable) {
-            ((Attributable) doc).addAttribute("xmlns:jxta", "http://jxta.org");
-            ((Attributable) doc).addAttribute("xml:space", "preserve");
-            ((Attributable) doc).addAttribute("type", "AuthenticationCredential");
-        }
-
-        Element e = doc.createElement("Method", getMethod());
-
-        doc.appendChild(e);
-
-        e = doc.createElement("PeerGroupID", getPeerGroupID().toString());
-        doc.appendChild(e);
-
-        e = doc.createElement("PeerID", getPeerID().toString());
-        doc.appendChild(e);
-
-        if (null != identityInfo) {
-            e = doc.createElement("IdentityInfo");
-            doc.appendChild(e);
-
-            StructuredDocumentUtils.copyElements(doc, e, identityInfo);
-        }
-
-        return doc;
-    }
-
-    /**
-     * Returns the authentication method which this AuthenticationCredential
-     * will be requesting when it is provided to a Membership Service during the
-     * "Apply" operation.
-     *
-     * @return String containing the authentication method being requested.
-     */
-    public String getMethod() {
-        return authenticationMethod;
-    }
-
-    protected void setMethod(String authenticationMethod) {
-        this.authenticationMethod = authenticationMethod;
-    }
-
-    /**
-     * Returns the StructuredDocument Element containing the identity information which was
-     * originally provided when this AuthenticationCredential was created.
-     *
-     * @return StructuredDocument Element containing the identity information which was
-     *         originally provided when this AuthenticationCredential was created.
-     */
-    public Element getIdentityInfo() {
-        return (null == identityInfo) ? null : StructuredDocumentUtils.copyAsDocument(identityInfo);
-    }
-
-    /**
-     * Process an individual element from the document.
-     *
-     * @param elem the element to be processed.
-     * @return true if the element was recognized, otherwise false.
-     */
-    protected boolean handleElement(TextElement elem) {
-        if (elem.getName().equals("PeerGroupID")) {
-            try {
-                URI gID = new URI(elem.getTextValue());
-                ID pgid = IDFactory.fromURI(gID);
-
-                if (!pgid.equals(getPeerGroupID())) {
-                    throw new IllegalArgumentException("Operation is from a different group. " + pgid + " != " + getPeerGroupID());
-                }
-            } catch (URISyntaxException badID) {
-                throw new IllegalArgumentException("Unusable ID in advertisement: " + elem.getTextValue());
-            }
-            return true;
-        }
-
-        if (elem.getName().equals("PeerID")) {
-            try {
-                URI pID = new URI(elem.getTextValue());
-                ID pid = IDFactory.fromURI(pID);
-
-                if (!pid.equals(getPeerID())) {
-                    throw new IllegalArgumentException("Operation is from a different group. " + pid + " != " + getPeerID());
-                }
-            } catch (URISyntaxException badID) {
-                throw new IllegalArgumentException("Bad Peer ID in advertisement: " + elem.getTextValue());
-            } catch (ClassCastException badID) {
-                throw new IllegalArgumentException("Id is not a peer id: " + elem.getTextValue());
-            }
-            return true;
-        }
-
-        if (elem.getName().equals("Method")) {
-            setMethod(elem.getTextValue());
-            return true;
-        }
-
-        if (elem.getName().equals("IdentityInfo")) {
-            Enumeration firstChild = elem.getChildren();
-
-            if (!firstChild.hasMoreElements()) {
-                throw new IllegalArgumentException("Missing identity info");
-            }
-
-            identityInfo = StructuredDocumentUtils.copyAsDocument((Element) firstChild.nextElement());
-
-            return true;
-        }
-
-        // element was not handled
-        return false;
-    }
-
-    /**
-     * Intialize from a portion of a structured document.
-     *
-     * @param root the element
-     */
-    protected void initialize(Element root) {
-
-        if (!TextElement.class.isInstance(root)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports TextElement");
-        }
-
-        TextElement doc = (TextElement) root;
-
-        String typedoctype = "";
-
-        if (root instanceof Attributable) {
-            Attribute itsType = ((Attributable) root).getAttribute("type");
-
-            if (null != itsType) {
-                typedoctype = itsType.getValue();
-            }
-        }
-
-        String doctype = doc.getName();
-
-        if (!"jxta:AuthenticationCredential".equals(doctype) && !"jxta:AuthenticationCredential".equals(typedoctype)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doctype);
-        }
-
-        Enumeration elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            TextElement elem = (TextElement) elements.nextElement();
-
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Unhandleded element \'" + elem.getName() + "\' in " + doc.getName());
-                }
-            }
-        }
-
-        // sanity check time!
-
-        // FIXME bondolo@jxta.org 20030409 check things
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/credential/Credential.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/credential/Credential.java
deleted file mode 100644 (file)
index 9a42252..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.credential;
-
-
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.id.ID;
-import net.jxta.service.Service;
-
-
-/**
- * Credentials provide the basic mechanisms for securely establishing and
- * communicating identity within JXTA. Credentials have three different roles
- * within JXTA:
- * <p/>
- * <ul>
- * <li>Authentication credentials are associated with authentication methods
- * and are used to provide information required for authentication. Each
- * {@link net.jxta.credential.AuthenticationCredential AuthenticationCredential}
- * implementation is specific to its associated
- * {@link net.jxta.membership.Authenticator Authenticator}. Authentication
- * Credentials are normally created by constructing a document which follows
- * a schema provided by the authentication method.</li>
- * <p/>
- * <li>Identity credentials associate an identity with a peer. The peer may
- * request operations to be performed using that identity. Identity Credentials
- * are created by successfully completing authentication with a Membership
- * Service.</li>
- * <p/>
- * <li>Privileged operations associate an operation with an identity. To
- * request a remote peer to perform some operation an application or service
- * provides a {@link net.jxta.credential.PrivilegedOperation} and an
- * identity credential along with the request. The remote peer determines if
- * the operation is permitted for the specified identity and if it is permitted,
- * completes the operation.</li>
- * </ul>
- * <p/>
- * <p/>The XML representation of a Credential uses the following very simple
- * schema. Credential implementations extend this schema as needed.
- * <p/>
- * <p/><pre>
- * &lt;xs:complexType name="Cred">
- *   &lt;xs:all>
- *   &lt;/xs:all>
- * &lt;/xs:complexType>
- * </pre>
- */
-public interface Credential {
-
-    /**
-     * Returns the peerGroupID associated with this credential.
-     *
-     * @return The peerGroupID associated with this credential.
-     */
-    public ID getPeerGroupID();
-
-    /**
-     * Returns the peerID associated with this credential.
-     *
-     * @return The peerID associated with this credential.
-     */
-    public ID getPeerID();
-
-    /**
-     * Returns the service which generated this credential.
-     *
-     * @return The service which generated this credential.
-     */
-    public Service getSourceService();
-
-    /**
-     * Returns {@code true} if this credential is expired. Some credential
-     * implementations may never expire.
-     *
-     * @return {@code true} if this credential is expired, otherwise
-     *         {@code false}.
-     */
-    public boolean isExpired();
-
-    /**
-     * Returns {@code true} if this credential is currently valid.
-     *
-     * @return {@code true} if the credential is currently valid, otherwise
-     *         {@code false}.
-     */
-    public boolean isValid();
-
-    /**
-     * Returns the subject of this credential. The Objects returned <b>must</b>
-     * support {@link Object#equals(Object)} and {@link Object#hashCode()}.
-     *
-     * @return The subject of the credential as an abstract object.
-     */
-    public Object getSubject();
-
-    /**
-     * Write credential into a document. <code>asMimeType</code> is a mime
-     * media-type specification and provides the form of the document which is
-     * being requested. Two standard document forms are defined.
-     * "{@code text/plain}" encodes the document in a "pretty-print" format
-     * for human viewing and "{@code text/xml}" which provides an XML format.
-     * <p/>
-     * <p/>Depending on the credential format this document may be
-     * cryptographically signed to prevent alteration.
-     *
-     * @param asMimeType MimeMediaType format representation requested
-     * @return The credential serialized to a Document.
-     * @throws Exception if an error occurs
-     */
-    public StructuredDocument getDocument(MimeMediaType asMimeType) throws Exception;
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/credential/CredentialPCLSupport.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/credential/CredentialPCLSupport.java
deleted file mode 100644 (file)
index 16bc378..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.credential;
-
-
-import java.beans.PropertyChangeListener;
-
-
-/**
- * Provides Property Change Listener support for Credentials.
- */
-public interface CredentialPCLSupport {
-
-    /**
-     * Property name for the expired bound property.
-     */
-    public final static String EXPIRED_CREDENTIAL_PROPERTY = "expired";
-
-    /**
-     * Property name for valid bound property.
-     */
-    public final static String VALID_CREDENTIAL_PROPERTY = "valid";
-
-    /**
-     * Add a listener
-     *
-     * @param listener the listener
-     */
-    public void addPropertyChangeListener(PropertyChangeListener listener);
-
-    /**
-     * Add a listener. Available properties from all Credentials are :
-     * <p/>
-     * <p/><ul>
-     * <li><code>expired</code></li>
-     * <li><code>valid</code></li>
-     * </ul>
-     *
-     * @param propertyName the property to watch
-     * @param listener     the listener
-     */
-    public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener);
-
-    /**
-     * Remove a listener
-     *
-     * @param listener the listener
-     */
-    public void removePropertyChangeListener(PropertyChangeListener listener);
-
-    /**
-     * Remove a listener
-     *
-     * @param propertyName the property which was watched
-     * @param listener     the listener
-     */
-    public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/credential/CredentialValidator.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/credential/CredentialValidator.java
deleted file mode 100644 (file)
index 8e57de9..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
-Copyright (c) 2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.credential;
-
-
-/**
- * CredentialValidator defines the interface for allowing external validation of a credential
- *
- */
-public interface CredentialValidator {
-
-    /**
-     * Called when a credential verfication is needed.
-     * @param cred the credential to verify, Credential can be <code>null</code>.
-     * @return <code>true</code> if verified
-     */
-    public boolean checkCred(Credential cred);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/credential/PrivilegedOperation.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/credential/PrivilegedOperation.java
deleted file mode 100644 (file)
index e8c83c9..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
-
- *
- * ====================================================================
- *
- * Copyright (c) 2001 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.credential;
-
-
-/**
- * A Privileged Operation is an identifier for an operation whose usage is
- * restricted. It is represented as a credential so that users and providers
- * can prevent the unauthorized creation of privledges.
- * <p/>
- * <p/>Each operation is associated with an offerer. The offerer is the
- * identity which created the operation.
- */
-public interface PrivilegedOperation extends Credential {
-
-    /**
-     * Returns the offerer of this operation. The offerer is the identity which
-     * created the operation.
-     *
-     * @return the offerer of the operation.
-     */
-    public Credential getOfferer();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/credential/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/credential/package.html
deleted file mode 100644 (file)
index 4c20173..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-<HEAD>
-</HEAD>
-<BODY>
-Credentials provide the basic mechanisms for securly establishing and
-communicating identity within JXTA.
-
-@see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto" target='_blank'>JXTA Protocols
-    Specification : Protocols</a>
-</BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/discovery/DiscoveryEvent.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/discovery/DiscoveryEvent.java
deleted file mode 100644 (file)
index 0c6cdab..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.discovery;
-
-
-import java.util.Enumeration;
-import java.util.EventObject;
-import net.jxta.document.Advertisement;
-import net.jxta.protocol.DiscoveryResponseMsg;
-
-
-/**
- *  Container for DiscoveryService events. The source of the event is the Endpoint
- *  address of the responding peer
- */
-public class DiscoveryEvent extends EventObject {
-
-    private final DiscoveryResponseMsg response;
-    private final int queryID;
-
-    /**
-     *  Creates a new event
-     *
-     *  @see net.jxta.protocol.DiscoveryResponseMsg
-     *  @see net.jxta.protocol.ResolverResponseMsg
-     *
-     *  @param source The source of the event is the Endpoint address of the responding peer
-     *  @param response The response message for which this event is being generated.
-     *  @param queryid The query id associated with the response returned in this event
-     */
-    public DiscoveryEvent(Object source, DiscoveryResponseMsg response, int queryid) {
-        super(source);
-        this.response = response;
-        this.queryID = queryid;
-    }
-
-    /**
-     *  Returns the response associated with the event
-     *
-     *  @return DiscoveryResponseMsg
-     *
-     *  @see net.jxta.protocol.DiscoveryResponseMsg
-     */
-    public DiscoveryResponseMsg getResponse() {
-
-        return response;
-    }
-
-    /**
-     *  Returns the query id associated with the response returned in this event
-     *
-     *  @return query id associated with the response
-     */
-    public int getQueryID() {
-
-        return queryID;
-    }
-
-    /**
-     * Returns an array of advertisements contained in the DiscoveryResponse
-     * for this event.
-     *
-     * @return Enumeration of Advertisements
-     */
-    public Enumeration<Advertisement> getSearchResults() {
-
-        return response.getAdvertisements();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/discovery/DiscoveryListener.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/discovery/DiscoveryListener.java
deleted file mode 100644 (file)
index f3d47e7..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.discovery;
-
-
-import java.util.EventListener;
-
-
-/**
- *  The listener interface for receiving {@link DiscoveryEvent}s from the
- *  Discovery Service.
- *
- *  The following 2 examples illustrate how to implement a 
- *  <code>DiscoverListener</code>:
- *
- * <p/><b>Example 1:</b>
- * <pre>
- * DiscoveryListener myListener = new DiscoveryListener() {
- *   public void discoveryEvent(DiscoveryEvent e) {
- *     DiscoveryResponseMsg msg = e.getResponse();
- *     if (myQueryID == e.getQueryID()) {
- *       int advCount = msg.getResponseCount();
- *     }
- *   }
- *   discovery.addDiscoveryListener(myListener);
- *   int myQueryID = discovery.getRemoteAdvertisements(address,
- *     discovery.GROUP, attr, val,threshold);
- * </pre>
- *
- * <p/><b>Example 2:</b>
- * <pre>
- * public class JxtaAppDemo implements Runnable, DiscoveryListener {
- *          ..
- *          ..
- *  public void discoveryEvent(DiscoveryEvent ev) {
- *
- *     DiscoveryResponseMsg res = ev.getResponse();
- *     ..
- *     ..
- *     // see tutorial example 2 for full source
- *     // <a href="http://www.jxta.org/project/www/Tutorials.html">JXTA Tutorials</a>
- *     }
- * }
- * </pre>
- *
- *  @see net.jxta.discovery.DiscoveryService
- *  @see net.jxta.discovery.DiscoveryEvent
- **/
-public interface DiscoveryListener extends EventListener {
-
-    /**
-     * Called to handle an event from the Discovery Service.
-     *
-     * @param event the discovery event
-     */
-    void discoveryEvent(DiscoveryEvent event);
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/discovery/DiscoveryService.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/discovery/DiscoveryService.java
deleted file mode 100644 (file)
index 62ce541..0000000
+++ /dev/null
@@ -1,506 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.discovery;
-
-
-import java.io.IOException;
-import java.util.Enumeration;
-
-import net.jxta.document.Advertisement;
-import net.jxta.id.ID;
-import net.jxta.service.Service;
-
-
-/**
- * Provides an asynchronous mechanism for discovering Advertisement (Peers,
- * Groups, Pipes, Modules, etc.). The scope of discovery queries can be 
- * controlled by specifying a name and attribute pair, and/or a threshold. 
- * The threshold is an upper limit the requesting peer specifies for 
- * responding peers not to exceed. Each JXTA Peer Group has an instance of 
- * a DiscoveryService. The scope of discovery is limited to the group. For 
- * example :
- *
- * <p/>A peer in the soccer group invokes the soccer group's DiscoveryService
- * to discover pipe advertisements for the Score tracker service in the group,
- * and is interested in a maximum of 10 Advertisements from each peer:
- * <pre>
- *  discovery.getRemoteAdvertisements(null, discovery.ADV,
- *                                    "Name", "Score tracker*", 10, null);
- *
- * </pre>
- *
- * <p/>In the above example, peers that are part of the soccer group would
- * respond. After a getRemoteAdvertisements call is made and the peers respond,
- * a call to getLocalAdvertisements can be made to retrieve results that have
- * been found and added to the local group cache. Alternately, a call to
- * addDiscoveryListener() will provide asynchronous notification of discovered
- * advertisements.
- *
- * <p/>When an Advertisement is published, it is stored, and indexed in the 
- * peer's local cache. The Advertisement indexes are also shared with 
- * Rendezvous peers. Advertisement indexes may not be shared with other
- * peers immediately, but may be updated as part of a periodic process. The
- * Discovery Service currently updates remote indexes every 30 seconds.
- *
- * <p/>It is important to note that what is shared with the rendezvous peer is  
- * the index and expiration of the advertisement, not the advertisement. The
- * indexes are republished whenever the peer establishes a new connection with 
- * a different rendezvous peer.
- *
- * <p/>Distributed index garbage collection. A rendezvous peer will GC indexes for
- * a specific peer when it receive a disconnect message, or it has determined
- * that a peer is no longer reachable, the latter action is a lazy GC and is
- * triggered by messenger creation failures which results in a mark and sweep at
- * a future point in time.
- *
- * <p/>DiscoveryService also provides a mechanism for publishing advertisements,
- * so that they may be discovered. The rules to follow when publishing are:
- *
- *  <ul>
- *    <li>
- *    Use the current discovery service to publish advertisements private to the
- *    group.
- * <pre>discovery.publish(adv);
- * </pre></li>
- *
- *    <li>Use the parent's discovery to publish advertisements that public outside
- *    of the group. Example : a peer would like publish the "soccer" group in the
- *    NetPeerGroup
- * <pre>
- *        parent=soccerGroup.getParent();
- *        discovery= parent.getDiscoveryService()
- *        discovery.publish(adv);
- * </pre></li>
- *  </ul>
- *
- * <p/>The threshold can be utilized in peer discovery in situations where a peer
- * is only interested in other peers, and not about additional peers they may
- * know about. To achieve this effect for peer discovery set the Threshold to
- * <code>0</code> (zero).
- *
- * <p/>Advertisements are often stored in a persistent local cache. This cache 
- * can improve performance and responsiveness by retaining advertisements 
- * between restarts.
- *
- *@see        net.jxta.service.Service
- *@see        net.jxta.resolver.ResolverService
- *@see        net.jxta.protocol.DiscoveryQueryMsg
- *@see        net.jxta.protocol.DiscoveryResponseMsg
- *@see        net.jxta.protocol.ResolverQueryMsg
- *@see        net.jxta.protocol.ResolverResponseMsg
- */
-public interface DiscoveryService extends Service {
-    
-    /**
-     * Discovery type Peer
-     */
-    public final static int PEER = 0;
-    
-    /**
-     * Discovery type Group
-     */
-    public final static int GROUP = 1;
-    
-    /**
-     *  Discovery type Advertisement
-     */
-    public final static int ADV = 2;
-    
-    /**
-     * Default lifetime time for advertisements. This is the maximum
-     * amount of time which the advertisement will remain valid. If the
-     * advertisement remains valid after this time, then the creator will
-     * need to republish the advertisement.
-     */
-    public final static long DEFAULT_LIFETIME = 1000L * 60L * 60L * 24L * 365L;
-    
-    /**
-     *  Default expiration time for advertisements. This is the amount of
-     *  time which advertisements will live in caches. After this time, the
-     *  advertisement should be refreshed from the source.
-     */
-    public final static long DEFAULT_EXPIRATION = 1000L * 60L * 60L * 2L;
-    
-    /**
-     *  Infinite lifetime for advertisements. The advertisement is valid
-     *  forever. (well maybe it will expire when the sun burns out, but not
-     *  before then).
-     */
-    public final static long INFINITE_LIFETIME = Long.MAX_VALUE;
-    
-    /**
-     *  Specifies that the advertisement will have no expiration and will be
-     *  kept indefinitely.
-     */
-    public final static long NO_EXPIRATION = Long.MAX_VALUE;
-    
-    /**
-     *  Discover advertisements from remote peers. This does not normally 
-     *  provide an exhaustive search. Instead it provides a "best efforts" 
-     *  search which will provide a selection of advertisements of matching the 
-     *  search criteria. The selection of advertisements returned may be random 
-     *  or predictable depending upon the network configuration and no 
-     *  particular behaviour should be assumed. In general the narrower the
-     *  query specified the more exhaustive the responses will be. 
-     * 
-     *  <p/>Discovery can be performed in two ways : <ul>
-     *      <li>With a <tt>null</tt> peerid - The discovery query is
-     *      propagated on via the Rendezvous Service and via local sub-net
-     *      utilizing IP multicast.</li>
-     *      <li>With a provided peerid - The discovery query is forwarded to the
-     *      specified peer.</li>
-     *  </ul>
-     *
-     *  <p/>The scope of advertisements returned can be narrowed by specifying
-     *  an {@code attribute} and {@code value} pair. The {@code attribute} is
-     *  a case-sensitive string matching the name of an Advertisement XML tag
-     *  who's values will be matched by the {@code value}.  Only a limited number
-     *  of Advertisement XML fields are indexed. {@link
-     *  net.jxta.document.Advertisement#getIndexFields()} will return the 
-     *  fields on which you may query for a particular Advertisement type. 
-     * 
-     *  <p/>The {@code value} is a case-insensitive string who's value is
-     *  matched against the values of {@code attribute} fields of Advertisements.
-     *  The {@code} value may be of several forms :
-     *  <ul>
-     *      <li>{@code null} - Don't care. All advertisements with the matching
-     *      {@code attribute} will be returned.</li>
-     *      <li>exact value - Only advertisements with an {@code attribute}
-     *      field who's value exactly matches the string {@code value} will be
-     *      returned.</li>
-     *      <li>wild card - Only advertisements with an {@code attribute}
-     *      field who's value matches the wild card expression {@code value} 
-     *      will be returned. eg. The following expressions all match against
-     *      "FooBar":
-     *      <ul>
-     *          <li>{@code foO*}</li>
-     *          <li>{@code *Bar}</li>
-     *          <li>{@code *oBA*}</li>
-     *      </ul></li>
-     *  </ul>
-     * 
-     * @param peerid If provided the query will be forwarded to the specified
-     *      peer. If {@code null} then the query will be propagated through the
-     *      network to peers with matching Advertisements.
-     * @param type Discovery type; <tt>PEER</tt>, <tt>GROUP</tt> or <tt>ADV</tt>.
-     * @param  attribute indexed element name (see advertisement(s) for a
-     *       list of indexed fields. A null attribute indicates any advertisement
-     *       of specified type
-     * @param  value      value of attribute to narrow discovery to. Valid values for
-     *      this parameter are null (don't care), Exact value, or use of wild
-     *      card(s) (e.g. if a Advertisement defines <Name>FooBar</name> , a value
-     *      of "*bar", "foo*", or "*ooB*", will return the Advertisement
-     * @param  threshold  The maximum number of matching advertisements which
-     *      be returned by each responding peer. A {@code threshold} of 0, and 
-     *      {@code type} of {@code PEER} has a special behaviour.
-     * @return query ID for this discovery query.
-     */
-    public int getRemoteAdvertisements(String peerid, int type, String attribute, String value, int threshold);
-    
-    /**
-     *  Discover advertisements from remote peers. This does not normally 
-     *  provide an exhaustive search. Instead it provides a "best efforts" 
-     *  search which will provide a selection of advertisements of matching the 
-     *  search criteria. The selection of advertisements returned may be random 
-     *  or predictable depending upon the network configuration and no 
-     *  particular behaviour should be assumed. In general the narrower the
-     *  query specified the more exhaustive the responses will be. 
-     * 
-     *  <p/>Discovery can be performed in two ways : <ul>
-     *      <li>With a {@code null} peerid - The discovery query is
-     *      propagated on via the Rendezvous Service and via local sub-net
-     *      utilizing IP multicast.</li>
-     *      <li>With a provided peerid - The discovery query is forwarded to the
-     *      specified peer.</li>
-     *  </ul>
-     *
-     *  <p/>The scope of advertisements returned can be narrowed by specifying
-     *  an {@code attribute} and {@code value} pair. The {@code attribute} is
-     *  a case-sensitive string matching the name of an Advertisement XML tag
-     *  who's values will be matched by the {@code value}. Only a limited number
-     *  of Advertisement XML fields are indexed. {@link
-     *  net.jxta.document.Advertisement#getIndexFields()} will return the 
-     *  fields on which you may query for a particular Advertisement type. 
-     * 
-     *  <p/>The {@code value} is a case-insensitive string who's value is
-     *  matched against the values of {@code attribute} fields of Advertisements.
-     *  The {@code} value may be of several forms :
-     *  <ul>
-     *      <li>{@code null} - Don't care. All advertisements with the matching
-     *      {@code attribute} will be returned.</li>
-     *      <li>exact value - Only advertisements with an {@code attribute}
-     *      field who's value exactly matches the string {@code value} will be
-     *      returned.</li>
-     *      <li>wild card - Only advertisements with an {@code attribute}
-     *      field who's value matches the wild card expression {@code value} 
-     *      will be returned. eg. The following expressions all match against
-     *      "FooBar":
-     *      <ul>
-     *          <li>{@code fOo*}</li>
-     *          <li>{@code *bAr}</li>
-     *          <li>{@code *OBa*}</li>
-     *      </ul></li>
-     *  </ul>
-     * 
-     * @param peerid If provided the query will be forwarded to the specified
-     *      peer. If {@code null} then the query will be propagated through the
-     *      network to peers with matching Advertisements.
-     *  @param type Discovery type; <tt>PEER</tt>, <tt>GROUP</tt> or <tt>ADV</tt>.
-     * @param  attribute  indexed element name (see Advertisement(s) for a
-     *       list of indexed fields. A null attribute indicates any advertisement
-     *       of specified type
-     * @param  value      value of attribute to narrow discovery to. Valid values 
-     *      for this parameter or {@code null} (don't care), Exact value, or use
-     *      of wild card(s) (e.g. if a Advertisement defines <Name>FooBar</name>,
-     *      a value of "*bar", "foo*", or "*ooB*", will return the Advertisement
-     * @param  threshold  The maximum number of matching advertisements which
-     *      be returned by each responding peer. A {@code threshold} of 0, and 
-     *      {@code type} of {@code PEER} has a special behaviour.
-     * @param  listener   The listener which will be called when advertisement
-     *      which match this query are discovered or {@code null} if no 
-     *      callback is desired.
-     * @return query ID for this discovery query.
-     */
-    public int getRemoteAdvertisements(String peerid, int type, String attribute, String value, int threshold, DiscoveryListener listener);
-
-    /**
-     *  Retrieve locally stored Advertisements. This is an exhaustive search of
-     *  the locally cached results. All valid known matching results will be 
-     *  returned.
-     *
-     *  @param type Discovery type; <tt>PEER</tt>, <tt>GROUP</tt> or <tt>ADV</tt>.
-     *  @param  attribute     indexed element name (see Advertisement(s) for a
-     *       list of indexed fields. {@code null} indicates any advertisement
-     *       of specified type
-     *  @param  value         value of attribute to narrow discovery to valid
-     *      values for this parameter are {@code null} (don't care), Exact 
-     *      value, or use of wild card(s) (e.g. if a Advertisement defines 
-     *      <Name>FooBar</name> , a value of "*bar", "foo*", or "*ooB*", will 
-     *      return the Advertisement
-     *  @return Enumeration of stored advertisements.
-     *  @throws  IOException Thrown if an error occurs during retrieval.
-     */
-    public Enumeration<Advertisement> getLocalAdvertisements(int type, String attribute, String value) throws IOException;
-
-    /**
-     * Publish an Advertisement. The Advertisement will expire automatically 
-     * on the local peer after <code>DEFAULT_LIFETIME</code> and will expire on
-     * other peers after <code>DEFAULT_EXPIRATION</code>.
-     *
-     * <p/>When an Advertisement is published, it is stored, and indexed in the 
-     * peer's local cache. The Advertisement indexes are also shared with 
-     * Rendezvous peers. Advertisement indexes may not be shared with other
-     * peers immediately, but may be updated as part of a periodic process. The
-     * Discovery Service currently publishes index updates every 30 seconds.
-     *
-     * @param adv The Advertisement to publish.
-     * @throws IOException When an error occurs during Advertisement publication.
-     */
-    public void publish(Advertisement adv) throws IOException;
-
-    /**
-     * Publish an Advertisement. The Advertisement will expire automatically 
-     * after the specified time. A peer that discovers this advertisement will 
-     * hold it for about <tt>expiration</tt> or <tt>lifetime</tt> milliseconds, 
-     * whichever is smaller.
-     *
-     * <p/>When an Advertisement is published, it is stored, and indexed in the 
-     * peer's local cache. The Advertisement indexes are also shared with 
-     * Rendezvous peers. Advertisement indexes may not be shared with other
-     * peers immediately, but may be updated as part of a periodic process. The
-     * Discovery Service currently publishes index updates every 30 seconds.
-     *
-     * @param adv The Advertisement to publish.
-     * @param lifetime Duration in relative milliseconds that this advertisement will exist.
-     * @param expiration Duration in relative milliseconds that this advertisement will be cached by other peers.
-     * @throws IOException When an error occurs during Advertisement publication.
-     */
-    public void publish(Advertisement adv, long lifetime, long expiration) throws IOException;
-
-    /**
-     * Publish an Advertisement via propagation to other peers on the network.
-     * This does not result in the advertisement being stored locally. The
-     * Advertisement will be published with an expiration time of
-     * <tt>DEFAULT_EXPIRATION</tt>.
-     *
-     *  @param adv Advertisement to publish.
-     */
-    public void remotePublish(Advertisement adv);
-
-    /**
-     * Publish an Advertisement via propagation to other peers on the network.
-     * This does not result in the advertisement being stored locally.
-     *
-     *  @param adv The Advertisement to publish.
-     *  @param expiration  Duration in relative milliseconds that this 
-     *      Advertisement will be cached by other peers.
-     */
-    public void remotePublish(Advertisement adv, long expiration);
-
-    /**
-     * Publish an Advertisement to another peer on the network.
-     * This does not result in the advertisement being stored locally. The
-     * Advertisement will be published with an expiration time of
-     * <tt>DEFAULT_EXPIRATION</tt>.
-     *
-     *@param peerid The ID of a peer, specifying <tt>null</tt> results in  
-     *      propagation within the group.
-     *@param adv The Advertisement to publish.
-     */
-    public void remotePublish(String peerid, Advertisement adv);
-
-    /**
-     * Publish an Advertisement to another peer on the network. This does not 
-     * result in the advertisement being stored locally.
-     *
-     *  @param  peerid id of a peer, specifying null results in a propagate
-     *      within the group
-     * @param adv The Advertisement to publish.
-     * @param expiration  Duration in relative milliseconds that this 
-     *      Advertisement will be cached by other peers.
-     */
-    public void remotePublish(String peerid, Advertisement adv, long expiration);
-    
-    /**
-     * Removes the specified Advertisement from the cache of locally stored
-     * Advertisements.
-     *
-     * @param adv Advertisement to remove.
-     * @throws IOException If there is a problem removing the advertisement.
-     */
-    public void flushAdvertisement(Advertisement adv)  throws IOException;
-
-    /**
-     * Removes the specified Advertisement from the cache of locally stored
-     * Advertisements.
-     *
-     * @param id The {@link Advertisement#getID()} value of the
-     *      Advertisement to be removed.
-     * @param type Discovery type PEER, GROUP, ADV.
-     * @throws IOException If there is a problem removing the advertisement.
-     */
-    public void flushAdvertisements(String id, int type) throws IOException;
-
-    /**
-     *  Returns the maximum duration in milliseconds for which this document
-     *  will be cached by peers other than the publisher. This value is either
-     *  the stored lifetime or the remaining lifetime of the document, whichever
-     *  is less.
-     *
-     *  @param id Document ID, Peer ID, or PeerGroup ID
-     *  @param type Discovery type PEER, GROUP, ADV
-     *  @return The number of milliseconds that other peers will be told to
-     *      retain this Advertisement in their local caches. -1 is returned if  
-     *      the Advertisement is not known or already expired.
-     */
-    public long getAdvExpirationTime(ID id, int type);
-
-    /**
-     *  Returns the maximum duration in milliseconds for which this document
-     *  should be kept in local cache.
-     *
-     *  @param id Document ID, Peer ID, or PeerGroup ID
-     *  @param type Discovery type PEER, GROUP, ADV
-     *  @return The number of milliseconds this Advertisement will remain in the
-     *      local cache unless refreshed before that time. -1 is returned if the 
-     *      Advertisement is not known or already expired.
-     */
-    public long getAdvLifeTime(ID id, int type);
-
-    /**
-     *  Returns the maximum duration in milliseconds for which this document
-     *  will be cached by peers other than the publisher. This value is either
-     *  the stored lifetime or the remaining lifetime of the document, whichever
-     *  is less.
-     *
-     *  @param adv Advertisement
-     *  @return The number of milliseconds that other peers will be told to
-     *      retain this Advertisement in their local caches. -1 is returned if  
-     *      the Advertisement is not known or already expired.
-     */
-    public long getAdvExpirationTime(Advertisement adv);
-
-    /**
-     *  Returns the maximum duration in milliseconds for which this document
-     *  should be kept in local cache.
-     *
-     *  @param adv Advertisement
-     *  @return The number of milliseconds this Advertisement will remain in the
-     *      local cache unless refreshed before that time. -1 is returned if the 
-     *      Advertisement is not known or already expired.
-     */
-    public long getAdvLifeTime(Advertisement adv);
-
-    /**
-     * Register a Discovery listener. The Discovery listener will be called 
-     * whenever Advertisement responses are received from remote peers by the
-     * Discovery Service.
-     *
-     *  @param listener the DiscoveryListener
-     */
-    public void addDiscoveryListener(DiscoveryListener listener);
-
-    /**
-     *  Remove a Discovery listener which was previously registered with
-     *  {@link #getRemoteAdvertisements(String,int,String,String,int,DiscoveryListener) getRemoteAdvertisements()}
-     *  or {@link #addDiscoveryListener(DiscoveryListener) addDiscoveryListener()}.
-     *
-     *  @param listener The listener to be removed.
-     *  @return true if the listener was successfully removed, false otherwise
-     */
-    public boolean removeDiscoveryListener(DiscoveryListener listener);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/discovery/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/discovery/package.html
deleted file mode 100644 (file)
index c304dd1..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    The JXTA Discovery Service provides an asynchronous mechanism for 
-    discovering Peer Advertisements, Group Advertisements, and other general 
-    JXTA Advertisements (pipes, services, etc.). 
-                               
-    @see net.jxta.resolver
-    @see net.jxta.document.Advertisement
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-pdp" target='_blank'>JXTA Protocols Specification : Peer Discovery Protocol</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/Advertisement.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/Advertisement.java
deleted file mode 100644 (file)
index 88b88c8..0000000
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.document;
-
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.UndeclaredThrowableException;
-import java.lang.reflect.Method;
-
-import net.jxta.id.ID;
-
-
-/**
- *  Advertisements are core JXTA objects that are used to advertise Peers,
- *  PeerGroups, Services, Pipes or other JXTA resources. Advertisements provide
- *  a platform independent representation of core platform objects that can be
- *  exchanged between different platform implementations (Java, C, etc.).
- *
- *  <p>Each Advertisement holds a document that represents the advertisement.
- *  Advertisements are typically represented as a text document (XML). The
- *  {@link Advertisement#getDocument(MimeMediaType) getDocument(mimetype)}
- *  method is used to generate representations of the advertisement. Different
- *  representations are available via mime type selection. Typical mime types
- *  are "text/xml" or "text/plain" that generate textual representations for the
- *  Advertisements.
- *
- *  <p>Advertisements are created via {@link AdvertisementFactory} rather than 
- *  through use of constructors. This is done because public the Advertisement 
- *  sub-classes are typically abstract. The actual implementations are provided 
- *  by private sub-classes.
- *
- *  @see net.jxta.document.AdvertisementFactory
- *  @see net.jxta.document.ExtendableAdvertisement
- *  @see net.jxta.id.ID
- *  @see net.jxta.document.Document
- *  @see net.jxta.document.MimeMediaType
- */
-public abstract class Advertisement {
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Advertisement clone() throws CloneNotSupportedException {
-        return (Advertisement) super.clone();
-    }
-    
-    /**
-     * Return a string representation of this advertisement. The string will
-     * contain the advertisement pretty-print formatted as a UTF-8 encoded XML
-     * Document.
-     *
-     * @return A String containing the advertisement.
-     */
-    @Override
-    public String toString() {        
-        XMLDocument doc = (XMLDocument) getDocument(MimeMediaType.XMLUTF8);
-        
-        // Force pretty printing
-        doc.addAttribute("xml:space", "default");
-            
-        return doc.toString();
-    }
-    
-    /**
-     *  Returns the identifying type of this Advertisement.
-     *
-     *  <p/><b>Note:</b> This is a static method. It cannot be used to determine
-     *  the runtime type of an advertisement. ie.
-     *  </p><code><pre>
-     *      Advertisement adv = module.getSomeAdv();
-     *      String advType = adv.getAdvertisementType();
-     *  </pre></code>
-     *
-     *  <p/><b>This is wrong and does not work the way you might expect.</b>
-     *  This call is not polymorphic and calls
-     *  {@code Advertisement.getAdvertisementType()} no matter what the real
-     *  type of the advertisement.
-     *
-     * @return The type of advertisement.
-     */
-    public static String getAdvertisementType() {
-        throw new UnsupportedOperationException(
-                "Advertisement : sub-class failed to override getAdvertisementType. getAdvertisementType() is static and is *not* polymorphic.");
-    }
-    
-    /**
-     *  Returns the identifying type of this Advertisement. Unlike
-     *  {@link #getAdvertisementType()} this method will return the correct
-     *  runtime type of an Advertisement object.
-     *  <p/>
-     *  This implementation is provided for existing advertisements which do not
-     *  provide their own implementation. In most cases you should provide your
-     *  own implementation for efficiency reasons.
-     *
-     *  @since JXSE 2.1.1
-     *  @return The identifying type of this Advertisement.
-     */
-    public String getAdvType() {
-        try {
-            Method getAdvertisementTypeMethod = this.getClass().getMethod("getAdvertisementType", (Class[]) null);
-            String result = (String) getAdvertisementTypeMethod.invoke(null, (Object[]) null);
-            
-            return result;
-        } catch (NoSuchMethodException failed) {
-            UnsupportedOperationException failure = new UnsupportedOperationException("Could not get Advertisement type.");
-
-            failure.initCause(failed);
-            throw failure;
-        } catch (IllegalAccessException failed) {
-            SecurityException failure = new SecurityException("Could not get Advertisement type.");
-
-            failure.initCause(failed);
-            throw failure;
-        } catch (InvocationTargetException failed) {
-            UndeclaredThrowableException failure = new UndeclaredThrowableException(failed, "Failed getting Advertisement type.");
-
-            failure.initCause(failed.getCause());
-            throw failure;
-        }
-    }
-    
-    /**
-     *  Write this advertisement into a document of the requested type. Two 
-     *  standard document forms are defined. <code>"text/plain"</code> encodes 
-     *  the document in a "pretty-print" format for human viewing and 
-     *  <code>"text/xml"<code> which provides an XML format.
-     *
-     *  @param asMimeType MimeMediaType format representation requested.
-     *  @return The {@code Advertisement} represented as a {@code Document} of
-     *  the requested MIME Media Type.
-     */
-    public abstract Document getDocument(MimeMediaType asMimeType);
-    
-    /**
-     *  Returns an ID which identifies this {@code Advertisement} as uniquely as 
-     *  possible. This ID is typically used as the primary key for indexing of
-     *  the Advertisement within databases. 
-     *  <p/>
-     *  Each advertisement sub-class must choose an appropriate implementation
-     *  which returns canonical and relatively unique ID values for it's
-     *  instances. Since this ID is commonly used for indexing, the IDs returned
-     *  must be as unique as possible to avoid collisions. The value for the ID 
-     *  returned can either be:
-     *  <p/>
-     *  <ul>
-     *      <li>An ID which is already part of the advertisement definition
-     *      and is relatively unique between advertisements instances. For
-     *      example, the Peer Advertisement returns the Peer ID.</li>
-     *
-     *      <li>A static CodatID which is generated via some canonical process
-     *      which will produce the same value each time and different values for
-     *      different advertisements of the same type.</li>
-     *
-     *      <li>ID.nullID for advertisement types which are not readily indexed.
-     *      </li>
-     *  </ul>
-     *  <p/>
-     *  For Advertisement types which normally return non-ID.nullID values
-     *  no ID should be returned when asked to generate an ID while the
-     *  Advertisement is an inconsistent state (example: uninitialized index
-     *  fields). Instead {@link java.lang.IllegalStateException} should be
-     *  thrown.
-     *
-     *  @return An ID that relatively uniquely identifies this advertisement 
-     *  or {@code ID.nullID} if this advertisement is of a type that is not 
-     *  normally indexed.
-     */
-    public abstract ID getID();
-    
-    /**
-     * Returns the element names on which this advertisement should be indexed.
-     *
-     * @return The element names on which this advertisement should be indexed.
-     */
-    public abstract String[] getIndexFields();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/AdvertisementFactory.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/AdvertisementFactory.java
deleted file mode 100644 (file)
index aa870cd..0000000
+++ /dev/null
@@ -1,401 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.document;
-
-
-import java.io.InputStream;
-import java.io.Reader;
-import java.util.HashMap;
-import java.util.Map;
-
-import java.io.IOException;
-import java.util.NoSuchElementException;
-import java.util.MissingResourceException;
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-import net.jxta.util.ClassFactory;
-
-
-/**
- * A Factory class for constructing Advertisements. This class abstracts the
- * the implementations used to represent and create advertisements.
- *
- * <p/>Advertisements are core objects that are used to advertise a Peer, a
- * PeerGroup, a Service, a Pipe, etc. The Advertisement class provides a 
- * platform independent representation of core objects that can be exchanged
- * between different implementations (Java, C).
- *
- * <p/>The AdvertisementFactory extends the ClassFactory to register the various
- * types of advertisements into an internal table. The factory is called with
- * the Advertisement type requested to create the corresponding advertisement
- * type.
- *
- * <p/>The set of Advertisements types supported is loaded from the JXTA
- * classpath via the service provider interface.
- *
- * @see net.jxta.document.Advertisement
- * @see net.jxta.document.Document
- * @see net.jxta.document.MimeMediaType
- * @see net.jxta.peergroup.PeerGroup
- * @see net.jxta.protocol.PeerAdvertisement
- * @see net.jxta.protocol.PeerGroupAdvertisement
- * @see net.jxta.protocol.PipeAdvertisement
- */
-public class AdvertisementFactory extends ClassFactory<String, AdvertisementFactory.Instantiator> {
-
-    /**
-     *  Logger
-     */
-    private static final Logger LOG = Logger.getLogger(AdvertisementFactory.class.getName());
-    
-    /**
-     *  Interface for instantiators of Advertisements
-     */
-    public interface Instantiator {
-        
-        /**
-         * Returns the identifying type of this Advertisement.
-         *
-         * @return String the type of advertisement
-         */
-        String getAdvertisementType();
-        
-        /**
-         * Constructs an instance of {@link Advertisement} matching the type
-         * specified by the <CODE>advertisementType</CODE> parameter.
-         *
-         *
-         * @return The instance of {@link Advertisement}.
-         */
-        Advertisement newInstance();
-        
-        /**
-         * Constructs an instance of {@link Advertisement} matching the type
-         * specified by the <CODE>advertisementType</CODE> parameter.
-         *
-         * @param root Specifies a portion of a @link StructuredDocument} which
-         * will be converted into an Advertisement.
-         * @return The instance of {@link Advertisement}.
-         */
-        Advertisement newInstance(net.jxta.document.Element root);
-    }
-    
-    /**
-     *  This class is a singleton. This is the instance that backs the
-     *  static methods.
-     */
-    private final static AdvertisementFactory factory = new AdvertisementFactory();
-    
-    /**
-     *  This is the map of mime-types and constructors used by
-     *  {@code newAdvertisement}.
-     */
-    private final Map<String, Instantiator> encodings = new HashMap<String, Instantiator>();
-    
-    /**
-     *  If true then the pre-defined set of StructuredDocument sub-classes has
-     *  been registered from the property containing them.
-     */
-    private boolean loadedProperty = false;
-    
-    /**
-     *  Private constructor. This class is not meant to be instantiated except
-     *  by itself.
-     *
-     */
-    private AdvertisementFactory() {}
-    
-    /**
-     *  Registers the pre-defined set of Advertisement sub-classes so that
-     *  this factory can construct them.
-     *
-     *  @return true if at least one of the Advertisement sub-classes could
-     *  be registered otherwise false.
-     */
-    private synchronized boolean loadProviders() {
-        if (!factory.loadedProperty) {
-            factory.loadedProperty = registerProviders(Advertisement.class.getName());
-        }
-        
-        return factory.loadedProperty;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    protected Map<String, Instantiator> getAssocTable() {
-        return encodings;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public Class<Instantiator> getClassOfInstantiators() {
-        // our key is the doctype names.
-        return Instantiator.class;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public Class<String> getClassForKey() {
-        // our key is the doctype names.
-        return java.lang.String.class;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    protected boolean registerAssoc(String className) {
-        boolean registeredSomething = false;
-        
-        try {
-            Class advClass = Class.forName(className + "$Instantiator");
-            
-            Instantiator instantiator = (Instantiator) advClass.newInstance();
-            
-            String advType = instantiator.getAdvertisementType();
-            
-            registeredSomething = registerAdvertisementInstance(advType, instantiator);
-        } catch (Exception all) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Failed to register \'" + className + "\'", all);
-            }
-        }
-        
-        return registeredSomething;
-    }
-    
-    /**
-     *  Register an instantiator for and advertisement type to allow instances
-     *  of that type to be created.
-     *
-     *  @param rootType  the identifying value for this advertisement instance
-     *   type.
-     *  @param instantiator the instantiator to use in constructing objects
-     *   of this rootType.
-     *  @return boolean  true if the rootType type is registered. If there is
-     *   already a constructor for this type then false will be returned.
-     */
-    public static boolean registerAdvertisementInstance(String rootType, Instantiator instantiator) {
-        boolean result = factory.registerAssoc(rootType, instantiator);
-        
-        return result;
-    }
-    
-    /**
-     * Constructs a new instance of {@link Advertisement} matching the type
-     * specified by the {@code advertisementType} parameter.
-     *
-     * @param advertisementType Specifies the type of advertisement to create.
-     * @return The instance of {@link Advertisement}.
-     * @throws NoSuchElementException if there is no matching advertisement type.
-     */
-    public static Advertisement newAdvertisement(String advertisementType) {
-        factory.loadProviders();
-        
-        Instantiator instantiator = factory.getInstantiator(advertisementType);
-        
-        Advertisement a = instantiator.newInstance();
-        
-        return a;
-    }
-    
-    /**
-     * Constructs an instance of {@link Advertisement} from the provided
-     * <code>InputStream</code>. The content type of the stream is declared via
-     * the <code>mimetype</code> parameter.
-     *
-     * @deprecated Please convert your code to construct an {@code XMLDocument}
-     * using {@code StructuredDocumentFactory} and then call 
-     * {@link AdvertisementFactory#newAdvertisement(XMLElement)}. For example :
-     * <p/><pre>
-     *   XMLDocument xml = (XMLDocument) StructuredDocumentFactory.newStructuredDocument( MimeMediaType.XMLUTF8, is );
-     * </pre>
-     * <b>or frequently:</b>
-     * <p/><pre>
-     *   XMLDocument xml = (XMLDocument) StructuredDocumentFactory.newStructuredDocument( msgElement );
-     * </pre>
-     * <b>followed by:</b>
-     * <p/><pre>
-     *   Advertisement adv = AdvertisementFactory.newAdvertisement(xml);
-     * </pre>
-     *
-     * @param mimetype Specifies the mime media type of the stream being read.
-     * @param stream input stream used to read data to construct the advertisement
-     * @return The instance of {@link Advertisement}
-     * @throws IOException error reading message from input stream
-     * @throws NoSuchElementException if there is no matching advertisement type
-     * for the type of document read in.
-     */
-    @Deprecated
-    public static Advertisement newAdvertisement(MimeMediaType mimetype, InputStream stream) throws IOException {
-        StructuredDocument doc = StructuredDocumentFactory.newStructuredDocument(mimetype, stream);
-        
-        if (!(doc instanceof XMLDocument)) {
-            throw new IllegalArgumentException("Advertisements must be XML");
-        }
-        
-        return newAdvertisement((XMLDocument) doc);
-    }
-    
-    /**
-     * Reconstructs an instance of {@link Advertisement} from the provided
-     * <code>Reader</code>. The content type of the reader is declared via the
-     * <code>mimetype</code> parameter.
-     *
-     * @deprecated Please convert your code to construct an {@code XMLDocument}
-     * using {@code StructuredDocumentFactory} and then call 
-     * {@link AdvertisementFactory#newAdvertisement(XMLElement)}. For example :
-     * <p/><pre>
-     *   XMLDocument xml = (XMLDocument) StructuredDocumentFactory.newStructuredDocument( MimeMediaType.XMLUTF8, reader );
-     * </pre>
-     * <b>or frequently:</b>
-     * <p/><pre>
-     *   XMLDocument xml = (XMLDocument) StructuredDocumentFactory.newStructuredDocument( msgElement );
-     * </pre>
-     * <b>followed by:</b>
-     * <p/><pre>
-     *   Advertisement adv = AdvertisementFactory.newAdvertisement(xml);
-     * </pre>
-     *
-     * @param mimetype Specifies the mime media type of the stream being read.
-     * @param source used to read data to construct the advertisement.
-     * @return The instance of {@link Advertisement}
-     * @throws IOException error reading message from input stream
-     * @throws NoSuchElementException if there is no matching advertisement type
-     * for the type of document read in.
-     * @throws UnsupportedOperationException if the specified mime type is not
-     *  associated with a text oriented document type.
-     */
-    @Deprecated
-    public static Advertisement newAdvertisement(MimeMediaType mimetype, Reader source) throws IOException {
-        StructuredTextDocument doc = (StructuredTextDocument) StructuredDocumentFactory.newStructuredDocument(mimetype, source);
-        
-        return newAdvertisement(doc);
-    }
-    
-    /**
-     * Reconstructs an instance of {@link Advertisement} matching the type
-     * specified by the {@code root} parameter.
-     *
-     * @deprecated Advertisements must be encoded in XML. This is a legacy
-     * static constructor. You should convert your code to use the 
-     * {@link AdvertisementFactory#newAdvertisement(XMLElement) XMLElement}
-     * version.
-     *
-     * @param root Specifies a portion of a StructuredDocument which will be
-     * converted into an Advertisement.
-     * @return The instance of {@link Advertisement}.
-     * @throws NoSuchElementException if there is no advertisement type
-     * matching the type of the root node.
-     */
-    @Deprecated
-    public static Advertisement newAdvertisement(TextElement root) {
-        if (!(root instanceof XMLElement)) {
-            throw new IllegalArgumentException("Advertisements must be XML");
-        }
-        
-        return newAdvertisement((XMLElement) root);
-    }
-
-    /**
-     * Reconstructs an instance of {@link Advertisement} matching the type
-     * specified by the {@code root} parameter.
-     *
-     * @param root Specifies a portion of an XMLElement which will be
-     * converted into an Advertisement.
-     * @return The instance of {@link Advertisement}.
-     * @throws NoSuchElementException if there is no advertisement type
-     * matching the type of the root node.
-     */
-    public static Advertisement newAdvertisement(XMLElement root) {
-        factory.loadProviders();
-        
-        Instantiator instantiator = null;
-        
-        // The base type of the advertisement may be overridden by a type
-        // declaration. If this is the case, then we try to use that as the
-        // key rather than the root name.
-        Attribute type = root.getAttribute("type");
-
-        if (null != type) {
-            try {
-                instantiator = factory.getInstantiator(type.getValue());
-            } catch (NoSuchElementException notThere) {
-                // do nothing, its not fatal
-                ;
-            }
-        }
-        
-        // Don't have an instantiator for the type attribute, try the root name
-        if (null == instantiator) {
-            instantiator = factory.getInstantiator(root.getName());
-        }
-        
-        Advertisement a = instantiator.newInstance(root);
-        
-        return a;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/Attributable.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/Attributable.java
deleted file mode 100644 (file)
index eee4890..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.document;
-
-
-import java.util.Enumeration;
-
-
-/**
- * Interface for name value pairs to be associated with some base object.
- *
- * @see net.jxta.document.Attribute
- * @see net.jxta.document.StructuredDocument
- * @see net.jxta.document.Element
- */
-public interface Attributable {
-
-    /**
-     * Adds an attribute with the given name and value. Some implementations
-     * may support only a single value for each distinct name. Others may
-     * support multiple values for each name. If the value being provided
-     * replaces some other value then that value is returned otherwise null
-     * is returned.
-     *
-     * @param name  name of the attribute.
-     * @param value value for the attribute.
-     * @return String  containing previous value for this name if the value
-     *         is being replaced otherwise null.
-     */
-    String addAttribute(String name, String value);
-
-    /**
-     * Adds an attribute with the given name and value. Some implementations
-     * may support only a single value for each distinct name. Others may
-     * support multiple values for each name. If the value being provided
-     * replaces some other value then that value is returned otherwise null
-     * is returned.
-     *
-     * @param newAttrib new attribute.
-     * @return String  containing previous value for this name if the value
-     *         is being replaced otherwise null.
-     */
-    String addAttribute(Attribute newAttrib);
-
-    /**
-     * Returns an enumerations of the attributes associated with this object.
-     * Each element is of type Attribute.
-     *
-     * @return Enumeration the attributes associated with this object.
-     */
-    Enumeration<Attribute> getAttributes();
-
-    /**
-     * Returns a single attribute which matches the name provided. If no such
-     * named attribute exists then null is returned. For implementations of
-     * this interface which support multiple values for each name only the
-     * first value will be returned. To access all values for a name you must
-     * use getAttributes.
-     *
-     * @param name the attribute name
-     * @return Attribute the attributes matching the given name.
-     */
-    Attribute getAttribute(String name);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/Attribute.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/Attribute.java
deleted file mode 100644 (file)
index 1d74662..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.document;
-
-
-/**
- * A name value pair which is associated with some base object.
- *
- * @see net.jxta.document.Attributable
- * @see net.jxta.document.StructuredDocument
- * @see net.jxta.document.Element
- *
- **/
-public class Attribute {
-    
-    /**
-     *  The object which this attribute extends.
-     **/
-    private Attributable owner;
-    
-    /**
-     *  Our name
-     **/
-    private String name;
-    
-    /**
-     *  Our value
-     **/
-    private String value;
-    
-    /**
-     * Constructor for a new attribute which can be added to an
-     * {@link Attributable}.
-     *
-     * @param name Name for this attribute.
-     * @param value Value for this attribute.
-     **/
-    public Attribute(String name, String value) {
-        this(null, name, value);
-    }
-    
-    /**
-     * Constructor for a new attribute which is associated with an
-     * @link Attributable} object.
-     *
-     * @param owner The Atrributable owner of this attribute or null.
-     * @param name Name for this attribute.
-     * @param value Value for this attribute.
-     **/
-    public Attribute(Attributable owner, String name, String value) {
-        this.owner = owner;
-        this.name = name;
-        this.value = value;
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    @Override
-    protected Object clone() {
-        return this; // immutable so we can return self.
-    }
-    
-    /**
-     * {@inheritDoc}
-
-     * The two attributes are the same if they have
-     * the same owner, name and value.
-     *
-     * @param target Attribute to be checked with
-     * @return boolean if the attributes are equal otherwise false.
-     **/
-    @Override
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        }
-        
-        if (target instanceof Attribute) {
-            Attribute targAttrib = (Attribute) target;
-            
-            boolean result = ((owner.equals(targAttrib.owner)) && name.equals(targAttrib.name) && value.equals(targAttrib.name));
-            
-            return result;
-        } else {
-            return false;
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    @Override
-    public int hashCode() {
-        int result = name.hashCode() ^ value.hashCode();
-
-        result ^= (null != owner) ? owner.hashCode() : 0;
-        return result;
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    @Override
-    public String toString() {
-        return "<" + name + " = \"" + value + "\">";
-    }
-    
-    /**
-     *  Return name of this attribute
-     *
-     *  @return String containing the attribute's name.
-     **/
-    public String getName() {
-        return name;
-    }
-    
-    /**
-     *  Return the {@link Attributable} which is the owner of this attribute.
-     *
-     *  @return Attributable object which owns this attribute.
-     **/
-    public Attributable getOwner() {
-        return owner;
-    }
-    
-    /**
-     * Return value of this attribute
-     *
-     * @return String containing the attribute's value.
-     **/
-    public String getValue() {
-        return value;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/BinaryDocument.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/BinaryDocument.java
deleted file mode 100644 (file)
index 04b6c91..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.document;
-
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.IOException;
-
-
-/**
- * This class is an implementation of the Document interface. It is perhaps the
- * simplest implementation of the Document interface possible.
- */
-public class BinaryDocument implements Document {
-
-    /**
-     * Our Mime Media Types
-     */
-    private static final MimeMediaType[] myTypes = {
-        MimeMediaType.AOS
-    };
-
-    /**
-     * Storage for our bytes.
-     */
-    private final byte[] ourBytes;
-
-    /**
-     * The MIME type of this document.
-     */
-    private final MimeMediaType ourType;
-
-    /**
-     * Returns the MIME Media types supported by this this Document per
-     * {@link <a href="http://www.ietf.org/rfc/rfc2046.txt">IETF RFC 2046 <i>MIME : Media Types</i></a>}.
-     * <p/>
-     * Jxta does not currently support the 'Multipart' or 'Message' media types.
-     *
-     * @return An array of MimeMediaType objects containing the MIME Media Type
-     *         for this Document.
-     */
-    public static MimeMediaType[] getSupportedMimeTypes() {
-        return (myTypes.clone());
-    }
-
-    /**
-     * Creates new BinaryDocument from a byte array. The data in the array is
-     * not copied. If you intend to modify the array after creating a document
-     * then you should pass a copy of the data instead.
-     *
-     * @param someBytes Contains a byte array which will serve as our data.
-     */
-    public BinaryDocument(byte[] someBytes) {
-        this(someBytes, myTypes[0]);
-    }
-
-    /**
-     * Creates new BinaryDocument from a byte array. The data in the array is
-     * not copied. If you intend to modify the array after creating a document
-     * then you should pass a copy of the data instead.
-     *
-     * @param someBytes Contains a byte array which will serve as our data.
-     * @param type      The MIME media type for this document.
-     */
-    public BinaryDocument(byte[] someBytes, MimeMediaType type) {
-        ourBytes = someBytes;
-        ourType = type;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public MimeMediaType getMimeType() {
-        return ourType;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getFileExtension() {
-        return StructuredDocumentFactory.getFileExtensionForMimeType(ourType);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public InputStream getStream() throws IOException {
-        return (new ByteArrayInputStream(ourBytes));
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void sendToStream(OutputStream stream) throws IOException {
-        stream.write(ourBytes);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/Document.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/Document.java
deleted file mode 100644 (file)
index 016d8f1..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.document;
-
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import java.io.IOException;
-
-
-/**
- * A simple typed container for data. A {@code Document} is presented as a
- * byte stream with an associated type. The data type is specified using a
- * MIME Media Type (as defined by
- * {@link <a href="http://www.ietf.org/rfc/rfc2046.txt" target="_blank">IETF RFC 2046 <i>MIME : Media Types</i></a>}).
- *
- * @see         net.jxta.document.MimeMediaType
- * @see         net.jxta.document.StructuredDocument
- * @see         net.jxta.document.StructuredDocumentFactory
- */
-public interface Document extends DocumentStreamIO {
-    
-    /**
-     * Returns the MIME Media type of this {@code Document} per
-     * {@link <a href="http://www.ietf.org/rfc/rfc2046.txt" target="_blank">IETF RFC 2046 <i>MIME : Media Types</i></a>}.
-     *
-     * <p/>JXTA does not currently support the '<code>Multipart</code>' or
-     * '<code>Message</code>' media types.
-     *
-     * @return The MIME Media Type for this {@code Document}.
-     */
-    MimeMediaType getMimeType();
-    
-    /**
-     * Returns the file extension type used by this {@code Document}. This
-     * value is usually chosen based upon the MIME Media Type.
-     *
-     * @return An appropriate file extension for this {@code Document}.
-     */
-    String getFileExtension();    
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/DocumentByteArrayIO.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/DocumentByteArrayIO.java
deleted file mode 100644 (file)
index dba00ee..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.document;
-
-
-import java.nio.ByteBuffer;
-
-
-/**
- * Provides {@code byte} array based interfaces for manipulating 
- * {@code Document} contents.
- *
- * @see         net.jxta.document.Document
- */
-public interface DocumentByteArrayIO {
-           
-    /**
-     *  Returns the {@code Document} as a sequence of bytes.
-     */
-    byte[] getBytes();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/DocumentByteBufferIO.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/DocumentByteBufferIO.java
deleted file mode 100644 (file)
index 2131e16..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.document;
-
-
-import java.nio.ByteBuffer;
-
-
-/**
- * Provides {@code ByteBuffer} based interfaces for manipulating 
- * {@code Document} contents.
- *
- * @see         java.nio.ByteBuffer
- * @see         net.jxta.document.Document
- */
-public interface DocumentByteBufferIO {
-           
-    /**
-     *  Returns the {@code Document} as a sequence of ByteBuffers
-     */
-    ByteBuffer[] getByteBuffers();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/DocumentStreamIO.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/DocumentStreamIO.java
deleted file mode 100644 (file)
index c3e9734..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.document;
-
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import java.io.IOException;
-
-
-/**
- * Provides stream based interfaces for manipulating {@code Document} contents.
- *
- * @see         net.jxta.document.Document
- */
-public interface DocumentStreamIO {
-       
-    /**
-     * Returns the stream of bytes which represents the content of this
-     * {@code Document}.
-     *
-     * @return An {@link java.io.InputStream} containing the bytes
-     * of this {@code Document}.
-     * @throws  IOException For errors while writing the {@code Document}.
-     */
-    InputStream getStream() throws IOException;
-    
-    /**
-     *  Send the contents of this {@code Document} to the specified stream.
-     *
-     *  @param stream The OutputStream to which the {@code Document} will
-     *  be written.
-     *  @throws  IOException For errors while writing the {@code Document}.
-     */
-    void sendToStream(OutputStream stream) throws IOException;
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/Element.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/Element.java
deleted file mode 100644 (file)
index b73bd8d..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.document;
-
-
-import java.util.Enumeration;
-
-
-/**
- *  An element represents a portion of a {@link StructuredDocument}. An element
- *  is identifiable by a <code>key</code> and may also optionally have a
- *  <code>value</code>. Each Element also maintains a collection of references
- *  to other elements, its <emphasis>children</emphasis>. Elements can be
- *  composed into arbitrary hierarchical structures forming complex data
- *  structures.
- *
- *  <p/>Element instances are always associated with a
- *  {@link StructuredDocument}. A {@link StructuredDocument} is a specialized
- *  form of Element with additional features that make it appropriate for
- *  acting as the root of a hierarchy of elements.
- *
- *  @see net.jxta.document.Document
- *  @see net.jxta.document.StructuredDocument
- *  @see net.jxta.document.StructuredDocumentFactory
- *  @see net.jxta.document.StructuredTextDocument
- *  @see net.jxta.document.TextElement
- */
-public interface Element<E extends Element<E>> {
-    
-    /**
-     * Get the key associated with this Element.
-     *
-     * @return The key of this Element.
-     */
-    Object getKey();
-    
-    /**
-     * Get the value (if any) associated with this Element.
-     *
-     * @return The value of this element, if any, otherwise null.
-     */
-    Object getValue();
-    
-    /**
-     *  Get the root document element of the hierarchy this element belongs to.
-     *
-     *  @return The root document element of this element's hierarchy.
-     */
-    StructuredDocument getRoot();
-    
-    /**
-     * Get the parent element of this element. If this Element has not been
-     * inserted into the Document then <code>null</code> is returned. If this
-     * element is the root element of the Document then it returns itself. ie.,
-     * <code>this == this.getParent()</code>.
-     *
-     * @return The parent of this element. If the element has no parent
-     * then null will be returned. If the element is the root Element of the
-     * hierarchy then it will return itself.
-     */
-    E getParent();
-    
-    /**
-     *  Add a child element to this element. The child element must be from the
-     *  document as the element it is to be added to. Elements are created using
-     *  either {@link StructuredDocument#createElement(Object)} or
-     *  {@link StructuredDocument#createElement(Object, Object)}.
-     *
-     *  @param element The element to be added as a child.
-     */
-    void appendChild(E element);
-    
-    /**
-     *  Returns an enumeration of the immediate children of this element.
-     *
-     *  @return Enumeration containing all of the children of this element.
-     */
-    Enumeration<E> getChildren();
-    
-    /**
-     *  Returns an enumeration of the immediate children of this element who
-     *  match the specified key.
-     *
-     *  @param key The key which will be matched against.
-     *  @return Enumeration containing all of the matching children of this 
-     *  element.
-     */
-    Enumeration<E> getChildren(Object key);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/ExtendableAdvertisement.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/ExtendableAdvertisement.java
deleted file mode 100644 (file)
index 70e71ab..0000000
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.document;
-
-
-/**
- * Extendable advertisements provide features for allowing inheritance of
- * advertisement types. The core and standard JXTA advertisements all allow
- * extension by extending this class.
- *
- * @see net.jxta.document.Advertisement
- * @see net.jxta.document.AdvertisementFactory
- * @see net.jxta.document.Document
- * @see net.jxta.document.MimeMediaType
- */
-public abstract class ExtendableAdvertisement extends Advertisement {
-
-    /**
-     *  If {@code true} then the advertisement will be pretty print formatted
-     *  when it is output as XML. Currently this must be specified at 
-     *  construction time as it is normally a preference per advertisement type.
-     */
-    private transient boolean formatted;
-    
-    /**
-     *  Default constructor. The advertisement will *not* be pretty-printed when
-     *  it is output as XML.
-     */
-    protected ExtendableAdvertisement() {
-        this(false);
-    }
-    
-    /**
-     *  @param formatted If {@code true} then the advertisement will be pretty 
-     *  print formatted when it is output as XML.
-     */
-    protected ExtendableAdvertisement(boolean formatted) {
-        this.formatted = formatted;
-    }
-    
-    /**
-     * Returns the base type of this advertisement hierarchy. Typically, only
-     * the most basic advertisement of a type will implement this method and
-     * declare it as <code>final</code>.
-     *
-     * @return String the base type of advertisements in this hierarchy.
-     */
-    public abstract String getBaseAdvType();
-
-    /**
-     * Process an individual element from the document during parse. Normally,
-     * implementations will allow the base advertisements a chance to handle
-     * the element before attempting to handle the element themselves. ie.
-     * <p/>
-     * <pre><code>
-     *  protected boolean handleElement(Element elem) {
-     *
-     *      if (super.handleElement()) {
-     *           // it's been handled.
-     *           return true;
-     *           }
-     *      <i>... handle elements here ...</i>
-     *
-     *      // we don't know how to handle the element
-     *      return false;
-     *      }
-     *  </code></pre>
-     *
-     * @param elem The element to be processed.
-     * @return {@code true} if the element was recognized, otherwise false.
-     */
-    protected boolean handleElement(Element elem) {
-        // we don't handle any elements.
-        return false;
-    }
-
-    /**
-     * Process an individual attribute from the document root node. Normally,
-     * implementations will allow the base advertisements a chance to handle
-     * the attribute before attempting to handle the element themselves. ie.
-     * <p/>
-     * <p/><pre><code>
-     *  protected boolean handleAttribute( Attribute elem ) {
-     * <p/>
-     *      if (super.handleAttribute()) {
-     *           // it's been handled.
-     *           return true;
-     *           }
-     *
-     *      <i>... handle attributes here ...</i>
-     *
-     *      // we don't know how to handle the attribute
-     *      return false;
-     *      }
-     *  </code></pre>
-     *
-     * @param attrib The attribute to be processed.
-     * @return {@code true} if the attribute was recognized, otherwise false.
-     */
-    protected boolean handleAttribute(Attribute attrib) {
-
-        // "handle" the attributes that we choose to ignore.
-        if ("xmlns:jxta".equals(attrib.getName())) {
-            return true;
-        } else if ("xml:space".equals(attrib.getName())) {
-            return true;
-        } else if ("type".equals(attrib.getName())) {
-            return true;
-        }
-
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * We don't have any content to add, just build the document instance and 
-     * return it to implementations that actually do something with it.
-     */
-    @Override
-    public Document getDocument(MimeMediaType encodeAs) {
-        Document adv = StructuredDocumentFactory.newStructuredDocument(encodeAs, getBaseAdvType());
-
-        if (!(adv instanceof Attributable)) {
-            throw new IllegalArgumentException("Advertisements require document type with attribute support.");
-        }
-
-        if (adv instanceof XMLDocument) {
-            XMLDocument xmlAdv = (XMLDocument) adv;
-
-            xmlAdv.addAttribute("xmlns:jxta", "http://jxta.org");
-            if (!formatted) {
-                xmlAdv.addAttribute("xml:space", "preserve");
-            }
-        }
-
-        if (!getBaseAdvType().equals(getAdvType())) {
-            ((Attributable) adv).addAttribute("type", getAdvType());
-        }
-        
-        return adv;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/FileDocument.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/FileDocument.java
deleted file mode 100644 (file)
index bcee2c9..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.document;
-
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import java.io.IOException;
-
-
-/**
- * This class presents a Document interface for a specific file on disk.
- */
-public class FileDocument implements Document {
-    
-    private final static int BUFFER_SIZE = 4096;
-    
-    /**
-     * File which backs this document.
-     */
-    private final File file;
-    
-    /**
-     *  MIME media type of this document.
-     **/
-    private final MimeMediaType type;
-    
-    /**
-     * Create a new File Document.
-     **/
-    public FileDocument(File file) {
-        this(file, StructuredDocumentFactory.getMimeTypeForFileExtension(getFileExtension(file)));
-    }
-    
-    /**
-     * Create a new File Document.
-     */
-    public FileDocument(File file, MimeMediaType type) {
-        if (file.isDirectory()) {
-            throw(new IllegalArgumentException("File cannot be a directory"));
-        }
-        
-        if (!file.exists()) {
-            throw(new IllegalArgumentException("File must exist"));
-        }
-        
-        this.file = file;
-        this.type = type.intern();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     *
-     * <p/>Returns everything after the last '.' in the filename, or the
-     * empty string if the file name does not contain a '.'.
-     **/
-    public String getFileExtension() {
-        return getFileExtension(file);
-    }
-    
-    /**
-     * <p/>Returns everything after the last '.' in the filename, or the
-     * empty string if the file name does not contain a '.'.
-     **/
-    private static String getFileExtension(File file) {
-        
-        String fileName = file.getName();
-        int idx = fileName.lastIndexOf('.');
-
-        if (idx < 0 || idx == fileName.length()) {
-            return "";
-        } else {
-            return fileName.substring(idx + 1);
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    public MimeMediaType getMimeType() {
-        return type;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    public InputStream getStream() throws IOException {
-        return new FileInputStream(file);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    public void sendToStream(OutputStream sink) throws IOException {
-        InputStream source = getStream();
-        int c;
-        byte[] buf = new byte[BUFFER_SIZE];
-        
-        do {
-            c = source.read(buf);
-            
-            if (-1 == c) {
-                break;
-            }
-            
-            sink.write(buf, 0, c);
-        } while (true);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/MimeMediaType.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/MimeMediaType.java
deleted file mode 100644 (file)
index c044aac..0000000
+++ /dev/null
@@ -1,835 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.document;
-
-
-import java.io.*;
-import java.lang.ref.Reference;
-import java.lang.ref.WeakReference;
-import java.util.*;
-
-
-/**
- * MIME Media Types are used to describe the format of data streams. MIME
- * Media Types are defined by
- * {@link <a href="http://www.ietf.org/rfc/rfc2046.txt" target="_blank">IETF RFC 2046 <i>MIME : Media Types</i></a>}.
- * This class manages parsing of Mime Media Types from strings and piecemeal
- * construction of Mime Media Type descriptors.
- * <p/>
- * <p/>Note : This implementation does not include support for the character
- * encoding techniques described by :
- * {@link <a href="http://www.ietf.org/rfc/rfc2046.txt" target="_blank">IETF RFC 2046 <i>MIME : Media Types</i></a>}.
- *
- * @see net.jxta.document.Document
- * @see net.jxta.document.StructuredDocument
- * @see net.jxta.document.StructuredDocumentFactory
- * @see net.jxta.document.StructuredTextDocument
- */
-public class MimeMediaType implements Serializable {
-
-    /**
-     * Magic value for this format of serialization version.
-     */
-    private final static long serialVersionUID = 7546247036878523161L;
-
-    private final static String CTL = "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007"
-            + "\u0008\u0009\n\u000b\u000c\r\u000e\u000f" + "\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017"
-            + "\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f" + "\u007f";
-
-    private final static String space = "\u0020";
-    private final static String LWSP_char = space + "\u0009";
-    private final static String param_sep = LWSP_char + ";";
-    private final static String tspecials = "()<>@,;:\\\"/[]?=";
-    private final static String terminator = CTL + space + tspecials;
-
-    /**
-     * A canonical map of Mime Media Types.
-     */
-    private static final Map<MimeMediaType, Reference<MimeMediaType>> interned = new WeakHashMap<MimeMediaType, Reference<MimeMediaType>>();
-
-    /**
-     * Common Mime Media Type for arbitrary unparsed binary data.
-     */
-    public static final MimeMediaType AOS = new MimeMediaType("application", "octet-stream").intern();
-
-    /**
-     * Common Mime Media Type for text encoded using the default character
-     * encoding for this JVM. The default character encoding is specified by
-     * the JDK System property "<code>file.encoding</code>".
-     * <p/>
-     * <p/>The default encoding varies with host platform and locale. This
-     * media type <b>must not</b> be used for <b>any</b> documents which
-     * will be  exchanged with other peers (as they may be using different
-     * default character encodings).
-     */
-    public static final MimeMediaType TEXT_DEFAULTENCODING = new MimeMediaType("text", "plain").intern();
-
-    /**
-     * Common Mime Media Type for plain text encoded as UTF-8 characters. This
-     * type is used by JXTA for all strings.
-     */
-    public static final MimeMediaType TEXTUTF8 = new MimeMediaType("text", "plain", "charset=\"UTF-8\"").intern();
-
-    /**
-     * Common Mime Media Type for XML encoded using the default character
-     * encoding for this JVM. The default character encoding is specified by
-     * the JDK System property "<code>file.encoding</code>".
-     * <p/>
-     * <p/>The default encoding varies with host platform and locale. This
-     * media type <b>must not</b> be used for <b>any</b> documents which
-     * will be  exchanged with other peers (as they may be using different
-     * default character encodings).
-     */
-    public static final MimeMediaType XML_DEFAULTENCODING = new MimeMediaType("text", "xml").intern();
-
-    /**
-     * Common Mime Media Type for XML encoded using the default character
-     * encoding for this JVM. The default character encoding is specified by
-     * the JDK System property "<code>file.encoding</code>".
-     * <p/>
-     * <p/>The default encoding varies with host platform and locale. This
-     * media type <b>must not</b> be used for <b>any</b> documents which
-     * will be  exchanged with other peers (as they may be using different
-     * default character encodings).
-     */
-    public static final MimeMediaType APPLICATION_XML_DEFAULTENCODING = new MimeMediaType("application", "xml").intern();
-
-    /**
-     * Common Mime Media Type for XML encoded as UTF-8 characters. This type is
-     * used by JXTA for all protocol messages and metadata.
-     */
-    public static final MimeMediaType XMLUTF8 = new MimeMediaType("text", "xml", "charset=\"UTF-8\"").intern();
-
-    /**
-     * The primary media type
-     */
-    private transient String type = null;
-
-    /**
-     * The specific media sub-type
-     */
-    private transient String subtype = null;
-
-    /**
-     * The parameters for this media type
-     */
-    private transient List<parameter> parameters = new ArrayList<parameter>();
-    
-    /**
-     *  The hashcode value for this mime media type.
-     */
-    private transient int cachedHashCode = 0;
-
-    /**
-     * manages a media type parameter.
-     */
-    private static class parameter implements Comparable<parameter> {
-
-        /**
-         * Attribute name.
-         */
-        final String attribute;
-
-        /**
-         * Value for the attribute. <b>Includes quoting characters if they are
-         * needed for outputting this value.</b>
-         */
-        final String value;
-
-        parameter(String attr, String val) {
-            attribute = attr;
-            value = val;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public boolean equals(Object obj) {
-            if (this == obj) {
-                return true;
-            }
-
-            if (!(obj instanceof parameter)) {
-                return false;
-            }
-
-            parameter asParameter = (parameter) obj;
-
-            return attribute.equalsIgnoreCase(asParameter.attribute) && asParameter.value.equals(value);
-
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public int hashCode() {
-            return attribute.toLowerCase().hashCode() * 6037 + value.hashCode();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public String toString() {
-            return attribute + "=" + outputForm(value);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public int compareTo(parameter asParameter) {
-            if (this == asParameter) {
-                return 0;
-            }
-
-            int result = attribute.compareToIgnoreCase(asParameter.attribute);
-
-            if (0 != result) {
-                return result;
-            }
-
-            return value.compareTo(asParameter.value);
-        }
-
-        private static String outputForm(String val) {
-            StringBuilder result = new StringBuilder();
-
-            if (-1 == findNextSeperator(val)) {
-                result.append(val);
-            } else {
-                // needs quoting
-                result.append('\"');
-                for (int eachChar = 0; eachChar < val.length(); eachChar++) {
-                    char aChar = val.charAt(eachChar);
-
-                    if (('\\' == aChar) || ('\"' == aChar) || ('\r' == aChar)) {
-                        // needs escaping.
-                        result.append('\\');
-                    }
-                    result.append(aChar);
-                }
-                result.append('\"');
-            }
-            return result.toString();
-        }
-    }
-
-    /**
-     * Creates a new MimeMediaType
-     *
-     * @param mimetype string representing a mime-type
-     */
-    public MimeMediaType(String mimetype) {
-
-        String cleaned = mimetype.trim();
-
-        if (0 == cleaned.length()) {
-            throw new IllegalArgumentException("input cannot be empty");
-        }
-
-        // determine the type
-        int typeSepAt = findNextSeperator(cleaned);
-
-        if ((-1 == typeSepAt) || (0 == typeSepAt) || ('/' != cleaned.charAt(typeSepAt))) {
-            throw new IllegalArgumentException("expected seperator or seperator in unexpected location");
-        }
-
-        setType(cleaned.substring(0, typeSepAt));
-
-        // determine the sub-type
-        int subtypeSepAt = findNextSeperator(cleaned, typeSepAt + 1);
-
-        String itsParams = "";
-
-        if (-1 == subtypeSepAt) {
-            setSubtype(cleaned.substring(typeSepAt + 1));
-        } else {
-            setSubtype(cleaned.substring(typeSepAt + 1, subtypeSepAt));
-            itsParams = cleaned.substring(subtypeSepAt);
-            // include the seperator, its significant
-        }
-
-        parseParams(itsParams, false);
-    }
-
-    /**
-     * Creates a new type/subtype MimeMediaType
-     *
-     * @param type    string representing a mime type
-     * @param subtype string representing a mime subtype
-     */
-    public MimeMediaType(String type, String subtype) {
-        this(type, subtype, null);
-    }
-
-    /**
-     * Creates a new type/subtype MimeMediaType
-     *
-     * @param type       string representing a mime type
-     * @param subtype    string representing a mime subtype
-     * @param parameters parameters to the mime-type constructor
-     */
-    public MimeMediaType(String type, String subtype, String parameters) {
-        setType(type);
-        setSubtype(subtype);
-        if (null != parameters) {
-            parseParams(parameters, false);
-        }
-    }
-
-    /**
-     * Creates a new type/subtype MimeMediaType with the specified parameters.
-     * The parameters are copied from the source mime type and additional params
-     * are added. If replace is true, then the provided params will overwrite
-     * the params from the source mime type.
-     *
-     * @param type    the source mime type
-     * @param params  parameters to the mime-type constructor
-     * @param replace parameters if true then provided params should replace
-     *                existing params else they are accumulated.
-     */
-    public MimeMediaType(MimeMediaType type, String params, boolean replace) {
-        setType(type.getType());
-        setSubtype(type.getSubtype());
-        parameters.addAll(type.parameters);
-
-        parseParams(params, replace);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj) {
-            return true;
-        }
-
-        if (!(obj instanceof MimeMediaType)) {
-            return false;
-        }
-
-        MimeMediaType asMMT = (MimeMediaType) obj;
-
-        if (!type.equalsIgnoreCase(asMMT.type)) {
-            return false;
-        }
-
-        if (!subtype.equalsIgnoreCase(asMMT.subtype)) {
-            return false;
-        }
-
-        List<parameter> myParams = new ArrayList<parameter>(parameters);
-        List<parameter> itsParams = new ArrayList<parameter>(asMMT.parameters);
-
-        Collections.sort(myParams);
-        Collections.sort(itsParams);
-
-        return myParams.equals(itsParams);
-    }
-
-    /**
-     * Similar to {@link #equals(Object)}, but ignores any parameters. Compares
-     * only the type and sub-type.
-     *
-     * @param obj the object to compare
-     * @return true if equal
-     */
-    public boolean equalsIngoringParams(Object obj) {
-        if (this == obj) {
-            return true;
-        }
-
-        if (!(obj instanceof MimeMediaType)) {
-            return false;
-        }
-
-        MimeMediaType likeMe = (MimeMediaType) obj;
-
-        boolean retValue = getType().equalsIgnoreCase(likeMe.getType()) && getSubtype().equalsIgnoreCase(likeMe.getSubtype());
-
-        return retValue;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        if (0 == cachedHashCode) {
-            List<parameter> myParams = new ArrayList<parameter>(parameters);
-
-            Collections.sort(myParams);
-
-            int calcedHash = type.hashCode() * 2467 + subtype.hashCode() * 3943 + myParams.hashCode();
-
-            cachedHashCode = (0 != calcedHash) ? calcedHash : 1;
-        }
-        
-        return cachedHashCode;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String toString() {
-        StringBuilder retValue = new StringBuilder(getMimeMediaType());
-
-        for (parameter parameter : parameters) {
-            retValue.append(';');
-            parameter aParam = parameter;
-
-            retValue.append(aParam.toString());
-        }
-        return retValue.toString();
-    }
-
-    /**
-     * Returns the "base" MIME media type of this type. ie. with no parameters.
-     *
-     * @return The "base" MIME media type of this MimeMediaType.
-     */
-    public MimeMediaType getBaseMimeMediaType() {
-        return new MimeMediaType(type, subtype).intern();
-    }
-
-    /**
-     * Returns the "base" MIME media type of this type. ie. with no parameters.
-     *
-     * @return The "base" MIME media type of this type. ie. with no parameters.
-     */
-    public String getMimeMediaType() {
-        StringBuilder retValue = new StringBuilder(type.length() + 1 + subtype.length());
-
-        retValue.append(type);
-        retValue.append('/');
-        retValue.append(subtype);
-
-        return retValue.toString();
-    }
-
-    /**
-     * Get type of the mime-type
-     *
-     * @return type of the mime-type
-     */
-    public String getType() {
-        return type;
-    }
-
-    /**
-     * Check if the mime-type is for provisional. See Section 2.1 of
-     * {@link <a href=http://www.ietf.org/rfc/rfc2048.txt">IETF RFC 2048 <i>MIME : Registration Procedures</i></a>}
-     *
-     * @return boolean  true if it is a provisional type
-     */
-    public boolean isExperimentalType() {
-        if ((null == type) || (type.length() < 2)) {
-            return false;
-        }
-
-        if (type.startsWith("x-") || type.startsWith("x.")) {
-            return true;
-        }
-
-        return null != subtype && subtype.length() >= 2 && (subtype.startsWith("x-") || subtype.startsWith("x."));
-
-    }
-
-    /**
-     * Set the type of MimeMediaType
-     *
-     * @param type type value
-     */
-    private void setType(String type) {
-        if (null == type) {
-            throw new IllegalArgumentException("type cannot be null");
-        }
-
-        String cleaned = type.trim().toLowerCase(Locale.US);
-
-        if (0 == cleaned.length()) {
-            throw new IllegalArgumentException("type cannot be null");
-        }
-
-        if (-1 != findNextSeperator(cleaned)) {
-            throw new IllegalArgumentException("type cannot contain a seperator");
-        }
-
-        this.type = cleaned;
-    }
-
-    /**
-     * Get the Subtype of the mime-type
-     *
-     * @return subtype of the mime-type
-     */
-    public String getSubtype() {
-        return subtype;
-    }
-
-    /**
-     * Check if the mime-type is for debugging. This method will be
-     * removed
-     *
-     * @return boolean  true if it is a debugging type
-     */
-    public boolean isExperimentalSubtype() {
-        if ((null == subtype) || (subtype.length() < 2)) {
-            return false;
-        }
-
-        return (('x' == subtype.charAt(0)) && ('-' == subtype.charAt(1)));
-    }
-
-    /**
-     * Set the subtype of MimeMediaType
-     *
-     * @param subtype subtype value
-     */
-    private void setSubtype(String subtype) {
-        if (null == subtype) {
-            throw new IllegalArgumentException("subtype cannot be null");
-        }
-
-        String cleaned = subtype.trim().toLowerCase(Locale.US);
-
-        if (0 == cleaned.length()) {
-            throw new IllegalArgumentException("subtype cannot be null");
-        }
-
-        if (-1 != findNextSeperator(cleaned)) {
-            throw new IllegalArgumentException("subtype cannot contain a seperator");
-        }
-
-        this.subtype = cleaned;
-    }
-
-    /**
-     * Get the value of the first occurance of the specified parameter from the
-     * parameter list.
-     *
-     * @param param the parameter to retrieve.
-     * @return the value of the specifid parameter or null if the parameter was
-     *         not found.
-     */
-    public String getParameter(String param) {
-        for (parameter parameter : parameters) {
-            parameter aParam = parameter;
-
-            if (aParam.attribute.equalsIgnoreCase(param)) {
-                return aParam.value;
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Parses the parametes portion of a MIME Media Type specification.
-     *
-     * @param itsParams parse a string for mime parameters.
-     * @param replace   parameters if true then provided params should replace
-     *                  existing params else they are accumulated.
-     */
-    private void parseParams(String itsParams, boolean replace) {
-        int currentCharIdx = 0;
-        String currentAttribute = null;
-        boolean inSeperator = true;
-        boolean inComment = false;
-        boolean inAttribute = false;
-        StringBuffer currentValue = null;
-        boolean inValue = false;
-        boolean inQuoted = false;
-        boolean nextEscaped = false;
-
-        while (currentCharIdx < itsParams.length()) {
-            char currentChar = itsParams.charAt(currentCharIdx);
-
-            if (inSeperator) {
-                if ('(' == currentChar) {
-                    inSeperator = false;
-                    inComment = true;
-                } else if (-1 == param_sep.indexOf(currentChar)) {
-                    inSeperator = false;
-                    inAttribute = true;
-                    currentCharIdx--; // unget
-                }
-            } else if (inComment) {
-                if (nextEscaped) {
-                    nextEscaped = false;
-                } else {
-                    if ('\\' == currentChar) {
-                        nextEscaped = true;
-                    } else if (')' == currentChar) {
-                        inComment = false;
-                        inSeperator = true;
-                    } else if ('\r' == currentChar) {
-                        throw new IllegalArgumentException("malformed mime parameter at idx = " + currentCharIdx);
-                    }
-                }
-            } else if (inAttribute) {
-                int endAttr = findNextSeperator(itsParams, currentCharIdx);
-
-                if ((-1 == endAttr) || ('=' != itsParams.charAt(endAttr)) || (0 == (endAttr - currentCharIdx))) {
-                    throw new IllegalArgumentException("malformed mime parameter at idx = " + currentCharIdx);
-                }
-
-                currentAttribute = itsParams.substring(currentCharIdx, endAttr).toLowerCase(Locale.US);
-
-                currentCharIdx = endAttr; // skip the equals.
-                inAttribute = false;
-                inValue = true;
-                inQuoted = false;
-                nextEscaped = false;
-                currentValue = new StringBuffer();
-            } else if (inValue) {
-                if (inQuoted) {
-                    if (nextEscaped) {
-                        currentValue.append(currentChar);
-                        nextEscaped = false;
-                    } else {
-                        if ('\\' == currentChar) {
-                            nextEscaped = true;
-                        } else if ('"' == currentChar) {
-                            inQuoted = false;
-                        } else if ('\r' == currentChar) {
-                            throw new IllegalArgumentException("malformed mime parameter at idx = " + currentCharIdx);
-                        } else {
-                            currentValue.append(currentChar);
-                        }
-                    }
-                } else if (-1 == terminator.indexOf(currentChar)) {
-                    currentValue.append(currentChar);
-                } else {
-                    if ('"' == currentChar) {
-                        inQuoted = true;
-                    } else {
-                        parameter newparam = new parameter(currentAttribute, currentValue.toString());
-
-                        if (replace) {
-                            while (parameters.remove(newparam)) {}
-                        }
-
-                        parameters.add(newparam);
-
-                        inValue = false;
-                        inSeperator = true;
-                        currentCharIdx--; // unget
-                    }
-                }
-            } else {
-                throw new IllegalArgumentException("malformed mime parameter at idx = " + currentCharIdx);
-            }
-
-            currentCharIdx++;
-        }
-
-        // finish off the last value.
-        if (inValue) {
-            if (nextEscaped || inQuoted) {
-                throw new IllegalArgumentException("malformed mime parameter at idx = " + currentCharIdx);
-            }
-
-            parameter newparam = new parameter(currentAttribute, currentValue.toString());
-
-            if (replace) {
-                while (parameters.remove(newparam)) {}
-            }
-
-            parameters.add(newparam);
-
-            inValue = false;
-            inSeperator = true;
-        }
-
-        if (!inSeperator) {
-            throw new IllegalArgumentException("malformed mime parameter at idx = " + currentCharIdx);
-        }
-    }
-
-    /**
-     * Find next separator position  in mime-type
-     *
-     * @param source source location
-     * @return int separator location
-     */
-    private static int findNextSeperator(String source) {
-        return findNextSeperator(source, 0);
-    }
-
-    /**
-     * Find next separator position  in mime-type
-     *
-     * @param source source location
-     * @param from   from location
-     * @return int separator location
-     */
-    private static int findNextSeperator(String source, int from) {
-
-        int seperator = -1;
-
-        // find a seperator
-        for (int eachChar = from; eachChar < source.length(); eachChar++) {
-            if (-1 != terminator.indexOf(source.charAt(eachChar))) {
-                seperator = eachChar;
-                break;
-            }
-        }
-
-        return seperator;
-    }
-
-    /**
-     * Returns a MimeMediaType with a value represented by the specified String.
-     * <p/>
-     * <b>This method may produce better results than using the constructor
-     * the same parameter set in that</b>:
-     * <p/>
-     * <code>
-     * new MimeMediaType( string ) != new MimeMediaType( string )
-     * </code>
-     * <p/>
-     * while for common types:
-     * <p/>
-     * <code>
-     * MimeMediaType.valueOf( string ) == MimeMediaType.valueOf( string )
-     * </code>
-     */
-    public static MimeMediaType valueOf(String mimetype) {
-        return new MimeMediaType(mimetype).intern();
-    }
-
-    /**
-     * Read this Object in for Java Serialization
-     *
-     * @param s The stream from which the Object will be read.
-     * @throws IOException            for errors reading from the input stream.
-     * @throws ClassNotFoundException if the serialized representation contains
-     *                                references to classes which cannot be found.
-     */
-    private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
-        s.defaultReadObject();
-
-        MimeMediaType readType = MimeMediaType.valueOf(s.readUTF());
-
-        type = readType.type;
-        subtype = readType.subtype;
-        parameters = readType.parameters;
-    }
-
-    /**
-     *  Return the interned form of the ID.
-     */
-    private Object readResolve() throws ObjectStreamException {
-        return intern();
-    }
-
-    /**
-     * Write this Object out for Java Serialization
-     *
-     * @param s The stream to which the Object will be written.
-     * @throws IOException for errors writing to the output stream.
-     */
-    private void writeObject(ObjectOutputStream s) throws IOException {
-        s.defaultWriteObject();
-
-        s.writeUTF(toString());
-    }
-
-    /**
-     * Returns a canonical representation for the MimeMediaType object.
-     * <p/>
-     * <p/>A pool of MimeMediaType, is maintained privately by the class.
-     * <p/>
-     * <p/>When the intern method is invoked, if the pool already contains a
-     * MimeMediaType equal to this MimeMediaType object as determined by the
-     * equals(Object) method, then the MimeMediaType from the pool is returned.
-     * Otherwise, this MimeMediaType object is added to the pool and a reference
-     * to this MimeMediaType object is returned.
-     * <p/>
-     * <p/>It follows that for any two MimeMediaType <tt>s</tt> and <tt>t</tt>,
-     * <tt>s.intern() == t.intern()</tt> is true if and only if <tt>s.equals(t)</tt>
-     * is true.
-     *
-     * @return a MimeMediaType that has the same value as this type, but is
-     *         guaranteed to be from a pool of unique types.
-     */
-    public MimeMediaType intern() {
-        synchronized (MimeMediaType.class) {
-            Reference<MimeMediaType> common = interned.get(this);
-
-            MimeMediaType result;
-
-            if (null == common) {
-                common = new WeakReference<MimeMediaType>(this);
-                interned.put(this, common);
-                result = this;
-            } else {
-                result = common.get();
-                if (null == result) {
-                    interned.put(this, new WeakReference<MimeMediaType>(this));
-                    result = this;
-                }
-            }
-
-            return result;
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/StructuredDocument.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/StructuredDocument.java
deleted file mode 100644 (file)
index 73e19dd..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.document;
-
-
-/**
- * An extension of {@link Document} which allows the content of a document to be
- * specified by a hierarchy of elements. This allows the content of many
- * document types to be manipulated in an abstract way without regard to the
- * physical representation of the documents.
- *
- * <p/>StructuredDocuments are one of the elementary components that is
- * manipulated by the JXTA core. StructuredDocuments are used to represent most
- * core objects such as peer, peergroup or pipe advertisements.
- *
- * @see         net.jxta.document.Document
- * @see         net.jxta.document.StructuredTextDocument
- * @see         net.jxta.document.StructuredDocumentFactory
- **/
-public interface StructuredDocument<E extends Element< E >> extends Document, Element<E> {
-    
-    /**
-     * Create a new element without value.
-     *
-     * @param key The key of the element to be created.
-     * @return The new element.
-     **/
-    E createElement(Object key);
-    
-    /**
-     * Create a new element with value.
-     *
-     * @param   key    The name of the element to be created.
-     * @param   value  The value of the element to be created or
-     * <code>null</code> if no value is desired.
-     * @return  The new element.
-     **/
-    E createElement(Object key, Object value);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/StructuredDocumentFactory.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/StructuredDocumentFactory.java
deleted file mode 100644 (file)
index 74154ed..0000000
+++ /dev/null
@@ -1,582 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.document;
-
-
-import java.io.InputStream;
-import java.io.Reader;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Map;
-
-import java.io.IOException;
-import java.util.MissingResourceException;
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-import net.jxta.util.ClassFactory;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.TextMessageElement;
-
-
-/**
- * A factory for constructing instances of {@link StructuredDocument}.
- * Behind the scenes, it also provides for the registration of the mime-types
- * and constructors needed to accomplish the construction. All supported
- * mime-types will need to register their implementation in this factory.
- *
- * @see         net.jxta.document.Document
- * @see         net.jxta.document.StructuredTextDocument
- * @see         net.jxta.document.StructuredDocument
- * @see         net.jxta.document.MimeMediaType
- */
-public final class StructuredDocumentFactory extends ClassFactory<MimeMediaType, StructuredDocumentFactory.Instantiator> {
-    
-    /**
-     * Log4J Logger
-     */
-    private static final Logger LOG = Logger.getLogger(StructuredDocumentFactory.class.getName());
-    
-    /**
-     * Interface for instantiators of StructuredDocuments
-     */
-    public interface Instantiator {
-        
-        /**
-         *  For mapping between extensions and MIME types.
-         */
-        class ExtensionMapping extends Object {
-
-            /**
-             * The extension
-             */
-            private final String extension;
-            
-            /**
-             * MIME type it maps to
-             */
-            private final MimeMediaType mimetype;
-            
-            /**
-             *  default constructor
-             */
-            public ExtensionMapping(String extension, MimeMediaType mimetype) {
-                this.extension = extension;
-                this.mimetype = (null != mimetype) ? mimetype.intern() : null;
-            }
-            
-            /**
-             * {@inheritDoc}
-             */
-            @Override
-            public boolean equals(Object target) {
-                if (this == target) {
-                    return true;
-                }
-                
-                if (target instanceof ExtensionMapping) {
-                    ExtensionMapping likeMe = (ExtensionMapping) target;
-
-                    if (!extension.equals(likeMe.extension)) {
-                        return false;
-                    }
-                    
-                    if ((null == mimetype) && (null == likeMe.mimetype)) {
-                        return true;
-                    }
-                    
-                    if ((null == mimetype) || (null == likeMe.mimetype)) {
-                        return false;
-                    }
-                    
-                    return mimetype.equals(likeMe.mimetype);
-                } else {
-                    return false;
-                }
-            }
-            
-            /**
-             * {@inheritDoc}
-             */
-            @Override
-            public int hashCode() {
-                int hash = extension.hashCode();
-                
-                if (null != mimetype) {
-                    hash ^= mimetype.hashCode();
-                }
-                
-                return hash;
-            }
-            
-            /**
-             * {@inheritDoc}
-             */
-            @Override
-            public String toString() {
-                return extension + " -> " + ((null != mimetype) ? mimetype.toString() : "<null>");
-            }
-            
-            /**
-             * Returns the extension which is part of this mapping.
-             *
-             * @return the extension which is part of this mapping.
-             */
-            public String getExtension() {
-                return extension;
-            }
-            
-            /**
-             * Returns the MIME Media Type which is part of this mapping.
-             *
-             * @return the MIME Media Type which is part of this mapping.
-             */
-            public MimeMediaType getMimeMediaType() {
-                return mimetype;
-            }
-        }
-        
-        /**
-         * Returns the MIME Media types supported by this this Document per
-         * {@link <a href="http://www.ietf.org/rfc/rfc2046.txt">IETF RFC 2046 <i>MIME : Media Types</i></a>}.
-         *
-         * <p/>JXTA does not currently support the 'Multipart' or 'Message'
-         * media types.
-         *
-         * @return An array of MimeMediaType objects containing the MIME Media Type
-         *  for this Document.
-         */
-        MimeMediaType[] getSupportedMimeTypes();
-        
-        /**
-         * Returns the mapping of file extension and mime-types for this type
-         * of document. The default extension is mapped to the 'null' mime-type
-         * and should only be used if no other mapping matches.
-         *
-         * @return An array of objects containing file extensions
-         */
-        ExtensionMapping[] getSupportedFileExtensions();
-        
-        /**
-         * Create a new structured document of the type specified by doctype.
-         *
-         *  @param mimeType The MIME type to be associated with this instance.
-         *  the base type must be one of the types returned by
-         *  <tt>getSupportedMimeTypes</tt>. Some implementations may accept
-         *  parameters in the params section of the MIME type.
-         *  @param doctype Type for the base node of the document.
-         *  @return StructuredDocument instance.
-         */
-        StructuredDocument newInstance(MimeMediaType mimeType, String doctype);
-        
-        /**
-         * Create a new structured document of the type specified by doctype.
-         *
-         *  @param mimeType The MIME type to be associated with this instance.
-         *  The base type must be one of the types returned by
-         *  <tt>getSupportedMimeTypes</tt>. Some implementations may accept
-         *  parameters in the params section of the MIME type.
-         *  @param doctype Type for the base node of the document.
-         *  @param value Value for the base node of the document.
-         *  @return {@link StructuredDocument} instance.
-         */
-        StructuredDocument newInstance(MimeMediaType mimeType, String doctype, String value);
-        
-        /**
-         *  Create a structured document from a stream containing an appropriately serialized
-         *  instance of the same document.
-         *
-         *  @param mimeType The MIME type to be associated with this instance.
-         *  The base type must be one of the types returned by
-         *  <tt>getSupportedMimeTypes</tt>. Some implementations may accept
-         *  parameters in the params section of the MIME type.
-         *  @param source The {@code Inputstream} from which to read the
-         *  document.
-         *  @return {@link StructuredDocument} instance.
-         *  @throws IOException Thrown for problems reading from the source.
-         */
-        StructuredDocument newInstance(MimeMediaType mimeType, InputStream source) throws IOException;
-    }
-    
-
-    /**
-     *  Interface for instantiators of StructuredTextDocuments
-     */
-    public interface TextInstantiator extends Instantiator {
-        
-        /**
-         *  Create a structured document from a Reader containing an appropriately serialized
-         *  instance of the same document.
-         *
-         *  @param mimeType The MIME type to be associated with this instance.
-         *  The base type must be one of the types returned by
-         *  <tt>getSupportedMimeTypes</tt>. Some implementations may accept
-         *  parameters in the params section of the MIME type.
-         *  @param source {@code Reader} from which to read the instance.
-         *  @return {@link StructuredDocument} instance.
-         *  @throws IOException Thrown for problems reading from the source.
-         */
-        StructuredDocument newInstance(MimeMediaType mimeType, Reader source) throws IOException;
-    }
-    
-    /**
-     *  This class is a singleton. This is the instance that backs the
-     *  static methods.
-     */
-    private static final StructuredDocumentFactory factory = new StructuredDocumentFactory();
-    
-    /**
-     *  This is the map of mime-types and instantiators used by
-     *  <CODE>newStructuredDocument</CODE>.
-     */
-    private final Map<MimeMediaType, Instantiator> encodings = new HashMap<MimeMediaType, Instantiator>();
-    
-    /**
-     *  This is the map of extensions to mime-types used by
-     *  {@link #getMimeTypeForFileExtension(String) }
-     */
-    private final Map<String, MimeMediaType>  extToMime = new HashMap<String, MimeMediaType>();
-    
-    /**
-     *  This is the map of mime-types to extensions used by
-     *  {@link #getFileExtensionForMimeType(MimeMediaType mimetype) }
-     */
-    private final Map<MimeMediaType, String>  mimeToExt = new HashMap<MimeMediaType, String>();
-    
-    /**
-     *  If true then the pre-defined set of StructuredDocument sub-classes has
-     *  been registered from the property containing them.
-     */
-    private boolean loadedProperty = false;
-    
-    /**
-     *  Private constructor. This class is not meant to be instantiated except
-     *  by itself.
-     *
-     */
-    private StructuredDocumentFactory() {}
-    
-    /**
-     *  Registers the pre-defined set of StructuredDocument sub-classes so that
-     *  this factory can construct them.
-     *
-     *  @return true if at least one of the StructuredDocument sub-classes could
-     *  be registered otherwise false.
-     */
-    private synchronized boolean loadProviders() {
-        if (factory.loadedProperty) {
-            return true;
-        }
-
-        factory.loadedProperty = registerProviders(StructuredDocument.class.getName());
-        
-        return factory.loadedProperty;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    protected Map<MimeMediaType, Instantiator> getAssocTable() {
-        return encodings;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    protected Class<MimeMediaType> getClassForKey() {
-        return MimeMediaType.class;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    protected Class<Instantiator> getClassOfInstantiators() {
-        // our key is the doctype names.
-        return Instantiator.class;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     *
-     *  <p/>We override the standard implementation to get the MIME type from
-     *  the class and use that as the key to register the class with the factory.
-     *
-     *  @param className The class name which will be registered.
-     *  @return boolean true if the class was registered otherwise false.
-     */
-    @Override
-    protected boolean registerAssoc(String className) {
-        boolean registeredSomething = false;
-        
-        LOG.finer("Registering : " + className);
-        
-        try {
-            Class docClass = Class.forName(className);
-            
-            Instantiator instantiator = (Instantiator) docClass.getField("INSTANTIATOR").get(null);
-            
-            MimeMediaType[] mimeTypes = instantiator.getSupportedMimeTypes();
-            
-            for (int eachType = 0; eachType < mimeTypes.length; eachType++) {
-                LOG.finer("   Registering Type : " + mimeTypes[eachType].getMimeMediaType());
-                registeredSomething |= registerInstantiator(mimeTypes[eachType], instantiator);
-            }
-        } catch (Exception all) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed to register \'" + className + "\'", all);
-            }
-        }
-        
-        return registeredSomething;
-    }
-    
-    /**
-     *  Returns the preferred extension for a given mime-type. If there is no
-     *  mapping or no preferred extension for this MIME type then <tt>null</tt> is
-     *  returned.
-     *
-     *  @param mimetype the MimeMediaType we wish to know the file extension for.
-     *  @return String containing the extension or null for mime-types with no
-     *  known association.
-     */
-    public static String getFileExtensionForMimeType(MimeMediaType mimetype) {
-        factory.loadProviders();
-        
-        return factory.mimeToExt.get(mimetype.getBaseMimeMediaType());
-    }
-    
-    /**
-     *  Returns the preferred mime-type for a given file extension. If there is
-     *  no mapping then <tt>null</tt> is returned.
-     *
-     *  @param extension The extension we wish to know the mime-type for.
-     *  @return MimeMediaType associated with this file extension.
-     */
-    public static MimeMediaType getMimeTypeForFileExtension(String extension) {
-        factory.loadProviders();
-        
-        MimeMediaType result = factory.extToMime.get(extension);
-        
-        return result;
-    }
-    
-    /**
-     * Register an instantiator object a mime-type of documents to be
-     * constructed.
-     *
-     * @param mimetype   the mime-type associated.
-     * @param instantiator the instantiator that wants to be registered..
-     * @return boolean true   if the instantiator for this mime-type is now
-     * registered. If there was already an instantiator this mime-type then
-     * false will be returned.
-     * @throws SecurityException   there were permission problems registering
-     *  the instantiator.
-     */
-    public static boolean registerInstantiator(MimeMediaType mimetype, Instantiator instantiator) {
-        boolean registered = factory.registerAssoc(mimetype.getBaseMimeMediaType(), instantiator);
-        
-        if (registered) {
-            Instantiator.ExtensionMapping[] extensions = instantiator.getSupportedFileExtensions();
-            
-            for (int eachExt = 0; eachExt < extensions.length; eachExt++) {
-                if (null != extensions[eachExt].getMimeMediaType()) {
-                    factory.extToMime.put(extensions[eachExt].getExtension(), extensions[eachExt].getMimeMediaType().intern());
-                    
-                    factory.mimeToExt.put(extensions[eachExt].getMimeMediaType(), extensions[eachExt].getExtension());
-                    
-                    // And the base version.
-                    factory.mimeToExt.put(extensions[eachExt].getMimeMediaType().getBaseMimeMediaType(), extensions[eachExt].getExtension());
-                }
-            }
-        }
-        
-        return registered;
-    }
-    
-    /**
-     * Constructs an instance of {@link StructuredDocument} matching
-     * the mime-type specified by the <CODE>mimetype</CODE> parameter. The
-     * <CODE>doctype</CODE> parameter identifies the base type of the
-     * {@link StructuredDocument}.
-     *
-     * @param mimetype Specifies the mime media type to be associated with
-     *  the {@link StructuredDocument} to be created.
-     * @param doctype Specifies the root type of the {@link StructuredDocument}
-     *  to be created.
-     * @return StructuredDocument The instance of {@link StructuredDocument}
-     *  or null if it could not be created.
-     * @throws NoSuchElementException invalid mime-media-type
-     */
-    public static StructuredDocument newStructuredDocument(MimeMediaType mimetype, String doctype) {
-        factory.loadProviders();
-        
-        Instantiator instantiator = factory.getInstantiator(mimetype.getBaseMimeMediaType());
-        
-        return instantiator.newInstance(mimetype, doctype);
-    }
-    
-    /**
-     * Constructs an instance of {@link StructuredDocument} matching
-     * the mime-type specified by the <CODE>mimetype</CODE> parameter. The
-     * <CODE>doctype</CODE> parameter identifies the base type of the
-     * {@link StructuredDocument}. Value supplies a value for the root
-     * element.
-     *
-     * @param mimetype Specifies the mime media type to be associated with
-     *  the {@link StructuredDocument} to be created.
-     * @param doctype Specifies the root type of the {@link StructuredDocument}
-     *  to be created.
-     * @param value Specifies a value for the root element.
-     * @return StructuredDocument The instance of {@link StructuredDocument}
-     *  or null if it could not be created.
-     * @throws NoSuchElementException if the mime-type has not been registered.
-     */
-    public static StructuredDocument newStructuredDocument(MimeMediaType mimetype, String doctype, String value) {
-        factory.loadProviders();
-        
-        Instantiator instantiator = factory.getInstantiator(mimetype.getBaseMimeMediaType());
-        
-        return instantiator.newInstance(mimetype, doctype, value);
-    }
-    
-    /**
-     * Constructs an instance of {@link StructuredDocument} matching
-     * the mime-type specified by the <CODE>mimetype</CODE> parameter. The
-     * <CODE>doctype</CODE> parameter identifies the base type of the
-     * {@link StructuredDocument}.
-     *
-     * @param mimetype Specifies the mime media type to be associated with the
-     *  {@link StructuredDocument} to be created.
-     * @param stream Contains an InputStream from which the document will be
-     *  constructed.
-     * @return StructuredDocument The instance of {@link StructuredDocument}
-     *  or null if it could not be created.
-     * @throws IOException If there is a problem reading from the stream.
-     * @throws NoSuchElementException if the mime-type has not been registered.
-     */
-    public static StructuredDocument newStructuredDocument(MimeMediaType mimetype, InputStream stream) throws IOException {
-        factory.loadProviders();
-        
-        Instantiator instantiator = factory.getInstantiator(mimetype.getBaseMimeMediaType());
-        
-        return instantiator.newInstance(mimetype, stream);
-    }
-    
-    /**
-     * Constructs an instance of {@link StructuredDocument} matching
-     * the mime-type specified by the <CODE>mimetype</CODE> parameter. The
-     * <CODE>doctype</CODE> parameter identifies the base type of the
-     * {@link StructuredDocument}.
-     *
-     * @param mimetype Specifies the mime media type to be associated with the
-     * {@link StructuredDocument} to be created.
-     * @param reader A Reader from which the document will be constructed.
-     * @return StructuredDocument The instance of {@link StructuredDocument}
-     * or {@code null} if it could not be created.
-     * @throws IOException If there is a problem reading from the stream.
-     * @throws NoSuchElementException if the mime-type has not been registered.
-     * @throws UnsupportedOperationException if the mime-type provided is not
-     * a text oriented MIME type.
-     */
-    public static StructuredDocument newStructuredDocument(MimeMediaType mimetype, Reader reader) throws IOException {
-        factory.loadProviders();
-        
-        Instantiator instantiator = factory.getInstantiator(mimetype.getBaseMimeMediaType());
-        
-        if (!(instantiator instanceof TextInstantiator)) {
-            // XXX 20020502 bondolo@jxta.org we could probably do something
-            // really inefficient that would allow it to work, but better not to.
-            // if ReaderInputStream existed, it would be easy to do.
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning( "Document Class \'" + instantiator.getClass().getName() + "\' associated with \'" + mimetype 
-                    + "\' is not a text oriented document");
-            }
-            
-            throw new UnsupportedOperationException( "Document Class '" + instantiator.getClass().getName() 
-                    + "' associated with '" + mimetype + "' is not a text oriented document");
-        }
-        
-        return ((TextInstantiator) instantiator).newInstance(mimetype, reader);
-    }
-    
-    /**
-     * Constructs an instance of {@link StructuredDocument} based upon the
-     * content of the provided message element.
-     *
-     * @param element The message element from which to create the document.
-     * @return StructuredDocument The instance of {@link StructuredDocument}
-     *  or null if it could not be created.
-     * @throws IOException If there is a problem reading from the stream.
-     * @throws NoSuchElementException if the mime-type has not been registered.
-     */
-    public static StructuredDocument newStructuredDocument(MessageElement element) throws IOException {
-        factory.loadProviders();
-        
-        Instantiator instantiator = factory.getInstantiator(element.getMimeType().getBaseMimeMediaType());
-        
-        if ((instantiator instanceof TextInstantiator) && (element instanceof TextMessageElement)) {
-            return ((TextInstantiator) instantiator).newInstance(element.getMimeType(), ((TextMessageElement) element).getReader());
-        } else {
-            return instantiator.newInstance(element.getMimeType(), element.getStream());
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/StructuredDocumentUtils.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/StructuredDocumentUtils.java
deleted file mode 100644 (file)
index 0a3b07d..0000000
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.document;
-
-
-import java.util.Enumeration;
-
-
-/**
- *  Provides a number of static utility members which are helpful in
- *  manipluating StructuredDocuments.
- *
- **/
-public final class StructuredDocumentUtils {
-    
-    /**
-     *  A singleton class, not meant to be constructed
-     **/
-    private StructuredDocumentUtils() {
-        ;
-    }
-    
-    /**
-     * Recursively copy children elements of <code>from</code> into the
-     * the element <code>intoElement</code> of document <code>intoDoc</code>.
-     *
-     * <p/><b>BEWARE</b> that this does NOT copy the TEXTVALUE (if any) of the
-     * <code>fromParent</code> element, ONLY CHILDREN. All other elements
-     * are fully copied, including their textValue.
-     *
-     * <p/>It is not possible to copy a textValue in an existing element.
-     *
-     * @param intoDoc  the document into which the elements will be
-     * copied.
-     * @param intoElement  the element which will serve as the parent for
-     * the elements being copied.
-     * @param from the parent element of the elements which will be copied.
-     **/
-    public static void copyChildren(StructuredDocument intoDoc, Element intoElement, Element from) {
-        
-        for (Enumeration eachChild = from.getChildren(); eachChild.hasMoreElements();) {
-            
-            Element aChild = (Element) eachChild.nextElement();
-            Element newElement = intoDoc.createElement(aChild.getKey(), aChild.getValue());
-
-            intoElement.appendChild(newElement);
-            
-            // copy attributes if any
-            if ((aChild instanceof Attributable) && (newElement instanceof Attributable)) {
-                Enumeration eachAttrib = ((Attributable) aChild).getAttributes();
-                
-                while (eachAttrib.hasMoreElements()) {
-                    Attribute anAttrib = (Attribute) eachAttrib.nextElement();
-                    
-                    ((Attributable) newElement).addAttribute(anAttrib.getName(), anAttrib.getValue());
-                }
-            }
-            
-            // recurse to add the children.
-            copyChildren(intoDoc, newElement, aChild);
-        }
-    }
-    
-    /**
-     *  Recursively copy elements beginnging with <code>from</code> into the
-     *  document identified by <code>intoDoc</code>.
-     *
-     *  @param intoDoc  the document into which the elements which will be
-     *  copied.
-     *  @param intoElement  the element which will serve as the parent for
-     *  the elements being copied.
-     *  @param from the root element of the hierarchy which will be copied.
-     *  @param newName the root element being copied is renamed
-     *  <em>newName</em>.
-     *  @return The added element.
-     *
-     **/
-    public static Element copyElements(StructuredDocument intoDoc, Element intoElement, Element from, Object newName) {
-        
-        Element newElement = intoDoc.createElement(newName, from.getValue());
-        
-        intoElement.appendChild(newElement);
-        
-        boolean hasType = false;
-
-        // copy attributes if any
-        if (newElement instanceof Attributable) {
-
-            if (from instanceof Attributable) {
-                Enumeration eachAttrib = ((Attributable) from).getAttributes();
-            
-                while (eachAttrib.hasMoreElements()) {
-                    Attribute anAttrib = (Attribute) eachAttrib.nextElement();
-                    String attribName = anAttrib.getName();
-
-                    if (attribName.equals("type")) {
-                        hasType = true;
-                    }
-                    ((Attributable) newElement).addAttribute(attribName, anAttrib.getValue());
-                }
-            }
-
-            // If "from" happens to be a document, and if it happens to be renamed, and if it does not have an explicit type
-            // attribute, then preserve the document type, which we assume is the original name, converted to string, as a type
-            // attribute. It is an XMLism. It may be wrong or at least ineffective for other kinds of structured documents. If
-            // it one day becomes an issue, it will have to be resolved by having a method specific to each kind of structured
-            // document and dedicated to correcting type loss.
-
-            Object origName = from.getKey().toString();
-
-            if ((!hasType) && (!newName.equals(origName)) && (from instanceof Document)) {
-                ((Attributable) newElement).addAttribute("type", origName.toString());
-            }
-        }
-
-        StructuredDocumentUtils.copyChildren(intoDoc, newElement, from);
-        
-        return newElement;
-    }
-    
-    /**
-     *  Recursively copy elements beginnging with <code>from</code> into the
-     *  document identified by <code>intoDoc</code>.
-     *
-     *  @param intoDoc  the document into which the elements which will be
-     *  copied.
-     *  @param intoElement  the element which will serve as the parent for
-     *  the elements being copied.
-     *  @param from the root element of the hierarchy which will be copied.
-     *  @return The added element.
-     **/
-    public static Element copyElements(StructuredDocument intoDoc, Element intoElement, Element from) {
-        
-        return copyElements(intoDoc, intoElement, from, from.getKey());
-    }
-    
-    /**
-     * Copies the specified element or document into a standalone document of
-     * same type. The <code>from</code element's name is used as the document
-     * type. All child elements are recursively copied.
-     *
-     * @param from the root element from which to begin copying.
-     * @return StructuredDocument the copy
-     **/
-    public static StructuredDocument copyAsDocument(Element from) {
-        
-        StructuredDocument result;
-        Object value = from.getValue();
-        
-        if (value == null) {
-            result = StructuredDocumentFactory.newStructuredDocument(from.getRoot().getMimeType(), from.getKey().toString());
-        } else {
-            result = StructuredDocumentFactory.newStructuredDocument(from.getRoot().getMimeType(), from.getKey().toString()
-                    ,
-                    value.toString());
-            value = null;
-        }
-        
-        // copy attributes if any
-        if ((from instanceof Attributable) && (result instanceof Attributable)) {
-            Enumeration eachAttrib = ((Attributable) from).getAttributes();
-            
-            while (eachAttrib.hasMoreElements()) {
-                Attribute anAttrib = (Attribute) eachAttrib.nextElement();
-                
-                ((Attributable) result).addAttribute(anAttrib.getName(), anAttrib.getValue());
-            }
-        }
-        
-        StructuredDocumentUtils.copyChildren(result, result, from);
-        
-        return result;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/StructuredTextDocument.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/StructuredTextDocument.java
deleted file mode 100644 (file)
index 376420c..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.document;
-
-
-/**
- * Extends {@link StructuredDocument} to provide accessors appropriate for text
- * based documents.
- *
- * @see         net.jxta.document.Document
- * @see         net.jxta.document.StructuredDocument
- * @see         net.jxta.document.TextDocument
- * @see         net.jxta.document.Element
- * @see         net.jxta.document.TextElement
- * @see         net.jxta.document.StructuredDocumentFactory
- */
-public interface StructuredTextDocument<T extends TextElement< T >> extends TextDocument, StructuredDocument<T>, TextElement<T> {
-    
-    /**
-     * Create a new element without value.
-     *
-     * @param   name    The name of the element to be created.
-     * @return  The new element.
-     */
-    T createElement(String name);
-    
-    /**
-     * Create a new element with value.
-     *
-     * @param   name    The name of the element to be created.
-     * @param   value   The value of the element to be created.
-     * @return  The new element.
-     */
-    T createElement(String name, String value);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/TextDocument.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/TextDocument.java
deleted file mode 100644 (file)
index 701a5b1..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.document;
-
-
-import java.io.Writer;
-import java.io.Reader;
-
-import java.io.IOException;
-
-
-/**
- * Extends {@link net.jxta.document.Document} for text documents.
- *
- * @see net.jxta.document.Document
- */
-public interface TextDocument extends Document, TextDocumentReaderIO {}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/TextDocumentCharArrayIO.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/TextDocumentCharArrayIO.java
deleted file mode 100644 (file)
index 9ad6c2c..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.document;
-
-
-import java.io.Writer;
-import java.io.Reader;
-
-import java.io.IOException;
-
-
-/**
- * Provides {@code char} array based interfaces for manipulating
- * {@code TextDocument}s.
- */
-public interface TextDocumentCharArrayIO {
-
-    /**
-     * Returns the sequence of characters which represents the content of the
-     * {@code TextDocument}.
-     *
-     * @return A character array containing the characters of the
-     * {@code TextDocument}.
-     */
-    char[] getChars();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/TextDocumentCharBufferIO.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/TextDocumentCharBufferIO.java
deleted file mode 100644 (file)
index 304602c..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.document;
-
-
-import java.io.Writer;
-import java.io.Reader;
-
-import java.io.IOException;
-
-
-/**
- * Provides {@code Reader}/{@code Writer} based interfaces for manipulating
- * {@code TextDocument}s.
- */
-public interface TextDocumentCharBufferIO {
-
-    /**
-     * Returns the sequence of characters which represents the content of the
-     * {@code TextDocument}.
-     *
-     * @return A character array containing the characters of the
-     * {@code TextDocument}.
-     */
-    CharSequence getCharSequence();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/TextDocumentCharSequenceIO.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/TextDocumentCharSequenceIO.java
deleted file mode 100644 (file)
index fda5b27..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.document;
-
-
-import java.nio.CharBuffer;
-
-
-/**
- * Provides {@code Reader}/{@code Writer} based interfaces for manipulating
- * {@code TextDocument}s.
- */
-public interface TextDocumentCharSequenceIO {
-
-    /**
-     * Returns the sequence of characters which represents the content of the
-     * {@code TextDocument}.
-     *
-     * @return A sequence of {@code CharBuffer}s containing the characters of 
-     * the {@code TextDocument}.
-     */
-    CharBuffer getCharBuffers();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/TextDocumentReaderIO.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/TextDocumentReaderIO.java
deleted file mode 100644 (file)
index a1742ab..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.document;
-
-
-import java.io.Writer;
-import java.io.Reader;
-
-import java.io.IOException;
-
-
-/**
- * Provides {@code Reader}/{@code Writer} based interfaces for manipulating
- * {@code TextDocument}s.
- */
-public interface TextDocumentReaderIO {
-
-    /**
-     * Returns the sequence of characters which represents the content of the
-     * {@code TextDocument}.
-     *
-     * @return An {@link java.io.Reader} containing the characters of the
-     * {@code TextDocument}.
-     * @throws IOException If an I/O error occurs.
-     */
-    Reader getReader() throws IOException;
-
-    /**
-     * Send the contents of this {@code TextDocument} to the specified
-     * Writer.
-     *
-     * @param writer The {@link java.io.Writer} to which the characters of the
-     * {@code TextDocument} will be written.
-     * @throws IOException If an I/O error occurs.
-     */
-    void sendToWriter(Writer writer) throws IOException;
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/TextElement.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/TextElement.java
deleted file mode 100644 (file)
index c816cee..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.document;
-
-
-import java.util.Enumeration;
-
-
-/**
- * Extends {@link Element} to provide {@link java.lang.String} oriented
- * accessors for instances of {@link StructuredTextDocument}
- *
- * @see net.jxta.document.Document
- * @see net.jxta.document.Element
- * @see net.jxta.document.StructuredDocument
- * @see net.jxta.document.StructuredTextDocument
- */
-public interface TextElement<T extends TextElement< T >> extends Element<T> {
-
-    /**
-     * {@inheritDoc}
-     */
-    String getKey();
-
-    /**
-     * {@inheritDoc}
-     */
-    String getValue();
-
-    /**
-     * {@inheritDoc}
-     */
-    StructuredTextDocument getRoot();
-
-    /**
-     * Get the name associated with an element.
-     *
-     * @return A string containing the name of this element.
-     */
-    String getName();
-
-    /**
-     * Get the value (if any) associated with an element.
-     *
-     * @return A string containing the value of this element, if any, otherwise null.
-     */
-    String getTextValue();
-
-    /**
-     * Returns an enumeration of the immediate children of this element whose
-     * name match the specified string.
-     *
-     * @param name The name which will be matched against.
-     * @return An enumeration containing all of the children of this element.
-     */
-    Enumeration<T> getChildren(String name);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/XMLDocument.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/XMLDocument.java
deleted file mode 100644 (file)
index 1424da1..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.document;
-
-
-/**
- * Common interfaces for all {@link net.jxta.document.StructuredTextDocument}
- * which are implemented by XML Documents. Appropriate for advertisements and
- * messages.
- */
-public interface XMLDocument<X extends XMLElement< X >> extends XMLElement<X>, StructuredTextDocument<X> {
-
-    /**
-     * {@inheritDoc}
-     */
-    X createElement(String name);
-
-    /**
-     * {@inheritDoc}
-     */
-    X createElement(String name, String value);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/XMLElement.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/XMLElement.java
deleted file mode 100644 (file)
index 091ffc8..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.document;
-
-
-import java.util.Enumeration;
-
-
-/**
- * Common definition of XML Elements. Appropriate for advertisements and
- * messages.
- */
-public interface XMLElement<X extends XMLElement<X>> extends TextElement<X>, Attributable {
-
-    /**
-     * {@inheritDoc}
-     */
-    XMLDocument getRoot();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/document/package.html
deleted file mode 100644 (file)
index e579d09..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    JXTA Documents are containers for both structured and unstructured data.
-    Advertisements are used to describe JXTA resources such as peers, groups,
-    services, and codats.
-
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#advert" target='_blank'>JXTA Protocols Specification : Advertisementss</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/AbstractMessenger.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/AbstractMessenger.java
deleted file mode 100644 (file)
index d81cba5..0000000
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
- * Copyright (c) 2004-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.endpoint;
-
-
-import net.jxta.util.AbstractSimpleSelectable;
-import net.jxta.util.SimpleSelectable;
-
-import java.io.IOException;
-import java.io.InterruptedIOException;
-
-
-/**
- * An AbstractMessenger is used to implement messengers (for example, by transport modules).
- * It supplies the convenience, bw compatible, obvious, or otherwise rarely changed methods.
- * Many method cannot be overloaded in order to ensure standard behaviour.
- * The rest is left to implementations.
- *
- * @see net.jxta.endpoint.EndpointService
- * @see net.jxta.endpoint.EndpointAddress
- * @see net.jxta.endpoint.Message
- */
-public abstract class AbstractMessenger extends AbstractSimpleSelectable implements Messenger {
-
-    /**
-     * The default Maximum Transmission Unit.
-     */
-    protected static final long DEFAULT_MTU = Long.parseLong(System.getProperty("net.jxta.MTU", "65536"));
-
-    /**
-     * The destination address of messages sent on this messenger.
-     */
-    protected final EndpointAddress dstAddress;
-
-    /**
-     * The stateLock that we share with the implementation.
-     * This permits to implement waitState in a totally generic way: waitState depends only on the lock
-     * (provided at construction), and on getState(), supplied by the implementation.
-     */
-    private Object stateLock;
-
-    /**
-     * Create a new abstract messenger.
-     * <p/>
-     * Warning: This class needs to know the object on which to waitState must synchronize. It is generally impossible
-     * to pass it at construction because it is not yet constructed. Instead implementations MUST call {@link #setStateLock}
-     * from their constructor.
-     *
-     * @param dest who messages should be addressed to
-     */
-    public AbstractMessenger(EndpointAddress dest) {
-        dstAddress = dest;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * A simple implementation for debugging. Do not depend upon the format.
-     */
-    @Override
-    public String toString() {
-        return super.toString() + " {" + dstAddress + "}";
-    }
-
-    /**
-     * Specifies the object on which waitState must synchronize.
-     *
-     * @param stateLock The object on which waitState must synchronize. This has to be the object that gets notified when the
-     *                  implementation changes its state. Changing state is defined as "any operation that causes the result of the
-     *                  <code>getState</code> method to change". Implementations that use the MessengerState state machine should typically use the
-     *                  MessengerState object as their state lock, but it is not assumed.
-     */
-    protected void setStateLock(Object stateLock) {
-        this.stateLock = stateLock;
-    }
-
-    /*
-     * Messenger methods implementations.
-     */
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * This is here for backward compatibility reasons.  The notion of long term unemployment still exists, but is no-longer part
-     * of the API.  Self closing for unemployment is now a built-in feature of messengers.
-     */
-    @Deprecated
-    public final boolean isIdle() {
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Deprecated
-    public final boolean isSynchronous() {
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final EndpointAddress getDestinationAddress() {
-        return dstAddress;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Deprecated
-    public final EndpointAddress getDestinationAddressObject() {
-        return dstAddress;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>It is not always enforced. At least this much can always be sent. 
-     */
-    public long getMTU() {
-        return DEFAULT_MTU;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * This is a minimal implementation. It may not detect closure
-     * initiated by the other side unless the messenger was actually used
-     * since. A more accurate (but not mandatory implementation) would
-     * actually go and check the underlying connection, if relevant...unless
-     * breakage initiated by the other side is actually reported asynchronously
-     * when it happens. Breakage detection from the other side need not
-     * be reported atomically with its occurrence. This not very important
-     * since we canonicalize transport messengers and so do not need to
-     * aggressively collect closed ones. When not used, messengers die by themselves.
-     */
-    public boolean isClosed() {
-        return (getState() & USABLE) == 0;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final void flush() throws IOException {
-        int currentState = 0;
-
-        try {
-            currentState = waitState(IDLE, 0);
-        } catch (InterruptedException ie) {
-            InterruptedIOException iio = new InterruptedIOException("flush() interrupted");
-
-            iio.initCause(ie);
-            throw iio;
-        }
-        
-        if ((currentState & (CLOSED | USABLE)) != 0) {
-            return;
-        }
-        
-        throw new IOException("Messenger was unexpectedly closed.");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final boolean sendMessage(Message msg) throws IOException {
-        return sendMessage(msg, null, null);
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     */
-    public void sendMessage(Message msg, String service, String serviceParam, OutgoingMessageEventListener listener) {
-        throw new UnsupportedOperationException("This legacy method is not supported by this messenger.");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final boolean sendMessage(Message msg, String rService, String rServiceParam) throws IOException {
-
-        // We have to retrieve the failure from the message and throw it if its an IOException, this is what the API
-        // says that this method does.
-
-        if (sendMessageN(msg, rService, rServiceParam)) {
-            return true;
-        }
-
-        Object failed = msg.getMessageProperty(Messenger.class);
-
-        if ((failed == null) || !(failed instanceof OutgoingMessageEvent)) {
-            // huh ?
-            return false;
-        }
-
-        Throwable t = ((OutgoingMessageEvent) failed).getFailure();
-
-        if (t == null) {
-            // Must be saturation, then. (No throw for that).
-            return false;
-        }
-
-        // Now see how we can manage to throw it.
-        if (t instanceof IOException) {
-            throw (IOException) t;
-        } else if (t instanceof RuntimeException) {
-            throw (RuntimeException) t;
-        } else if (t instanceof Error) {
-            throw (Error) t;
-        }
-
-        IOException failure = new IOException("Failure sending message");
-
-        failure.initCause(t);
-
-        throw failure;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * This method synchronizes on the lock object supplied at construction.
-     */
-    public final int waitState(int wantedStates, long timeout) throws InterruptedException {
-        synchronized (stateLock) {
-            if (timeout == 0) {
-                while ((wantedStates & getState()) == 0) {
-                    stateLock.wait();
-                }
-                return getState();
-            }
-
-            if (timeout < 0) {
-                stateLock.wait(timeout); // let it throw the appropriate error.
-            }
-
-            long start = System.currentTimeMillis();
-            long end = start + timeout;
-
-            if (end < start) {
-                end = Long.MAX_VALUE;
-            }
-            long left = end - start;
-
-            while ((left > 0) && (wantedStates & getState()) == 0) {
-
-                stateLock.wait(left);
-
-                left = end - System.currentTimeMillis();
-            }
-            
-            return getState();
-        }
-    }
-
-    /*
-     * SimpleSelectable implementation.
-     */
-
-    /**
-     * Implements a default for all AbstractMessengers: mirror the event to our selectors. This is what is needed by all the
-     * known AbstractMessengers that register themselves somewhere. (That is ChannelMessengers).
-     * FIXME - jice@jxta.org 20040413: Not sure that this is the best default.
-     *
-     * @param changedObject Ignored.
-     */
-    public void itemChanged(SimpleSelectable changedObject) {
-        notifyChange();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/AsyncChannelMessenger.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/AsyncChannelMessenger.java
deleted file mode 100644 (file)
index ff8607e..0000000
+++ /dev/null
@@ -1,665 +0,0 @@
-/*
- * Copyright (c) 2004-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.endpoint;
-
-import net.jxta.peergroup.PeerGroupID;
-
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.BlockingQueue;
-
-/**
- * Extends Channel Messenger behaviour to provide asynchronous message sending
- * via queuing.
- */
-public abstract class AsyncChannelMessenger extends ChannelMessenger {
-
-    /*
-     *  Logger
-     * private final static transient Logger LOG = Logger.getLogger(AsyncChannelMessenger.class.getName());
-     */
-
-    /**
-     * {@code true} if we have deliberately closed our one message input queue.
-     */
-    private boolean inputClosed = false;
-
-    /**
-     * {@code true} if we have deliberately stopped sending.
-     */
-    private boolean outputClosed = false;
-
-    /**
-     * Actions that we defer to after returning from event methods. In other
-     * words, they cannot be done with the lock held, or they require calling
-     * more event methods.
-     */
-    private enum DeferredAction {
-
-        /**
-         * No action deferred.
-         */
-        ACTION_NONE,
-        /**
-         * Must send the current message.
-         */
-        ACTION_SEND,
-        /**
-         * Must report failure to connect.
-         */
-        ACTION_CONNECT
-    }
-
-    /**
-     * The current deferred action.
-     */
-    private DeferredAction deferredAction = DeferredAction.ACTION_NONE;
-
-    /**
-     * The messages queue.
-     */
-    private final BlockingQueue<PendingMessage> queue;
-
-    /**
-     * State lock and engine.
-     */
-    private final AsyncChannelMessengerState stateMachine;
-
-    /**
-     * Our statemachine implementation; just connects the standard MessengerState action methods to
-     * this object.
-     */
-    private class AsyncChannelMessengerState extends MessengerState {
-
-        protected AsyncChannelMessengerState(boolean connected) {
-            super(connected);
-        }
-
-        /*
-         * The required action methods.
-         */
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        protected void connectAction() {
-            deferredAction = DeferredAction.ACTION_CONNECT;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        protected void startAction() {
-            deferredAction = DeferredAction.ACTION_SEND;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        protected void closeInputAction() {
-            // We're synchronized here. (invoked from stateMachine)
-            inputClosed = true;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        protected void closeOutputAction() {
-            // We're synchronized here. (invoked from stateMachine)
-            outputClosed = true;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        protected void failAllAction() {
-
-            // The queue is now closed, so we can rest assured that the last
-            // message is really the last one. This is a synchronous action. The
-            // state machine assumes that it is done when we return. There is no
-            // need to signal completion with an idleEvent.
-            PendingMessage theMsg;
-
-            while (true) {
-                theMsg = null;
-
-                synchronized (stateMachine) {
-                    theMsg = queue.poll();
-                }
-
-                if (theMsg == null) {
-                    return;
-                }
-
-                Message currentMsg = theMsg.msg;
-                Throwable currentFailure = theMsg.failure;
-
-                if (currentFailure == null) {
-                    currentFailure = new IOException("Messenger unexpectedly closed");
-                }
-
-                OutgoingMessageEvent event = new OutgoingMessageEvent(currentMsg, currentFailure);
-
-                currentMsg.setMessageProperty(Messenger.class, event);
-            }
-        }
-    }
-
-
-    /**
-     * The representation of a queued message. It is shared between this
-     * abstract class and any implementation.
-     */
-    protected static class PendingMessage {
-        final Message msg;
-        final String service;
-        final String param;
-        Throwable failure;
-
-        PendingMessage(Message msg, String service, String param) {
-            this.msg = msg;
-            this.service = service;
-            this.param = param;
-            this.failure = null;
-        }
-    }
-
-    /**
-     * Create a new AsyncChannelMessenger.
-     *
-     * @param baseAddress      The network address messages go to; regardless of
-     *                         service, param, or group.
-     * @param redirection      Group to which the messages must be redirected. This
-     *                         is used to implement the automatic group segregation which has become a
-     *                         de-facto standard. If not null, the unique portion of the specified
-     *                         groupID is prepended with {@link #InsertedServicePrefix} and inserted in
-     *                         every message's destination address in place of the the original service
-     *                         name, which gets shifted into the beginning of the service parameter. The
-     *                         opposite is done on arrival to restore the original destination address
-     *                         before the message is delivered to the listener in the the specified
-     *                         group. Messages that already bear a group redirection are not affected.
-     * @param origService      The default destination service for messages sent
-     *                         without specifying a different service.
-     * @param origServiceParam The default destination service parameter for
-     *                         messages sent without specifying a different service parameter.
-     * @param queueSize        the queue size that channels should have.
-     * @param connected        true if the channel is created in the connected state.
-     */
-    public AsyncChannelMessenger(EndpointAddress baseAddress, PeerGroupID redirection, String origService, String origServiceParam, int queueSize, boolean connected) {
-
-        super(baseAddress, redirection, origService, origServiceParam);
-
-        stateMachine = new AsyncChannelMessengerState(connected);
-
-        queue = new ArrayBlockingQueue<PendingMessage>(queueSize);
-
-        // We synchronize our state with the sharedMessenger's stateMachine.
-        // Logic would dictate that we pass it to super(), but it is not itself
-        // constructed until super() returns. No way around it.
-
-        setStateLock(stateMachine);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final void close() {
-        DeferredAction action;
-
-        synchronized (stateMachine) {
-            stateMachine.closeEvent();
-            action = eventCalled(true);
-        }
-
-        // We called an event. State may have changed.
-        notifyChange();
-
-        performDeferredAction(action);
-    }
-
-    /**
-     * This internal method does the common part of sending the message on
-     * behalf of both sendMessageN and sendMessageB.
-     * <p/>It is not quite possible to implement sendMessageB as a wrapper
-     * around sendMessageN without some internal cooperation. At least not in
-     * an efficient manner. sendMessageB must not set the message property:
-     * either it fails and throws, or it returns successfully and the property
-     * is set later. This is required so that messages can be retried when
-     * failing synchronously (through a blocking messenger typically, but the
-     * semantic has to be uniform).
-     * <p/>Each of sendMessageB and sendMessageN takes care of status reporting
-     * on its own terms.
-     *
-     * @param msg           the message to send
-     * @param rService      destination service
-     * @param rServiceParam destination param
-     * @return The outcome from that one attempt. {@code true} means done.
-     *         {@code false} means saturated.  When {@code true} is returned, it means
-     *         that the fate of the message will be decided asynchronously, so we do
-     *         not have any details, yet.
-     * @throws IOException          is thrown if this messenger is closed.
-     * @throws InterruptedException if interrupted
-     */
-    private boolean sendMessageCommon(Message msg, String rService, String rServiceParam) throws IOException, InterruptedException {
-
-        String service = effectiveService(rService);
-        String serviceParam = effectiveParam(rService, rServiceParam);
-        boolean queued = true;
-        boolean change = false;
-        DeferredAction action = DeferredAction.ACTION_NONE;
-
-        synchronized (stateMachine) {
-            if (inputClosed) {
-                throw new IOException("This messenger is closed. It cannot be used to send messages.");
-            }
-
-            boolean wasEmpty = queue.isEmpty();
-
-            if (queue.remainingCapacity() > 1) {
-                queue.put(new PendingMessage(msg, service, serviceParam));
-
-                // Still not saturated. If we weren't idle either, then nothing worth mentionning.
-                if (wasEmpty) {
-                    change = true;
-                    stateMachine.msgsEvent();
-                    action = eventCalled(false);
-                }
-            } else if (1 == queue.remainingCapacity()) {
-                queue.put(new PendingMessage(msg, service, serviceParam));
-
-                // Now saturated.
-                stateMachine.saturatedEvent();
-                action = eventCalled(false);
-                change = true;
-            } else {
-                // Was already saturated.
-                queued = false;
-            }
-        }
-
-        if (queued && change) {
-            // If not queued, there was no change of condition as far as
-            // outsiders are concerned. (redundant saturatedEvent, only
-            // defensive; to guarantee statemachine in sync). else, if the
-            // saturation state did not change, we have no state change to
-            // notify.
-            notifyChange();
-        }
-
-        performDeferredAction(action);
-
-        // Before we return, make sure that this channel remains referenced if
-        // it has messages. It could become unreferenced if it is not yet
-        // resolved and the application lets go of it after sending messages.
-        // This means that we may need to do something only in the resolpending
-        // and resolsaturated cases. The way we do this test, there can be false
-        // positives. They're dealt with as part of the action that is carried
-        // out.
-        if ((stateMachine.getState() & (Messenger.RESOLPENDING | Messenger.RESOLSATURATED)) != 0) {
-            resolPendingImpl();
-        }
-
-        return queued;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final boolean sendMessageN(Message msg, String rService, String rServiceParam) {
-
-        try {
-            if (sendMessageCommon(msg, rService, rServiceParam)) {
-                // If it worked the message is queued; the outcome will be notified later.
-                return true;
-            }
-            // Non-blocking and queue full: report overflow.
-            msg.setMessageProperty(Messenger.class, OutgoingMessageEvent.OVERFLOW);
-        } catch (IOException oie) {
-            msg.setMessageProperty(Messenger.class, new OutgoingMessageEvent(msg, oie));
-        } catch (InterruptedException interrupted) {
-            msg.setMessageProperty(Messenger.class, new OutgoingMessageEvent(msg, interrupted));
-        }
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final void sendMessageB(Message msg, String rService, String rServiceParam) throws IOException {
-
-        try {
-            while (true) {
-                // if sendMessageCommon says "true" it worked.
-                if (sendMessageCommon(msg, rService, rServiceParam)) {
-                    return;
-                }
-                // Do a shallow check on the queue. If it seems empty (without getting into a critical section to
-                // verify it), then yielding is good bet. It is a lot cheaper and smoother than waiting.
-                // Note the message should be enqueued now. yielding makes sense now if the queue is empty
-                if (queue.isEmpty()) {
-                    Thread.yield();
-                }
-
-                // If we reached this far, it is neither closed, nor ok. So it was saturated.
-                synchronized (stateMachine) {
-                    // Cheaper than waitState. sendMessageCommon already does the relevant state checks.
-                    stateMachine.wait();
-                }
-            }
-        } catch (InterruptedException ie) {
-            InterruptedIOException iie = new InterruptedIOException("Message send interrupted");
-
-            iie.initCause(ie);
-            throw iie;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final void resolve() {
-        DeferredAction action;
-
-        synchronized (stateMachine) {
-            stateMachine.resolveEvent();
-            action = eventCalled(true);
-        }
-        notifyChange();
-        performDeferredAction(action); // we expect connect but let the state machine decide.
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final int getState() {
-        return stateMachine.getState();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public final Messenger getChannelMessenger(PeerGroupID redirection, String service, String serviceParam) {
-        // Channels don't make channels.
-        return null;
-    }
-
-    /**
-     * Three exposed methods may need to inject new events in the system:
-     * sendMessageN, close, and shutdown.
-     * Since they can all cause actions, and since connectAction and
-     * startAction are deferred, it seems possible that one of the actions
-     * caused by send, close, or shutdown be called while connectAction or
-     * startAction are in progress.
-     * <p/>However, the state machine gives us a few guarantees: connectAction
-     * and startAction can never nest. We will not be asked to perform one while
-     * still performing the other. Only the synchronous actions closeInput,
-     * closeOutput, or failAll can possibly be requested in the interval. We
-     * could make more assumptions and simplify the code, but rather keep at
-     * least some flexibility.
-     * <p/>
-     * DEAD LOCK WARNING: the implementor's method invoke some of our call backs
-     * while synchronized. Then our call backs synchronize on the state machine
-     * in here. This nesting order must always be respected. As a result, we can
-     * never invoke implementors methods while synchronized. Hence the
-     * deferredAction processing.
-     *
-     * @param action the action
-     */
-    private void performDeferredAction(DeferredAction action) {
-        switch (action) {
-        case ACTION_SEND:
-            startImpl();
-            break;
-
-        case ACTION_CONNECT:
-            connectImpl();
-            break;
-        }
-    }
-
-    /**
-     * A shortHand for a frequently used sequence. MUST be called while
-     * synchronized on stateMachine.
-     *
-     * @param notifyAll If {@code true} then this is a life-cycle event and all
-     *                  waiters on the stateMachine should be notified. If {@code false} then
-     *                  only a single waiter will be notified for simple activity events.
-     * @return the deferred action.
-     */
-    private DeferredAction eventCalled(boolean notifyAll) {
-        DeferredAction action = deferredAction;
-
-        deferredAction = DeferredAction.ACTION_NONE;
-        if (notifyAll) {
-            stateMachine.notifyAll();
-        } else {
-            stateMachine.notify();
-        }
-        return action;
-    }
-
-    /*
-     * Implement the methods that our shared messenger will use to report progress.
-     */
-
-    /**
-     * The implementation will invoke this method when it becomes resolved,
-     * after connectImpl was invoked.
-     */
-    protected void up() {
-        DeferredAction action;
-
-        synchronized (stateMachine) {
-            stateMachine.upEvent();
-            action = eventCalled(true);
-        }
-        notifyChange();
-        performDeferredAction(action); // we expect start but let the state machine decide.
-    }
-
-    /**
-     * The implementation invokes this method when it becomes broken.
-     */
-    protected void down() {
-        DeferredAction action;
-
-        synchronized (stateMachine) {
-            stateMachine.downEvent();
-            action = eventCalled(true);
-        }
-        notifyChange();
-        performDeferredAction(action); // we expect connect but let the state machine decide.
-    }
-
-    /**
-     * Here, we behave like a queue to the shared messenger. When we report
-     * being empty, though, we're automatically removed from the active queues
-     * list. We'll go back there the next time we have something to send by
-     * calling startImpl.
-     *
-     * @return pending message
-     */
-    protected PendingMessage peek() {
-
-        PendingMessage theMsg;
-        DeferredAction action = DeferredAction.ACTION_NONE;
-
-        synchronized (stateMachine) {
-            // We like the msg to keep occupying space in the queue until it's
-            // out the door. That way, idleness (that is, not currently working
-            // on a message), is always consistent with queue emptyness.
-
-            theMsg = queue.peek();
-            if (theMsg == null) {
-                stateMachine.idleEvent();
-                action = eventCalled(false);
-
-                // We do not notifyChange, here, because, if the queue is empty,
-                // it was already notified when the last message was popped. The
-                // call to idleEvent is only defensive programming to make extra
-                // sure the state machine is in sync.
-
-                return null;
-            }
-
-            if (outputClosed) {
-                // We've been asked to stop sending. Which, if we were sending,
-                // must be notified by either an idle event or a down
-                // event. Nothing needs to happen to the shared messenger. We're
-                // just a channel.
-                stateMachine.downEvent();
-                action = eventCalled(true);
-                theMsg = null;
-            }
-        }
-
-        notifyChange();
-        performDeferredAction(action); // we expect none but let the state machine decide.
-        return theMsg;
-    }
-
-    /**
-     * Returns the number of elements in this collection.  If this collection
-     * contains more than <tt>Integer.MAX_VALUE</tt> elements, returns
-     * <tt>Integer.MAX_VALUE</tt>.
-     *
-     * @return the number of elements in this collection
-     */
-    protected int size() {
-        return queue.size();
-    }
-    
-    /**
-     * One message done. Update the saturated/etc state accordingly.
-     *
-     * @return true if there are more messages after the one we removed.
-     */
-    protected boolean poll() {
-
-        boolean result;
-        DeferredAction action;
-
-        synchronized (stateMachine) {
-            queue.poll();
-
-            if (queue.peek() == null) {
-                stateMachine.idleEvent();
-                action = eventCalled(false);
-                result = false;
-            } else {
-                stateMachine.msgsEvent();
-                action = eventCalled(false);
-                result = true;
-            }
-        }
-
-        notifyChange();
-        performDeferredAction(action); // we expect none but let the state machine decide.
-
-        return result;
-    }
-
-    /**
-     * We invoke this method to be placed on the list of channels that have
-     * message to send.
-     * <p/>
-     * NOTE that it is the shared messenger responsibility to synchronize so
-     * that we cannot be added to the active list just before we get removed
-     * due to reporting an empty queue in parallel. So, if we report an empty
-     * queue and have a new message to send before the shared messenger removes
-     * us form the active list, startImpl will block until the removal is done.
-     * Then we'll be added back.
-     * <p/>
-     * If it cannot be done, it means that the shared messenger is no longer
-     * usable. It may call down() in sequence. Out of defensiveness, it should
-     * do so without holding its lock.
-     */
-    protected abstract void startImpl();
-
-    /**
-     * We invoke this method to be placed on the list of channels that are
-     * waiting for resolution.
-     * <p/>
-     * If it cannot be done, it means that the shared messenger is no longer
-     * usable. It may call down() in sequence. Out of defensiveness, it should
-     * do so without holding its lock. If the messenger is already resolved it
-     * may call up() in sequence. Same wisdom applies. It is a good idea to
-     * create channels in the resolved state if the shared messenger is already
-     * resolved. That avoids this extra contortion.
-     */
-    protected abstract void connectImpl();
-
-    /**
-     * This is invoked to inform the implementation that this channel is now in
-     * the resolPending or resolSaturated state. This is specific to this type
-     * of channels. The shared messenger must make sure that this channel
-     * remains strongly referenced, even though it is not resolved, because
-     * there are messages in it. It is valid for an application to let go of a
-     * channel after sending a message, even if the channel is not yet
-     * resolved. The message will go if/when the channel resolves. This method
-     * may be invoked redundantly and even once the channel is no longer among
-     * the one awaiting resolution. The implementation must be careful to
-     * ignore such calls.
-     */
-    protected abstract void resolPendingImpl();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/ByteArrayMessageElement.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/ByteArrayMessageElement.java
deleted file mode 100644 (file)
index f2892b7..0000000
+++ /dev/null
@@ -1,383 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.endpoint;
-
-
-import net.jxta.document.MimeMediaType;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.io.*;
-import java.lang.ref.SoftReference;
-import java.util.zip.CRC32;
-import java.util.zip.Checksum;
-
-
-/**
- * A Message Element using byte arrays for the element data.
- *
- * <p/>This implementation does not copy the byte array provided and assumes
- * that the contents of the byte array will not change through out the lifetime
- * of the MessageElement.
- *
- * <p/>some synchronization is due to optimization in {@link #getBytes(boolean)}
- * which replaces value of internal member {@link #b}.
- */
-public class ByteArrayMessageElement extends MessageElement {
-
-    /**
-     * Logger
-     */
-    private static transient final Logger LOG = Logger.getLogger(ByteArrayMessageElement.class.getName());
-
-    /**
-     * The bytes of this element.
-     */
-    protected byte[] b;
-
-    /**
-     * This is the offset of our data within the array
-     */
-    protected int offset;
-
-    /**
-     * length of the element data. sometimes the same as b.length, but may be
-     * lesser.
-     */
-    protected int len;
-
-    /**
-     * Create a new Message Element. The contents of the provided byte array
-     * are <b>not</b> copied during construction.
-     *
-     * @param name Name of the MessageElement. May be the empty string ("") if
-     *             the MessageElement is not named.
-     * @param type Type of the MessageElement. null is the same as specifying
-     *             the type "Application/Octet-stream".
-     * @param b    A byte array containing the contents of this element.
-     * @param sig  optional message digest/digital signature element or null if
-     *             no signature is desired.
-     */
-    public ByteArrayMessageElement(String name, MimeMediaType type, byte[] b, MessageElement sig) {
-        this(name, type, b, 0, b.length, sig);
-    }
-
-    /**
-     * Create a new MessageElement, The contents of the provided byte array are
-     * <b>not</b> copied during construction.
-     *
-     * @param name   Name of the MessageElement. May be the empty string ("") if
-     *               the MessageElement is not named.
-     * @param type   Type of the MessageElement. null is the same as specifying
-     *               the type "Application/Octet-stream".
-     * @param b      A byte array containing the contents of this element.
-     * @param offset all bytes before this location in <code>b</code>
-     *               will be ignored.
-     * @param sig    optional message digest/digital signature elemnent or null if
-     *               no signature is desired.
-     */
-    public ByteArrayMessageElement(String name, MimeMediaType type, byte[] b, int offset, MessageElement sig) {
-        this(name, type, b, offset, b.length - offset, sig);
-    }
-
-    /**
-     * Create a new Element, but dont add it to the message.  The contents of
-     * the byte array are <b>not</b> copied during construction.
-     *
-     * @param name   Name of the MessageElement. May be the empty string ("") if
-     *               the MessageElement is not named.
-     * @param type   Type of the MessageElement. null is the same as specifying
-     *               the type "Application/Octet-stream".
-     * @param b      A byte array containing the contents of this Element.
-     * @param offset all bytes before this location will be ignored.
-     * @param len    number of bytes to include
-     * @param sig    optional message digest/digital signature element or null if
-     *               no signature is desired.
-     */
-    public ByteArrayMessageElement(String name, MimeMediaType type, byte[] b, int offset, int len, MessageElement sig) {
-        super(name, type, sig);
-
-        if (null == b) {
-            throw new IllegalArgumentException("byte array must not be null");
-        }
-
-        if (len < 0) {
-            throw new IllegalArgumentException("len must be >= 0 : " + len);
-        }
-
-        if (offset < 0) {
-            throw new IllegalArgumentException("offset must within byte array : " + offset);
-        }
-
-        if ((0 != len) && (offset >= b.length)) {
-            throw new IllegalArgumentException("offset must be positioned within byte array : " + offset + "," + len);
-        }
-
-        if (((offset + len) > b.length) || ((offset + len) < 0)) {
-            throw new IllegalArgumentException("offset + len must be positioned within byte array");
-        }
-
-        // if we get an empty request and a non-empty buffer, we don't use the provided buffer.
-        if ((0 == len) && (0 != b.length)) {
-            b = new byte[len];
-            offset = 0;
-        }
-
-        this.b = b;
-        this.offset = offset;
-        this.len = len;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        }
-
-        if (target instanceof MessageElement) {
-            if (!super.equals(target)) {
-                return false;
-            }
-
-            if (target instanceof ByteArrayMessageElement) {
-                ByteArrayMessageElement likeMe = (ByteArrayMessageElement) target;
-
-                synchronized (this) {
-                    synchronized (likeMe) {
-                        if (likeMe.len != len) {
-                            return false;
-                        }
-
-                        for (int eachByte = len - 1; eachByte >= 0; eachByte--) {
-                            if (likeMe.b[likeMe.offset + eachByte] != b[offset + eachByte]) {
-                                return false;
-                            }
-                        }
-                    }
-                }
-
-                return true;
-            } else {
-                // have to do a slow stream comparison.
-                // XXX 20020615 bondolo@jxta.org the performance of this could be much improved.
-                try {
-                    MessageElement likeMe = (MessageElement) target;
-
-                    InputStream myStream = getStream();
-                    InputStream itsStream = likeMe.getStream();
-
-                    int mine;
-                    int its;
-
-                    do {
-                        mine = myStream.read();
-                        its = itsStream.read();
-
-                        if (mine != its) {
-                            return false;
-                        }       // content didn't match
-
-                    } while ((-1 != mine) && (-1 != its));
-
-                    return ((-1 == mine) && (-1 == its)); // end at the same time?
-                } catch (IOException fatal) {
-                    if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                        LOG.log(Level.SEVERE, "MessageElements could not be compared.", fatal);
-                    }
-
-                    throw new IllegalStateException("MessageElements could not be compared." + fatal);
-                }
-            }
-        }
-
-        return false; // not a message element
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized int hashCode() {
-        Checksum crc = new CRC32();
-
-        crc.update(b, offset, len);
-        int dataHash = (int) crc.getValue();
-
-        int result = super.hashCode() * 6037 + // a prime
-                dataHash;
-
-        return (0 != result) ? result : 1;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Returns the string representation of this element. The 'charset'
-     * parameter of the mimetype, if any, is used to determine encoding. If
-     * the charset specified is unsupported then the default encoding will be
-     * used.
-     *
-     * @return String string representation of this message element.
-     */
-    @Override
-    public synchronized String toString() {
-        String result;
-
-        if (null != cachedToString) {
-            result = cachedToString.get();
-
-            if (null != result) {
-                return result;
-            }
-        }
-
-        if (LOG.isLoggable(Level.FINER)) {
-            LOG.finer("creating toString of " + getClass().getName() + '@' + Integer.toHexString(hashCode()));
-        }
-
-        String charset = type.getParameter("charset");
-
-        try {
-            if (null == charset) {
-                result = new String(b, offset, len);
-            } else {
-                result = new String(b, offset, len, charset);
-            }
-        } catch (UnsupportedEncodingException caught) {
-            result = new String(b, offset, len);
-        }
-
-        cachedToString = new SoftReference<String>(result);
-
-        return result;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public long getByteLength() {
-        return len;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * <p/>synchronized so that we can replace our internal buffer with
-     * the buffer we are returning if we were using a shared buffer.
-     */
-    @Override
-    public synchronized byte[] getBytes(boolean copy) {
-        if ((!copy) && (0 == offset) && (b.length == len)) {
-            return b;
-        }
-
-        byte[] result = new byte[len];
-
-        System.arraycopy(b, offset, result, 0, len);
-
-        // if we were using a sub-array we can switch to using this copy.
-        if (!copy) {
-            b = result;
-            offset = 0;
-        }
-
-        return result;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized InputStream getStream() {
-        return new ByteArrayInputStream(b, offset, len);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void sendToStream(OutputStream sendTo) throws IOException {
-        byte[] sending;
-        int sendingOffset;
-
-        // locals enable us to reduce the time which the object is synchronized.
-        synchronized (this) {
-            sending = b;
-            sendingOffset = offset;
-        }
-
-        sendTo.write(sending, sendingOffset, len);
-    }
-
-    /**
-     * Returns the contents of this element as a byte array. If this elements
-     * was originally constructed from a intact byte array, the array returned
-     * is a "shared" copy of the byte array used by this element. If this
-     * element was constructed with an offset of other than zero and a length
-     * different than the length of the source array then this function <b>WILL
-     * RETURN A COPY OF THE BYTE ARRAY</b>.
-     *
-     * @return a byte array containing the contents of this element.
-     */
-    public byte[] getBytes() {
-        return getBytes(false);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/ChannelMessenger.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/ChannelMessenger.java
deleted file mode 100644 (file)
index 38beb66..0000000
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * Copyright (c) 2004-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.endpoint;
-
-
-import net.jxta.peergroup.PeerGroupID;
-
-
-/**
- * A Channel Messenger provides an exclusive interface to the shared messenger.
- * <p/>
- * What is typically exclusive is the message queue, addressing parameters
- * that are not usefully shared (serviceName, serviceParam), and if needed
- * cross-group address rewriting parameters.
- * <p/>
- * This class is provided as a base for implementing such channel messengers,
- * which are typically what Messenger.getChannelMessenger() needs to return.
- *
- * @see net.jxta.endpoint.EndpointService
- * @see net.jxta.endpoint.EndpointAddress
- * @see net.jxta.endpoint.Message
- */
-public abstract class ChannelMessenger extends AbstractMessenger implements Messenger {
-
-    /**
-     * insertedServicePrefix This is how all valid inserted services start. This
-     * lets us recognize if a message already has an inserted service. Then we
-     * must not add another one. Only the top-most one counts.  Since insertion
-     * is only done here, the constant is defined here. Even if historically it
-     * was done within the endpoint implementation, it has become a protocol now.
-     */
-    public static final String InsertedServicePrefix = "EndpointService:";
-
-    private String insertedService;
-
-    /**
-     * The worker that implements sendMessage-with-listener for this channel. If
-     * there's none, sendMessage-with-listener will throw an exception. Channels
-     * returned by getMessenger methods all have one already. It is up to the
-     * invoker of getChannelMessenger to supply one or not.
-     */
-    private ListenerAdaptor messageWatcher;
-
-    protected String origService;
-
-    protected String origServiceParam;
-
-    /**
-     * Figure out what the service string will be after mangling (if required)
-     * and applying relevant defaults.
-     *
-     * @param service The service name in the unmangled address.
-     * @return String The service name in the mangled address.
-     */
-    protected String effectiveService(String service) {
-
-        // No redirection required. Just apply the default service.
-        if (insertedService == null) {
-            return (service == null) ? origService : service;
-        }
-
-        // Check if redirection is applicable.
-        return ((service != null) && service.startsWith(InsertedServicePrefix)) ? service : insertedService;
-    }
-
-    /**
-     * Figure out what the param string will be after mangling (if required) and
-     * applying relevant defaults.
-     *
-     * @param service      The service name in the unmangled address.
-     * @param serviceParam The service parameter in the unmangled address.
-     * @return String The service parameter in the mangled address.
-     */
-    protected String effectiveParam(String service, String serviceParam) {
-
-        // No redirection required. Or not applicable. Just apply the default param.
-        if ((insertedService == null) || ((service != null) && service.startsWith(InsertedServicePrefix))) {
-            return (serviceParam == null) ? origServiceParam : serviceParam;
-        }
-
-        // Apply redirection. We need the effective service, now.
-        if (service == null) {
-            service = origService;
-        }
-
-        if (serviceParam == null) {
-            serviceParam = origServiceParam;
-        }
-
-        return ((null != service) && (null != serviceParam)) ? (service + "/" + serviceParam) : service;
-    }
-
-    /**
-     * Give this channel the watcher that it must use whenever sendMessage(...,listener) is used. If not set,
-     * sendMessage(..., listener) will throw.
-     *
-     * @param messageWatcher the listener
-     */
-    public void setMessageWatcher(ListenerAdaptor messageWatcher) {
-        this.messageWatcher = messageWatcher;
-    }
-
-    /**
-     * Create a new ChannelMessenger
-     *
-     * @param baseAddress      The network address messages go to; regardless of service, param, or group.
-     * @param groupRedirection Group to which the messages must be redirected. This is used to implement the automatic group
-     *                         segregation which has become a de-facto standard. If not null, the unique portion of the specified groupID is
-     *                         prepended with {@link #InsertedServicePrefix} and inserted in every message's destination address in place of the
-     *                         the original service name, which gets shifted into the beginning of the service parameter. The opposite is done
-     *                         on arrival to restore the original destination address before the message is delivered to the listener in the
-     *                         the specified group. Messages that already bear a group redirection are not affected.
-     * @param origService      The default destination service for messages sent without specifying a different service.
-     * @param origServiceParam The default destination service parameter for messages sent without specifying a different service
-     *                         parameter.
-     */
-    public ChannelMessenger(EndpointAddress baseAddress, PeerGroupID groupRedirection, String origService, String origServiceParam) {
-
-        // FIXME: The inserted service business is really messy. Group seggregation does not have to be the endpoint service's
-        // business. It should be specified by the app as part of the destination address. What we're doing here
-        // is simply enforcing what could just be a convention.
-
-        super(baseAddress);
-        if (groupRedirection == null) {
-            insertedService = null;
-        } else {
-            insertedService = InsertedServicePrefix + groupRedirection.getUniqueValue().toString();
-        }
-        this.origService = origService;
-        this.origServiceParam = origServiceParam;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * By default a channel refuses to make a channel.
-     */
-    public Messenger getChannelMessenger(PeerGroupID redirection, String service, String serviceParam) {
-        return null;
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     */
-    @Override
-    public void sendMessage(Message msg, String service, String serviceParam, OutgoingMessageEventListener listener) {
-        if (messageWatcher == null) {
-            throw new UnsupportedOperationException("This channel was not configured to emulate this legacy method.");
-        }
-
-        // Cleanup the message from any existing result prop since we're going to use select.
-        msg.setMessageProperty(Messenger.class, null);
-
-        // Tell the watcher to select that message.
-        messageWatcher.watchMessage(listener, msg);
-
-        sendMessageN(msg, service, serviceParam);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/EndpointAddress.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/EndpointAddress.java
deleted file mode 100644 (file)
index e804f57..0000000
+++ /dev/null
@@ -1,637 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.endpoint;
-
-import net.jxta.id.ID;
-import net.jxta.logging.Logging;
-
-import java.lang.ref.SoftReference;
-import java.net.URI;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Describes a destination to which JXTA messages may be sent. This may be:
- * <p/>
- *
- *  <ul>
- *      <li>A Pipe</li>
- *      <li>A Peergroup (propagate)</li>
- *      <li>A Peer</li>
- *      <li>A Message Transport for a Peer</li>
- *  </ul>
- *<p/>
- *  An Endpoint Address is a specialized interpretation of a URI.
- *  Wherever it makes sense you should use a URI in preference to an Endpoint
- *  Address. An Endpoint Address is composed of four components: a protocol
- *  (also called a scheme), a protocol address (also called an authority), an
- *  optional service name and optional service parameter.
- *<p/>
- *  <b>The Protocol</b><ul>
- *      <li>Describes the method of addressing used by the remainder of the
- *      endpoint address.</li>
- *      <li>Indicates how the address will be resolved, ie. who will resolve it.</li>
- *      <li>Corresponds to the "scheme" portion of a URI in W3C parlance.
- *      <li><b>May not</b> contain the ":" character.
- *  </ul>
- *<p/>
- *  <b>The Protocol Address</b><ul>
- *      <li>Describes the destination entity of this address.</li>
- *      <li>Form is dependant upon the protocol being used.</li>
- *      <li>Corresponds to the "Authority" portion of a URI in W3C parlance.
- *      <li><b>May not</b> contain the "/" character.
- *  </ul>
- *<p/>
- *  <b>The Service Name</b> (optional)<ul>
- *      <li>Describes the service that is the destination. A service cannot be
- *      a protocol address because a service must have a location; a group or a
- *      specific peer.</li>
- *      <li>Form is dependant upon service intent. This is matched as a UTF8
- *      string.</li>
- *      <li><b>May not</b> contain the "/" character.
- *  </ul>
- *
- *  <p/><b>The Service Parameter</b> (optional)<ul>
- *      <li>Describes parameters for the service.</li>
- *      <li>Form is dependant upon service intent. This is matched as a UTF-8
- *      string (if it is used for matching).</li>
- *  </ul>
- *
- * @see net.jxta.endpoint.EndpointService
- * @see net.jxta.endpoint.MessageTransport
- * @see net.jxta.endpoint.Messenger
- * @see net.jxta.pipe.PipeService
- */
-public class EndpointAddress {
-
-    /**
-     * Logger
-     */
-    private static final Logger LOG = Logger.getLogger(EndpointAddress.class.getName());
-
-    /**
-     * If {@code true} then endpoint addresses based upon IDs are represented
-     * using the "jxta://" form. If false then they are presented using the
-     * "urn:jxta:" form. The two forms are meant to be logically equivalent.
-     */
-    private final static boolean IDS_USE_JXTA_URL_FORM = true;
-
-    /**
-     * The default protocol value for Endpoint Addresses based upon JXTA IDs.
-     */
-    private final static String JXTA_ID_PROTOCOL = ID.URIEncodingName + ":" + ID.URNNamespace;
-
-    /**
-     * if true then the address is a url, otherwise its a uri (likely a urn).
-     */
-    private boolean hierarchical = true;
-
-    /**
-     * Describes the method of addressing used by the remainder of the
-     * endpoint address.
-     */
-    private String protocol = null;
-
-    /**
-     * Describes the destination entity of this address.
-     */
-    private String protocolAddress = null;
-
-    /**
-     * Describes the service that is the destination.
-     */
-    private String service = null;
-
-    /**
-     * Describes parameters for the service.
-     */
-    private String serviceParam = null;
-
-    /**
-     * cached calculated hash code.
-     */
-    private transient int cachedHashCode = 0;
-
-    /**
-     * cached copy of string representation.
-     */
-    private transient SoftReference<String> cachedToString = null;
-
-    /**
-     * Returns an unmodifiable clone of the provided EndpointAddress.
-     *
-     * @param address the address to be cloned.
-     * @return the unmodifiable address clone.
-     * @deprecated All EndpointAddresses are now unmodifiable so this method is
-     *             no longer needed.
-     */
-    @Deprecated
-    public static EndpointAddress unmodifiableEndpointAddress(EndpointAddress address) {
-        return address;
-    }
-
-    /**
-     * Builds an Address from a string
-     *
-     * @param address the string representation of the address.
-     */
-    public EndpointAddress(String address) {
-        parseURI(address);
-    }
-
-    /**
-     * Create an EndpointAddress whose value is initialized from the provided
-     * URI.
-     *
-     * @param address the URI representation of the address.
-     */
-    public EndpointAddress(URI address) {
-        this(address.toString());
-    }
-
-    /**
-     * Constructor which builds an endpoint address from a base address and
-     * replacement service and params
-     *
-     * @param base         The EndpointAddress on which the new EndpointAddress will be based
-     * @param service      The service name for the endpoint address or
-     *                     {@code null} if there is no service name.
-     * @param serviceParam The service parameter for the endpoint address or
-     *                     {@code null} if there is no parameter.
-     */
-    public EndpointAddress(EndpointAddress base, String service, String serviceParam) {
-        setProtocolName(base.getProtocolName());
-        setProtocolAddress(base.getProtocolAddress());
-        setServiceName(service);
-        setServiceParameter(serviceParam);
-    }
-
-    /**
-     * Constructor which builds an address the four standard constituent parts.
-     *
-     * @param protocol     The addressing scheme to be used for the endpoint address.
-     * @param address      The destination for the endpoint address.
-     * @param service      The service name for the endpoint address or
-     *                     {@code null} if there is no service name.
-     * @param serviceParam The service parameter for the endpoint address or
-     *                     {@code null} if there is no parameter.
-     */
-    public EndpointAddress(String protocol, String address, String service, String serviceParam) {
-        setProtocolName(protocol);
-        setProtocolAddress(address);
-        setServiceName(service);
-        setServiceParameter(serviceParam);
-    }
-
-    /**
-     * Constructor which builds an address from a standard jxta id and a
-     * service and param.
-     *
-     * @param id           the ID which will be the destination of the endpoint address.
-     * @param service      The service name for the endpoint address or
-     *                     {@code null} if there is no service name.
-     * @param serviceParam The service parameter for the endpoint address or
-     *                     {@code null} if there is no parameter.
-     */
-    public EndpointAddress(ID id, String service, String serviceParam) {
-        setProtocolName(JXTA_ID_PROTOCOL);
-        setProtocolAddress(id.getUniqueValue().toString());
-        setServiceName(service);
-        setServiceParameter(serviceParam);
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * @deprecated EndpointAddress objects are immutable and never need to be
-     *             cloned.
-     */
-    @Override
-    @Deprecated
-    public EndpointAddress clone() {
-        return this;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        }
-
-        if (target instanceof EndpointAddress) {
-            EndpointAddress likeMe = (EndpointAddress) target;
-
-            boolean result = (hierarchical == likeMe.hierarchical) && protocol.equalsIgnoreCase(likeMe.protocol)
-                    && protocolAddress.equalsIgnoreCase(likeMe.protocolAddress)
-                    && ((service != null)
-                    ? ((likeMe.service != null) && service.equals(likeMe.service))
-                    : (likeMe.service == null))
-                    && ((serviceParam != null)
-                    ? ((likeMe.serviceParam != null) && serviceParam.equals(likeMe.serviceParam))
-                    : (likeMe.serviceParam == null));
-
-            return result;
-        }
-
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        if (0 == cachedHashCode) {
-            int calcedHashCode = protocol.toLowerCase().hashCode();
-
-            calcedHashCode += protocolAddress.hashCode() * 5741; // a prime
-            calcedHashCode += ((service != null) ? service.hashCode() : 1) * 7177; // a prime
-            calcedHashCode += ((serviceParam != null) ? serviceParam.hashCode() : 1) * 6733; // a prime
-
-            cachedHashCode = (0 == calcedHashCode) ? 1 : calcedHashCode;
-        }
-
-        return cachedHashCode;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized String toString() {
-        String result;
-
-        if (null != cachedToString) {
-            result = cachedToString.get();
-
-            if (null != result) {
-                return result;
-            }
-        }
-
-        StringBuilder newResult = new StringBuilder(protocol.length() + protocolAddress.length() + 64);
-
-        newResult.append(protocol);
-
-        if (hierarchical) {
-            newResult.append("://");
-        } else {
-            newResult.append(':');
-        }
-
-        newResult.append(protocolAddress);
-
-        if (null != service) {
-            if (hierarchical) {
-                newResult.append('/');
-            } else {
-                newResult.append('#');
-            }
-            newResult.append(service);
-
-            if (null != serviceParam) {
-                newResult.append('/');
-                newResult.append(serviceParam);
-            }
-        }
-
-        result = newResult.toString();
-
-        cachedToString = new SoftReference<String>(result);
-
-        return result;
-    }
-
-    /**
-     * Return a URI which represents the endpoint address.
-     *
-     * @return a URI which represents the endpoint address.
-     */
-    public URI toURI() {
-        return URI.create(toString());
-    }
-
-    /**
-     * Return a String that contains the name of the protocol
-     * contained in the EndpointAddress
-     *
-     * @return a String containing the protocol name
-     */
-    public String getProtocolName() {
-        return protocol;
-    }
-
-    /**
-     * Return a String that contains the protocol address contained
-     * in the EndpointAddress
-     *
-     * @return a String containing the protocol address
-     */
-    public String getProtocolAddress() {
-        return protocolAddress;
-    }
-
-    /**
-     * Return a String that contains the service name contained in
-     * the EndpointAddress
-     *
-     * @return a String containing the service name
-     */
-    public String getServiceName() {
-        return service;
-    }
-
-    /**
-     * Return a String that contains the service parameter contained
-     * in the EndpointAddress
-     *
-     * @return a String containing the protocol name
-     */
-    public String getServiceParameter() {
-        return serviceParam;
-    }
-
-    /**
-     * Set the protocol name.
-     *
-     * @param name String containing the name of the protocol
-     */
-    private void setProtocolName(String name) {
-        if ((null == name) || (0 == name.length())) {
-            throw new IllegalArgumentException("name must be non-null and contain at least one character");
-        }
-
-        if (-1 != name.indexOf("/")) {
-            throw new IllegalArgumentException("name may not contain '/' character");
-        }
-
-        // XXX 20070207 bondolo We explicitly force all use of either "jxta" or "urn:jxta" to our prefered form.
-        if (IDS_USE_JXTA_URL_FORM) {
-            if (JXTA_ID_PROTOCOL.equals(name)) {
-                name = "jxta";
-            }
-        } else {
-            if ("jxta".equals(name)) {
-                name = JXTA_ID_PROTOCOL;
-            }
-        }
-
-        int colonAt = name.indexOf(':');
-
-        if (-1 == colonAt) {
-            hierarchical = true;
-        } else {
-            if (!"urn".equalsIgnoreCase(name.substring(0, colonAt))) {
-                throw new IllegalArgumentException("Only urn may contain colon");
-            }
-
-            if (colonAt == (name.length() - 1)) {
-                throw new IllegalArgumentException("empty urn namespace!");
-            }
-
-            hierarchical = false;
-        }
-
-        protocol = name;
-        cachedToString = null;
-    }
-
-    /**
-     * Set the protocol address.
-     *
-     * @param address String containing the peer address.
-     */
-    private void setProtocolAddress(String address) {
-        if ((null == address) || (0 == address.length())) {
-            throw new IllegalArgumentException("address must be non-null and contain at least one character");
-        }
-
-        if (-1 != address.indexOf("/")) {
-            throw new IllegalArgumentException("address may not contain '/' character");
-        }
-
-        protocolAddress = address;
-        cachedToString = null;
-    }
-
-    /**
-     * Set the service name.
-     *
-     * @param name String containing the name of the destination service
-     */
-    private void setServiceName(String name) {
-        if (null != name) {
-            if (-1 != name.indexOf("/")) {
-                throw new IllegalArgumentException("service name may not contain '/' character");
-            }
-        }
-
-        service = name;
-        cachedToString = null;
-    }
-
-    /**
-     * Set the service parameter
-     *
-     * @param param String containing the service parameter
-     */
-    private void setServiceParameter(String param) {
-        serviceParam = param;
-        cachedToString = null;
-    }
-
-    /**
-     * Parse any EndpointAddress from a URI
-     *
-     * @param addr endpoint address to parse
-     */
-    private void parseURI(String addr) {
-        int index = addr.indexOf("://");
-
-        if (index == -1) {
-            parseURN(addr);
-        } else {
-            parseURL(addr);
-        }
-    }
-
-    /**
-     * Parse an EndpointAddress from a URN
-     *
-     * @param addr endpoint address to parse
-     */
-    private void parseURN(String addr) {
-        int protocolEnd = addr.indexOf(':');
-
-        if (-1 == protocolEnd) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Address is not a valid URI: " + addr);
-            }
-            throw new IllegalArgumentException("Address is not a valid URI: " + addr);
-        }
-
-        if (!"urn".equalsIgnoreCase(addr.substring(0, protocolEnd))) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Address is unrecognized URI form: " + addr);
-            }
-            throw new IllegalArgumentException("Address is unrecognized URI form: " + addr);
-        }
-
-        if ((addr.length() - 1) == protocolEnd) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Address URN does not have a namespace: " + addr);
-            }
-            throw new IllegalArgumentException("Address URN does not have a namespace: " + addr);
-        }
-
-        // gather the namespace as well.
-        int namespaceEnd = addr.indexOf(':', protocolEnd + 1);
-
-        if (-1 == namespaceEnd) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Address URN does not have a namespace: " + addr);
-            }
-            throw new IllegalArgumentException("Address URN does not have a namespace: " + addr);
-        }
-
-        setProtocolName(addr.substring(0, namespaceEnd));
-
-        if ((addr.length() - 1) == namespaceEnd) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Address URN does not have a NSS portion: " + addr);
-            }
-            throw new IllegalArgumentException("Address URN does not have a NSS portion: " + addr);
-        }
-
-        // check for service and param
-        int nssEnd = addr.indexOf('#', namespaceEnd + 1);
-
-        if (-1 == nssEnd) {
-            setProtocolAddress(addr.substring(namespaceEnd + 1));
-        } else {
-            setProtocolAddress(addr.substring(namespaceEnd + 1, nssEnd));
-
-            int serviceEnd = addr.indexOf('/', nssEnd + 1);
-
-            if (-1 == serviceEnd) {
-                setServiceName(addr.substring(nssEnd + 1));
-            } else {
-                setServiceName(addr.substring(nssEnd + 1, serviceEnd));
-
-                setServiceParameter(addr.substring(serviceEnd + 1));
-            }
-        }
-    }
-
-    /**
-     * Parse and EndpointAddress from a URL
-     *
-     * @param addr endpoint address to parse
-     */
-    private void parseURL(String addr) {
-        String remainder;
-
-        int index = addr.indexOf("://");
-
-        if (index == -1) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Address is not in absolute form: " + addr);
-            }
-            throw new IllegalArgumentException("Address is not in absolute form: " + addr);
-        }
-
-        if (0 == index) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Protocol is missing: " + addr);
-            }
-            throw new IllegalArgumentException("Protocol is missing: " + addr);
-        }
-
-        try {
-            setProtocolName(addr.substring(0, index));
-            remainder = addr.substring(index + 3);
-        } catch (Exception e) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Protocol address is missing: " + addr);
-            }
-            throw new IllegalArgumentException("Protocol address is missing: " + addr);
-        }
-        index = remainder.indexOf("/");
-        if (index == -1) {
-            setProtocolAddress(remainder);
-            return;
-        }
-
-        setProtocolAddress(remainder.substring(0, index));
-
-        remainder = remainder.substring(index + 1);
-
-        index = remainder.indexOf("/");
-        if (index == -1) {
-            setServiceName(remainder);
-            return;
-        }
-
-        setServiceName(remainder.substring(0, index));
-
-        remainder = remainder.substring(index + 1);
-
-        setServiceParameter(remainder);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/EndpointListener.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/EndpointListener.java
deleted file mode 100644 (file)
index a61d3cc..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.endpoint;
-
-
-/**
- * A listener for messages. The listener is invoked for each incoming message
- * which is destined for this listener. Various services register
- *
- * @see net.jxta.endpoint.EndpointService
- * @see net.jxta.endpoint.EndpointAddress
- * @see net.jxta.endpoint.Message
- */
-public interface EndpointListener {
-    
-    /**
-     * This method is invoked by the EndpointService for each incoming message
-     * which is addressed to this listener.
-     *
-     * @param message Incoming message
-     * @param srcAddr Endpoint Address of the source of the message.
-     * @param dstAddr Endpoint Address of the destination of the message.
-     */
-    public void processIncomingMessage(Message message, EndpointAddress srcAddr, EndpointAddress dstAddr);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/EndpointService.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/EndpointService.java
deleted file mode 100644 (file)
index 27a8bf3..0000000
+++ /dev/null
@@ -1,552 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.endpoint;
-
-
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.service.Service;
-
-import java.io.IOException;
-import java.util.Iterator;
-
-
-/**
- * The EndpointService provides the API for sending and receiving messages
- * between peers. In general, applications and services use the
- * {@link net.jxta.pipe.PipeService}, or {@link net.jxta.socket.JxtaSocket}
- * rather than using this API directly.
- */
-public interface EndpointService extends Service, EndpointListener {
-
-    /**
-     * Low Priority Messenger Event Listener.
-     */
-    public static final int LowPrecedence = 0;
-
-    /**
-     * Medium Priority Messenger Event Listener.
-     */
-    public static final int MediumPrecedence = 1;
-
-    /**
-     * High Priority Messenger Event Listener.
-     */
-    public static final int HighPrecedence = 2;
-
-    /**
-     * Returns the group to which this EndpointService is attached.
-     *
-     * @return the group.
-     */
-    public PeerGroup getGroup();
-
-    /**
-     * Returns a messenger to the specified destination.
-     * <p/>
-     * The canonical messenger is shared between all channels who's
-     * destination contain the same protocol name and protocol address, in all
-     * groups that have access to the same transport. The ChannelMessenger
-     * returned is configured to send messages to the specified service name and
-     * service param when these are not specified at the time of sending.
-     * <p/>
-     * The channel will also ensure delivery to this EndpointService's group
-     * on arrival. The channel is not shared with any other module. That is,
-     * each endpoint service interface object (as returned by {@link
-     * net.jxta.peergroup.PeerGroup#getEndpointService()}) will return a
-     * different channel messenger for the same destination. However, there is
-     * no guarantee that two invocations of the same endpoint service interface
-     * object for the same destination will return different channel objects.
-     * Notably, if the result of a previous invocation is still strongly
-     * referenced and in a {@link Messenger#USABLE} state, then that is what
-     * this method will return.
-     * <p/>
-     * This method returns immediately. The messenger is not necessarily
-     * resolved (the required underlying connection established, for example),
-     * and it might never resolve at all.  Changes in the state of a messenger
-     * may monitored with {@link Messenger#getState} and
-     * {@link Messenger#waitState}. One may monitor multiple
-     * {@link Messenger messengers} (and {@link Message Messages}) at a time by
-     * using a {@link net.jxta.util.SimpleSelector}.  One may also arrange to
-     * have a listener invoked when resolution is complete by using
-     * {@link ListenerAdaptor}.
-     * <p/>
-     * The {@code hint} is interpreted by the transport. The only transport
-     * known to consider hints is the endpoint router, and the hint is a route.
-     * As a result, if addr is in the form: jxta://uniqueID, then hint may be a
-     * RouteAdvertisement.  If that route is valid the router will add it to
-     * it's cache of route and may then use it to successfully create a messenger
-     * to the given destination.  There is no guarantee at this time that the
-     * route will end up being the one specified, nor that this route will be
-     * used only for this messenger (likely the opposite), nor that it will
-     * remain in use in the future, nor that it will be used at all. However, if
-     * there is no other route, and if the specified route is valid, it will be
-     * used rather than seeking an alternative.
-     *
-     * @param addr The complete destination address.
-     * @param hint A optional hint to be supplied to whichever transport ends-up
-     *             making the real messenger. May be {@code null}, when no hint applies.
-     * @return A messenger for the specified destination address or {@code null}
-     *         if the address is not handled by any of the available Message Transports.
-     *         The messenger, if returned, is not necessarily functional, nor resolved.
-     * @see net.jxta.endpoint.ChannelMessenger
-     */
-    public Messenger getMessengerImmediate(EndpointAddress addr, Object hint);
-
-    /**
-     * Returns a messenger for the specified destination address.
-     * <p/>
-     * Behaves like {@link #getMessengerImmediate(EndpointAddress,Object)},
-     * except that the invoker is blocked until the Messenger either resolves or
-     * it is determined that no usable messenger can be created.
-     *
-     * @param addr The destination address.
-     * @param hint A optional hint to be supplied to whichever transport ends-up
-     *             making the real messenger. May be {@code null}, when no hint applies.
-     * @return A messenger for the specified destination address or {@code null}
-     *         if the destination address is not reachable.
-     */
-    public Messenger getMessenger(EndpointAddress addr, Object hint);
-
-    /**
-     * Creates and maps a canonical messenger to the specified destination.
-     * <p/>
-     * Behaves like {@link #getMessengerImmediate(EndpointAddress,Object)}
-     * except that it returns a canonical messenger.
-     * <p/>
-     * The messenger is said to be canonical, because there is only one such
-     * <em>live</em> object for any given destination address. The term "live",
-     * here means that the messenger is not in any of the
-     * {@link Messenger#TERMINAL} states as defined by {@link MessengerState}.
-     * Therefore, for a given destination there may be any number of messengers
-     * in a {@link Messenger#TERMINAL} state, but at most one in any other state.
-     * As long as such an object exists, all calls to
-     * {@code getCanonicalMessenger()} for the same address return this very
-     * object.
-     * <p/>
-     * When first created, a canonical messenger is usually in the
-     * {@link Messenger#UNRESOLVED} state. It becomes resolved by obtaining an
-     * actual transport messenger to the destination upon the first attempt at
-     * using it or when first forced to attempt resolution. Should resolution
-     * fail at that point, it becomes {@link Messenger#UNRESOLVABLE}. Otherwise,
-     * subsequent, failures are repaired automatically by obtaining a new
-     * transport messenger when needed. If a failure cannot be repaired, the
-     * messenger becomes {@link Messenger#BROKEN}.
-     * <p/>
-     * {@code getCanonicalMessenger()} is a recursive function.
-     * Exploration of the parent endpoint is done automatically.
-     * <p/>
-     * <b>Note 1:</b> This method is the most fundamental messenger
-     * instantiation method. It creates a different messenger for each variant
-     * of destination address passed to the constructor. In general invokers
-     * should use plain addresses; stripped of any service-specific destination.
-     * <p/>
-     * <b>Note 2:</b> The messengers that this method returns, are not
-     * generally meant to be used directly. They provide a single queue for all
-     * invokers, and do not perform group redirection and only support only a
-     * subset of the {@code sendMessage()} methods.  One must get a properly
-     * configured channel in order to send messages.
-     * <p/>
-     * If one of the other {@code getMessenger()} methods fits the
-     * application needs, it should be preferred.
-     *
-     * @param addr The destination address. It is recommended, though not
-     *             mandatory, that the address be stripped of its service name and service
-     *             param elements.
-     * @param hint An object, of a type specific to the protocol of the address,
-     *             that may be provide additional information to the transport in
-     *             establishing the connection. Typically but not necessarily, this is a
-     *             route advertisement. If the transport cannot use the hint, or if it is
-     *             {@code null}, it will be ignored.
-     * @return A Canonical messenger that obtains transport messengers to the
-     *         specified address, from LOCAL transports. Returns {@code null} if no
-     *         local transport handles this type address.
-     */
-    public Messenger getCanonicalMessenger(EndpointAddress addr, Object hint);
-
-    /**
-     * Removes the specified listener.
-     *
-     * @param listener The listener that would have been called.
-     * @param priority Priority set from which to remove this listener.
-     * @return true if the listener was removed, otherwise false.
-     */
-    public boolean removeMessengerEventListener(MessengerEventListener listener, int priority);
-
-    /**
-     * Adds the specified listener for all messenger creation.
-     *
-     * @param listener The listener that will be called.
-     * @param priority Order of precedence requested (from 0 to 2). 2 has the
-     * highest precedence. Listeners are called in decreasing order of 
-     * precedence. Listeners with equal precedence are called in an unspecified
-     * order. There cannot be more than one listener object for a given 
-     * precedence. Redundant calls have no effect.
-     * @return true if the listener was added, otherwise false.
-     */
-    public boolean addMessengerEventListener(MessengerEventListener listener, int priority);
-
-    /**
-     * Propagates (broadcasts) a message via all available Message Transports.
-     * Each Message Transport that implements propagation will send the message
-     * using it's broadcast functionality to a configured broadcast address. Any
-     * peers in the same network scope listening on that broadcast address will
-     * receive the propagated message.
-     * <p/>
-     * The message will be sent using the default TTL value (which is 
-     * unspecified).
-     * 
-     * @param message The message to be propagated. The message will not be
-     * modified by this method.
-     * @param serviceName  The name of the destination service.
-     * @param serviceParam An optional parameter for the destination service or
-     * {@code null}.
-     * @throws IOException Thrown if the message could not be propagated.
-     */
-    public void propagate(Message message, String serviceName, String serviceParam) throws IOException;
-
-    /**
-     * Propagates (broadcasts) a message via all available Message Transports.
-     * Each Message Transport that implements propagation will send the message
-     * using it's broadcast functionality to a configured broadcast address. Any
-     * peers in the same network scope listening on that broadcast address will
-     * receive the propagated message.
-     * 
-     * @param message The message to be propagated. The message will not be
-     * modified by this method.
-     * @param serviceName  The name of the destination service.
-     * @param serviceParam An optional parameter for the destination service or
-     * {@code null}.
-     * @param initialTTL The requested initial TTL for this message. The actual
-     * TTL value used may be lower than this value but will never be higher.
-     */
-    public void propagate(Message message, String serviceName, String serviceParam, int initialTTL);
-
-    /**
-     * Verifies that the given address can be reached. The method, and accuracy
-     * of the verification depends upon each Message Transport. In some cases
-     * the address may be contacted to determine connectivity but this is not
-     * guaranteed.
-     *
-     * @param addr is the Endpoint Address to ping.
-     * @return {@code true} if the address can be reached otherwise {@code false}.
-     * @deprecated The cost of performing this operation is generally the same
-     * as getting a Messenger for the destination. Using {@code getMessenger()}
-     * is a better approach because the resulting Messenger is generally needed
-     * soon after ping.
-     */
-    @Deprecated
-    public boolean ping(EndpointAddress addr);
-
-    /**
-     * Add a listener for the specified address.
-     * <p/>
-     * A single registered listener will be called for incoming messages
-     * when (in order of preference) : <ol>
-     * <li>The service name and service parameter match exactly to the
-     * service name and service parameter specified in the destination
-     * address of the message.</li>
-     * <p/>
-     * <li>The service name matches exactly the service name from the
-     * message destination address and service parameter is {@code null}.
-     * </li>
-     * </ol>
-     *
-     * @param listener The listener which will be called when messages are
-     * received for the registered destination.
-     * @param serviceName The name of the service destination which will be
-     * matched against incoming message destination endpoint addresses.
-     * @param serviceParam An optional service parameter value which will be 
-     * matched against destination endpoint addresses. May be null.
-     * @return true if the listener was registered, otherwise false.
-     */
-    public boolean addIncomingMessageListener(EndpointListener listener, String serviceName, String serviceParam);
-
-    /**
-     * Get the listener for the specified address.
-     *
-     * @param serviceName  The service name to which the listener is registered.
-     * @param serviceParam The service parameter to which the listener is
-     *                     registered. May be {@code null}.
-     * @return The currently registered listener or {@code null} if there is no
-     *         listener for the specified name and parameter.
-     */
-    public EndpointListener getIncomingMessageListener(String serviceName, String serviceParam);
-
-    /**
-     * Remove the listener for the specified address.
-     *
-     * @param serviceName  The service name to which the listener is registered.
-     * @param serviceParam The service parameter to which the listener is
-     *                     registered. May be {@code null}.
-     * @return The listener which was removed or {@code null} if there was
-     *         no listener for the specified name and parameter.
-     */
-    public EndpointListener removeIncomingMessageListener(String serviceName, String serviceParam);
-
-    /**
-     * Registers a message filter listener. Each message will be tested against
-     * the list of filters as part of its sending or receiving.
-     * <p/>
-     * The listener is invoked for a message when:
-     * <ul>
-     *   <li>The message contains a message element which matches exactly the
-     *   values specified by namespace and name.</li>
-     *  
-     *   <li>The message contains a message element who's namespace value 
-     *   matches exactly the specified namespace value and the specified name is
-     *   {@code null}.</li>
-     *  
-     *   <li>The message contains a message element who's names value matches
-     *   exactly the specified name value and the specified namespace is
-     *   {@code null}.</li>
-     * 
-     *   <li>The specified name value and the specified namespace are both
-     *   {@code null}.</li>
-     * </ul>
-     *
-     * @param listener  The filter which will be called.
-     * @param namespace Only messages containing elements of this namespace
-     *                  which also match the 'name' parameter will be processed. {@code null}
-     *                  may be use to specify all namespaces.
-     * @param name      only messages containing elements of this name which also
-     *                  match the 'namespace' parameter will be processed. {@code null} may be
-     *                  use to specify all names.
-     */
-    public void addIncomingMessageFilterListener(MessageFilterListener listener, String namespace, String name);
-
-    /**
-     * Registers a message filter listener. Each message will be tested against
-     * the list of filters as part of its sending or receiving.
-     * <p/>
-     * The listener is invoked for a message when:
-     * <ul>
-     *   <li>The message contains a message element which matches exactly the
-     *   values specified by namespace and name.</li>
-     *  
-     *   <li>The message contains a message element who's namespace value 
-     *   matches exactly the specified namespace value and the specified name is
-     *   {@code null}.</li>
-     *  
-     *   <li>The message contains a message element who's names value matches
-     *   exactly the specified name value and the specified namespace is
-     *   {@code null}.</li>
-     * 
-     *   <li>The specified name value and the specified namespace are both
-     *   {@code null}.</li>
-     * </ul>
-     *
-     * @param listener  The filter which will be called.
-     * @param namespace Only messages containing elements of this namespace
-     *                  which also match the 'name' parameter will be processed. {@code null}
-     *                  may be used to specify all namespaces.
-     * @param name      only messages containing elements of this name which also
-     *                  match the 'namespace' parameter will be processed. {@code null} may be
-     *                  use to specify all names.
-     */
-    public void addOutgoingMessageFilterListener(MessageFilterListener listener, String namespace, String name);
-
-    /**
-     * Removes the given listener previously registered under the given element 
-     * name
-     *
-     * @param listener  the listener to remove
-     * @param namespace the name space
-     * @param name      the name
-     * @return the removed listener
-     */
-    public MessageFilterListener removeIncomingMessageFilterListener(MessageFilterListener listener, String namespace, String name);
-
-    /**
-     * Removes the given listener previously registered under the given element
-     * name.
-     *
-     * @param listener  the listener to remove
-     * @param namespace the name space
-     * @param name      the name
-     * @return the removed listener
-     */
-    public MessageFilterListener removeOutgoingMessageFilterListener(MessageFilterListener listener, String namespace, String name);
-
-    /**
-     * Delivers the provided message to the correct listener as specified by
-     * the message's destination address.
-     * <p/>
-     * Two additional common message elements are optionally used by Message
-     * Transports in conjunction with the Endpoint Service. Message Transports
-     * may typically provide received messages to the Endpoint Service
-     * containing these elements and the Endpoint service will dispatch the
-     * messages based upon their content. Message Transports may use alternate
-     * mechanisms for determining message source and destination addresses and
-     * need not use these elements.
-     * <p/>
-     * The {@code jxta:EndpointSourceAddress} Message Element contains an 
-     * Endpoint Address for the source of this message. The source address has a
-     * variety of meanings based upon the usage of the underlying Message 
-     * Transport. For low level transports such as TCP or HTTP the source 
-     * address is the return address of the peer from which the message was 
-     * received, ie. the hop address. For higher level Message Transports such 
-     * as the Endpoint Router Transport or the TLS transport the source address 
-     * is the virtual Endpoint Address of the peer which originated the message 
-     * regardless of any intervening hops the message may have made.
-     * <p/>
-     * The {@code jxta:EndpointDestinationAddress} Message Element contains an 
-     * Endpoint Address which will be used by the Endpoint Service to dispatch a
-     * received message to the recipient specified by the service name and 
-     * service parameter. The protocol address is also provided to the recipient 
-     * service and can be used in some protocols for determining how the message 
-     * was received. For example a service may wish to handle messages which
-     * were sent directly differently than messages which were sent via 
-     * propagation.
-     *
-     * @param msg The message to be delivered.
-     * @deprecated Please convert your code to use the
-     * {@link EndpointListener#processIncomingMessage(Message,EndpointAddress,EndpointAddress)}
-     * method instead. The addressing method used by demux() was never part of
-     * the formal JXTA protocol specification but was a defacto part because
-     * demux() depended upon it.
-     */
-    @Deprecated
-    public void demux(Message msg);
-
-    /**
-     * Adds the specified MessageTransport to this endpoint. A MessageTransport
-     * may only be added if there are no other equivalent MessageTransports
-     * available (as determined by {@link Object#equals(Object) equals()}).
-     * <p/>
-     * The MessageTransport becomes usable by the endpoint service to send
-     * unicast messages and optionally propagation and ping messages if it is a
-     * {@link net.jxta.endpoint.MessageSender}. The endpoint service becomes
-     * usable by this MessageTransport to handle incoming messages if it is a
-     * {@link MessageReceiver}.
-     *
-     * @param transport the MessageTransport to be installed.
-     * @return A messenger event listener to invoke when incoming messengers are
-     *         created or {@code null} if the MessageTransport was not installed.
-     */
-    public MessengerEventListener addMessageTransport(MessageTransport transport);
-
-    /**
-     * Removes the given MessageTransport protocol from this endpoint service.
-     * <p/>
-     * Transports remove themselves from the list when stopped. This method
-     * is normally only called from the stoppApp method of the transport. To
-     * cleanly remove a transport, call the transport's
-     * {@link net.jxta.platform.Module#stopApp() stopApp()}and allow it to call
-     * this method.
-     *
-     * @param transpt the MessageTransport to be removed.
-     * @return {@code true} if the Message Transport was removed, otherwise
-     * {@code false}.
-     */
-    public boolean removeMessageTransport(MessageTransport transpt);
-
-    /**
-     * Get an iterator of the MessageTransports available to this
-     * EndpointService.
-     *
-     * @return the iterator of all message transports.
-     */
-    public Iterator<MessageTransport> getAllMessageTransports();
-
-    /**
-     * Get a Message Transport by protocol name.
-     *
-     * @param name The protocol name of the MessageTransport.
-     * @return The Message Transport for the specified protocol name or
-     * {@code null} if there is no matching Message Transport
-     */
-    public MessageTransport getMessageTransport(String name);
-
-    /**
-     * Returns a Messenger that may be used to send messages via  this endpoint
-     * to the specified destination.
-     *
-     * @param addr the destination address.
-     * @return The messenger or {@code null} is returned if the destination
-     * address is not reachable.
-     */
-    public Messenger getMessenger(EndpointAddress addr);
-
-    /**
-     * Asynchronously acquire a messenger for the specified address. The
-     * listener will be called when the messenger has been constructed.
-     *
-     * @param listener the listener to call when the messenger is ready.
-     * @param addr     the destination for the messenger.
-     * @param hint     the messenger hint, if any, otherwise null.
-     * @return {@code true} if the messenger is queued for construction
-     * otherwise {@code false}.
-     * @deprecated This method is being phased out. Prefer one of the other
-     * non-blocking variants. If a listener style paradigm is required, use
-     * {@link ListenerAdaptor} which emulates this functionality.
-     */
-    @Deprecated
-    public boolean getMessenger(MessengerEventListener listener, EndpointAddress addr, Object hint);
-
-    /**
-     * Returns a Direct Messenger that may be used to send messages via  this endpoint to the specified destination.
-     * </p>
-     * Direct messengers are non self destructive, they must be explicilty closed.
-     *
-     * @param addr the destination address.
-     * @param hint the messenger hint, if any, otherwise null.
-     * @param exclusive if true avoids caching the messenger
-     * @return The messenger or {@code null} is returned if the destination address is not reachable.
-     * @throws IllegalArgumentException if hint is not of RouteAdvertisement, or PeerAdvertisement type.
-     */
-    public Messenger getDirectMessenger(EndpointAddress addr, Object hint, boolean exclusive);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/InputStreamMessageElement.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/InputStreamMessageElement.java
deleted file mode 100644 (file)
index 16b30ed..0000000
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.endpoint;
-
-
-import net.jxta.document.MimeMediaType;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.SequenceInputStream;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.zip.CRC32;
-import java.util.zip.Checksum;
-
-
-/**
- * A Message Element using {@link java.io.InputStream} as the source for the
- * element data. This implementation copies all of the data from the stream at
- * the time of creation.
- * <p/>
- * InputStreamMessageElement is not as efficient as other message element types
- * and should only be used when an input stream is the only available source for
- * the element data.
- */
-public class InputStreamMessageElement extends MessageElement {
-
-    /**
-     * The bytes of this element.
-     */
-    protected final List<byte[]> databytes;
-
-    /**
-     * The length of the data.
-     */
-    protected final long length;
-
-    /**
-     * Cached Hash Code
-     */
-    protected transient int cachedHashCode = 0;
-
-    /**
-     * Create a new MessageElement. This constructor copies the data as needed
-     * and closes the stream upon completion.
-     *
-     * @param name Name of the MessageElement. May be the empty string ("") if
-     *             the MessageElement is not named.
-     * @param type Type of the MessageElement. null is the same as specifying
-     *             the type "Application/Octet-stream".
-     * @param in   the stream containing the body of the MessageElement. The
-     *             stream will be closed by the MessageElement.
-     * @param sig  optional message digest/digital signature element or null if
-     *             no signature is desired.
-     * @throws IOException If there is a problem reading from the source stream.
-     */
-    public InputStreamMessageElement(String name, MimeMediaType type, InputStream in, MessageElement sig) throws IOException {
-        this(name, type, in, Long.MAX_VALUE, sig);
-    }
-
-    /**
-     * Create a new Message Element.
-     *
-     * @param name Name of the MessageElement. May be the empty string ("") if
-     *             the MessageElement is not named.
-     * @param type Type of the MessageElement. null is the same as specifying
-     *             the type "Application/Octet-stream".
-     * @param in   the stream containing the body of the MessageElement.
-     *             The stream will <b>NOT</b> be closed unless EOF is unexpectedly reached.
-     * @param len  The size of the Element will be limited to len bytes
-     *             from the stream. If you are using the stream interface and know
-     *             the size of the stream, specifying it here improves performance
-     *             and space efficiency a lot. The stream must contain at least
-     *             <code>len</code> bytes.
-     * @param sig  optional message digest/digital signature element or null if
-     *             no signature is desired.
-     * @throws IOException if there is a problem reading from the source stream
-     */
-    public InputStreamMessageElement(String name, MimeMediaType type, InputStream in, long len, MessageElement sig) throws IOException {
-        super(name, type, sig);
-
-        if ((len < 0)) {
-            throw new IllegalArgumentException("len must be >= 0");
-        }
-
-        // copy the data from the stream
-        databytes = CopyToDataBytes(in, len);
-
-        // calculate the length
-        long buffersSum = 0;
-        for (byte[] aBuffer : databytes) {
-            buffersSum += aBuffer.length;
-        }
-        
-        length = buffersSum;
-
-        // fail if the length is not as promised.
-        if ((len != Long.MAX_VALUE) && (len != length)) {
-            throw new IllegalArgumentException("Stream was shorter than promised length.");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        }
-
-        if (target instanceof MessageElement) {
-            if (!super.equals(target)) {
-                return false;
-            }
-
-            if (target instanceof InputStreamMessageElement) {
-                // have to do a slow stream comparison.
-                // XXX 20020615 bondolo@jxta.org the performance of this could be much improved.
-
-                MessageElement likeMe = (MessageElement) target;
-
-                try {
-                    InputStream myStream = getStream();
-                    InputStream itsStream = likeMe.getStream();
-
-                    int mine;
-                    int its;
-
-                    do {
-                        mine = myStream.read();
-                        its = itsStream.read();
-
-                        if (mine != its) {
-                            return false;
-                        }       // content didn't match
-
-                    } while ((-1 != mine) && (-1 != its));
-
-                    return ((-1 == mine) && (-1 == its)); // end at the same time?
-                } catch (IOException fatal) {
-                    throw new IllegalStateException("MessageElements could not be compared." + fatal);
-                }
-            }
-        }
-
-        return false; // not a new message element
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized int hashCode() {
-        if (0 == cachedHashCode) {
-            Checksum crc = new CRC32();
-
-            for (byte[] aBuffer : databytes) {
-                crc.update(aBuffer, 0, aBuffer.length);
-            }
-
-            int result = super.hashCode() + (int) crc.getValue() * 6037; // a prime
-
-            cachedHashCode = 0 != result ? result : 1;
-        }
-
-        return cachedHashCode;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public long getByteLength() {
-        return length;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public InputStream getStream() throws IOException {
-        List<InputStream> buffers = new ArrayList<InputStream>();
-
-        for (byte[] aBuffer : databytes) {
-            buffers.add(new ByteArrayInputStream(aBuffer));
-        }
-
-        return new SequenceInputStream(Collections.enumeration(buffers));
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void sendToStream(OutputStream sendTo) throws IOException {
-        for (byte[] aBuffer : databytes) {
-            sendTo.write(aBuffer);
-        }
-    }
-
-    /**
-     * Copy data from a stream with best possible efficiency. Unfortunately,
-     * this still results in a lot of copying since we have often have no
-     * fore-knowledge of the length of the stream.
-     *
-     * @param in    the stream to copy from
-     * @param limit the maximum number of bytes to copy from the stream.
-     *              Long.LONG_MAX will read until EOF.
-     * @return A list of buffers.
-     * @throws IOException if there is a problem reading from the stream.
-     */
-    protected List<byte[]> CopyToDataBytes(InputStream in, long limit) throws IOException {
-        final long INITIAL_INTERMEDIATE_BUFFERSIZE = 6;
-        final long MAXIMUM_INTERMEDIATE_BUFFERSIZE = 18;
-
-        List<byte[]> buffs = new ArrayList<byte[]>();
-        boolean atEOF = false;
-        long read = 0;
-        long currentIntermediateBufferSize = INITIAL_INTERMEDIATE_BUFFERSIZE;
-
-        // build a list of buffers containing all the element data.
-        do {
-            long readRequest = (limit - read);
-
-            if (Long.MAX_VALUE == limit) {
-                readRequest = Math.min(readRequest, (1L << currentIntermediateBufferSize));
-            }
-            readRequest = Math.min(readRequest, Integer.MAX_VALUE); // limited by size of arrays which are Integer indexed.
-
-            byte[] nextBuffer = new byte[(int) readRequest];
-            int offsetInThisBuffer = 0;
-
-            // fully read the buffer if we can.
-            do {
-                int readLength = in.read(nextBuffer, offsetInThisBuffer, nextBuffer.length - offsetInThisBuffer);
-
-                if (readLength == -1) {
-                    atEOF = true;
-                    break;
-                }
-
-                offsetInThisBuffer += readLength;
-            } while (offsetInThisBuffer < nextBuffer.length);
-
-            // handle the final buffer.
-            if (atEOF) {
-                byte[] anotherBuffer = new byte[offsetInThisBuffer];
-
-                System.arraycopy(nextBuffer, 0, anotherBuffer, 0, offsetInThisBuffer);
-                nextBuffer = anotherBuffer;
-            }
-
-            read += nextBuffer.length;
-            buffs.add(nextBuffer);
-
-            if (currentIntermediateBufferSize < MAXIMUM_INTERMEDIATE_BUFFERSIZE) {
-                currentIntermediateBufferSize++;
-            }
-        } while (!atEOF && (read < limit));
-
-        // we are done, close if we are at EOF.
-        if (atEOF) {
-            in.close();
-            in = null;
-        }
-        return buffs;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/ListenerAdaptor.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/ListenerAdaptor.java
deleted file mode 100644 (file)
index 4ebc94e..0000000
+++ /dev/null
@@ -1,481 +0,0 @@
-/*
- * Copyright (c) 2004-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.endpoint;
-
-import net.jxta.logging.Logging;
-import net.jxta.util.SimpleSelectable;
-import net.jxta.util.SimpleSelectable.IdentityReference;
-import net.jxta.util.SimpleSelector;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.Executor;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * The legacy getMessenger asynchronous API never returns any object to the invoker until a messenger could actually be made,
- * allowing the application to supply a listener to be invoked when the operation completes. The legacy Messenger API also
- * provides a method to send messages that calls a listener to report the outcome of the operation.  <p/>
- * <p/>
- * The model has changed, so that an asynchronous messenger is made unresolved and returned immediately to the invoker, which can
- * then request opening or even just send a message to force the opening. Subsequently, the messenger can be used as a control
- * block to monitor progress with {@link Messenger#register} and {@link Messenger#waitState}.<p/>
- * <p/>
- * Likewise, the outcome of sending a message is a property of that message. Messages can be selected to monitor property changes
- * with {@link Message#register} and {@link net.jxta.endpoint.Message#getMessageProperty(Object)} (the outcome property key is
- * <code>Messenger.class</code>).
- * <p/>
- * This class here provides the legacy listener model on top of the new model for applications that prefer listeners. This class
- * is used internally to emulate the legacy listener behaviour, so that applications do not need to be adapted.<p/>
- * <p/>
- * Note: one instance of this class gets instantiated by each EndpointService interface. However, it does not start using any
- * resources until it first gets used.<p/>
- */
-public class ListenerAdaptor implements Runnable {
-
-    // FIXME - jice 20040413: Eventhough it is not as critical as it used to be we should get rid of old, never resolved entries.
-    // Attempts are supposed to always fail or succeed rather soon. Here, we trust transports in that matter. Is it safe ?
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(ListenerAdaptor.class.getName());
-
-    /**
-     * The in progress messages.
-     */
-    private final Map<IdentityReference, ListenerContainer> inprogress = new HashMap<IdentityReference, ListenerContainer>(32);
-
-    /**
-     * The thread that does the work.
-     */
-    private Thread bgThread = null;
-
-    /**
-     * The selector that we use to watch messengers progress.
-     */
-    private final SimpleSelector selector = new SimpleSelector();
-
-    /**
-     * Have we been shutdown?
-     */
-    private volatile boolean shutdown = false;
-
-    /**
-     * The exceutor service.
-     */
-    private final Executor executor;
-
-    /**
-     * The ThreadGroup in which this adaptor will run.
-     */
-    private final ThreadGroup threadGroup;
-
-    /**
-     * Standard Constructor
-     *
-     * @param threadGroup The ThreadGroup in which this adaptor will run.
-     */
-    public ListenerAdaptor(ThreadGroup threadGroup) {
-        this(threadGroup, null);
-    }
-    /**
-     * Creates a ListenerAdaptor with a threadpool for notification callback.
-     *
-     * @param threadGroup The ThreadGroup in which this adaptor will run.
-     * @param executor the excutor to use for notification callback
-     */
-    public ListenerAdaptor(ThreadGroup threadGroup, Executor executor) {
-        this.executor = executor;
-        this.threadGroup = threadGroup;
-    }
-
-    /**
-     * Cannot be re-started. Do not call once shutdown.
-     */
-    private synchronized void init() {
-        assert !shutdown;
-
-        if (bgThread != null) {
-            return;
-        }
-
-        bgThread = new Thread(threadGroup, this, "Listener Adaptor");
-        bgThread.setDaemon(true);
-        bgThread.start();
-    }
-
-    public synchronized void shutdown() {
-        shutdown = true;
-
-        // Stop the thread if it was ever created.
-        Thread bg = bgThread;
-        if (bg != null) {
-            bg.interrupt();
-        }
-    }
-
-    /**
-     * Stop watching a given selectable.
-     *
-     * @param ts the selectable
-     */
-    private void forgetSelectable(SimpleSelectable ts) {
-        // Either way, we're done with this one.
-        ts.unregister(selector);
-
-        synchronized (this) {
-            inprogress.remove(ts.getIdentityReference());
-        }
-    }
-
-    /**
-     * Select the given message and invoke the given listener when the message sending is complete.
-     *
-     * @param listener The listener to invoke. If null the resolution will take place, but obviously no listener will be invoked.
-     * @param message  The message being sent.
-     * @return true if the message was registered successfully or the listener is null. If true it is guaranteed that the listener
-     *         will be invoked unless null. If false, it is guaranteed that the listener will not be invoked.
-     */
-    public boolean watchMessage(OutgoingMessageEventListener listener, Message message) {
-        synchronized (this) {
-            if (shutdown) {
-                return false;
-            }
-
-            if (listener == null) {
-                // We're done, then. The invoker does not really care.
-                return true;
-            }
-
-            // Init if needed.
-            init();
-
-            // First we must ensure that if the state changes we'll get to handle it.
-            MessageListenerContainer allListeners = (MessageListenerContainer) inprogress.get(message.getIdentityReference());
-
-            if (allListeners == null) {
-                allListeners = new MessageListenerContainer();
-                inprogress.put(message.getIdentityReference(), allListeners);
-            }
-            allListeners.add(listener);
-        }
-
-        // When we do that, the selector gets notified. Therefore always check the initial state automatically. If the
-        // selectable is already done with, the listener will be called by the selector's handler.
-        message.register(selector);
-
-        return true;
-    }
-
-    /**
-     * Select the given messenger and invoke the given listener when the messenger is resolved.
-     *
-     * @param listener  The listener to invoke. If null the resolution will take place, but obviously no listener will be invoked.
-     * @param messenger The messenger being resolved.
-     * @return true if the messenger was registered successfully or the listener is null. If true it is guaranteed that the listener
-     *         will be invoked unless null. If false, it is guaranteed that the listener will not be invoked.
-     */
-    public boolean watchMessenger(MessengerEventListener listener, Messenger messenger) {
-        synchronized (this) {
-
-            if (shutdown) {
-                return false;
-            }
-
-            if (listener == null) {
-                // We're done, then. The invoker does not really care.
-                return true;
-            }
-
-            // Init if needed.
-            init();
-
-            // First we must ensure that if the state changes we'll get to handle it.
-            MessengerListenerContainer allListeners = (MessengerListenerContainer) inprogress.get(messenger.getIdentityReference());
-
-            if (allListeners == null) {
-                // Use ArrayList. The code is optimized for that.
-                allListeners = new MessengerListenerContainer();
-                inprogress.put(messenger.getIdentityReference(), allListeners);
-            }
-            allListeners.add(listener);
-        }
-
-        // When we do that, the selector get notified. Therefore we will always check the initial state automatically. If the
-        // selectable is already done with, the listener will be called by the selector's handler.
-        messenger.register(selector);
-
-        return true;
-    }
-
-    /*
-     * Any sort of listener type.
-     */
-    static abstract class ListenerContainer<S extends SimpleSelectable, L extends java.util.EventListener> extends ArrayList<L> {
-
-        public ListenerContainer() {
-            super(1);
-        }
-
-        protected abstract void giveUp(S what, Throwable how);
-
-        protected abstract void process(S what);
-    }
-
-
-    /**
-     * For messages
-     */
-    @SuppressWarnings("serial")
-    class MessageListenerContainer extends ListenerContainer<Message, OutgoingMessageEventListener> {
-
-        private void messageDone(Message message, OutgoingMessageEvent event) {
-            // Note: synchronization is externally provided. When this method is invoked, this
-            // object has already been removed from the map, so the list of listener cannot change.
-
-            if (event == OutgoingMessageEvent.SUCCESS) {
-                // Replace it with a msg-specific one.
-                event = new OutgoingMessageEvent(message, null);
-
-                for (OutgoingMessageEventListener eachListener : this) {
-                    try {
-                        eachListener.messageSendSucceeded(event);
-                    } catch (Throwable any) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.log(Level.WARNING, "Uncaught throwable from listener", any);
-                        }
-                    }
-                }
-            } else {
-                if (event == OutgoingMessageEvent.OVERFLOW) {
-                    // Replace it with a msg-specific one.
-                    event = new OutgoingMessageEvent(message, null);
-                }
-
-                for (OutgoingMessageEventListener eachListener : this) {
-                    try {
-                        eachListener.messageSendFailed(event);
-                    } catch (Throwable any) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.log(Level.WARNING, "Uncaught throwable in listener", any);
-                        }
-                    }
-                }
-            }
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        protected void process(Message message) {
-            OutgoingMessageEvent event = (OutgoingMessageEvent) message.getMessageProperty(Messenger.class);
-
-            if (event == null) {
-                return;
-            }
-
-            // Remove this container-selectable binding
-            forgetSelectable(message);
-
-            // Invoke app listeners
-            messageDone(message, event);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        protected void giveUp(Message m, Throwable how) {
-            messageDone(m, new OutgoingMessageEvent(m, how));
-        }
-    }
-
-    /**
-     * For messengers
-     */
-    @SuppressWarnings("serial")
-    class MessengerListenerContainer extends ListenerContainer<Messenger, MessengerEventListener> {
-
-        private void messengerDone(Messenger messenger) {
-
-            // Note: synchronization is externally provided. When this method is invoked, this
-            // object has already been removed from the map, so the list of listener cannot change.
-
-            MessengerEvent event = new MessengerEvent(ListenerAdaptor.this, messenger, null);
-
-            for (MessengerEventListener eachListener : this) {
-                try {
-                    eachListener.messengerReady(event);
-                } catch (Throwable any) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Uncaught throwable in listener", any);
-                    }
-                }
-            }
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        protected void process(Messenger messenger) {
-            if ((messenger.getState() & (Messenger.RESOLVED | Messenger.TERMINAL)) == 0) {
-                return;
-            }
-
-            // Remove this container-selectable binding
-            forgetSelectable(messenger);
-
-            if ((messenger.getState() & Messenger.USABLE) == 0) {
-                messenger = null;
-            }
-
-            // Invoke app listeners
-            messengerDone(messenger);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        protected void giveUp(Messenger m, Throwable how) {
-            messengerDone(null);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void run() {
-        try {
-            while (!shutdown) {
-                try {
-                    Collection<SimpleSelectable> changed = selector.select();
-                    for (SimpleSelectable simpleSelectable : changed) {
-                        ListenerContainer listeners;
-                        synchronized (this) {
-                            listeners = inprogress.get(simpleSelectable.getIdentityReference());
-                        }
-                        if (listeners == null) {
-                            simpleSelectable.unregister(selector);
-                            continue;
-                        }
-                        if (executor == null) {
-                            listeners.process(simpleSelectable);
-                        } else {
-                            executor.execute(new ListenerProcessor(listeners, simpleSelectable));
-                        }
-                    }
-                } catch (InterruptedException ie) {
-                    Thread.interrupted();
-                }
-            }
-        } catch (Throwable anyOther) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Uncaught Throwable in background thread", anyOther);
-            }
-
-            // There won't be any other thread. This thing is dead if that
-            // happens. And it really shouldn't.
-            synchronized (this) {
-                shutdown = true;
-            }
-        } finally {
-            try {
-                // It's only us now. Stopped is true.
-                IOException failed = new IOException("Endpoint interface terminated");
-                for (Map.Entry<IdentityReference, ListenerContainer> entry : inprogress.entrySet()) {
-                    SimpleSelectable simpleSelectable = entry.getKey().getObject();
-                    ListenerContainer listeners = entry.getValue();
-                    simpleSelectable.unregister(selector);
-
-                    if (listeners != null) {
-                        listeners.giveUp(simpleSelectable, failed);
-                    }
-                }
-                inprogress.clear();
-            } catch (Throwable anyOther) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Uncaught Throwable while shutting down background thread", anyOther);
-                }
-            }
-            bgThread = null;
-        }
-    }
-
-    /**
-     * A small class for processing individual messages.
-     */
-    private class ListenerProcessor implements Runnable {
-
-        private SimpleSelectable simpleSelectable;
-        private ListenerContainer listeners;
-        ListenerProcessor(ListenerContainer listeners, SimpleSelectable simpleSelectable) {
-            this.listeners = listeners;
-            this.simpleSelectable = simpleSelectable;
-        }
-
-        public void run() {
-            listeners.process(simpleSelectable);
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/Message.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/Message.java
deleted file mode 100644 (file)
index 134699a..0000000
+++ /dev/null
@@ -1,1444 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.endpoint;
-
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.PrintWriter;
-import java.io.Serializable;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Map;
-
-import java.io.IOException;
-import java.util.ConcurrentModificationException;
-import java.util.NoSuchElementException;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import net.jxta.document.MimeMediaType;
-import net.jxta.util.AbstractSimpleSelectable;
-import net.jxta.util.SimpleSelectable;
-
-import net.jxta.impl.id.UUID.UUID;
-import net.jxta.impl.id.UUID.UUIDFactory;
-
-/**
- * Messages are abstract containers for protocol messages within JXTA. Services
- * and applications are expected to use Messages as the basis for any protocols
- * implemented within JXTA. Messages are exchanged through the
- * {@link net.jxta.endpoint.EndpointService} or
- * {@link net.jxta.pipe.PipeService}.
- * <p/>
- * A Message is composed of an ordered list of zero or more
- * {@link net.jxta.endpoint.MessageElement MessageElements}. Each
- * {@link net.jxta.endpoint.MessageElement} is associated with a namespace at
- * the time it is added to the message. Duplicate
- * {@link net.jxta.endpoint.MessageElement MessageElements} are permitted.
- * <p/>
- * <b>Messages are not synchronized. All of the iterators returned by this
- * implementation are "fail-fast". Concurrent modification of messages from
- * multiple threads will produce unexpected results and
- * {@code ConcurrentModificationException}.</b>
- *
- * @see net.jxta.endpoint.MessageElement
- * @see net.jxta.endpoint.EndpointAddress
- * @see net.jxta.endpoint.EndpointService
- * @see net.jxta.pipe.InputPipe
- * @see net.jxta.pipe.OutputPipe
- * @see net.jxta.pipe.PipeService
- */
-public class Message extends AbstractSimpleSelectable implements Serializable {
-
-    /**
-     * Logger
-     */
-    private static final transient Logger LOG = Logger.getLogger(Message.class.getName());
-
-    /**
-     * Magic value for this format of serialization version.
-     */
-    private static final long serialVersionUID = 3418026921074097757L;
-
-    /**
-     * If {@code true}, then modification logging be activated. This is a very
-     * expensive option as it causes a stack crawl to be captured for every
-     * message modification.
-     * <p/>
-     * To enable modification tracking, set to {@code true} and recompile.
-     */
-    protected static final boolean LOG_MODIFICATIONS = false;
-
-    /**
-     * If {@code true}, then a special tracking element is added to every
-     * message. This provides the ability to follow messages throughout the
-     * network. If a message has a tracking element then it will be used in
-     * the {@code toString()} representation.
-     * <p/>
-     * The element is currently named "Tracking UUID" and is stored in the
-     * "jxta" namespace. The element contains an IETF version 1 UUID in string
-     * form.
-     * <p/>
-     * To enable addition of a tracking element to every message, set the
-     * Java System Property {@code net.jxta.endpoint.Message.globalTracking} to
-     * {@code true} and restart your JXTA application.
-     *
-     * @see java.lang.System#setProperty(String,String)
-     */
-    protected static final boolean GLOBAL_TRACKING_ELEMENT =
-            Boolean.getBoolean(Message.class.getName() + ".globalTracking");
-
-    /**
-     * Incremented for each standalone message instance. {@see #lineage} for
-     * information about how message numbers can be used.
-     */
-    private static transient AtomicInteger messagenumber = new AtomicInteger(1);
-
-    /**
-     * This string identifies the namespace which is assumed when calls are
-     * made that don't include a namespace specification.
-     */
-    protected final String defaultNamespace;
-
-    /**
-     * the namespaces in this message and the elements in each.
-     */
-    protected transient Map<String, List<MessageElement>> namespaces = new HashMap<String, List<MessageElement>>();
-
-    /**
-     * List of the elements.
-     */
-    protected transient List<element> elements = new ArrayList<element>();
-
-    /**
-     * Message properties HashMap
-     */
-    protected transient Map<Object, Object> properties = Collections.synchronizedMap(new HashMap<Object, Object>());
-
-    /**
-     * A list of {@link java.lang.Integer} which details the lineage (history
-     * of cloning) that produced this message. This message's number is index
-     * 0, all of the ancestors are in order at higher indexes.
-     * <p/>
-     * Message numbers are not part of the message content and are only
-     * stored locally. The are useful for following messages throughout their
-     * lifetime and is normally shown as part of the <tt>toString()</tt>
-     * display for Messages.
-     */
-    protected transient List<Integer> lineage = new ArrayList<Integer>();
-
-    /**
-     * Modification count of this message. Can be used to detect message being
-     * concurrently modified when message is shared.
-     * <p/>
-     * The modification count is part of the {@code toString()} display for
-     * Messages.
-     */
-    protected transient volatile int modCount = 0;
-
-    /**
-     * cached aggregate size of all the member elements. Used by
-     * {@link #getByteLength()}
-     */
-    protected transient long cachedByteLength = 0;
-
-    /**
-     * modcount at the time the message length was last calculated. Used by
-     * {@link #getByteLength()}
-     */
-    protected transient int cachedByteLengthModCount = -1;
-
-    /**
-     * If <tt>true</tt> then the message is modifiable. This is primarily
-     * intended as a diagnostic tool for detecting concurrent modification.
-     *
-     * @deprecated You really should not depend on this feature.
-     */
-    @Deprecated
-    public boolean modifiable = true;
-
-    /**
-     * If {@code LOG_MODIFICATIONS} is {@code true} then this will contain
-     * the history of modifications this message.
-     * <p/>
-     * <ul>
-     * <li>Values are {@link java.lang.Throwable} with the description
-     * field formatted as <code>timeInAbsoluteMillis : threadName</code>.
-     * </li>
-     * </ul>
-     */
-    protected transient List<Throwable> modHistory;
-
-    /**
-     * A ListIterator for MessageElements which also provides the ability to
-     * determine the namespace of the current message element. Message Elements
-     * are iterated in the order in which they were added to the Message.
-     * <p/>
-     * This Iterator returned is not synchronized with the message. If you
-     * modify the state of the Message, the iterator will throw
-     * ConcurrentModificationException when {@code next()} or
-     * {@code previous()} is called.
-     */
-    public class ElementIterator implements ListIterator<MessageElement> {
-
-        /**
-         * The elements being iterated.
-         */
-        ListIterator<element> list;
-
-        /**
-         * The current element
-         */
-        element current = null;
-
-        /**
-         * The modCount at the time when the iterator was created.
-         */
-        transient int origModCount;
-
-        /**
-         * Intialize the iterator from a list iterator.
-         *
-         * @param list The ListIterator we are managing.
-         */
-        ElementIterator(ListIterator<element> list) {
-            origModCount = Message.this.getMessageModCount();
-            this.list = list;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public boolean hasNext() {
-            if (origModCount != Message.this.getMessageModCount()) {
-                RuntimeException failure = new ConcurrentModificationException(
-                        Message.this + " concurrently modified. Iterator was made at mod " + origModCount);
-
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE,
-                            Message.this + " concurrently modified. iterator mod=" + origModCount + " current mod="
-                            + Message.this.getMessageModCount() + "\n" + getMessageModHistory(),
-                            failure);
-                }
-                throw failure;
-            }
-            return list.hasNext();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public MessageElement next() {
-            if (origModCount != Message.this.getMessageModCount()) {
-                RuntimeException failure = new ConcurrentModificationException(
-                        Message.this + " concurrently modified. Iterator was made at mod " + origModCount);
-
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE,
-                            Message.this + " concurrently modified. iterator mod=" + origModCount + " current mod="
-                            + Message.this.getMessageModCount() + "\n" + getMessageModHistory(),
-                            failure);
-                }
-                throw failure;
-            }
-
-            current = list.next();
-            return current.element;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public int nextIndex() {
-            return list.nextIndex();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public boolean hasPrevious() {
-            if (origModCount != Message.this.getMessageModCount()) {
-                RuntimeException failure = new ConcurrentModificationException(
-                        Message.this + " concurrently modified. Iterator was made at mod " + origModCount);
-
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE,
-                            Message.this + " concurrently modified. iterator mod=" + origModCount + " current mod="
-                            + Message.this.getMessageModCount() + "\n" + getMessageModHistory(),
-                            failure);
-                }
-                throw failure;
-            }
-
-            return list.hasPrevious();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public MessageElement previous() {
-            if (origModCount != Message.this.getMessageModCount()) {
-                RuntimeException failure = new ConcurrentModificationException(
-                        Message.this + " concurrently modified. Iterator was made at mod " + origModCount);
-
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE,
-                            Message.this + " concurrently modified. iterator mod=" + origModCount + " current mod="
-                            + Message.this.getMessageModCount() + "\n" + getMessageModHistory(),
-                            failure);
-                }
-                throw failure;
-            }
-
-            current = list.previous();
-            return current.element;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public int previousIndex() {
-            return list.previousIndex();
-        }
-
-        /**
-         * {@inheritDoc}
-         * <p/>
-         * Not provided because the namespace cannot be specified.
-         */
-        public void add(MessageElement obj) {
-            throw new UnsupportedOperationException("add() not supported");
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public void remove() {
-            if (origModCount != Message.this.getMessageModCount()) {
-                RuntimeException failure = new ConcurrentModificationException(
-                        Message.this + " concurrently modified. Iterator was made at mod " + origModCount);
-
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE,
-                            Message.this + " concurrently modified. iterator mod=" + origModCount + " current mod="
-                            + Message.this.getMessageModCount() + "\n" + getMessageModHistory(),
-                            failure);
-                }
-
-                throw failure;
-            }
-
-            if (null == current) {
-                throw new IllegalStateException("no current element, call next() or previous()");
-            }
-
-            ListIterator<element> elsPosition = Message.this.elements.listIterator();
-            ListIterator<MessageElement> nsPosition = namespaces.get(current.namespace).listIterator();
-
-            int currentPrevious = list.previousIndex();
-
-            // restart this iterator
-            while (list.previousIndex() >= 0) {
-                list.previous();
-            }
-
-            // readvance to the current position, but track in ns list and master list
-            while (list.previousIndex() < currentPrevious) {
-                element anElement = list.next();
-
-                try {
-                    // advance to the same element in the master list.
-                    element anElsElement;
-
-                    do {
-                        anElsElement = elsPosition.next();
-                    } while (anElement != anElsElement);
-
-                    // advance to the same element in the ns list.
-                    MessageElement anNsElement;
-
-                    if (current.namespace.equals(anElement.namespace)) {
-                        do {
-                            anNsElement = nsPosition.next();
-                        } while (anElement.element != anNsElement);
-                    }
-                } catch (NoSuchElementException ranOut) {
-                    RuntimeException failure = new ConcurrentModificationException(
-                            Message.this + " concurrently modified. Iterator was made at mod " + origModCount);
-
-                    if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                        LOG.log(Level.SEVERE,
-                                Message.this + " concurrently modified. iterator mod=" + origModCount + " current mod="
-                                + Message.this.getMessageModCount() + "\n" + getMessageModHistory(),
-                                failure);
-                    }
-
-                    throw failure;
-                }
-            }
-
-            elsPosition.remove();
-            nsPosition.remove();
-            list.remove();
-            origModCount = Message.this.incMessageModCount();
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer(
-                        "Removed " + current.namespace + "::" + current.element.getElementName() + "/"
-                        + current.element.getClass().getName() + "@" + current.element.hashCode() + " from " + Message.this);
-            }
-            current = null;
-        }
-
-        /**
-         * {@inheritDoc}
-         * <p/>
-         * Replacement MessageElement will be in the same name space as the
-         * replaced element.
-         */
-        public void set(MessageElement obj) {
-            if (origModCount != Message.this.getMessageModCount()) {
-                RuntimeException failure = new ConcurrentModificationException(
-                        Message.this + " concurrently modified. ");
-
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE,
-                            Message.this + " concurrently modified. iterator mod=" + origModCount + " current mod="
-                            + Message.this.getMessageModCount() + "\n" + getMessageModHistory(),
-                            failure);
-                }
-                throw failure;
-            }
-
-            if (null == current) {
-                throw new IllegalStateException("no current element, call next() or previous()");
-            }
-
-            ListIterator<element> elsPosition = Message.this.elements.listIterator();
-            ListIterator<MessageElement> nsPosition = namespaces.get(current.namespace).listIterator();
-
-            int currentPrevious = list.previousIndex();
-
-            // restart this iterator
-            while (list.previousIndex() >= 0) {
-                list.previous();
-            }
-
-            // readvance to the current position, but track in ns list and master list
-            while (list.previousIndex() < currentPrevious) {
-                element anElement = list.next();
-
-                try {
-                    // advance to the same element in the master list.
-                    element anElsElement;
-
-                    do {
-                        anElsElement = elsPosition.next();
-                    } while (anElement != anElsElement);
-
-                    // advance to the same element in the ns list.
-                    MessageElement anNsElement;
-
-                    if (current.namespace.equals(anElement.namespace)) {
-                        do {
-                            anNsElement = nsPosition.next();
-                        } while (anElement.element != anNsElement);
-                    }
-                } catch (NoSuchElementException ranOut) {
-                    RuntimeException failure = new ConcurrentModificationException(
-                            Message.this + " concurrently modified. Iterator was made at mod " + origModCount);
-
-                    if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                        LOG.log(Level.SEVERE,
-                                Message.this + " concurrently modified. iterator mod=" + origModCount + " current mod="
-                                + Message.this.getMessageModCount() + "\n" + getMessageModHistory(),
-                                failure);
-                    }
-                    throw failure;
-                }
-            }
-
-            Message.element newCurrent = new Message.element(current.namespace, obj, null);
-
-            elsPosition.set(newCurrent);
-            nsPosition.set(obj);
-            list.set(newCurrent);
-            origModCount = Message.this.incMessageModCount();
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer(
-                        "Replaced " + current.namespace + "::" + current.element.getElementName() + "/"
-                        + current.element.getClass().getName() + "@" + current.element.hashCode() + " with "
-                        + newCurrent.namespace + "::" + newCurrent.element.getElementName() + "/"
-                        + newCurrent.element.getClass().getName() + "@" + newCurrent.element.hashCode() + " in " + Message.this);
-            }
-            current = newCurrent;
-        }
-
-        /**
-         * return the namespace of the current element.
-         *
-         * @return String containing the name space of the current element.
-         */
-        public String getNamespace() {
-            if (null == current) {
-                throw new IllegalStateException("no current element, call next() or previous()");
-            }
-
-            return current.namespace;
-        }
-
-        /**
-         * Return the signature element of the current element.
-         *
-         * @return The signature element of the current element.
-         */
-        public MessageElement getSignature() {
-            if (null == current) {
-                throw new IllegalStateException("no current element, call next() or previous()");
-            }
-
-            return (null != current.signature) ? current.signature : current.element.getSignature();
-        }
-    }
-
-
-    /**
-     * Holds an element, its namespace and optionally an override signature
-     * element.
-     */
-    protected static class element {
-        final String namespace;
-        final MessageElement element;
-        final MessageElement signature;
-
-        element(String namespace, MessageElement element, MessageElement signature) {
-            this.namespace = namespace;
-            this.element = element;
-            this.signature = signature;
-        }
-    }
-
-    /**
-     * Standard Constructor for messages. The default namespace will be the
-     * empty string ("")
-     */
-    public Message() {
-        this("", false);
-    }
-
-    /**
-     * Standard Constructor for messages.
-     *
-     * @param defaultNamespace the namespace which is assumed by methods which
-     * do not require a namespace specification.
-     */
-    protected Message(String defaultNamespace) {
-        this(defaultNamespace, false);
-    }
-    
-    /**
-     * Standard Constructor for messages.
-     *
-     * @param defaultNamespace the namespace which is assumed by methods which
-     * do not require a namespace specification.
-     * @param clone If {@code true} then we are creating a clone.
-     */
-    private Message(String defaultNamespace, boolean clone) {
-        this.defaultNamespace = defaultNamespace;
-
-        lineage.add(messagenumber.getAndIncrement());
-
-        if (LOG_MODIFICATIONS) {
-            modHistory = new ArrayList<Throwable>();
-            incMessageModCount();
-        }
-        
-        if (!clone && GLOBAL_TRACKING_ELEMENT) {
-            UUID tracking = UUIDFactory.newSeqUUID();
-
-            MessageElement trackingElement = new StringMessageElement("Tracking UUID", tracking.toString(), null);
-
-            addMessageElement("jxta", trackingElement);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Duplicates the Message. The returned duplicate is a real copy. It may
-     * be freely modified without causing change to the originally cloned
-     * message.
-     *
-     * @return Message a Message that is a copy of the original message
-     */
-    @Override
-    public Message clone() {
-        Message clone = new Message(getDefaultNamespace(), true );
-
-        clone.lineage.addAll(lineage);
-        clone.elements.addAll(elements);
-
-        for (String aNamespace : namespaces.keySet()) {
-            List<MessageElement> namespaceElements = namespaces.get(aNamespace);
-
-            List<MessageElement> newNamespaceElements = new ArrayList<MessageElement>(namespaceElements.size());
-
-            newNamespaceElements.addAll(namespaceElements);
-            clone.namespaces.put(aNamespace, newNamespaceElements);
-        }
-
-        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-            LOG.finer("Created clone " + clone + " of " + this);
-        }
-
-        return clone;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Compare this Message against another. Returns {@code true} if all of the
-     * elements are identical and in the same order. Message properties
-     * (setProperty()/getProperty()) are not considered in the calculation.
-     *
-     * @param target The Message to compare against.
-     * @return {@code true} if the elements are identical otherwise
-     * {@code false}.
-     */
-    @Override
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        }
-
-        if (target instanceof Message) {
-            Message likeMe = (Message) target;
-
-            ElementIterator myElements = getMessageElements();
-            ElementIterator itsElements = likeMe.getMessageElements();
-
-            while (myElements.hasNext()) {
-                if (!itsElements.hasNext()) {
-                    return false; // it has fewer than i do.
-                }
-
-                MessageElement mine = myElements.next();
-                MessageElement its = itsElements.next();
-
-                if (!myElements.getNamespace().equals(itsElements.getNamespace())) {
-                    return false; // elements not in the same namespace
-                }
-
-                if (!mine.equals(its)) {
-                    return false; // content didnt match
-                }
-            }
-
-            return (!itsElements.hasNext()); // ran out at the same time?
-        }
-
-        return false; // not a message
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        int result = 0;
-        Iterator<MessageElement> eachElement = getMessageElements();
-
-        while (eachElement.hasNext()) {
-            MessageElement anElement = eachElement.next();
-
-            result += anElement.hashCode();
-            result *= 6037; // a prime
-        }
-
-        if (0 == result) {
-            result = 1;
-        }
-
-        return result;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * This implementation is intended to assist debugging. You should not
-     * depend upon the format of the result.
-     */
-    @Override
-    public String toString() {
-        StringBuilder toString = new StringBuilder(128);
-
-        toString.append(getClass().getName());
-        toString.append('@');
-        toString.append(super.hashCode());
-        toString.append('(');
-        toString.append(modCount);
-        toString.append("){");
-
-        Iterator allLineage = getMessageLineage();
-
-        while (allLineage.hasNext()) {
-            toString.append(allLineage.next().toString());
-            if (allLineage.hasNext()) {
-                toString.append(',');
-            }
-        }
-
-        toString.append('}');
-
-        if (GLOBAL_TRACKING_ELEMENT) {
-            toString.append("[");
-            Iterator eachUUID = getMessageElements("jxta", "Tracking UUID");
-
-            while (eachUUID.hasNext()) {
-                toString.append("[");
-                toString.append(eachUUID.next().toString());
-                toString.append("]");
-                if (eachUUID.hasNext()) {
-                    toString.append(',');
-                }
-            }
-            toString.append("]");
-        }
-
-        return toString.toString();
-    }
-
-    /**
-     * Read this Object in for Java Serialization
-     *
-     * @param s The stream from which the Object will be read.
-     * @throws IOException            for errors reading from the input stream.
-     * @throws ClassNotFoundException if the serialized representation contains
-     *                                references to classes which cannot be found.
-     */
-    private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
-        // reads defaultNamespace, modifiable flag
-        s.defaultReadObject();
-
-        MimeMediaType readType = new MimeMediaType(s.readUTF());
-
-        // XXX bondolo 20040307 Should do something with encoding here.
-
-        Message readMessage = WireFormatMessageFactory.fromWire(s, readType, null);
-
-        namespaces = readMessage.namespaces;
-        elements = readMessage.elements;
-
-        if (!namespaces.containsKey(defaultNamespace)) {
-            throw new IOException("Corrupted Object--does not contain required namespace.");
-        }
-
-        properties = new HashMap<Object, Object>();
-        lineage = new ArrayList<Integer>();
-
-        lineage.add(messagenumber.getAndIncrement());
-
-        if (LOG_MODIFICATIONS) {
-            modHistory = new ArrayList<Throwable>();
-            incMessageModCount();
-        }
-    }
-
-    /**
-     * Write this Object out for Java Serialization
-     *
-     * @param s The stream to which the Object will be written.
-     * @throws IOException for errors writing to the output stream.
-     */
-    private void writeObject(ObjectOutputStream s) throws IOException {
-        s.defaultWriteObject();
-
-        MimeMediaType writeType = WireFormatMessageFactory.DEFAULT_WIRE_MIME;
-
-        s.writeUTF(writeType.toString());
-
-        // XXX bondolo 20040307 Should do something with encoding here.
-
-        WireFormatMessage serialed = WireFormatMessageFactory.toWire(this, writeType, null);
-
-        serialed.sendToStream(s);
-    }
-
-    /**
-     * Return the default Namespace of this message.
-     *
-     * @return The default namespace for this message.
-     */
-    protected String getDefaultNamespace() {
-        return defaultNamespace;
-    }
-
-    /**
-     * Add a MessageElement into the message. The MessageElement is stored in
-     * the default namespace.
-     *
-     * @param add the Element to add to the message.
-     */
-    public void addMessageElement(MessageElement add) {
-
-        addMessageElement(null, add);
-    }
-
-    /**
-     * Add a MessageElement into the message using the specified namespace.
-     *
-     * @param namespace contains the namespace of the element to add. You can
-     *                  specify null as a shorthand for the default namespace.
-     * @param add       the MessageElement to add to the message.
-     */
-    public void addMessageElement(String namespace, MessageElement add) {
-        addMessageElement(namespace, add, null);
-    }
-
-    /**
-     * Add a MessageElement into the Message using the specified namespace.
-     *
-     * @param namespace contains the namespace of the element to add. You can
-     *                  specify null as a shorthand for the default namespace.
-     * @param add       the MessageElement to add to the message.
-     * @param signature The signature MessageElement associated with the
-     *                  MessageElement. This allows for an alternate signature element to the
-     *                  signature element associated with the message element.
-     */
-    public void addMessageElement(String namespace, MessageElement add, MessageElement signature) {
-        if (null == namespace) {
-            namespace = getDefaultNamespace();
-        }
-
-        if (null == add) {
-            throw new IllegalArgumentException("Message Element must be non-null");
-        }
-
-        elements.add(new element(namespace, add, signature));
-
-        List<MessageElement> namespaceElements = namespaces.get(namespace);
-
-        if (null == namespaceElements) {
-            namespaceElements = new ArrayList<MessageElement>();
-            namespaces.put(namespace, namespaceElements);
-        }
-
-        namespaceElements.add(add);
-        incMessageModCount();
-        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-            LOG.finer( "Added " + namespace + "::" + add.getElementName() + "/" + 
-                    add.getClass().getName() + "@" + add.hashCode() + " to " + this);
-        }
-    }
-
-    /**
-     * Replace a {@link net.jxta.endpoint.MessageElement} in the message. This
-     * method will remove all MessageElement instances in the default namespace
-     * which match the specified name (if any) and then insert the replacement
-     * element. The existing version of the element is returned, if more than
-     * one matching element was removed, a random matching element is returned.
-     * <p/>
-     * For greatest control over element replacement, use the
-     * {@link java.util.ListIterator#set(java.lang.Object)} method as returned
-     * by {@link #getMessageElements()},
-     * {@link #getMessageElements(java.lang.String)} or
-     * {@link #getMessageElementsOfNamespace(java.lang.String)}
-     *
-     * @param replacement the Element to be inserted into to the message.
-     * @return One of the elements which was replaced or null if no existing
-     *         matching item was located.
-     */
-    public MessageElement replaceMessageElement(MessageElement replacement) {
-        return replaceMessageElement(null, replacement);
-    }
-
-    /**
-     * Replace a {@link net.jxta.endpoint.MessageElement} in the message using the specified
-     * namespace. This method will remove all MessageElement instances which
-     * match the specified name (if any) and then insert the replacement
-     * element. The existing version of the element is returned, if more than
-     * one matching element was removed, a random matching element is returned.
-     * <p/>
-     * For greatest control over element replacement, use the
-     * {@link java.util.ListIterator#set(java.lang.Object)} method as returned
-     * by {@link #getMessageElements()},
-     * {@link #getMessageElements(java.lang.String)} or
-     * {@link #getMessageElementsOfNamespace(java.lang.String)}
-     *
-     * @param namespace   contains the namespace of the element to be replaced.
-     *                    You can specify null as a shorthand for the default namespace.
-     * @param replacement the Element to be inserted into to the message.
-     * @return One of the elements which was replaced or null if no existing
-     *         matching item was located.
-     */
-    public MessageElement replaceMessageElement(String namespace, MessageElement replacement) {
-        if (null == namespace) {
-            namespace = getDefaultNamespace();
-        }
-
-        if (null == replacement) {
-            throw new IllegalArgumentException("Message Element must be non-null");
-        }
-
-        MessageElement removed = null;
-        Iterator<MessageElement> allMatching = getMessageElements(namespace, replacement.getElementName());
-
-        while (allMatching.hasNext()) {
-            MessageElement anElement = allMatching.next();
-
-            allMatching.remove();
-            removed = anElement;
-        }
-
-        addMessageElement(namespace, replacement); // updates mod count
-
-        return removed;
-    }
-
-    /**
-     * Returns an iterator of the namespaces present in this message.
-     *
-     * @return iterator of strings of the namespaces of this message.
-     */
-    public Iterator<String> getMessageNamespaces() {
-        return Collections.unmodifiableMap(namespaces).keySet().iterator();
-    }
-
-    /**
-     * Retrieve a message element by name from the message without regard to
-     * namespace. If there is more than one message element with this name, the
-     * first message element will be returned.
-     *
-     * @param name The name of the message element to attempt to retrieve.
-     * @return Element the element or null if no matching element could be
-     *         found.
-     */
-    public MessageElement getMessageElement(String name) {
-        Iterator<element> eachElement = elements.listIterator();
-
-        while (eachElement.hasNext()) {
-            element anElement = eachElement.next();
-
-            if (name.equals(anElement.element.getElementName())) {
-                return anElement.element;
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * Retrieve a message element by name in the specified namespace from the
-     * message. If there is more than one message element matching this name,
-     * the first message element will be returned.
-     *
-     * @param namespace contains the namespace of the element to get. You can
-     *                  specify {@code null} as a shorthand for the default namespace.
-     * @param name      The name of the message element to retrieve.
-     * @return The Message Element or {@code null} if no matching message
-     *         element could be found.
-     */
-    public MessageElement getMessageElement(String namespace, String name) {
-        if (null == namespace) {
-            namespace = getDefaultNamespace();
-        }
-
-        List<MessageElement> namespaceElements = namespaces.get(namespace);
-
-        // no namespace means no element.
-        if (null == namespaceElements) {
-            return null;
-        }
-
-        Iterator<MessageElement> eachElement = namespaceElements.listIterator();
-
-        while (eachElement.hasNext()) {
-            MessageElement anElement = eachElement.next();
-
-            if (name.equals(anElement.getElementName())) {
-                return anElement;
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * Returns a list iterator of all of the elements contained in this message.
-     * Elements from all namespaces are returned.
-     * <p/>
-     * The iterator returned is not synchronized with the message and will
-     * throw {@link java.util.ConcurrentModificationException} if the
-     * message is modified.
-     *
-     * @return Enumeration of Elements.
-     */
-    public ElementIterator getMessageElements() {
-        List<element> theMsgElements = new ArrayList<element>(elements);
-
-        return new ElementIterator(theMsgElements.listIterator());
-    }
-
-    /**
-     * Returns a list iterator  of all of the elements contained in this
-     * message who's name matches the specified name. Elements from all
-     * namespaces are returned. Message Elements are iterated in the order in
-     * which they were added to the Message.
-     * <p/>
-     * The iterator returned is not synchronized with the message and will
-     * throw {@link java.util.ConcurrentModificationException} if the
-     * message is modified.
-     *
-     * @param name the name of the elements to match against
-     * @return iterator of the elements matching the specified name, if any.
-     */
-    public ElementIterator getMessageElements(String name) {
-        List<element> theMsgElements = new ArrayList<element>(elements.size());
-
-        for (element anElement : elements) {
-            if (name.equals(anElement.element.getElementName())) {
-                theMsgElements.add(anElement);
-            }
-        }
-
-        return new ElementIterator(theMsgElements.listIterator());
-    }
-
-    /**
-     * Returns a list iterator of all of the elements contained in this message
-     * which match the specified namespace. Message Elements are iterated in
-     * the order in which they were added to the Message.
-     * <p/>
-     * The ListIterator returned is not synchronized with the message. If
-     * you modify the state of the Message, the iterator will throw
-     * ConcurrentModificationException when {@code next()} or
-     * {@code previous()} is called.
-     *
-     * @param namespace contains the namespace which must be matched in the
-     *                  elements returned. You can specify {@code null} as a shorthand for the
-     *                  default namespace.
-     * @return Iterator of Message Elements matching namespace.
-     */
-    public ElementIterator getMessageElementsOfNamespace(String namespace) {
-        List<element> theMsgElements = new ArrayList<element>(elements.size());
-
-        if (null == namespace) {
-            namespace = getDefaultNamespace();
-        }
-
-        for (element anElement : elements) {
-            if (namespace.equals(anElement.namespace)) {
-                theMsgElements.add(anElement);
-            }
-        }
-
-        return new ElementIterator(theMsgElements.listIterator());
-    }
-
-    /**
-     * Returns a list iterator  of all of the elements contained in the
-     * specified namespace who's name matches the specified name in the order
-     * in which they were added to the Message.
-     * <p/>
-     * The iterator returned is not synchronized with the message and will
-     * throw {@link java.util.ConcurrentModificationException} if the message
-     * is modified.
-     *
-     * @param namespace The namespace which must be matched in the elements
-     *                  returned. You can specify {@code null} as a shorthand for the default
-     *                  namespace.
-     * @param name      The name of the elements to retrieve.
-     * @return Iterator of Message Elements matching namespace and name.
-     */
-    public ElementIterator getMessageElements(String namespace, String name) {
-        List<element> theMsgElements = new ArrayList<element>(elements.size());
-
-        if (null == namespace) {
-            namespace = getDefaultNamespace();
-        }
-
-        for (element anElement : elements) {
-            if (namespace.equals(anElement.namespace) && name.equals(anElement.element.getElementName())) {
-                theMsgElements.add(anElement);
-            }
-        }
-
-        return new ElementIterator(theMsgElements.listIterator());
-    }
-
-    /**
-     * Returns a list iterator of all of the elements contained in this message
-     * whose mime-type matchs the given in the order they were added to the
-     * message. Elements from all namespaces are returned.
-     * <p/>
-     * The iterator returned is not synchronized with the message and will
-     * throw {@link java.util.ConcurrentModificationException} if the
-     * message is modified.
-     *
-     * @param type contains the type of the elements to get
-     * @return Iterator of Message Elements matching type.
-     */
-    public ElementIterator getMessageElements(MimeMediaType type) {
-        List<element> theMsgElements = new ArrayList<element>(elements.size());
-
-        ListIterator<element> eachElement = elements.listIterator();
-
-        while (eachElement.hasNext()) {
-            element anElement = eachElement.next();
-
-            if (type.equals(anElement.element.getMimeType())) {
-                theMsgElements.add(anElement);
-            }
-        }
-
-        return new ElementIterator(theMsgElements.listIterator());
-    }
-
-    /**
-     * Returns a list iterator of all of the elements contained in this message
-     * whose type matches the given in the order they were added to the message.
-     * <p/>
-     * The iterator returned is not synchronized with the message and will
-     * throw {@link java.util.ConcurrentModificationException} if the
-     * message is modified.
-     *
-     * @param namespace contains the namespace which must be matched in the
-     *                  elements returned. You can specify null as a shorthand for the default
-     *                  namespace.
-     * @param type      contains the type of the elements to get
-     * @return Iterator of Message Elements matching namespace and matching
-     *         type.
-     */
-    public ElementIterator getMessageElements(String namespace, MimeMediaType type) {
-        List<element> theMsgElements = new ArrayList<element>(elements.size());
-
-        if (null == namespace) {
-            namespace = getDefaultNamespace();
-        }
-
-        for (element anElement : elements) {
-            if (namespace.equals(anElement.namespace) && type.equals(anElement.element.getMimeType())) {
-                theMsgElements.add(anElement);
-            }
-        }
-
-        return new ElementIterator(theMsgElements.listIterator());
-    }
-
-    /**
-     * Remove an the first occurrence of the provided MessageElement from the
-     * message.
-     *
-     * @param remove the Element to remove from the message.
-     * @return boolean returns true if the element was removed, otherwise false.
-     */
-    public boolean removeMessageElement(MessageElement remove) {
-        Iterator<MessageElement> eachElement = getMessageElements();
-
-        while (eachElement.hasNext()) {
-            MessageElement anElement = eachElement.next();
-
-            if (remove == anElement) {
-                eachElement.remove(); // updates mod count
-
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-    /**
-     * Remove the first occurrence of the provided MessageElement within the
-     * specified namespace from the message.  You can specify null as a
-     * shorthand for the default namespace.
-     *
-     * @param namespace the namespace from which the element is to be removed.
-     * @param remove    the Element to remove from the message.
-     * @return boolean returns true if the element was removed, otherwise false.
-     */
-    public boolean removeMessageElement(String namespace, MessageElement remove) {
-        Iterator<MessageElement> eachElement = getMessageElementsOfNamespace(namespace);
-
-        while (eachElement.hasNext()) {
-            MessageElement anElement = eachElement.next();
-
-            if (remove == anElement) {
-                eachElement.remove(); // updates mod count
-
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-    /**
-     * Removes all of the elements in all namespaces from the message. Also
-     * clears any properties set for this message.
-     */
-    public void clear() {
-        elements.clear();
-        namespaces.clear();
-        properties.clear();
-        // a cleared message has no ancestors
-        lineage.retainAll(Collections.singletonList(lineage.get(0)));
-
-        incMessageModCount();
-
-        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-            LOG.finer("Cleared " + this);
-        }
-    }
-
-    /**
-     * Returns the aggregate size of all the member elements.
-     *
-     * @return the sum of all element sizes in bytes.
-     */
-    public synchronized long getByteLength() {
-        if (modCount != cachedByteLengthModCount) {
-            cachedByteLength = 0;
-            Iterator<MessageElement> eachElement = getMessageElements();
-
-            while (eachElement.hasNext()) {
-                MessageElement anElement = eachElement.next();
-
-                cachedByteLength += anElement.getByteLength();
-            }
-
-            cachedByteLengthModCount = modCount;
-        }
-
-        return cachedByteLength;
-    }
-
-    /**
-     * Returns the modification count of this message. This ever ascending
-     * number can be used to determine if the message has been modified by
-     * another thread or for use in caching of parts of the message structure.
-     *
-     * @return the modification count of this message.
-     */
-    public int getMessageModCount() {
-        return modCount;
-    }
-
-    /**
-     * Returns the modification count of this message. This ever ascending
-     * number can be used to determine if the message has been modified by
-     * another thread or for use in caching of parts of the message structure.
-     *
-     * @return the modification count of this message.
-     */
-    protected synchronized int incMessageModCount() {
-        modCount++;
-
-        if (LOG_MODIFICATIONS) {
-            modHistory.add(new Throwable(Long.toString(System.currentTimeMillis()) + " : " + Thread.currentThread().getName()));
-        }
-
-        if (!modifiable) {
-            IllegalStateException failure = new IllegalStateException("Unmodifiable message should not have been modified");
-
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, failure.getMessage(), failure);
-            }
-            throw failure;
-        }
-
-        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-            LOG.finer("Modification to " + this);
-        }
-
-        return modCount;
-    }
-
-    /**
-     * Returns a String containing the modification history for this message
-     *
-     * @return a String containing the modification history for this message.
-     */
-    public synchronized String getMessageModHistory() {
-
-        if (LOG_MODIFICATIONS) {
-            StringBuilder modHistoryStr = new StringBuilder("Message Modification History for ");
-
-            modHistoryStr.append(toString());
-            modHistoryStr.append("\n\n");
-            for (int eachMod = modHistory.size() - 1; eachMod >= 0; eachMod--) {
-                StringWriter aStackStr = new StringWriter();
-                Throwable aStack = modHistory.get(eachMod);
-
-                aStack.printStackTrace(new PrintWriter(aStackStr));
-                modHistoryStr.append("Modification #");
-                modHistoryStr.append(eachMod + 1);
-                modHistoryStr.append(":\n\n");
-                modHistoryStr.append(aStackStr.toString());
-                modHistoryStr.append("\n");
-            }
-            return modHistoryStr.toString();
-        } else {
-            return "Modification history tracking is disabled";
-        }
-    }
-
-    /**
-     * Returns the message number of this message. Message Numbers are intended
-     * to assist with debugging and the management of message cloning.
-     * <p/>
-     * Each message is assigned a unique number upon creation. Message
-     * Numbers are monotonically increasing for each message created.
-     * <p/>
-     * Message Numbers are transient, ie. if the message object is
-     * serialized then the message number after deserialization will be
-     * probably be a different value. Message numbers should not be used to
-     * record permanent relationships between messages.
-     *
-     * @return int this message's message number.
-     */
-    public int getMessageNumber() {
-        return lineage.get(0);
-    }
-
-    /**
-     * Returns an iterator which describes the lineage of this message. Each
-     * entry is an {@link java.lang.Integer} Message Number. The first entry is
-     * this message's number, following entries are the ancestors of this
-     * message.
-     *
-     * @return an Iterator of {@link java.lang.Integer}. Each entry is a
-     *         message number.
-     */
-    public Iterator<Integer> getMessageLineage() {
-        return Collections.unmodifiableList(lineage).iterator();
-    }
-
-    /**
-     * Associate a transient property with this message. if there was a
-     * previous value for the key provided then it is returned. This feature is
-     * useful for managing the state of messages during processing and for
-     * caching. <strong>Message Properties are not transmitted as part of the
-     * Message when the message is serialized!</strong>
-     * <p/>
-     * The setting of particular keys may be controlled by a Java Security
-     * Manager. Keys of type 'java.lang.Class' are checked against the caller of
-     * this method. Only callers which are instances of the key class may modify
-     * the property. This check is not possible through reflection. All other
-     * types of keys are unchecked.
-     *
-     * @param key   the property key
-     * @param value the value for the property
-     * @return previous value for the property or null if no previous
-     */
-    public Object setMessageProperty(Object key, Object value) {
-
-        /*
-         if( key instanceof java.lang.Class ) {
-         Class keyClass = (Class) key;
-         SecurityManager secure =  new SecurityManager() {
-         public boolean checkCallerOfClass( Class toCheck ) {
-         Class [] context = getClassContext();
-
-         return toCheck.isAssignableFrom( context[2] );
-         }
-         };
-
-         if( !secure.checkCallerOfClass( keyClass ) ) {
-         throw new SecurityException( "You can't set that key from this context." );
-         }
-         }
-         */
-
-        Object res = properties.put(key, value);
-
-        // Any property addition (including redundant) is notified. Removals are
-        // too, since removal is done by assigning null.
-
-        // Exception: when removing what was not there: no notification.
-
-        if (res != null || value != null) {
-            notifyChange();
-        }
-
-        return res;
-    }
-
-    /**
-     * Retrieves a transient property from the set for this message.
-     *
-     * @param key the property key.
-     * @return value for the property or null if no property for this key.
-     */
-    public Object getMessageProperty(Object key) {
-
-        return properties.get(key);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void itemChanged(SimpleSelectable o) {// For now, messages are not themselves registered with anything.
-        // Therefore itemChanged does not do a thing.
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessageElement.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessageElement.java
deleted file mode 100644 (file)
index 5c004c9..0000000
+++ /dev/null
@@ -1,567 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.endpoint;
-
-
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.Reader;
-import java.lang.ref.SoftReference;
-import java.util.HashMap;
-import java.util.Map;
-
-import java.io.UnsupportedEncodingException;
-import java.util.UUID;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import net.jxta.document.Document;
-import net.jxta.document.MimeMediaType;
-import net.jxta.util.CountingOutputStream;
-import net.jxta.util.DevNullOutputStream;
-
-// imported for implementation of {@link #getSequentialName()}
-import net.jxta.impl.id.UUID.UUIDFactory;
-
-
-/**
- * JXTA Message Elements are used to add data to a JXTA Message. Message 
- * Elements are immutable objects. A Message Element may be shared amongst as 
- * many messages as is desired. 
- * <p/>
- * Several Message Element sub-classes are provided for handling various types
- * of data. All Message Elements are internally converted to raw bytes when sent
- * as part of a Message. The various Message Element flavors are provided for
- * convenience and efficiency. They enable the simplest creation and most 
- * efficient conversion from the individual data types to the appropriate binary 
- * data. <b>Because Message Elements are merely a convenient representation for 
- * binary data the object type of Message Element received by a peer may not 
- * be the same as was sent by the sending peer.</b> Even though the Message 
- * Element container may change during transmission the data contained in the 
- * Message Element is faithfully preserved.
- * <p/>
- * A Message Element is composed of four components:
- * <p/>
- * <ul>
- * <li>An optional name. This may be any {@link java.lang.String}. Unnamed
- * elements are assumed to have the name "" (the empty string).</li>
- * <li>An optional {@link net.jxta.document.MimeMediaType}. If not specified
- * the Mime Media Type is assumed to be "Application/Octet-Stream".</li>
- * <li>Data. Sub-classes of MessageElement allow you to create elements based
- * on a variety of data formats.</li>
- * <li>An optional signature. This is a Message Element that is associated to
- * this element and may contain a cryptographic signature/hash of this message
- * element.
- * </li>
- * </ul>
- * <p/>
- * <p/>The data contained within a MessageElement is accessible in four ways:
- * <p/>
- * <ul>
- * <li>As an {@link java.io.InputStream} from {@link #getStream()}</li>
- * <li>Sending the data a {@link java.io.OutputStream} via {@link #sendToStream(OutputStream)}</li>
- * <li>As a {@link java.lang.String} from {@link #toString()}</li>
- * <li>As a byte array from  from {@link #getBytes(boolean)}</li>
- * </ul>
- *
- * @see net.jxta.endpoint.Message
- */
-public abstract class MessageElement implements Document {
-
-    /**
-     * Logger
-     */
-    private static transient final Logger LOG = Logger.getLogger(MessageElement.class.getName());
-
-    /**
-     * The name of this element. May be the empty string ("") if the element is
-     * unnamed.
-     */
-    protected final String name;
-
-    /**
-     * The type of this element.
-     */
-    protected final MimeMediaType type;
-
-    /**
-     * The optional element which digitally signs or digests this element.
-     * If null then the element is has no signature element.
-     */
-    protected final MessageElement sig;
-
-    /**
-     * message properties hashmap
-     */
-    private Map<Object,Object> properties = null;
-
-    /**
-     * cached result of {@link #getByteLength()} operation.
-     */
-    protected transient long cachedGetByteLength = -1;
-
-    /**
-     * cached result of {@link #getBytes(boolean)} operation.
-     */
-    protected transient SoftReference<byte[]> cachedGetBytes = null;
-
-    /**
-     * cached result of {@link #toString()} operation.
-     */
-    protected transient SoftReference<String> cachedToString = null;
-
-    /**
-     * Returns a pseudo-random unique string which can be used as an element
-     * name.
-     *
-     * @return String containing a pseudo-random value
-     */
-    public static String getUniqueName() {
-        return UUID.randomUUID().toString();
-    }
-
-    /**
-     * Returns a string containing a pseudo-random unique string. The result of
-     * <code>String.compare()</code> will be consistent with the order in which
-     * results were returned from this function.
-     * <p/>
-     * <p/>Security Consideration : Be aware that the pseudo random portion of
-     * the names generated by this string are shared amongst all peer groups
-     * running in the same classloader. You may be at a risk for loss of
-     * anonymity if you use the element names produced in more than one peer
-     * group.
-     *
-     * @return String containing a pseudo-random value. The result of
-     *         <code>String.compare()</code> will be consistent with the order in
-     *         which results were returned from this function.
-     */
-    public static String getSequentialName() {
-        return UUIDFactory.newSeqUUID().toString();
-    }
-
-    /**
-     * Internal constructor for initializing everything but the data.
-     *
-     * @param name Name of the Element. May be the empty string ("") if
-     *             the Element is not named.
-     * @param type Type of the Element. null is equivalent to specifying
-     *             the type "Application/Octet-stream"
-     * @param sig  optional message digest/digital signature element. If
-     *             no signature is to be specified, pass null.
-     */
-    protected MessageElement(String name, MimeMediaType type, MessageElement sig) {
-        this.name = (null != name) ? name : "";
-
-        this.type = (null != type) ? type.intern() : MimeMediaType.AOS;
-
-        if ((null != sig) && (null != sig.sig)) {
-            throw new IllegalArgumentException("Invalid Signature Element. Signatures may not have signatures.");
-        }
-
-        this.sig = sig;
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * @deprecated Since Message Elements are immutable this method does
-     *             nothing useful.
-     */
-    @Override
-    @Deprecated
-    public final MessageElement clone() {
-        return this;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * <p/>Elements are considered equal if they have the same name, type and
-     * signatures. Element data is not considered by this implementation as
-     * it is mostly intended for subclass use.
-     */
-    @Override
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true; // same object
-        }
-
-        if (target instanceof MessageElement) {
-            MessageElement likeMe = (MessageElement) target;
-
-            // sig is nullable so test seperatly.
-            boolean sigequals = (null != sig) ? sig.equals(likeMe.sig) : (null == likeMe.sig);
-
-            return sigequals && name.equals(likeMe.name) && type.equals(likeMe.type);
-        }
-
-        return false; // not a MessageElement
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        int sigHash = ((null != getSignature()) && (this != getSignature())) ? getSignature().hashCode() : 1;
-
-        int result = sigHash * 2467 + // a prime
-                getElementName().hashCode() * 3943 + // also a prime
-                getMimeType().hashCode();
-
-        return (0 != result) ? result : 1;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * <p/>Returns a String representation of the element data. The
-     * <code>'charset'</code> parameter of the message element's mimetype, if
-     * any, is used to determine encoding. If the charset specified is
-     * unsupported then the default encoding will be used.
-     * <p/>
-     * <p/>synchronized for caching purposes.
-     */
-    @Override
-    public synchronized String toString() {
-        String result;
-
-        if (null != cachedToString) {
-            result = cachedToString.get();
-
-            if (null != result) {
-                return result;
-            }
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("creating toString of " + getClass().getName() + '@' + Integer.toHexString(hashCode()));
-        }
-
-        String charset = type.getParameter("charset");
-
-        StringBuilder theString = new StringBuilder();
-
-        Reader asString;
-
-        try {
-            if (null == charset) {
-                asString = new InputStreamReader(getStream());
-            } else {
-                try {
-                    asString = new InputStreamReader(getStream(), charset);
-                } catch (UnsupportedEncodingException caught) {
-                    throw new IllegalStateException("Unsupported charset : " + charset);
-                }
-            }
-
-            char[] characters = new char[256];
-
-            do {
-                int res = asString.read(characters);
-
-                if (res < 0) {
-                    break;
-                }
-
-                theString.append(characters, 0, res);
-            } while (true);
-
-            result = theString.toString();
-
-            cachedToString = new SoftReference<String>(result);
-            return result;
-        } catch (IOException caught) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Could not generate string for element. ", caught);
-            }
-
-            throw new IllegalStateException("Could not generate string for element. " + caught);
-        }
-    }
-
-    /**
-     * Returns the name of the MessageElement. Unnamed elements will return
-     * the empty string ("");
-     *
-     * @return String containing the name of the MessageElement.
-     */
-    public String getElementName() {
-        return name;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * <p/>Will return "Application/Octet-Stream" if no type was originally
-     * specified.
-     */
-    public MimeMediaType getMimeType() {
-        return type;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * <p/>We use the "unknown" extension and leave it to sub-classes to
-     * extend this. If we had a mailcap facility we could do better
-     * classification based on mimetype.
-     */
-    public String getFileExtension() {
-        return "???";
-    }
-
-    /**
-     * Returns the size of the element data in bytes.
-     *
-     * @return long containing the size of the element data.
-     */
-    public synchronized long getByteLength() {
-        if (cachedGetByteLength >= 0) {
-            return cachedGetByteLength;
-        }
-
-        CountingOutputStream countBytes = new CountingOutputStream(new DevNullOutputStream());
-
-        try {
-            sendToStream(countBytes);
-            cachedGetByteLength = countBytes.getBytesWritten();
-            return cachedGetByteLength;
-        } catch (IOException caught) {
-            throw new IllegalStateException("Could not get length of element : " + caught.toString());
-        }
-    }
-
-    /**
-     * Returns a byte array which contains the element data. The byte array
-     * returned <b>may be shared amongst all copies of the element</b>,
-     * do not modify it. The <code>copy</code> parameter allows you to request a
-     * private, modifiable copy of the element data.
-     * <p/>
-     * <p/>This implementation builds the byte array from the stream.
-     *
-     * @param copy If true then the result can be modified without damaging the state of this
-     *             MessageElement. If false, then the result may be a shared copy of the data and
-     *             should be considered read-only.
-     * @return byte[] Contents of message element.
-     */
-    public synchronized byte[] getBytes(boolean copy) {
-        byte[] result;
-
-        if (null != cachedGetBytes) {
-            result = cachedGetBytes.get();
-
-            if (null != result) {
-                if (copy) {
-                    byte[] theCopy = new byte[result.length];
-
-                    System.arraycopy(theCopy, 0, result, 0, result.length);
-                } else {
-                    return result;
-                }
-            }
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("creating getBytes of " + getClass().getName() + '@' + Integer.toHexString(hashCode()));
-        }
-
-        long len = getByteLength();
-
-        if (len > Integer.MAX_VALUE) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("MessageElement is too large to be stored in a byte array.");
-            }
-
-            throw new IllegalStateException("MessageElement is too large to be stored in a byte array.");
-        }
-
-        result = new byte[(int) len];
-
-        try {
-            DataInput di = new DataInputStream(getStream());
-
-            di.readFully(result);
-        } catch (IOException caught) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Failed to get bytes of Message Element. ", caught);
-            }
-            throw new IllegalStateException("Failed to get bytes of Message Element. " + caught);
-        }
-
-        // if this is supposed to be a shared buffer then we can cache it.
-        if (!copy) {
-            cachedGetBytes = new SoftReference<byte[]>(result);
-        }
-
-        return result;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * <p/>This version probably has sub-optimal performance. Sub-classes
-     * should override this implementation.
-     */
-    public void sendToStream(OutputStream sendTo) throws IOException {
-        copyInputStreamToOutputStream(getStream(), sendTo);
-    }
-
-    /**
-     * Returns the element containing the digest/digital signature for
-     * this element
-     *
-     * @return Element containing the digital signature.
-     */
-    public MessageElement getSignature() {
-
-        return sig;
-    }
-
-    /**
-     * Associate a transient property with this element. If there was a previous
-     * value for the key provided then it is returned.
-     * <p/>
-     * <p/>Element properties are useful for managing the state of element
-     * during processing. Element properties are not transmitted with the
-     * message element when the message element is sent as part of a message.
-     * <p/>
-     * <p/>The setting of particular keys may be controlled by a Java Security
-     * Manager. Keys of type 'java.lang.Class' are checked against the caller of
-     * this method. Only callers which are instances of the key class may modify
-     * the property. This check is not possible through reflection. All other
-     * types of keys are unchecked.
-     *
-     * @param key   the property key
-     * @param value the value for the property
-     * @return previous value for the property or null if no previous
-     */
-    public synchronized Object setElementProperty(Object key, Object value) {
-
-        /*
-         if( key instanceof java.lang.Class ) {
-         Class keyClass = (Class) key;
-         SecurityManager secure =  new SecurityManager() {
-         public boolean checkCallerOfClass( Class toCheck ) {
-         Class [] context = getClassContext();
-
-         return toCheck.isAssignableFrom( context[2] );
-         }
-         };
-
-         if( !secure.checkCallerOfClass( keyClass ) ) {
-         throw new SecurityException( "You can't set that key from this context." );
-         }
-         }
-         */
-
-        if (null == properties) {
-            properties = new HashMap<Object,Object>();
-        }
-        
-        return properties.put(key, value);
-    }
-
-    /**
-     * Retrieves a transient property from the set for this element.
-     * 
-     * <p/>Element properties are useful for managing the state of element
-     * during processing. Element properties are not transmitted with the
-     * message element when the message element is sent as part of a message.
-     *
-     * @param key the property key.
-     * @return value for the property or null if there is no property for this
-     *         key.
-     */
-    public Object getElementProperty(Object key) {
-
-        if (null == properties) {
-            return null;
-        }
-        
-        return properties.get(key);
-    }
-
-    /**
-     * Copies an input stream to an output stream with buffering.
-     *
-     * @param source The stream to copy from.
-     * @param sink   The stream to send the data to.
-     * @throws IOException if there is a problem copying the data
-     */
-    protected static void copyInputStreamToOutputStream(InputStream source, OutputStream sink) throws IOException {
-        int c;
-        byte[] buf = new byte[4096];
-
-        do {
-            c = source.read(buf);
-
-            if (-1 == c) {
-                break;
-            }
-
-            sink.write(buf, 0, c);
-        } while (true);
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessageFilterListener.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessageFilterListener.java
deleted file mode 100644 (file)
index 1fd9d76..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.endpoint;
-
-
-/**
- * This interface is used by Message Filters.
- *
- * @see net.jxta.endpoint.EndpointService
- * @see net.jxta.endpoint.EndpointAddress
- * @see net.jxta.endpoint.Message
- */
-public interface MessageFilterListener {
-
-    /**
-     * This method is invoked by the EndpointService for each message for which
-     * this filter is registered.
-     * <p/>
-     * The src and destination addresses are the addresses as they were
-     * before any filters were run upon the message. If your filter is dependant
-     * upon the current value of thse addresses it should examine the message
-     * directly.
-     *
-     * @param message Incoming message
-     * @param srcAddr Endpoint Address of the <b>original</b> source of the message
-     * @param dstAddr Endpoint Address of the <b>original</b> destination of the message
-     * @return Message The potentially modified or alternate message. If null
-     *         is returned then the message has been discarded.
-     */
-    public Message filterMessage(Message message, EndpointAddress srcAddr, EndpointAddress dstAddr);
-
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessagePropagater.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessagePropagater.java
deleted file mode 100644 (file)
index d105c2a..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.endpoint;
-
-
-/**
- * A MessagePropagater is a MessageTransport that can send propagated
- * (multicast) messages.
- *
- * @see net.jxta.endpoint.MessageTransport
- * @see net.jxta.endpoint.Message
- * @see net.jxta.endpoint.Messenger
- * @see net.jxta.endpoint.EndpointService
- * @see net.jxta.endpoint.MessageSender
- * @see net.jxta.endpoint.MessageReceiver
- */
-public interface MessagePropagater extends MessageTransport {
-
-    /**
-     * Returns the {@link EndpointAddress} which will be used as the source
-     * address for all messages sent by this message sender. This is the
-     * "preferred" address to which replies should be sent. This address is not
-     * necessarily the best or only address by which the peer may be reached.
-     * <p/>
-     * The public address may also be for a different message transport.
-     *
-     * @return an EndpointAddress containing the public address for this
-     *         message receiver.
-     */
-    public EndpointAddress getPublicAddress();
-
-    /**
-     * Propagates a Message via this Message Transport.
-     *
-     * @param msg           The Message to be propagated.
-     * @param serviceName   Contains the name of the destination service, if any.
-     *                      This will be integrated into the destination address.
-     * @param serviceParams Contains the parameters associated with the service,
-     *                      if any. This will be integrated into the destination address.
-     * @param initialTTL    The requested initial TTL for this message. This value
-     *                      may be reduced by the implementation.
-     * @return {@code true} if the Message was propagated otherwise
-     *         {@code false}.
-     */
-    public boolean propagate(Message msg, String serviceName, String serviceParams, int initialTTL);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessageReceiver.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessageReceiver.java
deleted file mode 100644 (file)
index 766e20a..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.endpoint;
-
-
-import java.util.Iterator;
-
-
-/**
- * A MessageReceiver is a MessageTransport that is capable of receiving messages.
- * A MessageReceiver receives messages from the network and hands them to the
- * the {@link EndpointService} for processing. A Message Receiver is known by
- * the {@link EndpointAddress EndpointAddresses} it provides.
- *
- *  @see net.jxta.endpoint.EndpointAddress
- *  @see net.jxta.endpoint.MessageTransport
- *  @see net.jxta.endpoint.EndpointService
- **/
-public interface MessageReceiver extends MessageTransport {
-    
-    /**
-     *  Returns an Iterator of all of the
-     *  {@link EndpointAddress EndpointAddresses} by which this
-     *  MessageReceiver is reachable. The list is in order of
-     *  "preference" with the most "preferred" EndpointAddress being at the
-     *  beginning of the list.
-     *
-     * @return an Iterator of EndpointAddresses.
-     */
-    public Iterator<EndpointAddress> getPublicAddresses();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessageSender.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessageSender.java
deleted file mode 100644 (file)
index 84fad19..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.endpoint;
-
-
-import java.io.IOException;
-
-
-/**
- *  A MessageSender is a MessageTransport that is able to send messages to
- *  remote peers using some protocol. MessageSenders provide facilities for 
- *  sending point-to-point (unicast) messages.
- *
- *  <p/>MessageSenders additionally describe themselves in terms of their
- *  abilities.
- *  <dl>
- *  <dt>{@link #isConnectionOriented()}</dt><dd>Indicates that the
- *  Message Transport can provide efficient transport of a series of messages to
- *  the same destination</dd>
- *  <dt>{link@ #allowRouting()}</dt><dd>Indicates that the Message Transport 
- *  can be used in the routing of messages to destinations which are not 
- *  directly reachable via this transport.</dd>
- *  </dl>
- *
- *  @see net.jxta.endpoint.MessageTransport
- *  @see net.jxta.endpoint.Message
- *  @see net.jxta.endpoint.Messenger
- *  @see net.jxta.endpoint.EndpointService
- *  @see net.jxta.endpoint.MessageReceiver
- *  @see net.jxta.endpoint.MessagePropagater
- */
-public interface MessageSender extends MessageTransport {
-    
-    /**
-     *  Returns the {@link EndpointAddress} which will be used as the source
-     *  address for all messages sent by this message sender. This is the
-     *  "preferred" address to which replies should be sent. This address is not
-     *  necessarily the best or only address by which the peer may be reached.
-     *
-     *  <p/>The public address may also be for a different message transport.
-     *
-     *  @return an EndpointAddress containing the public address for this
-     *  message receiver.
-     */
-    public EndpointAddress getPublicAddress();
-    
-    /**
-     *  Returns {@code true} if the Message Transport is connection oriented
-     *  (like TCP/IP). Indicates that the Message Transport can provide 
-     *  efficient transport of a series of messages to the same destination.
-     *
-     *  @return {@code true} if the Message Transport is connection oriented.
-     */
-    public boolean isConnectionOriented();
-    
-    /**
-     *  Returns true if the Message Transport can be used by the EndpointRouter.
-     *  Indicates that the Message Transport can be used in the routing of
-     *  messages to destinations which are not directly reachable via this 
-     *  transport.
-     *
-     *  <p/>More specifically, this Message Transport will be used to route 
-     *  messages who's final destination is <b>not</b> one of the endpoint 
-     *  addresses available from {@code getReachableEndpointAddresses}.
-     *
-     * @return <tt>true</tt> if the protocol can be used by the EndpointRouter
-     */
-    public boolean allowsRouting();
-    
-    /**
-     *  Return a {@link Messenger} for sending messages to the specified
-     *  destination {@link EndpointAddress}.
-     *
-     @param dest The destination address for which a messenger is requested.
-     *  @param hint An optional hint for the transport to use when creating the 
-     *  messenger. The format of the hint is specific to each Message Transport
-     *  and may be {@code null} if no hint is provided.
-     *  @return a Messenger or {@code null} if the destination is not reachable.
-     */
-    public Messenger getMessenger(EndpointAddress dest, Object hint);
-    
-    /**
-     *  Returns {@code true} if the specified destination address is reachable 
-     *  via this Message Transport otherwise returns {@code false}.
-     *
-     *  @deprecated This operation is often very expensive and usually  
-     *  duplicates the work of {@link #getMessenger}. If you want to determine
-     *  the reachability of a destination, get a Messenger to the destination.
-     *
-     *  @param addr Address to ping
-     *  @return {@code true} if the specified destination address is reachable
-     *  via this Message Transport otherwise returns {@code false}.
-     */
-    @Deprecated
-    public boolean ping(EndpointAddress addr);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessageTransport.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessageTransport.java
deleted file mode 100644 (file)
index 36584ca..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.endpoint;
-
-
-/**
- *  A MessageTransport is responsible for sending and/or receiving JXTA
- *  messages from an external network. A MessageTransport may use whatever
- *  protocol it wishes in transporting messages. Messages passed to
- *  MessageTransports are required to pass the messages cleanly (unaltered).
- *
- * @see net.jxta.endpoint.EndpointService
- * @see net.jxta.endpoint.EndpointAddress
- * @see net.jxta.endpoint.MessageSender
- * @see net.jxta.endpoint.MessageReceiver
- */
-public interface MessageTransport {
-    
-    /**
-     * Returns a String containing the name of the protocol used by this
-     * MessageTransport. The value will match the "protocol" portion of all
-     * {@link EndpointAddress}.
-     *
-     * @return a String containing the name of the protocol used by this
-     * MessageTransport.
-     */
-    public String getProtocolName();
-    
-    /**
-     *  Returns the endpoint service with which this MessageTransport is
-     *  registered. If it is unregistered then null will be returned.
-     *
-     *  @return the EndpointService with which this MessageTransport is
-     *  registered.
-     */
-    public EndpointService getEndpointService();
-
-    /**
-     * Pass a transport control object to a message transport.
-     *
-     * @param operation Object that specifies the type of control operation 
-     * to be performed
-     * @param value Object that specifies a value object associated 
-     *              with the control operation
-     * @return returned object
-     * @deprecated Under development, may change.
-     */
-    @Deprecated
-    public Object transportControl(Object operation, Object value);
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/Messenger.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/Messenger.java
deleted file mode 100644 (file)
index 34b1633..0000000
+++ /dev/null
@@ -1,696 +0,0 @@
-/*
- * Copyright (c) 2004-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.endpoint;
-
-
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.util.SimpleSelectable;
-
-import java.io.IOException;
-
-
-/**
- * A Messenger is used to send messages to a destination.
- * <p/>
- * This interface specifies the allowed observable states for a messenger. (fine grain).  This serves to normalize
- * the state machines of the various messenger implementations and allows for more meaningful diagnostics. Implementations may
- * use substates by adding high order bits, but these should never be reported by the public state observation methods. Most
- * implementations will not use all these states.
- * <p/>
- * <p/>Each valid state is represented by a integer that is a power of 2.
- * <p/>
- * <p/>The (coarse grain) constants: <code>USABLE, RESOLVED, TERMINAL, IDLE, SATURATED</code> represent meaningful partitions of the space of
- * states.
- * <p/>
- * <p/>The value of each constant is the bitwise <code>OR</code> of the states for which a given predicate is true: usable or not,
- * confirmed or not, etc.  Therefore the value of predicate <code>p</code> in state <code>s</code> is <code>(s & p)!=0</code>.
- * <p/>
- * <p/>These particular predicates are chosen so that they have a relevant truth value for all states. Therefore the bitwise negation
- * of the corresponding constants represents the obvious: <code>~USABLE</code> really lists all states that mean "not USABLE".
- * <p/>
- * <p/>These constants may be combined by bit logic operators to represent more predicates.  {@link #waitState} accepts such values as
- * a parameter.
- * <p/>
- * <p/>Applications should depend on the coarse grain constants, rather than those denoting discrete states.
- *
- * @see net.jxta.endpoint.EndpointService
- * @see net.jxta.util.SimpleSelector
- * @see net.jxta.endpoint.EndpointAddress
- * @see net.jxta.endpoint.Message
- * @see MessengerState
- */
-public interface Messenger extends SimpleSelectable {
-
-    /**
-     * No message was ever submitted for sending. No connection has ever been attempted.
-     */
-    public static final int UNRESOLVED = 0x1;
-
-    /**
-     * Initial connection is being attempted. No message is pending.
-     */
-    public static final int RESOLVING = 0x2;
-
-    /**
-     * Currently connected. No message is pending (being sent implies pending).
-     */
-    public static final int CONNECTED = 0x4;
-
-    /**
-     * Currently not connected. No message is pending.
-     */
-    public static final int DISCONNECTED = 0x8;
-
-    /**
-     * Initial connection is being attempted. Messages are pending.
-     */
-    public static final int RESOLPENDING = 0x10;
-
-    /**
-     * Initial connection is being attempted. Messages are pending. New messages may not be submitted at this time.
-     */
-    public static final int RESOLSATURATED = 0x20;
-
-    /**
-     * Currently connected and sending messages.
-     */
-    public static final int SENDING = 0x40;
-
-    /**
-     * Currently sending messages.New messages may not be submitted at this time.
-     */
-    public static final int SENDINGSATURATED = 0x80;
-
-    /**
-     * Currently trying to re-establish connection. Messages are pending.
-     */
-    public static final int RECONNECTING = 0x100;
-
-    /**
-     * Currently trying to re-establish connection. New messages may not be submitted at this time.
-     */
-    public static final int RECONSATURATED = 0x200;
-
-    /**
-     * Attempting initial connection. Close has been requested. Messages are pending.
-     * New messages may no longer be submitted.
-     */
-    public static final int RESOLCLOSING = 0x400;
-
-    /**
-     * Currently sending messages. Close has been requested. New messages may no longer be submitted.
-     */
-    public static final int CLOSING = 0x800;
-
-    /**
-     * Trying to re-establish connection. Close has been requested. Messages are pending.
-     * New messages may no longer be submitted.
-     */
-    public static final int RECONCLOSING = 0x1000;
-
-    /**
-     * Failed to establish initial connection. Pending messages are being rejected. New messages may no longer be submitted.
-     */
-    public static final int UNRESOLVING = 0x2000;
-
-    /**
-     * Failed to re-establish connection.  Pending messages are being rejected. New messages may no longer be submitted.
-     */
-    public static final int BREAKING = 0x4000;
-
-    /**
-     * Breaking established connection for expedite closure. Pending messages are being rejected.
-     * New messages may no longer be submitted.
-     */
-    public static final int DISCONNECTING = 0x8000;
-
-    /**
-     * Failed to establish initial connection. New messages may no longer be submitted. State will never change again.
-     */
-    public static final int UNRESOLVABLE = 0x10000;
-
-    /**
-     * Failed to re-establish connection.  New messages may no longer be submitted. State will never change again.
-     */
-    public static final int BROKEN = 0x20000;
-
-    /**
-     * Closed as requested. All pending messages could be sent. New messages may no longer be submitted.
-     * State will never change again.
-     */
-    public static final int CLOSED = 0x40000;
-
-    /**
-     * The bitwise OR of all valid states.
-     */
-    public static final int ANYSTATE = 0x7FFFF;
-
-    /* Predicates. */
-
-    /**
-     * Composite state.<p/>
-     * <p/>
-     * Not known to be broken.
-     * Messenger may be used to send messages. Viability has not been evaluated yet.
-     * This is the most useful predicate to applications. USABLE means that
-     * it is reasonable to try and send a message.
-     */
-    public static final int USABLE = (UNRESOLVED | RESOLVING | CONNECTED | DISCONNECTED | RESOLPENDING | RESOLSATURATED | SENDING
-            | SENDINGSATURATED | RECONNECTING | RECONSATURATED);
-
-    /**
-     * Composite state.
-     * <p/>
-     * <ul>
-     * <li>Messenger was once resolved.</p>
-     * <li>Messenger was at least once proven viable. Current usability is
-     * not asserted. For example a messenger may be found to be in a
-     * TERMINAL state, but also be in a RESOLVED state. Thus proving that
-     * the destination of the messenger is sometimes valid.</li>
-     * </ul>
-     */
-    public static final int RESOLVED = (CONNECTED | SENDING | SENDINGSATURATED | CLOSING | CLOSED | DISCONNECTED | RECONNECTING
-            | RECONSATURATED | RECONCLOSING | BREAKING | DISCONNECTING | BROKEN);
-
-    /**
-     * Composite state.
-     * <p/>
-     * Messenger has terminated its useful life. State will never change any more.
-     */
-    public static final int TERMINAL = (UNRESOLVABLE | CLOSED | BROKEN);
-
-    /**
-     * Composite state.
-     * <p/>
-     * Any message that may have been submitted in the past has been either sent or failed already.
-     * If a messenger is in a state <code>IDLE & RESOLVED & USABLE</code>, then the expected delay in sending a message
-     * is minimal.
-     */
-    public static final int IDLE = (UNRESOLVED | RESOLVING | CONNECTED | DISCONNECTED | UNRESOLVABLE | CLOSED | BROKEN);
-
-    /**
-     * Composite state.
-     * <p/>
-     * This messenger cannot take new messages for now. All available buffering space is occupied.
-     * Note that only the usable states can be saturated. Once a messenger is in the process of terminating
-     * and thus takes no new messages anyway, it no-longer shows as saturated.
-     */
-    public static final int SATURATED = (RESOLSATURATED | SENDINGSATURATED | RECONSATURATED);
-
-    /**
-     * Returns the current state.
-     *
-     * @return one of the legal discrete state values.
-     */
-    public int getState();
-
-    /**
-     * Blocks unless and until the current state is or has become one of the desired values.  The observable states are guaranteed
-     * to be represented by a single bit. Multiple desired values may be specified by passing them <code>OR</code>ed together.
-     * <p/>
-     * This class defines the list of constants that may be used and how these may be combined.
-     * <p/>
-     * Note that the state can change as soon as this method returns, so any observation is only an indication of the
-     * past. Synchronizing on the object itself has no other effect than interfering with other threads doing the same. Obviously,
-     * certain transitions cannot happen unless a new message is submitted. So unless another thread is using a messenger, it is
-     * safe to assume that a non-saturated messenger will not become saturated spontaneously. Note that messengers returned by
-     * different endpoint service interface objects (what {@link net.jxta.peergroup.PeerGroup#getEndpointService()} returns) are
-     * different. However a given endpoint interface object will return an existing messenger to the same exact destination if
-     * there is a {@link Messenger#USABLE} one.
-     * <p/>
-     * With an unshared messenger, one can wait for any change with {@code waitState(~getState(), 0);}.
-     * <p/>
-     * Note that it is advisable to always include {@link #TERMINAL} as part
-     * of the desired states with unless being blocked past the messenger
-     * termination is an acceptable behaviour.
-     * <p/>
-     * Examples:<p/>
-     * <p/>
-     * Ensure that the messenger can take more messages (or is {@code UNUSABLE}): {@code waitState(~SATURATED)}<p/>
-     * <p/>
-     * Ensure that all submitted messages have been sent: {@code waitState(TERMINAL | IDLE)}
-     * <p/>
-     * Ensure that the messenger is already resolved and can take more messages: {@code waitState(TERMINAL | (RESOLVED & ~SATURATED))}
-     *
-     * @param wantedStates The binary OR of the desired states.
-     * @param timeout      The maximum number of milliseconds to wait. A timeout of 0 means no time limit.
-     * @return The desired state that was reached or the current state when time ran out.
-     * @throws InterruptedException If the invoking thread was interrupted before the condition was realized.
-     */
-    int waitState(int wantedStates, long timeout) throws InterruptedException;
-
-    /**
-     * Returns {@code true} if this messenger is closed and no longer
-     * accepting messages to be sent. This is a shortcut for 
-     * {@code (getState() & USABLE == 0)}. Once closed, a messenger should be 
-     * discarded. 
-     *
-     * @return {@code true} if this messenger is closed, otherwise {@code false}.
-     */
-    boolean isClosed();
-
-    /**
-     * Returns an indication of whether this messenger may be worth closing.
-     *
-     * @return {@code true} if the messenger is idle otherwise {@code false}.
-     * @deprecated no longer relevant and always false. This notably is <bold>not</bold> equivalent to the {@link #IDLE} state.
-     */
-    @Deprecated
-    boolean isIdle();
-
-    /**
-     * Returns {@code true} if the <code>sendMessage</code> methods of
-     * this messenger are fully synchronous.
-     *
-     * @deprecated all messengers are asynchronous, and the {@link #sendMessageB} method is always blocking.
-     *
-     * @return true if synchronous
-     */
-    @Deprecated
-    boolean isSynchronous();
-
-    /**
-     * Returns the destination of this messenger.
-     *
-     * @return The destination address of this messenger
-     * @see Messenger#getLogicalDestinationAddress()
-     */
-    EndpointAddress getDestinationAddress();
-
-    /**
-     * Returns the internal EndpointAddress object of the destination of the user. 
-     * This method is intended to be used for applications that require a weak
-     * or soft reference to an EndpointMessenger: the returned Endpoint Address 
-     * object will be unreferenced when this messenger will finalize.
-     *
-     * @deprecated EndpointAddress is now immutable which means that this result
-     * is the same as {@link #getDestinationAddress()}. This method will be
-     * eventually removed.
-     *
-     * @return EndpointAddress the destination address of this messenger
-     * @see #getDestinationAddress()
-     */
-    @Deprecated
-    EndpointAddress getDestinationAddressObject();
-
-    /**
-     * Returns the logical destination of this messenger. This may be a
-     * different address than is returned by
-     * {@link #getDestinationAddress() getDestinationAddress} and refers to
-     * the entity which is located at the destination address.
-     * <p/>
-     * By analogy, a telephone number would be the destination address, and
-     * the owner of that telephone number would be the logical destination.
-     * Each logical destination may be known by one or more destination
-     * addresses.
-     *
-     * @return EndpointAddress the logical destination address of this messenger.
-     * @see #getDestinationAddress()
-     */
-    EndpointAddress getLogicalDestinationAddress();
-
-    /**
-     * Returns the maximum message size that this messenger can be used to send.
-     * The limit refers to the cumulative size of application level elements.
-     * The various {@code sendMessage()} variants will refuse to send messages
-     * that exceed this limit.
-     *
-     * @return the limit.
-     */
-    long getMTU();
-
-    /**
-     * If applicable, returns another messenger that will send messages to the same destination address than this one, but with
-     * the specified default service and serviceParam, possibly rewriting addresses to ensure delivery through the specified
-     * redirection. This is not generally useful to applications and most messengers will return null. This method is needed
-     * by the EndpointService when interacting with Messengers provided by Transport modules. If you are not implementing a
-     * Transport module, then you can ignore this method.
-     * <p/>
-     * <b>Important:</b> The channel so obtained is not configured to support the {@link #sendMessage(Message,String,String,
-     *OutgoingMessageEventListener)} legacy method. If use of this method is desired, {@link ChannelMessenger#setMessageWatcher}
-     * must be used first.
-     *
-     * @param redirection  The requested redirection. The resulting channel messenger will use this to force
-     *                     delivery of the message only in the specified group (or possibly descendents, but not parents). If null the local
-     *                     group is assumed. This redirection is applied only to messages that are sent to a service name and service param that
-     *                     do not imply a group redirection.
-     * @param service      The service to which the resulting channel will send messages, when they are not sent to a
-     *                     specified service.
-     * @param serviceParam The service parameter that the resulting channel will use to send messages, when no parameter is
-     *                     specified.
-     * @return a channelMessenger as specified.
-     * @see MessageSender#getMessenger(EndpointAddress,Object)
-     */
-    Messenger getChannelMessenger(PeerGroupID redirection, String service, String serviceParam);
-
-    /**
-     * Close this messenger after processing any pending messages. This method 
-     * is not blocking. Upon return, the messenger will be in one of the non 
-     * {@link #USABLE} states, which means that no message may be sent through 
-     * it. Any other effect of this method, such as an underlying connection 
-     * being closed, or all pending messages being processed, may be deferred
-     * indefinitely.  When the messenger has completely processed the closure 
-     * request, it will be in one of the {@link #TERMINAL} states (which are 
-     * also {@link #IDLE} states). Therefore, if one is interested in the 
-     * outcome of the closure, one may wait for the messenger to be in a 
-     * {@link #TERMINAL} or {@link #IDLE} state, and check which it is. 
-     * {@link #CLOSED} denotes success (all outstanding messages have been 
-     * sent), as opposed to {@link #UNRESOLVABLE} or {@link #BROKEN}.
-     */
-    void close();
-
-    /**
-     * Makes sure that all outstanding messages have been processed; 
-     * successfully or not. This method waits unless and until the state of the 
-     * messenger is an {@link #IDLE} state. If the reached state is neither 
-     * {@link #CLOSED} or any {@link #USABLE} state, then it throws an 
-     * IOException. Else it returns silently.<p/>
-     * 
-     * <p/><b>If another thread keeps sending messages, this method may never 
-     * return.</b>
-     * 
-     * <p/>This method is deliberately simple. If a timeout needs to be 
-     * provided, or if more detailed conditions are required, the 
-     * {@link #waitState(int,long)} and {@link #getState()} methods should be 
-     * used. For example : 
-     * 
-     * <p/><code><pre>
-     * int myFlush(long notTooLong) {
-     *   messenger.waitState(IDLE, notTooLong);
-     *   if ((messenger.getState() & IDLE) == 0) return TOOLONG;
-     *   if ((messenger.getState() & USABLE) != 0) return FLUSHED;
-     *   if (messenger.getState() == CLOSED) return CLOSEDANDFLUSHED;
-     *   return BROKEN;
-     * }
-     * </pre></code>
-     * 
-     * <p/>Note: {@link #close()} being asynchronous, it is valid to invoke 
-     * <code>flush()</code> after <code>close()</code> as a form of synchronous 
-     * variant of <code>close()</code>. If this messenger is not shared with any 
-     * other thread, then invoking <code>flush()</code> before 
-     * <code>close</code> is a more familiar means of achieving the same effect.
-     *
-     * @throws IOException This messenger failed before processing all 
-     * outstanding messages successfully.
-     */
-    void flush() throws IOException;
-
-    /**
-     * Force the messenger to start resolving if it is not resolved yet. Any 
-     * attempt at sending a message has the same effect, but the message may 
-     * fail as a result, depending upon the method used.
-     */
-    void resolve();
-
-    /**
-     * Simple sending: blocks until the message was accepted for sending or the messenger is not {@link #USABLE}; whichever occurs
-     * first.  If a service name and service param are specified, they will replace those specified at construction for the
-     * purpose of sending this message only.<p/>
-     * <p/>
-     * Error Handling:
-     * <p/>
-     * <ul>
-     * <li>An {@link java.io.IOException} means that this message is invalid or that this messenger is now in one of the non {@link
-     * #USABLE} states and may no longer send new messages, and means that the message was not sent. The exact state of the
-     * messenger may be obtained from the {@link #getState()} method. If no exception is thrown, the message is accepted for
-     * sending and may or may not be fully processed.</li>
-     * <p/>
-     * <li>The invoker may have confirmation of completion by observing the message's properties. When the message has been
-     * fully processed, {@link Message#getMessageProperty(Object) Message#getMessageProperty(Messenger.class)} will return an
-     * object of class {@link OutgoingMessageEvent}. Changes in a message's set of properties may be tracked by selecting the
-     * message. If an exception was thrown, the message's properties will not be modified
-     * <p/>
-     * <li>There is no guarantee that the process of sending the message will not fail after that method returned. If this messenger
-     * subsequently reaches an {@link #IDLE} state that is either {@link #CLOSED} or a {@link #USABLE} state, then it may be inferred
-     * that all outstanding messages have been processed without this messenger detecting an error.</li>
-     * </ul>
-     * <p/>
-     * <p/><b>WARNING:</b> The Message object should not be reused or modified until completely processed. Concurrent modification
-     * of a message while a messenger is sending the message will produce incorrect and unpredictable results.  If completion is
-     * not monitored, the message should <b>never</b> be reused. If necessary, a clone of the message may be provided to
-     * {@link #sendMessageB}:
-     * <p/>
-     * <p/><code><pre>
-     *     messenger.sendMessageB( (Message) myMessage.clone(), theService, theParam );
-     * </pre></code>
-     * <p/>
-     * There is no guarantee that a message successfully sent will actually be received.<p/>
-     *
-     * @param msg          the message
-     * @param service      Optionally replaces the service in the destination
-     *                     address. If {@code null} then the destination address's default
-     *                     service will be used.  If the empty string ("") is used then
-     *                     no service is included in the destination address.
-     * @param serviceParam Optionally replaces the service param in the
-     *                     destination address. If {@code null} then the destination address's
-     *                     default service parameter will be used. If the empty string ("") is used
-     *                     then no service param is included in the destination address.
-     * @throws IOException Thrown if the message cannot be sent.
-     */
-    void sendMessageB(Message msg, String service, String serviceParam) throws IOException;
-
-    /**
-     * Sends a message to the destination specified at construction. If a service name and service param are specified, they will
-     * replace those specified at construction for the purpose of sending this message only.
-     * <p/>
-     * This method is identical to {@link #sendMessage(Message,String,String)}, except that it does not throw an exception. The invoker
-     * has to retrieve a detailed status from the message if needed.
-     * <p/>
-     * Error Handling:  <ul>
-     * <li>A return result of {@code false} indicates that the message was not accepted to be sent. This may be due to
-     * local resource limits being reached or to the messenger being in a state that is not {@link #USABLE} or to the message
-     * being invalid. The exact cause of the failure can be retrieved from the message by using
-     * {@link Message#getMessageProperty(Object) <code>Message.getMessageProperty(Messenger.class)</code>}.  If appropriate,
-     * another attempt at sending the message, may be made after waiting for the congestion to clear (for example by using
-     * {@link #waitState(int,long)}).</li>
-     * <p/>
-     * <li>A return result of {@code true} indicates that the message was accepted for sending. <b>It does not imply that
-     * the message will be sent or that the destination will receive the message.</b> There will be no indication by this method
-     * of any errors in sending the message. If this messenger subsequently reaches an {@link #IDLE} state that is either {@link
-     * #CLOSED} or a {@link #USABLE} state, then it may be inferred that all outstanding messages have been processed without this
-     * messenger detecting an error.</li>
-     * <p/>
-     * <li>The invoker may have confirmation of completion (successful or not) by observing the message's properties. When the
-     * message has been fully processed, {@link Message#getMessageProperty(Object) <code>Message.getMessageProperty(Messenger.class)</code>}
-     * will return an object of class {@link OutgoingMessageEvent}. Changes in a message's set of properties may be tracked by
-     * selecting the message.</li>
-     * </ul>
-     * <p/>
-     * <p/><b>WARNING:</b> The Message object should not be reused or modified until completely processed. Concurrent modification
-     * of a message while a messenger is sending the message will produce incorrect and unpredictable results.  If completion is
-     * not monitored, the message should <b>never</b> be reused. If necessary, a clone of the message may be provided to
-     * {@link #sendMessageN}:
-     * <p/>
-     * <p/><code><pre>
-     *     messenger.sendMessageN( (Message) myMessage.clone(), theService, theParam );
-     * </pre></code>
-     * <p/>
-     * There is no guarantee that a message successfully sent will actually be received.<p/>
-     *
-     * @param msg          The message to send.
-     * @param service      Optionally replaces the service in the destination
-     *                     address. If {@code null} then the destination address's default
-     *                     service will be used.  If the empty string ("") is used then
-     *                     no service is included in the destination address.
-     * @param serviceParam Optionally replaces the service param in the
-     *                     destination address. If {@code null} then the destination address's
-     *                     default service parameter will be used. If the empty string ("") is used
-     *                     then no service param is included in the destination address.
-     * @return boolean {@code true} if the message has been accepted for sending, otherwise {@code false}.
-     */
-    boolean sendMessageN(Message msg, String service, String serviceParam);
-
-    /**
-     * Sends a message to the destination specified at construction as if by 
-     * invoking {@link #sendMessage(Message,String,String) sendMessage(msg, null, null)}
-     * 
-     * @param msg The message to send.
-     * @return boolean {@code true} if the message has been accepted for sending, otherwise {@code false}.
-     * @throws IOException Thrown if the message cannot be sent.
-     */
-    boolean sendMessage(Message msg) throws IOException;
-
-    /**
-     * Sends a message to the destination specified at construction. If a service name and service param are specified, they will
-     * replace those specified at construction for the purpose of sending this message only.
-     * <p/>
-     * Error Handling:
-     * <p/>
-     * <ul>
-     * <p/>
-     * <li>An {@link java.io.IOException} means that this message is invalid or that this messenger is now in one of the
-     * non {@link #USABLE} states and may no longer send new messages, and that the message was not sent. The exact state of
-     * the messenger may be obtained from the {@link #getState()} method.</li>
-     * <p/>
-     * <li>A return result of {@code false} indicates that the message was not accepted to be sent. Usually this is due to
-     * local resource limits being reached. If needed, another attempt at sending the message, may be made after waiting for the
-     * congestion to clear (for example by using {@link #waitState(int,long)}).</li>
-     * <p/>
-     * <li>A return result of {@code true} indicates that the message was accepted for sending. <b>It does not imply that
-     * the message will be sent or that the destination will receive the message.</b> There will be no immediate indication of any
-     * errors in sending the message. If this messenger subsequently reaches an {@link #IDLE} state that is either {@link #CLOSED}
-     * or a {@link #USABLE} state, then it may be inferred that all outstanding messages have been processed without this
-     * messenger detecting an error.</li>
-     * <p/>
-     * <li>The invoker may have confirmation of completion by observing the message's properties. When the message has been fully
-     * processed, {@link Message#getMessageProperty(Object) <code>Message.getMessageProperty(Messenger.class)</code>} will return
-     * an object of class {@link OutgoingMessageEvent}. Changes in a message's set of properties may be tracked by selecting
-     * the message.
-     * <p/>
-     * </ul>
-     * <p/>
-     * <p/><b>WARNING:</b> The Message object should not be reused or modified until completely processed. Concurrent modification
-     * of a message while a messenger is sending the message will produce incorrect and unpredictable results.  If completion is
-     * not monitored, the message should <b>never</b> be reused. If necessary, a clone of the message may be provided to
-     * <code>sendMessage</code>:
-     * <p/>
-     * <code><pre>
-     *     messenger.sendMessage( (Message) myMessage.clone(), theService, theParam );
-     * </pre></code>
-     * <p/>
-     * There is no guarantee that a message successfully sent will actually be received.<p/>
-     * <p/>
-     * <b>Limitation:</b> using this method along with {@link net.jxta.util.SimpleSelector#select} on the same message may occasionally
-     * cause some errors to not be thrown. Prefer {@link #sendMessageN} when using {@link net.jxta.util.SimpleSelector#select}.
-     * <p/>
-     * This is a legacy method. Modern code should prefer the other methods and select messages.
-     *
-     * @param msg          The message to send.
-     * @param service      Optionally replaces the service in the destination
-     *                     address. If {@code null} then the destination address's default
-     *                     service will be used.  If the empty string ("") is used then
-     *                     no service is included in the destination address.
-     * @param serviceParam Optionally replaces the service param in the
-     *                     destination address. If {@code null} then the destination address's
-     *                     default service parameter will be used. If the empty string ("") is used
-     *                     then no service param is included in the destination address.
-     * @return boolean {@code true} if the message has been accepted for sending, otherwise {@code false}.
-     * @throws IOException Thrown if the message cannot be sent.
-     */
-    boolean sendMessage(Message msg, String service, String serviceParam) throws IOException;
-
-    /**
-     * Sends a message to the destination specified at construction. If a service name and service param are specified, they will
-     * replace those specified at construction for the purpose of sending this message only.
-     * <p/>
-     * <b>WARNING:</b> The Message object should not be reused or modified until the message has been fully processed.
-     * Concurrent modification of a message while a messenger is sending the message will produce incorrect and unpredictable
-     * results. If a listener is provided it is invoked after the message is considered fully processed. However it is recommended
-     * not to reuse or otherwise modify a messages after sending it. If necessary, a clone of the message may be provided to
-     * <code>sendMessage</code>:
-     * <p/>
-     * <code><pre>
-     *     messenger.sendMessage( (Message) myMessage.clone() );
-     * </pre></code>
-     * <p/>
-     * Error Handling:
-     * <p/>
-     * <ul>
-     * <p/>
-     * <li>If a listener was provided, it will always be invoked. Depending upon the outcome either the
-     * {@link OutgoingMessageEventListener#messageSendFailed(OutgoingMessageEvent)} or the {@link
-     * OutgoingMessageEventListener#messageSendSucceeded(OutgoingMessageEvent)} method will be invoked:<p/>
-     * <p/>
-     * <ul>
-     * <p/>
-     * <li>If the message could not be accepted for sending due to temporary resource saturation,
-     * <code>messageSendFailed</code> will be invoked. The {@link Throwable} object returned by the {@link
-     * OutgoingMessageEvent#getFailure()} method of the passed event object will be null.</li>
-     * <p/>
-     * <li>If the message could not be accepted for sending due to the messenger not being {@link #USABLE},
-     * <code>messageSendFailed</code> will be invoked. The {@link Throwable} object returned by the {@link
-     * OutgoingMessageEvent#getFailure()} method of the passed event object will reflect the messenger's condition.</li>
-     * <p/>
-     * <li>If the message is accepted for sending but later fails, then <code>messageSendFailed</code> will be invoked.  The
-     * {@link Throwable} object returned by the {@link OutgoingMessageEvent#getFailure()} method of the passed event object
-     * will reflect the origin of the failure.</li>
-     * <p/>
-     * <li>If the message is accepted for sending and later succeeds, then <code>messageSendSucceeded</code> will be
-     * invoked.</li>
-     * <p/>
-     * </ul></li>
-     * <p/>
-     * <li>If a listener was provided, it is always possible that it is invoked before this method returns.</li>
-     * <p/>
-     * <li>If no listener was provided, </b> There will be no notification of any errors nor success in sending the message. If
-     * this messenger subsequently reaches an {@link #IDLE} state that is either {@link #CLOSED} or a {@link #USABLE} state, then it
-     * may be inferred that all outstanding messages have been processed without this messenger detecting an error.</li>
-     * <p/>
-     * <li>This method does not throw exceptions. As a result, when used with a {@code null} listener, it provides very
-     * little feedback to the invoker. A messenger should be abandoned once it is in one of the {@link #TERMINAL} states.</li>
-     * <p/>
-     * </ul>
-     * <p/>
-     * As with all <code>sendMessage</code> methods, success is not a guarantee that the message will actually be received.
-     * <p/>
-     * <p/>This is a legacy method. Modern code should prefer the other methods and select messages. If a listener API is preferred, it is possible to use a {@link ListenerAdaptor} object explicitly to have a listener called.
-     *
-     * @param msg          The message to send.
-     * @param service      Optionally replaces the service in the destination
-     *                     address. If {@code null} then the destination address's default
-     *                     service will be used.  If the empty string ("") is used then
-     *                     no service is included in the destination address.
-     * @param serviceParam Optionally replaces the service param in the
-     *                     destination address. If {@code null} then the destination address's
-     *                     default service parameter will be used. If the empty string ("") is used
-     *                     then no service param is included in the destination address.
-     * @param listener     listener for events about this message or null if no notification is desired.
-     * @throws UnsupportedOperationException If this messenger is not a channel or was not given a {@link ListenerAdaptor}.
-     *                                       (all messengers obtained through {@link EndpointService#getMessenger} are configured properly.
-     */
-    void sendMessage(Message msg, String service, String serviceParam, OutgoingMessageEventListener listener);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessengerEvent.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessengerEvent.java
deleted file mode 100644 (file)
index bcf4b6a..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.endpoint;
-
-/**
- * An event which indicates that a messenger has been successfully created.
- * <p/>
- * The source of Message Transport providing the messenger.
- *
- * @see net.jxta.endpoint.MessageTransport
- * @see net.jxta.endpoint.Messenger
- * @see net.jxta.endpoint.EndpointService
- */
-public class MessengerEvent extends java.util.EventObject {
-
-    /**
-     * The newly created messenger.
-     */
-    final transient Messenger messenger;
-
-    /**
-     * The destination address of the messenger.
-     */
-    final EndpointAddress connectionAddress;
-
-    /**
-     * Creates a new instance of MessengerEvent
-     *
-     * @param source            The source of Message Transport providing the messenger
-     * @param messenger         the messenger
-     * @param connectionAddress The connection address
-     */
-    public MessengerEvent(Object source, Messenger messenger, EndpointAddress connectionAddress) {
-        super(source);
-
-        this.messenger = messenger;
-        this.connectionAddress = connectionAddress;
-    }
-
-    public Messenger getMessenger() {
-        return messenger;
-    }
-
-    public EndpointAddress getConnectionAddress() {
-        return connectionAddress;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * A simple implementation for debugging. Don't depend upon this format.
-     */
-    @Override
-    public String toString() {
-        return source.toString() + "-->" + messenger.toString() + " (" + connectionAddress + ")";
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessengerEventListener.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessengerEventListener.java
deleted file mode 100644 (file)
index 0989602..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.endpoint;
-
-import java.util.EventListener;
-
-/**
- * A listener for MessengerEvents.
- */
-public interface MessengerEventListener extends EventListener {
-
-    /**
-     * A messenger is ready.
-     *
-     * @param event The Messenger Event.
-     * @return {@code true} if the listener wants to claim the Messenger.
-     *         (Normally means that it will not be offered to any other listener).
-     */
-    public boolean messengerReady(MessengerEvent event);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessengerState.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/MessengerState.java
deleted file mode 100644 (file)
index df7c1cd..0000000
+++ /dev/null
@@ -1,443 +0,0 @@
-/*
- * Copyright (c) 2004-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.endpoint;
-
-/**
- * The complete standard messenger life cycle state machine that all messengers
- * must obey. Compliant messengers can be built by implementing and using this
- * class as an engine to orchestrate discrete operations.
- * <p/>
- * In order to use this class, one must implement the various abstract Action
- * methods, so that they trigger the required operations.
- * <p/>
- * Synchronization has to be externally provided and usually needs to extend
- * around sections wider than just the invocation of this class' methods. For
- * example, if the user of this class maintains a queue, the state of the queue
- * must be kept consistent with the invocation of {@link #msgsEvent},
- * {@link #saturatedEvent}, and {@link #idleEvent}, which all denote different
- * states of that queue. It is suggested to use the instance of this class as
- * the synchronization object.
- */
-public abstract class MessengerState {
-
-    // All the transition map setup is rather terse because java tends to make 
-    // it extremely verbose. We do not want to end up with 1000 lines of code 
-    // for what amounts to initializing a table.
-
-    // Below is a method reference. It permits putting "what to do" in a field.
-    // The {@code doIt()} method is given the target object because we want our
-    // entire transition table to be a static singleton. Otherwise it would cost
-    // too much initializing each instance of this class.
-
-    private interface Action {
-        public void doIt(MessengerState messengerState);
-    }
-
-    // Action method "pointers".
-    // The transition table is static. Otherwise it would cost too much initializing each instance of this class.
-
-    private final static Action Connect = new Action() {
-        public void doIt(MessengerState messengerState) {
-            messengerState.connectAction();
-        }
-    };
-    private final static Action Closein = new Action() {
-        public void doIt(MessengerState s) {
-            s.closeInputAction();
-        }
-    };
-    private final static Action Start = new Action() {
-        public void doIt(MessengerState s) {
-            s.startAction();
-        }
-    };
-    private final static Action Closeout = new Action() {
-        public void doIt(MessengerState messengerState) {
-            messengerState.closeOutputAction();
-        }
-    };
-    private final static Action Failall = new Action() {
-        public void doIt(MessengerState messengerState) {
-            messengerState.failAllAction();
-        }
-    };
-    private final static Action Closeio = new Action() {
-        public void doIt(MessengerState s) {
-            s.closeInputAction();
-            s.closeOutputAction();
-        }
-    };
-    private final static Action Closefail = new Action() {
-        public void doIt(MessengerState messengerState) {
-            messengerState.closeInputAction();
-            messengerState.failAllAction();
-        }
-    };
-    private final static Action Nop = new Action() {
-        public void doIt(MessengerState messengerState) {
-        }
-    };
-
-    /**
-     * The transition each event causes when in that state.
-     */
-    private static class State {
-        private final int number;
-
-        private State stResolve;
-        private Action acResolve;
-
-        private State stMsgs;
-        private Action acMsgs;
-
-        private State stSaturated;
-        private Action acSaturated;
-
-        private State stClose;
-        private Action acClose;
-
-        private State stShutdown;
-        private Action acShutdown;
-
-        private State stUp;
-        private Action acUp;
-
-        private State stDown;
-        private Action acDown;
-
-        private State stIdle;
-        private Action acIdle;
-
-        State(int stateNum) {
-            number = stateNum;
-        }
-
-        void init(Object[] data) {
-            stResolve = (State) data[0];
-            acResolve = (Action) data[1];
-            stMsgs = (State) data[2];
-            acMsgs = (Action) data[3];
-            stSaturated = (State) data[4];
-            acSaturated = (Action) data[5];
-            stClose = (State) data[6];
-            acClose = (Action) data[7];
-            stShutdown = (State) data[8];
-            acShutdown = (Action) data[9];
-            stUp = (State) data[10];
-            acUp = (Action) data[11];
-            stDown = (State) data[12];
-            acDown = (Action) data[13];
-            stIdle = (State) data[14];
-            acIdle = (Action) data[15];
-        }
-    }
-
-
-    // All the states. (We put them together in a class essentially to simplify initialization).
-    private static class TransitionMap {
-
-        private final static State Unresolved = new State(Messenger.UNRESOLVED);
-        private final static State ResPending = new State(Messenger.RESOLPENDING);
-        private final static State Resolving = new State(Messenger.RESOLVING);
-        private final static State ResolSat = new State(Messenger.RESOLSATURATED);
-        private final static State Connected = new State(Messenger.CONNECTED);
-        private final static State Disconned = new State(Messenger.DISCONNECTED);
-        private final static State Reconning = new State(Messenger.RECONNECTING);
-        private final static State ReconSat = new State(Messenger.RECONSATURATED);
-        private final static State Sending = new State(Messenger.SENDING);
-        private final static State SendingSat = new State(Messenger.SENDINGSATURATED);
-        private final static State ResClosing = new State(Messenger.RESOLCLOSING);
-        private final static State ReconClosing = new State(Messenger.RECONCLOSING);
-        private final static State Closing = new State(Messenger.CLOSING);
-        private final static State Disconning = new State(Messenger.DISCONNECTING);
-        private final static State Unresable = new State(Messenger.UNRESOLVABLE);
-        private final static State Closed = new State(Messenger.CLOSED);
-        private final static State Broken = new State(Messenger.BROKEN);
-
-        // The states need to exist before init, because they refer to each other.
-        // We overwrite them in-place with the complete data.
-
-        private final static Object[][] INIT_TRANSITION_MAP = {
-
-                /* STATE resolve, msgs, saturated, close, shutdown, up, down, idle */
-
-                /* UNRESOLVED      */
-                {Resolving, Connect, ResPending, Connect, ResolSat, Connect, Closed, Closein, Broken, Closein, Connected, Nop, Unresolved, Nop, Unresolved, Nop},
-
-                /* RESOLPENDING    */
-                {ResPending, Nop, ResPending, Nop, ResolSat, Nop, ResClosing, Closein, Broken, Closefail, Sending, Start, Unresable, Closefail, Resolving, Nop},
-
-                /* RESOLVING       */
-                {Resolving, Nop, ResPending, Nop, ResolSat, Nop, Closed, Closein, Broken, Closein, Connected, Nop, Unresable, Closein, Resolving, Nop},
-
-                /* RESOLSATURATED  */
-                {ResolSat, Nop, ResPending, Nop, ResolSat, Nop, ResClosing, Closein, Broken, Closefail, SendingSat, Start, Unresable, Closefail, Resolving, Nop},
-
-                /* CONNECTED       */
-                {Connected, Nop, Sending, Start, SendingSat, Start, Closed, Closeio, Broken, Closeio, Connected, Nop, Disconned, Nop, Connected, Nop},
-
-                /* DISCONNECTED    */
-                {Disconned, Nop, Reconning, Connect, ReconSat, Connect, Closed, Closein, Broken, Closein, Connected, Nop, Disconned, Nop, Disconned, Nop},
-
-                /* RECONNECTING    */
-                {Reconning, Nop, Reconning, Nop, ReconSat, Nop, ReconClosing, Closein, Broken, Closefail, Sending, Start, Broken, Closefail, Disconned, Nop},
-
-                /* RECONSATURATED  */
-                {ReconSat, Nop, Reconning, Nop, ReconSat, Nop, ReconClosing, Closein, Broken, Closefail, SendingSat, Start, Broken, Closefail, Disconned, Nop},
-
-                /* SENDING         */
-                {Sending, Nop, Sending, Nop, SendingSat, Nop, Closing, Closein, Disconning, Closeio, Sending, Nop, Reconning, Connect, Connected, Nop},
-
-                /* SENDINGSATURATED*/
-                {SendingSat, Nop, Sending, Nop, SendingSat, Nop, Closing, Closein, Disconning, Closeio, SendingSat, Nop, ReconSat, Connect, Connected, Nop},
-
-                /* RESOLCLOSING    */
-                {ResClosing, Nop, ResClosing, Nop, ResClosing, Nop, ResClosing, Nop, Broken, Failall, Closing, Start, Unresable, Failall, ResClosing, Nop},
-
-                /* RECONCLOSING    */
-                {ReconClosing, Nop, ReconClosing, Nop, ReconClosing, Nop, ReconClosing, Nop, Broken, Failall, Closing, Start, Broken, Failall, ReconClosing, Nop},
-
-                /* CLOSING         */
-                {Closing, Nop, Closing, Nop, Closing, Nop, Closing, Nop, Disconning, Closeout, Closing, Nop, ReconClosing, Connect, Closed, Closeout},
-
-                /* DISCONNECTING   */
-                {Disconning, Nop, Disconning, Nop, Disconning, Nop, Disconning, Nop, Disconning, Nop, Disconning, Nop, Broken, Failall, Broken, Nop},
-
-                /* UNRESOLVABLE    */
-                {Unresable, Nop, Unresable, Nop, Unresable, Nop, Unresable, Nop, Unresable, Nop, Unresable, Closeout, Unresable, Nop, Unresable, Nop},
-
-                /* CLOSED          */
-                {Closed, Nop, Closed, Nop, Closed, Nop, Closed, Nop, Closed, Nop, Closed, Closeout, Closed, Nop, Closed, Nop},
-
-                /* BROKEN          */
-                {Broken, Nop, Broken, Nop, Broken, Nop, Broken, Nop, Broken, Nop, Broken, Closeout, Broken, Nop, Broken, Nop}
-        };
-
-        static {
-            // install the transitions map in its proper place.
-            Unresolved.init(INIT_TRANSITION_MAP[0]);
-            ResPending.init(INIT_TRANSITION_MAP[1]);
-            Resolving.init(INIT_TRANSITION_MAP[2]);
-            ResolSat.init(INIT_TRANSITION_MAP[3]);
-            Connected.init(INIT_TRANSITION_MAP[4]);
-            Disconned.init(INIT_TRANSITION_MAP[5]);
-            Reconning.init(INIT_TRANSITION_MAP[6]);
-            ReconSat.init(INIT_TRANSITION_MAP[7]);
-            Sending.init(INIT_TRANSITION_MAP[8]);
-            SendingSat.init(INIT_TRANSITION_MAP[9]);
-            ResClosing.init(INIT_TRANSITION_MAP[10]);
-            ReconClosing.init(INIT_TRANSITION_MAP[11]);
-            Closing.init(INIT_TRANSITION_MAP[12]);
-            Disconning.init(INIT_TRANSITION_MAP[13]);
-            Unresable.init(INIT_TRANSITION_MAP[14]);
-            Closed.init(INIT_TRANSITION_MAP[15]);
-            Broken.init(INIT_TRANSITION_MAP[16]);
-        }
-    }
-
-    /**
-     * The current state!
-     */
-    private volatile State state = null;
-
-    /**
-     * Constructs a new messenger state machine.
-     * <p/>
-     * The transition map is static and we refer to it only to grab the first
-     * state. After that, states refer to each other. The only reason they are
-     * members in the map is so that we can make references during init.
-     *
-     * @param connected If <tt>true</tt>, the initial state is {@link Messenger#CONNECTED} otherwise {@link Messenger#UNRESOLVED}.
-     */
-    protected MessengerState(boolean connected) {
-
-        state = connected ? TransitionMap.Connected : TransitionMap.Unresolved;
-    }
-
-    /**
-     * @return The current state.
-     */
-    public int getState() {
-        // getState is always just a peek. It needs no sync.
-        return state.number;
-    }
-
-    /**
-     * Event input.
-     */
-    public void resolveEvent() {
-        Action a = state.acResolve;
-
-        state = state.stResolve;
-        a.doIt(this);
-    }
-
-    /**
-     * Message event
-     */
-    public void msgsEvent() {
-        Action a = state.acMsgs;
-
-        state = state.stMsgs;
-        a.doIt(this);
-    }
-
-    /**
-     * Saturated Event
-     */
-    public void saturatedEvent() {
-        Action a = state.acSaturated;
-
-        state = state.stSaturated;
-        a.doIt(this);
-    }
-
-    /**
-     * Close Event
-     */
-    public void closeEvent() {
-        Action a = state.acClose;
-
-        state = state.stClose;
-        a.doIt(this);
-    }
-
-    /**
-     * Shutdown Event
-     */
-    public void shutdownEvent() {
-        Action a = state.acShutdown;
-
-        state = state.stShutdown;
-        a.doIt(this);
-    }
-
-    /**
-     * Up Event
-     */
-    public void upEvent() {
-        Action a = state.acUp;
-
-        state = state.stUp;
-        a.doIt(this);
-    }
-
-    /**
-     * Down Event
-     */
-    public void downEvent() {
-        Action a = state.acDown;
-
-        state = state.stDown;
-        a.doIt(this);
-    }
-
-    /**
-     * Idle Event
-     */
-    public void idleEvent() {
-        Action a = state.acIdle;
-
-        state = state.stIdle;
-        a.doIt(this);
-    }
-
-    /**
-     * Actions they're always called in sequence by event methods.
-     *
-     * Actions must not call event methods in sequence.
-     **/
-
-    /**
-     * Try to make a connection. Called whenever transitioning from a state that neither needs nor has a connection to a state
-     * that needs a connection and does not have it. Call upEvent when successful, or downEvent when failed.
-     */
-    protected abstract void connectAction();
-
-    /**
-     * Start sending. Called whenever transitioning to a state that has both a connection and messages to send from a state that
-     * lacked either attributes. So, will be called after sending stopped due to broken cnx or idle condition.  Call downEvent
-     * when stopping due to broken or closed connection, call {@link #idleEvent} when no pending message is left.
-     */
-    protected abstract void startAction();
-
-    /**
-     * Reject new messages from now on. Called whenever transitioning from a state that is {@link Messenger#USABLE} to a state
-     * that is not. No event expected once done.
-     */
-    protected abstract void closeInputAction();
-
-    /**
-     * Drain pending messages, all failed. Called once output is down and there are still pending messages.
-     * Call {@link #idleEvent} when done, as a normal result of no pending messages being left.
-     */
-    protected abstract void failAllAction();
-
-    /**
-     * Force close output. Called whenever the underlying connection is to be discarded and never to be needed again.  That is
-     * either because orderly close has completed, or shutdown is in progress. No event expected once done, but this action
-     * <b>must</b> cause any sending in progress to stop eventually. The fact that the sending has stopped must be reported as
-     * usual: either with a {@link #downEvent}, if the output closure caused the sending process to fail, or with an {@link
-     * #idleEvent} if the sending of the last message could be sent successfully despite the attempt at interrupting it.
-     * <p/>
-     * Sending is said to be in progress if, and only if, the last call to startAction is more recent than the last call to
-     * {@link #idleEvent} or {@link #downEvent}.
-     * <p/>
-     * It is advisable to also cancel an ongoing connect action, but not mandatory. If a {@link #connectAction} later succeeds,
-     * then {@link #upEvent} <b>must</b> be called as usual. This will result in another call to {@link #closeOutputAction}.
-     */
-    protected abstract void closeOutputAction();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/OutgoingMessageEvent.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/OutgoingMessageEvent.java
deleted file mode 100644 (file)
index 47133f1..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.endpoint;
-
-/**
- * An event which provides notification of the the transmission status of an
- * outgoing message. The source of the event is the Message object.
- */
-public class OutgoingMessageEvent extends java.util.EventObject {
-
-    // Two low-cost msg events for reporting to selectors: success does not require an exception. An exception is too expensive
-    // for overflow.  The message component is useless for select but we need a dummy src in order to construct an Event.  Note,
-    // to convert OVERFLOW or SUCCESS to listener-compatible events, clone them and set the message member. Other events are
-    // already all right.
-    public static final OutgoingMessageEvent SUCCESS = new OutgoingMessageEvent();
-    public static final OutgoingMessageEvent OVERFLOW = new OutgoingMessageEvent();
-
-    private Throwable failure = null;
-
-    /**
-     * Create an Outgoing Message Event with a dummy src (message
-     * is not specified because the event is a constant).
-     */
-    public OutgoingMessageEvent() {
-        super("Unspecified");
-    }
-
-    /**
-     * Create an Outgoing Message Event.
-     *
-     * @param source the message for which the event is occurring.
-     */
-    public OutgoingMessageEvent(Message source) {
-        super(source);
-    }
-
-    /**
-     * Create an Outgoing Message Event.
-     *
-     * @param source  The message for which the event is occurring.
-     * @param failure The failure associated with this event.
-     */
-    public OutgoingMessageEvent(Message source, Throwable failure) {
-        super(source);
-        this.failure = failure;
-    }
-
-    /**
-     * Get the failure associated with this event, if any.
-     *
-     * @return the <code>Throwable</code> associated with the failure, if any.
-     *         <code>null</code> if there was no associated failure.
-     */
-    public Throwable getFailure() {
-        return failure;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/OutgoingMessageEventListener.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/OutgoingMessageEventListener.java
deleted file mode 100644 (file)
index 9b458e1..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.endpoint;
-
-/**
- * A listener for events concerning the status of outgoing messages.
- */
-public interface OutgoingMessageEventListener extends java.util.EventListener {
-
-    /**
-     * The message identified by the event could not be sent.
-     * <p/>
-     * The cause of the failure, if any, is available from
-     * {@link OutgoingMessageEvent#getFailure()}. Failures while sending
-     * messages have several causes :
-     * <p/>
-     * <ul>
-     * <li>An {@link java.io.IOException} means that the messenger cannot
-     * send the message and the messenger will accept no further messages
-     * to be sent.</li>
-     * <p/>
-     * <li>A {@link java.lang.RuntimeException} mean that the message was
-     * not sent, but retries may or may not be possible based upon the
-     * status returned by {@link Messenger#isClosed()}.</li>
-     * <p/>
-     * <li><code>null</code> means that the message was not sent, but may
-     * be retried. Usually the failure is due to local resource limits
-     * being exceeded. Attempts may be made to later resend the message,
-     * usually after waiting for congestion to clear.</li>
-     * </ul>
-     * @param event the event
-     */
-    void messageSendFailed(OutgoingMessageEvent event);
-
-    /**
-     * The message identified by the event was successfully sent. Successfully
-     * sending a message is not a guarantee that it will be successfully
-     * received by the destination.
-     * @param event the event
-     */
-    void messageSendSucceeded(OutgoingMessageEvent event);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/StringMessageElement.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/StringMessageElement.java
deleted file mode 100644 (file)
index 4325424..0000000
+++ /dev/null
@@ -1,546 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.endpoint;
-
-
-import net.jxta.document.MimeMediaType;
-import net.jxta.logging.Logging;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.Reader;
-import java.io.StringReader;
-import java.io.UnsupportedEncodingException;
-import java.io.Writer;
-import java.lang.ref.SoftReference;
-import java.nio.ByteBuffer;
-import java.nio.CharBuffer;
-import java.nio.charset.Charset;
-import java.nio.charset.CharsetEncoder;
-import java.nio.charset.CoderResult;
-import java.nio.charset.CodingErrorAction;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * A Message Element using character strings for the element data.
- */
-public class StringMessageElement extends TextMessageElement {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(StringMessageElement.class.getName());
-
-    /**
-     * The MIME media type we will be use for encoding {@code String}s when no
-     * encoding is specified.
-     */
-    private static final MimeMediaType DEFAULT_TEXT_ENCODING = new MimeMediaType(MimeMediaType.TEXT_DEFAULTENCODING, "charset=\"" + Charset.defaultCharset().name() + "\"", true).intern();
-
-    /**
-     * The data for this Message Element.
-     */
-    protected String data;
-
-    /**
-     * Returns an appropriate mime type for the given encoding name. The
-     * mimetype will contain the canonical name of the encoding.
-     *
-     * @param encoding name of the desired encoding.
-     * @return the mime type.
-     * @throws java.io.UnsupportedEncodingException
-     *          if the mime is unsupported
-     */
-    private static MimeMediaType makeMimeType(String encoding) throws UnsupportedEncodingException {
-        InputStreamReader getEncoding = new InputStreamReader(new ByteArrayInputStream(new byte[0]), encoding);
-
-        String canonicalName = getEncoding.getEncoding();
-
-        return new MimeMediaType(MimeMediaType.TEXT_DEFAULTENCODING, "charset=\"" + canonicalName + "\"", true).intern();
-    }
-
-    /**
-     * Create a new Message Element from the provided String. The String will
-     * be encoded for transmission using UTF-8.
-     *
-     * @param name  Name of the Element. May be the empty string ("") or null if
-     *              the Element is not named.
-     * @param value A String containing the contents of this element.
-     * @param sig   Message digest/digital signature element. If no signature is
-     *              to be specified, pass <code>null</code>.
-     * @throws IllegalArgumentException if <code>value</code> is
-     *                                  <code>null</code>.
-     */
-    public StringMessageElement(String name, String value, MessageElement sig) {
-        super(name, MimeMediaType.TEXTUTF8, sig);
-
-        if (null == value) {
-            throw new IllegalArgumentException("value must be non-null");
-        }
-
-        data = value;
-    }
-
-    /**
-     * Create a new Message Element from the provided String. The string will
-     * be encoded for transmission using specified character encoding.
-     *
-     * @param name     Name of the MessageElement. May be the empty string ("") or
-     *                 <code>null</code> if the MessageElement is not named.
-     * @param value    A String containing the contents of this element.
-     * @param encoding Name of the character encoding to use. If
-     *                 <code>null</code> then the system default character encoding will be
-     *                 used. (Using the system default character encoding should be used with
-     *                 extreme caution).
-     * @param sig      Message digest/digital signature element. If no signature is
-     *                 to be specified, pass <code>null</code>.
-     * @throws IllegalArgumentException     if <code>value</code> is
-     *                                      <code>null</code>.
-     * @throws UnsupportedEncodingException if the requested encoding is not
-     *                                      supported.
-     */
-    public StringMessageElement(String name, String value, String encoding, MessageElement sig) throws UnsupportedEncodingException {
-        super(name, (null == encoding) ? DEFAULT_TEXT_ENCODING : makeMimeType(encoding), sig);
-
-        if (null == value) {
-            throw new IllegalArgumentException("value must be non-null");
-        }
-
-        data = value;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        }
-
-        if (target instanceof MessageElement) {
-            if (!super.equals(target)) {
-                return false;
-            }
-
-            if (target instanceof StringMessageElement) {
-                StringMessageElement likeMe = (StringMessageElement) target;
-
-                return data.equals(likeMe.data); // same chars?
-            } else if (target instanceof TextMessageElement) {
-                // have to do a slow char by char comparison. Still better than the stream since it saves encoding.
-                // XXX 20020615 bondolo@jxta.org the performance of this could be much improved.
-
-                TextMessageElement likeMe = (TextMessageElement) target;
-
-                try {
-                    Reader myReader = getReader();
-                    Reader itsReader = likeMe.getReader();
-
-                    int mine;
-                    int its;
-
-                    do {
-                        mine = myReader.read();
-                        its = itsReader.read();
-
-                        if (mine != its) {
-                            return false;
-                        }       // content didn't match
-
-                    } while ((-1 != mine) && (-1 != its));
-
-                    return ((-1 == mine) && (-1 == its)); // end at the same time?
-                } catch (IOException fatal) {
-                    IllegalStateException failure = new IllegalStateException("MessageElements could not be compared.");
-
-                    failure.initCause(fatal);
-                    throw failure;
-                }
-            } else {
-                // have to do a slow stream comparison.
-                // XXX 20020615 bondolo@jxta.org the performance of this could be much improved.
-
-                MessageElement likeMe = (MessageElement) target;
-
-                try {
-                    InputStream myStream = getStream();
-                    InputStream itsStream = likeMe.getStream();
-
-                    int mine;
-                    int its;
-
-                    do {
-                        mine = myStream.read();
-                        its = itsStream.read();
-
-                        if (mine != its) {
-                            return false;
-                        }       // content didn't match
-
-                    } while ((-1 != mine) && (-1 != its));
-
-                    return ((-1 == mine) && (-1 == its)); // end at the same time?
-                } catch (IOException fatal) {
-                    IllegalStateException failure = new IllegalStateException("MessageElements could not be compared.");
-
-                    failure.initCause(fatal);
-                    throw failure;
-                }
-            }
-        }
-
-        return false; // not a new message element
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        int result = super.hashCode() * 6037 + // a prime
-                data.hashCode();
-
-        return result;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String toString() {
-        return data;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized byte[] getBytes(boolean copy) {
-        byte[] cachedBytes = null;
-
-        if (null != cachedGetBytes) {
-            cachedBytes = cachedGetBytes.get();
-        }
-
-        if (null == cachedBytes) {
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer(
-                        "Creating getBytes of " + getClass().getName() + '@' + Integer.toHexString(System.identityHashCode(this)));
-            }
-
-            String charset = type.getParameter("charset");
-
-            try {
-                cachedBytes = data.getBytes(charset);
-            } catch (UnsupportedEncodingException caught) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "MessageElement Data could not be generated", caught);
-                }
-                IllegalStateException failure = new IllegalStateException("MessageElement Data could not be generated");
-
-                failure.initCause(caught);
-                throw failure;
-            }
-
-            cachedGetBytes = new SoftReference<byte[]>(cachedBytes);
-        }
-
-        if (!copy) {
-            return cachedBytes;
-        }
-
-        byte[] bytesCopy = cachedBytes.clone();
-
-        return bytesCopy;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public long getCharLength() {
-        return data.length();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized char[] getChars(boolean copy) {
-        char[] cachedChars = null;
-
-        if (null != cachedGetChars) {
-            cachedChars = cachedGetChars.get();
-        }
-
-        if (null == cachedChars) {
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer("creating cachedGetChars of " + getClass().getName() + '@' + Integer.toHexString(hashCode()));
-            }
-
-            cachedChars = new char[data.length()];
-
-            data.getChars(0, data.length(), cachedChars, 0);
-
-            // if this is supposed to be a shared buffer then we can cache it.
-
-            cachedGetChars = new SoftReference<char[]>(cachedChars);
-        }
-
-        if (!copy) {
-            return cachedChars;
-        }
-
-        char[] copyChars = cachedChars.clone();
-
-        return copyChars;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public InputStream getStream() throws IOException {
-        byte cachedBytes[] = null;
-
-        synchronized (this) {
-            if (null != cachedGetBytes) {
-                cachedBytes = cachedGetBytes.get();
-            }
-        }
-
-        if (null != cachedBytes) {
-            return new ByteArrayInputStream(cachedBytes);
-        } else {
-            String charset = type.getParameter("charset");
-            return new CharSequenceInputStream(data, charset);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * @return InputStream of the stream containing element data.
-     * @throws IOException when there is a problem getting a reader.
-     */
-    public Reader getReader() throws IOException {
-
-        return new StringReader(data);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void sendToStream(OutputStream sendTo) throws IOException {
-
-        sendTo.write(getBytes(false));
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void sendToWriter(Writer sendTo) throws IOException {
-        sendTo.write(data);
-    }
-
-    /**
-     *
-     **/
-    private static class CharSequenceInputStream extends InputStream {
-
-        private final CharBuffer charData;
-
-        private final CharsetEncoder conversion;
-
-        private boolean marked = false;
-        private byte mark_multiByteChar[];
-        private int mark_position;
-
-        private byte multiByteChar[];
-        private int position;
-
-        /**
-         * @param s        the char sequence
-         * @param encoding the charset encoding
-         */
-        CharSequenceInputStream(CharSequence s, String encoding) {
-            charData = CharBuffer.wrap(s);
-
-            Charset encodingCharset = Charset.forName(encoding);
-
-            conversion = encodingCharset.newEncoder();
-            conversion.onMalformedInput(CodingErrorAction.REPLACE);
-            conversion.onUnmappableCharacter(CodingErrorAction.REPLACE);
-
-            int maxBytes = new Float(conversion.maxBytesPerChar()).intValue();
-
-            multiByteChar = new byte[maxBytes];
-            position = multiByteChar.length;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public void mark(int ignored) {
-            charData.mark();
-            mark_multiByteChar = multiByteChar.clone();
-            mark_position = position;
-            marked = true;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public boolean markSupported() {
-            return true;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public void reset() throws IOException {
-
-            if (!marked) {
-                throw new IOException("reset() called before mark()");
-            }
-
-            charData.reset();
-            multiByteChar = mark_multiByteChar.clone();
-            position = mark_position;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public int read() throws IOException {
-            // prefill the buffer
-            while (multiByteChar.length == position) {
-                int readsome = read(multiByteChar, 0, multiByteChar.length);
-
-                if (-1 == readsome) {
-                    return -1;
-                }
-
-                position = multiByteChar.length - readsome;
-
-                if ((0 != position) && (0 != readsome)) {
-                    System.arraycopy(multiByteChar, 0, multiByteChar, position, readsome);
-                }
-            }
-
-            return (multiByteChar[position++] & 0xFF);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public int read(byte[] buffer) throws IOException {
-            return read(buffer, 0, buffer.length);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public int read(byte[] buffer, int offset, int length) throws IOException {
-            // handle partial characters;
-            if (multiByteChar.length != position) {
-                int copying = Math.min(length, multiByteChar.length - position);
-
-                System.arraycopy(multiByteChar, position, buffer, offset, copying);
-                position += copying;
-                return copying;
-            }
-
-            ByteBuffer bb = ByteBuffer.wrap(buffer, offset, length);
-
-            int before = bb.remaining();
-
-            CoderResult result = conversion.encode(charData, bb, true);
-
-            int readin = before - bb.remaining();
-
-            if (CoderResult.UNDERFLOW == result) {
-                if (0 == readin) {
-                    return -1;
-                } else {
-                    return readin;
-                }
-            }
-
-            if (CoderResult.OVERFLOW == result) {
-                return readin;
-            }
-
-            result.throwException();
-
-            // NEVERREACHED
-            return 0;
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/TextDocumentMessageElement.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/TextDocumentMessageElement.java
deleted file mode 100644 (file)
index 763c257..0000000
+++ /dev/null
@@ -1,358 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.endpoint;
-
-
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.TextDocument;
-import net.jxta.logging.Logging;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.Reader;
-import java.io.UnsupportedEncodingException;
-import java.io.Writer;
-import java.lang.ref.SoftReference;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * A Message Element using JXTA TextDocument for the element data.
- */
-public class TextDocumentMessageElement extends TextMessageElement {
-
-    /**
-     * Log4J Logger
-     */
-    private static final Logger LOG = Logger.getLogger(TextDocumentMessageElement.class.getName());
-
-    /**
-     * The data for this element.
-     */
-    protected TextDocument doc;
-
-    /**
-     * Create a new Message Element from the provided Document.
-     *
-     * @param name Name of the Element. May be the empty string ("") or null if
-     *             the Element is not named.
-     * @param doc  A Document containing the contents of this element.
-     * @param sig  optional message digest/digital signature elemnent. If
-     *             no signature is to be specified, pass null.
-     */
-    public TextDocumentMessageElement(String name, TextDocument doc, MessageElement sig) {
-        super(name, doc.getMimeType(), sig);
-
-        this.doc = doc;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        }
-
-        if (target instanceof MessageElement) {
-            if (!super.equals(target)) {
-                return false;
-            }
-
-            if (target instanceof TextMessageElement) {
-                // have to do a slow char by char comparison. Still better than the stream since it saves encoding.
-                // XXX 20020615 bondolo@jxta.org the performance of this could be much improved.
-
-                TextMessageElement likeMe = (TextMessageElement) target;
-
-                try {
-                    Reader myReader = getReader();
-                    Reader itsReader = likeMe.getReader();
-
-                    int mine;
-                    int its;
-
-                    do {
-                        mine = myReader.read();
-                        its = itsReader.read();
-
-                        if (mine != its) {
-                            return false;
-                        }       // content didn't match
-
-                    } while ((-1 != mine) && (-1 != its));
-
-                    return ((-1 == mine) && (-1 == its)); // end at the same time?
-                } catch (IOException fatal) {
-                    throw new IllegalStateException("MessageElements could not be compared." + fatal);
-                }
-            } else {
-                // have to do a slow stream comparison.
-                // XXX 20020615 bondolo@jxta.org the performance of this could be much improved.
-
-                MessageElement likeMe = (MessageElement) target;
-
-                try {
-                    InputStream myStream = getStream();
-                    InputStream itsStream = likeMe.getStream();
-
-                    int mine;
-                    int its;
-
-                    do {
-                        mine = myStream.read();
-                        its = itsStream.read();
-
-                        if (mine != its) {
-                            return false;
-                        }       // content didn't match
-
-                    } while ((-1 != mine) && (-1 != its));
-
-                    return ((-1 == mine) && (-1 == its)); // end at the same time?
-                } catch (IOException fatal) {
-                    throw new IllegalStateException("MessageElements could not be compared." + fatal);
-                }
-            }
-        }
-
-        return false; // not a new message element
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        int result = super.hashCode() * 6037 + // a prime
-                toString().hashCode();
-
-        return result;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized String toString() {
-        String result;
-
-        if (null != cachedToString) {
-            result = cachedToString.get();
-
-            if (null != result) {
-                return result;
-            }
-        }
-
-        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-            LOG.finer("creating toString of " + getClass().getName() + "@" + super.hashCode());
-        }
-
-        result = doc.toString();
-        cachedToString = new SoftReference<String>(result);
-        return result;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public MimeMediaType getMimeType() {
-        return doc.getMimeType();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getFileExtension() {
-        return doc.getFileExtension();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public InputStream getStream() throws IOException {
-        byte[] sending = getBytes(false);
-
-        return new ByteArrayInputStream(sending);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void sendToStream(OutputStream sendTo) throws IOException {
-
-        byte[] sending = getBytes(false);
-
-        sendTo.write(sending, 0, sending.length);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Reader getReader() throws IOException {
-
-        return doc.getReader();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void sendToWriter(Writer sendTo) throws IOException {
-        doc.sendToWriter(sendTo);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public byte[] getBytes(boolean copy) {
-        byte[] result;
-
-        if (null != cachedGetBytes) {
-            result = cachedGetBytes.get();
-
-            if (null != result) {
-                if (copy) {
-                    byte[] theCopy = new byte[result.length];
-
-                    System.arraycopy(theCopy, 0, result, 0, result.length);
-                } else {
-                    return result;
-                }
-            }
-        }
-
-        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-            LOG.finer("creating getBytes of " + getClass().getName() + '@' + Integer.toHexString(hashCode()));
-        }
-
-        String charset = type.getParameter("charset");
-
-        if (null == charset) {
-            result = toString().getBytes();
-        } else {
-            try {
-                result = toString().getBytes(charset);
-            } catch (UnsupportedEncodingException caught) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "MessageElement Data could not be generated", caught);
-                }
-                throw new IllegalStateException("MessageElement Data could not be generated due to " + caught.getMessage());
-            }
-        }
-
-        // if this is supposed to be a shared buffer then we can cache it.
-        if (!copy) {
-            cachedGetBytes = new SoftReference<byte[]>(result);
-        }
-
-        return result;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public long getCharLength() {
-        return toString().length();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public char[] getChars(boolean copy) {
-        char[] result;
-
-        if (null != cachedGetChars) {
-            result = cachedGetChars.get();
-
-            if (null != result) {
-                if (copy) {
-                    char[] theCopy = new char[result.length];
-
-                    System.arraycopy(theCopy, 0, result, 0, result.length);
-                } else {
-                    return result;
-                }
-            }
-        }
-
-        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-            LOG.finer("creating getChars of " + getClass().getName() + '@' + Integer.toHexString(hashCode()));
-        }
-
-        String asString = toString();
-
-        result = asString.toCharArray();
-
-        // if this is supposed to be a shared buffer then we can cache it.
-        if (!copy) {
-            cachedGetChars = new SoftReference<char[]>(result);
-        }
-
-        return result;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/TextMessageElement.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/TextMessageElement.java
deleted file mode 100644 (file)
index 4f866a1..0000000
+++ /dev/null
@@ -1,316 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.endpoint;
-
-
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.TextDocument;
-import net.jxta.logging.Logging;
-import net.jxta.util.CountingWriter;
-import net.jxta.util.DevNullWriter;
-
-import java.io.IOException;
-import java.io.Reader;
-import java.io.Writer;
-import java.lang.ref.SoftReference;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * An extension of MessageElement for managing elements that are composed of
- * character text. (as opposed to raw bytes).
- * <p/>
- * The data contained within a {@code TextMessageElement} is accessible in three
- * additional ways to those provided by {@code MessageElement} :
- * <p/>
- * <ul>
- * <li>As an {@link java.io.Reader} from {@link #getReader()}</li>
- * <li>Sending the data a {@link java.io.Writer} via {@link #sendToWriter(Writer)}</li>
- * <li>As a char array from  from {@link #getChars(boolean)}</li>
- * </ul>
- *
- */
-public abstract class TextMessageElement extends MessageElement implements TextDocument {
-
-    /**
-     * Log4J Logger
-     */
-    private static final Logger LOG = Logger.getLogger(TextMessageElement.class.getName());
-
-    /**
-     * cached result of {@link #getCharLength()} operation.
-     */
-    protected transient long cachedGetCharLength = -1;
-
-    /**
-     * cached result of {@link #getBytes(boolean)} operation.
-     */
-    protected transient SoftReference<char[]> cachedGetChars = null;
-
-    /**
-     * Internal constructor for initializaing everything but the data.
-     *
-     * @param name Name of the Element. May be the empty string ("") if
-     *             the Element is not named.
-     * @param type Type of the Element. null is equivalent to specifying
-     *             the type "Application/Octet-stream"
-     * @param sig  optional message digest/digital signature elemnent. If
-     *             no signature is to be specified, pass null.
-     */
-    protected TextMessageElement(String name, MimeMediaType type, MessageElement sig) {
-        super(name, type, sig);
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * synchronized for caching purposes.
-     */
-    @Override
-    public synchronized String toString() {
-        String result;
-
-        if (null != cachedToString) {
-            result = cachedToString.get();
-
-            if (null != result) {
-                return result;
-            }
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("creating toString of " + getClass().getName() + '@' + Integer.toHexString(hashCode()));
-        }
-
-        StringBuilder theString = new StringBuilder();
-
-        try {
-            Reader asString = getReader();
-            char[] characters = new char[256];
-
-            do {
-                int res = asString.read(characters);
-
-                if (res < 0) {
-                    break;
-                }
-
-                theString.append(characters, 0, res);
-            } while (true);
-
-            result = theString.toString();
-
-            cachedToString = new SoftReference<String>(result);
-            return result;
-        } catch (IOException caught) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Could not generate string for element. ", caught);
-            }
-
-            throw new IllegalStateException("Could not generate string for element. " + caught);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * We use the "text" extension and leave it to sub-classes to extend
-     * this.
-     */
-    @Override
-    public String getFileExtension() {
-        return "txt";
-    }
-
-    /**
-     * Returns the size of the element data in characters
-     * <p/>
-     * synchronized for caching purposes.
-     *
-     * @return long containing the size of the element data.
-     */
-    public synchronized long getCharLength() {
-        if (cachedGetCharLength >= 0) {
-            return cachedGetCharLength;
-        }
-
-        CountingWriter countChars = new CountingWriter(new DevNullWriter());
-
-        try {
-            sendToWriter(countChars);
-            cachedGetByteLength = countChars.getCharsWritten();
-            return cachedGetByteLength;
-        } catch (IOException caught) {
-            throw new IllegalStateException("Could not get length of element : " + caught.toString());
-        }
-    }
-
-    /**
-     * Returns a char array which contains the element data. The char array
-     * returned <b>may be shared amongst all copies of the element</b>,
-     * do not modify it. The <tt>copy</tt> parameter allows you to request a
-     * private, modifiable copy of the element data.
-     * <p/>
-     * synchronized for caching purposes.
-     *
-     * @param copy return a copy if true
-     * @return char[] Contents of message element.
-     */
-    public synchronized char[] getChars(boolean copy) {
-        char[] result;
-
-        if (null != cachedGetChars) {
-            result = cachedGetChars.get();
-
-            if (null != result) {
-                if (copy) {
-                    char[] theCopy = new char[result.length];
-
-                    System.arraycopy(theCopy, 0, result, 0, result.length);
-                } else {
-                    return result;
-                }
-            }
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("creating getChars of " + getClass().getName() + '@' + Integer.toHexString(hashCode()));
-        }
-
-        long len = getCharLength();
-
-        if (len > Integer.MAX_VALUE) {
-            throw new IllegalStateException("MessageElement is too large to be stored in a char array.");
-        }
-
-        result = new char[(int) len];
-
-        try {
-            Reader reader = getReader();
-
-            int toRead = (int) len;
-            int offset = 0;
-
-            do {
-                int read = reader.read(result, offset, toRead);
-
-                if (-1 == read) {
-                    break;
-                }
-
-                toRead -= read;
-                offset += read;
-            } while (toRead < len);
-
-            if (toRead != 0) {
-                IOException failure = new IOException("Unexpected EOF");
-
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, failure.getMessage(), failure);
-                }
-
-                throw failure;
-            }
-        } catch (IOException caught) {
-            IllegalStateException failure = new IllegalStateException("Failed to get bytes of Message Element");
-
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, failure.getMessage(), caught);
-            }
-            throw failure;
-        }
-
-        // if this is supposed to be a shared buffer then we can cache it.
-        if (!copy) {
-            cachedGetChars = new SoftReference<char[]>(result);
-        }
-
-        return result;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * This version probably has sub-optimal performance. Sub-classes
-     * should override this implementation if possible.
-     */
-    public void sendToWriter(Writer sendTo) throws IOException {
-        copyReaderToWriter(getReader(), sendTo);
-    }
-
-    /**
-     * Copies a reader to a writer with buffering.
-     *
-     * @param source The reader to copy from.
-     * @param sink   The writer to send the data to.
-     * @throws IOException if there is a problem copying the data
-     */
-    private void copyReaderToWriter(Reader source, Writer sink) throws IOException {
-        int c;
-        char[] buf = new char[4096];
-
-        do {
-            c = source.read(buf);
-
-            if (-1 == c) {
-                break;
-            }
-
-            sink.write(buf, 0, c);
-        } while (true);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/ThreadedMessenger.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/ThreadedMessenger.java
deleted file mode 100644 (file)
index 995c757..0000000
+++ /dev/null
@@ -1,800 +0,0 @@
-/*
- * Copyright (c) 2004-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.endpoint;
-
-import net.jxta.logging.Logging;
-import net.jxta.peergroup.PeerGroupID;
-
-import java.io.IOException;
-import java.util.WeakHashMap;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * This is a messenger meant to be shared by multiple channels and automatically
- * distribute the available bandwidth among the channels. This one is implemented
- * with a dedicated background thread.
- */
-public abstract class ThreadedMessenger extends AbstractMessenger implements Runnable {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(ThreadedMessenger.class.getName());
-
-    /**
-     * Our thread group.
-     */
-    private final static transient ThreadGroup myThreadGroup = new ThreadGroup("Threaded Messengers");
-
-    /**
-     * The logical destination address of the other party (if we know it).
-     */
-    private volatile EndpointAddress logicalDestination = null;
-
-    /**
-     * true if we have deliberately closed our input queue.
-     */
-    private volatile boolean inputClosed = false;
-
-    /**
-     * Need to know which group the transports we use live in, so that we can suppress channel redirection when in the same group.
-     * This is currently the norm.
-     */
-    private PeerGroupID homeGroupID = null;
-
-    /**
-     * The duration in milliseconds which the background thread will remain
-     * idle before quitting.
-     */
-    private static final long THREAD_IDLE_DEAD = 15000;
-
-    /*
-     * Actions that we defer to after returning from event methods. In other 
-     * words, they cannot be done with the lock held, or they require calling 
-     * more event methods. Because this messenger can take only one message at a 
-     * time, actions do not cascade much. It may happen that the invoking thread 
-     * is required to perform closure after performing send. That's about it.
-     * In addition, there's always only one deferred action per event. The only 
-     * actions that cluster are closeInput and closeOutput. We do not defer 
-     * those.
-     */
-    private enum DeferredAction {
-
-        /**
-         * No action deferred.
-         */
-        ACTION_NONE,
-        
-        /**
-         * Must send the current message.
-         */
-        ACTION_SEND,
-        
-        /**
-         * Must report failure to connect.
-         */
-        ACTION_CONNECT
-    }
-
-    /**
-     * The current deferred action.
-     */
-    private DeferredAction deferredAction = DeferredAction.ACTION_NONE;
-
-    /**
-     * The current background thread.
-     */
-    private volatile Thread bgThread = null;
-
-    /**
-     * The number of messages which may be queued for in each channel.
-     */
-    private final int channelQueueSize;
-
-    /**
-     * The active channel queue.
-     */
-    private final BlockingQueue<ThreadedMessengerChannel> activeChannels = new LinkedBlockingQueue<ThreadedMessengerChannel>();
-
-    /**
-     * The resolving channels set. This is unordered. We use a weak hash map because abandoned channels could otherwise
-     * accumulate in-there until the resolution attempt completes. A buggy application could easily do much damage.
-     * <p/>
-     * Note: a channel with at least one message in it is not considered abandoned. To prevent it from disappearing we set a
-     * strong reference as the value in the map. A buggy application can do great damage, still, by queuing a single message
-     * and then abandoning the channel. This is has to be dealt with at another level; limiting the number of channels
-     * per application, or having a global limit on messages...TBD.
-     */
-    private final WeakHashMap<ThreadedMessengerChannel, ThreadedMessengerChannel> resolvingChannels = new WeakHashMap<ThreadedMessengerChannel, ThreadedMessengerChannel>(4);
-
-    /**
-     * A default channel where we put messages that are send directly through
-     * this messenger rather than via one of its channels.
-     */
-    private ThreadedMessengerChannel defaultChannel = null;
-
-    /**
-     * State lock and engine.
-     */
-    private final ThreadedMessengerState stateMachine = new ThreadedMessengerState();
-
-    /**
-     * The implementation of channel messenger that getChannelMessenger returns:
-     */
-    private class ThreadedMessengerChannel extends AsyncChannelMessenger {
-
-        public ThreadedMessengerChannel(EndpointAddress baseAddress, PeerGroupID redirection, String origService, String origServiceParam, int queueSize, boolean connected) {
-            super(baseAddress, redirection, origService, origServiceParam, queueSize, connected);
-        }
-
-        /**
-         * {@inheritDoc}
-         * <p/>
-         * We're supposed to return the complete destination, including
-         * service and param specific to that channel.  It is not clear, whether
-         * this should include the cross-group mangling, though. Historically,
-         * it does not.
-         */
-        public EndpointAddress getLogicalDestinationAddress() {
-            return logicalDestination;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        protected void startImpl() {
-            if (!addToActiveChannels(this)) {
-                // We do not need to hold our lock to call this, and it is just as well since it could re-enter.
-                down();
-            }
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        protected void connectImpl() {
-
-            // If it cannot be done, it is because we known that we will never be able to generate the resulting event. That means
-            // that either the shared messenger is already resolved, or that it is already dead. In that case, we invoke down/up
-            // in sequence accordingly.
-            //
-            // NOTE: the shared messenger may become dead 1 ns from now...that or 1 hour makes no difference, the channel will
-            // notice when it first tries to send, in that case. The otherway around is more obvious: If the shared messenger is
-            // not USABLE, it cannot come back.
-            //
-            // addToResolvingChannels() garantees us that if it returns true, either of the channel's down or up methods will be
-            // invoked at some point.
-
-            if (!addToResolvingChannels(this)) {
-                if ((ThreadedMessenger.this.getState() & USABLE) != 0) {
-                    up();
-                } else {
-                    down();
-                }
-            }
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        protected void resolPendingImpl() {
-            // If this channel is still among the ones pending resolution, make sure
-            // it becomes strongly referenced.
-            strongRefResolvingChannel(this);
-        }
-
-    }
-
-
-    /**
-     * Our statemachine implementation; just connects the standard AbstractMessengerState action methods to
-     * this object.
-     */
-    private class ThreadedMessengerState extends MessengerState {
-
-        protected ThreadedMessengerState() {
-            super(false);
-        }
-
-        /*
-         * The required action methods.
-         */
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        protected void connectAction() {
-            deferAction(DeferredAction.ACTION_CONNECT);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        protected void startAction() {
-            deferAction(DeferredAction.ACTION_SEND);
-        }
-
-        /**
-         * {@inheritDoc}
-         * <p/>
-         * This is a synchronous action. The state machine assumes that it
-         * is done when we return. There is No need (nor means) to signal
-         * completion.  No need for synchronization either: we're already
-         * synchronized.
-         */
-        @Override
-        protected void closeInputAction() {
-            inputClosed = true;
-            ThreadedMessengerChannel[] channels = resolvingChannels.keySet().toArray(new ThreadedMessengerChannel[0]);
-
-            resolvingChannels.clear();
-            int i = channels.length;
-
-            while (i-- > 0) {
-                channels[i].down();
-            }
-            channels = null;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        protected void closeOutputAction() {
-            // This will break the cnx; thereby causing a down event if we have a send in progress.
-            // If the cnx does not break before the current message is sent, then the message will be sent successfully,
-            // resulting in an idle event. Either of these events is enough to complete the shutdown process.
-            closeImpl();
-        }
-
-        /**
-         * {@inheritDoc}
-         * <p/>
-         * The input is now closed, so we can rest assured that the last
-         * channel is really the last one.
-         * This is a synchronous action. The state machine assumes that it is
-         * done when we return. There is no need to signal completion with an
-         * idleEvent.
-         * No need for synchronization either: we're already synchronized.
-         */
-        @Override
-        protected void failAllAction() {
-
-            while (true) {
-                ThreadedMessengerChannel theChannel;
-
-                theChannel = activeChannels.poll();
-                if (theChannel == null) {
-                    break;
-                }
-                theChannel.down();
-            }
-        }
-    }
-
-    /**
-     * Create a new ThreadedMessenger.
-     *
-     * @param homeGroupID        the group that this messenger works for. This is the group of the endpoint service or transport
-     *                           that created this messenger.
-     * @param destination        where messages should be addressed to
-     * @param logicalDestination the expected logical address of the destination. Pass null if unknown/irrelevant
-     * @param channelQueueSize   The queue size that channels should have.
-     */
-    public ThreadedMessenger(PeerGroupID homeGroupID, EndpointAddress destination, EndpointAddress logicalDestination, int channelQueueSize) {
-
-        super(destination);
-
-        this.homeGroupID = homeGroupID;
-
-        // We tell our super class that we synchronize our state on the stateMachine object. Logic would dictate
-        // that we pass it to super(), but it is not itself constructed until super() returns. No way around it.
-
-        setStateLock(stateMachine);
-
-        this.logicalDestination = logicalDestination;
-        this.channelQueueSize = channelQueueSize;
-    }
-
-    /**
-     * Runs the state machine until there's nothing left to do.
-     * <p/>
-     * Three exposed methods may need to inject new events in the system: sendMessageN, close, and shutdown. Since they can both
-     * cause actions, and since connectAction and startAction are deferred, it seems possible that one of the
-     * actions caused by send, close, or shutdown be called while connectAction or startAction are in progress.
-     * <p/>
-     * However, the state machine gives us a few guarantees: All the actions except closeInput and closeOutput have an *end*
-     * event. No state transition that results in an action other than closeInput or closeOutput, may occur until the end event
-     * for an on-going action has been called.
-     * <p/>
-     * We perform closeInput and closeOutput on the fly, so none of the exposed methods are capable of producing deferred actions
-     * while an action is already deferred. So, there is at most one deferred action after returning from an event method,
-     * regardless the number of concurrent threads invoking the exposed methods, and it can only happen once per deferred action
-     * performed.
-     */
-    public void run() {
-
-        try {
-            while (true) {
-                switch (nextAction()) {
-                case ACTION_NONE:
-                    return;
-
-                case ACTION_SEND:
-                    send();
-                    break;
-
-                case ACTION_CONNECT:
-                    connect();
-                    break;
-                }
-            }
-        } catch (Throwable any) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Uncaught throwable in background thread", any);
-                // Hope the next thread has more luck. It'll need it.
-            }
-        } finally {
-            synchronized (stateMachine) {
-                bgThread = null;
-            }
-        }
-    }
-
-    private void deferAction(DeferredAction action) {
-        deferredAction = action;
-
-        if (bgThread == null) {
-            bgThread = new Thread(myThreadGroup, this, "ThreadedMessenger for " + getDestinationAddress());
-            bgThread.setDaemon(true);
-            bgThread.start();
-        }
-    }
-
-    private DeferredAction nextAction() {
-
-        long quitAt = System.currentTimeMillis() + THREAD_IDLE_DEAD;
-
-        synchronized (stateMachine) {
-            while (deferredAction == DeferredAction.ACTION_NONE) {
-                // Still nothing to do. Is it time to quit, or where we just awakened for nothing ?
-                if (System.currentTimeMillis() > quitAt) {
-                    // Ok. Time to quit.
-                    return DeferredAction.ACTION_NONE;
-                }
-
-                // We do not need to wakeup exactly on the deadline, so there's no need to
-                // recompute the deadline. THREAD_IDLE_DEAD is comparatively short.
-                try {
-                    stateMachine.wait(THREAD_IDLE_DEAD);
-                } catch (InterruptedException ie) {
-                    // Only shutdown can force termination.
-                    Thread.interrupted();
-                }
-            }
-
-            DeferredAction action = deferredAction;
-
-            deferredAction = DeferredAction.ACTION_NONE;
-            return action;
-        }
-    }
-
-    /**
-     * Performs the ACTION_SEND deferred action: sends the messages in our channel queues until there's none left or
-     * we are forced to stop by connection breakage.
-     * @throws InterruptedException if interrupted
-     */
-    private void send() throws InterruptedException {
-
-        ThreadedMessengerChannel theChannel;
-
-        synchronized (stateMachine) {
-            theChannel = activeChannels.peek();
-            if (theChannel == null) {
-                // No notifyChange: this is defensive code. NotifyChange() should have been called already.
-                stateMachine.idleEvent();
-                stateMachine.notifyAll();
-                return;
-            }
-        }
-
-        while (true) {
-            AsyncChannelMessenger.PendingMessage theMsg = theChannel.peek();
-
-            if (theMsg == null) {
-                // done with that channel for now. (And it knows it). Move to the next channel. Actually
-                // it should have been removed when we popped the last message, except if we went down upon sending it.
-                // In that later case, we leave the channel queue as is so that we cannot have to report, idle
-                // in the same time than down.
-                synchronized (stateMachine) {
-                    activeChannels.poll();
-                    theChannel = activeChannels.peek();
-                    if (theChannel != null) {
-                        continue; // Nothing changes; we do not call msgsEvent because we never call saturatedEvent either.
-                    }
-                    // Done with all channels. We're now idle.
-
-                    stateMachine.idleEvent();
-                    stateMachine.notifyAll();
-                }
-                notifyChange();
-                return;
-            }
-
-            Message currentMsg = theMsg.msg;
-            String currentService = theMsg.service;
-            String currentParam = theMsg.param;
-
-            try {
-                sendMessageBImpl(currentMsg, currentService, currentParam);
-            } catch (Throwable any) {
-
-                // When the current message fails, we leave it in there. sendMessageBImpl does not report failures. So that we can retry if
-                // applicable. It is up to us to report failures. See failall in AsyncChannel. However, there is a risk that a bad
-                // message causes this messenger to go down repeatedly. We need some kind of safeguard. So, if there's already a failure
-                // recorded for this message, we bounce it.
-                synchronized (stateMachine) {
-                    if (theMsg.failure != null) {
-                        theChannel.poll();
-                        currentMsg.setMessageProperty(Messenger.class, new OutgoingMessageEvent(currentMsg, theMsg.failure));
-                    } else {
-                        theMsg.failure = any;
-                    }
-                    stateMachine.downEvent();
-                    stateMachine.notifyAll();
-                }
-                notifyChange();
-                return;
-            }
-
-            synchronized (stateMachine) {
-                // Remove the message sent
-                theChannel.poll();
-                // Rotate the queues (Things are quite a bit simpler if there's a single still active channel
-                // and it's frequent, so it's worth checking)
-                boolean empty = (theChannel.peek() == null);
-
-                if ((activeChannels.size() != 1) || empty) {
-                    activeChannels.poll();
-                    if (!empty) {
-                        // We're not done with that channel. Put it back at the end
-                        activeChannels.put(theChannel);
-                    }
-
-                    // Get the next channel.
-                    theChannel = activeChannels.peek();
-                    if (theChannel == null) {
-                        // Done with all channels. We're now idle.
-                        stateMachine.idleEvent();
-                        stateMachine.notifyAll();
-                    }
-                } // else {continue to use the current channel}
-            }
-
-            if (theChannel == null) {
-                notifyChange();
-                // We're about to go wait(). Yielding is a good bet. It is
-                // very inexpenssive and may be all it takes to get a new job
-                // queued.
-                Thread.yield();
-                return;
-            }
-        }
-    }
-
-    /**
-     * Performs the ACTION_CONNECT deferred action. Generates a down event if it does not work.
-     */
-    private void connect() {
-        boolean worked = connectImpl();
-        ThreadedMessengerChannel[] channels = null;
-
-        synchronized (stateMachine) {
-            if (worked) {
-
-                // we can now get the logical destination from the underlying implementation (likely obtained from a transport
-                // messenger)
-
-                EndpointAddress effectiveLogicalDest = getLogicalDestinationImpl();
-
-                if (logicalDestination == null) {
-                    // We did not know what was supposed to be on the other side. Anything will do.
-                    logicalDestination = effectiveLogicalDest;
-                    stateMachine.upEvent();
-                    channels = resolvingChannels.keySet().toArray(new ThreadedMessengerChannel[0]);
-                    resolvingChannels.clear();
-                } else if (logicalDestination.equals(effectiveLogicalDest)) {
-                    // Good. It's what we expected.
-                    stateMachine.upEvent();
-
-                    channels = resolvingChannels.keySet().toArray(new ThreadedMessengerChannel[0]);
-                    resolvingChannels.clear();
-                } else {
-                    // Ooops, not what we wanted. Can't connect then. (force close the underlying cnx).
-                    closeImpl();
-                    stateMachine.downEvent();
-                }
-
-            } else {
-                stateMachine.downEvent();
-            }
-            stateMachine.notifyAll();
-        }
-
-        // If it worked, we need to tell all the channels that were waiting for resolution.
-        // If it did not work, the outcome depends upon what will happen after the down event.
-        // It's ok to do that outside of sync. Channel.up may synchronize, but it never calls
-        // this class while synchronized.
-        if (channels != null) {
-
-            int i = channels.length;
-
-            while (i-- > 0) {
-                channels[i].up();
-            }
-            channels = null;
-        }
-
-        notifyChange();
-    }
-
-    /*
-     * Messenger API top level methods.
-     */
-
-    /**
-     * The endpoint service may call this to cause an orderly closure of its messengers.
-     */
-    protected final void shutdown() {
-        synchronized (stateMachine) {
-            stateMachine.shutdownEvent();
-            stateMachine.notifyAll();
-        }
-        notifyChange();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public EndpointAddress getLogicalDestinationAddress() {
-
-        // If it's not resolved, we can't know what the logical destination is, unless we had an expectation.
-        // And if we had, the messenger will fail as soon as we discover that the expectation is wrong.
-        // In most if not all cases, either we have an expectation, or the messenger comes already resolved.
-        // Otherwise, if you need the logical destination, you must resolve first. We do not want this method
-        // to be blocking.
-        return logicalDestination;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void close() {
-        synchronized (stateMachine) {
-            stateMachine.closeEvent();
-            stateMachine.notifyAll();
-        }
-        notifyChange();
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * In this case, this method is here out of principle but is not really expected to be invoked.  The normal way
-     * of using a ThreadedMessenger is through its channels. We do provide a default channel that all invokers that go around
-     * channels will share. That could be useful to send rare out of band messages for example.
-     */
-    public final boolean sendMessageN(Message msg, String service, String serviceParam) {
-
-        synchronized (stateMachine) {
-            if (defaultChannel == null) {
-                // Need a default channel.
-                defaultChannel = new ThreadedMessengerChannel(getDestinationAddress(), null, null, null, channelQueueSize, false);
-            }
-        }
-
-        return defaultChannel.sendMessageN(msg, service, serviceParam);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final void sendMessageB(Message msg, String service, String serviceParam) throws IOException {
-
-        synchronized (stateMachine) {
-            if (defaultChannel == null) {
-                // Need a default channel.
-                defaultChannel = new ThreadedMessengerChannel(getDestinationAddress(), null, null, null, channelQueueSize, false);
-            }
-        }
-
-        defaultChannel.sendMessageB(msg, service, serviceParam);
-    }
-
-    private boolean addToActiveChannels(ThreadedMessengerChannel channel) {
-
-        synchronized (stateMachine) {
-            if (inputClosed) {
-                return false;
-            }
-
-            try {
-                activeChannels.put(channel);
-            } catch (InterruptedException failed) {
-                Thread.interrupted();
-                return false;
-            }
-
-            // There are items in the queue now.
-            stateMachine.msgsEvent();
-
-            // We called an event. The state may have changed. Notify waiters.
-            stateMachine.notifyAll();
-        }
-
-        notifyChange();
-
-        return true;
-    }
-
-    private void strongRefResolvingChannel(ThreadedMessengerChannel channel) {
-
-        // If, and only if, this channel is already among the resolving channels, add a strong ref
-        // to it. This is invoked when a message is queued to that channel while it is still
-        // resolving. However we must verify its presence in the resolvingChannels map: this method
-        // may be called while the channel has been removed from the list, but has not been told
-        // yet.
-        synchronized (stateMachine) {
-            if (resolvingChannels.containsKey(channel)) {
-                resolvingChannels.put(channel, channel);
-            }
-        }
-    }
-
-    private boolean addToResolvingChannels(ThreadedMessengerChannel channel) {
-
-        synchronized (stateMachine) {
-            // If we're in a state where no resolution event will ever occur, we must not add anything to the list.
-            if ((stateMachine.getState() & (RESOLVED | TERMINAL)) != 0) {
-                return false;
-            }
-
-            // We use the weak map only for the weak part, not for the map part.
-            resolvingChannels.put(channel, null);
-
-            stateMachine.resolveEvent();
-            stateMachine.notifyAll();
-        }
-
-        notifyChange();
-        return true;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final void resolve() {
-        synchronized (stateMachine) {
-            stateMachine.resolveEvent();
-            stateMachine.notifyAll();
-        }
-        notifyChange();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final int getState() {
-        return stateMachine.getState();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Messenger getChannelMessenger(PeerGroupID redirection, String service, String serviceParam) {
-
-        // Our transport is always in the same group. If the channel's target group is the same, no group
-        // redirection is ever needed.
-        // are we happily resolved ?
-        return new ThreadedMessengerChannel(getDestinationAddress(), homeGroupID.equals(redirection) ? null : redirection, service,
-                serviceParam, channelQueueSize, (stateMachine.getState() & (RESOLVED & USABLE)) != 0);
-    }
-
-    /*
-     * Abstract methods to be provided by implementor. These are fully expected
-     * to be blocking and may be implemented by invoking transport blocking
-     * methods, such as EndpointServiceImpl.getLocalTransportMessenger() or
-     * <em>whateverTransportMessengerWasObtained</em>.sendMessageB(). Should the
-     * underlying code be non-blocking, these impl methods must simulate it. If
-     * it's not obvious to do, then this base class is not a good choice.
-     */
-
-    /**
-     * {@inheritDoc}
-     */
-    protected abstract void closeImpl();
-
-    /**
-     * Make underlying connection.
-     *
-     * @return true if successful
-     */
-    protected abstract boolean connectImpl();
-
-    /**
-     * Send a message blocking as needed until the message is sent.
-     *
-     * @param msg The message to send.
-     * @param service The destination service.
-     * @param param The destination serivce param.
-     * @throws IOException Thrown for errors encountered while sending the message.
-     */
-    protected abstract void sendMessageBImpl(Message msg, String service, String param) throws IOException;
-
-    /**
-     * {@inheritDoc}
-     */
-    protected abstract EndpointAddress getLogicalDestinationImpl();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/WireFormatMessage.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/WireFormatMessage.java
deleted file mode 100644 (file)
index e28c329..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.endpoint;
-
-
-import java.nio.ByteBuffer;
-import net.jxta.document.Document;
-import net.jxta.document.DocumentByteBufferIO;
-import net.jxta.document.MimeMediaType;
-
-
-/**
- *  A wire serialization of an abstract message.
- *
- *  @see net.jxta.endpoint.Message
- *  @see net.jxta.endpoint.WireFormatMessageFactory
- */
-public interface WireFormatMessage extends Document, DocumentByteBufferIO {
-    
-    /**
-     * Returns the encoding used for this content. May be {@code null} for 
-     * unencoded (raw) content.
-     *
-     *  @return The encoding used for this message.
-     */
-    MimeMediaType getContentEncoding();
-    
-    /**
-     * Returns the size of the serialized and encoded form of the message in bytes.
-     *
-     * @return The size of the serialized and encoded message in bytes.
-     */
-    long getByteLength();  
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/WireFormatMessageFactory.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/WireFormatMessageFactory.java
deleted file mode 100644 (file)
index 707fc0f..0000000
+++ /dev/null
@@ -1,361 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.endpoint;
-
-
-import net.jxta.document.MimeMediaType;
-import net.jxta.logging.Logging;
-import net.jxta.util.ClassFactory;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.ByteBuffer;
-import java.util.Hashtable;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * This class is a class factory for Wire Format Messages. This class abstracts
- * The implementation of Wire Format Messages and allows for construction based
- * on the MimeType of InputStreams.
- * <p/>
- * The WireFormatMessageFactory extends the ClassFactory to register the
- * various Message wire format implementations into a static hashtable. The
- * factory is called with the Mime type requested to create the corresponding
- * Wire Format type.
- *
- * @see net.jxta.endpoint.Message
- * @see net.jxta.endpoint.WireFormatMessage
- * @see net.jxta.util.ClassFactory
- * @see net.jxta.document.MimeMediaType
- */
-public final class WireFormatMessageFactory extends ClassFactory<MimeMediaType, WireFormatMessageFactory.Instantiator> {
-
-    /**
-     * Logger
-     */
-    private static final Logger LOG = Logger.getLogger(WireFormatMessageFactory.class.getName());
-
-    /**
-     * The mime media type of preferred/default wire format.
-     */
-    public static final MimeMediaType DEFAULT_WIRE_MIME = new MimeMediaType("application/x-jxta-msg").intern();
-
-    /**
-     * Interface for instantiators of wire format messages.
-     */
-    public interface Instantiator {
-
-        /**
-         * Returns the list of mime types supported by this serialization. All of
-         * mimetypes in this list should have no mime type parameters.
-         *
-         * @return Returns the list of mime types supported by this serialization.
-         */
-        public MimeMediaType[] getSupportedMimeTypes();
-
-        /**
-         * Returns a list of the content encodings supported by this serialization.
-         * These content encodings apply to both the overall coding of the message
-         * and to the encoding of individual elements.
-         *
-         * @return a list of the content encodings supported by this serialization.
-         */
-        public MimeMediaType[] getSupportedContentEncodings();
-
-        /**
-         * Create a WireFormatMessage from an abstract message. It is an error
-         * (though lazily enforced) to modify the abstract message during the
-         * lifetime of the WireFormatMessage.
-         *
-         * @param msg                     the message for which a serialization is desired.
-         * @param type                    the the serialization form desired. This can include
-         *                                mime parameters to control options.
-         * @param preferedContentEncoding An array of acceptable message encodings
-         *                                in descending order of preference. any or none of these encoding options
-         *                                may be used. May be null for unencoded messages.
-         * @return a proxy object for the abstract message which is a
-         *         representation of the message in its serialized form.
-         */
-        public WireFormatMessage toWire(Message msg, MimeMediaType type, MimeMediaType[] preferedContentEncoding);
-
-        /**
-         * Create an abstract message from a serialization.
-         *
-         * @param is              The message stream. Message serializations must either use
-         *                        internal data or EOF to determine the length of the stream.
-         * @param type            Declared message type of the stream including any optional
-         *                        configuration parameters.
-         * @param contentEncoding Content encoding (including optional parameters)
-         *                        which has been applied to the message. May be null for unencoded messages.
-         * @return a proxy object for the abstract message which is a
-         *         representation of the message in its serialized form.
-         * @throws java.io.IOException if an io error occurs
-         */
-        public Message fromWire(InputStream is, MimeMediaType type, MimeMediaType contentEncoding) throws IOException;
-
-        /**
-         * Create an abstract message from a serialization.
-         *
-         * @param buffer          The byte buffer. Message serializations must either use
-         *                        internal data or EOF to determine the length of the stream.
-         * @param type            Declared message type of the stream including any optional
-         *                        configuration parameters.
-         * @param contentEncoding Content encoding (including optional parameters)
-         *                        which has been applied to the message. May be null for unencoded messages.
-         * @return a proxy object for the abstract message which is a
-         *         representation of the message in its serialized form.
-         * @throws java.io.IOException if an io error occurs
-         */
-        public Message fromBuffer(ByteBuffer buffer, MimeMediaType type, MimeMediaType contentEncoding) throws IOException;
-    }
-
-    /**
-     * This is the map of mime-types and constructors used by
-     * <CODE>newStructuredDocument</CODE>.
-     */
-    private Map<MimeMediaType,Instantiator> encodings = new Hashtable<MimeMediaType,Instantiator>();
-
-    /**
-     * If true then the pre-defined set of StructuredDocument sub-classes has
-     * been registered from the property containing them.
-     */
-    private volatile boolean loadedProperty = false;
-
-    /**
-     * This class is in fact a singleton. This is the instance that backs the
-     * static methods.
-     */
-    private static WireFormatMessageFactory factory = new WireFormatMessageFactory();
-
-    /**
-     * Private constructor. This class is not meant to be instantiated except
-     * by itself.
-     */
-    private WireFormatMessageFactory() {}
-
-    /**
-     *  Registers the pre-defined set of WireFormatMessage sub-classes so that
-     *  this factory can construct them.
-     *
-     *  @return true if at least one of the WireFormatMessage sub-classes could
-     *  be registered otherwise false.
-     */
-    private synchronized boolean loadProviders() {
-        if (!factory.loadedProperty) {
-            factory.loadedProperty = registerProviders(WireFormatMessage.class.getName());
-        }
-        
-        return factory.loadedProperty;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected Map<MimeMediaType,Instantiator> getAssocTable() {
-        return encodings;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Class<Instantiator> getClassOfInstantiators() {
-        // our key is the doctype names.
-        return Instantiator.class;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Class getClassForKey() {
-        // our key is the mime types.
-        return MimeMediaType.class;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected boolean registerAssoc(String className) {
-        boolean registeredSomething = false;
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Registering : " + className);
-        }
-
-        try {
-            Class msgClass = Class.forName(className);
-
-            Instantiator instantiator = (Instantiator) (msgClass.getField("INSTANTIATOR").get(null));
-
-            MimeMediaType[] mimeTypes = instantiator.getSupportedMimeTypes();
-
-            for (MimeMediaType mimeType : mimeTypes) {
-                if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                    LOG.finer("   Registering Type : " + mimeType);
-                }
-
-                registeredSomething |= registerInstantiator(mimeType, instantiator);
-            }
-        } catch (Exception all) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed to register \'" + className + "\'", all);
-            }
-        }
-
-        return registeredSomething;
-    }
-
-    /**
-     * Register an instantiator object a mime-type of documents to be
-     * constructed.
-     *
-     * @param mimetype     the mime-type associated.
-     * @param instantiator the instantiator that wants to be registered..
-     * @return boolean true   if the instantiator for this mime-type is now
-     *         registered. If there was already an instantiator this mime-type then
-     *         false will be returned.
-     * @throws SecurityException there were permission problems registering
-     *                           the instantiator.
-     */
-    public static boolean registerInstantiator(MimeMediaType mimetype, Instantiator instantiator) {
-        boolean registered = factory.registerAssoc(mimetype, instantiator);
-
-        return registered;
-    }
-
-    /**
-     * Constructs an instance of {@link WireFormatMessage} matching the type
-     * specified by the <CODE>type</CODE> parameter.
-     *
-     * @param msg               the message for which a serialization is desired.
-     * @param type              the the serialization form desired. This can include
-     *                          mime parameters to control options.
-     * @param preferedEncodings An array of acceptable message encodings
-     *                          in descending order of preference. any or none of these encoding options
-     *                          may be used. May be null for unencoded messages.
-     * @return a proxy object for the abstract message which is a
-     *         representation of the message in its serialized form.
-     */
-    public static WireFormatMessage toWire(Message msg, MimeMediaType type, MimeMediaType[] preferedEncodings) {
-        factory.loadProviders();
-
-        Instantiator instantiator = factory.getInstantiator(type.getBaseMimeMediaType());
-
-        return instantiator.toWire(msg, type, preferedEncodings);
-    }
-
-    /**
-     * Constructs an instance of <CODE>Message</CODE> from matching the type
-     * specified by the <CODE>type</CODE> parameter.
-     *
-     * @param is              The message stream. Message serializations must either use
-     *                        internal data or EOF to determine the length of the stream.
-     * @param type            Declared message type of the stream including any optional
-     *                        configuration parameters.
-     * @param contentEncoding Content encoding (including optional parameters)
-     *                        which has been applied to the message. May be null for unencoded messages.
-     * @return the new abstract message.
-     * @throws java.io.IOException if an io error occurs
-     */
-    public static Message fromWire(InputStream is, MimeMediaType type, MimeMediaType contentEncoding) throws IOException {
-        factory.loadProviders();
-
-        Instantiator instantiator;
-
-        try {
-            instantiator = factory.getInstantiator(type.getBaseMimeMediaType());
-        } catch (NoSuchElementException badType) {
-            throw new IOException("Unable to deserialize message of type: " + type);
-        }
-
-        return instantiator.fromWire(is, type, contentEncoding);
-    }
-
-    /**
-     * Constructs an instance of <CODE>Message</CODE> from matching the type
-     * specified by the <CODE>type</CODE> parameter.
-     *
-     * @param buffer          The message buffer. Message serializations must either use
-     *                        internal data or EOF to determine the length of the stream.
-     * @param type            Declared message type of the stream including any optional
-     *                        configuration parameters.
-     * @param contentEncoding Content encoding (including optional parameters)
-     *                        which has been applied to the message. May be null for unencoded messages.
-     * @return the new abstract message.
-     * @throws java.io.IOException if an io error occurs
-     */
-    public static Message fromBuffer(ByteBuffer buffer, MimeMediaType type, MimeMediaType contentEncoding) throws IOException {
-        factory.loadProviders();
-
-        Instantiator instantiator;
-
-        try {
-            instantiator = factory.getInstantiator(type.getBaseMimeMediaType());
-        } catch (NoSuchElementException badType) {
-            throw new IOException("Unable to deserialize message of type: " + type);
-        }
-
-        return instantiator.fromBuffer(buffer, type, contentEncoding);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/endpoint/package.html
deleted file mode 100644 (file)
index 83bbbe5..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-       Provides interfaces and classes used for the addressing, filtering, sending, 
-       and receiving of messages within JXTA.
-
-       @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html" target='_blank'>JXTA Protocols Specification</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/exception/ConfiguratorException.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/exception/ConfiguratorException.java
deleted file mode 100644 (file)
index 70b6078..0000000
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.exception;
-
-
-import java.io.PrintStream;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-
-/**
- * This class maintains a {@link java.util.List} of all possible {@link
- * java.lang.Throwable causes} that may be generated as a part of the
- * configuration process.
- *
- * @author james todd [gonzo at jxta dot org]
- */
-
-public class ConfiguratorException extends JxtaException {
-
-    private List<Throwable> causes = null;
-
-    /**
-     * Constucts a {@link JxtaException} with no specified details.
-     */
-    public ConfiguratorException() {
-        super();
-    }
-
-    /**
-     * Constructs a {@link JxtaException} with the specified message.
-     *
-     * @param msg message
-     */
-    public ConfiguratorException(String msg) {
-        super(msg);
-    }
-
-    /**
-     * Constructs a {@link JxtaException} with the specified {@link
-     * java.lang.Throwable cause}.
-     *
-     * @param ex cause
-     */
-    public ConfiguratorException(Throwable ex) {
-        super();
-
-        addCause(ex);
-    }
-
-    /**
-     * Constructs a {@link JxtaException} with the specified message and {@link
-     * java.lang.Throwable cause}.
-     *
-     * @param msg message
-     * @param ex  cause
-     */
-    public ConfiguratorException(String msg, Throwable ex) {
-        super(msg);
-
-        addCause(ex);
-    }
-
-    /**
-     * Constructs a {@link JxtaException} with the specified {@link
-     * java.util.List} of {@link java.lang.Throwable causes}.
-     *
-     * @param ex causes
-     */
-    public ConfiguratorException(List ex) {
-        super();
-
-        addCauses(ex);
-    }
-
-    /**
-     * Constructs a {@link JxtaException} with the specified message in
-     * addition to the {@link java.util.List} of {@link java.lang.Throwable
-     * causes}.
-     *
-     * @param msg message
-     * @param ex  causes
-     */
-    public ConfiguratorException(String msg, List ex) {
-        super(msg);
-
-        addCauses(ex);
-    }
-
-    /**
-     * Retrieve the {@link java.lang.Throwable causes} as a {@link
-     * java.util.List}.
-     *
-     * @return The causes
-     */
-    public List<Throwable> getCauses() {
-        return this.causes != null ? this.causes : Collections.<Throwable>emptyList();
-    }
-
-    /**
-     * Add a cause of type {@link java.lang.Throwable}.
-     *
-     * @param c The cause
-     */
-    public void addCause(Throwable c) {
-        if (c != null) {
-            if (this.causes == null) {
-                this.causes = new ArrayList<Throwable>();
-            }
-
-            this.causes.add(c);
-        }
-    }
-
-    /**
-     * Add a {@link java.util.List} of {@link java.lang.Throwable causes}.
-     *
-     * @param c The causes
-     */
-    public void addCauses(List c) {
-        if (c != null) {
-            for (Object aC : c) {
-                addCause((Throwable) aC);
-            }
-        }
-    }
-
-    /**
-     * @inheritDoc <p/>Overload printStackTrace() to support multiple {@link java.lang.Throwable causes}.
-     */
-    @Override
-    public void printStackTrace() {
-        super.printStackTrace();
-
-        for (Object o : getCauses()) {
-            ((Throwable) o).printStackTrace();
-        }
-    }
-
-    /**
-     * @param ps Description of the Parameter
-     * @inheritDoc <p/>Overload printStackTrace({@link java.io.PrintStream}) to support
-     * multiple {@link java.lang.Throwable causes}.
-     */
-    @Override
-    public void printStackTrace(PrintStream ps) {
-        super.printStackTrace(ps);
-
-        ps.println("Caused by:");
-        int count = 1;
-
-        for (Object o : getCauses()) {
-            Throwable t = (Throwable) o;
-
-            ps.print("Cause #" + count++ + " : ");
-
-            t.printStackTrace(ps);
-        }
-    }
-
-    /**
-     * @param pw Description of the Parameter
-     * @inheritDoc <p/>Overload printStackTrace({@link java.io.PrintWriter}) to support
-     * multiple {@link java.lang.Throwable causes}.
-     */
-    @Override
-    public void printStackTrace(PrintWriter pw) {
-        super.printStackTrace(pw);
-
-        pw.println("Caused by:");
-        int count = 1;
-
-        for (Object o : getCauses()) {
-            Throwable t = (Throwable) o;
-
-            pw.print("Cause #" + count++ + " : ");
-
-            t.printStackTrace(pw);
-        }
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/exception/JxtaError.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/exception/JxtaError.java
deleted file mode 100644 (file)
index f7cab08..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*\r
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.\r
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */\r
-\r
-package net.jxta.exception;\r
-\r
-\r
-/**\r
- * Thrown when JXTA cannot continue running.\r
- */\r
-\r
-public class JxtaError extends Error {\r
-    \r
-    /**\r
-     * Construct a new JxtaError with no detailed message.\r
-     *\r
-     */\r
-    public JxtaError() {}  \r
-  \r
-    public JxtaError(String msg) {\r
-        super(msg);\r
-    }\r
-\r
-    public JxtaError(String msg, Throwable cause) {\r
-        super(msg, cause);\r
-    }\r
-\r
-    public JxtaError(Throwable cause) {\r
-        super(cause);\r
-    }\r
-\r
-}\r
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/exception/JxtaException.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/exception/JxtaException.java
deleted file mode 100644 (file)
index 01ad8dc..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*\r
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.\r
- *  \r
- *  The Sun Project JXTA(TM) Software License\r
- *  \r
- *  Redistribution and use in source and binary forms, with or without \r
- *  modification, are permitted provided that the following conditions are met:\r
- *  \r
- *  1. Redistributions of source code must retain the above copyright notice,\r
- *     this list of conditions and the following disclaimer.\r
- *  \r
- *  2. Redistributions in binary form must reproduce the above copyright notice, \r
- *     this list of conditions and the following disclaimer in the documentation \r
- *     and/or other materials provided with the distribution.\r
- *  \r
- *  3. The end-user documentation included with the redistribution, if any, must \r
- *     include the following acknowledgment: "This product includes software \r
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." \r
- *     Alternately, this acknowledgment may appear in the software itself, if \r
- *     and wherever such third-party acknowledgments normally appear.\r
- *  \r
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must \r
- *     not be used to endorse or promote products derived from this software \r
- *     without prior written permission. For written permission, please contact \r
- *     Project JXTA at http://www.jxta.org.\r
- *  \r
- *  5. Products derived from this software may not be called "JXTA", nor may \r
- *     "JXTA" appear in their name, without prior written permission of Sun.\r
- *  \r
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\r
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND \r
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN \r
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, \r
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, \r
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF \r
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING \r
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, \r
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- *  \r
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United \r
- *  States and other countries.\r
- *  \r
- *  Please see the license information page at :\r
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of \r
- *  the license in source files.\r
- *  \r
- *  ====================================================================\r
- *  \r
- *  This software consists of voluntary contributions made by many individuals \r
- *  on behalf of Project JXTA. For more information on Project JXTA, please see \r
- *  http://www.jxta.org.\r
- *  \r
- *  This license is based on the BSD license adopted by the Apache Foundation. \r
- */\r
\r
-package net.jxta.exception;\r
-\r
-\r
-/**\r
- * The class JxtaException and its subclasses are a form of Exception that \r
- * indicates conditions that a reasonable application might want to catch.\r
- * \r
- */\r
-@SuppressWarnings("serial")\r
-public class JxtaException extends Exception {\r
-\r
-    /**\r
-     *  Constructs an Exception with no specified detail message.\r
-     */\r
-    public JxtaException() {\r
-        super();\r
-    }\r
-\r
-    /**\r
-     *  Constructs an Exception with the specified detail message.\r
-     *\r
-     *@param  message the detail message.\r
-     */\r
-    public JxtaException(String message) {\r
-        super(message);\r
-    }\r
-\r
-    /**\r
-     *    Constructs a new exception with the specified detail message and cause.\r
-     *\r
-     *@param  cause the cause (which is saved for later retrieval by the \r
-     *         Throwable.getCause() method).\r
-     *         (A null value is permitted, and indicates that the \r
-     *         cause is nonexistent or unknown.)\r
-     */\r
-    public JxtaException(Throwable cause) {\r
-        super(cause);\r
-    }\r
-\r
-    /**\r
-     *    Constructs a new exception with the specified detail message and cause.\r
-     *\r
-     *@param  message message the detail message\r
-     *@param  cause the cause (which is saved for later retrieval by the \r
-     *         Throwable.getCause() method).\r
-     *         (A null value is permitted, and indicates that the \r
-     *         cause is nonexistent or unknown.)\r
-     */\r
-    public JxtaException(String message, Throwable cause) {\r
-        super(message, cause);\r
-    }\r
-}\r
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/exception/PeerGroupException.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/exception/PeerGroupException.java
deleted file mode 100644 (file)
index 297fc49..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.exception;
-
-
-/**
- * Generic Peer group exception
- *
- */
-
-public class PeerGroupException extends JxtaException {
-
-    /**
-     *  Constructs an Exception with no specified detail message.
-     */
-    public PeerGroupException() {
-        super();
-    }
-
-    /**
-     *  Constructs an Exception with the specified detail message.
-     *
-     *@param  message the detail message.
-     */
-    public PeerGroupException(String message) {
-        super(message);
-    }
-
-    /**
-     *    Constructs a new exception with the specified detail message and cause.
-     *
-     *@param  cause the cause (which is saved for later retrieval by the 
-     *         Throwable.getCause() method).
-     *         (A null value is permitted, and indicates that the 
-     *         cause is nonexistent or unknown.)
-     */
-    public PeerGroupException(Throwable cause) {
-        super(cause);
-    }
-
-    /**
-     *    Constructs a new exception with the specified detail message and cause.
-     *
-     *@param  message message the detail message
-     *@param  cause the cause (which is saved for later retrieval by the 
-     *         Throwable.getCause() method).
-     *         (A null value is permitted, and indicates that the 
-     *         cause is nonexistent or unknown.)
-     */
-    public PeerGroupException(String message, Throwable cause) {
-        super(message, cause);
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/exception/ProtocolNotSupportedException.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/exception/ProtocolNotSupportedException.java
deleted file mode 100644 (file)
index feb4c5f..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.exception;
-
-
-/**
- * Signals that an error occurred while attempting to access an
- * endpoint protocol
- *
- */
-public class ProtocolNotSupportedException extends JxtaException {
-
-    /**
-     *  Constructs an Exception with no specified detail message.
-     */
-    public ProtocolNotSupportedException() {
-        super();
-    }
-
-    /**
-     *  Constructs an Exception with the specified detail message.
-     *
-     *@param  message the detail message.
-     */
-    public ProtocolNotSupportedException(String message) {
-        super(message);
-    }
-
-    /**
-     *    Constructs a new exception with the specified detail message and cause.
-     *
-     *@param  cause the cause (which is saved for later retrieval by the 
-     *         Throwable.getCause() method).
-     *         (A null value is permitted, and indicates that the 
-     *         cause is nonexistent or unknown.)
-     */
-    public ProtocolNotSupportedException(Throwable cause) {
-        super(cause);
-    }
-
-    /**
-     *    Constructs a new exception with the specified detail message and cause.
-     *
-     *@param  message message the detail message
-     *@param  cause the cause (which is saved for later retrieval by the 
-     *         Throwable.getCause() method).
-     *         (A null value is permitted, and indicates that the 
-     *         cause is nonexistent or unknown.)
-     */
-    public ProtocolNotSupportedException(String message, Throwable cause) {
-        super(message, cause);
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/exception/ServiceNotFoundException.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/exception/ServiceNotFoundException.java
deleted file mode 100644 (file)
index 11b7922..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.exception;
-
-
-/**
- * Signals that an error occurred while trying to access a peer group service
- *
- */
-public class ServiceNotFoundException extends JxtaException {
-
-    /**
-     *  Constructs an Exception with no specified detail message.
-     */
-    public ServiceNotFoundException() {
-        super();
-    }
-
-    /**
-     *  Constructs an Exception with the specified detail message.
-     *
-     *@param  message the detail message.
-     */
-    public ServiceNotFoundException(String message) {
-        super(message);
-    }
-
-    /**
-     *    Constructs a new exception with the specified detail message and cause.
-     *
-     *@param  cause the cause (which is saved for later retrieval by the 
-     *         Throwable.getCause() method).
-     *         (A null value is permitted, and indicates that the 
-     *         cause is nonexistent or unknown.)
-     */
-    public ServiceNotFoundException(Throwable cause) {
-        super(cause);
-    }
-
-    /**
-     *    Constructs a new exception with the specified detail message and cause.
-     *
-     *@param  message message the detail message
-     *@param  cause the cause (which is saved for later retrieval by the 
-     *         Throwable.getCause() method).
-     *         (A null value is permitted, and indicates that the 
-     *         cause is nonexistent or unknown.)
-     */
-    public ServiceNotFoundException(String message, Throwable cause) {
-        super(message, cause);
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/exception/UnknownServiceException.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/exception/UnknownServiceException.java
deleted file mode 100644 (file)
index bd53174..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.exception;
-
-
-/**
- * Signals that an error occurred while trying to access a service
- *
- */
-
-public class UnknownServiceException extends JxtaException {
-
-    /**
-     *  Constructs an Exception with no specified detail message.
-     */
-    public UnknownServiceException() {
-        super();
-    }
-
-    /**
-     *  Constructs an Exception with the specified detail message.
-     *
-     *@param  message the detail message.
-     */
-    public UnknownServiceException(String message) {
-        super(message);
-    }
-
-    /**
-     *    Constructs a new exception with the specified detail message and cause.
-     *
-     *@param  cause the cause (which is saved for later retrieval by the 
-     *         Throwable.getCause() method).
-     *         (A null value is permitted, and indicates that the 
-     *         cause is nonexistent or unknown.)
-     */
-    public UnknownServiceException(Throwable cause) {
-        super(cause);
-    }
-
-    /**
-     *    Constructs a new exception with the specified detail message and cause.
-     *
-     *@param  message message the detail message
-     *@param  cause the cause (which is saved for later retrieval by the 
-     *         Throwable.getCause() method).
-     *         (A null value is permitted, and indicates that the 
-     *         cause is nonexistent or unknown.)
-     */
-    public UnknownServiceException(String message, Throwable cause) {
-        super(message, cause);
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/exception/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/exception/package.html
deleted file mode 100644 (file)
index 1fd5f01..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    Exception classes commonly used by JXTA Components.
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/id/ID.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/id/ID.java
deleted file mode 100644 (file)
index 44f52d8..0000000
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.id;
-
-
-import java.io.ObjectStreamException;
-import java.lang.ref.Reference;
-import java.lang.ref.WeakReference;
-import java.net.URI;
-import java.net.URL;
-import java.util.Map;
-import java.util.WeakHashMap;
-
-import java.net.MalformedURLException;
-import java.net.URISyntaxException;
-
-
-/**
- *  IDs are used to uniquely identify peers, peer groups, pipes and other
- *  types of objects manipulated by the JXTA APIs.
- *
- *  @see net.jxta.id.IDFactory
- *  @see net.jxta.codat.CodatID
- *  @see net.jxta.peer.PeerID
- *  @see net.jxta.peergroup.PeerGroupID
- *  @see net.jxta.pipe.PipeID
- *  @see net.jxta.platform.ModuleClassID
- *  @see net.jxta.platform.ModuleSpecID
- *  @see <a href="http://spec.jxta.org/nonav/v1.0/docbook/JXTAProtocols.html#ids" target='_blank'>JXTA Protocols Specification : IDs</a>
- */
-public abstract class ID implements java.io.Serializable {
-    
-    /**
-     * Collection of interned IDs. All IDs visible within in the VM are
-     * contained within this table.
-     */
-    private static final Map<ID, WeakReference<ID>> interned = new WeakHashMap<ID, WeakReference<ID>>(1000);
-    
-    /**
-     * This defines the URI scheme that we will be using to present JXTA IDs.
-     * JXTA IDs are encoded for presentation into URIs (see
-     * {@link <a href="http://www.ietf.org/rfc/rfc2396.txt">IETF RFC 2396 Uniform Resource Identifiers (URI) : Generic Syntax</a>}
-     * ) as URNs (see
-     * {@link <a href="http://www.ietf.org/rfc/rfc2141.txt">IETF RFC 2141 Uniform Resource Names (URN) Syntax</a>}
-     * ).
-     */
-    public static final String URIEncodingName = "urn";
-    
-    /**
-     *  This defines the URN Namespace that we will be using to present JXTA IDs.
-     *  The namespace allows URN resolvers to determine which sub-resolver to use
-     *  to resolve URN references. All JXTA IDs are presented in this namespace.
-     */
-    public static final String URNNamespace = "jxta";
-    
-    /**
-     * The null ID. The NullID is often used as a placeholder in fields which
-     *  are uninitialized.
-     *
-     *  <p/>This is a singleton within the scope of a VM.
-     */
-    public static final ID nullID = (new NullID()).intern();
-    
-    /**
-     *
-     * Creates an ID by parsing the given URI.
-     *
-     * <p>This convenience factory method works as if by invoking the
-     * {@link IDFactory#fromURI(URI)} method; any {@link URISyntaxException}
-     * thrown is caught and wrapped in a new {@link IllegalArgumentException}
-     * object, which is then thrown.  
-     *
-     * <p> This method is provided for use in situations where it is known that
-     * the given string is a legal ID, for example for ID constants declared
-     * within in a program, and so it would be considered a programming error
-     * for the URI not to parse as such.  The {@link IDFactory}, which throws
-     * {@link URISyntaxException} directly, should be used situations where a
-     * ID is being constructed from user input or from some other source that
-     * may be prone to errors. 
-     *
-     * @param  fromURI   The URI to be parsed into an ID
-     * @return The new ID
-     *
-     * @throws  NullPointerException
-     *          If <tt>fromURI</tt> is <tt>null</tt>
-     *
-     * @throws  IllegalArgumentException
-     *          If the given URI is not a valid ID.
-     */
-    public static ID create(URI fromURI) {
-        try {
-            return IDFactory.fromURI(fromURI);
-        } catch (URISyntaxException badid) {
-            IllegalArgumentException failure = new IllegalArgumentException();
-
-            failure.initCause(badid);
-            throw failure;
-        }
-    }
-    
-    /**
-     *  Constructor for IDs. IDs are constructed using the {@link IDFactory} or
-     *  {@link #create(URI)}.
-     *
-     */
-    protected ID() {}
-    
-    /**
-     *  Returns a string representation of the ID. This representation should be
-     *  used primarily for debugging purposes. For most other situations IDs
-     *  should be externalized as Java URI Objects via {@link #toURI()}.
-     *
-     *  <p/>The default implementation is the <code>toString()</code> of the ID
-     *  represented as a URI.
-     *
-     *  @return        String containing the URI
-     *
-     */
-    @Override
-    public String toString() {
-        return toURI().toString();
-    }
-    
-    /**
-     *  Return the interned form of the ID.
-     */
-    private Object readResolve() throws ObjectStreamException {
-        return intern();
-    }
-
-    /**
-     *  Returns a string identifier which indicates which ID format is
-     *  used by this ID instance.
-     *
-     *  @return        a string identifier which indicates which ID format is
-     *  used by this ID instance.
-     */
-    public abstract String getIDFormat();
-    
-    /**
-     *  Returns an object containing the unique value of the ID. This object
-     *  must provide implementations of toString(), equals() and hashCode() that
-     *  are canonical and consistent from run-to-run given the same input values.
-     *  Beyond this nothing should be assumed about the nature of this object.
-     *  For some implementations the object returned may be <code>this</code>.
-     *
-     *  @return        Object which can provide canonical representations of the ID.
-     */
-    public abstract Object getUniqueValue();
-    
-    /**
-     *  Returns a URL representation of the ID. The
-     *  {@link net.jxta.id.IDFactory JXTA ID Factory} can be used to construct
-     *  ID Objects from URLs containing JXTA IDs.
-     *
-     *  @deprecated URIs are now the preferred way of manipulating IDs
-     *
-     *  @see net.jxta.id.IDFactory#fromURL( java.net.URL )
-     *
-     *  @return        URL Object containing the URI
-     */
-    @Deprecated
-    public URL getURL() {
-        try {
-            return IDFactory.jxtaURL(URIEncodingName, "", URNNamespace + ":" + getUniqueValue());
-        } catch (MalformedURLException caught) {
-            IllegalStateException failure = new IllegalStateException("Environment incorrectly intialized.");
-
-            failure.initCause(caught);
-            throw failure;
-        }
-    }
-    
-    /**
-     * Returns a canonical representation for the ID object.
-     *
-     * <p/>A pool of IDs, is maintained privately by the class.
-     *
-     * <p/>When the intern() method is invoked, if the pool already contains a
-     * ID equal to this ID object as determined by the
-     * equals(Object) method, then the ID from the pool is returned.
-     * Otherwise, this ID object is added to the pool and a reference
-     * to this ID object is returned.
-     *
-     * <p/>It follows that for any two ID <tt>s</tt> and <tt>t</tt>,
-     * <tt>s.intern() == t.intern()</tt> is true if and only if <tt>s.equals(t)</tt>
-     * is true.
-     *
-     * @return a ID that has the same value as this type, but is guaranteed to
-     * be from a pool of unique types.
-     */
-    protected ID intern() {
-        synchronized (ID.class) {
-            Reference<ID> common = interned.get(this);
-            
-            ID result = null;
-            
-            if (null != common) {
-                result = common.get();
-            }
-            
-            if (null == result) {
-                interned.put(this, new WeakReference<ID>(this));
-                result = this;
-            }
-            
-            return result;
-        }
-    }
-    
-    /**
-     *  Returns a URI representation of the ID. {@link java.net.URI URIs} are
-     *  the preferred way of externalizing and presenting JXTA IDs. The
-     *  {@link net.jxta.id.IDFactory JXTA ID Factory} can be used to construct
-     *  ID Objects from URIs containing JXTA IDs.
-     *
-     *  @see net.jxta.id.IDFactory#fromURI( java.net.URI )
-     *
-     *  @return        URI Object containing the URI
-     */
-    public URI toURI() {
-        return URI.create(URIEncodingName + ":" + URNNamespace + ":" + getUniqueValue());
-    }
-}
-
-
-/**
- * The NullID is often used as a placeholder in fields which are uninitialized.
- */
-final class NullID extends ID {
-    final static String JXTAFormat = "jxta";
-    
-    final static String UNIQUEVALUE = "Null";
-    
-    /**
-     *  NullID is not intended to be constructed. You should use the
-     *  {@link #nullID} constant instead.
-     */
-    NullID() {}
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {
-        return (this == target); // null is only itself.
-    }
-    
-    /**
-     * deserialization has to point back to the singleton in this VM.
-     */
-    private Object readResolve() {
-        return ID.nullID;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public String getIDFormat() {
-        return JXTAFormat;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public Object getUniqueValue() {
-        return getIDFormat() + "-" + UNIQUEVALUE;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/id/IDFactory.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/id/IDFactory.java
deleted file mode 100644 (file)
index 8e2297a..0000000
+++ /dev/null
@@ -1,1210 +0,0 @@
-/*
- *  Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.id;
-
-
-import java.io.InputStream;
-import java.lang.reflect.Field;
-import java.net.URI;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.ResourceBundle;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URISyntaxException;
-import java.net.UnknownServiceException;
-import java.util.MissingResourceException;
-import java.util.NoSuchElementException;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import net.jxta.codat.CodatID;
-import net.jxta.id.jxta.IDFormat;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.pipe.PipeID;
-import net.jxta.platform.ModuleClassID;
-import net.jxta.platform.ModuleSpecID;
-import net.jxta.util.ClassFactory;
-
-
-/**
- *  A factory class for creating new ID instances and for constructing ID
- *  instances from external representations such as strings or URIs.
- *
- *  <p/>When possible the factory will create IDs of the same ID Format as any
- *  base ids provided. For example, PipeIDs will be created to be the same ID
- *  Format as the PeerGroupID provided.
- *
- *  <p/>Some ID constructors allow specification of "seed" information. Each ID
- *  Format may use this seed information as it chooses or may require seed
- *  information of a specific form. In some cases the seed information will be
- *  used literally as provided to construct the resulting ID, but ID Formats
- *  may also choose to ignore the seed information entirely, use it as random
- *  number generator seed values, etc. Consult the implementation documentation
- *  for the ID Formats of interest to see how the seed information is used by
- *  each ID Format.
- *
- *  @see net.jxta.id.ID
- *  @see net.jxta.util.ClassFactory
- *  @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#ids" target='_blank'>JXTA Protocols Specification : IDs</a>
- */
-public final class IDFactory extends ClassFactory<String, IDFactory.Instantiator> {
-    
-    /**
-     *  Logger
-     */
-    private static final transient Logger LOG = Logger.getLogger(IDFactory.class.getName());
-    
-    /**
-     *  A map of the ID Formats to instantiators.
-     *
-     */
-    private final Map<String, Instantiator> idFormats = new HashMap<String, Instantiator>();
-    
-    /**
-     *  Identifies the ID format to use when creating new ID instances.
-     */
-    private final String idNewInstances;
-    
-    /**
-     *  This class is a singleton. This is the instance that backs the
-     *  static methods.
-     */
-    private final static IDFactory factory = new IDFactory();
-    
-    /**
-     *  Interface for instantiators of IDs. Each ID Format registered with the
-     *  ID Factory implements a class with this interface.
-     */
-    public interface Instantiator {
-        
-        /**
-         *  Returns the ID Format value associated with this ID Format
-         *
-         *  @return String containing the ID format value for this format.
-         */
-        public String getSupportedIDFormat();
-        
-        /**
-         *  Construct a new ID instance from a JXTA ID contained in a URL.
-         *
-         *  @deprecated Convert to {@code fromURI}.
-         *
-         *  @param source  URL which will be decoded to create a new ID instance.
-         *  @return  ID containing the new ID instance initialized from the URL.
-         *  @throws UnknownServiceException Is thrown if the URL provided is of
-         *  a format unrecognized by this JXTA implementation.
-         *  @throws MalformedURLException Is thrown if the URL provided is not
-         *  a valid, recognized JXTA URL.
-         */
-        @Deprecated
-        public ID fromURL(URL source) throws MalformedURLException, UnknownServiceException;
-        
-        /**
-         *  Construct a new ID instance from a JXTA ID contained in a URI.
-         *
-         *  @param source  URI which will be decoded to create a new ID instance.
-         *  @return  ID containing the new ID instance initialized from the source.
-         *  @throws URISyntaxException if the URI provided is not a valid,
-         *  recognized JXTA URI.
-         */
-        public ID fromURI(URI source) throws URISyntaxException;
-        
-        /**
-         *  Construct a new ID instance from the scheme specific portion of a jxta
-         *  URN.
-         *
-         *  @param source  the scheme specific portion of a jxta URN.
-         *  @return  ID containing the new ID instance initialized from the source.
-         *  @throws URISyntaxException if the URI provided is not a valid,
-         *  recognized JXTA URI.
-         */
-        public ID fromURNNamespaceSpecificPart(String source) throws URISyntaxException;
-
-        /**
-         *  Creates a new CodatID Instance. A new random CodatID is created for
-         *  the provided Peer Group. This type of CodatID can be used as a
-         *  canonical reference for dynamic content.
-         *
-         *  @see net.jxta.codat.Codat
-         *
-         *  @param groupID The group to which this content will belong.
-         *  @return The newly created CodatID.
-         */
-        public CodatID newCodatID(PeerGroupID groupID);
-        
-        /**
-         *  Creates a new CodatID instance. A new CodatID is created for the
-         *  provided Peer Group. This type of CodatID can be used as a
-         *  canonical reference for dynamic content.
-         *
-         *  <p/>This variant of CodatID allows you to create "Well-known" codats
-         *  within the context of diverse groups. This can be useful for common
-         *  services that need to do discovery without advertisements or for
-         *  network organization services.  Because of the potential for ID
-         *  collisions and the difficulties with maintaining common service
-         *  interfaces this variant of CodatID should be used with great caution
-         *  and pre-planning.
-         *
-         *  @see net.jxta.codat.Codat
-         *
-         *  @param groupID The group to which this content will belong.
-         *  @param seed The seed information which will be used in creating the
-         *  codatID. The seed information should be at least four bytes in
-         *  length, though longer values are better.
-         *  @return The newly created CodatID.
-         */
-        public CodatID newCodatID(PeerGroupID groupID, byte[] seed);
-        
-        /**
-         *  Creates a new CodatID instance. A new random CodatID is created for
-         *  the provided Peer Group and contains a hash value for the Codat data.
-         *  This type of Codat ID is most appropriate for static content. By
-         *  including a hash value this form of Codat ID provides greater
-         *  assurance of the canonical property of IDs. It also allows the
-         *  document content returned when this ID is used to be verified to
-         *  ensure it has not been altered.
-         *
-         *  @see net.jxta.codat.Codat
-         *
-         *  @param groupID The group to which this ID will belong.
-         *  @param in The InputStream from which the content hash is calculated.
-         *  The stream is read until EOF and then closed.
-         *  @return The newly created CodatID.
-         *  @throws IOException I/O Error reading document
-         */
-        public CodatID newCodatID(PeerGroupID groupID, InputStream in) throws IOException;
-        
-        /**
-         *  Creates a new CodatID instance. A new CodatID is created for the
-         *  provided Peer Group and contains a hash value for the Codat data.
-         *  By including a hash value this form of Codat ID provides greater
-         *  assurance of the canonical property of IDs. It also allows the
-         *  document content returned when this ID is used to be verified to
-         *  ensure it has not been altered. This type of Codat ID is most
-         *  appropriate for static content.
-         *
-         *  <p/>This variant of CodatID allows you to create "Well-known" codats
-         *  within the context of diverse groups. This can be useful for common
-         *  services that need to do discovery without advertisements or for
-         *  network organization services.  Because of the potential for ID
-         *  collisions and the difficulties with maintaining common service
-         *  interfaces this variant of CodatID should be used with great caution
-         *  and pre-planning.
-         *
-         *  @see net.jxta.codat.Codat
-         *
-         *  @param groupID The group to which this ID will belong.
-         *  @param seed The seed information which will be used in creating the
-         *  codat ID. The seed information should be at least four bytes in
-         *  length, though longer values are better.
-         *  @param in The InputStream from which the content hash is calculated.
-         *  The stream is read until EOF and then closed.
-         *  @return The newly created CodatID.
-         *  @throws IOException I/O Error reading document
-         */
-        public CodatID newCodatID(PeerGroupID groupID, byte[] seed, InputStream in) throws IOException;
-        
-        /**
-         *  Creates a new PeerID instance. A new random peer id will be generated.
-         *  The PeerID will be a member of the provided group.
-         *
-         *  @see net.jxta.peergroup.PeerGroup
-         *
-         *  @param groupID    the group to which this PeerID will belong.
-         *  @return The newly created PeerID.
-         */
-        public PeerID newPeerID(PeerGroupID groupID);
-        
-        /**
-         *  Creates a new PeerID instance. A new PeerID will be generated.
-         *  The PeerID will be a member of the provided group.
-         *
-         *  @see net.jxta.peergroup.PeerGroup
-         *
-         *  @param groupID    the group to which this PeerID will belong.
-         *  @param seed   The seed information which will be used in creating the
-         *  PeerID. The seed information should be at least four bytes in length,
-         *  though longer values are better.
-         *  @return The newly created PeerID.
-         */
-        public PeerID newPeerID(PeerGroupID groupID, byte[] seed);
-        
-        /**
-         *  Creates a new PeerGroupID instance. A new random peer group id will be
-         *  generated. The PeerGroupID will be created using the default ID Format.
-         *
-         *  @see net.jxta.peergroup.PeerGroup
-         *
-         *  @return The newly created PeerGroupID.
-         */
-        public PeerGroupID newPeerGroupID();
-        
-        /**
-         *  Creates a new PeerGroupID instance. A new PeerGroupID will be
-         *  generated using the provided seed information. The PeerGroupID will
-         *  be created using the default ID Format.
-         *
-         *  <p/>This method allows you to create "Well-known" PeerGroupIDs.
-         *  This is similar to how the JXTA "World Peer Group" and "Net
-         *  Peer Group". "Well-known" IDs can be useful for common services
-         *  that need to do  discovery without advertisements or for network
-         *  organization  services. Because of the potential for ID collisions
-         *  and the difficulties with maintaining common service interfaces this
-         *  variant of PeerGroupID should be used with great caution and
-         *  pre-planning.
-         *
-         *  @see net.jxta.peergroup.PeerGroup
-         *
-         *  @param seed The seed information which will be used in creating the
-         *  PeerGroupID. The seed information should be at least four bytes in
-         *  length, though longer values are better.
-         *  @return The newly created PeerGroupID.
-         */
-        public PeerGroupID newPeerGroupID(byte[] seed);
-        
-        /**
-         *  Creates a new PeerGroupID instance with the specified parent group.
-         *  A new random peer group id will be generated.
-         *
-         *  @see net.jxta.peergroup.PeerGroup
-         *
-         *  @param parent The group which will be the parent of this group.
-         *  @return The newly created PeerGroupID.
-         */
-        public PeerGroupID newPeerGroupID(PeerGroupID parent);
-        
-        /**
-         *  Creates a new PeerGroupID instance with the specified parent group.
-         *  A new PeerGroupID will be generated using the provided seed
-         *  information.
-         *
-         *  <p/>This method allows you to create "Well-known" PeerGroupIDs.
-         *  This is similar to how the JXTA "World Peer Group" and "Net
-         *  Peer Group". "Well-known" IDs can be useful for common services
-         *  that need to do  discovery without advertisements or for network
-         *  organization  services. Because of the potential for ID collisions
-         *  and the difficulties with maintaining common service interfaces this
-         *  variant of PeerGroupID should be used with great caution and
-         *  pre-planning.
-         *
-         *  @see net.jxta.peergroup.PeerGroup
-         *
-         *  @param parent    The group which will be the parent of this group.
-         *  @param seed The seed information which will be used in creating the
-         *  PeerGroupID. The seed information should be at least four bytes in
-         *  length, though longer values are better.
-         *  @return The newly created PeerGroupID.
-         */
-        public PeerGroupID newPeerGroupID(PeerGroupID parent, byte[] seed);
-        
-        /**
-         *  Creates a new PipeID instance. A new random PipeID will be generated.
-         *
-         *
-         *  @param groupID  The group to which this Pipe ID will belong.
-         *  @return The newly created PipeID.
-         */
-        public PipeID newPipeID(PeerGroupID groupID);
-        
-        /**
-         *  Creates a new PipeID instance. A new pipe id will be generated with
-         *  the provided seed information. The Pipe ID will be a member of the
-         *  provided group.
-         *
-         *  <p/>This variant of PipeID allows you to create "Well-known" pipes
-         *  within the context of diverse groups. This can be useful for common
-         *  services that need to do discovery without advertisements or for
-         *  network organization services.  Because of the potential for ID
-         *  collisions and the difficulties with maintaining common service
-         *  interfaces this variant of PipeID should be used with great caution
-         *  and pre-planning.
-         *
-         *
-         *  @param groupID  the group to which this Pipe ID will belong.
-         *  @param seed The seed information which will be used in creating the
-         *  pipeID. The seed information should be at least four bytes in
-         *  length, though longer values are better.
-         *  @return the newly created PipeID.
-         */
-        public PipeID newPipeID(PeerGroupID groupID, byte[] seed);
-        
-        /**
-         *  Creates a new ModuleClassID instance. A new random ModuleClassID
-         *  will be generated with a zero value role identifier. This form of
-         *  ModuleClassID is appropriate for cases where the module does not
-         *  need to be distinguished from other instances of the same Module.
-         *  The ModuleClassID will be created using the default ID Format.
-         *
-         *  @see net.jxta.platform.Module
-         *
-         *  @return The newly created ModuleClassID.
-         */
-        public ModuleClassID newModuleClassID();
-        
-        /**
-         *  Creates a new ModuleClassID instance. A new random ModuleClassID
-         *  will be generated with a a random value role identifier and a base
-         *  class of the provided ModuleClassID. This form of ModuleClassID is
-         *  appropriate for cases where it is necessary to distinguish instances
-         *  of the same service interface.
-         *
-         *  @see net.jxta.platform.Module
-         *
-         *  @param  baseClass   The ModuleClassID which will be used as a base
-         *  class for this new role value instance.
-         *  @return The newly created ModuleClassID.
-         */
-        public ModuleClassID newModuleClassID(ModuleClassID baseClass);
-        
-        /**
-         *  Creates a new  ModuleSpecID instance. A new random ModuleSpecID will
-         *  be generated.
-         *
-         *  @see net.jxta.platform.Module
-         *
-         *  @param baseClass   The ModuleClassID which will be used as a base
-         *  class for this new ModuleSpecID.
-         *  @return The newly created ModuleSpecID.
-         */
-        public ModuleSpecID newModuleSpecID(ModuleClassID baseClass);
-    }
-    
-
-    /**
-     * @deprecated This interface formerly contained optional URI based
-     * construction methods. These have now been moved to the primary
-     * instantiator interface in preparation for the removal of the URL
-     * based interfaces. This interface will be removed in a future release.
-     */
-    @Deprecated
-    public interface URIInstantiator extends Instantiator {}
-    
-    /**
-     *  Standard Constructor. This class is a singleton so the only constructor
-     *  is private.
-     *
-     *  <p/>Uses net.jxta.impl.config.properties file as the
-     *  source for settings.
-     *
-     * <p/>Example entry from  the file net.jxta.impl.config.properties :
-     *
-     * <p/><pre><code>
-     * #Default type of ID to use when creating an ID (this should not be changed in most implementations).
-     * IDNewInstances=uuid
-     * </code></pre>
-     */
-    private IDFactory() {
-        // required format
-        registerAssoc("net.jxta.id.jxta.IDFormat");
-        
-        // required by this implementation.
-        registerAssoc("net.jxta.impl.id.unknown.IDFormat");
-        
-        // Register a list of classes for association with an ID format
-        registerProviders(ID.class.getName());
-        
-        try {
-            // Get our resource bundle
-            ResourceBundle jxtaRsrcs = ResourceBundle.getBundle("net.jxta.impl.config");
-            
-            // set the default ID Format.
-            idNewInstances = jxtaRsrcs.getString("IDNewInstances").trim();
-        } catch (MissingResourceException notFound) {
-            // This is an error because we can't start without a concept of ID.
-            IllegalStateException failure =
-               new IllegalStateException("Could not initialize ID defaults", notFound);
-            LOG.log(Level.SEVERE, "Cound not initialize IDFactory", failure);
-            throw failure;
-        }
-    }
-    
-    /**
-     *  Used by ClassFactory methods to get the mapping of ID types to constructors.
-     *
-     *  @return the mapping of ID types to instantiators.
-     */
-    @Override
-    protected Map<String, Instantiator> getAssocTable() {
-        return idFormats;
-    }
-    
-    /**
-     *  Used by ClassFactory methods to ensure that all keys used with the mapping are
-     *  of the correct type.
-     *
-     *  @return Class object of the key type.
-     */
-    @Override
-    protected Class<String> getClassForKey() {
-        return String.class;
-    }
-    
-    /**
-     *  Used by ClassFactory methods to ensure that all of the instance classes
-     *  which register with this factory have the correct base class
-     *
-     *  @return Class object of the key type.
-     */
-    @Override
-    protected Class<Instantiator> getClassOfInstantiators() {
-        return Instantiator.class;
-    }
-    
-    /**
-     *  Register a class with the factory from its class name. We override the
-     *  standard implementation to get the id format from the class and
-     *  use that as the key to register the class with the factory.
-     *
-     * @param className The class name which will be registered.
-     * @return boolean true if the class was registered otherwise false.
-     */
-    @Override
-    public boolean registerAssoc(String className) {
-        boolean registeredSomething = false;
-        
-        try {
-            Class<?> idClass;
-
-            try {
-                idClass = Class.forName(className);
-                
-                if (null == idClass) {
-                    throw new ClassNotFoundException("forName() result was null");
-                }
-            } catch (ClassNotFoundException notThere) {
-                LOG.severe("Could not find class named : " + className);
-                return false;
-            } catch (NoClassDefFoundError notThere) {
-                LOG.severe("Could not find class named : " + className);
-                return false;
-            }
-            
-            Field instantiatorField;
-
-            try {
-                instantiatorField = idClass.getField("INSTANTIATOR");
-                
-                if (null == instantiatorField) {
-                    throw new NoSuchFieldException("getField() result was null for field 'INSTANTIATOR'");
-                    // caught locally
-                }
-            } catch (NoSuchFieldException notThere) {
-                LOG.severe("Could not find INSTANTIATOR field in class named : " + className);
-                return false;
-            }
-            
-            if (!Instantiator.class.isAssignableFrom(instantiatorField.getType())) {
-                throw new ClassCastException("INSTANTIATOR is not of type " + Instantiator.class.getName());
-            }
-            
-            Instantiator instantiator = (Instantiator) instantiatorField.get(null);
-            
-            if (null == instantiator) {
-                LOG.severe("INSTANTIATOR field is null for class  : " + className);
-                return false;
-            }
-            
-            String idFormat = instantiator.getSupportedIDFormat();
-            
-            registeredSomething = registerAssoc(idFormat, instantiator);
-        } catch (Exception failed) {
-            LOG.log(Level.SEVERE, "Failed to register class : " + className, failed);
-        }
-        
-        return registeredSomething;
-    }
-    
-    /**
-     *  Returns a String containing the name of the default ID Format.
-     *
-     *  @return The current default ID Format.
-     */
-    public static String getDefaultIDFormat() {
-        return factory.idNewInstances;
-    }
-    
-    /**
-     *  Construct a new ID instance from a JXTA ID contained in a URI.
-     *
-     *  @param source  URI which will be decoded to create a new ID instance.
-     *  @return  ID containing the new ID instance initialized from the URI.
-     *  @throws URISyntaxException If the URI provided is not a valid,
-     *  recognized JXTA URI.
-     */
-    public static ID fromURI(URI source) throws URISyntaxException {
-        ID result = null;
-        
-        // check the protocol
-        if (!ID.URIEncodingName.equalsIgnoreCase(source.getScheme())) {
-            throw new URISyntaxException(source.toString(), "URI scheme was not as expected.");
-        }
-        
-        String decoded = source.getSchemeSpecificPart();
-        
-        int colonAt = decoded.indexOf(':');
-        
-        // There's a colon right?
-        if (-1 == colonAt) {
-            throw new URISyntaxException(source.toString(), "URN namespace was missing.");
-        }
-        
-        // check the namespace
-        if (!net.jxta.id.ID.URNNamespace.equalsIgnoreCase(decoded.substring(0, colonAt))) {
-            throw new URISyntaxException(source.toString(),
-                    "URN namespace was not as expected. (" +
-                    net.jxta.id.ID.URNNamespace + "!=" + decoded.substring(0, colonAt) + ")");
-        }
-        
-        // skip the namespace portion and the colon
-        decoded = decoded.substring(colonAt + 1);
-        
-        int dashAt = decoded.indexOf('-');
-        
-        // there's a dash, right?
-        if (-1 == dashAt) {
-            throw new URISyntaxException(source.toString(), "URN jxta namespace IDFormat was missing.");
-        }
-        
-        // get the encoding used for this id
-        String format = decoded.substring(0, dashAt);
-        
-        Instantiator instantiator;
-
-        try {
-            instantiator = factory.getInstantiator(format);
-        } catch (NoSuchElementException itsUnknown) {
-            instantiator = factory.getInstantiator("unknown");
-        }
-        
-        result = instantiator.fromURNNamespaceSpecificPart(decoded);
-        
-        return result.intern();
-    }
-    
-    /**
-     *  Construct a new ID instance from a JXTA ID contained in a URI.
-     *
-     *  @deprecated Use of URLs for representing JXTA IDs and this method are
-     *  deprecated. Convert to using {@link #fromURI( URI )} instead.
-     *
-     *  @param source  URI which will be decoded to create a new ID instance.
-     *  @return  ID containing the new ID instance initialized from the URI.
-     *  @throws UnknownServiceException Is thrown if the URI provided is of a
-     *  format unrecognized by this JXTA implementation.
-     *  @throws MalformedURLException Is thrown if the URI provided is not
-     *  a valid, recognized JXTA URI.
-     */
-    @Deprecated
-    public static ID fromURL(URL source) throws MalformedURLException, UnknownServiceException {
-        
-        ID result = null;
-        
-        // check the protocol
-        if (!ID.URIEncodingName.equalsIgnoreCase(source.getProtocol())) {
-            throw new UnknownServiceException("URI protocol type was not as expected.");
-        }
-        
-        String encoded = source.getFile();
-        
-        // Decode the URN to convert any % encodings and convert it from UTF8.
-        String decoded = sun.net.www.protocol.urn.Handler.decodeURN(encoded);
-        
-        int colonAt = decoded.indexOf(':');
-        
-        // There's a colon right?
-        if (-1 == colonAt) {
-            throw new MalformedURLException("URN namespace was missing.");
-        }
-        
-        // check the namespace
-        if (!net.jxta.id.ID.URNNamespace.equalsIgnoreCase(decoded.substring(0, colonAt))) {
-            throw new MalformedURLException(
-                    "URN namespace was not as expected. (" + net.jxta.id.ID.URNNamespace + "!=" + decoded.substring(0, colonAt)
-                    + ")");
-        }
-        
-        // skip the namespace portion and the colon
-        decoded = decoded.substring(colonAt + 1);
-        
-        int dashAt = decoded.indexOf('-');
-        
-        // there's a dash, right?
-        if (-1 == dashAt) {
-            throw new UnknownServiceException("URN Encodingtype was missing.");
-        }
-        
-        // get the encoding used for this id
-        decoded = decoded.substring(0, dashAt);
-        
-        Instantiator instantiator;
-
-        try {
-            instantiator = factory.getInstantiator(decoded);
-        } catch (NoSuchElementException itsUnknown) {
-            instantiator = factory.getInstantiator("unknown");
-        }
-        
-        result = instantiator.fromURL(source);
-        
-        return result.intern();
-    }
-    
-    /**
-     *  Creates a new CodatID Instance. A new random CodatID is created for
-     *  the provided Peer Group. This type of CodatID can be used as a
-     *  canonical reference for dynamic content.
-     *
-     *  @see net.jxta.codat.Codat
-     *
-     *  @param groupID    the group to which this content will belong.
-     *  @return The newly created CodatID.
-     */
-    public static CodatID newCodatID(PeerGroupID groupID) {
-        String useFormat = groupID.getIDFormat();
-        
-        // is the group netpg or worldpg?
-        if (IDFormat.INSTANTIATOR.getSupportedIDFormat().equals(useFormat)) {
-            useFormat = factory.idNewInstances;
-        }
-        
-        Instantiator instantiator = factory.getInstantiator(useFormat);
-        
-        return instantiator.newCodatID(groupID).intern();
-    }
-    
-    /**
-     *  Creates a new CodatID instance. A new CodatID is created for the
-     *  provided Peer Group. This type of CodatID can be used as a
-     *  canonical reference for dynamic content.
-     *
-     *  <p/>This variant of CodatID allows you to create "Well-known" codats
-     *  within the context of diverse groups. This can be useful for common
-     *  services that need to do discovery without advertisements or for
-     *  network organization services.  Because of the potential for ID
-     *  collisions and the difficulties with maintaining common service
-     *  interfaces this variant of CodatID should be used with great caution
-     *  and pre-planning.
-     *
-     *  @see net.jxta.codat.Codat
-     *
-     *  @param groupID    the group to which this content will belong.
-     *  @param seed The seed information which will be used in creating the
-     *  codatID. The seed information should be at least four bytes in length,
-     *  though longer values are better.
-     *  @return The newly created CodatID.
-     */
-    public static CodatID newCodatID(PeerGroupID groupID, byte[] seed) {
-        String useFormat = groupID.getIDFormat();
-        
-        // is the group netpg or worldpg?
-        if (IDFormat.INSTANTIATOR.getSupportedIDFormat().equals(useFormat)) {
-            useFormat = factory.idNewInstances;
-        }
-        
-        Instantiator instantiator = factory.getInstantiator(useFormat);
-        
-        return instantiator.newCodatID(groupID, seed).intern();
-    }
-    
-    /**
-     *  Creates a new CodatID instance. A new random CodatID is created for
-     *  the provided Peer Group and contains a hash value for the Codat data.
-     *  This type of Codat ID is most appropriate for static content. By
-     *  including a hash value this form of Codat ID provides greater assurance
-     *  of the canonical property of IDs. It also allows the document content
-     *  returned when this ID is used to be verified to ensure it has not been
-     *   altered.
-     *
-     *  @see net.jxta.codat.Codat
-     *
-     *  @param  groupID The group to which this ID will belong.
-     *  @param  in  The InputStream from which the content hash is calculated.
-     *  The stream is read until EOF and then closed.
-     *  @return The newly created CodatID.
-     *  @throws IOException I/O Error reading document
-     */
-    public static CodatID newCodatID(PeerGroupID groupID, InputStream in) throws  IOException {
-        String useFormat = groupID.getIDFormat();
-        
-        // is the group netpg or worldpg?
-        if (IDFormat.INSTANTIATOR.getSupportedIDFormat().equals(useFormat)) {
-            useFormat = factory.idNewInstances;
-        }
-        
-        Instantiator instantiator = factory.getInstantiator(useFormat);
-        
-        return instantiator.newCodatID(groupID, in).intern();
-    }
-    
-    /**
-     *  Creates a new CodatID instance. A new CodatID is created for the
-     *  provided Peer Group and contains a hash value for the Codat data.
-     *  By including a hash value this form of Codat ID provides greater
-     *  assurance of the canonical property of IDs. It also allows the
-     *  document content returned when this ID is used to be verified to
-     *  ensure it has not been altered. This type of Codat ID is most
-     *  appropriate for static content.
-     *
-     *  <p/>This variant of CodatID allows you to create "Well-known" codats
-     *  within the context of diverse groups. This can be useful for common
-     *  services that need to do discovery without advertisements or for
-     *  network organization services.  Because of the potential for ID
-     *  collisions and the difficulties with maintaining common service
-     *  interfaces this variant of CodatID should be used with great caution
-     *  and pre-planning.
-     *
-     *  @see net.jxta.codat.Codat
-     *
-     *  @param  groupID The group to which this ID will belong.
-     *  @param seed The seed information which will be used in creating the
-     *  codat ID. The seed information should be at least four bytes in length,
-     *  though longer values are better.
-     *  @param  in  The InputStream from which the content hash is calculated.
-     *  The stream is read until EOF and then closed.
-     *  @return The newly created CodatID.
-     *  @throws IOException I/O Error reading document
-     */
-    public static CodatID newCodatID(PeerGroupID groupID, byte[] seed, InputStream in) throws  IOException {
-        String useFormat = groupID.getIDFormat();
-        
-        // is the group netpg or worldpg?
-        if (IDFormat.INSTANTIATOR.getSupportedIDFormat().equals(useFormat)) {
-            useFormat = factory.idNewInstances;
-        }
-        
-        Instantiator instantiator = factory.getInstantiator(useFormat);
-        
-        return instantiator.newCodatID(groupID, seed, in).intern();
-    }
-    
-    /**
-     *  Creates a new PeerID instance. A new random peer id will be generated.
-     *  The PeerID will be a member of the provided group.
-     *
-     *  @see net.jxta.peergroup.PeerGroup
-     *
-     *  @param groupID    the group to which this PeerID will belong.
-     *  @return The newly created PeerID.
-     */
-    public static PeerID newPeerID(PeerGroupID groupID) {
-        String useFormat = groupID.getIDFormat();
-        
-        // is the group netpg or worldpg?
-        if (IDFormat.INSTANTIATOR.getSupportedIDFormat().equals(useFormat)) {
-            useFormat = factory.idNewInstances;
-        }
-        
-        Instantiator instantiator = factory.getInstantiator(useFormat);
-        
-        return instantiator.newPeerID(groupID).intern();
-    }
-    
-    /**
-     *  Creates a new PeerID instance. A new PeerID will be generated.
-     *  The PeerID will be a member of the provided group.
-     *
-     *  @see net.jxta.peergroup.PeerGroup
-     *
-     *  @param groupID    the group to which this PeerID will belong.
-     *  @param seed The seed information which will be used in creating the
-     *  PeerID. The seed information should be at least four bytes in length,
-     *  though longer values are better.
-     *  @return The newly created PeerID.
-     */
-    public static PeerID newPeerID(PeerGroupID groupID, byte[] seed) {
-        String useFormat = groupID.getIDFormat();
-        
-        // is the group netpg or worldpg?
-        if (IDFormat.INSTANTIATOR.getSupportedIDFormat().equals(useFormat)) {
-            useFormat = factory.idNewInstances;
-        }
-        
-        Instantiator instantiator = factory.getInstantiator(useFormat);
-        
-        return instantiator.newPeerID(groupID, seed).intern();
-    }
-    
-    /**
-     *  Creates a new PeerGroupID instance. A new random peer group id will be
-     *  generated. The PeerGroupID will be created using the default ID Format.
-     *
-     *  @see net.jxta.peergroup.PeerGroup
-     *
-     *  @return The newly created PeerGroupID.
-     */
-    public static PeerGroupID newPeerGroupID() {
-        return newPeerGroupID(factory.idNewInstances).intern();
-    }
-    
-    /**
-     *  Creates a new PeerGroupID instance using the specified ID Format.
-     *  A new random peer group id will be generated.
-     *
-     * @see net.jxta.peergroup.PeerGroup
-     *
-     * @param idformat The ID Format to be used for crating the Peer Group ID.
-     * @return The newly created PeerGroupID.
-     */
-    public static PeerGroupID newPeerGroupID(String idformat) {
-        Instantiator instantiator = factory.getInstantiator(idformat);
-        
-        return instantiator.newPeerGroupID().intern();
-    }
-    
-    /**
-     *  Creates a new PeerGroupID instance. A new PeerGroupID will be
-     *  generated using the provided seed information. The PeerGroupID will
-     *  be created using the default ID Format.
-     *
-     *  <p/>This method allows you to create "Well-known" PeerGroupIDs.
-     *  This is similar to how the JXTA "World Peer Group" and "Net
-     *  Peer Group". "Well-known" IDs can be useful for common services
-     *  that need to do  discovery without advertisements or for network
-     *  organization  services. Because of the potential for ID collisions
-     *  and the difficulties with maintaining common service interfaces this
-     *  variant of PeerGroupID should be used with great caution and
-     *  pre-planning.
-     *
-     *  @see net.jxta.peergroup.PeerGroup
-     *
-     *  @param seed The seed information which will be used in creating the
-     *  PeerGroupID. The seed information should be at least four bytes in length,
-     *  though longer values are better.
-     *  @return The newly created PeerGroupID.
-     */
-    public static PeerGroupID newPeerGroupID(byte[] seed) {
-        return newPeerGroupID(factory.idNewInstances, seed).intern();
-    }
-    
-    /**
-     *  Creates a new PeerGroupID instance. A new PeerGroupID will be
-     *  generated using the provided seed information. The PeerGroupID will
-     *  be created using the default ID Format.
-     *
-     *  <p/>This method allows you to create "Well-known" PeerGroupIDs.
-     *  This is similar to how the JXTA "World Peer Group" and "Net
-     *  Peer Group". "Well-known" IDs can be useful for common services
-     *  that need to do  discovery without advertisements or for network
-     *  organization  services. Because of the potential for ID collisions
-     *  and the difficulties with maintaining common service interfaces this
-     *  variant of PeerGroupID should be used with great caution and
-     *  pre-planning.
-     *
-     * @see net.jxta.peergroup.PeerGroup
-     *
-     * @param idformat The ID Format of the new Peer Group ID.
-     * @param seed The seed information which will be used in creating the
-     *  PeerGroupID. The seed information should be at least four bytes in length,
-     *  though longer values are better.
-     * @return The newly created PeerGroupID.
-     */
-    public static PeerGroupID newPeerGroupID(String idformat, byte[] seed) {
-        Instantiator instantiator = factory.getInstantiator(idformat);
-        
-        return instantiator.newPeerGroupID(seed).intern();
-    }
-    
-    /**
-     *  Creates a new PeerGroupID instance with the specified parent group.
-     *  A new random peer group id will be generated.
-     *
-     *  @see net.jxta.peergroup.PeerGroup
-     *
-     *  @param parent    The group which will be the parent of this group.
-     *  @return The newly created PeerGroupID.
-     */
-    public static PeerGroupID newPeerGroupID(PeerGroupID parent) {
-        String useFormat = parent.getIDFormat();
-        
-        // is the group netpg or worldpg?
-        if (IDFormat.INSTANTIATOR.getSupportedIDFormat().equals(useFormat)) {
-            useFormat = factory.idNewInstances;
-        }
-        
-        Instantiator instantiator = factory.getInstantiator(useFormat);
-        
-        return instantiator.newPeerGroupID(parent).intern();
-    }
-    
-    /**
-     *  Creates a new PeerGroupID instance with the specified parent group.
-     *  A new PeerGroupID will be generated using the provided seed
-     *  information.
-     *
-     *  <p/>This method allows you to create "Well-known" PeerGroupIDs.
-     *  This is similar to how the JXTA "World Peer Group" and "Net
-     *  Peer Group". "Well-known" IDs can be useful for common services
-     *  that need to do  discovery without advertisements or for network
-     *  organization  services. Because of the potential for ID collisions
-     *  and the difficulties with maintaining common service interfaces this
-     *  variant of PeerGroupID should be used with great caution and
-     *  pre-planning.
-     *
-     *  @see net.jxta.peergroup.PeerGroup
-     *
-     *  @param parent    The group which will be the parent of this group.
-     *  @param seed The seed information which will be used in creating the
-     *  PeerGroupID. The seed information should be at least four bytes in length,
-     *  though longer values are better.
-     *  @return The newly created PeerGroupID.
-     */
-    public static PeerGroupID newPeerGroupID(PeerGroupID parent, byte[] seed) {
-        String useFormat = parent.getIDFormat();
-        
-        // is the group netpg or worldpg?
-        if (IDFormat.INSTANTIATOR.getSupportedIDFormat().equals(useFormat)) {
-            useFormat = factory.idNewInstances;
-        }
-        
-        Instantiator instantiator = factory.getInstantiator(useFormat);
-        
-        return instantiator.newPeerGroupID(parent, seed).intern();
-    }
-    
-    /**
-     *  Creates a new PipeID instance. A new random PipeID will be generated.
-     *
-     *  @param groupID  The group to which this Pipe ID will belong.
-     *  @return The newly created PipeID.
-     */
-    public static PipeID newPipeID(PeerGroupID groupID) {
-        String useFormat = groupID.getIDFormat();
-        
-        // is the group netpg or worldpg?
-        if (IDFormat.INSTANTIATOR.getSupportedIDFormat().equals(useFormat)) {
-            useFormat = factory.idNewInstances;
-        }
-        
-        Instantiator instantiator = factory.getInstantiator(useFormat);
-        
-        return instantiator.newPipeID(groupID).intern();
-    }
-    
-    /**
-     *  Creates a new PipeID instance. A new pipe id will be generated with the
-     *  provided seed information. The Pipe ID will be a member of the provided
-     *  group.
-     *
-     *  <p/>This variant of PipeID allows you to create "Well-known" pipes
-     *  within the context of diverse groups. This can be useful for common
-     *  services that need to do discovery without advertisements or for
-     *  network organization services.  Because of the potential for ID
-     *  collisions and the difficulties with maintaining common service
-     *  interfaces this variant of PipeID should be used with great caution
-     *  and pre-planning.
-     *
-     *  @param groupID  the group to which this Pipe ID will belong.
-     *  @param seed The seed information which will be used in creating the
-     *  pipeID. The seed information should be at least four bytes in length,
-     *  though longer values are better.
-     *  @return the newly created PipeID.
-     */
-    public static PipeID newPipeID(PeerGroupID groupID, byte[] seed) {
-        String useFormat = groupID.getIDFormat();
-        
-        // is the group netpg or worldpg?
-        if (IDFormat.INSTANTIATOR.getSupportedIDFormat().equals(useFormat)) {
-            useFormat = factory.idNewInstances;
-        }
-        
-        Instantiator instantiator = factory.getInstantiator(useFormat);
-        
-        return instantiator.newPipeID(groupID, seed).intern();
-    }
-    
-    /**
-     *  Creates a new ModuleClassID instance. A new random ModuleClassID will
-     *  be generated with a zero value role identifier. This form of
-     *  ModuleClassID is appropriate for cases where the module does not
-     *  need to be distinguished from other instances of the same Module.
-     *  The ModuleClassID will be created using the default ID Format.
-     *
-     *  @see net.jxta.platform.Module
-     *
-     *  @return The newly created ModuleClassID.
-     */
-    public static ModuleClassID newModuleClassID() {
-        return newModuleClassID(factory.idNewInstances).intern();
-    }
-    
-    /**
-     *  Creates a new ModuleClassID instance using the specified ID Format.
-     *  A new random ModuleClassID will be generated with a zero value role
-     *  identifier. This form of ModuleClassID is appropriate for cases
-     *  where the module does not need to be distinguished from other
-     *  instances of the same Module.
-     *
-     * @see net.jxta.platform.Module
-     *
-     * @param idformat The ID Format of the new ModuleClassID.
-     * @return The newly created ModuleClassID.
-     */
-    public static ModuleClassID newModuleClassID(String idformat) {
-        Instantiator instantiator = factory.getInstantiator(idformat);
-        
-        return instantiator.newModuleClassID().intern();
-    }
-    
-    /**
-     *  Creates a new ModuleClassID instance. A new random ModuleClassID will
-     *  be generated with a a random value role identifier and a base class of
-     *  the provided ModuleClassID. This form of ModuleClassID is
-     *  appropriate for cases where it is necessary to distinguish instances
-     *  of the same service interface.
-     *
-     *  @see net.jxta.platform.Module
-     *
-     *  @param  baseClass   The ModuleClassID which will be used as a base
-     *  class for this new role value instance.
-     *  @return The newly created ModuleClassID.
-     */
-    public static ModuleClassID newModuleClassID(ModuleClassID baseClass) {
-        String useFormat = baseClass.getIDFormat();
-        
-        // is the group netpg or worldpg?
-        if (IDFormat.INSTANTIATOR.getSupportedIDFormat().equals(useFormat)) {
-            useFormat = factory.idNewInstances;
-        }
-        
-        Instantiator instantiator = factory.getInstantiator(useFormat);
-        
-        return instantiator.newModuleClassID(baseClass).intern();
-    }
-    
-    /**
-     *  Creates a new  ModuleSpecID instance. A new random ModuleSpecID will
-     *  be generated.
-     *
-     *  @see net.jxta.platform.Module
-     *
-     *  @param baseClass   The ModuleClassID which will be used as a base
-     *  class for this new ModuleSpecID.
-     *  @return The newly created ModuleSpecID.
-     */
-    public static ModuleSpecID newModuleSpecID(ModuleClassID baseClass) {
-        String useFormat = baseClass.getIDFormat();
-        
-        // is the group netpg or worldpg?
-        if (IDFormat.INSTANTIATOR.getSupportedIDFormat().equals(useFormat)) {
-            useFormat = factory.idNewInstances;
-        }
-        
-        Instantiator instantiator = factory.getInstantiator(useFormat);
-        
-        return instantiator.newModuleSpecID(baseClass).intern();
-    }
-    
-    /**
-     *  This method should be used instead of using
-     *  {@code new java.net.URL( )} to create URLs for use with IDFactory.
-     *  URL construction can cause classes to be loaded using the system
-     *  classLoader (JXTA IDs require the class
-     *  {@code sun.net.www.protocol.urn.Handler} for Sun JVMs).
-     *  This class loading will fail in many environments such as web-servers,
-     *  servlet containers, application servers, or java web start where a user
-     *  class loader is used to load all JXTA resources.
-     *
-     *  @deprecated You should convert code which creates JXTA IDs to instead
-     *  use {@code IDFactory.fromURI( new URI(...) )}. This method was only
-     *  provided to overcome problems with registration of URL handlers in
-     *  foreign class loader environments (Servlets, Applets, JNLP, etc.).
-     *
-     *  @param protocol   The protocol for this URL
-     *  @param host       The host for this URL
-     *  @param file       The file for this URL
-     *  @return a newly created URL for the resource specified.
-     *  @throws  MalformedURLException  if an unknown protocol is specified.
-     */
-    @Deprecated
-    public static URL jxtaURL(String protocol, String host, String file) throws MalformedURLException {
-        return new URL(protocol, host, -1, file, sun.net.www.protocol.urn.Handler.handler);
-    }
-    
-    /**
-     *  This method should be used instead of using
-     *  {@code new java.net.URL( )} to create URLs for use with IDFactory.
-     *  URL construction can cause classes to be loaded using the system
-     *  classLoader (JXTA IDs require the class
-     *  {@code sun.net.www.protocol.urn.Handler} for Sun JVMs).
-     *  This class loading will fail in many environments such as web-servers,
-     *  servlet containers, application servers, or java web start where a user
-     *  class loader is used to load all JXTA resources.
-     *
-     *  @deprecated You should convert code which creates JXTA IDs from strings
-     *  to instead use {IDFactory.fromURI( new URI(String) )}. This
-     *  method was only provided to overcome problems with registration of URL
-     *  handlers in foreign class loader environments (Servlets, Applets, JNLP,
-     *  etc.).
-     *
-     *  @param uri The {@code String} to parse as a URL.
-     *  @return a newly created URL for the resource specified.
-     *  @throws  MalformedURLException  if an unknown protocol is specified.
-     */
-    @Deprecated
-    public static URL jxtaURL(String uri) throws MalformedURLException {
-        final String file = net.jxta.id.ID.URNNamespace + ":";
-        URL urlCnxt = jxtaURL(net.jxta.id.ID.URIEncodingName, "", file);
-        
-        return new URL(urlCnxt, uri);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/id/jxta/IDFormat.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/id/jxta/IDFormat.java
deleted file mode 100644 (file)
index 80fa3c2..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.id.jxta;
-
-
-import net.jxta.id.IDFactory;
-
-
-/**
- * The 'jxta' ID Format is used for the presentation of a limited number of
- * well-known ids. These are the null id, the world peer group id, and the
- * default net peer group id. JXTA depends on being able to refer to these
- * standard entities in a common way regardless of what other id formats are
- * used, indeed this ID Format and these ids exist so that there are not a
- * different representations for the ids of these entities with each ID Format.
- *
- * <p/>Rather than return its own version of these well known IDs, each ID
- * Format <b>MUST</b> return these IDs as appropriate.
- *
- * <ul>
- * <li>the null id - the NullID is often used as a placeholder in fields which
- * are uninitialized.</li>
- *
- * <li>the world peer group id - the id of the world peer group.</li>
- *
- * <li>the default net peer group id - the id of the default net peer group.</li>
- * </ul>
- *
- * @see net.jxta.id.ID
- * @see net.jxta.id.IDFactory
- @see <a href="http://spec.jxta.org/nonav/v1.0/docbook/JXTAProtocols.html#ids" target='_blank'>JXTA Protocols Specification : IDs</a>
- @see <a href="http://spec.jxta.org/nonav/v1.0/docbook/JXTAProtocols.html#ids-jinf" target='_blank'>JXTA Protocols Specification : ?jxta? ID Format</a>
- *
- **/
-public final class IDFormat {
-    
-    /**
-     * The name associated with this ID Format.
-     */    
-    final static String JXTAFormat = "jxta";
-    
-    /**
-     * The instantiator for this ID Format which is used by the IDFactory.
-     *
-     * @since JXTA 1.0
-     **/    
-    public static final IDFactory.URIInstantiator INSTANTIATOR = new Instantiator();
-    
-    /**
-     *  Private Constructor. This class cannot be instantiated.
-     **/
-    private IDFormat() {}
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/id/jxta/Instantiator.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/id/jxta/Instantiator.java
deleted file mode 100644 (file)
index cb6f438..0000000
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.id.jxta;
-
-
-import net.jxta.codat.CodatID;
-import net.jxta.id.ID;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.pipe.PipeID;
-import net.jxta.platform.ModuleClassID;
-import net.jxta.platform.ModuleSpecID;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.net.UnknownServiceException;
-import java.security.ProviderException;
-
-
-/**
- * Instantiator for the 'jxta' ID Format.
- *
- * @see net.jxta.id.ID
- * @see net.jxta.id.IDFactory
- * @see net.jxta.id.jxta.IDFormat
- */
-final class Instantiator implements net.jxta.id.IDFactory.URIInstantiator {
-
-    /**
-     * This table maps the textual values of the well known ids to the
-     * singleton classes which match those textual names.
-     */
-    final static Object[][] wellKnownIDs = {
-        { net.jxta.id.ID.nullID.getUniqueValue(), net.jxta.id.ID.nullID}
-                ,
-
-        { net.jxta.peergroup.PeerGroupID.worldPeerGroupID.getUniqueValue(), net.jxta.peergroup.PeerGroupID.worldPeerGroupID}
-                ,
-
-        {
-            net.jxta.peergroup.PeerGroupID.defaultNetPeerGroupID.getUniqueValue()
-                    ,
-            net.jxta.peergroup.PeerGroupID.defaultNetPeerGroupID}
-    };
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getSupportedIDFormat() {
-        return IDFormat.JXTAFormat;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Deprecated
-    public ID fromURL(URL source) throws MalformedURLException, UnknownServiceException {
-
-        // check the protocol
-        if (!ID.URIEncodingName.equalsIgnoreCase(source.getProtocol())) {
-            throw new UnknownServiceException("URI protocol type was not as expected.");
-        }
-
-        String encoded = source.getFile();
-
-        int colonAt = encoded.indexOf(':');
-
-        // There's a colon right?
-        if (-1 == colonAt) {
-            throw new UnknownServiceException("URN namespace was missing.");
-        }
-
-        // check the namespace
-        if (!ID.URNNamespace.equalsIgnoreCase(encoded.substring(0, colonAt))) {
-            throw new UnknownServiceException("URN namespace was not as expected.");
-        }
-
-        // skip the namespace portion and the colon
-        encoded = encoded.substring(colonAt + 1);
-
-        int dashAt = encoded.indexOf('-');
-
-        // there's a dash, right?
-        if (-1 == dashAt) {
-            throw new UnknownServiceException("JXTA ID Format was missing.");
-        }
-
-        if (!encoded.substring(0, dashAt).equals(getSupportedIDFormat())) {
-            throw new UnknownServiceException("JXTA ID Format was not as expected.");
-        }
-
-        for (Object[] wellKnownID : wellKnownIDs) {
-            if (encoded.equalsIgnoreCase(wellKnownID[0].toString())) {
-                return (ID) wellKnownID[1];
-            }
-        }
-
-        throw new MalformedURLException("unrecognized id");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public CodatID newCodatID(PeerGroupID groupID) {
-        throw new ProviderException("unsupported id type");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public CodatID newCodatID(PeerGroupID groupID, byte[] seed) {
-        throw new ProviderException("unsupported id type");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public CodatID newCodatID(PeerGroupID groupID, InputStream in) throws IOException {
-        throw new ProviderException("unsupported id type");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public CodatID newCodatID(PeerGroupID groupID, byte[] seed, InputStream in) throws IOException {
-        throw new ProviderException("unsupported id type");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerID newPeerID(PeerGroupID groupID) {
-        throw new ProviderException("unsupported id type");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerID newPeerID(PeerGroupID groupID, byte[] seed) {
-        throw new ProviderException("unsupported id type");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.peergroup.PeerGroupID newPeerGroupID() {
-        throw new ProviderException("unsupported id type");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.peergroup.PeerGroupID newPeerGroupID(byte[] seed) {
-        throw new ProviderException("unsupported id type");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.peergroup.PeerGroupID newPeerGroupID(net.jxta.peergroup.PeerGroupID parent) {
-        throw new ProviderException("unsupported id type");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.peergroup.PeerGroupID newPeerGroupID(net.jxta.peergroup.PeerGroupID parent, byte[] seed) {
-        throw new ProviderException("unsupported id type");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PipeID newPipeID(PeerGroupID groupID) {
-        throw new ProviderException("unsupported id type");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PipeID newPipeID(PeerGroupID groupID, byte[] seed) {
-        throw new ProviderException("unsupported id type");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ModuleClassID newModuleClassID() {
-        throw new ProviderException("unsupported id type");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ModuleClassID newModuleClassID(ModuleClassID classID) {
-        throw new ProviderException("unsupported id type");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ModuleSpecID newModuleSpecID(ModuleClassID classID) {
-        throw new ProviderException("unsupported id type");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ID fromURI(URI source) throws URISyntaxException {
-
-        // check the protocol
-        if (!ID.URIEncodingName.equalsIgnoreCase(source.getScheme())) {
-            throw new URISyntaxException(source.toString(), "URI scheme was not as expected.");
-        }
-
-        String decoded = source.getSchemeSpecificPart();
-
-        int colonAt = decoded.indexOf(':');
-
-        // There's a colon right?
-        if (-1 == colonAt) {
-            throw new URISyntaxException(source.toString(), "URN namespace was missing.");
-        }
-
-        // check the namespace
-        if (!net.jxta.id.ID.URNNamespace.equalsIgnoreCase(decoded.substring(0, colonAt))) {
-            throw new URISyntaxException(source.toString()
-                    ,
-                    "URN namespace was not as expected. (" + net.jxta.id.ID.URNNamespace + "!=" + decoded.substring(0, colonAt)
-                    + ")");
-        }
-
-        // skip the namespace portion and the colon
-        decoded = decoded.substring(colonAt + 1);
-
-        return fromURNNamespaceSpecificPart(decoded);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ID fromURNNamespaceSpecificPart(String source) throws URISyntaxException {
-        int dashAt = source.indexOf('-');
-
-        // there's a dash, right?
-        if (-1 == dashAt) {
-            throw new URISyntaxException(source, "URN jxta namespace IDFormat was missing.");
-        }
-
-        if (!source.substring(0, dashAt).equals(getSupportedIDFormat())) {
-            throw new URISyntaxException(source, "JXTA ID Format was not as expected.");
-        }
-
-        for (Object[] wellKnownID : wellKnownIDs) {
-            if (source.equalsIgnoreCase(wellKnownID[0].toString())) {
-                return (ID) wellKnownID[1];
-            }
-        }
-
-        throw new URISyntaxException(source, "unrecognized id");
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/id/jxta/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/id/jxta/package.html
deleted file mode 100644 (file)
index 2e98afe..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-        The 'jxta' ID Format is used for the presentation of a limited number of
-        well-known ids. These are the null id, the world peer group id, and the
-        default net peer group id. JXTA depends on being able to refer to these
-        standard entities in a common way regardless of what other id formats are
-        used, indeed this ID format and these ids exist so that there are not a
-        different representations for the ids of these entities with each id format.
-        <p/>Rather than return its own version of these well known ids, each ID
-        format <b>MUST</b> return these IDs as appropriate.
-
-        <UL>
-        <li>the null id - the NullID is often used as a placeholder in fields which
-        are uninitialized.</li>
-
-        <li>the world peer group id - the id of the world peer group.</li>
-
-        <li>the default net peer group id - the id of the default net peer group.</li>
-        </UL>
-
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#ids" target='_blank'>JXTA Protocols Specification : IDs</a>
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#ids-jinf" target='_blank'>JXTA Protocols Specification : ?jxta? ID Format</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/id/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/id/package.html
deleted file mode 100644 (file)
index 8542311..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    IDs are used within JXTA to refer to peers, peer groups, pipes and other 
-    types of resources.
-
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#ids" target='_blank'>JXTA Protocols Specification : IDs</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/logging/Logging.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/logging/Logging.java
deleted file mode 100644 (file)
index b1624cd..0000000
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- *  Copyright (c) 2001-2004 Sun Microsystems, Inc. All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.logging;
-
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * This class defines constants for JXTA JSE's logging facilities. In this
- * implementation the constants are initialized based upon the value of the
- * Java System property {@code net.jxta.logging.Logging}. This implementation
- * defines all of the public constants as {@code final} which enables the
- * JVM/JIT to optimize out the logging code when appropriately configured.
- * <p/>
- * <p/>Alternate implementations of this class could;
- * <p/>
- * <ul>
- * <li>Initialize the public constants with manifest constants, ie.
- * {@code true} or {@code false} which would allow the Java compiler to
- * optimize out logging code at compile time.</li>
- * <p/>
- * <li>Remove the {@code final} qualifier from the constants and provide
- * additional methods to dynamically set the logging configuration at runtime.
- * </li>
- * </ul>
- *
- * To control logging within applications :
- * 
- * <pre>
- * <code>
- * System.setProperty("net.jxta.logging.Logging", "FINEST");
- * System.setProperty("net.jxta.level", "FINEST");
- * System.setProperty("java.util.logging.config.file", "/home/userhome/logging.properties");
- * </code>
- * </pre>
- *
- * <p/>
- * Sample logging properties :
- * <p/>
- * <pre>
- * <code>
- * # default file output is in user's home directory.
- * java.util.logging.FileHandler.pattern = %h/java%u.log
- * java.util.logging.FileHandler.limit = 50000
- * java.util.logging.FileHandler.count = 1
- * java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
- * 
- * # Limit the message that are printed on the console to INFO and above
- * java.util.logging.ConsoleHandler.level = FINEST
- * java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
- *
- * # Facility specific properties.
- * # Provides extra control for each logger.
- * #
- * # For example, set the net.jxta.impi.pipe.PipeResolver logger to only log SEVERE
- * # messages:
- * net.jxta.impi.pipe.PipeResolver.level = FINEST
- * </code>
- * </pre>
- */
-public final class Logging {
-
-    /**
-     * Our Logger !
-     */
-    private final static Logger LOG = Logger.getLogger(Logging.class.getName());
-
-    /**
-     * The name of the system property from which we will attempt to read our
-     * logging configuration.
-     */
-    public final static String JXTA_LOGGING_PROPERTY = "net.jxta.logging.Logging";
-
-    /**
-     * The default logging level.
-     */    
-    private final static Level DEFAULT_LOGGING_LEVEL = Level.FINEST;
-
-    /**
-     * The logging level for this run.
-     */
-    public final static Level MIN_SHOW_LEVEL;
-
-    /**
-     * Is Level.FINEST enabled?
-     */
-    public final static boolean SHOW_FINEST;
-
-    /**
-     * Is Level.FINER enabled?
-     */
-    public final static boolean SHOW_FINER;
-
-    /**
-     * Is Level.FINE enabled?
-     */
-    public final static boolean SHOW_FINE;
-
-    /**
-     * Is Level.CONFIG enabled?
-     */
-    public final static boolean SHOW_CONFIG;
-
-    /**
-     * Is Level.INFO enabled?
-     */
-    public final static boolean SHOW_INFO;
-
-    /**
-     * Is Level.WARNING enabled?
-     */
-    public final static boolean SHOW_WARNING;
-
-    /**
-     * Is Level.SEVERE enabled?
-     */
-    public final static boolean SHOW_SEVERE;
-
-    /* Initialize the constants */
-    static {
-        Level setLevel = DEFAULT_LOGGING_LEVEL;
-
-        try {
-            String propertyLevel = System.getProperty(JXTA_LOGGING_PROPERTY);
-
-            if (null != propertyLevel) {
-                setLevel = Level.parse(propertyLevel);
-            }
-        } catch (SecurityException disallowed) {
-            LOG.log(Level.WARNING, "Could not read configuration property.", disallowed);
-        }
-
-        // Set the default level for the JXTA packages so that everything below
-        // inherits our default.
-        MIN_SHOW_LEVEL = setLevel;
-               
-        SHOW_FINEST = MIN_SHOW_LEVEL.intValue() <= Level.FINEST.intValue();
-        SHOW_FINER = MIN_SHOW_LEVEL.intValue() <= Level.FINER.intValue();
-        SHOW_FINE = MIN_SHOW_LEVEL.intValue() <= Level.FINE.intValue();
-        SHOW_CONFIG = MIN_SHOW_LEVEL.intValue() <= Level.CONFIG.intValue();
-        SHOW_INFO = MIN_SHOW_LEVEL.intValue() <= Level.INFO.intValue();
-        SHOW_WARNING = MIN_SHOW_LEVEL.intValue() <= Level.WARNING.intValue();
-        SHOW_SEVERE = MIN_SHOW_LEVEL.intValue() <= Level.SEVERE.intValue();
-
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            LOG.config("Logging enabled for level : " + MIN_SHOW_LEVEL);
-        }
-    }
-
-    /**
-     * This class is not meant be instantiated.
-     */
-    private Logging() {}
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/logging/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/logging/package.html
deleted file mode 100644 (file)
index d2b0468..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    Provides global control over use of logging by JXSE.
-    
-    <p/>The provided <code>Logging.java</code> file is only one of several
-    practical implementations. The implementation strategies for 
-    <code>Logging.java</code> fall into three basic categories:
-    
-    <dl>
-        <dt><code>final static SHOW_* = &lt;value&gt;;</dt>
-        <dd>All of the <code>SHOW_</code> fields are defined with literal
-        expressions allowing their value to be calculated at compile time. This
-        varient allows JXSE to be compiled such that logging is entirely 
-        disabled (if <code>&lt;value&gt;</code> is <code>false</code>) and 
-        the logging code is not even present in the compiled bytecode.</dd>
-
-        <dt><code>final static SHOW_*;</dt>
-        <dd>The default. All of the <code>SHOW_</code> fields are defined in
-        a static initializer based upon a calculated value. Since their value
-        cannot be known at compile time the resulting bytecode will contain 
-        the conditional logging code. Since the <code>SHOW_</code> fields are
-        <code>final</code> the JVM JIT can still optimize the bytecode as it is
-        dynamically compiled.</dd>
-
-        <dt><code>static SHOW_*;</dt>
-        <dd>All of the <code>SHOW_</code> fields are defined in
-        a static initializer based upon a calculated value and may be redefined
-        at any time. Since their value cannot be known at compile time the 
-        resulting bytecode will contain the conditional logging code. The values
-        of the <code>SHOW_</code> may be changed at any time to dynamically
-        alter the logging behaviour.
-    </dd>
-    </dl>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/membership/Authenticator.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/membership/Authenticator.java
deleted file mode 100644 (file)
index 8f19736..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.membership;
-
-
-import net.jxta.credential.AuthenticationCredential;
-
-
-/**
- * An Authenticator is returned by the
- * {@linkplain MembershipService#apply(AuthenticationCredential) apply()} to the
- * Membership Service of a peergroup. The Membership
- When the authenticator has been completed it is
- * returned to the Membership Service via the "Join" operation.
- *
- * <p/>The mechanism for completing the authentication object is unique for each
- * authentication method. (That's the whole point of writing a Membership
- * Service). The only common operation is <code>isReadyForJoin</code>, which
- * provides information as to whether you have completed the authenticator
- * correctly.
- *
- * @see net.jxta.membership.MembershipService
- * @see net.jxta.credential.Credential
- * @see net.jxta.credential.AuthenticationCredential
- */
-public interface Authenticator {
-    
-    /**
-     *  Returns the name of this authentication method. This should be the same
-     *  name which was used in the Authentication credential.
-     *
-     *  @return String containing the name of this authentication method.
-     **/
-    public String getMethodName();
-    
-    /**
-     * Return the Authentication Credential associated with this authenticator,
-     * if any.
-     *
-     * @return the AutheticationCredential which was provided to the
-     * {@link MembershipService#apply(AuthenticationCredential)}.
-     **/
-    public AuthenticationCredential getAuthenticationCredential();
-    
-    /**
-     * Returns the service which generated this authenticator. This is the
-     * service which provided this authenticator and the service which will
-     * accept this authenticator when the authenticator is
-     * completed.
-     *
-     * @return the MembershipService service associated with this authenticator.
-     **/
-    public MembershipService  getSourceService();
-    
-    /**
-     * Returns true if this Authenticator has been satisfied and is ready
-     * for submission to {@link MembershipService#join(Authenticator)}. Some
-     * authenticators may behave asynchronously and this method can be used to
-     * determine if the authentication process has completed.
-     * <p/>This method provides no distinction between incomplete authentication
-     * and failed authentication.
-     *
-     * @see MembershipService#join(Authenticator)
-     *
-     * @return true if the authenticator object is complete and ready for
-     * submitting to the Membership Service service for 
-     * {@link MembershipService#join(Authenticator)}, otherwise false.
-     **/
-    public boolean  isReadyForJoin();
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/membership/InteractiveAuthenticator.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/membership/InteractiveAuthenticator.java
deleted file mode 100644 (file)
index 24a2322..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.membership;
-
-
-/**
- * Extension to standard Authenticator for authenticators which support
- * interactive authentication with a human user.
- *
- * <p/>May be requested as authentication method
- * "<code>InteractiveAuthentication</code>" of Membership services which support
- * it. (this will be an alias for one of the service's own methods).
- **/
-public interface InteractiveAuthenticator extends Authenticator {
-    
-    /**
-     * Perform user interface interaction with user. If result is
-     * <code>false</code> then
-     * {@link net.jxta.membership.Authenticator#isReadyForJoin()} will
-     * also return <code>false</code>.
-     *
-     * @return <code>true</code> if the interaction was not cancelled otherwise
-     * <code>false</code>.
-     **/
-    public boolean  interact();
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/membership/MembershipService.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/membership/MembershipService.java
deleted file mode 100644 (file)
index 398d205..0000000
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.membership;
-
-
-import java.beans.PropertyChangeListener;
-import java.util.Enumeration;
-
-import net.jxta.credential.AuthenticationCredential;
-import net.jxta.credential.Credential;
-import net.jxta.document.Element;
-import net.jxta.service.Service;
-
-import net.jxta.exception.PeerGroupException;
-import net.jxta.exception.ProtocolNotSupportedException;
-
-
-/**
- *  Allows a peer to establish an identity within a peer group. Identities are 
- *  used by services and applications to determine the capabilities available to 
- *  peers. A peer have any number of identities at one time. Once an identity 
- *  has been established a Credential object is available which allows the peer 
- *  to prove that it rightfully has that identity.
- *
- *  <p/>The sequence for associating an identity with a peer within a peer
- *  group is as follows:
- *
- * <p/><table>
- *  <tr><td valign="top"><b>Apply</b></td>
- * <td>An application or service provides the membership service with an
- * initial credential which may be used by the membership service to determine
- *  the method of authentication to be used for establishing the identity.
- * If the membership service implementations allows authentication using the
- * requested mechanism then an {@link Authenticator} object is returned.
- * </td></tr>
- *
- *  <tr><td valign="top"><b>Join</b></td>
- * <td>The application or service completes the authenticator. This may involve
- * presenting a user interface, completing challenges, etc. How the
- * authenticator is completed depends on the type of membership service and
- * authenticator in use.
- *
- * <p/>Once completed, the authenticator is returned to the membership service.
- * If the authenticator has been correctly completed, a new credential for the
- * new identity will be available to the peer from the membership service.
- * </td></tr>
- *
- *  <tr><td valign="top"><b>Resign</b></td>
- * <td>Whenever the application or service no longer wishes to no longer use the
- * identities it has claimed, it may resign from the peergroup. This will cause
- * any identity credentials held by the membership service to  discarded.
- * </td></tr>
- *  </table>
- *
- *  @see net.jxta.credential.Credential
- *  @see net.jxta.credential.AuthenticationCredential
- *
- */
-public interface MembershipService extends Service {
-    
-    /**
-     *  Property name for the default credential bound property.
-     */
-    public final static String DEFAULT_CREDENTIAL_PROPERTY = "defaultCredential";
-    
-    /**
-     *  Property name for credential addition bound property.
-     */
-    public final static String ADD_CREDENTIAL_PROPERTY = "addCredential";
-    
-    /**
-     * Request the necessary credentials to join the group with which this
-     * service is associated.
-     *
-     * @param application The authentication Credential associated with this
-     * membership application. See
-     * {@link net.jxta.credential.AuthenticationCredential}
-     * for more information.
-     * @return An Authenticator for the membership service.
-     *
-     * @throws PeerGroupException Thrown in the event of errors.
-     * @throws ProtocolNotSupportedException if the authentication method requested
-     *       in the application is not supported by this service.
-     */
-    public Authenticator apply(AuthenticationCredential application) throws PeerGroupException, ProtocolNotSupportedException;
-    
-    /**
-     * Join the group by virtue of the completed authentication provided.
-     *
-     * @param authenticated the completed authentication.
-     * @return Credential the credential for this completed authentication.
-     * @throws PeerGroupException Thrown in the event of errors.
-     */
-    public Credential join(Authenticator authenticated) throws PeerGroupException;
-    
-    /**
-     * Resign all credentials which were previously gained through prior
-     * {@link #join(Authenticator) join()} operations.
-     *
-     * @throws PeerGroupException Thrown in the event of errors. 
-     */
-    public void resign() throws PeerGroupException;
-    
-    /**
-     *  Returns the default credential for this peer.
-     *
-     *  @return The current default Credential or {@code null} if there is no
-     *  current default.
-     *  @throws PeerGroupException Thrown in the event of errors.
-     */
-    public Credential getDefaultCredential() throws PeerGroupException;
-    
-    /**
-     * Returns the current credentials for this peer.
-     *
-     * @return Enumeration of the Credentials currently associated with this
-     * peer for this peergroup.
-     * @throws PeerGroupException Thrown in the event of errors.
-     */
-    public Enumeration<Credential> getCurrentCredentials() throws PeerGroupException;
-    
-    /**
-     * Returns the authentication credentials which were used to establish the 
-     * current identities.
-     *
-     * @deprecated This interface is being removed in favour of individual
-     * Credentials providing their AuthenticationCredential as appropriate.
-     *
-     * @return Enumeration of the AuthenticationCredentials which were used to
-     * establish the current identities.
-     * @throws PeerGroupException Thrown in the event of errors.
-     */
-    @Deprecated
-    public Enumeration<AuthenticationCredential> getAuthCredentials() throws PeerGroupException;
-    
-    /**
-     * Given a fragment of a StructuredDocument, reconstruct a Credential object
-     * from that fragment.
-     *
-     * @return Credential The created credential
-     * @param element The StructuredDocument fragment to use for building the
-     * credential.
-     * @throws PeerGroupException Thrown in the event of errors.
-     * @throws Exception Thrown in the event of errors.
-     */
-    public Credential makeCredential(Element element) throws PeerGroupException, Exception;
-    
-    /**
-     *  Add a listener
-     *
-     *  @param listener the listener
-     */
-    public void addPropertyChangeListener(PropertyChangeListener listener);
-    
-    /**
-     *  Add a listener. Available properties from all Membership Services are : 
-     *      
-     *      <p/><ul>
-     *          <li>{@code defaultCredential}</li>
-     *          <li>{@code addCredential}</li>
-     *      </ul>
-     *
-     *  <p/>Membership Services may offer additional properties.
-     *
-     *  @param propertyName The property to watch
-     *  @param listener The listener
-     */
-    public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener);
-    
-    /**
-     *  Remove a listener
-     *
-     *  @param listener the listener
-     */
-    public void removePropertyChangeListener(PropertyChangeListener listener);
-    
-    /**
-     *  Remove a listener
-     *
-     *  @param propertyName the property which was watched
-     *  @param listener the listener
-     */
-    public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/membership/doc-files/memberAndAccess.png b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/membership/doc-files/memberAndAccess.png
deleted file mode 100644 (file)
index 993ca71..0000000
Binary files a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/membership/doc-files/memberAndAccess.png and /dev/null differ
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/membership/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/membership/package.html
deleted file mode 100644 (file)
index 44e272c..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    The Membership Service allows a peer to establish an identity within a peer
-    group. A peer have any number of identities at one time. Once an identity 
-    has been established a credential object is available which allows the peer 
-    to prove that it rightfully has that identity. Applications and services
-    may restrict certain operations to specific identities. JXTA J2SE provides 
-    the Access Service to assist applications in matching privledges to 
-    identities.
-    
-    <p/>The Membership Service is not associated with a particular JXTA 
-    protocol. Each Membership Service implementation is responsible for its own 
-    protocol definition (if any). This approach is used primarily so that JXTA 
-    bridges well to existing common Membership and Access technologies. For 
-    example; PKI, Kerberos, NTLM and API based interfaces such as PAM and JAAS.
-                               
-    <p/>
-    <IMG src="doc-files/memberAndAccess.png" align="middle" alt="Diagram
-showing common flow of usage for Membership and Access Services" >
-
-    @see net.jxta.credential.Credential
-    @see net.jxta.credential.AuthenticationCredential
-    @see net.jxta.access.AccessService
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto" target='_blank'>JXTA Protocols Specification : Protocols</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/MonitorEvent.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/MonitorEvent.java
deleted file mode 100644 (file)
index befd094..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.meter;
-
-
-import net.jxta.peergroup.*;
-import net.jxta.peer.*;
-
-
-/**
- *     Information regarding a Remote Monitor's Report
- **/
-public class MonitorEvent {
-
-    /** Report received and is available in the event **/
-    public static final int OK = 200;
-
-    /** Report will not come because the registration was cancelled locally **/
-    public static final int CANCELLED_LOCALLY = 201;
-
-    /** Report will not come because the registration was cancelled remotely **/
-    public static final int CANCELLED_REMOTELY = 202;
-
-    /** Report will not come because the of a Timeout **/
-    public static final int TIMEOUT = 203;
-
-    /** Report will not come because the Remote peer has refused it (for security, not supported or load reasons) **/
-    public static final int REFUSED = 204;
-
-    /** Report will not come because the requested report rate is not supported/invalid **/
-    public static final int INVALID_REPORT_RATE = 205;
-
-    /** Report will not come because the provided MonitorFilter was invalid **/
-    public static final int INVALID_MONITOR_FILTER = 206;
-
-    /** Further Reports will not come because the lease was cancelled **/
-    public static final int LEASE_CANCELLED = 207;
-
-    /** Further Reports will not come because the lease renewal request did not receive a response.  
-     * In all likelihood the remote peer has failed (ie crashed)
-     **/
-    public static final int LEASE_RENEWAL_TIMEOUT = 208;
-
-    /** Internal Error processing Reports, probably due to a bad Monitor Implementation **/
-    public static final int ERROR = 209;
-
-    /** Further Reports will not come because this PeerGroup was destroyed locally **/
-    public static final int PEERGROUP_DESTROYED = 210;
-
-    private int type;
-    private int requestId;
-    private PeerID peerID;
-    private PeerGroupID peerGroupID;
-    private MonitorFilter monitorFilter; // FIX-ME: Is this necessary?
-    private long reportRate; // FIX-ME: Is this necessary?
-    private long leaseTime; // FIX-ME: Is this necessary?
-    private MonitorReport monitorReport;
-
-    private MonitorEvent() {}
-
-    public MonitorEvent(PeerGroupID peerGroupID, MonitorReport monitorReport) {
-        this.peerGroupID = peerGroupID;
-        this.monitorReport = monitorReport;
-    }
-
-    /**
-     * Get the Type of Event (one of the above constants)
-     *
-     */
-    public int getType() {
-        return type;
-    }
-
-    /**
-     * PeerID of reporting Peer.  My PeerID if local
-     */
-    public PeerID getPeerID() {
-        return peerID;
-    }
-
-    /**
-     * PeerGroup of reported event 
-     */
-    public PeerGroupID getPeerGroupID() {
-        return peerGroupID;
-    }
-
-    /**
-     * MonitorFilter provided when the report was requested
-     */
-    public MonitorFilter getMonitorFilter() {
-        return monitorFilter;
-    }
-
-    /**
-     * Reporting rate (unless Cumulative) specified when the report was requested
-     */
-    public long getReportRate() {
-        return reportRate;
-    }
-
-    /**
-     * Most recent Lease time granted (not specified if a cumulative Report)
-     */
-    public long getLeaseTime() {
-        return leaseTime;
-    }
-
-    /**
-     * Get the corresponding MonitorReport
-     */
-    public MonitorReport getMonitorReport() {
-        return monitorReport;
-    }
-
-    /**
-     * The Validated MonitorFilter from the registration or query
-     *
-     * @return MonitorFilter
-     */
-    public MonitorFilter getValidMonitorFilter() {
-        return monitorFilter;
-    }
-
-    /**
-     * Convenience factory method
-     */
-    public static MonitorEvent createRemoteMonitorReportEvent(PeerID peerID, int requestId, MonitorReport monitorReport) {
-        MonitorEvent event = new MonitorEvent();
-
-        event.type = OK;
-        event.peerID = peerID;
-        event.requestId = requestId;
-        event.monitorReport = monitorReport;
-        return event;
-    }
-
-    /**
-     * Convenience factory method
-     */
-    public static MonitorEvent createFailureEvent(int type, PeerID peerID, int requestId) {
-        MonitorEvent event = new MonitorEvent();
-
-        event.type = type;
-        event.peerID = peerID;
-        event.requestId = requestId;
-        return event;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/MonitorException.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/MonitorException.java
deleted file mode 100644 (file)
index ca4df04..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.meter;
-
-
-import net.jxta.exception.*;
-
-@SuppressWarnings("serial")
-public class MonitorException extends JxtaException {
-
-    /** Monitoring Not Supported **/
-    public final static int METERING_NOT_SUPPORTED = 7000;
-
-    /** Error during Serialization/Deserialization **/
-    public final static int SERIALIZATION = 7001;
-
-    /** Monitor Report Provided **/
-    public final static int MONITOR_REPORT = 7002;
-
-    /** Invalid MonitorFilter **/
-    public final static int FILTER_EXCEPTION = 7003;
-
-    private int type;
-
-    /**
-     * MonitorException
-     *
-     * @param type (see above)
-     * @param message
-     */
-    public MonitorException(int type, String message) {
-        super(message); 
-        this.type = type;
-    }
-       
-    /**
-     * MonitorException
-     *
-     * @param type
-     * @param message
-     * @param e
-     */
-    public MonitorException(int type, String message, Exception e) {
-        super(message, e); 
-        this.type = type;
-    }
-
-    /**
-     * get Type of event (see constants above)
-     */
-    public int getType() {
-        return type;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/MonitorFilter.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/MonitorFilter.java
deleted file mode 100644 (file)
index 06acba8..0000000
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.meter;
-
-
-import net.jxta.document.*;
-import net.jxta.id.*;
-import net.jxta.platform.*;
-import net.jxta.util.documentSerializable.*;
-import java.util.*;
-import java.net.*;
-import net.jxta.exception.*;
-import net.jxta.util.*;
-
-
-/**
- *             A Monitor Filter specifies which service-specific metrics should be obtained by the Monitor.
- *     It contains a collection of ServiceMonitor specific ServiceMonitorFilters.  
- *             
- **/
-public class MonitorFilter implements DocumentSerializable {
-    private String description;
-    private Map<ModuleClassID,ServiceMonitorFilter> serviceMonitorFilters = new HashMap<ModuleClassID,ServiceMonitorFilter>();
-    private List<ModuleClassID> unknownModuleClassIDs;
-
-    /**
-     * MonitorFilter
-     *
-     **/
-    public MonitorFilter() {}
-       
-    /**
-     * MonitorFilter
-     *
-     * @param description
-     **/
-    public MonitorFilter(String description) {
-        this.description = description;
-    }
-
-    /**
-     * Add a ServiceMonitorFilter to this MonitorFilter
-     *
-     * @param serviceMonitorFilter     Service Specific Filter
-     * @exception MonitorFilterException
-     * @return ServiceMonitorFilter Modified Filter to the capabilities of the service
-     **/
-    public ServiceMonitorFilter addServiceMonitorFilter(ServiceMonitorFilter serviceMonitorFilter) throws MonitorFilterException {
-        ModuleClassID moduleClassID = serviceMonitorFilter.getModuleClassID();
-
-        if (serviceMonitorFilters.get(moduleClassID) != null) {
-            throw new MonitorFilterException("Attempt to add a second Monitor Filter for: " + moduleClassID);
-        }
-        serviceMonitorFilters.put(moduleClassID, serviceMonitorFilter);
-        return serviceMonitorFilter;
-    }
-
-    /**
-     * Get ServiceMonitorFilter subfilter
-     *
-     * @param moduleClassID    ServiceMonitor's moduleClassID
-     * @return ServiceMonitorFilter  SubFilter or null if not found
-     **/
-    public ServiceMonitorFilter getServiceMonitorFilter(ModuleClassID moduleClassID) {
-        return serviceMonitorFilters.get(moduleClassID);
-    }
-
-    /**
-     * remove ServiceMonitorFilter
-     *
-     * @param moduleClassID    ServiceMonitor's moduleClassID
-     **/
-    public void removeServiceMonitorFilter(ModuleClassID moduleClassID) {
-        serviceMonitorFilters.remove(moduleClassID);
-    }
-
-    /**
-     * Get the number of subfilters
-     *
-     * @return int
-     **/
-    public int getServiceMonitorFilterCount() {
-        return serviceMonitorFilters.size();
-    }
-               
-    /**
-     * get ModuleClassIDs of contained subfilters
-     *
-     * @return Iterator of ServiceMonitor ClassIDs
-     **/
-    public Iterator getModuleClassIDs() {
-        return serviceMonitorFilters.keySet().iterator();
-    }
-
-    /**
-     * Get Iterator of all ServiceMonitorFilters subfilters
-     *
-     * @return Iterator of all ServiceMonitorFilters subfilters
-     **/
-    public Iterator getServiceMonitorFilters() {
-        return serviceMonitorFilters.values().iterator();
-    }
-       
-    /**
-     * Were any filters removed from this MonitorFilter (particularly when received remotely and deserialized)
-     *
-     **/
-    public boolean isUnknownModuleClassIDs() {
-        return (unknownModuleClassIDs != null);
-    }
-
-    /**
-     * Get a list of ModuleClassIDs for subfilters that could not be deserialized because they weren't registered
-     * @see MonitorResources
-     *
-     * @return Iterator
-     **/
-    public Iterator getUnknownModuleClassIDs() {
-        if (unknownModuleClassIDs != null) {
-            return unknownModuleClassIDs.iterator();
-        } else {
-            return     new LinkedList().iterator();
-        } 
-    }
-       
-    /**
-     * Get Description
-     *
-     **/
-    public String getDescription() {
-        return description;
-    }
-
-    /**
-     * {@inheritDoc}
-     **/
-    public void serializeTo(Element element) throws DocumentSerializationException {
-        DocumentSerializableUtilities.addString(element, "description", description);
-
-        for (Iterator i = serviceMonitorFilters.values().iterator(); i.hasNext();) {
-            ServiceMonitorFilter serviceMonitorFilter = (ServiceMonitorFilter) i.next();
-                       
-            Element serviceElement = DocumentSerializableUtilities.createChildElement(element, "service");     
-
-            DocumentSerializableUtilities.addString(serviceElement, "moduleClassID"
-                    ,
-                    serviceMonitorFilter.getModuleClassID().toString());
-            DocumentSerializableUtilities.addDocumentSerializable(serviceElement, "serviceFilter", serviceMonitorFilter);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     **/
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element serviceElement = (TextElement) e.nextElement();
-            String tagName = (String) serviceElement.getKey();
-                       
-            if (tagName.equals("service")) {
-                try {
-                    ModuleClassID moduleClassID = (ModuleClassID) IDFactory.fromURI(
-                            new URI(DocumentSerializableUtilities.getString(serviceElement, "moduleClassID", "ERROR")));
-                                                               
-                    try {
-                        ServiceMonitorFilter serviceMonitorFilter = MonitorResources.createServiceMonitorFilter(moduleClassID);
-
-                        serviceMonitorFilter.init(moduleClassID);
-                        Element serviceMonitorFilterElement = DocumentSerializableUtilities.getChildElement(serviceElement
-                                ,
-                                "serviceFilter");
-
-                        serviceMonitorFilter.initializeFrom(serviceMonitorFilterElement);
-                        serviceMonitorFilters.put(moduleClassID, serviceMonitorFilter);
-                    } catch (Exception ex) {
-                        if (unknownModuleClassIDs == null) {
-                            unknownModuleClassIDs = new LinkedList<ModuleClassID>();
-                        }
-                                                       
-                        unknownModuleClassIDs.add(moduleClassID);
-                    }
-                } catch (URISyntaxException jex) {
-                    throw new DocumentSerializationException("Can't get ModuleClassID", jex);
-                }
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/MonitorFilterException.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/MonitorFilterException.java
deleted file mode 100644 (file)
index b0d459e..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.meter;
-
-
-import net.jxta.platform.*;
-
-
-/**
- * Monitor Filter Exception
- */
-public class MonitorFilterException extends MonitorException {
-    public final static String SERVICE_NOT_SUPPORTED = "Service Not Supported";
-    public final static String REPORT_RATE_NOT_SUPPORTED = "Report Rate Not Supported";
-    ModuleClassID moduleClassID;
-    long reportRate;
-       
-    /**
-     * MonitorFilterException
-     *
-     * @param message
-     **/
-    public MonitorFilterException(String message) {
-        super(MonitorException.FILTER_EXCEPTION, message);
-    }
-
-    /**
-     * MonitorFilterException
-     *
-     * @param message
-     * @param e
-     **/
-    public MonitorFilterException(String message, Exception e) {
-        super(MonitorException.FILTER_EXCEPTION, message, e);
-    }
-
-    /**
-     * MonitorFilterException
-     *
-     * @param message
-     * @param moduleClassID
-     **/
-    public MonitorFilterException(String message, ModuleClassID moduleClassID) {
-        super(MonitorException.FILTER_EXCEPTION, message); 
-        this.moduleClassID = moduleClassID;
-    }
-
-    /**
-     * MonitorFilterException
-     *
-     * @param message
-     * @param reportRate
-     **/
-    public MonitorFilterException(String message, long reportRate) {
-        super(MonitorException.FILTER_EXCEPTION, message); 
-        this.reportRate = reportRate;
-    }
-
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/MonitorListener.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/MonitorListener.java
deleted file mode 100644 (file)
index 59ffc1f..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-/**
- * Monitor Listener for Local or Remote Monitoring
- **/
-package net.jxta.meter;
-
-
-public interface MonitorListener {
-
-    /**
-     * A Report is ready for Processing.  It may either be a cumulative or delta Report
-     *
-     * @param monitorEvent Event containing MonitorReport
-     **/
-    public void processMonitorReport(MonitorEvent monitorEvent);
-
-    /**
-     * Monitor Reporting has been cancelled.  The Event contains the reason
-     *
-     * @param monitorEvent Event containing Reason
-     **/
-    public void monitorReportingCancelled(MonitorEvent monitorEvent);
-
-    /**
-     * Request for Monitoring Failed
-     *
-     * @param monitorEvent Event containing Reason
-     **/
-    public void monitorRequestFailed(MonitorEvent monitorEvent);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/MonitorReport.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/MonitorReport.java
deleted file mode 100644 (file)
index 3be7ab2..0000000
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.meter;
-
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import net.jxta.util.documentSerializable.*;
-import net.jxta.document.*;
-import net.jxta.id.*;
-import net.jxta.peer.*;
-import net.jxta.platform.*;
-import net.jxta.util.*;
-import net.jxta.exception.*;
-
-import java.util.*;
-
-
-/**
- *             A Monitor Report contains  service-specific metrics for each service specified in the
- *             corresponding MonitorFilter (provided when the report was requested).
- *
- **/
-public class MonitorReport implements DocumentSerializable {
-    private long toTime;
-    private long fromTime;
-    private boolean isCumulative;
-    private Map<ModuleClassID,ServiceMetric> serviceMetrics = new HashMap<ModuleClassID,ServiceMetric>();
-    private List<ModuleClassID> unknownModuleClassIDs;
-    
-    /**
-     * Monitor Reports are generally not created by applications, but by the Monitor or PeerInfoService
-     *
-     **/
-    public MonitorReport() {}
-    
-    /**
-     * Monitor Reports are generally not created by applications, but by the Monitor or PeerInfoService
-     *
-     * @param fromTime
-     * @param toTime
-     * @param isCumulative
-     **/
-    public MonitorReport(long fromTime, long toTime, boolean isCumulative) {
-        this.fromTime = fromTime;
-        this.toTime = toTime;
-        this.isCumulative = isCumulative;
-    }
-    
-    /**
-     * Begin time that this report is representing
-     **/
-    public long getFromTime() {
-        return fromTime;
-    }
-    
-    /**
-     * End time that this report is representing
-     *
-     * @return long
-     **/
-    public long getToTime() {
-        return toTime;
-    }
-    
-    /**
-     * Does this report contain metrics from the last time the monitor was reset or is this a delta report
-     **/
-    public boolean isCumulative() {
-        return isCumulative;
-    }
-    
-    /**
-     * Get the contained service-specific ServiceMetrics
-     *
-     **/
-    public Iterator getServiceMetrics() {
-        return serviceMetrics.values().iterator();
-    }
-    
-    /**
-     * Get the contained service-specific ServiceMetric for the specified ServiceMonitor's classID
-     *
-     * @param moduleClassID ServiceMonitor's classID
-     * @return ServiceMetric  ServiceMetric or null if Not Found
-     **/
-    public ServiceMetric getServiceMetric(ModuleClassID moduleClassID) {
-        return serviceMetrics.get(moduleClassID);
-    }
-    
-    /**
-     * addServiceMetric are generally not created by applications, but by the Monitor or PeerInfoService
-     **/
-    public void addServiceMetric(ServiceMetric serviceMetric) {
-        serviceMetrics.put(serviceMetric.getModuleClassID(), serviceMetric);
-    }
-    
-    /**
-     * addServiceMetric are generally not created by applications, but by the Monitor or PeerInfoService
-     **/
-    public void addServiceMetric(ModuleClassID moduleClassID, ServiceMetric serviceMetric) {
-        serviceMetrics.put(moduleClassID, serviceMetric);
-    }
-    
-    /**
-     * Did this report contain any serviceMetrics for which there weren't registered ServiceMetric classes
-     * @see MonitorResources
-     **/
-    public boolean isUnknownModuleClassIDs() {
-        return (unknownModuleClassIDs != null);
-    }
-    
-    /**
-     * Get iterator of ModuleClassIDs of serviceMetrics for which there weren't registered ServiceMetric classes
-     *
-     * @return Iterator
-     **/
-    public Iterator getUnknownModuleClassIDs() {
-        if (unknownModuleClassIDs != null) {
-            return unknownModuleClassIDs.iterator();
-        } else {
-            return     new LinkedList().iterator();
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public void serializeTo(Element element) throws DocumentSerializationException {
-        DocumentSerializableUtilities.addLong(element, "toTime", toTime);
-        DocumentSerializableUtilities.addLong(element, "fromTime", fromTime);
-        DocumentSerializableUtilities.addBoolean(element, "isCumulative", isCumulative);
-        
-        for (Iterator i = serviceMetrics.values().iterator(); i.hasNext();) {
-            ServiceMetric serviceMetric = (ServiceMetric) i.next();
-            
-            Element serviceMetricElement = DocumentSerializableUtilities.createChildElement(element, "service");
-            
-            DocumentSerializableUtilities.addString(serviceMetricElement, "moduleClassID"
-                    ,
-                    serviceMetric.getModuleClassID().toString());
-            DocumentSerializableUtilities.addDocumentSerializable(serviceMetricElement, "serviceMetric", serviceMetric);
-        }
-        
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element childElement = (TextElement) e.nextElement();
-            String tagName = (String) childElement.getKey();
-            
-            if (tagName.equals("toTime")) {
-                toTime = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("fromTime")) {
-                fromTime = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("isCumulative")) {
-                isCumulative = DocumentSerializableUtilities.getBoolean(childElement);
-            } else if (tagName.equals("service")) {
-                try {
-                    ModuleClassID moduleClassID = (ModuleClassID) IDFactory.fromURI(
-                            new URI(DocumentSerializableUtilities.getString(childElement, "moduleClassID", "ERROR")));
-
-                    try {
-                        ServiceMetric serviceMetric = MonitorResources.createServiceMetric(moduleClassID);
-
-                        serviceMetric.init(moduleClassID);
-                        Element serviceMetricElement = DocumentSerializableUtilities.getChildElement(childElement, "serviceMetric");
-
-                        serviceMetric.initializeFrom(serviceMetricElement);
-                        serviceMetrics.put(moduleClassID, serviceMetric);
-                    } catch (Exception ex) {
-                        if (unknownModuleClassIDs == null) {
-                            unknownModuleClassIDs = new LinkedList<ModuleClassID>();
-                        }
-                        
-                        unknownModuleClassIDs.add(moduleClassID);
-                    }
-                } catch (URISyntaxException jex) {
-                    throw new DocumentSerializationException("Can't get ModuleClassID", jex);
-                }
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/MonitorResources.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/MonitorResources.java
deleted file mode 100644 (file)
index cf593fa..0000000
+++ /dev/null
@@ -1,548 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.meter;
-
-
-import java.net.URI;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Map;
-
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredTextDocument;
-import net.jxta.document.TextElement;
-import net.jxta.exception.JxtaException;
-import net.jxta.id.ID;
-import net.jxta.platform.ModuleClassID;
-import net.jxta.platform.ModuleSpecID;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.util.AdvertisementUtilities;
-import net.jxta.util.documentSerializable.DocumentSerializableUtilities;
-
-
-/**
- *   Registration point for types of ServiceMonitors's Advertisements, ServiceMetrics and ServiceMonitorFilters
- *   based upon the ModuleClassID for the ServiceMonitor
- **/
-
-public class MonitorResources {
-    public static final String SERVICE_MONITOR_TAG = "serviceMonitor";
-    public static final String SERVICE_MONITOR_ADVERTISEMENT_TAG = ModuleImplAdvertisement.getAdvertisementType();
-    public static final String CLASS_ID_TAG = "moduleClassID";
-    public static final String SERVICE_TITLE_TAG = "serviceTitle";
-    public static final String SERVICE_MONITOR_IMPL_TAG = "serviceMonitorImpl";
-    public static final String METRIC_CLASS_TAG = "serviceMetric";
-    public static final String FILTER_CLASS_TAG = "serviceMonitorFilter";
-    
-    private static Map<ModuleClassID,ServiceResource> registeredMonitorResources = new Hashtable<ModuleClassID,ServiceResource>();
-    
-    /**
-     *  Prefix string for all of the Well Known IDs declared in this interface.
-     **/
-    private static final String WK_ID_PREFIX = ID.URIEncodingName + ":" + ID.URNNamespace + ":uuid-DeadBeefDeafBabaFeedBabe";
-    
-    /**
-     * Well known classes for the basic service Monitors.
-
-     * To keep their string representation shorter, we put our small spec
-     * or role pseudo unique ID at the front of the second UUID string.
-     * Base classes do not need an explicit second UUID string because it is
-     * all 0.
-     * The type is always the last two characters, nomatter the total length.
-     */
-    
-    /**
-     * Well known module class identifier: monitor service
-     */
-    public static final ModuleClassID monitorServiceClassID = (ModuleClassID)
-            ID.create(URI.create(WK_ID_PREFIX + "0000011F05"));
-    
-    /**
-     * Well known module class identifier: resolver service
-     */
-    public static final ModuleClassID resolverServiceMonitorClassID = (ModuleClassID)
-            ID.create(URI.create(WK_ID_PREFIX + "0000010205"));
-    
-    /**
-     * Well known module class identifier: discovery service
-     */
-    public static final ModuleClassID discoveryServiceMonitorClassID = (ModuleClassID)
-            ID.create(URI.create(WK_ID_PREFIX + "0000010305"));
-    
-    /**
-     * Well known module class identifier: pipe service
-     */
-    public static final ModuleClassID pipeServiceMonitorClassID = (ModuleClassID)
-            ID.create(URI.create(WK_ID_PREFIX + "0000010405"));
-    
-    /**
-     * Well known module class identifier: membership service
-     */
-    public static final ModuleClassID membershipServiceMonitorClassID = (ModuleClassID)
-            ID.create(URI.create(WK_ID_PREFIX + "0000010505"));
-    
-    /**
-     * Well known module class identifier: rendezvous service
-     */
-    public static final ModuleClassID rendezvousServiceMonitorClassID = (ModuleClassID)
-            ID.create(URI.create(WK_ID_PREFIX + "0000010605"));
-    
-    /**
-     * Well known module class identifier: peerinfo service
-     */
-    public static final ModuleClassID peerinfoServiceMonitorClassID = (ModuleClassID)
-            ID.create(URI.create(WK_ID_PREFIX + "0000010705"));
-    
-    /**
-     * Well known module class identifier: endpoint service
-     */
-    public static final ModuleClassID endpointServiceMonitorClassID = (ModuleClassID)
-            ID.create(URI.create(WK_ID_PREFIX + "0000010805"));
-    
-    /*
-     * FIXME: EndpointProtocols should probably all be of the same class
-     * and of different specs and roles... But we'll take a shortcut for now.
-     */
-    
-    /**
-     * Well known module class identifier: transport protocol
-     */
-    public static final ModuleClassID transportServiceMonitorClassID = (ModuleClassID)
-            ID.create(URI.create(WK_ID_PREFIX + "0000010905"));
-    
-    /**
-     * Well known module class identifier: router protocol
-     */
-    public static final ModuleClassID routerServiceMonitorClassID = (ModuleClassID)
-            ID.create(URI.create(WK_ID_PREFIX + "0000010B05"));
-    
-    /**
-     * Well known module class identifier: tlsProtocol
-     */
-    public static final ModuleClassID tlsProtoServiceMonitorClassID = (ModuleClassID)
-            ID.create(URI.create(WK_ID_PREFIX + "00000105"));
-    
-    /**
-     * Well known module class identifier: ProxyService
-     */
-    public static final ModuleClassID proxyServiceMonitorClassID = (ModuleClassID)
-            ID.create(URI.create(WK_ID_PREFIX + "0000010E05"));
-    
-    /**
-     * Well known module class identifier: RelayProtocol
-     */
-    public static final ModuleClassID relayServiceMonitorClassID = (ModuleClassID)
-            ID.create(URI.create(WK_ID_PREFIX + "0000010F05"));
-    
-    /**
-     * Well known service specification identifier: the standard monitor
-     */
-    public static final ModuleSpecID refMonitorServiceSpecID = (ModuleSpecID)
-            ID.create(URI.create(WK_ID_PREFIX + "0000011F0106"));
-    
-    /**
-     * Well known service specification identifier: the standard resolver
-     */
-    public static final ModuleSpecID refResolverServiceMonitorSpecID = (ModuleSpecID)
-            ID.create(URI.create(WK_ID_PREFIX + "000001020106"));
-    
-    /**
-     * Well known service specification identifier: the standard discovery
-     */
-    public static final ModuleSpecID refDiscoveryServiceMonitorSpecID = (ModuleSpecID)
-            ID.create(URI.create(WK_ID_PREFIX + "000001030106"));
-    
-    /**
-     * Well known service specification identifier: the standard pipe
-     */
-    public static final ModuleSpecID refPipeServiceMonitorSpecID = (ModuleSpecID)
-            ID.create(URI.create(WK_ID_PREFIX + "000001040106"));
-    
-    /**
-     * Well known service specification identifier: the standard membership
-     */
-    public static final ModuleSpecID refMembershipServiceMonitorSpecID = (ModuleSpecID)
-            ID.create(URI.create(WK_ID_PREFIX + "000001050106"));
-    
-    /**
-     * Well known service specification identifier: the standard rendezvous
-     */
-    public static final ModuleSpecID refRendezvousServiceMonitorSpecID = (ModuleSpecID)
-            ID.create(URI.create(WK_ID_PREFIX + "000001060106"));
-    
-    /**
-     * Well known service specification identifier: the standard peerinfo
-     */
-    public static final ModuleSpecID refPeerinfoServiceMonitorSpecID = (ModuleSpecID)
-            ID.create(URI.create(WK_ID_PREFIX + "000001070106"));
-    
-    /**
-     * Well known service specification identifier: the standard endpoint
-     */
-    public static final ModuleSpecID refEndpointServiceMonitorSpecID = (ModuleSpecID)
-            ID.create(URI.create(WK_ID_PREFIX + "000001080106"));
-    
-    /**
-     * Well known endpoint protocol specification identifier: the standard
-     * transport Service Monitor
-     */
-    public static final ModuleSpecID refTransportServiceMonitorSpecID = (ModuleSpecID)
-            ID.create(URI.create(WK_ID_PREFIX + "000001090106"));
-    
-    /**
-     * Well known endpoint protocol specification identifier: the standard
-     * router
-     */
-    public static final ModuleSpecID refRouterServiceMonitorSpecID = (ModuleSpecID)
-            ID.create(URI.create(WK_ID_PREFIX + "0000010B0106"));
-    
-    /**
-     * Well known endpoint protocol specification identifier: the standard
-     * tls endpoint protocol
-     */
-    public static final ModuleSpecID refTlsServiceMonitorSpecID = (ModuleSpecID)
-            ID.create(URI.create(WK_ID_PREFIX + "0000010D0106"));
-    
-    /**
-     * Well known application: the Proxy
-     */
-    public static final ModuleSpecID refProxyServiceMonitorSpecID = (ModuleSpecID)
-            ID.create(URI.create(WK_ID_PREFIX + "0000010E0106"));
-    
-    /**
-     * Well known endpoint protocol specification identifier: the standard
-     * relay endpoint protocol
-     */
-    public static final ModuleSpecID refRelayServiceMonitorSpecID = (ModuleSpecID)
-            ID.create(URI.create(WK_ID_PREFIX + "0000010F0106"));
-    
-    private static ModuleClassID standardServiceMonitorClassIDs[] = new ModuleClassID[] {
-        resolverServiceMonitorClassID, rendezvousServiceMonitorClassID, endpointServiceMonitorClassID
-                ,
-        transportServiceMonitorClassID };
-        
-    public static ModuleImplAdvertisement getReferenceAllPurposeMonitorServiceImplAdvertisement(boolean includeTransports) {
-        ModuleImplAdvertisement moduleImplAdvertisement = AdvertisementUtilities.createModuleImplAdvertisement(
-                refMonitorServiceSpecID, "net.jxta.impl.meter.MonitorManager", "Service Monitor");
-        StructuredTextDocument param = (StructuredTextDocument) StructuredDocumentFactory.newStructuredDocument(
-                MimeMediaType.XMLUTF8, "serviceMonitor");
-            
-        addServiceMonitorServiceAdvertisement(param, refResolverServiceMonitorSpecID, "Resolver"
-                ,
-                "net.jxta.impl.resolver.resolverMeter.ResolverServiceMonitor"
-                ,
-                "net.jxta.impl.resolver.resolverMeter.ResolverServiceMetric"
-                ,
-                "net.jxta.impl.resolver.resolverMeter.ResolverServiceMonitorFilter");
-            
-        addServiceMonitorServiceAdvertisement(param, refEndpointServiceMonitorSpecID, "Endpoint"
-                ,
-                "net.jxta.impl.endpoint.endpointMeter.EndpointServiceMonitor"
-                ,
-                "net.jxta.impl.endpoint.endpointMeter.EndpointServiceMetric"
-                ,
-                "net.jxta.impl.endpoint.endpointMeter.EndpointServiceMonitorFilter");
-            
-        addServiceMonitorServiceAdvertisement(param, refTransportServiceMonitorSpecID, "Transport"
-                ,
-                "net.jxta.impl.endpoint.transportMeter.TransportServiceMonitor"
-                ,
-                "net.jxta.impl.endpoint.transportMeter.TransportServiceMetric"
-                ,
-                "net.jxta.impl.endpoint.transportMeter.TransportServiceMonitorFilter");
-            
-        addServiceMonitorServiceAdvertisement(param, refRendezvousServiceMonitorSpecID, "Rendezvous"
-                ,
-                "net.jxta.impl.rendezvous.rendezvousMeter.RendezvousServiceMonitor"
-                ,
-                "net.jxta.impl.rendezvous.rendezvousMeter.RendezvousServiceMetric"
-                ,
-                "net.jxta.impl.rendezvous.rendezvousMeter.RendezvousServiceMonitorFilter");
-            
-        moduleImplAdvertisement.setParam(param);
-        return moduleImplAdvertisement;
-    }
-        
-    private static void addServiceMonitorServiceAdvertisement(Element root, ModuleSpecID moduleSpecID, String title, String implClassName, String metricClassName, String filterClassName) {
-        ModuleImplAdvertisement moduleImplAdvertisement = createServiceMonitorModuleImplAdvertisement(moduleSpecID, title
-                ,
-                implClassName, metricClassName, filterClassName);
-            
-        Element serviceMonitorElement = DocumentSerializableUtilities.createChildElement(root, SERVICE_MONITOR_TAG);
-            
-        ModuleClassID moduleClassID = moduleSpecID.getBaseClass();
-
-        DocumentSerializableUtilities.addString(serviceMonitorElement, CLASS_ID_TAG, moduleClassID.toString());
-            
-        Element serviceMonitorAdvertisementElement = DocumentSerializableUtilities.createChildElement(serviceMonitorElement
-                ,
-                SERVICE_MONITOR_ADVERTISEMENT_TAG);
-        Element advDoc = (Element) moduleImplAdvertisement.getDocument(MimeMediaType.XMLUTF8);
-
-        DocumentSerializableUtilities.copyChildren(serviceMonitorAdvertisementElement, advDoc);
-    }
-        
-    public static ModuleImplAdvertisement createServiceMonitorModuleImplAdvertisement(ModuleSpecID moduleSpecID, String title, String implClassName, String metricClassName, String filterClassName) {
-        ModuleImplAdvertisement moduleImplAdvertisement = AdvertisementUtilities.createModuleImplAdvertisement(moduleSpecID
-                ,
-                implClassName, "Service Monitor");
-            
-        StructuredTextDocument param = (StructuredTextDocument) StructuredDocumentFactory.newStructuredDocument(
-                MimeMediaType.XMLUTF8, "serviceMonitor");
-            
-        DocumentSerializableUtilities.addString(param, SERVICE_TITLE_TAG, title);
-        DocumentSerializableUtilities.addString(param, METRIC_CLASS_TAG, metricClassName);
-        DocumentSerializableUtilities.addString(param, FILTER_CLASS_TAG, filterClassName);
-        moduleImplAdvertisement.setParam(param);
-            
-        return moduleImplAdvertisement;
-    }
-        
-    public static ModuleImplAdvertisement getServiceMonitorImplAdvertisement(ModuleClassID serviceMonitorModuleClassID, ModuleImplAdvertisement monitorServiceImplAdvertisement) {
-            
-        String classIDText = serviceMonitorModuleClassID.toString();
-            
-        StructuredDocument param = monitorServiceImplAdvertisement.getParam();
-            
-        for (Enumeration e = param.getChildren(SERVICE_MONITOR_TAG); e.hasMoreElements();) {
-            Element serviceMonitorElement = (Element) e.nextElement();
-                
-            String serviceMonitorClassIDText = DocumentSerializableUtilities.getString(serviceMonitorElement, CLASS_ID_TAG, "");
-                
-            if (classIDText.equals(serviceMonitorClassIDText)) {
-                TextElement serviceMonitorAdvertisementElement = (TextElement) DocumentSerializableUtilities.getChildElement(
-                        serviceMonitorElement, SERVICE_MONITOR_ADVERTISEMENT_TAG);
-
-                return (ModuleImplAdvertisement) AdvertisementFactory.newAdvertisement(serviceMonitorAdvertisementElement);
-            }
-        }
-            
-        return null;
-            
-    }
-        
-    private static class ServiceResource {
-        String serviceMonitorClassName;
-        Class serviceMonitorClass;
-        String serviceMonitorFilterClassName;
-        Class serviceMonitorFilterClass;
-        String serviceMetricClassName;
-        Class serviceMetricClass;
-            
-        ServiceResource(ModuleImplAdvertisement moduleImplAdvertisement) throws JxtaException {
-            try {
-                serviceMonitorClassName = moduleImplAdvertisement.getCode();
-                    
-                serviceMonitorFilterClassName = getServiceMonitorFilterClassName(moduleImplAdvertisement);
-                serviceMonitorFilterClass = Class.forName(serviceMonitorFilterClassName);
-                    
-                if (!(ServiceMonitorFilter.class).isAssignableFrom(serviceMonitorFilterClass)) {
-                    throw new JxtaException(
-                            "Bad ServiceMonitorImplAdvertisment: " + serviceMonitorFilterClassName
-                            + " is not a ServiceMonitorFilter");
-                }
-                    
-                serviceMetricClassName = getServiceMetricClassName(moduleImplAdvertisement);
-                serviceMetricClass = Class.forName(serviceMetricClassName);
-                    
-                if (!(ServiceMetric.class).isAssignableFrom(serviceMetricClass)) {
-                    throw new JxtaException(
-                            "Bad ServiceMonitorImplAdvertisment: " + serviceMetricClassName + " is not a ServiceMetric");
-                }
-            } catch (Exception e) {
-                throw new JxtaException("Bad ServiceMonitorImplAdvertisment: Unable to load constituent parts", e);
-            }
-        }
-    }
-        
-    /**
-     * Register the Implementation Advertisement for a ServiceMonitor Type
-     *  This contains the Monitor, Metric and Filter classNames
-     */
-    public static void registerServiceMonitorModuleImplAdvertisement(ModuleImplAdvertisement moduleImplAdvertisement) throws JxtaException {
-        ModuleClassID moduleClassID = moduleImplAdvertisement.getModuleSpecID().getBaseClass();
-            
-        if (registeredMonitorResources.get(moduleClassID) != null) {
-            return;
-        }
-            
-        registeredMonitorResources.put(moduleClassID, new ServiceResource(moduleImplAdvertisement));
-    }
-        
-    /**
-     * Create an empty ServiceMonitorFilter for the corresponding ModuleClassID
-     *
-     * @exception JxtaException  If not found or other errors
-     */
-    public static ServiceMonitorFilter createServiceMonitorFilter(ModuleClassID moduleClassID) throws MonitorFilterException {
-        try {
-            ServiceResource serviceResource = registeredMonitorResources.get(moduleClassID);
-            ServiceMonitorFilter serviceMonitorFilter = (ServiceMonitorFilter) serviceResource.serviceMonitorFilterClass.newInstance();
-
-            serviceMonitorFilter.init(moduleClassID);
-            return serviceMonitorFilter;
-        } catch (Exception e) {
-            throw new MonitorFilterException("Unable to Create Filter: " + moduleClassID); // this should never happen, we already did our checks
-        }
-    }
-        
-    /**
-     * Create an empty Service Metric for the corresponding ModuleClassID
-     *
-     * @exception JxtaException  If not found or other errors
-     */
-    public static ServiceMetric createServiceMetric(ModuleClassID moduleClassID) throws JxtaException {
-        try {
-            ServiceResource serviceResource = registeredMonitorResources.get(moduleClassID);
-            ServiceMetric serviceMetric = (ServiceMetric) serviceResource.serviceMetricClass.newInstance();
-
-            serviceMetric.init(moduleClassID);
-            return serviceMetric;
-        } catch (Exception e) {
-            throw new JxtaException("Unable to Create Service Metric"); // this should never happen, we already did our checks
-        }
-    }
-        
-    /**
-     * get ServiceMetric ClassName from its ImplAdvertisement
-     */
-    public static String getServiceMetricClassName(ModuleImplAdvertisement serviceMonitorModuleImplAdvertisement) {
-        Element param = serviceMonitorModuleImplAdvertisement.getParam();
-
-        return DocumentSerializableUtilities.getString(param, METRIC_CLASS_TAG, null);
-    }
-        
-    /**
-     * get ServiceMonitorFilter ClassName from its ImplAdvertisement
-     */
-    public static String getServiceMonitorFilterClassName(ModuleImplAdvertisement serviceMonitorModuleImplAdvertisement) {
-        Element param = serviceMonitorModuleImplAdvertisement.getParam();
-
-        return DocumentSerializableUtilities.getString(param, FILTER_CLASS_TAG, null);
-    }
-        
-    /**
-     * Get a list of all registered Service Monitor types
-     */
-    public static ModuleClassID[] getRegisteredModuleClassIDs() {
-        return standardServiceMonitorClassIDs.clone();
-    }
-        
-    /**
-     * Get the name of standard Monitor Type
-     **/
-    public static String getMonitorTypeName(ModuleClassID moduleClassID) {
-        if (moduleClassID.equals(monitorServiceClassID)) {
-            return "monitor";
-        }
-            
-        if (moduleClassID.equals(resolverServiceMonitorClassID)) {
-            return "Resolver";
-        }
-            
-        if (moduleClassID.equals(discoveryServiceMonitorClassID)) {
-            return "Discovery";
-        }
-            
-        if (moduleClassID.equals(pipeServiceMonitorClassID)) {
-            return "Pipe";
-        }
-            
-        if (moduleClassID.equals(membershipServiceMonitorClassID)) {
-            return "Membership";
-        }
-            
-        if (moduleClassID.equals(rendezvousServiceMonitorClassID)) {
-            return "Rendezvous";
-        }
-            
-        if (moduleClassID.equals(peerinfoServiceMonitorClassID)) {
-            return "PeerInfo";
-        }
-            
-        if (moduleClassID.equals(endpointServiceMonitorClassID)) {
-            return "Endpoint";
-        }
-            
-        if (moduleClassID.equals(transportServiceMonitorClassID)) {
-            return "Transport";
-        }
-            
-        if (moduleClassID.equals(routerServiceMonitorClassID)) {
-            return "monitor";
-        }
-            
-        if (moduleClassID.equals(tlsProtoServiceMonitorClassID)) {
-            return "Tls";
-        }
-            
-        if (moduleClassID.equals(proxyServiceMonitorClassID)) {
-            return "Proxy";
-        }
-            
-        if (moduleClassID.equals(relayServiceMonitorClassID)) {
-            return "Relay";
-        }
-            
-        return null;
-    }
-        
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/PeerMonitorInfo.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/PeerMonitorInfo.java
deleted file mode 100644 (file)
index 69645fe..0000000
+++ /dev/null
@@ -1,212 +0,0 @@
-/*\r
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.\r
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */\r
-\r
-package net.jxta.meter;\r
-\r
-\r
-import java.net.URI;\r
-import java.util.Enumeration;\r
-\r
-import java.net.URISyntaxException;\r
-\r
-import net.jxta.document.Element;\r
-import net.jxta.id.IDFactory;\r
-import net.jxta.platform.ModuleClassID;\r
-import net.jxta.util.documentSerializable.DocumentSerializable;\r
-import net.jxta.util.documentSerializable.DocumentSerializableUtilities;\r
-import net.jxta.util.documentSerializable.DocumentSerializationException;\r
-\r
-import net.jxta.exception.JxtaException;\r
-\r
-\r
-/**\r
- * The Monitoring Capabilities of a Local or Remote Peer as a list of ServiceMonitor ClassIDs and supported Reporting Rates.\r
- **/ \r
-public class PeerMonitorInfo implements DocumentSerializable {\r
-    public static final PeerMonitorInfo NO_PEER_MONITOR_INFO = new PeerMonitorInfo(false, null, null, 0, 0);\r
-    private boolean allowsMonitoring;\r
-    private ModuleClassID[] moduleClassIDs;\r
-    private long[] reportRates;\r
-    private long lastResetTime;\r
-    private long runningTime;\r
-\r
-    /**\r
-     * PeerMonitorInfo\r
-     *\r
-     */\r
-    public PeerMonitorInfo() {}\r
-       \r
-    /**\r
-     * PeerMonitorInfo\r
-     *\r
-     * @param allowsMonitoring\r
-     * @param moduleClassIDs\r
-     * @param reportRates\r
-     */\r
-    public PeerMonitorInfo(boolean allowsMonitoring, ModuleClassID[] moduleClassIDs, long[] reportRates, long lastResetTime, long runningTime) {\r
-        this.allowsMonitoring = allowsMonitoring;\r
-        this.moduleClassIDs = moduleClassIDs;\r
-        this.reportRates = reportRates;\r
-        this.lastResetTime = lastResetTime;\r
-        this.runningTime = runningTime;\r
-    }\r
-\r
-    /**\r
-     * Allows Monitoring\r
-     */\r
-    public boolean allowsMonitoring() {\r
-        return allowsMonitoring;\r
-    }\r
-\r
-    /**\r
-     * Get Suported Reporting Rates (in Milliseconds)\r
-     *\r
-     * @return long[]\r
-     */\r
-    public long[] getReportRates() {\r
-        return reportRates;\r
-    }\r
-\r
-    /**\r
-     * Get Suported Service Monitors as a list of ModuleClassIDs\r
-     */\r
-    public ModuleClassID[] getModuleClassIDs() {\r
-        return moduleClassIDs;\r
-    }\r
-       \r
-    /**\r
-     * Get Time that the Monitor was last Reset (probably same as startTime)\r
-     */\r
-    public long getLastResetTime() {\r
-        return lastResetTime;\r
-    }\r
-\r
-    /**\r
-     * Get the running time since the monitor was reset (probably same as upTime)\r
-     */\r
-    public long getRunningTime() {\r
-        return runningTime;\r
-    }\r
-\r
-    /**\r
-     * @inheritDoc\r
-     **/\r
-    public void serializeTo(Element element) throws DocumentSerializationException {\r
-        DocumentSerializableUtilities.addBoolean(element, "allowsMonitoring", allowsMonitoring);\r
-        DocumentSerializableUtilities.addLong(element, "lastResetTime", lastResetTime);\r
-        DocumentSerializableUtilities.addLong(element, "runningTime", runningTime);\r
-\r
-        if (allowsMonitoring) {\r
-            DocumentSerializableUtilities.addInt(element, "numModuleClassIDs", moduleClassIDs.length);\r
-            for (int i = 0; i < moduleClassIDs.length; i++) {\r
-                ModuleClassID moduleClassID = moduleClassIDs[i];\r
-\r
-                DocumentSerializableUtilities.addString(element, "moduleClassID", moduleClassID.toString());\r
-            }\r
-\r
-            DocumentSerializableUtilities.addInt(element, "numReportRates", reportRates.length);                       \r
-            for (int i = 0; i < reportRates.length; i++) {\r
-                long reportRate = reportRates[i];\r
-\r
-                DocumentSerializableUtilities.addLong(element, "reportRate", reportRate);\r
-            }\r
-        }                              \r
-    }\r
-\r
-    /**\r
-     * @inheritDoc\r
-     **/\r
-    public void initializeFrom(Element element) throws DocumentSerializationException {\r
-        int numModuleClassIDs = DocumentSerializableUtilities.getInt(element, "numModuleClassIDs", 0);\r
-\r
-        moduleClassIDs = new ModuleClassID[numModuleClassIDs];\r
-        int moduleClassIDIndex = 0;            \r
-\r
-        int numReportRates = DocumentSerializableUtilities.getInt(element, "numReportRates", 0);\r
-\r
-        reportRates = new long[numReportRates];        \r
-        int reportRateIndex = 0;\r
-                       \r
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {\r
-            Element childElement = (Element) e.nextElement();\r
-            String key = (String) childElement.getKey();\r
-\r
-            if (key.equals("allowsMonitoring")) { \r
-                allowsMonitoring = DocumentSerializableUtilities.getBoolean(childElement);\r
-            } else if (key.equals("lastResetTime")) { \r
-                lastResetTime = DocumentSerializableUtilities.getLong(childElement);\r
-            } else if (key.equals("runningTime")) { \r
-                runningTime = DocumentSerializableUtilities.getLong(childElement);\r
-            } else if (key.equals("reportRate")) {\r
-                long reportRate = DocumentSerializableUtilities.getLong(childElement);\r
-\r
-                reportRates[reportRateIndex] = reportRate;\r
-                reportRateIndex++;\r
-            } else if (key.equals("moduleClassID")) {\r
-                try {\r
-                    ModuleClassID moduleClassID = (ModuleClassID) IDFactory.fromURI(\r
-                            new URI(DocumentSerializableUtilities.getString(childElement)));\r
-\r
-                    moduleClassIDs[moduleClassIDIndex] = moduleClassID;\r
-                    moduleClassIDIndex++;\r
-                } catch (URISyntaxException jex) {\r
-                    throw new DocumentSerializationException("Can't get ModuleClassID", jex);\r
-                }\r
-            }\r
-        }\r
-                                       \r
-    }\r
-}\r
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/PeerMonitorInfoEvent.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/PeerMonitorInfoEvent.java
deleted file mode 100644 (file)
index a7655f6..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.meter;
-
-
-import net.jxta.peer.PeerID;
-
-
-/**
- *             Event containing status of request for remote PeerMonitorInfo
- **/
-public class PeerMonitorInfoEvent {
-
-    PeerID peerID;
-    PeerMonitorInfo peerMonitorInfo;
-
-    /**
-     * PeerMonitorInfoEvent
-     *
-     * @param peerID
-     * @param peerMonitorInfo
-     */
-    public PeerMonitorInfoEvent(PeerID peerID, PeerMonitorInfo peerMonitorInfo) {
-        this.peerID = peerID;
-        this.peerMonitorInfo = peerMonitorInfo;
-    }
-
-    /**
-     * Get PeerID of remote Peer
-     *
-     * @return PeerID
-     */
-    public PeerID getPeerID() {
-        return peerID;
-    }
-
-    /**
-     * PeerMonitorInfo of remote peer
-     *
-     * @return PeerMonitorInfo
-     */
-    public PeerMonitorInfo getPeerMonitorInfo() {
-        return peerMonitorInfo;
-    }
-       
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/PeerMonitorInfoListener.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/PeerMonitorInfoListener.java
deleted file mode 100644 (file)
index aa5875b..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.meter;
-
-
-/**
- *   PeerInfo Reporting capabilities Received from a Remote Monitor
- */
-public interface PeerMonitorInfoListener {
-       
-    /**
-     * PeerMonitorInfo has arrived
-     *
-     * @param peerMonitorInfoEvent Event contains PeerMonitorInfo
-     */
-    public void peerMonitorInfoReceived(PeerMonitorInfoEvent peerMonitorInfoEvent);
-
-    /**
-     * PeerMonitorInfo is not forthcoming due to Timeout
-     *
-     * @param peerMonitorInfoEvent contains PeerID of remote Peer
-     */
-    public void peerMonitorInfoNotReceived(PeerMonitorInfoEvent peerMonitorInfoEvent);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/ServiceMetric.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/ServiceMetric.java
deleted file mode 100644 (file)
index 5e565e2..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.meter;
-
-
-import net.jxta.util.documentSerializable.*;
-import net.jxta.platform.*;
-
-
-/**
- * The base interface for Service-Specific Metrics to be included in a Monitor Report
- **/
-public interface ServiceMetric extends DocumentSerializable {
-
-    /**
-     * init
-     *
-     * @param moduleClassID
-     */
-    public void init(ModuleClassID moduleClassID);
-
-    /**
-     * getModuleClassID
-     *
-     * @return ModuleClassID
-     */
-    public ModuleClassID getModuleClassID();
-
-    /**
-     * Additively Merge Metrics from this Metric
-     *
-     * @param otherServiceMetric The metric being merged into this metric
-     */
-    public void mergeMetrics(ServiceMetric otherServiceMetric);
-
-    /**
-     * Subtractively Remove Metrics from this Metric
-     *
-     * @param otherServiceMetric The metric being removed into this metric
-     */
-    public void diffMetrics(ServiceMetric otherServiceMetric);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/ServiceMonitor.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/ServiceMonitor.java
deleted file mode 100644 (file)
index 7e72fa1..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.meter;
-
-
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.platform.*;
-
-
-/**
- *  The base interface for all ServiceMonitors
- *  For complete information about Service Monitors see the 
- *  Document <I> Designing and Implementing Service Monitors </I>
- */
-public interface ServiceMonitor extends Module {
-
-    /**
-     * Get ModuleClassID of this ServiceMonitor
-     */
-    public ModuleClassID getModuleClassID();
-
-    /**
-     * Get ServiceMetrics accrued in during this pulse interval
-     *
-     * @param serviceMonitorFilter  Filter Metrics based upon this MonitorFilter
-     * @param fromTime Beginning time as determined by the MonitorManager
-     * @param toTime   Ending time as determined by the MonitorManager
-     * @param pulseIndex Pulse Index of the reporting rate Pyramid
-     * @param reportRate Reporting Rate (corresponding to the PulseNumber's index)
-     */
-    public ServiceMetric getServiceMetric(ServiceMonitorFilter serviceMonitorFilter, long fromTime, long toTime, int pulseIndex, long reportRate);
-
-    /**
-     * A request for a cumulative Report(s) are coming, prepare to receive them
-     * @see #endCumulativeReport()
-     *
-     */
-    public void beginCumulativeReport();
-
-    /**
-     * Get ServiceMetrics since the start (or last reset time) of this ServiceMonitor.
-     * Calls to this will only occurr between calls to beginCumulativeReport() and endCumulativeReport()
-     * @see #beginCumulativeReport()
-     * @see #endCumulativeReport()
-     * @param serviceMonitorFilter  Filter Metrics based upon this MonitorFilter
-     * @param fromTime Beginning time as determined by the MonitorManager
-     * @param toTime   Ending time as determined by the MonitorManager
-     */
-    public ServiceMetric getCumulativeServiceMetric(ServiceMonitorFilter serviceMonitorFilter, long fromTime, long toTime);
-
-    /**
-     * Indication that the flurry of requests for cumulative Report is over
-     * @see #beginCumulativeReport()
-     */
-    public void endCumulativeReport();
-
-    /**
-     * Validate ServiceMonitorFilter for a cumulative Report
-     */
-    public void validateCumulativeServiceMonitorFilter(ServiceMonitorFilter serviceMonitorFilter) throws MonitorFilterException;
-
-    /**
-     * Validate ServiceMonitorFilter for a periodic Reporting
-     */
-    public void validateServiceMonitorFilter(ServiceMonitorFilter serviceMonitorFilter, long reportRate) throws MonitorFilterException;
-
-    /**
-     * Transform the provided ServiceMonitorFilter into one that is supported for cumulative reporting
-     */
-    public ServiceMonitorFilter createSupportedCumulativeServiceMonitorFilter(ServiceMonitorFilter serviceMonitorFilter) throws MonitorFilterException;
-
-    /**
-     * Transform the provided ServiceMonitorFilter into one that is supported for periodic reporting at the specified rate
-     */
-    public ServiceMonitorFilter createSupportedServiceMonitorFilter(ServiceMonitorFilter serviceMonitorFilter, long reportRate) throws MonitorFilterException;
-
-    /**
-     * Information that the Monitor Manager has accepted a Monitoring for this filter at this rate
-     *
-     * @param serviceMonitorFilter     Accepted Filter
-     * @param reportRateIndex          Pulse Index into pyramid of accepted rate
-     * @param reportRate                       Accepted reporting rate
-     * @param newRate                          Is this a new reporting rate (ie you don't have any currently registered at this rate)
-     */
-    public void serviceMonitorFilterRegistered(ServiceMonitorFilter serviceMonitorFilter, int reportRateIndex, long reportRate, boolean newRate);
-
-    /**
-     * Information that the Monitor Manager is deregistering the Monitoring for this filter at this rate
-     *
-     * @param serviceMonitorFilter     Deregistered Filter
-     * @param reportRateIndex          Pulse Index into pyramid of deregistered filter
-     * @param reportRate                       Reporting rate of deregistered filter
-     * @param retiredRate                      Is this a retired filter the last one registered at this rate (ie you don't have to keep metrics for this rate any longer)
-     */
-    public void serviceMonitorFilterDeregistered(ServiceMonitorFilter serviceMonitorFilter, int reportRateIndex, long reportRate, boolean retiredRate);
-
-    /**
-     *    Clean up.  The PeerGroup is probably about to be destroyed
-     */
-    public void destroy();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/ServiceMonitorFilter.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/ServiceMonitorFilter.java
deleted file mode 100644 (file)
index 72ac4e2..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.meter;
-
-
-import net.jxta.util.documentSerializable.*;
-import net.jxta.platform.*;
-
-
-/**
- *  The base interface for all ServiceMonitorFilters.
- *  See the Service-Specific filter for any interesting information
- */
-public interface ServiceMonitorFilter extends DocumentSerializable {
-
-    /**
-     * init
-     *
-     * @param moduleClassID
-     */
-    public void init(ModuleClassID moduleClassID);
-
-    /**
-     * get ModuleClassID
-     */
-    public ModuleClassID getModuleClassID();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/meter/package.html
deleted file mode 100644 (file)
index dc046f3..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    Provides logging and monitoring facilities for debugging and auditing of
-                               messaging and service invocation within JXTA.
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/overview.html b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/overview.html
deleted file mode 100644 (file)
index e731cd1..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    These packages provide the standard API for the JXTA Protocols using 
-    Java Standard Edition 5.0. The implementation is divided into two
-    parts: the JSE Standard JXTA API (these packages) and the 
-    <a href="../impl/index.html" target="_blank"">JSE JXTA Reference Implementation</a>
-    <p/>
-    Additional optional packages which are useful for developers building JXTA
-    applications can be found in the 
-    <a href="../ext/index.html" target="_blank">JSE JXTA Extensions</a>
-    
-    <a name="implnote"/>
-    <p/><strong>Important Note:</strong> Applications and services are <em>very 
-    strongly</em> encouraged to not import classes or interfaces from the 
-    implementation packages. Specificially <strong>do not</strong> import from 
-    <code>net.jxta.impl.*</code>. The content of these packages may change 
-    significantly (including removal) from release to release with no advance
-    notice.
-
-    @see <a href="http://spec.jxta.org/v1.0/docbook/JXTAProtocols.html" target='_blank'>JXTA Protocols Specification</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peer/PeerID.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peer/PeerID.java
deleted file mode 100644 (file)
index fbd517a..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.peer;
-
-
-import java.net.URI;
-import net.jxta.id.ID;
-
-
-/**
- *  This class implements a PeerID. Each peer is assigned a unique peer id.
- *
- *  @see net.jxta.id.ID
- *  @see net.jxta.id.IDFactory
- *  @see net.jxta.peergroup.PeerGroupID
- */
-public abstract class PeerID extends ID {
-    
-    /**
-     * Creates an ID by parsing the given URI.
-     *
-     * <p>This convenience factory method works as if by invoking the
-     * {@link net.jxta.id.IDFactory#fromURI(URI)} method; any 
-     * {@link java.net.URISyntaxException} thrown is caught and wrapped in a 
-     * new {@link IllegalArgumentException} object, which is then thrown.  
-     *
-     * <p> This method is provided for use in situations where it is known that
-     * the given string is a legal ID, for example for ID constants declared
-     * within in a program, and so it would be considered a programming error
-     * for the URI not to parse as such.  The {@link net.jxta.id.IDFactory}, 
-     * which throws {@link java.net.URISyntaxException} directly, should be used 
-     * situations where a ID is being constructed from user input or from some 
-     * other source that may be prone to errors. 
-     *
-     * @param  fromURI   The URI to be parsed into an ID
-     * @return The new ID
-     *
-     * @throws  NullPointerException If {@code fromURI} is {@code null}.
-     * @throws  IllegalArgumentException If the given URI is not a valid ID.
-     */
-    public static PeerID create(URI fromURI) {
-        return (PeerID) ID.create(fromURI);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public PeerID intern() {
-        return (PeerID) super.intern();
-    }
-    
-    /**
-     *  Returns PeerGroupID of the Peer Group to which this Peer ID belongs.
-     *
-     *  @return PeerGroupID of the Peer Group to which this Peer ID belongs.
-     */
-    public abstract ID getPeerGroupID();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peer/PeerInfoEvent.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peer/PeerInfoEvent.java
deleted file mode 100644 (file)
index 6f08b77..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.peer;
-
-
-import java.util.EventObject;
-
-import net.jxta.protocol.PeerInfoResponseMessage;
-
-
-/**
- *  Container for PeerInfoEvent events.
- */
-public class PeerInfoEvent extends EventObject {
-
-    private PeerInfoResponseMessage piResp = null;
-    private int queryID = -1;
-
-    /**
-     *  Creates a new event
-     *
-     *@param  source   The object on which the Event initially occurred
-     *@param  queryid  The query id associated with the response returned in
-     *      this event
-     *@param  piResp    PeerInfoResponseMessage received
-     *@see             net.jxta.protocol.ResolverResponseMsg
-     */
-
-    public PeerInfoEvent(Object source, PeerInfoResponseMessage piResp, int queryid) {
-        super(source);
-        this.piResp = piResp;
-        this.queryID = queryid;
-
-    }
-
-    /**
-     *  Returns the response associated with the event
-     *
-     *@return    PeerInfoResponseMessage
-     *@see       net.jxta.protocol.ResolverResponseMsg
-     */
-    public PeerInfoResponseMessage getPeerInfoResponseMessage() {
-
-        return piResp;
-    }
-
-    /**
-     *  Returns The query id associated with the response returned in this
-     *  event
-     *
-     *@return    query id associated with the response
-     */
-    public int getQueryID() {
-
-        return queryID;
-    }
-
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peer/PeerInfoListener.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peer/PeerInfoListener.java
deleted file mode 100644 (file)
index 0ac3b92..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.peer;
-
-
-import java.util.EventListener;
-
-
-/**
- *  The listener interface for receiving <code>PeerInfoService</code> events.
- *
- *  The following example illustrates how to implement a <code>PeerInfoListener</code>:
- *
- *
- * <p/><pre>
- *        PeerInfoListener myPeerListener = new PeerInfoListener() {
- *            public void peerInfoResponse(PeerInfoEvent e) {
- *                PeerInfoResponseMessage adv = e.getPeerInfoResponse();
- *                if (myQueryID == e.getQueryID()) {
- *                 ...
- *                 ...
- *                }
- *            }
- *        peerinfo.addPeerInfoListener(myPeerListener);
- *        int myQueryID = peerinfo.getRemotePeerInfo(peer);
- * </pre>
- */
-
-public interface PeerInfoListener extends EventListener {
-
-    /**
-     * PeerInfoService Event
-     *
-     * @param event the peer info event
-     */
-    void peerInfoResponse(PeerInfoEvent event);
-
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peer/PeerInfoService.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peer/PeerInfoService.java
deleted file mode 100644 (file)
index f148a0a..0000000
+++ /dev/null
@@ -1,303 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.peer;
-
-
-import net.jxta.meter.*;
-import net.jxta.platform.ModuleClassID;
-import net.jxta.service.Service;
-
-
-/**
- * The PeerInfoService is a generic API for getting information about
- * the local Peer as well as remote Peers. <P>
- * <p/>
- * The most important type of information about a Peer may be gotten through
- * the Monitoring Service that may be accessed via the PeerInfoService.  The
- * Monitoring Service provides an open mechanism for reporting any type of
- * Metrics gathered on a Peer by a ServiceMonitor.  Attached Service Monitors
- * are identified by their ModuleClassID.  A ServiceMonitor may monitor anything
- * (ie it is not restricted to JXTA Services).  <p>
- * <p/>
- * There are several methods for accessing the capabilities and metrics
- * from ServiceMonitors
- * attached to the Peer (either locally or from remote peers). <p>
- * <p/>
- * Cumulative MonitorReports containing metrics since the Monitoring began
- * (or was reset) on a local/remote Peer may be obtained.  Alternatively, you may
- * register listeners get periodic MonitorReports (at a specified rate) of
- * metrics (since the previous report).  The amount of information obtained (either
- * cumulatively or periodically) is determined by a MonitorFilter whi
- * <p/>
- * The PeerInfoService utilizes the ResolverService to send queries and receive
- * responses (PeerInfoQueryMessage / PeerInfoResponseMessage).  These contain
- * requests and responses that are specific to the type of info being requested.
- * Depending upon the type of information requested, a peer may provide multiple
- * varying responses over time (as is the case for periodic remote peer Monitoring). <P>
- * <p/>
- * At the time of writing this documentation Service Monitoring is the only type
- * of Peer Information available though the implementation and underlying protocol
- * can support other types of information. <P>
- * <p/>
- * See the document:
- * <UL>
- * <LI> <I> JXTA Metering and Monitoring Project </I> </LI>
- * <LI> <I> The JXTA Metering and Monitoring Project Architecture </I> </LI>
- * <LI> <I> Building and Configuring JXTA with Monitoring Capabilities </I> </LI>
- * <LI> <I> JXTA Monitor: GUI Rendering of Metered Peer Info </I> </LI>
- * </UL>
- *
- * @see net.jxta.meter.MonitorFilter
- * @see net.jxta.meter.MonitorReport
- * @see net.jxta.meter.ServiceMonitor
- * @see net.jxta.meter.PeerMonitorInfo
- * @see net.jxta.protocol.PeerInfoQueryMessage
- * @see net.jxta.protocol.PeerInfoResponseMessage
- * @since JXTA 1.0
- */
-
-public interface PeerInfoService extends Service {
-
-    /**
-     * See if Local Monitoring is available on this Peer
-     * Local monitoring is only available if you are using a version of
-     * of jxta.jar that was build with metering activated.  <p>
-     * <p/>
-     * See the document:
-     * <UL>
-     * <LI> <I> Building and Configuring JXTA with Monitoring Capabilities </I> </LI>
-     * </UL>
-     *
-     * @return true if local monitoring is available
-     */
-    public boolean isLocalMonitoringAvailable();
-
-    /**
-     * See if Local monitoring is available from a specific ServiceMonitor.
-     * Local monitoring is only available if you are using a version of
-     * of jxta.jar that was build with metering activated.  <p>
-     * <p/>
-     * See the document:
-     * <UL>
-     * <LI> <I> Building and Configuring JXTA with Monitoring Capabilities </I> </LI>
-     * </UL>
-     *
-     * @param moduleClassID The Module classID of the ServiceMonitor.  Note that the ServiceMonitor
-     *                      moduleClassID is not the same as moduleClassID of the Service
-     *                      being monitored.
-     * @return true if local monitoring is available for a specific module
-     */
-    public boolean isLocalMonitoringAvailable(ModuleClassID moduleClassID);
-
-    /**
-     * Asynchronous reporting of Monitored data may be obtained only at rates supported by
-     * the MonitorManager on the peer.  This method returns the locally supported rates (in milliseconds)
-     * @return all supported rates
-     */
-    public long[] getSupportedReportRates();
-
-    /**
-     * Asynchronous reporting of Monitored data may be obtained only at rates supported by
-     * the MonitorManager on the peer.  This method validates whether a specific
-     * rate (in milliseconds) is locally supported.
-     * @param reportRate the report rate to check
-     * @return true if a report rate is supported
-     */
-    public boolean isSupportedReportRate(long reportRate);
-
-    /**
-     * Asynchronous reporting of Monitored data may be obtained only at rates supported by
-     * the MonitorManager on the peer.  This method supplies the closest (rounded up)
-     * rate (in milliseconds) to the specified rate that is locally supported.
-     * @param desiredReportRate the desired rate
-     * @return the desired rate
-     */
-    public long getBestReportRate(long desiredReportRate);
-
-    /**
-     * Obtain the monitoring capabilities of the Local Peer. <P>
-     * The PeerMonitorInfo provides:
-     * <UL>
-     * <LI> Whether any monitoring is available for this Peer </LI>
-     * <LI> The supported rates of asynchronous monitoring </LI>
-     * <LI> A list (as ModuleClassIDs) of ServiceMonitors attached to this Peer </LI>
-     * </UL>
-     * @return PeerMonitorInfo
-     */
-    public PeerMonitorInfo getPeerMonitorInfo();
-
-    /**
-     * Obtain the monitoring capabilities of a Remote Peer. <P>
-     * The PeerMonitorInfo provides:
-     * <UL>
-     * <LI> Whether any monitoring is available for this Peer </LI>
-     * <LI> The supported rates of asynchronous monitoring </LI>
-     * <LI> A list (as ModuleClassIDs) of ServiceMonitors attached to this Peer </LI>
-     * </UL>
-     * <p/>
-     * Via the PeerMonitorInfoListener, you will be informed of the PeerMonitorInfo or why it was
-     * not provided (error, timeout, unavailable, etc)
-     *
-     * @param peerID                  The PeerID of the Peer you wish information about
-     * @param peerMonitorInfoListener The Listener to be told about the obtained PeerMonitorInfo
-     * @param timeout                 Generate a timeout event if no answer has been received in this time (in Milliseconds)
-     * @throws net.jxta.meter.MonitorException if a monitor error occurs
-     */
-    public void getPeerMonitorInfo(PeerID peerID, PeerMonitorInfoListener peerMonitorInfoListener, long timeout) throws MonitorException;
-
-    /**
-     * Get a MonitorReport of total accumulated metrics from the ServiceMonitors (specified in the
-     * MonitorFilter) since they were created/reset for the local Peer.
-     *
-     * @param monitorFilter The MonitorFilter containing the specific ServiceMonitors and types of Service Metrics desired
-     * @return  the report
-     * @throws net.jxta.meter.MonitorException if a monitor error occurs
-     */
-    public MonitorReport getCumulativeMonitorReport(MonitorFilter monitorFilter) throws MonitorException;
-
-    /**
-     * Get a MonitorReport of total accumulated metrics from the ServiceMonitors (specified in the
-     * MonitorFilter) since they were created/reset for the specified remote Peer.
-     *
-     * @param peerID          The PeerID of the Peer you wish information about
-     * @param monitorFilter   The MonitorFilter containing the specific ServiceMonitors and types of Service Metrics desired
-     * @param monitorListener The Listener to obtain the report when it arrives (or timed out)
-     * @param timeout         The timeout for reporting that the information has not arrived.
-     * @throws net.jxta.meter.MonitorException if a monitor error occurs
-     */
-    public void getCumulativeMonitorReport(PeerID peerID, MonitorFilter monitorFilter, MonitorListener monitorListener, long timeout) throws MonitorException;
-
-    /**
-     * Get MonitorReports at a specified rates of metrics accrued over time from the ServiceMonitors
-     * (specified in the MonitorFilter) about the local Peer.  For many applications it is required to obtain metrics from
-     * the beginning of time and then augment over time as more data arrives. <P>
-     * <p/>
-     * There is a problem with the following approach:
-     * <OL>
-     * <LI>    Call getCumulativeMonitorReport to get the cumulative totals </LI>
-     * <LI>    Call addMonitorListener to get periodic changes </LI>
-     * <LI>    Add the periodic data to the totals </LI>
-     * </OL>
-     * <p/>
-     * Because of a potential race condition related to metrics that are measured between the two calls it is
-     * possible to lose some metrics.  To address this, this method supports this by combining them into a single
-     * call that allows you to specify whether you wish the first report delivered to be a cumulative report.
-     *
-     * @param monitorFilter     The MonitorFilter containing the specific ServiceMonitors and types of Service Metrics desired
-     * @param reportRate        The rate at which you wish metric delta reports
-     * @param includeCumulative Should the first report you receive be the cumulative data since the ServiceMonitors were created/reset?
-     * @param monitorListener   The Listener to obtain the report when it arrives (or timed out)
-     * @return report rate
-     * @throws net.jxta.meter.MonitorException if a monitor error occurs
-     */
-    public long addMonitorListener(MonitorFilter monitorFilter, long reportRate, boolean includeCumulative, MonitorListener monitorListener) throws MonitorException;
-
-    /**
-     * Get MonitorReports at a specified rates of metrics accrued over time from the ServiceMonitors
-     * (specified in the MonitorFilter) about the specified remote Peer.  For many applications it is required to obtain metrics from
-     * the beginning of time and then augment over time as more data arrives. <P>
-     * <p/>
-     * There is a problem with the following approach:
-     * <OL>
-     * <LI>    Call getCumulativeMonitorReport to get the cumulative totals </LI>
-     * <LI>    Call addMonitorListener to get periodic changes </LI>
-     * <LI>    Add the periodic data to the totals </LI>
-     * </OL>
-     * <p/>
-     * Because of a potential race condition related to metrics that are measured between the two calls it is
-     * possible to lose some metrics.  To address this, this method supports this by combining them into a single
-     * call that allows you to specify whether you wish the first report delivered to be a cumulative report.
-     *
-     * @param peerID            The PeerID of the Peer you wish information about
-     * @param monitorFilter     The MonitorFilter containing the specific ServiceMonitors and types of Service Metrics desired
-     * @param reportRate        The rate at which you wish metric delta reports
-     * @param includeCumulative Should the first report you receive be the cumulative data since the ServiceMonitors were created/reset?
-     * @param monitorListener   The Listener to obtain the report when it arrives (or timed out)
-     * @param timeout           The timeout for reporting that the information has not arrived.
-     * @param lease the lease
-     * @throws net.jxta.meter.MonitorException if a monitor error occurs
-     */
-    public void addRemoteMonitorListener(PeerID peerID, MonitorFilter monitorFilter, long reportRate, boolean includeCumulative, MonitorListener monitorListener, long lease, long timeout) throws MonitorException;
-
-    /**
-     * Stop the periodic reporting for all registered filters corresponding to this MonitorListener
-     * @param monitorListener the monitor listener
-     * @return  true if successfully removed
-     * @throws net.jxta.meter.MonitorException if a monitor error occurs
-     */
-    public boolean removeMonitorListener(MonitorListener monitorListener) throws MonitorException;
-
-    /**
-     * Stop the periodic reporting for all registered filters to the specified Peer corresponding to this MonitorListener.
-     *
-     * @param peerID          The Peer that you wish to deregister periodic reporting
-     * @param monitorListener The MonitorListener that was originally registered
-     * @param timeout         The timeout for reporting that the remote listener was acknowledged as deregistered
-     * @throws net.jxta.meter.MonitorException if a monitor error occurs
-     */
-    public void removeRemoteMonitorListener(PeerID peerID, MonitorListener monitorListener, long timeout) throws MonitorException;
-
-    /**
-     * Stop the periodic reporting for all registered filters to the all remote Peers corresponding to this MonitorListener.
-     *
-     * @param monitorListener The MonitorListener that was originally registered
-     * @param timeout         The timeout for reporting that the remote listener was acknowledged as deregistered
-     * @throws net.jxta.meter.MonitorException if a monitor error occurs
-     */
-    public void removeRemoteMonitorListener(MonitorListener monitorListener, long timeout) throws MonitorException;
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peer/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peer/package.html
deleted file mode 100644 (file)
index 0d36f16..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    Provides definition for the standard JXTA Peer Info Service. There 
-    is no JXSE object directly associated with the peer. The state of the 
-    current peer is expressed through the {@link net.jxta.peergroup.PeerGroup}
-    object.
-                               
-    @see net.jxta.peergroup.PeerGroup
-    @see net.jxta.protocol.PeerAdvertisement
-    @see net.jxta.id.ID
-
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-pip" target='_blank'>JXTA Protocols Specification : Peer Info Protocol</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peergroup/Configurator.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peergroup/Configurator.java
deleted file mode 100644 (file)
index fa72bef..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.peergroup;
-
-
-import net.jxta.exception.ConfiguratorException;
-import net.jxta.protocol.ConfigParams;
-
-
-/**
- * A configurator is responsible for the persistence and validation of
- * configuration parameters.
- *
- * @deprecated This interface has been replaced with the {@link net.jxta.platform.NetworkConfigurator}.
- **/
-@Deprecated
-public interface Configurator {
-    
-    /**
-     * Retrieve the parameters associated with this configuration from the
-     * default location. If necessary the parameters will be created or an
-     * opportunity to adjust them will be provided.
-     *
-     * @return The configuration parameters.
-     * @throws ConfiguratorException If there was a failure in retrieving the
-     *  parameters. This is normally a chained exception to the underlying
-     *  cause.
-     **/
-    public ConfigParams getConfigParams() throws ConfiguratorException;
-    
-    /**
-     * Sets the parameters associated with this configuration object to the
-     * provided values.
-     *
-     * @deprecated Configuration parameters should be set individually via
-     * whatever interfaces implementing configurator provides. This method
-     * over-writes all configuration settings in an unpredictable way.
-     *
-     * @param cp The parameters to be associated with this configuration.
-     **/
-    @Deprecated
-    public void setConfigParams(ConfigParams cp);
-    
-    /**
-     * Retrieves the persisted parameters associated with this configuration
-     * from the standard location.
-     *
-     * @deprecated Loading of existing configuration is best accomplished by use 
-     * of specific constructors of the implementing configurator. This method
-     * complicates the state management of configuration parameters and may have
-     * unpredictable results depending upon the constructor and configuration
-     * set methods used prior to it's execution.
-     *
-     * @return The configuration parameters.
-     * @throws ConfiguratorException If there was a failure in retrieving the
-     * persisted parameters. This is normally a chained exception to the
-     * underlying cause.
-     **/
-    @Deprecated
-    public ConfigParams load() throws ConfiguratorException;
-    
-    /**
-     * Persist the parameters associated with this configuration to the
-     * standard location.
-     *
-     * @return <code>true</code> if the configuration was successfully saved
-     *  otherwise <code>false</code>. If the parameters are not persisted then
-     *  <code>false/code> is returned.
-     * @throws ConfiguratorException If there was a failure in persisting the
-     *  parameters. This is normally a chained exception to the underlying
-     *  cause.
-     **/
-    public boolean save() throws ConfiguratorException;
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peergroup/LightWeightPeerGroup.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peergroup/LightWeightPeerGroup.java
deleted file mode 100644 (file)
index 67dff03..0000000
+++ /dev/null
@@ -1,584 +0,0 @@
-/*
- * Copyright (c) 2003-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.peergroup;
-
-
-import net.jxta.access.AccessService;
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Advertisement;
-import net.jxta.document.Element;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.exception.ProtocolNotSupportedException;
-import net.jxta.exception.ServiceNotFoundException;
-import net.jxta.id.ID;
-import net.jxta.membership.MembershipService;
-import net.jxta.peer.PeerID;
-import net.jxta.peer.PeerInfoService;
-import net.jxta.pipe.PipeService;
-import net.jxta.platform.JxtaLoader;
-import net.jxta.platform.Module;
-import net.jxta.platform.ModuleSpecID;
-import net.jxta.protocol.ConfigParams;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.PeerGroupAdvertisement;
-import net.jxta.rendezvous.RendezVousService;
-import net.jxta.resolver.ResolverService;
-import net.jxta.service.Service;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.Collections;
-import java.util.Iterator;
-
-
-/**
- * LightWeightPeerGroup is a class intended to help
- * building PeerGroup that can inherit one or more
- * services from a parent PeerGroup.
- * <p/>
- * An LightWeightPeerGroup implements PeerGroup and is to
- * be used like a PeerGroup by applications.
- * <p/>
- * This class is intended to be extended/implemented.
- * <p/>
- * Note: unlike implementations of peer groups that existed until JXTA 2.2,
- * LightweightPeergroup permits to implement groups that borrow all or
- * part of their services to a parent group. One needs to remember
- * that peers in various such subgroups of a given parent groups may
- * implicitly all share the same services if that is what the PeerGroup
- * implementing LightWeightPeerGroup is doing. Please refer to the documentation
- * of PeerGroups extending LightWeigthPeerGroup do understand which
- * services are shared, and which are not.
- */
-
-public class LightWeightPeerGroup implements PeerGroup {
-
-    /**
-     * Log4J Logger
-     */
-    private static final Logger LOG = Logger.getLogger(LightWeightPeerGroup.class.getName());
-
-    private PeerGroup group = null;
-    private ID assignedID = null;
-    private ModuleImplAdvertisement implAdv = null;
-    private final PeerGroupAdvertisement adv;
-
-    /**
-     * Constructor
-     * <p/>
-     * All classes that extend this class must invoke this
-     * constructor.
-     *
-     * @param adv PeerGroupAdvertisement of this LightWeightPeerGroup.
-     *            Note that only the PeerGroupID is used.
-     */
-    public LightWeightPeerGroup(PeerGroupAdvertisement adv) {
-        this.adv = adv;
-    }
-
-    /***********************************************************
-     ** Module API
-     ***********************************************************/
-    
-    /**
-     * {@inheritDoc}
-     */
-    public void init(PeerGroup group, ID assignedID, Advertisement implAdv) {
-        this.group = group;
-        this.assignedID = assignedID;
-        this.implAdv = (ModuleImplAdvertisement) implAdv;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public int startApp(String[] args) {
-        if (null == group) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("No base peer group defined.");
-            }
-            return -1;
-        }
-
-        return START_OK;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void stopApp() {}
-
-    /**
-     * {@inheritDoc}
-     */
-    public Service getInterface() {
-        return this;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ModuleImplAdvertisement getImplAdvertisement() {
-        return implAdv;
-    }
-
-    /***********************************************************
-     ** PeerGroup API
-     ***********************************************************/
-
-    /**
-     * {@inheritDoc}
-     */
-    public ThreadGroup getHomeThreadGroup() {
-        if (group != null) {
-            return group.getHomeThreadGroup();
-        } else {
-            return null;
-        }
-    }
-
-    /***********************************************************
-     ** PeerGroup API
-     ***********************************************************/
-
-    /**
-     * {@inheritDoc}
-     */
-    public URI getStoreHome() {
-        if (group != null) {
-            return group.getStoreHome();
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public JxtaLoader getLoader() {
-        if (group != null) {
-            return group.getLoader();
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerGroup getParentGroup() {
-
-        try {
-            return group;
-        } catch (Exception ex) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("LightWeightPeerGroup is a base PeerGroup: no parent");
-            }
-            throw new RuntimeException("LightWeightPeerGroup is a base PeerGroup: no parent");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isRendezvous() {
-
-        return group != null && group.isRendezvous();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerGroupAdvertisement getPeerGroupAdvertisement() {
-
-        if (adv != null) {
-            return adv;
-        } else if (group != null) {
-            return group.getPeerGroupAdvertisement();
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerAdvertisement getPeerAdvertisement() {
-
-        if (group != null) {
-            return group.getPeerAdvertisement();
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Service lookupService(ID name) throws ServiceNotFoundException {
-
-        if (group != null) {
-            return group.lookupService(name);
-        } else {
-            throw new ServiceNotFoundException("Not implemented");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Service lookupService(ID name, int ignoredForNow) throws ServiceNotFoundException {
-
-        if (group != null) {
-            return group.lookupService(name);
-        } else {
-            throw new ServiceNotFoundException("Not implemented");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Iterator getRoleMap(ID name) {
-
-        if (group != null) {
-            return group.getRoleMap(name);
-        } else {
-            // No translation; use the given name in a singleton.
-            return Collections.singletonList(name).iterator();
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean compatible(Element compat) {
-
-        return group != null && group.compatible(compat);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Module loadModule(ID assignedID, Advertisement impl) throws ProtocolNotSupportedException, PeerGroupException {
-
-        if (group != null) {
-            return group.loadModule(assignedID, impl);
-        } else {
-            throw new ProtocolNotSupportedException("LightWeightPeerGroup does not implement this operation");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Module loadModule(ID assignedID, ModuleSpecID specID, int where) {
-
-        if (group != null) {
-            return group.loadModule(assignedID, specID, where);
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void publishGroup(String name, String description) throws IOException {
-
-        if (group != null) {
-            group.publishGroup(name, description);
-        } else {
-            throw new IOException("Not implemented");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerGroup newGroup(Advertisement pgAdv) throws PeerGroupException {
-
-        if (group != null) {
-            return group.newGroup(pgAdv);
-        } else {
-            throw new PeerGroupException("Not implemented");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerGroup newGroup(PeerGroupID gid, Advertisement impl, String name, String description) throws PeerGroupException {
-
-        if (group != null) {
-            return group.newGroup(gid, impl, name, description);
-        } else {
-            throw new PeerGroupException("Not implemented");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerGroup newGroup(PeerGroupID gid) throws PeerGroupException {
-
-        if (group != null) {
-            return group.newGroup(gid);
-        } else {
-            throw new PeerGroupException("Not implemented");
-        }
-    }
-
-    /*
-     * shortcuts to the well-known services, in order to avoid calls to lookup.
-     */
-
-    /**
-     * {@inheritDoc}
-     */
-    public RendezVousService getRendezVousService() {
-
-        if (group != null) {
-            return group.getRendezVousService();
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public EndpointService getEndpointService() {
-
-        if (group != null) {
-            return group.getEndpointService();
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ResolverService getResolverService() {
-        if (group != null) {
-            return group.getResolverService();
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public DiscoveryService getDiscoveryService() {
-        if (group != null) {
-            return group.getDiscoveryService();
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerInfoService getPeerInfoService() {
-        if (group != null) {
-            return group.getPeerInfoService();
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public MembershipService getMembershipService() {
-        if (group != null) {
-            return group.getMembershipService();
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PipeService getPipeService() {
-        if (group != null) {
-            return group.getPipeService();
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public AccessService getAccessService() {
-        if (group != null) {
-            return group.getAccessService();
-        } else {
-            return null;
-        }
-    }
-
-    /*
-     * A few convenience methods. This information is available from
-     * the peer and peergroup advertisement.
-     */
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerGroupID getPeerGroupID() {
-
-        if (adv != null) {
-            return (PeerGroupID) adv.getID();
-        } else if (group != null) {
-            return group.getPeerGroupID();
-        } else {
-            throw new RuntimeException("No PeerGroupID");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerID getPeerID() {
-
-        if (group != null) {
-            return group.getPeerID();
-        } else {
-            throw new RuntimeException("No PeerID");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getPeerGroupName() {
-
-        if (adv != null) {
-            return adv.getName();
-        } else if (group != null) {
-            return group.getPeerGroupName();
-        } else {
-            throw new RuntimeException("No name");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getPeerName() {
-
-        if (group != null) {
-            return group.getPeerName();
-        } else {
-            throw new RuntimeException("No name");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ConfigParams getConfigAdvertisement() {
-
-        if (group != null) {
-            return group.getConfigAdvertisement();
-        } else {
-            throw new RuntimeException("No ConfigAdvertisement");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ModuleImplAdvertisement getAllPurposePeerGroupImplAdvertisement() throws Exception {
-
-        if (group != null) {
-            return group.getAllPurposePeerGroupImplAdvertisement();
-        } else {
-            throw new RuntimeException("Not implemented");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void unref() {}
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerGroup getWeakInterface() {
-
-        /**
-         * A LightWeightPeerGroup is already a weak reference
-         * that is not shareable, therefore, return self as
-         * a weak reference.
-         **/
-
-        return this;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peergroup/NetPeerGroupFactory.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peergroup/NetPeerGroupFactory.java
deleted file mode 100644 (file)
index df66d6d..0000000
+++ /dev/null
@@ -1,581 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.peergroup;
-
-
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.XMLElement;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.logging.Logging;
-import net.jxta.protocol.ConfigParams;
-import net.jxta.protocol.ModuleImplAdvertisement;
-
-import net.jxta.impl.protocol.PeerGroupConfigAdv;
-import net.jxta.impl.peergroup.GenericPeerGroup;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.net.URI;
-import java.util.MissingResourceException;
-import java.util.PropertyResourceBundle;
-import java.util.ResourceBundle;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * A factory for instantiating a Network Peer Group instances. The Network Peer
- * Group is the base peer group for applications and services within the JXTA
- * network. Most applications and services will instantiate their own peer
- * groups using the Network Peer Group as a base.
- * <p/>
- * A non-default configuration of <em>The Network Peer Group</em> may be
- * set-up by the administrator in charge of the network domain inside which the
- * peer is starting. <em>The Network Peer Group</em> may be discovered via the
- * JXTA Discovery protocol. Many such groups may be configured by an
- * administrator.
- *
- * @since JXTA JSE 2.4
- *
- * @see net.jxta.peergroup.PeerGroup
- * @see net.jxta.peergroup.WorldPeerGroupFactory
- */
-public final class NetPeerGroupFactory {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(NetPeerGroupFactory.class.getName());
-
-    /**
-     * Our strong reference to the net peer group.
-     */
-    private final PeerGroup net;
-
-    /**
-     * Instantiates the Net Peer Group using the ConfigParams found in the
-     * directory specified by the {@code JXTA_HOME} system property or the
-     * "{@code .jxta/}" directory if {@code JXTA_HOME} is not defined.
-     * <p/>
-     * This constructor is provided primarily for backwards compatibility.
-     * Though not deprecated this method should be considered as sample code
-     * only and the other constructors should be used whenever possible.
-     *
-     * @throws PeerGroupException Thrown for problems constructing the Net Peer
-     * Group.
-     */
-    public NetPeerGroupFactory() throws PeerGroupException {
-        WorldPeerGroupFactory world = new WorldPeerGroupFactory();
-        PeerGroup worldGroup = world.getInterface();
-        NetGroupTunables tunables;
-
-        try {
-            ConfigParams cp = worldGroup.getConfigAdvertisement();
-            PeerGroupConfigAdv netGroupConfig = (PeerGroupConfigAdv) cp.getSvcConfigAdvertisement(PeerGroup.peerGroupClassID);
-            
-            if (null == netGroupConfig) {
-                tunables = new NetGroupTunables(ResourceBundle.getBundle("net.jxta.impl.config"), new NetGroupTunables());
-                // load overides from "${JXTA_HOME}config.properties".
-                URI storeHome = worldGroup.getStoreHome();
-
-                if (null != storeHome) {
-                    try {
-                        File configProperties = new File(new File(storeHome), "config.properties");
-                        ResourceBundle rsrcs = new PropertyResourceBundle(new FileInputStream(configProperties));
-
-                        tunables = new NetGroupTunables(rsrcs, tunables);
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Loaded defaults from " + rsrcs);
-                        }
-                    } catch (MissingResourceException ignored) {
-                        // ingnored
-                    } catch (IOException ignored) {
-                        // ingnored
-                    }
-                }
-            } else {
-                tunables = new NetGroupTunables(netGroupConfig.getPeerGroupID(), netGroupConfig.getName(), netGroupConfig.getDesc());
-            }
-            
-            net = newNetPeerGroup(worldGroup, null, tunables.id, tunables.name, tunables.desc, null);
-        } finally {
-            worldGroup.unref();
-        }
-    }
-
-    /**
-     * Constructs a Net Peer Group using the specified parent peer group. This
-     * is the preferred constructor for constructing a Net Peer Group using the
-     * default configuration. The resulting Net Peer Group instance will use
-     * the default ID, Name and Description.
-     *
-     * @param parentGroup The Peer Group which will be the parent of the newly
-     * created net peer group. This should normally be the World Peer Group.
-     * @throws PeerGroupException Thrown for problems constructing the Net Peer
-     * Group.
-     */
-    public NetPeerGroupFactory(PeerGroup parentGroup) throws PeerGroupException {
-        ConfigParams cp = parentGroup.getConfigAdvertisement();
-        PeerGroupConfigAdv netGroupConfig = (PeerGroupConfigAdv) cp.getSvcConfigAdvertisement(PeerGroup.peerGroupClassID);
-        NetGroupTunables tunables;
-
-        if (null == netGroupConfig) {
-            tunables = new NetGroupTunables(ResourceBundle.getBundle("net.jxta.impl.config"), new NetGroupTunables());
-        } else {
-            tunables = new NetGroupTunables(netGroupConfig.getPeerGroupID(), netGroupConfig.getName(), netGroupConfig.getDesc());
-        }
-
-        net = newNetPeerGroup(parentGroup, null, tunables.id, tunables.name, tunables.desc, null);
-    }
-    
-    /**
-     * Constructs a Net Peer Group and the World Peer Group using the
-     * configuration specified by the provided ConfigParams and using the
-     * specified storeHome location for persistence. The resulting Net Peer
-     * Group instance will use the default ID, Name and Description.
-     *
-     * @param config The configuration to use for the newly created World Peer
-     * Group and Net Peer Groups.
-     * @param storeHome The optional location that the World Peer Group, the
-     * Net Peer Group and its' services should use for storing persistent and
-     * transient information. May be {@code null} if the World Peer Group is
-     * not provided a persistent store (though this not currently supported).
-     * @throws PeerGroupException Thrown for problems constructing the Net Peer
-     * Group.
-     */
-    public NetPeerGroupFactory(ConfigParams config, URI storeHome) throws PeerGroupException {
-        WorldPeerGroupFactory world = new WorldPeerGroupFactory(config, storeHome);
-        PeerGroup worldGroup = world.getInterface();
-
-        try {
-            PeerGroupConfigAdv netGroupConfig = (PeerGroupConfigAdv) config.getSvcConfigAdvertisement(PeerGroup.peerGroupClassID);
-            NetGroupTunables tunables;
-
-            if (null == netGroupConfig) {
-                tunables = new NetGroupTunables(ResourceBundle.getBundle("net.jxta.impl.config"), new NetGroupTunables());
-            } else {
-                tunables = new NetGroupTunables(netGroupConfig.getPeerGroupID(), netGroupConfig.getName(), netGroupConfig.getDesc());
-            }
-            
-            net = newNetPeerGroup(worldGroup, config, tunables.id, tunables.name, tunables.desc, null);
-        } finally {
-            worldGroup.unref();
-        }
-    }
-
-    /**
-     * Constructs a Net Peer Group and the World Peer Group using the
-     * configuration specified by the provided ConfigParams and using the
-     * specified storeHome location for persistence. The resulting Net Peer
-     * Group instance will use the group information provided in the
-     * <p/>
-     * This constructor is provided in anticipation of other improvements
-     * to the peer group instantiation process. Currently it has some
-     * unreasonable limitations which keep it from being very useful. In a
-     * future release it will be improved.
-     *
-     * @param config The configuration to use for the newly created World Peer
-     * Group and Net Peer Groups.
-     * @param storeHome The optional location that the World Peer Group, the
-     * Net Peer Group and its' services should use for storing persistent and
-     * transient information. May be {@code null} if the World Peer Group is
-     * not provided a persistent store (though this not currently supported).
-     * @throws PeerGroupException Thrown for problems constructing the Net Peer
-     * Group.
-     * @param parentGroup the parent peer group
-     */
-    public NetPeerGroupFactory(PeerGroup parentGroup, ConfigParams config, URI storeHome) throws PeerGroupException {
-
-        if (config != parentGroup.getConfigAdvertisement()) {
-            throw new IllegalArgumentException("This constructor cannot currently accept group parameters different than the parent group");
-        }
-
-        if (null == storeHome) {
-            if (null != parentGroup.getStoreHome()) {
-                throw new IllegalArgumentException("This constructor cannot currently accept a different store location than the parent group");
-            }
-        } else {
-            if (!storeHome.equals(parentGroup.getStoreHome())) {
-                throw new IllegalArgumentException("This constructor cannot currently accept a different store location than the parent group");
-            }
-        }
-
-        ConfigParams cp = parentGroup.getConfigAdvertisement();
-        PeerGroupConfigAdv netGroupConfig = (PeerGroupConfigAdv) cp.getSvcConfigAdvertisement(PeerGroup.peerGroupClassID);
-        NetGroupTunables tunables;
-
-        if (null == netGroupConfig) {
-            tunables = new NetGroupTunables(ResourceBundle.getBundle("net.jxta.impl.config"), new NetGroupTunables());
-        } else {
-            tunables = new NetGroupTunables(netGroupConfig.getPeerGroupID(), netGroupConfig.getName(), netGroupConfig.getDesc());
-        }
-        
-        net = newNetPeerGroup(parentGroup, config, tunables.id, tunables.name, tunables.desc, null);
-    }
-
-    /**
-     * Constructs a Net Peer Group and the World Peer Group using the
-     * configuration specified by the provided ConfigParams and using the
-     * specified storeHome location for persistence.
-     *
-     * @deprecated With the addition of support for {@code PeerGroupConfigAdv}
-     * this constructor is being deprecated as the precedence of settings is
-     * ambiguous.
-     *
-     * @param config    The configuration to use for the newly created World Peer
-     * Group and Net Peer Groups.
-     * @param storeHome The optional location that the World Peer Group, the
-     * Net Peer Group and its' services should use for storing persistent and
-     * transient information. May be {@code null} if the World Peer Group is
-     * not provided a persistent store (though this not currently supported).
-     * @param id        The PeerGroupID which will be used for the new Net Peer Group
-     * instance.
-     * @param name      The name which will be used for the new Net Peer Group
-     * instance.
-     * @param desc      The description which will be used for the new Net Peer Group
-     * instance. You can construct an {@code XMLDocument} from a {@code String}
-     * via :
-     * <p/><pre>
-     *     XMLDocument asDoc = StructuredDocumentFactory.newStructuredDocument( MimeMediaType.XMLUTF8, "desc", asString );
-     * </pre>
-     * @throws PeerGroupException Thrown for problems constructing the Net Peer
-     * Group.
-     */
-    @Deprecated
-    public NetPeerGroupFactory(ConfigParams config, URI storeHome, ID id, String name, XMLElement desc) throws PeerGroupException {
-        WorldPeerGroupFactory world = new WorldPeerGroupFactory(config, storeHome);
-        PeerGroup worldGroup = world.getInterface();
-        
-        try {
-            net = newNetPeerGroup(worldGroup, config, id, name, desc, null);
-        } finally {
-            worldGroup.unref();
-        }
-    }
-
-    /**
-     * Constructs a Net Peer Group instance using the specified parent peer
-     * group (normally the World Peer Group). This is the preferred constructor
-     * for constructing a private Net Peer Group.
-     *
-     * @deprecated With the addition of support for {@code PeerGroupConfigAdv}
-     * this constructor is being deprecated as the precedence of settings is
-     * ambiguous.
-     *
-     * @param parentGroup The Peer Group which will be the parent of the
-     * newly created net peer group. This should normally be the World Peer
-     * Group.
-     * @param id The PeerGroupID which will be used for the new Net Peer Group
-     * instance.
-     * @param name The name which will be used for the new Net Peer Group
-     * instance.
-     * @param desc The description which will be used for the new Net Peer Group
-     * instance. You can construct an {@code XMLDocument} from a {@code String}
-     * via :
-     * <p/><pre>
-     *     XMLDocument asDoc = StructuredDocumentFactory.newStructuredDocument( MimeMediaType.XMLUTF8, "desc", asString );
-     * </pre>
-     * @throws PeerGroupException Thrown for problems constructing the Net Peer
-     * Group.
-     */
-    @Deprecated
-    public NetPeerGroupFactory(PeerGroup parentGroup, ID id, String name, XMLElement desc) throws PeerGroupException {
-        net = newNetPeerGroup(parentGroup, null, id, name, desc, null);
-    }
-
-    /**
-     * Constructs a Net Peer Group instance using the specified parent peer
-     * group (normally the World Peer Group). This is the preferred constructor
-     * for constructing a private Net Peer Group with a specific implementation.
-     *
-     * @deprecated With the addition of support for {@code PeerGroupConfigAdv}
-     * this constructor is being deprecated as the precedence of settings is
-     * ambiguous.
-     *
-     * @param parentGroup The Peer Group which will be the parent of the newly
-     * created net peer group. This should normally be the World Peer
-     *                      
-     * @param id The PeerGroupID which will be used for the new Net Peer Group
-     * instance.
-     * @param name The name which will be used for the new Net Peer Group
-     * instance.
-     * @param desc The description which will be used for the new Net Peer Group
-     * instance. You can construct an {@code XMLDocument} from a {@code String}
-     * via :
-     * <p/><pre>
-     *     XMLDocument asDoc = StructuredDocumentFactory.newStructuredDocument( MimeMediaType.XMLUTF8, "desc", asString );
-     * </pre>
-     * @param moduleImplAdv The Module Impl Advertisement for the new Net Peer
-     * Group instance.
-     * @throws PeerGroupException Thrown for problems constructing the Net Peer
-     * Group.
-     */
-    @Deprecated
-    public NetPeerGroupFactory(PeerGroup parentGroup, ID id, String name, XMLElement desc, ModuleImplAdvertisement moduleImplAdv) throws PeerGroupException {
-        net = newNetPeerGroup(parentGroup, null, id, name, desc, moduleImplAdv);
-    }
-
-    /**
-     * Constructs a Net Peer Group instance using the specified parent peer
-     * group (normally the World Peer Group). This is the preferred constructor
-     * for constructing a Net Peer Group with a specific implementation.
-     *
-     * @param parentGroup The Peer Group which will be the parent of the
-     * newly created net peer group. This should normally be the World Peer
-     * Group.
-     * @param config The configuration parameters for the newly created Net Peer
-     * Group instance.
-     * @param moduleImplAdv The Module Impl Advertisement for the new Net Peer
-     * Group instance.
-     * @throws PeerGroupException Thrown for problems constructing the Net Peer
-     * Group.
-     */
-    public NetPeerGroupFactory(PeerGroup parentGroup, ConfigParams config, ModuleImplAdvertisement moduleImplAdv) throws PeerGroupException {
-        PeerGroupConfigAdv netGroupConfig = (PeerGroupConfigAdv) config.getSvcConfigAdvertisement(PeerGroup.peerGroupClassID);
-        NetGroupTunables tunables;
-
-        if (null == netGroupConfig) {
-            tunables = new NetGroupTunables(ResourceBundle.getBundle("net.jxta.impl.config"), new NetGroupTunables());
-        } else {
-            tunables = new NetGroupTunables(netGroupConfig.getPeerGroupID(), netGroupConfig.getName(), netGroupConfig.getDesc());
-        }
-
-        net = newNetPeerGroup(parentGroup, config, tunables.id, tunables.name, tunables.desc, moduleImplAdv);
-    }
-    
-    /**
-     * Returns a strong (reference counted) interface object for the Net Peer
-     * Group instance. This reference should be explicitly unreferenced when it
-     * is no longer needed.
-     *
-     * @return A strong (reference counted) interface object for the Net Peer Group.
-     * @see PeerGroup#unref()
-     */
-    public PeerGroup getInterface() {
-        return (PeerGroup) net.getInterface();
-    }
-
-    /**
-     * Returns a weak (non-reference counted) interface object for the Net Peer Group.
-     *
-     * @return A weak (non-reference counted) interface object for the Net Peer Group.
-     * @see PeerGroup#getWeakInterface()
-     */
-    public PeerGroup getWeakInterface() {
-        return net.getWeakInterface();
-    }
-
-    /**
-     * Construct the new Net Peer Group instance.
-     *
-     * @param parentGroup The parent group of the newly created net peer group.
-     * @param config Configuration parameters for the newly created net peer group.
-     * @param id The name to use for the newly created Net Peer Group.
-     * @param name The name to use for the newly created Net Peer Group.
-     * @param desc The description to use for the newly created Net Peer Group.
-     * @param implAdv The Module Impl Advertisement for the new Net Peer Group
-     * instance or {@code null} to use the advertisement returned by
-     * {@ link PeerGroup.getAllPurposePeerGroupImplAdvertisement()}.
-     * @return the PeerGroup
-     * @throws PeerGroupException Thrown for errors instantiating the new Net
-     * Peer Group instance.
-     */
-    private PeerGroup newNetPeerGroup(PeerGroup parentGroup, ConfigParams config, ID id, String name, XMLElement desc, ModuleImplAdvertisement implAdv) throws PeerGroupException {
-        synchronized (PeerGroup.globalRegistry) {
-            PeerGroup result = PeerGroup.globalRegistry.lookupInstance((PeerGroupID) id);
-
-            if (null != result) {
-                result.unref();
-                throw new PeerGroupException("Only a single instance of a Peer Group may be instantiated at a single time.");
-            }
-
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info( "Instantiating net peer group : " + id + 
-                        "\n\tParent : " + parentGroup + 
-                        "\n\tID : " + id + 
-                        "\n\tName : " + name + 
-                        "\n\timpl : " + implAdv);
-            }
-
-            try {
-                if (null == implAdv) {
-                    // Use the default Peer Group Impl Advertisement
-                    implAdv = parentGroup.getAllPurposePeerGroupImplAdvertisement();
-                }
-
-                // Build the group
-                GenericPeerGroup.setGroupConfigAdvertisement(id,config);
-                
-                result = (PeerGroup) parentGroup.loadModule(id, implAdv);
-                
-                // Set the name and description
-                // FIXME 20060217 bondolo How sad, we can't use our XML description.
-                if (null != desc) {
-                    result.publishGroup(name, desc.getTextValue());
-                } else {
-                    result.publishGroup(name, null);
-                }
-
-                return result;
-            } catch (PeerGroupException failed) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "newNetPeerGroup failed", failed);
-                }
-                // rethrow
-                throw failed;
-            } catch (RuntimeException e) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "newNetPeerGroup failed", e);
-                }
-                // rethrow
-                throw e;
-            } catch (Exception e) {
-                // should be all other checked exceptions
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "newNetPeerGroup failed", e);
-                }
-                // Simplify exception scheme for caller: every sort of problem 
-                // wrapped in a PeerGroupException.
-                throw new PeerGroupException("newNetPeerGroup failed", e);
-            }
-        }
-    }
-
-    /**
-     * Holds the construction tunables for the Net Peer Group. This consists of
-     * the peer group id, the peer group name and the peer group description.
-     */
-    static class NetGroupTunables {
-
-        final ID id;
-        final String name;
-        final XMLElement desc;
-
-        /**
-         * Constructor for loading the default Net Peer Group construction
-         * tunables.
-         */
-        NetGroupTunables() {
-            id = PeerGroupID.defaultNetPeerGroupID;
-            name = "NetPeerGroup";
-            desc = (XMLElement) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "desc", "default Net Peer Group");
-        }
-
-        /**
-         * Constructor for loading the default Net Peer Group construction
-         * tunables.
-         *
-         * @param pgid the PeerGroupID
-         * @param pgname the group name
-         * @param pgdesc the group description
-         */
-        NetGroupTunables(ID pgid, String pgname, XMLElement pgdesc) {
-            id = pgid;
-            name = pgname;
-            desc = pgdesc;
-        }
-
-        /**
-         * Constructor for loading the Net Peer Group construction
-         * tunables from the provided resource bundle.
-         *
-         * @param rsrcs The resource bundle from which resources will be loaded.
-         * @param defaults default values
-         */
-        NetGroupTunables(ResourceBundle rsrcs, NetGroupTunables defaults) {
-            ID idTmp;
-            String nameTmp;
-            XMLElement descTmp;
-
-            try {
-                String idTmpStr = rsrcs.getString("NetPeerGroupID").trim();
-
-                if (idTmpStr.startsWith(ID.URNNamespace + ":")) {
-                    idTmpStr = idTmpStr.substring(5);
-                }
-                idTmp = IDFactory.fromURI(new URI(ID.URIEncodingName + ":" + ID.URNNamespace + ":" + idTmpStr));
-                nameTmp = rsrcs.getString("NetPeerGroupName").trim();
-                descTmp = (XMLElement) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "desc",
-                        rsrcs.getString("NetPeerGroupDesc").trim());
-            } catch (Exception failed) {
-                if (null != defaults) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.log(Level.FINE, "NetPeerGroup tunables not defined or could not be loaded. Using defaults.", failed);
-                    }
-
-                    idTmp = defaults.id;
-                    nameTmp = defaults.name;
-                    descTmp = defaults.desc;
-                } else {
-                    if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                        LOG.log(Level.SEVERE, "NetPeerGroup tunables not defined or could not be loaded.", failed);
-                    }
-
-                    throw new IllegalStateException("NetPeerGroup tunables not defined or could not be loaded.");
-                }
-            }
-
-            id = idTmp;
-            name = nameTmp;
-            desc = descTmp;
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peergroup/PeerGroup.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peergroup/PeerGroup.java
deleted file mode 100644 (file)
index 7e90056..0000000
+++ /dev/null
@@ -1,1003 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.peergroup;
-
-
-import net.jxta.access.AccessService;
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Advertisement;
-import net.jxta.document.Element;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.exception.ProtocolNotSupportedException;
-import net.jxta.exception.ServiceNotFoundException;
-import net.jxta.id.ID;
-import net.jxta.membership.MembershipService;
-import net.jxta.peer.PeerID;
-import net.jxta.peer.PeerInfoService;
-import net.jxta.pipe.PipeService;
-import net.jxta.platform.JxtaLoader;
-import net.jxta.platform.Module;
-import net.jxta.platform.ModuleClassID;
-import net.jxta.platform.ModuleSpecID;
-import net.jxta.protocol.ConfigParams;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.PeerGroupAdvertisement;
-import net.jxta.rendezvous.RendezVousService;
-import net.jxta.resolver.ResolverService;
-import net.jxta.service.Service;
-
-import java.io.IOException;
-import java.lang.ref.Reference;
-import java.lang.ref.WeakReference;
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-
-/**
- * Peer groups are formed as a collection of peers that have agreed upon a
- * common set of services. Each peer group is assigned a unique peer group ID
- * and a peer group advertisement. The peer group advertisement contains a
- * ModuleSpecID which refers to a module specification for this peer group.
- * <p/>
- * The peer group specification mandates each of the group services (membership,
- * discovery, resolver, etc). Implementations of that specification are
- * described by ModuleImplAdvertisements which are identified by the group's
- * ModuleSpecID. Implementations are responsible for providing the services mandated
- * by the specification.
- * <p/>
- * The java reference implementation achieves this by loading additional Modules
- * which ModuleSpecIDs are listed by the group implementation advertisement.
- * <p/>
- * In order to fully participate in a group, a peer may need to authenticate
- * with the group using the peer group membership service.
- *
- * @see net.jxta.peergroup.PeerGroupID
- * @see net.jxta.service.Service
- * @see net.jxta.peergroup.PeerGroupFactory
- * @see net.jxta.protocol.PeerGroupAdvertisement
- * @see net.jxta.protocol.ModuleImplAdvertisement
- * @see net.jxta.platform.ModuleSpecID
- * @see net.jxta.platform.ModuleClassID
- */
-public interface PeerGroup extends Service {
-
-    /**
-     * Look for needed ModuleImplAdvertisement in this group.
-     */
-    public final static int Here = 0;
-
-    /**
-     * Look for needed ModuleImplAdvertisement in the parent group of this group.
-     */
-    public final static int FromParent = 1;
-
-    /**
-     * Look for needed ModuleImplAdvertisement in both this group and its parent.
-     */
-    public final static int Both = 2;
-
-    /**
-     * Default life time for group advertisements in the publisher's cache.
-     * (a year)
-     */
-    // without casting to long we lose precision
-    public final static long DEFAULT_LIFETIME = (long) 1000 * (long) 3600 * (long) 24 * 365L;
-
-    /**
-     * Default expiration time for discovered group advertisements. (2 weeks)
-     */
-    // without casting to long we lose precision
-    public final static long DEFAULT_EXPIRATION = (long) 1000 * (long) 3600 * (long) 24 * 14L;
-
-    /**
-     * Global registry of instantiated peer groups. We allow only a single
-     * PeerGroup instance for a specific PeerGroupID within the context of the
-     * classloader JXTA is loaded into.
-     */
-    static class GlobalRegistry {
-
-        private final Map<ID, Reference<PeerGroup>> registry = new HashMap<ID, Reference<PeerGroup>>(8);
-
-        /**
-         * Registers a new instance.
-         *
-         * @param gid the ID of the group of which an instance is being registered.
-         * @param pg  the group instance being registered.
-         * @return false if the instance could not be registered because there
-         *         was already such an instance registered.
-         */
-        public synchronized boolean registerInstance(PeerGroupID gid, PeerGroup pg) {
-
-            Reference<PeerGroup> ref = registry.get(gid);
-
-            if ((ref != null) && (ref.get() != null)) {
-                return false;
-            }
-
-            // If the ref is a dead instance, we can also replace it.
-            registry.put(gid, new WeakReference<PeerGroup>(pg));
-            return true;
-        }
-
-        /**
-         * Unregisters a group instance (normally because the group is being
-         * stopped.
-         *
-         * @param gid the ID of the group of which an instance is unregistered.
-         * @param pg  the group instance itself (serves as a credential).
-         * @return false if the group could not be unregistered because no such
-         *         registration (exact ID, exact object) was not found.
-         */
-        public synchronized boolean unRegisterInstance(PeerGroupID gid, PeerGroup pg) {
-
-            Reference<PeerGroup> ref = registry.get(gid);
-
-            if (ref == null) {
-                return false;
-            }
-
-            PeerGroup found = ref.get();
-
-            if (found == null) {
-                // Dead instance. Remove from table.
-                registry.remove(gid);
-                return false;
-            }
-
-            // Note the use of "!=", not "!equals()"
-            if (pg != found) {
-                return false;
-            }
-
-            registry.remove(gid);
-            return true;
-        }
-
-        /**
-         * Returns a running instance of the peergroup with given ID if any
-         * exists. The instance should be {@link PeerGroup#unref()}ed when it is
-         * no longer needed.
-         *
-         * @param gid the id of the group of which an instance is wanted.
-         * @return the group, or {@code null} if no instance exists.
-         */
-        public synchronized PeerGroup lookupInstance(PeerGroupID gid) {
-
-            Reference<PeerGroup> ref = registry.get(gid);
-
-            if (ref == null) {
-                return null;
-            }
-
-            PeerGroup pg = ref.get();
-
-            if (pg == null) {
-                // Dead instance. remove from table.
-                registry.remove(gid);
-                return null;
-            }
-
-            // Returns an interface object. Therefore a module that got the
-            // peergroup through lookup cannot unregister it if the group
-            // protects itself by returning an interface object different from
-            // the group object. In general only the group itself can
-            // unregister when being torn down. Unregistration will also be
-            // automatic if the grp object is GC'ed (the references are weak
-            // references).
-            return (PeerGroup) pg.getInterface();
-        }
-
-        /**
-         * Returns a running instance of the peergroup with given ID if any
-         * exists.
-         *
-         * @param gid The id of the group of which an instance is wanted.
-         * @return The group, or {@code null} if no instance exists.
-         */
-        synchronized PeerGroup getInstance(PeerGroupID gid) {
-
-            Reference<PeerGroup> ref = registry.get(gid);
-
-            if (ref == null) {
-                return null;
-            }
-
-            PeerGroup pg = ref.get();
-
-            if (pg == null) {
-                // Dead instance. remove from table.
-                registry.remove(gid);
-                return null;
-            }
-
-            return pg;
-        }
-
-        /**
-         * Returns {@code true} if there is a registered peergroup of the
-         * specified ID.
-         *
-         * @param gid the id of the group of which an instance is wanted.
-         * @return {@code} true if the peergroup is currently registered
-         *         otherwise false;
-         */
-        public synchronized boolean registeredInstance(PeerGroupID gid) {
-
-            Reference<PeerGroup> ref = registry.get(gid);
-
-            if (ref == null) {
-                return false;
-            }
-
-            PeerGroup pg = ref.get();
-
-            if (pg == null) {
-                // Dead instance. remove from table.
-                registry.remove(gid);
-                return false;
-            }
-
-            return true;
-        }
-    }
-
-    /**
-     * Well known classes for the basic services.
-     *
-     * <p/>FIXME: we should make a "well-known ID" encoding implementation that
-     * has its own little name space of human readable names...later.
-     * To keep their string representation shorter, we put our small spec
-     * or role pseudo unique ID at the front of the second UUID string.
-     * Base classes do not need an explicit second UUID string because it is
-     * all 0.
-     *
-     * <p/>The type is always the last two characters, no-matter the total length.
-     */
-
-    /**
-     * Prefix string for all of the Well Known IDs declared in this interface.
-     */
-    static final String WK_ID_PREFIX = ID.URIEncodingName + ":" + ID.URNNamespace + ":uuid-DeadBeefDeafBabaFeedBabe";
-
-    /**
-     * Well known module class identifier: peer group
-     */
-    public final static ModuleClassID peerGroupClassID = 
-            ModuleClassID.create(URI.create(WK_ID_PREFIX + "0000000105"));
-
-    /**
-     * Well known module class identifier: resolver service
-     */
-    public final static ModuleClassID resolverClassID = 
-            ModuleClassID.create(URI.create(WK_ID_PREFIX + "0000000205"));
-
-    /**
-     * Well known module class identifier: discovery service
-     */
-    public final static ModuleClassID discoveryClassID = 
-            ModuleClassID.create(URI.create(WK_ID_PREFIX + "0000000305"));
-
-    /**
-     * Well known module class identifier: pipe service
-     */
-    public final static ModuleClassID pipeClassID = 
-            ModuleClassID.create(URI.create(WK_ID_PREFIX + "0000000405"));
-
-    /**
-     * Well known module class identifier: membership service
-     */
-    public final static ModuleClassID membershipClassID = 
-            ModuleClassID.create(URI.create(WK_ID_PREFIX + "0000000505"));
-
-    /**
-     * Well known module class identifier: rendezvous service
-     */
-    public final static ModuleClassID rendezvousClassID = 
-            ModuleClassID.create(URI.create(WK_ID_PREFIX + "0000000605"));
-
-    /**
-     * Well known module class identifier: peerinfo service
-     */
-    public final static ModuleClassID peerinfoClassID = 
-            ModuleClassID.create(URI.create(WK_ID_PREFIX + "0000000705"));
-
-    /**
-     * Well known module class identifier: endpoint service
-     */
-    public final static ModuleClassID endpointClassID = 
-            ModuleClassID.create(URI.create(WK_ID_PREFIX + "0000000805"));
-
-    // FIXME: EndpointProtocols should probably all be of the same class
-    // and of different specs and roles... But we'll take a shortcut for now.
-
-    /**
-     * Well known module class identifier: tcp protocol
-     */
-    public final static ModuleClassID tcpProtoClassID = 
-            ModuleClassID.create(URI.create(WK_ID_PREFIX + "0000000905"));
-
-    /**
-     * Well known module class identifier: http protocol
-     */
-    public final static ModuleClassID httpProtoClassID = 
-            ModuleClassID.create(URI.create(WK_ID_PREFIX + "0000000A05"));
-
-    /**
-     * Well known module class identifier: router protocol
-     */
-    public final static ModuleClassID routerProtoClassID = 
-            ModuleClassID.create(URI.create(WK_ID_PREFIX + "0000000B05"));
-
-    /**
-     * Well known module class identifier: application
-     */
-    public final static ModuleClassID applicationClassID = 
-            ModuleClassID.create(URI.create(WK_ID_PREFIX + "0000000C05"));
-
-    /**
-     * Well known module class identifier: tlsProtocol
-     */
-    public final static ModuleClassID tlsProtoClassID = 
-            ModuleClassID.create(URI.create(WK_ID_PREFIX + "0000000D05"));
-
-    /**
-     * Well known module class identifier: ProxyService
-     */
-    public final static ModuleClassID proxyClassID = 
-            ModuleClassID.create(URI.create(WK_ID_PREFIX + "0000000E05"));
-
-    /**
-     * Well known module class identifier: RelayProtocol
-     */
-    public final static ModuleClassID relayProtoClassID = 
-            ModuleClassID.create(URI.create(WK_ID_PREFIX + "0000000F05"));
-
-    /**
-     * Well known module class identifier: AccessService
-     */
-    public final static ModuleClassID accessClassID = 
-            ModuleClassID.create(URI.create(WK_ID_PREFIX + "0000001005"));
-
-    /**
-     * Well known group specification identifier: the platform
-     */
-    public final static ModuleSpecID refPlatformSpecID = 
-            ModuleSpecID.create(URI.create(WK_ID_PREFIX + "000000010106"));
-
-    /**
-     * Well known group specification identifier: the Network Peer Group
-     */
-    public final static ModuleSpecID refNetPeerGroupSpecID = 
-            ModuleSpecID.create(URI.create(WK_ID_PREFIX + "000000010206"));
-
-    /**
-     * Well known service specification identifier: the standard resolver
-     */
-    public final static ModuleSpecID refResolverSpecID = 
-            ModuleSpecID.create(URI.create(WK_ID_PREFIX + "000000020106"));
-
-    /**
-     * Well known service specification identifier: the standard discovery
-     */
-    public final static ModuleSpecID refDiscoverySpecID = 
-            ModuleSpecID.create(URI.create(WK_ID_PREFIX + "000000030106"));
-
-    /**
-     * Well known service specification identifier: the standard pipe service
-     */
-    public final static ModuleSpecID refPipeSpecID = 
-            ModuleSpecID.create(URI.create(WK_ID_PREFIX + "000000040106"));
-
-    /**
-     * Well known service specification identifier: the standard membership
-     */
-    public final static ModuleSpecID refMembershipSpecID = 
-            ModuleSpecID.create(URI.create(WK_ID_PREFIX + "000000050106"));
-
-    /**
-     * Well known service specification identifier: the standard rendezvous
-     */
-    public final static ModuleSpecID refRendezvousSpecID = 
-            ModuleSpecID.create(URI.create(WK_ID_PREFIX + "000000060106"));
-
-    /**
-     * Well known service specification identifier: the standard peerinfo
-     */
-    public final static ModuleSpecID refPeerinfoSpecID = 
-            ModuleSpecID.create(URI.create(WK_ID_PREFIX + "000000070106"));
-
-    /**
-     * Well known service specification identifier: the standard endpoint
-     */
-    public final static ModuleSpecID refEndpointSpecID =
-            ModuleSpecID.create(URI.create(WK_ID_PREFIX + "000000080106"));
-
-    /**
-     * Well known endpoint protocol specification identifier: the standard
-     * tcp endpoint protocol
-     */
-    public final static ModuleSpecID refTcpProtoSpecID = 
-            ModuleSpecID.create(URI.create(WK_ID_PREFIX + "000000090106"));
-
-    /**
-     * Well known endpoint protocol specification identifier: the standard
-     * http endpoint protocol
-     */
-    public final static ModuleSpecID refHttpProtoSpecID = 
-            ModuleSpecID.create(URI.create(WK_ID_PREFIX + "0000000A0106"));
-
-    /**
-     * Well known endpoint protocol specification identifier: the standard
-     * router
-     */
-    public final static ModuleSpecID refRouterProtoSpecID = 
-            ModuleSpecID.create(URI.create(WK_ID_PREFIX + "0000000B0106"));
-
-    /**
-     * Well known endpoint protocol specification identifier: the standard
-     * tls endpoint protocol
-     */
-    public final static ModuleSpecID refTlsProtoSpecID = 
-            ModuleSpecID.create(URI.create(WK_ID_PREFIX + "0000000D0106"));
-
-    /**
-     * Well known group specification identifier: an all purpose peer group
-     * specification. The java reference implementation implements it with
-     * the StdPeerGroup class and all the standard platform services and no
-     * endpoint protocols.
-     */
-    public final static ModuleSpecID allPurposePeerGroupSpecID = 
-            ModuleSpecID.create(URI.create(WK_ID_PREFIX + "000000010306"));
-
-    /**
-     * Well known application: the shell
-     */
-    public final static ModuleSpecID refShellSpecID = 
-            ModuleSpecID.create(URI.create(WK_ID_PREFIX + "0000000C0206"));
-
-    /**
-     * Well known application: the Proxy
-     */
-    public final static ModuleSpecID refProxySpecID = 
-            ModuleSpecID.create(URI.create(WK_ID_PREFIX + "0000000E0106"));
-
-    /**
-     * Well known endpoint protocol specification identifier: the standard
-     * relay endpoint protocol
-     */
-    public final static ModuleSpecID refRelayProtoSpecID = 
-            ModuleSpecID.create(URI.create(WK_ID_PREFIX + "0000000F0106"));
-
-    /**
-     * Well known access specification identifier: the standard
-     * access service
-     */
-    public final static ModuleSpecID refAccessSpecID = 
-            ModuleSpecID.create(URI.create(WK_ID_PREFIX + "000000100106"));
-
-    /**
-     * The global registry of Peer Group instances. Operations involving the
-     * instantiation or orderly shutdown of Peer Groups should synchronize upon
-     * this object.
-     */
-    final static GlobalRegistry globalRegistry = new GlobalRegistry();
-
-    /**
-     * Returns the Thread Group in which threads for this peer group will live.
-     * This is currently used only for debugging purposes so that the source of
-     * a thread can be determined.
-     *
-     * @return ThreadGroup
-     */
-    public ThreadGroup getHomeThreadGroup();
-
-    /**
-     * Returns the class loader for this group.
-     *
-     * @return JxtaLoader The JXTA Class loader used by this group.
-     */
-    public JxtaLoader getLoader();
-
-    /**
-     * Returns the whether the group member is a Rendezvous peer for the group.
-     *
-     * @return boolean true if the peer is a rendezvous for the group.
-     */
-    public boolean isRendezvous();
-
-    /**
-     * Return the PeerGroupAdvertisement for this group.
-     *
-     * @return PeerGroupAdvertisement this Group's advertisement.
-     */
-    public PeerGroupAdvertisement getPeerGroupAdvertisement();
-
-    /**
-     * Return the PeerAdvertisement of the local Peer within this Peer Group.
-     *
-     * @return the PeerAdvertisement of the local Peer within this Peer Group.
-     */
-    public PeerAdvertisement getPeerAdvertisement();
-
-    /**
-     * Lookup for a service by name.
-     *
-     * @param name the service identifier.
-     * @return Service, the Service registered by that name
-     * @throws ServiceNotFoundException could not find the service requested
-     */
-    public Service lookupService(ID name) throws ServiceNotFoundException;
-
-    /**
-     * Lookup for a service by class ID and index in a map.
-     * <p/>
-     * More than one service in a group may be of a given ModuleClass.
-     * However each of them has a unique assigned ID which serves as the
-     * index in the map of services. In most cases, there is only one
-     * service of each given Module Class, and the ID of that Module Class
-     * is the assigned ID. Otherwise, the group may have a list of existing
-     * assigned ID per base class. This routine may be used to retrieve
-     * services of the given Module Class and index in that list.
-     * In the absence of a mapping, index 0 is still valid and
-     * corresponds to the service which assigned ID is exactly the
-     * given ID.
-     * Group objects with a map are normally wrappers tailored
-     * specially by the loader of a module (often the group itself) in order
-     * to provide a map appropriate for that module. Modules that do not use
-     * more than one service of a given base class normally never need to call
-     * this method; lookupService(ID) is equivalent to lookupService(ID, 0)
-     * and will transparently remap index 0 to whatever the group's
-     * structure defines as the default for the invoking service.
-     * <p/>
-     * Note: traditionally, the given ID is expected to be a base Module
-     * Class ID, and the assigned ID of a Module is a Class ID of the
-     * same base class with a role suffix to make it unique. If the given
-     * ID already contains a role suffix, there may exist an entry for
-     * it in the map anyway, if not (which is the expected use pattern),
-     * then only index 0 exists and the given ID is used whole and
-     * untranslated.
-     *
-     * @param name      the service identifier
-     * @param roleIndex the index in the list of assigned IDs that match
-     *                  that identifier.
-     * @return Service, the corresponding Service
-     * @throws ServiceNotFoundException Could not find the service requested.
-     * @since JXTA 2.3.1
-     */
-    public Service lookupService(ID name, int roleIndex) throws ServiceNotFoundException;
-
-    /**
-     * Returns the map of the assigned IDs currently associated with the given
-     * ModuleClassID by this PeerGroup object. The IDs are returned in the order
-     * of their index in the map. So the first ID returned will be identical to
-     * what would be returned by the lookup method for the given ID and index 0.
-     * If there is no explicit such map, this method will return a singleton
-     * containing the given ID as this is the default mapping.  There is no
-     * guarantee that any of the returned IDs correspond to an actually
-     * registered service. This method only maps IDs.
-     *
-     * @param name The ModuleClassID for which the map is desired.
-     * @return Iterator An iterator on a collection of the IDs to which the given ID maps.
-     * @since JXTA 2.3.1
-     */
-    public Iterator getRoleMap(ID name);
-
-    /**
-     * Return true if the provided compatibility statement is compatible with this group.
-     *
-     * @param compat compatibility element
-     * @return boolean True if the statement is compatible.
-     */
-    public boolean compatible(Element compat);
-
-    /**
-     * Load a Module from a ModuleImplAdv.
-     * <p/>
-     * Compatibility is checked and load is attempted. If compatible and
-     * loaded successfully, the resulting Module is initialized and returned.
-     * In most cases the other loadModule() method should be preferred, since
-     * unlike this one, it will seek many compatible implementation
-     * advertisements and try them all until one works. The home group of the new
-     * module (its' parent group if the new Module is a group) will be this group.
-     *
-     * @param assignedID Id to be assigned to that module (usually its ClassID).
-     * @param impl       An implementation advertisement for that module.
-     * @return Module the module loaded and initialized.
-     * @throws ProtocolNotSupportedException The implementation described by the
-     *                                       advertisement is incompatible with this peer. The module cannot be loaded.
-     * @throws PeerGroupException            The module could not be loaded or initialized
-     */
-    public Module loadModule(ID assignedID, Advertisement impl) throws ProtocolNotSupportedException, PeerGroupException;
-
-    /**
-     * Load a module from a ModuleSpecID
-     * <p/>
-     * Advertisement is sought, compatibility is checked on all candidates
-     * and load is attempted. The first one that is compatible and loads
-     * successfully is initialized and returned.
-     *
-     * @param assignedID Id to be assigned to that module (usually its ClassID).
-     * @param specID     The specID of this module.
-     * @param where      May be one of: {@code Here}, {@code FromParent}, or
-     *                   {@code Both}, meaning that the implementation advertisement will be
-     *                   searched in this group, its parent or both. As a general guideline, the
-     *                   implementation advertisements of a group should be searched in its
-     *                   prospective parent (that is {@code Here}), the implementation
-     *                   advertisements of a group standard service should be searched in the same
-     *                   group than where this group's advertisement was found (that is,
-     *                   {@code FromParent}), while applications may be sought more freely
-     *                   ({@code Both}).
-     * @return Module the new module, or null if no usable implementation was
-     *         found.
-     */
-    public Module loadModule(ID assignedID, ModuleSpecID specID, int where);
-
-    /**
-     * Publish this group's Peer Group Advertisement. The Advertisement will be
-     * published using the parent peer group's Discovery service.
-     * <p/>
-     * Calling this method is only useful if the group is being created
-     * from scratch and the PeerGroup advertisement has not been
-     * created beforehand. In such a case, the group has never been named or
-     * described. Therefore this information has to be supplied here.
-     *
-     * @param name        The name of this group.
-     * @param description The description of this group.
-     * @throws IOException The publication could not be accomplished
-     *                     because of a network or storage failure.
-     */
-    public void publishGroup(String name, String description) throws IOException;
-
-    /*
-     * Valuable application helpers: Various methods to instantiate
-     * groups.
-     */
-
-    /**
-     * Instantiate a peer group from the provided advertisement. This peer
-     * group will be the parent of the newly instantiated peer group.
-     * <p/>
-     * The pgAdv itself may be all new and unpublished. Therefore, the two
-     * typical uses of this routine are:
-     * <p/>
-     * <ul>
-     * <li>Creating an all new group with a new ID while using an existing
-     * and published implementation. (Possibly a new one published for
-     * that purpose). The information should first be gathered in a new
-     * PeerGroupAdvertisement which is then passed to this method.</li>
-     * <p/>
-     * <li>Instantiating a group which advertisement has already been
-     * discovered (therefore there is no need to find it by groupID
-     * again).</li>
-     * </ul>
-     *
-     * @param pgAdv The advertisement for the group to be instantiated.
-     * @return PeerGroup the initialized (but not started) peergroup.
-     * @throws PeerGroupException For problems instantiating the peer group.
-     */
-    public PeerGroup newGroup(Advertisement pgAdv) throws PeerGroupException;
-
-    /**
-     * Instantiates a peer group from its elementary pieces
-     * and publishes the corresponding PeerGroupAdvertisement.
-     * The pieces are: the groups implementation adv, the group id,
-     * the name and description.
-     * <p/>
-     * The typical use of this routine is creating a whole new group based
-     * on a newly created and possibly unpublished implementation adv.
-     * <p/>
-     * This is a convenience method equivalent to either:
-     * <p/>
-     * <pre>
-     * newGrp = thisGroup.loadModule(gid, impl);
-     * newGrp.publishGroup(name, description);
-     * </pre>
-     * or, but only if the implementation advertisement has been published:
-     * <p/>
-     * <pre>
-     * newPGAdv = AdvertisementFactory.newAdvertisement(
-     *                 PeerGroupAdvertisement.getAdvertisementType());
-     * newPGAdv.setPeerGroupID(gid);
-     * newPGAdv.setModuleSpecID(impl.getModuleSpecID());
-     * newPGAdv.setName(name);
-     * newPGAdv.setDescription(description);
-     * newGrp = thisGroup.newGroup(newPGAdv);
-     * </pre>
-     *
-     * @param gid         The ID of that group. If <code>null</code> then a new group ID
-     *                    will be chosen.
-     * @param impl        The advertisement of the implementation to be used.
-     * @param name        The name of the group.
-     * @param description A description of this group.
-     * @return PeerGroup the initialized (but not started) peergroup.
-     * @throws PeerGroupException Thrown if the group could not be instantiated.
-     */
-    public PeerGroup newGroup(PeerGroupID gid, Advertisement impl, String name, String description) throws PeerGroupException;
-
-    /**
-     * Instantiate a group from its Peer Group ID only. Use this when using a
-     * group that has already been published and discovered.
-     * <p/>
-     * The typical uses of this routine are therefore:
-     * <p/>
-     * <ul>
-     * <li>Instantiating a peer group which is assumed to exist and whose Peer
-     * Group ID is already known.</li>
-     * <p/>
-     * <li>Creating a new peer group instance using an already published
-     * Group advertisement, typically published for that purpose. All other
-     * referenced advertisements must also be available.</li>
-     * </ul>
-     * <p/>
-     * To create a group from a known implAdv, just use
-     * {@link #loadModule(ID,Advertisement)} or even:<p>
-     * <p/>
-     * <code>
-     * grp = new GroupSubClass();
-     * grp.init(parentGroup, gid, impladv);
-     * </code>
-     * <p/>
-     * then, <strong>REMEMBER TO PUBLISH THE GROUP IF IT IS ALL NEW.</strong>
-     *
-     * @param gid the groupID.
-     * @return PeerGroup the initialized (but not started) peergroup.
-     * @throws PeerGroupException Thrown if the group could not be instantiated.
-     */
-    public PeerGroup newGroup(PeerGroupID gid) throws PeerGroupException;
-
-    /*
-     * Shortcuts to the well-known services, in order to avoid calls to
-     * {@link #lookupService(ID)}.
-     */
-
-    /**
-     * Return the Rendezvous Service for this Peer Group. This service is
-     * optional and may not be present in all groups.
-     *
-     * @return The Rendezvous Service for this Peer Group or <code>null</code>
-     *         if there is no Rendezvous Service in this Peer Group.
-     */
-    public RendezVousService getRendezVousService();
-
-    /**
-     * Return the Endpoint Service for this Peer Group. This service is
-     * present in every Peer Group.
-     *
-     * @return EndpointService The Endpoint Service for this Peer Group.
-     */
-    public EndpointService getEndpointService();
-
-    /**
-     * Return the Resolver Service for this Peer Group. This service is
-     * present in every Peer Group.
-     *
-     * @return ResolverService The Resolver Service for this Peer Group.
-     */
-    public ResolverService getResolverService();
-
-    /**
-     * Return the Discovery Service for this Peer Group.
-     *
-     * @return The Discovery Service for this Peer Group or <code>null</code>
-     *         if there is no PeerInfo Service in this Peer Group.
-     */
-    public DiscoveryService getDiscoveryService();
-
-    /**
-     * Return the PeerInfo Service for this Peer Group.
-     *
-     * @return The PeerInfo Service for this Peer Group or <code>null</code>
-     *         if there is no PeerInfo Service in this Peer Group.
-     */
-    public PeerInfoService getPeerInfoService();
-
-    /**
-     * Return the Membership Service for this Peer Group. This service is
-     * present in every Peer Group.
-     *
-     * @return MembershipService The Membership Service for this Peer Group.
-     */
-    public MembershipService getMembershipService();
-
-    /**
-     * Return the Pipe Service for this Peer Group.
-     *
-     * @return The Pipe Service for this Peer Group or <code>null</code> if
-     *         there is no Pipe Service in this Peer Group.
-     */
-    public PipeService getPipeService();
-
-    /**
-     * Return the Access Service for this Peer Group. This service is
-     * present in every Peer Group.
-     *
-     * @return AccessService The Access Service for this Peer Group.
-     * @since JXTA 2.1
-     */
-    public AccessService getAccessService();
-
-    // A few convenience methods. This information is available from the peer and peergroup advertisement.
-
-    /**
-     * Return the Peer Group ID of this Peer Group.
-     *
-     * @return PeerGroupId The Peer Group ID of this Peer Group.
-     */
-    public PeerGroupID getPeerGroupID();
-
-    /**
-     * Return the Peer ID by which this Peer is known within this Peer Group.
-     *
-     * @return the Peer ID by which this Peer is known within this Peer Group.
-     */
-    public PeerID getPeerID();
-
-    /**
-     * Return the Name of this group. This name is not canonical, meaning that
-     * there may be other groups with the same name.
-     *
-     * @return String This groups's name or <code>null</code>  if no name was
-     *         specified.
-     */
-    public String getPeerGroupName();
-
-    /**
-     * Return the name of the local peer within this group. This name is not
-     * canonical, meaning that there may be other peers with the same name.
-     *
-     * @return String This peer's name or <code>null</code> if no name was
-     *         specified.
-     */
-    public String getPeerName();
-
-    /**
-     * Returns the config advertisement for this peer in this group (if any).
-     *
-     * @return The advertisement or <code>null</code> if none is available.
-     */
-    public ConfigParams getConfigAdvertisement();
-
-    /**
-     * Get an all purpose peerGroup ModuleImplAdvertisement that is compatible
-     * with this group. This impl adv can be used to create any group that
-     * relies only on the standard services. Or to derive other impl advs, using
-     * this impl advertisement as a basis.
-     * <p/>
-     * This defines a peergroup implementation that can be used for
-     * many purposes, and from which one may derive slightly different
-     * peergroup implementations.
-     * <p/>
-     * This definition is always the same and has a well known ModuleSpecID.
-     * It includes the basic service, no protocols and the shell for main
-     * application.
-     * <p/>
-     * The user must remember to change the specID if the set of services
-     * protocols or applications is altered before use.
-     *
-     * @return ModuleImplAdvertisement The new peergroup impl adv.
-     * @throws Exception if an error occurs while creating the implementation advertisement
-     */
-    public ModuleImplAdvertisement getAllPurposePeerGroupImplAdvertisement() throws Exception;
-
-    /**
-     * Explicitly notifies a group interface that it will no-longer be
-     * used (similar to dispose). Does nothing to a real group object,
-     * only has an effect on a group interface.
-     */
-    public void unref();
-
-    /**
-     * Returns a weak interface object that represents this
-     * group.
-     * <p/>
-     * A weak interface object has no life-cycle privileges over
-     * the group that it represents and therefore its users have
-     * no accountability. A weak interface object is safe to
-     * give away but holds no promise of sustained validity.
-     * <p/>
-     * Whatever code gave away a weak interface object retains
-     * the power of terminating the group object from which it
-     * was obtained, thereby making the weak interface
-     * object invalid.
-     * <p/>
-     * A weak interface object is immutable; its unref and stopApp
-     * methods do nothing. Its validity is exactly that of the
-     * group or interface object from which it was obtained.
-     * <p/>
-     * A weak interface object can be obtained from an interface
-     * object, or from a real group object, or from a weak interface
-     * object. In the later case, the object returned may be
-     * the original weak interface object since such objects
-     * are immutable.
-     * <p/>
-     * Whatever code obtains a weak interface object from a group object
-     * or regular interface object, remains entirely liable for invoking unref
-     * on the initial object before discarding it. Giving away a weak interface
-     * object is not equivalent to transferring ownership of the original.
-     *
-     * @return PeerGroup A weak interface object that represents this
-     *         PeerGroup object.
-     * @since JXTA 2.2
-     */
-    public PeerGroup getWeakInterface();
-
-    /**
-     * Returns the parent group of this group. Not all groups have parents and
-     * some implementations may not reveal their parents.
-     *
-     * @return PeerGroup the parent group or <code>null</code> if a parent group
-     *         if not available.
-     * @since JXTA 2.3
-     */
-    public PeerGroup getParentGroup();
-
-    /**
-     * Returns the location of the parent of all items that this peer group is
-     * using for persistently storing its preferences, cache, persistent store,
-     * properties, etc. May be {@code null} if the peergroup has no defined
-     * location for storing persistent data.
-     *
-     * @return The location of the parent of all persistent items stored by
-     *         this peer group.
-     * @since JXTA 2.3.7
-     */
-    public URI getStoreHome();    
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peergroup/PeerGroupFactory.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peergroup/PeerGroupFactory.java
deleted file mode 100644 (file)
index bc182e5..0000000
+++ /dev/null
@@ -1,577 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.peergroup;
-
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.exception.ConfiguratorException;
-import net.jxta.exception.JxtaError;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.id.ID;
-import net.jxta.logging.Logging;
-import net.jxta.protocol.ConfigParams;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URI;
-import java.net.URLConnection;
-import java.util.MissingResourceException;
-import java.util.PropertyResourceBundle;
-import java.util.ResourceBundle;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * A factory for instantiating the JXTA core peer groups.
- * <p/>
- * JXTA comes with two peergroup implementations:
- * <p/>
- * <dl>
- * <DT><strong>Platform</strong></DT>
- * <DD>Implements the world peer group. Every peer starts by instantiating this
- * peer group and then other peer groups are instantiated as needed. The World
- * Peer Group's ID is invariant.
- * <p/>
- * The world peer group provides the minimum core services needed to find
- * and instantiate other groups on a peer. The <strong>Platform</strong>
- * implementation will assign a new ID to the peer, if it does not already have
- * one.</DD>
- * <p/>
- * <DT><strong>StdPeergroup</strong></DT>
- * <DD>This is currently used to implement all other kinds of peer groups.
- * The first such peer group that it is instantiated after starting is known as
- * <em>The Net Peer Group</em>. When the <strong>Platform</strong> starts it may
- * optionally search for <em>The Net Peer Group</em> on the local network and,
- * if found, instantiate it. Otherwise a default built-in configuration of
- * <em>The Net Peer Group</em> is instantiated.
- * <p/>
- * A non-default configuration of <em>The Net Peer Group</em> may be set-up
- * by the administrator in charge of the network domain inside which the peer
- * is starting. <em>The Net Peer Group</em> is discovered via the Discovery
- * protocol. Many such groups may be configured by an administrator.<br>
- * <p/>
- * <strong>StdPeergroup</strong> may also be used to implement User-defined
- * peer groups--Users can create new peer groups which use their own set of
- * customized services.</DD>
- * </dl>
- *
- * @see net.jxta.peergroup.PeerGroup
- * @deprecated This factory has been deprecated in favour of {@link WorldPeerGroupFactory}
- *             and {@link NetPeerGroupFactory}. See the deprecations for the individual
- *             methods for the specific replacements/alternatives provided by the new
- *             factory classes.
- */
-@Deprecated
-public final class PeerGroupFactory {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(PeerGroupFactory.class.getName());
-
-    /**
-     * Constant for specifying no configurator. This configurator provides no
-     * configuration actions but does ensure that a valid configuration exists
-     * at the specified location.
-     */
-    public final static Class NULL_CONFIGURATOR = net.jxta.impl.peergroup.NullConfigurator.class;
-
-    /**
-     * Constant for specifying the default configurator. Currently this is the
-     * familiar AWT-based dialogue but in future is likely to become the
-     * UI-less automatic configurator.
-     */
-    public final static Class DEFAULT_CONFIGURATOR = net.jxta.impl.peergroup.DefaultConfigurator.class;
-
-    /**
-     * The class which will be instantiated as the World Peer Group.
-     */
-    private static Class worldGroupClass = null;
-
-    /**
-     * The ID of the network peer group.
-     */
-    private static PeerGroupID netPGID = null;
-
-    /**
-     * The name of the network peer group.
-     */
-    private static String netPGName = null;
-
-    /**
-     * The description of the network peer group.
-     */
-    private static String netPGDesc = null;
-
-    /**
-     * The class which will be instantiated to configure the World Peer
-     * Group.
-     */
-    private static Class configurator = DEFAULT_CONFIGURATOR;
-
-    /**
-     * the location which will serve as the parent for all stored items used
-     * by JXTA.
-     */
-    private static URI storeHome = null;
-
-    /**
-     * Static Method to initialize the world peer group class.
-     *
-     * @param c The Class which will be instantiated for the World Peer Group
-     * @deprecated Consider converting to use {@link WorldPeerGroupFactory#WorldPeerGroupFactory(Class,ConfigParams,URI)}.
-     */
-    @Deprecated
-    public static void setPlatformClass(Class c) {
-        worldGroupClass = c;
-    }
-
-    /**
-     * Static Method to initialize the std peer group class.
-     *
-     * @param c The Class which will be instantiated for most peer groups.
-     * @deprecated This method previously had no effect and has been removed with no alternatives.
-     */
-    @Deprecated
-    public static void setStdPeerGroupClass(Class c) {
-        throw new UnsupportedOperationException("This feature has been removed. (sorry)");
-    }
-
-    /**
-     * Sets the description which will be used for new net peer group instances.
-     *
-     * @param desc The description which will be used for new net peer group instances.
-     * @deprecated Consider converting to use {@link NetPeerGroupFactory#NetPeerGroupFactory(ConfigParams,URI,ID,String,XMLElement)}
-     *             or {@link NetPeerGroupFactory#NetPeerGroupFactory(PeerGroup,ID,String,XMLElement)}.
-     */
-    @Deprecated
-    public static void setNetPGDesc(String desc) {
-        netPGDesc = desc;
-    }
-
-    /**
-     * Sets the name which will be used for new net peer group instances.
-     *
-     * @param name The name which will be used for new net peer group instances.
-     * @deprecated Consider converting to use {@link NetPeerGroupFactory#NetPeerGroupFactory(ConfigParams,URI,ID,String,XMLElement)}
-     *             or {@link NetPeerGroupFactory#NetPeerGroupFactory(PeerGroup,ID,String,XMLElement)}.
-     */
-    @Deprecated
-    public static void setNetPGName(String name) {
-        netPGName = name;
-    }
-
-    /**
-     * Sets the ID which will be used for new net peer group instances.
-     *
-     * @param id The ID which will be used for new net peer group instances.
-     * @deprecated Consider converting to use {@link NetPeerGroupFactory#NetPeerGroupFactory(ConfigParams,URI,ID,String,XMLElement)}
-     *             or {@link NetPeerGroupFactory#NetPeerGroupFactory(PeerGroup,ID,String,XMLElement)}.
-     */
-    @Deprecated
-    public static void setNetPGID(PeerGroupID id) {
-        netPGID = id;
-    }
-
-    /**
-     * Get the optional configurator class for the world peer group.
-     *
-     * @return Class configurator class
-     * @deprecated Consider converting to use {@link NetPeerGroupFactory}.
-     */
-    @Deprecated
-    public static Class getConfiguratorClass() {
-        return configurator;
-    }
-
-    /**
-     * Set the optional configurator class for the World Peer Group. If present
-     * an instance of this class will be used to generate/update the
-     * configuration parameters for the World Peer Group whenever
-     * {@code newPlatform()} is invoked.
-     * <p/>
-     * All configuration actions for the World Peer Group may be completely
-     * disabled by specify {@code null} as the configurator class. The default
-     * configuration class is always initialized to {@code DEFAULT_CONFIGURATOR}.
-     *
-     * @param c The {@code Class} to use as a configurator for the World Peer
-     *          Group.
-     * @deprecated Consider converting to use {@link NetPeerGroupFactory} and/or {@link WorldPeerGroupFactory}.
-     */
-    @Deprecated
-    public static void setConfiguratorClass(Class c) {
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Setting configurator class to : " + c);
-        }
-
-        configurator = c;
-    }
-
-    /**
-     * Returns the location which will serve as the parent for all stored items
-     * used by JXTA. This method is intended for use by PeerGroup implementations
-     * and is not intended for use by applications. Applications and services
-     * should use the PeerGroup method with the same name.
-     *
-     * @return The location which will serve as the parent for all stored
-     *         items used by JXTA.
-     * @see PeerGroup#getStoreHome()
-     * @deprecated Consider converting to use {@link NetPeerGroupFactory} and/or {@link WorldPeerGroupFactory}.
-     */
-    @Deprecated
-    public static URI getStoreHome() {
-        if (null == storeHome) {
-            // Establish the default store location via long established hackery.
-            String jxta_path = System.getProperty("JXTA_HOME", ".jxta/");
-
-            File jxta_home = new File(jxta_path);
-
-            jxta_home.mkdirs();
-            URI defaultHome = jxta_home.toURI();
-
-            return defaultHome;
-        }
-
-        return storeHome;
-    }
-
-    /**
-     * Set the location which will serve as the parent for all stored items used by JXTA.
-     *
-     * @param newHome The absolute URI location which will serve as the parent
-     *                for all stored items used by JXTA. Currently this must be a non-opaque URI.
-     *                May also be {@code null} to restore the default value.
-     * @deprecated Consider converting to use {@link NetPeerGroupFactory} and/or {@link WorldPeerGroupFactory}.
-     */
-    @Deprecated
-    public static void setStoreHome(URI newHome) {
-
-        if (null != newHome) {
-            // Fail if the URI is not absolute.
-            if (!newHome.isAbsolute()) {
-                throw new IllegalArgumentException("Only absolute URIs accepted for store home location.");
-            }
-
-            // Fail if the URI is Opaque.
-            if (newHome.isOpaque()) {
-                throw new IllegalArgumentException("Only hierarchical URIs accepted for store home location.");
-            }
-
-            // Add a trailing slash if necessary. 
-            if (!newHome.toString().endsWith("/")) {
-                newHome = URI.create(newHome.toString() + "/");
-            }
-        }
-
-        storeHome = newHome;
-    }
-
-    /**
-     * Static Method to create a new peer group instance.
-     * <p/>
-     * After being created the init() method needs to be called, and
-     * the startApp() method may be called, at the invoker's discretion.
-     *
-     * @return PeerGroup instance of a new PeerGroup
-     * @deprecated This method was previously unused and has been removed with no alternatives. (it wasn't useful)
-     */
-    @Deprecated
-    public static PeerGroup newPeerGroup() {
-        throw new UnsupportedOperationException("This feature has been removed. (sorry)");
-    }
-
-    /**
-     * Instantiates the World (Platform) Peer Group and can also optionally
-     * (re)configure the world peer group before instantiation using the
-     * configurator specified via {@link #setConfiguratorClass(Class)}.
-     * <p/>
-     * Only one instance of  the World Peer Group may be created within the
-     * context of the {@code PeerGroupFactory}'s class loader. Invoking this
-     * method amounts to creating an instance of JXTA.
-     * <p/>
-     * The {@link PeerGroup#init(PeerGroup,ID,Advertisement)} method is
-     * called automatically. The {@link PeerGroup#startApp(String[])} method
-     * is left for the invoker to call if appropriate.
-     *
-     * @return PeerGroup The World Peer Group instance.
-     * @throws JxtaError Thrown for all checked Exceptions which occur during
-     *                   construction of the World Peer Group.
-     * @deprecated Consider converting to use {@link WorldPeerGroupFactory#WorldPeerGroupFactory()}.
-     */
-    @Deprecated
-    public static PeerGroup newPlatform() {
-
-        Class c = PeerGroupFactory.getConfiguratorClass();
-
-        if (null == c) {
-            c = NULL_CONFIGURATOR;
-        }
-
-        Configurator configurator;
-
-        try {
-            Constructor config_constructor = c.getConstructor(URI.class);
-
-            configurator = (Configurator) config_constructor.newInstance(getStoreHome());
-        } catch (InvocationTargetException ie) {
-            LOG.log(Level.SEVERE, "Uninstantiatable configurator: " + c, ie);
-
-            throw new JxtaError("Uninstantiatable configurator: " + c, ie);
-        } catch (NoSuchMethodException ie) {
-            LOG.log(Level.SEVERE, "Uninstantiatable configurator: " + c, ie);
-
-            throw new JxtaError("Uninstantiatable configurator: " + c, ie);
-        } catch (InstantiationException ie) {
-            LOG.log(Level.SEVERE, "Uninstantiatable configurator: " + c, ie);
-
-            throw new JxtaError("Uninstantiatable configurator: " + c, ie);
-        } catch (IllegalAccessException iae) {
-            LOG.log(Level.SEVERE, "can\'t instantiate configurator: " + c, iae);
-
-            throw new JxtaError("Can't instantiate configurator: " + c, iae);
-        } catch (ClassCastException cce) {
-            LOG.log(Level.SEVERE, "Not a Configurator :" + c, cce);
-
-            throw new JxtaError("Not a Configurator :" + c, cce);
-        }
-
-        ConfigParams pc;
-
-        try {
-            pc = configurator.getConfigParams();
-        } catch (ConfiguratorException cce) {
-            LOG.log(Level.SEVERE, "Could not retrieve configuration", cce);
-
-            throw new JxtaError("Could not retrieve configuration", cce);
-        }
-
-        try {
-            WorldPeerGroupFactory wpgf;
-
-            if (null == worldGroupClass) {
-                wpgf = new WorldPeerGroupFactory(pc, getStoreHome());
-            } else {
-                wpgf = new WorldPeerGroupFactory(worldGroupClass, pc, getStoreHome());
-            }
-
-            configurator.setConfigParams(pc);
-            configurator.save();
-
-            // Forget about the configurator
-            configurator = null;
-
-            return wpgf.getInterface();
-        } catch (RuntimeException e) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "newPlatform failed", e);
-            }
-            // rethrow
-            throw e;
-        } catch (Exception e) {
-            // should be all other checked exceptions
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "newPlatform failed", e);
-            }
-
-            // Simplify exception scheme for caller: any sort of problem wrapped
-            // in a PeerGroupException.
-            throw new JxtaError("newPlatform failed", e);
-        } catch (Error e) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "newPlatform failed", e);
-            }
-            // rethrow
-            throw e;
-        }
-    }
-
-    /**
-     * Instantiates the net peer group using the provided parent peer group.
-     *
-     * @param ppg The parent group.
-     * @return PeerGroup The default netPeerGroup
-     * @throws PeerGroupException For failures in constructing the Net Peer Group.
-     * @deprecated Consider converting to use {@link NetPeerGroupFactory#NetPeerGroupFactory(PeerGroup,ID,String,XMLElement)}.
-     */
-    @Deprecated
-    public static PeerGroup newNetPeerGroup(PeerGroup ppg) throws PeerGroupException {
-
-        try {
-            NetPeerGroupFactory npgf;
-
-            NetPeerGroupFactory.NetGroupTunables tunables;
-
-            if (null == netPGID) {
-                // Determine net peer group configuration parameters if they
-                // have not already been set.
-                tunables = new NetPeerGroupFactory.NetGroupTunables(ResourceBundle.getBundle("net.jxta.impl.config")
-                        ,
-                        new NetPeerGroupFactory.NetGroupTunables());
-
-                // load overides from "${JXTA_HOME}config.properties".
-                URI configPropertiesLocation = getStoreHome().resolve("config.properties");
-
-                try {
-                    URLConnection configProperties = configPropertiesLocation.toURL().openConnection();
-
-                    ResourceBundle rsrcs = new PropertyResourceBundle(configProperties.getInputStream());
-
-                    tunables = new NetPeerGroupFactory.NetGroupTunables(rsrcs, tunables);
-
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Loaded defaults from " + rsrcs);
-                    }
-                } catch (MissingResourceException ignored) {
-                    ;
-                } catch (IOException ignored) {
-                    ;
-                } catch (Exception ignored) {
-                    ;
-                }
-            } else {
-                tunables = new NetPeerGroupFactory.NetGroupTunables(netPGID, netPGName
-                        ,
-                        (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "desc", netPGDesc));
-            }
-
-            npgf = new NetPeerGroupFactory(ppg, tunables.id, tunables.name, tunables.desc);
-
-            PeerGroup newPg = npgf.getInterface();
-
-            return newPg;
-        } catch (PeerGroupException failed) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "newNetPeerGroup failed", failed);
-            }
-            // rethrow
-            throw failed;
-        } catch (RuntimeException e) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "newNetPeerGroup failed", e);
-            }
-            // rethrow
-            throw e;
-        } catch (Exception e) {
-            // should be all other checked exceptions
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "newNetPeerGroup failed", e);
-            }
-            // Simplify exception scheme for caller: any sort of problem wrapped
-            // in a PeerGroupException.
-            throw new PeerGroupException("newNetPeerGroup failed", e);
-        } catch (Error e) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "newNetPeerGroup failed", e);
-            }
-
-            // rethrow
-            throw e;
-        }
-    }
-
-    /**
-     * Instantiates the World Peer Group and then instantiates the Net Peer
-     * Group. This simplifies the method by which applications can start JXTA.
-     *
-     * @return The newly instantiated Net Peer Group.
-     * @deprecated Consider converting to use {@link NetPeerGroupFactory#NetPeerGroupFactory()}
-     *             or preferably one of the other {@code NetPeerGroupFactory} constructors.
-     */
-    @Deprecated
-    public static PeerGroup newNetPeerGroup() throws PeerGroupException {
-        // get/create the World Peer Group.
-        PeerGroup wpg = getWorldPeerGroup();
-
-        try {
-            PeerGroup npg = newNetPeerGroup(wpg);
-
-            return npg;
-        } finally {
-            wpg.unref();
-        }
-    }
-
-    /**
-     * Retrieves or constructs a new World Peer Group instance suitable for
-     * use as the parent for Net Peer Group instances. This implementation
-     * makes an important trade-off worth noting; it will use an existing
-     * world peer group instance if available and ignore any changes which have
-     * been made to the static configuration methods provided by this class.
-     *
-     * @return The World Peer Group.
-     * @throws PeerGroupException For failures in recovering the World Peer Group.
-     */
-    private static PeerGroup getWorldPeerGroup() throws PeerGroupException {
-        synchronized (PeerGroup.globalRegistry) {
-            PeerGroup result = PeerGroup.globalRegistry.lookupInstance(PeerGroupID.worldPeerGroupID);
-
-            if (null != result) {
-                return result;
-            }
-
-            return newPlatform();
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peergroup/PeerGroupID.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peergroup/PeerGroupID.java
deleted file mode 100644 (file)
index 5835fff..0000000
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.peergroup;
-
-
-import java.net.URI;
-
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-
-
-/**
- *  This class implements a PeerGroup ID. Each peer group is assigned a
- *  unique id.
- *
- *  @see         net.jxta.id.ID
- *  @see         net.jxta.id.IDFactory
- *  @see         net.jxta.peer.PeerID
- *
- * @since JXTA 1.0
- */
-public abstract class PeerGroupID extends ID {
-    
-    /**
-     * Creates an ID by parsing the given URI.
-     *
-     * <p>This convenience factory method works as if by invoking the
-     * {@link net.jxta.id.IDFactory#fromURI(URI)} method; any 
-     * {@link java.net.URISyntaxException} thrown is caught and wrapped in a 
-     * new {@link IllegalArgumentException} object, which is then thrown.  
-     *
-     * <p> This method is provided for use in situations where it is known that
-     * the given string is a legal ID, for example for ID constants declared
-     * within in a program, and so it would be considered a programming error
-     * for the URI not to parse as such.  The {@link net.jxta.id.IDFactory}, 
-     * which throws {@link java.net.URISyntaxException} directly, should be used 
-     * situations where a ID is being constructed from user input or from some 
-     * other source that may be prone to errors. 
-     *
-     * @param  fromURI   The URI to be parsed into an ID
-     * @return The new ID
-     *
-     * @throws  NullPointerException If {@code fromURI} is {@code null}.
-     * @throws  IllegalArgumentException If the given URI is not a valid ID.
-     */
-    public static PeerGroupID create(URI fromURI) {
-        return (PeerGroupID) ID.create(fromURI);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public PeerGroupID intern() {
-        return (PeerGroupID) super.intern();
-    }
-    
-    /**
-     * The well known Unique Identifier of the world peergroup.
-     * This is a singleton within the scope of a VM.
-     */
-    public final static PeerGroupID worldPeerGroupID = (new WorldPeerGroupID()).intern();
-    
-    /**
-     * The well known Unique Identifier of the net peergroup.
-     * This is a singleton within the scope of this VM.
-     */
-    public final static PeerGroupID defaultNetPeerGroupID = (new NetPeerGroupID()).intern();
-    
-    /**
-     *  Returns the parent peer group id of this peer group id, if any.
-     *
-     *  @return the id of the parent peergroup or null if this group has no
-     *  parent group.
-     */
-    public abstract PeerGroupID getParentPeerGroupID();
-}
-
-
-final class WorldPeerGroupID extends PeerGroupID {
-    
-    /**
-     * The name associated with this ID Format.
-     */
-    final static String JXTAFormat = "jxta";
-    
-    private static final String UNIQUEVALUE = "WorldGroup";
-    
-    /**
-     *  WorldPeerGroupID is not intended to be constructed. You should use the 
-     *  {@link PeerGroupID.worldPeerGroupID} constant instead.
-     */
-    WorldPeerGroupID() {}
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {
-        return (this == target); // worldPeerGroupID is only itself.
-    }
-    
-    /**
-     * deserialization has to point back to the singleton in this VM
-     */
-    private Object readResolve() {
-        return PeerGroupID.worldPeerGroupID;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public String getIDFormat() {
-        return JXTAFormat;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public Object getUniqueValue() {
-        return getIDFormat() + "-" + UNIQUEVALUE;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public PeerGroupID getParentPeerGroupID() {
-        return null;
-    }
-}
-
-
-final class NetPeerGroupID extends PeerGroupID {
-
-    /**
-     * The name associated with this ID Format.
-     */
-    final static String JXTAFormat = "jxta";
-    
-    private static final String UNIQUEVALUE = "NetGroup";
-    
-    /**
-     *  NetPeerGroupID is not intended to be constructed. You should use the 
-     *  {@link PeerGroupID.defaultNetPeerGroupID} constant instead.
-     */
-    NetPeerGroupID() {}
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {
-        return (this == target); // netPeerGroupID is only itself.
-    }
-    
-    /**
-     * deserialization has to point back to the singleton in this VM
-     */
-    private Object readResolve() {
-        return PeerGroupID.defaultNetPeerGroupID;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public String getIDFormat() {
-        return JXTAFormat;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public Object getUniqueValue() {
-        return getIDFormat() + "-" + UNIQUEVALUE;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public PeerGroupID getParentPeerGroupID() {
-        return PeerGroupID.worldPeerGroupID;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peergroup/WorldPeerGroupFactory.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peergroup/WorldPeerGroupFactory.java
deleted file mode 100644 (file)
index a8cac02..0000000
+++ /dev/null
@@ -1,339 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.peergroup;
-
-
-import net.jxta.exception.ConfiguratorException;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.logging.Logging;
-import net.jxta.protocol.ConfigParams;
-
-import java.io.File;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URI;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import net.jxta.platform.JxtaLoader;
-import net.jxta.protocol.ModuleImplAdvertisement;
-
-
-/**
- * A factory for instantiating the World Peer Group. Every peer starts by
- * instantiating the World Peer Group and then other Peer Groups are
- * instantiated as needed. Most applications do not need to use 
- * {@code WorldPeerGroupFactory} but should instead prefer using
- * {@code NetPeerGroupFactory} whenever possible.
- * <p/>
- * The World Peer Group provides the minimum core services needed to find
- * and instantiate other Peer Groups on a peer. The World Peer Group is the
- * primordial peer group upon which all other peer groups are instantiated. The
- * World Peer Group is primarily responsible for management of physical network
- * connections, physical network discovery (generally broadcast) and physical
- * network topology management.
- * <p/>
- * Applications generally do not normally interact directly with the World Peer 
- * Group. The World Peer Group includes only limited endpoint, resolver, 
- * discovery and rendezvous services. 
- * <p/>
- * When the <strong>World Peer Group</strong> starts it may optionally search
- * for <em>The Network Peer Group</em> on the local network and, if found, 
- * instantiate it. Otherwise a default built-in configuration of <em>The Net 
- * Peer Group</em> is instantiated.
- *
- * @since JXTA JSE 2.4
- *
- * @see net.jxta.peergroup.PeerGroup
- * @see net.jxta.peergroup.NetPeerGroupFactory
- */
-public final class WorldPeerGroupFactory {
-    
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(WorldPeerGroupFactory.class.getName());
-    
-    /**
-     * Our strong reference to the World Peer Group.
-     */
-    private final PeerGroup world;
-    
-    /**
-     * Provided for backwards compatibility, this constructor instantiates the
-     * World Peer Group using the PlatformConfig file found in the directory
-     * specified by the {@code JXTA_HOME} system property or the "{@code .jxta/}"
-     * directory if {@code JXTA_HOME} is not defined.
-     * <p/>
-     * Though not deprecated this method should be considered as sample
-     * code only and the other constructors should be used whenever possible.
-     *
-     * @throws PeerGroupException Thrown for problems construction the World
-     * Peer Group.
-     */
-    public WorldPeerGroupFactory() throws PeerGroupException {
-        // Establish the default store location via long established hackery.
-        String jxta_home = System.getProperty("JXTA_HOME", ".jxta/");
-        
-        // ensure that it ends in a seperator.
-        if (!jxta_home.endsWith(File.separator)) {
-            jxta_home += File.separator;
-        }
-        
-        File jxta_home_dir = new File(jxta_home);
-        
-        // Ensure the homedir exists.
-        if (!jxta_home_dir.exists()) {
-            jxta_home_dir.mkdirs();
-        }
-        
-        URI storeHome = jxta_home_dir.toURI();
-        
-        // Instantiate the default configurator. Do not do this in your own code!
-        try {
-            Configurator configurator = new net.jxta.impl.peergroup.DefaultConfigurator(storeHome);
-            // Get (and possibly generate) the platform configuration.
-            ConfigParams config = configurator.getConfigParams();
-            
-            world = newWorldPeerGroup(getDefaultWorldPeerGroupClass(), config, storeHome);
-            
-            // persist any changes which were made to the platform config by
-            // service initialization.
-            configurator.setConfigParams(config);
-            configurator.save();
-        } catch (ConfiguratorException configFailure) {
-            LOG.severe("Failure while managing World Peer Group configuration");
-            
-            throw new PeerGroupException("Failure while managing World Peer Group configuration", configFailure);
-        }
-    }
-    
-    /**
-     * Constructs the World Peer Group using the specified configuration and
-     * using the specified storeHome location for persistence.
-     *
-     * @param config The configuration to use for the World Peer Group.
-     * @param storeHome The optional location that the World Peer Group and its'
-     * services should use for storing persistent and transient information.
-     * May be <tt>null</tt> if the World Peer Group is not provided a
-     * persistent store (though this not currently supported).
-     * @throws PeerGroupException Thrown for problems constructing the World
-     * Peer Group.
-     */
-    public WorldPeerGroupFactory(ConfigParams config, URI storeHome) throws PeerGroupException {
-        
-        world = newWorldPeerGroup(getDefaultWorldPeerGroupClass(), config, storeHome);
-    }
-    
-    /**
-     * Constructs the World Peer Group using the specified configuration and
-     * using the specified storeHome location for persistence.
-     *
-     * @param worldPeerGroupClass The class which will be instantiated for the
-     * World Peer Group instance.
-     * @param config The configuration to use for the World Peer Group.
-     * @param storeHome The optional location that the World Peer Group and its'
-     * services should use for storing persistent and transient information.
-     * May be <tt>null</tt> if the World Peer Group is not provided a
-     * persistent store (though this not currently supported).
-     * @throws PeerGroupException Thrown for problems constructing the World
-     * Peer Group.
-     */
-    public WorldPeerGroupFactory(Class worldPeerGroupClass, ConfigParams config, URI storeHome) throws PeerGroupException {
-        
-        world = newWorldPeerGroup(worldPeerGroupClass, config, storeHome);
-    }
-    
-    /**
-     * Returns a strong (reference counted) interface object for the World Peer
-     * Group. This reference should be explicitly unreferenced when it is no
-     * longer needed.
-     *
-     * @return A strong (reference counted) interface object for the World Peer 
-     * Group.
-     * @see PeerGroup#unref()
-     */
-    public PeerGroup getInterface() {
-        return (PeerGroup) world.getInterface();
-    }
-    
-    /**
-     * Returns a weak (non-reference counted) interface object for the World
-     * Peer Group.
-     *
-     * @return A weak (non-reference counted) interface object for the World
-     * Peer Group.
-     * @see PeerGroup#getWeakInterface()
-     */
-    public PeerGroup getWeakInterface() {
-        return world.getWeakInterface();
-    }
-    
-    /**
-     * Determine the class to use for the World PeeerGroup. 
-     *
-     * @return The Class which has been configured to be used for
-     * World Peer Group instances.
-     * @throws PeerGroupException Thrown for problems determining the class to
-     * be used for the World Peer Group.
-     */
-    private static Class getDefaultWorldPeerGroupClass() throws PeerGroupException {
-            
-        try {
-            // XXX 20070713 bondolo Temporary hack to resolve class load order issue. StdPeerGroup is responsible for initializing standard modules.
-            String unused = net.jxta.impl.peergroup.StdPeerGroup.STD_COMPAT.toString();
-            
-            JxtaLoader loader = net.jxta.impl.peergroup.GenericPeerGroup.getJxtaLoader();
-            
-            ModuleImplAdvertisement worldGroupImplAdv = loader.findModuleImplAdvertisement(PeerGroup.refPlatformSpecID);
-            
-            if(null == worldGroupImplAdv) {
-                throw new PeerGroupException("Could not locate World PeerGroup Module Implementation.");
-            }
-            
-            return Class.forName(worldGroupImplAdv.getCode());
-        } catch (RuntimeException failed) {
-            throw new PeerGroupException("Could not load World PeerGroup class.", failed);
-        } catch (ClassNotFoundException failed) {
-            throw new PeerGroupException("Could not load World PeerGroup class.", failed);
-        }
-    }
-    
-    /**
-     * Constructs the World Peer Group instance.
-     *
-     * @param worldPeerGroupClass The class which will be instantiated for the
-     * World Peer Group instance.
-     * @param config The configuration to use for the World Peer Group.
-     * @param storeHome The optional location the World Peer Group and its'
-     * services may use for storing persistent and transient information.
-     * May be {@code null} if the World Peer Group is not provided a
-     * persistent store (though this not currently supported).
-     * @throws PeerGroupException Thrown for problems constructing the World
-     * Peer Group.
-     * @return the WorldPeerGroup
-     */
-    private PeerGroup newWorldPeerGroup(Class worldPeerGroupClass, ConfigParams config, URI storeHome) throws PeerGroupException {
-        if (!storeHome.isAbsolute()) {
-            LOG.severe("storeHome must be an absolute URI.");
-            throw new PeerGroupException("storeHome must be an absolute URI.");
-        }
-
-        if (storeHome.isOpaque()) {
-            LOG.severe("Opaque storeHome is not currently supported.");
-            throw new PeerGroupException("Opaque storeHome is not currently supported.");
-        }
-            
-        synchronized (PeerGroup.globalRegistry) {
-            if (PeerGroup.globalRegistry.registeredInstance(PeerGroupID.worldPeerGroupID)) {
-                throw new PeerGroupException( "Only a single instance of the World Peer Group may be instantiated at a single time.");
-            }
-            
-            PeerGroup result = null;
-            
-            try {
-                if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                    LOG.info("Making a new World Peer Group instance using : " + worldPeerGroupClass.getName());
-                }
-                
-                Constructor<PeerGroup> twoParams = (Constructor<PeerGroup>) worldPeerGroupClass.getConstructor(ConfigParams.class,URI.class);
-                
-                try {
-                    result = twoParams.newInstance(config, storeHome);
-                } catch (InvocationTargetException failure) {
-                    // unwrap the real exception.
-                    Throwable cause = failure.getCause();
-                    
-                    if (cause instanceof Exception) {
-                        throw (Exception) cause;
-                    } else if (cause instanceof Error) {
-                        throw (Error) cause;
-                    } else {
-                        // just rethrow what we already had. sigh.
-                        throw failure;
-                    }
-                }
-                
-                result.init(null, PeerGroupID.worldPeerGroupID, null);
-                
-                return result;
-            } catch (RuntimeException e) {
-                // should be all other checked exceptions
-                LOG.log(Level.SEVERE, "World Peer Group could not be instantiated.", e);
-                
-                // cleanup broken instance
-                if (null != result) {
-                    result.unref();
-                }
-                
-                // just rethrow.
-                throw e;
-            } catch (Exception e) {
-                // should be all other checked exceptions
-                LOG.log(Level.SEVERE, "World Peer Group could not be instantiated.", e);
-                
-                // cleanup broken instance
-                if (null != result) {
-                    result.unref();
-                }
-                
-                // Simplify exception scheme for caller: any sort of problem wrapped
-                // in a PeerGroupException.
-                throw new PeerGroupException("World Peer Group could not be instantiated.", e);
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peergroup/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/peergroup/package.html
deleted file mode 100644 (file)
index 155ccd1..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    Peer groups are formed as a collection of peers that have agreed upon a 
-    common set of services. The {@link net.jxta.peergroup.PeerGroup} interface presents the
-    API of those services and encapsulates the group's identity and the local 
-    peer's identity in that group.
-    
-    <p/>A group is instantiated on a peer by instantiating the group class
-    specified by the group definition and initializing the resulting object
-    with the parameters specified by the group definition.
-    
-    <p/>A group may be, and often is, defined and instantiated within the 
-    context of another group referred to as its parent group. In that case an
-    appropriate and initialized {@link net.jxta.peergroup.PeerGroup} object, 
-    that represents that group may be obtained from the parent group by using 
-    one of the parent's {@link net.jxta.peergroup.PeerGroup#newGroup newGroup} 
-    methods.
-    
-    <p/>All peers start with instantiating one well known root group
-    (which has no parent) known as the <em>World Peer Group</em>. It is created
-    by calling {@link net.jxta.peergroup.PeerGroupFactory#newPlatform()}.
-    
-    <p/>The <em>World Peer Group</em> has a limited set of functionality. Most 
-    peers chose to instantiate early on another well known group known as the 
-    <em>Net Peer Group</em> and to use it as the root of the other groups they 
-    create.
-    
-    <p/>An object representing the <em>Net Peer Group</em> may be obtained from 
-    the {@link net.jxta.peergroup.PeerGroupFactory} by invoking the method 
-    {@link net.jxta.peergroup.PeerGroupFactory#newNetPeerGroup()}. This method
-    invokes {@link net.jxta.peergroup.PeerGroupFactory#newPlatform()} 
-    automatically, so if an application wants to use the <em>Net Peer Group</em> 
-    as its root group, invoking 
-    {@link net.jxta.peergroup.PeerGroupFactory#newNetPeerGroup()} is all that is
-    required.
-    
-    <p/>All other groups should be created or instantiated within the context of
-    already instantiated groups by using one of the
-    {@link net.jxta.peergroup.PeerGroup#newGroup newGroup} methods.
-    
-    <p/>It is possible to change the identity, name, and description of the
-    group that {@link net.jxta.peergroup.PeerGroupFactory#newNetPeerGroup()} 
-    instantiates by setting the following properties in the file 
-    <code>config.properties</code> (all three must be specified for the setting 
-    to take effect):
-    <ul>
-      <li><code>NetPeerGroupID</code></li>
-      <li><code>NetPeerGroupName</code></li>
-      <li><code>NetPeerGroupDesc</code></li>
-    </ul>
-    The same result may be obtained by invoking the following 
-    {@link net.jxta.peergroup.PeerGroupFactory} static methods:
-    <ul>
-      <li>{@link net.jxta.peergroup.PeerGroupFactory#setNetPGID}</li>
-      <li>{@link net.jxta.peergroup.PeerGroupFactory#setNetPGName}</li>
-      <li>{@link net.jxta.peergroup.PeerGroupFactory#setNetPGDesc}</li>
-    </ul>
-    
-    <p/>It is also possible to create arbitrary subgroups of the <em>World Peer
-    Group</em> programatically by first starting the <em>World Peer Group</em>
-    and applying one of the 
-    {@link net.jxta.peergroup.PeerGroup#newGroup newGroup} methods of the 
-    resulting <tt>PeerGroup</tt> object. An example of creating multiple
-    infrastructure peer groups.
-    {@link <a href="http://platform.jxta.org/source/browse/platform/www/java/tutorial/examples/dualInfra/">Dual Infrastructure Group Tutorial</a>}
-      
-      
-      @see net.jxta.peergroup.PeerGroup
-      @see net.jxta.peergroup.PeerGroupFactory
-      @see net.jxta.protocol.PeerGroupAdvertisement
-      @see net.jxta.protocol.PeerAdvertisement
-      @see net.jxta.id.ID
-      @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#overview-peergroups">JXTA Protocols Specification : Peer Groups</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/InputPipe.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/InputPipe.java
deleted file mode 100644 (file)
index 2e20ff4..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.pipe;
-
-
-import net.jxta.id.ID;
-import net.jxta.endpoint.Message;
-import net.jxta.protocol.PipeAdvertisement;
-
-
-/**
- * InputPipe defines the interface for receiving messages from a
- * {@link net.jxta.pipe.PipeService}.
- *
- * <p/>An application that wants to receive messages from a Pipe will create
- * an input pipe.
- *
- * <p/>An InputPipe is created and returned by the
- * {@link net.jxta.pipe.PipeService}
- *
- * @see    net.jxta.pipe.PipeService
- * @see    net.jxta.pipe.OutputPipe
- * @see    net.jxta.endpoint.Message
- * @see    net.jxta.endpoint.MessageElement
- * @see    net.jxta.protocol.PipeAdvertisement
- */
-public interface InputPipe {
-
-    /**
-     * Wait (block) for a message to be received.
-     *
-     * @return                           a message or null if the pipe has been closed.
-     * @exception  InterruptedException  If another thread interrupted while we
-     * were waiting for a message.
-     */
-    public Message waitForMessage() throws InterruptedException;
-
-    /**
-     * Poll for a message from the pipe. If there is no message immediately
-     * available then wait the specified amount of time for a message to arrive.
-     *
-     * @param  timeout                Maximum number of milliseconds to wait (block) for a
-     *  message to be received. If zero then wait indefinitely for a message.
-     * @return                        Message received or null if the pipe has closed or the timeout
-     * expired without a message being received.
-     * @throws  InterruptedException  If another thread interrupted while we
-     * were waiting for a message.
-     */
-    public Message poll(int timeout) throws InterruptedException;
-
-    /**
-     * Close the pipe. No additional messages will be received on this pipe.
-     */
-    public void close();
-
-    /**
-     *  Gets the pipe type
-     *
-     * @return    The type
-     */
-    public String getType();
-
-    /**
-     *  Gets the pipe id
-     *
-     * @return    The type
-     */
-    public ID getPipeID();
-
-    /**
-     *  Gets the pipe name
-     *
-     * @return    The name
-     */
-    public String getName();
-
-    /**
-     *  Gets the pipe advertisement
-     *
-     * @return    The advertisement
-     */
-    public PipeAdvertisement getAdvertisement();
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/OutputPipe.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/OutputPipe.java
deleted file mode 100644 (file)
index 6a8b25f..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.pipe;
-
-
-import java.io.IOException;
-
-import net.jxta.endpoint.Message;
-import net.jxta.id.ID;
-import net.jxta.protocol.PipeAdvertisement;
-
-
-/**
- * OuputPipe defines the interface for sending messages from a
- * {@link net.jxta.pipe.PipeService}.
- *
- * <p/>Application that want to send messages onto a Pipe must fist get
- * an {@link net.jxta.pipe.OutputPipe} from the {@link net.jxta.pipe.PipeService}.
- *
- * @see net.jxta.pipe.PipeService
- * @see net.jxta.pipe.InputPipe
- * @see net.jxta.endpoint.Message
- * @see net.jxta.protocol.PipeAdvertisement
- */
-
-public interface OutputPipe {
-    
-    /**
-     * Send a message through the pipe
-     *
-     * <p/><b>WARNING:</b> The message object used when sending a pipe message
-     * should not be reused or modified after the {@link #send(Message)} call is
-     * made. Concurrent modification of messages will produce unexpected result.
-     *
-     * @param msg is the PipeMessage to be sent.
-     * @return boolean <code>true</code> if the message has been sent otherwise
-     * <code>false</code>. <code>false</code>. is commonly returned for
-     * non-error related congestion, meaning that you should be able to send
-     * the message after waiting some amount of time.
-     * @exception IOException output pipe error
-     *
-     */
-    public boolean send(Message msg) throws IOException;
-    
-    /**
-     * close the pipe
-     *
-     */
-    public void close();
-    
-    /**
-     *  Returns <code>true</code> if this pipe is closed and no longer
-     *  accepting messages to be sent. The pipe should be discarded.
-     *
-     *  @return <code>true</code> if this pipe is closed, otherwise
-     *  <code>false</code>.
-     */
-    boolean isClosed();
-    
-    /**
-     *  Gets the pipe type
-     *
-     * @return    The type
-     */
-    public String getType();
-    
-    /**
-     *  Gets the pipe id
-     *
-     * @return    The type
-     */
-    public ID getPipeID();
-    
-    /**
-     *  Gets the pipe name
-     *
-     * @return    The name
-     */
-    public String getName();
-    
-    /**
-     *  Gets the pipe advertisement
-     *
-     * @return    The advertisement
-     */
-    public PipeAdvertisement getAdvertisement();
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/OutputPipeEvent.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/OutputPipeEvent.java
deleted file mode 100644 (file)
index 7c5c1cd..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- *  Copyright (c) 2001-2006 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.pipe;
-
-
-import java.util.EventObject;
-
-
-/**
- *  Container for OutputPipeEvent events.
- */
-public class OutputPipeEvent extends EventObject {
-
-    private OutputPipe outputpipe;
-
-    private String pipeID;
-
-    private int queryID;
-
-    /**
-     *  Creates a new event
-     *
-     * @param  source      The PipeService which created this event.
-     * @param  outputpipe  the outputpipe object
-     * @param  pipeID      URI containing the Pipe unique identifier.
-     * @param  queryID     The query id associated with the response returned in this event
-     */
-    public OutputPipeEvent(Object source, OutputPipe outputpipe, String pipeID, int queryID) {
-
-        super(source);
-
-        this.outputpipe = outputpipe;
-        this.pipeID = pipeID;
-        this.queryID = queryID;
-    }
-
-    /**
-     *  Returns the output associated with the event
-     *
-     * @return    OutPutPipe
-     */
-    public OutputPipe getOutputPipe() {
-        return outputpipe;
-    }
-
-    /**
-     *  Returns The pipe id associated with this output pipe event
-     *
-     * @return    pipe id associated with this output pipe event
-     */
-    public String getPipeID() {
-        return pipeID;
-    }
-
-    /**
-     *  Returns The query id associated with the response returned in this event
-     *
-     * @return    query id associated with the response
-     */
-    public int getQueryID() {
-        return queryID;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/OutputPipeListener.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/OutputPipeListener.java
deleted file mode 100644 (file)
index a5705c1..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.pipe;
-
-
-import java.util.EventListener;
-
-
-/**
- *  The listener interface for receiving {@link net.jxta.pipe.OutputPipe}
- *  resolution events.
- *
- *  The following example illustrates how to implement a
- *  {@link net.jxta.pipe.OutputPipeListener}:
- *
- *  <p/><code><pre>
- *     public class MyService implements OutputPipeListener {
- *        ..
- *        ..
- *        pipe.createOutputPipe(pipeAdv, this);
- *        ..
- *        ..
- *        public void outputPipeEvent(OutputPipeEvent event) {
- *
- *        OutputPipe op = event.getOutputPipe();
- *        }
- *    }
- * </pre></code>
- */
-public interface OutputPipeListener extends EventListener {
-
-    /**
-     * Called when a input pipe has been located for a previously registered
-     * pipe. The event contains an {@link net.jxta.pipe.OutputPipe} which can
-     * be used to communicate with the remote peer.
-     *
-     * @param  event  the event
-     */
-    void outputPipeEvent(OutputPipeEvent event);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/PipeID.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/PipeID.java
deleted file mode 100644 (file)
index 579249f..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.pipe;
-
-
-import java.net.URI;
-import net.jxta.id.ID;
-
-
-/**
- * This class implements a Pipe ID. Each pipe is assigned a unique id.
- *
- * @see net.jxta.id.ID
- * @see net.jxta.id.IDFactory
- * @see net.jxta.peergroup.PeerGroupID
- * @see net.jxta.pipe.PipeService
- * @see net.jxta.protocol.PipeAdvertisement
- */
-public abstract class PipeID extends ID {
-
-    /**
-     * Creates an ID by parsing the given URI.
-     *
-     * <p>This convenience factory method works as if by invoking the
-     * {@link net.jxta.id.IDFactory#fromURI(URI)} method; any 
-     * {@link java.net.URISyntaxException} thrown is caught and wrapped in a 
-     * new {@link IllegalArgumentException} object, which is then thrown.  
-     *
-     * <p> This method is provided for use in situations where it is known that
-     * the given string is a legal ID, for example for ID constants declared
-     * within in a program, and so it would be considered a programming error
-     * for the URI not to parse as such.  The {@link net.jxta.id.IDFactory}, 
-     * which throws {@link java.net.URISyntaxException} directly, should be used 
-     * situations where a ID is being constructed from user input or from some 
-     * other source that may be prone to errors. 
-     *
-     * @param  fromURI   The URI to be parsed into an ID
-     * @return The new ID
-     *
-     * @throws  NullPointerException If {@code fromURI} is {@code null}.
-     * @throws  IllegalArgumentException If the given URI is not a valid ID.
-     */
-    public static PipeID create(URI fromURI) {
-        return (PipeID) ID.create(fromURI);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public PipeID intern() {
-        return (PipeID) super.intern();
-    }
-    
-    /**
-     *  Returns PeerGroupID of the Peer Group to which this Pipe ID belongs.
-     *
-     * @return The PeerGroupID of the Peer Group to which this Pipe ID belongs.
-     */
-    public abstract ID getPeerGroupID();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/PipeMsgEvent.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/PipeMsgEvent.java
deleted file mode 100644 (file)
index 67eba55..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.pipe;
-
-
-import java.util.EventObject;
-import net.jxta.endpoint.Message;
-
-
-/**
- *  Container for Pipe Message events.
- */
-public class PipeMsgEvent extends EventObject {
-
-    /**
-     *  The received Message
-     */
-    private final Message message;
-
-    /**
-     *  Pipe ID of the pipe on which the message was received.
-     */
-    private final PipeID pipeID;
-
-    /**
-     *  Creates a new event
-     *
-     * @param  source   The PipeObject on which the message was received.
-     * @param  message  the message object
-     * @param  pipeID   the pipe id of the pipe on which the message was received.
-     */
-    public PipeMsgEvent(Object source, Message message, PipeID pipeID) {
-        super(source);
-
-        this.message = message;
-
-        this.pipeID = pipeID;
-    }
-
-    /**
-     *  Returns the message associated with the event
-     *
-     * @return    message
-     */
-    public Message getMessage() {
-        return message;
-    }
-
-    /**
-     *  Returns the pipeID associated with the event
-     *
-     * @return    pipeID
-     */
-    public PipeID getPipeID() {
-        return pipeID;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/PipeMsgListener.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/PipeMsgListener.java
deleted file mode 100644 (file)
index 90b157e..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.pipe;
-
-
-import java.util.EventListener;
-
-
-/**
- *  The listener interface for receiving {@link net.jxta.pipe.PipeMsgEvent}
- *  events.
- *
- *  The following example illustrates how to implement a {@link net.jxta.pipe.PipeMsgListener}:
- *<pre><tt>
- * PipeMsgListener myListener = new PipeMsgListener() {
- *
- *   public void pipeMsgEvent(PipeMsgEvent event) {
- *     Message msg=null;
- *     try {
- *       msg = event.getMessage();
- *     } catch (Exception e) {
- *       e.printStackTrace();
- *       return;
- *     }
- *   }
- * }
- *
- * InputPipe pipeIn = pipe.createInputPipe(pipeAdv, myListener);
- * *</tt></pre>
- */
-public interface PipeMsgListener extends EventListener {
-
-    /**
-     * Called for each pipe message event that occurs.
-     *
-     * @param  event  The event being received.
-     */
-    void pipeMsgEvent(PipeMsgEvent event);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/PipeService.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/PipeService.java
deleted file mode 100644 (file)
index e4e1518..0000000
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- *  Copyright (c) 2001-2006 Sun Microsystems, Inc. All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.pipe;
-
-
-import java.io.IOException;
-import java.util.Set;
-
-import net.jxta.id.ID;
-import net.jxta.protocol.PipeAdvertisement;
-import net.jxta.service.Service;
-
-
-/**
- *  Pipes are the core mechanism for exchanging messages between JXTA
- *  applications or services.
- *
- *  <p/>Pipes are uniquely identified by a
- *  {@link net.jxta.protocol.PipeAdvertisement} which is associated with each
- *  pipe.
- *
- *  <p/>Several types of Pipe can currently be used:
- *
- *  <ul>
- *      <li><tt>JxtaUnicast</tt> - unicast, unreliable and unsecured pipe
- *      <li><tt>JxtaUnicastSecure</tt> - unicast and secure pipe
- *      <li><tt>JxtaPropagate</tt> - propagated, unreliable and unsecured pipe
- *  </ul>
- *
- *  <p/>The type of a Pipe is defined when creating its
- *  {@link net.jxta.protocol.PipeAdvertisement}.
- *
- *  @see net.jxta.protocol.PipeAdvertisement
- *  @see net.jxta.pipe.InputPipe
- *  @see net.jxta.pipe.OutputPipe
- *  @see net.jxta.endpoint.Message
- *  @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#overview-pipes" target='_blank'>JXTA Protocols Specification : Pipes</a>
- *  @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-pbp" target='_blank'>JXTA Protocols Specification : Pipe Binding Protocol</a>
- */
-public interface PipeService extends Service {
-
-    /**
-     * Unicast, unreliable and unsecured type of Pipe
-     */
-    public final static String UnicastType = "JxtaUnicast";
-
-    /**
-     * Propagated, unsecured and unreliable type of Pipe
-     */
-    public final static String PropagateType = "JxtaPropagate";
-
-    /**
-     * End-to-end secured unicast pipe of Pipe
-     */
-    public final static String UnicastSecureType = "JxtaUnicastSecure";
-
-    /**
-     * Create an InputPipe from a pipe Advertisement
-     *
-     * @param adv The advertisement of the Pipe.
-     * @return The InputPipe created.
-     * @throws IOException  error creating input pipe
-     */
-    public InputPipe createInputPipe(PipeAdvertisement adv) throws IOException;
-
-    /**
-     * Create an InputPipe from a pipe Advertisement
-     *
-     * @param adv is the advertisement of the Pipe.
-     * @param listener PipeMsgListener to receive msgs.
-     * @return InputPipe The InputPipe created.
-     * @throws IOException Error creating input pipe
-     */
-    public InputPipe createInputPipe(PipeAdvertisement adv, PipeMsgListener listener) throws IOException;
-
-    /**
-     * Attempt to create an OutputPipe using the specified Pipe Advertisement.
-     * The pipe will be be resolved within the provided timeout.
-     *
-     * @param pipeAdv The advertisement of the pipe being resolved.
-     * @param timeout Time duration in milliseconds to wait for a successful
-     * pipe resolution. <tt>0</tt> will wait indefinitely.
-     * @return OutputPipe the successfully resolved OutputPipe.
-     * @throws IOException  If the pipe cannot be created or failed to resolve
-     * within the specified time.
-     */
-    public OutputPipe createOutputPipe(PipeAdvertisement pipeAdv, long timeout) throws IOException;
-
-    /**
-     * Attempt to create an OutputPipe using the specified Pipe Advertisement.
-     * The pipe will be be resolved to one of the peers in the set of peer ids
-     * provided within the provided timeout.
-     *
-     * @param pipeAdv The advertisement of the pipe being resolved.
-     * @param resolvablePeers The peers on which the pipe may be resolved.
-     * <strong>If the Set is empty then the pipe may be resolved to any 
-     * destination peer.</strong>
-     * @param timeout Time duration in milliseconds to wait for a successful
-     * pipe resolution. <tt>0</tt> will wait indefinitely.
-     * @return The successfully resolved OutputPipe.
-     * @throws IOException If the pipe cannot be created or failed to resolve
-     * within the specified time.
-     */
-    public OutputPipe createOutputPipe(PipeAdvertisement pipeAdv, Set<? extends ID> resolvablePeers, long timeout) throws IOException;
-
-    /**
-     * Attempt to create an OutputPipe using the specified Pipe Advertisement.
-     * The pipe may be resolved to any destination peer. When the pipe is
-     * resolved the listener will be called.
-     *
-     * @param pipeAdv The advertisement of the pipe being resolved.
-     * @param listener The listener to be called when the pipe is resolved.
-     * @throws IOException If the pipe cannot be created.
-     */
-    public void createOutputPipe(PipeAdvertisement pipeAdv, OutputPipeListener listener) throws IOException;
-
-    /**
-     * Attempt to create an OutputPipe using the specified Pipe Advertisement.
-     * When the pipe is resolved to one of the peers in the set of peer ids
-     * provided the listener will be called.
-     *
-     * @param pipeAdv The advertisement of the pipe being resolved.
-     * @param resolvablePeers The set of peers on which the pipe may be resolved.
-     * <strong>If the Set is empty then the pipe may be resolved to any 
-     * destination peer.</strong>
-     * @param listener the listener to be called when the pipe is resolved.
-     * @throws IOException  If the pipe cannot be created.
-     */
-    public void createOutputPipe(PipeAdvertisement pipeAdv, Set<? extends ID> resolvablePeers, OutputPipeListener listener) throws IOException;
-
-    /**
-     *  Remove an OutputPipeListener previously registered with
-     *  <code>createOuputputPipe</code>.
-     *
-     * @deprecated This method is being replaced by {@link #removeOutputPipeListener(ID,OutputPipeListener)}.
-     *
-     * @param pipeID The pipe who's listener is to be removed.
-     * @param listener The listener to remove.
-     * @return The listener which was removed or null if the key did not have a mapping.
-     */
-    @Deprecated
-    public OutputPipeListener removeOutputPipeListener(String pipeID, OutputPipeListener listener);
-
-    /**
-     *  Remove an OutputPipeListener previously registered with
-     *  <code>createOuputputPipe</code>.
-     *
-     * @param pipeID The pipe who's listener is to be removed.
-     * @param listener The listener to remove.
-     * @return The listener which was removed or null if the key did not have a mapping.
-     */
-    public OutputPipeListener removeOutputPipeListener(ID pipeID, OutputPipeListener listener);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/pipe/package.html
deleted file mode 100644 (file)
index 6c508fb..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    Pipes are the core mechanism for exchanging messages between JXTA 
-                               applications or services.
-                               
-                               @see net.jxta.protocol.PipeAdvertisement
-                               @see net.jxta.pipe.PipeService
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#overview-pipes" target='_blank'>JXTA Protocols Specification : Pipes</a>
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-pbp" target='_blank'>JXTA Protocols Specification : Pipe Binding Protocol</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/platform/Application.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/platform/Application.java
deleted file mode 100644 (file)
index 17d3ae2..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.platform;
-
-
-/**
- * This interface defines a JXTA peer group application.
- * That is a class of Module suitable for loading as the main application
- * of a group, or which may be loaded by a group while not being a service.
- *
- * For now, it is a plain Module.
- */
-
-public interface Application extends Module {}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/platform/JxtaLoader.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/platform/JxtaLoader.java
deleted file mode 100644 (file)
index 5d03795..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.platform;
-
-
-import java.net.URL;
-import java.net.URLClassLoader;
-
-import net.jxta.protocol.ModuleImplAdvertisement;
-
-
-/**
- * A ClassLoader which provides additional JXTA functionality. You can load
- * classes by ModuleSpecID. Classes are defined with ModuleImplAdvertisements
- * and class loading will determine suitability using the provided
- * compatibility statements.
- */
-public abstract class JxtaLoader extends URLClassLoader {
-    
-    /**
-     *  Construct a new loader with the specified parent loader and
-     *
-     *  @param parent  the parent class loader for delegation.
-     */
-    public JxtaLoader(ClassLoader parent) {
-        this(new URL[0], parent);
-    }
-    
-    /**
-     * Construct a new loader for the specified URLS with the specified parent
-     * loader.
-     *
-     *  @param urls  the URLs from which to load classes and resources.
-     *  @param parent  the parent class loader for delegation.
-     */
-    public JxtaLoader(URL[] urls, ClassLoader parent) {
-        super(urls, parent);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public void addURL(URL url) {
-        super.addURL(url);
-    }
-    
-    /**
-     * Finds and loads the class with the specified spec ID from the URL search
-     * path. Any URLs referring to JAR files are loaded and opened as needed
-     * until the class is found.
-     *
-     *  @param spec the specid of the class to load.
-     *  @throws ClassNotFoundException if the class could not be found.
-     *  @return the resulting class.
-     */
-    public abstract Class<? extends Module> findClass(ModuleSpecID spec) throws ClassNotFoundException;
-    
-    /**
-     *  Loads the class with the specified spec ID from the URL search
-     *  path.
-     *
-     *  @param spec the specid of the class to load.
-     *  @throws ClassNotFoundException if the class could not be found.
-     *  @return the resulting class.
-     */
-    public abstract Class<? extends Module> loadClass(ModuleSpecID spec) throws ClassNotFoundException;
-    
-    /**
-     *  Defines a new class from a Module Impl Advertisement.
-     *
-     *  @param impl The moduleImplAdvertisement containing the class 
-     *  specification
-     *  @return The Class object that was created from the specified class data.
-     */
-    public abstract Class<? extends Module> defineClass(ModuleImplAdvertisement impl);
-
-    /**
-     *  Finds the ModuleImplAdvertisement for the associated class in the
-     *  context of this ClassLoader.
-     *
-     *  @param clazz The class who's ModuleImplAdvertisement is desired.
-     *  @return The matching {@code ModuleImplAdvertisement} otherwise
-     *  {@code null} if there is no known association.
-     */
-    public abstract ModuleImplAdvertisement findModuleImplAdvertisement(Class<? extends Module> clazz);
-
-    /**
-     *  Finds the ModuleImplAdvertisement for the associated class in the 
-     *  context of this ClassLoader.
-     *
-     *  @param msid The module spec id who's ModuleImplAdvertisement is desired.
-     *  @return The matching {@code ModuleImplAdvertisement} otherwise
-     *  {@code null} if there is no known association.
-     */
-    public abstract ModuleImplAdvertisement findModuleImplAdvertisement(ModuleSpecID msid);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/platform/Module.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/platform/Module.java
deleted file mode 100644 (file)
index 67ffaaf..0000000
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.platform;
-
-
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.document.Advertisement;
-import net.jxta.id.ID;
-import net.jxta.exception.PeerGroupException;
-
-
-/**
- * Defines the interface for modules loaded by PeerGroups. Message transports,
- * services and applications need to implement this interface if they are
- * to be loaded and started by a PeerGroup. Service and Application extend
- * Module, PeerGroup implements Service and ShellApp implements Application, as
- * a result both implement Module.
- *
- * <p/>Jxta Modules are given their initialization parameters via the init()
- * method rather than a non-default constructor.
- *
- * <p/>Modules are passed the peer group within which they are created.
- * From the peergroup object, Modules can access all the peer group
- * services. The PeerGroup within which a PeerGroup runs is known as its
- * parent.
- *
- * <p/>The initial root peer group is known as the World Peer Group and is
- * implemented by an object of class Platform, a subclass of PeerGroup.
- * The "parent" PeerGroup of the World Peer Group is null.
- *
- * @see net.jxta.protocol.ModuleImplAdvertisement
- * @see net.jxta.platform.ModuleClassID
- * @see net.jxta.peergroup.PeerGroup
- * @see net.jxta.document.Advertisement
- * @see net.jxta.id.ID
- * @see net.jxta.platform.Application
- * @see net.jxta.service.Service
- **/
-public interface Module {
-    
-    /**
-     * <code>startApp()</code> completed successfully. This module claims to now
-     * be fully functional and no further invocation of startApp is required.
-     **/
-    public static final int START_OK = 0;
-    
-    /**
-     * This is to be used mostly by co-dependent services when started as
-     * a set (such as {@link PeerGroup} services) so that their
-     * <code>startApp()</code> method may be invoked multiple times.
-     *
-     * <p/>This value indicates that startApp must be retried later in order for
-     * this module to become fully functional. However, some progress in
-     * functionality was accomplished.
-     *
-     * <p/>This is a strong indication that some other modules may be able
-     * to advance or complete their initialization if their
-     * <code>startApp()</code> method is invoked again.
-     *
-     * <p/>The distinction between START_AGAIN_STALLED and START_AGAIN_PROGRESS
-     * is only a hint. Each module makes an arbitrary judgment in this
-     * respect. It is up to the invoker of startApp to ensure that the
-     * starting of a set of modules eventually succeeds or fails.
-     **/
-    public static final int START_AGAIN_PROGRESS = 1;
-    
-    /**
-     * This is to be used mostly by co-dependent services when started as
-     * a set (such as {@link PeerGroup} services) so that their startApp
-     * method may be invoked multiple times.
-     *
-     * <p/>This value indicates that startApp must be retried later in order for
-     * this module to become fully functional. However, some progress in
-     * functionality was accomplished.
-     *
-     * <p/>If all modules in a set return this value, it is a strong indication
-     * that the modules co-dependency is such that it prevents them
-     * collectively from starting.
-     *
-     * <p/>The distinction between START_AGAIN_STALLED and START_AGAIN_PROGRESS
-     * is only a hint. Each module makes an arbitrary judgment in this
-     * respect. It is up to the invoker of startApp to ensure that the
-     * starting of a set of modules eventually succeeds or fails.
-     **/
-    public static final int START_AGAIN_STALLED = 2;
-        
-    /**
-     * This return result is used to indicate that the module refuses to start
-     * because it has been configured to be disabled or otherwise cannot run
-     * (missing hardware, missing system resources, etc.) The module will not be
-     * functional and should be discarded but the failure to load may be ignored 
-     * by the loader at it's discretion.
-     */
-    public static final int START_DISABLED = Integer.MIN_VALUE + 100;
-    
-    /**
-     * Initialize the module, passing it its peer group and advertisement.
-     *
-     * <p/>Note: when subclassing one of the existing PeerGroup implementations
-     * (which implement Module), it may not be recommended to overload the init
-     * method. See the documentation of the PeerGroup class being subclassed.
-     *
-     *  @param group The PeerGroup from which this Module can obtain services.
-     *  If this module is a Service, this is also the PeerGroup of which this
-     *  module is a service.
-     *
-     *  @param assignedID Identity of Module within group.
-     *  modules can use it as a the root of their namespace to create
-     *  names that are unique within the group but predictable by the
-     *  same module on another peer. This is normally the ModuleClassID
-     *  which is also the name under which the module is known by other
-     *  modules. For a group it is the PeerGroupID itself.
-     *  The parameters of a service, in the Peer configuration, are indexed
-     *  by the assignedID of that service, and a Service must publish its
-     *  run-time parameters in the Peer Advertisement under its assigned ID.
-     *
-     *  @param implAdv The implementation advertisement for this
-     *  Module. It is permissible to pass null if no implementation
-     *  advertisement is available. This may happen if the
-     *  implementation was selected by explicit class name rather than
-     *  by following an implementation advertisement. Modules are not
-     *  required to support that style of loading, but if they do, then
-     *  their documentation should mention it.
-     *
-     *  @exception PeerGroupException This module failed to initialize.
-     **/
-    public void init(PeerGroup group, ID assignedID, Advertisement implAdv) throws PeerGroupException;
-    
-    /**
-     * Complete any remaining initialization of the module. The module should
-     * be fully functional after <code>startApp()</code> is completed. That is
-     * also the opportunity to supply arbitrary arguments (mostly to
-     * applications).
-     *
-     * <p/>If this module is a {@link PeerGroup} service, it may be invoked
-     * several times depending on its return value.
-     *
-     * @param args An array of Strings forming the parameters for this
-     * Module.
-     *
-     * @return int A status indication which may be one of
-     * {@link #START_OK}, {@link #START_AGAIN_PROGRESS},
-     * {@link #START_AGAIN_STALLED}, which indicates partial or complete
-     * success, or any other value (negative values are
-     * recommended for future compatibility), which indicates failure.
-     **/
-    public int startApp(String[] args);
-    
-    /**
-     *  Stop a module. This may be called any time after <code>init()</code>
-     *  completes and should not assume that <code>startApp()</code> has been
-     *  called or completed.
-     *
-     *  <p/>The Module cannot be forced to comply, but in the future
-     *  we might be able to deny it access to anything after some timeout.
-     **/
-    public void stopApp();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/platform/ModuleClassID.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/platform/ModuleClassID.java
deleted file mode 100644 (file)
index 97d3503..0000000
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.platform;
-
-
-import java.net.URI;
-import net.jxta.id.ID;
-
-
-/**
- * A ModuleClassID uniquely identifies a particular local behaviour, that is,
- * a specific API for each execution environment for which an implementation
- * exists.
- *
- * <p/>A ModuleClassID has two components: A base class identifier, and a role identifier.
- * The role identifier may be zero. By convention the API uses the ModuleClassID with
- * a zero role identifier to designate the base class in contexts where only the base class
- * is significant. Nonetheless, a ModuleClassID with a zero role identifier is a valid
- * ModulesClassID wherever a full ModuleClassID is expected. In many cases, only one role
- * in a given class is ever used. Using role zero in such cases is an optimization because
- * it may make the string representation of the ModuleClassID shorter.
- *
- * <p/>Each service of a group, that is, the role it plays in the group, is uniquely identified
- * per the group definition.
- * This identifier may be used by other modules in the group to designate this one, or by the service
- * itself to identify its parameters in a PeerAdvertisement. In addition, by combining its
- * PeerGroupID with its own ModuleClassID, a service may create a predictible identifier unique
- * on their peer, suitable for registering listeners with the EndpointService or other services
- * with similar listener interfaces.
- *
- * <p/>The standard PeerGroup implementation of the java reference implementation
- * assigns to each service its ModuleClassID as its unique service identifier. Most of the
- * times this ModuleClassID is a base classID, but groups that use the same Module Class
- * for more than one service (same behaviour but playing a different role in the group, such
- * as, for example, a data base engine with a different data base), may define multiple roles
- * identified by the same base class identifier but different role identifiers. The standard
- * PeerGroup implementation of the java reference implementation has the notion of main
- * application: a default application which may be started automatically upon instantiating
- * the group. This application implements Module and, therefore, is assigned a ModuleClassID.
- * However applications are not expected to play any specific role in the group. As a result, they
- * are assigned a role identifier allocated at run-time as need to garantee local unicity. As
- * a result main applications cannot expect a predictible ClassID.
- *
- * <p/>A ModuleClassID is optionaly described by a published ModuleClassAdvertisement.
- *
- * <p/>There may be any number of embodiements of a module class. These are module
- * specifications. A module specification represent the network behaviour of a
- * module while its class represents its local behaviour. Different groups
- * may use a common subset of classes, for example, the basic set defined by the platform
- * should always be part of it. Each group may use different and network-incompatible
- * specifications for common classes, optimized for various purposes. The local API of a
- * given class on a given JXTA implementation will be invariant per the spec being used.
- * Therefore, the difference will be transparent to applications which do not depend
- * on the possibly different quality of service.
- *
- * <p/>A ModuleSpecID embeds a base class identifier, which permits to verify that
- * a given Module specification is suitable for its intended use.
- *
- * @see net.jxta.peergroup.PeerGroup
- * @see net.jxta.platform.Module
- * @see net.jxta.platform.ModuleClassID
- * @see net.jxta.protocol.PeerAdvertisement
- * @see net.jxta.protocol.ModuleSpecAdvertisement
- * @see net.jxta.protocol.ModuleClassAdvertisement
- * @see net.jxta.endpoint.EndpointService
- * @see net.jxta.id.ID
- *
- */
-public abstract class ModuleClassID extends ID {
-
-    /**
-     * Creates an ID by parsing the given URI.
-     *
-     * <p>This convenience factory method works as if by invoking the
-     * {@link net.jxta.id.IDFactory#fromURI(URI)} method; any 
-     * {@link java.net.URISyntaxException} thrown is caught and wrapped in a 
-     * new {@link IllegalArgumentException} object, which is then thrown.  
-     *
-     * <p> This method is provided for use in situations where it is known that
-     * the given string is a legal ID, for example for ID constants declared
-     * within in a program, and so it would be considered a programming error
-     * for the URI not to parse as such.  The {@link net.jxta.id.IDFactory}, 
-     * which throws {@link java.net.URISyntaxException} directly, should be used 
-     * situations where a ID is being constructed from user input or from some 
-     * other source that may be prone to errors. 
-     *
-     * @param  fromURI   The URI to be parsed into an ID
-     * @return The new ID
-     *
-     * @throws  NullPointerException If {@code fromURI} is {@code null}.
-     * @throws  IllegalArgumentException If the given URI is not a valid ID.
-     */
-    public static ModuleClassID create(URI fromURI) {
-        return (ModuleClassID) ID.create(fromURI);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public ModuleClassID intern() {
-        return (ModuleClassID) super.intern();
-    }
-    
-    /**
-     * Returns true if this ModuleClassID is of the same base class than the
-     * given class.
-     * Note: This method is NOT named "isOfClass" because a ModuleClassID
-     * may have two UUID; one that denotes a "base" class proper,
-     * and an optional second one that denotes a "Role", or subclass.
-     * Compatibility between ClassIDs is based on the "base" portion, hence the
-     * "isOfSame" naming. This routine can be used for comparison with a base class
-     * since a base class is just a class which role portion happens to be zero.
-     *
-     * @param id Module class id to compare with
-     * @return boolean true if equals
-     */
-    
-    public abstract boolean isOfSameBaseClass(ModuleClassID id);
-
-    /**
-     * Returns true if this ModuleClassID is of the same class than the
-     * the given ModuleSpecID.
-     *
-     * @param id Module spec id to compare with
-     * @return boolean true if equals
-     */
-    
-    public abstract boolean isOfSameBaseClass(ModuleSpecID id);
-
-    /**
-     * Return a ModuleClassID of the same base class but with the role portion
-     * set to zero. aka "the base class".
-     *
-     * @return ModuleClassID the base class.
-     */
-    public abstract ModuleClassID getBaseClass();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/platform/ModuleSpecID.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/platform/ModuleSpecID.java
deleted file mode 100644 (file)
index bfca655..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.platform;
-
-
-import java.net.URI;
-import net.jxta.id.ID;
-
-
-/**
- * A ModuleSpecID uniquely identifies a particular network behaviour
- * (wire protocol and choregraphy) that may be embodied by a Jxta Module.
- * There may be any number of implementations of a given SpecID. All
- * such implementations are assumed to be network compatible.
- *
- * <p>
- * The Specification that corresponds to a given ModuleSpecID may be published
- * in a ModuleSpecAdvertisement. This advertisement is uniquely identified by
- * the ModuleSpecID that it describes.
- *
- * <p>
- * The various implementations of a given SpecID may be published in
- * ModuleImplAdvertisements. These advertisements are identified by the
- * ModuleSpecID that they implement and a compatibility statement.
- * ModuleImplAdvertisements baring the same SpecID and compatibility statement
- * are theorethicaly interchangeable. However they may be subsequently discriminated
- * by a Description element.
- *
- * <p>
- * A ModuleSpecID embeds a ModuleClassID which uniquely identifies a base Module
- * class. A base module class defines a local behaviour and one API per compatible
- * JXTA implementation.
- * 
- * <p>
- * A ModuleSpecID therefore uniquely identifies an abstract module, of which an
- * implementation compatible with the local JXTA implementation may be located and
- * instantiated.
- *
- * <p>
- * In the standard PeerGroup implementation of the java reference implementation
- * the various services are specified as a list of ModuleSpecID, for each of which
- * the group locates and loads an implementation as part of the group's
- * initialization.
- *
- * @see net.jxta.peergroup.PeerGroup
- * @see net.jxta.platform.Module
- * @see net.jxta.platform.ModuleClassID
- * @see net.jxta.protocol.ModuleSpecAdvertisement
- * @see net.jxta.protocol.ModuleImplAdvertisement
- * @see net.jxta.id.ID
- * @see net.jxta.document.Advertisement
- *
- */
-
-public abstract class ModuleSpecID extends ID {
-
-    /**
-     * Creates an ID by parsing the given URI.
-     *
-     * <p>This convenience factory method works as if by invoking the
-     * {@link net.jxta.id.IDFactory#fromURI(URI)} method; any 
-     * {@link java.net.URISyntaxException} thrown is caught and wrapped in a 
-     * new {@link IllegalArgumentException} object, which is then thrown.  
-     *
-     * <p> This method is provided for use in situations where it is known that
-     * the given string is a legal ID, for example for ID constants declared
-     * within in a program, and so it would be considered a programming error
-     * for the URI not to parse as such.  The {@link net.jxta.id.IDFactory}, 
-     * which throws {@link java.net.URISyntaxException} directly, should be used 
-     * situations where a ID is being constructed from user input or from some 
-     * other source that may be prone to errors. 
-     *
-     * @param  fromURI   The URI to be parsed into an ID
-     * @return The new ID
-     *
-     * @throws  NullPointerException If {@code fromURI} is {@code null}.
-     * @throws  IllegalArgumentException If the given URI is not a valid ID.
-     */
-    public static ModuleSpecID create(URI fromURI) {
-        return (ModuleSpecID) ID.create(fromURI);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public ModuleSpecID intern() {
-        return (ModuleSpecID) super.intern();
-    }
-    
-    /**
-     * Returns true if this ModuleSpecID is of the same base class than the
-     * given class.
-     * Note: This method is NOT named "isOfClass" because a ModuleClassID
-     * may have two portions; one that denotes a class proper,
-     * and an optional second one that denotes a "Role". For convenience, we refer
-     * the class stripped of its role portion as "the base class" although this is not
-     * a totally accurate term.
-     * A ModuleSpecID, is of a base class but is not related to any kind
-     * of role. So using "isOfClass" could be misleading.
-     * Base classes are represented by a class with the role ID set to zero, which
-     * happens to be a valid class. This routine may be used for comparison with
-     * such a class, of course.
-     *
-     * @param id Module class id to compare with
-     * @return boolean true if equals
-     *
-     */
-    
-    public abstract boolean isOfSameBaseClass(ModuleClassID id);
-
-    /**
-     * Returns true if this ModuleSpecID is of the same base class than the
-     * the given ModuleSpecID.
-     *
-     * @param id Module spec id to compare with
-     * @return boolean true if equals
-     *
-     */
-    
-    public abstract boolean isOfSameBaseClass(ModuleSpecID id);
-
-    /**
-     * Return a ModuleClassID of the same base class but with the role portion
-     * set to zero. aka "the base class".
-     *
-     * @return ModuleClassID the base class.
-     *
-     */
-
-    public abstract ModuleClassID getBaseClass();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/platform/NetworkConfigurator.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/platform/NetworkConfigurator.java
deleted file mode 100644 (file)
index 3dc18b5..0000000
+++ /dev/null
@@ -1,1947 +0,0 @@
-/*
- * Copyright (c) 2006-2007 Sun Microsystems, Inc.  All rights reserved.
- *
- *  The Sun Project JXTA(TM) Software License
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *
- *  3. The end-user documentation included with the redistribution, if any, must
- *     include the following acknowledgment: "This product includes software
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology."
- *     Alternately, this acknowledgment may appear in the software itself, if
- *     and wherever such third-party acknowledgments normally appear.
- *
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must
- *     not be used to endorse or promote products derived from this software
- *     without prior written permission. For written permission, please contact
- *     Project JXTA at http://www.jxta.org.
- *
- *  5. Products derived from this software may not be called "JXTA", nor may
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United
- *  States and other countries.
- *
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of
- *  the license in source files.
- *
- *  ====================================================================
- *
- *  This software consists of voluntary contributions made by many individuals
- *  on behalf of Project JXTA. For more information on Project JXTA, please see
- *  http://www.jxta.org.
- *
- *  This license is based on the BSD license adopted by the Apache Foundation.
- */
-
-package net.jxta.platform;
-
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.impl.membership.pse.PSEUtils;
-import net.jxta.impl.membership.pse.PSEUtils.IssuerInfo;
-import net.jxta.impl.protocol.HTTPAdv;
-import net.jxta.impl.protocol.PSEConfigAdv;
-import net.jxta.impl.protocol.PeerGroupConfigAdv;
-import net.jxta.impl.protocol.PlatformConfig;
-import net.jxta.impl.protocol.RdvConfigAdv;
-import net.jxta.impl.protocol.RdvConfigAdv.RendezVousConfiguration;
-import net.jxta.impl.protocol.RelayConfigAdv;
-import net.jxta.impl.protocol.TCPAdv;
-import net.jxta.logging.Logging;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.protocol.ConfigParams;
-import net.jxta.protocol.TransportAdvertisement;
-
-import javax.security.cert.CertificateException;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URL;
-import java.security.PrivateKey;
-import java.security.cert.X509Certificate;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.MissingResourceException;
-import java.util.NoSuchElementException;
-import java.util.PropertyResourceBundle;
-import java.util.ResourceBundle;
-import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * NetworkConfigurator provides a simple programmatic interface for JXTA configuration.
- * <p/>
- * By default, it defines an edge configuration with TCP in auto mode w/port
- * range 9701-9799, multicast enabled on group "224.0.1.85", and port 1234,
- * HTTP transport with only outgoing enabled.
- * <p/>
- * By default a new PeerID is always generated. This can be overridden via
- * {@link NetworkConfigurator#setPeerID} method or loading a PlatformConfig via
- * {@link NetworkConfigurator#load}.
- * <p/>
- * A facility is provided to initialize a configuration by loading from an
- * existing configuration. This provides limited platform configuration lifecycle
- * management as well as configuration change management.
- * <p/>
- * Also by default, this class sets the default platform configurator to
- * {@link net.jxta.impl.peergroup.NullConfigurator}. <code>NullConfigurator<code>
- * is a no operation configurator intended to prevent any other configurators from
- * being invoked, including the AWT ConfigDialog.
- * <p/>
- * NetworkConfigurator makes use of classes from the {@code net.jxta.impl.*}
- * packages. Applications are very strongly encouraged to avoid importing these
- * classes as their interfaces may change without notice in future JXTA releases.
- * The NetworkConfigurator API abstracts the configuration implementation details
- * and will provide continuity and stability i.e. the NetworkConfigurator API
- * won't change and it will automatically accommodate changes to service
- * configuration.
- * <p/>
- * <em> Configuration example :</em>
- * <pre>
- *     NetworkConfigurator config = new NetworkConfigurator();
- *     if (!config.exists()) {
- *         // Create a new configuration with a new name, principal, and pass
- *         config.setName("New Name");
- *         config.setPrincipal("username");
- *         config.setPassword("password");
- *         try {
- *             //persist it
- *             config.save();
- *         } catch (IOException io) {
- *             // deal with the io error
- *         }
- *      } else {
- *        // Load the pre-existing configuration
- *        File pc = new File(config.getHome(), "PlatformConfig");
- *        try {
- *            config.load(pc.toURI());
- *            // make changes if so desired
- *             ..
- *             ..
- *            // store the PlatformConfig under the default home
- *            config.save();
- *        } catch (CertificateException ce) {
- *            // In case the root cert is invalid, this creates a new one
- *            try {
- *                  //principal
- *                  config.setPrincipal("principal");
- *                  //password to encrypt private key with
- *                  config.setPassword("password");
- *                  config.save();
- *              } catch (Exception e) {
- *                  e.printStackTrace();
- *              }
- *        }
- * <p/>
- * </pre>
- *
- * @since JXTA JSE 2.4
- */
-public class NetworkConfigurator {
-    
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(NetworkConfigurator.class.getName());
-    
-    // begin configuration modes
-    
-    /**
-     * Relay off Mode
-     */
-    public final static int RELAY_OFF = 1 << 2;
-    
-    /**
-     * Relay client Mode
-     */
-    public final static int RELAY_CLIENT = 1 << 3;
-    
-    /**
-     * Relay Server Mode
-     */
-    public final static int RELAY_SERVER = 1 << 4;
-    
-    /**
-     * Proxy Server Mode
-     */
-    public final static int PROXY_SERVER = 1 << 5;
-    
-    /**
-     * TCP transport client Mode
-     */
-    public final static int TCP_CLIENT = 1 << 6;
-    
-    /**
-     * TCP transport Server Mode
-     */
-    public final static int TCP_SERVER = 1 << 7;
-    
-    /**
-     * HTTP transport client Mode
-     */
-    public final static int HTTP_CLIENT = 1 << 8;
-    
-    /**
-     * HTTP transport server Mode
-     */
-    public final static int HTTP_SERVER = 1 << 9;
-    
-    /**
-     * IP multicast transport Mode
-     */
-    public final static int IP_MULTICAST = 1 << 10;
-    
-    /**
-     * RendezVousService Mode
-     */
-    public final static int RDV_SERVER = 1 << 11;
-    
-    /**
-     * RendezVousService Client
-     */
-    public final static int RDV_CLIENT = 1 << 12;
-    
-    /**
-     * RendezVousService Ad-Hoc mode
-     */
-    public final static int RDV_AD_HOC = 1 << 13;
-    
-    /**
-     * Default AD-HOC configuration
-     */
-    public final static int ADHOC_NODE = TCP_CLIENT | TCP_SERVER | IP_MULTICAST | RDV_AD_HOC | RELAY_OFF;
-    
-    /**
-     * Default Edge configuration
-     */
-    public final static int EDGE_NODE = TCP_CLIENT | TCP_SERVER | HTTP_CLIENT | IP_MULTICAST | RDV_CLIENT | RELAY_CLIENT;
-    
-    /**
-     * Default Rendezvous configuration
-     */
-    public final static int RDV_NODE = RDV_SERVER | TCP_CLIENT | TCP_SERVER | HTTP_SERVER;
-    
-    /**
-     * Default Relay configuration
-     */
-    public final static int RELAY_NODE = RELAY_SERVER | TCP_CLIENT | TCP_SERVER | HTTP_SERVER;
-    
-    /**
-     * Default Proxy configuration
-     */
-    public final static int PROXY_NODE = PROXY_SERVER | RELAY_NODE;
-    
-    /**
-     * Default Rendezvous/Relay/Proxy configuration
-     */
-    public final static int RDV_RELAY_PROXY_NODE = RDV_NODE | PROXY_NODE;
-    
-    
-    // end configuration modes
-    
-    /**
-     * Default mode
-     */
-    protected transient int mode = EDGE_NODE;
-    
-    /**
-     * Default PlatformConfig Peer Description
-     */
-    protected transient String description = "Platform Config Advertisement created by : " + NetworkConfigurator.class.getName();
-    
-    /**
-     * The location which will serve as the parent for all stored items used
-     * by JXTA.
-     */
-    private transient URI storeHome = null;
-    
-    /**
-     * Default peer name
-     */
-    protected transient String name = "unknown";
-    
-    /**
-     * Password value used to generate root Certificate and to protect the
-     * Certificate's PrivateKey.
-     */
-    protected transient String password = null;
-    
-    /**
-     * Default PeerID
-     */
-    protected transient PeerID peerid = IDFactory.newPeerID(PeerGroupID.defaultNetPeerGroupID);
-    
-    /**
-     * Principal value used to generate root certificate
-     */
-    protected transient String principal = null;
-    
-    /**
-     * Public Certificate chain
-     */
-    protected transient X509Certificate[] cert = null;
-    
-    /**
-     * Subject private key
-     */
-    protected transient PrivateKey subjectPkey = null;
-    
-    /**
-     * Freestanding keystore location
-     */
-    protected transient URI keyStoreLocation = null;
-    
-    /**
-     * Proxy Service Document
-     */
-    protected transient XMLElement proxyConfig;
-    
-    /**
-     * Personal Security Environment Config Advertisement
-     *
-     * @see net.jxta.impl.membership.pse.PSEConfig
-     */
-    protected transient PSEConfigAdv pseConf;
-    
-    /**
-     * Rendezvous Config Advertisement
-     */
-    protected transient RdvConfigAdv rdvConfig;
-    
-    /**
-     * Default Rendezvous Seeding URI
-     */
-    protected URI rdvSeedingURI = null;
-    
-    /**
-     * Relay Config Advertisement
-     */
-    protected transient RelayConfigAdv relayConfig;
-    
-    /**
-     * Default Relay Seeding URI
-     */
-    protected transient URI relaySeedingURI = null;
-    
-    /**
-     * TCP Config Advertisement
-     */
-    protected transient TCPAdv tcpConfig;
-    
-    /**
-     * Default TCP transport state
-     */
-    protected transient boolean tcpEnabled = true;
-    
-    /**
-     * HTTP Config Advertisement
-     */
-    protected transient HTTPAdv httpConfig;
-    
-    /**
-     * Default HTTP transport state
-     */
-    protected transient boolean httpEnabled = true;
-    
-    /**
-     *  Infrastructure Peer Group Configuration
-     */
-    protected transient PeerGroupConfigAdv infraPeerGroupConfig;
-    
-    /**
-     * Creates NetworkConfigurator instance with default AD-HOC configuration
-     *
-     * @param storeHome the URI to persistent store
-     * @return NetworkConfigurator instance with default AD-HOC configuration
-     */
-    public static NetworkConfigurator newAdHocConfiguration(URI storeHome) {
-        return new NetworkConfigurator(ADHOC_NODE, storeHome);
-    }
-    
-    /**
-     * Creates NetworkConfigurator instance with default Edge configuration
-     *
-     * @param storeHome the URI to persistent store
-     * @return NetworkConfigurator instance with default AD-HOC configuration
-     */
-    public static NetworkConfigurator newEdgeConfiguration(URI storeHome) {
-        return new NetworkConfigurator(EDGE_NODE, storeHome);
-    }
-    
-    /**
-     * Creates NetworkConfigurator instance with default Rendezvous configuration
-     *
-     * @param storeHome the URI to persistent store
-     * @return NetworkConfigurator instance with default Rendezvous configuration
-     */
-    public static NetworkConfigurator newRdvConfiguration(URI storeHome) {
-        return new NetworkConfigurator(RDV_NODE, storeHome);
-    }
-    
-    /**
-     * Creates NetworkConfigurator instance with default Relay configuration
-     *
-     * @param storeHome the URI to persistent store
-     * @return NetworkConfigurator instance with default Relay configuration
-     */
-    public static NetworkConfigurator newRelayConfiguration(URI storeHome) {
-        return new NetworkConfigurator(RELAY_NODE, storeHome);
-    }
-    
-    /**
-     * Creates NetworkConfigurator instance with default Rendezvous configuration
-     *
-     * @param storeHome the URI to persistent store
-     * @return NetworkConfigurator instance with default Rendezvous configuration
-     */
-    public static NetworkConfigurator newRdvRelayConfiguration(URI storeHome) {
-        return new NetworkConfigurator(RDV_NODE | RELAY_SERVER, storeHome);
-    }
-    
-    /**
-     * Creates NetworkConfigurator instance with default Proxy configuration
-     *
-     * @param storeHome the URI to persistent store
-     * @return NetworkConfigurator instance with defaultProxy configuration
-     */
-    public static NetworkConfigurator newProxyConfiguration(URI storeHome) {
-        return new NetworkConfigurator(PROXY_NODE, storeHome);
-    }
-    
-    /**
-     * Creates NetworkConfigurator instance with default Rendezvous, Relay, Proxy configuration
-     *
-     * @param storeHome the URI to persistent store
-     * @return NetworkConfigurator instance with default Rendezvous, Relay, Proxy configuration
-     */
-    public static NetworkConfigurator newRdvRelayProxyConfiguration(URI storeHome) {
-        return new NetworkConfigurator(RDV_RELAY_PROXY_NODE, storeHome);
-    }
-    
-    /**
-     * Creates the default NetworkConfigurator. The configuration is stored  with a default configuration mode of EDGE_NODE
-     */
-    public NetworkConfigurator() {
-        this(EDGE_NODE, new File(".jxta").toURI());
-    }
-    
-    /**
-     * Creates a NetworkConfigurator with the default configuration of the
-     * specified mode. <p/>Valid modes include ADHOC_NODE, EDGE_NODE, RDV_NODE
-     * PROXY_NODE, RELAY_NODE, RDV_RELAY_PROXY_NODE, or any combination of
-     * specific configuration.<p/> e.g. RDV_NODE | HTTP_CLIENT
-     *
-     * @param mode      the new configuration mode
-     * @param storeHome the URI to persistent store
-     * @see #setMode
-     */
-    public NetworkConfigurator(int mode, URI storeHome) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Creating a default configuration");
-        }
-        
-        setStoreHome(storeHome);
-        
-        httpConfig = createHttpAdv();
-        rdvConfig = createRdvConfigAdv();
-        relayConfig = createRelayConfigAdv();
-        proxyConfig = createProxyAdv();
-        tcpConfig = createTcpAdv();
-        infraPeerGroupConfig = createInfraConfigAdv();
-        
-        setMode(mode);
-    }
-    
-    /**
-     * Sets PlaformConfig Peer Description element
-     *
-     * @param description the peer description
-     */
-    public void setDescription(String description) {
-        this.description = description;
-    }
-    
-    /**
-     * Set the current directory for configuration and cache persistent store
-     * <p/>(default is $CWD/.jxta)
-     * <p/>
-     * <dt>Simple example :</dt>
-     * <pre>
-     *  <code>
-     *   //Create an application home
-     *   File appHome = new File(System.getProperty("JXTA_HOME", ".cache"));
-     *   //Create an instance home under the application home
-     *   File instanceHome = new File(appHome, instanceName);
-     *   jxtaConfig.setHome(instanceHome);
-     *   </code>
-     * </pre>
-     *
-     * @param home the new home value
-     * @see #getHome
-     */
-    public void setHome(File home) {
-        this.storeHome = home.toURI();
-    }
-    
-    /**
-     * Returns the current directory for configuration and cache persistent 
-     * store. This is the same location as returned by {@link #getStoreHome()}
-     * which is more general than this method.
-     *
-     * @return Returns the current home directory
-     * @see #setHome
-     */
-    public File getHome() {
-        if( "file".equalsIgnoreCase(storeHome.getScheme())) {
-            return new File(storeHome);
-        } else {
-            throw new UnsupportedOperationException("Home location is not a file:// URI : " + storeHome );
-        }
-    }
-    
-    /**
-     * Returns the location which will serve as the parent for all stored items
-     * used by JXTA.
-     *
-     * @return The location which will serve as the parent for all stored
-     *         items used by JXTA.
-     * @see net.jxta.peergroup.PeerGroup#getStoreHome()
-     */
-    public URI getStoreHome() {
-        return storeHome;
-    }
-    
-
-    /**
-     * Sets the location which will serve as the parent for all stored items
-     * used by JXTA.
-     *
-     * @see net.jxta.peergroup.PeerGroup#getStoreHome()
-     */
-    public void setStoreHome(URI newHome) {
-        // Fail if the URI is not absolute.
-        if (!newHome.isAbsolute()) {
-            throw new IllegalArgumentException("Only absolute URIs accepted for store home location.");
-        }
-        
-        // Fail if the URI is Opaque.
-        if (newHome.isOpaque()) {
-            throw new IllegalArgumentException("Only hierarchical URIs accepted for store home location.");
-        }
-        
-        // FIXME this should be removed when 1488 is committed
-        if (!"file".equalsIgnoreCase(newHome.getScheme())) {
-            throw new IllegalArgumentException("Only file based URI currently supported");
-        }
-        
-        // Adds a terminating /
-        if (!newHome.toString().endsWith("/")) {
-            newHome = URI.create(newHome.toString() + "/");
-        }
-
-        storeHome = newHome;
-    }
-    
-    /**
-     * Toggles HTTP transport state
-     *
-     * @param enabled if true, enables HTTP transport
-     */
-    public void setHttpEnabled(boolean enabled) {
-        this.httpEnabled = enabled;
-        if (!httpEnabled) {
-            httpConfig.setClientEnabled(false);
-            httpConfig.setServerEnabled(false);
-        }
-    }
-    
-    /**
-     * Toggles the HTTP transport server (incoming) mode
-     *
-     * @param incoming toggles HTTP transport server mode
-     */
-    public void setHttpIncoming(boolean incoming) {
-        httpConfig.setServerEnabled(incoming);
-    }
-    
-    /**
-     * Toggles the HTTP transport client (outgoing) mode
-     *
-     * @param outgoing toggles HTTP transport client mode
-     */
-    public void setHttpOutgoing(boolean outgoing) {
-        httpConfig.setClientEnabled(outgoing);
-    }
-    
-    /**
-     * Sets the HTTP listening port (default 9901)
-     *
-     * @param port the new HTTP port value
-     */
-    public void setHttpPort(int port) {
-        httpConfig.setPort(port);
-    }
-    
-    /**
-     * Sets the HTTP interface Address to bind the HTTP transport to
-     * <p/>e.g. "192.168.1.1"
-     *
-     * @param address the new address value
-     */
-    public void setHttpInterfaceAddress(String address) {
-        httpConfig.setInterfaceAddress(address);
-    }
-    
-    /**
-     * Sets the HTTP JXTA Public Address
-     * e.g. "192.168.1.1:9700"
-     *
-     * @param address   the HTTP transport public address
-     * @param exclusive determines whether an address is advertised exclusively
-     */
-    public void setHttpPublicAddress(String address, boolean exclusive) {
-        httpConfig.setServer(address);
-        httpConfig.setPublicAddressOnly(exclusive);
-    }
-    
-    /**
-     * Sets the ID which will be used for new net peer group instances.
-     * <p/>
-     * <p/>By Setting an alternate infrastructure PeerGroup ID (aka NetPeerGroup),
-     * it prevents heterogeneous infrastructure PeerGroups from intersecting.
-     * <p/>This is highly recommended practice for application deployment
-     *
-     * @param id the new infrastructure PeerGroupID as a string
-     * @see net.jxta.peergroup.PeerGroupFactory#setNetPGID
-     */
-    public void setInfrastructureID(ID id) {
-        if (id == null || id.equals(ID.nullID)) {
-            throw new IllegalArgumentException("PeerGroupID can not be null");
-        }
-        infraPeerGroupConfig.setPeerGroupID(id);
-    }
-    
-    /**
-     * Sets the ID which will be used for new net peer group instances.
-     * <p/>
-     * <p/>By Setting an alternate infrastructure PeerGroup ID (aka NetPeerGroup),
-     * it prevents heterogeneous infrastructure PeerGroups from intersecting.
-     * <p/>This is highly recommended practice for application deployment
-     *
-     * @param idStr the new infrastructure PeerGroupID as a string
-     * @see net.jxta.peergroup.PeerGroupFactory#setNetPGID
-     */
-    public void setInfrastructureID(String idStr) {
-        if (idStr == null || idStr.length() == 0) {
-            throw new IllegalArgumentException("PeerGroupID string can not be empty or null");
-        }
-        
-        PeerGroupID pgid = (PeerGroupID) ID.create(URI.create(idStr));
-        setInfrastructureID(pgid);
-    }
-    
-    /**
-     * Gets the ID which will be used for new net peer group instances.
-     * <p/>
-     *
-     * @return the infrastructure PeerGroupID as a string
-     */
-    public String getInfrastructureIDStr() {
-        return infraPeerGroupConfig.getPeerGroupID().toString();
-    }
-    
-    /**
-     * Sets the infrastructure PeerGroup name meta-data
-     *
-     * @param name the Infrastructure PeerGroup name
-     * @see net.jxta.peergroup.PeerGroupFactory#setNetPGName
-     */
-    public void setInfrastructureName(String name) {
-        infraPeerGroupConfig.setName(name);
-    }
-    
-    /**
-     * Gets the infrastructure PeerGroup name meta-data
-     *
-     * @return the Infrastructure PeerGroup name
-     */
-    public String getInfrastructureName() {
-        return infraPeerGroupConfig.getName();
-    }
-    
-    /**
-     * Sets the infrastructure PeerGroup description meta-data
-     *
-     * @param description the infrastructure PeerGroup description
-     * @see net.jxta.peergroup.PeerGroupFactory#setNetPGDesc
-     */
-    public void setInfrastructureDescriptionStr(String description) {
-        infraPeerGroupConfig.setDescription(description);
-    }
-    
-    /**
-     * Returns the infrastructure PeerGroup description meta-data
-     *
-     * @return the infrastructure PeerGroup description meta-data
-     */
-    public String getInfrastructureDescriptionStr() {
-        return infraPeerGroupConfig.getDescription();
-    }
-    
-    /**
-     * Sets the infrastructure PeerGroup description meta-data
-     *
-     * @param description the infrastructure PeerGroup description
-     * @see net.jxta.peergroup.PeerGroupFactory#setNetPGDesc
-     */
-    public void setInfrastructureDesc(XMLElement description) {
-        infraPeerGroupConfig.setDesc(description);
-    }
-    
-    /**
-     * Sets the current node configuration mode.
-     * <p/>The default mode is EDGE, unless modified at construction time.
-     * A node configuration mode defined a preset configuration
-     * parameters based on a operating mode. i.e. an EDGE mode, enable
-     * client/server side tcp, multicast, client side http, RelayService
-     * client mode.
-     * <p/> Valid modes include EDGE, RDV_SERVER,
-     * RELAY_OFF, RELAY_CLIENT, RELAY_SERVER, PROXY_SERVER, or any combination
-     * of which.<p/> e.g. RDV_SERVER + RELAY_SERVER
-     *
-     * @param mode the new configuration mode
-     * @see #getMode
-     */
-    public void setMode(int mode) {
-        this.mode = mode;
-        if ((mode & PROXY_SERVER) == PROXY_SERVER && ((mode & RELAY_SERVER) != RELAY_SERVER)) {
-            mode = mode | RELAY_SERVER;
-        }
-        
-        // RELAY config
-        relayConfig.setClientEnabled((mode & RELAY_CLIENT) == RELAY_CLIENT);
-        relayConfig.setServerEnabled((mode & RELAY_SERVER) == RELAY_SERVER);
-        
-        // RDV_SERVER
-        if ((mode & RDV_SERVER) == RDV_SERVER) {
-            rdvConfig.setConfiguration(RendezVousConfiguration.RENDEZVOUS);
-        } else if ((mode & RDV_CLIENT) == RDV_CLIENT) {
-            rdvConfig.setConfiguration(RendezVousConfiguration.EDGE);
-        } else if ((mode & RDV_AD_HOC) == RDV_AD_HOC) {
-            rdvConfig.setConfiguration(RendezVousConfiguration.AD_HOC);
-        }
-        
-        // TCP
-        tcpConfig.setClientEnabled((mode & TCP_CLIENT) == TCP_CLIENT);
-        tcpConfig.setServerEnabled((mode & TCP_SERVER) == TCP_SERVER);
-        
-        // HTTP
-        httpConfig.setClientEnabled((mode & HTTP_CLIENT) == HTTP_CLIENT);
-        httpConfig.setServerEnabled((mode & HTTP_SERVER) == HTTP_SERVER);
-        
-        // Multicast
-        tcpConfig.setMulticastState((mode & IP_MULTICAST) == IP_MULTICAST);
-        
-        // EDGE
-        if (mode == EDGE_NODE) {
-            rdvConfig.setConfiguration(RendezVousConfiguration.EDGE);
-        }
-    }
-    
-    /**
-     * Returns the current configuration mode
-     * <p/>The default mode is EDGE, unless modified at construction time or through
-     * Method {@link NetworkConfigurator#setMode}.  A node configuration mode defined a preset configuration
-     * parameters based on a operating mode. i.e. an EDGE mode, enable
-     * client/server side tcp, multicast, client side http, RelayService
-     * client mode.
-     *
-     * @return mode  the current mode value
-     * @see #setMode
-     */
-    public int getMode() {
-        return mode;
-    }
-    
-    /**
-     * Sets the IP group multicast packet size
-     *
-     * @param size the new multicast packet
-     */
-    public void setMulticastSize(int size) {
-        tcpConfig.setMulticastSize(size);
-    }
-    
-    /**
-     * Gets the IP group multicast packet size
-     *
-     * @return the multicast packet
-     */
-    public int getMulticastSize() {
-        return tcpConfig.getMulticastSize();
-    }
-    
-    /**
-     * Sets the IP group multicast address (default 224.0.1.85)
-     *
-     * @param mcastAddress the new multicast group address
-     * @see #setMulticastPort
-     */
-    public void setMulticastAddress(String mcastAddress) {
-        tcpConfig.setMulticastAddr(mcastAddress);
-    }
-    
-    /**
-     * Sets the IP group multicast port (default 1234)
-     *
-     * @param port the new IP group multicast port
-     * @see #setMulticastAddress
-     */
-    public void setMulticastPort(int port) {
-        tcpConfig.setMulticastPort(port);
-    }
-    
-    /**
-     * Sets the node name
-     *
-     * @param name node name
-     */
-    public void setName(String name) {
-        this.name = name;
-    }
-    
-    /**
-     * Gets the node name
-     *
-     * @return node name
-     */
-    public String getName() {
-        return this.name;
-    }
-    
-    /**
-     * Sets the Principal for the peer root certificate
-     *
-     * @param principal the new principal value
-     * @see #setPassword
-     * @see #getPrincipal
-     * @see #setPrincipal
-     */
-    public void setPrincipal(String principal) {
-        this.principal = principal;
-    }
-    
-    /**
-     * Gets the Principal for the peer root certificate
-     *
-     * @return principal  if a principal is set, null otherwise
-     * @see #setPassword
-     * @see #getPrincipal
-     * @see #setPrincipal
-     */
-    public String getPrincipal() {
-        return principal;
-    }
-
-    /**
-     * Sets the public Certificate for this configuration.
-     *
-     * @param cert the new cert value
-     */
-    public void setCertificate(X509Certificate cert) {
-        this.cert = new X509Certificate[] { cert };
-    }
-
-    /**
-     * Returns the public Certificate for this configuration.
-     *
-     * @return X509Certificate
-     */
-    public X509Certificate getCertificate() {
-        return (cert == null || cert.length == 0 ? null : cert[0]);
-    }
-
-    /**
-     * Sets the public Certificate chain for this configuration.
-     *
-     * @param certificateChain the new Certificate chain value
-     */
-    public void setCertificateChain(X509Certificate[] certificateChain) {
-        this.cert = certificateChain;
-    }
-
-    /**
-     * Gets the public Certificate chain for this configuration.
-     *
-     * @return X509Certificate chain
-     */
-    public X509Certificate[] getCertificateChain() {
-        return cert;
-    }
-
-    /**
-     * Sets the Subject private key
-     *
-     * @param subjectPkey the subject private key
-     */
-    public void setPrivateKey(PrivateKey subjectPkey) {
-        this.subjectPkey = subjectPkey;
-    }
-    
-    /**
-     * Gets the Subject private key
-     *
-     * @return the subject private key
-     */
-    public PrivateKey getPrivateKey() {
-        return this.subjectPkey;
-    }
-    
-    /**
-     * Sets freestanding keystore location
-     *
-     * @param keyStoreLocation the absolute location of the freestanding keystore
-     */
-    public void setKeyStoreLocation(URI keyStoreLocation) {
-        this.keyStoreLocation = keyStoreLocation;
-    }
-    
-    /**
-     * Gets the freestanding keystore location
-     *
-     * @return the location of the freestanding keystore
-     */
-    public URI getKeyStoreLocation() {
-        return keyStoreLocation;
-    }
-    
-    /**
-     * Sets the password used to sign the private key of the root certificate
-     *
-     * @param password the new password value
-     * @see #setPassword
-     * @see #getPrincipal
-     * @see #setPrincipal
-     */
-    public void setPassword(String password) {
-        this.password = password;
-    }
-    
-    /**
-     * Gets the password used to sign the private key of the root certificate
-     *
-     * @return password  if a password is set, null otherwise
-     * @see #setPassword
-     * @see #getPrincipal
-     * @see #setPrincipal
-     */
-    public String getPassword() {
-        return password;
-    }
-    
-    /**
-     * Sets the PeerID (by default, a new PeerID is generated).
-     * <p/>Note: Persist the PeerID generated, or use load()
-     * to avoid overridding a node's PeerID between restarts.
-     *
-     * @param peerid the new <code>net.jxta.peer.PeerID</code>
-     */
-    public void setPeerID(PeerID peerid) {
-        this.peerid = peerid;
-    }
-    
-    /**
-     * Gets the PeerID
-     *
-     * @return peerid  the <code>net.jxta.peer.PeerID</code> value
-     */
-    public PeerID getPeerID() {
-        return this.peerid;
-    }
-    
-    /**
-     * Sets Rendezvous Seeding URI
-     * <p/>e.g. http://rdv.jxtahosts.net/cgi-bin/rendezvous.cgi?3
-     *
-     * @param seedURI Rendezvous service seeding URI
-     */
-    public void addRdvSeedingURI(URI seedURI) {
-        rdvConfig.addSeedingURI(seedURI);
-    }
-    
-    /**
-     * Sets Rendezvous Access Control URI
-     * <p/>e.g. http://rdv.jxtahosts.net/cgi-bin/rendezvousACL.cgi?3
-     *
-     * @param aclURI Rendezvous Access Control URI
-     */
-    public void setRdvACLURI(URI aclURI) {
-        rdvConfig.setAclUri(aclURI);
-    }
-    
-    /**
-     * Gets Rendezvous Access Control URI if set
-     * <p/>e.g. http://rdv.jxtahosts.net/cgi-bin/rendezvousACL.cgi?3
-     *
-     * @return aclURI Rendezvous Access Control URI
-     */
-    public URI getRdvACLURI() {
-        return rdvConfig.getAclUri();
-    }
-    
-    /**
-     * Sets Relay Access Control URI
-     * <p/>e.g. http://rdv.jxtahosts.net/cgi-bin/relayACL.cgi?3
-     *
-     * @param aclURI Relay Access Control URI
-     */
-    public void setRelayACLURI(URI aclURI) {
-        relayConfig.setAclUri(aclURI);
-    }
-    
-    /**
-     * Gets Relay Access Control URI if set
-     * <p/>e.g. http://rdv.jxtahosts.net/cgi-bin/relayACL.cgi?3
-     *
-     * @return aclURI Relay Access Control URI
-     */
-    public URI getRelayACLURI() {
-        return relayConfig.getAclUri();
-    }
-    
-    /**
-     * Sets the RelayService maximum number of simultaneous relay clients
-     *
-     * @param relayMaxClients the new relayMaxClients value
-     */
-    public void setRelayMaxClients(int relayMaxClients) {
-        if ((relayMaxClients != -1) && (relayMaxClients <= 0)) {
-            throw new IllegalArgumentException("Relay Max Clients : " + relayMaxClients + " must be > 0");
-        }
-        relayConfig.setMaxClients(relayMaxClients);
-    }
-    
-    /**
-     * Sets the RelayService Seeding URI
-     * <p/>e.g. http://rdv.jxtahosts.net/cgi-bin/relays.cgi?3
-     * <p/>A seeding URI (when read) is expected to provide a list of
-     * physical endpoint addresse(s) to relay peers
-     *
-     * @param seedURI RelayService seeding URI
-     */
-    public void addRelaySeedingURI(URI seedURI) {
-        relayConfig.addSeedingURI(seedURI);
-    }
-    
-    /**
-     * Sets the RendezVousService maximum number of simultaneous rendezvous clients
-     *
-     * @param rdvMaxClients the new rendezvousMaxClients value
-     */
-    public void setRendezvousMaxClients(int rdvMaxClients) {
-        if ((rdvMaxClients != -1) && (rdvMaxClients <= 0)) {
-            throw new IllegalArgumentException("Rendezvous Max Clients : " + rdvMaxClients + " must be > 0");
-        }
-        rdvConfig.setMaxClients(rdvMaxClients);
-    }
-    
-    /**
-     * Toggles TCP transport state
-     *
-     * @param enabled if true, enables TCP transport
-     */
-    public void setTcpEnabled(boolean enabled) {
-        this.tcpEnabled = enabled;
-        if (!tcpEnabled) {
-            tcpConfig.setClientEnabled(false);
-            tcpConfig.setServerEnabled(false);
-        }
-    }
-    
-    /**
-     * Sets the TCP transport listening port (default 9701)
-     *
-     * @param port the new tcpPort value
-     */
-    public void setTcpPort(int port) {
-        tcpConfig.setPort(port);
-    }
-    
-    /**
-     * Sets the lowest port on which the TCP Transport will listen if configured
-     * to do so. Valid values are <code>-1</code>, <code>0</code> and
-     * <code>1-65535</code>. The <code>-1</code> value is used to signify that
-     * the port range feature should be disabled. The <code>0</code> specifies
-     * that the Socket API dynamic port allocation should be used. For values
-     * <code>1-65535</code> the value must be equal to or less than the value
-     * used for end port.
-     *
-     * @param start the lowest port on which to listen.
-     */
-    public void setTcpStartPort(int start) {
-        tcpConfig.setStartPort(start);
-    }
-    
-    /**
-     * Returns the highest port on which the TCP Transport will listen if
-     * configured to do so. Valid values are <code>-1</code>, <code>0</code> and
-     * <code>1-65535</code>. The <code>-1</code> value is used to signify that
-     * the port range feature should be disabled. The <code>0</code> specifies
-     * that the Socket API dynamic port allocation should be used. For values
-     * <code>1-65535</code> the value must be equal to or greater than the value
-     * used for start port.
-     *
-     * @param end the new TCP end port
-     */
-    public void setTcpEndPort(int end) {
-        tcpConfig.setEndPort(end);
-    }
-    
-    /**
-     * Toggles TCP transport server (incoming) mode (default is on)
-     *
-     * @param incoming the new TCP server mode
-     */
-    public void setTcpIncoming(boolean incoming) {
-        tcpConfig.setServerEnabled(incoming);
-    }
-    
-    /**
-     * Toggles TCP transport client (outgoing) mode (default is true)
-     *
-     * @param outgoing the new tcpOutgoing value
-     */
-    public void setTcpOutgoing(boolean outgoing) {
-        tcpConfig.setClientEnabled(outgoing);
-    }
-    
-    /**
-     * Sets the TCP transport interface address
-     * <p/>e.g. "192.168.1.1"
-     *
-     * @param address the TCP transport interface address
-     */
-    public void setTcpInterfaceAddress(String address) {
-        tcpConfig.setInterfaceAddress(address);
-    }
-    
-    /**
-     * Sets the node public address
-     * <p/>e.g. "192.168.1.1:9701"
-     * <p/>This address is the physical address defined in a node's
-     * AccessPointAdvertisement.  This often required for NAT'd/FW nodes
-     *
-     * @param address   the TCP transport public address
-     * @param exclusive public address advertised exclusively
-     */
-    public void setTcpPublicAddress(String address, boolean exclusive) {
-        tcpConfig.setServer(address);
-        tcpConfig.setPublicAddressOnly(exclusive);
-    }
-    
-    /**
-     * Toggles whether to use IP group multicast (default is true)
-     *
-     * @param multicastOn the new useMulticast value
-     */
-    public void setUseMulticast(boolean multicastOn) {
-        tcpConfig.setMulticastState(multicastOn);
-    }
-    
-    /**
-     * Determines whether to restrict RelayService leases to those defined in
-     * the seed list
-     *
-     * @param useOnlyRelaySeeds restrict RelayService lease to seed list
-     */
-    public void setUseOnlyRelaySeeds(boolean useOnlyRelaySeeds) {
-        relayConfig.setUseOnlySeeds(useOnlyRelaySeeds);
-    }
-    
-    /**
-     * Determines whether to restrict RendezvousService leases to those defined in
-     * the seed list
-     *
-     * @param useOnlyRendezvouSeeds restrict RendezvousService lease to seed list
-     */
-    public void setUseOnlyRendezvousSeeds(boolean useOnlyRendezvouSeeds) {
-        rdvConfig.setUseOnlySeeds(useOnlyRendezvouSeeds);
-    }
-    
-    /**
-     * Adds RelayService peer seed address
-     * <p/>A RelayService seed is defined as a physical endpoint address
-     * <p/>e.g. http://192.168.1.1:9700, or tcp://192.168.1.1:9701
-     *
-     * @param seedURI the relay seed URI
-     */
-    public void addSeedRelay(URI seedURI) {
-        relayConfig.addSeedRelay(seedURI.toString());
-    }
-    
-    /**
-     * Adds Rendezvous peer seed, physical endpoint address
-     * <p/>A RendezVousService seed is defined as a physical endpoint address
-     * <p/>e.g. http://192.168.1.1:9700, or tcp://192.168.1.1:9701
-     *
-     * @param seedURI the rendezvous seed URI
-     */
-    public void addSeedRendezvous(URI seedURI) {
-        rdvConfig.addSeedRendezvous(seedURI);
-    }
-    
-    /**
-     * Returns true if a PlatformConfig file exist under store home
-     *
-     * @return true if a PlatformConfig file exist under store home
-     */
-    public boolean exists() {
-
-        URI platformConfig = storeHome.resolve("PlatformConfig");
-        try {
-            return null != read(platformConfig);
-        } catch( IOException failed ) {
-            return false;
-        }
-    }
-    
-    /**
-     * Sets the PeerID for this Configuration
-     *
-     * @param peerIdStr the new PeerID as a string
-     */
-    public void setPeerId(String peerIdStr) {
-        this.peerid = (PeerID) ID.create(URI.create(peerIdStr));
-    }
-    
-    /**
-     * Sets the new RendezvousService seeding URI as a string.
-     * <p/>A seeding URI (when read) is expected to provide a list of
-     * physical endpoint address to rendezvous peers
-     *
-     * @param seedURIStr the new rendezvous seed URI as a string
-     */
-    public void addRdvSeedingURI(String seedURIStr) {
-        rdvConfig.addSeedingURI(URI.create(seedURIStr));
-    }
-    
-    /**
-     * Sets the new RelayService seeding URI as a string.
-     * <p/>A seeding URI (when read) is expected to provide a list of
-     * physical endpoint address to relay peers
-     *
-     * @param seedURIStr the new RelayService seed URI as a string
-     */
-    public void addRelaySeedingURI(String seedURIStr) {
-        relayConfig.addSeedingURI(URI.create(seedURIStr));
-    }
-    
-    /**
-     * Sets the List relaySeeds represented as Strings
-     * <p/>A RelayService seed is defined as a physical endpoint address
-     * <p/>e.g. http://192.168.1.1:9700, or tcp://192.168.1.1:9701
-     *
-     * @param seeds the Set RelayService seed URIs as a string
-     */
-    public void setRelaySeedURIs(List<String> seeds) {
-        relayConfig.clearSeedRelays();
-        for (String seedStr : seeds) {
-            relayConfig.addSeedRelay(new EndpointAddress(seedStr));
-        }
-    }
-    
-    /**
-     * Sets the relaySeeds represented as Strings
-     * <p/>A seeding URI (when read) is expected to provide a list of
-     * physical endpoint address to relay peers
-     *
-     * @param seedURIs the List relaySeeds represented as Strings
-     */
-    public void setRelaySeedingURIs(Set<String> seedURIs) {
-        relayConfig.clearSeedingURIs();
-        for (String seedStr : seedURIs) {
-            relayConfig.addSeedingURI(URI.create(seedStr));
-        }
-    }
-    
-    /**
-     * Clears the List of RelayService seeds
-     */
-    public void clearRelaySeeds() {
-        relayConfig.clearSeedRelays();
-    }
-    
-    /**
-     * Clears the List of RelayService seeding URIs
-     */
-    public void clearRelaySeedingURIs() {
-        relayConfig.clearSeedingURIs();
-    }
-    
-    /**
-     * Sets the List of RendezVousService seeds represented as Strings
-     * <p/>A RendezvousService seed is defined as a physical endpoint address
-     * <p/>e.g. http://192.168.1.1:9700, or tcp://192.168.1.1:9701
-     *
-     * @param seeds the Set of rendezvousSeeds represented as Strings
-     */
-    public void setRendezvousSeeds(Set<String> seeds) {
-        rdvConfig.clearSeedRendezvous();
-        for (String seedStr : seeds) {
-            rdvConfig.addSeedRendezvous(URI.create(seedStr));
-        }
-    }
-    
-    /**
-     * Sets the List of RendezVousService seeding URIs represented as Strings.
-     * A seeding URI (when read) is expected to provide a list of
-     * physical endpoint address to rendezvous peers.
-     *
-     * @deprecated The name of this method is inconsistent with it's function! 
-     * It sets the <strong>seeding</strong> URIs and not the seed URIs. Use
-     * {@link #setRendezvousSeedingURIs()} instead.
-     *  
-     * @param seedURIs the List rendezvousSeeds represented as Strings
-     */
-    @Deprecated
-    public void setRendezvousSeedURIs(List<String> seedingURIs) {
-        setRendezvousSeedingURIs(seedingURIs);
-    }
-    
-    /**
-     * Sets the List of RendezVousService seeding URIs represented as Strings.
-     * A seeding URI (when read) is expected to provide a list of
-     * physical endpoint address to rendezvous peers.
-     *
-     * @param seedURIs the List rendezvousSeeds represented as Strings.
-     */
-    public void setRendezvousSeedingURIs(List<String> seedingURIs) {
-        rdvConfig.clearSeedingURIs();
-        for (String seedStr : seedingURIs) {
-            rdvConfig.addSeedingURI(URI.create(seedStr));
-        }
-    }
-
-    /**
-     * Clears the list of RendezVousService seeds
-     */
-    public void clearRendezvousSeeds() {
-        rdvConfig.clearSeedRendezvous();
-    }
-    
-    /**
-     * Clears the list of RendezVousService seeding URIs
-     *
-     * @deprecated The name of this method is inconsistent with it's function! 
-     * It clears the <strong>seeding</strong> URIs and not the seed URIs. Use
-     * {@link #clearRendezvousSeedingURIs()} instead.
-     *  
-     */
-    @Deprecated
-    public void clearRendezvousSeedURIs() {
-        rdvConfig.clearSeedingURIs();
-    }
-    
-    /**
-     * Clears the list of RendezVousService seeding URIs
-     */
-    public void clearRendezvousSeedingURIs() {
-        rdvConfig.clearSeedingURIs();
-    }
-    
-    /**
-     * Load a configuration from the specified store home uri
-     * <p/>
-     * e.g. file:/export/dist/EdgeConfig.xml, e.g. http://configserver.net/configservice?Edge
-     *
-     * @return The loaded configuration.
-     * @throws IOException          if an i/o error occurs
-     * @throws CertificateException if the MembershipService is invalid
-     */
-    public ConfigParams load() throws IOException, CertificateException {
-        return load(storeHome.resolve("PlatformConfig"));
-    }
-    
-    /**
-     * Loads a configuration from a specified uri
-     * <p/>
-     * e.g. file:/export/dist/EdgeConfig.xml, e.g. http://configserver.net/configservice?Edge
-     *
-     * @param uri the URI to PlatformConfig
-     * @return The loaded configuration.
-     * @throws IOException          if an i/o error occurs
-     * @throws CertificateException if the MemebershipService is invalid
-     */
-    public ConfigParams load(URI uri) throws IOException, CertificateException {
-        if (uri == null) {
-            throw new IllegalArgumentException("URI can not be null");
-        }
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Loading configuration : " + uri);
-        }
-        
-        PlatformConfig platformConfig = read(uri);
-        
-        name = platformConfig.getName();
-        peerid = platformConfig.getPeerID();
-        description = platformConfig.getDescription();
-        
-        // TCP
-        XMLElement param = (XMLElement) platformConfig.getServiceParam(PeerGroup.tcpProtoClassID);
-        tcpEnabled = platformConfig.isSvcEnabled(PeerGroup.tcpProtoClassID);
-        Enumeration tcpChilds = param.getChildren(TransportAdvertisement.getAdvertisementType());
-        
-        // get the TransportAdv from either TransportAdv or tcpConfig
-        if (tcpChilds.hasMoreElements()) {
-            param = (XMLElement) tcpChilds.nextElement();
-        } else {
-            throw new IllegalStateException("Missing TCP Advertisment");
-        }
-        tcpConfig = (TCPAdv) AdvertisementFactory.newAdvertisement(param);
-
-        // HTTP
-        try {
-            param = (XMLElement) platformConfig.getServiceParam(PeerGroup.httpProtoClassID);
-            httpEnabled = platformConfig.isSvcEnabled(PeerGroup.httpProtoClassID);
-            
-            Enumeration httpChilds = param.getChildren(TransportAdvertisement.getAdvertisementType());
-            
-            // get the TransportAdv from either TransportAdv
-            if (httpChilds.hasMoreElements()) {
-                param = (XMLElement) httpChilds.nextElement();
-            } else {
-                throw new IllegalStateException("Missing HTTP Advertisment");
-            }
-            // Read-in the adv as it is now.
-            httpConfig = (HTTPAdv) AdvertisementFactory.newAdvertisement(param);
-        } catch (Exception failure) {
-            IOException ioe = new IOException("error processing the HTTP config advertisement");
-            ioe.initCause(failure);
-            throw ioe;
-        }
-        
-        // ProxyService
-        try {
-            param = (XMLElement) platformConfig.getServiceParam(PeerGroup.proxyClassID);
-            if (param != null && !platformConfig.isSvcEnabled(PeerGroup.proxyClassID)) {
-                mode = mode | PROXY_SERVER;
-            }
-        } catch (Exception failure) {
-            IOException ioe = new IOException("error processing the pse config advertisement");
-            ioe.initCause(failure);
-            throw ioe;
-        }
-        
-        // Rendezvous
-        try {
-            param = (XMLElement) platformConfig.getServiceParam(PeerGroup.rendezvousClassID);
-            // backwards compatibility
-            param.addAttribute("type", RdvConfigAdv.getAdvertisementType());
-            rdvConfig = (RdvConfigAdv) AdvertisementFactory.newAdvertisement(param);
-            if (rdvConfig.getConfiguration() == RendezVousConfiguration.AD_HOC) {
-                mode = mode | RDV_AD_HOC;
-            } else if (rdvConfig.getConfiguration() == RendezVousConfiguration.EDGE) {
-                mode = mode | RDV_CLIENT;
-            } else if (rdvConfig.getConfiguration() == RendezVousConfiguration.RENDEZVOUS) {
-                mode = mode | RDV_SERVER;
-            }
-        } catch (Exception failure) {
-            IOException ioe = new IOException("error processing the rendezvous config advertisement");
-            ioe.initCause(failure);
-            throw ioe;
-        }
-        
-        // Relay
-        try {
-            param = (XMLElement) platformConfig.getServiceParam(PeerGroup.relayProtoClassID);
-            if (param != null && !platformConfig.isSvcEnabled(PeerGroup.relayProtoClassID)) {
-                mode = mode | RELAY_OFF;
-            }
-            // backwards compatibility
-            param.addAttribute("type", RelayConfigAdv.getAdvertisementType());
-            relayConfig = (RelayConfigAdv) AdvertisementFactory.newAdvertisement(param);
-        } catch (Exception failure) {
-            IOException ioe = new IOException("error processing the relay config advertisement");
-            ioe.initCause(failure);
-            throw ioe;
-        }
-        
-        // PSE
-        param = (XMLElement) platformConfig.getServiceParam(PeerGroup.membershipClassID);
-        if (param != null) {
-
-            Advertisement adv = null;
-            try {
-                adv = AdvertisementFactory.newAdvertisement(param);
-            } catch (NoSuchElementException notAnAdv) {
-                CertificateException cnfe = new CertificateException("No membership advertisement found");
-                cnfe.initCause(notAnAdv);
-            } catch (IllegalArgumentException invalidAdv) {
-                CertificateException cnfe = new CertificateException("Invalid membership advertisement");
-                cnfe.initCause(invalidAdv);
-            }
-            
-            if (adv instanceof PSEConfigAdv) {
-                pseConf = (PSEConfigAdv) adv;
-                cert = pseConf.getCertificateChain();
-            } else {
-                throw new CertificateException("Error processing the Membership config advertisement. Unexpected membership advertisement "
-                        + adv.getAdvertisementType());
-            }
-        }
-        
-        // Infra Group
-        infraPeerGroupConfig = (PeerGroupConfigAdv) platformConfig.getSvcConfigAdvertisement(PeerGroup.peerGroupClassID);
-        if (null == infraPeerGroupConfig) {
-            infraPeerGroupConfig = createInfraConfigAdv();
-            try {
-                URI configPropsURI = storeHome.resolve("config.properties");
-                InputStream configPropsIS = configPropsURI.toURL().openStream();
-                ResourceBundle rsrcs = new PropertyResourceBundle(configPropsIS);
-                configPropsIS.close();
-
-                NetGroupTunables tunables = new NetGroupTunables(rsrcs, new NetGroupTunables());
-
-                infraPeerGroupConfig.setPeerGroupID(tunables.id);
-                infraPeerGroupConfig.setName(tunables.name);
-                infraPeerGroupConfig.setDesc(tunables.desc);
-            } catch (IOException ignored) {
-                //ignored
-            } catch (MissingResourceException ignored) {
-                //ignored
-            }
-        }
-        return platformConfig;
-    }
-    
-    /**
-     * Persists a PlatformConfig advertisement under getStoreHome()+"/PlaformConfig"
-     * <p/>
-     * Home may be overridden by a call to setHome()
-     * 
-     * @see #load
-     * @throws IOException If there is a failure saving the PlatformConfig.
-     */
-    public void save() throws IOException {
-        httpEnabled = (httpConfig.isClientEnabled() || httpConfig.isServerEnabled());
-        tcpEnabled = (tcpConfig.isClientEnabled() || tcpConfig.isServerEnabled());
-        ConfigParams advertisement = getPlatformConfig();
-        OutputStream out = null;
-        
-        try {
-            if ("file".equalsIgnoreCase(storeHome.getScheme())) {
-                File saveDir = new File(storeHome);
-                saveDir.mkdirs();
-
-                // Sadly we can't use URL.openConnection() to create the
-                // OutputStream for file:// URLs. bogus.
-                out = new FileOutputStream(new File(saveDir, "PlatformConfig"));
-            } else {
-                out = storeHome.resolve("PlatformConfig").toURL().openConnection().getOutputStream();
-            }
-
-            XMLDocument aDoc = (XMLDocument) advertisement.getDocument(MimeMediaType.XMLUTF8);
-            OutputStreamWriter os = new OutputStreamWriter(out, "UTF-8");
-            aDoc.sendToWriter(os);
-            os.flush();
-        } finally {
-            if (null != out) {
-                out.close();
-            }
-        }
-    }
-    
-    /**
-     * Returns a XMLDocument representation of an Advertisement
-     *
-     * @param enabled whether the param doc is enabled, adds a "isOff"
-     *                element if disabled
-     * @param adv     the Advertisement to retrieve the param doc from
-     * @return the parmDoc value
-     */
-    protected XMLDocument getParmDoc(boolean enabled, Advertisement adv) {
-        XMLDocument parmDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "Parm");
-        XMLDocument doc = (XMLDocument) adv.getDocument(MimeMediaType.XMLUTF8);
-        
-        StructuredDocumentUtils.copyElements(parmDoc, parmDoc, doc);
-        if (!enabled) {
-            parmDoc.appendChild(parmDoc.createElement("isOff"));
-        }
-        return parmDoc;
-    }
-    
-    /**
-     * Creates an HTTP transport advertisement
-     *
-     * @return an HTTP transport advertisement
-     */
-    protected HTTPAdv createHttpAdv() {
-        httpConfig = (HTTPAdv) AdvertisementFactory.newAdvertisement(HTTPAdv.getAdvertisementType());
-        httpConfig.setProtocol("http");
-        httpConfig.setPort(9700);
-        httpConfig.setClientEnabled((mode & HTTP_CLIENT) == HTTP_CLIENT);
-        httpConfig.setServerEnabled((mode & HTTP_SERVER) == HTTP_SERVER);
-        return httpConfig;
-    }
-    
-    /**
-     * Creates Personal Security Environment Config Advertisement
-     * <p/>The configuration advertisement can include an optional seed certificate
-     * chain and encrypted private key. If this seed information is present the PSE
-     * Membership Service will require an initial authentication to unlock the
-     * encrypted private key before creating the PSE keystore. The newly created
-     * PSE keystore will be "seeded" with the certificate chain and the private key.
-     *
-     * @param principal principal
-     * @param password  the password used to sign the private key of the root certificate
-     * @return PSEConfigAdv an PSE config advertisement
-     * @see net.jxta.impl.protocol.PSEConfigAdv
-     */
-    protected PSEConfigAdv createPSEAdv(String principal, String password) {
-        pseConf = (PSEConfigAdv) AdvertisementFactory.newAdvertisement(PSEConfigAdv.getAdvertisementType());
-        if (principal != null && password != null) {
-            IssuerInfo info = PSEUtils.genCert(principal, null);
-            
-            pseConf.setCertificate(info.cert);
-            pseConf.setPrivateKey(info.subjectPkey, password.toCharArray());
-        }
-        return pseConf;
-    }
-
-    /**
-     * Creates Personal Security Environment Config Advertisement
-     * <p/>The configuration advertisement can include an optional seed certificate
-     * chain and encrypted private key. If this seed information is present the PSE
-     * Membership Service will require an initial authentication to unlock the
-     * encrypted private key before creating the PSE keystore. The newly created
-     * PSE keystore will be "seeded" with the certificate chain and the private key.
-     *
-     * @param cert X509Certificate
-     * @return PSEConfigAdv an PSE config advertisement
-     * @see net.jxta.impl.protocol.PSEConfigAdv
-     */
-    protected PSEConfigAdv createPSEAdv(X509Certificate cert) {
-        pseConf = (PSEConfigAdv) AdvertisementFactory.newAdvertisement(PSEConfigAdv.getAdvertisementType());
-        if (subjectPkey != null && password != null) {
-            pseConf.setCertificate(cert);
-            pseConf.setPrivateKey(subjectPkey, password.toCharArray());
-        }
-        return pseConf;
-    }
-
-    /**
-     * Creates Personal Security Environment Config Advertisement
-     * <p/>The configuration advertisement can include an optional seed certificate
-     * chain and encrypted private key. If this seed information is present the PSE
-     * Membership Service will require an initial authentication to unlock the
-     * encrypted private key before creating the PSE keystore. The newly created
-     * PSE keystore will be "seeded" with the certificate chain and the private key.
-     *
-     * @param certificateChain X509Certificate[]
-     * @return PSEConfigAdv an PSE config advertisement
-     * @see net.jxta.impl.protocol.PSEConfigAdv
-     */
-    protected PSEConfigAdv createPSEAdv(X509Certificate[] certificateChain) {
-        pseConf = (PSEConfigAdv) AdvertisementFactory.newAdvertisement(PSEConfigAdv.getAdvertisementType());
-        if (subjectPkey != null && password != null) {
-            pseConf.setCertificateChain(certificateChain);
-            pseConf.setPrivateKey(subjectPkey, password.toCharArray());
-        }
-        return pseConf;
-    }
-    
-    /**
-     * Creates a ProxyService configuration advertisement
-     *
-     * @return ProxyService configuration advertisement
-     */
-    protected XMLDocument createProxyAdv() {
-        return (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "Parm");
-    }
-    
-    /**
-     * Creates a RendezVousService configuration advertisement with default values (EDGE)
-     *
-     * @return a RdvConfigAdv
-     */
-    protected RdvConfigAdv createRdvConfigAdv() {
-        rdvConfig = (RdvConfigAdv) AdvertisementFactory.newAdvertisement(RdvConfigAdv.getAdvertisementType());
-        if (mode == RDV_AD_HOC) {
-            rdvConfig.setConfiguration(RendezVousConfiguration.AD_HOC);
-        } else if ((mode & RDV_CLIENT) == RDV_CLIENT) {
-            rdvConfig.setConfiguration(RendezVousConfiguration.EDGE);
-        } else if ((mode & RDV_SERVER) == RDV_SERVER) {
-            rdvConfig.setConfiguration(RendezVousConfiguration.RENDEZVOUS);
-        }
-        // A better alternative is to reference rdv service defaults (currently private)
-        // rdvConfig.setMaxClients(200);
-        return rdvConfig;
-    }
-    
-    /**
-     * Creates a RelayService configuration advertisement with default values (EDGE)
-     *
-     * @return a RelayConfigAdv
-     */
-    protected RelayConfigAdv createRelayConfigAdv() {
-        relayConfig = (RelayConfigAdv) AdvertisementFactory.newAdvertisement(RelayConfigAdv.getAdvertisementType());
-        relayConfig.setUseOnlySeeds(false);
-        relayConfig.setClientEnabled((mode & RELAY_CLIENT) == RELAY_CLIENT || mode == EDGE_NODE);
-        relayConfig.setServerEnabled((mode & RELAY_SERVER) == RELAY_SERVER);
-        return relayConfig;
-    }
-    
-    /**
-     * Creates an TCP transport advertisement with the platform default values.
-     * multicast on, 224.0.1.85:1234, with a max packet size of 16K
-     *
-     * @return a TCP transport advertisement
-     */
-    protected TCPAdv createTcpAdv() {
-        tcpConfig = (TCPAdv) AdvertisementFactory.newAdvertisement(TCPAdv.getAdvertisementType());
-        tcpConfig.setProtocol("tcp");
-        tcpConfig.setInterfaceAddress(null);
-        tcpConfig.setPort(9701);
-        tcpConfig.setStartPort(9701);
-        tcpConfig.setEndPort(9799);
-        tcpConfig.setMulticastAddr("224.0.1.85");
-        tcpConfig.setMulticastPort(1234);
-        tcpConfig.setMulticastSize(16384);
-        tcpConfig.setMulticastState((mode & IP_MULTICAST) == IP_MULTICAST);
-        tcpConfig.setServer(null);
-        tcpConfig.setClientEnabled((mode & TCP_CLIENT) == TCP_CLIENT);
-        tcpConfig.setServerEnabled((mode & TCP_SERVER) == TCP_SERVER);
-        return tcpConfig;
-    }
-    
-    protected PeerGroupConfigAdv createInfraConfigAdv() {
-        infraPeerGroupConfig = (PeerGroupConfigAdv) AdvertisementFactory.newAdvertisement(
-                PeerGroupConfigAdv.getAdvertisementType());
-        
-        NetGroupTunables tunables = new NetGroupTunables(ResourceBundle.getBundle("net.jxta.impl.config"), new NetGroupTunables());
-        
-        infraPeerGroupConfig.setPeerGroupID(tunables.id);
-        infraPeerGroupConfig.setName(tunables.name);
-        infraPeerGroupConfig.setDesc(tunables.desc);
-        
-        return infraPeerGroupConfig;
-    }
-    
-    /**
-     * Returns a PlatformConfig which represents a platform configuration.
-     * <p/>Fine tuning is achieved through accessing each configured advertisement
-     * and achieved through accessing each configured advertisement and modifying
-     * each object directly.
-     *
-     * @return the PeerPlatformConfig Advertisement
-     */
-    public ConfigParams getPlatformConfig() {
-        PlatformConfig advertisement = (PlatformConfig) AdvertisementFactory.newAdvertisement(
-                PlatformConfig.getAdvertisementType());
-        
-        advertisement.setName(name);
-        advertisement.setDescription(description);
-        if (peerid != null) {
-            advertisement.setPeerID(peerid);
-        }
-        
-        if (tcpConfig != null) {
-            boolean enabled = tcpEnabled && (tcpConfig.isServerEnabled() || tcpConfig.isClientEnabled());
-            advertisement.putServiceParam(PeerGroup.tcpProtoClassID, getParmDoc(enabled, tcpConfig));
-        }
-        
-        if (httpConfig != null) {
-            boolean enabled = httpEnabled && (httpConfig.isServerEnabled() || httpConfig.isClientEnabled());
-            advertisement.putServiceParam(PeerGroup.httpProtoClassID, getParmDoc(enabled, httpConfig));
-        }
-        
-        if (relayConfig != null) {
-            boolean isOff = ((mode & RELAY_OFF) == RELAY_OFF) || (relayConfig.isServerEnabled() && relayConfig.isClientEnabled());
-            XMLDocument relayDoc = (XMLDocument) relayConfig.getDocument(MimeMediaType.XMLUTF8);
-            
-            if (isOff) {
-                relayDoc.appendChild(relayDoc.createElement("isOff"));
-            }
-            advertisement.putServiceParam(PeerGroup.relayProtoClassID, relayDoc);
-        }
-        
-        if (rdvConfig != null) {
-            XMLDocument rdvDoc = (XMLDocument) rdvConfig.getDocument(MimeMediaType.XMLUTF8);
-            advertisement.putServiceParam(PeerGroup.rendezvousClassID, rdvDoc);
-        }
-        
-        if (cert != null) {
-            pseConf = createPSEAdv(cert);
-        } else {
-            pseConf = createPSEAdv(principal, password);
-        }
-        
-        if (pseConf != null) {
-            if (keyStoreLocation != null) {
-                if (keyStoreLocation.isAbsolute()) {
-                    pseConf.setKeyStoreLocation(keyStoreLocation);
-                } else {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Keystore location set, but is not absolute: " + keyStoreLocation);
-                    }
-                }
-            }
-            XMLDocument pseDoc = (XMLDocument) pseConf.getDocument(MimeMediaType.XMLUTF8);
-            advertisement.putServiceParam(PeerGroup.membershipClassID, pseDoc);
-        }
-        
-        if (proxyConfig != null && ((mode & PROXY_SERVER) == PROXY_SERVER)) {
-            advertisement.putServiceParam(PeerGroup.proxyClassID, proxyConfig);
-        }
-
-        if ((null != infraPeerGroupConfig) && (null != infraPeerGroupConfig.getPeerGroupID())
-                && (ID.nullID != infraPeerGroupConfig.getPeerGroupID())
-                && (PeerGroupID.defaultNetPeerGroupID != infraPeerGroupConfig.getPeerGroupID())) {
-            advertisement.setSvcConfigAdvertisement(PeerGroup.peerGroupClassID, infraPeerGroupConfig);
-        }
-        return advertisement;
-    }
-    
-    /**
-     *  @param location The location of the platform config.
-     *  @return The platformConfig
-     *  @throws IOException Thrown for failures reading the PlatformConfig.
-     */
-    private PlatformConfig read(URI location) throws IOException {
-        URL url;
-        
-        try {
-            url = location.toURL();
-        } catch (MalformedURLException mue) {
-            IllegalArgumentException failure = new IllegalArgumentException("Failed to convert URI to URL");
-            failure.initCause(mue);
-            throw failure;
-        }
-        
-        InputStream input = url.openStream();
-        try {
-            XMLDocument document = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, input);
-            PlatformConfig platformConfig = (PlatformConfig) AdvertisementFactory.newAdvertisement(document);
-            return platformConfig;
-        } finally {
-            input.close();
-        }
-    }
-    
-    /**
-     * Holds the construction tunables for the Net Peer Group. This consists of
-     * the peer group id, the peer group name and the peer group description.
-     */
-    static class NetGroupTunables {
-        
-        final ID id;
-        final String name;
-        final XMLElement desc;
-        
-        /**
-         * Constructor for loading the default Net Peer Group construction
-         * tunables.
-         */
-        NetGroupTunables() {
-            id = PeerGroupID.defaultNetPeerGroupID;
-            name = "NetPeerGroup";
-            desc = (XMLElement) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "desc", "default Net Peer Group");
-        }
-        
-        /**
-         * Constructor for loading the default Net Peer Group construction
-         * tunables.
-         *
-         * @param pgid   the PeerGroupID
-         * @param pgname the group name
-         * @param pgdesc the group description
-         */
-        NetGroupTunables(ID pgid, String pgname, XMLElement pgdesc) {
-            id = pgid;
-            name = pgname;
-            desc = pgdesc;
-        }
-        
-        /**
-         * Constructor for loading the Net Peer Group construction
-         * tunables from the provided resource bundle.
-         *
-         * @param rsrcs    The resource bundle from which resources will be loaded.
-         * @param defaults default values
-         */
-        NetGroupTunables(ResourceBundle rsrcs, NetGroupTunables defaults) {
-            ID idTmp;
-            String nameTmp;
-            XMLElement descTmp;
-            
-            try {
-                String idTmpStr = rsrcs.getString("NetPeerGroupID").trim();
-                
-                if (idTmpStr.startsWith(ID.URNNamespace + ":")) {
-                    idTmpStr = idTmpStr.substring(5);
-                }
-                idTmp = IDFactory.fromURI(new URI(ID.URIEncodingName + ":" + ID.URNNamespace + ":" + idTmpStr));
-                nameTmp = rsrcs.getString("NetPeerGroupName").trim();
-                descTmp = (XMLElement) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "desc", rsrcs.getString("NetPeerGroupDesc").trim());
-            } catch (Exception failed) {
-                if (null != defaults) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.log(Level.FINE, "NetPeerGroup tunables not defined or could not be loaded. Using defaults.", failed);
-                    }
-                    
-                    idTmp = defaults.id;
-                    nameTmp = defaults.name;
-                    descTmp = defaults.desc;
-                } else {
-                    if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                        LOG.log(Level.SEVERE, "NetPeerGroup tunables not defined or could not be loaded.", failed);
-                    }
-                    
-                    throw new IllegalStateException("NetPeerGroup tunables not defined or could not be loaded.");
-                }
-            }
-            
-            id = idTmp;
-            name = nameTmp;
-            desc = descTmp;
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/platform/NetworkManager.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/platform/NetworkManager.java
deleted file mode 100644 (file)
index b11b9e0..0000000
+++ /dev/null
@@ -1,617 +0,0 @@
-/*
- * Copyright (c) 2006-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.platform;
-
-
-import javax.security.cert.CertificateException;
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import net.jxta.credential.AuthenticationCredential;
-import net.jxta.credential.Credential;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.exception.ProtocolNotSupportedException;
-import net.jxta.id.IDFactory;
-import net.jxta.logging.Logging;
-import net.jxta.membership.InteractiveAuthenticator;
-import net.jxta.membership.MembershipService;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.NetPeerGroupFactory;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.rendezvous.RendezVousService;
-import net.jxta.rendezvous.RendezvousEvent;
-import net.jxta.rendezvous.RendezvousListener;
-
-import net.jxta.impl.membership.pse.StringAuthenticator;
-
-
-/**
- * NetworkManager provides a simplified JXTA platform configuration abstraction, and provides a JXTA platform life-cycle
- * management. The node configuration is created during construction of this object and can be obtained for fine tuning
- * or alteration.  Note that all alterations must be done prior to calling #startNetwork(), otherwise the default
- * configuration is used.  Configuration persistence is on by default and maybe overridden by call to #setEnableConfigPersistence
- * <p/>
- * NetworkManager defines six abstractions of a node configurations as follows :
- * ADHOC : A node which typically deployed in an ad-hoc network
- * EDGE : In addition to supporting ADHOC function, an Edge node can attach to a infrastructure (a Rendezvous, Relay, or both)
- * RENDEZVOUS: provides network bootstrapping services, such as discovery, pipe resolution, etc.
- * RELAY: provides message relaying services, enabling cross firewall traversal
- * PROXY: provide JXME JXTA for J2ME proxying services
- * SUPER: provide the functionality of a Rendezvous, Relay, Proxy node.
- */
-public class NetworkManager implements RendezvousListener {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(NetworkManager.class.getName());
-
-    protected final transient URI publicSeedingRdvURI = URI.create("http://rdv.jxtahosts.net/cgi-bin/rendezvous.cgi?3");
-    protected final transient URI publicSeedingRelayURI = URI.create("http://rdv.jxtahosts.net/cgi-bin/relays.cgi?3");
-
-    /**
-     * Define node standard node operating modes
-     */
-    public enum ConfigMode {
-
-        /**
-         * A AD-HOC node
-         */
-        ADHOC,
-        /**
-         * A Edge node
-         */
-        EDGE,
-        /**
-         * A Rendezvous node
-         */
-        RENDEZVOUS,
-        /**
-         * A Relay node
-         */
-        RELAY,
-        /**
-         * Rendezvous and a Relay
-         */
-        RENDEZVOUS_RELAY,
-        /**
-         * JXME Proxy node
-         */
-        PROXY,
-        /**
-         * A Rendezvous, Relay, and JXME Proxy node
-         */
-        SUPER
-    }
-
-    private final Object networkConnectLock = new String("rendezvous connection lock");
-    private PeerGroup netPeerGroup = null;
-    private volatile boolean started = false;
-    private volatile boolean connected = false;
-    private volatile boolean stopped = false;
-    private RendezVousService rendezvous;
-    private String instanceName = "NA";
-    private ShutdownHook shutdownHook;
-    private ConfigMode mode;
-    private URI instanceHome;
-    private PeerGroupID infrastructureID = PeerGroupID.defaultNetPeerGroupID;
-    private PeerID peerID = IDFactory.newPeerID(PeerGroupID.defaultNetPeerGroupID);
-    private NetworkConfigurator config;
-    private boolean configPersistent = true;
-    private boolean useDefaultSeeds;
-
-    /**
-     * Creates NetworkManger instance with default instance home set to "$CWD"/.jxta"
-     * At this point, alternate Infrastructure PeerGroupID maybe specified, as well as a PeerID. if neither are
-     * specified, the default NetPeerGroupID will be used, and a new PeerID will be generated. Also note the default
-     * seeding URIs are the to development. Alternate values must be specified, if desired, prior to a call to {@link #startNetwork}
-     *
-     * @param mode         Operating mode  the node operating {@link ConfigMode}
-     * @param instanceName Node name
-     * @throws IOException if an io error occurs
-     */
-    public NetworkManager(ConfigMode mode, String instanceName) throws IOException {
-        this(mode, instanceName, new File(".jxta/").toURI());
-    }
-
-    /**
-     * Creates NetworkManger instance.
-     * At this point, alternate Infrastructure PeerGroupID maybe specified, as well as a PeerID. if neither are
-     * specified, the default NetPeerGroupID will be used, and a new PeerID will be generated. Also note the default
-     * seeding URIs are the to development. Alternate values must be specified, if desired, prior to a call to {@link #startNetwork}
-     *
-     * @param mode         Operating mode  the node operating {@link ConfigMode}
-     * @param instanceName Node name
-     * @param instanceHome instance home is a uri to the instance persistent store (aka Cache Manager store home)
-     * @throws IOException if an io error occurs
-     */
-    public NetworkManager(ConfigMode mode, String instanceName, URI instanceHome) throws IOException {
-        this.instanceName = instanceName;
-        this.mode = mode;
-        this.instanceHome = instanceHome;
-    }
-
-    /**
-     * Returns the {@link NetworkConfigurator} for additional tuning
-     *
-     * @return the {@link NetworkConfigurator} for additional tuning
-     * @throws java.io.IOException if an io error occurs
-     */
-    public synchronized NetworkConfigurator getConfigurator() throws IOException {
-        if (config == null) {
-            configure(mode);
-        }
-        return config;
-    }
-
-    /**
-     * Getter for property 'infrastructureID'.
-     *
-     * @return Value for property 'infrastructureID'.
-     */
-    public PeerGroupID getInfrastructureID() {
-        return infrastructureID;
-    }
-
-    /**
-     * Setter for property 'infrastructureID'.
-     *
-     * @param infrastructureID Value to set for property 'infrastructureID'.
-     */
-    public void setInfrastructureID(PeerGroupID infrastructureID) {
-        this.infrastructureID = infrastructureID;
-        if (config != null) {
-            config.setInfrastructureID(infrastructureID);
-        }
-    }
-
-    /**
-     * Getter for property 'instanceName'.
-     *
-     * @return Value for property 'instanceName'.
-     */
-    public String getInstanceName() {
-        return instanceName;
-    }
-
-    /**
-     * Setter for property 'instanceName'.
-     *
-     * @param instanceName Value to set for property 'instanceName'.
-     */
-    public void setInstanceName(String instanceName) {
-        this.instanceName = instanceName;
-    }
-
-    /**
-     * Getter for property 'instanceHome'.
-     *
-     * @return Value for property 'instanceHome'.
-     */
-    public URI getInstanceHome() {
-        return instanceHome;
-    }
-
-    /**
-     * Setter for property 'instanceHome'.
-     *
-     * @param instanceHome Value to set for property 'instanceHome'.
-     */
-    public void setInstanceHome(URI instanceHome) {
-        this.instanceHome = instanceHome;
-    }
-
-    /**
-     * Getter for property node operating 'mode'.
-     *
-     * @return Value for property 'mode'.
-     */
-    public ConfigMode getMode() {
-        return mode;
-    }
-
-    /**
-     * Setter for property 'mode'.
-     *
-     * @param mode Value to set for property 'mode'.
-     * @throws IOException if an io error occurs
-     */
-    public void setMode(ConfigMode mode) throws IOException {
-        this.mode = mode;
-        configure(mode);
-    }
-
-    /**
-     * Getter for property 'peerID'.
-     *
-     * @return Value for property 'peerID'.
-     */
-    public PeerID getPeerID() {
-        return peerID;
-    }
-
-    /**
-     * Setter for property 'peerID'.
-     *
-     * @param peerID Value to set for property 'peerID'.
-     */
-    public void setPeerID(PeerID peerID) {
-        this.peerID = peerID;
-    }
-
-    /**
-     * Getter for property 'configPersistent'.
-     *
-     * @return Value for property 'configPersistent'.
-     */
-    public boolean isConfigPersistent() {
-        return configPersistent;
-    }
-
-    /**
-     * Setter for property 'configPersistent'. if disabled a PlatformConfig is not persisted. It assumed that
-     * the PeerID is will be set, or a new PeerID will always be generated.
-     *
-     * @param persisted Value to set for property 'configPersistent'.
-     */
-    public void setConfigPersistent(boolean persisted) {
-        this.configPersistent = persisted;
-    }
-
-    private void configure(ConfigMode mode) throws IOException {
-        switch (mode) {
-            case ADHOC:
-                config = NetworkConfigurator.newAdHocConfiguration(instanceHome);
-                break;
-
-            case EDGE:
-                config = NetworkConfigurator.newEdgeConfiguration(instanceHome);
-                break;
-
-            case RENDEZVOUS:
-                config = NetworkConfigurator.newRdvConfiguration(instanceHome);
-                break;
-
-            case RELAY:
-                config = NetworkConfigurator.newRelayConfiguration(instanceHome);
-                break;
-
-            case RENDEZVOUS_RELAY:
-                config = NetworkConfigurator.newRdvRelayConfiguration(instanceHome);
-                break;
-
-            case PROXY:
-                config = NetworkConfigurator.newProxyConfiguration(instanceHome);
-                break;
-
-            case SUPER:
-                config = NetworkConfigurator.newRdvRelayProxyConfiguration(instanceHome);
-                break;
-
-            default:
-                config = NetworkConfigurator.newAdHocConfiguration(instanceHome);
-        }
-        if (!config.exists()) {
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.log(Level.INFO, "Created new configuration. mode = " + mode.toString());
-            }
-
-            config.setDescription("Created by NetworkManager");
-            config.setPeerID(peerID);
-            config.setInfrastructureID(infrastructureID);
-            config.setName(instanceName);
-            if (useDefaultSeeds) {
-                config.addRdvSeedingURI(publicSeedingRdvURI);
-                config.addRelaySeedingURI(publicSeedingRelayURI);
-            }
-        } else {
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.log(Level.INFO, "Loading existing configuration. mode = " + mode.toString());
-            }
-
-            File pc = new File(config.getHome(), "PlatformConfig");
-
-            try {
-                config.load(pc.toURI());
-            } catch (CertificateException pseFailed) {
-                IOException failure = new IOException("Failure reading membership service certificates.");
-
-                failure.initCause(pseFailed);
-                throw failure;
-            }
-
-            // XXX 20070524 bondolo Aren't we completely ignoring the mode? What if it changed?
-            // 20070614 hamada Good question, this feature is postponed due to the difficulty of comparing a stored/requested modes. 
-        }
-    }
-
-    /**
-     * Creates and starts the JXTA infrastructure peer group (aka NetPeerGroup) based on the specified mode
-     * template. This class also registers a listener for rendezvous events.
-     *
-     * @return The Net Peer Group
-     * @throws net.jxta.exception.PeerGroupException
-     *                             if the group fails to initialize
-     * @throws java.io.IOException if an io error occurs
-     */
-    public synchronized PeerGroup startNetwork() throws PeerGroupException, IOException {
-
-        if (started) {
-            return netPeerGroup;
-        }
-
-        if (config == null) {
-            configure(mode);
-        }
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.log(Level.INFO, "Starting JXTA Network! MODE = " + mode.toString() + ",  HOME = " + instanceHome);
-        }
-
-        // create, and Start the default jxta NetPeerGroup
-        NetPeerGroupFactory factory = new NetPeerGroupFactory(config.getPlatformConfig(), instanceHome);
-
-        netPeerGroup = factory.getInterface();
-
-        if (configPersistent) {
-            config.save();
-        }
-
-        rendezvous = netPeerGroup.getRendezVousService();
-        rendezvous.addListener(this);
-        started = true;
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.log(Level.INFO, "Started JXTA Network!");
-        }
-
-        return netPeerGroup;
-    }
-
-    /**
-     * Establishes group credential.  This is a required step when planning to
-     * to utilize TLS messengers or secure pipes
-     *
-     * @param group              peer group to establish credentials in
-     * @param keystore_password  The passphrase for the keystore. This is a
-     *                           char[] rather than a String so that it can be blanked after use.
-     * @param principal_password The passphrase for the identity. This is a
-     *                           char[] rather than a String so that it can be blanked after use.
-     * @throws net.jxta.exception.PeerGroupException
-     *          if group credentials were rejected
-     * @throws net.jxta.exception.ProtocolNotSupportedException
-     *          if authenticator rejected the credential
-     */
-    public static void login(PeerGroup group, char[] keystore_password, char[] principal_password) throws PeerGroupException, ProtocolNotSupportedException {
-        StringAuthenticator auth;
-        MembershipService membership = group.getMembershipService();
-        Credential cred = membership.getDefaultCredential();
-
-        if (cred == null) {
-            AuthenticationCredential authCred = new AuthenticationCredential(group, "StringAuthentication", null);
-
-            auth = (StringAuthenticator) membership.apply(authCred);
-            if (auth != null) {
-                auth.setAuth1_KeyStorePassword(keystore_password);
-                auth.setAuth2Identity(group.getPeerID());
-                auth.setAuth3_IdentityPassword(principal_password);
-                if (auth.isReadyForJoin()) {
-                    membership.join(auth);
-                }
-            }
-        }
-
-        cred = membership.getDefaultCredential();
-        if (null == cred) {
-            AuthenticationCredential authCred = new AuthenticationCredential(group, "InteractiveAuthentication", null);
-            InteractiveAuthenticator iAuth = (InteractiveAuthenticator) membership.apply(authCred);
-
-            if (iAuth.interact() && iAuth.isReadyForJoin()) {
-                membership.join(iAuth);
-            }
-        }
-    }
-
-    /**
-     * Stops and unreferences the NetPeerGroup
-     */
-    public synchronized void stopNetwork() {
-        if (stopped || !started) {
-            return;
-        }
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.log(Level.INFO, "Stopping JXTA Network!");
-        }
-
-        stopped = true;
-        synchronized(networkConnectLock) {
-            connected = false;
-            networkConnectLock.notifyAll();
-        }
-        
-        rendezvous.removeListener(this);
-        netPeerGroup.stopApp();
-        netPeerGroup.unref();
-        netPeerGroup = null;
-        // permit restart.
-        started = false;
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.log(Level.INFO, "Stopped JXTA Network!");
-        }
-    }
-
-    /**
-     * Gets the netPeerGroup object
-     *
-     * @return The netPeerGroup value
-     */
-    public PeerGroup getNetPeerGroup() {
-        return netPeerGroup;
-    }
-
-    /**
-     * Blocks only, if not connected to a rendezvous, or until a connection to rendezvous node occurs.
-     *
-     * @param timeout timeout in milliseconds, a zero timeout of waits forever
-     * @return true if connected to a rendezvous, false otherwise
-     */
-    public boolean waitForRendezvousConnection(long timeout) {
-        if (0 == timeout) {
-            timeout = Long.MAX_VALUE;
-        }
-
-        long timeoutAt = System.currentTimeMillis() + timeout;
-
-        if (timeoutAt <= 0) {
-            // handle overflow.
-            timeoutAt = Long.MAX_VALUE;
-        }
-
-        while (started && !stopped && !rendezvous.isConnectedToRendezVous() && !rendezvous.isRendezVous()) {
-            try {
-                long waitFor = timeoutAt - System.currentTimeMillis();
-
-                if (waitFor > 0) {
-                    synchronized (networkConnectLock) {
-                        networkConnectLock.wait(timeout);
-                    }
-                } else {
-                    // all done with waiting.
-                    break;
-                }
-            } catch (InterruptedException e) {
-                Thread.interrupted();
-                break;
-            }
-        }
-        
-        return rendezvous.isConnectedToRendezVous() || rendezvous.isRendezVous();
-    }
-
-    /**
-     * rendezvousEvent the rendezvous event
-     *
-     * @param event rendezvousEvent
-     */
-    public void rendezvousEvent(RendezvousEvent event) {
-        if (event.getType() == RendezvousEvent.RDVCONNECT || event.getType() == RendezvousEvent.RDVRECONNECT
-                || event.getType() == RendezvousEvent.BECAMERDV) {
-            synchronized (networkConnectLock) {
-                connected = true;
-                networkConnectLock.notifyAll();
-            }
-        }
-    }
-
-    /**
-     * if true uses the public rendezvous seeding service
-     *
-     * @param useDefaultSeeds if true uses the default development seeding service
-     */
-    public void setUseDefaultSeeds(boolean useDefaultSeeds) {
-        this.useDefaultSeeds = useDefaultSeeds;
-    }
-
-    /**
-     * Returns true if useDefaultSeeds is set to true
-     *
-     * @return true if useDefaultSeeds is set to true
-     */
-    public boolean getUseDefaultSeeds() {
-        return useDefaultSeeds;
-    }
-
-    /**
-     * Registers a Runtime shutdown hook to cleanly shutdown the JXTA platform
-     */
-    public synchronized void registerShutdownHook() {
-        if (shutdownHook != null) {
-            return;
-        }
-        shutdownHook = new NetworkManager.ShutdownHook();
-        Runtime.getRuntime().addShutdownHook(shutdownHook);
-    }
-
-    /**
-     * Unregisters a Runtime shutdown hook to cleanly shutdown the JXTA platform
-     */
-    public synchronized void unregisterShutdownHook() {
-
-        if (shutdownHook == null) {
-            return;
-        }
-        Runtime.getRuntime().removeShutdownHook(shutdownHook);
-        shutdownHook = null;
-    }
-
-    private class ShutdownHook extends Thread {
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public void run() {
-            stopNetwork();
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/platform/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/platform/package.html
deleted file mode 100644 (file)
index c839dfd..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    Classes for defining code modules within JXTA. Modules are used for services
-    and applications within JXTA. Also provides utilities for configuring and
-    managing JXTA start-up and shutdown.
-                               
-    @see net.jxta.id.ID
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#ids" target='_blank'>JXTA Protocols Specification : IDs</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/AccessPointAdvertisement.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/AccessPointAdvertisement.java
deleted file mode 100644 (file)
index 6964faf..0000000
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.protocol;
-
-
-import java.util.Collection;
-import net.jxta.document.ExtendableAdvertisement;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.peer.PeerID;
-
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Vector;
-
-
-/**
- * Provides a simple association of a {@code PeerID} to an ordered list of
- * {@code EndpointAddress} entries. Each {@code EndpointAddress} defines one
- * Message Transport address by which the peer may be reached. The addresses
- * are sorted in the preferred order (which may refer to performance, cost,
- * efficiency, etc.) which they should be used.
- * <p/>
- * The Access Point Advertisement is most commonly used as part of other
- * Advertisements such as {@code RouteAdvertisement}.
- *
- * @see net.jxta.protocol.PeerAdvertisement
- * @see net.jxta.protocol.RouteAdvertisement
- */
-public abstract class AccessPointAdvertisement extends ExtendableAdvertisement implements Cloneable {
-
-    /**
-     * The peer id of the peer with these endpoints. May be {@code null}
-     * if the APA is used as a sub-element of a structure in which the context
-     * peerid is already known.
-     */
-    private PeerID pid = null;
-
-    /**
-     * The EndpointAddresses associated with the specified peer in preferred
-     * order.
-     * <p/>
-     * <ul>
-     * <li>Values are, sadly, {@link java.lang.String} of
-     * {@link net.jxta.endpoint.EndpointAddress}.</li>
-     * </ul>
-     */
-    private Vector<String> endpointAddresses = new Vector<String>();
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * <p/>Make a deep copy.
-     */
-    @Override
-    public AccessPointAdvertisement clone() {
-        try {
-            AccessPointAdvertisement a = (AccessPointAdvertisement) super.clone();
-
-            a.setPeerID(getPeerID());
-            a.addEndpointAddresses(endpointAddresses);
-
-            return a;
-        } catch (CloneNotSupportedException impossible) {
-            throw new Error("Object.clone() threw CloneNotSupportedException", impossible);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Equals means the same PID and the same endpoint addresses.
-     */
-    @Override
-    public boolean equals(Object target) {
-
-        if (this == target) {
-            return true;
-        }
-
-        if (!(target instanceof AccessPointAdvertisement)) {
-            return false;
-        }
-
-        AccessPointAdvertisement ap = (AccessPointAdvertisement) target;
-
-        if ((null == getPeerID()) && (null != ap.getPeerID())) {
-            return false;
-        }
-
-        if ((null != getPeerID())) {
-            if (!getPeerID().equals(ap.getPeerID())) {
-                return false;
-            }
-        }
-        if (endpointAddresses.size() != ap.endpointAddresses.size()) {
-            return false;
-        }
-
-        // XXX 20061127 bondolo This eventually should be an ordered comparison.
-
-        for (String anEA : endpointAddresses) {
-            if (!ap.endpointAddresses.contains(anEA)) {
-                return false;
-            }
-        }
-
-        return true;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        if (null != pid) {
-            return pid.hashCode();
-        } else {
-            // force all incomplete advertisements to hash to the same place.
-            return 1;
-        }
-    }
-
-    /**
-     * Returns the identifying type of this Advertisement.
-     *
-     * @return String the type of advertisement
-     */
-    public static String getAdvertisementType() {
-        return "jxta:APA";
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public final String getBaseAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     * Gets the PeerID for this access point.
-     *
-     * @return PeerID The peer id associated with the endpoint addresses or
-     *         {@code null} if no peer has been directly associated.
-     */
-    public PeerID getPeerID() {
-        return pid;
-    }
-
-    /**
-     * Sets the PeerID for this access point.
-     *
-     * @param pid The peer id associated with the endpoint addresses or
-     *            {@code null} if no peer is directly associated.
-     */
-    public void setPeerID(PeerID pid) {
-        this.pid = pid;
-    }
-
-    /**
-     *  Add all of the provided EndpointAddresses.
-     *
-     *  @param addrs Add all of the specified endpoint addresses.
-     */
-    public void addEndpointAddresses(List<EndpointAddress> addrs) {
-        for (EndpointAddress addr : addrs) {
-            addEndpointAddress(addr);
-        }
-    }
-    
-    /**
-     *  Clears all EndpointAddresses.
-     */
-    public void clearEndpointAddresses() {
-        endpointAddresses.clear();
-    }
-    
-    /**
-     *  Remove the specified EndpointAddress.
-     *
-     *  @param addr EndpointAddress to remove.
-     */
-    public void removeEndpointAddress(EndpointAddress addr) {
-        endpointAddresses.remove(addr.toString());
-    }
-            
-    /**
-     *  Remove the specified EndpointAddresses.
-     *
-     *  @param addrs EndpointAddresses to remove.
-     */
-    public void removeEndpointAddresses(Collection<EndpointAddress> addrs) {
-        for (EndpointAddress addr : addrs) {
-            endpointAddresses.remove(addr.toString());
-        }
-    }
-            
-    /**
-     * Returns the endpoint addresses associated with this access point.
-     *
-     * @return The endpoint addresses associated with this access point
-     *         represented as {@link java.lang.String}.
-     */
-    public Enumeration<String> getEndpointAddresses() {
-        return endpointAddresses.elements();
-    }
-
-    /**
-     * Returns the vector of endpoint addresses associated with this access
-     * point. The result is a vector of endpoint addresses represented as
-     * {@code String}. <strong>The Vector contains the "live" data of this
-     * advertisement. It should be modified only with great care.</strong>
-     *
-     * @return The endpoint addresses associated with this access point
-     *         represented as {@link java.lang.String}.
-     * @deprecated Returning the Vector is dangerous and unwise. This feature
-     *             will be removed.
-     */
-    @Deprecated
-    public Vector<String> getVectorEndpointAddresses() {
-        return endpointAddresses;
-    }
-
-    /**
-     * Sets the list of endpoint addresses associated with this access point.
-     *
-     * @param addresses Vector of EndpointAddresses represented as
-     *                  {@link java.lang.String}. <b>The Vector is not copied!</b>
-     * @deprecated This method causes the AccessPointAdvertisement to reference
-     *             the provided array. This means that subsequent changes to the array will
-     *             alter the endpoint addresses which are part of the
-     *             {@code AcccessPointAdvertisement}.
-     */
-    @Deprecated
-    public void setEndpointAddresses(Vector<String> addresses) {
-        endpointAddresses = addresses;
-    }
-
-    /**
-     * Add a new list of EndpointAddresses to the access point.
-     *
-     * @param addresses List of EndpointAddresses represented as
-     *                  {@link java.lang.String}.
-     *
-     * @deprecated Use {@link #addEndpointAddresses(List)} instead.
-     */
-    @Deprecated
-    public void addEndpointAddresses(Vector<String> addresses) {
-        for (String toAdd : addresses) {
-            addEndpointAddress(toAdd);
-        }
-    }
-
-    /**
-     * Add a new EndpointAddresses to the access point
-     *
-     * @param address An EndpointAddress
-     */
-    public void addEndpointAddress(EndpointAddress address) {
-        String toAdd = address.toString();
-
-        if (!endpointAddresses.contains(toAdd)) {
-            endpointAddresses.add(toAdd);
-        }
-    }
-
-    /**
-     * add a new EndpointAddresses to the access point
-     *
-     * @param address EndpointAddress represented as {@link java.lang.String}.
-     */
-    public void addEndpointAddress(String address) {
-        if (!endpointAddresses.contains(address)) {
-            endpointAddresses.add(address);
-        }
-    }
-
-    /**
-     * remove a list of EndpointAddresses from the access point
-     *
-     * @param addresses List of EndpointAddresses represented as
-     *                  {@link java.lang.String}.
-     */
-    public void removeEndpointAddresses(List<String> addresses) {
-        endpointAddresses.removeAll(addresses);
-    }
-
-    /**
-     * return number of endpoint addresses
-     *
-     * @return size number of endpointAddress in the hop
-     */
-    public int size() {
-        return endpointAddresses.size();
-    }
-
-    /**
-     * Check if the EndpointAddress is already associated with this access point
-     *
-     * @param addr endpoint address to check
-     * @return true if the EndpointAddress is already associated with this access point
-     */
-    public boolean contains(EndpointAddress addr) {
-        return endpointAddresses.contains(addr.toString());
-    }
-
-    /**
-     * Generate a string that displays an access point
-     * information for logging or debugging purpose
-     *
-     * @return String return a string containing the access point advertisement
-     */
-    public String display() {
-        StringBuilder routeBuf = new StringBuilder();
-
-        routeBuf.append("PID=");
-
-        PeerID peerId = getPeerID();
-
-        if (peerId == null) {
-            routeBuf.append("<null>");
-        } else {
-            routeBuf.append(peerId.toString());
-        }
-
-        Enumeration e = getEndpointAddresses();
-
-        while (e.hasMoreElements()) {
-            routeBuf.append("\n Addr=").append(e.nextElement());
-        }
-        return routeBuf.toString();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/ConfigParams.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/ConfigParams.java
deleted file mode 100644 (file)
index 05cea09..0000000
+++ /dev/null
@@ -1,587 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.protocol;
-
-
-import net.jxta.document.*;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import java.util.concurrent.atomic.AtomicInteger;
-
-
-/**
- * A container for collections of configuration parameters. Configuration
- * parameters are stored in a Map which is keyed by {@code JXTA ID}s and whose
- * values are {@code Advertisement}s.
- */
-public abstract class ConfigParams extends ExtendableAdvertisement implements Cloneable {
-    
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(ConfigParams.class.getName());
-    
-    private static final String SVC_TAG = "Svc";
-    private static final String MCID_TAG = "MCID";
-    private static final String PARAM_TAG = "Parm";
-    
-    /**
-     * A table of structured documents to be interpreted by each service.
-     * For safe operation these elements should be immutable, but we're helpless
-     * if they are not.
-     */
-    private final Map<ID, StructuredDocument> params = new HashMap<ID, StructuredDocument>();
-    
-    /**
-     * A map of advertisements to be interpreted by each service.
-     * For safe operation we clone the advertisements when they are added to the
-     * map and only ever return clones of the advertisements.
-     */
-    private final Map<ID, Advertisement> ads = new HashMap<ID, Advertisement>();
-    
-    /**
-     *  The ids of the advertisements and/or params which have been explicitly
-     *  marked as disabled.
-     */
-    private final Set<ID> disabled = new HashSet<ID>();
-    
-    /**
-     * Counts the changes made to this object. The API increments it every time
-     * some change is not proven to be idempotent. We rely on implementations to
-     * increment modCount every time something is changed without going through
-     * the API.
-     */
-    protected final transient AtomicInteger modCount = new AtomicInteger(0);
-    
-    /**
-     * Returns the identifying type of this Advertisement.
-     *
-     * @return String the type of advertisement
-     */
-    public static String getAdvertisementType() {
-        return "jxta:CP";
-    }
-
-    /**
-     *  Default Constructor. We want all ConfigParams derived advertisements to
-     *  pretty print. 
-     */
-    protected ConfigParams() {
-        super(true);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public ConfigParams clone() {
-        
-        try {
-            ConfigParams result = (ConfigParams) super.clone();
-            
-            for (Map.Entry<ID, StructuredDocument> anEntry : params.entrySet()) {
-                result.params.put(anEntry.getKey(), StructuredDocumentUtils.copyAsDocument(anEntry.getValue()));
-            }
-            
-            for (Map.Entry<ID, Advertisement> anEntry : ads.entrySet()) {
-                result.ads.put(anEntry.getKey(), anEntry.getValue().clone());
-            }
-            
-            result.disabled.addAll(disabled);
-            
-            return result;
-        } catch (CloneNotSupportedException impossible) {
-            throw new Error("Object.clone() threw CloneNotSupportedException", impossible);
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object other) {
-        if(this == other) {
-            return true;
-        }
-        
-        if(other instanceof ConfigParams) {
-            ConfigParams likeMe = (ConfigParams) other;
-            
-            boolean ep = params.equals(likeMe.params);
-            boolean ea = ads.equals(likeMe.ads);
-            boolean ed = disabled.equals(likeMe.disabled);            
-            
-            return ep && ea && ed;
-        }
-        
-        return false;
-    }
-
-        
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public final String getBaseAdvType() {
-        return getAdvertisementType();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected boolean handleElement(Element raw) {
-        
-        if (super.handleElement(raw)) {
-            return true;
-        }
-        
-        XMLElement elem = (XMLElement) raw;
-        
-        if (SVC_TAG.equals(elem.getName())) {
-            Attribute disabledAttr = elem.getAttribute("disabled");
-            boolean isDisabled = (null != disabledAttr) && Boolean.parseBoolean(disabledAttr.getValue());
-            
-            Enumeration<XMLElement> elems = elem.getChildren();
-            
-            ID key = null;
-            XMLElement param = null;
-            
-            while (elems.hasMoreElements()) {
-                XMLElement e = elems.nextElement();
-                
-                if (MCID_TAG.equals(e.getName())) {
-                    try {
-                        URI mcid = new URI(e.getTextValue());
-
-                        key = IDFactory.fromURI(mcid);
-                    } catch (URISyntaxException badID) {
-                        throw new IllegalArgumentException("Bad ID in advertisement: " + e.getTextValue());
-                    }
-                } else if (PARAM_TAG.equals(e.getName())) {
-                    param = e;
-                } else {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Unrecognized <Svc> tag : " + e.getName());
-                    }
-                }
-            }
-            
-            if (key != null && param != null) {
-                if(!isDisabled) {
-                    // Backwards compatibility support.
-                    Enumeration<XMLElement> isOff = param.getChildren("isOff");
-                    
-                    isDisabled = isOff.hasMoreElements();
-                }            
-
-                putServiceParam(key, param);
-                if(isDisabled) {
-                    disabled.add(key);
-                }
-            } else {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Incomplete Service Param : id=" + key + " param=" + param);
-                }
-                
-                return false;
-            }
-            return true;
-        }
-        return false;
-    }
-    
-    /**
-     * Return the advertisement as a document.
-     *
-     *  @param adv the document to add elements to.
-     *  @return true if elements were added otherwise false.
-     */
-    public boolean addDocumentElements(StructuredDocument adv) {
-        
-        for (Map.Entry<ID, StructuredDocument> anEntry : params.entrySet()) {
-            ID anID = anEntry.getKey();
-            StructuredDocument aDoc = anEntry.getValue();
-            
-            Element s = adv.createElement(SVC_TAG);
-
-            adv.appendChild(s);
-            
-            if(disabled.contains(anID)) {
-                ((Attributable)s).addAttribute("disabled", "true");
-            }
-            
-            Element e = adv.createElement(MCID_TAG, anID.toString());
-
-            s.appendChild(e);
-            
-            StructuredDocumentUtils.copyElements(adv, s, aDoc, PARAM_TAG);
-        }
-        
-        for (Map.Entry<ID, Advertisement> anEntry : ads.entrySet()) {
-            ID anID = anEntry.getKey();
-            Advertisement anAdv = anEntry.getValue();
-            
-            Element s = adv.createElement(SVC_TAG);
-
-            adv.appendChild(s);
-            
-            if(disabled.contains(anID)) {
-                ((Attributable)s).addAttribute("disabled", "true");
-            }
-            
-            Element e = adv.createElement(MCID_TAG, anID.toString());
-
-            s.appendChild(e);
-            
-            StructuredDocument asDoc = (StructuredDocument) anAdv.getDocument(adv.getMimeType());
-            
-            StructuredDocumentUtils.copyElements(adv, s, asDoc, PARAM_TAG);
-        }
-        
-        return true;
-    }
-    
-    /**
-     * Returns the number of times this object has been modified since it was
-     * created. This permits the detection of local changes that require
-     * refreshing some other data.
-     *
-     * @return int the current modification count.
-     */
-    public int getModCount() {
-        return modCount.get();
-    }
-    
-    /**
-     *  Increases the modification count of this instance.
-     *
-     * @return modification count
-     */
-    protected synchronized int incModCount() {
-        return modCount.incrementAndGet();
-    }
-    
-    /**
-     * Puts a service parameter in the service parameters table
-     * under the given key. The key is usually a ModuleClassID. This method
-     * makes a clone of the  given element into an independent document.
-     *
-     * @param key   The key.
-     * @param param The parameter document.
-     */
-    public void putServiceParam(ID key, Element param) {
-        incModCount();
-        
-        params.remove(key);
-        ads.remove(key);
-        
-        if (param == null) {
-            return;
-        }
-        
-        boolean isDisabled = false;
-        
-        if (param instanceof XMLElement) {
-            Enumeration<XMLElement> isOff = param.getChildren("isOff");
-            
-            isDisabled = isOff.hasMoreElements();
-            
-            Advertisement adv = null;
-            
-            try {
-                adv = AdvertisementFactory.newAdvertisement((XMLElement) param);
-            } catch (RuntimeException ignored) {
-                // ignored
-                ;
-            }
-            
-            if (null != adv) {
-                setSvcConfigAdvertisement(key,adv, !isDisabled);
-                return;
-            }
-        }
-        
-        StructuredDocument newDoc = StructuredDocumentUtils.copyAsDocument(param);
-        
-        if(isDisabled) {
-            disabled.add(key);
-        } else {
-            disabled.remove(key);
-        }
-
-        params.put(key, newDoc);
-    }
-    
-        
-    /**
-     * Puts an advertisement into the service parameters table under the given
-     * key. The key is usually a {@code ModuleClassID}. This method makes a
-     * clone of the advertisement.
-     *
-     * @param key The key.
-     * @param adv The advertisement, a clone of which is stored or {@code null}
-     * to forget this key.
-     */
-    public void setSvcConfigAdvertisement(ID key, Advertisement adv) {
-        setSvcConfigAdvertisement(key, adv, true);
-    }
-    
-    /**
-     * Puts an advertisement into the service parameters table under the given
-     * key. The key is usually a {@code ModuleClassID}. This method makes a
-     * clone of the advertisement.
-     *
-     * @param key The key.
-     * @param adv The advertisement, a clone of which is stored or {@code null}
-     * to forget this key.
-     * @param enabled If true then the service is enabled or disabled if false.
-     */
-    public void setSvcConfigAdvertisement(ID key, Advertisement adv, boolean enabled) {
-        incModCount();
-        
-        params.remove(key);
-        ads.remove(key);
-        
-        if(enabled) {
-            disabled.remove(key);
-        } else {
-            disabled.add(key);
-        }
-
-        if (null == adv) {
-            return;
-        }
-        
-        try {
-            ads.put(key, adv.clone());
-        } catch (CloneNotSupportedException failed) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Unclonable Advertisements may not be used : " + adv.getClass().getName(), failed);
-            }
-                
-            throw new IllegalArgumentException("Unclonable Advertisements may not be used : " + adv.getClass().getName());
-        }        
-    }
-    
-    /**
-     * Gets an advertisement from the service parameters table under the given
-     * key. The key is usually a {@code ModuleClassID}. This method makes a
-     * clone of the advertisement.
-     *
-     * @param key The key.
-     * @return If {@code true} then the service is enabled otherwise {@false} if
-     * the service is disabled.
-     */
-    public boolean isSvcEnabled(ID key) {
-        return !disabled.contains(key);
-    }
-    
-    /**
-     * Gets an advertisement from the service parameters table under the given
-     * key. The key is usually a {@code ModuleClassID}. This method makes a
-     * clone of the advertisement.
-     *
-     * @param key The key.
-     * @return The advertisement for the specified key otherwise {@code null}.
-     */
-    public Advertisement getSvcConfigAdvertisement(ID key) {
-        Advertisement adv = ads.get(key);
-        
-        if (null == adv) {
-            if (params.containsKey(key)) {
-                throw new IllegalStateException("Unable to return advertisement, params are not an advertisement.");
-            }
-            
-            return null;
-        }
-        
-        try {
-            return adv.clone();
-        } catch (CloneNotSupportedException failed) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Unclonable Advertisements may not be used : " + adv.getClass().getName(), failed);
-            }
-
-            throw new IllegalArgumentException("Unclonable Advertisements may not be used : " + adv.getClass().getName());
-        }
-    }
-    
-    /**
-     * Returns the parameter element that matches the given key from the
-     * service parameters table. The key is of a subclass of ID; usually a
-     * ModuleClassID.
-     *
-     * @param key The key.
-     * @return StructuredDocument The matching parameter document or null if
-     *         none matched.
-     */
-    public StructuredDocument getServiceParam(ID key) {
-        StructuredDocument param = params.get(key);
-        
-        if (param == null) {
-            Advertisement ad = ads.get(key);
-
-            if (null == ad) {
-                return null;
-            }
-            
-            return (XMLDocument) ad.getDocument(MimeMediaType.XMLUTF8);
-        }
-        
-        StructuredDocument newDoc = StructuredDocumentUtils.copyAsDocument(param);
-        
-        if(disabled.contains(key)) {
-            Enumeration<Element> isOffAlready = newDoc.getChildren("isOff");
-            
-            if(!isOffAlready.hasMoreElements()) {
-                newDoc.appendChild(newDoc.createElement("isOff", null));
-            }
-        }
-
-        return newDoc;
-    }
-    
-    /**
-     * Removes and returns the parameter element that matches the given key
-     * from the service parameters table. The key is of a subclass of ID;
-     * usually a ModuleClassID.
-     *
-     * @param key The key.
-     *
-     * @return The removed parameter element or {@code null} if not found.
-     */
-    public StructuredDocument removeServiceParam(ID key) {
-        
-        StructuredDocument param = params.remove(key);
-        
-        if (param == null) {
-            Advertisement ad = ads.remove(key);
-
-            if (null == ad) {
-                return null;
-            }
-            
-            return (XMLDocument) ad.getDocument(MimeMediaType.XMLUTF8);
-        } else {
-            ads.remove(key);
-        }
-        
-        incModCount();
-        
-        // It sound silly to clone it, but remember that we could be sharing
-        // this element with a clone of ours, so we have the duty to still
-        // protect it.
-        
-        StructuredDocument newDoc = StructuredDocumentUtils.copyAsDocument(param);
-        
-        if(disabled.contains(key)) {
-            newDoc.appendChild(newDoc.createElement("isOff", null));
-            disabled.remove(key);
-        }
-        
-        return newDoc;
-    }
-    
-    /**
-     * Removes any parameters for the given key from the service parameters
-     * table.
-     *
-     * @param key The key.
-     */
-    public void removeSvcConfigAdvertisement(ID key) {
-        incModCount();
-        
-        params.remove(key);
-        ads.remove(key);
-    }
-    
-    /**
-     * Returns the set of params held by this object. The parameters are not
-     * copied and any changes to the Set are reflected in this object's version.
-     * incModCount should be called as appropriate.
-     *
-     *  @deprecated This method exposes the internal data structures of the
-     *  advertisement and will be removed in order to prevent unexpected
-     *  behaviour.
-     */
-    @Deprecated
-    public Set<Map.Entry<ID, StructuredDocument>> getServiceParamsEntrySet() {
-        Map<ID, StructuredDocument> result = new HashMap<ID, StructuredDocument>();
-        
-        result.putAll(params);
-        
-        for (Map.Entry<ID, Advertisement> anEntry : ads.entrySet()) {
-            XMLDocument entryDoc = (XMLDocument) anEntry.getValue().getDocument(MimeMediaType.XMLUTF8);
-            
-            if(disabled.contains(anEntry.getKey())) {
-                entryDoc.appendChild(entryDoc.createElement("isOff", null));
-            }
-
-            result.put(anEntry.getKey(), entryDoc);
-        }
-        
-        return Collections.unmodifiableSet(result.entrySet());
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/DiscoveryQueryMsg.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/DiscoveryQueryMsg.java
deleted file mode 100644 (file)
index 6d5930c..0000000
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.protocol;
-
-
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Document;
-import net.jxta.document.MimeMediaType;
-
-
-/**
- * This class defines the Discovery Service message "Query". The default
- * behavior of this abstract class is simply a place holder for the generic
- * resolver query fields.
- *
- * @see net.jxta.discovery.DiscoveryService
- * @see net.jxta.protocol.DiscoveryResponseMsg
- */
-
-public abstract class DiscoveryQueryMsg {
-
-    private PeerAdvertisement peerAdvertisement = null;
-
-    /**
-     * default threshold to limit the number of responses from one peer
-     */
-    private int threshold = 10;
-
-    /**
-     * FIXME 20030227 bondolo@jxta.org not a great default...
-     */
-    private int type = DiscoveryService.PEER;
-
-    private String attr = null;
-    private String value = null;
-
-    /**
-     * returns the Attr value
-     *
-     * @return String value of Attribute
-     */
-    public String getAttr() {
-        return attr;
-    }
-
-    /**
-     * Get the response type
-     *
-     * @return int PEER, or GROUP discovery type response
-     */
-    public int getDiscoveryType() {
-        return type;
-    }
-
-    /**
-     * Write advertisement into a document. asMimeType is a mime media-type
-     * specification and provides the form of the document which is being
-     * requested. Two standard document forms are defined. "text/text" encodes
-     * the document in a form nice for printing out, and "text/xml" which
-     * provides an XML representation.
-     *
-     * @param asMimeType mime-type format requested
-     * @return Document representation of the document as an
-     *         advertisement
-     */
-    public abstract Document getDocument(MimeMediaType asMimeType);
-
-    /**
-     * returns the responding peer advertisement
-     *
-     * @return String handlername name
-     * @deprecated Peer Advertisement is available directly via
-     *             {@link #getPeerAdvertisement()}.
-     */
-    @Deprecated
-    public String getPeerAdv() {
-        if (null != peerAdvertisement) {
-            return peerAdvertisement.toString();
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * returns the querying peer's advertisement
-     *
-     * @return peer advertisement of querier.
-     */
-    public PeerAdvertisement getPeerAdvertisement() {
-        return peerAdvertisement;
-    }
-
-    /**
-     * returns the responding peer's advertisement
-     *
-     * @param newAdv peer advertisement of querier.
-     */
-    public void setPeerAdvertisement(PeerAdvertisement newAdv) {
-        peerAdvertisement = newAdv;
-    }
-
-    /**
-     * Get the Threshold for number of responses
-     *
-     * @return int threshold
-     */
-    public int getThreshold() {
-        return threshold;
-    }
-
-    /**
-     * returns the value of Attr
-     *
-     * @return String
-     */
-    public String getValue() {
-        return value;
-    }
-
-    /**
-     * set the attr
-     *
-     * @param attr attribute of the query
-     */
-    public void setAttr(String attr) {
-        this.attr = attr;
-    }
-
-    /**
-     * set the Response type whether it's peer, or group discovery
-     *
-     * @param type type of discovery
-     */
-    public void setDiscoveryType(int type) {
-        // FIXME 20030227 bondolo@jxta.org This should be value checked.
-        this.type = type;
-    }
-
-    /**
-     * set the threshold
-     *
-     * @param threshold value to be set
-     */
-    public void setThreshold(int threshold) {
-        this.threshold = threshold;
-    }
-
-    /**
-     * set the query
-     *
-     * @param value value of the attribute to query
-     */
-    public void setValue(String value) {
-        this.value = value;
-    }
-
-    /**
-     * All messages have a type (in xml this is &#0033;doctype) which
-     * identifies the message
-     *
-     * @return String "jxta:DiscoveryQuery"
-     */
-    public static String getAdvertisementType() {
-        return "jxta:DiscoveryQuery";
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/DiscoveryResponseMsg.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/DiscoveryResponseMsg.java
deleted file mode 100644 (file)
index 7e49fdc..0000000
+++ /dev/null
@@ -1,379 +0,0 @@
-/*
- * Copyright(c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.protocol;
-
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.io.StringReader;
-import java.io.UnsupportedEncodingException;
-import java.util.*;
-
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Document;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.XMLDocument;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-
-/**
- *  This class defines the DiscoveryService message "Response". <p/>
- *
- *  The default behavior of this abstract class is simply a place holder for the
- *  generic resolver query fields. This message is the response to the
- *  DiscoveryQueryMsg.
- *
- *@see    net.jxta.discovery.DiscoveryService
- *@see    net.jxta.protocol.DiscoveryQueryMsg
- */
-public abstract class DiscoveryResponseMsg {
-    
-    /**
-     *  Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(DiscoveryResponseMsg.class.getName());
-    
-    /**
-     *  attribute used by the query
-     */
-    protected String attr = null;
-    
-    /**
-     *  Responding peer's advertisement
-     */
-    protected PeerAdvertisement peerAdvertisement = null;
-    
-    /**
-     * The advertisement responses serialized into strings.
-     */
-    protected final List<String> responses = new ArrayList<String>(0);
-    
-    /**
-     *  The advertisement responses deserialized.
-     */
-    protected final List<Advertisement> advertisements = new ArrayList<Advertisement>(0);
-    
-    /**
-     *  Expirations
-     */
-    protected final List<Long> expirations = new ArrayList<Long>(0);
-    
-    /**
-     *  Advertisement type used by the query
-     *
-     *  <p/>FIXME 20040514 bondolo@jxta.org not a great default...
-     */
-    protected int type = DiscoveryService.PEER;
-    
-    /**
-     *  Value used by the query
-     */
-    protected String value = null;
-    
-    /**
-     *  All messages have a type(in xml this is !doctype) which identifies the
-     *  message
-     *
-     * @return    String "jxta:ResolverResponse"
-     */
-    public static String getAdvertisementType() {
-        return "jxta:DiscoveryResponse";
-    }
-    
-    /**
-     *  Get the response type
-     *
-     * @return int type of discovery message PEER, GROUP or ADV discovery type
-     *      response
-     */
-    public int getDiscoveryType() {
-        return type;
-    }
-    
-    /**
-     *  set the Response type whether it's peer, or group discovery
-     *
-     * @param  type  int representing the type
-     */
-    public void setDiscoveryType(int type) {
-        this.type = type;
-    }
-    
-    /**
-     *  Write advertisement into a document. asMimeType is a mime media-type
-     *  specification and provides the form of the document which is being
-     *  requested. Two standard document forms are defined. "text/text" encodes
-     *  the document in a form nice for printing out and "text/xml" which
-     *  provides an XML format.
-     *
-     * @param  asMimeType  mime-type requested
-     * @return             Document document that represents the advertisement
-     */
-    
-    public abstract Document getDocument(MimeMediaType asMimeType);
-    
-    /**
-     *  returns the responding peer's advertisement
-     *
-     * @return the Peer's advertisement
-     */
-    public PeerAdvertisement getPeerAdvertisement() {
-        return peerAdvertisement;
-    }
-    
-    /**
-     *  Sets the responding peer's advertisement
-     *
-     * @param newAdv the responding Peer's advertisement
-     */
-    public void setPeerAdvertisement(PeerAdvertisement newAdv) {
-        peerAdvertisement = newAdv;
-    }
-    
-    /**
-     * returns the attributes used by the query
-     *
-     * @return    String attribute of the query
-     */
-    public String getQueryAttr() {
-        return attr;
-    }
-    
-    /**
-     *  returns the value used by the query
-     *
-     *@return    String value used by the query
-     */
-    public String getQueryValue() {
-        return value;
-    }
-    
-    /**
-     *  Get the response count
-     *
-     * @return    int count
-     */
-    public int getResponseCount() {
-        if (expirations.isEmpty() && (peerAdvertisement != null) && (type == DiscoveryService.PEER)) {
-            return 1;
-        } else {
-            return responses.size();
-        }
-    }
-    
-    /**
-     *  Gets the expirations attribute of the DiscoveryResponseMsg object
-     *
-     * @return    The expirations value
-     */
-    public Enumeration<Long> getExpirations() {
-        if (expirations.isEmpty() && (peerAdvertisement != null) && (type == DiscoveryService.PEER)) {
-            // this takes care of the case where the only response is the peerAdv
-            expirations.add(DiscoveryService.DEFAULT_EXPIRATION);
-        }
-        
-        return Collections.enumeration(expirations);
-    }
-    
-    /**
-     * set the expirations for this query
-     *
-     * @param  expirations  the expirations for this query
-     */
-    public void setExpirations(List<Long> expirations) {
-        this.expirations.clear();
-        this.expirations.addAll(expirations);
-    }
-    
-    /**
-     * returns the response(s)
-     *
-     * @return    Enumeration of String responses
-     */
-    public Enumeration<String> getResponses() {
-        if (responses.isEmpty() && (peerAdvertisement != null) && (type == DiscoveryService.PEER)) {
-            // this takes care of the case where the only response is the peerAdv
-            responses.add(peerAdvertisement.toString());
-        }
-        
-        return Collections.enumeration(responses);
-    }
-    
-    /**
-     *  Set the responses to the query. The responses may be either
-     *  {@code Advertisement}, {@code String} or {@code InputStream}.
-     *
-     *  @param  responses List of responses
-     */
-    public void setResponses(List responses) {
-        this.responses.clear();
-        
-        for (Object response : responses) {
-            if (response instanceof Advertisement) {
-                this.responses.add(((Advertisement) response).getDocument(MimeMediaType.XMLUTF8).toString());
-            } else if (response instanceof String) {
-                this.responses.add((String) response);
-            } else if (response instanceof InputStream) {
-                String result = streamToString((InputStream) response);
-                
-                if (null != result) {
-                    this.responses.add(result);
-                }
-            } else {
-                throw new IllegalArgumentException("Non-String or InputStream response recevied.");
-            }
-        }
-    }
-
-    /**
-     *  Reads in a stream into a string
-     *
-     *  @param  is  inputstream
-     *  @return     string representation of a stream
-     */
-    private String streamToString(InputStream is) {
-        Reader reader = null;
-        
-        try {
-            reader = new InputStreamReader(is, "UTF-8");
-        } catch (UnsupportedEncodingException impossible) {
-            throw new Error("UTF-8 encoding not supported?!?");
-        }
-        
-        StringBuilder stw = new StringBuilder();
-        char[] buf = new char[512];
-
-        try {
-            do {
-                int c = reader.read(buf);
-
-                if (c == -1) {
-                    break;
-                }
-                stw.append(buf, 0, c);
-            } while (true);
-        } catch (IOException ie) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Got an Exception during stream conversion", ie);
-            }
-            return null;
-        } finally {
-            try {
-                is.close();
-            } catch (IOException ignored) {}
-        }
-
-        return stw.toString();
-    }
-    
-    /**
-     *  Set the attribute used by the query
-     *
-     *  @param  attr query attribute
-     */
-    public void setQueryAttr(String attr) {
-        this.attr = attr;
-    }
-    
-    /**
-     *  Set the value used by the query
-     *
-     *  @param  value Query value
-     */
-    public void setQueryValue(String value) {
-        this.value = value;
-    }
-    
-    /**
-     * Get the responses to the query as advertisements.
-     *
-     * @return The response advertisements.
-     */
-    public Enumeration<Advertisement> getAdvertisements() {
-        if (responses.isEmpty() && (peerAdvertisement != null) && (type == DiscoveryService.PEER)) {
-            // this takes care of the case where the only response is the peerAdv
-            return Collections.enumeration(Collections.singletonList((Advertisement) peerAdvertisement));
-        }
-        
-        if (advertisements.isEmpty() && !responses.isEmpty()) {
-            // Convert the responses.
-            for (String aResponse : responses) {
-                try {
-                    XMLDocument anXMLDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8
-                            ,
-                            new StringReader(aResponse));
-                    Advertisement anAdv = AdvertisementFactory.newAdvertisement(anXMLDoc);
-                    
-                    advertisements.add(anAdv);
-                } catch (IOException badAdvertisement) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Invalid response in message : ", badAdvertisement);
-                    }
-                }
-            }
-        }
-        
-        return Collections.enumeration(advertisements);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/ModuleClassAdvertisement.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/ModuleClassAdvertisement.java
deleted file mode 100644 (file)
index 1934ecf..0000000
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.protocol;
-
-
-import net.jxta.document.Element;
-import net.jxta.document.ExtendableAdvertisement;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.id.ID;
-import net.jxta.platform.ModuleClassID;
-
-
-/**
- * Formally documents the existence of a module class (identified by the
- * {@link net.jxta.platform.ModuleClassID} and may provide additional
- * descriptive metadata about the Module Class.
- *
- * @see net.jxta.platform.ModuleClassID
- */
-public abstract class ModuleClassAdvertisement extends ExtendableAdvertisement implements Cloneable {
-
-    /**
-     *  The module class id associated with the is advertisement.
-     */
-    private ModuleClassID id = null;
-    
-    /**
-     *  Informal, non-canonical name of module.
-     */
-    private String name = null;
-
-    /**
-     *  Descriptive meta-data about this module.
-     */
-    private Element description = null;
-
-    /**
-     *  Returns the identifying type of this Advertisement.
-     *
-     *  @return The type of advertisement.
-     */
-    public static String getAdvertisementType() {
-        return "jxta:MCA";
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public final String getBaseAdvType() {
-        return getAdvertisementType();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public ModuleClassAdvertisement clone() {
-        try {
-            ModuleClassAdvertisement clone = (ModuleClassAdvertisement) super.clone();
-
-            clone.setModuleClassID(getModuleClassID());
-            clone.setName(getName());
-            clone.setDesc(description);
-
-            return clone;
-        } catch (CloneNotSupportedException impossible) {
-            throw new Error("Object.clone() threw CloneNotSupportedException", impossible);
-        }   
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public ID getID() {
-        return id;
-    }
-
-    /**
-     * returns the name of the class
-     *
-     * @return String name of the class
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * sets the name of the class
-     *
-     * @param name name of the class to be set
-     *
-     */
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    /**
-     * returns the description
-     *
-     * @return String the description
-     */
-    public String getDescription() {
-        if (null != description) {
-            return (String) description.getValue();
-        } else {
-            return null;
-        }
-    }
-    
-    /**
-     * sets the description
-     *
-     * @param description the description
-     */
-    public void setDescription(String description) {
-        
-        if (null != description) {
-            StructuredDocument newdoc = StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "Desc", description);
-            
-            setDesc(newdoc);
-        } else {
-            this.description = null;
-        }       
-    }
-    
-    /**
-     * returns the description
-     *
-     * @return the description
-     */
-    public StructuredDocument getDesc() {
-        if (null != description) {
-            StructuredDocument newDoc = StructuredDocumentUtils.copyAsDocument(description);
-            
-            return newDoc;
-        } else {
-            return null;
-        }
-    }
-    
-    /**
-     * sets the description
-     *
-     * @param desc the description
-     */
-    public void setDesc(Element desc) {
-        
-        if (null != desc) {
-            this.description = StructuredDocumentUtils.copyAsDocument(desc);
-        } else {
-            this.description = null;
-        }
-    }
-    
-    /**
-     * returns the id of the class
-     *
-     * @return ModuleClassID the class id
-     */
-    public ModuleClassID getModuleClassID() {
-        return id;
-    }
-
-    /**
-     * sets the id of the class
-     *
-     * @param id The id of the class
-     */
-    public void setModuleClassID(ModuleClassID id) {
-        this.id = id;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/ModuleImplAdvertisement.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/ModuleImplAdvertisement.java
deleted file mode 100644 (file)
index 15f7e93..0000000
+++ /dev/null
@@ -1,374 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.protocol;
-
-
-import net.jxta.document.Element;
-import net.jxta.document.ExtendableAdvertisement;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.id.ID;
-import net.jxta.platform.ModuleSpecID;
-
-
-/**
- * A ModuleImplAdvertisement describes one of any number of published
- * implementations for a given specification.
- * <p/>
- * Module specifications are referenced by their ModuleSpecID. Given a
- * ModuleSpecID, a ModuleImplAdvertisement may be searched by means of JXTA
- * Discovery, filtered according to the compatibility statement it contains,
- * and if compatible, loaded and initialized. The {@code loadModule()} method of
- * PeerGroup performs this task automatically, given a ModuleSpecID.
- * <p/>
- * One significant example of Modules referenced and loaded in that manner are
- * the services and protocols that constitute a StdPeerGroup in the Java
- * reference implementation.
- *
- * @see net.jxta.id.ID
- * @see net.jxta.platform.ModuleSpecID
- * @see net.jxta.document.Advertisement
- * @see net.jxta.document.StructuredDocument
- * @see net.jxta.document.Element
- * @see net.jxta.protocol.ModuleSpecAdvertisement
- * @see net.jxta.peergroup.PeerGroup
- */
-public abstract class ModuleImplAdvertisement extends ExtendableAdvertisement implements Cloneable {
-    
-    private ModuleSpecID msid = null;
-    private StructuredDocument description = null;
-    private StructuredDocument compat = null;
-    private String code = null;
-    private String uri = null;
-    private String provider = null;
-    private StructuredDocument param = null;
-    
-    /**
-     *  Returns the identifying type of this Advertisement.
-     *
-     * @return String the type of advertisement
-     */
-    public static String getAdvertisementType() {
-        return "jxta:MIA";
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public final String getBaseAdvType() {
-        return getAdvertisementType();
-    }
-    
-    /**
-     * Clone this ModuleImplAdvertisement
-     */
-    @Override
-    public ModuleImplAdvertisement clone() {
-        
-        try {
-            ModuleImplAdvertisement clone = (ModuleImplAdvertisement) super.clone();
-            
-            clone.setModuleSpecID(getModuleSpecID());
-            clone.setDesc(getDescPriv());
-            clone.setCompat(getCompatPriv());
-            clone.setCode(getCode());
-            clone.setUri(getUri());
-            clone.setProvider(getProvider());
-            clone.setParam(getParamPriv());
-            
-            return clone;
-        } catch (CloneNotSupportedException impossible) {
-            throw new Error("Object.clone() threw CloneNotSupportedException", impossible);
-        }
-    }
-    
-    /**
-     * Returns the unique ID of that advertisement for indexing purposes.
-     * In that case we do not have any particular one to offer. Let the indexer
-     * hash the document.
-     *
-     * @return ID the unique id
-     */
-    @Override
-    public ID getID() {
-        return null;
-    }
-    
-    /**
-     * Returns the id of the spec that this implements.
-     * @return ID the spec id
-     *
-     */
-    public ModuleSpecID getModuleSpecID() {
-        return msid;
-    }
-    
-    /**
-     * Sets the id of the spec that is implemented
-     * 
-     * @param msid The id of the spec
-     */
-    public void setModuleSpecID(ModuleSpecID msid) {
-        this.msid = msid;
-    }
-    
-    /**
-     * returns the description
-     *
-     * @return String the description
-     */
-    public String getDescription() {
-        if (null != description) {
-            return (String) description.getValue();
-        } else {
-            return null;
-        }
-    }
-    
-    /**
-     * sets the description
-     *
-     * @param description the description
-     */
-    public void setDescription(String description) {
-        
-        if (null != description) {
-            StructuredDocument newdoc = StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "Desc", description);
-            
-            setDesc(newdoc);
-        } else {
-            this.description = null;
-        }
-    }
-    
-    /**
-     * returns the description
-     *
-     * @return the description
-     */
-    public StructuredDocument getDesc() {
-        if (null != description) {
-            StructuredDocument newDoc = StructuredDocumentUtils.copyAsDocument(description);
-            
-            return newDoc;
-        } else {
-            return null;
-        }
-    }
-    
-    /**
-     * Privileged version of {@link #getDesc()} that does not clone the elements.
-     *
-     * @return the description
-     */
-    public StructuredDocument getDescPriv() {
-        return description;
-    }
-    
-    /**
-     * sets the description
-     *
-     * @param desc the description
-     */
-    public void setDesc(Element desc) {
-        
-        if (null != desc) {
-            this.description = StructuredDocumentUtils.copyAsDocument(desc);
-        } else {
-            this.description = null;
-        }
-    }
-    /**
-     * Returns the opaque compatibility statement for this advertisement. Each
-     * JXTA implementation has the ability to recognize and evaluate it's own
-     * compatibility statements (even though it may not be able to evaluate the
-     * compatibility statements of other implementations).  
-     *
-     * @return The compatibility statement as a StructuredDocument of 
-     * unspecified content.
-     */
-    public StructuredDocument getCompat() {
-        return (compat == null ? null : StructuredDocumentUtils.copyAsDocument(compat));
-    }
-    
-    /**
-     * Privileged version of {@link #getCompat()} that does not clone the elements.
-     *
-     * @return The compatibility statement as a StructuredDocument of 
-     * unspecified content.
-     */
-    protected StructuredDocument getCompatPriv() {
-        return compat;
-    }
-    
-    /**
-     * Sets the module impl. compatibility statement.
-     *
-     * @param compat Element of an unspecified content.
-     */
-    public void setCompat(Element compat) {
-        this.compat = (compat == null ? null : StructuredDocumentUtils.copyAsDocument(compat));
-    }
-    
-    /**
-     * returns the code; a reference to or representation of the executable code
-     * advertised by this advertisement.
-     * <p/>
-     * The appropriate interpretation of the code value is dependant upon the 
-     * compatibility statement. Any compatible consumer of this advertisement   
-     * will be able to correctly interpret code value. The standard group 
-     * implementations of the JXSE reference implementation expect it to be a 
-     * reference to a jar file.
-     *
-     * @return A reference to the executable code described by this 
-     * advertisement.
-     */
-    public String getCode() {
-        return code;
-    }
-    
-    /**
-     * Sets the reference for the executable code described by this 
-     * advertisement.
-     *
-     * @param code A reference to the executable code described by this 
-     * advertisement.
-     */
-    public void setCode(String code) {
-        this.code = code;
-    }
-    
-    /**
-     * returns the uri; that is a reference to or representation of a package 
-     * from which the executable code referenced by the getCode method may be 
-     * loaded.
-     * <p/>
-     * The appropriate interpretation of the URI value is dependant upon the 
-     * compatibility statement. Any compatible consumer of this advertisement   
-     * will be able to correctly interpret the URI value. The standard group 
-     * implementations of the JXSE reference implementation expect it to be a 
-     * reference to a jar file.
-     *
-     * @return Location URI for the code described by this advertisement.
-     */
-    public String getUri() {
-        return uri;
-    }
-    
-    /**
-     * Sets the uri
-     *
-     * @param uri Location URI for the code described by this advertisement.
-     */
-    public void setUri(String uri) {
-        this.uri = uri;
-    }
-    
-    /**
-     * returns the provider
-     *
-     * @return String the provider
-     */
-    public String getProvider() {
-        return provider;
-    }
-    
-    /**
-     * sets the provider
-     *
-     * @param provider the provider
-     */
-    public void setProvider(String provider) {
-        this.provider = provider;
-    }
-    
-    /**
-     * returns the param element.
-     *
-     * The interpretation of the param element is entirely up to the code
-     * that this advertises. One valid use of it is to enable the code to
-     * be configured so that multiple specs or multiple implementations of
-     * one spec may use the same code.
-     *
-     * @return A standalone structured document of unspecified content.
-     */
-    public StructuredDocument getParam() {
-        return (param == null ? null : StructuredDocumentUtils.copyAsDocument(param));
-    }
-    
-    /**
-     * Privileged version of {@link #getParam()} that does not clone the elements.
-     *
-     * @return A standalone structured document of unspecified content.
-     */
-    protected StructuredDocument getParamPriv() {
-        return param;
-    }
-    
-    /**
-     * Sets the module param
-     *
-     * @param param Element of an unspecified content.
-     */
-    public void setParam(Element param) {
-        this.param = (param == null ? null : StructuredDocumentUtils.copyAsDocument(param));
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/ModuleSpecAdvertisement.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/ModuleSpecAdvertisement.java
deleted file mode 100644 (file)
index 5b91208..0000000
+++ /dev/null
@@ -1,404 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.protocol;
-
-
-import net.jxta.document.Element;
-import net.jxta.document.ExtendableAdvertisement;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.id.ID;
-import net.jxta.platform.ModuleSpecID;
-
-
-/**
- * Provides the references that describe a module specification. Typically this
- * includes references to the documentation needed in order to create conforming
- * implementations of the specification. A secondary use is, optionally, to make 
- * running instances usable remotely, by publishing any or all of the following:
- * <br><ul>
- *    <li> PipeAdvertisement
- *    <li> ModuleSpecID of a proxy module
- *    <li> ModuleSpecID of an authenticator module
- * </ul>
- * <p/>
- * Not all modules are usable remotely, it is up to the specification creator to
- * make that choice. However, if the specification dictates it, all
- * implementations can be expected to support it.
- * <p/>
- * Note that the Standard PeerGroup implementation included with the JXSE
- * reference implementation does <em>not</em> support replacing a group service 
- * with a pipe to a remote instance. However, nothing prevents a particular
- * implementation of a group from using a proxy module in place of the fully
- * version; provided that the API (and therefore the ClassIDs) of the proxy and
- * local versions are identical.
- * <p/>
- * Note also that in the case of the local+proxy style, it is up to the
- * implementation of both sides to figure-out which pipe to listen to or connect
- * to. The safest method is probably for the full version to seek its own
- * ModuleSpecAdvertisement, and for the proxy version to accept the full
- * version's ModuleSpecAdvertisement as a parameter. Alternatively, if the proxy
- * version is completely dedicated to the specification that it proxies, both
- * sides may have the PipeID and type hard-coded.
- * 
- * @see net.jxta.platform.ModuleSpecID
- * @see net.jxta.protocol.PipeAdvertisement
- * @see net.jxta.protocol.ModuleClassAdvertisement
- * @see net.jxta.protocol.ModuleImplAdvertisement
- * @see net.jxta.document.Advertisement
- */
-public abstract class ModuleSpecAdvertisement extends ExtendableAdvertisement implements Cloneable {
-
-    private ModuleSpecID id = null;
-    private String name = null;
-    private Element description = null;
-    private String creator = null;
-    private String uri = null;
-    private String version = null;
-    private PipeAdvertisement pipeAdv = null;
-    private ModuleSpecID proxySpecID = null;
-    private ModuleSpecID authSpecID = null;
-    private StructuredDocument param = null;
-
-    /**
-     *  Returns the identifying type of this Advertisement.
-     *
-     * @return String the type of advertisement
-     **/
-    public static String getAdvertisementType() {
-        return "jxta:MSA";
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    @Override
-    public final String getBaseAdvType() {
-        return getAdvertisementType();
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    @Override
-    public ModuleSpecAdvertisement clone() {
-        try {
-            ModuleSpecAdvertisement clone = (ModuleSpecAdvertisement) super.clone();
-
-            clone.setModuleSpecID(getModuleSpecID());
-            clone.setName(getName());
-            clone.setDesc(getDesc());
-            clone.setCreator(getCreator());
-            clone.setSpecURI(getSpecURI());
-            clone.setVersion(getVersion());
-            clone.setPipeAdvertisement(getPipeAdvertisement());
-            clone.setProxySpecID(getProxySpecID());
-            clone.setAuthSpecID(getAuthSpecID());
-            clone.setParam(param);
-
-            return clone;
-        } catch (CloneNotSupportedException impossible) {
-            throw new Error("Object.clone() threw CloneNotSupportedException", impossible);
-        }
-    }
-
-    /**
-     * returns a unique id for that adv for the purpose of indexing.
-     * The spec id uniquely identifies this advertisement.
-     *
-     * @return ID the spec id as a basic ID.
-     *
-     */    
-    @Override
-    public ID getID() {
-        return id;
-    }
-    
-    /**
-     * returns the id of the spec
-     *
-     * @return ModuleSpecID the spec id
-     **/
-    public ModuleSpecID getModuleSpecID() {
-        return id;
-    }
-
-    /**
-     * sets the id of the spec
-     *
-     * @param id The id of the spec
-     **/
-    public void setModuleSpecID(ModuleSpecID id) {
-        this.id = id;
-    }
-
-    /**
-     * returns the name of the module spec
-     *
-     * @return String name of the module spec
-     **/
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * sets the name of the module spec
-     *
-     * @param name name of the module spec to be set
-     **/
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    /**
-     * returns the description
-     *
-     * @return String the description
-     **/
-    public String getDescription() {
-        if (null != description) {
-            return (String) description.getValue();
-        } else {
-            return null;
-        }
-    }
-    
-    /**
-     * sets the description
-     *
-     * @param description the description
-     **/
-    public void setDescription(String description) {
-        
-        if (null != description) {
-            StructuredDocument newdoc = StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "Desc", description);
-            
-            setDesc(newdoc);
-        } else {
-            this.description = null;
-        }
-    }
-    
-    /**
-     * returns the description
-     *
-     * @return the description
-     **/
-    public StructuredDocument getDesc() {
-        if (null != description) {
-            StructuredDocument newDoc = StructuredDocumentUtils.copyAsDocument(description);
-            
-            return newDoc;
-        } else {
-            return null;
-        }
-    }
-    
-    /**
-     * sets the description
-     *
-     * @param desc the description
-     **/
-    public void setDesc(Element desc) {
-        
-        if (null != desc) {
-            this.description = StructuredDocumentUtils.copyAsDocument(desc);
-        } else {
-            this.description = null;
-        }
-    }
-
-    /**
-     * Returns the creator of the module spec, in case someone cares.
-     *
-     * @return String the creator.
-     **/
-    public String getCreator() {
-        return creator;
-    }
-
-    /**
-     * Sets the creator of this module spec.
-     * Note: the usefulness of this is unclear.
-     *
-     * @param creator name of the creator of the module
-     **/
-    public void setCreator(String creator) {
-        this.creator = creator;
-    }
-
-    /**
-     * returns the uri. This uri normally points at the actual specification
-     * that this advertises.
-     *
-     * @return String uri
-     **/
-    public String getSpecURI() {
-        return uri;
-    }
-    /**
-     * sets the uri
-     *
-     * @param uri string uri
-     **/
-    public void setSpecURI(String uri) {
-        this.uri = uri;
-    }
-
-    /**
-     * returns the specification version number
-     *
-     * @return String version number
-     **/
-    public String getVersion() {
-        return version;
-    }
-  
-    /**
-     * sets the version of the module
-     *
-     * @param version  version number
-     **/
-    public void setVersion(String version) {
-        this.version = version;
-    }
-
-    /**
-     * returns the param element.
-     *
-     * @return Element parameters as an Element of unspecified content.
-     **/
-    public StructuredDocument getParam() {
-        return (param == null ? null : StructuredDocumentUtils.copyAsDocument(param));
-    }
-    
-    /**
-     * Privileged version of {@link #getParam()} that does not clone the elements.
-     *
-     * @return StructuredDocument A stand-alone structured document of
-     * unspecified content.
-     **/
-    protected StructuredDocument getParamPriv() {
-        return param;
-    }
-
-    /**
-     * sets the param element.
-     *
-     * @param param Element of an unspecified content.
-     **/
-    public void setParam(Element param) {
-        this.param = (param == null ? null : StructuredDocumentUtils.copyAsDocument(param));
-    }
-
-    /**
-     * returns the embedded pipe advertisement if any.
-     *
-     * @return PipeAdvertisement the Pipe Advertisement. null if none exists.
-     **/
-    public PipeAdvertisement getPipeAdvertisement() {
-        return (pipeAdv == null ? null : pipeAdv.clone());
-    }
-
-    /**
-     * sets an embedded pipe advertisement.
-     *
-     * @param pipeAdv the Pipe Advertisement. null is authorized.
-     **/
-    public void setPipeAdvertisement(PipeAdvertisement pipeAdv) {
-        this.pipeAdv = (pipeAdv == null ? null : pipeAdv.clone());
-    }
-
-    /**
-     * returns the specID of a proxy module.
-     *
-     * @return ModuleSpecID the spec id
-     **/
-    public ModuleSpecID getProxySpecID() {
-        return proxySpecID;
-    }
-
-    /**
-     * sets a proxy module specID
-     *
-     * @param proxySpecID The spec id
-     **/
-    public void setProxySpecID(ModuleSpecID proxySpecID) {
-        this.proxySpecID = proxySpecID;
-    }
-
-    /**
-     * returns the specID of an authenticator module.
-     *
-     * @return ModuleSpecID the spec id
-     **/
-    public ModuleSpecID getAuthSpecID() {
-        return authSpecID;
-    }
-
-    /**
-     * sets an authenticator module specID
-     *
-     * @param authSpecID The spec id
-     **/
-    public void setAuthSpecID(ModuleSpecID authSpecID) {
-        this.authSpecID = authSpecID;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/PeerAdvertisement.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/PeerAdvertisement.java
deleted file mode 100644 (file)
index 9ffc16b..0000000
+++ /dev/null
@@ -1,456 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.protocol;
-
-
-import java.io.ByteArrayInputStream;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import net.jxta.document.Element;
-import net.jxta.document.ExtendableAdvertisement;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.logging.Logging;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroupID;
-
-
-/**
- * Generated when instantiating a group on a peer and contains all the
- * parameters that services need to publish. It is then published within the
- * group.
- */
-public abstract class PeerAdvertisement extends ExtendableAdvertisement implements Cloneable {
-
-    /**
-     * Logger
-     */
-    private static final Logger LOG = Logger.getLogger(PeerAdvertisement.class.getName());
-
-    /**
-     * The id of this peer.
-     */
-    private PeerID pid = null;
-
-    /**
-     * The group in which this peer is located.
-     */
-    private PeerGroupID gid = null;
-
-    /**
-     * The name of this peer. Not guaranteed to be unique in any way. May be empty or
-     * null.
-     */
-    private String name = null;
-
-    /**
-     * Descriptive meta-data about this peer.
-     */
-    private Element description = null;
-
-    /**
-     * A table of structured documents to be interpreted by each service.
-     */
-    private final Map<ID, StructuredDocument> serviceParams = new HashMap<ID, StructuredDocument>();
-
-    /**
-     * Counts the changes made to this object. We rely on implementations to
-     * increment modCount every time something is changed without going through
-     * the API.
-     */
-    private final transient AtomicInteger modCount = new AtomicInteger(0);
-
-    /**
-     * Returns the number of times this object has been modified since
-     * it was created. This permits to detection of local changes that require
-     * refreshing of other data which depends upon the peer advertisement.
-     *
-     * @return int the current modification count.
-     */
-
-    public int getModCount() {
-        return modCount.get();
-    }
-
-    /**
-     * Increments the modification count for this peer advertisement.
-     */
-    protected int incModCount() {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            Throwable trace = new Throwable("Stack Trace");
-            StackTraceElement elements[] = trace.getStackTrace();
-
-            LOG.finer("Modification #" + (getModCount() + 1) + " to PeerAdv@" + Integer.toHexString(System.identityHashCode(this))
-                    + " caused by : " + "\n\t" + elements[1] + "\n\t" + elements[2]);
-        }
-
-        return modCount.incrementAndGet();
-    }
-
-    /**
-     * Returns the identifying type of this Advertisement.
-     *
-     * @return String the type of advertisement
-     */
-    public static String getAdvertisementType() {
-        return "jxta:PA";
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public final String getBaseAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public PeerAdvertisement clone() {
-
-        try {
-            PeerAdvertisement clone = (PeerAdvertisement) super.clone();
-
-            clone.setPeerID(getPeerID());
-            clone.setPeerGroupID(getPeerGroupID());
-            clone.setName(getName());
-            clone.setDesc(getDesc());
-            clone.setServiceParams(getServiceParams());
-
-            return clone;
-        } catch (CloneNotSupportedException impossible) {
-            throw new Error("Object.clone() threw CloneNotSupportedException", impossible);
-        }
-    }
-
-    /**
-     * returns the name of the peer.
-     *
-     * @return String name of the peer.
-     */
-
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * sets the name of the peer.
-     *
-     * @param name name of the peer.
-     */
-
-    public void setName(String name) {
-        this.name = name;
-        incModCount();
-    }
-
-    /**
-     * Returns the id of the peer.
-     *
-     * @return PeerID the peer id
-     */
-
-    public PeerID getPeerID() {
-        return pid;
-    }
-
-    /**
-     * Sets the id of the peer.
-     *
-     * @param pid the id of this peer.
-     */
-
-    public void setPeerID(PeerID pid) {
-        this.pid = pid;
-        incModCount();
-    }
-
-    /**
-     * Returns the id of the peergroup this peer advertisement is for.
-     *
-     * @return PeerGroupID the peergroup id
-     */
-
-    public PeerGroupID getPeerGroupID() {
-        return gid;
-    }
-
-    /**
-     * Returns the id of the peergroup this peer advertisement is for.
-     *
-     * @param gid The id of the peer.
-     */
-
-    public void setPeerGroupID(PeerGroupID gid) {
-        this.gid = gid;
-        incModCount();
-    }
-
-    /**
-     * Returns a unique ID for that peer X group intersection. This is for
-     * indexing purposes only.
-     *
-     * @return ID the unique ID
-     */
-    @Override
-    public ID getID() {
-        // If it is incomplete, there's no meaningful ID that we can return.
-        if (gid == null || pid == null) {
-            return null;
-        }
-
-        try {
-            String hashValue = getAdvertisementType() + gid.getUniqueValue().toString() + pid.getUniqueValue().toString();
-            byte[] seed = hashValue.getBytes("UTF-8");
-
-            return IDFactory.newCodatID(gid, seed, new ByteArrayInputStream(seed));
-        } catch (Exception failed) {
-            return null;
-        }
-    }
-
-    /**
-     * returns the description
-     *
-     * @return String the description
-     */
-    public String getDescription() {
-        if (null != description) {
-            return (String) description.getValue();
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * sets the description
-     *
-     * @param description the description
-     * @since JXTA 1.0
-     */
-    public void setDescription(String description) {
-
-        if (null != description) {
-            StructuredDocument newdoc = StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "Desc", description);
-
-            setDesc(newdoc);
-        } else {
-            this.description = null;
-        }
-
-        incModCount();
-    }
-
-    /**
-     * returns the description
-     *
-     * @return the description
-     */
-    public StructuredDocument getDesc() {
-        if (null != description) {
-            StructuredDocument newDoc = StructuredDocumentUtils.copyAsDocument(description);
-
-            return newDoc;
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * sets the description
-     *
-     * @param desc the description
-     */
-    public void setDesc(Element desc) {
-
-        if (null != desc) {
-            this.description = StructuredDocumentUtils.copyAsDocument(desc);
-        } else {
-            this.description = null;
-        }
-
-        incModCount();
-    }
-
-    /**
-     * sets the sets of parameters for all services. This method first makes a
-     * deep copy, in order to protect the active information from uncontrolled
-     * sharing. This quite an expensive operation. If only a few of the
-     * parameters need to be added, it is wise to use putServiceParam()
-     * instead.
-     *
-     * @param params The whole set of parameters.
-     */
-    public void setServiceParams(Hashtable<ID, ? extends Element> params) {
-        serviceParams.clear();
-
-        if (params == null) {
-            return;
-        }
-
-        for (Map.Entry<ID, ? extends Element> anEntry : params.entrySet()) {
-            Element e = anEntry.getValue();
-            StructuredDocument newDoc = StructuredDocumentUtils.copyAsDocument(e);
-
-            serviceParams.put(anEntry.getKey(), newDoc);
-        }
-
-        incModCount();
-    }
-
-    /**
-     * Returns the sets of parameters for all services.
-     *
-     * <p/>This method returns a deep copy, in order to protect the real
-     * information from uncontrolled sharing while keeping it shared as long as
-     * it is safe. This quite an expensive operation. If only a few parameters
-     * need to be accessed, it is wise to use getServiceParam() instead.
-     *
-     * @return all of the parameters.
-     */
-    public Hashtable<ID, StructuredDocument> getServiceParams() {
-        Hashtable<ID, StructuredDocument> copy = new Hashtable<ID, StructuredDocument>();
-
-        for (Map.Entry<ID, StructuredDocument> anEntry : serviceParams.entrySet()) {
-            Element e = anEntry.getValue();
-            StructuredDocument newDoc = StructuredDocumentUtils.copyAsDocument(e);
-
-            copy.put(anEntry.getKey(), newDoc);
-        }
-
-        return copy;
-    }
-
-    /**
-     * Puts a service parameter in the service parameters table under the given
-     * key. The key is of a subclass of ID; usually a ModuleClassID. This
-     * method makes a deep copy of the given element into an independent
-     * document.
-     *
-     * @param key   The key.
-     * @param param The parameter, as an element. What is stored is a copy as a
-     *              standalone StructuredDocument which type is the element's name.
-     */
-    public void putServiceParam(ID key, Element param) {
-        if (param == null) {
-            serviceParams.remove(key);
-            incModCount();
-            return;
-        }
-
-        StructuredDocument newDoc = StructuredDocumentUtils.copyAsDocument(param);
-
-        serviceParams.put(key, newDoc);
-
-        incModCount();
-    }
-
-    /**
-     * Returns the parameter element that matches the given key from the
-     * service parameters table. The key is of a subclass of ID; usually a
-     * ModuleClassID.
-     *
-     * @param key The key.
-     * @return StructuredDocument The matching parameter document or null if
-     *         none matched. The document type id "Param".
-     */
-    public StructuredDocument getServiceParam(ID key) {
-        StructuredDocument param = serviceParams.get(key);
-
-        if (param == null) {
-            return null;
-        }
-
-        return StructuredDocumentUtils.copyAsDocument(param);
-    }
-
-    /**
-     * Removes and returns the parameter element that matches the given key
-     * from the service parameters table. The key is of a subclass of ID;
-     * usually a ModuleClassID.
-     *
-     * @param key The key.
-     * @return Element the removed parameter element or null if not found.
-     *         This is actually a StructureDocument of type "Param".
-     */
-    public StructuredDocument removeServiceParam(ID key) {
-        Element param = serviceParams.remove(key);
-
-        if (param == null) {
-            return null;
-        }
-
-        incModCount();
-
-        // It sound silly to clone it, but remember that we could be sharing
-        // this element with a clone of ours, so we have the duty to still
-        // protect it.
-
-        return StructuredDocumentUtils.copyAsDocument(param);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/PeerGroupAdvertisement.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/PeerGroupAdvertisement.java
deleted file mode 100644 (file)
index 7049b0a..0000000
+++ /dev/null
@@ -1,397 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.protocol;
-
-
-import java.util.Hashtable;
-import java.util.Map;
-import java.util.HashMap;
-
-import net.jxta.document.Element;
-import net.jxta.document.ExtendableAdvertisement;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.id.ID;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.platform.ModuleSpecID;
-
-
-/**
- *  Describes a peer group and references additional information required for
- *  instantiating it. The PeerGroup method newGroup performs the task of
- *  instantiating a PeerGroup given its advertisement (provided the required
- *  subsequent documents can actually be found). This advertisement is indexed
- *  on "Name", "GID", and "Desc"
- *
- *  @see    net.jxta.platform.ModuleSpecID
- *  @see    net.jxta.protocol.ModuleImplAdvertisement
- *  @see    net.jxta.peergroup.PeerGroup
- */
-
-public abstract class PeerGroupAdvertisement extends ExtendableAdvertisement implements Cloneable {
-    
-    private PeerGroupID gid = null;
-    private ModuleSpecID specId = null;
-    
-    /**
-     *  Informal, non-canonical name of this peer group
-     */
-    private String name = null;
-    
-    /**
-     * Descriptive meta-data about this peer group.
-     */
-    private Element description = null;
-    
-    // A table of structured documents to be interpreted by each service.
-    private final Map<ID, StructuredDocument> serviceParams = new HashMap<ID, StructuredDocument>();
-    
-    /**
-     *  Returns the identifying type of this Advertisement.
-     *
-     *@return    String the type of advertisement
-     */
-    public static String getAdvertisementType() {
-        return "jxta:PGA";
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public final String getBaseAdvType() {
-        return getAdvertisementType();
-    }
-    
-    /**
-     *  Construct a new Peer Group Advertisement.
-     **/
-    public PeerGroupAdvertisement() {}
-    
-    /**
-     *  {@inheritDoc}
-     *
-     *@return An object of class PeerGroupAdvertisement that is a
-     *      deep-enough copy of this one.
-     */
-    @Override
-    public PeerGroupAdvertisement clone() {
-    
-        PeerGroupAdvertisement clone;
-
-        try {
-            clone = (PeerGroupAdvertisement) super.clone();
-        } catch (CloneNotSupportedException impossible) {
-            throw new Error("Object.clone() threw CloneNotSupportedException", impossible);
-        }  
-            
-        clone.setPeerGroupID(getPeerGroupID());
-        clone.setModuleSpecID(getModuleSpecID());
-        clone.setName(getName());
-        clone.setDesc(getDesc());
-        clone.setServiceParams(getServiceParams());
-
-        return clone;
-    }
-    
-    /**
-     *  Returns the name of the group or <tt>null</tt> if no name has been
-     *  assigned.
-     *
-     *@return    String name of the group.
-     */
-    
-    public String getName() {
-        return name;
-    }
-    
-    /**
-     *  sets the name of the group.
-     *
-     *@param  name  name of the group.
-     */
-    
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    /**
-     *  Returns the id of the group spec that this uses.
-     *
-     *@return    ID the spec id
-     */
-    
-    public ModuleSpecID getModuleSpecID() {
-        return specId;
-    }
-    
-    /**
-     *  Sets the id of the group spec that this peer group uses.
-     *
-     *@param  sid  The id of the spec
-     */
-    
-    public void setModuleSpecID(ModuleSpecID sid) {
-        this.specId = sid;
-    }
-    
-    /**
-     *  Returns the id of the group.
-     *
-     *@return    ID the group id
-     */
-    
-    public PeerGroupID getPeerGroupID() {
-        return gid;
-    }
-    
-    /**
-     *  Sets the id of the group.
-     *
-     *@param  gid  The id of this group.
-     */
-    
-    public void setPeerGroupID(PeerGroupID gid) {
-        this.gid = gid;
-    }
-    
-    /**
-     *  Returns a unique ID for indexing purposes. We use the id of the group as
-     *  a plain ID.
-     *
-     *@return    ID a unique id for that advertisement.
-     */
-    
-    @Override
-    public ID getID() {
-        return gid;
-    }
-    
-    /**
-     * returns the description
-     *
-     * @return String the description
-     */
-    public String getDescription() {
-        if (null != description) {
-            return (String) description.getValue();
-        } else {
-            return null;
-        }
-    }
-    
-    /**
-     * sets the description
-     *
-     * @param description the description
-     */
-    public void setDescription(String description) {
-        
-        if (null != description) {
-            StructuredDocument newdoc = StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "Desc", description);
-            
-            setDesc(newdoc);
-        } else {
-            this.description = null;
-        }
-    }
-    
-    /**
-     * returns the description
-     *
-     * @return the description
-     */
-    public StructuredDocument getDesc() {
-        if (null != description) {
-            StructuredDocument newDoc = StructuredDocumentUtils.copyAsDocument(description);
-            
-            return newDoc;
-        } else {
-            return null;
-        }
-    }
-    
-    /**
-     * sets the description
-     *
-     * @since JXTA 1.0
-     *
-     * @param desc the description
-     *
-     */
-    public void setDesc(Element desc) {
-        
-        if (null != desc) {
-            this.description = StructuredDocumentUtils.copyAsDocument(desc);
-        } else {
-            this.description = null;
-        }
-    }
-    
-    /**
-     *  sets the sets of parameters for all services. This method first makes a
-     *  deep copy, in order to protect the active information from uncontrolled
-     *  sharing. This quite an expensive operation. If only a few of the
-     *  parameters need to be added, it is wise to use putServiceParam()
-     *  instead.
-     *
-     *@param  params  The whole set of parameters.
-     */
-    public void setServiceParams(Hashtable<ID, ? extends Element> params) {
-        serviceParams.clear();
-        
-        if (params == null) {
-            return;
-        }
-
-        for (Map.Entry<ID, ? extends Element> anEntry : params.entrySet()) {
-            Element e = anEntry.getValue();
-            StructuredDocument newDoc = StructuredDocumentUtils.copyAsDocument(e);
-
-            serviceParams.put(anEntry.getKey(), newDoc);
-        }
-
-    }
-    
-    /**
-     *  Returns the sets of parameters for all services. 
-     *
-     *  <p/>This method returns a deep copy, in order to protect the real
-     *  information from uncontrolled sharing while keeping it shared as long as
-     *  it is safe. This quite an expensive operation. If only a few parameters
-     *  need to be accessed, it is wise to use getServiceParam() instead.
-     *
-     *@return    all of the parameters.
-     */
-    public Hashtable<ID, StructuredDocument> getServiceParams() {
-        Hashtable<ID, StructuredDocument> copy = new Hashtable<ID, StructuredDocument>();
-
-        for (Map.Entry<ID, StructuredDocument> anEntry : serviceParams.entrySet()) {
-            Element e = anEntry.getValue();
-            StructuredDocument newDoc = StructuredDocumentUtils.copyAsDocument(e);
-
-            copy.put(anEntry.getKey(), newDoc);
-        }
-
-        return copy;
-    }
-    
-    /**
-     *  Puts a service parameter in the service parameters table under the given
-     *  key. The key is of a subclass of ID; usually a ModuleClassID. This
-     *  method makes a deep copy of the given element into an independent
-     *  document.
-     *
-     *@param  key    The key.
-     *@param  param  The parameter, as an element. What is stored is a copy as a
-     *      standalone StructuredDocument which type is the element's name.
-     */
-    public void putServiceParam(ID key, Element param) {
-        if (param == null) {
-            serviceParams.remove(key);
-            return;
-        }
-        
-        StructuredDocument newDoc = StructuredDocumentUtils.copyAsDocument(param);
-
-        serviceParams.put(key, newDoc);        
-    }
-    
-    /**
-     *  Returns the parameter element that matches the given key from the
-     *  service parameters table. The key is of a subclass of ID; usually a
-     *  ModuleClassID.
-     *
-     *@param  key  The key.
-     *@return      StructuredDocument The matching parameter document or null if
-     *      none matched. The document type id "Param".
-     */
-    public StructuredDocument getServiceParam(ID key) {
-        StructuredDocument param = serviceParams.get(key);
-
-        if (param == null) {
-            return null;
-        }
-        
-        return  StructuredDocumentUtils.copyAsDocument(param);
-    }
-    
-    /**
-     *  Removes and returns the parameter element that matches the given key
-     *  from the service parameters table. The key is of a subclass of ID;
-     *  usually a ModuleClassID.
-     *
-     *@param  key  The key.
-     *@return      Element the removed parameter element or null if not found.
-     *      This is actually a StructureDocument of type "Param".
-     */
-    public StructuredDocument removeServiceParam(ID key) {
-        Element param = serviceParams.remove(key);
-
-        if (param == null) {
-            return null;
-        }
-                      
-        // It sound silly to clone it, but remember that we could be sharing
-        // this element with a clone of ours, so we have the duty to still
-        // protect it.
-        
-        return StructuredDocumentUtils.copyAsDocument(param);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/PeerInfoQueryMessage.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/PeerInfoQueryMessage.java
deleted file mode 100644 (file)
index 3a94ce0..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.protocol;
-
-
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.peer.PeerID;
-
-
-/**
- * This abstract class define the PeerInfoService Query message.
- *
- **/
-public abstract class PeerInfoQueryMessage {
-    
-    /**
-     * The Sender's (or Querying) Peer Id.
-     */
-    private PeerID spid = null;
-    
-    /**
-     * Peer Id of the peer which published this advertisement.
-     */
-    private PeerID tpid = null;
-    
-    /* representing request  */
-    private StructuredDocument request = null;
-    
-    public PeerInfoQueryMessage() {
-        super();
-    }
-    
-    /**
-     * returns the Message type
-     * @return a string
-     *
-     * @since JXTA 1.0
-     */
-    public static String getMessageType() {
-        return "jxta:PeerInfoQueryMessage";
-    }
-    
-    /**
-     * returns the sender's pid
-     * @return a string representing the peer's id
-     *
-     * @since JXTA 1.0
-     */
-    public PeerID getSourcePid() {
-        return spid;
-    }
-    
-    /**
-     * sets the sender's pid
-     * @param pid a string representing a peer's id
-     *
-     * @since JXTA 1.0
-     */
-    public void setSourcePid(PeerID pid) {
-        this.spid = pid;
-    }
-    
-    /**
-     * returns the target pid
-     * @return a string representing the peer's id
-     *
-     * @since JXTA 1.0
-     */
-    public PeerID getTargetPid() {
-        return tpid;
-    }
-    
-    /**
-     * sets the target's pid
-     * @param pid a string representing a peer's id
-     *
-     * @since JXTA 1.0
-     */
-    public void setTargetPid(PeerID pid) {
-        this.tpid = pid;
-    }
-    
-    /**
-     * returns the request
-     * @return a structured document representing request
-     *
-     * @since JXTA 1.0
-     */
-    public Element getRequest() {
-        if (null != request) {
-            return StructuredDocumentUtils.copyAsDocument(request);
-        } else {
-            return null;
-        }
-    }
-    
-    /**
-     * sets the request
-     * @param request a structured document representing a peerinfo request
-     *
-     * @since JXTA 1.0
-     */
-    public void setRequest(Element request) {
-        if (null != request) {
-            this.request = StructuredDocumentUtils.copyAsDocument(request);
-        } else {
-            this.request = null;
-        }
-    }
-    
-    public abstract Document getDocument(MimeMediaType encodeAs);
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/PeerInfoResponseMessage.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/PeerInfoResponseMessage.java
deleted file mode 100644 (file)
index 5dfa38c..0000000
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.protocol;
-
-
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.peer.PeerID;
-
-
-/**
- * This abstract class define the PeerInfoService advertisement.
- */
-
-public abstract class PeerInfoResponseMessage {
-    
-    /**
-     * The Sender's (or Querying) Peer Id.
-     */
-    private PeerID spid = null;
-    
-    /**
-     * Peer Id of the peer which published this advertisement.
-     */
-    private PeerID tpid = null;
-    
-    /** String representing response  */
-    private StructuredDocument response = null;
-
-    /**
-     * Time in seconds since this peer was started.
-     */
-    private long uptime = 0;
-    
-    /**
-     * Time in milliseconds when this peer was last polled since
-     * "the epoch", namely January 1, 1970, 00:00:00 GMT.
-     */
-    private long timestamp = 0;
-    public PeerInfoResponseMessage() {
-        super();
-    }
-    
-    /**
-     * returns the Message type
-     * @return a string
-     *
-     */
-    public static String getMessageType() {
-        return "jxta:PeerInfoResponseMessage";
-    }
-    
-    /**
-     * returns the sender's pid
-     *
-     * @return a string representing the peer's id
-     *
-     */
-    public PeerID getSourcePid() {
-        return spid;
-    }
-    
-    /**
-     * sets the sender's pid
-     *
-     * @param pid a string representing a peer's id
-     *
-     */
-    public void setSourcePid(PeerID pid) {
-        this.spid = pid;
-    }
-    
-    /**
-     * returns the target pid
-     *
-     * @return a string representing the peer's id
-     *
-     */
-    public PeerID getTargetPid() {
-        return tpid;
-    }
-    
-    /**
-     * sets the target's pid
-     *
-     * @param pid a string representing a peer's id
-     *
-     */
-    public void setTargetPid(PeerID pid) {
-        this.tpid = pid;
-    }
-
-    /**
-     * returns the response
-     *
-     * @return a structured document representing request
-     *
-     */
-    public Element getResponse() {
-        if (null != response) {
-            return StructuredDocumentUtils.copyAsDocument(response);
-        } else {
-            return null;
-        }
-    }
-    
-    /**
-     * sets the request
-     *
-     * @param response a structured document representing a peerinfo request
-     *
-     */
-    public void setResponse(Element response) {
-        if (null != response) {
-            this.response = StructuredDocumentUtils.copyAsDocument(response);
-        } else {
-            this.response = null;
-        }
-    }
-
-    /**
-     * returns the number of milliseconds since this peer was started
-     * @return the number of milliseconds
-     *
-     */
-    public long getUptime() {
-        return uptime;
-    }
-    
-    /**
-     * sets the number of milliseconds since this peer was started
-     * @param milliseconds the number of milliseconds since this peer was started
-     *
-     */
-    public void setUptime(long milliseconds) {
-        this.uptime = milliseconds;
-    }
-    
-    /**
-     * returns the time when this peer was last polled
-     *
-     * @return long time in milliseconds when this peer was last polled in
-     * milliseconds since "the epoch", namely January 1, 1970, 00:00:00
-     * GMT.
-     *
-     */
-    public long getTimestamp() {
-        return timestamp;
-    }
-    
-    /**
-     * sets the time when this peer was last polled
-     *
-     * @param milliseconds time in milliseconds when this peer was last polled
-     * in milliseconds since "the epoch", namely January 1, 1970, 00:00:00
-     * GMT.
-     *
-     */
-    public void setTimestamp(long milliseconds) {
-        this.timestamp = milliseconds;
-    }
-
-    public abstract Document getDocument(MimeMediaType encodeAs);
-  
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/PipeAdvertisement.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/PipeAdvertisement.java
deleted file mode 100644 (file)
index a1db269..0000000
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.protocol;
-
-
-import net.jxta.document.ExtendableAdvertisement;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.id.ID;
-
-
-/**
- *  Describes a JXTA Pipe. A pipe is described by a pipe id and by a pipe type.
- *  A pipe can also optionally have a name and/or a description.
- *
- *  @see net.jxta.pipe.PipeService
- *  @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-pbp" target="_blank">JXTA Protocols Specification : Pipe Binding Protocol</a>
- */
-public abstract class PipeAdvertisement extends ExtendableAdvertisement implements Cloneable {
-
-    /**
-     * XML tag to store the PipeID
-     */
-    public static final String IdTag = "Id";
-
-    /**
-     * XML tag to store the Pipe Type
-     */
-    public static final String TypeTag = "Type";
-
-    /**
-     * XML tag to store the name of the Pipe
-     */
-    public static final String NameTag = "Name";
-
-    /**
-     * XML tag to store the name of the Pipe
-     */
-    public static final String descTag = "Desc";
-
-    private transient ID pipeId = ID.nullID;
-    private String type = null;
-    private String name = null;
-
-    /**
-     * Descriptive meta-data about this pipe.
-     */
-    private Element description = null;
-
-    /**
-     *  Returns the identifying type of this Advertisement.
-     *
-     *  @return String the type of advertisement
-     */
-    public static String getAdvertisementType() {
-        return "jxta:PipeAdvertisement";
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public PipeAdvertisement clone() {
-        try {
-            PipeAdvertisement likeMe = (PipeAdvertisement) super.clone();
-
-            likeMe.setPipeID(getPipeID());
-            likeMe.setType(getType());
-            likeMe.setName(getName());
-            likeMe.setDesc(getDesc());
-
-            return likeMe;
-        } catch (CloneNotSupportedException impossible) {
-            throw new Error("Object.clone() threw CloneNotSupportedException", impossible);
-        }
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object obj) {
-
-        if (this == obj) {
-            return true;
-        }
-
-        if (obj instanceof PipeAdvertisement) {
-            PipeAdvertisement likeMe = (PipeAdvertisement) obj;
-
-            if (!getPipeID().equals(likeMe.getPipeID())) {
-                return false;
-            }
-
-            if (!getType().equals(likeMe.getType())) {
-                return false;
-            }
-
-            String pipeName = getName();
-
-            if (pipeName == null ? likeMe.getName() != null : !pipeName.equals(likeMe.getName())) {
-                return false;
-            }
-
-            String pipeDescription = getDescription();
-
-            return !(pipeDescription == null ? likeMe.getDescription() != null : pipeDescription.equals(likeMe.getDescription()));
-        }
-        return false;
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-
-        int result = 17;
-
-        result = 37 * result + getPipeID().hashCode();
-        result = 37 * result + getType().hashCode();
-        String pipeName = getName();
-
-        if (pipeName != null) {
-            result = 37 * result + pipeName.hashCode();
-        }
-        String pipeDescription = getDescription();
-
-        if (pipeDescription != null) {
-            result = 37 * result + pipeDescription.hashCode();
-        }
-        return result;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public final String getBaseAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     *  {@inheritDoc}
-     *
-     *  <p/>The PipeID uniquely identifies this ADV.
-     */
-    @Override
-    public ID getID() {
-        ID result = getPipeID();
-
-        if (null == result) {
-            result = ID.nullID;
-        }
-        return result;
-    }
-
-    /**
-     *  Return the pipe ID for the pipe described by this advertisement.
-     *
-     *  @return The pipe ID for the pipe described by this advertisement.
-     */
-    public ID getPipeID() {
-        return pipeId;
-    }
-
-    /**
-     *  Set the pipe ID for the pipe described by this advertisement.
-     *
-     *  @param pipeId The pipe ID for the pipe described by this advertisement.
-     */
-    public void setPipeID(ID pipeId) {
-        this.pipeId = pipeId;
-    }
-
-    /**
-     *  Return the pipe type for the pipe described by this advertisement.
-     *
-     *  @return The pipe type for the pipe described by this advertisement.
-     */
-    public String getType() {
-        return type;
-    }
-
-    /**
-     * Set the pipe type for the pipe described by this advertisement.
-     *
-     *  @param type The pipe type for the pipe described by this advertisement.
-     */
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    /**
-     * Return the symbolic name for the pipe described by this advertisement.
-     *
-     * @return String The symbolic name for the pipe described by this advertisement.
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     *  Set the symbolic name for the pipe described by this advertisement.
-     *
-     *  @param name The symbolic name for the pipe described by this advertisement.
-     */
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    /**
-     * Returns the description
-     *
-     * @return String the description
-     */
-    public String getDescription() {
-        if (null != description) {
-            return (String) description.getValue();
-        }
-        return null;
-    }
-
-    /**
-     * Set the description meta-data for the pipe described by this advertisement.
-     *
-     * @param description The description meta-data for the pipe described by this advertisement.
-     */
-    public void setDescription(String description) {
-
-        if (null != description) {
-            StructuredDocument newdoc = StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "Desc", description);
-
-            setDesc(newdoc);
-        } else {
-            this.description = null;
-        }
-    }
-
-    /**
-     *  Return the description meta-data for the pipe described by this advertisement.
-     *
-     *  @return The description meta-data for the pipe described by this advertisement.
-     */
-    public StructuredDocument getDesc() {
-        if (null != description) {
-            StructuredDocument newDoc = StructuredDocumentUtils.copyAsDocument(description);
-
-            return newDoc;
-        }
-        return null;
-    }
-
-    /**
-     *  Set the description meta-data for the pipe described by this advertisement.
-     *
-     *  @param desc The description meta-data for the pipe described by this advertisement.
-     */
-    public void setDesc(Element desc) {
-
-        if (null != desc) {
-            this.description = StructuredDocumentUtils.copyAsDocument(desc);
-        } else {
-            this.description = null;
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/PipeResolverMessage.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/PipeResolverMessage.java
deleted file mode 100644 (file)
index 727af61..0000000
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.protocol;
-
-
-import net.jxta.document.Document;
-import net.jxta.document.MimeMediaType;
-import net.jxta.id.ID;
-import net.jxta.peer.PeerID;
-import net.jxta.pipe.PipeID;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-
-/**
- * This abstract class defines the PipeResolver Message.
- * <p/>
- * <p/>This message is part of the Pipe Resolver Protocol.
- *
- * @see net.jxta.pipe.PipeService
- * @see net.jxta.protocol.PipeAdvertisement
- * @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-pbp" target='_blank'>JXTA Protocols Specification : Standard JXTA Protocols</a>
- */
-public abstract class PipeResolverMessage {
-
-    /**
-     * The type of message this object is communicating.
-     */
-    private MessageType msgType = null;
-
-    /**
-     * The pipe which is the subject of this message.
-     */
-    private ID pipeid = ID.nullID;
-
-    /**
-     * The type of the pipe which is the subject of this message.
-     */
-    private String pipeType = null;
-
-    /**
-     * <ul>
-     * <li>For query : The peer ids which should respond to this query.</li>
-     * <li>For response : The peer id on which is responding.</li>
-     * </ul>
-     */
-    private Set<ID> peerids = new HashSet<ID>();
-
-    /**
-     * For responses, if true then this message indicates the pipe is present
-     * otherwise the pipe is not present.
-     */
-    private boolean found = true;
-
-    /**
-     * <ul>
-     * <li>For query : The peer advertisement of the querying peer.</li>
-     * <li>For response : The peer advertisement of the responding peer.</li>
-     * </ul>
-     */
-    private PeerAdvertisement inputPeerAdv = null;
-
-    /**
-     * An enumeration class for message types.
-     */
-    public enum MessageType {
-
-        /**
-         * A query message
-         */
-        QUERY, /**
-         * A response message
-         */ ANSWER
-    }
-
-    /**
-     * Creates a new unintialized pipe resolver message
-     */
-    public PipeResolverMessage() {
-        super();
-    }
-
-    /**
-     * returns the Message type. This will match the XML doctype declaration.
-     *
-     * @return a string
-     */
-    public static String getMessageType() {
-        return "jxta:PipeResolver";
-    }
-
-    /**
-     * Write message into a document. asMimeType is a mime media-type
-     * specification and provides the form of the document which is being
-     * requested. Two standard document forms are defined. "text/plain" encodes
-     * the document in "pretty-print" format for human viewing and "text/xml"
-     * which provides an XML format.
-     *
-     * @param asMimeType MimeMediaType format representation requested
-     * @return Document   the document to be used in the construction
-     */
-    public abstract Document getDocument(MimeMediaType asMimeType);
-
-    /**
-     * Returns whether this message is a query or a response.
-     *
-     * @return the type of this message.
-     */
-    public MessageType getMsgType() {
-        return msgType;
-    }
-
-    /**
-     * Sets the message type of this message.
-     *
-     * @param type the type this message is to be.
-     */
-    public void setMsgType(MessageType type) {
-        msgType = type;
-    }
-
-    /**
-     * Return the id of the pipe which is the subject of this message.
-     *
-     * @return the id of the pipe which is the subject of this message.
-     */
-    public ID getPipeID() {
-        return pipeid;
-    }
-
-    /**
-     * Set the id of pipe which is to be subject of this message.
-     *
-     * @param id the pipe id which is the subject of this message.
-     */
-    public void setPipeID(ID id) {
-
-        if (!(id instanceof PipeID)) {
-            throw new IllegalArgumentException("can only set to pipe ids.");
-        }
-
-        pipeid = id;
-    }
-
-    /**
-     * Return the pipe type of the pipe which is the subject of this message.
-     *
-     * @return the pipe type of the pipe which is the subject of this message.
-     */
-    public String getPipeType() {
-        return pipeType;
-    }
-
-    /**
-     * Set the pipe type of the pipe which is the subject of this message.
-     *
-     * @param type The pipe type of the pipe which is to be the subject of this
-     *             message.
-     */
-    public void setPipeType(String type) {
-        pipeType = type;
-    }
-
-    // Query
-
-    /**
-     * Returns a {@link java.util.Set} (possibly empty) containing the peer ids
-     * which should respond to this query.
-     *
-     * @return set containing the peer ids to which this peer is directed.
-     */
-    public Set<ID> getPeerIDs() {
-
-        return Collections.unmodifiableSet(peerids);
-    }
-
-    /**
-     * Add a peer to the set of peers to which this query is directed.
-     *
-     * @param id the peer id to add.
-     */
-    public void addPeerID(ID id) {
-
-        if (!(id instanceof PeerID)) {
-            throw new IllegalArgumentException("can only add peer ids");
-        }
-
-        peerids.add(id);
-    }
-
-    // Answer
-
-    /**
-     * If true then the pipe was found ont he
-     *
-     * @return true if found
-     */
-    public boolean isFound() {
-        return found;
-    }
-
-    public void setFound(boolean isFound) {
-        found = isFound;
-    }
-
-    public PeerAdvertisement getInputPeerAdv() {
-        return inputPeerAdv;
-    }
-
-    public void setInputPeerAdv(PeerAdvertisement peerAdv) {
-        inputPeerAdv = peerAdv;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/RdvAdvertisement.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/RdvAdvertisement.java
deleted file mode 100644 (file)
index 8af4883..0000000
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.protocol;
-
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-
-import net.jxta.document.ExtendableAdvertisement;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroupID;
-
-
-/**
- *  This class defines a Rendezvous Advertisement. This advertisement is indexed
- *  on "RdvGroupId", "RdvPeerId", and "RdvServiceName"
- */
-public abstract class RdvAdvertisement extends ExtendableAdvertisement {
-
-    /**
-     *  GroupID tag
-     */
-    public final static String GroupIDTag = "RdvGroupId";
-
-    /**
-     *  Name tag
-     */
-    public final static String NameTag = "Name";
-
-    /**
-     *  Rendezvous ID tag
-     */
-    public final static String PeerIDTag = "RdvPeerId";
-
-    /**
-     *  Route tage
-     */
-    public final static String RouteTag = "RdvRoute";
-
-    /**
-     *  Rendezvous service name tag
-     */
-    public final static String ServiceNameTag = "RdvServiceName";
-
-    private PeerGroupID groupId = null;
-
-    private transient ID hashID = null;
-    private String name = null;
-    private PeerID peerId = null;
-    private RouteAdvertisement route = null;
-    private String serviceName = null;
-
-    /**
-     *  Returns the identifying type of this Advertisement.
-     *
-     *@return    String the type of advertisement
-     */
-    public static String getAdvertisementType() {
-        return "jxta:RdvAdvertisement";
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public final String getBaseAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     *  get the group id
-     *
-     *@return    String PeerGroupID
-     */
-    public PeerGroupID getGroupID() {
-        return groupId;
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public synchronized ID getID() {
-
-        if (groupId == null) {
-            throw new IllegalStateException("cannot build ID: no group id");
-        }
-
-        if (peerId == null) {
-            throw new IllegalStateException("cannot build ID: no peer id");
-        }
-
-        if (serviceName == null) {
-            throw new IllegalStateException("cannot build ID: no Service Name");
-        }
-
-        if (hashID == null) {
-            try {
-                // We have not yet built it. Do it now
-                String seed = getAdvertisementType() + groupId.toString() + serviceName + peerId.toString();
-
-                InputStream in = new ByteArrayInputStream(seed.getBytes());
-
-                hashID = IDFactory.newCodatID(groupId, seed.getBytes(), in);
-            } catch (Exception ez) {
-                IllegalStateException failure = new IllegalStateException("cannot build ID");
-
-                failure.initCause(ez);
-                throw failure;
-            }
-        }
-        return hashID;
-    }
-
-    /**
-     *  get the symbolic name associated with the rdv
-     *
-     *@return    String the name field. null is returned if no name has been
-     *      associated with the advertisement.
-     */
-    public String getName() {
-
-        return name;
-    }
-
-    /**
-     *  get the rdv peer id
-     *
-     *@return    PeerID
-     */
-    public PeerID getPeerID() {
-        return peerId;
-    }
-
-    /**
-     *  Get the Route Adv.
-     *
-     *@return    RouteAdvertisement or <code>null</code> if no
-     */
-    public RouteAdvertisement getRouteAdv() {
-        return route;
-    }
-
-    /**
-     *  get the rdv service name
-     *
-     *@return    String name
-     */
-    public String getServiceName() {
-
-        return serviceName;
-    }
-
-    /**
-     *  set the group Id
-     *
-     *@param  id  The new groupID value
-     */
-    public void setGroupID(PeerGroupID id) {
-        groupId = id;
-    }
-
-    /**
-     *  set the symbolic name associated with the rdv
-     *
-     *@param  n  the name this rdv adv should have.
-     */
-    public void setName(String n) {
-        name = n;
-    }
-
-    /**
-     *  set the peer Id
-     *
-     *@param  id  The new peerID value
-     */
-    public void setPeerID(PeerID id) {
-        peerId = id;
-    }
-
-    /**
-     *  set the RouteAdvertisement
-     *
-     *@param  route  RouteAdvertisement
-     */
-    public void setRouteAdv(RouteAdvertisement route) {
-        this.route = route;
-    }
-
-    /**
-     *  set the service name
-     *
-     *@param  n  The new serviceName value
-     */
-
-    public void setServiceName(String n) {
-        serviceName = n;
-    }
-
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/ResolverQueryMsg.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/ResolverQueryMsg.java
deleted file mode 100644 (file)
index 1ad545a..0000000
+++ /dev/null
@@ -1,312 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.protocol;
-
-import java.net.URI;
-
-import net.jxta.document.Document;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.id.ID;
-
-/**
- * Generic Resolver Service message "Query".
- *
- * @see net.jxta.resolver.ResolverService
- * @see net.jxta.protocol.ResolverResponseMsg
- * @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-prp" target="_blank">JXTA Protocols Specification : Peer Resolver Protocol</a>
- */
-public abstract class ResolverQueryMsg {
-
-    /**
-     * credential
-     */
-    private StructuredDocument credential = null;
-
-    /**
-     * Resolver query handler
-     */
-    private String handlername = null;
-
-    /**
-     * Number of times a message has been forwarded, not propagated or walked
-     */
-    protected int hopcount = 0;
-
-    /**
-     * Resolver query
-     */
-    private String query = null;
-
-    /**
-     * Query ID of this query. Unique to the originating node only, it can be
-     * utilized to match queries to responses.
-     */
-    protected int queryid = 0;
-
-    /**
-     * issuer of the query
-     */
-    private ID srcPeerId = null;
-
-    /**
-     * Optional route info about the issuer
-     */
-    private RouteAdvertisement srcPeerRoute = null;
-
-    /**
-     * returns the credential
-     *
-     * @return String credential
-     */
-    public StructuredDocument getCredential() {
-        return credential;
-    }
-
-    /**
-     * Write advertisement into a document. asMimeType is a mime media-type
-     * specification and provides the form of the document which is being
-     * requested. Two standard document forms are defined. 'text/text' encodes
-     * the document in a form nice for printing out and 'text/xml' which
-     * provides an XML format.
-     *
-     * @param asMimeType mime-type requested representation for the returned
-     *                   document
-     * @return Document document representing the advertisement
-     */
-    public abstract Document getDocument(MimeMediaType asMimeType);
-
-    /**
-     * returns the handlername
-     *
-     * @return String handlername name
-     */
-    public String getHandlerName() {
-        return handlername;
-    }
-
-    /**
-     * returns the hop count
-     *
-     * @return int hop count
-     */
-    public int getHopCount() {
-        return hopcount;
-    }
-
-    /**
-     * increment hop count
-     */
-    public void incrementHopCount() {
-        hopcount++;
-    }
-
-    /**
-     * Set hop count
-     *
-     * @param newCount hop count
-     */
-    public void setHopCount(int newCount) {
-        hopcount = newCount;
-    }
-
-    /**
-     * returns the query
-     *
-     * @return String value of the query
-     */
-    public String getQuery() {
-        return query;
-    }
-
-    /**
-     * returns queryid value
-     *
-     * @return int queryid value
-     */
-    public int getQueryId() {
-        return queryid;
-    }
-
-    /**
-     * Returns the source of the query
-     *
-     * @return String the peerid of the source of the query
-     * @deprecated Use {@link #getSrcPeer()} instead.
-     */
-    @Deprecated
-    public String getSrc() {
-        return (null == srcPeerId) ? null : srcPeerId.toString();
-    }
-
-    /**
-     * Returns the source of the query
-     *
-     * @return The peerid of the source of the query
-     */
-    public ID getSrcPeer() {
-        return (null == srcPeerId) ? null : srcPeerId;
-    }
-
-    /**
-     * Returns the source route of the query
-     *
-     * @return RouteAdvertisement route to the issuer of the query
-     */
-
-    public RouteAdvertisement getSrcPeerRoute() {
-        if (srcPeerRoute == null) {
-            return null;
-        } else {
-            return srcPeerRoute.clone();
-        }
-    }
-
-    /**
-     * set the credential
-     *
-     * @param cred string representing credential
-     */
-    public void setCredential(StructuredDocument cred) {
-        this.credential = cred;
-    }
-
-    /**
-     * set the handlername
-     *
-     * @param name handler name
-     */
-    public void setHandlerName(String name) {
-        this.handlername = name;
-    }
-
-    /**
-     * set the Query string
-     *
-     * @param Query string representing the query
-     */
-    public void setQuery(String Query) {
-        this.query = Query;
-    }
-
-    /**
-     * set the query id. Each query has a unique id.
-     *
-     * @param id int id
-     */
-    public void setQueryId(int id) {
-        queryid = id;
-    }
-
-    /**
-     * set the source route of the query
-     *
-     * @param route route advertisement of the source peer
-     */
-    public void setSrcPeerRoute(RouteAdvertisement route) {
-        srcPeerRoute = route;
-    }
-
-    /**
-     * Set the source of the query
-     *
-     * @param src is a containing the peerid of the source
-     * @deprecated Use {@link #setSrcPeer(ID)} instead.
-     */
-    @Deprecated
-    public void setSrc(String src) {
-        if (null == src) {
-            setSrcPeer(null);
-        } else {
-            setSrcPeer(ID.create(URI.create(src)));
-        }
-    }
-
-    /**
-     * Set the source of the query
-     *
-     * @param srcPeer the peerid of the source
-     */
-    public void setSrcPeer(ID srcPeer) {
-        srcPeerId = srcPeer;
-    }
-
-    /**
-     * All messages have a type (in xml this is !doctype) which identifies the
-     * message
-     *
-     * @return String "jxta:ResolverQuery"
-     */
-    public static String getAdvertisementType() {
-        return "jxta:ResolverQuery";
-    }
-
-    /**
-     * Create a ResolverResponse from a ResolverQuery message. This method
-     * takes advantage of any internal information available in an incoming
-     * Resolver query to build a resolver response for that query. For instance,
-     * optional route information which may be available in the query will
-     * be used to bypass the route resolution to send the response.
-     * <p/>
-     * WARNING: A side effect of this call is that the following fields are
-     * transfered from the query to the response:
-     * - HandlerName
-     * - QueryId
-     *
-     * @return ResolverResponseMsg resolverResponse built from the resolverQuery msg
-     */
-    public abstract ResolverResponseMsg makeResponse();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/ResolverResponseMsg.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/ResolverResponseMsg.java
deleted file mode 100644 (file)
index 2eb7734..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.protocol;
-
-
-import net.jxta.document.Document;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-
-
-/**
- * Generic Resolver Service message "Response".
- *
- * @see net.jxta.resolver.ResolverService
- *@see    net.jxta.protocol.ResolverQueryMsg
- * @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-prp" target="_blank">JXTA Protocols Specification : Peer Resolver Protocol</a>
- **/
-public abstract class ResolverResponseMsg {
-    private StructuredDocument credential = null;
-
-    private String handlername = null;
-    
-    /**
-     *  Description of the Field
-     */
-    public int queryid = 0;
-    
-    private String response = null;
-
-    /**
-     *  returns the credential
-     *
-     *@return    StructuredDocument credential
-     */
-    public StructuredDocument getCredential() {
-        return credential;
-    }
-
-    /**
-     *  Write advertisement into a document. asMimeType is a mime media-type
-     *  specification and provides the form of the document which is being
-     *  requested. Two standard document forms are defined. "text/text" encodes
-     *  the document in a form nice for printing out and "text/xml" which
-     *  provides an XML format.
-     *
-     *@param  asMimeType  mime-type representation requested for that document
-     *@return             Document document representing the advertisement
-     */
-    public abstract Document getDocument(MimeMediaType asMimeType);
-
-    /**
-     * Set optional route information as part of the response.  This
-     * information is just attached to the response and is ONLY used by the
-     * resolver service. This information will not be sent as part of the
-     * response msg and is not part of the resolver response wire format
-     * protocol.
-     *
-     * @param route RouteAdvertisement to send the response
-     */
-    public abstract void setSrcPeerRoute(RouteAdvertisement route);
-
-    /**
-     * Get optional route information that may be attached to the
-     * response. This information is just attached to the response and 
-     * is only used internally by the resolver service. This information will
-     * not be sent as part of the response msg and is not part of the
-     * resolver response wire format.
-     *
-     * @return RouteAdvertisement to send the response
-     */
-    public abstract RouteAdvertisement  getSrcPeerRoute();
-
-    /**
-     *  returns the handlername
-     *
-     *@return    String handlername name
-     */
-    public String getHandlerName() {
-        return handlername;
-    }
-
-    /**
-     *  returns queryid value
-     *
-     *@return    int queryid value
-     */
-    public int getQueryId() {
-        return queryid;
-    }
-
-    /**
-     *  returns the response body for this message.
-     *
-     *@return    the response body represented as a string.
-     */
-    public String getResponse() {
-        return response;
-    }
-
-    /**
-     *  set the credential for this response.
-     *
-     *@param  cred  string credential
-     */
-
-    public void setCredential(StructuredDocument cred) {
-        this.credential = cred;
-    }
-
-    /**
-     *  set the handlername
-     *
-     *@param  name  string handlername
-     */
-    public void setHandlerName(String name) {
-        this.handlername = name;
-    }
-
-    /**
-     *  set the query id to which this message is a response.
-     *
-     *@param  id  the query id for this response.
-     */
-    public void setQueryId(int id) {
-        this.queryid = id;
-    }
-
-    /**
-     *  Set the response body for this message.
-     *
-     *@param  response  response body as a string.
-     */
-    public void setResponse(String response) {
-        this.response = response;
-    }
-
-    /**
-     *  All messages have a type (in xml this is !doctype) which identifies the
-     *  message
-     *
-     *@return    String type of the advertisement
-     */
-    public static String getAdvertisementType() {
-        return "jxta:ResolverResponse";
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/ResolverSrdiMsg.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/ResolverSrdiMsg.java
deleted file mode 100644 (file)
index ea12ce6..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.protocol;
-
-
-import net.jxta.document.Document;
-import net.jxta.document.MimeMediaType;
-import net.jxta.credential.Credential;
-
-
-/**
- * ResolverSrdiMsg is generic resolver wrapper for Services that wish to 
- * implement their own distribution of indices. this message provides the 
- * scoping within the group, and service. In addition it also defines a credential
- * which should be verified by the service.
- */
-
-public abstract class ResolverSrdiMsg {
-
-    private String handlername = null;
-    private Credential credential = null;
-    private String payload = null;
-
-    /**
-     * All messages have a type (in xml this is !doctype)
-     * which identifies the message
-     *
-     * @return    String type of the advertisement
-     */
-
-    public static String getMessageType() {
-        return "jxta:ResolverSRDI";
-    }
-
-    /**
-     * returns the handlername
-     *
-     * @return    String handlername name
-     *
-     */
-
-    public String getHandlerName() {
-        return handlername;
-    }
-
-    /**
-     * returns the credential
-     *
-     * @return    StructuredDocument credential
-     */
-
-    public Credential getCredential() {
-        return credential;
-    }
-
-    /**
-     * returns the payload
-     *
-     * @return    String value of query
-     */
-
-    public String getPayload() {
-        return payload;
-    }
-
-    /**
-     * set the handlername
-     *
-     * @param  name  string handlername
-     */
-
-    public void setHandlerName(String name) {
-        this.handlername = name;
-    }
-
-    /**
-     * set the credential object
-     *
-     * @param  cred  credential
-     */
-
-    public void setCredential(Credential cred) {
-        this.credential = cred;
-    }
-
-    /**
-     * set the SRDI payload
-     *
-     * @param  payload   The new payload value
-     */
-
-    public void setPayload(String payload) {
-        this.payload = payload;
-    }
-
-    /**
-     * Write advertisement into a document. asMimeType is a mime media-type
-     * specification and provides the form of the document which is being
-     * requested. Two standard document forms are defined. "text/text" encodes
-     * the document in a form nice for printing out and "text/xml" which
-     * provides an XML format.
-     *
-     * @param  asMimeType  mime-type representation requested for that document
-     * @return             Document document representing the advertisement
-     */
-
-    public abstract Document getDocument(MimeMediaType asMimeType);
-
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/RouteAdvertisement.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/RouteAdvertisement.java
deleted file mode 100644 (file)
index 6748e78..0000000
+++ /dev/null
@@ -1,859 +0,0 @@
-/*
-Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.protocol;
-
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.ExtendableAdvertisement;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroupID;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Set;
-import java.util.Vector;
-
-/**
- * Advertisement used to represent a route to a peer. Routes are represented in
- * a generic manner as a sequence of hops to reach the destination. Each hop
- * represent a potential relay peer in the route:
- * <p/>
- * <pre> Dest
- *       hop 1
- *       hop 2
- *       hop 3
- *       ....
- *       hop n
- * </pre>
- * <p/>
- * A route can have as many hops as necessary. Hops are implicitly ordered
- * starting from the hop with the shortest route to reach the destination. If a
- * peer cannot reach directly the dest, it should try to reach in descending
- * order one of the listed hops. Some hops may have the same physical distance
- * to the destination. Some hops may define alternative routes.
- * <p/>
- * The destination and hops are defined using a AccessPointAdvertisements.
- *
- * @see net.jxta.protocol.PeerAdvertisement
- * @see net.jxta.protocol.AccessPointAdvertisement
- */
-public abstract class RouteAdvertisement extends ExtendableAdvertisement implements Cloneable {
-
-    public static final String DEST_PID_TAG = "DstPID";
-
-    /**
-     * AccessPointAdvertisement of destination peer.
-     */
-    private transient AccessPointAdvertisement dest = (AccessPointAdvertisement)
-            AdvertisementFactory.newAdvertisement(AccessPointAdvertisement.getAdvertisementType());
-
-    /**
-     * Semi-ordered list of alternative hops to the destination.
-     */
-    private transient Vector<AccessPointAdvertisement> hops = new Vector<AccessPointAdvertisement>();
-
-    /**
-     * Cached value for {@link #getID()}
-     */
-    private transient ID hashID = null;
-
-    /**
-     * construct a new route
-     * <p/>
-     * <b>WARNING hops may be MODIFIED.</b>
-     *
-     * @param destPid  destination
-     * @param firsthop first hop node ID
-     * @param hops     routes
-     * @return the new route
-     */
-    public static RouteAdvertisement newRoute(PeerID destPid, PeerID firsthop, Vector<AccessPointAdvertisement> hops) {
-
-        if (destPid == null) {
-            throw new IllegalArgumentException("Missing destination peer id.");
-        }
-
-        for (AccessPointAdvertisement apa : hops) {
-            if (null == apa) {
-                throw new IllegalArgumentException("Bad route. null APA.");
-            }
-
-            if (apa.getPeerID() == null) {
-                throw new IllegalArgumentException("Bad route. Incomplete APA.");
-            }
-        }
-
-        RouteAdvertisement route = (RouteAdvertisement)
-                AdvertisementFactory.newAdvertisement(RouteAdvertisement.getAdvertisementType());
-
-        route.setDestPeerID(destPid);
-
-        // set the route hops
-        route.setHops(hops);
-
-        // check if the given first hop is already in the route if not add it
-        // (note: we do not expect it to be there, but it is acceptable).
-        if (firsthop != null) {
-            AccessPointAdvertisement ap = route.getFirstHop();
-
-            if (ap == null || !ap.getPeerID().equals(firsthop)) {
-                ap = (AccessPointAdvertisement)
-                        AdvertisementFactory.newAdvertisement(AccessPointAdvertisement.getAdvertisementType());
-                ap.setPeerID(firsthop);
-                route.setFirstHop(ap);
-            }
-        }
-
-        return route;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public RouteAdvertisement clone() {
-        try {
-            RouteAdvertisement a = (RouteAdvertisement) super.clone();
-
-            a.setDest(getDest());
-
-            // deep copy of the hops
-            Vector<AccessPointAdvertisement> clonehops = getVectorHops();
-
-            ListIterator<AccessPointAdvertisement> eachHop = clonehops.listIterator();
-
-            while (eachHop.hasNext()) {
-                eachHop.set(eachHop.next().clone());
-            }
-
-            a.setHops(clonehops);
-
-            return a;
-        } catch (CloneNotSupportedException impossible) {
-            throw new Error("Object.clone() threw CloneNotSupportedException", impossible);
-        }
-    }
-
-    /**
-     * makes a copy of a route advertisement
-     * that only contains PID not endpoint addresses
-     *
-     * @return object clone route advertisement
-     */
-    public RouteAdvertisement cloneOnlyPIDs() {
-        RouteAdvertisement routeAdvertisement;
-
-        try {
-            routeAdvertisement = (RouteAdvertisement) super.clone();
-            routeAdvertisement.setDestEndpointAddresses(new Vector<String>());
-        } catch (CloneNotSupportedException impossible) {
-            throw new Error("Object.clone() threw CloneNotSupportedException", impossible);
-        }
-
-        // deep copy of the hops
-        Vector<AccessPointAdvertisement> clonehops = routeAdvertisement.getVectorHops();
-
-        ListIterator<AccessPointAdvertisement> eachHop = clonehops.listIterator();
-
-        while (eachHop.hasNext()) {
-            AccessPointAdvertisement aHop = eachHop.next();
-
-            eachHop.set(aHop.clone());
-        }
-
-        routeAdvertisement.setHops(clonehops);
-        return routeAdvertisement;
-    }
-
-    /**
-     * Compare if two routes are equals. Equals means same destination with the
-     * same endpoint addresses and thee same number of hops and the same
-     * endpoint addresses for each hop.
-     *
-     * @param target the route to compare against
-     * @return boolean true if the route is equal to this route otherwise false
-     */
-    @Override
-    public boolean equals(Object target) {
-
-        if (this == target) {
-            return true;
-        }
-
-        if (!(target instanceof RouteAdvertisement)) {
-            return false;
-        }
-
-        RouteAdvertisement route = (RouteAdvertisement) target;
-
-        // check the destination
-        if (!dest.equals(route.getDest())) {
-            return false;
-        }
-
-        // check each of the hops
-
-        // routes need to have the same size
-        if (hops.size() != route.size()) {
-            return false;
-        }
-
-        int index = 0;
-
-        for (AccessPointAdvertisement hop : route.hops) {
-            if (!hop.equals(hops.get(index++))) {
-                return false;
-            }
-        }
-
-        return true;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        if (null != dest.getPeerID()) {
-            return dest.getPeerID().hashCode();
-        } else {
-            // force all incomplete advertisements to hash to the same place.
-            return 1;
-        }
-    }
-
-    /**
-     * Returns the identifying type of this Advertisement.
-     *
-     * @return String the type of advertisement
-     */
-    public static String getAdvertisementType() {
-        return "jxta:RA";
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public final String getBaseAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized ID getID() {
-        if (null == dest.getPeerID()) {
-            throw new IllegalStateException("Destination peerID not defined. Incomplete RouteAdvertisement");
-        }
-
-        if (hashID == null) {
-            try {
-                // We have not yet built it. Do it now
-                byte[] seed = getAdvertisementType().getBytes("UTF-8");
-                InputStream in = new ByteArrayInputStream(dest.getPeerID().toString().getBytes("UTF-8"));
-
-                hashID = IDFactory.newCodatID((PeerGroupID) dest.getPeerID().getPeerGroupID(), seed, in);
-            } catch (Exception ez) {
-                return ID.nullID;
-            }
-        }
-        return hashID;
-    }
-
-    /**
-     * Returns the route destination Peer ID
-     *
-     * @return peerID of the destination of the route
-     */
-    public PeerID getDestPeerID() {
-        return dest.getPeerID();
-    }
-
-    /**
-     * Sets the route destination peer id.
-     *
-     * @param pid route destination peerID
-     */
-    public void setDestPeerID(PeerID pid) {
-        if ((null != pid) && (null != dest.getPeerID()) && (!pid.equals(dest.getPeerID()))) {
-            throw new IllegalStateException("Changing the peer id of the destination APA." + pid + " != " + dest.getPeerID());
-        }
-
-        dest.setPeerID(pid);
-
-        // recalculate hash.
-        synchronized (this) {
-            hashID = null;
-        }
-    }
-
-    /**
-     * Returns the destination access point. <b>This does <i>NOT</i> copy
-     * the AccessPointAdvertisement</b>.
-     *
-     * @return AccessPointAdvertisement of the destination peer.
-     * @deprecated Because this method unsafely exposes destination AccessPointAdvertisement it will be removed.
-     */
-    @Deprecated
-    public AccessPointAdvertisement getDest() {
-        return dest;
-    }
-
-    /**
-     * Sets the access point of the destination. <b>This does <i>NOT</i> copy
-     * the AccessPointAdvertisement</b>.
-     *
-     * @param ap AccessPointAdvertisement of the destination peer
-     */
-    public void setDest(AccessPointAdvertisement ap) {
-        PeerID destPid = dest.getPeerID();
-
-        this.dest = ap.clone();
-
-        if ((null != destPid) && (null != dest.getPeerID()) && (!destPid.equals(dest.getPeerID()))) {
-            throw new IllegalStateException("Changed the peer id of the destination APA." + destPid + " != " + dest.getPeerID());
-        }
-
-        if (null != destPid) {
-            dest.setPeerID(destPid);
-        }
-
-        // recalculate hash.
-        synchronized (this) {
-            hashID = null;
-        }
-    }
-
-    /**
-     * Add a new list of EndpointAddresses to the Route Destination access
-     * point
-     *
-     * @param addresses vector of endpoint addresses to add to the
-     *                  destination access point. Warning: The vector of endpoint addresses
-     *                  is specified as a vector of String. Each string representing
-     *                  one endpoint address.
-     * @deprecated Use {@link #addDestEndpointAddresses(List<EndpointAddress>)} instead.
-     */
-    @Deprecated
-    public void addDestEndpointAddresses(Vector<String> addresses) {
-        dest.addEndpointAddresses(addresses);
-    }
-
-    /**
-     * Clears all endpoint addresses associated with the destination peer.
-     */
-    public void clearDestEndpointAddresses() {
-        dest.clearEndpointAddresses();
-    }
-
-    /**
-     * Add the specified endpoint address to destination peer.
-     *
-     * @param addr EndpointAddress to add.
-     */
-    public void addDestEndpointAddress(EndpointAddress addr) {
-        dest.addEndpointAddress(addr);
-    }
-
-    /**
-     * Add all of the specified endpoint addresses to destination peer.
-     *
-     * @param addrs EndpointAddresses to add.
-     */
-    public void addDestEndpointAddresses(List<EndpointAddress> addrs) {
-        dest.addEndpointAddresses(addrs);
-    }
-
-    /**
-     * Remove the specified endpoint address to destination peer.
-     *
-     * @param addr EndpointAddress to add.
-     */
-    public void removeDestEndpointAddress(EndpointAddress addr) {
-        dest.removeEndpointAddress(addr);
-    }
-
-    /**
-     * Remove the specified endpoint addresses from destination peer.
-     *
-     * @param addrs EndpointAddress to add.
-     */
-    public void removeDestEndpointAddresses(Collection<EndpointAddress> addrs) {
-        dest.removeEndpointAddresses(addrs);
-    }
-
-    /**
-     * Remove a list of EndpointAddresses from the Route Destination
-     * access point
-     *
-     * @param addresses vector of endpoint addresses to remove from the
-     *                  destination access point.
-     * @deprecated Use {@link #removeDestEndpointAddresses(Collection)}.
-     */
-    @Deprecated
-    public void removeDestEndpointAddresses(Vector<String> addresses) {
-        dest.removeEndpointAddresses(addresses);
-    }
-
-    /**
-     * Returns the endpoint addresses of the destination peer in their
-     * preferred order.
-     *
-     * @return The {@code EndpointAddress}es of the destination peer.
-     */
-    public List<EndpointAddress> getDestEndpointAddresses() {
-        List<EndpointAddress> result = new ArrayList<EndpointAddress>();
-
-        Enumeration<String> eachEA = dest.getEndpointAddresses();
-
-        while (eachEA.hasMoreElements()) {
-            result.add(new EndpointAddress(eachEA.nextElement()));
-        }
-
-        return result;
-    }
-
-    /**
-     * Set the route destination endpoint addresses
-     *
-     * @param ea vector of endpoint addresses. Warning: The vector is not copied
-     *           and is used directly.
-     * @deprecated Use {@link #addDestEndpointAddress(EndpointAddress)} instead.
-     */
-    @Deprecated
-    public void setDestEndpointAddresses(Vector<String> ea) {
-        dest.setEndpointAddresses(ea);
-    }
-
-    /**
-     * returns the list of hops
-     *
-     * @return Enumeration list of hops as AccessPointAdvertisement
-     */
-    public Enumeration<AccessPointAdvertisement> getHops() {
-        return hops.elements();
-    }
-
-    /**
-     * returns the list of hops
-     *
-     * @return Vector list of hops as AccessPointAdvertisement
-     */
-    public Vector<AccessPointAdvertisement> getVectorHops() {
-        return hops;
-    }
-
-    /**
-     * Sets the list of hops associated with this route.
-     *
-     * @param newHops AccessPointAdvertisements which form the hops. The
-     *                Vector is <b>NOT</b> copied.
-     */
-    public void setHops(Vector<AccessPointAdvertisement> newHops) {
-        // It is legal to set it to null but it is automatically converted
-        // to an empty vector. The member hops is NEVER null.
-        if (null == newHops) {
-            hops = new Vector<AccessPointAdvertisement>();
-        } else {
-            for (AccessPointAdvertisement hop : newHops) {
-                if (null == hop.getPeerID()) {
-                    throw new IllegalArgumentException("Bad hop");
-                }
-            }
-
-            hops = newHops;
-        }
-    }
-
-    /**
-     * Check if the route contains the following hop
-     *
-     * @param pid peer id of the hop
-     * @return boolean true or false if the hop is found in the route
-     */
-    public boolean containsHop(PeerID pid) {
-        for (AccessPointAdvertisement hop : hops) {
-            PeerID hid = hop.getPeerID();
-
-            if (pid.equals(hid)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Returns the AccessPointAdvertisement of first hop. <b>The
-     * AccessPointAdvertisement is <i>not</i> cloned.</b>
-     *
-     * @return AccessPointAdvertisement of first hop.
-     */
-    public AccessPointAdvertisement getFirstHop() {
-        return hops.isEmpty() ? null : hops.firstElement();
-    }
-
-    /**
-     * Sets the AccessPointAdvertisement for the first hop. <b>The
-     * AccessPointAdvertisement is <i>not</i> cloned.</b>
-     *
-     * @param ap AccessPointAdvertisement of the first hop.
-     */
-    public void setFirstHop(AccessPointAdvertisement ap) {
-        if (null == ap.getPeerID()) {
-            throw new IllegalArgumentException("Bad hop");
-        }
-
-        hops.add(0, ap);
-    }
-
-    /**
-     * Returns the access point for the last hop. <b>The
-     * AccessPointAdvertisement is <i>not</i> cloned.</b>
-     *
-     * @return AccessPointAdvertisement last hop.
-     */
-    public AccessPointAdvertisement getLastHop() {
-        return hops.isEmpty() ? null : hops.lastElement();
-    }
-
-    /**
-     * Sets the AccessPointAdvertisement of the last hop. <b>The
-     * AccessPointAdvertisement is <i>not</i> cloned.</b>
-     *
-     * @param ap AccessPointAdvertisement of the last hop.
-     */
-    public void setLastHop(AccessPointAdvertisement ap) {
-        if (null == ap.getPeerID()) {
-            throw new IllegalArgumentException("Bad hop");
-        }
-
-        hops.add(ap);
-    }
-
-    /**
-     * check if the route has a loop
-     *
-     * @return boolean true or false if the route has a loop
-     */
-    public boolean hasALoop() {
-        // Now check for any other potential loops.
-
-        Set<PeerID> seenPeers = new HashSet<PeerID>(hops.size());
-
-        for (AccessPointAdvertisement anAPA : hops) {
-            PeerID pid = anAPA.getPeerID();
-
-            if (seenPeers.contains(pid)) {
-                return true; // There is a loop.
-            }
-
-            seenPeers.add(pid);
-        }
-        return false;
-    }
-
-    /**
-     * return the length of the route
-     *
-     * @return int size of the route
-     */
-    public int size() {
-        return hops.size();
-    }
-
-    /**
-     * Return the hop that follows the specified currentHop. <b>The
-     * AccessPointAdvertisement is <i>not</i> cloned.</b>
-     *
-     * @param currentHop PeerID of the current hop
-     * @return ap AccessPointAdvertisement of the next Hop
-     */
-    public AccessPointAdvertisement nextHop(PeerID currentHop) {
-
-        // check if we have a real route
-        if (hops.isEmpty()) {
-            // Empty vector.
-            return null;
-        }
-
-        // find the index of the route
-        int index = 0;
-        boolean found = false;
-
-        for (AccessPointAdvertisement ap : hops) {
-            if (currentHop.equals(ap.getPeerID())) {
-                found = true;
-                break;
-            }
-            index++;
-        }
-
-        AccessPointAdvertisement nextHop = null;
-
-        if (!found) {
-            // The peer is not into the list. Since we have got that message,
-            // the best we can do is to send it to the first gateway in the
-            // forward path.
-            nextHop = hops.get(0);
-        } else {
-            // Found the peer within the vector of hops. Get the next hop.
-            if (index < hops.size()) {
-                nextHop = hops.get(index);
-            }
-        }
-
-        return nextHop;
-    }
-
-    /**
-     * Generate a string that displays the route
-     * information for logging or debugging purpose
-     *
-     * @return String return a string containing the route info
-     */
-    public String display() {
-        StringBuilder routeBuf = new StringBuilder();
-
-        routeBuf.append("Dest APA : ");
-        AccessPointAdvertisement dest = getDest();
-
-        routeBuf.append(dest.display());
-        routeBuf.append("\n");
-
-        int i = 1;
-        Enumeration<AccessPointAdvertisement> e = getHops();
-
-        while (e.hasMoreElements()) {
-            AccessPointAdvertisement hop = e.nextElement();
-
-            if (i == 1) {
-                routeBuf.append("HOPS = ");
-            }
-            routeBuf.append("\n\t[").append(i++).append("] ");
-
-            routeBuf.append(hop.display());
-        }
-        return routeBuf.toString();
-    }
-
-    /**
-     * Remove a hop from the list of hops.
-     *
-     * @param pid peer id of the hop
-     * @return boolean true or false if the hop is found in the route
-     */
-    public boolean removeHop(PeerID pid) {
-        Iterator<AccessPointAdvertisement> eachHop = hops.iterator();
-
-        while (eachHop.hasNext()) {
-            AccessPointAdvertisement hop = eachHop.next();
-            PeerID hid = hop.getPeerID();
-
-            if (pid.equals(hid)) {
-                eachHop.remove();
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-    /**
-     * Return a hop from the list of hops.
-     *
-     * @param pid peer id of the hop
-     * @return AccessPointAdvertisement of the corresponding hop
-     */
-    public AccessPointAdvertisement getHop(PeerID pid) {
-        for (AccessPointAdvertisement hop : hops) {
-            PeerID hid = hop.getPeerID();
-
-            if (pid.equals(hid)) {
-                return hop.clone();
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Alter the given newRoute (which does not start from here) by using firstLeg, a known route to whence
-     * it starts from. So that the complete route goes from here to the end-destination via firstLeg.
-     * public static boolean stichRoute(RouteAdvertisement newRoute,
-     *
-     * @param newRoute the new route
-     * @param firstLeg the first route
-     * @return true if successful
-     */
-    public static boolean stichRoute(RouteAdvertisement newRoute, RouteAdvertisement firstLeg) {
-        return stichRoute(newRoute, firstLeg, null);
-    }
-
-    /**
-     * Alter the given newRoute (which does not start from here) by using firstLeg, a known route to whence
-     * it starts from. So that the complete route goes from here to the end-destination via firstLeg
-     * also shortcut the route by removing the local peer.
-     *
-     * @param newRoute  the new route
-     * @param firstLeg  first hop
-     * @param localPeer local PeerID
-     * @return true if successful
-     */
-    public static boolean stichRoute(RouteAdvertisement newRoute, RouteAdvertisement firstLeg, PeerID localPeer) {
-
-        if (newRoute.hasALoop()) {
-            return false;
-        }
-
-        Vector<AccessPointAdvertisement> hops = newRoute.getVectorHops();
-
-        // Make room
-        hops.ensureCapacity(firstLeg.getVectorHops().size() + 1 + hops.size());
-
-        // prepend the routing peer unless the routing peer happens to be
-        // in the route already. That happens if the routing peer is the relay.
-        // or if the route does not have a first leg
-        PeerID routerPid = firstLeg.getDest().getPeerID();
-
-        if (newRoute.size() == 0 || (!newRoute.getFirstHop().getPeerID().equals(routerPid))) {
-            AccessPointAdvertisement ap = (AccessPointAdvertisement)
-                    AdvertisementFactory.newAdvertisement(AccessPointAdvertisement.getAdvertisementType());
-
-            // prepend the route with the routing peer.
-            ap.setPeerID(routerPid);
-            hops.add(0, ap);
-        }
-
-        // prepend the rest of the route
-        hops.addAll(0, firstLeg.getVectorHops());
-
-        // remove any loop from the root
-        cleanupLoop(newRoute, localPeer);
-        return true;
-    }
-
-    /**
-     * Remove loops from the route advertisement
-     * by shortcutting cycle from the route
-     *
-     * @param route     the route advertisement
-     * @param localPeer local PeerID
-     */
-    public static void cleanupLoop(RouteAdvertisement route, PeerID localPeer) {
-
-        // Note: we cleanup all enp addresses except for the last hop (which we
-        // use to shorten routes often enough).
-        // If we end-up removing the last hop, it means that it is the local
-        // peer and thus the route ends up with a size 0.
-
-        Vector<AccessPointAdvertisement> hops = route.getVectorHops();
-        Vector<AccessPointAdvertisement> newHops = new Vector<AccessPointAdvertisement>(hops.size());
-        AccessPointAdvertisement lastHop = null;
-
-        // Replace all by PID-only entries, but keep the last hop on the side.
-        if (!hops.isEmpty()) {
-            lastHop = hops.get(hops.size() - 1);
-        }
-        hops = (route.cloneOnlyPIDs()).getVectorHops();
-
-        // remove cycle from the route
-        for (int i = 0; i < hops.size(); i++) {
-            int loopAt = newHops.indexOf(hops.elementAt(i));
-
-            if (loopAt != -1) { // we found a cycle
-
-                // remove all entries after loopAt
-                for (int j = newHops.size(); --j > loopAt;) {
-                    newHops.remove(j);
-                }
-            } else { // did not find it so we add it
-                newHops.add(hops.get(i));
-            }
-        }
-
-        // Remove the local peer in the route if we were given one
-        if (localPeer != null) {
-            for (int i = newHops.size(); --i >= 0;) {
-                if (localPeer.equals(newHops.elementAt(i).getPeerID())) {
-                    // remove all the entries up to that point we
-                    // need to keep the remaining of the route from that
-                    // point
-                    for (int j = 0; j <= i; j++) {
-                        newHops.remove(0);
-                    }
-                    break;
-                }
-            }
-        }
-
-        if (lastHop != null && newHops.size() > 0) {
-            newHops.setElementAt(lastHop, newHops.size() - 1);
-        }
-
-        // update the new hops in the route
-        route.setHops(newHops);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/RouteQueryMsg.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/RouteQueryMsg.java
deleted file mode 100644 (file)
index bde4926..0000000
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.protocol;
-
-
-import net.jxta.document.Document;
-import net.jxta.document.MimeMediaType;
-import net.jxta.peer.PeerID;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-
-/**
- * This class defines the EndpointRouter RouteQuery message "Query"
- * <p/>
- * This message is part of the Endpoint Routing Protocol.
- *
- * @deprecated This class will be removed from the public JXTA API. It is used
- * only by the standard router message transport implementation and is of no use
- * to applications.
- *
- * @see net.jxta.protocol.RouteResponseMsg
- */
-@Deprecated
-public abstract class RouteQueryMsg {
-
-    private PeerID destPID = null;
-    private RouteAdvertisement srcRoute = null;
-    private final Set<PeerID> badHops = new HashSet<PeerID>();
-
-    /**
-     * All messages have a type (in xml this is !doctype)
-     * which identifies the message
-     *
-     * @return String "jxta:ERQ"
-     */
-    public static String getAdvertisementType() {
-        return "jxta:ERQ";
-    }
-
-    /**
-     * set the destination PeerID we are searching a route for
-     *
-     * @param pid destination peerID
-     */
-    public void setDestPeerID(PeerID pid) {
-        destPID = pid;
-    }
-
-    /**
-     * returns the destination peer ID we are looking for
-     *
-     * @return pid PeerID of the route destination
-     */
-
-    public PeerID getDestPeerID() {
-        return destPID;
-    }
-
-    /**
-     * set the Route advertisement of the source peer that is originating
-     * the query
-     *
-     * @param route RouteAdvertisement of the source
-     */
-    public void setSrcRoute(RouteAdvertisement route) {
-        if(null == route.getDestPeerID()) {
-            throw new IllegalArgumentException("route lacks destination!");
-        }
-        
-        srcRoute = route.clone();
-    }
-
-    /**
-     * returns the route of the src peer that issued the routequery
-     *
-     * @return route RouteAdvertisement of the source peer
-     */
-    public RouteAdvertisement getSrcRoute() {
-        if(null == srcRoute) {
-            return null;
-        } else {
-            return srcRoute.clone();
-        }
-    }
-
-    /**
-     * Adds a bad hop to the list of those known to be bad for this route.
-     *
-     * @param badHop The known bad hop for the route.
-     */
-    public void addBadHop(PeerID badHop) {
-        badHops.add(badHop);
-    }
-
-    /**
-     * Set the bad hops known into that route
-     *
-     * @param hops RouteAdvertisement of the source
-     */
-    public void setBadHops(Collection<PeerID> hops) {
-        badHops.clear();
-        if (null != hops) {
-            badHops.addAll(hops);
-        }
-    }
-
-    /**
-     * returns the bad hops know to the route
-     *
-     * @return The known bad hops for the route
-     */
-    public Set<PeerID> getBadHops() {
-        return new HashSet<PeerID>(badHops);
-    }
-
-    /**
-     * Write message into a document. asMimeType is a mime media-type
-     * specification and provides the form of the document which is being
-     * requested. Two standard document forms are defined. "text/text" encodes
-     * the document in a form nice for printing out, and "text/xml" which
-     * provides an XML representation.
-     *
-     * @param asMimeType mime-type format requested
-     * @return Document representation of the document as an advertisement
-     */
-    public abstract Document getDocument(MimeMediaType asMimeType);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/RouteResponseMsg.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/RouteResponseMsg.java
deleted file mode 100644 (file)
index 7bf0777..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.protocol;
-
-
-import net.jxta.document.Document;
-import net.jxta.document.MimeMediaType;
-
-
-/**
- * Sent by peers in response to Route Query Messages as part of the Endpoint
- * Router Protocol (ERp). Contains a route advertisement for the destination 
- * peer. Route Response Messages are transmitted as responses within Resolver 
- * Response Message.
- *
- * @deprecated This message is private to the Endpoint Router implementation and
- * not part of the JXTA public API. It will be moved from this package.
- *
- * @see net.jxta.protocol.RouteQueryMsg
- * @see    <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-erp" 
- *         target="_blank">JXTA Protocols Specification : Endpoint Routing Protocol</a>
- **/
-@Deprecated
-public abstract class RouteResponseMsg {
-
-    private RouteAdvertisement dstRoute = null;
-    private RouteAdvertisement srcRoute = null;
-
-    /**
-     * All messages have a type (in xml this is !doctype)
-     * which identifies the message
-     * @return String "jxta:ERR"
-     */
-
-    public static String getAdvertisementType() {
-        return "jxta:ERR";
-    }
-
-    /**
-     * set the destination route we were looking for
-     *
-     * @param dst destination route
-     */
-    public void setDestRoute(RouteAdvertisement dst) {
-        dstRoute = dst;
-    }
-
-    /**
-     * returns the destination route we were looking for
-     *
-     * @return route destination route advertisement
-     */
-
-    public RouteAdvertisement getDestRoute() {
-        return  dstRoute;
-    }
-
-    /**
-     * Set the Route advertisement of the source peer that is originating
-     * the query
-     *
-     * @param route RouteAdvertisement of the source
-     */
-    public void setSrcRoute(RouteAdvertisement route) {
-        srcRoute = route;
-    }
-
-    /**
-     * Returns the route of the src peer that responded
-     *
-     * @return route RouteAdvertisement of the source peer
-     * that responded to the query
-     */
-
-    public RouteAdvertisement getSrcRoute() {
-        return  srcRoute;
-    }
-
-    /**
-     * Write advertisement into a document. asMimeType is a mime media-type
-     * specification and provides the form of the document which is being
-     * requested. Two standard document forms are defined. "text/text" encodes
-     * the document in a form nice for printing out, and "text/xml" which
-     * provides an XML representation.
-     *
-     * @param asMimeType mime-type format requested
-     * @return Document representation of the document as an advertisement
-     */
-
-    public abstract Document getDocument(MimeMediaType asMimeType);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/SignedAdvertisement.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/SignedAdvertisement.java
deleted file mode 100644 (file)
index d76b330..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.protocol;
-
-
-import net.jxta.credential.Credential;
-import net.jxta.document.Advertisement;
-import net.jxta.document.ExtendableAdvertisement;
-
-
-/**
- * A container for signed Advertisements
- */
-public abstract class SignedAdvertisement extends ExtendableAdvertisement {
-
-    protected Credential signer = null;
-
-    protected Advertisement adv = null;
-
-    // todo implement clone
-    /**
-     * Returns the identifying type of this Advertisement.
-     *
-     * @return String the type of advertisement
-     */
-    public static String getAdvertisementType() {
-        return "jxta:SA";
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public final String getBaseAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     * Gets the Advertisement.
-     *
-     * @return a signed advertisement
-     */
-    public Advertisement getAdvertisement() {
-        return adv;
-    }
-
-    /**
-     * Sets the Advertisement to be signed.
-     *
-     * @param adv set the advertisment
-     */
-    public void setAdvertisement(Advertisement adv) {
-        this.adv = adv;
-    }
-
-    /**
-     * Returns the credential which signed the advertisement.
-     *
-     * @return the credential which signed the advertisement.
-     */
-    public Credential getSigner() {
-        return signer;
-    }
-
-    /**
-     * Sets the Credential which will sign the advertisement.
-     *
-     * @param cred the credential
-     */
-    public void setSigner(Credential cred) {
-        signer = cred;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/SrdiMessage.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/SrdiMessage.java
deleted file mode 100644 (file)
index 297f536..0000000
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.protocol;
-
-
-import net.jxta.document.Document;
-import net.jxta.document.MimeMediaType;
-import net.jxta.peer.PeerID;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-
-
-/**
- * A generic message that can be used by services to push shared resources to
- * other peers on the network.
- * <p/>
- */
-public abstract class SrdiMessage {
-
-    /**
-     * PERSIST Scope is persist only. i.e. A node receiving such message is expected to only persist
-     * the indexes contained within.
-     */
-    public static final int PERSISTONLY = 0;
-
-    /**
-     * REPLICATE Scope is persist and replicate. i.e. A node receiving such message is expected
-     * to pnly persist the indexes contained within.
-     */
-    public static final int REPLICATE = 1;
-    private final Collection<Entry> entries = new ArrayList<Entry>();
-    private PeerID peerid = null;
-    private String primaryKey = null;
-
-    /**
-     * The scope of SrdiMesage  (0, or 1)
-     */
-    private int scope = 0;
-
-    /**
-     * Write advertisement into a document. asMimeType is a mime media-type
-     * specification and provides the form of the document which is being
-     * requested. Two standard document forms are defined. 'text/text' encodes
-     * the document in a form nice for printing out and 'text/xml' which
-     * provides an XML format.
-     *
-     * @param asMimeType mime-type requested representation for the returned
-     *                   document
-     * @return Document document representing the advertisement
-     */
-    public abstract Document getDocument(MimeMediaType asMimeType);
-
-    /**
-     * returns the source peerid
-     *
-     * @return PeerID
-     */
-    public PeerID getPeerID() {
-        return peerid;
-    }
-
-    /**
-     * get the primary key
-     *
-     * @return primaryKey
-     */
-    public String getPrimaryKey() {
-        return this.primaryKey;
-    }
-
-    /**
-     * Returns the current TTL value.
-     *
-     * @return The current TTL value.
-     * @deprecated ttl is a misnomer, it is meant to be defined as scope. use #getScope() instead
-     */
-    @Deprecated
-    public int getTTL() {
-        return scope;
-    }
-
-    /**
-     * sets the ttl
-     *
-     * @param newTTL The new TTL value.
-     * @deprecated ttl is a misnomer, it is meant to be defined as scope. use #setScope() instead
-     */
-    @Deprecated
-    public void setTTL(int newTTL) {
-        scope = newTTL;
-    }
-
-    /**
-     * Returns the current scope of this message.
-     * <p/>
-     * Scope is either 0 (persist only), or 1 (persist and replicate)
-     *
-     * @return The current scope value.
-     */
-    public int getScope() {
-        return scope;
-    }
-
-    /**
-     * Sets the current scope of this message.
-     * <p/>
-     * Scope is either 0 (persist only), or 1 (persist and replicate)
-     * @see #PERSISTONLY
-     * @see #REPLICATE
-     *
-     * @param scope The new TTL value.
-     */
-    public void setScope(int scope) {
-        this.scope = scope;
-    }
-
-    /**
-     * Decrements TTL
-     */
-    public void decrementTTL() {
-
-        if (this.scope > 0) {
-            this.scope--;
-        }
-    }
-
-    /**
-     * Returns the entries of this SrdiMessage
-     *
-     * @return the entries of this SrdiMessage
-     */
-    public Collection<Entry> getEntries() {
-        return new ArrayList<Entry>(entries);
-    }
-
-    /**
-     *  Adds an index entry
-     * @param key  key
-     * @param value the value
-     * @param expiration expiration in millisconds
-     */
-    public void addEntry(String key, String value, long expiration) {
-        addEntry(new SrdiMessage.Entry(key, value, expiration));
-    }
-
-    public void addEntry(SrdiMessage.Entry entry) {
-        entries.add(entry);
-    }
-
-    /**
-     * Set the Entries for this SrdiMessage.
-     *
-     * @param newEntries The entries to be included in this message.
-     */
-    public void setEntries(Collection<Entry> newEntries) {
-        entries.clear();
-        entries.addAll(newEntries);
-    }
-
-    /**
-     * Set the source peerid
-     *
-     * @param peerid the source PeerID
-     */
-    public void setPeerID(PeerID peerid) {
-        this.peerid = peerid;
-    }
-
-    /**
-     * Set the primary key
-     *
-     * @param pkey the primary key
-     */
-    public void setPrimaryKey(String pkey) {
-        this.primaryKey = pkey;
-    }
-
-    /**
-     * All messages have a type (in xml this is !doctype) which identifies the
-     * message, if no expiration is defined Default expiration infinite for
-     * entries. This is the amount of time which an entry will live in cache.
-     * After this time, the entry is garbage collected, it also worthy to note
-     * that it is up to the peer caching these entries to honor the lifetime of
-     * the entry, and peer may choose to garbage collect entries based on
-     * quotas, relationship with other peers, etc. *
-     *
-     * @return String "jxta:GenSRDI"
-     */
-    public static String getMessageType() {
-        return "jxta:GenSRDI";
-    }
-
-    /**
-     * Entries object, which describes each entry described by this message
-     */
-    public final static class Entry {
-
-        /**
-         * Entry Expiration expressed in relative time in ms
-         */
-        public long expiration;
-
-        /**
-         * Entry key attribute
-         */
-        public String key;
-
-        /**
-         * Entry key value
-         */
-        public String value;
-
-        /**
-         * {@inheritDoc}
-         * <p/>
-         * Expiration time is not considered in calculation.
-         */
-        @Override
-        public boolean equals(Object target) {
-
-            if (this == target) {
-                return true;
-            }
-
-            if (target instanceof Entry) {
-                Entry likeMe = (Entry) target;
-
-                return key.equals(likeMe.key) && value.equals(likeMe.value);
-            }
-
-            return false;
-        }
-
-        /**
-         * {@inheritDoc}
-         * <p/>
-         * Expiration time is not considered in calculation.
-         */
-        @Override
-        public int hashCode() {
-            int result = 0;
-
-            if (null != key) {
-                result ^= key.hashCode();
-            }
-
-            if (null != value) {
-                result ^= value.hashCode();
-            }
-
-            return result;
-        }
-
-        /**
-         * Creates a Entry with key, value, and expiration
-         *
-         * @param key        key attribute
-         * @param value      key value
-         * @param expiration expressed in relative time in ms
-         */
-        public Entry(String key, String value, long expiration) {
-            this.key = key;
-            this.value = value;
-            this.expiration = expiration;
-        }
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/TransportAdvertisement.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/TransportAdvertisement.java
deleted file mode 100644 (file)
index 391fd8f..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.protocol;
-
-
-import net.jxta.document.ExtendableAdvertisement;
-import net.jxta.id.ID;
-
-
-/**
- * This abstract class defines a Transport advertisement. Each peer endpoint
- * protocol is associated with a transport advertisement that describes the
- * protocol and network interface associated with the endpoint transport. For
- * example for TCP endpoint. the following transport information needs to be
- * maintained for this endpoint:
- * <p/>
- * <p>Transport :
- * <ul type-disc>
- * <li><p>Protocol : TCP
- * <li><p>Port : 6001
- * <li><p>MulticastAddr : 224.0.1.85
- * <li><p>MulticastPort : 1234
- * <li><p>MulticastSize : 8192
- * </ul>
- * <p/>
- * <p>This class is an abstract class that needs to be extended by implementation
- * to support the different types of transport advertisements (TCP, HTTP, etc)
- * <p/>
- * <pre>
- * &lt;?xml version="1.0"?>
- *  &lt;TransportAdvertisement type="HTTPAdvertisement">
- *          ..........
- *  &lt;/TransportAdvertisement>
- * </pre>
- *
- * @see net.jxta.protocol.AccessPointAdvertisement
- */
-
-
-public abstract class TransportAdvertisement extends ExtendableAdvertisement {
-
-    protected String protocol = null;
-
-    /**
-     * Returns the identifying type of this Advertisement.
-     *
-     * @return String the type of advertisement
-     */
-    public static String getAdvertisementType() {
-        return "jxta:TransportAdvertisement";
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public final String getBaseAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     * Return ID for indexing. We don't have one so return the nullID.
-     *
-     * @return jxta id associated with this advertisement.
-     */
-    @Override
-    public ID getID() {
-        return ID.nullID;
-    }
-
-    /**
-     * Sets the URI scheme to be used for EndpointAddresses of this Message Transport.
-     *
-     * @return The URI scheme used for EndpointAddresses of this Message Transport.
-     */
-    public String getProtocol() {
-        return protocol;
-    }
-
-    /**
-     * Returns the URI scheme to be used for EndpointAddresses of this Message Transport.
-     *
-     * @param protocol The URI scheme used for EndpointAddresses of this Message Transport.
-     */
-    public void setProtocol(String protocol) {
-        this.protocol = protocol;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/protocol/package.html
deleted file mode 100644 (file)
index 30c1982..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-                               Provides inteface objects for Advertisments and protocol messages for the JXTA 
-                               <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#gloss-jcs" target='_blank'>Core</a>
-                               and
-                               <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#gloss-jss" target='_blank'>Standard</a>
-    Protocols.
-
-                               @see net.jxta.document.Advertisement
-                               @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#overview-advertisements" target='_blank'>JXTA Protocols Specification - Overview : Advertisements</a>
-                               @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#core-advert" target='_blank'>JXTA Protocols Specification - Advertisements</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/rendezvous/RendezVousService.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/rendezvous/RendezVousService.java
deleted file mode 100644 (file)
index 22f51f4..0000000
+++ /dev/null
@@ -1,455 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.rendezvous;
-
-
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.Vector;
-
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointListener;
-import net.jxta.endpoint.Message;
-import net.jxta.id.ID;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.RdvAdvertisement;
-import net.jxta.service.Service;
-
-
-/**
- * The RendezVous Service provides propagation of messages within a JXTA
- * PeerGroup.
- *
- * <p/>The JXTA RendezVous Service defines a subscription mechanism
- * allowing JXTA peers to receive propagated messages (clients of the service)
- * or become a repeater of the service (rendezvous peers).
- *
- * <p/>The Standard Reference Implementation requires that at least one peer in
- * a PeerGroup to act as a Rendezvous. Rendezvous peers may dynamically join or
- * leave the PeerGroup over time.
- *
- * @see    <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-rvp" target='_blank'>JXTA Protocols Specification : Rendezvous</a>
- */
-public interface RendezVousService extends Service {
-
-    /**
-     *  Perform <code>propagate()</code> or <code>walk()</code> using the most
-     *  appropriate TTL value for the implementation and configuration. The
-     *  message will almost certainly be sent with a TTL value much less than
-     *  this value.
-     */
-    public final static int DEFAULT_TTL = Integer.MAX_VALUE;
-
-    /**
-     * Attempt connection to the specified RendezVous peer.
-     *
-     * @deprecated Directly connecting to rendezvous peers is not recommended.
-     * Seed rendezvous should be specified using the RdvConfigAdv mechanisms.
-     *
-     * @param  adv           the advertisement of the RendezVousService peer
-     * @throws  IOException  When the specified peer is unreachable
-     */
-    @Deprecated
-    public void connectToRendezVous(PeerAdvertisement adv) throws IOException;
-
-    /**
-     * Attempt connection to the specified RendezVous peer.
-     *
-     * @deprecated Directly connecting to rendezvous peers is not recommended.
-     * Seed rendezvous should be specified using the RdvConfigAdv mechanisms.
-     *
-     * @param  addr          EndpointAddress of the rendezvous peer
-     * @throws  IOException  When the specified peer is unreachable
-     */
-    @Deprecated
-    public void connectToRendezVous(EndpointAddress addr) throws IOException;
-
-    /**
-     * Disconnect from the specified rendezvous.
-     *
-     * @param  peerID  the PeerId of the RendezVous to disconnect from.
-     */
-    public void disconnectFromRendezVous(ID peerID);
-
-    /**
-     * Returns an Enumeration of the PeerID all the RendezVous on which this
-     * Peer is currently connected. This returns the same result as 
-     * {@link #getConnectedPeers()}.
-     *
-     * @return    Enumeration enumeration of RendezVous.
-     */
-    public Enumeration<ID> getConnectedRendezVous();
-
-    /**
-     * Returns an Enumeration of the PeerID all the RendezVous on which this
-     * Peer failed to connect to.
-     *
-     * @deprecated Due to design changes this no longer returns accurate nor
-     * complete results. It will eventually be removed.
-     *
-     * @return    Enumeration of the PeerID all the RendezVous on which this
-     * Peer failed to connect to.
-     */
-    @Deprecated
-    public Enumeration<ID> getDisconnectedRendezVous();
-
-    /**
-     * Start the local peer as a RendezVous peer.
-     */
-    public void startRendezVous();
-
-    /**
-     * Stop the RendezVous function on the local Peer. All connected Peers are
-     * disconnected.
-     */
-    public void stopRendezVous();
-
-    /**
-     * Returns an Enumeration of the PeerID of the peers that are currently 
-     * connected to this peer. Depending upon the role of of this peer the
-     * result may be an enumeration of clients or an enumeration of rendezvous
-     * peers.
-     *
-     * @return Enumeration of {@link net.jxta.peer.PeerID} connected to this peer.
-     */
-    public Enumeration<ID> getConnectedPeers();
-
-    /**
-     * Returns a Vector of the PeerID of the peers that are currently 
-     * connected to this peer. Depending upon the role of of this peer the
-     * result may be an enumeration of clients or an enumeration of rendezvous
-     * peers.
-     *
-     * @return Vector of {@link net.jxta.peer.PeerID} connected to this peer.
-     */
-    public Vector<ID> getConnectedPeerIDs();
-
-    /**
-     * Registers the provided listener under the given serviceName and
-     * serviceParam to receive messages propagated by the Rendezvous service.
-     * The listener will be added only if no other listener is already
-     * registered with these names.
-     *
-     * @deprecated This method just calls 
-     * {@link net.jxta.endpoint.EndpointService#addIncomingMessageListener}. It's better to just 
-     * register your listener with the Endpoint. This call <b>may</b> be
-     * eventually removed.
-     *
-     * @param  serviceName   The serviceName of the listener.
-     * @param  serviceParam  The serviceParam of the listener.
-     * @param  listener      An EndpointListener to process the message.
-     * @return               true if listener was registered, otherwise false.
-     */
-    @Deprecated
-    public boolean addPropagateListener(String serviceName, String serviceParam, EndpointListener listener);
-
-    /**
-     * Removes a Listener previously added with addPropagateListener.
-     * If the given listener is not the one currently registered, nothing is removed.
-     *
-     * @deprecated This method just calls 
-     * {@link net.jxta.endpoint.EndpointService#removeIncomingMessageListener}. 
-     * It's better to just deregister your listener with the Endpoint. This call 
-     * <b>may</b> be eventually removed.
-     *
-     * @param  serviceName   The serviceName of the listener.
-     * @param  serviceParam  The serviceParam of the listener.
-     * @param  listener      An EndpointListener to process the message.
-     * @return               the listener removed, <tt>null</tt> if the listener was not registered.
-     */
-    @Deprecated
-    public EndpointListener removePropagateListener(String serviceName, String serviceParam, EndpointListener listener);
-
-    /**
-     * Add a listener for RendezVousEvents.
-     *
-     * @param  listener  An RendezvousListener to process the event.
-     */
-    public void addListener(RendezvousListener listener);
-
-    /**
-     * Removes a Rendezvous event listener previously added with addListener.
-     *
-     * @param  listener  the RendezvousListener listener remove
-     * @return           true if successful
-     */
-    public boolean removeListener(RendezvousListener listener);
-
-    /**
-     * Propagates a message to the local network and to as many members of
-     * the peer group as possible.
-     *
-     * <p/>This method sends the message to all peers, rendezvous peers and
-     * edge peer. This method of propagation is very expensive and should
-     * be used very cautiously. When rendezvous peers are used in order to
-     * cache index of data, it is more efficient to use the walk() method.
-     *
-     * <p/>Only a single HOP at a time is performed. Messages are always
-     * delivered to the destination handler on arrival. This handler
-     * is responsible for repropagating further, if deemed appropriate.
-     *
-     * <p/>Loop and TTL control are performed automatically.
-     *
-     * <p/>Messages can be propagated via this method for the first time or
-     * can be re-propagated by re-using a message that came in via propagation.
-     * In the later case, the TTL and loop detection parameters CANNOT be
-     * re-initialized. If one wants to "re-propagate" a message with a new TTL
-     * and blank gateways list one must generate a completely new message.
-     * This limits the risk of accidental propagation storms, although they
-     * can always be engineered deliberately.
-     *
-     * @param  msg              is the message to propagate.
-     * @param  serviceName      is the name of the service.
-     * @param  serviceParam     is the parameter of the service.
-     * @param  ttl              The requested TTL for the message.
-     * @exception  IOException  if an io error occurs
-     */
-    public void propagate(Message msg, String serviceName, String serviceParam, int ttl) throws IOException;
-
-    /**
-     * Propagates a message to the specified peers.
-     *
-     * @param  destPeerIds      An enumeration of PeerIDs of the peers that are the
-     * intended recipients of the propagated message.
-     * @param  msg              The message to propagate.
-     * @param  serviceName      The name of the service.
-     * @param  serviceParam     The parameter of the service.
-     * @param  ttl              The requested TTL for the message.
-     * @exception  IOException  if an io error occurs
-     */
-    public void propagate(Enumeration<? extends ID> destPeerIds, Message msg, String serviceName, String serviceParam, int ttl) throws IOException;
-
-    /**
-     * Propagates a message to members of the peer group reachable via the
-     * local network. Typically this is accomplished by broadcasting or
-     * multicasting.
-     *
-     * <p/>Only a single HOP at a time is performed. Messages are always
-     * delivered to the destination handler on arrival. This handler
-     * is responsible for repropagating further, if deemed appropriate.
-     *
-     * <p/>Loop and TTL control are performed automatically.
-     *
-     * <p/>Messages can be propagated via this method for the first time or
-     * can be re-propagated by re-using a message that came in via propagation.
-     * In the later case, the TTL and loop detection parameters CANNOT be
-     * re-initialized. If one wants to "re-propagate" a message with a new TTL
-     * and blank gateways list one must generate a completely new message.
-     * This limits the risk of accidental propagation storms, although they
-     * can always be engineered deliberately.
-     *
-     * @param  msg              is the message to propagate.
-     * @param  serviceName      is the name of the service.
-     * @param  serviceParam     is the parameter of the service.
-     * @param  ttl              The requested TTL for the message.
-     * @exception  IOException  if an io error occurs
-     */
-    public void propagateToNeighbors(Message msg, String serviceName, String serviceParam, int ttl) throws IOException;
-
-    /**
-     * Propagates a message to as many members of the peer group as possible.
-     *
-     * <p/>Only a single HOP at a time is performed. Messages are always
-     * delivered to the destination handler on arrival. This handler
-     * is responsible for repropagating further, if deemed appropriate.
-     *
-     * <p/>Loop and TTL control are performed automatically.
-     *
-     * <p/>Messages can be propagated via this method for the first time or
-     * can be re-propagated by re-using a message that came in via propagation.
-     * In the later case, the TTL and loop detection parameters CANNOT be
-     * re-initialized. If one wants to "re-propagate" a message with a new TTL
-     * and blank gateways list one must generate a completely new message.
-     * This limits the risk of accidental propagation storms, although they
-     * can always be engineered deliberately.
-     *
-     * @param  msg              is the message to propagate.
-     * @param  serviceName      is the name of the service
-     * @param  serviceParam     is the parameter of the service
-     * @param  ttl              The requested TTL for the message.
-     * @exception  IOException  if an io error occurs
-     */
-    public void propagateInGroup(Message msg, String serviceName, String serviceParam, int ttl) throws IOException;
-
-    /**
-     * Return {@code true} if connected to a rendezvous.
-     *
-     * @return {@code true} if connected to a rendezvous otherwise {@code false}.
-     */
-    public boolean isConnectedToRendezVous();
-
-    /**
-     * Returns {@code true} if this peer is acting as a rendezvous peer (per the
-     * implementation definition) within the peer group. {@code false} is
-     * returned for all other peer roles.
-     *
-     * @return {@code true} if this peer is acting as a rendezvous peer (per the
-     * implementation definition) within the peer group. {@code false} is
-     * returned for all other peer roles.
-     */
-    public boolean isRendezVous();
-
-    /**
-     * Returns the current role of this peer within the peergroup.
-     *
-     * @return The current role of this peer within the peergroup.
-     */
-    public RendezVousStatus getRendezVousStatus();
-
-    /**
-     *  Enable or disable the automatic switching between an Edge Peer
-     *  and a Rendezvous Peer.
-     *
-     * @param auto {@code true} will activate automatic role switching.
-     * @return The previous auto start value.
-     */
-    public boolean setAutoStart(boolean auto);
-
-    /**
-     *  Enable or disable the automatic switching between an Edge Peer
-     *  and a Rendezvous Peer.
-     *
-     * @param auto {@code true} will activate automatic role switching.
-     * @param period The interval in milliseconds at which the peer should
-     * reconsider it's role.
-     * @return The previous auto start value.
-     */
-    public boolean setAutoStart(boolean auto, long period);
-
-    /**
-     * Walk a message through the rendezvous peers of the network: only
-     * rendezvous peers will receive the message.
-     *
-     * <p/>Only a single HOP at a time is performed. Messages are always
-     * delivered to the destination handler on arrival. This handler
-     * is responsible for repropagating further, if deemed appropriate.
-     *
-     * <p/>Loop and TTL control are performed automatically.
-     *
-     * <p/>Messages can be propagated via this method for the first time or
-     * can be re-propagated by re-using a message that came in via propagation.
-     * In the later case, the TTL and loop detection parameters CANNOT be
-     * re-initialized. If one wants to "re-propagate" a message with a new TTL
-     * and blank gateways list one must generate a completely new message.
-     * This limits the risk of accidental propagation storms, although they
-     * can always be engineered deliberately.
-     *
-     * <p/><b>Note</b>: The original msg is not modified and may be reused upon return.
-     *
-     * @param  msg           is the message to walk.
-     * @param  serviceName   is the name of the service
-     * @param  serviceParam  is the parameter of the service
-     * @param  ttl           is the maximum TTL of the message.
-     * @throws  IOException  when walking the message is impossible (network failure)
-     */
-    public void walk(Message msg, String serviceName, String serviceParam, int ttl) throws IOException;
-
-    /**
-     * <p/>Walk a message through the rendezvous peers of the network: only
-     * rendezvous peers will receive the message.
-     *
-     * <p/>Only a single HOP at a time is performed. Messages are always
-     * delivered to the destination handler on arrival. This handler
-     * is responsible for repropagating further, if deemed appropriate.
-     *
-     * <p/>Loop and TTL control are performed automatically.
-     *
-     * <p/>Messages can be propagated via this method for the first time or
-     * can be re-propagated by re-using a message that came in via propagation.
-     * In the later case, the TTL and loop detection parameters CANNOT be
-     * re-initialized. If one wants to "re-propagate" a message with a new TTL
-     * and blank gateways list one must generate a completely new message.
-     * This limits the risk of accidental propagation storms, although they
-     * can always be engineered deliberately.
-     *
-     * <p/><b>Note</b>: The original msg is not modified and may be reused upon return.
-     *
-     * @param  destPeerIDs   is a Vector of PeerIDs of the peers which are receiving
-     * first the walker. Note that each entry in the Vector will create its own
-     * walker.
-     * @param  msg           is the message to walk.
-     * @param  serviceName   is the name of the service
-     * @param  serviceParam  is the parameter of the service
-     * @param  ttl           is the maximum TTL of the message.
-     * @throws  IOException  when walking the message is impossible (network failure)
-     */
-    public void walk(Vector<? extends ID> destPeerIDs, Message msg, String serviceName, String serviceParam, int ttl) throws IOException;
-
-    /**
-     * Returns a vector of RdvAdvertisement of the local view of rendezvous peers.
-     *
-     * @deprecated Due to design changes, the list of peers may be empty in
-     * configurations which previously returned a non-empty result. Future 
-     * JXTA versions are likely to use a different API.
-     *
-     * @return The local view of RDV peers.
-     */
-    @Deprecated
-    public Vector<RdvAdvertisement> getLocalWalkView();
-
-    /**
-     * Set a new deadline for the rendezvous to be proven alive.
-     * As a result a lease response must be sought and obtained within the
-     * specified delay or the rdv is considered disconnected.
-     *
-     * <p/>A timeout of 0 or less triggers immediate disconnection.
-     *
-     * @param  peer     The peer to be challenged
-     * @param  timeout  The delay
-     */
-    public void challengeRendezVous(ID peer, long timeout);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/rendezvous/RendezVousStatus.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/rendezvous/RendezVousStatus.java
deleted file mode 100644 (file)
index fb1486a..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.rendezvous;
-
-
-/**
- * A static "enum" class for RendezVous Status.
- */
-public enum RendezVousStatus {
-
-    /**
-     * No RendezVous Service is configured.
-     */
-   NONE,
-
-    /**
-     * An unknown RendezVous Service is configured.
-     */
-    UNKNOWN,
-
-    /**
-     * An ad hoc (connectionless) RendezVous Service is configured.
-     */
-    ADHOC,
-
-    /**
-     * RendezVous Service is configured as an edge peer.
-     */
-    EDGE,
-
-    /**
-     * RendezVous Service is configured to automatically choose, but is
-     * currently running as an edge.
-     */
-    AUTO_EDGE,
-
-    /**
-     * RendezVous Service is configured to automatically choose, but is
-     * currently running as a Rendezvous.
-     */
-    AUTO_RENDEZVOUS,
-
-    /**
-     * RendezVous Service is configured as an rendezvous peer.
-     */
-    RENDEZVOUS
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/rendezvous/RendezvousEvent.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/rendezvous/RendezvousEvent.java
deleted file mode 100644 (file)
index ed6adf0..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.rendezvous;
-
-
-import java.util.EventObject;
-
-import net.jxta.id.ID;
-
-
-/**
- *  Container for Rendezvous Service events. The source of the event is the
- *  rendezvous service generating the event
- */
-public class RendezvousEvent extends EventObject {
-
-    /**
-     *  Rendezvous connection event
-     */
-    public final static int RDVCONNECT = 0;
-
-    /**
-     *  Connection renewal event
-     */
-    public final static int RDVRECONNECT = 1;
-
-    /**
-     *  Client connection event
-     */
-    public final static int CLIENTCONNECT = 2;
-
-    /**
-     *  Client Connection renewal event
-     */
-    public final static int CLIENTRECONNECT = 3;
-
-    /**
-     *  Rendezvous disconnection event
-     */
-    public final static int RDVDISCONNECT = 4;
-
-    /**
-     *  Rendezvous connection failure
-     */
-    public final static int RDVFAILED = 5;
-
-    /**
-     *  Client disconnection event
-     */
-    public final static int CLIENTDISCONNECT = 6;
-
-    /**
-     *  Client connection failure
-     */
-    public final static int CLIENTFAILED = 7;
-
-    /**
-     *  Node has become a rendezvous
-     */
-    public final static int BECAMERDV = 8;
-
-    /**
-     *  Node has become a edge
-     */
-    public final static int BECAMEEDGE = 9;
-
-    private final static String EVENTNAMES[] = {
-        "RDVCONNECT", "RDVRECONNECT", "CLIENTCONNECT", "CLIENTRECONNECT", "RDVDISCONNECT", "RDVFAILED", "CLIENTDISCONNECT"
-                ,
-        "CLIENTFAILED", "BECAMERDV", "BECAMEEDGE"
-    };
-
-    private int type;
-    private ID peer;
-
-    /**
-     *  Creates a new event
-     *
-     * @param  source  The rendezvous service which generated the event.
-     * @param  type    the event type.
-     * @param  peer    the peer associated with the event.
-     */
-    public RendezvousEvent(Object source, int type, ID peer) {
-        super(source);
-        this.type = type;
-        this.peer = peer;
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public String toString() {
-        String eventType;
-
-        if ((type >= RDVCONNECT) && (type <= BECAMEEDGE)) {
-            eventType = EVENTNAMES[type];
-        } else {
-            eventType = "UNKNOWN (" + type + ")";
-        }
-
-        return super.toString() + " : " + eventType + " for [" + peer + "]";
-    }
-
-    /**
-     *  Returns the event type
-     *
-     * @return    int type
-     */
-    public int getType() {
-        return type;
-    }
-
-    /**
-     *  Returns peerid
-     *
-     * @return    the peer associated with the event
-     */
-    public String getPeer() {
-        return peer.toString();
-    }
-
-    /**
-     *  Returns peerid
-     *
-     * @return    the peer associated with the event
-     */
-    public ID getPeerID() {
-        return peer;
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/rendezvous/RendezvousListener.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/rendezvous/RendezvousListener.java
deleted file mode 100644 (file)
index 18c7742..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/*\r
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.\r
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */\r
-\r
-package net.jxta.rendezvous;\r
-\r
-\r
-import java.util.EventListener;\r
-\r
-\r
-/**\r
- *  The listener interface for receiving RendezVousService events.\r
- *\r
- *  The following example illustrate how to implement a\r
- * <code>RendezvousListener</code>:\r
- *\r
- * <pre><code>\r
- * public class MyApp implements RendezvousListener {\r
- *           ..\r
- *           rendezvous = mygroup.getRendezVousService();\r
- *           rendezvous.addListener(this);\r
- *           ..\r
- *           ..\r
- *           ..\r
- *   public void rendezvousEvent (RendezvousEvent event) {\r
- *       if (event.getType() == event.RDVCONNECT) {\r
- *          ..\r
- *       }\r
- *   }\r
- * }\r
- * </code></pre>\r
- */\r
-public interface RendezvousListener extends EventListener {\r
-    \r
-    /**\r
-     * Called when an event occurs for the Rendezvous service\r
-     *\r
-     * @param event the rendezvous event\r
-     */\r
-    void rendezvousEvent(RendezvousEvent event);\r
-    \r
-}\r
-\r
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/rendezvous/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/rendezvous/package.html
deleted file mode 100644 (file)
index ce1e7e3..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    The RendezVous Service is responsible for propagating messages within a JXTA
-    PeerGroup.
-                               
-    @see net.jxta.protocol.RdvAdvertisement
-    @see net.jxta.rendezvous.RendezVousService
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-rvp" target='_blank'>JXTA Protocols Specification : Rendezvous</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/resolver/GenericResolver.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/resolver/GenericResolver.java
deleted file mode 100644 (file)
index 7d63e47..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.resolver;
-
-
-/**
- * @deprecated This interface has been subsumed into the 
- * {@link net.jxta.resolver.ResolverService}.
- */
-@Deprecated
-public interface GenericResolver {}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/resolver/QueryHandler.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/resolver/QueryHandler.java
deleted file mode 100644 (file)
index 57ad888..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.resolver;
-
-
-import net.jxta.protocol.ResolverQueryMsg;
-import net.jxta.protocol.ResolverResponseMsg;
-import net.jxta.exception.*;
-import java.io.*;
-
-
-/**
- * Services that wish to act as a resolver handler must implement this interface
- *
- * @see net.jxta.resolver.ResolverService
- * @see net.jxta.protocol.ResolverQueryMsg
- * @see net.jxta.protocol.ResolverResponseMsg
- **/
-public interface QueryHandler {
-    
-    /**
-     * Process the resolver query, and generate response
-     * it is the responsibility of the handler to send the response
-     *
-     * <p/><pre>
-     * result = processIncomingQuery(query);
-     * if (result != null) {
-     *   resolver.sendResponse(query.getSrc(), response);
-     *   return ResolverService.OK;
-     *  } else return ResolverService.Repropagate;
-     * </pre>
-     *
-     * @param query ResolverQueryMsg query
-     * @return int status, {@link net.jxta.resolver.ResolverService#OK OK} 
-     * success, {@link net.jxta.resolver.ResolverService#Repropagate Repropagate}
-     * to indicate a re-propagation is needed.
-     */
-    
-    public int processQuery(ResolverQueryMsg query);
-    
-    /**
-     * Called when messages are received by the ResolverService
-     * it calls back this method to deal with received responses
-     *
-     * @param response ResolverQueryMsg response
-     **/
-    public void processResponse(ResolverResponseMsg response);    
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/resolver/ResolverService.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/resolver/ResolverService.java
deleted file mode 100644 (file)
index bff3867..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.resolver;
-
-
-import net.jxta.service.Service;
-import net.jxta.protocol.ResolverQueryMsg;
-import net.jxta.protocol.ResolverResponseMsg;
-import net.jxta.protocol.ResolverSrdiMsg;
-
-
-/**
- * Provides a generic mechanism for JXTA Services to send "Queries", and receive 
- * "Responses". It removes the burden for registered handlers in deal with :
- *
- *<ul type-disc>
- *    <li>Setting message tags, to ensure uniqueness of tags and
- *     ensures that messages are sent to the correct address, and group.</p>
- *    <li>Authentication, and verification of credentials.</p>
- *    <li>Query routing.</p>
- *    <li>drop rogue messages.</p>
- *</ul>
- *
- * <p/>The ResolverService does not proccess the queries, nor does it not
- * compose reponses. Processing of queries, and composition of responses is left
- * up to the registered handlers. Services that wish to handle queries and
- * generate reponses must implement {@link net.jxta.resolver.QueryHandler}.
- *
- * @see net.jxta.service.Service
- * @see net.jxta.resolver.QueryHandler
- * @see net.jxta.protocol.ResolverQueryMsg
- * @see net.jxta.protocol.ResolverResponseMsg
- */
-public interface ResolverService extends Service, GenericResolver {
-    
-    /**
-     *  Returned by query handlers to indicate that the query should be
-     *  forwarded to the rest of the network.
-     */
-    public final static int Repropagate = -1;
-    
-    /**
-     *  Returned by query handlers to indicate that the query has been resolved
-     *  and a response has been sent.
-     */
-    public final static int OK = 0;
-    
-    /**
-     *  Registers a given QueryHandler, returns the previous handler registered
-     *  under this name.
-     *
-     *  @param name The name under which this handler is to be registered.
-     *  @param handler The handler.
-     *  @return The previous handler registered under this name.
-     */
-    public QueryHandler registerHandler(String name, QueryHandler handler);
-    
-    /**
-     *  Unregisters a given QueryHandler, returns the previous handler
-     *  registered under this name.
-     *
-     *  @param name The name of the handler to unregister.
-     *  @return The previous handler registered under this name.
-     */
-    public QueryHandler unregisterHandler(String name);
-    
-    /**
-     *  Registers a given SrdiHandler, returns the previous handler registered
-     *  under this name.
-     *
-     *  @param name The name under which this handler is to be registered.
-     *  @param handler The handler.
-     *  @return The previous handler registered under this name.
-     *
-     */
-    public SrdiHandler registerSrdiHandler(String name, SrdiHandler handler);
-    
-    /**
-     *  Unregisters a given SrdiHandler, returns the previous handler registered
-     *  under this name.
-     *
-     *  @param name The name of the handler to unregister.
-     *  @return The previous handler registered under this name
-     *
-     */
-    public SrdiHandler unregisterSrdiHandler(String name);
-    
-    /**
-     *  Sends a resolver query. If <tt>destPeer</tt> is <tt>null</tt> the 
-     *  message is propagated.
-     *
-     *  @param destPeer The destination peer of the query or <tt>null</tt> if
-     *  the query is to be propagated.
-     *  @param query The query to match.
-     */
-    public void sendQuery(String destPeer, ResolverQueryMsg query);
-    
-    /**
-     *  Send a resolver response. If <tt>destPeer</tt> is <tt>null</tt> then the
-     *  response is propagated. Propagated responses are generally announcements
-     *  and not responses to active queries.
-     *
-     *  @param destPeer The destination peer of the response or <tt>null</tt> if
-     *  the response is to be propagated. 
-     *  @param response The response to be sent.
-     */
-    public void sendResponse(String destPeer, ResolverResponseMsg response);
-    
-    /**
-     *  Send an SRDI message.
-     *
-     *  <p/>If <tt>destPeer</tt> is <tt>null</tt> the message is walked.
-     *
-     *  @param destPeer is the destination of the SRDI message.
-     *  @param srdi is the SRDI message to be sent.
-     */
-    public void sendSrdi(String destPeer, ResolverSrdiMsg srdi);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/resolver/SrdiHandler.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/resolver/SrdiHandler.java
deleted file mode 100644 (file)
index 321f0b5..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.resolver;
-
-
-import net.jxta.protocol.ResolverSrdiMsg;
-import net.jxta.endpoint.OutgoingMessageEvent;
-import net.jxta.peer.PeerID;
-
-
-/**
- *  Services that wish to receive shared resource indecies must implement this
- *  interface.
- *
- *@see        net.jxta.protocol.SrdiMessage
- */
-
-public interface SrdiHandler {
-
-    /**
-     *  Process the SrdiMessage message, returns true if the message was
-     *  processed properly
-     *
-     *@param  message  Description of the Parameter
-     *@return          true if the message was processed properly
-     */
-
-    public boolean processSrdi(ResolverSrdiMsg message);
-
-    /**
-     * Resolver calls this method when a failure to send a message to specified 
-     * peer occurs
-     *
-     *@param  peerid  peerid failure occured on
-     */
-
-    public void messageSendFailed(PeerID peerid, OutgoingMessageEvent e);
-
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/resolver/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/resolver/package.html
deleted file mode 100644 (file)
index 791c05c..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    The JXTA Resolver Services provides a generic mechanism for JXTA Services
-                               to send "Queries", and receive "Responses".
-
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-prp" target='_blank'>JXTA Protocols Specification : Peer Resolver Protocol</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/service/Service.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/service/Service.java
deleted file mode 100644 (file)
index fdb70fe..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.service;
-
-
-import net.jxta.platform.Module;
-import net.jxta.document.Advertisement;
-
-
-/**
- * This interface implements the peer group service interface. Peer groups
- * are formed as a collection of peers that have agreed upon a common set of
- * services. The JXTA platform provides a predefined set of services to build
- * peer groups
- *
- * <p/>Every service is defined by a
- * {@link net.jxta.protocol.ModuleImplAdvertisement}. The Service
- * advertisement provides the necessary information to uniquely identify
- * the service and to contact its associated service(s).
- *
- * <p/>When a new peer is joining a peer group an instance of all the
- * services associated with the new peer group is created on this peer
- * dynamically. Not all services need to be resident on a peer. A peer can
- * dynamically load a new service from the peer it contacted to join the
- * new peer group (via the PeerGroupAdvertisement of this group).
- *
- * @see         net.jxta.peergroup.PeerGroup
- * @see         net.jxta.platform.Application
- * @see         net.jxta.protocol.PeerGroupAdvertisement
- * @see         net.jxta.protocol.ModuleImplAdvertisement
- **/
-public interface Service extends Module {
-    
-    /**
-     * Service objects are not manipulated directly to protect usage
-     * of the service. A Service interface is returned to access the service
-     * methods.
-     *
-     * @return Service public interface of the service
-     *
-     */
-    public Service getInterface();
-    
-    /**
-     * Returns the advertisement for this service.
-     *
-     * @return Advertisement the advertisement. This is always a 
-     * {@code ModuleImplAdvertisement}.
-     *
-     **/
-    public Advertisement getImplAdvertisement();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/service/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/service/package.html
deleted file mode 100644 (file)
index a248abb..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    Every service is defined by a 
-    {@link net.jxta.protocol.ModuleImplAdvertisement}. The Service
-                               advertisement provides the necessary information to uniquely identify
-                        the service and to contact its associated service(s).
-
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#overview-services" target='_blank'>JXTA Protocols Specification : Services</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/socket/JxtaMulticastSocket.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/socket/JxtaMulticastSocket.java
deleted file mode 100644 (file)
index 429e1c0..0000000
+++ /dev/null
@@ -1,478 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.socket;
-
-
-import net.jxta.credential.Credential;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.endpoint.ByteArrayMessageElement;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.StringMessageElement;
-import net.jxta.id.IDFactory;
-import net.jxta.impl.util.ProducerBiasedQueue;
-import net.jxta.logging.Logging;
-import net.jxta.membership.MembershipService;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.pipe.InputPipe;
-import net.jxta.pipe.OutputPipe;
-import net.jxta.pipe.PipeMsgEvent;
-import net.jxta.pipe.PipeMsgListener;
-import net.jxta.pipe.PipeService;
-import net.jxta.protocol.PipeAdvertisement;
-
-import java.io.IOException;
-import java.net.DatagramPacket;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.MulticastSocket;
-import java.net.SocketAddress;
-import java.net.SocketException;
-import java.net.SocketTimeoutException;
-import java.net.URI;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * The JxtaMulticastSocket class is useful for sending and receiving
- * JXTA multicast packets. A JxtaMulticastSocket is a (UDP) DatagramSocket,
- * with additional capabilities for joining "groups" of other multicast hosts
- * on the internet.
- * A multicast group is specified within the context of PeerGroup and a propagate
- * pipe advertisement.
- * One would join a multicast group by first creating a MulticastSocket
- * with the desired peer group and pipe advertisement :
- * <p/>
- * <pre>
- *  // join a Multicast group and send the group salutations
- *  ...
- *  String msg = "Hello";
- *  MulticastSocket s = new JxtaMulticastSocket(peergroup, propPipeAdv);
- *  //We are joined at this point
- *  DatagramPacket hi = new DatagramPacket(msg.getBytes(), msg.length());
- *  s.send(hi);
- *  // get their responses!
- *  byte[] buf = new byte[1000];
- *  DatagramPacket recv = new DatagramPacket(buf, buf.length);
- *  s.receive(recv);
- *  ...
- *  // OK, I'm done talking - leave the group...
- *  s.close();
- * </pre>
- * <p/>
- * One can also respond only to the sender of the datagram as follows :
- * <pre>
- *  DatagramPacket res = new DatagramPacket(response.getBytes(), response.length());
- *  res.setAddress(recv.getAddress());
- *  s.send(res);
- * </pre>
- * <p/>
- * When one sends a message to a multicast group, all subscribing recipients to
- * that peergroup and pipe receive the message (including themselves)
- * When a socket subscribes to a multicast group/port, it receives datagrams
- * sent by other hosts to the group/pipe, as do all other members of the group
- * and pipe. A socket relinquishes membership in a group by the
- * close() method. Multiple MulticastSocket's may
- * subscribe to a multicast group and pipe concurrently, and they will all receive
- * group datagrams.
- * <p/>
- * When a datagram is sent it carries along with the peerid of the sender.
- * The PeerID is represented as a InetAddress in the form of host/ipadress
- * where host name is the peerid, and ip address is always represented as 0.0.0.0
- * since it is meaningless in the context of JXTA.
- * e.g of InetAddress resembles the following:
- * <p/>
- * <pre>
- * uuid-59616261646162614A787461503250339C6014B0F21A49DBBDF2ADBDDBCB314703/0.0.0.0
- * </pre>
- */
-
-public class JxtaMulticastSocket extends MulticastSocket implements PipeMsgListener {
-    private final static Logger LOG = Logger.getLogger(JxtaMulticastSocket.class.getName());
-    public static final String NAMESPACE = "JXTAMCAST";
-    public static final String DATATAG = "DATAGRAM";
-    public static final String SRCIDTAG = "SRCID";
-    protected PipeAdvertisement pipeAdv;
-    protected PipeService pipeSvc;
-    protected InputPipe in;
-    protected PeerGroup group;
-    protected SocketAddress socketAddress;
-    protected InetAddress localAddress;
-    protected OutputPipe outputPipe;
-    protected boolean closed = false;
-    protected boolean bound = false;
-    protected ProducerBiasedQueue queue = new ProducerBiasedQueue();
-    protected Credential credential = null;
-    protected StructuredDocument credentialDoc = null;
-    private int timeout = 60000;
-    private byte[] fauxip = new byte[4];
-    private boolean jxtamode = false;
-    private MessageElement srcElement = null;
-
-    /**
-     * Create a multicast socket and bind it to a specific pipe within specified
-     * peer group
-     *
-     * @param group  group context
-     * @param pipeAd PipeAdvertisement
-     * @throws IOException if an io error occurs
-     */
-    public JxtaMulticastSocket(PeerGroup group, PipeAdvertisement pipeAd) throws IOException {
-        super();
-        joinGroup(group, pipeAd);
-    }
-
-    /**
-     * joins MutlicastSocket to specified pipe within the context of group
-     *
-     * @param group  group context
-     * @param pipeAd PipeAdvertisement
-     * @throws IOException if an io error occurs
-     */
-    public void joinGroup(PeerGroup group, PipeAdvertisement pipeAd) throws IOException {
-
-        if (pipeAd.getType() != null && !pipeAd.getType().equals(PipeService.PropagateType)) {
-            throw new IOException("Only propagate pipe advertisements are supported");
-        }
-        if (pipeAd.getPipeID() == null) {
-            throw new IOException("Invalid pipe advertisement");
-        }
-
-        this.group = group;
-        this.pipeAdv = pipeAd;
-        pipeSvc = group.getPipeService();
-        this.in = pipeSvc.createInputPipe(pipeAd, this);
-        this.credentialDoc = getCredDoc(group);
-        outputPipe = pipeSvc.createOutputPipe(pipeAd, 1);
-        String id = group.getPeerID().toString();
-
-        srcElement = new StringMessageElement(SRCIDTAG, id, null);
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Starting JxtaMulticastSocket on pipe id :" + pipeAdv.getID());
-        }
-        String pipeStr = pipeAd.getPipeID().getUniqueValue().toString();
-
-        localAddress = InetAddress.getByAddress(pipeStr, fauxip);
-        socketAddress = new InetSocketAddress(localAddress, 0);
-        bound = true;
-    }
-
-    /**
-     * Obtain the credential doc from the group object
-     *
-     * @param group group context
-     * @return The credDoc value
-     */
-    protected static StructuredDocument getCredDoc(PeerGroup group) {
-        try {
-            MembershipService membership = group.getMembershipService();
-            Enumeration each = membership.getCurrentCredentials();
-
-            if (each.hasMoreElements()) {
-                // get the only credential "nobody"
-                Credential credential = (Credential) each.nextElement();
-
-                return credential.getDocument(MimeMediaType.XMLUTF8);
-            }
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "failed to get credential", e);
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Returns the binding state of the MutlicastSocket.
-     *
-     * @return true if the MutlicastSocket successfully bound to an address
-     */
-    @Override
-    public boolean isBound() {
-        return bound;
-    }
-
-    /**
-     * Closes this MutlicastSocket.
-     */
-    @Override
-    public synchronized void close() {
-        if (closed) {
-            return;
-        }
-        bound = false;
-        closed = true;
-        in.close();
-        outputPipe.close();
-        queue.close();
-        in = null;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void pipeMsgEvent(PipeMsgEvent event) {
-
-        Message message = event.getMessage();
-
-        if (message == null) {
-            return;
-        }
-
-        MessageElement element = null;
-
-        // does the message contain any data
-        element = message.getMessageElement(NAMESPACE, DATATAG);
-        if (element == null) {
-            return;
-        }
-        try {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Pushing a message onto queue");
-            }
-            queue.push(message, -1);
-        } catch (InterruptedException e) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Interrupted", e);
-            }
-        }
-    }
-
-    /**
-     * Gets the Timeout attribute of the JxtaMulticastSocket
-     *
-     * @return The soTimeout value
-     */
-    @Override
-    public synchronized int getSoTimeout() {
-        return timeout;
-    }
-
-    /**
-     * Sets the Timeout attribute of the JxtaMulticastSocket
-     * a timeout of 0 blocks forever, by default this Socket's
-     * timeout is set to 0
-     *
-     * @param timeout The new soTimeout value
-     */
-    @Override
-    public synchronized void setSoTimeout(int timeout) throws SocketException {
-        checkState();
-        this.timeout = timeout;
-    }
-
-    /**
-     * Returns the closed state of the JxtaMulticastSocket.
-     *
-     * @return true if the socket has been closed
-     */
-    @Override
-    public synchronized boolean isClosed() {
-        return closed;
-    }
-
-    /**
-     * Throws a SocketException if closed or not bound
-     *
-     * @throws SocketException if closed
-     */
-    private void checkState() throws SocketException {
-        if (isClosed()) {
-            throw new SocketException("MulticastSocket is closed");
-        } else if (!isBound()) {
-            throw new SocketException("MulticastSocket not bound");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void send(DatagramPacket packet) throws IOException {
-        checkState();
-        byte[] data = new byte[packet.getLength()];
-
-        System.arraycopy(packet.getData(), packet.getOffset(), data, 0, packet.getLength());
-
-        Message msg = new Message();
-
-        msg.addMessageElement(NAMESPACE, srcElement);
-        msg.addMessageElement(NAMESPACE, new ByteArrayMessageElement(DATATAG, MimeMediaType.AOS, data, null));
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Sending a data packet");
-        }
-        InetAddress address = packet.getAddress();
-        PeerID pid = null;
-
-        if (address != null) {
-            String pidStr = address.getHostName();
-
-            try {
-                pid = (PeerID) IDFactory.fromURI(new URI(pidStr));
-            } catch (Exception ex) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Invalid source PeerID multicasting instead");
-                }
-            }
-        }
-        if (pid != null) {
-            // Unicast datagram
-            // create a op pipe to the destination peer
-            OutputPipe op = pipeSvc.createOutputPipe(pipeAdv, Collections.singleton(pid), 1000);
-
-            op.send(msg);
-            op.close();
-        } else {
-            // multicast
-            outputPipe.send(msg);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void receive(DatagramPacket packet) throws IOException {
-        checkState();
-        Message msg = null;
-        // data
-        MessageElement del = null;
-        // src
-        MessageElement sel = null;
-
-        try {
-            msg = (Message) queue.pop(timeout);
-            if (msg == null) {
-                if (timeout > 0) {
-                    throw new SocketTimeoutException("Socket timeout reached");
-                } else {
-                    return;
-                }
-            }
-            del = msg.getMessageElement(NAMESPACE, DATATAG);
-            sel = msg.getMessageElement(NAMESPACE, SRCIDTAG);
-            if (del == null || sel == null) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Message contains no data element, returning");
-                }
-                return;
-            } else {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Popped a message off the queue");
-                }
-            }
-        } catch (InterruptedException e) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Exception occured", e);
-            }
-            throw new IOException(e.toString());
-        }
-        if (del.getByteLength() > packet.getLength()) {
-            throw new IOException("Datagram can not accomodate message of size :" + del.getByteLength());
-        }
-        String addrStr = new String(sel.getBytes(false), 0, (int) sel.getByteLength(), "UTF8");
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Src Address :" + addrStr);
-        }
-        InetAddress address = InetAddress.getByAddress(addrStr, fauxip);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Setting Data, and Src Address :" + address);
-        }
-        packet.setAddress(address);
-        packet.setData(del.getBytes(false));
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public InetAddress getLocalAddress() {
-        if (isClosed()) {
-            return null;
-        }
-        return localAddress;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public SocketAddress getLocalSocketAddress() {
-        if (isClosed()) {
-            return null;
-        }
-        return socketAddress;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void bind(SocketAddress addr) throws SocketException {
-        if (isBound()) {
-            throw new SocketException("Already bound");
-        }
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/socket/JxtaServerSocket.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/socket/JxtaServerSocket.java
deleted file mode 100644 (file)
index 470065b..0000000
+++ /dev/null
@@ -1,700 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.socket;
-
-import net.jxta.credential.Credential;
-import net.jxta.credential.CredentialValidator;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.XMLDocument;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.logging.Logging;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.pipe.InputPipe;
-import net.jxta.pipe.PipeMsgEvent;
-import net.jxta.pipe.PipeMsgListener;
-import net.jxta.pipe.PipeService;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.PipeAdvertisement;
-
-import java.io.IOException;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.SocketAddress;
-import java.net.SocketException;
-import java.net.SocketTimeoutException;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.TimeUnit;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * JxtaServerSocket is a bi-directional Pipe that behaves very much like
- * ServerSocket.  It creates an inputpipe and listens for pipe connection
- * requests. JxtaServerSocket also defines it own protocol. Requests arrive as
- * a JXTA Message with the following elements:
- * <p/>
- * &lt;Cred> Credentials which can be used to determine trust &lt;/Cred>
- * <p/>
- * &lt;reqPipe> requestor's pipe advertisement &lt;/reqPipe>
- * <p/>
- * &lt;remPipe> Remote pipe advertisement &lt;/remPipe>
- * <p/>
- * &lt;reqPeer> Remote peer advertisement  &lt;/reqPeer>
- * <p/>
- * &lt;stream> determine whether the connection is reliable, or not &lt;/stream>
- * <p/>
- * &lt;close> close request &lt;/close>
- * <p/>
- * &lt;data> Data &lt;/data>
- * <p/>
- * JxtaServerSocket then creates a new private pipe, listens for messages on that pipe,
- * resolves the requestor's pipe, and sends a &lt;remPipe> private pipe created &lt;/remotePipe>
- * advertisement back, where the remote side is resolved.
- * <p/>
- * The {@code accept()} backlog defaults to 50 requests.
- * <p/>
- * The timeout default to 60 seconds, i.e. blocking.
- */
-public class JxtaServerSocket extends ServerSocket implements PipeMsgListener {
-
-    private static final Logger LOG = Logger.getLogger(JxtaServerSocket.class.getName());
-
-    protected static final String MSG_ELEMENT_NAMESPACE = "JXTASOC";
-    protected static final String credTag = "Cred";
-    protected static final String reqPipeTag = "reqPipe";
-    protected static final String remPeerTag = "remPeer";
-    protected static final String remPipeTag = "remPipe";
-    protected static final String dataTag = "data";
-    protected static final String closeTag = "close";
-    protected final static String closeReqValue = "close";
-    protected final static String closeAckValue = "closeACK";
-    protected static final String streamTag = "stream";
-
-    private final static int DEFAULT_BACKLOG = 50;
-    private final static long DEFAULT_TIMEOUT = 60 * 1000L;
-
-    /**
-     * QUEUE_END_MESSAGE is used to signal that the queue has been closed.
-     */
-    protected static final Message QUEUE_END_MESSAGE = new Message();
-
-    /**
-     * The PeerGroup
-     */
-    protected PeerGroup group;
-
-    /**
-     * The pipe advertisement we are serving.
-     */
-    protected PipeAdvertisement pipeAdv;
-
-    /**
-     * The input pipe on which we listen for connect requests.
-     */
-    protected InputPipe serverPipe;
-
-    /**
-     * The credential we will present to connect requests.
-     */
-    protected Credential localCredential = null;
-
-    /**
-     * The number of connect requests we will allow to become backlogged.
-     */
-    protected int backlog = DEFAULT_BACKLOG;
-
-    /**
-     * The timeout for accept operations.
-     */
-    protected long timeout = DEFAULT_TIMEOUT;
-
-    protected BlockingQueue<Message> queue = null;
-    protected volatile boolean bound = false;
-    protected volatile boolean closed = false;
-    private CredentialValidator credValidator = null;
-
-    /**
-     * Default Constructor
-     * <p/>
-     * A call to {@code bind()} is needed to finish initializing this object.
-     *
-     * @throws IOException if an io error occurs
-     */
-    public JxtaServerSocket() throws IOException {}
-
-    /**
-     * Constructs and binds a JxtaServerSocket using a JxtaSocketAddress as
-     * the address.
-     *
-     * @param address an instance of JxtaSocketAddress
-     * @throws IOException if an io error occurs
-     * @see net.jxta.socket.JxtaSocketAddress
-     */
-    public JxtaServerSocket(SocketAddress address) throws IOException {
-        this(address, DEFAULT_BACKLOG);
-    }
-
-    /**
-     * Constructs and binds a JxtaServerSocket to the specified pipe.
-     *
-     * @param group   JXTA PeerGroup
-     * @param pipeAdv PipeAdvertisement on which pipe requests are accepted
-     * @throws IOException if an I/O error occurs
-     */
-    public JxtaServerSocket(PeerGroup group, PipeAdvertisement pipeAdv) throws IOException {
-        this(group, pipeAdv, DEFAULT_BACKLOG);
-    }
-
-    /**
-     * Constructs and binds a JxtaServerSocket using a JxtaSocketAddress as
-     * the address.
-     *
-     * @param address an instance of JxtaSocketAddress
-     * @param backlog the size of the backlog queue
-     * @throws IOException if an I/O error occurs
-     * @see net.jxta.socket.JxtaSocketAddress
-     */
-    public JxtaServerSocket(SocketAddress address, int backlog) throws IOException {
-        this(address, backlog, (int) DEFAULT_TIMEOUT);
-    }
-
-    /**
-     * Constructor for the JxtaServerSocket object
-     *
-     * @param group   JXTA PeerGroup
-     * @param pipeAdv PipeAdvertisement on which pipe requests are accepted
-     * @param backlog the maximum length of the queue.
-     * @throws IOException if an I/O error occurs
-     */
-    public JxtaServerSocket(PeerGroup group, PipeAdvertisement pipeAdv, int backlog) throws IOException {
-        this(group, pipeAdv, backlog, (int) DEFAULT_TIMEOUT);
-    }
-
-    /**
-     * Constructs and binds a JxtaServerSocket using a JxtaSocketAddress as
-     * the address.
-     *
-     * @param address an instance of JxtaSocketAddress
-     * @param backlog the size of the backlog queue
-     * @param timeout connection timeout in milliseconds
-     * @throws IOException if an I/O error occurs
-     * @see net.jxta.socket.JxtaSocketAddress
-     */
-    public JxtaServerSocket(SocketAddress address, int backlog, int timeout) throws IOException {
-        setSoTimeout(timeout);
-        bind(address, backlog);
-    }
-
-    /**
-     * Constructor for the JxtaServerSocket object.
-     *
-     * @param group   JXTA PeerGroup
-     * @param pipeAdv PipeAdvertisement on which pipe requests are accepted
-     * @param backlog the maximum length of the queue.
-     * @param timeout the specified timeout, in milliseconds
-     * @throws IOException if an I/O error occurs
-     */
-    public JxtaServerSocket(PeerGroup group, PipeAdvertisement pipeAdv, int backlog, int timeout) throws IOException {
-        this(group, pipeAdv, backlog, timeout, null);
-    }
-
-    /**
-     * Constructor for the JxtaServerSocket object.
-     *
-     * @param group   JXTA PeerGroup
-     * @param pipeAdv PipeAdvertisement on which pipe requests are accepted
-     * @param backlog the maximum length of the queue.
-     * @param timeout the specified timeout, in milliseconds
-     * @param credValidator the CredentialValidator
-     * @throws IOException if an I/O error occurs
-     */
-    public JxtaServerSocket(PeerGroup group, PipeAdvertisement pipeAdv, int backlog, int timeout, CredentialValidator credValidator) throws IOException {
-        setSoTimeout(timeout);
-        this.credValidator = credValidator;
-        bind(group, pipeAdv, backlog);
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Closes the JxtaServerPipe.
-     */
-    @Override
-    protected void finalize() throws Throwable {
-        super.finalize();
-        if (!closed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("JxtaServerSocket is being finalized without being previously closed. This is likely an application level bug.");
-            }
-        }
-        close();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Socket accept() throws IOException {
-        if (!isBound()) {
-            throw new SocketException("Socket is not bound yet");
-        }
-
-        try {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Waiting for a connection");
-            }
-
-            while (true) {
-                if (isClosed()) {
-                    throw new SocketException("Socket is closed");
-                }
-                Message msg = queue.poll(timeout, TimeUnit.MILLISECONDS);
-
-                if (isClosed()) {
-                    throw new SocketException("Socket is closed");
-                }
-                if (msg == null) {
-                    throw new SocketTimeoutException("Timeout reached");
-                }
-
-                if (QUEUE_END_MESSAGE == msg) {
-                    throw new SocketException("Socket is closed.");
-                }
-
-                JxtaSocket socket = processMessage(msg);
-
-                // make sure we have a socket returning
-                if (socket != null) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("New socket connection " + socket);
-                    }
-                    return socket;
-                } else if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("No connection.");
-                }
-            }
-        } catch (InterruptedException ie) {
-            SocketException interrupted = new SocketException("interrupted");
-
-            interrupted.initCause(ie);
-            throw interrupted;
-        }
-    }
-
-    /**
-     * Binds the <code>JxtaServerSocket</code> to a specific pipe advertisement
-     *
-     * @param group   JXTA PeerGroup
-     * @param pipeAdv PipeAdvertisement on which pipe requests are accepted
-     * @throws IOException if an I/O error occurs
-     */
-    public void bind(PeerGroup group, PipeAdvertisement pipeAdv) throws IOException {
-        bind(group, pipeAdv, DEFAULT_BACKLOG);
-    }
-
-    /**
-     * Binds the <code>JxtaServerSocket</code> to a specific pipe advertisement
-     *
-     * @param group   JXTA PeerGroup
-     * @param pipeadv PipeAdvertisement on which pipe requests are accepted
-     * @param backlog the maximum length of the queue.
-     * @throws IOException if an I/O error occurs
-     */
-    public void bind(PeerGroup group, PipeAdvertisement pipeadv, int backlog) throws IOException {
-        if (PipeService.PropagateType.equals(pipeadv.getType())) {
-            throw new IOException("Propagate pipe advertisements are not supported");
-        }
-
-        if (backlog <= 0) {
-            throw new IllegalArgumentException("backlog must be > 0");
-        }
-
-        this.backlog = backlog;
-        queue = new ArrayBlockingQueue<Message>(backlog);
-        this.group = group;
-        this.pipeAdv = pipeadv;
-        PipeService pipeSvc = group.getPipeService();
-
-        serverPipe = pipeSvc.createInputPipe(pipeadv, this);
-        setBound(true);
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Used to bind a  JxtaServerSocket created with the no-arg constructor.
-     */
-    @Override
-    public void bind(SocketAddress endpoint) throws IOException {
-        bind(endpoint, backlog);
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Used to bind a  JxtaServerSocket created with the no-arg constructor.
-     */
-    @Override
-    public void bind(SocketAddress endpoint, int backlog) throws IOException {
-        if (endpoint instanceof JxtaSocketAddress) {
-            JxtaSocketAddress socketAddress = (JxtaSocketAddress) endpoint;
-            PeerGroup pg = PeerGroup.globalRegistry.lookupInstance(socketAddress.getPeerGroupId());
-
-            if (pg == null) {
-                throw new IOException(
-                        "Can't connect socket in PeerGroup with id " + socketAddress.getPeerGroupId()
-                        + ". No running instance of the group is registered.");
-            }
-            bind(pg.getWeakInterface(), socketAddress.getPipeAdv(), backlog);
-            pg.unref();
-        } else {
-            throw new IllegalArgumentException("Unsupported subclass of SocketAddress; " + "use JxtaSocketAddress instead.");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void close() throws IOException {
-
-        if (closed) {
-            return;
-        }
-        closed = true;
-
-        if (isBound()) {
-            // close all the pipe
-            serverPipe.close();
-            setBound(false);
-        }
-
-        queue.clear();
-        while (true) {
-            try {
-                queue.put(QUEUE_END_MESSAGE);
-                // end queue message is now on the queue, we are done.
-                break;
-            } catch (InterruptedException woken) {
-                // We MUST put the terminal message onto the queue before
-                // finishing. We won't have a second chance.
-                Thread.interrupted();
-            }
-        }
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Closed : " + this);
-        }
-    }
-
-    /**
-     * @return the server socket's JxtaSocketAddress
-     * @see java.net.ServerSocket#getLocalSocketAddress()
-     */
-    @Override
-    public SocketAddress getLocalSocketAddress() {
-        return new JxtaSocketAddress(getGroup(), getPipeAdv());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int getSoTimeout() throws IOException {
-        if (isClosed()) {
-            throw new SocketException("Socket is closed");
-        }
-
-        if (timeout > Integer.MAX_VALUE) {
-            return 0;
-        } else {
-            return (int) timeout;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void setSoTimeout(int timeout) throws SocketException {
-        if (isClosed()) {
-            throw new SocketException("Socket is closed");
-        }
-
-        if (timeout < 0) {
-            throw new IllegalArgumentException("timeout must be >= 0");
-        }
-
-        if (0 == timeout) {
-            this.timeout = Long.MAX_VALUE;
-        } else {
-            this.timeout = (long) timeout;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean isBound() {
-        return bound;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean isClosed() {
-        return closed;
-    }
-
-    /**
-     * Sets whether this socket is currently bound or not. A socket is
-     * considered bound if the local resources required in order to interact
-     * with a remote peer are allocated and open.
-     *
-     * @param boundState The new bound state.
-     */
-    private synchronized void setBound(boolean boundState) {
-        this.bound = boundState;
-    }
-
-    /**
-     * Gets the group associated with this JxtaServerSocket object
-     *
-     * @return The group value
-     */
-    public PeerGroup getGroup() {
-        return group;
-    }
-
-    /**
-     * Gets the PipeAdvertisement associated with this JxtaServerSocket object
-     *
-     * @return The pipeAdv value
-     */
-    public PipeAdvertisement getPipeAdv() {
-        return pipeAdv;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void pipeMsgEvent(PipeMsgEvent event) {
-
-        // deal with messages as they come in
-        Message message = event.getMessage();
-
-        if (message == null) {
-            return;
-        }
-
-        boolean pushed = false;
-        try {
-            pushed = queue.offer(message, timeout, TimeUnit.MILLISECONDS);
-        } catch (InterruptedException woken) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Interrupted", woken);
-            }
-        }
-
-        if (!pushed && Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-            LOG.warning("backlog queue full, connect request dropped");
-        }
-    }
-
-    /**
-     * processMessage is the main mechanism in establishing bi-directional connections
-     * <p/>
-     * It accepts connection messages and constructs a JxtaSocket with a ephemeral
-     * InputPipe and a messenger.
-     *
-     * @param msg The client connection request (assumed not null)
-     * @return JxtaSocket Which may be null if an error occurs.
-     */
-    private JxtaSocket processMessage(Message msg) {
-
-        PipeAdvertisement remoteEphemeralPipeAdv = null;
-        PeerAdvertisement remotePeerAdv = null;
-        Credential credential = null;
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Processing a connection message : " + msg);
-        }
-
-        try {
-            MessageElement el = msg.getMessageElement(MSG_ELEMENT_NAMESPACE, reqPipeTag);
-            if (el != null) {
-                XMLDocument pipeAdvDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(el);
-                remoteEphemeralPipeAdv = (PipeAdvertisement) AdvertisementFactory.newAdvertisement(pipeAdvDoc);
-            }
-
-            el = msg.getMessageElement(MSG_ELEMENT_NAMESPACE, remPeerTag);
-            if (el != null) {
-                XMLDocument peerAdvDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(el);
-                remotePeerAdv = (PeerAdvertisement) AdvertisementFactory.newAdvertisement(peerAdvDoc);
-            }
-
-            el = msg.getMessageElement(MSG_ELEMENT_NAMESPACE, credTag);
-            if (el != null) {
-                try {
-                    XMLDocument credDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(el);
-                    credential = group.getMembershipService().makeCredential(credDoc);
-                    if (!checkCred(credential)) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.log(Level.WARNING, "Invalid credential");
-                        }
-                        return null;
-                    }
-                } catch (Exception ignored) {
-                    // ignored
-                }
-            }
-
-            boolean isReliable = false;
-
-            el = msg.getMessageElement(MSG_ELEMENT_NAMESPACE, streamTag);
-            if (el != null) {
-                isReliable = Boolean.valueOf(el.toString());
-            }
-
-            if ((null != remoteEphemeralPipeAdv) && (null != remotePeerAdv)) {
-                return createEphemeralSocket(group, pipeAdv, remoteEphemeralPipeAdv, remotePeerAdv, localCredential, credential, isReliable);
-            } else {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Connection message did not contain valid connection information.");
-                }
-                return null;
-            }
-        } catch (IOException e) {
-            // deal with the error
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "IOException occured", e);
-            }
-        } catch (RuntimeException e) {
-            // deal with the error
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Exception occured", e);
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Invokes the specified CredentialValidator to very a credential
-     * @param cred the credential
-     * @return <code>true</code> if valid, or if no validator is specified
-     */
-    private boolean checkCred(Credential cred) {
-        return credValidator == null || credValidator.checkCred(cred);
-    }
-
-    /**
-     * Construct the emphemeral socket result from accept. This method exists
-     * primarily so that sub-classes can substitute a different JxtaSocket
-     * sub-class.
-     *
-     * @param group               The peer group for the socket.
-     * @param pipeAdv             The public pipe advertisement.
-     * @param remoteEphemeralPipeAdv The pipe advertisement of the remote peer's
-     *                            ephemeral pipe.
-     * @param remotePeerAdv          The peer advertisement of the remote peer.
-     * @param localCredential        Our credential.
-     * @param credential          The credential of the remote peer.
-     * @param isReliable          if true, uses the reliability library in non-direct mode
-     * @return The new JxtaSocket instance.
-     * @throws IOException if an io error occurs
-     */
-    protected JxtaSocket createEphemeralSocket(PeerGroup group, PipeAdvertisement pipeAdv, PipeAdvertisement remoteEphemeralPipeAdv, PeerAdvertisement remotePeerAdv, Credential localCredential, Credential credential, boolean isReliable) throws IOException {
-        return new JxtaSocket(group, pipeAdv, remoteEphemeralPipeAdv, remotePeerAdv, localCredential, credential, isReliable);
-    }
-
-    /**
-     * Sets the credential to be used by this socket connection. If no
-     * credentials are set, the default group credential will be used.
-     *
-     * @param localCredential The credential to be used for connection responses
-     *                     or <tt>null</tt> if the default credential is to be used.
-     */
-    public void setCredential(Credential localCredential) {
-        this.localCredential = localCredential;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * This output is suitable for debugging but should not be parsed. All
-     * of the information is available through other means.
-     */
-    @Override
-    public String toString() {
-        StringBuilder result = new StringBuilder();
-
-        result.append(getClass().getName());
-        result.append('@');
-        result.append(System.identityHashCode(this));
-
-        result.append('[');
-        result.append(pipeAdv.getPipeID());
-        result.append(']');
-
-        result.append(isClosed() ? " CLOSED :" : " OPEN :");
-        result.append(isBound() ? " BOUND " : " UNBOUND ");
-        return result.toString();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/socket/JxtaSocket.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/socket/JxtaSocket.java
deleted file mode 100644 (file)
index 0296f01..0000000
+++ /dev/null
@@ -1,1804 +0,0 @@
-/*
- * Copyright (c) 2006-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.socket;
-
-import net.jxta.credential.Credential;
-import net.jxta.document.*;
-import net.jxta.endpoint.*;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.impl.util.pipe.reliable.FixedFlowControl;
-import net.jxta.impl.util.pipe.reliable.Outgoing;
-import net.jxta.impl.util.pipe.reliable.OutgoingMsgrAdaptor;
-import net.jxta.impl.util.pipe.reliable.ReliableInputStream;
-import net.jxta.impl.util.pipe.reliable.ReliableOutputStream;
-import net.jxta.logging.Logging;
-import net.jxta.membership.MembershipService;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.pipe.*;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.PipeAdvertisement;
-import net.jxta.protocol.RouteAdvertisement;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.Socket;
-import java.net.SocketAddress;
-import java.net.SocketException;
-import java.net.SocketTimeoutException;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * JxtaSocket is a sub-class of java.net.socket, and should be used like a java.net.Socket.
- * Key differences to keep in mind are the following :
- * </p>
- * - JxtaSocket does not implement Nagle's algorithm, therefore at end of a data frame a flush must invoked to enure all
- * buffered data is packaged and transmitted.
- * - JxtaSocket does not implement keep-alive, therefore it is possible the underlaying messengers to be closed due to
- * lack of inactivity, which manifests in a short latency, while the messenger are recreated. This limitation should cease
- * to exist as soon the inactivity logic is removed.
- *
- */
-public class JxtaSocket extends Socket implements PipeMsgListener, OutputPipeListener {
-
-    /**
-     * Logger
-     */
-    private final static Logger LOG = Logger.getLogger(JxtaSocket.class.getName());
-    private final static int MAXRETRYTIMEOUT = 120 * 1000;
-    private final static int DEFAULT_TIMEOUT = 15 * 1000;
-
-    /**
-     * Default size for output buffers. Only used when we do not know the MTU
-     * size for messengers sending to the remote peer and as an upper bounds
-     * should the MTU size be really huge.
-     */
-    private final static int DEFAULT_OUTPUT_BUFFER_SIZE = 256 * 1024;
-
-    /**
-     * If true then this peer initiated the connection.
-     */
-    private boolean initiator = false;
-
-    /**
-     * The PeerGroup
-     */
-    protected PeerGroup group;
-
-    /**
-     * Pipe Advertisement of the well known pipe.
-     */
-    protected PipeAdvertisement pipeAdv;
-
-    /**
-     * Pipe Advertisement of local ephemeral pipe.
-     */
-    protected PipeAdvertisement localEphemeralPipeAdv;
-
-    /**
-     * The input pipe for our ephemeral pipe. We will receive all messages on this pipe.
-     */
-    protected InputPipe localEphemeralPipeIn;
-
-    /**
-     * Pipe Advertisement of it's ephemeral pipe.
-     */
-    protected PipeAdvertisement remoteEphemeralPipeAdv;
-
-    /**
-     * The Messenger we use to
-     */
-    protected Messenger remoteEphemeralPipeMsgr;
-
-    protected PipeService pipeSvc;
-
-    /**
-     * The peer id of the peer we are connecting to or {@code null} if we are
-     * willing to connect to any peer.
-     */
-    protected PeerID remotePeerID;
-
-    /**
-     * Used to negotiate connection parameters
-     */
-    protected OutputPipe connectOutpipe;
-
-    /**
-     * The timeout of the read() of this socket's input stream
-     */
-    private int soTimeout = 0;
-
-    /**
-     * timeout for connect and close
-     */
-    protected long timeout = 60 * 1000;
-
-    /**
-     * retry timeout in millisecods
-     */
-    protected int retryTimeout = 60 * 1000;
-
-    /**
-     * maximum retry timeout allowed
-     */
-    protected int maxRetryTimeout = MAXRETRYTIMEOUT;
-
-    /**
-     * retry window size
-     */
-    protected int windowSize = 20;
-
-    /**
-     * Lock for output pipe resolution.
-     */
-    protected final Object pipeResolveLock = new Object();
-
-    /**
-     * Lock for ephemeral pipe connect states.
-     */
-    protected final Object socketConnectLock = new Object();
-
-    /**
-     * Lock for closing states.
-     */
-    protected final Object closeLock = new Object();
-
-    /*
-     *used to determine whether to wait for an ack
-     */
-    private boolean closeAckReceived = false;
-
-    /**
-     * If {@code true} then this socket has been closed and can no longer be used.
-     */
-    protected volatile boolean closed = false;
-
-    /**
-     * If {@code true} then we believer our end of the connection is open.
-     */
-    protected boolean bound = false;
-
-    /**
-     * If {@code true} then we believe the remote peer currently has this socket open.
-     */
-    protected boolean connected = false;
-
-    /**
-     * Credential of the remote peer.
-     */
-    protected Credential remoteCredential = null;
-
-    /**
-     * Our credential that we provide to the remote peer.
-     */
-    protected Credential localCredential = null;
-
-    /**
-     * The remote peer advertisement.
-     */
-    private PeerAdvertisement remotePeerAdv = null;
-
-    /**
-     * If {@code true} then the socket is a stream socket otherwise it is a datagram socket.
-     */
-    protected boolean isReliable = true;
-
-    /**
-     *  If {@code true} then the output stream has been shutdown. All attempts 
-     *  to write to the socket will fail. This socket can no longer be used to 
-     *  send data though it may remain capable of receiving data.
-     */
-    private boolean outputShutdown = false;
-    
-    /**
-     *  If {@code true} then the input stream has been shutdown. All attempts 
-     *  to read from the socket will fail. This socket can no longer be used to 
-     *  receive data though it may remain capable of sending data.
-     */
-    private boolean inputShutdown = false;
-
-    /**
-     *  Used for sending all messages by the reliable output and input streams.
-     */
-    protected Outgoing outgoing = null;
-    
-    /**
-     *  The reliable input stream we use for receiving data if 
-     *  {@link #isReliable} is {@code true}.
-     */
-    protected ReliableInputStream ris = null;
-
-    /**
-     *  The reliable output stream we use for sending data if 
-     *  {@link #isReliable} is {@code true}.
-     */
-    protected ReliableOutputStream ros = null;
-
-    /**
-     *  The unreliable input stream we use for receiving data if 
-     *  {@link #isReliable} is {@code false}.
-     */
-    protected JxtaSocketInputStream nonReliableInputStream = null;
-
-    /**
-     *  The unreliable output stream we use for sending data if 
-     *  {@link #isReliable} is {@code false}.
-     */
-    protected JxtaSocketOutputStream nonReliableOutputStream = null;
-
-    /**
-     * The size of the output buffers to use. If not set this defaults to the
-     * MTU size of the messenger to the remote peer.
-     */
-    private int outputBufferSize = -1;
-
-    /**
-     * This constructor does not establish a connection. Use this constructor
-     * when altering the default parameters, and options of the socket.
-     * <p/>
-     * By default connections are reliable, and the default timeout is 60
-     * seconds. To alter a connection a call to create(false) changes the
-     * connection to an unreliable one.
-     */
-    public JxtaSocket() {}
-
-    /**
-     * This constructor is used by JxtaServer socket for creating JxtaSocket
-     * instances in response to incoming connections.
-     *
-     * @param group               group context
-     * @param pipeAdv             The original PipeAdvertisement
-     * @param localCredential        Our credential.
-     * @param remoteEphemeralPipeAdv the phemeral pipe advertisement
-     * @param  remotePeerAdv          remote peer advertisement
-     * @param remoteCredential       The remote peer's credential.
-     * @param isReliable          {@code true} for reliable stream connection or
-     *                            {@code false} for unreliable stream connection.
-     * @throws IOException if an io error occurs
-     */
-    protected JxtaSocket(PeerGroup group, PipeAdvertisement pipeAdv, PipeAdvertisement remoteEphemeralPipeAdv, PeerAdvertisement remotePeerAdv, Credential localCredential, Credential remoteCredential, boolean isReliable) throws IOException {
-
-        this.initiator = false;
-        this.group = group;
-        this.pipeAdv = pipeAdv;
-        this.remoteEphemeralPipeAdv = remoteEphemeralPipeAdv;
-        this.localEphemeralPipeAdv = newEphemeralPipeAdv(pipeAdv);
-        this.remotePeerAdv = remotePeerAdv;
-        this.remotePeerID = remotePeerAdv.getPeerID();
-        this.localCredential = localCredential;
-        this.remoteCredential = remoteCredential;
-        this.isReliable = isReliable;
-
-        pipeSvc = group.getPipeService();
-        bind();
-        connect();
-
-        Message connectResponse = createConnectMessage(group, localEphemeralPipeAdv, localCredential, isReliable, initiator);
-
-        remoteEphemeralPipeMsgr.sendMessage(connectResponse);
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("New socket : " + this);
-        }
-    }
-
-    /**
-     * Create a JxtaSocket connected to the give JxtaSocketAddress.
-     *
-     * @param address JxtaSocketAddress to connect to
-     * @throws IOException if an io error occurs
-     */
-    public JxtaSocket(SocketAddress address) throws IOException {
-        connect(address, DEFAULT_TIMEOUT);
-    }
-
-    /**
-     * Create a JxtaSocket to any node listening on pipeAdv
-     *
-     * @param group   group context
-     * @param pipeAdv PipeAdvertisement
-     * @throws IOException if an io error occurs
-     */
-    public JxtaSocket(PeerGroup group, PipeAdvertisement pipeAdv) throws IOException {
-        connect(group, pipeAdv);
-    }
-
-    /**
-     * Create a JxtaSocket to the given JxtaSocketAddress, within the timeout
-     * specified in milliseconds.
-     *
-     * @param address JxtaSocket address to connect to
-     * @param timeout The number of milliseconds within which the socket must
-     *                be successfully created. An exception will be thrown if the socket
-     *                cannot be created in the allotted time. A timeout value of {@code 0}
-     *                (zero) specifies an infinite timeout.
-     * @throws IOException            For failures in creating the socket.
-     * @throws SocketTimeoutException If the socket cannot be created before
-     *                                the timeout occurs.
-     */
-    public JxtaSocket(SocketAddress address, int timeout) throws IOException {
-        connect(address, timeout);
-    }
-
-    /**
-     * Create a JxtaSocket to any peer listening on pipeAdv this attempts
-     * establish a connection to specified pipe within the context of the
-     * specified group within timeout specified in milliseconds.
-     *
-     * @param group   group context
-     * @param pipeAdv PipeAdvertisement
-     * @param timeout The number of milliseconds within which the socket must
-     *                be successfully created. An exception will be thrown if the socket
-     *                cannot be created in the allotted time. A timeout value of {@code 0}
-     *                (zero) specifies an infinite timeout.
-     * @throws IOException            if an io error occurs
-     * @throws SocketTimeoutException If the socket cannot be created before
-     *                                the timeout occurs.
-     */
-    public JxtaSocket(PeerGroup group, PipeAdvertisement pipeAdv, int timeout) throws IOException {
-        connect(group, pipeAdv, timeout);
-    }
-
-    /**
-     * Create a JxtaSocket to any peer listening on pipeAdv
-     * this attempts establish a connection to specified
-     * pipe within a context of <code>group</code> and within the timeout specified in milliseconds
-     *
-     * @param group   group context
-     * @param peerid  node to connect to
-     * @param pipeAdv PipeAdvertisement
-     * @param timeout The number of milliseconds within which the socket must
-     *                be successfully created. An exception will be thrown if the socket
-     *                cannot be created in the allotted time. A timeout value of {@code 0}
-     *                (zero) specifies an infinite timeout.
-     * @throws IOException            For failures in creating the socket.
-     * @throws SocketTimeoutException If the socket cannot be created before
-     *                                the timeout occurs.
-     */
-    public JxtaSocket(PeerGroup group, PeerID peerid, PipeAdvertisement pipeAdv, int timeout) throws IOException {
-        connect(group, peerid, pipeAdv, timeout);
-    }
-
-    /**
-     * Create a JxtaSocket to the given JxtaSocketAddress, within the timeout
-     * specified in milliseconds. The JxtaSocket can be reliable (stream) or
-     * not (datagram). If you want to use a SocketAddress in the constructor,
-     * this is the preferred method. Either that, or use JxtaSocket(), followed
-     * by create(boolean) to turn on reliability, followed by
-     * connect(SocketAddress, int) or connect(SocketAddress) to make the
-     * connection.
-     *
-     * @param address  JxtaSocket address to connect to
-     * @param timeout  The number of milliseconds within which the socket must
-     *                 be successfully created. An exception will be thrown if the socket
-     *                 cannot be created in the allotted time. A timeout value of {@code 0}
-     *                 (zero) specifies an infinite timeout.
-     * @param reliable {@code true} for reliable stream connection or
-     *                 {@code false} for unreliable stream connection.
-     * @throws IOException            For failures in creating the socket.
-     * @throws SocketTimeoutException If the socket cannot be created before
-     *                                the timeout occurs.
-     */
-    public JxtaSocket(SocketAddress address, int timeout, boolean reliable) throws IOException {
-        this.isReliable = reliable;
-        connect(address, timeout);
-    }
-
-    /**
-     * Create a JxtaSocket to any peer listening on pipeAdv
-     * this attempts establish a connection to specified
-     * pipe within a context of <code>group</code> and within the timeout specified in milliseconds
-     *
-     * @param group    group context
-     * @param peerid   node to connect to
-     * @param pipeAdv  PipeAdvertisement
-     * @param timeout  The number of milliseconds within which the socket must
-     *                 be successfully created. An exception will be thrown if the socket
-     *                 cannot be created in the allotted time. A timeout value of {@code 0}
-     *                 (zero) specifies an infinite timeout.
-     * @param reliable {@code true} for reliable stream connection or
-     *                 {@code false} for unreliable stream connection.
-     * @throws IOException            For failures in creating the socket.
-     * @throws SocketTimeoutException If the socket cannot be created before
-     *                                the timeout occurs.
-     */
-    public JxtaSocket(PeerGroup group, PeerID peerid, PipeAdvertisement pipeAdv, int timeout, boolean reliable) throws IOException {
-
-        this.isReliable = reliable;
-        connect(group, peerid, pipeAdv, timeout);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected void finalize() throws Throwable {
-        if (!closed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("JxtaSocket is being finalized without being previously closed. This is likely a users bug.");
-            }
-        }
-        close();
-        super.finalize();
-    }
-
-    /**
-     * Creates either a stream or a datagram socket.
-     *
-     * @param reliable {@code true} for reliable stream connection or {@code false} for unreliable stream connection.
-     * @throws IOException if an I/O error occurs while creating the socket.
-     * @deprecated Unreliable mode is being removed. Use JxtaBiDiPipe instead.
-     */
-    @Deprecated
-    public void create(boolean reliable) throws IOException {
-        if (isBound()) {
-            throw new IOException("Socket already bound, it is not possible to change connection type");
-        }
-        this.isReliable = reliable;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Unsupported operation, an IOException will be thrown.
-     *
-     * @throws IOException Thrown in all cases as this operation is not supported.
-     */
-    @Override
-    public void bind(SocketAddress address) throws IOException {
-        throw new IOException("Unsupported operation, use java.net.Socket instead");
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * The default connect timeout of 60 seconds is used If SocketAddress is not an instance of JxtaSocketAddress, an
-     * IOException will be thrown.
-     */
-    @Override
-    public void connect(SocketAddress address) throws IOException {
-        connect(address, DEFAULT_TIMEOUT);
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * If SocketAddress is not an instance of JxtaSocketAddress, an IOException will be thrown.
-     */
-    @Override
-    public void connect(SocketAddress address, int timeout) throws IOException {
-        if (!(address instanceof JxtaSocketAddress)) {
-            throw new IOException("Subclass of SocketAddress not supported. Use JxtaSocketAddress instead.");
-        }
-        JxtaSocketAddress socketAddress = (JxtaSocketAddress) address;
-        PeerGroup pg = PeerGroup.globalRegistry.lookupInstance(socketAddress.getPeerGroupId());
-
-        if (pg == null) {
-            throw new IOException("Can't connect socket in PeerGroup with id " + socketAddress.getPeerGroupId()
-                    + ". No running instance of the group is registered.");
-        }
-        connect(pg.getWeakInterface(), socketAddress.getPeerId(), socketAddress.getPipeAdv(), timeout);
-        pg.unref();
-    }
-
-    /**
-     * Connects to a JxtaServerSocket on any peer within the default timeout of 60 seconds
-     *
-     * @param group   group context
-     * @param pipeAdv PipeAdvertisement
-     * @throws IOException if an io error occurs
-     */
-    public void connect(PeerGroup group, PipeAdvertisement pipeAdv) throws IOException {
-        connect(group, pipeAdv, DEFAULT_TIMEOUT);
-    }
-
-    /**
-     * Connects to a JxtaServerSocket on any peer within a timeout specified in milliseconds
-     *
-     * @param group   group context
-     * @param pipeAdv PipeAdvertisement
-     * @param timeout in milliseconds
-     * @throws IOException if an io error occurs
-     */
-    public void connect(PeerGroup group, PipeAdvertisement pipeAdv, int timeout) throws IOException {
-        connect(group, null, pipeAdv, timeout);
-    }
-
-    /**
-     * Connects to a JxtaServerSocket on a specific peer within a timeout specified in milliseconds
-     *
-     * @param group   group context
-     * @param peerid  peer to connect to
-     * @param pipeAdv PipeAdvertisement
-     * @param timeout timeout in milliseconds
-     * @throws IOException if an io error occurs
-     */
-    public void connect(PeerGroup group, PeerID peerid, PipeAdvertisement pipeAdv, int timeout) throws IOException {
-        if (PipeService.PropagateType.equals(pipeAdv.getType())) {
-            throw new IOException("Propagate pipe advertisements are not supported");
-        }
-
-        if (timeout < 0) {
-            throw new IllegalArgumentException("timeout may not be negative");
-        }
-
-        this.initiator = true;
-        this.group = group;
-        this.remotePeerID = peerid;
-        this.pipeAdv = pipeAdv;
-        this.localEphemeralPipeAdv = newEphemeralPipeAdv(pipeAdv);
-        this.timeout = (timeout == 0) ? Long.MAX_VALUE : timeout;
-
-        pipeSvc = group.getPipeService();
-        bind();
-        Message openMsg = createConnectMessage(group, localEphemeralPipeAdv, localCredential, isReliable, initiator);
-        long connectTimeoutAt = System.currentTimeMillis() + timeout;
-
-        if (connectTimeoutAt < timeout) {
-            // ensure no overflow
-            connectTimeoutAt = Long.MAX_VALUE;
-        }
-
-        // Create the output pipe and send this message. Need to retry the call
-        // to createOutputPipe. If there is no rendezvous yet and the
-        // destination is not reachable by mcast, then createOutputPipe has no
-        // effect.  We repeat it with exponential delays.
-        if (peerid == null) {
-            pipeSvc.createOutputPipe(pipeAdv, this);
-        } else {
-            pipeSvc.createOutputPipe(pipeAdv, Collections.singleton(peerid), this);
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.log(Level.FINE, "Beginning Output Pipe Resolution. " + this);
-        }
-
-        // Wait for the pipe resolution.
-        synchronized (pipeResolveLock) {
-            while (connectOutpipe == null) {
-                try {
-                    long waitFor = connectTimeoutAt - System.currentTimeMillis();
-
-                    if (waitFor <= 0) {
-                        // too late
-                        break;
-                    }
-                    if (connectOutpipe == null) {
-                        // in case the pipe is resolved
-                        pipeResolveLock.wait(waitFor);
-                    }
-                } catch (InterruptedException ie) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.log(Level.FINE, "Interrupted", ie);
-                    }
-                    Thread.interrupted();
-                    SocketException exp = new SocketException("Connect Interrupted");
-                    exp.initCause(ie);
-                    throw exp;
-                }
-            }
-        }
-
-        if (connectOutpipe == null) {
-            throw new SocketTimeoutException("Connection (resolution) timeout");
-        }
-
-        try {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Sending connect message. " + this);
-            }
-
-            // send connect message
-            connectOutpipe.send(openMsg);
-
-            // wait for the connect response.
-            synchronized (socketConnectLock) {
-                while (!isConnected()) {
-                    try {
-                        long waitFor = connectTimeoutAt - System.currentTimeMillis();
-                        if (waitFor <= 0) {
-                            // too late
-                            break;
-                        }
-                        socketConnectLock.wait(waitFor);
-                    } catch (InterruptedException ie) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.log(Level.FINE, "Interrupted", ie);
-                        }
-                        Thread.interrupted();
-                        SocketException exp = new SocketException("Connect Interrupted");
-                        exp.initCause(ie);
-                        throw exp;
-                    }
-                }
-            }
-        } finally {
-            connectOutpipe.close();
-            connectOutpipe = null;
-        }
-
-        if (!isConnected()) {
-            throw new SocketTimeoutException("Connection timeout (connect)");
-        }
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("New socket connection : " + this);
-        }
-    }
-
-    /**
-     * obtain the cred doc from the group object
-     *
-     * @param group the group context
-     * @return The <code>Credential</code> value
-     */
-    protected static Credential getDefaultCredential(PeerGroup group) {
-        try {
-            MembershipService membership = group.getMembershipService();
-            return membership.getDefaultCredential();
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "failed to get credential", e);
-            }
-        }
-        return null;
-    }
-
-    /**
-     * get the remote credential doc
-     *
-     * @return Credential StructuredDocument
-     */
-    public Credential getCredentialDoc() {
-        try {
-            return remoteCredential;
-        } catch (Exception failure) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "failed to generate credential document ", failure);
-            }
-            return null;
-        }
-    }
-
-    /**
-     * Sets our credential to be used by this socket connection. If no
-     * credentials are set, the default group credential will be used.
-     *
-     * @param localCredential The credential to be used for connection responses
-     *                     or <tt>null</tt> if the default credential is to be used.
-     */
-    public void setCredential(Credential localCredential) {
-        if (localCredential == null) {
-            this.localCredential = localCredential;
-        } else {
-            try {
-                MembershipService membership = group.getMembershipService();
-                this.localCredential = membership.getDefaultCredential();
-            } catch (Exception failed) {
-                this.localCredential = null;
-            }
-        }
-    }
-
-    /**
-     * Create a connection request/response message
-     *
-     * @param group      The group in which the socket is being used.
-     * @param pipeAdv    Advertisement for our ephemeral pipe.
-     * @param credential Our credential or null if default credential is to
-     *                   be used.
-     * @param isReliable The socket is to be reliable (stream).
-     * @param initiator  indicates initiator
-     * @return The message.
-     * @throws IOException if an I/O error occurs
-     */
-    protected Message createConnectMessage(PeerGroup group, PipeAdvertisement pipeAdv, Credential credential, boolean isReliable, boolean initiator) throws IOException {
-
-        Message msg = new Message();
-
-        if (credential == null) {
-            credential = getDefaultCredential(group);
-        }
-
-        if ((credential == null) && PipeService.UnicastSecureType.equals(pipeAdv.getType())) {
-            throw new IOException("Credentials must be established to initiate a secure connection.");
-        }
-
-        if (credential != null) {
-            try {
-                XMLDocument credDoc = (XMLDocument) credential.getDocument(MimeMediaType.XMLUTF8);
-
-                msg.addMessageElement(JxtaServerSocket.MSG_ELEMENT_NAMESPACE,
-                        new TextDocumentMessageElement(JxtaServerSocket.credTag, credDoc, null));
-            } catch (Exception failed) {
-                IOException failure = new IOException("Could not generate credential element.");
-                failure.initCause(failed);
-                throw failure;
-            }
-        }
-
-        msg.addMessageElement(JxtaServerSocket.MSG_ELEMENT_NAMESPACE,
-                new TextDocumentMessageElement(initiator ? JxtaServerSocket.reqPipeTag : JxtaServerSocket.remPipeTag,
-                (XMLDocument) pipeAdv.getDocument(MimeMediaType.XMLUTF8), null));
-
-        msg.addMessageElement(JxtaServerSocket.MSG_ELEMENT_NAMESPACE,
-                new TextDocumentMessageElement(JxtaServerSocket.remPeerTag,
-                (XMLDocument) group.getPeerAdvertisement().getDocument(MimeMediaType.XMLUTF8), null));
-
-        msg.addMessageElement(JxtaServerSocket.MSG_ELEMENT_NAMESPACE,
-                new StringMessageElement(JxtaServerSocket.streamTag, Boolean.toString(isReliable), null));
-
-        return msg;
-    }
-
-    /**
-     * Create a pipe advertisement for an ephemeral pipe (w/random pipe ID) from an existing pipe advertisement.
-     * The specified pipe adveritsement is only used for the name and type
-     *
-     * @param pipeAdv to get the basename and type from
-     * @return A new pipe advertisement for an ephemeral pipe.
-     */
-    protected static PipeAdvertisement newEphemeralPipeAdv(PipeAdvertisement pipeAdv) {
-        PipeAdvertisement adv = (PipeAdvertisement) AdvertisementFactory.newAdvertisement(PipeAdvertisement.getAdvertisementType());
-        PeerGroupID gid = (PeerGroupID) ((PipeID) pipeAdv.getPipeID()).getPeerGroupID();
-        adv.setPipeID(IDFactory.newPipeID(gid));
-        adv.setName(pipeAdv.getName() + ".remote");
-        adv.setType(pipeAdv.getType());
-        return adv;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean isBound() {
-        return bound;
-    }
-
-    /**
-     * Sets whether this socket is currently bound or not. A socket is considered bound if the local resources required
-     * in order to interact with a remote peer are allocated and open.
-     *
-     * @param boundState The new bound state.
-     */
-    private void setBound(boolean boundState) {
-        bound = boundState;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean isConnected() {
-        return connected;
-    }
-
-    /**
-     * Sets whether this socket is currently connected or not. A socket is
-     * considered connected if is believed that the Socket's remote peer has
-     * the resources required in order to interact with a local peer (us)
-     * allocated and open.
-     *
-     * @param connectedState The new connected state.
-     */
-    private void setConnected(boolean connectedState) {
-        connected = connectedState;
-    }
-
-    /**
-     * Opens our ephemeral input pipe enabling us to receive messages.
-     *
-     * @throws IOException Thrown for errors in creating the input pipe.
-     */
-    private void bind() throws IOException {
-        this.localEphemeralPipeIn = pipeSvc.createInputPipe(localEphemeralPipeAdv, this);
-        // The socket is bound now.
-        setBound(true);
-    }
-
-    /**
-     *  Create an appropriate Outgoing Adaptor. This method exists primarily
-     *  so that sub-classes can substitute a different Outgoing sub-class.
-     *
-     *  @param msgr The messenger to be wrapped.
-     *  @param timeout The timeout value;
-     *  @return Outgoing The messenger wrapped in an appropriate adaptor.
-     */
-    protected Outgoing makeOutgoing(Messenger msgr, long timeout) {
-        return new OutgoingMsgrAdaptor(msgr, (int) timeout);
-    }
-            
-    /**
-     * Opens the ephemeral output pipe for the remote peer. Also opens the
-     * input and output streams. (delaying adds complexity).
-     *
-     * @throws IOException Thrown for errors in opening resources.
-     */
-    private void connect() throws IOException {
-
-        remoteEphemeralPipeMsgr = lightweightOutputPipe(group, remoteEphemeralPipeAdv, remotePeerAdv);
-
-        if (remoteEphemeralPipeMsgr == null) {
-            throw new IOException("Could not create messenger back to connecting peer");
-        }
-
-        // Force the buffer size smaller if user set it too high.
-        if (remoteEphemeralPipeMsgr.getMTU() < outputBufferSize) {
-            outputBufferSize = Math.min((int) remoteEphemeralPipeMsgr.getMTU(), DEFAULT_OUTPUT_BUFFER_SIZE);
-        }
-
-        if (outputBufferSize == -1) {
-            outputBufferSize = Math.min((int) remoteEphemeralPipeMsgr.getMTU(), DEFAULT_OUTPUT_BUFFER_SIZE);
-        }
-
-        // Force the creation of the inputStream now. Waiting until someone
-        // calls getInputStream() would likely cause us to drop messages.
-        if (isReliable) {
-            outgoing = makeOutgoing(remoteEphemeralPipeMsgr, retryTimeout);
-            ris = new ReliableInputStream(outgoing, soTimeout);
-            ros = new ReliableOutputStream(outgoing, new FixedFlowControl(windowSize));
-            try {
-                ros.setSendBufferSize(outputBufferSize);
-            } catch (IOException ignored) {// it's only a preference...
-            }
-        } else {
-            nonReliableInputStream = new JxtaSocketInputStream(this, windowSize);
-            nonReliableOutputStream = new JxtaSocketOutputStream(this, outputBufferSize);
-        }
-
-        // the socket is now connected!
-        setConnected(true);
-    }
-
-    /**
-     * Returns the internal output stream buffer size
-     *
-     * @return the internal buffer size.
-     * @deprecated Use the standard {@link #getSendBufferSize()} method instead.
-     */
-    @Deprecated
-    public int getOutputStreamBufferSize() {
-        return (outputBufferSize == -1) ? DEFAULT_OUTPUT_BUFFER_SIZE : outputBufferSize;
-    }
-
-    /**
-     * Sets the internal output stream buffer size.
-     *
-     * @param size The internal buffer size.
-     * @throws IOException if an I/O error occurs
-     * @deprecated Use the standard {@link #setSendBufferSize(int)} method instead.
-     */
-    @Deprecated
-    public void setOutputStreamBufferSize(int size) throws IOException {
-        setSendBufferSize(size);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public InputStream getInputStream() throws IOException {
-        checkState();
-
-        if (isInputShutdown()) {
-            throw new SocketException("Input already shutdown.");
-        }
-
-        if (isReliable) {
-            return ris;
-        } else {
-            return nonReliableInputStream;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public OutputStream getOutputStream() throws IOException {
-        checkState();
-        if (isOutputShutdown()) {
-            throw new SocketException("Output already shutdown.");
-        }
-        return isReliable ? ros : nonReliableOutputStream;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * We hard-close both the input and output streams. Nothing can be
-     * written or read to the socket after this method. Any queued incoming
-     * data is discarded. Any additional incoming messages will be ACKed but
-     * their content will be discarded. We will attempt to send any data which
-     * has already been written to the OutputStream.
-     * <p/>
-     * Once the output queue is empty we will send a close message to tell
-     * the remote side that no more data is coming.
-     * <p/>
-     * This is the only method in this class which is {@code synchronized}.
-     * All others use internal synchronization.
-     */
-    @Override
-    public synchronized void close() throws IOException {
-        try {
-            synchronized (closeLock) {
-                long closeEndsAt = System.currentTimeMillis() + timeout;
-
-                if (closeEndsAt < timeout) {
-                    closeEndsAt = Long.MAX_VALUE;
-                }
-                if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                    LOG.info("Closing " + this + " timeout=" + timeout + "ms.");
-                }
-                if (closed) {
-                    return;
-                }
-
-                closed = true;
-                shutdownOutput();
-                shutdownInput();
-                while (isConnected()) {
-                    long closingFor = closeEndsAt - System.currentTimeMillis();
-
-                    if (closingFor <= 0) {
-                        break;
-                    }
-
-                    if (isReliable) {
-                        try {
-                            if (ros.isQueueEmpty()) {
-                                // Only send a close if the queue is empty.
-                                sendClose();
-                            } else {
-                                // Reliable Output Stream not empty. Don't send close yet.
-                                ros.waitQueueEmpty(1000);
-                                continue;
-                            }
-                        } catch (InterruptedException woken) {
-                            Thread.interrupted();
-                            break;
-                        }
-                    } else {
-                        sendClose();
-                    }
-
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Sent close, awaiting ACK for " + this);
-                    }
-
-                    // Don't send our close too many times.
-                    try {
-                        long nextTry = Math.min(20000, closingFor);
-
-                        if (nextTry > 0 && isConnected()) {
-                            closeLock.wait(nextTry);
-                        }
-                    } catch (InterruptedException woken) {
-                        Thread.interrupted();
-                        break;
-                    }
-                }
-
-                if (isConnected()) {
-                    // Last ditch close attempt
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Still connected at end of timeout. Forcing closed." + this);
-                    }
-                    sendClose();
-                    throw new SocketTimeoutException("Failed to receive close ack from remote connection.");
-                }
-            }
-        } finally {
-            // No matter what else happens at the end of close() we are no
-            // longer connected and no longer bound.
-            setConnected(false);
-            unbind();
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("Socket closed : " + this);
-            }
-        }
-    }
-
-    /**
-     * This is called when closure is initiated on the remote side. By
-     * convention we receive the close message only after we have ACKed the last
-     * data segment.
-     * <p/>
-     * We soft-close the InputStream which allows us to read data already
-     * received.
-     * <p/>
-     * We hard-close our output stream and discard all queued, unACKed data
-     * as the remote side doesn't want to receive it (the remote side has
-     * already unbound themselves, they just want our close ACK in order to clean
-     * up.)
-     *
-     * @throws IOException if an I/O error occurs
-     */
-    protected void closeFromRemote() throws IOException {
-        synchronized (closeLock) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.INFO)) {
-                LOG.info("Received a remote close request." + this);
-            }
-
-            if (isConnected()) {
-                setConnected(false);
-                if (isReliable) {
-                    ris.softClose();
-                    ros.hardClose();
-                } else {
-                    nonReliableInputStream.softClose();
-                    nonReliableOutputStream.hardClose();
-                }
-            }
-
-            // If we are still bound then send them a close ACK.
-            if (isBound() && (ros != null && ros.isQueueEmpty())) {
-                // do not ack until the queue is empty
-                sendCloseACK();
-            }
-            if (closeAckReceived) {
-                closeLock.notifyAll();
-            }
-        }
-    }
-
-    /**
-     * Closes the input pipe which we use to receive messages and the messenger
-     * used for sending messages.
-     */
-    protected synchronized void unbind() {
-        if (!isBound()) {
-            return;
-        }
-
-        if (isReliable) {
-            try {
-                ris.close();
-            } catch (IOException ignored) {// ignored
-            }
-
-            ros.hardClose();
-        } else {
-            nonReliableInputStream.close();
-            nonReliableOutputStream.hardClose();
-        }
-
-        // We are no longer bound
-        setBound(false);
-
-        // close pipe and messenger
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Closing ephemeral input pipe");
-        }
-
-        localEphemeralPipeIn.close();
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Closing remote ephemeral pipe messenger");
-        }
-
-        if(null != outgoing) {
-            outgoing.close();
-        }
-        remoteEphemeralPipeMsgr.close();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void pipeMsgEvent(PipeMsgEvent event) {
-        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-            LOG.log(Level.FINER, "Pipe Message Event for " + this + "\n\t" + event.getMessage() + " for " + event.getPipeID());
-        }
-
-        Message message = event.getMessage();
-        if (message == null) {
-            return;
-        }
-
-        // look for close request/ack
-        MessageElement element = message.getMessageElement(JxtaServerSocket.MSG_ELEMENT_NAMESPACE, JxtaServerSocket.closeTag);
-
-        if (element != null) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Handling a close message " + this + " : " + element.toString());
-            }
-            if (JxtaServerSocket.closeReqValue.equals(element.toString())) {
-                try {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Received a close request");
-                    }
-                    closeFromRemote();
-                } catch (IOException ie) {
-                    if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                        LOG.log(Level.SEVERE, "failed during closeFromRemote", ie);
-                    }
-                }
-            } else if (JxtaServerSocket.closeAckValue.equals(element.toString())) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Received a close acknowledgement");
-                }
-                synchronized (closeLock) {
-                    closeAckReceived = true;
-                    setConnected(false);
-                    closeLock.notifyAll();
-                }
-            }
-            return;
-        }
-
-        if (!isConnected()) {
-            // connect response
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Processing connect response : " + message);
-            }
-
-            // look for a remote pipe answer
-            element = message.getMessageElement(JxtaServerSocket.MSG_ELEMENT_NAMESPACE, JxtaServerSocket.remPipeTag);
-            PipeAdvertisement incomingPipeAdv = null;
-
-            if (element != null) {
-                try {
-                    XMLDocument pipeAdvDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(element);
-
-                    incomingPipeAdv = (PipeAdvertisement) AdvertisementFactory.newAdvertisement(pipeAdvDoc);
-                } catch (IOException badPipeAdv) {// ignored
-                }
-            }
-
-            element = message.getMessageElement(JxtaServerSocket.MSG_ELEMENT_NAMESPACE, JxtaServerSocket.remPeerTag);
-            PeerAdvertisement incomingRemotePeerAdv = null;
-
-            if (element != null) {
-                try {
-                    XMLDocument peerAdvDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(element);
-                    incomingRemotePeerAdv = (PeerAdvertisement) AdvertisementFactory.newAdvertisement(peerAdvDoc);
-                } catch (IOException badPeerAdv) {// ignored
-                }
-            }
-
-            element = message.getMessageElement(JxtaServerSocket.MSG_ELEMENT_NAMESPACE, JxtaServerSocket.credTag);
-            Credential incomingCredential = null;
-
-            if (element != null) {
-                try {
-                    StructuredDocument incomingCredentialDoc = StructuredDocumentFactory.newStructuredDocument(element);
-                    incomingCredential = group.getMembershipService().makeCredential(incomingCredentialDoc);
-                } catch (Exception failed) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Unable to generate credential for " + this, failed);
-                    }
-                }
-            }
-
-            element = message.getMessageElement(JxtaServerSocket.MSG_ELEMENT_NAMESPACE, JxtaServerSocket.streamTag);
-            boolean incomingIsReliable = isReliable;
-
-            if (element != null) {
-                incomingIsReliable = Boolean.valueOf(element.toString());
-            }
-
-            if ((null != incomingPipeAdv) && (null != incomingRemotePeerAdv)) {
-                if ((null != remotePeerID) && (remotePeerID != incomingRemotePeerAdv.getPeerID())) {
-                    // let the connection attempt timeout
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning(
-                                "Connection response from wrong peer! " + remotePeerID + " != "
-                                + incomingRemotePeerAdv.getPeerID());
-                    }
-                    return;
-                }
-
-                synchronized (socketConnectLock) {
-                    if (!isConnected()) {
-                        remoteCredential = incomingCredential;
-                        remotePeerAdv = incomingRemotePeerAdv;
-                        remotePeerID = incomingRemotePeerAdv.getPeerID();
-                        remoteEphemeralPipeAdv = incomingPipeAdv;
-                        isReliable = incomingIsReliable;
-
-                        // Force the creation of the inputStream now. Waiting until someone
-                        // calls getInputStream() would likely cause us to drop messages.
-
-                        // FIXME: it would be even better if we could create the
-                        // input stream BEFORE having the output pipe resolved, but
-                        // that would force us to have the MsrgAdaptor block
-                        // until we can give it the real pipe or msgr... later.
-                        try {
-                            connect();
-                        } catch (IOException failed) {
-                            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                                LOG.log(Level.WARNING, "Connection failed : " + this, failed);
-                            }
-                            return;
-                        }
-                        socketConnectLock.notify();
-                        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                            LOG.log(Level.INFO, "New Socket Connection : " + this);
-                        }
-                    }
-                }
-                return;
-            }
-        }
-
-        // Often we are called to handle data before the socket is connected.
-        synchronized (socketConnectLock) {
-            long timeoutAt = System.currentTimeMillis() + timeout;
-            if (timeoutAt < timeout) {
-                timeoutAt = Long.MAX_VALUE;
-            }
-
-            while (!isClosed() && !isConnected()) {
-                long waitFor = timeoutAt - System.currentTimeMillis();
-
-                if (waitFor <= 0) {
-                    break;
-                }
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.log(Level.FINE, "Holding " + message + " for " + timeout);
-                }
-
-                try {
-                    socketConnectLock.wait(timeout);
-                } catch (InterruptedException woken) {
-                    return;
-                }
-            }
-        }
-
-        if (!isReliable) {
-            // is there data ?
-            Iterator<MessageElement> dataElements = message.getMessageElements(JxtaServerSocket.MSG_ELEMENT_NAMESPACE,
-                    JxtaServerSocket.dataTag);
-
-            while (dataElements.hasNext()) {
-                MessageElement anElement = dataElements.next();
-                nonReliableInputStream.enqueue(anElement);
-            }
-        } else {
-            // Give ACKs to the Reliable Output Stream
-            if (ros != null) {
-                ros.recv(message);
-            }
-            // Give data blocks to the Reliable Input Stream
-            if (ris != null) {
-                ris.recv(message);
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void outputPipeEvent(OutputPipeEvent event) {
-        OutputPipe op = event.getOutputPipe();
-
-        if (op.getAdvertisement() == null) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("The output pipe has no internal pipe advertisement. discarding event");
-            }
-            return;
-        }
-        // name can be different, therefore check the id + type
-        if (pipeAdv.getID().equals(op.getAdvertisement().getID()) && pipeAdv.getType().equals(op.getAdvertisement().getType())) {
-            synchronized (pipeResolveLock) {
-                // modify op within lock to prevent a race with the if.
-                if (connectOutpipe == null) {
-                    connectOutpipe = op;
-                    // if not null, will be closed.
-                    op = null;
-                }
-                pipeResolveLock.notify();
-            }
-            // Ooops one too many, we were too fast re-trying.
-            if (op != null) {
-                op.close();
-            }
-        } else {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Unexpected OutputPipe :" + op);
-            }
-        }
-    }
-
-    /**
-     * A lightweight output pipe constructor, note the return type
-     * Since all the info needed is available, there's no need for to use the pipe service
-     * to resolve the pipe we have all we need to construct a messenger.
-     *
-     * @param group   group context
-     * @param pipeAdv Remote Pipe Advertisement
-     * @param peerAdv Remote Peer Advertisement
-     * @return Messenger
-     */
-    protected static Messenger lightweightOutputPipe(PeerGroup group, PipeAdvertisement pipeAdv, PeerAdvertisement peerAdv) {
-        EndpointService endpoint = group.getEndpointService();
-        ID opId = pipeAdv.getPipeID();
-        String destPeer = peerAdv.getPeerID().getUniqueValue().toString();
-
-        // Get an endpoint messenger to that address
-        EndpointAddress addr;
-        RouteAdvertisement routeHint = net.jxta.impl.endpoint.EndpointUtils.extractRouteAdv(peerAdv);
-        if (pipeAdv.getType().equals(PipeService.UnicastType)) {
-            addr = new EndpointAddress("jxta", destPeer, "PipeService", opId.toString());
-        } else if (pipeAdv.getType().equals(PipeService.UnicastSecureType)) {
-            addr = new EndpointAddress("jxtatls", destPeer, "PipeService", opId.toString());
-        } else {
-            // not a supported type
-            throw new IllegalArgumentException(pipeAdv.getType() + " is not a supported pipe type");
-        }
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("New pipe lightweight messenger for " + addr);
-        }
-        return endpoint.getMessenger(addr, routeHint);
-    }
-
-    /**
-     * Sends a close message
-     * @throws IOException if an io error occurs
-     */
-    private void sendClose() throws IOException {
-        Message msg = new Message();
-
-        msg.addMessageElement(JxtaServerSocket.MSG_ELEMENT_NAMESPACE
-                ,
-                new StringMessageElement(JxtaServerSocket.closeTag, JxtaServerSocket.closeReqValue, null));
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Sending a close request " + this + " : " + msg);
-        }
-        remoteEphemeralPipeMsgr.sendMessageN(msg, null, null);
-    }
-
-    /**
-     * Sends a close ack message
-     * @throws IOException if an io error occurs
-     */
-    private void sendCloseACK() throws IOException {
-        Message msg = new Message();
-        msg.addMessageElement(JxtaServerSocket.MSG_ELEMENT_NAMESPACE,
-                new StringMessageElement(JxtaServerSocket.closeTag, JxtaServerSocket.closeAckValue, null));
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Sending a close ACK " + this + " : " + msg);
-        }
-        remoteEphemeralPipeMsgr.sendMessageN(msg, null, null);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int getSoTimeout() throws SocketException {
-        if (isClosed()) {
-            throw new SocketException("Socket is closed");
-        }
-        if (timeout > Integer.MAX_VALUE) {
-            return 0;
-        } else {
-            return (int) timeout;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void setSoTimeout(int soTimeout) throws SocketException {
-        if (soTimeout < 0) {
-            throw new IllegalArgumentException("Invalid Socket timeout :" + soTimeout);
-        }
-
-        this.timeout = soTimeout;
-        if (!isBound()) {
-            return;
-        }
-
-        // If we are bound then set the timeout on the streams.
-        // FIXME, ros does not define a timeout as it only relies on window saturation, it should take into account
-        // the socket timeout
-        if (isReliable) {
-            if (ris != null) {
-                ris.setTimeout(soTimeout);
-            }
-        } else {
-            nonReliableInputStream.setTimeout((long) soTimeout);
-        }
-    }
-
-    /**
-     * Gets the Maximum Retry Timeout of the reliability layer
-     *
-     * @return The maximum retry Timeout value
-     * @deprecated The reliability layer manages it's own maximum. This value is not useful.
-     */
-    @Deprecated
-    public int getMaxRetryTimeout() {
-        return maxRetryTimeout;
-    }
-
-    /**
-     * Gets the Maximum Retry Timeout of the reliability layer
-     *
-     * @param maxRetryTimeout The new maximum retry timeout value
-     * @throws IllegalArgumentException if maxRetryTimeout exceeds jxta platform maximum retry timeout
-     * @deprecated The reliability layer manages it's own maximum. This value is not useful.
-     */
-    @Deprecated
-    public void setMaxRetryTimeout(int maxRetryTimeout) {
-        if (maxRetryTimeout <= 0 || maxRetryTimeout > MAXRETRYTIMEOUT) {
-            throw new IllegalArgumentException("Invalid Maximum retry timeout :" + maxRetryTimeout + " Exceed Global maximum retry timeout :"
-                    + MAXRETRYTIMEOUT);
-        }
-        this.maxRetryTimeout = maxRetryTimeout;
-    }
-
-    /**
-     * Gets the Retry Timeout of the reliability layer
-     *
-     * @return The retry Timeout value
-     */
-    public int getRetryTimeout() {
-        return retryTimeout;
-    }
-
-    /**
-     * Sets the Retry Timeout of the underlying reliability layer.
-     * In reliable mode it is possible for this call to block
-     * trying to obtain a lock on reliable input stream
-     *
-     * @param retryTimeout The new retry timeout value
-     * @throws SocketException if an I/O error occurs
-     */
-    public void setRetryTimeout(int retryTimeout) throws SocketException {
-        if (retryTimeout <= 0 || retryTimeout > maxRetryTimeout) {
-            throw new IllegalArgumentException("Invalid Retry Socket timeout :" + retryTimeout);
-        }
-        this.retryTimeout = retryTimeout;
-        if (outgoing != null) {
-            outgoing.setTimeout(retryTimeout);
-        }
-    }
-
-    /**
-     * When in reliable mode, gets the Reliable library window size
-     *
-     * @return The windowSize value
-     */
-    public int getWindowSize() {
-        return windowSize;
-    }
-
-    /**
-     * When in reliable mode, sets the Reliable library window size
-     *
-     * @param windowSize The new window size value
-     * @throws SocketException if an I/O error occurs
-     */
-    public void setWindowSize(int windowSize) throws SocketException {
-        if (isBound()) {
-            throw new SocketException("Socket bound. Can not change the window size");
-        }
-        this.windowSize = windowSize;
-    }
-
-    /**
-     * Returns the closed state of the JxtaSocket.
-     *
-     * @return true if the socket has been closed
-     */
-    @Override
-    public boolean isClosed() {
-        return closed;
-    }
-
-    /**
-     * Performs on behalf of JxtaSocketOutputStream.
-     *
-     * @param buf    the data.
-     * @param offset the start offset in the data.
-     * @param length the number of bytes to write.
-     * @throws IOException if an I/O error occurs
-     * @see java.io.OutputStream#write
-     */
-    protected void write(byte[] buf, int offset, int length) throws IOException {
-        checkState();
-        if (isReliable) {
-            ros.write(buf, offset, length);
-        } else {
-            byte[] bufCopy = new byte[length];
-            System.arraycopy(buf, offset, bufCopy, 0, length);
-
-            Message msg = new Message();
-            msg.addMessageElement(JxtaServerSocket.MSG_ELEMENT_NAMESPACE,
-                    new ByteArrayMessageElement(JxtaServerSocket.dataTag, MimeMediaType.AOS, bufCopy, 0, length, null));
-            remoteEphemeralPipeMsgr.sendMessageB(msg, null, null);
-        }
-    }
-
-    /**
-     * @throws SocketException if closed, not bound or not connected.
-     */
-    private void checkState() throws SocketException {
-        if (isClosed()) {
-            throw new SocketException("Socket is closed.");
-        } else if (!isBound()) {
-            throw new SocketException("Socket not bound.");
-        } else if (!isConnected()) {
-            throw new SocketException("Socket not connected.");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int getSendBufferSize() throws SocketException {
-        if (isOutputShutdown()) {
-            throw new SocketException("Socket is closed");
-        }
-        return (outputBufferSize == -1) ? DEFAULT_OUTPUT_BUFFER_SIZE : outputBufferSize;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void setSendBufferSize(int size) throws SocketException {
-        if (isOutputShutdown()) {
-            throw new SocketException("Socket is closed");
-        }
-
-        if (size < 1) {
-            throw new IllegalArgumentException("negative/zero buffer size");
-        }
-
-        if ((null != remoteEphemeralPipeMsgr) && (size > remoteEphemeralPipeMsgr.getMTU())) {
-            throw new IllegalArgumentException("Buffer size larger than limit : " + remoteEphemeralPipeMsgr.getMTU());
-        }
-
-        outputBufferSize = size;
-        if (null != ros) {
-            try {
-                ros.setSendBufferSize(size);
-            } catch (SocketException failure) {
-                throw failure;
-            } catch (IOException failed) {
-                SocketException failure = new SocketException("Failed");
-
-                failure.initCause(failed);
-                throw failure;
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int getReceiveBufferSize() throws SocketException {
-        if (isInputShutdown()) {
-            throw new SocketException("Socket is closed");
-        }
-        // this is just rough size
-        return outputBufferSize * windowSize;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean getKeepAlive() throws SocketException {
-        if (inputShutdown) {
-            throw new SocketException("Socket is closed");
-        }
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int getTrafficClass() throws SocketException {
-        throw new SocketException("TrafficClass not yet defined");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void setTrafficClass(int tc) throws SocketException {
-        // a place holder when and if we decide to add hints regarding
-        // flow info hints such as (IPTOS_LOWCOST (0x02), IPTOS_RELIABILITY (0x04), etc
-        throw new SocketException("TrafficClass not yet defined");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean isInputShutdown() {
-        return inputShutdown;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean isOutputShutdown() {
-        return outputShutdown;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void sendUrgentData(int data) throws IOException {
-        throw new SocketException("Urgent data not supported");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void setOOBInline(boolean state) throws SocketException {
-        throw new SocketException("Enable/disable OOBINLINE supported");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void setKeepAlive(boolean state) throws SocketException {
-        if (isClosed()) {
-            throw new SocketException("Socket is closed");
-        }
-        throw new SocketException("Operation not supported");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void shutdownInput() throws IOException {
-        inputShutdown = true;
-        if (isReliable) {
-            // hard close (EOF on next read)
-            ris.close();
-        } else {
-            // hard close (EOF on next read)
-            nonReliableInputStream.close();
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void shutdownOutput() throws IOException {
-        outputShutdown = true;
-        if (isReliable) {
-            ros.setLingerDelay(timeout);
-            // soft close (finish sending if you can)
-            ros.close();
-        } else {
-            // soft close (finish sending if you can)
-            nonReliableOutputStream.close();
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public SocketAddress getLocalSocketAddress() {
-        if (!isBound()) {
-            return null;
-        }
-        return new JxtaSocketAddress(group, localEphemeralPipeAdv, group.getPeerAdvertisement());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public SocketAddress getRemoteSocketAddress() {
-        if (!isConnected()) {
-            return null;
-        }
-        return new JxtaSocketAddress(group, remoteEphemeralPipeAdv, remotePeerAdv);
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * This output is suitable for debugging but should not be parsed. All
-     * of the information is available through other means.
-     */
-    @Override
-    public String toString() {
-
-        StringBuilder result = new StringBuilder();
-
-        result.append(getClass().getName());
-        result.append('@');
-        result.append(System.identityHashCode(this));
-        result.append('[');
-
-        if (null != pipeAdv) {
-            result.append(pipeAdv.getPipeID().getUniqueValue());
-        }
-        result.append('/');
-
-        if (null != localEphemeralPipeAdv) {
-            result.append(localEphemeralPipeAdv.getPipeID().getUniqueValue());
-        }
-        result.append(']');
-        result.append(isClosed() ? " CLOSED :" : " OPEN :");
-        result.append(initiator ? " I " : " i ");
-        result.append(isReliable ? " R " : " r ");
-        result.append(isBound() ? " B " : " b ");
-        result.append(isConnected() ? " C " : " c ");
-
-        return result.toString();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/socket/JxtaSocketAddress.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/socket/JxtaSocketAddress.java
deleted file mode 100644 (file)
index 749dd74..0000000
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.socket;
-
-
-import net.jxta.document.MimeMediaType;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.PipeAdvertisement;
-
-import java.net.SocketAddress;
-
-
-/**
- * This class implements a JxtaSocket address (PeerGroup ID + Pipe Advertisement
- * + (optional) Peer ID).
- * <p/>
- * It provides an immutable object used by sockets for binding, connecting, or as
- * returned values.
- *
- * @author vwilliams
- * @see net.jxta.socket.JxtaSocket
- * @see net.jxta.socket.JxtaServerSocket
- * @see java.net.SocketAddress
- * @see java.net.Socket
- * @see java.net.ServerSocket
- */
-public class JxtaSocketAddress extends SocketAddress {
-
-    private final PeerGroupID peerGroupId;
-    private final PipeAdvertisement pipeAdv;
-    private final PeerID peerId;
-    private final PeerAdvertisement peerAdv;
-
-    private transient String pipeDoc; // convenience, see getPipeDocAsString()
-
-    /**
-     * Creates a new instance of JxtaSocketAddress.
-     *
-     * @param peerGroup peer group within which this socket exists
-     * @param pipeAdv   the advertisement of a pipe for the socket to listen on
-     */
-    public JxtaSocketAddress(PeerGroup peerGroup, PipeAdvertisement pipeAdv) {
-        this(peerGroup.getPeerGroupID(), pipeAdv, null);
-    }
-
-    /**
-     * Creates a new instance of JxtaSocketAddress.
-     *
-     * @param peerGroup peer group within which this socket exists
-     * @param pipeAdv   the advertisement of a pipe for the socket to listen on
-     * @param peerId    the ID of a specific peer to be contacted over this socket
-     *                  (may be null)
-     * @deprecated use the PeerAdvertisement variant instead
-     */
-    @Deprecated
-    public JxtaSocketAddress(PeerGroup peerGroup, PipeAdvertisement pipeAdv, PeerID peerId) {
-        this(peerGroup.getPeerGroupID(), pipeAdv, peerId);
-    }
-
-    /**
-     * Creates a new instance of JxtaSocketAddress.
-     *
-     * @param peerGroup peer group within which this socket exists
-     * @param pipeAdv   the advertisement of a pipe for the socket to listen on
-     * @param peerAdv   the PeerAdvertisement (may not be null)
-     */
-    public JxtaSocketAddress(PeerGroup peerGroup, PipeAdvertisement pipeAdv, PeerAdvertisement peerAdv) {
-        if (peerGroup == null) {
-            throw new IllegalArgumentException("peerGroupId is required.");
-        }
-        if (pipeAdv == null) {
-            throw new IllegalArgumentException("pipeAdv is required.");
-        }
-        if (peerAdv == null) {
-            throw new IllegalArgumentException("pipeAdv is required.");
-        }
-
-        this.pipeAdv = pipeAdv.clone();
-        this.peerGroupId = peerGroup.getPeerGroupID();
-        this.peerId = peerAdv.getPeerID();
-        this.peerAdv = peerAdv.clone();
-    }
-
-    /**
-     * Creates a new instance of JxtaSocketAddress.
-     *
-     * @param peerGroupId ID of peer group within which this socket exists
-     * @param pipeAdv     the advertisement of a pipe for the socket to listen on
-     * @deprecated use the PeerAdvertisement variant instead
-     */
-    @Deprecated
-    public JxtaSocketAddress(PeerGroupID peerGroupId, PipeAdvertisement pipeAdv) {
-        this(peerGroupId, pipeAdv, null);
-    }
-
-    /**
-     * Creates a new instance of JxtaSocketAddress.
-     *
-     * @param peerGroupId ID of peer group within which this socket exists
-     * @param pipeAdv     the advertisement of a pipe for the socket to listen on
-     * @param peerId      the ID of a specific peer to be contacted over this socket
-     *                    (may be null)
-     * @throws IllegalArgumentException if peerGroupId or pipeAdv are null
-     * @deprecated use the PeerAdvertisement variant instead
-     */
-    @Deprecated
-    public JxtaSocketAddress(PeerGroupID peerGroupId, PipeAdvertisement pipeAdv, PeerID peerId) {
-
-        if (peerGroupId == null) {
-            throw new IllegalArgumentException("peerGroupId is required.");
-        }
-        if (pipeAdv == null) {
-            throw new IllegalArgumentException("pipeAdv is required.");
-        }
-
-        this.pipeAdv = pipeAdv.clone();
-        this.peerGroupId = peerGroupId;
-        this.peerId = peerId;
-        this.peerAdv = null;
-    }
-
-    /**
-     * Returns the PeerGroupID element of the address
-     *
-     * @return the PeerGroupID
-     */
-    public PeerGroupID getPeerGroupId() {
-        return this.peerGroupId;
-    }
-
-    /**
-     * Returns the PipeAdvertisement element of the address
-     *
-     * @return the PipeAdvertisement
-     */
-    public PipeAdvertisement getPipeAdv() {
-        // preserve immutability
-        return pipeAdv.clone();
-    }
-
-    /**
-     * Returns the PeerID element of the address. May be null.
-     *
-     * @return the PeerID, if there is one, null otherwise
-     */
-    public PeerID getPeerId() {
-        return this.peerId;
-    }
-
-    /**
-     * Returns the PeerID element of the address. May be null.
-     *
-     * @return the PeerAdvertisement, if there is one, null otherwise
-     */
-    public PeerAdvertisement getPeerAdvertisement() {
-        return this.peerAdv;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-
-        if (this == obj) {
-            return true;
-        }
-
-        if (obj instanceof JxtaSocketAddress) {
-            JxtaSocketAddress addr = (JxtaSocketAddress) obj;
-
-            if (!peerGroupId.equals(addr.getPeerGroupId())) {
-                return false;
-            }
-            if (!pipeAdv.equals(addr.getPipeAdv())) {
-                return false;
-            }
-            if (peerId != null) {
-                if (!peerId.equals(addr.getPeerId())) {
-                    return false;
-                }
-            } else if (addr.getPeerId() != null) {
-                return false;
-            }
-
-            return true;
-        }
-        return false;
-    }
-
-    @Override
-    public int hashCode() {
-
-        int result = 17;
-
-        result = 37 * result + peerGroupId.hashCode();
-        result = 37 * result + pipeAdv.hashCode();
-        if (peerId != null) {
-            result = 37 * result + peerId.hashCode();
-        }
-        return result;
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder result = new StringBuilder();
-        String lineSep = System.getProperty("line.separator");
-
-        result.append(lineSep).append("JxtaSocketAdress:").append(lineSep);
-        result.append("    PeerGroupID: ").append(peerGroupId.toString()).append(lineSep);
-        if (peerId != null) {
-            result.append(lineSep).append("    PeerID: ").append(peerId.toString()).append(lineSep);
-        }
-        result.append("    Pipe Adv: ").append(lineSep).append("    ").append(getPipeDocAsString());
-        return result.toString();
-    }
-
-    /*
-     * A convenience function to lazily-initialize a variable with the string 
-     * representaiton of the pipe advertisement and return it as needed.
-     */
-    private synchronized String getPipeDocAsString() {
-        if (pipeDoc == null) {
-            // Using plain text to avoid unpredictable white space 
-            // nodes. [vwilliams]
-            pipeDoc = pipeAdv.getDocument(MimeMediaType.TEXTUTF8).toString();
-        }
-        return pipeDoc;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/socket/JxtaSocketInputStream.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/socket/JxtaSocketInputStream.java
deleted file mode 100644 (file)
index bae578a..0000000
+++ /dev/null
@@ -1,317 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.socket;
-
-
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.StringMessageElement;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InterruptedIOException;
-import java.net.SocketTimeoutException;
-import java.util.LinkedList;
-import java.util.Queue;
-
-
-/**
- * Provides the stream data source for JxtaSocket.
- *
- * @author Athomas Goldberg
- */
-class JxtaSocketInputStream extends InputStream {
-
-    /**
-     * We push this "poison" value into the accept backlog queue in order to
-     * signal that the queue has been closed.
-     */
-    protected static final MessageElement QUEUE_END = new StringMessageElement("Terminal", "Terminal", null);
-
-    /**
-     * Our read timeout.
-     */
-    private long timeout = 60 * 1000;
-
-    /**
-     * The associated socket.
-     */
-    private final JxtaSocket socket;
-
-    /**
-     * Our queue of message elements waiting to be read.
-     */
-    protected final Queue<MessageElement> queue;
-
-    /**
-     * The maximum number of message elements we will allow in the queue.
-     */
-    protected final int queueSize;
-
-    /**
-     * The current message element input stream we are processing.
-     */
-    private InputStream currentMsgStream = null;
-
-    /**
-     * Construct an InputStream for a specified JxtaSocket.
-     *
-     * @param socket  the JxtaSocket
-     * @param queueSize the queue size
-     */
-    JxtaSocketInputStream(JxtaSocket socket, int queueSize) {
-        this.socket = socket;
-        this.queueSize = queueSize;
-        queue = new LinkedList<MessageElement>();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized int available() throws IOException {
-        int result;
-        InputStream in = getCurrentStream(false);
-
-        if (in != null) {
-            result = in.available();
-        } else {
-            // We chose not to block, if we have no inputstream then
-            // that means there are no bytes available.
-            result = 0;
-        }
-        return result;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized int read() throws IOException {
-        byte[] b = new byte[1];
-        int result = 0;
-
-        // The result of read() can be -1 (EOF), 0 (yes, its true) or 1.
-        while (0 == result) {
-            result = read(b, 0, 1);
-        }
-
-        if (-1 != result) {
-            result = (int) b[0];
-        }
-        return result;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized int read(byte b[], int off, int len) throws IOException {
-        if ((off < 0) || (off > b.length) || (len < 0) || ((off + len) > b.length) || ((off + len) < 0)) {
-            throw new IndexOutOfBoundsException();
-        }
-
-        while (true) {
-            int result = -1;
-            InputStream in = getCurrentStream(true);
-
-            if (null == in) {
-                return -1;
-            }
-
-            result = in.read(b, off, len);
-            if (0 == result) {
-                // Some streams annoyingly return 0 result. We won't
-                // perpetuate this behaviour.
-                continue;
-            }
-
-            if (result == -1) {
-                closeCurrentStream();
-                continue;
-            }
-            return result;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized void close() {
-        queue.clear();
-        closeCurrentStream();
-        queue.offer(QUEUE_END);
-        notify();
-    }
-
-    /**
-     * Rather than force the InputStream closed we add the EOF at the end of
-     * any current data.
-     */
-    synchronized void softClose() {
-        queue.offer(QUEUE_END);
-        notify();
-    }
-
-    /**
-     * Get the input stream for the current segment and optionally block until
-     * a segment is available.
-     *
-     * @param block If {@code true} then block until a segment is available.
-     * @return the InputStream
-     * @throws IOException if an io error occurs
-     */
-    private InputStream getCurrentStream(boolean block) throws IOException {
-
-        if (currentMsgStream == null) {
-
-            if (QUEUE_END == queue.peek()) {
-                // We are at the end of the queue.
-                return null;
-            }
-
-            MessageElement me = null;
-            long pollUntil = (Long.MAX_VALUE == timeout) ? Long.MAX_VALUE : System.currentTimeMillis() + timeout;
-
-            while (pollUntil >= System.currentTimeMillis()) {
-                try {
-                    me = queue.poll();
-
-                    if (null == me) {
-                        long sleepFor = pollUntil - System.currentTimeMillis();
-
-                        if (sleepFor > 0) {
-                            wait(sleepFor);
-                        }
-                    } else {
-                        break;
-                    }
-                } catch (InterruptedException woken) {
-                    InterruptedIOException incomplete = new InterruptedIOException("Interrupted waiting for data.");
-
-                    incomplete.initCause(woken);
-                    incomplete.bytesTransferred = 0;
-                    throw incomplete;
-                }
-            }
-
-            if (block && (null == me)) {
-                throw new SocketTimeoutException("Socket timeout during read.");
-            }
-
-            if (me != null) {
-                currentMsgStream = me.getStream();
-            }
-        }
-        return currentMsgStream;
-    }
-
-    private void closeCurrentStream() {
-        if (currentMsgStream != null) {
-            try {
-                currentMsgStream.close();
-            } catch (IOException ignored) {// ignored
-            }
-            currentMsgStream = null;
-        }
-    }
-
-    synchronized void enqueue(MessageElement element) {
-        if (queue.contains(QUEUE_END)) {
-            // We have already marked the end of the queue.
-            return;
-        }
-        if (queue.size() < queueSize) {
-            queue.offer(element);
-        }
-        notify();
-    }
-
-    /**
-     * Returns the timeout value for this socket. This is the amount of time in
-     * relative milliseconds which we will wait for read() operations to
-     * complete.
-     *
-     * @return The timeout value in milliseconds or 0 (zero) for
-     *         infinite timeout.
-     */
-    long getTimeout() {
-        if (timeout < Long.MAX_VALUE) {
-            return timeout;
-        } else {
-            return 0;
-        }
-    }
-
-    /**
-     * Returns the timeout value for this socket. This is the amount of time in
-     * relative milliseconds which we will wait for read() operations to
-     * operations to complete.
-     *
-     * @param timeout The timeout value in milliseconds or 0 (zero) for
-     *                infinite timeout.
-     */
-    void setTimeout(long timeout) {
-        if (timeout < 0) {
-            throw new IllegalArgumentException("Negative timeout not allowed.");
-        }
-
-        if (0 == timeout) {
-            timeout = Long.MAX_VALUE;
-        }
-        this.timeout = timeout;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/socket/JxtaSocketOutputStream.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/socket/JxtaSocketOutputStream.java
deleted file mode 100644 (file)
index 7ad728b..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.socket;
-
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.net.SocketException;
-
-
-/**
- * This class implements a buffered output stream. By setting up such an output
- * stream, an application can write bytes to the underlying output stream
- * without necessarily causing a call to the underlying system for each byte
- * written. Data buffer is flushed to the underlying stream, when it is full,
- * or an explicit call to flush is made.
- */
-class JxtaSocketOutputStream extends OutputStream {
-
-    /**
-     * If {@code true} then this socket is closed.
-     */
-    protected boolean closed = false;
-
-    /**
-     * Data buffer
-     */
-    protected byte buf[];
-
-    /**
-     * byte count in buffer
-     */
-    protected int count;
-
-    /**
-     * JxtaSocket associated with this stream
-     */
-    protected JxtaSocket socket;
-
-    /**
-     * Constructor for the JxtaSocketOutputStream object
-     *
-     * @param socket JxtaSocket associated with this stream
-     * @param size   buffer size in bytes
-     */
-    public JxtaSocketOutputStream(JxtaSocket socket, int size) {
-        if (size <= 0) {
-            throw new IllegalArgumentException("Buffer size <= 0");
-        }
-        buf = new byte[size];
-        this.socket = socket;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized void close() throws IOException {
-        flushBuffer();
-        closed = true;
-    }
-
-    /**
-     * Similar to close except that any buffered data is discarded.
-     */
-    synchronized void hardClose() {
-        count = 0;
-        closed = true;
-    }
-
-    /**
-     * Flush the internal buffer
-     *
-     * @throws IOException if an i/o error occurs
-     */
-    private void flushBuffer() throws IOException {
-        if (count > 0) {
-            // send the message
-            socket.write(buf, 0, count);
-            count = 0;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized void write(int b) throws IOException {
-
-        if (closed) {
-            throw new SocketException("Socket Closed.");
-        }
-
-        if (count >= buf.length) {
-            flushBuffer();
-        }
-        buf[count++] = (byte) b;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized void write(byte b[], int off, int len) throws IOException {
-        int left = buf.length - count;
-
-        if (closed) {
-            throw new SocketException("Socket Closed.");
-        }
-
-        if (len > left) {
-            System.arraycopy(b, off, buf, count, left);
-            len -= left;
-            off += left;
-            count += left;
-            flushBuffer();
-        }
-
-        // chunk data if larger than buf.length
-        while (len >= buf.length) {
-            socket.write(b, off, buf.length);
-            len -= buf.length;
-            off += buf.length;
-        }
-        System.arraycopy(b, off, buf, count, len);
-        count += len;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized void flush() throws IOException {
-        flushBuffer();
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/socket/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/socket/package.html
deleted file mode 100644 (file)
index 63f1fc2..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-</head>
-<body>
-<p>The socket package provides interface ala {@link java.net.Socket}
-over JXTA pipes. Since the PipeService provides uni-directional, and
-unreliable communication channels, the JxtaSocket employs it's own
-protocol over pipes to establish bi-directional connections for every
-request. In addition the JxtaSocket also employs the reliability
-library to ensure reliable delivery of data.&nbsp; Another feature of
-JxtaSockets is chunking, which relieves applications from having to
-worry about mtu size, just remember to invoke flush at the end of data
-transmission<br>
-</p>
-<p><br>
-</p>
-<p>JxtaSocket defines the following message elements employed during
-the life cycle of a JxtaSocket :<br>
-</p>
-<div style="margin-left: 40px;"><><span style="color: rgb(51, 51, 255);">
-&lt;Cred&gt;</span>Credentials to determine trust<span
- style="color: rgb(51, 51, 255);">&lt;/Cred&gt;</span></><br>
-<><span style="color: rgb(51, 51, 255);">&lt;reqPipe&gt;</span>requestor's
-pipe advertisement<span style="color: rgb(51, 51, 255);">&lt;/reqPipe&gt;</span></><br>
-<span style="color: rgb(51, 51, 255);">&lt;remPipe&gt;</span>Remote
-pipe advertisement<span style="color: rgb(51, 51, 255);">&lt;/remPipe&gt;</span><br>
-<span style="color: rgb(51, 51, 255);">&lt;reqPeer&gt;</span>Remote
-peer advertisement<span style="color: rgb(51, 51, 255);">&lt;/remPeer&gt;</span><br>
-<span style="color: rgb(51, 51, 255);">&lt;stream&gt;</span>true|false
-== reliable|or not<span style="color: rgb(51, 51, 255);">&lt;/stream&gt;</span><br>
-<span style="color: rgb(51, 51, 255);">&lt;close&gt;</span>close request<span
- style="color: rgb(51, 51, 255);">&lt;/close&gt;<br>
-</span><span style="color: rgb(51, 51, 255);">&lt;closeACK&gt;</span>ack
-close request<span style="color: rgb(51, 51, 255);">&lt;/closeACK&gt;</span><span
- style="color: rgb(51, 51, 255);"></span><br>
-<span style="color: rgb(51, 51, 255);">&lt;data&gt;</span>data<span
- style="color: rgb(51, 51, 255);">&lt;/data&gt;</span><br>
-</div>
-<p>The socket package also provides interface ala {@link
-java.net.MulticastSocket} over propagated pipes.&nbsp; Keep in mind
-JxtaMulticastSocket does not provide chunking nor reliability at this
-time, therefore one must consider configuration parameters such as the
-multicast datagram size defined for the TCP Message Transport :<br>
-</p>
-<div style="margin-left: 80px;"><span style="color: rgb(51, 51, 255);">&lt;MulticastSize&gt;</span><br>
-&nbsp;&nbsp;&nbsp; 16384<br>
-<span style="color: rgb(51, 51, 255);">&lt;/MulticastSize&gt;</span><br>
-</div>
-<p>As well as any other mtu size imposed by the JXTA Platform, or the
-operating system.<br>
-</p>
-<p>For examples on how to utilize the net.jxta.socket see the online
-tutorials on <a
- href="http://platform.jxta.org/source/browse/platform/www/java/tutorial/examples/socket">JxtaSocket</a>,
-and <a
- href="http://platform.jxta.org/source/browse/platform/www/java/tutorial/examples/multicast">JxtaMulticastSocket</a>
-available at <a href="http://www.jxta.org/Tutorials.html">http://www.jxta.org/Tutorials.html</a><br>
-</p>
-<p><br>
-</p>
-</body>
-</html>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/user.properties b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/user.properties
deleted file mode 100644 (file)
index 66d16b7..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-# Amount of time in minutes after which a connection is considered idle and may 
-# be scavenged expressed in minutes
-impl.endpoint.tls.connection.idletimeout=5
-
-# Amount of time in minutes a connection must be idle before a reconnection 
-# attempt will be considered expressed in minutes
-impl.endpoint.tls.connection.minidlereconnect=1
-
-# Amount if time in minutes which retries may remain queued for retrasmission.
-# expressed in minutes
-impl.endpoint.tls.connection.maxretryage=2
-
-# Cache Manager Deffered checkpoint
-# a setting of true deffers commit checkpoint to the Filer
-# this setting increases performance, with a caveat of possible
-# data corruption in unexpected process termination due to kernel
-# crash, or power loss
-impl.cm.defferedcheckpoint=true
-
-#Discovery provides the ability to disable discovery network traffic
-#when defined, it renders discovery a local cache
-impl.discovery.localonly=false
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/AbstractSimpleSelectable.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/AbstractSimpleSelectable.java
deleted file mode 100644 (file)
index 0714118..0000000
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Copyright (c) 2004-2007 Sun Microsystems, Inc.  All rights reserved.
- *
- *  The Sun Project JXTA(TM) Software License
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *
- *  3. The end-user documentation included with the redistribution, if any, must
- *     include the following acknowledgment: "This product includes software
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology."
- *     Alternately, this acknowledgment may appear in the software itself, if
- *     and wherever such third-party acknowledgments normally appear.
- *
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must
- *     not be used to endorse or promote products derived from this software
- *     without prior written permission. For written permission, please contact
- *     Project JXTA at http://www.jxta.org.
- *
- *  5. Products derived from this software may not be called "JXTA", nor may
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United
- *  States and other countries.
- *
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of
- *  the license in source files.
- *
- *  ====================================================================
- *
- *  This software consists of voluntary contributions made by many individuals
- *  on behalf of Project JXTA. For more information on Project JXTA, please see
- *  http://www.jxta.org.
- *
- *  This license is based on the BSD license adopted by the Apache Foundation.
- */
-package net.jxta.util;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Map;
-import java.util.WeakHashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import net.jxta.logging.Logging;
-import net.jxta.util.SimpleSelectable.IdentityReference;
-
-/**
- * This a tool to implement selectable objects. It may be composed or extended.
- * <p/>
- * {@code SimpleSelectable} objects that are not {@code SimpleSelector} objects
- * only report changes to their listeners.
- * <p/>
- * The listeners of a {@code SimpleSelectable} may be {@code SimpleSelector}
- * objects or other {@code SimpleSelectable} objects. However the method to
- * register non-selectors is and must remain protected since it would allow the
- * connection of arbitrary listeners.
- *
- * @see SimpleSelector
- */
-
-public abstract class AbstractSimpleSelectable implements SimpleSelectable {
-    
-    /**
-     *  Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(AbstractSimpleSelectable.class.getName());
-    
-    /**
-     * The identity reference for this selectable.
-     *
-     * @see SimpleSelectable.IdentityReference
-     */
-    public final IdentityReference identityReference = new IdentityReference(this);
-    
-    /**
-     * The object that is to reported to listeners as having changed.  When this
-     * class is composed rather than extended, "this" is probably not the right
-     * choice.
-     */
-    private final SimpleSelectable srcObject;
-    
-    /**
-     * Registered Change Listeners.
-     * <p/>
-     * We use a weakHashMap as a Set. The values are never used.
-     */
-    private final Map<SimpleSelectable, Object> myListeners = new WeakHashMap<SimpleSelectable, Object>(2);
-    
-    /**
-     * Standard constructor for cases where the selectable object is this
-     * object.
-     */
-    public AbstractSimpleSelectable() {
-        this.srcObject = this;
-    }
-    
-    /**
-     * Standard constructor for cases where the selectable object is some other
-     * object.
-     *
-     * @param srcObject the source object
-     */
-    public AbstractSimpleSelectable(SimpleSelectable srcObject) {
-        this.srcObject = srcObject;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public IdentityReference getIdentityReference() {
-        return identityReference;
-    }
-    
-    /**
-     * Tells whether there are registered selectors right now, or not.  A
-     * SimpleSelectable that also registers with something else may want to
-     * unregister (with the obvious consistency precautions) if it no longer has
-     * selectors of its own.
-     *
-     * @return true if there are listeners.
-     */
-    protected boolean haveListeners() {
-        synchronized(myListeners) {
-            return !myListeners.isEmpty();
-        }
-    }
-    
-    /**
-     * This method takes any listener, not just a SimpleSelector.
-     *
-     * @param selectable The SimpleSelectable to register
-     */
-    protected void registerListener(SimpleSelectable selectable) {
-        synchronized(myListeners) {
-            myListeners.put(selectable, null);
-        }
-    }
-    
-    /**
-     * This method takes any listener, not just a SimpleSelector.
-     *
-     * @param selectable The SimpleSelectable to unregister
-     */
-    protected void unregisterListener(SimpleSelectable selectable) {
-        synchronized(myListeners) {
-            myListeners.remove(selectable);
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public void register(SimpleSelector simpleSelector) {
-        registerListener(simpleSelector);
-        simpleSelector.itemChanged(this);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public void unregister(SimpleSelector simpleSelector) {
-        unregisterListener(simpleSelector);
-    }
-    
-    /**
-     * This method tells us that something changed and so we need to notify our
-     * selectors by invoking their {@code itemChanged()} method. This is
-     * normally invoked internally by the implementation. One of the reasons for
-     * the implementation to invoke this method is that a SimpleSelectable
-     * object that this one is registered with has changed and so has invoked
-     * the itemChanged method.  However, the correlation between the two is left
-     * up to the implementation.
-     * <p/>
-     * No external synchronization needed, nor desirable.
-     *
-     * @return false if there are no selectors left (that's a suggestion for the
-     * implementation to use haveListeners and possibly unregister itself).
-     */
-    protected final boolean notifyChange() {
-        Collection<SimpleSelectable> listeners;
-        
-        synchronized(myListeners) {
-            listeners = new ArrayList<SimpleSelectable>(myListeners.keySet());
-        }
-        
-        for (SimpleSelectable listener : listeners) {
-            try {
-                listener.itemChanged(srcObject);
-            } catch(Throwable all) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Uncaught Throwable in listener " + listener, all);
-                }
-            }
-        }
-        
-        return !listeners.isEmpty();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/AdvertisementUtilities.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/AdvertisementUtilities.java
deleted file mode 100644 (file)
index 128c3e8..0000000
+++ /dev/null
@@ -1,608 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.util;
-
-
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredTextDocument;
-import net.jxta.document.TextElement;
-import net.jxta.exception.JxtaException;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.pipe.PipeID;
-import net.jxta.platform.ModuleClassID;
-import net.jxta.platform.ModuleSpecID;
-import net.jxta.protocol.ModuleClassAdvertisement;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.protocol.ModuleSpecAdvertisement;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.PipeAdvertisement;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-
-/**
- * @deprecated Will be deprecated soon. Do not use these methods. They contain
- *             a number of incorrect assumption that cannot be corrected while maintaining
- *             backwards compatibility with programs which already use them.
- *             THIS CLASS IS SCHEDULED TO BE REMOVED AFTER 2.5
- */
-@Deprecated
-public final class AdvertisementUtilities {
-
-    /**
-     * Logger
-     */
-    // private static final transient Logger LOG = Logger.getLogger(AdvertisementUtilities.class.getName());
-
-    public static final StructuredTextDocument STANDARD_COMPATABILITY = (StructuredTextDocument) StructuredDocumentFactory.newStructuredDocument(
-            MimeMediaType.XMLUTF8, "Comp");
-    public static final String STANDARD_URI = "http://www.jxta.org/download/jxta.jar";
-    public static final String STANDARD_PROVIDER = "jxta.org";
-
-    static {
-        Element element = STANDARD_COMPATABILITY.createElement("Efmt", "JDK1.4.1");
-
-        STANDARD_COMPATABILITY.appendChild(element);
-        element = STANDARD_COMPATABILITY.createElement("Bind", "V2.0 Ref Impl");
-        STANDARD_COMPATABILITY.appendChild(element);
-    }
-
-    private AdvertisementUtilities() {}
-
-    /**
-     * Read a JXTA Advertisement from a File
-     *
-     * @param fileName The file containing the Advertisement
-     * @return An polymorphic Advertisement object
-     * @throws JxtaException if Unable to parse the Advertisement
-     */
-    public static Advertisement readAdvertisementFromFile(String fileName) throws JxtaException {
-        return readAdvertisementFromFile(new File(fileName));
-    }
-
-    /**
-     * Read a JXTA Advertisement from a File
-     *
-     * @param file The file containing the Advertisement
-     * @return An polymorphic Advertisement object
-     * @throws JxtaException if Unable to parse the Advertisement
-     */
-    public static Advertisement readAdvertisementFromFile(File file) throws JxtaException {
-        FileInputStream in = null;
-
-        try {
-            in = new FileInputStream(file);
-
-            return AdvertisementFactory.newAdvertisement(MimeMediaType.XML_DEFAULTENCODING, in);
-        } catch (IOException e) {
-            throw new JxtaException("Advertisement Load Failed: " + file, e);
-        } catch (Exception e) {
-            throw new JxtaException("Advertisement Load Failed: " + file, e);
-        } finally {
-            if (in != null) {
-                try {
-                    in.close();
-                } catch (IOException ignored) {// ignored
-                }
-            }
-        }
-    }
-
-    /**
-     * Save a JXTA Advertisement as an XML Document to a File
-     *
-     * @param adv      The Advertisement to be saved
-     * @param fileName The file to store the Advertisement
-     * @throws JxtaException if Unable to parse the Advertisement
-     */
-    public static void saveAdvertisementToFile(Advertisement adv, String fileName) throws JxtaException {
-        saveAdvertisementToFile(adv, new File(fileName));
-    }
-
-    /**
-     * Save a JXTA Advertisement as an XML Document to a File
-     *
-     * @param adv  The Advertisement to be saved
-     * @param file The file to store the Advertisement
-     * @throws JxtaException if Unable to parse the Advertisement
-     */
-    public static void saveAdvertisementToFile(Advertisement adv, File file) throws JxtaException {
-        OutputStream out = null;
-
-        try {
-            out = new FileOutputStream(file);
-            Document document = adv.getDocument(MimeMediaType.XML_DEFAULTENCODING);
-
-            document.sendToStream(out);
-        } catch (IOException e) {} finally {
-            if (out != null) {
-                try {
-                    out.close();
-                } catch (IOException ignored) {// ignored
-                }
-            }
-        }
-    }
-
-    /**
-     * Save a JXTA Advertisement as an XML Document to an array of bytes
-     *
-     * @param advertisement The Advertisement to be saved
-     * @throws JxtaException if Unable to parse the Advertisement
-     * @deprecated This method should not be used because it produces a result
-     *             who's encoding is not predictable and may (will) differ from JVM to JVM.
-     */
-    @Deprecated
-    public static byte[] advertisementToBytes(Advertisement advertisement) throws JxtaException {
-        try {
-            Document document = advertisement.getDocument(MimeMediaType.XML_DEFAULTENCODING);
-            ByteArrayOutputStream bo = new ByteArrayOutputStream();
-
-            document.sendToStream(bo);
-
-            return bo.toByteArray();
-        } catch (IOException e) {
-            throw new JxtaException("Error converting a document to bytes", e);
-        }
-    }
-
-    /**
-     * Convert an array of bytes containing an XML encoded String to an JXTA Advertisement
-     *
-     * @param buf The source of the advertisement
-     * @return The Advertisement
-     * @deprecated This method should not be used because it interprets the
-     *             input using the local default encoding which is not predictable and
-     *             may (will) differ from JVM to JVM.
-     */
-    @Deprecated
-    public static Advertisement bytesToAdvertisement(byte buf[]) {
-        try {
-            InputStream in = new ByteArrayInputStream(buf);
-            Advertisement advertisement = AdvertisementFactory.newAdvertisement(MimeMediaType.XML_DEFAULTENCODING, in);
-
-            return advertisement;
-        } catch (IOException e) {
-            return null;
-        } // This will never be thrown
-    }
-
-    /**
-     * Save a JXTA Advertisement to a String
-     *
-     * @param advertisement The Advertisement to be converted
-     * @param mimeType      Type of document to be created
-     */
-    public static String advertisementToText(Advertisement advertisement, String mimeType) {
-        try {
-            StructuredTextDocument doc = (StructuredTextDocument) advertisement.getDocument(new MimeMediaType(mimeType));
-            StringWriter stringWriter = new StringWriter();
-
-            doc.sendToWriter(stringWriter);
-
-            return stringWriter.toString();
-        } catch (IOException e) {
-            return null;
-        } // This will never be thrown
-    }
-
-    /**
-     * Save a JXTA Advertisement to a Plain Text String
-     *
-     * @param advertisement The Advertisement to be converted
-     */
-    public static String advertisementToPlainText(Advertisement advertisement) {
-        return advertisementToText(advertisement, MimeMediaType.TEXT_DEFAULTENCODING.toString());
-    }
-
-    /**
-     * Save a JXTA Advertisement to an XML String
-     *
-     * @param advertisement The Advertisement to be converted
-     * @deprecated Equivalent to Advertisement.toString()
-     */
-    @Deprecated
-    public static String advertisementToXmlText(Advertisement advertisement) {
-        return advertisementToText(advertisement, MimeMediaType.XMLUTF8.toString());
-    }
-
-    /**
-     * Convert an array of bytes containing an XML encoded String to an JXTA Advertisement
-     *
-     * @param xmlTextAsBytes The source of the advertisement
-     * @return The Advertisement
-     * @throws JxtaException if Unable to parse the Advertisement
-     * @deprecated This method should not be used because it produces a result
-     *             who's encoding is not predictable and may (will) differ from JVM to JVM.
-     */
-    @Deprecated
-    public static Advertisement newAdvertisementFromXml(byte xmlTextAsBytes[]) throws JxtaException {
-        try {
-            return AdvertisementFactory.newAdvertisement(MimeMediaType.XML_DEFAULTENCODING
-                    ,
-                    new ByteArrayInputStream(xmlTextAsBytes));
-        } catch (Exception e) {
-            throw new JxtaException("Unable to create Advertisement from the provided XML", e);
-        }
-    }
-
-    /**
-     * Convert a String containing an XML encoded String to an JXTA Advertisement
-     *
-     * @param xmlText The source of the advertisement
-     * @return The Advertisement
-     * @throws JxtaException if Unable to parse the Advertisement
-     * @deprecated This method should not be used because it interprets the
-     *             input using the local default encoding which is not precidcatable and
-     *             may (will) differ from JVM to JVM.
-     */
-    @Deprecated
-    public static Advertisement newAdvertisementFromXml(String xmlText) throws JxtaException {
-        try {
-            return AdvertisementFactory.newAdvertisement(MimeMediaType.XML_DEFAULTENCODING, new StringReader(xmlText));
-        } catch (Exception e) {
-            throw new JxtaException("Unable to create Advertisement from the provided XML", e);
-        }
-    }
-
-    /**
-     * Create a Pipe Advertisement
-     *
-     * @return A new Pipe Advertisement
-     */
-    public static PipeAdvertisement createPipeAdvertisement() {
-        return (PipeAdvertisement) AdvertisementFactory.newAdvertisement(PipeAdvertisement.getAdvertisementType());
-    }
-
-    /**
-     * Create a Pipe Advertisement
-     *
-     * @param pipeId   The pipe ID
-     * @param pipeType The type of the Pipe
-     * @return A new Pipe Advertisement
-     */
-    public static PipeAdvertisement createPipeAdvertisement(PipeID pipeId, String pipeType) {
-        PipeAdvertisement pipeAdvertisement = (PipeAdvertisement) AdvertisementFactory.newAdvertisement(
-                PipeAdvertisement.getAdvertisementType());
-
-        pipeAdvertisement.setPipeID(pipeId);
-        pipeAdvertisement.setType(pipeType);
-        return pipeAdvertisement;
-    }
-
-    /**
-     * Create a Pipe Advertisement
-     *
-     * @param pipeIdText The pipe ID
-     * @param pipeType   The type of the Pipe
-     * @return A new Pipe Advertisement
-     */
-    public static PipeAdvertisement createPipeAdvertisement(String pipeIdText, String pipeType) throws JxtaException {
-        PipeID pipeId;
-
-        try {
-            pipeId = (PipeID) IDFactory.fromURI(new URI(pipeIdText));
-        } catch (URISyntaxException failed) {
-            IllegalArgumentException failure = new IllegalArgumentException("Bad pipe id");
-
-            failure.initCause(failed);
-
-            throw failure;
-        }
-        PipeAdvertisement pipeAdvertisement = (PipeAdvertisement) AdvertisementFactory.newAdvertisement(
-                PipeAdvertisement.getAdvertisementType());
-
-        pipeAdvertisement.setPipeID(pipeId);
-        pipeAdvertisement.setType(pipeType);
-        return pipeAdvertisement;
-    }
-
-    /**
-     * Create a Pipe Advertisement
-     *
-     * @param root Element containing a Pipe Advertisement
-     * @return A new Pipe Advertisement
-     */
-    public static PipeAdvertisement createPipeAdvertisement(Element root) {
-        TextElement pipeAdvElement = (TextElement) DocumentUtilities.getChild(root, PipeAdvertisement.getAdvertisementType());
-
-        if (pipeAdvElement == null) {
-            return null;
-        }
-
-        return (PipeAdvertisement) AdvertisementFactory.newAdvertisement(pipeAdvElement);
-    }
-
-    /**
-     * Create a Pipe Advertisement
-     *
-     * @param peerGroup The peerGroup
-     * @param pipeType  The pipeType
-     * @return A new Pipe Advertisement
-     */
-    public static PipeAdvertisement createPipeAdvertisement(PeerGroup peerGroup, String pipeType) {
-        PipeID pipeID = IDFactory.newPipeID(peerGroup.getPeerGroupID());
-
-        return createPipeAdvertisement(pipeID, pipeType);
-    }
-
-    /**
-     * Create a Pipe Advertisement
-     *
-     * @param pipeID   The pipeID
-     * @param pipeType The pipeType
-     * @return A new Pipe Advertisement
-     */
-    public static PipeAdvertisement createPipeAdvertisement(ID pipeID, String pipeType) {
-        PipeAdvertisement pipeAdvertisement = createPipeAdvertisement();
-
-        pipeAdvertisement.setPipeID(pipeID);
-        pipeAdvertisement.setType(pipeType);
-        return pipeAdvertisement;
-    }
-
-    /**
-     * Create a Pipe Advertisement
-     *
-     * @param peerGroup The peerGroup
-     * @param pipeType  The pipeType
-     * @param name      The Pime Name
-     * @return A new Pipe Advertisement
-     */
-    public static PipeAdvertisement createPipeAdvertisement(PeerGroup peerGroup, String sPipeID, String pipeType, String name) throws JxtaException {
-        PipeAdvertisement pipeAdvertisement = createPipeAdvertisement(peerGroup, pipeType);
-        PipeID pipeId;
-
-        try {
-            pipeId = (PipeID) IDFactory.fromURI(new URI(sPipeID));
-        } catch (URISyntaxException failed) {
-            IllegalArgumentException failure = new IllegalArgumentException("Bad pipe id");
-
-            failure.initCause(failed);
-
-            throw failure;
-        }
-        pipeAdvertisement.setPipeID(pipeId);
-        if (name != null) {
-            pipeAdvertisement.setName(name);
-        }
-
-        return pipeAdvertisement;
-    }
-
-    /**
-     * Create a Pipe Advertisement
-     *
-     * @param root The Root element containing the Advertisement
-     * @return A new Pipe Advertisement
-     * @deprecated These utilities are too specialized for general use.
-     */
-    @Deprecated
-    public static PipeAdvertisement getPipeAdvertisement(Element root) {
-        TextElement pipeAdvElement = (TextElement) DocumentUtilities.getChild(root, PipeAdvertisement.getAdvertisementType());
-
-        if (pipeAdvElement == null) {
-            return null;
-        }
-
-        return (PipeAdvertisement) AdvertisementFactory.newAdvertisement(pipeAdvElement);
-    }
-
-    /**
-     * Create a Peer Advertisement
-     *
-     * @param root The Root element containing the Advertisement
-     * @return A new Peer Advertisement
-     * @deprecated These utilities are too specialized for general use.
-     */
-    @Deprecated
-    public static PeerAdvertisement getPeerAdvertisement(Element root) {
-        TextElement peerAdvElement = (TextElement) DocumentUtilities.getChild(root, PeerAdvertisement.getAdvertisementType());
-
-        if (peerAdvElement == null) {
-            return null;
-        }
-
-        return (PeerAdvertisement) AdvertisementFactory.newAdvertisement(peerAdvElement);
-    }
-
-    /**
-     * Create a ModuleClassAdvertisement
-     *
-     * @param name        The name
-     * @param description The description
-     * @return An ModuleClassAdvertisement
-     */
-    public static ModuleClassAdvertisement createModuleClassAdvertisement(String name, String description) {
-        String moduleClassAdvertisementType = ModuleClassAdvertisement.getAdvertisementType();
-        ModuleClassAdvertisement moduleClassAdvertisement = (ModuleClassAdvertisement) AdvertisementFactory.newAdvertisement(
-                moduleClassAdvertisementType);
-
-        moduleClassAdvertisement.setName(name);
-        moduleClassAdvertisement.setDescription(description);
-
-        ModuleClassID mcID = IDFactory.newModuleClassID();
-
-        moduleClassAdvertisement.setModuleClassID(mcID);
-        return moduleClassAdvertisement;
-    }
-
-    /**
-     * Create a ModuleSpecAdvertisement
-     *
-     * @param name  The name
-     * @param param The param
-     * @return An ModuleSpecAdvertisement
-     * @deprecated This implementation incompletely initializes the module
-     *             spec advertisement. Consider creating Module Spec Advertisements without
-     *             this method.
-     */
-    @Deprecated
-    public static ModuleSpecAdvertisement createModuleSpecAdvertisement(String name, StructuredDocument param) {
-        return createModuleSpecAdvertisement(name, null, param);
-    }
-
-    /**
-     * Create a ModuleSpecAdvertisement
-     *
-     * @param name                     The name
-     * @param moduleClassAdvertisement The moduleClassAdvertisement
-     * @param param                    The param
-     * @return An ModuleSpecAdvertisement
-     * @deprecated This implementation incompletely initializes the module
-     *             spec advertisement. Consider creating Module Spec Advertisements without
-     *             this method.
-     */
-    @Deprecated
-    public static ModuleSpecAdvertisement createModuleSpecAdvertisement(String name, ModuleClassAdvertisement moduleClassAdvertisement, StructuredDocument param) {
-        String moduleSpecAdvertisementType = ModuleSpecAdvertisement.getAdvertisementType();
-        ModuleSpecAdvertisement moduleSpecAdvertisement = (ModuleSpecAdvertisement) AdvertisementFactory.newAdvertisement(
-                moduleSpecAdvertisementType);
-
-        moduleSpecAdvertisement.setName(name);
-        moduleSpecAdvertisement.setVersion("Unknown");
-        moduleSpecAdvertisement.setCreator("Unknown");
-
-        if (moduleClassAdvertisement != null) {
-            ModuleClassID moduleClassID = moduleClassAdvertisement.getModuleClassID();
-
-            moduleSpecAdvertisement.setModuleSpecID(IDFactory.newModuleSpecID(moduleClassID));
-        }
-
-        moduleSpecAdvertisement.setSpecURI("Unknown");
-
-        if (param != null) {
-            moduleSpecAdvertisement.setParam(param);
-        }
-
-        return moduleSpecAdvertisement;
-    }
-
-    /**
-     * Publish and advertisement to the Cache
-     *
-     * @param peerGroup         The peerGroup
-     * @param peerAdvertisement The Advertisement
-     * @throws JxtaException if Unable to cache the Advertisement
-     */
-    public static void cachePeerAdvertisement(PeerGroup peerGroup, PeerAdvertisement peerAdvertisement) throws JxtaException {
-        cachePeerAdvertisement(peerGroup, peerAdvertisement, DiscoveryService.DEFAULT_EXPIRATION
-                ,
-                DiscoveryService.DEFAULT_EXPIRATION);
-    }
-
-    private static void cachePeerAdvertisement(PeerGroup peerGroup, PeerAdvertisement peerAdvertisement, long lifetime, long lifetimeForOthers) throws JxtaException {
-        try {
-            DiscoveryService discoveryService = peerGroup.getDiscoveryService();
-
-            if (peerAdvertisement.getPeerID().equals(peerGroup.getPeerID())) {
-                return;
-            }            // no reason to persist our own peer ID
-
-            discoveryService.publish(peerAdvertisement, lifetime, lifetimeForOthers);
-        } catch (IOException e) {
-            throw new JxtaException("Unable to cache advertisement", e);
-        }
-    }
-
-    /**
-     * Create a ModuleImplAdvertisement
-     *
-     * @param specID      The specID
-     * @param code        The code
-     * @param description the advertisement description
-     * @return An ModuleImplAdvertisement
-     * @deprecated This implementation initializes some fields of the
-     *             resulting ModuleImplAdvertisement to constant values who's value may
-     *             not be correct for all circumstances. Consider creating ModuleImpl
-     *             Advertisements directly in your application.
-     */
-    @Deprecated
-    public static ModuleImplAdvertisement createModuleImplAdvertisement(ModuleSpecID specID, String code, String description) {
-
-        ModuleImplAdvertisement moduleImplAdvertisement = (ModuleImplAdvertisement)
-                AdvertisementFactory.newAdvertisement(ModuleImplAdvertisement.getAdvertisementType());
-
-        moduleImplAdvertisement.setModuleSpecID(specID);
-        moduleImplAdvertisement.setCompat(STANDARD_COMPATABILITY);
-        moduleImplAdvertisement.setCode(code);
-        moduleImplAdvertisement.setUri(STANDARD_URI);
-        moduleImplAdvertisement.setProvider(STANDARD_PROVIDER);
-        moduleImplAdvertisement.setDescription(description);
-        return moduleImplAdvertisement;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/AwtUtils.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/AwtUtils.java
deleted file mode 100644 (file)
index 9d9171f..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 2003-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.util;
-
-
-import java.awt.Frame;
-
-
-public class AwtUtils {
-
-    // It is recommended to invoke this method at least once before
-    // making any other references to awt. This will force awt threads
-    // to always be daemon threads, thereby preserving the JVM's automatic
-    // termination model.
-
-    public static void initAsDaemon() {
-        (new Thread() {
-
-            @Override
-            public void run() {
-                try {
-                    Frame f = new Frame();
-
-                    f.dispose();
-                } catch (Throwable t) {}
-            }
-
-            public void doit() {
-                setDaemon(true);
-                setName("awt daemon initializer");
-                start();
-                try {
-                    join();
-                } catch (InterruptedException ie) {}
-            }
-        }
-        ).doit();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/ClassFactory.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/ClassFactory.java
deleted file mode 100644 (file)
index 7d6057f..0000000
+++ /dev/null
@@ -1,367 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.util;
-
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.net.URI;
-import java.net.URL;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import java.util.ResourceBundle;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URISyntaxException;
-import java.util.Arrays;
-import java.util.List;
-import java.util.MissingResourceException;
-import java.util.NoSuchElementException;
-
-import net.jxta.logging.Logging;
-
-
-/**
- * This util class provides methods needed by class construction factories.
- *
- * @see net.jxta.document.StructuredDocumentFactory
- * @see net.jxta.document.AdvertisementFactory
- * @see net.jxta.id.IDFactory
- * @see net.jxta.endpoint.WireFormatMessageFactory
- */
-public abstract class ClassFactory<K, I> {
-
-    /**
-     *  Logger
-     */
-    private static final transient Logger LOG = Logger.getLogger(ClassFactory.class.getName());
-        
-    /**
-     *  Standard constructor.
-     */
-    protected ClassFactory() {}
-
-    /**
-     *  Used by ClassFactory methods to get the mapping of keys to constructors.
-     *
-     *  @return the map containing the mappings.
-     */
-    protected abstract Map<K, I> getAssocTable();
-
-    /**
-     *  Used by ClassFactory methods to ensure that all keys used with the
-     *  mapping are of the correct type.
-     *
-     *  @return Class object of the key type.
-     */
-    protected abstract Class<K> getClassForKey();
-
-    /**
-     *  Return all of the available keys for this factory.
-     *
-     *  @return Iterator of all the available keys for this factory.
-     */
-    public Iterator<K> getAvailableKeys() {
-        return Collections.unmodifiableSet(getAssocTable().keySet()).iterator();
-    }
-
-    /**
-     *  Returns an unmodifiable Set containing all of the associations 
-     *  stored in this ClassFactory.
-     *
-     *  @return Set containing all of the available entries for this factory.
-     */
-    public Set<Map.Entry<K, I>> getEntrySet() {
-        return Collections.unmodifiableSet(getAssocTable().entrySet());
-    }
-
-    /**
-     *  Used by ClassFactory methods to ensure that all of the instance classes
-     *  which register with this factory have the correct base class
-     *
-     *  @return Class object of the "Factory" type.
-     */
-    protected abstract Class<I> getClassOfInstantiators();
-
-    /**
-     *  Given a resource bundle identifier and a property name register instance
-     *  classes. The property must be a string containing class names which must
-     *  be found on the current class path. The class names are separated by
-     *  spaces.
-     *
-     *  @param resourceName name of the resource bundle
-     *  @param propertyName name of the property.
-     *  @return boolean true if at least one instance class could be registered 
-     *  with this factory.
-     *  @exception MissingResourceException if the resource bundle or
-     *  property cannot be located.
-     */
-    protected boolean registerFromResources(String resourceName, String propertyName) throws MissingResourceException {
-        ResourceBundle jxtaRsrcs = ResourceBundle.getBundle(resourceName);
-        String fromProps = jxtaRsrcs.getString(propertyName).trim();
-
-        return registerFromString(fromProps);
-    }
-
-    /**
-     *  Register instance classes given a string containing class names which
-     *  must be found on the current class path. The class names are separated
-     *  by spaces.
-     *
-     *  @param classNamesString The class name list
-     *  @return boolean true if at least one of the instance classes could be
-     *  registered otherwise false.
-     */
-    protected boolean registerFromString(String classNamesString) {
-        boolean registeredSomething = false;
-
-        if ((null == classNamesString) || (0 == classNamesString.length())) {
-            return false;
-        }
-
-        // make sure the static initialisers for each instance class are called.
-        List<String> instanceClasses = Arrays.asList(classNamesString.split("\\s"));
-        
-        for (String eachInstanceClass : instanceClasses) {
-            try {
-                registeredSomething |= registerAssoc(eachInstanceClass);
-            } catch (Exception allElse) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failed to register \'" + eachInstanceClass + "\'", allElse);
-                }
-            }
-        }
-
-        return registeredSomething;
-    }
-
-    /**
-     * Given an provider interface name register instance classes.  The class
-     * path is searched for service provider lists as described by the JAR File
-     * specification for service providers
-     *
-     * @param interfaceName name of the implemented interface.
-     * @return boolean true if at least one instance class could be registered
-     *         with this factory.
-     */
-    protected boolean registerProviders(String interfaceName) {
-        ClassLoader loader = getClass().getClassLoader();
-        boolean registeredSomething = false;
-
-        try {
-            Enumeration<URL> providerLists = loader.getResources("META-INF/services/" + interfaceName);
-
-            while (providerLists.hasMoreElements()) {
-                try {
-                    URI providerList = providerLists.nextElement().toURI();
-
-                    registeredSomething |= registerFromFile(providerList);
-                } catch (URISyntaxException badURI) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Failed to convert service URI", badURI);
-                    }
-                }
-            }
-        } catch (IOException ex) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed to locate provider lists", ex);
-            }
-        }
-
-        return registeredSomething;
-    }
-
-    /**
-     * Register instance classes given a URI to a file containing class names
-     * which must be found on the current class path. The class names are listed
-     * on separate lines.  Comments are marked with a '#', the pound sign and
-     * any following text on any line in the file are ignored.
-     *
-     * @param providerList the URI to a file containing a list of providers
-     * @return boolean true if at least one of the instance classes could be
-     * registered otherwise false.
-     */
-    protected boolean registerFromFile(URI providerList) {
-        boolean registeredSomething = false;
-        InputStream urlStream = null;
-        
-        try {
-            urlStream = providerList.toURL().openStream();
-            BufferedReader reader = new BufferedReader(new InputStreamReader(urlStream, "UTF-8"));
-
-            String provider;
-
-            while ((provider = reader.readLine()) != null) {
-                int comment = provider.indexOf('#');
-
-                if (comment != -1) {
-                    provider = provider.substring(0, comment);
-                }
-                    
-                provider = provider.trim();
-
-                if (provider.length() > 0) {
-                    try {
-                        registeredSomething |= registerAssoc(provider);
-                    } catch (Exception allElse) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.log(Level.WARNING, "Failed to register \'" + provider + "\'", allElse);
-                        }
-                    }
-                }
-            }
-        } catch (IOException ex) {
-            LOG.log(Level.WARNING, "Failed to read provider list " + providerList, ex);
-            return false;
-        } finally {
-            if(null != urlStream) {
-                try {
-                    urlStream.close();
-                } catch(IOException ignored) {
-                    
-                }
-            }
-        }
-
-        return registeredSomething;
-    }
-
-    /**
-     *  Register a class with the factory from its class name. Since class name
-     *  doesn't tell us much, we just load the class and hope that something
-     *  happens as a result of the class loading. This class is often overridden
-     *  in class factories to interogate the instance class before registering
-     *  the instance class.
-     *
-     *  @param className The class name which will be registered.
-     *  @return boolean true if the class was registered otherwise false.
-     *  @throws Exception   when an error occurs.
-     */
-    protected boolean registerAssoc(final String className) throws Exception {
-
-        boolean registeredSomething = false;
-
-        try {
-            /*
-             * This implementation skankily assumes that the class registers 
-             * itself as part of class initialization.
-             */
-                        
-            Class ignored = Class.forName(className);
-                        
-            registeredSomething = true;
-        } catch (ClassNotFoundException ignored) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Failed to locate \'" + className + "\'");
-            }
-        } catch (NoClassDefFoundError ignored) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Failed to locate \'" + className + "\'");
-            }
-        }
-
-        return registeredSomething;
-    }
-
-    /**
-     *  Register a key and instance class with the factory.
-     *
-     *  @param key The key to register.
-     *  @param instantiator The instantiator object which will be registered for this key.
-     *  @return boolean true if the key was successfully registered otherwise false.
-     */
-    protected boolean registerAssoc(final K key, final I instantiator) {
-
-        // Check the association table to make sure this key is not already present.
-        if (null != getAssocTable().get(key)) {
-            return false;
-        }
-
-        getAssocTable().put(key, instantiator);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Factory : " + getClass().getName() + " Registered instantiator \'" + instantiator + "\' for \'" + key + "\'");
-        }
-
-        return true;
-    }
-
-    /**
-     *  Return the instantiator associated with the provided key.
-     *
-     *  @param key The identifier for the Instantiator class to be returned.
-     *  @return Instantiator Instantiator matching the provided key
-     *  @throws NoSuchElementException if the key has not been registered.
-     */
-    protected I getInstantiator(final K key) throws NoSuchElementException {
-
-        // Get the constructors for this key.
-        I instantiator = getAssocTable().get(key);
-
-        if (null == instantiator) {
-            throw new NoSuchElementException("key '" + key + "' not registered.");
-        }
-
-        return instantiator;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/CountingInputStream.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/CountingInputStream.java
deleted file mode 100644 (file)
index 41ffcd2..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.util;
-
-
-import java.io.*;
-
-
-/**
- *  A filter input stream which counts the bytes read from the stream. A filter
- *  so that you don't have to count seperately from reading from the inoput
- *
- **/
-public class CountingInputStream extends FilterInputStream {
-    
-    /**
-     *  For recursion detection to prevent overcounting.
-     **/
-    private transient boolean alreadycounting;
-    
-    /**
-     *  number of bytes which have been read on this stream
-     **/
-    private long bytesRead = 0;
-    
-    /**
-     *  Make a new Counting Input Stream
-     **/
-    public CountingInputStream(InputStream in) {
-        super(in);
-    }
-    
-    /**
-     * {@inheritDoc}
-     *
-     *  <p/>Debugging toString.
-     **/
-    @Override
-    public String toString() {
-        if (null == in) {
-            return "closed/" + super.toString();
-        } else {
-            return in.toString() + "/" + super.toString();
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     *
-     * <p/>Merely calls the super version.
-     **/
-    @Override
-    public synchronized int read() throws IOException {
-        boolean wascounting = alreadycounting;
-
-        alreadycounting = true;
-        int i = super.read();
-
-        alreadycounting = wascounting;
-        
-        if (!alreadycounting && (i != -1)) {
-            bytesRead++;
-        }
-        return i;
-    }
-    
-    /**
-     * {@inheritDoc}
-     *
-     * <p/>calls the super version of the same method.
-     **/
-    @Override
-    public synchronized int read(byte[] b, int off, int len) throws IOException {
-        boolean wascounting = alreadycounting;
-
-        alreadycounting = true;
-        
-        int i = super.read(b, off, len);
-
-        alreadycounting = wascounting;
-        
-        if ((-1 != i) && !alreadycounting) {
-            bytesRead += i;
-        }
-        
-        return i;
-    }
-    
-    /**
-     *  Returns the number of bytes read fromthe stream thus far. This and all
-     *  the methods in this class are synchronized because bytesRead cannot be
-     *  volatile.
-     *
-     *  @return long containing the number of bytes read.
-     **/
-    public synchronized long getBytesRead() {
-        return bytesRead;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/CountingOutputStream.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/CountingOutputStream.java
deleted file mode 100644 (file)
index f1b121d..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.util;
-
-
-import java.io.OutputStream;
-import java.io.IOException;
-
-
-/**
- *  A filter output stream which counts the bytes sent to the stream. A filter
- *  so that you don't have to count seperately from writing to the output
- *
- **/
-public class CountingOutputStream extends java.io.FilterOutputStream {
-    
-    /**
-     *  For recursion detection to prevent overcounting.
-     **/
-    private transient boolean alreadycounting;
-    
-    /**
-     *  number of bytes which have been written on this stream
-     **/
-    private long bytesWritten;
-    
-    /**
-     * Creates a new instance of CountingOutputStream
-     **/
-    public CountingOutputStream(OutputStream out) {
-        super(out);
-        bytesWritten = 0;
-        alreadycounting = false;
-    }
-    
-    /**
-     * {@inheritDoc}
-     *
-     *  <p/>Debugging toString.
-     **/
-    @Override
-    public String toString() {
-        if (null == out) {
-            return "closed/" + super.toString();
-        } else {
-            return out.toString() + "/" + super.toString();
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     *
-     * <p/>Merely calls the super version.
-     **/
-    @Override
-    public synchronized void write(int b) throws IOException {
-        boolean wascounting = alreadycounting;
-
-        alreadycounting = true;
-        super.write(b);
-        alreadycounting = wascounting;
-        if (!alreadycounting) {
-            bytesWritten++;
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     *
-     * <p/>calls the super version of the same method.
-     **/
-    @Override
-    public synchronized void write(byte[] b, int off, int len) throws IOException {
-        boolean wascounting = alreadycounting;
-
-        alreadycounting = true;
-        super.write(b, off, len);
-        alreadycounting = wascounting;
-        if (!alreadycounting) {
-            bytesWritten += len;
-        }
-    }
-    
-    /**
-     *  Returns the number of bytes written to the stream thus far. This and all
-     *  the methods in this class are synchronized because bytesWritten cannot be
-     *  volatile.
-     *
-     *  @return long containing the number of bytes written.
-     **/
-    public synchronized long getBytesWritten() {
-        return bytesWritten;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/CountingWriter.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/CountingWriter.java
deleted file mode 100644 (file)
index 6321ff5..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.util;
-
-
-import java.io.Writer;
-import java.io.FilterWriter;
-
-import java.io.IOException;
-
-
-/**
- *  A filter writer which counts the characters sent to the writer. A filter
- *  so that you don't have to count seperately from writing to the output.
- **/
-public class CountingWriter extends FilterWriter {
-    
-    /**
-     *  For recursion detection to prevent overcounting.
-     **/
-    private transient boolean alreadycounting;
-    
-    /**
-     *  number of chars which have been written on this stream
-     **/
-    private long charsWritten;
-    
-    /**
-     * Creates a new instance of CountingWriter
-     **/
-    public CountingWriter(Writer out) {
-        super(out);
-        charsWritten = 0;
-        alreadycounting = false;
-    }
-    
-    /**
-     * {@inheritDoc}
-     *
-     *  <p/>Debugging toString.
-     **/
-    @Override
-    public String toString() {
-        if (null == out) {
-            return "closed/" + super.toString();
-        } else {
-            return out.toString() + "/" + super.toString();
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     *
-     * <p/>Calls the super version of the same method.
-     **/
-    @Override
-    public synchronized void write(int b) throws IOException {
-        boolean wascounting = alreadycounting;
-
-        alreadycounting = true;
-        super.write(b);
-        alreadycounting = wascounting;
-        if (!alreadycounting) {
-            charsWritten++;
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     *
-     * <p/>Calls the super version of the same method.
-     **/
-    @Override
-    public synchronized void write(char[] b, int off, int len) throws IOException {
-        boolean wascounting = alreadycounting;
-
-        alreadycounting = true;
-        super.write(b, off, len);
-        alreadycounting = wascounting;
-        if (!alreadycounting) {
-            charsWritten += len;
-        }
-    }
-    
-    /**
-     *  Returns the number of chars written to the stream thus far. This and all
-     *  the methods in this class are synchronized because bytesWritten cannot be
-     *  volatile.
-     *
-     *  @return long containing the number of bytes written.
-     **/
-    public synchronized long getCharsWritten() {
-        return charsWritten;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/DevNullOutputStream.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/DevNullOutputStream.java
deleted file mode 100644 (file)
index ca927c5..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.util;
-
-
-import java.io.OutputStream;
-
-
-/**
- *  An OutputStream which simply discards all data written to it. Useful when
- *  used with CountingOutputStream.
- * 
- *  This implementation just ignores everything you do it.
- */
-public class DevNullOutputStream extends OutputStream {
-  
-    /** Creates a new instance of DevNullOutputStream */
-    public DevNullOutputStream() {}
-  
-    /**
-     *    {@inheritDoc}
-     *
-     *    <p/>Does nothing....
-     **/
-    @Override
-    public void close() {}
-  
-    /**
-     *    {@inheritDoc}
-     *
-     *    <p/>Does nothing....
-     **/
-    @Override
-    public void flush() {}
-  
-    /**
-     *    {@inheritDoc}
-     *
-     *    <p/>Does nothing....
-     **/
-    @Override
-    public void write(byte b[]) {}
-  
-    /**
-     *    {@inheritDoc}
-     *
-     *    <p/>Does nothing....
-     **/
-    @Override
-    public void write(byte b[], int offset, int len) {}
-
-    /**
-     *    {@inheritDoc}
-     *
-     *    <p/>Does nothing....
-     **/
-    @Override
-    public void write(int b) {}
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/DevNullWriter.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/DevNullWriter.java
deleted file mode 100644 (file)
index 2f94f63..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.util;
-
-
-import java.io.Writer;
-
-
-/**
- *  An Writer which simply discards all data written to it. Useful when
- *  used with CountingWriter.
- *
- *  This implementation just ignores everything you do it.
- */
-public class DevNullWriter extends Writer {
-    
-    /**
-     * Creates a new instance of DevNullOutputStream
-     **/
-    public DevNullWriter() {
-        ;
-    }
-    
-    /**
-     *    {@inheritDoc}
-     *
-     *    <p/>Does nothing....
-     **/
-    @Override
-    public void close() {}
-    
-    /**
-     *    {@inheritDoc}
-     *
-     *    <p/>Does nothing....
-     **/
-    @Override
-    public void flush() {}
-    
-    /**
-     *    {@inheritDoc}
-     *
-     *    <p/>Does nothing....
-     **/
-    @Override
-    public void write(char b[]) {}
-    
-    /**
-     *    {@inheritDoc}
-     *
-     *    <p/>Does nothing....
-     **/
-    @Override
-    public void write(char b[], int offset, int len) {}
-    
-    /**
-     *    {@inheritDoc}
-     *
-     *    <p/>Does nothing....
-     **/
-    @Override
-    public void write(String str, int offset, int len) {}
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/DocumentUtilities.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/DocumentUtilities.java
deleted file mode 100644 (file)
index effe1f6..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.util;
-
-
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredTextDocument;
-import net.jxta.exception.JxtaException;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.StringReader;
-import java.util.Enumeration;
-
-
-/**
- * @deprecated Will be removed soon.  THIS CLASS IS SCHEDULED TO BE REMOVED AFTER 2.5
- */
-@Deprecated
-public final class DocumentUtilities {
-
-    private DocumentUtilities() {}
-
-    public static StructuredTextDocument createStructuredXmlDocument(String rootTagName) throws JxtaException {
-        return (StructuredTextDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, rootTagName);
-    }
-
-    public static StructuredTextDocument getStructuredXmlDocument(String buf) throws JxtaException {
-        try {
-            return (StructuredTextDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8
-                    ,
-                    new StringReader(buf));
-        } catch (IOException e) {
-            throw new JxtaException("Error reading document", e);
-        }
-    }
-
-    public static StructuredTextDocument getStructuredXmlDocument(byte buf[]) throws JxtaException {
-        return getStructuredXmlDocument(new ByteArrayInputStream(buf));
-    }
-
-    public static StructuredTextDocument getStructuredXmlDocument(InputStream in) throws JxtaException {
-        try {
-            return (StructuredTextDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, in);
-        } catch (IOException e) {
-            throw new JxtaException("Error reading document", e);
-        }
-    }
-
-    public static StructuredDocument createParamDocument() {
-        return StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "Parm");
-    }
-
-    public static Element getChild(Element root, Object key) {
-        Enumeration e = root.getChildren(key);
-
-        if (e == null) {
-            return null;
-        }
-
-        return (Element) e.nextElement();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/IgnoreFlushFilterOutputStream.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/IgnoreFlushFilterOutputStream.java
deleted file mode 100644 (file)
index 962ff3b..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.util;
-
-
-import java.io.OutputStream;
-import java.io.IOException;
-
-
-/**
- *  A filter output stream which ignores flush requests.
- *
- **/
-public class IgnoreFlushFilterOutputStream extends java.io.FilterOutputStream {
-  
-    /** Creates a new instance of CountingOutputStream */
-    public IgnoreFlushFilterOutputStream(OutputStream out) {
-        super(out);
-    }
-  
-    @Override
-    public void flush() throws IOException {// do nothing
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/JxtaBiDiPipe.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/JxtaBiDiPipe.java
deleted file mode 100644 (file)
index c6e2d58..0000000
+++ /dev/null
@@ -1,1284 +0,0 @@
-/*
- * Copyright (c) 2006-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.util;
-
-import net.jxta.credential.Credential;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.XMLDocument;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.Messenger;
-import net.jxta.endpoint.StringMessageElement;
-import net.jxta.endpoint.TextDocumentMessageElement;
-import net.jxta.id.ID;
-import net.jxta.impl.endpoint.tcp.TcpMessenger;
-import net.jxta.impl.util.pipe.reliable.Defs;
-import net.jxta.impl.util.pipe.reliable.FixedFlowControl;
-import net.jxta.impl.util.pipe.reliable.OutgoingMsgrAdaptor;
-import net.jxta.impl.util.pipe.reliable.ReliableInputStream;
-import net.jxta.impl.util.pipe.reliable.ReliableOutputStream;
-import net.jxta.logging.Logging;
-import net.jxta.membership.MembershipService;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.pipe.InputPipe;
-import net.jxta.pipe.OutputPipe;
-import net.jxta.pipe.OutputPipeEvent;
-import net.jxta.pipe.OutputPipeListener;
-import net.jxta.pipe.PipeID;
-import net.jxta.pipe.PipeMsgEvent;
-import net.jxta.pipe.PipeMsgListener;
-import net.jxta.pipe.PipeService;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.PipeAdvertisement;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.SocketTimeoutException;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.TimeUnit;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * JxtaBiDiPipe is a pair of UnicastPipe channels that implements a bidirectional pipe.
- * By default, JxtaBiDiPipe operates in reliable mode, unless otherwise specified,
- * in addition, messages must not exceed the Endpoint MTU size of 64K, exceed the
- * MTU will lead to unexpected behavior.
- * <p/>
- * It highly recommended that an application message listener is specified, not doing so, may
- * lead to message loss in the event the internal queue is overflowed.
- * <p/>
- * Sending messages vis {@link #sendMessage(Message)} from within a 
- * {@code PipeMsgListener} may result in a deadlock due to contention
- * between the sending and receiving portions of BiDi pipes. 
- * <p/>
- * JxtaBiDiPipe, whenever possible, will attempt to utilize direct tcp messengers,
- * which leads to improved performance.
- */
-public class JxtaBiDiPipe implements PipeMsgListener, OutputPipeListener, ReliableInputStream.MsgListener {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(JxtaBiDiPipe.class.getName());
-
-    private final static int MAXRETRYTIMEOUT = 120 * 1000;
-    private PipeAdvertisement remotePipeAdv;
-    private PeerAdvertisement remotePeerAdv;
-    protected int timeout = 15 * 1000;
-    protected int retryTimeout = 60 * 1000;
-    protected int maxRetryTimeout = MAXRETRYTIMEOUT;
-    protected int windowSize = 50;
-
-    private ArrayBlockingQueue<PipeMsgEvent> queue = new ArrayBlockingQueue<PipeMsgEvent>(windowSize);
-    protected PeerGroup group;
-    protected PipeAdvertisement pipeAdv;
-    protected PipeAdvertisement myPipeAdv;
-    protected PipeService pipeSvc;
-    protected InputPipe inputPipe;
-    protected OutputPipe connectOutpipe;
-    protected Messenger msgr;
-    protected InputStream stream;
-    protected final Object closeLock = new Object();
-    protected final Object acceptLock = new Object();
-    protected final Object finalLock = new Object();
-    protected boolean closed = false;
-    protected boolean bound = false;
-    protected boolean dequeued = false;
-    protected PipeMsgListener msgListener;
-    protected PipeEventListener eventListener;
-    protected PipeStateListener stateListener;
-    protected Credential credential = null;
-    protected boolean waiting;
-
-    /**
-     * If {@code true} then we are using the underlying end-to-end ACK reliable
-     * layer to ensure that messages are received by the remote peer.
-     */
-    protected boolean isReliable = false;
-
-    protected ReliableInputStream ris = null;
-    protected ReliableOutputStream ros = null;
-
-    /**
-     * If {@code true} then we are using a reliable direct messenger to the
-     * remote peer. We will assume that messages which are sent successfully
-     * will be received successfully.
-     */
-    protected volatile boolean direct = false;
-    protected OutgoingMsgrAdaptor outgoing = null;
-    protected StructuredDocument credentialDoc = null;
-
-    /**
-     * Pipe close Event
-     */
-    public static final int PIPE_CLOSED_EVENT = 1;
-
-    /**
-     * Creates a bidirectional pipe
-     *
-     * @param group      group context
-     * @param msgr       lightweight output pipe
-     * @param pipe       PipeAdvertisement
-     * @param isReliable Whether the connection is reliable or not
-     * @param credDoc    Credential StructuredDocument
-     * @param direct     indicates a direct messenger pipe
-     * @throws IOException if an io error occurs
-     */
-    protected JxtaBiDiPipe(PeerGroup group, Messenger msgr, PipeAdvertisement pipe, StructuredDocument credDoc, boolean isReliable, boolean direct) throws IOException {
-        if (msgr == null) {
-            throw new IOException("Null Messenger");
-        }
-        this.direct = direct;
-        this.group = group;
-        this.pipeAdv = pipe;
-        this.credentialDoc = credDoc != null ? credDoc : getCredDoc(group);
-        this.pipeSvc = group.getPipeService();
-        this.inputPipe = pipeSvc.createInputPipe(pipe, this);
-        this.msgr = msgr;
-        this.isReliable = isReliable;
-        if (!direct) {
-            createRLib();
-        }
-        setBound();
-    }
-
-    /**
-     * Creates a new object with a default timeout of #timeout, and no reliability.
-     *
-     */
-    public JxtaBiDiPipe() {
-    }
-
-    /**
-     * Creates a bidirectional pipe.
-     *
-     * Attempts to create a bidirectional connection to remote peer within default
-     * timeout of #timeout.
-     *
-     * @param group       group context
-     * @param pipeAd      PipeAdvertisement
-     * @param msgListener application PipeMsgListener
-     * @throws IOException if an io error occurs
-     */
-    public JxtaBiDiPipe(PeerGroup group, PipeAdvertisement pipeAd, PipeMsgListener msgListener) throws IOException {
-        connect(group, null, pipeAd, timeout, msgListener);
-    }
-
-    /**
-     * Creates a bidirectional pipe.
-     *
-     * Attempts to create a bidirectional connection to remote peer within specified
-     * timeout of #timeout.
-     *
-     * @param group       group context
-     * @param timeout     The number of milliseconds within which the JxtaBiDiPipe must
-     *                    be successfully created. An exception will be thrown if the pipe
-     *                    cannot be created in the alotted time. A timeout value of {@code 0}
-     *                    (zero) specifies an infinite timeout.
-     * @param pipeAd      PipeAdvertisement
-     * @param msgListener application PipeMsgListener
-     * @throws IOException if an io error occurs
-     */
-    public JxtaBiDiPipe(PeerGroup group, PipeAdvertisement pipeAd, int timeout, PipeMsgListener msgListener) throws IOException {
-        connect(group, null, pipeAd, timeout, msgListener);
-    }
-
-    /**
-     * attempts to create a bidirectional connection to remote peer
-     *
-     * @param group       group context
-     * @param pipeAd      PipeAdvertisement
-     * @param timeout     The number of milliseconds within which the JxtaBiDiPipe must
-     *                    be successfully created. An exception will be thrown if the pipe
-     *                    cannot be created in the allotted time. A timeout value of {@code 0}
-     *                    (zero) specifies an infinite timeout.
-     * @param msgListener application PipeMsgListener
-     * @param reliable    if true, the reliability is assumed
-     * @throws IOException if an io error occurs
-     */
-    public JxtaBiDiPipe(PeerGroup group, PipeAdvertisement pipeAd, int timeout, PipeMsgListener msgListener, boolean reliable) throws IOException {
-        connect(group, null, pipeAd, timeout, msgListener, reliable);
-    }
-
-    /**
-     * Connect to a JxtaServerPipe with default timeout
-     *
-     * @param group  group context
-     * @param pipeAd PipeAdvertisement
-     * @throws IOException if an io error occurs
-     */
-    public void connect(PeerGroup group, PipeAdvertisement pipeAd) throws IOException {
-        connect(group, pipeAd, timeout);
-    }
-
-    /**
-     * Connects to a remote JxtaBiDiPipe
-     *
-     * @param group   group context
-     * @param pipeAd  PipeAdvertisement
-     * @param timeout timeout in ms, also reset object default timeout
-     *                to that of timeout
-     * @throws IOException if an io error occurs
-     */
-    public void connect(PeerGroup group, PipeAdvertisement pipeAd, int timeout) throws IOException {
-        connect(group, null, pipeAd, timeout, null);
-    }
-
-    /**
-     * Connects to a remote JxtaServerPipe
-     *
-     * @param group       group context
-     * @param peerid      peer to connect to
-     * @param pipeAd      PipeAdvertisement
-     * @param timeout     timeout in ms, also reset object default timeout to that of timeout
-     * @param msgListener application PipeMsgListener
-     * @throws IOException if an io error occurs
-     */
-    public void connect(PeerGroup group, PeerID peerid, PipeAdvertisement pipeAd, int timeout, PipeMsgListener msgListener) throws IOException {
-        connect(group, peerid, pipeAd, timeout, msgListener, isReliable);
-    }
-
-    /**
-     * Connects to a remote JxtaServerPipe
-     *
-     * @param group       group context
-     * @param peerid      peer to connect to
-     * @param pipeAd      PipeAdvertisement
-     * @param timeout     timeout in ms, also reset object default timeout to that of timeout
-     * @param msgListener application PipeMsgListener
-     * @param reliable    Reliable connection
-     * @throws IOException if an io error occurs
-     */
-    public void connect(PeerGroup group, PeerID peerid, PipeAdvertisement pipeAd, int timeout, PipeMsgListener msgListener, boolean reliable) throws IOException {
-        if (isBound()) {
-            throw new IOException("Pipe already bound");
-        }
-        if (timeout <= 0) {
-            throw new IllegalArgumentException("Invalid timeout :" + timeout);
-        }
-
-        this.pipeAdv = pipeAd;
-        this.group = group;
-        this.msgListener = msgListener;
-        if (msgListener != null) {
-            dequeued = true;
-        }
-        this.isReliable = reliable;
-        pipeSvc = group.getPipeService();
-        this.timeout = timeout;
-        myPipeAdv = JxtaServerPipe.newInputPipe(group, pipeAd);
-        this.inputPipe = pipeSvc.createInputPipe(myPipeAdv, this);
-        this.credentialDoc = credentialDoc != null ? credentialDoc : getCredDoc(group);
-        Message openMsg = createOpenMessage(group, myPipeAdv);
-
-        // create the output pipe and send this message
-        if (peerid == null) {
-            pipeSvc.createOutputPipe(pipeAd, this);
-        } else {
-            pipeSvc.createOutputPipe(pipeAd, Collections.singleton(peerid), this);
-        }
-        try {
-            synchronized (acceptLock) {
-                // check connectOutpipe within lock to prevent a race with modification.
-                if (connectOutpipe == null) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Waiting for " + timeout + " msec");
-                    }
-                    acceptLock.wait(timeout);
-                }
-            }
-        } catch (InterruptedException ie) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Interrupted", ie);
-            }
-            Thread.interrupted();
-            IOException exp = new IOException("Interrupted");
-            exp.initCause(ie);
-            throw exp;
-        }
-        if (connectOutpipe == null) {
-            throw new IOException("connection timeout");
-        }
-        // send connect message
-        waiting = true;
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Sending a backchannel message");
-        }
-        connectOutpipe.send(openMsg);
-        // wait for the second op
-        try {
-            synchronized (finalLock) {
-                if (waiting) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Waiting for " + timeout + " msec for back channel to be established");
-                    }
-                    finalLock.wait(timeout);
-                    // Need to check for creation
-                    if (msgr == null) {
-                        throw new IOException("connection timeout");
-                    }
-                }
-            }
-        } catch (InterruptedException ie) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Interrupted", ie);
-            }
-            Thread.interrupted();
-            IOException exp = new IOException("Interrupted");
-            exp.initCause(ie);
-            throw exp;
-        }
-        setBound();
-        notifyListeners(PipeStateListener.PIPE_OPENED_EVENT);
-    }
-
-    /**
-     * creates all the reliability objects
-     */
-    private void createRLib() {
-        if (isReliable) {
-            if (outgoing == null) {
-                outgoing = new OutgoingMsgrAdaptor(msgr, retryTimeout);
-            }
-            if (ros == null) {
-                ros = new ReliableOutputStream(outgoing, new FixedFlowControl(windowSize));
-            }
-            if (ris == null) {
-                ris = new ReliableInputStream(outgoing, retryTimeout, this);
-            }
-        }
-    }
-
-    /**
-     * Toggles reliability
-     *
-     * @param reliable Toggles reliability to reliable
-     * @throws IOException if pipe is bound
-     */
-    public void setReliable(boolean reliable) throws IOException {
-        if (isBound()) {
-            throw new IOException("Can not set reliability after pipe is bound");
-        }
-        this.isReliable = reliable;
-    }
-
-    /**
-     * Obtain the cred doc from the group object.
-     *
-     * @param group group context
-     * @return The credDoc value
-     */
-    protected static StructuredDocument getCredDoc(PeerGroup group) {
-        try {
-            MembershipService membership = group.getMembershipService();
-            Credential credential = membership.getDefaultCredential();
-
-            if (credential != null) {
-                return credential.getDocument(MimeMediaType.XMLUTF8);
-            }
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "failed to get credential", e);
-            }
-        }
-        return null;
-    }
-
-    /**
-     * get the remote credential doc
-     *
-     * @return Credential StructuredDocument
-     */
-    public StructuredDocument getCredentialDoc() {
-        return credentialDoc;
-    }
-
-    /**
-     * Sets the connection credential doc.
-     * If no credentials are set, the default group credential are used.
-     *
-     * @param doc Credential StructuredDocument
-     */
-    public void setCredentialDoc(StructuredDocument doc) {
-        this.credentialDoc = doc;
-    }
-
-    /**
-     * Creates a connection request message
-     *
-     * @param group  group context
-     * @param pipeAd pipe advertisement
-     * @return the Message  object
-     * @throws IOException if an io error occurs
-     */
-    protected Message createOpenMessage(PeerGroup group, PipeAdvertisement pipeAd) throws IOException {
-        Message msg = new Message();
-        PeerAdvertisement peerAdv = group.getPeerAdvertisement();
-
-        if (credentialDoc == null) {
-            credentialDoc = getCredDoc(group);
-        }
-        if (credentialDoc == null && pipeAd.getType().equals(PipeService.UnicastSecureType)) {
-            throw new IOException("No credentials established to initiate a secure connection");
-        }
-        try {
-            if (credentialDoc != null) {
-                msg.addMessageElement(JxtaServerPipe.nameSpace,
-                        new TextDocumentMessageElement(JxtaServerPipe.credTag, (XMLDocument) credentialDoc, null));
-            }
-            msg.addMessageElement(JxtaServerPipe.nameSpace,
-                    new TextDocumentMessageElement(JxtaServerPipe.reqPipeTag,
-                            (XMLDocument) pipeAd.getDocument(MimeMediaType.XMLUTF8), null));
-
-            msg.addMessageElement(JxtaServerPipe.nameSpace,
-                    new StringMessageElement(JxtaServerPipe.reliableTag, Boolean.toString(isReliable), null));
-
-            msg.addMessageElement(JxtaServerPipe.nameSpace,
-                    new StringMessageElement(JxtaServerPipe.directSupportedTag, Boolean.toString(true), null));
-
-            msg.addMessageElement(JxtaServerPipe.nameSpace,
-                    new TextDocumentMessageElement(JxtaServerPipe.remPeerTag,
-                            (XMLDocument) peerAdv.getDocument(MimeMediaType.XMLUTF8), null));
-            return msg;
-        } catch (Throwable t) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "error getting element stream", t);
-            }
-            return null;
-        }
-    }
-
-    /**
-     * Sets the bound attribute of the JxtaServerPipe object
-     */
-    void setBound() {
-        bound = true;
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Pipe Bound :true");
-        }
-    }
-
-    /**
-     * Returns the binding state of the JxtaServerPipe.
-     *
-     * @return true if the ServerSocket successfully bound to an address
-     */
-    public boolean isBound() {
-        return bound;
-    }
-
-    /**
-     * Returns an input stream for this socket.
-     *
-     * @return a stream for reading from this socket.
-     * @throws IOException if an I/O error occurs when creating the
-     *                     input stream.
-     */
-    public InputPipe getInputPipe() throws IOException {
-        return inputPipe;
-    }
-
-    /**
-     * Returns remote PeerAdvertisement
-     *
-     * @return remote PeerAdvertisement
-     */
-    public PeerAdvertisement getRemotePeerAdvertisement() {
-        return remotePeerAdv;
-    }
-
-    /**
-     * Returns remote PipeAdvertisement
-     *
-     * @return remote PipeAdvertisement
-     */
-    public PipeAdvertisement getRemotePipeAdvertisement() {
-        return remotePipeAdv;
-    }
-
-    /**
-     * Sets the remote PeerAdvertisement
-     *
-     * @param peer Remote PeerAdvertisement
-     */
-    protected void setRemotePeerAdvertisement(PeerAdvertisement peer) {
-        this.remotePeerAdv = peer;
-    }
-
-    /**
-     * Sets the remote PipeAdvertisement
-     *
-     * @param pipe PipeAdvertisement
-     */
-    protected void setRemotePipeAdvertisement(PipeAdvertisement pipe) {
-        this.remotePipeAdv = pipe;
-    }
-
-    /**
-     * Closes this pipe.
-     *
-     * @throws IOException if an I/O error occurs when closing this
-     *                     socket.
-     */
-    public void close() throws IOException {
-        sendClose();
-        closePipe(false);
-        bound = false;
-    }
-
-    protected void closePipe(boolean fastClose) throws IOException {
-        // close both pipes
-        synchronized (closeLock) {
-            if (closed) {
-                return;
-            }
-            closed = true;
-            bound = false;
-        }
-
-        if (!fastClose && isReliable && !direct) {
-            /*
-             *  This implements linger!
-             */
-            long quitAt = System.currentTimeMillis() + timeout;
-            while (true) {
-                //FIXME hamada this does not loop
-                if (ros == null || ros.getMaxAck() == ros.getSeqNumber()) {
-                    // Nothing to worry about.
-                    break;
-                }
-
-                // By default wait forever.
-                long left = 0;
-
-                // If timeout is not zero. Then compute the waiting time
-                // left.
-                if (timeout != 0) {
-                    left = quitAt - System.currentTimeMillis();
-                    if (left < 0) {
-                        // Too late
-                        sendClose();
-                        throw new IOException("Close timeout");
-                    }
-                }
-
-                try {
-                    if (!ros.isQueueEmpty()) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Waiting for Output stream queue event");
-                        }
-                        ros.waitQueueEvent(left);
-                    }
-                    break;
-                } catch (InterruptedException ie) {
-                    // give up, then.
-                    throw new IOException("Close interrupted");
-                }
-            }
-
-            // We are initiating the close. We do not want to receive
-            // anything more. So we can close the ris right away.
-            ris.close();
-        }
-
-        if (isReliable && ros != null) {
-            ros.close();
-        }
-
-        // close the pipe
-        inputPipe.close();
-        msgr.close();
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Pipe close complete");
-        }
-        notifyListeners(PIPE_CLOSED_EVENT);
-    }
-
-    private void notifyListeners(int event) {
-        try {
-            if (eventListener != null) {
-                eventListener.pipeEvent(event);
-            } else if (stateListener != null) {
-                stateListener.stateEvent(this, event);
-            }
-        } catch (Throwable th) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "error during pipe event callback", th);
-            }
-        }
-    }
-
-    /**
-     * Sets the inputPipe attribute of the JxtaBiDiPipe object
-     *
-     * @param inputPipe The new inputPipe value
-     */
-    protected void setInputPipe(InputPipe inputPipe) {
-        this.inputPipe = inputPipe;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void pipeMsgEvent(PipeMsgEvent event) {
-        Message message = event.getMessage();
-        if (message == null) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Empty event");
-            }
-            return;
-        }
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Pipe message arrived");
-        }
-
-        MessageElement element;
-        if (!bound) {
-            // look for a remote pipe answer
-            element = message.getMessageElement(JxtaServerPipe.nameSpace, JxtaServerPipe.remPipeTag);
-            if (element != null) {
-                // connect response
-                try {
-                    XMLDocument CredDoc = null;
-                    XMLDocument remotePipeDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(element);
-
-                    remotePipeAdv = (PipeAdvertisement) AdvertisementFactory.newAdvertisement(remotePipeDoc);
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Recevied a pipe Advertisement :" + remotePipeAdv.getName());
-                    }
-
-                    element = message.getMessageElement(JxtaServerPipe.nameSpace, JxtaServerPipe.remPeerTag);
-                    if (element != null) {
-                        XMLDocument remotePeerDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(element);
-
-                        remotePeerAdv = (PeerAdvertisement) AdvertisementFactory.newAdvertisement(remotePeerDoc);
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Recevied an Peer Advertisement :" + remotePeerAdv.getName());
-                        }
-                    } else {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.warning(" BAD connect response");
-                        }
-                        return;
-                    }
-
-                    element = message.getMessageElement(JxtaServerPipe.nameSpace, JxtaServerPipe.credTag);
-                    if (element != null) {
-                        CredDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(element);
-                    }
-                    if (pipeAdv.getType().equals(PipeService.UnicastSecureType) && (CredDoc == null || !checkCred(CredDoc))) {
-                        // we're done here
-                        if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                            LOG.severe("Missing remote credential doc");
-                        }
-                        return;
-                    }
-
-                    element = message.getMessageElement(JxtaServerPipe.nameSpace, JxtaServerPipe.reliableTag);
-                    if (element != null) {
-                        isReliable = Boolean.valueOf(element.toString());
-                    }
-
-                    boolean directSupported = false;
-                    element = message.getMessageElement(JxtaServerPipe.nameSpace, JxtaServerPipe.directSupportedTag);
-                    if (element != null) {
-                        directSupported = Boolean.valueOf(element.toString());
-                    }
-
-                    if (directSupported) {
-                        msgr = getDirectMessenger(group, remotePipeAdv, remotePeerAdv);
-                        if (msgr != null) {
-                            this.direct = true;
-                        } else {
-                            msgr = lightweightOutputPipe(group, remotePipeAdv, remotePeerAdv);
-                        }
-                    } else {
-                        msgr = lightweightOutputPipe(group, remotePipeAdv, remotePeerAdv);
-                    }
-
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Reliability set to :" + isReliable);
-                    }
-                    if (isReliable && !direct) {
-                        createRLib();
-                    }
-                    synchronized (finalLock) {
-                        waiting = false;
-                        finalLock.notifyAll();
-                    }
-                } catch (IOException e) {
-                    if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                        LOG.log(Level.SEVERE, "failed to process response message", e);
-                    }
-                }
-                return;
-            }
-        }
-
-        if (isReliable && !direct) {
-            // let reliabilty deal with the message
-            receiveMessage(message);
-            return;
-        }
-        if (!hasClose(message)) {
-            push(event);
-        }
-    }
-
-    private boolean hasClose(Message message) {
-        // look for close request
-        MessageElement element = message.getMessageElement(JxtaServerPipe.nameSpace, JxtaServerPipe.closeTag);
-        if (element != null) {
-            try {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Recevied a pipe close request, closing pipes");
-                }
-                if (ros != null) {
-                    ros.hardClose();
-                }
-                closePipe(false);
-            } catch (IOException ie) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "failed during close", ie);
-                }
-            }
-            return true;
-        }
-        return false;
-    }
-
-    private void receiveMessage(Message message) {
-        Iterator<MessageElement> i = message.getMessageElements(Defs.NAMESPACE, Defs.MIME_TYPE_ACK);
-
-        if (i.hasNext()) {
-            if (ros != null) {
-                ros.recv(message);
-            }
-            return;
-        }
-
-        i = message.getMessageElements(Defs.NAMESPACE, Defs.MIME_TYPE_BLOCK);
-        if (i.hasNext()) {
-
-            // It can happen that we receive messages for the input stream
-            // while we have not finished creating it.
-            try {
-                synchronized (finalLock) {
-                    while (waiting) {
-                        finalLock.wait(timeout);
-                    }
-                }
-            } catch (InterruptedException ie) {// ignored
-            }
-
-            if (ris != null) {
-                ris.recv(message);
-            }
-        }
-    }
-
-    /**
-     * Gets the Maximum Retry Timeout of the reliability layer
-     *
-     * @return The maximum retry Timeout value
-     */
-    public synchronized int getMaxRetryTimeout() {
-        return maxRetryTimeout;
-    }
-
-    /**
-     * Gets the Maximum Retry Timeout of the reliability layer
-     *
-     * @param maxRetryTimeout The new maximum retry timeout value
-     * @throws IllegalArgumentException if maxRetryTimeout exceeds jxta platform maximum retry timeout
-     */
-    public synchronized void setMaxRetryTimeout(int maxRetryTimeout) {
-        if (maxRetryTimeout <= 0 || maxRetryTimeout > MAXRETRYTIMEOUT) {
-            throw new IllegalArgumentException(
-                    "Invalid Maximum retry timeout :" + maxRetryTimeout + " Exceed Global maximum retry timeout :"
-                            + MAXRETRYTIMEOUT);
-        }
-        this.maxRetryTimeout = maxRetryTimeout;
-    }
-
-    /**
-     * Gets the Retry Timeout of the reliability layer
-     *
-     * @return The retry Timeout value
-     */
-    public synchronized int getRetryTimeout() {
-        return retryTimeout;
-    }
-
-    /**
-     * Sets the Retry Timeout of the underlying reliability layer
-     * .
-     * In reliable mode it is possible for this call to block
-     * trying to obtain a lock on reliable input stream
-     *
-     * @param retryTimeout The new retry timeout value
-     * @throws IOException if an I/O error occurs
-     */
-    public synchronized void setRetryTimeout(int retryTimeout) throws IOException {
-        if (timeout <= 0) {
-            throw new IllegalArgumentException("Invalid Socket timeout :" + retryTimeout);
-        }
-        this.retryTimeout = retryTimeout;
-        if (outgoing != null) {
-            outgoing.setTimeout(retryTimeout);
-        }
-    }
-
-    /**
-     * When in reliable mode, gets the Reliable library window size
-     *
-     * @return The windowSize value
-     */
-    public synchronized int getWindowSize() {
-        return windowSize;
-    }
-
-    /**
-     * When in reliable mode, sets the Reliable library window size
-     *
-     * @param windowSize The new window size value
-     * @throws IOException if an I/O error occurs
-     */
-    public synchronized void setWindowSize(int windowSize) throws IOException {
-        if (isBound()) {
-            throw new IOException("Socket bound. Can not change the window size");
-        }
-        this.windowSize = windowSize;
-    }
-
-    /**
-     * This method is invoked by the Reliablity library for each incoming data message
-     *
-     * @param message Incoming message
-     */
-    public void processIncomingMessage(Message message) {
-        if (!hasClose(message)) {
-            PipeMsgEvent event = new PipeMsgEvent(this, message, (PipeID) inputPipe.getPipeID());
-            push(event);
-        }
-    }
-
-    private void push(PipeMsgEvent event) {
-        if (msgListener == null) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("push message onto queue");
-            }
-            queue.offer(event);
-        } else {
-            dequeue();
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("calling message listener");
-            }
-            msgListener.pipeMsgEvent(event);
-        }
-
-    }
-
-    /**
-     * Send a message
-     * <p/>
-     * <code>Messenger</code>
-     *
-     * @param msg Message to send to the remote side
-     * @return true if message was successfully enqueued
-     * @throws IOException if the underlying messenger breaks, either due to
-     *                     a physical address change, reliability issue.
-     * @see net.jxta.endpoint.Message
-     */
-    public boolean sendMessage(Message msg) throws IOException {
-        if (isReliable && !direct) {
-            int seqn = ros.send(msg);
-            return (seqn > 0);
-        } else {
-            try {
-                if (msgr instanceof TcpMessenger) {
-                    ((TcpMessenger) msgr).sendMessageDirect(msg, null, null, true);
-                    return true;
-                } else {
-                    return msgr.sendMessage(msg, null, null);
-                }
-            } catch (SocketTimeoutException io) {
-                if (msgr instanceof TcpMessenger) {
-                    ((TcpMessenger) msgr).sendMessageDirect(msg, null, null, true);
-                    return true;
-                } else {
-                    return msgr.sendMessage(msg, null, null);
-                }
-            } catch (IOException io) {
-                closePipe(true);
-                IOException exp = new IOException("IO error occured during sendMessage()");
-                exp.initCause(io);
-                throw exp;
-
-            }
-        }
-    }
-
-    private void dequeue() {
-        if (!dequeued && (null != msgListener)) {
-            while (queue != null && !queue.isEmpty()) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("dequeing messages onto message listener");
-                }
-                try {
-                    msgListener.pipeMsgEvent(queue.take());
-                } catch (InterruptedException e) {
-                    //ignored
-                }
-            }
-            dequeued = false;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void outputPipeEvent(OutputPipeEvent event) {
-        OutputPipe op = event.getOutputPipe();
-
-        if (op.getAdvertisement() == null) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("The output pipe has no internal pipe advertisement. Continueing anyway.");
-            }
-        }
-        if (op.getAdvertisement() == null || pipeAdv.equals(op.getAdvertisement())) {
-            synchronized (acceptLock) {
-                // modify op within lock to prevent a race with the if.
-                if (connectOutpipe == null) {
-                    connectOutpipe = op;
-                    // set to null to avoid closure
-                    op = null;
-                }
-                acceptLock.notifyAll();
-            }
-            // Ooops one too many, we were too fast re-trying.
-            if (op != null) {
-                op.close();
-            }
-
-        } else {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Unexpected OutputPipe :" + op);
-            }
-        }
-    }
-
-    /**
-     * A lightweight direct messenger output pipe constructor, note the return type
-     * Since all the info needed is available, there's no need for to
-     * use the pipe service to resolve the pipe we have all we need
-     * to construct a messenger.
-     *
-     * @param group   group context
-     * @param pipeAdv Remote Pipe Advertisement
-     * @param peer    Remote Peer advertisement
-     * @return Messenger
-     */
-    protected static Messenger getDirectMessenger(PeerGroup group, PipeAdvertisement pipeAdv, PeerAdvertisement peer) {
-        // Get an endpoint messenger to that address
-        if (pipeAdv.getType().equals(PipeService.PropagateType)) {
-            throw new IllegalArgumentException("Invalid pipe type " + pipeAdv.getType());
-        }
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Creating a Direct Messenger");
-        }
-
-        if (pipeAdv.getType().equals(PipeService.UnicastType)) {
-            EndpointService endpoint = group.getEndpointService();
-            EndpointAddress pipeEndpoint = new EndpointAddress("jxta",
-                                                       (peer.getPeerID().getUniqueValue()).toString(),
-                                                       "PipeService",
-                                                       pipeAdv.getPipeID().toString());
-            return endpoint.getDirectMessenger(pipeEndpoint, peer, true);
-        }
-        return null;
-    }
-
-    /**
-     * A lightweight output pipe constructor, note the return type
-     * Since all the info needed is available, there's no need for to
-     * use the pipe service to resolve the pipe we have all we need
-     * to construct a messenger.
-     *
-     * @param group   group context
-     * @param pipeAdv Remote Pipe Advertisement
-     * @param peer    Remote Peer advertisement
-     * @return Messenger
-     */
-    protected static Messenger lightweightOutputPipe(PeerGroup group, PipeAdvertisement pipeAdv, PeerAdvertisement peer) {
-
-        EndpointService endpoint = group.getEndpointService();
-        ID opId = pipeAdv.getPipeID();
-        String destPeer = (peer.getPeerID().getUniqueValue()).toString();
-
-        // Get an endpoint messenger to that address
-        EndpointAddress addr;
-        if (pipeAdv.getType().equals(PipeService.UnicastType)) {
-            addr = new EndpointAddress("jxta", destPeer, "PipeService", opId.toString());
-        } else if (pipeAdv.getType().equals(PipeService.UnicastSecureType)) {
-            addr = new EndpointAddress("jxtatls", destPeer, "PipeService", opId.toString());
-        } else {
-            // not a supported type
-            return null;
-        }
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Creating a lightweightOutputPipe()");
-        }
-        return endpoint.getMessenger(addr);
-    }
-
-    /**
-     * Not implemented yet
-     *
-     * @param cred the credential document
-     * @return always returns true
-     */
-    protected boolean checkCred(StructuredDocument cred) {
-        // FIXME need to check credentials
-        return true;
-    }
-
-    /**
-     * Send a close message to the remote side
-     */
-    private void sendClose() {
-        if (!direct && isReliable && ros.isClosed()) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("ReliableOutputStream is already closed. Skipping close message");
-            }
-            return;
-        }
-
-        Message msg = new Message();
-        msg.addMessageElement(JxtaServerPipe.nameSpace, new StringMessageElement(JxtaServerPipe.closeTag, "close", null));
-        try {
-            sendMessage(msg);
-            // ros will not take any new message, now.
-            if (!direct && ros != null) {
-                ros.close();
-            }
-        } catch (IOException ie) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.SEVERE, "failed during close", ie);
-            }
-        }
-    }
-
-    /**
-     * Returns the message listener for this pipe
-     *
-     * @return PipeMsgListener
-     * @deprecated use getMessageListener instead
-     */
-    @Deprecated
-    public PipeMsgListener getListener() {
-        return getMessageListener();
-    }
-
-    /**
-     * Returns the message listener for this pipe
-     *
-     * @return PipeMsgListener
-     */
-    public PipeMsgListener getMessageListener() {
-        return msgListener;
-    }
-
-    /**
-     * Sets message listener for a pipe spawned by the JxtaServerPipe.
-     * There is a window where a message could arrive prior to listener being
-     * registered therefore a message queue is created to queue messages, once
-     * a listener is registered these messages will be dequeued by calling the
-     * listener until the queue is empty
-     *
-     * @param msgListener New value of property listener.
-     * @deprecated use setMessageListener instead
-     */
-    @Deprecated
-    public void setListener(PipeMsgListener msgListener) {
-        setMessageListener(msgListener);
-    }
-
-    /**
-     * Sets message listener for a pipe spawned by the JxtaServerPipe.
-     * There is a window where a message could arrive prior to listener being
-     * registered therefore a message queue is created to queue messages, once
-     * a listener is registered these messages will be dequeued by calling the
-     * listener until the queue is empty.
-     * <p/>
-     * Sending messages vis {@link #sendMessage(Message)} from within a 
-     * {@code PipeMsgListener} may result in a deadlock due to contention
-     * between the sending and receiving portions of BiDi pipes. 
-     *
-     * @param msgListener New value of property listener.
-     */
-    public void setMessageListener(PipeMsgListener msgListener) {
-        this.msgListener = msgListener;
-        // if there are messages enqueued then dequeue them onto the msgListener
-        dequeue();
-    }
-
-    /**
-     * Sets a Pipe event listener, set listener to null to unset the listener
-     *
-     * @param eventListener New value of property listener.
-     * @deprecated use setPipeEventListener instead
-     */
-    @Deprecated
-    public void setListener(PipeEventListener eventListener) {
-        setPipeEventListener(eventListener);
-    }
-
-    /**
-     * Sets a Pipe event listener, set listener to null to unset the listener
-     *
-     * @param eventListener New value of property listener.
-     */
-    public void setPipeEventListener(PipeEventListener eventListener) {
-        this.eventListener = eventListener;
-    }
-
-    /**
-     * Returns the Pipe event listener for this pipe
-     *
-     * @return PipeMsgListener
-     */
-    public PipeEventListener getPipeEventListener() {
-        return eventListener;
-    }
-
-    /**
-     * Sets a Pipe state listener, set listener to null to unset the listener
-     *
-     * @param stateListener New value of property listener.
-     */
-    public void setPipeStateListener(PipeStateListener stateListener) {
-        this.stateListener = stateListener;
-    }
-
-    /**
-     * Returns the Pipe state listener for this pipe
-     *
-     * @return PipeMsgListener
-     */
-    public PipeStateListener getPipeStateListener() {
-        return stateListener;
-    }
-
-    /**
-     * Gets a message from the queue. If no Object is immediately available,
-     * then wait the specified amount of time for a message to be inserted.
-     *
-     * @param timeout Amount of time to wait in milliseconds for an object to
-     *                be available. Per Java convention, a timeout of zero (0) means wait an
-     *                infinite amount of time. Negative values mean do not wait at all.
-     * @return The next message in the queue. if a listener is registered calls
-     *         to this method will return null
-     * @throws InterruptedException if the operation is interrupted before
-     *                              the timeout interval is completed.
-     */
-    public Message getMessage(int timeout) throws InterruptedException {
-        if (queue == null || msgListener != null) {
-            return null;
-        } else {
-            PipeMsgEvent ev = queue.poll(timeout, TimeUnit.MILLISECONDS);
-            if (ev != null) {
-                return ev.getMessage();
-            } else {
-                return null;
-            }
-        }
-    }
-
-    /**
-     * Returns the Assigned PipeAdvertisement
-     *
-     * @return the Assigned PipeAdvertisement
-     */
-    public PipeAdvertisement getPipeAdvertisement() {
-        return pipeAdv;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Closes the JxtaBiDiPipe.
-     */
-    @Override
-    protected synchronized void finalize() throws Throwable {
-        if (!closed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("JxtaBiDiPipe is being finalized without being previously closed. This is likely a users bug.");
-            }
-            close();
-        }
-        super.finalize();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/JxtaServerPipe.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/JxtaServerPipe.java
deleted file mode 100644 (file)
index 95c2ad7..0000000
+++ /dev/null
@@ -1,549 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.util;
-
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.XMLDocument;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.Messenger;
-import net.jxta.endpoint.StringMessageElement;
-import net.jxta.endpoint.TextDocumentMessageElement;
-import net.jxta.id.IDFactory;
-import net.jxta.impl.endpoint.tcp.TcpMessenger;
-import net.jxta.logging.Logging;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.pipe.InputPipe;
-import net.jxta.pipe.PipeMsgEvent;
-import net.jxta.pipe.PipeMsgListener;
-import net.jxta.pipe.PipeService;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.PipeAdvertisement;
-
-import java.io.IOException;
-import java.net.SocketException;
-import java.net.SocketTimeoutException;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * The server side of a JxtaBiDiPipe. The intent of this object is accept connection requests.
- * JxtaServerPipe follows the same pattern as java.net.ServerSocket, without it no connection can be
- * established.
- *
- */
-public class JxtaServerPipe implements PipeMsgListener {
-
-    private static final Logger LOG = Logger.getLogger(JxtaServerPipe.class.getName());
-    protected static final String nameSpace = "JXTABIP";
-    protected static final String credTag = "Cred";
-    protected static final String reqPipeTag = "reqPipe";
-    protected static final String remPeerTag = "remPeer";
-    protected static final String remPipeTag = "remPipe";
-    protected static final String closeTag = "close";
-    protected static final String reliableTag = "reliable";
-    protected static final String directSupportedTag = "direct";
-    private PeerGroup group;
-    private InputPipe serverPipe;
-    private PipeAdvertisement pipeadv;
-    private int backlog = 50;
-    private long timeout = 30 * 1000L;
-    private final Object closeLock = new Object();
-    protected BlockingQueue<JxtaBiDiPipe> connectionQueue = null;
-    private boolean bound = false;
-    private boolean closed = false;
-    protected StructuredDocument myCredentialDoc = null;
-    /**
-     * The exceutor service.
-     */
-    private final ExecutorService executor;
-
-    /**
-     * Default constructor for the JxtaServerPipe
-     * <p/>
-     * backlog default of 50
-     * <p> call to accept() for this ServerPipe will
-     * block for only this amount of time. If the timeout expires,
-     * a java.net.SocketTimeoutException is raised, though the ServerPipe is still valid.
-     * <p/>
-     *
-     * @param group   JXTA PeerGroup
-     * @param pipeadv PipeAdvertisement on which pipe requests are accepted
-     * @throws IOException if an I/O error occurs
-     */
-    public JxtaServerPipe(PeerGroup group, PipeAdvertisement pipeadv) throws IOException {
-        this(group, pipeadv, 50);
-    }
-
-    /**
-     * Constructor for the JxtaServerPipe
-     *
-     * @param group   JXTA PeerGroup
-     * @param pipeadv PipeAdvertisement on which pipe requests are accepted
-     * @param backlog the maximum length of the queue.
-     * @param timeout call to accept() for this ServerPipe will
-     *                block for only this amount of time. If the timeout expires,
-     *                a java.net.SocketTimeoutException is raised, though the ServerPipe is still valid.
-     * @throws IOException if an I/O error occurs
-     */
-    public JxtaServerPipe(PeerGroup group, PipeAdvertisement pipeadv, int backlog, int timeout) throws IOException {
-        this(group, pipeadv, backlog);
-        this.timeout = timeout;
-    }
-
-    /**
-     * Constructor for the JxtaServerPipe object
-     *
-     * @param group   JXTA PeerGroup
-     * @param pipeadv PipeAdvertisement on which pipe requests are accepted
-     * @param backlog the maximum length of the queue.
-     *                * @exception  IOException  if an I/O error occurs
-     * @throws IOException if an I/O error occurs
-     */
-    public JxtaServerPipe(PeerGroup group, PipeAdvertisement pipeadv, int backlog) throws IOException {
-        this.group = group;
-        this.executor = Executors.newFixedThreadPool(3);
-        this.pipeadv = pipeadv;
-        this.backlog = backlog;
-        connectionQueue = new ArrayBlockingQueue<JxtaBiDiPipe>(backlog);
-        PipeService pipeSvc = group.getPipeService();
-        serverPipe = pipeSvc.createInputPipe(pipeadv, this);
-        setBound();
-    }
-
-    /**
-     * Binds the <code>JxtaServerPipe</code> to a specific pipe advertisement
-     *
-     * @param group   JXTA PeerGroup
-     * @param pipeadv PipeAdvertisement on which pipe requests are accepted
-     * @throws IOException if an I/O error occurs
-     */
-    public void bind(PeerGroup group, PipeAdvertisement pipeadv) throws IOException {
-        bind(group, pipeadv, backlog);
-    }
-
-    /**
-     * Binds the <code>JxtaServerPipe</code> to a specific pipe advertisement
-     *
-     * @param group   JXTA PeerGroup
-     * @param pipeadv PipeAdvertisement on which pipe requests are accepted
-     * @param backlog the maximum length of the queue.
-     * @throws IOException if an I/O error occurs
-     */
-    public void bind(PeerGroup group, PipeAdvertisement pipeadv, int backlog) throws IOException {
-        this.backlog = backlog;
-        connectionQueue = new ArrayBlockingQueue<JxtaBiDiPipe>(backlog);
-        this.group = group;
-        this.pipeadv = pipeadv;
-        PipeService pipeSvc = group.getPipeService();
-        serverPipe = pipeSvc.createInputPipe(pipeadv, this);
-        setBound();
-    }
-
-    /**
-     * Listens for a connection to be made to this socket and accepts
-     * it. The method blocks until a connection is made.
-     *
-     * @return the connection accepted, null otherwise
-     * @throws IOException if an I/O error occurs
-     */
-    public JxtaBiDiPipe accept() throws IOException {
-        if (isClosed()) {
-            throw new SocketException("JxtaServerPipe is closed");
-        }
-        if (!isBound()) {
-            throw new SocketException("JxtaServerPipe is not bound yet");
-        }
-        try {
-            JxtaBiDiPipe bidi = connectionQueue.poll(timeout, TimeUnit.MILLISECONDS);
-            if (bidi == null) {
-                throw new SocketTimeoutException("Timeout reached");
-            }
-            return bidi;
-        } catch (InterruptedException ie) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Interrupted", ie);
-            }
-            throw new SocketException("interrupted");
-        }
-    }
-
-    /**
-     * Gets the group associated with this JxtaServerPipe
-     *
-     * @return The group value
-     */
-    public PeerGroup getGroup() {
-        return group;
-    }
-
-    /**
-     * Gets the PipeAdvertisement associated with this JxtaServerPipe
-     *
-     * @return The pipeAdv value
-     */
-    public PipeAdvertisement getPipeAdv() {
-        return pipeadv;
-    }
-
-    /**
-     * Closes this JxtaServerPipe (closes the underlying input pipe).
-     *
-     * @throws IOException if an I/O error occurs
-     */
-    public void close() throws IOException {
-        synchronized (closeLock) {
-            if (isClosed()) {
-                return;
-            }
-            if (bound) {
-                // close all the pipe
-                serverPipe.close();
-                connectionQueue.clear();
-                executor.shutdownNow();
-                bound = false;
-            }
-            closed = true;
-        }
-    }
-
-    /**
-     * Sets the bound attribute of the JxtaServerPipe
-     */
-    void setBound() {
-        bound = true;
-    }
-
-    /**
-     * Gets the Timeout attribute of the JxtaServerPipe
-     *
-     * @return The soTimeout value
-     * @throws IOException if an I/O error occurs
-     */
-
-    public synchronized int getPipeTimeout() throws IOException {
-        if (isClosed()) {
-            throw new SocketException("Server Pipe is closed");
-        }
-        if (timeout > Integer.MAX_VALUE) {
-            return 0;
-        } else {
-            return (int) timeout;
-        }
-    }
-
-    /**
-     * Sets the Timeout attribute of the JxtaServerPipe a timeout of 0 blocks forever.
-     *
-     * @param timeout The new soTimeout value
-     * @throws SocketException if an I/O error occurs
-     */
-    public synchronized void setPipeTimeout(int timeout) throws SocketException {
-        if (isClosed()) {
-            throw new SocketException("Server Pipe is closed");
-        }
-
-        if (timeout < 0) {
-            throw new IllegalArgumentException("Negative timeout values are not allowed.");
-        }
-
-        if (0 == timeout) {
-            this.timeout = Long.MAX_VALUE;
-        } else {
-            this.timeout = (long) timeout;
-        }
-    }
-
-    /**
-     * Returns the closed state of the JxtaServerPipe.
-     *
-     * @return true if the socket has been closed
-     */
-    public boolean isClosed() {
-        synchronized (closeLock) {
-            return closed;
-        }
-    }
-
-    /**
-     * Returns the binding state of the JxtaServerPipe.
-     *
-     * @return true if the ServerSocket successfully bound to an address
-     */
-    public boolean isBound() {
-        return bound;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void pipeMsgEvent(PipeMsgEvent event) {
-        Message message = event.getMessage();
-        if (message == null) {
-            return;
-        }
-        ConnectionProcessor processor = new ConnectionProcessor(message);
-        executor.execute(processor);
-    }
-
-    /**
-     * Method processMessage is the heart of this class.
-     * <p/>
-     * This takes new incoming connect messages and constructs the JxtaBiDiPipe
-     * to talk to the new client.
-     * <p/>
-     * The ResponseMessage is created and sent.
-     *
-     * @param msg The client connection request (assumed not null)
-     * @return JxtaBiDiPipe Which may be null if an error occurs.
-     */
-    private JxtaBiDiPipe processMessage(Message msg) {
-
-        PipeAdvertisement outputPipeAdv = null;
-        PeerAdvertisement peerAdv = null;
-        StructuredDocument credDoc = null;
-        try {
-            MessageElement el = msg.getMessageElement(nameSpace, credTag);
-
-            if (el != null) {
-                credDoc = StructuredDocumentFactory.newStructuredDocument(el);
-            }
-
-            el = msg.getMessageElement(nameSpace, reqPipeTag);
-            if (el != null) {
-                XMLDocument asDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(el);
-                outputPipeAdv = (PipeAdvertisement) AdvertisementFactory.newAdvertisement(asDoc);
-            }
-
-            el = msg.getMessageElement(nameSpace, remPeerTag);
-            if (el != null) {
-                XMLDocument asDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(el);
-                peerAdv = (PeerAdvertisement) AdvertisementFactory.newAdvertisement(asDoc);
-            }
-
-            el = msg.getMessageElement(nameSpace, reliableTag);
-            boolean isReliable = false;
-            if (el != null) {
-                isReliable = Boolean.valueOf((el.toString()));
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Connection request [isReliable] :" + isReliable);
-                }
-            }
-
-            el = msg.getMessageElement(nameSpace, directSupportedTag);
-            boolean directSupported = false;
-            if (el != null) {
-                directSupported = Boolean.valueOf((el.toString()));
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Connection request [directSupported] :" + directSupported);
-                }
-            }
-
-            Messenger msgr;
-            boolean direct = false;
-            if (directSupported) {
-                msgr = JxtaBiDiPipe.getDirectMessenger(group, outputPipeAdv, peerAdv);
-                if (msgr == null) {
-                    msgr = JxtaBiDiPipe.lightweightOutputPipe(group, outputPipeAdv, peerAdv);
-                } else {
-                    direct = true;
-                }
-            } else {
-                msgr = JxtaBiDiPipe.lightweightOutputPipe(group, outputPipeAdv, peerAdv);
-            }
-
-            if (msgr != null) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Reliability set to :" + isReliable);
-                }
-                PipeAdvertisement newpipe = newInputPipe(group, outputPipeAdv);
-                JxtaBiDiPipe pipe = new JxtaBiDiPipe(group, msgr, newpipe, credDoc, isReliable, direct);
-
-                pipe.setRemotePeerAdvertisement(peerAdv);
-                pipe.setRemotePipeAdvertisement(outputPipeAdv);
-                sendResponseMessage(group, msgr, newpipe);
-                return pipe;
-            }
-        } catch (IOException e) {
-            // deal with the error
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "IOException occured", e);
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Method sendResponseMessage get the createResponseMessage and sends it.
-     *
-     * @param group  the peer group
-     * @param msgr   the remote node messenger
-     * @param pipeAd the pipe advertisement
-     * @throws IOException for failures sending the response message.
-     */
-    protected void sendResponseMessage(PeerGroup group, Messenger msgr, PipeAdvertisement pipeAd) throws IOException {
-
-        Message msg = new Message();
-        PeerAdvertisement peerAdv = group.getPeerAdvertisement();
-
-        if (myCredentialDoc == null) {
-            myCredentialDoc = JxtaBiDiPipe.getCredDoc(group);
-        }
-
-        if (myCredentialDoc != null) {
-            msg.addMessageElement(JxtaServerPipe.nameSpace,
-                    new TextDocumentMessageElement(credTag, (XMLDocument) myCredentialDoc, null));
-        }
-
-        msg.addMessageElement(JxtaServerPipe.nameSpace,
-                new StringMessageElement(JxtaServerPipe.directSupportedTag, Boolean.toString(true), null));
-
-        msg.addMessageElement(JxtaServerPipe.nameSpace,
-                new TextDocumentMessageElement(remPipeTag, (XMLDocument) pipeAd.getDocument(MimeMediaType.XMLUTF8), null));
-
-        msg.addMessageElement(nameSpace,
-                new TextDocumentMessageElement(remPeerTag, (XMLDocument) peerAdv.getDocument(MimeMediaType.XMLUTF8), null));
-        if (msgr instanceof TcpMessenger) {
-            ((TcpMessenger) msgr).sendMessageDirect(msg, null, null, true);
-        } else {
-            msgr.sendMessage(msg);
-        }
-    }
-
-    /**
-     * Utility method newInputPipe is used to get new pipe advertisement (w/random pipe ID) from old one.
-     * <p/>
-     * Called by JxtaSocket to make pipe (name -> name.remote) for open message
-     * <p/>
-     * Called by JxtaServerSocket to make pipe (name.remote -> name.remote.remote) for response message
-     *
-     * @param group   the peer group
-     * @param pipeadv to get the basename and type from
-     * @return PipeAdvertisement a new pipe advertisement
-     */
-    protected static PipeAdvertisement newInputPipe(PeerGroup group, PipeAdvertisement pipeadv) {
-        PipeAdvertisement adv = (PipeAdvertisement) AdvertisementFactory.newAdvertisement(PipeAdvertisement.getAdvertisementType());
-        adv.setPipeID(IDFactory.newPipeID(group.getPeerGroupID()));
-        adv.setName(pipeadv.getName());
-        adv.setType(pipeadv.getType());
-        return adv;
-    }
-
-    /**
-     * get the credential doc
-     *
-     * @return Credential StructuredDocument
-     */
-    public StructuredDocument getCredentialDoc() {
-        return myCredentialDoc;
-    }
-
-    /**
-     * Sets the connection credential doc
-     * If no credentials are set, the default group credential will be used
-     *
-     * @param doc Credential StructuredDocument
-     */
-    public void setCredentialDoc(StructuredDocument doc) {
-        this.myCredentialDoc = doc;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Closes the JxtaServerPipe.
-     */
-    @Override
-    protected synchronized void finalize() throws Throwable {
-        if (!closed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("JxtaServerPipe is being finalized without being previously closed. This is likely a user's bug.");
-            }
-        }
-        close();
-        super.finalize();
-    }
-    /**
-     * A small class for processing individual messages.
-     */
-    private class ConnectionProcessor implements Runnable {
-
-        private Message message;
-        ConnectionProcessor(Message message) {
-            this.message = message;
-        }
-
-        public void run() {
-            JxtaBiDiPipe bidi = processMessage(message);
-            // make sure we have a socket returning
-            if (bidi != null) {
-                try {
-                    connectionQueue.offer(bidi, timeout, TimeUnit.MILLISECONDS);
-                } catch (InterruptedException e) {
-                    Thread.interrupted();
-                }
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/LimitInputStream.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/LimitInputStream.java
deleted file mode 100644 (file)
index 8c738c7..0000000
+++ /dev/null
@@ -1,381 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.util;
-
-
-import java.io.ByteArrayInputStream;
-import java.io.FilterInputStream;
-import java.io.InputStream;
-
-import java.io.IOException;
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-
-/**
- *  Implements a bounds on the number of bytes which may be read from an
- *  InputStream. {link LimitInputStream.close() close()} does not close the
- *  underlying stream.
- **/
-public class LimitInputStream extends FilterInputStream {
-    
-    /*
-     *  Log4J Catagory
-     */
-    private static final Logger LOG = Logger.getLogger(LimitInputStream.class.getName());
-    
-    private transient long limit;
-    
-    private transient long read;
-    
-    private transient long mark;
-    
-    private transient boolean fatalUnderflow;
-    
-    private transient boolean alreadycounting;
-    
-    /**
-     * Creates a new instance of LimitInputStream
-     *
-     *    @param  in  the stream which will be limited.
-     *    @param  limit   the number of bytes which can be read from the stream.
-     **/
-    public LimitInputStream(InputStream in, long limit) {
-        this(in, limit, false);
-    }
-    
-    /**
-     * Creates a new instance of LimitInputStream
-     *
-     *    @param  in  the stream which will be limited.
-     *    @param  limit   the number of bytes which can be read from the stream.
-     *    @param  underflowThrows if the underlying stream EOFs before limit then
-     *    an IOException will be thrown.
-     **/
-    public LimitInputStream(InputStream in, long limit, boolean underflowThrows) {
-        super(in);
-        this.limit = limit;
-        this.mark = -1;
-        this.read = 0;
-        this.fatalUnderflow = underflowThrows;
-        this.alreadycounting = false;
-    }
-    
-    /**
-     * {@inheritDoc}
-     *
-     *  <p/>Debugging toString.
-     **/
-    @Override
-    public String toString() {
-        if (null == in) {
-            return "closed/" + super.toString();
-        } else {
-            if (in instanceof ByteArrayInputStream) {
-                // ByteArrayInputStream.toString() prints the entire stream! 
-                return in.getClass().getName() + "@" + System.identityHashCode(in) + "/" + super.toString() + ":" + read + "-"
-                        + limit;
-            } else {
-                return in.toString() + "/" + super.toString() + ":" + read + "-" + limit;
-            }
-        }
-    }
-    
-    /**
-     * Closes this input stream and releases any system resources
-     * associated with the stream.
-     * <p/>
-     * This method simply forgets the underlying stream.
-     *
-     * @exception  IOException  if an I/O error occurs.
-     * @see        java.io.FilterInputStream#in
-     */
-    @Override
-    public void close() throws IOException {
-        in = null;
-    }
-    
-    /**
-     * Returns the number of bytes that can be read from this input
-     * stream without blocking.
-     * <p>
-     * This method
-     * simply performs <code>in.available(n)</code> and
-     * returns the result.
-     *
-     * @return     the number of bytes that can be read from the input stream
-     *             without blocking.
-     * @exception  IOException  if an I/O error occurs.
-     * @see        java.io.FilterInputStream#in
-     */
-    @Override
-    public int available() throws IOException {
-        if (null == in) {
-            throw new IOException("Stream has been closed.");
-        }
-        
-        return (int) Math.min(super.available(), (limit - read));
-    }
-    
-    /**
-     * Marks the current position in this input stream. A subsequent
-     * call to the <code>reset</code> method repositions this stream at
-     * the last marked position so that subsequent reads re-read the same bytes.
-     * <p>
-     * The <code>readlimit</code> argument tells this input stream to
-     * allow that many bytes to be read before the mark position gets
-     * invalidated.
-     * <p>
-     * This method simply performs <code>in.mark(readlimit)</code>.
-     *
-     * @param   readlimit   the maximum limit of bytes that can be read before
-     *                      the mark position becomes invalid.
-     * @see     java.io.FilterInputStream#in
-     * @see     java.io.FilterInputStream#reset()
-     */
-    @Override
-    public void mark(int readlimit) {
-        if (null == in) {
-            return;
-        } // don't throw exception to be consistent with other impls.
-        
-        super.mark(readlimit);
-        mark = read;
-    }
-    
-    /**
-     * Repositions this stream to the position at the time the
-     * <code>mark</code> method was last called on this input stream.
-     * <p>
-     * This method simply performs <code>in.reset()</code>.
-     * <p>
-     * Stream marks are intended to be used in
-     * situations where you need to read ahead a little to see what's in
-     * the stream. Often this is most easily done by invoking some
-     * general parser. If the stream is of the type handled by the
-     * parse, it just chugs along happily. If the stream is not of
-     * that type, the parser should toss an exception when it fails.
-     * If this happens within readlimit bytes, it allows the outer
-     * code to reset the stream and try another parser.
-     *
-     * @exception  IOException  if the stream has not been marked or if the
-     *               mark has been invalidated.
-     * @see        java.io.FilterInputStream#in
-     * @see        java.io.FilterInputStream#mark(int)
-     */
-    @Override
-    public void reset() throws IOException {
-        if (null == in) {
-            throw new IOException("Stream has been closed.");
-        }
-        
-        if (-1 == mark) {
-            throw new IOException("reset() without mark(), or I dont know where mark is");
-        }
-        
-        super.reset();
-        
-        read = mark;
-    }
-    
-    /**
-     * Skips over and discards <code>n</code> bytes of data from the
-     * input stream. The <code>skip</code> method may, for a variety of
-     * reasons, end up skipping over some smaller number of bytes,
-     * possibly <code>0</code>. The actual number of bytes skipped is
-     * returned.
-     * <p>
-     * This method
-     * simply performs <code>in.skip(n)</code>.
-     *
-     * @param      n   the number of bytes to be skipped.
-     * @return     the actual number of bytes skipped.
-     * @exception  IOException  if an I/O error occurs.
-     */
-    @Override
-    public synchronized long skip(long n) throws IOException {
-        if (null == in) {
-            throw new IOException("Stream has been closed.");
-        }
-        
-        long skipLen = Math.min(n, (limit - read));
-        
-        boolean wascounting = alreadycounting;
-
-        alreadycounting = true;
-        long result = super.skip(skipLen);
-
-        alreadycounting = wascounting;
-        
-        if ((-1 != result) && !alreadycounting) {
-            read += result;
-        }
-        
-        return result;
-    }
-    
-    /**
-     * Reads the next byte of data from this input stream. The value
-     * byte is returned as an <code>int</code> in the range
-     * <code>0</code> to <code>255</code>. If no byte is available
-     * because the end of the stream has been reached, the value
-     * <code>-1</code> is returned. This method blocks until input data
-     * is available, the end of the stream is detected, or an exception
-     * is thrown.
-     * <p>
-     * This method
-     * simply performs <code>in.read()</code> and returns the result.
-     *
-     * @return     the next byte of data, or <code>-1</code> if the end of the
-     *             stream is reached.
-     * @exception  IOException  if an I/O error occurs.
-     * @see        java.io.FilterInputStream#in
-     */
-    @Override
-    public synchronized int read() throws IOException {
-        if (null == in) {
-            throw new IOException("Stream has been closed.");
-        }
-        
-        if (read >= limit) {
-            return -1;
-        }
-        
-        boolean wascounting = alreadycounting;
-
-        alreadycounting = true;
-        int result = super.read();
-
-        alreadycounting = wascounting;
-        
-        if (!alreadycounting) {
-            if (-1 != result) {
-                read++;
-            } else {
-                if (fatalUnderflow && (read != limit)) {
-                    IOException failed = new IOException(
-                            "Underflow in read, stream EOFed at " + read + " before limit of " + limit);
-
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, failed.getMessage(), failed);
-                    }
-                    throw failed;
-                }
-            }
-        }
-        
-        return result;
-    }
-    
-    /**
-     * Reads up to <code>len</code> bytes of data from this input stream
-     * into an array of bytes. This method blocks until some input is
-     * available.
-     * <p>
-     * This method simply performs <code>in.read(b, off, len)</code>
-     * and returns the result.
-     *
-     * @param      b     the buffer into which the data is read.
-     * @param      off   the start offset of the data.
-     * @param      len   the maximum number of bytes read.
-     * @return     the total number of bytes read into the buffer, or
-     *             <code>-1</code> if there is no more data because the end of
-     *             the stream has been reached.
-     * @exception  IOException  if an I/O error occurs.
-     * @see        java.io.FilterInputStream#in
-     */
-    @Override
-    public synchronized int read(byte[] b, int off, int len) throws IOException {
-        if (null == in) {
-            throw new IOException("Stream has been closed.");
-        }
-        
-        if (read >= limit) {
-            return -1;
-        }
-        
-        int readLen = (int) Math.min(len, limit - read);
-        
-        boolean wascounting = alreadycounting;
-
-        alreadycounting = true;
-        int result = super.read(b, off, readLen);
-
-        alreadycounting = wascounting;
-        
-        if (!alreadycounting) {
-            if (-1 != result) {
-                read += result;
-            } else {
-                if (fatalUnderflow && (read != limit)) {
-                    IOException failed = new IOException(
-                            "Underflow while tring to read " + readLen + ", stream EOFed at " + read + " before limit of " + limit);
-
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, failed.getMessage(), failed);
-                    }
-                    throw failed;
-
-                }
-            }
-        }
-        
-        return result;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/MarkProhibitedFilterStream.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/MarkProhibitedFilterStream.java
deleted file mode 100644 (file)
index ca73a2a..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.util;
-
-
-import java.io.FilterInputStream;
-import java.io.InputStream;
-
-import java.io.IOException;
-
-
-/**
- *  Implements a filter which disables the mark() feature of an input stream.
- *  Useful for when the stream is shared.
- **/
-public class MarkProhibitedFilterStream extends FilterInputStream {
-    
-    /**
-     * Creates a new instance of MarkProhibitedFilterStream
-     *
-     *    @param  in  the stream which will be limited.
-     */
-    public MarkProhibitedFilterStream(InputStream in) {
-        super(in);
-    }
-    
-    /**
-     * {@inheritDoc}
-     *
-     * <p/>This method does nothing.
-     **/
-    @Override
-    public void mark(int readlimit) {}
-    
-    /**
-     * {@inheritDoc}
-     *
-     * <p/>This implementation always throws IOException since mark is not
-     * supported.
-     */
-    @Override
-    public void reset() throws IOException {
-        throw new IOException("reset() not supported");
-    }
-    
-    /**
-     * {@inheritDoc}
-     *
-     * <p/>This method simply returns false.
-     **/
-    @Override
-    public boolean markSupported() {
-        return false;
-    }
-    
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/MessageUtilities.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/MessageUtilities.java
deleted file mode 100644 (file)
index 85a7bb0..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All right reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.util;
-
-
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.StringMessageElement;
-
-
-/**
- * @deprecated These utilities are unsupported and known to have problems. They
- *             are not recommended for use and will be removed in a future JXTA release
- *             THIS CLASS IS SCHEDULED TO BE REMOVED AFTER 2.5.
- */
-@Deprecated
-public final class MessageUtilities {
-
-    private MessageUtilities() {}
-
-    // Fix-Me: I didn't implement byte, short or float
-    // Fix-Me: I didn't implement arrays, ie addInt(Message message, String tagName, int values[]), etc
-    // Fix-Me: I didn't implement add DocumentSerializable yet
-
-    public static void addInt(Message message, String tagName, int value) {
-        StringMessageElement stringMessageElement = new StringMessageElement(tagName, Integer.toString(value), null);
-
-        message.addMessageElement(stringMessageElement);
-    }
-
-    public static int getInt(Message message, String tagName, int defaultValue) {
-        StringMessageElement stringMessageElement = (StringMessageElement) message.getMessageElement(tagName);
-
-        if (stringMessageElement != null) {
-            return Integer.parseInt(stringMessageElement.toString());
-        } else {
-            return defaultValue;
-        }
-    }
-
-    public static void addLong(Message message, String tagName, long value) {
-        StringMessageElement stringMessageElement = new StringMessageElement(tagName, Long.toString(value), null);
-
-        message.addMessageElement(stringMessageElement);
-    }
-
-    public static long getLong(Message message, String tagName, long defaultValue) {
-        StringMessageElement stringMessageElement = (StringMessageElement) message.getMessageElement(tagName);
-
-        if (stringMessageElement != null) {
-            return Long.parseLong(stringMessageElement.toString());
-        } else {
-            return defaultValue;
-        }
-    }
-
-    public static void addDouble(Message message, String tagName, double value) {
-        StringMessageElement stringMessageElement = new StringMessageElement(tagName, Double.toString(value), null);
-
-        message.addMessageElement(stringMessageElement);
-    }
-
-    public static double getDouble(Message message, String tagName, double defaultValue) {
-        StringMessageElement stringMessageElement = (StringMessageElement) message.getMessageElement(tagName);
-
-        if (stringMessageElement != null) {
-            return Double.parseDouble(stringMessageElement.toString());
-        } else {
-            return defaultValue;
-        }
-    }
-
-    public static void addBoolean(Message message, String tagName, boolean value) {
-        StringMessageElement stringMessageElement = new StringMessageElement(tagName, value ? "true" : "false", null);
-
-        message.addMessageElement(stringMessageElement);
-    }
-
-    public static boolean getBoolean(Message message, String tagName, boolean defaultValue) {
-        StringMessageElement stringMessageElement = (StringMessageElement) message.getMessageElement(tagName);
-
-        if (stringMessageElement != null) {
-            return "true".equals(stringMessageElement.toString());
-        } else {
-            return defaultValue;
-        }
-    }
-
-    public static void addString(Message message, String tagName, String value) {
-        StringMessageElement stringMessageElement = new StringMessageElement(tagName, value, null);
-
-        message.addMessageElement(stringMessageElement);
-    }
-
-    public static String getString(Message message, String tagName, String defaultValue) {
-        MessageElement stringMessageElement = message.getMessageElement(tagName);
-
-        if (stringMessageElement != null) {
-            return stringMessageElement.toString();
-        } else {
-            return defaultValue;
-        }
-    }
-
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/PipeEventListener.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/PipeEventListener.java
deleted file mode 100644 (file)
index 7bbb041..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.util;
-
-
-import java.util.EventListener;
-
-
-/**
- *  The listener interface for receiving JxtaBiDiPipe 
- *  events.
- * 
- *  The following example illustrates how to implement a {@link net.jxta.util.PipeEventListener}:
- *<pre><tt>
- * PipeEventListener myListener = new PipeEventListener() {
- *
- *   public void pipeEvent(int event) {
- *        if (event == JxtaBiDiPipe.PIPE_CLOSED_EVENT) {
- *          .....
- *        }
- *   }
- * }
- *
- * InputPipe pipeIn = pipe.createInputPipe(pipeAdv, myListener);
- * *</tt></pre> 
- *
- */
-public interface PipeEventListener extends EventListener {
-
-    /**
-     * Called for each pipe message event that occurs.
-     *
-     * @param event The event being received.
-     */
-    void pipeEvent(int event);
-
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/PipeStateListener.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/PipeStateListener.java
deleted file mode 100644 (file)
index 2874020..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2006-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.util;
-
-
-import java.util.EventListener;
-
-
-/**
- *  The listener interface for receiving JxtaBiDiPipe 
- *  events.
- * 
- *  The following example illustrates how to implement a {@link net.jxta.util.PipeStateListener}:
- *<pre><tt>
- * PipeStateListener myListener = new PipeStateListener() {
- *
- *   public void pipeEvent(int event) {
- *        if (event == PipeStateListener.PIPE_CLOSED_EVENT) {
- *          .....
- *        }
- *   }
- * }
- *
- * InputPipe pipeIn = pipe.createInputPipe(pipeAdv, myListener);
- * </tt></pre>
- *
- */
-public interface PipeStateListener extends EventListener {
-
-    /**
-     * Pipe close Event
-     */
-    public static final int PIPE_CLOSED_EVENT = 1;
-
-    /**
-     * Pipe opened Event
-     */
-    public static final int PIPE_OPENED_EVENT = 2;
-
-    /**
-     * Pipe failed Event
-     */
-    public static final int PIPE_FAILED_EVENT = 4;
-
-    /**
-     * Called for each pipe mode event that occurs.
-     *
-     * @param source the source of the event (JxtaBiDiPipe)
-     * @param event The event being received.
-     */
-    void stateEvent(Object source, int event);
-
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/PipeUtilities.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/PipeUtilities.java
deleted file mode 100644 (file)
index f686766..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.util;
-
-
-import java.net.URI;
-import net.jxta.pipe.*;
-import net.jxta.id.*;
-import net.jxta.peergroup.*;
-import net.jxta.endpoint.*;
-import net.jxta.document.*;
-import net.jxta.protocol.*;
-import net.jxta.exception.*;
-
-
-public final class PipeUtilities {
-    
-    private PipeUtilities() {}
-    
-    public static PipeAdvertisement createPipeAdvertisement() {
-        return (PipeAdvertisement) AdvertisementFactory.newAdvertisement(PipeAdvertisement.getAdvertisementType());
-    }
-
-    public static PipeAdvertisement createPipeAdvertisement(PipeID pipeId, String pipeType) {
-        PipeAdvertisement pipeAdvertisement = createPipeAdvertisement();
-
-        pipeAdvertisement.setPipeID(pipeId);
-        pipeAdvertisement.setType(pipeType);
-        return pipeAdvertisement;
-    }
-
-    public static PipeAdvertisement createPipeAdvertisement(String pipeIdText, String pipeType) throws JxtaException {
-        PipeID pipeId = (PipeID) ID.create(URI.create(pipeIdText));
-        PipeAdvertisement pipeAdvertisement = (PipeAdvertisement) AdvertisementFactory.newAdvertisement(
-                PipeAdvertisement.getAdvertisementType());
-
-        pipeAdvertisement.setPipeID(pipeId);
-        pipeAdvertisement.setType(pipeType);
-        return pipeAdvertisement;
-    }
-       
-    public static PipeAdvertisement createPipeAdvertisement(Element root) {
-        TextElement pipeAdvElement = (TextElement) DocumentUtilities.getChild(root, PipeAdvertisement.getAdvertisementType());
-               
-        if (pipeAdvElement == null) {
-            return null;
-        }
-                       
-        return (PipeAdvertisement) AdvertisementFactory.newAdvertisement(pipeAdvElement);
-    }
-
-    public static PipeAdvertisement createNewPipeAdvertisement(PeerGroup peerGroup, String pipeType) {
-        PipeAdvertisement pipeAdvertisement = createPipeAdvertisement();
-               
-        PipeID pipeID = IDFactory.newPipeID(peerGroup.getPeerGroupID());
-               
-        pipeAdvertisement.setPipeID(pipeID);
-        pipeAdvertisement.setType(pipeType);
-        return pipeAdvertisement;
-    }
-
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/SimpleSelectable.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/SimpleSelectable.java
deleted file mode 100644 (file)
index 0fafb79..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright (c) 2004-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.util;
-
-/**
- * This the interface that all selectable objects expose.
- *
- * <p/>
- * Applications programmers should treat this API as temporary, for now.
- *
- * <p/>
- * A SimpleSelectable object can register SimpleSelector objects so that
- * they are notified whenever this object chooses to report a change.
- *
- * <p/>
- * SimpleSelectors are SimpleSelectable, therefore selectors can be selected.
- *
- * <p/>
- * The change notification interface used to notify a selector is actually
- * specified in SimpleSelectable. As a result, certain implementations may also 
- * allow to register SimpleSelectables that are not Selectors. Selectors themselves do not allow that.
- *
- * @see SimpleSelector
- * @see AbstractSimpleSelectable
- */
-public interface SimpleSelectable {
-    
-    /**
-     * A simple reference object that can be put in a map instead of the one it refers to.
-     * SimpleSelectable object often need to be put in maps where distinct objects are to be treated
-     * as such, even if they are identical at a semantical level. However, some 
-     * SimpleSelectable objects may have semantically equals() and hashCode() 
-     * methods rather than the identity ones.
-     *
-     * <p/>
-     * For that reason, whenever a SimpleSelectable needs to be used as a map or set key, its identity
-     * reference should be used instead. All SimpleSelectable can return an identity reference. A given
-     * SimpleSelectable always provides the same IdentityReference object. IdentityReference never overloads
-     * hashCode() and equals() in a way that could make different objects be equal or that could provide
-     * different results from invocation to invocation.
-     */
-    public static class IdentityReference {
-        private final SimpleSelectable object;
-        
-        /**
-         * Creates a new IdentityReference object
-         *
-         * @param object the selectable
-         */
-        public IdentityReference(SimpleSelectable object) {
-            this.object = object;
-        }
-        
-        /**
-         * @return The object that this one refers to.
-         */
-        public SimpleSelectable getObject() { 
-            return object;
-        }
-    }
-    
-    /**
-     * @return A canonical IdentityReference for this object.
-     * A given SimpleSelectable always provides the same IdentityReference 
-     * object. An IdentityReference must never overload hashCode() or equals()
-     * in a way that could make different objects be equal or that could provide
-     * different results from invocation to invocation.
-     */
-    public IdentityReference getIdentityReference();
-    
-    /**
-     * Registers the given selector with this selectable object. This always 
-     * causes one change event for this object to be reported through the 
-     * selector. As a result, when selecting for a condition, it is not 
-     * necessary to verify whether it has already happened or not; the next call 
-     * to select will be able to detect it.
-     *
-     * @param s The SimpleSelector to register
-     */
-    public void register(SimpleSelector s);
-    
-    /**
-     * Unregisters the given selector, so that it is no-longer notified when 
-     * this object changes.
-     *
-     * @param s The SimpleSelector to unregister
-     */
-    public void unregister(SimpleSelector s);
-    
-    /**
-     * This method is invoked when the given selectable object has changed. This
-     * permits to cascade selectable objects, so that one reports a change when 
-     * the other changes, without having to select it. This also permits 
-     * implementation of this interface by delegating its implementation to a 
-     * utility class.  
-     * <p/>
-     * An implementation may do what it wants about it. For example, a
-     * {@link SimpleSelector} will report the change to 
-     * {@link SimpleSelector#select} and invoke 
-     * {@link AbstractSimpleSelectable#notifyChange()} thereby reporting its own
-     * change to cascaded selectors.  Other implementations may only invoke 
-     * {@link AbstractSimpleSelectable#notifyChange()} or may perform more 
-     * complex tasks.
-     *
-     * @see AbstractSimpleSelectable
-     *
-     * @param changedObject the object that has changed.
-     */
-    public void itemChanged(SimpleSelectable changedObject);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/SimpleSelector.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/SimpleSelector.java
deleted file mode 100644 (file)
index 22baaed..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (c) 2004-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.util;
-
-
-import java.util.Set;
-import java.util.Collection;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-
-
-/**
- * A very primitive version of NIO's select mechanism.  Applications should not 
- * code to this API yet. This is subject to change and for use only by internal 
- * mechanisms. This is only good at implementing efficient polling. Users must 
- * wait for a batch of state changes and then figure out which item's state 
- * changed to something interesting. The batch returned by simpleSelect is a set
- * of the items which state did change since the previous time select returned. 
- * Since a batch is returned as soon as there is at least one item in it, most 
- * batches are very small, they will contain the first item that was added, plus 
- * whatever few could sneak in between then and when select wakes-up and grabs 
- * that batch.
- *
- * <p/>A simpleSelector It is not very usable by multiple threads at once, 
- * unless they all do the same thing. Items are removed from the current batch 
- * when select returns it. As a result, any state change occurring in-between 
- * two calls to select() is guaranteed to be reported by the next call. However, 
- * the new state may be observed before the next select call to select returns
- * the corresponding event, which may then be viewed as redundant. So events are
- * reported too much rather than too little.
- */
-public final class SimpleSelector extends AbstractSimpleSelectable {
-    
-    /**
-     * The small set of items that changed since the last batch was returned
-     * by select.
-     **/
-    private final Set<IdentityReference> currentBatch = new HashSet<IdentityReference>(2);
-    
-    /**
-     * Let it be newed for now. We need to find a place for a factory.
-     */
-    public SimpleSelector() {}
-    
-    /**
-     * {@inheritDoc}
-     *
-     * <p/>This is invoked by registered items when their state changes. Records
-     * changes for the benefit of {@link #select()}, and performs notifyChange(),
-     * which will cause notification of cascaded selectors, if any. It is thus
-     * possible to register selectors with a selector and come to a particular
-     * one only when it has something to report.
-     **/
-    public final void itemChanged(SimpleSelectable item) {
-        synchronized (currentBatch) {
-            currentBatch.add(item.getIdentityReference());
-            currentBatch.notifyAll();
-        }
-        notifyChange();
-    }
-    
-    /**
-     * This blocks unless and until at least one of the selected items reports
-     * that it changed. Then the list of such items is returned. More than one
-     * item may be added to the list by the time it is returned to the invoker.
-     *
-     * <p/><b>Note:</b> the result cannot be a set, otherwise we would be
-     * prevented from returning objects that overload hashCode/equals. Every
-     * item returned will be a distinct object.
-     *
-     * <p/>The invoker should <b>never</b> assume that all items in the result
-     * have indeed changed in any expected manner or even changed at all. The
-     * simple action of registering a selector may, and usually does, cause the
-     * selectable object to report a change. In some cases a selectable object
-     * may just be unable to prove that it has not changed, and thus report a
-     * change. It is up to the invoker to inspect the relevant item's state
-     * every time.
-     **/
-    public Collection<SimpleSelectable> select() throws InterruptedException {
-        
-        IdentityReference[] refs;
-        
-        synchronized (currentBatch) {
-            int resLen = 0;
-            
-            while ((resLen = currentBatch.size()) == 0) {
-                currentBatch.wait();
-            }
-            
-            refs = currentBatch.toArray(new IdentityReference[resLen]);
-            currentBatch.clear();
-        }
-        
-        // Now we have to retrieve the real objects behind the identity references.
-        // Costly, but unavoidable.
-        Collection<SimpleSelectable> result = new ArrayList<SimpleSelectable>(refs.length);
-        
-        for (IdentityReference aRef : Arrays.asList(refs)) {
-            result.add(aRef.getObject());
-        }
-        
-        return result;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/WatchedInputStream.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/WatchedInputStream.java
deleted file mode 100644 (file)
index df384c0..0000000
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.util;
-
-
-import java.io.*;
-import java.util.Collection;
-
-
-/**
- * @deprecated This class is no longer used by the JXTA core and should not
- *             have been part of the public JXTA API. If you use it, copy it to your own
- *             source base. It will be deleted after June 2007 release.
- */
-@Deprecated
-public class WatchedInputStream extends FilterInputStream
-        implements WatchedStream {
-
-    static final int DEFAULT_CHUNK_SIZE = 4096;
-    Collection watchList = null;
-    volatile boolean stalled = false;
-    volatile boolean idle = true;
-    boolean closed = false;
-    final int chunkSize;
-    InputStream in = null;
-
-    public WatchedInputStream(InputStream in, int chunkSize) {
-        super(in);
-        this.in = in;
-        this.chunkSize = chunkSize;
-    }
-
-    public WatchedInputStream(InputStream in) {
-        this(in, DEFAULT_CHUNK_SIZE);
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * <p/>Debugging toString.
-     */
-    @Override
-    public String toString() {
-        if (null == in) {
-            return "closed/" + super.toString();
-        } else {
-            if (in instanceof ByteArrayInputStream) {
-                // ByteArrayInputStream.toString() prints the entire stream! 
-                return in.getClass().getName() + "@" + System.identityHashCode(in) + "/" + super.toString();
-            } else {
-                return in.toString() + "/" + super.toString();
-            }
-        }
-    }
-
-    /**
-     * Sets the watcher list onto which this stream must register
-     * when it is not idle (so that it can be watched).
-     * This implementation may or may not remain registered while idle.
-     * This may affect performance but not functionality.
-     * It is assumed that that list is monitored by a watcher task that
-     * invokes the watch method as often as needed to monitor progress
-     * to its satisfaction.
-     *
-     * @param watchList The watchList to register with. Must be a
-     *                  Synchronized Collection.
-     */
-    public synchronized void setWatchList(Collection watchList) {
-        if (this.watchList != null) {
-            this.watchList.remove(this);
-        }
-        this.watchList = watchList;
-        watchList.add(this);
-    }
-
-    // This routine may be invoked as often as progress needs to be asserted.
-    // After at most two watch cycles stalling is detected.
-    public void watch() {
-
-        if (idle) {
-            return;
-        }
-
-        if (!stalled) {
-            stalled = true; // challenge a write method to clear that flag.
-            return;
-        }
-
-        // It's stalled. The last time around it was not idle, so we set the
-        // stalled flag. Now, it is still not idle and the flag is still there.
-        // break the stream.
-        try {
-            close();
-        } catch (IOException ioe) {
-            ;
-        }
-    }
-
-    @Override
-    public void close() throws IOException {
-        idle = true;
-        synchronized (this) {
-            if (watchList != null) {
-                watchList.remove(this);
-                watchList = null;
-            }
-
-            // Avoid calling close redundantly; some OSes seem to have
-            // deadlock capabilities when doing that.
-
-            if (closed) {
-                return;
-            }
-            closed = true;
-        }
-        super.close();
-    }
-
-    @Override
-    public int read() throws IOException {
-        stalled = false;
-        idle = false;
-        try {
-            return in.read();
-        } finally {
-            idle = true;
-        }
-    }
-
-    // We overload it; not trusting that the base classes method does
-    // call read(byte[], int, int) in the future.
-    @Override
-    public int read(byte[] b) throws IOException {
-        return read(b, 0, b.length);
-    }
-
-    @Override
-    public int read(byte[] b, int off, int len) throws IOException {
-
-        // Apply the standard checks here; we will call in.read repeatedly
-        // which means that errors could be discovered too late per read's
-        // contract.
-
-        if ((off < 0) || (len < 0) || ((off + len) > b.length) || ((off + len) < 0)) {
-
-            throw new IndexOutOfBoundsException();
-
-        }
-
-        stalled = false;
-        idle = false;
-        int left = len;
-
-        try {
-            int i;
-
-            while (left > chunkSize) {
-                i = in.read(b, off, chunkSize);
-                stalled = false;
-                if (i <= 0) {
-                    if (left == len) {
-                        return i;
-                    }
-                    return len - left;
-                }
-                off += i;
-                left -= i;
-
-                // Must check available only after firt read.
-                // first read must wait for at least one byte.
-
-                if (in.available() == 0) {
-                    return len - left;
-                }
-            }
-
-            // Read the left over now. If this is not the first read,
-            // available has been checked in the loop above.
-            i = in.read(b, off, left);
-            if (i <= 0) {
-                if (left == len) {
-                    return i;
-                }
-                return len - left;
-            }
-
-            return len - left + i;
-
-        } finally {
-            idle = true;
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/WatchedOutputStream.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/WatchedOutputStream.java
deleted file mode 100644 (file)
index c80de5e..0000000
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.util;
-
-
-import java.io.ByteArrayOutputStream;
-import java.io.FilterOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Collection;
-
-
-/**
- * @deprecated This class is no longer used by the JXTA core and should not
- *             have been part of the public JXTA API. If you use it, copy it to your own
- *             source base. It will be deleted after June 2007 release.
- */
-@Deprecated
-public class WatchedOutputStream extends FilterOutputStream
-        implements WatchedStream {
-
-    static final int DEFAULT_CHUNK_SIZE = 4096;
-    transient Collection watchList = null;
-    transient volatile boolean stalled = false;
-    transient volatile boolean idle = true;
-    transient boolean closed = false;
-    transient final int chunkSize;
-    transient OutputStream out = null;
-
-    public WatchedOutputStream(OutputStream out, int chunkSize) {
-        super(out);
-        this.out = out;
-        this.chunkSize = chunkSize;
-    }
-
-    public WatchedOutputStream(OutputStream out) {
-        this(out, DEFAULT_CHUNK_SIZE);
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * <p/>Debugging toString.
-     */
-    @Override
-    public String toString() {
-
-        if (null == out) {
-            return "closed/" + super.toString();
-        } else {
-            if (out instanceof ByteArrayOutputStream) {
-                // ByteArrayInputStream.toString() prints the entire stream!
-                return out.getClass().getName() + "@" + System.identityHashCode(out) + "/" + super.toString();
-            } else {
-                return out.toString() + "/" + super.toString();
-            }
-        }
-    }
-
-    /**
-     * Sets the watcher list onto which this stream must register
-     * when it is not idle (so that it can be watched).
-     * This implementation may or may not remain registered while idle.
-     * This may affect performance but not functionality.
-     * It is assumed that that list is monitored by a watcher task that
-     * invokes the watch method as often as needed to monitor progress
-     * to its satisfaction.
-     *
-     * @param watchList The watchList to register with. Must be a
-     *                  Synchronized Collection.
-     */
-    public synchronized void setWatchList(Collection watchList) {
-        if (this.watchList != null) {
-            this.watchList.remove(this);
-        }
-        this.watchList = watchList;
-        watchList.add(this);
-    }
-
-    // This routine may be invoked as often as progress needs to be asserted.
-    // After at most two watch cycles stalling is detected.
-    public void watch() {
-
-        if (idle) {
-            return;
-        }
-
-        if (!stalled) {
-            stalled = true; // challenge a write method to clear that flag.
-            return;
-        }
-
-        // It's stalled. The last time around it was not idle, so we set the
-        // stalled flag. Now, it is still not idle and the flag is still there.
-        // break the stream.
-        try {
-            close();
-        } catch (IOException ioe) {
-            ;
-        }
-    }
-
-    @Override
-    public void close() throws IOException {
-        idle = true;
-        synchronized (this) {
-            if (watchList != null) {
-                watchList.remove(this);
-                watchList = null;
-            }
-
-            // Avoid calling close redundantly; some OSes seem to have
-            // deadlock capabilities when doing that.
-
-            if (closed) {
-                return;
-            }
-            closed = true;
-        }
-        super.close();
-    }
-
-    @Override
-    public void flush() throws IOException {
-        stalled = false;
-        idle = false;
-        try {
-            out.flush();
-        } finally {
-            idle = true;
-        }
-    }
-
-    @Override
-    public void write(int b) throws IOException {
-        stalled = false;
-        idle = false;
-        try {
-            out.write(b);
-        } finally {
-            idle = true;
-        }
-    }
-
-    // We overload it; not trusting that the base classe's method does
-    // call write(byte[], int, int) in the future.
-    @Override
-    public void write(byte[] b) throws IOException {
-        write(b, 0, b.length);
-    }
-
-    // We overload it; not wanting the base classe's method to
-    // call write(int).
-    @Override
-    public void write(byte[] b, int off, int len) throws IOException {
-
-        // Do the standard checks here. Since we will be calling write
-        // repeatedly, errors could be discovered too late per write's
-        // contract.
-
-        if ((off < 0) || (len < 0) || ((off + len) > b.length) || ((off + len) < 0)) {
-
-            throw new IndexOutOfBoundsException();
-
-        } else if (len == 0) {
-            return;
-        }
-
-        stalled = false;
-        idle = false;
-        try {
-            while (len > chunkSize) {
-                out.write(b, off, chunkSize);
-                stalled = false;
-                off += chunkSize;
-                len -= chunkSize;
-            }
-            if (len > 0) {
-                out.write(b, off, len);
-            }
-        } finally {
-            idle = true;
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/WatchedStream.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/WatchedStream.java
deleted file mode 100644 (file)
index 7fb109e..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.util;
-
-
-import java.io.*;
-import java.util.Collection;
-
-
-/**
- * @deprecated This class is no longer used by the JXTA core and should not
- *             have been part of the public JXTA API. If you use it, copy it to your own
- *             source base. It will be deleted after June 2007 release.
- */
-@Deprecated
-public interface WatchedStream {
-
-    /**
-     * Sets the watcher list onto which this stream must register
-     * when it is not idle (so that it can be watched).
-     * This implementation may or may not remain registered while idle.
-     * This may affect performance but not functionality.
-     * It is assumed that that list is monitored by a watcher task that
-     * invokes the watch method as often as needed to monitor progress
-     * to its satisfaction.
-     *
-     * @param watchList The watchList to register with. Must be a
-     *                  Synchronized Collection.
-     */
-    public void setWatchList(Collection watchList);
-
-    /**
-     * This routine may be invoked as often as progress needs to be asserted.
-     * After at most two watch cycles stalling is detected.
-     */
-    public void watch();
-
-    /**
-     * In case we want to close a watchStream regardless of its making
-     * progress.
-     *
-     * @throws java.io.IOException if an io error occurs
-     */
-    public void close() throws IOException;
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/documentSerializable/DocumentSerializable.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/documentSerializable/DocumentSerializable.java
deleted file mode 100644 (file)
index f02363f..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.util.documentSerializable;
-
-
-import net.jxta.document.*;
-
-
-/**
- **/
-public interface DocumentSerializable {
-    public void initializeFrom(Element element) throws DocumentSerializationException;
-    public void serializeTo(Element element) throws DocumentSerializationException;
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/documentSerializable/DocumentSerializableUtilities.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/documentSerializable/DocumentSerializableUtilities.java
deleted file mode 100644 (file)
index f32e88d..0000000
+++ /dev/null
@@ -1,570 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.util.documentSerializable;
-
-
-import net.jxta.document.*;
-import net.jxta.exception.*;
-import net.jxta.util.*;
-
-import java.util.*;
-import java.io.*;
-
-
-/**
- **/
-public class DocumentSerializableUtilities {
-    // Fix-Me: I didn't implement byte, short or float
-    // Fix-Me: I didn't implement arrays, ie addInt(Element element, String tagName, int values[]), etc
-
-    /**
-     * Creates a Structured XML Document containing the serialized object
-     *
-     * @return The created Document
-     * @throws DocumentSerializationException if Unable to parse the serialized object.
-     */        
-    public static XMLDocument createStructuredXmlDocument(String docType, DocumentSerializable documentSerializable) throws DocumentSerializationException {
-        XMLDocument xmlDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, docType);
-
-        documentSerializable.serializeTo(xmlDoc);
-        return xmlDoc;
-    }
-
-    /**
-     * Deeply copy an element into another element
-     *
-     * @param toElement The target Element
-     * @param fromElement The source Element
-     */        
-    public static void copyChildren(Element toElement, Element fromElement) {
-        // for now ... a quicky use of another utility
-
-        StructuredDocument intoDoc = toElement.getRoot();
-
-        StructuredDocumentUtils.copyChildren(intoDoc, toElement, fromElement);
-    }
-
-    /**
-     *  Add an Element with the specified tagname and value (converted to a String)
-     *
-     * @param element Parent Element that the new child element will be added to
-     * @param tagName TagName to be used for the created Child Element
-     * @param documentSerializable This value will be serialized into the created child element
-     \          * @throws DocumentSerializationException if Unable to serialized object.
-     **/
-    public static void addDocumentSerializable(Element element, String tagName, DocumentSerializable documentSerializable)  throws DocumentSerializationException {
-        StructuredDocument structuredDocument = element.getRoot();
-        Element childElement = structuredDocument.createElement(tagName);
-
-        element.appendChild(childElement);
-        documentSerializable.serializeTo(childElement);
-    }
-
-    /**
-     *  Create an object from its Document Serialized components
-     *
-     * @param element The relative root element of a Document Serialized Object
-     * @param clazz The Class of the resurrected object (must implement DocumentSerializable and have a public no-arg constructor)
-     * @return An object of type 'clazz'
-     * @throws DocumentSerializationException if Unable to parse the serialized object.
-     **/
-    public static DocumentSerializable getDocumentSerializable(Element element, Class clazz) throws DocumentSerializationException {
-        try {
-            return getDocumentSerializable(element, (DocumentSerializable) clazz.newInstance());
-        } catch (DocumentSerializationException e) {
-            throw e;
-        } catch (Exception e) {
-            throw new DocumentSerializationException("Class must have a public no-arg constructor", e);
-        }
-    }
-       
-    /**
-     *  Initialize an object from its Document Serialized components
-     *
-     * @param element The relative root element of a Document Serialized Object
-     * @param documentSerializable The object that will be populated from the Element
-     * @return The same parameter passed to it 'documentSerializable'
-     * @throws DocumentSerializationException if Unable to parse the serialized object.
-     **/
-    public static DocumentSerializable getDocumentSerializable(Element element, DocumentSerializable documentSerializable) throws DocumentSerializationException {
-        documentSerializable.initializeFrom(element);
-        return documentSerializable;
-    }
-
-    /**
-     *  Create an object from its Document Serialized components
-     *
-     * @param element The Parent element which has a child Element with the serialized value
-     * @param tagName The tagname of the element that contains the relative root element of a Document Serialized Object
-     * @param clazz The Class of the resurrected object (must implement DocumentSerializable and have a public no-arg constructor)
-     * @return An object of type 'clazz'
-     * @throws DocumentSerializationException if Unable to parse the serialized object.
-     **/
-    public static DocumentSerializable getDocumentSerializable(Element element, String tagName, Class clazz) throws DocumentSerializationException {
-        Element childElement = getChildElement(element, tagName);
-               
-        if (childElement != null) {
-            return getDocumentSerializable(childElement, clazz);
-        } else {
-            return null;
-        }
-    }  
-
-    /**
-     *  Create a copy of any Document Serializable object.
-     *  
-     *  This is done by serializing and then deserializing the object (ie not very efficient)
-     *
-     * @param documentSerializable The Object to be copied
-     * @return An copy of the presented object
-     * @throws DocumentSerializationException if Unable to serialize or parse object.
-     **/
-    public static DocumentSerializable copyDocumentSerializable(DocumentSerializable documentSerializable) throws DocumentSerializationException {
-        StructuredDocument structuredDocument = createStructuredXmlDocument("temp", documentSerializable);
-
-        return getDocumentSerializable(structuredDocument, documentSerializable.getClass());
-    }
-
-    /**
-     *  Create a child element of the specified tagName
-     *  
-     *  This is done by serializing and then deserializing the object (ie not very efficient)
-     *
-     * @param element The Parent Element
-     * @param tagName The Tag Name for the new Element
-     * @return The created Element
-     **/
-    public static Element createChildElement(Element element, String tagName) {
-        StructuredDocument structuredDocument = element.getRoot();
-        Element childElement = structuredDocument.createElement(tagName);
-
-        element.appendChild(childElement);
-        return childElement;
-    }
-
-    /**
-     *  Get a child element of the specified tagName
-     *  
-     *  This is done by serializing and then deserializing the object (ie not very efficient)
-     *
-     * @param element The Parent Element
-     * @param tagName The Tag Name for the new Element
-     * @return The found Element
-     **/
-    public static Element getChildElement(Element element, String tagName) {
-        Enumeration e = element.getChildren(tagName);
-               
-        if (e.hasMoreElements()) {
-            return (Element) e.nextElement();
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     *  Add an Element with the specified tagname and value (converted to a String)
-     *
-     * @param element Parent Element that the new element will be added to
-     * @param tagName TagName to be used for the created Child Element
-     * @param value The value that will be stored in the Element as a String
-     **/        
-    public static void addInt(Element element, String tagName, int value) {
-        StructuredDocument structuredDocument = element.getRoot();
-        Element childElement = structuredDocument.createElement(tagName, Integer.toString(value));
-
-        element.appendChild(childElement);
-    }
-
-    /**
-     *  Get  the value of an element converted from a String
-     *
-     * @param element Element that contains the value
-     * @return the value converted from a String
-     **/
-    public static int getInt(Element element) {
-        return Integer.parseInt((String) element.getValue());
-    }
-       
-    /**
-     *  Get the value of a Child Element 
-     *
-     * @param element The Parant Element
-     * @param tagName The Tag Name of the Child Element that will contain the value
-     * @param defaultValue The return value if there is no Child Element with that Tag Name
-     * @return the value converted from a String
-     **/
-    public static int getInt(Element element, String tagName, int defaultValue) {
-        Element childElement = getChildElement(element, tagName);
-               
-        if (childElement != null) {
-            return getInt(childElement);
-        } else {
-            return defaultValue;
-        }
-    }  
-               
-    /**
-     *  Add an Element with the specified tagname and value (converted to a String)
-     *
-     * @param element Parent Element that the new element will be added to
-     * @param tagName TagName to be used for the created Child Element
-     * @param value The value that will be stored in the Element as a String
-     **/
-    public static void addLong(Element element, String tagName, long value) {
-        StructuredDocument structuredDocument = element.getRoot();
-        Element childElement = structuredDocument.createElement(tagName, Long.toString(value));
-
-        element.appendChild(childElement);
-    }
-
-    /**
-     *  Get  the value of an element converted from a String
-     *
-     * @param element Element that contains the value
-     * @return the value converted from a String
-     **/
-    public static long getLong(Element element) {
-        return Long.parseLong((String) element.getValue());
-    }
-
-    /**
-     *  Get the value of a Child Element 
-     *
-     * @param element The Parant Element
-     * @param tagName The Tag Name of the Child Element that will contain the value
-     * @param defaultValue The return value if there is no Child Element with that Tag Name
-     * @return the value converted from a String
-     **/
-    public static long getLong(Element element, String tagName, long defaultValue) {
-        Element childElement = getChildElement(element, tagName);
-               
-        if (childElement != null) {
-            return getLong(childElement);
-        } else {
-            return defaultValue;
-        }
-    }  
-               
-    /**
-     *  Add an Element with the specified tagname and value (converted to a String)
-     *
-     * @param element Parent Element that the new element will be added to
-     * @param tagName TagName to be used for the created Child Element
-     * @param value The value that will be stored in the Element as a String
-     **/
-    public static void addDouble(Element element, String tagName, double value) {
-        StructuredDocument structuredDocument = element.getRoot();
-        Element childElement = structuredDocument.createElement(tagName, Double.toString(value));
-
-        element.appendChild(childElement);
-    }
-
-    /**
-     *  Get  the value of an element converted from a String
-     *
-     * @param element Element that contains the value
-     * @return the value converted from a String
-     **/
-    public static double getDouble(Element element) {
-        return Double.parseDouble((String) element.getValue());
-    }
-
-    /**
-     *  Get the value of a Child Element 
-     *
-     * @param element The Parant Element
-     * @param tagName The Tag Name of the Child Element that will contain the value
-     * @param defaultValue The return value if there is no Child Element with that Tag Name
-     * @return the value converted from a String
-     **/
-    public static double getDouble(Element element, String tagName, double defaultValue) {
-        Element childElement = getChildElement(element, tagName);
-               
-        if (childElement != null) {
-            return getDouble(childElement);
-        } else {
-            return defaultValue;
-        }
-    }  
-               
-    /**
-     *  Add an Element with the specified tagname and value (converted to a String)
-     *
-     * @param element Parent Element that the new element will be added to
-     * @param tagName TagName to be used for the created Child Element
-     * @param value The value that will be stored in the Element as a String
-     **/
-    public static void addBoolean(Element element, String tagName, boolean value) {
-        StructuredDocument structuredDocument = element.getRoot();
-        Element childElement = structuredDocument.createElement(tagName, value ? "true" : "false");
-
-        element.appendChild(childElement);
-    }
-
-    /**
-     *  Get  the value of an element converted from a String ("true" or "false")
-     *
-     * @param element Element that contains the value
-     * @return the value converted from a String
-     **/
-    public static boolean getBoolean(Element element) {
-        return "true".equals((String) element.getValue());
-    }
-
-    /**
-     *  Get the value of a Child Element 
-     *
-     * @param element The Parant Element
-     * @param tagName The Tag Name of the Child Element that will contain the value
-     * @param defaultValue The return value if there is no Child Element with that Tag Name
-     * @return the value converted from a String
-     **/
-    public static boolean getBoolean(Element element, String tagName, boolean defaultValue) {
-        Element childElement = getChildElement(element, tagName);
-               
-        if (childElement != null) {
-            return getBoolean(childElement);
-        } else {
-            return defaultValue;
-        }
-    }  
-
-    /**
-     *  Add an Element with the specified tagname and value
-     *
-     * @param element Parent Element that the new element will be added to
-     * @param tagName TagName to be used for the created Child Element
-     * @param value The value that will be stored in the Element
-     **/
-    public static void addString(Element element, String tagName, String value) {
-        StructuredDocument structuredDocument = element.getRoot();
-        Element childElement = structuredDocument.createElement(tagName, value);
-
-        element.appendChild(childElement);
-    }
-
-    /**
-     *  Get  the value of an element as a String
-     *
-     * @param element Element that contains the value
-     * @return the value converted from a String
-     **/
-    public static String getString(Element element) {
-        return (String) element.getValue();
-    }
-
-    /**
-     *  Get the value of a Child Element 
-     *
-     * @param element The Parant Element
-     * @param tagName The Tag Name of the Child Element that will contain the value
-     * @param defaultValue The return value if there is no Child Element with that Tag Name
-     * @return The value found in the Element
-     **/
-    public static String getString(Element element, String tagName, String defaultValue) {
-        Element childElement = getChildElement(element, tagName);
-               
-        if (childElement != null) {
-            return getString(childElement);
-        } else {
-            return defaultValue;
-        }
-    }
-
-    /**
-     *  Convert a DocumentSerializable object to its XML representation as a String
-     *  
-     *  The Root TagName will be 'documentSerializable' by default
-     *  
-     * @param documentSerializable The Object to be converted to an XML Document
-     * @return The String representation of an XML Document
-     * @throws DocumentSerializationException if Unable to serialize object.
-     **/
-    public static String toXmlString(DocumentSerializable documentSerializable) throws DocumentSerializationException {
-        return toXmlString(documentSerializable, "documentSerializable");
-    }
-
-    /**
-     *  Convert a DocumentSerializable object to its XML representation as a String
-     *  
-     *  The Root TagName will be 'documentSerializable' by default
-     *  
-     * @param documentSerializable The Object to be converted to an XML Document
-     * @param rootTagName The Root tagName for the XML Document
-     * @return The String representation of an XML Document
-     * @throws DocumentSerializationException if Unable to serialize object.
-     **/
-    public static String toXmlString(DocumentSerializable documentSerializable, String rootTagName) throws DocumentSerializationException {
-        try {
-            StringWriter bout = new StringWriter();
-            XMLDocument document = DocumentSerializableUtilities.createStructuredXmlDocument(rootTagName, documentSerializable);
-
-            document.sendToWriter(bout);
-            bout.close();
-                        
-            return bout.toString();
-        } catch (IOException e) {
-            throw new DocumentSerializationException("Error converting to String", e);
-        }
-    }
-       
-    /**
-     *  Write a DocumentSerializable object as an XML Document to a Stream
-     *  
-     *  The Root TagName will be 'documentSerializable' by default
-     *  
-     * @param out The Stream to write the document to
-     * @param documentSerializable The Object to be converted to an XML Document
-     * @throws DocumentSerializationException if Unable to serialize object.
-     * @throws IOException if I/O error while writing
-     **/
-    public static void writeAsXmlString(OutputStream out, DocumentSerializable documentSerializable) throws IOException, DocumentSerializationException {
-        writeAsXmlString(out, documentSerializable, "documentSerializable");
-    }
-       
-    /**
-     *  Write a DocumentSerializable object as an XML Document to a Stream
-     *  
-     *  The Root TagName will be 'documentSerializable' by default
-     *  
-     * @param out The Stream to write the document to
-     * @param rootTagName The Root tagName for the XML Document
-     * @param documentSerializable The Object to be converted to an XML Document
-     * @throws DocumentSerializationException if Unable to serialize object.
-     * @throws IOException if I/O error while writing
-     **/
-    public static void writeAsXmlString(OutputStream out, DocumentSerializable documentSerializable, String rootTagName) throws IOException, DocumentSerializationException {
-        StructuredDocument document = DocumentSerializableUtilities.createStructuredXmlDocument(rootTagName, documentSerializable);
-
-        document.sendToStream(out);
-    }
-
-    /**
-     *  Write a DocumentSerializable object as an XML Document to StdErr
-     *  
-     *  The Root TagName will be 'documentSerializable' by default
-     *  
-     * @param documentSerializable The DocumentSerializable to be printed.
-     **/
-    public static void printAsXmlString(DocumentSerializable documentSerializable) {
-        try {
-            if (documentSerializable == null) {
-                System.err.println("<null DocumentSerializable>");
-            } else {
-                writeAsXmlString(System.err, documentSerializable);
-            }
-        } catch (Exception e) {
-            System.err.println("<Error converting DocumentSerializable to XML doc: " + e);
-        }
-    }
-       
-    /**
-     *  Create a DocumentSerializable Object from an XML Document
-     *  
-     * @param buf The XML document contained in a String
-     * @param clazz The Class of the resurrected object (must implement DocumentSerializable and have a public no-arg constructor)
-     * @return An object of type 'clazz'
-     * @throws DocumentSerializationException if Unable to parse object.
-     **/
-    public static DocumentSerializable getDocumentSerializableFromXml(String buf, Class clazz) throws DocumentSerializationException {
-        try {
-            XMLDocument xmlDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8
-                    ,
-                    new StringReader(buf));
-
-            return getDocumentSerializable(xmlDoc.getRoot(), clazz);                   
-        } catch (IOException readErr) {
-            throw new DocumentSerializationException("Unable to read the document", readErr);
-        } catch (JxtaException e) {
-            throw new DocumentSerializationException("Unable to get the document", e);
-        }
-    }
-
-    /**
-     *  Create a DocumentSerializable Object from an XML Document
-     *  
-     * @param buf The XML document contained in a byte buffer
-     * @param clazz The Class of the resurrected object (must implement DocumentSerializable and have a public no-arg constructor)
-     * @return An object of type 'clazz'
-     * @throws DocumentSerializationException if Unable to parse object.
-     **/
-    public static DocumentSerializable getDocumentSerializableFromXml(byte buf[], Class clazz) throws DocumentSerializationException {
-        return getDocumentSerializableFromXml(new ByteArrayInputStream(buf), clazz);
-    }
-
-    /**
-     *  Create a DocumentSerializable Object from an XML Document
-     *  
-     * @param in The Stream containing an XML Document to be read
-     * @param clazz The Class of the resurrected object (must implement DocumentSerializable and have a public no-arg constructor)
-     * @return An object of type 'clazz'
-     * @throws DocumentSerializationException if Unable to parse object.
-     **/
-    public static DocumentSerializable getDocumentSerializableFromXml(InputStream in, Class clazz) throws DocumentSerializationException {
-        try {
-            XMLDocument xmlDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, in);
-
-            return getDocumentSerializable(xmlDoc.getRoot(), clazz);                   
-        } catch (IOException readErr) {
-            throw new DocumentSerializationException("Unable to read the document", readErr);
-        } catch (JxtaException e) {
-            throw new DocumentSerializationException("Unable to get the document", e);
-        }
-    }
-
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/documentSerializable/DocumentSerializationException.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/documentSerializable/DocumentSerializationException.java
deleted file mode 100644 (file)
index e9d1e41..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.util.documentSerializable;
-
-
-import net.jxta.exception.JxtaException;
-
-
-/**
- **/
-public class DocumentSerializationException extends JxtaException {
-    public DocumentSerializationException(String message) {
-        super(message);
-    }
-
-    public DocumentSerializationException(String message, Exception exception) {
-        super(message, exception);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/net/jxta/util/package.html
deleted file mode 100644 (file)
index c4c1b99..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    A collection of utility classes used by the JXTA implementation and/or
-                               useful to users of the JXTA API.                        
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/api/src/sun/net/www/protocol/urn/Handler.java b/p2pproxy/dependencies-src/jxse-src-2.5/api/src/sun/net/www/protocol/urn/Handler.java
deleted file mode 100644 (file)
index d665d80..0000000
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package sun.net.www.protocol.urn;
-
-
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.URLStreamHandler;
-
-import java.io.IOException;
-
-
-/**
- * Handler for URN
- *
- * @deprecated Use the URI interfaces for JXTA IDs instead of the URLs.
- */
-@Deprecated
-public final class Handler extends URLStreamHandler {
-    
-    public static Handler handler = new Handler();
-    
-    /**
-     * Creates new Handler
-     **/
-    public Handler() {}
-    
-    /**
-     *
-     **/
-    @Override
-    public URLConnection openConnection(URL connect) throws
-                IOException {
-        return null;
-    }
-    
-    /**
-     *
-     *  Private replacement for toHexString since we need the leading 0 digits.
-     *  Returns a String containing byte value encoded as 2 hex characters.
-     *
-     *  @param  theByte a byte containing the value to be encoded.
-     *  @return        String containing byte value encoded as 2 hex characters.
-     */
-    private static String toHexDigits(byte theByte) {
-        final char[] HEXDIGITS = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
-        StringBuilder result = new StringBuilder(2);
-        
-        result.append(HEXDIGITS[(theByte >>> 4) & 15]);
-        result.append(HEXDIGITS[theByte & 15]);
-        
-        return result.toString();
-    }
-    
-    /**
-     *
-     * 2.4 of RFC2141 says we have to encode these chars.
-     *
-     **/
-    static final String needsEncoding = "%/?#" + "\\\"&<>[]^`{|}~";
-    
-    /**
-     *
-     * The byte values of the chars we have to encode.
-     *
-     **/
-    static final byte[] encodesTo = new byte[] {
-        0x25, 0x2F, 0x3F, 0x23, 0x5c, 0x22, 0x26, 0x3C, 0x3E, 0x5B, 0x5D, 0x5E, 0x60, 0x7B, 0x7C, 0x7D, 0x7E
-    };
-    
-    /**
-     *  Encode a string such that it is in a form acceptable for presentation
-     *  as a URN. First the string is encoded as UTF8 so that any high byte
-     *  unicode chars are ascii representable. Then any special characters in
-     *  the string are escaped using the URN % syntax.
-     *
-     *  @param source   the string to encode
-     *  @return String containing the URN acceptable presentation form.
-     **/
-    public static String encodeURN(String source) {
-        String asISO8559_1 = null;
-        
-        try {
-            // first we get its bytes using UTF to encode its characters.
-            byte[] asBytes = source.getBytes("UTF8");
-            
-            // then read it back in as ISO-8859-1. This allows us to see the
-            // bytes with no translation. This string will have chars in the
-            // range 0-255 only.
-            asISO8559_1 = new String(asBytes, "ISO-8859-1");
-        } catch (java.io.UnsupportedEncodingException never) {
-            // these 2 encodings are required by all java implementations
-            // so this exception will never happen.
-            ;
-        }
-        
-        StringBuilder result = new StringBuilder(asISO8559_1.length());
-        
-        // now do the % encoding for all chars which need it.
-        for (int eachChar = 0; eachChar < asISO8559_1.length(); eachChar++) {
-            char aChar = asISO8559_1.charAt(eachChar);
-            
-            // null char is bad
-            if (0 == aChar) {
-                throw new IllegalArgumentException("URN string cannot contain null char");
-            }
-            
-            // in the excluded range
-            if ((aChar <= 32) || (aChar >= 127)) {
-                result.append('%');
-                result.append(toHexDigits((byte) aChar));
-            } else {
-                int inSpecials = needsEncoding.indexOf(aChar);
-                
-                // one of the special chars which must be encoded?
-                if (-1 != inSpecials) {
-                    result.append('%');
-                    result.append(toHexDigits(encodesTo[inSpecials]));
-                } else {
-                    result.append(aChar);
-                } // needed no encoding
-            }
-        }
-        
-        return result.toString();
-    }
-    
-    /**
-     *  Converts a string which was previously conveted to URN format back into
-     *  the unencoded format.
-     *
-     *  @param source   the string to decode
-     *  @return String containing the decoded form of the URN.
-     **/
-    public static String decodeURN(String source) {
-        StringBuilder result = new StringBuilder(source.length());
-
-        // remove the % encoding for all chars which needed it.
-        for (int eachChar = 0; eachChar < source.length(); eachChar++) {
-            char aChar = source.charAt(eachChar);
-
-            if ('%' != aChar) {
-                result.append(aChar);
-            } else {
-                String twoChars = source.substring(eachChar + 1, eachChar + 3);
-
-                result.append((char) Integer.parseInt(twoChars, 16));
-                eachChar += 2;
-            }
-        }
-        String fromUTF8 = null;
-
-        try {
-            // first we get its bytes using ISO-8859-1 to encode its characters.
-            // ISO-8859-1 does no mapping. Each byte is the same as the character.
-            byte[] asBytes = result.toString().getBytes("ISO-8859-1");
-
-            // then read it back in as UTF8. This gets us any high byte chars back
-            fromUTF8 = new String(asBytes, "UTF8");
-        } catch (java.io.UnsupportedEncodingException never) {
-            // these 2 encodings are required so this exception will never happen
-            ;
-        }
-        return fromUTF8;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/META-INF/services/net.jxta.document.Advertisement b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/META-INF/services/net.jxta.document.Advertisement
deleted file mode 100644 (file)
index 1efce7a..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# The list of Advertisement Instance Classes included with this distribution.
-# Used by AdvertisementFactory
-net.jxta.impl.protocol.PeerAdv
-net.jxta.impl.protocol.PlatformConfig
-net.jxta.impl.protocol.PeerGroupAdv
-net.jxta.impl.protocol.PeerGroupConfigAdv
-net.jxta.impl.protocol.TCPAdv
-net.jxta.impl.protocol.HTTPAdv
-net.jxta.impl.protocol.PSEConfigAdv
-net.jxta.impl.protocol.RdvConfigAdv
-net.jxta.impl.protocol.DiscoveryConfigAdv
-net.jxta.impl.protocol.PipeAdv
-net.jxta.impl.protocol.RelayConfigAdv
-net.jxta.impl.protocol.RdvAdv
-net.jxta.impl.protocol.ModuleImplAdv
-net.jxta.impl.protocol.ModuleSpecAdv
-net.jxta.impl.protocol.ModuleClassAdv
-net.jxta.impl.protocol.RouteAdv
-net.jxta.impl.protocol.AccessPointAdv
-net.jxta.impl.protocol.SignedAdv
-net.jxta.impl.protocol.GroupConfig
-
-org.linphone.p2pproxy.core.P2pUserProfileAdvertisement
\ No newline at end of file
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/META-INF/services/net.jxta.document.StructuredDocument b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/META-INF/services/net.jxta.document.StructuredDocument
deleted file mode 100644 (file)
index 443209e..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# The list of StructuredDocument Instance Classes included in this distribution.
-# Used by StructuredDocumentFactory.
-net.jxta.impl.document.PlainTextDocument
-net.jxta.impl.document.LiteXMLDocument
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/META-INF/services/net.jxta.endpoint.WireFormatMessage b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/META-INF/services/net.jxta.endpoint.WireFormatMessage
deleted file mode 100644 (file)
index d056a12..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# The list of MessageWireFormat Instance Classes included in this distribution.
-# Used by MessageWireFormatFactory.
-net.jxta.impl.endpoint.WireFormatMessageBinary
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/META-INF/services/net.jxta.id.ID b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/META-INF/services/net.jxta.id.ID
deleted file mode 100644 (file)
index 0b61d94..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# List of ID types supported.
-net.jxta.impl.id.UUID.IDFormat
-net.jxta.impl.id.CBID.IDFormat
-net.jxta.impl.id.binaryID.IDFormat
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/META-INF/services/net.jxta.platform.Module b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/META-INF/services/net.jxta.platform.Module
deleted file mode 100644 (file)
index 1cd8292..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-# The list of Builtin Module Implementation Classes included with this distribution.
-# Used by PeerGroup Implementation.
-
-urn:jxta:uuid-deadbeefdeafbabafeedbabe000000020106 net.jxta.impl.resolver.ResolverServiceImpl Reference Implementation of the Resolver service
-urn:jxta:uuid-deadbeefdeafbabafeedbabe000000030106 net.jxta.impl.discovery.DiscoveryServiceImpl Reference Implementation of the Discovery service
-urn:jxta:uuid-deadbeefdeafbabafeedbabe000000040106 net.jxta.impl.pipe.PipeServiceImpl Reference Implementation of the Pipe Service
-urn:jxta:uuid-deadbeefdeafbabafeedbabe000000050106 net.jxta.impl.membership.none.NoneMembershipService None Membership Service
-urn:jxta:uuid-deadbeefdeafbabafeedbabe000000050206 net.jxta.impl.membership.passwd.PasswdMembershipService Password Membership Service.
-urn:jxta:uuid-deadbeefdeafbabafeedbabe000000050306 net.jxta.impl.membership.pse.PSEMembershipService PSE Membership Service
-urn:jxta:uuid-deadbeefdeafbabafeedbabe000000060106 net.jxta.impl.rendezvous.RendezVousServiceImpl Reference Implementation of the Rendezvous Service
-urn:jxta:uuid-deadbeefdeafbabafeedbabe000000070106 net.jxta.impl.peer.PeerInfoServiceImpl Reference Implementation of the Peerinfo Service
-urn:jxta:uuid-deadbeefdeafbabafeedbabe000000080106 net.jxta.impl.endpoint.EndpointServiceImpl Reference Implementation of the Endpoint service
-urn:jxta:uuid-deadbeefdeafbabafeedbabe000000090106 net.jxta.impl.endpoint.tcp.TcpTransport Reference Implementation of the TCP Message Transport
-urn:jxta:uuid-deadbeefdeafbabafeedbabe0000000A0106 net.jxta.impl.endpoint.servlethttp.ServletHttpTransport Reference Implementation of the HTTP Message Transport
-urn:jxta:uuid-deadbeefdeafbabafeedbabe0000000B0106 net.jxta.impl.endpoint.router.EndpointRouter Reference Implementation of the Router Message Transport
-urn:jxta:uuid-deadbeefdeafbabafeedbabe0000000D0106 net.jxta.impl.endpoint.tls.TlsTransport Reference Implementation of the TLS Message Transport
-urn:jxta:uuid-deadbeefdeafbabafeedbabe0000000E0106 net.jxta.impl.proxy.ProxyService Reference Implementation of the JXME Proxy Service
-urn:jxta:uuid-deadbeefdeafbabafeedbabe0000000F0106 net.jxta.impl.endpoint.relay.RelayTransport Reference Implementation of the Relay Message Transport
-urn:jxta:uuid-deadbeefdeafbabafeedbabe000000100106 net.jxta.impl.access.always.AlwaysAccessService Always Access Service
-urn:jxta:uuid-deadbeefdeafbabafeedbabe000000100206 net.jxta.impl.access.simpleACL.SimpleACLAccessService Simple ACL Access Service
-urn:jxta:uuid-deadbeefdeafbabafeedbabe000000100306 net.jxta.impl.access.pse.PSEAccessService PSE Access Service
-urn:jxta:uuid-deadbeefdeafbabafeedbabe000000110106 net.jxta.impl.endpoint.cbjx.CbJxTransport Reference Implementation of the Cryptobased-ID Message Transport
-urn:jxta:uuid-0C801F65D38F421C9884D706B337B8110106 net.jxta.impl.endpoint.mcast.McastTransport Reference Implementation of the IP Multicast Message Transport
-
-# Since the peer groups refer to other modules in their ModuleImplAdvertisements it's necessary to load them last.
-
-urn:jxta:uuid-deadbeefdeafbabafeedbabe000000010106 net.jxta.impl.peergroup.Platform Standard World PeerGroup Reference Implementation
-urn:jxta:uuid-deadbeefdeafbabafeedbabe000000010206 net.jxta.impl.peergroup.ShadowPeerGroup Default Network PeerGroup Reference Implementation
-urn:jxta:uuid-deadbeefdeafbabafeedbabe000000010306 net.jxta.impl.peergroup.StdPeerGroup General Purpose Peer Group Implementation
-
\ No newline at end of file
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/Version.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/Version.java
deleted file mode 100644 (file)
index 1762978..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- *
- * ====================================================================
- *
- * Copyright (c) 2001 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl;
-
-import java.lang.Package;
-
-/**
- * Provides easy access to Java Package information for the JXSE Implementation.
- */
-public final class Version {
-    
-    /**
-     *  Returns the package.
-     *
-     *  @return The specification title.
-     */
-    public static Package getPackage() {
-        return Version.class.getPackage();
-    }
-    
-    /**
-     *  Returns the specification title.
-     *
-     *  @return The specification title.
-     */
-    public static String getSpecTitle() {
-        Package versionPackage = Version.class.getPackage();
-        
-        return versionPackage.getSpecificationTitle();
-    }
-            
-    /**
-     *  Returns the specification vendor.
-     *
-     *  @return The specification vendor.
-     */
-    public static String getSpecVendor() {
-        Package versionPackage = Version.class.getPackage();
-        
-        return versionPackage.getSpecificationVendor();
-    }
-            
-    /**
-     *  Returns the specification version.
-     *
-     *  @return The specification version.
-     */
-    public static String getSpecVersion() {
-        Package versionPackage = Version.class.getPackage();
-        
-        return versionPackage.getSpecificationVersion();
-    }
-            
-    /**
-     *  Returns the specification title.
-     *
-     *  @return The specification title.
-     */
-    public static String getImplTitle() {
-        Package versionPackage = Version.class.getPackage();
-        
-        return versionPackage.getImplementationTitle();
-    }
-            
-    /**
-     *  Returns the specification vendor.
-     *
-     *  @return The specification vendor.
-     */
-    public static String getImplVendor() {
-        Package versionPackage = Version.class.getPackage();
-        
-        return versionPackage.getImplementationVendor();
-    }
-            
-    /**
-     *  Returns the specification version.
-     *
-     *  @return The specification version.
-     */
-    public static String getImplVersion() {
-        Package versionPackage = Version.class.getPackage();
-        
-        return versionPackage.getImplementationVersion();
-    }
-            
-    /** 
-     *  This class is a singleton.
-     */
-    private Version() {
-    }    
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/access/AccessList.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/access/AccessList.java
deleted file mode 100644 (file)
index 2ffec1b..0000000
+++ /dev/null
@@ -1,563 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.access;
-
-
-import net.jxta.document.Attributable;
-import net.jxta.document.Attribute;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.XMLElement;
-import net.jxta.document.XMLDocument;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.UndeclaredThrowableException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-
-
-/**
- * Manages Access Permissions.
- */
-public class AccessList {
-    
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(AccessList.class.getName());
-
-    private final static String PEER_TAG = "peer";
-    private final static String NAME_TAG = "name";
-    private final static String DESCRIPTION_TAG = "description";
-    private final static String GRANTALL_TAG = "grantAll";
-    private final static String ACCESS_TAG = "access";
-    private final static String ACCESS_TAG_DENY_VALUE = "deny";
-    private final static String ACCESS_TAG_GRANT_VALUE = "grant";
-    
-    protected final Map<ID, Entry> accessMap = new HashMap<ID, Entry>();
-    
-    String description = null;
-    boolean grantAll = false;
-    
-    /**
-     * Default Constructor
-     */
-    public AccessList() {}
-
-    /**
-     * Initialize access list from an InputStream
-     *
-     * @param stream the input stream
-     * @throws java.io.IOException if an io error occurs
-     */
-    public AccessList(InputStream stream) throws IOException {
-        init(stream);
-    }
-
-    /**
-     * Initialize access list from a URI
-     * <p/>
-     * e.g. file:/export/dist/acl.xml, e.g. http://configserver.net/edge.acl
-     *
-     * @param uri the URI to the access control list
-     * @throws IOException if an i/o error occurs
-     */
-    public AccessList(URI uri) throws IOException {
-        init(uri);
-    }
-
-    /**
-     * Initialize the access list from a URI
-     *
-     * @param uri the refresh URI
-     * @throws IOException if an io error occurs
-     */
-    public void init(URI uri) throws IOException {
-        InputStream input = getInputStream(uri);
-
-        init(input);
-        input.close();
-    }
-
-    /**
-     * Initialize access list from a file
-     *
-     * @param fromFile file to init from
-     * @throws IOException if an io error occurs
-     */
-    public void init(File fromFile) throws IOException {
-        InputStream is = new FileInputStream(fromFile);
-
-        init(is);
-        is.close();
-    }
-
-    /**
-     * Refresh access list from a file
-     *
-     * @param file file to refresh from
-     * @deprecated use URI variant
-     */
-    @Deprecated
-    public void refresh(File file) {
-        if (file.exists()) {
-            try {
-                InputStream is = new FileInputStream(file);
-
-                refresh(is);
-                is.close();
-            } catch (IOException io) {// bad input
-            }
-        }
-    }
-
-    /**
-     * refresh the access list from a stream
-     *
-     * @param stream the input stream
-     * @throws IOException if an io error occurs
-     */
-    public void refresh(InputStream stream) throws IOException {
-        AccessList tmp = new AccessList(stream);
-
-        refresh(tmp);
-    }
-
-    /**
-     * refresh the access list from a URI
-     *
-     * @param uri the refresh URI
-     * @throws IOException if an io error occurs
-     */
-    public void refresh(URI uri) throws IOException {
-        InputStream input = getInputStream(uri);
-        AccessList tmp = new AccessList(input);
-
-        refresh(tmp);
-        input.close();
-    }
-
-    private InputStream getInputStream(URI uri) throws IOException {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Loading ACL : " + uri.toString());
-        }
-
-        URL url = uri.toURL();
-
-        URLConnection connection = url.openConnection();
-
-        connection.setDoInput(true);
-        return connection.getInputStream();
-    }
-
-    private void init(InputStream stream) throws IOException {
-        XMLDocument doc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, stream);
-        
-        initialize(doc);
-    }
-
-    /**
-     * @param map The map of addresses and permissions.
-     */
-    public AccessList(Map<ID, Entry> map) {
-        this.accessMap.clear();
-        this.accessMap.putAll(map);
-    }
-
-    /**
-     * Construct from a StructuredDocument
-     *
-     * @param root root element
-     */
-    public AccessList(Element root) {
-        if (!(root instanceof XMLElement)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-        }
-
-        XMLElement doc = (XMLElement) root;
-
-        if (!getAdvertisementType().equals(doc.getName())) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-        
-        initialize(doc);
-    }
-
-    /**
-     * gets the description of this access control
-     *
-     * @return the document description
-     */
-    public String getDescrption() {
-        return description;
-    }
-
-    /**
-     * Determine if all access is granted.
-     *
-     * @return If {@code true} then all access requests will be granted.
-     */
-    public boolean getGrantAll() {
-        return grantAll;
-    }
-
-    /**
-     * Allows/denies all access
-     *
-     * @param grantAll If {@code true} then all access requests will be granted.
-     */
-    public void setGrantAll(boolean grantAll) {
-        this.grantAll = grantAll;
-    }
-
-    /**
-     * sets the ACL description
-     *
-     * @param description The new description
-     */
-    public void setDescrption(String description) {
-        this.description = description;
-    }
-
-    /**
-     * sets the entries list
-     *
-     * @param map The new access map
-     */
-    protected void setEntries(Map<ID, Entry> map) {
-        accessMap.clear();
-        accessMap.putAll(map);
-    }
-
-    /**
-     * Refreshes the access list
-     *
-     * @param acl The access list to refresh from
-     */
-    private void refresh(AccessList acl) {
-        grantAll = acl.grantAll;
-        description = acl.description;
-        accessMap.clear();
-        accessMap.putAll(acl.accessMap);
-    }
-
-    /**
-     * Adds an ACL entry
-     *
-     * @param entry the entry to add
-     */
-    public void add(Entry entry) {
-        if (!accessMap.containsKey(entry.id)) {
-            accessMap.put(entry.id, entry);
-        }
-    }
-
-    /**
-     * Removes an ACL entry
-     *
-     * @param entry the entry to remove
-     */
-    public void remove(Entry entry) {
-        if (accessMap.containsKey(entry.id)) {
-            accessMap.remove(entry.id);
-        }
-    }
-
-    /**
-     * Determines if an entry has access
-     * 
-     * @param id the PeerID
-     * @return ture if access is allowed, always true if grantAll is set
-     */
-    public boolean isAllowed(ID id) {
-        if (grantAll) {
-            return true;
-        } else if (accessMap.containsKey(id)) {
-            Entry entry = accessMap.get(id);
-
-            return entry.access;
-        } else {
-            return false;
-        }
-    }
-
-    /**
-     * gets the entries list
-     *
-     * @return List The List containing Entries
-     */
-    public Map<ID, Entry> getAccessMap() {
-        return accessMap;
-    }
-
-    /**
-     * Returns the Document
-     *
-     * @param asMimeType mime type encoding
-     * @return The document value
-     */
-    public Document getDocument(MimeMediaType asMimeType) {
-        StructuredDocument adv = StructuredDocumentFactory.newStructuredDocument(asMimeType, getAdvertisementType());
-
-        if (adv instanceof XMLDocument) {
-            ((XMLDocument) adv).addAttribute("xmlns:jxta", "http://jxta.org");
-        }
-
-        Element e;
-
-        if (grantAll) {
-            e = adv.createElement(GRANTALL_TAG, Boolean.valueOf(grantAll).toString());
-            adv.appendChild(e);
-        }
-        
-        if (description != null) {
-            e = adv.createElement(DESCRIPTION_TAG, description);
-            adv.appendChild(e);
-        }
-        
-        for (Object o : accessMap.values()) {
-            Entry entry = (Entry) o;
-
-            if (entry.id == null && entry.name == null) {
-                // skip bad entries
-                continue;
-            }
-            e = adv.createElement(PEER_TAG, entry.id.toString());
-            adv.appendChild(e);
-            ((Attributable) e).addAttribute(NAME_TAG, entry.name);
-            if (entry.access) {
-                ((Attributable) e).addAttribute(ACCESS_TAG, ACCESS_TAG_GRANT_VALUE);
-            } else {
-                ((Attributable) e).addAttribute(ACCESS_TAG, ACCESS_TAG_DENY_VALUE);
-            }
-        }
-        return adv;
-    }
-
-    /**
-     * Process an individual element from the document.
-     *
-     * @param doc the element
-     */
-    protected void initialize(XMLElement doc) {
-
-        Enumeration elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            XMLElement elem = (XMLElement) elements.nextElement();
-            
-            if (GRANTALL_TAG.equals(elem.getName())) {
-                grantAll = Boolean.getBoolean(elem.getTextValue());
-                if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-                    LOG.config("Grant all access = [ " + grantAll + " ]");
-                }
-
-                continue;
-            }
-            
-            if (DESCRIPTION_TAG.equals(elem.getName())) {
-                description = elem.getTextValue();
-                if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-                    LOG.config("Loading [ " + description + " ] access list :");
-                }
-                
-                continue;
-            }
-            
-            if (PEER_TAG.equals(elem.getName())) {
-                String name = "NA";
-                Attribute nameAttr = elem.getAttribute(NAME_TAG);
-
-                if (nameAttr != null) {
-                    name = nameAttr.getValue();
-                }
-                String access = ACCESS_TAG_GRANT_VALUE;
-                Attribute accessAttr = elem.getAttribute(ACCESS_TAG);
-
-                if (accessAttr != null) {
-                    access = accessAttr.getValue();
-                }
-                boolean acl = ACCESS_TAG_GRANT_VALUE.equalsIgnoreCase(access);
-                
-                ID pid;
-
-                try {
-                    URI id = new URI(elem.getTextValue().trim());
-
-                    pid = IDFactory.fromURI(id);
-                } catch (URISyntaxException badID) {
-                    throw new IllegalArgumentException("unknown ID format in advertisement: " + elem.getTextValue());
-                }
-                
-                Entry entry = new Entry(pid, name, acl);
-
-                if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-                    LOG.config("Adding entry to access list :" + entry);
-                }
-                
-                accessMap.put(entry.id, entry);
-                
-                continue;
-            }
-            
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Unrecognized tag : " + elem.getName());
-            }            
-        }
-    }
-
-    /**
-     * returns the document string representation of this object
-     *
-     * @return String representation of the of this message type
-     */
-    @Override
-    public String toString() {
-
-        try {
-            XMLDocument doc = (XMLDocument) getDocument(MimeMediaType.XMLUTF8);
-
-            return doc.toString();
-        } catch (Throwable e) {
-            if (e instanceof Error) {
-                throw (Error) e;
-            } else if (e instanceof RuntimeException) {
-                throw (RuntimeException) e;
-            } else {
-                throw new UndeclaredThrowableException(e);
-            }
-        }
-    }
-
-    /**
-     * All messages have a type (in xml this is &#0033;doctype) which
-     * identifies the message
-     *
-     * @return String "jxta:XACL"
-     */
-    public static String getAdvertisementType() {
-        return "jxta:XACL";
-    }
-
-    /**
-     * Entries class
-     */
-    public final static class Entry {
-
-        /**
-         * Entry ID entry id
-         */
-        public final ID id;
-
-        /**
-         * Entry name
-         */
-        public final String name;
-
-        /**
-         * Entry name
-         */
-        public final boolean access;
-
-        /**
-         * Creates a Entry with id and name
-         *
-         * @param id     id
-         * @param name   node name
-         * @param access access control
-         */
-
-        public Entry(ID id, String name, boolean access) {
-            this.id = id;
-            this.name = name;
-            this.access = access;
-        }
-
-        @Override
-        public String toString() {
-            return "[" + name + "  access = " + access + " : " + id.toString() + "]";
-        }
-
-        @Override
-        public boolean equals(Object obj) {
-            return this == obj || (obj != null && id.equals(((Entry) obj).id));
-        }
-
-        @Override
-        public int hashCode() {
-            return id.hashCode();
-        }
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/access/always/AlwaysAccessService.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/access/always/AlwaysAccessService.java
deleted file mode 100644 (file)
index 0f7e55f..0000000
+++ /dev/null
@@ -1,415 +0,0 @@
-/*
- * Copyright (c) 2003-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.access.always;
-
-
-import java.net.URI;
-import java.util.Enumeration;
-
-import java.net.URISyntaxException;
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-import net.jxta.access.AccessService;
-import net.jxta.credential.Credential;
-import net.jxta.credential.PrivilegedOperation;
-import net.jxta.document.Advertisement;
-import net.jxta.document.Attributable;
-import net.jxta.document.Attribute;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.document.TextElement;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.service.Service;
-
-
-/**
- * A minimal {@link net.jxta.access.AccessService} implementation.
- *
- * <p/><code>doAccessCheck</code> will return <code>PERMITTED</code> to all
- * queries when provided any valid credential and operation.
- *
- * <p/>If the subject of the Credential or the operation is equivalent to the
- * String "DENY" then the operation will be <code>DISALLOWED</code>.
- *
- * @see net.jxta.access.AccessService
- **/
-public class AlwaysAccessService implements AccessService {
-    
-    /**
-     *  log4J Logger
-     **/
-    private final static Logger LOG = Logger.getLogger(AlwaysAccessService.class.getName());
-    
-    /**
-     *  Operation for the Always Access Service.
-     **/
-    private static class AlwaysOperation implements PrivilegedOperation {
-        
-        AlwaysAccessService source;
-        
-        String op;
-        
-        Credential offerer;
-        
-        protected AlwaysOperation(AlwaysAccessService source, String op, Credential offerer) {
-            this.source = source;
-            this.op = op;
-            this.offerer = offerer;
-        }
-        
-        protected AlwaysOperation(AlwaysAccessService source, Element root) {
-            this.source = source;
-            initialize(root);
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public ID getPeerGroupID() {
-            return source.getPeerGroup().getPeerGroupID();
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public ID getPeerID() {
-            return null;
-        }
-        
-        /**
-         * {@inheritDoc}
-         *
-         * <p/>AlwaysOperation are always valid.
-         **/
-        public boolean isExpired() {
-            return false;
-        }
-        
-        /**
-         * {@inheritDoc}
-         *
-         * <p/>AlwaysOperation are always valid.
-         **/
-        public boolean isValid() {
-            return true;
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public Object getSubject() {
-            return op;
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public Service getSourceService() {
-            return source;
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public StructuredDocument getDocument(MimeMediaType as) throws Exception {
-            StructuredDocument doc = StructuredDocumentFactory.newStructuredDocument(as, "jxta:Cred");
-            
-            if (doc instanceof Attributable) {
-                ((Attributable) doc).addAttribute("xmlns:jxta", "http://jxta.org");
-                ((Attributable) doc).addAttribute("xml:space", "preserve");
-                ((Attributable) doc).addAttribute("type", "jxta:AlwaysOp");
-            }
-            
-            Element e = doc.createElement("PeerGroupID", getPeerGroupID().toString());
-
-            doc.appendChild(e);
-            
-            e = doc.createElement("Operation", op);
-            doc.appendChild(e);
-            
-            StructuredDocumentUtils.copyElements(doc, doc, offerer.getDocument(as), "Offerer");
-            
-            return doc;
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public Credential getOfferer() {
-            return offerer;
-        }
-        
-        /**
-         *  Process an individual element from the document.
-         *
-         *  @param elem the element to be processed.
-         *  @return true if the element was recognized, otherwise false.
-         **/
-        protected boolean handleElement(TextElement elem) {
-            if (elem.getName().equals("PeerGroupID")) {
-                try {
-                    URI gID = new URI(elem.getTextValue().trim());
-                    ID pgid = IDFactory.fromURI(gID);
-
-                    if (!pgid.equals(getPeerGroupID())) {
-                        throw new IllegalArgumentException(
-                                "Operation is from a different group. " + pgid + " != " + getPeerGroupID());
-                    }
-                } catch (URISyntaxException badID) {
-                    throw new IllegalArgumentException("Bad ID in advertisement: " + elem.getTextValue());
-                } catch (ClassCastException badID) {
-                    throw new IllegalArgumentException("Id is not a group id: " + elem.getTextValue());
-                }
-                return true;
-            }
-            
-            if (elem.getName().equals("Operation")) {
-                op = elem.getTextValue();
-                return true;
-            }
-            
-            if (elem.getName().equals("Offerer")) {
-                try {
-                    offerer = source.getPeerGroup().getMembershipService().makeCredential(elem);
-                } catch (Throwable failed) {
-                    throw new IllegalArgumentException("Offerer credential could not be constructed" + failed);
-                }
-                return true;
-            }
-            
-            // element was not handled
-            return false;
-        }
-        
-        /**
-         *  Initialize from a portion of a structured document.
-         **/
-        protected void initialize(Element root) {
-            
-            if (!TextElement.class.isInstance(root)) {
-                throw new IllegalArgumentException(getClass().getName() + " only supports TextElement");
-            }
-            
-            TextElement doc = (TextElement) root;
-            
-            String typedoctype = "";
-
-            if (root instanceof Attributable) {
-                Attribute itsType = ((Attributable) root).getAttribute("type");
-
-                if (null != itsType) {
-                    typedoctype = itsType.getValue();
-                }
-            }
-            
-            String doctype = doc.getName();
-            
-            if (!doctype.equals("jxta:AlwaysOp") && !doctype.equals("jxta:Cred") || !"jxta:AlwaysOp".equals(typedoctype)) {
-                throw new IllegalArgumentException(
-                        "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-            }
-            
-            Enumeration elements = doc.getChildren();
-            
-            while (elements.hasMoreElements()) {
-                TextElement elem = (TextElement) elements.nextElement();
-
-                if (!handleElement(elem)) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Unhandleded element \'" + elem.getName() + "\' in " + doc.getName());
-                    }
-                }
-            }
-            
-            // sanity check time!
-            
-            if (null == op) {
-                throw new IllegalArgumentException("operation was never initialized.");
-            }
-            
-            if (null == offerer) {
-                throw new IllegalArgumentException("offerer was never initialized.");
-            }
-        }
-    }
-    
-    PeerGroup group;
-    
-    ModuleImplAdvertisement implAdvertisement;
-    
-    /**
-     *  Default Constructor
-     **/
-    public AlwaysAccessService() {}
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public void init(PeerGroup group, ID assignedID, Advertisement implAdv) throws PeerGroupException {
-        implAdvertisement = (ModuleImplAdvertisement) implAdv;
-        this.group = group;
-        
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring Always Access Service : " + assignedID);
-
-            configInfo.append("\n\tImplementation:");
-            configInfo.append("\n\t\tModule Spec ID: " + implAdvertisement.getModuleSpecID());
-            configInfo.append("\n\t\tImpl Description: " + implAdvertisement.getDescription());
-            configInfo.append("\n\t\tImpl URI : " + implAdvertisement.getUri());
-            configInfo.append("\n\t\tImpl Code : " + implAdvertisement.getCode());
-            configInfo.append("\n\tGroup Params:");
-            configInfo.append("\n\t\tGroup: " + group.getPeerGroupName());
-            configInfo.append("\n\t\tGroup ID: " + group.getPeerGroupID());
-            configInfo.append("\n\t\tPeer ID: " + group.getPeerID());
-            LOG.config(configInfo.toString());
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public int startApp(String[] args) {
-        return 0;
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public void stopApp() {}
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public ModuleImplAdvertisement getImplAdvertisement() {
-        return implAdvertisement;
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public AlwaysAccessService getInterface() {
-        return this;
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    PeerGroup getPeerGroup() {
-        return group;
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public AccessResult doAccessCheck(PrivilegedOperation op, Credential cred) {
-        if (null == cred) {
-            return (null == op)
-                    ? AccessResult.PERMITTED
-                    : ("DENY".equals(op.getSubject()) ? AccessResult.DISALLOWED : AccessResult.PERMITTED);
-        }
-        
-        if (!cred.isValid()) {
-            return AccessResult.DISALLOWED;
-        }
-        
-        if ("DENY".equals(cred.getSubject())) {
-            return AccessResult.DISALLOWED;
-        }
-        
-        if (null == op) {
-            return AccessResult.PERMITTED;
-        }
-                
-        if (!op.isValid()) {
-            return AccessResult.DISALLOWED;
-        }
-        
-        return "DENY".equals(op.getSubject()) ? AccessResult.DISALLOWED : AccessResult.PERMITTED;
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public PrivilegedOperation newPrivilegedOperation(Object subject, Credential offerer) {
-        if (!(subject instanceof String)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports String subjects.");
-        }
-        
-        if (!offerer.isValid()) {
-            throw new IllegalArgumentException("offerer is not a valid credential");
-        }
-        
-        return new AlwaysOperation(this, (String) subject, offerer);
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public PrivilegedOperation newPrivilegedOperation(Element source) {
-        return new AlwaysOperation(this, source);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/access/always/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/access/always/package.html
deleted file mode 100644 (file)
index f66f65a..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    A JXTA {@link net.jxta.access.AccessService} implementation which 
-    provides minimal Access Service functionality. This implementation allows
-    all operations involving valid operations and credentials to succeed with
-    the exception of a single special value used for testing.
-
-    @see net.jxta.access.AccessService
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/access/pse/PSEAccessService.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/access/pse/PSEAccessService.java
deleted file mode 100644 (file)
index 4140ad2..0000000
+++ /dev/null
@@ -1,495 +0,0 @@
-/*
- * Copyright (c) 2003-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.access.pse;
-
-
-import java.net.URI;
-import java.security.cert.CertPath;
-import java.security.cert.CertPathValidator;
-import java.security.cert.TrustAnchor;
-import java.security.cert.X509Certificate;
-import java.util.Arrays;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import java.net.URISyntaxException;
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-import net.jxta.access.AccessService;
-import net.jxta.credential.Credential;
-import net.jxta.credential.PrivilegedOperation;
-import net.jxta.document.Advertisement;
-import net.jxta.document.Attributable;
-import net.jxta.document.Attribute;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.document.TextElement;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.exception.JxtaError;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.membership.MembershipService;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.platform.ModuleSpecID;
-import net.jxta.platform.Module;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.protocol.PeerGroupAdvertisement;
-import net.jxta.service.Service;
-
-import net.jxta.impl.membership.pse.PSECredential;
-import net.jxta.impl.membership.pse.PSEMembershipService;
-
-
-/**
- * Implements the {@link net.jxta.access.AccessService} using PKIX validation.
- *
- * FIXME 20060409 bondolo THIS IS AN EARLY DEVELOPMENT RELEASE FOR INVESTIGATING 
- * THE API. IT IS *NOT* SECURE! DO NOT SHIP THIS CODE (IN IT'S CURRENT FORM) IN 
- * A REAL PRODUCT.
- *
- * @see net.jxta.access.AccessService
- * @see net.jxta.impl.membership.pse.PSEMembershipService
- */
-public class PSEAccessService implements AccessService {
-    
-    /**
-     *  Logger.
-     */
-    private final static Logger LOG = Logger.getLogger(PSEAccessService.class.getName());
-    
-    /**
-     * Well known access specification identifier: the pse access service
-     */
-    public final static ModuleSpecID PSE_ACCESS_SPEC_ID = (ModuleSpecID)
-            ID.create(URI.create("urn:jxta:uuid-DeadBeefDeafBabaFeedBabe000000100306"));
-    
-    /**
-     *  Operation for the PSE Access Service.
-     */
-    private static class PSEOperation implements PrivilegedOperation {
-        
-        final PSEAccessService source;
-        
-        PSECredential op;
-        
-        protected PSEOperation(PSEAccessService source, PSECredential op) {
-            this.source = source;
-            this.op = op;
-        }
-        
-        protected PSEOperation(PSEAccessService source, Element root) {
-            this.source = source;
-            initialize(root);
-        }
-        
-        /**
-         * {@inheritDoc}
-         */
-        public ID getPeerGroupID() {
-            return source.getPeerGroup().getPeerGroupID();
-        }
-        
-        /**
-         * {@inheritDoc}
-         */
-        public ID getPeerID() {
-            return null;
-        }
-        
-        /**
-         * {@inheritDoc}
-         *
-         * <p/>AlwaysOperation are always valid.
-         */
-        public boolean isExpired() {
-            return false;
-        }
-        
-        /**
-         * {@inheritDoc}
-         *
-         * <p/>AlwaysOperation are always valid.
-         */
-        public boolean isValid() {
-            return true;
-        }
-        
-        /**
-         * {@inheritDoc}
-         */
-        public PSECredential getSubject() {
-            return op;
-        }
-        
-        /**
-         * {@inheritDoc}
-         */
-        public Service getSourceService() {
-            return source;
-        }
-        
-        /**
-         * {@inheritDoc}
-         *
-         *  FIXME 20060317 bondolo This implementation is not secure. The
-         *  operation should be signed by the offerer.
-         */
-        public StructuredDocument getDocument(MimeMediaType as) throws Exception {
-            StructuredDocument doc = StructuredDocumentFactory.newStructuredDocument(as, "jxta:Cred");
-            
-            if (doc instanceof Attributable) {
-                ((Attributable) doc).addAttribute("xmlns:jxta", "http://jxta.org");
-                ((Attributable) doc).addAttribute("xml:space", "preserve");
-                ((Attributable) doc).addAttribute("type", "jxta:PSEOp");
-            }
-            
-            Element e = doc.createElement("PeerGroupID", getPeerGroupID().toString());
-
-            doc.appendChild(e);
-            
-            e = doc.createElement("Operation", op);
-            doc.appendChild(e);
-                       
-            return doc;
-        }
-        
-        /**
-         * {@inheritDoc}
-         */
-        public PSECredential getOfferer() {
-            return null;
-        }
-        
-        /**
-         *  Process an individual element from the document.
-         *
-         *  @param elem the element to be processed.
-         *  @return true if the element was recognized, otherwise false.
-         */
-        protected boolean handleElement(TextElement elem) {
-            if (elem.getName().equals("PeerGroupID")) {
-                try {
-                    URI gID = new URI(elem.getTextValue().trim());
-                    ID pgid = IDFactory.fromURI(gID);
-
-                    if (!pgid.equals(getPeerGroupID())) {
-                        throw new IllegalArgumentException(
-                                "Operation is from a different group. " + pgid + " != " + getPeerGroupID());
-                    }
-                } catch (URISyntaxException badID) {
-                    throw new IllegalArgumentException("Unusable ID in advertisement: " + elem.getTextValue());
-                } catch (ClassCastException badID) {
-                    throw new IllegalArgumentException("Id is not a group id: " + elem.getTextValue());
-                }
-                return true;
-            }
-            
-            if (elem.getName().equals("Operation")) {
-                op = (PSECredential) source.pseMembership.makeCredential(elem);
-                
-                return true;
-            }
-                       
-            // element was not handled
-            return false;
-        }
-        
-        /**
-         *  Intialize from a portion of a structured document.
-         */
-        protected void initialize(Element root) {
-            
-            if (!TextElement.class.isInstance(root)) {
-                throw new IllegalArgumentException(getClass().getName() + " only supports TextElement");
-            }
-            
-            TextElement doc = (TextElement) root;
-            
-            String typedoctype = "";
-
-            if (root instanceof Attributable) {
-                Attribute itsType = ((Attributable) root).getAttribute("type");
-
-                if (null != itsType) {
-                    typedoctype = itsType.getValue();
-                }
-            }
-            
-            String doctype = doc.getName();
-            
-            if (!doctype.equals("jxta:PSEOp") && !typedoctype.equals("jxta:PSEOp")) {
-                throw new IllegalArgumentException(
-                        "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-            }
-            
-            Enumeration elements = doc.getChildren();
-            
-            while (elements.hasMoreElements()) {
-                TextElement elem = (TextElement) elements.nextElement();
-
-                if (!handleElement(elem)) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Unhandled element \'" + elem.getName() + "\' in " + doc.getName());
-                    }
-                }
-            }
-            
-            // sanity check time!
-            
-            if (null == op) {
-                throw new IllegalArgumentException("operation was never initialized.");
-            }
-        }
-    }
-    
-    /**
-     *  The Peer Group we are working for.
-     */
-    PeerGroup group;
-    
-    /**
-     *  Implementation advertisement for this instance.
-     */
-    ModuleImplAdvertisement implAdvertisement;
-    
-    /**
-     *  The PSE Membership service we are paired with.
-     */
-    PSEMembershipService pseMembership;
-    
-    /**
-     *  If {@code true} then a null credential will be allowed for the null op.
-     */
-    final boolean allowNullCredentialForNullOperation = false;
-    
-    /**
-     *  The default constructor
-     */
-    public PSEAccessService() {}
-    
-    /**
-     * {@inheritDoc}
-     */
-    public void init(PeerGroup group, ID assignedID, Advertisement implAdv) throws PeerGroupException {
-        this.group = group;
-        implAdvertisement = (ModuleImplAdvertisement) implAdv;
-        
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring PSE Access Service : " + assignedID);
-            
-            configInfo.append("\n\tImplementation :");
-            configInfo.append("\n\t\tModule Spec ID: " + implAdvertisement.getModuleSpecID());
-            configInfo.append("\n\t\tImpl Description : " + implAdvertisement.getDescription());
-            configInfo.append("\n\t\tImpl URI : " + implAdvertisement.getUri());
-            configInfo.append("\n\t\tImpl Code : " + implAdvertisement.getCode());
-            
-            configInfo.append("\n\tGroup Params :");
-            configInfo.append("\n\t\tGroup : " + group.getPeerGroupName());
-            configInfo.append("\n\t\tGroup ID : " + group.getPeerGroupID());
-            configInfo.append("\n\t\tPeer ID : " + group.getPeerID());
-            
-            LOG.config(configInfo.toString());
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public int startApp(String[] args) {
-        MembershipService membership = group.getMembershipService();
-        
-        if (null == membership) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is a membership service");
-            }
-            
-            return Module.START_AGAIN_STALLED;
-        }
-        
-        ModuleImplAdvertisement membershipImplAdv = (ModuleImplAdvertisement) membership.getImplAdvertisement();
-        
-        if ((null != membershipImplAdv) && PSEMembershipService.pseMembershipSpecID.equals(membershipImplAdv.getModuleSpecID())
-                && (membership instanceof PSEMembershipService)) {
-            pseMembership = (PSEMembershipService) membership;
-        } else {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("PSE Access Service requires a PSE Membership Service.");
-            }
-            
-            return -1;
-        }
-        
-        return 0;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public void stopApp() {
-        pseMembership = null;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public ModuleImplAdvertisement getImplAdvertisement() {
-        return implAdvertisement;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public Service getInterface() {
-        return this;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public AccessResult doAccessCheck(PrivilegedOperation op, Credential cred) {
-        if ((null == op) && (null == cred)) {
-            return allowNullCredentialForNullOperation ? AccessResult.PERMITTED : AccessResult.DISALLOWED;
-        }
-        
-        if ((null == cred) || !(cred instanceof PSECredential)) {
-            return AccessResult.DISALLOWED;
-        }
-        
-        if (!cred.isValid()) {
-            return AccessResult.DISALLOWED;
-        }
-        
-        if (null == op) {
-            return AccessResult.PERMITTED;
-        }
-        
-        if (!(op instanceof PSEOperation)) {
-            return AccessResult.DISALLOWED;
-        }
-        
-        if (op.getSourceService() != this) {
-            return AccessResult.DISALLOWED;
-        }
-        
-        if (!op.isValid()) {
-            return AccessResult.DISALLOWED;
-        }
-        
-        PSECredential offerer = ((PSEOperation) op).getOfferer();
-        
-        X509Certificate opCerts[] = offerer.getCertificateChain();
-        
-        X509Certificate credCerts[] = ((PSECredential) cred).getCertificateChain();
-        
-        // FIXME 20060409 bondolo THIS IS NOT A VALID TEST. It is a shortcut for
-        // PKIX validation and assumes that all presented certificates chains 
-        // are valid and trustworthy. IT IS NOT SECURE. (It does not ensure that
-        // certficiates are really signed by their claimed issuer.)
-        for (X509Certificate credCert : Arrays.asList(credCerts)) {
-            for (X509Certificate opCert : Arrays.asList(opCerts)) {
-                if (credCert.getPublicKey().equals(opCert.getPublicKey())) {
-                    return AccessResult.PERMITTED;
-                }
-            }
-        }
-        
-        return AccessResult.DISALLOWED;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public PrivilegedOperation newPrivilegedOperation(Object subject, Credential offerer) {
-        if (!(subject instanceof PSECredential)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports PSECredential subjects.");
-        }
-        
-        if (subject != offerer) {
-            throw new IllegalArgumentException("PSE Access Service requires operation and offerer to be the same object.");
-        }
-        
-        if (!offerer.isValid()) {
-            throw new IllegalArgumentException("offerer is not a valid credential");
-        }
-        
-        return new PSEOperation((PSEAccessService) getInterface(), (PSECredential) offerer);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public PrivilegedOperation newPrivilegedOperation(Element source) {
-        return new PSEOperation((PSEAccessService) getInterface(), source);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    PeerGroup getPeerGroup() {
-        return group;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/access/pse/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/access/pse/package.html
deleted file mode 100644 (file)
index 90177d2..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    A JXTA {@link net.jxta.access.AccessService} implementation which 
-    utilizes the PSE Membership service to make access control descisions.
-
-    <p/>This Access Service is essentially an interface to PKIX Certificate
-    path validation. The trust anchor for the validation takes the place of the
-    The privledged operation for access determination. If the provided
-    credential cannot be validated against the provided trust anchor then the
-    operation will be disallowed.
-    
-    @see net.jxta.access.AccessService
-    @see net.jxta.impl.membership.pse.PSEMembershipService
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/access/simpleACL/SimpleACLAccessService.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/access/simpleACL/SimpleACLAccessService.java
deleted file mode 100644 (file)
index dccb3f1..0000000
+++ /dev/null
@@ -1,525 +0,0 @@
-/*
- * Copyright (c) 2003-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.access.simpleACL;
-
-
-import java.net.URI;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import java.net.URISyntaxException;
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-import net.jxta.access.AccessService;
-import net.jxta.credential.Credential;
-import net.jxta.credential.PrivilegedOperation;
-import net.jxta.document.Advertisement;
-import net.jxta.document.Attributable;
-import net.jxta.document.Attribute;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.document.TextElement;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.exception.JxtaError;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.platform.ModuleSpecID;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.protocol.PeerGroupAdvertisement;
-import net.jxta.service.Service;
-
-
-/**
- * Implements the {@link net.jxta.access.AccessService} using a simple ACL
- * scheme.
- *
- * <p/>The ACL table is read from the group advertisement. Each
- * <code>perm</code> entry of the Access Service parameters in the group adv is
- * assumed to be a permission in the following format:
- *
- * <p/><pre>
- *    &lt;operation> ":" ( &lt;identity> )* ( "," &lt;identity> )*
- * </pre>
- *
- * <p/>A sample ACL table extracted from a PeerGroupAdvertisement:
- *
- * <p/><pre>
- * ...
- * &lt;Svc>
- *   &lt;MCID>urn:jxta:uuid-DEADBEEFDEAFBABAFEEDBABE0000001005&lt;/MCID>
- *   &lt;Parm>
- *     &lt;perm>&amp;lt;&amp;lt;DEFAULT>>:nobody,permit&lt;/perm>
- *     &lt;perm>everyone:&amp;lt;&amp;lt;ALL>>&lt;/perm>
- *     &lt;perm>permit:nobody,permit,allow&lt;/perm>
- *     &lt;perm>deny:notpermit,notallow&lt;/perm>
- *   &lt;/Parm>
- * &lt;/Svc>
- * ...
- * </pre>
- *
- * <p/>If <code>&lt;&lt;ALL>></code> is provided as an identity then the
- * operation is permitted for all valid credentials.
- *
- * <p/>if <code>&lt;&lt;DEFAULT>></code> is provided as an operation then the
- * provided identities will be allowed for all operations which are not
- * recognized.
- *
- * <p/><strong>This implementation makes <em>no effort</em> to ensure that the
- * permission table has not been altered. It is <em>not appropriate</em> for use
- * in security sensitive deployments unless the integrity of the group
- * advertisement is ensured.</strong>
- *
- * @see net.jxta.access.AccessService
- **/
-public class SimpleACLAccessService implements AccessService {
-    
-    /**
-     *  Logger.
-     **/
-    private final static Logger LOG = Logger.getLogger(SimpleACLAccessService.class.getName());
-    
-    /**
-     * Well known access specification identifier: the simple ACL access service
-     **/
-    public static final ModuleSpecID simpleACLAccessSpecID = (ModuleSpecID)
-            ID.create(URI.create("urn:jxta:uuid-DeadBeefDeafBabaFeedBabe000000100206"));
-    
-    /**
-     *  Operation for the Always Access Service.
-     **/
-    private static class SimpleACLOperation implements PrivilegedOperation {
-        
-        SimpleACLAccessService source;
-        
-        String op;
-        
-        Credential offerer;
-        
-        protected SimpleACLOperation(SimpleACLAccessService source, String op, Credential offerer) {
-            this.source = source;
-            this.op = op;
-            this.offerer = offerer;
-        }
-        
-        protected SimpleACLOperation(SimpleACLAccessService source, Element root) {
-            this.source = source;
-            initialize(root);
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public ID getPeerGroupID() {
-            return source.getPeerGroup().getPeerGroupID();
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public ID getPeerID() {
-            return null;
-        }
-        
-        /**
-         * {@inheritDoc}
-         *
-         * <p/>AlwaysOperation are always valid.
-         **/
-        public boolean isExpired() {
-            return false;
-        }
-        
-        /**
-         * {@inheritDoc}
-         *
-         * <p/>AlwaysOperation are always valid.
-         **/
-        public boolean isValid() {
-            return true;
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public String getSubject() {
-            return op;
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public Service getSourceService() {
-            return source;
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public StructuredDocument getDocument(MimeMediaType as) throws Exception {
-            StructuredDocument doc = StructuredDocumentFactory.newStructuredDocument(as, "jxta:Cred");
-            
-            if (doc instanceof Attributable) {
-                ((Attributable) doc).addAttribute("xmlns:jxta", "http://jxta.org");
-                ((Attributable) doc).addAttribute("xml:space", "preserve");
-                ((Attributable) doc).addAttribute("type", "jxta:SimpleACLOp");
-            }
-            
-            Element e = doc.createElement("PeerGroupID", getPeerGroupID().toString());
-
-            doc.appendChild(e);
-            
-            e = doc.createElement("Operation", op);
-            doc.appendChild(e);
-            
-            StructuredDocumentUtils.copyElements(doc, doc, offerer.getDocument(as), "Offerer");
-            
-            return doc;
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public Credential getOfferer() {
-            return offerer;
-        }
-        
-        /**
-         *  Process an individual element from the document.
-         *
-         *  @param elem the element to be processed.
-         *  @return true if the element was recognized, otherwise false.
-         **/
-        protected boolean handleElement(TextElement elem) {
-            if (elem.getName().equals("PeerGroupID")) {
-                try {
-                    URI gID = new URI(elem.getTextValue().trim());
-                    ID pgid = IDFactory.fromURI(gID);
-
-                    if (!pgid.equals(getPeerGroupID())) {
-                        throw new IllegalArgumentException(
-                                "Operation is from a different group. " + pgid + " != " + getPeerGroupID());
-                    }
-                } catch (URISyntaxException badID) {
-                    throw new IllegalArgumentException("Unusable ID in advertisement: " + elem.getTextValue());
-                } catch (ClassCastException badID) {
-                    throw new IllegalArgumentException("Id is not a group id: " + elem.getTextValue());
-                }
-                return true;
-            }
-            
-            if (elem.getName().equals("Operation")) {
-                op = elem.getTextValue();
-                return true;
-            }
-            
-            if (elem.getName().equals("Offerer")) {
-                try {
-                    offerer = source.getPeerGroup().getMembershipService().makeCredential(elem);
-                } catch (Throwable failed) {
-                    throw new IllegalArgumentException("Offerer credential could not be constructed" + failed);
-                }
-                return true;
-            }
-            
-            // element was not handled
-            return false;
-        }
-        
-        /**
-         *  Initialize from a portion of a structured document.
-         **/
-        protected void initialize(Element root) {
-            
-            if (!TextElement.class.isInstance(root)) {
-                throw new IllegalArgumentException(getClass().getName() + " only supports TextElement");
-            }
-            
-            TextElement doc = (TextElement) root;
-            
-            String typedoctype = "";
-
-            if (root instanceof Attributable) {
-                Attribute itsType = ((Attributable) root).getAttribute("type");
-
-                if (null != itsType) {
-                    typedoctype = itsType.getValue();
-                }
-            }
-            
-            String doctype = doc.getName();
-            
-            if (!doctype.equals("jxta:SimpleACLOp") && !typedoctype.equals("jxta:SimpleACLOp")) {
-                throw new IllegalArgumentException(
-                        "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-            }
-            
-            Enumeration elements = doc.getChildren();
-            
-            while (elements.hasMoreElements()) {
-                TextElement elem = (TextElement) elements.nextElement();
-
-                if (!handleElement(elem)) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Unhandled element \'" + elem.getName() + "\' in " + doc.getName());
-                    }
-                }
-            }
-            
-            // sanity check time!
-            
-            if (null == op) {
-                throw new IllegalArgumentException("operation was never initialized.");
-            }
-            
-            if (null == offerer) {
-                throw new IllegalArgumentException("offerer was never initialized.");
-            }
-        }
-    }
-    
-    /**
-     *  The peer group we are working for.
-     **/
-    PeerGroup group;
-    
-    /**
-     *  Implementation advertisement for this instance.
-     **/
-    ModuleImplAdvertisement implAdvertisement;
-    
-    /**
-     *  The ACLs we are supporting.
-     **/
-    private final Map<String, Set<String>> ACLs = new HashMap<String, Set<String>>();
-    
-    /**
-     *  The default constructor
-     **/
-    public SimpleACLAccessService() {}      
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public void init(PeerGroup group, ID assignedID, Advertisement implAdv) throws PeerGroupException {
-        this.group = group;
-        implAdvertisement = (ModuleImplAdvertisement) implAdv;
-        
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring Access Service : " + assignedID);
-
-            configInfo.append("\n\tImplementation:");
-            configInfo.append("\n\t\tImpl Description: " + implAdvertisement.getDescription());
-            configInfo.append("\n\t\tImpl URI : " + implAdvertisement.getUri());
-            configInfo.append("\n\t\tImpl Code : " + implAdvertisement.getCode());
-            configInfo.append("\n\tGroup Params:");
-            configInfo.append("\n\t\tGroup: " + group.getPeerGroupName());
-            configInfo.append("\n\t\tGroup ID: " + group.getPeerGroupID());
-            configInfo.append("\n\t\tPeer ID: " + group.getPeerID());
-            LOG.config(configInfo.toString());
-        }
-        
-        PeerGroupAdvertisement configAdv = group.getPeerGroupAdvertisement();
-        
-        TextElement myParam = (TextElement) configAdv.getServiceParam(assignedID);
-        
-        if (null == myParam) {
-            throw new PeerGroupException("parameters for group access controls missing.");
-        }
-        
-        Enumeration allACLS = myParam.getChildren();
-        
-        while (allACLS.hasMoreElements()) {
-            TextElement anACL = (TextElement) allACLS.nextElement();
-            
-            if (!anACL.getName().equals("perm")) {
-                continue;
-            }
-            
-            String etcPasswd = anACL.getTextValue();
-            
-            int nextDelim = etcPasswd.indexOf(':');
-
-            if (-1 == nextDelim) {
-                continue;
-            }
-            
-            String operation = etcPasswd.substring(0, nextDelim).trim();
-            
-            if ("<<DEFAULT>>".equals(operation)) {
-                operation = null;
-            }
-            
-            String identities = etcPasswd.substring(nextDelim + 1);
-            Set allowed = new HashSet();
-            
-            StringTokenizer eachIdentity = new StringTokenizer(identities, ",");
-            
-            while (eachIdentity.hasMoreTokens()) {
-                String anIdentity = eachIdentity.nextToken().trim();
-                
-                if ("<<ALL>>".equals(anIdentity)) {
-                    anIdentity = null;
-                }
-                
-                allowed.add(anIdentity);
-            }
-            
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(
-                        "Adding operation  : \'" + ((null == operation) ? "<<DEFAULT>>" : operation) + "\' with " + allowed.size()
-                        + " identities.");
-            }
-            
-            ACLs.put(operation, allowed);
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public int startApp(String[] args) {
-        return 0;
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public void stopApp() {}
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public ModuleImplAdvertisement getImplAdvertisement() {
-        return implAdvertisement;
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public SimpleACLAccessService getInterface() {
-        return this;
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public AccessResult doAccessCheck(PrivilegedOperation op, Credential cred) {
-        if ((null != cred) && !cred.isValid()) {
-            return AccessResult.DISALLOWED;
-        }
-        
-        if ((null != op) && !op.isValid()) {
-            return AccessResult.DISALLOWED;
-        }
-        
-        Set<String> allowed = ACLs.get((null != op) ? op.getSubject() : null);
-        
-        // do we know this operation?
-        if (null == allowed) {
-            // try the default permission
-            allowed = ACLs.get(null);
-            
-            if (null == allowed) {
-                return AccessResult.DISALLOWED;
-            }
-        }
-        
-        String credSubject = (null != cred) ? cred.getSubject().toString() : null;
-        
-        return (allowed.contains(credSubject) || allowed.contains(null)) ? AccessResult.PERMITTED : AccessResult.DISALLOWED;
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public PrivilegedOperation newPrivilegedOperation(Object subject, Credential offerer) {
-        if (!(subject instanceof String)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports String subjects.");
-        }
-        
-        if (!offerer.isValid()) {
-            throw new IllegalArgumentException("offerer is not a valid credential");
-        }
-        
-        return new SimpleACLOperation(this, (String) subject, offerer);
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public PrivilegedOperation newPrivilegedOperation(Element source) {
-        return new SimpleACLOperation(this, source);
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    PeerGroup getPeerGroup() {
-        return group;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/access/simpleACL/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/access/simpleACL/package.html
deleted file mode 100644 (file)
index 724bf3b..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    A JXTA {@link net.jxta.access.AccessService} implementation which 
-    provides basic Access Control List (ACL) functionality. Supports a static
-    ACL loaded from the Peer Group Advertisement.
-
-    @see net.jxta.access.AccessService
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/cm/Cm.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/cm/Cm.java
deleted file mode 100644 (file)
index 241d8c7..0000000
+++ /dev/null
@@ -1,1209 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.cm;
-
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredTextDocument;
-import net.jxta.document.XMLDocument;
-import net.jxta.impl.util.JxtaHash;
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.impl.xindice.core.DBException;
-import net.jxta.impl.xindice.core.data.Key;
-import net.jxta.impl.xindice.core.data.Record;
-import net.jxta.impl.xindice.core.data.Value;
-import net.jxta.impl.xindice.core.filer.BTreeCallback;
-import net.jxta.impl.xindice.core.filer.BTreeFiler;
-import net.jxta.impl.xindice.core.indexer.IndexQuery;
-import net.jxta.impl.xindice.core.indexer.NameIndexer;
-import net.jxta.logging.Logging;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.PeerGroupAdvertisement;
-import net.jxta.protocol.SrdiMessage;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.StringWriter;
-import java.lang.reflect.UndeclaredThrowableException;
-import java.math.BigInteger;
-import java.net.URI;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.ResourceBundle;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * This class implements a limited document caching mechanism
- * intended to provide cache for services that have a need for cache
- * to search and exchange jxta documents.
- * <p/>
- * Only Core Services are intended to use this mechanism.
- */
-public final class Cm implements Runnable {
-
-    /**
-     * Logger.
-     */
-    private final static Logger LOG = Logger.getLogger(Cm.class.getName());
-
-    /**
-     * the name we will use for the base directory
-     */
-    final File ROOTDIRBASE;
-
-    /**
-     * adv types
-     */
-    private static final String[] DIRNAME = {"Peers", "Groups", "Adv", "Raw"};
-
-    // garbage collect once an hour
-    public static final long DEFAULT_GC_MAX_INTERVAL = 1 * TimeUtils.ANHOUR;
-
-    /*
-     *  expiration db
-     */
-    private BTreeFiler cacheDB = null;
-    private Indexer indexer = null;
-    private final static String databaseFileName = "advertisements";
-
-    private boolean stop = false;
-
-    private boolean trackDeltas = false;
-    private final Map<String, List<SrdiMessage.Entry>> deltaMap = new HashMap<String, List<SrdiMessage.Entry>>(3);
-
-    /**
-     * file descriptor for the root of the cm
-     */
-    protected File rootDir;
-
-    private Thread gcThread = null;
-    private long gcTime = 0;
-    private final long gcMinInterval = 1000L * 60L;
-    private long gcMaxInterval = DEFAULT_GC_MAX_INTERVAL;
-    
-    
-    private final int maxInconvenienceLevel = 1000;
-    private volatile int inconvenienceLevel = 0;
-
-    /**
-     * Constructor for cm
-     *
-     * @param areaName  the name of the cm sub-dir to create
-     *                  <p/>
-     *                  NOTE: Default garbage interval once an hour
-     * @param storeRoot store root dir
-     */
-    public Cm(URI storeRoot, String areaName) {
-        // Default garbage collect once an hour
-        this(Thread.currentThread().getThreadGroup(), storeRoot, areaName, DEFAULT_GC_MAX_INTERVAL, false);
-    }
-
-    /**
-     * Constructor for cm
-     *
-     * @param threadGroup     the thread group
-     * @param storeRoot   persistence location
-     * @param gcinterval  garbage collect max interval
-     * @param trackDeltas when true deltas are tracked
-     * @param areaName    storage area name
-     */
-    public Cm(ThreadGroup threadGroup, URI storeRoot, String areaName, long gcinterval, boolean trackDeltas) {
-        this.trackDeltas = trackDeltas;
-        this.gcMaxInterval = gcinterval;
-        this.gcTime = System.currentTimeMillis() + gcMaxInterval;
-
-        ROOTDIRBASE = new File(new File(storeRoot), "cm");
-
-        try {
-            rootDir = new File(ROOTDIRBASE, areaName);
-            rootDir = new File(rootDir.getAbsolutePath());
-            if (!rootDir.exists()) {
-                // We need to create the directory
-                if (!rootDir.mkdirs()) {
-                    throw new RuntimeException("Cm cannot create directory " + rootDir);
-                }
-            }
-
-            /*
-             * to avoid inconsistent database state, it is highly recommended that
-             * checkpoint is true by default, which causes fd.sync() on every write
-             * operation.  In transitory caches such as SrdiCache it makes perfect sense
-             */
-            boolean chkPoint = true;
-            ResourceBundle jxtaRsrcs = ResourceBundle.getBundle("net.jxta.user");
-            String checkpointStr = jxtaRsrcs.getString("impl.cm.defferedcheckpoint");
-
-            if (checkpointStr != null) {
-                chkPoint = !(checkpointStr.equalsIgnoreCase("true"));
-            }
-
-            // Storage
-            cacheDB = new BTreeFiler();
-            // no deffered checkpoint
-            cacheDB.setSync(chkPoint);
-            cacheDB.setLocation(rootDir.getAbsolutePath(), databaseFileName);
-
-            if (!cacheDB.open()) {
-                cacheDB.create();
-                // now open it
-                cacheDB.open();
-            }
-
-            // Index
-            indexer = new Indexer(chkPoint);
-            indexer.setLocation(rootDir.getAbsolutePath(), databaseFileName);
-
-            if (!indexer.open()) {
-                indexer.create();
-                // now open it
-                indexer.open();
-            }
-
-            if (System.getProperty("net.jxta.impl.cm.index.rebuild") != null) {
-                rebuildIndex();
-            }
-            gcThread = new Thread(threadGroup, this, "CM GC Thread interval : " + gcMinInterval);
-            gcThread.setDaemon(true);
-            gcThread.start();
-
-            if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-                LOG.config("Instantiated Cm for: " + rootDir.getAbsolutePath());
-            }
-        } catch (DBException de) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Unable to Initialize databases", de);
-            }
-            throw new UndeclaredThrowableException(de, "Unable to Initialize databases");
-        } catch (Throwable e) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Unable to create Cm", e);
-            }
-            if (e instanceof RuntimeException) {
-                throw (RuntimeException) e;
-            } else if (e instanceof Error) {
-                throw (Error) e;
-            } else {
-                throw new UndeclaredThrowableException(e, "Unable to create Cm");
-            }
-        }
-    }
-
-    @Override
-    public String toString() {
-        return "CM for " + rootDir.getAbsolutePath() + "[" + super.toString() + "]";
-    }
-
-    private static String getDirName(Advertisement adv) {
-        if (adv instanceof PeerAdvertisement) {
-            return DIRNAME[DiscoveryService.PEER];
-        } else if (adv instanceof PeerGroupAdvertisement) {
-            return DIRNAME[DiscoveryService.GROUP];
-        }
-        return DIRNAME[DiscoveryService.ADV];
-    }
-
-    /**
-     * Generates a random file name using doc hashcode
-     *
-     * @param doc to hash to generate a unique name
-     * @return String a random file name
-     */
-    public static String createTmpName(StructuredTextDocument doc) {
-        try {
-            StringWriter out = new StringWriter();
-
-            doc.sendToWriter(out);
-            out.close();
-
-            JxtaHash digester = new JxtaHash(out.toString());
-            BigInteger hash = digester.getDigestInteger();
-
-            if (hash.compareTo(BigInteger.ZERO) < 0) {
-                hash = hash.negate();
-            }
-            return "cm" + hash.toString(16);
-        } catch (IOException ex) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Exception creating tmp name: ", ex);
-            }
-            throw new IllegalStateException("Could not generate name from document");
-        }
-    }
-
-    /**
-     * Gets the list of all the files into the given folder
-     *
-     * @param dn          contains the name of the folder
-     * @param threshold   the max number of results
-     * @param expirations List to contain expirations
-     * @return List Strings containing the name of the
-     *         files
-     */
-    public List<InputStream> getRecords(String dn, int threshold, List<Long> expirations) {
-        return getRecords(dn, threshold, expirations, false);
-    }
-
-    public synchronized List<InputStream> getRecords(String dn, int threshold, List<Long> expirations, boolean purge) {
-        List<InputStream> res = new ArrayList<InputStream>();
-
-        if (dn == null) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("null directory name");
-            }
-            return res;
-        } else {
-            IndexQuery iq = new IndexQuery(IndexQuery.SW, new Value(dn));
-            try {
-                cacheDB.query(iq, new SearchCallback(cacheDB, indexer, res, expirations, threshold, purge));
-            } catch (DBException dbe) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.log(Level.FINE, "Exception during getRecords(): ", dbe);
-                }
-            } catch (IOException ie) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.log(Level.FINE, "Exception during getRecords(): ", ie);
-                }
-            }
-            return res;
-        }
-    }
-
-    public void garbageCollect() {
-        // calling getRecords is good enough since it removes
-        // expired entries
-        Map map = indexer.getIndexers();
-        Iterator it = map.keySet().iterator();
-        long t0;
-
-        while (it != null && it.hasNext()) {
-            t0 = System.currentTimeMillis();
-            String indexName = (String) it.next();
-            getRecords(indexName, Integer.MAX_VALUE, null, true);
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Cm garbageCollect :" + indexName + " in :" + (System.currentTimeMillis() - t0));
-            }
-        }
-    }
-
-    /**
-     * Returns the relative time in milliseconds at which the file
-     * will expire.
-     *
-     * @param dn contains the name of the folder
-     * @param fn contains the name of the file
-     * @return the absolute time in milliseconds at which this
-     *         document will expire. -1 is returned if the file is not
-     *         recognized or already expired.
-     */
-    public synchronized long getLifetime(String dn, String fn) {
-        try {
-            Key key = new Key(dn + "/" + fn);
-            Record record = cacheDB.readRecord(key);
-
-            if (record == null) {
-                return -1;
-            }
-            Long life = (Long) record.getMetaData(Record.LIFETIME);
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Lifetime for :" + fn + "  " + life.toString());
-            }
-            if (life < System.currentTimeMillis()) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Removing expired record :" + fn);
-                }
-                try {
-                    remove(dn, fn);
-                } catch (IOException e) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.log(Level.FINE, "Failed to remove record", e);
-                    }
-                }
-            }
-            return TimeUtils.toRelativeTimeMillis(life);
-        } catch (DBException de) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "failed to remove " + dn + "/" + fn, de);
-            }
-            return -1;
-        }
-    }
-
-    /**
-     * Returns the maximum duration in milliseconds for which this
-     * document should cached by those other than the publisher. This
-     * value is either the cache lifetime or the remaining lifetime
-     * of the document, whichever is less.
-     *
-     * @param dn contains the name of the folder
-     * @param fn contains the name of the file
-     * @return number of milliseconds until the file expires or -1 if the
-     *         file is not recognized or already expired.
-     */
-    public synchronized long getExpirationtime(String dn, String fn) {
-        try {
-            Key key = new Key(dn + "/" + fn);
-            Record record = cacheDB.readRecord(key);
-            long expiration = calcExpiration(record);
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Expiration for :" + fn + "  " + expiration);
-            }
-            if (expiration < 0) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Removing expired record :" + fn);
-                }
-                try {
-                    remove(dn, fn);
-                } catch (IOException e) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.log(Level.FINE, "Failed to remove record", e);
-                    }
-                }
-            }
-            return expiration;
-        } catch (DBException de) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "failed to get " + dn + "/" + fn, de);
-            }
-            return -1;
-        }
-    }
-
-    /**
-     * Figures out expiration
-     *
-     * @param record record
-     * @return expiration in ms
-     */
-    private static long calcExpiration(Record record) {
-        if (record == null) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Record is null returning expiration of -1");
-            }
-            return -1;
-        }
-        Long exp = (Long) record.getMetaData(Record.EXPIRATION);
-        Long life = (Long) record.getMetaData(Record.LIFETIME);
-        long expiresin = life - System.currentTimeMillis();
-
-        if (expiresin <= 0) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(
-                        MessageFormat.format("Record expired lifetime   : {0} expiration: {1} expires in: {2}", life, exp
-                                ,
-                                expiresin));
-                LOG.fine(MessageFormat.format("Record expires on :{0}", new Date(life)));
-            }
-            return -1;
-        } else {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(MessageFormat.format("Record lifetime: {0} expiration: {1} expires in: {2}", life, exp, expiresin));
-                LOG.fine(MessageFormat.format("Record expires on :{0}", new Date(life)));
-            }
-            return Math.min(expiresin, exp.longValue());
-        }
-    }
-
-    /**
-     * Returns the inputStream of a specified file, in a specified dir
-     *
-     * @param dn directory name
-     * @param fn file name
-     * @return The inputStream value
-     * @throws IOException if an I/O error occurs
-     */
-    public InputStream getInputStream(String dn, String fn) throws IOException {
-        Key key = new Key(dn + "/" + fn);
-        try {
-            Record record = cacheDB.readRecord(key);
-            if (record == null) {
-                return null;
-            }
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Restored record for " + key);
-            }
-            Value val = record.getValue();
-
-            if (val != null) {
-                return val.getInputStream();
-            } else {
-                return null;
-            }
-        } catch (DBException de) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed to restore record for " + key, de);
-            }
-            IOException failure = new IOException("Failed to restore record for " + key);
-            failure.initCause(de);
-            throw failure;
-        }
-    }
-
-    /**
-     * Remove a file
-     *
-     * @param dn directory name
-     * @param fn file name
-     * @throws IOException if an I/O error occurs
-     */
-    public synchronized void remove(String dn, String fn) throws IOException {
-
-        try {
-            if (fn == null) {
-                return;
-            }
-            Key key = new Key(dn + "/" + fn);
-            Record record = cacheDB.readRecord(key);
-            long removePos = cacheDB.findValue(key);
-
-            cacheDB.deleteRecord(key);
-            if (record != null) {
-                try {
-                    if (calcExpiration(record) > 0) {
-                        InputStream is = record.getValue().getInputStream();
-                        XMLDocument asDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, is);
-                        Advertisement adv = AdvertisementFactory.newAdvertisement(asDoc);
-                        Map<String, String> indexables = getIndexfields(adv.getIndexFields(), asDoc);
-
-                        indexer.removeFromIndex(addKey(dn, indexables), removePos);
-                        // add it to deltas to expire it in srdi
-                        addDelta(dn, indexables, 0);
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("removed " + record);
-                        }
-                    }
-                } catch (Exception e) {
-                    // bad bits we are done
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "failed to remove " + dn + "/" + fn, e);
-                    }
-                }
-            }
-        } catch (DBException de) {
-            // entry does not exist
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("failed to remove " + dn + "/" + fn);
-            }
-        }
-    }
-
-    /**
-     * Restore a saved StructuredDocument.
-     *
-     * @param dn directory name
-     * @param fn file name
-     * @return StructuredDocument containing the file
-     * @throws IOException if an I/O error occurs
-     *                     was not possible.
-     */
-    public StructuredDocument restore(String dn, String fn) throws IOException {
-        InputStream is = getInputStream(dn, fn);
-        return StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, is);
-    }
-
-    /**
-     * Restore an advetisement into a byte array.
-     *
-     * @param dn directory name
-     * @param fn file name
-     * @return byte [] containing the file
-     * @throws IOException if an I/O error occurs
-     */
-    public synchronized byte[] restoreBytes(String dn, String fn) throws IOException {
-
-        try {
-            Key key = new Key(dn + "/" + fn);
-            Record record = cacheDB.readRecord(key);
-
-            if (record == null) {
-                return null;
-            }
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("restored " + record);
-            }
-            Value val = record.getValue();
-
-            if (val != null) {
-                return val.getData();
-            } else {
-                return null;
-            }
-        } catch (DBException de) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "failed to restore " + dn + "/" + fn, de);
-            }
-            IOException failure = new IOException("failed to restore " + dn + "/" + fn);
-            failure.initCause(de);
-            throw failure;
-        }
-    }
-
-    /**
-     * Stores a StructuredDocument in specified dir, and file name
-     *
-     * @param dn  directory name
-     * @param fn  file name
-     * @param adv Advertisement to store
-     * @throws IOException if an I/O error occurs
-     */
-    public void save(String dn, String fn, Advertisement adv) throws IOException {
-        save(dn, fn, adv, DiscoveryService.INFINITE_LIFETIME, DiscoveryService.NO_EXPIRATION);
-    }
-
-    /**
-     * Stores a StructuredDocument in specified dir, and file name, and
-     * associated doc timeouts
-     *
-     * @param dn         directory name
-     * @param fn         file name
-     * @param adv        Advertisement to save
-     * @param lifetime   Document (local) lifetime in relative ms
-     * @param expiration Document (global) expiration time in relative ms
-     * @throws IOException Thrown if there is a problem saving the document.
-     */
-    public synchronized void save(String dn, String fn, Advertisement adv, long lifetime, long expiration) throws IOException {
-
-        try {
-            if (expiration < 0 || lifetime <= 0) {
-                throw new IllegalArgumentException("Bad expiration or lifetime.");
-            }
-            XMLDocument doc;
-
-            try {
-                doc = (XMLDocument) adv.getDocument(MimeMediaType.XMLUTF8);
-            } catch (RuntimeException e) {
-                IOException failure = new IOException("Advertisement couldn't be saved");
-                failure.initCause(e);
-                throw failure;
-            }
-
-            Key key = new Key(dn + "/" + fn);
-            // save the new version
-            ByteArrayOutputStream baos = new ByteArrayOutputStream();
-
-            doc.sendToStream(baos);
-            baos.close();
-            Value value = new Value(baos.toByteArray());
-            Long oldLife = null;
-            Record record = cacheDB.readRecord(key);
-
-            if (record != null) {
-                // grab the old lifetime
-                oldLife = (Long) record.getMetaData(Record.LIFETIME);
-            }
-
-            long absoluteLifetime = TimeUtils.toAbsoluteTimeMillis(lifetime);
-
-            if (oldLife != null) {
-                if (absoluteLifetime < oldLife) {
-                    // make sure we don't override the original value
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine(MessageFormat.format("Overriding attempt to decrease adv lifetime from : {0} to :{1}",
-                                                     new Date(oldLife), new Date(absoluteLifetime)));
-                    }
-                    absoluteLifetime = oldLife;
-                }
-            }
-            // make sure expiration does not exceed lifetime
-            if (expiration > lifetime) {
-                expiration = lifetime;
-            }
-            long pos = cacheDB.writeRecord(key, value, absoluteLifetime, expiration);
-            Map<String, String> indexables = getIndexfields(adv.getIndexFields(), doc);
-            Map<String, String> keyedIdx = addKey(dn, indexables);
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Indexing " + keyedIdx + " at " + pos);
-            }
-            indexer.addToIndex(keyedIdx, pos);
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                // too noisy
-                // LOG.debug("Wrote " + key + " = " + value);
-                LOG.fine("Stored " + indexables + " at " + pos);
-            }
-
-            if (expiration > 0) {
-                // Update for SRDI with our caches lifetime only if we are prepared to share the advertisement with others.
-                addDelta(dn, indexables, TimeUtils.toRelativeTimeMillis(absoluteLifetime));
-            }
-
-        } catch (DBException de) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, MessageFormat.format("Failed to write {0}/{1} {2} {3}", dn, fn, lifetime, expiration), de);
-            }
-            IOException failure = new IOException("Failed to write " + dn + "/" + fn + " " + lifetime + " " + expiration);
-            failure.initCause(de);
-            throw failure;
-        }
-    }
-
-    /**
-     * Store some bytes in specified dir, and file name, and
-     * associated doc timeouts
-     *
-     * @param dn         directory name
-     * @param fn         file name
-     * @param data       byte array to save
-     * @param lifetime   Document (local) lifetime in relative ms
-     * @param expiration Document (global) expiration time in relative ms
-     * @throws IOException Thrown if there is a problem saving the document.
-     */
-    public synchronized void save(String dn, String fn, byte[] data, long lifetime, long expiration) throws IOException {
-
-        try {
-            if (expiration < 0 || lifetime <= 0) {
-                throw new IllegalArgumentException("Bad expiration or lifetime.");
-            }
-
-            Key key = new Key(dn + "/" + fn);
-            Value value = new Value(data);
-            Long oldLife = null;
-            Record record = cacheDB.readRecord(key);
-
-            if (record != null) {
-                // grab the old lifetime
-                oldLife = (Long) record.getMetaData(Record.LIFETIME);
-            }
-
-            // save the new version
-
-            long absoluteLifetime = TimeUtils.toAbsoluteTimeMillis(lifetime);
-
-            if (oldLife != null) {
-                if (absoluteLifetime < oldLife) {
-                    // make sure we don't override the original value
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine(MessageFormat.format("Overriding attempt to decrease adv lifetime from : {0} to :{1}",
-                                                            new Date(oldLife), new Date(absoluteLifetime)));
-                    }
-                    absoluteLifetime = oldLife;
-                }
-            }
-
-            // make sure expiration does not exceed lifetime
-            if (expiration > lifetime) {
-                expiration = lifetime;
-            }
-
-            cacheDB.writeRecord(key, value, absoluteLifetime, expiration);
-        } catch (DBException de) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed to write " + dn + "/" + fn + " " + lifetime + " " + expiration, de);
-            }
-
-            IOException failure = new IOException("Failed to write " + dn + "/" + fn + " " + lifetime + " " + expiration);
-            failure.initCause(de);
-            throw failure;
-        }
-    }
-
-    private static Map<String, String> getIndexfields(String[] fields, StructuredDocument doc) {
-        Map<String, String> map = new HashMap<String, String>();
-
-        if (doc == null) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Null document");
-            }
-            return map;
-        }
-        if (fields == null) {
-            return map;
-        }
-        for (String field : fields) {
-            Enumeration en = doc.getChildren(field);
-            while (en.hasMoreElements()) {
-                String val = (String) ((Element) en.nextElement()).getValue();
-                if (val != null) {
-                    map.put(field, val);
-                }
-            }
-        }
-        return map;
-    }
-
-    /* adds a primary index 'dn' to indexables */
-    private static Map<String, String> addKey(String dn, Map<String, String> map) {
-        if (map == null) {
-            return null;
-        }
-
-        Map<String, String> tmp = new HashMap<String, String>();
-        if (map.size() > 0) {
-            Iterator<String> it = map.keySet().iterator();
-
-            while (it != null && it.hasNext()) {
-                String name = it.next();
-
-                tmp.put(dn + name, map.get(name));
-            }
-        }
-        return tmp;
-    }
-
-    private static final class EntriesCallback implements BTreeCallback {
-
-        private BTreeFiler cacheDB = null;
-        private int threshold;
-        private List<SrdiMessage.Entry> results;
-        private String key;
-
-        EntriesCallback(BTreeFiler cacheDB, List<SrdiMessage.Entry> results, String key, int threshold) {
-            this.cacheDB = cacheDB;
-            this.results = results;
-            this.key = key;
-            this.threshold = threshold;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public boolean indexInfo(Value val, long pos) {
-            if (results.size() >= threshold) {
-                return false;
-            }
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Found " + val.toString() + " at " + pos);
-            }
-
-            Record record;
-            try {
-                record = cacheDB.readRecord(pos);
-            } catch (DBException ex) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Exception while reading indexed", ex);
-                }
-                return false;
-            }
-            if (record == null) {
-                return true;
-            }
-            long exp = calcExpiration(record);
-
-            if (exp <= 0) {
-                // skip expired and private entries
-                return true;
-            }
-            Long life = (Long) record.getMetaData(Record.LIFETIME);
-            SrdiMessage.Entry entry = new SrdiMessage.Entry(key, val.toString(), life - System.currentTimeMillis());
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(" key [" + entry.key + "] value [" + entry.value + "] exp [" + entry.expiration + "]");
-            }
-            results.add(entry);
-            return true;
-        }
-    }
-
-
-    private final class SearchCallback implements BTreeCallback {
-
-        private BTreeFiler cacheDB = null;
-        private Indexer indexer = null;
-        private int threshold;
-        private List<InputStream> results;
-        private List<Long> expirations;
-        private boolean purge;
-
-        SearchCallback(BTreeFiler cacheDB, Indexer indexer, List<InputStream> results, List<Long> expirations, int threshold) {
-            this(cacheDB, indexer, results, expirations, threshold, false);
-        }
-
-        SearchCallback(BTreeFiler cacheDB, Indexer indexer, List<InputStream> results, List<Long> expirations, int threshold, boolean purge) {
-            this.cacheDB = cacheDB;
-            this.indexer = indexer;
-            this.results = results;
-            this.threshold = threshold;
-            this.expirations = expirations;
-            this.purge = purge;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public boolean indexInfo(Value val, long pos) {
-            if (results.size() >= threshold) {
-                return false;
-            }
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Found " + val.toString() + " at " + pos);
-            }
-
-            Record record;
-            try {
-                record = cacheDB.readRecord(pos);
-            } catch (DBException ex) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Exception while reading indexed", ex);
-                }
-                return false;
-            }
-
-            if (record == null) {
-                return true;
-            }
-
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINEST)) {
-                LOG.finest("Search callback record " + record.toString());
-            }
-            long exp = calcExpiration(record);
-            if (exp < 0) {
-                if (purge) {
-                    try {
-                        indexer.purge(pos);
-                        cacheDB.deleteRecord(record.getKey());
-                    } catch (DBException ex) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.log(Level.WARNING, "Exception while reading indexed", ex);
-                        }
-                    } catch (IOException ie) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.log(Level.WARNING, "Exception while reading indexed", ie);
-                        }
-                    }
-                } else {
-                    ++inconvenienceLevel;
-                }
-                return true;
-            }
-
-            if (expirations != null) {
-                expirations.add(exp);
-            }
-            results.add(record.getValue().getInputStream());
-            return true;
-        }
-    }
-
-    protected static IndexQuery getIndexQuery(String value) {
-
-        int operator;
-
-        if (value == null) {
-            return null;
-        } else if (value.length() == 0 || "*".equals(value)) {
-            return null;
-        } else if (value.indexOf("*") < 0) {
-            operator = IndexQuery.EQ;
-        } else if (value.charAt(0) == '*' && value.charAt(value.length() - 1) != '*') {
-            operator = IndexQuery.EW;
-            value = value.substring(1, value.length());
-        } else if (value.charAt(value.length() - 1) == '*' && value.charAt(0) != '*') {
-            operator = IndexQuery.SW;
-            value = value.substring(0, value.length() - 1);
-        } else {
-            operator = IndexQuery.BWX;
-            value = value.substring(1, value.length() - 1);
-        }
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Index query operator :" + operator);
-        }
-        return new IndexQuery(operator, new Value(value));
-    }
-
-    /**
-     * Search and recovers documents that contains at least
-     * a macthing pair of tag/value.
-     *
-     * @param dn          contains the name of the folder on which to
-     *                    perform the search
-     * @param value       contains the value to search on.
-     * @param attribute   attribute to search on
-     * @param threshold   threshold
-     * @param expirations List to contain expirations
-     * @return Enumeration containing of all the documents names
-     */
-    public synchronized List<InputStream> search(String dn, String attribute, String value, int threshold, List<Long> expirations) {
-        List<InputStream> res = new ArrayList<InputStream>();
-        IndexQuery iq = getIndexQuery(value);
-        try {
-            indexer.search(iq, dn + attribute, new SearchCallback(cacheDB, indexer, res, expirations, threshold));
-        } catch (Exception ex) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Exception while searching in index", ex);
-            }
-        }
-        return res;
-    }
-
-    /**
-     * returns all entries that are cached
-     *
-     * @param dn          the relative dir name
-     * @param clearDeltas if true clears the delta cache
-     * @return SrdiMessage.Entries
-     */
-    public synchronized List<SrdiMessage.Entry> getEntries(String dn, boolean clearDeltas) {
-        List<SrdiMessage.Entry> res = new ArrayList<SrdiMessage.Entry>();
-        try {
-            Map map = indexer.getIndexers();
-            BTreeFiler listDB = indexer.getListDB();
-            Iterator it = map.keySet().iterator();
-
-            while (it != null && it.hasNext()) {
-                String indexName = (String) it.next();
-                // seperate the index name from attribute
-                if (indexName.startsWith(dn)) {
-                    String attr = indexName.substring((dn).length());
-                    NameIndexer idxr = (NameIndexer) map.get(indexName);
-                    idxr.query(null, new Indexer.SearchCallback(listDB, new EntriesCallback(cacheDB, res, attr, Integer.MAX_VALUE)));
-                }
-            }
-        } catch (Exception ex) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Exception while searching in index", ex);
-            }
-        }
-
-        if (clearDeltas) {
-            clearDeltas(dn);
-        }
-        return res;
-    }
-
-    /**
-     * returns all entries that are added since this method was last called
-     *
-     * @param dn the relative dir name
-     * @return SrdiMessage.Entries
-     */
-    public synchronized List<SrdiMessage.Entry> getDeltas(String dn) {
-        List<SrdiMessage.Entry> result = new ArrayList<SrdiMessage.Entry>();
-        List<SrdiMessage.Entry> deltas = deltaMap.get(dn);
-
-        if (deltas != null) {
-            result.addAll(deltas);
-            deltas.clear();
-        }
-        return result;
-    }
-
-    private synchronized void clearDeltas(String dn) {
-
-        List<SrdiMessage.Entry> deltas = deltaMap.get(dn);
-
-        if (deltas == null) {
-            return;
-        }
-        deltas.clear();
-    }
-
-    private synchronized void addDelta(String dn, Map<String, String> indexables, long exp) {
-
-        if (trackDeltas) {
-            Iterator<Map.Entry<String, String>> eachIndex = indexables.entrySet().iterator();
-
-            if (eachIndex.hasNext()) {
-                List<SrdiMessage.Entry> deltas = deltaMap.get(dn);
-
-                if (deltas == null) {
-                    deltas = new ArrayList<SrdiMessage.Entry>();
-                    deltaMap.put(dn, deltas);
-                }
-                while (eachIndex.hasNext()) {
-                    Map.Entry<String, String> anEntry = eachIndex.next();
-                    String attr = anEntry.getKey();
-                    String value = anEntry.getValue();
-                    SrdiMessage.Entry entry = new SrdiMessage.Entry(attr, value, exp);
-
-                    deltas.add(entry);
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Added entry  :" + entry + " to deltas");
-                    }
-                }
-            }
-        }
-    }
-
-    public synchronized void setTrackDeltas(boolean trackDeltas) {
-        this.trackDeltas = trackDeltas;
-        if (!trackDeltas) {
-            deltaMap.clear();
-        }
-    }
-
-    /**
-     * stop the cm
-     */
-    public synchronized void stop() {
-        try {
-            cacheDB.close();
-            indexer.close();
-            stop = true;
-            notify();
-        } catch (DBException ex) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Unable to close advertisments.tbl", ex);
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized void run() {
-        try {
-            while (!stop) {
-                try {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("waiting " + gcMinInterval + "ms before garbage collection");
-                    }
-                    wait(gcMinInterval);
-                } catch (InterruptedException woken) {
-                    Thread.interrupted();
-
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.log(Level.FINE, "Thread interrupted", woken);
-                    }
-                }
-
-                if (stop) {
-                    // if asked to stop, exit
-                    break;
-                }
-
-                if ((inconvenienceLevel > maxInconvenienceLevel) || (System.currentTimeMillis() > gcTime)) {
-
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Garbage collection started");
-                    }
-                    garbageCollect();
-                    inconvenienceLevel = 0;
-                    gcTime = System.currentTimeMillis() + gcMaxInterval;
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Garbage collection completed");
-                    }
-                }
-            }
-        } catch (Throwable all) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Uncaught Throwable in thread :" + Thread.currentThread().getName(), all);
-            }
-        } finally {
-            gcThread = null;
-        }
-    }
-
-    private synchronized void rebuildIndex() throws DBException, IOException {
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Rebuilding indices");
-        }
-
-        String pattern = "*";
-        IndexQuery any = new IndexQuery(IndexQuery.ANY, pattern);
-
-        cacheDB.query(any, new RebuildIndexCallback(cacheDB, indexer));
-    }
-
-    private static final class RebuildIndexCallback implements BTreeCallback {
-
-        private BTreeFiler database = null;
-        private Indexer index = null;
-
-        RebuildIndexCallback(BTreeFiler database, Indexer index) {
-            this.database = database;
-            this.index = index;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public boolean indexInfo(Value val, long pos) {
-            try {
-                Record record = database.readRecord(pos);
-
-                if (record == null) {
-                    return true;
-                }
-
-                InputStream is = record.getValue().getInputStream();
-                XMLDocument asDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, is);
-                Advertisement adv = AdvertisementFactory.newAdvertisement(asDoc);
-                Map<String, String> indexables = getIndexfields(adv.getIndexFields(), asDoc);
-
-                String dn = getDirName(adv);
-                Map<String, String> keyedIdx = addKey(dn, indexables);
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Restoring index " + keyedIdx + " at " + pos);
-                }
-                index.addToIndex(keyedIdx, pos);
-            } catch (Exception ex) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Exception rebuilding index  at " + pos, ex);
-                }
-                return true;
-            }
-            return true;
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/cm/Indexer.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/cm/Indexer.java
deleted file mode 100644 (file)
index ef76db6..0000000
+++ /dev/null
@@ -1,617 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.cm;
-
-import net.jxta.impl.xindice.core.DBException;
-import net.jxta.impl.xindice.core.data.Key;
-import net.jxta.impl.xindice.core.data.Record;
-import net.jxta.impl.xindice.core.data.Value;
-import net.jxta.impl.xindice.core.filer.BTreeCallback;
-import net.jxta.impl.xindice.core.filer.BTreeException;
-import net.jxta.impl.xindice.core.filer.BTreeFiler;
-import net.jxta.impl.xindice.core.indexer.IndexQuery;
-import net.jxta.impl.xindice.core.indexer.NameIndexer;
-import net.jxta.logging.Logging;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-public final class Indexer {
-
-    /**
-     * The logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(Indexer.class.getName());
-
-    private final static String listFileName = "offsets";
-
-    private String dir = null;
-    private String file = null;
-    private final Map<String, NameIndexer> indices = new HashMap<String, NameIndexer>();
-    private BTreeFiler listDB = null;
-    private boolean sync = true;
-
-    /*
-     *      Indexer manages indexes to various advertisement types,
-     *      and maintains a listDB which holds records that hold references
-     *      to records in advertisments.tbl
-     *
-     *       -------          -------               /    ------- 
-     *      | index | ---->> | listDB |   ------->>  -   | advDB |
-     *       -------          -------               \    ------- 
-     *
-     */
-    public Indexer() {}
-
-    /**
-     * Creates an indexer
-     *
-     * @param sync passed through to xindice to determine a lazy checkpoint or not
-     *             false == lazy checkpoint
-     */
-    public Indexer(boolean sync) {
-        this.sync = sync;
-    }
-
-    public void setLocation(String dir, String file) {
-        this.dir = dir;
-        this.file = file;
-
-        // upon restart, load existing indices
-
-        File directory = new File(dir);
-        File[] indexFiles = directory.listFiles(new FilenameFilter() {
-            public boolean accept(File parentDir, String fileName) {
-                return fileName.endsWith(".idx");
-            }
-        });
-
-        for (File indexFile : indexFiles) {
-            String indexFileName = indexFile.getName();
-            int dash = indexFileName.lastIndexOf("-");
-            int dot = indexFileName.lastIndexOf(".idx");
-
-            if (dot > 0 && dash > 0) {
-                String name = indexFileName.substring(dash + 1, dot).trim();
-
-                if (indices.get(name) == null) {
-                    try {
-                        NameIndexer indexer = new NameIndexer();
-
-                        // location should be the same as in
-                        // addToIndex below
-                        indexer.setLocation(dir, file + "-" + name);
-                        indexer.setSync(sync);
-                        if (!indexer.open()) {
-                            indexer.create();
-                            indexer.open();
-                        }
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Adding :" + indexFileName + " under " + name);
-                        }
-                        indices.put(name, indexer);
-                    } catch (DBException ignore) {
-                        if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                            LOG.log(Level.SEVERE, "Failed to create Index " + name, ignore);
-                        }
-                    }
-                }
-            }
-        }
-        try {
-            // record pointers
-            listDB = new BTreeFiler();
-            listDB.setSync(sync);
-            listDB.setLocation(directory.getCanonicalPath(), file + "-" + listFileName);
-            if (!listDB.open()) {
-                listDB.create();
-                // now open it
-                listDB.open();
-            }
-        } catch (DBException dbe) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Failed during listDB Creation", dbe);
-            }
-        } catch (IOException ie) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Failed during listDB Creation", ie);
-            }
-        }
-    }
-
-    public boolean open() throws DBException {
-        return true;
-    }
-
-    public boolean create() throws DBException {
-        return true;
-    }
-
-    public synchronized boolean close() throws DBException {
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Closing Indexer");
-        }
-                
-        Iterator<Map.Entry<String, NameIndexer>> eachIndex = indices.entrySet().iterator();
-        while (eachIndex.hasNext()) {
-            Map.Entry<String, NameIndexer> anEntry = eachIndex.next();
-            
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer("Closing Index :" + anEntry.getKey());
-            }
-            
-            try {
-                anEntry.getValue().close();
-            } catch (Exception failed) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failure closing index :" + anEntry.getKey(), failed);
-                }
-            }
-            
-            eachIndex.remove();
-        }
-        
-        // clear just in case.
-        indices.clear();
-        
-        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-            LOG.finer("Closing listDB");
-        }
-        
-        listDB.close();
-        return true;
-    }
-
-    /**
-     * returns an iteration of index fields (attributes)
-     */
-    public Map<String, NameIndexer> getIndexers() {
-        return Collections.unmodifiableMap(indices);
-    }
-
-    /**
-     * returns listDB
-     */
-    public BTreeFiler getListDB() {
-        return listDB;
-    }
-
-    private static final class EndsWithCallback implements BTreeCallback {
-
-        private int op = IndexQuery.ANY;
-        private BTreeCallback callback = null;
-        private Value pattern = null;
-
-        EndsWithCallback(int op, BTreeCallback callback, Value pattern) {
-            this.op = op;
-            this.callback = callback;
-            this.pattern = pattern;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public boolean indexInfo(Value val, long pos) {
-
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer("value :" + val + " pattern :" + pattern);
-            }
-
-            switch (op) {
-            case IndexQuery.EW:
-                if (val.endsWith(pattern)) {
-                    return callback.indexInfo(val, pos);
-                }
-                break;
-
-            case IndexQuery.NEW:
-                if (!val.endsWith(pattern)) {
-                    return callback.indexInfo(val, pos);
-                }
-                break;
-
-            case IndexQuery.BWX:
-                if (val.contains(pattern)) {
-                    return callback.indexInfo(val, pos);
-                }
-                break;
-
-            default:
-                break;
-
-            }
-            return true;
-        }
-    }
-
-    public void search(IndexQuery query, String name, BTreeCallback callback) throws IOException, BTreeException {
-
-        BTreeCallback cb = new SearchCallback(listDB, callback);
-
-        if (query != null) {
-            int op = query.getOperator();
-            if (op == IndexQuery.EW || op == IndexQuery.NEW || op == IndexQuery.BWX) {
-                query = new IndexQuery(IndexQuery.ANY, query.getValues());
-                cb = new EndsWithCallback(op, new SearchCallback(listDB, callback), query.getValue(0));
-            }
-        }
-
-        if (name == null) {
-            if (indices != null) {
-                Iterator<NameIndexer> i = indices.values().iterator();
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Searching all indexes");
-                }
-                while (i.hasNext()) {
-                    NameIndexer index = i.next();
-                    index.query(query, new SearchCallback(listDB, callback));
-                }
-            }
-        } else {
-            NameIndexer indexer = indices.get(name);
-            if (indexer == null) {
-                return;
-            }
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Searching Index : " + name);
-            }
-            indexer.query(query, cb);
-        }
-    }
-
-    public void addToIndex(Map<String, String> indexables, long pos) throws IOException, DBException {
-
-        if (indexables == null) {
-            return;
-        }
-        // FIXME add indexer name to NameIndexer, to optimize this loop
-        for (String name : indexables.keySet()) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("looking up NameIndexer : " + name);
-            }
-            NameIndexer indexer = indices.get(name);
-
-            if (indexer == null) {
-                indexer = new NameIndexer();
-                // location should be the same as in setLocation above
-                indexer.setLocation(dir, file + "-" + name);
-                indexer.setSync(sync);
-                if (!indexer.open()) {
-                    indexer.create();
-                    indexer.open();
-                }
-                indices.put(name, indexer);
-            }
-
-            // we need to make sure that the db key is unique from the
-            // the index key to avoid value collision
-            Key dbKey = new Key(name + indexables.get(name));
-            Key indexKey = new Key(indexables.get(name));
-            long listPos = writeRecord(listDB, dbKey, pos);
-
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                StringBuilder message = new StringBuilder().append("Adding a reference at position :").append(listPos).append(" to ").append(name).append(" index, Key: ").append(
-                        indexables.get(name));
-                LOG.finer(message.toString());
-            }
-            indexer.add(indexKey, listPos);
-        }
-    }
-
-    public void removeFromIndex(Map<String, String> indexables, long pos) throws DBException {
-
-        Collection<String> names;
-
-        if (indexables == null) {
-            names = indices.keySet();
-        } else {
-            names = indexables.keySet();
-        }
-
-        Long lpos = pos;
-
-        for (String name : names) {
-            NameIndexer indexer = indices.get(name);
-
-            if (indexer != null) {
-                // we need to make sure that the db key is unique from the
-                // the index key to avoid value collision
-                Key dbKey = null;
-
-                if (indexables != null) {
-                    dbKey = new Key(name + indexables.get(name));
-                }
-                Key indexKey = null;
-
-                if (indexables != null) {
-                    indexKey = new Key(indexables.get(name));
-                }
-                synchronized (listDB) {
-                    Record record = listDB.readRecord(dbKey);
-                    Set<Long> offsets = readRecord(record);
-
-                    if (!offsets.isEmpty()) {
-                        if (offsets.contains(lpos)) {
-                            offsets.remove(lpos);
-                            Value recordValue = new Value(toByteArray(offsets));
-
-                            listDB.writeRecord(dbKey, recordValue);
-                        }
-                        if (offsets.isEmpty()) {
-                            // only we can proceed to remove the entry from the index
-                            listDB.deleteRecord(dbKey);
-                            indexer.remove(indexKey);
-                        }
-                    } else {
-                        // empty record purge it
-                        listDB.deleteRecord(dbKey);
-                        indexer.remove(indexKey);
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * purge all index entries pointing to a certain record.
-     *
-     * @param list List of Long position(s) at which the record to be purged is
-     *             located in the main database.
-     * @throws IOException if an io error occurs
-     * @throws BTreeException if an DB error occurs
-     */
-    public void purge(List<Long> list) throws IOException, BTreeException {
-        IndexQuery iq = new IndexQuery(IndexQuery.ANY, "");
-        Collection<String> keys = new ArrayList<String>(indices.keySet());
-
-        for (String objKey : keys) {
-            NameIndexer index = indices.get(objKey);
-            PurgeCallback pc = new PurgeCallback(listDB, index, objKey, list);
-
-            index.query(iq, pc);
-        }
-    }
-
-    /**
-     * purge all index entries pointing to a certain record.
-     *
-     * @param pos the position at which the record to be purged is
-     *            located in the main database.
-     * @throws IOException    if an io error occurs
-     * @throws BTreeException if an BTree error occurs
-     */
-    public void purge(long pos) throws IOException, BTreeException {
-        purge(Collections.<Long>singletonList(pos));
-    }
-
-    private static final class PurgeCallback implements BTreeCallback {
-
-        private final NameIndexer indexer;
-        private final List<Long> list;
-        private final BTreeFiler listDB;
-        private final String indexKey;
-
-        PurgeCallback(BTreeFiler listDB, NameIndexer indexer, String indexKey, List<Long> list) {
-            this.listDB = listDB;
-            this.indexer = indexer;
-            this.indexKey = indexKey;
-            this.list = list;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public boolean indexInfo(Value val, long pos) {
-            // Read record to determine whether there's a refrence to pos
-            try {
-                synchronized (listDB) {
-                    Record record = listDB.readRecord(pos);
-                    Set<Long> offsets = readRecord(record);
-
-                    boolean changed = offsets.removeAll(list);
-                    if (changed) {
-                        if (!offsets.isEmpty()) {
-                            Value recordValue = new Value(toByteArray(offsets));
-
-                            listDB.writeRecord(pos, recordValue);
-                        } else {
-                            listDB.deleteRecord(new Key(indexKey + val));
-                            indexer.remove(new Key(val));
-                        }
-                    }
-                }
-            } catch (DBException ignore) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "An exception occured", ignore);
-                }
-            }
-            return true;
-        }
-    }
-
-    private static byte[] toByteArray(Set<Long> offsets) {
-        try {
-            int size = offsets.size();
-            ByteArrayOutputStream bos = new ByteArrayOutputStream((size * 8) + 4);
-            DataOutputStream dos = new DataOutputStream(bos);
-
-            dos.writeInt(size);
-            for (Long lpos : offsets) {
-                dos.writeLong(lpos.longValue());
-            }
-            dos.close();
-            return bos.toByteArray();
-        } catch (IOException ie) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Exception during array to byte array conversion", ie);
-            }
-        }
-        return null;
-    }
-
-    public static Set<Long> readRecord(Record record) {
-        Set<Long> result = new TreeSet<Long>();
-
-        if (record == null) {
-            return result;
-        }
-
-        InputStream is = record.getValue().getInputStream();
-
-        try {
-            DataInputStream ois = new DataInputStream(is);
-            int size = ois.readInt();
-
-            for (int i = 0; i < size; i++) {
-                result.add(ois.readLong());
-            }
-            ois.close();
-        } catch (IOException ie) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Exception while reading Entry", ie);
-            }
-        }
-        return result;
-    }
-
-    private static long writeRecord(BTreeFiler listDB, Key key, long pos) throws DBException, IOException {
-
-        synchronized (listDB) {
-            Long lpos = pos;
-            Record record = listDB.readRecord(key);
-            Set<Long> offsets = readRecord(record);
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE) && offsets != null) {
-                LOG.finer("list.contains " + pos + " : " + offsets.contains(lpos));
-            }
-
-            if (offsets != null && !offsets.contains(lpos)) {
-                if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                    LOG.finer("Adding a reference to record at :" + lpos);
-                    LOG.finer("Writing :" + offsets.size() + " references");
-                }
-                offsets.add(lpos);
-            }
-            Value recordValue = new Value(toByteArray(offsets));
-
-            return listDB.writeRecord(key, recordValue);
-        }
-    }
-
-    public static final class SearchCallback implements BTreeCallback {
-
-        private BTreeCallback callback = null;
-        private BTreeFiler listDB = null;
-
-        public SearchCallback(BTreeFiler listDB, BTreeCallback callback) {
-            this.listDB = listDB;
-            this.callback = callback;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public boolean indexInfo(Value val, long pos) {
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer("Found " + val.toString() + " at " + pos);
-            }
-            Record record = null;
-            Set<Long> offsets = null;
-            boolean result = true;
-
-            try {
-                synchronized (listDB) {
-                    record = listDB.readRecord(pos);
-                    offsets = readRecord(record);
-                    if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                        LOG.finer("Found " + offsets.size() + " entries");
-                    }
-                }
-
-                for (Long lpos : offsets) {
-                    result &= callback.indexInfo(val, lpos);
-                    if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                        LOG.finer("Callback result : " + result);
-                    }
-                }
-            } catch (DBException ex) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Exception while reading indexed", ex);
-                }
-                return false;
-            }
-            return result;
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/cm/Srdi.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/cm/Srdi.java
deleted file mode 100644 (file)
index 925ad7b..0000000
+++ /dev/null
@@ -1,666 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.cm;
-
-import net.jxta.credential.Credential;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.impl.protocol.ResolverSrdiMsgImpl;
-import net.jxta.impl.protocol.SrdiMessageImpl;
-import net.jxta.impl.util.JxtaHash;
-import net.jxta.logging.Logging;
-import net.jxta.membership.MembershipService;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.protocol.RdvAdvertisement;
-import net.jxta.protocol.ResolverQueryMsg;
-import net.jxta.protocol.ResolverSrdiMsg;
-import net.jxta.protocol.SrdiMessage;
-import net.jxta.rendezvous.RendezVousService;
-import net.jxta.rendezvous.RendezVousStatus;
-import net.jxta.rendezvous.RendezvousEvent;
-import net.jxta.rendezvous.RendezvousListener;
-import net.jxta.resolver.ResolverService;
-
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.math.BigInteger;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-import java.util.SortedSet;
-import java.util.TreeSet;
-import java.util.Vector;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Srdi is a service which provides SRDI functionalities such as :
- * <p/>
- * <ul>
- * <li>pushing of SRDI messages to a another peer/propagate</li>
- * <li>replication of an SRDI Message to other peers in a given peerview</li>
- * <li>given an expression SRDI provides a independently calculated starting point</li>
- * <li>Forwarding a ResolverQuery, and taking care of hopCount, random selection</li>
- * <li>registers with the RendezvousService to determine when to share SrdSRDIi Entries</li>
- * and whether to push deltas, or full a index</li>
- * <li>provides a SrdiInterface giving to provide a generic SRDI message definition</li>
- * </ul>
- * <p/>
- * If Srdi is started as a thread it performs periodic SRDI pushes of
- * indices and also has the ability to respond to rendezvous events.
- * <p/>
- * ResolverSrdiMessages define a ttl, to indicate to the receiving service
- * whether to replicate such message or not.
- * <p/>
- * In addition A ResolverQuery defines a hopCount to indicate how many
- * hops a query has been forwarded. This element could be used to detect/stop a
- * query forward loopback hopCount is checked to make ensure a query is not
- * forwarded more than twice.
- *
- * @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-prp" target="_blank">JXTA Protocols Specification : Peer Resolver Protocol</a>
- */
-public class Srdi implements Runnable, RendezvousListener {
-
-    /**
-     * Logger
-     */
-    private final static Logger LOG = Logger.getLogger(Srdi.class.getName());
-
-    private PeerGroup group = null;
-    private String handlername = null;
-    private SrdiInterface srdiService = null;
-    private SrdiIndex srdiIndex;
-    private long connectPollInterval = 0;
-    private long pushInterval = 0;
-
-    private volatile boolean stop = false;
-    private AtomicBoolean republishSignal = new AtomicBoolean(false);
-
-    private ResolverService resolver;
-    private MembershipService membership;
-    private final JxtaHash jxtaHash = new JxtaHash();
-    private CredentialListener membershipCredListener = null;
-    private Credential credential = null;
-    private StructuredDocument credentialDoc = null;
-    private final String rdvEventLock;
-
-    /**
-     * Random number generator used for random result selection
-     */
-    private final static Random random = new Random();
-
-    // This ought be to configurable/based on a function applied to the rpv size
-    /**
-     * Replication threshold (minimum number of rdv's in peer view before replication)
-     */
-    public final static int RPV_REPLICATION_THRESHOLD = 3;
-
-    /**
-     * Listener we use for membership property events.
-     */
-    private class CredentialListener implements PropertyChangeListener {
-
-        /**
-         * {@inheritDoc}
-         */
-        public void propertyChange(PropertyChangeEvent evt) {
-            if ("defaultCredential".equals(evt.getPropertyName())) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("New default credential event");
-                }
-
-                synchronized (Srdi.this) {
-                    credential = (Credential) evt.getNewValue();
-                    credentialDoc = null;
-                    if (null != credential) {
-                        try {
-                            credentialDoc = credential.getDocument(MimeMediaType.XMLUTF8);
-                        } catch (Exception all) {
-                            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                                LOG.log(Level.WARNING, "Could not generate credential document", all);
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-
-    /**
-     * Interface for pushing entries.
-     */
-    public interface SrdiInterface {
-
-        /**
-         * Pushe SRDI entries.
-         *
-         * @param all if true then push all entries otherwise just push
-         *            those which have changed since the last push.
-         */
-        void pushEntries(boolean all);
-    }
-
-    /**
-     * Starts the Srdi Service. wait for connectPollInterval prior to
-     * pushing the index if connected to a rdv, otherwise index is
-     * as soon as the Rendezvous connect occurs
-     *
-     * @param group               group context to operate in
-     * @param handlername         the SRDI handlername
-     * @param srdiService         the service utilizing this Srdi, for purposes of
-     *                            callback push entries on events such as rdv connect/disconnect, etc.
-     * @param srdiIndex           The index instance associated with this service
-     * @param connectPollInterval initial timeout before the very first push of entries in milliseconds
-     * @param pushInterval        the Interval at which the deltas are pushed in milliseconds
-     */
-    public Srdi(PeerGroup group, String handlername, SrdiInterface srdiService, SrdiIndex srdiIndex, long connectPollInterval, long pushInterval) {
-
-        this.group = group;
-        this.handlername = handlername;
-        this.srdiService = srdiService;
-        this.srdiIndex = srdiIndex;
-        this.connectPollInterval = connectPollInterval;
-        this.pushInterval = pushInterval;
-        this.rdvEventLock = new String(handlername);
-        membership = group.getMembershipService();
-
-        resolver = group.getResolverService();
-
-        group.getRendezVousService().addListener(this);
-
-        synchronized (this) {
-            membershipCredListener = new CredentialListener();
-            membership.addPropertyChangeListener("defaultCredential", membershipCredListener);
-
-            try {
-                credential = membership.getDefaultCredential();
-
-                if (null != credential) {
-                    credentialDoc = credential.getDocument(MimeMediaType.XMLUTF8);
-                } else {
-                    credentialDoc = null;
-                }
-            } catch (Exception all) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "could not get credential", all);
-                }
-            }
-        }
-    }
-
-    /**
-     * stop the current running thread
-     */
-    public synchronized void stop() {
-
-        if (stop) {
-            return;
-        }
-
-        stop = true;
-
-        RendezVousService rendezvous = group.getRendezVousService();
-
-        if (null != rendezvous) {
-            rendezvous.removeListener(this);
-        }
-
-        membership.removePropertyChangeListener("defaultCredential", membershipCredListener);
-        membershipCredListener = null;
-
-        // wakeup and die
-        synchronized (rdvEventLock) {
-            rdvEventLock.notify();
-        }
-    }
-
-    /**
-     * Replicates a SRDI message to other rendezvous'
-     * entries are replicated by breaking out entries out of the message
-     * and sorted out into rdv distribution bins. after which smaller messages
-     * are sent to other rdv's
-     *
-     * @param srdiMsg srdi message to replicate
-     */
-
-    public void replicateEntries(SrdiMessage srdiMsg) {
-
-        List<PeerID> rpv = getGlobalPeerView();
-
-        if (srdiMsg.getScope() < SrdiMessage.REPLICATE || !group.isRendezvous() || rpv.size() < RPV_REPLICATION_THRESHOLD) {
-            return;
-        }
-
-        Iterator allEntries = srdiMsg.getEntries().iterator();
-        Map<PeerID, SrdiMessageImpl> bins = new HashMap<PeerID, SrdiMessageImpl>(rpv.size());
-
-        while (allEntries.hasNext()) {
-            SrdiMessage.Entry entry = (SrdiMessage.Entry) allEntries.next();
-            PeerID destPeer = getReplicaPeer(srdiMsg.getPrimaryKey() + entry.key + entry.value);
-
-            if (destPeer == null || destPeer.equals(group.getPeerID())) {
-                // don't replicate message back to ourselves
-                continue;
-            }
-            SrdiMessageImpl sm = bins.get(destPeer);
-
-            if (sm == null) {
-                sm = new SrdiMessageImpl();
-                sm.setPrimaryKey(srdiMsg.getPrimaryKey());
-                sm.setPeerID(srdiMsg.getPeerID());
-                bins.put(destPeer, sm);
-            }
-            sm.addEntry(entry);
-        }
-
-        for (PeerID destPeer : bins.keySet()) {
-            SrdiMessageImpl msg = bins.get(destPeer);
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("[" + group.getPeerGroupName() + " / " + handlername + "] Forwarding replica Srdi to " + destPeer);
-            }
-            pushSrdi(destPeer, msg);
-        }
-    }
-
-    /**
-     * Push an SRDI message to a peer
-     * ttl is 1, and therefore services receiving this message could
-     * choose to replicate this message
-     *
-     * @param peer peer to push message to, if peer is null it is
-     *             the message is propagated
-     * @param srdi SRDI message to send
-     */
-    public void pushSrdi(ID peer, SrdiMessage srdi) {
-        try {
-            ResolverSrdiMsg resSrdi = new ResolverSrdiMsgImpl(handlername, credential, srdi.toString());
-
-            if (null == peer) {
-                resolver.sendSrdi(null, resSrdi);
-            } else {
-                resolver.sendSrdi(peer.toString(), resSrdi);
-            }
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed to send srdi message", e);
-            }
-        }
-    }
-
-    /**
-     * Forwards a Query to a specific peer
-     * hopCount is incremented to indicate this query is forwarded
-     *
-     * @param peer  peerid to forward query to
-     * @param query The query
-     */
-    public void forwardQuery(PeerID peer, ResolverQueryMsg query) {
-
-        query.incrementHopCount();
-        if (query.getHopCount() > 2) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("hopCount exceeded. Not forwarding query " + query.getHopCount());
-            }
-            // query has been forwarded too many times
-            return;
-        }
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine(MessageFormat.format("[{0} / {1}] Forwarding Query to {2}",
-                    group.getPeerGroupName(), handlername, peer));
-        }
-        resolver.sendQuery(peer.toString(), query);
-    }
-
-    /**
-     * Forwards a Query to a list of peers
-     * hopCount is incremented to indicate this query is forwarded
-     *
-     * @param peers The peerids to forward query to
-     * @param query The query
-     */
-    public void forwardQuery(List<PeerID> peers, ResolverQueryMsg query) {
-
-        query.incrementHopCount();
-        if (query.getHopCount() > 2) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(MessageFormat.format("hopCount exceeded not forwarding query {0}", query.getHopCount()));
-            }
-            // query has been forwarded too many times
-            return;
-        }
-
-        for (PeerID destPeer : peers) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(MessageFormat.format("[{0} / {1}] Forwarding Query to {2}",
-                        group.getPeerGroupName(), handlername, destPeer));
-            }
-            resolver.sendQuery(destPeer.toString(), query);
-        }
-    }
-
-    /**
-     * Forwards a Query to a list of peers
-     * if the list of peers exceeds threshold, and random threshold is picked
-     * from <code>peers</code>
-     * hopCount is incremented to indicate this query is forwarded
-     *
-     * @param peers     The peerids to forward query to
-     * @param query     The query
-     * @param threshold number of peers to forward the query to
-     */
-    public void forwardQuery(List<PeerID> peers, ResolverQueryMsg query, int threshold) {
-
-        if (query.getHopCount() > 2) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(MessageFormat.format("[{0} / {1}] hopCount exceeded ({2}) not forwarding query.",
-                        group.getPeerGroupName(), handlername, query.getHopCount()));
-            }
-            // query has been forwarded too many times
-            return;
-        }
-        if (peers.size() <= threshold) {
-            forwardQuery(peers, query);
-        } else {
-            // pick some random entries out of the list
-            List<PeerID> newPeers = randomResult(peers, threshold);
-            forwardQuery(newPeers, query);
-        }
-    }
-
-    /**
-     * returns a random List(threshold) from a given list
-     *
-     * @param result    starting set
-     * @param threshold sub-set desired
-     * @return sub-list of result
-     */
-    protected List<PeerID> randomResult(List<PeerID> result, int threshold) {
-        if (threshold < result.size()) {
-            List<PeerID> res = new ArrayList<PeerID>(threshold);
-            for (int i = 0; i < threshold; i++) {
-                int rand = random.nextInt(result.size());
-                res.add(result.get(rand));
-                result.remove(rand);
-            }
-            return res;
-        }
-        return result;
-    }
-
-    /**
-     * Given an expression return a peer from the list peers in the peerview
-     * this function is used to to give a replication point, and entry point
-     * to query on a pipe
-     *
-     * @param expression expression to derive the mapping from
-     * @return The replicaPeer value
-     */
-    public PeerID getReplicaPeer(String expression) {
-        PeerID pid;
-        List<PeerID> rpv = getGlobalPeerView();
-
-        if (rpv.size() >= RPV_REPLICATION_THRESHOLD) {
-            BigInteger digest;
-
-            synchronized (jxtaHash) {
-                jxtaHash.update(expression);
-                digest = jxtaHash.getDigestInteger().abs();
-            }
-            BigInteger sizeOfSpace = java.math.BigInteger.valueOf(rpv.size());
-            BigInteger sizeOfHashSpace = BigInteger.ONE.shiftLeft(8 * digest.toByteArray().length);
-            int pos = (digest.multiply(sizeOfSpace)).divide(sizeOfHashSpace).intValue();
-
-            pid = rpv.get(pos);
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(MessageFormat.format("[{0} / {1}] Found a direct peer {2}", group.getPeerGroupName(), handlername, pid));
-            }
-            return pid;
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * forward srdi message to another peer
-     *
-     * @param peerid       PeerID to forward query to
-     * @param srcPid       The source originator
-     * @param primaryKey   primary key
-     * @param secondarykey secondary key
-     * @param value        value of the entry
-     * @param expiration   expiration in ms
-     */
-    public void forwardSrdiMessage(PeerID peerid, PeerID srcPid, String primaryKey, String secondarykey, String value, long expiration) {
-
-        try {
-            SrdiMessageImpl srdi = new SrdiMessageImpl(srcPid, // ttl of 0, avoids additional replication
-                    0, primaryKey, secondarykey, value, expiration);
-
-            ResolverSrdiMsgImpl resSrdi = new ResolverSrdiMsgImpl(handlername, credential, srdi.toString());
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(MessageFormat.format("[{0} / {1}] Forwarding a SRDI messsage of type {2} to {3}", group.getPeerGroupName(),
-                                handlername, primaryKey, peerid));
-            }
-            resolver.sendSrdi(peerid.toString(), resSrdi);
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed forwarding SRDI Message", e);
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @SuppressWarnings("fallthrough")
-    public void rendezvousEvent(RendezvousEvent event) {
-
-        int theEventType = event.getType();
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine(MessageFormat.format("[{0} / {1}] Processing {2}", group.getPeerGroupName(), handlername, event));
-        }
-
-        switch (theEventType) {
-
-            case RendezvousEvent.RDVCONNECT:
-                synchronized (rdvEventLock) {
-                    // wake up the publish thread now.
-                    rdvEventLock.notify();
-                }
-
-               /*
-                *  FALLSTHRU
-                */
-            case RendezvousEvent.RDVRECONNECT:
-                // No need to wake up the publish thread; reconnect should not force indices to be published.
-                break;
-
-            case RendezvousEvent.CLIENTCONNECT:
-            case RendezvousEvent.CLIENTRECONNECT:
-            case RendezvousEvent.BECAMERDV:
-            case RendezvousEvent.BECAMEEDGE:
-                // XXX 20031110 bondolo perhaps becoming edge one should cause it to wake up so that run() switch to
-                // don't do anything.
-                break;
-
-            case RendezvousEvent.RDVFAILED:
-            case RendezvousEvent.RDVDISCONNECT:
-                republishSignal.set(true);
-                break;
-
-            case RendezvousEvent.CLIENTFAILED:
-            case RendezvousEvent.CLIENTDISCONNECT:
-                // we should flush the cache for the peer
-                synchronized (rdvEventLock) {
-                    if (group.isRendezvous() && (srdiIndex != null)) {
-                        srdiIndex.remove((PeerID) event.getPeerID());
-                    }
-                }
-                break;
-
-            default:
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning(
-                            MessageFormat.format("[{0} / {1}] Unexpected RDV event {2}", group.getPeerGroupName(), handlername, event));
-                }
-                break;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Main processing method for the SRDI Worker thread
-     * Send all entries, wait for pushInterval, then send deltas
-     */
-    public void run() {
-
-        boolean waitingForRdv;
-        boolean republish = true;
-
-        try {
-            while (!stop) {
-                // upon connection we will have to republish
-                republish |= republishSignal.compareAndSet(true, false);
-                waitingForRdv = group.isRendezvous() || !group.getRendezVousService().isConnectedToRendezVous() ||
-                        group.getRendezVousService().getRendezVousStatus() == RendezVousStatus.ADHOC;
-
-                if (!waitingForRdv) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("[" + group.getPeerGroupName() + " / " + handlername + "] Pushing "
-                                + (republish ? "all entries" : "deltas"));
-                    }
-
-                    srdiService.pushEntries(republish);
-                    republish = false;
-                }
-
-                synchronized (rdvEventLock) {
-                    try {
-                        rdvEventLock.wait(waitingForRdv ? connectPollInterval : pushInterval);
-                    } catch (InterruptedException e) {
-                        Thread.interrupted();
-                    }
-                }
-            }
-        } catch (Throwable all) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE,
-                        "Uncaught Throwable in " + Thread.currentThread().getName() + "[" + group.getPeerGroupName() + " / "
-                                + handlername + "]",all);
-            }
-        }
-    }
-
-    /**
-     * get the global peerview as the rendezvous service only returns
-     * the peerview without the local RDV peer.  We need this
-     * consistent view for the SRDI index if not each RDV will have a
-     * different peerview, off setting the index even when the peerview
-     * is stable
-     *
-     * @return the sorted list
-     */
-    public Vector<PeerID> getGlobalPeerView() {
-
-        Vector<PeerID> global = new Vector<PeerID>();
-        SortedSet<String> set = new TreeSet<String>();
-
-        try {
-            // get the local peerview
-            List<RdvAdvertisement> rpv = group.getRendezVousService().getLocalWalkView();
-
-            for (RdvAdvertisement padv : rpv) {
-                set.add(padv.getPeerID().toString());
-            }
-
-            // add myself
-            set.add(group.getPeerID().toString());
-
-            // produce a vector of Peer IDs
-            for (String aSet : set) {
-                try {
-                    PeerID peerID = (PeerID) IDFactory.fromURI(new URI(aSet));
-                    global.add(peerID);
-                } catch (URISyntaxException badID) {
-                    throw new IllegalArgumentException("Bad PeerID ID in advertisement");
-                } catch (ClassCastException badID) {
-                    throw new IllegalArgumentException("ID was not a peerID");
-                }
-            }
-        } catch (Exception ex) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failure generating the global view", ex);
-            }
-        }
-        return global;
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/cm/SrdiIndex.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/cm/SrdiIndex.java
deleted file mode 100644 (file)
index f4849d1..0000000
+++ /dev/null
@@ -1,987 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *
- *  The Sun Project JXTA(TM) Software License
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *
- *  3. The end-user documentation included with the redistribution, if any, must
- *     include the following acknowledgment: "This product includes software
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology."
- *     Alternately, this acknowledgment may appear in the software itself, if
- *     and wherever such third-party acknowledgments normally appear.
- *
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must
- *     not be used to endorse or promote products derived from this software
- *     without prior written permission. For written permission, please contact
- *     Project JXTA at http://www.jxta.org.
- *
- *  5. Products derived from this software may not be called "JXTA", nor may
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United
- *  States and other countries.
- *
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of
- *  the license in source files.
- *
- *  ====================================================================
- *
- *  This software consists of voluntary contributions made by many individuals
- *  on behalf of Project JXTA. For more information on Project JXTA, please see
- *  http://www.jxta.org.
- *
- *  This license is based on the BSD license adopted by the Apache Foundation.
- */
-package net.jxta.impl.cm;
-
-import net.jxta.id.IDFactory;
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.impl.xindice.core.DBException;
-import net.jxta.impl.xindice.core.data.Key;
-import net.jxta.impl.xindice.core.data.Record;
-import net.jxta.impl.xindice.core.data.Value;
-import net.jxta.impl.xindice.core.filer.BTreeCallback;
-import net.jxta.impl.xindice.core.filer.BTreeFiler;
-import net.jxta.impl.xindice.core.indexer.IndexQuery;
-import net.jxta.impl.xindice.core.indexer.NameIndexer;
-import net.jxta.logging.Logging;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.EOFException;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.UndeclaredThrowableException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * SrdiIndex
- */
-public class SrdiIndex implements Runnable {
-    
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(SrdiIndex.class.getName());
-    
-    private long interval = 1000 * 60 * 10;
-    private volatile boolean stop = false;
-    private final Indexer srdiIndexer;
-    private final BTreeFiler cacheDB;
-    private Thread gcThread = null;
-    private final Set<PeerID> gcPeerTBL = new HashSet<PeerID>();
-    
-    private final String indexName;
-    
-    /**
-     * Constructor for the SrdiIndex
-     *
-     * @param group     group
-     * @param indexName the index name
-     */
-    public SrdiIndex(PeerGroup group, String indexName) {
-        this.indexName = indexName;
-        
-        try {
-            String pgdir = null;
-            File storeHome;
-            
-            if (group == null) {
-                pgdir = "srdi-index";
-                storeHome = new File(".jxta");
-            } else {
-                pgdir = group.getPeerGroupID().getUniqueValue().toString();
-                storeHome = new File(group.getStoreHome());
-            }
-            
-            File rootDir = new File(new File(storeHome, "cm"), pgdir);
-            
-            rootDir = new File(rootDir, "srdi");
-            if (!rootDir.exists()) {
-                // We need to create the directory
-                if (!rootDir.mkdirs()) {
-                    throw new RuntimeException("Cm cannot create directory " + rootDir);
-                }
-            }
-            // peerid database
-            // Storage
-            cacheDB = new BTreeFiler();
-            // lazy checkpoint
-            cacheDB.setSync(false);
-            cacheDB.setLocation(rootDir.getCanonicalPath(), indexName);
-            
-            if (!cacheDB.open()) {
-                cacheDB.create();
-                // now open it
-                cacheDB.open();
-            }
-            
-            // index
-            srdiIndexer = new Indexer(false);
-            srdiIndexer.setLocation(rootDir.getCanonicalPath(), indexName);
-            if (!srdiIndexer.open()) {
-                srdiIndexer.create();
-                // now open it
-                srdiIndexer.open();
-            }
-            
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("[" + ((group == null) ? "none" : group.toString()) + "] : Initialized " + indexName);
-            }
-        } catch (DBException de) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Unable to Initialize databases", de);
-            }
-            
-            throw new UndeclaredThrowableException(de, "Unable to Initialize databases");
-        } catch (Throwable e) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Unable to create Cm", e);
-            }
-            
-            if (e instanceof Error) {
-                throw (Error) e;
-            } else if (e instanceof RuntimeException) {
-                throw (RuntimeException) e;
-            } else {
-                throw new UndeclaredThrowableException(e, "Unable to create Cm");
-            }
-        }
-    }
-    
-    /**
-     * Construct a SrdiIndex and starts a GC thread which runs every "interval"
-     * milliseconds
-     *
-     * @param interval  the interval at which the gc will run in milliseconds
-     * @param group     group context
-     * @param indexName SrdiIndex name
-     */
-    
-    public SrdiIndex(PeerGroup group, String indexName, long interval) {
-        this(group, indexName);
-        this.interval = interval;
-        startGC(group, indexName, interval);
-    }
-    
-    /**
-     * Start the GC thread
-     *
-     * @param group the PeerGroup
-     * @param indexName index name
-     * @param interval interval in milliseconds
-     */
-    protected void startGC(PeerGroup group, String indexName, long interval) {
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("[" + ((group == null) ? "none" : group.toString()) + "] : Starting SRDI GC Thread for " + indexName);
-        }
-        
-        gcThread = new Thread(group.getHomeThreadGroup(), this, "SrdiIndex GC :" + indexName + " every " + interval + "ms");
-        gcThread.setDaemon(true);
-        gcThread.start();
-    }
-    
-    /**
-     * Returns the name of this srdi index.
-     *
-     * @return index name.
-     */
-    public String getIndexName() {
-        return indexName;
-    }
-    
-    /**
-     * add an index entry
-     *
-     * @param primaryKey primary key
-     * @param attribute  Attribute String to query on
-     * @param value      value of the attribute string
-     * @param expiration expiration associated with this entry relative time in
-     *                   milliseconds
-     * @param pid        peerid reference
-     */
-    public synchronized void add(String primaryKey, String attribute, String value, PeerID pid, long expiration) {
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("[" + indexName + "] Adding " + primaryKey + "/" + attribute + " = \'" + value + "\' for " + pid);
-        }
-        
-        try {
-            Key key = new Key(primaryKey + attribute + value);
-            long expiresin = TimeUtils.toAbsoluteTimeMillis(expiration);
-            
-            // update the record if it exists
-            synchronized (cacheDB) {
-                // FIXME hamada 10/14/04 it is possible a peer re-appears with
-                // a different set of indexes since it's been marked for garbage
-                // collection.  will address this issue in a subsequent patch
-                gcPeerTBL.remove(pid);
-                
-                Record record = cacheDB.readRecord(key);
-                List<Entry> old;
-                
-                if (record != null) {
-                    old = readRecord(record).list;
-                } else {
-                    old = new ArrayList<Entry>();
-                }
-                Entry entry = new Entry(pid, expiresin);
-                
-                if (!old.contains(entry)) {
-                    old.add(entry);
-                } else {
-                    // entry exists, replace it (effectively updating expiration)
-                    old.remove(old.indexOf(entry));
-                    old.add(entry);
-                }
-                // no sense in keeping expired entries.
-                old = removeExpired(old);
-                    long t0 = TimeUtils.timeNow();
-                byte[] data = getData(key, old);
-                
-                // if (LOG.isLoggable(Level.FINE)) {
-                // LOG.fine("Serialized result in : " + (TimeUtils.timeNow() - t0) + "ms.");
-                // }
-                if (data == null) {
-                    if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                        LOG.severe("Failed to serialize data");
-                    }
-                    return;
-                }
-                Value recordValue = new Value(data);
-                long pos = cacheDB.writeRecord(key, recordValue);
-                Map<String, String> indexables = getIndexMap(primaryKey + attribute, value);
-                
-                srdiIndexer.addToIndex(indexables, pos);
-            }
-        } catch (IOException de) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed to add SRDI", de);
-            }
-        } catch (DBException de) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed to add SRDI", de);
-            }
-        }
-    }
-    
-    /**
-     * retrieves a record
-     *
-     * @param pkey  primary key
-     * @param skey  secondary key
-     * @param value value
-     * @return List of Entry objects
-     */
-    public List<Entry> getRecord(String pkey, String skey, String value) {
-        Record record = null;
-        
-        try {
-            Key key = new Key(pkey + skey + value);
-            
-            synchronized (cacheDB) {
-                record = cacheDB.readRecord(key);
-            }
-        } catch (DBException de) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed to retrieve SrdiIndex record", de);
-            }
-        }
-        // if record is null, readRecord returns an empty list
-        return readRecord(record).list;
-        
-    }
-    
-    /**
-     * inserts a pkey into a map with a value of value
-     *
-     * @param primaryKey primary key
-     * @param value      value
-     * @return The Map
-     */
-    
-    private Map<String, String> getIndexMap(String primaryKey, String value) {
-        if (primaryKey == null) {
-            return null;
-        }
-        if (value == null) {
-            value = "";
-        }
-        Map<String, String> map = new HashMap<String, String>(1);
-        
-        map.put(primaryKey, value);
-        return map;
-    }
-    
-    /**
-     * remove entries pointing to peer id from cache
-     *
-     * @param pid peer id to remove
-     */
-    public synchronized void remove(PeerID pid) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine(" Adding " + pid + " to peer GC table");
-        }
-        gcPeerTBL.add(pid);
-    }
-    
-    /**
-     * Query SrdiIndex
-     *
-     * @param attribute Attribute String to query on
-     * @param value     value of the attribute string
-     * @return an enumeration of canonical paths
-     * @param primaryKey primary key
-     * @param threshold max number of results
-     */
-    public synchronized List<PeerID> query(String primaryKey, String attribute, String value, int threshold) {
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("[" + indexName + "] Querying for " + threshold + " " + primaryKey + "/" + attribute + " = \'" + value + "\'");
-        }
-        
-        // return nothing
-        if (primaryKey == null) {
-            return Collections.emptyList();
-        }
-        
-        List<PeerID> res;
-        
-        // a blind query
-        if (attribute == null) {
-            res = query(primaryKey);
-        } else {
-            res = new ArrayList<PeerID>();
-            
-            IndexQuery iq = Cm.getIndexQuery(value);
-            
-            try {
-                srdiIndexer.search(iq, primaryKey + attribute, new SearchCallback(cacheDB, res, threshold, gcPeerTBL));
-            } catch (Exception ex) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Exception while searching in index", ex);
-                }
-            }
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine( "[" + indexName + "] Returning " + res.size() + " results for " + primaryKey + "/" + attribute + " = \'"
-                    + value + "\'");
-        }
-        
-        return res;
-    }
-    
-    /**
-     * Query SrdiIndex
-     *
-     * @param primaryKey primary key
-     * @return A list of Peer IDs.
-     */
-    public synchronized List<PeerID> query(String primaryKey) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("[" + indexName + "] Querying for " + primaryKey);
-        }
-        
-        List<PeerID> res = new ArrayList<PeerID>();
-        
-        try {
-            Map<String, NameIndexer> map = srdiIndexer.getIndexers();
-            
-            for (Map.Entry<String, NameIndexer> index : map.entrySet()) {
-                String indexName = index.getKey();
-                // seperate the index name from attribute
-                if (indexName.startsWith(primaryKey)) {
-                    NameIndexer idxr = index.getValue();
-                    idxr.query(null, new SearchCallback(cacheDB, res, Integer.MAX_VALUE, gcPeerTBL));
-                }
-            }
-        } catch (Exception ex) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Exception while searching in index", ex);
-            }
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("[" + indexName + "] Returning " + res.size() + " results for " + primaryKey);
-        }
-        
-        return res;
-    }
-    
-    private static final class SearchCallback implements BTreeCallback {
-        private final BTreeFiler cacheDB;
-        private final int threshold;
-        private final List<PeerID> results;
-        private final Set<PeerID> excludeTable;
-        
-        SearchCallback(BTreeFiler cacheDB, List<PeerID> results, int threshold, Set<PeerID> excludeTable) {
-            this.cacheDB = cacheDB;
-            this.threshold = threshold;
-            this.results = results;
-            this.excludeTable = excludeTable;
-        }
-        
-        /**
-         * @inheritDoc
-         */
-        public boolean indexInfo(Value val, long pos) {
-            
-            if (results.size() >= threshold) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("SearchCallback.indexInfo reached Threshold :" + threshold);
-                }
-                return false;
-            }
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Found " + val);
-            }
-            Record record = null;
-            
-            try {
-                record = cacheDB.readRecord(pos);
-            } catch (DBException ex) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Exception while reading indexed", ex);
-                }
-                return false;
-            }
-            
-            if (record != null) {
-                long t0 = TimeUtils.timeNow();
-                SrdiIndexRecord rec = readRecord(record);
-
-                if (Logging.SHOW_FINEST && LOG.isLoggable(Level.FINEST)) {
-                    LOG.finest("Got result back in : " + (TimeUtils.timeNow() - t0) + "ms.");
-                }
-
-                copyIntoList(results, rec.list, excludeTable);
-            }
-            
-            return results.size() < threshold;
-        }
-    }
-    
-    
-    private static final class GcCallback implements BTreeCallback {
-        private final BTreeFiler cacheDB;
-        private final Indexer idxr;
-        private final List<Long> list;
-        private final Set<PeerID> table;
-        
-        GcCallback(BTreeFiler cacheDB, Indexer idxr, List<Long> list, Set<PeerID> table) {
-            this.cacheDB = cacheDB;
-            this.idxr = idxr;
-            this.list = list;
-            this.table = table;
-        }
-        
-        /**
-         * @inheritDoc
-         */
-        public boolean indexInfo(Value val, long pos) {
-            
-            Record record = null;
-            synchronized (cacheDB) {
-                try {
-                    record = cacheDB.readRecord(pos);
-                } catch (DBException ex) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Exception while reading indexed", ex);
-                    }
-                    return false;
-                }
-                if (record == null) {
-                    return true;
-                }
-                SrdiIndexRecord rec = readRecord(record);
-                List<Entry> res = rec.list;
-                boolean changed = false;
-                
-                Iterator<Entry> eachEntry = res.iterator();
-                while(eachEntry.hasNext()) {
-                    Entry entry = eachEntry.next();
-                    
-                    if (entry.isExpired() || table.contains(entry.peerid)) {
-                        changed = true;
-                        eachEntry.remove();
-                    }
-                }
-                if (changed) {
-                    if (res.isEmpty()) {
-                        try {
-                            cacheDB.deleteRecord(rec.key);
-                            list.add(pos);
-                        } catch (DBException e) {
-                            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                                LOG.log(Level.WARNING, "Exception while deleting empty record", e);
-                            }
-                        }                        
-                    } else {
-                        // write it back
-                        byte[] data = getData(rec.key, res);
-                        Value recordValue = new Value(data);
-                        
-                        try {
-                            cacheDB.writeRecord(pos, recordValue);
-                        } catch (DBException ex) {
-                            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                                LOG.log(Level.WARNING, "Exception while writing back record", ex);
-                            }
-                        }
-                    }
-                }
-            }
-            return true;
-        }
-    }
-    
-    /**
-     * copies the content of List into a list. Expired entries are not
-     * copied
-     *
-     * @param to   list to copy into
-     * @param from list to copy from
-     * @param table table of PeerID's
-     */
-    private static void copyIntoList(List<PeerID> to, List<Entry> from, Set<PeerID> table) {
-        for (Entry entry : from) {
-            boolean expired = entry.isExpired();
-            
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer("Entry peerid : " + entry.peerid + (expired ? " EXPIRED " : (" Expires at : " + entry.expiration)));
-            }
-            
-            if (!to.contains(entry.peerid) && !expired) {
-                if (!table.contains(entry.peerid)) {
-                    if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                        LOG.finer("adding Entry :" + entry.peerid + " to list");
-                    }
-                    to.add(entry.peerid);
-                } else {
-                    if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                        LOG.finer("Skipping gc marked entry :" + entry.peerid);
-                    }
-                }
-            } else {
-                if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                    LOG.finer("Skipping expired Entry :" + entry.peerid);
-                }
-            }
-        }
-    }
-    
-    /**
-     * Converts a List of {@link Entry} into a byte[]
-     *
-     * @param key  record key
-     * @param list List to convert
-     * @return byte []
-     */
-    private static byte[] getData(Key key, List<Entry> list) {
-        try {
-            ByteArrayOutputStream bos = new ByteArrayOutputStream();
-            DataOutputStream dos = new DataOutputStream(bos);
-            
-            dos.writeUTF(key.toString());
-            dos.writeInt(list.size());
-            for (Entry anEntry : list) {
-                dos.writeUTF(anEntry.peerid.toString());
-                dos.writeLong(anEntry.expiration);
-            }
-            dos.close();
-            return bos.toByteArray();
-        } catch (IOException ie) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Exception while reading Entry", ie);
-            }
-        }
-        return null;
-    }
-    
-    /**
-     * Reads the content of a record into List
-     *
-     * @param record Btree Record
-     * @return List of entries
-     */
-    public static SrdiIndexRecord readRecord(Record record) {
-        List<Entry> result = new ArrayList<Entry>();
-        Key key = null;
-        
-        if (record == null) {
-            return new SrdiIndexRecord(null, result);
-        }
-        if (record.getValue().getLength() <= 0) {
-            return new SrdiIndexRecord(null, result);
-        }
-        InputStream is = record.getValue().getInputStream();
-        
-        try {
-            DataInputStream ois = new DataInputStream(is);
-            
-            key = new Key(ois.readUTF());
-            int size = ois.readInt();
-            
-            for (int i = 0; i < size; i++) {
-                try {
-                    String idstr = ois.readUTF();
-                    PeerID pid = (PeerID) IDFactory.fromURI(new URI(idstr));
-                    long exp = ois.readLong();
-                    Entry entry = new Entry(pid, exp);
-                    
-                    result.add(entry);
-                } catch (URISyntaxException badID) {
-                    // ignored
-                }
-            }
-            ois.close();
-        } catch (EOFException eofe) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Empty record", eofe);
-            }
-        } catch (IOException ie) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Exception while reading Entry", ie);
-            }
-        }
-        return new SrdiIndexRecord(key, result);
-    }
-    
-    /**
-     * Empties the index completely.
-     * The entries are abandoned to the GC.
-     */
-    public synchronized void clear() {
-        // FIXME changing the behavior a bit
-        // instead of dropping all srdi entries, we let them expire
-        // if that is not a desired behavior the indexer could be dropped
-        // simply close it, and remove all index db created
-        try {
-            srdiIndexer.close();
-            cacheDB.close();
-        } catch (Exception e) {
-            // bad bits we are done
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "failed to close index", e);
-            }
-        }
-    }
-    
-    /**
-     * Garbage Collect expired entries
-     */
-    public void garbageCollect() {
-        try {
-            Map<String, NameIndexer> map = srdiIndexer.getIndexers();
-            
-            for(NameIndexer idxr : map.values()) {
-                List<Long> list = new ArrayList<Long>();
-                
-                if(stop) {
-                    break;
-                }
-                
-                synchronized(this) {
-                    idxr.query(null, new GcCallback(cacheDB, srdiIndexer, list, gcPeerTBL));
-                    srdiIndexer.purge(list);
-                }
-            }
-            gcPeerTBL.clear();
-        } catch (Exception ex) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failure during SRDI Garbage Collect", ex);
-            }
-        }
-    }
-    
-    /**
-     * Remove expired entries from a List
-     *
-     * @param list A list of entries.
-     * @return The same list with the expired entries removed.
-     */
-    private static List<Entry> removeExpired(List<Entry> list) {
-        Iterator<Entry> eachEntry = list.iterator();
-        
-        while(eachEntry.hasNext()) {
-            Entry entry = eachEntry.next();
-            
-            if (entry.isExpired()) {
-                eachEntry.remove();
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Removing expired Entry peerid :" + entry.peerid + " Expires at :" + entry.expiration);
-                }
-            }
-        }
-        return list;
-    }
-    
-    private static boolean isExpired(long expiration) {
-        return (TimeUtils.timeNow() > expiration);
-    }
-    
-    /**
-     * stop the current running thread
-     */
-    public synchronized void stop() {
-        if(stop) {
-            return;
-        }
-        
-        stop = true;
-        
-        // wakeup and die
-        try {
-            Thread temp = gcThread;
-            if (temp != null) {
-                synchronized (temp) {
-                    temp.notify();
-                }
-            }
-        } catch (Exception ignored) {
-            // ignored
-        }
-        
-        // Stop the database
-        
-        try {
-            srdiIndexer.close();
-            cacheDB.close();
-            gcPeerTBL.clear();
-        } catch (Exception ex) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Unable to stop the Srdi Indexer", ex);
-            }
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Periodic thread for GC
-     */
-    public void run() {
-        try {
-            while (!stop) {
-                try {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Waiting for " + interval + "ms before garbage collection");
-                    }
-                    synchronized (gcThread) {
-                        gcThread.wait(interval);
-                    }
-                } catch (InterruptedException woken) {
-                    // The only reason we are woken is to stop.
-                    Thread.interrupted();
-                    continue;
-                }
-                
-                if (stop) {
-                    break;
-                }
-                
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Garbage collection started");
-                }
-                
-                garbageCollect();
-                
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Garbage collection completed");
-                }
-            }
-        } catch (Throwable all) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Uncaught Throwable in thread :" + Thread.currentThread().getName(), all);
-            }
-        } finally {
-            synchronized (this) {
-                gcThread = null;
-            }
-        }
-    }
-    
-    /**
-     * Flushes the Srdi directory for a specified group
-     * this method should only be called before initialization of a given group
-     * calling this method on a running group would have undefined results
-     *
-     * @param group group context
-     */
-    public static void clearSrdi(PeerGroup group) {
-        
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Clearing SRDI for " + group.getPeerGroupName());
-        }
-        
-        try {
-            String pgdir = null;
-            
-            if (group == null) {
-                pgdir = "srdi-index";
-            } else {
-                pgdir = group.getPeerGroupID().getUniqueValue().toString();
-            }
-            File rootDir = null;
-            
-            if (group != null) {
-                rootDir = new File(new File(new File(group.getStoreHome()), "cm"), pgdir);
-            }
-            
-            rootDir = new File(rootDir, "srdi");
-            if (rootDir.exists()) {
-                // remove it along with it's content
-                String[] list = rootDir.list();
-                
-                for (String aList : list) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Removing : " + aList);
-                    }
-                    File file = new File(rootDir, aList);
-                    
-                    if (!file.delete()) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.warning("Unable to delete the file");
-                        }
-                    }
-                }
-                rootDir.delete();
-            }
-        } catch (Throwable t) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Unable to clear Srdi", t);
-            }
-        }
-    }
-    
-    /**
-     * An entry in the index tables.
-     */
-    public final static class Entry {
-        
-        public final PeerID peerid;
-        public final long expiration;
-        
-        /**
-         * Peer Pointer reference
-         *
-         * @param peerid     PeerID for this entry
-         * @param expiration the expiration for this entry
-         */
-        public Entry(PeerID peerid, long expiration) {
-            this.peerid = peerid;
-            this.expiration = expiration;
-        }
-        
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public boolean equals(Object obj) {
-            return obj instanceof Entry && (peerid.equals(((Entry) obj).peerid));
-        }
-        
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public int hashCode() {
-            return peerid.hashCode();
-        }
-        
-        /**
-         *  Return the absolute time in milliseconds at which this entry will
-         *  expire.
-         *
-         *  @return The absolute time in milliseconds at which this entry will
-         *  expire.
-         */
-        public long getExpiration() {
-            return expiration;
-        }
-        
-        /**
-         *  Return {@code true} if this entry is expired.
-         *
-         *  @return {@code true} if this entry is expired otherwise {@code false}.
-         */
-        public boolean isExpired() {
-            return TimeUtils.timeNow() > expiration;
-        }
-    }
-    
-    
-    /**
-     * an SrdiIndexRecord wrapper
-     */
-    public final static class SrdiIndexRecord {
-        
-        public final Key key;
-        public final List<Entry> list;
-        
-        /**
-         * SrdiIndex record
-         *
-         * @param key  record key
-         * @param list record entries
-         */
-        public SrdiIndexRecord(Key key,List<Entry> list) {
-            this.key = key;
-            this.list = list;
-        }
-        
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public boolean equals(Object obj) {
-            return obj instanceof SrdiIndexRecord && (key.equals(((SrdiIndexRecord) obj).key));
-        }
-        
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public int hashCode() {
-            return key.hashCode();
-        }
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/config.properties b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/config.properties
deleted file mode 100644 (file)
index f88f5ff..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-# JXTA Distribution Configuration Properties File
-#
-# This file contains properties which configure several basic defaults
-# for JXTA distributions. Normally these values do not need to be changed
-# by applications. (Most of the values have remained been unchanged since 
-# they were originally defined).
-#
-
-# ID of the net peer group as a URI
-#NetPeerGroupID=jxta-NetGroup
-NetPeerGroupID=uuid-E6973087961042BC8412A6356F9FB70702
-# Name of the Net Peer Group
-#NetPeerGroupName=NetPeerGroup
-NetPeerGroupName=p2p.linphone.org-NetPeerGroup
-# Description of the Net Peer Group
-#NetPeerGroupDesc=default Net Peer Group
-NetPeerGroupDesc=Net Peer Group for p2p.linphone.org
-# Default type of ID to use when creating an ID
-IDNewInstances=uuid
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/discovery/DiscoveryServiceImpl.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/discovery/DiscoveryServiceImpl.java
deleted file mode 100644 (file)
index 3dd7e6e..0000000
+++ /dev/null
@@ -1,1718 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.discovery;
-
-
-import net.jxta.credential.Credential;
-import net.jxta.discovery.DiscoveryEvent;
-import net.jxta.discovery.DiscoveryListener;
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.XMLDocument;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.OutgoingMessageEvent;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.id.ID;
-import net.jxta.impl.cm.Cm;
-import net.jxta.impl.cm.Srdi;
-import net.jxta.impl.cm.SrdiIndex;
-import net.jxta.impl.peergroup.StdPeerGroup;
-import net.jxta.impl.protocol.DiscoveryConfigAdv;
-import net.jxta.impl.protocol.DiscoveryQuery;
-import net.jxta.impl.protocol.DiscoveryResponse;
-import net.jxta.impl.protocol.ResolverQuery;
-import net.jxta.impl.protocol.ResolverResponse;
-import net.jxta.impl.protocol.SrdiMessageImpl;
-import net.jxta.impl.resolver.InternalQueryHandler;
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.logging.Logging;
-import net.jxta.membership.MembershipService;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.platform.Module;
-import net.jxta.protocol.ConfigParams;
-import net.jxta.protocol.DiscoveryQueryMsg;
-import net.jxta.protocol.DiscoveryResponseMsg;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.PeerGroupAdvertisement;
-import net.jxta.protocol.ResolverQueryMsg;
-import net.jxta.protocol.ResolverResponseMsg;
-import net.jxta.protocol.ResolverSrdiMsg;
-import net.jxta.protocol.SrdiMessage;
-import net.jxta.rendezvous.RendezVousService;
-import net.jxta.rendezvous.RendezvousEvent;
-import net.jxta.rendezvous.RendezvousListener;
-import net.jxta.resolver.ResolverService;
-import net.jxta.resolver.SrdiHandler;
-import net.jxta.service.Service;
-
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.StringReader;
-import java.net.URI;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * This Discovery Service implementation provides a mechanism to discover
- * Advertisements using the Resolver service and SRDI.
- * <p/>
- * <p/>This implementation uses the standard JXTA Peer Discovery Protocol
- * (PDP).
- * <p/>
- * <p/>The DiscoveryService service also provides a way to obtain information
- * from a specified peer and request other peer advertisements, this method is
- * particularly useful in the case of a portal where new relationships may be
- * established starting from a predetermined peer (perhaps described in address
- * book, or through an invitation).
- *
- * @see net.jxta.discovery.DiscoveryService
- * @see net.jxta.protocol.DiscoveryQueryMsg
- * @see net.jxta.impl.protocol.DiscoveryQuery
- * @see net.jxta.protocol.DiscoveryResponseMsg
- * @see net.jxta.impl.protocol.DiscoveryResponse
- * @see net.jxta.resolver.ResolverService
- * @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-pdp" target="_blank">JXTA Protocols Specification : Peer Discovery Protocol</a>
- */
-public class DiscoveryServiceImpl implements DiscoveryService, InternalQueryHandler, RendezvousListener, SrdiHandler, Srdi.SrdiInterface {
-
-    /**
-     * Logger
-     */
-    private final static Logger LOG = Logger.getLogger(DiscoveryServiceImpl.class.getName());
-
-    /**
-     * adv types
-     */
-    final static String[] dirname = {"Peers", "Groups", "Adv"};
-
-    /**
-     * The Query ID which will be associated with remote publish operations.
-     */
-    private final static int REMOTE_PUBLISH_QUERYID = 0;
-
-    private final static String srdiIndexerFileName = "discoverySrdi";
-
-    /**
-     * The current resolver query ID. static to make debugging easier.
-     */
-    private final static AtomicInteger qid = new AtomicInteger(0);
-
-    /**
-     * The maximum number of responses we will return for ANY query.
-     */
-    private final static int MAX_RESPONSES = 50;
-
-    /**
-     * The cache manager we're going to use to cache jxta advertisements
-     */
-    protected Cm cm;
-
-    /**
-     * assignedID as a String.
-     */
-    private PeerGroup group = null;
-    private String handlerName = null;
-    private ModuleImplAdvertisement implAdvertisement = null;
-
-    private ResolverService resolver = null;
-    private RendezVousService rendezvous = null;
-    private MembershipService membership = null;
-
-    private PeerID localPeerId = null;
-
-    private boolean localonly = false;
-    private boolean alwaysUseReplicaPeer = false;
-
-    private boolean stopped = true;
-
-    /**
-     * The table of discovery listeners.
-     */
-    private Set<DiscoveryListener> listeners = new HashSet<DiscoveryListener>();
-
-    /**
-     * The table of discovery query listeners.
-     */
-    private Hashtable<Integer, DiscoveryListener> listenerTable = new Hashtable<Integer, DiscoveryListener>();
-
-    private final String checkPeerAdvLock = new String("Check/Update PeerAdvertisement Lock");
-    private PeerAdvertisement lastPeerAdv = null;
-    private int lastModCount = -1;
-
-    private boolean isRdv = false;
-
-    private SrdiIndex srdiIndex = null;
-    private Srdi srdi = null;
-    private Thread srdiThread = null;
-
-    private CredentialListener membershipCredListener = null;
-    private Credential credential = null;
-    private StructuredDocument credentialDoc = null;
-
-    private long initialDelay = 60 * TimeUtils.ASECOND;
-    private long runInterval = 30 * TimeUtils.ASECOND;
-
-    /**
-     * the discovery interface object
-     */
-    private DiscoveryService discoveryInterface = null;
-
-    /**
-     * Listener we use for membership property events.
-     */
-    private class CredentialListener implements PropertyChangeListener {
-
-        /**
-         * {@inheritDoc}
-         */
-        public void propertyChange(PropertyChangeEvent evt) {
-            if ("defaultCredential".equals(evt.getPropertyName())) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("New default credential event");
-                }
-
-                synchronized (DiscoveryServiceImpl.this) {
-                    credential = (Credential) evt.getNewValue();
-                    credentialDoc = null;
-
-                    if (null != credential) {
-                        try {
-                            credentialDoc = credential.getDocument(MimeMediaType.XMLUTF8);
-                        } catch (Exception all) {
-                            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                                LOG.log(Level.WARNING, "Could not generate credential document", all);
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized Service getInterface() {
-        if (discoveryInterface == null) {
-            discoveryInterface = new DiscoveryServiceInterface(this);
-        }
-        return discoveryInterface;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Advertisement getImplAdvertisement() {
-        return implAdvertisement;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public int getRemoteAdvertisements(String peer, int type, String attribute, String value, int threshold) {
-
-        return getRemoteAdvertisements(peer, type, attribute, value, threshold, null);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public int getRemoteAdvertisements(String peer, int type, String attribute, String value, int threshold, DiscoveryListener listener) {
-
-        int myQueryID = qid.incrementAndGet();
-
-        if (localonly || stopped) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("localonly, no network operations performed");
-            }
-            return myQueryID;
-        }
-
-        if (resolver == null) {
-            // warn about calling the service before it started
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("resolver has not started yet, query discarded.");
-            }
-            return myQueryID;
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            StringBuilder query = new StringBuilder(
-                    "Sending query#" + myQueryID + " for " + threshold + " " + dirname[type] + " advs");
-
-            if (attribute != null) {
-                query.append("\n\tattr = ").append(attribute);
-                if (value != null) {
-                    query.append("\tvalue = ").append(value);
-                }
-            }
-            LOG.fine(query.toString());
-        }
-
-        long t0 = System.currentTimeMillis();
-
-        DiscoveryQueryMsg dquery = new DiscoveryQuery();
-
-        dquery.setDiscoveryType(type);
-        dquery.setAttr(attribute);
-        dquery.setValue(value);
-        dquery.setThreshold(threshold);
-
-        if (listener != null) {
-            listenerTable.put(myQueryID, listener);
-        }
-
-        ResolverQueryMsg query = new ResolverQuery();
-
-        query.setHandlerName(handlerName);
-        query.setCredential(credentialDoc);
-        query.setSrcPeer(localPeerId);
-        query.setQuery(dquery.toString());
-        query.setQueryId(myQueryID);
-
-        // check srdi
-        if (peer == null && srdiIndex != null) {
-            List<PeerID> res = srdiIndex.query(dirname[type], attribute, value, threshold);
-
-            if (!res.isEmpty()) {
-                srdi.forwardQuery(res, query, threshold);
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Srdi forward a query #" + myQueryID + " in " + (System.currentTimeMillis() - t0) + "ms.");
-                }
-                return myQueryID;
-                // nothing in srdi, get a starting point in rpv
-            } else if (group.isRendezvous() && attribute != null && value != null) {
-                PeerID destPeer = srdi.getReplicaPeer(dirname[type] + attribute + value);
-
-                if (destPeer != null) {
-                    if (!destPeer.equals(group.getPeerID())) {
-                        // forward query increments the hopcount to indicate getReplica
-                        // has been invoked once
-                        srdi.forwardQuery(destPeer, query);
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine(
-                                    "Srdi forward query #" + myQueryID + " to " + destPeer + " in "
-                                            + (System.currentTimeMillis() - t0) + "ms.");
-                        }
-                        return myQueryID;
-                    }
-                }
-            }
-        }
-
-        // no srdi, not a rendezvous, start the walk
-        resolver.sendQuery(peer, query);
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            if (peer == null) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Sent a query #" + myQueryID + " in " + (System.currentTimeMillis() - t0) + "ms.");
-                }
-            } else {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Sent a query #" + myQueryID + " to " + peer + " in " + (System.currentTimeMillis() - t0) + "ms.");
-                }
-            }
-        }
-
-        return myQueryID;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Enumeration<Advertisement> getLocalAdvertisements(int type, String attribute, String value) throws IOException {
-
-        if ((type > 2) || (type < 0)) {
-            throw new IllegalArgumentException("Unknown Advertisement type");
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            StringBuilder query = new StringBuilder("Searching for " + dirname[type] + " advs");
-
-            if (attribute != null) {
-                query.append("\n\tattr = ").append(attribute);
-            }
-            if (value != null) {
-                query.append("\tvalue = ").append(value);
-            }
-            LOG.fine(query.toString());
-        }
-
-        return Collections.enumeration(search(type, attribute, value, Integer.MAX_VALUE, false, null));
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void init(PeerGroup pg, ID assignedID, Advertisement impl) throws PeerGroupException {
-
-        group = pg;
-        handlerName = assignedID.toString();
-        implAdvertisement = (ModuleImplAdvertisement) impl;
-        localPeerId = group.getPeerID();
-
-        ConfigParams confAdv = pg.getConfigAdvertisement();
-
-        // Get the config. If we do not have a config, we're done; we just keep
-        // the defaults (edge peer/no auto-rdv)
-        if (confAdv != null) {
-            Advertisement adv = null;
-
-            try {
-                XMLDocument configDoc = (XMLDocument) confAdv.getServiceParam(assignedID);
-
-                if (null != configDoc) {
-                    adv = AdvertisementFactory.newAdvertisement(configDoc);
-                }
-            } catch (NoSuchElementException failed) {// ignored
-            }
-
-            if (adv instanceof DiscoveryConfigAdv) {
-                DiscoveryConfigAdv discoConfigAdv = (DiscoveryConfigAdv) adv;
-
-                alwaysUseReplicaPeer = discoConfigAdv.getForwardAlwaysReplica();
-
-                localonly |= discoConfigAdv.getLocalOnly();
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    if (localonly) {
-                        LOG.fine("localonly set to true via service parameters");
-                    }
-                    if (alwaysUseReplicaPeer) {
-                        LOG.fine("alwaysUseReplicaPeer set to true via service parameters");
-                    }
-                }
-            }
-        }
-
-        cm = ((StdPeerGroup) group).getCacheManager();
-        cm.setTrackDeltas(!localonly);
-
-        // Initialize the peer adv tracking.
-        checkUpdatePeerAdv();
-
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring Discovery Service : " + assignedID);
-
-            if (implAdvertisement != null) {
-                configInfo.append("\n\tImplementation :");
-                configInfo.append("\n\t\tModule Spec ID: ").append(implAdvertisement.getModuleSpecID());
-                configInfo.append("\n\t\tImpl Description : ").append(implAdvertisement.getDescription());
-                configInfo.append("\n\t\tImpl URI : ").append(implAdvertisement.getUri());
-                configInfo.append("\n\t\tImpl Code : ").append(implAdvertisement.getCode());
-            }
-            configInfo.append("\n\tGroup Params :");
-            configInfo.append("\n\t\tGroup : ").append(group.getPeerGroupName());
-            configInfo.append("\n\t\tGroup ID : ").append(group.getPeerGroupID());
-            configInfo.append("\n\t\tPeer ID : ").append(group.getPeerID());
-            configInfo.append("\n\tConfiguration :");
-            configInfo.append("\n\t\tLocal Only : ").append(localonly);
-            configInfo.append("\n\t\tAlways Use ReplicaPeer : ").append(alwaysUseReplicaPeer);
-            LOG.config(configInfo.toString());
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public int startApp(String[] arg) {
-
-        // Now we know that the resolver is going to be there.
-        // The cm needs the resolver. The code is arranged so that
-        // until the resolver and the cm are created, we just pretend
-        // to be working. We have no requirement to be operational before
-        // startApp() is called, but we must tolerate our public methods
-        // being invoked. The reason for it is that services are registered
-        // upon return from init() so that other services startApp() methods
-        // can find them. (all startApp()s are called after all init()s - with
-        // a few exceptions).
-
-        resolver = group.getResolverService();
-
-        if (null == resolver) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is a resolver service");
-            }
-
-            return Module.START_AGAIN_STALLED;
-        }
-
-        membership = group.getMembershipService();
-
-        if (null == membership) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is a membership service");
-            }
-
-            return Module.START_AGAIN_STALLED;
-        }
-
-        rendezvous = group.getRendezVousService();
-
-        if (null == rendezvous) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is a rendezvous service");
-            }
-
-            return Module.START_AGAIN_STALLED;
-        }
-
-        // local only discovery
-        if (!localonly) {
-            resolver.registerHandler(handlerName, this);
-        }
-
-        // Get the initial credential doc
-        synchronized (this) {
-            membershipCredListener = new CredentialListener();
-            membership.addPropertyChangeListener("defaultCredential", membershipCredListener);
-
-            try {
-                membershipCredListener.propertyChange(
-                        new PropertyChangeEvent(membership, "defaultCredential", null, membership.getDefaultCredential()));
-            } catch (Exception all) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Could not get credential", all);
-                }
-            }
-        }
-
-        if (rendezvous.isRendezVous()) {
-            beRendezvous();
-        } else {
-            beEdge();
-        }
-
-        rendezvous.addListener(this);
-
-        stopped = false;
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Discovery service started");
-        }
-
-        return Module.START_OK;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * <p/>Detach from the resolver
-     */
-    public void stopApp() {
-
-        stopped = true;
-        boolean failed = false;
-
-        membership.removePropertyChangeListener("defaultCredential", membershipCredListener);
-        membershipCredListener = null;
-        credential = null;
-        credentialDoc = null;
-
-        rendezvous.removeListener(this);
-
-        if (resolver.unregisterHandler(handlerName) == null) {
-            failed = true;
-        }
-
-        if (rendezvous.isRendezVous()) {
-            if (resolver.unregisterSrdiHandler(handlerName) == null) {
-                failed = true;
-            }
-        }
-
-        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING) && failed) {
-            LOG.warning("failed to unregister discovery from resolver.");
-        }
-
-        // stop the DiscoverySrdiThread
-        if (srdiThread != null) {
-            srdi.stop();
-            srdi = null;
-        }
-
-        // Reset values in order to avoid cross-reference problems with GC
-        resolver = null;
-        group = null;
-        membership = null;
-        srdiIndex = null;
-        srdiThread = null;
-        rendezvous = null;
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Discovery service stopped.");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void flushAdvertisements(String id, int type) throws IOException {
-        if (stopped) {
-            return;
-        }
-        if ((type >= PEER) && (type <= ADV)) {
-            if (null != id) {
-                ID advID = ID.create(URI.create(id));
-                String advName = advID.getUniqueValue().toString();
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("flushing adv " + advName + " of type " + dirname[type]);
-                }
-                cm.remove(dirname[type], advName);
-            } else {
-                // XXX bondolo 20050902 For historical purposes we ignore null
-
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Flush request by type IGNORED. You must delete advertisements individually.");
-                }
-            }
-        } else {
-            throw new IllegalArgumentException("Invalid Advertisement type.");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void flushAdvertisement(Advertisement adv) throws IOException {
-        if (stopped) {
-            return;
-        }
-
-        int type;
-
-        if (adv instanceof PeerAdvertisement) {
-            type = PEER;
-        } else if (adv instanceof PeerGroupAdvertisement) {
-            type = GROUP;
-        } else {
-            type = ADV;
-        }
-
-        ID id = adv.getID();
-        String advName;
-
-        if (id != null && !id.equals(ID.nullID)) {
-            advName = id.getUniqueValue().toString();
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Flushing adv " + advName + " of type " + dirname[type]);
-            }
-        } else {
-            XMLDocument doc;
-
-            try {
-                doc = (XMLDocument) adv.getDocument(MimeMediaType.XMLUTF8);
-            } catch (Exception everything) {
-                IOException failure = new IOException("Failure removing Advertisement");
-
-                failure.initCause(everything);
-                throw failure;
-            }
-            advName = Cm.createTmpName(doc);
-        }
-
-        if (advName != null) {
-            cm.remove(dirname[type], advName);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void publish(Advertisement adv) throws IOException {
-        publish(adv, DiscoveryService.DEFAULT_LIFETIME, DiscoveryService.DEFAULT_EXPIRATION);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void publish(Advertisement adv, long lifetime, long expiration) throws IOException {
-
-        if (stopped) {
-            return;
-        }
-
-        ID advID;
-        String advName;
-
-        int type;
-
-        if (adv instanceof PeerAdvertisement) {
-            type = PEER;
-        } else if (adv instanceof PeerGroupAdvertisement) {
-            type = GROUP;
-        } else {
-            type = ADV;
-        }
-
-        advID = adv.getID();
-
-        // if we dont have a unique id for the adv, use the hash method
-        if ((null == advID) || advID.equals(ID.nullID)) {
-            XMLDocument doc;
-
-            try {
-                doc = (XMLDocument) adv.getDocument(MimeMediaType.XMLUTF8);
-            } catch (Exception everything) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failed to generated document from advertisement", everything);
-                }
-                IOException failure = new IOException("Failed to generate document from advertisement");
-
-                failure.initCause(everything);
-                throw failure;
-            }
-
-            try {
-                advName = Cm.createTmpName(doc);
-            } catch (IllegalStateException ise) {
-                IOException failure = new IOException("Failed to generate tempname from advertisement");
-
-                failure.initCause(ise);
-                throw failure;
-            }
-        } else {
-            advName = advID.getUniqueValue().toString();
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine(
-                    "Publishing a " + adv.getAdvType() + " as " + dirname[type] + " / " + advName + "\n\texpiration : "
-                            + expiration + "\tlifetime :" + lifetime);
-        }
-
-        // save it
-        cm.save(dirname[type], advName, adv, lifetime, expiration);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void remotePublish(Advertisement adv) {
-        remotePublish(null, adv, DiscoveryService.DEFAULT_EXPIRATION);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void remotePublish(Advertisement adv, long expiration) {
-        remotePublish(null, adv, expiration);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void remotePublish(String peerid, Advertisement adv) {
-        remotePublish(peerid, adv, DiscoveryService.DEFAULT_EXPIRATION);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void processResponse(ResolverResponseMsg response) {
-        processResponse(response, null);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void processResponse(ResolverResponseMsg response, EndpointAddress srcAddress) {
-        if (stopped) {
-            return;
-        }
-
-        long t0 = System.currentTimeMillis();
-        DiscoveryResponse res;
-
-        try {
-            XMLDocument asDoc = (XMLDocument)
-                    StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8
-                            ,
-                            new StringReader(response.getResponse()));
-
-            res = new DiscoveryResponse(asDoc);
-        } catch (Exception e) {
-            // we don't understand this msg, let's skip it
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed to Read Discovery Response", e);
-            }
-            return;
-        }
-
-        /*
-         PeerAdvertisement padv = res.getPeerAdvertisement();
-         if (padv == null)
-         return;
-         
-         if (LOG.isLoggable(Level.FINE)) {
-         LOG.fine("Got a " + dirname[res.getDiscoveryType()] +
-         " from "+padv.getName()+ " response : " +
-         res.getQueryAttr() + " = " + res.getQueryValue());
-         }
-         
-         try {
-         // The sender does not put an expiration on that one, but
-         // we do not want to keep it around for more than the
-         // default duration. It may get updated or become invalid.
-         publish(padv, PEER, DEFAULT_EXPIRATION, DEFAULT_EXPIRATION);
-         } catch (Exception e) {
-         if (LOG.isLoggable(Level.FINE)) {
-         LOG.fine(e, e);
-         }
-         return;
-         }
-         */
-        Advertisement adv;
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Processing responses for query #" + response.getQueryId());
-        }
-
-        Enumeration<Advertisement> en = res.getAdvertisements();
-        Enumeration<Long> exps = res.getExpirations();
-
-        while (en.hasMoreElements()) {
-            adv = en.nextElement();
-            long exp = exps.nextElement();
-
-            if (exp > 0 && adv != null) {
-                try {
-                    publish(adv, exp, exp);
-                } catch (Exception e) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Error publishing Advertisement", e);
-                    }
-                }
-            }
-        }
-
-        DiscoveryEvent newevent = new DiscoveryEvent(srcAddress, res, response.getQueryId());
-
-        DiscoveryListener dl = listenerTable.get(new Integer(response.getQueryId()));
-
-        if (dl != null) {
-            try {
-                dl.discoveryEvent(new DiscoveryEvent(srcAddress, res, response.getQueryId()));
-            } catch (Throwable all) {
-                LOG.log(Level.SEVERE, "Uncaught Throwable in listener :" + Thread.currentThread().getName(), all);
-            }
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("processed a response for query #" + response.getQueryId() + " in :" + (System.currentTimeMillis() - t0));
-        }
-
-        // are there any registered discovery listeners,
-        // generate the event and callback.
-        t0 = System.currentTimeMillis();
-
-        DiscoveryListener[] allListeners = listeners.toArray(new DiscoveryListener[0]);
-
-        for (DiscoveryListener allListener : allListeners) {
-            try {
-                allListener.discoveryEvent(newevent);
-            } catch (Throwable all) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING
-                            ,
-                            "Uncaught Throwable in listener (" + allListener.getClass().getName() + ") :"
-                                    + Thread.currentThread().getName()
-                            ,
-                            all);
-                }
-            }
-        }
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Called all listenters to query #" + response.getQueryId() + " in :" + (System.currentTimeMillis() - t0));
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public int processQuery(ResolverQueryMsg query) {
-
-        return processQuery(query, null);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public int processQuery(ResolverQueryMsg query, EndpointAddress srcAddress) {
-        if (stopped) {
-            return ResolverService.OK;
-        }
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            if (srcAddress != null) {
-                LOG.fine("Processing query #" + query.getQueryId() + " from:" + srcAddress);
-            } else {
-                LOG.fine("Processing query #" + query.getQueryId() + " from: unknown");
-            }
-        }
-
-        List<String> results;
-        List<Long> expirations = new ArrayList<Long>();
-        DiscoveryQuery dq;
-        long t0 = System.currentTimeMillis();
-
-        try {
-            XMLDocument asDoc = (XMLDocument)
-                    StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, new StringReader(query.getQuery()));
-
-            dq = new DiscoveryQuery(asDoc);
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Malformed query : ", e);
-            }
-            return ResolverService.OK;
-        }
-
-        if ((dq.getThreshold() < 0) || (dq.getDiscoveryType() < PEER) || (dq.getDiscoveryType() > ADV)) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Malformed query");
-            }
-            return ResolverService.OK;
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine(
-                    "Got a " + dirname[dq.getDiscoveryType()] + " query #" + query.getQueryId() + " query :" + dq.getAttr()
-                            + " = " + dq.getValue());
-        }
-
-        /*
-         // Get the Peer Adv from the query and publish it.
-         PeerAdvertisement padv = dq.getPeerAdvertisement();
-         try {
-         if (!(padv.getPeerID().toString()).equals(localPeerId)) {
-         // publish others only. Since this one comes from outside,
-         // we must not keep it beyond its expiration time.
-         // FIXME: [jice@jxta.org 20011112] In theory there should
-         // be an expiration time associated with it in the msg, like
-         // all other items.
-         publish(padv, PEER, DEFAULT_EXPIRATION, DEFAULT_EXPIRATION);
-         }
-         } catch (Exception e) {
-         if (LOG.isLoggable(Level.FINE)) {
-         LOG.fine("Bad Peer Adv in Discovery Query", e);
-         }
-         }
-         */
-
-        /*
-         *  threshold==0 and type==PEER is a special case. In this case we are
-         *  responding for the purpose of providing our own adv only.
-         */
-        int thresh = Math.min(dq.getThreshold(), MAX_RESPONSES);
-
-        /*
-         *  threshold==0 and type==PEER is a special case. In this case we are
-         *  responding for the purpose of providing our own adv only.
-         */
-        if ((dq.getDiscoveryType() == PEER) && (0 == dq.getThreshold())) {
-            respond(query, dq, Collections.singletonList(group.getPeerAdvertisement().toString())
-                    ,
-                    Collections.singletonList(DiscoveryService.DEFAULT_EXPIRATION));
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Responding to query #" + query.getQueryId() + " in :" + (System.currentTimeMillis() - t0));
-            }
-            return ResolverService.OK;
-        } else {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("start local search query" + dq.getAttr() + " " + dq.getValue());
-            }
-            results = search(dq.getDiscoveryType(), dq.getAttr(), dq.getValue(), thresh, true, expirations);
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("start local search pruned " + results.size());
-            }
-        }
-
-        // We only share the advs with > 0 expiration time.
-        Iterator<Long> eachExpiration = expirations.iterator();
-        Iterator eachAdv = results.iterator();
-
-        while (eachExpiration.hasNext()) {
-            eachAdv.next();
-
-            if (eachExpiration.next() <= 0) {
-                eachAdv.remove();
-                eachExpiration.remove();
-            }
-        }
-
-        if (!results.isEmpty()) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Responding to " + dirname[dq.getDiscoveryType()] + " Query : " + dq.getAttr() + " = " + dq.getValue());
-            }
-            respond(query, dq, results, expirations);
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Responded to query #" + query.getQueryId() + " in :" + (System.currentTimeMillis() - t0));
-            }
-            return ResolverService.OK;
-        } else {
-            // If this peer is a rendezvous, simply let the resolver
-            // re-propagate the query.
-            // If this peer is not a rendez, just discard the query.
-            if (!group.isRendezvous()) {
-                return ResolverService.OK;
-            }
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Querying SrdiIndex query #" + query.getQueryId());
-            }
-            List<PeerID> res = srdiIndex.query(dirname[dq.getDiscoveryType()], dq.getAttr(), dq.getValue(), thresh);
-
-            if (!res.isEmpty()) {
-                srdi.forwardQuery(res, query, thresh);
-                return ResolverService.OK;
-            } else if (query.getHopCount() == 0) {
-                PeerID destPeer = srdi.getReplicaPeer(dirname[dq.getDiscoveryType()] + dq.getAttr() + dq.getValue());
-
-                // destPeer can be null in a small rpv (<3)
-                if (destPeer != null) {
-                    if (!destPeer.equals(group.getPeerID())) {
-                        srdi.forwardQuery(destPeer, query);
-                        return ResolverService.OK;
-                    } else {
-                        // start the walk since this peer is this the starting peer
-                        query.incrementHopCount();
-                    }
-                }
-            }
-        }
-        return ResolverService.Repropagate;
-    }
-
-    private void respond(ResolverQueryMsg query, DiscoveryQuery dq, List results, List<Long> expirations) {
-        if (localonly || stopped) {
-            return;
-        }
-
-        ResolverResponseMsg response;
-        DiscoveryResponse dresponse = new DiscoveryResponse();
-
-        // peer adv is optional, skip
-        dresponse.setDiscoveryType(dq.getDiscoveryType());
-        dresponse.setQueryAttr(dq.getAttr());
-        dresponse.setQueryValue(dq.getValue());
-        dresponse.setResponses(results);
-        dresponse.setExpirations(expirations);
-
-        // create a response from the query
-        response = query.makeResponse();
-        response.setCredential(credentialDoc);
-        response.setResponse(dresponse.toString());
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Responding to " + query.getSrcPeer());
-        }
-
-        resolver.sendResponse(query.getSrcPeer().toString(), response);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized void addDiscoveryListener(DiscoveryListener listener) {
-
-        listeners.add(listener);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized boolean removeDiscoveryListener(DiscoveryListener listener) {
-
-        Iterator<Map.Entry<Integer, DiscoveryListener>> e = listenerTable.entrySet().iterator();
-
-        while (e.hasNext()) {
-            Map.Entry<Integer, DiscoveryListener> anEntry = e.next();
-
-            if (listener == anEntry.getValue()) {
-                e.remove();
-            }
-        }
-        return (listeners.remove(listener));
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void remotePublish(String peerid, Advertisement adv, long timeout) {
-
-        if (localonly || stopped) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("localonly, no network operations performed");
-            }
-            return;
-        }
-        int type;
-
-        if (adv instanceof PeerAdvertisement) {
-            type = PEER;
-        } else if (adv instanceof PeerGroupAdvertisement) {
-            type = GROUP;
-        } else {
-            type = ADV;
-        }
-        remotePublish(peerid, adv, type, timeout);
-    }
-
-    /*
-     *  remote publish the advertisement
-     */
-    private void remotePublish(String peerid, Advertisement adv, int type, long expiration) {
-
-        if (localonly || stopped) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("localonly, no network operations performed");
-            }
-            return;
-        }
-
-        // In case this is invoked before startApp().
-        if (resolver == null) {
-            return;
-        }
-
-        switch (type) {
-            case PEER:
-                if (adv instanceof PeerAdvertisement) {
-                    break;
-                }
-                throw new IllegalArgumentException("Not a peer advertisement");
-
-            case GROUP:
-                if (adv instanceof PeerGroupAdvertisement) {
-                    break;
-                }
-                throw new IllegalArgumentException("Not a peergroup advertisement");
-
-            case ADV:
-                break;
-
-            default:
-                throw new IllegalArgumentException("Unknown advertisement type");
-        }
-
-        List<String> advert = new ArrayList<String>(1);
-        List<Long> expirations = new ArrayList<Long>(1);
-
-        advert.add(adv.toString());
-        expirations.add(expiration);
-
-        DiscoveryResponseMsg dresponse = new DiscoveryResponse();
-
-        dresponse.setDiscoveryType(type);
-        dresponse.setResponses(advert);
-        dresponse.setExpirations(expirations);
-
-        ResolverResponseMsg pushRes = new ResolverResponse();
-
-        pushRes.setHandlerName(handlerName);
-        pushRes.setCredential(credentialDoc);
-        pushRes.setQueryId(REMOTE_PUBLISH_QUERYID);
-        pushRes.setResponse(dresponse.toString());
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Remote publishing ");
-        }
-
-        resolver.sendResponse(peerid, pushRes);
-    }
-
-    /**
-     * Search for a doc, that matches attr, and value
-     * bytes is set to true if the caller wants wire format of the
-     * advertisement, or set to false if caller wants Advertisement
-     * objects.
-     *
-     * @param type        Discovery type PEER, GROUP, ADV
-     * @param threshold   the upper limit of responses from one peer
-     * @param bytes       flag to indicate how the results are returned-- advs, or streams
-     * @param expirations List containing the expirations associated with is returned
-     * @param attr        attribute name to narrow discovery to Valid values for
-     *                    this parameter are null (don't care), or exact element name in the
-     *                    advertisement of interest (e.g. "Name")
-     * @param value       Value
-     * @return list of results either as docs, or Strings
-     */
-    private List search(int type, String attr, String value, int threshold, boolean bytes, List<Long> expirations) {
-
-        if (stopped) {
-            return new ArrayList();
-        }
-
-        if (type == PEER) {
-            checkUpdatePeerAdv();
-        }
-
-        List results;
-
-        if (threshold <= 0) {
-            throw new IllegalArgumentException("threshold must be greater than zero");
-        }
-
-        if (expirations != null) {
-            expirations.clear();
-        }
-
-        if (attr != null) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Searching for " + threshold + " entries of type : " + dirname[type]);
-            }
-            // a discovery query with a specific search criteria.
-            results = cm.search(dirname[type], attr, value, threshold, expirations);
-        } else {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Getting " + threshold + " entries of type : " + dirname[type]);
-            }
-            // Returning any entry that exists
-            results = cm.getRecords(dirname[type], threshold, expirations);
-        }
-
-        if (results.isEmpty() || bytes) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Returning " + results.size() + " results");
-            }
-
-            // nothing more to do;
-            return results;
-        }
-
-        // Convert the input streams returned by the cm into Advertisements.
-
-        List<Advertisement> advertisements = new ArrayList<Advertisement>();
-
-        for (int i = 0; i < results.size(); i++) {
-            InputStream bis = null;
-
-            try {
-                bis = (InputStream) results.get(i);
-                XMLDocument asDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, bis);
-                Advertisement adv = AdvertisementFactory.newAdvertisement(asDoc);
-
-                advertisements.add(adv);
-            } catch (Exception e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failed building advertisment", e);
-                }
-
-                // we won't be including this advertisement so remove it's expiration.
-                if (null != expirations) {
-                    expirations.remove(i);
-                }
-
-            } finally {
-                if (null != bis) {
-                    try {
-                        bis.close();
-                    } catch (IOException ignored) {
-                        // ignored
-                    }
-                }
-                bis = null;
-            }
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Returning " + advertisements.size() + " advertisements");
-        }
-
-        return advertisements;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public long getAdvExpirationTime(ID id, int type) {
-        if (stopped) {
-            return -1;
-        }
-        String advName;
-
-        if (id != null && !id.equals(ID.nullID)) {
-            advName = id.getUniqueValue().toString();
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Getting expiration time of " + advName + " of type " + dirname[type]);
-            }
-        } else {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("invalid attempt to get advertisement expiration time of NullID");
-            }
-            return -1;
-        }
-
-        return cm.getExpirationtime(dirname[type], advName);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public long getAdvLifeTime(ID id, int type) {
-        if (id == null || id.equals(ID.nullID) || stopped) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("invalid attempt to get advertisement lifetime of a NullID");
-            }
-            return -1;
-        }
-
-        String advName = id.getUniqueValue().toString();
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Getting lifetime of " + advName + " of type " + dirname[type]);
-        }
-
-        return cm.getLifetime(dirname[type], advName);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public long getAdvExpirationTime(Advertisement adv) {
-        if (stopped) {
-            return -1;
-        }
-        int type;
-
-        if (adv instanceof PeerAdvertisement) {
-            type = PEER;
-        } else if (adv instanceof PeerGroupAdvertisement) {
-            type = GROUP;
-        } else {
-            type = ADV;
-        }
-
-        String advName;
-        ID id = adv.getID();
-
-        if (id != null && !id.equals(ID.nullID)) {
-            advName = id.getUniqueValue().toString();
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("attempting to getAdvExpirationTime on " + advName + " of type " + dirname[type]);
-            }
-        } else {
-            XMLDocument doc;
-
-            try {
-                doc = (XMLDocument) adv.getDocument(MimeMediaType.XMLUTF8);
-            } catch (Exception everything) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failed to get document", everything);
-                }
-                return -1;
-            }
-            advName = Cm.createTmpName(doc);
-        }
-
-        return cm.getExpirationtime(dirname[type], advName);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public long getAdvLifeTime(Advertisement adv) {
-        if (stopped) {
-            return -1;
-        }
-        int type;
-
-        if (adv instanceof PeerAdvertisement) {
-            type = PEER;
-        } else if (adv instanceof PeerGroupAdvertisement) {
-            type = GROUP;
-        } else {
-            type = ADV;
-        }
-
-        ID id = adv.getID();
-        String advName;
-
-        if (id != null && !id.equals(ID.nullID)) {
-            advName = id.getUniqueValue().toString();
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("attempting to getAdvLifeTime " + advName + " of type " + dirname[type]);
-            }
-        } else {
-            XMLDocument doc;
-
-            try {
-                doc = (XMLDocument) adv.getDocument(MimeMediaType.XMLUTF8);
-            } catch (Exception everything) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failed to get document", everything);
-                }
-                return -1;
-            }
-            advName = Cm.createTmpName(doc);
-        }
-        return cm.getLifetime(dirname[type], advName);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean processSrdi(ResolverSrdiMsg message) {
-        if (stopped) {
-            return true;
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("[" + group.getPeerGroupID() + "] Received an SRDI messsage");
-        }
-
-        SrdiMessage srdiMsg;
-
-        try {
-            XMLDocument asDoc = (XMLDocument)
-                    StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, new StringReader(message.getPayload()));
-
-            srdiMsg = new SrdiMessageImpl(asDoc);
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed parsing srdi message", e);
-            }
-            return false;
-        }
-
-        PeerID pid = srdiMsg.getPeerID();
-
-        for (Object o : srdiMsg.getEntries()) {
-            SrdiMessage.Entry entry = (SrdiMessage.Entry) o;
-
-            srdiIndex.add(srdiMsg.getPrimaryKey(), entry.key, entry.value, pid, entry.expiration);
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(
-                        "Primary Key [" + srdiMsg.getPrimaryKey() + "] key [" + entry.key + "] value [" + entry.value + "] exp ["
-                                + entry.expiration + "]");
-            }
-        }
-        srdi.replicateEntries(srdiMsg);
-        return true;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void messageSendFailed(PeerID peerid, OutgoingMessageEvent e) {
-        if (srdiIndex != null) {
-            srdiIndex.remove(peerid);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void pushEntries(boolean all) {
-
-        pushSrdi(null, PEER, all);
-        pushSrdi(null, GROUP, all);
-        pushSrdi(null, ADV, all);
-    }
-
-    /**
-     * push srdi entries
-     *
-     * @param all  if true push all entries, otherwise just deltas
-     * @param peer peer id
-     * @param type if true sends all entries
-     */
-    protected void pushSrdi(ID peer, int type, boolean all) {
-        if (stopped) {
-            return;
-        }
-
-        List<SrdiMessage.Entry> entries;
-
-        if (all) {
-            entries = cm.getEntries(dirname[type], true);
-        } else {
-            entries = cm.getDeltas(dirname[type]);
-        }
-
-        if (!entries.isEmpty()) {
-            SrdiMessage srdiMsg;
-
-            try {
-                srdiMsg = new SrdiMessageImpl(group.getPeerID(), 1, // ttl of 1, ensure it is replicated
-                        dirname[type], entries);
-
-                if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                    LOG.finer("Pushing " + entries.size() + (all ? " entries" : " deltas") + " of type " + dirname[type]);
-                }
-                srdi.pushSrdi(peer, srdiMsg);
-            } catch (Exception e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Exception pushing SRDI Entries", e);
-                }
-            }
-        } else {
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer("No" + (all ? " entries" : " deltas") + " of type " + dirname[type] + " to push");
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized void rendezvousEvent(RendezvousEvent event) {
-
-        int theEventType = event.getType();
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("[" + group.getPeerGroupName() + "] Processing " + event);
-        }
-
-        switch (theEventType) {
-
-            case RendezvousEvent.RDVCONNECT:
-            case RendezvousEvent.RDVRECONNECT:
-                // start tracking deltas
-                cm.setTrackDeltas(true);
-                break;
-
-            case RendezvousEvent.CLIENTCONNECT:
-            case RendezvousEvent.CLIENTRECONNECT:
-                break;
-
-            case RendezvousEvent.RDVFAILED:
-            case RendezvousEvent.RDVDISCONNECT:
-                // stop tracking deltas until we connect again
-                cm.setTrackDeltas(false);
-                break;
-
-            case RendezvousEvent.CLIENTFAILED:
-            case RendezvousEvent.CLIENTDISCONNECT:
-                break;
-
-            case RendezvousEvent.BECAMERDV:
-                beRendezvous();
-                break;
-
-            case RendezvousEvent.BECAMEEDGE:
-                beEdge();
-                break;
-
-            default:
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning(MessageFormat.format("[{0}] Unexpected RDV event : {1}", group.getPeerGroupName(), event));
-                }
-                break;
-        }
-    }
-
-    /**
-     * Checks to see if the local peer advertisement has been updated and if
-     * it has then republish it to the CM.
-     */
-    private void checkUpdatePeerAdv() {
-        PeerAdvertisement newPadv = group.getPeerAdvertisement();
-        int newModCount = newPadv.getModCount();
-
-        boolean updated = false;
-
-        synchronized (checkPeerAdvLock) {
-            if ((lastPeerAdv != newPadv) || (lastModCount < newModCount)) {
-                lastPeerAdv = newPadv;
-                lastModCount = newModCount;
-                updated = true;
-            }
-
-            if (updated) {
-                // Publish the local Peer Advertisement
-                try {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("publishing local advertisement");
-                    }
-
-                    // This is our own; we can publish it for a long time in our cache
-                    publish(newPadv, INFINITE_LIFETIME, DEFAULT_EXPIRATION);
-                } catch (Exception ignoring) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Could not publish local peer advertisement: ", ignoring);
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * Change the behavior to be an rendezvous Peer Discovery Service.
-     * If the Service was acting as an Edge peer, cleanup.
-     */
-    private synchronized void beRendezvous() {
-
-        if (isRdv && (srdi != null || srdiIndex != null)) {
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("Already a rendezvous -- No Switch is needed");
-            }
-            return;
-        }
-
-        isRdv = true;
-
-        // rdv peers do not need to track deltas
-        cm.setTrackDeltas(false);
-
-        if (srdiIndex == null) {
-            srdiIndex = new SrdiIndex(group, srdiIndexerFileName);
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("srdiIndex created");
-            }
-
-        }
-
-        // Kill SRDI, create a new one.
-        if (srdi != null) {
-            srdi.stop();
-            if (srdiThread != null) {
-                srdiThread = null;
-            }
-            srdi = null;
-        }
-
-        if (!localonly) {
-            srdi = new Srdi(group, handlerName, this, srdiIndex, initialDelay, runInterval);
-            resolver.registerSrdiHandler(handlerName, this);
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("srdi created, and registered as an srdi handler ");
-            }
-        }
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Switched to Rendezvous peer role.");
-        }
-    }
-
-    /**
-     * Change the behavior to be an Edge Peer Discovery Service.
-     * If the Service was acting as a Rendezvous, cleanup.
-     */
-    private synchronized void beEdge() {
-
-        // make sure we have been here before
-        if (!isRdv && srdiThread != null) {
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("Already an Edge peer -- No Switch is needed.");
-            }
-            return;
-        }
-
-        isRdv = false;
-        if (!rendezvous.getConnectedPeerIDs().isEmpty()) {
-            // if we have a rendezvous connection track deltas, otherwise wait
-            // for a connect event to set this option
-            cm.setTrackDeltas(true);
-        }
-        if (srdiIndex != null) {
-            srdiIndex.stop();
-            srdiIndex = null;
-            resolver.unregisterSrdiHandler(handlerName);
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("stopped cache and unregistered from resolver");
-            }
-        }
-
-        // Kill SRDI
-        if (srdi != null) {
-            srdi.stop();
-            if (srdiThread != null) {
-                srdiThread = null;
-            }
-            srdi = null;
-        }
-
-        if (!localonly) {
-            // Create a new SRDI
-            srdi = new Srdi(group, handlerName, this, null, initialDelay, runInterval);
-
-            // only edge peers distribute srdi
-            srdiThread = new Thread(group.getHomeThreadGroup(), srdi, "Discovery Srdi Thread");
-            srdiThread.setDaemon(true);
-            srdiThread.start();
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Started SRDIThread");
-            }
-        }
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Switched to a Edge peer role.");
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/discovery/DiscoveryServiceInterface.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/discovery/DiscoveryServiceInterface.java
deleted file mode 100644 (file)
index 4562ef6..0000000
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.discovery;
-
-
-import java.util.Enumeration;
-import java.io.IOException;
-
-import net.jxta.discovery.DiscoveryListener;
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Advertisement;
-import net.jxta.id.ID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.service.Service;
-
-
-/**
- * Provides a pure interface object that permits interaction with the actual
- * Discovery Service implementation without giving access to the real object.
- */
-public final class DiscoveryServiceInterface implements DiscoveryService {
-
-    private DiscoveryServiceImpl impl;
-
-    /**
-     * Only authorized constructor
-     *
-     * @param  theRealThing  The actual discovery implementation
-     */
-    protected DiscoveryServiceInterface(DiscoveryServiceImpl theRealThing) {
-        impl = theRealThing;
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    public Service getInterface() {
-        return this;
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    public Advertisement getImplAdvertisement() {
-        return impl.getImplAdvertisement();
-    }
-
-    /**
-     *  {@inheritDoc}
-     *
-     * <p/>FIXME: This is meaningless for the interface object;
-     * it is there only to satisfy the requirements of the
-     * interface that we implement. Ultimately, the API should define
-     * two levels of interfaces: one for the real service implementation
-     * and one for the interface object. Right now it feels a bit heavy
-     * to so that since the only different between the two would be
-     * init() and may-be getName().
-     */  
-    public void init(PeerGroup pg, ID assignedID, Advertisement impl) {}
-    
-    /**
-     *  {@inheritDoc}
-     *
-     * <p/>This is here for temporary class hierarchy reasons.
-     * it is ALWAYS ignored. By definition, the interface object
-     * protects the real object's start/stop methods from being called
-     */
-    public int startApp(String[] arg) {
-        return 0;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     *
-     * <p/>This is here for temporary class hierarchy reasons.
-     * it is ALWAYS ignored. By definition, the interface object
-     * protects the real object's start/stop methods from being called
-     *
-     * <p/>This request is currently ignored.
-     */
-    public void stopApp() {}
-
-    /**
-     *  {@inheritDoc}
-     */
-    public int getRemoteAdvertisements(String peer, int type, String attribute, String value, int threshold) {
-
-        return impl.getRemoteAdvertisements(peer, type, attribute, value, threshold);
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    public int getRemoteAdvertisements(String peer, int type, String attribute, String value, int threshold, DiscoveryListener listener) {
-        return impl.getRemoteAdvertisements(peer, type, attribute, value, threshold, listener);
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    public Enumeration getLocalAdvertisements(int type, String attribute, String value) throws IOException {
-        return impl.getLocalAdvertisements(type, attribute, value);
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    public void flushAdvertisement(Advertisement adv) throws IOException {
-
-        impl.flushAdvertisement(adv);
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    public void flushAdvertisements(String id, int type) throws IOException {
-        impl.flushAdvertisements(id, type);
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    public long getAdvExpirationTime(ID id, int type) {
-        return impl.getAdvExpirationTime(id, type);
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    public long getAdvLifeTime(ID id, int type) {
-        return impl.getAdvLifeTime(id, type);
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    public long getAdvExpirationTime(Advertisement adv) {
-        return impl.getAdvExpirationTime(adv);
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    public long getAdvLifeTime(Advertisement adv) {
-        return impl.getAdvLifeTime(adv);
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    public void publish(Advertisement adv) throws IOException {
-        impl.publish(adv);
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    public void publish(Advertisement adv, long lifetime, long expiration) throws IOException {
-
-        impl.publish(adv, lifetime, expiration);
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    public void remotePublish(Advertisement adv) {
-        impl.remotePublish(adv);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public void remotePublish(Advertisement adv, long expiration) {
-        impl.remotePublish(adv, expiration);
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    public void remotePublish(String peerid, Advertisement adv) {
-        impl.remotePublish(peerid, adv);
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    public void remotePublish(String peerid, Advertisement adv, long expiration) {
-        impl.remotePublish(peerid, adv, expiration);
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    public synchronized void addDiscoveryListener(DiscoveryListener listener) {
-        impl.addDiscoveryListener(listener);
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    public synchronized boolean removeDiscoveryListener(DiscoveryListener listener) {
-        return (impl.removeDiscoveryListener(listener));
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/discovery/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/discovery/package.html
deleted file mode 100644 (file)
index c225a79..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    A JXTA {@link net.jxta.discovery.DiscoveryService} implementation which 
-    implements the standard JXTA Peer Discovery Protocol (PDP).
-
-    @see net.jxta.discovery.DiscoveryService
-    @see net.jxta.resolver.ResolverService
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-pdp"
-target="_blank">JXTA Protocols Specification : Peer Discovery Protocol</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/document/DOMXMLDocument.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/document/DOMXMLDocument.java
deleted file mode 100644 (file)
index d10ca08..0000000
+++ /dev/null
@@ -1,490 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.document;
-
-
-import java.io.BufferedWriter;
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Reader;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.io.Writer;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import java.io.IOException;
-import java.lang.reflect.UndeclaredThrowableException;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.w3c.dom.DOMImplementation;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-import org.w3c.dom.ls.DOMImplementationLS;
-import org.w3c.dom.ls.LSSerializer;
-import org.w3c.dom.ls.LSOutput;
-
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentFactory.Instantiator.ExtensionMapping;
-import net.jxta.document.XMLDocument;
-
-import net.jxta.impl.document.TextDocumentCommon.Utils;
-
-
-/**
- * This class is an implementation of the StructuredDocument interface using
- * DOM
- *
- * @see <a href="http://www.w3.org/DOM/">W3C Document Object Model (DOM)</a>
- * @see <a href="http://www.w3.org/TR/DOM-Level-2-Core/java-binding.html">DOM Java Language Binding</a>
- * @see <a href="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407">Document Object Model (DOM) Level 3 Load and Save Specification</a>
- * @see <a href="http://java.sun.com/xml/jaxp/index.html">Java API for XML Processing (JAXP)</a>
- * @see org.w3c.dom
- */
-public class DOMXMLDocument extends DOMXMLElement implements XMLDocument<DOMXMLElement> {
-
-    private static final class Instantiator implements StructuredDocumentFactory.TextInstantiator {
-
-        /**
-         * The MIME Media Types which this <CODE>StructuredDocument</CODE> is
-         * capable of emitting.
-         */
-        private static final MimeMediaType[] myTypes = {
-            MimeMediaType.XML_DEFAULTENCODING, 
-            new MimeMediaType("Application", "Xml")
-        };
-
-        /**
-         * these are the file extensions which are likely to contain files of
-         * the type i like.
-         */
-        private static final ExtensionMapping[] myExtensions = {
-            new ExtensionMapping("xml", myTypes[0]), 
-            new ExtensionMapping("xml", null)
-        };
-
-        /**
-         * Creates new XMLDocumentInstantiator
-         */
-        public Instantiator() {}
-
-        /**
-         * {@inheritDoc}
-         */
-        public MimeMediaType[] getSupportedMimeTypes() {
-            return (myTypes);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public ExtensionMapping[] getSupportedFileExtensions() {
-            return (myExtensions);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public StructuredDocument newInstance(MimeMediaType mimeType, String doctype) {
-            return new DOMXMLDocument(mimeType, doctype);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public StructuredDocument newInstance(MimeMediaType mimeType, String doctype, String value) {
-            return new DOMXMLDocument(mimeType, doctype, value);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public StructuredDocument newInstance(MimeMediaType mimeType, InputStream source) throws IOException {
-            return new DOMXMLDocument(mimeType, source);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public StructuredDocument newInstance(MimeMediaType mimeType, Reader source) throws IOException {
-            return new DOMXMLDocument(mimeType, source);
-        }
-
-    }
-
-    public static final StructuredDocumentFactory.TextInstantiator INSTANTIATOR = new Instantiator();
-
-    private MimeMediaType mimeType;
-
-    /**
-     * Constructor for new instances of <CODE>DOMXMLDocument</CODE>
-     * with a value for the root element.
-     *
-     * @param mimeType This is the MIME Media Type being requested. In general
-     *                 it should be equivalent with the MIME Media Type returned by
-     *                 {@link #getMimeType()}. A <CODE>StructuredDocument</CODE>
-     *                 sub-class may, however, support more than one MIME Media type so this may be a
-     *                 true parameter. XMLDocument supports additional the MIME Media Type parameters,
-     *                 "charset". The charset parameter must be a value per IETF RFC 2279 or ISO-10646.
-     * @param docType  Used as the root type of this document. {@link net.jxta.document.XMLDocument} uses this as the XML
-     *                 <CODE>DOCTYPE</CODE>.
-     * @param value    String value to be associated with the root element.
-     *                 null if none is wanted.
-     * @throws RuntimeException Exceptions generated by the underlying implementation.
-     */
-    private DOMXMLDocument(final MimeMediaType mimeType, final String docType, final String value) {
-        super(null, null);
-        this.root = this;
-
-        this.mimeType = mimeType;
-
-        DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
-
-        docBuilderFactory.setNamespaceAware(true);
-        docBuilderFactory.setValidating(false);
-        try {
-            DocumentBuilder dataDocBuilder = docBuilderFactory.newDocumentBuilder();
-            DOMImplementation domImpl = dataDocBuilder.getDOMImplementation();
-            DocumentType doctypeNode = domImpl.createDocumentType(docType, null, null);
-
-            domNode = domImpl.createDocument("http://jxta.org", docType, doctypeNode);
-        } catch (ParserConfigurationException misconfig) {
-            throw new UndeclaredThrowableException(misconfig);
-        }
-
-        if (value != null) {
-            Node text = ((Document) domNode).createTextNode(value);
-
-            ((Document) domNode).getDocumentElement().appendChild(text);
-        }
-    }
-
-    /**
-     * Constructor for new instances of <CODE>DOMXMLDocument</CODE>
-     *
-     * @param mimeType This is the MIME Media Type being requested. In general it should be equivalent with
-     *                 the MIME Media Type returned by {@link #getMimeType()}. A <CODE>StructuredDocument</CODE>
-     *                 sub-class may, however, support more than one MIME Media type so this may be a
-     *                 true parameter. XMLDocument supports additional the MIME Media Type parameters,
-     *                 "charset". The charset parameter must be a value per IETF RFC 2279 or ISO-10646.
-     * @param docType  Used as the root type of this document. {@link net.jxta.document.XMLDocument} uses this as the XML
-     *                 <CODE>DOCTYPE</CODE>.
-     * @throws RuntimeException Exceptions generated by the underlying implementation.
-     */
-    private DOMXMLDocument(final MimeMediaType mimeType, final String docType) {
-        this(mimeType, docType, null);
-    }
-
-    /**
-     * Constructor for existing documents.
-     *
-     * @param mimeType This is the MIME Media Type being requested. In general
-     *                 it should be equivalent with the MIME Media Type returned by
-     *                 {@link #getMimeType()}. A <CODE>StructuredDocument</CODE> sub-class may,
-     *                 however, support more than one MIME Media type so this may be a
-     *                 true parameter. XMLDocument supports additional the MIME Media Type parameters,
-     *                 "charset". The charset parameter must be a value per IETF RFC 2279 or ISO-10646.
-     * @param stream   Contains the input used to construct this object. This stream should be of a type
-     *                 conformant with the type specified by the MIME Media Type "charset" parameter.
-     * @throws RuntimeException    Propagates exceptions from the underlying implementation.
-     * @throws java.io.IOException Thrown for failures processing the document.
-     */
-    private DOMXMLDocument(final MimeMediaType mimeType, final InputStream stream) throws IOException {
-        super(null, null);
-        this.root = this;
-
-        this.mimeType = mimeType;
-
-        String charset = mimeType.getParameter("charset");
-
-        Reader source;
-
-        if (charset == null) {
-            source = new InputStreamReader(stream);
-        } else {
-            source = new InputStreamReader(stream, charset);
-        }
-
-        DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
-
-        docBuilderFactory.setNamespaceAware(true);
-        docBuilderFactory.setValidating(false);
-        try {
-            DocumentBuilder dataDocBuilder = docBuilderFactory.newDocumentBuilder();
-
-            domNode = dataDocBuilder.parse(new InputSource(source));
-        } catch (ParserConfigurationException misconfig) {
-            throw new UndeclaredThrowableException(misconfig);
-        } catch (SAXException parseError) {
-            throw new IOException(parseError.toString());
-        }
-    }
-
-    /**
-     * Constructor for existing documents.
-     *
-     * @param mimeType This is the MIME Media Type being requested. In general
-     *                 it should be equivalent with the MIME Media Type returned by
-     *                 {@link #getMimeType()}. A <CODE>StructuredDocument</CODE> sub-class may,
-     *                 however, support more than one MIME Media type so this may be a
-     *                 true parameter. XMLDocument supports additional the MIME Media Type parameters,
-     *                 "charset". The charset parameter must be a value per IETF RFC 2279 or ISO-10646.
-     * @param source   Contains the input used to construct this object. This reader
-     *                 should be of a type conformant with the type specified by the MIME Media Type
-     *                 "charset" parameter.
-     * @throws RuntimeException Propagates exceptions from the underlying implementation.
-     */
-    private DOMXMLDocument(final MimeMediaType mimeType, final Reader source) throws IOException {
-        super(null, null);
-        this.root = this;
-
-        this.mimeType = mimeType;
-
-        DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
-
-        docBuilderFactory.setNamespaceAware(true);
-        docBuilderFactory.setValidating(false);
-        try {
-            DocumentBuilder dataDocBuilder = docBuilderFactory.newDocumentBuilder();
-
-            domNode = dataDocBuilder.parse(new InputSource(source));
-        } catch (ParserConfigurationException misconfig) {
-            throw new UndeclaredThrowableException(misconfig);
-        } catch (SAXException parseError) {
-            throw new IOException(parseError.toString());
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String toString() {
-        try {
-            StringWriter stringOut = new StringWriter();
-
-            sendToWriter(stringOut);
-            stringOut.close();
-
-            return stringOut.toString();
-        } catch (IOException ex) {
-            throw new UndeclaredThrowableException(ex);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public MimeMediaType getMimeType() {
-        return mimeType;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getFileExtension() {
-        return Utils.getExtensionForMime(INSTANTIATOR.getSupportedFileExtensions(), getMimeType());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public InputStream getStream() throws IOException {
-        String result = toString();
-
-        if (null == result) {
-            return null;
-        }
-
-        String charset = mimeType.getParameter("charset");
-
-        if (charset == null) {
-            return new ByteArrayInputStream(result.getBytes());
-        } else {
-            return new ByteArrayInputStream(result.getBytes(charset));
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void sendToStream(OutputStream stream) throws IOException {
-        Writer osw;
-        String charset = mimeType.getParameter("charset");
-
-        if (charset == null) {
-            osw = new OutputStreamWriter(stream);
-        } else {
-            osw = new OutputStreamWriter(stream, charset);
-        }
-
-        Writer out = new BufferedWriter(osw);
-
-        sendToWriter(out);
-        out.flush();
-        osw.flush();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Reader getReader() {
-        String result = toString();
-
-        if (null == result) {
-            return null;
-        }
-
-        return new StringReader(result);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void sendToWriter(Writer writer) throws IOException {
-        String charset = mimeType.getParameter("charset");
-
-        try {
-            DOMImplementationLS domImpl = (DOMImplementationLS) ((Document) domNode).getImplementation().getFeature("LS", "3.0");
-            LSOutput output = domImpl.createLSOutput();
-
-            if (charset != null) {
-                output.setEncoding(charset);
-            } else {
-                output.setEncoding(java.nio.charset.Charset.defaultCharset().name());
-            }
-
-            output.setCharacterStream(writer);
-
-            LSSerializer serial = domImpl.createLSSerializer();
-
-            serial.write(domNode, output);
-        } catch (Throwable ex) {
-            if (ex instanceof RuntimeException) {
-                throw (RuntimeException) ex;
-            } else if (ex instanceof Error) {
-                throw (Error) ex;
-            } else {
-                throw new UndeclaredThrowableException(ex);
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public DOMXMLElement createElement(Object key) {
-        return createElement(key, null);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public DOMXMLElement createElement(Object key, Object val) {
-        if (!String.class.isAssignableFrom(key.getClass())) {
-            throw new ClassCastException(key.getClass().getName() + " not supported by createElement.");
-        }
-
-        if ((null != val) && !String.class.isAssignableFrom(val.getClass())) {
-            throw new ClassCastException(val.getClass().getName() + " not supported by createElement.");
-        }
-
-        return createElement((String) key, (String) val);
-    }
-
-    // StructuredDocument Methods
-
-    /**
-     * {@inheritDoc}
-     */
-    public DOMXMLElement createElement(String name) {
-        return new DOMXMLElement(this, ((Document) domNode).createElement(name));
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public DOMXMLElement createElement(String name, String value) {
-        Element root;
-
-        root = ((Document) domNode).createElement(name);
-        if (null != value) {
-            root.appendChild(((Document) domNode).createTextNode(value));
-        }
-        return new DOMXMLElement(this, root);
-    }
-
-    // Element Methods
-
-    // Protected & Private Methods
-
-    @Override
-    protected Node getAssocNode() {
-        return ((Document) domNode).getDocumentElement();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/document/DOMXMLElement.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/document/DOMXMLElement.java
deleted file mode 100644 (file)
index 796eb06..0000000
+++ /dev/null
@@ -1,383 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.document;
-
-
-import net.jxta.document.Attribute;
-import net.jxta.document.XMLElement;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.List;
-
-
-/**
- * This class represent an element of an XML document. XML Documents are formed
- * as a hierarchy of elements. Each element provides a proxy for DOM elements
- * and the text nodes containing values.
- */
-public class DOMXMLElement implements XMLElement<DOMXMLElement> {
-
-    protected DOMXMLDocument root;
-
-    /**
-     * The DOM node for which this element is a proxy.
-     */
-    protected Node domNode;
-
-    /**
-     * Constructor for associating a DOM node with a StructuredDocument Element.
-     *
-     * @param root the DOM not which is to be associated with this element.
-     * @param node the DOM node
-     */
-    protected DOMXMLElement(DOMXMLDocument root, Node node) {
-        this.root = root;
-        domNode = node;
-    }
-
-    /**
-     * Get the name associated with an element.
-     *
-     * @return A string containing the key of this element.
-     */
-    public String getKey() {
-        return getName();
-    }
-
-    /**
-     * Get the value (if any) associated with an element.
-     *
-     * @return A string containing the value of this element, if any, otherwise null.
-     */
-    public String getValue() {
-        return getTextValue();
-    }
-
-    /**
-     * Get the name associated with an element.
-     *
-     * @return A string containing the name of this element.
-     */
-    public String getName() {
-        return getAssocNode().getNodeName();
-    }
-
-    /**
-     * Get the value (if any) associated with an element.
-     *
-     * @return A string containing the value of this element, if any, otherwise null.
-     */
-    public String getTextValue() {
-        StringBuilder itsValue = new StringBuilder();
-        
-        for (Node eachChild = getAssocNode().getFirstChild(); eachChild != null; eachChild = eachChild.getNextSibling()) {
-            if (Node.TEXT_NODE == eachChild.getNodeType()) {
-                itsValue.append(eachChild.getNodeValue());
-            }
-        }
-
-        if (0 == itsValue.length()) {
-            return null;
-        } else {
-            return itsValue.toString();
-        }
-    }
-
-    /**
-     * Get the root element of the hierarchy this element belongs to.
-     *
-     * @return StructuredDocument root of this element's hierarchy.
-     */
-    public DOMXMLDocument getRoot() {
-        return root;
-    }
-
-    /**
-     * Get the parent of this element. If the element has not been inserted into
-     * the Document then null is returned. If this element is the root of the
-     * Document then it returns itself.
-     */
-    public DOMXMLElement getParent() {
-        Node node = getAssocNode();
-
-        if (node.getOwnerDocument().equals(node)) {
-            return new DOMXMLElement(root, node);
-        } else {
-            return new DOMXMLElement(root, node.getParentNode());
-        }
-    }
-
-    /**
-     * Add a child element to this element
-     *
-     * @param element the element to be added as a child
-     */
-    public void appendChild(DOMXMLElement element) {
-        getAssocNode().appendChild(element.getAssocNode());
-    }
-
-    /**
-     * Returns an enumeration of the immediate children of this element
-     *
-     * @return An enumeration containing all of the children of this element.
-     */
-    public Enumeration<DOMXMLElement> getChildren() {
-        List<DOMXMLElement> children = new ArrayList<DOMXMLElement>();
-
-        for (Node eachChild = getAssocNode().getFirstChild(); eachChild != null; eachChild = eachChild.getNextSibling()) {
-            if (Node.ELEMENT_NODE == eachChild.getNodeType()) {
-                children.add(new DOMXMLElement(root, eachChild));
-            }
-        }
-
-        return Collections.enumeration(children);
-    }
-
-    /**
-     * Returns an enumeration of the immediate children of this element whose
-     * name match the specified string.
-     *
-     * @param key The key which will be matched against.
-     * @return enumeration containing all of the children of this element.
-     */
-    public Enumeration<DOMXMLElement> getChildren(Object key) {
-        if (key instanceof String)
-            return getChildren((String) key);
-        else
-            throw new ClassCastException(key.getClass().getName() + " not supported by getChildren.");
-    }
-
-    /**
-     * Returns an enumeration of the immediate children of this element whose
-     * name match the specified string.
-     *
-     * @param name The name which will be matched against.
-     * @return An enumeration containing all of the children of this element.
-     */
-    public Enumeration<DOMXMLElement> getChildren(String name) {
-        List<DOMXMLElement> children = new ArrayList<DOMXMLElement>();
-
-        for (Node eachChild = getAssocNode().getFirstChild(); eachChild != null; eachChild = eachChild.getNextSibling()) {
-            if ((Node.ELEMENT_NODE == eachChild.getNodeType()) && (name.equals(eachChild.getNodeName()))) {
-                children.add(new DOMXMLElement(root, eachChild));
-            }
-        }
-
-        return Collections.enumeration(children);
-    }
-
-    /**
-     * Tests two elements for equality. For the XML document the definition of
-     * equality is:
-     * <p/>
-     * <p/><ul>
-     * <li>the item compared against must be an XML Element.</li>
-     * <p/>
-     * <li>The items must belong to the same document.</li>
-     * <p/>
-     * <li>The items must have the same name.</li>
-     * <p/>
-     * <li>The items must have the save textual value.</li>
-     * </ul>
-     *
-     * @param element the element to be compared against.
-     * @return true if the elements are equal
-     */
-    @Override
-    public boolean equals(Object element) {
-        if (this == element) {
-            return true;
-        }
-
-        if (!(element instanceof DOMXMLElement)) {
-            return false;
-        }
-
-        DOMXMLElement xmlElement = (DOMXMLElement) element;
-
-        Node me = getAssocNode();
-        Node it = xmlElement.getAssocNode();
-
-        if (me == it) {
-            return true;
-        }
-
-        if (me.getOwnerDocument() != it.getOwnerDocument()) {
-            return false;
-        }
-
-        if (!getName().equals(xmlElement.getName())) {
-            return false;
-        }
-
-        String val1 = getTextValue();
-        String val2 = xmlElement.getTextValue();
-
-        return (null == val1) && (null == val2) || null != val1 && null != val2 && val1.equals(val2);
-
-    }
-
-    /**
-     * Returns the DOM Node associated with this StructuredDocument element.
-     *
-     * @return Node    The DOM Node associated with this StructuredDocument element.
-     */
-    protected Node getAssocNode() {
-        return domNode;
-    }
-
-    // Attributable methods
-
-    /**
-     * Adds an attribute with the given name and value. Some implementations
-     * may support only a single value for each distinct name. Others may
-     * support multiple values for each name. If the value being provided
-     * replaces some other value then that value is returned otherwise null
-     * is returned.
-     *
-     * @param name  name of the attribute.
-     * @param value value for the attribute.
-     * @return String  containing previous value for this name if the value
-     *         is being replaced otherwise null.
-     */
-    public String addAttribute(String name, String value) {
-        String oldAttrValue = ((Element) getAssocNode()).getAttribute(name);
-
-        ((Element) getAssocNode()).setAttribute(name, value);
-        return (0 == oldAttrValue.length()) ? null : oldAttrValue;
-    }
-
-    /**
-     * Adds an attribute with the given name and value. Some implementations
-     * may support only a single value for each distinct name. Others may
-     * support multiple values for each name. If the value being provided
-     * replaces some other value then that value is returned otherwise null
-     * is returned.
-     *
-     * @param newAttrib new attribute.
-     * @return String  containing previous value for this name if the value
-     *         is being replaced otherwise null.
-     */
-    public String addAttribute(Attribute newAttrib) {
-        String oldAttrValue = ((Element) getAssocNode()).getAttribute(newAttrib.getName());
-
-        ((Element) getAssocNode()).setAttribute(newAttrib.getName(), newAttrib.getValue());
-        return (0 == oldAttrValue.length()) ? null : oldAttrValue;
-    }
-
-    /**
-     * Returns an enumerations of the attributes assosicated with this object.
-     * Each element is of type Attribute.
-     *
-     * @return Enumeration the attributes associated with this object.
-     */
-    public Enumeration<Attribute> getAttributes() {
-        NamedNodeMap nmap = getAssocNode().getAttributes();
-
-        if (nmap == null) {
-            List<Attribute> noAttrs = Collections.emptyList();
-
-            return Collections.enumeration(noAttrs);
-        }
-
-        List<Attribute> attrs = new ArrayList<Attribute>();
-
-        for (int i = 0; i < nmap.getLength(); i++) {
-            Node domAttr = nmap.item(i);
-            Attribute attr = new Attribute(this, domAttr.getNodeName(), domAttr.getNodeValue());
-
-            attrs.add(attr);
-        }
-
-        return Collections.enumeration(attrs);
-    }
-
-    /**
-     * returns a single attribute which matches the name provided. If no such
-     * named attribute exists then null is returned. For impelementations of
-     * this interface which support multiple values for each name only the
-     * first value will be returned. To access all values for a name you must
-     * use getAttributes.
-     *
-     * @return Attribute the attributes matching the given name.
-     */
-    public Attribute getAttribute(String name) {
-        NamedNodeMap nmap = (getAssocNode()).getAttributes();
-
-        if (nmap == null) {
-            return null;
-        }
-
-        for (int i = 0; i < nmap.getLength(); i++) {
-            Node domAttr = nmap.item(i);
-
-            if (name.equals(domAttr.getNodeName())) {
-                Attribute attr = new Attribute(this, domAttr.getNodeName(), domAttr.getNodeValue());
-
-                return attr;
-            }
-        }
-
-        return null;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/document/LiteXMLDocument.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/document/LiteXMLDocument.java
deleted file mode 100644 (file)
index ba9116d..0000000
+++ /dev/null
@@ -1,526 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.document;
-
-
-import java.io.BufferedWriter;
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Reader;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.io.Writer;
-
-import java.io.IOException;
-import java.lang.reflect.UndeclaredThrowableException;
-
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentFactory.Instantiator.ExtensionMapping;
-import net.jxta.document.XMLDocument;
-import net.jxta.impl.document.LiteXMLElement.charRange;
-import net.jxta.impl.document.LiteXMLElement.tagRange;
-
-
-/**
- * This class is an implementation of the StructuredDocument interface using
- * a simplified XML implementation.
- */
-public class LiteXMLDocument extends LiteXMLElement implements XMLDocument<LiteXMLElement> {
-
-    /**
-     * {@inheritDoc}
-     */
-    private final static class Instantiator implements StructuredDocumentFactory.TextInstantiator {
-
-        // "x-" is a mime-type convention for indicating partial or provisional
-        // compliance to a standard
-        private static final MimeMediaType[] myTypes = {
-            MimeMediaType.XML_DEFAULTENCODING, 
-            MimeMediaType.valueOf("Text/x-Xml"), 
-            MimeMediaType.valueOf("Application/Xml"),
-            MimeMediaType.valueOf("Application/x-Xml")
-        };
-
-        // these are the file extensions which are likely to contain files of
-        // the type I like.
-        private static final ExtensionMapping[] myExtensions = {
-            new ExtensionMapping("xml", myTypes[0]), 
-            new ExtensionMapping("xml", (MimeMediaType) null) 
-        };
-
-        /**
-         * Creates new LiteXMLDocumentInstantiator
-         */
-        public Instantiator() {}
-
-        /**
-         * {@inheritDoc}
-         */
-        public MimeMediaType[] getSupportedMimeTypes() {
-            return (myTypes);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public ExtensionMapping[] getSupportedFileExtensions() {
-            return (myExtensions);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public StructuredDocument newInstance(MimeMediaType mimeType, String doctype) {
-            return new LiteXMLDocument(mimeType, doctype);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public StructuredDocument newInstance(MimeMediaType mimeType, String doctype, String value) {
-            return new LiteXMLDocument(mimeType, doctype, value);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public StructuredDocument newInstance(MimeMediaType mimeType, InputStream source) throws IOException {
-            return new LiteXMLDocument(mimeType, source);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public StructuredDocument newInstance(MimeMediaType mimeType, Reader source) throws IOException {
-            return new LiteXMLDocument(mimeType, source);
-        }
-    }
-
-    /**
-     * The instantiator for instances of our documents.
-     */
-    public static final StructuredDocumentFactory.TextInstantiator INSTANTIATOR = new Instantiator();
-
-    /**
-     * The actual document contents.
-     */
-    final StringBuilder docContent;
-
-    /**
-     * The mimetype of this document.
-     */
-    private final MimeMediaType mimeType;
-
-    /**
-     * Creates new LiteXMLDocument
-     */
-    LiteXMLDocument(MimeMediaType mimeType, String type) {
-        this(mimeType, type, "");
-    }
-
-    /**
-     * Creates new LiteXMLDocument with a textValue in the root element
-     */
-    LiteXMLDocument(MimeMediaType mimeType, String type, String textValue) {
-        super(null, (LiteXMLElement.tagRange) null);
-
-        parent = this;
-
-        this.mimeType = mimeType;
-
-        docContent = new StringBuilder();
-
-        for (int eachChar = type.length() - 1; eachChar >= 0; eachChar--) {
-            if (Character.isWhitespace(type.charAt(eachChar))) {
-                throw new IllegalArgumentException("Root tag may not contain spaces");
-            }
-        }
-
-        if (null == textValue) {
-            textValue = "";
-        }
-
-        StringBuilder seedDoc = new StringBuilder(textValue.length() + 3 * type.length() + 128);
-
-        seedDoc.append("<?xml version=\"1.0\"");
-
-        String charset = mimeType.getParameter("charset");
-
-        if (charset != null) {
-            seedDoc.append(" encoding=\"");
-            seedDoc.append(charset);
-            seedDoc.append("\"");
-        }
-        seedDoc.append("?>\n");
-
-        seedDoc.append("<!DOCTYPE ");
-        seedDoc.append(type);
-        seedDoc.append(">\n");
-
-        seedDoc.append('<');
-        seedDoc.append(type);
-        seedDoc.append('>');
-
-        seedDoc.append(textValue);
-
-        seedDoc.append("</");
-        seedDoc.append(type);
-        seedDoc.append('>');
-
-        try {
-            init(new StringReader(seedDoc.toString()));
-        } catch (IOException caught) {
-            throw new UndeclaredThrowableException(caught);
-        }
-    }
-
-    /**
-     * Creates new LiteXMLDocument
-     */
-    LiteXMLDocument(MimeMediaType mimeType, InputStream in) throws IOException {
-        super(null, (LiteXMLElement.tagRange) null);
-
-        parent = this;
-
-        this.mimeType = mimeType;
-
-        docContent = new StringBuilder();
-
-        String charset = mimeType.getParameter("charset");
-
-        if (charset == null) {
-            init(new InputStreamReader(in));
-        } else {
-            init(new InputStreamReader(in, charset));
-        }
-    }
-
-    /**
-     * Creates new LiteXMLDocument
-     */
-    LiteXMLDocument(MimeMediaType mimeType, Reader in) throws IOException {
-        super(null, (LiteXMLElement.tagRange) null);
-
-        parent = this;
-
-        this.mimeType = mimeType;
-
-        docContent = new StringBuilder();
-
-        init(in);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String toString() {
-
-        try {
-            StringWriter stringOut = new StringWriter();
-
-            sendToWriter(stringOut);
-
-            stringOut.close();
-
-            return stringOut.toString();
-        } catch (IOException caught) {
-            throw new UndeclaredThrowableException(caught);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public MimeMediaType getMimeType() {
-        return mimeType;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getFileExtension() {
-        return TextDocumentCommon.Utils.getExtensionForMime(INSTANTIATOR.getSupportedFileExtensions(), getMimeType());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public LiteXMLElement createElement(Object key) {
-        return createElement(key, null);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public LiteXMLElement createElement(Object key, Object val) {
-        if (!(key instanceof String)) {
-            throw new ClassCastException(key.getClass().getName() + " not supported by createElement as key.");
-        }
-
-        if ((null != val) && !(val instanceof String)) {
-            throw new ClassCastException(val.getClass().getName() + " not supported by createElement as value.");
-        }
-
-        return createElement((String) key, (String) val);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public LiteXMLElement createElement(String name) {
-        return createElement(name, (String) null);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public LiteXMLElement createElement(String name, String val) {
-        return new LiteXMLElement(this, name, val);
-    }
-
-    /**
-     * Create a new text element as a sub-range of this document.
-     *
-     * @param loc The document range for the new element.
-     * @return The newly created element.
-     */
-    protected LiteXMLElement createElement(tagRange loc) {
-        return new LiteXMLElement(this, loc);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Reader getReader() {
-        return new StringReader(toString());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public LiteXMLDocument getRoot() {
-        return this;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public InputStream getStream() throws IOException {
-        String charset = mimeType.getParameter("charset");
-
-        if (charset == null) {
-            return new ByteArrayInputStream(toString().getBytes());
-        } else {
-            return new ByteArrayInputStream(toString().getBytes(charset));
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void sendToWriter(Writer writer) throws IOException {
-        String charset = mimeType.getParameter("charset");
-
-        if (charset == null) {
-            writer.write("<?xml version=\"1.0\"?>\n");
-        } else {
-            writer.write("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\n");
-        }
-
-        tagRange result = getDocType(docContent, true);
-
-        if (result.isValid()) {
-            writer.write(docContent.substring(result.startTag.start, result.startTag.end + 1));
-            writer.write('\n');
-        }
-
-        printNice(writer, 0, true);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void sendToStream(OutputStream stream) throws IOException {
-        String charset = mimeType.getParameter("charset");
-
-        Writer osw;
-
-        if (charset == null) {
-            osw = new OutputStreamWriter(stream);
-        } else {
-            osw = new OutputStreamWriter(stream, charset);
-        }
-
-        Writer out = new BufferedWriter(osw);
-
-        sendToWriter(out);
-        out.flush();
-    }
-
-    /**
-     * Initialises LiteXMLDocument.
-     */
-    protected void init(Reader in) throws IOException {
-        loc = new tagRange();
-
-        char[] smallBuffer = new char[512];
-
-        do {
-            int readCount = in.read(smallBuffer);
-
-            if (readCount < 0) {
-                break;
-            }
-
-            if (readCount > 0) {
-                docContent.append(smallBuffer, 0, readCount);
-            }
-
-        } while (true);
-
-        // startTag will contain the xml declaration
-        loc.startTag.start = 0;
-        loc.startTag.end = docContent.indexOf(">");
-
-        // body is everything after the xml declaration
-        loc.body.start = loc.startTag.end + 1;
-        loc.body.end = docContent.length() - 1;
-
-        // end is the end of the doc.
-        loc.endTag.start = loc.body.end;
-        loc.endTag.end = loc.body.end;
-
-        tagRange docType = getDocType(getDocument().docContent, false);
-
-        if (docType.isValid()) {
-            loc = getTagRanges(getDocument().docContent, docContent.substring(docType.body.start, docType.body.end + 1)
-                    ,
-                    docType.endTag);
-        } else {
-            loc = getTagRanges(getDocument().docContent, null, loc.body);
-        }
-
-        if (!loc.isValid()) {
-            throw new RuntimeException("Parsing error in source document.");
-        }
-
-        if (!loc.startTag.equals(loc.endTag)) {
-            addChildTags(loc.body, this); // now add the subtags
-        }
-
-        if (paranoidConsistencyChecking) {
-            checkConsistency();
-        }
-    }
-
-    protected tagRange getDocType(final StringBuilder source, boolean wholeElement) {
-        final String xmldoctype = "!DOCTYPE";
-        int start = 0;
-        int end = getDocument().docContent.length() - 1;
-        tagRange ranges = getTagRanges(source, xmldoctype, new charRange(start, end));
-
-        if (!ranges.startTag.isValid()) {
-            return ranges;
-        }
-
-        // the rest of the document will be the "end"
-        ranges.endTag.start = ranges.body.start;
-        ranges.endTag.end = ranges.body.end;
-
-        if (wholeElement) {
-            // this will be an empty element
-            ranges.body.start = ranges.startTag.end + 1;
-            ranges.body.end = ranges.endTag.start - 1;
-        } else {
-            ranges.body.start = ranges.startTag.start + 1 + xmldoctype.length() - 1 + 1;
-            ranges.startTag.end = ranges.body.start - 1;
-
-            while ((ranges.body.start < end) && // immediately followed by a delimiter or the end of the tag
-                    Character.isWhitespace(source.charAt(ranges.body.start))) {
-                ranges.body.start++;
-            }
-
-            ranges.body.end = ranges.body.start;
-
-            while ((ranges.body.end + 1) < end) { // immediately followed by a delimiter or the end of the tag
-                char possibleEnd = source.charAt(ranges.body.end + 1);
-
-                if (Character.isWhitespace(possibleEnd) || ('/' == possibleEnd) || ('>' == possibleEnd)) {
-                    break;
-                }
-                ranges.body.end++;
-            }
-        }
-
-        return ranges;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    LiteXMLDocument getDocument() {
-        return this;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/document/LiteXMLElement.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/document/LiteXMLElement.java
deleted file mode 100644 (file)
index 01aa3c9..0000000
+++ /dev/null
@@ -1,1729 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.document;
-
-
-import java.io.Writer;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import java.io.IOException;
-
-import net.jxta.document.Attribute;
-import net.jxta.document.XMLElement;
-import net.jxta.logging.Logging;
-
-
-/**
- * An element of a <CODE>StructuredDocument</CODE>. <CODE>StructuredDocument</CODE>s
- * are made up of hierarchies of elements. LiteXMLElement is part of an implementation
- * while makes use of XML-style document conventions, but without the overhead of a
- * full parser.
- */
-public class LiteXMLElement implements XMLElement<LiteXMLElement> {
-
-    /**
-     * Defines a range of characters, probably within a string. The range is
-     * deemed to be invalid if 'start' is -1.  A zero length range is, by
-     * convention, described by an 'end' value of 'start' - 1.
-     */
-    protected static class charRange implements Comparable<charRange> {
-
-        /**
-         * Contains the start position of this range.
-         */
-        public int start;
-
-        /**
-         * Contains the end position of this range. one weird thing: if end == start -1,
-         * then the item is of zero length beginning at start.
-         */
-        public int end;
-
-        /**
-         * Constructor for a null charRange.
-         */
-        public charRange() {
-            start = -1;
-            end = -1;
-        }
-
-        /**
-         * Constructor for which the bounds are specified.
-         */
-        public charRange(int start, int end) {
-            this.start = start;
-            this.end = end;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public boolean equals(Object aRange) {
-            if (this == aRange) {
-                return true;
-            }
-
-            if (!(aRange instanceof charRange)) {
-                return false;
-            }
-
-            charRange someRange = (charRange) aRange;
-
-            return (start == someRange.start) && (end == someRange.end);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public int compareTo(charRange someRange) {
-            if (this == someRange) {
-                return 0;
-            }
-
-            if (start < someRange.start) {
-                return -1;
-            }
-
-            if (start > someRange.start) {
-                return 1;
-            }
-
-            if (end < someRange.end) {
-                return -1;
-            }
-
-            if (end > someRange.end) {
-                return 1;
-            }
-
-            return 0;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public String toString() {
-            return "[" + start + "," + end + "]";
-        }
-
-        /**
-         * Returns true if the <CODE>charRange</CODE> specified by someRange is
-         * contained within this range.
-         *
-         * @param someRange The range which must be contained within this range.
-         * @return true if the specified range is contained with this range otherwise false.
-         */
-        public boolean contains(charRange someRange) {
-            return (isValid() && someRange.isValid() && (start <= someRange.start) && (end >= someRange.end));
-        }
-
-        /**
-         * Returns true if the <CODE>tagRange</CODE> specified by someRange is
-         * contained within this range.
-         *
-         * @param someRange The range which must be contained within this range.
-         * @return true if the specified range is contained with this range otherwise false.
-         */
-        public boolean contains(tagRange someRange) {
-            return (isValid() && someRange.isValid() && (start <= someRange.startTag.start) && (end >= someRange.endTag.end));
-        }
-
-        /**
-         * Returns true if the location specified is contained in this range.
-         *
-         * @param someLoc the location which is to be tested.
-         * @return true if the location is in this range, otherwise false.
-         */
-        public boolean contains(int someLoc) {
-            return (isValid() && (someLoc >= 0) && (start <= someLoc) && (end >= someLoc));
-        }
-
-        /**
-         * Returns true if the range is both non-null and has a length of greater
-         * than or equal to zero.
-         *
-         * @return true if the range is a valid one, otherwise false.
-         */
-        public boolean isValid() {
-            return length() >= 0;
-        }
-
-        /**
-         * Returns the length of this range.
-         *
-         * @return The length of the range or -1 if the range is null.
-         */
-        public int length() {
-            if ((-1 == start) || (-1 == end)) {
-                return -1;
-            }
-
-            return (end - start + 1);
-        }
-    }
-
-
-    /**
-     * A tagRange is a collection of char ranges useful for describing XML
-     * structures.
-     * <p/>
-     * <p/><dl>
-     * <dt><code>startTag</code></dt>
-     * <dd>The range of the opening tag, ie. &lt;tag></dd>
-     * <dt><code>body</code></dt>
-     * <dd>Everything between <code>startTag</code> and <code>endTag</code>.</dd>
-     * <dt><code>endTag</code></dt>
-     * <dd>The range of the terminating tag, ie. &lt;/tag>.</dd>
-     * </dl>
-     * <p/>
-     * <p/>For empty-element tags the <code>startTag</code>, <code>body</code>
-     * and <code>endTag</code> will be equal.
-     */
-    protected static class tagRange implements Comparable<tagRange> {
-        public charRange startTag;
-        public charRange body;
-        public charRange endTag;
-
-        public tagRange() {
-            startTag = new charRange();
-            body = new charRange();
-            endTag = new charRange();
-        }
-
-        public tagRange(charRange startTag, charRange body, charRange endTag) {
-            this.startTag = startTag;
-            this.body = body;
-            this.endTag = endTag;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public boolean equals(Object aRange) {
-            if (this == aRange) {
-                return true;
-            }
-
-            if (!(aRange instanceof tagRange)) {
-                return false;
-            }
-
-            tagRange likeMe = (tagRange) aRange;
-
-            return startTag.equals(likeMe.startTag) && body.equals(likeMe.body) && endTag.equals(likeMe.endTag);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public int compareTo(tagRange someRange) {
-            if (this == someRange) {
-                return 0;
-            }
-
-            int compared = startTag.compareTo(someRange.startTag);
-
-            if (0 != compared) {
-                return compared;
-            }
-
-            return endTag.compareTo(someRange.endTag);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public String toString() {
-            return startTag + ":" + body + ":" + endTag;
-        }
-
-        /**
-         * Returns true if the <CODE>tagRange</CODE> specified by someRange is
-         * contained within the body portion of this range.
-         *
-         * @param someRange The range which must be contained within this range.
-         * @return true if the specified range is contained with this range
-         *         otherwise false.
-         */
-        public boolean contains(tagRange someRange) {
-            return (isValid() && someRange.isValid() && (body.start <= someRange.startTag.start)
-                    && (body.end >= someRange.endTag.end));
-        }
-
-        /**
-         * Returns true if the <CODE>charRange</CODE> specified by someRange is
-         * contained within the body portion of this range.
-         *
-         * @param someRange The range which must be contained within this range.
-         * @return true if the specified range is contained with this range
-         *         otherwise false.
-         */
-        public boolean contains(charRange someRange) {
-            return (isValid() && someRange.isValid() && (body.start <= someRange.start) && (body.end >= someRange.end));
-        }
-
-        /**
-         * @return <code>true</code> if this tagRange represents and empty
-         *         element.
-         */
-        public boolean isEmptyElement() {
-            return isValid() && startTag.equals(body) && startTag.equals(endTag);
-        }
-
-        /**
-         * @return true if valid
-         */
-        public boolean isValid() {
-            return (null != startTag) && (null != body) && (null != endTag) && startTag.isValid() && body.isValid()
-                    && endTag.isValid();
-        }
-    }
-
-    /**
-     * Log4J Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(LiteXMLElement.class.getName());
-
-    /**
-     * If true then every operation which modifies the state of the document will
-     * perform a consistency check. This is a deadly performance killer but
-     * helps a lot in isolating bugs.
-     */
-    protected final static transient boolean paranoidConsistencyChecking = false;
-
-    /**
-     * The document associated with this Element.
-     */
-    protected final transient LiteXMLDocument doc;
-
-    /**
-     * Identifies the element which is the parent of this element. If <code>
-     * this.parent == this</code> then this element is the root of the document.
-     * If <code>null == parent</code> then this element has not yet been
-     * inserted into the document.
-     */
-    protected transient LiteXMLElement parent;
-
-    /**
-     * The portion of the source XML associated with this node
-     */
-    protected transient tagRange loc;
-
-    /**
-     * If this node has yet to be inserted into the document then will contain
-     * the String value of this node, otherwise null.
-     */
-    private transient StringBuilder uninserted = null;
-
-    /**
-     * The child elements associated with this element
-     */
-    private transient List<LiteXMLElement> children;
-
-    /**
-     * Creates new LiteXMLElement
-     *
-     * @param loc The location of the element within the document.
-     * @param doc The {@link LiteXMLDocument} which is the root of the document.
-     */
-    protected LiteXMLElement(LiteXMLDocument doc, tagRange loc) {
-        this.doc = doc;
-        this.loc = loc;
-    }
-
-    /**
-     * Creates new LiteElement
-     *
-     * @param doc  The {@link LiteXMLDocument} which is the root of the document.
-     * @param name The name of the element being created.
-     * @param val  The value of the element being created or null if there is no
-     *             content to the element.
-     */
-    public LiteXMLElement(LiteXMLDocument doc, final String name, final String val) {
-        this(doc, new tagRange());
-
-        for (int eachChar = name.length() - 1; eachChar >= 0; eachChar--) {
-            if (Character.isWhitespace(name.charAt(eachChar))) {
-                throw new IllegalArgumentException("Element names may not contain spaces.");
-            }
-        }
-
-        if ((null == val) || (0 == val.length())) {
-            uninserted = new StringBuilder("<" + name + "/>");
-        } else {
-            uninserted = new StringBuilder(val);
-            encodeEscaped(uninserted);
-            uninserted.insert(0, "<" + name + ">");
-            uninserted.append("</").append(name).append(">");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object element) {
-        if (this == element) {
-            return true;
-        }
-
-        if (!(element instanceof LiteXMLElement)) {
-            return false;
-        }
-
-        LiteXMLElement liteElement = (LiteXMLElement) element;
-
-        if (getDocument() != liteElement.getDocument()) {
-            return false;
-        }
-
-        if (!getName().equals(liteElement.getName())) {
-            return false;
-        }
-
-        String val1;
-
-        if (null != uninserted) {
-            val1 = uninserted.toString();
-        } else {
-            val1 = getTextValue();
-        }
-
-        String val2 = liteElement.getTextValue();
-
-        if ((null == val1) && (null == val2)) {
-            return true;
-        }
-
-        return null != val1 && null != val2 && val1.equals(val2);
-
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * <p/>A toString implementation for debugging purposes.
-     */
-    @Override
-    public String toString() {
-        if (paranoidConsistencyChecking) {
-            checkConsistency();
-        }
-
-        String name = getName();
-
-        if (name == null) {
-            name = "<<null name>>";
-        }
-        String value = getTextValue();
-
-        if (value == null) {
-            value = "<<null value>>";
-        }
-
-        if ((value.length() + name.length()) >= 60) {
-            int len = Math.max(20, 60 - name.length());
-
-            value = value.substring(0, Math.min(len, value.length()));
-        }
-
-        // FIXME 20021125 bondolo@jxta.org should remove carriage control.
-
-        return super.toString() + " / " + name + " = " + value;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public LiteXMLDocument getRoot() {
-        return getDocument();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public LiteXMLElement getParent() {
-        return parent;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Enumeration<LiteXMLElement> getChildren() {
-        if (null != uninserted) {
-            throw new IllegalStateException("This element has not been added.");
-        }
-
-        if (null == children) {
-            List<LiteXMLElement> empty = Collections.emptyList();
-
-            return Collections.enumeration(empty);
-        } else {
-            return Collections.enumeration(children);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getName() {
-        if (null != uninserted) {
-            throw new IllegalStateException("This element has not been added.");
-        }
-
-        if (paranoidConsistencyChecking) {
-            checkConsistency();
-        }
-
-        int current = loc.startTag.start + 1;
-
-        while (current <= loc.startTag.end) {
-            char inTagName = getDocument().docContent.charAt(current);
-
-            if (Character.isWhitespace(inTagName) || ('/' == inTagName) || ('>' == inTagName)) {
-                break;
-            }
-
-            current++;
-        }
-
-        return getDocument().docContent.substring(loc.startTag.start + 1, current);
-    }
-
-    /**
-     * Get the name associated with an element.
-     *
-     * @return A string containing the key of this element.
-     */
-    public String getKey() {
-        return getName();
-    }
-
-    /**
-     * Get the value (if any) associated with an element.
-     *
-     * @return A string containing the value of this element, if any, otherwise null.
-     */
-    public String getValue() {
-        return getTextValue();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void appendChild(LiteXMLElement element) {
-        if (element.getDocument() != getDocument()) {
-            throw new IllegalArgumentException("Wrong document");
-        }
-
-        if (null != element.parent) {
-            throw new IllegalArgumentException("New element is already in document");
-        }
-
-        if (null != uninserted) {
-            throw new IllegalStateException("This element has not been added.");
-        }
-
-        if (paranoidConsistencyChecking) {
-            checkConsistency();
-        }
-
-        // If uninserted then this new element contains content which needs to
-        // be added to the document. If uninserted is null then the child
-        // element's content is already in the document, but merely needs to
-        // be recognized as a child.
-        if (null != element.uninserted) {
-            if (loc.startTag.equals(loc.endTag)) {
-                getDocument().docContent.deleteCharAt(loc.endTag.end - 1); // delete the /
-                loc.startTag.end -= 1;
-
-                // skip past the name portion
-                int current = loc.startTag.start + 1;
-
-                while (current <= loc.startTag.end) {
-                    char inTagName = getDocument().docContent.charAt(current);
-
-                    if (Character.isWhitespace(inTagName) || ('>' == inTagName)) {
-                        break;
-                    }
-
-                    current++;
-                }
-
-                String tagName = getDocument().docContent.substring(loc.startTag.start + 1, current);
-
-                getDocument().docContent.insert(loc.startTag.end + 1, "</" + tagName + ">");
-                getDocument().adjustLocations(loc.startTag.end + 1, tagName.length() + 2);
-                loc.endTag = new charRange(loc.startTag.end + 1, loc.startTag.end + 3 + tagName.length());
-                loc.body = new charRange(loc.startTag.end + 1, loc.startTag.end);
-            }
-
-            getDocument().docContent.insert(loc.endTag.start, element.uninserted);
-
-            element.loc.startTag.start = loc.endTag.start;
-            element.loc.startTag.end = getDocument().docContent.indexOf(">", element.loc.startTag.start);
-
-            if ('/' != element.uninserted.charAt(element.uninserted.length() - 2)) {
-                element.loc.body.start = element.loc.startTag.end + 1;
-
-                element.loc.endTag.end = element.loc.startTag.start + element.uninserted.length() - 1;
-                element.loc.endTag.start = getDocument().docContent.lastIndexOf("<", element.loc.endTag.end);
-
-                element.loc.body.end = element.loc.endTag.start - 1;
-            } else {
-                element.loc.body = new charRange(element.loc.startTag.start, element.loc.startTag.end);
-                element.loc.endTag = new charRange(element.loc.startTag.start, element.loc.startTag.end);
-            }
-
-            if (0 != loc.body.length()) {
-                getDocument().adjustLocations(loc.endTag.start, element.uninserted.length());
-            } else {
-                loc.body.start--;
-                getDocument().adjustLocations(loc.endTag.start, element.uninserted.length());
-                loc.body.start++;
-            }
-
-            loc.body.end += element.uninserted.length();
-
-            element.uninserted = null;
-        }
-
-        element.parent = this;
-
-        if (null == children) {
-            children = new ArrayList<LiteXMLElement>();
-        }
-
-        children.add(element);
-
-        if (paranoidConsistencyChecking) {
-            checkConsistency();
-        }
-    }
-
-    /**
-     * Returns an enumeration of the immediate children of this element whose
-     * name match the specified string.
-     *
-     * @param key The key which will be matched against.
-     * @return enumeration containing all of the children of this element.
-     */
-    public Enumeration<LiteXMLElement> getChildren(Object key) {
-        if (key instanceof String)
-            return getChildren((String) key);
-        else
-            throw new ClassCastException(key.getClass().getName() + " not supported by getChildren.");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Enumeration<LiteXMLElement> getChildren(String name) {
-        if (null != uninserted) {
-            throw new IllegalStateException("This element has not been added.");
-        }
-
-        if (paranoidConsistencyChecking) {
-            checkConsistency();
-        }
-
-        if (null == children) {
-            List<LiteXMLElement> empty = Collections.emptyList();
-
-            return Collections.enumeration(empty);
-        }
-
-        List<LiteXMLElement> result = new ArrayList<LiteXMLElement>();
-
-        for (LiteXMLElement aChild : children) {
-            if (name.equals(aChild.getName())) {
-                result.add(aChild);
-            }
-        }
-
-        return Collections.enumeration(result);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getTextValue() {
-        return getTextValue(false, true);
-    }
-
-    /**
-     * Get the value (if any) associated with an element.
-     *
-     * @param getEncoded if true then the contents will be encoded such that
-     *                   the contents will not be interpreted as XML. see
-     *                   {@link <a href="http://www.w3.org/TR/REC-xml#syntax">W3C XML 1.0 Specification</a>}
-     *                   ie. < -> &lt; & -> &amp;
-     * @param trim       if true trims prefix and suffix white space
-     * @return A string containing the value of this element, if any, otherwise null.
-     */
-    protected String getTextValue(boolean getEncoded, boolean trim) {
-        if (null != uninserted) {
-            throw new IllegalStateException("This element has not been added.");
-        }
-
-        if (paranoidConsistencyChecking) {
-            checkConsistency();
-        }
-
-        StringBuilder building = new StringBuilder();
-
-        List<charRange> ranges = new ArrayList<charRange>();
-
-        /*
-         * insert the ranges of the children in order. insertion method is ok
-         * because the number of children is usually less than 10 or so.
-         */
-        for (Enumeration<LiteXMLElement> eachChild = getChildren(); eachChild.hasMoreElements();) {
-            LiteXMLElement aChild = eachChild.nextElement();
-            charRange childsRange = new charRange(aChild.loc.startTag.start, aChild.loc.endTag.end);
-
-            // find where to insert.
-            for (int eachRange = 0; eachRange < ranges.size(); eachRange++) {
-                charRange rangeChild = ranges.get(eachRange);
-
-                if (1 == rangeChild.compareTo(childsRange)) {
-                    ranges.set(eachRange, childsRange);
-                    childsRange = rangeChild;
-                }
-            }
-            ranges.add(childsRange);
-        }
-
-        int current = loc.body.start;
-
-        // add all the text not part of some child
-        for (charRange aRange : ranges) {
-            building.append(getDocument().docContent.substring(current, aRange.start));
-
-            current = aRange.end + 1;
-        }
-
-        // Add the last bit.
-        building.append(getDocument().docContent.substring(current, loc.endTag.start));
-
-        if (!getEncoded) {
-            building = decodeEscaped(building);
-        }
-
-        // trim
-        int firstNonWhiteSpace = 0;
-        int lastNonWhiteSpace = building.length() - 1;
-
-        if (trim) {
-            while (firstNonWhiteSpace < building.length()) {
-                char possibleSpace = building.charAt(firstNonWhiteSpace);
-
-                if (!Character.isWhitespace(possibleSpace)) {
-                    break;
-                }
-
-                firstNonWhiteSpace++;
-            }
-
-            // did we find no non-whitespace?
-            if (firstNonWhiteSpace >= building.length()) {
-                return null;
-            }
-
-            while (lastNonWhiteSpace >= firstNonWhiteSpace) {
-                char possibleSpace = building.charAt(lastNonWhiteSpace);
-
-                if (!Character.isWhitespace(possibleSpace)) {
-                    break;
-                }
-
-                lastNonWhiteSpace--;
-            }
-        }
-
-        String result = building.substring(firstNonWhiteSpace, lastNonWhiteSpace + 1);
-
-        return result;
-    }
-
-    /**
-     * Write the contents of this element and optionally its children. The
-     * writing is done to a provided <code>java.io.Writer</code>. The writing
-     * can optionally be indented.
-     *
-     * @param into    The java.io.Writer that the output will be sent to.
-     * @param indent  the number of tabs which will be inserted before each
-     *                line.
-     * @param recurse if true then also print the children of this element.
-     * @throws java.io.IOException if an io error occurs
-     */
-    protected void printNice(Writer into, int indent, boolean recurse) throws IOException {
-        if (null != uninserted) {
-            throw new IllegalStateException("This element has not been added.");
-        }
-
-        if (paranoidConsistencyChecking) {
-            checkConsistency();
-        }
-
-        // print start tag
-        StringBuilder start = new StringBuilder();
-
-        if (-1 != indent) {
-            // do indent
-            for (int eachTab = 0; eachTab < indent; eachTab++) {
-                start.append('\t');
-            }
-        }
-
-        start.append(getDocument().docContent.substring(loc.startTag.start, loc.startTag.end + 1));
-
-        if (-1 != indent) {
-            start.append('\n');
-        }
-
-        into.write(start.toString());
-
-        // print the rest if this was not an empty element.
-        if (!loc.startTag.equals(loc.endTag)) {
-            String itsValue = getTextValue(true, (-1 != indent));
-
-            // print node value
-            if (null != itsValue) {
-                if (-1 != indent) {
-                    // do indent
-                    for (int eachTab = 0; eachTab < indent + 1; eachTab++) {
-                        into.write("\t");
-                    }
-                }
-
-                into.write(itsValue);
-
-                if (-1 != indent) {
-                    into.write('\n');
-                }
-            }
-
-            // recurse as needed
-            if (recurse) {
-                int childIndent;
-
-                Enumeration<LiteXMLElement> childrens = getChildren();
-
-                Attribute space = getAttribute("xml:space");
-
-                if (null != space) {
-                    if ("preserve".equals(space.getValue())) {
-                        childIndent = -1;
-                    } else {
-                        childIndent = indent + 1;
-                    }
-                } else {
-                    if (-1 != indent) {
-                        childIndent = indent + 1;
-                    } else {
-                        childIndent = -1;
-                    }
-                }
-
-                while (childrens.hasMoreElements()) {
-                    LiteXMLElement aChild = childrens.nextElement();
-
-                    aChild.printNice(into, childIndent, recurse);
-                }
-            }
-
-            // print end tag
-            StringBuilder end = new StringBuilder();
-
-            if (-1 != indent) {
-                // do indent
-                for (int eachTab = 0; eachTab < indent; eachTab++) {
-                    end.append('\t');
-                }
-            }
-
-            end.append(getDocument().docContent.substring(loc.endTag.start, loc.endTag.end + 1));
-
-            if (-1 != indent) {
-                end.append('\n');
-            }
-
-            into.write(end.toString());
-        }
-    }
-
-    /**
-     * Given a source string, an optional tag and a range with in the source
-     * find either the tag specified or the next tag.
-     * <p/>
-     * The search consists of 4 phases :
-     * 0.  If no tag was specified, determine if a tag can be found and
-     * learn its name.
-     * 1.  Search for the start of the named tag.
-     * 2.  Search for the end tag. Each time we think we have found a tag
-     * which might be the end tag we make sure it is not the end tag
-     * of another element with the same name as our tag.
-     * 3.  Calculate the position of the body of the tag given the locations
-     * of the start and end.
-     *
-     * @param source the string to search
-     * @param tag    the tag to search for in the source string. If this tag is
-     *               empty or null then we will search for the next tag.
-     * @param range  describes the range of character locations in the source
-     *               string to which the search will be limited.
-     * @return tagRange containing the ranges of the found tag.
-     */
-
-    protected tagRange getTagRanges(final StringBuilder source, String tag, final charRange range) {
-
-        // FIXME   bondolo@jxta.org 20010327    Does not handle XML comments. ie.  <!-- -->
-        if (null != uninserted) {
-            throw new IllegalStateException("This element has not been added to the document.");
-        }
-
-        tagRange result = new tagRange();
-        int start = range.start;
-        int end = source.length() - 1;
-        int current;
-        boolean foundStartTag = false;
-        boolean foundEndTag = false;
-        boolean emptyTag = (null == tag) || (0 == tag.length());
-
-        // check for bogosity
-        if ((-1 == start) || (start >= end)) {
-            throw new IllegalArgumentException("Illegal start value");
-        }
-
-        // adjust end of range
-        if ((-1 != range.end) && (end > range.end)) {
-            end = range.end;
-        }
-
-        // check for empty tag and assign empty string
-        if (null == tag) {
-            tag = "";
-        }
-
-        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-            LOG.finer("Searching for \"" + tag + "\" in range [" + start + "," + end + "]");
-        }
-
-        current = start;
-
-        // Begin Phase 0 : Search for any tag.
-
-        if (emptyTag) {
-            int foundTagText = source.indexOf("<", current);
-
-            // was it not found? if not then quit
-            if (-1 == foundTagText) {
-                if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                    LOG.finer("No Tags Found");
-                }
-                return result;
-            }
-
-            // this part is about setting the tag if necessary
-            foundTagText++;
-
-            int afterTagText = foundTagText;
-
-            while (afterTagText <= end) {
-                char inTagName = source.charAt(afterTagText);
-
-                if (!Character.isWhitespace(inTagName) && ('/' != inTagName) && ('>' != inTagName)) {
-                    afterTagText++;
-                    continue;
-                }
-
-                tag = source.substring(foundTagText, afterTagText);
-                emptyTag = (null == tag) || (0 == tag.length());
-
-                break;
-            }
-
-            // it better not be still empty
-            if (emptyTag) {
-                if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                    LOG.finer("No tag found");
-                }
-                return result;
-            }
-        }
-
-        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-            LOG.finer("Search for \"" + tag + "\" [" + start + "," + end + "]");
-        }
-
-        // Begin Phase 1: Search for the Start Tag
-
-        while (!foundStartTag && (current < end)) {
-            int foundTagText = source.indexOf(tag, current + 1); // first loc is one past current location
-            int foundTagTerminator;
-            int foundNextTagStart;
-            int afterTagText = foundTagText + tag.length();
-
-            // was it not found
-            if ((-1 == foundTagText) || (afterTagText > end)) {
-                if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                    LOG.finer("Tag \"" + tag + "\" Not Found(1)");
-                }
-                return result;
-            }
-
-            char checkChar = source.charAt(afterTagText);
-
-            // check to see if it is the start tag
-            if (('<' != source.charAt(foundTagText - 1)) || // it has the open tag delimiter before it
-                    (!Character.isWhitespace(checkChar) && ('/' != checkChar) && ('>' != checkChar))) { // is immediately followed by a delimiter
-                current = afterTagText;
-                continue;
-            }
-
-            foundTagTerminator = source.indexOf(">", afterTagText);
-            foundNextTagStart = source.indexOf("<", afterTagText + 1);
-
-            if ((-1 == foundTagTerminator) || // the tag has no terminator
-                    (foundTagTerminator > end) || // it is past the valid range
-                    ((-1 != foundNextTagStart) && // there is another tag start
-                    (foundNextTagStart < foundTagTerminator))) { // and it is before the terminator we found. very bad
-                current = afterTagText;
-                continue;
-            }
-
-            foundStartTag = true;
-            result.startTag.start = foundTagText - 1;
-            result.startTag.end = foundTagTerminator;
-        }
-
-        if (!foundStartTag) {
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer("Tag \"" + tag + "\" Not Found(2)");
-            }
-            return result;
-        }
-
-        // is this an empty element declaration?
-        if ('/' == source.charAt(result.startTag.end - 1)) {
-            // end is the start and there is no body
-            result.body = new charRange(result.startTag.start, result.startTag.end);
-            result.endTag = new charRange(result.startTag.start, result.startTag.end);
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer("Empty Element \"" + tag + "\" Start : " + result.startTag);
-            }
-            return result;
-        }
-
-        current = result.startTag.end + 1;
-
-        // if current is past the end then our end tag is not found.
-        if (current >= end) {
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer("End not found \"" + tag + "\" Start : " + result.startTag);
-            }
-            return result;
-        }
-
-        // Begin Phase 2 :  Search for the end tag
-
-        String endTag = "</" + tag + ">";
-        int searchFrom = result.startTag.end + 1;
-
-        while (!foundEndTag && (current < end) && (searchFrom < end)) {
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer("Searching for \"" + endTag + "\" in range [" + current + "," + end + "]");
-            }
-
-            int foundTagText = source.indexOf(endTag, current);
-
-            // was it not found or not in bounds?
-            if ((-1 == foundTagText) || ((foundTagText + endTag.length() - 1) > end)) {
-                break;
-            } // it was not found
-
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer(
-                        "Prospective tag pair for \"" + tag + "\" " + result.startTag + ":[" + foundTagText + ","
-                        + (foundTagText + endTag.length() - 1) + "]");
-            }
-
-            // We recurse here in order to exclude the end tags of any sub elements with the same name
-            charRange subRange = new charRange(searchFrom, foundTagText - 1);
-
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer("Recursing to search for \"" + tag + "\" in " + subRange);
-            }
-
-            tagRange subElement = getTagRanges(source, tag, subRange);
-
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer("Recursion result \"" + tag + "\" " + subElement);
-            }
-
-            // if there was an incomplete sub-tag with the same name, skip past it
-            if (subElement.startTag.isValid()) {
-                if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                    LOG.finer("Found sub-tag \"" + tag + "\" at " + subElement + " within " + subRange);
-                }
-
-                if (subElement.endTag.isValid()) {
-                    if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                        LOG.finer("Complete sub-tag \"" + tag + "\" at " + subElement + " within " + subRange);
-                    }
-                    current = subElement.endTag.end + 1;
-                    searchFrom = subElement.endTag.end + 1;
-                } else {
-                    current = foundTagText + endTag.length();
-                }
-
-                continue;
-            }
-
-            foundEndTag = true;
-            result.endTag.start = foundTagText;
-            result.endTag.end = foundTagText + endTag.length() - 1;
-
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer("Prospective tag \"" + tag + "\" " + result.endTag + " is confirmed.");
-            }
-        }
-
-        // Begin Phase 3 :  Calculate the location of the body.
-
-        result.body.start = result.startTag.end + 1;
-
-        if (foundEndTag) {
-            result.body.end = result.endTag.start - 1;
-        } else {
-            result.body.end = end;
-        }
-
-        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-            LOG.finer("Found element : \"" + tag + "\" " + result);
-        }
-
-        return result;
-    }
-
-    /**
-     * Parse a charRange and add any tags found as content as children of a
-     * specified element. This process is repeated recursivly.
-     *
-     * @param scanRange the range to be parsed for sub-tags
-     * @param addTo     the element to add any discovered children to.
-     */
-    protected void addChildTags(final charRange scanRange, LiteXMLElement addTo) {
-        if (null != uninserted) {
-            throw new IllegalStateException("This element has not been added to the document.");
-        }
-
-        int current = scanRange.start;
-
-        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-            LOG.finer("Scanning for children in range " + scanRange);
-        }
-
-        do {
-            // scan for any tag.
-            tagRange aSubtag = getTagRanges(getDocument().docContent, null, new charRange(current, scanRange.end));
-
-            // did we find one?
-            if (aSubtag.isValid()) {
-                LiteXMLElement newChild = getDocument().createElement(aSubtag);
-
-                if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                    LOG.finer(
-                            "Adding child tag \""
-                                    + getDocument().docContent.substring(aSubtag.endTag.start + 2, aSubtag.endTag.end) + "\" "
-                                    + aSubtag);
-                }
-
-                addTo.appendChild(newChild);
-
-                if (paranoidConsistencyChecking) {
-                    checkConsistency();
-                }
-
-                if (!aSubtag.startTag.equals(aSubtag.endTag)) {
-                    addChildTags(aSubtag.body, newChild); // recurse into the new tag
-                }
-
-                // all done this tag, move on
-                current = aSubtag.endTag.end + 1;
-            } else {
-                current = -1; // all done!
-            }
-        } while ((-1 != current) && (current < scanRange.end));
-
-        if (paranoidConsistencyChecking) {
-            checkConsistency();
-        }
-    }
-
-    /**
-     * For this element and all its children adjust the location of its ranges
-     * by the amount specified.
-     *
-     * @param beginningAt adjust all locations which are at or past this
-     *                    location.
-     * @param by          amount to adjust all matching locations.
-     */
-    protected void adjustLocations(final int beginningAt, final int by) {
-        if (null != uninserted) {
-            throw new IllegalStateException("This element has not been added.");
-        }
-
-        // Check that this element is not entirely to the left of the shift
-        // zone. NB: end can be < start if len is 0.
-        if (loc.endTag.end < beginningAt && loc.endTag.start < beginningAt) {
-            return;
-        }
-
-        if ((loc.startTag.end >= beginningAt)
-                || ((loc.startTag.start >= beginningAt) && ((loc.startTag.end + 1) == loc.startTag.start))) {
-            loc.startTag.end += by;
-        }
-
-        if (loc.startTag.start >= beginningAt) {
-            loc.startTag.start += by;
-        }
-
-        if ((loc.body.end >= beginningAt) || ((loc.body.start >= beginningAt) && ((loc.body.end + 1) == loc.body.start))) {
-            loc.body.end += by;
-        }
-
-        if (loc.body.start >= beginningAt) {
-            loc.body.start += by;
-        }
-
-        if ((loc.endTag.end >= beginningAt) || ((loc.endTag.start >= beginningAt) && ((loc.endTag.end + 1) == loc.endTag.start))) {
-            loc.endTag.end += by;
-        }
-
-        if (loc.endTag.start >= beginningAt) {
-            loc.endTag.start += by;
-        }
-
-        for (Enumeration<LiteXMLElement> eachChild = getChildren(); eachChild.hasMoreElements();) {
-            LiteXMLElement aChild = eachChild.nextElement();
-
-            aChild.adjustLocations(beginningAt, by);
-        }
-
-        if (paranoidConsistencyChecking) {
-            checkConsistency();
-        }
-    }
-
-    /**
-     * Given a StringBuilder find all occurrences of escaped characters which
-     * must be decoded and convert them back to their non-escaped equivalents.
-     * <p/>
-     * <p/>Also does end of line folding per: <a href="http://www.w3.org/TR/REC-xml#sec-line-ends"/>
-     *
-     * @param target The StringBuilder which will be decoded.
-     * @return The decoded version of the StringBuilder.
-     */
-    protected StringBuilder decodeEscaped(StringBuilder target) {
-
-        int current = 0;
-
-        StringBuilder result = new StringBuilder(target.length());
-
-        while (current < target.length()) {
-            // FIXME bondolo@jxta.org   20010422    Should process xml comments out here.
-
-            // fold 0x0D and 0x0D 0x0A to 0x0A
-            if ('\r' == target.charAt(current)) {
-                result.append('\n');
-                current++;
-                if ((current < target.length()) && ('\n' == target.charAt(current))) {
-                    current++;
-                }
-                continue;
-            }
-
-            if ('&' != target.charAt(current)) {
-                result.append(target.charAt(current));
-                current++;
-                continue;
-            }
-
-            int terminusAt = current + 1;
-
-            while ((terminusAt < target.length()) && // dont go past end
-                    ((terminusAt - current) < 6) && // only look 6 chars away.
-                    (';' != target.charAt(terminusAt))) { // must be a ;
-                terminusAt++;
-            }
-
-            if ((terminusAt >= target.length()) || (';' != target.charAt(terminusAt))) {
-                // if we get here then we didnt find the terminal we needed
-                // so we just leave ampersand as it was, the document is
-                // ill-formed but why make things worse?
-                result.append(target.charAt(current));
-                current++;
-                continue;
-            }
-
-            char[] sub = new char[terminusAt - current + 1];
-
-            target.getChars(current, terminusAt + 1, sub, 0);
-            String escaped = new String(sub);
-
-            if ("&amp;".equals(escaped)) {
-                result.append('&');
-                current += 4;
-            } else if ("&lt;".equals(escaped)) {
-                result.append('<');
-                current += 3;
-            } else if ("&gt;".equals(escaped)) { // for compatibility with SGML. We dont encode these
-                result.append('>');
-                current += 3;
-            } else if (escaped.startsWith("&#")) {
-                String numericChar = escaped.substring(2, escaped.length() - 1);
-
-                // is it &#; ?
-                if (numericChar.length() < 1) {
-                    result.append(target.charAt(current));
-                    current++;
-                    continue;
-                }
-
-                // is it hex numeric
-                if (numericChar.charAt(0) == 'x') {
-                    numericChar = numericChar.substring(1);
-
-                    // is it &#x; ?
-                    if (numericChar.length() < 1) {
-                        result.append(target.charAt(current));
-                        current++;
-                        continue;
-                    }
-
-                    try {
-                        char asChar = (char) Integer.parseInt(numericChar.toLowerCase(), 16);
-
-                        result.append(asChar);
-                        current += escaped.length();
-                    } catch (NumberFormatException badref) {
-                        // it was bad, we will just skip it.
-                        result.append(target.charAt(current));
-                        current++;
-                    }
-                    continue;
-                }
-
-                // its base 10
-                try {
-                    char asChar = (char) Integer.parseInt(numericChar, 10);
-
-                    result.append(asChar);
-                    current += escaped.length();
-                } catch (NumberFormatException badref) {
-                    // it was bad, we will just skip it.
-                    result.append(target.charAt(current));
-                    current++;
-                }
-                continue;
-            } else {
-                // if we get here then we didn't know what to do with the
-                // entity. so we just send it unchanged.
-                result.append(target.charAt(current));
-                current++;
-                continue;
-            }
-
-            current++;
-        }
-
-        return result;
-    }
-
-    /**
-     * Given a StringBuilder find all occurrences of characters which must be
-     * escaped and convert them to their escaped equivalents.
-     *
-     * @param target The StringBuilder which will be encoded in place.
-     */
-    protected void encodeEscaped(StringBuilder target) {
-
-        int current = 0;
-
-        while (current < target.length()) {
-            if ('&' == target.charAt(current)) {
-                target.insert(current + 1, "amp;");
-                current += 5;
-            } else if ('<' == target.charAt(current)) {
-                target.setCharAt(current, '&');
-                target.insert(current + 1, "lt;");
-                current += 4;
-            } else {
-                current++;
-            }
-        }
-    }
-
-    /**
-     * Returns an enumerations of the attributes associated with this object.
-     * Each element is of type Attribute.
-     *
-     * @return Enumeration the attributes associated with this object.
-     */
-    public Enumeration<Attribute> getAttributes() {
-        List<Attribute> results = new ArrayList<Attribute>();
-
-        if (null != uninserted) {
-            throw new IllegalStateException("This element has not been added.");
-        }
-
-        if (paranoidConsistencyChecking) {
-            checkConsistency();
-        }
-
-        // find the start of the first attribute
-        int current = loc.startTag.start + 1;
-
-        while (current <= loc.startTag.end) {
-            char inTagName = getDocument().docContent.charAt(current);
-
-            if (Character.isWhitespace(inTagName) || ('/' == inTagName) || ('>' == inTagName)) {
-                break;
-            }
-            current++;
-        }
-
-        // loop and add attributes to the vector
-        while (current < loc.startTag.end) {
-            tagRange nextAttr = getAttributeLoc(null, new charRange(current, loc.startTag.end));
-
-            if (!nextAttr.isValid()) {
-                break;
-            }
-
-            results.add(
-                    new Attribute(this, getDocument().docContent.substring(nextAttr.startTag.start, nextAttr.startTag.end + 1)
-                    ,
-                    getDocument().docContent.substring(nextAttr.body.start, nextAttr.body.end + 1)));
-
-            current = nextAttr.endTag.end + 1;
-        }
-
-        return Collections.enumeration(results);
-    }
-
-    /**
-     * Returns the tagRange of the next attribute contained in the range
-     * provided. The tag range returned consists of the startTag indicating
-     * the location of the name, body indicating the location of the value and
-     * endTag indicating the location of the final quote delimiter.
-     *
-     * @param name    Name to match. null means match any name.
-     * @param inRange the limits of the locations to scan.
-     * @return tagRange containing the location of the next attribute
-     */
-    protected tagRange getAttributeLoc(String name, charRange inRange) {
-        tagRange result = new tagRange();
-        int current = inRange.start;
-
-        do {
-            // skip the whitespace
-
-            while (current <= inRange.end) {
-                char inTagName = getDocument().docContent.charAt(current);
-
-                if (!Character.isWhitespace(inTagName) && ('/' != inTagName) && ('>' != inTagName)) {
-                    break;
-                }
-                current++;
-            }
-
-            int equalsAt = getDocument().docContent.indexOf("=", current);
-
-            // make sure there is an equals
-            if ((-1 == equalsAt) || (equalsAt >= inRange.end)) {
-                return result;
-            }
-
-            // get the name
-            result.startTag.start = current;
-            result.startTag.end = equalsAt - 1;
-
-            // get the quote char we must match
-            String requiredQuote = getDocument().docContent.substring(equalsAt + 1, equalsAt + 2);
-
-            // make sure its a valid quote
-            if (('\'' != requiredQuote.charAt(0)) && ('\"' != requiredQuote.charAt(0))) {
-                return result;
-            }
-
-            // find the next occurance of this quote
-            int nextQuote = getDocument().docContent.indexOf(requiredQuote, equalsAt + 2);
-
-            // make sure the quote is in a good spot.
-            if ((-1 == nextQuote) || (nextQuote >= inRange.end)) {
-                return result;
-            }
-
-            result.body.start = equalsAt + 2;
-            result.body.end = nextQuote - 1;
-
-            result.endTag.start = nextQuote;
-            result.endTag.end = nextQuote;
-
-            // check if the name matches.
-            if ((null != name) && !name.equals(getDocument().docContent.substring(result.startTag.start, result.startTag.end + 1))) {
-                result.startTag.start = -1;
-            }
-
-            current = nextQuote + 1;
-        } while ((current < inRange.end) && (!result.isValid()));
-
-        return result;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public String addAttribute(String name, String value) {
-        if (null != uninserted) {
-            throw new IllegalStateException("This element has not been added.");
-        }
-
-        if (null == name) {
-            throw new IllegalArgumentException("name must not be null");
-        }
-
-        if (null == value) {
-            throw new IllegalArgumentException("value must not be null");
-        }
-
-        for (int eachChar = name.length() - 1; eachChar >= 0; eachChar--) {
-            if (Character.isWhitespace(name.charAt(eachChar))) {
-                throw new IllegalArgumentException("Attribute names may not contain spaces.");
-            }
-        }
-
-        if (paranoidConsistencyChecking) {
-            checkConsistency();
-        }
-
-        // skip past the name portion
-        int current = loc.startTag.start + 1;
-
-        while (current <= loc.startTag.end) {
-            char inTagName = getDocument().docContent.charAt(current);
-
-            if (Character.isWhitespace(inTagName) || ('/' == inTagName) || ('>' == inTagName)) {
-                break;
-            }
-
-            current++;
-        }
-
-        // find out if there was a previous value for this name
-        String oldValue = null;
-        tagRange oldAttr = getAttributeLoc(name, new charRange(current, loc.startTag.end));
-
-        // choose which kind of quote to use
-        char usingQuote = (-1 != value.indexOf('"')) ? '\'' : '\"';
-
-        // make sure we can use it.
-        if (('\'' == usingQuote) && (-1 != value.indexOf('\''))) {
-            throw new IllegalArgumentException("Value contains both \" and \'");
-        }
-
-        // build the new attribute string
-        StringBuilder newStuff = new StringBuilder(" ");
-
-        newStuff.append(name);
-        newStuff.append("=");
-        newStuff.append(usingQuote);
-        newStuff.append(value);
-        newStuff.append(usingQuote);
-
-        // add it in.
-        if (!oldAttr.isValid()) {
-            // we aren't replacing an existing value
-            getDocument().docContent.insert(current, newStuff.toString());
-
-            // move all doc locations which follow this one based on how much we
-            // inserted.
-            getDocument().adjustLocations(current, newStuff.length());
-        } else {
-            // we are replacing an existing value
-            oldValue = getDocument().docContent.substring(oldAttr.body.start, oldAttr.body.end + 1);
-
-            getDocument().docContent.delete(oldAttr.body.start, oldAttr.body.end + 1);
-            getDocument().docContent.insert(oldAttr.body.start, value);
-
-            int delta = value.length() - (oldAttr.body.end - oldAttr.body.start + 1);
-
-            // move all doc locations which follow this one based on how much we
-            // inserted or deleted.
-            getDocument().adjustLocations(loc.startTag.start + 1, delta);
-        }
-
-        if (paranoidConsistencyChecking) {
-            checkConsistency();
-        }
-
-        return oldValue;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public String addAttribute(Attribute newAttrib) {
-        return addAttribute(newAttrib.getName(), newAttrib.getValue());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Attribute getAttribute(String name) {
-        if (null != uninserted) {
-            throw new IllegalStateException("This element has not been added.");
-        }
-
-        if (paranoidConsistencyChecking) {
-            checkConsistency();
-        }
-
-        // skip past the name portion
-        int current = loc.startTag.start + 1;
-
-        while (current <= loc.startTag.end) {
-            char inTagName = getDocument().docContent.charAt(current);
-
-            if (Character.isWhitespace(inTagName) || ('/' == inTagName) || ('>' == inTagName)) {
-                break;
-            }
-
-            current++;
-        }
-
-        // find the attribute matching this name
-        tagRange attr = getAttributeLoc(name, new charRange(current, loc.startTag.end));
-
-        if (!attr.isValid()) {
-            return null;
-        }
-
-        // build the object
-        return new Attribute(this, getDocument().docContent.substring(attr.startTag.start, attr.startTag.end + 1)
-                ,
-                getDocument().docContent.substring(attr.body.start, attr.body.end + 1));
-    }
-
-    protected boolean checkConsistency() {
-        assert loc.isValid();
-
-        charRange elementRange = new charRange(loc.startTag.start, loc.endTag.end);
-
-        assert elementRange.contains(loc.startTag);
-        assert elementRange.contains(loc.body);
-        assert elementRange.contains(loc.endTag);
-
-        if (null != children) {
-            Iterator<LiteXMLElement> eachChild = children.iterator();
-            Iterator<LiteXMLElement> nextChilds = children.iterator();
-
-            if (nextChilds.hasNext()) {
-                nextChilds.next();
-            }
-
-            while (eachChild.hasNext()) {
-                LiteXMLElement aChild = eachChild.next();
-
-                assert loc.contains(aChild.loc);
-
-                if (nextChilds.hasNext()) {
-                    LiteXMLElement nextChild = nextChilds.next();
-
-                    assert aChild.loc.compareTo(nextChild.loc) < 0;
-                } else {
-                    assert !eachChild.hasNext();
-                }
-
-                aChild.checkConsistency();
-            }
-        }
-        return true;
-    }
-
-    /**
-     * The document we are a part of.
-     *
-     * @return The document we are a part of.
-     */
-    LiteXMLDocument getDocument() {
-        return doc;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/document/PlainTextDocument.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/document/PlainTextDocument.java
deleted file mode 100644 (file)
index 4dc0f94..0000000
+++ /dev/null
@@ -1,293 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.document;
-
-
-import java.io.BufferedWriter;
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Reader;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.io.Writer;
-
-import java.io.IOException;
-import java.security.ProviderException;
-
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredTextDocument;
-import net.jxta.document.TextElement;
-import net.jxta.document.TextDocument;
-
-
-/**
- * This class is an implementation of the StructuredDocument interface using
- * simple text
- */
-public class PlainTextDocument extends PlainTextElement implements StructuredTextDocument<PlainTextElement> {
-
-    private final static class Instantiator implements StructuredDocumentFactory.TextInstantiator {
-
-        /**
-         * The MIME Media Types which this <CODE>StructuredDocument</CODE> is
-         * capable of emitting.
-         */
-        private static final MimeMediaType[] myTypes = {
-            MimeMediaType.TEXT_DEFAULTENCODING
-        };
-
-        // these are the file extensions which are likely to contain files of
-        // the type i like.
-        private static final ExtensionMapping[] myExtensions = {
-            new ExtensionMapping("txt", myTypes[0]), new ExtensionMapping("text", myTypes[0]), new ExtensionMapping("txt", null) };
-
-        /**
-         * Creates new PlainTextDocument
-         */
-        public Instantiator() {}
-
-        /**
-         * {@inheritDoc}
-         */
-        public MimeMediaType[] getSupportedMimeTypes() {
-            return (myTypes);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public ExtensionMapping[] getSupportedFileExtensions() {
-            return (myExtensions);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public StructuredDocument newInstance(MimeMediaType mimeType, String doctype) {
-            return new PlainTextDocument(mimeType, doctype);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public StructuredDocument newInstance(MimeMediaType mimeType, String doctype, String value) {
-            return new PlainTextDocument(mimeType, doctype, value);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public StructuredDocument newInstance(MimeMediaType mimeType, InputStream source) throws IOException {
-            throw new ProviderException("PlainTextDocument does not support input");
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public StructuredDocument newInstance(MimeMediaType mimeType, Reader source) throws IOException {
-            throw new ProviderException("PlainTextDocument does not support input");
-        }
-
-    }
-
-    public static final StructuredDocumentFactory.TextInstantiator INSTANTIATOR = new Instantiator();
-
-    private MimeMediaType mimeType = null;
-
-    /**
-     * Creates new PlainTextDocument
-     */
-    public PlainTextDocument(final MimeMediaType mimeType, String type) {
-        super(null, type);
-        doc = this;
-        parent = this;
-
-        this.mimeType = mimeType;
-    }
-
-    /**
-     * Creates new PlainTextDocument with a value for the root element
-     */
-    public PlainTextDocument(final MimeMediaType mimeType, final String type, final String value) {
-        super(null, type, value);
-        doc = this;
-        parent = this;
-
-        this.mimeType = mimeType;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String toString() {
-        StringWriter stringOut = new StringWriter();
-
-        try {
-            printNice(stringOut, 0, true);
-            stringOut.close();
-        } catch (IOException caught) {
-            return null;
-        }
-
-        return stringOut.toString();
-    }
-
-    /**
-     * get Type
-     */
-    public MimeMediaType getMimeType() {
-        return mimeType;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getFileExtension() {
-        return TextDocumentCommon.Utils.getExtensionForMime(INSTANTIATOR.getSupportedFileExtensions(), getMimeType());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PlainTextElement createElement(Object key) {
-        return createElement(key, null);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PlainTextElement createElement(Object key, Object val) {
-        if (!String.class.isAssignableFrom(key.getClass())) {
-            throw new ClassCastException(key.getClass().getName() + " not supported by createElement.");
-        }
-
-        if ((null != val) && !String.class.isAssignableFrom(val.getClass())) {
-            throw new ClassCastException(val.getClass().getName() + " not supported by createElement.");
-        }
-
-        return new PlainTextElement(this, (String) key, (String) val);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PlainTextElement createElement(String name) {
-        return new PlainTextElement(this, name);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PlainTextElement createElement(String name, String val) {
-        return new PlainTextElement(this, name, val);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public InputStream getStream() throws IOException {
-        // XXX  bondolo@jxta.org 20010307    Should be using a pipe
-        String charset = mimeType.getParameter("charset");
-
-        if (charset == null) {
-            return new ByteArrayInputStream(toString().getBytes());
-        } else {
-            return new ByteArrayInputStream(toString().getBytes(charset));
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void sendToStream(OutputStream stream) throws IOException {
-        String charset = mimeType.getParameter("charset");
-
-        Writer osw;
-
-        if (charset == null) {
-            osw = new OutputStreamWriter(stream);
-        } else {
-            osw = new OutputStreamWriter(stream, charset);
-        }
-
-        Writer out = new BufferedWriter(osw);
-
-        sendToWriter(out);
-        out.flush();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Reader getReader() {
-        // XXX  bondolo@jxta.org 20010307    Should be using a pipe
-
-        return new StringReader(toString());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void sendToWriter(Writer stream) throws IOException {
-        printNice(stream, 0, true);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/document/PlainTextElement.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/document/PlainTextElement.java
deleted file mode 100644 (file)
index af632e9..0000000
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.document;
-
-
-import java.io.Writer;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Vector;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import java.io.IOException;
-
-import net.jxta.document.Element;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredTextDocument;
-import net.jxta.document.TextElement;
-
-import net.jxta.document.Attributable;
-import net.jxta.document.Attribute;
-
-
-/**
- * This class is an implementation of the StructuredDocument interface using
- * simple text
- */
-public class PlainTextElement implements TextElement<PlainTextElement>, Attributable {
-    protected PlainTextDocument doc;
-
-    protected PlainTextElement parent;
-
-    protected final String name;
-
-    protected final String val;
-
-    private List children = new Vector();
-
-    private Map attributes = new HashMap();
-
-    /**
-     * Creates new PlainTextElement
-     */
-    protected PlainTextElement(PlainTextDocument doc, String name) {
-        this(doc, name, null);
-    }
-
-    /**
-     * Creates new PlainTextElement
-     */
-    protected PlainTextElement(PlainTextDocument doc, String name, String val) {
-        this.doc = doc;
-        this.name = name;
-        this.val = val;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object element) {
-        if (this == element) {
-            return true;
-        }
-
-        if (!(element instanceof PlainTextElement)) {
-            return false;
-        }
-
-        PlainTextElement textElement = (PlainTextElement) element;
-
-        if (doc != textElement.doc) {
-            return false;
-        }
-
-        if (!getName().equals(textElement.getName())) {
-            return false;
-        }
-
-        String val1 = getTextValue();
-        String val2 = textElement.getTextValue();
-
-        if ((null == val1) && (null == val2)) {
-            return true;
-        }
-
-        if ((null == val1) || (null == val2)) {
-            return false;
-        }
-
-        return val1.equals(val2);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public StructuredTextDocument getRoot() {
-        return (StructuredTextDocument) doc;
-    }
-
-    /**
-     * Get the name associated with an element.
-     *
-     * @return A string containing the key of this element.
-     */
-    public String getKey() {
-        return getName();
-    }
-
-    /**
-     * Get the value (if any) associated with an element.
-     *
-     * @return A string containing the value of this element, if any, otherwise null.
-     */
-    public String getValue() {
-        return getTextValue();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PlainTextElement getParent() {
-        return parent;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Enumeration getChildren() {
-        return Collections.enumeration(children);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getTextValue() {
-        return val;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void appendChild(PlainTextElement element) {
-        if (element.doc != this.doc) {
-            throw new IllegalArgumentException("Wrong Document");
-        }
-
-        element.parent = this;
-        children.add(element);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Enumeration<PlainTextElement> getChildren(Object key) {
-        if (key instanceof String)
-            return getChildren((String) key);
-        else
-            throw new ClassCastException(key.getClass().getName() + " not supported by getChildren.");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Enumeration<PlainTextElement> getChildren(String name) {
-        List result = new ArrayList();
-
-        for (Iterator eachChild = children.iterator(); eachChild.hasNext();) {
-            TextElement aChild = (TextElement) eachChild.next();
-
-            if (name.equals(aChild.getName())) {
-                result.add(aChild);
-            }
-        }
-
-        return Collections.enumeration(result);
-    }
-
-    /**
-     * Write the contents of this element and optionally its children. The
-     * writing is done to a provided java.io.Writer. The writing can optionally
-     * be indented
-     *
-     * @param into    The java.io.Writer that the output will be sent to.
-     * @param indent  the number of tabs which will be inserted before each
-     *                line.
-     * @param recurse if true then also print the children of this element.
-     */
-    protected void printNice(Writer into, int indent, boolean recurse) throws IOException {
-
-        // do indent
-        for (int eachTab = 0; eachTab < indent; eachTab++) {
-            into.write("\t");
-        }
-
-        // print node name
-        into.write(name);
-
-        // print attributes
-        Enumeration attributes = getAttributes();
-
-        if (attributes.hasMoreElements()) {
-            into.write(" ( ");
-
-            while (attributes.hasMoreElements()) {
-                Attribute anAttr = (Attribute) attributes.nextElement();
-
-                into.write(anAttr.getName() + "=\"" + anAttr.getValue() + "\" ");
-            }
-            into.write(")");
-        }
-
-        into.write(" : ");
-        // print node value
-        if (null != val) {
-            into.write(val + "\n");
-        } else {
-            into.write("\n");
-        }
-
-        // recurse as needed
-        if (recurse) {
-            for (Enumeration childrens = getChildren(); childrens.hasMoreElements();) {
-                ((PlainTextElement) childrens.nextElement()).printNice(into, indent + 1, recurse);
-            }
-        }
-    }
-
-    // Attributable methods
-
-    /**
-     * {@inheritDoc}
-     */
-    public String addAttribute(String name, String value) {
-
-        String oldAttrValue = (String) attributes.remove(name);
-
-        attributes.put(name, value);
-
-        return oldAttrValue;
-    }
-
-    /**
-     * Adds an attribute with the given name and value. Some implementations
-     * may support only a single value for each distinct name. Others may
-     * support multiple values for each name. If the value being provided
-     * replaces some other value then that value is returned otherwise null
-     * is returned.
-     *
-     * @param newAttrib new attribute.
-     * @return String  containing previous value for this name if the value
-     *         is being replaced otherwise null.
-     */
-    public String addAttribute(Attribute newAttrib) {
-        return addAttribute(newAttrib.getName(), newAttrib.getValue());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Enumeration getAttributes() {
-
-        Vector attrs = new Vector();
-
-        for (Iterator eachAttr = attributes.entrySet().iterator(); eachAttr.hasNext();) {
-            Map.Entry anAttr = (Map.Entry) eachAttr.next();
-
-            Attribute attr = new Attribute(this, (String) anAttr.getKey(), (String) anAttr.getValue());
-
-            attrs.addElement(attr);
-        }
-
-        return attrs.elements();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Attribute getAttribute(String name) {
-        String value = (String) attributes.get(name);
-
-        if (null == value) {
-            return null;
-        }
-
-        // build the object
-        return new Attribute(this, name, value);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/document/TextDocumentCommon.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/document/TextDocumentCommon.java
deleted file mode 100644 (file)
index 915de2e..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.document;
-
-
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredTextDocument;
-
-
-/**
- * Empty interface we use a container for utils
- */
-interface TextDocumentCommon  {
-
-    /**
-     * static utility methods.
-     */
-    static class Utils {
-
-        static String getExtensionForMime(StructuredDocumentFactory.Instantiator.ExtensionMapping[] mappings, MimeMediaType mimeType) {
-            MimeMediaType cleanMime = new MimeMediaType(mimeType.getMimeMediaType());
-            String result = "???";
-
-            for (int eachMapping = 0; eachMapping < mappings.length; eachMapping++) {
-                // assign the extension as the result if this is the default
-                if (null == mappings[eachMapping].getMimeMediaType()) {
-                    result = mappings[eachMapping].getExtension();
-                }
-
-                if (mappings[eachMapping].getMimeMediaType().equals(cleanMime)) {
-                    result = mappings[eachMapping].getExtension();
-                    break;
-                }
-            }
-
-            return result;
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/BlockingMessenger.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/BlockingMessenger.java
deleted file mode 100644 (file)
index a1daaf1..0000000
+++ /dev/null
@@ -1,881 +0,0 @@
-/*
- * Copyright (c) 2004-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.endpoint;
-
-import java.util.Timer;
-import java.util.TimerTask;
-
-import java.io.IOException;
-import java.io.InterruptedIOException;
-
-import java.util.logging.Level;
-
-import net.jxta.logging.Logging;
-
-import java.util.logging.Logger;
-
-import net.jxta.endpoint.AbstractMessenger;
-import net.jxta.endpoint.ChannelMessenger;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.Messenger;
-import net.jxta.endpoint.MessengerState;
-import net.jxta.endpoint.OutgoingMessageEvent;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.util.SimpleSelectable;
-
-import net.jxta.impl.util.TimeUtils;
-
-/**
- * This class is a near-drop-in replacement for the previous BlockingMessenger class.
- * To subclassers (that is, currently, transports) the only difference is that some
- * overloaded methods have a different name (class hierarchy reasons made it impossible
- * to preserve the names without forcing an API change for applications).
- *
- * The other difference which is not API visible, is that it implements the
- * standard MessengerState behaviour and semantics required by the changes in the endpoint framework.
- *
- * This the only base messenger class meant to be extended by outside code that is in the impl tree. The
- * reason being that what it replaces was there already and that new code should not become dependant upon it.
- */
-public abstract class BlockingMessenger extends AbstractMessenger {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(BlockingMessenger.class.getName());
-
-    /**
-     * The self destruct timer.
-     * <p/>
-     * When a messenger has become idle, it is closed. As a side effect, it
-     * makes the owning canonical messenger, if any, subject to removal if it is
-     * otherwise unreferenced.
-     */
-    private final static transient Timer timer = new Timer("BlockingMessenger self destruct timer", true);
-
-    /*
-     * Actions that we defer to after returning from event methods. In other 
-     * words, they cannot be done with the lock held, or they require calling 
-     * more event methods.  Because this messenger can take only one message at 
-     * a time (saturated while sending), actions do not cascade much. Start can 
-     * lead to connect if the sending fails, but, because we always fail to
-     * connect, connect will not lead to start. As a result we can get away with 
-     * performing deferred actions recursively. That simplifies the code.
-     */
-    private enum DeferredAction {
-        /**
-         * No deferred action.
-         */
-        ACTION_NONE,
-
-        /**
-         * Must send message.
-         */
-        ACTION_SEND,
-
-        /**
-         * Must report failure to connect.
-         */
-        ACTION_CONNECT
-    }
-
-    /**
-     * The outstanding message.
-     */
-    private Message currentMessage = null;
-
-    /**
-     * The serviceName override for that message.
-     */
-    private String currentService = null;
-
-    /**
-     * The serviceParam override for that message.
-     */
-    private String currentParam = null;
-
-    /**
-     * The exception that caused that message to not be sent.
-     */
-    private Throwable currentThrowable = null;
-
-    /**
-     * true if we have deliberately closed our one message input queue.
-     */
-    private boolean inputClosed = false;
-
-    /**
-     * Need to know which group this transport lives in, so that we can suppress
-     * channel redirection when in the same group. This is currently the norm.
-     */
-    private final PeerGroupID homeGroupID;
-
-    /**
-     * The current deferred action.
-     */
-    private DeferredAction deferredAction = DeferredAction.ACTION_NONE;
-
-    /**
-     * Reference to owning object. This is there so that the owning object is not subject to garbage collection
-     * unless this object here becomes itself unreferenced. That happens when the self destruct timer closed it.
-     */
-    private Object owner = null;
-
-    /**
-     * The timer task watching over our self destruction requirement.
-     */
-    private final TimerTask selfDestructTask;
-
-    /**
-     * State lock and engine.
-     */
-    private final BlockingMessengerState stateMachine = new BlockingMessengerState();
-
-    /**
-     * legacy artefact: transports need to believe the messenger is not yet closed in order to actually close it.
-     * So we lie to them just while we run their closeImpl method so that they do not see that the messenger is
-     * officially closed.
-     */
-    private boolean lieToOldTransports = false;
-
-    /**
-     * Our statemachine implementation; just connects the standard AbstractMessengerState action methods to
-     * this object.
-     */
-    private class BlockingMessengerState extends MessengerState {
-
-        protected BlockingMessengerState() {
-            super(true);
-        }
-
-        /*
-         * The required action methods.
-         */
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        protected void connectAction() {
-            deferredAction = DeferredAction.ACTION_CONNECT;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        protected void startAction() {
-            deferredAction = DeferredAction.ACTION_SEND;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        protected void closeInputAction() {
-            // we're synchonized here. (invoked from stateMachine).
-            inputClosed = true;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        protected void closeOutputAction() {
-            // This will break the cnx; thereby causing a down event if we have a send in progress.
-            // If the cnx does not break before the current message is sent, then the message will be sent successfully,
-            // resulting in an idle event. Either of these events is enough to complete the shutdown process.
-            lieToOldTransports = true;
-            closeImpl();
-            lieToOldTransports = false;
-
-            // Disconnect from the timer.
-            if (selfDestructTask != null) {
-                selfDestructTask.cancel();
-            }
-        }
-
-        // This is a synchronous action. No synchronization needed: we're already synchronized, here.
-        // There's a subtlety here: we do not clear the current message. We let sendMessageB or sendMessageN
-        // deal with it, so that they can handle the status reporting each in their own way. So basically, all we
-        // do is to set a reason for that message to fail in case we are shutdown from the outside and that message
-        // is not sent yet. As long as there is a current message, it is guaranteed that there is a thread
-        // in charge of reporting its status. It is also guaranteed that when failAll is called, the input is
-        // already closed, and so, we have no obligation of making room for future messages immediately.
-        // All this aggravation is so that we do not have to create one context wrapper for each message just so
-        // that we can associate it with its result. Instead we use our single msg and single status model
-        // throughout.
-        @Override
-        protected void failAllAction() {
-
-            if (currentMessage == null) {
-                return;
-            }
-
-            if (currentThrowable == null) {
-                currentThrowable = new IOException("Messenger unexpectedly closed");
-            }
-        }
-    }
-
-
-    /**
-     * The implementation of channel messenger that getChannelMessenger returns:
-     * All it does is address rewriting. Even close() is forwarded to the shared messenger.
-     * The reason is that BlockingMessengers are not really shared; they're transitional
-     * entities used directly by CanonicalMessenger. GetChannel is used only to provide address
-     * rewriting when we pass a blocking messenger directly to incoming messenger listeners...this
-     * practice is to be removed in the future, in favor of making incoming messengers full-featured
-     * async messengers that can be shared.
-     */
-    private final class BlockingMessengerChannel extends ChannelMessenger {
-
-        public BlockingMessengerChannel(EndpointAddress baseAddress, PeerGroupID redirection, String origService, String origServiceParam) {
-
-            super(baseAddress, redirection, origService, origServiceParam);
-
-            // We tell our super class that we synchronize on the stateMachine object. Althoug it is not obvious, our getState()
-            // method calls the shared messenger getState() method, which synchronizes on the shared messenger's state machine
-            // object. So, that's what we must specify.  Logic would dictate that we pass it to super(), but it is not itself
-            // constructed until super() returns. No way around it.
-
-            setStateLock(stateMachine);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public int getState() {
-            return BlockingMessenger.this.getState();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public void resolve() {
-            BlockingMessenger.this.resolve();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public void close() {
-            BlockingMessenger.this.close();
-        }
-
-        /**
-         * {@inheritDoc}
-         *
-         * <p/>
-         * Address rewriting done here.
-         */
-        public boolean sendMessageN(Message msg, String service, String serviceParam) {
-            return BlockingMessenger.this.sendMessageN(msg, effectiveService(service), effectiveParam(service, serviceParam));
-        }
-
-        /**
-         * {@inheritDoc}
-         *
-         * <p/>
-         * Address rewriting done here.
-         */
-        public void sendMessageB(Message msg, String service, String serviceParam) throws IOException {
-            BlockingMessenger.this.sendMessageB(msg, effectiveService(service), effectiveParam(service, serviceParam));
-        }
-
-        /**
-         * {@inheritDoc}
-         *
-         * <p/>
-         * We're supposed to return the complete destination, including
-         * service and param specific to that channel. It is not clear, whether
-         * this should include the cross-group mangling, though. For now, let's
-         * say it does not.
-         */
-        public EndpointAddress getLogicalDestinationAddress() {
-            EndpointAddress rawLogical = getLogicalDestinationImpl();
-
-            if (rawLogical == null) {
-                return null;
-            }
-            return new EndpointAddress(rawLogical, origService, origServiceParam);
-        }
-
-        // Check if it is worth staying registered
-        public void itemChanged(Object changedObject) {
-
-            if (!notifyChange()) {
-                if (haveListeners()) {
-                    return;
-                }
-
-                BlockingMessenger.this.unregisterListener(this);
-
-                if (!haveListeners()) {
-                    return;
-                }
-
-                // Ooops collision. We should not have unregistered. Next time, then. In case of collision, the end result
-                // is always to stay registered. There's no harm in staying registered.
-                BlockingMessenger.this.registerListener(this);
-            }
-        }
-
-        /**
-         * {@inheritDoc}
-         * <p/>
-         * Always make sure we're registered with the shared messenger.
-         */
-        @Override
-        protected void registerListener(SimpleSelectable l) {
-            BlockingMessenger.this.registerListener(this);
-            super.registerListener(l);
-        }
-    }
-
-    private void storeCurrent(Message msg, String service, String param) {
-        currentMessage = msg;
-        currentService = service;
-        currentParam = param;
-        currentThrowable = null;
-    }
-
-    /**
-     * Constructor.
-     * <p/>
-     * We start in the CONNECTED state, we pretend to have a queue of size 1, and we can never re-connect.  Although this
-     * messenger fully respects the asynchronous semantics, it is saturated as soon as one msg is being send, and if not
-     * saturated, send is actually performed by the invoker thread. So return is not completely immediate.  This is a barely
-     * acceptable implementation, but this is also a transition adapter that is bound to disappear one release from now. The main
-     * goal is to get things going until transports are adapted.
-     *
-     * @param homeGroupID  the group that this messenger works for. This is the group of the endpoint service or transport
-     *                     that created this messenger.
-     * @param dest         where messages should be addressed to
-     * @param selfDestruct true if this messenger must self close destruct when idle. <b>Warning:</b> If selfDestruct is used,
-     *                     this messenger will remained referenced for as long as isIdleImpl returns false.
-     */
-
-    public BlockingMessenger(PeerGroupID homeGroupID, EndpointAddress dest, boolean selfDestruct) {
-
-        super(dest);
-
-        this.homeGroupID = homeGroupID;
-
-        // We tell our superclass that we synchronize our state on the stateMachine object.  Logic would dictate that we pass it
-        // to super(), but it is not itself constructed until super() returns. No way around it.
-
-        setStateLock(stateMachine);
-
-        /*
-         * Sets up a timer task that will close this messenger if it says to have become idle. It will keep it referenced
-         * until then.
-         * <p/>
-         * As long as this timer task is scheduled, this messenger is not subject to GC. Therefore, its owner, if any, which is strongly
-         * referenced, is not subject to GC either. This avoids prematurely closing open connections just because a destination is
-         * not currently in use, which we would have to do if CanonicalMessengers could be GCed independantly (and which would
-         * force us to use finalizers, too).<p/>
-         *
-         * Such a mechanism is usefull only if this blocking messenger is expensive to make or holds system resources that require
-         * an explicit invocation of the close method. Else, it is better to let it be GC'ed along with any refering canonical
-         * messenger when memory is tight.<p/>
-         *
-         */
-
-        //
-        // FIXME 20040413 jice : we trust transports to implement isIdle reasonably, which may be a leap of faith. We
-        // should probably superimpose a time limit of our own.
-        //
-        if (selfDestruct) {
-            selfDestructTask = new TimerTask() {
-
-                /**
-                 * {@inheritDoc}
-                 */
-                @Override
-                public void run() {
-                    try {
-                        if (isIdleImpl()) {
-                            close();
-                        } else {
-                            return;
-                        }
-                    } catch (Throwable uncaught) {
-                        if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                            LOG.log(Level.SEVERE, "Uncaught Throwable in selfDescructTask. ", uncaught);
-                        }
-                    }
-                    cancel();
-                }
-            };
-
-            timer.schedule(selfDestructTask, TimeUtils.AMINUTE, TimeUtils.AMINUTE);
-        } else {
-            selfDestructTask = null;
-        }
-    }
-
-    /**
-     * Sets an owner for this blocking messenger. Owners are normally canonical messengers. The goal of registering the owner is
-     * to keep that owner reachable as long as this blocking messenger is.  Canonical messengers are otherwise softly referenced,
-     * and so, may be deleted whenever memory is tight.
-     * <p/>
-     * We do not want to use finalizers or the equivalent reference queue mechanism; so we have no idea when a blocking messenger
-     * is no-longer referenced by any canonical. In addition it may be expensive to make and so we want to keep it for a while
-     * anyway. As a result, instead of keeping a blocking messenger open as long as there is a canonical, we do the opposite: we
-     * keep the canonical (owner, here) as long as the blocking messenger is open (and usually beyond, memory allowing). How long
-     * a blocking messenger will stay around depends upon that messenger's implementation. That may even be left up to the GC, in
-     * the end (if close is not needed AND the messenger is cheap to make). In that case, the owner is likely the only referrer,
-     * and so both will have the same lifetime.
-     *
-     * @param owner The object that should be kept referenced at least as long as this one.
-     */
-    public void setOwner(Object owner) {
-        this.owner = owner;
-    }
-
-    /**
-     * Assemble a destination address for a message based upon the messenger
-     * default destination address and the optional provided overrides.
-     *
-     * @param service The destination service or {@code null} to use default.
-     * @param serviceParam The destination service parameter or {@code null} to 
-     * use default.
-     */
-    protected EndpointAddress getDestAddressToUse(String service, String serviceParam) {
-        EndpointAddress defaultAddress = getDestinationAddress();
-        EndpointAddress result;
-        
-        if(null == service) {
-            if(null == serviceParam) {
-                // Use default service name and service params
-                result = defaultAddress;
-            } else {
-                // use default service name, override service params
-                result = new EndpointAddress(defaultAddress, defaultAddress.getServiceName(), serviceParam);
-            }
-        } else {
-            if(null == serviceParam) {
-                // override service name, use default service params (this one is pretty weird and probably not useful)
-                result = new EndpointAddress(defaultAddress, service, defaultAddress.getServiceParameter());
-            } else {
-                // override service name, override service params
-                result = new EndpointAddress(defaultAddress, service, serviceParam);
-            }
-        }
-        
-        return result;
-    }
-
-    /**
-     * A transport may call this to cause an orderly closure of its messengers.
-     */
-    protected final void shutdown() {
-        DeferredAction action;
-
-        synchronized (stateMachine) {
-            stateMachine.shutdownEvent();
-            action = eventCalled();
-        }
-
-        // We called an event. State may have changed.
-        notifyChange();
-
-        performDeferredAction(action);
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * We overload isClosed because many messengers still use super.isClosed()
-     * as part of their own implementation or don't override it at all. They
-     * expect it to be true only when all is shutdown; not while we're closing
-     * gently.
-     *
-     * FIXME - jice@jxta.org 20040413: transports should get a deeper retrofit eventually.
-     */
-    @Override
-    public boolean isClosed() {
-        return (!lieToOldTransports) && super.isClosed();
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * getLogicalDestinationAddress() requires resolution (it's the address advertised by the other end).
-     * For a blocking messenger it's easy. We're born resolved. So, just ask the implementor what it is.
-     */
-    public final EndpointAddress getLogicalDestinationAddress() {
-        return getLogicalDestinationImpl();
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * <p/> Some transports historically overload the close method of BlockingMessenger.
-     * The final is there to make sure we know about it. However, there should be no
-     * harm done if the unchanged code is renamed to closeImpl; even if it calls super.close().
-     * The real problem, however, is transports calling close (was their own, but now it means this one), when
-     * they want to break. It will make things look like someone just called close, but it will not
-     * actually break anything. However, that will cause the state machine to go through the close process.
-     * this will end up calling closeImpl(). That will do.
-     */
-    public final void close() {
-        DeferredAction action;
-
-        synchronized (stateMachine) {
-            stateMachine.closeEvent();
-
-            action = eventCalled();
-        }
-
-        // We called an event. State may have changed.
-        notifyChange();
-
-        performDeferredAction(action);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void sendMessageB(Message msg, String service, String serviceParam) throws IOException {
-
-        DeferredAction action;
-
-        synchronized (stateMachine) {
-            try {
-                while ((currentMessage != null) && !inputClosed) {
-                    stateMachine.wait();
-                }
-            } catch (InterruptedException ie) {
-                throw new InterruptedIOException();
-            }
-
-            if (inputClosed) {
-                throw new IOException("Messenger is closed. It cannot be used to send messages");
-            }
-
-            // We store the four elements of a pending msg separately. We do not want to pour millions of tmp objects on the GC for
-            // nothing.
-
-            storeCurrent(msg, service, serviceParam);
-            stateMachine.saturatedEvent();
-            action = eventCalled();
-        }
-
-        notifyChange(); // We called an event. State may have changed.
-        performDeferredAction(action); // We called an event. There may be an action. (start, normally).
-
-        // After deferred action, the message was either sent or failed. (done by this thread).
-        // We can tell because, if failed, the currentMessage is still our msg.
-        Throwable failure = null;
-
-        synchronized (stateMachine) {
-            if (currentMessage == msg) {
-                failure = currentThrowable;
-                if (failure == null) {
-                    failure = new IOException("Unknown error");
-                }
-                // Ok, let it go, now.
-                storeCurrent(null, null, null);
-            } // Else, don't touch currentMsg; it's not our msg.
-        }
-
-        if (failure == null) {
-            // No failure. Report ultimate succes.
-            msg.setMessageProperty(Messenger.class, OutgoingMessageEvent.SUCCESS);
-            return;
-        }
-
-        // Failure. See how we can manage to throw it.
-        if (failure instanceof IOException) {
-            throw (IOException) failure;
-        }
-        if (failure instanceof RuntimeException) {
-            throw (RuntimeException) failure;
-        }
-        if (failure instanceof Error) {
-            throw (Error) failure;
-        }
-
-        IOException failed = new IOException("Failure sending message");
-        failed.initCause(failure);
-        throw failed;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final boolean sendMessageN(Message msg, String service, String serviceParam) {
-
-        boolean queued = false;
-        DeferredAction action = DeferredAction.ACTION_NONE;
-        boolean closed;
-
-        synchronized (stateMachine) {
-            closed = inputClosed;
-            if ((!closed) && (currentMessage == null)) {
-                // We copy the four elements of a pending msg right here. We do not want to pour millions of tmp objects on the GC.
-                storeCurrent(msg, service, serviceParam);
-                stateMachine.saturatedEvent();
-                action = eventCalled();
-                queued = true;
-            }
-        }
-
-        if (queued) {
-            notifyChange(); // We called an event. State may have changed.
-            performDeferredAction(action); // We called an event. There may be an action. (start, normally).
-
-            // After deferred action, the message was either sent or failed. (done by this thread).
-            // We can tell because, if failed, the currentMessage is still our msg.
-            synchronized (stateMachine) {
-                if (currentMessage == msg) {
-                    if (currentThrowable == null) {
-                        currentThrowable = new IOException("Unknown error");
-                    }
-                    msg.setMessageProperty(Message.class, currentThrowable);
-                    // Ok, let it go, now.
-                    storeCurrent(null, null, null);
-                } else {
-                    msg.setMessageProperty(Message.class, OutgoingMessageEvent.SUCCESS);
-                    // Don't touch the current msg; it's not our msg.
-                }
-            }
-            // Yes, we return true in either case. sendMessageN is supposed to be async. If a message fails
-            // after it was successfuly queued, the error is not reported by the return value, but only by
-            // the message property (and select). Just making sure the behaviour is as normal as can be
-            // even it means suppressing some information.
-
-            return true;
-        }
-
-        // Not queued. Either closed, or currently sending. If inputClosed, that's what we report.
-        msg.setMessageProperty(Messenger.class,
-                closed ?
-                        new OutgoingMessageEvent(msg, new IOException("This messenger is closed. " + "It cannot be used to send messages.")) :
-                        OutgoingMessageEvent.OVERFLOW);
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final void resolve() {// We're born resolved. Don't bother calling the event.
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final int getState() {
-        return stateMachine.getState();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final Messenger getChannelMessenger(PeerGroupID redirection, String service, String serviceParam) {
-
-        // Our transport is always in the same group. If the channel's target group is the same, no group
-        // redirection is ever needed.
-
-        return new BlockingMessengerChannel(getDestinationAddress(),
-                homeGroupID.equals(redirection) ? null : redirection, service,
-                serviceParam);
-    }
-
-    /**
-     * Three exposed methods may need to inject new events in the system: sendMessageN, close, and shutdown. Since they can both
-     * cause actions, and since connectAction and startAction are deferred, it seems possible that one of the
-     * actions caused by send, close, or shutdown be called while connectAction or startAction are in progress.
-     *
-     * However, the state machine gives us a few guarantees: connectAction and startAction can never nest. We will not be
-     * asked to perform one while still performing the other. Only the synchronous actions closeInput, closeOutput, or
-     * failAll can possibly be requested in the interval. We could make more assumptions and simplify the code, but rather
-     * keep at least some flexibility.
-     */
-
-    private void performDeferredAction(DeferredAction action) {
-        switch (action) {
-            case ACTION_SEND:
-                sendIt();
-                break;
-
-            case ACTION_CONNECT:
-                cantConnect();
-                break;
-        }
-    }
-
-    /**
-     * A shortHand for a frequently used sequence. MUST be called while synchronized on stateMachine.
-     *
-     * @return the deferred action.
-     */
-    private DeferredAction eventCalled() {
-        DeferredAction action = deferredAction;
-
-        deferredAction = DeferredAction.ACTION_NONE;
-        stateMachine.notifyAll();
-        return action;
-    }
-
-    /**
-     * Performs the ACTION_SEND deferred action: sends the one msg in our one msg queue.
-     * This method *never* sets the outcome message property. This is left to sendMessageN and sendMessageB, because
-     * sendMessageB does not want to set it in any other case than success, while sendMessageN does it in all cases.
-     * The problem with that is: how do we communicate the outcome to sendMessage{NB} without having to keep
-     * the 1 msg queue locked until then (which would be in contradiction with how we interact with the state machine).
-     * To make it really inexpensive, here's the trick: when a message fails currentMessage and currentFailure remain.
-     * So the sendMessageRoutine can check them and known that it is its message and not another one that caused the
-     * failure. If all is well, currentMessage and currentFailure are nulled and if another message is send immediately
-     * sendMessage is able to see that its own message was processed fully. (this is a small cheat regarding the
-     * state of saturation after failall, but that's not actually detectable from the outside: input is closed
-     * before failall anyway. See failall for that part.
-     */
-    private void sendIt() {
-
-        if (currentMessage == null) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("Internal error. Asked to send with no message.");
-            }
-            return;
-        }
-
-        DeferredAction action;
-
-        try {
-            sendMessageBImpl(currentMessage, currentService, currentParam);
-        } catch (Throwable any) {
-            // Did not work. We report the link down and let the state machine tell us when to fail the msg.  It is assumed that
-            // when this happens, the cnx is already down.  FIXME - jice@jxta.org 20040413: check with the various kind of funky
-            // exception. Some may not mean the link is down
-            synchronized (stateMachine) {
-                currentThrowable = any;
-                stateMachine.downEvent();
-                action = eventCalled();
-            }
-            notifyChange();
-            performDeferredAction(action); // we expect connect but let the state machine decide.
-            return;
-        }
-
-        // Worked.
-
-        synchronized (stateMachine) {
-            storeCurrent(null, null, null);
-            stateMachine.idleEvent();
-            action = eventCalled();
-        }
-
-        // We did go from non-idle to idle. Report it.
-        notifyChange();
-
-        performDeferredAction(action); // should be none but let the state machine decide.
-    }
-
-    /**
-     * Performs the ACTION_CONNECT deferred action: generate a downEvent since we cannot reconnect.
-     */
-    private void cantConnect() {
-        DeferredAction action;
-
-        synchronized (stateMachine) {
-            stateMachine.downEvent();
-            action = eventCalled();
-        }
-        notifyChange();
-        performDeferredAction(action); // should be none but let the state machine decide.
-    }
-
-    /*
-     * Abstract methods to be provided by implementer (a transport for example).
-     * To adapt legacy transport, keep extending BlockingMessenger and just rename your close, isIdle, sendMessage and
-     * getLogicalDestinationAddress methods to closeImpl, isIdleImpl, sendMessageBImpl, and getLogicalDestinationImpl, respectively.
-     */
-
-    /**
-     * Close connection. May fail current send.
-     */
-    protected abstract void closeImpl();
-
-    /**
-     * Send a message blocking as needed until the message is sent.
-     *
-     * @param message The message to send.
-     * @param service The destination service.
-     * @param param   The destination serivce param.
-     * @throws IOException Thrown for errors encountered while sending the message.
-     */
-    protected abstract void sendMessageBImpl(Message message, String service, String param) throws IOException;
-
-    /**
-     * return true if this messenger has not been used for a long time. The definition of long time is: "sufficient such that closing it
-     * is worth the cost of having to re-open". A messenger should self close if it thinks it meets the definition of
-     * idle. BlockingMessenger leaves the evaluation to the transport but does the work automatically. <b>Important:</b> if
-     * self destruction is used, this method must work; not just return false. See the constructor. In general, if closeImpl does
-     * not need to do anything, then self destruction is not needed.
-     *
-     * @return {@code true} if theis messenger is, by it's own definition, idle.
-     */
-    protected abstract boolean isIdleImpl();
-
-    /**
-     * Obtain the logical destination address from the implementer (a transport for example).
-     */
-    protected abstract EndpointAddress getLogicalDestinationImpl();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/EndpointServiceImpl.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/EndpointServiceImpl.java
deleted file mode 100644 (file)
index d3db112..0000000
+++ /dev/null
@@ -1,1961 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.endpoint;
-
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.endpoint.ChannelMessenger;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointListener;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.MessageFilterListener;
-import net.jxta.endpoint.MessagePropagater;
-import net.jxta.endpoint.MessageReceiver;
-import net.jxta.endpoint.MessageSender;
-import net.jxta.endpoint.MessageTransport;
-import net.jxta.endpoint.Messenger;
-import net.jxta.endpoint.MessengerEvent;
-import net.jxta.endpoint.MessengerEventListener;
-import net.jxta.endpoint.StringMessageElement;
-import net.jxta.endpoint.ThreadedMessenger;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.id.ID;
-import net.jxta.impl.endpoint.endpointMeter.EndpointMeter;
-import net.jxta.impl.endpoint.endpointMeter.EndpointMeterBuildSettings;
-import net.jxta.impl.endpoint.endpointMeter.EndpointServiceMonitor;
-import net.jxta.impl.endpoint.endpointMeter.InboundMeter;
-import net.jxta.impl.endpoint.endpointMeter.OutboundMeter;
-import net.jxta.impl.endpoint.endpointMeter.PropagationMeter;
-import net.jxta.impl.endpoint.relay.RelayClient;
-import net.jxta.impl.endpoint.router.EndpointRouter;
-import net.jxta.impl.endpoint.tcp.TcpTransport;
-import net.jxta.impl.meter.MonitorManager;
-import net.jxta.impl.util.SequenceIterator;
-import net.jxta.logging.Logging;
-import net.jxta.meter.MonitorResources;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.platform.Module;
-import net.jxta.protocol.AccessPointAdvertisement;
-import net.jxta.protocol.ConfigParams;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.RouteAdvertisement;
-
-import java.io.IOException;
-import java.lang.ref.Reference;
-import java.lang.ref.SoftReference;
-import java.lang.ref.WeakReference;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-import java.util.WeakHashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * This class implements the frontend for all the JXTA  endpoint protocols, as
- * well as the API for the implementation of the core protocols that use
- * directly the EndpointService. It theory it only needs to implement core methods.
- * legacy or convenience methods should stay out. However, that would require
- * a two-level interface for the service (internal and public). May be later.
- */
-public class EndpointServiceImpl implements EndpointService, MessengerEventListener {
-
-    /**
-     * Logger
-     */
-    private static final Logger LOG = Logger.getLogger(EndpointServiceImpl.class.getName());
-
-    // // constants ////
-
-    /**
-     * The Wire Message Format we will use by default.
-     */
-    public static final MimeMediaType DEFAULT_MESSAGE_TYPE = new MimeMediaType("application/x-jxta-msg").intern();
-
-    /**
-     * The name of this service.
-     */
-    public static final String ENDPOINTSERVICE_NAME = "EndpointService";
-
-    /**
-     * The Message empty namespace. This namespace is reserved for use by
-     * applications. It will not be used by core protocols.
-     */
-    public static final String MESSAGE_EMPTY_NS = "";
-
-    /**
-     * The Message "jxta" namespace. This namespace is reserved for use by
-     * core protocols. It will not be used by applications.
-     */
-    public static final String MESSAGE_JXTA_NS = "jxta";
-
-    /**
-     * Namespace in which the message source address will be placed.
-     */
-    public static final String MESSAGE_SOURCE_NS = MESSAGE_JXTA_NS;
-
-    /**
-     * Element name in which the message source address will be placed.
-     */
-    public static final String MESSAGE_SOURCE_NAME = "EndpointSourceAddress";
-
-    /**
-     * Namespace in which the message destination address will be placed.
-     */
-    public static final String MESSAGE_DESTINATION_NS = MESSAGE_JXTA_NS;
-
-    /**
-     * Element name in which the message destination address will be placed.
-     * This element is used for loopback detection during propagate. Only
-     * propagate messages currently contain this element.
-     */
-    public static final String MESSAGE_DESTINATION_NAME = "EndpointDestinationAddress";
-
-    /**
-     * Namespace in which the message source peer address will be placed.
-     */
-    public static final String MESSAGE_SRCPEERHDR_NS = MESSAGE_JXTA_NS;
-
-    /**
-     * Element name in which the message source peer address will be placed.
-     * This element is used for loopback detection during propagate. Only
-     * propagated messages currently contain this element.
-     */
-    public static final String MESSAGE_SRCPEERHDR_NAME = "EndpointHeaderSrcPeer";
-
-    /**
-     * Size of the message queue provided by virtual messengers.
-     */
-    private final static int DEFAULT_MESSAGE_QUEUE_SIZE = 20;
-
-    /**
-     * If {@code true} then the parent endpoint may be used for acquiring
-     * messengers and for registering listeners.
-     */
-    private final static boolean DEFAULT_USE_PARENT_ENDPOINT = true;
-
-    EndpointServiceMonitor endpointServiceMonitor;
-
-    /**
-     * the EndpointMeter
-     */
-    private EndpointMeter endpointMeter;
-    private PropagationMeter propagationMeter;
-
-    /**
-     * If {@code true} then this service has been initialized.
-     */
-    private boolean initialized = false;
-
-    /**
-     * tunable: the virtual messenger queue size
-     */
-    private int vmQueueSize = DEFAULT_MESSAGE_QUEUE_SIZE;
-
-    private PeerGroup group = null;
-    private ID assignedID = null;
-    private ModuleImplAdvertisement implAdvertisement = null;
-
-    private String localPeerId = null;
-    private boolean useParentEndpoint = DEFAULT_USE_PARENT_ENDPOINT;
-    private EndpointService parentEndpoint = null;
-    private String myServiceName = null;
-
-    /**
-     * The Message Transports which are registered for this endpoint. This is
-     * only the message transport registered locally, it does not include
-     * transports which are used from other groups.
-     */
-    private final Collection<MessageTransport> messageTransports = new HashSet<MessageTransport>();
-
-    /**
-     * Passive listeners for messengers. Three priorities, so far.
-     */
-    private final Collection[] passiveMessengerListeners = {
-            Collections.synchronizedList(new ArrayList<MessengerEventListener>()),
-            Collections.synchronizedList(new ArrayList<MessengerEventListener>()),
-            Collections.synchronizedList(new ArrayList<MessengerEventListener>())
-    };
-
-    /**
-     * The set of listener managed by this instance of the endpoint svc.
-     */
-    private final Map<String, EndpointListener> incomingMessageListeners = new HashMap<String, EndpointListener>(16);
-
-    /**
-     * The set of shared transport messengers currently ready for use.
-     */
-    private final Map<EndpointAddress, Reference<Messenger>> messengerMap = new WeakHashMap<EndpointAddress, Reference<Messenger>>(32);
-    /**
-     * The set of shared transport messengers currently ready for use.
-     */
-    private final Map<EndpointAddress, Reference<Messenger>> directMessengerMap = new WeakHashMap<EndpointAddress, Reference<Messenger>>(32);
-
-    /**
-     * The filter listeners.
-     * <p/>
-     * We rarely add/remove, never remove without iterating
-     * and insert objects that are always unique. So using a set
-     * does not make sense. An array list is the best.
-     */
-    private final Collection<FilterListenerAndMask> incomingFilterListeners = new ArrayList<FilterListenerAndMask>();
-    private final Collection<FilterListenerAndMask> outgoingFilterListeners = new ArrayList<FilterListenerAndMask>();
-
-    /**
-     * Holder for a filter listener and its conditions
-     */
-    private static class FilterListenerAndMask {
-        final String namespace;
-        final String name;
-        final MessageFilterListener listener;
-
-        public FilterListenerAndMask(MessageFilterListener listener, String namespace, String name) {
-            this.namespace = namespace;
-            this.name = name;
-            this.listener = listener;
-        }
-
-        @Override
-        public boolean equals(Object target) {
-            if (this == target) {
-                return true;
-            }
-
-            if (target instanceof FilterListenerAndMask) {
-                FilterListenerAndMask likeMe = (FilterListenerAndMask) target;
-
-                boolean result = (null != namespace) ? (namespace.equals(likeMe.namespace)) : (null == likeMe.namespace);
-
-                result &= (null != name) ? (name.equals(likeMe.name)) : (null == likeMe.name);
-                result &= (listener == likeMe.listener);
-
-                return result;
-            }
-
-            return false;
-        }
-
-        /**
-         * {@inheritDoc}
-         * <p/>
-         * Added to make PMD shut up....
-         */
-        @Override
-        public int hashCode() {
-            return System.identityHashCode(this);
-        }
-    }
-
-
-    /**
-     * A non blocking messenger that obtains a backing (possibly blocking)
-     * messenger on-demand.
-     */
-    private class CanonicalMessenger extends ThreadedMessenger {
-
-        /**
-         * If the hint was not used because there already was a transport
-         * messenger available, then it is saved here for the next time we are
-         * forced to create a new transport messenger by the breakage of the one
-         * that's here.
-         * <p/>
-         * The management of hints is a bit inconsistent for now: the hint
-         * used may be different dependent upon which invocation created the
-         * current canonical messenger and, although we try to use the hint only
-         * once (to avoid carrying an invalid hint forever) it may happen that a
-         * hint is used long after it was suggested.
-         */
-        Object hint;
-
-        /**
-         * The transport messenger that this canonical messenger currently uses.
-         */
-        Messenger cachedMessenger = null;
-
-        /**
-         * Create a new CanonicalMessenger.
-         *
-         * @param vmQueueSize        queue size
-         * @param destination        destination who messages should be addressed to
-         * @param logicalDestination logical destination
-         * @param hint               route hint
-         * @param messengerMeter     the metering object if any
-         */
-        public CanonicalMessenger(int vmQueueSize, EndpointAddress destination, EndpointAddress logicalDestination, Object hint, OutboundMeter messengerMeter) {
-            super(group.getPeerGroupID(), destination, logicalDestination, vmQueueSize);
-            this.hint = hint;
-        }
-
-        /**
-         * close this canonical messenger.
-         */
-        @Override
-        public void close() {
-            // No way. Not form the outside.
-        }
-
-        /**
-         * Drop the current messenger.
-         */
-        @Override
-        protected void closeImpl() {
-            if (cachedMessenger != null) {
-                cachedMessenger.close();
-                cachedMessenger = null;
-            } else {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.severe("Internal messenger error: close requested while not connected.");
-                }
-            }
-        }
-
-        /**
-         * Get a transport messenger to the destination.
-         * <p/>
-         * FIXME 20040413 jice : Do better hint management.
-         */
-        @Override
-        protected boolean connectImpl() {
-            if (cachedMessenger != null) {
-                if ((cachedMessenger.getState() & Messenger.TERMINAL) != 0) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.SEVERE)) {
-                        LOG.fine("Closing TERMINAL internal messenger : attempting requested connect.");
-                    }
-                    cachedMessenger.close();
-                    cachedMessenger = null;
-                } else {
-                    return true;
-                }
-            }
-
-            // Consume the hint, if any.
-            Object theHint = hint;
-
-            hint = null;
-            cachedMessenger = getLocalTransportMessenger(getDestinationAddress(), theHint);
-
-            if (cachedMessenger == null) {
-                return false;
-            }
-
-            // FIXME 20040413 jice : it's not too clean: we assume
-            // that all transports use BlockingMessenger as the base class for
-            // their messengers. If they don't we can't force them to hold the
-            // strong reference to the canonical messenger.
-            try {
-                ((BlockingMessenger) cachedMessenger).setOwner(this);
-            } catch (ClassCastException cce) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.severe("Transport messengers must all extend BlockingMessenger for now. " +
-                            cachedMessenger + " may remain open beyond its use.");
-                }
-            }
-            return true;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        protected EndpointAddress getLogicalDestinationImpl() {
-            if (cachedMessenger == null) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.severe("Internal messenger error: logical destination requested while not connected.");
-                }
-                return null;
-            }
-            return cachedMessenger.getLogicalDestinationAddress();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        protected void sendMessageBImpl(Message msg, String service, String param) throws IOException {
-            if (cachedMessenger == null) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.severe("Internal messenger error: send requested while not connected.");
-                }
-                throw new IOException("Internal messenger error.");
-            }
-
-            try {
-                cachedMessenger.sendMessageB(msg, service, param);
-            } catch (IOException any) {
-                cachedMessenger = null;
-                throw any;
-            } catch (RuntimeException any) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failure sending " + msg, any);
-                }
-
-                throw any;
-            }
-        }
-    }
-
-    /**
-     * Create a new EndpointService.
-     */
-    public EndpointServiceImpl() {
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized void init(PeerGroup group, ID assignedID, Advertisement impl) throws PeerGroupException {
-        if (initialized) {
-            throw new PeerGroupException("Cannot initialize service more than once");
-        }
-
-        this.group = group;
-        // The selector for the element of the peer adv params that we have to update.
-        this.assignedID = assignedID;
-        this.implAdvertisement = (ModuleImplAdvertisement) impl;
-
-        this.localPeerId = group.getPeerID().toString();
-
-        this.myServiceName = ChannelMessenger.InsertedServicePrefix + group.getPeerGroupID().getUniqueValue().toString();
-
-        ConfigParams confAdv = group.getConfigAdvertisement();
-        XMLElement paramBlock = null;
-
-        if (confAdv != null) {
-            paramBlock = (XMLElement) confAdv.getServiceParam(assignedID);
-        }
-
-        if (paramBlock != null) {
-            // get our two tunables: virtual messenger queue size, and whether to use the parent endpoint
-            Enumeration param;
-
-            param = paramBlock.getChildren("MessengerQueueSize");
-            if (param.hasMoreElements()) {
-                String textQSz = ((XMLElement) param.nextElement()).getTextValue();
-
-                try {
-                    Integer requestedSize = Integer.parseInt(textQSz.trim());
-
-                    if (requestedSize > 0) {
-                        vmQueueSize = requestedSize;
-                    } else {
-                        LOG.warning("Illegal MessengerQueueSize : " + textQSz);
-                    }
-                } catch (NumberFormatException e) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "could not parse MessengerQueueSize string", e);
-                    }
-                }
-            }
-
-            param = paramBlock.getChildren("UseParentEndpoint");
-            if (param.hasMoreElements()) {
-                String textUPE = ((XMLElement) param.nextElement()).getTextValue();
-
-                useParentEndpoint = textUPE.trim().equalsIgnoreCase("true");
-            }
-
-        }
-
-        PeerGroup parentGroup = group.getParentGroup();
-
-        if (useParentEndpoint && parentGroup != null) {
-            parentEndpoint = parentGroup.getEndpointService();
-            parentEndpoint.addMessengerEventListener(this, EndpointService.LowPrecedence);
-        }
-
-        initialized = true;
-
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring Endpoint Service : " + assignedID);
-
-            if (implAdvertisement != null) {
-                configInfo.append("\n\tImplementation :");
-                configInfo.append("\n\t\tModule Spec ID: ");
-                configInfo.append(implAdvertisement.getModuleSpecID());
-                configInfo.append("\n\t\tImpl Description : ").append(implAdvertisement.getDescription());
-                configInfo.append("\n\t\tImpl URI : ").append(implAdvertisement.getUri());
-                configInfo.append("\n\t\tImpl Code : ").append(implAdvertisement.getCode());
-            }
-
-            configInfo.append("\n\tGroup Params :");
-            configInfo.append("\n\t\tGroup : ").append(group);
-            configInfo.append("\n\t\tPeer ID : ").append(group.getPeerID());
-
-            configInfo.append("\n\tConfiguration :");
-            if (null == parentGroup) {
-                configInfo.append("\n\t\tHome Group : (none)");
-            } else {
-                configInfo.append("\n\t\tHome Group : ").append(parentGroup.getPeerGroupName()).append(" / ").append(
-                        parentGroup.getPeerGroupID());
-            }
-            configInfo.append("\n\t\tUsing home group endpoint : ").append(parentEndpoint);
-            configInfo.append("\n\t\tVirtual Messenger Queue Size : ").append(vmQueueSize);
-            LOG.config(configInfo.toString());
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public int startApp(String[] args) {
-        if (!initialized) {
-            return -1;
-        }
-
-        // FIXME  when Load order Issue is resolved this should fail
-        // until it is able to get a non-failing service Monitor (or
-        // null = not monitoring) 
-        // FIXME it is ok because of the hack in StdPeerGroup that starts 
-        // endpoint service first
-        if (EndpointMeterBuildSettings.ENDPOINT_METERING) { // Fix-Me: Move to startApp() when load order issue is resolved
-            endpointServiceMonitor = (EndpointServiceMonitor) MonitorManager.getServiceMonitor(group, MonitorResources.endpointServiceMonitorClassID);
-
-            if (endpointServiceMonitor != null) {
-                endpointMeter = endpointServiceMonitor.getEndpointMeter();
-            }
-        }
-
-        if (parentEndpoint != null) {
-            Iterator<MessageTransport> parentMTs = parentEndpoint.getAllMessageTransports();
-
-            synchronized (this) {
-                while (parentMTs.hasNext()) {
-                    addProtoToAdv(parentMTs.next());
-                }
-            }
-        }
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Endpoint Service started.");
-        }
-
-        return Module.START_OK;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * The transports and services are going to be stopped as well. When
-     * they are, they will dereference us and we'll go into oblivion.
-     */
-    public void stopApp() {
-        if (parentEndpoint != null) {
-            parentEndpoint.removeMessengerEventListener(this, EndpointService.LowPrecedence);
-        }
-
-        // Clear up the passiveMessengersListeners
-        int prec = EndpointService.HighPrecedence;
-        while (prec >= EndpointService.LowPrecedence) {
-            passiveMessengerListeners[prec--].clear();
-        }
-
-        // Clear up any messengers.
-        messengerMap.clear();
-        directMessengerMap.clear();
-
-        // Clear up the listeners
-        incomingMessageListeners.clear();
-
-        // Forget about any message filters.
-        incomingFilterListeners.clear();
-        outgoingFilterListeners.clear();
-
-        // Forget any message transports
-        messageTransports.clear();
-
-        // Avoid cross-reference problems with the GC
-
-        // group = null;
-        // parentEndpoint = null;
-        // parentGroup = null;
-
-        // The above is not really needed and until we have a very orderly
-        // shutdown, it causes NPEs that are hard to prevent.
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Endpoint Service stopped.");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerGroup getGroup() {
-        return group;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * We create a new instance each time because our interface actually
-     * has state (channel messengers and listener callback adaptor).
-     */
-    public EndpointService getInterface() {
-        return new EndpointServiceInterface(this);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ModuleImplAdvertisement getImplAdvertisement() {
-        return implAdvertisement;
-    }
-
-    // A vector for statistics between propagateThroughAll and its invoker.
-    private static class Metrics {
-        int numFilteredOut = 0;
-        int numPropagatedTo = 0;
-        int numErrorsPropagated = 0;
-    }
-
-    private void propagateThroughAll(Iterator<MessageTransport> eachProto, Message myMsg, String serviceName, String serviceParam, int initialTTL, Metrics metrics) {
-
-        Message filtered = null;
-
-        while (eachProto.hasNext()) {
-            MessageTransport aTransport = eachProto.next();
-
-            try {
-                if (!(aTransport instanceof MessagePropagater)) {
-                    continue;
-                }
-
-                MessagePropagater propagater = (MessagePropagater) aTransport;
-
-                if (null == filtered) {
-                    // run process filters only once
-                    filtered = processFilters(myMsg,
-                            propagater.getPublicAddress(),
-                            new EndpointAddress(group.getPeerGroupID(), serviceName, serviceParam),
-                            false);
-                }
-
-                if (null == filtered) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("   message " + myMsg + " discarded upon filter decision");
-                    }
-
-                    if (EndpointMeterBuildSettings.ENDPOINT_METERING) {
-                        metrics.numFilteredOut++;
-                    }
-                    break;
-                }
-
-                propagater.propagate(filtered.clone(), serviceName, serviceParam, initialTTL);
-
-                if (EndpointMeterBuildSettings.ENDPOINT_METERING) {
-                    metrics.numPropagatedTo++;
-                }
-            } catch (Exception e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failed propagating message " + filtered + " on message transport " + aTransport, e);
-                }
-
-                if (EndpointMeterBuildSettings.ENDPOINT_METERING) {
-                    metrics.numErrorsPropagated++;
-                }
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void propagate(Message msg, String serviceName, String serviceParam) {
-        propagate(msg, serviceName, serviceParam, Integer.MAX_VALUE);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void propagate(Message msg, String serviceName, String serviceParam, int initialTTL) {
-        long startPropagationTime = 0;
-
-        if (null == serviceName) {
-            throw new IllegalArgumentException("serviceName may not be null");
-        }
-
-        Metrics metrics = null;
-
-        if (EndpointMeterBuildSettings.ENDPOINT_METERING) {
-            metrics = new Metrics();
-        }
-
-        // Keep the orig unchanged for metering reference and caller's benefit, but
-        // we are forced to clone it here, because we add a header.
-        msg = msg.clone();
-
-        if (EndpointMeterBuildSettings.ENDPOINT_METERING) {
-            startPropagationTime = System.currentTimeMillis();
-        }
-
-        // Add our header.
-        MessageElement srcHdrElement = new StringMessageElement(EndpointServiceImpl.MESSAGE_SRCPEERHDR_NAME, localPeerId, null);
-
-        msg.replaceMessageElement(EndpointServiceImpl.MESSAGE_SRCPEERHDR_NS, srcHdrElement);
-
-        // Do the local transports with the plain address.
-        Iterator<MessageTransport> eachProto = getAllLocalTransports();
-
-        propagateThroughAll(eachProto, msg.clone(), serviceName, serviceParam, initialTTL, metrics);
-
-        // Do the parent transports with a mangled address.
-        if (parentEndpoint != null) {
-            eachProto = parentEndpoint.getAllMessageTransports();
-
-            StringBuilder mangled = new StringBuilder(serviceName);
-            if (null != serviceParam) {
-                mangled.append('/');
-                mangled.append(serviceParam);
-            }
-
-            propagateThroughAll(eachProto, msg.clone(), myServiceName, mangled.toString(), initialTTL, metrics);
-        }
-
-        if (EndpointMeterBuildSettings.ENDPOINT_METERING && (endpointServiceMonitor != null)) {
-            PropagationMeter propagationMeter = endpointServiceMonitor.getPropagationMeter(serviceName, serviceParam);
-
-            propagationMeter.registerPropagateMessageStats(metrics.numPropagatedTo, metrics.numFilteredOut, metrics.numErrorsPropagated,
-                    System.currentTimeMillis() - startPropagationTime);
-        }
-    }
-
-    /**
-     * Process the filters for this message.
-     */
-    private Message processFilters(Message message, EndpointAddress srcAddress, EndpointAddress dstAddress, boolean incoming) {
-
-        Iterator<FilterListenerAndMask> eachFilter = incoming
-                ? incomingFilterListeners.iterator()
-                : outgoingFilterListeners.iterator();
-
-        while (eachFilter.hasNext()) {
-            FilterListenerAndMask aFilter = eachFilter.next();
-
-            Message.ElementIterator eachElement = message.getMessageElements();
-
-            while (eachElement.hasNext()) {
-                MessageElement anElement = eachElement.next();
-
-                if ((null != aFilter.namespace) && (!aFilter.namespace.equals(eachElement.getNamespace()))) {
-                    continue;
-                }
-
-                if ((null != aFilter.name) && (!aFilter.name.equals(anElement.getElementName()))) {
-                    continue;
-                }
-
-                message = aFilter.listener.filterMessage(message, srcAddress, dstAddress);
-
-                if (null == message) {
-                    return null;
-                }
-            }
-        }
-
-        // If we got here, no filter has rejected the message. Keep processing it.
-        return message;
-    }
-
-    private static EndpointAddress demangleAddress(EndpointAddress mangled) {
-        String serviceName = mangled.getServiceName();
-
-        if (null == serviceName) {
-            // not a mangled address
-            return mangled;
-        }
-
-        if (!serviceName.startsWith(ChannelMessenger.InsertedServicePrefix)) {
-            // not a mangled address
-            return mangled;
-        }
-
-        String serviceParam = mangled.getServiceParameter();
-
-        if (null == serviceParam) {
-            // it has no param, its a null destination.
-            // XXX bondolo 20050907 I'm not sure this is correct.
-            return new EndpointAddress(mangled, null, null);
-        }
-
-        int slashAt = serviceParam.indexOf('/');
-
-        if (-1 == slashAt) {
-            // param has no param portion.
-            return new EndpointAddress(mangled, serviceParam, null);
-        }
-
-        return new EndpointAddress(mangled, serviceParam.substring(0, slashAt), serviceParam.substring(slashAt + 1));
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void processIncomingMessage(Message msg, EndpointAddress srcAddress, EndpointAddress dstAddress) {
-
-        // check for propagate loopback.
-        MessageElement srcPeerElement = msg.getMessageElement(EndpointServiceImpl.MESSAGE_SRCPEERHDR_NS, EndpointServiceImpl.MESSAGE_SRCPEERHDR_NAME);
-
-        if (null != srcPeerElement) {
-            msg.removeMessageElement(srcPeerElement);
-            String srcPeer = srcPeerElement.toString();
-
-            if (localPeerId.equals(srcPeer)) {
-                // This is a loopback. Discard.
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine(msg + " is a propagate loopback. Discarded");
-                }
-
-                if (EndpointMeterBuildSettings.ENDPOINT_METERING && (endpointMeter != null)) {
-                    endpointMeter.discardedLoopbackDemuxMessage();
-                }
-
-                return;
-            }
-        }
-
-        if (null == srcAddress) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("null src address, discarding message " + msg);
-            }
-
-            if (EndpointMeterBuildSettings.ENDPOINT_METERING && (endpointMeter != null)) {
-                endpointMeter.invalidIncomingMessage();
-            }
-
-            return;
-        }
-
-        if (null == dstAddress) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("null destination address, discarding message " + msg);
-            }
-
-            if (EndpointMeterBuildSettings.ENDPOINT_METERING && (endpointMeter != null)) {
-                endpointMeter.invalidIncomingMessage();
-            }
-
-            return;
-        }
-
-        // Decode the destination address.
-        // We want:
-        // 1 - a version of the address that does not have the grp redirection.
-        // 2 - a version of the serviceName that includes BOTH the group redirection and the original service name.
-        // 3 - the original service param; without the original service name stuck to it.
-        // So, basically we want the original serviceName part stuck to the group mangling, not stuck to the original
-        // serviceParam. We do that by cut/pasting from both the mangled and demangled versions of the address.
-
-        EndpointAddress demangledAddress = demangleAddress(dstAddress);
-        String decodedServiceName = demangledAddress.getServiceName();
-        String decodedServiceParam = demangledAddress.getServiceParameter();
-
-        if ((null == decodedServiceName) || (0 == decodedServiceName.length())) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("dest serviceName must not be null, discarding message " + msg);
-            }
-
-            if (EndpointMeterBuildSettings.ENDPOINT_METERING && (endpointMeter != null)) {
-                endpointMeter.invalidIncomingMessage();
-            }
-
-            return;
-        }
-
-        // Do filters for this message:
-        // FIXME - jice 20040417 : filters are likely broken, now. They do not see messages
-        // from xports in parent groups.  For those messages that are seen, demangled address seems to be the useful one.
-        msg = processFilters(msg, srcAddress, demangledAddress, true);
-
-        // If processFilters retuns null, the message is to be discarded.
-        if (msg == null) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Message discarded during filter processing");
-            }
-
-            if (EndpointMeterBuildSettings.ENDPOINT_METERING && (endpointMeter != null)) {
-                endpointMeter.incomingMessageFilteredOut();
-            }
-
-            return;
-        }
-
-        // Now that we know the original service name is valid, finish building the decoded version.
-        if (demangledAddress != dstAddress) {
-            decodedServiceName = dstAddress.getServiceName() + "/" + decodedServiceName;
-        }
-
-        // Look up the listener
-        EndpointListener listener = getIncomingMessageListener(decodedServiceName, decodedServiceParam);
-
-        // No listener? oh well.
-
-        if (listener == null) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("No listener for \'" + dstAddress + "\' in group " +
-                        group + "\n\tdecodedServiceName :" +
-                        decodedServiceName + "\tdecodedServiceParam :" +
-                        decodedServiceParam);
-            }
-
-            if (EndpointMeterBuildSettings.ENDPOINT_METERING && (endpointMeter != null)) {
-                endpointMeter.noListenerForIncomingMessage();
-            }
-
-            return; // noone cares for this message
-        }
-
-        // call the listener
-
-        try {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                if (null != decodedServiceParam) {
-                    LOG.fine("Calling listener for \'" + decodedServiceName + "/" + decodedServiceParam + "\' with " + msg);
-                } else {
-                    LOG.fine("Calling listener for \'" + decodedServiceName + "\' with " + msg);
-                }
-            }
-
-            listener.processIncomingMessage(msg, srcAddress, demangledAddress);
-
-            if (EndpointMeterBuildSettings.ENDPOINT_METERING && (endpointMeter != null)) {
-                endpointMeter.incomingMessageSentToEndpointListener();
-            }
-
-            if (EndpointMeterBuildSettings.ENDPOINT_METERING && (endpointMeter != null)) {
-                endpointMeter.demuxMessageProcessed();
-            }
-        } catch (Throwable all) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Uncaught throwable from listener for " + dstAddress, all);
-            }
-
-            if (EndpointMeterBuildSettings.ENDPOINT_METERING && (endpointMeter != null)) {
-                endpointMeter.errorProcessingIncomingMessage();
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void demux(Message msg) {
-
-        // Get the message destination
-        MessageElement dstAddressElement = msg.getMessageElement(EndpointServiceImpl.MESSAGE_DESTINATION_NS,
-                EndpointServiceImpl.MESSAGE_DESTINATION_NAME);
-
-        if (null == dstAddressElement) {
-            // No destination address... Just discard
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning(msg + " has no destination address. Discarded");
-            }
-
-            if (EndpointMeterBuildSettings.ENDPOINT_METERING && (endpointMeter != null)) {
-                endpointMeter.noDestinationAddressForDemuxMessage();
-            }
-
-            return;
-        }
-
-        msg.removeMessageElement(dstAddressElement);
-        EndpointAddress dstAddress = new EndpointAddress(dstAddressElement.toString());
-
-        // Get the message source
-        MessageElement srcAddressElement = msg.getMessageElement(EndpointServiceImpl.MESSAGE_SOURCE_NS, EndpointServiceImpl.MESSAGE_SOURCE_NAME);
-
-        if (null == srcAddressElement) {
-            // No src address... Just discard
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning(msg + " has no source address. Discarded");
-            }
-
-            if (EndpointMeterBuildSettings.ENDPOINT_METERING && (endpointMeter != null)) {
-                endpointMeter.noSourceAddressForDemuxMessage();
-            }
-
-            return;
-        }
-
-        msg.removeMessageElement(srcAddressElement);
-        EndpointAddress msgScrAddress = new EndpointAddress(srcAddressElement.toString());
-
-        processIncomingMessage(msg, msgScrAddress, dstAddress);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public MessengerEventListener addMessageTransport(MessageTransport transpt) {
-
-        synchronized (messageTransports) {
-            // check if it is already installed.
-            if (!messageTransports.contains(transpt)) {
-
-                clearProtoFromAdv(transpt); // just to be safe
-                messageTransports.add(transpt);
-                addProtoToAdv(transpt);
-
-                // FIXME: For now, we return this. Later we might return something else, so that we can take
-                // advantage of the fact that we know that the event is from a local transport.
-                // That will help cleaning up the incoming messenger mess.
-                return this;
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean removeMessageTransport(MessageTransport transpt) {
-
-        boolean removed;
-
-        synchronized (messageTransports) {
-            removed = messageTransports.remove(transpt);
-        }
-
-        if (removed) {
-            clearProtoFromAdv(transpt);
-        }
-
-        return removed;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Iterator<MessageTransport> getAllMessageTransports() {
-        if (null != parentEndpoint) {
-            return new SequenceIterator(getAllLocalTransports(), parentEndpoint.getAllMessageTransports());
-        } else {
-            return getAllLocalTransports();
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public MessageTransport getMessageTransport(String name) {
-        Iterator<MessageTransport> allTransports = getAllMessageTransports();
-
-        while (allTransports.hasNext()) {
-            MessageTransport transpt = allTransports.next();
-
-            if (transpt.getProtocolName().equals(name)) {
-                return transpt;
-            }
-        }
-
-        return null;
-    }
-
-    private void addProtoToAdv(MessageTransport proto) {
-
-        boolean relay = false;
-
-        try {
-            if (!(proto instanceof MessageReceiver)) {
-                return;
-            }
-
-            // no value to publish for the router endpoint address
-            if (proto instanceof EndpointRouter) {
-                // register the corresponding group to relay connection events
-                addActiveRelayListener(group);
-                return;
-            }
-
-            // register this group to Relay connection events
-            if (proto instanceof RelayClient) {
-                relay = true;
-                ((RelayClient) proto).addActiveRelayListener(group);
-            }
-
-            // get the list of addresses
-            Iterator<EndpointAddress> allAddresses = ((MessageReceiver) proto).getPublicAddresses();
-            Vector<String> ea = new Vector<String>();
-
-            while (allAddresses.hasNext()) {
-                EndpointAddress anEndpointAddress = allAddresses.next();
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Adding endpoint address to route advertisement : " + anEndpointAddress);
-                }
-
-                ea.add(anEndpointAddress.toString());
-            }
-
-            PeerAdvertisement padv = group.getPeerAdvertisement();
-            StructuredDocument myParam = padv.getServiceParam(assignedID);
-
-            RouteAdvertisement route = null;
-
-            if (myParam != null) {
-                Enumeration paramChilds = myParam.getChildren(RouteAdvertisement.getAdvertisementType());
-
-                if (paramChilds.hasMoreElements()) {
-                    // we have an advertisement just add the new access points
-                    XMLElement param = (XMLElement) paramChilds.nextElement();
-
-                    route = (RouteAdvertisement) AdvertisementFactory.newAdvertisement(param);
-                    route.addDestEndpointAddresses(ea);
-                    if (relay) {
-                        // need to add the relay info if we have some
-                        Vector<AccessPointAdvertisement> hops = ((RelayClient) proto).getActiveRelays(group);
-
-                        if (!hops.isEmpty()) {
-                            route.setHops(hops);
-                        }
-                    }
-                }
-            }
-
-            if (null == route) {
-                // None yet, so create a new Route Advertisement
-                // create the RouteAdvertisement that will contain the route to
-                // the peer. At this point we only know the peer endpoint addresses
-                // no hops are known
-
-                // create the destination access point
-                AccessPointAdvertisement destAP = (AccessPointAdvertisement) AdvertisementFactory.newAdvertisement(
-                        AccessPointAdvertisement.getAdvertisementType());
-
-                destAP.setPeerID(group.getPeerID());
-                destAP.setEndpointAddresses(ea);
-
-                // create the route advertisement
-                route = (RouteAdvertisement) AdvertisementFactory.newAdvertisement(RouteAdvertisement.getAdvertisementType());
-                route.setDest(destAP);
-
-                if (relay) {
-                    // need to add the relay info if we have some
-                    Vector<AccessPointAdvertisement> hops = ((RelayClient) proto).getActiveRelays(group);
-
-                    if (!hops.isEmpty()) {
-                        route.setHops(hops);
-                    }
-                }
-            }
-
-            // create the param route
-            XMLDocument newParam = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "Parm");
-            XMLDocument xptDoc = (XMLDocument) route.getDocument(MimeMediaType.XMLUTF8);
-
-            StructuredDocumentUtils.copyElements(newParam, newParam, xptDoc);
-
-            padv.putServiceParam(assignedID, newParam);
-
-            // publish the new advertisement
-            DiscoveryService discovery = group.getDiscoveryService();
-
-            if (discovery != null) {
-                discovery.publish(padv, DiscoveryService.INFINITE_LIFETIME, DiscoveryService.DEFAULT_EXPIRATION);
-            }
-        } catch (Exception ex) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Exception adding message transport ", ex);
-            }
-        }
-    }
-
-    private void clearProtoFromAdv(MessageTransport transpt) {
-
-        try {
-            if (!(transpt instanceof MessageReceiver)) {
-                return;
-            }
-
-            // no value to publish the router endpoint address
-            if (transpt instanceof EndpointRouter) {
-                // register the corresponding group in the relay
-                removeActiveRelayListener(group);
-                return;
-            }
-
-            // register this group to Relay connection events
-            if (transpt instanceof RelayClient) {
-                ((RelayClient) transpt).removeActiveRelayListener(group);
-            }
-
-            Iterator<EndpointAddress> allAddresses = ((MessageReceiver) transpt).getPublicAddresses();
-            Vector<String> ea = new Vector<String>();
-
-            while (allAddresses.hasNext()) {
-                EndpointAddress anEndpointAddress = allAddresses.next();
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Removing endpoint address from route advertisement : " + anEndpointAddress);
-                }
-
-                ea.add(anEndpointAddress.toString());
-            }
-
-            PeerAdvertisement padv = group.getPeerAdvertisement();
-            XMLDocument myParam = (XMLDocument) padv.getServiceParam(assignedID);
-
-            if (myParam == null) {
-                return;
-            }
-
-            Enumeration paramChilds = myParam.getChildren(RouteAdvertisement.getAdvertisementType());
-
-            if (!paramChilds.hasMoreElements()) {
-                return;
-            }
-
-            XMLElement param = (XMLElement) paramChilds.nextElement();
-
-            RouteAdvertisement route = (RouteAdvertisement) AdvertisementFactory.newAdvertisement(param);
-
-            route.removeDestEndpointAddresses(ea);
-
-            // update the new route to a new parm structure.
-            XMLDocument newParam = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "Parm");
-
-            XMLDocument xptDoc = (XMLDocument) route.getDocument(MimeMediaType.XMLUTF8);
-
-            StructuredDocumentUtils.copyElements(newParam, newParam, xptDoc);
-
-            // put the parms back.
-            padv.putServiceParam(assignedID, newParam);
-
-            // publish the new advertisement
-            DiscoveryService discovery = group.getDiscoveryService();
-
-            if (discovery != null) {
-                discovery.publish(padv, DiscoveryService.INFINITE_LIFETIME, DiscoveryService.DEFAULT_EXPIRATION);
-            }
-        } catch (Exception ex) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Exception removing messsage transport ", ex);
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean addMessengerEventListener(MessengerEventListener listener, int prio) {
-        int priority = prio;
-
-        if (priority > EndpointService.HighPrecedence) {
-            priority = EndpointService.HighPrecedence;
-        }
-
-        if (priority < EndpointService.LowPrecedence) {
-            priority = EndpointService.LowPrecedence;
-        }
-
-        return passiveMessengerListeners[priority].add(listener);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean removeMessengerEventListener(MessengerEventListener listener, int prio) {
-        int priority = prio;
-
-        if (priority > EndpointService.HighPrecedence) {
-            priority = EndpointService.HighPrecedence;
-        }
-        if (priority < EndpointService.LowPrecedence) {
-            priority = EndpointService.LowPrecedence;
-        }
-
-        return passiveMessengerListeners[priority].remove(listener);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean addIncomingMessageListener(EndpointListener listener, String serviceName, String serviceParam) {
-
-        if (null == listener) {
-            throw new IllegalArgumentException("EndpointListener must be non-null");
-        }
-
-        if (null == serviceName) {
-            throw new IllegalArgumentException("serviceName must not be null");
-        }
-
-        if (-1 != serviceName.indexOf('/')) {
-            throw new IllegalArgumentException("serviceName may not contain '/' characters");
-        }
-
-        String address = serviceName;
-
-        if (null != serviceParam) {
-            address += "/" + serviceParam;
-        }
-
-        synchronized (incomingMessageListeners) {
-            if (incomingMessageListeners.containsKey(address)) {
-                return false;
-            }
-
-            InboundMeter incomingMessageListenerMeter = null;
-
-            if (EndpointMeterBuildSettings.ENDPOINT_METERING && (endpointServiceMonitor != null)) {
-                incomingMessageListenerMeter = endpointServiceMonitor.getInboundMeter(serviceName, serviceParam);
-            }
-
-            incomingMessageListeners.put(address, listener);
-        }
-
-        if (parentEndpoint != null) {
-            if (serviceName.startsWith(ChannelMessenger.InsertedServicePrefix)) {
-                // The listener name is already re-written.
-                // The listener is already a quota listener; we made extra sure of that before tucking it into our local map.
-                parentEndpoint.addIncomingMessageListener(listener, serviceName, serviceParam);
-            } else {
-                parentEndpoint.addIncomingMessageListener(listener, myServiceName, address);
-            }
-        }
-
-        return true;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public EndpointListener getIncomingMessageListener(String serviceName, String serviceParam) {
-
-        if (null == serviceName) {
-            throw new IllegalArgumentException("serviceName must not be null");
-        }
-
-        EndpointListener listener = null;
-
-        if (null != serviceParam) {
-            listener = incomingMessageListeners.get(serviceName + "/" + serviceParam);
-        }
-
-        // Didn't find it with param, maybe there is a generic listener for the service
-        if (listener == null) {
-            listener = incomingMessageListeners.get(serviceName);
-        }
-
-        // Didn't find it still, try the compatibility name.
-        if (listener == null) {
-            listener = incomingMessageListeners.get(serviceName + serviceParam);
-
-            if ((null != listener) && Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Found handler only via compatibility listener : " + serviceName + serviceParam);
-            }
-        }
-
-        return listener;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public EndpointListener removeIncomingMessageListener(String serviceName, String serviceParam) {
-        if (null == serviceName) {
-            throw new IllegalArgumentException("serviceName must not be null");
-        }
-
-        if (-1 != serviceName.indexOf('/')) {
-            throw new IllegalArgumentException("serviceName may not contain '/' characters");
-        }
-
-        String address = serviceName;
-
-        if (null != serviceParam) {
-            address += "/" + serviceParam;
-        }
-
-        EndpointListener removedListener;
-        synchronized (incomingMessageListeners) {
-            removedListener = incomingMessageListeners.remove(address);
-        }
-
-        if (parentEndpoint != null) {
-            if (serviceName.startsWith(ChannelMessenger.InsertedServicePrefix)) {
-                parentEndpoint.removeIncomingMessageListener(serviceName, serviceParam);
-            } else {
-                parentEndpoint.removeIncomingMessageListener(myServiceName, address);
-            }
-        }
-        return removedListener;
-    }
-
-    /**
-     * Returns a local transport that can send to the given address. For now
-     * this is based only on the protocol name.
-     *
-     * @param addr the endpoint address
-     * @return the transport if the address protocol is supported by this transport
-     */
-    private MessageSender getLocalSenderForAddress(EndpointAddress addr) {
-
-        Iterator<MessageTransport> localTransports = getAllLocalTransports();
-
-        while (localTransports.hasNext()) {
-            MessageTransport transpt = localTransports.next();
-            if (!transpt.getProtocolName().equals(addr.getProtocolName())) {
-                continue;
-            }
-
-            if (!(transpt instanceof MessageSender)) {
-                continue;
-            }
-            
-            return (MessageSender) transpt;
-        }
-        return null;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Note: canonical messenger itself does not do any address rewriting.
-     * Any address rewriting must be specified when getting a channel. However,
-     * canonical knows the default group redirection for its owning endpoint and
-     * will automatically skip redirection if it is the same.
-     */
-
-    public Messenger getCanonicalMessenger(EndpointAddress addr, Object hint) {
-        if (addr == null) {
-            throw new IllegalArgumentException("null endpoint address not allowed.");
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            Throwable trace = new Throwable("Stack Trace");
-            StackTraceElement elements[] = trace.getStackTrace();
-
-            int position = 1;
-
-            while (elements[position].getClassName().startsWith("net.jxta.impl.endpoint.EndpointService")) {
-                position++;
-            }
-
-            if ((elements.length - 1) == position) {
-                position--;
-            }
-
-            LOG.fine("Get Messenger for " + addr + " by " + elements[position]);
-        }
-
-        // Check the canonical map.
-        synchronized (messengerMap) {
-            Reference<Messenger> ref = messengerMap.get(addr);
-
-            if (ref != null) {
-                Messenger found = ref.get();
-
-                // If it is USABLE, return it.
-                if ((found != null) && ((found.getState() & Messenger.USABLE) != 0)) {
-                    return found;
-                }
-
-                // It has been GCed or is no longer USABLE. Make room for a new one.
-                messengerMap.remove(addr);
-            }
-
-            if (getLocalSenderForAddress(addr) != null) {
-                OutboundMeter messengerMeter = null;
-
-                if (EndpointMeterBuildSettings.ENDPOINT_METERING && (endpointServiceMonitor != null)) {
-                    messengerMeter = endpointServiceMonitor.getOutboundMeter(addr);
-                }
-
-                // The hint is saved in the canonical messenger and will be used
-                // when that virtual messenger first faces the need to create a
-                // transport messenger. As of now, the logical dest is unknown.
-                Messenger m = new CanonicalMessenger(vmQueueSize, addr, null, hint, messengerMeter);
-
-                messengerMap.put(m.getDestinationAddress(), new SoftReference<Messenger>(m));
-                return m;
-            }
-        }
-
-        // If we're here, we do not have any such transport.
-        // Try our ancestors enpoints, if any.
-
-        if (parentEndpoint == null) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Could not create messenger for : " + addr);
-            }
-            return null;
-        }
-
-        return parentEndpoint.getCanonicalMessenger(addr, hint);
-    }
-
-    /**
-     * Return only the message transport registered locally.
-     */
-    protected Iterator<MessageTransport> getAllLocalTransports() {
-        List<MessageTransport> transportList;
-
-        synchronized (messageTransports) {
-            transportList = new ArrayList<MessageTransport>(messageTransports);
-        }
-
-        return transportList.iterator();
-    }
-
-    /**
-     * Returns a messenger for the specified address from one of the Message
-     * Transports registered with this very endpoint service. Message
-     * Transports inherited from parent groups will not be used.
-     *
-     * @param addr The destination address of the desired Messenger.
-     * @param hint A hint provided to the Message Transport which may assist it
-     *             in creating the messenger.
-     * @return A Messenger for the specified destination address or {@code null}
-     *         if no Messenger could be created.
-     */
-    private Messenger getLocalTransportMessenger(EndpointAddress addr, Object hint) {
-        MessageSender sender = getLocalSenderForAddress(addr);
-        Messenger messenger = null;
-
-        if (sender != null) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Trying address \'" + addr + "\' with : " + sender);
-            }
-            messenger = sender.getMessenger(addr, hint);
-        }
-
-        if (messenger == null) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Couldn\'t create messenger for : " + addr);
-            }
-        }
-        return messenger;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized void addIncomingMessageFilterListener(MessageFilterListener listener, String namespace, String name) {
-        if (null == listener) {
-            throw new IllegalArgumentException("listener must be non-null");
-        }
-
-        FilterListenerAndMask aFilter = new FilterListenerAndMask(listener, namespace, name);
-
-        incomingFilterListeners.add(aFilter);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized void addOutgoingMessageFilterListener(MessageFilterListener listener, String namespace, String name) {
-        if (null == listener) {
-            throw new IllegalArgumentException("listener must be non-null");
-        }
-
-        FilterListenerAndMask aFilter = new FilterListenerAndMask(listener, namespace, name);
-
-        outgoingFilterListeners.add(aFilter);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized MessageFilterListener removeIncomingMessageFilterListener(MessageFilterListener listener, String namespace, String name) {
-        Iterator<FilterListenerAndMask> eachListener = incomingFilterListeners.iterator();
-
-        while (eachListener.hasNext()) {
-            FilterListenerAndMask aFilter = eachListener.next();
-
-            if (listener == aFilter.listener) {
-                eachListener.remove();
-                return listener;
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized MessageFilterListener removeOutgoingMessageFilterListener(MessageFilterListener listener, String namespace, String name) {
-        Iterator<FilterListenerAndMask> eachListener = outgoingFilterListeners.iterator();
-
-        while (eachListener.hasNext()) {
-            FilterListenerAndMask aFilter = eachListener.next();
-
-            if ((listener == aFilter.listener)
-                    && ((null != namespace) ? namespace.equals(aFilter.namespace) : (null == aFilter.namespace))
-                    && ((null != name) ? name.equals(aFilter.name) : (null == aFilter.name))) {
-                eachListener.remove();
-                return listener;
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * <p/>Redistribute the event to those interested.
-     */
-    public boolean messengerReady(MessengerEvent event) {
-
-        // FIXME - jice@jxta.org 20040413: now that we share messengers, we 
-        // should be able to get rid of most of this mess, and in the router, 
-        // and the relay too.
-
-        Messenger messenger = event.getMessenger();
-        Messenger messengerForHere;
-        EndpointAddress connAddr = event.getConnectionAddress();
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("New " + messenger + " for : " +
-                    messenger.getDestinationAddress() + " (" +
-                    messenger.getLogicalDestinationAddress() + ")");
-        }
-
-        int highestPrec = EndpointService.HighPrecedence;
-        int lowestPrec = EndpointService.LowPrecedence;
-
-        // If there's no connection address we just pass the messenger around
-        // everywhere; it is unspecified which group it is for.
-        // Else, we must figure out if it is for this group, or must be
-        // passed upStack (if any).
-        if (connAddr != null) {
-            String cgServiceName = connAddr.getServiceName();
-
-            // See if there is a mangling. If not, this means this was sent
-            // within this group through a local xport, so it is for here. Else 
-            // it may be for here (from below) or for upstack.
-
-            if (cgServiceName == null || !cgServiceName.startsWith(ChannelMessenger.InsertedServicePrefix)) {
-                // FIXME: jice@jxta.org - 20030512 If we restrict use to "here"
-                // we make most backchannels useless. So, the statement below is
-                // commented out.  Ideally we should not have to worry about the 
-                // group targetting of connections, only messages. However the
-                // way the relay and the router have to split messengers makes
-                // it necessary. This may only be fixed by re-organizing 
-                // globally the management of incoming messengers in the 
-                // endpoint, so that router and relay no-longer need to claim 
-                // exclusive use of messengers. Since relay clients set the 
-                // group properly, their messengers are not affected by this
-                // branch of the code.
-                // lowestPrec = EndpointService.LowPrecedence + 1;
-            } else if (!myServiceName.equals(cgServiceName)) {
-                // This is for upstack only
-                highestPrec = EndpointService.LowPrecedence;
-            } else {
-                // Mangling present and this is for here (and therefore this is
-                // from below). We must demangle. Wrapping is figured later, 
-                // since we may also have to wrap if there the
-                lowestPrec = EndpointService.LowPrecedence + 1;
-
-                String serviceParam = connAddr.getServiceParameter();
-                String realService = null;
-                String realParam = null;
-
-                if (null != serviceParam) {
-                    int slashAt = serviceParam.indexOf('/');
-
-                    if (-1 == slashAt) {
-                        realService = serviceParam;
-                    } else {
-                        realService = serviceParam.substring(0, slashAt);
-                        realParam = serviceParam.substring(slashAt + 1);
-                    }
-                }
-
-                connAddr = new EndpointAddress(connAddr, realService, realParam);
-            }
-        }
-
-        // We make a channel in all cases, the channel will decide if the desired grp redirection
-        // requires address rewriting or not.
-
-        // As for a MessageWatcher for implementing sendMessage-with-listener, we do not provide one
-        // mostly because it is difficult to get a hold on the only appropriate one: that of the endpoint
-        // service interface of the listener's owner. So, incoming messengers will not support the listener-based send API.
-        // Unless someone adds a watcher by hand.
-        messengerForHere = event.getMessenger().getChannelMessenger(group.getPeerGroupID(), null, null);
-
-        // Call the listener highest precedence first. The first one that claims
-        // the messenger wins.
-        for (int prec = highestPrec + 1; prec-- > lowestPrec;) {
-            MessengerEvent newMessenger = new MessengerEvent(event.getSource(),
-                    prec == EndpointService.LowPrecedence ? messenger : messengerForHere, connAddr);
-
-            // We need to grab the listeners and release the lock. Otherwise the
-            // sometimes too long operations performed by the listener creates
-            // an unnecessary contention.
-            // The side effect is that a listener can in theory be called after
-            // remove returned. It is unlikely to be a problem for messenger
-            // events, but if it is, then we'll have to add reader-writer synch.
-            Collection<MessengerEventListener> allML = new ArrayList<MessengerEventListener>(passiveMessengerListeners[prec]);
-            for (MessengerEventListener listener : allML) {
-                try {
-                    if (listener.messengerReady(newMessenger)) {
-                        // A listener has taken the messenger. we're done.
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine(newMessenger + " claimed by " + listener);
-                        }
-                        return true;
-                    }
-                } catch (Throwable all) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Uncaught Throwable in listener " + listener, all);
-                    }
-                }
-            }
-        }
-
-        // Note that the messenger was not wanted.
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Nobody cared about " + event);
-        }
-        return false;
-    }
-
-    // public MessengerEventListener getMessengerEventListener() {
-    // return this;
-    // }
-
-    // try to find the relay service in our
-    // hierachy of endpoints to register our listener group
-    // since the group has to register into the relay service. This is not
-    // very pretty, but the other way was even worth to register the relay
-    // into the endpoint!
-
-    private void addActiveRelayListener(PeerGroup listeningGroup) {
-        PeerGroup parentGroup = group.getParentGroup();
-        while (parentGroup != null) {
-            EndpointService parentEndpoint = parentGroup.getEndpointService();
-
-            for (Iterator<MessageTransport> it = parentEndpoint.getAllMessageTransports(); it.hasNext();) {
-                MessageTransport mt = it.next();
-
-                if ((mt instanceof RelayClient)) {
-                    ((RelayClient) mt).addActiveRelayListener(listeningGroup);
-                    break;
-                }
-            }
-            parentGroup = parentGroup.getParentGroup();
-        }
-    }
-
-    // try to find the relay service in our
-    // hierachy of endpoints to unregister our listener group
-    private void removeActiveRelayListener(PeerGroup listeningGroup) {
-        PeerGroup parentGroup = group.getParentGroup();
-
-        while (parentGroup != null) {
-            EndpointService parentEndpoint = parentGroup.getEndpointService();
-
-            for (Iterator<MessageTransport> it = parentEndpoint.getAllMessageTransports(); it.hasNext();) {
-                MessageTransport mt = it.next();
-
-                if ((mt instanceof RelayClient)) {
-                    ((RelayClient) mt).removeActiveRelayListener(listeningGroup);
-                    break;
-                }
-            }
-            parentGroup = parentGroup.getParentGroup();
-        }
-    }
-
-    /*
-     * Convenience legacy methods. They are here to reduce the complexity of the class hierarchy but are not supposed to be used.
-     */
-
-    /**
-     * {@inheritDoc}
-     *
-     * @deprecated legacy method.
-     */
-    @Deprecated
-    public boolean ping(EndpointAddress addr) {
-        throw new UnsupportedOperationException("Legacy method not implemented. Use an interface object.");
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * @deprecated legacy method.
-     */
-    @Deprecated
-    public boolean getMessenger(MessengerEventListener listener, EndpointAddress addr, Object hint) {
-        throw new UnsupportedOperationException("Legacy method not implemented. Use an interface object.");
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * convenience method not supported here.
-     */
-    public Messenger getMessenger(EndpointAddress addr) {
-        throw new UnsupportedOperationException("Convenience method not implemented. Use an interface object.");
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * convenience method not supported here.
-     */
-    public Messenger getMessengerImmediate(EndpointAddress addr, Object hint) {
-        throw new UnsupportedOperationException("Convenience method not implemented. Use an interface object.");
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * convenience method not supported here.
-     */
-    public Messenger getMessenger(EndpointAddress addr, Object hint) {
-        throw new UnsupportedOperationException("Convenience method not implemented. Use an interface object.");
-    }
-
-    /**
-     * Returns a Direct Messenger that may be used to send messages via  this endpoint
-     * to the specified destination.
-     *
-     * @param address the destination address.
-     * @param hint the messenger hint, if any, otherwise null.
-     * @param exclusive if true avoids caching the messenger
-     * @return The messenger or {@code null} is returned if the destination address is not reachable.
-     * @throws IllegalArgumentException if hint is not of RouteAdvertisement, or PeerAdvertisement type.
-     */
-    public Messenger getDirectMessenger(EndpointAddress address, Object hint, boolean exclusive) {
-
-        if (!exclusive) {
-            Reference<Messenger> reference = directMessengerMap.get(address);
-            if (reference != null) {
-                Messenger messenger = reference.get();
-                if (messenger != null && !messenger.isClosed()) {
-                    return messenger;
-                }
-            }
-        }
-
-        // We must have access to a TCP transport to create a direct messenger.
-        TcpTransport tcpTransport = (TcpTransport) getMessageTransport("tcp");
-
-        if ((tcpTransport != null) && (hint != null)) {
-            RouteAdvertisement route;
-            EndpointAddress direct;
-            Messenger messenger;
-            if (hint instanceof RouteAdvertisement) {
-                route = (RouteAdvertisement) hint;
-            } else if (hint instanceof PeerAdvertisement) {
-                route = EndpointUtils.extractRouteAdv((PeerAdvertisement) hint);
-            } else {
-                throw new IllegalArgumentException("Unknown route hint object type" + hint);
-            }
-            
-            for (EndpointAddress transportAddr : route.getDestEndpointAddresses()) {
-                if (transportAddr.getProtocolName().equals("tcp")) {                    
-                    direct = createDirectAddress(transportAddr, address);
-                    // direct messengers are non self destructive
-                    messenger = tcpTransport.getMessenger(direct, route, false);
-                    if (messenger != null) {
-                        if (!exclusive) {
-                            directMessengerMap.put(address, new WeakReference<Messenger>(messenger));
-                        }
-                        return messenger;
-                    }
-                }
-            }
-        }
-        
-        return null;
-    }
-
-    /**
-     * Given a transport address and service address, create a mangled endpoint address
-     *
-     * @param transportAddr   the transport messenger address
-     * @param serviceEndpoint the service endpoint
-     * @return an composite endpoint address
-     */
-    private EndpointAddress createDirectAddress(EndpointAddress transportAddr, EndpointAddress serviceEndpoint) {
-        //physical transport address
-        StringBuilder destStr = new StringBuilder(transportAddr.toString()).append("/");
-        // EndpointService
-        destStr.append(ENDPOINTSERVICE_NAME);
-        //Dest peergroup
-        destStr.append(":").append(group.getPeerGroupID().getUniqueValue().toString()).append("/");
-        //Service endpoint
-        destStr.append(serviceEndpoint.getServiceName()).append("/").append(serviceEndpoint.getServiceParameter());
-
-        //return new EndpointAddress(transportAddr, serviceEndpoint.getServiceName(), serviceEndpoint.getServiceParameter());
-        return new EndpointAddress(destStr.toString());
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/EndpointServiceInterface.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/EndpointServiceInterface.java
deleted file mode 100644 (file)
index 8cc33d7..0000000
+++ /dev/null
@@ -1,494 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.endpoint;
-
-import net.jxta.document.Advertisement;
-import net.jxta.endpoint.ChannelMessenger;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointListener;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.ListenerAdaptor;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageFilterListener;
-import net.jxta.endpoint.MessageTransport;
-import net.jxta.endpoint.Messenger;
-import net.jxta.endpoint.MessengerEventListener;
-import net.jxta.id.ID;
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.impl.peergroup.StdPeerGroup;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.protocol.ModuleImplAdvertisement;
-
-import java.lang.ref.Reference;
-import java.lang.ref.WeakReference;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.WeakHashMap;
-
-import net.jxta.platform.Module;
-
-/**
- * Provides an interface object appropriate for applications using the endpoint
- * service. The interface provides a number of convenience features and
- * implementation necessary for legacy features.
- */
-class EndpointServiceInterface implements EndpointService {
-
-    /**
-     * The service interface that we will be fronting.
-     */
-    private final EndpointServiceImpl theRealThing;
-
-    /**
-     * The number of active instances of this class. We use this for deciding
-     * when to instantiate and shutdown the listener adaptor.
-     */
-    private static int activeInstanceCount = 0;
-
-    /**
-     * Provides emulation of the legacy send-message-with-listener and get-messenger-with-listener APIs.
-     */
-    private static ListenerAdaptor listenerAdaptor;
-
-    /**
-     * The cache of channels. If a given owner of this EndpointService interface
-     * object requests channels for the same exact destination multiple times,
-     * we will return the same channel object as much as possible.  We keep
-     * channels in a weak map, so that when channels are discarded, they
-     * eventually disappear.  Channels that have messages in them are always
-     * referenced. Therefore, this prevents the creation of more than one
-     * channel with messages in it for the same destination in the same context
-     * (owner of interface object - typically one module). This is required to
-     * properly support the common (and convenient) pattern:
-     * <p/>
-     * <code>m = endpointServiceInterface.getMessenger(); messenger.sendMessage(); m = null;</code>
-     * <p/>
-     * If that was not kept in check, it would be possible to inadvertently
-     * create an infinite number of channels with pending messages, thus an
-     * infinite number of messages too.
-     */
-    private final Map<EndpointAddress, Reference<Messenger>> channelCache = new WeakHashMap<EndpointAddress, Reference<Messenger>>();
-
-    /**
-     * Builds a new interface object.
-     *
-     * @param endpointService the endpoint service that we will front.
-     */
-    public EndpointServiceInterface(EndpointServiceImpl endpointService) {
-        theRealThing = endpointService;
-        synchronized (this.getClass()) {
-            activeInstanceCount++;
-            if (1 == activeInstanceCount) {
-                listenerAdaptor = new ListenerAdaptor(Thread.currentThread().getThreadGroup(), ((StdPeerGroup) endpointService.getGroup()).getExecutor());
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * This is rather heavy-weight if instances are frequently created and
-     * discarded since finalization significantly delays GC.
-     */
-    @Override
-    protected void finalize() throws Throwable {
-        synchronized (this.getClass()) {
-            activeInstanceCount--;
-            if (0 == activeInstanceCount) {
-                listenerAdaptor.shutdown();
-                listenerAdaptor = null;
-            }
-        }
-        super.finalize();
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * it is there only to satisfy the requirements of the interface that we
-     * implement. Ultimately, the API should define two levels of interfaces :
-     * one for the real service implementation and one for the interface object.
-     * Right now it feels a bit heavy to so that since the only different
-     * between the two would be init() and may-be getName().
-     */
-    public void init(PeerGroup peerGroup, ID id, Advertisement implAdv) {
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * This is here for temporary class hierarchy reasons.
-     * it is ALWAYS ignored. By definition, the interface object
-     * protects the real object's start/stop methods from being called
-     */
-    public int startApp(String[] arg) {
-        return Module.START_OK;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * This is here for temporary class hierarchy reasons.
-     * it is ALWAYS ignored. By definition, the interface object
-     * protects the real object's start/stop methods from being called
-     * <p/>
-     * This request is currently ignored.
-     */
-    public void stopApp() {
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ModuleImplAdvertisement getImplAdvertisement() {
-        return theRealThing.getImplAdvertisement();
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Sort of absurd but this is part of the API we're implementing.
-     * We would not do a two-level API just for that.
-     */
-    public EndpointService getInterface() {
-        return this;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerGroup getGroup() {
-        return theRealThing.getGroup();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Messenger getCanonicalMessenger(EndpointAddress addr, Object hint) {
-        // XXX: maybe we should enforce the stripping of the address here.
-        // That would prevent application from making canonical messengers with a variety of service names and
-        // service params. On the other hand that would cost useless cloning of endp addrs and prevent future
-        // flexibility regarding QOS params, possibly. Be liberal for now.
-        return theRealThing.getCanonicalMessenger(addr, hint);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Messenger getMessengerImmediate(EndpointAddress addr, Object hint) {
-        // Note: for now, the hint is not used for canonicalization (hint != QOS).
-        synchronized (channelCache) {
-            Reference<Messenger> existing = channelCache.get(addr);
-
-            if (existing != null) {
-                Messenger messenger = existing.get();
-                if ((messenger != null) && ((messenger.getState() & Messenger.USABLE) != 0)) {
-                    return messenger;
-                }
-            }
-        }
-        
-        // We do not have a good one at hand. Make a new one.
-
-        // Use the stripped address to get a canonical msngr; not doing so
-        // would reduce the sharing to almost nothing.
-        EndpointAddress plainAddr = new EndpointAddress(addr, null, null);
-
-        Messenger found = theRealThing.getCanonicalMessenger(plainAddr, hint);
-
-        // Address must not be a supported one.
-        if (found == null) {
-            return null;
-        }
-
-        // Get a channel for that servicename and serviceparam. redirect to this group.
-
-        // NOTE: This assumes that theRealThing.getGroup() is really the group where the application that obtained
-        // this interface object lives. This is the case today because all groups have their own endpoint service.
-        // In the future, interface objects may refer to a group context that is not necessarily the group where
-        // "therealThing" lives. When that happens, this interface object will have to know which group it works
-        // for without asking "theRealThing".
-
-        ChannelMessenger res = (ChannelMessenger) found.getChannelMessenger(theRealThing.getGroup().getPeerGroupID(),
-                addr.getServiceName(), addr.getServiceParameter());
-
-        synchronized (channelCache) {
-            // We have to check again. May be we did all that in parallel with some other thread and it beat
-            // us to the finish line. In which case, substitute the existing one and throw ours away.
-            Reference<Messenger> existing = channelCache.get(addr);
-
-            if (existing != null) {
-                Messenger messenger = existing.get();
-                if ((messenger != null) && ((messenger.getState() & Messenger.USABLE) != 0)) {
-                    return messenger;
-                }
-            }
-            // The listenerAdaptor of this interface obj is used to support the sendMessage-with-listener API.
-            res.setMessageWatcher(listenerAdaptor);
-            channelCache.put(res.getDestinationAddress(), new WeakReference<Messenger>(res));
-        }
-        return res;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Messenger getMessenger(EndpointAddress addr) {
-        return getMessenger(addr, null);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Messenger getMessenger(EndpointAddress addr, Object hint) {
-
-        // Get an unresolved messenger (that's immediate).
-        Messenger messenger = getMessengerImmediate(addr, hint);
-
-        if (messenger == null) {
-            return null;
-        }
-
-        // Now ask the messenger to resolve: this legacy blocking API ensures 
-        // that only successfully resolved messengers are ever returned.
-        messenger.resolve();
-        try {
-            messenger.waitState(Messenger.RESOLVED | Messenger.TERMINAL, TimeUtils.AMINUTE);
-        } catch (InterruptedException ie) {
-            Thread.interrupted();
-        }
-
-        // check the state
-        int state = messenger.getState();
-
-        if ((state & Messenger.TERMINAL) != 0) {
-            return null;
-        }
-        if ((state & Messenger.RESOLVED) == 0) {
-            // Not failed yet. But too late for us.
-            return null;
-        }
-        return messenger;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void propagate(Message msg, String serviceName, String serviceParam) {
-        theRealThing.propagate(msg, serviceName, serviceParam, Integer.MAX_VALUE);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void propagate(Message msg, String serviceName, String serviceParam, int initialTTL) {
-        theRealThing.propagate(msg, serviceName, serviceParam, initialTTL);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void demux(Message msg) {
-        theRealThing.demux(msg);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void processIncomingMessage(Message message, EndpointAddress source, EndpointAddress destination) {
-        theRealThing.processIncomingMessage(message, source, destination);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Deprecated
-    public boolean ping(EndpointAddress addr) {
-        return null != getMessengerImmediate(addr, null);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public MessengerEventListener addMessageTransport(MessageTransport transpt) {
-        // FIXME TOO: We should probably make the interface refuse to do it.
-        // But that will have to wait until we have criteria to decide who
-        // gets an interface object and who gets the real thing. In the
-        // meantime just do it.
-        return theRealThing.addMessageTransport(transpt);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean removeMessageTransport(MessageTransport transpt) {
-        // FIXME TOO: We should probably make the interface refuse to do it.
-        // But that will have to wait until we have criteria to decide who
-        // gets an interface object and who gets the real thing. In the
-        // meantime just do it.
-        return theRealThing.removeMessageTransport(transpt);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Iterator<MessageTransport> getAllMessageTransports() {
-        return theRealThing.getAllMessageTransports();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public MessageTransport getMessageTransport(String name) {
-        return theRealThing.getMessageTransport(name);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean addIncomingMessageListener(EndpointListener listener, String serviceName, String serviceParam) {
-        return theRealThing.addIncomingMessageListener(listener, serviceName, serviceParam);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public EndpointListener getIncomingMessageListener(String serviceName, String serviceParam) {
-        return theRealThing.getIncomingMessageListener(serviceName, serviceParam);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void addIncomingMessageFilterListener(MessageFilterListener listener, String namespace, String name) {
-        theRealThing.addIncomingMessageFilterListener(listener, namespace, name);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void addOutgoingMessageFilterListener(MessageFilterListener listener, String namespace, String name) {
-        theRealThing.addOutgoingMessageFilterListener(listener, namespace, name);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public MessageFilterListener removeIncomingMessageFilterListener(MessageFilterListener listener, String namespace, String name) {
-        return theRealThing.removeIncomingMessageFilterListener(listener, namespace, name);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public MessageFilterListener removeOutgoingMessageFilterListener(MessageFilterListener listener, String namespace, String name) {
-        return theRealThing.removeOutgoingMessageFilterListener(listener, namespace, name);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public EndpointListener removeIncomingMessageListener(String serviceName, String serviceParam) {
-        return theRealThing.removeIncomingMessageListener(serviceName, serviceParam);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean addMessengerEventListener(MessengerEventListener listener, int prio) {
-        return theRealThing.addMessengerEventListener(listener, prio);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean removeMessengerEventListener(MessengerEventListener listener, int prio) {
-        return theRealThing.removeMessengerEventListener(listener, prio);
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * @deprecated legacy support
-     */
-    @Deprecated
-    public boolean getMessenger(MessengerEventListener listener, EndpointAddress addr, Object hint) {
-        Messenger messenger = getMessengerImmediate(addr, hint);
-        if (messenger == null) {
-            return false;
-        }
-
-        if (!listenerAdaptor.watchMessenger(listener, messenger)) {
-            return false;
-        }
-
-        // Make sure that resolution is being attempted if not already in progress.
-        messenger.resolve();
-        return true;
-    }
-
-    /**
-     * Returns a Direct Messenger that may be used to send messages via  this endpoint to the specified destination.
-     *
-     * @param addr the destination address.
-     * @param hint the messenger hint, if any, otherwise null.
-     * @param exclusive if true avoids caching the messenger
-     * @return The messenger or {@code null} is returned if the destination address is not reachable.
-     */
-    public Messenger getDirectMessenger(EndpointAddress addr, Object hint, boolean exclusive) {
-        return theRealThing.getDirectMessenger(addr, hint, exclusive);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/EndpointUtils.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/EndpointUtils.java
deleted file mode 100644 (file)
index 2a5c25f..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- *  Copyright (c) 2001-2004 Sun Microsystems, Inc. All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint;
-
-
-import java.util.Enumeration;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.XMLElement;
-import net.jxta.logging.Logging;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.RouteAdvertisement;
-
-
-/**
- *  Utility functions related to the Endpoint Service.
- */
-public final class EndpointUtils {
-
-    /**
-     * Logger
-     */
-    private static final transient Logger LOG = Logger.getLogger(EndpointUtils.class.getName());
-   
-    /**
-     * Extracts a route advertisement from a peer advertisement.
-     *
-     * @param adv The peer advertisement believed to contain a route advertisement.
-     * @return The extracted route advertisement or {@code null} if a route
-     * advertisement could not be extracted.
-     */
-    public static RouteAdvertisement extractRouteAdv(PeerAdvertisement adv) {
-        
-        try {
-            // Get its EndpointService advertisement
-            XMLElement endpParam = (XMLElement) adv.getServiceParam(PeerGroup.endpointClassID);
-            
-            if (endpParam == null) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("No Endpoint Params");
-                }
-                return null;
-            }
-            
-            // get the Route Advertisement element
-            Enumeration paramChilds = endpParam.getChildren(RouteAdvertisement.getAdvertisementType());
-            XMLElement param;
-            
-            if (paramChilds.hasMoreElements()) {
-                param = (XMLElement) paramChilds.nextElement();
-            } else {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("No Route Adv in Peer Adv");
-                }
-                return null;
-            }
-            
-            // build the new route
-            RouteAdvertisement route = (RouteAdvertisement) AdvertisementFactory.newAdvertisement(param);
-            
-            // Embedded routes often don't contain the peer id.
-            route.setDestPeerID(adv.getPeerID());
-            
-            return route;
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "failed to extract radv", e);
-            }
-        }
-        
-        return null;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/IPUtils.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/IPUtils.java
deleted file mode 100644 (file)
index 60aafbf..0000000
+++ /dev/null
@@ -1,511 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint;
-
-
-import java.io.IOException;
-import java.net.BindException;
-import java.net.Inet6Address;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.NetworkInterface;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.SocketException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Random;
-import javax.net.ServerSocketFactory;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-
-/**
- * Utility methods for use by IP based transports.
- */
-public final class IPUtils {
-    
-    /**
-     * Logger
-     */
-    private final static Logger LOG = Logger.getLogger(IPUtils.class.getName());
-    
-    final static Random random = new Random();
-    
-    final static String IPV4ANYADDRESS = "0.0.0.0";
-    final static String IPV6ANYADDRESS = "::";
-    
-    final static String IPV4LOOPBACK = "127.0.0.1";
-    final static String IPV6LOOPBACK = "::1";
-    
-    /**
-     * Constant which works as the IP "Any Address" value
-     */
-    public final static InetAddress ANYADDRESS;
-    public final static InetAddress ANYADDRESSV4;
-    public final static InetAddress ANYADDRESSV6;
-    
-    /**
-     * Constant which works as the IP "Local Loopback" value;
-     */
-    public final static InetAddress LOOPBACK;
-    public final static InetAddress LOOPBACKV4;
-    public final static InetAddress LOOPBACKV6;
-    
-    /**
-     * Socket factory to allow changing the way Sockets are created
-     * and connected.  A null value is ok and results in the regular
-     * connectToFromNoFactory being used.
-     *
-     * <p/>Plugin in a different implementation via setSocketFactory().
-     */
-    private static SocketFactory socketFactory;
-    
-    /**
-     * Socket factory to allow changing the way Sockets are created
-     * and connected.  A null value is ok and results in the regular
-     * connectToFromNoFactory being used.
-     *
-     * <p/>Plugin in a different implementation via setSocketFactory().
-     */
-    private static ServerSocketFactory serverSocketFactory;
-    
-    static {
-        InetAddress GET_ADDRESS = null;
-        
-        try {
-            GET_ADDRESS = InetAddress.getByName(IPV4ANYADDRESS);
-        } catch (Exception ignored) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("failed to intialize ANYADDRESSV4. Not fatal");
-            }
-        }
-        
-        ANYADDRESSV4 = GET_ADDRESS;
-
-        InetAddress GET_ANYADDRESSV6 = null;
-
-        GET_ADDRESS = null;
-        try {
-            GET_ADDRESS = InetAddress.getByName(IPV6ANYADDRESS);
-        } catch (Exception ignored) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("failed to intialize IPV6ANYADDRESS. Not fatal");
-            }
-        }
-        
-        ANYADDRESSV6 = GET_ADDRESS;
-        
-        ANYADDRESS = (ANYADDRESSV4 == null) ? ANYADDRESSV6 : ANYADDRESSV4;
-        
-        GET_ADDRESS = null;
-        try {
-            GET_ADDRESS = InetAddress.getByName(IPV4LOOPBACK);
-        } catch (Exception ignored) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("failed to intialize IPV4LOOPBACK. Not fatal");
-            }
-        }
-        
-        LOOPBACKV4 = GET_ADDRESS;
-        
-        GET_ADDRESS = null;
-        try {
-            GET_ADDRESS = InetAddress.getByName(IPV6LOOPBACK);
-        } catch (Exception ignored) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("failed to intialize ANYADDRESSV4. Not fatal");
-            }
-        }
-        
-        LOOPBACKV6 = GET_ADDRESS;
-        
-        LOOPBACK = (LOOPBACKV4 == null) ? LOOPBACKV6 : LOOPBACKV4;
-        
-        if (LOOPBACK == null || ANYADDRESS == null) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("failure initializing statics. Neither IPV4 nor IPV6 seem to work.");
-            }
-            
-            throw new IllegalStateException("failure initializing statics. Neither IPV4 nor IPV6 seem to work.");
-        }
-    }
-    
-    /**
-     * This is a static utility class, you don't make instances.
-     */
-    private IPUtils() {}
-    
-    /**
-     * Provide an iterator which returns all of the local InetAddresses for this
-     * host.
-     *
-     * @return iterator of InetAddress which is all of the InetAddress for all
-     *         local interfaces.
-     */
-    public static Iterator<InetAddress> getAllLocalAddresses() {
-        List<InetAddress> allAddr = new ArrayList<InetAddress>();
-        
-        Enumeration<NetworkInterface> allInterfaces = null;
-
-        try {
-            allInterfaces = NetworkInterface.getNetworkInterfaces();
-        } catch (SocketException caught) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Could not get local interfaces list", caught);
-            }
-        }
-        
-        if (null == allInterfaces) {
-            allInterfaces = Collections.enumeration(Collections.<NetworkInterface>emptyList());
-        }
-        
-        while (allInterfaces.hasMoreElements()) {
-            NetworkInterface anInterface = allInterfaces.nextElement();
-            
-            try {
-                Enumeration<InetAddress> allIntfAddr = anInterface.getInetAddresses();
-                
-                while (allIntfAddr.hasMoreElements()) {
-                    InetAddress anAddr = allIntfAddr.nextElement();
-                    
-                    if (anAddr.isLoopbackAddress() || anAddr.isAnyLocalAddress()) {
-                        continue;
-                    }
-                    
-                    if (!allAddr.contains(anAddr)) {
-                        allAddr.add(anAddr);
-                    }
-                }
-            } catch (Throwable caught) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Could not get addresses for " + anInterface, caught);
-                }
-            }
-        }
-        
-        // if nothing suitable was found then return loopback address.
-        if (allAddr.isEmpty() || Boolean.getBoolean("net.jxta.impl.IPUtils.localOnly")) {
-            if (null != LOOPBACKV4) {
-                allAddr.add(LOOPBACKV4);
-            }
-            
-            if (null != LOOPBACKV6) {
-                allAddr.add(LOOPBACKV6);
-            }
-            
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Adding loopback interfaces");
-            }
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Returning " + allAddr.size() + " addresses.");
-        }
-        
-        return allAddr.iterator();
-    }
-    
-    /**
-     * Normalized version of {@link java.net.InetAddress#getHostAddress()} that
-     * handles IPv6 addresss formatting using the style of IETF RFC 2732 and
-     * also handles removal of IPv6 scoping identifiers.
-     *
-     * @see <a href="http://www.ietf.org/rfc/rfc2732.txt" target="_blank">IETF RFC 2732 <i>MIME : IPv6 Literal Addresses in URL's</i></a>
-     * @param anAddress The address to format as a <tt>String</tt>.
-     * @return The addresss formatted as a String.
-     */
-    public static String getHostAddress(InetAddress anAddress) {
-        String hostAddress;
-        
-        if (anAddress instanceof Inet6Address) {
-            hostAddress = anAddress.getHostAddress();
-            int percentAt = hostAddress.indexOf('%');
-            
-            if (-1 == percentAt) {
-                // no scoping identifier. Just add the brackets.
-                hostAddress = "[" + hostAddress + "]";
-            } else {
-                // Remove scoping identifier. They aren't relevant when published.
-                hostAddress = "[" + hostAddress.substring(0, percentAt) + "]";
-            }
-        } else {
-            hostAddress = anAddress.getHostAddress();
-        }
-        
-        return hostAddress;
-    }
-    
-    /**
-     *  Parses a String containing a SokectAddress formatted as either:
-     *  <p/>
-     *  <pre>
-     *     &lt;host> ":" &lt;port>
-     *
-     *     "[" &lt;numeric_host> "]:" &lt;port>
-     *  </pre>
-     *  <p/>
-     *  @param anAddress The address string to be parsed.
-     *  @return The parsed address.
-     */
-    public static InetSocketAddress parseSocketAddress(String anAddress) {
-        String hostAddress;
-        String port;
-        
-        if (anAddress.startsWith("[")) {
-            int endBracketAt = anAddress.indexOf(']');
-            int portSeparatorAt = anAddress.lastIndexOf(':');
-            
-            if (-1 == endBracketAt) {
-                throw new IllegalArgumentException("missing final ]");
-            }
-            
-            if (-1 == portSeparatorAt) {
-                throw new IllegalArgumentException("missing port separator");
-            }
-            
-            if (portSeparatorAt < endBracketAt) {
-                throw new IllegalArgumentException("missing port");
-            }
-            
-            hostAddress = anAddress.substring(1, endBracketAt);
-            port = anAddress.substring(portSeparatorAt);
-        } else {
-            int portSeparatorAt = anAddress.lastIndexOf(':');
-            
-            if (-1 == portSeparatorAt) {
-                throw new IllegalArgumentException("missing port separator");
-            }
-            
-            hostAddress = anAddress.substring(0, portSeparatorAt);
-            port = anAddress.substring(portSeparatorAt + 1);
-        }
-        
-        int portNum = Integer.parseInt(port);
-        
-        return InetSocketAddress.createUnresolved(hostAddress, portNum);
-    }
-    
-    /**
-     * Create a client socket using the configured socketFactory or
-     * connectToFromNoFactory if none is available.
-     *
-     * @param inetAddress    Destination address
-     * @param port           Destination port
-     * @param usingInterface Interface to use
-     * @param localPort      local port
-     * @param timeout        timeout in millis
-     * @return a client socket with the JDK1.4 method connect().
-     * @throws IOException if an io error occurs
-     */
-    public static Socket connectToFrom(InetAddress inetAddress, int port, InetAddress usingInterface, int localPort, int timeout) throws IOException {
-        if (socketFactory != null) {
-            return socketFactory.createConnection(inetAddress, port, usingInterface, localPort, timeout);
-        } else {
-            return connectToFromNoFactory(inetAddress, port, usingInterface, localPort, timeout);
-        }
-    }
-    
-    /**
-     * Create a client socket with the JDK1.4 method connect().
-     *
-     * @param inetAddress    Destination address
-     * @param port           Destination port
-     * @param usingInterface Interface to use
-     * @param localPort      local port
-     * @param timeout        timeout in millis
-     * @return a client socket with the JDK1.4 method connect().
-     * @throws IOException if an io error occurs
-     */
-    public static Socket connectToFromNoFactory(InetAddress inetAddress, int port, InetAddress usingInterface, int localPort, int timeout) throws IOException {
-        
-        Socket socket = new Socket();
-        InetSocketAddress src = new InetSocketAddress(usingInterface, localPort);
-        InetSocketAddress dst = new InetSocketAddress(inetAddress, port);
-
-        socket.bind(src);
-        socket.connect(dst, timeout);
-        
-        return socket;
-    }
-    
-    /**
-     * makes connectToFrom create sockets with this factory.
-     *
-     * @param sf is the socket factory to use or null if you want the
-     *           default behaviour provided by connectToFromNoFactory().
-     */
-    public static void setSocketFactory(SocketFactory sf) {
-        socketFactory = sf;
-    }
-    
-    /**
-     * returns the socketFactory used by connectToFrom() to create sockets, or
-     * null if connectToFromNoFactory() is being used.
-     *
-     * @return the socket factory used by connectToFrom() or null if
-     *         the connectToFromNoFactory() method is used to create Sockets.
-     */
-    public static SocketFactory getSocketFactory() {
-        return socketFactory;
-    }
-    
-    /**
-     * makes connectToFrom create sockets with this factory.
-     *
-     * @param sf is the socket factory to use or null if you want the
-     *           default behaviour provided by new SeverSocket().
-     */
-    public static void setServerSocketFactory(ServerSocketFactory sf) {
-        serverSocketFactory = sf;
-    }
-    
-    /**
-     * returns the ServerSocketFactory to create server sockets, or
-     * null if new SeverSocket() is being used.
-     *
-     * @return the socket factory used or null if
-     *         the new SeverSocket() method is used to create ServerSockets.
-     */
-    public static ServerSocketFactory getServerSocketFactory() {
-        return serverSocketFactory;
-    }
-    
-    /**
-     * Size of port groups we will probe.
-     */
-    final static int rangesize = 200;
-    
-    /**
-     * Open a ServerSocket in the specified range.
-     *
-     * <p/>
-     * The method used is done so that the entire range is examined if
-     * needed while ensuring that the process eventually terminates if no port
-     * is available.
-     *
-     * @param start       The lowest numbered port to try.
-     * @param end         The highest numbered port to try.
-     * @param backlog     the allowed backlog of unaccepted connections.
-     * @param bindAddress the InetAddress to which to bind.
-     * @return a ServerSocket in the specified range.
-     * @throws IOException when the socket cannot be opened. (Lame, but that's what ServerSocket says).
-     */
-    public static ServerSocket openServerSocketInRange(int start, int end, int backlog, InetAddress bindAddress) throws IOException {
-        ServerSocketFactory factory = getServerSocketFactory();
-        
-        if ((start < 1) || (start > 65535)) {
-            throw new IllegalArgumentException("Invalid start port");
-        }
-        
-        if ((end < 1) || (end > 65535) || (end < start)) {
-            throw new IllegalArgumentException("Invalid end port");
-        }
-        
-        // fill the inRange array.
-        List<Integer> inRange = new ArrayList<Integer>(rangesize);
-
-        for (int eachInRange = 0; eachInRange < rangesize; eachInRange++) {
-            inRange.add(eachInRange, eachInRange);
-        }
-        
-        // fill the ranges array.
-        List<Integer> ranges = new ArrayList<Integer>();
-        int starts = start;
-        
-        while (starts <= end) {
-            ranges.add(starts);
-            starts += rangesize;
-        }
-        
-        // shuffle the ranges
-        Collections.shuffle(ranges);
-        while (!ranges.isEmpty()) {
-            int range = ranges.remove(0);
-            
-            // reshuffle the inRange
-            Collections.shuffle(inRange);
-            
-            for (int eachInRange = 0; eachInRange < rangesize; eachInRange++) {
-                int tryPort = range + inRange.get(eachInRange);
-                
-                if (tryPort > end) {
-                    continue;
-                }
-                
-                try {
-                    ServerSocket result;
-
-                    if (null == factory) {
-                        result = new ServerSocket(tryPort, backlog, bindAddress);
-                    } else {
-                        result = factory.createServerSocket(tryPort, backlog, bindAddress);
-                    }
-                    
-                    return result;
-                } catch (BindException failed) {// this one is busy. try another.
-                }
-            }
-        }
-        throw new BindException("All ports in range are in use.");
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/JxtaMessageMessageElement.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/JxtaMessageMessageElement.java
deleted file mode 100644 (file)
index 6084fd3..0000000
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint;
-
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import net.jxta.document.MimeMediaType;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.WireFormatMessageFactory;
-
-
-/**
- * A Message Element using a JXTA Message as the element data
- *
- *  @see net.jxta.endpoint.Message
- *  @see net.jxta.endpoint.MessageElement
- **/
-public class JxtaMessageMessageElement extends MessageElement {
-    
-    /**
-     *  Log4J Logger
-     **/
-    private final static transient Logger LOG = Logger.getLogger(JxtaMessageMessageElement.class.getName());
-    
-    /**
-     *  The Message which is the data for this message element.
-     **/
-    protected final Message msg;
-    
-    /**
-     *  A serialized form of the message.
-     **/
-    protected transient net.jxta.endpoint.WireFormatMessage serial;
-    
-    /**
-     * Create a new Message Element. The contents of the provided message are 
-     * <b>not</b> copied during construction.
-     *
-     * @param name Name of the MessageElement. May be the empty string ("") if
-     * the MessageElement is not named.
-     * @param type Type of the MessageElement. null is the same as specifying
-     * the type "Application/Octet-stream".
-     * @param msg A message which will be used as the element content for this
-     * message.
-     * @param sig optional message digest/digital signature element or null if
-     * no signature is desired.
-     **/
-    public JxtaMessageMessageElement(String name, MimeMediaType type, Message msg, MessageElement sig) {
-        super(name, type, sig);
-        
-        this.msg = msg;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        }
-        
-        if (target instanceof MessageElement) {
-            if (!super.equals(target)) {
-                return false;
-            }
-            
-            if (target instanceof JxtaMessageMessageElement) {
-                JxtaMessageMessageElement likeMe = (JxtaMessageMessageElement) target;
-                
-                return super.equals(likeMe) && msg.equals(likeMe.msg);
-            } else {
-                // have to do a slow stream comparison.
-                // XXX 20020615 bondolo@jxta.org the performance of this could be much improved.
-                try {
-                    MessageElement likeMe = (MessageElement) target;
-                    
-                    InputStream myStream = getStream();
-                    InputStream itsStream = likeMe.getStream();
-                    
-                    int mine;
-                    int its;
-
-                    do {
-                        mine = myStream.read();
-                        its = itsStream.read();
-                        
-                        if (mine != its) {
-                            return false;
-                        }       // content didn't match (includes EOF check).
-                        
-                    } while (-1 != mine);
-                    
-                    return true;
-                } catch (IOException fatal) {
-                    if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                        LOG.log(Level.SEVERE, "MessageElements could not be compared.", fatal);
-                    }
-                    
-                    IllegalStateException failure = new IllegalStateException("MessageElements could not be compared.");
-
-                    failure.initCause(fatal);
-                    
-                    throw failure;
-                }
-            }
-        }
-        
-        return false; // not a message element
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public int hashCode() {
-        int result = super.hashCode() * 6037 + // a prime
-                msg.hashCode();
-        
-        return (0 != result) ? result : 1;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public String toString() {
-        throw new UnsupportedOperationException("Cannot Generate String for this message element type.");
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public long getByteLength() {
-        initSerial();
-       
-        return serial.getByteLength();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public byte[] getBytes(boolean copy) {
-        initSerial();
-       
-        ByteArrayOutputStream baos = new ByteArrayOutputStream((int) serial.getByteLength());
-        
-        try {
-            sendToStream(baos);
-            
-            baos.close();
-        } catch (IOException failed) {
-            throw new IllegalStateException("failed to generate byte stream");
-        }
-        
-        return baos.toByteArray();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    public InputStream getStream() throws IOException {
-        initSerial();
-        
-        return serial.getStream();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public void sendToStream(OutputStream sendTo) throws IOException {
-        initSerial();
-        
-        serial.sendToStream(sendTo);
-    }
-    
-    /**
-     *  Returns a copy of the message which backs this element.
-     *
-     *  @return Returns a copy of the message which backs this element.
-     **/
-    public Message getMessage() {
-        return msg.clone();
-    }
-    
-    /**
-     *  Generates the serialized representation of the message.
-     **/
-    private synchronized void initSerial() {
-        if (null == serial) {
-            serial = WireFormatMessageFactory.toWire(msg, type, null);
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/LoopbackMessenger.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/LoopbackMessenger.java
deleted file mode 100644 (file)
index 37d0748..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *
- *  The Sun Project JXTA(TM) Software License
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *
- *  3. The end-user documentation included with the redistribution, if any, must
- *     include the following acknowledgment: "This product includes software
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology."
- *     Alternately, this acknowledgment may appear in the software itself, if
- *     and wherever such third-party acknowledgments normally appear.
- *
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must
- *     not be used to endorse or promote products derived from this software
- *     without prior written permission. For written permission, please contact
- *     Project JXTA at http://www.jxta.org.
- *
- *  5. Products derived from this software may not be called "JXTA", nor may
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United
- *  States and other countries.
- *
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of
- *  the license in source files.
- *
- *  ====================================================================
- *
- *  This software consists of voluntary contributions made by many individuals
- *  on behalf of Project JXTA. For more information on Project JXTA, please see
- *  http://www.jxta.org.
- *
- *  This license is based on the BSD license adopted by the Apache Foundation.
- */
-
-package net.jxta.impl.endpoint;
-
-
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.Message;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.io.IOException;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
-import net.jxta.impl.peergroup.GenericPeerGroup;
-import net.jxta.peergroup.PeerGroup;
-
-
-/**
- * This class implements local delivery of messages (for example when the
- * InputPipe and the OutputPipe are located on the same peer)
- * <p/>
- * The reason this class is useful is that it may not always be possible to
- * connect to oneself without actually through the relay. i.e. A peer with outgoing
- * only http transport, can not possibly connect to self through the transport.
- * <p/>
- * Since transports cannot be relied on to perform a loopback, some layer
- * above has to figure out that a message is looping back.
- * Since peerid loopback does not explicitly request to go through a real
- * transport, and since peerid addressing is the job of the router, it is
- * the router that performs loopback.
- * <p/>
- * The router could probably perform the loopback by delivering the message
- * to its own input queue, that would take a special transport instead of a
- * special messenger, which is the same kind of deal but would imply some
- * incoming message processing by the router for every message. In
- * contrast, the loopback messenger is setup once and the router will never
- * sees the messages. That's a good optimization.
- * <p/>
- * Alternatively, the endpoint service itself could figure out the
- * loopback, but since the API wants to give a messenger to the requestor
- * rather than just sending a message, the endpoint would have to setup a
- * loopback messenger anyway. So it is pretty much the same.
- */
-public class LoopbackMessenger extends BlockingMessenger {
-    
-    /**
-     *  Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(LoopbackMessenger.class.getName());
-    
-    /**
-     * The peergroup we are working for, ie. that we will loop back to.
-     */
-    private final PeerGroup group;
-    
-    /**
-     * The endpoint we are working for, ie. that we will loop back to.
-     */
-    private final EndpointService endpoint;
-    
-    /**
-     * The source address of messages sent on this messenger.
-     */
-    private final EndpointAddress srcAddress;
-    
-    /**
-     * The location destination of this messenger.
-     */
-    private final EndpointAddress logicalDestination;
-    
-    /**
-     *  Used to ensure that only a single message is demuxed at a time.
-     */
-    private final Lock orderingLock = new ReentrantLock(true);
-    
-    /**
-     * Create a new loopback messenger.
-     *
-     * @param group       The group context.
-     * @param ep          where messages go
-     * @param src         who messages should be addressed from
-     * @param dest        who messages should be addressed to
-     * @param logicalDest The logical destination address.
-     */
-    public LoopbackMessenger(PeerGroup group, EndpointService ep, EndpointAddress src, EndpointAddress dest, EndpointAddress logicalDest) {
-        super(group.getPeerGroupID(), dest, false);
-        
-        this.group = group;
-        endpoint = ep;
-        srcAddress = src;
-        logicalDestination = logicalDest;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public EndpointAddress getLogicalDestinationImpl() {
-        return logicalDestination;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public long getMTU() {
-        return Long.MAX_VALUE;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean isIdleImpl() {
-        return false;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void closeImpl() {}
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void sendMessageBImpl(final Message message, final String service, final String serviceParam) throws IOException {
-        
-        if (isClosed()) {
-            IOException failure = new IOException("Messenger was closed, it cannot be used to send messages.");
-            
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, failure.getMessage(), failure);
-            }
-            throw failure;
-        }
-        
-        orderingLock.lock();
-        try {
-            // Process the message with the appropriate src and dest address
-            ((GenericPeerGroup)group).getExecutor().execute( new Runnable() {
-                public void run() {
-                    try {
-                        endpoint.processIncomingMessage(message, srcAddress, getDestAddressToUse(service, serviceParam));
-                    } catch(Throwable uncaught) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.log(Level.WARNING, "Uncaught Throwable in Loopback Messenger ", uncaught);
-                        }
-                    }
-                }
-            });
-        } finally {
-            orderingLock.unlock();
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/SocketFactory.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/SocketFactory.java
deleted file mode 100644 (file)
index a119494..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint;
-
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.Socket;
-
-
-/**
- * Provides pluggable socket creation for JXTA TCP connection (not
- * those for HTTP since those are from URLConnection).
- *
- * <p>The motivation for this class was to provide the ability to
- * tunnel JXTA TCP through a web proxy but it could be used for other
- * things as well. Call IPUtils.setSocketFactory() to configure JXTA
- * to use a particular socket factory</p>
- *
- * @author <a href="mailto:m_sample@canada.com">Mike Sample</a>
- */
-public interface SocketFactory {
-
-    /**
-     * creates and returns a connected Socket.
-     *
-     * @param inetAddress the destination IP address used to create an
-     * InetSocketAddress that will be used with the connect() call on
-     * the created socket.
-     *
-     * @param port the destination TCP port used to create an
-     * InetSocketAddress that will be used with the connect() call on
-     * the created socket.
-     *
-     * @param usingInterface the src (local) IP address used to create
-     * an InetSocketAddress to which the created socket will be bound
-     * via bind().
-     *
-     * @param localPort the src (local) TCP port used to create an
-     * InetSocketAddress to which the created socket will be bound via
-     * bind().
-     *
-     * @param timeout the time in milliseconds to be used with the
-     * socket.connect() call. A value of zero means infinite timeout.
-     *
-     */
-    public Socket createConnection(InetAddress inetAddress, int port, InetAddress usingInterface, int localPort, int timeout) throws IOException;
-
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/WireFormatMessageBinary.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/WireFormatMessageBinary.java
deleted file mode 100644 (file)
index 92e3587..0000000
+++ /dev/null
@@ -1,1280 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint;
-
-
-import net.jxta.document.MimeMediaType;
-import net.jxta.endpoint.ByteArrayMessageElement;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.WireFormatMessage;
-import net.jxta.endpoint.WireFormatMessageFactory;
-import net.jxta.util.LimitInputStream;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.SequenceInputStream;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.nio.ByteBuffer;
-import java.text.MessageFormat;
-import java.util.Arrays;
-
-
-/**
- * A Wire Format Message which encodes the message into MIME Type
- * "application/x-jxta-msg".
- * <p/>
- * <p/>This implementation does nothing with encodings.
- * <p/>
- * <p/>This implementation does not use any MIME parameters attached to the
- * requesting mime type.
- *
- * @see net.jxta.endpoint.WireFormatMessageFactory
- * @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#msgs-fmts-jbm" target="_blank">JXTA Protocols Specification : Binary Message Format</a>
- */
-public class WireFormatMessageBinary implements WireFormatMessage {
-
-    /*
-     *  Log4J Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(WireFormatMessageBinary.class.getName());
-
-    // Flag bits
-    protected static final byte HAS_TYPE = 0x01;
-    protected static final byte HAS_ENCODING = 0x02;
-    protected static final byte HAS_SIGNATURE = 0x04;
-
-    protected static final int MESSAGE_VERSION = 0;
-
-    /**
-     * Our Mime Media Type(s)
-     */
-    private static final MimeMediaType[] myTypes = {
-        MimeMediaType.valueOf("application/x-jxta-msg") };
-
-    /**
-     * These are the content encodings we support.
-     */
-    private static final MimeMediaType[] myContentEncodings = {
-
-        // we support raw binary!
-        null
-    };
-
-    /**
-     * Our instantiator for the factory.
-     */
-    public static final WireFormatMessageFactory.Instantiator INSTANTIATOR = new Instantiator();
-
-    /**
-     * Our instantiator.
-     */
-    static class Instantiator implements WireFormatMessageFactory.Instantiator {
-
-        /**
-         * Creates new WireFormatMessageBinary Instantiator
-         */
-        public Instantiator() {}
-
-        /**
-         * {@inheritDoc}
-         */
-        public MimeMediaType[] getSupportedMimeTypes() {
-            return myTypes;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public MimeMediaType[] getSupportedContentEncodings() {
-            return myContentEncodings;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Message fromWire(InputStream is, MimeMediaType type, MimeMediaType contentEncoding) throws IOException {
-            // FIXME 20020504 bondolo@jxta.org  Ignores type and contentEncoding completely.
-            Message msg = new Message();
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Reading " + msg + " from " + is);
-            }
-
-            DataInputStream dis = new DataInputStream(is);
-
-            HashMap idToNamespace = readHeader(dis);
-
-            int elementCnt = dis.readShort();
-
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer("Message element count " + elementCnt + " from " + is);
-            }
-
-            int eachElement = 0;
-
-            do {
-                if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                    LOG.finer("Read element " + eachElement + " of " + elementCnt + " from " + is + " for " + msg);
-                }
-
-                Object[] anElement;
-
-                try {
-                    anElement = readMessageElement(dis, is);
-                } catch (IOException failed) {
-                    if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                        LOG.log(Level.SEVERE
-                                ,
-                                "Failure reading element " + eachElement + " of " + elementCnt + " from " + is + " for " + msg
-                                ,
-                                failed);
-                    }
-
-                    throw failed;
-                }
-
-                if (null == anElement) {
-                    break;
-                }
-
-                String namespace = (String) idToNamespace.get(anElement[0]);
-
-                if (null == namespace) {
-                    if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                        LOG.severe("Element identified a namespace which was not defined for this message.");
-                    }
-
-                    throw new IOException("Element identified a namespace which was not defined for this message.");
-                }
-
-                msg.addMessageElement(namespace, (MessageElement) anElement[1]);
-                eachElement++;
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINER)) {
-                    LOG.finer(
-                            "Add element (name=\'" + ((MessageElement) anElement[1]).getElementName() + "\') #" + eachElement
-                            + " of #" + elementCnt + " elements from " + dis.toString());
-                }
-            } while (((0 == elementCnt) || (eachElement < elementCnt)));
-
-            if ((elementCnt != 0) && (eachElement != elementCnt)) {
-                throw new IOException("Found wrong number of elements in message.");
-            }
-
-            return msg;
-        }
-
-        public Message fromBuffer(ByteBuffer buffer, MimeMediaType type, MimeMediaType contentEncoding) throws IOException {
-            // FIXME 20020504 bondolo@jxta.org  Ignores type and contentEncoding completely.
-            Message msg = new Message();
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Reading " + msg + " from " + buffer);
-            }
-
-            HashMap idToNamespace = readHeader(buffer);
-
-            int elementCnt = buffer.getShort();
-
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer("Message element count " + elementCnt + " from " + buffer);
-            }
-
-            int eachElement = 0;
-
-            do {
-                if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                    LOG.finer("Read element " + eachElement + " of " + elementCnt + " from " + buffer + " for " + msg);
-                }
-
-                Object[] anElement;
-
-                try {
-                    anElement = readMessageElement(buffer);
-
-                    if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                        LOG.finer(
-                                MessageFormat.format("Read element of size {0}, [{1}] {2}", anElement.length, anElement.toString()
-                                ,
-                                buffer.toString()));
-                    }
-                } catch (IOException failed) {
-                    if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                        LOG.log(Level.SEVERE
-                                ,
-                                "Failure reading element " + eachElement + " of " + elementCnt + " from " + buffer + " for " + msg
-                                ,
-                                failed);
-                    }
-                    throw failed;
-                }
-
-                if (null == anElement) {
-                    break;
-                }
-
-                String namespace = (String) idToNamespace.get(anElement[0]);
-
-                if (null == namespace) {
-                    if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                        LOG.severe("Element identified a namespace which was not defined for this message.");
-                    }
-                    throw new IOException("Element identified a namespace which was not defined for this message.");
-                }
-
-                msg.addMessageElement(namespace, (MessageElement) anElement[1]);
-                eachElement++;
-
-                if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                    LOG.finer(
-                            "Add element (name=\'" + ((MessageElement) anElement[1]).getElementName() + "\') #" + eachElement
-                            + " of #" + elementCnt + " elements from " + buffer.toString());
-                }
-            } while (((0 == elementCnt) || (eachElement < elementCnt)));
-
-            if ((elementCnt != 0) && (eachElement != elementCnt)) {
-                throw new IOException("Found wrong number of elements in message.");
-            }
-
-            return msg;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public WireFormatMessage toWire(Message msg, MimeMediaType type, MimeMediaType[] preferedContentEncoding) {
-            try {
-                return new WireFormatMessageBinary(msg, type, preferedContentEncoding);
-            } catch (IOException caught) {
-                throw new IllegalStateException("Could not build wire format for message due to " + caught.getMessage());
-            }
-        }
-
-        /**
-         * Read in a message header from the provided data stream.
-         *
-         * @param dis the data stream to read from
-         * @return hashmap containing the namespace id to namespace values
-         * @throws IOException if EOF or other IOException is encountered
-         *                     during the reading of the header.
-         */
-        private static HashMap readHeader(DataInputStream dis) throws IOException {
-            // Read message signature
-            char[] msgsig = new char[4];
-
-            try {
-                msgsig[0] = (char) dis.readByte();
-            } catch (EOFException failed) {
-                if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                    LOG.log(Level.FINER, "EOF reading message at first byte of header.", failed);
-                }
-
-                throw failed;
-            }
-            msgsig[1] = (char) dis.readByte();
-            msgsig[2] = (char) dis.readByte();
-            msgsig[3] = (char) dis.readByte();
-
-            if (msgsig[0] != 'j' || msgsig[1] != 'x' || msgsig[2] != 'm' || msgsig[3] != 'g') {
-                IOException failure = new IOException(
-                        "Not a message (incorrect signature '" + msgsig[0] + msgsig[1] + msgsig[2] + msgsig[3] + "') ");
-
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.severe(failure.toString());
-                }
-
-                throw failure;
-            }
-
-            // Message version
-            if (dis.readByte() != MESSAGE_VERSION) {
-                IOException failure = new IOException("Message not version " + MESSAGE_VERSION);
-
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, failure.getMessage(), failure);
-                }
-
-                throw failure;
-            }
-
-            int namespaceCnt = dis.readShort();
-
-            if (namespaceCnt > 253) {
-                IOException failure = new IOException("Message contains too many namespaces (>253)");
-
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, failure.getMessage(), failure);
-                }
-
-                throw failure;
-            }
-
-            HashMap<Integer, String> id2namespace = new HashMap<Integer, String>(2 + namespaceCnt);
-
-            id2namespace.put(0, "");
-            id2namespace.put(1, "jxta");
-
-            int id = 2;
-
-            for (int i = 0; i < namespaceCnt; ++i) {
-                try {
-                    String namespace = readString(dis);
-
-                    id2namespace.put(id++, namespace);
-                } catch (IOException caught) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Error Processing namespace", caught);
-                    }
-                    throw caught;
-                }
-            }
-
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer("Read Message Header with " + (namespaceCnt + 2) + " namespaces from " + dis.toString());
-            }
-
-            return id2namespace;
-        }
-
-        /**
-         * Read in a message header from the provided data stream.
-         *
-         * @param buffer the data buffer to read from
-         * @return hashmap containing the namespace id to namespace values
-         * @throws IOException if EOF or other IOException is encountered
-         *                     during the reading of the header.
-         */
-        private static HashMap readHeader(ByteBuffer buffer) throws IOException {
-            // Read message signature
-            char[] msgsig = new char[4];
-
-            msgsig[0] = (char) buffer.get();
-            msgsig[1] = (char) buffer.get();
-            msgsig[2] = (char) buffer.get();
-            msgsig[3] = (char) buffer.get();
-
-            if (msgsig[0] != 'j' || msgsig[1] != 'x' || msgsig[2] != 'm' || msgsig[3] != 'g') {
-                IOException failure = new IOException(
-                        "Not a message (incorrect signature '" + msgsig[0] + msgsig[1] + msgsig[2] + msgsig[3] + "') ");
-
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.severe(failure.toString());
-                }
-                throw failure;
-            }
-
-            // Message version
-            if (buffer.get() != MESSAGE_VERSION) {
-                IOException failure = new IOException("Message not version " + MESSAGE_VERSION);
-
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, failure.getMessage(), failure);
-                }
-                throw failure;
-            }
-
-            int namespaceCnt = buffer.getShort();
-
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer(MessageFormat.format("Message defines {0} namespaces buffer stats{1}", namespaceCnt, buffer.toString()));
-            }
-
-            if (namespaceCnt > 253) {
-                IOException failure = new IOException(
-                        MessageFormat.format("Message contains too many namespaces ({0} >253)", namespaceCnt));
-
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, failure.getMessage(), failure);
-                }
-
-                throw failure;
-            }
-
-            HashMap<Integer, String> id2namespace = new HashMap<Integer, String>(2 + namespaceCnt);
-
-            id2namespace.put(0, "");
-            id2namespace.put(1, "jxta");
-
-            int id = 2;
-
-            for (int i = 0; i < namespaceCnt; ++i) {
-                try {
-                    String namespace = readString(buffer);
-
-                    id2namespace.put(id++, namespace);
-                } catch (IOException caught) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Error Processing namespace", caught);
-                    }
-                    throw caught;
-                }
-            }
-
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer("Read Message Header with " + (namespaceCnt + 2) + " namespaces from " + buffer.toString());
-            }
-
-            return id2namespace;
-        }
-
-        /**
-         * Read in a message element from the provided data stream.
-         *
-         * @param dis the data stream to read from
-         * @param is  todo
-         * @return object array containing two objects, index[0] contains an
-         *         Integer which identifies the namespace to which this element belongs
-         *         and index[1] contains a MessageElement. If null is returned then
-         *         the DataInputStream reached EOF before reading the first byte of the
-         *         element.
-         * @throws IOException if EOF or other IOException is encountered
-         *                     during the reading of the element.
-         */
-        private Object[] readMessageElement(DataInputStream dis, InputStream is) throws IOException {
-            // Read message signature
-            char[] elsig = new char[4];
-
-            // if we EOF before the first byte, return null. EOF anywhere else
-            // and its an error.
-            try {
-                elsig[0] = (char) dis.readByte();
-            } catch (EOFException allDone) {
-                return null;
-            }
-
-            elsig[1] = (char) dis.readByte();
-            elsig[2] = (char) dis.readByte();
-            elsig[3] = (char) dis.readByte();
-
-            if (elsig[0] != 'j' || elsig[1] != 'x' || elsig[2] != 'e' || elsig[3] != 'l') {
-                IOException failure = new IOException(
-                        "Not a message element (incorrect signature '" + elsig[0] + elsig[1] + elsig[2] + elsig[3] + "') ");
-
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, failure.getMessage(), failure);
-                }
-
-                throw failure;
-            }
-
-            // Namespace id
-            int nsid = dis.readByte();
-
-            // flags
-            byte flags = dis.readByte();
-
-            // Name
-            String name = readString(dis);
-
-            // Mime type
-            MimeMediaType type;
-
-            if ((flags & HAS_TYPE) != 0) {
-                String typeString = readString(dis);
-
-                try {
-                    type = new MimeMediaType(typeString);
-                } catch (IllegalArgumentException uhoh) {
-                    throw new IOException("Bad MIME type in message element header : " + uhoh.getMessage());
-                }
-            } else {
-                type = MimeMediaType.AOS;
-            }
-
-            int dataLen = dis.readInt();
-
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer(
-                        "element : nsid = " + nsid + " name = \'" + name + "\' type = \'" + type + "\' flags = "
-                        + Integer.toBinaryString(flags) + " datalen = " + dataLen);
-            }
-
-            Object[] res = new Object[2];
-
-            res[0] = nsid & 0x000000FF;
-
-            byte[] value = null;
-            Message submsg = null;
-
-            // Value
-            if (type.equalsIngoringParams(myTypes[0])) {
-                InputStream subis = new LimitInputStream(is, dataLen);
-
-                submsg = WireFormatMessageFactory.fromWire(subis, type, null);
-            } else {
-                if (dataLen > Integer.MAX_VALUE) {
-                    // FIXME hamada dataLen is an int, the above expression can never be true
-                    if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                        LOG.severe("WireFormatMessageBinary does not support elements longer than 2GB");
-                    }
-                    throw new IllegalStateException("WireFormatMessageBinary does not support elements longer than 2GB");
-                }
-
-                value = new byte[dataLen];
-
-                String mayFail = null;
-
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    mayFail = is.toString();
-                }
-
-                try {
-                    dis.readFully(value);
-                } catch (EOFException failed) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("had tried to read " + dataLen + " from " + mayFail + " which is now " + is);
-                    }
-                    throw failed;
-                }
-            }
-
-            MessageElement sig = null;
-
-            if ((flags & HAS_SIGNATURE) != 0) {
-                Object[] sigRes = readMessageElement(dis, is);
-
-                sig = (MessageElement) sigRes[1];
-            }
-
-            if (null != value) {
-                res[1] = new ByteArrayMessageElement(name, type, value, sig);
-            } else {
-                res[1] = new JxtaMessageMessageElement(name, type, submsg, sig);
-            }
-
-            return res;
-        }
-
-        /**
-         * Read in a message element from the provided data stream.
-         *
-         * @param buffer the data buffer to read from
-         * @return object array containing two objects, index[0] contains an
-         *         Integer which identifies the namespace to which this element belongs
-         *         and index[1] contains a MessageElement. If null is returned then
-         *         the DataInputStream reached EOF before reading the first byte of the
-         *         element.
-         * @throws IOException if EOF or other IOException is encountered
-         *                     during the reading of the element.
-         */
-        private Object[] readMessageElement(ByteBuffer buffer) throws IOException {
-            // Read message signature
-            char[] elsig = new char[4];
-
-            // if we EOF before the first byte, return null. EOF anywhere else
-            // and its an error.
-            elsig[0] = (char) buffer.get();
-            elsig[1] = (char) buffer.get();
-            elsig[2] = (char) buffer.get();
-            elsig[3] = (char) buffer.get();
-
-            if (elsig[0] != 'j' || elsig[1] != 'x' || elsig[2] != 'e' || elsig[3] != 'l') {
-                IOException failure = new IOException(
-                        "Not a message element (incorrect signature '" + elsig[0] + elsig[1] + elsig[2] + elsig[3] + "') ");
-
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, failure.getMessage(), failure);
-                }
-
-                throw failure;
-            }
-
-            // Namespace id
-            int nsid = buffer.get();
-
-            // flags
-            byte flags = buffer.get();
-
-            // Name
-            String name = readString(buffer);
-
-            // Mime type
-            MimeMediaType type;
-
-            if ((flags & HAS_TYPE) != 0) {
-                String typeString = readString(buffer);
-
-                try {
-                    type = new MimeMediaType(typeString);
-                } catch (IllegalArgumentException uhoh) {
-                    throw new IOException("Bad MIME type in message element header : " + uhoh.getMessage());
-                }
-            } else {
-                type = MimeMediaType.AOS;
-            }
-
-            int dataLen = buffer.getInt();
-
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer(
-                        "element : nsid = " + nsid + " name = \'" + name + "\' type = \'" + type + "\' flags = "
-                        + Integer.toBinaryString(flags) + " datalen = " + dataLen);
-            }
-
-            Object[] res = new Object[2];
-
-            res[0] = nsid & 0x000000FF;
-
-            byte[] value = null;
-            Message submsg = null;
-
-            // Value
-            if (type.equalsIngoringParams(myTypes[0])) {
-                InputStream subis = new ByteArrayInputStream(buffer.array(), buffer.position(), dataLen);
-
-                submsg = WireFormatMessageFactory.fromWire(subis, type, null);
-                // buffer.position(buffer.position() + dataLen);
-            } else {
-                if (dataLen > Integer.MAX_VALUE) {
-                    if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                        LOG.severe("WireFormatMessageBinary does not support elements longer than 2GB");
-                    }
-                    throw new IllegalStateException("WireFormatMessageBinary does not support elements longer than 2GB");
-                }
-
-                value = new byte[dataLen];
-
-                if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                    LOG.finer(MessageFormat.format("expecting {0} bytes, Buffer stats {1}", dataLen, buffer.toString()));
-                }
-                buffer.get(value);
-            }
-
-            MessageElement sig = null;
-
-            if ((flags & HAS_SIGNATURE) != 0) {
-                Object[] sigRes = readMessageElement(buffer);
-
-                sig = (MessageElement) sigRes[1];
-            }
-
-            if (null != value) {
-                res[1] = new ByteArrayMessageElement(name, type, value, sig);
-            } else {
-                res[1] = new JxtaMessageMessageElement(name, type, submsg, sig);
-            }
-
-            return res;
-        }
-
-        /**
-         * Read and construct a string from the data stream.
-         *
-         * @param dis the stream to read from
-         * @return the String which was read.
-         * @throws IOException if EOF or other IOException is encountered
-         *                     during the reading of the string.
-         */
-        private static String readString(DataInputStream dis) throws IOException {
-            int len = dis.readShort();
-
-            if (len < 0) {
-                throw new IOException("Bad string length in message");
-            }
-
-            byte[] bytes = new byte[len];
-
-            dis.readFully(bytes);
-            return new String(bytes, "UTF8");
-        }
-
-        /**
-         * Read and construct a string from the data stream.
-         *
-         * @param buffer the ByteBuffer to read from
-         * @return the String which was read.
-         * @throws IOException if EOF or other IOException is encountered
-         *                     during the reading of the string.
-         */
-        private static String readString(ByteBuffer buffer) throws IOException {
-            int len = buffer.getShort();
-
-            if (len < 0) {
-                throw new IOException("Bad string length in message");
-            }
-
-            byte[] bytes = new byte[len];
-
-            buffer.get(bytes);
-            return new String(bytes, "UTF8");
-        }
-    }
-
-
-    /**
-     * Internal representation for a binary format wire message. Implemented
-     * as an inner class to allow content encodings to be easily mapped on
-     * top of the streams this class produces.
-     */
-    static class binaryMessageProxy implements WireFormatMessage {
-        final Message message;
-
-        final MimeMediaType type;
-
-        final List<binaryElementProxy> elements = new ArrayList<binaryElementProxy>();
-
-        final Map<String, Integer> namespaceIDs = new HashMap<String, Integer>();
-
-        final List<String> namespaces = new ArrayList<String>();
-
-        byte[] header;
-
-        binaryMessageProxy(Message msg, MimeMediaType type) throws IOException {
-            message = msg;
-
-            this.type = type; // we may generate different content based upon the type.
-
-            assignNamespaceIds();
-
-            // build the element proxies
-            Message.ElementIterator eachElement = message.getMessageElements();
-
-            while (eachElement.hasNext()) {
-                MessageElement anElement = eachElement.next();
-                byte namespaceid = namespaceIDs.get(eachElement.getNamespace()).byteValue();
-
-                elements.add(new binaryElementProxy(namespaceid, anElement));
-            }
-
-            buildHeader();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public String getFileExtension() {
-            return "???";
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public MimeMediaType getMimeType() {
-            return type;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public ByteBuffer[] getByteBuffers() {
-            List<ByteBuffer> partBuffers = new ArrayList<ByteBuffer>();
-            
-            partBuffers.add(ByteBuffer.wrap(header));
-            
-            for (binaryElementProxy anElement : elements) {
-                partBuffers.addAll(Arrays.asList(anElement.getByteBuffers()));
-            }
-            
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer(MessageFormat.format("Returning {0} buffers for {1}", partBuffers.size(), message));
-            }
-
-            return partBuffers.toArray(new ByteBuffer[partBuffers.size()]);
-        }
-        
-        /**
-         * {@inheritDoc}
-         */
-        public InputStream getStream() throws IOException {
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Getting stream for " + message);
-            }
-
-            List<InputStream> streamParts = new ArrayList<InputStream>();
-
-            streamParts.add(new ByteArrayInputStream(header));
-
-            for (binaryElementProxy anElement : elements) {
-                streamParts.add(anElement.getStream());
-            }
-
-            InputStream theStream = new SequenceInputStream(Collections.enumeration(streamParts));
-
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer(
-                        MessageFormat.format("Returning {0}@{1} for {2}", theStream.getClass().getName()
-                        ,
-                        System.identityHashCode(theStream), message));
-            }
-
-            return theStream;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public void sendToStream(OutputStream sendTo) throws IOException {
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Sending " + message + " to " + sendTo.getClass().getName() + "@" + System.identityHashCode(sendTo));
-            }
-
-            sendTo.write(header);
-
-            Iterator eachElement = elements.listIterator();
-
-            while (eachElement.hasNext()) {
-                binaryElementProxy anElement = (binaryElementProxy) eachElement.next();
-
-                anElement.sendToStream(sendTo);
-            }
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public long getByteLength() {
-            long size = 0;
-
-            size += header.length;
-            for (binaryElementProxy element : elements) {
-                binaryElementProxy anElement = element;
-
-                size += anElement.getByteLength();
-            }
-            return size;
-        }
-
-        /**
-         *  {@inheritDoc}
-         */
-        public MimeMediaType getContentEncoding() {
-            return null;
-        }
-
-        /**
-         * Scans the source message to build a HashMap of the namespaces used
-         * in the message and assign and id to each namespace.
-         */
-        private void assignNamespaceIds() {
-            int id = 0;
-            Iterator namespaces = message.getMessageNamespaces();
-
-            // insert the predefined namespaces.
-            namespaceIDs.put("", id++);
-            this.namespaces.add("");
-            namespaceIDs.put("jxta", id++);
-            this.namespaces.add("jxta");
-
-            // insert items in the vector if they are not found in the map
-            while (namespaces.hasNext()) {
-                String namespace = (String) namespaces.next();
-
-                if (namespaceIDs.get(namespace) == null) {
-                    namespaceIDs.put(namespace, id++);
-                    this.namespaces.add(namespace);
-                }
-            }
-
-            if (id >= 256) {
-                throw new IllegalStateException("WireFormatMessageBinary does not support more than 255 namespaces");
-            }
-        }
-
-        /**
-         * Builds the wire format header for the message.
-         *
-         * @throws IOException if for some reason the header cannot be built.
-         */
-        private void buildHeader() throws IOException {
-            ByteArrayOutputStream headerBytes = new ByteArrayOutputStream(256);
-            DataOutputStream header = new DataOutputStream(headerBytes);
-
-            header.writeBytes("jxmg");
-
-            header.writeByte(MESSAGE_VERSION);
-            header.writeShort(namespaces.size() - 2);
-
-            for (int eachNamespace = 2; eachNamespace < namespaces.size(); eachNamespace++) {
-                byte[] elementName = namespaces.get(eachNamespace).getBytes("UTF8");
-
-                header.writeShort(elementName.length);
-                header.write(elementName, 0, elementName.length);
-            }
-
-            header.writeShort(elements.size());
-
-            header.flush();
-            header.close();
-            headerBytes.flush();
-            headerBytes.close();
-
-            this.header = headerBytes.toByteArray();
-        }
-    }
-
-
-    /**
-     * Proxy for a message element. Handles the serialization of the element
-     * meta information.
-     */
-    static class binaryElementProxy {
-        final byte namespaceid;
-
-        binaryElementProxy sig;
-
-        MessageElement element;
-
-        byte[] header;
-
-        binaryElementProxy(byte namespaceid, MessageElement element) throws IOException {
-            this.namespaceid = namespaceid;
-
-            this.element = element;
-
-            MessageElement sig = element.getSignature();
-
-            if (null != sig) {
-                this.sig = new binaryElementProxy(namespaceid, sig);
-            }
-
-            buildHeader();
-        }
-
-        void buildHeader() throws IOException {
-            byte[] elementName = element.getElementName().getBytes("UTF8");
-            byte[] elementType = null;
-
-            if (!MimeMediaType.AOS.equals(element.getMimeType())) {
-                elementType = element.getMimeType().toString().getBytes("UTF8");
-            }
-
-            // FIXME  20020504 bondolo@jxta.org Do something with encodings.
-            ByteArrayOutputStream headerBytes = new ByteArrayOutputStream(256);
-            DataOutputStream header = new DataOutputStream(headerBytes);
-
-            header.writeBytes("jxel");
-
-            header.writeByte(namespaceid);
-            header.writeByte(((null != elementType) ? HAS_TYPE : 0) | ((null != sig) ? HAS_SIGNATURE : 0));
-
-            header.writeShort(elementName.length);
-            header.write(elementName, 0, elementName.length);
-
-            if (null != elementType) {
-                header.writeShort(elementType.length);
-                header.write(elementType, 0, elementType.length);
-            }
-
-            // FIXME content encoding should go here
-
-            long dataLen = element.getByteLength();
-
-            if (dataLen > Integer.MAX_VALUE) {
-                throw new IllegalStateException("WireFormatMessageBinary does not support elements longer than 4GB");
-            }
-
-            header.writeInt((int) dataLen);
-
-            header.flush();
-            header.close();
-            headerBytes.flush();
-            headerBytes.close();
-
-            this.header = headerBytes.toByteArray();
-        }
-
-        public long getByteLength() {
-            long size = 0;
-
-            size += header.length;
-            size += element.getByteLength();
-            if (null != sig) {
-                size += sig.getByteLength();
-            }
-
-            return size;
-        }
-
-        public ByteBuffer[] getByteBuffers() {
-            List<ByteBuffer> partBuffers = new ArrayList<ByteBuffer>();
-
-            partBuffers.add(ByteBuffer.wrap(header));
-            
-            partBuffers.add(ByteBuffer.wrap(element.getBytes(false)));
-
-            if (null != sig) {
-                partBuffers.addAll(Arrays.asList(sig.getByteBuffers()));
-            }
-
-            return partBuffers.toArray(new ByteBuffer[partBuffers.size()]);           
-        }
-        
-        public InputStream getStream() throws IOException {
-            List<InputStream> streamParts = new ArrayList<InputStream>();
-
-            streamParts.add(new ByteArrayInputStream(header));
-
-            streamParts.add(element.getStream());
-
-            if (null != sig) {
-                streamParts.add(sig.getStream());
-            }
-
-            return new SequenceInputStream(Collections.enumeration(streamParts));
-        }
-
-        public void sendToStream(OutputStream sendTo) throws IOException {
-
-            sendTo.write(header);
-            element.sendToStream(sendTo);
-            if (null != sig) {
-                sig.sendToStream(sendTo);
-            }
-        }
-    }
-
-    /**
-     * The message we are serializing.
-     */
-    private final Message msg;
-
-    /**
-     * The mod count of the message when we started. Used for detecting
-     * (illegal) modifications.
-     */
-    private final int msgModCount;
-
-    /**
-     * The mime type of the encoded message.
-     */
-    private final MimeMediaType type;
-
-    /**
-     * The mime type of the content encoding for this message.
-     */
-    private final MimeMediaType contentEncoding;
-
-    /**
-     * The serialization peer to the Message.
-     */
-    private final binaryMessageProxy msgProxy;
-
-    /**
-     * Creates a new instance of WireFormatMessageBinary. Called only by the
-     * Instantiator.
-     *
-     * @param msg                      the message being serialized
-     * @param type                     the mime mediatype being requested.
-     * @param preferedContentEncodings The ranked content encodings preferred by
-     *                                 the recipient.
-     * @throws java.io.IOException if an io error occurs
-     */
-    WireFormatMessageBinary(Message msg, MimeMediaType type, MimeMediaType[] preferedContentEncodings) throws IOException {
-        if (null == msg) {
-            throw new IllegalArgumentException("Null message!");
-        }
-
-        this.msg = msg;
-
-        this.msgModCount = msg.getMessageModCount();
-
-        if (null == type) {
-            throw new IllegalArgumentException("Null mime type!");
-        }
-
-        int matchedIdx = -1;
-
-        for (int eachType = 0; eachType < myTypes.length; eachType++) {
-            if (type.equalsIngoringParams(myTypes[eachType])) {
-                matchedIdx = eachType;
-                break;
-            }
-        }
-
-        if (-1 == matchedIdx) {
-            throw new IllegalArgumentException("Unsupported mime type!");
-        }
-
-        // FIXME  20020504 bondolo@jxta.org Check the mimetype params to make
-        // sure we can support them.
-        this.type = type;
-
-        // FIXME  20020504 bondolo@jxta.org Do something with encodings.
-        this.contentEncoding = myContentEncodings[0];
-
-        msgProxy = new binaryMessageProxy(msg, type);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object obj) {
-        throw new UnsupportedOperationException("don't do this");
-    }
-
-    /*
-     * The cost of just having a finalize routine is high. The finalizer is
-     * a bottleneck and can delay garbage collection all the way to heap
-     * exhaustion. Leave this comment as a reminder to future maintainers.
-     * Below is the reason why finalize is not needed here.
-     *
-     * No critical non-memory resource held.
-     protected void finalize( ) {
-     }
-
-     */
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        throw new UnsupportedOperationException("don't do this");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getFileExtension() {
-        return "???";
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public MimeMediaType getMimeType() {
-        return type;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public InputStream getStream() throws IOException {
-        if (msg.getMessageModCount() != msgModCount) {
-            throw new IllegalStateException("message was unexpectedly modified!");
-        }
-
-        msg.modifiable = false;
-        try {
-            InputStream result = msgProxy.getStream();
-
-            return result;
-        } finally {
-            msg.modifiable = true;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ByteBuffer[] getByteBuffers() {
-        if (msg.getMessageModCount() != msgModCount) {
-            throw new IllegalStateException("message was unexpectedly modified!");
-        }
-
-        msg.modifiable = false;
-        try {
-            ByteBuffer[] result = msgProxy.getByteBuffers();
-
-            return result;
-        } finally {
-            msg.modifiable = true;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void sendToStream(OutputStream sendTo) throws IOException {
-        if (msg.getMessageModCount() != msgModCount) {
-            throw new IllegalStateException("message was unexpectedly modified!");
-        }
-
-        msg.modifiable = false;
-        try {
-            msgProxy.sendToStream(sendTo);
-        } finally {
-            msg.modifiable = true;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public long getByteLength() {
-        if (msg.getMessageModCount() != msgModCount) {
-            throw new IllegalStateException("message was unexpectedly modified!");
-        }
-
-        return msgProxy.getByteLength();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public MimeMediaType getContentEncoding() {
-        return contentEncoding;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/cbjx/CbJxDefs.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/cbjx/CbJxDefs.java
deleted file mode 100644 (file)
index 135c07d..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.endpoint.cbjx;
-
-
-import net.jxta.id.ID;
-import net.jxta.platform.ModuleClassID;
-import net.jxta.platform.ModuleSpecID;
-
-import java.net.URI;
-
-
-/**
- * the value of the constants used with cbid
- */
-public final class CbJxDefs {
-
-    /**
-     * the name of the algo to compute signature
-     */
-    public static final String signAlgoName = "SHA1WITHRSA";
-
-    /**
-     * the name of the algo to digest of message
-     */
-    public static final String hashAlgoName = "SHA-1";
-
-    /**
-     * Well known module class identifier: msg transport
-     */
-    public static final ModuleClassID msgtptClassID = (ModuleClassID)
-            ID.create(URI.create("urn:jxta:uuid-DeadBeefDeafBabaFeedBabe0000001105"));
-
-    /**
-     * Well known service specification identifier: cbjx Msg Transport
-     */
-    public static final ModuleSpecID cbjxMsgTransportSpecID = (ModuleSpecID)
-            ID.create(URI.create("urn:jxta:uuid-DeadBeefDeafBabaFeedBabe000000110106"));
-
-    /**
-     * static utility factory
-     */
-    private CbJxDefs() {}
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/cbjx/CbJxMessageInfo.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/cbjx/CbJxMessageInfo.java
deleted file mode 100644 (file)
index 7ca0bd1..0000000
+++ /dev/null
@@ -1,389 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.cbjx;
-
-
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.impl.membership.pse.PSEUtils;
-import net.jxta.logging.Logging;
-import net.jxta.peer.PeerID;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.StringReader;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.security.cert.Certificate;
-import java.security.cert.CertificateFactory;
-import java.util.Enumeration;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * this class defines the xml document used to store message information
- * that is useful for the cbjx endpoint
- */
-public class CbJxMessageInfo {
-
-    /**
-     * Logger
-     */
-    private static final transient Logger LOG = Logger.getLogger(CbJxMessageInfo.class.getName());
-
-    /**
-     * the root element for the information's XML document
-     */
-    private static final String DOCTYPE = "CbJxMessageInfo";
-
-    /**
-     * the element name for the peer certificate
-     */
-    private static final String tagPeerCert = "PeerCert";
-
-    /**
-     * the element name of the destination address
-     */
-    private static final String tagDestination = "DestinationAddress";
-
-    /**
-     * the element name of the source address
-     */
-    private static final String tagSource = "SourceAddress";
-
-    /**
-     * the element name for the sourceID of the message
-     */
-    private static final String tagSourceID = "SourceID";
-
-    /**
-     * the peer root cert
-     */
-    private Certificate rootCert = null;
-
-    /**
-     * the destination address of the message
-     */
-    private EndpointAddress destinationAddress = null;
-
-    /**
-     * the source address of the message
-     */
-    private EndpointAddress sourceAddress = null;
-
-    /**
-     * the source ID of the sender
-     */
-    private ID sourceID = null;
-
-    /**
-     * creates a new information object
-     */
-    public CbJxMessageInfo() {
-        super();
-    }
-
-    /**
-     * creates a new Message information by parsing the given stream
-     *
-     * @param stream the InputStream  source of the info data
-     * @throws IOException if the info can't be parsed from the stream
-     */
-    public CbJxMessageInfo(InputStream stream, MimeMediaType type) throws IOException {
-        super();
-
-        XMLDocument document = (XMLDocument)
-                StructuredDocumentFactory.newStructuredDocument(type, stream);
-
-        initialize(document);
-    }
-
-    /**
-     * retrieve the peer certificate
-     *
-     * @return Certificate the peer certificate
-     */
-    public Certificate getPeerCert() {
-        return rootCert;
-    }
-
-    /**
-     * set the peer certificate
-     *
-     * @param cert the peer certificate
-     */
-    public void setPeerCert(Certificate cert) {
-        rootCert = cert;
-    }
-
-    /**
-     * retrieve the destination address of the message
-     *
-     * @return String the original destination address of the message
-     */
-    public EndpointAddress getDestinationAddress() {
-        return destinationAddress;
-    }
-
-    /**
-     * set the destination address of the message
-     *
-     * @param addr the destination address
-     */
-    public void setDestinationAddress(EndpointAddress addr) {
-        destinationAddress = addr;
-    }
-
-    /**
-     * retrieve the original source address of the message
-     *
-     * @return String the original source address of the message
-     */
-    public EndpointAddress getSourceAddress() {
-        return sourceAddress;
-    }
-
-    /**
-     * set the source address of the messsage
-     *
-     * @param addr the source address
-     */
-    public void setSourceAddress(EndpointAddress addr) {
-        sourceAddress = addr;
-    }
-
-    /**
-     * retrieve the source id of the message
-     *
-     * @return String the source id of the sender
-     */
-    public ID getSourceID() {
-        return sourceID;
-    }
-
-    /**
-     * set the source id of the message
-     *
-     * @param src the ID of the sender
-     */
-    public void setSourceID(ID src) {
-        sourceID = src;
-    }
-
-    /**
-     * returns a Document containing the information's document tree
-     *
-     * @param asMimeType the desired MIME type for the information rendering
-     * @return Document the Document containing the information's document tree
-     */
-    public Document getDocument(MimeMediaType asMimeType) {
-        StructuredDocument document = StructuredDocumentFactory.newStructuredDocument(asMimeType, DOCTYPE);
-
-        Element element;
-
-        if (getPeerCert() == null) {
-            throw new IllegalStateException("Missing Peer Root Certificate");
-        }
-
-        try {
-            String base64cert = PSEUtils.base64Encode(getPeerCert().getEncoded());
-
-            element = document.createElement(tagPeerCert, base64cert);
-            document.appendChild(element);
-        } catch (Exception e) {
-            throw new IllegalStateException("Bad root cert! " + e);
-        }
-
-        if (getSourceID() == null) {
-            throw new IllegalStateException("Missing Source ID");
-        }
-
-        element = document.createElement(tagSourceID, getSourceID().toString());
-        document.appendChild(element);
-
-        if (getDestinationAddress() == null) {
-            throw new IllegalStateException("Missing Destination Address");
-        }
-
-        element = document.createElement(tagDestination, getDestinationAddress().toString());
-        document.appendChild(element);
-
-        if (getSourceAddress() == null) {
-            throw new IllegalStateException("Missing Source Address");
-        }
-
-        element = document.createElement(tagSource, getSourceAddress().toString());
-        document.appendChild(element);
-
-        return document;
-    }
-
-    /**
-     * Called to handle elements during parsing.
-     *
-     * @param elem Element to parse
-     * @return true if element was handled, otherwise false.
-     */
-    protected boolean handleElement(XMLElement elem) {
-        if (elem.getName().equals(tagPeerCert)) {
-            try {
-                byte[] cert_der = PSEUtils.base64Decode(new StringReader(elem.getTextValue()));
-
-                CertificateFactory cf = CertificateFactory.getInstance("X.509");
-
-                Certificate cert = cf.generateCertificate(new ByteArrayInputStream(cert_der));
-
-                setPeerCert(cert);
-            } catch (Exception e) {
-                throw new IllegalArgumentException("Bad X509 Cert!");
-            }
-            return true;
-        }
-
-        if (elem.getName().equals(tagDestination)) {
-            EndpointAddress destination = new EndpointAddress(elem.getTextValue());
-
-            setDestinationAddress(destination);
-            return true;
-        }
-
-        if (elem.getName().equals(tagSource)) {
-            EndpointAddress source = new EndpointAddress(elem.getTextValue());
-
-            setSourceAddress(source);
-            return true;
-        }
-
-        if (elem.getName().equals(tagSourceID)) {
-
-            try {
-                URI sourcePeerURL = new URI(elem.getTextValue().trim());
-                PeerID sourcePeerID = (PeerID) IDFactory.fromURI(sourcePeerURL);
-
-                setSourceID(sourcePeerID);
-            } catch (URISyntaxException badID) {
-                throw new IllegalArgumentException("Bad PeerGroupID in advertisement: " + elem.getTextValue());
-            } catch (ClassCastException badID) {
-                throw new IllegalArgumentException("Id is not a peer id: " + elem.getTextValue());
-            }
-            return true;
-        }
-
-        return false;
-    }
-
-    /**
-     * internal method to process a document into an advertisement.
-     *
-     * @param root where to start.
-     */
-    protected void initialize(Element root) {
-
-        if (!XMLElement.class.isInstance(root)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-        }
-
-        XMLElement doc = (XMLElement) root;
-
-        String doctype = doc.getName();
-
-        if (!doctype.equals(DOCTYPE)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-
-        Enumeration elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            XMLElement elem = (XMLElement) elements.nextElement();
-
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Unhandled Element: " + elem.getName());
-                }
-            }
-        }
-
-        // sanity checking time.
-
-        if (null == rootCert) {
-            throw new IllegalArgumentException("Document did not contain a root cert element");
-        }
-
-        if (null == destinationAddress) {
-            throw new IllegalArgumentException("Document did not contain a destination address element");
-        }
-
-        if (null == sourceAddress) {
-            throw new IllegalArgumentException("Document did not contain a source address element");
-        }
-
-        if (null == sourceID) {
-            throw new IllegalArgumentException("Document did not contain a source ID element");
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/cbjx/CbJxMessenger.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/cbjx/CbJxMessenger.java
deleted file mode 100644 (file)
index 5d132c0..0000000
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.endpoint.cbjx;
-
-
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.Messenger;
-import net.jxta.impl.endpoint.BlockingMessenger;
-import net.jxta.logging.Logging;
-
-import java.io.IOException;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * This class is the Messenger used to send CbJx Messages
- */
-public class CbJxMessenger extends BlockingMessenger {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(CbJxMessenger.class.getName());
-
-    /**
-     * the new destination address computed by the CbJx Endpoint
-     * this address is of the form jxta://<peerID>/CbJxService/<peerGroupID>
-     */
-    private final EndpointAddress newDestAddr;
-
-    /**
-     * A string which we can lock on while acquiring new messengers. We don't
-     * want to lock the whole object.
-     */
-    private final Object acquireMessengerLock = new String("Messenger Acquire Lock");
-
-    /**
-     * Cached messenger for sending to {@link #newDestAddr}
-     */
-    private Messenger outBoundMessenger = null;
-
-    /**
-     *  The transport we are working for.
-     */
-    private final CbJxTransport transport;
-
-    /**
-     * constructor
-     *
-     * @param dest the destination address
-     */
-    public CbJxMessenger(CbJxTransport transport, EndpointAddress dest, Object hintIgnored) throws IOException {
-        this(transport, dest);
-    }
-
-    /**
-     * constructor
-     *
-     * @param dest the destination address
-     */
-    public CbJxMessenger(CbJxTransport transport, EndpointAddress dest) throws IOException {
-
-        // Do not use self destruction. There's nothing we have that can't just let be GC'ed
-        super(transport.group.getPeerGroupID(), dest, false);
-
-        this.transport = transport;
-
-        newDestAddr = new EndpointAddress("jxta", dest.getProtocolAddress(), CbJxTransport.cbjxServiceName, null);
-
-        outBoundMessenger = transport.endpoint.getMessengerImmediate(newDestAddr, null);
-
-        if (null == outBoundMessenger) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("Could not get messenger for " + newDestAddr);
-            }
-
-            throw new IOException("Could not get messenger for " + newDestAddr);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void closeImpl() {
-        synchronized (acquireMessengerLock) {
-            outBoundMessenger.close();
-            outBoundMessenger = null;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public EndpointAddress getLogicalDestinationImpl() {
-        return newDestAddr;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Since CbJx is a virtual transport and consumes very few resources there
-     * is no point to doing idle teardown.
-     */
-    @Override
-    public boolean isIdleImpl() {
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void sendMessageBImpl(Message msg, String service, String serviceParam) throws IOException {
-        msg = msg.clone();
-
-        EndpointAddress destAddressToUse = getDestAddressToUse(service, serviceParam);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Messenger: sending out " + msg + " to: " + destAddressToUse);
-        }
-
-        // add the cbjx info to the message
-        msg = transport.addCryptoInfo(msg, destAddressToUse);
-
-            if (isClosed()) {
-                IOException failure = new IOException("Messenger was closed, it cannot be used to send messages.");
-
-                if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                    LOG.info(failure.toString());
-                }
-
-                throw failure;
-            }
-
-            // and sends out the message
-        sendTo( msg );
-    }
-
-    /**
-     * Send a message via the underlying messenger.
-     *
-     * @param msg The message to send to the remote peer.
-     * @throws IOException if there was a problem sending the message.
-     **/
-    void sendTo( Message msg ) throws IOException {
-
-        synchronized (acquireMessengerLock) {
-            if ((null == outBoundMessenger) || outBoundMessenger.isClosed()) {
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Getting messenger for " + newDestAddr);
-                }
-
-                outBoundMessenger = transport.endpoint.getMessengerImmediate(newDestAddr, null);
-
-                if (outBoundMessenger == null) {
-                    if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                        LOG.severe("Could not get messenger for " + newDestAddr);
-                    }
-
-                    throw new IOException("Underlying messenger could not be repaired");
-                }
-            }
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Sending " + msg + " to endpoint " + newDestAddr);
-        }
-
-        // Good we have a messenger. Send the message.
-        outBoundMessenger.sendMessageB(msg, null, null);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/cbjx/CbJxTransport.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/cbjx/CbJxTransport.java
deleted file mode 100644 (file)
index 142d33a..0000000
+++ /dev/null
@@ -1,692 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.cbjx;
-
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.TextDocument;
-import net.jxta.endpoint.ByteArrayMessageElement;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointListener;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.MessageFilterListener;
-import net.jxta.endpoint.MessageReceiver;
-import net.jxta.endpoint.MessageSender;
-import net.jxta.endpoint.Messenger;
-import net.jxta.endpoint.TextDocumentMessageElement;
-import net.jxta.endpoint.WireFormatMessage;
-import net.jxta.endpoint.WireFormatMessageFactory;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.impl.endpoint.JxtaMessageMessageElement;
-import net.jxta.impl.membership.pse.PSECredential;
-import net.jxta.impl.membership.pse.PSEMembershipService;
-import net.jxta.impl.membership.pse.PSEUtils;
-import net.jxta.logging.Logging;
-import net.jxta.membership.MembershipService;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.platform.Module;
-import net.jxta.protocol.ModuleImplAdvertisement;
-
-import java.io.IOException;
-import java.security.cert.Certificate;
-import java.security.interfaces.RSAPublicKey;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * A JXTA {@link net.jxta.endpoint.MessageTransport} implementation which
- * which provides message verification by examining message signatures. A
- * virtual transport, the messages are transfered between peers using some
- * other message transport.
- */
-public class CbJxTransport implements Module, MessageSender, MessageReceiver, EndpointListener {
-
-    /**
-     * Logger
-     */
-    private final static Logger LOG = Logger.getLogger(CbJxTransport.class.getName());
-
-    /**
-     * the name of the cbjx valid element
-     */
-    public static final String CBJX_MSG_NS = "cbjx";
-
-    /**
-     * the name of the cbjx crypto element
-     */
-    static final String CBJX_MSG_INFO = "CryptoInfo";
-
-    /**
-     * the name of the cbjx body element
-     */
-    static final String CBJX_MSG_BODY = "Body";
-
-    /**
-     * the name of the cbjx body element
-     */
-    static final String CBJX_MSG_SIG = "Signature";
-
-    /**
-     * the cbjx protocol name
-     */
-    static final String cbjxProtocolName = "cbjx";
-
-    /**
-     * the cbjx service name
-     */
-    static final String cbjxServiceName = "CbJxTransport";
-
-    /**
-     * the local peer ID
-     */
-    static PeerID localPeerID = null;
-
-    /**
-     * the endpoint address of this peer
-     */
-    static EndpointAddress localPeerAddr = null;
-
-    /**
-     * the peer group to which this module belongs
-     */
-    PeerGroup group = null;
-
-    /**
-     * the endpoint service in my group
-     */
-    EndpointService endpoint = null;
-
-    /**
-     * the membership service in my group
-     */
-    PSEMembershipService membership = null;
-
-    /**
-     * Default constructor
-     */
-    public CbJxTransport() {}
-
-    /**
-     * {@inheritDoc}
-     */
-    public void init(PeerGroup group, ID assignedID, Advertisement impl) throws PeerGroupException {
-        this.group = group;
-
-        ModuleImplAdvertisement implAdvertisement = (ModuleImplAdvertisement) impl;
-
-        localPeerID = group.getPeerID();
-
-        CbJxTransport.localPeerAddr = new EndpointAddress(cbjxProtocolName, group.getPeerID().getUniqueValue().toString(), null
-                ,
-                null);
-
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring CBJX Message Transport : " + assignedID);
-
-            if (implAdvertisement != null) {
-                configInfo.append("\n\tImplementation :");
-                configInfo.append("\n\t\tModule Spec ID: ").append(implAdvertisement.getModuleSpecID());
-                configInfo.append("\n\t\tImpl Description : ").append(implAdvertisement.getDescription());
-                configInfo.append("\n\t\tImpl URI : ").append(implAdvertisement.getUri());
-                configInfo.append("\n\t\tImpl Code : ").append(implAdvertisement.getCode());
-            }
-
-            configInfo.append("\n\tGroup Params :");
-            configInfo.append("\n\t\tGroup : ").append(group);
-            configInfo.append("\n\t\tPeer ID : ").append(group.getPeerID());
-
-            configInfo.append("\n\tConfiguration :");
-            configInfo.append("\n\t\tPublic Address : ").append(CbJxTransport.localPeerAddr);
-
-            LOG.config(configInfo.toString());
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public int startApp(String[] arg) {
-
-        endpoint = group.getEndpointService();
-
-        if (null == endpoint) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is an endpoint service");
-            }
-            return START_AGAIN_STALLED;
-        }
-
-        MembershipService groupMembership = group.getMembershipService();
-
-        if (null == groupMembership) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is a membership service");
-            }
-            return START_AGAIN_STALLED;
-        }
-
-        if (!(groupMembership instanceof PSEMembershipService)) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("CBJX Transport requires PSE Membership Service");
-            }
-            return -1;
-        }
-
-        membership = (PSEMembershipService) groupMembership;
-
-        if (endpoint.addMessageTransport(this) == null) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("Transport registration refused");
-            }
-            return -1;
-        }
-
-        // XXX bondolo@jxta.org 20030526 check for errors
-
-        endpoint.addIncomingMessageListener(this, cbjxServiceName, null);
-
-        endpoint.addIncomingMessageFilterListener(new CbJxInputFilter(), null, null);
-        // endpoint.addOutgoingMessageFilterListener( new CbJxOutputFilter(), null, null );
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("CbJxTransport started");
-        }
-
-        return 0;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void stopApp() {
-
-        if (endpoint != null) {
-            // FIXME 20030516 bondolo@jxta.org remove filters and listener
-
-            endpoint.removeMessageTransport(this);
-            endpoint = null;
-        }
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("CbJxTransport stopped");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public EndpointAddress getPublicAddress() {
-        return CbJxTransport.localPeerAddr;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isConnectionOriented() {
-        // since we rely on other endpoint protocol we are not connection oriented
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean allowsRouting() {
-        // since we are using the endpoint router
-        // the endpoint router cannot use our endpoint to send messages
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public EndpointService getEndpointService() {
-        return (EndpointService) endpoint.getInterface();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Object transportControl(Object operation, Object value) {
-        return null;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Iterator getPublicAddresses() {
-        return Collections.singletonList(getPublicAddress()).iterator();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getProtocolName() {
-        return cbjxProtocolName;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Messenger getMessenger(EndpointAddress dest, Object hintIgnored) {
-        try {
-            return new CbJxMessenger(this, dest, hintIgnored);
-        } catch (IOException failed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed to create cbjx messenger", failed);
-            }
-            return null;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Deprecated
-    public boolean ping(EndpointAddress addr) {
-        Messenger messenger = getMessenger(addr, null);
-
-        boolean reachable = (null != messenger);
-
-        if (messenger != null) {
-            messenger.close();
-        }
-
-        return reachable;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void processIncomingMessage(Message message, EndpointAddress srcAddr, EndpointAddress dstAddr) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("processIncomingMessage : Received message from: " + srcAddr);
-        }
-
-        // extract the Crypto info from the message
-        MessageElement cryptoElement = message.getMessageElement(CBJX_MSG_NS, CBJX_MSG_INFO);
-
-        if (cryptoElement == null) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("processIncomingMessage : No \'" + CBJX_MSG_INFO + "\' in the message");
-            }
-            return;
-        }
-        message.removeMessageElement(cryptoElement);
-
-        // the cbjx message info
-        CbJxMessageInfo cryptoInfo = null;
-
-        try {
-            cryptoInfo = new CbJxMessageInfo(cryptoElement.getStream(), cryptoElement.getMimeType());
-        } catch (Throwable e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING
-                        ,
-                        "processIncomingMessage : Couldn\'t retrieve CbJxMessageInfo from \'" + CBJX_MSG_INFO + "\' element", e);
-            }
-            return;
-        }
-
-        Message submessage = checkCryptoInfo(message, cryptoElement, cryptoInfo);
-
-        if (null == submessage) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("processIncomingMessage : discarding message from " + srcAddr);
-            }
-            return;
-        }
-
-        // give back the message to the endpoint
-        try {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("processIncomingMessage: delivering " + submessage + " to: " + cryptoInfo.getDestinationAddress());
-            }
-
-            endpoint.processIncomingMessage(submessage, cryptoInfo.getSourceAddress(), cryptoInfo.getDestinationAddress());
-        } catch (Throwable all) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "processIncomingMessage: endpoint failed to demux message", all);
-            }
-        }
-    }
-
-    /**
-     * add the CryptoInfo into the message
-     *
-     * @param submessage  the message
-     * @param destAddress the destination
-     * @return Message the message with the CbJxMessageInfo added
-     */
-    public Message addCryptoInfo(Message submessage, EndpointAddress destAddress) throws IOException {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Building CBJX wrapper for " + submessage);
-        }
-
-        // Remove all existing CbJx Elements from source
-        Iterator eachCbJxElement = submessage.getMessageElementsOfNamespace(CbJxTransport.CBJX_MSG_NS);
-
-        while (eachCbJxElement.hasNext()) {
-            MessageElement aMessageElement = (MessageElement) eachCbJxElement.next();
-
-            eachCbJxElement.remove();
-        }
-
-        Message message = new Message();
-
-        CbJxMessageInfo cryptoInfo = new CbJxMessageInfo();
-
-        // set the source Id of the message
-        cryptoInfo.setSourceID(localPeerID);
-        cryptoInfo.setSourceAddress(localPeerAddr);
-        cryptoInfo.setDestinationAddress(destAddress);
-
-        // add the root cert into the message info
-        PSECredential cred = (PSECredential) membership.getDefaultCredential();
-
-        if (null == cred) {
-            throw new IOException("No authentication available for message signing.");
-        }
-
-        Certificate cert = cred.getCertificate();
-
-        cryptoInfo.setPeerCert(cert);
-
-        // compute the signature of the message body
-        TextDocument infoDoc = (TextDocument) cryptoInfo.getDocument(MimeMediaType.XMLUTF8);
-        byte[] infoSignature = null;
-
-        try {
-            infoSignature = PSEUtils.computeSignature(CbJxDefs.signAlgoName, cred.getPrivateKey(), infoDoc.getStream());
-        } catch (Throwable e) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "failed to sign " + submessage, e);
-            }
-            return null;
-        }
-
-        // add the cbjx:CryptoInfo into the message
-        MessageElement infoSigElement = new ByteArrayMessageElement(CBJX_MSG_SIG, MimeMediaType.AOS, infoSignature, null);
-
-        // add the cbjx:CryptoInfo into the message
-        MessageElement cryptoInfoElement = new TextDocumentMessageElement(CBJX_MSG_INFO, infoDoc, infoSigElement);
-
-        message.addMessageElement(CBJX_MSG_NS, cryptoInfoElement);
-
-        // Compute the signature of the encapsulated message and append it to
-        // the container.
-
-        // serialize the container
-        WireFormatMessage subserial = WireFormatMessageFactory.toWire(submessage, WireFormatMessageFactory.DEFAULT_WIRE_MIME, null);
-
-        // calculate the signature
-        byte[] bodySignature = null;
-
-        try {
-            bodySignature = PSEUtils.computeSignature(CbJxDefs.signAlgoName, cred.getPrivateKey(), subserial.getStream());
-        } catch (Throwable e) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "failed to sign" + submessage, e);
-            }
-            return null;
-        }
-
-        subserial = null;
-
-        // Make the signature into an element
-        MessageElement bodySigElement = new ByteArrayMessageElement(CBJX_MSG_SIG, MimeMediaType.AOS, bodySignature, null);
-
-        // Add the encapsulated body into the container message.
-        message.addMessageElement(CBJX_MSG_NS
-                ,
-                new JxtaMessageMessageElement(CBJX_MSG_BODY, new MimeMediaType("application/x-jxta-msg"), submessage
-                ,
-                bodySigElement));
-
-        return message;
-    }
-
-    public Message checkCryptoInfo(Message message, MessageElement cryptoElement, CbJxMessageInfo cryptoInfo) {
-
-        // extract the body element  from the message
-        JxtaMessageMessageElement bodyElement = (JxtaMessageMessageElement) message.getMessageElement(CBJX_MSG_NS, CBJX_MSG_BODY);
-
-        if (null == bodyElement) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("No \'" + CBJX_MSG_BODY + "\' in " + message);
-            }
-            return null;
-        }
-        message.removeMessageElement(bodyElement);
-
-        // extract the peer certificate
-        Certificate peerCert = cryptoInfo.getPeerCert();
-
-        // and from it the public key
-        // the public key from the message
-        RSAPublicKey publicKey = (RSAPublicKey) peerCert.getPublicKey();
-
-        // check the cert validity
-        try {
-            peerCert.verify(publicKey);
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Invalid peer cert", e);
-            }
-            return null;
-        }
-
-        // check the cbid
-        try {
-            net.jxta.impl.id.CBID.PeerID srcPeerID = (net.jxta.impl.id.CBID.PeerID) cryptoInfo.getSourceID();
-
-            byte[] pub_der = peerCert.getPublicKey().getEncoded();
-            net.jxta.impl.id.CBID.PeerID genID = (net.jxta.impl.id.CBID.PeerID) IDFactory.newPeerID(group.getPeerGroupID()
-                    ,
-                    pub_der);
-
-            if (!srcPeerID.getUUID().equals(genID.getUUID())) {
-                // the cbid is not valid. Discard the message
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("CBID of " + message + " is not valid : " + srcPeerID + " != " + genID);
-                }
-                return null;
-            }
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("CBID of the message is valid");
-            }
-        } catch (Throwable e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "failed to verify cbid", e);
-            }
-            return null;
-        }
-
-        // verify the signature of the cryptinfo message
-        try {
-            boolean valid = PSEUtils.verifySignature(CbJxDefs.signAlgoName, peerCert, cryptoElement.getSignature().getBytes(false)
-                    ,
-                    cryptoElement.getStream());
-
-            if (!valid) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Failed to verify the signature of cryptinfo for " + message);
-                }
-                return null;
-            }
-        } catch (Throwable e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed to verify the signature of cryptinfo for " + message, e);
-            }
-            return null;
-        }
-
-        // then verify the signature
-        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-            LOG.warning("verifying signature");
-        }
-
-        // verify the signature of the message
-        try {
-            boolean valid = PSEUtils.verifySignature(CbJxDefs.signAlgoName, peerCert, bodyElement.getSignature().getBytes(false)
-                    ,
-                    bodyElement.getStream());
-
-            if (!valid) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("failed to verify the signature of " + message);
-                }
-                return null;
-            }
-        } catch (Throwable e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "failed to verify the signature of " + message, e);
-            }
-            return null;
-        }
-
-        // the message is valid
-        return bodyElement.getMessage();
-    }
-
-    /**
-     * this class filters incoming messages.
-     * it checks if messages are valid and if not discard them
-     */
-    public class CbJxInputFilter implements MessageFilterListener {
-        public CbJxInputFilter() {
-            super();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Message filterMessage(Message message, EndpointAddress srcAddr, EndpointAddress dstAddr) {
-
-            if (dstAddr.getProtocolAddress().equals(getProtocolName())) {
-                // extract the Crypto info from the message
-                MessageElement cryptoElement = message.getMessageElement(CBJX_MSG_NS, CBJX_MSG_INFO);
-
-                if (cryptoElement == null) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("No \'" + CBJX_MSG_INFO + "\' in the message");
-                    }
-                    return null;
-                }
-                message.removeMessageElement(cryptoElement);
-
-                // the cbjx message info
-                CbJxMessageInfo cryptoInfo = null;
-
-                try {
-                    cryptoInfo = new CbJxMessageInfo(cryptoElement.getStream(), cryptoElement.getMimeType());
-                } catch (Throwable e) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Couldn\'t retrieve CbJxMessageInfo from \'" + CBJX_MSG_INFO + "\' element", e);
-                    }
-                    return null;
-                }
-
-                return checkCryptoInfo(message, cryptoElement, cryptoInfo);
-            }
-
-            return message;
-        }
-    }
-
-
-    /**
-     * this class filters all outgoing messages that are not sent with
-     * messengers. (that is propagate messages). It adds CbJxInformation
-     * into to messages.
-     */
-    public class CbJxOutputFilter implements MessageFilterListener {
-
-        /**
-         * Default constructor
-         */
-        public CbJxOutputFilter() {
-            super();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Message filterMessage(Message message, EndpointAddress srcAddr, EndpointAddress dstAddr) {
-            Message msg = message.clone();
-
-            if (null == msg.getMessageElement(CBJX_MSG_NS, CBJX_MSG_INFO)) {
-                try {
-                    msg = addCryptoInfo(msg, dstAddr);
-                } catch (IOException failed) {
-                    return null;
-                }
-            }
-
-            return msg;
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/cbjx/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/cbjx/package.html
deleted file mode 100644 (file)
index 4d04e18..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    A JXTA {@link net.jxta.endpoint.MessageTransport} implementation which 
-    which provides message verification by examining message signatures. A
-    virtual transport, the messages are transfered between peers using some 
-    other message transport.
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/ConditionalEndpointMeterBuildSettings.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/ConditionalEndpointMeterBuildSettings.java
deleted file mode 100644 (file)
index c502900..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Copyright (c) 2001-2006 Sun Microsystems, Inc. All rights reserved.
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at https://jxta.dev.java.net.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <https://jxta.dev.java.net/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
-
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  https://jxta.dev.java.net/
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- *  
- */
-
-
-/*  ****  THIS IS A GENERATED FILE. DO NOT EDIT.  ****  */
-
-package net.jxta.impl.endpoint.endpointMeter;
-
-import java.util.ResourceBundle;
-import net.jxta.impl.meter.*;
-
-public class ConditionalEndpointMeterBuildSettings {
-       public static boolean isRuntimeMetering() {
-               boolean runtimeMetering = false; 
-
-               try { 
-                       ResourceBundle userResourceBundle = ResourceBundle.getBundle( "net.jxta.user" ); 
-                       String meteringProperty = "net.jxta.meter.conditionalEndpointMetering"; 
-                       String meteringValue = userResourceBundle.getString( meteringProperty ); 
-                       runtimeMetering = "on".equalsIgnoreCase( meteringValue ); 
-               } catch (Exception ignored) { 
-               }
-
-               return runtimeMetering;
-       }
-}
\ No newline at end of file
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/EndpointMeter.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/EndpointMeter.java
deleted file mode 100644 (file)
index b3f4614..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.endpointMeter;
-
-
-import net.jxta.peer.*;
-import net.jxta.peergroup.*;
-import net.jxta.endpoint.*;
-import net.jxta.impl.endpoint.*;
-
-import java.net.*;
-import java.util.*;
-
-
-/**
- *    Aggregate Meter for Endpoint Monitoring
- **/
-public class EndpointMeter {
-       
-    private EndpointMetric total;
-    private EndpointMetric delta;
-
-    public EndpointMeter() {
-        total = new EndpointMetric();
-    }
-
-    public EndpointMetric getCumulativeMetrics() {
-        total.setEndpointUpTime(System.currentTimeMillis() - total.getEndpointStartTime());
-        return total; 
-    }
-       
-    public synchronized EndpointMetric collectMetrics() {
-        if (delta != null) {
-            delta.setEndpointUpTime(System.currentTimeMillis() - total.getEndpointStartTime());
-        }
-
-        EndpointMetric oldDelta = delta;
-               
-        delta = null;
-               
-        return oldDelta;
-    }
-
-    public void invalidIncomingMessage() {
-        if (delta == null) {   
-            createDeltaMetric();
-        }
-
-        delta.invalidIncomingMessage();
-        total.invalidIncomingMessage();
-    }
-
-    public void noListenerForIncomingMessage() {
-        if (delta == null) {   
-            createDeltaMetric();
-        }
-
-        delta.noListenerForIncomingMessage();
-        total.noListenerForIncomingMessage();
-    }
-
-    public void errorProcessingIncomingMessage() {
-        if (delta == null) {   
-            createDeltaMetric();
-        }
-
-        delta.errorProcessingIncomingMessage();
-        total.errorProcessingIncomingMessage();
-    }
-
-    public void noDestinationAddressForDemuxMessage() {
-        if (delta == null) {   
-            createDeltaMetric();
-        }
-
-        delta.noDestinationAddressForDemuxMessage();
-        total.noDestinationAddressForDemuxMessage();
-    }
-
-    public void noSourceAddressForDemuxMessage() {
-        if (delta == null) {   
-            createDeltaMetric();
-        }
-
-        delta.noSourceAddressForDemuxMessage();
-        total.noSourceAddressForDemuxMessage();
-    }
-
-    public void discardedLoopbackDemuxMessage() {
-        if (delta == null) {   
-            createDeltaMetric();
-        }
-       
-        delta.discardedLoopbackDemuxMessage();
-        total.discardedLoopbackDemuxMessage();
-    }
-
-    public void incomingMessageFilteredOut() {
-        if (delta == null) {   
-            createDeltaMetric();
-        }
-       
-        delta.incomingMessageFilteredOut();
-        total.incomingMessageFilteredOut();
-    }
-
-    public void incomingMessageSentToEndpointListener() {
-        if (delta == null) {   
-            createDeltaMetric();
-        }
-       
-        delta.incomingMessageSentToEndpointListener();
-        total.incomingMessageSentToEndpointListener();
-    }
-
-    public void demuxMessageProcessed() {
-        if (delta == null) {   
-            createDeltaMetric();
-        }
-       
-        delta.demuxMessageProcessed();
-        total.demuxMessageProcessed();
-    }
-               
-    private void createDeltaMetric() {
-        delta = new EndpointMetric(total);
-    }
-
-    @Override
-    public String toString() {
-        return "EndpointMeter()";
-    }
-
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/EndpointMeterBuildSettings.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/EndpointMeterBuildSettings.java
deleted file mode 100644 (file)
index dc6809b..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Copyright (c) 2001-2006 Sun Microsystems, Inc. All rights reserved.
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at https://jxta.dev.java.net.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <https://jxta.dev.java.net/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
-
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  https://jxta.dev.java.net/
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- *  
- */
-
-
-/*  ****  THIS IS A GENERATED FILE. DO NOT EDIT.  ****  */
-
-package net.jxta.impl.endpoint.endpointMeter;
-
-import net.jxta.impl.meter.*;
-
-public interface EndpointMeterBuildSettings extends MeterBuildSettings {
-       public static final boolean ENDPOINT_METERING = ConditionalEndpointMeterBuildSettings.isRuntimeMetering();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/EndpointMetric.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/EndpointMetric.java
deleted file mode 100644 (file)
index ee7456a..0000000
+++ /dev/null
@@ -1,282 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.endpointMeter;
-
-
-import net.jxta.endpoint.*;
-import net.jxta.util.documentSerializable.*;
-import net.jxta.document.*;
-
-import java.util.*;
-
-
-/**
- *    Aggregate Metric for Endpoint Monitoring
- **/
-public class EndpointMetric implements DocumentSerializable {
-    private long endpointStartTime;
-    private long endpointUpTime;
-    private int invalidIncomingMessage;
-    private int noListenerForIncomingMessage;
-    private int errorProcessingIncomingMessage;
-    private int noDestinationAddressForDemuxMessage;
-    private int noSourceAddressForDemuxMessage;
-    private int discardedLoopbackDemuxMessage;
-    private int incomingMessageFilteredOut;
-    private int incomingMessageSentToEndpointListener;
-    private int demuxMessageProcessed;
-       
-    public EndpointMetric() { 
-        endpointStartTime = System.currentTimeMillis();
-    }
-
-    public EndpointMetric(EndpointMetric prototype) { 
-        endpointStartTime = prototype.endpointStartTime;
-    }
-       
-    void invalidIncomingMessage() {
-        invalidIncomingMessage++;
-    }
-
-    void noListenerForIncomingMessage() {
-        noListenerForIncomingMessage++;
-    }
-
-    void errorProcessingIncomingMessage() {
-        errorProcessingIncomingMessage++;
-    }
-
-    void noDestinationAddressForDemuxMessage() {
-        noDestinationAddressForDemuxMessage++;
-    }
-
-    void noSourceAddressForDemuxMessage() {
-        noSourceAddressForDemuxMessage++;
-    }
-
-    void discardedLoopbackDemuxMessage() {
-        discardedLoopbackDemuxMessage++;
-    }
-
-    void incomingMessageFilteredOut() {
-        incomingMessageFilteredOut++;
-    }
-
-    void incomingMessageSentToEndpointListener() {
-        incomingMessageSentToEndpointListener++;
-    }
-
-    void demuxMessageProcessed() {
-        demuxMessageProcessed++;
-    }
-
-    void setEndpointUpTime(long endpointUpTime) {
-        this.endpointUpTime = endpointUpTime;
-    }
-
-    /** Get the time this Endpoint was created, essentially the boot time of the PeerGroup **/
-    public long getEndpointStartTime() {
-        return endpointStartTime;
-    }
-
-    /** Get the time this Endpoint has been up **/
-    public long getEndpointUpTime() {
-        return endpointUpTime;
-    }
-
-    /** The number of messages received that had invalid formats **/
-    public int getInvalidIncomingMessage() {
-        return invalidIncomingMessage;
-    }
-
-    /** The number of messages received that had no listeners **/
-    public int getNoListenerForIncomingMessage() {
-        return noListenerForIncomingMessage;
-    }
-
-    /** The number of messages whose local listeners threw exceptions **/
-    public int getErrorProcessingIncomingMessage() {
-        return errorProcessingIncomingMessage;
-    }
-
-    /** The number of messages that couldn't be demuxed because there was no destination address **/
-    public int getNoDestinationAddressForDemuxMessage() {
-        return noDestinationAddressForDemuxMessage;
-    }
-
-    /** The number of messages that couldn't be demuxed because there was no source address **/
-    public int getNoSourceAddressForDemuxMessage() {
-        return noSourceAddressForDemuxMessage;
-    }
-
-    /** The number of messages that were discarded because of loopback detection **/
-    public int getDiscardedLoopbackDemuxMessage() {
-        return discardedLoopbackDemuxMessage;
-    }
-
-    /** The number of messages that were discarded because of filtering **/
-    public int getIncomingMessageFilteredOut() {
-        return incomingMessageFilteredOut;
-    }
-
-    /** The number of messages that sent to registered listeners **/
-    public int getIncomingMessageSentToEndpointListener() {
-        return incomingMessageSentToEndpointListener;
-    }
-
-    /** The number of messages that were processed through demux **/
-    public int getDemuxMessageProcessed() {
-        return demuxMessageProcessed;
-    }
-               
-    public void serializeTo(Element element) throws DocumentSerializationException {
-        if (endpointStartTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "endpointStartTime", endpointStartTime);
-        }
-        if (endpointUpTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "endpointUpTime", endpointUpTime);
-        }
-        if (invalidIncomingMessage != 0) {
-            DocumentSerializableUtilities.addInt(element, "invalidIncomingMessage", invalidIncomingMessage);
-        }
-        if (noListenerForIncomingMessage != 0) {
-            DocumentSerializableUtilities.addInt(element, "noListenerForIncomingMessage", noListenerForIncomingMessage);
-        }
-        if (errorProcessingIncomingMessage != 0) {     
-            DocumentSerializableUtilities.addInt(element, "errorProcessingIncomingMessage", errorProcessingIncomingMessage);
-        }
-        if (noDestinationAddressForDemuxMessage != 0) {
-            DocumentSerializableUtilities.addInt(element, "noDestinationAddressForDemuxMessage"
-                    ,
-                    noDestinationAddressForDemuxMessage);
-        }
-        if (noSourceAddressForDemuxMessage != 0) {
-            DocumentSerializableUtilities.addInt(element, "noSourceAddressForDemuxMessage", noSourceAddressForDemuxMessage);
-        }
-        if (discardedLoopbackDemuxMessage != 0) {
-            DocumentSerializableUtilities.addInt(element, "discardedLoopbackDemuxMessage", discardedLoopbackDemuxMessage);
-        }
-        if (incomingMessageFilteredOut != 0) {
-            DocumentSerializableUtilities.addInt(element, "incomingMessageFilteredOut", incomingMessageFilteredOut);
-        }
-        if (incomingMessageSentToEndpointListener != 0) {
-            DocumentSerializableUtilities.addInt(element, "incomingMessageSentToEndpointListener"
-                    ,
-                    incomingMessageSentToEndpointListener);
-        }
-        if (demuxMessageProcessed != 0) {
-            DocumentSerializableUtilities.addInt(element, "demuxMessageProcessed", demuxMessageProcessed);
-        }
-    }
-
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element childElement = (TextElement) e.nextElement();
-            String tagName = (String) childElement.getKey();
-                       
-            if (tagName.equals("endpointStartTime")) {
-                endpointStartTime = DocumentSerializableUtilities.getLong(childElement);
-            }
-            if (tagName.equals("endpointUpTime")) {
-                endpointUpTime = DocumentSerializableUtilities.getLong(childElement);
-            }
-            if (tagName.equals("invalidIncomingMessage")) {
-                invalidIncomingMessage = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("noListenerForIncomingMessage")) {
-                noListenerForIncomingMessage = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("errorProcessingIncomingMessage")) {
-                errorProcessingIncomingMessage = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("noDestinationAddressForDemuxMessage")) {
-                noDestinationAddressForDemuxMessage = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("noSourceAddressForDemuxMessage")) {
-                noSourceAddressForDemuxMessage = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("invalidIncomingMessage")) {
-                invalidIncomingMessage = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("discardedLoopbackDemuxMessage")) {
-                discardedLoopbackDemuxMessage = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("incomingMessageFilteredOut")) {
-                incomingMessageFilteredOut = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("incomingMessageSentToEndpointListener")) {
-                incomingMessageSentToEndpointListener = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("demuxMessageProcessed")) {
-                demuxMessageProcessed = DocumentSerializableUtilities.getInt(childElement);
-            }
-        }
-
-    }
-
-    public void mergeMetrics(EndpointMetric other) {
-        if (other == null) {
-            return;
-        }
-
-        endpointStartTime = other.endpointStartTime;
-
-        if (other.endpointUpTime != 0) {
-            endpointUpTime = other.endpointUpTime;
-        }
-                       
-        invalidIncomingMessage += other.invalidIncomingMessage;
-        noListenerForIncomingMessage += other.noListenerForIncomingMessage;
-        errorProcessingIncomingMessage += other.errorProcessingIncomingMessage;
-        noDestinationAddressForDemuxMessage += other.noDestinationAddressForDemuxMessage;
-        noSourceAddressForDemuxMessage += other.noSourceAddressForDemuxMessage;
-        discardedLoopbackDemuxMessage += other.discardedLoopbackDemuxMessage;
-        incomingMessageSentToEndpointListener += other.incomingMessageSentToEndpointListener;
-        demuxMessageProcessed += other.demuxMessageProcessed;          
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/EndpointServiceMetric.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/EndpointServiceMetric.java
deleted file mode 100644 (file)
index 720eb00..0000000
+++ /dev/null
@@ -1,359 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.endpointMeter;
-
-
-import net.jxta.document.Element;
-import net.jxta.document.TextElement;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.id.IDFactory;
-import net.jxta.meter.MonitorResources;
-import net.jxta.meter.ServiceMetric;
-import net.jxta.platform.ModuleClassID;
-import net.jxta.util.documentSerializable.DocumentSerializableUtilities;
-import net.jxta.util.documentSerializable.DocumentSerializationException;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.LinkedList;
-
-
-/**
- * Basic Service Metric EndpointService Monitoring
- */
-public class EndpointServiceMetric implements ServiceMetric {
-    private LinkedList<InboundMetric> inboundMetrics = new LinkedList<InboundMetric>();
-    private LinkedList<OutboundMetric> outboundMetrics = new LinkedList<OutboundMetric>();
-    private LinkedList<PropagationMetric> propagationMetrics = new LinkedList<PropagationMetric>();
-    private EndpointMetric endpointMetric;
-    private ModuleClassID moduleClassID = MonitorResources.endpointServiceMonitorClassID;
-
-    public EndpointServiceMetric() {}
-
-    public EndpointServiceMetric(ModuleClassID moduleClassID) {
-        this.moduleClassID = moduleClassID;
-    }
-
-    public void init(ModuleClassID moduleClassID) {
-        this.moduleClassID = moduleClassID;
-    }
-
-    public ModuleClassID getModuleClassID() {
-        return moduleClassID;
-    }
-
-    void addInboundMetric(InboundMetric inboundMetric) {
-        inboundMetrics.add(inboundMetric);
-    }
-
-    public Iterator<InboundMetric> getInboundMetrics() {
-        return inboundMetrics.iterator();
-    }
-
-    public InboundMetric getInboundMetric(String serviceName, String serviceParam) {
-        for (InboundMetric inboundMetric : inboundMetrics) {
-            if (inboundMetric.matches(serviceName, serviceParam)) {
-                return inboundMetric;
-            }
-        }
-
-        return null;
-    }
-
-    public Iterator<PropagationMetric> getPropagationMetrics() {
-        return propagationMetrics.iterator();
-    }
-
-    public PropagationMetric getPropagationMetric(String serviceName, String serviceParam) {
-        for (PropagationMetric propagationMetric : propagationMetrics) {
-            if (propagationMetric.matches(serviceName, serviceParam)) {
-                return propagationMetric;
-            }
-        }
-
-        return null;
-    }
-
-    void addPropagationMetric(PropagationMetric propagationMetric) {
-        propagationMetrics.add(propagationMetric);
-    }
-
-    void addOutboundMetric(OutboundMetric outboundMetric) {
-        outboundMetrics.add(outboundMetric);
-    }
-
-    public Iterator<OutboundMetric> getOutboundMetrics() {
-        return outboundMetrics.iterator();
-    }
-
-    public OutboundMetric getOutboundMetric(EndpointAddress endpointAddress) {
-        for (OutboundMetric outboundMetric : outboundMetrics) {
-            if (outboundMetric.matches(endpointAddress)) {
-                return outboundMetric;
-            }
-        }
-
-        return null;
-    }
-
-    public EndpointMetric getEndpointMetric() {
-        return endpointMetric;
-    }
-
-    void setEndpointMetric(EndpointMetric endpointMetric) {
-        this.endpointMetric = endpointMetric;
-    }
-
-    public void serializeTo(Element element) throws DocumentSerializationException {
-        for (Object outboundMetric1 : outboundMetrics) {
-            OutboundMetric outboundMetric = (OutboundMetric) outboundMetric1;
-
-            DocumentSerializableUtilities.addDocumentSerializable(element, "outboundMetric", outboundMetric);
-        }
-        for (Object inboundMetric1 : inboundMetrics) {
-            InboundMetric inboundMetric = (InboundMetric) inboundMetric1;
-
-            DocumentSerializableUtilities.addDocumentSerializable(element, "inboundMetric", inboundMetric);
-        }
-        for (Object propagationMetric1 : propagationMetrics) {
-            PropagationMetric propagationMetric = (PropagationMetric) propagationMetric1;
-
-            DocumentSerializableUtilities.addDocumentSerializable(element, "propagationMetric", propagationMetric);
-        }
-        if (endpointMetric != null) {
-            DocumentSerializableUtilities.addDocumentSerializable(element, "endpointMetric", endpointMetric);
-        }
-
-        if (moduleClassID != null) {
-            DocumentSerializableUtilities.addString(element, "moduleClassID", moduleClassID.toString());
-        }
-    }
-
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element childElement = (TextElement) e.nextElement();
-            String tagName = (String) childElement.getKey();
-
-            if (tagName.equals("inboundMetric")) {
-                InboundMetric inboundMetric = (InboundMetric) DocumentSerializableUtilities.getDocumentSerializable(childElement
-                        ,
-                        InboundMetric.class);
-
-                inboundMetrics.add(inboundMetric);
-            }
-            if (tagName.equals("outboundMetric")) {
-                OutboundMetric outboundMetric = (OutboundMetric) DocumentSerializableUtilities.getDocumentSerializable(
-                        childElement, OutboundMetric.class);
-
-                outboundMetrics.add(outboundMetric);
-            }
-            if (tagName.equals("propagationMetric")) {
-                PropagationMetric propagationMetric = (PropagationMetric) DocumentSerializableUtilities.getDocumentSerializable(
-                        childElement, PropagationMetric.class);
-
-                propagationMetrics.add(propagationMetric);
-            }
-            if (tagName.equals("endpointMetric")) {
-                endpointMetric = (EndpointMetric) DocumentSerializableUtilities.getDocumentSerializable(childElement
-                        ,
-                        EndpointMetric.class);
-            }
-            try {
-                if (tagName.equals("moduleClassID")) {
-                    moduleClassID = (ModuleClassID) IDFactory.fromURI(
-                            new URI(DocumentSerializableUtilities.getString(childElement)));
-                }
-            } catch (URISyntaxException jex) {
-                throw new DocumentSerializationException("Can't decipher ModuleClassID", jex);
-            }
-        }
-    }
-
-    public void mergeMetrics(ServiceMetric otherOne) {
-        mergeMetrics(otherOne, true, true, true, true);
-    }
-
-    /**
-     * Make a deep copy of this metric only including the portions designated in the Filter
-     * The resulting metric is Safe to modify without danger to the underlying Monitor Metrics
-     *
-     * @param endpointServiceMonitorFilter Filter designates constituant parts to be included
-     * @return a copy of this metric with references to the designated parts
-     */
-    public EndpointServiceMetric deepCopy(EndpointServiceMonitorFilter endpointServiceMonitorFilter) {
-        EndpointServiceMetric serviceMetric = new EndpointServiceMetric();
-
-        serviceMetric.moduleClassID = moduleClassID;
-
-        serviceMetric.mergeMetrics(this, true, endpointServiceMonitorFilter.isIncludeInboundMetrics()
-                ,
-                endpointServiceMonitorFilter.isIncludeOutboundMetrics(), endpointServiceMonitorFilter.isIncludePropagateMetrics());
-        return serviceMetric;
-    }
-
-    public void mergeMetrics(ServiceMetric otherOne, boolean includeEndpointMetrics, boolean includeInboundMetrics, boolean includeOutboundEndpointMetrics, boolean includePropagationMetrics) {
-        EndpointServiceMetric otherEndpointServiceMetric = (EndpointServiceMetric) otherOne;
-
-        if (includeEndpointMetrics) {
-            EndpointMetric otherEndpointMetric = otherEndpointServiceMetric.getEndpointMetric();
-
-            if ((endpointMetric == null) && (otherEndpointMetric != null)) {
-                endpointMetric = new EndpointMetric(otherEndpointMetric);
-            }
-
-            if (otherEndpointMetric != null) {
-                endpointMetric.mergeMetrics(otherEndpointMetric);
-            }
-        }
-
-        if (includeInboundMetrics) {
-            for (Iterator<InboundMetric> i = otherEndpointServiceMetric.getInboundMetrics(); i.hasNext();) {
-                InboundMetric otherInboundMetric = i.next();
-                InboundMetric inboundMetric = getInboundMetric(otherInboundMetric.getServiceName()
-                        ,
-                        otherInboundMetric.getServiceParameter());
-
-                if (inboundMetric == null) {
-                    inboundMetric = new InboundMetric(otherInboundMetric);
-                    addInboundMetric(inboundMetric);
-                }
-
-                inboundMetric.mergeMetrics(otherInboundMetric);
-            }
-        }
-
-        if (includeOutboundEndpointMetrics) {
-            for (Iterator<OutboundMetric> i = otherEndpointServiceMetric.getOutboundMetrics(); i.hasNext();) {
-                OutboundMetric otherOutboundMetric = i.next();
-                OutboundMetric outboundMetric = getOutboundMetric(otherOutboundMetric.getEndpointAddress());
-
-                if (outboundMetric == null) {
-                    outboundMetric = new OutboundMetric(otherOutboundMetric);
-                    addOutboundMetric(outboundMetric);
-                }
-
-                outboundMetric.mergeMetrics(otherOutboundMetric);
-            }
-        }
-
-        if (includeOutboundEndpointMetrics) {
-            for (Iterator<PropagationMetric> i = otherEndpointServiceMetric.getPropagationMetrics(); i.hasNext();) {
-                PropagationMetric otherPropagationMetric = i.next();
-                PropagationMetric propagationMetric = getPropagationMetric(otherPropagationMetric.getServiceName()
-                        ,
-                        otherPropagationMetric.getServiceParameter());
-
-                if (propagationMetric == null) {
-                    propagationMetric = new PropagationMetric(otherPropagationMetric);
-                    addPropagationMetric(propagationMetric);
-                }
-
-                propagationMetric.mergeMetrics(otherPropagationMetric);
-            }
-        }
-    }
-
-    /**
-     * Make a shallow copy of this metric only including the portions designated in the Filter
-     * <P> Note: since this is a shallow copy it is dangerous to modify the submetrics
-     *
-     * @param endpointServiceMonitorFilter Filter designates constituant parts to be included
-     * @return a copy of this metric with references to the designated parts
-     */
-    public EndpointServiceMetric shallowCopy(EndpointServiceMonitorFilter endpointServiceMonitorFilter) {
-        EndpointServiceMetric endpointServiceMetric = new EndpointServiceMetric(moduleClassID);
-
-        endpointServiceMetric.endpointMetric = endpointMetric;
-
-        if (endpointServiceMonitorFilter.isIncludeInboundMetrics()) {
-            for (Iterator<InboundMetric> i = getInboundMetrics(); i.hasNext();) {
-                InboundMetric inboundMetric = i.next();
-
-                endpointServiceMetric.addInboundMetric(inboundMetric);
-            }
-        }
-
-        if (endpointServiceMonitorFilter.isIncludeOutboundMetrics()) {
-            for (Iterator<OutboundMetric> i = getOutboundMetrics(); i.hasNext();) {
-                OutboundMetric outboundMetric = i.next();
-
-                endpointServiceMetric.addOutboundMetric(outboundMetric);
-            }
-        }
-
-        if (endpointServiceMonitorFilter.isIncludePropagateMetrics()) {
-            for (Iterator<PropagationMetric> i = getPropagationMetrics(); i.hasNext();) {
-                PropagationMetric propagationMetric = i.next();
-
-                endpointServiceMetric.addPropagationMetric(propagationMetric);
-            }
-        }
-
-        return endpointServiceMetric;
-    }
-
-    public void diffMetrics(ServiceMetric otherOne) {
-        throw new RuntimeException("Not Supported");
-    }
-
-    @Override
-    public Object clone() throws CloneNotSupportedException {
-        return super.clone();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/EndpointServiceMonitor.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/EndpointServiceMonitor.java
deleted file mode 100644 (file)
index fac60ea..0000000
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.endpointMeter;
-
-
-import java.util.Hashtable;
-import java.util.Map;
-
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.impl.meter.GenericServiceMonitor;
-import net.jxta.meter.ServiceMetric;
-import net.jxta.meter.ServiceMonitorFilter;
-
-
-/**
- *  Standard EndpointService Monitor
- **/
-public class EndpointServiceMonitor extends GenericServiceMonitor {
-    private EndpointServiceMetric cumulativeEndpointServiceMetric;
-    private final Map<String, InboundMeter> inboundMeters = new Hashtable<String, InboundMeter>();
-    private final Map<EndpointAddress, OutboundMeter> outboundMeters = new Hashtable<EndpointAddress, OutboundMeter>();
-    private final Map<String, PropagationMeter> propagationMeters = new Hashtable<String, PropagationMeter>();
-    private final EndpointMeter endpointMeter = new EndpointMeter();
-
-    public EndpointServiceMonitor() {}
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    protected void init() {
-        cumulativeEndpointServiceMetric = (EndpointServiceMetric) getCumulativeServiceMetric();
-        cumulativeEndpointServiceMetric.setEndpointMetric(endpointMeter.getCumulativeMetrics());
-    }
-
-    public EndpointMeter getEndpointMeter() {
-        return endpointMeter;
-    }
-
-    public synchronized InboundMeter getInboundMeter(String serviceName, String serviceParam) {
-        String address = serviceName;
-
-        if (null != serviceParam) {
-            address += "/" + serviceParam;
-        }
-
-        InboundMeter inboundMeter = inboundMeters.get(address);
-
-        if (inboundMeter == null) {
-            inboundMeter = new InboundMeter(serviceName, serviceParam);
-            inboundMeters.put(address, inboundMeter);
-            cumulativeEndpointServiceMetric.addInboundMetric(inboundMeter.getCumulativeMetrics());
-        }
-
-        return inboundMeter;
-    }
-
-    public synchronized PropagationMeter getPropagationMeter(String serviceName, String serviceParam) {
-        String address = serviceName;
-
-        if (null != serviceParam) {
-            address += "/" + serviceParam;
-        }
-
-        PropagationMeter propagationMeter = propagationMeters.get(address);
-
-        if (propagationMeter == null) {
-            propagationMeter = new PropagationMeter(serviceName, serviceParam);
-            propagationMeters.put(address, propagationMeter);
-            cumulativeEndpointServiceMetric.addPropagationMetric(propagationMeter.getCumulativeMetrics());
-        }
-
-        return propagationMeter;
-    }
-
-    public synchronized OutboundMeter getOutboundMeter(EndpointAddress endpointAddress) {
-        OutboundMeter outboundMeter = outboundMeters.get(endpointAddress);
-
-        if (outboundMeter == null) {
-            outboundMeter = new OutboundMeter(endpointAddress);
-            cumulativeEndpointServiceMetric.addOutboundMetric(outboundMeter.getCumulativeMetrics());
-            outboundMeters.put(endpointAddress, outboundMeter);
-        }
-
-        return outboundMeter;
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public ServiceMetric getServiceMetric(ServiceMonitorFilter serviceMonitorFilter, long fromTime, long toTime, int pulseIndex, long reportRate) {
-        int deltaReportRateIndex = monitorManager.getReportRateIndex(reportRate);
-        EndpointServiceMetric origEndpointServiceMetric = (EndpointServiceMetric) deltaServiceMetrics[deltaReportRateIndex];
-
-        if (origEndpointServiceMetric == null) {
-            return null;
-        }
-
-        EndpointServiceMonitorFilter endpointServiceMonitorFilter = (EndpointServiceMonitorFilter) serviceMonitorFilter;
-
-        return origEndpointServiceMetric.shallowCopy(endpointServiceMonitorFilter);
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public ServiceMetric getCumulativeServiceMetric(ServiceMonitorFilter serviceMonitorFilter, long fromTime, long toTime) {
-        EndpointServiceMetric origEndpointServiceMetric = (EndpointServiceMetric) cumulativeServiceMetric;
-        EndpointServiceMonitorFilter endpointServiceMonitorFilter = (EndpointServiceMonitorFilter) serviceMonitorFilter;
-
-        return origEndpointServiceMetric.deepCopy(endpointServiceMonitorFilter);
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    protected ServiceMetric collectServiceMetrics() {
-        EndpointServiceMetric endpointServiceMetric = (EndpointServiceMetric) createServiceMetric();
-
-        boolean anyData = false;
-
-        for (InboundMeter inboundMeter : inboundMeters.values()) {
-            InboundMetric inboundMetric = inboundMeter.collectMetrics(); // clears delta from meter
-
-            if (inboundMetric != null) {
-                endpointServiceMetric.addInboundMetric(inboundMetric);
-                anyData = true;
-            }
-        }
-
-        for (OutboundMeter outboundMeter : outboundMeters.values()) {
-            OutboundMetric outboundMetric = outboundMeter.collectMetrics(); // clears delta from meter
-
-            if (outboundMetric != null) {
-                endpointServiceMetric.addOutboundMetric(outboundMetric);
-                anyData = true;
-            }
-        }
-
-        for (PropagationMeter propagationMeter : propagationMeters.values()) {
-            PropagationMetric propagationMetric = propagationMeter.collectMetrics(); // clears delta from meter
-
-            if (propagationMetric != null) {
-                endpointServiceMetric.addPropagationMetric(propagationMetric);
-                anyData = true;
-            }
-        }
-
-        EndpointMetric endpointMetric = endpointMeter.collectMetrics();
-
-        if (endpointMetric != null) {
-            endpointServiceMetric.setEndpointMetric(endpointMetric);
-            anyData = true;
-        }
-
-        if (anyData) {
-            return endpointServiceMetric;
-        } else {
-            return null;
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/EndpointServiceMonitorFilter.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/EndpointServiceMonitorFilter.java
deleted file mode 100644 (file)
index 109dbca..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-
-
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.endpointMeter;
-
-
-import java.net.*;
-import java.util.*;
-
-import net.jxta.meter.*;
-import net.jxta.platform.*;
-import net.jxta.document.*;
-import net.jxta.id.*;
-import net.jxta.util.documentSerializable.*;
-import net.jxta.platform.*;
-import net.jxta.util.*;
-
-
-public class EndpointServiceMonitorFilter implements ServiceMonitorFilter {
-    // private boolean reportAllEndpoints = true;
-    private ModuleClassID moduleClassID = MonitorResources.endpointServiceMonitorClassID;
-
-    private boolean includeOutboundMetrics = true;
-    private boolean includeInboundMetrics = true;
-    private boolean includePropagateMetrics = true;
-
-    public EndpointServiceMonitorFilter() {}
-       
-    public EndpointServiceMonitorFilter(boolean includeInboundMetrics, boolean includeOutboundMetrics, boolean includePropagateMetrics) {
-        this.includeInboundMetrics = includeInboundMetrics;
-        this.includeOutboundMetrics = includeOutboundMetrics;
-        this.includePropagateMetrics = includePropagateMetrics;
-    }
-       
-    public void init(ModuleClassID moduleClassID) {
-        this.moduleClassID = moduleClassID;
-    }
-
-    public void setIncludeInboundMetrics(boolean metrics) {
-        includeInboundMetrics = metrics;
-    }
-
-    public void setIncludeOutboundMetrics(boolean metrics) {
-        includeOutboundMetrics = metrics;
-    }
-
-    public void setIncludePropagateMetrics(boolean metrics) {
-        includePropagateMetrics = metrics;
-    }
-
-    public boolean isIncludeOutboundMetrics() {
-        return includeOutboundMetrics;
-    }
-
-    public boolean isIncludeInboundMetrics() {
-        return includeInboundMetrics;
-    }
-
-    public boolean isIncludePropagateMetrics() {
-        return includePropagateMetrics;
-    }
-       
-    public ModuleClassID getModuleClassID() {
-        return moduleClassID;
-    }
-
-    public void serializeTo(Element element) throws DocumentSerializationException {
-        DocumentSerializableUtilities.addBoolean(element, "includeOutboundMetrics", includeOutboundMetrics);
-        DocumentSerializableUtilities.addBoolean(element, "includeInboundMetrics", includeInboundMetrics);
-        DocumentSerializableUtilities.addBoolean(element, "includePropagateMetrics", includePropagateMetrics);         
-        if (moduleClassID != null) {
-            DocumentSerializableUtilities.addString(element, "moduleClassID", moduleClassID.toString());               
-        }
-    }
-
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element childElement = (TextElement) e.nextElement();
-            String tagName = (String) childElement.getKey();
-                       
-            if (tagName.equals("includeOutboundMetrics")) { 
-                includeOutboundMetrics = DocumentSerializableUtilities.getBoolean(childElement);
-            }
-            if (tagName.equals("includeInboundMetrics")) { 
-                includeInboundMetrics = DocumentSerializableUtilities.getBoolean(childElement);
-            }
-            if (tagName.equals("includePropagateMetrics")) { 
-                includePropagateMetrics = DocumentSerializableUtilities.getBoolean(childElement);
-            }
-               
-            if (tagName.equals("moduleClassID")) {
-                try {
-                    moduleClassID = (ModuleClassID) IDFactory.fromURI(
-                            new URI(DocumentSerializableUtilities.getString(childElement)));
-                } catch (URISyntaxException jex) {
-                    throw new DocumentSerializationException("Couldn't uderstand ModuleClassID", jex);
-                }
-            }
-        }
-    }
-       
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/InboundMeter.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/InboundMeter.java
deleted file mode 100644 (file)
index 48dffd2..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.endpointMeter;
-
-
-import net.jxta.endpoint.Message;
-
-
-/**
- *    Meter corresponding to a registered EndpointListener
- **/
-public class InboundMeter {
-    private String serviceName;
-    private String serviceParameter;
-       
-    private InboundMetric totals;
-    private InboundMetric delta;
-
-    public InboundMeter(String serviceName, String serviceParameter) {
-        this.serviceName = serviceName;
-        this.serviceParameter = serviceParameter;
-        this.totals = new InboundMetric(this);
-    }
-
-    private void createDeltaMetric() {
-        delta = new InboundMetric(this);
-    }  
-       
-    public void inboundMessageQueued(Message message) {
-        if (delta == null) {   
-            createDeltaMetric();
-        }
-                       
-        delta.inboundMessageQueued(message);
-        totals.inboundMessageQueued(message);
-    }
-
-    public void inboundMessageDropped(Message message, long time) {
-        if (delta == null) {   
-            createDeltaMetric();
-        }
-                       
-        delta.inboundMessageDropped(message, time);
-        totals.inboundMessageDropped(message, time);
-    }
-
-    public void inboundMessageDeQueued(Message message, long time) {
-        if (delta == null) {   
-            createDeltaMetric();
-        }
-                       
-        delta.inboundMessageDeQueued(message, time);
-        totals.inboundMessageDeQueued(message, time);
-    }
-
-    public void inboundMessageProcessed(Message message, long time) {
-        if (delta == null) {   
-            createDeltaMetric();
-        }
-                       
-        delta.inboundMessageProcessed(message, time);
-        totals.inboundMessageProcessed(message, time);
-    }
-
-    String getServiceName() {
-        return serviceName;
-    }
-
-    String getServiceParameter() {
-        return serviceParameter;
-    }
-
-    @Override
-    public String toString() {
-        return "InboundMeter(" + serviceName + "//" + serviceParameter + ")";
-    }
-       
-    public InboundMetric getCumulativeMetrics() {
-        return totals;
-    }
-
-    public synchronized InboundMetric collectMetrics() {
-        InboundMetric prevDelta = delta;
-
-        delta = null;
-        return prevDelta;
-    }
-       
-    /* Fix-Me: delete after next build.. unused
-     public synchronized InboundMetric addDeltaToTotals(long reportingDelta) {         // returns delta
-     if (delta != null) {
-     totals.mergeMetrics(delta);
-     InboundMetric oldDelta = delta;
-     delta = null;
-     return oldDelta;
-     } else
-     return null;
-     }
-     */
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/InboundMetric.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/InboundMetric.java
deleted file mode 100644 (file)
index 754a0ce..0000000
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.endpointMeter;
-
-
-import net.jxta.endpoint.*;
-import net.jxta.impl.endpoint.*;
-import net.jxta.util.documentSerializable.*;
-import net.jxta.document.*;
-
-import java.util.*;
-
-
-/**
- *    Meter corresponding to inbound queue for registered EndpointListeners ServiceName/ServiceParam pair
- **/
-public class InboundMetric implements DocumentSerializable {
-    private String serviceName;
-    private String serviceParameter;
-
-    private String serviceIdString; // internally used to speed up Hashing
-
-    private int numInboundQueued;
-    private int numInboundDropped;
-    private long timeToDropInbound;
-    private int numInboundDeQueued;
-    private long timeInInboundQueue;
-    private int numInboundProcessed;
-    private long timeToProcessInbound;
-
-    public InboundMetric(InboundMeter inboundMeter) {
-        this.serviceName = inboundMeter.getServiceName();
-        this.serviceParameter = inboundMeter.getServiceParameter();
-
-        serviceIdString = serviceName + serviceParameter;              
-    }
-
-    public InboundMetric(InboundMetric prototype) {
-        this.serviceName = prototype.getServiceName();
-        this.serviceParameter = prototype.getServiceParameter();
-
-        serviceIdString = serviceName + serviceParameter;              
-    }
-
-    public InboundMetric() {} 
-
-    /** The Service Name for this Metric **/
-    public String getServiceName() {
-        return serviceName;
-    }
-
-    /** The Service Parameter for this Metric **/
-    public String getServiceParameter() {
-        return serviceParameter;
-    }
-       
-    /** The Number of Inbound Messages Queued **/
-    public int getNumInboundQueued() {
-        return numInboundQueued;
-    }
-
-    /** The Number of Inbound Messages Dropped **/
-    public int getNumInboundDropped() {
-        return numInboundDropped;
-    }
-
-    /** The Sum of time for all dropped messages from queue **/
-    public long getTimeToDropInbound() {
-        return timeToDropInbound;
-    }
-
-    /** The Number of Inbound Messages Dequeued **/
-    public int getNumInboundDeQueued() {
-        return numInboundDeQueued;
-    }
-
-    /** The Sum of time in queue for messages in queue **/
-    public long getTimeInInboundQueue() {
-        return timeInInboundQueue;
-    }
-
-    public int getNumInboundProcessed() {
-        return numInboundProcessed;
-    }
-
-    /** The Sum of time for local listeners to process messages **/
-    public long getTimeToProcessInbound() {
-        return timeToProcessInbound;
-    }
-       
-    /** The Average of time in queue for messages **/
-    public long getAverageTimeInInboundQueue() {
-        return  (numInboundDeQueued == 0) ? 0 : (timeInInboundQueue / numInboundDeQueued);
-    }
-
-    /** The Average of time in queue for dropped messages **/
-    public long getAverageInboundDropTime() {
-        return   (numInboundDropped == 0) ? 0 : (timeToDropInbound / numInboundDropped);
-    }
-
-    /** The Average clock time for local listeners to process messages **/
-    public long getAverageInboundProcessTime() {
-        return  (numInboundProcessed == 0) ? 0 : (timeToProcessInbound / numInboundProcessed);
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-               
-        if (obj instanceof InboundMetric) {
-            InboundMetric other = (InboundMetric) obj;
-                       
-            return serviceIdString.equals(other.serviceIdString);
-        } else {
-            return false;
-        }
-    }
-
-    public boolean matches(String serviceName, String serviceParam) {
-        if (serviceName.equals(getServiceName())) {
-            if (serviceParam == null && getServiceParameter() == null) {
-                return true;
-            } else if (serviceParam != null && getServiceParameter() != null) {
-                return serviceParam.equals(getServiceParameter());
-            }
-        }
-        return false;
-    }
-
-    @Override
-    public int hashCode() {
-        return serviceIdString.hashCode();
-    }
-       
-    void inboundMessageQueued(Message message) {
-        numInboundQueued++;
-    }
-
-    void inboundMessageDropped(Message message, long time) {
-        numInboundDropped++;
-        timeToDropInbound += time;
-    }
-
-    void inboundMessageDeQueued(Message message, long time) {
-        numInboundDeQueued++;
-        timeInInboundQueue += time;
-    }
-
-    void inboundMessageProcessed(Message message, long time) {
-        numInboundProcessed++;
-        timeToProcessInbound += time;
-    }
-       
-    public void mergeMetrics(InboundMetric other) {
-        numInboundQueued += other.numInboundQueued;
-        numInboundDropped += other.numInboundDropped;
-        timeToDropInbound += other.timeToDropInbound;
-        numInboundDeQueued += other.numInboundDeQueued;
-        timeInInboundQueue += other.timeInInboundQueue;
-        numInboundProcessed += other.numInboundProcessed;
-        timeToProcessInbound += other.timeToProcessInbound;
-    }  
-
-    public void serializeTo(Element element) throws DocumentSerializationException {
-
-        DocumentSerializableUtilities.addString(element, "serviceName", serviceName);
-        DocumentSerializableUtilities.addString(element, "serviceParam", serviceParameter);
-
-        if (numInboundQueued != 0) {
-            DocumentSerializableUtilities.addInt(element, "numInboundQueued", numInboundQueued);
-        }
-               
-        if (numInboundDropped != 0) {
-            DocumentSerializableUtilities.addInt(element, "numInboundDropped", numInboundDropped);
-        }
-               
-        if (timeToDropInbound != 0) {
-            DocumentSerializableUtilities.addLong(element, "timeToDropInbound", timeToDropInbound);
-        }
-               
-        if (numInboundDeQueued != 0) {
-            DocumentSerializableUtilities.addInt(element, "numInboundDeQueued", numInboundDeQueued);
-        }
-               
-        if (timeInInboundQueue != 0) {
-            DocumentSerializableUtilities.addLong(element, "timeInInboundQueue", timeInInboundQueue);
-        }
-               
-        if (numInboundProcessed != 0) {
-            DocumentSerializableUtilities.addInt(element, "numInboundProcessed", numInboundProcessed);
-        }
-               
-        if (timeToProcessInbound != 0) {
-            DocumentSerializableUtilities.addLong(element, "timeToProcessInbound", timeToProcessInbound);
-        }
-    }
-
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element childElement = (TextElement) e.nextElement();
-            String tagName = (String) childElement.getKey();
-                       
-            if (tagName.equals("serviceName")) { 
-                serviceName = DocumentSerializableUtilities.getString(childElement);
-            } else if (tagName.equals("serviceParam")) { 
-                serviceParameter = DocumentSerializableUtilities.getString(childElement);
-            } else if (tagName.equals("numInboundQueued")) {
-                numInboundQueued = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numInboundDropped")) {
-                numInboundDropped = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("timeToDropInbound")) {
-                timeToDropInbound = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("numInboundDeQueued")) {
-                numInboundDeQueued = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("timeInInboundQueue")) {
-                timeInInboundQueue = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("numInboundProcessed")) {
-                numInboundProcessed = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("timeToProcessInbound")) {
-                timeToProcessInbound = DocumentSerializableUtilities.getLong(childElement);
-            }
-        }
-
-        serviceIdString = serviceName + serviceParameter;              
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/IncomingMessageListenerMeter.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/IncomingMessageListenerMeter.java
deleted file mode 100644 (file)
index 4c08d22..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.endpointMeter;
-
-
-import net.jxta.endpoint.Message;
-
-
-public interface IncomingMessageListenerMeter {
-    public void inboundMessageQueued(Message message);
-    public void inboundMessageDropped(Message message, long time);
-    public void inboundMessageDeQueued(Message message, long time);
-    public void inboundMessageProcessed(Message message, long time);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/MessengerMeter.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/MessengerMeter.java
deleted file mode 100644 (file)
index 28dccf3..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.endpointMeter;
-
-
-import net.jxta.endpoint.*;
-
-
-public interface MessengerMeter {
-    public void outboundMessageQueued(Message message);
-    public void outboundMessageDropped(Message message, long time);
-    public void outboundMessageFailed(Message message, long time);
-    public void outboundMessageDeQueued(Message message, long time);
-    public void outboundMessageProcessed(Message message, long time);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/OutboundMeter.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/OutboundMeter.java
deleted file mode 100644 (file)
index 6ee9e4e..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.endpointMeter;
-
-
-import net.jxta.endpoint.*;
-
-
-/**
- *    Meter corresponding to a messages demuxed to registered listeners
- **/
-public class OutboundMeter {
-    private EndpointAddress endpointAddress;
-       
-    private OutboundMetric totals;
-    private OutboundMetric delta;
-
-    public OutboundMeter(EndpointAddress endpointAddress) {
-        this.endpointAddress = endpointAddress;
-        totals = new OutboundMetric(this);
-    }
-
-    private void createDeltaMetric() {
-        delta = new OutboundMetric(this);
-    }  
-       
-    public void outboundMessageQueued(Message message) {
-        if (delta == null) {   
-            createDeltaMetric();
-        }
-                       
-        delta.outboundMessageQueued(message);
-        totals.outboundMessageQueued(message);
-    }
-
-    public void outboundMessageDropped(Message message, long time) {
-        if (delta == null) {   
-            createDeltaMetric();
-        }
-                       
-        delta.outboundMessageDropped(message, time);
-        totals.outboundMessageDropped(message, time);
-    }
-
-    public void outboundMessageFailed(Message message, long time) {
-        if (delta == null) {   
-            createDeltaMetric();
-        }
-                       
-        delta.outboundMessageFailed(message, time);
-        totals.outboundMessageFailed(message, time);
-    }
-
-    public void outboundMessageDeQueued(Message message, long time) {
-        if (delta == null) {   
-            createDeltaMetric();
-        }
-                       
-        delta.outboundMessageDeQueued(message, time);
-        totals.outboundMessageDeQueued(message, time);
-    }
-
-    public void outboundMessageProcessed(Message message, long time) { 
-        if (delta == null) {   
-            createDeltaMetric();
-        }
-                       
-        delta.outboundMessageProcessed(message, time);
-        totals.outboundMessageProcessed(message, time);
-    }
-
-    EndpointAddress getEndpointAddress() {
-        return endpointAddress;
-    }
-
-    @Override
-    public String toString() {
-        return "OutboundMeter(" + endpointAddress + ")";
-    }
-       
-    public OutboundMetric getCumulativeMetrics() {
-        return totals;
-    }
-
-    public synchronized OutboundMetric collectMetrics() {
-        OutboundMetric prevDelta = delta;
-
-        delta = null;
-        return prevDelta;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/OutboundMetric.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/OutboundMetric.java
deleted file mode 100644 (file)
index 250398a..0000000
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.endpointMeter;
-
-
-import net.jxta.endpoint.*;
-import net.jxta.impl.endpoint.*;
-import net.jxta.util.documentSerializable.*;
-import net.jxta.document.*;
-
-import java.util.*;
-
-
-/**
- *    Metric corresponding to a message queue to for outbound messengers based upon an endpoint address
- **/
-public class OutboundMetric implements DocumentSerializable {
-    private EndpointAddress endpointAddress;
-
-    private int numOutboundQueued;
-    private int numOutboundDropped;
-    private long timeToDropOutbound;
-    private int numOutboundDeQueued;
-    private long timeInOutboundQueue;
-    private int numOutboundProcessed;
-    private long timeToProcessOutbound;
-    private int numOutboundFailed;
-    private long timeOutboundToFail;
-
-    public OutboundMetric(OutboundMeter outboundMeter) {
-        this.endpointAddress = outboundMeter.getEndpointAddress();
-    }
-
-    public OutboundMetric(OutboundMetric prototype) {
-        this.endpointAddress = prototype.getEndpointAddress(); 
-    }
-
-    public OutboundMetric() {} 
-
-    /** The Endpoint address for this outbound message queue **/
-    public EndpointAddress getEndpointAddress() {
-        return endpointAddress;
-    }
-       
-    /** The Number of Outbound Messages Queued **/
-    public int getNumOutboundQueued() {
-        return numOutboundQueued;
-    }
-
-    /** The Number of Outbound Messages Dropped from Queue **/
-    public int getNumOutboundDropped() {
-        return numOutboundDropped;
-    }
-
-    /** The Sum of the times in queue for all dropped messages  **/
-    public long getTimeToDropOutbound() {
-        return timeToDropOutbound;
-    }
-
-    /** The Number of Outbound Messages DeQueued **/
-    public int getNumOutboundDeQueued() {
-        return numOutboundDeQueued;
-    }
-
-    /** The Sum of the times in queue for all messages  **/
-    public long getTimeInOutboundQueue() {
-        return timeInOutboundQueue;
-    }
-
-    /** The Number of Outbound Messages Processed Successfully **/
-    public int getNumOutboundProcessed() {
-        return numOutboundProcessed;
-    }
-
-    /** The Sum of the times from sending to handling by messenger **/
-    public long getTimeToProcessOutbound() {
-        return timeToProcessOutbound;
-    }
-
-    /** The Number of Outbound Messages Failed in sending **/
-    public int getNumOutboundFailed() {
-        return numOutboundFailed;
-    }
-
-    /** The Sum of the times in queue for all failed messages  **/
-    public long getTimeOutboundToFail() {
-        return timeOutboundToFail;
-    }
-
-    /** The Average of the times in queue for all messages  **/
-    public long getAverageTimeInOutboundQueue() {
-        return  (numOutboundDeQueued == 0) ? 0 : (timeInOutboundQueue / numOutboundDeQueued);
-    }
-
-    /** The Average of the times in queue for all dropped messages  **/
-    public long getAverageOutboundDropTime() {
-        return  (numOutboundDropped == 0) ? 0 : (timeToDropOutbound / numOutboundDropped);
-    }
-
-    /** The Average of the times from sending to handling by messenger **/
-    public long getAverageOutboundProcessTime() {
-        return  (numOutboundProcessed == 0) ? 0 : (timeToProcessOutbound / numOutboundProcessed);
-    }
-       
-    @Override
-    public boolean equals(Object obj) {
-               
-        if (obj instanceof OutboundMetric) {
-            OutboundMetric other = (OutboundMetric) obj;
-                       
-            return endpointAddress.equals(other.endpointAddress);
-        } else {
-            return false;
-        }
-    }
-
-    public boolean matches(EndpointAddress otherAddress) {
-        return getEndpointAddress().equals(otherAddress);
-    }
-
-    @Override
-    public int hashCode() {
-        return endpointAddress.hashCode();
-    }   
-
-    void outboundMessageQueued(Message message) {
-        numOutboundQueued++;
-    }
-
-    void outboundMessageDropped(Message message, long time) {
-        numOutboundDropped++;
-        timeToDropOutbound += time;
-    }
-
-    void outboundMessageFailed(Message message, long time) {
-        numOutboundFailed++;
-        timeOutboundToFail += time;
-    }
-
-    void outboundMessageDeQueued(Message message, long time) {
-        numOutboundDeQueued++;
-        timeInOutboundQueue += time;
-    }
-
-    void outboundMessageProcessed(Message message, long time) {        
-        numOutboundProcessed++;
-        timeToProcessOutbound += time;
-    }
-
-    public void mergeMetrics(OutboundMetric other) {
-       
-        numOutboundQueued += other.numOutboundQueued;
-        numOutboundDropped += other.numOutboundDropped;
-        timeToDropOutbound += other.timeToDropOutbound;
-        numOutboundDeQueued += other.numOutboundDeQueued;
-        timeInOutboundQueue += other.timeInOutboundQueue;
-        numOutboundProcessed += other.numOutboundProcessed;
-        timeToProcessOutbound += other.timeToProcessOutbound;
-        numOutboundFailed += other.numOutboundFailed;
-        timeOutboundToFail += other.timeOutboundToFail;
-    }  
-
-    public void serializeTo(Element element) throws DocumentSerializationException {
-
-        DocumentSerializableUtilities.addString(element, "endpointAddress", endpointAddress.toString());
-
-        if (numOutboundQueued != 0) {
-            DocumentSerializableUtilities.addInt(element, "numOutboundQueued", numOutboundQueued);
-        }
-                               
-        if (numOutboundDropped != 0) {
-            DocumentSerializableUtilities.addInt(element, "numOutboundDropped", numOutboundDropped);
-        }
-
-        if (timeToDropOutbound != 0) {
-            DocumentSerializableUtilities.addLong(element, "timeToDropOutbound", timeToDropOutbound);
-        }
-               
-        if (numOutboundDeQueued != 0) {
-            DocumentSerializableUtilities.addInt(element, "numOutboundDeQueued", numOutboundDeQueued);
-        }
-               
-        if (timeInOutboundQueue != 0) {
-            DocumentSerializableUtilities.addLong(element, "timeInOutboundQueue", timeInOutboundQueue);
-        }
-               
-        if (numOutboundProcessed != 0) {
-            DocumentSerializableUtilities.addInt(element, "numOutboundProcessed", numOutboundProcessed);
-        }
-                               
-        if (timeToProcessOutbound != 0) {
-            DocumentSerializableUtilities.addLong(element, "timeToProcessOutbound", timeToProcessOutbound);
-        }
-               
-        if (numOutboundFailed != 0) {
-            DocumentSerializableUtilities.addInt(element, "numOutboundFailed", numOutboundFailed);
-        }
-
-        if (timeOutboundToFail != 0) {
-            DocumentSerializableUtilities.addLong(element, "timeOutboundToFail", timeOutboundToFail);
-        }
-                               
-    }
-
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element childElement = (TextElement) e.nextElement();
-            String tagName = (String) childElement.getKey();
-                       
-            if (tagName.equals("endpointAddress")) {
-                String endpointAddressString = DocumentSerializableUtilities.getString(childElement);  
-
-                endpointAddress = new EndpointAddress(endpointAddressString);
-            } else if (tagName.equals("numOutboundQueued")) {
-                numOutboundQueued = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numOutboundDropped")) {
-                numOutboundDropped = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("timeToDropOutbound")) {
-                timeToDropOutbound = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("numOutboundDeQueued")) {
-                numOutboundDeQueued = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("timeInOutboundQueue")) {
-                timeInOutboundQueue = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("numOutboundProcessed")) {
-                numOutboundProcessed = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("timeToProcessOutbound")) {
-                timeToProcessOutbound = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("numOutboundFailed")) {
-                numOutboundFailed = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("timeOutboundToFail")) {
-                timeOutboundToFail = DocumentSerializableUtilities.getLong(childElement);
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/PropagationMeter.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/PropagationMeter.java
deleted file mode 100644 (file)
index 5a2153c..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.endpointMeter;
-
-
-/**
- *    Meter corresponding to a propagated messages 
- **/
-public class PropagationMeter {
-    private String serviceName;
-    private String serviceParameter;
-       
-    private PropagationMetric totals;
-    private PropagationMetric delta;
-
-    public PropagationMeter(String serviceName, String serviceParameter) {
-        this.serviceName = serviceName;
-        this.serviceParameter = serviceParameter;
-        this.totals = new PropagationMetric(this);
-    }
-
-    private void createDeltaMetric() {
-        delta = new PropagationMetric(this);
-    }  
-       
-    public void registerPropagateMessageStats(int numPropagatedTo, int numFilteredOut, int numErrorsPropagated, long propagationTime) {
-        if (delta == null) {   
-            createDeltaMetric();
-        }
-                       
-        delta.registerPropagateMessageStats(numPropagatedTo, numFilteredOut, numErrorsPropagated, propagationTime);
-        totals.registerPropagateMessageStats(numPropagatedTo, numFilteredOut, numErrorsPropagated, propagationTime);
-    }
-
-    String getServiceName() {
-        return serviceName;
-    }
-
-    String getServiceParameter() {
-        return serviceParameter;
-    }
-
-    @Override
-    public String toString() {
-        return "PropagationMeter(" + serviceName + "//" + serviceParameter + ")";
-    }
-       
-    public PropagationMetric getCumulativeMetrics() {
-        return totals;
-    }
-
-    public synchronized PropagationMetric collectMetrics() {
-        PropagationMetric prevDelta = delta;
-
-        delta = null;
-        return prevDelta;
-    }
-
-    /* Fix-Me: delete after next build.. unused
-     public synchronized PropagationMetric addDeltaToTotals(long reportingDelta) {             // returns delta
-     if (delta != null) {
-     totals.mergeMetrics(delta);
-     PropagationMetric oldDelta = delta;
-     delta = null;
-     return oldDelta;
-     } else
-     return null;
-     }
-     */        
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/PropagationMetric.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/endpointMeter/PropagationMetric.java
deleted file mode 100644 (file)
index 8bf71be..0000000
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.endpointMeter;
-
-
-import net.jxta.endpoint.*;
-import net.jxta.impl.endpoint.*;
-import net.jxta.util.documentSerializable.*;
-import net.jxta.document.*;
-
-import java.util.*;
-
-
-/**
- *    Metric corresponding to a propagated messages 
- *    Meter corresponding to propagated to a ServiceName/ServiceParam pair
- **/
-public class PropagationMetric implements DocumentSerializable {
-    private String serviceName;
-    private String serviceParameter;
-
-    private String serviceIdString; // for Hashing
-    int numPropagations;
-    int numPropagatedTo;
-    int numFilteredOut;
-    int numErrorsPropagated;
-    long propagationTime;
-
-    public PropagationMetric() {
-        serviceIdString = serviceName + serviceParameter;              
-    }
-
-    public PropagationMetric(PropagationMeter propagationMeter) {
-        this.serviceName = propagationMeter.getServiceName();
-        this.serviceParameter = propagationMeter.getServiceParameter();
-
-        serviceIdString = serviceName + serviceParameter;              
-    }
-
-    public PropagationMetric(PropagationMetric prototype) {
-        this.serviceName = prototype.getServiceName();
-        this.serviceParameter = prototype.getServiceParameter();
-
-        serviceIdString = serviceName + serviceParameter;              
-    }
-
-    void registerPropagateMessageStats(int numPropagatedTo, int numFilteredOut, int numErrorsPropagated, long propagationTime) {
-        this.numPropagations++;
-        this.numPropagatedTo += numPropagatedTo;
-        this.numFilteredOut += numFilteredOut;
-        this.numErrorsPropagated += numErrorsPropagated;
-        this.propagationTime += propagationTime;
-    }
-
-    /** The Endpoint address for this outbound message queue **/
-    public String getServiceName() {
-        return serviceName;
-    }
-
-    /** The Endpoint address for this outbound message queue **/
-    public String getServiceParameter() {
-        return serviceParameter;
-    }
-
-    /** The Number of Propagated Messages  **/
-    public int getNumPropagations() {
-        return numPropagations;
-    }
-
-    /** Total number of transports messagess were propagated to  **/
-    public int getNumPropagatedTo() {
-        return numPropagatedTo;
-    }
-
-    /** The Number of Filtered out  Messages  **/
-    
-    /** The Average of number of Transports propagated To from propagation to transport **/
-    public int getAverageNumTransports() {
-        return (numPropagatedTo == 0) ? 0 : (numPropagations / numPropagatedTo);
-    }
-
-    public int getNumFilteredOut() {
-        return numFilteredOut;
-    }
-
-    /** The Number of Errors propagating Messages  **/
-    public int getNumErrorsPropagated() {
-        return numErrorsPropagated;
-    }
-
-    /** The Sum of (clock) times from propagation to transport **/
-    public long getPropagationTime() {
-        return propagationTime;
-    }
-
-    /** The Average of (clock) times from propagation to transport **/
-    public long getAveragePropagationTime() {
-        return (numPropagatedTo == 0) ? 0 : (propagationTime / numPropagatedTo);
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-               
-        if (obj instanceof PropagationMetric) {
-            PropagationMetric other = (PropagationMetric) obj;
-                       
-            return serviceIdString.equals(other.serviceIdString);
-        } else {
-            return false;
-        }
-    }
-
-    public boolean matches(String serviceName, String serviceParam) {
-        if (serviceName.equals(getServiceName())) {
-            if (serviceParam == null && getServiceParameter() == null) {
-                return true;
-            } else if (serviceParam != null && getServiceParameter() != null) {
-                return serviceParam.equals(getServiceParameter());
-            }
-        }
-        return false;
-    }
-       
-    @Override
-    public int hashCode() {
-        return serviceIdString.hashCode();
-    }
-
-    String getServiceIdString() {
-        return serviceIdString;
-    }  
-
-    public void mergeMetrics(PropagationMetric other) {
-        numPropagatedTo += other.numPropagatedTo;
-        numFilteredOut += other.numFilteredOut;
-        numErrorsPropagated += other.numErrorsPropagated;
-        propagationTime += other.propagationTime;
-    }  
-
-    public void serializeTo(Element element) throws DocumentSerializationException {
-
-        DocumentSerializableUtilities.addString(element, "serviceName", serviceName);
-        DocumentSerializableUtilities.addString(element, "serviceParam", serviceParameter);
-
-        if (numPropagations != 0) {
-            DocumentSerializableUtilities.addInt(element, "numPropagations", numPropagatedTo);
-        }
-               
-        if (numPropagatedTo != 0) {
-            DocumentSerializableUtilities.addInt(element, "numPropagatedTo", numPropagatedTo);
-        }
-               
-        if (numFilteredOut != 0) {
-            DocumentSerializableUtilities.addInt(element, "numFilteredOut", numFilteredOut);
-        }
-               
-        if (numErrorsPropagated != 0) {
-            DocumentSerializableUtilities.addInt(element, "numErrorsPropagated", numErrorsPropagated);
-        }
-               
-        if (propagationTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "propagationTime", propagationTime);
-        }
-    }
-
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element childElement = (TextElement) e.nextElement();
-            String tagName = (String) childElement.getKey();
-                       
-            if (tagName.equals("serviceName")) { 
-                serviceName = DocumentSerializableUtilities.getString(childElement);
-            } else if (tagName.equals("serviceParam")) { 
-                serviceParameter = DocumentSerializableUtilities.getString(childElement);
-            } else if (tagName.equals("numPropagations")) {
-                numPropagations = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numPropagatedTo")) {
-                numPropagatedTo = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numFilteredOut")) {
-                numFilteredOut = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("propagationTime")) {
-                propagationTime = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("numErrorsPropagated")) {
-                numErrorsPropagated = DocumentSerializableUtilities.getInt(childElement);
-            }
-        }
-
-        serviceIdString = serviceName + serviceParameter;              
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/mcast/McastTransport.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/mcast/McastTransport.java
deleted file mode 100644 (file)
index 8a0dfd9..0000000
+++ /dev/null
@@ -1,887 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *
- *  The Sun Project JXTA(TM) Software License
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *
- *  3. The end-user documentation included with the redistribution, if any, must
- *     include the following acknowledgment: "This product includes software
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology."
- *     Alternately, this acknowledgment may appear in the software itself, if
- *     and wherever such third-party acknowledgments normally appear.
- *
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must
- *     not be used to endorse or promote products derived from this software
- *     without prior written permission. For written permission, please contact
- *     Project JXTA at http://www.jxta.org.
- *
- *  5. Products derived from this software may not be called "JXTA", nor may
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United
- *  States and other countries.
- *
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of
- *  the license in source files.
- *
- *  ====================================================================
- *
- *  This software consists of voluntary contributions made by many individuals
- *  on behalf of Project JXTA. For more information on Project JXTA, please see
- *  http://www.jxta.org.
- *
- *  This license is based on the BSD license adopted by the Apache Foundation.
- */
-package net.jxta.impl.endpoint.mcast;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.net.DatagramPacket;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.MulticastSocket;
-import java.net.SocketException;
-import java.net.URI;
-import java.net.UnknownHostException;
-import java.nio.ByteBuffer;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.Executor;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Attribute;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.XMLElement;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.MessagePropagater;
-import net.jxta.endpoint.MessengerEventListener;
-import net.jxta.endpoint.StringMessageElement;
-import net.jxta.endpoint.WireFormatMessage;
-import net.jxta.endpoint.WireFormatMessageFactory;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.id.ID;
-import net.jxta.logging.Logging;
-import net.jxta.meter.MonitorResources;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.platform.Module;
-import net.jxta.platform.ModuleClassID;
-import net.jxta.platform.ModuleSpecID;
-import net.jxta.protocol.ConfigParams;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.protocol.TransportAdvertisement;
-
-import net.jxta.impl.endpoint.EndpointServiceImpl;
-import net.jxta.impl.endpoint.IPUtils;
-import net.jxta.impl.endpoint.msgframing.MessagePackageHeader;
-import net.jxta.impl.endpoint.transportMeter.TransportBindingMeter;
-import net.jxta.impl.endpoint.transportMeter.TransportMeter;
-import net.jxta.impl.endpoint.transportMeter.TransportMeterBuildSettings;
-import net.jxta.impl.endpoint.transportMeter.TransportServiceMonitor;
-import net.jxta.impl.meter.MonitorManager;
-import net.jxta.impl.peergroup.StdPeerGroup;
-import net.jxta.impl.protocol.TCPAdv;
-
-/**
- * This class implements the IP Multicast Message Transport.
- * <p/>
- * <b>Important Note:</b> This implementation was formerly a portion of the TCP
- * Message Transport and currently uses the TCP Transport's configuration 
- * advertisement.
- *
- * @see net.jxta.endpoint.MessageTransport
- * @see net.jxta.endpoint.MessagePropagater
- * @see net.jxta.endpoint.EndpointService
- * @see <a href="http://spec.jxta.org/v1.0/docbook/JXTAProtocols.html#trans-tcpipt">JXTA Protocols Specification : Standard JXTA Transport Bindings</a>
- */
-public class McastTransport implements Runnable, Module, MessagePropagater {
-
-    /**
-     * Logger
-     */
-    private static final Logger LOG = Logger.getLogger(McastTransport.class.getName());
-
-    /**
-     * Well known service class identifier: mcast message transport
-     */
-    public final static ModuleClassID MCAST_TRANSPORT_CLASSID =
-            ModuleClassID.create(URI.create("urn:jxta:uuid-0C801F65D38F421C9884D706B337B81105"));
-
-    /**
-     * Well known service spec identifier: mcast message transport
-     */
-    public final static ModuleSpecID MCAST_TRANSPORT_SPECID =
-            ModuleSpecID.create(URI.create("urn:jxta:uuid-0C801F65D38F421C9884D706B337B8110106"));
-
-    /**
-     * The Protocol name we will use for our endpoint addresses.
-     */
-    private String protocolName = "mcast";
-
-    /**
-     * Our Source Addres.
-     */
-    private EndpointAddress ourSrcAddr = null;
-
-    /**
-     * The Source Address Element we attach to all of the messages we send.
-     */
-    private MessageElement msgSrcAddrElement = null;
-
-    /**
-     * The name of the  local interface that we bind to.
-     */
-    private String interfaceAddressStr;
-
-    /**
-     * The address of the local interface address that be bind to.
-     */
-    private InetAddress usingInterface;
-
-    /**
-     * If {@code true} then we are closed otherwise {@code false}
-     */
-    private boolean isClosed = false;
-
-    /**
-     * The name of multicast address we will send/receive upon.
-     */
-    private String multicastAddress = "224.0.1.85";
-
-    /**
-     * The multicast address we will send/receive upon.
-     */
-    private InetAddress multicastInetAddress;
-
-    /**
-     * The port number will send/receive upon.
-     */
-    private int multicastPort = 1234;
-
-    /**
-     * The "return address" we will advertise.
-     */
-    private EndpointAddress publicAddress = new EndpointAddress(protocolName, multicastAddress + ":" + Integer.toString(multicastPort), null, null);
-
-    /**
-     * The maximum size of multicast messages we will send and the size of the
-     * {@code DatagramPacket}s we will allocate.
-     */
-    private int multicastPacketSize = 16384;
-
-    /**
-     * The socket we use to send and receive.
-     */
-    private MulticastSocket multicastSocket = null;
-
-    /**
-     * Daemon thread which services the multicast socket and receives datagrams.
-     */
-    private Thread multicastThread = null;
-
-    /**
-     * Thread pooling/queing multicast datagram processor.
-     */
-    private DatagramProcessor multicastProcessor;
-
-    /**
-     * The peer group we are working for.
-     */
-    private PeerGroup group = null;
-
-    /**
-     * The Module Class ID we were assigned in init().
-     */
-    private ID assignedID = null;
-
-    /**
-     * The impl advertisement we were provided in init().
-     */
-    private ModuleImplAdvertisement implAdvertisement = null;
-
-    /**
-     * The endpoint service we are working for.
-     */
-    private EndpointService endpoint = null;
-
-    private TransportMeter multicastTransportMeter;
-    private TransportBindingMeter multicastTransportBindingMeter;
-    private transient boolean disabled = false;
-
-    /**
-     * Construct a new McastTransport instance
-     */
-    public McastTransport() {
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        }
-
-        if (target instanceof McastTransport) {
-            McastTransport likeMe = (McastTransport) target;
-            return getProtocolName().equals(likeMe.getProtocolName()) && getPublicAddress().equals(likeMe.getPublicAddress());
-        }
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public int hashCode() {
-        return getPublicAddress().hashCode();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void init(PeerGroup group, ID assignedID, Advertisement impl) throws PeerGroupException {
-        this.group = group;
-        this.assignedID = assignedID;
-        this.implAdvertisement = (ModuleImplAdvertisement) impl;
-
-        ConfigParams configAdv = group.getConfigAdvertisement();
-
-        // Get out invariable parameters from the implAdv
-        XMLElement param = (XMLElement) implAdvertisement.getParam();
-
-        if (param != null) {
-            Enumeration<XMLElement> list = param.getChildren("Proto");
-            if (list.hasMoreElements()) {
-                XMLElement pname = list.nextElement();
-                protocolName = pname.getTextValue();
-            }
-        }
-
-        // Get our peer-defined parameters in the configAdv
-        param = (XMLElement) configAdv.getServiceParam(PeerGroup.tcpProtoClassID);
-        if (null == param) {
-            throw new IllegalArgumentException(TransportAdvertisement.getAdvertisementType() + " could not be located.");
-        }
-
-        Enumeration<XMLElement> tcpChilds = param.getChildren(TransportAdvertisement.getAdvertisementType());
-
-        // get the TransportAdv
-        if (tcpChilds.hasMoreElements()) {
-            param = tcpChilds.nextElement();
-            Attribute typeAttr = param.getAttribute("type");
-
-            if (!TCPAdv.getAdvertisementType().equals(typeAttr.getValue())) {
-                throw new IllegalArgumentException("transport adv is not a " + TCPAdv.getAdvertisementType());
-            }
-
-            if (tcpChilds.hasMoreElements()) {
-                throw new IllegalArgumentException("Multiple transport advs detected for " + assignedID);
-            }
-        } else {
-            throw new IllegalArgumentException(TransportAdvertisement.getAdvertisementType() + " could not be located.");
-        }
-
-        Advertisement paramsAdv = null;
-        try {
-            paramsAdv = AdvertisementFactory.newAdvertisement(param);
-        } catch (NoSuchElementException notThere) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Could not find parameter document", notThere);
-            }
-        }
-
-        if (!(paramsAdv instanceof TCPAdv)) {
-            throw new IllegalArgumentException("Provided Advertisement was not a " + TCPAdv.getAdvertisementType());
-        }
-
-        TCPAdv adv = (TCPAdv) paramsAdv;
-        
-        // Check if we are disabled. If so, don't bother with the rest of config.
-        if (!adv.getMulticastState()) {
-            disabled = true;
-            return;
-        }
-
-        // Determine the local interface to use. If the user specifies one, use
-        // that. Otherwise, use the all the available interfaces.
-        interfaceAddressStr = adv.getInterfaceAddress();
-        if (interfaceAddressStr != null) {
-            try {
-                usingInterface = InetAddress.getByName(interfaceAddressStr);
-            } catch (UnknownHostException failed) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Invalid address for local interface address, using default");
-                }
-                usingInterface = IPUtils.ANYADDRESS;
-            }
-        } else {
-            usingInterface = IPUtils.ANYADDRESS;
-        }
-
-        // Start the servers
-
-        // Only the outgoing interface matters.
-        // Verify that ANY interface does not in fact mean LOOPBACK only.
-        // If that's the case, we want to make that explicit, so that
-        // consistency checks regarding the allowed use of that interface work
-        // properly.
-        if (usingInterface.equals(IPUtils.ANYADDRESS)) {
-            boolean localOnly = true;
-            Iterator<InetAddress> eachLocal = IPUtils.getAllLocalAddresses();
-            while (eachLocal.hasNext()) {
-                InetAddress anAddress = eachLocal.next();
-                if (!anAddress.isLoopbackAddress()) {
-                    localOnly = false;
-                    break;
-                }
-            }
-
-            if (localOnly) {
-                usingInterface = IPUtils.LOOPBACK;
-            }
-        }
-
-        ourSrcAddr = new EndpointAddress(group.getPeerID(), null, null);
-        msgSrcAddrElement = new StringMessageElement(EndpointServiceImpl.MESSAGE_SOURCE_NAME, ourSrcAddr.toString(), null);
-
-        // Get the multicast configuration.
-        multicastAddress = adv.getMulticastAddr();
-        multicastPort = adv.getMulticastPort();
-
-        // XXX 20070711 bondolo We resolve the address only once. Perhaps we should do this dynamically?
-        try {
-            multicastInetAddress = InetAddress.getByName(multicastAddress);
-        } catch (UnknownHostException notValid) {
-            IllegalArgumentException failed = new IllegalArgumentException("Invalid or unknown host name :" + multicastAddress);
-            failed.initCause(notValid);
-            throw failed;
-        }
-
-        assert multicastInetAddress.isMulticastAddress();
-        publicAddress = new EndpointAddress(protocolName, multicastAddress + ":" + Integer.toString(multicastPort), null, null);
-        multicastPacketSize = adv.getMulticastSize();
-
-        // Create the multicast input socket
-        try {
-            multicastSocket = new MulticastSocket(new InetSocketAddress(usingInterface, multicastPort));
-        } catch (IOException failed) {
-            throw new PeerGroupException("Could not open multicast socket", failed);
-        }
-
-        try {
-            // Surprisingly, "true" means disable....
-            multicastSocket.setLoopbackMode(false);
-        } catch (SocketException ignored) {
-            // We may not be able to set loopback mode. It is inconsistent
-            // whether an error will occur if the set fails.
-        }
-
-        // Tell tell the world about our configuration.
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring IP Multicast Message Transport : " + assignedID);
-
-            if (implAdvertisement != null) {
-                configInfo.append("\n\tImplementation :");
-                configInfo.append("\n\t\tModule Spec ID: ").append(implAdvertisement.getModuleSpecID());
-                configInfo.append("\n\t\tImpl Description : ").append(implAdvertisement.getDescription());
-                configInfo.append("\n\t\tImpl URI : ").append(implAdvertisement.getUri());
-                configInfo.append("\n\t\tImpl Code : ").append(implAdvertisement.getCode());
-            }
-
-            configInfo.append("\n\tGroup Params:");
-            configInfo.append("\n\t\tGroup : ").append(group);
-            configInfo.append("\n\t\tPeer ID: ").append(group.getPeerID());
-
-            configInfo.append("\n\tConfiguration:");
-            configInfo.append("\n\t\tProtocol: ").append(protocolName);
-            configInfo.append("\n\t\tInterface address: ").append(interfaceAddressStr == null ? "(unspecified)" : interfaceAddressStr);
-            configInfo.append("\n\t\tMulticast Addr: ").append(multicastAddress);
-            configInfo.append("\n\t\tMulticast Port: ").append(multicastPort);
-            configInfo.append("\n\t\tMulticast Packet Size: ").append(multicastPacketSize);
-
-            configInfo.append("\n\tBound To :");
-            configInfo.append("\n\t\tUsing Interface: ").append(usingInterface.getHostAddress());
-
-            configInfo.append("\n\t\tMulticast Server Bind Addr: ").append(multicastSocket.getLocalSocketAddress());
-            configInfo.append("\n\t\tPublic Address: ").append(publicAddress);
-
-            LOG.config(configInfo.toString());
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized int startApp(String[] arg) {
-        if (disabled) {
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("IP Multicast Message Transport disabled.");
-            }
-            return Module.START_DISABLED;
-        }
-
-        endpoint = group.getEndpointService();
-        if (null == endpoint) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is an endpoint service");
-            }
-            return Module.START_AGAIN_STALLED;
-        }
-
-        isClosed = false;
-
-        if (TransportMeterBuildSettings.TRANSPORT_METERING) {
-            TransportServiceMonitor transportServiceMonitor = (TransportServiceMonitor) MonitorManager.getServiceMonitor(group,
-                    MonitorResources.transportServiceMonitorClassID);
-
-            if (transportServiceMonitor != null) {
-                multicastTransportMeter = transportServiceMonitor.createTransportMeter("Multicast", publicAddress);
-                multicastTransportBindingMeter = getMulticastTransportBindingMeter(publicAddress);
-                // Since multicast is connectionless, force it to appear outbound connected
-                multicastTransportBindingMeter.connectionEstablished(true, 0);
-                // Since multicast is connectionless, force it to appear inbound connected
-                multicastTransportBindingMeter.connectionEstablished(false, 0);
-            }
-        }
-
-        // We're fully ready to function.
-        MessengerEventListener messengerEventListener = endpoint.addMessageTransport(this);
-        if (messengerEventListener == null) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("Transport registration refused");
-            }
-            return -1;
-        }
-
-        // Cannot start before registration
-        multicastProcessor = new DatagramProcessor(((StdPeerGroup) group).getExecutor());
-        multicastThread = new Thread(group.getHomeThreadGroup(), this, "IP Multicast Listener for " + publicAddress);
-        multicastThread.setDaemon(true);
-        multicastThread.start();
-
-        try {
-            multicastSocket.joinGroup(multicastInetAddress);
-        } catch (IOException soe) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("Could not join multicast group, setting Multicast off");
-            }
-            return -1;
-        }
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("IP Multicast Message Transport started.");
-        }
-
-        return Module.START_OK;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized void stopApp() {
-        if (isClosed || disabled) {
-            return;
-        }
-
-        isClosed = true;
-
-        if (multicastSocket != null) {
-            multicastSocket.close();
-            multicastSocket = null;
-        }
-
-        if (null != multicastProcessor) {
-            multicastProcessor.stop();
-            multicastProcessor = null;
-        }
-
-        endpoint.removeMessageTransport(this);
-
-        if (TransportMeterBuildSettings.TRANSPORT_METERING && (multicastTransportBindingMeter != null)) {
-            // Since multicast is connectionless, force it to appear outbound disconnected
-            multicastTransportBindingMeter.connectionClosed(true, 0);
-            // Since multicast is connectionless, force it to appear inbound disconnected
-            multicastTransportBindingMeter.connectionClosed(false, 0);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getProtocolName() {
-        return protocolName;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public EndpointAddress getPublicAddress() {
-        return publicAddress;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public EndpointService getEndpointService() {
-        return (EndpointService) endpoint.getInterface();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Object transportControl(Object operation, Object Value) {
-        return null;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Handles incoming multicasts and enqueues them with the datagram processor.
-     */
-    public void run() {
-
-        try {
-            while (!isClosed) {
-                byte[] buffer = new byte[multicastPacketSize];
-                DatagramPacket packet = new DatagramPacket(buffer, buffer.length);
-
-                try {
-                    multicastSocket.receive(packet);
-
-                    if (isClosed) {
-                        return;
-                    }
-
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("multicast message received from :" + packet.getAddress().getHostAddress());
-                    }
-
-                    // This operation is blocking and may take a long time to
-                    // return. As a result we may lose datagram packets because
-                    // we are not calling
-                    // {@link MulticastSocket#receive(DatagramPacket)} often
-                    // enough.
-                    multicastProcessor.put(packet);
-                } catch (InterruptedException woken) {
-                    Thread.interrupted();
-                } catch (InterruptedIOException woken) {
-                    Thread.interrupted();
-                } catch (Exception e) {
-                    if (isClosed) {
-                        return;
-                    }
-                    if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE) && (!isClosed)) {
-                        LOG.log(Level.SEVERE, "failure during multicast receive", e);
-                    }
-                    break;
-                }
-            }
-        } catch (Throwable all) {
-            if (isClosed) {
-                return;
-            }
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Uncaught Throwable in thread :" + Thread.currentThread().getName(), all);
-            }
-        } finally {
-            multicastThread = null;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Synchronized to not allow concurrent IP multicast: this naturally bounds
-     * the usage of ip-multicast boolean be linear and not exponential.
-     */
-    public synchronized boolean propagate(Message message, String pName, String pParams, int initalTTL) {
-        long sendStartTime = System.currentTimeMillis();
-        int numBytesInPacket = 0;
-
-        try {
-            message.replaceMessageElement(EndpointServiceImpl.MESSAGE_SOURCE_NS, msgSrcAddrElement);
-
-            // First build the destination and source addresses
-            EndpointAddress destAddr = new EndpointAddress(publicAddress, pName, pParams);
-            MessageElement dstAddressElement = new StringMessageElement(EndpointServiceImpl.MESSAGE_DESTINATION_NAME, destAddr.toString(), null);
-
-            message.replaceMessageElement(EndpointServiceImpl.MESSAGE_DESTINATION_NS, dstAddressElement);
-
-            WireFormatMessage serialed = WireFormatMessageFactory.toWire(message, WireFormatMessageFactory.DEFAULT_WIRE_MIME, null);
-            MessagePackageHeader header = new MessagePackageHeader();
-
-            header.setContentTypeHeader(serialed.getMimeType());
-            header.setContentLengthHeader(serialed.getByteLength());
-
-            ByteArrayOutputStream buffer = new ByteArrayOutputStream(multicastPacketSize);
-
-            buffer.write('J');
-            buffer.write('X');
-            buffer.write('T');
-            buffer.write('A');
-            header.sendToStream(buffer);
-            serialed.sendToStream(buffer);
-            buffer.flush();
-            buffer.close();
-            numBytesInPacket = buffer.size();
-
-            if ((buffer.size() > multicastPacketSize) && Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Multicast datagram exceeds multicast size.");
-            }
-
-            DatagramPacket packet = new DatagramPacket(buffer.toByteArray(), numBytesInPacket, multicastInetAddress, multicastPort);
-
-            multicastSocket.send(packet);
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Sent Multicast message to :" + pName + "/" + pParams);
-            }
-
-            if (TransportMeterBuildSettings.TRANSPORT_METERING && (multicastTransportBindingMeter != null)) {
-                multicastTransportBindingMeter.messageSent(true, message, System.currentTimeMillis() - sendStartTime, numBytesInPacket);
-            }
-            return true;
-        } catch (IOException e) {
-            if (TransportMeterBuildSettings.TRANSPORT_METERING && (multicastTransportBindingMeter != null)) {
-                multicastTransportBindingMeter.sendFailure(true, message, System.currentTimeMillis() - sendStartTime, numBytesInPacket);
-            }
-
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Multicast socket send failed", e);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Handle a byte buffer from a multi-cast.
-     *
-     * @param packet the message packet.
-     */
-    void processMulticast(DatagramPacket packet) {
-        int size = packet.getLength();
-        byte[] buffer = packet.getData();
-
-        long messageReceiveBeginTime = System.currentTimeMillis();
-
-        try {
-            if (size < 4) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("damaged multicast discarded");
-                }
-                throw new IOException("damaged multicast discarded : too short");
-            }
-
-            if (('J' != buffer[0]) || ('X' != buffer[1]) || ('T' != buffer[2]) || ('A' != buffer[3])) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("damaged multicast discarded");
-                }
-                throw new IOException("damaged multicast discarded : incorrect signature");
-            }
-
-            ByteBuffer bbuffer = ByteBuffer.wrap(buffer, 4, size - 4);
-            MessagePackageHeader header = new MessagePackageHeader();
-
-            if (!header.readHeader(bbuffer)) {
-                throw new IOException("Failed to read framing header");
-            }
-
-            MimeMediaType msgMime = header.getContentTypeHeader();
-            // TODO 20020730 bondolo@jxta.org Do something with content-coding here.
-
-            // read the message!
-            Message msg = WireFormatMessageFactory.fromBuffer(bbuffer, msgMime, null);
-
-            // Extract the source and destination
-            MessageElement srcAddrElem = msg.getMessageElement(EndpointServiceImpl.MESSAGE_SOURCE_NS, EndpointServiceImpl.MESSAGE_SOURCE_NAME);
-            if (null == srcAddrElem) {
-                throw new IOException("No Source Address in " + msg);
-            }
-
-            msg.removeMessageElement(srcAddrElem);
-
-            EndpointAddress srcAddr = new EndpointAddress(srcAddrElem.toString());
-
-            if (srcAddr.equals(ourSrcAddr)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.log(Level.FINE, "Discard loopback multicast message");
-                }
-                return;
-            }
-
-            MessageElement dstAddrElem = msg.getMessageElement(EndpointServiceImpl.MESSAGE_DESTINATION_NS, EndpointServiceImpl.MESSAGE_DESTINATION_NAME);
-            if (null == dstAddrElem) {
-                throw new IOException("No Destination Address in " + msg);
-            }
-
-            msg.removeMessageElement(dstAddrElem);
-
-            EndpointAddress dstAddr = new EndpointAddress(dstAddrElem.toString());
-
-            // Handoff the message to the EndpointService Manager
-            endpoint.processIncomingMessage(msg, srcAddr, dstAddr);
-
-            if (TransportMeterBuildSettings.TRANSPORT_METERING && (multicastTransportBindingMeter != null)) {
-                multicastTransportBindingMeter.messageReceived(false, msg, messageReceiveBeginTime - System.currentTimeMillis(), size);
-            }
-        } catch (Exception e) {
-            if (TransportMeterBuildSettings.TRANSPORT_METERING && (multicastTransportBindingMeter != null)) {
-                multicastTransportBindingMeter.receiveFailure(false, messageReceiveBeginTime - System.currentTimeMillis(), size);
-            }
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Discard incoming multicast message", e);
-            }
-        }
-    }
-
-    TransportBindingMeter getMulticastTransportBindingMeter(EndpointAddress destinationAddress) {
-        if (multicastTransportMeter != null) {
-            return multicastTransportMeter.getTransportBindingMeter(group.getPeerID(), destinationAddress);
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Handles incoming datagram packets. This implementation uses the peer
-     * group Executor service to process the datagram packets, but limits the
-     * number of concurrent tasks.
-     */
-    private class DatagramProcessor implements Runnable {
-
-        /**
-         * The maximum number of datagrams we will simultaneously process.
-         */
-        private static final int MAX_SIMULTANEOUS_PROCESSING = 5;
-
-        /**
-         * The executor to which we will issue tasks.
-         */
-        final Executor executor;
-
-        /**
-         * Queue of datagrams waiting to be executed. The queue is quite small.
-         * The goal is not to cache datagrams in memory. If we can't keep up it
-         * is better that we drop messages.
-         */
-        final BlockingQueue<DatagramPacket> queue = new ArrayBlockingQueue<DatagramPacket>(MAX_SIMULTANEOUS_PROCESSING + 1);
-
-        /**
-         * The number of executor tasks we are currently using.
-         */
-        int currentTasks = 0;
-
-        /**
-         * If {@code true} then this processor has been stopped.
-         */
-        volatile boolean stopped = false;
-
-        /**
-         * Default constructor
-         * @param executor the threadpool
-         */
-        DatagramProcessor(Executor executor) {
-            this.executor = executor;
-        }
-
-        /**
-         * Stops this thread
-         */
-        void stop() {
-            queue.clear();
-            stopped = true;
-        }
-
-        /**
-         * Puts a datagram on the queue. The enqueue operation is blocking and
-         * may take a significant amount of time.
-         *
-         * @param packet the datagram
-         * @throws InterruptedException if interrupted
-         */
-        void put(DatagramPacket packet) throws InterruptedException {
-            boolean execute = false;
-
-            if (stopped) {
-                return;
-            }
-
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.log(Level.FINER, "Queuing incoming datagram packet : " + packet);
-            }
-
-            // push the datagram
-            queue.put(packet);
-
-            // See if we can start a new executor.
-            synchronized (this) {
-                if (!stopped && (currentTasks < MAX_SIMULTANEOUS_PROCESSING)) {
-                    currentTasks++;
-                    execute = true;
-                }
-            }
-
-            // If it's ok, start a new executor outside of the synchronization.
-            if (execute) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.log(Level.FINER, "Starting new executor datagram processing task");
-                }
-                executor.execute(this);
-            }
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public void run() {
-            try {
-                DatagramPacket packet;
-                while (!stopped && (null != (packet = queue.poll()))) {
-                    if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                        LOG.log(Level.FINER, "Processing incoming datagram packet : " + packet);
-                    }
-                    processMulticast(packet);
-                }
-            } catch (Throwable all) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Uncaught Throwable", all);
-                }
-            } finally {
-                synchronized (this) {
-                    currentTasks--;
-                }
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/mcast/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/mcast/package.html
deleted file mode 100644 (file)
index 0fc0881..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-<HEAD>
-</HEAD>
-<BODY>
-A JXTA {@link net.jxta.endpoint.MessageTransport} implementation which uses raw 
-IP multicast datagrams.
-
-@see net.jxta.endpoint.EndpointService
-@see net.jxta.endpoint.MessageTransport
-@see net.jxta.endpoint.MessagePropagater
-@see net.jxta.endpoint.Message
-@see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#trans-tcpipt" target="_blank">JXTA Protocols
-    Specification : Standard JXTA Transport Bindings</a>
-</BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/msgframing/MessagePackageHeader.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/msgframing/MessagePackageHeader.java
deleted file mode 100644 (file)
index c679fea..0000000
+++ /dev/null
@@ -1,605 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.msgframing;
-
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.DataOutput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.text.MessageFormat;
-import java.util.ListIterator;
-
-import net.jxta.document.MimeMediaType;
-
-
-/**
- * Header Package for Messages. Analogous to HTTP Headers.
- */
-public class MessagePackageHeader {
-    
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(MessagePackageHeader.class.getName());
-    
-    /**
-     * Standard header name for content-length
-     */
-    private final static String CONTENT_LENGTH = "content-length";
-    
-    /**
-     * Standard header name for content-type
-     */
-    private final static String CONTENT_TYPE = "content-type";
-    
-    /**
-     * The maximum size of Header data buffers we will emit.
-     */
-    private final static int MAX_HEADER_LEN = 1024;
-    
-    /**
-     * Used for storing individual header elements.
-     */
-    public static class Header {
-        
-        final String  name;
-        final byte[] value;
-        
-        public Header(String name, byte[] value) {
-            this.name = name;
-            
-            assert value.length <= 65535;
-            
-            this.value = value;
-        }
-        
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public String toString() {
-            return MessageFormat.format("{0} := {1}", name, value);
-        }
-        
-        public String getName() {
-            return name;
-        }
-        
-        public byte[] getValue() {
-            return value;
-        }
-        
-        public String getValueString() {
-            try {
-                return new String(value, "UTF-8");
-            } catch (UnsupportedEncodingException never) {
-                // utf-8 is a required encoding.
-                throw new Error("UTF-8 encoding support missing!");
-            }
-        }
-    }
-    
-    /**
-     * The individual header elements in the order they were read.
-     */
-    private final List<Header> headers = new ArrayList<Header>();
-    
-    /**
-     * Creates a new instance of MessagePackageHeader. Used for outgoing messages.
-     */
-    public MessagePackageHeader() {}
-    
-    /**
-     * Creates a new instance of MessagePackageHeader. Used for incoming messages.
-     *
-     * @param in The stream from which the headers will be read.
-     * @throws java.io.IOException if an io error occurs.
-     */
-    public MessagePackageHeader(InputStream in) throws IOException {
-        boolean sawEmpty = false;
-        boolean sawLength = false;
-        boolean sawType = false;
-        DataInput di = new DataInputStream(in);
-        
-        // todo 20021014 bondolo@jxta.org A framing signature would help here.
-        
-        do {
-            byte headerNameLength = di.readByte();
-            
-            if (0 == headerNameLength) {
-                sawEmpty = true;
-            } else {
-                byte[] headerNameBytes = new byte[headerNameLength];
-                
-                di.readFully(headerNameBytes);
-                
-                String headerNameString = new String(headerNameBytes, "UTF-8");
-                
-                if (headerNameString.equalsIgnoreCase(CONTENT_LENGTH)) {
-                    if (sawLength) {
-                        throw new IOException("Duplicate content-length header");
-                    }
-                    sawLength = true;
-                }
-                
-                if (headerNameString.equalsIgnoreCase(CONTENT_TYPE)) {
-                    if (sawType) {
-                        throw new IOException("Duplicate content-type header");
-                    }
-                    sawType = true;
-                }
-                
-                int headerValueLength = di.readUnsignedShort();
-                
-                byte[] headerValueBytes = new byte[headerValueLength];
-                
-                di.readFully(headerValueBytes);
-                
-                headers.add(new Header(headerNameString, headerValueBytes));
-                
-            }
-        } while (!sawEmpty);
-        
-        if (!sawLength) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Content Length header was missing");
-            }
-            throw new IOException("Content Length header was missing");
-        }
-        
-        if (!sawType) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Content Type header was missing");
-            }
-            throw new IOException("Content Type header was missing");
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String toString() {
-        StringBuilder result = new StringBuilder();
-        
-        result.append('[');
-        
-        Iterator<Header> eachHeader = getHeaders();
-
-        while (eachHeader.hasNext()) {
-            Header aHeader = eachHeader.next();
-            
-            result.append(" {");
-            result.append(aHeader);
-            result.append('}');
-            
-            if (eachHeader.hasNext()) {
-                result.append(',');
-            }
-        }
-        
-        result.append(']');
-        
-        return result.toString();
-    }
-    
-    /**
-     * Returns number of header elements otherwise -1
-     *
-     * @param buffer the byte buffer
-     * @return number of header elements
-     */
-    private int getHeaderCount(ByteBuffer buffer) {
-        int pos = buffer.position();
-        int limit = buffer.limit();
-        int headerCount = 0;
-        boolean sawZero = false;
-        
-        while (pos < limit) {
-            // get header name length
-            int len = buffer.get(pos) & 0xFF;
-
-            pos += 1;
-            
-            if (0 == len) {
-                sawZero = true;
-                break;
-            }
-            
-            // advance past name
-            pos += len;
-            
-            if ((pos + 2) >= limit) {
-                // not enough data
-                break;
-            }
-            
-            // get value length
-            len = buffer.getShort(pos) & 0xFFFF;
-            pos += 2;
-            
-            // advance past value
-            pos += len;
-            
-            headerCount++;
-        }
-        
-        return sawZero ? headerCount : -1;
-    }
-    
-    /**
-     * Reads a Header from a ByteBuffer
-     *
-     * @param buffer the input buffer
-     * @return {@code true} If the header block was completely read.
-     * @throws IOException if an io error is encountered
-     */
-    public boolean readHeader(ByteBuffer buffer) throws IOException {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine(MessageFormat.format("Parsing Package Header from byte buffer :{0}", buffer.toString()));
-        }
-        
-        int count = getHeaderCount(buffer);
-
-        if (count < 0) {
-            return false;
-        }
-        for (int i = 1; i <= count; i++) {
-            byte headerNameLength = buffer.get();
-            byte[] headerNameBytes = new byte[headerNameLength];
-            
-            buffer.get(headerNameBytes);
-            String headerNameString = new String(headerNameBytes, "UTF-8");
-            int headerValueLength = buffer.getShort() & 0x0FFFF;  // unsigned
-            byte[] headerValueBytes = new byte[headerValueLength];
-            
-            buffer.get(headerValueBytes);
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer(MessageFormat.format("Adding Name {0}: {1}", headerNameString, headerValueBytes));
-            }
-            headers.add(new Header(headerNameString, headerValueBytes));
-        }
-        
-        // get the end-of-pkg
-        buffer.get();
-        
-        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-            LOG.finer(MessageFormat.format("Parsed {0} header elements, buffer stats :{1}", count, buffer.toString()));
-        }
-        return true;
-    }
-    
-    /**
-     * Add a header.
-     *
-     * @param name  The header name. The UTF-8 encoded representation of this
-     * name may not be longer than 255 bytes.
-     * @param value The value for the header. May not exceed 65535 bytes in
-     * length.
-     */
-    public void addHeader(String name, byte[] value) {
-        if (name.length() > 255) {
-            throw new IllegalArgumentException("name may not exceed 255 bytes in length.");
-        }
-        
-        if (value.length > 65535) {
-            throw new IllegalArgumentException("value may not exceed 65535 bytes in length.");
-        }
-        
-        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-            LOG.finer("Add header :" + name + "(" + name.length() + ") with " + value.length + " bytes of value");
-        }
-        
-        headers.add(new Header(name, value));
-    }
-    
-    /**
-     * Add a header.
-     *
-     * @param name  The header name. The UTF-8 encoded representation of this
-     * name may not be longer than 255 bytes.
-     * @param value The value for the header. May not exceed 65535 bytes in
-     * length.
-     */
-    public void addHeader(String name, String value) {        
-        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-            LOG.finer("Add header :" + name + "(" + name.length() + ") with " + value.length() + " chars of value");
-        }
-        
-        try {
-            addHeader(name, value.getBytes("UTF-8"));
-        } catch (UnsupportedEncodingException never) {
-            // utf-8 is a required encoding.
-            throw new IllegalStateException("UTF-8 encoding support missing!");
-        }
-    }
-    /**
-     * Replace a header. Replaces all existing headers with the same name.
-     *
-     * @param name  The header name. The UTF-8 encoded representation of this
-     * name may not be longer than 255 bytes.
-     * @param value The value for the header. May not exceed 65535 bytes in
-     * length.
-     */
-    public void replaceHeader(String name, byte[] value) {
-        if (name.length() > 255) {
-            throw new IllegalArgumentException("name may not exceed 255 bytes in length.");
-        }
-        
-        if (value.length > 65535) {
-            throw new IllegalArgumentException("value may not exceed 65535 bytes in length.");
-        }
-        
-        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-            LOG.finer("Replace header :" + name + "(" + name.length() + ") with " + value.length + " bytes of value");
-        }
-        
-        Header newHeader = new Header(name, value);
-        ListIterator<Header> eachHeader = getHeaders();
-        boolean replaced = false;
-        
-        while (eachHeader.hasNext()) {
-            Header aHeader = eachHeader.next();
-            
-            if (aHeader.getName().equalsIgnoreCase(name)) {
-                eachHeader.set(newHeader);
-                replaced = true;
-            }
-        }
-        
-        if(!replaced) {
-            headers.add(newHeader);
-        }
-    }
-    /**
-     * Replace a header. Replaces all existing headers with the same name
-     *
-     * @param name  The header name. The UTF-8 encoded representation of this
-     * name may not be longer than 255 bytes.
-     * @param value The value for the header. May not exceed 65535 bytes in
-     * length.
-     */
-    public void replaceHeader(String name, String value) {
-        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-            LOG.finer("Replace header :" + name + "(" + name.length() + ") with " + value.length() + " chars of value");
-        }
-        
-        try {
-            replaceHeader(name, value.getBytes("UTF-8"));
-        } catch (UnsupportedEncodingException never) {
-            // utf-8 is a required encoding.
-            throw new IllegalStateException("UTF-8 encoding support missing!");
-        }
-    }
-    
-    /**
-     * Gets all of the headers. This iterator provides access to the live
-     * data of this instance. Modifying the headers using {@code add()},
-     * {@code set()}, {@code remove()} is permitted.
-     *
-     * @return all of the headers
-     */
-    public ListIterator<Header> getHeaders() {
-        return headers.listIterator();
-    }
-    
-    /**
-     * Gets all of the headers matching the specified name
-     *
-     * @param name the name of the header we are seeking.
-     */
-    public Iterator<Header> getHeader(String name) {
-        List<Header> matchingHeaders = new ArrayList<Header>();
-        
-        for (Header aHeader : headers) {
-            if (name.equals(aHeader.getName())) {
-                matchingHeaders.add(aHeader);
-            }
-        }
-        return matchingHeaders.iterator();
-    }
-    
-    /**
-     * Write this group of header elements to a stream.
-     *
-     * @param out the stream to send the headers to.
-     * @throws java.io.IOException if an io error occurs
-     */
-    public void sendToStream(OutputStream out) throws IOException {
-        Iterator<Header> eachHeader = getHeaders();
-        DataOutput dos = new DataOutputStream(out);
-        
-        // todo 20021014 bondolo@jxta.org A framing signature would help here
-        
-        while (eachHeader.hasNext()) {
-            Header aHeader = eachHeader.next();
-            
-            byte[] nameBytes = aHeader.getName().getBytes("UTF-8");
-            byte[] value = aHeader.getValue();
-            
-            assert nameBytes.length <= 255;
-            assert value.length <= 65535;
-            
-            dos.write(nameBytes.length);
-            dos.write(nameBytes);
-            dos.writeShort(value.length);
-            dos.write(value);
-        }
-        
-        // write empty header
-        dos.write(0);
-    }
-    
-    /**
-     * Return a ByteBuffer representing this group of header elements.
-     *
-     * @return ByteBuffer representing this Header
-     */
-    public ByteBuffer getByteBuffer() {
-        // note: according to the spec this may exceed MAX_HEADER_LEN,
-        // but since there are practically only 3 header elements used
-        // it's safe to assume this implemention detail.
-        ByteBuffer buffer = ByteBuffer.allocate(MAX_HEADER_LEN);
-        
-        for (Header header : headers) {
-            byte[] name;
-
-            try {
-                name = header.getName().getBytes("UTF-8");
-            } catch (UnsupportedEncodingException never) {
-                throw new Error("Required UTF-8 encoding not available.");
-            }
-            
-            byte[] value = header.getValue();
-            
-            assert name.length <= 255;
-            assert value.length <= 65535;
-            
-            buffer.put((byte) name.length);
-            buffer.put(name);
-            buffer.putShort((short) value.length);
-            buffer.put(value);
-        }
-        
-        // write empty header
-        buffer.put((byte) 0);
-        buffer.flip();
-        
-        return buffer;
-    }
-    
-    /**
-     * Convenience method setting the "{@code content-length}" header.
-     *
-     * @param length length of the message.
-     */
-    public void setContentLengthHeader(long length) {
-        byte[] lengthAsBytes = new byte[8];
-
-        for (int eachByte = 0; eachByte < 8; eachByte++) {
-            lengthAsBytes[eachByte] = (byte) (length >> ((7 - eachByte) * 8L));
-        }
-        
-        replaceHeader(CONTENT_LENGTH, lengthAsBytes);
-    }
-    
-    /**
-     * Convenience method for getting the "{@code content-length}" header.
-     *
-     * @return length from the header or -1 if there was no
-     * {@code content-length} header element.
-     */
-    public long getContentLengthHeader() {
-        Iterator<Header> it = getHeader(CONTENT_LENGTH);
-
-        if (!it.hasNext()) {
-            return -1L;
-        }
-        Header header = it.next();
-        byte[] lengthAsBytes = header.getValue();
-        
-        long lengthAsLong = 0L;
-        
-        for (int eachByte = 0; eachByte < 8; eachByte++) {
-            lengthAsLong |= ((long) (lengthAsBytes[eachByte] & 0xff)) << ((7 - eachByte) * 8L);
-        }
-        
-        return lengthAsLong;
-    }
-    
-    /**
-     * Convenience method for setting the "{@code content-type}" header.
-     *
-     * @param type type of the message.
-     */
-    public void setContentTypeHeader(MimeMediaType type) {
-        replaceHeader(CONTENT_TYPE, type.toString());
-    }
-    
-    /**
-     * Convenience method for getting the "{@code content-type}" header.
-     *
-     * @return type from the header or "{@code application/octet-stream}" if
-     * there was no {@code content-type} header.
-     */
-    public MimeMediaType getContentTypeHeader() {
-        Iterator<Header> it = getHeader(CONTENT_TYPE);
-
-        if (!it.hasNext()) {
-            // return the generic type. Better than returning "null".
-            return MimeMediaType.AOS;
-        }
-        Header header = it.next();
-        
-        return MimeMediaType.valueOf(header.getValueString());
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/msgframing/WelcomeMessage.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/msgframing/WelcomeMessage.java
deleted file mode 100644 (file)
index 6bce09d..0000000
+++ /dev/null
@@ -1,529 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.msgframing;
-
-
-import java.io.EOFException;
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.nio.ByteBuffer;
-import java.nio.BufferUnderflowException;
-import java.util.Arrays;
-import java.util.List;
-import java.text.MessageFormat;
-
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-
-/**
- * Contains a JXTA connection Welcome Message. The Welcome Message is sent by
- * both participant peers as the first interchange on newly opened connections.
- * <p/>
- * <p/>The Welcome Message contains the following information:
- * <ul>
- * <li>The address to which the local peer believes it is connected.</li>
- * <li>The local peer's return address, the source address.</li>
- * <li>The local peer's peer id.</li>
- * <li>A flag which controls propagation behaviour for this conneciton.</li>
- * </ul>
- *
- * @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#trans-tcpipt"
- *      target="_blank">JXTA Protocols Specification : TCP/IP Message Transport</a>
- */
-public class WelcomeMessage {
-
-    /**
-     * Log4J Logger
-     */
-    private static final Logger LOG = Logger.getLogger(WelcomeMessage.class.getName());
-
-    /**
-     * The Welcome Message Signature/Preamble
-     */
-    private final static String GREETING = "JXTAHELLO";
-
-    /**
-     * A space for separating elements of the welcome message.
-     */
-    private final static String SPACE = " ";
-
-    /**
-     * Version string for Welcome Message Version 1.1
-     */
-    private final static String WELCOME_VERSION_1_1 = "1.1";
-
-    /**
-     * Version string for Welcome Message Version 3.0
-     */
-    private final static String WELCOME_VERSION_3_0 = "3.0";
-
-    /**
-     * The current welcome message version. This is the only version we will emit.
-     */
-    private final static String CURRENTVERSION = WELCOME_VERSION_1_1;
-
-    /**
-     * The destination address that we believe we are connecting to.
-     */
-    private EndpointAddress destinationAddress;
-
-    /**
-     * Our return address, the purported source address of this connection.
-     */
-    private EndpointAddress publicAddress;
-
-    /**
-     * Our peerid, the logical return address.
-     */
-    private ID peerID;
-
-    /**
-     * This connection does not wish to receive any propagation/broadcast/notifications.
-     */
-    private boolean noPropagate;
-
-    /**
-     * The preferred binary wire message format version.
-     */
-    private int preferredMessageVersion;
-
-    /**
-     * The welcome message version we are supporting
-     */
-    private String versionString;
-
-    /**
-     * The welcome message as a text string.
-     */
-    private String welcomeString;
-
-    /**
-     * The welcome message as UTF-8 byte stream.
-     */
-    private byte[] welcomeBytes;
-    private final int MAX_LEN = 4096;
-
-    /**
-     * Default constructor
-     */
-    public WelcomeMessage() {}
-
-    /**
-     * Creates a new instance of WelcomeMessage for our Welcome Message.
-     *
-     * @param destAddr      The destination address that we believe we are connecting to.
-     * @param publicaddress Our return address, the purported source address of this connection.
-     * @param peerid        Our peerid, the logical return address.
-     * @param dontPropagate If <tt>true</tt> this connection does not wish to receive any propagation/broadcast/notifications.
-     */
-    public WelcomeMessage(EndpointAddress destAddr, EndpointAddress publicaddress, ID peerid, boolean dontPropagate) {
-        this(destAddr, publicaddress, peerid, dontPropagate, 0);
-    }
-
-    /**
-     * Creates a new instance of WelcomeMessage for our Welcome Message.
-     *
-     * @param destAddr            The destination address that we believe we are connecting to.
-     * @param publicaddress       Our return address, the purported source address of this connection.
-     * @param peerid              Our peerid, the logical return address.
-     * @param dontPropagate       If <tt>true</tt> this connection does not wish to receive any propagation/broadcast/notifications.
-     * @param preferredMsgVersion Binary Wire Messsage format we prefer.
-     */
-    public WelcomeMessage(EndpointAddress destAddr, EndpointAddress publicaddress, ID peerid, boolean dontPropagate, int preferredMsgVersion) {
-        destinationAddress = destAddr;
-        publicAddress = publicaddress;
-        peerID = peerid;
-        noPropagate = dontPropagate;
-        versionString = CURRENTVERSION;
-        preferredMessageVersion = preferredMsgVersion;
-
-        welcomeString = GREETING + SPACE + destAddr.toString() + SPACE + publicAddress.toString() + SPACE + peerID.toString()
-                + SPACE + (noPropagate ? "1" : "0") + SPACE + versionString;
-
-        try {
-            welcomeBytes = welcomeString.getBytes("UTF-8");
-        } catch (UnsupportedEncodingException never) {// all implementations must support utf-8
-        }
-    }
-
-    /**
-     * Creates a new instance of WelcomeMessage for another peer's Welcome Message
-     *
-     * @param in The InputStream to read the welcome message from.
-     * @throws IOException If there is a problem reading the welcome header.
-     */
-    public WelcomeMessage(InputStream in) throws IOException {
-        welcomeBytes = new byte[MAX_LEN];
-        int readAt = 0;
-        boolean sawCR = false;
-        boolean sawCRLF = false;
-
-        // read the welcome message
-        do {
-            int c = in.read();
-
-            switch (c) {
-            case -1:
-                throw new EOFException("Stream terminated before end of welcome message");
-
-            case '\r':
-                if (sawCR) {
-                    welcomeBytes[readAt++] = (byte) 0x0D;
-                }
-                sawCR = true;
-                break;
-
-            case '\n':
-                if (sawCR) {
-                    sawCRLF = true;
-                } else {
-                    welcomeBytes[readAt++] = (byte) 0x0A;
-                }
-                break;
-
-            default:
-                welcomeBytes[readAt++] = (byte) c;
-                sawCR = false;
-            }
-
-            if (readAt == welcomeBytes.length) {
-                throw new IOException("Invalid welcome message, too long");
-            }
-
-        } while (!sawCRLF);
-
-        byte[] truncatedBytes = new byte[readAt];
-
-        System.arraycopy(welcomeBytes, 0, truncatedBytes, 0, readAt);
-        welcomeBytes = truncatedBytes;
-        welcomeString = new String(welcomeBytes, "UTF-8");
-        parseWelcome(welcomeString);
-    }
-
-    /**
-     * Attempts to init a welcome object from a socketChannel
-     *
-     * @param buffer the data buffer
-     * @return null if incomplete welcome was received
-     * @throws IOException if an io error occurs
-     */
-    public boolean read(ByteBuffer buffer) throws IOException {
-        int limit = buffer.limit();
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine(MessageFormat.format("Reading a buffer of size :{0}", limit));
-        }
-        if (limit == 0) {
-            throw new IOException(MessageFormat.format("Invalid welcome message. Invalid length {0}", limit));
-        }
-        int eomPos = findEom(buffer, 0, limit);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine(MessageFormat.format("Buffer size :{0} Welcome End-Of-Message pos :{1}", limit, eomPos));
-        }
-        if (eomPos < 0) {
-            return false;
-        }
-        welcomeBytes = new byte[eomPos];
-        try {
-            buffer.get(welcomeBytes, 0, eomPos);
-            // skip <cr><ln>
-            buffer.position(eomPos + 2);
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(MessageFormat.format("buffer stats :{0}", buffer.toString()));
-            }
-        } catch (BufferUnderflowException buf) {
-            // not enough data, signal for another read
-            return false;
-        }
-        welcomeString = new String(welcomeBytes, "UTF-8");
-        parseWelcome(welcomeString);
-        return true;
-    }
-
-    /**
-     * returns position of <cr><lf> position in buffer, otherwise -1
-     *
-     * @param buffer the byte buffer
-     * @param offset The offset within the buffer array
-     * @param length the length
-     * @return terminating position, or -1 if none found
-     */
-    private int findEom(ByteBuffer buffer, int offset, int length) {
-
-        int lastOffset = length - 2; // we are looking for 2 chars.
-        
-        for (int j = offset; j <= lastOffset; j++) {
-            byte c = buffer.get(j);
-           
-            if (c == '\r') {
-                c = buffer.get(j + 1);
-               
-                if (c == '\n') {
-                    return j;
-                }
-            }
-        }
-        
-        return -1;
-    }
-
-    private void parseWelcome(String welcomeString) throws IOException {
-        List<String> thePieces = Arrays.asList(welcomeString.split("\\s"));
-
-        if (0 == thePieces.size()) {
-            throw new IOException("Invalid welcome message, did not contain any tokens.");
-        }
-
-        if (thePieces.size() < 5) {
-            throw new IOException("Invalid welcome message, did not contain enough tokens.");
-        }
-
-        if (!GREETING.equals(thePieces.get(0))) {
-            throw new IOException("Invalid welcome message, did not start with greeting");
-        }
-
-        try {
-            destinationAddress = new EndpointAddress(thePieces.get(1));
-        } catch (IllegalArgumentException badAddress) {
-            IOException failed = new IOException("Invalid welcome message, bad destination address");
-
-            failed.initCause(badAddress);
-            throw failed;
-        }
-
-        try {
-            publicAddress = new EndpointAddress(thePieces.get(2));
-        } catch (IllegalArgumentException badAddress) {
-            IOException failed = new IOException("Invalid welcome message, bad publicAddress address");
-
-            failed.initCause(badAddress);
-            throw failed;
-        }
-
-        try {
-            URI peerURI = new URI(thePieces.get(3));
-
-            peerID = IDFactory.fromURI(peerURI);
-        } catch (URISyntaxException badURI) {
-            IOException failed = new IOException("Invalid welcome message, bad peer id");
-
-            failed.initCause(badURI);
-            throw failed;
-        }
-
-        versionString = thePieces.get(thePieces.size() - 1);
-
-        if (WELCOME_VERSION_1_1.equals(versionString)) {
-            if (6 != thePieces.size()) {
-                throw new IOException("Invalid welcome message, incorrect number of tokens.");
-            }
-
-            String noPropagateStr = thePieces.get(4);
-
-            if (noPropagateStr.equals("1")) {
-                noPropagate = true;
-            } else if (noPropagateStr.equals("0")) {
-                noPropagate = false;
-            } else {
-                throw new IOException("Invalid welcome message, illegal value for propagate flag");
-            }
-
-            // preferred message version is not set in
-            preferredMessageVersion = 0;
-        } else if (WELCOME_VERSION_3_0.equals(versionString)) {
-            if (7 != thePieces.size()) {
-                throw new IOException("Invalid welcome message, incorrect number of tokens.");
-            }
-
-            String noPropagateStr = thePieces.get(4);
-
-            if (noPropagateStr.equals("1")) {
-                noPropagate = true;
-            } else if (noPropagateStr.equals("0")) {
-                noPropagate = false;
-            } else {
-                throw new IOException("Invalid welcome message, illegal value for propagate flag");
-            }
-
-            String preferredVersionStr = thePieces.get(5);
-
-            try {
-                preferredMessageVersion = Integer.valueOf(preferredVersionStr);
-            } catch (IllegalArgumentException failed) {
-                IOException failure = new IOException("Invalid welcome message, illegal value for preferred message version");
-
-                failure.initCause(failed);
-
-                throw failure;
-            }
-        } else {
-            // Unrecognized Welcome message version. Use default values.
-            noPropagate = false;
-            preferredMessageVersion = 0;
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Successfuly parsed a welcome message :" + getWelcomeString());
-        }
-    }
-
-    /**
-     * Write the welcome message to the provided stream.
-     *
-     * @param theStream The OutputStream to which to write the welcome message.
-     * @throws IOException If there is a problem writing the welcome message.
-     */
-    public void sendToStream(OutputStream theStream) throws IOException {
-        theStream.write(welcomeBytes);
-        theStream.write('\r');
-        theStream.write('\n');
-    }
-
-    /**
-     * Write the welcome to a socket channel
-     *
-     * @return A ByteBuffer of the welcome message
-     * @throws java.io.IOException if an io error occurs
-     */
-    public ByteBuffer getByteBuffer() throws IOException {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine(MessageFormat.format("Sending welcome message of size:{0}", welcomeBytes.length + 2));
-        }
-        ByteBuffer buffer = ByteBuffer.allocate(welcomeBytes.length + 2);
-
-        buffer.put(welcomeBytes);
-        buffer.put((byte) '\r');
-        buffer.put((byte) '\n');
-        buffer.flip();
-        return buffer;
-    }
-
-    /**
-     * Return the peerid associated with the Welcome Message.
-     *
-     * @return The peer ID from the Welcome Message.
-     */
-    public ID getPeerID() {
-        return peerID;
-    }
-
-    /**
-     * Return the source address associated with the Welcome Message.
-     *
-     * @return The source address from the Welcome Message.
-     */
-    public EndpointAddress getPublicAddress() {
-        return publicAddress;
-    }
-
-    /**
-     * Return the destination address associated with the Welcome Message.
-     *
-     * @return The destination address from the Welcome Message.
-     */
-    public EndpointAddress getDestinationAddress() {
-        return destinationAddress;
-    }
-
-    /**
-     * Return the propagation preference from the Welcome Message.
-     *
-     * @return <tt>true</tt> if <strong>no</strong> propagation is desired
-     *         otherwise <tt>false</tt>
-     */
-    public boolean dontPropagate() {
-        return noPropagate;
-    }
-
-    /**
-     * Return the preferred message version from the Welcome Message.
-     *
-     * @return The preferred Message Version.
-     */
-    public int getPreferredMessageVersion() {
-        return preferredMessageVersion;
-    }
-
-    /**
-     * Return the version associated with the Welcome Message.
-     *
-     * @return The version from the Welcome Message.
-     */
-    public String getWelcomeVersion() {
-        return versionString;
-    }
-
-    /**
-     * Return a String containing the Welcome Message.
-     *
-     * @return a String containing the Welcome Message.
-     */
-    public String getWelcomeString() {
-        return welcomeString;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/package.html
deleted file mode 100644 (file)
index acd637c..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    A JXTA {@link net.jxta.endpoint.EndpointService} implementation which 
-    implements the standard JXTA Endpoint Service.
-
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#trans-endpt"
-target="_blank">JXTA Protocols Specification : Endpoint Service</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/relay/RelayClient.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/relay/RelayClient.java
deleted file mode 100644 (file)
index ab5ac48..0000000
+++ /dev/null
@@ -1,1351 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.endpoint.relay;
-
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.document.StructuredTextDocument;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.MessageReceiver;
-import net.jxta.endpoint.MessageSender;
-import net.jxta.endpoint.MessageTransport;
-import net.jxta.endpoint.Messenger;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.impl.protocol.RelayConfigAdv;
-import net.jxta.impl.util.SeedingManager;
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.impl.util.URISeedingManager;
-import net.jxta.logging.Logging;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.protocol.AccessPointAdvertisement;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.RdvAdvertisement;
-import net.jxta.protocol.RouteAdvertisement;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * RelayClient manages the relationship with the RelayServer(s)
- *
- */
-public class RelayClient implements MessageReceiver, Runnable {
-    
-    /**
-     *  Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(RelayClient.class.getName());
-    
-    private final static long DEFAULT_EXPIRATION = 20L * TimeUtils.AMINUTE;
-
-    private final PeerGroup group;
-    private final String serviceName;
-    private EndpointService endpoint;
-    private final EndpointAddress publicAddress;
-    private final String groupName;
-    private final String peerId;
-    
-    private final int maxServers;
-    private final long leaseLengthToRequest;
-    private final long messengerPollInterval;
-    
-    private Thread thread = null;
-    
-    private volatile boolean closed = false;
-    
-    /**
-     *  <ul>
-     *      <li>Values are {@link net.jxta.peergroup.PeerGroup}.</li>
-     *  </ul>
-     */
-    private final List activeRelayListeners = new ArrayList();
-    
-    /**
-     *  <ul>
-     *      <li>Keys are {@link net.jxta.endpoint.EndpointAddress}.</li>
-     *      <li>Values are {@link net.jxta.protocol.RouteAdvertisement}.</li>
-     *  </ul>
-     */
-    private final Map<EndpointAddress, RouteAdvertisement> activeRelays = new Hashtable<EndpointAddress, RouteAdvertisement>();
-    
-    /**
-     * Our source for relay servers.
-     */
-    private final SeedingManager seedingManager;
-    
-    RelayServerConnection currentServer = null;
-    
-    public RelayClient(PeerGroup group, String serviceName, RelayConfigAdv relayConfig) {
-        this.group = group;
-        this.groupName = group.getPeerGroupID().getUniqueValue().toString();
-        
-        this.serviceName = serviceName;
-        
-        maxServers = (-1 != relayConfig.getMaxRelays()) ? relayConfig.getMaxRelays() : RelayTransport.DEFAULT_MAX_SERVERS;
-        leaseLengthToRequest = (-1 != relayConfig.getClientLeaseDuration())
-                ? relayConfig.getClientLeaseDuration()
-                : RelayTransport.DEFAULT_LEASE;
-        messengerPollInterval = (-1 != relayConfig.getMessengerPollInterval())
-                ? relayConfig.getMessengerPollInterval()
-                : RelayTransport.DEFAULT_POLL_INTERVAL;
-        
-        URISeedingManager uriSeedingManager = new URISeedingManager(relayConfig.getAclUri(), relayConfig.getUseOnlySeeds(), group, serviceName);
-        
-        for (EndpointAddress aSeeder : Arrays.asList(relayConfig.getSeedRelays())) {
-            uriSeedingManager.addSeed(aSeeder.toURI());
-        }
-        
-        for (URI aSeed : Arrays.asList(relayConfig.getSeedingURIs())) {
-            uriSeedingManager.addSeedingURI(aSeed);
-        }
-        
-        this.seedingManager = uriSeedingManager;
-        
-        // sanity check
-        
-        peerId = group.getPeerID().getUniqueValue().toString();
-        publicAddress = new EndpointAddress(RelayTransport.protocolName, peerId, null, null);
-        
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring Relay Client");
-            
-            configInfo.append("\n\tGroup Params :");
-            configInfo.append("\n\t\tGroup : ").append(group.getPeerGroupName());
-            configInfo.append("\n\t\tGroup ID : ").append(group.getPeerGroupID());
-            configInfo.append("\n\t\tPeer ID : ").append(group.getPeerID());
-            configInfo.append("\n\tConfiguration :");
-            configInfo.append("\n\t\tService Name : ").append(serviceName);
-            configInfo.append("\n\t\tPublic Address : ").append(publicAddress);
-            configInfo.append("\n\t\tMax Relay Servers : ").append(maxServers);
-            configInfo.append("\n\t\tMax Lease Length : ").append(leaseLengthToRequest).append("ms.");
-            configInfo.append("\n\t\tMessenger Poll Interval : ").append(messengerPollInterval).append("ms.");
-            LOG.config(configInfo.toString());
-        }
-    }
-    
-    public synchronized boolean startClient() {
-        endpoint = group.getEndpointService();
-        
-        if (endpoint.addMessageTransport(this) == null) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("Transport registration refused");
-            }
-            return false;
-        }
-        
-        // start the client thread
-        thread = new Thread(group.getHomeThreadGroup(), this, "Relay Client Worker Thread for " + publicAddress);
-        thread.setDaemon(true);
-        thread.start();
-        
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Started client : " + publicAddress.toString());
-        }
-        
-        return true;
-    }
-    
-    public synchronized void stopClient() {
-        if (closed) {
-            return;
-        }
-        
-        closed = true;
-        
-        endpoint.removeMessageTransport(this);
-        
-        // make sure the thread is not running
-        Thread tempThread = thread;
-        
-        thread = null;
-        if (tempThread != null) {
-            tempThread.interrupt();
-        }
-        
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Stopped client : " + publicAddress.toString());
-        }
-        
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public Iterator<EndpointAddress> getPublicAddresses() {
-        
-        return Collections.singletonList(publicAddress).iterator();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public String getProtocolName() {
-        return RelayTransport.protocolName;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public EndpointService getEndpointService() {
-        return endpoint;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public Object transportControl(Object operation, Object Value) {
-        return null;
-    }
-    
-    /**
-     *  Logic for the relay client
-     *
-     *  <ol>
-     *      <li>Pick a relay server to try</li>
-     *      <li>try getting a messenger to relay server, if can not get messenger, start over</li>
-     *      <li>use the messenger to send a connect message</li>
-     *     <li> wait for a response, if there is no response or a disconnect response, start over</li>
-     *      <li>while still connected
-     *          <ol>
-     *          <li>renew the lease as needed and keep the messenger connected</li>
-     *          <ol></li>
-     *  </ol>
-     *
-     *  <p/>FIXME 20041102 bondolo The approach used here is really, really
-     *  stupid. The calls to <code>connectToRelay()</code> will not return if a
-     *  connection to a relay is achieved. This makes continued iteration over
-     * seeds after return incredibly silly. <code>connectToRelay()</code> only
-     *  returns when it can <b>NO LONGER CONNECT</b> to the relay. The only
-     *  hack I can think of to subvert this is to stop iteration of advs/seeds
-     *  if <code>connectToRelay()</code> takes a long time. bizarre.
-     */
-    public void run() {
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Start relay client thread");
-        }
-        
-        try {
-            long nextConnectAttemptAt = 0;
-            
-            RdvAdvertisement referral = null;
-            List<RouteAdvertisement> allSeeds = null;
-            long gotLastSeedsAt = 0;
-            
-            // run until the service is stopped
-            while (!closed) {
-                // Attempt to use any referral immediately.
-                if (null != referral) {
-                    RouteAdvertisement relayRoute = referral.getRouteAdv();
-
-                    relayRoute.setDestPeerID(referral.getPeerID());
-                    
-                    referral = connectToRelay(new RelayServerConnection(this, relayRoute));
-                    
-                    continue;
-                }
-                
-                // Sleep until it is time for the next connection attempt.
-                long untilNextConnectAttempt = TimeUtils.toRelativeTimeMillis(nextConnectAttemptAt);
-                
-                if (untilNextConnectAttempt > 0) {
-                    try {
-                        Thread.sleep(untilNextConnectAttempt);
-                    } catch (InterruptedException e) {
-                        // ignore interrupted exception
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.log(Level.FINE, "Thread Interrupted ", e);
-                        }
-                        
-                        continue;
-                    }
-                }
-                
-                // Don't allow next connection attempt to start any sooner than this.
-                nextConnectAttemptAt = TimeUtils.toAbsoluteTimeMillis(30 * TimeUtils.ASECOND);
-                
-                // Get seeds if we need them or the ones we have are old.
-                if ((TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), gotLastSeedsAt) > (5 * TimeUtils.AMINUTE))
-                        || allSeeds.isEmpty()) {
-                    allSeeds = new ArrayList<RouteAdvertisement>(Arrays.asList(seedingManager.getActiveSeedRoutes()));
-                    gotLastSeedsAt = TimeUtils.timeNow();
-                }
-                
-                // Try seeds until we get a connection, a referral or are closed.
-                while ((null == referral) && !allSeeds.isEmpty() && !closed) {
-                    RouteAdvertisement aSeed = allSeeds.remove(0);
-                    
-                    if (null == aSeed.getDestPeerID()) {
-                        // It is an incomplete route advertisement. We are going to assume that it is only a wrapper for a single ea.
-                        Vector<String> seed_eas = aSeed.getDest().getVectorEndpointAddresses();
-                        
-                        if (!seed_eas.isEmpty()) {
-                            EndpointAddress aSeedHost = new EndpointAddress(seed_eas.get(0));
-                            
-                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                LOG.fine("Attempting relay connect to : " + aSeedHost);
-                            }
-                            
-                            referral = connectToRelay(new RelayServerConnection(this, aSeedHost));
-                        }
-                    } else {
-                        // We have a full route, send it to the virtual address of the route!
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Attempting relay connect to : " + aSeed.getDestPeerID());
-                        }
-                        
-                        referral = connectToRelay(new RelayServerConnection(this, aSeed));
-                    }
-                }
-            }
-        } catch (Throwable all) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Uncaught Throwable in thread :" + Thread.currentThread().getName(), all);
-            }
-        } finally {
-            thread = null;
-            
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("stop client thread");
-            }
-        }
-    }
-    
-    protected boolean isRelayConnectDone() {
-        return (thread == null || Thread.currentThread() != thread);
-    }
-    
-    /**
-     *  @param  server  The relay server to connect to
-     *  @return The advertisement of an alternate relay server to try.
-     */
-    RdvAdvertisement connectToRelay(RelayServerConnection server) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Connecting to " + server);
-        }
-        
-        RdvAdvertisement referral = null;
-        
-        // make this the current server
-        currentServer = server;
-        
-        // try getting a messenger to the relay peer
-        if (!server.createMessenger(leaseLengthToRequest)) {
-            return referral;
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("got messenger " + server);
-        }
-        
-        // check the peerId of the relay peer
-        if (server.logicalAddress != null && "jxta".equals(server.logicalAddress.getProtocolName())) {
-            server.peerId = server.logicalAddress.getProtocolAddress();
-        }
-        
-        // make sure that the peerId was found.
-        if (server.peerId == null) {
-            if (server.messenger != null) {
-                server.sendDisconnectMessage();
-                server.messenger.close();
-            }
-            return referral;
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("got peerId " + server);
-        }
-        
-        synchronized (this) {
-            // wait for a response from the server
-            // There is no real damage other than bandwidth usage in sending
-            // a message on top of the connection request, so we realy do not
-            // wait very long before doing it.
-            long requestTimeoutAt = TimeUtils.toAbsoluteTimeMillis(5 * TimeUtils.ASECOND);
-            
-            while (currentServer != null && currentServer.leaseLength == 0 && !isRelayConnectDone()) {
-                long waitTimeout = requestTimeoutAt - System.currentTimeMillis();
-                
-                if (waitTimeout <= 0) {
-                    // did not receive the response in time ?
-                    break;
-                }
-                
-                try {
-                    wait(waitTimeout);
-                } catch (InterruptedException e) {
-                    // ignore interrupt
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.log(Level.FINE, "wait got interrupted early ", e);
-                    }
-                }
-                
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("wait done");
-                }
-            }
-        }
-        
-        if (currentServer == null) {
-            return server.alternateRelayAdv;
-        }
-        
-        if (isRelayConnectDone()) {
-            if (currentServer.messenger != null) {
-                currentServer.messenger.close();
-            }
-            currentServer = null;
-            return server.alternateRelayAdv;
-        }
-        
-        // If we did not get a lease in the first 5 secs, maybe it is because
-        // the server knows us from a previous session. Then it will wait for
-        // a lease renewal message before responding, not just the connection.
-        // Send one and wait another 15.
-        if (currentServer.leaseLength == 0) {
-            
-            currentServer.sendConnectMessage(leaseLengthToRequest);
-            
-            synchronized (this) {
-                
-                // wait for a response from the server
-                long requestTimeoutAt = TimeUtils.toAbsoluteTimeMillis(15 * TimeUtils.ASECOND);
-                
-                while (currentServer != null && currentServer.leaseLength == 0 && !isRelayConnectDone()) {
-                    long waitTimeout = requestTimeoutAt - System.currentTimeMillis();
-                    
-                    if (waitTimeout <= 0) {
-                        // did not receive the response in time ?
-                        break;
-                    }
-                    
-                    try {
-                        wait(waitTimeout);
-                    } catch (InterruptedException e) {
-                        // ignore interrupt
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.log(Level.FINE, "wait got interrupted early ", e);
-                        }
-                    }
-                    
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("wait done");
-                    }
-                }
-            }
-        }
-        
-        // If we had a messenger but are going to give up that relay server because it is
-        // not responsive or rejected us. Make sure that the messenger is closed.
-        if (currentServer == null) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("did not get connect from " + server);
-            }
-            // return any alternate relay advertisements
-            return server.alternateRelayAdv;
-        }
-        
-        if (currentServer.relayAdv == null || currentServer.leaseLength == 0 || isRelayConnectDone()) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("did not get connect from " + server);
-            }
-            if (currentServer.messenger != null) {
-                currentServer.sendDisconnectMessage();
-                currentServer.messenger.close();
-            }
-            currentServer = null;
-            
-            // return any alternate relay advertisements
-            return server.alternateRelayAdv;
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Connected to " + server);
-        }
-        
-        RouteAdvertisement holdAdv = server.relayAdv;
-        EndpointAddress holdDest = server.logicalAddress;
-        
-        // register this relay server
-        addActiveRelay(holdDest, holdAdv);
-        
-        // maintain the relay server connection
-        referral = maintainRelayConnection(server);
-        
-        // unregister this relay server
-        removeActiveRelay(holdDest, holdAdv);
-        
-        return referral;
-    }
-    
-    // FIXME: jice@jxta.org 20030212. This is junk code: that should be a
-    // method of RelayServerConnection and at least not refer to currentServer
-    // other than to assign the reference.
-    protected RdvAdvertisement maintainRelayConnection(RelayServerConnection server) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("maintainRelayConnection() start " + currentServer);
-        }
-        
-        if (server == null) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("RelayConnection() failed at start " + currentServer);
-            }
-            return null;
-        }
-        
-        synchronized (this) {
-            long currentTime = System.currentTimeMillis();
-            long renewLeaseAt = currentServer.leaseObtainedAt + currentServer.leaseLength / 3;
-            long waitTimeout = 0;
-            
-            // This will be true if we need to do the first lease renewal early
-            // (that is at the time of the next connection check).
-            // We'll do that if we did not know the relay server's adv (seed).
-            // In that case we told the relay server to send us its own
-            // adv, else we told it to send us some alternate adv (we have to
-            // chose). In the former case, we want to do a lease connect
-            // request soon so that the server has an opportunity to send us
-            // the alternate adv that we did not get during initial connection.
-            
-            boolean earlyRenew = currentServer.seeded;
-            
-            while (currentServer != null && !isRelayConnectDone()) {
-                // calculate how long to wait
-                waitTimeout = renewLeaseAt - currentTime;
-                
-                // check that the waitTimeout is not greater than the messengerPollInterval
-                // We want to make sure that we poll. Most of the time it cost nothing.
-                // Also, if we urgently need to renew our lease we may wait
-                // less, but if we fail to get our lease renewed in time, the
-                // delay may become negative. In that case we do not want
-                // to start spinning madly. The only thing we can do is just
-                // wait some arbitrary length of time for the lease to be
-                // renewed. (If that gets badly overdue, we should probably
-                // give up on that relay server, though).
-                if (waitTimeout > messengerPollInterval || waitTimeout <= 0) {
-                    waitTimeout = messengerPollInterval;
-                }
-                
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("waitTimeout=" + waitTimeout + " server=" + currentServer);
-                }
-                
-                try {
-                    wait(waitTimeout);
-                } catch (InterruptedException e) {
-                    Thread.interrupted();
-                }
-                
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("wait done, server=" + currentServer);
-                }
-                
-                // make sure the server did not disconnect while waiting
-                if (currentServer == null) {
-                    break;
-                }
-                
-                // get the current time
-                currentTime = System.currentTimeMillis();
-                
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("check messenger " + currentServer);
-                }
-                
-                // check if the messenger is still open
-                if (currentServer.messenger.isClosed()) {
-                    
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Server connection broken");
-                    }
-                    
-                    // See if we can re-open, that happens often.
-                    // That's a reason to renew the connection,
-                    // Not a reason to give up on the server yet.
-                    // Note we do not renew the lease. This is a transient
-                    // and if the server forgot about us, it will respond
-                    // to the connection alone. Otherwise, we'd rather avoid
-                    // getting a response, since in some cases http connections
-                    // close after each received message.
-                    if (!currentServer.createMessenger(currentServer.leaseLength)) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Server connection NOT re-established");
-                        }
-                        // lost connection to relay server
-                        currentServer = null;
-                        break;
-                    }
-                    
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Server connection re-established");
-                    }
-                    
-                    // getMessenger asks for a new lease.
-                    // In the meantime, we'll just assume our old lease is
-                    // still current and that the messenger breakage was just
-                    // a transient.
-                    if (!isRelayConnectDone()) {
-                        continue;
-                    }
-                }
-                
-                // We've been asked to leave. Be nice and tell the
-                // server about it.
-                if (isRelayConnectDone()) {
-                    break;
-                }
-                
-                // check if the lease needs to be renewed
-                renewLeaseAt = currentServer.leaseObtainedAt + currentServer.leaseLength / 3;
-                if (currentTime >= renewLeaseAt || earlyRenew) {
-                    
-                    earlyRenew = false;
-                    
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("renew lease " + currentServer);
-                    }
-                    
-                    // If we do not receive any response to our lease renewals
-                    // (that is the response is overdue badly), then we give
-                    // up and try another relayServer. We give up after 4 minutes
-                    // because if we go as far as 5 we start overshooting other
-                    // timeouts such as the local peer becoming a rdv in a sub-group.
-                    // This later timeout is usually set to 5 minutes or more.
-                    
-                    if ((currentTime > currentServer.leaseObtainedAt + currentServer.leaseLength / 3 + 4 * TimeUtils.AMINUTE)
-                            || (!currentServer.sendConnectMessage(leaseLengthToRequest))) {
-                        
-                        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                            LOG.info("renew lease failed" + currentServer);
-                        }
-                        if (currentServer.messenger != null) {
-                            currentServer.messenger.close();
-                        }
-                        currentServer.messenger = null;
-                        currentServer.peerId = null;
-                        currentServer.leaseLength = 0;
-                        currentServer.leaseObtainedAt = 0;
-                        currentServer.relayAdv = null;
-                        currentServer = null;
-                        break;
-                    }
-                }
-            }
-        }
-        
-        if (isRelayConnectDone() && currentServer != null) {
-            currentServer.sendDisconnectMessage();
-            if (currentServer.messenger != null) {
-                currentServer.messenger.close();
-            }
-            currentServer.messenger = null;
-            currentServer.peerId = null;
-            currentServer.leaseLength = 0;
-            currentServer.leaseObtainedAt = 0;
-            currentServer.relayAdv = null;
-            // Make sure that we will not suggest an alternate
-            // since we're asked to terminate.
-            currentServer.alternateRelayAdv = null;
-            
-            currentServer = null;
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("maintainRelayConnection() terminated " + currentServer);
-        }
-        
-        return server.alternateRelayAdv;
-    }
-    
-    protected synchronized void handleResponse(Message message, EndpointAddress dstAddr) {
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("handleResponse " + currentServer);
-        }
-        
-        // ignore all responses if there is not a current server
-        if (currentServer == null) {
-            return;
-        }
-        
-        // get the request, make it lowercase so that case is ignored
-        String response = RelayTransport.getString(message, RelayTransport.RESPONSE_ELEMENT);
-        
-        if (response == null) {
-            return;
-        }
-        response = response.toLowerCase();
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("response = " + response);
-        }
-        
-        // check if a relay advertisement was included
-        RdvAdvertisement relayAdv = null;
-        
-        MessageElement advElement = message.getMessageElement(RelayTransport.RELAY_NS, RelayTransport.RELAY_ADV_ELEMENT);
-        
-        if (null != advElement) {
-            try {
-                XMLDocument asDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(advElement);
-                Advertisement adv = AdvertisementFactory.newAdvertisement(asDoc);
-                
-                if (adv instanceof RdvAdvertisement) {
-                    relayAdv = (RdvAdvertisement) adv;
-                }
-            } catch (IOException e) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.log(Level.FINE, "Could not read Relay RdvAdvertisement", e);
-                }
-            }
-        }
-        
-        // WATCHOUT: this is not a pid, just the unique string portion.
-        String serverPeerId = dstAddr.getServiceParameter();
-        
-        // only process the request if a client peer id was sent
-        if (serverPeerId == null) {
-            return;
-        }
-        
-        // ignore all responses that are not from the current server
-        if (!serverPeerId.equals(currentServer.peerId)) {
-            return;
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("serverPeerId = " + serverPeerId);
-        }
-        
-        // Figure out which response it is
-        if (RelayTransport.CONNECTED_RESPONSE.equals(response)) {
-            // Connect Response
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("connected response for " + currentServer);
-            }
-            
-            String responseLeaseString = RelayTransport.getString(message, RelayTransport.LEASE_ELEMENT);
-            
-            long responseLease = 0;
-            
-            if (responseLeaseString != null) {
-                try {
-                    responseLease = Long.parseLong(responseLeaseString);
-                } catch (NumberFormatException e) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "could not parse response lease string", e);
-                    }
-                }
-            }
-            
-            // make sure the lease is valid
-            if (responseLease <= 0) {
-                // invalid lease value
-                return;
-            }
-            
-            // update the lease values
-            currentServer.leaseLength = responseLease;
-            currentServer.leaseObtainedAt = System.currentTimeMillis();
-            
-            // Since we got the lease, if we requested a queue flush, it's
-            // now done. We never send it with a new messenger creation, but
-            // when the server already has us as a client it does not respond
-            // to connections through messenger creation, so we're sure we
-            // will have to send an explicit connect message before we get
-            // a response. So, we're sure it's done if it was needed.
-            currentServer.flushNeeded = false;
-            
-            if (relayAdv != null) {
-                // Set it only if it is the server's own. Else it got
-                // published. Still set alternateRelayAdv so that we
-                // can return something that could be usefull when this
-                // connection breaks.
-                PeerID pidOfAdv = relayAdv.getPeerID();
-                String pidOfAdvUnique = pidOfAdv.getUniqueValue().toString();
-                
-                if (currentServer.peerId.equals(pidOfAdvUnique)) {
-                    currentServer.relayAdv = relayAdv.getRouteAdv();
-                    // Fix the embedded route adv !
-                    currentServer.relayAdv.setDestPeerID(pidOfAdv);
-                } else {
-                    currentServer.alternateRelayAdv = relayAdv;
-                }
-            }
-            
-            notifyAll();
-            
-        } else if (RelayTransport.DISCONNECTED_RESPONSE.equals(response)) {
-            // Disconnect Response
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("disconnected from " + currentServer);
-            }
-            
-            // If our request was denied, the adv that came back is
-            // always an alternate one.
-            currentServer.alternateRelayAdv = relayAdv;
-            
-            if (currentServer.messenger != null) {
-                currentServer.messenger.close();
-            }
-            currentServer.messenger = null;
-            currentServer.peerId = null;
-            currentServer.leaseLength = 0;
-            currentServer.leaseObtainedAt = 0;
-            currentServer.relayAdv = null;
-            currentServer = null;
-            notifyAll();
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("response handled for " + currentServer);
-        }
-    }
-    
-    static class RelayServerConnection {
-        final RelayClient client;
-        
-        Messenger messenger = null;
-        EndpointAddress logicalAddress = null;
-        String peerId = null;
-        long leaseLength = 0;
-        long leaseObtainedAt = 0;
-        
-        // If seeded out of a raw address, we have relayAddress.
-        // relayAdv comes only later.
-        public RouteAdvertisement relayAdv = null;
-        EndpointAddress relayAddress = null;
-        
-        RdvAdvertisement alternateRelayAdv = null;
-        boolean seeded = false;
-        boolean flushNeeded = true; // true until we know it's been done
-        
-        protected RelayServerConnection(RelayClient client, EndpointAddress addr) {
-            this.client = client;
-            relayAddress = new EndpointAddress(addr, null, null);
-            seeded = true;
-        }
-        
-        protected RelayServerConnection(RelayClient client, RouteAdvertisement relayAdv) {
-            this.client = client;
-            this.relayAdv = relayAdv;
-        }
-        
-        protected boolean createMessenger(long leaseLengthToRequest) {
-            
-            // make sure the old messenger is closed
-            if (messenger != null) {
-                messenger.close();
-                messenger = null;
-            }
-            
-            List<String> endpointAddresses = null;
-            
-            // check for a relay advertisement
-            if (relayAdv != null) {
-                AccessPointAdvertisement accessPointAdv = relayAdv.getDest();
-                
-                if (accessPointAdv != null) {
-                    endpointAddresses = accessPointAdv.getVectorEndpointAddresses();
-                }
-            } else {
-                // silly but if we use getVetorEndpointAddresses, we get
-                // strings. It's realy simpler to have only one kind of obj
-                // inthere.
-                endpointAddresses = new ArrayList<String>(1);
-                endpointAddresses.add(relayAddress.toString());
-            }
-            
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("createMessenger to " + endpointAddresses);
-            }
-            
-            // make sure we found some endpoint addresses to try
-            if (endpointAddresses == null) {
-                return false;
-            }
-            
-            // try each endpoint address until one is successful
-            for (String s : endpointAddresses) {
-                if (s == null) {
-                    continue;
-                }
-                EndpointAddress addr = new EndpointAddress(s);
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("find transport for " + addr);
-                }
-                // get the list of messengers on this endpoint
-                Iterator transports = client.endpoint.getAllMessageTransports();
-
-                while (transports.hasNext() && messenger == null) {
-                    MessageTransport transport = (MessageTransport) transports.next();
-
-                    // only try transports that are senders and allow routing
-                    if (transport instanceof MessageSender && ((MessageSender) transport).allowsRouting()) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("try transport " + transport);
-                        }
-                        if (addr.getProtocolName().equals(transport.getProtocolName())) {
-                            // NOTE: here we're creating a messenger.
-                            // For risk management reason, we refrain from
-                            // including the flush request at this time in
-                            // this. There is the possibility that the
-                            // connection will be repeatedly established
-                            // by the transport in our bakck, and would keep
-                            // including the flush request ! Normaly this
-                            // does not matter because the server should
-                            // disregard it when it come in that way, but
-                            // still, let's be defensive. We will still send
-                            // the flush in a subsequent explicit message.
-                            String reqStr = RelayTransport.createConnectString(leaseLengthToRequest, relayAdv == null, false);
-                            // NOTE: this is simulating address mangling by CrossgroupMessenger.
-                            // The real service param is after the "/" in the below serviceParam arg.
-                            EndpointAddress addrToUse = new EndpointAddress(addr, "EndpointService:" + client.groupName
-                                    ,
-                                    client.serviceName + "/" + reqStr);
-
-                            messenger = ((MessageSender) transport).getMessenger(addrToUse, null);
-                            if (messenger != null && messenger.isClosed()) {
-                                messenger = null;
-                            }
-                            if (messenger != null) {
-                                logicalAddress = messenger.getLogicalDestinationAddress();
-                                // We're using a known adv, which means that
-                                // we did not ask to get the adv back.
-                                // Make sure that we do not keep going with
-                                // an adv for the wrong peer. That can happen.
-                                if (relayAdv != null && !addr2pid(logicalAddress).equals(relayAdv.getDestPeerID())) {
-                                    // oops, wrong guy !
-                                    messenger.close();
-                                    messenger = null;
-                                    logicalAddress = null;
-                                }
-                                // In case it was not given, set relayAddress
-                                // for toString purposes.
-                                relayAddress = addr;
-                            }
-                        }
-                    }
-                }
-            }
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("messenger=" + messenger);
-            }
-            
-            return (messenger != null);
-        }
-        
-        protected boolean sendConnectMessage(long leaseLengthToRequest) {
-            if (messenger == null || messenger.isClosed()) {
-                return false;
-            }
-            
-            Message message = RelayTransport.createConnectMessage(leaseLengthToRequest, (relayAdv == null), flushNeeded);
-            
-            try {
-                messenger.sendMessage(message, "EndpointService:" + client.groupName, client.serviceName + "/" + client.peerId);
-            } catch (IOException e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "could not send connect message", e);
-                }
-                
-                // connection attempt failed
-                return false;
-            }
-            
-            return true;
-        }
-        
-        protected boolean sendDisconnectMessage() {
-            if (messenger == null || messenger.isClosed()) {
-                return false;
-            }
-            
-            Message message = RelayTransport.createDisconnectMessage();
-            
-            try {
-                messenger.sendMessage(message, "EndpointService:" + client.groupName, client.serviceName + "/" + client.peerId);
-            } catch (IOException e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "could not send disconnect message", e);
-                }
-                
-                // connection attempt failed
-                return false;
-            }
-            
-            return true;
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        @Override
-        public String toString() {
-            
-            return
-                    ((relayAddress == null) ? "(adv to " + relayAdv.getDestPeerID() + ")" : relayAddress.toString()) + " ["
-                    + leaseLength + ", " + leaseObtainedAt + "] ";
-        }
-    }
-    
-    /**
-     * Register an active Relay to the endpoint. This is done
-     * so the Route Advertisement of the PeerAdvertisement is
-     * updated
-     */
-    public synchronized boolean addActiveRelayListener(Object service) {
-        
-        boolean added = false;
-        
-        if (!activeRelayListeners.contains(service)) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Register group to relay connection " + ((PeerGroup) service).getPeerGroupName());
-            }
-            
-            activeRelayListeners.add(service);
-            
-            added = true;
-        }
-        
-        return added;
-    }
-    
-    /**
-     * Unregister an active Relay to the endpoint. This is done
-     * so the Route Advertisement of the PeerAdvertisement is
-     * updated
-     */
-    public synchronized boolean removeActiveRelayListener(Object service) {
-        activeRelayListeners.remove(service);
-        
-        return true;
-    }
-    
-    /**
-     * Notify of a new relay connection
-     *
-     */
-    public synchronized boolean addActiveRelay(EndpointAddress address, RouteAdvertisement relayRoute) {
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("notify add relay connection for " + address);
-        }
-        
-        // need to notify all our listeners
-
-        for (Object activeRelayListener : activeRelayListeners) {
-            PeerGroup pg = (PeerGroup) activeRelayListener;
-            addRelay(pg, relayRoute);
-        }
-
-        // maintain the list of active relays
-        activeRelays.put(address, relayRoute);
-        return true;
-    }
-    
-    /**
-     * Notify of a relay connection removal
-     *
-     */
-    public synchronized boolean removeActiveRelay(EndpointAddress address, RouteAdvertisement relayRoute) {
-        
-        // need to notify all our listeners
-
-        for (Object activeRelayListener : activeRelayListeners) {
-            PeerGroup pg = (PeerGroup) activeRelayListener;
-            removeRelay(pg, relayRoute);
-        }
-
-        activeRelays.remove(address);
-        
-        return true;
-    }
-    
-    /**
-     * Register an active Relay to the endpoint. This is done
-     * so the Route Advertisement of the PeerAdvertisement is
-     * updated
-     *
-     * @param relayRoute address of the relay to add
-     */
-    private void addRelay(PeerGroup pg, RouteAdvertisement relayRoute) {
-        
-        ID assignedID = PeerGroup.endpointClassID;
-        
-        try {
-            // get the advertisement of the associated endpoint address as we
-            // need to get the peer Id and available route
-            
-            // update our own peer advertisement
-            PeerAdvertisement padv = pg.getPeerAdvertisement();
-            XMLDocument myParam = (XMLDocument) padv.getServiceParam(assignedID);
-            
-            RouteAdvertisement route;
-            
-            if (myParam == null) {
-                // we should have found a route here. This is not good
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("no route found in peer adv");
-                }
-                return;
-            } else {
-                Enumeration<XMLElement> paramChilds = myParam.getChildren(RouteAdvertisement.getAdvertisementType());
-                XMLElement param = null;
-                
-                if (paramChilds.hasMoreElements()) {
-                    param = paramChilds.nextElement();
-                }
-                
-                route = (RouteAdvertisement) AdvertisementFactory.newAdvertisement(param);
-            }
-            
-            if (route == null) { // we should have a route here
-                return;
-            }
-            
-            // ready to stich the Relay route in our route advertisement
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("found route info for local peer \n" + route.display());
-            }
-            
-            // update the new hops info
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("OLD route info to local peer \n" + route.display());
-            }
-            
-            // If we already have the relay in our list of hops, remove it.
-            // The new version can only be more accurate.
-            route.removeHop(relayRoute.getDestPeerID());
-            
-            // Get a hold of the hops list AFTER removing: removeHop
-            // rebuilds the vector !
-            Vector<AccessPointAdvertisement> hops = route.getVectorHops();
-            
-            // Create the new relay Hop
-            hops.add(relayRoute.getDest());
-            
-            // update the new hops info
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("NEW route info to local peer" + route.display());
-            }
-            
-            // create the new param route
-            myParam = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "Parm");
-            StructuredTextDocument xptDoc = (StructuredTextDocument)
-                    route.getDocument(MimeMediaType.XMLUTF8);
-            
-            StructuredDocumentUtils.copyElements(myParam, myParam, xptDoc);
-            
-            padv.putServiceParam(assignedID, myParam);
-            
-            // publish the new peer advertisement
-            DiscoveryService discovery = pg.getDiscoveryService();
-            
-            if (discovery != null) {
-                discovery.publish(padv, DiscoveryService.DEFAULT_LIFETIME, DiscoveryService.DEFAULT_EXPIRATION);
-            }
-        } catch (Exception ex) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "exception adding relay route ", ex);
-            }
-        }
-    }
-    
-    /**
-     * remove relay hop from the peer advertisement
-     *
-     * @param group which peer advertisement needs to be updated
-     * @param relayRoute address of the relay to be removed
-     */
-    private void removeRelay(PeerGroup group, RouteAdvertisement relayRoute) {
-        
-        // we can keep the advertisement for now (should remove it)
-        // remove the relay from its active list
-        ID assignedID = PeerGroup.endpointClassID;
-        PeerID relayPid = relayRoute.getDestPeerID();
-        
-        try {
-            // get the advertisement of the associated endpoint address as we
-            // need to get the peer Id and available route
-            
-            PeerAdvertisement padv;
-            
-            // update our peer advertisement
-            padv = group.getPeerAdvertisement();
-            XMLDocument myParam = (XMLDocument) padv.getServiceParam(assignedID);
-            
-            RouteAdvertisement route = null;
-            
-            if (myParam == null) {
-                // no route found we should really have one
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("no route found in peer adv");
-                    return;
-                }
-            } else {
-                Enumeration<XMLElement> paramChilds = myParam.getChildren(RouteAdvertisement.getAdvertisementType());
-                XMLElement param = null;
-                
-                if (paramChilds.hasMoreElements()) {
-                    param = paramChilds.nextElement();
-                }
-                
-                route = (RouteAdvertisement) AdvertisementFactory.newAdvertisement( param);
-            }
-            
-            if (route == null) {
-                return;
-            } // we should have a route here
-            
-            // update the new hops info
-            route.removeHop(relayPid);
-            
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("new route info to the peer" + route.display());
-            }
-            
-            // create the new param route
-            myParam = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "Parm");
-            XMLDocument xptDoc = (XMLDocument) route.getDocument(MimeMediaType.XMLUTF8);
-            
-            StructuredDocumentUtils.copyElements(myParam, myParam, xptDoc);
-            
-            padv.putServiceParam(assignedID, myParam);
-            
-            // publish the new advertisement
-            DiscoveryService discovery = group.getDiscoveryService();
-            
-            if (discovery != null) {
-                discovery.publish(padv, DiscoveryService.DEFAULT_LIFETIME, DiscoveryService.DEFAULT_EXPIRATION);
-            }
-        } catch (Throwable theMatter) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed adding relay route", theMatter);
-            }
-        }
-    }
-    
-    /**
-     * return the list of connected relays
-     */
-    public Vector<AccessPointAdvertisement> getActiveRelays(PeerGroup pg) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("get active Relays list");
-        }
-        
-        Vector<AccessPointAdvertisement> hops = new Vector<AccessPointAdvertisement>();
-
-        for (RouteAdvertisement route : activeRelays.values()) {
-            try {
-                // publish our route if pg is not null
-                if (pg != null) {
-                    DiscoveryService discovery = pg.getDiscoveryService();
-
-                    if (discovery != null) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("publishing route to active relay " + route.display());
-                        }
-                        discovery.publish(route, DEFAULT_EXPIRATION, DEFAULT_EXPIRATION);
-                    }
-                }
-            } catch (Exception ex) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "error publishing active relay", ex);
-                }
-                continue;
-            }
-
-            hops.add(route.getDest());
-        }
-
-        return hops;        
-    }
-    
-    // convert an endpointRouterAddress into a PeerID
-    private static PeerID addr2pid(EndpointAddress addr) {
-        try {
-            URI asURI = new URI(ID.URIEncodingName, ID.URNNamespace + ":" + addr.getProtocolAddress(), null);
-            
-            return (PeerID) IDFactory.fromURI(asURI);
-        } catch (Exception ex) {
-            return null;
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/relay/RelayReferralSeedingManager.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/relay/RelayReferralSeedingManager.java
deleted file mode 100644 (file)
index 3c3b3e2..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * Copyright (c) 2002-2004 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.endpoint.relay;
-
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.MessageTransport;
-import net.jxta.logging.Logging;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.protocol.RouteAdvertisement;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.impl.util.URISeedingManager;
-
-/**
- *  Extends the URI Seeding Manager by supplementing the list of active seeds
- *  with the active relay peers.
- */
-public class RelayReferralSeedingManager extends URISeedingManager {
-    
-    /**
-     * Logger
-     */
-    private static final transient Logger LOG = Logger.getLogger(RelayReferralSeedingManager.class.getName());
-
-    private final PeerGroup group;
-    
-    /**
-     *  Get an instance of RelayReferralSeedingManager.
-     *
-     * @param aclLocation acl URI
-     * @param allowOnlySeeds if <code>true</code> allow only seeds
-     * @param group the peer group
-     * @param serviceName Service name
-     */
-    public RelayReferralSeedingManager(URI aclLocation, boolean allowOnlySeeds, PeerGroup group, String serviceName) {
-        super(aclLocation, allowOnlySeeds, group, serviceName);
-        this.group = group;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public synchronized URI[] getActiveSeedURIs() {
-        Collection<URI> result = new ArrayList<URI>();
-        Collection<RouteAdvertisement> relays = getRelayPeers();
-        
-        int eaIndex = 0;
-        boolean addedEA;
-        
-        do {
-            addedEA = false;
-            
-            for (RouteAdvertisement aRA : relays) {
-                List<EndpointAddress> raEAs = aRA.getDestEndpointAddresses();
-                if (eaIndex < raEAs.size()) {
-                    URI seedURI = raEAs.get(eaIndex).toURI();
-                    if(!result.contains(seedURI)) {
-                        result.add(seedURI);
-                    }
-                    addedEA = true;
-                }
-            }
-            
-            // Next loop we use the next most preferred address.
-            eaIndex++;
-        } while (addedEA);
-        
-        // Add the non-relay seeds afterwards.
-        for(URI eachURI : Arrays.asList(super.getActiveSeedURIs())) {
-            if(!result.contains(eachURI)) {
-                result.add(eachURI);
-            }
-        }
-                
-        return result.toArray(new URI[result.size()]);
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public synchronized RouteAdvertisement[] getActiveSeedRoutes() {
-        List<RouteAdvertisement> result = new ArrayList<RouteAdvertisement>(getRelayPeers());
-        
-            for(RouteAdvertisement eachRoute : Arrays.asList(super.getActiveSeedRoutes())) {
-                if(!result.contains(eachRoute)) {
-                    result.add(eachRoute);
-                }
-            }
-        return result.toArray(new RouteAdvertisement[result.size()]);
-    }
-    
-    /**
-     *  @return List of RouteAdvertisement
-     */
-    private Collection<RouteAdvertisement> getRelayPeers() {
-        Collection<RouteAdvertisement> result = new ArrayList<RouteAdvertisement>();
-        
-        try {
-            EndpointService ep = group.getEndpointService();
-            
-            Iterator it = ep.getAllMessageTransports();
-            
-            while (it.hasNext()) {
-                MessageTransport mt = (MessageTransport) it.next();
-                
-                if (!mt.getEndpointService().getGroup().getPeerGroupID().equals(group.getPeerGroupID())) {
-                    // We only want relay services in this peer group.
-                    continue;
-                }
-                
-                if (mt instanceof RelayClient) {
-                    RelayClient er = (RelayClient) mt;
-                    
-                    RelayClient.RelayServerConnection current = er.currentServer;
-                    
-                    if (null == current) {
-                        continue;
-                    }
-                    
-                    RouteAdvertisement rdvAdv = current.relayAdv;
-
-                    if (null == rdvAdv) {
-                        continue;
-                    }
-
-                    result.add(rdvAdv.clone());
-                }
-            }
-        } catch (Exception ez1) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Unexpected error getting relays", ez1);
-            }
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Found " + result.size() + " relay seeds.");
-        }
-        return result;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/relay/RelayServer.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/relay/RelayServer.java
deleted file mode 100644 (file)
index c62b150..0000000
+++ /dev/null
@@ -1,1498 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.endpoint.relay;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.Random;
-
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.XMLDocument;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.MessageSender;
-import net.jxta.endpoint.Messenger;
-import net.jxta.endpoint.MessengerEvent;
-import net.jxta.endpoint.MessengerEventListener;
-import net.jxta.endpoint.TextDocumentMessageElement;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.impl.access.AccessList;
-import net.jxta.impl.protocol.RelayConfigAdv;
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.pipe.InputPipe;
-import net.jxta.pipe.OutputPipe;
-import net.jxta.pipe.PipeMsgEvent;
-import net.jxta.pipe.PipeMsgListener;
-import net.jxta.pipe.PipeService;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.PipeAdvertisement;
-import net.jxta.protocol.RdvAdvertisement;
-import net.jxta.protocol.RouteAdvertisement;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-import net.jxta.impl.endpoint.EndpointUtils;
-
-/**
- * Relay server that maintains outgoing message queues, leases, etc.
- */
-public class RelayServer implements MessageSender, MessengerEventListener, Runnable {
-    
-    /**
-     *  Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(RelayServer.class.getName());
-    
-    private final static int MAX_CACHED_SERVERS = 20;
-    
-    /**
-     * The EndpointService for the RelayService
-     */
-    private EndpointService endpointService;
-    
-    /**
-     * The DiscoveryService for the RelayService
-     */
-    private DiscoveryService discoveryService;
-    
-    /**
-     * The public address is of the form relay://peerId
-     */
-    private final EndpointAddress publicAddress;
-    
-    /**
-     *  Map of the current clients
-     */
-    private final Map<String, RelayServerClient> relayedClients = new HashMap<String, RelayServerClient>();
-    
-    protected final PeerGroup group;
-    protected final String serviceName;
-    private final int maxClients;
-    private final long maxLeaseDuration;
-    private final long stallTimeout;
-    private final int clientQueueSize;
-    private final long minBroadcastInterval;
-    
-    protected final String peerId;
-
-    protected final AccessList acl;
-    protected File aclFile;
-    protected long refreshTime = 0;
-
-    protected long aclFileLastModified = 0;
-    private static final long ACL_REFRESH_PERIOD = 30 * TimeUtils.AMINUTE;
-    
-    protected RelayServerCache relayServerCache;
-    
-    private Thread gcThread = null;
-
-    private MessengerEventListener messengerEventListener = null;
-    
-    /**
-     * constructor
-     */
-    public RelayServer(PeerGroup group, String serviceName, RelayConfigAdv relayConfigAdv) {
-        
-        this.group = group;
-        peerId = group.getPeerID().getUniqueValue().toString();
-        publicAddress = new EndpointAddress(RelayTransport.protocolName, peerId, null, null);
-        
-        this.serviceName = serviceName;
-        
-        this.maxClients = (-1 != relayConfigAdv.getMaxClients())
-                ? relayConfigAdv.getMaxClients()
-                : RelayTransport.DEFAULT_MAX_CLIENTS;
-        this.clientQueueSize = (-1 != relayConfigAdv.getClientMessageQueueSize())
-                ? relayConfigAdv.getClientMessageQueueSize()
-                : RelayTransport.DEFAULT_CLIENT_QUEUE_SIZE;
-        this.maxLeaseDuration = (-1 != relayConfigAdv.getServerLeaseDuration())
-                ? relayConfigAdv.getServerLeaseDuration()
-                : RelayTransport.DEFAULT_LEASE;
-        this.minBroadcastInterval = (-1 != relayConfigAdv.getAnnounceInterval())
-                ? relayConfigAdv.getAnnounceInterval()
-                : RelayTransport.DEFAULT_BROADCAST_INTERVAL;
-        this.stallTimeout = (-1 != relayConfigAdv.getStallTimeout())
-                ? relayConfigAdv.getStallTimeout()
-                : RelayTransport.DEFAULT_STALL_TIMEOUT;
-
-        aclFile = new File(new File(group.getStoreHome()), "relayACL.xml");
-        aclFileLastModified = aclFile.lastModified();
-        this.acl = new AccessList();
-        try {
-            acl.init(aclFile);
-            this.refreshTime = System.currentTimeMillis() + ACL_REFRESH_PERIOD;
-        } catch (IOException io) {
-            acl.setGrantAll(true);
-            this.refreshTime = Long.MAX_VALUE;
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("RelayServer Access Control granting all permissions");
-            }
-        }
-        
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring Relay Server");
-
-            configInfo.append("\n\tGroup Params :");
-            configInfo.append("\n\t\tGroup : ").append(group);
-            configInfo.append("\n\t\tPeer ID : ").append(group.getPeerID());
-
-            configInfo.append("\n\tConfiguration :");
-            configInfo.append("\n\t\tService Name : ").append(serviceName);
-            configInfo.append("\n\t\tMax Relay Clients : ").append(maxClients);
-            configInfo.append("\n\t\tMax Lease Length : ").append(maxLeaseDuration).append("ms.");
-            configInfo.append("\n\t\tBroadcast Interval : ").append(minBroadcastInterval).append("ms.");
-            configInfo.append("\n\t\tStall Timeout : ").append(stallTimeout).append("ms.");
-            
-            LOG.config(configInfo.toString());
-        }
-    }
-    
-    /**
-     * Debug routine: returns the list of relayedClients with details.
-     */
-    public List<String> getRelayedClients() {
-        List<String> res = new ArrayList<String>();
-
-        for (Object o : Arrays.asList(relayedClients.values().toArray())) {
-            String client = o.toString();
-
-            res.add(client);
-        }
-
-        return res;
-    }
-    
-    public boolean startServer() {
-        
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Starting " + publicAddress.toString());
-        }
-        
-        endpointService = group.getEndpointService();
-        discoveryService = group.getDiscoveryService();
-        
-        if ((messengerEventListener = endpointService.addMessageTransport(this)) == null) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("Transport registration refused");
-            }
-            return false;
-        }
-        
-        try {
-            discoveryService.publish(createRdvAdvertisement(group.getPeerAdvertisement(), serviceName));
-        } catch (IOException e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Could not publish Relay RdvAdvertisement", e);
-            }
-        }
-        
-        relayServerCache = new RelayServerCache(this);
-        
-        // start cache relay servers
-        relayServerCache.startCache();
-        
-        endpointService.addMessengerEventListener(this, EndpointService.HighPrecedence);
-        
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Relay Server started");
-        }
-        return true;
-    }
-
-    public void stopServer() {
-        // stop cache relay servers
-        relayServerCache.stopCache();
-        relayServerCache = null;
-        
-        // remove messenger events listener since we do not have any clients
-        endpointService.removeMessengerEventListener(this, EndpointService.HighPrecedence);
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Messenger Event Listener removed " + serviceName);
-        }
-        
-        // Close all clients.
-        // Get a list of the clients but leave them in the map;
-        // they remove themselves by calling removeClient(this).
-        // That's why we do not iterate through the real map to close them.
-        
-        RelayServerClient[] oldClients;
-        
-        synchronized (relayedClients) {
-            oldClients = relayedClients.values().toArray(new RelayServerClient[0]);
-        }
-        
-        int i = oldClients.length;
-        
-        while (i-- > 0) {
-            oldClients[i].closeClient();
-        }
-        
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Stopped " + publicAddress);
-        }        
-    }
-    
-    /*
-     * Methods inherited from MessageSender
-     */
-    
-    /**
-     * {@inheritDoc}
-     */
-    public EndpointAddress getPublicAddress() {
-        return publicAddress;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isConnectionOriented() {
-        return true;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public boolean allowsRouting() {
-        return true;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public Object transportControl(Object operation, Object Value) {
-        return null;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public Messenger getMessenger(EndpointAddress destAddr, Object hintIgnored) {
-        Messenger messenger = null;
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("getMessenger for dest " + destAddr);
-        }
-        
-        if (!RelayTransport.protocolName.equals(destAddr.getProtocolName())) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("could not make messenger for protocol :" + destAddr.getProtocolName());
-            }
-            
-            return null;
-        }
-        
-        // check if we have a queue for this client
-        RelayServerClient handler = getClient(destAddr.getProtocolAddress());
-        
-        if (handler != null) {
-            messenger = handler.getMessenger(publicAddress, destAddr, false);
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("messenger for " + destAddr.getProtocolAddress() + " is " + messenger);
-        }
-        
-        return messenger;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Deprecated
-    public boolean ping(EndpointAddress addr) {
-        
-        synchronized (relayedClients) {
-            return (null != relayedClients.get(addr.getProtocolAddress()));
-        }
-    }
-    
-    /*
-     * Methods inherited from MessageTransport
-     */
-    
-    /**
-     * {@inheritDoc}
-     */
-    public String getProtocolName() {
-        return RelayTransport.protocolName;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public EndpointService getEndpointService() {
-        return endpointService;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public boolean messengerReady(MessengerEvent event) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("messengerReady");
-        }
-        
-        Messenger newMessenger = event.getMessenger();
-        Object source = event.getSource();
-        EndpointAddress connectionAddress = event.getConnectionAddress();
-        
-        // Sanity check, this should not happen
-        if (newMessenger == null || source == null || connectionAddress == null) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("there was not a messenger or not enough information");
-            }
-            
-            return false;
-        }
-        
-        // We do not grab just any messenger; that would replace the
-        // existing one and then we could have a fight between the
-        // front channel and the back channel from the same peer.
-        // We only grab back-channel messengers that where explicitly
-        // directed to the relay.
-        if (!serviceName.equals(connectionAddress.getServiceName())) {
-            return false;
-        }
-        
-        // make sure that it is not a higher level messenger
-        if (source instanceof MessageSender && !((MessageSender) source).allowsRouting()) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("this is a higher level messenger");
-            }
-            
-            return false;
-        }
-        
-        // make sure that this is not one of our own.
-        if (source == this || newMessenger instanceof RelayServerClient.RelayMessenger) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("this is a relay messenger");
-            }
-            
-            return false;
-        }
-        
-        // make sure that the messenger matches a possible client address
-        EndpointAddress destAddr = newMessenger.getLogicalDestinationAddress();
-        
-        if (destAddr == null || !"jxta".equals(destAddr.getProtocolName())) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("LogicalDestinationAddress is not a \"jxta\" protocol");
-            }
-            
-            return false;
-        }
-        
-        // check if we have a queue for this client
-        // In that case, we just give it the handler and be done.
-        // We must not process the lease request that comes with a messenger
-        // for an existing client. If we did, we would reply with a lease
-        // response. Some connections can carry only one message and then
-        // close. In that case, the client has to re-establish the connection
-        // every time we respond. So, if we repond to all incoming connections
-        // we're going nowhere. In some cases, the client realy wants a
-        // response because it believes it is an initial connection while
-        // we still have it from a previous session. In that case, the client
-        // must try to send an explicit lease renewal message. (To which
-        // we do respond).
-        
-        String clientPeerId = destAddr.getProtocolAddress();
-        RelayServerClient handler = getClient(clientPeerId);
-        
-        if (handler != null) {
-            return handler.addMessenger(newMessenger);
-        }
-        
-        // Non-existent client. We want to process the
-        // connection request and respond.
-        // handleRequest may do whatever, but we always keep the
-        // messenger. It was meant for us anyway.
-        handleRequest(newMessenger, connectionAddress);
-        return true;
-    }
-
-    protected void handleRequest(Messenger messenger, EndpointAddress connectionAddress) {
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("handleRequest from messenger");
-        }
-        
-        // In this case, the request comes within the messenger's destination.
-        String request = connectionAddress.getServiceParameter();
-        
-        // make sure that the messenger shows a client logical address
-        EndpointAddress clientAddr = messenger.getLogicalDestinationAddress();
-        
-        if (clientAddr == null || !"jxta".equals(clientAddr.getProtocolName())) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("LogicalDestinationAddress is not a \"jxta\" protocol");
-            }
-            
-            return;
-        }
-        
-        String clientPeerId = clientAddr.getProtocolAddress();
-        
-        handleRequest(request, clientPeerId, messenger);
-    }
-    
-    protected void handleRequest(Message message, EndpointAddress dstAddr) {
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("handleRequest from message");
-        }
-        
-        String request = RelayTransport.getString(message, RelayTransport.REQUEST_ELEMENT);
-        String clientPeerId = dstAddr.getServiceParameter();
-        
-        handleRequest(request, clientPeerId, null);
-    }
-    
-    void handleRequest(String request, String clientPeerId, Messenger messenger) {
-        // This request may come along with a messenger (if it is a renewal
-        // post-disconnection or an initial lease request).
-        
-        if (request == null) {
-            return;
-        }
-        
-        request = request.toLowerCase();
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("request = " + request);
-        }
-        
-        // only process the request if a client peer id was sent
-        if (clientPeerId == null) {
-            return;
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("clientPeerId = " + clientPeerId);
-        }
-        
-        // The only valid anonymous request is a request to obtain a real pid.
-        if ((clientPeerId.equals("unknown-unknown")) && (!request.startsWith(RelayTransport.PID_REQUEST))) {   
-            return;
-        }
-        
-        Message responseMessage = null;
-        
-        RelayServerClient closingHandler = null;
-        boolean rawMessenger = false;
-        boolean closeMessenger = false;
-        
-        // Figure out which request it is
-        if (request.startsWith(RelayTransport.CONNECT_REQUEST)) {
-            // Connect Request
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("connect clientPeerId = " + clientPeerId);
-            }
-            
-            long requestedLease = maxLeaseDuration;
-            boolean returnRelayAdv = false;
-            boolean returnOtherRelayAdv = false;
-            boolean flushQueue = false;
-            
-            String requestedLeaseString = null;
-            
-            // check if a lease value was specified
-            int startIdx = request.indexOf(',');
-            
-            if (startIdx != -1) {
-                // find the end of the lease value
-                int endIdx = request.indexOf(',', startIdx + 1);
-                
-                if (endIdx == -1) {
-                    requestedLeaseString = request.substring(startIdx + 1);
-                } else {
-                    requestedLeaseString = request.substring(startIdx + 1, endIdx);
-                    String flags = request.substring(endIdx + 1);
-                    
-                    if (flags.endsWith("true")) {
-                        returnRelayAdv = true;
-                    } else if (flags.endsWith("other")) {
-                        // This is an addition to the protocol. Newer
-                        // clients will always set that in connection requests
-                        // when not setting true. Only older clients use to
-                        // set nothing at all.
-                        returnOtherRelayAdv = true;
-                    }
-                    // Only two flag positions for now
-                    // The inserted first position is another extention.
-                    // Only newer clients use it. Older servers will not
-                    // notice it because they only check how the request ends.
-                    // So, new clients are also compatible with old servers.
-                    if (flags.startsWith("flush")) {
-                        flushQueue = true;
-                    }
-                }
-            }
-            
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(
-                        "request lease string = " + requestedLeaseString + "\treturn relay adv = " + returnRelayAdv
-                        + "\n\treturn other relay adv = " + returnOtherRelayAdv + "\tflush queue = " + flushQueue);
-            }
-            
-            if (requestedLeaseString != null) {
-                try {
-                    requestedLease = Long.parseLong(requestedLeaseString);
-                } catch (NumberFormatException e) {
-                    if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                        LOG.info("could not parse requested lease string");
-                    }
-                }
-                
-                if (requestedLease > maxLeaseDuration) {
-                    requestedLease = maxLeaseDuration;
-                }
-            }
-            
-            // process the connect request
-            EndpointAddress clientAddr = new EndpointAddress("jxta", clientPeerId, serviceName, peerId);
-            
-            // If we have a messenger, the clientHandler gets it.
-            // If the client handler did not already exist, it will be
-            // created only if we pass a messenger. We can no-longer create
-            // new clients without an incoming messenger. We used to get one
-            // from the router but no-longer. Now initial lease requests must
-            // come as part of the messenger creation.
-            
-            RelayServerClient handler = addClient(clientPeerId, requestedLease, messenger, flushQueue);
-            
-            if (handler != null) {
-                
-                // the client was added, send a connected response
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("added client " + clientPeerId);
-                }
-                
-                // Now get a messenger that goes through the handler and
-                // sends messages out-of-band (and internal perk).
-                // jice@jxta.org - 20021227 all this code is getting ridiculous
-                // it has to be re-organized. Addind the outOfBand feature
-                // to all RelayMessengers just for that is overkill. This
-                // just a temporary patch. The real fix would be to respond
-                // straight with the messenger we have. Unfortunately, sometimes
-                // we have to respond without a messenger in our hands because
-                // sending a message over an explicit connection is the only
-                // way for existing clients to ask for a response when they
-                // reconnect. We would need to change the protocol and add an
-                // "initial connection" request type to fix that.
-                
-                messenger = handler.getMessenger(publicAddress, clientAddr, true);
-                responseMessage = RelayTransport.createConnectedMessage(handler.getLeaseRemaining());
-                // For protocol compatibility reasons, returnRelayAdv realy
-                // means "return your own because I do not know it".
-                // If returnOtherRelayAdv is true, then, we will return one
-                // selected among those we know, for the enlightenment of the
-                // other party.
-                // If neither is true, we'll return no adv at all in order not
-                // to confuse existing clients.
-                
-                RdvAdvertisement relayAdv = null;
-                
-                if (returnRelayAdv) {
-                    relayAdv = createRdvAdvertisement(group.getPeerAdvertisement(), serviceName);
-                } else if (returnOtherRelayAdv) {
-                    relayAdv = relayServerCache.getRandomCacheAdv();
-                }
-                if (relayAdv != null) {
-                    XMLDocument asDoc = (XMLDocument) relayAdv.getDocument(MimeMediaType.XMLUTF8);
-                    
-                    MessageElement relayAdvElement = new TextDocumentMessageElement(RelayTransport.RELAY_ADV_ELEMENT, asDoc, null);
-
-                    responseMessage.addMessageElement(RelayTransport.RELAY_NS, relayAdvElement);
-                }
-            } else {
-                // We can't keep the messenger.
-                // the client was not added, send a disconnected response
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("could not add client " + clientPeerId);
-                }
-                
-                // We do not get a messenger for ourselves here, so
-                // just get one from the router ourselves, if we have to.
-                // and can.
-                if (messenger == null) {
-                    // If we did not get one and manage to obtain one
-                    // from the endpoint, we can use it in-line, but
-                    // we must close it. (The only case).
-                    messenger = endpointService.getMessenger(clientAddr);
-                    if (messenger != null) {
-                        closeMessenger = true;
-                    }
-                    
-                } else {
-                    
-                    // This is the incoming messenger. We cannot use it
-                    // synchronously. See, the use of BGSend, below.
-                    
-                    rawMessenger = true;
-                }
-                
-                responseMessage = RelayTransport.createDisconnectedMessage();
-                
-                // add the relay advertisement of another know relay for the client to try
-                RdvAdvertisement relayAdv = relayServerCache.getRandomCacheAdv();
-                
-                if (relayAdv != null) {
-                    XMLDocument asDoc = (XMLDocument) relayAdv.getDocument(MimeMediaType.XMLUTF8);
-                    
-                    MessageElement relayAdvElement = new TextDocumentMessageElement(RelayTransport.RELAY_ADV_ELEMENT, asDoc, null);
-
-                    responseMessage.addMessageElement(RelayTransport.RELAY_NS, relayAdvElement);
-                }
-            }
-        } else if (RelayTransport.DISCONNECT_REQUEST.equals(request)) {
-            // Disconnect Request, don't send a response
-            if (clientPeerId != null) {
-                closingHandler = removeClient(clientPeerId);
-                if (closingHandler != null) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("removed client " + clientPeerId);
-                    }
-                }
-            }
-        } else if (RelayTransport.PID_REQUEST.equals(request)) {
-            
-            // Generate a PeerID in the same group as our PeerID.
-            // The group which my peerID stems from is not necessarily
-            // the group where I am running (more likely it is the net peer
-            // group). Rather than guessing, get the group from our own PID.
-            
-            PeerGroupID groupOfMyPid = (PeerGroupID) group.getPeerID().getPeerGroupID();
-            
-            String pidStr = IDFactory.newPeerID(groupOfMyPid).toString();
-            
-            responseMessage = RelayTransport.createPIDResponseMessage(pidStr);
-            
-            // If there is a raw incoming messenger, that's what we
-            // use. Else, we won't respond.
-            rawMessenger = true;
-        }
-        
-        // if there is a messenger and a response, send it
-        if (messenger != null && responseMessage != null) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("sending response to client " + clientPeerId);
-            }
-            
-            // If rawMessenger, then this is the incoming
-            // messenger brought in by messengerReady. In that case,
-            // be carefull. It is synchronous and it could block this
-            // here thread until the message can be sent. Which could
-            // possibly imply that this here method returns...dead lock.
-            // See HttpMessageServlet: messengerReady is called by
-            // the same thread that subsequently picks up messages from
-            // the BCMessenger. So, spawn a thread to reply.
-            // FIXME: eventualy we should start replacing some listener
-            // based code with state machines and event queues.
-            
-            if (rawMessenger) {
-                
-                // BGSend will *not* close the messenger after use
-                // Because incoming messengers do not need to be closed.
-                new BGSend(messenger, responseMessage, serviceName, peerId);
-            } else {
-                try {
-                    messenger.sendMessage(responseMessage, serviceName, peerId);
-                } catch (IOException e) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Could not send response message to " + clientPeerId, e);
-                    }
-                }
-            }
-        }
-        
-        if (closeMessenger) {
-            messenger.close();
-        }
-        
-        if (closingHandler != null) {
-            closingHandler.closeClient();
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("relayedClients.size()=" + relayedClients.size());
-        }
-    }
-    
-    private RelayServerClient getClient(String clientPeerId) {
-        RelayServerClient handler;
-        
-        synchronized (relayedClients) {
-            handler = relayedClients.get(clientPeerId);
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("getClient(" + clientPeerId + ") = " + handler);
-        }
-        
-        return handler;
-    }
-    
-    // Add client is idempotent. It can be called for a client that already
-    // exists. The flushqueue option instructs to clear the queue if the client
-    // exists.
-    private RelayServerClient addClient(String clientPeerId, long requestedLease, Messenger messenger, boolean flushQueue) {
-        RelayServerClient handler;
-        boolean isNewClient = false;
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("addClient(" + clientPeerId + ")");
-        }
-        
-        synchronized (relayedClients) {
-            // check if this client is already registered
-            handler = relayedClients.get(clientPeerId);
-            if (handler == null) {
-                // make sure the maximum number of clients has not been reached
-                // and make sure that we have a messenger to give to the new
-                // clientHandler.
-                if ((relayedClients.size() < maxClients) && (messenger != null) && !messenger.isClosed()) {
-                    
-                    // create a new handler
-                    handler = new RelayServerClient(this, clientPeerId, requestedLease, stallTimeout, clientQueueSize);
-                    
-                    // add the handler to the list
-                    relayedClients.put(clientPeerId, handler);
-                    isNewClient = true;
-                    
-                    // check if this is the first client added
-                    if (relayedClients.size() == 1) {
-                        // start the gcThread if it is not already started
-                        if (gcThread == null) {
-                            gcThread = new Thread(group.getHomeThreadGroup(), this, "GC Thread for Relay at " + publicAddress);
-                            gcThread.setDaemon(true);
-                            gcThread.start();
-                        }
-                    }
-                } else {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine(
-                                "new client denied. nb clients: " + relayedClients.size() + "/" + maxClients + ", messenger: "
-                                + messenger);
-                    }
-                }
-            }
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("added = " + (handler != null));
-        }
-        
-        if (handler == null) {
-            return null;
-        }
-        
-        // renew the lease on the old handler
-        // Watchout. The handler might have expired since we got it from the
-        // map. RenewLease will tell us. In that case, tough luck. We don't
-        // make a new one. FIXME: it's not nice to the client, but in no way
-        // a disaster (and very rare).
-        
-        if (!handler.renewLease()) {
-            return null;
-        }
-        
-        if (flushQueue) {
-            handler.flushQueue();
-        }
-        
-        if (messenger != null) {
-            handler.addMessenger(messenger);
-            
-            // We must force the router to learn the new relay connection as
-            // a direct route, so that it replies to route queries even if we
-            // never start talking to the client otherwise.
-            // Here we do something rather acrobatic. We invoke messengerReady
-            // recursively with a new relay messenger that the router will
-            // catch as if it where an incoming messenger (which it is, sort
-            // of). The cleaner alternative: call getMessenger with a hint
-            // causes too much commotion: sometimes an unreachable tcp address
-            // is tried before the hint, which blocks getMessenger for long.
-            
-            if (isNewClient) {
-                EndpointAddress ear = new EndpointAddress(RelayTransport.protocolName, clientPeerId, null, null);
-                
-                MessengerEvent me = new MessengerEvent(this, handler.getMessenger(publicAddress, ear, false), null);
-                
-                messengerEventListener.messengerReady(me);
-            }
-        }
-        
-        return handler;
-    }
-    
-    private RelayServerClient removeClient(String clientPeerId) {
-        RelayServerClient handler;
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("removeClient(" + clientPeerId + ")");
-        }
-        
-        synchronized (relayedClients) {
-            handler = relayedClients.remove(clientPeerId);
-            
-            // check if there are any clients
-            if (relayedClients.size() == 0) {
-                // stop the gcThread
-                if (gcThread != null) {
-                    try {
-                        gcThread.interrupt();
-                    } catch (SecurityException e) {
-                        // ignore this exception
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine(e.toString());
-                        }
-                    }
-                }
-            }
-        }
-        
-        return handler;
-    }
-    
-    // this is only used by the RelayServerClient when it is closing and needs to remove itself
-    protected void removeClient(String clientPeerId, RelayServerClient handler) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("removeClient(" + clientPeerId + "," + handler + ")");
-        }
-        
-        synchronized (relayedClients) {
-            RelayServerClient currentHandler = relayedClients.get(clientPeerId);
-            
-            // only remove the client if the current handler matches the passed one
-            if (currentHandler == handler) {
-                relayedClients.remove(clientPeerId);
-            }
-            
-            // check if there are any clients
-            if (relayedClients.size() == 0) {
-                // stop the gcThread
-                Thread temp = gcThread;
-                
-                if (temp != null) {
-                    try {
-                        temp.interrupt();
-                    } catch (SecurityException e) {
-                        // ignore this exception
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine(e.toString());
-                        }
-                    }
-                }
-            }
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public void run() {
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Starting lease gc thread");
-        }
-        
-        try {
-            while (true) {
-                // check if there are any client handlers left
-                synchronized (relayedClients) {
-                    if (relayedClients.size() == 0) {
-                        break;
-                    }
-                }
-                
-                // do the lease gc
-                doClientGC();
-                
-                // check if there are any client handlers left
-                synchronized (relayedClients) {
-                    if (relayedClients.size() == 0) {
-                        break;
-                    }
-                }
-                
-                // sleep for a while.
-                try {
-                    Thread.sleep(stallTimeout);
-                } catch (InterruptedException e) {
-                    Thread.interrupted();
-                }
-            }
-        } catch (Throwable all) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Uncaught Throwable in thread :" + Thread.currentThread().getName(), all);
-            }
-        } finally {
-            gcThread = null;
-            
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("stopping lease gc thread");
-            }
-        }
-    }
-    
-    // checks for expired client handlers
-    private void doClientGC() {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("start: check for expired client handler. # clients = " + relayedClients.size());
-        }
-        
-        // get a snapshot of the client handlers
-        RelayServerClient[] handlers;
-        
-        synchronized (relayedClients) {
-            handlers = relayedClients.values().toArray(new RelayServerClient[0]);
-        }
-        
-        // run through the client handlers
-        int i = handlers.length;
-        
-        while (i-- > 0) {
-            try {
-                // simply calling isExpired will cause the handler to check
-                // if it is expired and remove itself if expired
-                handlers[i].isExpired();
-            } catch (Exception e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Exception during client gc", e);
-                }
-            }
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("stop: check for expired client handler. # clients = " + relayedClients.size());
-        }
-    }
-    
-    private static class RelayServerCache implements PipeMsgListener, Runnable {
-        final static ID pipeID = ID.create(
-                URI.create("urn:jxta:uuid-59616261646162614E50472050325033DEADBEEFDEAFBABAFEEDBABE0000000F04"));
-        
-        final RelayServer server;
-        final PipeAdvertisement pipeAdv;
-        InputPipe inputPipe = null;
-        
-        volatile boolean doRun = false;
-        Thread cacheThread = null;
-        
-        final Map<String, RdvAdvertisement> relayAdvCache = new HashMap<String, RdvAdvertisement>();
-        
-        final Random rand = new Random();
-        
-        protected RelayServerCache(RelayServer server) {
-            this.server = server;
-            
-            pipeAdv = (PipeAdvertisement) AdvertisementFactory.newAdvertisement(PipeAdvertisement.getAdvertisementType());
-            pipeAdv.setPipeID(pipeID);
-            pipeAdv.setType(PipeService.PropagateType);
-        }
-        
-        private int relayAdvCacheSize() {
-            synchronized (relayAdvCache) {
-                return relayAdvCache.size();
-            }
-        }
-        
-        protected RdvAdvertisement getRandomCacheAdv() {
-            synchronized (relayAdvCache) {
-                RdvAdvertisement[] items = relayAdvCache.values().toArray(new RdvAdvertisement[0]);
-                
-                if (items.length == 0) {
-                    return null;
-                }
-                
-                return items[rand.nextInt(items.length)];
-            }
-        }
-        
-        private boolean putCacheAdv(String peerId, RdvAdvertisement adv) {
-            if (!server.acl.isAllowed(adv.getPeerID())) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Rejected cache entry for : " + peerId);
-                }
-                return false;
-            }
-            synchronized (relayAdvCache) {
-                boolean replaced = (null != relayAdvCache.put(peerId, adv));
-                
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine((replaced ? "Updated" : "Created") + " cache entry for : " + peerId);
-                }
-                
-                if (relayAdvCache.size() >= MAX_CACHED_SERVERS) {
-                    // New entry and map full. Remove one at random.
-                    String[] keys = relayAdvCache.keySet().toArray(new String[0]);
-                    
-                    relayAdvCache.remove(keys[rand.nextInt(keys.length)]);
-                }
-                
-                return replaced;
-            }
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        public void pipeMsgEvent(PipeMsgEvent event) {
-            Message message = event.getMessage();
-            
-            if (message == null) {
-                return;
-            }
-            
-            boolean isResponse = (RelayTransport.getString(message, RelayTransport.RESPONSE_ELEMENT) != null);
-            String peerId = RelayTransport.getString(message, RelayTransport.PEERID_ELEMENT);
-            
-            if (peerId == null || peerId.equals(server.peerId)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("pipeMsgEvent() discarding message no response PID defined, or loopback ");
-                }
-                return;
-            }
-            
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("pipeMsgEvent() from " + peerId);
-            }
-            
-            MessageElement me = message.getMessageElement(RelayTransport.RELAY_NS, RelayTransport.RELAY_ADV_ELEMENT);
-            
-            if (null == me) {
-                return;
-            }
-            
-            Advertisement adv;
-            try {
-                // XXX bondolo 20041207 Force parsing of MessageElement as 
-                // XMLUTF8 rather than the actual mime type associated with the
-                // MessageElement since the advertisement is often incorrectly
-                // stored as a String by older JXTA implementations.
-                adv = AdvertisementFactory.newAdvertisement(MimeMediaType.XMLUTF8, me.getStream());
-            } catch (IOException failed) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failed building relay advertisement", failed);
-                }
-                return;
-            } catch (NoSuchElementException failed) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Could not build relay advertisement", failed);
-                }
-                return;
-            }
-            
-            if (!(adv instanceof RdvAdvertisement)) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Response does not contain relay advertisement (" + adv.getAdvType() + ")");
-                }
-                return;
-            }
-            
-            RdvAdvertisement radv = (RdvAdvertisement) adv;
-            
-            if (putCacheAdv(peerId, radv)) {
-                
-                // New entry, we might want to respond.
-                // "someone" should respond; on average, one response
-                // is all we want. And that response obviously should be
-                // unicast.
-                // We achieve an approximation of that by making a computation
-                // that will result in "true" on average on only one peer
-                // of the set, based on our idea of what the set is.
-                // If we know very few other relays compared to what other
-                // relays know, we are more likely to respond than they are.
-                // So this is very approximate. We want to keep it simple
-                // until we have time replace this lazy junk with something
-                // sensible.
-                
-                // If it's a response already, the story stops here !
-                if (isResponse) {
-                    return;
-                }
-                
-                // Here we go:
-                int i = relayAdvCacheSize();
-                long magic = server.peerId.hashCode() % i;
-                
-                if (rand.nextInt(i) == magic) {
-                    
-                    // Our number came out. Respond.
-                    
-                    // See if we have amunition to respond anyway.
-                    // Very defensive. I care a lot more not to break anything
-                    // at this stage, than to have optimal functionality.
-                    
-                    RdvAdvertisement myAdv = RelayServer.createRdvAdvertisement(server.group.getPeerAdvertisement(), server.serviceName);
-
-                    // Need to convert the other party's string pid into
-                    // a real pid.
-                    PeerID otherPid = null;
-                    try {
-                        otherPid = (PeerID) IDFactory.fromURI(new URI(ID.URIEncodingName, ID.URNNamespace + ":" + peerId, null));
-                    } catch (Exception ex) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.log(Level.WARNING, "Bad peerid : " + peerId, ex);
-                        }
-                        
-                    }
-
-                    PipeService pipeService = server.group.getPipeService();
-                    if (pipeService == null) {
-                        return; // Funny. We're receiving messages, after all.
-                    }
-                    
-                    // FIXME: jice@jxta.org 20030131 - We're making a rather
-                    // unorthodox use of the peer-subset feature of propagate
-                    // pipes. Basically what this does is to send the message
-                    // in unicast so that it is received on the propagate
-                    // input pipe of the specified peer.
-                    // The correct API, if it existed, would be respond().
-                    
-                    OutputPipe retPipe = null;
-                    try {
-                        retPipe = pipeService.createOutputPipe(pipeAdv, Collections.singleton(otherPid), 2 * TimeUtils.ASECOND);
-                        if (retPipe == null) {
-                            return;
-                        }
-                        
-                        // create a new cache message
-                        message = new Message();
-                        
-                        // String version of unique portion only. Per the protocol.
-                        RelayTransport.setString(message, RelayTransport.PEERID_ELEMENT, server.peerId);
-                        // Our own adv.
-                        RelayTransport.setString(message, RelayTransport.RELAY_ADV_ELEMENT, myAdv.toString());
-                        
-                        // This is a response. New servers: do not respond! Old
-                        // servers won't respond anyway.
-                        RelayTransport.setString(message, RelayTransport.RESPONSE_ELEMENT, "t");
-                        
-                        retPipe.send(message);
-                        
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Responded");
-                        }
-                        
-                    } catch (IOException e) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.log(Level.FINE, "Could not send reply on pipe ", e);
-                        }
-                    }
-                    
-                    if (retPipe != null) {
-                        retPipe.close();
-                    }
-                }
-            }
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        public void run() {
-            try {
-                OutputPipe outputPipe = null;
-                PipeService pipeService = server.group.getPipeService();
-                
-                while (doRun && inputPipe == null) {
-                    try {
-                        inputPipe = pipeService.createInputPipe(pipeAdv, this);
-                    } catch (IOException e) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Could not create input pipe, try again");
-                        }
-                    } catch (IllegalStateException e) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Pipe Service not ready yet, try again");
-                        }
-                    }
-                    
-                    try {
-                        Thread.sleep(TimeUtils.ASECOND);
-                    } catch (InterruptedException e) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("wait interrupted");
-                        }
-                    }
-                }
-                
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Created input pipe");
-                }
-                
-                while (doRun && outputPipe == null) {
-                    try {
-                        outputPipe = pipeService.createOutputPipe(pipeAdv, 5 * TimeUtils.ASECOND);
-                    } catch (IOException e) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Could not create output pipe, try again");
-                        }
-                    } catch (IllegalStateException e) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Pipe Service not ready yet, try again");
-                        }
-                    }
-                    
-                    try {
-                        Thread.sleep(TimeUtils.ASECOND);
-                    } catch (InterruptedException e) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("wait interrupted ");
-                        }
-                    }
-                }
-                
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Created output pipe");
-                }
-                
-                // Wait a little before mcasting our hello.
-                // We depend on the rendezvous infrastructure for it to
-                // work. It's pretty important to get the first one out
-                // so that we may get a response from others. After that
-                // the interval is very long (and its computation an total
-                // nonsense) and so others do not talk much
-                // either. We want to learn at least one other relay early on.
-                // FIXME: jice@jxta.org 20030131 - We realy need to switch to
-                // using peerview. It does all of that correctly.
-                
-                try {
-                    Thread.sleep(10 * TimeUtils.ASECOND);
-                } catch (InterruptedException e) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("wait interrupted");
-                    }
-                }
-                
-                while (doRun) {
-                    RdvAdvertisement adv = RelayServer.createRdvAdvertisement(server.group.getPeerAdvertisement(), server.serviceName);
-                    
-                    // Make sure that the version that can be discovered
-                    // is consistent.
-                    try {
-                        server.discoveryService.publish(adv);
-                    } catch (IOException e) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.log(Level.FINE, "Could not publish Relay RdvAdvertisement", e);
-                        }
-                    }
-                    
-                    if (adv != null) {
-                        // create a new cache message
-                        Message message = new Message();
-                        
-                        RelayTransport.setString(message, RelayTransport.PEERID_ELEMENT, server.peerId);
-                        RelayTransport.setString(message, RelayTransport.RELAY_ADV_ELEMENT, adv.toString());
-                        
-                        try {
-                            outputPipe.send(message);
-                        } catch (IOException e) {
-                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                LOG.log(Level.FINE, "Could not send message on pipe ", e);
-                            }
-                        }
-                    }
-                    
-                    long sleepTime = server.minBroadcastInterval
-                            + ((server.relayedClients.size() + 1) * 100 / (server.maxClients + 1)) * server.minBroadcastInterval;
-                    
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("sleepTime=" + sleepTime);
-                    }
-                    
-                    try {
-                        Thread.sleep(sleepTime);
-                    } catch (InterruptedException e) {
-                        Thread.interrupted();
-                    }
-                }
-                outputPipe.close();
-                if (System.currentTimeMillis() > server.refreshTime) {
-                    server.refreshTime = System.currentTimeMillis() + ACL_REFRESH_PERIOD;
-                    if (server.aclFile.lastModified() > server.aclFileLastModified) {
-                        server.aclFileLastModified = server.aclFile.lastModified();
-                        server.acl.refresh(server.aclFile);
-                    }
-                }
-            } catch (Throwable all) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Uncaught Throwable in thread :" + Thread.currentThread().getName(), all);
-                }
-            } finally {
-                cacheThread = null;
-                if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                    LOG.info("Cache thread quitting.");
-                }
-            }
-        }
-        
-        protected void startCache() {
-            doRun = true;
-            cacheThread = new Thread(server.group.getHomeThreadGroup(), this, "RelayCache Worker Thread for " + server.publicAddress);
-            cacheThread.setDaemon(true);
-            cacheThread.start();
-        }
-        
-        protected void stopCache() {
-            doRun = false;
-            
-            if (inputPipe != null) {
-                inputPipe.close();
-                inputPipe = null;
-            }
-            cacheThread.interrupt();
-        }
-    }
-    
-
-    /**
-     *  Sends a message on an synchronous messenger.
-     */
-    static class BGSend extends Thread {
-        
-        Messenger mr;
-        Message ms;
-        String sn;
-        String ps;
-        
-        BGSend(Messenger mr, Message ms, String sn, String ps) {
-            super("Relay Background Sender");
-            this.mr = mr;
-            this.ms = ms;
-            this.sn = sn;
-            this.ps = ps;
-            setDaemon(true);
-            start();
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        @Override
-        public void run() {
-            try {
-                mr.sendMessage(ms, sn, ps);
-            } catch (IOException e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failed sending response " + ms + " to " + ps, e);
-                }
-            } catch (Throwable all) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Uncaught Throwable in thread :" + Thread.currentThread().getName(), all);
-                }
-            }
-            
-        }
-    }
-    
-    private static RdvAdvertisement createRdvAdvertisement(PeerAdvertisement padv, String name) {
-        try {
-            // FIX ME: 10/19/2002 lomax@jxta.org. We need to properly set up the service ID. Unfortunately
-            // this current implementation of the PeerView takes a String as a service name and not its ID.
-            // Since currently, there is only PeerView per group (all peerviews share the same "service", this
-            // is not a problem, but that will have to be fixed eventually.
-            
-            // create a new RdvAdvertisement
-            RdvAdvertisement rdv = (RdvAdvertisement) AdvertisementFactory.newAdvertisement(
-                    RdvAdvertisement.getAdvertisementType());
-            
-            rdv.setPeerID(padv.getPeerID());
-            rdv.setGroupID(padv.getPeerGroupID());
-            rdv.setServiceName(name);
-            rdv.setName(padv.getName());
-            
-            RouteAdvertisement ra = EndpointUtils.extractRouteAdv(padv);
-            
-            if (null == ra) {
-                // No route available
-                return null;
-            }
-            
-            // Insert it into the RdvAdvertisement.
-            rdv.setRouteAdv(ra);
-            
-            return rdv;
-        } catch (Exception ez) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Cannot create Local RdvAdvertisement: ", ez);
-            }
-            return null;
-        }
-    }
-        
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/relay/RelayServerClient.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/relay/RelayServerClient.java
deleted file mode 100644 (file)
index a89eee4..0000000
+++ /dev/null
@@ -1,669 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.endpoint.relay;
-
-import java.io.IOException;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.TimeUnit;
-import java.util.logging.Logger;
-import java.util.logging.Level;
-
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.Messenger;
-import net.jxta.endpoint.StringMessageElement;
-import net.jxta.logging.Logging;
-
-import net.jxta.impl.endpoint.BlockingMessenger;
-import net.jxta.impl.endpoint.EndpointServiceImpl;
-import net.jxta.impl.util.TimeUtils;
-
-/**
- * This class abstracts a client of the Relay Server
- */
-class RelayServerClient implements Runnable {
-
-    /**
-     * Logger
-     */
-    private static final Logger LOG = Logger.getLogger(RelayServerClient.class.getName());
-
-    /**
-     * The lease length when there are messages pending and we can't send them.
-     */
-    private static long stallTimeout = 0;
-
-    /**
-     * the Relay Server of this client
-     */
-    private final RelayServer server;
-
-    /**
-     * the peerId of this client
-     */
-    private final String clientPeerId;
-
-    /**
-     * The length of the lease in milliseconds
-     */
-    private long leaseLength = 0;
-
-    /**
-     * the Endpoint Address of the client of the queue expressed as jxta://'peerid'
-     */
-    private final EndpointAddress clientAddr;
-
-    /**
-     * the time at which the message queue expires
-     */
-    private volatile long expireTime = 0;
-
-    /**
-     * indicates whether this client handler is valid or expired
-     */
-    private boolean isClosed = false;
-
-    /**
-     * a queue of message for this client
-     */
-    private final BlockingQueue<Message> messageList;
-
-    /**
-     * endpoint service for this client
-     */
-    private final EndpointService endpoint;
-
-    private Messenger messenger = null;
-    private Thread thread = null;
-    private boolean thread_idle = false;
-
-    private Message outOfBandMessage = null;
-
-    protected RelayServerClient(RelayServer server, String clientPeerId, long leaseLength, long stallTimeout, int clientQueueSize) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("new Client peerId=" + clientPeerId + " lease=" + leaseLength);
-        }
-
-        this.server = server;
-        this.clientPeerId = clientPeerId;
-        this.leaseLength = leaseLength;
-        RelayServerClient.stallTimeout = stallTimeout;
-
-        clientAddr = new EndpointAddress("jxta", clientPeerId, null, null);
-        endpoint = server.getEndpointService();
-        messageList = new ArrayBlockingQueue<Message>(clientQueueSize);
-
-        // initialize the lease
-        renewLease();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected void finalize() throws Throwable {
-        closeClient();
-        super.finalize();
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * <p/>Send all of the queued messages to the client.
-     */
-    public void run() {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("send queued messages to " + clientAddr);
-        }
-
-        try {
-            Message message;
-            int failedInARow = 0;
-
-            while (true) {
-                message = null;
-                Messenger holdIt;
-                synchronized (this) {
-                    // Messenger + message is the condition to continue running
-                    // We do not want to dequeue messages for sending before knowing if
-                    // we have a messenger because re-queing is clumsy, so we
-                    // check the messenger first. However, if we fail to get
-                    // a messenger, we are forced to check the queue so that we
-                    // can update the lease accordingly. It is possible to be here
-                    // with neither messenger nor messages and then we must let
-                    // the lease be long.
-
-                    if (messenger == null || messenger.isClosed()) {
-                        messenger = null;
-                        if (outOfBandMessage != null || !messageList.isEmpty()) {
-
-                            // If we cannot send a message by lack of messenger.
-                            // The client is suspect of being dead. The clock starts
-                            // ticking faster until we manage to send again.
-                            // In two minutes we declare it dead.
-
-                            long newExpireTime = TimeUtils.toAbsoluteTimeMillis(stallTimeout);
-
-                            // If we're closed, we won't touch expireTime since it is 0.
-                            if (expireTime > newExpireTime) {
-                                expireTime = newExpireTime;
-                            }
-
-                        }
-                        thread = null; // Make sure a thread will be created if
-                        break; // it is needed after we release the synch.
-                    }
-
-                    if (outOfBandMessage != null) {
-                        message = outOfBandMessage;
-                        outOfBandMessage = null;
-                    } else {
-                        message = messageList.poll(0, TimeUnit.MILLISECONDS);
-                        if (message == null) {
-                            try {
-                                thread_idle = true;
-                                wait(4 * TimeUtils.ASECOND);
-                                if (outOfBandMessage != null) {
-                                    message = outOfBandMessage;
-                                    outOfBandMessage = null;
-                                } else {
-                                    message = messageList.poll(0, TimeUnit.MILLISECONDS);
-                                }
-                            } catch (InterruptedException ie) {
-                                //ignored
-                            }
-                            if (message == null) {
-                                thread = null; // Make sure a thread will be created if
-                                break; // it is needed after we release the synch.
-                            }
-                        }
-                    }
-
-                    holdIt = messenger; // Avoid NPE once out of synch.
-                    thread_idle = false;
-                }
-
-                // get the final service name and parameter that was loaded before queueing
-                MessageElement dstAddressElement = message.getMessageElement(EndpointServiceImpl.MESSAGE_DESTINATION_NS,
-                        EndpointServiceImpl.MESSAGE_DESTINATION_NAME);
-
-                if (null == dstAddressElement) {
-                    // No destination address... Just discard
-                    // this should really not happen
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("message destination was not set");
-                    }
-
-                    continue;
-                }
-                EndpointAddress destAddr = new EndpointAddress(dstAddressElement.toString());
-
-                // send the message
-                try {
-                    holdIt.sendMessageB(message, destAddr.getServiceName(), destAddr.getServiceParameter());
-
-                    // The client is off the hook for now. One message was sent.
-                    // Lease will stay long until the next messenger failure.
-                    synchronized (this) {
-                        failedInARow = 0;
-
-                        // Do not touch expireTime if we've been closed.
-                        if (!isClosed) {
-                            expireTime = TimeUtils.toAbsoluteTimeMillis(leaseLength);
-                        }
-                    }
-                } catch (Exception e) {
-                    // Check that the exception is not due to the message
-                    // rather than the messenger, and then drop the message. In that case
-                    // we give the messenger the benefit of the doubt and keep
-                    // it open, renewing the lease as above. (this could be the last
-                    // message). For now the transports do not tell the difference, so we
-                    // count the nb of times we failed in a row. After three times,
-                    // kill the message rather than the messenger.
-
-                    // put the message back
-                    synchronized (this) {
-                        if (++failedInARow >= 3) {
-                            failedInARow = 0;
-                            if (!isClosed) {
-                                expireTime = TimeUtils.toAbsoluteTimeMillis(leaseLength);
-                            }
-                            continue;
-                        }
-
-                        // Ok, if we cannot push back the message, below, we 
-                        // should reset failedInARow, since we won't be retrying
-                        // the same message. But it does not realy matter so 
-                        // let's keep things simple.
-
-                        if (outOfBandMessage == null) {
-                            outOfBandMessage = message;
-                        }
-                    }
-
-                    // If we're here, we decided to close the messenger. We do that
-                    // out of sync.
-                    if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                        LOG.log(Level.INFO, "closing messenger after exception :" + clientAddr, e);
-                    }
-                    holdIt.close(); // Next loop deal with it.
-                    // (including shortening the lease if needed.)
-                }
-            }
-        } catch (Throwable all) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Uncaught Throwable in thread :" + Thread.currentThread().getName(), all);
-            }
-        } finally {
-            thread = null;
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("stopped sending queued messages for " + clientAddr);
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String toString() {
-        return clientPeerId + "," + messageList.size() + ","
-                + (messenger == null ? "-m" : "+m") + "," + TimeUtils.toRelativeTimeMillis(expireTime, TimeUtils.timeNow());
-    }
-
-    protected int getQueueSize() {
-        return messageList.size();
-    }
-
-    public long getLeaseRemaining() {
-        // May be shorter than lease length. Compute real value from expire
-        // time.
-        return TimeUtils.toRelativeTimeMillis(expireTime, TimeUtils.timeNow());
-    }
-
-    public void closeClient() {
-
-        Messenger messengerToClose;
-
-        synchronized (this) {
-            if (isClosed) {
-                return;
-            }
-
-            isClosed = true;
-
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info( "Terminating client:" + "\n\tclient=" + clientAddr + "\tnbMessages=" + messageList.size()
-                                + "\tmessenger=" + messenger + (messenger == null ? "" : "(c:" + messenger.isClosed() + ")")
-                                + "\tlease-left=" + TimeUtils.toRelativeTimeMillis(expireTime, TimeUtils.timeNow()) + "\tt=" + (thread != null));
-            }
-
-            messengerToClose = messenger;
-
-            expireTime = 0;
-            messenger = null;
-
-            // remove all queued messages if expired
-            messageList.clear();
-        }
-
-        // We can do that out of sync. It avoids nesting locks.
-        server.removeClient(clientPeerId, this);
-        if (messengerToClose != null) {
-            messengerToClose.close();
-        }
-    }
-
-    /**
-     * remove all queued messages.
-     */
-    synchronized void flushQueue() {
-        messageList.clear();
-    }
-
-    public boolean addMessenger(Messenger newMessenger) {
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("addMessenger() " + newMessenger);
-        }
-
-        // make sure we are being passed a valid messenger
-        if (newMessenger == null || newMessenger.isClosed()) {
-            return false;
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("messenger (" + messenger + ") thread=" + thread);
-        }
-
-        // Unless we change our mind, we'll close the new messenger.
-        // If we do not keep it, we must close it. Otherwise
-        // the client on the other end will never know what happened.
-        // Its connection will be left hanging for a long time.
-
-        Messenger messengerToClose = newMessenger;
-
-        synchronized (this) {
-            // Do not use isExpired() here. IsExpired is not supposed to be called
-            // synchronized. Also  isClosed() is good enough. The handler being
-            // expired is not a problem; we'll figure it out soon enough and do the
-            // right thing.
-
-            if (!isClosed) {
-                // use this messenger instead of the old one.
-
-                if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                    if (messenger != null) {
-                        LOG.info("closing messenger replaced by a new one : " + clientAddr);
-                    }
-                }
-
-                // Swap messengers; we'll close the old one if there was one.
-
-                messengerToClose = messenger;
-                messenger = newMessenger;
-
-                if ((thread == null || thread_idle) && ((!messageList.isEmpty()) || (outOfBandMessage != null))) {
-
-                    // if we do not already have a thread, start one
-
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("messageList.size() = " + messageList.size() + " client=" + clientAddr);
-                    }
-
-                    if (thread != null) {
-                        notify();
-                    } else {
-                        thread = new Thread(server.group.getHomeThreadGroup(), this, "Draining queue to " + clientAddr);
-                        thread.setDaemon(true);
-                        thread.start();
-                    }
-                }
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("messenger (" + messenger + ") thread=" + thread);
-                }
-            }
-        }
-
-        // Close whichever messenger out of sync.
-        // In either case, we claim that we kept the new one.
-
-        if (messengerToClose != null) {
-            messengerToClose.close();
-        }
-
-        return true;
-    }
-
-    public boolean isExpired() {
-        boolean isExpired = TimeUtils.timeNow() > expireTime;
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("isExpired() = " + isExpired + " client=" + clientAddr);
-        }
-
-        if (isExpired) {
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("Closing expired client : " + clientAddr);
-            }
-            closeClient();
-        }
-
-        return isExpired;
-    }
-
-    public synchronized boolean renewLease() {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("renewLease() old expireTime = " + expireTime);
-        }
-
-        // It is ok to renew a lease past the expiration time, as long
-        // as the handler has not been closed yet. So, we do not use
-        // isExpired().
-
-        if (isClosed) {
-            return false;
-        }
-
-        // As long as there are messages to send, the lease is controlled
-        // by our ability to send them, not by client renewal.
-
-        if (!messageList.isEmpty()) {
-            return true;
-        }
-
-        expireTime = TimeUtils.toAbsoluteTimeMillis(leaseLength);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("renewLease() new expireTime = " + expireTime);
-        }
-        return true;
-    }
-
-    /**
-     * add a message to the tail of the list
-     *
-     * @param message  the message
-     * @param outOfBand if true, indicates outbound
-     * @throws IOException if an io error occurs
-     */
-    private void queueMessage(Message message, boolean outOfBand) throws IOException {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("queueMessage (" + messageList.size() + ") client=" + clientAddr);
-        }
-
-        synchronized (this) {
-            if (isClosed) {
-                throw new IOException("Client has been disconnected");
-            }
-
-            if (outOfBand) {
-                // We have a single oob message pending.
-                outOfBandMessage = message;
-            } else {
-                // We will simply discard the latest msg when the queue is full
-                // to avoid penalty of dropping earlier reliable message
-                if (!messageList.offer(message)) {
-                    if (Logging.SHOW_WARNING) {
-                        LOG.warning("Dropping relayed message " + message.toString() + " for peer " + clientPeerId);
-                    }
-                }
-            }
-
-            // check if a new thread needs to be started.
-            if ((thread == null) || thread_idle) {
-                // Normally, if messenger is null we knew it already:
-                // it becomes null only when we detect that it breaks while
-                // trying to send. However, let's imagine it's possible that
-                // we never had one so far. Be carefull that this is not a
-                // one-time event; we must not keep renewing the short lease;
-                // that would ruin it's purpose.
-
-                if (messenger == null) {
-                    long newExpireTime = TimeUtils.toAbsoluteTimeMillis(stallTimeout);
-
-                    if (expireTime > newExpireTime) {
-                        expireTime = newExpireTime;
-                    }
-
-                } else {
-                    // Messenger good.
-                    // if we do not already have a thread, start one
-                    if (thread != null) {
-                        notify();
-                    } else {
-                        thread = new Thread(server.group.getHomeThreadGroup(), this, "Draining queue to " + clientAddr);
-                        thread.setDaemon(true);
-                        thread.start();
-                    }
-                }
-            }
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("done queueMessage (" + messageList.size() + ") client=" + clientAddr);
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("messenger (" + messenger + ") thread=" + thread);
-        }
-    }
-
-    protected EndpointAddress getClientAddress() {
-        return clientAddr;
-    }
-
-    protected Messenger getMessenger(EndpointAddress srcAddr, EndpointAddress destAddr, boolean outOfBand) {
-        return new RelayMessenger(srcAddr, destAddr, this, outOfBand);
-    }
-
-    protected static class RelayMessenger extends BlockingMessenger {
-        private final MessageElement srcAddressElement;
-        private final RelayServerClient handler;
-        private boolean outOfBand = false;
-
-        // Since we send messages through other messengers that do not necessarily have the
-        // same destination service and param (usually none), we have to pass these along explicitly
-        // in all cases. If we just build a destination element for the message it will be overwritten
-        // by messengers below.
-        private final String defaultServiceName;
-        private final String defaultServiceParam;
-
-        public RelayMessenger(EndpointAddress srcAddress, EndpointAddress destAddress, RelayServerClient handler, boolean outOfBand) {
-
-            // We do not use self destruction
-            super(handler.server.group.getPeerGroupID(), destAddress, false);
-
-            this.defaultServiceName = destAddress.getServiceName();
-            this.defaultServiceParam = destAddress.getServiceParameter();
-            this.handler = handler;
-            this.outOfBand = outOfBand;
-
-            this.srcAddressElement = new StringMessageElement(EndpointServiceImpl.MESSAGE_SOURCE_NAME, srcAddress.toString(), null);
-        }
-
-        /*
-        * The cost of just having a finalize routine is high. The finalizer is
-        * a bottleneck and can delay garbage collection all the way to heap
-        * exhaustion. Leave this comment as a reminder to future maintainers.
-        * Below is the reason why finalize is not needed here.
-        *
-        * This is never given to application layers directly. No need
-        * to close-on-finalize.
-        *
-
-        protected void finalize() {
-        }
-
-        */
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public boolean isIdleImpl() {
-            // We do not use self destruction
-            return false;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public void closeImpl() {
-            // Nothing to do. The underlying connection is not affected.
-            // The messenger will be marked closed by the state machine once completely down; that's it.
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public EndpointAddress getLogicalDestinationImpl() {
-            // getClientAddress returns a clone of the client's jxta: address.
-            return handler.getClientAddress();
-        }
-
-        /*
-        *   {@inheritDoc}
-        *
-        * <p/>Send messages. Messages are queued and then processed when there is a transport messenger.
-        */
-        @Override
-        public void sendMessageBImpl(Message message, String serviceName, String serviceParam) throws IOException {
-
-            // Set the message with the appropriate src address
-            message.replaceMessageElement(EndpointServiceImpl.MESSAGE_SOURCE_NS, srcAddressElement);
-
-            // load the final destination into the message
-            EndpointAddress destAddressToUse = getDestAddressToUse(serviceName, serviceParam);
-
-            MessageElement dstAddressElement = new StringMessageElement(EndpointServiceImpl.MESSAGE_DESTINATION_NAME,
-                    destAddressToUse.toString(), null);
-
-            message.replaceMessageElement(EndpointServiceImpl.MESSAGE_DESTINATION_NS, dstAddressElement);
-
-            // simply enqueue the message.
-            // We clone it, since we pretend it's been sent synchronously.
-            handler.queueMessage(message.clone(), outOfBand);
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/relay/RelayTransport.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/relay/RelayTransport.java
deleted file mode 100644 (file)
index 51188fe..0000000
+++ /dev/null
@@ -1,464 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.endpoint.relay;
-
-import java.util.NoSuchElementException;
-
-import java.util.logging.Level;
-
-import net.jxta.logging.Logging;
-
-import java.util.logging.Logger;
-
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.XMLDocument;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointListener;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.StringMessageElement;
-import net.jxta.id.ID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.protocol.ConfigParams;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.platform.Module;
-
-import net.jxta.exception.PeerGroupException;
-
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.impl.protocol.RelayConfigAdv;
-import net.jxta.pipe.PipeService;
-
-/**
- * The Relay Server supports the following commands:
- *
- * CONNECT - message contains PEERID, optional LEASE
- * DISCONNECT - message contains PEERID.
- * GETSERVER - message contains PEERID.
- */
-
-public final class RelayTransport implements EndpointListener, Module {
-
-    /**
-     * Logger
-     */
-    private final static Logger LOG = Logger.getLogger(RelayTransport.class.getName());
-
-    // // constants ////
-    static final String protocolName = "relay";
-
-    static final String RELAY_NS = "relay";
-    static final String REQUEST_ELEMENT = "request";
-    static final String RESPONSE_ELEMENT = "response";
-    static final String PEERID_ELEMENT = "peerid";
-    static final String LEASE_ELEMENT = "lease";
-    static final String RELAY_ADV_ELEMENT = "relayAdv";
-
-    static final String CONNECT_REQUEST = "connect";
-    static final MessageElement CONNECT_REQUEST_ELEMENT = new StringMessageElement(REQUEST_ELEMENT, CONNECT_REQUEST, null);
-    static final String DISCONNECT_REQUEST = "disconnect";
-    static final MessageElement DISCONNECT_REQUEST_ELEMENT = new StringMessageElement(REQUEST_ELEMENT, DISCONNECT_REQUEST, null);
-    static final String PID_REQUEST = "pid";
-    static final MessageElement PID_REQUEST_ELEMENT = new StringMessageElement(REQUEST_ELEMENT, PID_REQUEST, null);
-
-    static final String CONNECTED_RESPONSE = "connected";
-    static final MessageElement CONNECTED_RESPONSE_ELEMENT = new StringMessageElement(RESPONSE_ELEMENT, CONNECTED_RESPONSE, null);
-    static final String DISCONNECTED_RESPONSE = "disconnected";
-    static final MessageElement DISCONNECTED_RESPONSE_ELEMENT = new StringMessageElement(RESPONSE_ELEMENT, DISCONNECTED_RESPONSE
-            ,
-            null);
-    static final String PID_RESPONSE = "pid";
-    static final MessageElement PID_RESPONSE_ELEMENT = new StringMessageElement(RESPONSE_ELEMENT, PID_RESPONSE, null);
-
-    static final int DEFAULT_MAX_CLIENTS = 150;
-
-    static final int DEFAULT_MAX_SERVERS = 1;
-
-    // Note the weird time below can be decreased but should not be increased
-    // otherwise there will not be enough traffic for the other side to
-    // keep the connection open.
-    static final long DEFAULT_LEASE = TimeUtils.ANHOUR;
-    static final long DEFAULT_STALL_TIMEOUT = 15 * TimeUtils.ASECOND;
-
-    static final long DEFAULT_POLL_INTERVAL = 15 * TimeUtils.ASECOND; // (the poll costs very little)
-
-    static final long DEFAULT_BROADCAST_INTERVAL = 10 * TimeUtils.AMINUTE;
-
-    static final int DEFAULT_CLIENT_QUEUE_SIZE = 20;
-
-    private PeerGroup group = null;
-
-    private String serviceName = null;
-
-    private RelayClient relayClient = null;
-    private RelayServer relayServer = null;
-
-    /**
-     * {@inheritDoc}
-     */
-    public void init(PeerGroup group, ID assignedID, Advertisement implAdv) throws PeerGroupException {
-        this.group = group;
-        ModuleImplAdvertisement implAdvertisement = (ModuleImplAdvertisement) implAdv;
-
-        this.serviceName = assignedID.getUniqueValue().toString();
-
-        ConfigParams confAdv = group.getConfigAdvertisement();
-
-        // Get the config. If we do not have a config, we're done; we just keep
-        // the defaults (edge peer/no auto-rdv)
-        RelayConfigAdv relayConfigAdv = null;
-
-        if (confAdv != null) {
-            Advertisement adv = null;
-
-            try {
-                XMLDocument configDoc = (XMLDocument) confAdv.getServiceParam(assignedID);
-
-                if (null != configDoc) {
-                    adv = AdvertisementFactory.newAdvertisement(configDoc);
-                }
-            } catch (NoSuchElementException failed) {
-                //ignored
-            } catch (IllegalArgumentException failed) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Error in relay advertisement", failed);
-                }
-
-                throw failed;
-            }
-
-            if (adv instanceof RelayConfigAdv) {
-                relayConfigAdv = (RelayConfigAdv) adv;
-            } else {
-                relayConfigAdv = (RelayConfigAdv) AdvertisementFactory.newAdvertisement(RelayConfigAdv.getAdvertisementType());
-            }
-        }
-
-        // XXX bondolo 20041030 I'd like to move these to startApp so that we 
-        // can pass endpointService and share the instance.
-        if (relayConfigAdv.isServerEnabled()) {
-            relayServer = new RelayServer(group, serviceName, relayConfigAdv);
-        }
-
-        if (relayConfigAdv.isClientEnabled()) {
-            relayClient = new RelayClient(group, serviceName, relayConfigAdv);
-        }
-
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring Relay Message Transport : " + assignedID);
-
-            if (implAdvertisement != null) {
-                configInfo.append("\n\tImplementation :");
-                configInfo.append("\n\t\tModule Spec ID: ").append(implAdvertisement.getModuleSpecID());
-                configInfo.append("\n\t\tImpl Description : ").append(implAdvertisement.getDescription());
-                configInfo.append("\n\t\tImpl URI : ").append(implAdvertisement.getUri());
-                configInfo.append("\n\t\tImpl Code : ").append(implAdvertisement.getCode());
-            }
-
-            configInfo.append("\n\tGroup Params :");
-            configInfo.append("\n\t\tGroup : ").append(group);
-            configInfo.append("\n\t\tPeer ID : ").append(group.getPeerID());
-
-            configInfo.append("\n\tConfiguration :");
-            configInfo.append("\n\t\tService Name : ").append(serviceName);
-            configInfo.append("\n\t\tisServer : ").append(relayConfigAdv.isServerEnabled());
-            configInfo.append("\n\t\tisClient : ").append(relayConfigAdv.isClientEnabled());
-
-            LOG.config(configInfo.toString());
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public int startApp(String[] args) {
-        EndpointService endpoint = group.getEndpointService();
-
-        if (null == endpoint) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is an endpoint service");
-            }
-
-            return START_AGAIN_STALLED;
-        }
-
-        // XXX bondolo 20041025 Server depends upon discovery and its non-optional.
-        DiscoveryService discovery = group.getDiscoveryService();
-
-        if (null == discovery) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is a discovery service");
-            }
-
-            return START_AGAIN_STALLED;
-        }
-
-        // XXX bondolo 20041025 Server depends upon pipes and its non-optional.
-        PipeService pipeService = group.getPipeService();
-
-        if (null == pipeService) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is a pipe service");
-            }
-
-            return START_AGAIN_STALLED;
-        }
-
-        endpoint.addIncomingMessageListener(this, serviceName, null);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Message Listener added " + serviceName);
-        }
-
-        if (relayServer != null) {
-            if (!relayServer.startServer()) {
-                return -1; // cannot start
-            }
-        }
-
-        if (relayClient != null) {
-            if (!relayClient.startClient()) {
-                return -1; // cannot start
-            }
-        }
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Relay Message Transport started");
-        }
-
-        return 0;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void stopApp() {
-        // remove listener
-        EndpointService endpoint = group.getEndpointService();
-
-        if (endpoint == null) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("could not get EndpointService");
-            }
-        } else {
-            endpoint.removeIncomingMessageListener(serviceName, null);
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Message Listener removed " + serviceName);
-            }
-        }
-
-        if (relayServer != null) {
-            relayServer.stopServer();
-        }
-
-        if (relayClient != null) {
-            relayClient.stopClient();
-        }
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Relay Message Transport stopped");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void processIncomingMessage(Message message, EndpointAddress srcAddr, EndpointAddress dstAddr) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Started for " + message + "\tsrc=" + srcAddr);
-        }
-
-        MessageElement element;
-
-        // check if it is a request
-        element = message.getMessageElement(RelayTransport.RELAY_NS, REQUEST_ELEMENT);
-
-        if (element != null) {
-            // this is a request, pass it to the relayServer
-            if (relayServer != null) {
-                relayServer.handleRequest(message, dstAddr);
-            }
-        } else {
-            // check if it is a response
-            element = message.getMessageElement(RelayTransport.RELAY_NS, RESPONSE_ELEMENT);
-
-            if (element != null) {
-                // this is a response, pass it to the relayClient
-                if (relayClient != null) {
-                    relayClient.handleResponse(message, dstAddr);
-                }
-            }
-        }
-    }
-
-    protected PeerGroup getGroup() {
-        return group;
-    }
-
-    protected String getServiceName() {
-        return serviceName;
-    }
-
-    // This is for reference only, the Desktop client implementation does not
-    // use that server feature
-    static Message createPIDRequestMessage() {
-        Message message = new Message();
-        message.addMessageElement(RELAY_NS, PID_REQUEST_ELEMENT);
-        return message;
-    }
-
-    static Message createPIDResponseMessage(String pidStr) {
-        Message message = new Message();
-        message.addMessageElement(RELAY_NS, PID_RESPONSE_ELEMENT);
-        setString(message, PEERID_ELEMENT, pidStr);
-
-        return message;
-    }
-
-    static Message createConnectMessage(long lease, boolean doReturnAdv, boolean doFlushQueue) {
-        Message message = new Message();
-        String request = createConnectString(lease, doReturnAdv, doFlushQueue);
-        setString(message, REQUEST_ELEMENT, request);
-        return message;
-    }
-
-    static String createConnectString(long lease, boolean doReturnAdv, boolean doFlushQueue) {
-
-        String request = CONNECT_REQUEST;
-
-        if (lease > 0) {
-            request += "," + Long.toString(lease);
-        } else {
-            request += ",";
-        }
-
-        if (doFlushQueue) {
-            request += ",flush";
-        } else {
-            request += ",keep";
-        }
-
-        if (doReturnAdv) {
-            request += ",true";
-        } else {
-            request += ",other";
-        }
-
-        return request;
-    }
-
-    static Message createConnectedMessage(long lease) {
-        Message message = new Message();
-
-        message.addMessageElement(RELAY_NS, CONNECTED_RESPONSE_ELEMENT);
-
-        if (lease > 0) {
-            setString(message, LEASE_ELEMENT, Long.toString(lease));
-        }
-
-        return message;
-    }
-
-    static Message createDisconnectMessage() {
-        Message message = new Message();
-        message.addMessageElement(RELAY_NS, DISCONNECT_REQUEST_ELEMENT);
-        return message;
-    }
-
-    static Message createDisconnectedMessage() {
-        Message message = new Message();
-        message.addMessageElement(RELAY_NS, DISCONNECTED_RESPONSE_ELEMENT);
-        return message;
-    }
-
-    /**
-     * Convinence function for setting a string element with the relay namespace
-     *
-     * @param message the message
-     * @param elementName message element name
-     * @param value the value of the string
-     */
-    static void setString(Message message, String elementName, String value) {
-        // create a new String Element with the given value
-        StringMessageElement sme = new StringMessageElement(elementName, value, null);
-
-        // add the new element to the message
-        message.addMessageElement(RELAY_NS, sme);
-    }
-
-    /**
-     * Convinence function for getting a String from the element with the given
-     * tag and relay namespace
-     *
-     * @param message the message
-     * @param elementName the value of the string
-     * @return the string value, null if the element does not exist
-     */
-    static String getString(Message message, String elementName) {
-        // get the requested element
-        MessageElement element = message.getMessageElement(RelayTransport.RELAY_NS, elementName);
-
-        // if the element is not present, return null
-        if (element == null) {
-            return null;
-        }
-        return element.toString();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/relay/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/relay/package.html
deleted file mode 100644 (file)
index 8c7ed34..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    A JXTA {@link net.jxta.endpoint.MessageTransport} implementation which
-    which provides client polling and server store-and forward functionality for
-    peers incapable of receiving incoming connections. A virtual transport, the
-    messages are transfered between peers using client initiated connections of
-    some other message transport.
-
-    @see net.jxta.endpoint.EndpointService
-    @see net.jxta.endpoint.MessageTransport
-    @see net.jxta.endpoint.MessageSender
-    @see net.jxta.endpoint.MessageReceiver
-    @see net.jxta.endpoint.Message
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#stdsvc-trans" target="_blank">JXTA Protocols Specification : Standard JXTA Transport Bindings</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/BadRoute.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/BadRoute.java
deleted file mode 100644 (file)
index e731a7b..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.router;
-
-
-import net.jxta.peer.PeerID;
-import net.jxta.protocol.RouteAdvertisement;
-
-import java.util.HashSet;
-import java.util.Set;
-
-
-/**
- * This class is used to cache negative route information. Bad routes are
- * represented by three fields:
- *
- * <p/><ul>
- * <li>Route advertisement,</li>
- * <li>Lists of hops that are known bad for that route.</li>
- * <li>Expiration time of the negative cache.</li>
- * </ul>
- */
-class BadRoute {
-    
-    /**
-     * The RouteAdvertisement with known bad hops.
-     */
-    private final RouteAdvertisement badRoute;
-    
-    /**
-     * The PeerID of the known bad hops in the route.
-     */
-    private final Set<PeerID> badHops = new HashSet<PeerID>();
-    
-    /**
-     * The absolute time at which this information becomes obsolete.
-     */
-    private long expiration;
-    
-    BadRoute(RouteAdvertisement route, long exp, Set<PeerID> hops) {
-        this.badRoute = route;
-        this.expiration = exp;
-        this.badHops.addAll(hops);
-    }
-    
-    /**
-     * Return the bad route info
-     *
-     * @return bad route advertisement
-     */
-    public RouteAdvertisement getRoute() {
-        if (badRoute != null) {
-            return badRoute.clone();
-        } else {
-            return null;
-        }
-    }
-    
-    /**
-     * Return the absolute time at which the this entry expires.
-     *
-     * @return The absolute time at which the this entry expires.
-     */
-    public long getExpiration() {
-        return expiration;
-    }
-    
-    /**
-     * set the bad route expiration time
-     *
-     * @param exp bad route expiration time
-     */
-    public void setExpiration(long exp) {
-        this.expiration = exp;
-    }
-    
-    /**
-     * return the known bad hops in the route
-     *
-     * @return bad route hops
-     */
-    public Set<PeerID> getBadHops() {
-        Set<PeerID> hops = new HashSet<PeerID>(badHops);
-        
-        return hops;
-    }
-    
-    /**
-     * set bad hops into the bad route
-     *
-     * @param hops bad route hops
-     */
-    public void setBadHops(Set<PeerID> hops) {
-        
-        badHops.clear();
-        addBadHops(hops);
-    }
-    
-    /**
-     * add bad hops into the bad route
-     *
-     * @param hops bad route hops
-     */
-    public void addBadHops(Set<PeerID> hops) {
-        badHops.addAll(hops);
-    }
-    
-    /**
-     * add a bad hop into the bad route
-     *
-     * @param hop The bad route hop.
-     */
-    public void addBadHop(PeerID hop) {
-        badHops.add(hop);
-    }
-    
-    /**
-     * {@inheritDoc}
-     * 
-     * <p/>Implementation useful for debugging. Don't depend on the format
-     */
-    @Override
-    public String toString() {
-        StringBuilder routeBuf = new StringBuilder();
-        
-        routeBuf.append("Bad ").append(getRoute().display());
-        routeBuf.append("\tExp: ").append(getExpiration());
-        routeBuf.append("\tHops: ");
-        
-        for (PeerID eachBadHop : getBadHops()) {
-            routeBuf.append("\t\t").append(eachBadHop);
-        }
-        
-        return routeBuf.toString();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/Destinations.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/Destinations.java
deleted file mode 100644 (file)
index 27af782..0000000
+++ /dev/null
@@ -1,602 +0,0 @@
-/*
- * Copyright (c) 2004-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.router;
-
-
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.Messenger;
-import net.jxta.impl.util.TimeUtils;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.lang.ref.Reference;
-import java.lang.ref.SoftReference;
-import java.util.*;
-
-
-/**
- * This class is a repository of wisdom regarding destinations. It also provides
- * a messenger if there is one. Currently, the wisdom is very limited and is
- * only about direct destinations (for which a messenger once existed). The
- * wisdom that can be obtained is:
- *
- * <p/><ul>
- * <li> is there a messenger at hand (incoming or otherwise).</li>
- * 
- * <li> is it likely that one can be made from this end, should the one we
- * have break. (the last attempt succeeded, not only incoming, and that was
- * not long ago).</li>
- * 
- * <li> is either of the above true, (are we confident we can get a
- * messenger as of right now one way or the other).</li>
- * 
- * <li> are we supposed to send a welcome to that destination (we can't
- * remember having done it).</li>
- * </ul>
- * 
- * <p/>This could be extended to manage more of the life cycle, such as knowing
- * about messengers being resolved or having failed to. This primitive interface
- * is temporary; it is only meant to replace messengerPool without having to
- * change the router too much.
- */
-
-class Destinations {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(Destinations.class.getName());
-
-    /**
-     * Shared Timer which handles cleanup of expired Wisdom.
-     */
-    private final static transient Timer cleanup = new Timer("Endpoint Destinations GC", true);
-
-    private final Map<EndpointAddress, Wisdom> wisdoms = new HashMap<EndpointAddress, Wisdom>(64);
-
-    /**
-     * If {@code true} then we are shutting down.
-     */
-    private volatile boolean stopped = false;
-
-    /**
-     * The endpoint service we are working for.
-     */
-    private final EndpointService endpoint;
-
-    /**
-     * The wisdom GC task for this instance.
-     */
-    private final WisdomGCTask wisdomGC;
-
-    /**
-     * Stores knowledge about one particular destination.
-     * 
-     * <p/>It does not provide any synchronization. This is provided by the Destinations class.
-     */
-    final class Wisdom {
-
-        /**
-         * How long we consider that a past outgoingMessenger is an indication 
-         * that one is possible in the future.
-         */
-        static final long EXPIRATION = 10 * TimeUtils.AMINUTE;
-
-        /**
-         * The channel we last used, if any. They disappear faster than the 
-         * canonical, but, as long as the canonical is around, they can be 
-         * obtained at a near-zero cost.
-         */
-        private Reference<Messenger> outgoingMessenger;
-
-        /**
-         * The channel we last used if it happens to be an incoming messenger. We keep
-         * a strong reference to it.
-         */
-        private Messenger incomingMessenger;
-
-        /**
-         * The transport destination address of the messenger we're caching (if 
-         * not incoming).
-         */
-        private EndpointAddress xportDest;
-
-        /**
-         * This tells when the outgoing messenger information expires. Incoming
-         * messengers have no expiration per se.  We draw no conclusion from
-         * their past presence; only current presence. A wisdom is totally
-         * expired (and may thus be removed) when its outgoing messenger
-         * information is expired AND it has no incoming messenger.
-         */
-        private long expiresAt = 0;
-
-        /**
-         * When a new destination is added, we're supposed to send our welcome 
-         * along with the first message. This tells whether isWelcomeNeeded was 
-         * once invoked or not.
-         */
-        private boolean welcomeNeeded = true;
-
-        /**
-         * @param messenger The messenger to cache information about.
-         * @param incoming  If true, this is an incoming messenger, which means 
-         * that if the channel is lost it cannot be re-obtained. It must 
-         * strongly referenced until it closes for disuse, or breaks.
-         */
-        Wisdom(Messenger messenger, boolean incoming) {
-            if (incoming) {
-                addIncomingMessenger(messenger);
-            } else {
-                addOutgoingMessenger(messenger);
-            }
-        }
-
-        /**
-         * Reports whether a welcome message is needed. The first time we're 
-         * asked we say "true". Subsequently, always "false".
-         *
-         * <p/>This assumes that the welcome was sent following the first test.
-         * (so, ask only if you'll send the welcome when told to).
-         *
-         * @return {@code true} if this is the first time this method is invoked.
-         */
-        synchronized boolean isWelcomeNeeded() {
-            boolean res = welcomeNeeded;
-
-            welcomeNeeded = false;
-            return res;
-        }
-
-        boolean addIncomingMessenger(Messenger m) {
-
-            // If we have no other incoming, we take it. No questions asked.
-            Messenger currentIncoming = getIncoming();
-
-            if (currentIncoming == null) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Accepted new incoming messenger for " + m.getDestinationAddress());
-                }
-
-                incomingMessenger = m;
-                return true;
-            }
-
-            // Now, check reachability (0 port number means no incoming connections).
-            // If the old one looks better, prefer it.
-
-            // Compute reachability of the new one.
-            String originAddr = m.getDestinationAddress().getProtocolAddress();
-
-            int index = originAddr.lastIndexOf(':');
-            int srcPort = (index != -1) ? Integer.parseInt(originAddr.substring(index + 1)) : 0;
-            boolean reachable = (srcPort != 0);
-
-            // Compute reachability of the old one.
-            originAddr = currentIncoming.getDestinationAddress().getProtocolAddress();
-
-            index = originAddr.lastIndexOf(':');
-            srcPort = (index != -1) ? Integer.parseInt(originAddr.substring(index + 1)) : 0;
-            boolean currentReachable = (srcPort != 0);
-
-            // The new one is less reachable than the old one. Keep the old one.
-            if (currentReachable && !reachable) {
-                return false;
-            }
-
-            incomingMessenger = m;
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Accepted new incoming messenger for " + m.getDestinationAddress());
-            }
-
-            return true;
-        }
-
-        boolean addOutgoingMessenger(Messenger m) {
-            if (getOutgoing() != null) {
-                return false;
-            }
-            this.outgoingMessenger = new SoftReference<Messenger>(m);
-            xportDest = m.getDestinationAddress();
-            expiresAt = TimeUtils.toAbsoluteTimeMillis(EXPIRATION);
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Accepted new outgoing messenger for " + xportDest);
-            }
-            return true;
-        }
-
-        void noOutgoingMessenger() {
-            outgoingMessenger = null;
-            xportDest = null;
-            expiresAt = 0;
-        }
-
-        /**
-         * Returns an incoming messenger is there is a working one available.
-         *
-         * @return an incoming messenger, null if there's none
-         */
-        private Messenger getIncoming() {
-            if (incomingMessenger != null) {
-                if ((incomingMessenger.getState() & Messenger.USABLE) != 0) {
-                    return incomingMessenger;
-                }
-                
-                // forget about this broken messenger.
-                incomingMessenger = null;
-            }
-            return null;
-        }
-
-        /**
-         * Returns an outgoingMessenger if there is one or one can be made without delay.
-         * Renews a broken one if it can be. Refreshes expiration time if a messenger is returned.
-         *
-         * @return an outgoing messenger, null if there's none
-         */
-        private Messenger getOutgoing() {
-
-            if (outgoingMessenger == null) {
-                return null;
-            }
-
-            // (If messenger is not null, it means that we also have a xportDest).
-
-            Messenger messenger = outgoingMessenger.get();
-
-            // If it is gone or broken, try and get a new one.
-            if ((messenger == null) || ((messenger.getState() & Messenger.USABLE) == 0)) {
-
-                messenger = endpoint.getMessengerImmediate(xportDest, null);
-
-                // If this fails, it is hopeless: the address is bad or something like that. Make ourselves expired right away.
-                if (messenger == null) {
-                    outgoingMessenger = null;
-                    xportDest = null;
-                    expiresAt = 0;
-                    return null;
-                }
-
-                // Renew the ref. The xportDest is the same.
-                outgoingMessenger = new SoftReference<Messenger>(messenger);
-            }
-
-            // So we had one or could renew. But, does it work ?
-            if ((messenger.getState() & (Messenger.USABLE & Messenger.RESOLVED)) == 0) {
-                // We no-longer have the underlying connection. Let ourselves expire. Do not renew the expiration time.
-                outgoingMessenger = null;
-                xportDest = null;
-                return null;
-            }
-
-            // Ok, we do have an outgoing messenger at the ready after all.
-            expiresAt = TimeUtils.toAbsoluteTimeMillis(EXPIRATION);
-            return messenger;
-        }
-
-        /**
-         * Returns a channel for this destination if one is there or can be obtained
-         * readily and works.
-         * <p/>
-         * <p/>We prefer the incoming connection to the outgoing for two
-         * reasons:
-         * <ul>
-         * <li>The remote peer was able to reach us. We cannot be sure that
-         * we can reach the remote peer.</li>
-         * <li>The remote peer initiated the connection. It has a better
-         * sense of when the connection should be closed or reopened than
-         * we do.</li>
-         *
-         * @return a channel for this destination
-         */
-        Messenger getCurrentMessenger() {
-            Messenger res = getIncoming();
-
-            if (res != null) {
-                return res;
-            }
-
-            return getOutgoing();
-        }
-
-        /**
-         * @return true if we do have an outgoing messenger or, failing that, we had one not too long ago.
-         */
-        boolean isNormallyReachable() {
-            return ((getOutgoing() != null) || (TimeUtils.toRelativeTimeMillis(expiresAt) >= 0));
-        }
-
-        /**
-         * We think the destination is reachable somehow. Not sure how long.
-         *
-         * @return true if we have any kind of messenger or, failing that, we had an outgoing one not too long ago.
-         */
-        boolean isCurrentlyReachable() {
-            return ((getIncoming() != null) || (getOutgoing() != null) || (TimeUtils.toRelativeTimeMillis(expiresAt) >= 0));
-        }
-
-        /**
-         * @return true if this wisdom carries no positive information whatsoever.
-         */
-        boolean isExpired() {
-            return !isCurrentlyReachable();
-        }
-    }
-
-    /*
-     * Internal mechanisms
-     */
-
-    /**
-     *  Return any Wisdom for the specified destination. The address will
-     *  be normalized to the base form.
-     *
-     *  @param destination The address of the wisdom that is sought.
-     *  @return The Wisdom for this address or {@code null} if no Wisdom found.
-     */
-    private Wisdom getWisdom(EndpointAddress destination) {
-        if (destination.getServiceName() != null) {
-            destination = new EndpointAddress(destination, null, null);
-        }
-        return wisdoms.get(destination);
-    }
-
-    /**
-     *  Add a Wisdom for the specified destination. The address will
-     *  be normalized to the base form.
-     *
-     *  @param destination The address of the Wisdom that is being added.
-     *  @param wisdom The Wisdom for this address to be added to the map.
-     */
-    private void addWisdom(EndpointAddress destination, Wisdom wisdom) {
-        destination = new EndpointAddress(destination, null, null);
-        wisdoms.put(destination, wisdom);
-    }
-
-    /*
-     * General house keeping.
-     */
-
-    public Destinations(EndpointService endpoint) {
-
-        this.endpoint = endpoint;
-
-        wisdomGC = new WisdomGCTask();
-
-        cleanup.schedule(wisdomGC, TimeUtils.AMINUTE, TimeUtils.AMINUTE);
-    }
-
-    /**
-     * Shutdown this cache. (stop the gc)
-     */
-    public synchronized void close() {
-        stopped = true;
-
-        // forget everything.
-        wisdoms.clear();
-
-        wisdomGC.cancel();
-    }
-
-    /**
-     * Handles cleanup of expired wisdoms
-     */
-    class WisdomGCTask extends TimerTask {
-
-        /**
-         * {@inheritDoc}
-         * 
-         * <p/>garbage collector. We use soft references to messengers, but we use
-         * a strong hashmap to keep the wisdom around in a more predictable
-         * manner. Entries are simply removed when they no-longer carry
-         * relevant information; so there's no change in the total meaning of
-         * the map when an entry is removed.
-         */
-        @Override
-        public void run() {
-            try {
-                synchronized (Destinations.this) {
-                    Iterator<Wisdom> eachWisdom = wisdoms.values().iterator();
-
-                    while (eachWisdom.hasNext()) {
-                        Wisdom w = eachWisdom.next();
-
-                        if (w.isExpired()) {
-                            eachWisdom.remove();
-                        }
-                    }
-                }
-            } catch (Throwable all) {
-                if (Logging.SHOW_SEVERE && Destinations.LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Uncaught Throwable in TimerTask :" + Thread.currentThread().getName(), all);
-                }
-            }
-        }
-    }
-
-    public synchronized Collection<EndpointAddress> allDestinations() {
-
-        Set<EndpointAddress> allKeys = wisdoms.keySet();
-        List<EndpointAddress> res = new ArrayList<EndpointAddress>(allKeys);
-
-        return res;
-    }
-
-    /*
-     * information output
-     */
-
-    /**
-     * If there is a messenger at hand (incoming or otherwise), return it.
-     *
-     * @param destination The destination as an endpoint address (is automatically normalized to protocol and address only).
-     * @return A messenger to that destination if a resolved and usable one is available or can be made instantly. null otherwise.
-     */
-    public synchronized Messenger getCurrentMessenger(EndpointAddress destination) {
-        Wisdom wisdom = getWisdom(destination);
-
-        if (wisdom == null) {
-            return null;
-        }
-        return wisdom.getCurrentMessenger();
-    }
-
-    /**
-     * Is it likely that one can be made from this end. (the last attempt succeeded, not only incoming, and that was not long ago) ?
-     * This is a conservative test. It means that declaring that we can route to that destination is a very safe bet, as opposed
-     * to isNormallyReachable and getCurrentMessenger, which could be misleading if the only messenger we can ever get is incoming.
-     * Not currently used. Should likely be.
-     *
-     * @param destination The destination as an endpoint address (is automatically normalized to protocol and address only).
-     * @return true if it is likely that we can get a messenger to that destination in the future.
-     */
-    public synchronized boolean isNormallyReachable(EndpointAddress destination) {
-        Wisdom wisdom = getWisdom(destination);
-
-        return ((wisdom != null) && wisdom.isNormallyReachable());
-    }
-
-    /**
-     * Do we already have a messenger or is it likely that we can make one? 
-     * We is will return {@code true} more often than 
-     * {@code isNormallyReachable()} since it can be true even when all we have 
-     * is an incoming messenger.
-     * 
-     * <p/>Just testing that there is an entry is no-longer the same because we
-     * may keep the entries beyond the point where we would keep them before, so
-     * that we can add some longer-lived information in the future, and do not 
-     * interfere as much with the gc thread.
-     *
-     * @param destination The destination as an endpoint address (is automatically normalized to protocol and address only).
-     * @return true is we are confident that we can obtain a messenger, either because we can get one instantly, or because
-     *         this destination is normally reachable. (So, it is ok to try and route to that destination, now).
-     */
-    public synchronized boolean isCurrentlyReachable(EndpointAddress destination) {
-        Wisdom wisdom = getWisdom(destination);
-
-        return ((wisdom != null) && wisdom.isCurrentlyReachable());
-    }
-
-    /**
-     * Are we supposed to send a welcome to that destination (we can't remember having done it).
-     * It is assumed that once true was returned, it will be acted upon. So, true is not returned a second time.
-     *
-     * @param destination The destination as an endpoint address (is automatically normalized to protocol and address only).
-     * @return true if this a destination to whish we can't remember sending a welcome message.
-     */
-    public synchronized boolean isWelcomeNeeded(EndpointAddress destination) {
-        Wisdom wisdom = getWisdom(destination);
-
-        return ((wisdom != null) && wisdom.isWelcomeNeeded());
-    }
-
-    /*
-     * information input.
-     */
-
-    /**
-     * Here is a messenger that we were able to obtain.
-     *
-     * @param destination The destination as an endpoint address (is automatically normalized to protocol and address only).
-     * @param messenger   The incoming messenger for that destination.
-     * @return true if this messenger was added (keep it open). false otherwise (do what you want with it).
-     */
-    public synchronized boolean addOutgoingMessenger(EndpointAddress destination, Messenger messenger) {
-        Wisdom wisdom = getWisdom(destination);
-
-        if (wisdom != null) {
-            return wisdom.addOutgoingMessenger(messenger);
-        }
-        addWisdom(destination, new Wisdom(messenger, false));
-        return true;
-    }
-
-    /**
-     * Here is an incoming messenger that just popped out.
-     *
-     * @param destination The destination as an endpoint address (is automatically normalized to protocol and address only).
-     * @param messenger   The incoming messenger for that destination.
-     * @return true if this messenger was added (keep it open). false otherwise (do what you want with it).
-     */
-    public synchronized boolean addIncomingMessenger(EndpointAddress destination, Messenger messenger) {
-        Wisdom wisdom = getWisdom(destination);
-
-        if (wisdom != null) {
-            return wisdom.addIncomingMessenger(messenger);
-        }
-        addWisdom(destination, new Wisdom(messenger, true));
-        return true;
-    }
-
-    /**
-     * We tried to get a messenger but could not. We know that we do not have connectivity from our end, for now.  we may still
-     * have an incoming. However, if we had to try and make a messenger, there probably isn't an incoming, but that's not our
-     * business here. isNormallyReachable becomes false; but we can still try when solicited.
-     *
-     * @param destination The destination as an endpoint address (is automatically normalized to protocol and address only).
-     */
-    public synchronized void noOutgoingMessenger(EndpointAddress destination) {
-        Wisdom wisdom = getWisdom(destination);
-
-        if (wisdom != null) {
-            wisdom.noOutgoingMessenger();
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/EndpointRouter.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/EndpointRouter.java
deleted file mode 100644 (file)
index 1db2238..0000000
+++ /dev/null
@@ -1,2715 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.endpoint.router;
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.XMLElement;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointListener;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageReceiver;
-import net.jxta.endpoint.MessageSender;
-import net.jxta.endpoint.MessageTransport;
-import net.jxta.endpoint.Messenger;
-import net.jxta.endpoint.MessengerEvent;
-import net.jxta.endpoint.MessengerEventListener;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.impl.endpoint.LoopbackMessenger;
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.impl.util.TimerThreadNamer;
-import net.jxta.logging.Logging;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.platform.Module;
-import net.jxta.protocol.AccessPointAdvertisement;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.RouteAdvertisement;
-import net.jxta.service.Service;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Timer;
-import java.util.TimerTask;
-import java.util.Vector;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-public class EndpointRouter implements EndpointListener, MessageReceiver, MessageSender, MessengerEventListener, Module {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(EndpointRouter.class.getName());
-
-    /**
-     * Until we decide otherwise, the router is *by definition* handling
-     * virtually addressed messages.
-     */
-    private final static String ROUTER_PROTOCOL_NAME = "jxta";
-
-    /**
-     * Router Service Name
-     */
-    private final static String ROUTER_SERVICE_NAME = "EndpointRouter";
-
-    /**
-     * how long we are willing to wait for a response from an async
-     * getMessenger. We do not wait long at all because it is non-critical
-     * that we get the answer synchronously. The goal is to avoid starting
-     * a route discovery if there's a chance to get a direct connection.
-     * However, we will still take advantage of the direct route if it is
-     * found while we wait for the route discovery result. If that happens,
-     * the only wrong is that we used some bandwidth doing a route discovery
-     * that wasn't needed after all.
-     */
-    public final static long ASYNC_MESSENGER_WAIT = 3L * TimeUtils.ASECOND;
-
-    /**
-     * MessageTransport Control operation
-     */
-    public final static Integer GET_ROUTE_CONTROL = 0; // Return RouteControl Object
-    public final static int RouteControlOp = 0; // Return RouteControl Object
-
-    /**
-     * MAX timeout (seconds) for route discovery after that timeout
-     * the peer will bail out from finding a route
-     */
-    private final static long MAX_FINDROUTE_TIMEOUT = 60L * TimeUtils.ASECOND;
-
-    /**
-     * How long do we wait (seconds) before retrying to make a connection
-     * to an endpoint destination
-     */
-    private final static long MAX_ASYNC_GETMESSENGER_RETRY = 30L * TimeUtils.ASECOND;
-
-    /**
-     * These are peers which we know multi-hop routes for.
-     */
-    private final Map<ID, RouteAdvertisement> routedRoutes = new HashMap<ID, RouteAdvertisement>(16);
-
-    /**
-     * A record of failures.
-     * <p/>
-     * Values are the time of failure as {@link java.lang.Long}. If
-     * {@code Long.MAX_VALUE} then a connect attempt is current in progress.
-     */
-    private final Map<PeerID, Long> triedAndFailed = new HashMap<PeerID, Long>();
-
-    /**
-     * local peer ID as an endpointAddress.
-     */
-    private EndpointAddress localPeerAddr = null;
-
-    /**
-     * local Peer ID
-     */
-    private PeerID localPeerId = null;
-
-    /**
-     * The Endpoint Service we are routing for.
-     */
-    private EndpointService endpoint = null;
-
-    /**
-     * PeerGroup handle
-     */
-    private PeerGroup group = null;
-
-    private ID assignedID = null;
-    
-    /**
-     * If {@code true} this service has been closed.
-     */
-    private boolean stopped = false;
-
-    /**
-     * Whenever we initiate connectivity to a peer (creating a direct route).
-     * we remember that we need to send our route adv to that peer. So that
-     * it has a chance to re-establish the connection from its side, if need
-     * be. The route adv is actually sent piggy-backed on the first message
-     * that goes there.
-     */
-    private final Set<EndpointAddress> newDestinations = Collections.synchronizedSet(new HashSet<EndpointAddress>());
-
-    /**
-     * A pool of messengers categorized by logical address.
-     * This actually is the direct routes map.
-     */
-    private Destinations destinations;
-
-    /**
-     * A record of expiration time of known bad routes we received a NACK route
-     */
-    private final Map<EndpointAddress, BadRoute> badRoutes = new HashMap<EndpointAddress, BadRoute>();
-
-    /**
-     * We record queries when first started and keep them pending for
-     * a while. Threads coming in the meanwhile wait for a result without
-     * initiating a query. Thus threads may wait passed the point where
-     * the query is no-longer pending, and, although they could initiate
-     * a new one, they do not.
-     * <p/>
-     * However, other threads coming later may initiate a new query. So a
-     * query is not re-initiated systematically on a fixed schedule. This
-     * mechanism also serves to avoid infinite recursions if we're looking
-     * for the route to a rendezvous (route queries will try to go there
-     * themselves).
-     * <p/>
-     * FIXME: jice@jxta.org 20020903 this is approximate. We can do
-     * cleaner/better than this, but it's already an inexpensive improvement
-     * over what used before.
-     * <p/>
-     * FIXME: tra@jxta.org 20030818 the pending hashmap should be moved
-     * in the routeResolver class.
-     */
-    private final Map<PeerID, ClearPendingQuery> pendingQueries = 
-            Collections.synchronizedMap(new HashMap<PeerID, ClearPendingQuery>());
-
-    /**
-     * Timer by which we schedule the clearing of pending queries.
-     */
-    private final Timer timer = new Timer("EndpointRouter Timer", true);
-
-    /**
-     * PeerAdv tracking.
-     * The peer adv is modified every time a new public address is
-     * enabled/disabled. One of such cases is the connection/disconnection
-     * from a relay. Since these changes are to the embedded route adv
-     * and since we may embed our route adv in messages, we must keep it
-     * up-to-date.
-     */
-    private PeerAdvertisement lastPeerAdv = null;
-    private int lastModCount = -1;
-
-    /**
-     * Route info for the local peer (updated along with lastPeerAdv).
-     */
-    private RouteAdvertisement localRoute = null;
-
-    /**
-     * Route CM persistent cache
-     */
-    private RouteCM routeCM = null;
-
-    /**
-     * Route Resolver
-     */
-    private RouteResolver routeResolver;
-
-    class ClearPendingQuery extends TimerTask {
-        final PeerID peerID;
-        volatile boolean failed = false;
-        long nextRouteResolveAt = 0;
-
-        ClearPendingQuery(PeerID peerID) {
-            this.peerID = peerID;
-            // We schedule for one tick at one minute and another at 5 minutes
-            // after the second, we cancel ourselves.
-            timer.schedule(this, TimeUtils.AMINUTE, 5L * TimeUtils.AMINUTE);
-            nextRouteResolveAt = TimeUtils.toAbsoluteTimeMillis(20L * TimeUtils.ASECOND);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public void run() {
-            try {
-                if (failed) {
-                    // Second tick.
-                    // This negative cache info is expired.
-                    pendingQueries.remove(peerID);
-
-                    this.cancel();
-                } else {
-                    // First timer tick. We're done trying. This is now a negative
-                    // cache info. For the next 5 minutes that destination fails
-                    // immediately unless it unexpectedly gets finaly resolved.
-                    failed = true;
-                }
-            } catch (Throwable all) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Uncaught Throwable in timer task " + Thread.currentThread().getName() + " for " + peerID, all);
-                }
-            }
-        }
-
-        public synchronized boolean isTimeToResolveRoute() {
-            if (TimeUtils.toRelativeTimeMillis(nextRouteResolveAt) > 0) {
-                return false;
-            }
-            // nextRouteResolveAt is passed. Set the next time to retry from now.
-            nextRouteResolveAt = TimeUtils.toAbsoluteTimeMillis(20L * TimeUtils.ASECOND);
-            return true;
-        }
-
-        public boolean isFailed() {
-            return failed;
-        }
-    }
-
-    RouteAdvertisement getMyLocalRoute() {
-
-        // Update our idea of the local peer adv. If it has change,
-        // update our idea of the local route adv.
-        // If nothing has changed, do not do any work.
-        // In either case, return the local route adv as it is after this
-        // refresh.
-
-        // Race condition possible but tolerable: if two threads discover
-        // the change in the same time, lastPeerAdv and lastModCount
-        // could become inconsistent. That'll be straightened out the
-        // next time someone looks. The inconsistency can only trigger
-        // an extraneous update.
-
-        PeerAdvertisement newPadv = group.getPeerAdvertisement();
-        int newModCount = newPadv.getModCount();
-
-        if ((lastPeerAdv != newPadv) || (lastModCount != newModCount) || (null == localRoute)) {
-            lastPeerAdv = newPadv;
-            lastModCount = newModCount;
-        } else {
-            // The current version is good.
-            return localRoute;
-        }
-
-        // Get its EndpointService advertisement
-        XMLElement endpParam = (XMLElement)
-                newPadv.getServiceParam(PeerGroup.endpointClassID);
-
-        if (endpParam == null) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("no Endpoint SVC Params");
-            }
-
-            // Return whatever we had so far.
-            return localRoute;
-        }
-
-        // get the Route Advertisement element
-        Enumeration paramChilds = endpParam.getChildren(RouteAdvertisement.getAdvertisementType());
-        XMLElement param;
-
-        if (paramChilds.hasMoreElements()) {
-            param = (XMLElement) paramChilds.nextElement();
-        } else {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("no Endpoint Route Adv");
-            }
-
-            // Return whatever we had so far.
-            return localRoute;
-        }
-
-        // build the new route
-        try {
-            // Stick the localPeerID in-there, since that was what
-            // every single caller of getMyLocalRoute did so far.
-
-            RouteAdvertisement route = (RouteAdvertisement) AdvertisementFactory.newAdvertisement(param);
-
-            route.setDestPeerID(localPeerId);
-            localRoute = route;
-        } catch (Exception ex) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failure extracting route", ex);
-            }
-        }
-
-        return localRoute;
-    }
-
-    /**
-     * listener object to synchronize on asynchronous getMessenger
-     */
-    private static class EndpointGetMessengerAsyncListener implements MessengerEventListener {
-
-        private final EndpointRouter router;
-        private final EndpointAddress logDest;
-
-        volatile boolean hasResponse = false;
-        volatile boolean isGone = false;
-        private Messenger messenger = null;
-
-        /**
-         * Constructor
-         *
-         * @param router the router
-         * @param dest   logical destination
-         */
-        EndpointGetMessengerAsyncListener(EndpointRouter router, EndpointAddress dest) {
-            this.router = router;
-            this.logDest = dest;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public boolean messengerReady(MessengerEvent event) {
-
-            Messenger toClose = null;
-
-            synchronized (this) {
-                hasResponse = true;
-                if (event != null) {
-                    messenger = event.getMessenger();
-                    if (null != messenger) {
-                        if(!logDest.equals(messenger.getLogicalDestinationAddress())) {
-                            // Ooops, wrong number !
-                            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                                LOG.warning("Incorrect Messenger logical destination : " + logDest + "!=" + messenger.getLogicalDestinationAddress());
-                            }
-
-                            toClose = messenger;
-                            messenger = null;
-                        }
-                    } else {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.warning("null messenger for dest :" + logDest);
-                        }
-                    }
-                } else {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("null messenger event for dest :" + logDest);
-                    }
-                }
-            }
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                if (messenger == null) {
-                    LOG.fine("error creating messenger for dest :" + logDest);
-                } else {
-                    LOG.fine("got a new messenger for dest :" + logDest);
-                }
-            }
-
-            // We had to release the lock on THIS before we can get the lock on
-            // the router. (Or face a dead lock - we treat this as a lower level
-            // lock)
-
-            if (messenger == null) {
-                if (toClose != null) {
-                    toClose.close();
-                }
-
-                // we failed to get a messenger, we need to update the try and
-                // failed as it currently holds an infinite timeout to permit
-                // another thread to retry that destination. We only retry
-                // every MAX_ASYNC_GETMESSENGER_RETRY seconds
-
-                router.noMessenger(logDest);
-
-                synchronized (this) {
-                    // Only thing that can happen is that we notify for nothing
-                    // We took the lock when updating hasResult, so, the event
-                    // will not be missed. 
-                    // FIXME It would be more logical to let the waiter do the 
-                    // above if (!isGone) as in the case of success below. 
-                    // However, we'll minimize changes for risk management 
-                    // reasons.
-                    notify();
-                }
-                return false;
-            }
-
-            // It worked. Update router cache entry if we have to.
-
-            synchronized (this) {
-                if (!isGone) {
-                    notify(); // Waiter will do the rest.
-                    return true;
-                }
-            }
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("async caller gone add the messenger " + logDest);
-            }
-            return router.newMessenger(event);
-        }
-
-        /**
-         * Wait on the async call for ASYNC_MESSENGER_WAIT
-         * then bailout. The messenger will be added whenever
-         * the async getMessenger will return
-         *
-         * @param quick if true return a messenger immediately if available,
-         *              otherwise wait the Messenger resolution to be completed
-         * @return the Messenger if one available
-         */
-        public synchronized Messenger waitForMessenger(boolean quick) {
-            if (!quick) {
-                long quitAt = TimeUtils.toAbsoluteTimeMillis(ASYNC_MESSENGER_WAIT);
-
-                while (TimeUtils.toRelativeTimeMillis(quitAt) > 0) {
-                    try {
-                        // check if we got a response already
-                        if (hasResponse) { // ok, we got a response
-                            break;
-                        }
-                        wait(ASYNC_MESSENGER_WAIT);
-                    } catch (InterruptedException woken) {
-                        Thread.interrupted();
-                        break;
-                    }
-                }
-            }
-
-            // mark the fact that the caller is bailing out
-            isGone = true;
-            return messenger;
-        }
-    }
-
-    /**
-     * isLocalRoute is a shallow test. It tells you that there used to be a
-     * local route that worked the last time it was tried.
-     *
-     * @param peerAddress Address of the destination who's route is desired.
-     * @return {@code true} if we know a direct route to the specified address
-     *         otherwise {@code false}.
-     */
-    boolean isLocalRoute(EndpointAddress peerAddress) {
-        return destinations.isCurrentlyReachable(peerAddress);
-    }
-
-    /**
-     * Get a Messenger for the specified destination if a direct route is known.
-     *
-     * @param peerAddress The peer who's messenger is desired.
-     * @param hint        A route hint to use if a new Messenger must be created.
-     * @return Messenger for direct route or {@code null} if none could be
-     *         found or created.
-     */
-    Messenger ensureLocalRoute(EndpointAddress peerAddress, RouteAdvertisement hint) {
-
-        // We need to make sure that there is a possible connection to that peer
-        // If we have a decent (not closed, busy or available) transport 
-        // messenger in the pool, then we're done. Else we activly try to make 
-        // one.
-
-        // See if we already have a messenger.
-        Messenger messenger = destinations.getCurrentMessenger(peerAddress);
-
-        if (messenger != null) {
-            return messenger;
-        }
-
-        // Ok, try and make one. Pass the route hint info
-        messenger = findReachableEndpoint(peerAddress, false, hint);
-        if (messenger == null) {
-            // We must also zap it from our positive cache: if we remembered it 
-            // working, we should think again.
-            destinations.noOutgoingMessenger(peerAddress);
-            return null; // No way.
-        }
-
-        destinations.addOutgoingMessenger(peerAddress, messenger);
-
-        // We realy did bring something new. Give relief to those that have been
-        // waiting for it.
-        synchronized (this) {
-            notifyAll();
-        }
-
-        // NOTE to maintainers: Do not remove any negative cache info
-        // or route here. It is being managed by lower-level routines.
-        // The presence of a messenger in the pool has many origins,
-        // each case is different and taken care of by lower level
-        // routines.
-        return messenger;
-    }
-
-    /**
-     * Send a message to a given logical destination if it maps to some
-     * messenger in our messenger pool or if such a mapping can be found and
-     * added.
-     *
-     * @param destination peer-based address to send the message to.
-     * @param message     the message to be sent.
-     * @throws java.io.IOException if an io error occurs
-     */
-    void sendOnLocalRoute(EndpointAddress destination, Message message) throws IOException {
-
-        IOException lastIoe = null;
-        Messenger sendVia;
-
-        // Try sending the message as long as we get have transport messengers
-        // to try with. They close when they fail, which puts them out of cache
-        // or pool if any, so we will not see a broken one a second time. We'll
-        // try the next one until we run out of options.
-
-        while ((sendVia = ensureLocalRoute(destination, null)) != null) {
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Sending " + message + " to " + destination + " via " + sendVia);
-            }
-
-            try {
-                // FIXME 20040413 jice Maybe we should use the non-blocking mode
-                // and let excess messages be dropped given the threading issue
-                // still existing in the input circuit (while routing messages
-                // through).
-
-                sendVia.sendMessageB(message, EndpointRouter.ROUTER_SERVICE_NAME, null);
-
-                // If we reached that point, we're done.
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Sent " + message + " to " + destination);
-                }
-                return;
-
-            } catch (IOException ioe) {
-                // Can try again, with another messenger (most likely).
-                lastIoe = ioe;
-            }
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Trying next messenger to " + destination);
-            }
-            // try the next messenger if there is one.
-        }
-
-        // Now see why we're here.
-        // If we're here for no other reason than failing to get a messenger
-        // say so. Otherwise, report the failure from the last time we tried.
-        if (lastIoe == null) {
-            lastIoe = new IOException("No reachable endpoints for " + destination);
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.log(Level.FINE, "Could not send to " + destination, lastIoe);
-        }
-
-        throw lastIoe;
-    }
-
-    /**
-     * Default constructor
-     */
-    public EndpointRouter() {
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void init(PeerGroup group, ID assignedID, Advertisement impl) throws PeerGroupException {
-
-        timer.schedule(new TimerThreadNamer("EndpointRouter Timer for " + group.getPeerGroupID()), 0);
-
-        this.group = group;
-        this.assignedID = assignedID;
-        ModuleImplAdvertisement implAdvertisement = (ModuleImplAdvertisement) impl;
-
-        localPeerId = group.getPeerID();
-        localPeerAddr = pid2addr(group.getPeerID());
-
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring Router Transport : " + assignedID);
-
-            if (implAdvertisement != null) {
-                configInfo.append("\n\tImplementation :");
-                configInfo.append("\n\t\tModule Spec ID: ").append(implAdvertisement.getModuleSpecID());
-                configInfo.append("\n\t\tImpl Description : ").append(implAdvertisement.getDescription());
-                configInfo.append("\n\t\tImpl URI : ").append(implAdvertisement.getUri());
-                configInfo.append("\n\t\tImpl Code : ").append(implAdvertisement.getCode());
-            }
-
-            configInfo.append("\n\tGroup Params :");
-            configInfo.append("\n\t\tGroup : ").append(group);
-            configInfo.append("\n\t\tPeer ID : ").append(group.getPeerID());
-
-            configInfo.append("\n\tConfiguration :");
-            configInfo.append("\n\t\tProtocol : ").append(getProtocolName());
-            configInfo.append("\n\t\tPublic Address : ").append(localPeerAddr);
-
-            LOG.config(configInfo.toString());
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized int startApp(String[] arg) {
-        endpoint = group.getEndpointService();
-
-        if (null == endpoint) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is an endpoint service");
-            }
-            return START_AGAIN_STALLED;
-        }
-
-        Service needed = group.getResolverService();
-
-        if (null == needed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Endpoint Router start stalled until resolver service available");
-            }
-            return Module.START_AGAIN_STALLED;
-        }
-
-        needed = group.getMembershipService();
-
-        if (null == needed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Endpoint Router start stalled until membership service available");
-            }
-            return Module.START_AGAIN_STALLED;
-        }
-
-        needed = group.getRendezVousService();
-
-        if (null == needed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Endpoint Router start stalled until rendezvous service available");
-            }
-            return Module.START_AGAIN_STALLED;
-        }
-
-        destinations = new Destinations(endpoint);
-
-        try {
-            // FIXME tra 20030818  Should be loaded as a service
-            // when we have service dependency. When loaded as a true service should
-            // not have to pass the EnpointRouter object. The issue is we need an
-            // api to obtain the real object from the PeerGroup API.
-            routeCM = new RouteCM();
-
-            // FIXME tra 20030818  Should be loaded as a service
-            // when we have service dependency. When loaded as a true service should
-            // not have to pass the EnpointRouter object. The issue is we need an
-            // api to obtain the real object from the PeerGroup API.
-            routeResolver = new RouteResolver(this);
-
-            // initialize persistent CM route Cache
-            // FIXME tra 20030818 Should be loaded as service when complete
-            // refactoring is done.
-            routeCM.init(group, assignedID, null);
-
-            // initialize the route resolver
-            // FIXME tra 20030818 Should be loaded as service when complete
-            // refactoring is done.
-            routeResolver.init(group, assignedID, null);
-        } catch (PeerGroupException failure) {
-            return -1;
-        }
-
-        int status;
-
-        // FIXME tra 20031015 Should be started as a service when refactored work
-        // completed
-        status = routeCM.startApp(arg);
-        if (status != 0) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Route CM failed to start : " + status);
-            }
-
-            return status;
-        }
-
-        // FIXME tra 20031015 Should be started as a service when refactored work
-        // completed
-        status = routeResolver.startApp(arg);
-        if (status != 0) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Route Resolver failed to start : " + status);
-            }
-            return status;
-        }
-        // publish my local route adv
-        routeCM.publishRoute(getMyLocalRoute());
-
-        // FIXME tra 20031015 is there a risk for double registration  when 
-        // startApp() is recalled due to failure to get the discovery service
-        // by the Route Resolver service.
-
-        // NOTE: Endpoint needs to be registered before we register the endpoint 
-        // resolver. This is bringing a more complex issue of service loading 
-        // dependencies.
-        endpoint.addMessengerEventListener(this, EndpointService.MediumPrecedence);
-
-        endpoint.addIncomingMessageListener(this, ROUTER_SERVICE_NAME, null);
-
-        if (endpoint.addMessageTransport(this) == null) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("Transport registration refused");
-            }
-
-            return -1;
-        }
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info(group + " : Router Message Transport started.");
-        }
-        return status;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Careful that stopApp() could in theory be called before startApp().
-     */
-    public synchronized void stopApp() {
-        stopped = true;
-        
-        if (endpoint != null) {
-            endpoint.removeIncomingMessageListener(ROUTER_SERVICE_NAME, null);
-            endpoint.removeMessengerEventListener(this, EndpointService.MediumPrecedence);
-            endpoint.removeMessageTransport(this);
-        }
-
-        // FIXME tra 20030818 should be unloaded as a service
-        routeCM.stopApp();
-
-        // FIXME tra 20030818 should be unloaded as a service
-        routeResolver.stopApp();
-
-        destinations.close();
-        
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info(group + " : Router Message Transport stopped.");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isConnectionOriented() {
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean allowsRouting() {
-        // Yes, this is the router, and it does not allow routing.
-        // Otherwise we would have a chicken and egg problem.
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public EndpointService getEndpointService() {
-        return endpoint;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public EndpointAddress getPublicAddress() {
-        return localPeerAddr;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Iterator<EndpointAddress> getPublicAddresses() {
-        return Collections.singletonList(getPublicAddress()).iterator();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getProtocolName() {
-        return ROUTER_PROTOCOL_NAME;
-    }
-
-    /**
-     * Given a peer id, return an address to reach that peer.
-     * The address may be for a directly reachable peer, or
-     * for the first gateway along a route to reach the peer.
-     * If we do not have a route to the peer, we will use the
-     * Peer Routing Protocol to try to discover one.  We will
-     * wait up to 30 seconds for a route to be discovered.
-     *
-     * @param peerAddress the peer we are trying to reach.
-     * @param seekRoute   whether to go as far as issuing a route query, or just fish in our cache.
-     *                    when forwarding a message we allow ourselves to mend a broken source-issued route but we
-     *                    won't go as far as seeking one from other peers. When originating a message, on the other end
-     *                    we will aggressively try to find route.
-     * @param hint        whether we are passed a route hint to be used, in that case that route
-     *                    hint should be used
-     * @return an EndpointAddress at which that peer should be reachable.
-     */
-    EndpointAddress getGatewayAddress(EndpointAddress peerAddress, boolean seekRoute, RouteAdvertisement hint) {
-        PeerID peerID = addr2pid(peerAddress);
-
-        try {
-            // FIXME 20021215 jice Replace this junk with a background task; 
-            // separate the timings of route disco from the timeouts of
-            // the requesting threads. EndpointAddress result = null;
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Searching local" + (seekRoute ? " & remote" : "") + " for route for " + peerAddress);
-            }
-
-            // If we can't get a route within the timeout, give up for now.
-            long quitAt = TimeUtils.toAbsoluteTimeMillis(MAX_FINDROUTE_TIMEOUT);
-
-            // Time we need to wait before we can start issue a find route request
-            // to give a chance for the async messenger to respond (success or failure)
-            long findRouteAt = TimeUtils.toAbsoluteTimeMillis(ASYNC_MESSENGER_WAIT);
-
-            EndpointAddress addr;
-
-            while (TimeUtils.toRelativeTimeMillis(quitAt) > 0) {
-                // Then check if by any chance we can talk to it directly.
-                Messenger directMessenger = ensureLocalRoute(peerAddress, hint);
-
-                if (null != directMessenger) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Found direct route for " + peerAddress + " via " + directMessenger.getDestinationAddress());
-                    }
-                    return peerAddress;
-                }
-
-                // Otherwise, look for a long route.
-                // check if we got a hint. If that's the case use it
-                RouteAdvertisement route;
-
-                if (hint != null) {
-                    route = hint;
-                } else {
-                    route = getRoute(peerAddress, seekRoute);
-                }
-
-                if (route != null && route.size() > 0) {
-                    addr = pid2addr(route.getLastHop().getPeerID());
-                    if (ensureLocalRoute(addr, null) != null) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Found last hop remote address: " + peerAddress + " -> " + route.getLastHop().getPeerID());
-                        }
-
-                        // Ensure local route removes negative cache info about
-                        // addr. We also need to remove that about peerAddress.
-                        return addr;
-                    } else { // need to try the first hop
-                        addr = pid2addr(route.getFirstHop().getPeerID());
-
-                        if (ensureLocalRoute(addr, null) != null) {
-                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                LOG.fine("Found first hop remote address first hop: " + peerAddress + " -> "
-                                          + route.getFirstHop().getPeerID());
-                            }
-
-                            // Ensure local route removes negative cache info about addr.
-                            return addr;
-                        } else {
-                            removeRoute(peerID);
-                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                LOG.fine("Found no reachable route to " + peerAddress);
-                            }
-                        }
-                    }
-                }
-
-                // For messages we didn't originate we don't seek routes.
-                if (!seekRoute) {
-                    break;
-                }
-
-                // Check that route resolution is enabled if
-                // not then bail out, there is nothing more
-                // that we can do.
-                if (!routeResolver.useRouteResolver()) {
-                    break;
-                }
-
-                // due to the asynchronous nature of getting our messenger we
-                // need to handle the multi-entrance of issueing a route
-                // discovery. A route discovery needs to be generated only
-                // either if we have no pending request (it completed or we had
-                // no information so we did not created one), or we tried and
-                // we failed, or we waited at least ASYNC_MESSENGER_WAIT to get
-                // a chance for the async request to respond before we can
-                // issue the route discovery
-                Long nextTry = triedAndFailed.get(peerID);
-
-                if ((nextTry == null) || (nextTry < TimeUtils.toAbsoluteTimeMillis(MAX_ASYNC_GETMESSENGER_RETRY))
-                        || (TimeUtils.toRelativeTimeMillis(findRouteAt) <= 0)) {
-
-                    // If it is already hopeless (negative cache), just give up.
-                    // Otherwise, try and recover the route. If a query is not
-                    // already pending, we may trigger a route discovery before we
-                    // wait. Else, just wait. The main problem we have here is that
-                    // the same may re-enter because the resolver query sent by
-                    // findRoute ends up with the rendezvous service trying to
-                    // resolve the same destiation if the destination  happens to be
-                    // the start of the walk. In that situation we will re-enter
-                    // at every findRoute attempt until the query becomes "failed".
-                    // However, we do want to do more than one findRoute because
-                    // just one attempt can fail for totaly fortuitous or temporary
-                    // reasons. A tradeoff is to do a very limitted number of attempts
-                    // but still more than one. Over the minute for which the query
-                    // is not failed, isTimeToRety will return true at most twice
-                    // so that'll be a total of three attempts: once every 20 seconds.
-                    boolean doFind = false;
-                    ClearPendingQuery t;
-
-                    synchronized (pendingQueries) {
-                        t = pendingQueries.get(peerID);
-
-                        if (t == null) {
-                            doFind = true;
-                            t = new ClearPendingQuery(peerID);
-                            pendingQueries.put(peerID, t);
-                        } else {
-                            if (t.isFailed()) {
-                                break;
-                            }
-                            if (t.isTimeToResolveRoute()) {
-                                doFind = true;
-                            }
-                        }
-                    }
-
-                    // protect against the async messenger request. We only
-                    // look for a route after the first iteration by
-                    // that time we will have bailed out from the async call
-                    if (doFind) {
-                        routeResolver.findRoute(peerAddress);
-                        // we do not need to check the CM, route table will
-                        // be updated when the route response arrive. This reduces
-                        // CM activities when we wait for the route response
-                        seekRoute = false;
-                    }
-                }
-
-                // Now, wait. Responses to our query may occur asynchronously.
-                // threads.
-                synchronized (this) {
-                    // We can't possibly do everything above while synchronized,
-                    // so we could miss an event of interrest. But some changes
-                    // are not readily noticeable anyway, so we must wake up
-                    // every so often to retry.
-                    try {
-                        // we only need to wait if we haven't got a messenger
-                        // yet.
-                        if (destinations.getCurrentMessenger(peerAddress) == null) {
-                            wait(ASYNC_MESSENGER_WAIT);
-                        }
-                    } catch (InterruptedException woken) {
-                        Thread.interrupted();
-                    }
-                }
-            }
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("No route to " + peerAddress);
-            }
-            return null;
-
-        } catch (Exception ex) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "getGatewayAddress exception", ex);
-            }
-            return null;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Deprecated
-    public boolean ping(EndpointAddress addr) {
-
-        EndpointAddress plainAddr = new EndpointAddress(addr, null, null);
-
-        try {
-            return (getGatewayAddress(plainAddr, true, null) != null);
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.FINE, "Ping failure (exception) for : " + plainAddr, e);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Receives notifications of new messengers being generated by the
-     * underlying network transports.
-     * <p/>
-     * IMPORTANT: Incoming messengers only. If/when this is used for
-     * outgoing, some things have to change:
-     * <p/>
-     * For example we do not need to send the welcome msg, but for
-     * outgoing messengers, we would need to.
-     * <p/>
-     * Currently, newMessenger handles the outgoing side.
-     *
-     * @param event the new messenger event.
-     */
-    public boolean messengerReady(MessengerEvent event) {
-
-        Messenger messenger = event.getMessenger();
-        Object source = event.getSource();
-        EndpointAddress logDest = messenger.getLogicalDestinationAddress();
-
-        if (source instanceof MessageSender && !((MessageSender) source).allowsRouting()) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Ignoring messenger to :" + logDest);
-            }
-            return false;
-        }
-
-        // We learned that a transport messenger has just been announced.
-        // Nobody else took it, so far, so we'll take it. Incoming messengers
-        // are not pooled by the endpoint service. We do pool them for our 
-        // exclusive use.
-
-        boolean taken = destinations.addIncomingMessenger(logDest, messenger);
-
-        // Note to maintainers: Do not remove any route or negative cache info
-        // here. Here is why: The messenger we just obtained was made out of an 
-        // incoming connection. It brings no proof whatsoever that the peer is 
-        // reachable at our initiative. In general, there is nothing to gain in
-        // removing our knowlege of a long route, or a pending route query, or a
-        // triedAndFailed record, other than to force trying a newly obtained 
-        // set of addresses. They will not stop us from using this messenger as 
-        // long as it works. The only good thing we can do here, is waking up 
-        // those that may be waiting for a connection.
-
-        synchronized (this) {
-            notifyAll();
-        }
-        return taken;
-    }
-
-    /**
-     * Call when an asynchronous new messenger could not be obtained.
-     *
-     * @param logDest the failed logical destination
-     */
-    void noMessenger(EndpointAddress logDest) {
-
-        // Switch to short timeout if there was an infinite one.
-        // Note if there's one, it is either short or inifinite. So we
-        // look at the value only in the hope it is less expensive
-        // than doing a redundant put.
-
-        PeerID peerID = addr2pid(logDest);
-
-        synchronized (this) {
-            Long curr = triedAndFailed.get(peerID);
-
-            if (curr != null && curr > TimeUtils.toAbsoluteTimeMillis(MAX_ASYNC_GETMESSENGER_RETRY)) {
-                triedAndFailed.put(peerID, TimeUtils.toAbsoluteTimeMillis(MAX_ASYNC_GETMESSENGER_RETRY));
-            }
-        }
-    }
-
-    /**
-     * Call when an asynchronous new messenger is ready.
-     * (name is not great).
-     *
-     * @param event the new messenger event.
-     * @return always returns true
-     */
-    boolean newMessenger(MessengerEvent event) {
-
-        Messenger messenger = event.getMessenger();
-        EndpointAddress logDest = messenger.getLogicalDestinationAddress();
-
-        // We learned that a new transport messenger has just been announced.
-        // We pool it for our exclusive use.
-        destinations.addOutgoingMessenger(logDest, messenger);
-
-        // Here's a new connection. Wakeup those that may be waiting for that.
-        synchronized (this) {
-            notifyAll();
-        }
-        return true;
-    }
-
-    /**
-     * Get the routed route, if any, for a given peer id.
-     *
-     * @param peerAddress the peer who's route is desired.
-     * @param seekRoute   boolean to indicate  if we should search for a route
-     *                    if we don't have one
-     * @return a route advertisement describing the direct route to the peer.
-     */
-    RouteAdvertisement getRoute(EndpointAddress peerAddress, boolean seekRoute) {
-
-        ID peerID = addr2pid(peerAddress);
-
-        // check if we have a valid route
-        RouteAdvertisement route;
-
-        synchronized (this) {
-            route = routedRoutes.get(peerID);
-        }
-        if (route != null || !seekRoute) { // done
-            return route;
-        }
-
-        // No known route and we're allowed to search for one
-
-        // check if there is route advertisement available
-        Iterator<RouteAdvertisement> allRadvs = routeCM.getRouteAdv(peerID);
-
-        while (allRadvs.hasNext()) {
-            route = allRadvs.next();
-            Vector<AccessPointAdvertisement> hops = route.getVectorHops();
-
-            // no hops, uninterresting: this needs to be a route
-            if (hops.isEmpty()) {
-                continue;
-            }
-
-            // let's check if we can speak to any of the hops in the route
-            // we try them in reverse order so we shortcut the route
-            // in the process
-            RouteAdvertisement newRoute = (RouteAdvertisement)
-                    AdvertisementFactory.newAdvertisement(RouteAdvertisement.getAdvertisementType());
-
-            newRoute.setDest(route.getDest().clone());
-            Vector<AccessPointAdvertisement> newHops = new Vector<AccessPointAdvertisement>();
-
-            // build the route from the available hops
-            for (int i = hops.size() - 1; i >= 0; i--) {
-                ID hopID = hops.elementAt(i).getPeerID();
-
-                // If the local peer is one of the first reachable
-                // hop in the route, that route is worthless to us.
-                if (localPeerId.equals(hopID)) {
-                    break;
-                }
-
-                EndpointAddress addr = pid2addr(hopID);
-
-                if (ensureLocalRoute(addr, null) != null) {
-                    // we found a valid hop return the corresponding
-                    // route from that point
-                    for (int j = i; j <= hops.size() - 1; j++) {
-                        newHops.add(hops.elementAt(j).clone());
-                    }
-                    // make sure we have a real route at the end
-                    if (newHops.isEmpty()) {
-                        break;
-                    }
-
-                    newRoute.setHops(newHops);
-                    // try to set the route
-                    if (setRoute(newRoute, false)) {
-                        // We got one; we're done.
-                        return newRoute;
-                    } else {
-                        // For some reason the route table does not
-                        // want that route. Move on to the next adv; it
-                        // unlikely that a longer version of the same would
-                        // be found good.
-                        break;
-                    }
-                }
-            }
-        }
-
-        // no route found
-        return null;
-    }
-
-    /**
-     * Check if a route is valid.
-     * Currently, only loops are detected.
-     *
-     * @param routeAdvertisement The route to check.
-     * @return {@code true} if the route is valid otherwise {@code false}.
-     */
-    private boolean checkRoute(RouteAdvertisement routeAdvertisement) {
-
-        if (0 == routeAdvertisement.size()) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("route is empty");
-            }
-            return false;
-        }
-
-        if (routeAdvertisement.containsHop(localPeerId)) {
-            // The route does contain this local peer. Using this route
-            // would create a loop. Discard.
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("route contains this peer - loopback");
-            }
-            return false;
-        }
-
-        PeerID destPid = routeAdvertisement.getDest().getPeerID();
-
-        if (routeAdvertisement.containsHop(destPid)) {
-            // May be it is fixable, may be not. See to it.
-            Vector<AccessPointAdvertisement> hops = routeAdvertisement.getVectorHops();
-
-            // It better be the last hop. Else this is a broken route.
-            hops.remove(hops.lastElement());
-            if (routeAdvertisement.containsHop(destPid)) {
-                // There was one other than last: broken route.
-                return false;
-            }
-        }
-
-        if (routeAdvertisement.hasALoop()) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("route has a loop ");
-            }
-            return false;
-        } else {
-            // Seems to be a potential good route.
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("route is ok");
-            }
-            return true;
-        }
-    }
-
-    // Adds a new long route provided there not a direct one already.
-    // Replaces any longer route.  return true if the route was truely new.
-    // The whole deal must be synch. We do not want to add a long route
-    // while a direct one is being added in parallell or other stupid things like that.
-
-    /**
-     * set new route info
-     *
-     * @param route new route to learn
-     * @param force true if the route was obtained by receiving
-     *              a message
-     * @return true if route was truly new
-     */
-    boolean setRoute(RouteAdvertisement route, boolean force) {
-        PeerID peerID;
-        EndpointAddress peerAddress;
-        boolean pushNeeded = false;
-        boolean status;
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("setRoute:");
-        }
-
-        if (route == null) {
-            return false;
-        }
-
-        synchronized (this) {
-            try {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine(route.display());
-                }
-                peerID = route.getDest().getPeerID();
-                peerAddress = pid2addr(peerID);
-
-                // Check if we are in the case where we are
-                // setting a new route as we received a message
-                // always force the new route setup when we received a
-                // a message
-                if (!force) {
-                    // check if we have some bad NACK route info for
-                    // this destination
-                    BadRoute badRoute = badRoutes.get(peerAddress);
-
-                    if (badRoute != null) {
-                        Long nextTry = badRoute.getExpiration();
-
-                        if (nextTry > System.currentTimeMillis()) {
-                            // check if the route we have in the NACK cache match the
-                            // new one. Need to make sure that we clean the route
-                            // from any endpoint addresses as the badRoute cache only
-                            // contains PeerIDs
-                            RouteAdvertisement routeClean = route.cloneOnlyPIDs();
-
-                            if (routeClean.equals(badRoute.getRoute())) {
-                                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                    LOG.fine("try to use a known bad route");
-                                }
-                                return false;
-                            }
-                        } else {
-                            // expired info, just flush NACK route cache
-                            badRoutes.remove(peerAddress);
-                        }
-                    }
-                } else {
-                    // we get a new route
-                    badRoutes.remove(peerAddress);
-                }
-
-                // Check if the route makes senses (loop detection)
-                if (!checkRoute(route)) {
-                    // Route is invalid. Drop it.
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Route is invalid");
-                    }
-                    return false;
-                }
-
-                // check if we can reach the first hop in the route
-                // We only do a shallow test of the first hop. Whether more effort
-                // is worth doing or not is decided (and done) by the invoker.
-                if (!isLocalRoute(pid2addr(route.getFirstHop().getPeerID()))) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Unreachable route - ignore");
-                    }
-                    return false;
-                }
-
-            } catch (Exception ez1) {
-                // The vector must be empty, which is not supposed to happen.
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Got an empty route - discard" + route.display());
-                }
-                return false;
-            }
-
-            // add the new route
-            try {
-                // push the route to SRDI only if it is a new route. the intent is
-                // to minimize SRDI traffic. The SRDIinformation is more of the order
-                // this peer has a route to this destination, it does not need to be
-                // updated verey time the route is updated. Information about knowing
-                // that this peer has a route is more important that the precise
-                // route information
-
-                // SRDI is run only if the peer is acting as a rendezvous
-                if (group.isRendezvous()) {
-                    if (!routedRoutes.containsKey(peerID)) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("push new SRDI route " + peerID);
-                        }
-                        pushNeeded = true;
-                    }
-                }
-
-                // new route so publish the known route in our cache
-                if (!routedRoutes.containsKey(peerID)) {
-                    routeCM.createRoute(route);
-                    newDestinations.add(peerAddress);
-                }
-
-                // Remove any endpoint addresses from the route
-                // as part of the cloning. We just keep track
-                // of PIDs in our route table
-                RouteAdvertisement newRoute = route.cloneOnlyPIDs();
-
-                routedRoutes.put(peerID, newRoute);
-
-                // We can get rid of any negative info we had. We have
-                // a new and different route.
-                badRoutes.remove(peerAddress);
-                notifyAll(); // Wakeup those waiting for a route.
-                status = true;
-            } catch (Exception e2) {
-                // We failed, leave things as they are.
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("   failed setting route with " + e2);
-                }
-                status = false;
-            }
-        }
-        // due to the potential high latency of making the
-        // srdi revolver push we don't want to hold the lock
-        // on the EndpointRouter object as we may have to
-        // discover a new route to a rendezvous
-        if (pushNeeded && status) {
-            // we are pushing the SRDI entry to a replica peer
-            routeResolver.pushSrdi(null, peerID);
-        }
-        return status;
-    }
-
-    /**
-     * This method is used to remove a route
-     *
-     * @param peerID route to peerid to be removed
-     */
-    void removeRoute(PeerID peerID) {
-        boolean needRemove;
-
-        synchronized (this) {
-            needRemove = false;
-            if (routedRoutes.containsKey(peerID)) {
-                if (group.isRendezvous()) {
-                    // Remove the SRDI cache entry from the SRDI cache
-                    needRemove = true;
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("remove SRDI route " + peerID);
-                    }
-                }
-                routedRoutes.remove(peerID);
-            }
-        }
-
-        // due to the potential high latency of pushing
-        // the SRDI message we don't want to hold the EndpointRouter
-        // object lock
-        if (needRemove) {
-            // We are trying to flush it from the replica peer
-            // Note: this is not guarantee to work if the peerview
-            // is out of sync. The SRDI index will be locally
-            // repaired as the peerview converge
-            routeResolver.removeSrdi(null, peerID);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void processIncomingMessage(Message msg, EndpointAddress srcAddr, EndpointAddress dstAddr) {
-        EndpointAddress srcPeerAddress;
-        EndpointAddress destPeer;
-        EndpointAddress lastHop = null;
-        boolean connectLastHop = false;
-        EndpointAddress origSrcAddr;
-        EndpointAddress origDstAddr;
-        Vector origHops = null; // original route of the message
-        EndpointRouterMessage routerMsg;
-        EndpointAddress nextHop = null;
-        RouteAdvertisement radv;
-
-        // We do not want the existing header to be ignored of course.
-        routerMsg = new EndpointRouterMessage(msg, false);
-        if (!routerMsg.msgExists()) {
-            // The sender did not use this router
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Discarding " + msg + ". No routing info.");
-            }
-            return;
-        }
-
-        try {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(routerMsg.display());
-            }
-            origSrcAddr = routerMsg.getSrcAddress();
-            origDstAddr = routerMsg.getDestAddress();
-
-            // convert the src and dest addresses into canonical
-            // form stripping service info
-            srcPeerAddress = new EndpointAddress(origSrcAddr, null, null);
-            destPeer = new EndpointAddress(origDstAddr, null, null);
-
-            lastHop = routerMsg.getLastHop();
-
-            // See if there's an originator full route adv inthere.
-            // That's a good thing to keep.
-            radv = routerMsg.getRouteAdv();
-            if (radv != null) {
-
-                // publish the full route adv. Also, leave it the
-                // message.  It turns out to be extremely usefull to
-                // peers downstream, specially the destination. If
-                // this here peer wants to embed his own radv, it will
-                // have to wait; the one in the message may not come
-                // again.
-
-                // FIXME - jice@jxta.org 20040413 : all this could wait (couldn't it ?)
-                // until we know it's needed, therefore parsing could wait as well.
-
-                // Looks like a safe bet to try and ensure a
-                // connection in the opposite direction if there
-                // isn't one already.
-
-                if (pid2addr(radv.getDestPeerID()).equals(lastHop)) {
-                    connectLastHop = true;
-                }
-
-                // Make the most of that new adv.
-                setRoute(radv, true);
-                updateRouteAdv(radv);
-            }
-        } catch (Exception badHdr) {
-            // Drop it, we do not even know the destination
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Bad routing header or bad message. Dropping " + msg);
-            }
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Exception: ", badHdr);
-            }
-            return;
-        }
-
-        // Is this a loopback ?
-        if ((srcPeerAddress != null) && srcPeerAddress.equals(localPeerAddr)) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("dropped loopback");
-            }
-            return;
-        }
-
-        // Are we already sending to ourself. This may occur
-        // if some old advertisements for our EA is still
-        // floating around
-        if ((lastHop != null) && lastHop.equals(localPeerAddr)) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("dropped loopback from impersonating Peer");
-            }
-            return;
-        }
-
-        // We have to try and reciprocate the connection, so that we
-        // have chance to learn reverse routes early enough.  If we do
-        // not already have a messenger, then we must know a route adv
-        // for that peer in order to be able to connect. Otherwise,
-        // the attempt will fail and we'll be left with a negative
-        // entry without having realy tried anything.  To prevent that
-        // we rely on the presence of a radv in the router message. If
-        // there's no radv, two possibilities:
-        //
-        // - It is not the first contact from that peer and we already
-        // have tried (with or without success) to reciprocate.
-        //
-        // - It is the first contact from that peer but it has not
-        // embedded its radv. In the most likely case (an edge peer
-        // connecting to a rdv), the edge peer will have no difficulty
-        // finding the reverse route, provided that we do not make a
-        // failed attempt right now.
-        //
-        // Conclusion: if there's no embedded radv in the message, do
-        // nothing.
-
-        if (connectLastHop) {
-            ensureLocalRoute(lastHop, radv);
-        }
-
-        try {
-
-            // Normalize the reverseHops vector from the message and, if it
-            // looks well formed and usefull, learn from it.  Do we have a
-            // direct route to the origin ?  If yes, we'll zap the revers
-            // route in the message: we're a much better router.  else,
-            // learn from it. As a principle we regard given routes to be
-            // better than existing ones.
-            Vector<AccessPointAdvertisement> reverseHops = routerMsg.getReverseHops();
-
-            if (reverseHops == null) {
-                reverseHops = new Vector<AccessPointAdvertisement>();
-            }
-
-            // check if we do not have a direct route
-            // in that case we don't care to learn thelong route
-            if (!isLocalRoute(srcPeerAddress)) {
-                // Check if the reverseRoute info looks correct.
-                if (lastHop != null) {
-                    // since we are putting the lasthop in the
-                    // reverse route to indicate the validity of
-                    // lastop to reach the previous hop, we have
-                    // the complete route, just clone it. (newRoute
-                    // owns the given vector)
-
-                    if ((reverseHops.size() > 0) && reverseHops.firstElement().getPeerID().equals(addr2pid(lastHop))) {
-
-                        // Looks like a good route to learn
-                        setRoute(RouteAdvertisement.newRoute(addr2pid(srcPeerAddress), null, (Vector<AccessPointAdvertisement>) reverseHops.clone()), true);
-
-                    }
-
-                }
-            }
-
-            // If this peer is the final destination, then we're done. Just let
-            // it be pushed up the stack. We must not leave our header;
-            // it is now meaningless and none of the upper layers business.
-            // All we have to do is to supply the end-2-end src and dest
-            // so that the endpoint demux routine can do its job.
-            if (destPeer.equals(localPeerAddr)) {
-                // Removing the header.
-                routerMsg.clearAll();
-                routerMsg.updateMessage();
-                // receive locally
-                endpoint.processIncomingMessage(msg, origSrcAddr, origDstAddr);
-                return;
-            }
-
-            // WATCHOUT: if this peer is part of the reverse route
-            // it means that we've seen that message already: there's
-            // a loop between routers ! If that happens drop that
-            // message as if it was burning our fingers
-
-            // First build the ap that we might add to the reverse route.
-            // We need it to look for ourselves in reverseHops. (contains
-            // uses equals(). equals will work because we always include
-            // in reversehops aps that have only a peerAddress.
-
-            AccessPointAdvertisement selfAp = (AccessPointAdvertisement)
-                    AdvertisementFactory.newAdvertisement(AccessPointAdvertisement.getAdvertisementType());
-
-            selfAp.setPeerID(localPeerId);
-
-            if (reverseHops.contains(selfAp)) {
-
-                // Danger, bail out !
-                // Better not to try to NACK for now, but get rid of our own
-                // route. If we're sollicited again, there won't be a loop
-                // and we may NACK.
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Routing loop detected. Message dropped");
-                }
-                removeRoute(addr2pid(destPeer));
-                return;
-            }
-
-            // Update reverseHops. That is, add ourselves to the list.
-
-            // We will only add the current hop to the reverse
-            // route if we know how to talk back to the previous hop
-            // it is important to point the difference between the lastHop
-            // and the reverse route entry. The lastHop indicates where the
-            // message came from but does not specify whether it is able to
-            // route messages in the other direction. The reverse route, if
-            // present, provides that information.
-
-            // FIXME - jice@jxta.org 20040413 : HERE comes the use of connectLastHop. Could have waited till here.
-
-            if (isLocalRoute(lastHop)) { // ok we have direct route back, at least we hope :-)
-                reverseHops.add(0, selfAp); // Update our vector
-                routerMsg.prependReverseHop(selfAp); // Update the message, this preserves the cache.
-            } else {
-
-                // We cannot talk to our previous hop, well
-                // check if we have route to the src and use it as
-                // our reverse route. We could do more. But let's keep
-                // it to the minimum at this point.
-                RouteAdvertisement newReverseRoute = routedRoutes.get(addr2pid(srcPeerAddress));
-
-                if (newReverseRoute != null) {
-                    // we found a new route back from our cache so let's use it
-                    reverseHops = (Vector<AccessPointAdvertisement>) newReverseRoute.getVectorHops().clone();
-                    // ok add ourselve to the reverse route
-                    reverseHops.add(0, selfAp);
-                } else {
-                    // no new route found, sorry. In the worst
-                    // case it is better to not have reverse route
-                    reverseHops = null;
-                }
-
-                // In both cases above, we replace the hops completely.
-                // The cache is of no use and is lost.
-                routerMsg.setReverseHops(reverseHops);
-            }
-
-            // Get the next peer into the forward route
-            origHops = routerMsg.getForwardHops();
-            if (origHops != null) {
-                nextHop = getNextHop(origHops);
-            }
-
-            // see if we can shortcut to the destination with no effort.
-            // If that works it's all very easy.
-            if (isLocalRoute(destPeer)) {
-
-                // There is a local route - use it
-                // Clear the forward path which is probably wrong
-                routerMsg.setForwardHops(null);
-                nextHop = destPeer;
-            } else {
-                if (nextHop == null) {
-
-                    // No next hop. Use the destPeer instead. (but, unlike when
-                    // we shortcut it deliberately, don't know if we can have a direct route
-                    // yet). This is perfectly normal if we're just the last
-                    // hop before the destination and we have closed the direct connection
-                    // with it since we declared to be a router to it.
-
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("No next hop in forward route - Using destination as next hop");
-                    }
-                    nextHop = destPeer;
-
-                    // That forward path is exhausted. It will not be usefull anymore.
-                    // either we reach the destination directly and there will be
-                    // no need for a NACK further down, or we will need to find an alternate
-                    // route.
-                    routerMsg.setForwardHops(null);
-                }
-
-                // We must be do better than look passively for a direct
-                // route. The negative cache will take care of reducing the
-                // implied load. If we do not, then we never re-establish
-                // a broken local route until the originating peer seeks a
-                // new route. Then the result is roughly the same plus
-                // the overhead of route seeking...worse, if we're in the
-                // path from the originator to it's only rdv, then the
-                // originator does not stand a chance until it re-seeds !
-
-                if (ensureLocalRoute(nextHop, null) == null) {
-
-                    // need to look for a long route.
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Forward route element broken - trying alternate route");
-                    }
-
-                    // While we're at it, we might as well get rid of our own
-                    // route to the destination if it goes through the same hop
-                    // by any chance.
-                    // FIXME: idealy, each time we get a broken local route
-                    // we'd want to get rid of all routes that start from there
-                    // but that's one more map to maintain.
-
-                    RouteAdvertisement route = getRoute(destPeer, false);
-
-                    if (route == null) {
-                        cantRoute("No new route to repair the route - drop message", null, origSrcAddr, destPeer, origHops);
-                        return;
-                    }
-
-                    if (pid2addr(route.getFirstHop().getPeerID()).equals(nextHop)) {
-                        // Our own route is just as rotten as the sender's. Get rid
-                        // of it.
-                        removeRoute(addr2pid(destPeer));
-                        cantRoute("No better route to repair the route - drop message", null, origSrcAddr, destPeer, origHops);
-                        return;
-                    }
-
-                    // optimization to see if we can reach
-                    // directly the last hop of that route
-                    EndpointAddress addr = pid2addr(route.getLastHop().getPeerID());
-
-                    if (isLocalRoute(addr)) {
-                        // FIXME - jice@jxta.org 20030723. Should update our route table to reflect the shortcut.
-
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Found new remote route via : " + addr);
-                        }
-
-                        // set the forward path to null no next hop
-                        // FIXME: Not true. the last hop is not the destination.
-                        // There could be a need for us receiving a NACK and that won't be
-                        // possible. We should leave the next hop in the fw path. Just like
-                        // we do when forwarding along the existing route.
-
-                        routerMsg.setForwardHops(null);
-                    } else { // need to check the first hop
-                        Vector<AccessPointAdvertisement> newHops = (Vector<AccessPointAdvertisement>) route.getVectorHops().clone();
-
-                        // FIXME: remove(0) seems wrong
-                        // There could be a need for us receiving a NACK and that won't be
-                        // possible. We should leave the next hop in the fw path. Just like
-                        // we do when forwarding along the existing route.
-                        addr = pid2addr(newHops.remove(0).getPeerID());
-                        if (!isLocalRoute(addr)) {
-                            // Our own route is provably rotten
-                            // as well. Get rid of it.
-                            removeRoute(addr2pid(destPeer));
-                            cantRoute("No usable route to repair the route - drop message", null, origSrcAddr, destPeer, origHops);
-                            return;
-                        }
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Found new remote route via : " + addr);
-                        }
-
-                        // NB: setForwardHops does not clone.
-                        routerMsg.setForwardHops(newHops);
-                    }
-                    // If we're here. addr is our new nextHop.
-                    nextHop = addr;
-                }
-            }
-
-            // The first time we talk to a peer to which we have
-            // initiated a connection, we must include our local
-            // route adv in the routerMsg. However, we give priority to
-            // a route adv that's already in the message and which we pass along.
-            // In that case, our own will go next time. Note: we care only for
-            // nextHop, not for the final destination. We give our radv to a far
-            // destination only if we originate a message to it; not when forwarding.
-            // JC: give priority to our own radv instead. It can be critical.
-
-            // 20040301 tra: May be the case we haven't yet initialize our
-            // own local route. For example still waiting for our relay connection
-            RouteAdvertisement myRoute = getMyLocalRoute();
-
-            if ((myRoute != null) && destinations.isWelcomeNeeded(nextHop)) {
-                routerMsg.setRouteAdv(myRoute);
-            }
-
-            // We always modify the router message within the message
-            routerMsg.setLastHop(localPeerAddr);
-            routerMsg.updateMessage();
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Trying to forward to " + nextHop);
-            }
-
-            sendOnLocalRoute(nextHop, msg);
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Successfully forwarded to " + nextHop);
-            }
-        } catch (Exception e) {
-            cantRoute("Failed to deliver or forward message for " + destPeer, e, origSrcAddr, destPeer, origHops);
-        }
-    }
-
-    private void cantRoute(String logMsg, Exception exception, EndpointAddress origSrcAddr, EndpointAddress destPeer, Vector origHops) {
-        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-            if (exception == null) {
-                LOG.warning(logMsg);
-            } else {
-                LOG.log(Level.WARNING, logMsg, exception);
-            }
-        }
-        routeResolver.generateNACKRoute(addr2pid(origSrcAddr), addr2pid(destPeer), origHops);
-    }
-
-    /**
-     * Return the address of the next hop in this vector
-     *
-     * @param hops of forward hops in the route
-     * @return next hop to be used
-     */
-    private EndpointAddress getNextHop(Vector hops) {
-        // check if we have a real route
-        if ((hops == null) || (hops.size() == 0)) {
-            return null;
-        }
-
-        // find the next hop.
-        for (Enumeration e = hops.elements(); e.hasMoreElements();) {
-            AccessPointAdvertisement ap = (AccessPointAdvertisement) e.nextElement();
-
-            if (localPeerId.equals(ap.getPeerID())) {
-
-                // If found at the end, no next hop
-                if (!e.hasMoreElements()) {
-                    return null;
-                }
-                return pid2addr(((AccessPointAdvertisement) e.nextElement()).getPeerID());
-            }
-        }
-
-        // The peer is not into the vector. Since we have got that
-        // message, the best we can do is to send it to the first gateway
-        // in the forward path.
-        return pid2addr(((AccessPointAdvertisement) hops.elementAt(0)).getPeerID());
-    }
-
-    /**
-     * lame hard-coding
-     *
-     * @param p message transport
-     * @return true if fast
-     */
-    private boolean isFast(MessageTransport p) {
-        String name = p.getProtocolName();
-
-        return name.equals("tcp") || name.equals("beep");
-    }
-
-    private boolean isRelay(MessageTransport p) {
-        String name = p.getProtocolName();
-
-        return name.equals("relay");
-    }
-
-    /**
-     * Given a list of addresses, find the best reachable endpoint.
-     * <p/>
-     * <ul>
-     * <li>The address returned must be reachable.</li>
-     * <li>We prefer an address whose protocol is, in order:</li>
-     * <ol>
-     * <li>connected and fast.</li>
-     * <li>connected and slow.</li>
-     * <li>unconnected and fast.</li>
-     * <li>unconnected and slow</li>
-     * </ol></li>
-     * </ul>
-     *
-     * @param dest      destination address.
-     * @param mightWork A list of addresses to evaluate reachability.
-     * @param exist     true if there already are existing messengers for
-     *                  the given destinations but we want one more. It may lead us to reject
-     *                  certain addresses that we would otherwise accept.
-     * @return The endpoint address for which we found a local route otherwise
-     *         null
-     */
-    Messenger findBestReachableEndpoint(EndpointAddress dest, List<EndpointAddress> mightWork, boolean exist) {
-
-        List<Integer> rankings = new ArrayList<Integer>(mightWork.size());
-        List<EndpointAddress> worthTrying = new ArrayList<EndpointAddress>(mightWork.size());
-
-        // First rank the available addresses by type rejecting those which
-        // cant be used.
-
-        for (Object aMightWork : mightWork) {
-            EndpointAddress addr = (EndpointAddress) aMightWork;
-
-            // skip our own type
-            if (getProtocolName().equals(addr.getProtocolName())) {
-                continue;
-            }
-            int rank = -1;
-            Iterator<MessageTransport> eachTransport = endpoint.getAllMessageTransports();
-
-            while (eachTransport.hasNext()) {
-                MessageTransport transpt = eachTransport.next();
-
-                if (!transpt.getProtocolName().equals(addr.getProtocolName())) {
-                    continue;
-                }
-
-                // must be a sender
-                if (!(transpt instanceof MessageSender)) {
-                    continue;
-                }
-
-                MessageSender sender = (MessageSender) transpt;
-
-                // must allow routing
-                if (!sender.allowsRouting()) {
-                    // This protocol should not be used for routing.
-                    continue;
-                }
-                rank += 1;
-                if (sender.isConnectionOriented()) {
-                    rank += 2;
-                }
-
-                if (isRelay(transpt)) {
-                    // That should prevent the relay for ever being used
-                    // when the relay may be sending through the router.
-                    if (exist) {
-                        rank -= 1000;
-                    }
-                }
-                if (isFast(transpt)) {
-                    rank += 4;
-                }
-            }
-
-            // if its worth trying then insert it into the rankings.
-            if (rank >= 0) {
-                for (int eachCurrent = 0; eachCurrent <= rankings.size(); eachCurrent++) {
-                    if (rankings.size() == eachCurrent) {
-                        rankings.add(rank);
-                        worthTrying.add(addr);
-                        break;
-                    }
-                    if (rank > rankings.get(eachCurrent)) {
-                        rankings.add(eachCurrent, rank);
-                        worthTrying.add(eachCurrent, addr);
-                        break;
-                    }
-                }
-            }
-        }
-
-        // now that we have them ranked, go through them until we get a
-        // successful messenger.
-        rankings = null;
-
-        for (EndpointAddress addr : worthTrying) {
-
-            try {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Trying : " + addr);
-                }
-                // We use an async getMessenger as we do not
-                // want to wait too long to obtain our messenger
-                // We will still wait ASYNCMESSENGER_WAIT to see
-                // if we can get the messenger before bailing out
-
-                // Create the listener object for that request
-                EndpointGetMessengerAsyncListener getMessengerListener = new EndpointGetMessengerAsyncListener(this, dest);
-                boolean stat = endpoint.getMessenger(getMessengerListener, new EndpointAddress(addr, ROUTER_SERVICE_NAME, null)
-                        ,
-                        null);
-
-                if (!stat) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Failed to create async messenger to : " + addr);
-                    }
-                    // we failed to get a messenger, we need to update the try and
-                    // failed as it currently holds an infinite timeout to permit
-                    // another thread to retry that destination. We only retry
-                    // every MAX_ASYNC_GETMESSENGER_RETRY seconds
-                    synchronized (this) {
-                        triedAndFailed.put(addr2pid(dest), TimeUtils.toAbsoluteTimeMillis(MAX_ASYNC_GETMESSENGER_RETRY));
-                    }
-                    continue;
-                }
-
-                // wait to see if we can get the Async messenger
-                // If there is a long route to that destination, do not
-                // wait on the direct route.
-                // It may happen that we are actually
-                // trying to reach a different peer and this is just part of
-                // shortcuting the route via the one of the hops. In that case
-                // this test is not entirely accurate. We might still decide
-                // to wait when we shouldn't (we're no worse than before, then)
-                // But, in most cases, this is going to help.
-                boolean quick = (getRoute(dest, false) != null);
-                Messenger messenger = getMessengerListener.waitForMessenger(quick);
-
-                if (messenger == null) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("did not get our async messenger. continue");
-                    }
-                } else {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("we got our async messenger, proceed");
-                    }
-                    // Success we got a messenger synchronously. Remove
-                    // the negative cache entry.
-                    synchronized (this) {
-                        triedAndFailed.remove(addr2pid(dest));
-                        notifyAll();
-                    }
-                    return messenger;
-                }
-            } catch (RuntimeException e) {
-                // That address is somehow broken.
-                // Cache that result for a while.
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.log(Level.FINE, "failed checking route", e);
-                }
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Read the route advertisement for a peer and find a suitable transport
-     * endpoint for sending to that peer either directly or via one of
-     * the advertised peer router
-     *
-     * @param destPeerAddress dest address
-     * @param exist           use existing messengers, avoid creating a new one
-     * @param hint            route hint
-     * @return a reachable messenger
-     */
-    Messenger findReachableEndpoint(EndpointAddress destPeerAddress, boolean exist, RouteAdvertisement hint) {
-
-        PeerID destPeerID = addr2pid(destPeerAddress);
-
-        // findReachableEndpoint is really lazy because what it does is expensive.
-        // When needed, the negative info that prevents its from working
-        // too much is removed. (see calls to ensureLocalRoute).
-        synchronized (this) {
-            Long nextTry = triedAndFailed.get(destPeerID);
-
-            if (nextTry != null) {
-                if (nextTry > TimeUtils.timeNow()) {
-                    return null;
-                }
-            }
-
-            // We are the first thread trying this destination. Let's preclude
-            // any other threads from attempting to do anything while we are
-            // trying that destination. Other threads will have a chance if they
-            // are still waiting when this thread is done. We will update
-            // triedAndFailed when we get the async notification that we got or
-            // we failed to get a messenger.
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Temporarly adding " + destPeerAddress.toString() + " to triedAndFailed, while attempting connection");
-            }
-            triedAndFailed.put(destPeerID, TimeUtils.toAbsoluteTimeMillis(Long.MAX_VALUE));
-        }
-
-        // Never tried or it was a long time ago.
-        // Get (locally) the advertisements of this peer
-        Iterator<RouteAdvertisement> advs;
-
-        try {
-            // try to use the hint that was given to us
-            if (hint != null) {
-                advs = Collections.singletonList(hint).iterator();
-            } else {
-                // Ok extract from the CM
-                advs = routeCM.getRouteAdv(destPeerID);
-            }
-
-            // Check if we got any advertisements
-            List<EndpointAddress> addrs = new ArrayList<EndpointAddress>();
-
-            while (advs.hasNext()) {
-                RouteAdvertisement adv = advs.next();
-
-                String saddr = null;
-
-                // add the destination endpoint
-                for (Enumeration<String> e = adv.getDest().getEndpointAddresses(); e.hasMoreElements();) {
-                    try {
-                        saddr = e.nextElement();
-                        addrs.add(new EndpointAddress(saddr));
-                    } catch (Throwable ex) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine(" bad address in route adv : " + saddr);
-                        }
-                    }
-                }
-            }
-
-            // ok let's go and try all these addresses
-            if (!addrs.isEmpty()) {
-                Messenger bestMessenger = findBestReachableEndpoint(destPeerAddress, addrs, exist);
-
-                if (bestMessenger != null) {
-                    // Found a direct route. Return it.
-                    // Tried+failed has been cleaned.
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("found direct route");
-                    }
-                    return bestMessenger;
-                }
-            } else {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("findReachableEndpoint : Failed due to empty address list");
-                }
-            }
-        } catch (RuntimeException e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failure looking for an address ", e);
-            }
-        }
-
-        // We're done trying. Since we did not find anything at all (or failed,
-        // during the atempt) the triedFailed record is still set to infinite 
-        // value. Reset it to finite.
-        // There is a small chance that another thread did find
-        // something in parallel, but that's very unlikely and
-        // if it is rare enough then the damage is small.
-        synchronized (this) {
-            triedAndFailed.put(destPeerID, TimeUtils.toAbsoluteTimeMillis(MAX_ASYNC_GETMESSENGER_RETRY));
-        }
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("did not find a direct route to :" + destPeerAddress);
-        }
-        return null;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Messenger getMessenger(EndpointAddress addr, Object hint) {
-        RouteAdvertisement routeHint = null;
-        EndpointAddress plainAddr = new EndpointAddress(addr, null, null);
-        
-        // If the dest is the local peer, just loop it back without going
-        // through the router.
-        if (plainAddr.equals(localPeerAddr)) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("return LoopbackMessenger");
-            }
-            return new LoopbackMessenger(group, endpoint, localPeerAddr, addr, addr);
-        }
-
-        try {
-            // try and add that hint to our cache of routes (that may be our only route).
-            if (hint != null && hint instanceof RouteAdvertisement) {
-                routeHint = ((RouteAdvertisement) hint).clone();
-                AccessPointAdvertisement firstHop = routeHint.getFirstHop();
-                PeerID firstHopPid;
-                EndpointAddress firstHopAddr = null;
-
-                // If the firstHop is equal to the destination, clean that up,
-                // that's a direct route. If the first hop is the local peer
-                // leave it there but treat it as a local route. That's what
-                // it is from the local peer point of view.
-                if (firstHop != null) {
-
-                    firstHopPid = firstHop.getPeerID();
-                    firstHopAddr = pid2addr(firstHopPid);
-
-                    if (firstHopAddr.equals(addr)) {
-                        routeHint.removeHop(firstHopPid);
-                        firstHop = null;
-                    } else if (firstHopPid.equals(localPeerId)) {
-                        firstHop = null;
-                    }
-
-                }
-
-                if (firstHop == null) {
-                    // The hint is a direct route. Make sure that we have the
-                    // route adv so that we can actually connect.
-
-                    // we only need to publish this route if we don't know about
-                    // it yet.
-                    EndpointAddress da = pid2addr(routeHint.getDestPeerID());
-
-                    if (!isLocalRoute(da) && !routedRoutes.containsKey(routeHint.getDestPeerID())) {
-                        routeCM.publishRoute(routeHint);
-                    }
-
-                } else {
-                    // For the hint to be useful, we must actively try the first
-                    // hop. It is possible that we do not know it yet and that's
-                    // not a reason to ignore the hint (would ruin the purpose
-                    // in most cases).
-                    RouteAdvertisement routeFirstHop = null;
-
-                    // Manufacture a RA just that as just the routerPeer as a
-                    // destination. We only need to publish this route if we
-                    // don't know about it yet.
-                    if (!isLocalRoute(firstHopAddr) && !routedRoutes.containsKey(firstHop.getPeerID())) {
-
-                        routeFirstHop = (RouteAdvertisement)
-                                AdvertisementFactory.newAdvertisement(RouteAdvertisement.getAdvertisementType());
-                        routeFirstHop.setDest(firstHop.clone());
-
-                        // Here we used to pass a second argument with value
-                        // true which forced updateRouteAdv to ignore a
-                        // pre-existing identical adv and remove negative cache
-                        // information anyway. The reason for doing that was
-                        // that sometimes the new route adv does already exist
-                        // but has not yet been tried. We cannot do that; it
-                        // exposes us too much to retrying incessantly the same
-                        // address. A hint cannot be trusted to such an extent.
-                        // The correct remedy is to be able to tell accurately
-                        // if there really is an untried address in that radv,
-                        // which requires a sizeable refactoring. in the
-                        // meantime just let the negative cache play its role.
-                        updateRouteAdv(routeFirstHop);
-                    }
-
-                    // if we constructed the route hint then passes it in the
-                    // past we were just relying on the CM now that the CM can
-                    // be disabled, we have to pass the argument.
-                    if (ensureLocalRoute(firstHopAddr, routeFirstHop) != null) {
-                        setRoute(routeHint.clone(), false);
-                    }
-                }
-            }
-
-        } catch (Throwable ioe) {
-            // Enforce a stronger semantic to hint. If the application passes
-            // a hint that is rotten then this is an application problem
-            // we should not try to fix what was given to us.
-            return null;
-        }
-
-        try {
-            // Build a persistent RouterMessenger around it that will add our
-            // header. If a hint was passed to us we just use it as it. Too bad
-            // if it is not the the right one. In that mode it is the
-            // responsibility of the application to make sure that a correct
-            // hint was passed.
-            return new RouterMessenger(addr, this, routeHint);
-        } catch (IOException caught) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Can\'t generate messenger for addr " + addr, caught);
-            }
-            return null;
-        }
-    }
-
-    /**
-     * Updates the router element of a message and returns the peerAddress address of
-     * the next hop (where to send the message).
-     * <p/>
-     * Currently, address message is only called for messages that we
-     * originate. As a result we will always aggressively seek a route if needed.
-     *
-     * @param message    the message for which to compute/update a route.
-     * @param dstAddress the final destination of the route which the message be set to follow.
-     * @return EndpointAddress The address (logical) where to send the message next. Null if there
-     *         is nowhere to send it to.
-     */
-    EndpointAddress addressMessage(Message message, EndpointAddress dstAddress) {
-        if (endpoint == null) {
-            return null;
-        }
-
-        // We need to create a RouterMessage
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Create a new EndpointRouterMessage " + dstAddress);
-        }
-
-        // Specify that we do not want an existing msg parsed.
-        EndpointRouterMessage routerMsg = new EndpointRouterMessage(message, true);
-
-        if (routerMsg.isDirty()) {
-            // Oops there was one in the message already. This must be a
-            // low-level protocol looping back through the router. The relay can
-            // be led to do that in some corner cases.
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Probable transport recursion");
-            }
-            throw new IllegalStateException("RouterMessage element already present");
-        }
-
-        routerMsg.setSrcAddress(localPeerAddr);
-        routerMsg.setDestAddress(dstAddress);
-
-        EndpointAddress theGatewayAddress;
-        EndpointAddress dstAddressPlain = new EndpointAddress(dstAddress, null, null);
-
-        try {
-            RouteAdvertisement route = null;
-
-            theGatewayAddress = getGatewayAddress(dstAddressPlain, true, null);
-
-            if (theGatewayAddress == null) {
-                // Cleanup the message, so that the invoker
-                // may retry (with a different hint, for example).
-                routerMsg.clearAll();
-                routerMsg.updateMessage();
-                return null;
-            }
-
-            // Check that we're actually going through a route; we could have one
-            // but not be using it, because we know of a volatile shortcut.
-
-            // FIXME: jice@jxta.org - 20030512: This is not very clean:
-            // getGatewayAddress should be giving us the route that it's using, if any.
-            // By doing the fetch ourselves, not only do we waste CPU hashing
-            // twice, but we could also get a different route !
-
-            if (!theGatewayAddress.equals(dstAddressPlain)) {
-                route = getRoute(dstAddressPlain, false);
-            }
-
-            // If we're going through a route for that, stuff it in the
-            // message. NB: setForwardHops does not clone.
-            if (route != null) {
-                routerMsg.setForwardHops((Vector<AccessPointAdvertisement>) route.getVectorHops().clone());
-            }
-
-            // set the last hop info to point to the local peer info
-            // The recipient takes last hop to be the last peer that the message has traversed
-            // before arriving.
-            routerMsg.setLastHop(localPeerAddr);
-
-            // The first time we talk to a peer to which we have
-            // initiated a connection, we must include our local
-            // route adv in the routerMsg.
-            RouteAdvertisement myRoute = getMyLocalRoute();
-
-            if (myRoute != null) {
-                // FIXME - jice@jxta.org 20040430 : use destinations instead of newDestinations, even for routed ones.
-                boolean newDest = newDestinations.remove(dstAddressPlain);
-                boolean newGatw = destinations.isWelcomeNeeded(theGatewayAddress);
-
-                if (newDest || newGatw) {
-                    routerMsg.setRouteAdv(myRoute);
-                }
-            }
-
-            // Push the router header onto the message.
-            // That's all we have to do for now.
-
-            routerMsg.updateMessage();
-        } catch (Exception ez1) {
-            // Not much we can do
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Could not fully address message", ez1);
-            }
-            return null;
-        }
-
-        return theGatewayAddress;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Object transportControl(Object operation, Object value) {
-        if (!(operation instanceof Integer)) {
-            return null;
-        }
-
-        int op = (Integer) operation;
-
-        switch (op) {
-            case RouteControlOp: // Get a Router Control Object
-                return new RouteControl(this, localPeerId);
-
-            default:
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Invalid Transport Control operation argument");
-                }
-
-                return null;
-        }
-    }
-
-    /**
-     * Convert a Router EndpointAddress into a PeerID
-     *
-     * @param addr the address to extract peerAddress from
-     * @return the PeerID
-     */
-    static PeerID addr2pid(EndpointAddress addr) {
-        URI asURI = null;
-
-        try {
-            asURI = new URI(ID.URIEncodingName, ID.URNNamespace + ":" + addr.getProtocolAddress(), null);
-            return (PeerID) IDFactory.fromURI(asURI);
-        } catch (URISyntaxException ex) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Error converting a source address into a virtual address : " + addr, ex);
-            }
-        } catch (ClassCastException cce) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Error converting a source address into a virtual address: " + addr, cce);
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * Convert an ID into a Router Endpoint Address
-     *
-     * @param pid The ID who's equivalent Endpoint Address is desired.
-     * @return The ID as an EndpointAddress.
-     */
-    static EndpointAddress pid2addr(ID pid) {
-        return new EndpointAddress(ROUTER_PROTOCOL_NAME, pid.getUniqueValue().toString(), null, null);
-    }
-
-    /**
-     * check if it is a new route adv
-     *
-     * @param route route advertisement
-     */
-    void updateRouteAdv(RouteAdvertisement route) {
-        updateRouteAdv(route, false);
-    }
-
-    /**
-     * check if it is a new route adv
-     *
-     * @param route route advertisement
-     * @param force enforce the route
-     */
-    void updateRouteAdv(RouteAdvertisement route, boolean force) {
-        try {
-            PeerID pID = route.getDestPeerID();
-
-            // check if we updated the route
-            if (routeCM.updateRoute(route)) {
-                // We just dumped an adv for that dest, so we want to do a real check
-                // on its new addresses. Remove the entry from the negative cache.
-                synchronized (this) {
-                    Long nextTry = triedAndFailed.get(pID);
-
-                    if (nextTry != null) {
-                        // only remove if we do not have a pending request (infinite retry)
-                        // we take the conservative approach to avoid creating multiple
-                        // async thread blocked on the same destination
-                        if (nextTry <= TimeUtils.toAbsoluteTimeMillis(MAX_ASYNC_GETMESSENGER_RETRY)) {
-                            triedAndFailed.remove(pID);
-                            notifyAll();
-                        }
-                    }
-                }
-            } else {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Route for " + pID + " is same as existing route, not publishing it");
-                }
-
-                if (force) {
-                    synchronized (this) {
-                        Long nextTry = triedAndFailed.get(pID);
-
-                        if (nextTry != null) {
-                            // only remove if we do not have a pending request (infinite retry)
-                            // we take the conservative approach to avoid creating multiple
-                            // async thread blocked on the same destination
-                            if (nextTry <= TimeUtils.toAbsoluteTimeMillis(MAX_ASYNC_GETMESSENGER_RETRY)) {
-                                triedAndFailed.remove(pID);
-                                notifyAll();
-                            }
-                        }
-                    }
-                }
-            }
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed to publish route advertisement", e);
-            }
-        }
-    }
-
-    /**
-     * is there a pending route query for that destination
-     *
-     * @param peerID destination address
-     * @return true or false
-     */
-    boolean isPendingRouteQuery(PeerID peerID) {
-        return pendingQueries.containsKey(peerID);
-    }
-
-    /**
-     * get a pending route query info
-     *
-     * @param peerID destination address
-     * @return pending route query info
-     */
-    ClearPendingQuery getPendingRouteQuery(PeerID peerID) {
-        return pendingQueries.get(peerID);
-    }
-
-    /**
-     * Do we have a long route for that destination
-     *
-     * @param peerID destination address
-     * @return true or false
-     */
-    boolean isRoutedRoute(PeerID peerID) {
-        return peerID != null && routedRoutes.containsKey(peerID);
-    }
-
-    /**
-     * Snoop if we have a messenger
-     *
-     * @param addr destination address
-     * @return Messenger
-     */
-    Messenger getCachedMessenger(EndpointAddress addr) {
-        return destinations.getCurrentMessenger(addr);
-    }
-
-    /**
-     * Get all direct route destinations
-     *
-     * @return Iterator iterations of all endpoint destinations
-     */
-    Iterator<EndpointAddress> getAllCachedMessengerDestinations() {
-        return destinations.allDestinations().iterator();
-    }
-
-    /**
-     * Get all long route destinations
-     *
-     * @return Iterator iterations of all routed route destinations
-     */
-    Iterator<Map.Entry<ID, RouteAdvertisement>> getRoutedRouteAllDestinations() {
-        return routedRoutes.entrySet().iterator();
-    }
-
-    /**
-     * Get all long route destination addresses
-     *
-     * @return Iterator iterations of all routed route addresses
-     */
-    Iterator<ID> getAllRoutedRouteAddresses() {
-        return routedRoutes.keySet().iterator();
-    }
-
-    /**
-     * Get all pendingRouteQuery destinations
-     *
-     * @return All pending route query destinations
-     */
-    Collection<Map.Entry<PeerID, ClearPendingQuery>> getPendingQueriesAllDestinations() {
-        List<Map.Entry<PeerID, ClearPendingQuery>> copy = new ArrayList<Map.Entry<PeerID, ClearPendingQuery>>(
-                pendingQueries.size());
-
-        synchronized (pendingQueries) {
-            copy.addAll(pendingQueries.entrySet());
-        }
-
-        return copy;
-    }
-
-    /**
-     * Get the route CM cache Manager
-     *
-     * @return the route CM cache Manager
-     */
-    RouteCM getRouteCM() {
-        return routeCM;
-    }
-
-    /**
-     * Get the route resolver manager
-     *
-     * @return the route resolver Manager
-     */
-    RouteResolver getRouteResolver() {
-        return routeResolver;
-    }
-
-    /**
-     * set bad route entry
-     *
-     * @param addr     of the bad route
-     * @param badRoute bad route info
-     */
-    synchronized void setBadRoute(EndpointAddress addr, BadRoute badRoute) {
-        badRoutes.put(addr, badRoute);
-    }
-
-    /**
-     * get bad route entry
-     *
-     * @param addr of the bad route
-     * @return BadRoute bad route info
-     */
-    synchronized BadRoute getBadRoute(EndpointAddress addr) {
-        return badRoutes.get(addr);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/EndpointRouterMessage.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/EndpointRouterMessage.java
deleted file mode 100644 (file)
index febf54e..0000000
+++ /dev/null
@@ -1,512 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.endpoint.router;
-
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.TextDocumentMessageElement;
-import net.jxta.protocol.AccessPointAdvertisement;
-import net.jxta.protocol.RouteAdvertisement;
-import net.jxta.logging.Logging;
-
-import java.util.Enumeration;
-import java.util.Vector;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Router Message element. This element is added to every message to carry route 
- * information for the EndpointRouter service.
- */
-public class EndpointRouterMessage {
-
-    /**
-     * Logger
-     */
-    private static final Logger LOG = Logger.getLogger(EndpointRouterMessage.class.getName());
-
-    public static final String MESSAGE_NS = "jxta";
-    public static final String MESSAGE_NAME = "EndpointRouterMsg";
-    public static final String Name = "jxta:ERM";
-
-    public static final String SrcTag = "Src";
-    public static final String DestTag = "Dest";
-    public static final String LastHopTag = "Last";
-    public static final String GatewayForwardTag = "Fwd";
-    public static final String GatewayReverseTag = "Rvs";
-
-    private EndpointAddress srcAddress = null; // PeerID-based EndpointAddress
-    private EndpointAddress destAddress = null; // PeerID-based EndpointAddress
-    private EndpointAddress lastHop = null; // Plain PeerID
-    
-    private transient Vector<AccessPointAdvertisement> forwardGateways = null;
-    private transient Vector<XMLElement> forwardCache = null;
-    private transient Vector<AccessPointAdvertisement> reverseGateways = null;
-    private transient Vector<XMLElement> reverseCache = null;
-    private transient RouteAdvertisement radv = null;
-
-    // A flag that represents the existence of data.  Which is
-    // different from all fields being empty.
-    private transient boolean rmExists = false;
-
-    // A flag that tells us that the message is not uptodate compared to
-    // This object.
-    private transient boolean rmDirty = false;
-
-    // Keep tied to one and only one message.
-    private final transient Message message;
-
-    // Cache the element. At the minimum it simplifies removal.
-    private transient MessageElement rmElem = null;
-
-    public boolean msgExists() {
-        return rmExists;
-    }
-
-    public boolean isDirty() {
-        return rmDirty;
-    }
-
-    public EndpointRouterMessage(Message message, boolean removeMsg) {
-
-        this.message = message;
-
-        try {
-            rmElem = message.getMessageElement(MESSAGE_NS, MESSAGE_NAME);
-            if (rmElem == null) {
-                return;
-            }
-
-            // We have an element, but until we read it, no data to
-            // match (rmExists == false). If the data cannot be read
-            // from the element, the element is scheduled for removal.
-            rmDirty = true;
-
-            // If we have been instructed so, do not parse any existing
-            // element, and leave it marked for removal from the message
-            // as if it were invalid.
-            if (removeMsg) {
-                return;
-            }
-
-            XMLDocument doc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(rmElem);
-
-            Enumeration<XMLElement> each;
-            XMLElement e;
-
-            each = doc.getChildren();
-            if (!each.hasMoreElements()) {
-                // results in rmExists being false.
-                return;
-            }
-
-            while (each.hasMoreElements()) {
-                try {
-                    e = each.nextElement();
-
-                    if (e.getName().equals(SrcTag)) {
-                        srcAddress = new EndpointAddress(e.getTextValue());
-                        continue;
-                    }
-
-                    if (e.getName().equals(DestTag)) {
-                        destAddress = new EndpointAddress(e.getTextValue());
-                        continue;
-                    }
-
-                    if (e.getName().equals(LastHopTag)) {
-                        lastHop = new EndpointAddress(e.getTextValue());
-                        continue;
-                    }
-
-                    if (e.getName().equals(GatewayForwardTag)) {
-                        for (Enumeration<XMLElement> eachXpt = e.getChildren(); eachXpt.hasMoreElements();) {
-
-                            if (forwardGateways == null) {
-                                forwardGateways = new Vector<AccessPointAdvertisement>();
-                            }
-                            if (forwardCache == null) {
-                                forwardCache = new Vector<XMLElement>();
-                            }
-                            XMLElement aXpt = eachXpt.nextElement();
-                            AccessPointAdvertisement xptAdv = (AccessPointAdvertisement)
-                                    AdvertisementFactory.newAdvertisement(aXpt);
-
-                            forwardGateways.addElement(xptAdv);
-                            // Save the original element
-                            forwardCache.addElement(aXpt);
-                        }
-                        continue;
-                    }
-
-                    if (e.getName().equals(GatewayReverseTag)) {
-                        for (Enumeration<XMLElement> eachXpt = e.getChildren(); eachXpt.hasMoreElements();) {
-                            if (reverseGateways == null) {
-                                reverseGateways = new Vector<AccessPointAdvertisement>();
-                            }
-                            if (reverseCache == null) {
-                                reverseCache = new Vector<XMLElement>();
-                            }
-                            XMLElement aXpt = eachXpt.nextElement();
-                            AccessPointAdvertisement xptAdv = (AccessPointAdvertisement)
-                                    AdvertisementFactory.newAdvertisement(aXpt);
-
-                            reverseGateways.addElement(xptAdv);
-                            // Save the original element
-                            reverseCache.addElement(aXpt);
-                        }
-                        continue;
-                    }
-
-                    if (e.getName().equals(RouteAdvertisement.getAdvertisementType())) {
-                        radv = (RouteAdvertisement) AdvertisementFactory.newAdvertisement(e);
-                    }
-                } catch (Exception ee) {
-                    // keep going
-                }
-            }
-            
-            // XXX 20040929 bondolo Should be doing validation here.
-
-            // All parsed ok, we're in sync.
-            rmExists = true;
-            rmDirty = false;
-        } catch (Exception eee) {
-            // give up. The dirty flag will get the element removed
-            // from the message (if there was one) and we'll report
-            // there was none.
-        }
-    }
-
-    public void updateMessage() {
-
-        if (!rmDirty) {
-            return;
-        }
-
-        if (!rmExists) {
-
-            // The change was to remove it.
-            // If there was an rmElem, remove it and make sure to remove
-            // all of them. We may have found one initialy but there may be
-            // several. (just a sanity check for outgoing messages).
-
-            while (rmElem != null) {
-                message.removeMessageElement(MESSAGE_NS, rmElem);
-                rmElem = message.getMessageElement(MESSAGE_NS, MESSAGE_NAME);
-            }
-
-            rmDirty = false;
-            return;
-        }
-
-        // The element was either created or changed. Replace whatever
-        // if anything was in the message
-
-        XMLDocument doc = (XMLDocument)
-                StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, Name);
-
-        doc.addAttribute("xmlns:jxta", "http://jxta.org");
-        doc.addAttribute("xml:space", "preserve");
-
-        XMLElement e;
-
-        if (srcAddress != null) {
-            e = doc.createElement(SrcTag, srcAddress.toString());
-            doc.appendChild(e);
-        }
-
-        if (destAddress != null) {
-            e = doc.createElement(DestTag, destAddress.toString());
-            doc.appendChild(e);
-        }
-
-        if (lastHop != null) {
-            e = doc.createElement(LastHopTag, lastHop.toString());
-            doc.appendChild(e);
-        }
-
-        e = doc.createElement(GatewayForwardTag);
-        doc.appendChild(e);
-        if ((forwardGateways != null) && (!forwardGateways.isEmpty())) {
-            if (forwardCache != null) {
-                for (XMLElement xptDoc : forwardCache) {
-                    try {
-                        StructuredDocumentUtils.copyElements(doc, e, xptDoc);
-                    } catch (Exception e1) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.warning("Forward cache failed");
-                        }
-                        forwardCache = null;
-                        break;
-                    }
-                }
-            } else {
-                for (AccessPointAdvertisement gateway : forwardGateways) {
-                    try {
-                        XMLDocument xptDoc = (XMLDocument) gateway.getDocument(MimeMediaType.XMLUTF8);
-                        StructuredDocumentUtils.copyElements(doc, e, xptDoc);
-                    } catch (Exception ignored) {
-                        //ignored
-                    }
-                }
-            }
-        }
-
-        e = doc.createElement(GatewayReverseTag);
-        doc.appendChild(e);
-        if ((reverseGateways != null) && (!reverseGateways.isEmpty())) {
-            if (reverseCache != null) {
-                for (XMLElement xptDoc : reverseCache) {
-                    try {
-                        StructuredDocumentUtils.copyElements(doc, e, xptDoc);
-                    } catch (Exception e1) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.warning("Reverse cache failed");
-                        }
-                        reverseCache = null;
-                        break;
-                    }
-                }
-            } else {
-                 for (AccessPointAdvertisement gateway : reverseGateways) {
-                    try {
-                        XMLDocument xptDoc = (XMLDocument) gateway.getDocument(MimeMediaType.XMLUTF8);
-                        StructuredDocumentUtils.copyElements(doc, e, xptDoc);
-                    } catch (Exception e1) {
-                        // ignored
-                    }
-                }
-            }
-        }
-
-        if (radv != null) {
-            try {
-                XMLDocument radvDoc = (XMLDocument) radv.getDocument(MimeMediaType.XMLUTF8);
-
-                StructuredDocumentUtils.copyElements(doc, doc, radvDoc);
-            } catch (Exception e1) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Cannot add route advertisement");
-                }
-            }
-        }
-
-        rmElem = new TextDocumentMessageElement(MESSAGE_NAME, doc, null);
-        message.replaceMessageElement(MESSAGE_NS, rmElem);
-
-        rmDirty = false;
-    }
-
-    public void setSrcAddress(EndpointAddress address) {
-        rmExists = true;
-        rmDirty = true;
-        srcAddress = address;
-    }
-
-    public EndpointAddress getSrcAddress() {
-        return srcAddress;
-    }
-
-    public void setDestAddress(EndpointAddress address) {
-        rmExists = true;
-        rmDirty = true;
-        destAddress = address;
-    }
-
-    public EndpointAddress getDestAddress() {
-        return destAddress;
-    }
-
-    public void setLastHop(EndpointAddress lhop) {
-        rmExists = true;
-        rmDirty = true;
-        lastHop = lhop;
-    }
-
-    public EndpointAddress getLastHop() {
-        return lastHop;
-    }
-
-    public void setForwardHops(Vector<AccessPointAdvertisement> fhops) {
-        rmExists = true;
-        rmDirty = true;
-        forwardGateways = fhops;
-        forwardCache = null;
-    }
-
-    public Vector<AccessPointAdvertisement> getForwardHops() {
-        return forwardGateways;
-    }
-
-    public void prependReverseHop(AccessPointAdvertisement apa) {
-        rmExists = true;
-        rmDirty = true;
-        if (reverseGateways == null) {
-            reverseGateways = new Vector<AccessPointAdvertisement>();
-            reverseCache = new Vector<XMLElement>();
-        }
-
-        reverseGateways.add(0, apa);
-
-        if (reverseCache == null) {
-            return;
-        }
-
-        // if we still have a cache (we where able to keep it conistent, update it
-        XMLDocument apDoc = (XMLDocument) apa.getDocument(MimeMediaType.XMLUTF8);
-
-        reverseCache.add(0, apDoc);
-    }
-
-    // Do not call this routine lightly: it blasts the cache.
-    public void setReverseHops(Vector<AccessPointAdvertisement> rhops) {
-        rmExists = true;
-        rmDirty = true;
-
-        // No inplace changes allowed, we need to keep the cache
-        // consistent: clone
-
-        if (rhops == null) {
-            reverseGateways = null;
-        } else {
-            reverseGateways = (Vector<AccessPointAdvertisement>) rhops.clone();
-        }
-
-        // Not worth updating the cache. Blast it.
-        reverseCache = null;
-    }
-
-    public Vector<AccessPointAdvertisement> getReverseHops() {
-
-        if (reverseGateways == null) {
-            return null;
-        }
-
-        return (Vector<AccessPointAdvertisement>) reverseGateways.clone();
-    }
-
-    public RouteAdvertisement getRouteAdv() {
-        return radv;
-    }
-
-    public void setRouteAdv(RouteAdvertisement radv) {
-        rmExists = true;
-        rmDirty = true;
-        this.radv = radv;
-    }
-
-    // Used only for debugging
-    public String display() {
-        StringBuilder msgInfo = new StringBuilder("Endpoint Router Message : ");
-
-        msgInfo.append("\n\tsrc=");
-        msgInfo.append((srcAddress != null) ? srcAddress : "none");
-        msgInfo.append("\n\tdest== ");
-        msgInfo.append((destAddress != null) ? destAddress : "none");
-        msgInfo.append("\n\tlastHop= ");
-        msgInfo.append((lastHop != null) ? lastHop : "none");
-        msgInfo.append("\n\tembedded radv= ");
-        msgInfo.append(radv != null ? radv.display() : "none");
-        if (forwardGateways != null) {
-            msgInfo.append("\n\tForward Hops:");
-            for (int i = 0; i < forwardGateways.size(); ++i) {
-                try {
-                    msgInfo.append("   [").append(i).append("] ");
-                    msgInfo.append(forwardGateways.elementAt(i).getPeerID());
-                }
-                catch (Exception ez1) {
-                    break;
-                }
-            }
-        }
-        if (reverseGateways != null) {
-            msgInfo.append("\n\tReverse Hops:");
-            for (int i = 0; i < reverseGateways.size(); ++i) {
-                    msgInfo.append("   [").append(i).append("] ");
-                    msgInfo.append(reverseGateways.elementAt(i).getPeerID());
-            }
-        }
-        return msgInfo.toString();
-    }
-
-    // This will ensure that all older elements will be removed from
-    // the message in case they do not get replaced by new ones before
-    // updateMsg is called.
-
-    public void clearAll() {
-
-        if (rmExists) {
-            rmDirty = true;
-
-            srcAddress = null;
-            destAddress = null;
-            lastHop = null;
-            forwardGateways = null;
-            reverseGateways = null;
-            radv = null;
-            rmExists = false;
-        }
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/RouteCM.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/RouteCM.java
deleted file mode 100644 (file)
index 012e8fb..0000000
+++ /dev/null
@@ -1,595 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-/**
- * This class is used to manage a persistent CM cache  of route
- * for the router
- */
-package net.jxta.impl.endpoint.router;
-
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.XMLElement;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.id.ID;
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.impl.util.LRUCache;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.platform.Module;
-import net.jxta.protocol.AccessPointAdvertisement;
-import net.jxta.protocol.ConfigParams;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.RouteAdvertisement;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import net.jxta.impl.endpoint.EndpointUtils;
-
-class RouteCM implements Module {
-    
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(RouteCM.class.getName());
-    
-    /**
-     * Default expiration time for Route advertisements. This is the amount
-     * of time which advertisements will live in caches. After this time, the
-     * advertisement should be refreshed from the source.
-     */
-    public final static long DEFAULT_EXPIRATION = 20L * TimeUtils.AMINUTE;
-    
-    /**
-     * If {@code true} then the CM is used to persistently store route
-     * advertisements. If {@code false} then only the in-memory route table is
-     * used.
-     */
-    public final static boolean USE_CM_DEFAULT = true;
-    
-    /**
-     * If {@code true} then the CM is used to persistently store route
-     * advertisements. If {@code false} then only the in-memory route table is
-     * used.
-     * <p/>
-     * We start out {@code false} until the module is started.
-     */
-    private boolean useCM = false;
-    
-    /**
-     * If {@code true} then the CM is used to persistently store route
-     * advertisements. If {@code false} then only the in-memory route table is
-     * used.
-     */
-    private boolean useCMConfig = USE_CM_DEFAULT;
-    
-    /**
-     * PeerGroup Service Handle
-     */
-    private PeerGroup group = null;
-    private LRUCache<ID, RouteAdvertisement> lruCache = new LRUCache<ID, RouteAdvertisement>(100);
-    
-    /**
-     * EndpointRouter pointer
-     */
-        
-    /**
-     * {@inheritDoc}
-     */
-    public void init(PeerGroup group, ID assignedID, Advertisement impl) throws PeerGroupException {
-        
-        ModuleImplAdvertisement implAdvertisement = (ModuleImplAdvertisement) impl;
-        
-        // extract Router service configuration properties
-        
-        ConfigParams confAdv = group.getConfigAdvertisement();
-        XMLElement paramBlock = null;
-        
-        if (confAdv != null) {
-            paramBlock = (XMLElement) confAdv.getServiceParam(assignedID);
-        }
-        
-        if (paramBlock != null) {
-            // get our tunable router parameter
-            Enumeration param;
-            
-            param = paramBlock.getChildren("useCM");
-            if (param.hasMoreElements()) {
-                useCMConfig = Boolean.getBoolean(((XMLElement) param.nextElement()).getTextValue());
-            }
-        }
-        
-        this.group = group;
-        
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring Router Transport Resolver : " + assignedID);
-            
-            if (implAdvertisement != null) {
-                configInfo.append("\n\tImplementation :");
-                configInfo.append("\n\t\tModule Spec ID: ").append(implAdvertisement.getModuleSpecID());
-                configInfo.append("\n\t\tImpl Description : ").append(implAdvertisement.getDescription());
-                configInfo.append("\n\t\tImpl URI : ").append(implAdvertisement.getUri());
-                configInfo.append("\n\t\tImpl Code : ").append(implAdvertisement.getCode());
-            }
-            
-            configInfo.append("\n\tGroup Params :");
-            configInfo.append("\n\t\tGroup : ").append(group.getPeerGroupName());
-            configInfo.append("\n\t\tGroup ID : ").append(group.getPeerGroupID());
-            configInfo.append("\n\t\tPeer ID : ").append(group.getPeerID());
-            
-            configInfo.append("\n\tConfiguration :");
-            configInfo.append("\n\t\tUse Route CM : ").append(useCMConfig);
-            
-            LOG.config(configInfo.toString());
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public int startApp(String[] arg) {
-        // ok, we are initialized, go ahead and enable CM usage desired
-        useCM = useCMConfig;
-        return Module.START_OK;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public void stopApp() {
-        useCM = false;
-    }
-    
-    /**
-     * return routeCM usage
-     *
-     * @return true if enabled
-     */
-    boolean useRouteCM() {
-        return useCM;
-    }
-    
-    /**
-     * toggles whether to use the RouteCM
-     * @param enable if <code>true</code> it enables use of persistent store
-     */
-    void enableRouteCM(boolean enable) {
-        useCM = enable;
-    }
-    
-    /**
-     * Get route advertisements from the local discovery cache.
-     * We collect straight RouteAdvertisements as well as what can be
-     * found in PeerAdvertisements.
-     *
-     * <p/>We can find both, and there's no way to know which is most relevant,
-     * so we have to return all and let the invoker try its luck with each.
-     *
-     * @param peerID the target peer's ID.
-     * @return Route Advertisements for the specified peer.
-     */
-    protected Iterator<RouteAdvertisement> getRouteAdv(ID peerID) {
-        DiscoveryService discovery;
-        
-        // check if we use the CM, if not then nothing
-        // to retrieve
-        if (!useCM) {
-            return Collections.<RouteAdvertisement>emptyList().iterator();
-        } else {
-            discovery = group.getDiscoveryService();
-            if (null == discovery) {
-                return Collections.<RouteAdvertisement>emptyList().iterator();
-            }
-        }
-        
-        String peerIDStr = peerID.toString();
-        List<RouteAdvertisement> result = new ArrayList<RouteAdvertisement>(2);
-        if (lruCache.contains(peerID)) {
-            result.add(lruCache.get(peerID));
-            return result.iterator();
-        }
-        // check first if we have a route advertisement
-        Enumeration<Advertisement> advs = null;
-        
-        try {
-            advs = discovery.getLocalAdvertisements(DiscoveryService.ADV, RouteAdvertisement.DEST_PID_TAG, peerIDStr);
-        } catch (IOException failed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed discovering routes for " + peerIDStr, failed);
-            }
-        }
-        
-        while ((null != advs) && advs.hasMoreElements()) {
-            Advertisement adv = advs.nextElement();
-            
-            if (!(adv instanceof RouteAdvertisement)) {
-                continue;
-            }
-            
-            RouteAdvertisement route = (RouteAdvertisement) adv;
-            
-            if (!result.contains(route)) {
-                result.add(route);
-            }
-        }
-        
-        // get the local peer advertisements for the peer.
-        advs = null;
-        try {
-            advs = discovery.getLocalAdvertisements(DiscoveryService.PEER, "PID", peerIDStr);
-        } catch (IOException failed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed discovering peer advertisements for " + peerIDStr, failed);
-            }
-        }
-        
-        while ((null != advs) && advs.hasMoreElements()) {
-            Advertisement adv = advs.nextElement();
-            
-            if (!(adv instanceof PeerAdvertisement)) {
-                continue;
-            }
-            
-            PeerAdvertisement padv = (PeerAdvertisement) adv;
-            
-            RouteAdvertisement route = EndpointUtils.extractRouteAdv(padv);
-            
-            // Publish the route if it was previously unknown.
-            if (!result.contains(route)) {
-                // We found a new route just publish it locally
-                try {
-                    // XXX 20060106 bondolo These publication values won't be obeyed if
-                    // the route had been previously published.
-
-                    //FIXME by hamada: This operation may lead to overwriting an existing and valid rout adv, no?
-                    discovery.publish(route, DEFAULT_EXPIRATION, DEFAULT_EXPIRATION);
-                } catch (IOException failed) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Failed publishing route", failed);
-                    }
-                }
-                result.add(route);
-            }
-        }
-        return result.iterator();
-    }
-    
-    /**
-     * Create a new persistent route to the cache only if we can find set of
-     * endpoint addresses
-     *
-     * @param route to be published
-     */
-    protected void createRoute(RouteAdvertisement route) {
-        DiscoveryService discovery;
-                
-        // check if CM is used
-        if (!useCM) {
-            return;
-        } else {
-            discovery = group.getDiscoveryService();
-            
-            if (null == discovery) {
-                return;
-            }
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("try to publish route ");
-        }
-        // we need to retrieve the current adv to get all the known
-        // endpoint addresses
-        try {
-            RouteAdvertisement newRoute = (RouteAdvertisement)
-                    AdvertisementFactory.newAdvertisement(RouteAdvertisement.getAdvertisementType());
-            
-            PeerID pId = route.getDestPeerID();
-            
-            String realPeerID = pId.toString();
-            
-            // check first if we have a route advertisement
-            Enumeration<Advertisement> advs = discovery.getLocalAdvertisements(DiscoveryService.ADV, RouteAdvertisement.DEST_PID_TAG, realPeerID);
-            
-            if (!advs.hasMoreElements()) {
-                // No route, sorry
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("could not find a route advertisement " + realPeerID);
-                }
-                return;
-            }
-            
-            // make sure we are returning the longest route we know either
-            // from the peer or route advertisement
-            Advertisement adv = advs.nextElement();
-
-            if (adv instanceof RouteAdvertisement) {
-                RouteAdvertisement dest = (RouteAdvertisement) adv;
-
-                newRoute.setDest(dest.getDest());
-            }
-            
-            // let's get the endpoint addresses for each hops
-            Vector<AccessPointAdvertisement> newHops = new Vector<AccessPointAdvertisement>();
-            
-            Enumeration<AccessPointAdvertisement> e = route.getHops();
-            
-            while (e.hasMoreElements()) {
-                AccessPointAdvertisement ap = e.nextElement();
-                
-                realPeerID = ap.getPeerID().toString();
-                
-                // check first if we have a route advertisement
-                advs = discovery.getLocalAdvertisements(DiscoveryService.ADV, RouteAdvertisement.DEST_PID_TAG, realPeerID);
-                if (!advs.hasMoreElements()) {
-                    // No route, sorry
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("could not find a route advertisement for hop " + realPeerID);
-                    }
-                    return;
-                }
-                adv = advs.nextElement();
-                // ensure it is a RouteAdvertisement
-                if (adv instanceof RouteAdvertisement) {
-                    newHops.add(((RouteAdvertisement) adv).getDest());
-                }
-            }
-            
-            // last check to see that we have a route
-            if (newHops.isEmpty()) {
-                return;
-            }
-            
-            newRoute.setHops(newHops);
-            
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("publishing new route \n" + newRoute.display());
-            }
-            lruCache.put(route.getDestPeerID(), route);
-            // XXX 20060106 bondolo These publication values won't be obeyed if
-            // the route had been previously published.
-            discovery.publish(newRoute, DEFAULT_EXPIRATION, DEFAULT_EXPIRATION);
-        } catch (Exception ex) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "error publishing route" + route.display(), ex);
-            }
-        }
-    }
-    
-    /**
-     * Publish a route advertisement to the CM
-     *
-     * @param route advertisement to be published
-     */
-    protected void publishRoute(RouteAdvertisement route) {
-        DiscoveryService discovery;
-                
-        // check if CM is in used, if not nothing to do
-        if (!useCM) {
-            return;
-        } else {
-            discovery = group.getDiscoveryService();
-            if (null == discovery) {
-                return;
-            }
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Publishing route for " + route.getDestPeerID());
-        }
-        
-        // publish route adv
-        if (!lruCache.contains(route.getDestPeerID())) {
-            try {
-                // XXX 20060106 bondolo These publication values won't be obeyed if
-                // the route had been previously published.
-                discovery.publish(route, DEFAULT_EXPIRATION, DEFAULT_EXPIRATION);
-            } catch (Exception ex) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "error publishing route adv \n" + route, ex);
-                }
-            }
-        }
-        lruCache.put(route.getDestPeerID(), route);
-    }
-
-    /**
-     * flush route adv from CM
-     *
-     * @param peerID the PeerID
-     */
-    protected void flushRoute(ID peerID) {
-        DiscoveryService discovery;
-                
-        // check if CM is in used, if not nothing to do
-        if (!useCM) {
-            return;
-        } else {
-            discovery = group.getDiscoveryService();
-            if (null == discovery) {
-                return;
-            }
-        }
-        
-        // leqt's remove any advertisements (route, peer) related to this peer
-        // this should force a route query to try to find a new route
-        // check first if we have a route advertisement
-        String peerIDStr = peerID.toString();
-        
-        Enumeration<Advertisement> advs = null;
-        
-        // Flush the local route advertisements for the peer.
-        try {
-            advs = discovery.getLocalAdvertisements(DiscoveryService.ADV, RouteAdvertisement.DEST_PID_TAG, peerIDStr);
-        } catch (IOException failed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failure recovering route advertisements.", failed);
-            }
-        }
-        
-        while ((null != advs) && advs.hasMoreElements()) {
-            Advertisement adv = advs.nextElement();
-            
-            if (!(adv instanceof RouteAdvertisement)) {
-                continue;
-            }
-            
-            // ok so let's delete the advertisement
-            try {
-                discovery.flushAdvertisement(adv);
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("removed RouteAdvertisement for " + peerIDStr);
-                }
-            } catch (IOException ex) {// protect against flush IOException when the entry is not there
-            }
-        }
-        
-        // Flush the local peer advertisements for the peer.
-        advs = null;
-        try {
-            advs = discovery.getLocalAdvertisements(DiscoveryService.PEER, "PID", peerIDStr);
-        } catch (IOException failed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed discovering peer advertisements for " + peerIDStr, failed);
-            }
-        }
-        
-        while ((null != advs) && advs.hasMoreElements()) {
-            Advertisement adv = advs.nextElement();
-            
-            if (!(adv instanceof PeerAdvertisement)) {
-                continue;
-            }
-            
-            // ok so let's delete the advertisement
-            try {
-                discovery.flushAdvertisement(adv);
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("removed PeerAdvertisement for " + peerIDStr);
-                }
-            } catch (IOException ex) {// protect against flush IOException when the entry is not there
-            }
-        }
-        // remove it from the cache as well
-        lruCache.remove(peerID);
-    }
-    
-    /**
-     * publish or update new route from the advertisement cache
-     *
-     * @param route to be published or updated
-     * @return boolean  true or false if adv cache was updated
-     */
-    protected boolean updateRoute(RouteAdvertisement route) {
-        DiscoveryService discovery;
-        
-        // check if CM is in used
-        if (!useCM) {
-            return false;
-        } else {
-            discovery = group.getDiscoveryService();
-            if (null == discovery) {
-                return true;
-            }
-        }
-        
-        try {
-            String realPeerID = route.getDestPeerID().toString();
-            
-            // check first if we have a route advertisement
-            Enumeration<Advertisement> advs = discovery.getLocalAdvertisements(DiscoveryService.ADV, RouteAdvertisement.DEST_PID_TAG,  realPeerID);
-            
-            if (advs.hasMoreElements()) {
-                Advertisement adv = advs.nextElement();
-
-                if (adv instanceof RouteAdvertisement) {
-                    RouteAdvertisement oldRouteAdv = (RouteAdvertisement) adv;
-
-                    // check if the old route is equal to the new route
-                    if (!route.equals(oldRouteAdv)) {
-                        // publish the new route
-                        // XXX 20060106 bondolo These publication values won't be obeyed if
-                        // the route had been previously published.
-                        discovery.publish(route, DEFAULT_EXPIRATION, DEFAULT_EXPIRATION);
-                        lruCache.put(route.getDestPeerID(), route);
-                        return true;
-                    }
-                }
-            } else {
-                // publish the new route
-                discovery.publish(route, DEFAULT_EXPIRATION, DEFAULT_EXPIRATION);
-                lruCache.put(route.getDestPeerID(), route);
-                return true;
-            }
-        } catch (Exception e) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "  failure to publish route advertisement response", e);
-            }
-        }
-        return false;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/RouteControl.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/RouteControl.java
deleted file mode 100644 (file)
index ccf0ec2..0000000
+++ /dev/null
@@ -1,502 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-/**
- * This class is used to control the Router route options
- *
- */
-package net.jxta.impl.endpoint.router;
-
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.Messenger;
-import net.jxta.endpoint.MessengerEvent;
-import net.jxta.endpoint.Message;
-import net.jxta.id.ID;
-import net.jxta.logging.Logging;
-import net.jxta.peer.PeerID;
-import net.jxta.protocol.AccessPointAdvertisement;
-import net.jxta.protocol.RouteAdvertisement;
-
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Vector;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.io.IOException;
-
-/**
- * Provides an "IOCTL" style interface to the JXTA router transport
- */
-public class RouteControl {
-
-    /**
-     * Logger
-     */
-    private static transient final Logger LOG = Logger.getLogger(RouteControl.class.getName());
-
-    /**
-     * return value for operation
-     */
-    public final static int OK = 0; // operation succeeded
-    public final static int ALREADY_EXIST = 1; // failed route already exists
-    public final static int FAILED = -1; // failed operation
-    public final static int DIRECT_ROUTE = 2; // failed direct route
-    public final static int INVALID_ROUTE = 3; // invalid route
-
-    /**
-     * Endpoint Router pointer
-     */
-    private final EndpointRouter router;
-
-    /**
-     * Router CM cache
-     */
-    private final RouteCM routeCM;
-
-    /**
-     * local Peer Id
-     */
-    private final ID localPeerId;
-
-    /**
-     * initialize RouteControl
-     *
-     * @param router the router
-     * @param pid    the PeerID
-     */
-    public RouteControl(EndpointRouter router, ID pid) {
-        this.router = router;
-        this.routeCM = router.getRouteCM();
-        this.localPeerId = pid;
-    }
-
-    /**
-     * get my local route
-     *
-     * @return RoutAdvertisement of the local route
-     */
-    public RouteAdvertisement getMyLocalRoute() {
-        return router.getMyLocalRoute();
-    }
-
-    /**
-     * add a new route. For the route to be useful, we actively verify
-     * the route by trying it
-     *
-     * @param newRoute route to add
-     * @return Integer status (OK, FAILED, INVALID_ROUTE or ALREADY_EXIST)
-     */
-    public int addRoute(RouteAdvertisement newRoute) {
-
-        RouteAdvertisement route = newRoute.clone();
-
-        // check if the destination is not ourself
-        if (route.getDestPeerID().equals(localPeerId)) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Skipping Local peer addRoute");
-            }
-            return ALREADY_EXIST;
-        }
-
-        AccessPointAdvertisement firstHop = route.getFirstHop();
-        PeerID firstHopPid;
-        EndpointAddress firstHopAddr;
-
-        // The route is not necessarily a direct route
-        if (firstHop != null) {
-            firstHopPid = firstHop.getPeerID();
-
-            // The first hop is ourselves. Remove it a move to the new first hop if any
-            if (localPeerId.equals(firstHopPid)) {
-                route.removeHop(firstHopPid);
-                firstHop = route.getFirstHop();
-            }
-        }
-
-        if (firstHop == null) {
-            // It really is a direct route.
-            EndpointAddress destAddress = EndpointRouter.pid2addr(route.getDestPeerID());
-
-            if (router.ensureLocalRoute(destAddress, route) != null) {
-                routeCM.publishRoute(newRoute);
-                return OK;
-            }
-
-            if (router.isLocalRoute(destAddress) || router.isRoutedRoute(route.getDestPeerID())) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Skipping add Route " + destAddress + " already exists");
-                    LOG.fine("isLocalRoute() " + router.isLocalRoute(destAddress) + " isRoutedRoute() : "
-                            + router.isRoutedRoute(route.getDestPeerID()));
-                }
-                return ALREADY_EXIST;
-            }
-
-            // ok go ahead try to connect to the destination using the route info
-            if (router.ensureLocalRoute(destAddress, route) == null) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Failed to connect to address :" + destAddress);
-                }
-                return FAILED;
-            }
-
-            // Use the original route for publication as we may later supply the advertisement to othe peers
-            // which may make good use of ourselves as a first and only hop. (Normally routes are discovered
-            // via route discovery, which automatically stiches routes to the respondant ahead of the
-            // discovered route. But a discovered route adv is sometimes used as well).
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Publishing route :" + newRoute);
-            }
-            routeCM.publishRoute(newRoute);
-            return OK;
-        }
-
-        // we have a long route
-
-        // Manufacture a RA just that as just the routerPeer as a destination.
-        // We only need to publish this route if we don't know about it yet.
-
-        RouteAdvertisement firstHopRoute = null;
-
-        firstHopPid = firstHop.getPeerID();
-        firstHopAddr = EndpointRouter.pid2addr(firstHopPid);
-
-        if (!router.isLocalRoute(firstHopAddr) && !router.isRoutedRoute(firstHopPid)) {
-            firstHopRoute = (RouteAdvertisement) AdvertisementFactory.newAdvertisement(RouteAdvertisement.getAdvertisementType());
-            firstHopRoute.setDest(firstHop.clone());
-            router.updateRouteAdv(firstHopRoute);
-        }
-        if (router.ensureLocalRoute(firstHopAddr, firstHopRoute) == null) {
-            // could not find a route to the first hop, discard the route
-            return FAILED;
-        }
-
-        router.setRoute(route.clone(), false);
-        return OK;
-    }
-
-    /**
-     * Get a current route info
-     *
-     * @param pId destination of the route
-     * @return RouteAdvertisement current route info
-     */
-    public RouteAdvertisement getRouteInfo(PeerID pId) {
-
-        RouteAdvertisement route;
-        EndpointRouter.ClearPendingQuery entry;
-        EndpointAddress addr = EndpointRouter.pid2addr(pId);
-
-        // check if we have a direct route
-        Messenger oneOfThem = router.getCachedMessenger(addr);
-        EndpointAddress pcaddr = (oneOfThem == null) ? null : oneOfThem.getDestinationAddress();
-
-        if (pcaddr != null) {
-            AccessPointAdvertisement ap = (AccessPointAdvertisement)
-                    AdvertisementFactory.newAdvertisement(AccessPointAdvertisement.getAdvertisementType());
-
-            ap.setPeerID(pId);
-            Vector<String> eas = new Vector<String>();
-
-            eas.add(pcaddr.getProtocolName() + "://" + pcaddr.getProtocolAddress());
-            ap.setEndpointAddresses(eas);
-            route = (RouteAdvertisement)
-                    AdvertisementFactory.newAdvertisement(RouteAdvertisement.getAdvertisementType());
-            route.setDest(ap);
-            return route;
-
-        } else { // check if we have a long route
-            route = router.getRoute(addr, false);
-            if (route != null) {
-                return route;
-            } else { // check if we have a pending query
-                entry = router.getPendingRouteQuery(pId);
-                if (entry != null) { // ok we have a pending query
-                    AccessPointAdvertisement ap = (AccessPointAdvertisement)
-                            AdvertisementFactory.newAdvertisement(AccessPointAdvertisement.getAdvertisementType());
-
-                    ap.setPeerID(pId);
-                    Vector<String> eas = new Vector<String>();
-
-                    eas.add("pending " + (entry.isFailed() ? "(failed)" : "(new)"));
-                    ap.setEndpointAddresses(eas);
-                    route = (RouteAdvertisement)
-                            AdvertisementFactory.newAdvertisement(RouteAdvertisement.getAdvertisementType());
-                    route.setDest(ap);
-                    return route;
-                } else { // sorry no route found
-                    AccessPointAdvertisement ap = (AccessPointAdvertisement)
-                            AdvertisementFactory.newAdvertisement(AccessPointAdvertisement.getAdvertisementType());
-
-                    ap.setPeerID(pId);
-                    route = (RouteAdvertisement)
-                            AdvertisementFactory.newAdvertisement(RouteAdvertisement.getAdvertisementType());
-                    route.setDest(ap);
-                    return route;
-                }
-            }
-        }
-    }
-
-    /**
-     * Delete route info
-     *
-     * @param pId destination route to be removed
-     * @return Integer status
-     */
-    public int deleteRoute(PeerID pId) {
-
-        // check if the route Id is not ourself
-        if (pId.equals(localPeerId)) {
-            return INVALID_ROUTE;
-        }
-
-        EndpointAddress addr = EndpointRouter.pid2addr(pId);
-
-        // FIXME tra 20030820 We are only allowing to remove long routes.
-        // Since direct routes can be used as the first hop for multiple
-        // valid routes, we don't want to close the associate messenger. At some
-        // point we should introduce a way to disassociate direct routes and
-        // their corresponding messengers, so we can have a generic table of routes
-        // and a separated table of messengers that can be manipulated
-        // independently.
-
-        // Check if we have a direct route
-        if (router.isLocalRoute(addr)) {
-            return DIRECT_ROUTE;
-        }
-
-        // remove routing table info
-        router.removeRoute(pId);
-
-        // flush the CM. We need to flush the CM
-        // so the route will not be regenarated
-        routeCM.flushRoute(pId);
-
-        return OK;
-    }
-
-    /**
-     * get all the know routes by the router. Return a vector of all
-     * the routes known.
-     * <p/>
-     * This method which is meant for informational purposes, does not lock the maps that
-     * it browses. As a result, it could in some cases generate a concurrent modification
-     * exception.
-     *
-     * @return vector of known routes
-     */
-    public Vector<RouteAdvertisement> getAllRoutesInfo() {
-
-        Vector<RouteAdvertisement> routes = new Vector<RouteAdvertisement>();
-        EndpointAddress ea;
-
-        try {
-            // get the direct routes
-            for (Iterator it = router.getAllCachedMessengerDestinations(); it.hasNext();) {
-                ea = (EndpointAddress) it.next();
-                AccessPointAdvertisement ap = (AccessPointAdvertisement)
-                        AdvertisementFactory.newAdvertisement(AccessPointAdvertisement.getAdvertisementType());
-
-                ap.setPeerID(EndpointRouter.addr2pid(ea));
-                Vector<String> eas = new Vector<String>();
-                Messenger oneOfThem = router.getCachedMessenger(ea);
-                EndpointAddress pcaddr = (oneOfThem == null) ? null : oneOfThem.getDestinationAddress();
-
-                if (pcaddr == null) { // incomplete route
-                    eas.add("unknown");
-                } else {
-                    eas.add(pcaddr.getProtocolName() + "://" + pcaddr.getProtocolAddress());
-                }
-                ap.setEndpointAddresses(eas);
-                RouteAdvertisement r = (RouteAdvertisement)
-                        AdvertisementFactory.newAdvertisement(RouteAdvertisement.getAdvertisementType());
-
-                r.setDest(ap);
-                routes.add(r);
-            }
-
-            // now get the long routes
-            // Use entrySet, there's no point in doing redundant lookups
-            // in the map.
-            for (Iterator<Map.Entry<ID, RouteAdvertisement>> i = router.getRoutedRouteAllDestinations(); i.hasNext();) {
-                Map.Entry<ID, RouteAdvertisement> entry = i.next();
-
-                routes.add(entry.getValue());
-            }
-
-            for (Map.Entry<PeerID, EndpointRouter.ClearPendingQuery> entry : router.getPendingQueriesAllDestinations()) {
-                PeerID pid = entry.getKey();
-                AccessPointAdvertisement ap = (AccessPointAdvertisement)
-                        AdvertisementFactory.newAdvertisement(AccessPointAdvertisement.getAdvertisementType());
-
-                ap.setPeerID(pid);
-                Vector<String> eas = new Vector<String>();
-
-                eas.add("pending " + (entry.getValue().isFailed() ? "(failed)" : "(new)"));
-                ap.setEndpointAddresses(eas);
-                RouteAdvertisement r = (RouteAdvertisement)
-                        AdvertisementFactory.newAdvertisement(RouteAdvertisement.getAdvertisementType());
-
-                r.setDest(ap);
-                routes.add(r);
-            }
-        } catch (Exception ex) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "getAllRoutesInfo error : ", ex);
-            }
-        }
-        return routes;
-    }
-
-    /**
-     * get RouteCM usage
-     *
-     * @return true if use route CM is set
-     */
-    public boolean useRouteCM() {
-        return router.getRouteCM().useRouteCM();
-    }
-
-    /**
-     * get RouteResolver usage
-     *
-     * @return true of use route resolver
-     */
-    public boolean useRouteResolver() {
-        return router.getRouteResolver().useRouteResolver();
-    }
-
-    /**
-     * enable usage of Route CM cache
-     */
-    public void enableRouteCM() {
-        router.getRouteCM().enableRouteCM(true);
-    }
-
-    /**
-     * disable usage of Route CM cache
-     */
-    public void disableRouteCM() {
-        router.getRouteCM().enableRouteCM(false);
-    }
-
-    /**
-     * enable usage of Route Resolver
-     */
-    public void enableRouteResolver() {
-        router.getRouteResolver().enableRouteResolver(true);
-    }
-
-    /**
-     * disable usage of Route resolver
-     */
-    public void disableRouteResolver() {
-        router.getRouteResolver().enableRouteResolver(false);
-    }
-
-    /**
-     * Get the low level messenger for a destination.
-     *
-     * @param source  the source endpoint address
-     * @param destination the destination endpoint address
-     * @param messenger the messenger to add
-     * @return true if successful
-     */
-    public boolean addMessengerFor(Object source, EndpointAddress destination, Messenger messenger) {
-        return router.newMessenger(new MessengerEvent(source, messenger, destination));
-    }
-
-    /**
-     * Get the low level messenger for a destination.
-     *
-     * @param destination the destination endpoint address
-     * @param hint        route hint
-     * @return  the messenger for the destination
-     */
-    public Messenger getMessengerFor(EndpointAddress destination, Object hint) {
-        if (!(hint instanceof RouteAdvertisement)) {
-            hint = null;
-        }
-
-        return router.ensureLocalRoute(destination, (RouteAdvertisement) hint);
-    }
-    /**
-     * Determines whether a connection to a specific node exists, or if one can be created.
-     * This method can block to ensure a usable connection exists, it does so by sending an empty
-     * message.
-     *
-     * @param pid Node ID
-     * @return true, if a connection already exists, or a new was sucessfully created
-     */
-    public boolean isConnected(PeerID pid) {
-        Messenger messenger = getMessengerFor(new EndpointAddress("jxta", pid.getUniqueValue().toString(), null, null), null);
-        if (messenger == null) {
-            return false;
-        }
-        if ((messenger.getState() & Messenger.USABLE) != 0) {
-            try {
-                //ensure it can be used
-                messenger.sendMessageB(new Message(), null, null);
-            } catch (IOException io) {
-                // determine whether it is usable
-                return (messenger.getState() & Messenger.USABLE) != 0;
-            }
-        }
-        return (messenger.getState() & Messenger.CLOSED) != Messenger.CLOSED;
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/RouteResolver.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/RouteResolver.java
deleted file mode 100644 (file)
index 6f3cfd1..0000000
+++ /dev/null
@@ -1,1432 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.endpoint.router;
-
-import net.jxta.credential.Credential;
-import net.jxta.document.*;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.OutgoingMessageEvent;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.id.ID;
-import net.jxta.impl.cm.Srdi;
-import net.jxta.impl.cm.Srdi.SrdiInterface;
-import net.jxta.impl.cm.SrdiIndex;
-import net.jxta.impl.protocol.*;
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.membership.MembershipService;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.platform.Module;
-import net.jxta.protocol.*;
-import net.jxta.resolver.QueryHandler;
-import net.jxta.resolver.ResolverService;
-import net.jxta.resolver.SrdiHandler;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.io.IOException;
-import java.io.Reader;
-import java.io.StringReader;
-import java.util.*;
-import java.util.concurrent.atomic.AtomicInteger;
-
-/**
- * Handles dynamic route resolution.
- */
-class RouteResolver implements Module, QueryHandler, SrdiHandler, SrdiInterface {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(RouteResolver.class.getName());
-
-    /**
-     * Router Service Name
-     */
-    public final static String routerSName = "EndpointRouter";
-
-    private final static String srdiIndexerFileName = "routerSrdi";
-
-    /**
-     * Negative Route query acknowledgment
-     */
-    private final static int NACKROUTE_QUERYID = -1;
-
-    /**
-     * Bad route expiration. Amount of time we consider a route bad
-     */
-    private final static long BADROUTE_EXPIRATION = 2L * TimeUtils.AMINUTE;
-
-    /**
-     * Default dynamic route resolution configuration preference.
-     */
-    private final static boolean USE_ROUTE_RESOLVER_DEFAULT = true;
-
-    /**
-     * Configuration property that disables the usage
-     * of dynamic route resolution. Dynamic routes
-     * will not be discovered. set to true by default
-     * can be overwritten via ConfigParams
-     */
-    private boolean useRouteResolver = USE_ROUTE_RESOLVER_DEFAULT;
-
-    /**
-     * PeerGroup Service Handle
-     */
-    private PeerGroup group = null;
-
-    /**
-     * Resolver service handle
-     */
-    private ResolverService resolver = null;
-
-    /**
-     * membership service
-     */
-    private MembershipService membership = null;
-
-    /**
-     * EndpointRouter pointer
-     */
-    private EndpointRouter router = null;
-
-    /**
-     * local peer ID as a endpointAddress.
-     */
-    private EndpointAddress localPeerAddr = null;
-
-    /**
-     * local Peer ID
-     */
-    private ID localPeerId = null;
-
-    /**
-     * Route CM Persistent cache
-     */
-    private RouteCM routeCM = null;
-
-    /**
-     *  The current resolver query ID. static to make debugging easier.
-     */
-    private final static AtomicInteger qid = new AtomicInteger(0);
-
-    /**
-     * SRDI route index
-     */
-    private SrdiIndex srdiIndex = null;
-
-    /**
-     * SRDI Index
-     */
-    private Srdi srdi = null;
-
-    /**
-     *  Encapsulates current Membership Service credential.
-     */
-    final static class CurrentCredential {
-
-        /**
-         *     The current default credential
-         */
-        final Credential credential;
-        
-        /**
-         *     The current default credential in serialized XML form.
-         */
-        final XMLDocument credentialDoc;
-        
-        CurrentCredential(Credential credential, XMLDocument credentialDoc) {
-            this.credential = credential;
-            this.credentialDoc = credentialDoc;
-        }
-    }
-    
-    /**
-     *   The current Membership service default credential.
-     */
-    CurrentCredential currentCredential;
-    
-    /**
-     *  Listener we use for membership property events.
-     */
-    private class CredentialListener implements PropertyChangeListener {
-
-        /**
-         *  Standard Constructor
-         */
-        CredentialListener() {}
-        
-        /**
-         *  {@inheritDoc}
-         */
-        public void propertyChange(PropertyChangeEvent evt) {
-            if (MembershipService.DEFAULT_CREDENTIAL_PROPERTY.equals(evt.getPropertyName())) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("New default credential event");
-                }
-
-                synchronized (RouteResolver.this) {
-                    Credential cred = (Credential) evt.getNewValue();
-                    XMLDocument credentialDoc;
-                    if (null != cred) {
-                        try {
-                            credentialDoc = (XMLDocument) cred.getDocument(MimeMediaType.XMLUTF8);
-                            currentCredential = new CurrentCredential(cred, credentialDoc);
-                        } catch (Exception all) {
-                            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                                LOG.log(Level.WARNING, "Could not generate credential document", all);
-                            }
-                            currentCredential = null;
-                        }
-                    } else {
-                        currentCredential = null;
-                    }
-                }
-            }
-        }
-    }
-
-    final CredentialListener membershipCredListener = new CredentialListener();
-
-    /**
-     * @param router the router
-     */
-    RouteResolver(EndpointRouter router) {
-        this.router = router;
-    }
-
-    /**
-     * initialize  routeResolver
-     */
-    public void init(PeerGroup group, ID assignedID, Advertisement impl) throws PeerGroupException {
-
-        ModuleImplAdvertisement implAdvertisement = (ModuleImplAdvertisement) impl;
-
-        // extract Router service configuration properties
-        ConfigParams confAdv = group.getConfigAdvertisement();
-        XMLElement paramBlock = null;
-
-        if (confAdv != null) {
-            paramBlock = (XMLElement) confAdv.getServiceParam(assignedID);
-        }
-
-        if (paramBlock != null) {
-            // get our tunable router parameter
-            Enumeration param;
-
-            param = paramBlock.getChildren("useRouteResolver");
-            if (param.hasMoreElements()) {
-                useRouteResolver = Boolean.getBoolean(((XMLElement) param.nextElement()).getTextValue());
-            }
-        }
-
-        this.group = group;
-
-        localPeerId = group.getPeerID();
-
-        localPeerAddr = EndpointRouter.pid2addr(group.getPeerID());
-
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring Router Transport Resolver : " + assignedID);
-
-            if (implAdvertisement != null) {
-                configInfo.append("\n\tImplementation :");
-                configInfo.append("\n\t\tModule Spec ID: ").append(implAdvertisement.getModuleSpecID());
-                configInfo.append("\n\t\tImpl Description : ").append(implAdvertisement.getDescription());
-                configInfo.append("\n\t\tImpl URI : ").append(implAdvertisement.getUri());
-                configInfo.append("\n\t\tImpl Code : ").append(implAdvertisement.getCode());
-            }
-
-            configInfo.append("\n\tGroup Params :");
-            configInfo.append("\n\t\tGroup : ").append(group);
-            configInfo.append("\n\t\tPeer ID : ").append(group.getPeerID());
-
-            configInfo.append("\n\tConfiguration:");
-            configInfo.append("\n\t\tUse Route Resolver : ").append(useRouteResolver());
-            LOG.config(configInfo.toString());
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public int startApp(String[] arg) {
-
-        resolver = group.getResolverService();
-
-        if (null == resolver) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Endpoint Router start stalled until resolver service available");
-            }
-            return Module.START_AGAIN_STALLED;
-        }
-
-        membership = group.getMembershipService();
-
-        if (null == membership) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Endpoint Router start stalled until membership service available");
-            }
-            return Module.START_AGAIN_STALLED;
-        }
-
-        resolver.registerHandler(routerSName, this);
-        // create and register the srdi service
-        srdiIndex = new SrdiIndex(group, srdiIndexerFileName);
-        // Srdi is a thread but we are not going to start,
-        // since the service is reactive.
-        srdi = new Srdi(group, routerSName, this, srdiIndex, 0, 0);
-        resolver.registerSrdiHandler(routerSName, this);
-
-        synchronized (this) {
-            // register our credential listener.
-            membership.addPropertyChangeListener(MembershipService.DEFAULT_CREDENTIAL_PROPERTY, membershipCredListener);
-            
-            try {
-                // set the initial version of the default credential.
-                currentCredential = null;
-                Credential credential = membership.getDefaultCredential();
-                XMLDocument credentialDoc;
-
-                if (null != credential) {
-                    credentialDoc = (XMLDocument) credential.getDocument(MimeMediaType.XMLUTF8);
-                    currentCredential = new CurrentCredential(credential, credentialDoc);
-                }
-            } catch (Exception all) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "could not get default credential", all);
-                }
-            }
-        }
-
-        // get the RouteCM cache service
-        routeCM = router.getRouteCM();
-
-        return Module.START_OK;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Careful that stopApp() could in theory be called before startApp().
-     */
-    public void stopApp() {
-
-        resolver.unregisterHandler(routerSName);
-
-        // unregister SRDI
-        resolver.unregisterSrdiHandler(routerSName);
-        srdiIndex.stop();
-
-        membership.removePropertyChangeListener("defaultCredential", membershipCredListener);
-        currentCredential = null;
-
-        resolver = null;
-        srdi = null;
-        membership = null;
-    }
-
-    /**
-     * return routeResolver usage
-     *
-     * @return routeResolver usage
-     */
-    boolean useRouteResolver() {
-        return useRouteResolver;
-    }
-
-    /**
-     * enable routeResolver usage
-     * @param enable if true, enables route resolver
-     */
-    void enableRouteResolver(boolean enable) {
-        useRouteResolver = enable;
-    }
-
-    /**
-     * issue a new route discovery resolver request
-     *
-     * @param peer the destination as a logical endpoint address
-     */
-    protected void findRoute(EndpointAddress peer) {
-
-        RouteAdvertisement myRoute = router.getMyLocalRoute();
-
-        // No need to pursue further if we haven't initialized our own route as
-        // responding peers are not going to be able to respond to us.
-        if (myRoute == null) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Cannot issue a find route if we don\'t know our own route");
-            }
-            return;
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Find route for peer = " + peer);
-        }
-
-        try {
-            // create a new RouteQuery message
-            RouteQuery doc;
-
-            // check if we have some bad route information
-            // for that peer, in that case pass the bad hop count
-            BadRoute badRoute;
-
-            badRoute = router.getBadRoute(peer);
-
-            if (badRoute != null) {
-                // ok we have a bad route
-                // pass the bad hops info as part of the query
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("findRoute sends query: known bad Hops" + badRoute);
-                }
-                doc = new RouteQuery(EndpointRouter.addr2pid(peer), myRoute, badRoute.getBadHops());
-            } else {
-                doc = new RouteQuery(EndpointRouter.addr2pid(peer), myRoute, null);
-            }
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Sending query for peer : " + peer);
-            }
-
-            XMLDocument credentialDoc;
-            CurrentCredential current = currentCredential;
-
-            if (null != current) {
-                credentialDoc = current.credentialDoc;
-            } else {
-                credentialDoc = null;
-            }
-          
-            ResolverQuery query = new ResolverQuery(routerSName, credentialDoc, localPeerId.toString(), doc.toString(), qid.incrementAndGet());
-
-            // only run SRDI if we are a rendezvous
-            // FIXME 20060106 bondolo This is not dynamic enough. The route 
-            // resolver needs to respond to changes in rendezvous configuration 
-            // at runtime.
-            if (group.isRendezvous()) {
-
-                // check where to send the query via SRDI
-                List<PeerID> results;
-
-                if (srdiIndex != null) {
-                    // try to find a least 10 entries, will pick up one
-                    // randomly. This will protect against retry. It is
-                    // likely that a number of RDV will know about a route
-                    results = srdiIndex.query("route", RouteAdvertisement.DEST_PID_TAG, EndpointRouter.addr2pid(peer).toString(), 10);
-
-                    if (results != null && !results.isEmpty()) {
-                        // use SRDI to send the query
-                        // remove any non rdv peers from the candidate list
-                        // and garbage collect the index in the process
-                        List<PeerID> clean = cleanupAnyEdges(query.getSrcPeer(), results);
-
-                        if (!clean.isEmpty()) {
-                            // The purpose of incrementing the hopcount
-                            // when an SRDI index match is found (we got a
-                            // pointer to a rdv that should have the route) is to
-                            // restrict any further forwarding. The increment
-                            // count is only done when a matching SRDI index is
-                            // found. Not when the replica is selected as we
-                            // still need to forward the query.  This restriction
-                            // is purposelly done to avoid too many longjumps
-                            // within a walk.
-                            query.incrementHopCount();
-
-                            srdi.forwardQuery(clean, query, 1);
-                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                LOG.fine("found an srdi entry forwarding query to SRDI peer");
-                            }
-                            return;
-                        }
-                    } else {
-                        // it is not in our cache, look for the replica peer
-                        // we need to send the query
-                        PeerID destPeer = srdi.getReplicaPeer(EndpointRouter.addr2pid(peer).toString());
-
-                        if (destPeer != null && !destPeer.equals(localPeerId)) {
-                            // don't push anywhere if we do not have a replica
-                            // or we are trying to push to ourself
-                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                LOG.fine("processQuery srdiIndex DHT forward :" + destPeer);
-                            }
-
-                            srdi.forwardQuery(destPeer, query);
-                            return;
-                        } else {
-                            LOG.fine("processQuery srdiIndex DHT forward resulted in no op");
-                        }
-                    }
-                }
-            }
-
-            // if we reach that point then we just use the resolver walk
-            resolver = group.getResolverService();
-            if (resolver != null) {
-                resolver.sendQuery(null, query);
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("find route query sent");
-                }
-            } else {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("cannot get the resolver service");
-                }
-            }
-        } catch (Exception ee) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Exception in findRoute", ee);
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * This is called by the Generic ResolverServiceImpl when processing a
-     * response to a query.
-     */
-    public void processResponse(ResolverResponseMsg response) {
-
-        if (!useRouteResolver) { // Route resolver disabled
-            return;
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("processResponse got a response");
-        }
-
-        // convert the response into a RouteResponse
-        RouteResponse doc = null;
-
-        try {
-            Reader ip = new StringReader(response.getResponse());
-
-            XMLDocument asDoc = (XMLDocument)
-                    StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, ip);
-
-            doc = new RouteResponse(asDoc);
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "malformed response - discard", e);
-            }
-            return;
-        }
-
-        RouteAdvertisement dstRoute = doc.getDestRoute();
-        RouteAdvertisement srcRoute = doc.getSrcRoute();
-        int queryId = response.getQueryId();
-
-        EndpointAddress routingPeer = EndpointRouter.pid2addr(srcRoute.getDestPeerID());
-        EndpointAddress destPeer = EndpointRouter.pid2addr(dstRoute.getDestPeerID());
-
-        // check if we have a negative route response
-        if (queryId == NACKROUTE_QUERYID) {
-            AccessPointAdvertisement badHop = dstRoute.nextHop(EndpointRouter.addr2pid(routingPeer));
-
-            PeerID badPeer;
-
-            if (badHop != null) {
-                badPeer = badHop.getPeerID();
-            } else { // the bad hop is the final destination
-                badPeer = dstRoute.getDestPeerID();
-            }
-
-            processBadRoute(badPeer, dstRoute);
-            return;
-        }
-
-        // This is not our own peer adv, so we must not keep it
-        // for more than its expiration time.
-        // we only need to publish this route if
-        // we don't know about it yet
-        // XXX: here is where we could be more conservative and use isNormallyReachable() instead, thus excluding
-        // incoming messengers.
-        if ((!router.isLocalRoute(EndpointRouter.pid2addr(srcRoute.getDestPeerID())))
-                && (!router.isRoutedRoute(srcRoute.getDestPeerID()))) {
-            router.updateRouteAdv(srcRoute);
-        }
-
-        if (destPeer.equals(routingPeer)) {
-            // The dest peer itself managed to respond to us. That means we
-            // learned the route from the reverseRoute in the message
-            // itself. So, there's nothing we need to do.
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("learn route directly from the destination");
-            }
-        } else {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("learn route:" + routingPeer);
-            }
-
-            try {
-                // build the candidate route using the
-                // route response from the respondant peer
-                RouteAdvertisement candidateRoute = RouteAdvertisement.newRoute(EndpointRouter.addr2pid(destPeer),
-                        EndpointRouter.addr2pid(routingPeer),(Vector) dstRoute.getVectorHops().clone());
-
-                // cleanup the candidate route from any loop and remove the local peer extra
-                // cycle
-                RouteAdvertisement.cleanupLoop(candidateRoute, (PeerID) localPeerId);
-
-                // Is there anything left in that route (or did the respondant
-                // believe that we are the last hop on the route - which
-                // obviously we are not.
-                if (candidateRoute.size() == 0) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Route response outdated: NACK responder");
-                    }
-                    generateNACKRoute(EndpointRouter.addr2pid(routingPeer), EndpointRouter.addr2pid(destPeer), dstRoute.getVectorHops());
-                    return;
-                }
-
-                // get the address of the first hop in the route to verify that
-                // we have a route (direct or long) to the first hop, so the route
-                // is valid
-                EndpointAddress candidateRouter = EndpointRouter.pid2addr(candidateRoute.getFirstHop().getPeerID());
-
-                // check that we have a direct connection to the first hop
-                if (router.ensureLocalRoute(candidateRouter, null) == null) {
-                    // If we do not have a direct route to the candidate router check
-                    // for a long route in that case stich the route
-                    RouteAdvertisement routeToRouter = router.getRoute(candidateRouter, false);
-
-                    if (routeToRouter == null) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Route response useless: no route to next router hop");
-                        }
-                        return;
-                    }
-
-                    // stich the route removing any loops and localPeer cycle
-                    if (RouteAdvertisement.stichRoute(candidateRoute, routeToRouter, (PeerID) localPeerId)) {
-                        router.setRoute(candidateRoute, false);
-                    } else {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Route response error stiching route response");
-                        }
-                        return;
-                    }
-                } else {
-                    // we have a direct connection with the first hop of the candidate route
-                    // set the new route, which starts with the peer that replied to us.
-                    router.setRoute(candidateRoute, false);
-                }
-            } catch (Exception ex) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failure building response route", ex);
-                    LOG.warning("               bad dstRoute: " + dstRoute.display());
-                }
-            }
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("finish process route response successfully");
-            }
-        }
-    }
-
-    /**
-     * bad route, so let's remove everything we have so
-     * we can start from scratch. We are maintaining a
-     * bad route up to DEFAULT_ROUTE expiration after
-     * that we consider it to be ok to retry the same route
-     * We are removing both the route and peer advertisement
-     * to force a new route query
-     *
-     * @param badHop source PeerID of NACK route info
-     * @param dest   original route information
-     */
-    private void processBadRoute(PeerID badHop, RouteAdvertisement dest) {
-
-        EndpointAddress addr = EndpointRouter.pid2addr(dest.getDestPeerID());
-
-        if (addr == null) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("remove bad route has a bad route info - discard");
-            }
-            return;
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("remove bad route info for dest " + dest.display());
-            if (badHop != null) {
-                LOG.fine("remove bad route bad hop " + badHop);
-            }
-        }
-
-        try {
-
-            // check first that we still have the same route, we may already
-            // using a new route
-            RouteAdvertisement currentRoute = router.getRoute(addr, false);
-
-            if (currentRoute == null) { // we already cleanup the route info
-                return;
-            }
-
-            // check if we still have the old bad route, we may have
-            // already updated the route
-            if (!currentRoute.equals(dest)) {
-
-                // check if the bad hop is not the destination
-                // if it is then we still have a bad route
-                if (badHop == null) {
-                    // we could get the bad hop, so consider the route ok
-                    return;
-                }
-                if (badHop.equals(EndpointRouter.addr2pid(addr))) {
-                    // check if the new route may still contain the bad hop
-                    // the known bad hop is the hop after the src peer that
-                    // responded with a NACK route
-                    // In this case we also consider the route bad
-                    if (!currentRoute.containsHop(badHop)) {
-                        return; // we are ok
-                    } else {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("current route is bad because it contains known bad hop" + badHop);
-                        }
-                    }
-                } else {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("current route is bad because it contains known bad destination" + badHop);
-                    }
-                }
-
-            }
-
-            // keep the bad one in a cache table so we don't retry them
-            // right away. We use the default route timeout
-            BadRoute badRoute = (router.getBadRoute(addr));
-
-            if (badRoute != null) {
-                if (badRoute.getExpiration() > TimeUtils.timeNow()) {// nothing to do. the information is still valid
-                } else {
-                    // It is ancient knowlege update it
-                    badRoute.setExpiration(TimeUtils.toAbsoluteTimeMillis(BADROUTE_EXPIRATION));
-                }
-
-                // check if we have to add a new bad hop
-                // to our bad route
-                if (badHop != null) {
-                    badRoute.addBadHop(badHop);
-                    badRoute.setExpiration(TimeUtils.toAbsoluteTimeMillis(BADROUTE_EXPIRATION));
-                }
-
-                router.setBadRoute(addr, badRoute);
-                return;
-            } else {
-                // create a new NACK route entry
-                Set<PeerID> badHops;
-
-                if (badHop != null) {
-                    badHops = Collections.singleton(badHop);
-                } else {
-                    badHops = Collections.emptySet();
-                }
-
-                badRoute = new BadRoute(dest, TimeUtils.toAbsoluteTimeMillis(BADROUTE_EXPIRATION), badHops);
-                router.setBadRoute(addr, badRoute);
-            }
-
-            // remove route from route CM
-            routeCM.flushRoute(EndpointRouter.addr2pid(addr));
-
-            // let's remove the remote route info from the routing table
-            // we do this after we removed the entries from the CM
-            // to avoid that another thread is putting back the entry
-            router.removeRoute(EndpointRouter.addr2pid(addr));
-        } catch (Exception ex) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "exception during bad route removal", ex);
-            }
-        }
-    }
-
-    /**
-     * Process the Query, and generate response
-     *
-     * @param query the query to process
-     */
-    public int processQuery(ResolverQueryMsg query) {
-
-        if (!useRouteResolver) { // Route resolver disabled
-            return ResolverService.OK;
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("processQuery starts");
-        }
-
-        RouteQuery routeQuery;
-        try {
-            Reader ip = new StringReader(query.getQuery());
-            XMLDocument asDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, ip);
-            routeQuery = new RouteQuery(asDoc);
-        } catch (RuntimeException e) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Malformed Route query ", e);
-            }
-            return ResolverService.OK;
-        } catch (IOException e) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Malformed Route query ", e);
-            }
-            return ResolverService.OK;
-        } 
-
-        PeerID pId = routeQuery.getDestPeerID();
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Looking for route to " + pId);
-        }
-
-        RouteAdvertisement srcRoute = routeQuery.getSrcRoute();
-        Collection<PeerID> badHops = routeQuery.getBadHops();
-
-        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-            StringBuilder badHopsDump = new StringBuilder("bad Hops :\n");
-
-            for (ID aBadHop : badHops) {
-                badHopsDump.append('\t').append(aBadHop);
-            }
-
-            LOG.finer(badHopsDump.toString());
-        }
-
-        // if our source route is not null, then publish it
-        if (srcRoute != null) {
-            if (!(srcRoute.getDestPeerID()).equals(localPeerId)) {
-                // This is not our own peer adv so we must not keep it
-                // longer than its expiration time.
-                try {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Publishing sender route info " + srcRoute.getDestPeerID());
-                    }
-
-                    // we only need to publish this route if
-                    // we don't know about it yet
-                    // XXX: here is where we could be more conservative and use isNormallyReachable() instead, thus excluding
-                    // incoming messengers.
-                    if ((!router.isLocalRoute(EndpointRouter.pid2addr(srcRoute.getDestPeerID())))
-                            && (!router.isRoutedRoute(srcRoute.getDestPeerID()))) {
-                        routeCM.publishRoute(srcRoute);
-                    }
-                } catch (Exception e) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.log(Level.FINE, "Could not publish Route Adv from query - discard", e);
-                    }
-                    return ResolverService.OK;
-                }
-            }
-        } else {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("No src Route in route query - discard ");
-            }
-            return ResolverService.OK;
-        }
-
-        if (pId == null) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Malformed route query request, no PeerId - discard");
-            }
-            return ResolverService.OK;
-        }
-
-        // We have more luck with that one because, since it is part of OUR
-        // message, and not part of the resolver protocol, it is in OUR
-        // format.
-        EndpointAddress qReqAddr = EndpointRouter.pid2addr(pId);
-
-        RouteAdvertisement route;
-
-        // check if this peer has a route to the destination
-        // requested
-        boolean found = false;
-
-        if (qReqAddr.equals(localPeerAddr)) {
-            found = true;
-            // return the route that is my local route
-            route = router.getMyLocalRoute();
-        } else {
-            // only rendezvous can respond to route requests
-            // if not we are generating too much traffic
-            // XXX: here is where we could be more conservative and use isNormallyReachable() instead, thus excluding
-            // incoming messengers.
-            if (router.isLocalRoute(qReqAddr)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Peer has direct route to destination ");
-                }
-                // we should set the route to something  :-)
-
-                found = true;
-
-                // this peer has a direct route to the destination
-                // return the short route advertisement we know for this peer
-                // (For us it is zero hop, and we advertise ourself as the routing
-                // peer in the response. The stiching is done by whoever gets that
-                // response). May be there are more than one hop advertised in-there...
-                // alternate routing peers...should we leave them ?
-                // For now, we keep the full dest, but wack the hops.
-
-                route = (RouteAdvertisement) AdvertisementFactory.newAdvertisement(RouteAdvertisement.getAdvertisementType());
-
-                AccessPointAdvertisement ap = (AccessPointAdvertisement)
-                        AdvertisementFactory.newAdvertisement(AccessPointAdvertisement.getAdvertisementType());
-
-                ap.setPeerID(pId);
-                route.setDest(ap);
-            } else {
-                route = router.getRoute(qReqAddr, false);
-                if (route != null) {
-                    found = true;
-                    // check if we were given some bad hops info
-                    // and see if the found route contains
-                    // any of these bad hops. In that case, we need
-                    // to mark this route as bad
-                    for (PeerID aBadHop : badHops) {
-                        // destination is known to be bad
-                        if (EndpointRouter.addr2pid(qReqAddr).equals(aBadHop)) {
-                            processBadRoute(aBadHop, route);
-                            found = false;
-                            break;
-                        }
-
-                        if (route.containsHop(aBadHop)) {
-                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                LOG.fine("Peer has bad route due to " + aBadHop);
-                            }
-                            processBadRoute(aBadHop, route);
-                            found = false;
-                            break;
-                        }
-                    }
-                }
-            }
-        }
-
-        if (!found) {
-            // discard the request if we are not a rendezvous
-            // else forward to the next peers
-            if (!group.isRendezvous()) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("discard query forwarding as not a rendezvous");
-                }
-                return ResolverService.OK;
-            }
-
-            // did not find a route, check our srdi cache
-            // make sure we protect against out of sync
-            // SRDI index
-
-            // srdi forwarding is only involved once the Index entry has
-            // been found and we forwarded the resolver query. Afterward a
-            // normal walk proceeds from the initial SRDI index pointing
-            // rdv. This is done to protect against potential loopback
-            // entries in the SRDI cache index due to out of sync peerview
-            // and index.
-            if (query.getHopCount() < 2) {
-
-                // check local SRDI cache to see if we have the entry
-                // we look for 10 entries, will pickup one randomly
-                List<PeerID> results = srdiIndex.query("route", RouteAdvertisement.DEST_PID_TAG, pId.toString(), 10);
-
-                if (results.size() > 0) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("processQuery srdiIndex lookup match :" + results.size());
-                    }
-
-                    // remove any non-rdv peers to avoid sending
-                    // to a non-rdv peers and garbage collect the SRDI
-                    // index in the process
-                    List<PeerID> clean = cleanupAnyEdges(query.getSrcPeer(), results);
-
-                    if (clean.size() > 0) {
-
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("found an srdi entry forwarding query to SRDI peer");
-                        }
-
-                        // The purpose of incrementing the hopcount
-                        // when an SRDI index match is found (we got a
-                        // pointer to a rdv that should have the route) is to
-                        // restrict any further forwarding. The increment
-                        // count is only done when a matching SRDI index is
-                        // found. Not when the replica is selected as we
-                        // still need to forward the query.  This restriction
-                        // is purposelly done to avoid too many longjumps
-                        // within a walk.
-                        query.incrementHopCount();
-
-                        // Note: this forwards the query to 1 peer randomly
-                        // selected from the result
-                        srdi.forwardQuery(clean, query, 1);
-
-                        // tell the resolver no further action is needed.
-                        return ResolverService.OK;
-                    }
-                }
-            }
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("did not find a route or SRDI index");
-            }
-
-            // force a walk
-            return ResolverService.Repropagate;
-        }
-
-        // we found a route send the response
-        try {
-            if (route == null) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("we should have had a route at this point");
-                }
-                return ResolverService.OK;
-            }
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("we have a route build route response" + route.display());
-            }
-
-            RouteAdvertisement myRoute = router.getMyLocalRoute();
-
-            // make sure we initialized our local
-            // route info as we will need it to respond. We may
-            // not have our route if we are still
-            // waiting for a relay connection.
-            if (myRoute == null) {
-                return ResolverService.OK;
-            }
-
-            RouteResponse routeResponse = new RouteResponse();
-
-            routeResponse.setDestRoute(route);
-            routeResponse.setSrcRoute(myRoute);
-
-            if (routeResponse == null) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("error creating route response");
-                }
-                return ResolverService.OK;
-            }
-
-            // construct a response from the query
-            ResolverResponseMsg res = query.makeResponse();
-
-            CurrentCredential current = currentCredential;
-
-            if (null != current) {
-                res.setCredential(current.credentialDoc);
-            }
-            res.setResponse(routeResponse.toString());
-
-            resolver.sendResponse(query.getSrcPeer().toString(), res);
-            return ResolverService.OK;
-
-        } catch (Exception ee) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "processQuery: error while processing query ", ee);
-            }
-            return ResolverService.OK;
-        }
-    }
-
-    /**
-     * Return a route error in case a route was found to be invalid
-     * as the current hop cannot find a way to forward the message to the
-     * destination or any other hops in the forward part of the route.
-     * In that case a negative route response is forwarded
-     * to the original source of the message. Now of course we
-     * do not have any way to guarantee that the NACK message will be
-     * received by the sender, but the best we can do is to try :-)
-     * <p/>
-     * we send a query ID to NACKROUTE_QUERYID to indicate
-     * this is a bad Route
-     *
-     * @param src      original source of the message
-     * @param dest     original destination of the message
-     * @param origHops original hops
-     */
-    protected void generateNACKRoute(PeerID src, PeerID dest, Vector<AccessPointAdvertisement> origHops) {
-
-        // As long as the group is partially initialized, do not bother
-        // trying to send NACKS. We can't: it just causes NPEs.
-        if (resolver == null) {
-            return;
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("generate NACK Route response " + src);
-        }
-
-        // check first, if we are not already in process of looking for a
-        // route to the destination peer of the NACK. We should not try to
-        // send a NACK to that destination at that point as this will block
-        // our incoming processing thread while it is looking for a route to
-        // that destination. If there a no pending route requests to that
-        // destination then we can go ahead an attempt to send the NACK. At
-        // the maximum we should have only one thread block while looking for
-        // a specific destination. When we find a route to the destination,
-        // the next NACK processing will be sent.
-
-        if (router.isPendingRouteQuery(src)) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("drop NACK due to pending route discovery " + src);
-            }
-            return;
-        }
-
-        // Generate a route response
-        RouteAdvertisement route = (RouteAdvertisement)
-                AdvertisementFactory.newAdvertisement(RouteAdvertisement.getAdvertisementType());
-
-        AccessPointAdvertisement ap = (AccessPointAdvertisement)
-                AdvertisementFactory.newAdvertisement(AccessPointAdvertisement.getAdvertisementType());
-
-        ap.setPeerID(dest);
-        route.setDest(ap);
-        route.setHops(origHops);
-
-        // set the the route of the peer that
-        // detected the bad route
-        RouteAdvertisement routeSrc = (RouteAdvertisement)
-                AdvertisementFactory.newAdvertisement(RouteAdvertisement.getAdvertisementType());
-
-        AccessPointAdvertisement apSrc = (AccessPointAdvertisement)
-                AdvertisementFactory.newAdvertisement(AccessPointAdvertisement.getAdvertisementType());
-
-        apSrc.setPeerID((PeerID) localPeerId);
-        routeSrc.setDest(apSrc);
-
-        RouteResponse routeResponse = new RouteResponse();
-
-        routeResponse.setDestRoute(route);
-        routeResponse.setSrcRoute(routeSrc);
-        
-        ResolverResponse res = new ResolverResponse();
-
-        res.setHandlerName(routerSName);
-        
-        CurrentCredential current = currentCredential;
-
-        if (null != current) {
-            res.setCredential(current.credentialDoc); 
-        } 
-        
-        res.setQueryId(NACKROUTE_QUERYID);        
-        res.setResponse(routeResponse.toString());
-
-        // send the NACK response back to the originator
-        resolver.sendResponse(src.toString(), res);
-    }
-
-    /**
-     * process an SRDI message request
-     *
-     * @param message SRDI resolver message
-     */
-    public boolean processSrdi(ResolverSrdiMsg message) {
-        if(!group.isRendezvous()) {
-            return true;
-        }
-        
-        String value;
-        SrdiMessage srdiMsg;
-
-        try {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Received a SRDI messsage in group" + group.getPeerGroupName());
-            }
-
-            XMLDocument asDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, new StringReader(message.getPayload()));
-            srdiMsg = new SrdiMessageImpl(asDoc);
-        } catch (Exception e) {
-            // we don't understand this msg, let's skip it
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "corrupted SRDI message", e);
-            }
-            return false;
-        }
-
-        PeerID pid = srdiMsg.getPeerID();
-
-        // filter messages that contain messages
-        // about the local peer, so we don't enter
-        // self-reference
-        if (pid.equals(localPeerId)) {
-            return false;
-        }
-
-        for (SrdiMessage.Entry entry : srdiMsg.getEntries()) {
-            // drop any information  about ourself
-            if (entry.key.equals(localPeerId.toString())) {
-                continue;
-            }
-            value = entry.value;
-            if (value == null) {
-                value = "";
-            }
-
-            // Expiration of entries is taken care of by SrdiIdex, so we always add
-            // FIXME hamada 20030314
-            // All routes are added under the secondary key 'DstPID', it would be more correct to
-            // Specify it in the message, but since versioning is not yet supported the following is
-            // acceptable, since it is localized
-            srdiIndex.add(srdiMsg.getPrimaryKey(), RouteAdvertisement.DEST_PID_TAG, entry.key, pid, entry.expiration);
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Primary Key [" + srdiMsg.getPrimaryKey() + "] key [RouteAdvertisement.DEST_PID_TAG]" + " value [" + entry.key + "] exp [" + entry.expiration + "]");
-            }
-        }
-
-        return true;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void pushEntries(boolean all) {
-        // only send to the replica
-        pushSrdi(null, all);
-    }
-
-    /*
-     * push all srdi entries to the rednezvous SRDI cache (new connection)
-     *
-     *@param all if true push all entries, otherwise just deltas
-     */
-    protected void pushSrdi(String peer, boolean all) {
-
-        SrdiMessage srdiMsg;
-        Vector<SrdiMessage.Entry> routeIx = new Vector<SrdiMessage.Entry>();
-
-        // 20021018 tra:Route info don't expire unless the peer disappears
-        // This approach is used to limit the SRDI traffic. The key
-        // point here is that SRDI is used to tell a peer that another
-        // has a route to the destination it is looking for. The information
-        // that SRDI cache is not so much the specific route info but rather
-        // the fact that a peer has knowledge of a route to another peer
-        // We don't want to update the SRDI cache on every route update.
-        // The SRDI cache will be flushed when the peer disconnect from
-        // the rendezvous.
-
-        // We cannot support concurrent modification of the map while we
-        // do that: we must synchronize...
-        for (Iterator<ID> each = router.getAllRoutedRouteAddresses(); each.hasNext();) {
-            ID pid = each.next();
-            SrdiMessage.Entry entry = new SrdiMessage.Entry(pid.toString(), "", Long.MAX_VALUE);
-            routeIx.addElement(entry);
-        }
-
-        try {
-            // check if we have anything to send
-            if (routeIx.size() == 0) {
-                return;
-            }
-
-            srdiMsg = new SrdiMessageImpl(group.getPeerID(),
-                    // one hop
-                    1,
-                    "route", routeIx);
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Sending a SRDI messsage of [All=" + all + "] routes");
-            }
-            // this will replicate entry to the  SRDI replica peers
-            srdi.replicateEntries(srdiMsg);
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "SRDI Push failed", e);
-            }
-        }
-    }
-
-    /*
-     * push srdi entries to the SRDI rendezvous cache
-     * @param all if true push all entries, otherwise just deltas
-     */
-    protected void pushSrdi(ID peer, PeerID id) {
-
-        SrdiMessage srdiMsg;
-
-        try {
-            srdiMsg = new SrdiMessageImpl(group.getPeerID(), 1, // only one hop
-                    "route", id.toString(), null, Long.MAX_VALUE); // maximum expiration
-            // 20021018 tra:Route info don't expire unless the peer disappears
-            // This approach is used to limit the SRDI traffic. The key
-            // point here is that SRDI is used to tell a peer that another
-            // has a route to the destination it is looking for. The information
-            // that SRDI cache is not so much the specific route info but rather
-            // the fact that a peer has knowledge of a route to another peer
-            // We don't want to update the SRDI cache on every route update.
-            // The SRDI cache will be flushed when the peer disconnect from
-            // the rendezvous.
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("sending a router SRDI message add route " + id);
-            }
-            if (peer == null) {
-                PeerID destPeer = srdi.getReplicaPeer(id.toString());
-                peer = destPeer;
-            }
-            // don't push anywhere if we do not have a replica
-            // or we are trying to send the query to ourself
-            if (!localPeerId.equals(peer)) {
-                srdi.pushSrdi(peer, srdiMsg);
-            }
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "SRDI push failed", e);
-            }
-        }
-    }
-
-    /**
-     * remove a SRDI cache entry
-     *
-     * @param peer peer id we send the request, null for sending to all
-     * @param id   peer id of the SRDI route that we want to remove
-     *             from the cache
-     */
-    protected void removeSrdi(String peer, PeerID id) {
-
-        SrdiMessage srdiMsg;
-
-        try {
-            srdiMsg = new SrdiMessageImpl(group.getPeerID(), 1, // only one hop
-                    "route", id.toString(), null, // 0 means remove
-                    0);
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("sending a router SRDI message delete route " + id);
-            }
-
-            if (peer == null) {
-                PeerID destPeer = srdi.getReplicaPeer(id.toString());
-
-                // don't push anywhere if we do not have replica
-                // or we are trying to push to ouself
-                if (destPeer != null && (!destPeer.equals(localPeerId))) {
-                    srdi.pushSrdi(destPeer, srdiMsg);
-                }
-            }
-        } catch (Exception e) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Removing srdi entry failed", e);
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void messageSendFailed(PeerID peerid, OutgoingMessageEvent e) {
-        // when the resolver failed to send, we get a notification and
-        // flush the SRDI cache entries for that destination
-        removeSrdiIndex(peerid);
-    }
-
-    /**
-     * cleanup any edge peers when trying to forward an SRDI query so we are
-     * guaranteed to the best of our knowledge that the peer is a rendezvous.
-     * This is not perfect, as it may take time for the peerview to converge but
-     * at least we can remove any peers that is not a rendezvous.
-     *
-     * @param src     source
-     * @param results vector of PeerIDs
-     * @return cleaned up vector of PeerIDs
-     */
-    protected List<PeerID> cleanupAnyEdges(ID src, List<PeerID> results) {
-        List<PeerID> clean = new ArrayList<PeerID>(results.size());
-
-        // put the peerview as a vector of PIDs
-        List<PeerID> rpvId = srdi.getGlobalPeerView();
-
-        // remove any peers not in the current peerview
-        // these peers may be gone or have become edges
-        for (PeerID pid : results) {
-            // eliminate the src of the query so we don't resend
-            // the query to whom send it to us
-            if (src.equals(pid)) {
-                continue;
-            }
-            // remove the local also, so we don't send to ourself
-            if (localPeerId.equals(pid)) {
-                continue;
-            }
-            if (rpvId.contains(pid)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("valid rdv for SRDI forward " + pid);
-                }
-                clean.add(pid);
-            } else {
-                // cleanup our SRDI cache for that peer
-                srdiIndex.remove(pid);
-            }
-        }
-        return clean;
-    }
-
-    /**
-     * remove SRDI index
-     *
-     * @param pid of the index to be removed
-     */
-    protected void removeSrdiIndex(PeerID pid) {
-        srdiIndex.remove(pid);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/RouterMessenger.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/RouterMessenger.java
deleted file mode 100644 (file)
index 7b9245f..0000000
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.router;
-
-
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.Message;
-import net.jxta.impl.endpoint.BlockingMessenger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.io.IOException;
-import net.jxta.protocol.RouteAdvertisement;
-
-
-/**
- * Messenger for destinations which are logical peers. This messenger is used
- * only at the origin of routes. Incoming messages that are being forwarded to
- * another peer do not use this form of messenger.
- */
-class RouterMessenger extends BlockingMessenger {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(RouterMessenger.class.getName());
-
-    /**
-     * The router we are working for. Also who we make route queries to.
-     */
-    private final EndpointRouter router;
-
-    /**
-     * Constructor for a RouterMessenger.
-     *
-     * @param dstAddress the peer which is the final destination of the message.
-     * @param r          the router which this messenger is servicing.
-     * @param hint       potential hint information that we passed
-     * @throws IOException Thrown if the messenger cannot be constructed for this destination.
-     */
-    public RouterMessenger(EndpointAddress dstAddress, EndpointRouter r, Object hint) throws IOException {
-
-        // Make sure that we do not ask for self destruction.
-        super(r.getEndpointService().getGroup().getPeerGroupID(), dstAddress, false);
-
-        this.router = r;
-
-        // Probably redundant. getGatewayAddress does it.
-        EndpointAddress plainAddr = new EndpointAddress(dstAddress, null, null);
-
-        // Discard the hint if it is not a route advertisement.
-        if (!(hint instanceof RouteAdvertisement)) {
-            hint = null;
-        }
-
-        // We aggressively look for a route upfront. If it fails, we must refuse to create the messenger.
-        EndpointAddress gate = router.getGatewayAddress(plainAddr, true, (RouteAdvertisement) hint);
-
-        if (gate == null) {
-            throw new IOException("Could not construct RouterMessenger, no route for " + plainAddr);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public EndpointAddress getLogicalDestinationImpl() {
-        return getDestinationAddress();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void closeImpl() {// Nothing to do. The underlying connection is not affected.
-        // The messenger will be marked closed by the state machine once completely down; that's it.
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean isIdleImpl() {
-        // We do not need self destruction.
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void sendMessageBImpl(Message message, String service, String serviceParam) throws IOException {
-
-        if (isClosed()) {
-            IOException failure = new IOException("Messenger was closed, it cannot be used to send messages.");
-
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, failure.getMessage(), failure);
-            }
-
-            throw failure;
-        }
-
-        EndpointAddress dest = getDestAddressToUse(service, serviceParam);
-
-        // Loop trying to send message until we run out of routes.
-        Throwable lastFailure = null;
-
-        while (true) {
-            EndpointAddress sendTo = null;
-
-            try {
-                sendTo = router.addressMessage(message, dest);
-                if (null == sendTo) {
-                    break;
-                }
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Sending " + message + " to " + sendTo);
-                }
-
-                router.sendOnLocalRoute(sendTo, message);
-
-                // it worked! We are done.
-                return;
-            } catch (RuntimeException rte) {
-                // Either the message is invalid, or there is
-                // a transport loop and the upper layer should close.
-                // Either way, we must not retry. The loop could be
-                // unbounded.
-
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failure while routing " + message, rte);
-                }
-
-                lastFailure = rte;
-                break;
-            } catch (Throwable theMatter) {
-                if (sendTo == null) {
-                    // This is bad: address message was not able to
-                    // do anything. Stop the loop.
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Unknown failure while routing " + message, theMatter);
-                    }
-                    break;
-                }
-
-                // Everything else is treated like a bad route.
-                lastFailure = theMatter;
-            }
-
-            // Currently we have only one long route per destination.
-            // If the first hop is broken, then that long route is broken
-            // as well. We must dump it, under penalty of trying it over and over again.
-
-            EndpointAddress destPeer = new EndpointAddress(getDestinationAddress(), null, null);
-
-            router.removeRoute(EndpointRouter.addr2pid(destPeer));
-
-            // reset the router message for the next attempt.
-            message.removeMessageElement(message.getMessageElement(EndpointRouterMessage.MESSAGE_NS, EndpointRouterMessage.MESSAGE_NAME));
-        }
-
-        if (lastFailure == null) {
-            lastFailure = new IOException("Could not find a route for : " + dest);
-        }
-
-        // Except if we hit an illegal transport loop, we've exhausted all
-        // the options we had, or there was a RuntimeException.
-        // In both cases we must close. In the latter case it is a
-        // precaution: we're not 100% sure that the message is at fault;
-        // it could be this messenger as well. For illegal transport loops
-        // the invoking messenger should close, not this one.
-
-        if (!(lastFailure instanceof IllegalStateException)) {
-            // FIXME - jice@jxta.org 20040413: as for all the transports. This used to be how this messenger broke itself.  Now,
-            // all it does is too pretend that someone called for a nice close...just before the exception we throw causes the
-            // BlockingMessenger state machine to go into breackage mode. Ultimately transports should get a deeper retrofit.
-            close();
-        }
-
-        // Kind of stupid. Have to convert the runtime exceptions so that we
-        // can re-throw them.
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.log(Level.FINE, "Messenger failed:", lastFailure);
-        }
-
-        if (lastFailure instanceof IOException) {
-            throw (IOException) lastFailure;
-        } else if (lastFailure instanceof RuntimeException) {
-            throw (RuntimeException) lastFailure;
-        } else if (lastFailure instanceof Error) {
-            throw (Error) lastFailure;
-        } else {
-            IOException failure = new IOException("Failed sending " + message);
-            failure.initCause(lastFailure);
-            throw failure;
-        }
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/router/package.html
deleted file mode 100644 (file)
index a20925a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-<HEAD>
-</HEAD>
-<BODY>
-A JXTA {@link net.jxta.endpoint.MessageTransport} implementation which
-simply translates addresses in messages from peer ids to physical Endpoint
-Addresses.
-
-@see net.jxta.endpoint.EndpointService
-@see net.jxta.endpoint.MessageTransport
-@see net.jxta.endpoint.MessageSender
-@see net.jxta.endpoint.MessageReceiver
-@see net.jxta.endpoint.Message
-@see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#trans-tcpipt" target="_blank">JXTA Protocols
-    Specification : Standard JXTA Transport Bindings</a>
-</BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/servlethttp/HttpClientMessenger.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/servlethttp/HttpClientMessenger.java
deleted file mode 100644 (file)
index 62dba70..0000000
+++ /dev/null
@@ -1,917 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.servlethttp;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.HttpURLConnection;
-import java.net.URL;
-
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.io.UnsupportedEncodingException;
-import java.net.MalformedURLException;
-import java.net.SocketTimeoutException;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import net.jxta.document.MimeMediaType;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.StringMessageElement;
-import net.jxta.endpoint.WireFormatMessage;
-import net.jxta.endpoint.WireFormatMessageFactory;
-
-import net.jxta.impl.endpoint.BlockingMessenger;
-import net.jxta.impl.endpoint.EndpointServiceImpl;
-import net.jxta.impl.endpoint.transportMeter.TransportBindingMeter;
-import net.jxta.impl.endpoint.transportMeter.TransportMeterBuildSettings;
-import net.jxta.impl.util.TimeUtils;
-
-/**
- *  Simple messenger that simply posts a message to a URL.
- *
- *  <p/>URL/HttpURLConnection is used, so (depending on your JDK) you will get
- *  reasonably good persistent connection management.
- */
-final class HttpClientMessenger extends BlockingMessenger {
-    
-    /**
-     *  Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(HttpClientMessenger.class.getName());
-    
-    /**
-     *  Minimum amount of time between poll
-     */
-    private final static int MIMIMUM_POLL_INTERVAL = (int) (5 * TimeUtils.ASECOND);
-    
-    /**
-     *  Amount of time to wait for connections to open.
-     */
-    private final static int CONNECT_TIMEOUT = (int) (15 * TimeUtils.ASECOND);
-    
-    /**
-     *  Amount of time we are willing to wait for responses. This is the amount
-     *  of time between our finishing sending a message or beginning a poll and 
-     *  the beginning of receipt of a response.
-     */
-    private final static int RESPONSE_TIMEOUT = (int) (2 * TimeUtils.AMINUTE);
-    
-    /**
-     *  Amount of time we are willing to accept for additional responses. This 
-     *  is the total amount of time we are willing to wait after receiving an
-     *  initial response message whether additional responses are sent or not.
-     *  This setting governs the latency with which we switch back and forth 
-     *  between sending and receiving messages. 
-     */
-    private final static int EXTRA_RESPONSE_TIMEOUT = (int) (2 * TimeUtils.AMINUTE);
-    
-    /**
-     *  Messenger idle timeout.
-     */
-    private final static long MESSENGER_IDLE_TIMEOUT = 15 * TimeUtils.AMINUTE;
-    
-    /**
-     *  Number of attempts we will attempt to make connections.
-     */
-    private final static int CONNECT_RETRIES = 2;
-    
-    /**
-     *  Warn only once about obsolete proxies.
-     */
-    private static boolean neverWarned = true;
-    
-    /**
-     *  The URL we send messages to.
-     */
-    private final URL senderURL;
-    
-    /**
-     * The ServletHttpTransport that created this object.
-     */
-    private final ServletHttpTransport servletHttpTransport;
-
-    /**
-     *  The Return Address element we will add to all messages we send.
-     */
-    private final MessageElement srcAddressElement;
-    
-    /**
-     *  The logical destination address of this messenger.
-     */
-    private final EndpointAddress logicalDest;
-    
-    private TransportBindingMeter transportBindingMeter;
-    
-    /**
-     *  The last time at which we successfully received or sent a message.
-     */
-    private transient long lastUsed = TimeUtils.timeNow();
-    
-    /**
-     *  Poller that we use to get our messages.
-     */
-    private MessagePoller poller = null;
-    
-    /**
-     *  Constructs the messenger.
-     *
-     *  @param servletHttpTransport The transport this messenger will work for.
-     *  @param srcAddr The source address.
-     *  @param destAddr The destination address.
-     */
-    HttpClientMessenger(ServletHttpTransport servletHttpTransport, EndpointAddress srcAddr, EndpointAddress destAddr) throws IOException {
-        
-        // We do use self destruction.
-        super(servletHttpTransport.getEndpointService().getGroup().getPeerGroupID(), destAddr, true);
-        
-        this.servletHttpTransport = servletHttpTransport;
-
-        EndpointAddress srcAddress = srcAddr;
-        this.srcAddressElement = new StringMessageElement(EndpointServiceImpl.MESSAGE_SOURCE_NAME, srcAddr.toString(), null);
-        
-        String protoAddr = destAddr.getProtocolAddress();
-        
-        String host;
-        int port;
-        int lastColon = protoAddr.lastIndexOf(':');
-        
-        if ((-1 == lastColon) || (lastColon < protoAddr.lastIndexOf(']')) || ((lastColon + 1) == protoAddr.length())) {
-            // There's no port or it's an IPv6 addr with no port or the colon is the last character.
-            host = protoAddr;
-            port = 80;
-        } else {
-            host = protoAddr.substring(0, lastColon);
-            port = Integer.parseInt(protoAddr.substring(lastColon + 1));
-        }
-        
-        senderURL = new URL("http", host, port, "/");
-        
-        logicalDest = retreiveLogicalDestinationAddress();
-        
-        // Start receiving messages from the other peer
-        poller = new MessagePoller(srcAddr.getProtocolAddress(), destAddr);
-                
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("New messenger : " + this );
-        }
-    }
-    
-    /*
-     * The cost of just having a finalize routine is high. The finalizer is
-     * a bottleneck and can delay garbage collection all the way to heap
-     * exhaustion. Leave this comment as a reminder to future maintainers.
-     * Below is the reason why finalize is not needed here.
-     *
-     * These messengers (normally) never go to the application layer. Endpoint
-     * code does call close when necessary.
-     
-     protected void finalize() {
-     }
-     
-     */
-    
-    /**
-     *  {@inheritDoc}
-     *  <p/>
-     *  A simple implementation for debugging. <b>Do not parse the String
-     *  returned. All of the information is available in other (simpler) ways.</b>
-     */
-    public String toString() {
-        StringBuilder result = new StringBuilder(super.toString());
-        result.append(" {");
-        result.append(getDestinationAddress());
-        result.append(" / ");
-        result.append(getLogicalDestinationAddress());
-        result.append("}");
-
-        return result.toString();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    void doShutdown() {
-        super.shutdown();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized void closeImpl() {
-        
-        if (isClosed()) {
-            return;
-        }
-        
-        super.close();
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Close messenger to " + senderURL);
-        }
-        
-        MessagePoller stopPoller = poller;
-        
-        poller = null;
-        
-        if (null != stopPoller) {
-            stopPoller.stop();
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void sendMessageBImpl(Message message, String service, String serviceParam) throws IOException {
-        
-        if (isClosed()) {
-            IOException failure = new IOException("Messenger was closed, it cannot be used to send messages.");
-            
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Messenger was closed, it cannot be used to send messages.", failure);
-            }
-            
-            throw failure;
-        }
-        
-        // clone the message before modifying it.
-        message = message.clone();
-        
-        // Set the message with the appropriate src and dest address
-        message.replaceMessageElement(EndpointServiceImpl.MESSAGE_SOURCE_NS, srcAddressElement);
-        
-        EndpointAddress destAddressToUse = getDestAddressToUse(service, serviceParam);
-        
-        MessageElement dstAddressElement = new StringMessageElement(EndpointServiceImpl.MESSAGE_DESTINATION_NAME,
-                destAddressToUse.toString(), null);
-        
-        message.replaceMessageElement(EndpointServiceImpl.MESSAGE_DESTINATION_NS, dstAddressElement);
-        
-        try {
-            doSend(message);
-        } catch (IOException e) {
-            // close this messenger
-            close();
-            // rethrow the exception
-            throw e;
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public EndpointAddress getLogicalDestinationImpl() {
-        return logicalDest;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean isIdleImpl() {
-        return isClosed() || (TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), lastUsed) > MESSENGER_IDLE_TIMEOUT);
-    }
-    
-    /**
-     *  Connects to the http server and retrieves the Logical Destination Address
-     */
-    private EndpointAddress retreiveLogicalDestinationAddress() throws IOException {
-        long beginConnectTime = 0;
-        long connectTime = 0;
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Ping (" + senderURL + ")");
-        }
-        
-        if (TransportMeterBuildSettings.TRANSPORT_METERING) {
-            beginConnectTime = TimeUtils.timeNow();
-        }
-        
-        // open a connection to the other end
-        HttpURLConnection urlConn = (HttpURLConnection) senderURL.openConnection();
-        
-        urlConn.setRequestMethod("GET");
-        urlConn.setDoOutput(true);
-        urlConn.setDoInput(true);
-        urlConn.setAllowUserInteraction(false);
-        urlConn.setUseCaches(false);
-        urlConn.setConnectTimeout(CONNECT_TIMEOUT);
-        urlConn.setReadTimeout(CONNECT_TIMEOUT);
-        
-        try {
-            // this is where the connection is actually made, if not already
-            // connected. If we can't connect, assume it is dead
-            int code = urlConn.getResponseCode();
-            
-            if (code != HttpURLConnection.HTTP_OK) {
-                if (TransportMeterBuildSettings.TRANSPORT_METERING) {
-                    transportBindingMeter = servletHttpTransport.getTransportBindingMeter(null, getDestinationAddress());
-                    if (transportBindingMeter != null) {
-                        transportBindingMeter.connectionFailed(true, TimeUtils.timeNow() - beginConnectTime);
-                    }
-                }
-                
-                throw new IOException("Message not accepted: HTTP status " + "code=" + code + " reason=" + urlConn.getResponseMessage());
-            }
-            
-            // check for a returned peerId
-            int msglength = urlConn.getContentLength();
-            
-            if (msglength <= 0) {
-                throw new IOException("Ping response was empty.");
-            }
-            
-            InputStream inputStream = urlConn.getInputStream();
-            
-            // read the peerId
-            byte[] uniqueIdBytes = new byte[msglength];
-            int bytesRead = 0;
-            
-            while (bytesRead < msglength) {
-                int thisRead = inputStream.read(uniqueIdBytes, bytesRead, msglength - bytesRead);
-                
-                if (thisRead < 0) {
-                    break;
-                }
-                
-                bytesRead += thisRead;
-            }
-            
-            if (bytesRead < msglength) {
-                throw new IOException("Content ended before promised Content length");
-            }
-            
-            String uniqueIdString;
-            
-            try {
-                uniqueIdString = new String(uniqueIdBytes, "UTF-8");
-            } catch (UnsupportedEncodingException never) {
-                // utf-8 is always available, but we handle it anyway.
-                uniqueIdString = new String(uniqueIdBytes);
-            }
-            
-            if (TransportMeterBuildSettings.TRANSPORT_METERING) {
-                connectTime = TimeUtils.timeNow();
-                transportBindingMeter = servletHttpTransport.getTransportBindingMeter(uniqueIdString, getDestinationAddress());
-                if (transportBindingMeter != null) {
-                    transportBindingMeter.connectionEstablished(true, connectTime - beginConnectTime);
-                    transportBindingMeter.ping(connectTime);
-                    transportBindingMeter.connectionClosed(true, connectTime - beginConnectTime);
-                }
-            }
-            
-            EndpointAddress remoteAddress = new EndpointAddress("jxta", uniqueIdString.trim(), null, null);
-            
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Ping (" + senderURL + ") -> " + remoteAddress);
-            }
-            
-            return remoteAddress;
-        } catch (IOException failure) {
-            if (TransportMeterBuildSettings.TRANSPORT_METERING) {
-                connectTime = TimeUtils.timeNow();
-                transportBindingMeter = servletHttpTransport.getTransportBindingMeter(null, getDestinationAddress());
-                if (transportBindingMeter != null) {
-                    transportBindingMeter.connectionFailed(true, connectTime - beginConnectTime);
-                }
-            }
-            
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Ping (" + senderURL + ") -> failed");
-            }
-            
-            throw failure;
-        }
-    }
-    
-    /**
-     *  Connects to the http server and POSTs the message
-     */
-    private void doSend(Message msg) throws IOException {
-        long beginConnectTime = 0;
-        long connectTime = 0;
-        
-        if (TransportMeterBuildSettings.TRANSPORT_METERING) {
-            beginConnectTime = TimeUtils.timeNow();
-        }
-        
-        WireFormatMessage serialed = WireFormatMessageFactory.toWire(msg, EndpointServiceImpl.DEFAULT_MESSAGE_TYPE, null);
-        
-        for (int connectAttempt = 1; connectAttempt <= CONNECT_RETRIES; connectAttempt++) {
-            if (connectAttempt > 1) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Retrying connection to " + senderURL);
-                }
-            }
-            // open a connection to the other end
-            HttpURLConnection urlConn = (HttpURLConnection) senderURL.openConnection();
-
-            try {
-                urlConn.setRequestMethod("POST");
-                urlConn.setDoOutput(true);
-                urlConn.setDoInput(true);
-                urlConn.setAllowUserInteraction(false);
-                urlConn.setUseCaches(false);
-                urlConn.setConnectTimeout(CONNECT_TIMEOUT);
-                urlConn.setReadTimeout(CONNECT_TIMEOUT);
-                // FIXME 20040907 bondolo Should set message encoding http header.
-                urlConn.setRequestProperty("content-length", Long.toString(serialed.getByteLength()));
-                urlConn.setRequestProperty("content-type", serialed.getMimeType().toString());
-                // send the message
-                OutputStream out = urlConn.getOutputStream();
-
-                if (TransportMeterBuildSettings.TRANSPORT_METERING && (transportBindingMeter != null)) {
-                    connectTime = TimeUtils.timeNow();
-                    transportBindingMeter.connectionEstablished(true, connectTime - beginConnectTime);
-                }
-                serialed.sendToStream(out);
-                out.flush();
-                int responseCode;
-
-                try {
-                    responseCode = urlConn.getResponseCode();
-                } catch (SocketTimeoutException expired) {
-                    // maybe a retry will help.
-                    continue;
-                } catch (IOException ioe) {
-                    // Could not connect. This seems to happen a lot with a loaded HTTP 1.0
-                    // proxy. Apparently, HttpUrlConnection can be fooled by the proxy
-                    // in believing that the connection is still open and thus breaks
-                    // when attempting to make a second transaction. We should not have to but it
-                    // seems that it befalls us to retry.
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("HTTP 1.0 proxy seems in use");
-                    }
-                    // maybe a retry will help.
-                    continue;
-                }
-                
-                // NOTE: If the proxy closed the connection 1.0 style without returning
-                // a status line, we do not get an exception: we get a -1 response code.
-                // Apparently, proxies no-longer do that anymore. Just in case, we issue a
-                // warning and treat it as OK.71
-                if (responseCode == -1) {
-                    if (neverWarned && Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Obsolete HTTP proxy does not issue HTTP_OK response. Assuming OK");
-                        neverWarned = false;
-                    }
-                    responseCode = HttpURLConnection.HTTP_OK;
-                }
-                
-                if (responseCode != HttpURLConnection.HTTP_OK) {
-                    if (TransportMeterBuildSettings.TRANSPORT_METERING && (transportBindingMeter != null)) {
-                        transportBindingMeter.dataSent(true, serialed.getByteLength());
-                        transportBindingMeter.connectionDropped(true, TimeUtils.timeNow() - beginConnectTime);
-                    }
-                    throw new IOException( "Message not accepted: HTTP status " + "code=" + responseCode + 
-                            " reason=" + urlConn.getResponseMessage());
-                }
-                
-                if (TransportMeterBuildSettings.TRANSPORT_METERING && (transportBindingMeter != null)) {
-                    long messageSentTime = TimeUtils.timeNow();
-
-                    transportBindingMeter.messageSent(true, msg, messageSentTime - connectTime, serialed.getByteLength());
-                    transportBindingMeter.connectionClosed(true, messageSentTime - beginConnectTime);
-                }
-                
-                // note that we successfully sent a message
-                lastUsed = TimeUtils.timeNow();
-                
-                return;
-            } finally {
-                // This does prevent the creation of an infinite number of connections
-                // if we happen to be going through a 1.0-only proxy or connect to a server
-                // that still does not set content length to zero for the response. With this, at
-                // least we close them (they eventualy close anyway because the other side closes
-                // them but it takes too much time). If content-length is set, then jdk ignores
-                // the disconnect AND reuses the connection, which is what we want.
-                urlConn.disconnect();
-            }
-        }
-        
-        throw new IOException("Failed sending " + msg + " to " + senderURL);
-    }
-    
-    /**
-     *  Polls for messages sent to us.
-     */
-    private class MessagePoller implements Runnable {
-        
-        /**
-         *  If <tt>true</tt> then this poller is stopped or stopping.
-         */
-        private volatile boolean stopped = false;
-        
-        /**
-         *  The thread that does the work.
-         */
-        private Thread pollerThread;
-        
-        /**
-         *  The URL we poll for messages.
-         */
-        private final URL pollingURL;
-        
-        MessagePoller(String pollAddress, EndpointAddress destAddr) {
-            
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("new MessagePoller for " + senderURL);
-            }
-            
-            /*
-             * query string is of the format ?{response timeout},{extra response timeout},{dest address}
-             *
-             * The timeout's are expressed in milliseconds. -1 means do not wait
-             * at all, 0 means wait forever.
-             */
-            try {
-                pollingURL = new URL(senderURL,
-                        "/" + pollAddress + 
-                        "?" + Integer.toString(RESPONSE_TIMEOUT) + "," +
-                        Integer.toString(EXTRA_RESPONSE_TIMEOUT) + "," + 
-                        destAddr);
-            } catch (MalformedURLException badAddr) {
-                IllegalArgumentException failure = new IllegalArgumentException("Could not construct polling URL");
-
-                failure.initCause(badAddr);
-                
-                throw failure;
-            }
-            
-            pollerThread = new Thread(this, "HttpClientMessenger poller for " + senderURL);
-            pollerThread.setDaemon(true);
-            pollerThread.start();
-        }
-        
-        protected void stop() {
-            if (stopped) {
-                return;
-            }
-            
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("Stop polling for " + senderURL);
-            }
-            
-            stopped = true;
-            
-            // Here, we are forced to abandon this object open. Because we could
-            // get blocked forever trying to close it. It will rot away after
-            // the current read returns. The best we can do is interrupt the
-            // thread; unlikely to have an effect per the current.
-            // HttpURLConnection implementation.
-            
-            Thread stopPoller = pollerThread;
-            
-            if (null != stopPoller) {
-                stopPoller.interrupt();
-            }
-        }
-        
-        /**
-         *  Returns {@code true} if this messenger is stopped otherwise 
-         *  {@code false}.
-         *
-         *  @return returns {@code true} if this messenger is stopped otherwise 
-         *  {@code false}.
-         */
-        protected boolean isStopped() {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(this + " " + senderURL + " --> " + (stopped ? "stopped" : "running"));
-            }
-            
-            return stopped;
-        }
-        
-        /**
-         *  {@inheritDoc}
-         *
-         *  <p/>Connects to the http server and waits for messages to be received and processes them.
-         */
-        public void run() {
-            try {
-                long beginConnectTime = 0;
-                long connectTime = 0;
-                long noReconnectBefore = 0;
-                HttpURLConnection conn = null;
-                
-                if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                    LOG.info("Message polling beings for " + pollingURL);
-                }
-                
-                int connectAttempt = 1;
-                
-                // get messages until the messenger is closed
-                while (!isStopped()) {
-                    if (conn == null) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Opening new connection to " + pollingURL);
-                        }
-                        
-                        conn = (HttpURLConnection) pollingURL.openConnection(); // Incomming data channel
-                        
-                        conn.setRequestMethod("GET");
-                        conn.setDoOutput(false);
-                        conn.setDoInput(true);
-                        conn.setAllowUserInteraction(false);
-                        conn.setUseCaches(false);
-                        conn.setConnectTimeout(CONNECT_TIMEOUT);
-                        conn.setReadTimeout(RESPONSE_TIMEOUT);
-                        
-                        if (TransportMeterBuildSettings.TRANSPORT_METERING) {
-                            beginConnectTime = TimeUtils.timeNow();
-                        }
-                        
-                        // Loop back and try again to connect
-                        continue;
-                    }
-                    
-                    long untilNextConnect = TimeUtils.toRelativeTimeMillis(noReconnectBefore);
-                    
-                    try {
-                        if (untilNextConnect > 0) {
-                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                LOG.fine("Delaying for " + untilNextConnect + "ms before reconnect to " + senderURL);
-                            }
-                            Thread.sleep(untilNextConnect);
-                        }
-                    } catch (InterruptedException woken) {
-                        Thread.interrupted();
-                        continue;
-                    }
-                    
-                    InputStream inputStream;
-                    MimeMediaType messageType;
-                    
-                    try {
-                        if (connectAttempt > 1) {
-                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                LOG.fine("Reconnect attempt for " + senderURL);
-                            }
-                        }
-                        
-                        // Always connect (no cost if connected).
-                        conn.connect();
-                        
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Waiting for response code from " + senderURL);
-                        }
-                        
-                        int responseCode = conn.getResponseCode();
-                        
-                        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                            LOG.finer(
-                                    "Response " + responseCode + " for Connection : " + senderURL + "\n\tContent-Type : "
-                                    + conn.getHeaderField("Content-Type") + "\tContent-Length : "
-                                    + conn.getHeaderField("Content-Length") + "\tTransfer-Encoding : "
-                                    + conn.getHeaderField("Transfer-Encoding"));
-                        }
-                        
-                        connectTime = TimeUtils.timeNow();
-                        noReconnectBefore = TimeUtils.toAbsoluteTimeMillis(MIMIMUM_POLL_INTERVAL, connectTime);
-                        
-                        if (0 == conn.getContentLength()) {
-                            continue;
-                        }
-                        
-                        if (HttpURLConnection.HTTP_NO_CONTENT == responseCode) {
-                            // the connection timed out.
-                            if (TransportMeterBuildSettings.TRANSPORT_METERING && (transportBindingMeter != null)) {
-                                transportBindingMeter.connectionClosed(true, TimeUtils.toRelativeTimeMillis(beginConnectTime, connectTime));
-                            }
-                            
-                            conn = null;
-                            continue;
-                        }
-                        
-                        if (responseCode != HttpURLConnection.HTTP_OK) {
-                            if (TransportMeterBuildSettings.TRANSPORT_METERING && (transportBindingMeter != null)) {
-                                transportBindingMeter.connectionClosed(true, TimeUtils.timeNow() - beginConnectTime);
-                            }
-                            
-                            throw new IOException("HTTP Failure: " + conn.getResponseCode() + " : " + conn.getResponseMessage());
-                        }
-                        
-                        String contentType = conn.getHeaderField("Content-Type");
-
-                        if (null == contentType) {
-                            // XXX 20051219 bondolo Figure out why the mime type is not always set.
-                            messageType = EndpointServiceImpl.DEFAULT_MESSAGE_TYPE;
-                        } else {
-                            messageType = MimeMediaType.valueOf(contentType);
-                        }
-                        
-                        // FIXME 20040907 bondolo Should get message content-encoding from http header.
-                        
-                        inputStream = conn.getInputStream();
-                        
-                        // reset connection attempt.
-                        connectAttempt = 1;
-                    } catch (InterruptedIOException broken) {
-                        // We don't know where it was interrupted. Restart connection.
-                        Thread.interrupted();
-                        
-                        if (connectAttempt > CONNECT_RETRIES) {
-                            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                                LOG.warning("Unable to connect to " + senderURL);
-                            }
-                            
-                            stop();
-                            break;
-                        } else {
-                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                LOG.fine("Failed connecting to " + senderURL);
-                            }
-                            
-                            if (null != conn) {
-                                conn.disconnect();
-                            }
-                            conn = null;
-                            connectAttempt++;
-                            continue;
-                        }
-                    } catch (IOException ioe) {
-                        if (connectAttempt > CONNECT_RETRIES) {
-                            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                                LOG.log(Level.WARNING, "Unable to connect to " + senderURL, ioe);
-                            }
-                            
-                            stop();
-                            break;
-                        } else {
-                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                LOG.fine("Failed connecting to " + senderURL);
-                            }
-                            
-                            if (null != conn) {
-                                conn.disconnect();
-                            }
-                            conn = null;
-                            connectAttempt++;
-                            continue;
-                        }
-                    }
-                    
-                    // start receiving messages
-                    try {
-                        while (!isStopped()
-                                && (TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), connectTime) < RESPONSE_TIMEOUT)) {
-                            // read a message!
-                            long messageReceiveStart = TimeUtils.timeNow();
-                            Message incomingMsg;
-                            
-                            incomingMsg = WireFormatMessageFactory.fromWire(inputStream, messageType, null);
-                            
-                            if (TransportMeterBuildSettings.TRANSPORT_METERING && (transportBindingMeter != null)) {
-                                transportBindingMeter.messageReceived(true, incomingMsg, incomingMsg.getByteLength(),
-                                        TimeUtils.timeNow() - messageReceiveStart);
-                            }
-                            
-                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                LOG.fine("Received " + incomingMsg + " from " + senderURL);
-                            }
-                            
-                            servletHttpTransport.executor.execute(new MessageProcessor(incomingMsg));
-                            
-                            // note that we received a message
-                            lastUsed = TimeUtils.timeNow();
-                        }
-
-                        if (TransportMeterBuildSettings.TRANSPORT_METERING && (transportBindingMeter != null)) {
-                            transportBindingMeter.connectionClosed(true, TimeUtils.timeNow() - beginConnectTime);
-                        }
-                    } catch (EOFException e) {
-                        // Connection ran out of messages. let it go.
-                        conn = null;
-                    } catch (InterruptedIOException broken) {
-                        if (TransportMeterBuildSettings.TRANSPORT_METERING && (transportBindingMeter != null)) {
-                            transportBindingMeter.connectionDropped(true, TimeUtils.timeNow() - beginConnectTime);
-                        }
-                        
-                        // We don't know where it was interrupted. Restart connection.
-                        Thread.interrupted();
-                        if (null != conn) {
-                            conn.disconnect();
-                        }
-                        conn = null;
-                    } catch (IOException e) {
-                        if (TransportMeterBuildSettings.TRANSPORT_METERING && (transportBindingMeter != null)) {
-                            transportBindingMeter.connectionDropped(true, TimeUtils.timeNow() - beginConnectTime);
-                        }
-                        
-                        // If we managed to get down here, it is really an error.
-                        // However, being disconnected from the server, for
-                        // whatever reason, is a common place event. No need to
-                        // clutter the screen with scary messages. When the
-                        // message layer believes it's serious, it prints the
-                        // scary message already.
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.log(Level.FINE, "Failed to read message from " + senderURL, e);
-                        }
-                        // Time to call this connection dead.
-                        stop();
-                        break;
-                    } finally {
-                        try {
-                            inputStream.close();
-                        } catch (IOException ignored) {
-                            //ignored
-                        }
-                    }
-                }
-            } catch (Throwable argh) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Poller exiting because of uncaught exception", argh);
-                }
-                stop();
-            } finally {
-                pollerThread = null;
-            }
-            
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("Message polling stopped for " + senderURL);
-            }
-        }
-    }
-
-    /**
-     * A small class for processing individual messages. 
-     */ 
-    private class MessageProcessor implements Runnable {
-        
-        private Message msg;
-        
-        MessageProcessor(Message msg) {
-            this.msg = msg;
-        }
-        
-        public void run() {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Demuxing " + msg + " from " + senderURL);
-            }
-            
-            servletHttpTransport.getEndpointService().demux(msg);
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/servlethttp/HttpMessageReceiver.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/servlethttp/HttpMessageReceiver.java
deleted file mode 100644 (file)
index ad8ab55..0000000
+++ /dev/null
@@ -1,404 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.endpoint.servlethttp;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.net.InetAddress;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-
-import java.io.IOException;
-import java.io.FileNotFoundException;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import org.mortbay.http.HttpContext;
-import org.mortbay.http.HttpServer;
-import org.mortbay.http.SocketListener;
-import org.mortbay.http.handler.ResourceHandler;
-import org.mortbay.jetty.servlet.ServletHandler;
-import org.mortbay.util.InetAddrPort;
-import org.mortbay.util.Log;
-import org.mortbay.util.LoggerLogSink;
-
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.MessageReceiver;
-import net.jxta.endpoint.MessengerEvent;
-import net.jxta.endpoint.MessengerEventListener;
-
-import net.jxta.exception.PeerGroupException;
-
-import net.jxta.impl.util.TimeUtils;
-
-/**
- * Simple Message Receiver for server side.
- */
-class HttpMessageReceiver implements MessageReceiver {
-
-    /**
-     *  logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(HttpMessageReceiver.class.getName());
-
-    /**
-     * the relative URI of where the message receiver servlet will be mounted.
-     */
-    private final static String MSG_RECEIVER_RELATIVE_URI = "/*";
-
-    /**
-     * The ServletHttpTransport that created this MessageReceiver.
-     */
-    final ServletHttpTransport servletHttpTransport;
-
-    /**
-     * The public addresses for the this transport.
-     */
-    private final List<EndpointAddress> publicAddresses;
-
-    /**
-     *  The min threads that the HTTP server will use for handling requests.
-     */
-    private static int MIN_LISTENER_THREADS = 10;
-    
-    /**
-     *  The max threads that the HTTP server will use for handling requests.
-     */
-    private static int MAX_LISTENER_THREADS = 200;
-    
-    /**
-     *  How long a thread can remain idle until the worker thread is let go.
-     */
-    private static long MAX_THREAD_IDLE_DURATION = 30 * TimeUtils.ASECOND;
-    
-    /**
-     *  The Jetty HTTP Server instance.
-     */
-    private final HttpServer server;
-    private final ServletHandler handler;
-    private final SocketListener listener;
-
-    /**
-     * The listener to invoke when making an incoming messenger.
-     */
-    private MessengerEventListener messengerEventListener;
-
-    public HttpMessageReceiver(ServletHttpTransport servletHttpTransport, List<EndpointAddress> publicAddresses, InetAddress useInterface, int port) throws PeerGroupException {
-        this.servletHttpTransport = servletHttpTransport;
-        this.publicAddresses = publicAddresses;
-       
-        // read settings from the properties file
-        Properties prop = getJxtaProperties(
-                new File(new File(servletHttpTransport.getEndpointService().getGroup().getStoreHome()), "jxta.properties"));
-        initFromProperties(prop);
-
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring HTTP Servlet Message Transport : " + servletHttpTransport.assignedID);
-
-            configInfo.append("\n\tMin threads=").append(MIN_LISTENER_THREADS);
-            configInfo.append("\n\tMax threads=").append(MAX_LISTENER_THREADS);
-            configInfo.append("\n\tMax thread idle time=").append(MAX_THREAD_IDLE_DURATION).append("ms");
-            
-            LOG.config(configInfo.toString());
-        }
-        
-        // Configure Jetty Logging
-        if (!(Logging.SHOW_FINER && LOG.isLoggable(Level.FINER))) {
-            Log.instance().disableLog();
-        }
-        
-        org.mortbay.util.Code.setDebug(Logging.SHOW_FINER && LOG.isLoggable(Level.FINER));
-        org.mortbay.util.Code.setSuppressWarnings(!(Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)));
-        org.mortbay.util.Code.setSuppressStack(!(Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)));
-
-        // Setup the logger to match the rest of JXTA unless explicitly configured.
-        // "LOG_CLASSES" is a Jetty thing.
-        if (System.getProperty("LOG_CLASSES") == null) {
-            LoggerLogSink logSink = new LoggerLogSink();
-            Logger jettyLogger = Logger.getLogger(org.mortbay.http.HttpServer.class.getName());
-
-            logSink.setLogger(jettyLogger);
-            try {
-                logSink.start();
-                Log.instance().add(logSink);
-            } catch (Exception ex) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Could not configure LoggerLogSink");
-                }
-            }
-        }
-        
-        // Initialize the Jetty HttpServer
-        server = new HttpServer();
-
-        // Create the listener and attach it to server.
-        InetAddrPort addrPort = new InetAddrPort(useInterface, port);
-
-        listener = new SocketListener(addrPort);
-
-        listener.setMinThreads(MIN_LISTENER_THREADS);
-        listener.setMaxThreads(MAX_LISTENER_THREADS);
-        listener.setMaxIdleTimeMs((int) MAX_THREAD_IDLE_DURATION);
-
-        server.addListener(listener);
-
-        // Create a context for the handlers at the root, then add servlet
-        // handler for the specified servlet class and add it to the context
-        HttpContext handlerContext = server.getContext("/");
-
-        handler = new ServletHandler();
-
-        handler.setUsingCookies(false);
-        handler.initialize(handlerContext);
-
-        // Use peer group class loader (useful for HttpMessageServlet)
-        handlerContext.setClassLoader(servletHttpTransport.getEndpointService().getGroup().getLoader());
-        handlerContext.addHandler(handler);
-
-        // Set up support for downloading midlets.
-        if (System.getProperty("net.jxta.http.allowdownload") != null) {
-            HttpContext context = server.addContext("/midlets/*");
-
-            context.setResourceBase("./midlets/");
-            // context.setDirAllowed(false);
-            // context.setServingResources(true);
-
-            // String methods[] = {"GET"};
-            ResourceHandler resHandler = new ResourceHandler();
-
-            // resHandler.setAllowedMethods(methods);
-            context.addHandler(resHandler);
-        }
-
-        handler.addServlet(MSG_RECEIVER_RELATIVE_URI, HttpMessageServlet.class.getName());
-    }
-
-    synchronized void start() throws PeerGroupException {
-        try {
-            server.start();
-            handler.getServletContext().setAttribute("HttpMessageReceiver", this);
-        } catch (Exception e) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Could not start server", e);
-            }
-            PeerGroupException failure = new PeerGroupException("Could not start server");
-            failure.initCause(e);
-            throw failure;
-        }
-
-        messengerEventListener = servletHttpTransport.getEndpointService().addMessageTransport(this);
-        if (messengerEventListener == null) {
-            throw new PeerGroupException("Transport registration refused");
-        }
-        
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("HTTP Servlet Transport started.");
-        }
-    }
-    
-    synchronized void stop() {
-        servletHttpTransport.getEndpointService().removeMessageTransport(this);
-        messengerEventListener = null;
-        
-        try {
-            server.stop();
-        } catch (InterruptedException e) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Interrupted during stop()", e);
-            }
-        }
-        
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("HTTP Servlet Transport stopped.");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    boolean messengerReadyEvent(HttpServletMessenger newMessenger, EndpointAddress connAddr) {
-        MessengerEventListener temp = messengerEventListener;
-
-        return null != temp && temp.messengerReady(new MessengerEvent(this, newMessenger, connAddr));
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Iterator<EndpointAddress> getPublicAddresses() {
-        return Collections.unmodifiableList(publicAddresses).iterator();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getProtocolName() {
-        return servletHttpTransport.HTTP_PROTOCOL_NAME;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public EndpointService getEndpointService() {
-        return servletHttpTransport.getEndpointService();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public Object transportControl(Object operation, Object Value) {
-        return null;
-    }
-
-    ServletHttpTransport getServletHttpTransport() {
-        return servletHttpTransport;
-    }
-
-    /**
-     * Returns a Properties instance for jxta.properties if the file exists;
-     * otherwise, returns null.
-     *
-     * @param fromFile properties file
-     * @return the properties object or null if properties file was not found
-     */
-    private static Properties getJxtaProperties(File fromFile) {
-        Properties prop = new Properties();
-        InputStream in = null;
-        
-        try {
-            in = new FileInputStream(fromFile);
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Read properties from " + fromFile.getPath());
-            }
-        } catch (FileNotFoundException e) {
-            return null;
-        }
-        
-        try {
-            prop.load(in);
-        } catch (IOException e) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Error reading " + fromFile.getPath(), e);
-            }
-        } finally {
-            try {
-                in.close();
-            } catch (IOException ignored) {
-                //ignored
-            }
-            in = null;
-        }
-        return prop;
-    }
-    
-    /**
-     * Reads the properties from the jxta.properties file
-     *
-     * @param prop properties to init from
-     */
-    private void initFromProperties(Properties prop) {
-        
-        if (prop == null) {
-            if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-                LOG.fine("jxta.properties not found: using default values");
-            }
-        } else {
-            if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-                LOG.config("Using jxta.properties to configure HTTP server");
-            }
-            
-            String minThreadsStr = prop.getProperty("HttpServer.MinThreads");
-            String maxThreadsStr = prop.getProperty("HttpServer.MaxThreads");
-            String maxThreadIdleTimeStr = prop.getProperty("HttpServer.MaxThreadIdleTime");
-            
-            try {
-                if (minThreadsStr != null) {
-                    MIN_LISTENER_THREADS = Integer.parseInt(minThreadsStr);
-                }
-            } catch (NumberFormatException e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Invalid HttpServer.MinThreads value; using default");
-                }
-            }
-            
-            try {
-                if (maxThreadsStr != null) {
-                    MAX_LISTENER_THREADS = Integer.parseInt(maxThreadsStr);
-                }
-            } catch (NumberFormatException e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Invalid HttpServer.MaxThreads value; using default");
-                }
-            }
-            
-            try {
-                if (maxThreadIdleTimeStr != null) {
-                    MAX_THREAD_IDLE_DURATION = Integer.parseInt(maxThreadIdleTimeStr);
-                }
-            } catch (NumberFormatException e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Invalid HttpServer.MaxThreadIdleTime value; using default");
-                }
-            }
-        }
-    }    
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/servlethttp/HttpMessageSender.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/servlethttp/HttpMessageSender.java
deleted file mode 100644 (file)
index 72b07d0..0000000
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.endpoint.servlethttp;
-
-import java.util.Iterator;
-import java.util.Map;
-import java.util.WeakHashMap;
-
-import java.net.SocketTimeoutException;
-import java.net.ConnectException;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageSender;
-import net.jxta.endpoint.Messenger;
-
-import net.jxta.exception.PeerGroupException;
-
-/**
- * Simple Client MessageSender
- */
-class HttpMessageSender implements MessageSender {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(HttpMessageSender.class.getName());
-
-    /**
-     * The ServletHttpTransport that created this object
-     */
-    private final ServletHttpTransport servletHttpTransport;    
-
-    /**
-     * The public address for this message sender
-     */
-    private final EndpointAddress publicAddress;
-
-    /**
-     *  The Set of active messengers. We keep track so that we can aggressively
-     *  close the Messengers when the transport is shut down.
-     */
-    private final Map<HttpClientMessenger, Object> messengers = new WeakHashMap<HttpClientMessenger, Object>();
-
-    /**
-     * constructor
-     */
-    public HttpMessageSender(ServletHttpTransport servletHttpTransport, EndpointAddress publicAddress) throws PeerGroupException {
-
-        this.servletHttpTransport = servletHttpTransport;
-        this.publicAddress = publicAddress;
-        
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder( "Configuring HTTP Client Message Transport : " + servletHttpTransport.assignedID);
-
-            configInfo.append("\n\tPublic Address = ").append(publicAddress);
-            LOG.config(configInfo.toString());
-        }        
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public EndpointAddress getPublicAddress() {
-        return publicAddress;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isConnectionOriented() {
-        return true;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean allowsRouting() {
-        return true;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Object transportControl(Object operation, Object Value) {
-        return null;
-    }
-
-    /**
-     * shut down all client connections.
-     */
-    public synchronized void start() throws PeerGroupException {
-        if (servletHttpTransport.getEndpointService().addMessageTransport(this) == null) {
-            throw new PeerGroupException("Transport registration refused");
-        }
-        
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("HTTP Client Transport started.");
-        }
-    }
-
-    /**
-     * shut down all client connections.
-     */
-    public synchronized void stop() {
-        synchronized (messengers) {
-            Iterator<HttpClientMessenger> eachMessenger = messengers.keySet().iterator();
-            
-            while (eachMessenger.hasNext()) {
-                HttpClientMessenger aMessenger = eachMessenger.next();
-
-                eachMessenger.remove();
-                
-                aMessenger.doShutdown();
-            }
-        }
-        
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("HTTP Client Transport stopped.");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Messenger getMessenger(EndpointAddress destAddr, Object hintIgnored) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("getMessenger for : " + destAddr);
-        }
-
-        if (!getProtocolName().equals(destAddr.getProtocolName())) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Cannot make messenger for protocol :" + destAddr.getProtocolName());
-            }
-
-            return null;
-        }
-
-        try {
-            // Right now we do not want to "announce" outgoing messengers 
-            // because they get pooled and so must not be grabbed by a listener.
-            // If "announcing" is to be done, that should be by the endpoint
-            // and probably with a subtly different interface.
-
-            HttpClientMessenger result = new HttpClientMessenger(servletHttpTransport, publicAddress, destAddr);
-
-            synchronized (messengers) {
-                messengers.put(result, null);
-            }
-
-            return result;
-        } catch (SocketTimeoutException noConnect) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Could not connect to " + destAddr + " : " + noConnect.getMessage());
-            }
-        } catch (ConnectException noConnect) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Failed to connect to " + destAddr + " : " + noConnect.getMessage());
-            }
-        } catch (Throwable e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Could not make messenger for " + destAddr, e);
-            }
-        }
-
-        // If we got here, we failed.
-        return null;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean ping(EndpointAddress addr) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Using http client sender to ping " + addr);
-        }
-        
-        Messenger messenger = getMessenger(addr, null);
-
-        // XXX pool this messenger.
-        // Ping obsolete. And do not announce an outgoing messenger
-
-        boolean pong = 0 != (Messenger.USABLE & messenger.getState());
-        
-        messenger.close();
-        
-        return pong;
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    public String getProtocolName() {
-        return servletHttpTransport.HTTP_PROTOCOL_NAME;
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    public EndpointService getEndpointService() {
-        return servletHttpTransport.getEndpointService();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/servlethttp/HttpMessageServlet.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/servlethttp/HttpMessageServlet.java
deleted file mode 100644 (file)
index 8a1a709..0000000
+++ /dev/null
@@ -1,908 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.endpoint.servlethttp;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-// import java.util.Enumeration;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Enumeration;
-import java.util.NoSuchElementException;
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.Cookie;
-// import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.linphone.p2pproxy.core.jxtaext.EndpointRegistry;
-
-import net.jxta.document.MimeMediaType;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.Messenger;
-import net.jxta.endpoint.WireFormatMessage;
-import net.jxta.endpoint.WireFormatMessageFactory;
-
-import net.jxta.impl.endpoint.EndpointServiceImpl;
-import net.jxta.impl.endpoint.transportMeter.TransportBindingMeter;
-import net.jxta.impl.endpoint.transportMeter.TransportMeterBuildSettings;
-import net.jxta.impl.util.TimeUtils;
-
-/**
- *  This is a simple servlet that accepts JXTA Messages from clients using HTTP
- *  via {@code POST}. In addition to receiving messages via {@code POST}
- *  responses clients can also poll for messages using {@code GET}.
- *
- *  <p/>It also supports a ping operation. When the URI is <tt>/</tt> the
- *  response consists of the unique value portion of the local peer id.
- */
-public class HttpMessageServlet extends HttpServlet {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(HttpMessageServlet.class.getName());
-
-    /**
-     *  The maximum duration in milliseconds we will keep a connection alive
-     *  while generating a response.
-     */
-    private final static long MAXIMUM_RESPONSE_DURATION = 2 * TimeUtils.AMINUTE;
-
-    /**
-     *  Owner of this servlet.
-     */
-    private HttpMessageReceiver owner = null;
-
-    /**
-     *  The endpoint that the owner message transport is registered with.
-     */
-    private EndpointService endpoint = null;
-
-    /**
-     *  Our address.
-     */
-    private EndpointAddress localAddress = null;
-    private byte[] pingResponseBytes;
-
-    private ServletHttpTransport servletHttpTransport = null;
-
-    /**
-     *  If {@code true} then this servlet has been (or is being) destroyed.
-     */
-    private volatile boolean destroyed = false;
-
-    /**
-     *  Recovers the Message Transport which owns this servlet from the context
-     *  information.
-     */
-    @Override
-    public void init(ServletConfig config) throws ServletException {
-        super.init(config);
-
-        try {
-            owner = (HttpMessageReceiver) getServletContext().getAttribute("HttpMessageReceiver");
-            if (owner == null) {
-                throw new ServletException("Servlet Context did not contain 'HttpMessageReceiver'");
-            }
-        } catch (ClassCastException e) {
-            throw new ServletException("'HttpMessageReceiver' attribute was not of the proper type in the Servlet Context");
-        }
-
-        servletHttpTransport = owner.servletHttpTransport;
-        endpoint = owner.getEndpointService();
-
-        String peerId = endpoint.getGroup().getPeerID().getUniqueValue().toString();
-
-        localAddress = new EndpointAddress("jxta", peerId, null, null);
-
-        try {
-            pingResponseBytes = peerId.getBytes("UTF-8");
-        } catch (java.io.UnsupportedEncodingException never) {
-            // UTF-8 is always available.
-        }
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("GET " + req.getRequestURI() + " thread = " + Thread.currentThread());
-        }
-
-        processRequest(req, res);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("GET done for thread = " + Thread.currentThread());
-        }
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("POST " + req.getRequestURI() + " thread = " + Thread.currentThread());
-        }
-
-        processRequest(req, res);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("POST done for thread = " + Thread.currentThread());
-        }
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public synchronized void destroy() {
-        // All we need to do is wakeup the threads that are waiting. (In truth
-        // we'll miss those that are waiting on a messenger, but that'll do for
-        // now, because we do that only when shutting down the group and then
-        // the relay will be shutdown as well, which will take care of the
-        // messengers.
-        destroyed = true;
-        notifyAll();
-    }
-
-    /**
-     *  Handle a request and optionally generate a response.
-     *
-     *  @param req The request we are being asked to process.
-     *  @param res The response we should use for any response.
-     *  @throws IOException For failures in IO processing.
-     */
-    private void processRequest(HttpServletRequest req, HttpServletResponse res) throws IOException {
-
-        long lastReadWriteTime;
-        int requestSize = 0;
-        TransportBindingMeter transportBindingMeter = null;
-
-        if (Logging.SHOW_FINEST && LOG.isLoggable(Level.FINEST)) {
-            printRequest(req);
-        }
-
-        if (TransportMeterBuildSettings.TRANSPORT_METERING) {
-            int contentLength = req.getContentLength();
-
-            requestSize += (contentLength != -1) ? contentLength : 0;
-        }
-
-        JxtaRequest currentRequest = new JxtaRequest(req);
-
-        /*
-         *  We accept three request formats:
-         *
-         *  o PING : no Message and no Requestor defined.
-         *  o POLL : Requestor defined, positive response timeout and destination address.
-         *  o SEND : Requestor defined, positive response timeout or no destination address.
-         */
-
-        // check if this is a ping request, no requestor peerId or incoming message
-        if (null == currentRequest.requestorAddr && !currentRequest.messageContent) {
-            // this is only a ping request
-            pingResponse(res);
-
-            if (TransportMeterBuildSettings.TRANSPORT_METERING) {
-                long connectionTime = TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), currentRequest.requestStartTime);
-                EndpointAddress sourceAddress = new EndpointAddress("http", req.getRemoteHost(), null, null); //
-
-                transportBindingMeter = servletHttpTransport.getTransportBindingMeter(null, sourceAddress);
-                if (transportBindingMeter != null) {
-                    transportBindingMeter.connectionEstablished(false, currentRequest.requestStartTime);
-                    transportBindingMeter.dataReceived(false, requestSize);
-                    transportBindingMeter.dataSent(false, 0);
-                    transportBindingMeter.pingReceived();
-                    transportBindingMeter.connectionClosed(false, connectionTime);
-                }
-            }
-
-            return;
-        }
-
-        if (TransportMeterBuildSettings.TRANSPORT_METERING) {
-            lastReadWriteTime = TimeUtils.timeNow();
-            long connectTime = TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), currentRequest.requestStartTime);
-            EndpointAddress sourceAddress = new EndpointAddress("http", req.getRemoteHost(), null, null); //
-
-            if (null != currentRequest.requestorAddr) {
-                transportBindingMeter = servletHttpTransport.getTransportBindingMeter(currentRequest.requestorAddr.toString(),
-                        sourceAddress);
-            } else {
-                transportBindingMeter = servletHttpTransport.getTransportBindingMeter(req.getRemoteHost(), sourceAddress);
-            }
-            if (transportBindingMeter != null) {
-                transportBindingMeter.connectionEstablished(false, connectTime);
-                transportBindingMeter.dataReceived(false, requestSize);
-            }
-        }
-
-        // check if the request included polling (valid requestor peerId and timeout not -1)
-        HttpServletMessenger messenger = null;
-
-        if ((null != currentRequest.requestorAddr) && (currentRequest.responseTimeout >= 0) && (null != currentRequest.destAddr)) {
-            // create the back channel messenger
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine( "Creating back channel messenger for " + currentRequest.requestorAddr + " (" + currentRequest.destAddr + ")");
-            }
-
-            long messengerAliveFor;
-
-            if (0 == currentRequest.responseTimeout) {
-                messengerAliveFor = 0;
-            } else {
-                messengerAliveFor = Math.max(currentRequest.responseTimeout, currentRequest.extraResponsesTimeout);
-            }
-
-            messenger = new HttpServletMessenger(owner.servletHttpTransport.group.getPeerGroupID(), localAddress,
-                    currentRequest.requestorAddr, messengerAliveFor);
-            boolean taken = owner.messengerReadyEvent(messenger, currentRequest.destAddr);
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Incoming messenger to: " + currentRequest.requestorAddr + " taken=" + taken);
-            }
-
-            if (!taken) {
-                // nobody cares. Just destroy it.
-                messenger.close();
-                messenger = null;
-            }
-        }
-
-        // We may later decide that contentLength should not be set after all
-        // if we use chunking. Otherwise we must set it; specially to zero, so
-        // that jetty does not forcefully close the connection after each
-        // message in order to complete the transaction http-1.0-style.
-
-        boolean mustSetContentLength = true;
-
-        try {
-            // get the incoming message is there is one
-            if (currentRequest.messageContent) {
-                Message incomingMessage;
-
-                // read the stream
-                InputStream in = req.getInputStream();
-
-                // construct the message. Send BAD_REQUEST if the message construction
-                // fails
-                try {
-                    String contentType = req.getContentType();
-
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Reading message from request : " + contentType);
-                    }
-
-                    MimeMediaType contentMimeType = EndpointServiceImpl.DEFAULT_MESSAGE_TYPE;
-
-                    if (null != contentType) {
-                        contentMimeType = MimeMediaType.valueOf(contentType);
-                    }
-
-                    // FIXME 20040927 bondolo Should get message encoding from http header.
-                    try {
-                        incomingMessage = WireFormatMessageFactory.fromWire(in, contentMimeType, null);
-                    } catch (NoSuchElementException noValidWireFormat) {
-                        IOException failure = new IOException("Unrecognized content type MIME type : " + contentType);
-
-                        failure.initCause(noValidWireFormat);
-                        throw failure;
-                    }
-
-                    if (TransportMeterBuildSettings.TRANSPORT_METERING && (transportBindingMeter != null)) {
-                        lastReadWriteTime = TimeUtils.timeNow();
-                        long receiveTime = TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), currentRequest.requestStartTime);
-
-                        transportBindingMeter.messageReceived(false, incomingMessage, receiveTime, 0); // size=0 since it was already incorporated in the request size
-                    }
-                } catch (IOException e) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Malformed JXTA message, responding with BAD_REQUEST", e);
-                    }
-
-                    res.sendError(HttpServletResponse.SC_BAD_REQUEST, "Message was not a valid JXTA message");
-
-                    if (TransportMeterBuildSettings.TRANSPORT_METERING && (transportBindingMeter != null)) {
-                        transportBindingMeter.connectionDropped(false,
-                                TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), currentRequest.requestStartTime));
-                    }
-                    return;
-                }
-
-                // post the incoming message to the endpoint demux
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Handing " + incomingMessage + " to the endpoint.");
-                }
-
-                try {
-                    endpoint.demux(incomingMessage);
-                } catch (Throwable e) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Failure demuxing an incoming message", e);
-                    }
-                }
-            }
-
-            boolean beganResponse = false;
-
-            // Check if the back channel is to be used for sending messages.
-            if ((currentRequest.responseTimeout >= 0) && (null != messenger)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Wait for message from the messenger. timeout = " + currentRequest.responseTimeout);
-                }
-
-                long quitAt = (currentRequest.responseTimeout == 0)
-                        ? Long.MAX_VALUE
-                        : TimeUtils.toAbsoluteTimeMillis(currentRequest.requestStartTime, currentRequest.responseTimeout);
-
-                while ((0 != (messenger.getState() & Messenger.USABLE)) && !destroyed) {
-                    long remaining = TimeUtils.toRelativeTimeMillis(quitAt);
-
-                    if ((remaining <= 0)) {
-                        // done processing the request
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Terminating expired request.");
-                        }
-
-                        // We know we did not respond anything.
-                        // In general it's better if jetty closes the connection
-                        // here, because it could have been an unused
-                        // back-channel and the client has to open a new one
-                        // next time, thus making sure we get to see a different
-                        // URL (if applicable). JDK should do that anyway,
-                        // but ...).
-                        break;
-                    }
-
-                    Message outMsg;
-
-                    // Send a message if there is one
-                    try {
-                        outMsg = messenger.waitForMessage(remaining);
-                    } catch (InterruptedException ie) {
-                        // Ok. Leave early, then.
-                        Thread.interrupted();
-                        continue;
-                    }
-
-                    if (outMsg == null) {
-                        // done processing the request
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Terminating request with no message to send.");
-                        }
-
-                        if (TransportMeterBuildSettings.TRANSPORT_METERING && (transportBindingMeter != null)) {
-                            transportBindingMeter.connectionClosed(false,
-                                    TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), currentRequest.requestStartTime));
-                        }
-
-                        // We know we did not respond anything. Do not set
-                        // content-length In general it's better if jetty closes
-                        // the connection here, because it could have been an
-                        // unused back-channel and the client has to open a new
-                        // one next time, thus making sure we get to see a
-                        // different URL (if applicable). JDK should do that
-                        // anyway, but ...).
-                        break;
-                    }
-
-                    long startMessageSend = TimeUtils.timeNow();
-
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Sending " + outMsg + " on back channel to " + req.getRemoteHost());
-                    }
-
-                    if (!beganResponse) {
-                        // valid request, send back OK response
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Sending OK in response to request");
-                        }
-
-                        beganResponse = true;
-                        res.setStatus(HttpServletResponse.SC_OK);
-                        res.setContentType(EndpointServiceImpl.DEFAULT_MESSAGE_TYPE.toString());
-                    }
-
-                    // send the message
-                    WireFormatMessage serialed = WireFormatMessageFactory.toWire(outMsg, EndpointServiceImpl.DEFAULT_MESSAGE_TYPE, null);
-
-                    // if only one message is being returned, set the content
-                    // length, otherwise try to use chunked encoding.
-                    if (currentRequest.extraResponsesTimeout < 0) {
-                        res.setContentLength((int) serialed.getByteLength());
-                    }
-
-                    // Either way, we've done what had to be done.
-                    mustSetContentLength = false;
-
-                    // get the output stream for the response
-                    OutputStream out = res.getOutputStream();
-
-                    // send the message
-                    try {
-                        serialed.sendToStream(out);
-                        out.flush();
-
-                        messenger.messageSent(true);
-
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Successfully sent " + outMsg + " on back channel to " + req.getRemoteHost());
-                        }
-
-                        if (TransportMeterBuildSettings.TRANSPORT_METERING && (transportBindingMeter != null)) {
-                            lastReadWriteTime = TimeUtils.timeNow();
-                            long sendTime = TimeUtils.toRelativeTimeMillis(lastReadWriteTime, startMessageSend);
-                            long bytesSent = serialed.getByteLength();
-
-                            transportBindingMeter.messageSent(false, outMsg, sendTime, bytesSent);
-                        }
-                    } catch (IOException ex) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Failed sending Message on back channel to " + req.getRemoteHost());
-                        }
-
-                        messenger.messageSent(false);
-
-                        if (TransportMeterBuildSettings.TRANSPORT_METERING && (transportBindingMeter != null)) {
-                            transportBindingMeter.connectionDropped(false,
-                                    TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), currentRequest.requestStartTime));
-                        }
-
-                        throw ex;
-                    } finally {
-                        // make sure the response is pushed out
-                        res.flushBuffer();
-                    }
-
-                    // Adjust the quit time based upon the extra response time available.
-                    if (0 == currentRequest.extraResponsesTimeout) {
-                        quitAt = Long.MAX_VALUE;
-                    } else {
-                        quitAt = TimeUtils.toAbsoluteTimeMillis(currentRequest.requestStartTime, currentRequest.extraResponsesTimeout);
-                    }
-
-                    // If we never generated a response then make it clear we gave up waiting.
-                    if (!beganResponse) {
-                        res.setStatus(HttpServletResponse.SC_NO_CONTENT);
-                    }
-                }
-            } else {
-                // No response was desired.
-                res.setStatus(HttpServletResponse.SC_OK);
-            }
-        } finally {
-            // close the messenger
-            if (null != messenger) {
-                messenger.close();
-            }
-        }
-
-        // If contentLength was never set and we have not decided *not* to set
-        // it, then we must set it to 0 (that's the truth in that case). This
-        // allows Jetty to keep to keep the connection open unless what's on the
-        // other side is a 1.0 proxy.
-        if (mustSetContentLength) {
-            res.setContentLength(0);
-        }
-
-        // make sure the response is pushed out
-        res.flushBuffer();
-
-        // done processing the request
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Finished processing the request from " + req.getRemoteHost());
-        }
-
-        if (TransportMeterBuildSettings.TRANSPORT_METERING && (transportBindingMeter != null)) {
-            transportBindingMeter.connectionClosed(false,
-                    TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), currentRequest.requestStartTime));
-        }
-    }
-
-    /**
-     *  Returns a response to a ping request.  The response is the PeerID of
-     *  this peer.
-     *
-     *  @param res The response to which the ping result should be sent.
-     */
-    private void pingResponse(HttpServletResponse res) throws IOException {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Responding to \'ping\' request with 200 and peerID");
-        }
-
-        res.setStatus(HttpServletResponse.SC_OK);
-
-        res.setContentLength(pingResponseBytes.length);
-        res.setContentType(MimeMediaType.TEXTUTF8.toString());
-
-        OutputStream out = res.getOutputStream();
-
-        out.write(pingResponseBytes);
-        out.flush();
-        out.close();
-    }
-
-    /**
-     *  Debugging output.
-     */
-    private static void printRequest(HttpServletRequest req) {
-        final char nl = '\n';
-        StringBuilder builder = new StringBuilder();
-
-        builder.append("HTTP request:" + nl);
-        builder.append("  AUTH_TYPE: ").append(req.getAuthType()).append(nl);
-        builder.append("  CONTEXT_PATH: ").append(req.getContextPath()).append(nl);
-
-        Cookie[] cookies = req.getCookies();
-
-        if (cookies != null) {
-            for (int i = 0; i < cookies.length; i++) {
-                builder.append("  COOKIE[").append(i).append("]:" + nl);
-                builder.append("    comment: ").append(cookies[i].getComment()).append(nl);
-                builder.append("    domain: ").append(cookies[i].getDomain()).append(nl);
-                builder.append("    max age: ").append(cookies[i].getMaxAge()).append(nl);
-                builder.append("    name: ").append(cookies[i].getName()).append(nl);
-                builder.append("    path: ").append(cookies[i].getPath()).append(nl);
-                builder.append("    secure: ").append(cookies[i].getSecure()).append(nl);
-                builder.append("    value: ").append(cookies[i].getValue()).append(nl);
-                builder.append("    version: ").append(cookies[i].getVersion()).append(nl);
-            }
-        }
-
-        for (Enumeration headers = req.getHeaderNames(); headers.hasMoreElements();) {
-            String header = (String) headers.nextElement();
-            builder.append("  HEADER[").append(header).append("]: ").append(req.getHeader(header)).append(nl);
-        }
-
-        builder.append("  METHOD: ").append(req.getMethod()).append(nl);
-        builder.append("  PATH_INFO: ").append(req.getPathInfo()).append(nl);
-        builder.append("  PATH_TRANSLATED: ").append(req.getPathTranslated()).append(nl);
-        builder.append("  QUERY_STRING: ").append(req.getQueryString()).append(nl);
-        builder.append("  REMOTE_USER: ").append(req.getRemoteUser()).append(nl);
-        builder.append("  REQUESTED_SESSION_ID: ").append(req.getRequestedSessionId()).append(nl);
-        builder.append("  REQUEST_URI: ").append(req.getRequestURI()).append(nl);
-        builder.append("  SERVLET_PATH: ").append(req.getServletPath()).append(nl);
-        builder.append("  REMOTE_USER: ").append(req.getRemoteUser()).append(nl);
-        builder.append("  isSessionIdFromCookie: ").append(req.isRequestedSessionIdFromCookie()).append(nl);
-        builder.append("  isSessionIdFromURL: ").append(req.isRequestedSessionIdFromURL()).append(nl);
-        builder.append("  isSessionIdValid: ").append(req.isRequestedSessionIdValid()).append(nl);
-
-        for (Enumeration attributes = req.getAttributeNames(); attributes.hasMoreElements();) {
-            String attribute = (String) attributes.nextElement();
-            builder.append("  ATTRIBUTE[").append(attribute).append("]: ").append(req.getAttribute(attribute)).append(nl);
-        }
-
-        builder.append("  ENCODING: ").append(req.getCharacterEncoding()).append(nl);
-        builder.append("  CONTENT_LENGTH: ").append(req.getContentLength()).append(nl);
-        builder.append("  CONTENT_TYPE: ").append(req.getContentType()).append(nl);
-        builder.append("  LOCALE: ").append(req.getLocale().toString()).append(nl);
-
-        for (Enumeration parameters = req.getParameterNames(); parameters.hasMoreElements();) {
-            String parameter = (String) parameters.nextElement();
-            builder.append("  PARAMETER[").append(parameter).append("]: ").append(req.getParameter(parameter)).append(nl);
-        }
-
-        builder.append("  PROTOCOL: ").append(req.getProtocol()).append(nl);
-        builder.append("  REMOTE_ADDR: ").append(req.getRemoteAddr()).append(nl);
-        builder.append("  REMOTE_HOST: ").append(req.getRemoteHost()).append(nl);
-        builder.append("  SCHEME: ").append(req.getScheme()).append(nl);
-        builder.append("  SERVER_NAME: ").append(req.getServerName()).append(nl);
-        builder.append("  SERVER_PORT: ").append(req.getServerPort()).append(nl);
-        builder.append("  isSecure: ").append(req.isSecure());
-
-        LOG.finest(builder.toString());
-    }
-
-    /**
-     *  A servlet request.
-     *
-     *  @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#trans-httpt-msg-msgs" target="_blank">JXTA Protocols Specification : Standard JXTA Transport Bindings : HTTP Bindings</a>
-     */
-    private static class JxtaRequest {
-
-        /**
-         *  Absolute time in milliseconds at which this request began processing.
-         */
-        final long requestStartTime;
-
-        /**
-         *  Endpoint address of the requestor.
-         */
-        final EndpointAddress requestorAddr;
-
-        /**
-         *  Duration of time to wait for the initial response message.
-         *
-         *  <p/><ul>
-         *      <li><tt>&lt;0</tt> : No response message wanted.</li>
-         *      <li><tt> 0</tt> : Wait indefinitely for response message.</li>
-         *      <li><tt>&gt;0</tt> : Wait specified amount of time for response message.</li>
-         *  </ul>
-         */
-        final long responseTimeout;
-
-        /**
-         *  Duration of time to wait for additional response messages.
-         *
-         *  <p/><ul>
-         *      <li><tt>&lt;0</tt> : No additional response messages wanted.</li>
-         *      <li><tt> 0</tt> : Wait indefinitely for additional response messages.</li>
-         *      <li><tt>&gt;0</tt> : Wait specified amount of time for additional response messages.</li>
-         *  </ul>
-         */
-        final long extraResponsesTimeout;
-
-        /**
-         *  Destination address for messages sent in this connection.
-         */
-        final EndpointAddress destAddr;
-
-        /**
-         *  If <tt>true</tt> then the requestor is providing a Message.
-         */
-        final boolean messageContent;
-
-        /**
-         *  Construct a request.
-         */
-        JxtaRequest(HttpServletRequest req) {
-
-            requestStartTime = TimeUtils.timeNow();
-
-            // check if a peerId was given
-            String requestorPeerId = getRequestorPeerId(req);
-
-            if (null != requestorPeerId) {
-                requestorAddr = new EndpointAddress("jxta", requestorPeerId, null, null);
-                try {
-                  EndpointRegistry.getInstance().add("urn:jxta:"+requestorPeerId, InetAddress.getByName(req.getRemoteHost()));
-               } catch (UnknownHostException e) {
-                  if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                     LOG.log(Level.WARNING,"cannot register ["+requestorPeerId+"]", e);
-                 }
-               }
-            } else {
-                requestorAddr = null;
-            }
-
-            // get the query string
-            String queryString = req.getQueryString();
-
-            if (queryString != null) {
-                // the query string is of the format responseTimeout,extraResponsesTimeout,destAdd
-                // the times given are in milliseconds
-                int commaIndex = queryString.indexOf(',');
-
-                if (commaIndex == -1) {
-                    // there is no extra responses timeout
-                    responseTimeout = getResponseTimeout(queryString);
-                    extraResponsesTimeout = -1;
-                    destAddr = null;
-                } else {
-                    responseTimeout = getResponseTimeout(queryString.substring(0, commaIndex));
-
-                    String moreQueryParams = queryString.substring(commaIndex + 1);
-
-                    commaIndex = moreQueryParams.indexOf(',');
-                    if (commaIndex == -1) {
-                        extraResponsesTimeout = getExtraResponsesTimeout(moreQueryParams);
-                        destAddr = null;
-                    } else {
-                        extraResponsesTimeout = getExtraResponsesTimeout(moreQueryParams.substring(0, commaIndex));
-                        destAddr = new EndpointAddress(moreQueryParams.substring(commaIndex + 1));
-                    }
-                }
-            } else {
-                responseTimeout = 0;
-                extraResponsesTimeout = -1;
-                destAddr = null;
-            }
-           
-            // check for incoming message
-            messageContent = hasMessageContent(req);
-
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer(
-                        "New JXTA Request for Requestor=" + requestorAddr + "\n\tResponse Timeout=" + responseTimeout
-                        + "\tAdditional Response Timeout=" + extraResponsesTimeout + "\tRequest Destination Address=" + destAddr
-                        + "\tHas Message Content=" + Boolean.toString(messageContent));
-            }
-        }
-
-        /**
-         * Returns the peerId of the peer making the request, if given
-         */
-        private static String getRequestorPeerId(HttpServletRequest req) {
-            // get the potential PeerId from the PathInfo
-            String requestorPeerId = req.getPathInfo();
-
-            if (null != requestorPeerId) {
-                int begin = 0;
-                int end = requestorPeerId.length();
-
-                // check for all leading "/"
-                while (begin < end && requestorPeerId.charAt(begin) == '/') {
-                    begin++;
-                }
-
-                // check for all trailing "/"
-                while (end - begin > 0 && requestorPeerId.charAt(end - 1) == '/') {
-                    end--;
-                }
-
-                if (begin == end) {
-                    // nothing left of the string
-                    requestorPeerId = null;
-                } else {
-                    // get the new substring
-                    requestorPeerId = requestorPeerId.substring(begin, end);
-                }
-            }
-
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer("requestorPeerId = " + requestorPeerId);
-            }
-
-            return requestorPeerId;
-        }
-
-        /**
-         * Returns the request timeout or -1 if a request timeout is not given
-         */
-        private static long getResponseTimeout(String requestTimeoutString) {
-            // the default timeout is -1, which means do not return a message
-            long timeout = -1;
-
-            try {
-                timeout = Long.parseLong(requestTimeoutString);
-
-                // Protect agains clients that will try top have us keep
-                // connections for ever. If they re-establish all the time it's
-                // fine, but until we have a more sophisticated mechanism, we
-                // want to make sure we quit timely if the client's gone.
-                if (timeout > MAXIMUM_RESPONSE_DURATION || timeout == 0) {
-                    timeout = MAXIMUM_RESPONSE_DURATION;
-                }
-            } catch (NumberFormatException e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("The requestTimeout does not contain a decimal number " + requestTimeoutString);
-                }
-            }
-
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer("requestTimeout = " + timeout);
-            }
-
-            return timeout;
-        }
-
-        /**
-         * Returns the lazy close timeout or -1 if a lazy close timeout is not given
-         */
-        private static long getExtraResponsesTimeout(String extraResponseTimeoutString) {
-            // the default timeout is -1, which means do not wait for additional messages
-            long timeout = -1;
-
-            try {
-                timeout = Long.parseLong(extraResponseTimeoutString);
-
-                // Protect agains clients that will try top have us keep
-                // connections for ever. If they re-establish all the time it's
-                // fine, but until we have a more sophisticated mechanism, we
-                // want to make sure we quit timely if the client's gone.
-                if (timeout > (2 * TimeUtils.AMINUTE) || timeout == 0) {
-                    timeout = (2 * TimeUtils.AMINUTE);
-                }
-            } catch (NumberFormatException e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("The extraResponseTimeoutString does not contain a decimal number " + extraResponseTimeoutString);
-                }
-            }
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("extraResponseTimeout = " + timeout);
-            }
-
-            return timeout;
-        }
-
-        /**
-         *  Checks if the request includes a message as content.
-         *
-         *  @param req The request to be inspected.
-         *  @return <tt>true</tt> if there is content to be read from this request.
-         */
-        private static boolean hasMessageContent(HttpServletRequest req) {
-            boolean hasContent = false;
-
-            int contentLength = req.getContentLength();
-
-            // if the content length is not zero, there is an incoming message
-            // Either the message length is given or it is a chunked message
-            if (contentLength > 0) {
-                hasContent = true;
-            } else if (contentLength == -1) {
-                // check if the transfer encoding is chunked
-                String transferEncoding = req.getHeader("Transfer-Encoding");
-
-                hasContent = "chunked".equals(transferEncoding);
-            }
-
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer("hasMessageContent = " + hasContent);
-            }
-
-            return hasContent;
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/servlethttp/HttpServletMessenger.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/servlethttp/HttpServletMessenger.java
deleted file mode 100644 (file)
index 3d72bf2..0000000
+++ /dev/null
@@ -1,470 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.endpoint.servlethttp;
-
-import java.util.Timer;
-import java.util.TimerTask;
-
-import java.io.IOException;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.StringMessageElement;
-import net.jxta.peergroup.PeerGroupID;
-
-import net.jxta.impl.endpoint.BlockingMessenger;
-import net.jxta.impl.endpoint.EndpointServiceImpl;
-import net.jxta.impl.util.TimeUtils;
-
-/**
- * Simple messenger that waits for a message to give back to the requesting client
- *
- * <p/>This messenger is not entirely thread-safe. You should not use any
- * of the <code>sendMessage</code> methods from more than one thread.
- *
- */
-final class HttpServletMessenger extends BlockingMessenger {
-    
-    /**
-     *  Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(HttpServletMessenger.class.getName());
-    
-    // We need an explicit idle state. outgoingMessage being null is not enough
-    // because there is an intermediate state where the http servlet must know
-    // that there is nothing new to be sent but the relay side must also know
-    // that status has not been collected yet (the messenger is not ready to be
-    // reused). We use outgoingMessage == null to know that the message
-    // has already been picked-up by the servlet thread, and
-    // sendResult != IDLE to know that the result has not yet been collected
-    // by the relay sender thread.
-    
-    private final static int SEND_IDLE = 0;
-    private final static int SEND_INPROGRESS = 1;
-    private final static int SEND_SUCCESS = 2;
-    private final static int SEND_FAIL = 3;
-    private final static int SEND_TOOLONG = 4;
-    
-    private final static long MAX_SENDING_BLOCK = 2 * TimeUtils.AMINUTE;
-    private final static long MAX_SENDING_WAIT = 3 * TimeUtils.ASECOND;
-    
-    private final static EndpointAddress nullEndpointAddr = new EndpointAddress("http", "0.0.0.0:0", null, null);
-    
-    private final static Timer closeMessengerTimer = new Timer("HttpServletMessenger Expiration timer", true);
-    
-    private final EndpointAddress logicalAddress;
-    private final MessageElement srcAddressElement;
-    private ScheduledExipry expirationTask;
-    
-    /**
-     *  The message "queue"
-     */
-    private Message outgoingMessage = null;
-    
-    private int sendResult = SEND_IDLE;
-    private long sendingSince = 0;
-    
-    /**
-     *  Allows us to schedule the closing of a messenger.
-     */
-    private static class ScheduledExipry extends TimerTask {
-
-        /**
-         *  The messenger we will be expiring.
-         */
-        HttpServletMessenger messenger;
-        
-        ScheduledExipry(HttpServletMessenger toExpire) {
-            messenger = toExpire;
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        @Override
-        public boolean cancel() {
-            // It is important we clear the messenger because Timer doesn't
-            // remove cancelled TimerTasks from it's queue until they fire. This
-            // means that the Messenger would not be GCed until the TimerTask
-            // fired.
-            messenger = null;
-            boolean result = super.cancel();
-
-            // take the opportunity to also purge canceled tasks
-            closeMessengerTimer.purge();
-            return result;
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        @Override
-        public void run() {
-            try {
-                HttpServletMessenger temp = messenger;
-
-                messenger = null;
-                
-                if (null != temp) {
-                    temp.close();
-                }
-            } catch (Throwable all) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Uncaught Throwable in timer task :" + Thread.currentThread().getName(), all);
-                }
-            }
-        }
-    }
-    
-    /**
-     *  Standard constructor.
-     *
-     * @param peerGroupID the peer group id
-     * @param srcAddress  source address
-     * @param logicalAddress logical address
-     * @param validFor validity in milliseconds
-     */
-    HttpServletMessenger(PeerGroupID peerGroupID, EndpointAddress srcAddress, EndpointAddress logicalAddress, long validFor) {
-        
-        // We do not use self destruction.
-        super(peerGroupID, nullEndpointAddr, false);
-        
-        this.logicalAddress = logicalAddress;
-        
-        this.srcAddressElement = new StringMessageElement(EndpointServiceImpl.MESSAGE_SOURCE_NAME, srcAddress.toString(), null);
-        
-        if ((0 != validFor) && (validFor < Long.MAX_VALUE)) {
-            expirationTask = new ScheduledExipry(this);
-            
-            closeMessengerTimer.schedule(expirationTask, validFor);
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("HttpServletMessenger\n\t" + toString());
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized void closeImpl() {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("close\n\t" + toString());
-        }
-        
-        ScheduledExipry cancelExpire = expirationTask;
-
-        expirationTask = null;
-        if (null != cancelExpire) {
-            cancelExpire.cancel();
-        }
-        
-        super.close();
-        
-        notifyAll();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public EndpointAddress getLogicalDestinationImpl() {
-        return logicalAddress;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean isIdleImpl() {
-        // We do not use self destruction.
-        return false;
-    }
-    
-    /**
-     * Send messages. Messages are queued and processed by a thread
-     * running HttpClientConnection.
-     */
-    @Override
-    public synchronized void sendMessageBImpl(Message message, String service, String serviceParam) throws IOException {
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Send " + message + " to " + dstAddress.toString() + "\n\t" + toString());
-        }
-        
-        if (isClosed()) {
-            IOException failure = new IOException("Messenger was closed, it cannot be used to send messages.");
-            
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, failure.getMessage(), failure);
-            }
-            
-            throw failure;
-        }
-        
-        // Set the message with the appropriate src and dest address
-        message.replaceMessageElement(EndpointServiceImpl.MESSAGE_SOURCE_NS, srcAddressElement);
-        
-        EndpointAddress destAddressToUse = getDestAddressToUse(service, serviceParam);
-        
-        MessageElement dstAddressElement = new StringMessageElement(EndpointServiceImpl.MESSAGE_DESTINATION_NAME,
-                destAddressToUse.toString(), null);
-        
-        message.replaceMessageElement(EndpointServiceImpl.MESSAGE_DESTINATION_NS, dstAddressElement);
-        
-        // doSend returns false only when this messenger is closed.
-        if (!doSend(message)) {
-            // send message failed
-            IOException failure = new IOException("Messenger was closed, it cannot be used to send messages.");
-            
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "sendMessage failed (messenger closed).\n\t" + toString(), failure);
-            }
-            
-            throw failure;
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("sendMessage successful for " + message + "\n\t" + toString());
-        }
-    }
-    
-    // Must be called from synchronized context only.
-    private boolean doSend(Message message) {
-        
-        // No need to wait for the messenger to be free. Transport
-        // messengers have no obligation to behave nicely if they're
-        // used by mltiple threads. If a thread comes here while
-        // we're already busy sending, then that's a congestion. Just
-        // drop the new message (pretend it went out).
-        // This is not even so nasty, because jetty has a sizeable
-        // output buffer. As long as that buffer is not full, sending
-        // is instantaneou. If sending starts blocking, then we can honestly
-        // drop messages.
-        
-        if (isClosed()) {
-            return false;
-        }
-        
-        long now = TimeUtils.timeNow();
-        
-        if (sendResult != SEND_IDLE) {
-            // check if that connection is a lemon
-            if ((sendResult == SEND_TOOLONG) && (now > (sendingSince + MAX_SENDING_BLOCK))) {
-                close();
-            }
-            return true;
-        }
-        
-        // put the message on the outgoing "queue" of size 1
-        outgoingMessage = message;
-        sendResult = SEND_INPROGRESS;
-        sendingSince = now;
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Queued " + message);
-        }
-        
-        // notify the servlet if it was waiting for a message
-        notifyAll();
-        
-        // wait for the result of the send Since there is ample
-        // buffering underneath, we're not supposed to wait for long;
-        // unless we outdo the connection, in which case, we might as
-        // well start dropping. No point in blocking.
-        // FIXME: jice@jxta.org - this is a rudimentary fix. We need
-        // something like watchedOutputStream instead. Being forced
-        // to do a two-way handshake with a servlet thread is pretty
-        // ridiculous too. We need a simpler http transport.
-        
-        long absoluteTimeOut = TimeUtils.toAbsoluteTimeMillis(MAX_SENDING_WAIT);
-        
-        while (!isClosed()) {
-            if (sendResult != SEND_INPROGRESS) {
-                break;
-            }
-            
-            long waitfor = TimeUtils.toRelativeTimeMillis(absoluteTimeOut);
-            
-            if (waitfor <= 0) {
-                break;
-            }
-            
-            try {
-                wait(waitfor);
-            } catch (InterruptedException e) {
-                Thread.interrupted();
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.log(Level.FINE, "InterruptedException timeout = " + MAX_SENDING_WAIT + "\n\t" + toString(), e);
-                }
-                break;
-            }
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Got result\n\t" + toString());
-        }
-        
-        if (isClosed() && (SEND_INPROGRESS == sendResult)) {
-            return false;
-        }
-        
-        // If the operation completed just confirm that we're done
-        // reading the result too. Else mark that we don't care.
-        // When it completes the result will be discarded. By default,
-        // the we return ok. If the operation did not complete fast
-        // enough, that's what we return.
-        
-        boolean result = (sendResult != SEND_FAIL);
-        
-        if (sendResult == SEND_INPROGRESS) {
-            sendResult = SEND_TOOLONG;
-            outgoingMessage = null;
-        } else {
-            sendResult = SEND_IDLE;
-        }
-        
-        // Let another contending thread use this messenger.
-        notifyAll();
-        
-        return result;
-    }
-    
-    /**
-     *  Retrieve a message from the "queue" of messages for the servlet.
-     *
-     *  @param timeout Number of milliseconds to wait for a message. Per Java
-     *  convention 0 (zero) means wait forever.
-     *  @return the message or <code>null</code> if no message was available
-     *  before the timeout was reached.
-     *  @throws InterruptedException If the thread is interrupted while waiting.
-     */
-    protected synchronized Message waitForMessage(long timeout) throws InterruptedException {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Waiting (" + (0 == timeout ? "forever" : Long.toString(timeout)) + ") for message\n\t" + toString());
-        }
-        
-        if (0 == timeout) {
-            // it's forever
-            timeout = Long.MAX_VALUE;
-        }
-        
-        long absoluteTimeOut = TimeUtils.toAbsoluteTimeMillis(timeout);
-        
-        while (!isClosed() && (null == outgoingMessage)) {
-            long waitfor = TimeUtils.toRelativeTimeMillis(absoluteTimeOut);
-            
-            if (waitfor <= 0) {
-                break;
-            }
-            
-            wait(waitfor);
-        }
-        
-        // get the message
-        Message result = outgoingMessage;
-        
-        outgoingMessage = null; // Msg can only be picked-up once.
-        
-        if (!isClosed() && (result == null)) {
-            // ABSURD, but seems to happen: the message sent was NULL
-            // and the sender thread is waiting for the completion event.
-            // There would be no such thing, but we can make sure it stops
-            // waiting and still leave the messenger in a sane state if there
-            // was no such absurdity going on.
-            
-            sendResult = SEND_IDLE;
-            notifyAll();
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Returning " + result + "\n\t" + toString());
-        }
-        
-        return result;
-    }
-    
-    protected synchronized void messageSent(boolean wasSuccessful) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("messageSent(" + wasSuccessful + ")\n\t" + toString());
-        }
-        
-        if (SEND_TOOLONG == sendResult) {
-            // No-one cares for the result any more. Let the next send go.
-            sendResult = SEND_IDLE;
-        } else {
-            sendResult = wasSuccessful ? SEND_SUCCESS : SEND_FAIL;
-        }
-        
-        notifyAll();
-    }
-    
-    /**
-     * {@inheritDoc}
-     *
-     *  <p/>An implementation for debugging. Do not depend on the format.
-     */
-    @Override
-    public String toString() {
-        return "[" + super.toString() + "] isClosed=" + isClosed() + " sendResult=" + sendResult + " outmsg=" + outgoingMessage;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/servlethttp/ServletHttpTransport.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/servlethttp/ServletHttpTransport.java
deleted file mode 100644 (file)
index fa19f85..0000000
+++ /dev/null
@@ -1,473 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.endpoint.servlethttp;
-
-import java.net.InetAddress;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-
-import java.net.UnknownHostException;
-import java.util.concurrent.Executor;
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-
-import net.jxta.logging.Logging;
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Attribute;
-import net.jxta.document.XMLElement;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.id.ID;
-import net.jxta.meter.MonitorResources;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.protocol.ConfigParams;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.protocol.TransportAdvertisement;
-import net.jxta.platform.Module;
-
-import net.jxta.exception.PeerGroupException;
-
-import net.jxta.impl.endpoint.transportMeter.TransportBindingMeter;
-import net.jxta.impl.endpoint.transportMeter.TransportMeter;
-import net.jxta.impl.endpoint.transportMeter.TransportMeterBuildSettings;
-import net.jxta.impl.endpoint.transportMeter.TransportServiceMonitor;
-import net.jxta.impl.endpoint.IPUtils;
-import net.jxta.impl.protocol.HTTPAdv;
-
-import net.jxta.impl.meter.*;
-import net.jxta.impl.peergroup.StdPeerGroup;
-
-/**
- * A JXTA Message Transport
- *
- * <p/>This class is really a facade for the following:<ul>
- * <li>An HTTP client message sender</li>
- * <li>An HTTP-server-based message receiver</li>
- * </ul>
- */
-public final class ServletHttpTransport implements Module {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(ServletHttpTransport.class.getName());
-
-    /**
-     * The name of the protocol
-     */
-    private final static String DEFAULT_HTTP_PROTOCOL_NAME = "http";
-
-    String HTTP_PROTOCOL_NAME = DEFAULT_HTTP_PROTOCOL_NAME;
-
-    /**
-     * PeerGroup we are working for
-     */
-    PeerGroup group;
-    ID assignedID;
-    ModuleImplAdvertisement implAdvertisement;
-    
-    /**
-     * The executor used by HttpClientMessenger
-     */
-    Executor executor;
-
-    /**
-     * The endpoint we attach to.
-     */
-    private EndpointService endpoint = null;
-
-    /**
-     * If {@code true} then we are configured to act as an HTTP client. This
-     * means we will poll for messages.
-     */
-    private boolean configClient = false;
-
-    /**
-     * If {@code true} then we are configured to act as an HTTP server. This
-     * means we will accept connections from polling clients.
-     */
-    private boolean configServer = false;
-
-    /**
-     * The HttpMessageSender instance
-     */
-    private HttpMessageSender sender = null;
-
-    /**
-     * The HttpMessageReceiver instance
-     */
-    private HttpMessageReceiver receiver = null;
-
-    /**
-     * The TransportMeter for this httpTransport
-     */
-    private TransportMeter transportMeter;
-
-    /**
-     * The TransportBindingMeter for unknown connections (pings/errors)
-     */
-    private TransportBindingMeter unknownTransportBindingMeter;
-
-    /**
-     * The InetAddress of the network interface we are bound to otherwise the
-     * ALL/ANY address.
-     */
-    InetAddress usingInterface = null;
-
-    /**
-     * Port number to which we are bound.
-     */
-    int usingPort = 0;
-
-    /**
-     * The addresses which we will advertise and by which we may be reached.
-     */
-    private List<EndpointAddress> publicAddresses = null;
-
-    /**
-     * Our preferred return address which we will use as the "source" for
-     * messages we send.
-     */
-    private EndpointAddress publicAddress;
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized void init(PeerGroup group, ID assignedID, Advertisement impl) throws PeerGroupException {
-        this.group = group;
-        this.assignedID = assignedID;
-        implAdvertisement = (ModuleImplAdvertisement) impl;
-        
-        this.executor = ((StdPeerGroup) group).getExecutor();
-
-        // Get out invariable parameters from the implAdv
-        XMLElement param = (XMLElement) implAdvertisement.getParam();
-
-        if (param != null) {
-            Enumeration list = param.getChildren("Proto");
-
-            if (list.hasMoreElements()) {
-                XMLElement pname = (XMLElement) list.nextElement();
-                String configProtoName = pname.getTextValue();
-                if (null != configProtoName) {
-                    HTTP_PROTOCOL_NAME = configProtoName.trim();
-                }
-            }
-        }
-
-        ConfigParams peerAdv = group.getConfigAdvertisement();
-
-        param = (XMLElement) peerAdv.getServiceParam(assignedID);
-
-        Enumeration httpChilds = param.getChildren(TransportAdvertisement.getAdvertisementType());
-
-        // get the TransportAdv
-        if (httpChilds.hasMoreElements()) {
-            param = (XMLElement) httpChilds.nextElement();
-            Attribute typeAttr = param.getAttribute("type");
-
-            if (!HTTPAdv.getAdvertisementType().equals(typeAttr.getValue())) {
-                throw new IllegalArgumentException("Transport adv is not an http adv");
-            }
-
-            if (httpChilds.hasMoreElements()) {
-                throw new IllegalArgumentException("Configuration contained multiple http advertisements");
-            }
-        } else {
-            throw new IllegalArgumentException("Configuration did not contain http advertisement");
-        }
-
-        Advertisement paramsAdv = AdvertisementFactory.newAdvertisement(param);
-
-        if (!(paramsAdv instanceof HTTPAdv)) {
-            throw new IllegalArgumentException("Provided advertisement was not a " + HTTPAdv.getAdvertisementType());
-        }
-
-        HTTPAdv httpAdv = (HTTPAdv) paramsAdv;
-
-        // determine the local interface to use. If the user specifies
-        // one, use that. Otherwise, use the all the available interfaces.
-        String interfaceAddressStr = httpAdv.getInterfaceAddress();
-        boolean publicAddressOnly = httpAdv.getPublicAddressOnly();
-
-        if (interfaceAddressStr != null) {
-            try {
-                usingInterface = InetAddress.getByName(interfaceAddressStr);
-            } catch (UnknownHostException failed) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Invalid address for local interface address, using default");
-                }
-                usingInterface = IPUtils.ANYADDRESS;
-            }
-        } else {
-            usingInterface = IPUtils.ANYADDRESS;
-        }
-
-        usingPort = httpAdv.getPort();
-
-        configClient = httpAdv.isClientEnabled();
-
-        configServer = httpAdv.isServerEnabled();
-
-        publicAddresses = getPublicAddresses(configServer, httpAdv.getServer(), usingInterface, usingPort, publicAddressOnly);
-
-        if (!configClient && !configServer) {
-            throw new IllegalArgumentException("Neither incoming nor outgoing connections configured.");
-        }
-
-        publicAddress = publicAddresses.get(0);
-
-        // Tell tell the world about our configuration.
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring HTTP Message Transport : " + assignedID);
-
-            if (implAdvertisement != null) {
-                configInfo.append("\n\tImplementation:");
-                configInfo.append("\n\t\tModule Spec ID: ").append(implAdvertisement.getModuleSpecID());
-                configInfo.append("\n\t\tImpl Description: ").append(implAdvertisement.getDescription());
-                configInfo.append("\n\t\tImpl URI: ").append(implAdvertisement.getUri());
-                configInfo.append("\n\t\tImpl Code: ").append(implAdvertisement.getCode());
-            }
-            configInfo.append("\n\tGroup Params:");
-            configInfo.append("\n\t\tGroup: ").append(group.getPeerGroupName());
-            configInfo.append("\n\t\tGroup ID: ").append(group.getPeerGroupID());
-            configInfo.append("\n\t\tPeer ID: ").append(group.getPeerID());
-            configInfo.append("\n\tConfiguration :");
-            configInfo.append("\n\t\tProtocol: ").append(httpAdv.getProtocol());
-            configInfo.append("\n\t\tClient Enabled: ").append(configClient);
-            configInfo.append("\n\t\tServer Enabled: ").append(configServer);
-            configInfo.append("\n\t\tPublic address: ").append(httpAdv.getServer() == null ? "(unspecified)" : httpAdv.getServer());
-            configInfo.append("\n\t\tInterface address: ").append(interfaceAddressStr == null ? "(unspecified)" : interfaceAddressStr);
-            configInfo.append("\n\t\tUnicast Server Bind Addr: ").append(IPUtils.getHostAddress(usingInterface)).append(":").append(usingPort);
-            configInfo.append("\n\t\tPublic Addresses: ");
-            configInfo.append("\n\t\t\tDefault Endpoint Addr : ").append(publicAddress);
-            for (EndpointAddress anAddr : publicAddresses) {
-                configInfo.append("\n\t\t\tEndpoint Addr : ").append(anAddr);
-            }
-            LOG.config(configInfo.toString());
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized int startApp(String[] args) {
-        endpoint = group.getEndpointService();
-
-        if (null == endpoint) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is an endpoint service");
-            }
-
-            return START_AGAIN_STALLED;
-        }
-
-        if (TransportMeterBuildSettings.TRANSPORT_METERING) {
-            TransportServiceMonitor transportServiceMonitor = (TransportServiceMonitor) MonitorManager.getServiceMonitor(group,
-                    MonitorResources.transportServiceMonitorClassID);
-
-            if (transportServiceMonitor != null) {
-                transportMeter = transportServiceMonitor.createTransportMeter("HTTP", publicAddress);
-                unknownTransportBindingMeter = transportMeter.getTransportBindingMeter(TransportMeter.UNKNOWN_PEER,
-                        TransportMeter.UNKNOWN_ADDRESS);
-            }
-        }
-
-        if (configServer) {
-            // Start the http server that runs the receiver.
-
-            try {
-                receiver = new HttpMessageReceiver(this, publicAddresses, usingInterface, usingPort);
-                receiver.start();
-            } catch (PeerGroupException e) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Could not start http message receiver", e);
-                }
-                return -1; // Can't go on; if we were configured to be a server we must make the failure obvious.
-            }
-        }
-
-        if (configClient) {
-            // create the MessageSender
-
-            try {
-                sender = new HttpMessageSender(this,
-                        new EndpointAddress("jxta", group.getPeerID().getUniqueValue().toString(), null, null));
-                sender.start();
-            } catch (PeerGroupException e) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Could not start http message sender", e);
-                }
-                return -1; // Can't go on; if we were configured to be a server we must make the failure obvious.
-            }
-        }
-
-        return 0;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized void stopApp() {
-        if (receiver != null) {
-            receiver.stop();
-        }
-
-        if (sender != null) {
-            sender.stop();
-        }
-
-        endpoint = null;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    EndpointService getEndpointService() {
-        return endpoint;
-    }
-
-    private List<EndpointAddress> getPublicAddresses(boolean serverEnabled, String serverName, InetAddress usingInterface, int serverSocketPort, boolean publicAddressOnly) {
-        List<EndpointAddress> publicAddresses = new ArrayList<EndpointAddress>();
-
-        if (serverEnabled) {
-            // Build the publicAddresses
-
-            // first in the list is the "public server name". We don't try to
-            // resolve this since it might not be resolvable in the context
-            // we are running in, we just assume it's good.
-            if (serverName != null) {
-                // use speced server name.
-                EndpointAddress newAddr = new EndpointAddress(HTTP_PROTOCOL_NAME, serverName, null, null);
-
-                publicAddresses.add(newAddr);
-                if (publicAddressOnly) {
-                    return publicAddresses;
-                }
-            }
-        }
-
-        // then add the rest of the local interfaces as appropriate
-        if (usingInterface.equals(IPUtils.ANYADDRESS)) {
-            // its wildcarded
-            Iterator<InetAddress> eachLocal = IPUtils.getAllLocalAddresses();
-            List<EndpointAddress> wildAddrs = new ArrayList<EndpointAddress>();
-
-            while (eachLocal.hasNext()) {
-                InetAddress anAddress = eachLocal.next();
-
-                String hostAddress = IPUtils.getHostAddress(anAddress);
-
-                EndpointAddress newAddr = new EndpointAddress(HTTP_PROTOCOL_NAME,
-                        hostAddress + ":" + Integer.toString(serverSocketPort), null, null);
-
-                // don't add it if its already in the list
-                if (!publicAddresses.contains(newAddr)) {
-                    wildAddrs.add(newAddr);
-                }
-            }
-
-            // we sort them so that later equals() will be deterministic.
-            // the result of IPUtils.getAllLocalAddresses() is not known
-            // to be sorted.
-            Collections.sort(wildAddrs, new Comparator<EndpointAddress>() {
-                public int compare(EndpointAddress one, EndpointAddress two) {
-                    return one.toString().compareTo(two.toString());
-                }
-
-                @Override
-                public boolean equals(Object that) {
-                    return this == that;
-                }
-            });
-
-            publicAddresses.addAll(wildAddrs);
-        } else {
-            // use specified interface
-            String hostAddress = IPUtils.getHostAddress(usingInterface);
-
-            EndpointAddress newAddr = new EndpointAddress(HTTP_PROTOCOL_NAME,
-                    hostAddress + ":" + Integer.toString(serverSocketPort), null, null);
-
-            // don't add it if its already in the list
-            if (!publicAddresses.contains(newAddr)) {
-                publicAddresses.add(newAddr);
-            }
-        }
-
-        return publicAddresses;
-    }
-
-    TransportBindingMeter getTransportBindingMeter(String peerIDString, EndpointAddress destinationAddress) {
-        if (transportMeter != null) {
-            return transportMeter.getTransportBindingMeter((peerIDString != null) ? peerIDString : TransportMeter.UNKNOWN_PEER,
-                    destinationAddress);
-        } else {
-            return null;
-        }
-    }
-
-    TransportBindingMeter getUnknownTransportBindingMeter() {
-        return unknownTransportBindingMeter;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/servlethttp/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/servlethttp/package.html
deleted file mode 100644 (file)
index 7a5ac9c..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    A JXTA {@link net.jxta.endpoint.MessageTransport} implementation which 
-    uses the HTTP protocol.
-
-    @see net.jxta.endpoint.EndpointService
-    @see net.jxta.endpoint.MessageTransport
-    @see net.jxta.endpoint.MessageSender
-    @see net.jxta.endpoint.MessageReceiver
-    @see net.jxta.endpoint.Message
-
-    @see <a href="http://www.ietf.org/rfc/rfc2068.txt">IETF 2068 : Hypertext Transfer Protocol -- HTTP/1.1</a>
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#trans-httpt" target="_blank">JXTA Protocols Specification : Standard JXTA Transport Bindings</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tcp/IncomingUnicastServer.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tcp/IncomingUnicastServer.java
deleted file mode 100644 (file)
index 496d9f0..0000000
+++ /dev/null
@@ -1,468 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.tcp;
-
-import net.jxta.logging.Logging;
-
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.net.*;
-import java.nio.channels.*;
-import java.nio.channels.spi.SelectorProvider;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * This server handles incoming unicast TCP connections
- */
-public class IncomingUnicastServer implements Runnable {
-
-    /**
-     * Logger
-     */
-    private static final Logger LOG = Logger.getLogger(IncomingUnicastServer.class.getName());
-
-    /**
-     * The transport which owns this server.
-     */
-    private final TcpTransport transport;
-
-    /**
-     * The interface address the serverSocket will try to bind to.
-     */
-    private final InetAddress serverBindLocalInterface;
-
-    /**
-     * The beginning of the port range the serverSocket will try to bind to.
-     */
-    private final int serverBindStartLocalPort;
-
-    /**
-     * The port the serverSocket will try to bind to.
-     */
-    private int serverBindPreferedLocalPort;
-
-    /**
-     * The end of the port range the serverSocket will try to bind to.
-     */
-    private final int serverBindEndLocalPort;
-
-    /**
-     * The socket we listen for connections on.
-     */
-    private ServerSocket serverSocket;
-
-    /**
-     * If true then the we are closed or closing.
-     */
-    private volatile boolean closed = false;
-
-    /**
-     * The thread on which connection accepts will take place.
-     */
-    private Thread acceptThread = null;
-
-    /**
-     * Channel Selector
-     */
-    private Selector acceptSelector = null;
-
-    /**
-     * ServerSocket Channel
-     */
-    private ServerSocketChannel serverSocChannel = null;
-
-    /**
-     * Constructor for the TCP server
-     *
-     * @param owner           the TCP transport we are working for
-     * @param serverInterface the network interface to use.
-     * @param preferedPort    the port we will be listening on.
-     * @param startPort       starting port
-     * @param endPort         the endport in port range
-     * @throws IOException       if an io severe occurs
-     * @throws SecurityException if a security exception occurs
-     */
-    public IncomingUnicastServer(TcpTransport owner, InetAddress serverInterface, int preferedPort, int startPort, int endPort) throws IOException, SecurityException {
-        this.transport = owner;
-        serverBindLocalInterface = serverInterface;
-        serverBindPreferedLocalPort = preferedPort;
-        serverBindStartLocalPort = startPort;
-        serverBindEndLocalPort = endPort;
-
-        openServerSocket();
-    }
-
-    /**
-     * Start this server.
-     *
-     * @return true if successfully started
-     */
-    public synchronized boolean start() {
-
-        if (acceptThread != null) {
-            return false;
-        }
-
-        // Start daemon thread
-        acceptThread = new Thread(transport.group.getHomeThreadGroup(), this, "TCP Transport ServerSocket accept for " + transport.getPublicAddress());
-        acceptThread.setDaemon(true);
-        acceptThread.start();
-        return true;
-    }
-
-    /**
-     * Stop this server.
-     */
-    public synchronized void stop() {
-        closed = true;
-
-        Thread temp = acceptThread;
-
-        if (null != temp) {
-            // interrupt does not seem to have an effect on threads blocked in accept.
-            temp.interrupt();
-        }
-
-        // Closing the socket works though.
-        try {
-            serverSocket.close();
-        } catch (IOException ignored) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "IO error occured while closing server socket", ignored);
-            }
-        }
-
-        try {
-            acceptSelector.close();
-        } catch (IOException io) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "IO error occured while closing Selectors", io);
-            }
-        }
-    }
-
-    /**
-     * Get the address of the network interface being used.
-     *
-     * @return the local socket address
-     */
-    synchronized InetSocketAddress getLocalSocketAddress() {
-        ServerSocket localSocket = serverSocket;
-
-        if (null != localSocket) {
-            return (InetSocketAddress) localSocket.getLocalSocketAddress();
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Get the start port range we are using
-     *
-     * @return starting port range
-     */
-    int getStartPort() {
-        return serverBindStartLocalPort;
-    }
-
-    /**
-     * Get the end port range we are using
-     *
-     * @return the ending port range
-     */
-    int getEndPort() {
-        return serverBindEndLocalPort;
-    }
-
-    /**
-     * Daemon where we wait for incoming connections.
-     */
-    public void run() {
-        try {
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("Server is ready to accept connections");
-            }
-
-            while (!closed) {
-                try {
-                    if ((null == serverSocChannel) || !serverSocChannel.isOpen()) {
-                        openServerSocket();
-                        if (null == serverSocChannel) {
-                            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                                LOG.warning("Failed to open Server Channel");
-                            }
-                            break;
-                        }
-                    }
-                    acceptSelector.select();
-                    Iterator<SelectionKey> it = acceptSelector.selectedKeys().iterator();
-
-                    while (it.hasNext()) {
-                        SelectionKey key = it.next();
-
-                        // remove it
-                        it.remove();
-                        if (key.isAcceptable()) {
-                            ServerSocketChannel nextReady = (ServerSocketChannel) key.channel();
-                            SocketChannel inputSocket = nextReady.accept();
-
-                            if ((inputSocket == null) || (inputSocket.socket() == null)) {
-                                continue;
-                            }
-
-                            MessengerBuilder builder = new MessengerBuilder(inputSocket, transport);
-
-                            try {
-                                transport.executor.execute(builder);
-                                transport.incrementConnectionsAccepted();
-                            } catch (RejectedExecutionException re) {
-                                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                    LOG.log(Level.FINE, MessageFormat.format("Executor rejected task : {0}", builder.toString()), re);
-                                }
-                            }
-                        }
-                    }
-                } catch (ClosedSelectorException cse) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Accept Selector closed");
-                    }
-                    if (closed) {
-                        break;
-                    }
-                } catch (InterruptedIOException woken) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Accept Thread woken");
-                    }
-                } catch (IOException e1) {
-                    if (closed) {
-                        break;
-                    }
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING,
-                                "[1] ServerSocket.accept() failed on " + serverSocket.getInetAddress() + ":"+ serverSocket.getLocalPort(), e1);
-                    }
-                } catch (SecurityException e2) {
-                    if (closed) {
-                        break;
-                    }
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "[2] ServerSocket.accept() failed on " + serverSocket.getInetAddress() + ":" + serverSocket.getLocalPort(), e2);
-                    }
-                }
-            }
-        } catch (Throwable all) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Uncaught Throwable in thread :" + Thread.currentThread().getName(), all);
-            }
-        } finally {
-            synchronized (this) {
-                closed = true;
-                ServerSocket temp = serverSocket;
-
-                serverSocket = null;
-                if (null != temp) {
-                    try {
-                        temp.close();
-                    } catch (IOException ignored) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.log(Level.FINE, "Exception occurred while closing server socket", ignored);
-                        }
-                    }
-                }
-                acceptThread = null;
-            }
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("Server has been shut down.");
-            }
-        }
-    }
-
-    public List<Integer> rangeCheckShuffle(int start, int end) {
-        if ((start < 1) || (start > 65535)) {
-            throw new IllegalArgumentException("Invalid start port");
-        }
-
-        if ((end < 1) || (end > 65535) || (end < start)) {
-            throw new IllegalArgumentException("Invalid end port");
-        }
-
-        // fill the inRange array.
-        List<Integer> inRange = new ArrayList<Integer>();
-
-        for (int eachInRange = start; eachInRange < end; eachInRange++) {
-            inRange.add(eachInRange);
-        }
-        Collections.shuffle(inRange);
-        return inRange;
-    }
-
-    private synchronized void openServerSocket() throws IOException, SecurityException {
-        serverSocket = null;
-        while (true) {
-            try {
-                synchronized (this) {
-                    acceptSelector = SelectorProvider.provider().openSelector();
-                    serverSocChannel = ServerSocketChannel.open();
-                    InetSocketAddress bindAddress;
-
-                    if (-1 != serverBindPreferedLocalPort) {
-                        bindAddress = new InetSocketAddress(serverBindLocalInterface, serverBindPreferedLocalPort);
-                        serverSocket = serverSocChannel.socket();
-                        int useBufferSize = Math.max(TcpTransport.RecvBufferSize, serverSocket.getReceiveBufferSize());
-
-                        serverSocket.setReceiveBufferSize(useBufferSize);
-                        serverSocket.bind(bindAddress, TcpTransport.MaxAcceptCnxBacklog);
-                    } else {
-                        List<Integer> rangeList = rangeCheckShuffle(serverBindStartLocalPort, serverBindEndLocalPort);
-
-                        while (!rangeList.isEmpty()) {
-                            int tryPort = rangeList.remove(0);
-
-                            if (tryPort > serverBindEndLocalPort) {
-                                continue;
-                            }
-
-                            try {
-                                bindAddress = new InetSocketAddress(serverBindLocalInterface, tryPort);
-                                serverSocket = serverSocChannel.socket();
-                                int useBufferSize = Math.max(TcpTransport.RecvBufferSize, serverSocket.getReceiveBufferSize());
-
-                                serverSocket.setReceiveBufferSize(useBufferSize);
-                                serverSocket.bind(bindAddress, TcpTransport.MaxAcceptCnxBacklog);
-
-                                if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                                    LOG.info("ServerSocketChannel bound to " + bindAddress + ":" + tryPort);
-                                }
-                            } catch (SocketException failed) {
-                                // this one is busy. try another.
-                            } catch (Error err) {
-                                // this can occur on some platforms where 2 instances are listenting on the same port
-                            }
-                        }
-                    }
-                }
-                try {
-                    // set the new channel non-blocking
-                    serverSocChannel.configureBlocking(false);
-                    serverSocChannel.register(acceptSelector, SelectionKey.OP_ACCEPT);
-                } catch (ClosedChannelException cce) {
-                    if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                        LOG.log(Level.FINER, "Channel closed.", cce);
-                    }
-                }
-                if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                    LOG.info("Server will accept connections at " + serverSocket.getLocalSocketAddress());
-                }
-                return;
-            } catch (BindException e0) {
-                if (-1 != serverBindStartLocalPort) {
-                    serverBindPreferedLocalPort = (0 == serverBindStartLocalPort) ? 0 : -1;
-                    continue;
-                }
-                closed = true;
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Cannot bind ServerSocket on " + serverBindLocalInterface + ":" + serverBindPreferedLocalPort, e0);
-                }
-                return;
-            }
-        }
-    }
-
-    /**
-     * An Executor task that creates a messenger from an incoming SocketChannel
-     * object.
-     */
-    private static class MessengerBuilder implements Runnable {
-
-        private SocketChannel inputSocket;
-        private TcpTransport transport;
-        TcpMessenger newMessenger;
-
-        MessengerBuilder(SocketChannel inputSocket, TcpTransport transport) {
-            assert inputSocket.socket() != null;
-            this.inputSocket = inputSocket;
-            this.transport = transport;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public void run() {
-            try {
-                if (inputSocket != null && inputSocket.isConnected()) {
-                    newMessenger = new TcpMessenger(inputSocket, transport);
-                }
-            } catch (IOException io) {
-                // protect against invalid connections
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.log(Level.FINE, "Messenger creation failure", io);
-                }
-            } catch (Throwable all) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.SEVERE, "Uncaught Throwable", all);
-                }
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tcp/TcpMessenger.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tcp/TcpMessenger.java
deleted file mode 100644 (file)
index da61b40..0000000
+++ /dev/null
@@ -1,1128 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.endpoint.tcp;
-
-import net.jxta.document.MimeMediaType;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.StringMessageElement;
-import net.jxta.endpoint.WireFormatMessage;
-import net.jxta.endpoint.WireFormatMessageFactory;
-import net.jxta.id.ID;
-import net.jxta.impl.endpoint.BlockingMessenger;
-import net.jxta.impl.endpoint.EndpointServiceImpl;
-import net.jxta.impl.endpoint.msgframing.MessagePackageHeader;
-import net.jxta.impl.endpoint.msgframing.WelcomeMessage;
-import net.jxta.impl.endpoint.transportMeter.TransportBindingMeter;
-import net.jxta.impl.endpoint.transportMeter.TransportMeterBuildSettings;
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.logging.Logging;
-import net.jxta.peer.PeerID;
-
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.Socket;
-import java.net.SocketAddress;
-import java.net.SocketTimeoutException;
-import java.nio.ByteBuffer;
-import java.nio.channels.ClosedChannelException;
-import java.nio.channels.SelectionKey;
-import java.nio.channels.Selector;
-import java.nio.channels.SocketChannel;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.concurrent.locks.ReentrantLock;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.linphone.p2pproxy.core.jxtaext.EndpointRegistry;
-
-/**
- * Implements a messenger which sends messages via raw TCP sockets.
- */
-public class TcpMessenger extends BlockingMessenger implements Runnable {
-
-    /**
-     * Logger
-     */
-    private static final Logger LOG = Logger.getLogger(TcpMessenger.class.getName());
-
-    /**
-     * The number of times we allow our write selector to be selected with no
-     * progress before we give up.
-     */
-    private static final int MAX_WRITE_ATTEMPTS = 3;
-
-    /**
-     * Description of our current location within the stream.
-     */
-    private enum readState {
-        /**
-         * Reading the initial welcome
-         */
-        WELCOME,
-        /**
-         * Reading a message header
-         */
-        HEADER,
-        /**
-         * Reading a message
-         */
-        BODY
-    }
-
-    /**
-     * The source address of messages sent on this messenger.
-     */
-    private final EndpointAddress srcAddress;
-
-    private final MessageElement srcAddressElement;
-
-    /**
-     * Cache of the logical destination of this messenger. (It helps if it works even after close)
-     */
-    private EndpointAddress logicalDestAddress;
-
-    /**
-     * The message tcpTransport we are working for.
-     */
-    private final TcpTransport tcpTransport;
-
-    private EndpointAddress dstAddress = null;
-    private EndpointAddress origAddress = null;
-    private EndpointAddress fullDstAddress = null;
-    private InetAddress inetAddress = null;
-    private int port = 0;
-
-    private volatile boolean closed = false;
-    private boolean closingDueToFailure = false;
-
-    private WelcomeMessage itsWelcome = null;
-
-    private final long createdAt = TimeUtils.timeNow();
-    private long lastUsed = TimeUtils.timeNow();
-
-    private SocketChannel socketChannel = null;
-
-    private TransportBindingMeter transportBindingMeter;
-
-    /**
-     * If this is an incoming connection we must not close it when the messenger
-     * disappears. It has many reasons to disappear while the connection must
-     * keep receiving messages. This is causing some problems for incoming
-     * messengers that are managed by some entity, such as the router or the
-     * relay. These two do call close explicitly when they discard a messenger,
-     * and their intent is truly to close the underlying connection. So
-     * basically we need to distinguish between incoming messengers that are
-     * abandoned without closing (for these we must protect the input side
-     * because that's the only reason for the connection being there) and
-     * incoming messengers that are explicitly closed (in which case we must let
-     * the entire connection be closed).
-     */
-    private boolean initiator;
-
-    private AtomicReference<readState> state = new AtomicReference<readState>(readState.WELCOME);
-
-    private final static int MAX_LEN = 4096;
-    private ByteBuffer buffer = ByteBuffer.allocate(MAX_LEN);
-
-    /**
-     * Header from the current incoming message (if any).
-     */
-    private MessagePackageHeader header = null;
-
-    /**
-     * Time at which we began receiving the current incoming message.
-     */
-    long receiveBeginTime = 0;
-
-    /**
-     * Enforces single writer on message write in case the messenger is being
-     * used on multiple threads.
-     */
-    private final ReentrantLock writeLock = new ReentrantLock();
-
-    /**
-     * Create a new TcpMessenger for the specified address.
-     *
-     * @param socketChannel the SocketChannel for the messenger
-     * @param transport     the tcp MessageSender we are working for.
-     * @throws java.io.IOException if an io error occurs
-     */
-    TcpMessenger(SocketChannel socketChannel, TcpTransport transport) throws IOException {
-        super(transport.group.getPeerGroupID(),
-                new EndpointAddress(transport.getProtocolName(),
-                        socketChannel.socket().getInetAddress().getHostAddress() + ":" + socketChannel.socket().getPort(), null, null), true);
-
-        initiator = false;
-        this.socketChannel = socketChannel;
-        this.tcpTransport = transport;
-        this.srcAddress = transport.getPublicAddress();
-        this.srcAddressElement = new StringMessageElement(EndpointServiceImpl.MESSAGE_SOURCE_NAME, srcAddress.toString(), null);
-
-        try {
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("Connection from " + socketChannel.socket().getInetAddress().getHostAddress() + ":" + socketChannel.socket().getPort());
-            }
-
-            // Set the socket options.
-            Socket socket = socketChannel.socket();
-
-            int useBufferSize = Math.max(TcpTransport.SendBufferSize, socket.getSendBufferSize());
-
-            socket.setSendBufferSize(useBufferSize);
-
-            inetAddress = socketChannel.socket().getInetAddress();
-            port = socketChannel.socket().getPort();
-
-            socket.setKeepAlive(true);
-            socket.setSoTimeout(TcpTransport.connectionTimeOut);
-            socket.setSoLinger(true, TcpTransport.LingerDelay);
-
-            // Disable Nagle's algorithm (We do this to reduce latency)
-            socket.setTcpNoDelay(true);
-
-            // Temporarily, our address for inclusion in the welcome message response.
-            dstAddress = new EndpointAddress(this.tcpTransport.getProtocolName(), inetAddress.getHostAddress() + ":" + port, null, null);
-            fullDstAddress = dstAddress;
-
-            startMessenger();
-        } catch (IOException io) {
-            if (TransportMeterBuildSettings.TRANSPORT_METERING) {
-                transportBindingMeter = this.tcpTransport.getUnicastTransportBindingMeter(null, dstAddress);
-                if (transportBindingMeter != null) {
-                    transportBindingMeter.connectionFailed(initiator, TimeUtils.timeNow() - createdAt);
-                }
-            }
-            // If we failed for any reason, make sure the socket is closed.
-            // We're the only one to know about it.
-            if (socketChannel != null) {
-                socketChannel.close();
-            }
-            throw io;
-        }
-
-        if (TransportMeterBuildSettings.TRANSPORT_METERING) {
-            transportBindingMeter = this.tcpTransport.getUnicastTransportBindingMeter((PeerID) getDestinationPeerID(), dstAddress);
-            if (transportBindingMeter != null) {
-                transportBindingMeter.connectionEstablished(initiator, TimeUtils.timeNow() - createdAt);
-            }
-        }
-        if (!isConnected()) {
-            throw new IOException("Failed to establish connection to " + dstAddress);
-        }
-    }
-
-
-    /**
-     * Create a new TcpMessenger for the specified address.
-     *
-     * @param destaddr     the destination of the messenger
-     * @param tcpTransport the tcp MessageSender we are working for.
-     * @throws java.io.IOException if an io error occurs
-     */
-    TcpMessenger(EndpointAddress destaddr, TcpTransport tcpTransport) throws IOException {
-        this(destaddr, tcpTransport, true);
-    }
-
-    /**
-     * Create a new TcpMessenger for the specified address.
-     *
-     * @param destaddr     the destination of the messenger
-     * @param tcpTransport the tcp MessageSender we are working for.
-     * @param selfDestruct indicates whether the messenger created will self destruct when idle
-     * @throws java.io.IOException if an io error occurs
-     */
-    TcpMessenger(EndpointAddress destaddr, TcpTransport tcpTransport, boolean selfDestruct) throws IOException {
-        // We need self destruction: tcp messengers are expensive to make and they refer to
-        // a connection that must eventually be closed.
-        super(tcpTransport.group.getPeerGroupID(), destaddr, selfDestruct);
-        this.origAddress = destaddr;
-
-        initiator = true;
-        this.tcpTransport = tcpTransport;
-
-        this.fullDstAddress = destaddr;
-        this.dstAddress = new EndpointAddress(destaddr, null, null);
-
-        this.srcAddress = tcpTransport.getPublicAddress();
-
-        srcAddressElement = new StringMessageElement(EndpointServiceImpl.MESSAGE_SOURCE_NAME, srcAddress.toString(), null);
-
-        String protoAddr = destaddr.getProtocolAddress();
-        int portIndex = protoAddr.lastIndexOf(":");
-
-        if (portIndex == -1) {
-            throw new IllegalArgumentException("Invalid Protocol Address (port # missing) ");
-        }
-
-        String portString = protoAddr.substring(portIndex + 1);
-        try {
-            port = Integer.valueOf(portString);
-        } catch (NumberFormatException caught) {
-            throw new IllegalArgumentException("Invalid Protocol Address (port # invalid): " + portString);
-        }
-
-        // Check for bad port number.
-        if ((port <= 0) || (port > 65535)) {
-            throw new IllegalArgumentException("Invalid port number in Protocol Address : " + port);
-        }
-
-        String hostString = protoAddr.substring(0, portIndex);
-
-        inetAddress = InetAddress.getByName(hostString);
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Creating new TCP Connection to : " + dstAddress + " / " + inetAddress.getHostAddress() + ":" + port);
-        }
-
-        // See if we're attempting to use the loopback address.
-        // And if so, is the peer configured for the loopback network only?
-        // (otherwise the connection is not permitted). Btw, the otherway around
-        // is just as wrong, so we check both at once and pretend it cannot work,
-        // even if it might have.
-        // FIXME 20041130 This is not an appropriate check if the other peer is
-        // running on the same machine and the InetAddress.getByName returns the
-        // loopback address.
-        // if (inetAddress.isLoopbackAddress() != tcpTransport.usingInterface.isLoopbackAddress()) {
-        // throw new IOException("Network unreachable--connect to loopback attempted.");
-        // }
-
-        try {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Connecting to " + inetAddress.getHostAddress() + ":" + port + " via "
-                        + this.tcpTransport.usingInterface.getHostAddress() + ":0");
-            }
-
-            socketChannel = SocketChannel.open();
-            Socket socket = socketChannel.socket();
-
-            // Bind it to our outbound interface.
-            SocketAddress bindAddress = new InetSocketAddress(this.tcpTransport.usingInterface, 0);
-
-            socket.bind(bindAddress);
-            // Set Socket options.
-            int useBufferSize = Math.max(TcpTransport.SendBufferSize, socket.getSendBufferSize());
-            socket.setSendBufferSize(useBufferSize);
-
-            useBufferSize = Math.max(TcpTransport.RecvBufferSize, socket.getReceiveBufferSize());
-            socket.setReceiveBufferSize(useBufferSize);
-
-            socket.setKeepAlive(true);
-            socket.setSoTimeout(TcpTransport.connectionTimeOut);
-            socket.setSoLinger(true, TcpTransport.LingerDelay);
-            // Disable Nagle's algorithm (We do this to reduce latency)
-            socket.setTcpNoDelay(true);
-
-            SocketAddress connectAddress = new InetSocketAddress(inetAddress, port);
-            socketChannel.connect(connectAddress);
-
-            startMessenger();
-        } catch (IOException io) {
-            if (TransportMeterBuildSettings.TRANSPORT_METERING) {
-                transportBindingMeter = this.tcpTransport.getUnicastTransportBindingMeter(null, dstAddress);
-
-                if (transportBindingMeter != null) {
-                    transportBindingMeter.connectionFailed(initiator, TimeUtils.timeNow() - createdAt);
-                }
-            }
-            // If we failed for any reason, make sure the socket is closed. This is the only place it is known.
-            if (socketChannel != null) {
-                socketChannel.close();
-            }
-            throw io;
-        }
-
-        if (TransportMeterBuildSettings.TRANSPORT_METERING) {
-            transportBindingMeter = this.tcpTransport.getUnicastTransportBindingMeter((PeerID) getDestinationPeerID(), dstAddress);
-            if (transportBindingMeter != null) {
-                transportBindingMeter.connectionEstablished(initiator, TimeUtils.timeNow() - createdAt);
-            }
-            // TODO: We need to add the bytes from the Welcome Messages to the transportBindingMeter, iam@jxta.org
-        }
-
-        if (!isConnected()) {
-            throw new IOException("Failed to establish connection to " + dstAddress);
-        }
-    }
-
-    /**
-     * The cost of just having a finalize routine is high. The finalizer is
-     * a bottleneck and can delay garbage collection all the way to heap
-     * exhaustion. Leave this comment as a reminder to future maintainers.
-     * Below is the reason why finalize is not needed here.
-     * <p/>
-     * These messengers are never given to application layers. Endpoint code
-     * always calls close when needed.
-     * <p/>
-     * There used to be an incoming special case in order to *prevent*
-     * closure because the inherited finalize used to call close. This is
-     * no-longer the case. For the outgoing case, we do not need to call close
-     * for the reason explained above.
-     */
-    protected void finalize() throws Throwable {
-        closeImpl();
-        super.finalize();
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Now everyone knows its closed and the connection can no-longer be
-     * obtained. So, we can go about our business of closing it.
-     * It can happen that a redundant close() is done but it does not matter.
-     * close() is idempotent.
-     */
-    public synchronized void closeImpl() {
-        super.close();
-
-        if (closed) {
-            return;
-        }
-
-        closed = true;
-
-        // we are idle now. Way idle.
-        setLastUsed(0);
-        if (socketChannel != null) {
-            // unregister from selector.
-            tcpTransport.unregister(socketChannel);
-            try {
-                socketChannel.close();
-            } catch (IOException e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failed to close messenger " + toString(), e);
-                }
-            }
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info((closingDueToFailure ? "Failure" : "Normal") + " close (open "
-                        + TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), createdAt) + "ms) of socket to : " + dstAddress + " / "
-                        + inetAddress.getHostAddress() + ":" + port);
-                if (closingDueToFailure && Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.log(Level.FINE, "stack trace", new Throwable("stack trace"));
-                }
-            }
-        }
-
-        if (TransportMeterBuildSettings.TRANSPORT_METERING && (transportBindingMeter != null)) {
-            if (closingDueToFailure) {
-                transportBindingMeter.connectionDropped(initiator, TimeUtils.timeNow() - createdAt);
-            } else {
-                transportBindingMeter.connectionClosed(initiator, TimeUtils.timeNow() - createdAt);
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isClosed() {
-        // FIXME - jice 20040413: Warning. this is overloading the standard
-        // isClosed(). Things were arranged so that it
-        // should still work, but it's a stretch. Transports should get a deeper
-        // retrofit eventually.
-        if (isConnected()) {
-            return false;
-        }
-
-        // Ah, this connection is broken. So, we weren't closed, but now
-        // we are. That could happen redundantly since two threads could
-        // find that holdIt.isConnected() is false before one of them
-        // first zeroes conn. But it does not matter. super.close() is
-        // idempotent (and does pretty much nothing in our case, anyway).
-        super.close();
-        return true;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Since we probe the connection status, we'll keep a messenger as long
-     * as the connection is active, even if only on the incoming side.
-     * So we're being a bit nice to the other side. Anyway, incoming
-     * connections do not go away when the messenger does. There's a receive
-     * timeout for that.
-     */
-    public boolean isIdleImpl() {
-        return (TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), getLastUsed()) > 15 * TimeUtils.AMINUTE);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public EndpointAddress getLogicalDestinationImpl() {
-        // FIXME 20070127 bondolo THIS IS BEING CALLED BEFORE IT IS INITED.
-        return logicalDestAddress;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void  sendMessageBImpl(Message message, String service, String serviceParam) throws IOException {
-        sendMessageDirect(message, service, serviceParam, false);
-    }
-
-    public void sendMessageDirect(Message message, String service, String serviceParam, boolean direct) throws IOException {
-        if (isClosed()) {
-            IOException failure = new IOException("Messenger was closed, it cannot be used to send messages.");
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, failure.getMessage(), failure);
-            }
-            throw failure;
-        }
-
-        // Set the message with the appropriate src and dest address
-        message.replaceMessageElement(EndpointServiceImpl.MESSAGE_SOURCE_NS, srcAddressElement);
-        EndpointAddress destAddressToUse;
-        if (direct) {
-            destAddressToUse = origAddress;
-        } else {
-            destAddressToUse = getDestAddressToUse(service, serviceParam);
-        }
-
-        MessageElement dstAddressElement = new StringMessageElement(EndpointServiceImpl.MESSAGE_DESTINATION_NAME, destAddressToUse.toString(), null);
-        message.replaceMessageElement(EndpointServiceImpl.MESSAGE_DESTINATION_NS, dstAddressElement);
-
-        // send it
-        try {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Sending " + message + " to " + destAddressToUse + " on connection " + getDestinationAddress());
-            }
-            xmitMessage(message);
-        } catch (IOException caught) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Message send failed for " + message, caught);
-            }
-            closeImpl();
-            throw caught;
-        }
-    }
-
-    private void startMessenger() throws IOException {
-        socketChannel.configureBlocking(true);
-
-        // Send the welcome message
-        WelcomeMessage myWelcome = new WelcomeMessage(fullDstAddress,
-                                                      tcpTransport.getPublicAddress(),
-                                                      tcpTransport.group.getPeerID(), false);
-        long written = write(new ByteBuffer[]{myWelcome.getByteBuffer()});
-        tcpTransport.incrementBytesSent(written);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("welcome message sent");
-        }
-        while (state.get() == readState.WELCOME) {
-            if (TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), this.createdAt) > (TcpTransport.connectionTimeOut)) {
-                throw new SocketTimeoutException("Failed to receive remote welcome message before timeout.");
-            }
-            read();
-            processBuffer();
-        }
-        if (!closed) {
-            socketChannel.configureBlocking(false);
-            tcpTransport.register(socketChannel, this);
-        }
-    }
-
-    /**
-     * Send message to the remote peer.
-     *
-     * @param msg the message to send.
-     * @throws java.io.IOException For errors sending the message.
-     */
-    private void xmitMessage(Message msg) throws IOException {
-
-        if (closed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Connection was closed to : " + dstAddress);
-            }
-            throw new IOException("Connection was closed to : " + dstAddress);
-        }
-
-        long sendBeginTime = TimeUtils.timeNow();
-        long size = 0;
-
-        try {
-            // todo 20020730 bondolo@jxta.org Do something with content-coding here
-            // serialize the message.
-            WireFormatMessage serialed = WireFormatMessageFactory.toWire(msg, WireFormatMessageFactory.DEFAULT_WIRE_MIME, null);
-
-            // Build the package header
-            MessagePackageHeader header = new MessagePackageHeader();
-
-            header.setContentTypeHeader(serialed.getMimeType());
-            size = serialed.getByteLength();
-            header.setContentLengthHeader(size);
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Sending " + msg + " (" + size + ") to " + dstAddress + " via " + inetAddress.getHostAddress() + ":"+ port);
-            }
-
-            List<ByteBuffer> partBuffers = new ArrayList<ByteBuffer>();
-
-            partBuffers.add(header.getByteBuffer());
-            partBuffers.addAll(Arrays.asList(serialed.getByteBuffers()));
-
-            long written;
-            writeLock.lock();
-            try {
-                written = write(partBuffers.toArray(new ByteBuffer[partBuffers.size()]));
-            } finally {
-                writeLock.unlock();
-            }
-
-            if (TransportMeterBuildSettings.TRANSPORT_METERING && (transportBindingMeter != null)) {
-                transportBindingMeter.messageSent(initiator, msg, TimeUtils.timeNow() - sendBeginTime, written);
-            }
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(MessageFormat.format("Sent {0} bytes {1} successfully via {2}:{3}", written, msg,
-                        inetAddress.getHostAddress(), port));
-            }
-
-            tcpTransport.incrementBytesSent(written);
-            tcpTransport.incrementMessagesSent();
-            setLastUsed(TimeUtils.timeNow());
-        } catch (SocketTimeoutException failed) {
-            SocketTimeoutException failure = new SocketTimeoutException("Failed sending " + msg + " to : " + inetAddress.getHostAddress() + ":" + port);
-            failure.initCause(failed);
-            throw failure;
-        } catch (IOException failed) {
-            if (TransportMeterBuildSettings.TRANSPORT_METERING && (transportBindingMeter != null)) {
-                transportBindingMeter.sendFailure(initiator, msg, TimeUtils.timeNow() - sendBeginTime, size);
-            }
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Message send failed for " + inetAddress.getHostAddress() + ":" + port, failed);
-            }
-            closingDueToFailure = true;
-            close();
-            IOException failure = new IOException("Failed sending " + msg + " to : " + inetAddress.getHostAddress() + ":" + port);
-
-            failure.initCause(failed);
-            throw failure;
-        }
-    }
-
-    /**
-     * Blocking write of byte buffers to the socket channel.
-     *
-     * @param byteBuffers The bytes to write.
-     * @return The number of bytes written.
-     * @throws IOException Thrown for errors while writing message.
-     */
-    private long write(final ByteBuffer[] byteBuffers) throws IOException {
-
-        // Determine how many bytes there are to be written in the buffers.
-        long bytesToWrite = 0;
-        for (ByteBuffer byteBuffer : byteBuffers) {
-            bytesToWrite += byteBuffer.remaining();
-        }
-
-        if (bytesToWrite == 0L) {
-            return 0L;
-        }
-
-        long bytesWritten = 0;
-        Selector writeSelector = null;
-        SelectionKey wKey = null;
-        int attempts = 1;
-        try {
-            do {
-                long wroteBytes;
-                // Write from the buffers until we write nothing.
-                do {
-                    wroteBytes = socketChannel.write(byteBuffers);
-                    bytesWritten += wroteBytes;
-                    if (wroteBytes < 0) {
-                        throw new EOFException();
-                    }
-                    if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                        LOG.finer(MessageFormat.format("Wrote {0} bytes", wroteBytes));
-                    }
-                } while (wroteBytes != 0);
-
-                // Are we done?
-                if (bytesWritten == bytesToWrite) {
-                    break;
-                }
-                // This attempt failed, we may try again.
-                attempts++;
-                if (attempts > MAX_WRITE_ATTEMPTS) {
-                    throw new IOException(MessageFormat.format("Max write attempts ({0}) exceeded ({1})", attempts, MAX_WRITE_ATTEMPTS));
-                }
-
-                // Get a write selector, we're going to do some waiting.
-                if (writeSelector == null) {
-                    try {
-                        writeSelector = tcpTransport.getSelector();
-                    } catch (InterruptedException woken) {
-                        InterruptedIOException incompleteIO = new InterruptedIOException("Interrupted while acquiring write selector.");
-                        incompleteIO.initCause(woken);
-                        incompleteIO.bytesTransferred = (int) Math.min(bytesWritten, Integer.MAX_VALUE);
-                        throw incompleteIO;
-                    }
-                    if (writeSelector == null) {
-                        continue;
-                    }
-                    wKey = socketChannel.register(writeSelector, SelectionKey.OP_WRITE);
-                }
-
-                // Wait until we are told we can write again.
-                int ready = writeSelector.select(TcpTransport.connectionTimeOut);
-
-                if (ready == 0) {
-                    throw new SocketTimeoutException("Timeout during socket write");
-                } else {
-                    attempts--;
-                }
-            } while (attempts <= MAX_WRITE_ATTEMPTS);
-        } finally {
-            // cancel the key before returning selector to the pool.
-            if (wKey != null) {
-                wKey.cancel();
-                wKey = null;
-            }
-
-            // put the selector back in the pool
-            if (writeSelector != null) {
-                // clean up the selector
-                writeSelector.selectNow();
-                tcpTransport.returnSelector(writeSelector);
-            }
-        }
-        return bytesWritten;
-    }
-
-    /**
-     * parses a welcome from a buffer
-     *
-     * @param buffer the buffer to parse, if successful the state is set to HEADER
-     * @return true if successfully parsed
-     */
-    private boolean processWelcome(ByteBuffer buffer) {
-        try {
-            if (itsWelcome == null) {
-                itsWelcome = new WelcomeMessage();
-            }
-
-            if (!itsWelcome.read(buffer)) {
-                return false;
-            }
-
-            // The correct value for dstAddr: that of the other party.
-            dstAddress = itsWelcome.getPublicAddress();
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Creating a logical address from : " + itsWelcome.getWelcomeString());
-            }
-            EndpointRegistry.getInstance().add(itsWelcome.getPeerID().toString(), socketChannel.socket().getInetAddress());
-            fullDstAddress = dstAddress;
-            logicalDestAddress = new EndpointAddress("jxta", itsWelcome.getPeerID().getUniqueValue().toString(), null, null);
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Hello from " + itsWelcome.getPublicAddress() + " [" + itsWelcome.getPeerID() + "] ");
-            }
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Registering Messenger from " + socketChannel.socket().getInetAddress().getHostAddress() + ":"+ socketChannel.socket().getPort());
-            }
-
-            try {
-                // announce this messenger by connection address
-                tcpTransport.messengerReadyEvent(this, getConnectionAddress());
-            } catch (Throwable all) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Uncaught Throwable in thread :" + Thread.currentThread().getName(), all);
-                }
-                IOException failure = new IOException("Failure announcing messenger.");
-
-                failure.initCause(all);
-                throw failure;
-            }
-        } catch (IOException e) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Error while parsing the welcome message", e);
-            }
-            closeImpl();
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * parses a header from a buffer
-     *
-     * @param buffer the buffer to parse, if successful the state is set to BODY
-     * @return true if successfully parsed
-     */
-    private boolean processHeader(ByteBuffer buffer) {
-
-        if (null == header) {
-            header = new MessagePackageHeader();
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine(MessageFormat.format("{0} Processing message package header, buffer stats:{1}", Thread.currentThread(), buffer.toString()));
-        }
-        try {
-            if (!header.readHeader(buffer)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine(MessageFormat.format("{0} maintaining current state at header, buffer stats :{1}", Thread.currentThread(), buffer.toString()));
-                }
-                return false;
-            }
-        } catch (IOException e) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Error while parsing the message header", e);
-            }
-            if (!socketChannel.isConnected()) {
-                // defunct connection close the messenger
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("SocketChannel closed. Closing the messenger");
-                }
-                closeImpl();
-            }
-        }
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine(MessageFormat.format("{0} setting current state to body, Buffer stats :{1}, remaining elements {2}:",
-                            Thread.currentThread(), buffer.toString(), buffer.remaining()));
-        }
-        return true;
-    }
-
-    private Message processMessage(ByteBuffer buffer, MessagePackageHeader header) throws IOException {
-        // TODO 20020730 bondolo@jxta.org Do something with content-coding here.
-        MimeMediaType msgMime = header.getContentTypeHeader();
-
-        return WireFormatMessageFactory.fromBuffer(buffer, msgMime, null);
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * This is what gets run by the Executor. It reads whatever is available,
-     * processes it and then goes back to the selector waiting for more IO
-     */
-    public void run() {
-        try {
-            while (read()) {
-                List<Message> msgs = processBuffer();
-                for (Message msg : msgs) {
-                    // Use the group's threadpool to process the message
-                    tcpTransport.executor.execute(new MessageProcessor(msg));
-                }
-            }
-
-            // resets the interestOPS and wakeup the selector
-            if (socketChannel != null) {
-                tcpTransport.register(socketChannel, this);
-            }
-
-        } catch (Throwable all) {
-            if (Logging.SHOW_SEVERE) {
-                LOG.log(Level.SEVERE, "Uncaught Throwable", all);
-            }
-        }
-    }
-
-    /**
-     * @return true to indicate read maybe required
-     */
-    private boolean read() {
-        if (closed || socketChannel == null) {
-            return false;
-        }
-        if (!socketChannel.isConnected()) {
-            closeImpl();
-            return false;
-        }
-
-        try {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(MessageFormat.format("{0} State before read(): {1}, buffer stats : {2}, remaining :{3}",
-                                Thread.currentThread(), state.get(), buffer.toString(), buffer.remaining()));
-            }
-
-            int read = socketChannel.read(buffer);
-            if (read < 0) {
-                if (!socketChannel.isConnected() || read < 0) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine(MessageFormat.format("{0} Closing due to EOF", Thread.currentThread()));
-                    }
-                    closeImpl();
-                }
-                return false;
-            } else if (read == 0) {
-                return false;
-            }
-
-            tcpTransport.incrementBytesReceived(read);
-            // prepare the buffer for reading
-            buffer.flip();
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(MessageFormat.format("{0} SocketChannel.read() == {1} bytes. Buffer stats:{2}, remaining {3}",
-                                Thread.currentThread(), read, buffer.toString(), buffer.remaining()));
-            }
-            return true;
-        } catch (ClosedChannelException e) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Channel closed while reading data", e);
-            }
-            closeImpl();
-            return false;
-        } catch (InterruptedIOException woken) {
-            // Framing is maintained within this object, therefore a read maybe interrupted then resumed
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning(MessageFormat.format("tcp receive - interrupted : read() {0} {1}:{2}", woken.bytesTransferred,
-                                inetAddress.getHostAddress(), port));
-            }
-        } catch (IOException ioe) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "IOException occured while reading data", ioe);
-            }
-            closeImpl();
-            return false;
-        } catch (Throwable e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, MessageFormat.format("tcp receive - Error on connection {0}:{1}", inetAddress.getHostAddress(), port), e);
-            }
-            closingDueToFailure = true;
-            closeImpl();
-            return false;
-        }
-        // if the channel has a valid read ops return true, otherwise false
-        return (socketChannel.validOps() & SelectionKey.OP_READ) == SelectionKey.OP_READ;
-    }
-
-    /**
-     * processes the input byte buffer
-     * @return the list of messages present in the buffer
-     */
-    @SuppressWarnings("fallthrough")
-    public List<Message> processBuffer() {
-        
-        List<Message> msgs = new ArrayList<Message>();
-        boolean done = false;
-
-        while (!done) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(MessageFormat.format("{0} processBuffer({1}). Buffer stats:{2}, elements remaining {3}",
-                                Thread.currentThread(), state.getClass(), buffer.toString(), buffer.remaining()));
-            }
-
-            switch (state.get()) {
-                case WELCOME:
-                    // Parse Welcome message
-                    boolean wseen = processWelcome(buffer);
-
-                    if (wseen) {
-                        state.set(readState.HEADER);
-                    }
-                    done = true;
-                    break;
-
-                case HEADER:
-                    // process the message header
-                    boolean hseen = processHeader(buffer);
-
-                    if (!hseen) {
-                        done = true;
-                        break;
-                    }
-
-                    receiveBeginTime = TimeUtils.timeNow();
-                    // todo add a check for MTU size
-                    if (header.getContentLengthHeader() > buffer.capacity()) {
-                        ByteBuffer src = buffer;
-
-                        // create an array backed buffer
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine(MessageFormat.format("{0} Reallocating a new buffer of size {1} to replace :{2}",
-                                            Thread.currentThread(), header.getContentLengthHeader(), buffer.toString()));
-                        }
-
-                        // This implementation limits the message size to the MTU which is always < 2GB
-                        buffer = ByteBuffer.allocate((int) header.getContentLengthHeader());
-                        buffer.put(src);
-                        buffer.flip();
-                    }
-                    state.set(readState.BODY);
-                    /* FALLSTHROUGH */
-
-                case BODY:
-                    // process the message body
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine(MessageFormat.format(" {0} Proccessing Message Body. expecting {1}, {2} elements remaining {3}",
-                                        Thread.currentThread(), header.getContentLengthHeader(), buffer.toString(), buffer.remaining()));
-                    }
-                    if (buffer.remaining() >= (int) header.getContentLengthHeader()) {
-                        Message msg;
-                        try {
-                            msg = processMessage(buffer, header);
-                        } catch (IOException io) {
-                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                LOG.log(Level.FINE, "Failed to parse a message from buffer. closing connection", io);
-                            }
-                            closeImpl();
-                            done = true;
-                            break;
-                        }
-
-                        if (TransportMeterBuildSettings.TRANSPORT_METERING && (transportBindingMeter != null)) {
-                            transportBindingMeter.messageReceived(initiator, msg, TimeUtils.timeNow() - receiveBeginTime,
-                                    header.getContentLengthHeader());
-                        }
-
-                        tcpTransport.incrementMessagesReceived();
-                        setLastUsed(TimeUtils.timeNow());
-                        state.set(readState.HEADER);
-                        header = null;
-                        
-                        msgs.add(msg);
-                    } else {
-                        done = true;
-                        break;
-                    }
-            }
-        } // while loop
-        
-        // prepare the buffer for more data
-        buffer.compact();
-        return msgs;
-    }
-    
-    /**
-     * A small class for processing individual messages. 
-     */ 
-    private class MessageProcessor implements Runnable {
-
-        private Message msg;
-        MessageProcessor(Message msg) {
-            this.msg = msg;
-        }
-        public void run() {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(MessageFormat.format("{0} calling EndpointService.demux({1})",
-                        Thread.currentThread(),
-                        msg, inetAddress.getHostAddress(), port));
-            }
-            tcpTransport.endpoint.demux(msg);
-        }
-    }
-
-    /**
-     * return the current connection status.
-     *
-     * @return true if there is an active connection to the remote peer, otherwise false.
-     */
-    private boolean isConnected() {
-        return !closed;
-    }
-
-    /**
-     * Return the absolute time in milliseconds at which this Connection was last used.
-     *
-     * @return absolute time in milliseconds.
-     */
-    private long getLastUsed() {
-        return lastUsed;
-    }
-
-    /**
-     * Set the last used time for this connection in absolute milliseconds.
-     *
-     * @param time absolute time in milliseconds.
-     */
-    private void setLastUsed(long time) {
-        lastUsed = time;
-    }
-
-    /**
-     * Returns the metering object for this tcpTransport
-     *
-     * @return the metering object for this tcpTransport
-     */
-    TransportBindingMeter getTransportBindingMeter() {
-        return transportBindingMeter;
-    }
-
-    /**
-     * Returns the remote address
-     *
-     * @return the remote address
-     */
-    private EndpointAddress getConnectionAddress() {
-        // Somewhat confusing but destinationAddress is the name of that thing
-        // for the welcome message.
-        return itsWelcome.getDestinationAddress();
-    }
-
-    /**
-     * Returns Remote PeerID
-     *
-     * @return Remote PeerID
-     */
-    private ID getDestinationPeerID() {
-        return itsWelcome.getPeerID();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tcp/TcpTransport.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tcp/TcpTransport.java
deleted file mode 100644 (file)
index ead443f..0000000
+++ /dev/null
@@ -1,1236 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.endpoint.tcp;
-
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.UnknownHostException;
-import java.nio.channels.CancelledKeyException;
-import java.nio.channels.ClosedChannelException;
-import java.nio.channels.ClosedSelectorException;
-import java.nio.channels.IllegalBlockingModeException;
-import java.nio.channels.SelectionKey;
-import java.nio.channels.Selector;
-import java.nio.channels.SocketChannel;
-import java.nio.channels.spi.SelectorProvider;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.EmptyStackException;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.Set;
-import java.util.Stack;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.Executor;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Attribute;
-import net.jxta.document.XMLElement;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.MessageReceiver;
-import net.jxta.endpoint.MessageSender;
-import net.jxta.endpoint.Messenger;
-import net.jxta.endpoint.MessengerEvent;
-import net.jxta.endpoint.MessengerEventListener;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.id.ID;
-import net.jxta.logging.Logging;
-import net.jxta.meter.MonitorResources;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.platform.Module;
-import net.jxta.protocol.ConfigParams;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.protocol.TransportAdvertisement;
-
-import net.jxta.impl.endpoint.IPUtils;
-import net.jxta.impl.endpoint.LoopbackMessenger;
-import net.jxta.impl.endpoint.transportMeter.TransportBindingMeter;
-import net.jxta.impl.endpoint.transportMeter.TransportMeter;
-import net.jxta.impl.endpoint.transportMeter.TransportMeterBuildSettings;
-import net.jxta.impl.endpoint.transportMeter.TransportServiceMonitor;
-import net.jxta.impl.meter.MonitorManager;
-import net.jxta.impl.peergroup.StdPeerGroup;
-import net.jxta.impl.protocol.TCPAdv;
-import net.jxta.impl.util.TimeUtils;
-
-
-/**
- * This class implements the TCP Message Transport.
- *
- * @see net.jxta.endpoint.MessageTransport
- * @see net.jxta.endpoint.MessagePropagater
- * @see net.jxta.endpoint.MessageReceiver
- * @see net.jxta.endpoint.MessageSender
- * @see net.jxta.endpoint.EndpointService
- * @see <a href="http://spec.jxta.org/v1.0/docbook/JXTAProtocols.html#trans-tcpipt">JXTA Protocols Specification : Standard JXTA Transport Bindings</a>
- */
-public class TcpTransport implements Module, MessageSender, MessageReceiver {
-
-    /**
-     * Logger
-     */
-    private static final Logger LOG = Logger.getLogger(TcpTransport.class.getName());
-
-    /**
-     * The TCP send buffer size.
-     * The size of the buffer used to store outgoing messages
-     * This should be set to the maximum message size (smaller is allowed).
-     */
-    static final int SendBufferSize = 64 * 1024; // 64 KBytes
-
-    /**
-     * The TCP receive buffer size
-     */
-    static final int RecvBufferSize = 64 * 1024; // 64 KBytes
-
-    /**
-     * The amount of time the socket "lingers" after we close it locally.
-     * Linger enables the remote socket to finish receiving any pending data
-     * at its own rate.
-     * Note: LingerDelay time unit is seconds
-     */
-    static final int LingerDelay = 2 * 60;
-
-    /**
-     * Connection  timeout
-     * use the same system property defined by URLconnection, otherwise default to 10 seconds.
-     */
-    static int connectionTimeOut = 10 * (int) TimeUtils.ASECOND;
-
-    // Java's default is 50
-    static final int MaxAcceptCnxBacklog = 50;
-
-    private String serverName = null;
-    private final List<EndpointAddress> publicAddresses = new ArrayList<EndpointAddress>();
-    private EndpointAddress publicAddress = null;
-
-    private String interfaceAddressStr;
-    InetAddress usingInterface;
-    private int serverSocketPort;
-    private int restrictionPort = -1;
-    private IncomingUnicastServer unicastServer = null;
-
-    private boolean isClosed = false;
-
-    private long messagesSent = 0;
-    private long messagesReceived = 0;
-    private long bytesSent = 0;
-    private long bytesReceived = 0;
-    private long connectionsAccepted = 0;
-
-    PeerGroup group = null;
-    EndpointService endpoint = null;
-    Executor executor;
-
-    private String protocolName = "tcp";
-    private TransportMeter unicastTransportMeter;
-    private TransportMeter multicastTransportMeter;
-
-    private boolean publicAddressOnly = false;
-
-    private MessengerEventListener messengerEventListener = null;
-
-    private Thread messengerSelectorThread;
-    Selector messengerSelector = null;
-
-    private final Map<TcpMessenger, SocketChannel> regisMap = new ConcurrentHashMap<TcpMessenger, SocketChannel>();
-    private final Set<SocketChannel> unregisMap = Collections.synchronizedSet(new HashSet<SocketChannel>());
-
-    /**
-     * This is the thread group into which we will place all of the threads
-     * we create. THIS HAS NO EFFECT ON SCHEDULING. Java thread groups are
-     * only for organization and naming.
-     */
-    ThreadGroup myThreadGroup = null;
-
-    /**
-     * The maximum number of write selectors we will maintain in our cache per
-     * transport instance.
-     */
-    protected final static int MAX_WRITE_SELECTORS = 50;
-
-    /**
-     * A cache we maintain for selectors writing messages to the socket.
-     */
-    private final static Stack<Selector> writeSelectorCache = new Stack<Selector>();
-
-    /**
-     * The number of excess write selectors believed to be in the pool.
-     */
-    private int extraWriteSelectors = 0;
-
-    /**
-     * Construct a new TcpTransport instance
-     */
-    public TcpTransport() {
-        // Add some selectors to the pool.
-        try {
-            for (int i = 0; i < MAX_WRITE_SELECTORS; i++) {
-                writeSelectorCache.add(Selector.open());
-            }
-        } catch (IOException ex) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("Failed adding selector to  write selector pool");
-            }
-        }
-
-        try {
-            String connectTOStr = System.getProperty("sun.net.client.defaultConnectTimeout");
-
-            if (connectTOStr != null) {
-                connectionTimeOut = Integer.parseInt(connectTOStr);
-            }
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Could not parse system property: sun.net.client.defaultConnectTimeout");
-            }
-        }
-    }
-
-    /**
-     * Gets the number of 'connectionsAccepted'.
-     *
-     * @return the number of 'connectionsAccepted'.
-     */
-    public long getConnectionsAccepted() {
-        return connectionsAccepted;
-    }
-
-    /**
-     * increment the number of connectionsAccepted sent by 1
-     */
-    public void incrementConnectionsAccepted() {
-        connectionsAccepted++;
-    }
-
-    /**
-     * increment the number of messages sent by 1
-     */
-    public void incrementMessagesSent() {
-        messagesSent++;
-    }
-
-    /**
-     * increment the number of messages received by 1
-     */
-    public void incrementMessagesReceived() {
-        messagesReceived++;
-    }
-
-    /**
-     * increment the number of bytes sent
-     *
-     * @param bytes the number of bytes to be added
-     */
-    public void incrementBytesSent(long bytes) {
-        bytesSent += bytes;
-    }
-
-    /**
-     * increment the number of bytes received
-     *
-     * @param bytes the number of bytes to be added
-     */
-    public void incrementBytesReceived(long bytes) {
-        bytesReceived += bytes;
-    }
-
-    /**
-     * Gets the number of 'messagesSent'.
-     *
-     * @return the number of 'messagesSent'.
-     */
-    public long getMessagesSent() {
-        return messagesSent;
-    }
-
-    /**
-     * Gets the number of 'messagesReceived'.
-     *
-     * @return the number of 'messagesReceived'.
-     */
-    public long getMessagesReceived() {
-        return messagesReceived;
-    }
-
-    /**
-     * Gets the number of 'bytesSent'.
-     *
-     * @return the number of 'bytesSent'.
-     */
-    public long getBytesSent() {
-        return bytesSent;
-    }
-
-    /**
-     * Gets the number of 'bytesReceived'.
-     *
-     * @return the number of 'bytesReceived'.
-     */
-    public long getBytesReceived() {
-        return bytesReceived;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        }
-
-        if (null == target) {
-            return false;
-        }
-
-        if (target instanceof TcpTransport) {
-            TcpTransport likeMe = (TcpTransport) target;
-
-            if (!getProtocolName().equals(likeMe.getProtocolName())) {
-                return false;
-            }
-
-            Iterator<EndpointAddress> itsAddrs = likeMe.publicAddresses.iterator();
-
-            for (EndpointAddress publicAddress1 : publicAddresses) {
-                if (!itsAddrs.hasNext()) {
-                    return false;
-                } // it has fewer than i do.
-
-                EndpointAddress mine = publicAddress1;
-                EndpointAddress its = itsAddrs.next();
-
-                if (!mine.equals(its)) {
-                    // content didnt match
-                    return false;
-                }
-            }
-            // ran out at the same time?
-            return (!itsAddrs.hasNext());
-        }
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public int hashCode() {
-        return getPublicAddress().hashCode();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void init(PeerGroup group, ID assignedID, Advertisement impl) throws PeerGroupException {
-
-        this.group = group;
-        ModuleImplAdvertisement implAdvertisement = (ModuleImplAdvertisement) impl;
-
-        this.executor = ((StdPeerGroup) group).getExecutor();
-
-        ConfigParams configAdv = group.getConfigAdvertisement();
-
-        // Get out invariable parameters from the implAdv
-        XMLElement param = (XMLElement) implAdvertisement.getParam();
-
-        if (param != null) {
-            Enumeration<XMLElement> list = param.getChildren("Proto");
-
-            if (list.hasMoreElements()) {
-                XMLElement pname = list.nextElement();
-                protocolName = pname.getTextValue();
-            }
-        }
-
-        // Get our peer-defined parameters in the configAdv
-        param = (XMLElement) configAdv.getServiceParam(assignedID);
-        if (null == param) {
-            throw new IllegalArgumentException(TransportAdvertisement.getAdvertisementType() + " could not be located.");
-        }
-
-        Enumeration<XMLElement> tcpChilds = param.getChildren(TransportAdvertisement.getAdvertisementType());
-
-        // get the TransportAdv
-        if (tcpChilds.hasMoreElements()) {
-            param = tcpChilds.nextElement();
-            Attribute typeAttr = param.getAttribute("type");
-
-            if (!TCPAdv.getAdvertisementType().equals(typeAttr.getValue())) {
-                throw new IllegalArgumentException("transport adv is not a " + TCPAdv.getAdvertisementType());
-            }
-
-            if (tcpChilds.hasMoreElements()) {
-                throw new IllegalArgumentException("Multiple transport advs detected for " + assignedID);
-            }
-        } else {
-            throw new IllegalArgumentException(TransportAdvertisement.getAdvertisementType() + " could not be located.");
-        }
-
-        Advertisement paramsAdv = null;
-
-        try {
-            paramsAdv = AdvertisementFactory.newAdvertisement(param);
-        } catch (NoSuchElementException notThere) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Could not find parameter document", notThere);
-            }
-        }
-
-        if (!(paramsAdv instanceof TCPAdv)) {
-            throw new IllegalArgumentException("Provided Advertisement was not a " + TCPAdv.getAdvertisementType());
-        }
-
-        TCPAdv adv = (TCPAdv) paramsAdv;
-
-        // determine the local interface to use. If the user specifies
-        // one, use that. Otherwise, use the all the available interfaces.
-        interfaceAddressStr = adv.getInterfaceAddress();
-        if (interfaceAddressStr != null) {
-            try {
-                usingInterface = InetAddress.getByName(interfaceAddressStr);
-            } catch (UnknownHostException failed) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Invalid address for local interface address, using default");
-                }
-                usingInterface = IPUtils.ANYADDRESS;
-            }
-        } else {
-            usingInterface = IPUtils.ANYADDRESS;
-        }
-
-        serverName = adv.getServer();
-
-        // Even when server is not enabled, we use the serverSocketPort as a 
-        // discriminant for the simulated network partitioning, human readable
-        // messages, and a few things of that sort.
-        serverSocketPort = adv.getPort();
-
-        // should we expose other than a public address if one was specified?
-        publicAddressOnly = adv.getPublicAddressOnly();
-
-        // Start the servers
-        if (adv.isServerEnabled()) {
-            try {
-                unicastServer = new IncomingUnicastServer(this, usingInterface, serverSocketPort, adv.getStartPort(), adv.getEndPort());
-            } catch (IOException failed) {
-                throw new PeerGroupException("Failed to open server socket.", failed);
-            }
-
-            InetSocketAddress boundAddress = unicastServer.getLocalSocketAddress();
-
-            // TODO bondolo 20040628 Save the port back as a preference to TCPAdv
-            /*
-            if(-1 != adv.getStartPort()) {
-                adv.setPort(boundAddress.getPort());
-            }
-            */
-
-            // Build the publicAddresses :
-            // first in the list is the "public server name". We don't try to
-            // resolve this since it might not be resolvable in the context we 
-            // are running in, we just assume it's good.
-            if (serverName != null) {
-                // use speced server name.
-                EndpointAddress newAddr = new EndpointAddress(protocolName, serverName, null, null);
-                publicAddresses.add(newAddr);
-            }
-
-            // then add the rest of the local interfaces as appropriate. Unless
-            // we find an non-loopback interface, we're in local only mode.
-            boolean localOnly = true;
-
-            if (usingInterface.equals(IPUtils.ANYADDRESS)) {
-                // its wildcarded
-                Iterator eachLocal = IPUtils.getAllLocalAddresses();
-                List<EndpointAddress> wildAddrs = new ArrayList<EndpointAddress>();
-
-                while (eachLocal.hasNext()) {
-                    InetAddress anAddress = (InetAddress) eachLocal.next();
-                    String hostAddress = IPUtils.getHostAddress(anAddress);
-                    EndpointAddress newAddr = new EndpointAddress(protocolName,
-                            hostAddress + ":" + Integer.toString(boundAddress.getPort()), null, null);
-
-                    // don't add it if its already in the list
-                    if (!anAddress.isLoopbackAddress()) {
-                        localOnly = false;
-                    }
-
-                    if (!publicAddresses.contains(newAddr)) {
-                        wildAddrs.add(newAddr);
-                    }
-                }
-
-                // we sort them so that later equals() will be deterministic.
-                // the result of IPUtils.getAllLocalAddresses() is not known to 
-                // be sorted.
-                Collections.sort(wildAddrs, new Comparator<EndpointAddress>() {
-                    public int compare(EndpointAddress one, EndpointAddress two) {
-                        return one.toString().compareTo(two.toString());
-                    }
-
-                    public boolean equals(Object that) {
-                        return (this == that);
-                    }
-                });
-
-                // Add public addresses:
-                // don't add them if we have a hand-set public address and the
-                // publicAddressOnly property is set.
-                if (!(serverName != null && publicAddressOnly)) {
-                    publicAddresses.addAll(wildAddrs);
-                }
-            } else {
-                // use specified interface
-                if (!usingInterface.isLoopbackAddress()) {
-                    localOnly = false;
-                }
-
-                String hostAddress = IPUtils.getHostAddress(usingInterface);
-                EndpointAddress newAddr = new EndpointAddress(protocolName,
-                        hostAddress + ":" + Integer.toString(boundAddress.getPort()), null, null);
-
-                // Add public address:
-                // don't add it if its already in the list
-                // don't add it if specified as public address and publicAddressOnly
-                if (!(serverName != null && publicAddressOnly)) {
-                    if (!publicAddresses.contains(newAddr)) {
-                        publicAddresses.add(newAddr);
-                    }
-                }
-            }
-
-            // If the only available interface is LOOPBACK, then make sure we 
-            // use only that (that includes resetting the outgoing/listening 
-            // interface from ANYADDRESS to LOOPBACK).
-
-            if (localOnly) {
-                usingInterface = IPUtils.LOOPBACK;
-                publicAddresses.clear();
-                String hostAddress = IPUtils.getHostAddress(usingInterface);
-                EndpointAddress pubAddr = new EndpointAddress(protocolName,
-                        hostAddress + ":" + Integer.toString(boundAddress.getPort()), null, null);
-
-                publicAddresses.add(pubAddr);
-            }
-
-            // Set the "preferred" public address. This is the address we will 
-            // use for identifying outgoing requests.
-            publicAddress = publicAddresses.get(0);
-        } else {
-            // Only the outgoing interface matters.
-            // Verify that ANY interface does not in fact mean LOOPBACK only. If
-            // that's the case, we want to make that explicit, so that 
-            // consistency checks regarding the allowed use of that interface
-            // work properly.
-            if (usingInterface.equals(IPUtils.ANYADDRESS)) {
-                boolean localOnly = true;
-                Iterator eachLocal = IPUtils.getAllLocalAddresses();
-
-                while (eachLocal.hasNext()) {
-                    InetAddress anAddress = (InetAddress) eachLocal.next();
-
-                    if (!anAddress.isLoopbackAddress()) {
-                        localOnly = false;
-                        break;
-                    }
-                }
-
-                if (localOnly) {
-                    usingInterface = IPUtils.LOOPBACK;
-                }
-            }
-
-            // The "public" address is just an internal label
-            // it is not usefull to anyone outside.
-            // IMPORTANT: we set the port to zero, to signify that this address
-            // is not realy usable.
-            String hostAddress = IPUtils.getHostAddress(usingInterface);
-
-            publicAddress = new EndpointAddress(protocolName, hostAddress + ":0", null, null);
-        }
-
-        // Tell tell the world about our configuration.
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring TCP Message Transport : " + assignedID);
-
-            if (implAdvertisement != null) {
-                configInfo.append("\n\tImplementation :");
-                configInfo.append("\n\t\tModule Spec ID: ").append(implAdvertisement.getModuleSpecID());
-                configInfo.append("\n\t\tImpl Description : ").append(implAdvertisement.getDescription());
-                configInfo.append("\n\t\tImpl URI : ").append(implAdvertisement.getUri());
-                configInfo.append("\n\t\tImpl Code : ").append(implAdvertisement.getCode());
-            }
-
-            configInfo.append("\n\tGroup Params:");
-            configInfo.append("\n\t\tGroup : ").append(group);
-            configInfo.append("\n\t\tPeer ID: ").append(group.getPeerID());
-
-            configInfo.append("\n\tConfiguration:");
-            configInfo.append("\n\t\tProtocol: ").append(protocolName);
-            configInfo.append("\n\t\tPublic address: ").append(serverName == null ? "(unspecified)" : serverName);
-            configInfo.append("\n\t\tInterface address: ").append(
-                    interfaceAddressStr == null ? "(unspecified)" : interfaceAddressStr);
-
-            configInfo.append("\n\tConfiguration :");
-            configInfo.append("\n\t\tUsing Interface: ").append(usingInterface.getHostAddress());
-
-            if (null != unicastServer) {
-                if (-1 == unicastServer.getStartPort()) {
-                    configInfo.append("\n\t\tUnicast Server Bind Addr: ").append(usingInterface.getHostAddress()).append(":").append(
-                            serverSocketPort);
-                } else {
-                    configInfo.append("\n\t\tUnicast Server Bind Addr: ").append(usingInterface.getHostAddress()).append(":").append(serverSocketPort).append(" [").append(unicastServer.getStartPort()).append("-").append(unicastServer.getEndPort()).append(
-                            "]");
-                }
-                configInfo.append("\n\t\tUnicast Server Bound Addr: ").append(unicastServer.getLocalSocketAddress());
-            } else {
-                configInfo.append("\n\t\tUnicast Server : disabled");
-            }
-
-            configInfo.append("\n\t\tPublic Addresses: ");
-            configInfo.append("\n\t\t\tDefault Endpoint Addr : ").append(publicAddress);
-
-            for (EndpointAddress anAddr : publicAddresses) {
-                configInfo.append("\n\t\t\tEndpoint Addr : ").append(anAddr);
-            }
-            LOG.config(configInfo.toString());
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized int startApp(String[] arg) {
-        endpoint = group.getEndpointService();
-
-        if (null == endpoint) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is an endpoint service");
-            }
-            return Module.START_AGAIN_STALLED;
-        }
-
-        try {
-            messengerSelector = SelectorProvider.provider().openSelector();
-        } catch (IOException e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Could not create a messenger selector", e);
-            }
-        }
-
-        messengerSelectorThread = new Thread(group.getHomeThreadGroup(), new MessengerSelectorThread(), "TCP Transport MessengerSelectorThread for " + this);
-        messengerSelectorThread.setDaemon(true);
-        messengerSelectorThread.start();
-
-        // We're fully ready to function.
-        messengerEventListener = endpoint.addMessageTransport(this);
-
-        if (messengerEventListener == null) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("Transport registration refused");
-            }
-            return -1;
-        }
-
-        // Cannot start before registration, we could be announcing new messengers while we
-        // do not exist yet ! (And get an NPE because we do not have the messenger listener set).
-
-        if (unicastServer != null) {
-            if (!unicastServer.start()) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.severe("Unable to start TCP Unicast Server");
-                }
-                return -1;
-            }
-        }
-
-        if (TransportMeterBuildSettings.TRANSPORT_METERING) {
-            TransportServiceMonitor transportServiceMonitor = (TransportServiceMonitor) MonitorManager.getServiceMonitor(group,
-                    MonitorResources.transportServiceMonitorClassID);
-
-            if (transportServiceMonitor != null) {
-                unicastTransportMeter = transportServiceMonitor.createTransportMeter("TCP", publicAddress);
-            }
-        }
-
-        isClosed = false;
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("TCP Message Transport started.");
-        }
-        return Module.START_OK;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized void stopApp() {
-        if (isClosed) {
-            return;
-        }
-
-        isClosed = true;
-
-        if (unicastServer != null) {
-            unicastServer.stop();
-            unicastServer = null;
-        }
-
-        Thread temp = messengerSelectorThread;
-
-        if (null != temp) {
-            temp.interrupt();
-            try {
-                messengerSelector.close();
-            } catch (IOException failed) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "IO error occured while closing server socket", failed);
-                }
-            }
-        }
-
-        // Inform the pool that we don't need as many write selectors.
-        synchronized (writeSelectorCache) {
-            extraWriteSelectors += MAX_WRITE_SELECTORS;
-        }
-
-        endpoint.removeMessageTransport(this);
-
-        endpoint = null;
-        group = null;
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info(MessageFormat.format("Total bytes sent : {0}", getBytesSent()));
-            LOG.info(MessageFormat.format("Total Messages sent : {0}", getMessagesSent()));
-            LOG.info(MessageFormat.format("Total bytes received : {0}", getBytesReceived()));
-            LOG.info(MessageFormat.format("Total Messages received : {0}", getMessagesReceived()));
-            LOG.info(MessageFormat.format("Total connections accepted : {0}", getConnectionsAccepted()));
-
-            LOG.info("TCP Message Transport shut down.");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getProtocolName() {
-        return protocolName;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public EndpointAddress getPublicAddress() {
-        return publicAddress;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public EndpointService getEndpointService() {
-        return (EndpointService) endpoint.getInterface();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Object transportControl(Object operation, Object Value) {
-        return null;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Iterator<EndpointAddress> getPublicAddresses() {
-        return Collections.unmodifiableList(publicAddresses).iterator();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isConnectionOriented() {
-        return true;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean allowsRouting() {
-        return true;
-    }
-
-    public Messenger getMessenger(EndpointAddress dst, Object hintIgnored) {
-        return getMessenger(dst, hintIgnored, true);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Messenger getMessenger(EndpointAddress dst, Object hintIgnored, boolean selfDestruct) {
-
-        if (!dst.getProtocolName().equalsIgnoreCase(getProtocolName())) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Cannot make messenger for protocol: " + dst.getProtocolName());
-            }
-            return null;
-        }
-
-        EndpointAddress plainAddr = new EndpointAddress(dst, null, null);
-
-        // If the destination is one of our addresses including loopback, we 
-        // return a loopback messenger.
-        if (publicAddresses.contains(plainAddr)) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("return LoopbackMessenger for addr : " + dst);
-            }
-            return new LoopbackMessenger(group, endpoint, getPublicAddress(), dst,
-                    new EndpointAddress("jxta", group.getPeerID().getUniqueValue().toString(), null, null));
-        }
-
-        try {
-            // Right now we do not want to "announce" outgoing messengers because they get pooled and so must
-            // not be grabbed by a listener. If "announcing" is to be done, that should be by the endpoint
-            // and probably with a subtely different interface.
-            return new TcpMessenger(dst, this, selfDestruct);
-        } catch (Exception caught) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                    LOG.log(Level.FINER, "Could not get messenger for " + dst, caught);
-                } else {
-                    LOG.warning("Could not get messenger for " + dst + " : " + caught.getMessage());
-                }
-            }
-            if (caught instanceof RuntimeException) {
-                throw (RuntimeException) caught;
-            }
-            return null;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * This implementation tries to open a connection, and after tests the
-     * result.
-     */
-    public boolean ping(EndpointAddress addr) {
-        boolean result = false;
-        EndpointAddress endpointAddress;
-        long pingStartTime = 0;
-
-        if (TransportMeterBuildSettings.TRANSPORT_METERING) {
-            pingStartTime = System.currentTimeMillis();
-        }
-
-        endpointAddress = new EndpointAddress(addr, null, null);
-
-        try {
-            // Too bad that this one will not get pooled. On the other hand ping is
-            // not here too stay.
-            TcpMessenger tcpMessenger = new TcpMessenger(endpointAddress, this);
-
-            if (TransportMeterBuildSettings.TRANSPORT_METERING) {
-                TransportBindingMeter transportBindingMeter = tcpMessenger.getTransportBindingMeter();
-
-                if (transportBindingMeter != null) {
-                    transportBindingMeter.ping(System.currentTimeMillis() - pingStartTime);
-                }
-            }
-            result = true;
-        } catch (Throwable e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "failure pinging " + addr.toString(), e);
-            }
-            if (TransportMeterBuildSettings.TRANSPORT_METERING) {
-                TransportBindingMeter transportBindingMeter = getUnicastTransportBindingMeter(null, endpointAddress);
-
-                if (transportBindingMeter != null) {
-                    transportBindingMeter.pingFailed(System.currentTimeMillis() - pingStartTime);
-                }
-            }
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("ping to " + addr.toString() + " == " + result);
-        }
-        return result;
-    }
-
-    /**
-     * Getter for property 'restrictionPort'.
-     *
-     * @return Value for property 'restrictionPort'.
-     */
-    int getRestrictionPort() {
-        return restrictionPort;
-    }
-
-    TransportBindingMeter getUnicastTransportBindingMeter(PeerID peerID, EndpointAddress destinationAddress) {
-        if (unicastTransportMeter != null) {
-            return unicastTransportMeter.getTransportBindingMeter(
-                    (peerID != null) ? peerID.toString() : TransportMeter.UNKNOWN_PEER, destinationAddress);
-        } else {
-            return null;
-        }
-    }
-
-    void messengerReadyEvent(Messenger newMessenger, EndpointAddress connAddr) {
-        messengerEventListener.messengerReady(new MessengerEvent(this, newMessenger, connAddr));
-    }
-
-    /**
-     * Getter for property 'server'.
-     *
-     * @return Value for property 'server'.
-     */
-    IncomingUnicastServer getServer() {
-        return unicastServer;
-
-    }
-
-    /**
-     * Get a write selector from the cache.
-     *
-     * @return A write selector.
-     * @throws InterruptedException If interrupted while waiting for a selector
-     *                              to become available.
-     */
-    Selector getSelector() throws InterruptedException {
-        synchronized (writeSelectorCache) {
-            Selector selector = null;
-            try {
-                if (!writeSelectorCache.isEmpty()) {
-                    selector = writeSelectorCache.pop();
-                }
-            } catch (EmptyStackException ese) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("No write selector available, waiting for one");
-                }
-            }
-
-            int attempts = 0;
-            while (selector == null && attempts < 2) {
-                writeSelectorCache.wait(connectionTimeOut);
-                try {
-                    if (!writeSelectorCache.isEmpty()) {
-                        selector = writeSelectorCache.pop();
-                    }
-                } catch (EmptyStackException ese) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.log(Level.FINE, "Failed to get a write selector available, waiting for one", ese);
-                    }
-                }
-                attempts++;
-            }
-
-            return selector;
-        }
-    }
-
-    /**
-     * Return the <code>Selector</code> to the cache
-     *
-     * @param selector the selector to put back into the pool
-     */
-    void returnSelector(Selector selector) {
-        synchronized (writeSelectorCache) {
-            if (extraWriteSelectors > 0) {
-                // Allow the selector to be discarded.
-                extraWriteSelectors--;
-            } else {
-                writeSelectorCache.push(selector);
-                // it does not hurt to notify, even if there are no waiters
-                writeSelectorCache.notify();
-            }
-        }
-    }
-
-    /**
-     * Waits for incoming data on channels and sends it to the appropriate
-     * messenger object.
-     */
-    private class MessengerSelectorThread implements Runnable {
-
-        /**
-         * {@inheritDoc}
-         */
-        public void run() {
-            try {
-                if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                    LOG.info("MessengerSelectorThread polling started");
-                }
-
-                while (!isClosed) {
-                    try {
-                        int selectedKeys = 0;
-
-                        // Update channel registerations.
-                        updateChannelRegisterations();
-
-                        try {
-                            // this can be interrupted through wakeup
-                            selectedKeys = messengerSelector.select();
-                        } catch (CancelledKeyException cke) {
-                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                LOG.log(Level.FINE, "Key was cancelled", cke);
-                            }
-                        }
-
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine(MessageFormat.format("MessengerSelector has {0} selected keys", selectedKeys));
-                        }
-
-                        if (selectedKeys == 0 && messengerSelector.selectNow() == 0) {
-                            // We were probably just woken.
-                            continue;
-                        }
-
-                        Set<SelectionKey> keySet = messengerSelector.selectedKeys();
-
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine(MessageFormat.format("KeySet has {0} selected keys", keySet.size()));
-                        }
-
-                        Iterator<SelectionKey> it = keySet.iterator();
-
-                        while (it.hasNext()) {
-                            SelectionKey key = it.next();
-
-                            // remove it from the SelectedKeys Set
-                            it.remove();
-
-                            if (key.isValid()) {
-                                try {
-                                    if (key.isReadable() && key.channel().isOpen()) {
-                                        // ensure this channel is not selected again until the thread is done with it
-                                        // TcpMessenger is expected to reset the interestOps back to OP_READ
-                                        // Without this, expect multiple threads to execute on the same event, until
-                                        // the first thread completes reading all data available
-                                        key.interestOps(key.interestOps() & ~SelectionKey.OP_READ);
-
-                                        // get the messenger
-                                        TcpMessenger msgr = (TcpMessenger) key.attachment();
-
-                                        // process the data
-                                        try {
-                                            executor.execute(msgr);
-                                        } catch (RejectedExecutionException re) {
-                                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                                LOG.log(Level.FINE,
-                                                        MessageFormat.format("Executor rejected task for messenger :{0}", msgr.toString()), re);
-                                            }
-                                        }
-                                    }
-                                } catch (CancelledKeyException cce) {
-                                    //in case the key was canceled after the selection
-                                }
-                            } else {
-                                // unregister it, no need to keep invalid/closed channels around
-                                try {
-                                    key.channel().close();
-                                } catch (IOException io) {
-                                    // avoids breaking out of the selector loop
-                                }
-                                key.cancel();
-                                key = null;
-                            }
-                        }
-                    } catch (ClosedSelectorException cse) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("IO Selector closed");
-                        }
-                    } catch (InterruptedIOException woken) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.log(Level.FINE, "Thread inturrupted", woken);
-                        }
-                    } catch (IOException e1) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.log(Level.WARNING, "An exception occurred while selecting keys", e1);
-                        }
-                    } catch (SecurityException e2) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.log(Level.WARNING, "A security exception occurred while selecting keys", e2);
-                        }
-                    }
-                }
-
-                // XXX 20070205 bondolo What should we do about the channels 
-                // that are still registered with the selector and any pending 
-                // updates?
-
-            } catch (Throwable all) {
-                if (Logging.SHOW_SEVERE && Logging.SHOW_SEVERE) {
-                    LOG.log(Level.SEVERE, "Uncaught Throwable", all);
-                }
-            } finally {
-                messengerSelectorThread = null;
-            }
-        }
-    }
-
-    /**
-     * Registers the channel with the Read selector and attaches the messenger to the channel
-     *
-     * @param channel   the socket channel.
-     * @param messenger the messenger to attach to the channel.
-     */
-    void register(SocketChannel channel, TcpMessenger messenger) {
-        regisMap.put(messenger, channel);
-        messengerSelector.wakeup();
-    }
-
-    /**
-     * Unregisters the channel with the Read selector
-     *
-     * @param channel the socket channel.
-     */
-    void unregister(SocketChannel channel) {
-        unregisMap.add(channel);
-        messengerSelector.wakeup();
-    }
-
-    /**
-     * Registers all newly accepted and returned (by TcpMessenger) channels.
-     * Removes all closing TcpMessengers.
-     */
-    private synchronized void updateChannelRegisterations() {
-
-        if (!regisMap.isEmpty() && Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine(MessageFormat.format("Registering {0} channels with MessengerSelectorThread", regisMap.size()));
-        }
-
-        if (!regisMap.isEmpty()) {
-            Iterator<Map.Entry<TcpMessenger, SocketChannel>> eachMsgr = regisMap.entrySet().iterator();
-
-            while (eachMsgr.hasNext()) {
-                Map.Entry<TcpMessenger, SocketChannel> anEntry = eachMsgr.next();
-                TcpMessenger msgr = anEntry.getKey();
-                SocketChannel channel = anEntry.getValue();
-                SelectionKey key = channel.keyFor(messengerSelector);
-
-                try {
-                    if (key == null) {
-                        key = channel.register(messengerSelector, SelectionKey.OP_READ, msgr);
-                    }
-                    key.interestOps(key.interestOps() | SelectionKey.OP_READ);
-                    if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                        LOG.finer(MessageFormat.format("Key interestOps on channel {0}, bit set :{1}", channel, key.interestOps()));
-                    }
-                } catch (ClosedChannelException e) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.FINE)) {
-                        LOG.log(Level.FINE, "Failed to register Channel with messenger selector", e);
-                    }
-                    // it's best a new messenger is created when a new messenger is requested
-                    msgr.close();
-                } catch (CancelledKeyException e) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.log(Level.FINE, "Key is already cancelled, removing key from registeration map", e);
-                    }
-                } catch (IllegalBlockingModeException e) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.log(Level.FINE, "Invalid blocking channel mode, closing messenger", e);
-                    }
-                    // messenger state is unknown
-                    msgr.close();
-                }
-                // remove it from the table
-                eachMsgr.remove();
-            }
-        }
-
-        // Unregister and close channels.
-        if (!unregisMap.isEmpty() && Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine(MessageFormat.format("Unregistering {0} channels with MessengerSelectorThread", unregisMap.size()));
-        }
-        if (!unregisMap.isEmpty()) {
-            Iterator<SocketChannel> eachChannel;
-
-            synchronized (unregisMap) {
-                List<SocketChannel> allChannels = new ArrayList<SocketChannel>(unregisMap);
-                unregisMap.clear();
-                eachChannel = allChannels.iterator();
-            }
-
-            while (eachChannel.hasNext()) {
-                SocketChannel aChannel = eachChannel.next();
-                SelectionKey key = aChannel.keyFor(messengerSelector);
-                if (null != key) {
-                    try {
-                        key.cancel();
-                    } catch (CancelledKeyException e) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.log(Level.FINE, "Key is already cancelled, removing key from registeration map", e);
-                        }
-                    }
-                }
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tcp/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tcp/package.html
deleted file mode 100644 (file)
index c310349..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-<HEAD>
-</HEAD>
-<BODY>
-A JXTA {@link net.jxta.endpoint.MessageTransport} implementation which uses raw TCP/IP sockets.
-
-@see net.jxta.endpoint.EndpointService
-@see net.jxta.endpoint.MessageTransport
-@see net.jxta.endpoint.MessageSender
-@see net.jxta.endpoint.MessageReceiver
-@see net.jxta.endpoint.Message
-@see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#trans-tcpipt" target="_blank">JXTA Protocols
-    Specification : Standard JXTA Transport Bindings</a>
-</BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/JTlsDefs.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/JTlsDefs.java
deleted file mode 100644 (file)
index 5215f08..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.tls;
-
-
-import net.jxta.document.MimeMediaType;
-
-
-public class JTlsDefs {
-    // Until we decide otherwise, the tls is *by definition* handling
-    // peerID addressed messages.
-    static String tlsPName = "jxtatls";
-    
-    static final String TLSNameSpace = "jxtatls"; // our name space
-      
-    static final String ServiceName = "TlsTransport";
-
-    static final int FAKEPORT = 1376911; // for TLS hashing only
-  
-    static final String ACKKEY = "TLSACK";
-    static final String RETR = "MARKRetr";
-
-    static final MimeMediaType MTYPE = new MimeMediaType("application/x-jxta-msg");
-    static final MimeMediaType BLOCKS = new MimeMediaType("application/x-jxta-tls-block");
-    static final MimeMediaType ACKS = new MimeMediaType("application/x-jxta-tls-ack");
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/JTlsInputStream.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/JTlsInputStream.java
deleted file mode 100644 (file)
index cbebd9f..0000000
+++ /dev/null
@@ -1,590 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.tls;
-
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.io.InputStream;
-import java.io.IOException;
-import java.net.SocketTimeoutException;
-import java.io.InterruptedIOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import net.jxta.endpoint.ByteArrayMessageElement;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.impl.util.TimeUtils;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-
-/**
- *  Acts as the input for TLS. Accepts ciphertext which arrives in messages
- *  and orders it before passing it to TLS for decryption.
- *
- * TLS will do its raw reads off of this InputStream
- * Here, we will have queued up the payload of TLS message
- * elements to be passed to TLS code as TLS Records.
- *
- */
-class JTlsInputStream extends InputStream {
-    private static final Logger LOG = Logger.getLogger(JTlsInputStream.class.getName());
-    
-    private static final boolean  DEBUGIO = false;
-    
-    static private int MAXQUEUESIZE = 25;
-    
-    /**
-     *  Connection we are working for.
-     */
-    private TlsConn conn;
-    
-    private volatile boolean closed = false;
-    private boolean closing = false;
-    
-    private long timeout = 2 * TimeUtils.AMINUTE;
-    private JTlsRecord jtrec = null;
-    private volatile int sequenceNumber = 0;
-    private final Vector<IQElt> inputQueue = new Vector<IQElt>(MAXQUEUESIZE); // For incoming messages.
-    
-    /**
-     * Input TLS record Object
-     **/
-    private static class JTlsRecord {
-        // This dummy message elt
-        public InputStream tlsRecord; // TLS Record
-        public long nextByte; // next inbuff byte
-        public long size; // size of TLS Record
-        
-        public JTlsRecord() {
-            tlsRecord = null; // allocated by caller
-            nextByte = 0; // We read here (set by caller)
-            size = 0; // TLS Record size(set by caller)
-        }
-        
-        // reset the jxta tls record element
-        
-        public void resetRecord() {
-            if (null != tlsRecord) {
-                try {
-                    tlsRecord.close();
-                } catch (IOException ignored) {// ignored
-                }
-            }
-            tlsRecord = null;
-            size = nextByte = 0;
-        }
-    }
-    
-    
-    // An input queue element which breaks out a
-    // received message in enqueueMessage().
-    private static class IQElt {
-        int seqnum;
-        MessageElement elt;
-        boolean ackd;
-    }
-    
-    public JTlsInputStream(TlsConn conn, long timeout) {
-        this.timeout = timeout;
-        this.conn = conn;
-        jtrec = new JTlsRecord();
-        // 1 <= seq# <= maxint, monotonically increasing
-        // Incremented before compare.
-        sequenceNumber = 0;
-        
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    @Override
-    public void close() throws IOException {
-        super.close();
-        
-        closed = true;
-        synchronized (inputQueue) {
-            inputQueue.clear();
-            inputQueue.notifyAll();
-        }
-    }
-
-    /**
-     * prepare this input stream to being closed. It will still
-     * deliver the packets that have been received, but nothing
-     * more. This is meant to be called in response to the other side
-     * having initiated closure. We assume that when the other side does it
-     * it means that it is satified with what we have acknoleged so far.
-     */
-    public void setClosing() throws IOException {
-        synchronized (inputQueue) {
-            closing = true;
-            inputQueue.notifyAll();
-        }
-    }
-    
-    // Here we read the TLS Record data from the incoming JXTA message.
-    // (We will really have a full jxta message available.)
-    //
-    // TLS  Record input only calls the following  methods.
-    // They are called from SSLRecord.decode(SSLConn, Inputstream);
-    //
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int read() throws IOException {
-        if (closed) {
-            return -1;
-        }
-        
-        byte[] a = new byte[1];
-        
-        while (true) {
-            int len = local_read(a, 0, 1);
-            
-            if (len < 0) {
-                break;
-            }
-            
-            if (len > 0) {
-                if (DEBUGIO && Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Read() : " + (a[0] & 255));
-                }
-                
-                return (a[0] & 0xFF); // The byte
-            }
-        }
-        // If we've reached EOF, there's nothing to do but close().
-        
-        close();
-        return -1;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int read(byte[] a, int offset, int length) throws IOException {
-        if (closed) {
-            return -1;
-        }
-        
-        if (0 == length) {
-            return 0;
-        }
-        
-        int i = local_read(a, offset, length);
-        
-        if (DEBUGIO && Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Read(byte[], int, " + length + "), bytes read = " + i);
-        }
-        
-        // If we've reached EOF; there's nothing to do but close().
-        if (i == -1) {
-            close();
-        }
-        return i;
-    }
-    
-    // protected accessor for sequence number
-    int getSequenceNumber() {
-        return sequenceNumber;
-    }
-    
-    // Our input queue max size
-    int getMaxIQSize() {
-        return MAXQUEUESIZE;
-    }
-    
-    /**
-     *  Send a sequential ACK and selective ACKs for all of the queued messages.
-     *
-     *  @param seqnAck the sequence number being sequential ACKed
-     **/
-    private void sendACK(int seqnAck) {
-        List<Integer> selectedAckList = new ArrayList<Integer>();
-        
-        synchronized (inputQueue) {
-            Iterator<IQElt> eachInQueue = inputQueue.iterator();
-            
-            while (eachInQueue.hasNext() && (selectedAckList.size() < MAXQUEUESIZE)) {
-                IQElt anIQElt = eachInQueue.next();
-
-                if (anIQElt.seqnum > seqnAck) {
-                    selectedAckList.add(new Integer(anIQElt.seqnum));
-                }
-            }
-        }
-        
-        // PERMIT DUPLICATE ACKS. Just a list and one small message.
-        sendACK(seqnAck, selectedAckList);
-    }
-    
-    /**
-     *  Build an ACK message. The message provides a sequential ACK count and
-     *  an optional list of selective ACKs.
-     *
-     *  @param seqnAck the sequence number being sequential ACKed
-     *  @param sackList a list of selective ACKs. Must be sorted in increasing
-     *  order.
-     */
-    private void sendACK(int seqnAck, List<Integer> sackList) {
-        ByteArrayOutputStream bos = new ByteArrayOutputStream((1 + sackList.size()) * 4);
-        DataOutputStream dos = new DataOutputStream(bos);
-        
-        try {
-            dos.writeInt(seqnAck);
-            
-            Iterator<Integer> eachSACK = sackList.iterator();
-            
-            while (eachSACK.hasNext()) {
-                int aSack = (eachSACK.next()).intValue();
-
-                dos.writeInt(aSack);
-            }
-            dos.close();
-            bos.close();
-            
-            Message ACKMsg = new Message();
-            MessageElement elt = new ByteArrayMessageElement(JTlsDefs.ACKKEY, JTlsDefs.ACKS, bos.toByteArray(), null);
-            
-            ACKMsg.addMessageElement(JTlsDefs.TLSNameSpace, elt);
-            
-            conn.sendToRemoteTls(ACKMsg);
-            
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("SENT ACK, seqn#" + seqnAck + " and " + sackList.size() + " SACKs ");
-            }
-        } catch (IOException e) {
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.log(Level.INFO, "sendACK caught IOException:", e);
-            }
-        }
-    }
-    
-    /**
-     *  queue messages by sequence number.
-     */
-    public void queueIncomingMessage(Message msg) {
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Queue Incoming Message begins for " + msg);
-        }
-        
-        long startEnqueue = TimeUtils.timeNow();
-        
-        Message.ElementIterator e = msg.getMessageElements(JTlsDefs.TLSNameSpace, JTlsDefs.BLOCKS);
-        
-        // OK look for jxta message
-        while (!closed && !closing && e.hasNext()) {
-            MessageElement elt = e.next();
-
-            e.remove();
-            
-            int msgSeqn = 0;
-            
-            try {
-                msgSeqn = Integer.parseInt(elt.getElementName());
-            } catch (NumberFormatException n) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Discarding element (" + elt.getElementName() + ") Not one of ours.");
-                }
-                continue;
-            }
-            
-            IQElt newElt = new IQElt();
-            
-            newElt.seqnum = msgSeqn;
-            newElt.elt = elt;
-            newElt.ackd = false;
-            
-            // OK we must inqueue:
-            // Wait until someone dequeues if we are at the size limit
-            // see if this is a duplicate
-            if (newElt.seqnum <= sequenceNumber) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("RCVD OLD MESSAGE : Discard seqn#" + newElt.seqnum + " now at seqn#" + sequenceNumber);
-                }
-                break;
-            }
-            synchronized (inputQueue) {
-                // dbl check with the lock held.
-                if (closing || closed) {
-                    return;
-                }
-                
-                // Insert this message into the input queue.
-                // 1. Do not add duplicate messages
-                // 2. Store in increasing sequence nos.
-                int insertIndex = inputQueue.size();
-                boolean duplicate = false;
-                
-                for (int j = 0; j < inputQueue.size(); j++) {
-                    IQElt iq = inputQueue.elementAt(j);
-
-                    if (newElt.seqnum < iq.seqnum) {
-                        insertIndex = j;
-                        break;
-                    } else if (newElt.seqnum == iq.seqnum) {
-                        duplicate = true;
-                        break;
-                    }
-                }
-                
-                if (duplicate) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("RCVD OLD MESSAGE : Discard duplicate msg, seqn#" + newElt.seqnum);
-                    }
-                    newElt = null;
-                    break;
-                }
-                
-                inputQueue.add(insertIndex, newElt);
-                
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Enqueued msg with seqn#" + newElt.seqnum + " at index " + insertIndex);
-                }
-                
-                inputQueue.notifyAll();
-                newElt = null;
-            }
-        }
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            long waited = TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), startEnqueue);
-            
-            LOG.fine("Queue Incoming Message for " + msg + " completed in " + waited + " msec.");
-        }
-    }
-    
-    /**
-     *  Dequeue the message with the desired sequence number waiting as needed
-     *  until the message is available.
-     *
-     *  @param desiredSeqn the sequence number to be dequeued.
-     *  @return the Message Element with the desired sequence number or null if
-     *  the queue has been closed.
-     **/
-    private MessageElement dequeueMessage(int desiredSeqn) throws IOException {
-        IQElt iQ = null;
-        
-        // Wait for incoming message here
-        long startDequeue = TimeUtils.timeNow();
-        long whenToTimeout = startDequeue + timeout;
-        int wct = 0;
-        
-        long nextRetransRequest = TimeUtils.toAbsoluteTimeMillis(TimeUtils.ASECOND);
-        
-        synchronized (inputQueue) {
-            while (!closed) {
-                if (inputQueue.size() == 0) {
-                    if (closing) {
-                        return null;
-                    }
-                    try {
-                        wct++;
-                        inputQueue.wait(TimeUtils.ASECOND);
-                        if (whenToTimeout < TimeUtils.timeNow()) {
-                            throw new SocketTimeoutException("Read timeout reached");
-                        }
-                    } catch (InterruptedException e) {
-                        Thread.interrupted(); // just continue
-                    }
-                    // we reset the retrans request timer since we don't want to
-                    // immediately request retry after a long wait for out of
-                    // order messages.
-                    
-                    nextRetransRequest = TimeUtils.toAbsoluteTimeMillis(TimeUtils.ASECOND);
-                    continue;
-                }
-                
-                iQ = inputQueue.elementAt(0); // FIFO
-                
-                if (iQ.seqnum < desiredSeqn) {
-                    // Ooops a DUPE slipped in the head of the queue undetected
-                    // (seqnum consistency issue).
-                    // Just drop it.
-                    inputQueue.remove(0);
-                    // if such is the case then notify the other end so that
-                    // the message does not remain in the retry queue eventually
-                    // triggering a broken pipe exception
-                    sendACK(iQ.seqnum);
-                    continue;
-                } else if (iQ.seqnum != desiredSeqn) {
-                    if (TimeUtils.toRelativeTimeMillis(nextRetransRequest) < 0) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Trigger retransmission. Wanted seqn#" + desiredSeqn + " found seqn#" + iQ.seqnum);
-                        }
-                        sendACK(desiredSeqn - 1);
-                        nextRetransRequest = TimeUtils.toAbsoluteTimeMillis(TimeUtils.ASECOND);
-                    }
-                    
-                    try {
-                        wct++;
-                        inputQueue.wait(TimeUtils.ASECOND);
-                        if (whenToTimeout < TimeUtils.timeNow()) {
-                            throw new SocketTimeoutException("Read timeout reached");
-                        }
-                    } catch (InterruptedException e) {
-                        throw new InterruptedIOException("IO interrupted ");
-                    }
-                    continue;
-                }
-                
-                inputQueue.remove(0);
-                break;
-            }
-        }
-        
-        nextRetransRequest = 0;
-        sendACK(desiredSeqn);
-        // if we are closed then we return null
-        if (null == iQ) {
-            return null;
-        }
-        
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            long waited = TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), startDequeue);
-            
-            LOG.info("DEQUEUED seqn#" + iQ.seqnum + " in " + waited + " msec on input queue");
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                if (wct > 0) {
-                    LOG.fine("DEQUEUE waited " + wct + " times on input queue");
-                }
-            }
-        }
-        
-        return iQ.elt;
-    }
-    
-    /**
-     *
-     */
-    private int local_read(byte[] a, int offset, int length) throws IOException {
-        
-        synchronized (jtrec) {
-            if ((jtrec.size == 0) || (jtrec.nextByte == jtrec.size)) {
-                
-                // reset the record
-                jtrec.resetRecord(); // GC as necessary(tlsRecord byte[])
-                
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("local_read: getting next data block at seqn#" + (sequenceNumber + 1));
-                }
-                
-                MessageElement elt = null;
-
-                try {
-                    elt = dequeueMessage(sequenceNumber + 1);
-                } catch (SocketTimeoutException ste) {
-                    // timed out with no data
-                    // SSLSocket expects a 0 data in this case
-                    return 0;
-                }
-                
-                if (null == elt) {
-                    return -1;
-                }
-                
-                sequenceNumber += 1; // next msg sequence number
-                
-                // Get the length of the TLS Record
-                jtrec.size = elt.getByteLength();
-                jtrec.tlsRecord = elt.getStream();
-                
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("local_read: new seqn#" + sequenceNumber + ", bytes = " + jtrec.size);
-                }
-            }
-            
-            // return the requested TLS Record data
-            // These calls should NEVER ask for more data than is in the
-            // received TLS Record.
-            
-            long left = jtrec.size - jtrec.nextByte;
-            int copyLen = (int) Math.min(length, left);
-            int copied = 0;
-            
-            do {
-                int res = jtrec.tlsRecord.read(a, offset + copied, copyLen - copied);
-                
-                if (res < 0) {
-                    break;
-                }
-                
-                copied += res;
-            } while (copied < copyLen);
-            
-            jtrec.nextByte += copied;
-            
-            if (DEBUGIO) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("local_read: Requested " + length + ", Read " + copied + " bytes");
-                }
-            }
-            
-            return copied;
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/JTlsOutputStream.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/JTlsOutputStream.java
deleted file mode 100644 (file)
index ab11a5b..0000000
+++ /dev/null
@@ -1,964 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.tls;
-
-
-import java.io.OutputStream;
-import java.io.IOException;
-import java.net.*;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import net.jxta.endpoint.ByteArrayMessageElement;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.StringMessageElement;
-
-import net.jxta.impl.endpoint.tls.TlsConn.HandshakeState;
-import net.jxta.impl.util.TimeUtils;
-
-
-/**
- *  Acts as the output for TLS. Accepts ciphertext from TLS and packages it into
- *  messages for sending to the remote. The messages are kept in a retry queue
- *  until the remote peer acknowledges receipt of the message.
- **/
-class JTlsOutputStream extends OutputStream {
-
-    /**
-     *  Log4J Logger
-     **/
-    private static final Logger LOG = Logger.getLogger(JTlsOutputStream.class.getName());
-
-    // constants
-
-    /**
-     * This maximum is only enforced if we have not heard
-     * from the remote for RETRMAXAGE.
-     **/
-    private static final int MAXRETRQSIZE = 100;
-
-    /**
-     *  Initial estimated Round Trip Time
-     **/
-    private static final long initRTT = 1 * TimeUtils.ASECOND;
-
-    private static final MessageElement RETELT = new StringMessageElement(JTlsDefs.RETR, "TLSRET", null);
-
-    /**
-     * Retrans window. When reached, we up the RTO.
-     **/
-    private static final int RWINDOW = 5;
-
-    /**
-     *  If true then the stream has been closed.
-     **/
-    private volatile boolean closed = false;
-
-    /**
-     * If true then the stream is being closed.
-     * It means that it still works completely for all messages already
-     * queued, but no new message may be enqueued.
-     **/
-    private volatile boolean closing = false;
-
-    /**
-     *  Sequence number of the message we most recently sent out.
-     **/
-    private volatile int sequenceNumber = 0;
-
-    /**
-     *  Sequence number of highest sequential ACK.
-     **/
-    private volatile int maxACK = 0;
-
-    /**
-     *  Transport we are working for
-     **/
-    private TlsTransport tp = null;
-
-    /**
-     *  connection we are working for
-     **/
-    private TlsConn conn = null;
-
-    private Retransmitter retransmitter = null;
-
-    // for retransmission
-
-    /**
-     *  Average round trip time in milliseconds.
-     **/
-    private volatile long aveRTT = initRTT;
-
-    /**
-     *  Number of ACK message received.
-     **/
-    private int nACKS = 0;
-
-    /**
-     *  Retry Time Out measured in milliseconds.
-     **/
-    private volatile long RTO = 0;
-
-    /**
-     *  Minimum Retry Timeout measured in milliseconds.
-     **/
-    private volatile long minRTO = initRTT;
-
-    /**
-     *  Maximum Retry Timeout measured in milliseconds.
-     **/
-    private volatile long maxRTO = initRTT * 5;
-
-    /**
-     *  absolute time in milliseconds of last sequential ACK.
-     **/
-    private volatile long lastACKTime = 0;
-
-    /**
-     *  absolute time in milliseconds of last SACK based retransmit.
-     **/
-    private volatile long sackRetransTime = 0;
-
-    /**
-     *   The collection of messages available for re-transmission.
-     */
-    final List<RetrQElt> retrQ = new Vector<RetrQElt>(25, 5);
-
-    // running average of receipients Input Queue
-    private int nIQTests = 0;
-    private int aveIQSize = 0;
-
-    /**
-     *  Our estimation of the current free space in the remote input queue.
-     **/
-    private volatile int mrrIQFreeSpace = 0;
-
-    /**
-     *  Our estimation of the maximum sise of the remote input queue.
-     **/
-    private int rmaxQSize = 0;
-
-    /**
-     * retrans queue element
-     **/
-    private static class RetrQElt {
-        int seqnum; // sequence number of this message.
-        long enqueuedAt; // absolute time of original enqueing.
-        volatile Message msg; // the message
-        int marked; // has been marked as retransmission
-        long sentAt; // when this msg was last transmitted
-
-        public RetrQElt(int seqnum, Message msg) {
-            this.seqnum = seqnum;
-            this.msg = msg;
-            this.enqueuedAt = TimeUtils.timeNow();
-            this.sentAt = this.enqueuedAt;
-            this.marked = 0;
-        }
-    }
-
-    JTlsOutputStream(TlsTransport tp, TlsConn conn) {
-        this.conn = conn; // TlsConnection.
-        this.tp = tp; // our transport
-
-        this.RTO = minRTO; // initial RTO
-
-        // input free queue size
-        this.rmaxQSize = 20;
-        this.mrrIQFreeSpace = rmaxQSize;
-
-        // Init last ACK Time to now
-        this.lastACKTime = TimeUtils.timeNow();
-        this.sackRetransTime = TimeUtils.timeNow();
-
-        // Start retransmission thread
-        this.retransmitter = new Retransmitter();
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     *  <p/>We don't current support linger.
-     **/
-    @Override
-    public void close() throws IOException {
-        synchronized (this) {
-            super.close();
-            closed = true;
-        }
-        synchronized (retrQ) {
-            retrQ.notifyAll();
-            retrQ.clear();
-        }
-    }
-
-    /**
-     * indicate that we're in the process of closing. To respect the semantics
-     * of close()/isClosed(), we do not set the closed flag, yet. Instead, we
-     * set the flag "closing", which simply garantees that no new message
-     * will be queued.
-     * This, in combination with getSequenceNumber and getMaxAck, and
-     * waitQevent, enables fine grain control of the tear down process.
-     **/
-    public void setClosing() {
-        synchronized (retrQ) {
-            closing = true;
-            retrQ.clear();
-            retrQ.notifyAll();
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     **/
-    @Override
-    public void write(int c) throws IOException {
-        byte[] a = new byte[1];
-
-        a[0] = (byte) (c & 0xFF);
-        write(a, 0, 1);
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * <p/>We override the write(byte[], offset, length);
-     * method which is called by SSLRecord.send(SSLConn conn)
-     * via tos.writeTo(conn.sock_out), tos a ByteArrayOutputStream
-     * which has buffered the TLS output record in the byte array.
-     * The actual call is write(byte[] b, 0, length);
-     *
-     * <p/>We put this TLS record into a msssage element for the output
-     * pipe to send along.
-     *
-     * <p/>This is reasonable since in fact, if more than 16K bytes of
-     * application data are sent, then the max TLS Record is a little
-     * larger than 16K bytes including the TLS overhead.
-     *
-     * <p/>Therefore, an app. message is N+r TLS Records,
-     * Message length = Nx16K + r, N >= 0, r >= 0,
-     * N > 0 || r > 0 true.
-     **/
-    @Override
-    public void write(byte[] b, int off, int len) throws IOException {
-        // flag to allow connection closure in finally block
-        // Connection can not be closed when holding a lock on this
-        boolean closeStale = false;
-        // allocate new message
-        Message jmsg = new Message();
-
-        try {
-            if (closed) {
-                throw new IOException("stream is closed");
-            }
-            if (closing) {
-                throw new IOException("stream is being closed");
-            }
-            if (b == null) {
-                throw new IllegalArgumentException("buffer is null");
-            }
-
-            if ((off < 0) || (off > b.length) || (len < 0) || ((off + len) > b.length) || ((off + len) < 0)) {
-                throw new IndexOutOfBoundsException();
-            }
-
-            if (len == 0) {
-                return;
-            }
-
-            // Copy the data since it will be queued, and caller may
-            // overwrite the same byte[] buffer.
-            byte[] data = new byte[len];
-
-            System.arraycopy(b, off, data, 0, len);
-
-            // sync so that writes don't get out of order.
-            synchronized (retrQ) {
-                // add TLS record as element
-                MessageElement ciphertext = new ByteArrayMessageElement(Integer.toString(++sequenceNumber), JTlsDefs.BLOCKS, data
-                        ,
-                        null);
-
-                jmsg.addMessageElement(JTlsDefs.TLSNameSpace, ciphertext);
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("TLS CT WRITE : seqn#" + sequenceNumber + " length=" + len);
-                }
-
-                // (1)  See if the most recent remote input queue size is close to
-                // it's maximum input queue size
-                // Send only if at least 20% or more of the queue is free.
-                // (2) Also, if our retransQ is larger than the remotes inputQ,
-                // wait until we've received an ack.
-                // We assume some msgs are in transit or the remote system buffers
-                // We do not want to overrun the receiver.
-                // (3) We need to release from the loop because of possible deadlocks
-                // EG: retrQ.size() == 0 and mrrIQFreeSpace forces looping
-                // forever because the most recent SACK cleared it, and the receiver
-                // is waiting for more data.
-
-                // max of 200ms wait
-                int maxwait = Math.min((int) aveRTT, 200);
-                // iterations to wait (max 3, min 1)
-                int waitCt = Math.max(maxwait / 60, 1);
-
-                // check if the queue has gone dead.
-                if (retrQ.size() > 0) {
-                    long inQueue = TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), retrQ.get(0).enqueuedAt);
-
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("write : Retry queue idle for " + inQueue);
-                    }
-
-                    if (inQueue > tp.RETRMAXAGE) {
-                        if (inQueue > (2 * tp.RETRMAXAGE)) {
-                            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                                LOG.info("Closing stale connection " + conn);
-                            }
-                            // SPT - set flag for connection close in finally block
-                            closeStale = true;
-                            throw new IOException("Stale connection closure in progress");
-                        } else if (retrQ.size() >= MAXRETRQSIZE) {
-                            // if the the queue is "full" and we are long idle, delay new writes forever.
-                            waitCt = Integer.MAX_VALUE;
-                        }
-                    }
-                }
-
-                int i = 0;
-
-                while (!closed && ((mrrIQFreeSpace < rmaxQSize / 5) || (retrQ.size() > rmaxQSize))) {
-
-                    // see if max. wait has arrived.
-                    if (i++ == waitCt) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("write() wait for ACK, maxwait timer expired while enqueuing seqn#" + sequenceNumber);
-                        }
-                        break;
-                    }
-
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("write() wait 60ms for ACK while enqueuing seqn#" + sequenceNumber + "\n\tremote IQ free space = "
-                                + mrrIQFreeSpace + "\n\tMIN free space to continue = " + (rmaxQSize / 5) + "" + "\n\tretQ.size()="
-                                + retrQ.size());
-                    }
-
-                    // Less than 20% free queue space is left. Wait.
-                    try {
-                        retrQ.wait(60);
-                    } catch (InterruptedException ignored) {
-                        Thread.interrupted();
-                    }
-                }
-
-                // place copy on retransmission queue
-                RetrQElt r = new RetrQElt(sequenceNumber, jmsg.clone());
-
-                retrQ.add(r);
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Retrans Enqueue added seqn#" + sequenceNumber + " retQ.size()=" + retrQ.size());
-                }
-            }
-
-            // Here we will send the message to the transport
-            conn.sendToRemoteTls(jmsg);
-            // assume we have now taken a slot
-            mrrIQFreeSpace--;
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("TLS CT SENT : seqn#" + sequenceNumber + " length=" + len);
-            }
-        } finally {
-            if (closeStale) {
-                // The retry queue has really gone stale.
-                try {
-                    setClosing();
-                    // in this we close ourself
-                    conn.close(HandshakeState.CONNECTIONDEAD);
-                } catch (IOException ignored) {
-                    ;
-                }
-            }
-        }
-    }
-
-    private void calcRTT(long enqueuedAt) {
-        long dt = TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), enqueuedAt);
-
-        if (dt == 0) {
-            dt += 1;
-        }
-
-        int n = nACKS;
-
-        nACKS += 1;
-
-        aveRTT = ((n * aveRTT) + dt) / (nACKS);
-
-        // Set retransmission time out: 2.5 x RTT
-        RTO = (aveRTT << 1) + (aveRTT >> 1);
-
-        // Enforce a min/max
-
-        RTO = Math.max(RTO, minRTO);
-        RTO = Math.min(RTO, maxRTO);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("TLS!! RTT = " + dt + "ms aveRTT = " + aveRTT + "ms" + " RTO = " + RTO + "ms");
-        }
-    }
-
-    private int calcAVEIQ(int iq) {
-        int n = nIQTests;
-
-        nIQTests += 1;
-
-        aveIQSize = ((n * aveIQSize) + iq) / nIQTests;
-
-        return aveIQSize;
-    }
-
-    /**
-     * Process an ACK Message. We remove ACKed messages from the retry queue.
-     * We only acknowledge messages received in sequence.
-     *
-     * The seqnum is for the largest unacknowledged seqnum
-     * the receipient has received.
-     *
-     * The sackList is a sequence of all of the received
-     *    messages in the sender's input Q. All will be sequence numbers higher
-     *    than the sequential ACK seqnum.
-     *
-     *    Recepients are passive and only ack upon the receipt
-     *    of an in sequence message.
-     *
-     *    They depend on our RTO to fill holes in message
-     *   sequences.
-     **/
-    void ackReceived(int seqnum, int[] sackList) {
-        lastACKTime = TimeUtils.timeNow();
-        int numberACKed = 0;
-
-        // remove acknowledged messages from retrans Q.
-
-        synchronized (retrQ) {
-            maxACK = Math.max(maxACK, seqnum);
-
-            // dump the current Retry queue and the SACK list
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                StringBuilder dumpRETRQ = new StringBuilder("ACK RECEIVE : " + Integer.toString(seqnum));
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    dumpRETRQ.append('\n');
-                }
-                dumpRETRQ.append("\tRETRQ (size=" + retrQ.size() + ")");
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    dumpRETRQ.append(" : ");
-                    for (int y = 0; y < retrQ.size(); y++) {
-                        if (0 != y) {
-                            dumpRETRQ.append(", ");
-                        }
-                        RetrQElt r = retrQ.get(y);
-
-                        dumpRETRQ.append(r.seqnum);
-                    }
-                }
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    dumpRETRQ.append('\n');
-                }
-                dumpRETRQ.append("\tSACKLIST (size=" + sackList.length + ")");
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    dumpRETRQ.append(" : ");
-                    for (int y = 0; y < sackList.length; y++) {
-                        if (0 != y) {
-                            dumpRETRQ.append(", ");
-                        }
-                        dumpRETRQ.append(sackList[y]);
-                    }
-                }
-                LOG.fine(dumpRETRQ.toString());
-            }
-
-            Iterator eachRetryQueueEntry = retrQ.iterator();
-
-            // First remove monotonically increasing seq#s in retrans vector
-            while (eachRetryQueueEntry.hasNext()) {
-                RetrQElt r = (RetrQElt) eachRetryQueueEntry.next();
-
-                if (r.seqnum > seqnum) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("r.seqnum :" + r.seqnum + " > seqnum :" + seqnum);
-                    }
-                    break;
-                }
-
-                // Acknowledged
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("seqnum :" + seqnum);
-                    LOG.fine("Removing :" + r.seqnum + " from retransmit queue");
-                }
-                eachRetryQueueEntry.remove();
-
-                // Update RTT, RTO
-                if (0 != r.enqueuedAt) {
-                    calcRTT(r.enqueuedAt);
-                }
-
-                r.msg.clear();
-                r.msg = null;
-                r = null;
-                numberACKed++;
-            }
-
-            // Update last accessed time in response to getting seq acks.
-            if (numberACKed > 0) {
-                conn.lastAccessed = TimeUtils.timeNow();
-            }
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("TLS!! SEQUENTIALLY ACKD SEQN = " + seqnum + ", (" + numberACKed + " acked)");
-            }
-
-            // most recent remote IQ free space
-            rmaxQSize = Math.max(rmaxQSize, sackList.length);
-            mrrIQFreeSpace = rmaxQSize - sackList.length;
-
-            // let's look at average sacs.size(). If it is big, then this
-            // probably means we must back off because the system is slow.
-            // Our retrans Queue can be large and we can overwhelm the
-            // receiver with retransmissions.
-            // We will keep the rwin <= ave real input queue size.
-            int aveIQ = calcAVEIQ(sackList.length);
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("remote IQ free space = " + mrrIQFreeSpace + " remote avg IQ occupancy = " + aveIQ);
-            }
-
-            int retrans = 0;
-
-            if (sackList.length > 0) {
-                Iterator eachRetrQElement = retrQ.iterator();
-
-                int currentSACK = 0;
-
-                while (eachRetrQElement.hasNext()) {
-                    RetrQElt r = (RetrQElt) eachRetrQElement.next();
-
-                    while (sackList[currentSACK] < r.seqnum) {
-                        currentSACK++;
-                        if (currentSACK == sackList.length) {
-                            break;
-                        }
-                    }
-
-                    if (currentSACK == sackList.length) {
-                        break;
-                    }
-
-                    if (sackList[currentSACK] == r.seqnum) {
-                        eachRetrQElement.remove();
-
-                        // ack counter
-                        numberACKed++;
-
-                        // for aveRTT calculation
-                        long enqueuetime = r.enqueuedAt;
-
-                        // Update RTT, RTO
-                        if (enqueuetime != 0) {
-                            calcRTT(enqueuetime);
-                        }
-
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("TLS!! SACKD SEQN = " + r.seqnum);
-                        }
-
-                        // GC this stuff
-                        r.msg.clear();
-                        r.msg = null;
-                        r = null;
-
-                    } else {
-                        // Retransmit? Only if there is a hole in the selected
-                        // acknowledgement list. Otherwise let RTO deal.
-                        // Given that this SACK acknowledged messages still
-                        // in the retrQ:
-                        // seqnum is the max consectively SACKD message.
-                        // seqnum < r.seqnum means a message has not reached
-                        // receiver. EG: sacklist == 10,11,13 seqnum == 11
-                        // We retransmit 12.
-                        if (seqnum < r.seqnum) {
-                            retrans++;
-
-                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                LOG.fine("RETR: Fill hole, SACK, seqn#" + r.seqnum + ", Window =" + retrans);
-                            }
-                        }
-                    }
-                }
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("TLS!! SELECTIVE ACKD (" + numberACKed + ") " + retrans + " retrans wanted");
-                }
-
-                // retransmit 1 retq mem. only
-                if (retrans > 0) {
-                    retransmit(Math.min(RWINDOW, retrans), lastACKTime);
-                    sackRetransTime = TimeUtils.timeNow();
-                }
-            }
-
-            retrQ.notify();
-        }
-    }
-
-    /**
-     * retransmit unacknowledged  messages
-     *
-     *  @param rwin max number of messages to retransmit
-     *  @return number of messages retransmitted.
-     **/
-    private int retransmit(int rwin, long triggerTime) {
-        List retransMsgs = new ArrayList();
-
-        int numberToRetrans;
-
-        // build a list of retries.
-        synchronized (retrQ) {
-            numberToRetrans = Math.min(retrQ.size(), rwin);
-
-            if (numberToRetrans > 0 && Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("RETRANSMITING [rwindow = " + numberToRetrans + "]");
-            }
-
-            for (int j = 0; j < numberToRetrans; j++) {
-                RetrQElt r = retrQ.get(j);
-
-                // Mark message as retransmission
-                // need to know if a msg was retr or not for RTT eval
-
-                if (r.marked == 0) {
-
-                    // First time: we're here because this message has not arrived, but
-                    // the next one has. It may be an out of order message.
-                    // Experience shows that such a message rarely arrives older than
-                    // 1.2 * aveRTT. Beyond that, it's lost. It is also rare that we
-                    // detect a hole within that delay. So, often enough, as soon as
-                    // a hole is detected, it's time to resend...but not always.
-
-                    if (TimeUtils.toRelativeTimeMillis(triggerTime, r.sentAt) < (6 * aveRTT) / 5) {
-
-                        // Nothing to worry about, yet.
-                        continue;
-                    }
-
-                } else {
-
-                    // That one has been retransmitted at least once already.
-                    // So, we don't have much of a clue other than the age of the
-                    // last transmission. It is unlikely that it arrives before aveRTT/2
-                    // but we have to anticipate its loss at the risk of making dupes.
-                    // Otherwise the receiver will reach the hole, and that's really
-                    // expensive. (Think that we've been trying for a while already.)
-
-                    if (TimeUtils.toRelativeTimeMillis(triggerTime, r.sentAt) < aveRTT) {
-
-                        // Nothing to worry about, yet.
-                        continue;
-                    }
-                }
-
-                r.marked++;
-                // Make a copy to for sending
-                retransMsgs.add(r);
-            }
-        }
-
-        // send the retries.
-        int retransmitted = 0;
-
-        Iterator eachRetrans = retransMsgs.iterator();
-
-        while (eachRetrans.hasNext()) {
-            RetrQElt r = (RetrQElt) eachRetrans.next();
-
-            eachRetrans.remove();
-
-            try {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("TLS!! RETRANSMIT seqn#" + r.seqnum);
-                }
-
-                Message sending = r.msg;
-
-                // its possible that the message was acked while we were working
-                // in this case r.msg will have been nulled.
-                if (null != sending) {
-                    sending = sending.clone();
-                    sending.replaceMessageElement(JTlsDefs.TLSNameSpace, RETELT);
-                    if (conn.sendToRemoteTls(sending)) {
-                        mrrIQFreeSpace--; // assume we have now taken a slot
-                        retransmitted++;
-                    } else {
-                        break;
-                    } // don't bother continuing.
-                }
-            } catch (IOException e) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.log(Level.FINE, "FAILED RETRANS seqn#" + r.seqnum, e);
-                }
-                break; // don't bother continuing.
-            }
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("RETRANSMITED " + retransmitted + " of " + numberToRetrans);
-        }
-
-        return retransmitted;
-    }
-
-    /**
-     * Retransmission daemon thread
-     **/
-    private class Retransmitter implements Runnable {
-
-        Thread retransmitterThread;
-        volatile int nretransmitted = 0;
-        int nAtThisRTO = 0;
-
-        public Retransmitter() {
-
-            this.retransmitterThread = new Thread(tp.myThreadGroup, this, "JXTA TLS Retransmiter for " + conn.destAddr);
-            retransmitterThread.setDaemon(true);
-            retransmitterThread.start();
-
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("STARTED TLS Retransmit thread, RTO = " + RTO);
-            }
-        }
-
-        public int getRetransCount() {
-            return nretransmitted;
-        }
-
-        /**
-         *  {@inheritDoc]
-         **/
-        public void run() {
-
-            try {
-                int idleCounter = 0;
-
-                while (!closed) {
-                    long conn_idle = TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), conn.lastAccessed);
-
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("RETRANS : " + conn + " idle for " + conn_idle);
-                    }
-
-                    // check to see if we have not idled out.
-                    if (tp.CONNECTION_IDLE_TIMEOUT < conn_idle) {
-                        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                            LOG.info("RETRANS : Shutting down idle connection: " + conn);
-                        }
-                        try {
-                            setClosing();
-                            // the following call eventually closes this stream
-                            conn.close(HandshakeState.CONNECTIONDEAD);
-                            // Leave. Otherwise we'll be spinning forever
-                            return;
-                        } catch (IOException ignored) {
-                            ;
-                        }
-                        continue;
-                    }
-
-                    synchronized (retrQ) {
-                        try {
-                            retrQ.wait(RTO);
-                        } catch (InterruptedException e) {
-                            Thread.interrupted();
-                        }
-                    }
-                    if (closed) {
-                        break;
-                    }
-
-                    // see if we recently did a retransmit triggered by a SACK
-                    long sinceLastSACKRetr = TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), sackRetransTime);
-
-                    if (sinceLastSACKRetr < RTO) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("RETRANS : SACK retrans " + sinceLastSACKRetr + "ms ago");
-                        }
-
-                        continue;
-                    }
-
-                    // See how long we've waited since RTO was set
-                    long sinceLastACK = TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), lastACKTime);
-                    long oldestInQueueWait;
-
-                    synchronized (retrQ) {
-                        if (retrQ.size() > 0) {
-                            oldestInQueueWait = TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), retrQ.get(0).enqueuedAt);
-                        } else {
-                            oldestInQueueWait = 0;
-                        }
-                    }
-
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("RETRANS : Last ACK " + sinceLastACK + "ms ago. Age of oldest in Queue " + oldestInQueueWait + "ms");
-                    }
-
-                    // see if the queue has gone dead
-                    if (oldestInQueueWait > (tp.RETRMAXAGE * 2)) {
-                        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                            LOG.info("RETRANS : Shutting down stale connection: " + conn);
-                        }
-                        try {
-                            setClosing();
-                            conn.close(HandshakeState.CONNECTIONDEAD);
-                            // Leave. Otherwise we'll be spinning forever.
-                            return;
-                        } catch (IOException ignored) {
-                            ;
-                        }
-                        continue;
-                    }
-
-                    // get real wait as max of age of oldest in retrQ and
-                    // lastAck time
-                    long realWait = Math.max(oldestInQueueWait, sinceLastACK);
-
-                    // Retransmit only if RTO has expired.
-                    // a. real wait time is longer than RTO
-                    // b. oldest message on Q has been there longer
-                    // than RTO. This is necessary because we may
-                    // have just sent a message, and we do not
-                    // want to overrun the receiver. Also, we
-                    // do not want to restransmit a message that
-                    // has not been idle for the RTO.
-                    if ((realWait >= RTO) && (oldestInQueueWait >= RTO)) {
-
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("RETRANS : RTO RETRANSMISSION [" + RWINDOW + "]");
-                        }
-
-                        // retrasmit
-                        int retransed = retransmit(RWINDOW, TimeUtils.timeNow());
-
-                        // Total
-                        nretransmitted += retransed;
-
-                        // number at this RTO
-                        nAtThisRTO += retransed;
-
-                        // See if real wait is too long and queue is non-empty
-                        // Remote may be dead - double until max.
-                        // Double after window restransmitted msgs at this RTO
-                        // exceeds the RWINDOW, and we've had no response for
-                        // twice the current RTO.
-                        if ((retransed > 0) && (realWait >= 2 * RTO) && (nAtThisRTO >= 2 * RWINDOW)) {
-                            RTO = (realWait > maxRTO ? maxRTO : 2 * RTO);
-                            nAtThisRTO = 0;
-                        }
-
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("RETRANS : RETRANSMISSION " + retransed + " retrans " + nAtThisRTO + " at this RTO (" + RTO
-                                    + ") " + nretransmitted + " total retrans");
-                        }
-                    } else {
-                        idleCounter += 1;
-
-                        // reset RTO to min if we are idle
-                        if (idleCounter == 2) {
-                            RTO = minRTO;
-                            idleCounter = 0;
-                            nAtThisRTO = 0;
-                        }
-
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("RETRANS : IDLE : RTO=" + RTO + " WAIT=" + realWait);
-                        }
-                    }
-                }
-            } catch (Throwable all) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Uncaught Throwable in thread :" + Thread.currentThread().getName(), all);
-                }
-            } finally {
-                if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                    LOG.info("STOPPED TLS Retransmit thread");
-                }
-
-                retransmitterThread = null;
-                retransmitter = null;
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/TlsConn.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/TlsConn.java
deleted file mode 100644 (file)
index a3e80dd..0000000
+++ /dev/null
@@ -1,741 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *
- *  The Sun Project JXTA(TM) Software License
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *
- *  3. The end-user documentation included with the redistribution, if any, must
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if
- *     and wherever such third-party acknowledgments normally appear.
- *
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must
- *     not be used to endorse or promote products derived from this software
- *     without prior written permission. For written permission, please contact
- *     Project JXTA at http://www.jxta.org.
- *
- *  5. Products derived from this software may not be called "JXTA", nor may
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United
- *  States and other countries.
- *
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of
- *  the license in source files.
- *
- *  ====================================================================
- *
- *  This software consists of voluntary contributions made by many individuals
- *  on behalf of Project JXTA. For more information on Project JXTA, please see
- *  http://www.jxta.org.
- *
- *  This license is based on the BSD license adopted by the Apache Foundation.
- */
-
-package net.jxta.impl.endpoint.tls;
-
-import java.io.BufferedOutputStream;
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.security.cert.X509Certificate;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.Provider;
-import java.security.Security;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLSession;
-import javax.net.ssl.SSLSocket;
-import net.jxta.document.MimeMediaType;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.Messenger;
-import net.jxta.endpoint.WireFormatMessage;
-import net.jxta.endpoint.WireFormatMessageFactory;
-import net.jxta.util.IgnoreFlushFilterOutputStream;
-import net.jxta.impl.membership.pse.PSECredential;
-import net.jxta.impl.util.TimeUtils;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-
-/**
- * This class implements the TLS connection between two peers.
- *
- *
- * <p/>Properties:
- *
- * <p/>net.jxta.impl.endpoint.tls.TMFAlgorithm - if defined provides the name of
- * the trust manager factory algorithm to use.
- */
-class TlsConn {
-
-    /**
-     *  Logger
-     **/
-    private static final transient Logger LOG = Logger.getLogger(TlsConn.class.getName());
-    static final int BOSIZE = 16000;
-    /**
-     *  TLS transport this connection is working for.
-     **/
-    final TlsTransport transport;
-    /**
-     *  The address of the peer to which we will be forwarding ciphertext
-     *  messages.
-     **/
-    final EndpointAddress destAddr;
-    /**
-     *  Are we client or server?
-     **/
-    private boolean client;
-    /**
-     *  State of the connection
-     **/
-    private volatile HandshakeState currentState;
-    /**
-     *  Are we currently closing? To prevent recursion in {@link close()}
-     **/
-    private boolean closing = false;
-    /**
-     *  Time that something "good" last happened on the connection
-     **/
-    long lastAccessed;
-    final String lastAccessedLock = new String("lastAccessedLock");
-    final String closeLock = new String("closeLock");
-    /**
-     *  Number of retransmissions we have received.
-     **/
-    int retrans;
-    /**
-     *  Our synthetic socket which sends and receives the ciphertext.
-     **/
-    final TlsSocket tlsSocket;
-    private final SSLContext context;
-    /**
-     * For interfacing with TLS
-     **/
-    private SSLSocket ssls;
-    /**
-     * We write our plaintext to this stream
-     **/
-    private OutputStream plaintext_out = null;
-    /**
-     *  Reads plaintext from the
-     **/
-    private PlaintextMessageReader readerThread = null;
-    /**
-     *  A string which we can lock on while acquiring new messengers. We don't
-     *  want to lock the whole connection object.
-     **/
-    private String acquireMessengerLock = new String("Messenger Acquire Lock");
-    /**
-     *  Cached messenger for sending to {@link destAddr}
-     **/
-    private Messenger outBoundMessenger = null;
-
-/**
-     *  Tracks the state of our TLS connection with a remote peer.
-     **/
-    enum HandshakeState {
-
-        /**
-         *  Handshake is ready to begin. We will be the client side.
-         */
-        CLIENTSTART
-
-        , /**
-         *  Handshake is ready to begin. We will be the server side.
-         */
-        SERVERSTART
-
-        , /**
-         *  Handshake is in progress.
-         */
-        HANDSHAKESTARTED
-
-        , /**
-         *  Handshake failed to complete.
-         */
-        HANDSHAKEFAILED
-
-        , /**
-         *  Handshake completed successfully.
-         */
-        HANDSHAKEFINISHED
-
-        , /**
-         *  Connection is closing.
-         */
-        CONNECTIONCLOSING
-
-        , /**
-         *  Connection has died.
-         */
-        CONNECTIONDEAD
-    }
-
-    /**
-     *  Create a new connection
-     **/
-    TlsConn(TlsTransport tp, EndpointAddress destAddr, boolean client) throws Exception {
-        this.transport = tp;
-        this.destAddr = destAddr;
-        this.client = client;
-        this.currentState = client ? HandshakeState.CLIENTSTART : HandshakeState.SERVERSTART;
-        this.lastAccessed = TimeUtils.timeNow();
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info((client ? "Initiating" : "Accepting") + " new connection for : " + destAddr.getProtocolAddress());
-        }
-
-        boolean choseTMF = false;
-        javax.net.ssl.TrustManagerFactory tmf = null;
-        String overrideTMF = System.getProperty("net.jxta.impl.endpoint.tls.TMFAlgorithm");
-
-        if ((!choseTMF) && (null != overrideTMF)) {
-            tmf = javax.net.ssl.TrustManagerFactory.getInstance(overrideTMF);
-            choseTMF = true;
-        }
-
-        Collection providers = Arrays.asList(Security.getProviders());
-
-        Set providerNames = new HashSet();
-
-        Iterator eachProvider = providers.iterator();
-
-        while (eachProvider.hasNext()) {
-            providerNames.add(((Provider) eachProvider.next()).getName());
-        }
-
-        if ((!choseTMF) && providerNames.contains("SunJSSE")) {
-            tmf = javax.net.ssl.TrustManagerFactory.getInstance("SunX509", "SunJSSE");
-            choseTMF = true;
-        }
-
-        if ((!choseTMF) && providerNames.contains("IBMJSSE")) {
-            tmf = javax.net.ssl.TrustManagerFactory.getInstance("IbmX509", "IBMJSSE");
-            choseTMF = true;
-        }
-
-        // XXX 20040830 bondolo Other solutions go here!
-        if (!choseTMF) {
-            tmf = javax.net.ssl.TrustManagerFactory.getInstance(javax.net.ssl.TrustManagerFactory.getDefaultAlgorithm());
-            LOG.warning("Using defeualt Trust Manager Factory algorithm. This may not work as expected.");
-        }
-
-        KeyStore trusted = transport.membership.getPSEConfig().getKeyStore();
-
-        tmf.init(trusted);
-
-        javax.net.ssl.TrustManager[] tms = tmf.getTrustManagers();
-
-        javax.net.ssl.KeyManager[] kms = new javax.net.ssl.KeyManager[]{new PSECredentialKeyManager(transport.credential, trusted)};
-
-        context = SSLContext.getInstance("TLS");
-        context.init(kms, tms, null);
-
-        javax.net.ssl.SSLSocketFactory factory = context.getSocketFactory();
-
-        // endpoint interface
-        TlsSocket newConnect = new TlsSocket(new JTlsInputStream(this, tp.MIN_IDLE_RECONNECT), new JTlsOutputStream(transport, this));
-
-        // open SSL socket and do the handshake
-        ssls = (SSLSocket) factory.createSocket(newConnect, destAddr.getProtocolAddress(), JTlsDefs.FAKEPORT, true);
-        ssls.setEnabledProtocols(new String[]{"TLSv1"});
-        ssls.setUseClientMode(client);
-        if (!client) {
-            ssls.setNeedClientAuth(true);
-        }
-
-        // We have to delay initialization of this until we have set the
-        // handshake mode.
-        tlsSocket = newConnect;
-    }
-
-    /**
-     *  @inheritDoc
-     *
-     *  <p/>An implementation which is useful for debugging.
-     **/
-    @Override
-    public String toString() {
-        return super.toString() + "/" + getHandshakeState() + ":" + (client ? "Client" : "Server") + " for " + destAddr;
-    }
-
-    /**
-     *  Returns the current state of the connection
-     *
-     *  @return the current state of the connection.
-     **/
-    HandshakeState getHandshakeState() {
-        return currentState;
-    }
-
-    /**
-     *  Changes the state of the connection. Calls
-     *  {@link java.lang.Object#notifyAll()} to wake any threads waiting on
-     *  connection state changes.
-     *
-     *  @param newstate the new connection state.
-     *  @return the previous state of the connection.
-     **/
-    synchronized HandshakeState setHandshakeState(HandshakeState newstate) {
-
-        HandshakeState oldstate = currentState;
-
-        currentState = newstate;
-        notifyAll();
-        return oldstate;
-    }
-
-    /**
-     * Open the connection with the remote peer.
-     **/
-    void finishHandshake() throws IOException {
-
-        long startTime = 0;
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            startTime = TimeUtils.timeNow();
-            LOG.info((client ? "Client:" : "Server:") + " Handshake START");
-        }
-
-        setHandshakeState(HandshakeState.HANDSHAKESTARTED);
-
-        // this starts a handshake
-        SSLSession newSession = ssls.getSession();
-
-        if ("SSL_NULL_WITH_NULL_NULL".equals(newSession.getCipherSuite())) {
-            setHandshakeState(HandshakeState.HANDSHAKEFAILED);
-            throw new IOException("Handshake failed");
-        }
-
-        setHandshakeState(HandshakeState.HANDSHAKEFINISHED);
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            long hsTime = TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), startTime) / TimeUtils.ASECOND;
-
-            LOG.info((client ? "Client:" : "Server:") + "Handshake DONE in " + hsTime + " secs");
-        }
-
-        // set up plain text i/o
-        // writes to be encrypted
-        plaintext_out = new BufferedOutputStream(ssls.getOutputStream(), BOSIZE);
-
-        // Start reader thread
-        readerThread = new PlaintextMessageReader(ssls.getInputStream());
-    }
-
-    /**
-     *  Close this connection.
-     *
-     *  @param finalstate state that the connection will be in after close.
-     **/
-    void close(HandshakeState finalstate) throws IOException {
-        synchronized (lastAccessedLock) {
-            lastAccessed = Long.MIN_VALUE;
-        }
-        synchronized (closeLock) {
-            closing = true;
-
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("Shutting down " + this);
-            }
-
-            setHandshakeState(HandshakeState.CONNECTIONCLOSING);
-
-            try {
-                if (null != tlsSocket) {
-                    try {
-                        tlsSocket.close();
-                    } catch (IOException ignored) {
-                        ;
-                    }
-                }
-
-                if (null != ssls) {
-                    try {
-                        ssls.close();
-                    } catch (IOException ignored) {
-                        ;
-                    }
-                    ssls = null;
-                }
-
-                if (null != outBoundMessenger) {
-                    outBoundMessenger.close();
-                    outBoundMessenger = null;
-                }
-            } catch (Throwable failed) {
-                if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                    LOG.log(Level.INFO, "Throwable during close " + this, failed);
-                }
-
-                IOException failure = new IOException("Throwable during close()");
-
-                failure.initCause(failed);
-            } finally {
-                closeLock.notifyAll();
-                closing = false;
-                setHandshakeState(finalstate);
-            }
-        }
-    }
-
-    /**
-     * Used by the TlsManager and the TlsConn in order to send a message,
-     * either a TLS connection establishment, or TLS fragments to the remote TLS.
-     *
-     *  @param msg message to send to the remote TLS peer.
-     *  @return if true then message was sent, otherwise false.
-     *  @throws IOException if there was a problem sending the message.
-     **/
-    boolean sendToRemoteTls(Message msg) throws IOException {
-
-        synchronized (acquireMessengerLock) {
-            if ((null == outBoundMessenger) || outBoundMessenger.isClosed()) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Getting messenger for " + destAddr);
-                }
-
-                EndpointAddress realAddr = new EndpointAddress(destAddr, JTlsDefs.ServiceName, null);
-
-                // Get a messenger.
-                outBoundMessenger = transport.endpoint.getMessenger(realAddr);
-
-                if (outBoundMessenger == null) {
-                    if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                        LOG.severe("Could not get messenger for " + realAddr);
-                    }
-                    return false;
-                }
-            }
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Sending " + msg + " to " + destAddr);
-        }
-
-        // Good we have a messenger. Send the message.
-        return outBoundMessenger.sendMessage(msg);
-    }
-
-    /**
-     * sendMessage is called by the TlsMessenger each time a service or
-     * an application sends a new message over a TLS connection.
-     * IOException is thrown when something goes wrong.
-     *
-     * <p/>The message is encrypted by TLS ultimately calling
-     * JTlsOutputStream.write(byte[], int, int); with the resulting TLS
-     * Record(s).
-     *
-     *  @param msg The plaintext message to be sent via this connection.
-     *  @throws IOException for errors in sending the message.
-     **/
-    void sendMessage(Message msg) throws IOException {
-
-        try {
-            WireFormatMessage serialed = WireFormatMessageFactory.toWire(msg, JTlsDefs.MTYPE, (MimeMediaType[]) null);
-
-            serialed.sendToStream(new IgnoreFlushFilterOutputStream(plaintext_out));
-
-            plaintext_out.flush();
-        } catch (IOException failed) {
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.log(Level.INFO, "Closing " + this + " due to exception ", failed);
-            }
-
-            close(HandshakeState.CONNECTIONDEAD);
-            throw failed;
-        }
-    }
-
-/**
-     * This is our message reader thread. This reads from the plaintext input
-     * stream and dispatches messages received to the endpoint.
-     **/
-    private class PlaintextMessageReader implements Runnable {
-
-        InputStream ptin = null;
-        Thread workerThread = null;
-
-        public PlaintextMessageReader(InputStream ptin) {
-            this.ptin = ptin;
-
-            // start our thread
-            workerThread = new Thread(TlsConn.this.transport.myThreadGroup, this, "JXTA TLS Plaintext Reader for " + TlsConn.this.destAddr);
-            workerThread.setDaemon(true);
-            workerThread.start();
-
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("Started ReadPlaintextMessage thread for " + TlsConn.this.destAddr);
-            }
-        }
-
-        /**
-         *  @inheritDoc
-         **/
-        public void run() {
-            try {
-                while (true) {
-                    try {
-                        Message msg = WireFormatMessageFactory.fromWire(ptin, JTlsDefs.MTYPE, null);
-
-                        if (null == msg) {
-                            break;
-                        }
-
-                        // dispatch it to TlsTransport for demuxing
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Dispatching " + msg + " to TlsTransport");
-                        }
-
-                        TlsConn.this.transport.processReceivedMessage(msg);
-
-                        synchronized (TlsConn.this.lastAccessedLock) {
-                            TlsConn.this.lastAccessed = TimeUtils.timeNow(); // update idle timer
-                        }
-                    } catch (IOException iox) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.log(Level.WARNING, "I/O error while reading decrypted Message", iox);
-                        }
-
-                        break;
-                    }
-                }
-            } catch (Throwable all) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Uncaught Throwable in thread :" + Thread.currentThread().getName(), all);
-                }
-            } finally {
-                workerThread = null;
-            }
-
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("Finishing ReadPlaintextMessage thread");
-            }
-        }
-    }
-
-/**
-     *  A private key manager which selects based on the key and cert chain found
-     *  in a PSE Credential.
-     *
-     *  <p/>TODO Promote this class to a full featured interface for all of the
-     *  active PSECredentials. Currently the alias "theone" is used to refer to
-     *  the
-     **/
-    private static class PSECredentialKeyManager implements javax.net.ssl.X509KeyManager {
-
-        PSECredential cred;
-        KeyStore trusted;
-
-        public PSECredentialKeyManager(PSECredential useCred, KeyStore trusted) {
-            this.cred = useCred;
-            this.trusted = trusted;
-        }
-
-        /**
-         *  {@inheritDoc}
-         **/
-        public String chooseClientAlias(String[] keyType, java.security.Principal[] issuers, java.net.Socket socket) {
-            for (String aKeyType : Arrays.asList(keyType)) {
-                String result = checkTheOne(aKeyType, Arrays.asList(issuers));
-
-                if (null != result) {
-                    return result;
-                }
-            }
-
-            return null;
-        }
-
-        /**
-         * Checks to see if a peer that trusts the given issuers would trust the
-         * special alias THE_ONE, returning it if so, and null otherwise.
-         *
-         * @param keyType the type of key a Certificate must use to be considered
-         * @param issuers the issuers trusted by the other peer
-         * @return "theone" if one of the Certificates in this peer's PSECredential's
-         *          Certificate chain matches the given keyType and one of the issuers,
-         *          or <code>null</code>
-         */
-        private String checkTheOne(String keyType, Collection<java.security.Principal> allIssuers) {
-            List<X509Certificate> certificates = Arrays.asList(cred.getCertificateChain());
-
-            for (X509Certificate certificate : certificates) {
-                if (!certificate.getPublicKey().getAlgorithm().equals(keyType)) {
-                    continue;
-                }
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("CHECKING: " + certificate.getIssuerX500Principal() + " in " + allIssuers);
-                }
-
-                if (allIssuers.contains(certificate.getIssuerX500Principal())) {
-                    return "theone";
-                }
-            }
-            return null;
-        }
-
-        /**
-         *  {@inheritDoc}
-         **/
-        public String chooseServerAlias(String keyType, java.security.Principal[] issuers, java.net.Socket socket) {
-            String[] available = getServerAliases(keyType, issuers);
-
-            if (null != available) {
-                return available[0];
-            } else {
-                return null;
-            }
-        }
-
-        /**
-         *  {@inheritDoc}
-         **/
-        public X509Certificate[] getCertificateChain(String alias) {
-            if (alias.equals("theone")) {
-                return cred.getCertificateChain();
-            } else {
-                try {
-                    return (X509Certificate[]) trusted.getCertificateChain(alias);
-                } catch (KeyStoreException ignored) {
-                    return null;
-                }
-            }
-        }
-
-        /**
-         *  {@inheritDoc}
-         **/
-        public String[] getClientAliases(String keyType, java.security.Principal[] issuers) {
-            List clientAliases = new ArrayList();
-
-            try {
-                Enumeration eachAlias = trusted.aliases();
-
-                Collection allIssuers = null;
-
-                if (null != issuers) {
-                    allIssuers = Arrays.asList(issuers);
-                }
-
-                while (eachAlias.hasMoreElements()) {
-                    String anAlias = (String) eachAlias.nextElement();
-
-                    if (trusted.isCertificateEntry(anAlias)) {
-                        try {
-                            X509Certificate aCert = (X509Certificate) trusted.getCertificate(anAlias);
-
-                            if (null == aCert) {
-                                // strange... it should have been there...
-                                continue;
-                            }
-
-                            if (!aCert.getPublicKey().getAlgorithm().equals(keyType)) {
-                                continue;
-                            }
-
-                            if (null != allIssuers) {
-                                if (allIssuers.contains(aCert.getIssuerX500Principal())) {
-                                    clientAliases.add(anAlias);
-                                }
-                            } else {
-                                clientAliases.add(anAlias);
-                            }
-                        } catch (KeyStoreException ignored) {
-                            ;
-                        }
-                    }
-                }
-            } catch (KeyStoreException ignored) {
-                ;
-            }
-
-            return (String[]) clientAliases.toArray(new String[clientAliases.size()]);
-        }
-
-        /**
-         *  {@inheritDoc}
-         **/
-        public java.security.PrivateKey getPrivateKey(String alias) {
-            if (alias.equals("theone")) {
-                return cred.getPrivateKey();
-            } else {
-                return null;
-            }
-        }
-
-        /**
-         *  {@inheritDoc}
-         **/
-        public String[] getServerAliases(String keyType, java.security.Principal[] issuers) {
-            if (keyType.equals(cred.getCertificate().getPublicKey().getAlgorithm())) {
-                if (null == issuers) {
-                    return new String[]{"theone"};
-                } else {
-                    Collection allIssuers = Arrays.asList(issuers);
-
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Looking for : " + cred.getCertificate().getIssuerX500Principal());
-                        LOG.fine("Issuers : " + allIssuers);
-                        java.security.Principal prin = cred.getCertificate().getIssuerX500Principal();
-
-                        LOG.fine("  Principal Type :" + prin.getClass().getName());
-                        Iterator it = allIssuers.iterator();
-
-                        while (it.hasNext()) {
-                            java.security.Principal tmp = (java.security.Principal) it.next();
-
-                            LOG.fine("Issuer Type : " + tmp.getClass().getName());
-                            LOG.fine("Issuer value : " + tmp);
-                            LOG.fine("tmp.equals(prin) : " + tmp.equals(prin));
-                        }
-                    }
-
-                    X509Certificate[] chain = cred.getCertificateChain();
-                    for (X509Certificate aCert : Arrays.asList(chain)) {
-                        if (allIssuers.contains(aCert.getIssuerX500Principal())) {
-                            return new String[]{"theone"};
-                        }
-                    }
-                }
-            }
-            return null;
-        }
-    }
-}
\ No newline at end of file
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/TlsManager.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/TlsManager.java
deleted file mode 100644 (file)
index 2cfd157..0000000
+++ /dev/null
@@ -1,612 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.tls;
-
-
-import java.io.DataInputStream;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import java.io.IOException;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointListener;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-
-import net.jxta.impl.util.TimeUtils;
-
-import net.jxta.impl.endpoint.tls.TlsConn.HandshakeState;
-
-
-/**
- * Manages the connection pool between peers.
- **/
-class TlsManager implements EndpointListener {
-    
-    /**
-     *  Log4J Logger
-     **/
-    private final static transient Logger LOG = Logger.getLogger(TlsManager.class.getName());
-    
-    /**
-     *  Transport we are working for.
-     **/
-    private TlsTransport transport = null;
-    
-    /**
-     * Hash table for known connections
-     *
-     *  <ul>
-     *  <li>keys are {@link String } containing {@link net.jxta.peer.PeerID#getUniqueValue() PeerID.getUniqueValue()}</li>
-     *  <li>values are {@link TlsConn}<li>
-     *  </ul>
-     **/
-    private Map connections = new HashMap();
-    
-    /**
-     *  The last time at which we printed a warning about discarding messages
-     *  due to no authentication.
-     **/
-    private long lastNonAuthenticatedWarning = 0;
-    
-    /**
-     *  Standard Constructor for TLS Manager
-     **/
-    TlsManager(TlsTransport tp) {
-        this.transport = tp;
-    }
-    
-    /**
-     *  Close this manager. This involves closing all registered connections.
-     *
-     **/
-    void close() {
-        
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Shutting down all connections");
-        }
-        
-        synchronized (connections) {
-            Iterator eachConnection = connections.values().iterator();
-            
-            while (eachConnection.hasNext()) {
-                TlsConn aConnection = (TlsConn) eachConnection.next();
-                
-                try {
-                    aConnection.close(HandshakeState.CONNECTIONDEAD);
-                } catch (IOException ignored) {
-                    if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                        LOG.info("Non-fatal problem shutting down connection to " + aConnection);
-                    }
-                }
-                
-                eachConnection.remove();
-            }
-        }
-    }
-    
-    /**
-     *  Returns or creates a TLS Connection to the specified peer. If an
-     *  existing connection exists, it will be returned.
-     *
-     *  @param dstAddr the EndpointAddress of the remote peer.
-     *  @return A TLS Connection or null if the connection could not be opened.
-     **/
-    TlsConn getTlsConn(EndpointAddress dstAddr) {
-        
-        if (null == transport.credential) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Not authenticated. Cannot open connections.");
-            }
-            
-            return null;
-        }
-        
-        boolean startHandshake = false;
-        
-        // see if we have an existing conn, and if so, then reuse it
-        // if it has not timed out.
-        String paddr = dstAddr.getProtocolAddress();
-        
-        TlsConn conn = null;
-        
-        synchronized (connections) {
-            conn = (TlsConn) connections.get(paddr);
-            
-            // remove it if it is dead
-            if (null != conn) {
-                if ((HandshakeState.CONNECTIONDEAD == conn.getHandshakeState())
-                        || (HandshakeState.HANDSHAKEFAILED == conn.getHandshakeState())) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Removing connection for: " + paddr);
-                    }
-                    connections.remove(paddr);
-                    conn = null;
-                }
-            }
-            
-            // create the connection info entry as needed
-            if (null == conn) {
-                try {
-                    conn = new TlsConn(transport, dstAddr, true); // true means client
-                } catch (Exception failed) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Failed making connection to " + paddr, failed);
-                    }
-                    
-                    return null;
-                }
-                
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Adding connection for: " + paddr);
-                }
-                connections.put(paddr, conn);
-                startHandshake = true;
-            }
-        }
-        
-        // if we got to be the first one to start the handshake then do it here.
-        // We do this outside of the synchro block so that others can enter the
-        // state machine.
-        if (startHandshake) {
-            try {
-                // OK. We are originating the connection:
-                // Open the connection (returns when handshake is completed)
-                // or throws an IOException if a TLS internal error occurs.
-                if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                    LOG.info("Start of client handshake for " + paddr);
-                }
-                
-                conn.finishHandshake();
-            } catch (Throwable e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failed making connection to " + paddr, e);
-                }
-                
-                synchronized (connections) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Removing connection for: " + paddr);
-                    }
-                    connections.remove(paddr);
-                }
-                try {
-                    conn.close(HandshakeState.HANDSHAKEFAILED);
-                } catch (IOException ignored) {
-                    ;
-                }
-                
-                return null;
-            }
-        }
-        
-        do {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("getting " + conn);
-            }
-            
-            synchronized (conn) {
-                HandshakeState currentState = conn.getHandshakeState();
-                
-                if ((HandshakeState.SERVERSTART == currentState) || (HandshakeState.CLIENTSTART == currentState)) {
-                    // wait for the handshake to get going on another thread.
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Sleeping until handshake starts for " + paddr);
-                    }
-                    
-                    try {
-                        conn.wait(TimeUtils.ASECOND);
-                    } catch (InterruptedException woken) {
-                        Thread.interrupted();
-                    }
-                    continue;
-                } else if (HandshakeState.HANDSHAKESTARTED == currentState) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Handshake in progress for " + paddr);
-                    }
-                    
-                    try {
-                        // sleep forever waiting for the state to change.
-                        conn.wait(200);
-                    } catch (InterruptedException woken) {
-                        Thread.interrupted();
-                    }
-                    continue;
-                } else if (HandshakeState.HANDSHAKEFINISHED == currentState) {
-                    
-                    if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                        LOG.info("Returning active connection to " + paddr);
-                    }
-                    
-                    conn.lastAccessed = TimeUtils.timeNow(); // update idle timer
-                    
-                    return conn;
-                } else if (HandshakeState.HANDSHAKEFAILED == currentState) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Handshake failed. " + paddr + " unreachable");
-                    }
-                    
-                    return null;
-                } else if (HandshakeState.CONNECTIONDEAD == currentState) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Connection dead for " + paddr);
-                    }
-                    
-                    return null;
-                } else if (HandshakeState.CONNECTIONCLOSING == currentState) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Connection closing for " + paddr);
-                    }
-                    
-                    return null;
-                } else {
-                    if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                        LOG.severe("Unhandled Handshake state: " + currentState);
-                    }
-                }
-            }
-        } while (true);
-    }
-    
-    /**
-     * Handle an incoming message from the endpoint. This method demultiplexes
-     * incoming messages to the connection objects by their source address.
-     *
-     * <p/>Several types of messages may be received for a connection:
-     *
-     * <ul>
-     * <li>TLS Elements</li>
-     *  <li>Element Acknowledgements</li>
-     * </ul>
-     *
-     * @param msg is the incoming message
-     * @param srcAddr is the address of the source of the message
-     * @param dstAddr is the address of the destination of the message
-     **/
-    public void processIncomingMessage(Message msg, EndpointAddress srcAddr, EndpointAddress dstAddr) {
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Starts for " + msg);
-        }
-        
-        if (null == transport.credential) {
-            // ignore ALL messages until we are authenticated.
-            if (TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), lastNonAuthenticatedWarning) > TimeUtils.AMINUTE) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("NOT AUTHENTICATED--Discarding all incoming messages");
-                }
-                
-                lastNonAuthenticatedWarning = TimeUtils.timeNow();
-            }
-            
-            return;
-        }
-        
-        // determine if its a retry.
-        MessageElement retryElement = msg.getMessageElement(JTlsDefs.TLSNameSpace, JTlsDefs.RETR);
-        boolean retrans = (null != retryElement);
-        
-        if (retrans) {
-            msg.removeMessageElement(retryElement);
-            retryElement = null;
-        }
-        
-        int seqN = getMsgSequenceNumber(msg);
-        
-        // Extract unique part of source address
-        String paddr = srcAddr.getProtocolAddress();
-        
-        TlsConn conn = null;
-        
-        boolean serverStart = false;
-        
-        synchronized (connections) {
-            // Will be in our hash table unless this is for a first time
-            // incoming connection request
-            conn = (TlsConn) connections.get(paddr);
-            
-            if (null != conn) {
-                // check if the connection has idled out and remote is asking for a restart.
-                if (TlsTransport.ACT_AS_SERVER && (1 == seqN)) {
-                    synchronized (conn) {
-                        long idle = TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), conn.lastAccessed);
-                        
-                        if (idle > transport.MIN_IDLE_RECONNECT) {
-                            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                                LOG.warning("Restarting : " + conn + " which has been idle for " + idle + " millis");
-                            }
-                            try {
-                                conn.close(HandshakeState.CONNECTIONDEAD);
-                            } catch (IOException ignored) {
-                                ;
-                            }
-                        }
-                    }
-                }
-                
-                // remove it if it is dead
-                if ((HandshakeState.CONNECTIONDEAD == conn.getHandshakeState())
-                        || (HandshakeState.HANDSHAKEFAILED == conn.getHandshakeState())) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Removing connection for: " + paddr);
-                    }
-                    connections.remove(paddr);
-                    conn = null;
-                }
-            }
-            
-            // we don't have a connection to this destination, make a new connection if seqn#1
-            if (null == conn) {
-                if (TlsTransport.ACT_AS_SERVER && (1 == seqN)) {
-                    try {
-                        conn = new TlsConn(transport, srcAddr, false); // false means Server
-                    } catch (Exception failed) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.log(Level.WARNING, "Failed making connection for" + paddr, failed);
-                        }
-                        return;
-                    }
-                    
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Adding connection for: " + paddr);
-                    }
-                    connections.put(paddr, conn);
-                    serverStart = true;
-                } else {
-                    // Garbage from an old connection. discard it
-                    
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning(msg + " is not start of handshake (seqn#" + seqN + ") for " + paddr);
-                    }
-                    
-                    msg.clear();
-                    return;
-                }
-            }
-        }
-        
-        // if this is a new connection, get it started.
-        if (serverStart) {
-            try {
-                if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                    LOG.info("Start of SERVER handshake for " + paddr);
-                }
-                
-                // Queue message up for TlsInputStream on that connection
-                conn.tlsSocket.input.queueIncomingMessage(msg);
-                
-                // Start the TLS Server and complete the handshake
-                conn.finishHandshake(); // open the TLS connection
-                
-                conn.lastAccessed = TimeUtils.timeNow();
-                
-                if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                    LOG.info("Handshake complete for SERVER TLS for: " + paddr);
-                }
-                
-                return;
-            } catch (Throwable e) {
-                // Handshake failure or IOException
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "TLS Handshake failure for connection: " + paddr, e);
-                }
-                
-                synchronized (connections) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Removing connection for: " + paddr);
-                    }
-                    connections.remove(paddr);
-                }
-                try {
-                    conn.close(HandshakeState.HANDSHAKEFAILED);
-                } catch (IOException ignored) {
-                    ;
-                }
-                
-                return;
-            }
-        }
-        
-        // handle an ongoing connection.
-        do {
-            HandshakeState currentState;
-            
-            synchronized (conn) {
-                if (retrans) {
-                    conn.retrans++;
-                    
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("retrans received, " + conn.retrans + " total.");
-                    }
-                    retrans = false;
-                }
-                
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Process incoming message for " + conn);
-                }
-                
-                currentState = conn.getHandshakeState();
-                
-                if ((HandshakeState.HANDSHAKESTARTED == currentState) || (HandshakeState.HANDSHAKEFINISHED == currentState)
-                        || (HandshakeState.CONNECTIONCLOSING == currentState)) {// we will process the message once we get out of sync.
-                } else if (HandshakeState.CONNECTIONDEAD == currentState) {
-                    // wait for the handshake to get going on another thread.
-                    if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                        LOG.info("Connection failed, discarding msg with seqn#" + seqN + " for " + paddr);
-                    }
-                    
-                    return;
-                } else if ((HandshakeState.SERVERSTART == currentState) || (HandshakeState.CLIENTSTART == currentState)) {
-                    // wait for the handshake to get going on another thread.
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Sleeping msg with seqn#" + seqN + " until handshake starts for " + paddr);
-                    }
-                    
-                    try {
-                        conn.wait(TimeUtils.AMINUTE);
-                    } catch (InterruptedException woken) {
-                        Thread.interrupted();
-                    }
-                    continue;
-                } else if (HandshakeState.HANDSHAKEFAILED == currentState) {
-                    // wait for the handshake to get going on another thread.
-                    if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                        LOG.info("Handshake failed, discarding msg with seqn#" + seqN + " for " + paddr);
-                    }
-                    
-                    return;
-                } else {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Unexpected state : " + currentState);
-                    }
-                }
-            }
-            
-            // Process any message outside of the sync on the connection.
-            if ((HandshakeState.HANDSHAKESTARTED == currentState) || (HandshakeState.HANDSHAKEFINISHED == currentState)
-                    || (HandshakeState.CONNECTIONCLOSING == currentState)) {
-                // process any ACK messages.
-                Iterator eachACK = msg.getMessageElements(JTlsDefs.TLSNameSpace, JTlsDefs.ACKS);
-                
-                while (eachACK.hasNext()) {
-                    MessageElement elt = (MessageElement) eachACK.next();
-                    
-                    eachACK.remove();
-                    
-                    int sackCount = ((int) elt.getByteLength() / 4) - 1;
-                    
-                    try {
-                        DataInputStream dis = new DataInputStream(elt.getStream());
-                        
-                        int seqack = dis.readInt();
-                        
-                        int[] sacs = new int[sackCount];
-                        
-                        for (int eachSac = 0; eachSac < sackCount; eachSac++) {
-                            sacs[eachSac] = dis.readInt();
-                        }
-                        
-                        Arrays.sort(sacs);
-                        
-                        // take care of the ACK here;
-                        conn.tlsSocket.output.ackReceived(seqack, sacs);
-                    } catch (IOException failed) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.log(Level.WARNING, "Failure processing ACK", failed);
-                        }
-                    }
-                }
-                
-                if (0 == seqN) {
-                    return;
-                }
-                
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Queue " + msg + " seqn#" + seqN + " for " + conn);
-                }
-                
-                // Queue message up for TlsInputStream on that connection
-                TlsSocket bound = conn.tlsSocket;
-                
-                if (null != bound) {
-                    bound.input.queueIncomingMessage(msg);
-                }
-                
-                return;
-            }
-        } while (true);
-    }
-    
-    /**
-     * getMsgSequenceNumber
-     *
-     * @param msg  Input message
-     * @return int sequence number or 0 (zero) if no tls records in message.
-     **/
-    private static int getMsgSequenceNumber(Message msg) {
-        
-        int seqN = 0;
-        
-        Iterator eachElement = msg.getMessageElements(JTlsDefs.TLSNameSpace, JTlsDefs.BLOCKS);
-        
-        while (eachElement.hasNext()) {
-            MessageElement elt = (MessageElement) eachElement.next();
-            
-            try {
-                seqN = Integer.parseInt(elt.getElementName());
-            } catch (NumberFormatException e) {
-                // This element was not a TLS element. Get the next one
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Bad tls record name=" + elt.getElementName());
-                }
-                
-                eachElement.remove();
-                continue;
-            }
-            
-            break;
-        }
-        
-        return seqN;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/TlsMessenger.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/TlsMessenger.java
deleted file mode 100644 (file)
index 4e80d91..0000000
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.tls;
-
-
-import java.io.*;
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-import net.jxta.endpoint.*;
-import net.jxta.impl.endpoint.*;
-import net.jxta.impl.endpoint.tls.TlsConn.HandshakeState;
-
-
-/**
- * This class implements sending messages through a TLS connection.
- */
-public class TlsMessenger extends BlockingMessenger {
-    
-    private static final Logger LOG = Logger.getLogger(TlsMessenger.class.getName());
-    
-    private TlsTransport transport = null;
-    private TlsConn conn = null;
-    
-    /**
-     *  The source address of messages sent on this messenger.
-     */
-    private final EndpointAddress srcAddress;
-    
-    private final MessageElement srcAddressElement;
-    
-    TlsMessenger(EndpointAddress destAddress, TlsConn conn, TlsTransport tp) {
-        
-        // No need for self destruction.
-        super(tp.getPeerGroup().getPeerGroupID(), destAddress, false);
-        
-        if (conn == null) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("null TLS connection!");
-            }
-            throw new IllegalArgumentException("null TLS connection!");
-        }
-        
-        this.conn = conn;
-        this.transport = tp;
-        
-        this.srcAddress = transport.getPublicAddress();
-        
-        srcAddressElement = new StringMessageElement(EndpointServiceImpl.MESSAGE_SOURCE_NAME, srcAddress.toString()
-                ,
-                (MessageElement) null);
-    }
-    
-    /*
-     * The cost of just having a finalize routine is high. The finalizer is
-     * a bottleneck and can delay garbage collection all the way to heap
-     * exhaustion. Leave this comment as a reminder to future maintainers.
-     * Below is the reason why finalize is not needed here.
-     *
-     * These messengers never go to the application layer. The endpoint code
-     * always invokes close when needed.
-
-     protected void finalize() {
-     }
-
-     */
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized void closeImpl() {
-        super.close();
-        conn = null;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean isIdleImpl() {
-        // No need for self destruction.
-        return false;
-    }
-    
-    /**
-     * {@inheritDoc}
-     *
-     * <p/>The peer that is the destination is the logical address
-     */
-    @Override
-    public EndpointAddress getLogicalDestinationImpl() {
-        return new EndpointAddress("jxta", dstAddress.getProtocolAddress(), null, null);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized void sendMessageBImpl(Message message, String service, String serviceParam) throws IOException {
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Starting send for " + message);
-        }
-        
-        // check if the connection has died.
-        if (HandshakeState.CONNECTIONDEAD == conn.getHandshakeState()) {
-
-            // FIXME - jice@jxta.org 20040413: This will do but it causes the below exception to be shown as the cause of the
-            // failure, which is not true: nobody realy closed the messenger before it failed. It failed first.  Also, it used to
-            // shutdown this messenger, now it does not. What does is the call to closeImpl() that follows our IOException...(and
-            // that's how it should be). Transports should get a deeper retrofit eventually.
-
-            close();
-        }
-        
-        if (isClosed()) {
-            IOException failure = new IOException("Messenger is closed, it cannot be used to send messages.");
-            
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, failure.getMessage(), failure);
-            }
-            
-            throw failure;
-        }
-        
-        // Set the message with the appropriate src and dest address
-        message.replaceMessageElement(EndpointServiceImpl.MESSAGE_SOURCE_NS, srcAddressElement);
-        
-        MessageElement dstAddressElement = new StringMessageElement(EndpointServiceImpl.MESSAGE_DESTINATION_NAME
-                ,
-                getDestAddressToUse(service, serviceParam).toString(), (MessageElement) null);
-        
-        message.replaceMessageElement(EndpointServiceImpl.MESSAGE_DESTINATION_NS, dstAddressElement);
-        
-        // Give the message to the TLS connection
-        try {
-            conn.sendMessage(message);
-        } catch (IOException caught) {
-            close();
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Message send to \'" + dstAddress + "\' failed for " + message, caught);
-            }
-            throw caught;
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Message send to \'" + dstAddress + "\' succeeded for " + message);
-        }
-    }    
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/TlsSocket.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/TlsSocket.java
deleted file mode 100644 (file)
index a38e1b8..0000000
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright (c) 2004-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.tls;
-
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.Socket;
-import java.net.SocketAddress;
-import java.nio.channels.SocketChannel;
-import net.jxta.impl.endpoint.IPUtils;
-
-
-/**
- * A "shim" socket which we provide to the TLS layer.
- */
-public class TlsSocket extends Socket {
-
-    final JTlsInputStream input;
-    final JTlsOutputStream output;
-
-    boolean connected = true;
-
-    /**
-     * Creates a new instance of TlsSocket
-     */
-    public TlsSocket(JTlsInputStream useInput, JTlsOutputStream useOutput) {
-        input = useInput;
-        output = useOutput;
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public void close() throws IOException {
-        input.close();
-        output.close();
-        connected = false;
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public InputStream getInputStream() throws IOException {
-        return input;
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public OutputStream getOutputStream() throws IOException {
-        return output;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean isBound() {
-        return connected;
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public boolean isConnected() {
-        return connected;
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public InetAddress getInetAddress() {
-        return IPUtils.LOOPBACK;
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public InetAddress getLocalAddress() {
-        return IPUtils.ANYADDRESS;
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public SocketAddress getRemoteSocketAddress() {
-        return new InetSocketAddress(IPUtils.LOOPBACK, 0);
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public SocketAddress getLocalSocketAddress() {
-        return new InetSocketAddress(IPUtils.ANYADDRESS, 0);
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public SocketChannel getChannel() {
-        return null;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/TlsTransport.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/TlsTransport.java
deleted file mode 100644 (file)
index b1fc8cf..0000000
+++ /dev/null
@@ -1,772 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.tls;
-
-
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.net.URI;
-import java.security.cert.X509Certificate;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.ResourceBundle;
-import javax.security.auth.x500.X500Principal;
-
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.security.InvalidKeyException;
-import java.security.KeyStoreException;
-import java.security.SignatureException;
-import java.util.MissingResourceException;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import net.jxta.document.Advertisement;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageReceiver;
-import net.jxta.endpoint.MessageSender;
-import net.jxta.endpoint.Messenger;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.membership.MembershipService;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.platform.Module;
-import net.jxta.protocol.ModuleImplAdvertisement;
-
-import net.jxta.exception.PeerGroupException;
-
-import net.jxta.impl.endpoint.LoopbackMessenger;
-import net.jxta.impl.membership.pse.PSECredential;
-import net.jxta.impl.membership.pse.PSEMembershipService;
-import net.jxta.impl.peergroup.GenericPeerGroup;
-import net.jxta.impl.util.TimeUtils;
-
-
-/**
- *  A JXTA {@link net.jxta.endpoint.MessageTransport} implementation which
- *  uses TLS sockets.
- */
-public class TlsTransport implements Module, MessageSender, MessageReceiver {
-    
-    /**
-     *   Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(TlsTransport.class.getName());
-    
-    /**
-     *  If true then we can accept incoming connections. Eventually this should
-     *  be coming out of the transport advertisement.
-     */
-    static final boolean ACT_AS_SERVER = true;
-    
-    private PeerGroup group = null;
-    ID assignedID = null;
-    ModuleImplAdvertisement implAdvertisement = null;
-    
-    EndpointService endpoint = null;
-    PSEMembershipService membership = null;
-    private membershipPCL membershipListener = null;
-    
-    X509Certificate[] serviceCert = null;
-    
-    PSECredential credential = null;
-    private credentialPCL credentialListener = null;
-    
-    EndpointAddress localPeerAddr = null;
-    EndpointAddress localTlsPeerAddr = null;
-    
-    /**
-     * local peerID
-     */
-    PeerID localPeerId = null;
-    
-    /**
-     *  Amount of a connection must be idle before a reconnection attempt will
-     *  be considered.
-     */
-    long MIN_IDLE_RECONNECT = 1 * TimeUtils.AMINUTE;
-    
-    /**
-     *  Amount of time after which a connection is considered idle and may be
-     *  scavenged.
-     */
-    long CONNECTION_IDLE_TIMEOUT = 5 * TimeUtils.AMINUTE;
-    
-    /**
-     *  Amount if time which retries may remain queued for retransmission. If
-     *  still unACKed after this amount of time then the connection is
-     *  considered dead.
-     */
-    long RETRMAXAGE = 2 * TimeUtils.AMINUTE;
-    
-    /**
-     *  Will manage connections to remote peers.
-     */
-    private TlsManager manager = null;
-    
-    /**
-     *  This is the thread group into which we will place all of the threads
-     *  we create. THIS HAS NO EFFECT ON SCHEDULING. Java thread groups are
-     *  only for organization and naming.
-     */
-    ThreadGroup myThreadGroup = null;
-    
-    /**
-     *  Extends LoopbackMessenger to add a message property to passed messages
-     *  so that TLS pipes and other users can be sure that the message
-     *  originate with the local TLS transport.
-     */
-    class TlsLoopbackMessenger extends LoopbackMessenger {
-        TlsLoopbackMessenger(EndpointService ep, EndpointAddress src, EndpointAddress dest, EndpointAddress logicalDest) {
-            super(group, ep, src, dest, logicalDest);
-        }
-        
-        /**
-         *  {@inheritDoc}
-         **/
-        @Override
-        public void sendMessageBImpl(Message message, String service, String serviceParam) throws IOException {
-            
-            // add a property to the message to indicate it came from us.
-            message.setMessageProperty(TlsTransport.class, TlsTransport.this);
-            
-            super.sendMessageBImpl(message, service, serviceParam);
-        }
-    }
-    
-    /**
-     *  Default constructor
-     **/
-    public TlsTransport() {
-        
-        // initialize connection timeout
-        try {
-            ResourceBundle jxtaRsrcs = ResourceBundle.getBundle("net.jxta.user");
-            
-            try {
-                String override_str = jxtaRsrcs.getString("impl.endpoint.tls.connection.idletimeout");
-                
-                if (null != override_str) {
-                    long override_long = Long.parseLong(override_str.trim());
-                    
-                    if (override_long >= 1) {
-                        CONNECTION_IDLE_TIMEOUT = override_long * TimeUtils.AMINUTE;
-                        
-                        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                            LOG.info("Adjusting TLS connection idle timeout to " + CONNECTION_IDLE_TIMEOUT + " millis.");
-                        }
-                    }
-                }
-            } catch (NumberFormatException badvalue) {
-                ;
-            }
-            
-            try {
-                String override_str = jxtaRsrcs.getString("impl.endpoint.tls.connection.minidlereconnect");
-                
-                if (null != override_str) {
-                    long override_long = Long.parseLong(override_str.trim());
-                    
-                    if (override_long >= 1) {
-                        MIN_IDLE_RECONNECT = override_long * TimeUtils.AMINUTE;
-                        
-                        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                            LOG.info("Adjusting TLS min reconnection idle to " + MIN_IDLE_RECONNECT + " millis.");
-                        }
-                    }
-                }
-            } catch (NumberFormatException badvalue) {
-                ;
-            }
-            
-            try {
-                String override_str = jxtaRsrcs.getString("impl.endpoint.tls.connection.maxretryage");
-                
-                if (null != override_str) {
-                    long override_long = Long.parseLong(override_str.trim());
-                    
-                    if (override_long >= 1) {
-                        RETRMAXAGE = override_long * TimeUtils.AMINUTE;
-                        
-                        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                            LOG.info("Adjusting TLS maximum retry queue age to " + RETRMAXAGE + " millis.");
-                        }
-                    }
-                }
-            } catch (NumberFormatException badvalue) {
-                ;
-            }
-            
-            // reconnect must be less the idle interval.
-            
-            MIN_IDLE_RECONNECT = Math.min(MIN_IDLE_RECONNECT, CONNECTION_IDLE_TIMEOUT);
-            
-            // max retry queue age must be less the idle interval.
-            RETRMAXAGE = Math.min(RETRMAXAGE, CONNECTION_IDLE_TIMEOUT);
-            
-        } catch (MissingResourceException notthere) {
-            ;
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        }
-        
-        if (null == target) {
-            return false;
-        }
-        
-        if (target instanceof TlsTransport) {
-            TlsTransport likeMe = (TlsTransport) target;
-            
-            if (!getProtocolName().equals(likeMe.getProtocolName())) {
-                return false;
-            }
-            
-            return localTlsPeerAddr.equals(likeMe.localTlsPeerAddr);
-        }
-        
-        return false;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    PeerGroup getPeerGroup() {
-        return group;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public void init(PeerGroup group, ID assignedID, Advertisement impl) throws PeerGroupException {
-        
-        this.group = group;
-        this.assignedID = assignedID;
-        this.implAdvertisement = (ModuleImplAdvertisement) impl;
-        
-        localPeerId = group.getPeerID();
-        
-        localPeerAddr = mkAddress(group.getPeerID(), null, null);
-        
-        localTlsPeerAddr = new EndpointAddress(JTlsDefs.tlsPName, localPeerId.getUniqueValue().toString(), null, null);
-        
-        myThreadGroup = new ThreadGroup(group.getHomeThreadGroup(), "TLSTransport " + localTlsPeerAddr);
-        
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring TLS Transport : " + assignedID);
-
-            if (null != implAdvertisement) {
-                configInfo.append("\n\tImplementation:");
-                configInfo.append("\n\t\tModule Spec ID: " + implAdvertisement.getModuleSpecID());
-                configInfo.append("\n\t\tImpl Description : " + implAdvertisement.getDescription());
-                configInfo.append("\n\t\tImpl URI : " + implAdvertisement.getUri());
-                configInfo.append("\n\t\tImpl Code : " + implAdvertisement.getCode());
-            }
-            configInfo.append("\n\tGroup Params:");
-            configInfo.append("\n\t\tGroup: " + group.getPeerGroupName());
-            configInfo.append("\n\t\tGroup ID: " + group.getPeerGroupID());
-            configInfo.append("\n\t\tPeer ID: " + group.getPeerID());
-            configInfo.append("\n\tConfiguration :");
-            configInfo.append("\n\t\tProtocol: " + JTlsDefs.tlsPName);
-            configInfo.append("\n\t\tOutgoing Connections Enabled: " + Boolean.TRUE);
-            configInfo.append("\n\t\tIncoming Connections Enabled: " + ACT_AS_SERVER);
-            configInfo.append("\n\t\tMinimum idle for reconnect : " + MIN_IDLE_RECONNECT + "ms");
-            configInfo.append("\n\t\tConnection idle timeout : " + CONNECTION_IDLE_TIMEOUT + "ms");
-            configInfo.append("\n\t\tRetry queue maximum age : " + RETRMAXAGE + "ms");
-            configInfo.append("\n\t\tPeerID : " + localPeerId);
-            configInfo.append("\n\t\tRoute through : " + localPeerAddr);
-            configInfo.append("\n\t\tPublic Address : " + localTlsPeerAddr);
-            
-            LOG.config(configInfo.toString());
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized int startApp(String[] args) {
-        
-        endpoint = group.getEndpointService();
-        
-        if (null == endpoint) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is an endpoint service");
-            }
-            
-            return START_AGAIN_STALLED;
-        }
-        
-        MembershipService groupMembership = group.getMembershipService();
-        
-        if (null == groupMembership) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is a membership service");
-            }
-            
-            return START_AGAIN_STALLED;
-        }
-        
-        if (!(groupMembership instanceof PSEMembershipService)) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("TLS Transport requires PSE Membership Service");
-            }
-            return -1;
-        }
-        
-        if (endpoint.addMessageTransport(this) == null) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("Transport registration refused");
-            }
-            return -1;
-        }
-        
-        membership = (PSEMembershipService) groupMembership;
-        
-        PropertyChangeListener mpcl = new membershipPCL();
-
-        membership.addPropertyChangeListener(mpcl);
-        
-        try {
-            serviceCert = membership.getPSEConfig().getTrustedCertificateChain(assignedID);
-            
-            Enumeration eachCred = membership.getCurrentCredentials();
-            
-            while (eachCred.hasMoreElements()) {
-                PSECredential aCred = (PSECredential) eachCred.nextElement();
-                
-                // send a fake property change event.
-                mpcl.propertyChange(new PropertyChangeEvent(membership, "addCredential", null, aCred));
-            }
-        } catch (IOException failed) {
-            serviceCert = null;
-        } catch (KeyStoreException failed) {
-            serviceCert = null;
-        }
-        
-        // Create the TLS Manager
-        manager = new TlsManager(this);
-        
-        // Connect ourself to the EndpointService
-        try {
-            endpoint.addIncomingMessageListener(manager, JTlsDefs.ServiceName, null);
-        } catch (Throwable e2) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "TLS could not register listener...as good as dead", e2);
-            }
-            return -1;
-        }
-        
-        return 0;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized void stopApp() {
-        if (null != endpoint) {
-            endpoint.removeIncomingMessageListener(JTlsDefs.ServiceName, null);
-            endpoint.removeMessageTransport(this);
-            endpoint = null;
-        }
-        
-        if (null != manager) {
-            manager.close();
-            manager = null;
-        }
-        
-        if (null != membership) {
-            membership.removePropertyChangeListener(membershipListener);
-            membershipListener = null;
-            membership = null;
-        }
-        
-        PSECredential temp = credential;
-        
-        if (null != temp) {
-            temp.removePropertyChangeListener(credentialListener);
-            credentialListener = null;
-            credential = null;
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public boolean isConnectionOriented() {
-        
-        return true;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public boolean allowsRouting() {
-        // The TLS connection should not be used for default routing
-        return false;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public Object transportControl(Object operation, Object Value) {
-        return null;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public EndpointAddress getPublicAddress() {
-        return localTlsPeerAddr;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public EndpointService getEndpointService() {
-        return endpoint;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public Iterator getPublicAddresses() {
-        return Collections.singletonList(getPublicAddress()).iterator();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public String getProtocolName() {
-        return JTlsDefs.tlsPName;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public boolean ping(EndpointAddress addr) {
-        
-        return null != getMessenger(addr, null);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     *
-     *  XXX bondolo 20040522 The hint could be used in request for the
-     * underlying messenger.
-     */
-    public Messenger getMessenger(EndpointAddress addr, Object hintIgnored) {
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("getMessenger for " + addr);
-        }
-        
-        EndpointAddress plainAddress = new EndpointAddress(addr, null, null);
-        
-        // If the dest is the local peer, just loop it back without going
-        // through the TLS. Local communication do not use TLS.
-        if (plainAddress.equals(localTlsPeerAddr)) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("returning LoopbackMessenger");
-            }
-            return new TlsLoopbackMessenger(endpoint, plainAddress, addr, localPeerAddr);
-        }
-        
-        // Create a Peer EndpointAddress
-        EndpointAddress dstPAddr = mkAddress(ID.URIEncodingName + ":" + ID.URNNamespace + ":" + addr.getProtocolAddress(), null
-                ,
-                null);
-        
-        TlsConn conn = manager.getTlsConn(dstPAddr);
-        
-        if (conn == null) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("Cannot get a TLS connection for " + dstPAddr);
-            }
-            // No connection was either available or created. Cannot do TLS
-            // with the destination address.
-            return null;
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("TlsMessanger with TlsConn DONE");
-        }
-        
-        // Build a TlsMessenger around it that will add our header.
-        // Right now we do not want to "announce" outgoing messengers because they get pooled and so must
-        // not be grabbed by a listener. If "announcing" is to be done, that should be by the endpoint
-        // and probably with a subtely different interface.
-        return new TlsMessenger(addr, conn, this);
-    }
-    
-    /**
-     * processReceivedMessage is invoked by the TLS Manager when a message has been
-     * completely received and is ready to be delivered to the service/application
-     */
-    void processReceivedMessage(final Message msg) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("processReceivedMessage starts");
-        }
-        
-        // add a property to the message to indicate it came from us.
-        msg.setMessageProperty(TlsTransport.class, this);
-        
-        // let the message continue to its final destination.
-        try {
-            ((GenericPeerGroup)group).getExecutor().execute( new Runnable() {
-                public void run() {
-                    try {
-                        endpoint.demux(msg);
-                    } catch(Throwable uncaught) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.log(Level.WARNING, "Failure demuxing an incoming message", uncaught);
-                        }
-                    }
-                }
-            });            
-        } catch (Throwable e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failure demuxing an incoming message", e);
-            }
-        }
-    }
-    
-    /**
-     *  Convenience method for constructing an endpoint address from an id
-     *
-     *  @param destPeer peer id
-     *  @param serv the service name (if any)
-     *  @param parm the service param (if any)
-     *  @param endpointAddress for this peer id.
-     */
-    private final static EndpointAddress mkAddress(String destPeer, String serv, String parm) {
-        
-        ID asID = null;
-        
-        try {
-            asID = IDFactory.fromURI(new URI(destPeer));
-        } catch (URISyntaxException caught) {
-            throw new IllegalArgumentException(caught.getMessage());
-        }
-        
-        return mkAddress(asID, serv, parm);
-    }
-    
-    /**
-     *  Convenience method for constructing an endpoint address from an id
-     *
-     *  @param destPeer peer id
-     *  @param serv the service name (if any)
-     *  @param parm the service param (if any)
-     *  @param endpointAddress for this peer id.
-     */
-    private final static EndpointAddress mkAddress(ID destPeer, String serv, String parm) {
-        
-        EndpointAddress addr = new EndpointAddress("jxta", destPeer.getUniqueValue().toString(), serv, parm);
-        
-        return addr;
-    }
-    
-    /**
-     *  Listener for Property Changed Events on our credential
-     **/
-    class credentialPCL implements PropertyChangeListener {
-        
-        /**
-         *  {@inheritDoc}
-         *
-         *  <p/>Handle events on our active credential.
-         **/
-        public synchronized void propertyChange(PropertyChangeEvent evt) {
-            
-            if (credential == evt.getSource()) {
-                if (!credential.isValid()) {
-                    if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                        LOG.info("Clearing credential/certfile ");
-                    }
-                    
-                    credential.removePropertyChangeListener(this);
-                    credential = null;
-                }
-            }
-        }
-    }
-    
-
-    /**
-     *  Listener for Property Changed Events on membership service
-     **/
-    class membershipPCL implements PropertyChangeListener {
-
-        /**
-         *  {@inheritDoc}
-         **/
-        public synchronized void propertyChange(PropertyChangeEvent evt) {
-            
-            String evtProp = evt.getPropertyName();
-            PSECredential cred = (PSECredential) evt.getNewValue();
-            
-            boolean validCertificate = true;
-
-            if (null != serviceCert) {
-                try {
-                    serviceCert[0].checkValidity();
-                } catch (Exception notValidException) {
-                    validCertificate = false;
-                }
-            }
-            
-            if ("addCredential".equals(evtProp) && ((null == serviceCert) || !validCertificate)) {
-                // no service Cert or Non-valid Cert? Make one.
-                Exception failure = null;
-                
-                try {
-                    X509Certificate peerCert = membership.getPSEConfig().getTrustedCertificate(group.getPeerID());
-                    
-                    X500Principal credSubjectDN = cred.getCertificate().getSubjectX500Principal();
-                    X500Principal peerCertSubjectDN = peerCert.getSubjectX500Principal();
-                    
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine(
-                                "Checking credential cert for match to peer cert" + "\n\tcred subject=" + credSubjectDN
-                                + "\n\tpeer subject=" + peerCertSubjectDN);
-                    }
-                    
-                    if (peerCertSubjectDN.equals(credSubjectDN)) {
-                        
-                        serviceCert = cred.generateServiceCertificate(assignedID);
-                        
-                    }
-                } catch (IOException failed) {
-                    failure = failed;
-                } catch (KeyStoreException failed) {
-                    failure = failed;
-                } catch (InvalidKeyException failed) {
-                    failure = failed;
-                } catch (SignatureException failed) {
-                    failure = failed;
-                }
-                
-                if (null != failure) {
-                    if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                        LOG.log(Level.SEVERE, "Failure building service certificate", failure);
-                    }
-                    
-                    return;
-                }
-            }
-            
-            if ("addCredential".equals(evtProp)) {
-                Exception failure = null;
-                
-                try {
-                    X509Certificate credCert = cred.getCertificate();
-                    
-                    X500Principal credSubjectDN = credCert.getSubjectX500Principal();
-                    X500Principal serviceIssuerDN = serviceCert[0].getIssuerX500Principal();
-                    
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine(
-                                "Checking credential cert for match to service issuer cert" + "\n\tcred subject=" + credSubjectDN
-                                + "\n\t  svc issuer=" + serviceIssuerDN);
-                    }
-                    
-                    if (credSubjectDN.equals(serviceIssuerDN)) {
-                        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                            LOG.info("Setting credential/certfile ");
-                        }
-                        
-                        credential = cred.getServiceCredential(assignedID);
-                        
-                        if (null != credential) {
-                            credentialListener = new credentialPCL();
-                            credential.addPropertyChangeListener(credentialListener);
-                        }
-                    }
-                } catch (IOException failed) {
-                    failure = failed;
-                } catch (PeerGroupException failed) {
-                    failure = failed;
-                } catch (InvalidKeyException failed) {
-                    failure = failed;
-                } catch (SignatureException failed) {
-                    failure = failed;
-                }
-                
-                if (null != failure) {
-                    if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                        LOG.log(Level.SEVERE, "Failure building service credential", failure);
-                    }
-                    
-                    return;
-                }
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/tls/package.html
deleted file mode 100644 (file)
index 4190d5a..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    A JXTA {@link net.jxta.endpoint.MessageTransport} implementation which 
-    which provides secure, private message transmission using TLS sockets. A
-    virtual transport, the messages are transfered between peers using some 
-    other message transport.
-
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#trans-tlst" target="_blank">JXTA Protocols Specification : Standard JXTA Transport Bindings</a>
-    @see <a href="http://www.ietf.org/rfc/rfc2246.txt">IETF RFC 2246: The TLS Protocol-Version 1.0</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/ConditionalTransportMeterBuildSettings.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/ConditionalTransportMeterBuildSettings.java
deleted file mode 100644 (file)
index 3f2e70c..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Copyright (c) 2001-2006 Sun Microsystems, Inc. All rights reserved.
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at https://jxta.dev.java.net.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <https://jxta.dev.java.net/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
-
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  https://jxta.dev.java.net/
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- *  
- */
-
-
-/*  ****  THIS IS A GENERATED FILE. DO NOT EDIT.  ****  */
-
-package net.jxta.impl.endpoint.transportMeter;
-
-import java.util.ResourceBundle;
-import net.jxta.impl.meter.*;
-
-public class ConditionalTransportMeterBuildSettings {
-       public static boolean isRuntimeMetering() {
-               boolean runtimeMetering = false; 
-
-               try { 
-                       ResourceBundle userResourceBundle = ResourceBundle.getBundle( "net.jxta.user" ); 
-                       String meteringProperty = "net.jxta.meter.conditionalTransportMetering"; 
-                       String meteringValue = userResourceBundle.getString( meteringProperty ); 
-                       runtimeMetering = "on".equalsIgnoreCase( meteringValue ); 
-               } catch (Exception ignored) { 
-               }
-
-               return runtimeMetering;
-       }
-}
\ No newline at end of file
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/TransportBindingMeter.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/TransportBindingMeter.java
deleted file mode 100644 (file)
index 2fc3bb6..0000000
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.transportMeter;
-
-
-import net.jxta.peer.PeerID;
-import net.jxta.endpoint.*;
-
-
-public class TransportBindingMeter {
-    private PeerID peerID;
-    private EndpointAddress endpointAddress;
-
-    private TransportBindingMetric cumulativeMetrics;
-    private TransportBindingMetric deltaMetrics;
-
-    public TransportBindingMeter(PeerID peerID, EndpointAddress endpointAddress) {
-        this(peerID, endpointAddress, false, false);
-    }
-       
-    public TransportBindingMeter(PeerID peerID, EndpointAddress endpointAddress, boolean initiatorConnected, boolean acceptorConnected) {
-        this.peerID = peerID;
-        this.endpointAddress = endpointAddress;
-        cumulativeMetrics = new TransportBindingMetric(this, initiatorConnected, acceptorConnected);
-    }
-
-    @Override
-    public String toString() {
-        return "TransportBindingMeter(" + endpointAddress + ";" + peerID + ")";
-    }
-
-    public synchronized TransportBindingMetric collectMetrics() {
-        TransportBindingMetric prevDelta = deltaMetrics;
-
-        deltaMetrics = null;
-        return prevDelta;
-    }
-               
-    private void createDeltaMetric() {
-        deltaMetrics = new TransportBindingMetric(cumulativeMetrics);
-    }
-
-    public TransportBindingMetric getCumulativeMetrics() {
-        return cumulativeMetrics;
-    }
-
-    public PeerID getPeerID() {
-        return peerID;
-    }
-
-    public EndpointAddress getEndpointAddress() {
-        return endpointAddress;
-    }
-
-    public void setPeerID(PeerID peerID) { 
-        this.peerID = peerID; 
-        cumulativeMetrics.setPeerID(peerID);
-               
-        if (deltaMetrics != null) {    
-            deltaMetrics.setPeerID(peerID);
-        }
-    }
-
-    public synchronized void connectionEstablished(boolean initator, long timeToConnect) {             
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        long now = System.currentTimeMillis();
-
-        deltaMetrics.connectionEstablished(initator, timeToConnect, now);
-        cumulativeMetrics.connectionEstablished(initator, timeToConnect, now);
-    }
-
-    public synchronized void connectionFailed(boolean initator, long timeToConnect) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        long now = System.currentTimeMillis();
-
-        deltaMetrics.connectionFailed(initator, timeToConnect, now);
-        cumulativeMetrics.connectionFailed(initator, timeToConnect, now);
-    }
-       
-    public synchronized void connectionClosed(boolean initator, long connectionLife) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        long now = System.currentTimeMillis();
-
-        deltaMetrics.connectionClosed(initator, now);
-        cumulativeMetrics.connectionClosed(initator, now);
-    }
-       
-    public synchronized void connectionDropped(boolean initator, long connectionLife) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        long now = System.currentTimeMillis();
-
-        deltaMetrics.connectionDropped(initator, now);
-        cumulativeMetrics.connectionDropped(initator, now);
-    }
-
-    public synchronized void pingReceived() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        deltaMetrics.pingReceived();
-        cumulativeMetrics.pingReceived();
-    }
-       
-    public synchronized void ping(long time) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        deltaMetrics.ping(time);
-        cumulativeMetrics.ping(time);
-    }
-       
-    public synchronized void pingFailed(long time) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        deltaMetrics.pingFailed(time);
-        cumulativeMetrics.pingFailed(time);
-    }
-
-    public synchronized void dataReceived(boolean initator, int size) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        deltaMetrics.dataReceived(initator, size);
-        cumulativeMetrics.dataReceived(initator, size);
-    }
-
-    public synchronized void messageReceived(boolean initator, Message message, long time, long size) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        deltaMetrics.messageReceived(initator, message, time, size);
-        cumulativeMetrics.messageReceived(initator, message, time, size);
-    }
-
-    public synchronized void receiveFailure(boolean initator, long time, long size) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        deltaMetrics.receiveFailure(initator, time, size);
-        cumulativeMetrics.receiveFailure(initator, time, size);
-    }
-
-    public synchronized void dataSent(boolean initator, long size) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        deltaMetrics.dataSent(initator, size);
-        cumulativeMetrics.dataSent(initator, size);
-    }          
-       
-    public synchronized void sendFailure(boolean initator, Message message, long time, long size) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        deltaMetrics.sendFailure(initator, message, time, size);
-        cumulativeMetrics.sendFailure(initator, message, time, size);
-    }
-
-    public synchronized void messageSent(boolean initator, Message message, long time, long size) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        deltaMetrics.messageSent(initator, message, time, size);
-        cumulativeMetrics.messageSent(initator, message, time, size);
-    }          
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/TransportBindingMetric.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/TransportBindingMetric.java
deleted file mode 100644 (file)
index 1af8e6a..0000000
+++ /dev/null
@@ -1,1135 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.transportMeter;
-
-
-import net.jxta.document.Element;
-import net.jxta.document.TextElement;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.Message;
-import net.jxta.impl.meter.MetricUtilities;
-import net.jxta.peer.PeerID;
-import net.jxta.util.documentSerializable.DocumentSerializable;
-import net.jxta.util.documentSerializable.DocumentSerializableUtilities;
-import net.jxta.util.documentSerializable.DocumentSerializationException;
-
-import java.util.Enumeration;
-
-
-public class TransportBindingMetric implements DocumentSerializable {
-    public static final String CONNECTED = "connected";
-    public static final String CLOSED = "closed";
-    public static final String DROPPED = "dropped";
-    public static final String FAILED = "failed";
-
-    private PeerID peerID;
-    private EndpointAddress endpointAddress;
-
-    private String initiatorState = null;
-    private String acceptorState = null;
-    private long initiatorTransitionTime;
-    private long acceptorTransitionTime;
-
-    private int acceptorBytesReceived;
-    private int acceptorBytesSent;
-    private int acceptorConnections;
-    private int acceptorConnectionsClosed;
-    private int acceptorConnectionsDropped;
-    private int acceptorConnectionsFailed;
-    private int acceptorMessagesReceived;
-    private int acceptorMessagesSent;
-    private long acceptorReceiveFailureProcessingTime;
-    private int acceptorReceiveFailures;
-    private long acceptorReceiveProcessingTime;
-    private long acceptorSendFailureProcessingTime;
-    private int acceptorSendFailures;
-    private long acceptorSendProcessingTime;
-    private long acceptorTotalTimeConnected;
-    private long acceptorTimeToConnect;
-    private long acceptorTimeToFail;
-    private int initiatorBytesReceived;
-    private int initiatorBytesSent;
-    private long initiatorTotalTimeConnected;
-    private int initiatorConnections;
-    private int initiatorConnectionsClosed;
-    private int initiatorConnectionsDropped;
-    private int initiatorConnectionsFailed;
-    private int initiatorMessagesReceived;
-    private int initiatorMessagesSent;
-    private long initiatorReceiveFailureProcessingTime;
-    private int initiatorReceiveFailures;
-    private long initiatorReceiveProcessingTime;
-    private long initiatorSendFailureProcessingTime;
-    private int initiatorSendFailures;
-    private long initiatorSendProcessingTime;
-    private long initiatorTimeToConnect;
-    private long initiatorTimeToFail;
-
-    private int numPings;
-    private int numFailedPings;
-    private long pingTime;
-    private long pingFailedTime;
-    private int numPingsReceived;
-
-    public TransportBindingMetric(TransportBindingMeter transportBindingMeter, boolean initiatorConnected, boolean acceptorConnected) {
-        this.peerID = transportBindingMeter.getPeerID();
-        this.endpointAddress = transportBindingMeter.getEndpointAddress();
-        this.initiatorState = initiatorConnected ? CONNECTED : CLOSED;
-        this.acceptorState = acceptorConnected ? CONNECTED : CLOSED;
-    }
-
-    public TransportBindingMetric() {}
-
-    public TransportBindingMetric(TransportBindingMetric prototype) {
-        this.peerID = prototype.peerID;
-        this.endpointAddress = prototype.endpointAddress;
-        this.initiatorState = prototype.initiatorState;
-        this.acceptorState = prototype.acceptorState;
-        this.initiatorTransitionTime = prototype.initiatorTransitionTime;
-        this.acceptorTransitionTime = prototype.acceptorTransitionTime;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (obj instanceof TransportBindingMetric) {
-            TransportBindingMetric other = (TransportBindingMetric) obj;
-
-            return endpointAddress.equals(other.endpointAddress);
-        } else {
-            return false;
-        }
-    }
-
-    @Override
-    public int hashCode() {
-        return peerID.hashCode() + endpointAddress.hashCode();
-    }
-
-    public PeerID getPeerID() {
-        return peerID;
-    }
-
-    public void setPeerID(PeerID peerID) {
-        this.peerID = peerID;
-    }
-
-    public EndpointAddress getEndpointAddress() {
-        return endpointAddress;
-    }
-
-    /**
-     * State of this Initiator Binding
-     *
-     * @return TransportBindingMetric.CONNECTED, TransportBindingMetric.DISCONNECTED or TransportBindingMetric.FAILED
-     */
-    public String getInitiatorState() {
-        return initiatorState;
-    }
-
-    /**
-     * State of this Acceptor Binding
-     *
-     * @return TransportBindingMetric.CONNECTED, TransportBindingMetric.DISCONNECTED or TransportBindingMetric.FAILED
-     */
-    public String getAcceptorState() {
-        return acceptorState;
-    }
-
-    /**
-     * Get the time that it entered the current state
-     *
-     * @return transition time in ms since January 1, 1970, 00:00:00 GMT
-     */
-    public long getInitiatorTransitionTime() {
-        return initiatorTransitionTime;
-    }
-
-    /**
-     * Get the time that it entered the current state
-     *
-     * @return transition time in ms since January 1, 1970, 00:00:00 GMT
-     */
-    public long getAcceptorTransitionTime() {
-        return acceptorTransitionTime;
-    }
-
-    public boolean isAcceptorConnected() {
-        return (acceptorState != null) && acceptorState.equals(CONNECTED);
-    }
-
-    public boolean isInitiatorConnected() {
-        return (initiatorState != null) && initiatorState.equals(CONNECTED);
-    }
-
-    public long getTimeAcceptorConnectionEstablished() {
-        return isAcceptorConnected() ? acceptorTransitionTime : 0;
-    }
-
-    public long getTimeInitiatorConnectionEstablished() {
-        return isInitiatorConnected() ? initiatorTransitionTime : 0;
-    }
-
-    public int getAcceptorBytesReceived() {
-        return acceptorBytesReceived;
-    }
-
-    public int getAcceptorBytesSent() {
-        return acceptorBytesSent;
-    }
-
-    public int getAcceptorConnections() {
-        return acceptorConnections;
-    }
-
-    public int getAcceptorConnectionsClosed() {
-        return acceptorConnectionsClosed;
-    }
-
-    public int getAcceptorConnectionsDropped() {
-        return acceptorConnectionsDropped;
-    }
-
-    public int getAcceptorConnectionsFailed() {
-        return acceptorConnectionsFailed;
-    }
-
-    public int getAcceptorMessagesReceived() {
-        return acceptorMessagesReceived;
-    }
-
-    public int getAcceptorMessagesSent() {
-        return acceptorMessagesSent;
-    }
-
-    public long getAcceptorReceiveFailureProcessingTime() {
-        return acceptorReceiveFailureProcessingTime;
-    }
-
-    public int getAcceptorReceiveFailures() {
-        return acceptorReceiveFailures;
-    }
-
-    public long getAcceptorReceiveProcessingTime() {
-        return acceptorReceiveProcessingTime;
-    }
-
-    public long getAcceptorSendFailureProcessingTime() {
-        return acceptorSendFailureProcessingTime;
-    }
-
-    public int getAcceptorSendFailures() {
-        return acceptorSendFailures;
-    }
-
-    public long getAcceptorSendProcessingTime() {
-        return acceptorSendProcessingTime;
-    }
-
-    public long getAcceptorTimeToConnect() {
-        return acceptorTimeToConnect;
-    }
-
-    public long getAcceptorTimeToFail() {
-        return acceptorTimeToFail;
-    }
-
-    public int getInitiatorBytesReceived() {
-        return initiatorBytesReceived;
-    }
-
-    public int getInitiatorBytesSent() {
-        return initiatorBytesSent;
-    }
-
-    public int getInitiatorConnections() {
-        return initiatorConnections;
-    }
-
-    public int getInitiatorConnectionsClosed() {
-        return initiatorConnectionsClosed;
-    }
-
-    public int getInitiatorConnectionsDropped() {
-        return initiatorConnectionsDropped;
-    }
-
-    public int getInitiatorConnectionsFailed() {
-        return initiatorConnectionsFailed;
-    }
-
-    public int getInitiatorMessagesReceived() {
-        return initiatorMessagesReceived;
-    }
-
-    public int getInitiatorMessagesSent() {
-        return initiatorMessagesSent;
-    }
-
-    public long getInitiatorReceiveFailureProcessingTime() {
-        return initiatorReceiveFailureProcessingTime;
-    }
-
-    public int getInitiatorReceiveFailures() {
-        return initiatorReceiveFailures;
-    }
-
-    public long getInitiatorReceiveProcessingTime() {
-        return initiatorReceiveProcessingTime;
-    }
-
-    public long getInitiatorSendFailureProcessingTime() {
-        return initiatorSendFailureProcessingTime;
-    }
-
-    public int getInitiatorSendFailures() {
-        return initiatorSendFailures;
-    }
-
-    public long getInitiatorSendProcessingTime() {
-        return initiatorSendProcessingTime;
-    }
-
-    public long getInitiatorTimeToConnect() {
-        return initiatorTimeToConnect;
-    }
-
-    public long getInitiatorTimeToFail() {
-        return initiatorTimeToFail;
-    }
-
-    public int getNumPings() {
-        return numPings;
-    }
-
-    public int getNumFailedPings() {
-        return numFailedPings;
-    }
-
-    public long getPingTime() {
-        return pingTime;
-    }
-
-    public long getPingFailedTime() {
-        return pingFailedTime;
-    }
-
-    public int getNumPingsReceived() {
-        return numPingsReceived;
-    }
-
-    public int getBytesReceived() {
-        return acceptorBytesReceived + initiatorBytesReceived;
-    }
-
-    public int getBytesSent() {
-        return acceptorBytesSent + initiatorBytesSent;
-    }
-
-    public int getConnections() {
-        return acceptorConnections + initiatorConnections;
-    }
-
-    public int getConnectionsClosed() {
-        return acceptorConnectionsClosed + initiatorConnectionsClosed;
-    }
-
-    public int getConnectionsDropped() {
-        return acceptorConnectionsDropped + initiatorConnectionsDropped;
-    }
-
-    public int getConnectionsFailed() {
-        return acceptorConnectionsFailed + initiatorConnectionsFailed;
-    }
-
-    public int getMessagesReceived() {
-        return acceptorMessagesReceived + initiatorMessagesReceived;
-    }
-
-    public int getMessagesSent() {
-        return acceptorMessagesSent + initiatorMessagesSent;
-    }
-
-    public long getReceiveFailureProcessingTime() {
-        return acceptorReceiveFailureProcessingTime + initiatorReceiveFailureProcessingTime;
-    }
-
-    public int getReceiveFailures() {
-        return acceptorReceiveFailures + initiatorReceiveFailures;
-    }
-
-    public long getReceiveProcessingTime() {
-        return acceptorReceiveProcessingTime + initiatorReceiveProcessingTime;
-    }
-
-    public long getSendFailureProcessingTime() {
-        return acceptorSendFailureProcessingTime + initiatorSendFailureProcessingTime;
-    }
-
-    public int getSendFailures() {
-        return acceptorSendFailures + initiatorSendFailures;
-    }
-
-    public long getSendProcessingTime() {
-        return acceptorSendProcessingTime + initiatorSendProcessingTime;
-    }
-
-    public long getTotalTimeConnected() {
-        return acceptorTotalTimeConnected + initiatorTotalTimeConnected;
-    }
-
-    public long getTimeToConnect() {
-        return acceptorTimeToConnect + initiatorTimeToConnect;
-    }
-
-    public long getTimeToFail() {
-        return acceptorTimeToFail + initiatorTimeToFail;
-    }
-
-    public int getAveragePingTime() {
-        return (int) ((numPings != 0) ? (pingTime / numPings) : 0);
-    }
-
-    public int getAveragePingFailedTime() {
-        return (int) ((numFailedPings != 0) ? (pingFailedTime / numFailedPings) : 0);
-    }
-
-    public int getAverageAcceptorReceiveFailureProcessingTime() {
-        return (int) ((acceptorReceiveFailures != 0) ? (acceptorReceiveFailureProcessingTime / acceptorReceiveFailures) : 0);
-    }
-
-    public int getAverageAcceptorReceiveProcessingTime() {
-        return (int) ((acceptorMessagesReceived != 0) ? (acceptorReceiveProcessingTime / acceptorMessagesReceived) : 0);
-    }
-
-    public int getAverageAcceptorSendFailureProcessingTime() {
-        return (int) ((acceptorSendFailures != 0) ? (acceptorSendFailureProcessingTime / acceptorSendFailures) : 0);
-    }
-
-    public int getAverageAcceptorSendProcessingTime() {
-        return (int) ((acceptorMessagesSent != 0) ? (acceptorSendProcessingTime / acceptorMessagesSent) : 0);
-    }
-
-    public int getAverageAcceptorTimeToConnect() {
-        return (int) ((acceptorConnections != 0) ? (acceptorTimeToConnect / acceptorConnections) : 0);
-    }
-
-    public int getAverageAcceptorTimeToFail() {
-        return (int) ((acceptorConnectionsFailed != 0) ? (acceptorTimeToFail / acceptorConnectionsFailed) : 0);
-    }
-
-    public int getAverageInitiatorReceiveFailureProcessingTime() {
-        return (int) ((initiatorReceiveFailures != 0) ? (initiatorReceiveFailureProcessingTime / initiatorReceiveFailures) : 0);
-    }
-
-    public int getAverageInitiatorReceiveProcessingTime() {
-        return (int) ((initiatorMessagesReceived != 0) ? (initiatorReceiveProcessingTime / initiatorMessagesReceived) : 0);
-    }
-
-    public int getAverageInitiatorSendFailureProcessingTime() {
-        return (int) ((initiatorSendFailures != 0) ? (initiatorSendFailureProcessingTime / initiatorSendFailures) : 0);
-    }
-
-    public int getAverageInitiatorSendProcessingTime() {
-        return (int) ((initiatorMessagesSent != 0) ? (initiatorSendProcessingTime / initiatorMessagesSent) : 0);
-    }
-
-    public int getAverageInitiatorTimeToConnect() {
-        return (int) ((initiatorConnections != 0) ? (initiatorTimeToConnect / initiatorConnections) : 0);
-    }
-
-    public int getAverageInitiatorTimeToFail() {
-        return (int) ((initiatorConnectionsFailed != 0) ? (initiatorTimeToFail / initiatorConnectionsFailed) : 0);
-    }
-
-    public int getAverageReceiveFailureProcessingTime() {
-        return (int) (((initiatorReceiveFailures + acceptorReceiveFailures) != 0)
-                ? ((initiatorReceiveFailureProcessingTime + acceptorReceiveFailureProcessingTime)
-                        / (initiatorReceiveFailures + acceptorReceiveFailures))
-                        : 0);
-    }
-
-    public int getAverageReceiveProcessingTime() {
-        return (int) (((initiatorMessagesReceived + acceptorMessagesReceived) != 0)
-                ? ((initiatorReceiveProcessingTime + acceptorReceiveProcessingTime)
-                        / (initiatorMessagesReceived + acceptorMessagesReceived))
-                        : 0);
-    }
-
-    public int getAverageSendFailureProcessingTime() {
-        return (int) (((initiatorSendFailures + acceptorSendFailures) != 0)
-                ? ((initiatorSendFailureProcessingTime + acceptorSendFailureProcessingTime)
-                        / (initiatorSendFailures + acceptorSendFailures))
-                        : 0);
-    }
-
-    public int getAverageSendProcessingTime() {
-        return (int) (((initiatorMessagesSent + acceptorMessagesSent) != 0)
-                ? ((initiatorSendProcessingTime + acceptorSendProcessingTime) / (initiatorMessagesSent + acceptorMessagesSent))
-                : 0);
-    }
-
-    public int getAverageTimeToConnect() {
-        return (int) (((initiatorConnections + acceptorConnections) != 0)
-                ? ((initiatorTimeToConnect + acceptorTimeToConnect) / (initiatorConnections + acceptorConnections))
-                : 0);
-    }
-
-    public int getAverageTimeToFail() {
-        return (int) (((initiatorConnectionsFailed + acceptorConnectionsFailed) != 0)
-                ? ((initiatorTimeToFail + acceptorTimeToFail) / (initiatorConnectionsFailed + acceptorConnectionsFailed))
-                : 0);
-    }
-
-    /**
-     * Get the total time this intiated connection has been connected.
-     * <BR><BR>
-     * <B>Note:</B> This does not include the current time connected (if it is currently connected)
-     *
-     * @return time in ms (see note above)
-     * @see #getTotalTimeConnected()
-     */
-    public long getInitiatorTotalTimeConnected() {
-        return initiatorTotalTimeConnected;
-    }
-
-    /**
-     * Get the total time this initiating connection has been connected.  If it is currently
-     * connected, then the total time is adjusted to include the time since the transition time
-     * to become connected until the provided time
-     *
-     * @param adjustmentTime The time of this metric will be adjusted to
-     * @return time in ms (see note above)
-     * @see #getTotalTimeConnected()
-     */
-    public long getInitiatorTotalTimeConnected(long adjustmentTime) {
-        long result = initiatorTotalTimeConnected;
-
-        if (isInitiatorConnected()) {
-            result += (adjustmentTime - this.initiatorTransitionTime);
-        }
-
-        return result;
-    }
-
-    /**
-     * Get the duration of current connection relative to local clock (from transition time)
-     * <BR><BR>
-     * <B>Note:</B> This assumes the clocks are in sync with the reporting peer
-     *
-     * @return time in ms (see note above) or 0 if not connected
-     * @see #getTotalTimeConnected()
-     */
-    public long getInitiatorTimeConnected() {
-        return getInitiatorTimeConnected(System.currentTimeMillis());
-    }
-
-    /**
-     * Get the duration of current connection until the specified time
-     *
-     * @param adjustmentTime The time of this metric will be computed until
-     * @return time in ms (see note above) or 0 if not connected
-     */
-    public long getInitiatorTimeConnected(long adjustmentTime) {
-
-        if (isInitiatorConnected()) {
-            return (adjustmentTime - this.initiatorTransitionTime);
-        } else {
-            return 0;
-        }
-    }
-
-    /**
-     * Get the total time this intiated connection has been connected.
-     * <BR><BR>
-     * <B>Note:</B> This does not include the current time connected (if it is currently connected)
-     *
-     * @return time in ms (see note above)
-     * @see #getTotalTimeConnected()
-     */
-    public long getAcceptorTotalTimeConnected() {
-        return acceptorTotalTimeConnected;
-    }
-
-    /**
-     * Get the total time this initiating connection has been connected.  If it is currently
-     * connected, then the total time is adjusted to include the time since the transition time
-     * to become connected until the provided time
-     *
-     * @param adjustmentTime The time of this metric will be adjusted to
-     * @return time in ms (see note above)
-     * @see #getTotalTimeConnected()
-     */
-    public long getAcceptorTotalTimeConnected(long adjustmentTime) {
-        long result = acceptorTotalTimeConnected;
-
-        if (isAcceptorConnected()) {
-            result += (adjustmentTime - this.acceptorTransitionTime);
-        }
-
-        return result;
-    }
-
-    /**
-     * Get the duration of current connection relative to local clock (from transition time)
-     * <BR><BR>
-     * <B>Note:</B> This assumes the clocks are in sync with the reporting peer
-     *
-     * @return time in ms (see note above) or 0 if not connected
-     * @see #getTotalTimeConnected()
-     */
-    public long getAcceptorTimeConnected() {
-        return getAcceptorTimeConnected(System.currentTimeMillis());
-    }
-
-    /**
-     * Get the duration of current connection until the specified time
-     *
-     * @param adjustmentTime The time of this metric will be computed until
-     * @return time in ms (see note above) or 0 if not connected
-     */
-    public long getAcceptorTimeConnected(long adjustmentTime) {
-
-        if (isAcceptorConnected()) {
-            return (adjustmentTime - this.acceptorTransitionTime);
-        } else {
-            return 0;
-        }
-    }
-
-    void resetInitiatorState(String state, long transitionTime) {
-        if (isInitiatorConnected()) {
-            acceptorTotalTimeConnected += (System.currentTimeMillis() - this.initiatorTransitionTime);
-        }
-
-        this.initiatorState = state;
-        this.initiatorTransitionTime = transitionTime;
-        // System.out.println("initiatorState: " + initiatorState + " " + endpointAddress);
-    }
-
-    void resetAcceptorState(String state, long transitionTime) {
-        if (isAcceptorConnected()) {
-            initiatorTotalTimeConnected += (System.currentTimeMillis() - this.acceptorTransitionTime);
-        }
-
-        this.acceptorState = state;
-        this.acceptorTransitionTime = transitionTime;
-        // System.out.println("acceptorState: " + acceptorState + " " + endpointAddress);
-    }
-
-    void connectionEstablished(boolean initiator, long timeToConnect, long transitionTime) {
-        if (initiator) {
-            resetInitiatorState(CONNECTED, transitionTime);
-            initiatorConnections++;
-            initiatorTimeToConnect += timeToConnect;
-        } else {
-            resetAcceptorState(CONNECTED, transitionTime);
-            acceptorConnections++;
-            acceptorTimeToConnect += timeToConnect;
-        }
-
-    }
-
-    void connectionFailed(boolean initiator, long timeToConnect, long transitionTime) {
-        if (initiator) {
-            resetInitiatorState(FAILED, transitionTime);
-            initiatorConnectionsFailed++;
-            initiatorTimeToFail += timeToConnect;
-        } else {
-            resetAcceptorState(FAILED, transitionTime);
-            acceptorConnectionsFailed++;
-            acceptorTimeToFail += timeToConnect;
-        }
-    }
-
-    void connectionClosed(boolean initiator, long transitionTime) {
-        if (initiator) {
-            resetInitiatorState(CLOSED, transitionTime);
-            initiatorConnectionsClosed++;
-        } else {
-            resetAcceptorState(CLOSED, transitionTime);
-            acceptorConnectionsClosed++;
-        }
-    }
-
-    void connectionDropped(boolean initiator, long transitionTime) {
-        if (initiator) {
-            resetInitiatorState(DROPPED, transitionTime);
-            initiatorConnectionsDropped++;
-        } else {
-            resetAcceptorState(DROPPED, transitionTime);
-            acceptorConnectionsDropped++;
-        }
-    }
-
-    void pingReceived() {
-        numPingsReceived++;
-    }
-
-    void ping(long time) {
-        numPings++;
-        pingTime += time;
-    }
-
-    void pingFailed(long time) {
-        numFailedPings++;
-        pingFailedTime += time;
-    }
-
-    void dataReceived(boolean initiator, int size) {
-        if (initiator) {
-            initiatorBytesReceived += size;
-        } else {
-            acceptorBytesReceived += size;
-        }
-    }
-
-    void messageReceived(boolean initiator, Message message, long time, long size) {
-        if (initiator) {
-            initiatorMessagesReceived++;
-            initiatorReceiveProcessingTime += time;
-            initiatorBytesReceived += size;
-        } else {
-            acceptorMessagesReceived++;
-            acceptorReceiveProcessingTime += time;
-            acceptorBytesReceived += size;
-        }
-    }
-
-    void receiveFailure(boolean initiator, long time, long size) {
-        if (initiator) {
-            initiatorReceiveFailures++;
-            initiatorReceiveFailureProcessingTime += time;
-            initiatorBytesReceived += size;
-        } else {
-            acceptorReceiveFailures++;
-            acceptorReceiveFailureProcessingTime += time;
-            acceptorBytesReceived += size;
-        }
-    }
-
-    void dataSent(boolean initiator, long size) {
-        if (initiator) {
-            initiatorBytesSent += size;
-        } else {
-            acceptorBytesSent += size;
-        }
-    }
-
-    void sendFailure(boolean initiator, Message message, long time, long size) {
-        if (initiator) {
-            initiatorSendFailures++;
-            initiatorSendFailureProcessingTime += time;
-            initiatorBytesSent += size;
-        } else {
-            acceptorSendFailures++;
-            acceptorSendFailureProcessingTime += time;
-            acceptorBytesSent += size;
-        }
-    }
-
-    void messageSent(boolean initiator, Message message, long time, long size) {
-        if (initiator) {
-            initiatorMessagesSent++;
-            initiatorSendProcessingTime += time;
-            initiatorBytesSent += size;
-        } else {
-            acceptorMessagesSent++;
-            acceptorSendProcessingTime += time;
-            acceptorBytesSent += size;
-        }
-    }
-
-    public void mergeMetrics(TransportBindingMetric other) {
-        peerID = other.peerID;
-
-        if (other.initiatorState != null) {
-            initiatorState = other.initiatorState;
-        }
-
-        if (other.initiatorTransitionTime != 0) {
-            initiatorTransitionTime = other.initiatorTransitionTime;
-        }
-
-        if (other.acceptorState != null) {
-            acceptorState = other.acceptorState;
-        }
-
-        if (other.initiatorTransitionTime != 0) {
-            acceptorTransitionTime = other.acceptorTransitionTime;
-        }
-
-        acceptorBytesReceived += other.acceptorBytesReceived;
-        acceptorBytesSent += other.acceptorBytesSent;
-        acceptorConnections += other.acceptorConnections;
-        acceptorConnectionsClosed += other.acceptorConnectionsClosed;
-        acceptorConnectionsDropped += other.acceptorConnectionsDropped;
-        acceptorConnectionsFailed += other.acceptorConnectionsFailed;
-        acceptorMessagesReceived += other.acceptorMessagesReceived;
-        acceptorMessagesSent += other.acceptorMessagesSent;
-        acceptorReceiveFailureProcessingTime += other.acceptorReceiveFailureProcessingTime;
-        acceptorReceiveFailures += other.acceptorReceiveFailures;
-        acceptorReceiveProcessingTime += other.acceptorReceiveProcessingTime;
-        acceptorSendFailureProcessingTime += other.acceptorSendFailureProcessingTime;
-        acceptorSendFailures += other.acceptorSendFailures;
-        acceptorSendProcessingTime += other.acceptorSendProcessingTime;
-        acceptorTotalTimeConnected += other.acceptorTotalTimeConnected;
-        acceptorTimeToConnect += other.acceptorTimeToConnect;
-        acceptorTimeToFail += other.acceptorTimeToFail;
-        initiatorBytesReceived += other.initiatorBytesReceived;
-        initiatorBytesSent += other.initiatorBytesSent;
-        initiatorTotalTimeConnected += other.initiatorTotalTimeConnected;
-        initiatorConnections += other.initiatorConnections;
-        initiatorConnectionsClosed += other.initiatorConnectionsClosed;
-        initiatorConnectionsDropped += other.initiatorConnectionsDropped;
-        initiatorConnectionsFailed += other.initiatorConnectionsFailed;
-        initiatorMessagesReceived += other.initiatorMessagesReceived;
-        initiatorMessagesSent += other.initiatorMessagesSent;
-        initiatorReceiveFailureProcessingTime += other.initiatorReceiveFailureProcessingTime;
-        initiatorReceiveFailures += other.initiatorReceiveFailures;
-        initiatorReceiveProcessingTime += other.initiatorReceiveProcessingTime;
-        initiatorSendFailureProcessingTime += other.initiatorSendFailureProcessingTime;
-        initiatorSendFailures += other.initiatorSendFailures;
-        initiatorSendProcessingTime += other.initiatorSendProcessingTime;
-        initiatorTimeToConnect += other.initiatorTimeToConnect;
-        initiatorTimeToFail += other.initiatorTimeToFail;
-        numPings += other.numPings;
-        numFailedPings += other.numFailedPings;
-        pingTime += other.pingTime;
-        pingFailedTime += other.pingFailedTime;
-        numPingsReceived += other.numPingsReceived;
-
-    }
-
-    public void serializeTo(Element element) throws DocumentSerializationException {
-
-        DocumentSerializableUtilities.addString(element, "peerID", peerID.toString());
-        DocumentSerializableUtilities.addString(element, "endpointAddress", endpointAddress.toString());
-
-        if (initiatorState != null) {
-            DocumentSerializableUtilities.addString(element, "initiatorState", initiatorState);
-        }
-        if (initiatorTransitionTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "initiatorTransitionTime", initiatorTransitionTime);
-        }
-
-        if (acceptorState != null) {
-            DocumentSerializableUtilities.addString(element, "acceptorState", acceptorState);
-        }
-        if (acceptorTransitionTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "acceptorTransitionTime", acceptorTransitionTime);
-        }
-
-        if (acceptorBytesReceived != 0) {
-            DocumentSerializableUtilities.addInt(element, "acceptorBytesReceived", acceptorBytesReceived);
-        }
-
-        if (acceptorBytesSent != 0) {
-            DocumentSerializableUtilities.addInt(element, "acceptorBytesSent", acceptorBytesSent);
-        }
-
-        if (acceptorConnections != 0) {
-            DocumentSerializableUtilities.addInt(element, "acceptorConnections", acceptorConnections);
-        }
-
-        if (acceptorConnectionsClosed != 0) {
-            DocumentSerializableUtilities.addInt(element, "acceptorConnectionsClosed", acceptorConnectionsClosed);
-        }
-
-        if (acceptorConnectionsDropped != 0) {
-            DocumentSerializableUtilities.addInt(element, "acceptorConnectionsDropped", acceptorConnectionsDropped);
-        }
-
-        if (acceptorConnectionsFailed != 0) {
-            DocumentSerializableUtilities.addInt(element, "acceptorConnectionsFailed", acceptorConnectionsFailed);
-        }
-
-        if (acceptorMessagesReceived != 0) {
-            DocumentSerializableUtilities.addInt(element, "acceptorMessagesReceived", acceptorMessagesReceived);
-        }
-
-        if (acceptorMessagesSent != 0) {
-            DocumentSerializableUtilities.addInt(element, "acceptorMessagesSent", acceptorMessagesSent);
-        }
-
-        if (acceptorReceiveFailureProcessingTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "acceptorReceiveFailureProcessingTime"
-                    ,
-                    acceptorReceiveFailureProcessingTime);
-        }
-
-        if (acceptorReceiveFailures != 0) {
-            DocumentSerializableUtilities.addInt(element, "acceptorReceiveFailures", acceptorReceiveFailures);
-        }
-
-        if (acceptorReceiveProcessingTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "acceptorReceiveProcessingTime", acceptorReceiveProcessingTime);
-        }
-
-        if (acceptorSendFailureProcessingTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "acceptorSendFailureProcessingTime", acceptorSendFailureProcessingTime);
-        }
-
-        if (acceptorSendFailures != 0) {
-            DocumentSerializableUtilities.addInt(element, "acceptorSendFailures", acceptorSendFailures);
-        }
-
-        if (acceptorSendProcessingTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "acceptorSendProcessingTime", acceptorSendProcessingTime);
-        }
-
-        if (acceptorTotalTimeConnected != 0) {
-            DocumentSerializableUtilities.addLong(element, "acceptorTotalTimeConnected", acceptorTotalTimeConnected);
-        }
-
-        if (acceptorTimeToConnect != 0) {
-            DocumentSerializableUtilities.addLong(element, "acceptorTimeToConnect", acceptorTimeToConnect);
-        }
-
-        if (acceptorTimeToFail != 0) {
-            DocumentSerializableUtilities.addLong(element, "acceptorTimeToFail", acceptorTimeToFail);
-        }
-
-        if (initiatorBytesReceived != 0) {
-            DocumentSerializableUtilities.addInt(element, "initiatorBytesReceived", initiatorBytesReceived);
-        }
-
-        if (initiatorBytesSent != 0) {
-            DocumentSerializableUtilities.addInt(element, "initiatorBytesSent", initiatorBytesSent);
-        }
-
-        if (initiatorTotalTimeConnected != 0) {
-            DocumentSerializableUtilities.addLong(element, "initiatorTotalTimeConnected", initiatorTotalTimeConnected);
-        }
-
-        if (initiatorConnections != 0) {
-            DocumentSerializableUtilities.addInt(element, "initiatorConnections", initiatorConnections);
-        }
-
-        if (initiatorConnectionsClosed != 0) {
-            DocumentSerializableUtilities.addInt(element, "initiatorConnectionsClosed", initiatorConnectionsClosed);
-        }
-
-        if (initiatorConnectionsDropped != 0) {
-            DocumentSerializableUtilities.addInt(element, "initiatorConnectionsDropped", initiatorConnectionsDropped);
-        }
-
-        if (initiatorConnectionsFailed != 0) {
-            DocumentSerializableUtilities.addInt(element, "initiatorConnectionsFailed", initiatorConnectionsFailed);
-        }
-
-        if (initiatorMessagesReceived != 0) {
-            DocumentSerializableUtilities.addInt(element, "initiatorMessagesReceived", initiatorMessagesReceived);
-        }
-
-        if (initiatorMessagesSent != 0) {
-            DocumentSerializableUtilities.addInt(element, "initiatorMessagesSent", initiatorMessagesSent);
-        }
-
-        if (initiatorReceiveFailureProcessingTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "initiatorReceiveFailureProcessingTime"
-                    ,
-                    initiatorReceiveFailureProcessingTime);
-        }
-
-        if (initiatorReceiveFailures != 0) {
-            DocumentSerializableUtilities.addInt(element, "initiatorReceiveFailures", initiatorReceiveFailures);
-        }
-
-        if (initiatorReceiveProcessingTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "initiatorReceiveProcessingTime", initiatorReceiveProcessingTime);
-        }
-
-        if (initiatorSendFailureProcessingTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "initiatorSendFailureProcessingTime"
-                    ,
-                    initiatorSendFailureProcessingTime);
-        }
-
-        if (initiatorSendFailures != 0) {
-            DocumentSerializableUtilities.addInt(element, "initiatorSendFailures", initiatorSendFailures);
-        }
-
-        if (initiatorSendProcessingTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "initiatorSendProcessingTime", initiatorSendProcessingTime);
-        }
-
-        if (initiatorTimeToConnect != 0) {
-            DocumentSerializableUtilities.addLong(element, "initiatorTimeToConnect", initiatorTimeToConnect);
-        }
-
-        if (initiatorTimeToFail != 0) {
-            DocumentSerializableUtilities.addLong(element, "initiatorTimeToFail", initiatorTimeToFail);
-        }
-
-        if (numPings != 0) {
-            DocumentSerializableUtilities.addInt(element, "numPings", numPings);
-        }
-
-        if (numFailedPings != 0) {
-            DocumentSerializableUtilities.addInt(element, "numFailedPings", numFailedPings);
-        }
-
-        if (pingTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "pingTime", pingTime);
-        }
-
-        if (pingFailedTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "pingFailedTime", pingFailedTime);
-        }
-
-        if (initiatorTimeToFail != 0) {
-            DocumentSerializableUtilities.addInt(element, "numPingsReceived", numPingsReceived);
-        }
-
-    }
-
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element childElement = (TextElement) e.nextElement();
-            String tagName = (String) childElement.getKey();
-
-            if (tagName.equals("peerID")) {
-                String peerIdString = DocumentSerializableUtilities.getString(childElement);
-
-                peerID = MetricUtilities.getPeerIdFromString(peerIdString);
-            }
-            if (tagName.equals("endpointAddress")) {
-                String endpointAddressString = DocumentSerializableUtilities.getString(childElement);
-
-                endpointAddress = new EndpointAddress(endpointAddressString);
-            } else if (tagName.equals("acceptorBytesReceived")) {
-                acceptorBytesReceived = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("acceptorBytesSent")) {
-                acceptorBytesSent = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("acceptorConnections")) {
-                acceptorConnections = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("acceptorConnectionsClosed")) {
-                acceptorConnectionsClosed = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("acceptorConnectionsDropped")) {
-                acceptorConnectionsDropped = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("acceptorConnectionsFailed")) {
-                acceptorConnectionsFailed = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("acceptorMessagesReceived")) {
-                acceptorMessagesReceived = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("acceptorMessagesSent")) {
-                acceptorMessagesSent = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("acceptorReceiveFailureProcessingTime")) {
-                acceptorReceiveFailureProcessingTime = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("acceptorReceiveFailures")) {
-                acceptorReceiveFailures = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("acceptorReceiveProcessingTime")) {
-                acceptorReceiveProcessingTime = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("acceptorSendFailureProcessingTime")) {
-                acceptorSendFailureProcessingTime = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("acceptorSendFailures")) {
-                acceptorSendFailures = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("acceptorSendProcessingTime")) {
-                acceptorSendProcessingTime = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("acceptorTotalTimeConnected")) {
-                acceptorTotalTimeConnected = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("acceptorTimeToConnect")) {
-                acceptorTimeToConnect = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("acceptorTimeToFail")) {
-                acceptorTimeToFail = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("initiatorBytesReceived")) {
-                initiatorBytesReceived = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("initiatorBytesSent")) {
-                initiatorBytesSent = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("initiatorTotalTimeConnected")) {
-                initiatorTotalTimeConnected = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("initiatorConnections")) {
-                initiatorConnections = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("initiatorConnectionsClosed")) {
-                initiatorConnectionsClosed = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("initiatorConnectionsDropped")) {
-                initiatorConnectionsDropped = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("initiatorConnectionsFailed")) {
-                initiatorConnectionsFailed = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("initiatorMessagesReceived")) {
-                initiatorMessagesReceived = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("initiatorMessagesSent")) {
-                initiatorMessagesSent = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("initiatorReceiveFailureProcessingTime")) {
-                initiatorReceiveFailureProcessingTime = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("initiatorReceiveFailures")) {
-                initiatorReceiveFailures = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("initiatorReceiveProcessingTime")) {
-                initiatorReceiveProcessingTime = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("initiatorSendFailureProcessingTime")) {
-                initiatorSendFailureProcessingTime = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("initiatorSendFailures")) {
-                initiatorSendFailures = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("initiatorSendProcessingTime")) {
-                initiatorSendProcessingTime = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("initiatorTimeToConnect")) {
-                initiatorTimeToConnect = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("initiatorTimeToFail")) {
-                initiatorTimeToFail = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("numPingsReceived")) {
-                numPingsReceived = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numPings")) {
-                numPings = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numFailedPings")) {
-                numFailedPings = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("pingTime")) {
-                pingTime = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("pingFailedTime")) {
-                pingFailedTime = DocumentSerializableUtilities.getLong(childElement);
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/TransportMeter.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/TransportMeter.java
deleted file mode 100644 (file)
index ca544b6..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.transportMeter;
-
-
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.impl.meter.MetricUtilities;
-import net.jxta.peer.PeerID;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-
-
-/**
- * Transport Meter for a specific registered Transport
- */
-public class TransportMeter {
-    public static final EndpointAddress UNKNOWN_ADDRESS = new EndpointAddress("<unknown>", "<unknown>", null, null);
-    public static final String UNKNOWN_PEER = MetricUtilities.UNKNOWN_PEERID.toString();
-    private String protocol;
-    private EndpointAddress endpointAddress;
-
-    private Hashtable<EndpointAddress, TransportBindingMeter> transportBindingMeters = new Hashtable<EndpointAddress, TransportBindingMeter>();
-    private TransportMetric cumulativeMetrics;
-
-    public TransportMeter(String protocol, EndpointAddress endpointAddress) {
-        this.endpointAddress = endpointAddress;
-        this.protocol = protocol;
-        cumulativeMetrics = new TransportMetric(this);
-    }
-
-    public TransportMetric getCumulativeMetrics() {
-        return cumulativeMetrics;
-    }
-
-    public TransportMetric collectMetrics() {
-        TransportMetric transportMetric = new TransportMetric(this);
-        boolean anyData = false;
-
-        for (Enumeration<TransportBindingMeter> e = transportBindingMeters.elements(); e.hasMoreElements();) {
-            TransportBindingMeter transportBindingMeter = e.nextElement();
-            TransportBindingMetric transportBindingMetric = transportBindingMeter.collectMetrics();
-
-            if (transportBindingMetric != null) {
-                transportMetric.addTransportBindingMetric(transportBindingMetric);
-                anyData = true;
-            }
-        }
-
-        if (anyData) {
-            return transportMetric;
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Get a specific Binding Meter corresponding to a connection for this transport
-     *
-     * @param peerIdString       PeerID of destination
-     * @param destinationAddress Destination Address of connected peer transport
-     * @return The Binding Meter for tracking this connection
-     */
-    public synchronized TransportBindingMeter getTransportBindingMeter(String peerIdString, EndpointAddress destinationAddress) {
-        PeerID peerID = MetricUtilities.getPeerIdFromString(peerIdString);
-
-        return getTransportBindingMeter(peerID, destinationAddress);
-    }
-
-    /**
-     * Get a specific Binding Meter corresponding to a connection for this transport
-     *
-     * @param peerID  destination <code>PeerID<code>
-     * @param destinationAddress Destination Address of connected peer transport
-     * @return The Binding Meter for tracking this connection
-     */
-    public synchronized TransportBindingMeter getTransportBindingMeter(PeerID peerID, EndpointAddress destinationAddress) {
-        destinationAddress = new EndpointAddress(destinationAddress, null, null);
-
-        TransportBindingMeter transportBindingMeter = transportBindingMeters.get(destinationAddress);
-
-        if (transportBindingMeter == null) {
-            transportBindingMeter = new TransportBindingMeter(peerID, destinationAddress);
-            transportBindingMeters.put(destinationAddress, transportBindingMeter);
-            cumulativeMetrics.addTransportBindingMetric(transportBindingMeter.getCumulativeMetrics());
-        } else {
-            transportBindingMeter.setPeerID(peerID);
-        }
-
-        return transportBindingMeter;
-    }
-
-    public Enumeration<TransportBindingMeter> getTransportBindingMeters() {
-        return transportBindingMeters.elements();
-    }
-
-    public int getTransportBindingCount() {
-        return transportBindingMeters.size();
-    }
-
-    public String getProtocol() {
-        return protocol;
-    }
-
-    public EndpointAddress getEndpointAddress() {
-        return endpointAddress;
-    }
-
-    @Override
-    public String toString() {
-        return "TransportMeter(" + endpointAddress + ")";
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/TransportMeterBuildSettings.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/TransportMeterBuildSettings.java
deleted file mode 100644 (file)
index 1d09ff6..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Copyright (c) 2001-2006 Sun Microsystems, Inc. All rights reserved.
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at https://jxta.dev.java.net.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <https://jxta.dev.java.net/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
-
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  https://jxta.dev.java.net/
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- *  
- */
-
-
-/*  ****  THIS IS A GENERATED FILE. DO NOT EDIT.  ****  */
-
-package net.jxta.impl.endpoint.transportMeter;
-
-import net.jxta.impl.meter.*;
-
-public interface TransportMeterBuildSettings extends MeterBuildSettings {
-       public static final boolean TRANSPORT_METERING = ConditionalTransportMeterBuildSettings.isRuntimeMetering();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/TransportMetric.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/TransportMetric.java
deleted file mode 100644 (file)
index 3e8b027..0000000
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.transportMeter;
-
-
-import net.jxta.endpoint.EndpointAddress;
-
-import net.jxta.util.documentSerializable.DocumentSerializable;
-import net.jxta.util.documentSerializable.DocumentSerializableUtilities;
-import net.jxta.util.documentSerializable.DocumentSerializationException;
-import net.jxta.document.Element;
-import net.jxta.document.TextElement;
-
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-
-
-/**
- * The Metric for a single Transport
- **/
-public class TransportMetric implements DocumentSerializable {
-    private String protocol;
-    private EndpointAddress endpointAddress;
-    private HashMap<EndpointAddress, TransportBindingMetric> transportBindingMetrics = new HashMap<EndpointAddress, TransportBindingMetric>();
-
-    public TransportMetric(TransportMeter transportMeter) {
-        this.endpointAddress = transportMeter.getEndpointAddress();
-        this.protocol = transportMeter.getProtocol();
-    }
-
-    public TransportMetric() {}
-
-    public TransportMetric(TransportMetric prototype) {
-        this.endpointAddress = prototype.endpointAddress;
-        this.protocol = prototype.protocol;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (obj instanceof TransportMetric) {
-            TransportMetric other = (TransportMetric) obj;
-
-            return protocol.equals(other.protocol) && endpointAddress.equals(other.endpointAddress);
-        } else {
-            return false;
-        }
-    }
-
-    @Override
-    public int hashCode() { 
-        return endpointAddress.hashCode();
-    }
-
-    public EndpointAddress getEndpointAddress() {
-        return endpointAddress;
-    }
-
-    public String getProtocol() {
-        return protocol;
-    }
-       
-    public synchronized void addTransportBindingMetric(TransportBindingMetric transportBindingMetric) {
-        transportBindingMetrics.put(transportBindingMetric.getEndpointAddress(), transportBindingMetric);
-    }
-
-    public TransportBindingMetric getTransportBindingMetric(EndpointAddress endpointAddress) {
-        return transportBindingMetrics.get(endpointAddress);
-    }
-
-    public TransportBindingMetric getTransportBindingMetric(TransportBindingMetric prototype) { 
-        return getTransportBindingMetric(prototype.getEndpointAddress());
-    }
-
-    public Iterator<TransportBindingMetric> getTransportBindingMetrics() {
-        return transportBindingMetrics.values().iterator();
-    }
-
-    public int getTransportBindingMetricsCount() {
-        return transportBindingMetrics.size();
-    }
-       
-    public void serializeTo(Element element) throws DocumentSerializationException {
-        DocumentSerializableUtilities.addString(element, "endpointAddress", endpointAddress.toString());
-        DocumentSerializableUtilities.addString(element, "protocol", protocol);
-
-        for (Iterator<TransportBindingMetric> i = getTransportBindingMetrics(); i.hasNext();) {
-            TransportBindingMetric transportBindingMetric = i.next();
-
-            DocumentSerializableUtilities.addDocumentSerializable(element, "binding", transportBindingMetric);         
-        }
-    }
-
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element childElement = (TextElement) e.nextElement();
-            String tagName = (String) childElement.getKey();
-                       
-            if (tagName.equals("endpointAddress")) {
-                String endpointAddressString = DocumentSerializableUtilities.getString(childElement);  
-
-                endpointAddress = new EndpointAddress(endpointAddressString);
-            } else if (tagName.equals("protocol")) {
-                protocol = DocumentSerializableUtilities.getString(childElement);
-            } else if (tagName.equals("binding")) {
-                TransportBindingMetric transportBindingMetric = (TransportBindingMetric) DocumentSerializableUtilities.getDocumentSerializable(
-                        childElement, TransportBindingMetric.class);
-
-                transportBindingMetrics.put(transportBindingMetric.getEndpointAddress(), transportBindingMetric);
-            }
-        }
-    }
-
-    void mergeMetrics(TransportMetric otherTransportMetric) {
-        for (Iterator<TransportBindingMetric> i = otherTransportMetric.getTransportBindingMetrics(); i.hasNext();) {
-            TransportBindingMetric otherTransportBindingMetric = i.next();
-            TransportBindingMetric transportBindingMetric = getTransportBindingMetric(
-                    otherTransportBindingMetric.getEndpointAddress());
-
-            if (transportBindingMetric == null) {
-                transportBindingMetric = new TransportBindingMetric(otherTransportBindingMetric);
-                addTransportBindingMetric(transportBindingMetric);
-            }
-                        
-            transportBindingMetric.mergeMetrics(otherTransportBindingMetric);                  
-        }
-                               
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/TransportServiceMetric.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/TransportServiceMetric.java
deleted file mode 100644 (file)
index 0cb9441..0000000
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.transportMeter;
-
-
-import net.jxta.document.Element;
-import net.jxta.document.TextElement;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.id.IDFactory;
-import net.jxta.meter.MonitorResources;
-import net.jxta.meter.ServiceMetric;
-import net.jxta.platform.ModuleClassID;
-import net.jxta.util.documentSerializable.DocumentSerializableUtilities;
-import net.jxta.util.documentSerializable.DocumentSerializationException;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.LinkedList;
-
-
-/**
- * The Service Monitor Metric for the Transport Services
- */
-public class TransportServiceMetric implements ServiceMetric {
-    private LinkedList<TransportMetric> transportMetrics = new LinkedList<TransportMetric>();
-    private ModuleClassID moduleClassID = MonitorResources.transportServiceMonitorClassID;
-
-    public TransportServiceMetric() {}
-
-    /**
-     * {@inheritDoc}
-     */
-    public void init(ModuleClassID moduleClassID) {
-        this.moduleClassID = moduleClassID;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ModuleClassID getModuleClassID() {
-        return moduleClassID;
-    }
-
-    /**
-     * Append a Transport Metric
-     * @param transportMetric metric to add
-     */
-    public void addTransportMetric(TransportMetric transportMetric) {
-        transportMetrics.add(transportMetric);
-    }
-
-    /**
-     * Get all Transport Metrics
-     * @return iterator of all transport metrics
-     */
-    public Iterator<TransportMetric> getTransportMetrics() {
-        return transportMetrics.iterator();
-    }
-
-    /**
-     * Get the Transport Metric for a specific Transport Type
-     * @param protocol protocol name
-     * @param endpointAddress address
-     * @return  a Transport Metric for a specific Transport Type
-     */
-    public TransportMetric getTransportMetric(String protocol, EndpointAddress endpointAddress) {
-        for (TransportMetric transportMetric : transportMetrics) {
-            if (protocol.equals(transportMetric.getProtocol()) && endpointAddress.equals(transportMetric.getEndpointAddress())) {
-                return transportMetric;
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * Get the Transport Metric for a specific Transport Type
-     *
-     * @param prototype a similar Transport metric object (ie same protocol/endpointAddress)
-     * @see #getTransportMetric(String, EndpointAddress)
-     * @return a Transport Metric for a specific Transport Type
-     */
-    public TransportMetric getTransportMetric(TransportMetric prototype) {
-        return getTransportMetric(prototype.getProtocol(), prototype.getEndpointAddress());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void serializeTo(Element element) throws DocumentSerializationException {
-        for (TransportMetric transportMetric : transportMetrics) {
-            DocumentSerializableUtilities.addDocumentSerializable(element, "transportMetric", transportMetric);
-        }
-        if (moduleClassID != null) {
-            DocumentSerializableUtilities.addString(element, "moduleClassID", moduleClassID.toString());
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element childElement = (TextElement) e.nextElement();
-            String tagName = (String) childElement.getKey();
-
-            if (tagName.equals("transportMetric")) {
-                TransportMetric transportMetric = (TransportMetric) DocumentSerializableUtilities.getDocumentSerializable(
-                        childElement, TransportMetric.class);
-
-                transportMetrics.add(transportMetric);
-            }
-            if (tagName.equals("moduleClassID")) {
-                try {
-                    moduleClassID = (ModuleClassID) IDFactory.fromURI(
-                            new URI(DocumentSerializableUtilities.getString(childElement)));
-                } catch (URISyntaxException jex) {
-                    throw new DocumentSerializationException("Can't read moduleClassID", jex);
-                }
-            }
-        }
-    }
-
-    /**
-     * Make a shallow copy of this metric only including the portions designated in the Filter
-     * <P> Note: since this is a shallow copy it is dangerous to modify the submetrics
-     *
-     * @param transportServiceMonitorFilter Filter designates constituant parts to be included
-     * @return a copy of this metric with references to the designated parts
-     */
-    public TransportServiceMetric shallowCopy(TransportServiceMonitorFilter transportServiceMonitorFilter) {
-        TransportServiceMetric serviceMetric = new TransportServiceMetric();
-
-        serviceMetric.moduleClassID = moduleClassID;
-
-        for (Iterator<TransportMetric> i = getTransportMetrics(); i.hasNext();) {
-            TransportMetric transportMetric = i.next();
-            String protocol = transportMetric.getProtocol();
-
-            if (transportServiceMonitorFilter.hasTransport(protocol)) {
-                serviceMetric.addTransportMetric(transportMetric);
-            }
-        }
-
-        return serviceMetric;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void mergeMetrics(ServiceMetric serviceMetric) {
-        mergeMetrics(serviceMetric, null);
-    }
-
-    /**
-     *
-     * @param serviceMetric
-     * @param transportServiceMonitorFilter
-     */
-    public void mergeMetrics(ServiceMetric serviceMetric, TransportServiceMonitorFilter transportServiceMonitorFilter) {
-        TransportServiceMetric otherTransportServiceMetric = (TransportServiceMetric) serviceMetric;
-
-        for (Iterator<TransportMetric> i = otherTransportServiceMetric.getTransportMetrics(); i.hasNext();) {
-            TransportMetric otherTransportMetric = i.next();
-            String protocol = otherTransportMetric.getProtocol();
-
-            if ((transportServiceMonitorFilter == null) || transportServiceMonitorFilter.hasTransport(protocol)) {
-                TransportMetric transportMetric = getTransportMetric(otherTransportMetric.getProtocol()
-                        ,
-                        otherTransportMetric.getEndpointAddress());
-
-                if (transportMetric == null) {
-                    transportMetric = new TransportMetric(otherTransportMetric);
-                    addTransportMetric(transportMetric);
-                }
-
-                transportMetric.mergeMetrics(otherTransportMetric);
-            }
-        }
-    }
-
-    /**
-     * Make a deep copy of this metric only including the portions designated in the Filter
-     * The resulting metric is Safe to modify without danger to the underlying Monitor Metrics
-     *
-     * @param transportServiceMonitorFilter Filter designates constituant parts to be included
-     * @return a copy of this metric with references to the designated parts
-     */
-    public TransportServiceMetric deepCopy(TransportServiceMonitorFilter transportServiceMonitorFilter) {
-        TransportServiceMetric serviceMetric = new TransportServiceMetric();
-
-        serviceMetric.moduleClassID = moduleClassID;
-
-        serviceMetric.mergeMetrics(this, transportServiceMonitorFilter);
-        return serviceMetric;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void diffMetrics(ServiceMetric otherOne) {
-        throw new RuntimeException("Not Supported");
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/TransportServiceMonitor.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/TransportServiceMonitor.java
deleted file mode 100644 (file)
index 4c790c2..0000000
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.transportMeter;
-
-
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.impl.meter.GenericServiceMonitor;
-import net.jxta.meter.ServiceMetric;
-import net.jxta.meter.ServiceMonitorFilter;
-
-import java.util.LinkedList;
-
-
-/**
- * The Service Monitor Metric for the Transport Services
- * <p> Each Transport will register with this to create their own TransportMeter
- */
-public class TransportServiceMonitor extends GenericServiceMonitor {
-    private LinkedList<TransportMeter> transportMeters = new LinkedList<TransportMeter>();
-    private TransportServiceMetric cumulativeTransportServiceMetric;
-
-    public TransportServiceMonitor() {}
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected void init() {
-        cumulativeTransportServiceMetric = (TransportServiceMetric) getCumulativeServiceMetric();
-    }
-
-    /**
-     * Create a service TransportMeter for a registerd Transport Type
-     *
-     * @param protocol            protocol identifier
-     * @param sourceAddressString source address string
-     * @return a <code>TransportMeter</code>
-     * @deprecated use <code>#createTransportMeter(String, EndpointAddress)</code>
-     */
-    @Deprecated
-    public synchronized TransportMeter createTransportMeter(String protocol, String sourceAddressString) {
-        EndpointAddress endpointAddress = new EndpointAddress(sourceAddressString);
-
-        return createTransportMeter(protocol, endpointAddress);
-    }
-
-    /**
-     * Create a service TransportMeter for a registerd Transport Type
-     *
-     * @param protocol        Descriptive name of protocol
-     * @param endpointAddress The common public address for this transport
-     * @return Transport Meter for this transport
-     */
-    public synchronized TransportMeter createTransportMeter(String protocol, EndpointAddress endpointAddress) {
-        endpointAddress = new EndpointAddress(endpointAddress, null, null);
-
-        for (TransportMeter transportMeter : transportMeters) {
-            if (transportMeter.getProtocol().equals(protocol) && transportMeter.getEndpointAddress().equals(endpointAddress)) {
-                return transportMeter;
-            }
-        }
-
-        TransportMeter transportMeter = new TransportMeter(protocol, endpointAddress);
-
-        transportMeters.add(transportMeter);
-        cumulativeTransportServiceMetric.addTransportMetric(transportMeter.getCumulativeMetrics());
-        return transportMeter;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected ServiceMetric collectServiceMetrics() {
-        TransportServiceMetric transportServiceMetric = (TransportServiceMetric) createServiceMetric();
-
-        boolean anyData = false;
-
-        for (TransportMeter transportMeter : transportMeters) {
-            TransportMetric transportMetric = transportMeter.collectMetrics();
-
-            if (transportMetric != null) {
-                transportServiceMetric.addTransportMetric(transportMetric);
-                anyData = true;
-            }
-        }
-
-        if (anyData) {
-            return transportServiceMetric;
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public ServiceMetric getServiceMetric(ServiceMonitorFilter serviceMonitorFilter, long fromTime, long toTime, int pulseIndex, long reportRate) {
-        int deltaReportRateIndex = monitorManager.getReportRateIndex(reportRate);
-        TransportServiceMetric origServiceMetric = (TransportServiceMetric) deltaServiceMetrics[deltaReportRateIndex];
-
-        if (origServiceMetric == null) {
-            return null;
-        }
-
-        TransportServiceMonitorFilter transportServiceMonitorFilter = (TransportServiceMonitorFilter) serviceMonitorFilter;
-
-        return origServiceMetric.shallowCopy(transportServiceMonitorFilter);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public ServiceMetric getCumulativeServiceMetric(ServiceMonitorFilter serviceMonitorFilter, long fromTime, long toTime) {
-        TransportServiceMetric origServiceMetric = (TransportServiceMetric) cumulativeServiceMetric;
-
-        TransportServiceMonitorFilter transportServiceMonitorFilter = (TransportServiceMonitorFilter) serviceMonitorFilter;
-
-        return origServiceMetric.deepCopy(transportServiceMonitorFilter);
-    }
-
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/TransportServiceMonitorFilter.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/endpoint/transportMeter/TransportServiceMonitorFilter.java
deleted file mode 100644 (file)
index ed5f0f4..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.endpoint.transportMeter;
-
-
-import net.jxta.document.Element;
-import net.jxta.document.TextElement;
-import net.jxta.id.IDFactory;
-import net.jxta.meter.MonitorResources;
-import net.jxta.meter.ServiceMonitorFilter;
-import net.jxta.platform.ModuleClassID;
-import net.jxta.platform.ModuleSpecID;
-import net.jxta.util.documentSerializable.DocumentSerializableUtilities;
-import net.jxta.util.documentSerializable.DocumentSerializationException;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Enumeration;
-import java.util.LinkedList;
-
-
-public class TransportServiceMonitorFilter implements ServiceMonitorFilter {
-    private ModuleClassID moduleClassID = MonitorResources.transportServiceMonitorClassID;
-    private LinkedList<String> includedTransports = new LinkedList<String>();
-    private boolean includeAllTransports = true;
-
-    public TransportServiceMonitorFilter() {}
-
-    public void init(ModuleClassID moduleClassID) {
-        this.moduleClassID = moduleClassID;
-    }
-
-    public ModuleClassID getModuleClassID() {
-        return moduleClassID;
-    }
-
-    public void removeAllTransports() {
-        includedTransports.clear();
-        includeAllTransports = false;
-    }
-
-    public void includeAllTransports(boolean includeAllTransports) {
-        this.includeAllTransports = includeAllTransports;
-    }
-
-    public void includeTransport(String protocol) {
-        includedTransports.add(protocol);
-    }
-
-    public boolean hasTransport(String protocol) {
-        if (includeAllTransports) {
-            return true;
-        }
-
-        for (String includedTransport : includedTransports) {
-            if (includedTransport.equals(protocol)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    public void includeTransport(ModuleSpecID transportModuleClassID, String subProtocol) {// todo: how is this used???
-    }
-
-    public void serializeTo(Element element) throws DocumentSerializationException {
-        DocumentSerializableUtilities.addString(element, "moduleClassID", moduleClassID.toString());
-
-        DocumentSerializableUtilities.addBoolean(element, "includeAllTransports", includeAllTransports);
-
-        for (String includedTransport : includedTransports) {
-            DocumentSerializableUtilities.addString(element, "includedTransport", includedTransport);
-        }
-    }
-
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element childElement = (TextElement) e.nextElement();
-            String tagName = (String) childElement.getKey();
-
-            if (tagName.equals("moduleClassID")) {
-                try {
-                    moduleClassID = (ModuleClassID) IDFactory.fromURI(
-                            new URI(DocumentSerializableUtilities.getString(childElement)));
-                } catch (URISyntaxException jex) {
-                    throw new DocumentSerializationException("Can't read moduleClassID", jex);
-                }
-            }
-            if (tagName.equals("includedTransport")) {
-                String includedTransport = DocumentSerializableUtilities.getString(childElement);
-
-                includedTransports.add(includedTransport);
-            }
-            if (tagName.equals("includeAllTransports")) {
-                includeAllTransports = DocumentSerializableUtilities.getBoolean(childElement);
-            }
-        }
-    }
-
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/CodatID.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/CodatID.java
deleted file mode 100644 (file)
index d1d0ceb..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.CBID;
-
-
-import net.jxta.impl.id.UUID.IDBytes;
-import net.jxta.impl.id.UUID.UUID;
-import net.jxta.impl.id.UUID.UUIDFactory;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.security.ProviderException;
-import java.util.logging.Logger;
-
-
-/**
- * An implementation of the {@link net.jxta.codat.CodatID} ID Type.
- */
-public class CodatID extends net.jxta.impl.id.UUID.CodatID {
-
-    /**
-     * Log4J Logger
-     */
-    private static final transient Logger LOG = Logger.getLogger(CodatID.class.getName());
-
-    /**
-     * Internal constructor
-     */
-    protected CodatID() {
-        super();
-    }
-
-    /**
-     * Intializes contents from provided bytes.
-     *
-     * @param id the ID data
-     */
-    protected CodatID(IDBytes id) {
-        super(id);
-    }
-
-    /**
-     * See {@link net.jxta.id.IDFactory.Instantiator#newCodatID(net.jxta.peergroup.PeerGroupID)}.
-     *
-     * @param groupID the GroupID
-     */
-    public CodatID(PeerGroupID groupID) {
-        super(groupID.getUUID(), UUIDFactory.newUUID());
-    }
-
-    /**
-     * See {@link net.jxta.id.IDFactory.Instantiator#newCodatID(net.jxta.peergroup.PeerGroupID,byte[])}.
-     *
-     * @param groupID the GroupID
-     * @param seed the seed
-     */
-    public CodatID(PeerGroupID groupID, byte[] seed) {
-        this();
-
-        UUID groupCBID = groupID.getUUID();
-
-        id.longIntoBytes(CodatID.groupIdOffset, groupCBID.getMostSignificantBits());
-        id.longIntoBytes(CodatID.groupIdOffset + 8, groupCBID.getLeastSignificantBits());
-
-        MessageDigest digester = null;
-
-        try {
-            digester = MessageDigest.getInstance("SHA-1");
-        } catch (NoSuchAlgorithmException caught) {
-            digester = null;
-        }
-
-        if (digester == null) {
-            throw new ProviderException("SHA1 digest algorithm not found");
-        }
-
-        byte[] digest = digester.digest(seed);
-
-        // we keep only the 128 most significant bits
-        byte[] buf16 = new byte[16];
-
-        System.arraycopy(digest, 0, buf16, 0, 16);
-
-        UUID peerCBID = UUIDFactory.newUUID(buf16);
-
-        id.longIntoBytes(CodatID.idOffset, peerCBID.getMostSignificantBits());
-        id.longIntoBytes(CodatID.idOffset + 8, peerCBID.getLeastSignificantBits());
-    }
-
-    /**
-     * See {@link net.jxta.id.IDFactory.Instantiator#newCodatID(net.jxta.peergroup.PeerGroupID,InputStream)}.
-     *
-     * @param groupID the GroupID
-     * @param in the input stream
-     * @throws IOException if an io error occurs
-     */
-    public CodatID(PeerGroupID groupID, InputStream in) throws IOException {
-        super(groupID, in);
-    }
-
-    /**
-     * See {@link net.jxta.id.IDFactory.Instantiator#newCodatID(net.jxta.peergroup.PeerGroupID,InputStream)}.
-     *
-     * @param groupID the GroupID
-     * @param seed the seed
-     * @param in the input stream
-     * @throws IOException if an io error occurs
-     */
-    public CodatID(PeerGroupID groupID, byte[] seed, InputStream in) throws IOException {
-        this(groupID, seed);
-
-        setHash(in);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getIDFormat() {
-        return IDFormat.INSTANTIATOR.getSupportedIDFormat();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public net.jxta.id.ID getPeerGroupID() {
-        UUID groupCBID = new UUID(id.bytesIntoLong(CodatID.groupIdOffset), id.bytesIntoLong(CodatID.groupIdOffset + 8));
-
-        PeerGroupID groupID = new PeerGroupID(groupCBID);
-
-        // convert to the generic world PGID as necessary
-        return IDFormat.translateToWellKnown(groupID);
-    }
-
-    /**
-     * Returns the UUID associated with this CodatID.
-     *
-     * @return The UUID associated with this CodatID.
-     */
-    public UUID getUUID() {
-        return new UUID(id.bytesIntoLong(CodatID.idOffset), id.bytesIntoLong(CodatID.idOffset + 8));
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/IDFormat.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/IDFormat.java
deleted file mode 100644 (file)
index a87ef04..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.id.CBID;
-
-
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.impl.id.UUID.UUID;
-
-import java.util.logging.Logger;
-
-
-/**
- * A general purpose JXTA ID Format implementing all of the six standard ID
- * Types. It was originally created for the Java 2 SE reference implementation.
- * The 'cbid' format uses values generated from secure hash functions as the
- * mechanism for generating canonical values for the ids it provides.
- *
- * @see net.jxta.id.ID
- * @see <a href="http://spec.jxta.org/nonav/v1.0/docbook/JXTAProtocols.html#ids" target="_blank">JXTA Protocols Specification : IDs</a>
- */
-public class IDFormat extends net.jxta.impl.id.UUID.IDFormat {
-
-    /**
-     * Log4J Logger
-     */
-    private static final transient Logger LOG = Logger.getLogger(IDFormat.class.getName());
-
-    /**
-     * Our local version of the world Peer Group ID. We need this for cases
-     * where we have to make ids which are in the world peer group. We only
-     * use this ID for those cases and never return this ID.
-     */
-    static final PeerGroupID worldPeerGroupID = new PeerGroupID(new UUID(0x5961626164616261L, 0x4A78746150325033L)); // YabadabaJXTAP2P!
-
-    /**
-     * Our local version of the net Peer Group ID. We need this for cases
-     * where we have to make ids which are in the net peer group. We only
-     * use this ID for those cases and never return this ID.
-     */
-    static final PeerGroupID defaultNetPeerGroupID = new PeerGroupID(new UUID(0x5961626164616261L, 0x4E50472050325033L)); // YabadabaNPG P2P!
-
-    /**
-     * This table maps our local private versions of the well known ids to the
-     * globally known version.
-     */
-    private final static Object[][] wellKnownIDs = {
-        { net.jxta.peergroup.PeerGroupID.worldPeerGroupID, worldPeerGroupID}
-                ,
-        { net.jxta.peergroup.PeerGroupID.defaultNetPeerGroupID, defaultNetPeerGroupID}
-    };
-
-    /**
-     * The instantiator for this ID Format which is used by the IDFactory.
-     */
-    public static final IDFactory.URIInstantiator INSTANTIATOR = new Instantiator();
-
-    /**
-     * This class cannot be instantiated.
-     */
-    protected IDFormat() {}
-
-    /**
-     * Translate from well known ID to our locally encoded versions.
-     *
-     * @param input the id to be translated.
-     * @return the translated ID or the input ID if no translation was needed.
-     */
-    static ID translateFromWellKnown(ID input) {
-        for (Object[] wellKnownID : wellKnownIDs) {
-            ID aWellKnown = (ID) wellKnownID[0];
-
-            if (aWellKnown.equals(input)) {
-                return (ID) wellKnownID[1];
-            }
-        }
-
-        return input;
-    }
-
-    /**
-     * Translate from locally encoded versions to the well known versions.
-     *
-     * @param input the id to be translated.
-     * @return the translated ID or the input ID if no translation was needed.
-     */
-    static ID translateToWellKnown(ID input) {
-        for (Object[] wellKnownID : wellKnownIDs) {
-            ID aLocalEncoding = (ID) wellKnownID[1];
-
-            if (aLocalEncoding.equals(input)) {
-                return (ID) wellKnownID[0];
-            }
-        }
-
-        return input;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/Instantiator.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/Instantiator.java
deleted file mode 100644 (file)
index a1603cc..0000000
+++ /dev/null
@@ -1,445 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.CBID;
-
-
-import net.jxta.impl.id.UUID.IDBytes;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.net.UnknownServiceException;
-
-
-/**
- * The instantiator for the CBID ID Format.
- * <p/>
- * <p/>For "seed" variant constructors, the "seed" must be a certificate.
- */
-public class Instantiator implements net.jxta.id.IDFactory.URIInstantiator {
-
-    /**
-     * Our ID Format
-     */
-    final static String CBIDEncoded = "cbid";
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getSupportedIDFormat() {
-        return CBIDEncoded;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.id.ID fromURL(URL source) throws MalformedURLException, UnknownServiceException {
-
-        // check the protocol
-        if (!net.jxta.id.ID.URIEncodingName.equalsIgnoreCase(source.getProtocol())) {
-            throw new UnknownServiceException("URI protocol type was not as expected.");
-        }
-
-        String encoded = source.getFile();
-
-        int colonAt = encoded.indexOf(':');
-
-        // There's a colon right?
-        if (-1 == colonAt) {
-            throw new UnknownServiceException("URN namespace was missing.");
-        }
-
-        // check the namespace
-        if (!net.jxta.id.ID.URNNamespace.equalsIgnoreCase(encoded.substring(0, colonAt))) {
-            throw new UnknownServiceException("URN namespace was not as expected.");
-        }
-
-        // skip the namespace portion and the colon
-        encoded = encoded.substring(colonAt + 1);
-
-        int dashAt = encoded.indexOf('-');
-
-        // there's a dash, right?
-        if (-1 == dashAt) {
-            throw new UnknownServiceException("URN Encodingtype was missing.");
-        }
-
-        if (!encoded.substring(0, dashAt).equals(getSupportedIDFormat())) {
-            throw new UnknownServiceException("JXTA ID Format was not as expected.");
-        }
-
-        // skip the dash
-        encoded = encoded.substring(dashAt + 1);
-
-        // check that the length is even
-        if (0 != (encoded.length() % 2)) {
-            throw new MalformedURLException("URN contains an odd number of chars");
-        }
-
-        // check that the length is long enough
-        if (encoded.length() < 2) {
-            throw new MalformedURLException("URN does not contain enough chars");
-        }
-
-        // check that id is short enough
-        if (IDFormat.IdByteArraySize < (encoded.length() % 2)) {
-            throw new MalformedURLException("URN contains too many chars");
-        }
-
-        net.jxta.id.ID result = null;
-        IDBytes id = new IDBytes();
-
-        try {
-            // do the primary portion.
-            for (int eachByte = 0; eachByte < ((encoded.length() / 2) - IDFormat.flagsSize); eachByte++) {
-                int index = eachByte * 2;
-                String twoChars = encoded.substring(index, index + 2);
-
-                id.bytes[eachByte] = (byte) Integer.parseInt(twoChars, 16);
-            }
-
-            // do the flags
-            for (int eachByte = IDFormat.flagsOffset; eachByte < IDFormat.IdByteArraySize; eachByte++) {
-                int index = encoded.length() - (IDFormat.IdByteArraySize - eachByte) * 2;
-                String twoChars = encoded.substring(index, index + 2);
-
-                id.bytes[eachByte] = (byte) Integer.parseInt(twoChars, 16);
-            }
-        } catch (NumberFormatException caught) {
-            throw new MalformedURLException("Invalid Character in JXTA URI");
-        }
-
-        switch (id.bytes[IDFormat.flagsOffset + IDFormat.flagsIdTypeOffset]) {
-        case IDFormat.flagCodatID:
-            result = new CodatID(id);
-            break;
-
-        case IDFormat.flagPeerGroupID:
-            result = new PeerGroupID(id);
-            result = (PeerGroupID) IDFormat.translateToWellKnown(result);
-            break;
-
-        case IDFormat.flagPeerID:
-            result = new PeerID(id);
-            break;
-
-        case IDFormat.flagPipeID:
-            result = new PipeID(id);
-            break;
-
-        case IDFormat.flagModuleClassID:
-            result = new ModuleClassID(id);
-            break;
-
-        case IDFormat.flagModuleSpecID:
-            result = new ModuleSpecID(id);
-            break;
-
-        default:
-            throw new MalformedURLException("JXTA ID Type not recognized");
-        }
-
-        return result;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.codat.CodatID newCodatID(net.jxta.peergroup.PeerGroupID groupID) {
-        PeerGroupID peerGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(groupID);
-
-        return new CodatID(peerGroupID);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.codat.CodatID newCodatID(net.jxta.peergroup.PeerGroupID groupID, byte[] seed) {
-        PeerGroupID peerGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(groupID);
-
-        return new CodatID(peerGroupID, seed);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.codat.CodatID newCodatID(net.jxta.peergroup.PeerGroupID groupID, InputStream in) throws IOException {
-        PeerGroupID peerGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(groupID);
-
-        return new CodatID(peerGroupID, in);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.codat.CodatID newCodatID(net.jxta.peergroup.PeerGroupID groupID, byte[] seed, InputStream in) throws IOException {
-        PeerGroupID peerGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(groupID);
-
-        return new CodatID(peerGroupID, seed, in);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.peergroup.PeerGroupID newPeerGroupID() {
-        return new PeerGroupID();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.peergroup.PeerGroupID newPeerGroupID(byte[] seed) {
-        return new PeerGroupID(seed);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.peergroup.PeerGroupID newPeerGroupID(net.jxta.peergroup.PeerGroupID parent) {
-        return new PeerGroupID();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.peergroup.PeerGroupID newPeerGroupID(net.jxta.peergroup.PeerGroupID parent, byte[] seed) {
-        PeerGroupID parentGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(parent);
-
-        return new PeerGroupID(parentGroupID, seed);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.peer.PeerID newPeerID(net.jxta.peergroup.PeerGroupID groupID) {
-        PeerGroupID peerGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(groupID);
-
-        throw new UnsupportedOperationException("Must provide a cert as seed to generate a peer id.");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.peer.PeerID newPeerID(net.jxta.peergroup.PeerGroupID groupID, byte[] seed) {
-        PeerGroupID peerGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(groupID);
-
-        return new PeerID(peerGroupID, seed);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.pipe.PipeID newPipeID(net.jxta.peergroup.PeerGroupID groupID) {
-        PeerGroupID peerGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(groupID);
-
-        return new PipeID(peerGroupID);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.pipe.PipeID newPipeID(net.jxta.peergroup.PeerGroupID groupID, byte[] seed) {
-        PeerGroupID peerGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(groupID);
-
-        return new PipeID(peerGroupID, seed);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.platform.ModuleClassID newModuleClassID() {
-        return new ModuleClassID();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.platform.ModuleClassID newModuleClassID(net.jxta.platform.ModuleClassID classID) {
-        return new ModuleClassID((ModuleClassID) classID);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.platform.ModuleSpecID newModuleSpecID(net.jxta.platform.ModuleClassID classID) {
-        return new ModuleSpecID((ModuleClassID) classID);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.id.ID fromURI(URI source) throws URISyntaxException {
-
-        // check the protocol
-        if (!net.jxta.id.ID.URIEncodingName.equalsIgnoreCase(source.getScheme())) {
-            throw new URISyntaxException(source.toString(), "URI scheme was not as expected.");
-        }
-
-        String decoded = source.getSchemeSpecificPart();
-
-        int colonAt = decoded.indexOf(':');
-
-        // There's a colon right?
-        if (-1 == colonAt) {
-            throw new URISyntaxException(source.toString(), "URN namespace was missing.");
-        }
-
-        // check the namespace
-        if (!net.jxta.id.ID.URNNamespace.equalsIgnoreCase(decoded.substring(0, colonAt))) {
-            throw new URISyntaxException(source.toString()
-                    ,
-                    "URN namespace was not as expected. (" + net.jxta.id.ID.URNNamespace + "!=" + decoded.substring(0, colonAt)
-                    + ")");
-        }
-
-        // skip the namespace portion and the colon
-        decoded = decoded.substring(colonAt + 1);
-
-        return fromURNNamespaceSpecificPart(decoded);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.id.ID fromURNNamespaceSpecificPart(String source) throws URISyntaxException {
-        int dashAt = source.indexOf('-');
-
-        // there's a dash, right?
-        if (-1 == dashAt) {
-            throw new URISyntaxException(source, "URN Encodingtype was missing.");
-        }
-
-        if (!source.substring(0, dashAt).equals(getSupportedIDFormat())) {
-            throw new URISyntaxException(source, "JXTA ID Format was not as expected.");
-        }
-
-        // skip the dash
-        source = source.substring(dashAt + 1);
-
-        // check that the length is even
-        if (0 != (source.length() % 2)) {
-            throw new URISyntaxException(source, "URN contains an odd number of chars");
-        }
-
-        // check that the length is long enough
-        if (source.length() < 2) {
-            throw new URISyntaxException(source, "URN does not contain enough chars");
-        }
-
-        // check that id is short enough
-        if (IDFormat.IdByteArraySize < (source.length() % 2)) {
-            throw new URISyntaxException(source, "URN contains too many chars");
-        }
-
-        net.jxta.id.ID result = null;
-        IDBytes id = new IDBytes();
-
-        try {
-            // do the primary portion.
-            for (int eachByte = 0; eachByte < ((source.length() / 2) - IDFormat.flagsSize); eachByte++) {
-                int index = eachByte * 2;
-                String twoChars = source.substring(index, index + 2);
-
-                id.bytes[eachByte] = (byte) Integer.parseInt(twoChars, 16);
-            }
-
-            // do the flags
-            for (int eachByte = IDFormat.flagsOffset; eachByte < IDFormat.IdByteArraySize; eachByte++) {
-                int index = source.length() - (IDFormat.IdByteArraySize - eachByte) * 2;
-                String twoChars = source.substring(index, index + 2);
-
-                id.bytes[eachByte] = (byte) Integer.parseInt(twoChars, 16);
-            }
-        } catch (NumberFormatException caught) {
-            throw new URISyntaxException(source, "Invalid Character in JXTA URI");
-        }
-
-        switch (id.bytes[IDFormat.flagsOffset + IDFormat.flagsIdTypeOffset]) {
-        case IDFormat.flagCodatID:
-            result = new CodatID(id);
-            break;
-
-        case IDFormat.flagPeerGroupID:
-            result = new PeerGroupID(id);
-            result = (PeerGroupID) IDFormat.translateToWellKnown(result);
-            break;
-
-        case IDFormat.flagPeerID:
-            result = new PeerID(id);
-            break;
-
-        case IDFormat.flagPipeID:
-            result = new PipeID(id);
-            break;
-
-        case IDFormat.flagModuleClassID:
-            result = new ModuleClassID(id);
-            break;
-
-        case IDFormat.flagModuleSpecID:
-            result = new ModuleSpecID(id);
-            break;
-
-        default:
-            throw new URISyntaxException(source, "JXTA ID Type not recognized");
-        }
-        return result;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/ModuleClassID.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/ModuleClassID.java
deleted file mode 100644 (file)
index bd11b93..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.CBID;
-
-
-import net.jxta.impl.id.UUID.IDBytes;
-import net.jxta.impl.id.UUID.UUID;
-import net.jxta.impl.id.UUID.UUIDFactory;
-
-import java.util.logging.Logger;
-
-
-/**
- * An implementation of the {@link net.jxta.platform.ModuleClassID} ID Type.
- */
-public final class ModuleClassID extends net.jxta.impl.id.UUID.ModuleClassID {
-
-    /**
-     * Log4J categorgy
-     */
-    private static final transient Logger LOG = Logger.getLogger(ModuleClassID.class.getName());
-
-    /**
-     * Constructor.
-     * Intializes contents from provided ID.
-     *
-     * @param id the ID data
-     */
-    protected ModuleClassID(IDBytes id) {
-        super(id);
-    }
-
-    /**
-     * Constructor.
-     * Creates a ModuleClassID in a given class, with a given class unique id.
-     * A UUID of a class and another UUID are provided.
-     *
-     * @param classUUID the class to which this will belong.
-     * @param roleUUID  the unique id of this role in that class.
-     */
-    protected ModuleClassID(UUID classUUID, UUID roleUUID) {
-        super(classUUID, roleUUID);
-    }
-
-    /**
-     * See {@link net.jxta.id.IDFactory.Instantiator#newModuleClassID()}.
-     * <p/>
-     * A new class UUID is created. The role ID is left null. This is the
-     * only way to create a new class without supplying a new UUID explicitly.
-     * <p/>
-     * Note that a null role is just as valid as any other, it just has a
-     * shorter string representation. So it is not mandatory to create a new
-     * role in a new class.
-     */
-    public ModuleClassID() {
-        this(UUIDFactory.newUUID(), new UUID(0L, 0L));
-    }
-
-    /**
-     * See {@link net.jxta.id.IDFactory.Instantiator#newModuleClassID(net.jxta.platform.ModuleClassID)}.
-     * @param classID the ModuleClassID 
-     */
-    public ModuleClassID(ModuleClassID classID) {
-        this(classID.getClassUUID(), UUIDFactory.newUUID());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getIDFormat() {
-        return IDFormat.INSTANTIATOR.getSupportedIDFormat();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public net.jxta.platform.ModuleClassID getBaseClass() {
-        return new ModuleClassID(getClassUUID(), new UUID(0L, 0L));
-    }
-
-    /**
-     * get the class' unique id
-     *
-     * @return UUID module class' unique id
-     */
-    @Override
-    protected UUID getClassUUID() {
-        return super.getClassUUID();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/ModuleSpecID.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/ModuleSpecID.java
deleted file mode 100644 (file)
index 480d2dc..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.CBID;
-
-
-import net.jxta.impl.id.UUID.IDBytes;
-import net.jxta.impl.id.UUID.UUID;
-import net.jxta.impl.id.UUID.UUIDFactory;
-
-import java.util.logging.Logger;
-
-
-/**
- * An implementation of the {@link net.jxta.platform.ModuleSpecID} ID Type.
- */
-public final class ModuleSpecID extends net.jxta.impl.id.UUID.ModuleSpecID {
-
-    /**
-     * Log4J categorgy
-     */
-    private static final transient Logger LOG = Logger.getLogger(ModuleSpecID.class.getName());
-
-    /**
-     * Constructor. Used only internally.
-     */
-    protected ModuleSpecID() {
-        super();
-    }
-
-    /**
-     * Intializes contents from provided ID.
-     *
-     * @param id the ID data
-     */
-    protected ModuleSpecID(IDBytes id) {
-        super(id);
-    }
-
-    /**
-     * Creates a ModuleSpecID in a given class, with a given class unique id.
-     * A UUID of a class and another UUID are provided.
-     *
-     * @param classUUID the class to which this will belong.
-     * @param specUUID  the unique id of this spec in that class.
-     * @since JXTA  1.0
-     */
-    protected ModuleSpecID(UUID classUUID, UUID specUUID) {
-        super(classUUID, classUUID);
-    }
-
-    /**
-     * See {@link net.jxta.id.IDFactory.Instantiator#newModuleSpecID(net.jxta.platform.ModuleClassID)}.
-     * @param classID the ModuleClassID
-     */
-    public ModuleSpecID(ModuleClassID classID) {
-        this(classID.getClassUUID(), UUIDFactory.newUUID());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getIDFormat() {
-        return IDFormat.INSTANTIATOR.getSupportedIDFormat();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public net.jxta.platform.ModuleClassID getBaseClass() {
-        return new ModuleClassID(getClassUUID(), new UUID(0L, 0L));
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/PeerGroupID.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/PeerGroupID.java
deleted file mode 100644 (file)
index d655ee7..0000000
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.CBID;
-
-
-import net.jxta.impl.id.UUID.IDBytes;
-import net.jxta.impl.id.UUID.UUID;
-import net.jxta.impl.id.UUID.UUIDFactory;
-
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.security.ProviderException;
-import java.util.logging.Logger;
-
-
-/**
- * An implementation of the {@link net.jxta.peergroup.PeerGroupID} ID Type.
- */
-public class PeerGroupID extends net.jxta.impl.id.UUID.PeerGroupID {
-
-    /**
-     * Log4J categorgy
-     */
-    private static final transient Logger LOG = Logger.getLogger(PeerGroupID.class.getName());
-
-    /**
-     * Intializes contents from provided ID.
-     *
-     * @param id the ID data
-     */
-    protected PeerGroupID(IDBytes id) {
-        super(id);
-    }
-
-    /**
-     * Creates a PeerGroupID. A PeerGroupID is provided
-     *
-     * @param groupUUID the PeerGroupID to use to construct the new PeerGroupID
-     */
-    protected PeerGroupID(UUID groupUUID) {
-        super(groupUUID);
-    }
-
-    /**
-     * See {@link net.jxta.id.IDFactory.Instantiator#newPeerGroupID()}.
-     */
-    public PeerGroupID() {
-        this(UUIDFactory.newUUID());
-    }
-
-    /**
-     * See {@link net.jxta.id.IDFactory.Instantiator#newPeerGroupID(byte[])}.
-     * @param seed the seed
-     */
-    public PeerGroupID(byte[] seed) {
-        super();
-
-        MessageDigest digester = null;
-
-        try {
-            digester = MessageDigest.getInstance("SHA-1");
-        } catch (NoSuchAlgorithmException caught) {
-            digester = null;
-        }
-
-        if (digester == null) {
-            throw new ProviderException("SHA1 digest algorithm not found");
-        }
-
-        byte[] digest = digester.digest(seed);
-
-        // we keep only the 128 most significant bits
-        byte[] buf16 = new byte[16];
-
-        System.arraycopy(digest, 0, buf16, 0, 16);
-
-        UUID groupUUID = UUIDFactory.newUUID(buf16);
-
-        id.longIntoBytes(PeerGroupID.groupIdOffset, groupUUID.getMostSignificantBits());
-        id.longIntoBytes(PeerGroupID.groupIdOffset + 8, groupUUID.getLeastSignificantBits());
-    }
-
-    /**
-     * See {@link net.jxta.id.IDFactory.Instantiator#newPeerGroupID(net.jxta.peergroup.PeerGroupID,byte[])}.
-     *
-     * @param parent Parent PeerGroupID
-     * @param seed  the seed
-     */
-    public PeerGroupID(PeerGroupID parent, byte[] seed) {
-        this(seed);
-
-        UUID parentUUID = parent.getUUID();
-
-        id.longIntoBytes(PeerGroupID.parentgroupIdOffset, parentUUID.getMostSignificantBits());
-        id.longIntoBytes(PeerGroupID.parentgroupIdOffset + 8, parentUUID.getLeastSignificantBits());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getIDFormat() {
-        return IDFormat.INSTANTIATOR.getSupportedIDFormat();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public net.jxta.peergroup.PeerGroupID getParentPeerGroupID() {
-
-        UUID parentUUID = new UUID(id.bytesIntoLong(PeerGroupID.parentgroupIdOffset)
-                ,
-                id.bytesIntoLong(PeerGroupID.parentgroupIdOffset + 8));
-
-        // if zero, then there is no parent.
-        if ((0 == parentUUID.getMostSignificantBits()) && (0 == parentUUID.getLeastSignificantBits())) {
-            return null;
-        }
-
-        PeerGroupID groupID = new PeerGroupID(parentUUID);
-
-        // convert to the generic world PGID as necessary
-        return (net.jxta.peergroup.PeerGroupID) IDFormat.translateToWellKnown(groupID);
-    }
-
-    /**
-     * Returns the UUID associated with this PeerGroupID.
-     *
-     * @return The UUID associated with this PeerGroupID.
-     */
-    @Override
-    public UUID getUUID() {
-        return super.getUUID();
-    }
-
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/PeerID.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/PeerID.java
deleted file mode 100644 (file)
index 5fdeda5..0000000
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.CBID;
-
-
-import net.jxta.impl.id.UUID.IDBytes;
-import net.jxta.impl.id.UUID.UUID;
-import net.jxta.impl.id.UUID.UUIDFactory;
-
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.security.ProviderException;
-import java.util.logging.Logger;
-
-
-/**
- * An implementation of the {@link net.jxta.peer.PeerID} ID Type.
- */
-public class PeerID extends net.jxta.impl.id.UUID.PeerID {
-
-    /**
-     * Log4J Logger
-     */
-    private static final transient Logger LOG = Logger.getLogger(PeerID.class.getName());
-
-    /**
-     * Used only internally.
-     */
-    protected PeerID() {
-        super();
-    }
-
-    /**
-     * See {@link net.jxta.id.IDFactory.Instantiator#newPeerID(net.jxta.peergroup.PeerGroupID)}.
-     *
-     * @param groupID the PeerGroupID
-     */
-    public PeerID(PeerGroupID groupID) {
-        this(groupID.getUUID(), UUIDFactory.newUUID());
-    }
-
-    /**
-     * Intializes contents from provided ID.
-     *
-     * @param id the ID data
-     */
-    protected PeerID(IDBytes id) {
-        super(id);
-    }
-
-    /**
-     * See {@link net.jxta.id.IDFactory.Instantiator#newPeerID(net.jxta.peergroup.PeerGroupID,byte[])}.
-     *
-     * @param groupID the PeerGroupID
-     * @param seed the seed
-     */
-    public PeerID(PeerGroupID groupID, byte[] seed) {
-        this();
-
-        UUID groupUUID = groupID.getUUID();
-
-        id.longIntoBytes(PeerID.groupIdOffset, groupUUID.getMostSignificantBits());
-        id.longIntoBytes(PeerID.groupIdOffset + 8, groupUUID.getLeastSignificantBits());
-
-        MessageDigest digester = null;
-
-        try {
-            digester = MessageDigest.getInstance("SHA-1");
-        } catch (NoSuchAlgorithmException caught) {
-            digester = null;
-        }
-
-        if (digester == null) {
-            throw new ProviderException("SHA1 digest algorithm not found");
-        }
-
-        byte[] digest = digester.digest(seed);
-
-        // we keep only the 128 most significant bits
-        byte[] buf16 = new byte[16];
-
-        System.arraycopy(digest, 0, buf16, 0, 16);
-
-        UUID peerCBID = new UUID(buf16);
-
-        id.longIntoBytes(PeerID.idOffset, peerCBID.getMostSignificantBits());
-        id.longIntoBytes(PeerID.idOffset + 8, peerCBID.getLeastSignificantBits());
-    }
-
-    /**
-     * Creates a PeerID. A PeerGroupID is provided
-     *
-     * @param groupUUID the group to which this will belong.
-     * @param peerUUID  id of this peer
-     */
-    protected PeerID(UUID groupUUID, UUID peerUUID) {
-        super(groupUUID, peerUUID);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getIDFormat() {
-        return IDFormat.INSTANTIATOR.getSupportedIDFormat();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public net.jxta.id.ID getPeerGroupID() {
-        UUID groupCBID = new UUID(id.bytesIntoLong(PeerID.groupIdOffset), id.bytesIntoLong(PeerID.groupIdOffset + 8));
-
-        PeerGroupID groupID = new PeerGroupID(groupCBID);
-
-        // convert to the generic world PGID as necessary
-        return IDFormat.translateToWellKnown(groupID);
-    }
-
-    /**
-     * Returns the UUID associated with this PeerID.
-     *
-     * @return The UUID associated with this PeerID.
-     */
-    public UUID getUUID() {
-        return new UUID(id.bytesIntoLong(PeerID.idOffset), id.bytesIntoLong(PeerID.idOffset + 8));
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/PipeID.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/PipeID.java
deleted file mode 100644 (file)
index c61fca9..0000000
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.id.CBID;
-
-
-import net.jxta.impl.id.UUID.IDBytes;
-import net.jxta.impl.id.UUID.UUID;
-import net.jxta.impl.id.UUID.UUIDFactory;
-
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.security.ProviderException;
-import java.util.logging.Logger;
-
-
-/**
- * An implementation of the {@link net.jxta.pipe.PipeID} ID Type.
- */
-public class PipeID extends net.jxta.impl.id.UUID.PipeID {
-
-    /**
-     * Log4J categorgy
-     */
-    private static final transient Logger LOG = Logger.getLogger(PipeID.class.getName());
-
-    /**
-     * Used only internally
-     */
-    protected PipeID() {
-        super();
-    }
-
-    /**
-     * Constructor.
-     * Intializes contents from provided ID.
-     *
-     * @param id the ID data
-     */
-    protected PipeID(IDBytes id) {
-        super(id);
-    }
-
-    /**
-     * Creates a PipeID. A PeerGroupID is provided
-     *
-     * @param groupUUID the UUID of the group to which this will belong.
-     * @param idUUID    the UUID which will be used for this pipe.
-     */
-    protected PipeID(UUID groupUUID, UUID idUUID) {
-        super(groupUUID, idUUID);
-    }
-
-    /**
-     * See {@link net.jxta.id.IDFactory.Instantiator#newPipeID(net.jxta.peergroup.PeerGroupID)}.
-     * @param groupID the PeerGroupID
-     */
-    public PipeID(PeerGroupID groupID) {
-        this(groupID.getUUID(), UUIDFactory.newUUID());
-    }
-
-    /**
-     * See {@link net.jxta.id.IDFactory.Instantiator#newPipeID(net.jxta.peergroup.PeerGroupID,byte[])}.
-     * @param groupID the PeerGroupID
-     * @param seed the seed
-     */
-    public PipeID(PeerGroupID groupID, byte[] seed) {
-        this();
-
-        UUID groupCBID = groupID.getUUID();
-
-        id.longIntoBytes(PipeID.groupIdOffset, groupCBID.getMostSignificantBits());
-        id.longIntoBytes(PipeID.groupIdOffset + 8, groupCBID.getLeastSignificantBits());
-
-        MessageDigest digester = null;
-
-        try {
-            digester = MessageDigest.getInstance("SHA-1");
-        } catch (NoSuchAlgorithmException caught) {
-            digester = null;
-        }
-
-        if (digester == null) {
-            throw new ProviderException("SHA1 digest algorithm not found");
-        }
-
-        byte[] digest = digester.digest(seed);
-
-        // we keep only the 128 most significant bits
-        byte[] buf16 = new byte[16];
-
-        System.arraycopy(digest, 0, buf16, 0, 16);
-
-        UUID pipeCBID = UUIDFactory.newUUID(buf16);
-
-        id.longIntoBytes(PipeID.idOffset, pipeCBID.getMostSignificantBits());
-        id.longIntoBytes(PipeID.idOffset + 8, pipeCBID.getLeastSignificantBits());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getIDFormat() {
-        return IDFormat.INSTANTIATOR.getSupportedIDFormat();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public net.jxta.id.ID getPeerGroupID() {
-        UUID groupCBID = new UUID(id.bytesIntoLong(PipeID.groupIdOffset), id.bytesIntoLong(PipeID.groupIdOffset + 8));
-
-        PeerGroupID groupID = new PeerGroupID(groupCBID);
-
-        // convert to the generic world PGID as necessary
-        return IDFormat.translateToWellKnown(groupID);
-    }
-
-    /**
-     * Returns the UUID associated with this PipeID.
-     *
-     * @return The UUID associated with this PipeID.
-     */
-    public UUID getUUID() {
-        return new UUID(id.bytesIntoLong(PipeID.idOffset), id.bytesIntoLong(PipeID.idOffset + 8));
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/CBID/package.html
deleted file mode 100644 (file)
index ca7cc2c..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    The 'cbid' format is a general purpose JXTA ID Format. It implements all of
-    the six standard ID types. It was originally created for the Jave 2 SE
-    reference implementation. The 'cbid' format uses values generated from
-    secure hash functions as the mechanism for generating canonical values for
-    the ids it provides.
-
-    @see <a
-href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#-ids" target="_blank">JXTA Protocols Specification
-: IDs</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/CodatID.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/CodatID.java
deleted file mode 100644 (file)
index c51c8bf..0000000
+++ /dev/null
@@ -1,293 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.UUID;
-
-
-import java.io.InputStream;
-import java.security.MessageDigest;
-
-import java.io.IOException;
-import java.security.ProviderException;
-import java.security.NoSuchAlgorithmException;
-
-
-/**
- *  An implementation of the {@link net.jxta.codat.CodatID} ID Type.
- */
-public class CodatID extends net.jxta.codat.CodatID {
-       
-    /**
-     * size of a SHA1 hash. I would use MessageDigest.getDigestLength, but
-     * possible exceptions make it difficult to do.
-     */
-    protected final static int hashSize = 20;
-    
-    /**
-     *  Location of the group id in the byte array.
-     */
-    protected final static int groupIdOffset = 0;
-    
-    /**
-     *  Location of the randomly chosen portion of the id within the byte array.
-     */
-    protected final static int idOffset = CodatID.groupIdOffset + IDFormat.uuidSize;
-    
-    /**
-     *  Location of the hash value portion of the id within the byte array.
-     */
-    protected final static int codatHashOffset = CodatID.idOffset + IDFormat.uuidSize;
-    
-    /**
-     *  Location of the beginning of pad (unused space) within the byte array.
-     */
-    protected final static int padOffset = CodatID.codatHashOffset + CodatID.hashSize;
-    
-    /**
-     * Size of the pad.
-     */
-    protected final static int padSize = IDFormat.flagsOffset - CodatID.padOffset;
-    
-    /**
-     *  The id data
-     */
-    protected IDBytes id;
-    
-    /**
-     * Internal constructor
-     */
-    protected CodatID() {
-        super();
-        id = new IDBytes(IDFormat.flagCodatID);
-    }
-    
-    /**
-     * Initializes contents from provided bytes.
-     *
-     * @param id    the ID data
-     */
-    protected CodatID(IDBytes id) {
-        super();
-        this.id = id;
-    }
-    
-    protected CodatID(UUID groupUUID, UUID idUUID) {
-        this();
-        
-        id.longIntoBytes(CodatID.groupIdOffset, groupUUID.getMostSignificantBits());
-        id.longIntoBytes(CodatID.groupIdOffset + 8, groupUUID.getLeastSignificantBits());
-        
-        id.longIntoBytes(CodatID.idOffset, idUUID.getMostSignificantBits());
-        id.longIntoBytes(CodatID.idOffset + 8, idUUID.getLeastSignificantBits());
-    }
-    
-    /**
-     *  See {@link net.jxta.id.IDFactory.Instantiator#newCodatID(net.jxta.peergroup.PeerGroupID)}.
-     */
-    public CodatID(PeerGroupID groupID) {
-        this(groupID.getUUID(), UUIDFactory.newUUID());
-    }
-    
-    /**
-     *  See {@link net.jxta.id.IDFactory.Instantiator#newCodatID(net.jxta.peergroup.PeerGroupID,byte[])}.
-     */
-    public CodatID(PeerGroupID groupID, byte[] seed) {
-        this();
-        
-        UUID groupUUID = groupID.getUUID();
-        
-        id.longIntoBytes(CodatID.groupIdOffset, groupUUID.getMostSignificantBits());
-        id.longIntoBytes(CodatID.groupIdOffset + 8, groupUUID.getLeastSignificantBits());
-        
-        System.arraycopy(seed, 0, id.bytes, CodatID.idOffset, Math.min(IDFormat.uuidSize, seed.length));
-        
-        // make it a valid UUID
-        id.bytes[CodatID.idOffset + 6] &= 0x0f;
-        id.bytes[CodatID.idOffset + 6] |= 0x40; /* version 4 */
-        id.bytes[CodatID.idOffset + 8] &= 0x3f;
-        id.bytes[CodatID.idOffset + 8] |= 0x80; /* IETF variant */
-        id.bytes[CodatID.idOffset + 10] &= 0x3f;
-        id.bytes[CodatID.idOffset + 10] |= 0x80; /* multicast bit */
-    }
-    
-    /**
-     *  See {@link net.jxta.id.IDFactory.Instantiator#newCodatID(net.jxta.peergroup.PeerGroupID,InputStream)}.
-     */
-    public CodatID(PeerGroupID groupID, InputStream in) throws IOException {
-        this(groupID);
-        
-        setHash(in);
-    }
-    
-    /**
-     *  See {@link net.jxta.id.IDFactory.Instantiator#newCodatID(net.jxta.peergroup.PeerGroupID,InputStream)}.
-     */
-    public CodatID(PeerGroupID groupID, byte[] seed, InputStream in) throws IOException {
-        this(groupID, seed);
-        
-        setHash(in);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        }
-        
-        if (target instanceof CodatID) {
-            CodatID codatTarget = (CodatID) target;
-            
-            return id.equals(codatTarget.id);
-        } else {
-            return false;
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        return id.hashCode();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public String getIDFormat() {
-        return IDFormat.INSTANTIATOR.getSupportedIDFormat();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public Object getUniqueValue() {
-        return getIDFormat() + "-" + (String) id.getUniqueValue();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public net.jxta.id.ID getPeerGroupID() {
-        UUID groupUUID = new UUID(id.bytesIntoLong(CodatID.groupIdOffset), id.bytesIntoLong(CodatID.groupIdOffset + 8));
-        
-        PeerGroupID groupID = new PeerGroupID(groupUUID);
-        
-        // convert to the generic world PGID as necessary
-        return IDFormat.translateToWellKnown(groupID);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public boolean isStatic() {
-        for (int eachHashByte = CodatID.codatHashOffset; eachHashByte < (CodatID.padOffset); eachHashByte++) {
-            if (0 != id.bytes[eachHashByte]) {
-                return true;
-            }
-        }
-        
-        return false;
-    }
-    
-    /**
-     *  Calculates the SHA-1 hash of a stream.
-     *
-     *  @param in The InputStream.
-     */
-    protected void setHash(InputStream in) throws IOException {
-        MessageDigest dig = null;
-
-        try {
-            dig = MessageDigest.getInstance("SHA-1");
-        } catch (NoSuchAlgorithmException caught) {
-            dig = null;
-        }
-        
-        if (dig == null) {
-            throw new ProviderException("SHA-1 digest algorithm not found");
-        }
-        
-        dig.reset();
-        
-        byte[] chunk = new byte[1024];
-        
-        try {
-            do {
-                int read = in.read(chunk);
-
-                if (read == -1) {
-                    break;
-                }
-                
-                dig.update(chunk, 0, read);
-            } while (true);
-        } finally {
-            in.close();
-        }
-        
-        byte[] result = dig.digest();
-
-        System.arraycopy(result, 0, id.bytes, CodatID.codatHashOffset, CodatID.hashSize);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/IDBytes.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/IDBytes.java
deleted file mode 100644 (file)
index 0a9a647..0000000
+++ /dev/null
@@ -1,249 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.UUID;
-
-
-import java.io.Serializable;
-import java.util.Arrays;
-import java.util.zip.Checksum;
-import java.util.zip.CRC32;
-
-
-/**
- * Maintains the internal representation of a 'uuid' JXTA ID.
- *
- * @see net.jxta.id.IDFactory
- * @see net.jxta.impl.id.UUID.IDFormat
- * @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#refimpls-ids-jiuft" target="_blank">JXTA Protocols Specification : UUID ID Format</a>
- */
-public final class IDBytes implements Serializable {
-    
-    /**
-     *  The bytes.
-     */
-    public final byte[] bytes;
-    
-    /**
-     *  The cached hash value for this object
-     */
-    protected transient int cachedHash = 0;
-    
-    /**
-     *  Constructs a new byte representation. This constructor initializes only
-     *  the flag fields of the ID.
-     *
-     */
-    public IDBytes() {
-        this.bytes = new byte[ IDFormat.IdByteArraySize ];
-    }
-    
-    /**
-     *  Constructs a new byte representation. This constructor initializes only
-     *  the flag fields of the ID.
-     */
-    public IDBytes(byte type) {
-        this();
-        this.bytes[IDFormat.flagsOffset + IDFormat.flagsIdTypeOffset] = type;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        }
-        
-        if (target instanceof IDBytes) {
-            IDBytes asIDBytes = (IDBytes) target;
-
-            return Arrays.equals(bytes, asIDBytes.bytes);
-        } else {
-            return false;
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        int result = cachedHash;
-        
-        if (0 == result) {
-            // There is a very small chance that this
-            Checksum crc = new CRC32();
-
-            crc.update(bytes, 0, bytes.length);
-
-            cachedHash = (int) crc.getValue();           
-            cachedHash = (0 == cachedHash) ? 1 : cachedHash;
-            
-            result = cachedHash;
-        }
-        
-        return result;
-    }
-    
-    /**
-     * Returns a string representation of the ID bytes. The bytes are encoded
-     * in hex ASCII format with two characters per byte. The pad bytes between
-     * the primary id portion and the flags field are omitted.
-     *
-     * @return String containing the unique value of this ID.
-     */
-    @Override
-    public String toString() {
-        return getUniqueValue().toString();
-    }
-    
-    /**
-     *  Private replacement for toHexString since we need the leading 0 digits.
-     *  Returns a char array containing byte value encoded as 2 hex chars.
-     *
-     *  @param  theByte a byte containing the value to be encoded.
-     *  @return        char[] containing byte value encoded as 2 hex characters.
-     */
-    private static char[] toHexDigits(byte theByte) {
-        final char[] HEXDIGITS = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
-        char result[] = new char[2];
-                
-        result[0] = HEXDIGITS[(theByte >>> 4) & 15];
-        result[1] = HEXDIGITS[theByte & 15];
-                
-        return result;
-    }
-    
-    /**
-     *  Return an object containing the unique value of the ID. This object must
-     *  provide implementations of toString() and hashCode() that are canonical
-     *  and consistent from run-to-run given the same input values. Beyond
-     *  this nothing should be assumed about the nature of this object. For some
-     *  implementations the object returned may be the same as provided.
-     *
-     *  @return        Object which can provide canonical representations of the ID.
-     */
-    public Object getUniqueValue() {
-        StringBuilder encoded = new StringBuilder(144);
-        int lastIndex;
-
-        // find the last non-zero index.
-        for (lastIndex = IDFormat.flagsOffset - 1; lastIndex > 0; lastIndex--) {
-            if (0 != bytes[lastIndex]) {
-                break;
-            }
-        }
-        
-        // build the string.
-        for (int eachByte = 0; eachByte <= lastIndex; eachByte++) {
-            char[] asHex = toHexDigits(bytes[eachByte]);
-
-            encoded.append(asHex);
-        }
-        
-        // append the flags field        
-        for (int eachFlagByte = IDFormat.flagsOffset; eachFlagByte < IDFormat.IdByteArraySize; eachFlagByte++) {
-            char asHex[] = toHexDigits(bytes[eachFlagByte]);
-            
-            encoded.append(asHex);
-        }
-
-        return encoded.toString();
-    }
-    
-    /**
-     *  Insert a long value into the byte array. The long is stored in
-     *  big-endian order into the byte array beginning at the specified index.
-     *
-     *  @param offset location within the byte array to insert.
-     *  @param value value to be inserted.
-     */
-    public void longIntoBytes(int offset, long value) {
-        if ((offset < 0) || ((offset + 8) > IDFormat.IdByteArraySize)) {
-            throw new IndexOutOfBoundsException("Bad offset");
-        }
-        
-        for (int eachByte = 0; eachByte < 8; eachByte++) {
-            bytes[eachByte + offset] = (byte) (value >> ((7 - eachByte) * 8L));
-        }
-        
-        cachedHash = 0;
-    }
-    
-    /**
-     *  Return the long value of a portion of the byte array. The long is
-     *  retrieved in big-endian order from the byte array at the specified
-     *  offset.
-     *
-     *  @param offset location within the byte array to extract.
-     *  @return long value extracted from the byte array.
-     */
-    public long bytesIntoLong(int offset) {
-        if ((offset < 0) || ((offset + 8) > IDFormat.IdByteArraySize)) {
-            throw new IndexOutOfBoundsException("Bad offset");
-        }
-        
-        long result = 0L;
-        
-        for (int eachByte = 0; eachByte < 8; eachByte++) {
-            result |= ((long) (bytes[eachByte + offset] & 0xff)) << ((7 - eachByte) * 8L);
-        }
-        
-        return result;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/IDFormat.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/IDFormat.java
deleted file mode 100644 (file)
index ad3b421..0000000
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.UUID;
-
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-
-
-/**
- *  A general purpose JXTA ID Format implementing all of the six standard ID
- *  Types. It was originally created for the Java 2 SE reference implementation.
- *  The 'uuid' format uses (IETF version 4) randomly generated UUIDs as the  
- *  mechanism for generating canonical values for the ids it provides.
- *
- *  <p/>For IDs constructed using "seed" variant constructors, the first 16
- *  bytes of the seed are used literally as the UUID value. The value is masked
- *  to make it a valid version 4 IETF variant UUID.
- *
- *  @see net.jxta.id.ID
- *  @see <a href="http://spec.jxta.org/nonav/v1.0/docbook/JXTAProtocols.html#ids" target="_blank">JXTA Protocols Specification : IDs</a>
- *  @see <a href="http://spec.jxta.org/nonav/v1.0/docbook/JXTAProtocols.html#refimpls-ids-jiuft" target="_blank">JXTA Protocols Specification : UUID ID Format</a>
- */
-public class IDFormat {
-    
-    /**
-     *  Log4J Logger
-     */
-    private static final transient Logger LOG = Logger.getLogger(IDFormat.class.getName());
-    
-    /**
-     *  number of bytes in the byte array
-     */
-    public final static int IdByteArraySize = 64;
-    
-    /**
-     *  The size of a UUID in bytes
-     */
-    public final static int uuidSize = 16;
-    
-    /**
-     *  The size of the flags field
-     */
-    public final static int flagsSize = 1;
-    
-    /**
-     *  Location of the type field within the flags field
-     */
-    public final static int flagsIdTypeOffset = IDFormat.flagsSize - 1;
-    
-    /**
-     *  Type value for Codat
-     */
-    public final static byte flagCodatID = 0x01;
-    
-    /**
-     *  Type value for PeerGroup
-     */
-    public final static byte flagPeerGroupID = 0x02;
-    
-    /**
-     *  Type value for Peer
-     */
-    public final static byte flagPeerID = 0x03;
-    
-    /**
-     *  Type value for Pipe
-     */
-    public final static byte flagPipeID = 0x04;
-    
-    /**
-     *  Type value for ModuleClass
-     */
-    public final static byte flagModuleClassID = 0x05;
-    
-    /**
-     *  Type value for ModuleSpec
-     */
-    public final static byte flagModuleSpecID = 0x06;
-    
-    /**
-     *  Type value for CodatID
-     */
-    public final static byte flagCodatID7 = 0x07;
-    
-    /**
-     *  Location of ID flags within byte array.
-     */
-    public final static int flagsOffset = IDFormat.IdByteArraySize - IDFormat.flagsSize;
-    
-    /**
-     *  Our local version of the world Peer Group ID. We need this for cases
-     *  where we have to make ids which are in the world peer group. We only
-     *  use this ID for those cases and never return this ID.
-     */
-    public static final PeerGroupID worldPeerGroupID = new PeerGroupID(new UUID(0x5961626164616261L, 0x4A78746150325033L)); // YabadabaJXTAP2P!
-    
-    /**
-     *  Our local version of the net Peer Group ID. We need this for cases
-     *  where we have to make ids which are in the net peer group. We only
-     *  use this ID for those cases and never return this ID.
-     */
-    public static final PeerGroupID defaultNetPeerGroupID = new PeerGroupID(new UUID(0x5961626164616261L, 0x4E50472050325033L)); // YabadabaNPG P2P!
-    
-    /**
-     *  This table maps our local private versions of the well known ids to the
-     *  globally known version.
-     */
-    private final static Object[][] wellKnownIDs = {
-        { net.jxta.peergroup.PeerGroupID.worldPeerGroupID, worldPeerGroupID }
-                ,
-        { net.jxta.peergroup.PeerGroupID.defaultNetPeerGroupID, defaultNetPeerGroupID }
-    };
-    
-    /**
-     * The instantiator for this ID Format which is used by the IDFactory.
-     */
-    public static final IDFactory.Instantiator INSTANTIATOR = new Instantiator();
-    
-    /**
-     *  This class cannot be instantiated.
-     */
-    protected IDFormat() {}
-    
-    /**
-     *  Translate from well known ID to our locally encoded versions.
-     *
-     *  @param input    the id to be translated.
-     *  @return the translated ID or the input ID if no translation was needed.
-     */
-    static ID translateFromWellKnown(ID input) {
-        for (int eachWellKnown = 0; eachWellKnown < wellKnownIDs.length; eachWellKnown++) {
-            ID aWellKnown = (ID) wellKnownIDs[eachWellKnown][0];
-            
-            if (aWellKnown.equals(input)) {
-                return (ID) wellKnownIDs[eachWellKnown][1];
-            }
-        }
-        
-        return input;
-    }
-    
-    /**
-     *  Translate from locally encoded versions to the well known versions.
-     *
-     *  @param input    the id to be translated.
-     *  @return the translated ID or the input ID if no translation was needed.
-     */
-    static ID translateToWellKnown(ID input) {
-        for (int eachWellKnown = 0; eachWellKnown < wellKnownIDs.length; eachWellKnown++) {
-            ID aLocalEncoding = (ID) wellKnownIDs[eachWellKnown][1];
-            
-            if (aLocalEncoding.equals(input)) {
-                return (ID) wellKnownIDs[eachWellKnown][0];
-            }
-        }
-        
-        return input;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/Instantiator.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/Instantiator.java
deleted file mode 100644 (file)
index 57d2bdf..0000000
+++ /dev/null
@@ -1,451 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.UUID;
-
-
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URL;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.UnknownServiceException;
-import java.net.URISyntaxException;
-
-import net.jxta.id.IDFactory;
-
-
-/**
- *  The instantiator for the UUID ID Format.
- *
- *  <p/>For "seed" variant constructors, the first 16 bytes of the seed are used
- *  literally as the UUID value. The value is masked to make it a valid version 4
- *  IETF varient UUID.
- */
-public class Instantiator implements IDFactory.URIInstantiator {
-    
-    /**
-     *  Our ID Format
-     */
-    final static String UUIDEncoded = "uuid";
-    
-    /**
-     * {@inheritDoc}
-     */
-    public String getSupportedIDFormat() {
-        return UUIDEncoded;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.id.ID fromURL(URL source) throws MalformedURLException, UnknownServiceException {
-        
-        // check the protocol
-        if (!net.jxta.id.ID.URIEncodingName.equalsIgnoreCase(source.getProtocol())) {
-            throw new UnknownServiceException("URI protocol type was not as expected.");
-        }
-        
-        String  encoded = source.getFile();
-        
-        int colonAt = encoded.indexOf(':');
-        
-        // There's a colon right?
-        if (-1 == colonAt) {
-            throw new UnknownServiceException("URN namespace was missing.");
-        }
-        
-        // check the namespace
-        if (!net.jxta.id.ID.URNNamespace.equalsIgnoreCase(encoded.substring(0, colonAt))) {
-            throw new UnknownServiceException("URN namespace was not as expected.");
-        }
-        
-        // skip the namespace portion and the colon
-        encoded = encoded.substring(colonAt + 1);
-        
-        int dashAt = encoded.indexOf('-');
-        
-        // there's a dash, right?
-        if (-1 == dashAt) {
-            throw new UnknownServiceException("URN Encodingtype was missing.");
-        }
-        
-        if (!encoded.substring(0, dashAt).equals(getSupportedIDFormat())) {
-            throw new UnknownServiceException("JXTA ID Format was not as expected.");
-        }
-        
-        // skip the dash
-        encoded = encoded.substring(dashAt + 1);
-        
-        // check that the length is even
-        if (0 != (encoded.length() % 2)) {
-            throw new MalformedURLException("URN contains an odd number of chars");
-        }
-        
-        // check that the length is long enough
-        if (encoded.length() < 2) {
-            throw new MalformedURLException("URN does not contain enough chars");
-        }
-        
-        // check that id is short enough
-        if (IDFormat.IdByteArraySize < (encoded.length() % 2)) {
-            throw new MalformedURLException("URN contains too many chars");
-        }
-        
-        net.jxta.id.ID result = null;
-        IDBytes id = new IDBytes();
-        
-        try {
-            // do the primary portion.
-            for (int eachByte = 0; eachByte < ((encoded.length() / 2) - IDFormat.flagsSize); eachByte++) {
-                int index = eachByte * 2;
-                String twoChars = encoded.substring(index, index + 2);
-
-                id.bytes[eachByte] = (byte) Integer.parseInt(twoChars, 16);
-            }
-            
-            // do the flags
-            for (int eachByte = IDFormat.flagsOffset; eachByte < IDFormat.IdByteArraySize; eachByte++) {
-                int index = encoded.length() - (IDFormat.IdByteArraySize - eachByte) * 2;
-                String twoChars = encoded.substring(index, index + 2);
-
-                id.bytes[eachByte] = (byte) Integer.parseInt(twoChars, 16);
-            }
-        } catch (NumberFormatException caught) {
-            throw new MalformedURLException("Invalid Character in JXTA URI");
-        }
-        
-        switch (id.bytes[IDFormat.flagsOffset + IDFormat.flagsIdTypeOffset]) {
-        case IDFormat.flagCodatID:
-            result = new CodatID(id);
-            break;
-
-        case IDFormat.flagPeerGroupID:
-            result = new PeerGroupID(id);
-            result = (PeerGroupID) IDFormat.translateToWellKnown(result);
-            break;
-
-        case IDFormat.flagPeerID:
-            result = new PeerID(id);
-            break;
-
-        case IDFormat.flagPipeID:
-            result = new PipeID(id);
-            break;
-
-        case IDFormat.flagModuleClassID:
-            result = new ModuleClassID(id);
-            break;
-
-        case IDFormat.flagModuleSpecID:
-            result = new ModuleSpecID(id);
-            break;
-
-        default:
-            throw new MalformedURLException("JXTA ID Type not recognized");
-        }
-        
-        return result;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.codat.CodatID newCodatID(net.jxta.peergroup.PeerGroupID groupID) {
-        PeerGroupID  peerGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(groupID);
-        
-        return new CodatID(peerGroupID);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.codat.CodatID newCodatID(net.jxta.peergroup.PeerGroupID groupID, byte[] seed) {
-        PeerGroupID  peerGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(groupID);
-        
-        return new CodatID(peerGroupID, seed);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.codat.CodatID newCodatID(net.jxta.peergroup.PeerGroupID groupID, InputStream in) throws IOException {
-        PeerGroupID  peerGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(groupID);
-        
-        return new CodatID(peerGroupID, in);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.codat.CodatID newCodatID(net.jxta.peergroup.PeerGroupID groupID, byte[] seed, InputStream in) throws IOException {
-        PeerGroupID  peerGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(groupID);
-        
-        return new CodatID(peerGroupID, seed, in);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.peergroup.PeerGroupID newPeerGroupID() {
-        return new PeerGroupID();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.peergroup.PeerGroupID newPeerGroupID(byte[] seed) {
-        return new PeerGroupID(seed);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.peergroup.PeerGroupID newPeerGroupID(net.jxta.peergroup.PeerGroupID parent) {
-        PeerGroupID  parentGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(parent);
-        
-        return new PeerGroupID(parentGroupID);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.peergroup.PeerGroupID newPeerGroupID(net.jxta.peergroup.PeerGroupID parent, byte[] seed) {
-        PeerGroupID  parentGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(parent);
-        
-        return new PeerGroupID(parentGroupID, seed);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.peer.PeerID newPeerID(net.jxta.peergroup.PeerGroupID groupID) {
-        PeerGroupID  peerGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(groupID);
-        
-        return new PeerID(peerGroupID);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.peer.PeerID newPeerID(net.jxta.peergroup.PeerGroupID groupID, byte[] seed) {
-        PeerGroupID  peerGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(groupID);
-        
-        return new PeerID(peerGroupID, seed);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.pipe.PipeID newPipeID(net.jxta.peergroup.PeerGroupID groupID) {
-        PeerGroupID  peerGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(groupID);
-        
-        return new PipeID(peerGroupID);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.pipe.PipeID newPipeID(net.jxta.peergroup.PeerGroupID groupID, byte[] seed) {
-        PeerGroupID  peerGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(groupID);
-        
-        return new PipeID(peerGroupID, seed);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.platform.ModuleClassID newModuleClassID() {
-        return new ModuleClassID();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.platform.ModuleClassID newModuleClassID(net.jxta.platform.ModuleClassID classID) {
-        return new ModuleClassID((ModuleClassID) classID);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.platform.ModuleSpecID newModuleSpecID(net.jxta.platform.ModuleClassID classID) {
-        return new ModuleSpecID((ModuleClassID) classID);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.id.ID fromURI(URI source) throws URISyntaxException {
-        
-        // check the protocol
-        if (!net.jxta.id.ID.URIEncodingName.equalsIgnoreCase(source.getScheme())) {
-            throw new URISyntaxException(source.toString(), "URI scheme was not as expected.");
-        }
-        
-        String decoded = source.getSchemeSpecificPart();
-        
-        int colonAt = decoded.indexOf(':');
-        
-        // There's a colon right?
-        if (-1 == colonAt) {
-            throw new URISyntaxException(source.toString(), "URN namespace was missing.");
-        }
-        
-        // check the namespace
-        if (!net.jxta.id.ID.URNNamespace.equalsIgnoreCase(decoded.substring(0, colonAt))) {
-            throw new URISyntaxException(source.toString()
-                    ,
-                    "URN namespace was not as expected. (" + net.jxta.id.ID.URNNamespace + "!=" + decoded.substring(0, colonAt)
-                    + ")");
-        }
-        
-        // skip the namespace portion and the colon
-        decoded = decoded.substring(colonAt + 1);
-        
-        return fromURNNamespaceSpecificPart(decoded);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.id.ID fromURNNamespaceSpecificPart(String source) throws URISyntaxException {
-        int dashAt = source.indexOf('-');
-        
-        // there's a dash, right?
-        if (-1 == dashAt) {
-            throw new URISyntaxException(source, "URN Encodingtype was missing.");
-        }
-        
-        if (!source.substring(0, dashAt).equals(getSupportedIDFormat())) {
-            throw new URISyntaxException(source, "JXTA ID Format was not as expected.");
-        }
-        
-        // skip the dash
-        source = source.substring(dashAt + 1);
-        
-        // check that the length is even
-        if (0 != (source.length() % 2)) {
-            throw new URISyntaxException(source, "URN contains an odd number of chars");
-        }
-        
-        // check that the length is long enough
-        if (source.length() < 2) {
-            throw new URISyntaxException(source, "URN does not contain enough chars");
-        }
-        
-        // check that id is short enough
-        if (IDFormat.IdByteArraySize < (source.length() / 2)) {
-            throw new URISyntaxException(source, "URN contains too many chars");
-        }
-        
-        net.jxta.id.ID result = null;
-        IDBytes id = new IDBytes();
-        
-        try {
-            // do the primary portion.
-            for (int eachByte = 0; eachByte < ((source.length() / 2) - IDFormat.flagsSize); eachByte++) {
-                int index = eachByte * 2;
-                String twoChars = source.substring(index, index + 2);
-
-                id.bytes[eachByte] = (byte) Integer.parseInt(twoChars, 16);
-            }
-            
-            // do the flags
-            for (int eachByte = IDFormat.flagsOffset; eachByte < IDFormat.IdByteArraySize; eachByte++) {
-                int index = source.length() - (IDFormat.IdByteArraySize - eachByte) * 2;
-                String twoChars = source.substring(index, index + 2);
-
-                id.bytes[eachByte] = (byte) Integer.parseInt(twoChars, 16);
-            }
-        } catch (NumberFormatException caught) {
-            throw new URISyntaxException(source, "Invalid Character in JXTA URI");
-        }
-        
-        switch (id.bytes[IDFormat.flagsOffset + IDFormat.flagsIdTypeOffset]) {
-        case IDFormat.flagCodatID:
-            result = new CodatID(id);
-            break;
-
-        case IDFormat.flagPeerGroupID:
-            result = new PeerGroupID(id);
-            result = IDFormat.translateToWellKnown(result);
-            break;
-
-        case IDFormat.flagPeerID:
-            result = new PeerID(id);
-            break;
-
-        case IDFormat.flagPipeID:
-            result = new PipeID(id);
-            break;
-
-        case IDFormat.flagModuleClassID:
-            result = new ModuleClassID(id);
-            break;
-
-        case IDFormat.flagModuleSpecID:
-            result = new ModuleSpecID(id);
-            break;
-
-        default:
-            throw new URISyntaxException(source, "JXTA ID Type not recognized");
-        }
-        
-        return result;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/ModuleClassID.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/ModuleClassID.java
deleted file mode 100644 (file)
index 2f56ff6..0000000
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.UUID;
-
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-
-/**
- *  An implementation of the {@link net.jxta.platform.ModuleClassID} ID Type.
- */
-public class ModuleClassID extends net.jxta.platform.ModuleClassID {
-    
-    /**
-     *  Location of the class id
-     */
-    private final static int moduleClassIdOffset = 0;
-    
-    /**
-     *  Location of the role id
-     */
-    private final static int moduleRoleIdOffset = moduleClassIdOffset + IDFormat.uuidSize;
-    
-    /**
-     *  location of the start of the pad space
-     */
-    private final static int padOffset = ModuleClassID.moduleRoleIdOffset + IDFormat.uuidSize;
-    
-    /**
-     *  size of the unused space
-     */
-    private final static int padSize = IDFormat.flagsOffset - ModuleClassID.padOffset;
-    
-    /**
-     *  The id data
-     */
-    protected IDBytes id;
-    
-    /**
-     * Constructor.
-     * Initializes contents from provided ID.
-     *
-     * @param id    the ID data
-     */
-    protected ModuleClassID(IDBytes id) {
-        super();
-        this.id = id;
-    }
-    
-    /**
-     * Constructor.
-     * Creates a ModuleClassID in a given class, with a given class unique id.
-     * A UUID of a class and another UUID are provided.
-     *
-     * @param classUUID    the class to which this will belong.
-     * @param roleUUID     the unique id of this role in that class.
-     */
-    protected ModuleClassID(UUID classUUID, UUID roleUUID) {
-        super();
-        id = new IDBytes(IDFormat.flagModuleClassID);
-        
-        id.longIntoBytes(ModuleClassID.moduleClassIdOffset, classUUID.getMostSignificantBits());
-        id.longIntoBytes(ModuleClassID.moduleClassIdOffset + 8, classUUID.getLeastSignificantBits());
-        
-        id.longIntoBytes(ModuleClassID.moduleRoleIdOffset, roleUUID.getMostSignificantBits());
-        id.longIntoBytes(ModuleClassID.moduleRoleIdOffset + 8, roleUUID.getLeastSignificantBits());
-    }
-    
-    /**
-     *  See {@link net.jxta.id.IDFactory.Instantiator#newModuleClassID()}.
-     *
-     *  <p/>A new class UUID is created. The role ID is left null. This is the
-     *  only way to create a new class without supplying a new UUID explicitly.
-     *
-     *  <p/>Note that a null role is just as valid as any other, it just has a
-     *  shorter string representation. So it is not mandatory to create a new
-     *  role in a new class.
-     */
-    public ModuleClassID() {
-        this(UUIDFactory.newUUID(), new UUID(0L, 0L));
-    }
-    
-    /**
-     *  See {@link net.jxta.id.IDFactory.Instantiator#newModuleClassID(net.jxta.platform.ModuleClassID)}.
-     */
-    public ModuleClassID(ModuleClassID classID) {
-        this(classID.getClassUUID(), UUIDFactory.newUUID());
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        }
-        
-        if (target instanceof ModuleClassID) {
-            ModuleClassID mcidTarget = (ModuleClassID) target;
-            
-            return id.equals(mcidTarget.id);
-        } else {
-            return false;
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        return id.hashCode();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public String getIDFormat() {
-        return IDFormat.INSTANTIATOR.getSupportedIDFormat();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public Object getUniqueValue() {
-        return getIDFormat() + "-" + (String) id.getUniqueValue();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public net.jxta.platform.ModuleClassID getBaseClass() {
-        return new ModuleClassID(getClassUUID(), new UUID(0L, 0L));
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public boolean isOfSameBaseClass(net.jxta.platform.ModuleClassID classId) {
-        return getClassUUID().equals(((ModuleClassID) classId).getClassUUID());
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public boolean isOfSameBaseClass(net.jxta.platform.ModuleSpecID specId) {
-        return getClassUUID().equals(((ModuleSpecID) specId).getClassUUID());
-    }
-    
-    /**
-     * get the class' unique id
-     *
-     * @return UUID module class' unique id
-     */
-    protected UUID getClassUUID() {
-        UUID result = new UUID(id.bytesIntoLong(ModuleClassID.moduleClassIdOffset)
-                ,
-                id.bytesIntoLong(ModuleClassID.moduleClassIdOffset + 8));
-        
-        return result;
-    }
-    
-    /**
-     * get the role unique id
-     *
-     * @return UUID module role unique id
-     */
-    protected UUID getRoleUUID() {
-        UUID result = new UUID(id.bytesIntoLong(ModuleClassID.moduleRoleIdOffset)
-                ,
-                id.bytesIntoLong(ModuleClassID.moduleRoleIdOffset + 8));
-        
-        return result;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/ModuleSpecID.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/ModuleSpecID.java
deleted file mode 100644 (file)
index eed81a1..0000000
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.UUID;
-
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-
-/**
- *  An implementation of the {@link net.jxta.platform.ModuleSpecID} ID Type.
- */
-public class ModuleSpecID extends net.jxta.platform.ModuleSpecID {
-    private final static int moduleClassIdOffset = 0;
-    private final static int moduleSpecIdOffset = IDFormat.uuidSize;
-    private final static int padOffset = ModuleSpecID.moduleSpecIdOffset + IDFormat.uuidSize;
-    private final static int padSize = IDFormat.flagsOffset - ModuleSpecID.padOffset;
-    
-    /**
-     *  The id data
-     */
-    protected IDBytes id;
-    
-    /**
-     *  Constructor. Used only internally.
-     */
-    protected ModuleSpecID() {
-        super();
-        id = new IDBytes(IDFormat.flagModuleSpecID);
-    }
-    
-    /**
-     * Initializes contents from provided ID.
-     *
-     * @param id    the ID data
-     */
-    protected ModuleSpecID(IDBytes id) {
-        super();
-        this.id = id;
-    }
-    
-    /**
-     * Creates a ModuleSpecID in a given class, with a given class unique id.
-     * A UUID of a class and another UUID are provided.
-     *
-     * @param classUUID    the class to which this will belong.
-     * @param specUUID     the unique id of this spec in that class.
-     */
-    protected ModuleSpecID(UUID classUUID, UUID specUUID) {
-        
-        this();
-        id.longIntoBytes(ModuleSpecID.moduleClassIdOffset, classUUID.getMostSignificantBits());
-        id.longIntoBytes(ModuleSpecID.moduleClassIdOffset + 8, classUUID.getLeastSignificantBits());
-        
-        id.longIntoBytes(ModuleSpecID.moduleSpecIdOffset, specUUID.getMostSignificantBits());
-        id.longIntoBytes(ModuleSpecID.moduleSpecIdOffset + 8, specUUID.getLeastSignificantBits());
-    }
-    
-    /**
-     *  See {@link net.jxta.id.IDFactory.Instantiator#newModuleSpecID(net.jxta.platform.ModuleClassID)}.
-     */
-    public ModuleSpecID(ModuleClassID classID) {
-        this(classID.getClassUUID(), UUIDFactory.newUUID());
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        }
-        
-        if (target instanceof ModuleSpecID) {
-            ModuleSpecID msidTarget = (ModuleSpecID) target;
-            
-            return id.equals(msidTarget.id);
-        } else {
-            return false;
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        return id.hashCode();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public String getIDFormat() {
-        return IDFormat.INSTANTIATOR.getSupportedIDFormat();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public Object getUniqueValue() {
-        return getIDFormat() + "-" + (String) id.getUniqueValue();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public net.jxta.platform.ModuleClassID getBaseClass() {
-        return new ModuleClassID(getClassUUID(), new UUID(0L, 0L));
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public boolean isOfSameBaseClass(net.jxta.platform.ModuleClassID classId) {
-        return getClassUUID().equals(((ModuleClassID) classId).getClassUUID());
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public boolean isOfSameBaseClass(net.jxta.platform.ModuleSpecID specId) {
-        return getClassUUID().equals(((ModuleSpecID) specId).getClassUUID());
-    }
-    
-    /**
-     * get the class' unique id
-     *
-     * @since JXTA 1.0
-     *
-     * @return UUID module class' unique id
-     */
-    protected UUID getClassUUID() {
-        UUID result = new UUID(id.bytesIntoLong(ModuleSpecID.moduleClassIdOffset)
-                ,
-                id.bytesIntoLong(ModuleSpecID.moduleClassIdOffset + 8));
-        
-        return result;
-    }
-    
-    /**
-     * get the spec unique id
-     *
-     * @since JXTA 1.0
-     *
-     * @return UUID module spec unique id
-     */
-    protected UUID getSpecUUID() {
-        UUID result = new UUID(id.bytesIntoLong(ModuleSpecID.moduleSpecIdOffset)
-                ,
-                id.bytesIntoLong(ModuleSpecID.moduleSpecIdOffset + 8));
-        
-        return result;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/PeerGroupID.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/PeerGroupID.java
deleted file mode 100644 (file)
index 616345c..0000000
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.UUID;
-
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-
-/**
- *  An implementation of the {@link net.jxta.peergroup.PeerGroupID} ID Type.
- */
-public class PeerGroupID extends net.jxta.peergroup.PeerGroupID {
-
-    /**
-     *  Location of the group id UUID within the id bytes.
-     */
-    protected final static int groupIdOffset = 0;
-    
-    /**
-     *  Location of the parent group id UUID within the id bytes.
-     */
-    protected final static int parentgroupIdOffset = PeerGroupID.groupIdOffset + IDFormat.uuidSize;
-    
-    /**
-     *  Location of the begining of the pad space.
-     */
-    protected final static int padOffset = PeerGroupID.parentgroupIdOffset + IDFormat.uuidSize;
-    
-    /**
-     *  size of the pad space.
-     */
-    protected final static int padSize = IDFormat.flagsOffset - PeerGroupID.padOffset;
-    
-    /**
-     *  The id data
-     */
-    protected IDBytes id;
-    
-    /**
-     * Initializes contents from provided ID.
-     *
-     * @param id    the ID data
-     */
-    protected PeerGroupID(IDBytes id) {
-        super();
-        this.id = id;
-    }
-    
-    /**
-     * Creates a PeerGroupID. A PeerGroupID is provided
-     *
-     * @param groupUUID    the PeerGroupID to use to construct the new PeerGroupID
-     */
-    protected PeerGroupID(UUID groupUUID) {
-        super();
-        id = new IDBytes(IDFormat.flagPeerGroupID);
-        
-        id.longIntoBytes(PeerGroupID.groupIdOffset, groupUUID.getMostSignificantBits());
-        id.longIntoBytes(PeerGroupID.groupIdOffset + 8, groupUUID.getLeastSignificantBits());
-    }
-    
-    /**
-     *  See {@link net.jxta.id.IDFactory.Instantiator#newPeerGroupID()}.
-     */
-    public PeerGroupID() {
-        this(UUIDFactory.newUUID());
-    }
-    
-    /**
-     *  See {@link net.jxta.id.IDFactory.Instantiator#newPeerGroupID(net.jxta.peergroup.PeerGroupID)}.
-     */
-    public PeerGroupID(PeerGroupID parent) {
-        this(UUIDFactory.newUUID());
-
-        System.arraycopy(parent.id.bytes, 0, id.bytes, 16, IDFormat.uuidSize);
-    }
-    
-    /**
-     *  See {@link net.jxta.id.IDFactory.Instantiator#newPeerGroupID(byte[])}.
-     */
-    public PeerGroupID(byte[] seed) {
-        super();
-        id = new IDBytes(IDFormat.flagPeerGroupID);
-        
-        for (int copySeed = Math.min(IDFormat.uuidSize, seed.length) - 1; copySeed >= 0; copySeed--) {
-            id.bytes[copySeed + PeerGroupID.groupIdOffset] = seed[copySeed];
-        }
-        
-        // make it a valid UUID
-        id.bytes[PeerGroupID.groupIdOffset + 6] &= 0x0f;
-        id.bytes[PeerGroupID.groupIdOffset + 6] |= 0x40; /* version 4 */
-        id.bytes[PeerGroupID.groupIdOffset + 8] &= 0x3f;
-        id.bytes[PeerGroupID.groupIdOffset + 8] |= 0x80; /* IETF variant */
-        id.bytes[PeerGroupID.groupIdOffset + 10] &= 0x3f;
-        id.bytes[PeerGroupID.groupIdOffset + 10] |= 0x80; /* multicast bit */
-    }
-    
-    /**
-     *  See {@link net.jxta.id.IDFactory.Instantiator#newPeerGroupID(net.jxta.peergroup.PeerGroupID,byte[])}.
-     */
-    public PeerGroupID(PeerGroupID parent, byte[] seed) {
-        this(seed);
-
-        System.arraycopy(parent.id.bytes, 0, id.bytes, 16, IDFormat.uuidSize);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        }
-        
-        if (target instanceof PeerGroupID) {
-            PeerGroupID peergroupTarget = (PeerGroupID) target;
-            
-            return id.equals(peergroupTarget.id);
-        } else {
-            return false;
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        return id.hashCode();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public String getIDFormat() {
-        return IDFormat.INSTANTIATOR.getSupportedIDFormat();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public Object getUniqueValue() {
-        return getIDFormat() + "-" + (String) id.getUniqueValue();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public net.jxta.peergroup.PeerGroupID getParentPeerGroupID() {
-        boolean zero = true;
-        
-        for (int eachByte = 0; eachByte < IDFormat.uuidSize; eachByte++) {
-            if (id.bytes[eachByte + PeerGroupID.parentgroupIdOffset] != 0) {
-                zero = false;
-                break;
-            }
-        }
-        
-        // if zero, then there is no parent.
-        if (zero) {
-            return null;
-        }
-        
-        UUID groupUUID = new UUID(id.bytesIntoLong(PeerGroupID.parentgroupIdOffset)
-                ,
-                id.bytesIntoLong(PeerGroupID.parentgroupIdOffset + 8));
-        
-        PeerGroupID groupID = new PeerGroupID(groupUUID);
-        
-        // convert to the generic world PGID as necessary
-        return (net.jxta.peergroup.PeerGroupID) IDFormat.translateToWellKnown(groupID);
-    }
-    
-    /**
-     *  Returns the UUID associated with this PeerGroupID.
-     *
-     *  @return The UUID associated with this PeerGroupID.
-     */
-    protected UUID getUUID() {
-        return new UUID(id.bytesIntoLong(PeerGroupID.groupIdOffset), id.bytesIntoLong(PeerGroupID.groupIdOffset + 8));
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/PeerID.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/PeerID.java
deleted file mode 100644 (file)
index 4ba50ed..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.UUID;
-
-
-/**
- *  An implementation of the {@link net.jxta.peer.PeerID} ID Type.
- */
-public class PeerID extends net.jxta.peer.PeerID {
-    
-    protected final static int groupIdOffset = 0;
-    protected final static int idOffset = PeerID.groupIdOffset + IDFormat.uuidSize;
-    protected final static int padOffset = PeerID.idOffset + IDFormat.uuidSize;
-    
-    protected final static int padSize = IDFormat.flagsOffset - PeerID.padOffset;
-    
-    /**
-     *  The id data
-     */
-    protected IDBytes id;
-    
-    /**
-     *  Used only internally.
-     */
-    protected PeerID() {
-        super();
-        id = new IDBytes(IDFormat.flagPeerID);
-    }
-    
-    /**
-     * Initializes contents from provided ID.
-     *
-     * @param id    the ID data
-     */
-    protected PeerID(IDBytes id) {
-        super();
-        this.id = id;
-    }
-    
-    /**
-     * Creates a PeerID. A PeerGroupID is provided
-     *
-     * @param groupUUID    the UUID of the group to which this will belong.
-     * @param idUUID    the UUID which will be used for this pipe.
-     */
-    protected PeerID(UUID groupUUID, UUID idUUID) {
-        this();
-        
-        id.longIntoBytes(PipeID.groupIdOffset, groupUUID.getMostSignificantBits());
-        id.longIntoBytes(PipeID.groupIdOffset + 8, groupUUID.getLeastSignificantBits());
-        
-        id.longIntoBytes(PipeID.idOffset, idUUID.getMostSignificantBits());
-        id.longIntoBytes(PipeID.idOffset + 8, idUUID.getLeastSignificantBits());
-    }
-    
-    /**
-     *  See {@link net.jxta.id.IDFactory.Instantiator#newPeerID(net.jxta.peergroup.PeerGroupID)}.
-     */
-    public PeerID(PeerGroupID groupID) {
-        this(groupID.getUUID(), UUIDFactory.newUUID());
-    }
-    
-    /**
-     *  See {@link net.jxta.id.IDFactory.Instantiator#newPeerID(net.jxta.peergroup.PeerGroupID,byte[])}.
-     */
-    public PeerID(PeerGroupID groupID, byte[] seed) {
-        this();
-        
-        UUID groupUUID = new UUID(groupID.id.bytesIntoLong(PeerGroupID.groupIdOffset)
-                ,
-                groupID.id.bytesIntoLong(PeerGroupID.groupIdOffset + 8));
-        
-        byte[] idUUIDbytes = new byte[IDFormat.uuidSize];
-        
-        System.arraycopy(seed, 0, idUUIDbytes, 0, Math.min(IDFormat.uuidSize, seed.length));
-        
-        UUID idUUID = UUIDFactory.newUUID(idUUIDbytes);
-        
-        id.longIntoBytes(PipeID.groupIdOffset, groupUUID.getMostSignificantBits());
-        id.longIntoBytes(PipeID.groupIdOffset + 8, groupUUID.getLeastSignificantBits());
-        
-        id.longIntoBytes(PipeID.idOffset, idUUID.getMostSignificantBits());
-        id.longIntoBytes(PipeID.idOffset + 8, idUUID.getLeastSignificantBits());
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        }
-        
-        if (target instanceof PeerID) {
-            PeerID peerTarget = (PeerID) target;
-            
-            return id.equals(peerTarget.id);
-        } else {
-            return false;
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        return id.hashCode();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public String getIDFormat() {
-        return IDFormat.INSTANTIATOR.getSupportedIDFormat();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public Object getUniqueValue() {
-        return getIDFormat() + "-" + (String) id.getUniqueValue();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public net.jxta.id.ID getPeerGroupID() {
-        UUID groupUUID = new UUID(id.bytesIntoLong(PeerID.groupIdOffset), id.bytesIntoLong(PeerID.groupIdOffset + 8));
-        
-        PeerGroupID groupID = new PeerGroupID(groupUUID);
-        
-        // convert to the generic world PGID as necessary
-        return IDFormat.translateToWellKnown(groupID);
-    }
-    
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/PipeID.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/PipeID.java
deleted file mode 100644 (file)
index 92d25b2..0000000
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.UUID;
-
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-
-/**
- *  An implementation of the {@link net.jxta.pipe.PipeID} ID Type.
- */
-public class PipeID extends net.jxta.pipe.PipeID {
-    protected final static int groupIdOffset = 0;
-    protected final static int idOffset = PipeID.groupIdOffset + IDFormat.uuidSize;
-    protected final static int padOffset = PipeID.idOffset + IDFormat.uuidSize;
-    protected final static int padSize = IDFormat.flagsOffset - PipeID.padOffset;
-    
-    /**
-     *  The id data
-     */
-    protected IDBytes id;
-    
-    /**
-     *  Used only internally
-     *
-     */
-    protected PipeID() {
-        super();
-        id = new IDBytes(IDFormat.flagPipeID);
-    }
-    
-    /**
-     * Constructor.
-     * Initializes contents from provided ID.
-     *
-     *
-     * @param id    the ID data
-     */
-    protected PipeID(IDBytes id) {
-        super();
-        this.id = id;
-    }
-    
-    /**
-     * Creates a PipeID. A PeerGroupID is provided
-     *
-     * @param groupUUID    the UUID of the group to which this will belong.
-     * @param idUUID    the UUID which will be used for this pipe.
-     */
-    protected PipeID(UUID groupUUID, UUID idUUID) {
-        this();
-        
-        id.longIntoBytes(PipeID.groupIdOffset, groupUUID.getMostSignificantBits());
-        id.longIntoBytes(PipeID.groupIdOffset + 8, groupUUID.getLeastSignificantBits());
-        
-        id.longIntoBytes(PipeID.idOffset, idUUID.getMostSignificantBits());
-        id.longIntoBytes(PipeID.idOffset + 8, idUUID.getLeastSignificantBits());
-    }
-    
-    /**
-     *  See {@link net.jxta.id.IDFactory.Instantiator#newPipeID(net.jxta.peergroup.PeerGroupID)}.
-     */
-    public PipeID(PeerGroupID groupID) {
-        this(groupID.getUUID(), UUIDFactory.newUUID());
-    }
-    
-    /**
-     *  See {@link net.jxta.id.IDFactory.Instantiator#newPipeID(net.jxta.peergroup.PeerGroupID,byte[])}.
-     */
-    public PipeID(PeerGroupID groupID, byte[] seed) {
-        this();
-        
-        UUID groupUUID = groupID.getUUID();
-        
-        id.longIntoBytes(PipeID.groupIdOffset, groupUUID.getMostSignificantBits());
-        id.longIntoBytes(PipeID.groupIdOffset + 8, groupUUID.getLeastSignificantBits());
-        
-        for (int copySeed = Math.min(IDFormat.uuidSize, seed.length) - 1; copySeed >= 0; copySeed--) {
-            id.bytes[copySeed + PipeID.idOffset] = seed[copySeed];
-        }
-        
-        // make it a valid UUID
-        id.bytes[PipeID.idOffset + 6] &= 0x0f;
-        id.bytes[PipeID.idOffset + 6] |= 0x40; /* version 4 */
-        id.bytes[PipeID.idOffset + 8] &= 0x3f;
-        id.bytes[PipeID.idOffset + 8] |= 0x80; /* IETF variant */
-        id.bytes[PipeID.idOffset + 10] &= 0x3f;
-        id.bytes[PipeID.idOffset + 10] |= 0x80; /* multicast bit */
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        }
-        
-        if (target instanceof PipeID) {
-            PipeID pipeTarget = (PipeID) target;
-            
-            return id.equals(pipeTarget.id);
-        } else {
-            return false;
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        return id.hashCode();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public String getIDFormat() {
-        return IDFormat.INSTANTIATOR.getSupportedIDFormat();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public Object getUniqueValue() {
-        return getIDFormat() + "-" + (String) id.getUniqueValue();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public net.jxta.id.ID getPeerGroupID() {
-        UUID groupUUID = new UUID(id.bytesIntoLong(PipeID.groupIdOffset), id.bytesIntoLong(PipeID.groupIdOffset + 8));
-        
-        PeerGroupID groupID = new PeerGroupID(groupUUID);
-        
-        // convert to the generic world PGID as necessary
-        return IDFormat.translateToWellKnown(groupID);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/UUID.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/UUID.java
deleted file mode 100644 (file)
index f7ea4da..0000000
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.UUID;
-
-
-import java.io.Serializable;
-
-
-/**
- * A <code>UUID</code> is a 128-bit universally unique identifier.
- * The most significant long can be decomposed into the following
- * unsigned fields:
- * <pre>
- * 0xFFFFFFFF00000000 time_low
- * 0x00000000FFFF0000 time_mid
- * 0x000000000000F000 version
- * 0x0000000000000FFF time_hi
- * </pre>
- * <p/>The least significant long can be decomposed into the following
- * unsigned fields:
- * <pre>
- * 0xC000000000000000 variant
- * 0x3FFF000000000000 clock_seq
- * 0x0000FFFFFFFFFFFF node
- * </pre>
- * <p/>The variant field must be 0x2. The version field must be either 0x1 or 0x4.
- *
- * <p/>If the version field is 0x4, then the most significant bit of the node
- * field must be set to 1, and the remaining fields are set to values
- * produced by a cryptographically strong pseudo-random number generator.
- *
- * <p/>If the version field is 0x1, then the node field is set to an IEEE 802
- * address (MAC), the clock_seq field is set to a 14-bit random number, and the
- * time_low, time_mid, and time_hi fields are set to the least, middle and
- * most significant bits (respectively) of a 60-bit timestamp measured in
- * 100-nanosecond units since midnight, October 15, 1582 UTC.
- *
- * @see         net.jxta.impl.id.UUID.IDFormat
- * @see         net.jxta.impl.id.UUID.UUIDFactory
- * @see "<i>Information Technology - Open Systems Interconnection - Remote Procedure Call (RPC)</i>, ISO 11578:1996"
- * @see <a href="http://www.opengroup.org/onlinepubs/9629399/apdxa.htm" target="_blank"><i>The Open Group - DCE 1.1 Remote Procedure Call (RPC) : Appendix A - Universal Unique Identifier</i></a>
- *
- */
-public final class UUID implements Serializable {
-
-    /**
-     *  The null UUID. Useful for comparisons.
-     */
-    public static final UUID nullUUID = new UUID(0L, 0L);
-
-    /**
-     * The most significant 64 bits.
-     */
-    private long mostSig;
-
-    /**
-     * The least significant 64 bits.
-     */
-    private long leastSig;
-
-    /**
-     * Simple constructor. This constructor does not check to ensure that the
-     * values provided produce a valid UUID.
-     *
-     * @param mostSig the most significant 64 bits
-     * @param leastSig the least significant 64 bits
-     */
-    public UUID(long mostSig, long leastSig) {
-        this.mostSig = mostSig;
-        this.leastSig = leastSig;
-    }
-
-    /**
-     * Simple constructor. This constructor does not check to ensure that the
-     * values provided produce a valid UUID.
-     *
-     * @param bytes the 128 bits of
-     */
-    public UUID(byte[] bytes) {
-        if (bytes.length != 16) {
-            throw new IllegalArgumentException("bytes must be 16 bytes in length");
-        }
-
-        long mostSig = 0;
-
-        for (int i = 0; i < 8; i++) {
-            mostSig = (mostSig << 8) | (bytes[i] & 0xff);
-        }
-
-        long leastSig = 0;
-
-        for (int i = 8; i < 16; i++) {
-            leastSig = (leastSig << 8) | (bytes[i] & 0xff);
-        }
-
-        this.mostSig = mostSig;
-        this.leastSig = leastSig;
-    }
-
-    public UUID(String uuid) {
-        if (36 != uuid.length()) {
-            throw new IllegalArgumentException("uuid must be 36 characters in length");
-        }
-
-        byte bytes[] = new byte[16];
-
-        boolean hi = true;
-
-        for (int eachChar = 0, offset = 0; eachChar < 36; eachChar++) {
-            char aChar = uuid.charAt(eachChar);
-
-            switch (eachChar) {
-            case 8:
-            case 13:
-            case 18:
-            case 23:
-                if ('-' != uuid.charAt(eachChar)) {
-                    throw new IllegalArgumentException("uuid has an illegal character at position " + eachChar);
-                }
-                break;
-
-            default:
-                aChar = Character.toLowerCase(aChar);
-
-                int aNibble;
-
-                if (('0' <= aChar) && ('9' >= aChar)) {
-                    aNibble = aChar - '0';
-                } else if (('a' <= aChar) && ('f' >= aChar)) {
-                    aNibble = aChar - 'a' + 10;
-                } else {
-                    throw new IllegalArgumentException("uuid has an illegal character at position " + eachChar);
-                }
-
-                if (hi) {
-                    aNibble <<= 4;
-                }
-
-                bytes[offset] |= aNibble;
-
-                if (!hi) {
-                    offset++;
-                }
-
-                hi = !hi;
-            }
-        }
-
-        mostSig = 0;
-        for (int i = 0; i < 8; i++) {
-            mostSig = (mostSig << 8) | (bytes[i] & 0xff);
-        }
-
-        leastSig = 0;
-        for (int i = 8; i < 16; i++) {
-            leastSig = (leastSig << 8) | (bytes[i] & 0xff);
-        }
-    }
-
-    /**
-     * Returns the most significant 64 bits of the UUID.
-     *
-     * @return long return most significant bits
-     */
-    public long getMostSignificantBits() {
-        return mostSig;
-    }
-
-    /**
-     * Returns the least significant 64 bits of the UUID.
-     *
-     * @return long least significant bits
-     */
-    public long getLeastSignificantBits() {
-        return leastSig;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        return (int) ((mostSig >> 32) ^ mostSig ^ (leastSig >> 32) ^ leastSig);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        }
-
-        if (target instanceof UUID) {
-            return equals((UUID) target);
-        } else {
-            return false;
-        }
-    }
-
-    /**
-     * UUIDs are equal if they represent the same 128-bit value.
-     *
-     * @param sid UUID seed
-     * @return boolean true if equals
-     */
-    public boolean equals(UUID sid) {
-        if (null == sid) {
-            return false;
-        }
-
-        return (mostSig == sid.mostSig && leastSig == sid.leastSig);
-    }
-
-    /**
-     * Returns a 36-character string of six fields separated by hyphens,
-     * with each field represented in lowercase hexadecimal with the same
-     * number of digits as in the field. The order of fields is: time_low,
-     * time_mid, version and time_hi treated as a single field, variant and
-     * clock_seq treated as a single field, and node.
-     *
-     * ie. XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
-     *
-     * @return String return value
-     */
-    @Override
-    public String toString() {
-        return (digits(mostSig >> 32, 8) + "-" + digits(mostSig >> 16, 4) + "-" + digits(mostSig, 4) + "-"
-                + digits(leastSig >> 48, 4) + "-" + digits(leastSig, 12));
-    }
-
-    /**
-     * Returns val represented by the specified number of hex digits
-     *
-     * @param val value
-     * @param digits
-     * @return String return value
-     */
-    private static String digits(long val, int digits) {
-        long hi = 1L << (digits * 4);
-
-        return Long.toHexString(hi | (val & (hi - 1))).substring(1);
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/UUIDFactory.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/UUIDFactory.java
deleted file mode 100644 (file)
index 689dede..0000000
+++ /dev/null
@@ -1,292 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.UUID;
-
-
-import java.security.SecureRandom;
-import java.util.GregorianCalendar;
-import java.util.Random;
-import java.util.Calendar;
-import java.util.TimeZone;
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-
-/**
- * A Factory for generating random UUIDs.
- *
- * @see         net.jxta.impl.id.UUID.UUID
- */
-public final class UUIDFactory {
-    
-    /**
-     *  Log4J Logger
-     */
-    private static final transient Logger LOG = Logger.getLogger(UUIDFactory.class.getName());
-    
-    /**
-     * The point at which the Gregorian calendar rules are used, measured in
-     * milliseconds from the standard epoch.  Default is October 15, 1582
-     * (Gregorian) 00:00:00 UTC or -12219292800000L.
-     */
-    static final long GREGORIAN_MILLIS_OFFSET = 12219292800000L;
-    
-    /**
-     *  offset of this computer relative to utc
-     */
-    private long utc_offset = 0L;
-    
-    /**
-     *  Time at which we last generated a version 1 UUID in relative
-     *  milliseconds from 00:00:00.00, 15 October 1582 UTC.
-     */
-    private long lastTimeSequence = 0L;
-    
-    /**
-     *   Count of how many version 1 UUIDs we have generated at this time
-     *  sequence value.
-     */
-    private long inSequenceCounter = 0L;
-    
-    /**
-     *  pseudo random value to prevent clock collisions on the same computer.
-     */
-    private long clock_seq = 0L;
-    
-    /**
-     *  pseudo random value. If available, this should be seeded with the MAC
-     *  address of a local network interface.
-     */
-    private long node = 0L;
-    
-    /**
-     *  Random number generator for UUID generation.
-     */
-    private Random randNum = null;
-    
-    /**
-     *  We have to catch exceptions from construct of JRandom so we
-     *  have to init it inline.
-     */
-    private static UUIDFactory factory = new UUIDFactory();
-    
-    /**
-     *  Generate a new random UUID value. The UUID returned is a version 4 IETF
-     *  variant random UUID.
-     *
-     *  <p/>This member must be synchronized because it makes use of shared
-     *  internal state.
-     *
-     *  @return UUID returns a version 4 IETF variant random UUID.
-     */
-    public synchronized static UUID newUUID() {
-        
-        return newUUID(factory.randNum.nextLong(), factory.randNum.nextLong());
-    }
-    
-    /**
-     *  Returns a formatted time sequence field containing the elapsed time in
-     *  100 nano units since 00:00:00.00, 15 October 1582. Since the normal
-     *  clock resolution is coarser than 100 nano than this value, the lower
-     *  bits are generated in sequence for each call within the same milli.
-     *
-     *  @return time sequence value
-     */
-    private synchronized long getTimeSequence() {
-        long now = (System.currentTimeMillis() - GREGORIAN_MILLIS_OFFSET + utc_offset) * 10000L; // convert to 100 nano units;
-        
-        if (now > lastTimeSequence) {
-            lastTimeSequence = now;
-            // XXX bondolo@jxta.org It might be better to set this to a random
-            // value and just watch for rollover. The reason is that there may
-            // be more than one instance running on the same computer which is
-            // generating UUIDs, but is not excluded by our synchronization.
-            // A random value would reduce collisions.
-            inSequenceCounter = 0;
-        } else {
-            inSequenceCounter++;
-            if (inSequenceCounter >= 10000L) {
-                // we allow the clock to skew forward rather than wait. It's
-                // really unlikely that anyone will be continuously generating
-                // more than 10k UUIDs per milli for very long.
-                lastTimeSequence += 10000L;
-                inSequenceCounter = 0;
-            }
-        }
-        
-        return (lastTimeSequence + inSequenceCounter);
-    }
-    
-    /**
-     *  Generate a new UUID value. The UUID returned is a version 1 IETF
-     *  variant UUID.
-     *
-     *  <p/>The node value used is currently a random value rather than the
-     *  normal ethernet MAC address because the MAC address is not directly
-     *  accessible in to java.
-     *
-     *  @return UUID returns a version 1 IETF variant UUID.
-     */
-    public static UUID newSeqUUID() {
-        long mostSig = 0L, leastSig = 0L;
-        
-        long timeSeq = factory.getTimeSequence();
-        
-        mostSig |= (timeSeq & 0x0FFFFFFFFL) << 32;
-        mostSig |= ((timeSeq >> 32) & 0x0FFFFL) << 16;
-        mostSig |= (0x01L) << 12; // version 1;
-        mostSig |= ((timeSeq >> 48) & 0x00FFFL);
-        
-        leastSig |= (0x02L) << 62; // ietf variant
-        leastSig |= ((factory.clock_seq >> 8) & 0x03FL) << 56;
-        leastSig |= (factory.clock_seq & 0x0FFL) << 48;
-        leastSig |= factory.node & 0x0FFFFFFFFFFFFL;
-        
-        return new UUID(mostSig, leastSig);
-    }
-    
-    /**
-     *  Generate a new UUID value. The values provided are masked to produce a
-     *  version 4 IETF variant random UUID.
-     *
-     *  @param bytes the 128 bits of the UUID
-     *  @return UUID returns a version 4 IETF variant random UUID.
-     */
-    public static UUID newUUID(byte[] bytes) {
-        if (bytes.length != 16) {
-            throw new IllegalArgumentException("bytes must be 16 bytes in length");
-        }
-        
-        long mostSig = 0;
-
-        for (int i = 0; i < 8; i++) {
-            mostSig = (mostSig << 8) | (bytes[i] & 0xff);
-        }
-        
-        long leastSig = 0;
-
-        for (int i = 8; i < 16; i++) {
-            leastSig = (leastSig << 8) | (bytes[i] & 0xff);
-        }
-        
-        return newUUID(mostSig, leastSig);
-    }
-    
-    /**
-     *  Generate a new UUID value. The values provided are masked to produce a
-     *  version 3 IETF variant UUID.
-     *
-     *  @param mostSig High-long of UUID value.
-     *  @param leastSig Low-long of UUID value.
-     *  @return UUID returns a version 3 IETF variant random UUID.
-     */
-    public static UUID newHashUUID(long mostSig, long leastSig) {
-        
-        mostSig &= 0xFFFFFFFFFFFF0FFFL;
-        mostSig |= 0x0000000000003000L; // version 3
-        leastSig &= 0x3FFFFFFFFFFFFFFFL;
-        leastSig |= 0x8000000000000000L; // IETF variant
-        
-        return new UUID(mostSig, leastSig);
-    }
-    
-    /**
-     *  Generate a new UUID value. The values provided are masked to produce a
-     *  version 4 IETF variant random UUID.
-     *
-     *  @param mostSig High-long of UUID value.
-     *  @param leastSig Low-long of UUID value.
-     *  @return UUID returns a version 4 IETF variant random UUID.
-     */
-    public static UUID newUUID(long mostSig, long leastSig) {
-        
-        mostSig &= 0xFFFFFFFFFFFF0FFFL;
-        mostSig |= 0x0000000000004000L; // version 4
-        leastSig &= 0x3FFFFFFFFFFFFFFFL;
-        leastSig |= 0x8000000000000000L; // IETF variant
-        
-        leastSig &= 0xFFFF7FFFFFFFFFFFL;
-        leastSig |= 0x0000800000000000L; // multicast bit
-        
-        return new UUID(mostSig, leastSig);
-    }
-    
-    /**
-     *  Singleton class
-     */
-    private UUIDFactory() {
-        
-        randNum = new SecureRandom();
-        
-        String[] tz_ids = TimeZone.getAvailableIDs(0);
-        Calendar gregorianCalendar = new GregorianCalendar();
-        
-        // FIXME 20031024 bondolo@jxta.org In theory we should be doing this
-        // EVERY time we generate a UUID. In practice because of we use a random
-        // clock_seq we don't have to.
-        utc_offset = gregorianCalendar.get(Calendar.ZONE_OFFSET) + gregorianCalendar.get(Calendar.DST_OFFSET);
-        
-        // Generate a random clock seq
-        clock_seq = randNum.nextInt() & 0x03FFL;
-        
-        // Generate a random node ID since we can't get the MAC Address
-        node = (randNum.nextLong() & 0x0000FFFFFFFFFFFFL);
-        node |= 0x0000800000000000L; // mask in the multicast bit since we don't know if its unique.
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/UUID/package.html
deleted file mode 100644 (file)
index dc0f6b2..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    The 'uuid' format is a general purpose JXTA ID Format. It implements all of
-    the six standard ID types. It was originally created for the Jave 2 SE
-    reference implementation. The 'uuid' format uses randomly generated UUIDs
-    as the mechanism for generating canonical values for the ids it provides.
-
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#ids" target="_blank">JXTA Protocols Specification : IDs</a>
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#refimpls-ids-jiuft" target="_blank">JXTA Protocols Specification
-: UUID ID Format</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/BinaryID.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/BinaryID.java
deleted file mode 100644 (file)
index fd45a2f..0000000
+++ /dev/null
@@ -1,319 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.binaryID;
-
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.io.Serializable;
-
-
-/**
- * A <code>BinaryID</code> is a 256-byte, identifier.
- * This class should be immutable so that it is thread safe.
- *
- * @author Daniel Brookshier <a HREF="mailto:turbogeek@cluck.com">turbogeek@cluck.com</a>
- * @see net.jxta.id.ID
- * @see net.jxta.id.IDFactory
- */
-
-public class BinaryID implements Serializable {
-
-    private final static transient Logger LOG = Logger.getLogger(BinaryID.class.getName());
-    public static String UUIDEncoded = "uuid";
-    public final static int flagsSize = 1;
-
-    public final static byte flagPeerGroupID = 'a';
-    public final static byte flagPeerID = 'b';
-    public final static byte flagPipeID = 'c';
-
-    public final static byte flagModuleClassID = 'd';
-    public final static byte flagModuleClassRoleID = 'e';
-
-    public final static byte flagModuleSpecID = 'f';
-    public final static byte flagCodatID = 'g';
-    public final static byte flagGenericID = 'z';
-
-    /**
-     * location of the byte designating its type.
-     */
-    public final static int flagsOffset = 0;
-
-    /**
-     * location of the byte where the data starts.
-     */
-    public final static int dataOffset = 1;
-
-    /**
-     * Null id contents.
-     */
-    private static final byte[] nullID = { 0};
-    public static final BinaryID nullBinaryID = new BinaryID(flagGenericID, nullID, true);
-
-    /**
-     * Array that holds the length and the value of the id in base64 format. This is the default format
-     * rather than binary byte because it saves time converting. Odds of returning the actual binary are
-     * low so it is done on demand only. Callers of the toByteArray() method should consider the cost of
-     * decoding if it is to be called often.
-     */
-    protected String encodedValue = null;
-
-    /**
-     * Creates a null value ID.
-     */
-    public BinaryID() {
-        this.encodedValue = nullBinaryID.encodedValue; // (flagGenericID, nullID, true); 
-    }
-
-    /**
-     * Creates zero content ID of a specific type.
-     */
-    public BinaryID(byte id) {
-        this(id, nullID, true);
-    }
-
-    /**
-     * Creates a ID from a string. Note that the ID is not currently validated.
-     *
-     * @param encodedValue Value to convert ID.
-     */
-    protected BinaryID(String encodedValue) {
-        this.encodedValue = encodedValue;
-    }
-
-    /**
-     * Simple constructor that takes a binary array to signify the contents of the array.
-     *
-     * @param type           The Type of ID. Valid values: flagPeerGroupID,flagPeerID,flagPipeID,flagGenericID
-     * @param data           the array of up to 256 bytes. Max is 256 if lengthIncluded is true or 255 if the first byte is the length-1.
-     * @param lengthIncluded Boolean that signifies if the first byte is the length of the bytes to follow.
-     * @throws RuntimeException Runtime exception trhown if array is not correct or if included, the array length does not match actual size.
-     */
-
-    public BinaryID(byte type, byte data[], boolean lengthIncluded) {
-        if (lengthIncluded && data.length < 256 && data.length > 1) {
-            if (data[0] == data.length - 1) {
-                try {
-                    java.io.StringWriter base64 = new java.io.StringWriter();
-                    net.jxta.impl.util.BASE64OutputStream encoder = new net.jxta.impl.util.BASE64OutputStream(base64);
-
-                    encoder.write(data);
-                    encoder.close();
-
-                    encodedValue = ((char) type) + base64.toString();
-                } catch (Exception e) {
-                    LOG.log(Level.SEVERE, "Unable to encode binary value.", e);
-                    throw new RuntimeException("Unable to encode binary value.");
-                }
-            } else {
-                throw new RuntimeException(
-                        "Length of data section is " + (data.length - 1) + " but byte zero says length is:" + data[0] + ".");
-            }
-        } else if (!lengthIncluded && data.length > 0) {
-            byte temp[] = new byte[data.length + 1];
-
-            temp[0] = (byte) data.length;
-            System.arraycopy(data, 0, temp, 1, data.length);
-            try {
-                java.io.StringWriter base64 = new java.io.StringWriter();
-                net.jxta.impl.util.BASE64OutputStream encoder = new net.jxta.impl.util.BASE64OutputStream(base64);
-
-                encoder.write(temp);
-                encoder.close();
-
-                encodedValue = ((char) type) + base64.toString();
-            } catch (Exception e) {
-                LOG.log(Level.SEVERE, "Unable to encode binary value.", e);
-                throw new RuntimeException("Unable to encode binary value.");
-            }
-        } else if (lengthIncluded && (data.length > 256 || data.length == 0)) {
-            throw new RuntimeException("Length of 'data' is " + data.length + " must be >0 and less or equal to 256.");
-        } else if (!lengthIncluded && data.length > 255) {
-            throw new RuntimeException("Length of 'data' is " + data.length + "  must be less than 256. ");
-        }
-    }
-
-    /**
-     * Returns the value of the ID as a binary array. This is always decoded from the base64
-     * string rather than caching of the binary array. Callers of the toByteArray() method
-     * should consider the cost of decoding if the method is called often.
-     *
-     * @return returns the data part of the array.
-     */
-    public byte[] toByteArray() {
-        try {
-            java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream();
-            net.jxta.impl.util.BASE64InputStream decoder = new net.jxta.impl.util.BASE64InputStream(
-                    new java.io.StringReader(encodedValue.substring(1)));
-
-            while (true) {
-                int c = decoder.read();
-
-                if (-1 == c) {
-                    break;
-                }
-
-                bos.write(c);
-            }
-
-            return bos.toByteArray();
-        } catch (Exception e) {
-            LOG.log(Level.SEVERE, "Unable to decode binary value.", e);
-            throw new RuntimeException("Unable to encode binary value.");
-        }
-
-    }
-
-    /**
-     * Returns the value of the ID as a binary array without the size in byte zero. This is always decoded from the base64
-     * string rather than caching of the binary array. Callers of the toByteArray() method
-     * should consider the cost of decoding if the method is called often.<p>
-     * <p/>
-     * Note that we assume the array size-1 equals the contents of byte zero.
-     *
-     * @return returns the array with the first byte as the length of the remaining bytes.
-     */
-    public byte[] toSizeIncludedByteArray() {
-        byte[] data = toByteArray();
-
-        byte temp[] = new byte[data.length - 1];
-
-        System.arraycopy(data, 1, temp, 0, temp.length);
-
-        return temp;
-    }
-
-    /**
-     * @return The ID which consists of a character designating type, followed by the base64 encoded value of the size and array of bytes.
-     */
-    public String encodedValue() {
-        return encodedValue;
-    }
-
-    /**
-     * Returns the hash code of the BinaryID<p>
-     * <p/>
-     * WARNING: Do not use this hash as a network ID. Use a stronger digest hash like SHA-1 to get the hash of the contents.
-     *
-     * @return int hashcode
-     */
-
-    @Override
-    public int hashCode() {
-        return encodedValue.hashCode();
-    }
-
-    /**
-     * Compares two BinaryIDs for equality.<p>
-     * true: taget == this<p>
-     * false: target == null<p>
-     * true: taget.encodedValue == this.encodedValue<p>
-     * true: target instance of ID && ID==ID.nullID && nullBinaryID.encodedValue().equals( encodedValue())<p>
-     * false: all other posibilities<p>
-     *
-     * @param target the BidaryID to be compared against.
-     * @return boolean true if IDs are equal, false otherwise.
-     */
-    @Override
-    public boolean equals(Object target) {
-        boolean result = false;
-
-        if (target == this) {
-            result = true;
-        } else if (target == null) {
-            result = false;
-        } else if (target instanceof BinaryID) {
-            result = encodedValue().equals(((BinaryID) target).encodedValue());
-            LOG.fine("((BinaryID)target).encodedValue():" + ((BinaryID) target).encodedValue());
-        } else if (target instanceof net.jxta.id.ID && ((net.jxta.id.ID) target) == net.jxta.id.ID.nullID
-                && nullBinaryID.encodedValue().equals(encodedValue())) {
-            result = true;
-        }
-        // LOG.error("this:"+encodedValue()+" type:"+target.getClass().getName()+" target:"+target+" equals:"+result,new RuntimeException("test exception")); 
-        return result;
-    }
-
-    /**
-     * Return the type of ID.
-     *
-     * @return byte value designating type.
-     */
-
-    public byte type() {
-        return (byte) encodedValue.charAt(0);
-    }
-
-    /**
-     * Returns base 64 encoded value.
-     *
-     * @return String return value
-     */
-
-    @Override
-    public String toString() {
-        return encodedValue;
-    }
-
-    /**
-     * returns the raw encoded value. Not cloned because it is a string.
-     */
-    public String getID() {
-        return encodedValue;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/BinaryIDFactory.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/BinaryIDFactory.java
deleted file mode 100644 (file)
index f1266d3..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.binaryID;
-
-
-/**
- * A <code>BinaryIDFactory</code> generates a BinaryID id. BinaryIDs are used to uniquely
- * identify objects such as peers, peer groups and pipes.
- *
- * @author Daniel Brookshier <a HREF="mailto:turbogeek@cluck.com">turbogeek@cluck.com</a>
- * @see net.jxta.id.ID
- */
-
-public class BinaryIDFactory {
-
-    /**
-     * Returns a new BinaryID value.
-     *
-     * @return BinaryID returns a BinaryID.
-     */
-
-    public static BinaryID newBinaryID(byte type, byte data[], boolean lengthIncluded) {
-        return new BinaryID(type, data, lengthIncluded);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/CodatBinaryID.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/CodatBinaryID.java
deleted file mode 100644 (file)
index a060067..0000000
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.id.binaryID;
-
-
-import net.jxta.peergroup.PeerGroupID;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.io.InputStream;
-import java.net.URI;
-import net.jxta.id.ID;
-
-
-/**
- * This class implements a Pipe ID. Each pipe is assigned a unique id.
- *
- * @author Daniel Brookshier <a HREF="mailto:turbogeek@cluck.com">turbogeek@cluck.com</a>
- * @see net.jxta.id.ID
- * @see net.jxta.id.IDFactory
- * @see net.jxta.peergroup.PeerGroupID
- */
-public final class CodatBinaryID extends net.jxta.codat.CodatID {
-
-    /**
-     * LOG object for this class.
-     */
-    private final static transient Logger LOG = Logger.getLogger(CodatBinaryID.class.getName());
-
-    /**
-     * The id data
-     */
-    protected String id;
-
-    /**
-     * Used only internally
-     */
-    protected CodatBinaryID() {
-        super();
-    }
-
-    /**
-     * Creates a ID from a string. Note that the ID is not currently validated.
-     *
-     * @param id Value of ID.
-     */
-
-    public CodatBinaryID(String id) {
-        super();
-        this.id = id;
-
-    }
-
-    /**
-     * Constructor. Intializes contents from provided ID.
-     *
-     * @param id the ID data
-     */
-    public CodatBinaryID(BinaryID id) {
-        super();
-        this.id = id.getID();
-    }
-
-    /**
-     * Constructor. Creates a PipeID. A PeerGroupID is provided.  Note that only
-     * the peer group's primary node is used to  build this node. We don't want
-     * to be appending great grand parents.
-     *
-     * @param parent         the group to which this will belong.
-     * @param data           DOCUMENT ME!
-     * @param lengthIncluded DOCUMENT ME!
-     */
-    public CodatBinaryID(net.jxta.peergroup.PeerGroupID parent, byte[] data, boolean lengthIncluded) {
-        this();
-
-        String parentStr = IDFormat.childGroup(parent);
-
-        id = BinaryIDFactory.newBinaryID(BinaryID.flagPipeID, data, lengthIncluded).getID() + "." + parentStr.replace('-', '.');
-    }
-
-    public CodatBinaryID(PeerGroupID groupID, InputStream in) {
-        // this( groupID );
-        net.jxta.id.IDFactory.newCodatID(groupID);
-        // setHash( in );
-    }
-
-    public CodatBinaryID(net.jxta.peergroup.PeerGroupID groupID, byte[] seed, InputStream in) {
-        this(groupID, seed, false);
-
-        // setHash( in );
-    }
-
-    /*
-     private void setHash( InputStream in ) throws IOException {
-     MessageDigest dig = null;
-     try {
-     dig = MessageDigest.getInstance( "SHA" );
-     } catch( NoSuchAlgorithmException caught ) {
-     dig = null;
-     }
-
-     if (dig == null) {
-     throw new ProviderException("SHA1 digest algorithm found");
-     }
-
-     dig.reset();
-
-     do {
-     int nextByte = in.read();
-     if( nextByte == -1 )
-     break;
-
-     dig.update( (byte) nextByte);
-     }
-     while( true );
-
-     in.close();
-
-     try {
-     byte [] result = dig.digest( );
-     for( int eachByte = 0; eachByte < CodatID.hashSize; eachByte++ )
-     id.bytes[eachByte + CodatID.codatHashOffset] = result[eachByte];
-     } catch( Throwable e ) {
-     // we convert this to an IO Exception to keep the number of
-     // down.
-     throw new IOException( "Digest algorithm could not complete : " + e.getMessage() );
-     }
-     }
-     */
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        }
-        
-        return target instanceof CodatBinaryID && getUniqueValue().equals(((CodatBinaryID) target).getUniqueValue());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        return getUniqueValue().hashCode();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getIDFormat() {
-        return IDFormat.INSTANTIATOR.getSupportedIDFormat();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Object getUniqueValue() {
-        if (null == id) { 
-            return ID.nullID.getUniqueValue();
-        }
-
-        return getIDFormat() + "-" + id;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public net.jxta.id.ID getPeerGroupID() {
-        try {
-            if (id == null) {
-                return net.jxta.id.ID.nullID;
-            }
-            String idd = id;
-            int parentStart = idd.indexOf('.');
-
-            if (parentStart != -1) {
-                idd = idd.substring(parentStart + 1);
-            } else {
-                return null;
-            }
-
-            URI url = new URI("urn:jxta:" + idd.replace('.', '-'));
-            net.jxta.peergroup.PeerGroupID peerGroupID = (net.jxta.peergroup.PeerGroupID) net.jxta.id.IDFactory.fromURI(url);
-
-            return peerGroupID;
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("cannot convert sub group. ID value = " + id);
-            }
-            return null;
-
-        }
-    }
-
-    /**
-     * returns the coded ID without the binaryid tag.
-     *
-     * @return Returns the raw string used to create the urn!
-     */
-    protected String getID() {
-        return id;
-    }
-
-    /**
-     * {@inheritDoc}
-     * Binary ID only supports static
-     */
-    @Override
-    public boolean isStatic() {
-        return true;
-    }
-    
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/DigestTool.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/DigestTool.java
deleted file mode 100644 (file)
index 101def9..0000000
+++ /dev/null
@@ -1,417 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.binaryID;
-
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.security.MessageDigest;
-
-
-/**
- * This is a utility class used to create pipe advertisement named and BinaryID for the pipeID to create
- * a private address space that can be hosted in the public discovery system or sent over unencrypted
- * channeds without revealing their intent or purpose. <p>
- * <p/>
- * We use a one-way hashing algorythum to create an ID from private information like
- * a user's social security number or a user's email address.
- * We search for the pipe by with this private information securly by creating the
- * matching hash using the same methods. <p>
- * <p/>
- * The purpose of this system is to create a way to search
- * for a pipe (or other BinaryID based system) without exposing the
- * pipe owner's clearTextID while allowing for  people that
- * know what they are looking for to find the right pipe. The
- * system also has the ability to create pipes that have a specific purpose.
- * For example, the email address is appended with a function name. Say you
- * have a pipe for messages and one for administrative purposes. You would
- * supply the email and a string for the function. The same combination can be
- * created by another peer to search for either of these pipes. <p>
- * <p/>
- * This implementation uses the "SHA-1" algorythum. This was selected for relitive
- * speed. It is used as a one-way conversion that cannot be reversed engineered to
- * create the original string. This allows you to publish the hash without the
- * possibility of the contents being decoded. This allows for public indexing of
- * data that is only known by the parties involved.<p>
- * <p/>
- * Note that this can also be used to generate safe password verification hash codes.
- * Sample useage:
- * <code>
- * String clearTextID = "turbogeek@cluck.com";
- * String function = "eventPipe";
- * System.out.println("clear text ID: "+clearTextID);
- * System.out.println("function text: "+function);
- * String digest1 = DigestID.generateHashString(clearTextID, function);
- * String digest2 = DigestID.generateHashString(clearTextID);
- * System.out.println("Digest1: '"+digest1+"'");
- * System.out.println("Digest2: '"+digest2+"'");
- * System.out.println("test1: "+DigestID.test(clearTextID, function,digest1));
- * System.out.println("test2: "+DigestID.test(clearTextID, digest2));
- * System.out.println("Digest1 != Digest2: "+DigestID.test(clearTextID, function,digest2));
- * </code><p>
- * <p/>
- * To use an algorythum other than SHA-1, you will need stronger encyption.
- * The BouncyCastle that comes with JXTA is just a minimum implimentation so
- * a good choice is  the normal bouncy castle (it is much larger, nearing a meg,
- * which is why it is not a part of the normal JXTA distribution. The full version
- * of bouncy includes SHA-128, SHA-256, SHA-384, and SHA-512.<p>
- * <p/>
- * Here is how you create a provider from the full version of Bouncy. Once you do this, you can access the extended
- * Digest ecryption levels.
- * <code>
- * provider = new org.bouncycastle.jce.provider.BouncyCastleProvider();
- * System.out.println("provider:"+provider.getName());
- * Security.addProvider(provider);
- * </code><p>
- * Security Note<p>
- * <p/>
- * This class should have all of its fields and properties marked as 'final' to prevent overriding the default behavior.
- * Failure to do so could allow a less scrupulous person to cause the BinaryID or hash codes to contain the original information.
- * Note that the class itself is not final to allow for additional convienience methods to be added. There
- * a no methods for creating ModuleClassBinaryID, ModuleSpecBinaryID, or CodatID because this is meant for general'
- * use, not for extending platform (you can write your own using similar code). <p>
- *
- * @author Daniel Brookshier <a HREF="mailto:turbogeek@cluck.com">turbogeek@cluck.com</a>
- * @version $Revision$
- */
-public class DigestTool {
-    private final static transient Logger LOG = Logger.getLogger(DigestTool.class.getName());
-
-    /**
-     * varaible used for conditional compile of debug printing.
-     */
-    public static final boolean debug = true;
-
-    /**
-     * Defualt SHA-1 digest algorithm type. This is a 20 byte hash function (note: that MD5 is only 16 so we don't use it).
-     */
-    public static final String SHAOne = "SHA-1";
-
-    /**
-     * SHA-128 digest algorithm type. This is a 128 bit hash function (note: must have another provider registered to use).
-     */
-    public static final String SHA128 = "SHA-128";
-
-    /**
-     * SHA-256 digest algorithm type. This is a 256 bit hash function (note: must have another provider registered to use).
-     */
-    public static final String SHA256 = "SHA-256";
-
-    /**
-     * SHA-384 digest algorithm type. This is a 384 bit hash function (note: must have another provider registered to use).
-     */
-    public static final String SHA384 = "SHA-384";
-
-    /**
-     * SHA-512 digest algorithm type. This is a 512 bit hash function (note: must have another provider registered to use).
-     */
-    public static final String SHA512 = "SHA-512";
-
-    /**
-     * Tilde character used to seperate candidate strings from a function.
-     */
-    public final String functionSeperator = "~";
-    String algorithmType;
-
-    public DigestTool() {
-        algorithmType = SHAOne;
-    }
-
-    public DigestTool(String algorithmType) {
-        this.algorithmType = algorithmType;
-    }
-
-    /**
-     * Create a PipeID based on the BinaryID type with a digest of the clearTextID and function.
-     *
-     * @param peerGroupID Parent peer group ID.
-     * @param clearTextID String used as the significant part of the address
-     * @param function    String used to diferentiate different clearTextID addresses (can be null).
-     * @return PipeBinaryID with the digest hash of the string: clearTextID+"~"+function.
-     */
-    public final PipeBinaryID createPipeID(net.jxta.peergroup.PeerGroupID peerGroupID, String clearTextID, String function) {
-        byte[] digest = generateHash(clearTextID, function);
-        PipeBinaryID pipe = new PipeBinaryID(peerGroupID, digest, false);
-
-        return pipe;
-    }
-
-    /**
-     * Create a PeerGroupID based on the BinaryID type with a digest of the clearTextID and function.
-     *
-     * @param parentPeerGroupID Parent peer group ID.
-     * @param clearTextID       String used as the significant part of the address
-     * @param function          String used to diferentiate different clearTextID addresses (can be null).
-     * @return PeerGroupBinaryID with the digest hash of the string: clearTextID+"~"+function.
-     */
-    public final PeerGroupBinaryID createPeerGroupID(net.jxta.peergroup.PeerGroupID parentPeerGroupID, String clearTextID, String function) {
-        byte[] digest = generateHash(clearTextID, function);
-        PeerGroupBinaryID peerGroupID = new PeerGroupBinaryID(parentPeerGroupID, digest, false);
-
-        return peerGroupID;
-    }
-
-    /**
-     * Create a PeerID based on the BinaryID type with a digest of the clearTextID and function.
-     *
-     * @param peerGroupID Parent peer group ID.
-     * @param clearTextID String used as the significant part of the address
-     * @param function    String used to diferentiate different clearTextID addresses (can be null).
-     * @return PeerBinaryID with the digest hash of the string: clearTextID+"~"+function.
-     */
-    public final PeerBinaryID createPeerID(net.jxta.peergroup.PeerGroupID peerGroupID, String clearTextID, String function) {
-        byte[] digest = generateHash(clearTextID, function);
-        PeerBinaryID peerID = new PeerBinaryID(peerGroupID, digest, false);
-
-        return peerID;
-    }
-
-    /**
-     * Creates a new instance of DigestPipe. Because this is a  utility,
-     * this is private to prevent construction.
-     */
-    
-    /**
-     * Generates a Base64 encoded string of an SHA-1 digest hash of the string: clearTextID.<p>
-     *
-     * @param clearTextID A string that is to be hashed. This can be any string used for hashing or hiding data.
-     * @return Base64 encoded string containing the hash of the string: clearTextID.
-     */
-    public final String generateHashString(String clearTextID) {
-        try {
-            java.io.StringWriter base64 = new java.io.StringWriter();
-            net.jxta.impl.util.BASE64OutputStream encode = new net.jxta.impl.util.BASE64OutputStream(base64);
-
-            encode.write(generateHash(clearTextID));
-            encode.close();
-
-            return base64.toString();
-        } catch (Exception failed) {
-            LOG.log(Level.SEVERE, "Unable to encode hash value.", failed);
-            throw new RuntimeException("Unable to encode hash value.");
-        }
-    }
-
-    /**
-     * Generates a Base64 encoded string of an SHA-1 digest hash of the string: clearTextID+"-"+function or: clearTextID if function was blank.<p>
-     *
-     * @param clearTextID A string that is to be hashed. This can be any string used for hashing or hiding data.
-     * @param function    A function related to the clearTextID string. This is used to create a hash associated with clearTextID so that it is a uique code.
-     * @return Base64 encoded string containing the hash of the string: clearTextID+"-"+function or clearTextID if function was blank.
-     */
-    public final String generateHashString(String clearTextID, String function) {
-        try {
-            java.io.StringWriter base64 = new java.io.StringWriter();
-            net.jxta.impl.util.BASE64OutputStream encode = new net.jxta.impl.util.BASE64OutputStream(base64);
-
-            encode.write(generateHash(clearTextID, function));
-            encode.close();
-
-            return base64.toString();
-        } catch (Exception failed) {
-            LOG.log(Level.SEVERE, "Unable to encode hash value.", failed);
-            throw new RuntimeException("Unable to encode hash value.");
-        }
-    }
-
-    /**
-     * Generates a SHA-1 digest hash of the string: clearTextID.<p>
-     *
-     * @param clearTextID A string that is to be hashed. This can be any string used for hashing or hiding data.
-     * @return String containing the hash of the string: clearTextID.
-     */
-    public final byte[] generateHash(String clearTextID) {
-        return generateHash(clearTextID, null);
-    }
-
-    /**
-     * Generates an SHA-1 digest hash of the string: clearTextID+"-"+function or: clearTextID if function was blank.<p>
-     * <p/>
-     * Note that the SHA-1 used only creates a 20 byte hash.<p>
-     *
-     * @param clearTextID A string that is to be hashed. This can be any string used for hashing or hiding data.
-     * @param function    A function related to the clearTextID string. This is used to create a hash associated with clearTextID so that it is a uique code.
-     * @return array of bytes containing the hash of the string: clearTextID+"-"+function or clearTextID if function was blank. Can return null if SHA-1 does not exist on platform.
-     */
-    public final byte[] generateHash(String clearTextID, String function) {
-        String id;
-
-        if (function == null) {
-            id = clearTextID;
-        } else {
-            id = clearTextID + functionSeperator + function;
-        }
-        byte[] buffer = id.getBytes();
-
-        MessageDigest algorithm;
-
-        try {
-            algorithm = MessageDigest.getInstance(algorithmType);
-        } catch (Exception e) {
-            LOG.log(Level.SEVERE, "Cannot load selected Digest Hash implementation", e);
-            return null;
-        }
-
-        // Generate the digest.
-        algorithm.reset();
-        algorithm.update(buffer);
-
-        try {
-            byte[] digest1 = algorithm.digest();
-
-            return digest1;
-        } catch (Exception de) {
-            LOG.log(Level.SEVERE, "Failed to creat a digest.", de);
-            return null;
-        }
-    }
-
-    /**
-     * Generates an SHA-1 digest hash of the string: clearTextID.<p>
-     *
-     * @param function    the function
-     * @param testHash    test hash
-     * @param clearTextID A string that is to be hashed. This can be any string used for hashing or hiding data.
-     * @return String containing the hash of the string: clearTextID.
-     */
-    public final boolean test(String clearTextID, String function, String testHash) {
-        String id = clearTextID + functionSeperator + function;
-
-        return test(id, testHash);
-
-    }
-
-    /**
-     * Compares a clear text code or ID with a candidate hash code.
-     * This is used to confirm that the clearTextID can be successfully converted to the hash.
-     *
-     * @param clearTextID A string that is to be hashed. This can be any string used for hashing or hiding data.
-     * @param testHash    A string of hashed string.
-     * @return true if the hash created from clearTextID is equal to the testHash string.Can return false if SHA-1 does not exist on platform.
-     */
-    public final boolean test(String clearTextID, String testHash) {
-
-        byte[] digest1 = generateHash(clearTextID);
-        byte[] digest2;
-
-        try {
-            java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream();
-            net.jxta.impl.util.BASE64InputStream decoder = new net.jxta.impl.util.BASE64InputStream(
-                    new java.io.StringReader(testHash));
-
-            while (true) {
-                int c = decoder.read();
-
-                if (-1 == c) {
-                    break;
-                }
-
-                bos.write(c);
-            }
-
-            digest2 = bos.toByteArray();
-        } catch (Exception e) {
-            LOG.log(Level.SEVERE, "Failed to create a digest.", e);
-            return false;
-        }
-
-        if (digest1.length != digest2.length) {
-            // Not a match! because of length.
-            return false;
-        }
-
-        for (int i = 0; i < digest1.length; i++) {
-            if (digest1[i] != digest2[i]) {
-                // Not a match because of byte:"+i+" did not match
-                return false;
-            }
-        }
-
-        // Match was ok
-        return true;
-    }
-
-    /**
-     * Compares a clear text code or ID with a candidate hash code.
-     * This is used to confirm that the clearTextID can be successfully converted to the hash.
-     *
-     * @param clearTextID A string that is to be hashed. This can be any string used for hashing or hiding data.
-     * @param testHash    A string of hashed string.
-     * @return true if the hash created from clearTextID is equal to the testHash string.Can return false if SHA-1 does not exist on platform.
-     */
-    public final boolean test(String clearTextID, byte[] testHash) {
-
-        byte[] digest1 = generateHash(clearTextID);
-
-        if (digest1.length != testHash.length) {
-            // Not a match! because of length.
-            return false;
-        }
-
-        for (int i = 0; i < testHash.length; i++) {
-            if (digest1[i] != testHash[i]) {
-                // Not a match because of byte:"+i+" did not match
-                return false;
-            }
-        }
-
-        // Match was ok
-        return true;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/IDFormat.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/IDFormat.java
deleted file mode 100644 (file)
index 480115d..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.binaryID;
-
-
-import java.util.logging.Logger;
-
-
-/**
- * The 'BinaryID' format is a general purpose JXTA ID Format. It implements all of
- * the six standard ID types. It was originally created for the Java 2 SE
- * reference implementation. The 'BinaryID' format uses randomly generated BinaryIDs
- * as the mechanism for generating canonical values for the ids it provides.
- *
- * @author Daniel Brookshier <a HREF="mailto:turbogeek@cluck.com">turbogeek@cluck.com</a>
- */
-public class IDFormat {
-
-    /**
-     * LOG4J Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(IDFormat.class.getName());
-
-    /**
-     * This table maps our local private versions of the well known ids to the
-     * globally known version.
-     */
-
-    final static Object[][] wellKnownIDs = {
-        { net.jxta.peergroup.PeerGroupID.worldPeerGroupID, net.jxta.impl.id.UUID.IDFormat.worldPeerGroupID}
-                ,
-        { net.jxta.peergroup.PeerGroupID.defaultNetPeerGroupID, net.jxta.impl.id.UUID.IDFormat.defaultNetPeerGroupID}
-    };
-
-    /**
-     * The instantiator for this ID Format which is used by the IDFactory.
-     */
-    public static final net.jxta.impl.id.binaryID.Instantiator INSTANTIATOR = new net.jxta.impl.id.binaryID.Instantiator();
-
-    /**
-     * Private Constructor. This class cannot be instantiated.
-     */
-    private IDFormat() {}
-
-    /**
-     * Translate from well known ID to our locally encoded versions.
-     *
-     * @param input the id to be translated.
-     * @return the translated ID or the input ID if no translation was needed.
-     */
-
-    static net.jxta.id.ID translateFromWellKnown(net.jxta.id.ID input) {
-        for (int eachWellKnown = 0; eachWellKnown < wellKnownIDs.length; eachWellKnown++) {
-            net.jxta.id.ID aWellKnown = (net.jxta.id.ID) wellKnownIDs[eachWellKnown][0];
-
-            if (aWellKnown.equals(input)) {
-                return (net.jxta.id.ID) wellKnownIDs[eachWellKnown][1];
-            }
-        }
-
-        return input;
-    }
-
-    /**
-     * Translate from locally encoded versions to the well known versions.
-     *
-     * @param input the id to be translated.
-     * @return the translated ID or the input ID if no translation was needed.
-     */
-
-    static net.jxta.id.ID translateToWellKnown(net.jxta.id.ID input) {
-        for (int eachWellKnown = 0; eachWellKnown < wellKnownIDs.length; eachWellKnown++) {
-            net.jxta.id.ID aLocalEncoding = (net.jxta.id.ID) wellKnownIDs[eachWellKnown][1];
-
-            if (aLocalEncoding.equals(input)) {
-                return (net.jxta.id.ID) wellKnownIDs[eachWellKnown][0];
-            }
-        }
-
-        return input;
-    }
-
-    /**
-     * Utility method used to strip only the most significant peer group ID.
-     * This prevents us from continiously appending grandparents to each child.
-     * <p/>
-     * <p/>
-     * This method is used in PipeID and PeerID.
-     * </p>
-     *
-     * @param peerGroupID Peer group ID to pull the child from.
-     * @return Child of the peer group.
-     */
-    public static String childGroup(net.jxta.peergroup.PeerGroupID peerGroupID) {
-        String parentStr = (String) peerGroupID.getUniqueValue();
-        // Child is the first ID
-        int first = parentStr.indexOf('.');
-        String child = null;
-
-        if (first != -1) {
-            child = parentStr.substring(0, first);
-
-        } else {
-            child = parentStr;
-        }
-        return child;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/Instantiator.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/Instantiator.java
deleted file mode 100644 (file)
index f493467..0000000
+++ /dev/null
@@ -1,395 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.binaryID;
-
-
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URL;
-import java.security.SecureRandom;
-import java.util.Random;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URISyntaxException;
-import java.net.UnknownServiceException;
-
-import net.jxta.peergroup.PeerGroupID;
-
-
-/**
- * ID Factory for the binary ID type. All identifiers in this type are prefixed by "binaryid".
- *
- * @author Daniel Brookshier <a HREF="mailto:turbogeek@cluck.com">turbogeek@cluck.com</a>
- */
-
-public final class Instantiator implements net.jxta.id.IDFactory.URIInstantiator {
-
-    /**
-     * LOG object for this class.
-     */
-    private final static transient Logger LOG = Logger.getLogger(Instantiator.class.getName());
-    /**
-     * Our ID Format
-     */
-    final static String BinaryIDEncoded = "binaryid";
-
-    /**
-     * Random generator used for ID creation where a seed (idValue) is not provided.
-     */
-    private static final Random randNumGenerator = new SecureRandom();
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getSupportedIDFormat() {
-        return BinaryIDEncoded;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.id.ID fromURL(URL source) throws MalformedURLException, UnknownServiceException {
-
-        // check the protocol
-        if (!net.jxta.id.ID.URIEncodingName.equalsIgnoreCase(source.getProtocol())) {
-            throw new UnknownServiceException("URI protocol type was not as expected.");
-        }
-
-        String encoded = source.getFile();
-
-        int colonAt = encoded.indexOf(':');
-
-        // There's a colon right?
-        if (-1 == colonAt) {
-            throw new UnknownServiceException("URN namespace was missing.");
-        }
-
-        // check the namespace
-        if (!net.jxta.id.ID.URNNamespace.equalsIgnoreCase(encoded.substring(0, colonAt))) {
-            throw new UnknownServiceException("URN namespace was not as expected.");
-        }
-
-        // skip the namespace portion and the colon
-        encoded = encoded.substring(colonAt + 1);
-
-        try {
-            return fromURNNamespaceSpecificPart(encoded);
-        } catch (URISyntaxException failed) {
-            MalformedURLException failure = new MalformedURLException("Failure parsing URL");
-
-            failure.initCause(failed);
-            
-            throw failure;
-        }
-    }
-        
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.id.ID fromURI(URI source) throws URISyntaxException {
-        
-        // check the protocol
-        if (!net.jxta.id.ID.URIEncodingName.equalsIgnoreCase(source.getScheme())) {
-            throw new URISyntaxException(source.toString(), "URI scheme was not as expected.");
-        }
-        
-        String decoded = source.getSchemeSpecificPart();
-        
-        int colonAt = decoded.indexOf(':');
-        
-        // There's a colon right?
-        if (-1 == colonAt) {
-            throw new URISyntaxException(source.toString(), "URN namespace was missing.");
-        }
-        
-        // check the namespace
-        if (!net.jxta.id.ID.URNNamespace.equalsIgnoreCase(decoded.substring(0, colonAt))) {
-            throw new URISyntaxException(source.toString()
-                    ,
-                    "URN namespace was not as expected. (" + net.jxta.id.ID.URNNamespace + "!=" + decoded.substring(0, colonAt)
-                    + ")");
-        }
-        
-        // skip the namespace portion and the colon
-        decoded = decoded.substring(colonAt + 1);
-        
-        return fromURNNamespaceSpecificPart(decoded);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.id.ID fromURNNamespaceSpecificPart(String encoded) throws URISyntaxException {
-        int dashAt = encoded.indexOf('-');
-
-        // there's a dash, right?
-        if (-1 == dashAt) {
-            throw new URISyntaxException(encoded, "URN Encodingtype was missing.");
-        }
-
-        if (!encoded.substring(0, dashAt).equals(BinaryIDEncoded)) {
-            throw new URISyntaxException(encoded
-                    ,
-                    "JXTA id format was not as expected. Should have been BinaryIDEncoded found:" + encoded.substring(0, dashAt));
-        }
-
-        // skip the dash
-        encoded = encoded.substring(dashAt + 1);
-        // check that the length is long enough
-        if (encoded.length() < 1) {
-            throw new URISyntaxException(encoded, "URN does not contain enough chars. Must have at least one byte");
-        }
-        BinaryID id = new BinaryID(encoded);
-        net.jxta.id.ID result = null;
-
-        switch (id.type()) {
-
-        case BinaryID.flagCodatID:
-            result = new CodatBinaryID(encoded);
-            break;
-
-        case BinaryID.flagPeerGroupID:
-            result = new PeerGroupBinaryID(encoded);
-            if (PeerGroupID.worldPeerGroupID.equals(result)) {
-                result = net.jxta.peergroup.PeerGroupID.worldPeerGroupID;
-            }
-            break;
-
-        case BinaryID.flagPeerID:
-            result = new PeerBinaryID(encoded);
-            break;
-
-        case BinaryID.flagPipeID:
-            result = new PipeBinaryID(encoded);
-            break;
-
-        case BinaryID.flagModuleClassID:
-            result = new ModuleClassBinaryID(encoded);
-            break;
-
-        case BinaryID.flagModuleSpecID:
-            result = new ModuleSpecBinaryID(encoded);
-            break;
-
-        default:
-            throw new URISyntaxException(encoded, "jxta ID type not recognized");
-        }
-
-        return result;
-    }
-
-    /**
-     * Utility to create a random array of bits to be used when a random value is required.
-     */
-    private byte[] randomID() {
-        byte[] randBuf16 = new byte[16];
-
-        randNumGenerator.nextBytes(randBuf16);
-
-        return randBuf16;
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * @throws UnsupportedOperationException This form is not supported. Use CODAT from UUID package instead.
-     */
-    public net.jxta.codat.CodatID newCodatID(final net.jxta.peergroup.PeerGroupID groupID) {
-        PeerGroupID parentGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(groupID);
-
-        return new net.jxta.impl.id.binaryID.CodatBinaryID(parentGroupID, randomID(), false);
-        // throw new UnsupportedOperationException("This form is not supported. Use CODAT from UUID package instead.");
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * @throws UnsupportedOperationException This form is not supported. Use CODAT from UUID package instead.
-     */
-    public net.jxta.codat.CodatID newCodatID(final net.jxta.peergroup.PeerGroupID groupID, byte[] seed) {
-        PeerGroupID parentGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(groupID);
-
-        return new net.jxta.impl.id.binaryID.CodatBinaryID(parentGroupID, seed, false);
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * @throws UnsupportedOperationException This form is not supported. Use CODAT from UUID package instead.
-     */
-    public net.jxta.codat.CodatID newCodatID(final net.jxta.peergroup.PeerGroupID groupID, InputStream in) throws IOException {
-        PeerGroupID parentGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(groupID);
-
-        return new net.jxta.impl.id.binaryID.CodatBinaryID(parentGroupID, randomID(), false);
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * @throws UnsupportedOperationException This form is not supported. Use CODAT from UUID package instead.
-     */
-    public net.jxta.codat.CodatID newCodatID(final net.jxta.peergroup.PeerGroupID groupID, byte[] idValue, InputStream in) throws IOException {
-        PeerGroupID parentGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(groupID);
-
-        return new net.jxta.impl.id.binaryID.CodatBinaryID(parentGroupID, idValue, false);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.peer.PeerID newPeerID(final net.jxta.peergroup.PeerGroupID groupID) {
-        LOG.log(Level.SEVERE, "random peer created", new RuntimeException());
-        PeerGroupID parentGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(groupID);
-
-        return new net.jxta.impl.id.binaryID.PeerBinaryID(parentGroupID, randomID(), false);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.peer.PeerID newPeerID(final net.jxta.peergroup.PeerGroupID groupID, byte[] idValue) {
-        PeerGroupID parentGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(groupID);
-
-        return new net.jxta.impl.id.binaryID.PeerBinaryID(parentGroupID, idValue, false);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.peergroup.PeerGroupID newPeerGroupID() {
-        return net.jxta.id.IDFactory.newPeerGroupID(randomID());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.peergroup.PeerGroupID newPeerGroupID(byte[] idValue) {
-        return new PeerGroupBinaryID(idValue, false);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.peergroup.PeerGroupID newPeerGroupID(net.jxta.peergroup.PeerGroupID parent) {
-        LOG.log(Level.SEVERE, "random peergroup created", new RuntimeException());
-        PeerGroupID parentGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(parent);
-
-        return net.jxta.id.IDFactory.newPeerGroupID(parentGroupID, randomID());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.peergroup.PeerGroupID newPeerGroupID(net.jxta.peergroup.PeerGroupID parent, byte[] idValue) {
-        PeerGroupID parentGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(parent);
-
-        return new PeerGroupBinaryID(parentGroupID, idValue, false);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.pipe.PipeID newPipeID(final net.jxta.peergroup.PeerGroupID groupID) {
-        PeerGroupID parentGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(groupID);
-
-        return net.jxta.id.IDFactory.newPipeID(parentGroupID, randomID());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.pipe.PipeID newPipeID(final net.jxta.peergroup.PeerGroupID groupID, byte[] idValue) {
-        PeerGroupID peerGroupID = (PeerGroupID) IDFormat.translateFromWellKnown(groupID);
-
-        return new PipeBinaryID(peerGroupID, idValue, false);
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * @throws UnsupportedOperationException This form is not supported because a binary ID is meant to be created with a random ID.
-     */
-    public net.jxta.platform.ModuleClassID newModuleClassID() {
-        throw new UnsupportedOperationException(
-                "This form is not supported because a binary ID is meant to be created with a random ID. Use UUID package instead.");
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * @throws UnsupportedOperationException This form is not supported because a binary ID is meant to be created with a random ID.
-     */
-    public net.jxta.platform.ModuleClassID newModuleClassID(final net.jxta.platform.ModuleClassID classID) {
-        throw new UnsupportedOperationException(
-                "This form is not supported because a binary ID is meant to be created with a random ID. Use UUID package instead.");
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * @throws UnsupportedOperationException This form is not supported because a binary ID is meant to be created with a random ID. Use UUID instead.
-     */
-    public net.jxta.platform.ModuleSpecID newModuleSpecID(final net.jxta.platform.ModuleClassID classID) {
-        throw new UnsupportedOperationException(
-                "This form is not supported because a binary ID is meant to be created with a random ID. Use UUID package instead.");
-    }
-
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/ModuleClassBinaryID.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/ModuleClassBinaryID.java
deleted file mode 100644 (file)
index 596e83d..0000000
+++ /dev/null
@@ -1,326 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.binaryID;
-
-
-import net.jxta.peergroup.PeerGroupID;
-import java.util.logging.Logger;
-import net.jxta.id.ID;
-
-
-/**
- * This interface defines a Module Class Identifier.
- * A ModuleClassID uniquely identifies a particular local behaviour, that is,
- * a specific API for each execution environment for which an implementation
- * exists.
- * <p/>
- * <p/>
- * A ModuleClassID has two components: A base class identifier, and a role identifier.
- * The role identifier may be zero. By convention the API uses the ModuleClassID with
- * a zero role identifier to designate the base class in contexts where only the base class
- * is significant. Nonetheless, a ModuleClassID with a zero role identifier is a valid
- * ModulesClassID wherever a full ModuleClassID is expected. In many cases, only one role
- * in a given class is ever used. Using role zero in such cases is an optimization because
- * it may make the string representation of the ModuleClassID shorter.
- * <p/>
- * <p/>
- * Each service of a group, that is, the role it plays in the group, is uniquely identified
- * per the group definition.
- * This identifier may be used by other modules in the group to designate this one, or by the service
- * itself to identify its parameters in a PeerAdvertisement. In addition, by combining its
- * PeerGroupID with its own ModuleClassID, a service may create a predictible identifier unique
- * on their peer, suitable for registering listeners with the EndpointService or other services
- * with similar listener interfaces.
- * <p/>
- * <p/>
- * The standard PeerGroup implementation of the java reference implementation
- * assigns to each service its ModuleClassID as its unique service identifier. Most of the
- * times this ModuleClassID is a base classID, but groups that use the same Module Class
- * for more than one service (same behaviour but playing a different role in the group, such
- * as, for example, a data base engine with a different data base), may define multiple roles
- * identified by the same base class identifier but different role identifiers. The standard
- * PeerGroup implementation of the java reference implementation has the notion of main
- * application: a default application which may be started automatically upon instantiating
- * the group. This application implements Module and, therefore, is assigned a ModuleClassID.
- * However applications are not expected to play any specific role in the group. As a result, they
- * are assigned a role identifier allocated at run-time as need to garantee local unicity. As
- * a result main applications cannot expect a predictible ClassID.
- * <p/>
- * <p/>
- * A ModuleClassID is optionaly described by a published ModuleClassAdvertisement.
- * <p/>
- * <p/>
- * There may be any number of embodiements of a module class. These are module
- * specifications. A module specification represent the network behaviour of a
- * module while its class represents its local behaviour. Different groups
- * may use a common subset of classes, for example, the basic set defined by the platform
- * should always be part of it. Each group may use different and network-incompatible
- * specifications for common classes, optimized for various purposes. The local API of a
- * given class on a given JXTA implementation will be invariant per the spec being used.
- * Therefore, the difference will be transparent to applications which do not depend
- * on the possibly different quality of service.
- * <p/>
- * <p/>
- * A ModuleSpecID embeds a base class identifier, which permits to verify that
- * a given Module specification is suitable for its intended use.
- *
- * @author Daniel Brookshier <a HREF="mailto:turbogeek@cluck.com">turbogeek@cluck.com</a>
- * @see net.jxta.peergroup.PeerGroup
- * @see net.jxta.platform.Module
- * @see net.jxta.platform.ModuleClassID
- * @see net.jxta.protocol.PeerAdvertisement
- * @see net.jxta.protocol.ModuleSpecAdvertisement
- * @see net.jxta.protocol.ModuleClassAdvertisement
- * @see net.jxta.endpoint.EndpointService
- * @see net.jxta.id.ID
- */
-
-public final class ModuleClassBinaryID extends net.jxta.platform.ModuleClassID {
-
-    /**
-     * Log4J categorgy
-     */
-    private final static transient Logger LOG = Logger.getLogger(ModuleClassBinaryID.class.getName());
-
-    /**
-     * The id data
-     */
-    protected BinaryID classID;
-    protected BinaryID parentClassID;
-    protected BinaryID roleID;
-    protected PeerGroupID peerGroupID;
-
-    /**
-     * Constructor.
-     * Intializes contents from provided ID.
-     *
-     * @param id the ID data
-     * @since JXTA  1.0
-     */
-    protected ModuleClassBinaryID(String id) {
-        super();
-        int start = id.indexOf('-');
-        int parent = id.indexOf(start + 1, '-');
-        int role = id.indexOf(id.indexOf(parent + 1, '-') + 1, '-');
-        int group = id.indexOf(id.indexOf(role + 1, '-') + 1, '-');
-
-        classID = new BinaryID(id.substring(group + 1, parent));
-        parentClassID = new BinaryID(id.substring(parent + 1, role));
-        roleID = new BinaryID(id.substring(role + 1, group));
-        peerGroupID = new PeerGroupBinaryID(new BinaryID(id.substring(group + 1)));
-    }
-
-    /**
-     * Constructor.
-     * Creates a ModuleClassID in a given class, with a given class unique id.
-     * A BinaryID of a class and another BinaryID are provided.
-     *
-     * @param parentClassID the class to which this will belong.
-     * @param roleID        the unique id of this role in that class.
-     * @param peerGroupID   the peer group ID
-     * @param classID       the class ID
-     */
-    protected ModuleClassBinaryID(BinaryID classID, BinaryID parentClassID, BinaryID roleID, PeerGroupID peerGroupID) {
-        super();
-        this.classID = classID;
-        this.parentClassID = parentClassID;
-        this.roleID = roleID;
-        this.peerGroupID = peerGroupID;
-    }
-
-    protected ModuleClassBinaryID(BinaryID classID, BinaryID parentClassID, BinaryID roleID, BinaryID peerGroupID) {
-        super();
-        this.classID = classID;
-        this.parentClassID = parentClassID;
-        this.roleID = roleID;
-        this.peerGroupID = new PeerGroupBinaryID(peerGroupID);
-    }
-
-    /**
-     * Constructor for creating a new ModuleClassID. A new class BinaryID is
-     * created. The role ID is left null. This is the only way to create
-     * a new class without supplying a new BinaryID explicitly.
-     * To create a new role in an existing class, one must use one of
-     * the other constructors.
-     * Note that a null role is just as valid as any other, it just has a
-     * shorter string representation. So it is not mandatory to create a new
-     * role in a new class.
-     *
-     * @since JXTA 1.0
-     */
-    public ModuleClassBinaryID() {
-        this(new BinaryID(BinaryID.flagModuleClassID), new BinaryID(BinaryID.flagModuleClassID)
-                ,
-                new BinaryID(BinaryID.flagModuleClassRoleID), new BinaryID(BinaryID.flagPeerGroupID));
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        } 
-        
-        if (!(target instanceof ModuleClassBinaryID)) {
-            return false;
-        }
-        
-        ModuleClassBinaryID targetObj = (ModuleClassBinaryID) target;
-        
-        return this.classID.equals(targetObj.getClassID()) && this.parentClassID.equals(targetObj.getBaseClass())
-                && this.roleID.equals(targetObj.getRoleID()) && this.peerGroupID.equals(targetObj.getPeerGroupID());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        return getUniqueValue().hashCode();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getIDFormat() {
-        return IDFormat.INSTANTIATOR.getSupportedIDFormat();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Object getUniqueValue() {
-        return getIDFormat() + "-" + classID.getID() + "-" + parentClassID.getID() + "-" + roleID.getID() + "-"
-                + peerGroupID.getUniqueValue();
-    }
-
-    /**
-     * Returns the peer group ID
-     *
-     * @return the peer group ID
-     */
-    public net.jxta.id.ID getPeerGroupID() {
-        return peerGroupID;
-    }
-
-    /**
-     * returns the coded ID without the binaryid tag.
-     *
-     * @return string of the contents
-     */
-    protected String getID() {
-        return classID.getID() + "*" + parentClassID.getID() + "*" + roleID.getID() + "*" + peerGroupID.getUniqueValue();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public net.jxta.platform.ModuleClassID getBaseClass() {
-        return new ModuleClassBinaryID(parentClassID, new BinaryID(), new BinaryID(), new BinaryID());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean isOfSameBaseClass(net.jxta.platform.ModuleClassID classId) {
-        return getClass().equals(((ModuleClassBinaryID) classId).getClass());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean isOfSameBaseClass(net.jxta.platform.ModuleSpecID specId) {
-        return getBaseClassID().equals(((ModuleSpecBinaryID) specId).getBaseClassID());
-    }
-
-    /**
-     * get the class' unique id
-     *
-     * @return BinaryID module class' unique id
-     * @since JXTA 1.0
-     */
-    public BinaryID getClassID() {
-        return classID;
-    }
-
-    /**
-     * get the role unique id
-     *
-     * @return Module role unique id.
-     * @since JXTA 1.0
-     */
-    public BinaryID getRoleID() {
-        return roleID;
-    }
-
-    /**
-     * Getter for property parentClassID.
-     *
-     * @return Value of property parentClassID.
-     */
-    public BinaryID getBaseClassID() {
-        return parentClassID;
-    }
-
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/ModuleSpecBinaryID.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/ModuleSpecBinaryID.java
deleted file mode 100644 (file)
index ca1f210..0000000
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.binaryID;
-
-
-import java.util.logging.Logger;
-
-
-/**
- * A ModuleSpecID uniquely identifies a particular network behaviour
- * (wire protocol and choregraphy) that may be embodied by a Jxta Module.
- * There may be any number of implementations of a given SpecID. All
- * such implementations are assumed to be network compatible.
- * <p/>
- * <p/>
- * The Specification that corresponds to a given ModuleSpecID may be published
- * in a ModuleSpecAdvertisement. This advertisement is uniquely identified by
- * the ModuleSpecID that it describes.
- * <p/>
- * <p/>
- * The various implementations of a given SpecID may be published in
- * ModuleImplAdvertisements. These advertisements are identified by the
- * ModuleSpecID that they implement and a compatibility statement.
- * ModuleImplAdvertisements baring the same SpecID and compatibility statement
- * are theorethicaly interchangeable. However they may be subsequently discriminated
- * by a Description element.
- * <p/>
- * <p/>
- * A ModuleSpecID embeds a ModuleClassID which uniquely identifies a base Module
- * class. A base module class defines a local behaviour and one API per compatible
- * JXTA implementation.
- * <p/>
- * <p/>
- * A ModuleSpecID therefore uniquely identifies an abstract module, of which an
- * implementation compatible with the local JXTA implementation may be located and
- * instantiated.
- * <p/>
- * <p/>
- * In the standard PeerGroup implementation of the java reference implementation
- * the various services are specified as a list of ModuleSpecID, for each of which
- * the group locates and loads an implementation as part of the group's
- * initialization.
- *
- * @author Daniel Brookshier <a HREF="mailto:turbogeek@cluck.com">turbogeek@cluck.com</a>
- * @see net.jxta.peergroup.PeerGroup
- * @see net.jxta.platform.Module
- * @see net.jxta.platform.ModuleClassID
- * @see net.jxta.protocol.ModuleSpecAdvertisement
- * @see net.jxta.protocol.ModuleImplAdvertisement
- * @see net.jxta.id.ID
- * @see net.jxta.document.Advertisement
- */
-
-public final class ModuleSpecBinaryID extends net.jxta.platform.ModuleSpecID {
-
-    /**
-     * Log4J categorgy
-     */
-    private final static transient Logger LOG = Logger.getLogger(ModuleSpecBinaryID.class.getName());
-
-    protected BinaryID classID;
-    protected BinaryID baseClassID;
-    protected BinaryID specID;
-
-    /**
-     * Constructor. Used only internally.
-     *
-     * @since JXTA  1.0
-     */
-    protected ModuleSpecBinaryID() {
-        super();
-        specID = new BinaryID(BinaryID.flagModuleSpecID);
-        classID = new BinaryID(BinaryID.flagModuleClassID);
-        baseClassID = new BinaryID(BinaryID.flagModuleClassID);
-    }
-
-    ;
-
-    /**
-     * Constructor.
-     * Intializes contents from provided ID.
-     *
-     * @param id the ID data
-     * @since JXTA  1.0
-     */
-    protected ModuleSpecBinaryID(String id) {
-        super();
-        int start = id.indexOf('-');
-        int parent = id.indexOf(start + 1, '-');
-        int spec = id.indexOf(id.indexOf(parent + 1, '-') + 1, '-');
-
-        classID = new BinaryID(id.substring(start + 1, parent));
-        baseClassID = new BinaryID(id.substring(parent + 1, spec));
-        specID = new BinaryID(id.substring(parent + 1));
-    }
-
-    /**
-     * Constructor.
-     * Creates a ModuleSpecID in a given class, with a given class unique id.
-     * A BinaryID of a class and another BinaryID are provided.
-     *
-     * @param classID     the class to which this will belong.
-     * @param baseClassID the unique id of this spec in that class.
-     * @param specID      the spec ID
-     */
-    protected ModuleSpecBinaryID(BinaryID classID, BinaryID baseClassID, BinaryID specID) {
-        this.classID = classID;
-        this.baseClassID = baseClassID;
-        this.specID = specID;
-    }
-
-    /*
-     * Official constructors. No mention of BinaryID.
-     */
-
-    /**
-     * Creates a new ModuleSpecID in a given class. A ModuleClassID is
-     * provided. A new SpecID in that class is created.
-     *
-     * @since JXTA  1.0
-     *
-     * @param classID    the class to which this will belong.
-     */
-    
-    /*
-     public ModuleSpecID( net.jxta.platform.ModuleClassID moduleClassID ) {
-     this.classID = moduleClassID.getClassID();
-     this.baseClassID = getBaseClassID();
-     this.specID = getSpecID();
-     }
-     */
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        }
-        
-        if (!(target instanceof ModuleSpecBinaryID)) {
-            return false;
-        }
-        
-        ModuleSpecBinaryID targetObj = (ModuleSpecBinaryID) target;
-        
-        return classID.equals(targetObj.getClassID()) && baseClassID.equals(targetObj.getBaseClassID())
-                && specID.equals(targetObj.getSpecID());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        return getUniqueValue().hashCode();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getIDFormat() {
-        return IDFormat.INSTANTIATOR.getSupportedIDFormat();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Object getUniqueValue() {
-        return getIDFormat() + "-" + classID + "-" + baseClassID + "_" + specID;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public net.jxta.platform.ModuleClassID getBaseClass() {
-        return new ModuleClassBinaryID(baseClassID, new BinaryID(BinaryID.flagModuleClassID)
-                ,
-                new BinaryID(BinaryID.flagModuleSpecID), new BinaryID(BinaryID.flagModuleSpecID));
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean isOfSameBaseClass(net.jxta.platform.ModuleClassID classId) {
-        return baseClassID.equals(classId.getBaseClass());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean isOfSameBaseClass(net.jxta.platform.ModuleSpecID specId) {
-        return getClassID().equals(((ModuleSpecBinaryID) specId).getClassID());
-    }
-
-    /**
-     * Getter for property classID.
-     *
-     * @return Value of property classID.
-     */
-    public net.jxta.impl.id.binaryID.BinaryID getClassID() {
-        return classID;
-    }
-
-    /**
-     * Getter for property baseClassID.
-     *
-     * @return Value of property baseClassID.
-     */
-    public net.jxta.impl.id.binaryID.BinaryID getBaseClassID() {
-        return baseClassID;
-    }
-
-    /**
-     * Getter for property specID.
-     *
-     * @return Value of property specID.
-     */
-    public net.jxta.impl.id.binaryID.BinaryID getSpecID() {
-        return specID;
-    }
-
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/PeerBinaryID.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/PeerBinaryID.java
deleted file mode 100644 (file)
index 39dcc8c..0000000
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.id.binaryID;
-
-
-import java.net.URI;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-import net.jxta.id.ID;
-
-
-/**
- * This class implements a PeerID. Each peer is assigned a unique peer id.UUID
- * id are used to implement peer id.
- *
- * @see net.jxta.impl.id.UUID.UUID
- * @see net.jxta.impl.id.UUID.UUIDFactory
- */
-public final class PeerBinaryID extends net.jxta.peer.PeerID {
-
-    /**
-     * LOG object form this class
-     */
-    private final static transient Logger LOG = Logger.getLogger(PeerBinaryID.class.getName());
-
-    /**
-     * This is the id string used in the XML of the id. The format is TX0..Xn where T is the type and X0 through Xn are the base64 encoded id.
-     */
-    private String id;
-
-    /**
-     * Constructor. Used only internally.
-     */
-    private PeerBinaryID() {
-        super();
-    }
-
-    /**
-     * Creates a ID from a string. Note that the ID is not currently validated.
-     *
-     * @param id Value of ID.
-     */
-
-    protected PeerBinaryID(String id) {
-        super();
-        this.id = id;
-
-    }
-
-    /**
-     * Creates a new PeerID object.
-     *
-     * @param binaryID binary id to build the peerID from.
-     */
-    public PeerBinaryID(BinaryID binaryID) {
-        id = binaryID.getID();
-    }
-
-    /**
-     * Constructor. Creates a PeerID. A PeerGroupID and BinaryID is provided. If
-     * the  binary ID is not a pipe ID, the construcion will throw a  runtime
-     * exception.<p>
-     * <p/>
-     * Note that only the ID for the parent is obtained and not the
-     * parent and the grandparent.
-     *
-     * @param parent         the group to which this will belong.
-     * @param data           data byte array to be used as the id.
-     * @param lengthIncluded If true, the first byte in the data array is the length of the remaining bytes.
-     */
-    public PeerBinaryID(net.jxta.peergroup.PeerGroupID parent, byte[] data, boolean lengthIncluded) {
-        this();
-
-        String parentStr = IDFormat.childGroup(parent);
-
-        id = BinaryIDFactory.newBinaryID(BinaryID.flagPeerID, data, lengthIncluded).getID() + "." + parentStr.replace('-', '.');
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        }
-        
-        return target instanceof PeerBinaryID && getUniqueValue().equals(((PeerBinaryID) target).getUniqueValue());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        return getUniqueValue().hashCode();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getIDFormat() {
-        return IDFormat.INSTANTIATOR.getSupportedIDFormat();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Object getUniqueValue() {
-        if (null == id) { 
-            return ID.nullID.getUniqueValue();
-        }
-
-        return new StringBuilder().append(getIDFormat()).append("-").append(id).toString();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public net.jxta.id.ID getPeerGroupID() {
-        try {
-            if (id == null) {
-                return net.jxta.id.ID.nullID;
-            }
-            String idd = id;
-            int parentStart = idd.indexOf('.');
-
-            if (parentStart != -1) {
-                idd = idd.substring(parentStart + 1);
-            } else {
-                return null;
-            }
-
-            URI url = new URI("urn:jxta:" + idd.replace('.', '-'));
-            net.jxta.peergroup.PeerGroupID peerGroupID = (net.jxta.peergroup.PeerGroupID) net.jxta.id.IDFactory.fromURI(url);
-
-            return peerGroupID;
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("cannot convert sub group. ID value = " + id);
-            }
-            return null;
-
-        }
-    }
-
-    /**
-     * returns the coded ID without the binaryid tag.
-     *
-     * @return The raw ID.
-     */
-    protected String getID() {
-        return id;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/PeerGroupBinaryID.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/PeerGroupBinaryID.java
deleted file mode 100644 (file)
index 59477bd..0000000
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.id.binaryID;
-
-
-import java.net.URI;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-import net.jxta.id.ID;
-
-
-/**
- * This class implements a PeerGroup ID. Each peer group is assigned a unique
- * peer id.BinaryID id are used to implement peer group id. Because this id is
- * built with BinaryID, pulling the parent group requires a little work. The
- * parent group is the first id, with the second following, separated by a
- * dash '-' character.<p>
- *
- * @author Daniel Brookshier <a HREF="mailto:turbogeek@cluck.com">turbogeek@cluck.com</a>
- * @see net.jxta.id.ID
- * @see net.jxta.id.IDFactory
- * @see net.jxta.peergroup.PeerGroupID
- */
-public final class PeerGroupBinaryID extends net.jxta.peergroup.PeerGroupID {
-
-    /**
-     * LOG object for this class.
-     */
-    private final static transient Logger LOG = Logger.getLogger(PeerGroupBinaryID.class.getName());
-
-    /**
-     * This is the id string used in the XML of the id. The format is TX0..Xn where T is the type and X0 through Xn are the base64 encoded id.
-     */
-    protected String id;
-
-    /**
-     * Constructor for creating a new PeerGroupID with a unique ID and a parent.<p>
-     * <p/>
-     * Note that only the ID for the parent is obtained and not the
-     * parent and the grandparent.
-     *
-     * @param parent         Parent peer group.
-     * @param data           data byte array to be used as the id.
-     * @param lengthIncluded If true, the first byte in the data array is the length of the remaining bytes.
-     */
-    public PeerGroupBinaryID(net.jxta.peergroup.PeerGroupID parent, byte[] data, boolean lengthIncluded) {
-        this();
-
-        String parentStr = IDFormat.childGroup(parent);
-
-        if (parentStr != null) {
-            id = BinaryIDFactory.newBinaryID(BinaryID.flagPeerGroupID, data, lengthIncluded).getID() + "."
-                    + parentStr.replace('-', '.');
-        } else {
-            id = BinaryIDFactory.newBinaryID(BinaryID.flagPeerGroupID, data, lengthIncluded).getID();
-        }
-    }
-
-    /**
-     * Creates a ID from a string. Note that the ID is not currently validated.
-     *
-     * @param id Value of ID.
-     */
-
-    protected PeerGroupBinaryID(String id) {
-        super();
-        this.id = id;
-    }
-
-    /**
-     * Constructor for creating a new PeerGroupID with a unique ID and a parent.
-     *
-     * @param data           DOCUMENT ME!
-     * @param lengthIncluded DOCUMENT ME!
-     */
-    public PeerGroupBinaryID(byte[] data, boolean lengthIncluded) {
-        this();
-        id = BinaryIDFactory.newBinaryID(BinaryID.flagPeerGroupID, data, lengthIncluded).getID();
-    }
-
-    /**
-     * Constructor for creating a new PeerGroupID. Note that this creates an
-     * invalid ID but is required for serialization.
-     */
-    public PeerGroupBinaryID() {
-        super();
-    }
-
-    /**
-     * Constructor. Intializes contents from provided ID. This PeerGroupID has
-     * no parent.
-     *
-     * @param id the ID data
-     */
-    public PeerGroupBinaryID(BinaryID id) {
-        super();
-        this.id = id.getID();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        }
-        
-        return target instanceof PeerGroupBinaryID && getUniqueValue().equals(((PeerGroupBinaryID) target).getUniqueValue());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        return getUniqueValue().hashCode();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getIDFormat() {
-        return IDFormat.INSTANTIATOR.getSupportedIDFormat();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Object getUniqueValue() {
-        if (null == id) { 
-            return ID.nullID.getUniqueValue();
-        }
-
-        return getIDFormat() + "-" + id;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public net.jxta.id.ID getPeerGroupID() {
-        // convert to the generic world PGID as necessary
-        return IDFormat.translateToWellKnown(this);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public net.jxta.peergroup.PeerGroupID getParentPeerGroupID() {
-        net.jxta.peergroup.PeerGroupID result = null;
-
-        try {
-            if (id == null) {
-                result = (net.jxta.peergroup.PeerGroupID) net.jxta.id.ID.nullID;
-            }
-            String idd = id;
-            int parentStart = idd.indexOf('.');
-
-            if (parentStart != -1) {
-                idd = idd.substring(parentStart + 1);
-            } else {
-                result = null;
-            }
-            URI url = new URI("urn:jxta:" + idd.replace('.', '-'));
-            net.jxta.peergroup.PeerGroupID peerGroupID = (net.jxta.peergroup.PeerGroupID) net.jxta.id.IDFactory.fromURI(url);
-
-            result = (net.jxta.peergroup.PeerGroupID) IDFormat.translateToWellKnown(peerGroupID);
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("cannot convert sub group. ID value = " + id);
-            }
-            result = null;
-
-        }
-        // LOG.error("getParentPeerGroupID():"+result);
-        return result;
-    }
-
-    /**
-     * returns the coded ID without the binaryid tag.
-     *
-     * @return The coded ID without the binaryid tag.
-     */
-    protected String getID() {
-        return id;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/PipeBinaryID.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/PipeBinaryID.java
deleted file mode 100644 (file)
index 0ffe37e..0000000
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.id.binaryID;
-
-
-import java.net.URI;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-import net.jxta.id.ID;
-
-
-/**
- * This class implements a Pipe ID. Each pipe is assigned a unique id.
- *
- * @author Daniel Brookshier <a HREF="mailto:turbogeek@cluck.com">turbogeek@cluck.com</a>
- * @see net.jxta.id.ID
- * @see net.jxta.id.IDFactory
- * @see net.jxta.peergroup.PeerGroupID
- */
-public final class PipeBinaryID extends net.jxta.pipe.PipeID {
-
-    /**
-     * LOG object for this class.
-     */
-    private final static transient Logger LOG = Logger.getLogger(PipeBinaryID.class.getName());
-
-    /**
-     * The id data
-     */
-    protected String id;
-
-    /**
-     * Used only internally
-     */
-    protected PipeBinaryID() {
-        super();
-    }
-
-    /**
-     * Creates a ID from a string. Note that the ID is not currently validated.
-     *
-     * @param id Value of ID.
-     */
-
-    protected PipeBinaryID(String id) {
-        super();
-        this.id = id;
-
-    }
-
-    /**
-     * Constructor. Intializes contents from provided ID.
-     *
-     * @param id the ID data
-     */
-    PipeBinaryID(BinaryID id) {
-        super();
-        this.id = id.getID();
-    }
-
-    /**
-     * Constructor. Creates a PipeID. A PeerGroupID is provided.  Note that only
-     * the peer group's primary node is used to  build this node. We don't want
-     * to be appending great grand parents.
-     *
-     * @param parent         the group to which this will belong.
-     * @param data           DOCUMENT ME!
-     * @param lengthIncluded DOCUMENT ME!
-     */
-    public PipeBinaryID(net.jxta.peergroup.PeerGroupID parent, byte[] data, boolean lengthIncluded) {
-        this();
-
-        String parentStr = IDFormat.childGroup(parent);
-
-        id = BinaryIDFactory.newBinaryID(BinaryID.flagPipeID, data, lengthIncluded).getID() + "." + parentStr.replace('-', '.');
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        }
-        
-        return target instanceof PipeBinaryID && getUniqueValue().equals(((PipeBinaryID) target).getUniqueValue());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        return getUniqueValue().hashCode();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getIDFormat() {
-        return IDFormat.INSTANTIATOR.getSupportedIDFormat();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Object getUniqueValue() {
-        if (null == id) { 
-            return ID.nullID.getUniqueValue();
-        }
-
-        return new StringBuilder().append(getIDFormat()).append("-").append(id).toString();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public net.jxta.id.ID getPeerGroupID() {
-        try {
-            if (id == null) {
-                return net.jxta.id.ID.nullID;
-            }
-            String idd = id;
-            int parentStart = idd.indexOf('.');
-
-            if (parentStart != -1) {
-                idd = idd.substring(parentStart + 1);
-            } else {
-                return null;
-            }
-
-            URI url = new URI("urn:jxta:" + idd.replace('.', '-'));
-            net.jxta.peergroup.PeerGroupID peerGroupID = (net.jxta.peergroup.PeerGroupID) net.jxta.id.IDFactory.fromURI(url);
-
-            return peerGroupID;
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "cannot convert sub group. ID value = " + id, e);
-            }
-            return null;
-        }
-    }
-
-    /**
-     * returns the coded ID without the binaryid tag.
-     *
-     * @return Returns the raw string used to create the urn!
-     */
-    protected String getID() {
-        return id;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/binaryID/package.html
deleted file mode 100644 (file)
index 7556f18..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-<HEAD>
-</HEAD>
-<BODY>
-The 'binary' format is a general purpose JXTA ID Format. It implements Peer,
-group, and pipe ID types. The remaining types are supported, but not
-guarenteed (CODAT not supported at all yet).<p>
-
-    The DigestTool class is probably the main entry point for most developers.
-    The class creates various BinaryID types with an SHA digest hashing. The
-    intent is to make secure but non-random possible for ID pipes, peers,
-    and peer groups. When using the utility, it is recomended tha you use
-    a hash size apropriate to your address space.
-
-    @see net.jxta.impl.id.binaryID.DigestTool
-
-    This package supports the creation of an identifier given a binary value
-    that is 0 to 255 bytes long that is encoded as Base64. The value needs to
-    be a unique value so that it can be used for addressing peers, pipes, and
-    groups.
-
-<p>
-
-    The implementation also includes the creation of a digest hash given an
-    arbirary length string. This allows you to encode any type of data into
-    a secure digest. The digest hash is recomended unless you are sure that
-    your binary id is truely unique. Using a digest hash is also preferrable
-    for situatins when you have an id that could be comprimized if known (like
-    a socal security number). The digest tools also have convenience methods
-    for mixing an id with a function name and a way to create a time
-    limited ID.
-
-<p>
-
-    Note that this ID currently only allows parent peer group ID to be of
-    type UUID.
-
-<p>
-
-    @author Daniel Brookshier <a HREF="mailto:turbogeek@cluck.com">turbogeek@cluck.com</a>
-
-
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#refimpls-ids-jiuft" target="_blank">JXTA
-    Protocols Specification : IDs</a>
-
-</BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/unknown/ID.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/unknown/ID.java
deleted file mode 100644 (file)
index 66295eb..0000000
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.unknown;
-
-
-import net.jxta.id.IDFactory;
-import java.net.URI;
-import java.net.URL;
-
-import java.net.MalformedURLException;
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-
-/**
- *  IDs are used to uniquely identify peers, peer groups, pipes and other
- *  types of objects manipulated by the JXTA APIs.
- *
- *  @see net.jxta.id.IDFactory
- *  @see net.jxta.codat.CodatID
- *  @see net.jxta.peer.PeerID
- *  @see net.jxta.peergroup.PeerGroupID
- *  @see net.jxta.pipe.PipeID
- *  @see net.jxta.platform.ModuleClassID
- *  @see net.jxta.platform.ModuleSpecID
- *
- **/
-public final class ID extends net.jxta.id.ID {
-    
-    /**
-     *  Log4J Logger
-     **/
-    private static final transient Logger LOG = Logger.getLogger(ID.class.getName());
-    
-    String  unqiueValue;
-    
-    /**
-     *  Constructor for IDs.
-     **/
-    ID(String value) {
-        unqiueValue = value;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public boolean equals(Object target) {
-        if (this == target) {
-            return true;
-        }
-        
-        if (target instanceof ID) {
-            return getUniqueValue().toString().equals(((ID) target).getUniqueValue().toString());
-        } else {
-            return false;
-        }
-    }
-    ;
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public int hashCode() {
-        return getUniqueValue().hashCode();
-    }
-    ;
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public String getIDFormat() {
-        return unqiueValue.substring(0, unqiueValue.indexOf('-'));
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public Object getUniqueValue() {
-        return unqiueValue;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public URL getURL() {
-        return getURL((String) getUniqueValue());
-    }
-    
-    /**
-     *  Public member which returns a URI (URL in Java nomenclature) of the ID.
-     *
-     *  @param uniqueValue the unique portion of the ID
-     *  @return        URL Object containing the URI
-     **/
-    static URL getURL(String uniqueValue) {
-        URL result = null;
-        
-        // Encode the unique value so that the resulting URN is valid.
-        String encoded = sun.net.www.protocol.urn.Handler.encodeURN(uniqueValue);
-        
-        try {
-            result = IDFactory.jxtaURL(ID.URIEncodingName, "", ID.URNNamespace + ":" + encoded);
-        } catch (MalformedURLException failed) {
-            LOG.log(Level.SEVERE, "Failed to construct URL", failed);
-        }
-        
-        return result;
-    }
-
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public URI toURI() {
-        return URI.create(ID.URIEncodingName + ":" + ID.URNNamespace + ":" + getUniqueValue());
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/unknown/IDFormat.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/unknown/IDFormat.java
deleted file mode 100644 (file)
index a2f1330..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.unknown;
-
-
-import net.jxta.id.IDFactory;
-
-
-/**
- *  The 'unknown' format is not a regular JXTA ID format. It is a special ID
- *  format used by the J2SE implementation to manage ids of formats which are
- *  not recognized. No ids of format 'unknown' are ever emitted nor can any new
- *  ids be created.
- **/
-public final class IDFormat {
-    
-    /**
-     * The instantiator for this ID Format which is used by the IDFactory.
-     *
-     **/    
-    public static final IDFactory.URIInstantiator INSTANTIATOR = new Instantiator();
-    
-    /**
-     *  Private Constructor. This class cannot be instantiated.
-     **/
-    private IDFormat() {}
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/unknown/Instantiator.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/unknown/Instantiator.java
deleted file mode 100644 (file)
index f06ea65..0000000
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.id.unknown;
-
-
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URL;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.UnknownServiceException;
-import java.net.URISyntaxException;
-import java.security.ProviderException;
-
-import net.jxta.id.IDFactory;
-
-
-final class Instantiator implements IDFactory.URIInstantiator {
-    
-    /**
-     *  Our ID Format
-     **/
-    final static String unknownFormat = "unknown";
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public String getSupportedIDFormat() {
-        return unknownFormat;
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public net.jxta.id.ID fromURL(URL source) throws MalformedURLException, UnknownServiceException {
-        
-        net.jxta.id.ID result = null;
-        
-        // check the protocol
-        if (!net.jxta.id.ID.URIEncodingName.equalsIgnoreCase(source.getProtocol())) {
-            throw new UnknownServiceException("URI protocol type was not as expected.");
-        }
-        
-        String  encoded = source.getFile();
-        
-        // Decode the URN to convert any % encodings and convert it from UTF8.
-        String decoded = sun.net.www.protocol.urn.Handler.decodeURN(encoded);
-        
-        int colonAt = decoded.indexOf(':');
-        
-        // There's a colon right?
-        if (-1 == colonAt) {
-            throw new UnknownServiceException("URN namespace was missing.");
-        }
-        
-        // check the namespace
-        if (!net.jxta.id.ID.URNNamespace.equalsIgnoreCase(decoded.substring(0, colonAt))) {
-            throw new UnknownServiceException("URN namespace was not as expected.");
-        }
-        
-        // skip the namespace portion and the colon
-        decoded = decoded.substring(colonAt + 1);
-        
-        result = new ID(decoded);
-        
-        return result;
-    }
-    ;
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public net.jxta.codat.CodatID newCodatID(net.jxta.peergroup.PeerGroupID groupID) {
-        throw new ProviderException("unsupported id type");
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public net.jxta.codat.CodatID newCodatID(net.jxta.peergroup.PeerGroupID groupID, byte[] seed) {
-        throw new ProviderException("unsupported id type");
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public net.jxta.codat.CodatID newCodatID(net.jxta.peergroup.PeerGroupID groupID, InputStream in) throws IOException {
-        throw new ProviderException("unsupported id type");
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public net.jxta.codat.CodatID newCodatID(net.jxta.peergroup.PeerGroupID groupID, byte[] seed, InputStream in) throws IOException {
-        throw new ProviderException("unsupported id type");
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public net.jxta.peer.PeerID newPeerID(net.jxta.peergroup.PeerGroupID groupID) {
-        throw new ProviderException("unsupported id type");
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public net.jxta.peer.PeerID newPeerID(net.jxta.peergroup.PeerGroupID groupID, byte[] seed) {
-        throw new ProviderException("unsupported id type");
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public net.jxta.peergroup.PeerGroupID newPeerGroupID() {
-        throw new ProviderException("unsupported id type");
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public net.jxta.peergroup.PeerGroupID newPeerGroupID(byte[] seed) {
-        throw new ProviderException("unsupported id type");
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public net.jxta.peergroup.PeerGroupID newPeerGroupID(net.jxta.peergroup.PeerGroupID parent) {
-        throw new ProviderException("unsupported id type");
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public net.jxta.peergroup.PeerGroupID newPeerGroupID(net.jxta.peergroup.PeerGroupID parent, byte[] seed) {
-        throw new ProviderException("unsupported id type");
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public net.jxta.pipe.PipeID newPipeID(net.jxta.peergroup.PeerGroupID groupID) {
-        throw new ProviderException("unsupported id type");
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public net.jxta.pipe.PipeID newPipeID(net.jxta.peergroup.PeerGroupID groupID, byte[] seed) {
-        throw new ProviderException("unsupported id type");
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public net.jxta.platform.ModuleClassID newModuleClassID() {
-        throw new ProviderException("unsupported id type");
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public net.jxta.platform.ModuleClassID newModuleClassID(final net.jxta.platform.ModuleClassID classID) {
-        throw new ProviderException("unsupported id type");
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public net.jxta.platform.ModuleSpecID newModuleSpecID(final net.jxta.platform.ModuleClassID classID) {
-        throw new ProviderException("unsupported id type");
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public net.jxta.id.ID fromURI(URI source) throws URISyntaxException {
-        
-        // check the protocol
-        if (!net.jxta.id.ID.URIEncodingName.equalsIgnoreCase(source.getScheme())) {
-            throw new URISyntaxException(source.toString(), "URI scheme was not as expected.");
-        }
-        
-        String decoded = source.getSchemeSpecificPart();
-        
-        int colonAt = decoded.indexOf(':');
-        
-        // There's a colon right?
-        if (-1 == colonAt) {
-            throw new URISyntaxException(source.toString(), "URN namespace was missing.");
-        }
-        
-        // check the namespace
-        if (!net.jxta.id.ID.URNNamespace.equalsIgnoreCase(decoded.substring(0, colonAt))) {
-            throw new URISyntaxException(source.toString()
-                    ,
-                    "URN namespace was not as expected. (" + net.jxta.id.ID.URNNamespace + "!=" + decoded.substring(0, colonAt)
-                    + ")");
-        }
-        
-        // skip the namespace portion and the colon
-        decoded = decoded.substring(colonAt + 1);
-        
-        return fromURNNamespaceSpecificPart(decoded);
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public net.jxta.id.ID fromURNNamespaceSpecificPart(String source) throws URISyntaxException {
-        ID result = new ID(source);
-        
-        return result;
-        
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/unknown/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/id/unknown/package.html
deleted file mode 100644 (file)
index 9163b71..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-   The 'unknown' format is a special JXTA ID format used by the J2SE 
-   implementation to manage ids of formats which are not recognized. No ids of 
-   format 'unknown' are ever emitted nor can any new ids be created.
-
-   @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#ids" target="_blank">JXTA Protocols Specification : IDs</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/loader/RefJxtaLoader.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/loader/RefJxtaLoader.java
deleted file mode 100644 (file)
index 4683499..0000000
+++ /dev/null
@@ -1,386 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.loader;
-
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.impl.peergroup.CompatibilityEquater;
-import net.jxta.platform.JxtaLoader;
-import net.jxta.platform.ModuleSpecID;
-import net.jxta.protocol.ModuleImplAdvertisement;
-
-import java.io.IOException;
-import java.io.StringReader;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.WeakHashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import net.jxta.logging.Logging;
-import net.jxta.platform.Module;
-
-
-/**
- * This class is the reference implementation of the JxtaLoader.
- */
-public class RefJxtaLoader extends JxtaLoader {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(RefJxtaLoader.class.getName());
-
-    /**
-     * The equator we will use to determine if compatibility statements are
-     * compatible with this JXTA implementation.
-     */
-    private final CompatibilityEquater equator;
-
-    /**
-     * <ul>
-     *     <li>Keys are {@link net.jxta.platform.ModuleSpecID}.</li>
-     *     <li>Values are {@link java.util.Map}.
-     *         <ul>
-     *             <li>Keys are {@link java.lang.String} Compatibility Statements serialized as XML UTF-8</li>
-     *             <li>Values are {@link java.lang.Class}<? extends Module>.</li>
-     *         </ul>
-     *     </li>
-     * </ul>
-     */
-    private final Map<ModuleSpecID, Map<String, Class<? extends Module>>> classes = new HashMap<ModuleSpecID, Map<String, Class<? extends Module>>>();
-
-    /**
-     * Classes and ImplAdvs we have known. Weak Map so that classes can be GCed.
-     */
-    private final Map<Class<? extends Module>, ModuleImplAdvertisement> implAdvs = new WeakHashMap<Class<? extends Module>, ModuleImplAdvertisement>();
-
-    /**
-     * Construct a new loader for the specified URLS with the default parent
-     * loader and specified compatibility equator.
-     *
-     * @param urls    The URLs from which to load classes and resources.
-     * @param equator The equator to use in comparing compatibility statements.
-     */
-    public RefJxtaLoader(URL[] urls, CompatibilityEquater equator) {
-        this(urls, RefJxtaLoader.class.getClassLoader(), equator);
-    }
-
-    /**
-     * Construct a new loader for the specified URLS with the specified parent
-     * loader and specified compatibility equator.
-     *
-     * @param urls    The URLs from which to load classes and resources.
-     * @param parent  The parent class loader for delegation.
-     * @param equator The equator to use in comparing compatibility statements.
-     */
-    public RefJxtaLoader(URL[] urls, ClassLoader parent, CompatibilityEquater equator) {
-        super(urls, parent);
-        this.equator = equator;
-    }
-
-    /**
-     * Make a stub for a version that uses URL, so that code that load
-     * services can be written properly, even if it works only for classes
-     * that do not need download.
-     *
-     * @param name    The class name.
-     * @param url     The location of the class.
-     * @param resolve If {@code true} then resolve the class.
-     * @return the class
-     * @throws ClassNotFoundException if class not found
-     */
-    protected Class<? extends Module> loadClass(String name, URL url, boolean resolve) throws ClassNotFoundException {
-        try {
-            return loadClass(name, resolve);
-        } catch (ClassNotFoundException e) {
-            if (url != null) {
-                addURL(url);
-                return loadClass(name, resolve);
-            } else {
-                throw e;
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Class<? extends Module> loadClass(String name, boolean resolve) throws ClassNotFoundException {
-
-        Class<? extends Module> newClass = (Class<? extends Module>) findLoadedClass(name);
-
-        if (newClass == null) { // I'd rather say parent.loadClass() but it is private
-            try {
-                newClass = (Class<? extends Module>) super.loadClass(name, false);
-            } catch (ClassNotFoundException ignored) {
-            // that's ok
-            }
-        }
-
-        if (newClass == null) {
-            try {
-                newClass = (Class<? extends Module>) findSystemClass(name);
-                if (newClass != null) {
-                    return newClass;
-                }
-            } catch (ClassNotFoundException ignored) {
-            // that's ok
-            }
-
-            // We need to also check if the Context ClassLoader associated to the
-            // the current thread can load the class.
-            if (newClass == null) {
-                try {
-                    newClass = (Class<? extends Module>) Thread.currentThread().getContextClassLoader().loadClass(name);
-                    if (newClass != null) {
-                        return newClass;
-                    }
-                } catch (ClassNotFoundException ignored) {
-                // that's ok
-                }
-            }
-
-        // try {
-            // byte[] buf = bytesForClass(name);
-            // newClass = defineClass(name, buf, 0, buf.length);
-            // } catch (IOException e) {
-            // throw new ClassNotFoundException(e.toString());
-            // }
-        }
-
-        if (resolve) {
-            resolveClass(newClass);
-        }
-
-        return newClass;
-    }
-
-    // /**
-    // *  {@inheritDoc}
-    // **/
-    // protected byte[] bytesForClass(String name)
-    // throws IOException, ClassNotFoundException {
-    //
-    // File file = new File( dir, name.replace('.', File.separatorChar) + ".java");
-    // FileInputStream in = new FileInputStream(file);
-    // int length = (int) file.length();
-    // if (length == 0)
-    // throw new ClassNotFoundException(name);
-    // byte[] buf = new byte[length];
-    // in.read(buf);
-    // return buf;
-    // }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized Class<? extends Module> findClass(ModuleSpecID spec) throws ClassNotFoundException {
-
-        Map<String, Class<? extends Module>> compats = classes.get(spec);
-
-        if (null == compats) {
-            throw new ClassNotFoundException("No matching class for : " + spec);
-        }
-
-        for (Map.Entry<String, Class<? extends Module>> anEntry : compats.entrySet()) {
-            String aCompat = anEntry.getKey();
-
-            StructuredDocument asDoc;
-
-            try {
-                asDoc = StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, new StringReader(aCompat));
-            } catch (IOException ignored) {
-                continue;
-            }
-
-            if (equator.compatible(asDoc)) {
-                return anEntry.getValue();
-            } 
-        }
-
-        throw new ClassNotFoundException(spec.toString());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Class<? extends Module> loadClass(ModuleSpecID spec) throws ClassNotFoundException {
-
-        Class found = findClass(spec);
-
-        resolveClass(found);
-
-        return found;
-    }
-
-    /**
-     * Loads a class
-     *
-     * @param name class name
-     * @param url  url to class
-     * @return the Class
-     * @throws ClassNotFoundException if class not found
-     */
-    public Class<? extends Module> loadClass(String name, URL url) throws ClassNotFoundException {
-        return loadClass(name, url, true);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized Class<? extends Module> defineClass(ModuleImplAdvertisement impl) throws ClassFormatError {
-        String asString = impl.getCompat().toString();
-
-        // See if we have any classes defined for this ModuleSpecID.
-        // Note that there may be multiple definitions with different compatibility statements.
-        Map<String, Class<? extends Module>> compats = classes.get(impl.getModuleSpecID());
-
-        if (null == compats) {
-            compats = new HashMap<String, Class<? extends Module>>();
-            classes.put(impl.getModuleSpecID(), compats);
-        }
-
-        // See if there is a class defined which matches the compatibility statement of the implAdv.
-        Class<? extends Module> loaded = compats.get(asString);
-
-        if (null == loaded) {
-            try {
-                loaded = loadClass(impl.getCode(), new URL(impl.getUri()), false);
-            } catch (ClassNotFoundException failed) {
-                throw new ClassFormatError("Class '" + impl.getCode() + "' could not be loaded from : " + impl.getUri());
-            } catch (MalformedURLException failed) {
-                throw new ClassFormatError("Cannot load class '" + impl.getCode() + "' from : " + impl.getUri());
-            }
-
-            // Remember the class along with the matching compatibility statement.
-            compats.put(asString, loaded);
-        }
-
-        // Force update of impl advertisement. This is done because the class will frequently redefine itself.
-        implAdvs.put(loaded, impl);
-
-        return loaded;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public ModuleImplAdvertisement findModuleImplAdvertisement(Class clazz) {
-        ModuleImplAdvertisement result = implAdvs.get(clazz);
-
-        if (null == result) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "No module imp adv for " + clazz);
-            }
-            return null;
-        } else {
-            return result.clone();
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public ModuleImplAdvertisement findModuleImplAdvertisement(ModuleSpecID msid) {
-        Class<? extends Module> moduleClass;
-
-        try {
-            moduleClass = findClass(msid);
-        } catch (ClassNotFoundException failed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed to find class for " + msid, failed);
-            }
-            return null;
-        }
-
-        if (null == moduleClass) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "No class for " + msid);
-            }
-            return null;
-        } else {
-            return findModuleImplAdvertisement(moduleClass);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String toString() {
-        StringBuilder result = new StringBuilder();
-
-        result.append("Classes : ");
-        for (Map.Entry<ModuleSpecID, Map<String, Class<? extends Module>>> eachMCID : classes.entrySet()) {
-            ModuleSpecID mcid = eachMCID.getKey();
-            result.append("\n\t" + mcid + " :");
-            for (Map.Entry<String, Class<? extends Module>> eachClass : eachMCID.getValue().entrySet()) {
-                result.append("\n\t\t" + eachClass.getValue().toString());
-            }
-        }
-
-        return result.toString();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/loader/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/loader/package.html
deleted file mode 100644 (file)
index 241ec06..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    An implementation of {@link net.jxta.platform.JxtaLoader} for use by the
-    standard peer group implementations.
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/PasswdMembershipService.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/PasswdMembershipService.java
deleted file mode 100644 (file)
index e6807a7..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.membership;
-
-
-import java.net.MalformedURLException;
-import java.net.UnknownServiceException;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.platform.JxtaLoader;
-import net.jxta.membership.Authenticator;
-import net.jxta.platform.ModuleSpecID;
-import net.jxta.protocol.ModuleImplAdvertisement;
-
-import net.jxta.exception.JxtaError;
-
-import net.jxta.impl.loader.RefJxtaLoader;
-import net.jxta.impl.peergroup.StdPeerGroup;
-
-
-/**
- *  The passwd membership service provides a Membership Service implementation
- *  which is based on a password scheme similar to the unix
- *  <code>/etc/passwd</code> system.</code>
- *
- *  @deprecated This service is intended only as a sample and should not be used
- *  for real membership applications. IT IS NOT SECURE. The implementation has
- *  also moved to {@link net.jxta.impl.membership.passwd.PasswdMembershipService}
- *
- * <p/><strong>This implementation is intended mostly as an example of a
- *  simple Membership Service service and <em>not</em> as a practical secure
- *  Membership Service.<strong>
- *
- * @see net.jxta.membership.MembershipService
- *
- **/
-@Deprecated
-public class PasswdMembershipService {
-    
-    /**
-     *  Log4J Logger
-     **/
-    private static final Logger LOG = Logger.getLogger(PasswdMembershipService.class.getName());
-    
-    /**
-     * Well known service specification identifier: password membership
-     */
-    public static final ModuleSpecID passwordMembershipSpecID = net.jxta.impl.membership.passwd.PasswdMembershipService.passwordMembershipSpecID;
-    
-    /**
-     * Register the "real" password membership service as soon as someone 
-     * references this class.
-     **/
-    static {
-        JxtaLoader loader = net.jxta.impl.peergroup.GenericPeerGroup.getJxtaLoader();
-        
-        ModuleImplAdvertisement implAdv = (ModuleImplAdvertisement) AdvertisementFactory.newAdvertisement(
-                ModuleImplAdvertisement.getAdvertisementType());
-            
-        implAdv.setCode(net.jxta.impl.membership.passwd.PasswdMembershipService.class.getName());
-        implAdv.setCompat(StdPeerGroup.STD_COMPAT);
-        implAdv.setDescription("Password Membership Service");
-        implAdv.setModuleSpecID(passwordMembershipSpecID);
-        implAdv.setProvider(StdPeerGroup.MODULE_IMPL_STD_PROVIDER);
-        implAdv.setUri(StdPeerGroup.MODULE_IMPL_STD_URI);
-        loader.defineClass(implAdv);
-    }
-    
-    public abstract static class PasswdAuthenticator implements Authenticator {
-        
-        public abstract void setAuth1Identity(String who);
-        
-        public abstract String getAuth1Identity();
-        
-        public abstract void setAuth2_Password(String secret);
-        
-        protected abstract String getAuth2_Password();
-    }
-    
-    /**
-     *  This is the method used to make the password strings. We only provide
-     *  one way encoding since we can compare the encoded strings.
-     *
-     *  <p/>FIXME 20010402bondolo@jxta.org : switch to use the standard
-     *  crypt(3) algorithm for encoding the passwords. The current algorithm has
-     *  been breakable since ancient times, crypt(3) is also weak, but harder to
-     *  break.
-     *
-     *   @param source  the string to encode
-     *   @return String the encoded version of the password.
-     *
-     **/
-    public static String makePsswd(String source) {
-
-        /**
-         *
-         * A->D  B->Q  C->K  D->W  E->H  F->R  G->T  H->E  I->N  J->O  K->G  L->X  M->C
-         * N->V  O->Y  P->S  Q->F  R->J  S->P  T->I  U->L  V->Z  W->A  X->B  Y->M  Z->U
-         *
-         **/
-        
-        final String xlateTable = "DQKWHRTENOGXCVYSFJPILZABMU";
-        
-        StringBuilder work = new StringBuilder(source);
-        
-        for (int eachChar = work.length() - 1; eachChar >= 0; eachChar--) {
-            char aChar = Character.toUpperCase(work.charAt(eachChar));
-            
-            int replaceIdx = xlateTable.indexOf(aChar);
-
-            if (-1 != replaceIdx) {
-                work.setCharAt(eachChar, (char) ('A' + replaceIdx));
-            }
-        }
-        
-        return work.toString();
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/none/NoneMembershipService.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/none/NoneMembershipService.java
deleted file mode 100644 (file)
index cd11469..0000000
+++ /dev/null
@@ -1,700 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.membership.none;
-
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-
-import java.net.URISyntaxException;
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-import net.jxta.credential.AuthenticationCredential;
-import net.jxta.credential.Credential;
-import net.jxta.credential.CredentialPCLSupport;
-import net.jxta.document.Attribute;
-import net.jxta.document.Attributable;
-import net.jxta.document.Advertisement;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.TextElement;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.membership.Authenticator;
-import net.jxta.membership.MembershipService;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.service.Service;
-
-import net.jxta.exception.ProtocolNotSupportedException;
-import net.jxta.exception.PeerGroupException;
-
-
-/**
- *  A Membership Service implementation which is intended to be used with peer
- *  groups which require no real authentication.
- *
- * <p/>The none service allows you to claim any identity within the peergroup,
- * but for peergroups which use this Membership Service method, it is
- * likely that the identity is used only for informational purposes.
- *
- * <p/>A default credential with the name "nobody" is automatically available
- * without requiring authentication by this service.
- *
- */
-public class NoneMembershipService implements MembershipService {
-    
-    /**
-     *  Log4J Logger
-     **/
-    private static final Logger LOG = Logger.getLogger(NoneMembershipService.class.getName());
-    
-    /**
-     *  Credential format for the None Membership service.
-     *
-     *  <p/>Credentials for the None Membership Service consist of the following
-     *  unencrypted, unsigned XML tags:
-     *
-     *  <ul>
-     *      <li>PeerGroupID</li>
-     *      <li>PeerID</li>
-     *      <li>Identity</li>
-     *  </ul>
-     **/
-    private final static class NoneCredential implements Credential, CredentialPCLSupport {
-        
-        private NoneMembershipService source;
-        
-        private String whoami;
-        
-        private ID peerid;
-        
-        /**
-         *  Whether the credential is valid.
-         **/
-        boolean valid = true;
-        
-        /**
-         *  property change support
-         **/
-        private PropertyChangeSupport support = new PropertyChangeSupport(this);
-        
-        protected NoneCredential(NoneMembershipService source, String whoami) {
-            
-            this.source = source;
-            this.whoami = whoami;
-            this.peerid = source.peergroup.getPeerID();
-        }
-        
-        protected NoneCredential(NoneMembershipService source, Element root) throws PeerGroupException {
-            
-            this.source = source;
-            
-            initialize(root);
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public ID getPeerGroupID() {
-            return source.peergroup.getPeerGroupID();
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public ID getPeerID() {
-            return peerid;
-        }
-        
-        /**
-         *
-         **/
-        private void setPeerID(PeerID peerid) {
-            this.peerid = peerid;
-        }
-        
-        /**
-         * {@inheritDoc}
-         *
-         * <p/>NoneCredential are always valid.
-         **/
-        public boolean isExpired() {
-            return false;
-        }
-        
-        /**
-         * {@inheritDoc}
-         *
-         * <p/>NoneCredential are always valid.
-         **/
-        public boolean isValid() {
-            return valid;
-        }
-        
-        /**
-         * {@inheritDoc}
-         *
-         * <p/>PasswdCredential are always valid except after resign.
-         **/
-        private void setValid(boolean valid) {
-            boolean oldValid = isValid();
-
-            this.valid = valid;
-            
-            if (oldValid != valid) {
-                support.firePropertyChange("valid", oldValid, valid);
-            }
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public Object getSubject() {
-            return whoami;
-        }
-        
-        /**
-         *
-         **/
-        private void setSubject(String subject) {
-            whoami = subject;
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public Service getSourceService() {
-            return source.getInterface();
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public StructuredDocument getDocument(MimeMediaType as) throws Exception {
-            StructuredDocument doc = StructuredDocumentFactory.newStructuredDocument(as, "jxta:Cred");
-            
-            if (doc instanceof Attributable) {
-                ((Attributable) doc).addAttribute("xmlns:jxta", "http://jxta.org");
-                ((Attributable) doc).addAttribute("xml:space", "preserve");
-                ((Attributable) doc).addAttribute("type", "jxta:NullCred");
-            }
-            
-            Element e = doc.createElement("PeerGroupID", getPeerGroupID().toString());
-
-            doc.appendChild(e);
-            
-            e = doc.createElement("PeerID", peerid.toString());
-            doc.appendChild(e);
-            
-            e = doc.createElement("Identity", whoami);
-            doc.appendChild(e);
-            
-            return doc;
-        }
-        
-        /**
-         *  Process an individual element from the document.
-         *
-         *  @param elem the element to be processed.
-         *  @return true if the element was recognized, otherwise false.
-         **/
-        protected boolean handleElement(TextElement elem) {
-            if (elem.getName().equals("PeerGroupID")) {
-                try {
-                    URI gID = new URI(elem.getTextValue());
-                    ID pgid = IDFactory.fromURI(gID);
-
-                    if (!pgid.equals(getPeerGroupID())) {
-                        throw new IllegalArgumentException(
-                                "Operation is from a different group. " + pgid + " != " + getPeerGroupID());
-                    }
-                } catch (URISyntaxException badID) {
-                    throw new IllegalArgumentException("Bad PeerGroupID in advertisement: " + elem.getTextValue());
-                }
-                return true;
-            }
-            
-            if (elem.getName().equals("PeerID")) {
-                try {
-                    URI pID = new URI(elem.getTextValue());
-                    ID pid = IDFactory.fromURI(pID);
-
-                    setPeerID((PeerID) pid);
-                } catch (URISyntaxException badID) {
-                    throw new IllegalArgumentException("Bad Peer ID in advertisement: " + elem.getTextValue());
-                } catch (ClassCastException badID) {
-                    throw new IllegalArgumentException("Id is not a peer id: " + elem.getTextValue());
-                }
-                return true;
-            }
-            
-            if (elem.getName().equals("Identity")) {
-                setSubject(elem.getTextValue());
-                return true;
-            }
-            
-            // element was not handled
-            return false;
-        }
-        
-        /**
-         *  Intialize from a portion of a structured document.
-         **/
-        protected void initialize(Element root) {
-            
-            if (!TextElement.class.isInstance(root)) {
-                throw new IllegalArgumentException(getClass().getName() + " only supports TextElement");
-            }
-            
-            TextElement doc = (TextElement) root;
-            
-            String typedoctype = "";
-
-            if (root instanceof Attributable) {
-                Attribute itsType = ((Attributable) root).getAttribute("type");
-
-                if (null != itsType) {
-                    typedoctype = itsType.getValue();
-                }
-            }
-            
-            String doctype = doc.getName();
-            
-            if (!doctype.equals("jxta:NullCred") && !typedoctype.equals("jxta:NullCred")) {
-                throw new IllegalArgumentException(
-                        "Could not construct : " + getClass().getName() + "from doc containing a " + doctype);
-            }
-            
-            Enumeration elements = doc.getChildren();
-            
-            while (elements.hasMoreElements()) {
-                TextElement elem = (TextElement) elements.nextElement();
-
-                if (!handleElement(elem)) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Unhandleded element \'" + elem.getName() + "\' in " + doc.getName());
-                    }
-                }
-            }
-            
-            // sanity check time!
-            
-            if (null == getSubject()) {
-                throw new IllegalArgumentException("subject was never initialized.");
-            }
-            
-            if (null == getPeerID()) {
-                throw new IllegalArgumentException("peer id was never initialized.");
-            }
-            
-            // FIXME bondolo@jxta.org 20030409 should check for duplicate elements and for peergroup element
-        }
-        
-        /**
-         *  Add a listener
-         *
-         *  @param listener the listener
-         **/
-        public void addPropertyChangeListener(PropertyChangeListener listener) {
-            support.addPropertyChangeListener(listener);
-        }
-        
-        /**
-         *  Add a listener
-         *
-         *  @param propertyName the property to watch
-         *  @param listener the listener
-         **/
-        public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
-            support.addPropertyChangeListener(propertyName, listener);
-        }
-        
-        /**
-         *  Remove a listener
-         *
-         *  @param listener the listener
-         **/
-        public void removePropertyChangeListener(PropertyChangeListener listener) {
-            support.removePropertyChangeListener(listener);
-        }
-        
-        /**
-         *  Remove a listener
-         *
-         *  @param propertyName the property which was watched
-         *  @param listener the listener
-         **/
-        public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
-            support.removePropertyChangeListener(propertyName, listener);
-        }
-    }
-    
-
-    /**
-     *  Authenticator Class for the None Membership Service. Pre-filled in and
-     *  ready for <code>join()</code>.
-     **/
-    public final static class NoneAuthenticator implements Authenticator {
-        
-        MembershipService source;
-        AuthenticationCredential application;
-        
-        String whoami = "nobody";
-        
-        /**
-         * Creates an authenticator for the null membership service. Anything entered
-         * into the identity info section of the Authentication credential is
-         * ignored.
-         *
-         *  @param source The instance of the null membership service which
-         *  created this authenticator.
-         *  @param application Anything entered into the identity info section of
-         *  the Authentication credential is ignored.
-         **/
-        NoneAuthenticator(NoneMembershipService source, AuthenticationCredential application) {
-            this.source = source;
-            this.application = application;
-        }
-        
-        /**
-         * Returns the service which generated this authenticator.
-         **/
-        public MembershipService getSourceService() {
-            return source;
-        }
-        
-        /**
-         * {@inheritDoc}
-         *
-         *  <p/>This implementation is <strong>always</strong> ready for
-         *  <code>join()</code>
-         **/
-        synchronized public boolean isReadyForJoin() {
-            // always ready.
-            return true;
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public String getMethodName() {
-            return "NullAuthentication";
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public AuthenticationCredential getAuthenticationCredential() {
-            return application;
-        }
-        
-        public void setAuth1Identity(String who) {
-            if (null == who) {
-                throw new IllegalArgumentException("You must supply an identity");
-            }
-            whoami = who;
-        }
-        
-        public String getAuth1Identity() {
-            return whoami;
-        }
-    }
-    
-    private ModuleImplAdvertisement implAdvertisement = null;
-    
-    /**
-     *  The peergroup we live in.
-     **/
-    private PeerGroup peergroup = null;
-    
-    /**
-     *  our current credentials
-     **/
-    private List principals;
-    
-    /**
-     *  our current auth credentials
-     **/
-    private List principalsAuth;
-    
-    /**
-     *  the default "nobody" credential
-     **/
-    private NoneCredential  defaultCredential = null;
-    
-    /**
-     *  property change support
-     **/
-    private PropertyChangeSupport support;
-    
-    /**
-     *  default constructor. Normally called only by the peer group.
-     **/
-    public NoneMembershipService() throws PeerGroupException {
-        principals = new ArrayList();
-        principalsAuth = new ArrayList();
-        support = new PropertyChangeSupport(getInterface());
-    }
-    
-    /**
-     *  Add a listener
-     *
-     *  @param listener the listener
-     **/
-    public void addPropertyChangeListener(PropertyChangeListener listener) {
-        support.addPropertyChangeListener(listener);
-    }
-    
-    /**
-     *  Add a listener
-     *
-     *  @param propertyName the property to watch
-     *  @param listener the listener
-     **/
-    public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
-        support.addPropertyChangeListener(propertyName, listener);
-    }
-    
-    /**
-     *  Remove a listener
-     *
-     *  @param listener the listener
-     **/
-    public void removePropertyChangeListener(PropertyChangeListener listener) {
-        support.removePropertyChangeListener(listener);
-    }
-    
-    /**
-     *  Remove a listener
-     *
-     *  @param propertyName the property which was watched
-     *  @param listener the listener
-     **/
-    public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
-        support.removePropertyChangeListener(propertyName, listener);
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public void init(PeerGroup group, ID assignedID, Advertisement impl) throws PeerGroupException {
-        
-        implAdvertisement = (ModuleImplAdvertisement) impl;
-        
-        peergroup = group;
-        
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring None Membership Service : " + assignedID);
-
-            configInfo.append("\n\tImplementation:");
-            configInfo.append("\n\t\tModule Spec ID: " + implAdvertisement.getModuleSpecID());
-            configInfo.append("\n\t\tImpl Description : " + implAdvertisement.getDescription());
-            configInfo.append("\n\t\tImpl URI : " + implAdvertisement.getUri());
-            configInfo.append("\n\t\tImpl Code : " + implAdvertisement.getCode());
-            configInfo.append("\n\tGroup Params:");
-            configInfo.append("\n\t\tGroup: " + group.getPeerGroupName());
-            configInfo.append("\n\t\tGroup ID: " + group.getPeerGroupID());
-            configInfo.append("\n\t\tPeer ID: " + group.getPeerID());
-            LOG.config(configInfo.toString());
-        }
-        
-        defaultCredential = new NoneCredential(this, "nobody");
-        
-        resign();
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public Service getInterface() {
-        return this; // we have no method access control
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public int startApp(String[] arg) {
-        return 0;
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public void stopApp() {
-        resign();
-        
-        peergroup = null;
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public Advertisement getImplAdvertisement() {
-        return implAdvertisement;
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public Authenticator apply(AuthenticationCredential application) throws PeerGroupException, ProtocolNotSupportedException {
-        
-        String method = application.getMethod();
-        
-        if ((null != method) && !"StringAuthentication".equals(method) && !"NoneAuthentication".equals(method)) {
-            throw new ProtocolNotSupportedException("Authentication method not recognized");
-        }
-        
-        return new NoneAuthenticator(this, application);
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public Credential getDefaultCredential() {
-        return defaultCredential;
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public synchronized Enumeration<Credential> getCurrentCredentials() {
-        return Collections.enumeration(principals);
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public synchronized Enumeration<AuthenticationCredential> getAuthCredentials() {
-        return Collections.enumeration(principalsAuth);
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public Credential join(Authenticator authenticated) throws PeerGroupException {
-        
-        if (!(authenticated instanceof NoneAuthenticator)) {
-            throw new ClassCastException("This is not my authenticator!");
-        }
-        
-        if (!authenticated.isReadyForJoin()) {
-            throw new PeerGroupException("Not ready to join()!");
-        }
-        
-        NoneAuthenticator myAuthenticated = (NoneAuthenticator) authenticated;
-        
-        Credential newCred;
-
-        synchronized (this) {
-            newCred = new NoneCredential(this, myAuthenticated.getAuth1Identity());
-            
-            principals.add(newCred);
-            principalsAuth.add(myAuthenticated.application);
-        }
-        
-        support.firePropertyChange("addCredential", null, newCred);
-        
-        return newCred;
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public void resign() {
-        List allCreds = new ArrayList();
-
-        allCreds.addAll(principals);
-        allCreds.remove(defaultCredential);
-        
-        synchronized (this) {
-            // remove all existing credentials
-            principals.clear();
-            principalsAuth.clear();
-            
-            // re-add the default credential.
-            principals.add(defaultCredential);
-        }
-        
-        Iterator eachCred = allCreds.iterator();
-        
-        while (eachCred.hasNext()) {
-            NoneCredential aCred = (NoneCredential) eachCred.next();
-            
-            aCred.setValid(false);
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public Credential makeCredential(Element element) throws PeerGroupException, Exception {
-        return new NoneCredential(this, element);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/none/NoneMembershipServiceBeanInfo.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/none/NoneMembershipServiceBeanInfo.java
deleted file mode 100644 (file)
index d2a05b2..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.membership.none;
-
-
-import java.beans.BeanDescriptor;
-import java.beans.EventSetDescriptor;
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyDescriptor;
-import java.beans.SimpleBeanInfo;
-
-import java.beans.IntrospectionException;
-import java.lang.reflect.UndeclaredThrowableException;
-
-
-/**
- *  Our beaninfo
- **/
-public class NoneMembershipServiceBeanInfo extends SimpleBeanInfo {
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public BeanDescriptor getBeanDescriptor() {
-        return new BeanDescriptor(NoneMembershipService.class);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public EventSetDescriptor[] getEventSetDescriptors() {
-        try {
-            EventSetDescriptor changed = new EventSetDescriptor(NoneMembershipService.class, "propertyChange"
-                    ,
-                    PropertyChangeListener.class, "propertyChange");
-            
-            changed.setDisplayName("bound property change");
-            
-            EventSetDescriptor[] rv = { changed };
-
-            return rv;
-        } catch (IntrospectionException failed) {
-            throw new UndeclaredThrowableException(failed, "Configuration error");
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public PropertyDescriptor[] getPropertyDescriptors() {
-        try {
-            PropertyDescriptor defaultcredential = new PropertyDescriptor("defaultCredential", NoneMembershipService.class);
-
-            defaultcredential.setBound(true);
-            
-            PropertyDescriptor rv[] = { defaultcredential };
-            
-            return rv;
-        } catch (IntrospectionException failed) {
-            throw new UndeclaredThrowableException(failed, "Configuration error");
-        }
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/none/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/none/package.html
deleted file mode 100644 (file)
index ae78841..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    A Membership Service implementation which is intended to be used with peer
-    groups which require no real authentication.
-    <p/>The none service allows you to claim any identity within the peergroup,
-    but for peergroups which use this Membership Service method, it is
-    likely that the identity is used only for informational purposes.
-
-    <p/>A default credential with the name "nobody" is automatically available
-    without requiring authentication by this service.
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/package.html
deleted file mode 100644 (file)
index 45054eb..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    The membership service allows a peer to establish an identity within a peer
-    group.
-
-    </p>This package contains implementations of the Membership service.
-
-    @see net.jxta.membership
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/passwd/PasswdMembershipService.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/passwd/PasswdMembershipService.java
deleted file mode 100644 (file)
index ab61af5..0000000
+++ /dev/null
@@ -1,909 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.membership.passwd;
-
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.HashMap;
-
-import java.net.URISyntaxException;
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-import net.jxta.credential.AuthenticationCredential;
-import net.jxta.credential.Credential;
-import net.jxta.credential.CredentialPCLSupport;
-import net.jxta.document.Advertisement;
-import net.jxta.document.Attribute;
-import net.jxta.document.Attributable;
-import net.jxta.document.Element;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.protocol.PeerGroupAdvertisement;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.membership.Authenticator;
-import net.jxta.membership.MembershipService;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.platform.ModuleSpecID;
-import net.jxta.service.Service;
-
-import net.jxta.exception.JxtaError;
-import net.jxta.exception.ProtocolNotSupportedException;
-import net.jxta.exception.PeerGroupException;
-
-
-/**
- *  The passwd membership service provides a Membership Service implementation
- *  which is based on a password scheme similar to the unix
- *  <code>/etc/passwd</code> system.</code>
- *
- * <p/><strong>This implementation is intended as an example of a
- *  simple Membership Service and <em>NOT</em> as a practical secure
- *  Membership Service.<strong>
- *
- * @see net.jxta.membership.MembershipService
- *
- **/
-public class PasswdMembershipService implements MembershipService {
-    
-    /**
-     *  Log4J Logger
-     **/
-    private static final Logger LOG = Logger.getLogger(PasswdMembershipService.class.getName());
-    
-    /**
-     * Well known service specification identifier: password membership
-     */
-    public static final ModuleSpecID passwordMembershipSpecID = (ModuleSpecID)
-            ID.create(URI.create("urn:jxta:uuid-DeadBeefDeafBabaFeedBabe000000050206"));
-    
-    /**
-     * This class provides the sub-class of Credential which is associated
-     * with the password membership service.
-     **/
-    public final static class PasswdCredential implements Credential, CredentialPCLSupport {
-        
-        /**
-         * The MembershipService service which generated this credential.
-         **/
-        PasswdMembershipService source;
-        
-        /**
-         * The identity associated with this credential
-         **/
-        String whoami;
-        
-        /**
-         * The peerid associated with this credential.
-         **/
-        ID peerid;
-        
-        /**
-         * The peerid which has been "signed" so that the identity may be verified.
-         **/
-        String signedPeerID;
-        
-        /**
-         *  property change support
-         **/
-        private PropertyChangeSupport support = new PropertyChangeSupport(this);
-        
-        /**
-         *  Whether the credential is valid.
-         **/
-        boolean valid = true;
-        
-        protected PasswdCredential(PasswdMembershipService source, String whoami, String signedPeerID) {
-            
-            this.source = source;
-            this.whoami = whoami;
-            this.peerid = source.peergroup.getPeerID();
-            this.signedPeerID = signedPeerID;
-        }
-        
-        protected PasswdCredential(PasswdMembershipService source, Element root) throws PeerGroupException {
-            
-            this.source = source;
-            
-            initialize(root);
-        }
-        
-        /**
-         *  Add a listener
-         *
-         *  @param listener the listener
-         **/
-        public void addPropertyChangeListener(PropertyChangeListener listener) {
-            support.addPropertyChangeListener(listener);
-        }
-        
-        /**
-         *  Add a listener
-         *
-         *  @param propertyName the property to watch
-         *  @param listener the listener
-         **/
-        public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
-            support.addPropertyChangeListener(propertyName, listener);
-        }
-        
-        /**
-         *  Remove a listener
-         *
-         *  @param listener the listener
-         **/
-        public void removePropertyChangeListener(PropertyChangeListener listener) {
-            support.removePropertyChangeListener(listener);
-        }
-        
-        /**
-         *  Remove a listener
-         *
-         *  @param propertyName the property which was watched
-         *  @param listener the listener
-         **/
-        public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
-            support.removePropertyChangeListener(propertyName, listener);
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public ID getPeerGroupID() {
-            return source.peergroup.getPeerGroupID();
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public ID getPeerID() {
-            return peerid;
-        }
-        
-        /**
-         *  Set the peerid for this credential.
-         *
-         *  @param  peerid   the peerid for this credential
-         **/
-        private void setPeerID(PeerID peerid) {
-            this.peerid = peerid;
-        }
-        
-        /**
-         * {@inheritDoc}
-         *
-         * <p/>PasswdCredential never expire.
-         **/
-        public boolean isExpired() {
-            return false;
-        }
-        
-        /**
-         * {@inheritDoc}
-         *
-         * <p/>PasswdCredential are almost always valid.
-         **/
-        public boolean isValid() {
-            return valid;
-        }
-        
-        /**
-         * {@inheritDoc}
-         *
-         * <p/>PasswdCredential are always valid except after resign.
-         **/
-        private void setValid(boolean valid) {
-            boolean oldValid = isValid();
-
-            this.valid = valid;
-            
-            if (oldValid != valid) {
-                support.firePropertyChange("valid", oldValid, valid);
-            }
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public Object getSubject() {
-            return whoami;
-        }
-        
-        /**
-         *  Sets the subject for this Credential
-         *
-         *  @param  subject The subject for this credential.
-         **/
-        private void setSubject(String subject) {
-            whoami = subject;
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public Service getSourceService() {
-            return source;
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public StructuredDocument getDocument(MimeMediaType as) throws Exception {
-            StructuredDocument doc = StructuredDocumentFactory.newStructuredDocument(as, "jxta:Cred");
-            
-            if (doc instanceof XMLDocument) {
-                ((Attributable) doc).addAttribute("xmlns:jxta", "http://jxta.org");
-                ((Attributable) doc).addAttribute("xml:space", "preserve");
-            }
-            
-            if (doc instanceof Attributable) {
-                ((Attributable) doc).addAttribute("type", "jxta:PasswdCred");
-            }
-            
-            Element e = doc.createElement("PeerGroupID", getPeerGroupID().toString());
-
-            doc.appendChild(e);
-            
-            e = doc.createElement("PeerID", getPeerID().toString());
-            doc.appendChild(e);
-            
-            e = doc.createElement("Identity", whoami);
-            doc.appendChild(e);
-            
-            // FIXME 20010327   Do some kind of signing here based on password.
-            e = doc.createElement("ReallyInsecureSignature", signedPeerID);
-            doc.appendChild(e);
-            
-            return doc;
-        }
-        
-        /**
-         *  Process an individual element from the document.
-         *
-         *  @param elem the element to be processed.
-         *  @return true if the element was recognized, otherwise false.
-         **/
-        protected boolean handleElement(XMLElement elem) {
-            if (elem.getName().equals("PeerGroupID")) {
-                try {
-                    URI gID = new URI(elem.getTextValue());
-                    ID pgid = IDFactory.fromURI(gID);
-
-                    if (!pgid.equals(getPeerGroupID())) {
-                        throw new IllegalArgumentException(
-                                "Operation is from a different group. " + pgid + " != " + getPeerGroupID());
-                    }
-                } catch (URISyntaxException badID) {
-                    throw new IllegalArgumentException("Bad PeerGroupID in advertisement: " + elem.getTextValue());
-                }
-                return true;
-            }
-            
-            if (elem.getName().equals("PeerID")) {
-                try {
-                    URI pID = new URI(elem.getTextValue());
-                    ID pid = IDFactory.fromURI(pID);
-
-                    setPeerID((PeerID) pid);
-                } catch (URISyntaxException badID) {
-                    throw new IllegalArgumentException("Bad Peer ID in advertisement: " + elem.getTextValue());
-                } catch (ClassCastException badID) {
-                    throw new IllegalArgumentException("Id is not a peer id: " + elem.getTextValue());
-                }
-                return true;
-            }
-            
-            if (elem.getName().equals("Identity")) {
-                setSubject(elem.getTextValue());
-                return true;
-            }
-            
-            if (elem.getName().equals("ReallyInsecureSignature")) {
-                signedPeerID = elem.getTextValue();
-                return true;
-            }
-            
-            // element was not handled
-            return false;
-        }
-        
-        /**
-         *  Intialize from a portion of a structured document.
-         **/
-        protected void initialize(Element root) {
-            
-            if (!XMLElement.class.isInstance(root)) {
-                throw new IllegalArgumentException(getClass().getName() + " only supports XMLElement");
-            }
-            
-            XMLElement doc = (XMLElement) root;
-            
-            String typedoctype = "";
-            Attribute itsType = ((Attributable) root).getAttribute("type");
-
-            if (null != itsType) {
-                typedoctype = itsType.getValue();
-            }
-            
-            String doctype = doc.getName();
-            
-            if (!doctype.equals("jxta:PasswdCred") && !typedoctype.equals("jxta:PasswdCred")) {
-                throw new IllegalArgumentException(
-                        "Could not construct : " + getClass().getName() + "from doc containing a " + doctype);
-            }
-            
-            Enumeration elements = doc.getChildren();
-            
-            while (elements.hasMoreElements()) {
-                XMLElement elem = (XMLElement) elements.nextElement();
-
-                if (!handleElement(elem)) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Unhandleded element \'" + elem.getName() + "\' in " + doc.getName());
-                    }
-                }
-            }
-            
-            // sanity check time!
-            
-            if (null == getSubject()) {
-                throw new IllegalArgumentException("subject was never initialized.");
-            }
-            
-            if (null == getPeerID()) {
-                throw new IllegalArgumentException("peer id was never initialized.");
-            }
-            
-            if (null == signedPeerID) {
-                throw new IllegalArgumentException("signed peer id was never initialized.");
-            }
-            
-            // FIXME bondolo@jxta.org 20030409 should check for duplicate elements and for peergroup element
-        }
-    }
-    
-
-    /**
-     * Creates an authenticator for the passwd membership service. Anything
-     *  entered into the identity info section of the Authentication
-     *  credential is ignored.
-     *
-     *  <p/><strong>HACK ALERT!</strong> THE INHERITANCE FROM
-     *  <code>net.jxta.impl.membership.PasswdMembershipService.PasswdAuthenticator</code>
-     *  IS A TOTAL HACK FOR BACKWARDS COMPATIBILITY.
-     *
-     *  @param source The instance of the passwd membership service which
-     *  created this authenticator.
-     *  @param application Anything entered into the identity info section of
-     *  the Authentication credential is ignored.
-     **/
-    public final static class PasswdAuthenticator extends net.jxta.impl.membership.PasswdMembershipService.PasswdAuthenticator {
-        
-        /**
-         * The Membership Service which generated this authenticator.
-         **/
-        PasswdMembershipService source;
-        
-        /**
-         * The Authentication which was provided to the Apply operation of the
-         * membership service.
-         **/
-        AuthenticationCredential application;
-        
-        /**
-         * the identity which is being claimed
-         **/
-        String whoami = null;
-        
-        /**
-         * the password for that identity.
-         **/
-        String password = null;
-        
-        /**
-         * Creates an authenticator for the password MembershipService service. The only method
-         * supported is "PasswdAuthentication". Anything entered into the identity info
-         * section of the Authentication credential is ignored.
-         *
-         * @param source The instance of the password membership service which created this
-         * authenticator.
-         * @param application The Anything entered into the identity info section of the Authentication
-         * credential is ignored.
-         **/
-        PasswdAuthenticator(PasswdMembershipService source, AuthenticationCredential application) {
-            this.source = source;
-            this.application = application;
-            
-            // XXX 20010328 bondolo@jxta.org Could do something with the authentication credential here.
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public MembershipService getSourceService() {
-            return (MembershipService) source.getInterface();
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        synchronized public boolean isReadyForJoin() {
-            return ((null != password) && (null != whoami));
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public String getMethodName() {
-            return "PasswdAuthentication";
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public AuthenticationCredential getAuthenticationCredential() {
-            return application;
-        }
-        
-        @Override
-        public void setAuth1Identity(String who) {
-            whoami = who;
-        }
-        
-        @Override
-        public String getAuth1Identity() {
-            return whoami;
-        }
-        
-        @Override
-        public void setAuth2_Password(String secret) {
-            password = secret;
-        }
-        
-        @Override
-        protected String getAuth2_Password() {
-            return password;
-        }
-    }
-        
-    /**
-     * the peergroup to which this service is associated.
-     **/
-    private PeerGroup peergroup = null;
-    
-    /**
-     *  the default "nobody" credential
-     **/
-    private Credential  defaultCredential = null;
-    
-    /**
-     * The current set of principals associated with this peer within this peegroup.
-     **/
-    private List principals;
-    
-    /**
-     * The set of AuthenticationCredentials which were used to establish the principals.
-     **/
-    private List authCredentials;
-    
-    /**
-     * The ModuleImplAdvertisement which was used to instantiate this service.
-     **/
-    private ModuleImplAdvertisement implAdvertisement = null;
-    
-    /**
-     * An internal table containing the identity and password pairs as parsed from the
-     * the PeerGroupAdvertisement.
-     **/
-    private Map logins = null;
-    
-    /**
-     *  property change support
-     **/
-    private PropertyChangeSupport support;
-    
-    /**
-     *  Default constructor. Normally only called by the peer group.
-     **/
-    public PasswdMembershipService() throws PeerGroupException {
-        principals = new ArrayList();
-        authCredentials = new ArrayList();
-        
-        support = new PropertyChangeSupport(getInterface());
-    }
-    
-    /**
-     *  Add a listener
-     *
-     *  @param listener the listener
-     **/
-    public void addPropertyChangeListener(PropertyChangeListener listener) {
-        support.addPropertyChangeListener(listener);
-    }
-    
-    /**
-     *  Add a listener
-     *
-     *  @param propertyName the property to watch
-     *  @param listener the listener
-     **/
-    public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
-        support.addPropertyChangeListener(propertyName, listener);
-    }
-    
-    /**
-     *  Remove a listener
-     *
-     *  @param listener the listener
-     **/
-    public void removePropertyChangeListener(PropertyChangeListener listener) {
-        support.removePropertyChangeListener(listener);
-    }
-    
-    /**
-     *  Remove a listener
-     *
-     *  @param propertyName the property which was watched
-     *  @param listener the listener
-     **/
-    public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
-        support.removePropertyChangeListener(propertyName, listener);
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public void init(PeerGroup group, ID assignedID, Advertisement impl) throws PeerGroupException {
-        
-        peergroup = group;
-        implAdvertisement = (ModuleImplAdvertisement) impl;
-        
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring Password Membership Service : " + assignedID);
-
-            configInfo.append("\n\tImplementation:");
-            configInfo.append("\n\t\tModule Spec ID: " + implAdvertisement.getModuleSpecID());
-            configInfo.append("\n\t\tImpl Description : " + implAdvertisement.getDescription());
-            configInfo.append("\n\t\tImpl URI : " + implAdvertisement.getUri());
-            configInfo.append("\n\t\tImpl Code : " + implAdvertisement.getCode());
-            configInfo.append("\n\tGroup Params:");
-            configInfo.append("\n\t\tGroup: " + group.getPeerGroupName());
-            configInfo.append("\n\t\tGroup ID: " + group.getPeerGroupID());
-            configInfo.append("\n\t\tPeer ID: " + group.getPeerID());
-            LOG.config(configInfo.toString());
-        }
-        
-        PeerGroupAdvertisement configAdv = group.getPeerGroupAdvertisement();
-        
-        XMLElement myParam = (XMLElement) configAdv.getServiceParam(assignedID);
-        
-        logins = new HashMap();
-        
-        if (null == myParam) {
-            throw new PeerGroupException("parameters for group passwords missing");
-        }
-        
-        for (Enumeration allLogins = myParam.getChildren(); allLogins.hasMoreElements();) {
-            XMLElement aLogin = (XMLElement) allLogins.nextElement();
-
-            if (aLogin.getName().equals("login")) {
-                String etcPasswd = aLogin.getTextValue();
-                int nextDelim = etcPasswd.indexOf(':');
-
-                if (-1 == nextDelim) {
-                    continue;
-                }
-                String login = etcPasswd.substring(0, nextDelim).trim();
-                int lastDelim = etcPasswd.indexOf(':', nextDelim + 1);
-                String passwd = etcPasswd.substring(nextDelim + 1, lastDelim);
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Adding login : \'" + login + "\' with encoded password : \'" + passwd + "\'");
-                }
-                logins.put(login, passwd);
-            }
-        }
-        
-        // FIXME    20010327    bondolo@jxta.org Make up the signed bit.
-        
-        // We initialise our set of principals to the resigned state.
-        resign();
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public Service getInterface() {
-        return this;
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public Advertisement getImplAdvertisement() {
-        return implAdvertisement;
-    }
-    
-    /**
-     * {@inheritDoc}
-     *
-     * <p/>Currently this service starts by itself and does not expect
-     * arguments.
-     */
-    public int startApp(String[] arg) {
-        return 0;
-    }
-    
-    /**
-     * {@inheritDoc}
-     *
-     * <p/>This request is currently ignored.
-     **/
-    public void stopApp() {
-        resign();
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public Authenticator apply(AuthenticationCredential application) throws PeerGroupException, ProtocolNotSupportedException {
-        
-        String method = application.getMethod();
-        
-        if ((null != method) && !"StringAuthentication".equals(method) && !"PasswdAuthentication".equals(method)) {
-            throw new ProtocolNotSupportedException("Authentication method not recognized");
-        }
-        
-        return new PasswdAuthenticator(this, application);
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public Credential getDefaultCredential() {
-        return defaultCredential;
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    private void setDefaultCredential(Credential newDefault) {
-        Credential oldDefault = defaultCredential;
-
-        defaultCredential = newDefault;
-        
-        support.firePropertyChange("defaultCredential", oldDefault, newDefault);
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public synchronized Enumeration<Credential> getCurrentCredentials() {
-        return Collections.enumeration(principals);
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public synchronized Enumeration<AuthenticationCredential> getAuthCredentials() {
-        return Collections.enumeration(authCredentials);
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public Credential join(Authenticator authenticated) throws PeerGroupException {
-        
-        if (!(authenticated instanceof PasswdAuthenticator)) {
-            throw new ClassCastException("This is not my authenticator!");
-        }
-        
-        if (this != authenticated.getSourceService()) {
-            throw new ClassCastException("This is not my authenticator!");
-        }
-        
-        if (!authenticated.isReadyForJoin()) {
-            throw new PeerGroupException("Not Ready to join!");
-        }
-        
-        String identity = ((PasswdAuthenticator) authenticated).getAuth1Identity();
-        String password = ((PasswdAuthenticator) authenticated).getAuth2_Password();
-        
-        if (!checkPasswd(identity, password)) {
-            throw new PeerGroupException("Incorrect Password!");
-        }
-        
-        // FIXME    20010327    bondolo@jxta.org Make up the signed bit.
-        
-        Credential newCred;
-
-        synchronized (this) {
-            newCred = new PasswdCredential(this, identity, "blah");
-            
-            principals.add(newCred);
-            
-            authCredentials.add(authenticated.getAuthenticationCredential());
-        }
-        
-        support.firePropertyChange("addCredential", null, newCred);
-        
-        if (null == getDefaultCredential()) {
-            setDefaultCredential(newCred);
-        }
-        
-        return newCred;
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public synchronized void resign() {
-        Iterator eachCred = Arrays.asList(principals.toArray()).iterator();
-        
-        synchronized (this) {
-            principals.clear();
-            authCredentials.clear();
-        }
-        
-        setDefaultCredential(null);
-        
-        while (eachCred.hasNext()) {
-            PasswdCredential aCred = (PasswdCredential) eachCred.next();
-            
-            aCred.setValid(false);
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public Credential makeCredential(Element element) throws PeerGroupException, Exception {
-        
-        return new PasswdCredential(this, element);
-    }
-    
-    /**
-     * Given an identity and an encoded password determine if the password is
-     * correct.
-     *
-     * @param identity the identity which the user is trying to claim
-     * @param passwd the password guess being tested.
-     * @return true if the password was correct for the specified identity
-     * otherwise false.
-     **/
-    private boolean checkPasswd(String identity, String passwd) {
-        boolean result;
-        
-        if (!logins.containsKey(identity)) {
-            return false;
-        }
-        
-        String encodedPW = makePsswd(passwd);
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Password \'" + passwd + "\' encodes as: \'" + encodedPW + "\'");
-        }
-        
-        String mustMatch = (String) logins.get(identity);
-        
-        // if there is a null password for this identity then match everything.
-        if (mustMatch.equals("")) {
-            return true;
-        }
-        
-        result = encodedPW.equals(mustMatch);
-        
-        return result;
-    }
-    
-    /**
-     *  This is the method used to make the password strings. We only provide
-     *  one way encoding since we can compare the encoded strings.
-     *
-     *  <p/>FIXME 20010402  bondolo : switch to use the standard
-     *  crypt(3) algorithm for encoding the passwords. The current algorithm has
-     *  been breakable since ancient times, crypt(3) is also weak, but harder to
-     *  break.
-     *
-     *   @param source  the string to encode
-     *   @return String the encoded version of the password.
-     *
-     **/
-    public static String makePsswd(String source) {
-
-        /**
-         *
-         * A->D  B->Q  C->K  D->W  E->H  F->R  G->T  H->E  I->N  J->O  K->G  L->X  M->C
-         * N->V  O->Y  P->S  Q->F  R->J  S->P  T->I  U->L  V->Z  W->A  X->B  Y->M  Z->U
-         *
-         **/
-        
-        final String xlateTable = "DQKWHRTENOGXCVYSFJPILZABMU";
-        
-        StringBuilder work = new StringBuilder(source);
-        
-        for (int eachChar = work.length() - 1; eachChar >= 0; eachChar--) {
-            char aChar = Character.toUpperCase(work.charAt(eachChar));
-            
-            int replaceIdx = xlateTable.indexOf(aChar);
-
-            if (-1 != replaceIdx) {
-                work.setCharAt(eachChar, (char) ('A' + replaceIdx));
-            }
-        }
-        
-        return work.toString();
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/passwd/PasswdMembershipServiceBeanInfo.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/passwd/PasswdMembershipServiceBeanInfo.java
deleted file mode 100644 (file)
index 1453121..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.membership.passwd;
-
-
-import java.beans.BeanDescriptor;
-import java.beans.EventSetDescriptor;
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyDescriptor;
-import java.beans.SimpleBeanInfo;
-
-import java.beans.IntrospectionException;
-import java.lang.reflect.UndeclaredThrowableException;
-
-
-/**
- *  Our beaninfo
- **/
-public class PasswdMembershipServiceBeanInfo extends SimpleBeanInfo {
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public BeanDescriptor getBeanDescriptor() {
-        return new BeanDescriptor(PasswdMembershipService.class);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public EventSetDescriptor[] getEventSetDescriptors() {
-        try {
-            EventSetDescriptor changed = new EventSetDescriptor(PasswdMembershipService.class, "propertyChange"
-                    ,
-                    PropertyChangeListener.class, "propertyChange");
-            
-            changed.setDisplayName("bound property change");
-            
-            EventSetDescriptor[] rv = { changed };
-
-            return rv;
-        } catch (IntrospectionException failed) {
-            throw new UndeclaredThrowableException(failed, "Configuration error");
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public PropertyDescriptor[] getPropertyDescriptors() {
-        try {
-            PropertyDescriptor defaultcredential = new PropertyDescriptor("defaultCredential", PasswdMembershipService.class);
-
-            defaultcredential.setBound(true);
-            
-            PropertyDescriptor rv[] = { defaultcredential };
-            
-            return rv;
-        } catch (IntrospectionException failed) {
-            throw new UndeclaredThrowableException(failed, "Configuration error");
-        }
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/passwd/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/passwd/package.html
deleted file mode 100644 (file)
index 34e85e7..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    The passwd membership service provides a Membership Service implementation
-   which is based on a password scheme similar to the POSIX
-   <code>/etc/passwd</code> system.</code>
-   <p/><strong>This implementation is intended as an example of a
-   simple Membership Service and <em>NOT</em> as a practical secure
-   Membership Service.<strong>
-
-    @see net.jxta.membership
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/CMKeyStoreManager.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/CMKeyStoreManager.java
deleted file mode 100644 (file)
index 39a49f8..0000000
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.membership.pse;
-
-
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.security.KeyStore;
-
-import java.io.IOException;
-import java.security.KeyStoreException;
-import java.security.NoSuchProviderException;
-import java.security.NoSuchAlgorithmException;
-import java.security.cert.CertificateException;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import net.jxta.id.ID;
-import net.jxta.peergroup.PeerGroup;
-
-import net.jxta.impl.cm.Cm;
-import net.jxta.impl.peergroup.StdPeerGroup;
-
-
-/**
- *  Manages a Keystore located within the JXTA CM.
- **/
-public class CMKeyStoreManager implements KeyStoreManager {
-    
-    /**
-     *  Log4J Logger
-     **/
-    private final static transient Logger LOG = Logger.getLogger(CMKeyStoreManager.class.getName());
-    
-    /**
-     *  Our default keystore type.
-     **/
-    private final static String DEFAULT_KEYSTORE_TYPE = "jks";
-    
-    /**
-     *  The keystore type
-     **/
-    private final String keystore_type;
-    
-    /**
-     *  The keystore type
-     **/
-    private final String keystore_provider;
-    
-    /**
-     *  The JXTA CM where the keystore lives.
-     **/
-    private final Cm keystore_cm;
-    
-    /**
-     *  The CM ID where the keystore lives.
-     **/
-    private final ID keystore_location;
-    
-    /**
-     *  Default constructor.
-     *
-     *  @param type The keystore type to use. The current default is the "JKS"
-     *  keystore which is specified via {@code null}.
-     *  @param provider The JCE cryptographic provider to use for the keystore.
-     *  May also be  {@code null} for the default provider.
-     *  @param group The peer group which will provide the CM.
-     *  @param location The ID under which the keystore will be stored in the
-     *  CM.
-     *  @throws NoSuchProviderException Thrown if the requested provider is not
-     *  available.
-     *  @throws KeyStoreException Thrown for errors getting a keystore of the
-     *  requested type.
-     **/
-    public CMKeyStoreManager(String type, String provider, PeerGroup group, ID location) throws NoSuchProviderException, KeyStoreException {
-        
-        if (null == type) {
-            type = DEFAULT_KEYSTORE_TYPE;
-            provider = null;
-        }
-        
-        keystore_type = type;
-        
-        keystore_provider = provider;
-        
-        keystore_cm = ((StdPeerGroup) group).getCacheManager();
-        
-        keystore_location = location;
-        
-        // check if we can get an instance.
-        if (null == keystore_provider) {
-            KeyStore.getInstance(keystore_type);
-        } else {
-            KeyStore.getInstance(keystore_type, keystore_provider);
-        }
-        
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            LOG.config("pse location = " + keystore_location + " in " + keystore_cm);
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    public boolean isInitialized() {
-        return isInitialized(null);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    public boolean isInitialized(char[] store_password) {
-        try {
-            KeyStore store;
-
-            if (null == keystore_provider) {
-                store = KeyStore.getInstance(keystore_type);
-            } else {
-                store = KeyStore.getInstance(keystore_type, keystore_provider);
-            }
-            
-            InputStream is = keystore_cm.getInputStream("Raw", keystore_location.toString());
-            
-            if (null == is) {
-                return false;
-            }
-            
-            store.load(is, store_password);
-            
-            return true;
-        } catch (Exception failed) {
-            return false;
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    public void createKeyStore(char[] store_password) throws KeyStoreException, IOException {
-        try {
-            KeyStore store;
-
-            if (null == keystore_provider) {
-                store = KeyStore.getInstance(keystore_type);
-            } else {
-                store = KeyStore.getInstance(keystore_type, keystore_provider);
-            }
-            
-            store.load(null, store_password);
-            
-            saveKeyStore(store, store_password);
-        } catch (NoSuchProviderException failed) {
-            KeyStoreException failure = new KeyStoreException("NoSuchProviderException during keystore processing");
-
-            failure.initCause(failed);
-            throw failure;
-        } catch (NoSuchAlgorithmException failed) {
-            KeyStoreException failure = new KeyStoreException("NoSuchAlgorithmException during keystore processing");
-
-            failure.initCause(failed);
-            throw failure;
-        } catch (CertificateException failed) {
-            KeyStoreException failure = new KeyStoreException("CertificateException during keystore processing");
-
-            failure.initCause(failed);
-            throw failure;
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    public KeyStore loadKeyStore(char[] password) throws KeyStoreException, IOException {
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Loading (" + keystore_type + "," + keystore_provider + ") store from " + keystore_location);
-        }
-        
-        try {
-            KeyStore store;
-
-            if (null == keystore_provider) {
-                store = KeyStore.getInstance(keystore_type);
-            } else {
-                store = KeyStore.getInstance(keystore_type, keystore_provider);
-            }
-            
-            InputStream is = keystore_cm.getInputStream("Raw", keystore_location.toString());
-            
-            store.load(is, password);
-            
-            return store;
-        } catch (NoSuchAlgorithmException failed) {
-            KeyStoreException failure = new KeyStoreException("NoSuchAlgorithmException during keystore processing");
-
-            failure.initCause(failed);
-            throw failure;
-        } catch (CertificateException failed) {
-            KeyStoreException failure = new KeyStoreException("CertificateException during keystore processing");
-
-            failure.initCause(failed);
-            throw failure;
-        } catch (NoSuchProviderException failed) {
-            KeyStoreException failure = new KeyStoreException("NoSuchProviderException during keystore processing");
-
-            failure.initCause(failed);
-            throw failure;
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    public void saveKeyStore(KeyStore store, char[] password) throws IOException, KeyStoreException {
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Writing " + store + " to " + keystore_location);
-        }
-        
-        try {
-            ByteArrayOutputStream bos = new ByteArrayOutputStream();
-            
-            store.store(bos, password);
-            bos.close();
-            
-            keystore_cm.save("Raw", keystore_location.toString(), bos.toByteArray(), Long.MAX_VALUE, 0);
-        } catch (NoSuchAlgorithmException failed) {
-            KeyStoreException failure = new KeyStoreException("NoSuchAlgorithmException during keystore processing");
-
-            failure.initCause(failed);
-            throw failure;
-        } catch (CertificateException failed) {
-            KeyStoreException failure = new KeyStoreException("CertificateException during keystore processing");
-
-            failure.initCause(failed);
-            throw failure;
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    public void eraseKeyStore() throws IOException {
-        
-        keystore_cm.remove("Raw", keystore_location.toString());
-    }
-
-    /**
-     *  {@inheritDoc}
-     **/
-    public String toString() {
-       StringBuilder sb = new StringBuilder("PSE keystore details:  \n");
-       sb.append("   Class:  ").append(this.getClass().getName()).append("\n");
-       sb.append("   Type:  ").append(keystore_type==null ? "<default>" : keystore_type).append("\n");
-       sb.append("   Provider:  ").append(keystore_provider==null ? "<default>" : keystore_provider).append("\n");
-       sb.append("   Location:  ").append(keystore_location==null ? "<default>" : keystore_location.toString()).append("\n");
-       return sb.toString();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/DialogAuthenticator.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/DialogAuthenticator.java
deleted file mode 100644 (file)
index 42b7919..0000000
+++ /dev/null
@@ -1,492 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.membership.pse;
-
-
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.GridLayout;
-import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.KeyAdapter;
-import java.awt.event.KeyEvent;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-import java.security.cert.X509Certificate;
-import java.util.Arrays;
-import java.util.Iterator;
-import javax.swing.JButton;
-import javax.swing.JComboBox;
-import javax.swing.JDialog;
-import javax.swing.JLabel;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import javax.swing.JPasswordField;
-
-import javax.crypto.EncryptedPrivateKeyInfo;
-
-import net.jxta.credential.AuthenticationCredential;
-import net.jxta.id.ID;
-import net.jxta.membership.InteractiveAuthenticator;
-import net.jxta.peer.PeerID;
-
-
-/**
- * An interactive graphical authenticator associated with the PSE membership
- * service.
- *
- * @see net.jxta.membership.Authenticator
- * @see net.jxta.membership.InteractiveAuthenticator
- * @see net.jxta.membership.MembershipService
- * @see net.jxta.impl.membership.pse.PSEMembershipService
- **/
-public final class DialogAuthenticator extends StringAuthenticator implements InteractiveAuthenticator {
-    
-    /**
-     *  Entries we stick into the combo list
-     **/
-    private static class JComboEntry {
-        ID itsID;
-        
-        X509Certificate itsCertificate;
-        
-        String itsName;
-        
-        JComboEntry(ID entryID, X509Certificate itsCert) {
-            itsID = entryID;
-            itsCertificate = itsCert;
-            itsName = PSEUtils.getCertSubjectCName(itsCertificate);
-            
-            if (null == itsName) {
-                itsName = "< no common name >";
-            }
-            
-            // remove the -CA which is common to ca root certs.
-            if (itsName.endsWith("-CA")) {
-                itsName = itsName.substring(0, itsName.length() - 3);
-            }
-        }
-        
-        /**
-         *  {@inheritDoc}
-         **/
-        @Override
-        public String toString() {
-            return itsName;
-        }
-    }
-    
-
-    /**
-     *  Swing user interface for password entry and identity selection.
-     *
-     *  <p/>FIXME bondolo 20040329 should be localizable.
-     **/
-    private class PasswordDialog extends JDialog implements ActionListener {
-        
-        private boolean initKeyStore;
-        private final PeerID seedPeer;
-        private final X509Certificate seedCert;
-        private final EncryptedPrivateKeyInfo seedKey;
-        
-        private final JLabel storePassLabel;
-        private final JPasswordField storePassField;
-        
-        private final JLabel identityLabel;
-        private final JComboBox identityList;
-        
-        private final JLabel identityPassLabel;
-        private final JPasswordField identityPassField;
-        
-        private final JButton okButton;
-        
-        private final JButton cancelButton;
-        
-        private boolean canceled = true;
-        
-        /**
-         *  Dialog to prompt for a password
-         **/
-        PasswordDialog(PeerID seedPeer, X509Certificate seedCert, EncryptedPrivateKeyInfo seedKey) {
-            super(JOptionPane.getRootFrame(), ((null != seedCert) ? "Initialize JXTA Keystore" : "JXTA Secure Login")
-                    , /* modal*/
-                    true);
-            
-            setDefaultCloseOperation(DISPOSE_ON_CLOSE);
-            addWindowListener(new WindowAdapter() {
-
-                /**
-                 * @inheritDoc
-                 */
-
-                @Override
-                public void windowClosing(WindowEvent e) {
-                    canceled = true;
-                }
-            });
-                    
-            this.seedPeer = seedPeer;
-            this.seedCert = seedCert;
-            this.seedKey = seedKey;
-            
-            initKeyStore = (null != seedCert);
-            
-            JPanel contentPane = new JPanel(new GridBagLayout());
-            GridBagConstraints c = new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, GridBagConstraints.FIRST_LINE_START
-                    ,
-                    GridBagConstraints.BOTH, new Insets(4, 4, 4, 4), 0, 0);
-            
-            storePassField = new JPasswordField("", 10);
-            
-            if (!initKeyStore) {
-                // add listener to populate identities list
-                storePassField.addKeyListener(new PasswordDialogKeyHandler());
-            }
-            
-            if (!initKeyStore) {
-                identityList = new JComboBox();
-            } else {
-                JComboEntry seedEntry = new JComboEntry(seedPeer, seedCert);
-                
-                Object[] names = { seedEntry };
-
-                identityList = new JComboBox(names);
-                identityList.setMaximumRowCount(1);
-            }
-            
-            identityPassField = new JPasswordField("", 10);
-            
-            identityPassField.addKeyListener(new PasswordDialogKeyHandler());
-            
-            storePassLabel = new JLabel("Key Store Password");
-            storePassLabel.setLabelFor(storePassField);
-            contentPane.add(storePassLabel, c);
-            c.gridx = 1;
-            contentPane.add(storePassField, c);
-            
-            c.gridx = 0;
-            c.gridy = 1;
-            c.anchor = GridBagConstraints.LINE_START;
-            identityLabel = new JLabel("Identity");
-            identityLabel.setLabelFor(identityList);
-            contentPane.add(identityLabel, c);
-            c.gridx = 1;
-            c.fill = GridBagConstraints.BOTH;
-            contentPane.add(identityList, c);
-            
-            c.gridx = 0;
-            c.gridy = 2;
-            c.fill = GridBagConstraints.BOTH;
-            identityPassLabel = new JLabel("Identity Password");
-            identityPassLabel.setLabelFor(identityPassField);
-            contentPane.add(identityPassLabel, c);
-            c.gridx = 1;
-            contentPane.add(identityPassField, c);
-            
-            JPanel buttonPanel = new JPanel(new GridLayout(/* rows*/1, /* cols*/0));
-
-            okButton = new JButton("OK");
-            okButton.addActionListener(this);
-            buttonPanel.add(okButton);
-            
-            cancelButton = new JButton("Cancel");
-            cancelButton.addActionListener(this);
-            buttonPanel.add(cancelButton);
-            
-            c.gridx = 0;
-            c.gridy = 3;
-            c.gridwidth = 2;
-            c.anchor = GridBagConstraints.LAST_LINE_END;
-            c.fill = GridBagConstraints.VERTICAL;
-            cancelButton.addActionListener(this);
-            contentPane.add(buttonPanel, c);
-            
-            setContentPane(contentPane);
-            
-            if (initKeyStore) {
-                identityPassField.requestFocusInWindow();
-            } else {
-                storePassField.requestFocusInWindow();
-            }
-        }
-        
-        /**
-         * Handler for key events.
-         **/
-        private class PasswordDialogKeyHandler extends KeyAdapter {
-
-            /**
-             *  {@inheritDoc}
-             **/
-            @Override
-            public void keyReleased(KeyEvent e) {
-                setOKState();
-            }
-        }
-        
-        /**
-         **/
-        private void setOKState() {
-            boolean enableOK = false;
-            
-            if (initKeyStore) {
-                enableOK = (null
-                        != PSEUtils.pkcs5_Decrypt_pbePrivateKey(identityPassField.getPassword()
-                        ,
-                        seedCert.getPublicKey().getAlgorithm(), seedKey));
-                
-                storePassLabel.setEnabled(enableOK);
-                storePassField.setEnabled(enableOK);
-            } else {
-                boolean enableIdentityList = false;
-                
-                ID[] roots = getIdentities(storePassField.getPassword());
-                
-                if (null != roots) {
-                    Iterator eachRoot = Arrays.asList(roots).iterator();
-                    
-                    while (eachRoot.hasNext()) {
-                        ID aPeer = (ID) eachRoot.next();
-                        
-                        try {
-                            X509Certificate aCert = DialogAuthenticator.this.source.getPSEConfig().getTrustedCertificate(aPeer);
-                            JComboEntry anEntry = new JComboEntry(aPeer, aCert);
-                            
-                            if (!enableIdentityList) {
-                                enableIdentityList = true;
-                                identityList.removeAllItems();
-                                identityList.setSelectedIndex(-1);
-                            }
-                            
-                            identityList.addItem(anEntry);
-                            identityList.setSelectedIndex(0);
-                        } catch (Exception ignore) {
-                            continue;
-                        }
-                    }
-                }
-                
-                if (enableIdentityList) {
-                    identityList.setMaximumRowCount(identityList.getItemCount());
-                } else {
-                    identityList.removeAllItems();
-                    identityList.setSelectedIndex(-1);
-                    identityPassField.setText("");
-                }
-                
-                identityLabel.setEnabled(enableIdentityList);
-                identityList.setEnabled(enableIdentityList);
-                identityPassLabel.setEnabled(enableIdentityList);
-                identityPassField.setEnabled(enableIdentityList);
-            }
-            
-            if ((null != getIdentity()) && (null != getKeyStorePassword()) && (null != getIdentityPassword())) {
-                setAuth1_KeyStorePassword(getKeyStorePassword());
-                setAuth2Identity(getIdentity());
-                setAuth3_IdentityPassword(getIdentityPassword());
-                enableOK = isReadyForJoin();
-            }
-            
-            okButton.setEnabled(enableOK);
-        }
-        
-        /**
-         *  {@inheritDoc}
-         **/
-        public void actionPerformed(ActionEvent e) {
-            
-            if (okButton == e.getSource()) {
-                canceled = false;
-                dispose();
-            } else if (cancelButton == e.getSource()) {
-                canceled = true;
-                dispose();
-            } else {}
-        }
-        
-        public void showDialog() {
-            pack();
-            setLocationRelativeTo(null);
-            
-            setOKState();
-            
-            setVisible(true);
-        }
-        
-        /**
-         *  Returns the KeyStore password.
-         *
-         *  @return the KeyStore password.
-         **/
-        public char[] getKeyStorePassword() {
-            if (!storePassField.isEnabled()) {
-                return null;
-            }
-            
-            char[] result = storePassField.getPassword();
-            
-            return result;
-        }
-        
-        /**
-         *  Returns the selected Identity.
-         *
-         *  @return the selected Identity.
-         **/
-        public ID getIdentity() {
-            if (!identityList.isEnabled()) {
-                return null;
-            }
-            
-            JComboEntry selectedIdentity = (JComboEntry) identityList.getSelectedItem();
-            
-            if (null == selectedIdentity) {
-                return null;
-            }
-            
-            return selectedIdentity.itsID;
-        }
-        
-        /**
-         *  Returns the Identity password.
-         *
-         *  @return the Identity password.
-         **/
-        public char[] getIdentityPassword() {
-            if (!identityPassField.isEnabled()) {
-                return null;
-            }
-            
-            char[] result = identityPassField.getPassword();
-            
-            return result;
-        }
-        
-        /**
-         *  Returns the final state of the dialog. Until the "OK" button is
-         *  pressed the dialog is "cancelled".
-         *
-         *  @param returns the final state of the dialog.
-         **/
-        public boolean wasCanceled() {
-            return canceled;
-        }
-    }
-    
-    /**
-     * Creates an authenticator for the PSE membership service. Anything entered
-     * into the identity info section of the Authentication credential is
-     * ignored.
-     *
-     *  @param source The instance of the PSE membership service which
-     *  created this authenticator.
-     *  @param application Anything entered into the identity info section of
-     *  the Authentication credential is ignored.
-     **/
-    DialogAuthenticator(PSEMembershipService source, AuthenticationCredential application) {
-        super(source, application);
-        
-        // XXX 20010328 bondolo@jxta.org Could do something with the authentication credential here.
-    }
-    
-    /**
-     * Creates an authenticator for the PSE membership service. Anything entered
-     * into the identity info section of the Authentication credential is
-     * ignored.
-     *
-     *  @param source The instance of the PSE membership service which
-     *  created this authenticator.
-     *  @param application Anything entered into the identity info section of
-     *  the Authentication credential is ignored.
-     **/
-    DialogAuthenticator(PSEMembershipService source, AuthenticationCredential application, X509Certificate seedCert, EncryptedPrivateKeyInfo seedKey) {
-        super(source, application, seedCert, seedKey);
-        
-        // XXX 20010328 bondolo@jxta.org Could do something with the authentication credential here.
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    @Override
-    public String getMethodName() {
-        return "DialogAuthentication";
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public boolean interact() {
-        PasswordDialog p = new PasswordDialog(source.group.getPeerID(), seedCert, seedKey);
-        
-        p.showDialog();
-        
-        if (p.wasCanceled()) {
-            setAuth1_KeyStorePassword((char[]) null);
-            setAuth2Identity((ID) null);
-            setAuth3_IdentityPassword((char[]) null);
-            
-        } else {
-            setAuth1_KeyStorePassword(p.getKeyStorePassword());
-            setAuth2Identity(p.getIdentity());
-            setAuth3_IdentityPassword(p.getIdentityPassword());
-        }
-        
-        return !p.wasCanceled();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/EngineAuthenticator.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/EngineAuthenticator.java
deleted file mode 100644 (file)
index 37720c1..0000000
+++ /dev/null
@@ -1,365 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.membership.pse;
-
-
-import java.net.URI;
-import java.util.Arrays;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.security.cert.X509Certificate;
-import javax.crypto.EncryptedPrivateKeyInfo;
-
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.security.KeyStoreException;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import net.jxta.credential.AuthenticationCredential;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.peer.PeerID;
-import net.jxta.membership.Authenticator;
-import net.jxta.membership.MembershipService;
-
-
-/**
- * An authenticator associated with the PSE membership service.
- *
- *@see net.jxta.membership.Authenticator
- *@see net.jxta.membership.MembershipService
- **/
-public class EngineAuthenticator implements Authenticator {
-    
-    /**
-     *  Log4J Logger
-     */
-    private static final Logger LOG = Logger.getLogger(EngineAuthenticator.class.getName());
-    
-    /**
-     * The Membership Service which generated this authenticator.
-     **/
-    transient PSEMembershipService source;
-    
-    /**
-     * The Authentication which was provided to the Apply operation of the
-     * membership service.
-     **/
-    transient AuthenticationCredential application;
-    
-    /**
-     *
-     **/
-    transient X509Certificate seedCert;
-    
-    /**
-     *
-     **/
-    transient PSEAuthenticatorEngine authenticatorEngine;
-    
-    /**
-     *
-     **/
-    // transient EncryptedPrivateKeyInfo seedKey;
-    
-    /**
-     * the password for that identity.
-     **/
-    transient char[] store_password = null;
-    
-    /**
-     * the identity which is being claimed
-     **/
-    transient ID identity = null;
-    
-    /**
-     * the password for that identity.
-     **/
-    transient char[] key_password = null;
-    
-    /**
-     * Creates an authenticator for the PSE membership service. Anything entered
-     * into the identity info section of the Authentication credential is
-     * ignored.
-     *
-     *  @param source The instance of the PSE membership service which
-     *  created this authenticator.
-     *  @param application Anything entered into the identity info section of
-     *  the Authentication credential is ignored.
-     **/
-    EngineAuthenticator(PSEMembershipService source, AuthenticationCredential application, PSEAuthenticatorEngine authenticatorEngine) {
-        // this( source, application );
-        
-        this.source = source;
-        this.application = application;
-        this.seedCert = authenticatorEngine.getX509Certificate();
-        this.authenticatorEngine = authenticatorEngine;
-    }
-    
-    /**
-     * Creates an authenticator for the PSE membership service. Anything entered
-     * into the identity info section of the Authentication credential is
-     * ignored.
-     *
-     *  @param source The instance of the PSE membership service which
-     *  created this authenticator.
-     *  @param application Anything entered into the identity info section of
-     *  the Authentication credential is ignored.
-     **/
-    EngineAuthenticator(PSEMembershipService source, AuthenticationCredential application) {
-        this.source = source;
-        this.application = application;
-        
-        // XXX 20010328 bondolo@jxta.org Could do something with the authentication credential here.
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    @Override
-    protected void finalize() throws Throwable {
-        if (null != store_password) {
-            Arrays.fill(store_password, '\0');
-        }
-        
-        if (null != key_password) {
-            Arrays.fill(key_password, '\0');
-        }
-        
-        super.finalize();
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public MembershipService getSourceService() {
-        return (MembershipService) source.getInterface();
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public AuthenticationCredential getAuthenticationCredential() {
-        return application;
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public String getMethodName() {
-        return "EngineAuthentication";
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    synchronized public boolean isReadyForJoin() {
-        if (null != seedCert) {
-            return authenticatorEngine.isEnginePresent();
-        } else {
-            return source.pseStore.validPasswd(identity, store_password, key_password);
-        }
-    }
-    
-    /**
-     *  Get KeyStore password
-     **/
-    public char[] getAuth1_KeyStorePassword() {
-        return store_password;
-    }
-    
-    /**
-     *  Set KeyStore password
-     **/
-    public void setAuth1_KeyStorePassword(String store_password) {
-        if (null == store_password) {
-            setAuth1_KeyStorePassword((char[]) null);
-        } else {
-            setAuth1_KeyStorePassword(store_password.toCharArray());
-        }
-    }
-    
-    /**
-     *  Set KeyStore password
-     **/
-    public void setAuth1_KeyStorePassword(char[] store_password) {
-        if (null != this.store_password) {
-            Arrays.fill(this.store_password, '\0');
-        }
-        
-        if (null == store_password) {
-            this.store_password = null;
-        } else {
-            this.store_password = store_password.clone();
-        }
-    }
-    
-    /**
-     *  Return the available identities.
-     **/
-    public PeerID[] getIdentities(char[] store_password) {
-        
-        if (seedCert != null) {
-            PeerID[] seed = { source.group.getPeerID() };
-
-            return seed;
-        } else {
-            try {
-                ID[] allkeys = source.pseStore.getKeysList(store_password);
-                
-                // XXX bondolo 20040329 it may be appropriate to login
-                // something other than a peer id.
-                List peersOnly = new ArrayList();
-                
-                Iterator eachKey = Arrays.asList(allkeys).iterator();
-                
-                while (eachKey.hasNext()) {
-                    ID aKey = (ID) eachKey.next();
-                    
-                    if (aKey instanceof PeerID) {
-                        peersOnly.add(aKey);
-                    }
-                }
-                
-                return (PeerID[]) peersOnly.toArray(new PeerID[peersOnly.size()]);
-            } catch (IOException failed) {
-                return null;
-            } catch (KeyStoreException failed) {
-                return null;
-            }
-        }
-    }
-    
-    public X509Certificate getCertificate(char[] store_password, ID aPeer) {
-        if (seedCert != null) {
-            if (aPeer.equals(source.group.getPeerID())) {
-                return seedCert;
-            } else {
-                return null;
-            }
-        } else {
-            try {
-                return source.pseStore.getTrustedCertificate(aPeer, store_password);
-            } catch (IOException failed) {
-                return null;
-            } catch (KeyStoreException failed) {
-                return null;
-            }
-        }
-    }
-    
-    /**
-     *  Get Identity
-     **/
-    public ID getAuth2Identity() {
-        return identity;
-    }
-    
-    /**
-     *  Set Identity
-     **/
-    public void setAuth2Identity(String id) {
-        try {
-            URI idURI = new URI(id);
-            ID identity = IDFactory.fromURI(idURI);
-
-            setAuth2Identity(identity);
-        } catch (URISyntaxException badID) {
-            throw new IllegalArgumentException("Bad ID");
-        } 
-    }
-    
-    /**
-     *  Set Identity
-     **/
-    public void setAuth2Identity(ID identity) {
-        this.identity = identity;
-    }
-    
-    /**
-     *  Get identity password
-     **/
-    public char[] getAuth3_IdentityPassword() {
-        return key_password;
-    }
-    
-    /**
-     *  Set identity password
-     **/
-    public void setAuth3_IdentityPassword(String key_password) {
-        setAuth3_IdentityPassword(key_password.toCharArray());
-    }
-    
-    /**
-     *  Set identity password
-     **/
-    public void setAuth3_IdentityPassword(char[] key_password) {
-        if (null != this.key_password) {
-            Arrays.fill(this.key_password, '\0');
-        }
-        
-        if (null == key_password) {
-            this.key_password = null;
-        } else {
-            this.key_password = key_password.clone();
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/FileKeyStoreManager.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/FileKeyStoreManager.java
deleted file mode 100644 (file)
index 21a2475..0000000
+++ /dev/null
@@ -1,293 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.membership.pse;
-
-
-import net.jxta.logging.Logging;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
-import java.security.NoSuchProviderException;
-import java.security.cert.CertificateException;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * Manages a Keystore located within a single File.
- */
-public class FileKeyStoreManager implements KeyStoreManager {
-
-    /**
-     * Log4J Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(URIKeyStoreManager.class.getName());
-
-    private final static String DEFAULT_KEYSTORE_TYPE = "jks";
-
-    private final static String DEFAULT_KEYSTORE_FILENAME = "jxta_keystore";
-
-    /**
-     * The keystore type
-     */
-    private final String keystore_type;
-
-    /**
-     * The keystore type
-     */
-    private final String keystore_provider;
-
-    /**
-     * The file where the keystore lives. This must be a file even if the
-     * keystore really is a set of files or a directory.
-     */
-    private final File keystore_location;
-
-    /**
-     * Default constructor.
-     *
-     * @param type keystore type
-     * @param provider the provider
-     * @param location Store location
-     * @throws NoSuchProviderException if the security provider requested is not available in the environment.
-     * @throws KeyStoreException if a keystore error occurs
-     */
-    public FileKeyStoreManager(String type, String provider, File location) throws NoSuchProviderException, KeyStoreException {
-        if (null == type) {
-            type = DEFAULT_KEYSTORE_TYPE;
-            provider = null;
-        }
-
-        // if provided a directory, use the default file name.
-        if (location.isDirectory()) {
-            location = new File(location, DEFAULT_KEYSTORE_FILENAME);
-        }
-
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            LOG.config("pse location = " + location);
-        }
-
-        keystore_type = type;
-
-        keystore_provider = provider;
-
-        keystore_location = location;
-
-        // check if we can get an instance.
-        if (null == keystore_provider) {
-            KeyStore.getInstance(keystore_type);
-        } else {
-            KeyStore.getInstance(keystore_type, keystore_provider);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isInitialized() {
-        return isInitialized(null);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isInitialized(char[] store_password) {
-        try {
-            KeyStore store;
-
-            if (null == keystore_provider) {
-                store = KeyStore.getInstance(keystore_type);
-            } else {
-                store = KeyStore.getInstance(keystore_type, keystore_provider);
-            }
-
-            store.load(keystore_location.toURI().toURL().openStream(), store_password);
-
-            return true;
-        } catch (Exception failed) {
-            return false;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void createKeyStore(char[] store_password) throws KeyStoreException, IOException {
-        try {
-            KeyStore store;
-
-            if (null == keystore_provider) {
-                store = KeyStore.getInstance(keystore_type);
-            } else {
-                store = KeyStore.getInstance(keystore_type, keystore_provider);
-            }
-
-            store.load(null, store_password);
-
-            saveKeyStore(store, store_password);
-        } catch (NoSuchProviderException failed) {
-            KeyStoreException failure = new KeyStoreException("NoSuchProviderException during keystore processing");
-
-            failure.initCause(failed);
-            throw failure;
-        } catch (NoSuchAlgorithmException failed) {
-            KeyStoreException failure = new KeyStoreException("NoSuchAlgorithmException during keystore processing");
-
-            failure.initCause(failed);
-            throw failure;
-        } catch (CertificateException failed) {
-            KeyStoreException failure = new KeyStoreException("CertificateException during keystore processing");
-
-            failure.initCause(failed);
-            throw failure;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public KeyStore loadKeyStore(char[] password) throws KeyStoreException, IOException {
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Loading (" + keystore_type + "," + keystore_provider + ") store from " + keystore_location);
-        }
-
-        try {
-            KeyStore store;
-
-            if (null == keystore_provider) {
-                store = KeyStore.getInstance(keystore_type);
-            } else {
-                store = KeyStore.getInstance(keystore_type, keystore_provider);
-            }
-
-            store.load(keystore_location.toURI().toURL().openStream(), password);
-
-            return store;
-        } catch (NoSuchAlgorithmException failed) {
-            KeyStoreException failure = new KeyStoreException("NoSuchAlgorithmException during keystore processing");
-
-            failure.initCause(failed);
-            throw failure;
-        } catch (CertificateException failed) {
-            KeyStoreException failure = new KeyStoreException("CertificateException during keystore processing");
-
-            failure.initCause(failed);
-            throw failure;
-        } catch (NoSuchProviderException failed) {
-            KeyStoreException failure = new KeyStoreException("NoSuchProviderException during keystore processing");
-
-            failure.initCause(failed);
-            throw failure;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void saveKeyStore(KeyStore store, char[] password) throws KeyStoreException, IOException {
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Writing " + store + " to " + keystore_location);
-        }
-
-        try {
-            OutputStream os = new FileOutputStream(keystore_location);
-
-            store.store(os, password);
-        } catch (NoSuchAlgorithmException failed) {
-            KeyStoreException failure = new KeyStoreException("NoSuchAlgorithmException during keystore processing");
-
-            failure.initCause(failed);
-            throw failure;
-        } catch (CertificateException failed) {
-            KeyStoreException failure = new KeyStoreException("CertificateException during keystore processing");
-
-            failure.initCause(failed);
-            throw failure;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void eraseKeyStore() throws IOException {
-
-        if (keystore_location.isFile() && keystore_location.canWrite()) {
-            keystore_location.delete();
-        } else {
-            throw new UnsupportedOperationException("Unable to delete");
-        }
-    }
-
-    /**
-     *  {@inheritDoc}
-     **/
-    public String toString() {
-        StringBuilder sb = new StringBuilder("PSE keystore details:  \n");
-        sb.append("   Class:  ").append(this.getClass().getName()).append("\n");
-        sb.append("   Type:  ").append(keystore_type==null ? "<default>" : keystore_type).append("\n");
-        sb.append("   Provider:  ").append(keystore_provider==null ? "<default>" : keystore_provider).append("\n");
-        sb.append("   Location:  ").append(keystore_location==null ? "<default>" : keystore_location.toString()).append("\n");
-        return sb.toString();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/KeyStoreManager.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/KeyStoreManager.java
deleted file mode 100644 (file)
index 0775320..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.membership.pse;
-
-
-import java.io.IOException;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-
-
-/**
- * Abstracts the management of KeyStores. This is commonly used to abstract the
- * location of the KeyStore and the details of creating, loading, saving and
- * deleting the KeyStore.
- * <p/>
- * <p/>Applications should not assume that accesses to KeyStoreManager are
- * thread safe. All access to the KeyStoreManager should be externally
- * synchronized on the KeyStoreManager object.
- */
-public interface KeyStoreManager {
-
-    /**
-     * Returns <tt>true</tt> if the KeyStore has been initialized (created).
-     * Since this method does not provide a passphrase it is really only useful
-     * for determining if a new KeyStore needs to be created.
-     *
-     * @return <tt>true</tt> if the KeyStore has been previously initialized
-     *         otherwise <tt>false</tt>.
-     * @throws KeyStoreException If the KeyStore is protected by a store
-     *                           password that has not been set.
-     */
-    boolean isInitialized() throws KeyStoreException;
-
-    /**
-     * Returns <tt>true</tt> if the Keystore has been initialized (created).
-     * This method also ensures that the provided passphrase is valid for the
-     * keystore.
-     *
-     * @param password The KeyStore passphrase.
-     * @return <tt>true</tt> if the Keystore has been initialized otherwise
-     *         <tt>false</tt>.
-     * @throws KeyStoreException If an incorrect KeyStore password is provided.
-     */
-    boolean isInitialized(char[] password) throws KeyStoreException;
-
-    /**
-     * Create the KeyStore using the specified KeyStore passphrase.
-     *
-     * @param password The KeyStore passphrase.
-     * @throws KeyStoreException If an incorrect KeyStore passphrase is provided.
-     * @throws IOException       If there is a problem creating the KeyStore.
-     */
-    void createKeyStore(char[] password) throws IOException, KeyStoreException;
-
-    /**
-     * Load the KeyStore.
-     *
-     * @param password The KeyStore passphrase.
-     * @throws KeyStoreException If an incorrect KeyStore password is provided.
-     * @throws IOException       If there is a problem loading the KeyStore.
-     * @return the keystore
-     */
-    KeyStore loadKeyStore(char[] password) throws IOException, KeyStoreException;
-
-    /**
-     * Save the provided KeyStore using the specified KeyStore passphrase.
-     *
-     * @param store    The KeyStore to save.
-     * @param password The encryption passphrase for the keystore.
-     * @throws IOException       Thrown for errors writing the keystore.
-     * @throws KeyStoreException Thrown for errors with the provided key or key store.
-     */
-    void saveKeyStore(KeyStore store, char[] password) throws IOException, KeyStoreException;
-
-    /**
-     * Erase the KeyStore. Some KeyStore implementations may not allow the
-     * KeyStore container itself to be erased and in some cases specific
-     * certificates and keys may be unerasable. All implementations should
-     * erase all user provided certificates and keys.
-     *
-     * @throws IOException If there is a problem erasing the KeyStore or the
-     *                     KeyStore cannot be erased.
-     */
-    void eraseKeyStore() throws IOException;
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSEAuthenticatorEngine.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSEAuthenticatorEngine.java
deleted file mode 100644 (file)
index 2c386bb..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.membership.pse;
-
-
-import java.security.PublicKey;
-import java.security.cert.X509Certificate;
-
-import java.io.IOException;
-import java.security.InvalidKeyException;
-import java.security.SignatureException;
-import java.security.NoSuchAlgorithmException;
-
-import net.jxta.peergroup.PeerGroup;
-
-
-/**
- *
- * @author  aubergine
- */
-public interface PSEAuthenticatorEngine {
-    
-    public PublicKey getPublicKey() throws SecurityException;
-    
-    public byte[] sign(byte[] data) throws InvalidKeyException, SignatureException, IOException;
-    
-    public String getSignatureAlgorithm();
-    
-    public boolean isEnginePresent() throws SecurityException;
-    
-    public X509Certificate getX509Certificate() throws SecurityException;
-    
-    public char[] getKeyPass(PeerGroup peerGroup) throws SecurityException;
-    
-    public char[] getStorePass(PeerGroup peerGroup) throws SecurityException;
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSEAuthenticatorEngineFactory.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSEAuthenticatorEngineFactory.java
deleted file mode 100644 (file)
index d1c6cf9..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.membership.pse;
-
-
-import net.jxta.document.Advertisement;
-import net.jxta.id.ID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.impl.protocol.PSEConfigAdv;
-
-
-/**
- *
- * @author nick
- */
-public abstract class PSEAuthenticatorEngineFactory {
-    
-    private static PSEAuthenticatorEngineFactory defaultEngine = null;
-    
-    public static void setPSESecurityEngineFactory(PSEAuthenticatorEngineFactory newEngine) {
-        synchronized (PSEAuthenticatorEngineFactory.class) {
-            defaultEngine = newEngine;
-        }
-    }
-    
-    /**
-     *   Returns the default Authenticator Engine.
-     *
-     *   @return The current default Authenticator Engine.
-     **/
-    public static PSEAuthenticatorEngineFactory getDefault() {
-        synchronized (PSEAuthenticatorEngineFactory.class) {
-            if (defaultEngine == null) {
-                defaultEngine = new PSEAuthenticatorEngineDefaultFactory();
-            }
-            
-            return defaultEngine;
-        }
-    }
-    
-    /**
-     *   Creates a new Authenticator Engine instance based upon the context and configuration.
-     *
-     *   @param service  The service that this keystore manager will be working for.
-     *   @param config   The configuration parameters.
-     **/
-    public abstract PSEAuthenticatorEngine getInstance(PSEMembershipService service, PSEConfigAdv config) throws PeerGroupException;
-    
-    /**
-     *   Default implementation which provides the default behaviour (which is to do nothing).
-     **/
-    private static class PSEAuthenticatorEngineDefaultFactory extends PSEAuthenticatorEngineFactory {
-
-        @Override
-        public PSEAuthenticatorEngine getInstance(PSEMembershipService service, PSEConfigAdv config) throws PeerGroupException {
-            return null;
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSEConfig.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSEConfig.java
deleted file mode 100644 (file)
index b578083..0000000
+++ /dev/null
@@ -1,648 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.membership.pse;
-
-
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.logging.Logging;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.security.*;
-import java.security.cert.Certificate;
-import java.security.cert.X509Certificate;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * Manages the state of a Personal Security Enviroment.
- */
-public final class PSEConfig {
-
-    /**
-     * Log4J Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(PSEConfig.class.getName());
-
-    /**
-     * Manager for the keystore we are using.
-     */
-    private final KeyStoreManager keystore_manager;
-
-    /**
-     * The keystore passphrase.
-     */
-    private char[] keystore_password = null;
-
-    /**
-     * Standard constructor.
-     *
-     * @param storeManager   The StoreManager to be used for this PSEConfig
-     *                       instance.
-     * @param store_password The passphrase for the keystore or <tt>null</tt>.
-     *                       The passphrase may be set independantly via
-     *                       {@link #setKeyStorePassword(char[])}.
-     */
-    PSEConfig(KeyStoreManager storeManager, char[] store_password) {
-        this.keystore_manager = storeManager;
-        setKeyStorePassword(store_password);
-    }
-
-    /**
-     * Sets the passphrase to be used when unlocking the keystore.
-     *
-     * @param store_password The passphrase used to unlock the keystore may be
-     *                       {@code null} for keystores with no passphrase.
-     */
-    public final void setKeyStorePassword(char[] store_password) {
-        if (null != this.keystore_password) {
-            Arrays.fill(this.keystore_password, '\0');
-        }
-
-        if (null == store_password) {
-            this.keystore_password = null;
-        } else {
-            this.keystore_password = store_password.clone();
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected void finalize() throws Throwable {
-        if (null != keystore_password) {
-            Arrays.fill(keystore_password, '\0');
-        }
-
-        super.finalize();
-    }
-
-    /**
-     * Returns {@code true} if the PSE has been initialized (created). Some
-     * keystore formats may not require initialization and may always return
-     * {@code true}. {@code false} may also be returned if the keystore passphrase is
-     * incorrect.
-     *
-     * @return {@code true} if the PSE has been previously initialized
-     *         otherwise {@code false}.
-     */
-    public boolean isInitialized() {
-        try {
-            if (keystore_password != null) {
-                return keystore_manager.isInitialized(keystore_password);
-            } else {
-                return keystore_manager.isInitialized();
-            }
-        } catch (Exception ignored) {
-            return false;
-        }
-    }
-
-    /**
-     * Initializes the PSE environment.
-     *
-     * @throws KeyStoreException When the wrong keystore has been provided.
-     * @throws IOException       For errors related to processing the keystore.
-     */
-    public void initialize() throws KeyStoreException, IOException {
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Initializing new PSE keystore...");
-        }
-
-        synchronized (keystore_manager) {
-            try {
-                if (keystore_manager.isInitialized(keystore_password)) {
-                    return;
-                }
-
-                keystore_manager.createKeyStore(keystore_password);
-            } catch (KeyStoreException failed) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Failure accessing or creating keystore.", failed);
-                }
-
-                keystore_manager.eraseKeyStore();
-
-                throw failed;
-            }
-        }
-    }
-
-    /**
-     * Removes an existing PSE enviroment.
-     *
-     * @throws IOException If the PSE cannot be successfully deleted.
-     */
-    public void erase() throws IOException {
-        synchronized (keystore_manager) {
-            keystore_manager.eraseKeyStore();
-        }
-    }
-
-    /**
-     * Gets a copy of the KeyStore associated with this PSE instance. The
-     * returned KeyStore is a copy and not tied to the instance maintained by
-     * the PSE. Changing the returned keystore will not result in changes to
-     * the PSE.
-     *
-     * @return The keystore or {@code null} if it cannot be retrieved.
-     */
-    public KeyStore getKeyStore() {
-        Throwable failure;
-
-        try {
-            return getKeyStore(keystore_password);
-        } catch (KeyStoreException failed) {
-            failure = failed;
-        } catch (IOException failed) {
-            failure = failed;
-        }
-
-        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-            LOG.warning("Failure recovering keystore : " + failure);
-        }
-
-        return null;
-    }
-
-    /**
-     * Gets a copy of the KeyStore associated with this PSE instance. The
-     * returned KeyStore is a copy and not tied to the instance maintained by
-     * the PSE. Changing the returned keystore will not result in changes to
-     * the PSE.
-     *
-     * @param store_password The passphrase used to unlock the keystore may be
-     *                       {@code null} for keystores with no passphrase.
-     * @return The keystore.
-     * @throws KeyStoreException When the wrong keystore has been provided.
-     * @throws IOException       For errors related to processing the keystore.
-     * @since JXTA 2.4
-     */
-    public KeyStore getKeyStore(char[] store_password) throws KeyStoreException, IOException {
-        synchronized (keystore_manager) {
-            KeyStore store = keystore_manager.loadKeyStore(store_password);
-
-            return store;
-        }
-    }
-
-    /**
-     * Check if the provided passwords are correct for the specified identity.
-     *
-     * @param id             The identity to be validated.
-     * @param store_password The passphrase used to unlock the keystore may be
-     *                       {@code null} for keystores with no passphrase.
-     * @param key_password   The passphrase associated with the private key or
-     *                       {@code null} if the key has no passphrase.
-     * @return {@code true} if the passwords were valid for the given id
-     *         otherwise {@code false}.
-     */
-    boolean validPasswd(ID id, char[] store_password, char[] key_password) {
-
-        if (null == id) {
-            return false;
-        }
-
-        Throwable failure;
-
-        try {
-            synchronized (keystore_manager) {
-                KeyStore store;
-
-                if (null != store_password) {
-                    store = keystore_manager.loadKeyStore(store_password);
-                } else {
-                    if (null != keystore_password) {
-                        store = keystore_manager.loadKeyStore(keystore_password);
-                    } else {
-                        throw new UnrecoverableKeyException("KeyStore passphrase not initialized");
-                    }
-                }
-
-                String alias = id.toString();
-
-                Key key = store.getKey(alias, key_password);
-
-                return (null != key);
-            }
-        } catch (UnrecoverableKeyException failed) {
-            failure = failed;
-        } catch (NoSuchAlgorithmException failed) {
-            failure = failed;
-        } catch (KeyStoreException failed) {
-            failure = failed;
-        } catch (IOException failed) {
-            failure = failed;
-        }
-
-        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-            LOG.warning("Failure checking passphrase : " + failure);
-        }
-
-        return false;
-    }
-
-    /**
-     * Returns the list of the trusted certificates available in this keystore.
-     *
-     * @return an array of the IDs of the available trusted certificates.
-     * @throws KeyStoreException When the wrong keystore has been provided.
-     * @throws IOException       For errors related to processing the keystore.
-     */
-    public ID[] getTrustedCertsList() throws KeyStoreException, IOException {
-        List<ID> trustedCertsList = new ArrayList<ID>();
-
-        synchronized (keystore_manager) {
-            KeyStore store = keystore_manager.loadKeyStore(keystore_password);
-
-            Enumeration<String> eachAlias = store.aliases();
-
-            while (eachAlias.hasMoreElements()) {
-                String anAlias = eachAlias.nextElement();
-
-                if (store.isCertificateEntry(anAlias) || store.isKeyEntry(anAlias)) {
-                    try {
-                        URI id = new URI(anAlias);
-
-                        trustedCertsList.add(IDFactory.fromURI(id));
-                    } catch (URISyntaxException badID) {// ignored
-                    }
-                }
-            }
-
-            return trustedCertsList.toArray(new ID[trustedCertsList.size()]);
-        }
-    }
-
-    /**
-     * Returns the list of root certificates for which there is an associated
-     * local private key.
-     *
-     * @return an array of the available keys. May be an empty array.
-     * @throws KeyStoreException When the wrong keystore has been provided.
-     * @throws IOException       For errors related to processing the keystore.
-     */
-    public ID[] getKeysList() throws KeyStoreException, IOException {
-        return getKeysList(keystore_password);
-    }
-
-    /**
-     * Returns the list of root certificates for which there is an associated
-     * local private key.
-     *
-     * @param store_password The passphrase used to unlock the keystore may be
-     *                       {@code null} for keystores with no passphrase.
-     * @return an array of the available keys. May be an empty array.
-     * @throws KeyStoreException When the wrong keystore has been provided.
-     * @throws IOException       For errors related to processing the keystore.
-     */
-    ID[] getKeysList(char[] store_password) throws KeyStoreException, IOException {
-        List<ID> keyedRootsList = new ArrayList<ID>();
-
-        synchronized (keystore_manager) {
-            KeyStore store = keystore_manager.loadKeyStore(store_password);
-
-            Enumeration<String> eachAlias = store.aliases();
-
-            while (eachAlias.hasMoreElements()) {
-                String anAlias = eachAlias.nextElement();
-
-                if (store.isKeyEntry(anAlias)) {
-                    try {
-                        URI id = new URI(anAlias);
-
-                        keyedRootsList.add(IDFactory.fromURI(id));
-                    } catch (URISyntaxException badID) {// ignored
-                    }
-                }
-            }
-
-            return keyedRootsList.toArray(new ID[keyedRootsList.size()]);
-        }
-    }
-
-    /**
-     * Returns the ID of the provided certificate or null if the certificate is
-     * not found in the keystore.
-     *
-     * @param cert The certificate who's ID is desired.
-     * @return The ID of the certificate or <tt>null</tt> if no matching
-     *         Certificate was found.
-     * @throws KeyStoreException When the wrong keystore has been provided.
-     * @throws IOException       For errors related to processing the keystore.
-     */
-    public ID getTrustedCertificateID(X509Certificate cert) throws KeyStoreException, IOException {
-
-        String anAlias = null;
-
-        synchronized (keystore_manager) {
-            KeyStore store = keystore_manager.loadKeyStore(keystore_password);
-
-            anAlias = store.getCertificateAlias(cert);
-        }
-
-        // not found.
-        if (null == anAlias) {
-            return null;
-        }
-
-        try {
-            URI id = new URI(anAlias);
-
-            return IDFactory.fromURI(id);
-        } catch (URISyntaxException badID) {
-            return null;
-        }
-    }
-
-    /**
-     * Returns the trusted cert for the specified id.
-     *
-     * @param id The id of the Certificate to retrieve.
-     * @return Certificate for the specified ID or null if the store does not
-     *         contain the specified certificate.
-     * @throws KeyStoreException When the wrong keystore key has been provided.
-     * @throws IOException       For errors related to processing the keystore.
-     */
-    public X509Certificate getTrustedCertificate(ID id) throws KeyStoreException, IOException {
-
-        return getTrustedCertificate(id, keystore_password);
-    }
-
-    /**
-     * Returns the trusted cert for the specified id.
-     *
-     * @param id             The id of the Certificate to retrieve.
-     * @param store_password The passphrase used to unlock the keystore may be
-     *                       {@code null} for keystores with no passphrase.
-     * @return Certificate for the specified ID or null if the store does not
-     *         contain the specified certificate.
-     * @throws KeyStoreException When the wrong keystore has been provided.
-     * @throws IOException       For errors related to processing the keystore.
-     */
-    X509Certificate getTrustedCertificate(ID id, char[] store_password) throws KeyStoreException, IOException {
-
-        String alias = id.toString();
-
-        synchronized (keystore_manager) {
-            KeyStore store = keystore_manager.loadKeyStore(store_password);
-
-            if (!store.containsAlias(alias)) {
-                return null;
-            }
-
-            return (X509Certificate) store.getCertificate(alias);
-        }
-    }
-
-    /**
-     * Returns the trusted cert chain for the specified id.
-     *
-     * @param id The ID of the certificate who's certificate chain is desired.
-     * @return Certificate chain for the specified ID or null if the PSE does
-     *         not contain the specified certificate.
-     * @throws KeyStoreException When the wrong keystore has been provided.
-     * @throws IOException       For errors related to processing the keystore.
-     */
-    public X509Certificate[] getTrustedCertificateChain(ID id) throws KeyStoreException, IOException {
-
-        String alias = id.toString();
-
-        synchronized (keystore_manager) {
-            KeyStore store = keystore_manager.loadKeyStore(keystore_password);
-
-            if (!store.containsAlias(alias)) {
-                return null;
-            }
-
-            Certificate certs[] = store.getCertificateChain(alias);
-
-            if (null == certs) {
-                return null;
-            }
-
-            X509Certificate x509certs[] = new X509Certificate[certs.length];
-
-            System.arraycopy(certs, 0, x509certs, 0, certs.length);
-
-            return x509certs;
-        }
-    }
-
-    /**
-     * Returns the private key for the specified ID.
-     *
-     * @param id           The ID of the requested private key.
-     * @param key_password The passphrase associated with the private key or
-     *                     {@code null} if the key has no passphrase.
-     * @return PrivateKey for the specified ID.
-     * @throws KeyStoreException When the wrong keystore has been provided.
-     * @throws IOException       For errors related to processing the keystore.
-     */
-    public PrivateKey getKey(ID id, char[] key_password) throws KeyStoreException, IOException {
-
-        String alias = id.toString();
-
-        try {
-            synchronized (keystore_manager) {
-                KeyStore store = keystore_manager.loadKeyStore(keystore_password);
-
-                if (!store.containsAlias(alias) || !store.isKeyEntry(alias)) {
-                    return null;
-                }
-
-                return (PrivateKey) store.getKey(alias, key_password);
-            }
-        } catch (NoSuchAlgorithmException failed) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Something failed", failed);
-            }
-
-            KeyStoreException failure = new KeyStoreException("Something Failed");
-
-            failure.initCause(failed);
-            throw failure;
-        } catch (UnrecoverableKeyException failed) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Key passphrase failure", failed);
-            }
-
-            KeyStoreException failure = new KeyStoreException("Key passphrase failure");
-
-            failure.initCause(failed);
-            throw failure;
-        }
-    }
-
-    /**
-     * Returns <tt>true</tt> if the specified id is associated with a private
-     * key.
-     *
-     * @param id The ID of the requested private key.
-     * @return <tt>true</tt> if a private key with the specified ID is present
-     *         otherwise <tt>false</tt>
-     * @throws KeyStoreException When the wrong keystore has been provided.
-     * @throws IOException       For errors related to processing the keystore.
-     */
-    public boolean isKey(ID id) throws KeyStoreException, IOException {
-        return isKey(id, keystore_password);
-    }
-
-    /**
-     * Returns <tt>true</tt> if the specified id is associated with a private
-     * key.
-     *
-     * @param id             The ID of the requested private key.
-     * @param store_password The passphrase used to unlock the keystore may be
-     *                       {@code null} for keystores with no passphrase.
-     * @return <tt>true</tt> if a private key with the specified ID is present
-     *         otherwise <tt>false</tt>
-     * @throws KeyStoreException When the wrong keystore has been provided.
-     * @throws IOException       For errors related to processing the keystore.
-     */
-    public boolean isKey(ID id, char[] store_password) throws KeyStoreException, IOException {
-        String alias = id.toString();
-
-        synchronized (keystore_manager) {
-            KeyStore store = keystore_manager.loadKeyStore(store_password);
-
-            return store.containsAlias(alias) & store.isKeyEntry(alias);
-        }
-    }
-
-    /**
-     * Adds a trusted certificate with the specified id to the key store. The
-     * certificate replaces any existing certificate or private key stored at
-     * this ID.
-     *
-     * @param id   The ID under which the certificate will be stored.
-     * @param cert Certificate for the specified ID.
-     * @throws KeyStoreException When the wrong keystore has been provided.
-     * @throws IOException       For errors related to processing the keystore.
-     */
-    public void setTrustedCertificate(ID id, X509Certificate cert) throws KeyStoreException, IOException {
-        String alias = id.toString();
-
-        synchronized (keystore_manager) {
-            KeyStore store = keystore_manager.loadKeyStore(keystore_password);
-
-            store.deleteEntry(alias);
-
-            store.setCertificateEntry(alias, cert);
-
-            keystore_manager.saveKeyStore(store, keystore_password);
-        }
-    }
-
-    /**
-     * Adds a private key to the PSE using the specified ID. The key replaces
-     * any existing certificate or private key stored at this ID. The key is
-     * stored using the provided key passphrase.
-     *
-     * @param id           The ID under which the certificate chain and private key will be stored.
-     * @param certchain    The certificate chain matching the private key.
-     * @param key          The private key to be stored in the kestore.
-     * @param key_password The passphrase associated with the private key or
-     *                     {@code null} if the key has no passphrase.
-     * @throws KeyStoreException When the wrong keystore key has been provided.
-     * @throws IOException       For errors related to processing the keystore.
-     */
-    public void setKey(ID id, Certificate[] certchain, PrivateKey key, char[] key_password) throws KeyStoreException, IOException {
-
-        String alias = id.toString();
-
-        synchronized (keystore_manager) {
-            KeyStore store = keystore_manager.loadKeyStore(keystore_password);
-
-            // Remove any existing entry.
-            store.deleteEntry(alias);
-
-            store.setKeyEntry(alias, key, key_password, certchain);
-
-            keystore_manager.saveKeyStore(store, keystore_password);
-        }
-    }
-
-    /**
-     * Erases the specified id from the keystore.
-     *
-     * @param id The ID of the key or certificate to be deleted.
-     * @throws KeyStoreException When the wrong keystore password has been
-     *                           provided.
-     * @throws IOException       For errors related to processing the keystore.
-     */
-    public void erase(ID id) throws KeyStoreException, IOException {
-        String alias = id.toString();
-
-        synchronized (keystore_manager) {
-            KeyStore store = keystore_manager.loadKeyStore(keystore_password);
-
-            store.deleteEntry(alias);
-
-            keystore_manager.saveKeyStore(store, keystore_password);
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSECredential.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSECredential.java
deleted file mode 100644 (file)
index 0916f00..0000000
+++ /dev/null
@@ -1,861 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.membership.pse;
-
-
-import net.jxta.credential.Credential;
-import net.jxta.credential.CredentialPCLSupport;
-import net.jxta.document.Attributable;
-import net.jxta.document.Attribute;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.logging.Logging;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.service.Service;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.SequenceInputStream;
-import java.io.StringReader;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.security.InvalidKeyException;
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
-import java.security.PrivateKey;
-import java.security.Signature;
-import java.security.SignatureException;
-import java.security.cert.CertPath;
-import java.security.cert.CertificateExpiredException;
-import java.security.cert.CertificateFactory;
-import java.security.cert.CertificateNotYetValidException;
-import java.security.cert.X509Certificate;
-import java.security.cert.Certificate;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Date;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Timer;
-import java.util.TimerTask;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * This class provides the sub-class of Credential which is associated with the
- * PSE membership service.
- * <p/>
- * There are two varients of the credential:
- * <p/>
- * <ul>
- * <li>local - Generated as a result of local login. This type of
- * credential can be used for signing and can be serialized for inclusion
- * in protocols.</li>
- * <li>remote - Generated as a result of deserialization from protocols.
- * The credential is verified to ensure that the contents are valid at the
- * time it is created.</li>
- * </ul>
- * <p/>
- * The schema for this credential format:
- * <p/>
- * <pre><code>
- *  &lt;xs:element name="PSECred" type="jxta:PSECred" />
- * <p/>
- *  &lt;xs:complexType name="PSECred">
- *    &lt;xs:sequence>
- *      &lt;xs:element name="PeerGroupID" type="jxta:JXTAID" />
- *      &lt;xs:element name="PeerID" type="jxta:JXTAID" />
- *      &lt;!-- An X.509 Certificate -->
- *      &lt;xs:element name="Certificate" type="xs:string" minOccurs="1" maxOccurs="unbounded" />
- *      &lt;!-- A SHA1WithRSA Signature -->
- *      &lt;xs:element name="Signature" type="xs:string" />
- *    &lt;/xs:sequence>
- *  &lt;/xs:complexType>
- *  &lt;/code></pre>
- * <p/>
- * FIXME 20050625 bondolo If the certificate chain for a credential is
- * updated in the PSE keystore after a credential is created then the
- * credential instance will not reflect those changes. This can be a problem if
- * the issuer chain changes or expiries are updated. Even though it's going to
- * be hit on performance PSECredential needs to changed to be backed by the PSE
- * keystore directly rather than containing the certs. Either that or some kind
- * of notification systems. It's probably best to assume that our simple cm
- * based keystore is the easiest and least dynamic case. Every other key store
- * is going to be more dynamic and difficult. The work around for now is to
- * force a membership resign everytime the keystore contents are changed.
- *
- * @see net.jxta.credential.Credential
- * @see net.jxta.impl.membership.pse.PSEMembershipService
- */
-public final class PSECredential implements Credential, CredentialPCLSupport {
-
-    /**
-     * Logger
-     */
-    private static final Logger LOG = Logger.getLogger(PSECredential.class.getName());
-
-    /**
-     * A Timer we use for managing the cert expirations.
-     */
-    private static Timer expirationTimer = new Timer("PSECredential Expiration Timer", true);
-
-    /**
-     * The MembershipService service which generated this credential.
-     * <p/>
-     * XXX 20030609 bondolo@jxta.org Perhaps this should be a weak reference.
-     */
-    private PSEMembershipService source;
-
-    /**
-     * The peer group associated with this credential.
-     */
-    private ID peerGroupID = null;
-
-    /**
-     * The peerid associated with this credential.
-     */
-    private ID peerID = null;
-
-    /**
-     * The pse alias from which this credential was generated. Only locally
-     * created credentials will be intialized with a key ID.
-     */
-    private ID keyID = null;
-
-    /**
-     * The identity associated with this credential
-     */
-    private CertPath certs = null;
-
-    /**
-     * The private key associated with this credential. Used for signing. Only
-     * a locally created credential will have an initialized private key.
-     */
-    private PrivateKey privateKey = null;
-
-    /**
-     * Optional Timer task
-     */
-    private TimerTask becomesValidTask = null;
-    private TimerTask expiresTask = null;
-
-    /**
-     * Are we still a valid credential?
-     */
-    private boolean valid = true;
-
-    /**
-     * Is this a local credential?
-     */
-    private final boolean local;
-
-    /**
-     * property change support
-     */
-    private PropertyChangeSupport support = new PropertyChangeSupport(this);
-
-    /**
-     * Create a new local credential. This credential can be used for signing
-     * and can be serialized.
-     */
-    protected PSECredential(PSEMembershipService source, ID keyID, CertPath certChain, PrivateKey privateKey) throws IOException {
-        this.source = source;
-        this.peerID = source.group.getPeerID();
-        this.peerGroupID = source.group.getPeerGroupID();
-        setKeyID(keyID);
-        setCertificateChain(certChain);
-        setPrivateKey(privateKey);
-        this.local = true;
-    }
-
-    /**
-     * Create a new remote credential. This credential cannot be used for
-     * signing and cannot be re-serialized.
-     */
-    public PSECredential(Element root) {
-        this.local = false;
-        initialize(root);
-    }
-
-    /**
-     * Create a new remote credential. This credential cannot be used for
-     * signing and cannot be re-serialized.
-     */
-    public PSECredential(PSEMembershipService source, Element root) {
-        this.local = false;
-        this.source = source;
-        initialize(root);
-
-        if (!peerGroupID.equals(source.group.getPeerGroupID())) {
-            throw new IllegalArgumentException(
-                    "Credential is from a different group. " + peerGroupID + " != " + source.group.getPeerGroupID());
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {
-
-        if (this == target) {
-            return true;
-        }
-
-        if (target instanceof PSECredential) {
-            PSECredential asCred = (PSECredential) target;
-
-            boolean result = peerID.equals(asCred.peerID)
-                    && source.group.getPeerGroupID().equals(asCred.source.group.getPeerGroupID());
-
-            result &= certs.equals(asCred.certs);
-
-            return result;
-        }
-
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected void finalize() throws Throwable {
-        if (null != becomesValidTask) {
-            becomesValidTask.cancel();
-        }
-
-        if (null != expiresTask) {
-            expiresTask.cancel();
-        }
-
-        super.finalize();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        int result = peerID.hashCode() * source.group.getPeerGroupID().hashCode() * certs.hashCode();
-
-        if (0 == result) {
-            result = 1;
-        }
-
-        return result;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String toString() {
-        return "\"" + getSubject() + "\" " + getPeerID() + " [" + source + " / " + getPeerGroupID() + "]";
-    }
-
-    /**
-     * Add a listener
-     *
-     * @param listener the listener
-     */
-    public void addPropertyChangeListener(PropertyChangeListener listener) {
-        support.addPropertyChangeListener(listener);
-    }
-
-    /**
-     * Add a listener
-     *
-     * @param propertyName the property to watch
-     * @param listener     the listener
-     */
-    public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
-        support.addPropertyChangeListener(propertyName, listener);
-    }
-
-    /**
-     * Remove a listener
-     *
-     * @param listener the listener
-     */
-    public void removePropertyChangeListener(PropertyChangeListener listener) {
-        support.removePropertyChangeListener(listener);
-    }
-
-    /**
-     * Remove a listener
-     *
-     * @param propertyName the property which was watched
-     * @param listener     the listener
-     */
-    public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
-        support.removePropertyChangeListener(propertyName, listener);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ID getPeerGroupID() {
-        return peerGroupID;
-    }
-
-    /**
-     * set the peer id associated with this credential
-     */
-    private void setPeerGroupID(ID newID) {
-        this.peerGroupID = newID;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ID getPeerID() {
-        return peerID;
-    }
-
-    /**
-     * set the peer id associated with this credential
-     */
-    private void setPeerID(PeerID peerID) {
-        this.peerID = peerID;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * A PSE Credential is valid as long as the associated certificate is
-     * valid.
-     */
-    public boolean isExpired() {
-        try {
-            ((X509Certificate) certs.getCertificates().get(0)).checkValidity();
-            return false;
-        } catch (CertificateExpiredException expired) {
-            return true;
-        } catch (CertificateNotYetValidException notyet) {
-            return true;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * A PSE Credential is valid as long as the associated certificate is
-     * valid and as long as the membership service still has the credential.
-     */
-    public boolean isValid() {
-        return valid && !isExpired();
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * A PSE Credential is valid as long as the associated certificate is
-     * valid.
-     */
-    void setValid(boolean valid) {
-        boolean oldValid = isValid();
-
-        this.valid = valid;
-
-        if (oldValid != valid) {
-            support.firePropertyChange("valid", oldValid, valid);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Object getSubject() {
-        return ((X509Certificate) certs.getCertificates().get(0)).getSubjectDN();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Service getSourceService() {
-        return source;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public StructuredDocument getDocument(MimeMediaType encodeAs) throws Exception {
-        if (!isValid()) {
-            throw new javax.security.cert.CertificateException("Credential is not valid. Cannot generate document.");
-        }
-
-        if (!local) {
-            throw new IllegalStateException("This credential is not a local credential and document cannot be created.");
-        }
-
-        StructuredDocument doc = StructuredDocumentFactory.newStructuredDocument(encodeAs, "jxta:Cred");
-
-        if (doc instanceof XMLDocument) {
-            ((XMLDocument) doc).addAttribute("xmlns:jxta", "http://jxta.org");
-            ((XMLDocument) doc).addAttribute("xml:space", "preserve");
-        }
-
-        if (doc instanceof Attributable) {
-            ((Attributable) doc).addAttribute("type", "jxta:PSECred");
-        }
-
-        Element e;
-
-        e = doc.createElement("PeerGroupID", getPeerGroupID().toString());
-        doc.appendChild(e);
-
-        e = doc.createElement("PeerID", getPeerID().toString());
-        doc.appendChild(e);
-
-        // add the Certificate element
-
-        net.jxta.impl.protocol.Certificate certChain = new net.jxta.impl.protocol.Certificate();
-
-        List certsList = certs.getCertificates();
-
-        certChain.setCertificates(certsList);
-
-        StructuredDocument certsDoc = (StructuredDocument) certChain.getDocument(encodeAs);
-
-        if (certsDoc instanceof Attributable) {
-            ((Attributable) certsDoc).addAttribute("type", certsDoc.getKey().toString());
-        }
-
-        StructuredDocumentUtils.copyElements(doc, doc, certsDoc, "Certificate");
-
-        // Add the signature.
-
-        List someStreams = new ArrayList(3);
-
-        try {
-            someStreams.add(new ByteArrayInputStream(getPeerGroupID().toString().getBytes("UTF-8")));
-            someStreams.add(new ByteArrayInputStream(getPeerID().toString().getBytes("UTF-8")));
-            for (Object aCertsList : certsList) {
-                X509Certificate aCert = (X509Certificate) aCertsList;
-
-                someStreams.add(new ByteArrayInputStream(aCert.getEncoded()));
-            }
-
-            InputStream signStream = new SequenceInputStream(Collections.enumeration(someStreams));
-
-            byte[] sig = source.peerSecurityEngine.sign(source.peerSecurityEngine.getSignatureAlgorithm(), this, signStream);
-
-            e = doc.createElement("Signature", PSEUtils.base64Encode(sig));
-            doc.appendChild(e);
-        } catch (java.io.UnsupportedEncodingException never) {// UTF-8 is always available
-        }
-
-        if (doc instanceof Attributable) {
-            ((Attributable) doc).addAttribute("algorithm", source.peerSecurityEngine.getSignatureAlgorithm());
-        }
-
-        return doc;
-    }
-
-    /**
-     * Returns the certificate associated with this credential.
-     *
-     * @return the certificate associated with this credential.
-     */
-    public X509Certificate getCertificate() {
-        return (X509Certificate) certs.getCertificates().get(0);
-    }
-
-    /**
-     * Returns the certificate chain associated with this credential.
-     *
-     * @return the certificate chain associated with this credential.
-     */
-    public X509Certificate[] getCertificateChain() {
-        List certList = certs.getCertificates();
-
-        return (X509Certificate[]) certList.toArray(new X509Certificate[certList.size()]);
-    }
-
-    /**
-     * Set the certificate associated with this credential
-     *
-     * @param certChain the certificate chain associated with this credential.
-     */
-    private void setCertificateChain(CertPath certChain) {
-
-        certs = certChain;
-
-        Date now = new Date();
-        Date becomesValid = ((X509Certificate) certs.getCertificates().get(0)).getNotBefore();
-        Date expires = ((X509Certificate) certs.getCertificates().get(0)).getNotAfter();
-
-        if (becomesValid.compareTo(now) > 0) {
-            if (null != becomesValidTask) {
-                becomesValidTask.cancel();
-            }
-
-            becomesValidTask = new TimerTask() {
-
-                @Override
-                public void run() {
-                    support.firePropertyChange("expired", false, true);
-                    if (valid) {
-                        support.firePropertyChange("valid", false, true);
-                    }
-                }
-            };
-
-            expirationTimer.schedule(becomesValidTask, becomesValid);
-        }
-
-        if (null != expiresTask) {
-            expiresTask.cancel();
-        }
-
-        if (expires.compareTo(now) > 0) {
-            expiresTask = new TimerTask() {
-
-                @Override
-                public void run() {
-                    support.firePropertyChange("expired", true, false);
-                    if (valid) {
-                        support.firePropertyChange("valid", true, false);
-                    }
-                }
-            };
-
-            expirationTimer.schedule(expiresTask, expires);
-        }
-
-        boolean nowGood = (null == becomesValidTask) && (null != expiresTask);
-
-        support.firePropertyChange("expired", true, nowGood);
-        setValid(nowGood);
-    }
-
-    /**
-     * Returns the private key associated with this credential. Only valid for
-     * locally generated credentials.
-     *
-     * @return the private key associated with this credential.
-     * @deprecated Use <@link #getSigner(String)> or <@link #getSignatureVerifier(String)> instead.
-     */
-    @Deprecated
-    public PrivateKey getPrivateKey() {
-
-        if (!local) {
-            throw new IllegalStateException("This credential is not a local credential and cannot be used for signing.");
-        }
-
-        if (null == privateKey) {
-            throw new IllegalStateException("This local credential is engine based and cannot provide the private key.");
-        }
-
-        return privateKey;
-    }
-
-    /**
-     * Sets the private key associated with this credential.
-     *
-     * @param privateKey the private key associated with this credential.
-     */
-    private void setPrivateKey(PrivateKey privateKey) {
-
-        this.privateKey = privateKey;
-    }
-
-    /**
-     * Returns the key id associated with this credential, if any. Only locally
-     * generated credentials have a key ID.
-     *
-     * @return Returns the key id associated with this credential, if any.
-     */
-    public ID getKeyID() {
-        return keyID;
-    }
-
-    /**
-     * Sets the key id associated with this credential.
-     */
-    private void setKeyID(ID keyID) {
-        this.keyID = keyID;
-    }
-
-    /**
-     * Get a Signature object based upon the private key associated with this
-     * credential.
-     *
-     * @param algorithm the signing algorithm to use.
-     * @return Signature.
-     */
-    public Signature getSigner(String algorithm) throws NoSuchAlgorithmException {
-        if (!local) {
-            throw new IllegalStateException("This credential is not a local credential and cannot be used for signing.");
-        }
-
-        Signature sign = Signature.getInstance(algorithm);
-
-        try {
-            sign.initSign(privateKey);
-        } catch (java.security.InvalidKeyException failed) {
-            IllegalStateException failure = new IllegalStateException("Invalid private key");
-
-            failure.initCause(failed);
-            throw failure;
-        }
-
-        return sign;
-    }
-
-    /**
-     * /**
-     * Get a Signature verifier object based upon the certificate associated
-     * with this credential.
-     *
-     * @param algorithm the signing algorithm to use.
-     * @return Signature.
-     */
-    public Signature getSignatureVerifier(String algorithm) throws NoSuchAlgorithmException {
-        Signature verify = Signature.getInstance(algorithm);
-
-        try {
-            verify.initVerify((X509Certificate) certs.getCertificates().get(0));
-        } catch (java.security.InvalidKeyException failed) {
-            IllegalStateException failure = new IllegalStateException("Invalid certificate");
-
-            failure.initCause(failed);
-            throw failure;
-        }
-
-        return verify;
-    }
-
-    /**
-     * Process an individual element from the document.
-     *
-     * @param elem the element to be processed.
-     * @return true if the element was recognized, otherwise false.
-     */
-    protected boolean handleElement(XMLElement elem) {
-        if (elem.getName().equals("PeerGroupID")) {
-            try {
-                ID pid = IDFactory.fromURI(new URI(elem.getTextValue()));
-
-                setPeerGroupID((PeerGroupID) pid);
-            } catch (URISyntaxException badID) {
-                throw new IllegalArgumentException("Bad PeerGroupID in advertisement: " + elem.getTextValue());
-            } catch (ClassCastException badID) {
-                throw new IllegalArgumentException("Id is not a group id: " + elem.getTextValue());
-            }
-            return true;
-        }
-
-        if (elem.getName().equals("PeerID")) {
-            try {
-                ID pid = IDFactory.fromURI(new URI(elem.getTextValue()));
-
-                setPeerID((PeerID) pid);
-            } catch (URISyntaxException badID) {
-                throw new IllegalArgumentException("Bad Peer ID in advertisement: " + elem.getTextValue());
-            } catch (ClassCastException badID) {
-                throw new IllegalArgumentException("Id is not a peer id: " + elem.getTextValue());
-            }
-            return true;
-        }
-
-        if (elem.getName().equals("Certificate")) {
-            // XXX Compatibility hack so that net.jxta.impl.protocol.Certificate will recognize element
-            // as a certificate.
-            if (null == elem.getAttribute("type")) {
-                elem.addAttribute("type", net.jxta.impl.protocol.Certificate.getMessageType());
-            }
-
-            net.jxta.impl.protocol.Certificate certChain = new net.jxta.impl.protocol.Certificate(elem);
-
-            try {
-                CertificateFactory cf = CertificateFactory.getInstance("X.509");
-
-                certs = cf.generateCertPath(Arrays.asList(certChain.getCertificates()));
-            } catch (java.security.cert.CertificateException failure) {
-                throw new IllegalArgumentException("bad certificates in chain.");
-            }
-
-            return true;
-        }
-
-        if (elem.getName().equals("Signature")) {
-
-            if (null == certs) {
-                throw new IllegalArgumentException("Signature out of order in Credential.");
-            }
-
-            List<InputStream> someStreams = new ArrayList<InputStream>(3);
-
-            try {
-                byte[] signatureToCompare = PSEUtils.base64Decode(new StringReader(elem.getTextValue()));
-
-                someStreams.add(new ByteArrayInputStream(getPeerGroupID().toString().getBytes("UTF-8")));
-                someStreams.add(new ByteArrayInputStream(getPeerID().toString().getBytes("UTF-8")));
-                Iterator eachCert = certs.getCertificates().iterator();
-
-                for (Certificate certificate : certs.getCertificates()) {
-                    X509Certificate aCert = (X509Certificate) certificate;
-
-                    someStreams.add(new ByteArrayInputStream(aCert.getEncoded()));
-                }
-
-                InputStream signStream = new SequenceInputStream(Collections.enumeration(someStreams));
-
-                // FIXME 20051007 bondolo Fix handling of signature type.
-
-                if (!PSEUtils.verifySignature("SHA1WITHRSA", getCertificate(), signatureToCompare, signStream)) {
-                    throw new IllegalArgumentException("Certificated did not match");
-                }
-            } catch (Throwable failed) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failed to validate signature ", failed);
-                }
-
-                throw new IllegalArgumentException("Failed to validate signature " + failed.getMessage());
-            }
-
-            return true;
-        }
-
-        // element was not handled
-        return false;
-    }
-
-    /**
-     * Intialize from a portion of a structured document.
-     */
-    protected void initialize(Element root) {
-
-        if (!XMLElement.class.isInstance(root)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports XMLElement");
-        }
-
-        XMLElement doc = (XMLElement) root;
-
-        String typedoctype = "";
-
-        Attribute itsType = doc.getAttribute("type");
-
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-
-        String doctype = doc.getName();
-
-        if (!doctype.equals("jxta:PSECred") && !typedoctype.equals("jxta:PSECred")) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doctype);
-        }
-
-        Enumeration elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            XMLElement elem = (XMLElement) elements.nextElement();
-
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Unhandled element \'" + elem.getName() + "\' in " + doc.getName());
-                }
-            }
-        }
-
-        // sanity check time!
-
-        if (null == getSubject()) {
-            throw new IllegalArgumentException("subject was never initialized.");
-        }
-
-        if (null == getPeerGroupID()) {
-            throw new IllegalArgumentException("peer group was never initialized.");
-        }
-
-        if (null == getPeerID()) {
-            throw new IllegalArgumentException("peer id was never initialized.");
-        }
-
-        if (null == certs) {
-            throw new IllegalArgumentException("certificates were never initialized.");
-        }
-
-        // FIXME bondolo@jxta.org 20030409 should check for duplicate elements and for peergroup element
-    }
-
-    public X509Certificate[] generateServiceCertificate(ID assignedID) throws IOException, KeyStoreException, InvalidKeyException, SignatureException {
-        return source.generateServiceCertificate(assignedID, this);
-    }
-
-    public PSECredential getServiceCredential(ID assignedID) throws IOException, PeerGroupException, InvalidKeyException, SignatureException {
-        return source.getServiceCredential(assignedID, this);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSECrendentialBeanInfo.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSECrendentialBeanInfo.java
deleted file mode 100644 (file)
index cf48a89..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.membership.pse;
-
-
-import java.beans.BeanDescriptor;
-import java.beans.EventSetDescriptor;
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyDescriptor;
-import java.beans.SimpleBeanInfo;
-
-import java.beans.IntrospectionException;
-import java.lang.reflect.UndeclaredThrowableException;
-
-
-/**
- *  BeanInfo for PSECrendential
- **/
-public class PSECrendentialBeanInfo extends SimpleBeanInfo {
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public BeanDescriptor getBeanDescriptor() {
-        return new BeanDescriptor(PSECredential.class);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public EventSetDescriptor[] getEventSetDescriptors() {
-        try {
-            EventSetDescriptor changed = new EventSetDescriptor(PSECredential.class, "propertyChange"
-                    ,
-                    PropertyChangeListener.class, "propertyChange");
-            
-            changed.setDisplayName("bound property change");
-            
-            EventSetDescriptor[] rv = { changed };
-
-            return rv;
-        } catch (IntrospectionException failed) {
-            throw new UndeclaredThrowableException(failed, "Configuration error");
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public PropertyDescriptor[] getPropertyDescriptors() {
-        try {
-            PropertyDescriptor subject = new PropertyDescriptor("subject", PSECredential.class);
-            
-            PropertyDescriptor peerid = new PropertyDescriptor("peerID", PSECredential.class);
-            
-            PropertyDescriptor peerGroupID = new PropertyDescriptor("peerGroupID", PSECredential.class);
-            
-            PropertyDescriptor certificate = new PropertyDescriptor("certificate", PSECredential.class);
-            
-            PropertyDescriptor privatekey = new PropertyDescriptor("privateKey", PSECredential.class);
-            
-            PropertyDescriptor expired = new PropertyDescriptor("expired", PSECredential.class);
-
-            expired.setBound(true);
-            
-            PropertyDescriptor valid = new PropertyDescriptor("valid", PSECredential.class);
-
-            valid.setBound(true);
-            
-            PropertyDescriptor rv[] = { subject, peerid, peerGroupID, certificate, privatekey, expired, valid };
-            
-            return rv;
-        } catch (IntrospectionException failed) {
-            throw new UndeclaredThrowableException(failed, "Configuration error");
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSEKeyStoreManagerFactory.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSEKeyStoreManagerFactory.java
deleted file mode 100644 (file)
index 3d28b78..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.membership.pse;
-
-
-import java.util.NoSuchElementException;
-import java.net.URI;
-import java.io.File;
-
-import java.security.KeyStoreException;
-import java.security.NoSuchProviderException;
-
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.document.Advertisement;
-import net.jxta.id.ID;
-import net.jxta.document.Element;
-import net.jxta.protocol.ConfigParams;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.XMLElement;
-
-import net.jxta.impl.cm.Cm;
-import net.jxta.impl.peergroup.StdPeerGroup;
-import net.jxta.impl.protocol.PSEConfigAdv;
-
-
-/**
- *  Encapsulates the behaviour for creating KeyStoreManager Objects.
- **/
-public abstract class PSEKeyStoreManagerFactory {
-    
-    /**
-     *   The default KeyStoreManagerGenerator
-     **/
-    private static PSEKeyStoreManagerFactory defaultGenerator = null;
-    
-    /**
-     *   Sets the default KeyStoreManagerGenerator. 
-     *
-     *   @param newDefault The new default KeyStoreManagerGenerator.
-     **/
-    public static void setDefault(PSEKeyStoreManagerFactory newDefault) {
-        synchronized (PSEKeyStoreManagerFactory.class) {
-            defaultGenerator = newDefault;
-        }
-    }
-    
-    /**
-     *   Returns the default KeyStoreManagerGenerator.
-     *
-     *   @return The current default KeyStoreManagerGenerator.
-     **/
-    public static PSEKeyStoreManagerFactory getDefault() {
-        synchronized (PSEKeyStoreManagerFactory.class) {
-            if (defaultGenerator == null) {
-                defaultGenerator = new PSEKeyStoreManagerFactoryDefault();
-            }
-            
-            return defaultGenerator;
-        }
-    }
-    
-    /**
-     *   Creates a new KeyStoreManager instance based upon the context and configuration.
-     *
-     *   @param service  The service that this keystore manager will be working for.
-     *   @param config   The configuration parameters.
-     **/
-    public abstract KeyStoreManager getInstance(PSEMembershipService service, PSEConfigAdv config) throws PeerGroupException;
-
-    /**
-     *   Provides the default behaviour for generating KeyStore managers for PSE Membership Service Instances.    
-     **/
-    private static class PSEKeyStoreManagerFactoryDefault extends PSEKeyStoreManagerFactory {
-
-        /**
-         *   {@inheritDoc}
-         *   
-         *   <p/>If no location is specified then use the CMKeyStoreManager otherwise use the URIKeyStoreManager.
-         **/
-        @Override
-        public KeyStoreManager getInstance(PSEMembershipService service, PSEConfigAdv config) throws PeerGroupException {
-
-            URI location = config.getKeyStoreLocation();
-            KeyStoreManager store_manager;
-
-            try {
-                if (null == location) {
-                    store_manager = new CMKeyStoreManager(config.getKeyStoreType(), config.getKeyStoreProvider()
-                            ,
-                            service.getGroup(), service.getAssignedID());
-                } else {
-                    if (!location.isAbsolute()) {                        
-                        // Resolve the location of the keystore relative to our prefs location.
-                        location = service.group.getStoreHome().resolve(location);
-                    }
-
-                    store_manager = new URIKeyStoreManager(config.getKeyStoreType(), config.getKeyStoreProvider(), location);
-                }
-                
-                return store_manager;                
-            } catch (NoSuchProviderException not_available) {
-                throw new PeerGroupException("Requested KeyStore provider not available", not_available);
-            } catch (KeyStoreException bad) {
-                throw new PeerGroupException("KeyStore failure initializing KeyStoreManager", bad);
-            }
-        }
-    }  
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSEMembershipService.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSEMembershipService.java
deleted file mode 100644 (file)
index 0a6de2e..0000000
+++ /dev/null
@@ -1,797 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.membership.pse;
-
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.net.URI;
-import java.security.PrivateKey;
-import java.security.cert.CertPath;
-import java.security.cert.CertificateFactory;
-import java.security.cert.X509Certificate;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-
-import java.io.IOException;
-import java.security.KeyStoreException;
-import java.security.NoSuchProviderException;
-import java.security.cert.CertificateException;
-import java.security.InvalidKeyException;
-import java.security.SignatureException;
-import java.security.spec.InvalidKeySpecException;
-import java.util.NoSuchElementException;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import net.jxta.credential.AuthenticationCredential;
-import net.jxta.credential.Credential;
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.membership.Authenticator;
-import net.jxta.membership.MembershipService;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.platform.ModuleSpecID;
-import net.jxta.protocol.ConfigParams;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.service.Service;
-
-import net.jxta.id.ID;
-
-import net.jxta.exception.PeerGroupException;
-import net.jxta.exception.ProtocolNotSupportedException;
-
-import net.jxta.impl.protocol.Certificate;
-import net.jxta.impl.protocol.PSEConfigAdv;
-import net.jxta.impl.membership.pse.PSEUtils.IssuerInfo;
-
-
-/**
- *  A JXTA Membership Service utilizing PKI to provide secure identities.
- *
- *  @see net.jxta.membership.MembershipService
- **/
-public final class PSEMembershipService implements MembershipService {
-    
-    /**
-     *  Log4J Logger
-     **/
-    private final static transient Logger LOG = Logger.getLogger(PSEMembershipService.class.getName());
-    
-    /**
-     * Well known service specification identifier: pse membership
-     */
-    public final static ModuleSpecID pseMembershipSpecID = (ModuleSpecID) ID.create(
-            URI.create(ID.URIEncodingName + ":" + ID.URNNamespace + ":uuid-DeadBeefDeafBabaFeedBabe000000050306"));
-    
-    /**
-     * the peergroup to which this service is associated.
-     **/
-    PeerGroup group = null;
-    
-    /**
-     *  The ID assigned to this instance.
-     **/
-    private ID assignedID = null;
-    
-    /**
-     * The ModuleImplAdvertisement which was used to instantiate this service.
-     **/
-    private ModuleImplAdvertisement implAdvertisement = null;
-    
-    /**
-     * The current set of principals associated with this peer within this peergroup.
-     **/
-    private final List<PSECredential> principals = new ArrayList<PSECredential>();
-    
-    /**
-     * The set of AuthenticationCredentials which were used to establish the principals.
-     **/
-    private final List<AuthenticationCredential> authCredentials = new ArrayList<AuthenticationCredential>();
-    
-    /**
-     *  property change support
-     **/
-    private final PropertyChangeSupport support;
-    
-    /**
-     *  the keystore we are working with.
-     **/
-    PSEConfig pseStore = null;
-    
-    /**
-     *  the default credential
-     **/
-    private PSECredential defaultCredential = null;
-    
-    /**
-     *  The configuration we are using.
-     **/
-    private PSEConfigAdv config;
-    
-    /**
-     * PSEPeerSecurityEngine ( and PSEAuthenticatorEngine ) loader
-     */
-    
-    PSEPeerSecurityEngine peerSecurityEngine = null;
-    
-    private PSEAuthenticatorEngine authenticatorEngine = null;
-    
-    /**
-     *  Default constructor. Normally only called by the peer group.
-     **/
-    public PSEMembershipService() throws PeerGroupException {
-        support = new PropertyChangeSupport(getInterface());
-    }
-    
-    /**
-     *  @inheritDoc
-     **/
-    public void addPropertyChangeListener(PropertyChangeListener listener) {
-        support.addPropertyChangeListener(listener);
-    }
-    
-    /**
-     *  @inheritDoc
-     **/
-    public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
-        support.addPropertyChangeListener(propertyName, listener);
-    }
-    
-    /**
-     *  @inheritDoc
-     **/
-    public void removePropertyChangeListener(PropertyChangeListener listener) {
-        support.removePropertyChangeListener(listener);
-    }
-    
-    /**
-     *  @inheritDoc
-     **/
-    public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
-        support.removePropertyChangeListener(propertyName, listener);
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public void init(PeerGroup group, ID assignedID, Advertisement impl) throws PeerGroupException {
-        this.group = group;
-        this.assignedID = assignedID;
-        this.implAdvertisement = (ModuleImplAdvertisement) impl;
-        
-        ConfigParams configAdv = group.getConfigAdvertisement();
-        
-        // Get our peer-defined parameters in the configAdv
-        Element param = configAdv.getServiceParam(assignedID);
-        
-        Advertisement paramsAdv = null;
-        
-        if (null != param) {
-            try {
-                paramsAdv = AdvertisementFactory.newAdvertisement((XMLElement) param);
-            } catch (NoSuchElementException ignored) {
-                ;
-            }
-            
-            if (!(paramsAdv instanceof PSEConfigAdv)) {
-                throw new PeerGroupException("Provided Advertisement was not a " + PSEConfigAdv.getAdvertisementType());
-            }
-            
-            config = (PSEConfigAdv) paramsAdv;
-        } else {
-            // Create the default advertisement.
-            config = (PSEConfigAdv) AdvertisementFactory.newAdvertisement(PSEConfigAdv.getAdvertisementType());
-        }
-        
-        peerSecurityEngine = PSESecurityEngineFactory.getDefault().getInstance(this, config);
-        
-        authenticatorEngine = PSEAuthenticatorEngineFactory.getDefault().getInstance(this, config);
-        
-        KeyStoreManager storeManager = PSEKeyStoreManagerFactory.getDefault().getInstance(this, config);
-        
-        pseStore = new PSEConfig(storeManager, null);
-        
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring PSE Membership Service : " + assignedID);
-
-            configInfo.append("\n\tImplementation :");
-            configInfo.append("\n\t\tModule Spec ID: " + implAdvertisement.getModuleSpecID());
-            configInfo.append("\n\t\tImpl Description : " + implAdvertisement.getDescription());
-            configInfo.append("\n\t\tImpl URI : " + implAdvertisement.getUri());
-            configInfo.append("\n\t\tImpl Code : " + implAdvertisement.getCode());
-            configInfo.append("\n\tGroup Params :");
-            configInfo.append("\n\t\tGroup : " + group.getPeerGroupName());
-            configInfo.append("\n\t\tGroup ID : " + group.getPeerGroupID());
-            configInfo.append("\n\t\tPeer ID : " + group.getPeerID());
-            configInfo.append("\n\tConfiguration :");
-            configInfo.append("\n\t\tPSE state : " + (pseStore.isInitialized() ? "inited" : "new"));
-            configInfo.append(
-                    "\n\t\tPSE KeyStore location : "
-                            + ((null != config.getKeyStoreLocation())
-                                    ? config.getKeyStoreLocation().toString()
-                                    : assignedID.toString()));
-            configInfo.append(
-                    "\n\t\tPSE KeyStore type : " + ((null != config.getKeyStoreType()) ? config.getKeyStoreType() : "<default>"));
-            configInfo.append(
-                    "\n\t\tPSE KeyStore provider : "
-                            + ((null != config.getKeyStoreProvider()) ? config.getKeyStoreProvider() : "<default>"));
-            LOG.config(configInfo.toString());
-        }
-        
-        resign();
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public Service getInterface() {
-        return this;
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public Advertisement getImplAdvertisement() {
-        return implAdvertisement;
-    }
-    
-    /**
-     * {@inheritDoc}
-     *
-     * <p/>Currently this service starts by itself and does not expect
-     * arguments.
-     */
-    public int startApp(String[] arg) {
-        
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("PSE Membmership Service started.");
-        }
-        
-        return 0;
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public void stopApp() {
-        resign();
-        
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("PSE Membmership Service stopped.");
-        }
-    }
-    
-    public PeerGroup getGroup() {
-        return group;
-    }
-    
-    public ID getAssignedID() {
-        return assignedID;
-    }
-    
-    /**
-     * {@inheritDoc}
-     *
-     * <p/>Supports methods <code>"StringAuthentication"</code>,
-     * <code>"DialogAuthentication"</code>,
-     * <code>"EngineAuthentication"</code> and
-     * <code>"InteractiveAuthentication"</code> (an alias for
-     * <code>"DialogAuthentication"</code>)
-     **/
-    public Authenticator apply(AuthenticationCredential application) throws ProtocolNotSupportedException {
-        
-        String method = application.getMethod();
-        
-        boolean newKey;
-
-        if (!pseStore.isInitialized()) {
-            // It is not inited, it's new.
-            newKey = true;
-        } else {
-            X509Certificate configCert = config.getCertificate();
-            
-            if (null != configCert) {
-                try {
-                    ID allTrustedCerts[] = pseStore.getTrustedCertsList();
-                    
-                    Iterator eachTrustedCert = Arrays.asList(allTrustedCerts).iterator();
-                    
-                    newKey = true;
-                    
-                    // See if the config cert is already in the keystore.
-                    while (eachTrustedCert.hasNext()) {
-                        ID aTrustedCertID = (ID) eachTrustedCert.next();
-                        
-                        if (pseStore.isKey(aTrustedCertID)) {
-                            X509Certificate aTrustedCert = pseStore.getTrustedCertificate(aTrustedCertID);
-                            
-                            if (aTrustedCert.equals(configCert)) {
-                                newKey = false;
-                                break;
-                            }
-                        }
-                    }
-                } catch (KeyStoreException bad) {
-                    // The keystore is probably initialized but locked. Nothing else we can do.
-                    newKey = false;
-                } catch (IOException bad) {
-                    // Could not read the keystore. I'm not sure it wouldn't be better to just fail.
-                    newKey = false;
-                }
-            } else {
-                // don't have anything to validate against.
-                newKey = false;
-            }
-        }
-        
-        if ("StringAuthentication".equals(method)) {
-            if (newKey) {
-                return new StringAuthenticator(this, application, config.getCertificate(), config.getEncryptedPrivateKey());
-            } else {
-                return new StringAuthenticator(this, application);
-            }
-        } else if ("EngineAuthentication".equals(method)) {
-            if (pseStore.isInitialized()) {
-                return new EngineAuthenticator(this, application, authenticatorEngine);
-            } else {
-                return new EngineAuthenticator(this, application, authenticatorEngine);
-            }
-        } else if ("DialogAuthentication".equals(method) || "InteractiveAuthentication".equals(method) || (null == method)) {
-            if (newKey) {
-                return new DialogAuthenticator(this, application, config.getCertificate(), config.getEncryptedPrivateKey());
-            } else {
-                return new DialogAuthenticator(this, application);
-            }
-        } else {
-            throw new ProtocolNotSupportedException("Authentication method not recognized");
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public Credential getDefaultCredential() {
-        return defaultCredential;
-    }
-    
-    /**
-     * Sets the default credential. Also updates the peer advertisement with
-     * the certificate of the default credential.
-     *
-     *  @param newDefault the new default credential. May also be
-     *  <code>null</code> if no default is desired.
-     **/
-    private void setDefaultCredential(PSECredential newDefault) {
-        
-        Credential oldDefault = defaultCredential;
-        
-        synchronized (this) {
-            defaultCredential = newDefault;
-        }
-        
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            LOG.config("New Default credential : " + newDefault);
-        }
-        
-        try {
-            // include the root cert in the peer advertisement
-            PeerAdvertisement peeradv = group.getPeerAdvertisement();
-            
-            if (null != newDefault) {
-                // include the root cert in the peer advertisement
-                XMLDocument paramDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "Parm");
-                
-                Certificate peerCerts = new Certificate();
-                
-                peerCerts.setCertificates(newDefault.getCertificateChain());
-                
-                XMLDocument peerCertsAsDoc = (XMLDocument) peerCerts.getDocument(MimeMediaType.XMLUTF8);
-                
-                StructuredDocumentUtils.copyElements(paramDoc, paramDoc, peerCertsAsDoc, "RootCert");
-                
-                peeradv.putServiceParam(PeerGroup.peerGroupClassID, paramDoc);
-            } else {
-                peeradv.removeServiceParam(PeerGroup.peerGroupClassID);
-            }
-        } catch (Exception ignored) {
-            ;
-        }
-        
-        support.firePropertyChange("defaultCredential", oldDefault, newDefault);
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public Enumeration<Credential> getCurrentCredentials() {
-        List<Credential> credList = new ArrayList<Credential>(principals);
-        
-        return Collections.enumeration(credList);
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public Enumeration<AuthenticationCredential> getAuthCredentials() {
-        List<AuthenticationCredential> credList = new ArrayList<AuthenticationCredential>(authCredentials);
-        
-        return Collections.enumeration(credList);
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public Credential join(Authenticator authenticated) throws PeerGroupException {
-        
-        if (this != authenticated.getSourceService()) {
-            throw new ClassCastException("This is not my authenticator!");
-        }
-        
-        if (!authenticated.isReadyForJoin()) {
-            throw new PeerGroupException("Authenticator not ready to join!");
-        }
-        
-        PSECredential newCred;
-        
-        char[] store_password = null;
-        ID identity;
-        char[] key_password = null;
-        
-        try {
-            if (authenticated instanceof StringAuthenticator) {
-                StringAuthenticator auth = (StringAuthenticator) authenticated;
-                
-                store_password = auth.getAuth1_KeyStorePassword();
-                identity = auth.getAuth2Identity();
-                key_password = auth.getAuth3_IdentityPassword();
-            } else  if (authenticated instanceof EngineAuthenticator) {
-                EngineAuthenticator auth = (EngineAuthenticator) authenticated;
-                
-                store_password = auth.getAuth1_KeyStorePassword();
-                identity = auth.getAuth2Identity();
-                key_password = auth.getAuth3_IdentityPassword();
-            } else {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("I dont know how to deal with this authenticator " + authenticated);
-                }
-                
-                throw new PeerGroupException("I dont know how to deal with this authenticator");
-            }
-            
-            if (null != store_password) {
-                pseStore.setKeyStorePassword(store_password);
-            }
-            
-            if (!pseStore.isInitialized()) {
-                if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                    LOG.info("Initializing the PSE key store.");
-                }
-                
-                try {
-                    pseStore.initialize();
-                } catch (KeyStoreException bad) {
-                    throw new PeerGroupException("Could not initialize new PSE keystore.", bad);
-                } catch (IOException bad) {
-                    throw new PeerGroupException("Could not initialize new PSE keystore.", bad);
-                }
-            }
-            
-            try {
-                ID[] allkeys = pseStore.getKeysList();
-                
-                if (!Arrays.asList(allkeys).contains(identity)) {
-                    // Add this key to the keystore.
-                    X509Certificate[] seed_cert = config.getCertificateChain();
-                    
-                    if (null == seed_cert) {
-                        throw new IOException("Could not read root certificate chain");
-                    }
-                    
-                    PrivateKey seedPrivKey = config.getPrivateKey(key_password);
-                    
-                    if (null == seedPrivKey) {
-                        throw new IOException("Could not read private key");
-                    }
-                    
-                    pseStore.setKey(identity, seed_cert, seedPrivKey, key_password);
-                }
-            } catch (IOException failed) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Could not save new key pair.", failed);
-                }
-                
-                throw new PeerGroupException("Could not save new key pair.", failed);
-            } catch (KeyStoreException failed) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Could not save new key pair.", failed);
-                }
-                
-                throw new PeerGroupException("Could not save new key pair.", failed);
-            }
-            
-            try {
-                X509Certificate certList[] = pseStore.getTrustedCertificateChain(identity);
-                
-                if (null == certList) {
-                    certList = new X509Certificate[1];
-                    
-                    certList[0] = pseStore.getTrustedCertificate(identity);
-                    
-                    if (certList[0] == null && authenticatorEngine != null) {
-                        certList[0] = authenticatorEngine.getX509Certificate();
-                    }
-                }
-                
-                CertificateFactory cf = CertificateFactory.getInstance("X.509");
-                
-                CertPath certs = cf.generateCertPath(Arrays.asList(certList));
-                
-                PrivateKey privateKey = pseStore.getKey(identity, key_password);
-                
-                newCred = new PSECredential(this, identity, certs, privateKey);
-                
-                synchronized (this) {
-                    principals.add(newCred);
-                    
-                    authCredentials.add(authenticated.getAuthenticationCredential());
-                }
-            } catch (IOException failed) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Could not create credential.", failed);
-                }
-                
-                throw new PeerGroupException("Could not create credential.", failed);
-            } catch (KeyStoreException failed) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Could not create credential.", failed);
-                }
-                
-                throw new PeerGroupException("Could not create credential.", failed);
-            } catch (CertificateException failed) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Could not create credential.", failed);
-                }
-                
-                throw new PeerGroupException("Could not create credential.", failed);
-            }
-        } finally {
-            if (null != store_password) {
-                Arrays.fill(store_password, '\0');
-            }
-            
-            if (null != key_password) {
-                Arrays.fill(key_password, '\0');
-            }
-        }
-        
-        // XXX bondolo potential but unlikely race condition here.
-        if (null == getDefaultCredential()) {
-            setDefaultCredential(newCred);
-        }
-        
-        support.firePropertyChange("addCredential", null, newCred);
-        
-        return newCred;
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public void resign() {
-        Iterator eachCred = Arrays.asList(principals.toArray()).iterator();
-        
-        synchronized (this) {
-            principals.clear();
-            authCredentials.clear();
-        }
-        
-        setDefaultCredential(null);
-        
-        // clear the keystore password.
-        pseStore.setKeyStorePassword(null);
-        
-        while (eachCred.hasNext()) {
-            PSECredential aCred = (PSECredential) eachCred.next();
-            
-            aCred.setValid(false);
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public Credential makeCredential(Element element) {
-        
-        return new PSECredential(this, element);
-    }
-    
-    /**
-     *  Returns the key store object associated with this PSE Membership Service.
-     **/
-    public PSEConfig getPSEConfig() {
-        return pseStore;
-    }
-    
-    /**
-     * Service Certificates Support
-     */
-    
-    /**
-     *  Generate a new service certificate for the assigned ID given an authenticated local credential.
-     *
-     *  @param assignedID   The assigned ID of the service credential.
-     *  @param credential   The issuer credential for the service credential.
-     **/
-    X509Certificate[] generateServiceCertificate(ID assignedID, PSECredential credential) throws  IOException, KeyStoreException, InvalidKeyException, SignatureException {
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Generating new service cert for " + assignedID);
-        }
-        
-        IssuerInfo serviceinfo = peerSecurityEngine.generateCertificate(credential);
-        
-        // write the client root cert and private key
-        X509Certificate[] serviceChain = { serviceinfo.cert, serviceinfo.issuer };
-        
-        char keyPass[];
-        
-        if (null != serviceinfo.issuerPkey) {
-            ByteArrayInputStream bis = new ByteArrayInputStream(serviceinfo.issuerPkey.getEncoded());
-            byte privateKeySignature[] = peerSecurityEngine.sign(null, credential, bis);
-
-            keyPass = PSEUtils.base64Encode(privateKeySignature, false).toCharArray();
-        } else {
-            keyPass = authenticatorEngine.getKeyPass(group);
-        }
-        
-        getPSEConfig().setKey(assignedID, serviceChain, serviceinfo.subjectPkey, keyPass);
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Generated new service cert");
-        }
-        
-        return serviceChain;
-    }
-    
-    /**
-     *  Recover the service credential for the assigned ID given an authenticated local credential.
-     *
-     *  @param assignedID   The assigned ID of the service credential.
-     *  @param credential   The issuer credential for the service credential.
-     **/
-    public PSECredential getServiceCredential(ID assignedID, PSECredential credential) throws IOException, PeerGroupException, InvalidKeyException, SignatureException {
-        
-        PSECredential pseCredential = null;
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Getting service redential for " + assignedID);
-        }
-        
-        Authenticator authenticate = null;
-        
-        if (null != authenticatorEngine) {
-            AuthenticationCredential authCred = new AuthenticationCredential(group, "EngineAuthentication", null);
-
-            try {
-                authenticate = apply(authCred);
-            } catch (Exception failed) {
-                ;
-            }
-            
-            if (null == authenticate) {
-                return null;
-            }
-
-            EngineAuthenticator auth = (EngineAuthenticator) authenticate;
-
-            auth.setAuth1_KeyStorePassword(authenticatorEngine.getStorePass(group));
-            auth.setAuth2Identity(assignedID);
-            auth.setAuth3_IdentityPassword(authenticatorEngine.getKeyPass(group));
-        } else {
-            AuthenticationCredential authCred = new AuthenticationCredential(group, "StringAuthentication", null);
-            
-            try {
-                authenticate = apply(authCred);
-            } catch (Exception failed) {
-                ;
-            }
-            
-            if (null == authenticate) {
-                return null;
-            }
-            
-            PrivateKey privateKey = credential.getPrivateKey();
-            
-            // make a new service certificate
-            ByteArrayInputStream bis = new ByteArrayInputStream(privateKey.getEncoded());
-            byte privateKeySignature[] = peerSecurityEngine.sign(null, credential, bis);
-            String passkey = PSEUtils.base64Encode(privateKeySignature, false);
-            
-            StringAuthenticator auth = (StringAuthenticator) authenticate;
-
-            auth.setAuth1_KeyStorePassword((String) null);
-            auth.setAuth2Identity(assignedID);
-            auth.setAuth3_IdentityPassword(passkey);
-        }
-        
-        if (authenticate.isReadyForJoin()) {
-            pseCredential = (PSECredential) join(authenticate);
-        } else {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Could not authenticate service credential");
-            }
-        }
-        
-        return pseCredential;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSEMembershipServiceBeanInfo.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSEMembershipServiceBeanInfo.java
deleted file mode 100644 (file)
index 559a61c..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.membership.pse;
-
-
-import java.beans.BeanDescriptor;
-import java.beans.EventSetDescriptor;
-import java.beans.SimpleBeanInfo;
-import java.beans.PropertyDescriptor;
-
-import java.beans.IntrospectionException;
-import java.lang.reflect.UndeclaredThrowableException;
-
-
-/**
- *  Our beaninfo
- **/
-public class PSEMembershipServiceBeanInfo extends SimpleBeanInfo {
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public BeanDescriptor getBeanDescriptor() {
-        return new BeanDescriptor(PSEMembershipService.class);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public EventSetDescriptor[] getEventSetDescriptors() {
-        try {
-            EventSetDescriptor changed = new EventSetDescriptor(PSEMembershipService.class, "propertyChange"
-                    ,
-                    java.beans.PropertyChangeListener.class, "propertyChange");
-            
-            changed.setDisplayName("bound property change");
-            
-            EventSetDescriptor[] rv = { changed };
-
-            return rv;
-        } catch (IntrospectionException failed) {
-            throw new UndeclaredThrowableException(failed, "Configuration error");
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public PropertyDescriptor[] getPropertyDescriptors() {
-        try {
-            PropertyDescriptor defaultcredential = new PropertyDescriptor("defaultCredential", PSEMembershipService.class
-                    ,
-                    "getDefaultCredential", "setDefaultCredential");
-
-            defaultcredential.setBound(true);
-            
-            PropertyDescriptor addcredential = new PropertyDescriptor("addCredential", PSEMembershipService.class);
-
-            addcredential.setBound(true);
-            
-            PropertyDescriptor rv[] = { addcredential, defaultcredential };
-            
-            return rv;
-        } catch (IntrospectionException failed) {
-            throw new UndeclaredThrowableException(failed, "Configuration error");
-        }
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSEPeerSecurityEngine.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSEPeerSecurityEngine.java
deleted file mode 100644 (file)
index 11c544b..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.membership.pse;
-
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.security.PublicKey;
-import java.security.InvalidKeyException;
-import java.security.Signature;
-import java.security.SignatureException;
-import java.security.NoSuchAlgorithmException;
-import java.security.PrivateKey;
-import java.security.KeyPair;
-
-import javax.security.auth.x500.X500Principal;
-
-import net.jxta.impl.membership.pse.PSEUtils.IssuerInfo;
-
-
-/**
- *  Provides algorithm support for PSE.
- *
- **/
-public interface PSEPeerSecurityEngine {
-    
-    /**
-     *  Cryptographically sign an input stream using the specified credential
-     *  with the specified algorithm.
-     *
-     *  @param algorithm The signature algorithm to use.
-     *  @param credential   The credential which is signing the stream.
-     *  @param bis  The input stream to be signed.
-     *  @return The resulting signature.
-     **/
-    public byte[] sign(String algorithm, PSECredential credential, InputStream bis) throws InvalidKeyException, SignatureException, IOException;
-    
-    /**
-     *  Cryptographically verify a signature against an input stream using the 
-     * specified credential with the specified algorithm.
-     *
-     *  @param algorithm The signature algorithm to use.
-     *  @param signature The signature to be verified.
-     *  @param credential   The credential which is signing the stream.
-     *  @param bis  The input stream to be signed.
-     *  @return {@code true} If the signature is valid otherwise {@code false}.
-     **/
-    public boolean verify(String algorithm, PSECredential credential, byte[] signature, InputStream bis) throws InvalidKeyException, SignatureException, IOException;
-    
-    /**
-     *   Generate a new service certificate.
-     *
-     *   @param credential The credential which will be the issuer of the service certificate.
-     **/
-    public IssuerInfo generateCertificate(PSECredential credential) throws SecurityException;
-    
-    /**
-     *   Returns the default signature algorithm for this security engine.
-     **/
-    public String getSignatureAlgorithm();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSESecurityEngineFactory.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSESecurityEngineFactory.java
deleted file mode 100644 (file)
index b108b3f..0000000
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.membership.pse;
-
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.security.PrivateKey;
-import java.security.cert.X509Certificate;
-
-import java.io.IOException;
-import java.security.InvalidKeyException;
-import java.security.SignatureException;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import net.jxta.document.Advertisement;
-import net.jxta.id.ID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.impl.protocol.PSEConfigAdv;
-
-import net.jxta.impl.membership.pse.PSEUtils.IssuerInfo;
-
-
-/**
- *  A factory for PSE Security Engines.
- *
- * @see PSEPeerSecurityEngine
- */
-public abstract class PSESecurityEngineFactory {
-    
-    private static PSESecurityEngineFactory defaultSecurityEngine = null;
-    
-    /**
-     *  Set the default PSESecurityEngineFactoryss
-     **/
-    public static void setPSESecurityEngineManager(PSESecurityEngineFactory newSecurityEngine) {
-        synchronized (PSESecurityEngineFactory.class) {
-            defaultSecurityEngine = newSecurityEngine;
-        }
-    }
-    
-    /**
-     *   Returns the default Security Engine Factory.
-     *
-     *   @return The current default Security Engine Factory.
-     **/
-    public static PSESecurityEngineFactory getDefault() {
-        synchronized (PSESecurityEngineFactory.class) {
-            if (defaultSecurityEngine == null) {
-                defaultSecurityEngine = new PSESecurityEngineDefaultFactory();
-            }
-            
-            return defaultSecurityEngine;
-        }
-    }
-    
-    /**
-     *   Creates a new Peer Security Engine instance based upon the context and configuration.sss
-     *
-     *   @param service  The service that this keystore manager will be working for.
-     *   @param config   The configuration parameters.
-     **/
-    public abstract PSEPeerSecurityEngine getInstance(PSEMembershipService service, PSEConfigAdv config) throws PeerGroupException;
-    
-    /**
-     *   Default implementation which provides the default behaviour (which is to do nothing).
-     **/
-    private static class PSESecurityEngineDefaultFactory extends PSESecurityEngineFactory {
-        @Override
-        public PSEPeerSecurityEngine getInstance(PSEMembershipService service, PSEConfigAdv config) throws PeerGroupException {
-            return new PSEPeerSecurityEngineDefault();
-        }
-    }
-    
-
-    /**
-     *   Default implementation which provides the default behaviour.
-     **/
-    private static class PSEPeerSecurityEngineDefault implements PSEPeerSecurityEngine {
-
-        /**
-         *  Log4J Logger
-         **/
-        private static final Logger LOG = Logger.getLogger(PSEPeerSecurityEngineDefault.class.getName());
-        
-        /**
-         *   {@inheritDoc}
-         **/
-        public byte[] sign(String algorithm, PSECredential credential, InputStream bis)  throws InvalidKeyException, SignatureException, IOException {
-            
-            if (null == algorithm) {
-                algorithm = getSignatureAlgorithm();
-            }
-            
-            return PSEUtils.computeSignature(algorithm, credential.getPrivateKey(), bis);
-        }
-        
-        /**
-         *   {@inheritDoc}
-         **/
-        public boolean verify(String algorithm, PSECredential credential, byte[] signature, InputStream bis) throws InvalidKeyException, SignatureException, IOException {
-            if (null == algorithm) {
-                algorithm = getSignatureAlgorithm();
-            }
-            
-            return PSEUtils.verifySignature(algorithm, credential.getCertificate(), signature, bis);
-        }
-        
-        /**
-         *   {@inheritDoc}
-         **/
-        public IssuerInfo generateCertificate(PSECredential credential) throws SecurityException {
-            
-            // we need a new cert.
-            IssuerInfo info = new IssuerInfo();
-            
-            info.cert = credential.getCertificate();
-            info.subjectPkey = credential.getPrivateKey();
-            String cname = PSEUtils.getCertSubjectCName(info.cert);
-            
-            if (null != cname) {
-                // remove the -CA which is common to ca root certs.
-                if (cname.endsWith("-CA")) {
-                    cname = cname.substring(0, cname.length() - 3);
-                }
-            }
-            
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Generating new service cert for \'" + cname + "\'");
-            }
-            
-            // generate the service cert and private key
-            IssuerInfo serviceinfo = PSEUtils.genCert(cname, info);
-
-            // IssuerInfo serviceinfo = membership.genCert( cname, info, "SHA1withRSA" );
-            
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Generated new service cert for \'" + cname + "\'");
-            }
-            
-            return serviceinfo;
-        }
-        
-        /**
-         *   {@inheritDoc}
-         **/
-        public String getSignatureAlgorithm() {
-            return "SHA1withRSA";
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSEUtils.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/PSEUtils.java
deleted file mode 100644 (file)
index 9e923a7..0000000
+++ /dev/null
@@ -1,874 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.membership.pse;
-
-
-import net.jxta.impl.util.BASE64InputStream;
-import net.jxta.impl.util.BASE64OutputStream;
-import net.jxta.logging.Logging;
-import org.bouncycastle.asn1.x509.X509NameTokenizer;
-import org.bouncycastle.asn1.DERObjectIdentifier;
-import org.bouncycastle.jce.X509Principal;
-import org.bouncycastle.jce.provider.BouncyCastleProvider;
-import org.bouncycastle.x509.X509V3CertificateGenerator;
-
-import javax.crypto.Cipher;
-import javax.crypto.EncryptedPrivateKeyInfo;
-import javax.crypto.SecretKey;
-import javax.crypto.SecretKeyFactory;
-import javax.crypto.spec.PBEKeySpec;
-import javax.crypto.spec.PBEParameterSpec;
-import javax.security.auth.x500.X500Principal;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.math.BigInteger;
-import java.security.AlgorithmParameters;
-import java.security.InvalidKeyException;
-import java.security.KeyFactory;
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.security.PrivateKey;
-import java.security.Provider;
-import java.security.SecureRandom;
-import java.security.Security;
-import java.security.Signature;
-import java.security.SignatureException;
-import java.security.cert.Certificate;
-import java.security.cert.X509Certificate;
-import java.security.spec.InvalidKeySpecException;
-import java.security.spec.KeySpec;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.Hashtable;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * Singleton class of static utility methods.
- */
-public final class PSEUtils {
-
-    /**
-     * Logger
-     */
-    private static final transient Logger LOG = Logger.getLogger(PSEUtils.class.getName());
-
-    /**
-     * Singleton instance.
-     */
-    private static final PSEUtils UTILS = new PSEUtils();
-
-    /**
-     * A SecureRandom for generating keys.
-     */
-    final transient SecureRandom srng = new SecureRandom();
-
-    /**
-     * Singleton utility class
-     */
-    private PSEUtils() {
-
-        try {
-            ClassLoader sysloader = ClassLoader.getSystemClassLoader();
-
-            Class<?> loaded = sysloader.loadClass(BouncyCastleProvider.class.getName());
-
-            Provider provider = (Provider) loaded.newInstance();
-
-            Security.addProvider(provider);
-
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("Loaded Security Providers into system class loader");
-            }
-        } catch (Exception disallowed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING,
-                        "Failed loading Security Providers into System Class Loader. Will try local class loader (which may not work)",
-                        disallowed);
-            }
-
-            // Add the providers we use.
-            Security.addProvider(new BouncyCastleProvider());
-
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("Loaded Security Providers into local class loader");
-            }
-        }
-
-        // Provider [] providers = Security.getProviders();
-        // Iterator eachProvider = Arrays.asList(providers).iterator();
-        //
-        // while (eachProvider.hasNext()) {
-        // Provider aProvider = (Provider) eachProvider.next();
-        //
-        // System.out.println("\n\n" + aProvider.getName() + " - " + aProvider.getVersion() + " - " + aProvider.getInfo());
-        //
-        // Iterator allMappings = aProvider.entrySet().iterator();
-        //
-        // while (allMappings.hasNext()) {
-        // Map.Entry aMapping = (Map.Entry) allMappings.next();
-        //
-        // Object key = aMapping.getKey();
-        // System.out.println(key + " (" + key.getClass().getName() + ") --> " + aMapping.getValue() + " (" + key.getClass().getName() + ")");
-        // }
-        // }
-    }
-
-    /**
-     * Issuer Information
-     */
-    public static class IssuerInfo {
-        public X509Certificate cert; // subject Cert
-        public PrivateKey subjectPkey; // subject private key
-        public X509Certificate issuer; // issuer Cert
-        public PrivateKey issuerPkey; // issuer private key
-    }
-
-    /**
-     * Generate a Cert
-     *
-     * @param cn         subject cn for the certificate
-     * @param issuerinfo the cert issuer or null if self-signed root cert.
-     * @return the details of the generated cert.
-     * @throws SecurityException if the cert could not be generated.
-     */
-    public static IssuerInfo genCert(String cn, IssuerInfo issuerinfo) throws SecurityException {
-        try {
-            String useCN;
-
-            if (null == issuerinfo) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Generating Self Signed Cert ...");
-                }
-
-                if (!cn.endsWith("-CA")) {
-                    useCN = cn + "-CA";
-                } else {
-                    useCN = cn;
-                }
-            } else {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Generating Client Cert ...");
-                }
-
-                useCN = cn;
-            }
-
-            // set name attribute
-            Hashtable<DERObjectIdentifier, String> attrs = new Hashtable<DERObjectIdentifier, String>();
-
-            attrs.put(X509Principal.CN, useCN);
-            attrs.put(X509Principal.O, "www.jxta.org");
-
-            // XXX bondolo 20040405 wouldn't SN or UID be a better choice?
-            // set ou to 20 random digits
-            byte[] ou = new byte[10];
-
-            UTILS.srng.nextBytes(ou);
-            String ouStr = toHexDigits(ou);
-
-            attrs.put(X509Principal.OU, ouStr);
-
-            X509Principal subject = new X509Principal(attrs);
-            X500Principal samesubject = new X500Principal(subject.getEncoded());
-            KeyPairGenerator g = KeyPairGenerator.getInstance("RSA");
-
-            g.initialize(1024, UTILS.srng);
-
-            KeyPair keypair = g.generateKeyPair();
-
-            return genCert(samesubject, keypair, issuerinfo);
-        } catch (NoSuchAlgorithmException e) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Could not generate certificate", e);
-            }
-            SecurityException failure = new SecurityException("Could not generate certificate");
-
-            failure.initCause(e);
-            throw failure;
-        }
-    }
-
-    /**
-     * Generate a Cert given a keypair
-     *
-     * @param subject    subjectDN for the certificate
-     * @param keypair    the keypair to use.
-     * @param issuerinfo the cert issuer or null if self-signed root cert.
-     * @return the details of the generated cert.
-     * @throws SecurityException if the cert could not be generated.
-     */
-    public static IssuerInfo genCert(X500Principal subject, KeyPair keypair, IssuerInfo issuerinfo) throws SecurityException {
-        try {
-            // set up issuer
-            PrivateKey signer;
-            X509Principal issuer;
-
-            if (null == issuerinfo) { // self-signed root cert
-                signer = keypair.getPrivate();
-                issuer = new X509Principal(subject.getEncoded());
-            } else { // issuer signed service sert
-                signer = issuerinfo.subjectPkey;
-                X500Principal issuer_subject = issuerinfo.cert.getSubjectX500Principal();
-
-                issuer = new X509Principal(issuer_subject.getEncoded());
-            }
-
-            // set validity 10 years from today
-            Date today = new Date();
-            Calendar cal = Calendar.getInstance();
-
-            cal.setTime(today);
-            cal.add(Calendar.YEAR, 10);
-            Date until = cal.getTime();
-
-            // generate cert
-            X509V3CertificateGenerator certGen = new X509V3CertificateGenerator();
-
-            certGen.setIssuerDN(issuer);
-            certGen.setSubjectDN(new X509Principal(subject.getEncoded()));
-            certGen.setNotBefore(today);
-            certGen.setNotAfter(until);
-            certGen.setPublicKey(keypair.getPublic());
-            // certGen.setSignatureAlgorithm("SHA1withDSA");
-            certGen.setSignatureAlgorithm("SHA1WITHRSA");
-            // FIXME bondolo 20040317 needs fixing.
-            certGen.setSerialNumber(BigInteger.valueOf(1));
-
-            // return issuer info for generating service cert
-            IssuerInfo info = new IssuerInfo();
-
-            // the cert
-            info.cert = certGen.generateX509Certificate(signer, UTILS.srng);
-
-            // For saving service cert private key
-            info.subjectPkey = keypair.getPrivate();
-
-            // for signing service cert
-            info.issuer = (null == issuerinfo) ? info.cert : issuerinfo.cert;
-
-            // for signing service cert
-            info.issuerPkey = signer;
-
-            // dump the certificate?
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                if (null == issuer) {
-                    LOG.fine("Root Cert : \n" + info.cert.toString());
-                } else {
-                    LOG.fine("Client Cert : \n" + info.cert.toString());
-                }
-            }
-
-            return info;
-        } catch (SignatureException e) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.FINE, "Could not generate certificate", e);
-            }
-
-            SecurityException failure = new SecurityException("Could not generate certificate");
-
-            failure.initCause(e);
-            throw failure;
-        } catch (InvalidKeyException e) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.FINE, "Could not generate certificate", e);
-            }
-
-            SecurityException failure = new SecurityException("Could not generate certificate");
-
-            failure.initCause(e);
-            throw failure;
-        } catch (IOException e) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.FINE, "Could not generate certificate", e);
-            }
-
-            SecurityException failure = new SecurityException("Could not generate certificate");
-
-            failure.initCause(e);
-            throw failure;
-        }
-    }
-
-    /**
-     * return the CN token from the provided cert's subjectDN
-     *
-     * @param cert the certificate to examine
-     * @return the CN name or null if none could be found.
-     */
-    public static String getCertSubjectCName(X509Certificate cert) {
-
-        // get the subject dname
-        X500Principal subject = cert.getSubjectX500Principal();
-
-        X509NameTokenizer tokens = new X509NameTokenizer(subject.getName());
-
-        // iterate over the attributes of the dname
-        while (tokens.hasMoreTokens()) {
-            String aToken = tokens.nextToken();
-
-            if (aToken.length() < 3) {
-                continue;
-            }
-
-            String attribute = aToken.substring(0, 3);
-
-            if ("CN=".equalsIgnoreCase(attribute)) {
-                return aToken.substring(3);
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * return the CN token from the provided cert's issuerDN
-     *
-     * @param cert the certificate to examine
-     * @return the CN name or null if none could be found.
-     */
-    public static String getCertIssuerCName(X509Certificate cert) {
-
-        // get the subject dname
-        X500Principal issuer = cert.getIssuerX500Principal();
-
-        X509NameTokenizer tokens = new X509NameTokenizer(issuer.getName());
-
-        // iterate over the attributes of the dname
-        while (tokens.hasMoreTokens()) {
-            String aToken = tokens.nextToken();
-
-            if (aToken.length() < 3) {
-                continue;
-            }
-
-            String attribute = aToken.substring(0, 3);
-
-            if ("CN=".equalsIgnoreCase(attribute)) {
-                return aToken.substring(3);
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * Compute the signature of a stream.
-     *
-     * @param key    the private key used to sign the stream
-     * @param stream the stream to sign.
-     * @return byte[] the signature
-     */
-    public static byte[] computeSignature(String algorithm, PrivateKey key, InputStream stream) throws InvalidKeyException, SignatureException, IOException {
-        Signature sign;
-
-        try {
-            sign = Signature.getInstance(algorithm);
-        } catch (NoSuchAlgorithmException badsigner) {
-            throw new IOException("Could not initialize signer with algorithm " + algorithm);
-        }
-        sign.initSign(key, UTILS.srng);
-
-        byte[] buffer = new byte[1024];
-
-        while (true) {
-            int read = stream.read(buffer);
-
-            if (read < 0) {
-                break;
-            }
-
-            sign.update(buffer, 0, read);
-        }
-
-        return sign.sign();
-    }
-
-    /**
-     * Verify a signature of a stream.
-     *
-     * @param cert      The certificate containing the public key which will be used
-     *                  to verify the signature.
-     * @param signature The signature to verify.
-     * @param stream    The stream to verify.
-     * @return boolean true if the signature was valid otherwise false.
-     */
-    public static boolean verifySignature(String algorithm, Certificate cert, byte[] signature, InputStream stream) throws InvalidKeyException, SignatureException, IOException {
-        Signature sign;
-
-        try {
-            sign = Signature.getInstance(algorithm);
-        } catch (NoSuchAlgorithmException badsigner) {
-            throw new IOException("Could not initialize signer with algorithm " + algorithm);
-        }
-
-        sign.initVerify(cert);
-
-        byte[] buffer = new byte[1024];
-
-        while (true) {
-            int read = stream.read(buffer);
-
-            if (read < 0) {
-                break;
-            }
-
-            sign.update(buffer, 0, read);
-        }
-
-        return sign.verify(signature);
-    }
-
-    /**
-     * returns a hash SHA-1 of the given byte array
-     *
-     * @param data the data to be hashed
-     * @return byte[] the hash of the data
-     */
-    public static byte[] hash(String algorithm, byte[] data) {
-        try {
-            MessageDigest digest = MessageDigest.getInstance(algorithm);
-
-            return digest.digest(data);
-        } catch (NoSuchAlgorithmException e) {
-            return null;
-        }
-    }
-
-    /**
-     * We are trying to use : PBEWITHMD5ANDDES
-     */
-    static final String PKCS5_PBSE1_ALGO = "PBEWITHMD5ANDDES";
-
-    /**
-     * Given a private key and a password, encrypt the private key using the
-     * PBESE1 algorithm.
-     *
-     * @param password   The password which will be used.
-     * @param privkey    The private key to be encrypted.
-     * @param iterations Number of iterations.
-     * @return An encrypted private key info or null if the key could not be
-     *         encrypted.
-     */
-    public static EncryptedPrivateKeyInfo pkcs5_Encrypt_pbePrivateKey(char[] password, PrivateKey privkey, int iterations) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Encrypting " + privkey + " with \'" + new String(password) + "\'");
-        }
-
-        PBEKeySpec pbeKeySpec = new PBEKeySpec(password);
-        byte[] salt = new byte[8];
-
-        UTILS.srng.nextBytes(salt);
-
-        try {
-            PBEParameterSpec pbeParamSpec = new PBEParameterSpec(salt, iterations);
-
-            // convert password into a SecretKey object, using a PBE key factory.
-            SecretKeyFactory keyFac = SecretKeyFactory.getInstance(PKCS5_PBSE1_ALGO);
-            SecretKey pbeKey = keyFac.generateSecret(pbeKeySpec);
-
-            // Create PBE Cipher
-            Cipher pbeCipher = Cipher.getInstance(PKCS5_PBSE1_ALGO);
-
-            // Initialize PBE Cipher with key and parameters
-            pbeCipher.init(Cipher.ENCRYPT_MODE, pbeKey, pbeParamSpec);
-
-            byte[] encryptedPrivKey = pbeCipher.doFinal(privkey.getEncoded());
-
-            AlgorithmParameters algo = AlgorithmParameters.getInstance(PKCS5_PBSE1_ALGO);
-
-            algo.init(pbeParamSpec);
-
-            EncryptedPrivateKeyInfo result = new EncryptedPrivateKeyInfo(algo, encryptedPrivKey);
-
-            return result;
-        } catch (Exception failed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Encrypt failed", failed);
-            }
-            return null;
-        }
-    }
-
-    /**
-     * Given an encrypted private key and a password, decrypt the private key
-     * using the PBESE1 algorithm.
-     *
-     * @param password         The password which will be used.
-     * @param encryptedPrivKey The private key to be encrypted.
-     * @return The decrypted private key or null if the key could not be decrpyted.
-     */
-    public static PrivateKey pkcs5_Decrypt_pbePrivateKey(char[] password, String algorithm, EncryptedPrivateKeyInfo encryptedPrivKey) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Decrypting " + encryptedPrivKey + "/" + algorithm + " with \'" + new String(password) + "\'");
-        }
-
-        PBEKeySpec pbeKeySpec = new PBEKeySpec(password);
-
-        try {
-            AlgorithmParameters algo = encryptedPrivKey.getAlgParameters();
-
-            if (null == algo) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Could not get algo parameters from " + encryptedPrivKey);
-                }
-
-                throw new IllegalStateException("Could not get algo parameters from " + encryptedPrivKey);
-            }
-
-            PBEParameterSpec pbeParamSpec = algo.getParameterSpec(PBEParameterSpec.class);
-
-            // convert password into a SecretKey object, using a PBE key factory.
-            try {
-                SecretKeyFactory keyFac = SecretKeyFactory.getInstance(PKCS5_PBSE1_ALGO);
-                SecretKey pbeKey = keyFac.generateSecret(pbeKeySpec);
-
-                // Create PBE Cipher
-                Cipher pbeCipher = Cipher.getInstance(PKCS5_PBSE1_ALGO);
-
-                // Initialize PBE Cipher with key and parameters
-                pbeCipher.init(Cipher.DECRYPT_MODE, pbeKey, pbeParamSpec);
-
-                KeySpec key_spec;
-
-                key_spec = encryptedPrivKey.getKeySpec(pbeCipher);
-
-                KeyFactory kf = KeyFactory.getInstance(algorithm);
-
-                return kf.generatePrivate(key_spec);
-            } catch (InvalidKeySpecException failed) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Incorrect key for " + encryptedPrivKey + " : " + failed);
-                }
-                return null;
-            }
-        } catch (Exception failed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Decrypt failed", failed);
-            }
-            return null;
-        }
-    }
-
-    // Load a wrapped object in base64 format:
-    // The following three methods were modified
-    // from similar pureTLS methods.
-    /**
-     * WrappedObject.java
-     * <p/>
-     * Copyright (C) 1999, Claymore Systems, Inc.
-     * All Rights Reserved.
-     * <p/>
-     * ekr@rtfm.com  Fri Jun  4 09:11:27 1999
-     * <p/>
-     * This package is a SSLv3/TLS implementation written by Eric Rescorla
-     * <ekr@rtfm.com> and licensed by Claymore Systems, Inc.
-     * <p/>
-     * Redistribution and use in source and binary forms, with or without
-     * modification, are permitted provided that the following conditions
-     * are met:
-     * 1. Redistributions of source code must retain the above copyright
-     * notice, this list of conditions and the following disclaimer.
-     * 2. Redistributions in binary form must reproduce the above copyright
-     * notice, this list of conditions and the following disclaimer in the
-     * documentation and/or other materials provided with the distribution.
-     * 3. All advertising materials mentioning features or use of this software
-     * must display the following acknowledgement:
-     * This product includes software developed by Claymore Systems, Inc.
-     * 4. Neither the name of Claymore Systems, Inc. nor the name of Eric
-     * Rescorla may be used to endorse or promote products derived from this
-     * software without specific prior written permission.
-     * <p/>
-     * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-     * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-     * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-     * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-     * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-     * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-     * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-     * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-     * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-     * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-     * SUCH DAMAGE.
-     */
-
-    public static String loadBase64Object(BufferedReader rdr, String type) throws IOException {
-        if (null != findObject(rdr, type)) {
-            return readBase64Object(rdr, type);
-        } else {
-            return null;
-        }
-    }
-
-    public static byte[] loadObject(BufferedReader rdr, String type) throws IOException {
-        if (null != findObject(rdr, type)) {
-            return readObject(rdr, type);
-        } else {
-            return null;
-        }
-    }
-
-    public static String findObject(BufferedReader br, String type) throws IOException {
-        String prefix = "-----BEGIN ";
-        String suffix = (type == null) ? "-----" : type + "-----";
-
-        while (true) {
-            br.mark(1024);
-
-            String line = br.readLine();
-
-            if (null == line) {
-                return null;
-            }
-
-            if (!line.startsWith(prefix)) {
-                continue;
-            }
-
-            if (!line.endsWith(suffix)) {
-                continue;
-            }
-
-            br.reset();
-
-            return line.substring(prefix.length(), line.length() - 5);
-        }
-    }
-
-    /**
-     * We read a block of n-lines (\n terminated) and return a String of n-lines
-     * concatenated together. This keeps the format consistent with the pureTLS
-     * requirements.
-     */
-    public static String readBase64Object(BufferedReader br, String type) throws IOException {
-        String line = br.readLine();
-
-        String prefix = "-----BEGIN ";
-        String suffix = (type == null) ? "-----" : type + "-----";
-
-        if (!line.startsWith(prefix) || !line.endsWith(suffix)) {
-            throw new IOException("Not at begining of object");
-        }
-
-        StringBuilder block = new StringBuilder();
-
-        while (true) {
-            line = br.readLine();
-
-            if (null == line) {
-                break;
-            }
-
-            if (line.startsWith("-----END ")) {
-                break;
-            }
-
-            block.append(line);
-            block.append('\n');
-        }
-
-        return block.toString();
-    }
-
-    /**
-     * Read an object
-     */
-    public static byte[] readObject(BufferedReader br, String type) throws IOException {
-        String base64 = readBase64Object(br, type);
-
-        return base64Decode(new StringReader(base64));
-    }
-
-    /**
-     *
-     */
-
-    /**
-     * Write an object that is already base64 encoded.
-     */
-    public static void writeBase64Object(BufferedWriter bw, String type, String object) throws IOException {
-
-        bw.write("-----BEGIN ");
-        bw.write(type);
-        bw.write("-----");
-        bw.newLine();
-
-        bw.write(object);
-
-        char lastChar = object.charAt(object.length() - 1);
-
-        if (('\n' != lastChar) && ('\r' != lastChar)) {
-            bw.newLine();
-        }
-
-        bw.write("-----END ");
-        bw.write(type);
-        bw.write("-----");
-        bw.newLine();
-
-        bw.flush();
-    }
-
-    public static void writeObject(BufferedWriter out, String type, byte[] object) throws IOException {
-        String base64 = base64Encode(object);
-
-        writeBase64Object(out, type, base64);
-    }
-
-    /**
-     * Convert a byte array into a BASE64 encoded String.
-     *
-     * @param in The bytes to be converted
-     * @return the BASE64 encoded String.
-     */
-    public static String base64Encode(byte[] in) throws IOException {
-        return base64Encode(in, true);
-    }
-
-    /**
-     * Convert a byte array into a BASE64 encoded String.
-     *
-     * @param in the bytes to be converted
-     * @return the BASE64 encoded String.
-     */
-    public static String base64Encode(byte[] in, boolean wrap) throws IOException {
-        StringWriter base64 = new StringWriter();
-
-        BASE64OutputStream b64os;
-
-        if (wrap) {
-            b64os = new BASE64OutputStream(base64, 72);
-        } else {
-            b64os = new BASE64OutputStream(base64);
-        }
-        b64os.write(in);
-        b64os.close();
-
-        String encoded = base64.toString();
-
-        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-            LOG.finer("Encoded " + in.length + " bytes -> " + encoded.length() + " characters.");
-        }
-
-        return encoded;
-    }
-
-    /**
-     * Convert a BASE64 Encoded String into byte array.
-     *
-     * @param in BASE64 encoded String
-     * @return the decoded bytes.
-     */
-    public static byte[] base64Decode(Reader in) throws IOException {
-        BASE64InputStream b64is = new BASE64InputStream(in);
-        ByteArrayOutputStream bos = new ByteArrayOutputStream();
-
-        do {
-            int c = b64is.read();
-
-            if (c < 0) {
-                break;
-            }
-
-            bos.write(c);
-        } while (true);
-
-        byte[] result = bos.toByteArray();
-
-        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-            LOG.finer("Decoded " + result.length + " bytes.");
-        }
-
-        return result;
-    }
-
-    /**
-     * Private replacement for toHexString since we need the leading 0 digits.
-     * Returns a String containing byte value encoded as 2 hex characters.
-     *
-     * @param theByte a byte containing the value to be encoded.
-     * @return String containing byte value encoded as 2 hex characters.
-     */
-    private static String toHexDigits(byte theByte) {
-        final char[] HEXDIGITS = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
-        StringBuilder result = new StringBuilder(2);
-
-        result.append(HEXDIGITS[(theByte >>> 4) & 15]);
-        result.append(HEXDIGITS[theByte & 15]);
-
-        return result.toString();
-    }
-
-    private static String toHexDigits(byte[] bytes) {
-        StringBuilder encoded = new StringBuilder(bytes.length * 2);
-
-        // build the string.
-        for (byte aByte : bytes) {
-            encoded.append(toHexDigits(aByte).toUpperCase());
-        }
-        return encoded.toString();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/StringAuthenticator.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/StringAuthenticator.java
deleted file mode 100644 (file)
index 9b6180f..0000000
+++ /dev/null
@@ -1,356 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.membership.pse;
-
-
-import java.net.URI;
-import java.util.Arrays;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.security.cert.X509Certificate;
-import javax.crypto.EncryptedPrivateKeyInfo;
-
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.security.KeyStoreException;
-
-import net.jxta.credential.AuthenticationCredential;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.peer.PeerID;
-import net.jxta.membership.Authenticator;
-import net.jxta.membership.MembershipService;
-
-
-/**
- * An authenticator associated with the PSE membership service.
- *
- *@see net.jxta.membership.Authenticator
- *@see net.jxta.membership.MembershipService
- **/
-public class StringAuthenticator implements Authenticator {
-    
-    /**
-     * The Membership Service which generated this authenticator.
-     **/
-    transient PSEMembershipService source;
-    
-    /**
-     * The Authentication which was provided to the Apply operation of the
-     * membership service.
-     **/
-    transient AuthenticationCredential application;
-    
-    /**
-     *  The certficate which we are authenticating against
-     **/
-    transient X509Certificate seedCert;
-    
-    /**
-     *  The encrypted private key which we must unlock.
-     **/
-    transient EncryptedPrivateKeyInfo seedKey;
-    
-    /**
-     * the password for that identity.
-     **/
-    transient char[] store_password = null;
-    
-    /**
-     * the identity which is being claimed
-     **/
-    transient ID identity = null;
-    
-    /**
-     * the password for that identity.
-     **/
-    transient char[] key_password = null;
-    
-    /**
-     * Creates an authenticator for the PSE membership service. Anything entered
-     * into the identity info section of the Authentication credential is
-     * ignored.
-     *
-     *  @param source The instance of the PSE membership service which
-     *  created this authenticator.
-     *  @param application Anything entered into the identity info section of
-     *  the Authentication credential is ignored.
-     **/
-    StringAuthenticator(PSEMembershipService source, AuthenticationCredential application, X509Certificate seedCert, EncryptedPrivateKeyInfo seedKey) {
-        this(source, application);
-        
-        this.seedCert = seedCert;
-        this.seedKey = seedKey;
-    }
-    
-    /**
-     * Creates an authenticator for the PSE membership service. Anything entered
-     * into the identity info section of the Authentication credential is
-     * ignored.
-     *
-     *  @param source The instance of the PSE membership service which created
-     *  this authenticator.
-     *  @param application Anything entered into the identity info section of
-     *  the Authentication credential is ignored.
-     **/
-    StringAuthenticator(PSEMembershipService source, AuthenticationCredential application) {
-        this.source = source;
-        this.application = application;
-        
-        // XXX 20010328 bondolo@jxta.org Could do something with the authentication credential here.
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    @Override
-    protected void finalize() throws Throwable {
-        if (null != store_password) {
-            Arrays.fill(store_password, '\0');
-        }
-        
-        if (null != key_password) {
-            Arrays.fill(key_password, '\0');
-        }
-        
-        super.finalize();
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public MembershipService getSourceService() {
-        return (MembershipService) source.getInterface();
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public AuthenticationCredential getAuthenticationCredential() {
-        return application;
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    public String getMethodName() {
-        return "StringAuthentication";
-    }
-    
-    /**
-     * {@inheritDoc}
-     **/
-    synchronized public boolean isReadyForJoin() {
-        if (null != seedCert) {
-            return null != PSEUtils.pkcs5_Decrypt_pbePrivateKey(key_password, seedCert.getPublicKey().getAlgorithm(), seedKey);
-        } else {
-            return source.pseStore.validPasswd(identity, store_password, key_password);
-        }
-    }
-    
-    /**
-     *  Get KeyStore password
-     **/
-    public char[] getAuth1_KeyStorePassword() {
-        return store_password;
-    }
-    
-    /**
-     *  Set KeyStore password
-     **/
-    public void setAuth1_KeyStorePassword(String store_password) {
-        if (null == store_password) {
-            setAuth1_KeyStorePassword((char[]) null);
-        } else {
-            setAuth1_KeyStorePassword(store_password.toCharArray());
-        }
-    }
-    
-    /**
-     *  Set KeyStore password
-     **/
-    public void setAuth1_KeyStorePassword(char[] store_password) {
-        if (null != this.store_password) {
-            Arrays.fill(this.store_password, '\0');
-        }
-        
-        if (null == store_password) {
-            this.store_password = null;
-        } else {
-            this.store_password = store_password.clone();
-        }
-    }
-    
-    /**
-     *  Return the available identities.
-     **/
-    public PeerID[] getIdentities(char[] store_password) {
-        
-        if (seedCert != null) {
-            PeerID[] seed = { source.group.getPeerID() };
-
-            return seed;
-        } else {
-            try {
-                ID[] allkeys = source.pseStore.getKeysList(store_password);
-                
-                // XXX bondolo 20040329 it may be appropriate to login
-                // something other than a peer id.
-                List peersOnly = new ArrayList();
-                
-                Iterator eachKey = Arrays.asList(allkeys).iterator();
-                
-                while (eachKey.hasNext()) {
-                    ID aKey = (ID) eachKey.next();
-                    
-                    if (aKey instanceof PeerID) {
-                        peersOnly.add(aKey);
-                    }
-                }
-                
-                return (PeerID[]) peersOnly.toArray(new PeerID[peersOnly.size()]);
-            } catch (IOException failed) {
-                return null;
-            } catch (KeyStoreException failed) {
-                return null;
-            }
-        }
-    }
-    
-    /**
-     *  Returns the X509 Certificate associated with the specified ID.
-     *
-     *  @param store_password   The password for the keystore.
-     *  @param aPeer    The peer who's certificate is desired. For uninitialized
-     *  keystores this must be the peerid of the registering peer.
-     **/
-    public X509Certificate getCertificate(char[] store_password, ID aPeer) {
-        if (seedCert != null) {
-            if (aPeer.equals(source.group.getPeerID())) {
-                return seedCert;
-            } else {
-                return null;
-            }
-        } else {
-            try {
-                return source.pseStore.getTrustedCertificate(aPeer, store_password);
-            } catch (IOException failed) {
-                return null;
-            } catch (KeyStoreException failed) {
-                return null;
-            }
-        }
-    }
-    
-    /**
-     *  Get Identity
-     **/
-    public ID getAuth2Identity() {
-        return identity;
-    }
-    
-    /**
-     *  Set Identity
-     **/
-    public void setAuth2Identity(String id) {
-        try {
-            URI idURI = new URI(id);
-            ID identity = IDFactory.fromURI(idURI);
-
-            setAuth2Identity(identity);
-        } catch (URISyntaxException badID) {
-            throw new IllegalArgumentException("Bad ID");
-        } 
-    }
-    
-    /**
-     *  Set Identity
-     **/
-    public void setAuth2Identity(ID identity) {
-        this.identity = identity;
-    }
-    
-    /**
-     *  Get identity password
-     **/
-    public char[] getAuth3_IdentityPassword() {
-        return key_password;
-    }
-    
-    /**
-     *  Set identity password
-     **/
-    public void setAuth3_IdentityPassword(String key_password) {
-        setAuth3_IdentityPassword(key_password.toCharArray());
-    }
-    
-    /**
-     *  Set identity password
-     **/
-    public void setAuth3_IdentityPassword(char[] key_password) {
-        if (null != this.key_password) {
-            Arrays.fill(this.key_password, '\0');
-        }
-        
-        if (null == key_password) {
-            this.key_password = null;
-        } else {
-            this.key_password = key_password.clone();
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/URIKeyStoreManager.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/URIKeyStoreManager.java
deleted file mode 100644 (file)
index 485de10..0000000
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.membership.pse;
-
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.OutputStream;
-import java.net.URI;
-import java.security.KeyStore;
-
-import java.io.IOException;
-import java.security.KeyStoreException;
-import java.security.NoSuchProviderException;
-import java.security.NoSuchAlgorithmException;
-import java.security.cert.CertificateException;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-
-/**
- *  Manages a Keystore located at URI. This version precludes KeyStores which
- *  are built from multiple URIs.
- **/
-public class URIKeyStoreManager implements KeyStoreManager {
-    
-    /**
-     *  Log4J Logger
-     **/
-    private final static transient Logger LOG = Logger.getLogger(URIKeyStoreManager.class.getName());
-    
-    /**
-     *  The default keystore type we will use.
-     **/
-    private final static String DEFAULT_KEYSTORE_TYPE = "jks";
-    
-    /**
-     *  The keystore type
-     **/
-    private final String keystore_type;
-    
-    /**
-     *  The keystore type
-     **/
-    private final String keystore_provider;
-    
-    /**
-     *  The location where the keystore lives.
-     **/
-    private final URI keystore_location;
-    
-    /**
-     *  Default constructor.
-     **/
-    public URIKeyStoreManager(String type, String provider, URI location) throws NoSuchProviderException, KeyStoreException {
-        if (null == type) {
-            type = DEFAULT_KEYSTORE_TYPE;
-            provider = null;
-        }
-        
-        if (!location.isAbsolute()) {
-            throw new IllegalArgumentException("location must be an absolute URI");
-        }
-        
-        if ("file".equalsIgnoreCase(location.getScheme())) {
-            File asFile = new File(location);
-            
-            if (asFile.exists() && !asFile.isFile()) {
-                throw new IllegalArgumentException("location must refer to a file");
-            }
-        }
-        
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            LOG.config("pse location = " + location);
-        }
-        
-        keystore_type = type;
-        
-        keystore_provider = provider;
-        
-        keystore_location = location;
-        
-        // check if we can get an instance.
-        if (null == keystore_provider) {
-            KeyStore.getInstance(keystore_type);
-        } else {
-            KeyStore.getInstance(keystore_type, keystore_provider);
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    public boolean isInitialized() {
-        return isInitialized(null);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    public boolean isInitialized(char[] store_password) {
-        try {
-            KeyStore store;
-
-            if (null == keystore_provider) {
-                store = KeyStore.getInstance(keystore_type);
-            } else {
-                store = KeyStore.getInstance(keystore_type, keystore_provider);
-            }
-            
-            store.load(keystore_location.toURL().openStream(), store_password);
-            
-            return true;
-        } catch (Exception failed) {
-            return false;
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    public void createKeyStore(char[] store_password) throws KeyStoreException, IOException {
-        try {
-            KeyStore store;
-
-            if (null == keystore_provider) {
-                store = KeyStore.getInstance(keystore_type);
-            } else {
-                store = KeyStore.getInstance(keystore_type, keystore_provider);
-            }
-            
-            store.load(null, store_password);
-            
-            saveKeyStore(store, store_password);
-        } catch (NoSuchProviderException failed) {
-            KeyStoreException failure = new KeyStoreException("NoSuchProviderException during keystore processing");
-
-            failure.initCause(failed);
-            throw failure;
-        } catch (NoSuchAlgorithmException failed) {
-            KeyStoreException failure = new KeyStoreException("NoSuchAlgorithmException during keystore processing");
-
-            failure.initCause(failed);
-            throw failure;
-        } catch (CertificateException failed) {
-            KeyStoreException failure = new KeyStoreException("CertificateException during keystore processing");
-
-            failure.initCause(failed);
-            throw failure;
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    public KeyStore loadKeyStore(char[] password) throws KeyStoreException, IOException {
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Loading (" + keystore_type + "," + keystore_provider + ") store from " + keystore_location);
-        }
-        
-        try {
-            KeyStore store;
-
-            if (null == keystore_provider) {
-                store = KeyStore.getInstance(keystore_type);
-            } else {
-                store = KeyStore.getInstance(keystore_type, keystore_provider);
-            }
-            
-            store.load(keystore_location.toURL().openStream(), password);
-            
-            return store;
-        } catch (NoSuchAlgorithmException failed) {
-            KeyStoreException failure = new KeyStoreException("NoSuchAlgorithmException during keystore processing");
-
-            failure.initCause(failed);
-            throw failure;
-        } catch (CertificateException failed) {
-            KeyStoreException failure = new KeyStoreException("CertificateException during keystore processing");
-
-            failure.initCause(failed);
-            throw failure;
-        } catch (NoSuchProviderException failed) {
-            KeyStoreException failure = new KeyStoreException("NoSuchProviderException during keystore processing");
-
-            failure.initCause(failed);
-            throw failure;
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    public void saveKeyStore(KeyStore store, char[] password) throws KeyStoreException, IOException {
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Writing " + store + " to " + keystore_location);
-        }
-        
-        try {
-            OutputStream os = null;
-            
-            if ("file".equalsIgnoreCase(keystore_location.getScheme())) {
-                // Sadly we can't use URL.openConnection() to create the
-                // OutputStream for file:// URLs. bogus.
-                os = new FileOutputStream(new File(keystore_location));
-            } else {
-                os = keystore_location.toURL().openConnection().getOutputStream();
-            }
-            store.store(os, password);
-        } catch (NoSuchAlgorithmException failed) {
-            KeyStoreException failure = new KeyStoreException("NoSuchAlgorithmException during keystore processing");
-
-            failure.initCause(failed);
-            throw failure;
-        } catch (CertificateException failed) {
-            KeyStoreException failure = new KeyStoreException("CertificateException during keystore processing");
-
-            failure.initCause(failed);
-            throw failure;
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    public void eraseKeyStore() {
-        
-        if ("file".equalsIgnoreCase(keystore_location.getScheme())) {
-            File asFile = new File(keystore_location);
-            
-            if (asFile.exists() && asFile.isFile() && asFile.canWrite()) {
-                asFile.delete();
-            }
-        } else {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("Unable to delete non-file URI :" + keystore_location);
-            }
-            
-            throw new UnsupportedOperationException("Unable to delete non-file URI");
-        }
-    }
-
-    /**
-     *  {@inheritDoc}
-     **/
-   public String toString() {
-      StringBuilder sb = new StringBuilder("PSE keystore details:  \n");
-      sb.append("   Class:  ").append(this.getClass().getName()).append("\n");
-      sb.append("   Type:  ").append(keystore_type==null ? "<default>" : keystore_type).append("\n");
-      sb.append("   Provider:  ").append(keystore_provider==null ? "<default>" : keystore_provider).append("\n");
-      sb.append("   Location:  ").append(keystore_location==null ? "<default>" : keystore_location.toString()).append("\n");
-      return sb.toString();
-   }
-
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/membership/pse/package.html
deleted file mode 100644 (file)
index 1bf6794..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    A JXTA Membership Service utilizing PKI to provide secure identities.
-
-    @see net.jxta.membership
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/meter/ConditionalMeterBuildSettings.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/meter/ConditionalMeterBuildSettings.java
deleted file mode 100644 (file)
index cbf2f50..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Copyright (c) 2001-2006 Sun Microsystems, Inc. All rights reserved.
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at https://jxta.dev.java.net.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <https://jxta.dev.java.net/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
-
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  https://jxta.dev.java.net/
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- *  
- */
-
-
-/*  ****  THIS IS A GENERATED FILE. DO NOT EDIT.  ****  */
-
-package net.jxta.impl.meter;
-
-import java.util.ResourceBundle;
-import net.jxta.impl.meter.*;
-
-public class ConditionalMeterBuildSettings {
-       public static boolean isRuntimeMetering() {
-               boolean runtimeMetering = false; 
-
-               try { 
-                       ResourceBundle userResourceBundle = ResourceBundle.getBundle( "net.jxta.user" ); 
-                       String meteringProperty = "net.jxta.meter.conditionalMetering"; 
-                       String meteringValue = userResourceBundle.getString( meteringProperty ); 
-                       runtimeMetering = "on".equalsIgnoreCase( meteringValue ); 
-               } catch (Exception ignored) { 
-               }
-
-               return runtimeMetering;
-       }
-}
\ No newline at end of file
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/meter/GenericServiceMonitor.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/meter/GenericServiceMonitor.java
deleted file mode 100644 (file)
index b4a9960..0000000
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.meter;
-
-
-import net.jxta.document.Advertisement;
-import net.jxta.exception.JxtaException;
-import net.jxta.id.ID;
-import net.jxta.meter.MonitorResources;
-import net.jxta.meter.ServiceMetric;
-import net.jxta.meter.ServiceMonitorFilter;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.platform.Module;
-import net.jxta.platform.ModuleClassID;
-import net.jxta.protocol.ModuleImplAdvertisement;
-
-
-public abstract class GenericServiceMonitor implements ServiceMonitorImpl, Module {
-    private ModuleClassID moduleClassID;
-    protected MonitorManager monitorManager;
-
-    protected long reportRate;
-    protected int reportRateIndex;
-    protected ServiceMetric cumulativeServiceMetric;
-    protected ServiceMetric deltaServiceMetrics[];
-    protected ModuleImplAdvertisement implAdvertisement;
-
-    public GenericServiceMonitor() {}
-
-    // public void init(MonitorManager monitorManager, ModuleClassID moduleClassID) {
-
-    public void init(PeerGroup group, ID assignedID, Advertisement advertisement) {
-        group.unref(); // We do not use the group. These are not quite real modules.
-        this.implAdvertisement = (ModuleImplAdvertisement) advertisement;
-        this.moduleClassID = (ModuleClassID) assignedID;
-    }
-
-    public void init(MonitorManager monitorManager) {
-        this.monitorManager = monitorManager;
-
-        if (MeterBuildSettings.METERING) {
-            cumulativeServiceMetric = createServiceMetric();
-            deltaServiceMetrics = new ServiceMetric[monitorManager.getReportRatesCount()];
-            init();
-        }
-    }
-
-    /*
-     public void init(MonitorManager monitorManager) {
-     this.monitorManager = monitorManager;
-     }
-     */
-
-    public int startApp(java.lang.String[] args) {
-        return 0;
-    } // fix-me: what's the right return?
-
-    public void stopApp() {}
-
-    protected void init() {}
-
-    public ModuleClassID getModuleClassID() {
-        return moduleClassID;
-    }
-
-    public PeerGroup getPeerGroup() {
-        return monitorManager.getPeerGroup();
-    }
-
-    protected ServiceMetric getCumulativeServiceMetric() {
-        return cumulativeServiceMetric;
-    }
-
-    public void resetPulseRate(ServiceMonitorPulseInfo pulseInfo, int oldPulseRateIndex) {
-        this.reportRate = pulseInfo.getPulseRate();
-        this.reportRateIndex = pulseInfo.getPulseRateIndex();
-    }
-
-    public void validateCumulativeServiceMonitorFilter(ServiceMonitorFilter serviceMonitorFilter) {// base implementation is to accept
-    }
-
-    public ServiceMonitorFilter createSupportedCumulativeServiceMonitorFilter(ServiceMonitorFilter serviceMonitorFilter) {
-        // base implementation is to accept
-        return serviceMonitorFilter;
-    }
-
-    public void validateServiceMonitorFilter(ServiceMonitorFilter serviceMonitorFilter, long reportRate) {// base implementation is to accept
-    }
-
-    public ServiceMonitorFilter createSupportedServiceMonitorFilter(ServiceMonitorFilter serviceMonitorFilter, long reportRate) {
-        // base implementation is to accept
-        return serviceMonitorFilter;
-    }
-
-    protected ServiceMetric createServiceMetric() {
-        try {
-            return MonitorResources.createServiceMetric(moduleClassID);
-        } catch (JxtaException e) { // this will always succeed since we were able to lad the monitor
-            return null;
-        }
-    }
-
-    /**
-     * Get the service metrics accrued since the last pulse
-     *
-     * @return null if there were no metrices since the last call
-     */
-    protected abstract ServiceMetric collectServiceMetrics();
-
-    public synchronized void beginPulse(ServiceMonitorPulseInfo pulseInfo) {
-        ServiceMetric baseDeltaServiceMetric = collectServiceMetrics();
-
-        deltaServiceMetrics[reportRateIndex] = baseDeltaServiceMetric;
-
-        if (baseDeltaServiceMetric != null) {
-            for (int reportRate = reportRateIndex + 1; reportRate < deltaServiceMetrics.length; reportRate++) {
-
-                if (pulseInfo.isRegisteredFilterForRate(reportRate)) {
-
-                    if (deltaServiceMetrics[reportRate] == null) {
-                        deltaServiceMetrics[reportRate] = createServiceMetric();
-                    }
-
-                    deltaServiceMetrics[reportRate].mergeMetrics(baseDeltaServiceMetric);
-                }
-            }
-        }
-    }
-
-    public void endPulse(ServiceMonitorPulseInfo pulseInfo) {
-        for (int reportRateIndex = 0; reportRateIndex < monitorManager.getReportRatesCount(); reportRateIndex++) {
-            if (pulseInfo.isEvenPulseForRateIndex(reportRateIndex)) {
-                deltaServiceMetrics[reportRateIndex] = null;
-            }
-        }
-    }
-
-    public void beginCumulativeReport() {}
-
-    public void endCumulativeReport() {}
-
-    public ServiceMetric getServiceMetric(ServiceMonitorFilter serviceMonitorFilter, long fromTime, long toTime, int reportIndex, long reportRate) {
-        int deltaReportRateIndex = monitorManager.getReportRateIndex(reportRate);
-
-        // Fix-Me: For now we are not yet  supporting filters
-
-        return deltaServiceMetrics[deltaReportRateIndex];
-    }
-
-    public ServiceMetric getCumulativeServiceMetric(ServiceMonitorFilter serviceMonitorFilter, long fromTime, long toTime) {
-        // Fix-Me: For now we are not yet  supporting filters
-
-        return cumulativeServiceMetric;
-    }
-
-    public void serviceMonitorFilterRegistered(ServiceMonitorFilter serviceMonitorFilter, int reportRateIndex, long reportRate, boolean newRate) {
-        if (newRate) {
-            deltaServiceMetrics[reportRateIndex] = createServiceMetric();
-        }
-    }
-
-    public void serviceMonitorFilterDeregistered(ServiceMonitorFilter serviceMonitorFilter, int reportRateIndex, long reportRate, boolean retiredRate) {
-        if (retiredRate) {
-            deltaServiceMetrics[reportRateIndex] = null;
-        }
-    }
-
-    public void destroy() {}
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/meter/MeterBuildSettings.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/meter/MeterBuildSettings.java
deleted file mode 100644 (file)
index 4f43a11..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Copyright (c) 2001-2006 Sun Microsystems, Inc. All rights reserved.
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at https://jxta.dev.java.net.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <https://jxta.dev.java.net/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
-
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  https://jxta.dev.java.net/
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- *  
- */
-
-
-/*  ****  THIS IS A GENERATED FILE. DO NOT EDIT.  ****  */
-
-package net.jxta.impl.meter;
-
-import net.jxta.impl.meter.*;
-
-public interface MeterBuildSettings {
-       public static final boolean METERING = ConditionalMeterBuildSettings.isRuntimeMetering();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/meter/MetricUtilities.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/meter/MetricUtilities.java
deleted file mode 100644 (file)
index b0e98e5..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.meter;
-
-
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.peer.PeerID;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-
-public class MetricUtilities {
-    private static PeerID unknownPeer = (PeerID) ID.create(URI.create("urn:jxta:uuid-DEAF03"));
-    private static PeerID badPeer = (PeerID) ID.create(URI.create("urn:jxta:uuid-BADBAD03"));
-
-    public static final PeerID UNKNOWN_PEERID = unknownPeer;
-    public static final PeerID BAD_PEERID = badPeer;
-
-    public static PeerID getPeerIdFromString(String peerIdString) {
-        PeerID peerId;
-
-        try {
-            peerId = (PeerID) IDFactory.fromURI(new URI(peerIdString));
-        } catch (URISyntaxException e) {
-            peerId = BAD_PEERID;
-        }
-        return peerId;
-    }
-
-    public static PeerID getPeerIdFromEndpointAddress(EndpointAddress endpointAddress) {
-        PeerID peerId;
-
-        try {
-            peerId = (PeerID) IDFactory.fromURI(
-                    new URI(
-                            ID.URIEncodingName + ":" + endpointAddress.getProtocolName() + ":"
-                            + endpointAddress.getProtocolAddress()));
-        } catch (URISyntaxException e) {
-            peerId = BAD_PEERID;
-        }
-        return peerId;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/meter/MonitorManager.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/meter/MonitorManager.java
deleted file mode 100644 (file)
index 4d25c7b..0000000
+++ /dev/null
@@ -1,834 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.meter;
-
-
-import net.jxta.document.Advertisement;
-import net.jxta.exception.JxtaException;
-import net.jxta.id.ID;
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.meter.MonitorEvent;
-import net.jxta.meter.MonitorException;
-import net.jxta.meter.MonitorFilter;
-import net.jxta.meter.MonitorFilterException;
-import net.jxta.meter.MonitorListener;
-import net.jxta.meter.MonitorReport;
-import net.jxta.meter.MonitorResources;
-import net.jxta.meter.PeerMonitorInfo;
-import net.jxta.meter.ServiceMetric;
-import net.jxta.meter.ServiceMonitor;
-import net.jxta.meter.ServiceMonitorFilter;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.platform.ModuleClassID;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.service.Service;
-import net.jxta.util.documentSerializable.DocumentSerializableUtilities;
-import net.jxta.util.documentSerializable.DocumentSerializationException;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.LinkedList;
-
-
-public class MonitorManager implements Service {
-    private final static long timeZero = System.currentTimeMillis();
-    public static final int NOT_PULSING = -1;
-
-    private static final int NO_PRIOR_REPORT = 0;
-
-    private static long supportedReportRates[] = new long[] {
-        500, TimeUtils.ASECOND, 5 * TimeUtils.ASECOND, 10 * TimeUtils.ASECOND, 15 * TimeUtils.ASECOND, 30 * TimeUtils.ASECOND
-                ,
-        TimeUtils.AMINUTE, 5 * TimeUtils.AMINUTE, 10 * TimeUtils.AMINUTE, 15 * TimeUtils.AMINUTE, 30 * TimeUtils.AMINUTE
-                ,
-        TimeUtils.ANHOUR, 3 * TimeUtils.ANHOUR, 6 * TimeUtils.ANHOUR, 12 * TimeUtils.ANHOUR, TimeUtils.ADAY, TimeUtils.AWEEK};
-
-    private int pulsesPerRate[] = new int[supportedReportRates.length];
-    private long startTime = System.currentTimeMillis();
-
-    private LinkedList<MonitorListenerInfo> monitorListenerInfos = new LinkedList<MonitorListenerInfo>();
-    private Hashtable<ModuleClassID, ServiceMonitorPulseInfo> serviceMonitorPulseInfos = new Hashtable<ModuleClassID, ServiceMonitorPulseInfo>();
-    private int filtersPerRate[] = new int[supportedReportRates.length];
-    private long previousReportTimes[] = new long[supportedReportRates.length];
-
-    private PeerGroup peerGroup;
-    private Thread reportThread;
-
-    private long pulseRate = NOT_PULSING;
-    private int pulseRateIndex = NOT_PULSING;
-    private int pulseNumber = 0;
-    private long nextPulseTime = NO_PRIOR_REPORT;
-    private boolean isRunning = true; // true until monitor is destroyed, triggers termination of report thread
-
-    private ModuleClassID[] supportedModuleClassIDs;
-    private ModuleImplAdvertisement implAdvertisement;
-    private long lastResetTime = System.currentTimeMillis();
-
-    public Advertisement getImplAdvertisement() {
-        return implAdvertisement;
-    }
-
-    public Service getInterface() {
-        // This is good enough. No need to get fancy.
-        return this;
-    }
-
-    // public MonitorManager(PeerGroup peerGroup) {
-
-    public void init(PeerGroup peerGroup, ID assignedID, Advertisement implAdvertisement) {
-        this.implAdvertisement = (ModuleImplAdvertisement) implAdvertisement;
-        this.peerGroup = peerGroup;
-        createReportThread();
-
-        for (int i = 0; i < previousReportTimes.length; i++) {
-            pulsesPerRate[i] = (int) (supportedReportRates[i] / supportedReportRates[0]);
-        }
-    }
-
-    public int startApp(java.lang.String[] args) {
-        return 0; // fix-me
-    }
-
-    public void stopApp() {
-        destroy();
-    }
-
-    private class MonitorListenerInfo {
-        MonitorListener monitorListener;
-        MonitorFilter monitorFilter;
-        long reportRate;
-        int reportRateIndex;
-        boolean sendCumulativeFirst = false;
-        boolean wasCumulativeSent = false;
-
-        MonitorListenerInfo(MonitorListener monitorListener, long reportRate, MonitorFilter monitorFilter, boolean cumulativeFirst) {
-            this.monitorListener = monitorListener;
-            this.monitorFilter = monitorFilter;
-            this.reportRate = reportRate;
-            this.sendCumulativeFirst = cumulativeFirst;
-            this.reportRateIndex = getReportRateIndex(reportRate);
-        }
-    }
-
-    public static long[] getReportRates() { // return copy so that users can't modify.
-        long copy[] = new long[supportedReportRates.length];
-
-        System.arraycopy(supportedReportRates, 0, copy, 0, supportedReportRates.length);
-        return copy;
-    }
-
-    public boolean isLocalMonitoringAvailable(ModuleClassID moduleClassID) {
-        ServiceMonitor serviceMonitor = getServiceMonitor(moduleClassID);
-
-        return (serviceMonitor != null);
-    }
-
-    public PeerGroup getPeerGroup() {
-        return peerGroup;
-    }
-
-    // Cooperate with the code that loaded this module to replace the strong
-    // group interface given by init() with a non-counted one.
-    private void setPeerGroup(PeerGroup pg) {
-        PeerGroup tmp = peerGroup;
-
-        peerGroup = pg;
-        tmp.unref();
-        tmp = null;
-    }
-
-    public PeerMonitorInfo getPeerMonitorInfo() {
-        long[] reportRates = getReportRates(); // makes a copy
-        ModuleClassID[] moduleClassIDs = getMonitorableServiceTypes(); // ensures that array is initialized.
-        long runningTime = System.currentTimeMillis() - lastResetTime;
-
-        return new PeerMonitorInfo(MeterBuildSettings.METERING, moduleClassIDs, reportRates, lastResetTime, runningTime);
-    }
-
-    public int getReportRatesCount() {
-        return supportedReportRates.length;
-    }
-
-    public int getReportRateIndex(long reportRate) {
-        for (int i = 0; i < supportedReportRates.length; i++) {
-            if (supportedReportRates[i] == reportRate) {
-                return i;
-            }
-        }
-
-        return -1;
-    }
-
-    public boolean isSupportedReportRate(long reportRate) {
-        return getReportRateIndex(reportRate) >= 0;
-    }
-
-    public long getReportRate(int index) {
-        return supportedReportRates[index];
-    }
-
-    public long getBestReportRate(long desiredReportRate) {
-        for (long supportedReportRate : supportedReportRates) {
-            if (desiredReportRate <= supportedReportRate) {
-                return supportedReportRate;
-            }
-        }
-
-        return supportedReportRates[supportedReportRates.length - 1];
-    }
-
-    public ServiceMonitor getServiceMonitor(ModuleClassID moduleClassID) {
-        ServiceMonitorPulseInfo serviceMonitorPulseInfo = serviceMonitorPulseInfos.get(moduleClassID);
-
-        if (serviceMonitorPulseInfo != null) {
-            return serviceMonitorPulseInfo.serviceMonitor;
-        } else {
-
-            try {
-                ModuleImplAdvertisement moduleImplAdvertisement = MonitorResources.getServiceMonitorImplAdvertisement(
-                        moduleClassID, implAdvertisement);
-                ServiceMonitor serviceMonitor = (ServiceMonitor) peerGroup.loadModule(moduleClassID, moduleImplAdvertisement);
-
-                MonitorResources.registerServiceMonitorModuleImplAdvertisement(moduleImplAdvertisement);
-
-                if (serviceMonitor instanceof ServiceMonitorImpl) {
-                    ((ServiceMonitorImpl) serviceMonitor).init(this);
-
-                }
-
-                serviceMonitorPulseInfo = new ServiceMonitorPulseInfo(this, serviceMonitor);
-                serviceMonitorPulseInfos.put(moduleClassID, serviceMonitorPulseInfo);
-                return serviceMonitor;
-            } catch (JxtaException e) {
-                throw new RuntimeException("Unable to load Service Monitor: " + moduleClassID + "\n\tException: " + e);
-            }
-        }
-    }
-
-    private void resetPulseRate() {
-        int oldPulseRateIndex = pulseRateIndex;
-
-        pulseRateIndex = NOT_PULSING;
-        pulseRate = NOT_PULSING;
-
-        for (int i = 0; i < filtersPerRate.length; i++) {
-            if (filtersPerRate[i] != 0) {
-                pulseRateIndex = i;
-                pulseRate = getReportRate(pulseRateIndex);
-                break;
-            }
-        }
-
-        if (oldPulseRateIndex == pulseRateIndex) {
-            return;
-        }    // nothing changed
-
-        long now = System.currentTimeMillis();
-
-        if (oldPulseRateIndex == NOT_PULSING) { // case 1: No pulse to pulse
-            for (int i = 0; i < filtersPerRate.length; i++) {
-                if (filtersPerRate[i] != 0) {
-                    previousReportTimes[i] = now;
-                } else {
-                    previousReportTimes[i] = NO_PRIOR_REPORT;
-                }
-            }
-
-            pulseNumber = 0;
-            nextPulseTime = now + pulseRate;
-        } else if (pulseRateIndex == NOT_PULSING) {// case 2: pulse to No pulse
-            // Do nothing
-        } else if (pulseRateIndex < oldPulseRateIndex) { // case 3: pulse going to a faster pulse
-            for (int i = pulseRateIndex; i < (oldPulseRateIndex - 1); i++) {
-                if (filtersPerRate[i] != 0) {
-                    previousReportTimes[i] = now;
-                } else {
-                    previousReportTimes[i] = NO_PRIOR_REPORT;
-                }
-            }
-
-            long timeToNextPulse = nextPulseTime - now;
-
-            if (pulseRate < timeToNextPulse) {
-                int numPulsesToNow = (int) (timeToNextPulse / pulseRate);
-                int numNewToOldPulses = (int) (supportedReportRates[oldPulseRateIndex] / supportedReportRates[pulseRateIndex]);
-
-                pulseNumber += (numNewToOldPulses - numPulsesToNow) * pulsesPerRate[pulseRateIndex];
-                timeToNextPulse = now - (numPulsesToNow * pulseRate);
-            } else {
-                pulseNumber += (pulsesPerRate[oldPulseRateIndex] - pulsesPerRate[pulseRateIndex]);
-            }
-
-        } else if (pulseRateIndex > oldPulseRateIndex) { // case 3: pulse going to a  slower pulse
-            int nextPulseNumber = pulseNumber + pulsesPerRate[oldPulseRateIndex];
-
-            pulseNumber = ((nextPulseNumber - 1) / pulsesPerRate[pulseRateIndex]) * pulsesPerRate[pulseRateIndex];
-            nextPulseTime += (nextPulseNumber - pulseNumber) * supportedReportRates[0];
-
-            for (int i = 0; i < pulseRateIndex; i++) {
-                previousReportTimes[i] = NO_PRIOR_REPORT;
-            }
-        }
-
-        reportThread.interrupt();
-    }
-
-    private MonitorReport getMonitorReport(MonitorFilter monitorFilter, long reportRate, long previousDeltaTime, long beginReportTime) {
-        MonitorReport monitorReport = new MonitorReport(previousDeltaTime, beginReportTime, false);
-
-        for (Iterator i = monitorFilter.getModuleClassIDs(); i.hasNext();) {
-            ModuleClassID moduleClassID = (ModuleClassID) i.next();
-
-            ServiceMonitorFilter serviceMonitorFilter = monitorFilter.getServiceMonitorFilter(moduleClassID);
-
-            ServiceMonitor serviceMonitor = getServiceMonitor(moduleClassID);
-
-            if (serviceMonitorFilter != null) {
-                ServiceMetric serviceMetric = serviceMonitor.getServiceMetric(serviceMonitorFilter, previousDeltaTime
-                        ,
-                        beginReportTime, getReportRateIndex(reportRate), reportRate);
-
-                if (serviceMetric != null) {
-                    monitorReport.addServiceMetric(serviceMetric);
-                }
-            }
-        }
-        return monitorReport;
-    }
-
-    public void validateCumulativeMonitorFilter(MonitorFilter monitorFilter) throws MonitorFilterException {
-        boolean isAnyServiceFilters = false;
-
-        for (Iterator i = monitorFilter.getServiceMonitorFilters(); i.hasNext();) {
-            ServiceMonitorFilter serviceMonitorFilter = (ServiceMonitorFilter) i.next();
-
-            ModuleClassID moduleClassID = serviceMonitorFilter.getModuleClassID();
-            ServiceMonitor serviceMonitor = getServiceMonitor(moduleClassID);
-
-            if (serviceMonitor == null) {
-                throw new MonitorFilterException(MonitorFilterException.SERVICE_NOT_SUPPORTED, moduleClassID);
-            }
-
-            serviceMonitor.validateCumulativeServiceMonitorFilter(serviceMonitorFilter);
-            isAnyServiceFilters = true;
-        }
-
-        if (!isAnyServiceFilters) {
-            throw new MonitorFilterException("Empty Monitor Filter");
-        }
-
-    }
-
-    public void validateMonitorFilter(MonitorFilter monitorFilter, long reportRate) throws MonitorFilterException {
-
-        if (!isSupportedReportRate(reportRate)) {
-            throw new MonitorFilterException(MonitorFilterException.REPORT_RATE_NOT_SUPPORTED, reportRate);
-        }
-
-        boolean isAnyServiceFilters = false;
-
-        for (Iterator i = monitorFilter.getServiceMonitorFilters(); i.hasNext();) {
-            ServiceMonitorFilter serviceMonitorFilter = (ServiceMonitorFilter) i.next();
-
-            ModuleClassID moduleClassID = serviceMonitorFilter.getModuleClassID();
-            ServiceMonitor serviceMonitor = getServiceMonitor(moduleClassID);
-
-            if (serviceMonitor == null) {
-                throw new MonitorFilterException(MonitorFilterException.SERVICE_NOT_SUPPORTED, moduleClassID);
-            }
-
-            serviceMonitor.validateServiceMonitorFilter(serviceMonitorFilter, reportRate);
-            isAnyServiceFilters = true;
-        }
-
-        if (!isAnyServiceFilters) {
-            throw new MonitorFilterException("Empty Monitor Filter");
-        }
-    }
-
-    public MonitorFilter createSupportedCumulativeMonitorFilter(MonitorFilter monitorFilter) throws MonitorFilterException {
-        MonitorFilter newMonitorFilter = new MonitorFilter(monitorFilter.getDescription());
-        boolean anythingAdded = false;
-
-        for (Iterator i = monitorFilter.getServiceMonitorFilters(); i.hasNext();) {
-            ServiceMonitorFilter serviceMonitorFilter = (ServiceMonitorFilter) i.next();
-
-            ModuleClassID moduleClassID = serviceMonitorFilter.getModuleClassID();
-            ServiceMonitor serviceMonitor = getServiceMonitor(moduleClassID);
-
-            if (serviceMonitor == null) {
-                continue;
-            }
-
-            ServiceMonitorFilter newServiceMonitorFilter = serviceMonitor.createSupportedCumulativeServiceMonitorFilter(
-                    serviceMonitorFilter);
-
-            if (newServiceMonitorFilter != null) {
-                newMonitorFilter.addServiceMonitorFilter(newServiceMonitorFilter);
-                anythingAdded = true;
-            }
-        }
-
-        if (anythingAdded) {
-            return newMonitorFilter;
-        } else {
-            return null;
-        }
-    }
-
-    public MonitorFilter createSupportedMonitorFilter(MonitorFilter monitorFilter, long reportRate) throws MonitorFilterException {
-        MonitorFilter newMonitorFilter = new MonitorFilter(monitorFilter.getDescription());
-        boolean anythingAdded = false;
-
-        for (Iterator i = monitorFilter.getServiceMonitorFilters(); i.hasNext();) {
-            ServiceMonitorFilter serviceMonitorFilter = (ServiceMonitorFilter) i.next();
-
-            ModuleClassID moduleClassID = serviceMonitorFilter.getModuleClassID();
-            ServiceMonitor serviceMonitor = getServiceMonitor(moduleClassID);
-
-            if (serviceMonitor == null) {
-                continue;
-            }
-
-            ServiceMonitorFilter newServiceMonitorFilter = serviceMonitor.createSupportedServiceMonitorFilter(serviceMonitorFilter
-                    ,
-                    reportRate);
-
-            if (newServiceMonitorFilter != null) {
-                newMonitorFilter.addServiceMonitorFilter(newServiceMonitorFilter);
-                anythingAdded = true;
-            }
-        }
-
-        if (anythingAdded) {
-            return newMonitorFilter;
-        } else {
-            return null;
-        }
-    }
-
-    public synchronized long addMonitorListener(MonitorFilter monitorFilter, long reportRate, boolean includeCumulative, MonitorListener monitorListener) throws MonitorException {
-
-        validateMonitorFilter(monitorFilter, reportRate); // if validation fails, it will throw an exception
-
-        if (includeCumulative) {
-            validateCumulativeMonitorFilter(monitorFilter);
-        }    // if validation fails, it will throw an exception
-
-        int reportRateIndex = getReportRateIndex(reportRate);
-
-        try {
-            monitorFilter = (MonitorFilter) DocumentSerializableUtilities.copyDocumentSerializable(monitorFilter); // make a copy of the filter
-        } catch (DocumentSerializationException e) {
-            throw new MonitorException(MonitorException.SERIALIZATION, "Error trying to copy MonitorFilter");
-        }
-
-        MonitorListenerInfo monitorListenerInfo = new MonitorListenerInfo(monitorListener, reportRate, monitorFilter
-                ,
-                includeCumulative);
-
-        monitorListenerInfos.add(monitorListenerInfo);
-        filtersPerRate[reportRateIndex]++;
-
-        if ((filtersPerRate[reportRateIndex] == 1) && (pulseRateIndex != NOT_PULSING) && (reportRateIndex > pulseRateIndex)) {
-            previousReportTimes[reportRateIndex] = previousReportTimes[pulseRateIndex];
-        }
-
-        for (Iterator i = monitorFilter.getModuleClassIDs(); i.hasNext();) {
-            ModuleClassID moduleClassID = (ModuleClassID) i.next();
-
-            ServiceMonitorFilter serviceMonitorFilter = monitorFilter.getServiceMonitorFilter(moduleClassID);
-            ServiceMonitorPulseInfo serviceMonitorPulseInfo = serviceMonitorPulseInfos.get(moduleClassID);
-
-            serviceMonitorPulseInfo.registerServiceMonitorFilter(serviceMonitorFilter, reportRateIndex, reportRate);
-        }
-
-        resetPulseRate();
-
-        return reportRate;
-    }
-
-    private MonitorListenerInfo getMonitorListenerInfo(MonitorListener monitorListener) {
-        for (Object monitorListenerInfo1 : monitorListenerInfos) {
-            MonitorListenerInfo monitorListenerInfo = (MonitorListenerInfo) monitorListenerInfo1;
-
-            if (monitorListenerInfo.monitorListener == monitorListener) {
-                return monitorListenerInfo;
-            }
-        }
-        return null;
-    }
-
-    public synchronized int removeMonitorListener(MonitorListener monitorListener) {
-        int numRemoved = 0;
-
-        for (;;) { // remove all instances of this listener
-            MonitorListenerInfo monitorListenerInfo = getMonitorListenerInfo(monitorListener);
-
-            if (monitorListenerInfo == null) {
-                break;
-            } else {
-                MonitorFilter monitorFilter = monitorListenerInfo.monitorFilter;
-                long reportRate = monitorListenerInfo.reportRate;
-                int reportRateIndex = monitorListenerInfo.reportRateIndex;
-
-                monitorListenerInfos.remove(monitorListenerInfo);
-                numRemoved++;
-                filtersPerRate[reportRateIndex]--;
-
-                for (Iterator i = monitorFilter.getModuleClassIDs(); i.hasNext();) {
-                    ModuleClassID moduleClassID = (ModuleClassID) i.next();
-
-                    ServiceMonitorFilter serviceMonitorFilter = monitorFilter.getServiceMonitorFilter(moduleClassID);
-                    ServiceMonitorPulseInfo serviceMonitorPulseInfo = serviceMonitorPulseInfos.get(moduleClassID);
-
-                    serviceMonitorPulseInfo.deregisterServiceMonitorFilter(serviceMonitorFilter, reportRateIndex, reportRate);
-                }
-            }
-        }
-
-        resetPulseRate();
-
-        return numRemoved;
-    }
-
-    public synchronized MonitorReport getCumulativeMonitorReport(MonitorFilter monitorFilter) throws MonitorException {
-        validateCumulativeMonitorFilter(monitorFilter);
-
-        long beginReportTime = System.currentTimeMillis();
-
-        MonitorReport monitorReport = new MonitorReport(startTime, beginReportTime, true);
-
-        for (Iterator i = monitorFilter.getModuleClassIDs(); i.hasNext();) {
-            ModuleClassID moduleClassID = (ModuleClassID) i.next();
-
-            ServiceMonitorFilter serviceMonitorFilter = monitorFilter.getServiceMonitorFilter(moduleClassID);
-            ServiceMonitor serviceMonitor = getServiceMonitor(moduleClassID);
-
-            ServiceMetric serviceMetric = serviceMonitor.getCumulativeServiceMetric(serviceMonitorFilter, timeZero
-                    ,
-                    beginReportTime);
-
-            monitorReport.addServiceMetric(moduleClassID, serviceMetric);
-        }
-
-        return monitorReport;
-    }
-
-    public ModuleClassID[] getMonitorableServiceTypes() {
-        if (supportedModuleClassIDs == null) {
-            ModuleClassID[] registeredModuleClassIDs = MonitorResources.getRegisteredModuleClassIDs();
-            LinkedList<ModuleClassID> supportedModuleClassIDsList = new LinkedList<ModuleClassID>();
-
-            for (ModuleClassID registeredModuleClassID : registeredModuleClassIDs) {
-                if (isLocalMonitoringAvailable(registeredModuleClassID)) {
-                    supportedModuleClassIDsList.add(registeredModuleClassID);
-                }
-            }
-
-            supportedModuleClassIDs = supportedModuleClassIDsList.toArray(new ModuleClassID[0]);
-        }
-        return supportedModuleClassIDs;
-    }
-
-    // fastest pulse rate registered anywhere
-    public long getPulseRate() {
-        return getReportRate(pulseRateIndex);
-    }
-
-    // index of fastest pulse anywhere
-    public int getPulseRateIndex() {
-        return pulseRateIndex;
-    }
-
-    // pulse rate for this monitor
-    public long getPulseRate(ServiceMonitor serviceMonitor) {
-        ServiceMonitorPulseInfo serviceMonitorPulseInfo = serviceMonitorPulseInfos.get(serviceMonitor.getModuleClassID());
-
-        if (serviceMonitorPulseInfo != null) {
-            return serviceMonitorPulseInfo.getPulseRate();
-        } else {
-            return ServiceMonitorPulseInfo.NOT_PULSING;
-        }
-    }
-
-    // index of pulse rate for this monitor
-    public long getPulseRateIndex(ServiceMonitor serviceMonitor) {
-        ServiceMonitorPulseInfo serviceMonitorPulseInfo = serviceMonitorPulseInfos.get(serviceMonitor.getModuleClassID());
-
-        if (serviceMonitorPulseInfo != null) {
-            return serviceMonitorPulseInfo.getPulseRateIndex();
-        } else {
-            return ServiceMonitorPulseInfo.NOT_PULSING;
-        }
-    }
-
-    private void generateReports() {
-        long beginReportTime = System.currentTimeMillis();
-
-        for (Enumeration<ServiceMonitorPulseInfo> e = serviceMonitorPulseInfos.elements(); e.hasMoreElements();) {
-            ServiceMonitorPulseInfo serviceMonitorPulseInfo = e.nextElement();
-            int servicePulseRateIndex = serviceMonitorPulseInfo.getPulseRateIndex();
-
-            if ((serviceMonitorPulseInfo.serviceMonitor instanceof ServiceMonitorImpl)
-                    && isEvenPulseForRateIndex(servicePulseRateIndex)) {
-                ((ServiceMonitorImpl) serviceMonitorPulseInfo.serviceMonitor).beginPulse(serviceMonitorPulseInfo);
-            }
-        }
-
-        for (Object monitorListenerInfo1 : monitorListenerInfos) {
-            MonitorListenerInfo monitorListenerInfo = (MonitorListenerInfo) monitorListenerInfo1;
-            MonitorFilter monitorFilter = monitorListenerInfo.monitorFilter;
-            MonitorListener monitorListener = monitorListenerInfo.monitorListener;
-
-            int reportRateIndex = monitorListenerInfo.reportRateIndex;
-            long reportRate = monitorListenerInfo.reportRate;
-
-            if (isEvenPulseForRateIndex(reportRateIndex)) {
-                MonitorReport monitorReport = null;
-
-                try {
-                    if (monitorListenerInfo.sendCumulativeFirst && !monitorListenerInfo.wasCumulativeSent) {
-                        monitorReport = getCumulativeMonitorReport(monitorFilter);
-
-                        MonitorEvent monitorEvent = new MonitorEvent(peerGroup.getPeerGroupID(), monitorReport);
-
-                        monitorListener.processMonitorReport(monitorEvent);
-                        monitorListenerInfo.wasCumulativeSent = true;
-                    } else {
-                        monitorReport = getMonitorReport(monitorFilter, reportRate, previousReportTimes[reportRateIndex]
-                                ,
-                                beginReportTime);
-                        MonitorEvent monitorEvent = new MonitorEvent(peerGroup.getPeerGroupID(), monitorReport);
-
-                        monitorListener.processMonitorReport(monitorEvent);
-                    }
-                } catch (Throwable e) {
-                    e.printStackTrace();
-                    // Fix-Me: Where should we report an uncaught exception in one of our listeners?
-                }
-            }
-        }
-
-        for (int rateIndex = 0; rateIndex < supportedReportRates.length; rateIndex++) {
-            if (isEvenPulseForRateIndex(rateIndex)) {
-                if (filtersPerRate[rateIndex] != 0) {
-                    previousReportTimes[rateIndex] = beginReportTime;
-                } else {
-                    previousReportTimes[rateIndex] = NO_PRIOR_REPORT;
-                }
-            }
-        }
-
-        for (Enumeration<ServiceMonitorPulseInfo> e = serviceMonitorPulseInfos.elements(); e.hasMoreElements();) {
-            ServiceMonitorPulseInfo serviceMonitorPulseInfo = e.nextElement();
-            int servicePulseRateIndex = serviceMonitorPulseInfo.getPulseRateIndex();
-
-            if ((serviceMonitorPulseInfo.serviceMonitor instanceof ServiceMonitorImpl)
-                    && isEvenPulseForRateIndex(servicePulseRateIndex)) {
-                ((ServiceMonitorImpl) serviceMonitorPulseInfo.serviceMonitor).endPulse(serviceMonitorPulseInfo);
-            }
-        }
-    }
-
-    boolean isEvenPulseForRateIndex(int pulseRateIndex) {
-        if (pulseRateIndex < 0 || pulseRateIndex > pulsesPerRate.length) {
-            return false;
-        }
-        return ((pulseNumber % pulsesPerRate[pulseRateIndex]) == 0);
-    }
-
-    private void createReportThread() {
-        reportThread = new Thread(new Runnable() {
-            public void run() {
-                mainLoop:
-                while (isRunning) {
-                    synchronized (MonitorManager.this) { // no new listeners while reporting
-                        while (pulseRate == NOT_PULSING) {
-                            try {
-                                MonitorManager.this.wait();
-                            } catch (InterruptedException e) {
-                                continue mainLoop;
-                            }
-                        }
-
-                        while (pulseRate != NOT_PULSING) {
-                            if (Thread.interrupted()) {
-                                continue mainLoop;
-                            }
-
-                            long now = System.currentTimeMillis();
-
-                            try {
-                                long waitTime = nextPulseTime - now;
-
-                                if (waitTime > 0) {
-                                    MonitorManager.this.wait(nextPulseTime - now);
-                                }
-
-                                pulseNumber += pulsesPerRate[pulseRateIndex];
-                                generateReports();
-                                nextPulseTime += pulseRate;
-                            } catch (InterruptedException e) {
-                                if (pulseRateIndex == NOT_PULSING) {
-                                    continue mainLoop;
-                                }
-                            } catch (Exception ex) {
-                                // don't die forever on exceptions!!
-                                ex.printStackTrace(); // fix-me: report this
-                            }
-                        }
-                    }
-                }
-            }
-        }, "Meter-Monitor-Report");
-
-        reportThread.setDaemon(true);
-        reportThread.start();
-    }
-
-    public synchronized void destroy() {
-        isRunning = false;
-        reportThread.interrupt();
-
-        for (Enumeration<ServiceMonitorPulseInfo> e = serviceMonitorPulseInfos.elements(); e.hasMoreElements();) {
-            ServiceMonitorPulseInfo serviceMonitorPulseInfo = e.nextElement();
-            ServiceMonitor serviceMonitor = serviceMonitorPulseInfo.serviceMonitor;
-
-            serviceMonitor.destroy();
-        }
-    }
-
-    /**
-     * DO NOT USE THIS FIELD: It will be deprecated when MonitorManager becomes a
-     * FULL FLEDGED SERVICE
-     */
-
-    private static Hashtable<PeerGroupID, MonitorManager> monitorManagers = new Hashtable<PeerGroupID, MonitorManager>();
-
-    /**
-     * DO NOT USE THIS METHOD: It will be deprecated when MonitorManager becomes a
-     * FULL FLEDGED SERVICE
-     */
-
-    public static MonitorManager registerMonitorManager(PeerGroup peerGroup) throws JxtaException {
-        PeerGroupID peerGroupID = peerGroup.getPeerGroupID();
-        MonitorManager monitorManager = monitorManagers.get(peerGroupID);
-
-        if (monitorManager == null) {
-            boolean includeTransports = true;
-            ModuleImplAdvertisement moduleImplAdvertisement = MonitorResources.getReferenceAllPurposeMonitorServiceImplAdvertisement(
-                    includeTransports);
-
-            monitorManager = (MonitorManager) peerGroup.loadModule(MonitorResources.refMonitorServiceSpecID
-                    ,
-                    moduleImplAdvertisement);
-            monitorManagers.put(peerGroupID, monitorManager);
-
-            // FIXME jice@jxta.org - 20021103 : this
-            // monitorManager is not a real group service:
-            // it is being loadModule()'d by another as a
-            // result, it holds a counted reference to the
-            // group.  Idealy, we'd need the groupAPI to
-            // offer a means to loadModule() without
-            // making a counted reference, so that group
-            // services can loadModule() things without
-            // preventing group termination. This could be
-            // achieved elegantly by making this only
-            // behaviour available through a weak
-            // GroupInterface. So it would be enough to
-            // obtain a weak interface from one's group
-            // and then use its loadmodule method rather
-            // than that of the strong group interface.
-            // However that's a bit too big a change to be
-            // decided without more carefull
-            // consideration.  Instead, we just simulate
-            // it for now: we give to the monitor manager
-            // the real group reference after loadModule
-            // is done, and it discards the strong
-            // interface object that was passed to its
-            // init routine.
-
-            monitorManager.setPeerGroup(peerGroup);
-        }
-        return monitorManager;
-    }
-
-    /**
-     * DO NOT USE THIS METHOD: It will be deprecated when MonitorManager becomes a
-     * FULL FLEDGED SERVICE
-     */
-
-    public static void unregisterMonitorManager(PeerGroup peerGroup) {
-        PeerGroupID peerGroupID = peerGroup.getPeerGroupID();
-
-        monitorManagers.remove(peerGroupID);
-    }
-
-    public static ServiceMonitor getServiceMonitor(PeerGroup peerGroup, ModuleClassID serviceClassID) {
-        try {
-            PeerGroupID peerGroupID = peerGroup.getPeerGroupID();
-            MonitorManager monitorManager = monitorManagers.get(peerGroupID);
-
-            return monitorManager.getServiceMonitor(serviceClassID);
-        } catch (Exception e) { // Fix-Me: This is a bit sloppy
-            throw new RuntimeException("Unable to find MonitorManager or MonitorService");
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/meter/ServiceMonitorImpl.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/meter/ServiceMonitorImpl.java
deleted file mode 100644 (file)
index 509bc0c..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.meter;
-
-
-import net.jxta.meter.ServiceMonitor;
-
-
-public interface ServiceMonitorImpl extends ServiceMonitor {
-    public void init(MonitorManager monitorManager);
-
-    public void resetPulseRate(ServiceMonitorPulseInfo info, int oldPulseRateIndex);
-
-    public void beginPulse(ServiceMonitorPulseInfo pulseInfo);
-
-    public void endPulse(ServiceMonitorPulseInfo pulseInfo);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/meter/ServiceMonitorPulseInfo.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/meter/ServiceMonitorPulseInfo.java
deleted file mode 100644 (file)
index a574e11..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.meter;
-
-
-import net.jxta.meter.*;
-import java.util.*;
-
-
-public class ServiceMonitorPulseInfo {
-    public static final int NOT_PULSING = MonitorManager.NOT_PULSING;
-       
-    private MonitorManager monitorManager;
-    ServiceMonitor serviceMonitor;
-    private LinkedList<RegisteredServiceMonitorFilter> registeredServiceMonitorFilters = new LinkedList<RegisteredServiceMonitorFilter>();
-    private int pulseRateIndex = NOT_PULSING; // quickestReportRateIndex registered for this service
-    private long pulseRate = NOT_PULSING; // quickestReportRate registered for this service
-    private int filtersPerRate[];
-    private boolean pulsing;
-
-    private class RegisteredServiceMonitorFilter {
-        ServiceMonitorFilter serviceMonitorFilter;
-        int reportRateIndex;
-
-        RegisteredServiceMonitorFilter(ServiceMonitorFilter serviceMonitorFilter, int reportRateIndex) {
-            this.serviceMonitorFilter = serviceMonitorFilter;
-            this.reportRateIndex = reportRateIndex;
-        }
-    }
-
-    public ServiceMonitorPulseInfo() {}
-
-    ServiceMonitorPulseInfo(MonitorManager monitorManager, ServiceMonitor serviceMonitor) {
-        this.monitorManager = monitorManager;
-        this.serviceMonitor = serviceMonitor;
-        filtersPerRate = new int[monitorManager.getReportRatesCount()];
-    }
-
-    public ServiceMonitor getServiceMonitor() {
-        return serviceMonitor;
-    }
-
-    public int getPulseRateIndex() {
-        return pulseRateIndex;
-    }
-
-    public long getPulseRate() {
-        return pulseRate;
-    }
-
-    public boolean isPulsing() {
-        return pulsing;
-    }
-
-    public boolean isEvenPulseForRateIndex(int pulseRateIndex) {
-        return monitorManager.isEvenPulseForRateIndex(pulseRateIndex);
-    }
-
-    public boolean isRegisteredFilterForRate(int pulseRateIndex) {
-        return (filtersPerRate[pulseRateIndex] != 0);
-    }  
-
-    void registerServiceMonitorFilter(ServiceMonitorFilter serviceMonitorFilter, int reportRateIndex, long reportRate) {
-        RegisteredServiceMonitorFilter registeredServiceMonitorFilter = new RegisteredServiceMonitorFilter(serviceMonitorFilter
-                ,
-                reportRateIndex);
-
-        registeredServiceMonitorFilters.add(registeredServiceMonitorFilter);
-
-        filtersPerRate[reportRateIndex]++;
-
-        if ((pulseRateIndex == NOT_PULSING) || (reportRateIndex < pulseRateIndex)) {
-            int oldPulseRateIndex = pulseRateIndex;
-
-            pulseRateIndex = reportRateIndex;
-            pulseRate = reportRate;
-            pulsing = true;
-            if (serviceMonitor instanceof ServiceMonitorImpl) {
-                ((ServiceMonitorImpl) serviceMonitor).resetPulseRate(this, oldPulseRateIndex);
-            }
-        }
-
-        boolean newRate = (filtersPerRate[reportRateIndex] == 1);
-
-        serviceMonitor.serviceMonitorFilterRegistered(serviceMonitorFilter, reportRateIndex, reportRate, newRate);
-    }
-
-    boolean deregisterServiceMonitorFilter(ServiceMonitorFilter serviceMonitorFilter, int reportRateIndex, long reportRate) {
-        boolean removed = false;
-               
-        for (Iterator<RegisteredServiceMonitorFilter> i = registeredServiceMonitorFilters.iterator(); i.hasNext();) {
-            RegisteredServiceMonitorFilter registeredMonitorFilter = i.next();
-
-            if ((registeredMonitorFilter.serviceMonitorFilter == serviceMonitorFilter)
-                    && (registeredMonitorFilter.reportRateIndex == reportRateIndex)) {
-                i.remove();
-                removed = true;
-                break;
-            }
-        }
-
-        if (!removed) { // Fix-Me: This should never happen if Monitor Manager works properly.
-            return false;
-        }
-
-        filtersPerRate[reportRateIndex]--;
-
-        serviceMonitor.serviceMonitorFilterDeregistered(serviceMonitorFilter, reportRateIndex, reportRate
-                ,
-                filtersPerRate[reportRateIndex] == 0);
-
-        if ((filtersPerRate[reportRateIndex] == 0) && (reportRateIndex == pulseRateIndex)) { 
-            // pulseRateSlowing Down
-            int newPulseRateIndex = NOT_PULSING;
-                       
-            for (int i = pulseRateIndex; i < filtersPerRate.length; i++) {
-                if (filtersPerRate[i] != 0) {
-                    newPulseRateIndex = i;
-                    break;
-                }
-            }
-
-            int oldPulserRateIndex = pulseRateIndex;
-
-            pulseRateIndex = newPulseRateIndex;
-
-            if (newPulseRateIndex != NOT_PULSING) {
-                pulseRate = monitorManager.getReportRate(pulseRateIndex);
-                pulsing = true;
-            } else {
-                pulseRate = NOT_PULSING;
-                pulsing = false;
-            }
-
-            if (serviceMonitor instanceof ServiceMonitorImpl) {
-                ((ServiceMonitorImpl) serviceMonitor).resetPulseRate(this, oldPulserRateIndex);
-            }
-        }
-        return removed;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/meter/ServiceMonitorResource.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/meter/ServiceMonitorResource.java
deleted file mode 100644 (file)
index db5075d..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.meter;
-
-
-import net.jxta.exception.JxtaException;
-import net.jxta.meter.ServiceMonitor;
-import net.jxta.platform.ModuleClassID;
-import net.jxta.service.Service;
-
-
-public interface ServiceMonitorResource extends Service {
-    public ServiceMonitor getServiceMonitor(ModuleClassID moduleClassID) throws JxtaException;
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/monitor.properties b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/monitor.properties
deleted file mode 100644 (file)
index 479d94a..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-
-net.meter.standardEndpoint=Endpoint,                                                           \
-                       urn:jxta:uuid-DEADBEEFDEAFBABAFEEDBABE000000080106,     \
-                       net.jxta.impl.endpoint.endpointMeter.EndpointServiceMonitor, \
-                       net.jxta.impl.endpoint.endpointMeter.EndpointServiceMonitorFilter, \
-                       net.jxta.impl.endpoint.endpointMeter.EndpointServiceMetric, \
-                       urn:jxta:uuid-DEADBEEFDEAFBABAFEEDBABE000000080106
-
-net.meter.standardTransport=Transport,                                                         \
-                       urn:jxta:uuid-DEADBEEFDEAFBABAFEEDBABE000000080106,     \
-                       net.jxta.impl.endpoint.transportMeter.TransportServiceMonitor, \
-                       net.jxta.impl.endpoint.transportMeter.TransportServiceMonitorFilter, \
-                       net.jxta.impl.endpoint.transportMeter.TransportServiceMetric,   \
-                       urn:jxta:uuid-DEADBEEFDEAFBABAFEEDBABE0000000A0106      \
-                       urn:jxta:uuid-DEADBEEFDEAFBABAFEEDBABE000000090106      \
-                       urn:jxta:uuid-DEADBEEFDEAFBABAFEEDBABE0000000B0106
-
-#net.meter.standardPipe=Pipe,                                                          \
-#                      urn:jxta:uuid-DEADBEEFDEAFBABAFEEDBABE000000040106, 
-#                      net.jxta.impl.pipe.pipeMeter.PipeServiceMonitor, \
-#                      net.jxta.impl.pipe.pipeMeter.PipeServiceMonitorFilter, \
-#                      net.jxta.impl.resolver.pipeMeter.PipeServiceMetric, \
-#                      urn:jxta:uuid-DEADBEEFDEAFBABAFEEDBABE000000040106
-#
-
-net.meter.standardResolver=Resolver,                                                           \
-                       urn:jxta:uuid-DEADBEEFDEAFBABAFEEDBABE000000020106, \
-                       net.jxta.impl.resolver.resolverMeter.ResolverServiceMonitor, \
-                       net.jxta.impl.resolver.resolverMeter.ResolverServiceMonitorFilter, \
-                       net.jxta.impl.resolver.resolverMeter.ResolverServiceMetric, \
-                       urn:jxta:uuid-DEADBEEFDEAFBABAFEEDBABE000000020106
-
-net.meter.standardRendezvous=Rendezvous,                                                               \
-                       urn:jxta:uuid-DEADBEEFDEAFBABAFEEDBABE000000060106, \
-                       net.jxta.impl.rendezvous.rendezvousMeter.RendezvousServiceMonitor, \
-                       net.jxta.impl.rendezvous.rendezvousMeter.RendezvousServiceMonitorFilter, \
-                       net.jxta.impl.rendezvous.rendezvousMeter.RendezvousServiceMetric, \
-                       urn:jxta:uuid-DEADBEEFDEAFBABAFEEDBABE000000060106
-
-#net.meter.standardProxy=Proxy,                                                                \
-#                      net.jxta.impl.endpoint.ProxyMeter.ProxyServiceMonitor, \
-#                      net.jxta.impl.endpoint.ProxyMeter.ProxyServiceMonitorFilter, \
-#                      net.jxta.impl.endpoint.ProxyMeter.RendezvousServiceMetric, \
-#                      urn:jxta:uuid-DEADBEEFDEAFBABAFEEDBABE0000000E0106
-#
-#net.meter.standardDiscovery=Discovery,                                                                \
-#                      net.jxta.impl.discovery.discoveryMeter.DiscoveryServiceMonitor, \
-#                      net.jxta.impl.discovery.discoveryMeter.DiscoveryServiceMonitorFilter, \
-#                      net.jxta.impl.discovery.discoveryMeter.DiscoveryServiceMetric, \
-#                      urn:jxta:uuid-DEADBEEFDEAFBABAFEEDBABE000000030106
-#
-#net.meter.standardMembership=Membership,                                                              \
-#                      net.jxta.impl.membership.membershipMeter.MembershipServiceMonitor, \
-#                      net.jxta.impl.membership.membershipMeter.MembershipServiceMonitorFilter, \
-#                      net.jxta.impl.membership.membershipMeter.MembershipServiceMetric, \
-#                      urn:jxta:uuid-DEADBEEFDEAFBABAFEEDBABE000000050106
-#
-#net.meter.standardEndpoint=PeerInfo,                                                          \
-#                      net.jxta.impl.peer.peerInfoMeter.PeerInfoServiceMonitor, \
-#                      net.jxta.impl.peer.peerInfoMeter.PeerInfoServiceMonitorFilter, \
-#                      net.jxta.impl.peer.peerInfoMeter.PeerInfoServiceMetric, \
-#                      urn:jxta:uuid-DEADBEEFDEAFBABAFEEDBABE000000070106
-#
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/overview.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/overview.html
deleted file mode 100644 (file)
index c249f03..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    These packages provide the reference implementation of the JXTA Protocols 
-    using Java Standard Edition 5.0. The JSE reference implementation is
-    divided into two parts: 
-    <a href="../api/index.html" target='_blank'>The JSE Standard JXTA API</a>
-    and, this package, the JSE JXTA Reference Implementation. 
-    
-    <p/>Additional optional packages which are useful for developers building 
-    JXTA applications can be found in the JXTA JSE Extensions.
-    
-    <a name="implnote"/>
-    <p/><strong>Important Note:</strong> Applications and services are <em>very 
-    strongly</em> encouraged to not import classes or interfaces from these 
-    implementation packages. Specificially <strong>do not</strong> import from 
-    <code>net.jxta.impl.*</code>. The content of these packages may change 
-    significantly (including removal) from release to release with no advance
-    notice.
-
-    @see <a href="http://spec.jxta.org/v1.0/docbook/JXTAProtocols.html" target='_blank'>JXTA Protocols Specification</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peer/PeerInfoHandler.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peer/PeerInfoHandler.java
deleted file mode 100644 (file)
index 965e4a4..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.peer;
-
-
-import net.jxta.peer.*;
-import net.jxta.util.documentSerializable.*;
-import net.jxta.document.*;
-import net.jxta.protocol.*;
-
-
-interface PeerInfoHandler {
-    public void processRequest(int queryId, PeerID requestSourceID, PeerInfoQueryMessage peerInfoQueryMessage, Element requestElement, PeerInfoMessenger peerInfoMessenger);
-    public void processResponse(int queryId, PeerInfoResponseMessage peerInfoResponseMessage, Element responseElement, PeerInfoMessenger peerInfoMessenger);
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peer/PeerInfoMessenger.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peer/PeerInfoMessenger.java
deleted file mode 100644 (file)
index 0772e79..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.peer;
-
-
-import net.jxta.peer.*;
-import net.jxta.util.documentSerializable.*;
-
-
-interface PeerInfoMessenger {
-    public void sendPeerInfoRequest(int queryID, PeerID destinationPeerID, String peerInfoHandler, DocumentSerializable request);
-    public void sendPeerInfoResponse(int queryId, PeerID destinationPeerID, String peerInfoHandler, DocumentSerializable response);
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peer/PeerInfoServiceImpl.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peer/PeerInfoServiceImpl.java
deleted file mode 100644 (file)
index f9ddfef..0000000
+++ /dev/null
@@ -1,560 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.peer;
-
-
-import java.util.Hashtable;
-import java.util.Random;
-import java.io.StringReader;
-import java.net.URI;
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-import net.jxta.service.Service;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.resolver.ResolverService;
-import net.jxta.resolver.QueryHandler;
-import net.jxta.document.Advertisement;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.Element;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.protocol.ResolverQueryMsg;
-import net.jxta.protocol.ResolverResponseMsg;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.protocol.PeerInfoQueryMessage;
-import net.jxta.protocol.PeerInfoResponseMessage;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.peer.PeerInfoService;
-import net.jxta.credential.Credential;
-import net.jxta.membership.MembershipService;
-import net.jxta.impl.protocol.ResolverQuery;
-import net.jxta.impl.protocol.ResolverResponse;
-import net.jxta.impl.protocol.PeerInfoQueryMsg;
-import net.jxta.impl.protocol.PeerInfoResponseMsg;
-import net.jxta.exception.JxtaException;
-import net.jxta.exception.PeerGroupException;
-
-import net.jxta.meter.*;
-import net.jxta.impl.meter.*;
-import net.jxta.peer.*;
-import net.jxta.platform.*;
-import net.jxta.util.documentSerializable.*;
-
-
-/**
- *  Peer Info provides a mechanism to obtain  information about peers.
- *
- */
-
-public class PeerInfoServiceImpl implements PeerInfoService {
-    
-    private final static Logger LOG = Logger.getLogger(PeerInfoServiceImpl.class.getName());
-    
-    /**
-     *  Time in milli seconds since midnight, January 1, 1970 UTC and when this
-     *  peer was started.
-     */
-    private long startTime = 0;
-    
-    private ResolverService resolver = null;
-    private PeerGroup group = null;
-    private EndpointService endpoint = null;
-    private PeerID localPeerId = null;
-    private ModuleImplAdvertisement implAdvertisement = null;
-    private String resolverHandlerName = null;
-    private MembershipService membership = null;
-    private Credential credential = null;
-    private StructuredDocument credentialDoc = null;
-    private MonitorManager monitorManager;
-    private Hashtable peerInfoHandlers = new Hashtable();
-    private PipQueryHandler pipQueryHandler = new PipQueryHandler();
-    private RemoteMonitorPeerInfoHandler remoteMonitorPeerInfoHandler;
-    private PeerInfoMessenger resolverServicePeerInfoMessenger = new ResolverServicePeerInfoMessenger();
-    
-    private int nextQueryId = 1000;
-    private static final Random rand = new Random();
-    
-    // This static package public hashtable of registered PeerInfoServiceImpls
-    // allows us to do Peergroup Monitoring via an IP Bridge to the PIP
-    // See the documentation on the JXTA Monitor
-    static Hashtable peerInfoServices = new Hashtable();
-    
-    /**
-     * {@inheritDoc}
-     */
-    public void init(PeerGroup group, ID assignedID, Advertisement impl) throws PeerGroupException {
-        this.group = group;
-        
-        implAdvertisement = (ModuleImplAdvertisement) impl;
-        localPeerId = group.getPeerID();
-        resolverHandlerName = assignedID.toString();
-        
-        // Fix-Me: When MonitorManager is a true Service, this should be moved to startApp()
-        try {
-            if (MeterBuildSettings.METERING) {
-                monitorManager = MonitorManager.registerMonitorManager(group);
-            }
-            // FIXME This will become a service lookup when MonitorService is a real service
-        } catch (JxtaException e) {
-            throw new PeerGroupException("Unable to load MonitorManager", e);
-        }
-        
-        // record start time at end of successful init
-        startTime = System.currentTimeMillis();
-        
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring PeerInfo Service : " + assignedID);
-
-            configInfo.append("\n\tImplementation:");
-            configInfo.append("\n\t\tImpl Description: ");
-            configInfo.append(implAdvertisement.getDescription());
-            configInfo.append("\n\t\tImpl URI : ").append(implAdvertisement.getUri());
-            configInfo.append("\n\t\tImpl Code : ").append(implAdvertisement.getCode());
-            configInfo.append("\n\tGroup Params:");
-            configInfo.append("\n\t\tGroup: ").append(group.getPeerGroupName());
-            configInfo.append("\n\t\tGroup ID: ").append(group.getPeerGroupID());
-            configInfo.append("\n\t\tPeer ID: ").append(group.getPeerID());
-            LOG.config(configInfo.toString());
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public int startApp(String[] arg) {
-        
-        resolver = group.getResolverService();
-        
-        if (null == resolver) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is a resolver service");
-            }
-            
-            return START_AGAIN_STALLED;
-        }
-        
-        /* Fix-Me: When MonitorService is a true service, this should be moved here from init()
-         try {
-         if (MeterBuildSettings.METERING)
-         monitorManager = MonitorManager.registerMonitorManager(group);
-         // FIXME : This will become a service lookup when MonitorService is a real service
-         } catch (JxtaException e) {
-         return -1;            // Fix-Me: This is related to the initialization sequence work on the dev list on load order
-         }
-         */
-        
-        // remoteMonitorPeerInfoHandler = new RemoteMonitorPeerInfoHandler(group, this);
-        // peerInfoHandlers.put(RemoteMonitorPeerInfoHandler.MONITOR_HANDLER_NAME, remoteMonitorPeerInfoHandler);
-        
-        resolver = group.getResolverService();
-        resolver.registerHandler(resolverHandlerName, pipQueryHandler);
-        
-        peerInfoServices.put(group, this);
-        
-        return Module.START_OK;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public void stopApp() {
-        
-        peerInfoServices.remove(group);
-        resolver.unregisterHandler(resolverHandlerName);
-        resolver = null;
-        
-        // peerInfoHandlers.remove(RemoteMonitorPeerInfoHandler.MONITOR_HANDLER_NAME);
-        // remoteMonitorPeerInfoHandler.stop();
-        
-        if (MeterBuildSettings.METERING) {
-            MonitorManager.unregisterMonitorManager(group);
-        }
-        
-        group = null;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public Service getInterface() {
-        return new PeerInfoServiceInterface(this);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public Advertisement getImplAdvertisement() {
-        return implAdvertisement;
-    }
-    
-    PeerInfoHandler getPeerInfoHandler(String name) {
-        return (PeerInfoHandler) peerInfoHandlers.get(name);
-    }
-    
-    int getNextQueryId() {
-        int id = 0;
-
-        synchronized (rand) {
-            id = rand.nextInt(Integer.MAX_VALUE);
-        }
-        return id;
-    }
-    
-    /**
-     *  Returns the group to which this service is attached.
-     *
-     * @return    PeerGroup the group
-     */
-    public PeerGroup getGroup() {
-        return group;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isLocalMonitoringAvailable() {
-        return MeterBuildSettings.METERING;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isLocalMonitoringAvailable(ModuleClassID moduleClassID) {
-        return MeterBuildSettings.METERING && monitorManager.isLocalMonitoringAvailable(moduleClassID);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public long[] getSupportedReportRates() {
-        return MonitorManager.getReportRates();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isSupportedReportRate(long reportRate) {
-        return monitorManager.isSupportedReportRate(reportRate);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public long getBestReportRate(long desiredReportRate) {
-        return monitorManager.getBestReportRate(desiredReportRate);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public PeerMonitorInfo getPeerMonitorInfo() {
-        if (monitorManager != null) {
-            return monitorManager.getPeerMonitorInfo();
-        } else {
-            return PeerMonitorInfo.NO_PEER_MONITOR_INFO;
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public void getPeerMonitorInfo(final PeerID peerID, PeerMonitorInfoListener peerMonitorInfoListener, long timeout) throws MonitorException {
-        remoteMonitorPeerInfoHandler.getPeerMonitorInfo(peerID, peerMonitorInfoListener, timeout, resolverServicePeerInfoMessenger);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public MonitorReport getCumulativeMonitorReport(MonitorFilter monitorFilter) throws MonitorException {
-        if (MeterBuildSettings.METERING) {
-            throw new MonitorException(MonitorException.METERING_NOT_SUPPORTED, "Local Monitoring not Available");
-        }
-        return monitorManager.getCumulativeMonitorReport(monitorFilter);
-        
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public void getCumulativeMonitorReport(PeerID peerID, MonitorFilter monitorFilter, MonitorListener monitorListener, long timeout) throws MonitorException {
-        remoteMonitorPeerInfoHandler.getCumulativeMonitorReport(peerID, monitorFilter, monitorListener, timeout
-                ,
-                resolverServicePeerInfoMessenger);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public long addMonitorListener(MonitorFilter monitorFilter, long reportRate, boolean includeCumulative, MonitorListener monitorListener) throws MonitorException {
-        if (!MeterBuildSettings.METERING) {
-            throw new MonitorException(MonitorException.METERING_NOT_SUPPORTED, "Local Monitoring not Available");
-        }
-        
-        return monitorManager.addMonitorListener(monitorFilter, reportRate, includeCumulative, monitorListener);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public void addRemoteMonitorListener(PeerID peerID, MonitorFilter monitorFilter, long reportRate, boolean includeCumulative, MonitorListener monitorListener, long lease, long timeout) throws MonitorException {
-        remoteMonitorPeerInfoHandler.addRemoteMonitorListener(peerID, monitorFilter, reportRate, includeCumulative
-                ,
-                monitorListener, lease, timeout, resolverServicePeerInfoMessenger);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public boolean removeMonitorListener(MonitorListener monitorListener) throws MonitorException {
-        
-        int numRemoved = monitorManager.removeMonitorListener(monitorListener);
-
-        return numRemoved > 0;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public void removeRemoteMonitorListener(PeerID peerID, MonitorListener monitorListener, long timeout) throws MonitorException {
-        remoteMonitorPeerInfoHandler.removeRemoteMonitorListener(peerID, monitorListener, timeout
-                ,
-                resolverServicePeerInfoMessenger);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public void removeRemoteMonitorListener(MonitorListener monitorListener, long timeout) throws MonitorException {
-        remoteMonitorPeerInfoHandler.removeRemoteMonitorListener(monitorListener, timeout, resolverServicePeerInfoMessenger);
-    }
-    
-    class PipQueryHandler implements QueryHandler {
-        
-        /**
-         * {@inheritDoc}
-         */
-        public int processQuery(ResolverQueryMsg query) {
-            int queryId = query.getQueryId();
-            PeerID requestSourceID = null;
-
-            try {
-                requestSourceID = (PeerID) IDFactory.fromURI(new URI(query.getSrc()));
-            } catch (Exception e) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.log(Level.FINE, "PeerInfoService.processQuery got a bad query, not valid src", e);
-                }
-                return ResolverService.OK;
-            }
-            
-            XMLDocument doc = null;
-
-            try {
-                doc = (XMLDocument)
-                        StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, new StringReader(query.getQuery()));
-            } catch (Exception e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "PeerInfoService.processQuery got a bad adv", e);
-                }
-                return ResolverService.OK;
-            }
-            
-            PeerInfoQueryMessage pipquery = new PeerInfoQueryMsg(doc);
-            
-            Element requestElement = pipquery.getRequest();
-            String queryType = (String) requestElement.getKey();
-            
-            if (queryType != null) {
-                PeerInfoHandler peerInfoHandler = getPeerInfoHandler(queryType);
-                
-                if (peerInfoHandler != null) {
-                    peerInfoHandler.processRequest(queryId, requestSourceID, pipquery, requestElement
-                            ,
-                            resolverServicePeerInfoMessenger);
-                } else {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("No registered PeerInfoHandler for this type of request");
-                    }
-                }
-            } else {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("No request PeerInfoQueryMessage Request Element found");
-                }
-            }
-            
-            return ResolverService.OK;
-        }
-        
-        /**
-         * {@inheritDoc}
-         */
-        public void processResponse(ResolverResponseMsg response) {
-            
-            int queryId = response.getQueryId();
-            
-            PeerInfoResponseMessage resp = null;
-
-            try {
-                StructuredDocument doc = StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8
-                        ,
-                        new StringReader(response.getResponse()));
-                
-                resp = new PeerInfoResponseMsg(doc);
-            } catch (Exception e) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.log(Level.FINE, "PeerInfoService.processResponse got a bad adv", e);
-                }
-                return;
-            }
-            
-            Element responseElement = resp.getResponse();
-            String responseType = (String) responseElement.getKey();
-            
-            if (responseType != null) {
-                PeerInfoHandler peerInfoHandler = getPeerInfoHandler(responseType);
-                
-                if (peerInfoHandler != null) {
-                    peerInfoHandler.processResponse(queryId, resp, responseElement, resolverServicePeerInfoMessenger);
-                } else {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("No registered PeerInfoHandler for this type of response");
-                    }
-                }
-            } else {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("No request PeerInfoResponseMessage Response Element found");
-                }
-            }
-        }
-    }
-    
-
-    private class ResolverServicePeerInfoMessenger implements PeerInfoMessenger {
-        
-        /**
-         * {@inheritDoc}
-         */
-        public void sendPeerInfoResponse(int queryId, PeerID destinationPeerID, String peerInfoHandler, DocumentSerializable response) {
-            try {
-                PeerInfoResponseMessage peerInfoResponseMessage = new PeerInfoResponseMsg();
-
-                peerInfoResponseMessage.setSourcePid(destinationPeerID);
-                peerInfoResponseMessage.setTargetPid(localPeerId);
-                
-                long now = System.currentTimeMillis();
-
-                peerInfoResponseMessage.setUptime(now - startTime);
-                peerInfoResponseMessage.setTimestamp(now);
-                
-                Element responseElement = StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, peerInfoHandler);
-
-                response.serializeTo(responseElement);
-                
-                peerInfoResponseMessage.setResponse(responseElement);
-                
-                XMLDocument doc = (XMLDocument) peerInfoResponseMessage.getDocument(MimeMediaType.XMLUTF8);
-                String peerInfoResponse = doc.toString();
-                
-                ResolverResponse resolverResponse = new ResolverResponse(resolverHandlerName, credentialDoc, queryId
-                        ,
-                        peerInfoResponse);
-
-                resolver.sendResponse(destinationPeerID.toString(), resolverResponse);
-            } catch (JxtaException e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failure building document", e);
-                }
-            }
-        }
-        
-        /**
-         * {@inheritDoc}
-         */
-        public void sendPeerInfoRequest(int queryID, PeerID destinationPeerID, String peerInfoHandler, DocumentSerializable request) {
-            try {
-                PeerInfoQueryMsg peerInfoQueryMsg = new PeerInfoQueryMsg();
-
-                peerInfoQueryMsg.setSourcePid(localPeerId);
-                peerInfoQueryMsg.setTargetPid(destinationPeerID);
-                
-                Element requestElement = StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, peerInfoHandler);
-
-                request.serializeTo(requestElement);
-                
-                peerInfoQueryMsg.setRequest(requestElement);
-                
-                XMLDocument doc = (XMLDocument) peerInfoQueryMsg.getDocument(MimeMediaType.XMLUTF8);
-                String peerInfoRequest = doc.toString();
-                
-                ResolverQuery resolverQuery = new ResolverQuery(resolverHandlerName, credentialDoc, localPeerId.toString()
-                        ,
-                        peerInfoRequest, queryID);
-
-                resolver.sendQuery(destinationPeerID.toString(), resolverQuery);
-            } catch (JxtaException e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failure to build resolver query", e);
-                }
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peer/PeerInfoServiceInterface.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peer/PeerInfoServiceInterface.java
deleted file mode 100644 (file)
index 5f5c875..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.peer;
-
-
-import java.io.IOException;
-import java.util.Enumeration;
-import net.jxta.document.Advertisement;
-import net.jxta.service.Service;
-import net.jxta.id.ID;
-import net.jxta.peer.PeerInfoService;
-import net.jxta.peer.PeerInfoListener;
-import net.jxta.peer.PeerInfoEvent;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.protocol.PeerInfoResponseMessage;
-import net.jxta.impl.peer.PeerInfoServiceImpl;
-import net.jxta.peer.*;
-import net.jxta.meter.*;
-import net.jxta.platform.*;
-
-
-/**
- *  PeerInfoServiceInterface provides a pure interface object that permits
- *  interaction with the actual PeerInfoService implementation without giving
- *  access to the real object.
- */
-public class PeerInfoServiceInterface implements PeerInfoService {
-
-    private PeerInfoService impl;
-
-    /**
-     * {@inheritDoc}
-     * Since THIS is already such an
-     *  object, it returns itself. FIXME: it is kind of absurd to have this
-     *  method part of the interface but we do not want to define two levels
-     *  of Service interface just for that.
-     *
-     */
-    public Service getInterface() {
-        return this;
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     */
-    public Advertisement getImplAdvertisement() {
-        return impl.getImplAdvertisement();
-    }
-
-    /**
-     *  Only authorized constructor
-     *
-     *@param  theRealThing
-     */
-    public PeerInfoServiceInterface(PeerInfoService theRealThing) {
-        impl = theRealThing;
-    }
-
-    /**
-     * {@inheritDoc}
-     *  <p/>Initialize the application FIXME: This is meaningless for the
-     *  interface object; it is there only to satisfy the requirements of
-     *  the interface that we implement. Ultimately, the API should define
-     *  two levels of interfaces: one for the real service implementation
-     *  and one for the interface object. Right now it feels a bit heavy to
-     *  so that since the only different between the two would be init() and
-     *  may-be getName().
-     *
-     */
-    public void init(PeerGroup pg, ID assignedID, Advertisement impl) {}
-
-    /**
-     * {@inheritDoc}
-     *  <p/>This is here for temporary class hierarchy reasons. it is ALWAYS
-     *  ignored. By definition, the interface object protects the real
-     *  object's start/stop methods from being called
-     *
-     */
-    public int startApp(String[] arg) {
-        return 0;
-    }
-
-    /**
-     * {@inheritDoc}
-     *  <p/>This is here for temporary class hierarchy reasons. it is ALWAYS
-     *  ignored. By definition, the interface object protects the real
-     *  object's start/stop methods from being called This request is
-     *  currently ignored.
-     */
-    public void stopApp() {}
-
-    public boolean isLocalMonitoringAvailable() {
-        return (impl.isLocalMonitoringAvailable());
-    }
-
-    public boolean isLocalMonitoringAvailable(ModuleClassID moduleClassID) {
-        return (impl.isLocalMonitoringAvailable(moduleClassID));
-    }
-       
-    public long[] getSupportedReportRates() {
-        return impl.getSupportedReportRates();
-    }
-
-    public boolean isSupportedReportRate(long reportRate) {
-        return impl.isSupportedReportRate(reportRate);
-    }
-
-    public long getBestReportRate(long desiredReportRate) {
-        return impl.getBestReportRate(desiredReportRate);
-    }
-
-    public PeerMonitorInfo getPeerMonitorInfo() {
-        return impl.getPeerMonitorInfo();
-    }
-
-    public void getPeerMonitorInfo(PeerID peerID, PeerMonitorInfoListener peerMonitorInfoListener, long timeout) throws MonitorException {
-        impl.getPeerMonitorInfo(peerID, peerMonitorInfoListener, timeout);
-    } 
-
-    public MonitorReport getCumulativeMonitorReport(MonitorFilter monitorFilter) throws MonitorException {
-        return impl.getCumulativeMonitorReport(monitorFilter);
-    }
-       
-    public void getCumulativeMonitorReport(PeerID peerID, MonitorFilter monitorFilter, MonitorListener monitorListener, long timeout) throws MonitorException {
-        impl.getCumulativeMonitorReport(peerID, monitorFilter, monitorListener, timeout);
-    }
-
-    public long addMonitorListener(MonitorFilter monitorFilter, long reportRate, boolean includeCumulative, MonitorListener monitorListener) throws MonitorException {
-        return impl.addMonitorListener(monitorFilter, reportRate, includeCumulative, monitorListener);
-    }  
-
-    public void addRemoteMonitorListener(PeerID peerID, MonitorFilter monitorFilter, long reportRate, boolean includeCumulative, MonitorListener monitorListener, long lease, long timeout) throws MonitorException {  
-        impl.addRemoteMonitorListener(peerID, monitorFilter, reportRate, includeCumulative, monitorListener, lease, timeout);
-    }
-
-    public boolean removeMonitorListener(MonitorListener monitorListener) throws MonitorException {
-        return impl.removeMonitorListener(monitorListener);
-    }
-
-    public void removeRemoteMonitorListener(PeerID peerID, MonitorListener monitorListener, long timeout) throws MonitorException {
-        impl.removeRemoteMonitorListener(peerID, monitorListener, timeout);
-    }
-
-    public void removeRemoteMonitorListener(MonitorListener monitorListener, long timeout) throws MonitorException {
-        impl.removeRemoteMonitorListener(monitorListener, timeout);
-    }  
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peer/RemoteMonitorPeerInfoHandler.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peer/RemoteMonitorPeerInfoHandler.java
deleted file mode 100644 (file)
index a92d485..0000000
+++ /dev/null
@@ -1,638 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.peer;
-
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.Hashtable;
-import java.util.Random;
-import java.util.Timer;
-import java.util.TimerTask;
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-import net.jxta.document.Element;
-import net.jxta.protocol.PeerInfoQueryMessage;
-import net.jxta.protocol.PeerInfoResponseMessage;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.peer.PeerInfoService;
-import net.jxta.peergroup.PeerGroupID;
-
-import net.jxta.meter.MonitorEvent;
-import net.jxta.meter.MonitorException;
-import net.jxta.meter.MonitorFilter;
-import net.jxta.meter.MonitorFilterException;
-import net.jxta.meter.MonitorListener;
-import net.jxta.meter.MonitorReport;
-import net.jxta.meter.MonitorResources;
-import net.jxta.meter.PeerMonitorInfo;
-import net.jxta.meter.PeerMonitorInfoEvent;
-import net.jxta.meter.PeerMonitorInfoListener;
-import net.jxta.meter.ServiceMonitorFilter;
-import net.jxta.peer.PeerID;
-import net.jxta.util.documentSerializable.DocumentSerializableUtilities;
-import net.jxta.util.documentSerializable.DocumentSerializationException;
-import net.jxta.impl.util.TimerThreadNamer;
-
-class RemoteMonitorPeerInfoHandler implements PeerInfoHandler {
-    public static final String MONITOR_HANDLER_NAME = "Monitor";
-    public static final int MAX_LEASE = 5 * 60 * 1000; // 5 minutes
-    public static final int MIN_LEASE = 60 * 1000; // 1 minute
-
-    private static final Random rand = new Random();
-    private final static Logger LOG = Logger.getLogger(RemoteMonitorPeerInfoHandler.class.getName());
-
-    private Hashtable<Integer, RequestInfo> requestInfos = new Hashtable<Integer, RequestInfo>();
-    private Hashtable<Integer, LeaseInfo> leaseInfos = new Hashtable<Integer, LeaseInfo>();
-    private Hashtable<Integer, Long> timeouts = new Hashtable<Integer, Long>();
-    private PeerGroup peerGroup;
-    private PeerInfoServiceImpl peerInfoServiceImpl;
-    private Timer timer = new Timer(true);
-
-    RemoteMonitorPeerInfoHandler(PeerGroup peerGroup, PeerInfoServiceImpl peerInfoServiceImpl) {
-        this.peerGroup = peerGroup;
-        this.peerInfoServiceImpl = peerInfoServiceImpl;
-        timer.schedule(new TimerThreadNamer("RemoteMonitorPeerInfo timer for " + peerGroup.getPeerGroupID()), 0);
-    }
-
-    public void stop() {
-        timer.cancel();
-    }
-
-    private int getNextLeaseId() {
-        int id;
-        synchronized (rand) {
-            id = rand.nextInt(Integer.MAX_VALUE);
-        }
-        return id;
-    }
-
-    private class RequestInfo {
-        long requestTime = System.currentTimeMillis();
-        PeerID peerId;
-        int queryId;
-        int origRequestId;
-        MonitorListener monitorListener;
-        PeerMonitorInfoListener peerMonitorInfoListener;
-        long timeout;
-        long validUntil;
-        boolean responseReceived = false;
-        int leaseId; // other guys leaseId.
-        long requestedLease;
-        PeerInfoMessenger peerInfoMessenger;
-        RequestInfo(PeerID peerId, int queryId, MonitorListener monitorListener, long timeout, PeerInfoMessenger peerInfoMessenger) {
-            this(peerId, queryId, timeout, peerInfoMessenger);
-            this.monitorListener = monitorListener;
-        }
-
-        RequestInfo(PeerID peerId, int queryId, PeerMonitorInfoListener peerMonitorInfoListener, long timeout, PeerInfoMessenger peerInfoMessenger) {
-            this(peerId, queryId, timeout, peerInfoMessenger);
-            this.peerMonitorInfoListener = peerMonitorInfoListener;
-        }
-
-        RequestInfo(PeerID peerId, int queryId, long timeout, PeerInfoMessenger peerInfoMessenger) {
-            this.peerId = peerId;
-            this.queryId = queryId;
-            this.timeout = timeout;
-            this.peerInfoMessenger = peerInfoMessenger;
-            this.validUntil = System.currentTimeMillis() + timeout;
-        }
-    }
-
-
-    private class LeaseInfo {
-        int leaseId;
-        PeerID peerID; // Peer that requested the lease
-        int queryId; // The other guy's query Id
-        MonitorListener monitorListener;
-        long validUntil;
-        boolean listenerAddedToWorldGroup = false;
-        PeerGroup worldGroup;
-        PeerInfoMessenger peerInfoMessenger;
-        LeaseInfo(int leaseId, PeerID peerID, int queryId, MonitorListener monitorListener, long leaseLength, PeerInfoMessenger peerInfoMessenger) {
-            this.leaseId = leaseId;
-            this.peerID = peerID;
-            this.queryId = queryId;
-            this.monitorListener = monitorListener;
-            this.peerInfoMessenger = peerInfoMessenger;
-            validUntil = System.currentTimeMillis() + leaseLength;
-        }
-
-    }
-
-    public void getPeerMonitorInfo(final PeerID peerID, PeerMonitorInfoListener peerMonitorInfoListener, long timeout, PeerInfoMessenger peerInfoMessenger) throws MonitorException {
-        int queryId = peerInfoServiceImpl.getNextQueryId();
-
-        RemoteMonitorQuery remoteMonitorQuery = RemoteMonitorQuery.createPeerMonitorInfoQuery();
-        peerInfoMessenger.sendPeerInfoRequest(queryId, peerID, MONITOR_HANDLER_NAME, remoteMonitorQuery);
-        final RequestInfo requestInfo = new RequestInfo(peerID, queryId, peerMonitorInfoListener, timeout, peerInfoMessenger);
-        requestInfos.put(queryId, requestInfo);
-        timer.schedule(new TimerTask() {
-            @Override
-            public void run() {
-                if (!requestInfo.responseReceived) {
-                    PeerMonitorInfoEvent peerMonitorInfoEvent = new PeerMonitorInfoEvent(peerID, null);
-
-                    requestInfo.peerMonitorInfoListener.peerMonitorInfoNotReceived(peerMonitorInfoEvent);
-                    requestInfos.remove(requestInfo.queryId);
-                }
-            }
-        }, timeout);
-    }
-
-    public void getCumulativeMonitorReport(PeerID peerID, MonitorFilter monitorFilter, MonitorListener monitorListener, long timeout, PeerInfoMessenger peerInfoMessenger) throws MonitorException {
-        int queryId = peerInfoServiceImpl.getNextQueryId();
-        RemoteMonitorQuery remoteMonitorQuery = RemoteMonitorQuery.createGetCumulativeReportQuery(monitorFilter);
-        peerInfoMessenger.sendPeerInfoRequest(queryId, peerID, MONITOR_HANDLER_NAME, remoteMonitorQuery);
-        final RequestInfo requestInfo = new RequestInfo(peerID, queryId, monitorListener, timeout, peerInfoMessenger);
-        requestInfos.put(queryId, requestInfo);
-        timer.schedule(new TimerTask() {
-            @Override
-            public void run() {
-                if (!requestInfo.responseReceived) {
-                    requestInfos.remove(requestInfo.queryId);
-                }
-            }
-        }, timeout);
-    }
-
-    public void addRemoteMonitorListener(PeerID peerID, MonitorFilter monitorFilter, long reportRate, boolean includeCumulative, MonitorListener monitorListener, long lease, long timeout, PeerInfoMessenger peerInfoMessenger) throws MonitorException {
-        int queryId = peerInfoServiceImpl.getNextQueryId();
-        RemoteMonitorQuery remoteMonitorQuery = RemoteMonitorQuery.createRegisterMonitorQuery(includeCumulative, monitorFilter, reportRate, lease);
-        peerInfoMessenger.sendPeerInfoRequest(queryId, peerID, MONITOR_HANDLER_NAME, remoteMonitorQuery);
-        final RequestInfo requestInfo = new RequestInfo(peerID, queryId, monitorListener, timeout, peerInfoMessenger);
-        requestInfo.requestedLease = lease;
-        requestInfos.put(queryId, requestInfo);
-        timer.schedule(new TimerTask() {
-            @Override
-            public void run() {
-                if (!requestInfo.responseReceived) {
-                    MonitorEvent monitorEvent = MonitorEvent.createFailureEvent(MonitorEvent.TIMEOUT, requestInfo.peerId,
-                            requestInfo.queryId);
-
-                    requestInfo.monitorListener.monitorRequestFailed(monitorEvent);
-                    requestInfos.remove(requestInfo.queryId);
-                }
-            }
-        }, timeout);
-        scheduleTimeout(requestInfo);
-    }
-
-    public void removeRemoteMonitorListener(PeerID peerID, MonitorListener monitorListener, long timeout, PeerInfoMessenger peerInfoMessenger) throws MonitorException {
-        int queryId = peerInfoServiceImpl.getNextQueryId();
-
-        RequestInfo oldRequestInfo = null;
-        for (Enumeration<RequestInfo> e = requestInfos.elements(); e.hasMoreElements();) {
-            RequestInfo ri = e.nextElement();
-
-            if (ri.monitorListener == monitorListener) {
-                oldRequestInfo = ri;
-                break;
-            }
-        }
-
-        if (oldRequestInfo != null) {
-            RemoteMonitorQuery remoteMonitorQuery = RemoteMonitorQuery.createRemoveMonitorListenerQuery(oldRequestInfo.leaseId);
-            peerInfoMessenger.sendPeerInfoRequest(queryId, peerID, MONITOR_HANDLER_NAME, remoteMonitorQuery);
-            final RequestInfo requestInfo = new RequestInfo(peerID, queryId, monitorListener, timeout, peerInfoMessenger);
-            requestInfo.origRequestId = oldRequestInfo.queryId;
-            requestInfos.put(queryId, requestInfo);
-        }
-
-        final RequestInfo requestInfo = oldRequestInfo;
-        timer.schedule(new TimerTask() {
-
-            @Override
-            public void run() {
-                requestInfos.remove(new Integer(requestInfo.queryId));
-            }
-        }, timeout);
-    }
-
-    public void removeRemoteMonitorListener(MonitorListener monitorListener, long timeout, PeerInfoMessenger peerInfoMessenger) throws MonitorException {
-        for (Enumeration<RequestInfo> e = requestInfos.elements(); e.hasMoreElements();) {
-            RequestInfo requestInfo = e.nextElement();
-
-            if (requestInfo.monitorListener == monitorListener) {
-                removeRemoteMonitorListener(requestInfo.peerId, monitorListener, timeout, peerInfoMessenger);
-            }
-        }
-    }
-
-    public void processRequest(int queryId, PeerID requestSourceID, PeerInfoQueryMessage peerInfoQueryMessage, Element requestElement, PeerInfoMessenger peerInfoMessenger) {
-        try {
-            RemoteMonitorQuery remoteMonitorQuery = (RemoteMonitorQuery) DocumentSerializableUtilities.getDocumentSerializable(requestElement, RemoteMonitorQuery.class);
-
-            if (remoteMonitorQuery.isRegisterMonitorQuery()) {
-                handleRegisterMonitorQuery(queryId, requestSourceID, remoteMonitorQuery, peerInfoMessenger);
-
-            } else if (remoteMonitorQuery.isCumulativeReportQuery()) {
-                handleCumulativeReportQuery(queryId, requestSourceID, remoteMonitorQuery.getMonitorFilter(), peerInfoMessenger);
-
-            } else if (remoteMonitorQuery.isRemoveMonitorQuery()) {
-                handleRemoveMonitorQuery(queryId, requestSourceID, remoteMonitorQuery, peerInfoMessenger);
-
-            } else if (remoteMonitorQuery.isPeerMonitorInfoQuery()) {
-                handlePeerMonitorInfoQuery(queryId, requestSourceID, peerInfoMessenger);
-
-            } else if (remoteMonitorQuery.isLeaseRenewal()) {
-                handleLeaseRenewalQuery(queryId, requestSourceID, remoteMonitorQuery, peerInfoMessenger);
-
-            }
-        } catch (Exception e) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Monitor failed in processQuery", e);
-            }
-        }
-    }
-
-    public void processResponse(int queryId, PeerInfoResponseMessage peerInfoResponseMessage, Element responseElement, PeerInfoMessenger peerInfoMessenger) {
-
-        RemoteMonitorResponse remoteMonitorResponse;
-
-        try {
-            remoteMonitorResponse = (RemoteMonitorResponse) DocumentSerializableUtilities.getDocumentSerializable(responseElement, RemoteMonitorResponse.class);
-            RequestInfo requestInfo = requestInfos.get(new Integer(queryId));
-
-            if (requestInfo != null) {
-                requestInfo.responseReceived = true;
-
-                resetTimeout(requestInfo);
-                if (remoteMonitorResponse.isMonitorRegistered()) {
-                    int leaseId = remoteMonitorResponse.getLeaseId();
-                    long leaseLength = remoteMonitorResponse.getLease();
-
-                    requestInfo.leaseId = leaseId;
-                    scheduleLeaseRenewal(requestInfo, leaseLength);
-
-                } else if (remoteMonitorResponse.isMonitorRemoved()) {
-                    requestInfos.remove(new Integer(requestInfo.origRequestId));
-                    requestInfos.remove(new Integer(queryId));
-
-                } else if (remoteMonitorResponse.isCumulativeReport() || remoteMonitorResponse.isMonitorReport()) {
-                    MonitorReport monitorReport = remoteMonitorResponse.getMonitorReport();
-                    MonitorEvent monitorEvent = MonitorEvent.createRemoteMonitorReportEvent(requestInfo.peerId, requestInfo.queryId, monitorReport);
-                    requestInfo.monitorListener.processMonitorReport(monitorEvent);
-                } else if (remoteMonitorResponse.isInvalidFilter()) {
-                    MonitorEvent monitorEvent = MonitorEvent.createFailureEvent(MonitorEvent.INVALID_MONITOR_FILTER, requestInfo.peerId, requestInfo.queryId);
-                    requestInfo.monitorListener.monitorRequestFailed(monitorEvent);
-                    requestInfos.remove(new Integer(queryId));
-                } else if (remoteMonitorResponse.isInvalidReportRate()) {
-                    MonitorEvent monitorEvent = MonitorEvent.createFailureEvent(MonitorEvent.INVALID_REPORT_RATE, requestInfo.peerId, requestInfo.queryId);
-                    requestInfo.monitorListener.monitorRequestFailed(monitorEvent);
-                    requestInfos.remove(new Integer(queryId));
-                } else if (remoteMonitorResponse.isMeteringNotSupported()) {
-                    MonitorEvent monitorEvent = MonitorEvent.createFailureEvent(MonitorEvent.REFUSED, requestInfo.peerId, requestInfo.queryId);
-                    requestInfo.monitorListener.monitorRequestFailed(monitorEvent);
-                    requestInfos.remove(new Integer(queryId));
-                } else if (remoteMonitorResponse.isRequestDenied()) {
-                    MonitorEvent monitorEvent = MonitorEvent.createFailureEvent(MonitorEvent.REFUSED, requestInfo.peerId, requestInfo.queryId);
-                    requestInfo.monitorListener.monitorRequestFailed(monitorEvent);
-                } else if (remoteMonitorResponse.isPeerMonitorInfo()) {
-                    PeerMonitorInfoEvent peerMonitorInfoEvent = new PeerMonitorInfoEvent(requestInfo.peerId, remoteMonitorResponse.getPeerMonitorInfo());
-                    requestInfo.peerMonitorInfoListener.peerMonitorInfoReceived(peerMonitorInfoEvent);
-                    requestInfos.remove(new Integer(queryId));
-                } else if (remoteMonitorResponse.isLeaseRenewed()) {
-                    long lease = remoteMonitorResponse.getLease();
-                    int origRequestId = requestInfo.origRequestId;
-                    RequestInfo origRequest = requestInfos.get(new Integer(origRequestId));
-                    scheduleLeaseRenewal(origRequest, lease);
-                    requestInfos.remove(new Integer(queryId));
-                }
-            }
-        } catch (DocumentSerializationException e) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Document Serialization Failed", e);
-            }
-        }
-    }
-
-    private void resetTimeout(RequestInfo requestInfo) {
-        timeouts.put(requestInfo.queryId, requestInfo.timeout + System.currentTimeMillis());
-    }
-
-    private long getTimeout(int queryId) {
-        return timeouts.get(queryId);
-    }
-
-    private void scheduleTimeout(final RequestInfo requestInfo) {
-        final int queryId = requestInfo.queryId;
-
-        timer.schedule(
-                new TimerTask() {
-            @Override
-            public void run() {
-                if (requestInfos.containsKey(new Integer(queryId))) {
-                    try {
-                        if (System.currentTimeMillis() > getTimeout(queryId)) {
-                            MonitorEvent monitorEvent = MonitorEvent.createFailureEvent(MonitorEvent.TIMEOUT, requestInfo.peerId, queryId);
-                            requestInfo.monitorListener.monitorRequestFailed(monitorEvent);
-                        }
-                    } catch (Exception e) {
-                        //ignored
-                    }
-                } else {
-                    cancel();
-                }
-            }
-        }, requestInfo.timeout, requestInfo.timeout);
-    }
-
-    private void scheduleLeaseRenewal(RequestInfo requestInfo, long leaseLength) {
-        long roundTrip = requestInfo.requestTime - System.currentTimeMillis();
-        long renewTime = leaseLength - roundTrip - 30 * 1000L; // 30s comfort
-        // zone.
-        final int queryId = requestInfo.queryId;
-
-        if (renewTime > MIN_LEASE) {
-            timer.schedule(new TimerTask() {
-
-                @Override
-                public void run() {
-                    try {
-                        renewLease(queryId);
-                    } catch (Exception e) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.log(Level.FINE, "Lease Renewal Failed", e);
-                        }
-                    }
-                }
-            }, renewTime);
-        }
-    }
-
-    private void handleRegisterMonitorQuery(final int queryId, final PeerID requestSourceID, RemoteMonitorQuery remoteMonitorQuery, final PeerInfoMessenger peerInfoMessenger) {
-        MonitorFilter monitorFilter = remoteMonitorQuery.getMonitorFilter();
-        long lease = remoteMonitorQuery.getLease();
-        long reportRate = remoteMonitorQuery.getReportRate();
-        boolean includeCumulative = remoteMonitorQuery.isIncludeCumulative();
-
-        MonitorListener monitorListener = new MonitorListener() {
-
-            public void processMonitorReport(MonitorEvent monitorEvent) {
-                MonitorReport monitorReport = monitorEvent.getMonitorReport();
-                try {
-                    RemoteMonitorResponse remoteMonitorResponse = RemoteMonitorResponse.createMonitorReportResponse(queryId, monitorReport);
-                    peerInfoMessenger.sendPeerInfoResponse(queryId, requestSourceID, MONITOR_HANDLER_NAME, remoteMonitorResponse);
-                } catch (Exception e) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine(e.toString());
-                    }
-                }
-            }
-
-            public void monitorReportingCancelled(MonitorEvent monitorEvent) {
-                throw new RuntimeException("METHOD NOT IMPLEMENTED");
-            }
-
-            public void monitorRequestFailed(MonitorEvent monitorEvent) {
-                throw new RuntimeException("METHOD NOT IMPLEMENTED");
-            }
-        };
-
-        int leaseId = getNextLeaseId();
-        final LeaseInfo leaseInfo = new LeaseInfo(leaseId, requestSourceID, queryId, monitorListener, lease, peerInfoMessenger);
-        long leaseTime = getLeaseTime(lease);
-
-        setupLeaseTimeout(leaseInfo.leaseId, leaseTime);
-
-        try {
-            /*
-             * Currently we can neither ask peers in the netgroup for transport
-             * metrics, nor discover peers in the world group. Therefore we're
-             * asking peers in the netgroup to send TransportMetrics, but that
-             * peer is actually attaching the MonitorFilter to it's WorldGroup
-             * peer.
-             */
-            for (Iterator i = monitorFilter.getServiceMonitorFilters(); i.hasNext();) {
-                ServiceMonitorFilter serviceMonitorFilter = (ServiceMonitorFilter) i.next();
-
-                if (serviceMonitorFilter.getModuleClassID().equals(MonitorResources.transportServiceMonitorClassID)) {
-                    try {
-                        MonitorFilter worldGroupFilter = new MonitorFilter("worldGroupFilter");
-
-                        worldGroupFilter.addServiceMonitorFilter(serviceMonitorFilter);
-                        i.remove();
-                        PeerGroup worldGroup = peerGroup.newGroup(PeerGroupID.worldPeerGroupID);
-                        PeerInfoService worldService = worldGroup.getPeerInfoService();
-
-                        worldService.addMonitorListener(worldGroupFilter, remoteMonitorQuery.getReportRate(), includeCumulative,
-                                monitorListener);
-                        leaseInfo.listenerAddedToWorldGroup = true;
-                        leaseInfo.worldGroup = worldGroup;
-                    } catch (PeerGroupException e) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine(e.toString());
-                        }
-                    }
-                }
-            }
-            if (monitorFilter.getServiceMonitorFilterCount() > 0) {
-                peerInfoServiceImpl.addMonitorListener(monitorFilter, reportRate, includeCumulative, monitorListener);
-            }
-            leaseInfos.put(leaseId, leaseInfo);
-            RemoteMonitorResponse remoteMonitorResponse = RemoteMonitorResponse.createMonitorRegisteredResponse(queryId, leaseId, leaseTime);
-            peerInfoMessenger.sendPeerInfoResponse(queryId, requestSourceID, MONITOR_HANDLER_NAME, remoteMonitorResponse);
-        } catch (MonitorFilterException e) {
-            RemoteMonitorResponse remoteMonitorResponse = RemoteMonitorResponse.createInvalidFilterResponse(queryId);
-
-            peerInfoMessenger.sendPeerInfoResponse(queryId, requestSourceID, MONITOR_HANDLER_NAME, remoteMonitorResponse);
-        } catch (MonitorException e) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(e.toString());
-            }
-        }
-    }
-
-    private void handleRemoveMonitorQuery(int queryId, PeerID requestSourceID, RemoteMonitorQuery remoteMonitorQuery, PeerInfoMessenger peerInfoMessenger) {
-        try {
-            int leaseId = remoteMonitorQuery.getLeaseId();
-            LeaseInfo leaseInfo = leaseInfos.get(new Integer(leaseId));
-
-            if (leaseInfo != null) {
-                MonitorListener monitorListener = leaseInfo.monitorListener;
-
-                peerInfoServiceImpl.removeMonitorListener(monitorListener);
-                if (leaseInfo.listenerAddedToWorldGroup) {
-                    PeerInfoService peerInfoService = leaseInfo.worldGroup.getPeerInfoService();
-                    peerInfoService.removeMonitorListener(monitorListener);
-                }
-
-                RemoteMonitorResponse remoteMonitorResponse = RemoteMonitorResponse.createMonitorRemovedResponse(queryId);
-                peerInfoMessenger.sendPeerInfoResponse(queryId, requestSourceID, MONITOR_HANDLER_NAME, remoteMonitorResponse);
-            }
-        } catch (MonitorException e) {
-            // Currently not thrown by MonitorManager.removeMonitorListener()
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(e.toString());
-            }
-        }
-    }
-
-    private void handleCumulativeReportQuery(int queryId, PeerID requestSourceID, MonitorFilter monitorFilter, PeerInfoMessenger peerInfoMessenger) throws MonitorException, DocumentSerializationException {
-        MonitorReport monitorReport = peerInfoServiceImpl.getCumulativeMonitorReport(monitorFilter);
-        RemoteMonitorResponse remoteMonitorResponse = RemoteMonitorResponse.createCumulativeReportResponse(queryId, monitorReport);
-        peerInfoMessenger.sendPeerInfoResponse(queryId, requestSourceID, MONITOR_HANDLER_NAME, remoteMonitorResponse);
-    }
-
-    private void handlePeerMonitorInfoQuery(int queryId, PeerID requestSourceID, PeerInfoMessenger peerInfoMessenger) throws DocumentSerializationException {
-        // FIX-ME:
-        /* Asking the NetGroup Peer won't tell me if it supports transport
-         * monitoring or not, but asking the world group guy gives me
-         * everything I need because as currently implemented you can't turn
-         * monitoring on or off at the PeerGroup level, only the device level.
-         */
-        try {
-            PeerGroup worldGroup = peerGroup.newGroup(PeerGroupID.worldPeerGroupID);
-            PeerInfoService worldService = worldGroup.getPeerInfoService();
-
-            PeerMonitorInfo peerMonitorInfo = worldService.getPeerMonitorInfo();
-            RemoteMonitorResponse remoteMonitorResponse = RemoteMonitorResponse.createPeerMonitorInfoResponse(queryId, peerMonitorInfo);
-            peerInfoMessenger.sendPeerInfoResponse(queryId, requestSourceID, MONITOR_HANDLER_NAME, remoteMonitorResponse);
-        } catch (PeerGroupException e) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(e.toString());
-            }
-        }
-    }
-
-    private void handleLeaseRenewalQuery(int queryId, PeerID requestSourceID, RemoteMonitorQuery remoteMonitorQuery, PeerInfoMessenger peerInfoMessenger) throws DocumentSerializationException {
-        int leaseId = remoteMonitorQuery.getLeaseId();
-        LeaseInfo leaseInfo = leaseInfos.get(new Integer(leaseId));
-
-        if (leaseInfo != null) {
-            long reqLease = remoteMonitorQuery.getLease();
-            long lease = getLeaseTime(reqLease);
-
-            leaseInfo.validUntil = System.currentTimeMillis() + lease;
-            setupLeaseTimeout(leaseInfo.leaseId, lease);
-
-            RemoteMonitorResponse remoteMonitorResponse = RemoteMonitorResponse.createLeaseRenewedResponse(queryId, leaseInfo.leaseId, lease);
-            peerInfoMessenger.sendPeerInfoResponse(queryId, requestSourceID, MONITOR_HANDLER_NAME, remoteMonitorResponse);
-        } else {
-            RemoteMonitorResponse remoteMonitorResponse = RemoteMonitorResponse.createDeniedResponse(queryId);
-            peerInfoMessenger.sendPeerInfoResponse(queryId, requestSourceID, MONITOR_HANDLER_NAME, remoteMonitorResponse);
-        }
-    }
-
-    long getLeaseTime(long requestedLease) {
-        long leaseTime = requestedLease < MAX_LEASE ? requestedLease : MAX_LEASE;
-
-        leaseTime = leaseTime > MIN_LEASE ? leaseTime : MIN_LEASE;
-        return leaseTime;
-    }
-
-    private void cancelLease(LeaseInfo leaseInfo) throws MonitorException, DocumentSerializationException {
-        if (leaseInfo.listenerAddedToWorldGroup) {
-            leaseInfo.worldGroup.getPeerInfoService().removeMonitorListener(leaseInfo.monitorListener);
-        }
-
-        RemoteMonitorResponse remoteMonitorResponse = RemoteMonitorResponse.createLeaseEndedResponse(leaseInfo.queryId, leaseInfo.leaseId);
-        leaseInfo.peerInfoMessenger.sendPeerInfoResponse(leaseInfo.queryId, leaseInfo.peerID, MONITOR_HANDLER_NAME, remoteMonitorResponse);
-    }
-
-    private void renewLease(int queryId) {
-        try {
-            RequestInfo requestInfo = requestInfos.get(new Integer(queryId));
-
-            if (requestInfo != null) {
-                int renewalQueryId = peerInfoServiceImpl.getNextQueryId();
-                PeerID peerID = requestInfo.peerId;
-                long timeout = requestInfo.timeout;
-
-                RemoteMonitorQuery remoteMonitorQuery = RemoteMonitorQuery.createLeaseRenewalQuery(requestInfo.leaseId, requestInfo.requestedLease);
-
-                requestInfo.peerInfoMessenger.sendPeerInfoRequest(queryId, peerID, MONITOR_HANDLER_NAME, remoteMonitorQuery);
-                final RequestInfo renewalRequestInfo = new RequestInfo(peerID, queryId, timeout, requestInfo.peerInfoMessenger);
-
-                renewalRequestInfo.requestedLease = requestInfo.requestedLease;
-                renewalRequestInfo.origRequestId = queryId;
-                requestInfos.put(renewalQueryId, renewalRequestInfo);
-            }
-        } catch (Exception e) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "error while attempting Monitor lease renewal", e);
-            }
-        }
-    }
-
-    private void setupLeaseTimeout(final int leaseId, long lease) {
-
-        timer.schedule(new TimerTask() {
-
-            @Override
-            public void run() {
-                LeaseInfo leaseInfo = leaseInfos.get(new Integer(leaseId));
-
-                if (leaseInfo != null) {
-                    long currentTime = System.currentTimeMillis();
-
-                    if (leaseInfo.validUntil <= currentTime) {
-                        try {
-                            cancelLease(leaseInfo);
-                        } catch (Exception e) {
-                            // ignored
-                        } finally {
-                            leaseInfos.remove(leaseInfo.queryId);
-                        }
-                    }
-                }
-            }
-        }, lease);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peer/RemoteMonitorQuery.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peer/RemoteMonitorQuery.java
deleted file mode 100644 (file)
index dad252e..0000000
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.peer;
-
-
-import net.jxta.document.*;
-import net.jxta.util.documentSerializable.*;
-import net.jxta.meter.*;
-
-import java.util.*;
-
-
-public class RemoteMonitorQuery implements DocumentSerializable {
-
-    public static final String CUMULATIVE_REPORT_REQUEST = "cumulativeReport";
-    public static final String REGISTER_MONITOR_REQUEST = "registerMonitor";
-    public static final String REMOVE_MONITOR_REQUEST = "removeMonitor";
-    public static final String VALIDATE_FILTER_REQUEST = "validateFilter";
-    public static final String VALIDATE_CUMULATIVE_FILTER_REQUEST = "validateCumulativeFilter";
-    public static final String GET_MONITORING_CAPABILITIES_REQUEST = "remoteMonitoringCapabilities";
-    public static final String PEER_MONITOR_INFO = "peerMonitorInfo";
-    public static final String RENEW_LEASE = "renewLease";
-       
-    private String requestType;
-    private MonitorFilter monitorFilter;
-    private boolean includeCumulative;
-    private long reportRate = -1;
-    private long lease = -1;
-    private int leaseId;
-
-    public RemoteMonitorQuery() {} // for serialization code.
-
-    private RemoteMonitorQuery(String requestType) { 
-        this.requestType = requestType;
-    }
-
-    public MonitorFilter getMonitorFilter() {
-        return monitorFilter;
-    }
-
-    private String getRequestType() {
-        return requestType;
-    }
-
-    public long getReportRate() {
-        return reportRate;
-    }
-
-    public long getLease() {
-        return lease;
-    }
-
-    public int getLeaseId() {
-        return leaseId;
-    }
-
-    public boolean isIncludeCumulative() {
-        return includeCumulative;
-    }
-       
-    boolean isCumulativeReportQuery() {
-        return requestType.equals(CUMULATIVE_REPORT_REQUEST);
-    }
-
-    boolean isRegisterMonitorQuery() {
-        return requestType.equals(REGISTER_MONITOR_REQUEST);
-    }
-
-    boolean isRemoveMonitorQuery() {
-        return requestType.equals(REMOVE_MONITOR_REQUEST);
-    }
-
-    boolean isValidateFilterRequest() {
-        return requestType.equals(VALIDATE_FILTER_REQUEST);
-    }
-
-    boolean isValidateCumulativeFilterRequest() {
-        return requestType.equals(VALIDATE_CUMULATIVE_FILTER_REQUEST);
-    }
-
-    boolean isPeerMonitorInfoQuery() {
-        return requestType.equals(PEER_MONITOR_INFO);
-    }
-
-    boolean isLeaseRenewal() {
-        return requestType.equals(RENEW_LEASE);
-    }
-
-    static RemoteMonitorQuery createGetCumulativeReportQuery(MonitorFilter monitorFilter) {
-        RemoteMonitorQuery remoteMonitorQuery = new RemoteMonitorQuery(CUMULATIVE_REPORT_REQUEST);
-
-        remoteMonitorQuery.monitorFilter = monitorFilter;
-        return remoteMonitorQuery;
-    }
-               
-    static RemoteMonitorQuery createRegisterMonitorQuery(boolean includeCumulative, MonitorFilter monitorFilter, long reportRate, long lease) {
-        RemoteMonitorQuery remoteMonitorQuery = new RemoteMonitorQuery(REGISTER_MONITOR_REQUEST);
-
-        remoteMonitorQuery.monitorFilter = monitorFilter;
-        remoteMonitorQuery.reportRate = reportRate;
-        remoteMonitorQuery.lease = lease;
-        remoteMonitorQuery.includeCumulative = includeCumulative;
-        return remoteMonitorQuery;
-    }
-
-    static RemoteMonitorQuery createRemoveMonitorListenerQuery(int leaseId) {
-        RemoteMonitorQuery remoteMonitorQuery = new RemoteMonitorQuery(REMOVE_MONITOR_REQUEST);
-
-        remoteMonitorQuery.leaseId = leaseId;
-        return remoteMonitorQuery;
-    }
-
-    static RemoteMonitorQuery createPeerMonitorInfoQuery() {
-        RemoteMonitorQuery remoteMonitorQuery = new RemoteMonitorQuery(PEER_MONITOR_INFO);
-
-        return remoteMonitorQuery;             
-    }
-
-    static RemoteMonitorQuery createLeaseRenewalQuery(int leaseId, long requestedLease) {
-        RemoteMonitorQuery remoteMonitorQuery = new RemoteMonitorQuery(RENEW_LEASE);
-
-        remoteMonitorQuery.leaseId = leaseId;
-        remoteMonitorQuery.lease = requestedLease;
-        return remoteMonitorQuery;
-    }
-
-    public void serializeTo(Element element) throws DocumentSerializationException {
-        DocumentSerializableUtilities.addString(element, "requestType", requestType);
-
-        if (monitorFilter != null) {
-            DocumentSerializableUtilities.addDocumentSerializable(element, "monitorFilter", monitorFilter);
-        }
-                       
-        if (lease > 0) {
-            DocumentSerializableUtilities.addLong(element, "lease", lease);
-        }
-
-        if (leaseId > -1) {
-            DocumentSerializableUtilities.addInt(element, "leaseId", leaseId);
-        }                      
-
-        if (reportRate > 0) {          
-            DocumentSerializableUtilities.addLong(element, "reportRate", reportRate);
-        }
-
-        if (includeCumulative) { 
-            DocumentSerializableUtilities.addBoolean(element, "includeCumulative", includeCumulative);
-        }
-    }
-
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element childElement = (TextElement) e.nextElement();
-            String tagName = (String) childElement.getKey();
-                       
-            if (tagName.equals("requestType")) { 
-                requestType = DocumentSerializableUtilities.getString(childElement);
-            } else if (tagName.equals("monitorFilter")) { 
-                monitorFilter = (MonitorFilter) DocumentSerializableUtilities.getDocumentSerializable(childElement
-                        ,
-                        MonitorFilter.class);
-            } else if (tagName.equals("lease")) { 
-                lease = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("leaseId")) { 
-                leaseId = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("reportRate")) { 
-                reportRate = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("includeCumulative")) { 
-                includeCumulative = DocumentSerializableUtilities.getBoolean(childElement);
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peer/RemoteMonitorResponse.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peer/RemoteMonitorResponse.java
deleted file mode 100644 (file)
index a1ebefe..0000000
+++ /dev/null
@@ -1,334 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.peer;
-
-
-import net.jxta.document.*;
-import net.jxta.util.documentSerializable.*;
-import net.jxta.meter.*;
-import java.util.*;
-
-
-public class RemoteMonitorResponse implements DocumentSerializable {
-    public static final String MONITOR_REGISTERED = "monitorRegistered";
-    public static final String MONITOR_REMOVED = "monitorGone";
-    public static final String CUMULATIVE_REPORT_RESPONSE = "cumulativeReport";
-    public static final String MONITOR_REPORT_RESPONSE = "monitorReport";
-    public static final String INVALID_FILTER = "invalidFilter";
-    public static final String INVALID_REPORT_RATE = "invalidReportRate";
-    public static final String VALID_FILTER = "validFilter";
-    public static final String SERVICE_NOT_SUPPORTED = "serviceNotSupported";
-    public static final String METERING_NOT_SUPPORTED = "metereringNotSupported";
-    public static final String METERING_SUPPORTED = "meteringSupported";
-    public static final String METERING_REQUEST_DENIED = "meteringRequestDenied";
-    public static final String PEER_MONITOR_INFO = "peerMonitorInfo";
-    public static final String LEASE_ENDED = "leaseOver";
-    public static final String LEASE_RENEWED = "leaseRenewed";
-
-    /*
-     ResponseCode: Not Supported
-     ResponseCode: Invalid Reporting Rate
-     Suggested Reporting Rate
-     ResponseCode: Invalid Filter
-     Suggested Filter
-     */
-
-    private String responseType;
-    private int requestId;
-    private int leaseId;
-    private MonitorReport monitorReport;
-    private boolean isCumulative;
-    private MonitorFilter monitorFilter;
-    private long lease = -1;
-    private PeerMonitorInfo peerMonitorInfo;
-       
-    private long reportRates[];
-    private LinkedList supportedModuleClassIDs;
-
-    public RemoteMonitorResponse() {} // for serialization.
-       
-    private RemoteMonitorResponse(String responseType, int requestId) { 
-        this.responseType = responseType;
-        this.requestId = requestId;
-    }
-
-    public long getLease() {
-        return lease;
-    }
-
-    public boolean isCumulative() {
-        return isCumulative;
-    }
-
-    public String getResponseType() {
-        return responseType;
-    }
-
-    public int getRequestId() {
-        return requestId;
-    }
-
-    public int getLeaseId() {
-        return leaseId;
-    }
-
-    public MonitorReport getMonitorReport() {
-        return monitorReport;
-    }
-
-    public MonitorFilter getMonitorFilter() {
-        return monitorFilter;
-    }
-
-    public PeerMonitorInfo getPeerMonitorInfo() {
-        return peerMonitorInfo;
-    }
-       
-    public boolean isMonitorRegistered() {
-        return responseType.equals(MONITOR_REGISTERED);
-    }
-
-    public boolean isMonitorRemoved() {
-        return responseType.equals(MONITOR_REMOVED);
-    }
-
-    public boolean isCumulativeReport() {
-        return responseType.equals(CUMULATIVE_REPORT_RESPONSE);
-    }
-
-    public boolean isMonitorReport() {
-        return responseType.equals(MONITOR_REPORT_RESPONSE);
-    }
-
-    public boolean isValidFilter() {
-        return responseType.equals(VALID_FILTER);
-    }
-
-    public boolean isInvalidFilter() {
-        return responseType.equals(INVALID_FILTER);
-    }
-
-    public boolean isInvalidReportRate() {
-        return responseType.equals(INVALID_REPORT_RATE);
-    }
-
-    public boolean isServiceNotSupported() {
-        return responseType.equals(SERVICE_NOT_SUPPORTED);
-    }
-
-    public boolean isMeteringNotSupported() {
-        return responseType.equals(METERING_NOT_SUPPORTED);
-    }
-
-    public boolean isMeteringSupported() {
-        return responseType.equals(METERING_SUPPORTED);
-    }
-
-    public boolean isRequestDenied() {
-        return responseType.equals(METERING_REQUEST_DENIED);
-    }
-
-    public boolean isPeerMonitorInfo() {
-        return responseType.equals(PEER_MONITOR_INFO);
-    }
-
-    public boolean isLeaseRenewed() {
-        return responseType.equals(LEASE_RENEWED);
-    }
-
-    public static RemoteMonitorResponse createMonitorRegisteredResponse(int requestId, int leaseId, long lease) {
-        RemoteMonitorResponse remoteMonitorResponse = new RemoteMonitorResponse(MONITOR_REGISTERED, requestId);
-
-        remoteMonitorResponse.leaseId = leaseId;
-        remoteMonitorResponse.lease = lease;
-        return remoteMonitorResponse;
-    }
-
-    public static RemoteMonitorResponse createMonitorRemovedResponse(int requestId) {
-        RemoteMonitorResponse remoteMonitorResponse = new RemoteMonitorResponse(MONITOR_REMOVED, requestId);
-
-        return remoteMonitorResponse;
-    }          
-
-    public static RemoteMonitorResponse createLeaseEndedResponse(int requestId, int leaseId) {
-        RemoteMonitorResponse remoteMonitorResponse = new RemoteMonitorResponse(LEASE_ENDED, requestId);
-
-        remoteMonitorResponse.leaseId = leaseId;
-        return remoteMonitorResponse;
-    }
-       
-    public static RemoteMonitorResponse createCumulativeReportResponse(int requestId, MonitorReport monitorReport) {
-        RemoteMonitorResponse remoteMonitorResponse = new RemoteMonitorResponse(CUMULATIVE_REPORT_RESPONSE, requestId);
-
-        remoteMonitorResponse.monitorReport = monitorReport;
-        remoteMonitorResponse.isCumulative = true;
-        return remoteMonitorResponse;
-    }
-
-    public static RemoteMonitorResponse createMonitorReportResponse(int requestId, MonitorReport monitorReport) {
-        RemoteMonitorResponse remoteMonitorResponse = new RemoteMonitorResponse(MONITOR_REPORT_RESPONSE, requestId);
-
-        remoteMonitorResponse.monitorReport = monitorReport;
-        remoteMonitorResponse.isCumulative = false;
-        return remoteMonitorResponse;
-    }
-
-    public static RemoteMonitorResponse createInvalidReportRateResponse(int requestId) {
-        RemoteMonitorResponse remoteMonitorResponse = new RemoteMonitorResponse(INVALID_REPORT_RATE, requestId);
-
-        return remoteMonitorResponse;          
-    }
-
-    public static RemoteMonitorResponse createServiceNotSupportedResponse(int requestId) {
-        RemoteMonitorResponse remoteMonitorResponse = new RemoteMonitorResponse(SERVICE_NOT_SUPPORTED, requestId);
-
-        return remoteMonitorResponse;          
-    }
-
-    public static RemoteMonitorResponse createInvalidFilterResponse(int requestId) {
-        RemoteMonitorResponse remoteMonitorResponse = new RemoteMonitorResponse(INVALID_FILTER, requestId);
-
-        return remoteMonitorResponse;          
-    }
-
-    /*
-     public static RemoteMonitorResponse createValidFilterResponse(int requestId) {
-     RemoteMonitorResponse remoteMonitorResponse = new RemoteMonitorResponse(VALID_FILTER, requestId);
-     return remoteMonitorResponse;             
-     }
-     */
-    public static RemoteMonitorResponse createDeniedResponse(int requestId) {
-        RemoteMonitorResponse remoteMonitorResponse = new RemoteMonitorResponse(METERING_REQUEST_DENIED, requestId);
-
-        return remoteMonitorResponse;          
-    }
-       
-    public static RemoteMonitorResponse createPeerMonitorInfoResponse(int requestId, PeerMonitorInfo peerMonitorInfo) {
-        RemoteMonitorResponse remoteMonitorResponse = new RemoteMonitorResponse(PEER_MONITOR_INFO, requestId);
-
-        remoteMonitorResponse.peerMonitorInfo = peerMonitorInfo;
-        return remoteMonitorResponse;          
-    }
-
-    public static RemoteMonitorResponse createLeaseRenewedResponse(int requestId, int leaseId, long lease) {
-        RemoteMonitorResponse remoteMonitorResponse = new RemoteMonitorResponse(LEASE_RENEWED, requestId);
-
-        remoteMonitorResponse.leaseId = leaseId;
-        remoteMonitorResponse.lease = lease;
-        return remoteMonitorResponse;  
-    }          
-
-    public void serializeTo(Element element) throws DocumentSerializationException {
-        DocumentSerializableUtilities.addString(element, "responseType", responseType);
-        DocumentSerializableUtilities.addInt(element, "requestId", requestId);
-               
-        if (monitorReport != null) {
-            DocumentSerializableUtilities.addDocumentSerializable(element, "monitorReport", monitorReport);
-        }
-                       
-        if (monitorFilter != null) {
-            DocumentSerializableUtilities.addDocumentSerializable(element, "monitorFilter", monitorFilter);
-        }
-
-        if (lease > 0) {
-            DocumentSerializableUtilities.addLong(element, "lease", lease);
-        }
-
-        if (leaseId > -1) {
-            DocumentSerializableUtilities.addInt(element, "leaseId", leaseId);
-        }              
-
-        if (isCumulative) { 
-            DocumentSerializableUtilities.addBoolean(element, "isCumulative", isCumulative);
-        }
-
-        if (peerMonitorInfo != null) {
-            DocumentSerializableUtilities.addDocumentSerializable(element, "peerMonitorInfo", peerMonitorInfo);
-        }
-    }
-       
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element childElement = (TextElement) e.nextElement();
-            String tagName = (String) childElement.getKey();
-                       
-            if (tagName.equals("responseType")) { 
-                responseType = DocumentSerializableUtilities.getString(childElement);
-            } else if (tagName.equals("requestId")) { 
-                requestId = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("monitorReport")) {
-                monitorReport = (MonitorReport) DocumentSerializableUtilities.getDocumentSerializable(childElement
-                        ,
-                        MonitorReport.class);
-            } else if (tagName.equals("monitorFilter")) {
-                monitorFilter = (MonitorFilter) DocumentSerializableUtilities.getDocumentSerializable(childElement
-                        ,
-                        MonitorFilter.class);
-            } else if (tagName.equals("lease")) { 
-                lease = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("leaseId")) { 
-                leaseId = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("isCumulative")) { 
-                isCumulative = DocumentSerializableUtilities.getBoolean(childElement);
-            } else if (tagName.equals("peerMonitorInfo")) {
-                peerMonitorInfo = (PeerMonitorInfo) DocumentSerializableUtilities.getDocumentSerializable(childElement
-                        ,
-                        PeerMonitorInfo.class);
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peer/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peer/package.html
deleted file mode 100644 (file)
index 91b9a70..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    Provides definition for the standard JXTA Peer Info Service. 
-
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-pip" target='_blank'>JXTA Protocols Specification : Peer Info Protocol</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/AutomaticConfigurator.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/AutomaticConfigurator.java
deleted file mode 100644 (file)
index 9f6dee0..0000000
+++ /dev/null
@@ -1,511 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.peergroup;
-
-
-import java.net.InetAddress;
-import java.net.URI;
-import java.util.Enumeration;
-import java.util.Iterator;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.protocol.TransportAdvertisement;
-
-import net.jxta.exception.ConfiguratorException;
-
-import net.jxta.impl.endpoint.IPUtils;
-import net.jxta.impl.protocol.HTTPAdv;
-import net.jxta.impl.protocol.PlatformConfig;
-import net.jxta.impl.protocol.PSEConfigAdv;
-import net.jxta.impl.protocol.RdvConfigAdv;
-import net.jxta.impl.protocol.RelayConfigAdv;
-import net.jxta.impl.protocol.TCPAdv;
-
-
-/**
- * A simple platform configurator. This implementation provides reasonable
- * automatic configuration for edge peers on the JXTA public network.
- * <p/>
- * This implementation will read default values from several Java system
- * properties as appropriate:
- * <p/>
- * jxta.peer.name    --  The peer name to use.
- * jxta.http.port    --  The http port to use.
- * jxta.tcp.port     --  The tcp port to use.
- *
- * @see net.jxta.peergroup.Configurator
- */
-public class AutomaticConfigurator extends NullConfigurator {
-
-    /**
-     * Log4J logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(AutomaticConfigurator.class.getName());
-
-    /**
-     * Configures the platform using the specified directory.
-     * @param jxtaHome store home URI
-     * @throws net.jxta.exception.ConfiguratorException if a configuration error occurs
-     */
-    public AutomaticConfigurator(URI jxtaHome) throws ConfiguratorException {
-        super(jxtaHome);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public PlatformConfig getPlatformConfig() throws ConfiguratorException {
-        super.getPlatformConfig();
-
-        boolean reconf;
-
-        try {
-            reconf = buildPlatformConfig();
-        } catch (RuntimeException serious) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Trouble while fixing PlatformConfig. Hope for the best.", serious);
-            }
-
-            reconf = true;
-        }
-
-        // See if we need a reconf
-        if (reconf) {
-            throw new IncompleteConfigurationException("Damaged platform configuration.");
-        }
-
-        // Save the updated config.
-        save();
-
-        return advertisement;
-    }
-
-    /**
-     * Makes sure a PlatformConfig is present and if not, creates one.
-     * <p/>
-     * Performs some checking of PlatformConfig values and will fix some
-     * minor configuration problems automatically.
-     *
-     * @return If <tt>true</tt> then manual reconfiguration (of some form) is required.
-     */
-    private boolean buildPlatformConfig() {
-
-        boolean reconf = false;
-
-        if (advertisement == null) {
-            if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-                LOG.config("New PlatformConfig Advertisement");
-            }
-            advertisement = (PlatformConfig) AdvertisementFactory.newAdvertisement(PlatformConfig.getAdvertisementType());
-            advertisement.setDescription("Platform Config Advertisement created by : " + AutomaticConfigurator.class.getName());
-        }
-
-        // Set the peer name
-        String peerName = advertisement.getName();
-
-        if ((null == peerName) || (0 == peerName.trim().length())) {
-            String jpn = System.getProperty("jxta.peer.name", "");
-
-            if (0 != jpn.trim().length()) {
-                advertisement.setName(jpn);
-            }
-        }
-
-        // Check the HTTP Message Transport parameters.
-        XMLDocument http = (XMLDocument) advertisement.getServiceParam(PeerGroup.httpProtoClassID);
-        HTTPAdv httpAdv = null;
-        boolean httpEnabled = true;
-
-        if (http != null) {
-            try {
-                httpEnabled = advertisement.isSvcEnabled(PeerGroup.httpProtoClassID);
-
-                XMLElement param = null;
-
-                Enumeration httpChilds = http.getChildren(TransportAdvertisement.getAdvertisementType());
-
-                // get the HTTPAdv from TransportAdv
-                if (httpChilds.hasMoreElements()) {
-                    param = (XMLElement) httpChilds.nextElement();
-                }
-
-                if (null != param) {
-                    httpAdv = (HTTPAdv) AdvertisementFactory.newAdvertisement(param);
-
-                    if (httpEnabled) {
-                        // check if the interface address is still valid.
-                        String intf = httpAdv.getInterfaceAddress();
-
-                        if ((null != intf) && !isValidInetAddress(intf)) {
-                            reconf = true;
-
-                            if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-                                LOG.config("Reconfig requested - invalid interface address");
-                            }
-                        }
-                    }
-                }
-            } catch (RuntimeException advTrouble) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "HTTP advertisement corrupted", advTrouble);
-                }
-
-                httpAdv = null;
-            }
-        }
-
-        if (httpAdv == null) {
-            if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-                LOG.config("HTTP advertisement missing, making a new one.");
-            }
-
-            int port = 0;
-            // get the port from a property
-            String httpPort = System.getProperty("jxta.http.port");
-
-            if (httpPort != null) {
-                try {
-                    int propertyPort = Integer.parseInt(httpPort);
-
-                    if ((propertyPort < 65536) && (propertyPort >= 0)) {
-                        port = propertyPort;
-                    } else {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.warning("Property \'jxta.http.port\' is not a valid port number : " + propertyPort);
-                        }
-                    }
-                } catch (NumberFormatException ignored) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Property \'jxta.http.port\' was not an integer : " + http);
-                    }
-                }
-            }
-
-            httpAdv = (HTTPAdv) AdvertisementFactory.newAdvertisement(HTTPAdv.getAdvertisementType());
-            httpAdv.setProtocol("http");
-            httpAdv.setPort(port);
-            httpAdv.setServerEnabled(false);
-        }
-
-        // Create new param docs that contain the updated adv
-        http = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "Parm");
-        XMLDocument httAdvDoc = (XMLDocument) httpAdv.getDocument(MimeMediaType.XMLUTF8);
-
-        StructuredDocumentUtils.copyElements(http, http, httAdvDoc);
-        if (!httpEnabled) {
-            http.appendChild(http.createElement("isOff"));
-        }
-        advertisement.putServiceParam(PeerGroup.httpProtoClassID, http);
-
-        // Check the TCP Message Transport parameters.
-        XMLDocument tcp = (XMLDocument) advertisement.getServiceParam(PeerGroup.tcpProtoClassID);
-        TCPAdv tcpAdv = null;
-        boolean tcpEnabled = true;
-
-        if (tcp != null) {
-            try {
-                tcpEnabled = advertisement.isSvcEnabled(PeerGroup.tcpProtoClassID);
-
-                XMLElement param = null;
-
-                Enumeration tcpChilds = tcp.getChildren(TransportAdvertisement.getAdvertisementType());
-
-                // get the TransportAdv
-                if (tcpChilds.hasMoreElements()) {
-                    param = (XMLElement) tcpChilds.nextElement();
-                }
-
-                if (null != param) {
-                    tcpAdv = (TCPAdv) AdvertisementFactory.newAdvertisement(param);
-
-                    if (tcpEnabled) {
-                        String intf = tcpAdv.getInterfaceAddress();
-
-                        if ((null != intf) && !isValidInetAddress(intf)) {
-                            reconf = true;
-
-                            if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-                                LOG.config("Reconfig requested - invalid interface address");
-                            }
-                        }
-                    }
-                }
-            } catch (RuntimeException advTrouble) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "TCP advertisement corrupted", advTrouble);
-                }
-
-                tcpAdv = null;
-            }
-        }
-
-        if (tcpAdv == null) {
-            if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-                LOG.config("TCP advertisement missing, making a new one.");
-            }
-
-            int port = 0;
-            // get the port from a property
-            String tcpPort = System.getProperty("jxta.tcp.port");
-
-            if (tcpPort != null) {
-                try {
-                    int propertyPort = Integer.parseInt(tcpPort);
-
-                    if ((propertyPort < 65536) && (propertyPort >= 0)) {
-                        port = propertyPort;
-                    } else {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.warning("Property \'jxta.tcp.port\' is not a valid port number : " + propertyPort);
-                        }
-                    }
-                } catch (NumberFormatException ignored) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Property \'jxta.tcp.port\' was not an integer : " + tcpPort);
-                    }
-                }
-            }
-
-            tcpAdv = (TCPAdv) AdvertisementFactory.newAdvertisement(TCPAdv.getAdvertisementType());
-
-            tcpAdv.setProtocol("tcp");
-            tcpAdv.setPort(port);
-            tcpAdv.setMulticastAddr("224.0.1.85");
-            tcpAdv.setMulticastPort(1234);
-            tcpAdv.setMulticastSize(16384);
-            tcpAdv.setMulticastState(true);
-        }
-
-        tcp = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "Parm");
-
-        StructuredDocumentUtils.copyElements(tcp, tcp, (XMLDocument) tcpAdv.getDocument(MimeMediaType.XMLUTF8));
-        if (!tcpEnabled) {
-            tcp.appendChild(tcp.createElement("isOff"));
-        }
-        advertisement.putServiceParam(PeerGroup.tcpProtoClassID, tcp);
-
-        // Check the relay config
-        RelayConfigAdv relayConfig = null;
-
-        try {
-            XMLElement param = (XMLElement) advertisement.getServiceParam(PeerGroup.relayProtoClassID);
-
-            if (param != null) {
-                // XXX 20041027 backwards compatibility
-                param.addAttribute("type", RelayConfigAdv.getAdvertisementType());
-
-                relayConfig = (RelayConfigAdv) AdvertisementFactory.newAdvertisement(param);
-            }
-        } catch (Exception failure) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Problem reading relay configuration", failure);
-            }
-        }
-
-        if (null == relayConfig) {
-            if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-                LOG.config("Relay Config advertisement missing, making a new one.");
-            }
-
-            // restore default values.
-            relayConfig = (RelayConfigAdv) AdvertisementFactory.newAdvertisement(RelayConfigAdv.getAdvertisementType());
-
-            // Enable relay if any transport doesn't support incoming.
-            if (!tcpAdv.isServerEnabled() || !httpAdv.isServerEnabled()) {
-                relayConfig.setClientEnabled(true);
-            }
-        }
-
-        /*
-         if( (0 == relayConfig.getSeedingURIs().length) && (0 == relayConfig.getSeedRelays().length) && !relayConfig.isServerEnabled() ) {
-         // add the default relay seeding peer.
-         relayConfig.addSeedingURI( "http://rdv.jxtahosts.net/cgi-bin/relays.cgi?3" );
-         }
-         */
-
-        XMLDocument relayDoc = (XMLDocument) relayConfig.getDocument(MimeMediaType.XMLUTF8);
-
-        advertisement.putServiceParam(PeerGroup.relayProtoClassID, relayDoc);
-
-        // Check Rendezvous Configuration
-        RdvConfigAdv rdvAdv = null;
-
-        try {
-            XMLElement param = (XMLElement) advertisement.getServiceParam(PeerGroup.rendezvousClassID);
-
-            if (param != null) {
-                // XXX 20041027 backwards compatibility
-                param.addAttribute("type", RdvConfigAdv.getAdvertisementType());
-
-                rdvAdv = (RdvConfigAdv) AdvertisementFactory.newAdvertisement(param);
-            }
-        } catch (Exception failure) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Problem reading rendezvous configuration", failure);
-            }
-        }
-
-        if (null == rdvAdv) {
-            if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-                LOG.config("Rdv Config advertisement missing, making a new one.");
-            }
-
-            // restore default values.
-            rdvAdv = (RdvConfigAdv) AdvertisementFactory.newAdvertisement(RdvConfigAdv.getAdvertisementType());
-        }
-
-        /*
-         if( (0 == rdvAdv.getSeedingURIs().length) &&
-         (0 == rdvAdv.getSeedRendezvous().length) &&
-         (RdvConfigAdv.RendezVousConfiguration.RENDEZVOUS != rdvAdv.getConfiguration()) &&
-         (RdvConfigAdv.RendezVousConfiguration.AD_HOC != rdvAdv.getConfiguration()) &&
-         !relayConfig.isClientEnabled() ) {
-         // add the default rendezvous seeding peer if we don't know of any rendezvous, aren't a rendezvous ourselves, aren't in ad-hoc mode or using a relay.
-         rdvAdv.addSeedingURI( "http://rdv.jxtahosts.net/cgi-bin/rendezvous.cgi?3" );
-         }
-         */
-        XMLDocument rdvDoc = (XMLDocument) rdvAdv.getDocument(MimeMediaType.XMLUTF8);
-
-        advertisement.putServiceParam(PeerGroup.rendezvousClassID, rdvDoc);
-
-        // if no proxy param section, disable it.
-        XMLDocument proxy = (XMLDocument) advertisement.getServiceParam(PeerGroup.proxyClassID);
-
-        if (null == proxy) {
-            if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-                LOG.config("Proxy config advertisement missing, making a new one.");
-            }
-
-            proxy = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "Parm");
-            proxy.appendChild(proxy.createElement("isOff"));
-            advertisement.putServiceParam(PeerGroup.proxyClassID, proxy);
-        }
-
-        // Check the PSE Configuration
-        PSEConfigAdv pseConfig = null;
-
-        try {
-            XMLElement param = (XMLElement) advertisement.getServiceParam(PeerGroup.membershipClassID);
-
-            if (param != null) {
-                // XXX 20041027 backwards compatibility
-                param.addAttribute("type", PSEConfigAdv.getAdvertisementType());
-
-                pseConfig = (PSEConfigAdv) AdvertisementFactory.newAdvertisement(param);
-            }
-        } catch (Exception failure) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Problem reading pse configuration", failure);
-            }
-        }
-
-        if (null == pseConfig) {
-            if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-                LOG.config("PSE Config advertisement missing, making a new one.");
-            }
-
-            // restore default values.
-            pseConfig = (PSEConfigAdv) AdvertisementFactory.newAdvertisement(PSEConfigAdv.getAdvertisementType());
-            XMLDocument pseDoc = (XMLDocument) pseConfig.getDocument(MimeMediaType.XMLUTF8);
-
-            advertisement.putServiceParam(PeerGroup.membershipClassID, pseDoc);
-        }
-
-        // If we did not modify anything of importance or see anything wrong,
-        // leave the adv alone.
-
-        return reconf;
-    }
-
-    private boolean isValidInetAddress(String address) {
-        boolean found = false;
-        boolean loopback;
-
-        InetAddress[] ias;
-
-        try {
-            ias = InetAddress.getAllByName(address);
-        } catch (java.net.UnknownHostException notfound) {
-            return false;
-        }
-
-        for (Iterator la = IPUtils.getAllLocalAddresses(); la.hasNext() && !found;) {
-            for (InetAddress ia1 : ias) {
-                found |= ia1.equals(la.next());
-            }
-        }
-
-        loopback = true;
-
-        for (InetAddress ia1 : ias) {
-            loopback &= ia1.isLoopbackAddress();
-        }
-
-        return found || loopback;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/Boot.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/Boot.java
deleted file mode 100644 (file)
index d8f1fae..0000000
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
-Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.peergroup;
-
-
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.platform.NetworkManager;
-import net.jxta.platform.NetworkConfigurator;
-
-import java.util.logging.Logger;
-
-import java.io.File;
-import java.text.MessageFormat;
-import java.util.Collections;
-
-
-/**
- * A default "main" for starting JXTA.
- *
- * @deprecated This code is in no-way dependent upon the implementation and
- *             should not have been located here. Developers are encouraged to copy this
- *             source to their own projects. Consider using alternative JXTA "main"
- *             See NetworkManager tutorial </a>.
- */
-@Deprecated
-public class Boot {
-
-    /**
-     * main
-     *
-     * @param args command line arguments
-     */
-    public static void main(String args[]) {
-        // Name the main thread. For unknown reasons it usually has a boring name like "thread1"
-        Thread.currentThread().setName(Boot.class.getName() + ".main()");
-        
-        try {
-            boolean server;
-            // Get the optional location of the directory we should use for cache.
-            String jxta_home = System.getProperty("JXTA_HOME");
-            File home;
-            String instanceName;
-            
-            if (null != jxta_home) {
-                // Use the location from the older JXTA_HOME system property.
-                server = false;
-                instanceName = "BootCustom";
-                home = new File(jxta_home);
-            } else {
-                // Use the location defined by the newer role convention.
-                server = args.length > 0 && ("-server".equalsIgnoreCase(args[0]));
-                
-                if (server) {
-                    instanceName = "BootServer";
-                } else {
-                    instanceName = "BootEdge";
-                }
-                
-                home = new File(new File(".cache"), instanceName);
-            }
-            
-            // If the home directory doesn't exist, create it.
-            if (!home.exists()) {
-                home.mkdirs();
-            }
-
-            NetworkManager manager;
-
-            if (server) {
-                manager = new NetworkManager(NetworkManager.ConfigMode.SUPER, instanceName, home.toURI());
-
-                /*
-                 NetworkConfigurator config = manager.getConfigurator();
-
-                 //disable http
-                 config.setHttpEnabled(false);
-                 //disable seeding
-                 config.setRelaySeedURIs(Collections.<String>emptyList());
-                 config.setRendezvousSeedURIs(Collections.<String>emptyList());
-                 */
-            } else {
-                manager = new NetworkManager(NetworkManager.ConfigMode.EDGE, instanceName, home.toURI());
-            }
-            // register a <ctrl-c> hook
-            // manager.registerShutdownHook();
-
-            System.out.println(MessageFormat.format("Starting the JXTA platform in mode : {0}", manager.getMode()));
-            long startTime = System.currentTimeMillis();
-
-            manager.startNetwork();
-            System.out.println(
-                    MessageFormat.format("Boot started in {0} millis, in mode : {1}", System.currentTimeMillis() - startTime
-                    ,
-                    manager.getMode()));
-
-            PeerGroup netPeerGroup = manager.getNetPeerGroup();
-
-            netPeerGroup.startApp(null);
-
-            System.out.println(MessageFormat.format("Boot started in mode : {0}", manager.getMode()));
-            if (server) {
-                // Put this thread permanently to sleep so that JXTA keeps running.
-                Thread.sleep(Long.MAX_VALUE);
-            }
-        } catch (Throwable e) {
-            System.out.flush();
-            // make sure output buffering doesn't wreck console display.
-            System.err.println("Uncaught Throwable caught by 'main':");
-            e.printStackTrace(System.err);
-            System.exit(1);
-        } finally {
-            System.err.flush();
-            System.out.flush();
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/CompatibilityEquater.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/CompatibilityEquater.java
deleted file mode 100644 (file)
index 72a2ac9..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.peergroup;
-
-import net.jxta.document.Element;
-
-public interface CompatibilityEquater {
-
-    /**
-     * Evaluates if the given compatibility statement makes the module that
-     * bears it is lodable by this group.
-     *
-     * @param test the element to test
-     * @return boolean True if test is compatible with target.
-     */
-    public boolean compatible(Element test);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/ConfigDialog.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/ConfigDialog.java
deleted file mode 100644 (file)
index 285e3a8..0000000
+++ /dev/null
@@ -1,2022 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.peergroup;
-
-import java.awt.BorderLayout;
-import java.awt.Button;
-import java.awt.CardLayout;
-import java.awt.Checkbox;
-import java.awt.Choice;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.FlowLayout;
-import java.awt.Font;
-import java.awt.FontMetrics;
-import java.awt.Frame;
-import java.awt.Graphics;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.GridLayout;
-import java.awt.Insets;
-import java.awt.Label;
-import java.awt.Panel;
-import java.awt.TextField;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.ItemEvent;
-import java.awt.event.ItemListener;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-import java.net.InetAddress;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-import java.util.NoSuchElementException;
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.protocol.TransportAdvertisement;
-
-import net.jxta.exception.JxtaError;
-import net.jxta.exception.ConfiguratorException;
-
-import net.jxta.impl.endpoint.IPUtils;
-import net.jxta.impl.membership.pse.PSEUtils;
-import net.jxta.impl.protocol.HTTPAdv;
-import net.jxta.impl.protocol.PSEConfigAdv;
-import net.jxta.impl.protocol.PlatformConfig;
-import net.jxta.impl.protocol.RdvConfigAdv;
-import net.jxta.impl.protocol.RdvConfigAdv.RendezVousConfiguration;
-import net.jxta.impl.protocol.RelayConfigAdv;
-import net.jxta.impl.protocol.TCPAdv;
-
-/**
- * The standard and much loved AWT Configuration dialog
- */
-@SuppressWarnings("serial")
-public class ConfigDialog extends Frame {
-
-    static final GridBagConstraints stdConstr;
-    static final GridBagConstraints centerConstr;
-    static final GridBagConstraints centerLastConstr;
-    static final GridBagConstraints fillConstr;
-    static final GridBagConstraints fillInsetConstr;
-
-    static {
-        stdConstr = new GridBagConstraints();
-        stdConstr.gridwidth = GridBagConstraints.REMAINDER;
-        stdConstr.gridheight = 1;
-        stdConstr.gridx = 0;
-        stdConstr.gridy = GridBagConstraints.RELATIVE;
-        stdConstr.fill = GridBagConstraints.NONE;
-        stdConstr.weightx = 1;
-        stdConstr.anchor = GridBagConstraints.NORTHWEST;
-        stdConstr.insets = new Insets(0, 0, 0, 0);
-
-        fillConstr = (GridBagConstraints) stdConstr.clone();
-        fillConstr.fill = GridBagConstraints.HORIZONTAL;
-
-        centerConstr = (GridBagConstraints) stdConstr.clone();
-        centerConstr.anchor = GridBagConstraints.NORTH;
-
-        centerLastConstr = (GridBagConstraints) centerConstr.clone();
-        centerLastConstr.weighty = 1;
-
-        fillInsetConstr = (GridBagConstraints) fillConstr.clone();
-
-        fillInsetConstr.insets = new Insets(5, 5, 5, 5);
-    }
-
-    // A few widgets.
-
-    /**
-     * Grid Bag layout panel
-     */
-    static class PanelGBL extends Panel {
-
-        protected Insets insets = new Insets(0, 0, 0, 0);
-
-        GridBagLayout lay = new GridBagLayout();
-
-        private static final GridBagConstraints constrLabel = new GridBagConstraints();
-
-        static {
-            constrLabel.gridwidth = GridBagConstraints.REMAINDER;
-            constrLabel.gridheight = 1;
-            constrLabel.gridy = GridBagConstraints.RELATIVE;
-            constrLabel.weightx = 1;
-            constrLabel.weighty = 1;
-            constrLabel.anchor = GridBagConstraints.FIRST_LINE_START;
-            constrLabel.fill = GridBagConstraints.HORIZONTAL;
-        }
-
-        public PanelGBL(String label) {
-            this();
-            add(new Label(label, Label.LEFT), constrLabel);
-        }
-
-        public PanelGBL() {
-            super();
-            setLayout(lay);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public Insets getInsets() {
-            return insets;
-        }
-    }
-
-
-    /**
-     * A Grid Bag Panel with a border
-     */
-    static class BorderPanelGBL extends PanelGBL {
-
-        public static final int NONE = 0;
-        public static final int RAISED = 1;
-        public static final int LOWERED = 2;
-        public static final int GROOVE = 3;
-        public static final int BUMP = 4;
-
-        int style = GROOVE;
-        String title;
-        int ascent = 0;
-        int descent = 0;
-        int leading = 0;
-        int titleWidth = 0;
-
-        public BorderPanelGBL(String title) {
-            super();
-            this.title = title;
-        }
-
-        public BorderPanelGBL(String title, String advice) {
-            super(advice);
-            this.title = title;
-        }
-
-        public BorderPanelGBL(String title, String advice, int s) {
-            super(advice);
-            this.title = title;
-            if ((s < NONE) && (s > BUMP)) {
-                return;
-            }
-            if ((s == RAISED) || (s == LOWERED)) {
-                this.title = null;
-            }
-            style = s;
-        }
-
-        private void checkMetrics() {
-            Font font = getFont();
-
-            if ((title == null) || (font == null)) {
-                ascent = 2;
-            } else {
-                FontMetrics fmetrics = getFontMetrics(font);
-
-                ascent = fmetrics.getAscent();
-                descent = fmetrics.getDescent();
-                leading = fmetrics.getLeading();
-                titleWidth = fmetrics.stringWidth(title);
-            }
-            insets = new Insets(descent + ascent + leading + 2, 7, 7, 7);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public Insets getInsets() {
-            checkMetrics();
-            return insets;
-        }
-
-        private void paintLowered(Graphics g) {
-            checkMetrics();
-            if (ascent == 0) {
-                return;
-            }
-
-            Dimension d = getSize();
-
-            g.setColor(Color.black);
-            g.drawRect(1, ascent - 2, d.width - 4, d.height - ascent);
-            g.setColor(Color.white);
-            g.drawRect(2, ascent - 1, d.width - 4, d.height - ascent);
-            g.setColor(getBackground());
-            g.drawRect(2, ascent - 1, d.width - 5, d.height - ascent - 1);
-        }
-
-        private void paintRaised(Graphics g) {
-            checkMetrics();
-            if (ascent == 0) {
-                return;
-            }
-
-            Dimension d = getSize();
-
-            g.setColor(Color.white);
-            g.drawRect(1, ascent - 2, d.width - 4, d.height - ascent);
-            g.setColor(Color.black);
-            g.drawRect(2, ascent - 1, d.width - 4, d.height - ascent);
-            g.setColor(getBackground());
-            g.drawRect(2, ascent - 1, d.width - 5, d.height - ascent - 1);
-        }
-
-        private void paintGroove(Graphics g) {
-            checkMetrics();
-            if (ascent == 0) {
-                return;
-            }
-
-            Dimension d = getSize();
-
-            g.setColor(Color.black);
-            g.drawRect(1, ascent - 2, d.width - 4, d.height - ascent);
-            g.setColor(Color.white);
-            g.drawRect(2, ascent - 1, d.width - 4, d.height - ascent);
-
-            g.setColor(Color.white);
-            g.clearRect(10, 0, titleWidth + 6, descent + ascent + leading + 1);
-            g.drawString(title, 12, ascent + 1);
-            g.setColor(Color.black);
-            g.drawString(title, 13, ascent + 2);
-
-            // Work around a bug of at least the awt implem I'm using.
-            // A few wild pixels appear on that line during drawstring.
-            g.clearRect(0, 0, d.width, 1);
-        }
-
-        private void paintBump(Graphics g) {
-            checkMetrics();
-            if (ascent == 0) {
-                return;
-            }
-
-            Dimension d = getSize();
-
-            g.setColor(Color.white);
-            g.drawRect(1, ascent - 2, d.width - 4, d.height - ascent);
-            g.setColor(Color.black);
-            g.drawRect(2, ascent - 1, d.width - 4, d.height - ascent);
-
-            g.setColor(Color.white);
-            g.clearRect(10, 0, titleWidth + 6, descent + ascent + leading + 1);
-            g.drawString(title, 12, ascent + 1);
-            g.setColor(Color.black);
-            g.drawString(title, 13, ascent + 2);
-
-            // Work around a bug of at least the awt implem I'm using.
-            // A few wild pixels appear on that line during drawstring.
-            g.clearRect(0, 0, d.width, 1);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public void paint(Graphics g) {
-            switch (style) {
-                case GROOVE:
-                    paintGroove(g);
-                    break;
-
-                case BUMP:
-                    paintBump(g);
-                    break;
-
-                case RAISED:
-                    paintRaised(g);
-                    break;
-
-                case LOWERED:
-                    paintLowered(g);
-                    break;
-
-                default:
-            }
-            super.paint(g);
-        }
-    }
-
-
-    /**
-     * Panel implementing paged tabs.
-     */
-    static class PagesPanel extends Panel implements ActionListener {
-        private final CardLayout layout;
-        private final Panel pages;
-        private final Panel buttons;
-
-        public PagesPanel() {
-            super(new BorderLayout());
-            layout = new CardLayout();
-            pages = new Panel(layout);
-            buttons = new Panel(new FlowLayout(FlowLayout.LEFT, 0, 0));
-
-            add(pages, BorderLayout.CENTER);
-            add(buttons, BorderLayout.NORTH);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public void actionPerformed(ActionEvent e) {
-            layout.show(pages, e.getActionCommand());
-        }
-
-        public PanelGBL addPage(String buttonName, String comment) {
-            BorderPanelGBL p = new BorderPanelGBL(buttonName, comment, BorderPanelGBL.RAISED);
-
-            pages.add(p, buttonName);
-            Button b = new Button(buttonName);
-
-            buttons.add(b);
-            b.addActionListener(this);
-            return p;
-        }
-
-        public void showPage(String pageName) {
-            layout.show(pages, pageName);
-        }
-    }
-
-
-    /**
-     * Allows for entry of a host address and port number. Besides the host
-     * address and port number text fields there are two optional features:
-     * <p/>
-     * <p/><ul>
-     * <li>A checkbox with annotation to enable/disable the control.</li>
-     * <li>A label for the address.</li>
-     * </ul>
-     */
-    static class HostPortPanel extends Panel implements ItemListener {
-
-        private final Checkbox useMe;
-
-        private Label addressLabel = null;
-
-        private final TextField host;
-        private final TextField port;
-
-        HostPortPanel(String checkLabel, String addrLabel, String defaultHost, String defaultPort, boolean defaultState) {
-
-            super(new GridBagLayout());
-
-            useMe = new Checkbox(checkLabel, defaultState);
-            host = new TextField(defaultHost, 25);
-            port = new TextField(defaultPort, 6);
-
-            GridBagConstraints constraints = new GridBagConstraints();
-
-            constraints.weightx = 1.0;
-            constraints.weighty = 1.0;
-
-            constraints.gridx = 0;
-            constraints.gridy = 0;
-            constraints.gridwidth = (null == addrLabel) ? 2 : 3;
-            constraints.anchor = GridBagConstraints.FIRST_LINE_START;
-
-            if (null != checkLabel) {
-                add(useMe, constraints);
-                // if check label and addr label then use 2 lines.
-                if (null != addrLabel) {
-                    constraints.gridy++;
-                    constraints.gridx = 0;
-                    constraints.anchor = GridBagConstraints.LAST_LINE_START;
-                } else {
-                    constraints.gridx++;
-                    constraints.gridx = GridBagConstraints.RELATIVE;
-                }
-            }
-
-            if (null != addrLabel) {
-                constraints.gridwidth = 1;
-                addressLabel = new Label(addrLabel, Label.RIGHT);
-                add(addressLabel, constraints);
-            }
-
-            constraints.gridx = GridBagConstraints.RELATIVE;
-
-            add(host, constraints);
-            add(port, constraints);
-
-            setState(defaultState);
-            useMe.addItemListener(this);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public void itemStateChanged(ItemEvent e) {
-            setState(useMe.getState());
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public boolean getState() {
-            return useMe.getState() && isEnabled();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public void setEnabled(boolean enabling) {
-            super.setEnabled(enabling);
-
-            useMe.setEnabled(enabling);
-
-            if (null != addressLabel) {
-                addressLabel.setEnabled(useMe.getState());
-            }
-
-            host.setEnabled(useMe.getState());
-            port.setEnabled(useMe.getState());
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public void setState(boolean state) {
-            useMe.setState(state); // sometimes redundant but not always.
-
-            if (null != addressLabel) {
-                addressLabel.setEnabled(state);
-            }
-
-            host.setEnabled(state);
-            port.setEnabled(state);
-        }
-
-        /**
-         * Returns the value of the host field
-         *
-         * @return the value of the hot field
-         */
-        public String getHost() {
-            return host.getText().trim();
-        }
-
-        /**
-         * Returns the value of the port field
-         *
-         * @return the value of the port field
-         */
-        public String getPort() {
-            return port.getText().trim();
-        }
-    }
-
-
-    /**
-     * A list of URIs
-     */
-    static class HostListPanel extends Panel implements ActionListener {
-
-        private final String purpose;
-        private final TextField host;
-        private final TextField port;
-        private final java.awt.List list;
-        private final Label listLabel;
-
-        private final Button insert;
-        private final Button remove;
-
-        public HostListPanel(String purpose, String lstLabel, boolean defaultState, boolean showPort) {
-
-            super(new GridBagLayout());
-            this.purpose = purpose;
-
-            host = new TextField("", showPort ? 25 : 30);
-            if (showPort) {
-                port = new TextField("", 5);
-            } else {
-                port = null;
-            }
-            insert = new Button("+");
-            remove = new Button("-");
-
-            list = new java.awt.List(2, true);
-            listLabel = new Label(lstLabel);
-
-            GridBagConstraints c1 = new GridBagConstraints();
-
-            c1.gridx = 0;
-            c1.gridy = 0;
-            c1.anchor = GridBagConstraints.FIRST_LINE_START;
-            c1.fill = GridBagConstraints.NONE;
-            add(listLabel, c1);
-
-            c1.gridx = 0;
-            c1.gridy++;
-            if (!showPort) {
-                c1.gridwidth = 2;
-            }
-            c1.weightx = 2.0;
-            c1.anchor = GridBagConstraints.LINE_START;
-            c1.fill = GridBagConstraints.HORIZONTAL;
-            add(host, c1);
-
-            if (showPort) {
-                c1.weightx = 0.0;
-                c1.gridx = 1;
-                c1.anchor = GridBagConstraints.LINE_END;
-                c1.fill = GridBagConstraints.NONE;
-                add(port, c1);
-            }
-
-            c1.gridx = 0;
-            c1.gridy++;
-            c1.gridwidth = 1;
-            c1.weightx = 2.0;
-            c1.anchor = GridBagConstraints.LAST_LINE_START;
-            c1.fill = GridBagConstraints.HORIZONTAL;
-            add(list, c1);
-
-            Panel p2 = new Panel(new GridLayout(2, 1, 1, 1));
-
-            p2.add(insert);
-            p2.add(remove);
-
-            c1.gridx++;
-            c1.weightx = 0.0;
-            c1.anchor = GridBagConstraints.LAST_LINE_END;
-            c1.fill = GridBagConstraints.NONE;
-            c1.insets = new Insets(0, 4, 0, 1);
-            add(p2, c1);
-
-            host.addActionListener(this);
-            insert.addActionListener(this);
-            remove.addActionListener(this);
-            list.addActionListener(this);
-
-            setEnabled(defaultState);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public void setEnabled(boolean state) {
-            super.setEnabled(state);
-
-            listLabel.setEnabled(state);
-            host.setEnabled(state);
-            if (null != port) {
-                port.setEnabled(state);
-            }
-            list.setEnabled(state);
-            insert.setEnabled(state);
-            remove.setEnabled(state);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public boolean isEnabled() {
-            return listLabel.isEnabled();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public void actionPerformed(ActionEvent e) {
-            if ((insert == e.getSource()) || (host == e.getSource())) {
-                StringBuilder addHost = new StringBuilder(host.getText());
-
-                if (null != port) {
-                    String portText = port.getText().trim();
-
-                    if (portText.length() > 0) {
-                        // if( !verifyPort( "Host port", portText, false ) ) {
-                        // return;
-                        // }
-                        addHost.append(':');
-                        addHost.append(portText);
-                    }
-                }
-                if (addItem(addHost.toString())) {
-                    host.setText("");
-                    host.setCaretPosition(0);
-                    if (null != port) {
-                        port.setText("");
-                        port.setCaretPosition(0);
-                    }
-                }
-                return;
-            }
-
-            if (e.getSource() == remove) {
-                int[] sel = list.getSelectedIndexes();
-                int i = sel.length;
-
-                while (i-- > 0) {
-                    list.remove(sel[i]);
-                }
-
-                return;
-            }
-
-            // double click on a host in the list
-            if (e.getSource() == list) {
-                String cmd = e.getActionCommand();
-
-                if (null != port) {
-                    int colonAt = cmd.lastIndexOf(':');
-                    String newHost = cmd.substring(0, colonAt);
-                    String newPort = cmd.substring(colonAt + 1);
-
-                    host.setText(newHost);
-                    host.setCaretPosition(newHost.length());
-                    port.setText(newPort);
-                    port.setCaretPosition(newHost.length());
-                } else {
-                    host.setText(cmd);
-                    host.setCaretPosition(cmd.length());
-                }
-            }
-        }
-
-        public boolean addItem(String item) {
-            String hostURI = item.trim();
-
-            if (0 == hostURI.trim().length()) {
-                return false;
-            }
-
-            // See if it is "really" a URI.
-            try {
-                new URI(hostURI);
-            } catch (URISyntaxException failed) {
-                return false;
-            }
-
-            try {
-                while (true) {
-                    try {
-                        list.remove(hostURI);
-                    } catch (IllegalArgumentException notThere) {
-                        break;
-                    }
-                }
-
-                list.add(hostURI);
-            } catch (Exception e) {
-                return false;
-            }
-
-            return true;
-        }
-
-        public String getPurpose() {
-            return purpose;
-        }
-
-        public String[] getItems() {
-            return list.getItems();
-        }
-    }
-
-
-    /**
-     * An interface and port selection panel.
-     */
-    static class IfAddrPanel extends Panel implements ItemListener {
-        private final Checkbox manual;
-
-        private final CardLayout addrLayout;
-
-        private final Panel addrPanel;
-        private final TextField interfaceAddr;
-        private final TextField localPort;
-
-        private final Choice ips;
-
-        public IfAddrPanel(String defaultInterfaceAddr, String defaultPort) {
-
-            super(new FlowLayout(FlowLayout.LEADING, 0, 0));
-
-            ips = new Choice();
-            boolean modeManual = false;
-
-            ips.add("Any/All Local Addresses");
-
-            try {
-                Iterator<InetAddress> allIntf = IPUtils.getAllLocalAddresses();
-                boolean sawValid = false;
-
-                while (allIntf.hasNext()) {
-                    InetAddress anAddr = allIntf.next();
-
-                    if (IPUtils.LOOPBACK.equals(anAddr)) {
-                        continue;
-                    }
-
-                    ips.add(IPUtils.getHostAddress(anAddr));
-                    sawValid = true;
-                }
-
-                if (!sawValid) {
-                    modeManual = true;
-                }
-
-                // if an address was previously configured, switch to manual
-                // if we do not find any interface, switch to manual too.
-                if (defaultInterfaceAddr != null) {
-                    InetAddress defaultIntf = InetAddress.getByName(defaultInterfaceAddr);
-
-                    if (!IPUtils.ANYADDRESS.equals(defaultIntf)) {
-                        modeManual = true;
-
-                        // However, if this address is in the automatic list,
-                        // switch back to automatic and select it.
-                        allIntf = IPUtils.getAllLocalAddresses();
-
-                        while (allIntf.hasNext()) {
-                            InetAddress anAddr = allIntf.next();
-
-                            if (defaultIntf.equals(anAddr)) {
-                                modeManual = false;
-                                ips.select(defaultInterfaceAddr);
-                            }
-                        }
-                    }
-                }
-            } catch (Exception e) {
-                modeManual = true;
-            }
-
-            manual = new Checkbox("Manual", null, modeManual);
-            add(manual);
-            manual.addItemListener(this);
-
-            addrLayout = new CardLayout();
-            addrPanel = new Panel(addrLayout);
-
-            Panel autoPanel = new Panel(new FlowLayout(FlowLayout.LEADING));
-
-            autoPanel.add(ips);
-
-            Panel manPanel = new Panel(new FlowLayout(FlowLayout.LEADING));
-
-            interfaceAddr = new TextField(defaultInterfaceAddr, 20);
-            manPanel.add(interfaceAddr);
-
-            addrPanel.add(manPanel, "man");
-            addrPanel.add(autoPanel, "auto");
-
-            add(addrPanel);
-
-            localPort = new TextField(defaultPort, 6);
-            add(localPort);
-
-            setManual(modeManual);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        private void setManual(boolean manMode) {
-            addrLayout.show(addrPanel, manMode ? "man" : "auto");
-
-            this.validate();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public void setEnabled(boolean enabled) {
-            super.setEnabled(enabled);
-
-            manual.setEnabled(enabled);
-            ips.setEnabled(enabled);
-            interfaceAddr.setEnabled(enabled);
-            localPort.setEnabled(enabled);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public void itemStateChanged(ItemEvent e) {
-            if (e.getSource() == manual) {
-                setManual(manual.getState());
-            }
-        }
-
-        public String getAddress() {
-            if (manual.getState()) {
-                return interfaceAddr.getText().trim();
-            } else {
-                return ips.getSelectedItem().trim();
-            }
-        }
-
-        public String getPort() {
-            return localPort.getText().trim();
-        }
-
-        public String getMode() {
-            return manual.getState() ? "manual" : "auto";
-        }
-
-    }
-
-
-    static final class IPTptPanel extends BorderPanelGBL implements ItemListener {
-
-        enum TransportType {
-            TYPE_HTTP, TYPE_TCP
-        }
-
-
-        ;
-
-        private final Checkbox useMe;
-        private final Checkbox pubAddrOnly;
-        private final Checkbox multicast;
-        private final Checkbox clientEnabled;
-
-        private final IfAddrPanel ifAddr;
-        private final HostPortPanel publicAddr;
-
-        public IPTptPanel(TransportType type, boolean defaultState, String name, String defaultInterfaceAddr, String defaultPort, boolean clientState, boolean serverState, String defaultPublicAddr, String defaultPublicPort, boolean pubAddrOnlyState) {
-            this(type, defaultState, name, defaultInterfaceAddr, defaultPort, clientState, serverState, defaultPublicAddr
-                    ,
-                    defaultPublicPort, pubAddrOnlyState, false);
-        }
-
-        public IPTptPanel(TransportType type, boolean defaultState, String name, String defaultInterfaceAddr, String defaultPort, boolean clientState, boolean serverState, String defaultPublicAddr, String defaultPublicPort, boolean pubAddrOnlyState, boolean multicastState) {
-
-            super(name);
-
-            ifAddr = new IfAddrPanel(defaultInterfaceAddr, defaultPort);
-
-            useMe = new Checkbox("Enabled", null, defaultState);
-
-            if (type == TransportType.TYPE_TCP) {
-                multicast = new Checkbox("Multicast", null, multicastState);
-            } else {
-                multicast = null;
-            }
-
-            clientEnabled = new Checkbox("Enable Outgoing connections", null, clientState);
-
-            pubAddrOnly = new Checkbox("Hide private addresses", null, pubAddrOnlyState);
-
-            publicAddr = new HostPortPanel("Enable Incoming Connections", "(Optional) Public address", defaultPublicAddr
-                    ,
-                    defaultPublicPort, serverState);
-
-            GridBagConstraints constraints = new GridBagConstraints();
-
-            constraints.weightx = 1.0;
-            constraints.weighty = 1.0;
-
-            constraints.gridx = 0;
-            constraints.gridy = 1;
-            constraints.anchor = GridBagConstraints.FIRST_LINE_START;
-            add(useMe, constraints);
-
-            if (type == TransportType.TYPE_TCP) {
-                constraints.anchor = GridBagConstraints.FIRST_LINE_END;
-                add(multicast, constraints);
-            }
-
-            constraints.gridx = 0;
-            constraints.gridy++;
-            constraints.anchor = GridBagConstraints.LINE_START;
-            add(ifAddr, constraints);
-
-            constraints.gridx = 0;
-            constraints.gridy++;
-
-            constraints.anchor = GridBagConstraints.LINE_START;
-            add(clientEnabled, constraints);
-
-            constraints.anchor = GridBagConstraints.EAST;
-            add(pubAddrOnly, constraints);
-
-            constraints.gridx = 0;
-            constraints.gridy++;
-
-            constraints.anchor = GridBagConstraints.LINE_START;
-            add(publicAddr, constraints);
-            publicAddr.setState(serverState);
-
-            setState(defaultState);
-            useMe.addItemListener(this);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public void setState(boolean state) {
-            useMe.setState(state);
-            ifAddr.setEnabled(state);
-            publicAddr.setEnabled(state);
-            if (multicast != null) {
-                multicast.setEnabled(state);
-            }
-            clientEnabled.setEnabled(state);
-            pubAddrOnly.setEnabled(state);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public void itemStateChanged(ItemEvent e) {
-            setState(useMe.getState());
-        }
-
-        public String getInterfaceAddress() {
-            return ifAddr.getAddress().trim();
-        }
-
-        public String getConfigMode() {
-            return ifAddr.getMode();
-        }
-
-        public boolean getPubAddrOnly() {
-            return pubAddrOnly.getState();
-        }
-
-        public void setPubAddrOnly(boolean state) {
-            pubAddrOnly.setState(state);
-        }
-    }
-
-
-    /**
-     * Manages Peer Identity configuration
-     */
-    final class IdPanel extends Panel implements ActionListener {
-
-        private final TextField peerName;
-        private final TextField passwd;
-        private final TextField vpasswd;
-
-        public IdPanel(String defaultPeerName, boolean needSecurityConfig) {
-
-            super(new GridBagLayout());
-
-            peerName = new TextField(defaultPeerName, 20);
-
-            GridBagConstraints constraints = new GridBagConstraints();
-
-            constraints.gridx = 0;
-            constraints.gridy = 0;
-            constraints.anchor = GridBagConstraints.FIRST_LINE_END;
-            add(new Label("Peer Name", Label.RIGHT), constraints);
-
-            constraints.gridx++;
-            constraints.anchor = GridBagConstraints.FIRST_LINE_START;
-            add(peerName, constraints);
-
-            if (needSecurityConfig) {
-                passwd = new TextField("", 20);
-                vpasswd = new TextField("", 20);
-                passwd.setEchoChar('*');
-                vpasswd.setEchoChar('*');
-
-                constraints.gridx = 0;
-                constraints.gridy++;
-                constraints.anchor = GridBagConstraints.LINE_END;
-                add(new Label("Password", Label.RIGHT), constraints);
-
-                constraints.gridx++;
-                constraints.anchor = GridBagConstraints.LINE_START;
-                add(passwd, constraints);
-
-                constraints.gridx = 0;
-                constraints.gridy++;
-                constraints.anchor = GridBagConstraints.LINE_END;
-                add(new Label("Verify Password", Label.RIGHT), constraints);
-
-                constraints.gridx++;
-                constraints.anchor = GridBagConstraints.LINE_START;
-                add(vpasswd, constraints);
-            } else {
-                passwd = null;
-                vpasswd = null;
-            }
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public String getName() {
-            return peerName.getText().trim();
-        }
-
-        public String getPassword() {
-            return passwd.getText();
-        }
-
-        public String getVerifyPassword() {
-            return vpasswd.getText();
-        }
-
-        public void clearPasswords() {
-            passwd.setText("");
-            vpasswd.setText("");
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public void actionPerformed(ActionEvent e) {
-        }
-    }
-
-
-    /**
-     * Manages Service Enabling
-     */
-    final static class EnablingPanel extends BorderPanelGBL {
-
-        private final Checkbox isRelay;
-        private final Checkbox isRendezvous;
-        private final Checkbox isJxmeProxy;
-
-        EnablingPanel(boolean actAsRelay, boolean actAsRendezvous, boolean actAsJxmeProxy) {
-            super("Services Settings");
-
-            isRelay = new Checkbox("Act as a Relay", null, actAsRelay);
-            isRendezvous = new Checkbox("Act as a Rendezvous", null, actAsRendezvous);
-            isJxmeProxy = new Checkbox("Act as a JXME proxy", null, actAsJxmeProxy);
-
-            add(isRelay, stdConstr);
-            add(isRendezvous, stdConstr);
-            add(isJxmeProxy, stdConstr);
-        }
-    }
-
-
-    /**
-     * Manages Rendezvous service options
-     */
-    final static class RdvPanel extends BorderPanelGBL implements ItemListener {
-
-        private final Checkbox useRdv;
-        private final Checkbox useOnlySeeds;
-        private final HostListPanel seeding;
-        private final HostListPanel seeds;
-
-        RdvPanel(boolean useARdv, boolean onlySeeds) {
-            super("Rendezvous Settings");
-
-            useRdv = new Checkbox("Use a rendezvous", null, useARdv);
-            useOnlySeeds = new Checkbox("Use only configured seeds", null, onlySeeds);
-            seeds = new HostListPanel("Seeds", "Rendezvous seed peers", true, false);
-            seeding = new HostListPanel("Seeding", "Rendezvous seeding URIs", true, false);
-
-            GridBagConstraints c1 = new GridBagConstraints();
-
-            c1.gridx = 0;
-            c1.gridy = 0;
-            c1.anchor = GridBagConstraints.LINE_START;
-            add(useRdv, c1);
-            useRdv.addItemListener(this);
-
-            c1.gridx++;
-            c1.anchor = GridBagConstraints.LINE_END;
-            add(useOnlySeeds, c1);
-
-            c1.gridx = 0;
-            c1.gridy++;
-            c1.gridwidth = 2;
-            c1.weightx = 1.0;
-            c1.fill = GridBagConstraints.HORIZONTAL;
-            c1.anchor = GridBagConstraints.LINE_START;
-            add(seeding, c1);
-
-            c1.gridy++;
-            add(seeds, c1);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public void itemStateChanged(ItemEvent e) {
-            seeds.setEnabled(useRdv.getState());
-            seeding.setEnabled(useRdv.getState());
-            useOnlySeeds.setEnabled(useRdv.getState());
-        }
-    }
-
-
-    /**
-     * Manages relay service parameters
-     */
-    final static class RelayPanel extends BorderPanelGBL implements ItemListener {
-
-        private final Checkbox useRelay;
-        private final Checkbox useOnlySeeds;
-        private final HostListPanel seeding;
-        private final HostListPanel seeds;
-
-        public RelayPanel(boolean useARelay, boolean onlySeeds) {
-
-            super("Relay Settings");
-
-            useRelay = new Checkbox("Use a relay", null, useARelay);
-            useOnlySeeds = new Checkbox("Use only configured seeds", null, onlySeeds);
-            useOnlySeeds.setEnabled(useARelay);
-            seeds = new HostListPanel("Seeds", "Relay seed peers", useARelay, false);
-            seeding = new HostListPanel("Seeding", "Relay seeding URIs", useARelay, false);
-
-            GridBagConstraints c1 = new GridBagConstraints();
-
-            c1.gridx = 0;
-            c1.gridy = 0;
-            c1.anchor = GridBagConstraints.LINE_START;
-            add(useRelay, c1);
-            useRelay.addItemListener(this);
-
-            c1.gridx++;
-            c1.anchor = GridBagConstraints.LINE_END;
-            add(useOnlySeeds, c1);
-
-            c1.gridx = 0;
-            c1.gridy++;
-            c1.gridwidth = 2;
-            c1.weightx = 1.0;
-            c1.fill = GridBagConstraints.HORIZONTAL;
-            c1.anchor = GridBagConstraints.LINE_START;
-            add(seeding, c1);
-
-            c1.gridy++;
-            add(seeds, c1);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public void itemStateChanged(ItemEvent e) {
-            seeds.setEnabled(useRelay.getState());
-            seeding.setEnabled(useRelay.getState());
-            useOnlySeeds.setEnabled(useRelay.getState());
-        }
-    }
-
-    private final PlatformConfig configAdv;
-
-    private final Label helpLabel;
-    private final IdPanel idPanel;
-    private final EnablingPanel enablingPanel;
-    private final IPTptPanel tcpPanel;
-    private final IPTptPanel httpPanel;
-    private final RdvPanel rdvPanel;
-    private final RelayPanel relayPanel;
-
-    private final Button ok;
-    private final Button cancel;
-    private final PagesPanel pages = new PagesPanel();
-
-    boolean done = false;
-    boolean canceled = false;
-
-    String tcpMulticastAddr;
-    int tcpMulticastPort;
-    int tcpMulticastLength;
-
-    public ConfigDialog(PlatformConfig configAdv) throws ConfiguratorException {
-        super("JXTA Configurator");
-
-        this.configAdv = configAdv;
-
-        // Identity settings
-        String peerName = configAdv.getName();
-
-        if ((null == peerName) || (0 == peerName.trim().length())) {
-            peerName = "";
-        }
-
-        // Security settings
-        boolean needSecurityConfig = true;
-
-        // If security is already in place, then the security info is not shown.
-        XMLElement param = (XMLElement) configAdv.getServiceParam(PeerGroup.membershipClassID);
-
-        if (param != null) {
-            Advertisement adv = null;
-
-            try {
-                adv = AdvertisementFactory.newAdvertisement(param);
-            } catch (NoSuchElementException notAnAdv) {
-                ; // that's ok.
-            } catch (IllegalArgumentException badAdv) {
-                ; // that's ok.
-            }
-
-            if (adv instanceof PSEConfigAdv) {
-                PSEConfigAdv pseConfig = (PSEConfigAdv) adv;
-
-                // no certificate? That means we need to make one.
-                needSecurityConfig = (null == pseConfig.getCertificate());
-            }
-        }
-
-        // JXME Proxy Settings
-        boolean isJxmeProxy = false;
-
-        try {
-            param = (XMLElement) configAdv.getServiceParam(PeerGroup.proxyClassID);
-
-            if (param != null && configAdv.isSvcEnabled(PeerGroup.proxyClassID)) {
-                isJxmeProxy = true;
-            }
-        } catch (Exception nobigdeal) {
-            nobigdeal.printStackTrace();
-        }
-
-        int index;
-
-        // TCP Settings
-        boolean tcpEnabled;
-        boolean clientDefaultT;
-        boolean serverDefaultT;
-        String defaultInterfaceAddressT;
-        String defaultPortT;
-        String defaultServerNameT;
-        String defaultServerPortT;
-        boolean multicastEnabledT;
-        boolean noPublicAddressesT;
-
-        try {
-            param = (XMLElement) configAdv.getServiceParam(PeerGroup.tcpProtoClassID);
-
-            tcpEnabled = configAdv.isSvcEnabled(PeerGroup.tcpProtoClassID);
-
-            Enumeration<XMLElement> tcpChilds = param.getChildren(TransportAdvertisement.getAdvertisementType());
-
-            // get the TransportAdv from either TransportAdv or tcpAdv
-            if (tcpChilds.hasMoreElements()) {
-                param = tcpChilds.nextElement();
-            } else {
-                throw new IllegalStateException("Missing TCP Advertisment");
-            }
-
-            TCPAdv tcpAdv = (TCPAdv) AdvertisementFactory.newAdvertisement(param);
-
-            clientDefaultT = tcpAdv.isClientEnabled();
-            serverDefaultT = tcpAdv.isServerEnabled();
-
-            defaultInterfaceAddressT = tcpAdv.getInterfaceAddress();
-
-            if ((null == defaultInterfaceAddressT) || (0 == defaultInterfaceAddressT.trim().length())) {
-                defaultInterfaceAddressT = null;
-            }
-
-            defaultPortT = Integer.toString(tcpAdv.getPort());
-            if ((defaultPortT == null) || (0 == defaultPortT.trim().length())) {
-                defaultPortT = "9701";
-            }
-
-            defaultServerNameT = tcpAdv.getServer();
-
-            if ((null == defaultServerNameT) || (0 == defaultServerNameT.trim().length())) {
-                defaultServerNameT = "";
-            }
-
-            if (defaultServerNameT != null && (index = defaultServerNameT.lastIndexOf(":")) != -1) {
-                if ((0 == index) || (index == defaultServerNameT.length())) {
-                    throw new IllegalArgumentException("Bad TCP server name . Cannot proceed.");
-                }
-                defaultServerPortT = defaultServerNameT.substring(index + 1);
-                defaultServerNameT = defaultServerNameT.substring(0, index);
-            } else {
-                defaultServerNameT = "";
-                defaultServerPortT = "9701";
-            }
-
-            noPublicAddressesT = tcpAdv.getPublicAddressOnly();
-            multicastEnabledT = tcpAdv.getMulticastState();
-
-            // we will just pass these to save.
-            tcpMulticastAddr = tcpAdv.getMulticastAddr();
-            tcpMulticastPort = tcpAdv.getMulticastPort();
-            tcpMulticastLength = tcpAdv.getMulticastSize();
-        } catch (Exception failure) {
-            throw new ConfiguratorException("Broken Platform Config. Cannot proceed.", failure);
-        }
-
-        // HTTP Settings
-        boolean httpEnabled;
-        boolean clientDefaultH;
-        boolean serverDefaultH;
-        String defaultInterfaceAddressH;
-        String defaultPortH;
-        String defaultServerNameH;
-        String defaultServerPortH;
-        boolean noPublicAddressesH;
-
-        try {
-            param = (XMLElement) configAdv.getServiceParam(PeerGroup.httpProtoClassID);
-
-            httpEnabled = configAdv.isSvcEnabled(PeerGroup.httpProtoClassID);
-
-            Enumeration<XMLElement> httpChilds = param.getChildren(TransportAdvertisement.getAdvertisementType());
-
-            // get the TransportAdv from either TransportAdv
-            if (httpChilds.hasMoreElements()) {
-                param = httpChilds.nextElement();
-            } else {
-                throw new IllegalStateException("Missing HTTP Advertisment");
-            }
-
-            // Read-in the adv as it is now.
-            HTTPAdv httpAdv = (HTTPAdv) AdvertisementFactory.newAdvertisement(param);
-
-            clientDefaultH = httpAdv.isClientEnabled();
-            serverDefaultH = httpAdv.isServerEnabled();
-
-            defaultInterfaceAddressH = httpAdv.getInterfaceAddress();
-
-            if ((null == defaultInterfaceAddressH) || (0 == defaultInterfaceAddressH.trim().length())) {
-                defaultInterfaceAddressH = null;
-            }
-
-            defaultPortH = Integer.toString(httpAdv.getPort());
-
-            if ((defaultPortH == null) || (0 == defaultPortH.trim().length())) {
-                defaultPortH = "9700";
-            }
-
-            defaultServerNameH = httpAdv.getServer();
-
-            if ((null != defaultServerNameH) && (0 == defaultServerNameH.trim().length())) {
-                defaultServerNameH = "";
-            }
-
-            defaultServerPortH = "9700";
-
-            if (defaultServerNameH != null && (index = defaultServerNameH.lastIndexOf(":")) != -1) {
-                if ((0 == index) || (index == defaultServerNameH.length())) {
-                    throw new IllegalArgumentException("Bad HTTP server name. Cannot proceed.");
-                }
-                defaultServerPortH = defaultServerNameH.substring(index + 1);
-                defaultServerNameH = defaultServerNameH.substring(0, index);
-            } else {
-                defaultServerNameH = "";
-                defaultServerPortH = "9700";
-            }
-
-            noPublicAddressesH = httpAdv.getPublicAddressOnly();
-        } catch (Exception failure) {
-            throw new ConfiguratorException("Broken Platform Config. Cannot proceed.", failure);
-        }
-
-        // Rendezvous Settings
-        boolean isRendezvous;
-        boolean isAdhoc;
-        boolean onlySeeds;
-        List<String> seedRdvs = new ArrayList<String>();
-        List<String> seedingRdvs = new ArrayList<String>();
-
-        try {
-            RdvConfigAdv rdvConfigAdv;
-
-            param = (XMLElement) configAdv.getServiceParam(PeerGroup.rendezvousClassID);
-
-            rdvConfigAdv = (RdvConfigAdv) AdvertisementFactory.newAdvertisement(param);
-
-            isRendezvous = (RendezVousConfiguration.RENDEZVOUS == rdvConfigAdv.getConfiguration());
-
-            isAdhoc = (RendezVousConfiguration.AD_HOC == rdvConfigAdv.getConfiguration());
-
-            onlySeeds = rdvConfigAdv.getUseOnlySeeds();
-
-            for (URI uri : Arrays.asList(rdvConfigAdv.getSeedRendezvous())) {
-                seedRdvs.add(uri.toString());
-            }
-
-            for (URI uri1 : Arrays.asList(rdvConfigAdv.getSeedingURIs())) {
-                seedingRdvs.add(uri1.toString());
-            }
-        } catch (Exception failure) {
-            throw new ConfiguratorException("Broken Platform Config. Cannot proceed.", failure);
-        }
-
-        // Relay Settings
-        boolean isRelay;
-        boolean useRelay;
-        boolean useOnlySeedRelays;
-        List<String> seedRelays = new ArrayList<String>();
-        List<String> seedingRelays = new ArrayList<String>();
-
-        try {
-            param = (XMLElement) configAdv.getServiceParam(PeerGroup.relayProtoClassID);
-
-            RelayConfigAdv relayConfig = (RelayConfigAdv) AdvertisementFactory.newAdvertisement(param);
-
-            isRelay = relayConfig.isServerEnabled();
-
-            useRelay = relayConfig.isClientEnabled();
-
-            useOnlySeedRelays = relayConfig.getUseOnlySeeds();
-
-            for (EndpointAddress endpointAddress : Arrays.asList(relayConfig.getSeedRelays())) {
-                seedRelays.add(endpointAddress.toString());
-            }
-
-            for (URI uri : Arrays.asList(relayConfig.getSeedingURIs())) {
-                seedingRelays.add(uri.toString());
-            }
-        } catch (Exception failure) {
-            throw new ConfiguratorException("Broken Platform Config. Cannot proceed.", failure);
-        }
-
-        // BEGIN BUILDING UI
-
-        GridBagLayout layout = new GridBagLayout();
-
-        setLayout(layout);
-
-        addWindowListener(new WindowAdapter() {
-
-            @Override
-            public void windowClosing(WindowEvent e) {
-                beCanceled();
-            }
-        });
-
-        helpLabel = new Label("See \"http://jxta-jxse.dev.java.net/confighelp.html\" for config help", Label.CENTER);
-        helpLabel.setBackground(new Color(220, 220, 220));
-        helpLabel.setForeground(Color.black);
-
-        helpLabel.addMouseListener(new MouseAdapter() {
-
-            @Override
-            public void mouseClicked(MouseEvent e) {
-                helpLabel.setForeground(Color.black);
-                helpLabel.setText("See \"http://jxta-jxse.dev.java.net/confighelp.html\" for config help");
-            }
-        });
-
-        idPanel = new IdPanel(peerName, needSecurityConfig);
-
-        enablingPanel = new EnablingPanel(isRelay, isRendezvous, isJxmeProxy);
-
-        tcpPanel = new IPTptPanel(IPTptPanel.TransportType.TYPE_TCP, tcpEnabled, "TCP Settings", defaultInterfaceAddressT,
-                defaultPortT, clientDefaultT, serverDefaultT, defaultServerNameT, defaultServerPortT, noPublicAddressesT,
-                multicastEnabledT);
-
-        httpPanel = new IPTptPanel(IPTptPanel.TransportType.TYPE_HTTP, httpEnabled, "HTTP Settings", defaultInterfaceAddressH,
-                defaultPortH, clientDefaultH, serverDefaultH, defaultServerNameH, defaultServerPortH, noPublicAddressesH);
-
-        rdvPanel = new RdvPanel(!isAdhoc, onlySeeds);
-
-        // add the relays
-
-        for (Object seedRdv : seedRdvs) {
-            rdvPanel.seeds.addItem((String) seedRdv);
-        }
-
-        for (Object seedingRdv : seedingRdvs) {
-            rdvPanel.seeding.addItem((String) seedingRdv);
-        }
-
-        relayPanel = new RelayPanel(useRelay, useOnlySeedRelays);
-
-        // add the relays
-        for (Object seedRelay : seedRelays) {
-            relayPanel.seeds.addItem((String) seedRelay);
-        }
-
-        for (Object seedingRelay : seedingRelays) {
-            relayPanel.seeding.addItem((String) seedingRelay);
-        }
-
-        ok = new Button("  OK  ");
-
-        ok.addActionListener(new ActionListener() {
-            public void actionPerformed(ActionEvent e) {
-                if (verifyInput()) {
-                    if (saveValues()) {
-                        beDone();
-                    } else {
-                        beCanceled();
-                    }
-                }
-            }
-        });
-
-        cancel = new Button("Cancel");
-        cancel.addActionListener(new ActionListener() {
-            public void actionPerformed(ActionEvent e) {
-                beCanceled();
-            }
-        });
-
-        Panel okPanel = new Panel();
-
-        okPanel.add(ok);
-        okPanel.add(cancel);
-
-        // build basic panel
-        Panel basicsPanel = pages.addPage("Basic", "Basic settings");
-
-        GridBagConstraints centerWConstr = (GridBagConstraints) centerConstr.clone();
-
-        centerWConstr.weighty = 1;
-
-        basicsPanel.add(idPanel, centerWConstr);
-
-        // build Advanced panel
-        Panel advancedPanel = pages.addPage("Advanced", "Experienced Users Only");
-
-        advancedPanel.add(enablingPanel, fillInsetConstr);
-        advancedPanel.add(tcpPanel, fillInsetConstr);
-        advancedPanel.add(httpPanel, fillInsetConstr);
-
-        Panel proxyRdvRelayPanel = pages.addPage("Rendezvous/Relays", "Experienced Users Only");
-
-        proxyRdvRelayPanel.add(rdvPanel, fillInsetConstr);
-        proxyRdvRelayPanel.add(relayPanel, fillInsetConstr);
-
-        add(helpLabel, fillConstr);
-        add(pages, fillInsetConstr);
-        add(okPanel, centerLastConstr);
-
-        pack();
-        setVisible(true);
-    }
-
-    public synchronized boolean untilDone() {
-        try {
-            while (!done) {
-                wait();
-            }
-        } catch (InterruptedException e) {
-            Thread.interrupted();
-        }
-
-        if (canceled) {
-            throw new JxtaError("Canceled during configuration");
-        }
-        return (done);
-    }
-
-    private synchronized boolean beDone() {
-        done = true;
-        notify();
-        dispose();
-
-        return canceled;
-    }
-
-    private synchronized boolean beCanceled() {
-        canceled = true;
-        done = true;
-        notify();
-        dispose();
-
-        return canceled;
-    }
-
-    private boolean verifyPort(String portName, String ports, boolean dynamicok) {
-        int p1;
-
-        if ((null == ports) || (0 == ports.trim().length())) {
-            ports = "0";
-        }
-
-        try {
-            p1 = Integer.parseInt(ports);
-        } catch (Exception ex) {
-            helpLabel.setForeground(Color.red.darker());
-            helpLabel.setText(portName + " port number must be an integer: " + ports);
-            return false;
-        }
-        if ((p1 > 65535) || (p1 < (dynamicok ? 0 : 1))) {
-            helpLabel.setForeground(Color.red.darker());
-            helpLabel.setText(
-                    portName + " port number must be an integer between " + (dynamicok ? "0" : "1") + " and 65535, found " + p1);
-            return false;
-        }
-        return true;
-    }
-
-    private boolean verifyAddr(String proto, boolean serverOn, String localPort, String publicAddress, String publicPort) {
-
-        // if a public name is specified, check its port.
-        if (serverOn && (publicAddress.length() > 0)) {
-            if (!verifyPort(proto + " local", localPort, false)) {
-                helpLabel.setForeground(Color.red.darker());
-                helpLabel.setText("Dynamic tcp port selection not supported when server public address is specified.");
-                pages.showPage("Advanced");
-                return false;
-            }
-
-            if (!verifyPort(proto + " public", publicPort, false)) {
-                pages.showPage("Advanced");
-                helpLabel.setForeground(Color.red.darker());
-                helpLabel.setText("Dynamic tcp port selection not supported for server public address.");
-                return false;
-            }
-        } else if (!verifyPort(proto + " local", localPort, true)) {
-            pages.showPage("Advanced");
-            return false;
-        }
-
-        return true;
-    }
-
-    private boolean verifyInput() {
-
-        if (0 == idPanel.getName().trim().length()) {
-            helpLabel.setForeground(Color.red.darker());
-            helpLabel.setText("A peer name is required.");
-            pages.showPage("Basic");
-            return false;
-        }
-
-        // Verify security parameters if we are not initialized
-        // Password and principal
-        if (null != idPanel.passwd) {
-            String passwd = idPanel.getPassword();
-            String vpasswd = idPanel.getVerifyPassword();
-
-            // Verify password
-            // must be at least 8 chars a la unix
-            if (passwd.length() < 8) {
-                // Clear password text boxes
-                idPanel.clearPasswords();
-
-                helpLabel.setForeground(Color.red.darker());
-                helpLabel.setText("Passwords must be at least 8 characters");
-                pages.showPage("Basic");
-                return false;
-            }
-
-            // must be identical
-            if (!passwd.equals(vpasswd)) {
-                // Clear password text boxes
-                idPanel.clearPasswords();
-
-                helpLabel.setForeground(Color.red.darker());
-                helpLabel.setText("Password does not match Verify Password");
-                pages.showPage("Basic");
-                return false;
-            }
-        }
-
-        // make sure *some* transport is enabled.
-        if ((!(httpPanel.useMe.getState())) && (!(tcpPanel.useMe.getState()))) {
-            helpLabel.setForeground(Color.red.darker());
-            helpLabel.setText("At least one of TCP or HTTP must be enabled.");
-            pages.showPage("Advanced");
-            return false;
-        }
-
-        // http settings
-        if (httpPanel.useMe.getState()) {
-            // make sure at least incoming or outgoing enabled.
-            if (!httpPanel.clientEnabled.getState() && !httpPanel.publicAddr.getState()) {
-                helpLabel.setForeground(Color.red.darker());
-                helpLabel.setText("Must enable incoming and/or outcoming to enable HTTP");
-                pages.showPage("Advanced");
-                return false;
-            }
-
-            // Check the http port fields.
-            boolean valid = verifyAddr("HTTP", httpPanel.publicAddr.getState(), httpPanel.ifAddr.getPort(),
-                    httpPanel.publicAddr.getHost(), httpPanel.publicAddr.getPort());
-
-            if (!valid) {
-                return false;
-            }
-        }
-
-        // tcp settings
-        if (tcpPanel.useMe.getState()) {
-            // make sure at least incoming or outgoing enabled.
-            if (!tcpPanel.clientEnabled.getState() && !tcpPanel.publicAddr.getState() && !tcpPanel.multicast.getState()) {
-                helpLabel.setForeground(Color.red.darker());
-                helpLabel.setText("Must enable at least one of incoming, outcoming or multicast to enable TCP");
-                pages.showPage("Advanced");
-                return false;
-            }
-
-            // Check the tcp port fields.
-            boolean valid = verifyAddr("TCP", tcpPanel.publicAddr.getState(), tcpPanel.ifAddr.getPort(),
-                    tcpPanel.publicAddr.getHost(), tcpPanel.publicAddr.getPort());
-
-            if (!valid) {
-                return false;
-            }
-        }
-
-        if (!relayPanel.useRelay.getState() && (!httpPanel.useMe.getState() || !httpPanel.publicAddr.getState())
-                && (!tcpPanel.useMe.getState() || !tcpPanel.publicAddr.getState())) {
-            helpLabel.setForeground(Color.red.darker());
-            helpLabel.setText("Must use Relay if incoming not enabled for TCP and/or HTTP");
-            pages.showPage("Relay/Rendezvous");
-            return false;
-        }
-
-        if (enablingPanel.isRelay.getState() && (!httpPanel.useMe.getState() || !httpPanel.publicAddr.getState())
-                && (!tcpPanel.useMe.getState() || !tcpPanel.publicAddr.getState())) {
-            helpLabel.setForeground(Color.red.darker());
-            helpLabel.setText("Must enable incoming for TCP and/or HTTP to enable Relay");
-            pages.showPage("Advanced");
-            return false;
-        }
-
-        if (enablingPanel.isRendezvous.getState() && (!httpPanel.useMe.getState() || !httpPanel.publicAddr.getState())
-                && (!tcpPanel.useMe.getState() || !tcpPanel.publicAddr.getState())) {
-            helpLabel.setForeground(Color.red.darker());
-            helpLabel.setText("Must enable incoming for TCP and/or HTTP to enable Rendezvous");
-            pages.showPage("Advanced");
-            return false;
-        }
-
-        // if use only seeds is specified then at least one seed must be
-        // provided.
-        if (rdvPanel.useOnlySeeds.getState()) {
-            String[] rdvAddrs = rdvPanel.seeds.getItems();
-
-            String[] rdvSeedAddrs = rdvPanel.seeding.getItems();
-
-            if ((rdvAddrs.length == 0) && (rdvSeedAddrs.length == 0)) {
-                helpLabel.setForeground(Color.red.darker());
-                helpLabel.setText("Must provide at least one seed rendezvous");
-                pages.showPage("Rendezvous/Relays");
-                return false;
-            }
-        }
-
-        // if relay is to be used, make sure we have atleast one relay
-        // addr for the enabled transport(s)
-        if (relayPanel.useRelay.getState()) {
-            String[] relayaddrs = relayPanel.seeds.getItems();
-
-            String[] relaySeedaddrs = relayPanel.seeding.getItems();
-
-            if ((relayaddrs.length == 0) && (relaySeedaddrs.length == 0)) {
-                helpLabel.setForeground(Color.red.darker());
-                helpLabel.setText("Must provide at least one seed Relay address");
-                pages.showPage("Rendezvous/Relays");
-                return false;
-            }
-        }
-
-        return true;
-    }
-
-    /*
-     * Updates the PlatformConfig Advertisement
-     */
-    private boolean saveValues() {
-        try {
-            // set the peer name
-            configAdv.setName(idPanel.getName());
-
-            // Save the http config
-            HTTPAdv httpAdv = (HTTPAdv) AdvertisementFactory.newAdvertisement(HTTPAdv.getAdvertisementType());
-
-            httpAdv.setConfigMode(httpPanel.getConfigMode());
-
-            String chosenIntf = httpPanel.getInterfaceAddress();
-
-            if (chosenIntf.startsWith("A")) {
-                httpAdv.setInterfaceAddress(null);
-            } else {
-                httpAdv.setInterfaceAddress(chosenIntf);
-            }
-
-            httpAdv.setPort(Integer.parseInt(httpPanel.ifAddr.getPort()));
-
-            httpAdv.setClientEnabled(httpPanel.clientEnabled.getState());
-
-            httpAdv.setServerEnabled(httpPanel.publicAddr.getState());
-
-            // If there's nothing interesting inthere, do not save it.
-            if (0 == httpPanel.publicAddr.getHost().trim().length()) {
-                httpAdv.setServer(null);
-            } else {
-                httpAdv.setServer(httpPanel.publicAddr.getHost() + ":" + httpPanel.publicAddr.getPort());
-            }
-
-            httpAdv.setPublicAddressOnly(httpPanel.getPubAddrOnly());
-
-            configAdv.putServiceParam(PeerGroup.httpProtoClassID, wrapParm(httpAdv, httpPanel.useMe.getState()));
-
-            // Save tcp configuration
-            TCPAdv tcpAdv = (TCPAdv) AdvertisementFactory.newAdvertisement(TCPAdv.getAdvertisementType());
-
-            tcpAdv.setConfigMode(tcpPanel.getConfigMode());
-
-            chosenIntf = tcpPanel.getInterfaceAddress();
-            if (chosenIntf.startsWith("A")) {
-                tcpAdv.setInterfaceAddress(null);
-            } else {
-                tcpAdv.setInterfaceAddress(chosenIntf);
-            }
-
-            try {
-                int theTcpPort = Integer.parseInt(tcpPanel.ifAddr.getPort());
-
-                tcpAdv.setPort(theTcpPort);
-                if (0 == theTcpPort) {
-                    tcpAdv.setStartPort(0);
-                    tcpAdv.setEndPort(0);
-                }
-            } catch (NumberFormatException ignored) {
-                /* verifyInput already checked it */
-            }
-
-            tcpAdv.setClientEnabled(tcpPanel.clientEnabled.getState());
-
-            tcpAdv.setServerEnabled(tcpPanel.publicAddr.getState());
-
-            if (0 == tcpPanel.publicAddr.getHost().trim().length()) {
-                tcpAdv.setServer(null);
-            } else {
-                tcpAdv.setServer(tcpPanel.publicAddr.getHost() + ":" + tcpPanel.publicAddr.getPort());
-            }
-
-            tcpAdv.setMulticastState(tcpPanel.multicast.getState());
-            tcpAdv.setMulticastAddr(tcpMulticastAddr);
-            tcpAdv.setMulticastPort(tcpMulticastPort);
-            tcpAdv.setMulticastSize(tcpMulticastLength);
-
-            tcpAdv.setPublicAddressOnly(tcpPanel.getPubAddrOnly());
-
-            configAdv.putServiceParam(PeerGroup.tcpProtoClassID, wrapParm(tcpAdv, tcpPanel.useMe.getState()));
-
-            // save the proxy service settings
-            XMLDocument proxy = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "Parm");
-
-            if (!enablingPanel.isJxmeProxy.getState()) {
-                proxy.appendChild(proxy.createElement("isOff"));
-            }
-
-            configAdv.putServiceParam(PeerGroup.proxyClassID, proxy);
-
-            // Save the Rendezvous Configuration
-            RdvConfigAdv rdvConf = (RdvConfigAdv) AdvertisementFactory.newAdvertisement(RdvConfigAdv.getAdvertisementType());
-
-            rdvConf.setConfiguration(
-                    enablingPanel.isRendezvous.getState() ? RendezVousConfiguration.RENDEZVOUS :
-                            rdvPanel.useRdv.getState() ? RendezVousConfiguration.EDGE : RendezVousConfiguration.AD_HOC);
-            rdvConf.setUseOnlySeeds(rdvPanel.useOnlySeeds.getState());
-
-            for (String s2 : Arrays.asList(rdvPanel.seeds.getItems())) {
-                rdvConf.addSeedRendezvous(s2);
-            }
-
-            for (String s3 : Arrays.asList(rdvPanel.seeding.getItems())) {
-                rdvConf.addSeedingURI(s3);
-            }
-
-            XMLDocument rdvDoc = (XMLDocument) rdvConf.getDocument(MimeMediaType.XMLUTF8);
-
-            configAdv.putServiceParam(PeerGroup.rendezvousClassID, rdvDoc);
-
-            // save the relay settings
-            RelayConfigAdv relayConfig = (RelayConfigAdv) AdvertisementFactory.newAdvertisement(
-                    RelayConfigAdv.getAdvertisementType());
-
-            relayConfig.setServerEnabled(enablingPanel.isRelay.getState());
-            relayConfig.setClientEnabled(relayPanel.useRelay.getState());
-
-            for (String s : Arrays.asList(relayPanel.seeds.getItems())) {
-                relayConfig.addSeedRelay(s);
-            }
-
-            for (String s1 : Arrays.asList(relayPanel.seeding.getItems())) {
-                relayConfig.addSeedingURI(s1);
-            }
-
-            relayConfig.setUseOnlySeeds(relayPanel.useOnlySeeds.getState());
-
-            XMLDocument relayDoc = (XMLDocument) relayConfig.getDocument(MimeMediaType.XMLUTF8);
-
-            // check if the relay service should be disabled completely
-            boolean relayDisabled = (!enablingPanel.isRelay.getState() && !relayPanel.useRelay.getState());
-
-            if (relayDisabled) {
-                relayDoc.appendChild(relayDoc.createElement("isOff"));
-            }
-
-            configAdv.putServiceParam(PeerGroup.relayProtoClassID, relayDoc);
-
-            // Save the security configuration parameters
-            // If we initialized security
-            // Otherwise they come from the security login dialog
-            if (null != idPanel.passwd) {
-                PSEConfigAdv pseConf = (PSEConfigAdv) AdvertisementFactory.newAdvertisement(PSEConfigAdv.getAdvertisementType());
-
-                PSEUtils.IssuerInfo info = PSEUtils.genCert(idPanel.getName(), null);
-
-                pseConf.setCertificate(info.cert);
-                pseConf.setPrivateKey(info.subjectPkey, idPanel.getPassword().toCharArray());
-
-                XMLDocument pseDoc = (XMLDocument) pseConf.getDocument(MimeMediaType.XMLUTF8);
-
-                configAdv.putServiceParam(PeerGroup.membershipClassID, pseDoc);
-            }
-        } catch (Throwable bad) {
-            bad.printStackTrace();
-            return false;
-        }
-
-        return true;
-    }
-
-    private XMLDocument wrapParm(Advertisement srcAdv, boolean enabled) {
-        try {
-            XMLDocument advDoc = (XMLDocument) srcAdv.getDocument(MimeMediaType.XMLUTF8);
-
-            XMLDocument doc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "Parm");
-
-            StructuredDocumentUtils.copyElements(doc, doc, advDoc);
-            if (!enabled) {
-                doc.appendChild(doc.createElement("isOff"));
-            }
-
-            return doc;
-        } catch (Throwable ez1) {
-            ez1.printStackTrace();
-            return null;
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/DefaultConfigurator.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/DefaultConfigurator.java
deleted file mode 100644 (file)
index ed74338..0000000
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.peergroup;
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.XMLDocument;
-import net.jxta.exception.ConfiguratorException;
-import net.jxta.exception.JxtaError;
-import net.jxta.impl.protocol.PSEConfigAdv;
-import net.jxta.impl.protocol.PlatformConfig;
-import net.jxta.logging.Logging;
-import net.jxta.peergroup.PeerGroup;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.URI;
-import java.util.NoSuchElementException;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * This implementation provides the ability to reconfigure a JXTA PlatformConfig
- * via an AWT based dialog. This is the original JXTA configuration mechanism.
- */
-public class DefaultConfigurator extends AutomaticConfigurator {
-
-    /**
-     * logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(DefaultConfigurator.class.getName());
-
-    /**
-     * Configures the platform using the specified directory.
-     *
-     * @param jxtaHome store home URI
-     * @throws net.jxta.exception.ConfiguratorException
-     *          if a configuration error occurs
-     */
-    public DefaultConfigurator(URI jxtaHome) throws ConfiguratorException {
-        super(jxtaHome);
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * <p/>Kinda hackish in that we don't really do anything if home is not a file.
-     */
-    @Override
-    public boolean isReconfigure() {
-        if (!"file".equalsIgnoreCase(jxtaHome.getScheme())) {
-            return false;
-        }
-
-        File jxtaHomeDir = new File(jxtaHome);
-        try {
-            boolean forceReconfig;
-            File file = new File(jxtaHomeDir, "reconf");
-            forceReconfig = file.exists();
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("force reconfig : " + forceReconfig);
-            }
-
-            return forceReconfig;
-        } catch (Exception ex1) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Could not check \'reconf\' file. Assuming it exists.", ex1);
-            }
-            if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-                LOG.config("Reconfig required - error getting \'reconf\' file");
-            }
-            return true;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void setReconfigure(boolean reconfigure) {
-        if (!"file".equalsIgnoreCase(jxtaHome.getScheme())) {
-            return;
-        }
-
-        File jxtaHomeDir = new File(jxtaHome);
-        File f = new File(jxtaHomeDir, "reconf");
-
-        if (reconfigure) {
-            try {
-                f.createNewFile();
-            } catch (IOException ex1) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Could not create \'reconf\' file", ex1);
-                    LOG.severe("Create the file \'reconf\' by hand before retrying.");
-                }
-            }
-        } else {
-            try {
-                f.delete();
-            } catch (Exception ex1) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Could not remove \'reconf\' file", ex1);
-                    LOG.severe("Delete the file \'reconf\' by hand before retrying.");
-                }
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public PlatformConfig getPlatformConfig() throws ConfiguratorException {
-        boolean needsConfig = isReconfigure();
-
-        if (needsConfig && Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            LOG.config("Reconfig requested - Forced reconfigure");
-        }
-
-        try {
-            super.getPlatformConfig();
-
-            // Automatic configuration doesn't do any security config. We use
-            // this fact to decide if we must do configuration.
-            XMLDocument security = (XMLDocument) advertisement.getServiceParam(PeerGroup.membershipClassID);
-
-            if (null == security) {
-                needsConfig = true;
-
-                if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-                    LOG.config("Reconfig requested - No security info");
-                }
-            } else {
-                Advertisement adv = null;
-
-                try {
-                    adv = AdvertisementFactory.newAdvertisement(security);
-                } catch (NoSuchElementException notAnAdv) {// that's ok.
-                } catch (IllegalArgumentException badAdv) {// that's ok.
-                }
-
-                if (adv instanceof PSEConfigAdv) {
-                    PSEConfigAdv pseConfig = (PSEConfigAdv) adv;
-
-                    // no certificate? That means we need to make one.
-                    needsConfig |= (null == pseConfig.getCertificate());
-                } else {
-                    needsConfig = true;
-                }
-            }
-        } catch (IncompleteConfigurationException configBad) {
-            needsConfig = true;
-        }
-
-        if (needsConfig) {
-            setReconfigure(true);
-
-            try {
-                if (java.awt.EventQueue.isDispatchThread()) {
-                    LOG.severe("The JXTA AWT Configuration Dialog cannot be run from the event dispatch thread. It\'s modal nature is fundamentally incompatible with running on the event dispatch thread. Either change to a different Configurator via PeerGroupFactory.setConfiguratorClass() or start JXTA from the application main Thread before starting your GUI via invokeLater().");
-                    // cruel but fair, the alternative is a UI deadlock.
-                    System.exit(1);
-                }
-                ConfigDialog configUI = new ConfigDialog(advertisement);
-
-                configUI.untilDone();
-                setReconfigure(false);
-            } catch (Throwable t) {
-                if (t instanceof JxtaError) {
-                    throw (JxtaError) t;
-                }
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Could not initialize graphical config dialog", t);
-                }
-
-                BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
-
-                // clear any type-ahead
-                try {
-                    while (in.ready()) {
-                        in.readLine();
-                    }
-                } catch (Exception ignored) {// ignored
-                }
-
-                System.err.flush();
-                System.out.flush();
-                System.out.println("The window-based configurator does not seem to be usable.");
-                System.out.print("Do you want to stop and edit the current configuration ? [no]: ");
-                System.out.flush();
-                String answer = "no";
-
-                try {
-                    answer = in.readLine();
-                } catch (Exception ignored) {// ignored
-                }
-
-                // this will cover all the cases of the answer yes, while
-                // allowing non-gui/batch type scripts to load the platform
-                // see platform issue #45
-
-                if ("yes".equalsIgnoreCase(answer)) {
-                    save();
-                    System.out.println("Exiting; edit the file \"" + configFile.getPath()
-                            + "\", remove the file \"reconf\", and then launch JXTA again.");
-                    throw new JxtaError("Manual Configuration Requested");
-                } else {
-                    System.out.println("Attempting to continue using the current configuration.");
-                }
-            }
-        }
-        return advertisement;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/GenericPeerGroup.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/GenericPeerGroup.java
deleted file mode 100644 (file)
index 33c259b..0000000
+++ /dev/null
@@ -1,1720 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.peergroup;
-
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.Executor;
-import java.util.concurrent.ThreadPoolExecutor;
-import net.jxta.access.AccessService;
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Element;
-import net.jxta.document.XMLElement;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.exception.ProtocolNotSupportedException;
-import net.jxta.exception.ServiceNotFoundException;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.impl.loader.RefJxtaLoader;
-import net.jxta.impl.protocol.PSEConfigAdv;
-import net.jxta.impl.protocol.PlatformConfig;
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.logging.Logging;
-import net.jxta.membership.MembershipService;
-import net.jxta.peer.PeerID;
-import net.jxta.peer.PeerInfoService;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.pipe.PipeService;
-import net.jxta.platform.JxtaLoader;
-import net.jxta.platform.Module;
-import net.jxta.platform.ModuleClassID;
-import net.jxta.platform.ModuleSpecID;
-import net.jxta.protocol.ConfigParams;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.PeerGroupAdvertisement;
-import net.jxta.rendezvous.RendezVousService;
-import net.jxta.resolver.ResolverService;
-import net.jxta.service.Service;
-
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.lang.reflect.UndeclaredThrowableException;
-import java.net.URI;
-import java.net.URL;
-import java.security.cert.Certificate;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.RejectedExecutionHandler;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ScheduledThreadPoolExecutor;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Provides common services for most peer group implementations.
- */
-public abstract class GenericPeerGroup implements PeerGroup {
-    
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(GenericPeerGroup.class.getName());
-    
-    /**
-     *  Holder for configuration parameters for groups in the process of being created.
-     */
-    private final static Map<ID, ConfigParams> group_configs = Collections.synchronizedMap(new HashMap<ID, ConfigParams>());
-    
-    /**
-     * The loader - use the getter and setter for modifying the ClassLoader for
-     * a security manager.
-     * <p/>
-     * This should eventually be group scoped rather than implementation
-     * scoped. We are currently allowing classes to loaded into contexts which
-     * they should not be known.
-     */
-    private final static JxtaLoader loader = new RefJxtaLoader(new URL[0], new CompatibilityEquater() {
-        public boolean compatible(Element test) {
-            return StdPeerGroup.isCompatible(test);
-        }
-    });
-    
-    /*
-     * Shortcuts to well known services.
-     */
-    private EndpointService endpoint;
-    private ResolverService resolver;
-    private DiscoveryService discovery;
-    private PipeService pipe;
-    private MembershipService membership;
-    private RendezVousService rendezvous;
-    private PeerInfoService peerinfo;
-    private AccessService access;
-    
-    /**
-     * This peer's advertisement in this group.
-     */
-    private final PeerAdvertisement peerAdvertisement;
-    
-    /**
-     * This group's advertisement.
-     */
-    private PeerGroupAdvertisement peerGroupAdvertisement = null;
-    
-    /**
-     * This group's implAdvertisement.
-     */
-    protected ModuleImplAdvertisement implAdvertisement = null;
-    
-    /**
-     * This peer's config advertisement.
-     */
-    protected ConfigParams configAdvertisement = null;
-    
-    /**
-     * This service implements a group but, being a Service, it runs inside of
-     * some group. That's its home group.
-     * <p/>
-     * Exception: The platform peer group does not have a parent group. It
-     * has to be entirely self sufficient.
-     */
-    protected PeerGroup parentGroup = null;
-    
-    /**
-     * The location of our store
-     */
-    protected URI jxtaHome = null;
-    
-    /**
-     * The services that do the real work of the Peer Group.
-     */
-    private final Map<ModuleClassID, Service> services = new HashMap<ModuleClassID, Service>();
-    
-    /**
-     * {@code true} when we have decided to stop this group.
-     */
-    private volatile boolean stopping = false;
-    
-    /**
-     * {@code true} when the PG adv has been published.
-     */
-    private boolean published = false; // assume it hasn't
-    
-    /**
-     * Counts the number of times an interface to this group has been given out.
-     * This is decremented every time an interface object is GCed or
-     * its owner calls unref().
-     *
-     * <p/>When it reaches zero, if it is time to tear-down the group instance;
-     * nomatter what the GC thinks. There are threads that need to be stopped
-     * before the group instance object ever becomes un-reachable.
-     */
-    private int masterRefCount = 0;
-    
-    /**
-     * Is {@code true} when at least one interface object has been generated AFTER
-     * initComplete has become true. If true, the group stops when its ref
-     * count reaches zero.
-     */
-    private boolean stopWhenUnreferenced = false;
-    
-    /**
-     * Is set to {@code true} when {@code init()} is completed enough that it
-     * makes sense to perform ref-counting.
-     */
-    protected volatile boolean initComplete = false;
-    
-    /**
-     * The thread group in which threads created by this group or services of
-     * this group should live. The thread group is used primarily for debugging
-     * and classification purposes--we don't try to use any of the fancy (and
-     * mostly useless) ThreadGroup features.
-     */
-    private ThreadGroup threadGroup = null;
-        
-    /**
-     * The minimum number of Threads our Executor will reserve. Once started
-     * these Threads will remain.
-     *
-     * todo convert these hardcoded settings into group config params.
-     */
-    private final int COREPOOLSIZE = 5;
-
-    
-    /**
-     * The number of seconds that Threads above {@code COREPOOLSIZE} will
-     * remain idle before terminating.
-     *
-     * todo convert these hardcoded settings into group config params.
-     */
-    private final long KEEPALIVETIME = 15;
-
-    
-    /**
-     * The intended upper bound on the number of threads we will allow our 
-     * Executor to create. We will allow the pool to grow to twice this size if
-     * we run out of threads.
-     *
-     * todo convert these hardcoded settings into group config params.
-     */
-    private final int MAXPOOLSIZE = 100;
-
-    
-    /**
-     * Queue for tasks waiting to be run by our {@code Executor}.
-     */
-    private BlockingQueue<Runnable> taskQueue;
-
-    
-    /**
-     * The PeerGroup ThreadPool
-     */
-    private ThreadPoolExecutor threadPool;
-    
-    /**
-     * The PeerGroup ScheduledExecutor
-     */
-    private ScheduledThreadPoolExecutor scheduledExecutor;    
-
-    
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * We do not want to count on the invoker to properly unreference the group
-     * object that we return; this call is often used in a loop and it is silly
-     * to increment and decrement ref-counts for references that are sure to 
-     * live shorter than the referee.
-     * <p/>
-     * On the other hand it is dangerous for us to share our reference object to
-     * the parent group. That's where weak interface objects come in handy. We
-     * can safely make one and give it away.
-     */
-    public PeerGroup getParentGroup() {
-        if (parentGroup == null) {
-            return null;
-        }
-        return parentGroup.getWeakInterface();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public URI getStoreHome() {
-        return jxtaHome;
-    }
-    
-    /**
-     * Sets the root location for the store to be used by this peergroup.
-     * <p/>
-     * This should be set early in the peer group's life and then never
-     * changed.
-     *
-     * @param newHome The new store location.
-     */
-    protected void setStoreHome(URI newHome) {
-        jxtaHome = newHome;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public static JxtaLoader getJxtaLoader() {
-        return loader;
-    }
-    
-    public GenericPeerGroup() {
-        // Start building our peer adv.
-        peerAdvertisement = (PeerAdvertisement)
-                AdvertisementFactory.newAdvertisement(PeerAdvertisement.getAdvertisementType());
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {        
-        if (!(target instanceof PeerGroup)) {
-            return false;
-        }
-        
-        PeerGroup targetAsPeerGroup = (PeerGroup) target;
-        
-        // both null or both non-null.
-        if ((null == parentGroup) && (null != targetAsPeerGroup.getParentGroup())) {
-            return false;
-        }
-        
-        if ((null != parentGroup) && (null == targetAsPeerGroup.getParentGroup())) {
-            return false;
-        }
-        
-        if ((null != parentGroup) && !parentGroup.equals(targetAsPeerGroup.getParentGroup())) {
-            return false;
-        }
-        
-        // and same peer ids.
-        return getPeerGroupID().equals(targetAsPeerGroup.getPeerGroupID());
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        // before init we must fail.
-        if ((null == peerAdvertisement) || (null == getPeerGroupID())) {
-            throw new IllegalStateException("PeerGroup not sufficiently initialized");
-        }
-        
-        // XXX 20050907 bondolo including parentGroup would improve the hash.
-        return getPeerGroupID().hashCode();
-    }
-    
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * An implementation suitable for debugging. <b>Don't try to parse
-     * this string!</b> All of the information is available from other sources.
-     */
-    @Override
-    public String toString() {
-        if (null == getPeerGroupID()) {
-            return super.toString();
-        }
-        
-        StringBuilder result = new StringBuilder();
-        
-        result.append(getPeerGroupID().toString());
-        String peerGroupName = peerGroupAdvertisement.getName();
-
-        if (null != peerGroupName) {
-            result.append(" \"");
-            result.append(peerGroupName);
-            result.append('\"');
-        }
-        
-        result.append('[');
-        result.append(masterRefCount);
-        result.append(']');
-        
-        if (null != parentGroup) {
-            result.append(" / ");
-            result.append(parentGroup.toString());
-        }
-        
-        return result.toString();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public ThreadGroup getHomeThreadGroup() {
-        return threadGroup;
-    }
-    
-    /**
-     * Discover advertisements.
-     *
-     * @param discovery The discovery service to use.
-     * @param type      the Discovery advertisement type.
-     * @param attr      The attribute to search for or {@code null}.
-     * @param value     The attribute value to match or {@code null}.
-     * @param seconds   The number of seconds to search.
-     * @param thisClass The Advertisement class which the advertisement must
-     *                  match.
-     * @return a Collection of advertisements
-     */
-    private Collection<Advertisement> discoverSome(DiscoveryService discovery, int type, String attr, String value, int seconds, Class thisClass) {        
-        long discoverUntil = TimeUtils.toAbsoluteTimeMillis(seconds * TimeUtils.ASECOND);
-        long lastRemoteAt = 0; // no previous remote discovery made.
-        
-        List<Advertisement> results = new ArrayList<Advertisement>();
-        
-        try {
-            do {
-                Enumeration<Advertisement> res = discovery.getLocalAdvertisements(type, attr, value);
-
-                while (res.hasMoreElements()) {
-                    Advertisement a = res.nextElement();
-                    
-                    if (thisClass.isInstance(a)) {
-                        results.add(a);
-                    }
-                }
-                
-                if (!results.isEmpty()) {
-                    break;
-                }
-                
-                if (TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), lastRemoteAt) > (30 * TimeUtils.ASECOND)) {
-                    discovery.getRemoteAdvertisements(null, type, attr, value, 20);
-                    lastRemoteAt = TimeUtils.timeNow();
-                }
-                
-                // snooze waiting for responses to come in.
-                Thread.sleep(1000);
-            } while (TimeUtils.timeNow() < discoverUntil);
-        } catch (Exception whatever) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failure during discovery", whatever);
-            }
-        }
-        
-        return results;
-    }
-    
-    /**
-     * Discover an advertisement within the local peer group.
-     *
-     * @param type      the Discovery advertisement type.
-     * @param attr      The attribute to search for or {@code null}.
-     * @param value     The attribute value to match or {@code null}.
-     * @param seconds   The number of seconds to search.
-     * @param thisClass The Advertisement class which the advertisement must match.
-     * @return a Collection of advertisements
-     */
-    private Advertisement discoverOne(int type, String attr, String value, int seconds, Class thisClass) {        
-        Iterator<Advertisement> res = discoverSome(discovery, type, attr, value, seconds, thisClass).iterator();
-        
-        if (!res.hasNext()) {
-            return null;
-        }
-        return res.next();
-    }
-    
-    /**
-     * Shortcuts to the standard basic services.
-     *
-     * @param mcid    The Module Class ID of the service.
-     * @param service The service instance to set as the shortcut or
-     *                {@code null} to clear the shortcut.
-     */
-    private void setShortCut(ModuleClassID mcid, Service service) {
-        if (endpointClassID.equals(mcid)) {
-            endpoint = (EndpointService) service;
-            return;
-        }
-        if (resolverClassID.equals(mcid)) {
-            resolver = (ResolverService) service;
-            return;
-        }
-        if (discoveryClassID.equals(mcid)) {
-            discovery = (DiscoveryService) service;
-            return;
-        }
-        if (pipeClassID.equals(mcid)) {
-            pipe = (PipeService) service;
-            return;
-        }
-        if (membershipClassID.equals(mcid)) {
-            membership = (MembershipService) service;
-            return;
-        }
-        if (peerinfoClassID.equals(mcid)) {
-            peerinfo = (PeerInfoService) service;
-            return;
-        }
-        if (rendezvousClassID.equals(mcid)) {
-            rendezvous = (RendezVousService) service;
-            return;
-        }
-        if (accessClassID.equals(mcid)) {
-            access = (AccessService) service;
-        }
-    }
-    
-    /**
-     * Add a service to the collection of known services.
-     *
-     * @param mcid    The Module Class ID of the service.
-     * @param service The service instance to set as the shortcut or
-     */
-    protected synchronized void addService(ModuleClassID mcid, Service service) {
-        if (stopping) {
-            return;
-        }
-        
-        if (services.containsKey(mcid)) {
-            throw new IllegalStateException("Service" + mcid + " already registered.");
-        }
-        
-        services.put(mcid, service);
-        
-        setShortCut(mcid, service);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    synchronized public Service lookupService(ID mcid) throws ServiceNotFoundException {
-        Service p = services.get(mcid);
-        
-        if (p == null) {
-            throw new ServiceNotFoundException("Not found: " + mcid.toString());
-        }
-        
-        return p.getInterface();
-    }
-    
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Group implementations do not have to support mapping.
-     * it would be nice to separate better Interfaces, so that
-     * Interface Objects can do things that the real service does
-     * not have to implement.
-     */
-    public Service lookupService(ID mcid, int roleIndex) throws ServiceNotFoundException {
-        
-        // If the role number is != 0, it can't be honored: we
-        // do not have an explicit map.
-        
-        if (roleIndex != 0) {
-            throw new ServiceNotFoundException("Not found: " + mcid + "[" + roleIndex + "]");
-        }
-        
-        return lookupService(mcid);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public Iterator getRoleMap(ID name) {
-        // No translation; use the given name in a singleton.
-        return Collections.singletonList(name).iterator();
-    }
-    
-    /**
-     * check that all required core services are registered
-     *
-     * @throws ServiceNotFoundException If a required service was not found.
-     */
-    protected void checkServices() throws ServiceNotFoundException {
-        Service ignored;
-        
-        ignored = lookupService(endpointClassID);
-        ignored = lookupService(resolverClassID);
-        ignored = lookupService(membershipClassID);
-        ignored = lookupService(accessClassID);
-        
-        /**
-         * ignored = lookupService(discoveryClassID);
-         * ignored = lookupService(pipeClassID);
-         * ignored = lookupService(rendezvousClassID);
-         * ignored = lookupService(peerinfoClassID);
-         */
-    }
-    
-    /**
-     * Ask a group to unregister and unload a service
-     *
-     * @param mcid The service to be removed.
-     * @throws ServiceNotFoundException if service is not found
-     */
-    protected synchronized void removeService(ModuleClassID mcid) throws ServiceNotFoundException {
-        setShortCut(mcid, null);
-        
-        Service p = services.remove(mcid);
-        
-        if (p == null) {
-            throw new ServiceNotFoundException("Not found: " + mcid.toString());
-        }
-        
-        p.stopApp();
-        
-        // service.terminate(); FIXME. We probably need a terminate()
-        // method.
-        // FIXME: [jice@jxta.org 20011013] to make sure the service is
-        // no-longer referenced, we should always return interfaces, and
-        // have a way to cut the reference to the real service in the
-        // interfaces. One way of doing that would be to have to levels
-        // of indirection: we should keep one and return references to it.
-        // when we want to cut the service loose, we should clear the
-        // reference from the interface that we own before letting it go.
-        // We need to study the consequences of doing that before implementing
-        // it.
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public Module loadModule(ID assigned, Advertisement impl) throws ProtocolNotSupportedException, PeerGroupException {
-        return loadModule(assigned, (ModuleImplAdvertisement) impl, false);
-    }
-    
-    /**
-     * Load a Module from a ModuleImplAdv.
-     * <p/>
-     * Compatibility is checked and load is attempted. If compatible and
-     * loaded successfully, the resulting Module is initialized and returned.
-     * In most cases the other loadModule() method should be preferred, since
-     * unlike this one, it will seek many compatible implementation
-     * advertisements and try them all until one works. The home group of the new
-     * module (its' parent group if the new Module is a group) will be this group.
-     *
-     * @param assigned   Id to be assigned to that module (usually its ClassID).
-     * @param implAdv    An implementation advertisement for that module.
-     * @param privileged If {@code true} then the module is provided the true
-     *                   group obj instead of just an interface to the group object. This is
-     *                   normally used only for the group's defined services and applications.
-     * @return Module the module loaded and initialized.
-     * @throws ProtocolNotSupportedException The module is incompatible.
-     * @throws PeerGroupException            The module could not be loaded or initialized
-     */
-    protected Module loadModule(ID assigned, ModuleImplAdvertisement implAdv, boolean privileged) throws ProtocolNotSupportedException, PeerGroupException {
-        
-        Element compat = implAdv.getCompat();
-        
-        if (null == compat) {
-            throw new IllegalArgumentException("No compatibility statement for : " + assigned);
-        }
-        
-        if (!compatible(compat)) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Incompatible Module : " + assigned);
-            }
-            
-            throw new ProtocolNotSupportedException("Incompatible Module : " + assigned);
-        }
-        
-        Module newMod = null;
-        
-        if ((null != implAdv.getCode()) && (null != implAdv.getUri())) {
-            try {
-                // Good one. Try it.
-                Class<Module> clazz;
-                
-                try {
-                    clazz = (Class<Module>) loader.findClass(implAdv.getModuleSpecID());
-                } catch (ClassNotFoundException notLoaded) {
-                    clazz = (Class<Module>) loader.defineClass(implAdv);
-                }
-                
-                if (null == clazz) {
-                    throw new ClassNotFoundException("Cannot load class (" + implAdv.getCode() + ") : " + assigned);
-                }
-                
-                newMod = clazz.newInstance();
-                
-                newMod.init(privileged ? this : (PeerGroup) getInterface(), assigned, implAdv);
-                
-                if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                    LOG.info( "Loaded" + (privileged ? " privileged" : "") + 
-                            " module : " + implAdv.getDescription() + " (" + implAdv.getCode() + ")");
-                }
-            } catch (Exception ex) {
-                try {
-                    newMod.stopApp();
-                } catch (Throwable ignored) {
-                    // If this does not work, nothing needs to be done.
-                }
-                throw new PeerGroupException("Could not load module for : " + assigned + " (" + implAdv.getDescription() + ")", ex);
-            }            
-        } else {
-            String error;
-
-            if (null == implAdv.getCode()) {
-                error = "ModuleImpAdvertisement missing Code element";
-            } else if (null == implAdv.getUri()) {
-                error = "ModuleImpAdvertisement missing URI element";
-            } else {
-                error = "ModuleImpAdvertisement missing both Code and URI elements";
-            }
-            throw new PeerGroupException("Can not load module : " + error + " for" + assigned);
-        }
-        
-        // Publish or renew the lease of this adv since we're using it.
-        try {
-            if (discovery != null) {
-                discovery.publish(implAdv, DEFAULT_LIFETIME, DEFAULT_EXPIRATION);
-            }
-        } catch (Exception ignored) {// ignored
-        }
-        
-        // If we reached this point we're done.
-        return newMod;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public Module loadModule(ID assigned, ModuleSpecID specID, int where) {
-        return loadModule(assigned, specID, where, false);
-    }
-    
-    /**
-     * Load a module from a ModuleSpecID
-     * <p/>
-     * Advertisement is sought, compatibility is checked on all candidates and
-     * load is attempted. The first one that is compatible and loads
-     * successfully is initialized and returned.
-     * 
-     * @param assignedID Id to be assigned to that module (usually its ClassID).
-     * @param specID     The specID of this module.
-     * @param where      May be one of: {@code Here}, {@code FromParent}, or
-     *                   {@code Both}, meaning that the implementation advertisement will be
-     *                   searched in this group, its parent or both. As a general guideline, the
-     *                   implementation advertisements of a group should be searched in its
-     *                   prospective parent (that is Here), the implementation advertisements of a
-     *                   group standard service should be searched in the same group than where
-     *                   this group's advertisement was found (that is, FromParent), while
-     *                   applications may be sought more freely (Both).
-     * @param privileged If {@code true} then the module is provided the true
-     *                   group obj instead of just an interface to the group object. This is
-     *                   normally used only for the group's defined services and applications.
-     * @return Module the new module, or {@code null} if no usable implementation was found.
-     */
-    protected Module loadModule(ID assignedID, ModuleSpecID specID, int where, boolean privileged) {
-        
-        List<Advertisement> allModuleImplAdvs = new ArrayList<Advertisement>();
-
-        ModuleImplAdvertisement loadedImplAdv = loader.findModuleImplAdvertisement(specID);
-        if(null != loadedImplAdv) {
-            // We already have a module defined for this spec id. Use that.
-            allModuleImplAdvs.add(loadedImplAdv);
-        } else {
-            // Search for a module to use.
-            boolean fromHere = (where == Here || where == Both);
-            boolean fromParent = (where == FromParent || where == Both);
-
-            if (fromHere && (null != discovery)) {
-                Collection<Advertisement> here = discoverSome(discovery, DiscoveryService.ADV, 
-                        "MSID", specID.toString(), 120, ModuleImplAdvertisement.class);
-
-                allModuleImplAdvs.addAll(here);
-            }
-
-            if (fromParent && (null != getParentGroup()) && (null != parentGroup.getDiscoveryService())) {
-                Collection<Advertisement> parent = discoverSome(parentGroup.getDiscoveryService(), DiscoveryService.ADV, 
-                        "MSID", specID.toString(), 120, ModuleImplAdvertisement.class);
-
-                allModuleImplAdvs.addAll(parent);
-            }
-        }
-        
-        Throwable recentFailure = null;
-        
-        for (Advertisement eachAdv : allModuleImplAdvs) {
-            if( !(eachAdv instanceof ModuleImplAdvertisement) ) {
-                continue;
-            }
-            
-            ModuleImplAdvertisement foundImpl = (ModuleImplAdvertisement) eachAdv;
-            
-            try {
-                // First check that the MSID is really the one we're looking for.
-                // It could have appeared somewhere else in the adv than where
-                // we're looking, and discovery doesn't know the difference.
-                if (!specID.equals(foundImpl.getModuleSpecID())) {
-                    continue;
-                }
-                
-                Module newMod = loadModule(assignedID, foundImpl, privileged);
-                
-                // If we reach that point, the module is good.
-                return newMod;
-            } catch (ProtocolNotSupportedException failed) {
-                // Incompatible implementation.
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.log(Level.FINE, "Incompatbile impl adv");
-                }
-            } catch (PeerGroupException failed) {
-                // Initialization failure.
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Initialization failed", failed);
-                }
-            } catch (Throwable e) {
-                recentFailure = e;
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Not a usable impl adv: ", e);
-                }
-            }
-        }
-        
-        // Throw an exception if there was a recent failure.
-        if (null != recentFailure) {
-            if (recentFailure instanceof Error) {
-                throw (Error) recentFailure;
-            } else if (recentFailure instanceof RuntimeException) {
-                throw (RuntimeException) recentFailure;
-            } else {
-                throw new UndeclaredThrowableException(recentFailure);
-            }
-        }
-        
-        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-            LOG.warning("Could not find a loadable implementation for SpecID: " + specID);
-        }
-        
-        return null;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public ConfigParams getConfigAdvertisement() {
-        return configAdvertisement;
-    }
-    
-    /**
-     * Sets the configuration advertisement for this peer group.
-     *
-     * @param config The configuration advertisement which will be used for
-     * this peer group or {@code null} if no configuration advertisement is to
-     * be used.
-     */
-    protected void setConfigAdvertisement(ConfigParams config) {
-        configAdvertisement = config;
-    }
-    
-    /**
-     *  Adds configuration parameters for the specified group. The configuration
-     *  parameters remain cached until either the specified group is started or
-     *  the parameters are replaced.
-     *  
-     *  @param groupid The group for who's params are being provided.
-     *  @param params The parameters to be provided to the peer group when it is
-     *  created.
-     */
-    public static void setGroupConfigAdvertisement(ID groupid, ConfigParams params) {
-        if( null != params) {                
-            group_configs.put(groupid, params);
-        } else {
-            group_configs.remove(groupid);
-        }
-    }
-    
-    /*
-     * Now comes the implementation of the public API, including the
-     * API mandated by the Service interface.
-     */
-    
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * It is not recommended to overload this method. Instead, subclassers
-     * should overload either or both of
-     * {@link #initFirst(PeerGroup,ID,Advertisement)} and {@link #initLast()}.
-     * If this method is to be overloaded, the overloading method must
-     * invoke <code>super.init</code>.
-     * <p/>
-     * This method invokes <code>initFirst</code>
-     * with identical parameters. <code>initLast</initLast> does not take
-     * parameters since the relevant information can be obtained from the
-     * group following completion of the <code>initFirst</code> phase.
-     * The resulting values may be different from the parameters to
-     * <code>initFirst</code> since <code>initFirst</code> may
-     * be overLoaded and the overloading method may modify these parameters
-     * when calling <code>super.initFirst</code>. (See
-     * {@link net.jxta.impl.peergroup.Platform} for an example of such a case).
-     * <p/>
-     * Upon completion, the group object is marked as completely initialized
-     * in all cases. Once a group object is completely initialized, it becomes
-     * sensitive to reference counting.
-     * <p/>
-     * In the future this method may become final.
-     */
-    public void init(PeerGroup homeGroup, ID assignedID, Advertisement impl) throws PeerGroupException {
-        try {
-            initFirst(homeGroup, assignedID, impl);
-            initLast();
-        } finally {
-            // This must be done in all cases.
-            initComplete = true;
-        }
-    }
-    
-    /**
-     * Performs all initialization steps that need to be performed
-     * before any subclass initialization is performed.
-     * <p/>
-     * Classes that override this method should always call
-     * <code>super.initFirst()</code> <strong>before</strong> doing
-     * any of their own work.
-     *
-     * @param homeGroup  The group that serves as a parent to this group.
-     * @param assignedID The unique ID assigned to this module. For
-     *                   group this is the group ID or <code>null</code> if a group ID
-     *                   has not yet been assigned. If null is passed, GenericPeerGroup
-     *                   will generate a new group ID.
-     * @param impl       The ModuleImplAdvertisement which defines this
-     *                   group's implementation.
-     * @throws PeerGroupException if a group initialization error occurs
-     */
-    protected void initFirst(PeerGroup homeGroup, ID assignedID, Advertisement impl) throws PeerGroupException {
-        
-        this.implAdvertisement = (ModuleImplAdvertisement) impl;
-        this.parentGroup = homeGroup;
-        
-        if (null != parentGroup) {
-            jxtaHome = parentGroup.getStoreHome();
-        }
-        
-        // Set the peer configuration before we start.
-        if((null != assignedID) && (null == getConfigAdvertisement())) {
-            setConfigAdvertisement(group_configs.remove(assignedID));
-        }
-        
-        try {
-            // FIXME 20030919 bondolo@jxta.org This setup doesnt give us any
-            // capability to use seed material or parent group.
-            if (null == assignedID) {
-                if ("cbid".equals(IDFactory.getDefaultIDFormat())) {
-                    throw new IllegalStateException("Cannot generate group id for cbid group");
-                } else {
-                    assignedID = IDFactory.newPeerGroupID();
-                }
-            } else {
-                if (parentGroup != null) {
-                    DiscoveryService disco = parentGroup.getDiscoveryService();
-                    if (null != disco) {
-                        Enumeration found = disco.getLocalAdvertisements(DiscoveryService.GROUP, "GID", assignedID.toString());
-                        if (found.hasMoreElements()) {
-                            peerGroupAdvertisement = (PeerGroupAdvertisement) found.nextElement();
-                        }
-                    }
-                }
-            }
-            
-            if (!(assignedID instanceof PeerGroupID)) {
-                throw new PeerGroupException("assignedID must be a peer group ID");
-            }
-            
-            peerAdvertisement.setPeerGroupID((PeerGroupID) assignedID);
-            
-            // // make sure the parent group is the required group
-            // if (null != peerAdvertisement.getPeerGroupID().getParentPeerGroupID()) {
-            // if (null == parentGroup) {
-            // throw new PeerGroupException("Group requires parent group : " + peerAdvertisement.getPeerGroupID().getParentPeerGroupID());
-            // } else if (!parentGroup.getPeerGroupID().equals(peerAdvertisement.getPeerGroupID().getParentPeerGroupID())) {
-            // throw new PeerGroupException("Group requires parent group : " + peerAdvertisement.getPeerGroupID().getParentPeerGroupID() + ". Provided parent was : " + parentGroup.getPeerGroupID());
-            // }
-            // }
-            
-            // Do our part of the PeerAdv construction.
-            if ((configAdvertisement != null) && (configAdvertisement instanceof PlatformConfig)) {
-                PlatformConfig platformConfig = (PlatformConfig) configAdvertisement;
-                
-                // Normally there will be a peer ID and a peer name in the config.
-                PeerID configPID = platformConfig.getPeerID();
-                
-                if ((null == configPID) || (ID.nullID == configPID)) {
-                    if ("cbid".equals(IDFactory.getDefaultIDFormat())) {
-                        // Get our peer-defined parameters in the configAdv
-                        XMLElement param = (XMLElement) platformConfig.getServiceParam(PeerGroup.membershipClassID);
-
-                        if (null == param) {
-                            throw new IllegalArgumentException(PSEConfigAdv.getAdvertisementType() + " could not be located");
-                        }
-                        
-                        Advertisement paramsAdv = null;
-                        try {
-                            paramsAdv = AdvertisementFactory.newAdvertisement(param);
-                        } catch (NoSuchElementException noadv) {// ignored
-                        }
-                        if (!(paramsAdv instanceof PSEConfigAdv)) {
-                            throw new IllegalArgumentException(
-                                    "Provided Advertisement was not a " + PSEConfigAdv.getAdvertisementType());
-                        }
-                        
-                        PSEConfigAdv config = (PSEConfigAdv) paramsAdv;
-                        Certificate clientRoot = config.getCertificate();
-                        byte[] pub_der = clientRoot.getPublicKey().getEncoded();
-
-                        platformConfig.setPeerID(IDFactory.newPeerID((PeerGroupID) assignedID, pub_der));
-                    } else {
-                        platformConfig.setPeerID(IDFactory.newPeerID((PeerGroupID) assignedID));
-                    }
-                }
-                
-                peerAdvertisement.setPeerID(platformConfig.getPeerID());
-                peerAdvertisement.setName(platformConfig.getName());
-                peerAdvertisement.setDesc(platformConfig.getDesc());
-            } else {
-                if (null == parentGroup) {
-                    // If we did not get a valid peer id, we'll initialize it here.
-                    peerAdvertisement.setPeerID(IDFactory.newPeerID((PeerGroupID) assignedID));
-                } else {
-                    // We're not the world peer group, which is the authoritative source of these values.
-                    peerAdvertisement.setPeerID(parentGroup.getPeerAdvertisement().getPeerID());
-                    peerAdvertisement.setName(parentGroup.getPeerAdvertisement().getName());
-                    peerAdvertisement.setDesc(parentGroup.getPeerAdvertisement().getDesc());
-                }
-            }
-            
-            if (peerGroupAdvertisement == null) {
-                // No existing gadv. OK then we're creating the group or we're
-                // the platform, it seems. Start a grp adv with the essentials
-                // that we know.
-                peerGroupAdvertisement = (PeerGroupAdvertisement)
-                        AdvertisementFactory.newAdvertisement(PeerGroupAdvertisement.getAdvertisementType());
-                
-                peerGroupAdvertisement.setPeerGroupID((PeerGroupID) assignedID);
-                peerGroupAdvertisement.setModuleSpecID(implAdvertisement.getModuleSpecID());
-            } else {
-                published = true;
-            }
-            
-            // If we still do not have a config adv, make one with the minimal info in it.
-            // All groups but the Platform and the netPG are in that case.
-            // In theory a plain ConfigParams would be enough for subgroups. But for now
-            // GenericPeerGroup always has a full Platformconfig and there is no other concrete
-            // ConfigParams subclass.
-            if (configAdvertisement == null) {
-                PlatformConfig conf = (PlatformConfig) AdvertisementFactory.newAdvertisement(PlatformConfig.getAdvertisementType());
-
-                conf.setPeerID(peerAdvertisement.getPeerID());
-                conf.setName(peerAdvertisement.getName());
-                conf.setDesc(peerAdvertisement.getDesc());
-                configAdvertisement = conf;
-            }
-            
-            // Merge service params with those specified by the group (if any). The only
-            // policy, right now, is to give peer params the precedence over group params.
-            Hashtable grpParams = peerGroupAdvertisement.getServiceParams();
-            Enumeration keys = grpParams.keys();
-
-            while (keys.hasMoreElements()) {
-                ID key = (ID) keys.nextElement();
-                Element e = (Element) grpParams.get(key);
-
-                if (configAdvertisement.getServiceParam(key) == null) {
-                    configAdvertisement.putServiceParam(key, e);
-                }
-            }
-            
-            /*
-             * Now seems like the right time to attempt to register the group.
-             * The only trouble is that it could cause the group to
-             * be used before all the services are initialized, but on the
-             * other hand, we do not want to let a redundant group go through
-             * it's service initialization because that would cause irreparable
-             * damage to the legitimate instance. There should be a synchro on
-             * on the get<service>() and lookupService() routines.
-             */
-            if (!globalRegistry.registerInstance((PeerGroupID) assignedID, this)) {
-                throw new PeerGroupException("Group already instantiated");
-            }
-        } catch (Throwable any) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Group init failed", any);
-            }
-            
-            if (any instanceof Error) {
-                throw (Error) any;
-            } else if (any instanceof RuntimeException) {
-                throw (RuntimeException) any;
-            } else if (any instanceof PeerGroupException) {
-                throw (PeerGroupException) any;
-            }
-            
-            throw new PeerGroupException("Group init failed", any);
-        }
-        
-        ThreadGroup parentThreadGroup = (null != this.parentGroup)
-                ? parentGroup.getHomeThreadGroup()
-                : Thread.currentThread().getThreadGroup();
-        
-        threadGroup = new ThreadGroup(parentThreadGroup, "Group " + peerGroupAdvertisement.getPeerGroupID());
-        
-        taskQueue = new ArrayBlockingQueue<Runnable>(COREPOOLSIZE * 2);
-        threadPool = new ThreadPoolExecutor(COREPOOLSIZE, MAXPOOLSIZE, 
-                KEEPALIVETIME, TimeUnit.SECONDS, 
-                taskQueue,
-                new PeerGroupThreadFactory("Executor", getHomeThreadGroup()),
-                new CallerBlocksPolicy());
-        
-        // Try to allow core threads to idle out. (Requires a 1.6 method)
-        try {
-            Method allowCoreThreadTimeOut = threadPool.getClass().getMethod("allowCoreThreadTimeOut", boolean.class);
-            
-            allowCoreThreadTimeOut.invoke(threadPool, Boolean.TRUE);            
-        } catch(Throwable ohWell) {
-            // Our attempt failed.
-            if (Logging.SHOW_FINEST && LOG.isLoggable(Level.FINEST)) {
-                LOG.log(Level.FINEST, "Failed to enable 'allowCoreThreadTimeOut'", ohWell);
-            }
-        }
-        
-        scheduledExecutor = new ScheduledThreadPoolExecutor(1,
-            new PeerGroupThreadFactory("Scheduled Executor", getHomeThreadGroup()));
-        
-        /*
-         * The rest of construction and initialization are left to the
-         * group subclass, between here and the begining for initLast.
-         * That should include instanciating and setting the endpoint, and
-         * finally supplying it with endpoint protocols.
-         * That also includes instanciating the appropriate services
-         * and registering them.
-         * For an example, see the StdPeerGroup class.
-         */
-    }
-    
-    /**
-     * Perform all initialization steps that need to be performed
-     * after any subclass initialization is performed.
-     * <p/>
-     * Classes that override this method should always call super.initLast
-     * <strong>after</strong> doing any of their own work.
-     * @throws PeerGroupException if a group initialization error occurs
-     */
-    protected void initLast() throws PeerGroupException {
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring Group : " + getPeerGroupID());
-            
-            if (implAdvertisement != null) {
-                configInfo.append("\n\tImplementation :");
-                configInfo.append("\n\t\tModule Spec ID: ").append(implAdvertisement.getModuleSpecID());
-                configInfo.append("\n\t\tImpl Description : ").append(implAdvertisement.getDescription());
-                configInfo.append("\n\t\tImpl URI : ").append(implAdvertisement.getUri());
-                configInfo.append("\n\t\tImpl Code : ").append(implAdvertisement.getCode());
-            }
-            configInfo.append("\n\tGroup Params :");
-            configInfo.append("\n\t\tModule Spec ID : ").append(implAdvertisement.getModuleSpecID());
-            configInfo.append("\n\t\tPeer Group ID : ").append(getPeerGroupID());
-            configInfo.append("\n\t\tGroup Name : ").append(getPeerGroupName());
-            configInfo.append("\n\t\tPeer ID in Group : ").append(getPeerID());
-            configInfo.append("\n\tConfiguration :");
-            if (null == parentGroup) {
-                configInfo.append("\n\t\tHome Group : (none)");
-            } else {
-                configInfo.append("\n\t\tHome Group : \"").append(parentGroup.getPeerGroupName()).append("\" / ").append(
-                        parentGroup.getPeerGroupID());
-            }
-            configInfo.append("\n\t\tServices :");
-            for (Map.Entry<ModuleClassID, Service> anEntry : services.entrySet()) {
-                ModuleClassID aMCID = anEntry.getKey();
-                ModuleImplAdvertisement anImplAdv = (ModuleImplAdvertisement) anEntry.getValue().getImplAdvertisement();
-
-                configInfo.append("\n\t\t\t").append(aMCID).append("\t").append(anImplAdv.getDescription());
-            }
-            LOG.config(configInfo.toString());
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public int startApp(String[] arg) {
-        return Module.START_OK;
-    }
-    
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * PeerGroupInterface's stopApp() does nothing. Only a real reference to the
-     * group object permits to stop it without going through ref counting.
-     */
-    public void stopApp() {
-        stopping = true;
-        
-        Collection<ModuleClassID> allServices = new ArrayList<ModuleClassID>(services.keySet());
-        
-        // Stop and remove all remaining services.
-        for (ModuleClassID aService : allServices) {
-            try {
-                removeService(aService);
-            } catch (Exception failure) {
-                LOG.log(Level.WARNING, "Failure shutting down service : " + aService, failure);
-            }
-        }
-        
-        if (!services.isEmpty()) {
-            LOG.warning(services.size() + " services could not be shut down during peer group stop.");
-        }
-        
-        // remove everything (just in case);
-        services.clear();
-        
-        globalRegistry.unRegisterInstance(peerGroupAdvertisement.getPeerGroupID(), this);
-        
-        // Explicitly unreference our parent group in order to allow it
-        // to terminate if this group object was itself the last reference
-        // to it.
-        if (parentGroup != null) {
-            parentGroup.unref();
-            parentGroup = null;
-        }
-        
-        // shutdown the threadpool
-        threadPool.shutdownNow();
-        scheduledExecutor.shutdownNow();
-        
-        // No longer initialized.
-        initComplete = false;
-    }
-    
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * May be called by a module which has a direct reference to the group
-     * object and wants to notify its abandoning it. Has no effect on the real
-     * group object.
-     */
-    public void unref() {}
-    
-    /**
-     * Called every time an interface object that refers to this group
-     * goes away, either by being finalized or by its unref() method being
-     * invoked explicitly.
-     */
-    protected void decRefCount() {
-        synchronized (this) {
-            --masterRefCount;
-            
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                Throwable trace = new Throwable("Stack Trace");
-                StackTraceElement elements[] = trace.getStackTrace();
-                LOG.info("[" + getPeerGroupID() + "] GROUP REF COUNT DECCREMENTED TO: " + masterRefCount + " by\n\t" + elements[2]);
-            }
-            
-            if (masterRefCount != 0) {
-                return;
-            }
-            
-            if (!stopWhenUnreferenced) {
-                return;
-            }
-        }
-        
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("[" + getPeerGroupID() + "] STOPPING UNREFERENCED GROUP");
-        }
-        
-        stopApp();
-        masterRefCount = Integer.MIN_VALUE;
-    }
-    
-    /*
-     * Implement the Service API so that we can make groups services when we
-     * decide to.
-     */
-    
-    /**
-     * {@inheritDoc}
-     */
-    public Service getInterface() {
-        synchronized (this) {
-            ++masterRefCount;
-            
-            if (masterRefCount < 1) {
-                throw new IllegalStateException("Group has been shutdown. getInterface() is not available");
-            }
-            
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                Throwable trace = new Throwable("Stack Trace");
-                StackTraceElement elements[] = trace.getStackTrace();
-
-                LOG.info("[" + getPeerGroupID() + "] GROUP REF COUNT INCREMENTED TO: " + masterRefCount + " by\n\t" + elements[2]);
-            }
-            
-            if (initComplete) {
-                // If init is complete the group can become sensitive to
-                // its ref count reaching zero. Before there could be
-                // transient references before there is a chance to give
-                // a permanent reference to the invoker of newGroup.
-                stopWhenUnreferenced = true;
-            }
-        }
-        
-        return new RefCountPeerGroupInterface(this);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public PeerGroup getWeakInterface() {
-        return new PeerGroupInterface(this);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public ModuleImplAdvertisement getImplAdvertisement() {
-        return implAdvertisement.clone();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public void publishGroup(String name, String description) throws IOException {
-        
-        if (published) {
-            return;
-        }
-        
-        peerGroupAdvertisement.setName(name);
-        peerGroupAdvertisement.setDescription(description);
-        
-        if (parentGroup == null) {
-            return;
-        }
-        
-        DiscoveryService parentDiscovery = parentGroup.getDiscoveryService();
-        
-        if (null == parentDiscovery) {
-            return;
-        }
-        
-        parentDiscovery.publish(peerGroupAdvertisement, DEFAULT_LIFETIME, DEFAULT_EXPIRATION);
-        published = true;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public PeerGroup newGroup(Advertisement pgAdv) throws PeerGroupException {
-        
-        PeerGroupAdvertisement adv = (PeerGroupAdvertisement) pgAdv;
-        PeerGroupID gid = adv.getPeerGroupID();
-        
-        if ((gid == null) || ID.nullID.equals(gid)) {
-            throw new IllegalArgumentException("Advertisement did not contain a peer group ID");
-        }
-        
-        PeerGroup theNewGroup = globalRegistry.lookupInstance(gid);
-        
-        if (theNewGroup != null) {
-            return theNewGroup;
-        }
-        
-        // We do not know if the grp adv had been previously published or not...  Since it may contain information essential to
-        // the configuration of services, we need to make sure it is published localy, rather than letting the group publish
-        // itself after the fact.
-        
-        // FIXME jice@jxta.org 20040713 : The downside is that we're publishing the adv even before making sure that this group
-        // can really be instantiated. We're basically using the cm as a means to pass parameters to the module because it is a
-        // group. We have the same parameter issue with the config adv. Eventually we need to find a clean way of passing
-        // parameters specific to a certain types of module.
-        
-        try {
-            discovery.publish(adv, DEFAULT_LIFETIME, DEFAULT_EXPIRATION);
-        } catch (Exception any) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Could not publish the group advertisement: ", any);
-            }
-        }
-        
-        theNewGroup = (PeerGroup) loadModule(adv.getPeerGroupID(), adv.getModuleSpecID(), Here, false);
-        
-        if (theNewGroup == null) {
-            throw new PeerGroupException("Could not find group implementation with " + adv.getModuleSpecID());
-        }
-        
-        return (PeerGroup) theNewGroup.getInterface();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public PeerGroup newGroup(PeerGroupID gid, Advertisement impl, String name, String description) throws PeerGroupException {
-        PeerGroup theNewGroup = null;
-        
-        if (null != gid) {
-            theNewGroup = globalRegistry.lookupInstance(gid);
-        }
-        
-        if (theNewGroup != null) {
-            return theNewGroup;
-        }
-        
-        try {
-            theNewGroup = (PeerGroup) loadModule(gid, (ModuleImplAdvertisement) impl, false);
-        } catch (Throwable any) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Could not load group implementation", any);
-            }
-            
-            throw new PeerGroupException("Could not load group implementation", any);
-        }
-        
-        try {
-            // The group adv definitely needs to be published.
-            theNewGroup.publishGroup(name, description);
-        } catch (Exception any) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Could not publish group or implementation:", any);
-            }
-        }
-        return (PeerGroup) theNewGroup.getInterface();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public PeerGroup newGroup(PeerGroupID gid) throws PeerGroupException {
-        
-        if ((gid == null) || ID.nullID.equals(gid)) {
-            throw new IllegalArgumentException("Invalid peer group ID");
-        }
-        
-        PeerGroup result = globalRegistry.lookupInstance(gid);
-        
-        if (result != null) {
-            return result;
-        }
-        
-        PeerGroupAdvertisement adv;
-        
-        try {
-            adv = (PeerGroupAdvertisement)
-                    discoverOne(DiscoveryService.GROUP, "GID", gid.toString(), 120, PeerGroupAdvertisement.class);
-        } catch (Throwable any) {
-            throw new PeerGroupException("Failed finding group advertisement for " + gid, any);
-        }
-        
-        if (adv == null) {
-            throw new PeerGroupException("Could not find group advertisement for group " + gid);
-        }
-        
-        return newGroup(adv);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public JxtaLoader getLoader() {
-        return loader;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public String getPeerName() {
-        // before init we must fail.
-        if (null == peerAdvertisement) {
-            throw new IllegalStateException("PeerGroup not sufficiently initialized");
-        }
-        return peerAdvertisement.getName();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public String getPeerGroupName() {
-        // before init we must fail.
-        if (null == peerGroupAdvertisement) {
-            throw new IllegalStateException("PeerGroup not sufficiently initialized");
-        }
-        return peerGroupAdvertisement.getName();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public PeerGroupID getPeerGroupID() {
-        // before init we must fail.
-        if (null == peerGroupAdvertisement) {
-            throw new IllegalStateException("PeerGroup not sufficiently initialized");
-        }
-        
-        return peerGroupAdvertisement.getPeerGroupID();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public PeerID getPeerID() {
-        // before init we must fail.
-        if (null == peerAdvertisement) {
-            throw new IllegalStateException("PeerGroup not sufficiently initialized");
-        }
-        return peerAdvertisement.getPeerID();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public PeerAdvertisement getPeerAdvertisement() {
-        return peerAdvertisement;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public PeerGroupAdvertisement getPeerGroupAdvertisement() {
-        return peerGroupAdvertisement;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isRendezvous() {
-        if (rendezvous == null) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Rendezvous service null");
-            }
-        }
-        return (rendezvous != null) && rendezvous.isRendezVous();
-    }
-    
-    /*
-     * shortcuts to the well-known services, in order to avoid calls to lookup.
-     */
-    
-    /**
-     * {@inheritDoc}
-     */
-    public EndpointService getEndpointService() {
-        if (endpoint == null) {
-            return null;
-        }
-        return (EndpointService) endpoint.getInterface();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public ResolverService getResolverService() {
-        if (resolver == null) {
-            return null;
-        }
-        return (ResolverService) resolver.getInterface();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public DiscoveryService getDiscoveryService() {
-        if (discovery == null) {
-            return null;
-        }
-        return (DiscoveryService) discovery.getInterface();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public PeerInfoService getPeerInfoService() {
-        if (peerinfo == null) {
-            return null;
-        }
-        return (PeerInfoService) peerinfo.getInterface();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public MembershipService getMembershipService() {
-        if (membership == null) {
-            return null;
-        }
-        return (MembershipService) membership.getInterface();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public PipeService getPipeService() {
-        if (pipe == null) {
-            return null;
-        }
-        return (PipeService) pipe.getInterface();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public RendezVousService getRendezVousService() {
-        if (rendezvous == null) {
-            return null;
-        }
-        return (RendezVousService) rendezvous.getInterface();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public AccessService getAccessService() {
-        if (access == null) {
-            return null;
-        }
-        return (AccessService) access.getInterface();
-    }
-
-    /**
-     * Returns the executor pool
-     *
-     * @return the executor pool
-     */
-    public Executor getExecutor() {
-        return threadPool;
-    }
-
-    /**
-     * Returns the scheduled executor. The
-     *
-     * @return the scheduled executor
-     */
-    public ScheduledExecutorService getScheduledExecutor() {
-        // FIXME 20070815 bondolo We should return a proxy object to disable shutdown()
-        return scheduledExecutor;
-    }
-    
-    /**
-     * Our rejected execution handler which has the effect of pausing the
-     * caller until the task can be queued.
-     */
-    private static class CallerBlocksPolicy implements RejectedExecutionHandler {
-        
-        private CallerBlocksPolicy() {
-        }
-        
-        /**
-         * {@inheritDoc}
-         */
-        public void rejectedExecution(Runnable runnable, ThreadPoolExecutor executor) {
-            BlockingQueue<Runnable> queue = executor.getQueue();
-
-            while (!executor.isShutdown()) {
-                executor.purge();
-
-                try {
-                    boolean pushed = queue.offer(runnable, 500, TimeUnit.MILLISECONDS);
-                    
-                    if (pushed) {
-                        break;
-                    }
-                } catch (InterruptedException woken) {
-                    throw new RejectedExecutionException("Interrupted while attempting to enqueue", woken);
-                }
-            }
-        }
-    }
-    
-    /**
-     * Our thread factory that adds the threads to our thread group and names
-     * the thread to something recognizable.
-     */
-    static class PeerGroupThreadFactory implements ThreadFactory {
-        final AtomicInteger threadNumber = new AtomicInteger(1);
-        final String name;
-        final ThreadGroup threadgroup;
-
-        PeerGroupThreadFactory(String name, ThreadGroup threadgroup) {
-            this.name = name;
-            this.threadgroup = threadgroup;
-        }
-
-        public Thread newThread(Runnable runnable) {
-            Thread thread = new Thread(threadgroup, runnable,  name + " - " + threadNumber.getAndIncrement(), 0);
-            if(thread.isDaemon()) {
-                thread.setDaemon(false);
-            }
-            if (thread.getPriority() != Thread.NORM_PRIORITY) {
-                thread.setPriority(Thread.NORM_PRIORITY);
-            }
-            return thread;
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/IncompleteConfigurationException.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/IncompleteConfigurationException.java
deleted file mode 100644 (file)
index e08308b..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * IncompleteConfigurationException.java
- *
- * Created on September 13, 2005, 12:11 PM
- *
- * To change this template, choose Tools | Template Manager
- * and open the template in the editor.
- */
-package net.jxta.impl.peergroup;
-
-import net.jxta.exception.ConfiguratorException;
-
-import java.util.List;
-
-/**
- * A configurator exception which is generated when intervention
- */
-public class IncompleteConfigurationException extends ConfiguratorException {
-
-    /**
-     * Constucts a {@link IncompleteConfigurationException} with no specified details.
-     */
-    public IncompleteConfigurationException() {
-        super();
-    }
-
-    /**
-     * Constructs a {@link IncompleteConfigurationException} with the specified message.
-     *
-     * @param msg message
-     */
-    public IncompleteConfigurationException(String msg) {
-        super(msg);
-    }
-
-    /**
-     * Constructs a {@link IncompleteConfigurationException} with the specified {@link
-     * java.lang.Throwable cause}.
-     *
-     * @param ex cause
-     */
-    public IncompleteConfigurationException(Throwable ex) {
-        super(ex);
-    }
-
-    /**
-     * Constructs a {@link IncompleteConfigurationException} with the specified message and {@link
-     * java.lang.Throwable cause}.
-     *
-     * @param msg message
-     * @param ex  cause
-     */
-    public IncompleteConfigurationException(String msg, Throwable ex) {
-        super(msg, ex);
-    }
-
-    /**
-     * Constructs a {@link IncompleteConfigurationException} with the specified {@link
-     * java.util.List} of {@link java.lang.Throwable causes}.
-     *
-     * @param ex causes
-     */
-    public IncompleteConfigurationException(List ex) {
-        super(ex);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/NullConfigurator.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/NullConfigurator.java
deleted file mode 100644 (file)
index bc3f0a9..0000000
+++ /dev/null
@@ -1,304 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.peergroup;
-
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.XMLDocument;
-import net.jxta.exception.ConfiguratorException;
-import net.jxta.impl.protocol.PlatformConfig;
-import net.jxta.logging.Logging;
-import net.jxta.protocol.ConfigParams;
-
-import java.io.*;
-import java.net.URI;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * A minimal Platform Configurator. This implementation can load a
- * configuration from an existing PlatformConfig file and also save a
- * configuration to the PlatformConfig file.
- * <p/>
- * This configurator provides no explict validation of the PlatformConfig
- * as it is read from the file (Some is done by the PlatformConfig class) and
- * provides no mechanism for reconfiguration. The NullConfigurator provides a
- * useful base implementation for extending your own Configurator and also
- * provides the minimal implementation needed for applications which perform
- * their own configuration.
- */
-public class NullConfigurator implements PlatformConfigurator {
-
-    /**
-     * logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(NullConfigurator.class.getName());
-
-    /**
-     * The location in which the configuration files will reside.
-     */
-    protected final URI jxtaHome;
-
-    /**
-     * The file in which contains the platform configurtation.
-     */
-    protected final URI configFile;
-
-    /**
-     * The platform config
-     */
-    protected PlatformConfig advertisement = null;
-
-    /**
-     * Constructor for the NullConfigurator
-     *
-     * @param homeRoot The location in which the configuration files will reside.
-     * @throws ConfiguratorException If there is a problem accessing the configuration information.
-     */
-    public NullConfigurator(URI homeRoot) throws ConfiguratorException {
-        if (!homeRoot.isAbsolute()) {
-            throw new IllegalArgumentException("homeRoot must be an absoluteURI");
-        }
-
-        jxtaHome = homeRoot;
-
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            LOG.config("JXTA_HOME = " + jxtaHome.toASCIIString());
-        }
-
-        if ("file".equalsIgnoreCase(jxtaHome.getScheme())) {
-            File jxtaHomeDir = new File(jxtaHome);
-
-            if (jxtaHomeDir.exists() && !jxtaHomeDir.isDirectory()) {
-                throw new IllegalArgumentException("'" + jxtaHomeDir + "' is not a directory.");
-            }
-
-            if (!jxtaHomeDir.exists()) {
-                if (!jxtaHomeDir.mkdirs()) {
-                    throw new IllegalStateException("Could not create '" + jxtaHomeDir + "'.");
-                }
-            }
-
-            configFile = new File(jxtaHomeDir, "PlatformConfig").toURI();
-        } else {
-            configFile = jxtaHome.resolve("PlatformConfig");
-        }
-    }
-
-    /**
-     * @inheritDoc
-     */
-    public PlatformConfig getPlatformConfig() throws ConfiguratorException {
-        advertisement = (PlatformConfig) load();
-
-        return advertisement;
-    }
-
-    /**
-     * @inheritDoc
-     */
-    public final void setPlatformConfig(PlatformConfig config) {
-        advertisement = config;
-    }
-
-    /**
-     * @inheritDoc
-     */
-    public ConfigParams getConfigParams() throws ConfiguratorException {
-        return getPlatformConfig();
-    }
-
-    /**
-     * @inheritDoc
-     */
-    public void setConfigParams(ConfigParams cp) {
-        setPlatformConfig((PlatformConfig) cp);
-    }
-
-    /**
-     * @inheritDoc
-     */
-    public void setReconfigure(boolean reconfigure) {// This implementation doesn't do configuration so ignores this operation.
-    }
-
-    /**
-     * @inheritDoc
-     */
-    public boolean isReconfigure() {
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ConfigParams load() throws ConfiguratorException {
-        return load(configFile);
-    }
-
-    /**
-     * Retrieves the persisted parameters associated with this configuration
-     * from the standard location.
-     *
-     * @param loadFile The location from which the configuration data should be
-     *                 loaded.
-     * @return The configuration parameters.
-     * @throws ConfiguratorException If there was a failure in retrieving the
-     *                               persisted parameters. This is normally a chained exception to the
-     *                               underlying cause.
-     * @deprecated Loading of existing configuration is best accomplished by use
-     *             of specific constructors of the implementing configurator. This method
-     *             complicates the state management of configuration parameters and may have
-     *             unpredictable results depending upon the constructor and configuration
-     *             set methods used prior to it's execution.
-     */
-    @Deprecated
-    protected PlatformConfig load(URI loadFile) throws ConfiguratorException {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Reading Platform Config from : " + loadFile);
-        }
-
-        InputStream advStream = null;
-
-        try {
-            advStream = loadFile.toURL().openStream();
-
-            XMLDocument xmlDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, advStream);
-            PlatformConfig result = (PlatformConfig) AdvertisementFactory.newAdvertisement(xmlDoc);
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Recovered Platform Config from : " + loadFile);
-            }
-
-            return result;
-        } catch (FileNotFoundException e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Platform Config not found : " + loadFile);
-            }
-
-            return null;
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed to Recover \'" + loadFile + "\' due to : ", e);
-            }
-
-            throw new ConfiguratorException("Failed to recover PlatformConfig", e);
-        } finally {
-            try {
-                if (advStream != null) {
-                    advStream.close();
-                }
-                advStream = null;
-            } catch (Exception ignored) {// ignored
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean save() throws ConfiguratorException {
-        return save(configFile);
-    }
-
-    /**
-     * Persist the parameters associated with this configuration to the
-     * specified location.
-     *
-     * @param saveFile The location to which the configuration should be saved.
-     * @return <code>true</code> if the configuration was successfully saved
-     *         otherwise <code>false</code>. If the parameters are not persisted then
-     *         <code>false/code> is returned.
-     * @throws ConfiguratorException If there was a failure in persisting the
-     *                               parameters. This is normally a chained exception to the underlying
-     *                               cause.
-     */
-    protected boolean save(URI saveFile) throws ConfiguratorException {
-
-        // Save the adv as input for future reconfiguration
-        OutputStream out = null;
-
-        try {
-            XMLDocument aDoc = (XMLDocument) advertisement.getDocument(MimeMediaType.XMLUTF8);
-
-            if ("file".equalsIgnoreCase(saveFile.getScheme())) {
-                out = new FileOutputStream(new File(saveFile));
-            } else {
-                out = saveFile.toURL().openConnection().getOutputStream();
-            }
-
-            OutputStreamWriter os = new OutputStreamWriter(out, "UTF-8");
-
-            aDoc.sendToWriter(os);
-            os.flush();
-        } catch (IOException e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Could not save to : " + saveFile, e);
-            }
-
-            throw new ConfiguratorException("Could not save to : " + saveFile, e);
-        } finally {
-            try {
-                if (null != out) {
-                    out.close();
-                }
-            } catch (Exception ignored) {// ignored
-            }
-            out = null;
-        }
-        return true;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/PeerGroupInterface.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/PeerGroupInterface.java
deleted file mode 100644 (file)
index 08b83b4..0000000
+++ /dev/null
@@ -1,447 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.peergroup;
-
-import net.jxta.access.AccessService;
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Advertisement;
-import net.jxta.document.Element;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.exception.ProtocolNotSupportedException;
-import net.jxta.exception.ServiceNotFoundException;
-import net.jxta.id.ID;
-import net.jxta.membership.MembershipService;
-import net.jxta.peer.PeerID;
-import net.jxta.peer.PeerInfoService;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.pipe.PipeService;
-import net.jxta.platform.JxtaLoader;
-import net.jxta.platform.Module;
-import net.jxta.platform.ModuleSpecID;
-import net.jxta.protocol.ConfigParams;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.PeerGroupAdvertisement;
-import net.jxta.rendezvous.RendezVousService;
-import net.jxta.resolver.ResolverService;
-import net.jxta.service.Service;
-import java.util.logging.Logger;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.Iterator;
-
-/**
- * PeerGroupInterface provides a pure interface object that permits interaction
- * with the actual PeerGroup implementation without giving access to the real
- * object.
- * <p/>
- * This class defines immutable objects. It has no control over the wrapped
- * peer group object's life cycle. It serves to make weak PeerGroup interface
- * object.
- */
-class PeerGroupInterface implements PeerGroup {
-
-    /**
-     * Logger
-     */
-    private static final Logger LOG = Logger.getLogger(PeerGroupInterface.class.getName());
-
-    /**
-     * The peer group instance which backs this interface object.
-     */
-    protected PeerGroup groupImpl;
-
-    /**
-     * Constructs an interface object that front-ends a given GenericPeerGroup.
-     * @param theRealThing the real PeerGroup
-     */
-    PeerGroupInterface(PeerGroup theRealThing) {
-        groupImpl = theRealThing;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object target) {
-        PeerGroup temp = groupImpl;
-
-        if (null != temp) {
-            return temp.equals(target);
-        } else {
-            return super.equals(target);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * An implementation suitable for debugging. <b>Don't try to parse
-     * this string!</b> All of the information is available from other sources.
-     */
-    @Override
-    public String toString() {
-        PeerGroup temp = groupImpl;
-
-        if (null != temp) {
-            return temp.toString();
-        } else {
-            return super.toString();
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * This is here for class hierarchy reasons. It is normaly ignored. By
-     * definition, the interface object protects the real object's start/stop
-     * methods from being called.
-     */
-
-    public void init(PeerGroup pg, ID assignedID, Advertisement impl) {}
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * This is here for class hierarchy reasons. It is normaly ignored. By
-     * definition, the interface object protects the real object's start/stop
-     * methods from being called.
-     */
-    public int startApp(String[] arg) {
-        return 0;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * This is here for class hierarchy reasons. It is normaly ignored. By
-     * definition, the interface object protects the real object's start/stop
-     * methods from being called.
-     */
-    public void stopApp() {}
-
-    /**
-     * {@inheritDoc}
-     */
-    public Service getInterface() {
-        return this;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerGroup getWeakInterface() {
-        return this;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Does nothing.
-     */
-    public void unref() {}
-
-    /**
-     * {@inheritDoc}
-     */
-    public Advertisement getImplAdvertisement() {
-        return groupImpl.getImplAdvertisement();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ThreadGroup getHomeThreadGroup() {
-        return groupImpl.getHomeThreadGroup();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public URI getStoreHome() {
-        return groupImpl.getStoreHome();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public JxtaLoader getLoader() {
-        return groupImpl.getLoader();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isRendezvous() {
-        return groupImpl.isRendezvous();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerGroupAdvertisement getPeerGroupAdvertisement() {
-        return groupImpl.getPeerGroupAdvertisement();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerAdvertisement getPeerAdvertisement() {
-        return groupImpl.getPeerAdvertisement();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Service lookupService(ID name) throws ServiceNotFoundException {
-        return groupImpl.lookupService(name);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Service lookupService(ID name, int roleIndex) throws ServiceNotFoundException {
-        return groupImpl.lookupService(name, roleIndex);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Iterator getRoleMap(ID name) {
-        return groupImpl.getRoleMap(name);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean compatible(Element compat) {
-        return groupImpl.compatible(compat);
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * FIXME 20031103 jice Ideally, we'd need the groupAPI to offer a means to
-     * loadModule() without making a counted reference, so that group services
-     * can loadModule() things without preventing group termination. This could
-     * be achieved elegantly by making this the only behaviour available through
-     * a weak GroupInterface. So it would be enough to obtain a weak interface
-     * from one's group and then use its loadmodule method rather than that of
-     * the strong group reference.  However, that's a bit too big a change to be
-     * decided without more careful consideration.
-     */
-    public Module loadModule(ID assignedID, Advertisement impl) throws ProtocolNotSupportedException, PeerGroupException {
-        return groupImpl.loadModule(assignedID, impl);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Module loadModule(ID assignedID, ModuleSpecID specID, int where) {
-        return groupImpl.loadModule(assignedID, specID, where);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void publishGroup(String name, String description) throws IOException {
-        groupImpl.publishGroup(name, description);
-    }
-
-    /*
-     * Valuable application helpers: Various methods to instantiate groups.
-     */
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerGroup newGroup(Advertisement pgAdv) throws PeerGroupException {
-        return groupImpl.newGroup(pgAdv);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerGroup newGroup(PeerGroupID gid, Advertisement impl, String name, String description) throws PeerGroupException {
-        return groupImpl.newGroup(gid, impl, name, description);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerGroup newGroup(PeerGroupID gid) throws PeerGroupException {
-        return groupImpl.newGroup(gid);
-    }
-
-    /*
-     * shortcuts to the well-known services, in order to avoid calls to lookup.
-     */
-
-    /**
-     * {@inheritDoc}
-     */
-    public RendezVousService getRendezVousService() {
-        return groupImpl.getRendezVousService();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public EndpointService getEndpointService() {
-        return groupImpl.getEndpointService();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ResolverService getResolverService() {
-        return groupImpl.getResolverService();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public DiscoveryService getDiscoveryService() {
-        return groupImpl.getDiscoveryService();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerInfoService getPeerInfoService() {
-        return groupImpl.getPeerInfoService();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public MembershipService getMembershipService() {
-        return groupImpl.getMembershipService();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PipeService getPipeService() {
-        return groupImpl.getPipeService();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public AccessService getAccessService() {
-        return groupImpl.getAccessService();
-    }
-
-    /*
-     * A few convenience methods. This information is available from
-     * the peer and peergroup advertisement.
-     */
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerGroupID getPeerGroupID() {
-        return groupImpl.getPeerGroupID();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerID getPeerID() {
-        return groupImpl.getPeerID();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getPeerGroupName() {
-        return groupImpl.getPeerGroupName();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getPeerName() {
-        return groupImpl.getPeerName();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ConfigParams getConfigAdvertisement() {
-        ConfigParams configAdvertisement = groupImpl.getConfigAdvertisement();
-
-        if (configAdvertisement == null) {
-            return null;
-        }
-        return configAdvertisement.clone();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ModuleImplAdvertisement getAllPurposePeerGroupImplAdvertisement() throws Exception {
-        return groupImpl.getAllPurposePeerGroupImplAdvertisement();
-    }
-
-    public PeerGroup getParentGroup() {
-        return groupImpl.getParentGroup();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/Platform.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/Platform.java
deleted file mode 100644 (file)
index b35dacb..0000000
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.peergroup;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URL;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.exception.JxtaError;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.exception.ServiceNotFoundException;
-import net.jxta.id.ID;
-import net.jxta.logging.Logging;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.platform.JxtaLoader;
-import net.jxta.protocol.ConfigParams;
-import net.jxta.protocol.ModuleImplAdvertisement;
-
-import net.jxta.impl.endpoint.cbjx.CbJxDefs;
-import net.jxta.impl.endpoint.mcast.McastTransport;
-import net.jxta.impl.membership.pse.PSEMembershipService;
-import net.jxta.service.Service;
-
-/**
- * Provides the implementation for the World PeerGroup. The World peer group
- * differs from other peer groups in the following ways :
- * <ul>
- *     <li>The World Peer Group has no parent. It is the primordial peer group.
- *     </li>
- *     <li>The World Peer Group provides the default definition for the Network
- *     Peer Group. Peers are free to use alternate implementations for the
- *     Network PeerGroup.</li>
- *     <li>The World Peer Group is initialized with configuration parameters and
- *     the store home location.</li>
- * </ul>
- */
-public class Platform extends StdPeerGroup {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(Platform.class.getName());
-
-    /**
-     *  Create and populate the default module impl Advertisement for this class.
-     *
-     *  @return The default module impl advertisement for this class.
-     */
-    public static ModuleImplAdvertisement getDefaultModuleImplAdvertisement() {
-        ModuleImplAdvertisement implAdv = mkImplAdvBuiltin(PeerGroup.refPlatformSpecID, Platform.class.getName(), "Standard World PeerGroup Reference Implementation");
-
-        // Build the param section now.
-        StdPeerGroupParamAdv paramAdv = new StdPeerGroupParamAdv();
-
-        // Do the Services
-
-        // "Core" Services
-        paramAdv.addService(PeerGroup.endpointClassID, PeerGroup.refEndpointSpecID);
-        paramAdv.addService(PeerGroup.resolverClassID, PeerGroup.refResolverSpecID);
-        paramAdv.addService(PeerGroup.membershipClassID, PeerGroup.refMembershipSpecID);
-        paramAdv.addService(PeerGroup.accessClassID, PeerGroup.refAccessSpecID);
-
-        // "Standard" Services
-
-        paramAdv.addService(PeerGroup.discoveryClassID, PeerGroup.refDiscoverySpecID);
-        paramAdv.addService(PeerGroup.rendezvousClassID, PeerGroup.refRendezvousSpecID);
-        paramAdv.addService(PeerGroup.peerinfoClassID, PeerGroup.refPeerinfoSpecID);
-
-        // Do the Message Transports
-
-        paramAdv.addProto(PeerGroup.tcpProtoClassID, PeerGroup.refTcpProtoSpecID);
-        paramAdv.addProto(PeerGroup.httpProtoClassID, PeerGroup.refHttpProtoSpecID);
-        paramAdv.addProto(McastTransport.MCAST_TRANSPORT_CLASSID, McastTransport.MCAST_TRANSPORT_SPECID);
-
-        // Do the Applications
-
-        // (none)
-
-        // Insert the paramAdv in the World PeerGroup Impl Advertisement.
-        implAdv.setParam((XMLDocument) paramAdv.getDocument(MimeMediaType.XMLUTF8));
-
-        return implAdv;
-    }
-
-    /**
-     * This constructor was originally the standard constructor and must be
-     * retained in case the World PeerGroup is accidentally instantiated via
-     * the module loading infrastructure.
-     *
-     * @throws PeerGroupException if an initialization error occurs
-     */
-    public Platform() throws PeerGroupException {
-        throw new JxtaError("Zero params constructor is no longer supported for World PeerGroup class.");
-    }
-
-    /**
-     * Default constructor
-     *
-     * @param config    The configuration.
-     * @param storeHome Persistent store home.
-     */
-    public Platform(ConfigParams config, URI storeHome) {
-        // initialize the store location.
-        setStoreHome(storeHome);
-
-        // initialize the configuration advertisement.
-        setConfigAdvertisement(config);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected synchronized void initFirst(PeerGroup nullParent, ID assignedID, Advertisement impl) throws PeerGroupException {
-        if (initComplete) {
-            LOG.severe("You cannot initialize more than one World PeerGroup!");
-            throw new PeerGroupException("You cannot initialize more than one World PeerGroup!");
-        }
-
-        if (nullParent != null) {
-            LOG.severe("World PeerGroup cannot be instantiated with a parent group!");
-            throw new PeerGroupException("World PeerGroup cannot be instantiated with a parent group!");
-        }
-
-        ModuleImplAdvertisement implAdv = (ModuleImplAdvertisement) impl;
-        
-        if(null == implAdv) {
-            implAdv = getJxtaLoader().findModuleImplAdvertisement(getClass());
-        }
-
-        if (null != jxtaHome) {
-            try {
-                URL downloadablesURL = jxtaHome.resolve("Downloaded/").toURL();
-
-                getJxtaLoader().addURL(downloadablesURL);
-            } catch (MalformedURLException badPath) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Could not install path for downloadables into JXTA Class Loader.");
-                }
-            }
-        }
-
-        // Initialize the group.
-        super.initFirst(null, PeerGroupID.worldPeerGroupID, implAdv);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected synchronized void initLast() throws PeerGroupException {
-        super.initLast();
-
-        // Publish our own adv.
-        try {
-            publishGroup("World PeerGroup", "Standard World PeerGroup Reference Implementation");
-        } catch (IOException e) {
-            throw new PeerGroupException("Failed to publish World PeerGroup Advertisement", e);
-        }
-    }
-
-    /**
-     * Returns a ModuleImplAdvertisement suitable for the Network Peer Group.
-     * <p/>
-     * The ModuleImplAdvertisement returned differs from the one returned by
-     * StdPeerGroup in that it has a different specID, name and description, as
-     * well as the high-level message transports . This definition is always the
-     * same and has a well known ModuleSpecID. It includes the basic services,
-     * high-level message transports and the shell for main application.
-     *
-     * @return A ModuleImplAdvertisement suitable for the Network Peer Group.
-     */
-    @Override
-    public ModuleImplAdvertisement getAllPurposePeerGroupImplAdvertisement() {
-        JxtaLoader loader = getJxtaLoader();
-
-        // For now, use the well know NPG naming, it is not identical to the 
-        // allPurpose PG because we use the class ShadowPeerGroup which 
-        // initializes the peer config from its parent.
-        ModuleImplAdvertisement implAdv = loader.findModuleImplAdvertisement(PeerGroup.refNetPeerGroupSpecID);
-        
-        return implAdv;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected void checkServices() throws ServiceNotFoundException {
-        super.checkServices();
-        Service ignored;
-        ignored = lookupService(discoveryClassID);
-        ignored = lookupService(rendezvousClassID);
-        ignored = lookupService(peerinfoClassID);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/PlatformConfigurator.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/PlatformConfigurator.java
deleted file mode 100644 (file)
index ad4a684..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.peergroup;
-
-
-import net.jxta.exception.ConfiguratorException;
-import net.jxta.impl.protocol.PlatformConfig;
-import net.jxta.peergroup.Configurator;
-
-
-/**
- * Defines a configurator for the JXTA Platform peer group.
- *
- * @deprecated This interface has been replaced with the {@link net.jxta.platform.NetworkConfigurator}.
- */
-@Deprecated
-public interface PlatformConfigurator extends Configurator {
-
-    /**
-     * Retrieve the associated {@link net.jxta.impl.protocol.PlatformConfig} and
-     * potentially performing any required configuration of the parameters 
-     * before returning.
-     *
-     * @return PlatformConfig
-     * @throws net.jxta.exception.ConfiguratorException If configuration error 
-     * occurs.
-     */
-    public PlatformConfig getPlatformConfig() throws ConfiguratorException;
-
-    /**
-     * Sets the associated {@link net.jxta.impl.protocol.PlatformConfig}.
-     *
-     * @param pc the configuration
-     */
-    public void setPlatformConfig(PlatformConfig pc);
-
-    /**
-     * Sets the reconfiguration status to the specified status. If
-     * {@code true} then reconfiguration will be forced the next time the
-     * {@link net.jxta.impl.protocol.PlatformConfig} is retrieved.
-     *
-     * @param forceReconfig If {@code true} then a forced reconfiguration will
-     * occur the next time {@link #getPlatformConfig()} is called.
-     */
-    public void setReconfigure(boolean forceReconfig);
-
-    /**
-     * Determine if a forced reconfiguration is set for the next call to
-     * {@link #getPlatformConfig()}.
-     *
-     * @return Returns {@code true} if a forced reconfiguration will occur the
-     * next time {@link #getPlatformConfig()} is called.
-     */
-    public boolean isReconfigure();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/RefCountPeerGroupInterface.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/RefCountPeerGroupInterface.java
deleted file mode 100644 (file)
index f7deb22..0000000
+++ /dev/null
@@ -1,267 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.peergroup;
-
-import net.jxta.exception.ServiceNotFoundException;
-import net.jxta.id.ID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.service.Service;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * RefCountPeerGroupInterface is a PeerGroupInterface object that
- * also serves as a peergroup very-strong reference. When the last
- * such goes away, the peergroup terminates itself despite the existence
- * of aeternal strong references from the various service's threads
- * that would prevent it from ever being finalized.
- * The alternative: to give only weak references to threads seems impractical.
- */
-class RefCountPeerGroupInterface extends PeerGroupInterface {
-
-    private Map roleMap;
-
-    /**
-     * Constructs an interface object that front-ends a given
-     * PeerGroup object.
-     *
-     * @param theRealThing the peer group
-     */
-    RefCountPeerGroupInterface(GenericPeerGroup theRealThing) {
-        super(theRealThing);
-    }
-
-    RefCountPeerGroupInterface(GenericPeerGroup theRealThing, Map roleMap) {
-        super(theRealThing);
-        this.roleMap = roleMap;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Normally it is ignored. By definition, the interface object
-     * protects the real object's start/stop methods from being called.
-     * <p/>
-     * However we have to make an exception for groups: even the creator
-     * of a group does not have access to the real object. So the interface
-     * has to forward startApp to the group, which is responsible for
-     * ensuring that it is executed only once (if needed).
-     *
-     * @param arg A table of strings arguments.
-     * @return int status indication.
-     */
-    @Override
-    public int startApp(String[] arg) {
-        // Unlike our superclass's method, we do call the real
-        // startApp method.
-        PeerGroup temp = groupImpl;
-
-        if (null == temp) {
-            throw new IllegalStateException("This Peer Group interface object has been unreferenced and can no longer be used.");
-        }
-
-        return temp.startApp(arg);
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * This is here for temporary class hierarchy reasons.
-     * it is normally ignored. By definition, the interface object
-     * protects the real object's start/stop methods from being called
-     * <p/>
-     * In that case we have to make an exception. Most applications
-     * currently assume that they do not share the group object and that they do
-     * refer to the real object directly. They call stopApp to signify their
-     * intention of no-longer using the group. Now that groups are shared,
-     * we convert stopApp() to unref() for compatibility.
-     * We could also just do nothing and let the interface be GC'd but
-     * calling unref() makes the group go away immediately if not shared,
-     * which is what applications that call stopApp expect.
-     */
-    @Override
-    public void stopApp() {
-        unref();
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Since THIS is already such an object, it could return itself.
-     * However, we want the group to know about the number of interfaces
-     * objects floating around, so, we'll have the group make a new one.
-     * That way, applications which want to use unref() on interfaces can
-     * avoid sharing interface objects by using getInterface() as a sort of
-     * clone with the additional ref-counting semantics.
-     *
-     * @return Service An interface object that implements
-     *         this service and nothing more.
-     */
-    @Override
-    public Service getInterface() {
-        PeerGroup temp = groupImpl;
-        if (null == temp) {
-            throw new IllegalStateException("This Peer Group interface object has been unreferenced and can no longer be used.");
-        }
-        return temp.getInterface();
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Returns a weak interface object that refers to this interface
-     * object rather than to the group directly. The reason for that
-     * is that we want the owner of this interface object to be able
-     * to invalidate all weak interface objects made out of this interface
-     * object, without them keeping a reference to the group object, and
-     * without necessarily having to terminate the group.
-     *
-     * @return PeerGroup A weak interface object that implements
-     *         this group and nothing more.
-     */
-
-    @Override
-    public PeerGroup getWeakInterface() {
-        return new PeerGroupInterface(this);
-    }
-
-    /**
-     * Can only be called once. After that the reference is no-longer usuable.
-     */
-    @Override
-    public void unref() {
-        GenericPeerGroup theGrp;
-
-        synchronized (this) {
-            if (groupImpl == null) {
-                return;
-            }
-
-            theGrp = (GenericPeerGroup) groupImpl;
-            groupImpl = null;
-        }
-        theGrp.decRefCount();
-    }
-
-    /**
-     * Service-specific role mapping is implemented here.
-     **/
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Service lookupService(ID name) throws ServiceNotFoundException {
-
-        return lookupService(name, 0);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Service lookupService(ID name, int roleIndex) throws ServiceNotFoundException {
-
-        if (roleMap != null) {
-            ID[] map = (ID[]) roleMap.get(name);
-
-            // If there is a map, remap; else, identity is the default for
-            // role 0 only; the default mapping has only index 0.
-
-            if (map != null) {
-                if (roleIndex < 0 || roleIndex >= map.length) {
-                    throw new ServiceNotFoundException(name + "[" + roleIndex + "]");
-                }
-
-                // We have a translation; look it up directly
-                return groupImpl.lookupService(map[roleIndex]);
-            }
-        }
-
-        // No translation; use the name as-is, provided roleIndex is 0.
-        // Do not call groupImpl.lookupService(name, id); group impls
-        // should not have to implement it at all.
-
-        if (roleIndex != 0) {
-            throw new ServiceNotFoundException(name + "[" + roleIndex + "]");
-        }
-        return groupImpl.lookupService(name);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Iterator getRoleMap(ID name) {
-
-        if (roleMap != null) {
-            ID[] map = (ID[]) roleMap.get(name);
-
-            // If there is a map, remap; else, identity is the default for
-            // role 0 only; the default mapping has only index 0.
-
-            if (map != null) {
-                // return an iterator on it.
-                return Collections.unmodifiableList(Arrays.asList(map)).iterator();
-            }
-        }
-        // No translation; use the given name in a singleton.
-        return Collections.singletonList(name).iterator();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/ShadowPeerGroup.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/ShadowPeerGroup.java
deleted file mode 100644 (file)
index 7d6adfe..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *
- *  The Sun Project JXTA(TM) Software License
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *
- *  3. The end-user documentation included with the redistribution, if any, must
- *     include the following acknowledgment: "This product includes software
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology."
- *     Alternately, this acknowledgment may appear in the software itself, if
- *     and wherever such third-party acknowledgments normally appear.
- *
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must
- *     not be used to endorse or promote products derived from this software
- *     without prior written permission. For written permission, please contact
- *     Project JXTA at http://www.jxta.org.
- *
- *  5. Products derived from this software may not be called "JXTA", nor may
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United
- *  States and other countries.
- *
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of
- *  the license in source files.
- *
- *  ====================================================================
- *
- *  This software consists of voluntary contributions made by many individuals
- *  on behalf of Project JXTA. For more information on Project JXTA, please see
- *  http://www.jxta.org.
- *
- *  This license is based on the BSD license adopted by the Apache Foundation.
- */
-package net.jxta.impl.peergroup;
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.XMLElement;
-import net.jxta.id.ID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.impl.endpoint.cbjx.CbJxDefs;
-import net.jxta.impl.membership.pse.PSEMembershipService;
-import net.jxta.platform.Application;
-import net.jxta.platform.Module;
-import net.jxta.protocol.ModuleImplAdvertisement;
-
-/**
- * ShadowPeerGroup is almost a regular StdPeerGroup, except that it borrows its
- * parent's configuration. The only real use is for the Net Peer Group.
- */
-public class ShadowPeerGroup extends StdPeerGroup {
-
-    /**
-     *  Our application is the JXSE Shell.
-     */
-    private Application shell = null;
-
-    /**
-     *  Create and populate the default module impl Advertisement for this class.
-     *
-     *  @return The default module impl advertisement for this class.
-     */
-    public static ModuleImplAdvertisement getDefaultModuleImplAdvertisement() {
-        ModuleImplAdvertisement implAdv = mkImplAdvBuiltin(PeerGroup.refNetPeerGroupSpecID, ShadowPeerGroup.class.getName(), "Default Network PeerGroup reference implementation");
-
-        // Build the param section now.
-        StdPeerGroupParamAdv paramAdv = new StdPeerGroupParamAdv();
-
-        // Set the services
-        // "Core" Services
-        paramAdv.addService(PeerGroup.endpointClassID, PeerGroup.refEndpointSpecID);
-        paramAdv.addService(PeerGroup.resolverClassID, PeerGroup.refResolverSpecID);
-        paramAdv.addService(PeerGroup.membershipClassID, PSEMembershipService.pseMembershipSpecID);
-        paramAdv.addService(PeerGroup.accessClassID, PeerGroup.refAccessSpecID);
-
-        // "Standard" Services
-        paramAdv.addService(PeerGroup.discoveryClassID, PeerGroup.refDiscoverySpecID);
-        paramAdv.addService(PeerGroup.rendezvousClassID, PeerGroup.refRendezvousSpecID);
-        paramAdv.addService(PeerGroup.pipeClassID, PeerGroup.refPipeSpecID);
-        paramAdv.addService(PeerGroup.peerinfoClassID, PeerGroup.refPeerinfoSpecID);
-        paramAdv.addService(PeerGroup.proxyClassID, PeerGroup.refProxySpecID);
-
-        // High-level Message Transports.
-        paramAdv.addProto(PeerGroup.routerProtoClassID, PeerGroup.refRouterProtoSpecID);
-        paramAdv.addProto(PeerGroup.tlsProtoClassID, PeerGroup.refTlsProtoSpecID);
-        paramAdv.addProto(CbJxDefs.msgtptClassID, CbJxDefs.cbjxMsgTransportSpecID);
-        paramAdv.addProto(PeerGroup.relayProtoClassID, PeerGroup.refRelayProtoSpecID);
-
-        // Pour our newParamAdv in implAdv
-        XMLElement paramElement = (XMLElement) paramAdv.getDocument(MimeMediaType.XMLUTF8);
-
-        implAdv.setParam(paramElement);
-
-        return implAdv;
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * <p/>This implementation initializes the configuration advertisement with
-     * that of the parent group and otherwise behave exactly like its superclass.
-     */
-    @Override
-    protected void initFirst(PeerGroup parent, ID assignedID, Advertisement impl) throws PeerGroupException {
-
-        // Set the peer configuration before we start.
-        setConfigAdvertisement(parent.getConfigAdvertisement());
-
-        // Do the regular stuff now.
-        super.initFirst(parent, assignedID, impl);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected void initLast() throws PeerGroupException {
-        // Nothing special, but that could change in the future
-        // Just remember that the possibility exists.
-        super.initLast();
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * If it is available, start the shell.
-     */
-    @Override
-    public int startApp(String[] args) {
-        int result = super.startApp(args);
-
-        if (Module.START_OK != result) {
-            return result;
-        }
-
-        // Main app is the shell (if it is available).
-        if (null != getLoader().findModuleImplAdvertisement(PeerGroup.refShellSpecID)) {
-            shell = (Application) loadModule(PeerGroup.applicationClassID, PeerGroup.refShellSpecID, PeerGroup.Both);
-
-            if (null == shell) {
-                return -1;
-            }
-
-            result = shell.startApp(new String[0]);
-        }
-
-        return result;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>If we started the shell we now must stop it.
-     */
-    @Override
-    public void stopApp() {
-        if (null != shell) {
-            shell.stopApp();
-            shell = null;
-        }
-
-        super.stopApp();
-    }
-}
\ No newline at end of file
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/StdPeerGroup.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/StdPeerGroup.java
deleted file mode 100644 (file)
index f417935..0000000
+++ /dev/null
@@ -1,986 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *
- *  The Sun Project JXTA(TM) Software License
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *
- *  3. The end-user documentation included with the redistribution, if any, must
- *     include the following acknowledgment: "This product includes software
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology."
- *     Alternately, this acknowledgment may appear in the software itself, if
- *     and wherever such third-party acknowledgments normally appear.
- *
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must
- *     not be used to endorse or promote products derived from this software
- *     without prior written permission. For written permission, please contact
- *     Project JXTA at http://www.jxta.org.
- *
- *  5. Products derived from this software may not be called "JXTA", nor may
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United
- *  States and other countries.
- *
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of
- *  the license in source files.
- *
- *  ====================================================================
- *
- *  This software consists of voluntary contributions made by many individuals
- *  on behalf of Project JXTA. For more information on Project JXTA, please see
- *  http://www.jxta.org.
- *
- *  This license is based on the BSD license adopted by the Apache Foundation.
- */
-package net.jxta.impl.peergroup;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.lang.reflect.Method;
-import java.net.URI;
-import java.net.URL;
-
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.endpoint.MessageTransport;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.exception.ServiceNotFoundException;
-import net.jxta.id.ID;
-import net.jxta.impl.cm.Cm;
-import net.jxta.impl.cm.SrdiIndex;
-import net.jxta.logging.Logging;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.platform.JxtaLoader;
-import net.jxta.platform.Module;
-import net.jxta.platform.ModuleClassID;
-import net.jxta.platform.ModuleSpecID;
-import net.jxta.protocol.ConfigParams;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.service.Service;
-
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import net.jxta.document.TextElement;
-
-/**
- * A subclass of GenericPeerGroup that makes a peer group out of independent
- * plugin services listed in its impl advertisement.
- */
-public class StdPeerGroup extends GenericPeerGroup {
-    
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(StdPeerGroup.class.getName());
-    
-    // A few things common to all ImplAdv for built-in things.
-    public static final XMLDocument STD_COMPAT = mkCS();
-    public static final String MODULE_IMPL_STD_URI = "http://jxta-jxse.dev.java.net/download/jxta.jar";
-    public static final String MODULE_IMPL_STD_PROVIDER = "sun.com";
-    
-    protected static final String STD_COMPAT_FORMAT = "Efmt";
-    
-    // FIXME 20061206 bondolo Update this to "JRE1.5" after 2.5 release. 2.4.1 and earlier don't do version comparison correctly.
-    
-    /**
-     * The Specification title and Specification version we require.
-     */
-    protected static final String STD_COMPAT_FORMAT_VALUE = "JDK1.4.1";
-    protected static final String STD_COMPAT_BINDING = "Bind";
-    protected static final String STD_COMPAT_BINDING_VALUE = "V2.0 Ref Impl";
-    
-    static {
-        // Initialize the JXTA class loader with the standard modules.
-        try {
-            Enumeration<URL> allProviderLists = GenericPeerGroup.class.getClassLoader().getResources("META-INF/services/net.jxta.platform.Module");
-            for (URL providers : Collections.list(allProviderLists)) {
-                registerFromFile(providers);
-            }
-        } catch (IOException ex) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed to locate provider lists", ex);
-            }
-        }
-        
-        // XXX Force redefinition of StdPeerGroup implAdvertisement.
-        getJxtaLoader().defineClass(getDefaultModuleImplAdvertisement());
-    }
-    
-    /**
-     * Register instance classes given a URL to a file containing modules which
-     * must be found on the current class path. Each line of the file contains a 
-     * module spec ID, the class name and the Module description. The fields are 
-     * separated by whitespace. Comments are marked with a '#', the pound sign. 
-     * Any text following # on any line in the file is ignored.
-     *
-     * @param providerList the URL to a file containing a list of modules
-     * @return {@code true} if at least one of the instance classes could be
-     * registered otherwise {@code false}.
-     */
-    private static boolean registerFromFile(URL providers) {
-        boolean registeredSomething = false;
-        InputStream urlStream = null;
-        
-        try {
-            urlStream = providers.openStream();
-            BufferedReader reader = new BufferedReader(new InputStreamReader(urlStream, "UTF-8"));
-            
-            String provider;
-            while ((provider = reader.readLine()) != null) {
-                int comment = provider.indexOf('#');
-                
-                if (comment != -1) {
-                    provider = provider.substring(0, comment);
-                }
-                
-                provider = provider.trim();
-                
-                if (0 == provider.length()) {
-                    continue;
-                }
-                
-                try {
-                    String[] parts = provider.split("\\s", 3);
-                    
-                    if (3 == parts.length) {
-                        ModuleSpecID msid = ModuleSpecID.create(URI.create(parts[0]));
-                        String code = parts[1];
-                        String description = parts[2];
-                        
-                        ModuleImplAdvertisement moduleImplAdv;
-                        
-                        try {
-                            Class<Module> moduleClass = (Class<Module>) Class.forName(code);
-                            
-                            Method getImplAdvMethod = moduleClass.getMethod("getDefaultModuleImplAdvertisement");
-                            
-                            moduleImplAdv = (ModuleImplAdvertisement) getImplAdvMethod.invoke(null);
-                        } catch(Exception failed) {
-                            // Use default ModuleImplAdvertisement.
-                            moduleImplAdv = StdPeerGroup.mkImplAdvBuiltin(msid, code, description);
-                        }
-                        
-                        getJxtaLoader().defineClass(moduleImplAdv);
-                        
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Registered Module " + msid + " : " + parts[1]);
-                        }
-                    } else {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.log(Level.WARNING, "Failed to register \'" + provider + "\'");
-                        }
-                    }
-                } catch (Exception allElse) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Failed to register \'" + provider + "\'", allElse);
-                    }
-                }
-            }
-        } catch (IOException ex) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed to read provider list " + providers, ex);
-            }
-        } finally {
-            if (null != urlStream) {
-                try {
-                    urlStream.close();
-                } catch (IOException ignored) {
-                    
-                }
-            }
-        }
-        return registeredSomething;
-    }
-    
-    /**
-     * If {@code true} then the PeerGroup has been started.
-     */
-    private volatile boolean started = false;
-    
-    /**
-     * The order in which we started the services.
-     */
-    private final List<ModuleClassID> moduleStartOrder = new ArrayList<ModuleClassID>();
-    
-    /**
-     * A map of the Message Transports for this group.
-     * <p/>
-     * <ul>
-     * <li>keys are {@link net.jxta.platform.ModuleClassID}</li>
-     * <li>values are {@link net.jxta.platform.Module}, but should also be
-     * {@link net.jxta.endpoint.MessageTransport}</li>
-     * </ul>
-     */
-    private final Map<ModuleClassID, Object> messageTransports = new HashMap<ModuleClassID, Object>();
-    
-    /**
-     * A map of the applications for this group.
-     * <p/>
-     * <ul>
-     * <li>keys are {@link net.jxta.platform.ModuleClassID}</li>
-     * <li>values are {@link net.jxta.platform.Module} or
-     * {@link net.jxta.protocol.ModuleImplAdvertisement} or
-     * {@link net.jxta.platform.ModuleSpecID}</li>
-     * </ul>
-     */
-    private final Map<ModuleClassID, Object> applications = new HashMap<ModuleClassID, Object>();
-    
-    /**
-     * Cache for this group.
-     */
-    private Cm cm = null;
-    
-    private static XMLDocument mkCS() {
-        XMLDocument doc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "Comp");
-        
-        XMLElement e = doc.createElement(STD_COMPAT_FORMAT, STD_COMPAT_FORMAT_VALUE);
-        
-        doc.appendChild(e);
-        
-        e = doc.createElement(STD_COMPAT_BINDING, STD_COMPAT_BINDING_VALUE);
-        doc.appendChild(e);
-        return doc;
-    }
-    
-    /**
-     * An internal convenience method essentially for bootstrapping.
-     * Make a standard ModuleImplAdv for any service that comes builtin this
-     * reference implementation.
-     * In most cases there are no params, so we do not take that argument.
-     * The invoker may add params afterwards.
-     *
-     * @param specID spec ID
-     * @param code   code uri
-     * @param descr  description
-     * @return a ModuleImplAdvertisement
-     */
-    static ModuleImplAdvertisement mkImplAdvBuiltin(ModuleSpecID specID, String code, String descr) {
-        ModuleImplAdvertisement implAdv = (ModuleImplAdvertisement)
-        AdvertisementFactory.newAdvertisement(ModuleImplAdvertisement.getAdvertisementType());
-        
-        implAdv.setModuleSpecID(specID);
-        implAdv.setCompat(STD_COMPAT);
-        implAdv.setCode(code);
-        implAdv.setUri(MODULE_IMPL_STD_URI);
-        implAdv.setProvider(MODULE_IMPL_STD_PROVIDER);
-        implAdv.setDescription(descr);
-        
-        return implAdv;
-    }
-    
-    /**
-     *  Create and populate the default module impl Advertisement for this class.
-     *
-     *  @return The default module impl advertisement for this class.
-     */
-    private static ModuleImplAdvertisement getDefaultModuleImplAdvertisement() {
-        ModuleImplAdvertisement implAdv = mkImplAdvBuiltin(PeerGroup.allPurposePeerGroupSpecID, StdPeerGroup.class.getName(), "General Purpose Peer Group Implementation");
-        
-        // Create the service list for the group.
-        StdPeerGroupParamAdv paramAdv = new StdPeerGroupParamAdv();
-        ModuleImplAdvertisement moduleAdv;
-        
-        // set the services
-        
-        // core services
-        JxtaLoader loader = getJxtaLoader();
-        
-        moduleAdv = loader.findModuleImplAdvertisement(PeerGroup.refEndpointSpecID);
-        paramAdv.addService(PeerGroup.endpointClassID, moduleAdv);
-        
-        moduleAdv = loader.findModuleImplAdvertisement(PeerGroup.refResolverSpecID);
-        paramAdv.addService(PeerGroup.resolverClassID, moduleAdv);
-        
-        moduleAdv = loader.findModuleImplAdvertisement(PeerGroup.refMembershipSpecID);
-        paramAdv.addService(PeerGroup.membershipClassID, moduleAdv);
-        
-        moduleAdv = loader.findModuleImplAdvertisement(PeerGroup.refAccessSpecID);
-        paramAdv.addService(PeerGroup.accessClassID, moduleAdv);
-        
-        // standard services
-        
-        moduleAdv = loader.findModuleImplAdvertisement(PeerGroup.refDiscoverySpecID);
-        paramAdv.addService(PeerGroup.discoveryClassID, moduleAdv);
-        
-        moduleAdv = loader.findModuleImplAdvertisement(PeerGroup.refRendezvousSpecID);
-        paramAdv.addService(PeerGroup.rendezvousClassID, moduleAdv);
-        
-        moduleAdv = loader.findModuleImplAdvertisement(PeerGroup.refPipeSpecID);
-        paramAdv.addService(PeerGroup.pipeClassID, moduleAdv);
-        
-        moduleAdv = loader.findModuleImplAdvertisement(PeerGroup.refPeerinfoSpecID);
-        paramAdv.addService(PeerGroup.peerinfoClassID, moduleAdv);
-        
-        // Applications
-        
-        moduleAdv = loader.findModuleImplAdvertisement(PeerGroup.refShellSpecID);
-        if (null != moduleAdv) {
-            paramAdv.addApp(PeerGroup.applicationClassID, moduleAdv);
-        }
-        
-        // Insert the newParamAdv in implAdv
-        XMLElement paramElement = (XMLElement) paramAdv.getDocument(MimeMediaType.XMLUTF8);
-        
-        implAdv.setParam(paramElement);
-        
-        return implAdv;
-    }
-    
-    /**
-     * constructor
-     */
-    public StdPeerGroup() {
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    // @Override
-    public boolean compatible(Element compat) {
-        return isCompatible(compat);
-    }
-    
-    /**
-     * Evaluates if the given compatibility statement makes the module that
-     * bears it is loadable by this group.
-     *
-     * @param compat The compatibility statement being tested.
-     * @return {@code true} if we are compatible with the provided statement
-     * otherwise {@code false}.
-     */
-    static boolean isCompatible(Element compat) {
-        boolean formatOk = false;
-        boolean bindingOk = false;
-        
-        if(!(compat instanceof TextElement)) {
-            return false;
-        }
-        
-        try {
-            Enumeration<TextElement> hisChildren = ((TextElement)compat).getChildren();
-            int i = 0;
-            while (hisChildren.hasMoreElements()) {
-                // Stop after 2 elements; there shall not be more.
-                if (++i > 2) {
-                    return false;
-                }
-                
-                TextElement e = hisChildren.nextElement();
-                String key = e.getKey();
-                String val = e.getValue().trim();
-                
-                if (STD_COMPAT_FORMAT.equals(key)) {
-                    Package javaLangPackage = Package.getPackage("java.lang");
-                    
-                    boolean specMatches;
-                    String version;
-                    
-                    if (val.startsWith("JDK") || val.startsWith("JRE")) {
-                        specMatches = true;
-                        version = val.substring(3).trim(); // allow for spaces.
-                    } else if (val.startsWith(javaLangPackage.getSpecificationTitle())) {
-                        specMatches = true;
-                        version = val.substring(javaLangPackage.getSpecificationTitle().length()).trim(); // allow for spaces.
-                    } else {
-                        specMatches = false;
-                        version = null;
-                    }
-
-                    formatOk = specMatches && javaLangPackage.isCompatibleWith(version);
-                } else if (STD_COMPAT_BINDING.equals(key) && STD_COMPAT_BINDING_VALUE.equals(val)) {
-                    bindingOk = true;
-                } else {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Bad element in compatibility statement : " + key);
-                    }
-                    return false; // Might as well stop right now.
-                }
-            }
-        } catch (Exception any) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failure handling compatibility statement", any);
-            }
-            return false;
-        }
-        
-        return formatOk && bindingOk;
-    }
-    
-    /**
-     * Builds a table of modules indexed by their class ID.
-     * The values are the loaded modules, the keys are their classId.
-     * This routine interprets the parameter list in the advertisement.
-     *
-     * @param modules    The modules to load
-     * @param privileged if true then modules will get a real reference to
-     *                   the group loading them, otherwise its an interface object.
-     */
-    protected void loadAllModules(Map<ModuleClassID, Object> modules, boolean privileged) {
-        
-        Iterator<Map.Entry<ModuleClassID, Object>> eachModule = modules.entrySet().iterator();
-        
-        while (eachModule.hasNext()) {
-            Map.Entry<ModuleClassID, Object> anEntry = eachModule.next();
-            ModuleClassID classID = anEntry.getKey();
-            Object value = anEntry.getValue();
-            
-            // Already loaded.
-            if (value instanceof Module) {
-                continue;
-            }
-            
-            // Try and load it.
-            try {
-                Module theModule = null;
-                
-                if (value instanceof ModuleImplAdvertisement) {
-                    // Load module will republish locally but not in the
-                    // parent since that adv does not come from there.
-                    theModule = loadModule(classID, (ModuleImplAdvertisement) value, privileged);
-                } else if (value instanceof ModuleSpecID) {
-                    // loadModule will republish both locally and in the parent
-                    // Where the module was fetched.
-                    theModule = loadModule(classID, (ModuleSpecID) value, FromParent, privileged);
-                } else {
-                    if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                        LOG.severe("Skipping: " + classID + " Unsupported module descriptor : " + value.getClass().getName());
-                    }
-                    eachModule.remove();
-                    continue;
-                }
-                
-                if (theModule == null) {
-                    throw new PeerGroupException("Could not find a loadable implementation for : " + classID);
-                }
-                
-                anEntry.setValue(theModule);
-            } catch (Exception e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Could not load module for class ID : " + classID, e);
-                    if (value instanceof ModuleImplAdvertisement) {
-                        LOG.log(Level.WARNING, "Will be missing from peer group : " +
-                                ((ModuleImplAdvertisement) value).getDescription());
-                    } else {
-                        LOG.log(Level.WARNING, "Will be missing from peer group: " + value);
-                    }
-                }
-                eachModule.remove();
-            }
-        }
-    }
-    
-    /**
-     * The group does not care for start args, and does not come-up
-     * with args to pass to its main app. So, until we decide on something
-     * more useful, the args of the group's startApp are passed-on to the
-     * group's main app. NB: both the apps init and startApp methods are
-     * invoked.
-     *
-     * @return int Status.
-     */
-    @Override
-    public int startApp(String[] arg) {
-        
-        if (!initComplete) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("Group has not been initialized or init failed.");
-            }
-            return -1;
-        }
-        
-        // FIXME: maybe concurrent callers should be blocked until the
-        // end of startApp(). That could mean forever, though.
-        if (started) {
-            return Module.START_OK;
-        }
-        
-        started = true;
-        
-        // Normally does nothing, but we have to.
-        int res = super.startApp(arg);
-        
-        if (Module.START_OK != res) {
-            return res;
-        }
-        
-        loadAllModules(applications, false); // Apps are non-privileged;
-        
-        res = startModules((Map) applications);
-        
-        return res;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void stopApp() {
-        // Shut down the group services and message transports.
-        Collections.reverse(moduleStartOrder);
-        
-        for (ModuleClassID aModule : moduleStartOrder) {
-            try {
-                if (messageTransports.containsKey(aModule)) {
-                    Module theMessageTransport = (Module) messageTransports.remove(aModule);
-                    
-                    theMessageTransport.stopApp();
-                } else {
-                    removeService(aModule);
-                }
-            } catch (Exception any) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failed to stop module: " + aModule, any);
-                }
-            }
-        }
-        
-        moduleStartOrder.clear();
-        
-        if (!messageTransports.isEmpty()) {
-            LOG.warning(messageTransports.size() + " message transports could not be shut down during peer group stop.");
-        }
-        
-        messageTransports.clear();
-        
-        super.stopApp();
-        
-        if (cm != null) {
-            cm.stop();
-            cm = null;
-        }
-    }
-    
-    /**
-     * Given a list of all the modules we need to start attempt to start them.
-     * There is an a-priori order, but we'll iterate over the list until all
-     * where able to complete their start phase or no progress is made. Since we
-     * give modules the opportunity to pretend that they are making progress, we
-     * need to have a safeguard: we will not iterate through the list more than
-     * N^2 + 1 times without at least one module completing;  N being the number
-     * of modules still in the list. This should cover the worst case scenario
-     * and still allow the process to eventually fail if it has no chance of
-     * success.
-     *
-     * @param services The services to start.
-     */
-    private int startModules(Map<ModuleClassID,Module> services) {
-        int iterations = 0;
-        int maxIterations = services.size() * services.size() + iterations + 1;
-        
-        boolean progress = true;
-        
-        while (!services.isEmpty() && (progress || (iterations < maxIterations))) {
-            progress = false;
-            iterations++;
-            
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(MessageFormat.format("Service startApp() round {0} of {1}(max)", iterations, maxIterations));
-            }
-            
-            Iterator<Map.Entry<ModuleClassID, Module>> eachService = services.entrySet().iterator();
-            
-            while (eachService.hasNext()) {
-                Map.Entry<ModuleClassID, Module> anEntry = eachService.next();
-                ModuleClassID mcid = anEntry.getKey();
-                Module aModule = anEntry.getValue();
-                
-                int res;
-                
-                try {
-                    res = aModule.startApp(null);
-                } catch (Throwable all) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Exception in startApp() : " + aModule, all);
-                    }
-                    res = -1;
-                }
-                
-                switch (res) {
-                    case Module.START_OK:
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Module started : " + aModule);
-                        }
-                        if (aModule instanceof Service) {
-                            addService(mcid, (Service) aModule);
-                        } else {
-                            messageTransports.put(mcid, aModule);
-                        }
-                        
-                        moduleStartOrder.add(mcid);
-                        eachService.remove();
-                        progress = true;
-                        break;
-                        
-                    case Module.START_AGAIN_PROGRESS:
-                        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                            LOG.finer("Service made progress during start : " + aModule);
-                        }
-                        progress = true;
-                        break;
-                        
-                    case Module.START_AGAIN_STALLED:
-                        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                            LOG.finer("Service stalled during start : " + aModule);
-                        }
-                        break;
-                        
-                    case Module.START_DISABLED:
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Service declined to start : " + aModule);
-                        }
-                        eachService.remove();
-                        progress = true;
-                        break;
-                        
-                    default: // (negative)
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.warning("Service failed to start (" + res + ") : " + aModule);
-                        }
-                        eachService.remove();
-                        progress = true;
-                        break;
-                }
-            }
-            
-            if (progress) {
-                maxIterations = services.size() * services.size() + iterations + 1;
-            }
-        }
-        
-        // Uh-oh. Services co-dependency prevented them from starting.
-        if (!services.isEmpty()) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                StringBuilder failed = new StringBuilder( "No progress is being made in starting services after "
-                        + iterations + " iterations. Giving up.");
-                
-                failed.append("\nThe following services could not be started : ");
-                
-                for (Map.Entry<ModuleClassID, Module> aService : services.entrySet()) {
-                    failed.append("\n\t");
-                    failed.append(aService.getKey());
-                    failed.append(" : ");
-                    failed.append(aService.getValue());
-                }
-                
-                LOG.severe(failed.toString());
-            }
-            
-            return -1;
-        }
-        
-        return Module.START_OK;
-    }
-    
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * This method loads and initializes all of the peer group modules
-     * described in the provided implementation advertisement. Then, all modules
-     * are placed in a list and the list is processed iteratively. During each
-     * iteration, the {@link Module#startApp(String[])} method of each module
-     * is invoked once. Iterations continue until no progress is being made or
-     * the list is empty.
-     * <p/>
-     * The status returned by the {@link Module#startApp(String[])} method
-     * of each module is considered as follows:
-     * <p/>
-     * <ul>
-     * <li>{@link Module#START_OK}: The module is removed from the list of
-     * modules to be started and its {@link Module#startApp(String[])}
-     * method will not be invoked again.
-     * </li>
-     * <p/>
-     * <li>{@link Module#START_AGAIN_PROGRESS}: The module remains in the
-     * list of modules to be started and its {@link Module#startApp(String[])}
-     * method will be invoked during the next iteration, if there is one. </li>
-     * <p/>
-     * <li>{@link Module#START_AGAIN_STALLED}: The module remains in the list
-     * of modules to be started and its {@link Module#startApp(String[])}
-     * method will be invoked during the next iteration if there is one. </li>
-     * <p/>
-     * <li>Any other value: The module failed to initialize. Its
-     * {@link Module#startApp(String[])} method will not be invoked again.</li>
-     * </ul>
-     * <p/>
-     * Iterations through the list stop when:
-     * <ul>
-     * <li>The list is empty: the group initialization proceeds.</li>
-     * <p/>
-     * <li>A complete iteration was performed and all modules returned
-     * {@link Module#START_AGAIN_STALLED}: a {@link PeerGroupException}
-     * is thrown.</li>
-     * <p/>
-     * <li>A number of complete iteration completed without any module
-     * returning {@link Module#START_OK}: a {@link PeerGroupException}
-     * is thrown. The number of complete iterations before that happens is
-     * computed as 1 + the square of the number of modules currently in the
-     * list.</li>
-     * </ul>
-     */
-    @Override
-    protected synchronized void initFirst(PeerGroup parent, ID assignedID, Advertisement impl) throws PeerGroupException {
-        
-        if (initComplete) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("You cannot initialize a PeerGroup more than once !");
-            }
-            return;
-        }
-        
-        // Set-up the minimal GenericPeerGroup
-        super.initFirst(parent, assignedID, impl);
-        
-        // assignedID might have been null. It is now the peer group ID.
-        assignedID = getPeerGroupID();
-        
-        // initialize cm before starting services.
-        try {
-            cm = new Cm(getHomeThreadGroup(),
-                    getStoreHome(), assignedID.getUniqueValue().toString(),
-                    Cm.DEFAULT_GC_MAX_INTERVAL, false);
-        } catch (Exception e) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Error during creation of local store", e);
-            }
-            throw new PeerGroupException("Error during creation of local store", e);
-        }
-        
-        // flush srdi for this group
-        SrdiIndex.clearSrdi(this);
-        
-        // Load the list of peer group services from the impl advertisement params.
-        StdPeerGroupParamAdv paramAdv = new StdPeerGroupParamAdv(implAdvertisement.getParam());
-        
-        Map<ModuleClassID, Object> initServices = new HashMap<ModuleClassID, Object>(paramAdv.getServices());
-        
-        initServices.putAll(paramAdv.getProtos());
-        
-        // Remove the modules disabled in the configuration file.
-        ConfigParams conf = getConfigAdvertisement();
-        
-        if(null != conf) {
-            Iterator<ModuleClassID> eachModule = initServices.keySet().iterator();
-            
-            while(eachModule.hasNext()) {
-                ModuleClassID aModule = eachModule.next();
-                
-                if(!conf.isSvcEnabled(aModule)) {
-                    // remove disabled module
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Module disabled in configuration : " + aModule);
-                    }
-                    
-                    eachModule.remove();
-                }
-            }
-        }
-        
-        // We Applications are shelved until startApp()
-        applications.putAll(paramAdv.getApps());
-        
-        if(null != conf) {
-            Iterator<ModuleClassID> eachModule = applications.keySet().iterator();
-            
-            while(eachModule.hasNext()) {
-                ModuleClassID aModule = eachModule.next();
-                
-                if(!conf.isSvcEnabled(aModule)) {
-                    // remove disabled module
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Application disabled in configuration : " + aModule);
-                    }
-                    
-                    eachModule.remove();
-                }
-            }
-        }
-        
-        loadAllModules(initServices, true);
-        
-        int res = startModules((Map) initServices);
-        
-        if(Module.START_OK != res) {
-            throw new PeerGroupException("Failed to start peer group services. res : " + res);
-        }
-        
-        // Make sure all the required services are loaded.
-        try {
-            checkServices();
-        } catch (ServiceNotFoundException e) {
-            LOG.log(Level.SEVERE, "Missing peer group service", e);
-            throw new PeerGroupException("Missing peer group service", e);
-        }
-        
-        /*
-         * Publish a few things that have not been published in this
-         * group yet.
-         */
-        DiscoveryService discoveryService = getDiscoveryService();
-        
-        if (discoveryService != null) {
-            // It should work but if it does not we can survive.
-            try {
-                // Discovery service adv could not be published localy,
-                // since at that time there was no local discovery to
-                // publish to.
-                discoveryService.publish(discoveryService.getImplAdvertisement(), DEFAULT_LIFETIME, DEFAULT_EXPIRATION);
-                
-                // Try to publish our impl adv within this group. (it was published
-                // in the parent automatically when loaded.
-                discoveryService.publish(implAdvertisement, DEFAULT_LIFETIME, DEFAULT_EXPIRATION);
-            } catch (Exception nevermind) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failed to publish Impl adv within group.", nevermind);
-                }
-            }
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Nothing special for now, but we might want to move some steps from
-     * initFirst() in the future.
-     */
-    @Override
-    protected synchronized void initLast() throws PeerGroupException {
-        
-        super.initLast();
-        
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring Group : " + getPeerGroupID());
-            
-            configInfo.append("\n\tConfiguration :");
-            configInfo.append("\n\t\tCompatibility Statement :\n\t\t\t");
-            StringBuilder indent = new StringBuilder(STD_COMPAT.toString().trim());
-            int from = indent.length();
-            
-            while (from > 0) {
-                int returnAt = indent.lastIndexOf("\n", from);
-                
-                from = returnAt - 1;
-                if ((returnAt >= 0) && (returnAt != indent.length())) {
-                    indent.insert(returnAt + 1, "\t\t\t");
-                }
-            }
-            configInfo.append(indent);
-            Iterator eachProto = messageTransports.entrySet().iterator();
-            
-            if (eachProto.hasNext()) {
-                configInfo.append("\n\t\tMessage Transports :");
-            }
-            while (eachProto.hasNext()) {
-                Map.Entry anEntry = (Map.Entry) eachProto.next();
-                ModuleClassID aMCID = (ModuleClassID) anEntry.getKey();
-                Module anMT = (Module) anEntry.getValue();
-                
-                configInfo.append("\n\t\t\t").append(aMCID).append("\t").append(
-                        (anMT instanceof MessageTransport)
-                        ? ((MessageTransport) anMT).getProtocolName()
-                        : anMT.getClass().getName());
-            }
-            Iterator<Map.Entry<ModuleClassID, Object>> eachApp = applications.entrySet().iterator();
-            
-            if (eachApp.hasNext()) {
-                configInfo.append("\n\t\tApplications :");
-            }
-            while (eachApp.hasNext()) {
-                Map.Entry<ModuleClassID, Object> anEntry = eachApp.next();
-                ModuleClassID aMCID = anEntry.getKey();
-                Object anApp = anEntry.getValue();
-                
-                if (anApp instanceof ModuleImplAdvertisement) {
-                    ModuleImplAdvertisement adv = (ModuleImplAdvertisement) anApp;
-                    
-                    configInfo.append("\n\t\t\t").append(aMCID).append("\t").append(adv.getCode());
-                } else {
-                    configInfo.append("\n\t\t\t").append(aMCID).append("\t").append(anApp.getClass().getName());
-                }
-            }
-            LOG.config(configInfo.toString());
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * FIXME 20070801 bondolo To improve compatibility with existing
-     * applications the returned {@code ModuleImplAdvertisement} will contain
-     * embedded {@code ModuleImplAdvertisement}s for the referenced services as
-     * opposed to {@code ModuleSpecID}s. This is because JXSE 2.4.1 and earlier
-     * do not handle load failures of modules loaded by spec id correctly.
-     * After JXSE 2.5 is released this should be changed to use the better
-     * {@code ModuleSpecID} based peer group module specification.
-     */
-    // @Override
-    public ModuleImplAdvertisement getAllPurposePeerGroupImplAdvertisement() {
-        JxtaLoader loader = getJxtaLoader();
-        
-        // grab an impl adv
-        ModuleImplAdvertisement implAdv = loader.findModuleImplAdvertisement(PeerGroup.allPurposePeerGroupSpecID);
-        
-        return implAdv;
-    }
-    
-    
-    /**
-     * Returns the cache manager associated with this group.
-     *
-     * @return the cache manager associated with this group.
-     */
-    public Cm getCacheManager() {
-        return cm;
-    }
-    
-    /**
-     * Return a map of the applications for this group.
-     * <p/>
-     * <ul>
-     * <li>keys are {@link net.jxta.platform.ModuleClassID}</li>
-     * <li>values are {@link net.jxta.platform.Module} or
-     * {@link net.jxta.protocol.ModuleImplAdvertisement}</li>
-     * </ul>
-     *
-     * @return a map of the applications for this group.
-     */
-    public Map<ModuleClassID, Object> getApplications() {
-        return Collections.unmodifiableMap(applications);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/StdPeerGroupParamAdv.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/StdPeerGroupParamAdv.java
deleted file mode 100644 (file)
index c35b9ce..0000000
+++ /dev/null
@@ -1,517 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.peergroup;
-
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.document.XMLElement;
-import net.jxta.id.IDFactory;
-import net.jxta.logging.Logging;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.platform.ModuleClassID;
-import net.jxta.platform.ModuleSpecID;
-import net.jxta.protocol.ModuleImplAdvertisement;
-
-import java.net.URI;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * Not actually an advertisement, but often acts as part of one.
- *
- * @deprecated This internal class will eventually be removed. It has several
- * problems which make it difficult to support. (The most obvious that it 
- * provides poor abstraction and provides references to its' own internal data
- * structures). This class is expected to be replaced by a public API class
- * performing a similar function though such an alternative is not yet available.
- * You are encouraged to copy this code into your own application or service if
- * if you depend upon it.
- */
-@Deprecated
-public class StdPeerGroupParamAdv {
-
-    /**
-     * Logger
-     */
-    private static final Logger LOG = Logger.getLogger(StdPeerGroupParamAdv.class.getName());
-
-    private static final String PARAM_TAG = "Parm";
-    private static final String PROTO_TAG = "Proto";
-    private static final String APP_TAG = "App";
-    private static final String SVC_TAG = "Svc";
-    private static final String MCID_TAG = "MCID";
-    private static final String MSID_TAG = "MSID";
-    private static final String MIA_TAG = ModuleImplAdvertisement.getAdvertisementType();
-
-    // In the future we should be able to manipulate all modules regardless of 
-    // their kind, but right now it helps to keep them categorized as follows.
-    
-    /**
-     * The services which will be loaded for this peer group.
-     * <p/>
-     * <ul>
-     *     <li>Keys are {@link net.jxta.platform.ModuleClassID}.</li>
-     *     <li>Values are {@link net.jxta.platform.ModuleSpecID} or
-     *     {@link net.jxta.protocol.ModuleImplAdvertisement}.</li>
-     * </ul>
-     */    
-    private final Map<ModuleClassID, Object> services = new HashMap<ModuleClassID, Object>();
-    
-    /**
-     * The protocols (message transports) which will be loaded for this peer
-     * group.
-     * <p/>
-     * <ul>
-     *     <li>Keys are {@link net.jxta.platform.ModuleClassID}.</li>
-     *     <li>Values are {@link net.jxta.platform.ModuleSpecID} or
-     *     {@link net.jxta.protocol.ModuleImplAdvertisement}.</li>
-     * </ul>
-     */    
-    private final Map<ModuleClassID, Object> transports = new HashMap<ModuleClassID, Object>();
-    
-    /**
-     * The applications which will be loaded for this peer group.
-     * <p/>
-     * <ul>
-     *     <li>Keys are {@link net.jxta.platform.ModuleClassID}.</li>
-     *     <li>Values are {@link net.jxta.platform.ModuleSpecID} or
-     *     {@link net.jxta.protocol.ModuleImplAdvertisement}.</li>
-     * </ul>
-     */    
-    private final Map<ModuleClassID, Object> apps = new HashMap<ModuleClassID, Object>();
-
-    /**
-     * Private constructor for new instances.
-     */
-    public StdPeerGroupParamAdv() {
-    }
-
-    /**
-     * Private constructor for serialized instances.
-     *
-     * @param root the root element
-     */
-    public StdPeerGroupParamAdv(Element root) {
-        if (!(root instanceof XMLElement)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports XMLElement");
-        }
-        initialize((XMLElement) root);
-    }
-
-    /**
-     * Private constructor for xml serialized instances.
-     *
-     * @param doc The XML serialization of the advertisement.
-     */
-    public StdPeerGroupParamAdv(XMLElement doc) {
-        initialize(doc);
-    }
-
-    /**
-     * Add a service to the set of services entries described in this
-     * Advertisement.
-     *
-     * @param mcid   The module class id of the module being added.
-     * @param module The module being added.
-     */
-    public void addService(ModuleClassID mcid, Object module) {
-        if(null == mcid) {
-            throw new IllegalArgumentException("Illegal ModuleClassID");
-        }
-        
-        if(null == module) {
-            throw new IllegalArgumentException("Illegal module");
-        }
-        
-        services.put(mcid, module);
-    }
-
-    /**
-     * Return the services entries described in this Advertisement.
-     * <p/>
-     * The result (very unwisely) is the internal map of this
-     * Advertisement. Modifying it results in changes to this Advertisement.
-     * For safety the Map should be copied before being modified.
-     *
-     * @return the services entries described in this Advertisement.
-     */
-    public Map<ModuleClassID, Object> getServices() {
-        return services;
-    }
-
-    /**
-     * Add a protocol (message transport) to the set of protocol entries
-     * described in this Advertisement.
-     *
-     * @param mcid   The module class id of the module being added.
-     * @param module The module being added.
-     */
-    public void addProto(ModuleClassID mcid, Object module) {
-        if(null == mcid) {
-            throw new IllegalArgumentException("Illegal ModuleClassID");
-        }
-        
-        if(null == module) {
-            throw new IllegalArgumentException("Illegal module");
-        }
-        
-        transports.put(mcid, module);
-    }
-
-    /**
-     * Return the protocols (message transports) entries described in this Advertisement.
-     * <p/>
-     * The result (very unwisely) is the internal map of this Advertisement.
-     * Modifying it results in changes to this Advertisement.
-     * For safety the Map should be copied before being modified.
-     *
-     * @return the protocols (message transports) entries described in this Advertisement.
-     */
-    public Map<ModuleClassID, Object> getProtos() {
-        return transports;
-    }
-
-    /**
-     * Add an application to the set of application entries described in this
-     * Advertisement.
-     *
-     * @param mcid   The module class id of the module being added.
-     * @param module The module being added.
-     */
-    public void addApp(ModuleClassID mcid, Object module) {
-        if(null == mcid) {
-            throw new IllegalArgumentException("Illegal ModuleClassID");
-        }
-        
-        if(null == module) {
-            throw new IllegalArgumentException("Illegal module");
-        }
-        
-        apps.put(mcid, module);
-    }
-
-    /**
-     * Return the application entries described in this Advertisement.
-     * <p/>
-     * The result (very unwisely) is the internal map of this Advertisement. 
-     * Modifying it results in changes to this Advertisement.
-     * For safety the Map should be copied before being modified.
-     *
-     * @return the application entries described in this Advertisement.
-     */
-    public Map<ModuleClassID, Object> getApps() {
-        return apps;
-    }
-
-    /**
-     * Replaces the table of services described by this Advertisement. All
-     * existing entries are lost.
-     *
-     * @param servicesTable the services table
-     */
-    public void setServices(Map<ModuleClassID, Object> servicesTable) {
-        if(servicesTable.containsKey(null)) {
-            throw new IllegalArgumentException("null key in servicesTable");
-        }
-        
-        if(servicesTable.containsValue(null)) {
-            throw new IllegalArgumentException("null value in servicesTable");
-        }        
-        
-        if (servicesTable == this.services) {
-            return;
-        }
-
-        this.services.clear();
-
-        if (null != servicesTable) {
-            this.services.putAll(servicesTable);
-        }
-    }
-
-    /**
-     * Replaces the table of protocols described by this Advertisement. All
-     * existing entries are lost.
-     *
-     * @param protosTable The message transport descriptors for the group.
-     */
-    public void setProtos(Map<ModuleClassID, Object> protosTable) {
-        if(protosTable.containsKey(null)) {
-            throw new IllegalArgumentException("null key in protosTable");
-        }
-        
-        if(protosTable.containsValue(null)) {
-            throw new IllegalArgumentException("null value in protosTable");
-        }        
-        
-        if (protosTable == this.transports) {
-            return;
-        }
-
-        this.transports.clear();
-
-        if (null != protosTable) {
-            this.transports.putAll(protosTable);
-        }
-    }
-
-    /**
-     * Replaces the table of applications described by this Advertisement. All
-     * existing entries are lost.
-     *
-     * @param appsTable The application descriptors for the group.
-     */
-    public void setApps(Map<ModuleClassID, Object> appsTable) {
-        if(appsTable.containsKey(null)) {
-            throw new IllegalArgumentException("null key in appsTable");
-        }
-        
-        if(appsTable.containsValue(null)) {
-            throw new IllegalArgumentException("null value in appsTable");
-        }        
-        
-        if (appsTable == this.apps) {
-            return;
-        }
-
-        this.apps.clear();
-
-        if (null != appsTable) {
-            this.apps.putAll(appsTable);
-        }
-    }
-
-    private void initialize(XMLElement doc) {
-        if (!doc.getName().equals(PARAM_TAG)) {
-            throw new IllegalArgumentException("Can not construct " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-
-        // set defaults
-        int appCount = 0;
-        Enumeration<XMLElement> modules = doc.getChildren();
-
-        while (modules.hasMoreElements()) {
-            XMLElement module = modules.nextElement();
-            String tagName = module.getName();
-
-            Map<ModuleClassID, Object> theTable;
-
-            if (SVC_TAG.equals(tagName)) {
-                theTable = services;
-            } else if (APP_TAG.equals(tagName)) {
-                theTable = apps;
-            } else if (PROTO_TAG.equals(tagName)) {
-                theTable = transports;
-            } else {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Unhandled top-level tag : " + tagName);
-                }
-                continue;
-            }
-
-            ModuleSpecID specID = null;
-            ModuleClassID classID = null;
-            ModuleImplAdvertisement inLineAdv = null;
-
-            try {
-                if (module.getTextValue() != null) {
-                    specID = (ModuleSpecID) IDFactory.fromURI(new URI(module.getTextValue()));
-                }
-
-                // Check for children anyway.
-                Enumeration<XMLElement> fields = module.getChildren();
-
-                while (fields.hasMoreElements()) {
-                    XMLElement field = fields.nextElement();
-
-                    String fieldName = field.getName();
-
-                    if (MCID_TAG.equals(fieldName)) {
-                        classID = (ModuleClassID) IDFactory.fromURI(new URI(field.getTextValue()));
-                    } else if (MSID_TAG.equals(field.getName())) {
-                        specID = (ModuleSpecID) IDFactory.fromURI(new URI(field.getTextValue()));
-                    } else if (MIA_TAG.equals(field.getName())) {
-                        inLineAdv = (ModuleImplAdvertisement) AdvertisementFactory.newAdvertisement(field);
-                    } else {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.log(Level.WARNING, "Unhandled field : " + fieldName);
-                        }
-                    }
-                }
-            } catch (Exception any) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Broken entry; skipping", any);
-                }
-                continue;
-            }
-
-            if (inLineAdv == null && specID == null) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Insufficent entry; skipping");
-                }
-                continue;
-            }
-
-            Object theValue;
-
-            if (inLineAdv != null) {
-                specID = inLineAdv.getModuleSpecID();
-                theValue = inLineAdv;
-            } else {
-                theValue = specID;
-            }
-
-            if (classID == null) {
-                classID = specID.getBaseClass();
-            }
-
-            // For applications, the role does not matter. We just create a 
-            // unique role ID on the fly.
-            // When outputing the adv we get rid of it to save space.
-
-            if (theTable == apps) {
-                // Only the first (or only) one may use the base class.
-                if (classID == PeerGroup.applicationClassID) {
-                    if (appCount++ != 0) {
-                        classID = IDFactory.newModuleClassID(classID);
-                    }
-                }
-            }
-            theTable.put(classID, theValue);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Document getDocument(MimeMediaType encodeAs) {
-        StructuredDocument doc = StructuredDocumentFactory.newStructuredDocument(encodeAs, PARAM_TAG);
-
-        outputModules(doc, services, SVC_TAG);
-        outputModules(doc, transports, PROTO_TAG);
-        outputModules(doc, apps, APP_TAG);
-
-        return doc;
-    }
-
-    private void outputModules(StructuredDocument doc, Map<ModuleClassID, Object> modulesTable, String mainTag) {
-
-        for (Map.Entry<ModuleClassID, Object> entry : modulesTable.entrySet()) {
-            ModuleClassID mcid = entry.getKey();
-            Object val = entry.getValue();
-            Element m;
-
-            if(null == mcid) {
-                throw new IllegalStateException("null ModuleClassID in " + mainTag );
-            }
-            
-            // For applications, we ignore the role ID. It is not meaningfull,
-            // and a new one is assigned on the fly when loading this adv.
-
-            if (val instanceof Advertisement) {
-                m = doc.createElement(mainTag);
-                doc.appendChild(m);
-
-                if (modulesTable != apps && !mcid.equals(mcid.getBaseClass())) {
-                    // It is not an app and there is a role ID. Output it.
-                    Element i = doc.createElement(MCID_TAG, mcid.toString());
-
-                    m.appendChild(i);
-                }
-
-                StructuredDocument advdoc = (StructuredDocument) ((Advertisement) val).getDocument(doc.getMimeType());
-
-                StructuredDocumentUtils.copyElements(doc, m, advdoc);
-            } else if (val instanceof ModuleSpecID) {
-                if (modulesTable == apps || mcid.equals(mcid.getBaseClass())) {
-                    // Either it is an app or there is no role ID.
-                    // So the specId is good enough.
-                    m = doc.createElement(mainTag, val.toString());
-                    doc.appendChild(m);
-                } else {
-                    // The role ID matters, so the classId must be separate.
-                    m = doc.createElement(mainTag);
-                    doc.appendChild(m);
-
-                    Element i;
-
-                    i = doc.createElement(MCID_TAG, mcid.toString());
-                    m.appendChild(i);
-
-                    i = doc.createElement(MSID_TAG, val.toString());
-                    m.appendChild(i);
-                }
-            } else {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.severe("unsupported descriptor for " + mcid + " in " + mainTag +" module table : " + val);
-                }
-                throw new IllegalStateException("unsupported descriptor for " + mcid + " in " + mainTag +" module table : " + val);
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/peergroup/package.html
deleted file mode 100644 (file)
index 86deacf..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    Provides the standard JXTA Peer Group implementations as well as legacy peer 
-    group configuration functionality. The legacy peer configuration classes are
-    all deprecated.
-
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html" target='_blank'>JXTA Protocols Specification</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/BlockingWireOutputPipe.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/BlockingWireOutputPipe.java
deleted file mode 100644 (file)
index 9a30443..0000000
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.pipe;
-
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.XMLDocument;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.Messenger;
-import net.jxta.endpoint.TextDocumentMessageElement;
-import net.jxta.id.ID;
-import net.jxta.impl.endpoint.tcp.TcpMessenger;
-import net.jxta.logging.Logging;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.pipe.OutputPipe;
-import net.jxta.protocol.PipeAdvertisement;
-import net.jxta.protocol.RouteAdvertisement;
-
-import java.io.IOException;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * This Object is created when a call to PipeService.createOutputPipe(propgateAdv) with a Set containing a single
- * PeerID.  This pipe blocks until a valid messeger is created (i.e. resolved and useable). With this object it is
- * possible to detect connection failures during the messenger resolution. Notge, this pipe also avoids utilitizing the
- * rendezvous for propagation, effectively reducing message overhead, resulting in improved performance.
- * <p/>
- * #send is remains asynchronous.
- */
-public class BlockingWireOutputPipe implements OutputPipe {
-
-    /**
-     * Logger
-     */
-    private static final Logger LOG = Logger.getLogger(NonBlockingWireOutputPipe.class.getName());
-
-    /**
-     * If true then the pipe has been closed and will no longer accept messages.
-     */
-    private volatile boolean closed = false;
-
-    /**
-     * The advertisement we were created from.
-     */
-    private final PipeAdvertisement pAdv;
-
-    private final PeerGroup group;
-    private Messenger destMessenger = null;
-    private EndpointAddress destination;
-    private EndpointService endpoint = null;
-    private RouteAdvertisement route = null;
-
-    /**
-     * Create a new blocking output pipe
-     *
-     * @param group  The peergroup context.
-     * @param pAdv   advertisement for the pipe we are supporting.
-     * @param peerID the destination <code>PeerID</code>.
-     */
-    public BlockingWireOutputPipe(PeerGroup group, PipeAdvertisement pAdv, PeerID peerID) {
-
-        this.pAdv = pAdv;
-        this.group = group;
-        this.endpoint = group.getEndpointService();
-        destination = new EndpointAddress("jxta", peerID.getUniqueValue().toString(), "PipeService", pAdv.getID().toString());
-        destMessenger = endpoint.getMessenger(destination);
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Created output pipe for " + getPipeID());
-        }
-    }
-    /**
-     * Create a new blocking output pipe
-     *
-     * @param group  The peergroup context.
-     * @param pAdv   advertisement for the pipe we are supporting.
-     * @param peerID the destination <code>PeerID</code>.
-     * @param route the destination route.
-     */
-    public BlockingWireOutputPipe(PeerGroup group, PipeAdvertisement pAdv, PeerID peerID, RouteAdvertisement route) {
-        this.route = route;
-        this.pAdv = pAdv;
-        this.group = group;
-        this.endpoint = group.getEndpointService();
-        destination = new EndpointAddress("jxta", peerID.getUniqueValue().toString(), "PipeService", pAdv.getID().toString());
-        if (route != null) {
-            destMessenger = endpoint.getDirectMessenger(destination, route, true);
-        }
-        if (destMessenger == null) {
-            destMessenger = endpoint.getMessenger(destination);
-        }
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Created output pipe for " + getPipeID());
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized void close() {
-
-        if (closed) {
-            return;
-        }
-        // Close the queue so that no more messages are accepted
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Closing queue for " + getPipeID());
-        }
-        closed = true;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isClosed() {
-        return closed;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final String getType() {
-        return pAdv.getType();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final ID getPipeID() {
-        return pAdv.getPipeID();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final String getName() {
-        return pAdv.getName();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final PipeAdvertisement getAdvertisement() {
-        return pAdv;
-    }
-
-    private void checkMessenger() throws IOException {
-        if (!(destMessenger instanceof TcpMessenger) && destMessenger != null && (destMessenger.getState() & Messenger.USABLE) != 0) {
-            return;
-        }
-        if (destMessenger != null && !destMessenger.isClosed()) {
-                return;
-        }
-        synchronized (this) {
-            if (route != null) {
-                destMessenger = endpoint.getDirectMessenger(destination, route, true);
-            }
-            destMessenger = endpoint.getMessenger(destination);
-            if (!(destMessenger instanceof TcpMessenger) && destMessenger == null || (destMessenger.getState() & Messenger.TERMINAL) != 0) {
-                if (destMessenger != null) {
-                    destMessenger.close();
-                    destMessenger = null;
-                }
-                throw new IOException("Unable to create a messenger to " + destination.toString());
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean send(Message message) throws IOException {
-        if (closed) {
-            throw new IOException("Pipe closed");
-        }
-        WireHeader header = new WireHeader();
-
-        header.setPipeID(getPipeID());
-        header.setSrcPeer(group.getPeerID());
-        header.setTTL(1);
-        header.setMsgId(WirePipe.createMsgId());
-
-        XMLDocument asDoc = (XMLDocument) header.getDocument(MimeMediaType.XMLUTF8);
-        MessageElement elem = new TextDocumentMessageElement(WirePipeImpl.WIRE_HEADER_ELEMENT_NAME, asDoc, null);
-        Message msg = message.clone();
-
-        msg.replaceMessageElement(WirePipeImpl.WIRE_HEADER_ELEMENT_NAMESPACE, elem);
-        checkMessenger();
-        try {
-            if (destMessenger instanceof TcpMessenger) {
-                ((TcpMessenger) destMessenger).sendMessageDirect(msg, null, null, true);
-            } else  if (!destMessenger.sendMessage(msg, null, null)) {
-                throw new IOException("Pipe closed");
-            }
-        } catch (IOException io) {
-            checkMessenger();
-            if (!destMessenger.sendMessage(msg, null, null)) {
-                throw new IOException("Pipe closed");
-            }
-        }
-        return true;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/InputPipeImpl.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/InputPipeImpl.java
deleted file mode 100644 (file)
index 0c31838..0000000
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.pipe;
-
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointListener;
-import net.jxta.endpoint.Message;
-import net.jxta.id.ID;
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.impl.util.UnbiasedQueue;
-import net.jxta.logging.Logging;
-import net.jxta.pipe.InputPipe;
-import net.jxta.pipe.PipeID;
-import net.jxta.pipe.PipeMsgEvent;
-import net.jxta.pipe.PipeMsgListener;
-import net.jxta.protocol.PipeAdvertisement;
-
-import java.io.IOException;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Implements the {@link net.jxta.pipe.InputPipe} interface by listening on the
- * endpoint for messages to service "PipeService" and a param of the Pipe ID.
- */
-class InputPipeImpl implements EndpointListener, InputPipe {
-
-    /**
-     * logger
-     */
-    private final static Logger LOG = Logger.getLogger(InputPipeImpl.class.getName());
-
-    protected final static int QUEUESIZE = 100;
-
-    protected PipeRegistrar registrar;
-
-    protected final PipeAdvertisement pipeAdv;
-    protected final ID pipeID;
-
-    protected volatile boolean closed = false;
-
-    protected PipeMsgListener listener;
-    protected final UnbiasedQueue queue;
-
-    /**
-     * Constructor for the InputPipeImpl object
-     *
-     * @param r        pipe resolver
-     * @param adv      pipe advertisement
-     * @param listener listener to receive messages
-     * @throws IOException if an io error occurs
-     */
-    InputPipeImpl(PipeRegistrar r, PipeAdvertisement adv, PipeMsgListener listener) throws IOException {
-        registrar = r;
-        this.pipeAdv = adv;
-        this.listener = listener;
-
-        pipeID = adv.getPipeID();
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info(
-                    "Creating InputPipe for " + pipeID + " of type " + adv.getType() + " with "
-                    + ((null != listener) ? "listener" : "queue"));
-        }
-
-        // queue based inputpipe?
-        if (listener == null) {
-            queue = UnbiasedQueue.synchronizedQueue(new UnbiasedQueue(QUEUESIZE, true));
-        } else {
-            queue = null;
-        }
-
-        if (!registrar.register(this)) {
-            throw new IOException("Could not register input pipe (already registered) for " + pipeID);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Closes the pipe.
-     */
-    @Override
-    protected synchronized void finalize() throws Throwable {
-        if (!closed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Pipe is being finalized without being previously closed. This is likely a bug.");
-            }
-        }
-        close();
-        super.finalize();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Message waitForMessage() throws InterruptedException {
-        return poll(0);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Message poll(int timeout) throws InterruptedException {
-        if (listener == null) {
-            return (Message) queue.pop(timeout);
-        } else {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("poll() has no effect in listener mode.");
-            }
-            return null;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized void close() {
-        if (closed) {
-            return;
-        }
-        closed = true;
-
-        // Close the queue
-        if (null == listener) {
-            queue.close();
-        }
-
-        listener = null;
-        // Remove myself from the pipe registrar.
-        if (!registrar.forget(this)) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("close() : pipe was not registered with registrar.");
-            }
-        }
-        registrar = null;
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Closed " + pipeID);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void processIncomingMessage(Message msg, EndpointAddress srcAddr, EndpointAddress dstAddr) {
-        // if we are closed, ignore any additional messages
-        if (closed) {
-            return;
-        }
-
-        // XXX: header check, security and such should be done here
-        // before pushing the message onto the queue.
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Received " + msg + " from " + srcAddr + " for " + pipeID);
-        }
-        // determine where demux the msg, to listener, or onto the queue
-        if (null == queue) {
-            PipeMsgListener temp = listener;
-            if (null == temp) {
-                return;
-            }
-
-            PipeMsgEvent event = new PipeMsgEvent(this, msg, (PipeID) pipeID);
-            try {
-                temp.pipeMsgEvent(event);
-            } catch (Throwable ignored) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Uncaught Throwable in listener for : " + pipeID + "(" + temp.getClass().getName() + ")", ignored);
-                }
-            }
-        } else {
-            boolean pushed = false;
-            while (!pushed && !queue.isClosed()) {
-                try {
-                    pushed = queue.push(msg, TimeUtils.ASECOND);
-                } catch (InterruptedException woken) {
-                    Thread.interrupted();
-                }
-            }
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                synchronized (this) {
-                    LOG.fine("Queued " + msg + " for " + pipeID + "\n\tqueue closed : " + queue.isClosed() + "\tnumber in queue : "
-                            + queue.getCurrentInQueue() + "\tnumber queued : " + queue.getNumEnqueued() + "\tnumber dequeued : "
-                            + queue.getNumDequeued());
-                }
-            }
-        }
-    }
-
-    /**
-     * Gets the pipe type
-     *
-     * @return The type
-     */
-    public String getType() {
-        return pipeAdv.getType();
-    }
-
-    /**
-     * Gets the pipe id
-     *
-     * @return The type
-     */
-    public ID getPipeID() {
-        return pipeID;
-    }
-
-    /**
-     * Gets the pipe name
-     *
-     * @return The name
-     */
-    public String getName() {
-        return pipeAdv.getName();
-    }
-
-    /**
-     * Gets the pipe advertisement
-     *
-     * @return The advertisement
-     */
-    public PipeAdvertisement getAdvertisement() {
-        return pipeAdv;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/NonBlockingOutputPipe.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/NonBlockingOutputPipe.java
deleted file mode 100644 (file)
index eccf534..0000000
+++ /dev/null
@@ -1,768 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.pipe;
-
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.Messenger;
-import net.jxta.id.ID;
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.impl.util.UnbiasedQueue;
-import net.jxta.logging.Logging;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.pipe.OutputPipe;
-import net.jxta.pipe.PipeID;
-import net.jxta.protocol.PipeAdvertisement;
-
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * An implementation of Ouput Pipe which sends messages on the pipe
- * asynchronously. The <code>send()</code> method for this implementation will
- * never block.
- */
-class NonBlockingOutputPipe implements PipeResolver.Listener, OutputPipe, Runnable {
-
-    /**
-     * Logger
-     */
-    private static final Logger LOG = Logger.getLogger(NonBlockingOutputPipe.class.getName());
-
-    /**
-     * Amount of time an idle worker thread will linger
-     */
-    private static final long IDLEWORKERLINGER = 10 * TimeUtils.ASECOND;
-
-    /**
-     * Minimum Query interval. Queries will not be sent more frequently than
-     * this interval.
-     */
-    private static final long QUERYINTERVALMIN = 15 * TimeUtils.ASECOND;
-
-    /**
-     * Query timeout minimum. Waits for query response will not be shorter than
-     * this interval.
-     */
-    private static final long QUERYTIMEOUTMIN = 1 * TimeUtils.AMINUTE;
-
-    /**
-     * If true then the pipe has been closed and will no longer accept messages.
-     */
-    private volatile boolean closed = false;
-
-    /**
-     * If true then this pipe has just migrated. Used to prevent re-entering
-     * migration from an unfinished migration.
-     */
-    private boolean migrated = false;
-
-    /**
-     * Group in which we are working.
-     */
-    private PeerGroup peerGroup = null;
-
-    /**
-     * The endpoint of our group.
-     */
-    private EndpointService endpoint = null;
-
-    /**
-     * The pipe resolver we will use for migrate and verify.
-     */
-    private PipeResolver pipeResolver = null;
-
-    /**
-     * The advertisement we were created from.
-     */
-    private PipeAdvertisement pAdv = null;
-
-    /**
-     * The current peer the pipe is resolved to.
-     */
-    private ID destPeer = null;
-
-    /**
-     * The set of peers to which the pipe can be resolved.
-     */
-    private Set<? extends ID> resolvablePeers = null;
-
-    /**
-     * The endpoint destination address for the remote peer we are resolved to.
-     */
-    private EndpointAddress destAddress = null;
-    private Messenger destMessenger = null;
-
-    /**
-     * The worker thread which actually sends messages on the pipe
-     */
-    private volatile Thread serviceThread = null;
-
-    /**
-     * Absolute time in milliseconds at which we will send the next verify
-     * request.
-     */
-    private long nextVerifyAt = 0;
-
-    /**
-     * Queue of messages waiting to be sent.
-     */
-    private final UnbiasedQueue queue = UnbiasedQueue.synchronizedQueue(new UnbiasedQueue(50, false));
-
-    /**
-     * Tracks the state of our worker thread.
-     */
-    enum WorkerState {
-        /**
-         * Find a new eligible destination peer which is listening on the pipe.
-         */
-        STARTMIGRATE, 
-        
-        /**
-         * Issue resolution queries and wait for responses
-         */ 
-        PENDINGMIGRATE, 
-         
-         /**
-         * Determine if the destination peer is still listening on the pipe.
-         */ 
-        STARTVERIFY, 
-        
-        /**
-         * Issue verify queries and wait for responses
-         */ 
-        PENDINGVERIFY, 
-        
-        /**
-         * Acquire a messenger to the destination peer.
-         */ 
-        ACQUIREMESSENGER, 
-        
-        /**
-         * Send messages via the messenger to the destination peer.
-         */ 
-        SENDMESSAGES, 
-        
-        /**
-         * Exit.
-         */ 
-        CLOSED
-    }
-
-    /**
-     * The current state of the worker thread
-     */
-    private WorkerState workerstate;
-
-    /**
-     * The query id we are currently operating under.
-     */
-    private int queryID = -1;
-
-    /**
-     * Create a new output pipe
-     *
-     * @param peerGroup        peergroup we are working in.
-     * @param pipeResolver        the piperesolver this pipe is bound to.
-     * @param pAdv     advertisement for the pipe we are supporting.
-     * @param destPeer the peer this pipe is currently bound to.
-     * @param peers    the set of peers we allow this pipe to be bound to.
-     */
-    public NonBlockingOutputPipe(PeerGroup peerGroup, PipeResolver pipeResolver, PipeAdvertisement pAdv, ID destPeer, Set<? extends ID> peers) {
-
-        this.peerGroup = peerGroup;
-        endpoint = peerGroup.getEndpointService();
-        this.pipeResolver = pipeResolver;
-
-        this.pAdv = pAdv;
-        this.destPeer = destPeer;
-        this.resolvablePeers = new HashSet<ID>(peers);
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Constructing for " + getPipeID());
-        }
-        workerstate = WorkerState.ACQUIREMESSENGER;
-        startServiceThread();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected void finalize() throws Throwable {
-        if (!closed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Pipe is being finalized without being previously closed. This is likely a bug.");
-            }
-        }
-        close();
-        super.finalize();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized void close() {
-
-        // Close the queue so that no more messages are accepted
-        if (!closed) {
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("Closing for " + getPipeID());
-            }
-            queue.close();
-        }
-        closed = true;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isClosed() {
-        return closed;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final String getType() {
-        return pAdv.getType();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final ID getPipeID() {
-        return pAdv.getPipeID();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final String getName() {
-        return pAdv.getName();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final PipeAdvertisement getAdvertisement() {
-        return pAdv;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean send(Message msg) throws IOException {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Queuing " + msg + " for pipe " + getPipeID());
-        }
-
-        boolean pushed = false;
-        while (!queue.isClosed()) {
-            try {
-                pushed = queue.push(msg, 250 * TimeUtils.AMILLISECOND);
-                break;
-            } catch (InterruptedException woken) {
-                Thread.interrupted();
-            }
-        }
-
-        if (!pushed && queue.isClosed()) {
-            IOException failed = new IOException("Could not enqueue " + msg + " for sending. Pipe is closed.");
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, failed.getMessage(), failed);
-            }
-            throw failed;
-        }
-        startServiceThread();
-        return pushed;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Sends the messages.
-     * <p/>
-     * This method does a lot of things. It has several distinct states:
-     * <p/>
-     * <table border="1">
-     * <thead>
-     * <tr>
-     * <th>STATE</th>
-     * <th>Activity</th>
-     * <tr>
-     * </thead>
-     * <p/>
-     * <tbody>
-     * <tr>
-     * <th>ACQUIREMESSENGER</th
-     * <td>Acquire a messenger to the specified destination peer. If a
-     * messenger is acquired, then go to <b>SENDMESSAGES</b> state
-     * otherwise go to <b>STARTMIGRATE</b>.</td>
-     * </tr>
-     * <p/>
-     * <tr>
-     * <th>SENDMESSAGES</th>
-     * <td>Send messages until queue is closed and all messages have
-     * been sent. Go to state <b>CLOSED</b> when done. If the messenger
-     * becomes closed then go to <b>ACQUIREMESSENGER</b>. <emphasis>If
-     * there are no messages to send for <code>IDLEWORKERLINGER</code>
-     * milliseconds then the worker thread will exit. It will only be
-     * restarted if another message is eventually enqueued.</emphasis>
-     * </td>
-     * </tr>
-     * <p/>
-     * <tr>
-     * <th>STARTVERIFY</th>
-     * <td>Starts a verification query(s) to the destination peer. This
-     * state is activated after
-     * <code>PipeServiceImpl.VERIFYINTERVAL</code> milliseconds of
-     * sending messages. The query responses will be tracked in the
-     * <b>PENDINGVERIFY</b> state.</td>
-     * </tr>
-     * <p/>
-     * <tr>
-     * <th>STARTMIGRATE</th>
-     * <td>Starts a query(s) for peers listening on this pipe. The
-     * query responses will be tracked in the <b>PENDINGMIGRATE</b>
-     * state.</td>
-     * </tr>
-     * <p/>
-     * <tr>
-     * <th>PENDINGVERIFY</th>
-     * <td>Issues query messages to verify that the destination peer is
-     * still listening on the pipe. Queries are issued every
-     * <code>QUERYINTERVAL</code> milliseconds. If a positive response
-     * is received, go to state <b>ACQUIREMESSENGER</b>. If no response
-     * is received within <b>QUERYTIMEOUT</b> milliseconds or a
-     * negative response is received then go to state
-     * <b>STARTMIGRATE</b>.</td>
-     * </tr>
-     * <p/>
-     * <tr>
-     * <th>PENDINGMIGRATE</th>
-     * <td>Issues query messages to find a new destination peer.
-     * Queries are issued every <code>QUERYINTERVAL</code> milliseconds.
-     * If a positive response is received, go to state
-     * <b>ACQUIREMESSENGER</b>. If no positive response from an
-     * eligible peer is received within <b>QUERYTIMEOUT</b>
-     * milliseconds go to state <b>CLOSED</b>.</td>
-     * </tr>
-     * <p/>
-     * <tr>
-     * <th>CLOSED</th>
-     * <td>Exit the worker thread.</td>
-     * </tr>
-     * </tbody>
-     * </table>
-     */
-    public void run() {
-        long absoluteTimeoutAt = -1;
-        long nextQueryAt = -1;
-
-        try {
-            // state loop
-            while (WorkerState.CLOSED != workerstate) {
-                synchronized (this) {
-                    LOG.fine("NON-BLOCKING WORKER AT STATE : " + workerstate
-                            + ((WorkerState.SENDMESSAGES == workerstate)
-                                    ? "\n\t" + TimeUtils.toRelativeTimeMillis(nextVerifyAt, TimeUtils.timeNow())
-                                    + " until verify."
-                                    : ""));
-
-                    // switch() emulation
-                    if ((WorkerState.STARTVERIFY == workerstate) || (WorkerState.STARTMIGRATE == workerstate)) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            if (null == destPeer) {
-                                LOG.fine("Starting re-resolve for \'" + getPipeID());
-                            } else {
-                                LOG.fine("Starting verify for \'" + getPipeID() + "\' to : " + destPeer);
-                            }
-                        }
-
-                        queryID = PipeResolver.getNextQueryID();
-                        pipeResolver.addListener(getPipeID(), this, queryID);
-                        absoluteTimeoutAt = TimeUtils.toAbsoluteTimeMillis(
-                                Math.max(QUERYTIMEOUTMIN, (PipeServiceImpl.VERIFYINTERVAL / 20)));
-                        nextQueryAt = TimeUtils.timeNow();
-
-                        if (WorkerState.STARTVERIFY == workerstate) {
-                            workerstate = WorkerState.PENDINGVERIFY;
-                        } else if (WorkerState.STARTMIGRATE == workerstate) {
-                            workerstate = WorkerState.PENDINGMIGRATE;
-                        }
-
-                        // move on to the next state.
-                    } else if ((WorkerState.PENDINGVERIFY == workerstate) || (WorkerState.PENDINGMIGRATE == workerstate)) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine(
-                                    "Pipe " + ((WorkerState.PENDINGVERIFY == workerstate) ? "verify" : "migrate")
-                                    + "in progress. Continues for "
-                                    + TimeUtils.toRelativeTimeMillis(absoluteTimeoutAt, TimeUtils.timeNow())
-                                    + "ms. Next query in " + TimeUtils.toRelativeTimeMillis(nextQueryAt, TimeUtils.timeNow())
-                                    + "ms.");
-                        }
-
-                        // check to see if we are completely done.
-                        if (TimeUtils.toRelativeTimeMillis(absoluteTimeoutAt, TimeUtils.timeNow()) <= 0) {
-                            pipeResolver.removeListener(getPipeID(), queryID);
-
-                            if (WorkerState.PENDINGVERIFY == workerstate) {
-                                if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                                    LOG.info("Pipe \'" + getPipeID() + "\' has migrated from " + destPeer);
-                                }
-                                workerstate = WorkerState.STARTMIGRATE;
-                                // move on to the next state.
-                                continue;
-                            } else {
-                                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                                    LOG.warning("Pipe \'" + getPipeID() + "\' cannot be migrated and is being closed");
-                                }
-                                workerstate = WorkerState.CLOSED;
-                                close();
-                                // move on to the next state.
-                                continue;
-                            }
-                        }
-
-                        // check if its time ot send another copy of the query.
-                        if (TimeUtils.toRelativeTimeMillis(nextQueryAt, TimeUtils.timeNow()) <= 0) {
-                            if (null != destPeer) {
-                                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                    LOG.fine(
-                                            "Sending out verify query (" + queryID + ") for \'" + getPipeID() + "\' to : "
-                                            + destPeer);
-                                }
-                                pipeResolver.sendPipeQuery(pAdv, Collections.singleton(destPeer), queryID);
-                            } else {
-                                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                    LOG.fine("Sending out resolve query (" + queryID + ") for " + getPipeID());
-                                }
-                                pipeResolver.sendPipeQuery(pAdv, resolvablePeers, queryID);
-                            }
-                            nextQueryAt = TimeUtils.toAbsoluteTimeMillis(
-                                    Math.max(QUERYINTERVALMIN, (PipeServiceImpl.VERIFYINTERVAL / 50)));
-                        }
-
-                        long sleep = TimeUtils.toRelativeTimeMillis(Math.min(nextQueryAt, absoluteTimeoutAt), TimeUtils.timeNow());
-
-                        if (sleep >= 0) {
-                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                LOG.fine("Waiting " + sleep + "ms for response for (" + queryID + ") for " + getPipeID());
-                            }
-                            try {
-                                wait(sleep);
-                            } catch (InterruptedException woken) {
-                                Thread.interrupted();
-                            }
-                        }
-
-                        // move on to the next state.
-                    } else if (WorkerState.ACQUIREMESSENGER == workerstate) {
-                        if ((null == destMessenger) || destMessenger.isClosed()) {
-                            destMessenger = null;
-                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                LOG.fine("Getting messenger to \'" + destPeer + "\' for pipe " + getPipeID());
-                            }
-
-                            destAddress = mkAddress(destPeer, getPipeID());
-                            // todo 20031011 bondolo@jxta.org This should not be done under sync
-                            destMessenger = endpoint.getMessenger(destAddress);
-                            if (destMessenger == null) {
-                                // We could not get a messenger to the peer, forget it and try again.
-                                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                                    LOG.warning("Could not get messenger to : " + destPeer + ". ");
-                                }
-
-                                if (migrated) {
-                                    // we can't migrate again, we never finished.
-                                    // the last migrate!
-                                    workerstate = WorkerState.CLOSED;
-                                    close();
-                                } else {
-                                    workerstate = WorkerState.STARTMIGRATE;
-                                }
-                                pipeResolver.removeListener((PipeID) getPipeID(), queryID);
-                                queryID = -1;
-                                destPeer = null;
-                                destAddress = null;
-
-                                // move on to the next state.
-                                continue;
-                            } else {
-                                // migration completed.
-                                migrated = false;
-                            }
-                        } else {
-                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                LOG.fine("Using existing messenger to : " + destPeer);
-                            }
-                        }
-
-                        workerstate = WorkerState.SENDMESSAGES;
-                        nextVerifyAt = TimeUtils.toAbsoluteTimeMillis(PipeServiceImpl.VERIFYINTERVAL);
-
-                        // move on to the next state.
-                        continue; // can't just fall through because we would start sending messages immediately.
-                    } else if (WorkerState.SENDMESSAGES == workerstate) {
-                        // is it time to do verification again?
-                        if (TimeUtils.toRelativeTimeMillis(nextVerifyAt, TimeUtils.timeNow()) <= 0) {
-                            workerstate = WorkerState.STARTVERIFY;
-                            pipeResolver.removeListener(getPipeID(), queryID);
-                            queryID = -1;
-                        }
-                        // move on to the next state.
-                    } else if (WorkerState.CLOSED == workerstate) {
-                        queue.clear(); // they aren't going to be sent
-                        if (null != destMessenger) {
-                            destMessenger.close();
-                            destMessenger = null;
-                        }
-                        serviceThread = null;
-                        break;
-                    } else {
-                        LOG.warning("Unrecognized state in worker thread : " + workerstate);
-                    }
-                }
-
-                // now actually send messages. We don't do this under the global sync.
-                if (WorkerState.SENDMESSAGES == workerstate) {
-                    Message msg = null;
-
-                    try {
-                        msg = (Message) queue.pop(IDLEWORKERLINGER);
-                    } catch (InterruptedException woken) {
-                        Thread.interrupted();
-                        continue;
-                    }
-
-                    if (null == msg) {
-                        synchronized (this) {
-                            // before deciding to die, we need to make sure that
-                            // nobody snuck something into the queue. If there
-                            // is, then we have to be the one to service the
-                            // queue.
-                            if (null == queue.peek()) {
-                                if (closed) {
-                                    workerstate = WorkerState.CLOSED;
-                                    continue;
-                                } else {
-                                    serviceThread = null;
-                                    break;
-                                }
-                            } else {
-                                continue;
-                            }
-                        }
-                    }
-
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Sending " + msg + " on " + getPipeID());
-                    }
-
-                    if (!destMessenger.isClosed()) {
-                        try {
-                            destMessenger.sendMessageB(msg, null, null);
-                        } catch (IOException failed) {
-                            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                                LOG.log(Level.WARNING, "Failure sending " + msg + " on " + getPipeID(), failed);
-                            }
-                        }
-                    }
-
-                    // May be now closed due to failing to send.
-                    if (destMessenger.isClosed()) {
-                        synchronized (this) {
-                            workerstate = WorkerState.ACQUIREMESSENGER;
-                            destMessenger = null;
-                        }
-                    }
-                }
-            }
-        } catch (Throwable all) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Uncaught Throwable in thread :" + Thread.currentThread().getName(), all);
-            }
-
-            // give another thread the chance to start unless one already has.
-            // If the exception was caused by damaged state on this object then
-            // starting a new Thread may just cause the same exception again.
-            // Unfortunate tradeoff.
-            synchronized (this) {
-                if (serviceThread == Thread.currentThread()) {
-                    serviceThread = null;
-                }
-            }
-        } finally {
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info(
-                        "Thread exit : " + Thread.currentThread().getName() + "\n\tworker state : " + workerstate
-                        + "\tqueue closed : " + queue.isClosed() + "\tnumber in queue : " + queue.getCurrentInQueue()
-                        + "\tnumber queued : " + queue.getNumEnqueued() + "\tnumber dequeued : " + queue.getNumDequeued());
-            }
-        }
-    }
-
-    /**
-     * Starts the worker thread if it is not already running.
-     */
-    private synchronized void startServiceThread() {
-        // if there is no service thread, start one.
-        if ((null == serviceThread) && !closed) {
-            serviceThread = new Thread(peerGroup.getHomeThreadGroup(), this
-                    ,
-                    "Worker Thread for NonBlockingOutputPipe : " + getPipeID());
-            serviceThread.setDaemon(true);
-            serviceThread.start();
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info(
-                        "Thread start : " + serviceThread.getName() + "\n\tworker state : " + workerstate + "\tqueue closed : "
-                        + queue.isClosed() + "\tnumber in queue : " + queue.getCurrentInQueue() + "\tnumber queued : "
-                        + queue.getNumEnqueued() + "\tnumber dequeued : " + queue.getNumDequeued());
-            }
-        }
-    }
-
-    /**
-     * Convenience method for constructing a peer endpoint address from its
-     * peer id
-     *
-     * @param destPeer the desitnation peer
-     * @param pipeID   the pipe to put in the param field.
-     * @return the pipe endpoint address.
-     */
-    protected EndpointAddress mkAddress(ID destPeer, ID pipeID) {
-        return new EndpointAddress("jxta", destPeer.getUniqueValue().toString(), "PipeService", pipeID.toString());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized boolean pipeNAKEvent(PipeResolver.Event event) {
-
-        if (((workerstate == WorkerState.PENDINGVERIFY) || (workerstate == WorkerState.ACQUIREMESSENGER)
-                || (workerstate == WorkerState.SENDMESSAGES))
-                && (event.getPeerID().equals(destPeer) && (event.getQueryID() == queryID))) {
-            // we have been told that the destination peer no longer wants
-            // to talk with us. We will try to migrate to another peer.
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Pipe \'" + getPipeID() + "\' is closed at " + event.getPeerID());
-            }
-
-            workerstate = WorkerState.STARTMIGRATE;
-            pipeResolver.removeListener(getPipeID(), queryID);
-            queryID = -1;
-            destPeer = null;
-            destAddress = null;
-            if (null != destMessenger) {
-                destMessenger.close();
-                destMessenger = null;
-            }
-            notify();
-            return true;
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Ignoring NAK from " + event.getPeerID());
-        }
-
-        // didn't refer to us or we don't care.
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized boolean pipeResolveEvent(PipeResolver.Event event) {
-
-        if (((workerstate == WorkerState.PENDINGVERIFY) || (workerstate == WorkerState.PENDINGMIGRATE))
-                && (event.getQueryID() == queryID)) {
-            if ((workerstate == WorkerState.PENDINGVERIFY) && !event.getPeerID().equals(destPeer)) {
-                // not from the right peer so ignore it.
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Ignoring response from " + event.getPeerID());
-                }
-                return false;
-            } else {
-                if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                    LOG.info("Pipe \'" + getPipeID() + "\' is verified for " + destPeer);
-                }
-            }
-
-            workerstate = WorkerState.ACQUIREMESSENGER;
-            migrated = true;
-            destPeer = event.getPeerID();
-
-            if ((workerstate == WorkerState.PENDINGMIGRATE) && Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("Pipe \'" + getPipeID() + "\' has migrated to " + destPeer);
-            }
-            notify();
-            return true;
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Ignoring resolve from " + event.getPeerID());
-        }
-        // didn't refer to us or we don't care.
-        return false;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/NonBlockingWireOutputPipe.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/NonBlockingWireOutputPipe.java
deleted file mode 100644 (file)
index 93023f1..0000000
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.pipe;
-
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.XMLDocument;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.TextDocumentMessageElement;
-import net.jxta.id.ID;
-import net.jxta.logging.Logging;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.pipe.OutputPipe;
-import net.jxta.protocol.PipeAdvertisement;
-
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * An implementation of Ouput Pipe which sends messages on the pipe
- * asynchronously. The <code>send()</code> method for this implementation will
- * never block.
- */
-class NonBlockingWireOutputPipe implements OutputPipe {
-
-    /**
-     * Logger
-     */
-    private static final Logger LOG = Logger.getLogger(NonBlockingWireOutputPipe.class.getName());
-
-    /**
-     * If true then the pipe has been closed and will no longer accept messages.
-     */
-    private volatile boolean closed = false;
-
-    /**
-     * Group in which we are working.
-     */
-    private final PeerGroup peerGroup;
-
-    /**
-     * The endpoint of our group.
-     */
-    private final WirePipe wire;
-
-    /**
-     * The advertisement we were created from.
-     */
-    private final PipeAdvertisement pAdv;
-
-    /**
-     * The set of peers to which messages on this pipe are sent. If empty then
-     * the message is sent to all propagation targets.
-     */
-    private final Set<? extends ID> destPeers;
-
-    /**
-     * Create a new output pipe
-     *
-     * @param group     The peergroup we are working in.
-     * @param wire  The propagate pipe service.
-     * @param pAdv  advertisement for the pipe we are supporting.
-     * @param peers the set of peers we allow this pipe to be bound to.
-     */
-    public NonBlockingWireOutputPipe(PeerGroup group, WirePipe wire, PipeAdvertisement pAdv, Set<? extends ID> peers) {
-
-        peerGroup = group;
-        this.wire = wire;
-        this.destPeers = new HashSet<ID>(peers);
-        this.pAdv = pAdv;
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Constructing for " + getPipeID());
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized void close() {
-
-        // Close the queue so that no more messages are accepted
-        if (!closed) {
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("Closing queue for " + getPipeID());
-            }
-        }
-        closed = true;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isClosed() {
-        return closed;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final String getType() {
-        return pAdv.getType();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final ID getPipeID() {
-        return pAdv.getPipeID();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final String getName() {
-        return pAdv.getName();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final PipeAdvertisement getAdvertisement() {
-        return pAdv;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean send(Message message) throws IOException {
-        if (closed) {
-            // also throw it here to void the extra operations
-            throw new IOException("Pipe closed");
-        }
-
-        WireHeader header = new WireHeader();
-        header.setPipeID(getPipeID());
-        header.setSrcPeer(peerGroup.getPeerID());
-        header.setTTL(destPeers.isEmpty() ? 200 : 1);
-        header.setMsgId(WirePipe.createMsgId());
-
-        XMLDocument asDoc = (XMLDocument) header.getDocument(MimeMediaType.XMLUTF8);
-        MessageElement elem = new TextDocumentMessageElement(WirePipeImpl.WIRE_HEADER_ELEMENT_NAME, asDoc, null);
-
-        Message msg = message.clone();
-        msg.replaceMessageElement(WirePipeImpl.WIRE_HEADER_ELEMENT_NAMESPACE, elem);
-        return sendUnModified(msg, header);
-    }
-
-    /**
-     * Sends a message unaltered
-     *
-     * @param msg the message to send
-     * @return true if successful
-     * @throws IOException if an io error occurs
-     * @param header message header
-     */
-    boolean sendUnModified(Message msg, WireHeader header) throws IOException {
-        if (closed) {
-            throw new IOException("Pipe closed");
-        }
-        wire.sendMessage(msg, destPeers, header);
-        // we are here, there are not io exception, we assume it succeeded
-        return true;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/PipeRegistrar.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/PipeRegistrar.java
deleted file mode 100644 (file)
index 71bd0f1..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.pipe;
-
-import net.jxta.pipe.InputPipe;
-
-/**
- * Interface for classes which manage input pipe registrations.
- */
-interface PipeRegistrar {
-
-    /**
-     * Register that this peer is an InputPipe for the specified Pipe ID.
-     *
-     * @param pipe The InputPipe to be registered.
-     * @return If {@code true} then the pipe was registered, otherwise 
-     * {@code false}.
-     */
-    boolean register(InputPipe pipe);
-    
-    /**
-     * This peer is no longer listening on the specified pipe.
-     *
-     * @param pipe The InputPipe to be forgotten.
-     * @return {@code true} if the pipe was removed otherwise {@code false}.
-     */
-    boolean forget(InputPipe pipe);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/PipeResolver.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/PipeResolver.java
deleted file mode 100644 (file)
index 768bb15..0000000
+++ /dev/null
@@ -1,1218 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.pipe;
-
-import net.jxta.credential.Credential;
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredTextDocument;
-import net.jxta.document.XMLDocument;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointListener;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.OutgoingMessageEvent;
-import net.jxta.id.ID;
-import net.jxta.impl.cm.Srdi;
-import net.jxta.impl.cm.Srdi.SrdiInterface;
-import net.jxta.impl.cm.SrdiIndex;
-import net.jxta.impl.protocol.PipeResolverMsg;
-import net.jxta.impl.protocol.ResolverQuery;
-import net.jxta.impl.protocol.SrdiMessageImpl;
-import net.jxta.impl.resolver.InternalQueryHandler;
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.logging.Logging;
-import net.jxta.membership.MembershipService;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.pipe.InputPipe;
-import net.jxta.pipe.PipeID;
-import net.jxta.pipe.PipeService;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.PipeAdvertisement;
-import net.jxta.protocol.PipeResolverMessage;
-import net.jxta.protocol.PipeResolverMessage.MessageType;
-import net.jxta.protocol.ResolverQueryMsg;
-import net.jxta.protocol.ResolverResponseMsg;
-import net.jxta.protocol.ResolverSrdiMsg;
-import net.jxta.protocol.SrdiMessage;
-import net.jxta.protocol.SrdiMessage.Entry;
-import net.jxta.rendezvous.RendezVousService;
-import net.jxta.rendezvous.RendezVousStatus;
-import net.jxta.resolver.ResolverService;
-import net.jxta.resolver.SrdiHandler;
-
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.io.IOException;
-import java.io.Reader;
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.EventListener;
-import java.util.EventObject;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * This class implements the Resolver interfaces for a PipeServiceImpl.
- */
-class PipeResolver implements SrdiInterface, InternalQueryHandler, SrdiHandler, PipeRegistrar {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(PipeResolver.class.getName());
-
-    private final static String PipeResolverName = "JxtaPipeResolver";
-    private final static String srdiIndexerFileName = "pipeResolverSrdi";
-
-    /**
-     * Local SRDI GC Interval
-     */
-    private final static long GcDelay = 1 * TimeUtils.AMINUTE;
-
-    /**
-     * Constant for pipe event listeners to signify any query id.
-     */
-    final static int ANYQUERY = 0;
-
-    /**
-     * The current query ID. The next value returned by {@link #getNextQueryID()}
-     * will be one greater than this value.
-     */
-    private static int currentQueryID = 1;
-
-    /**
-     * Group we are working for
-     */
-    private PeerGroup myGroup = null;
-    /**
-     * Group we are working for
-     */
-    private EndpointService endpoint = null;
-
-    /**
-     * Resolver Service we will register with
-     */
-    private ResolverService resolver = null;
-
-    /**
-     * The discovery service we will use
-     */
-    private DiscoveryService discovery = null;
-
-    /**
-     * Membership Service we will use
-     */
-    private MembershipService membership = null;
-
-    private Srdi srdi = null;
-    private Thread srdiThread = null;
-    private SrdiIndex srdiIndex = null;
-    private RendezVousService rendezvous = null;
-
-    /**
-     * The locally registered {@link net.jxta.pipe.InputPipe}s
-     */
-    private final Map<ID, InputPipe> localInputPipes = new HashMap<ID, InputPipe>();
-
-    /**
-     * Registered listeners for pipe events.
-     */
-    private final Map<ID, Map<Integer, Listener>> outputpipeListeners = new HashMap<ID, Map<Integer, Listener>>();
-
-    /**
-     * Encapsulates current Membership Service credential.
-     */
-    final static class CurrentCredential {
-        /**
-         * The current default credential
-         */
-        final Credential credential;
-
-        /**
-         * The current default credential in serialized XML form.
-         */
-        final XMLDocument credentialDoc;
-
-        CurrentCredential(Credential credential, XMLDocument credentialDoc) {
-            this.credential = credential;
-            this.credentialDoc = credentialDoc;
-        }
-    }
-
-    /**
-     * The current Membership service default credential.
-     */
-    CurrentCredential currentCredential;
-
-    /**
-     * Listener we use for membership property events.
-     */
-    private class CredentialListener implements PropertyChangeListener {
-
-        /**
-         * Standard Constructor
-         */
-        CredentialListener() {}
-
-        /**
-         * {@inheritDoc}
-         */
-        public void propertyChange(PropertyChangeEvent evt) {
-            if (MembershipService.DEFAULT_CREDENTIAL_PROPERTY.equals(evt.getPropertyName())) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("New default credential event");
-                }
-
-                synchronized (PipeResolver.this) {
-                    Credential cred = (Credential) evt.getNewValue();
-                    XMLDocument credentialDoc;
-
-                    if (null != cred) {
-                        try {
-                            credentialDoc = (XMLDocument) cred.getDocument(MimeMediaType.XMLUTF8);
-                            currentCredential = new CurrentCredential(cred, credentialDoc);
-                        } catch (Exception all) {
-                            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                                LOG.log(Level.WARNING, "Could not generate credential document", all);
-                            }
-                            currentCredential = null;
-                        }
-                    } else {
-                        currentCredential = null;
-                    }
-                }
-            }
-        }
-    }
-
-    final CredentialListener membershipCredListener = new CredentialListener();
-
-    /**
-     * A pipe resolver event.
-     */
-    static class Event extends EventObject {
-
-        private final ID peerid;
-        private final ID pipeid;
-        private final String type;
-        private final int queryID;
-
-        /**
-         * Creates a new pipe resolution event
-         *
-         * @param source  The PipeResolver generating the event.
-         * @param peerid  The peer on which the pipe was found
-         * @param pipeid  the pipe which was found
-         * @param type    the type of pipe which was found
-         * @param queryid The query id associated with the response returned in this event
-         */
-        public Event(PipeResolver source, ID peerid, ID pipeid, String type, int queryid) {
-            super(source);
-            this.peerid = peerid;
-            this.pipeid = pipeid;
-            this.type = type;
-            this.queryID = queryid;
-        }
-
-        /**
-         * Returns the peer associated with the event
-         *
-         * @return peerid
-         */
-        public ID getPeerID() {
-            return peerid;
-        }
-
-        /**
-         * Returns the pipe associated with the event
-         *
-         * @return pipeid
-         */
-        public ID getPipeID() {
-            return pipeid;
-        }
-
-        /**
-         * Returns the type of the pipe that is associated with the event
-         *
-         * @return type
-         */
-        public String getType() {
-            return type;
-        }
-
-        /**
-         * Returns The query id associated with the response returned in this event
-         *
-         * @return query id associated with the response
-         */
-        public int getQueryID() {
-            return queryID;
-        }
-    }
-
-
-    /**
-     * Pipe Resolver Event Listener. Implement this interface is you wish to
-     * Receive Pipe Resolver events.
-     */
-    interface Listener extends EventListener {
-        /**
-         * Pipe Resolve event
-         *
-         * @param event event the PipeResolver Event
-         * @return true if the event was handled otherwise false
-         */
-        boolean pipeResolveEvent(Event event);
-
-        /**
-         * A NAK Event was received for this pipe
-         *
-         * @param event event the PipeResolver Event
-         * @return true if the event was handled otherwise false
-         */
-        boolean pipeNAKEvent(Event event);
-    }
-
-    /**
-     * return the next query id.
-     *
-     * @return the next eligible query id.
-     */
-    static synchronized int getNextQueryID() {
-        currentQueryID++;
-        if (currentQueryID == Integer.MAX_VALUE) {
-            currentQueryID = 1;
-        }
-        return currentQueryID;
-    }
-
-    /**
-     * Constructor for the PipeResolver object
-     *
-     * @param peerGroup group for which this PipeResolver operates in
-     */
-    PipeResolver(PeerGroup peerGroup) {
-
-        myGroup = peerGroup;
-        resolver = myGroup.getResolverService();
-        membership = myGroup.getMembershipService();
-        rendezvous = myGroup.getRendezVousService();
-        endpoint = myGroup.getEndpointService();
-
-        // Register to the Generic ResolverServiceImpl
-        resolver.registerHandler(PipeResolverName, this);
-
-        // start srdi
-        srdiIndex = new SrdiIndex(myGroup, srdiIndexerFileName, GcDelay);
-
-        srdi = new Srdi(myGroup, PipeResolverName, this, srdiIndex, 2 * TimeUtils.AMINUTE, 1 * TimeUtils.AYEAR);
-        srdiThread = new Thread(myGroup.getHomeThreadGroup(), srdi, "Pipe Resolver Srdi Thread");
-        srdiThread.setDaemon(true);
-        srdiThread.start();
-
-        resolver.registerSrdiHandler(PipeResolverName, this);
-        synchronized (this) {
-            // register our credential listener.
-            membership.addPropertyChangeListener(MembershipService.DEFAULT_CREDENTIAL_PROPERTY, membershipCredListener);
-            try {
-                // set the initial version of the default credential.
-                currentCredential = null;
-                Credential credential = membership.getDefaultCredential();
-                XMLDocument credentialDoc;
-
-                if (null != credential) {
-                    credentialDoc = (XMLDocument) credential.getDocument(MimeMediaType.XMLUTF8);
-                    currentCredential = new CurrentCredential(credential, credentialDoc);
-                }
-            } catch (Exception all) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "could not get default credential", all);
-                }
-            }
-        }
-    }
-
-    private boolean isRendezvous() {
-        if (rendezvous == null) {
-            rendezvous = myGroup.getRendezVousService();
-        }
-        RendezVousStatus mode = rendezvous.getRendezVousStatus();
-        return (mode == RendezVousStatus.RENDEZVOUS ||mode == RendezVousStatus.AUTO_RENDEZVOUS);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public int processQuery(ResolverQueryMsg query) {
-        return processQuery(query, null);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public int processQuery(ResolverQueryMsg query, EndpointAddress srcAddr) {
-
-        String queryFrom;
-
-        if (null != srcAddr) {
-            if ("jxta".equals(srcAddr.getProtocolName())) {
-                queryFrom = ID.URIEncodingName + ":" + ID.URNNamespace + ":" + srcAddr.getProtocolAddress();
-            } else {
-                // we don't know who routed us the query. Assume it came from the source.
-                queryFrom = query.getSrcPeer().toString();
-            }
-        } else {
-            // we don't know who routed us the query. Assume it came from the source.
-            queryFrom = query.getSrcPeer().toString();
-        }
-
-        String responseDest = query.getSrcPeer().toString();
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Starting for :" + query.getQueryId() + " from " + srcAddr);
-        }
-
-        Reader queryReader = new StringReader(query.getQuery());
-        StructuredTextDocument doc = null;
-        try {
-            doc = (StructuredTextDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, queryReader);
-        } catch (IOException e) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "discarding malformed request ", e);
-            }
-            // no sense in re-propagation here
-            return ResolverService.OK;
-        } finally {
-            try {
-                queryReader.close();
-            } catch (IOException ignored) {
-                // ignored
-            }
-            queryReader = null;
-        }
-
-        PipeResolverMessage pipeQuery;
-        try {
-            pipeQuery = new PipeResolverMsg(doc);
-        } catch (IllegalArgumentException badDoc) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "discarding malformed request ", badDoc);
-            }
-            // no sense in re-propagation here
-            return ResolverService.OK;
-        } finally {
-            doc = null;
-        }
-
-        // is it a query?
-        if (!pipeQuery.getMsgType().equals(MessageType.QUERY)) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("expected query - discarding.");
-            }
-            // no sense in re-propagation here
-            return ResolverService.OK;
-        }
-
-        // see if it is a query directed at our peer.
-        Set<ID> destPeers = pipeQuery.getPeerIDs();
-        boolean directedQuery = !destPeers.isEmpty();
-        boolean queryForMe = !directedQuery;
-
-        if (directedQuery) {
-            for (Object destPeer : destPeers) {
-                ID aPeer = (ID) destPeer;
-                if (aPeer.equals(myGroup.getPeerID())) {
-                    queryForMe = true;
-                    break;
-                }
-            }
-
-            if (!queryForMe) {
-                // It is an directed query, but request wasn't for this peer.
-                if (query.getSrcPeer().toString().equals(queryFrom)) {
-                    // we only respond if the original src was not the query forwarder
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("discarding query. Query not for us.");
-                    }
-                    // tell the resolver no further action is needed.
-                    return ResolverService.OK;
-                }
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("responding to \'misdirected\' forwarded query.");
-                }
-                responseDest = queryFrom;
-            }
-        }
-
-        PeerID peerID = null;
-        if (queryForMe) {
-            // look locally.
-            InputPipe ip = findLocal((PipeID) pipeQuery.getPipeID());
-            if ((ip != null) && (ip.getType().equals(pipeQuery.getPipeType()))) {
-                peerID = myGroup.getPeerID();
-            }
-        }
-
-        if ((null == peerID) && !directedQuery) {
-            // This request was sent to everyone.
-            if (myGroup.isRendezvous()) {
-                // We are a RDV, allow the ResolverService to repropagate the query
-                List<PeerID> results = srdiIndex.query(pipeQuery.getPipeType(), PipeAdvertisement.IdTag,
-                        pipeQuery.getPipeID().toString(), 20);
-
-                if (!results.isEmpty()) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("forwarding query to " + results.size() + " peers");
-                    }
-                    srdi.forwardQuery(results, query);
-                    // tell the resolver no further action is needed.
-                    return ResolverService.OK;
-                }
-
-                // we don't know anything, continue the walk.
-                return ResolverService.Repropagate;
-            } else {
-                // We are an edge
-                if (query.getSrcPeer().toString().equals(queryFrom)) {
-                    // we only respond if the original src was not the query forwarder
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("discarding query.");
-                    }
-
-                    // tell the resolver no further action is needed.
-                    return ResolverService.OK;
-                }
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("responding to query forwarded for \'misdirected\' query.");
-                }
-                responseDest = queryFrom;
-            }
-        }
-
-        // Build the answer
-        PipeResolverMessage pipeResp = new PipeResolverMsg();
-
-        pipeResp.setMsgType(MessageType.ANSWER);
-        pipeResp.setPipeID(pipeQuery.getPipeID());
-        pipeResp.setPipeType(pipeQuery.getPipeType());
-        if (null == peerID) {
-            // respond negative.
-            pipeResp.addPeerID(myGroup.getPeerID());
-            pipeResp.setFound(false);
-        } else {
-            pipeResp.addPeerID(peerID);
-            pipeResp.setFound(true);
-            pipeResp.setInputPeerAdv(myGroup.getPeerAdvertisement());
-        }
-
-        // make a response from the incoming query
-        ResolverResponseMsg res = query.makeResponse();
-
-        CurrentCredential current = currentCredential;
-        if (null != current) {
-            res.setCredential(current.credentialDoc);
-        }
-        res.setResponse(pipeResp.getDocument(MimeMediaType.XMLUTF8).toString());
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Sending answer for query \'" + query.getQueryId() + "\' to : " + responseDest);
-        }
-        resolver.sendResponse(responseDest, res);
-        return ResolverService.OK;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void processResponse(ResolverResponseMsg response) {
-        processResponse(response, null);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void processResponse(ResolverResponseMsg response, EndpointAddress srcAddr) {
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("got a response for \'" + response.getQueryId() + "\'");
-        }
-
-        Reader resp = new StringReader(response.getResponse());
-        StructuredTextDocument doc = null;
-        try {
-            doc = (StructuredTextDocument)
-                    StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, resp);
-        } catch (Throwable e) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "malformed response - discard", e);
-            }
-            return;
-        } finally {
-            try {
-                resp.close();
-            } catch (IOException ignored) {// ignored
-            }
-            resp = null;
-        }
-
-        PipeResolverMessage pipeResp;
-
-        try {
-            pipeResp = new PipeResolverMsg(doc);
-        } catch (Throwable caught) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "malformed response - discarding.", caught);
-            }
-            return;
-        } finally {
-            doc = null;
-        }
-
-        // check if it's a response.
-        if (!pipeResp.getMsgType().equals(MessageType.ANSWER)) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("expected response - discarding.");
-            }
-            return;
-        }
-
-        PeerAdvertisement padv = pipeResp.getInputPeerAdv();
-
-        if ((null != padv) && !(myGroup.getPeerID().equals(padv.getPeerID()))) {
-            try {
-                // This is not our own peer adv so we keep it only for the default
-                // expiration time.
-                if (null == discovery) {
-                    discovery = myGroup.getDiscoveryService();
-                }
-                if (null != discovery) {
-                    discovery.publish(padv, DiscoveryService.DEFAULT_EXPIRATION, DiscoveryService.DEFAULT_EXPIRATION);
-                }
-            } catch (IOException ignored) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("could not publish peer adv");
-                }
-            }
-        }
-
-        String ipId = pipeResp.getPipeID().toString();
-
-        Set<ID> peerRsps = pipeResp.getPeerIDs();
-
-        for (Object peerRsp : peerRsps) {
-            // process each peer for which this response is about.
-            PeerID peer = (PeerID) peerRsp;
-            if (!pipeResp.isFound()) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("NACK for pipe \'" + ipId + "\' from peer " + peer);
-                }
-
-                // We have received a NACK. Remove that entry.
-                srdiIndex.add(pipeResp.getPipeType(), PipeAdvertisement.IdTag, ipId, peer, 0);
-            } else {
-                long exp = getEntryExp(pipeResp.getPipeType(), PipeAdvertisement.IdTag, ipId, peer);
-                if ((PipeServiceImpl.VERIFYINTERVAL / 2) > exp) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Using Expiration " + (PipeServiceImpl.VERIFYINTERVAL / 2) + " which is > " + exp);
-                    }
-                    // create antry only if one does not exist,or entry exists with
-                    // lesser lifetime
-                    // cache the result for half the verify interval
-                    srdiIndex.add(pipeResp.getPipeType(), PipeAdvertisement.IdTag, ipId, peer,
-                            (PipeServiceImpl.VERIFYINTERVAL / 2));
-                } else {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("DB Expiration " + exp + " > " + (PipeServiceImpl.VERIFYINTERVAL / 2)
-                                + " overriding attempt to decrease lifetime");
-                    }
-                }
-            }
-
-            // call listener for pipeid
-            callListener(response.getQueryId(), pipeResp.getPipeID(), pipeResp.getPipeType(), peer, !pipeResp.isFound());
-        }
-    }
-
-    private long getEntryExp(String pkey, String skey, String value, PeerID peerid) {
-        List<SrdiIndex.Entry> list = srdiIndex.getRecord(pkey, skey, value);
-
-        for (SrdiIndex.Entry entry : list) {
-            if (entry.peerid.equals(peerid)) {
-                // exp in millis
-                return TimeUtils.toRelativeTimeMillis(entry.expiration);
-            }
-        }
-        return -1;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean processSrdi(ResolverSrdiMsg message) {
-
-        if (!isRendezvous()) {
-            // avoid caching in non rendezvous mode
-            return true;
-        }
-        if (message == null) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("no SRDI message");
-            }
-            return false;
-        }
-
-        if (message.getPayload() == null) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("empty SRDI message");
-            }
-            return false;
-        }
-
-        SrdiMessage srdiMsg;
-        try {
-            StructuredTextDocument asDoc = (StructuredTextDocument)
-                    StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, new StringReader(message.getPayload()));
-            srdiMsg = new SrdiMessageImpl(asDoc);
-        } catch (Throwable e) {
-            // we don't understand this msg, let's skip it
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Invalid SRDI message", e);
-            }
-            return false;
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Received an SRDI messsage with " + srdiMsg.getEntries().size() + " entries from " + srdiMsg.getPeerID());
-        }
-
-        for (Object o : srdiMsg.getEntries()) {
-            Entry entry = (Entry) o;
-            srdiIndex.add(srdiMsg.getPrimaryKey(), entry.key, entry.value, srdiMsg.getPeerID(), entry.expiration);
-        }
-
-        if (!PipeService.PropagateType.equals(srdiMsg.getPrimaryKey())) {
-            // don't replicate entries for propagate pipes. For unicast type
-            // pipes the replica is useful in finding pipe instances. Since
-            // walking rather than searching is done for propagate pipes this
-            // appropriate.
-            srdi.replicateEntries(srdiMsg);
-        }
-        return true;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void messageSendFailed(PeerID peerid, OutgoingMessageEvent e) {// so what.
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void pushEntries(boolean all) {
-        pushSrdi((PeerID) null, all);
-    }
-
-    /**
-     * unregisters the resolver handler
-     */
-    void stop() {
-
-        resolver.unregisterHandler(PipeResolverName);
-        resolver.unregisterSrdiHandler(PipeResolverName);
-
-        srdiIndex.stop();
-        srdiIndex = null;
-        // stop the srdi thread
-        if (srdiThread != null) {
-            srdi.stop();
-        }
-        srdiThread = null;
-        srdi = null;
-
-        membership.removePropertyChangeListener("defaultCredential", membershipCredListener);
-        currentCredential = null;
-
-        // Avoid cross-reference problems with GC
-        myGroup = null;
-        resolver = null;
-        discovery = null;
-        membership = null;
-
-        outputpipeListeners.clear();
-
-        // close the local pipes
-        List<InputPipe> openLocalPipes = new ArrayList<InputPipe>(localInputPipes.values());
-        for (InputPipe aPipe : openLocalPipes) {
-            try {
-                aPipe.close();
-            } catch (Exception failed) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Failure closing " + aPipe);
-                }
-            }
-        }
-
-        localInputPipes.clear();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean register(InputPipe ip) {
-
-        PipeID pipeID = (PipeID) ip.getPipeID();
-        synchronized (this) {
-            if (localInputPipes.containsKey(pipeID)) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Existing registered InputPipe for " + pipeID);
-                }
-                return false;
-            }
-
-            // Register this input pipe
-            boolean registered = endpoint.addIncomingMessageListener((EndpointListener) ip, "PipeService", pipeID.toString());
-            if (!registered) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.severe("Existing registered Endpoint Listener for " + pipeID);
-                }
-                return false;
-            }
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Registering local InputPipe for " + pipeID);
-            }
-            localInputPipes.put(pipeID, ip);
-        }
-
-        // Announce the pipe to SRDI so that others will know we are listening.
-        pushSrdi(ip, true);
-
-        // Call anyone who may be listening for this input pipe.
-        callListener(0, pipeID, ip.getType(), myGroup.getPeerID(), false);
-        return true;
-    }
-
-    /**
-     * Return the local {@link net.jxta.pipe.InputPipe InputPipe}, if any, for the
-     * specified {@link net.jxta.pipe.PipeID PipeID}.
-     *
-     * @param pipeID the PipeID who's InputPipe is desired.
-     * @return The InputPipe object.
-     */
-    public InputPipe findLocal(PipeID pipeID) {
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Find local InputPipe for " + pipeID);
-        }
-
-        // First look if the pipe is a local InputPipe
-        InputPipe ip = localInputPipes.get(pipeID);
-        // Found it.
-        if ((null != ip) && Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("found local InputPipe for " + pipeID);
-        }
-        return ip;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean forget(InputPipe pipe) {
-
-        PipeID pipeID = (PipeID) pipe.getPipeID();
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Unregistering local InputPipe for " + pipeID);
-        }
-
-        // Unconditionally announce the change to SRDI.
-        // FIXME 20040529 bondolo This is overkill, it should be able to wait
-        // until the deltas are pushed.
-        pushSrdi(pipe, false);
-
-        InputPipe ip;
-
-        synchronized (this) {
-            ip = localInputPipes.remove(pipeID);
-        }
-
-        if (pipe != ip) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Pipe removed was not the same as the pipe to be removed!");
-            }
-        }
-
-        if (null != ip) {
-            // remove the queue for the general demux
-            EndpointListener removed = endpoint.removeIncomingMessageListener("PipeService", pipeID.toString());
-
-            if ((null == removed) || (pipe != removed)) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("removeIncomingMessageListener() did not remove correct pipe!");
-                }
-            }
-        }
-
-        return (ip != null);
-    }
-
-    /**
-     * Add a pipe resolver listener
-     *
-     * @param listener listener
-     * @param queryID    The query this callback is being made in response to.
-     * @param pipeID The pipe which is the subject of the event.
-     * @return true if sucessfully added
-     */
-    synchronized boolean addListener(ID pipeID, Listener listener, int queryID) {
-
-        Map<Integer, Listener> perpipelisteners = outputpipeListeners.get(pipeID);
-
-        // if no map for this pipeid, make one and add it to the top map.
-        if (null == perpipelisteners) {
-            perpipelisteners = new HashMap<Integer, Listener>();
-            outputpipeListeners.put(pipeID, perpipelisteners);
-        }
-
-        boolean alreadyThere = perpipelisteners.containsKey(queryID);
-
-        if (!alreadyThere) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("adding listener for " + pipeID + " / " + queryID);
-            }
-
-            perpipelisteners.put(queryID, listener);
-        }
-
-        return alreadyThere;
-    }
-
-    /**
-     * Call the listener for the specified pipe id informing it about the
-     * specified peer.
-     *
-     * @param qid    The query this callback is being made in response to.
-     * @param pipeID The pipe which is the subject of the event.
-     * @param type   The type of the pipe which is the subject of the event.
-     * @param peer   The peer on which the remote input pipe was found.
-     * @param NAK indicate whether the event is a nack
-     */
-    void callListener(int qid, ID pipeID, String type, PeerID peer, boolean NAK) {
-
-        Event newevent = new Event(this, peer, pipeID, type, qid);
-        boolean handled = false;
-
-        while (!handled) {
-            Listener pipeListener;
-
-            synchronized (this) {
-                Map<Integer, Listener> perpipelisteners = outputpipeListeners.get(pipeID);
-                if (null == perpipelisteners) {
-                    if ((ANYQUERY != qid) && Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("No listener for pipe " + pipeID);
-                    }
-                    break;
-                }
-                pipeListener = perpipelisteners.get(qid);
-            }
-
-            if (null != pipeListener) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Calling Pipe resolver listener " + (NAK ? "NAK " : "") + "for " + pipeID);
-                }
-
-                try {
-                    if (NAK) {
-                        handled = pipeListener.pipeNAKEvent(newevent);
-                    } else {
-                        handled = pipeListener.pipeResolveEvent(newevent);
-                    }
-                } catch (Throwable ignored) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING
-                                ,
-                                "Uncaught Throwable in listener for: " + pipeID + "(" + pipeListener.getClass().getName() + ")", ignored);
-                    }
-                }
-            }
-
-            // if we havent tried it already, try it with the ANYQUERY
-            if (ANYQUERY == qid) {
-                break;
-            }
-            qid = ANYQUERY;
-        }
-    }
-
-    /**
-     * Remove a pipe resolver listener
-     *
-     * @param pipeID  listener to remove
-     * @param queryID matching queryid.
-     * @return listener object removed
-     */
-    synchronized Listener removeListener(ID pipeID, int queryID) {
-
-        Map<Integer, Listener> perpipelisteners = outputpipeListeners.get(pipeID);
-
-        if (null == perpipelisteners) {
-            return null;
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("removing listener for " + pipeID + " / " + queryID);
-        }
-        Listener removedListener = perpipelisteners.remove(queryID);
-
-        if (perpipelisteners.isEmpty()) {
-            outputpipeListeners.remove(pipeID);
-        }
-
-        return removedListener;
-    }
-
-    /**
-     * Send a request to find an input pipe
-     *
-     * @param adv             the advertisement for the pipe we are seeking.
-     * @param acceptablePeers the set of peers at which we wish the pipe to
-     *                        be resolved. We will not accept responses from peers other than those
-     *                        in this set. Empty set means all peers are acceptable.
-     * @param queryID         the query ID to use for the query. if zero then a query
-     *                        ID will be generated
-     * @return the query id under which the request was sent
-     */
-    int sendPipeQuery(PipeAdvertisement adv, Set<? extends ID> acceptablePeers, int queryID) {
-
-        // choose a query id if non-prechosen.
-        if (0 == queryID) {
-            queryID = getNextQueryID();
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine((acceptablePeers.isEmpty() ? "Undirected" : "Directed") + " query (" + queryID + ") for " + adv.getPipeID());
-        }
-
-        Collection<? extends ID> targetPeers = new ArrayList<ID>(acceptablePeers);
-
-        // check local srdi to see if we have a potential answer
-        List<? extends ID> knownLocations = srdiIndex.query(adv.getType(), PipeAdvertisement.IdTag, adv.getPipeID().toString(), 100);
-
-        if (!knownLocations.isEmpty()) {
-            // we think we know where the pipe might be...
-
-            if (!acceptablePeers.isEmpty()) {
-                // only keep those peers which are acceptable.
-                knownLocations.retainAll(acceptablePeers);
-            }
-
-            // if the known locations contain any of the acceptable peers then
-            // we will send a directed query to ONLY those peers.
-            if (!knownLocations.isEmpty()) {
-                targetPeers = knownLocations;
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Using SRDI cache results for directed query (" + queryID + ") for " + adv.getPipeID());
-                }
-            }
-        }
-
-        // build the pipe query message.
-        PipeResolverMessage pipeQry = new PipeResolverMsg();
-
-        pipeQry.setMsgType(MessageType.QUERY);
-        pipeQry.setPipeID(adv.getPipeID());
-        pipeQry.setPipeType(adv.getType());
-
-        for (Object targetPeer : targetPeers) {
-            pipeQry.addPeerID((PeerID) targetPeer);
-        }
-
-        StructuredTextDocument asDoc = (StructuredTextDocument) pipeQry.getDocument(MimeMediaType.XMLUTF8);
-
-        // build the resolver query
-        ResolverQuery query = new ResolverQuery();
-
-        query.setHandlerName(PipeResolverName);
-        query.setQueryId(queryID);
-        query.setSrcPeer(myGroup.getPeerID());
-        query.setQuery(asDoc.toString());
-
-        CurrentCredential current = currentCredential;
-
-        if (null != current) {
-            query.setCredential(current.credentialDoc);
-        }
-
-        if (targetPeers.isEmpty()) {
-            // we have no idea, walk the tree
-
-            if (myGroup.isRendezvous()) {
-                // We are a rdv, then send it to the replica peer.
-
-                PeerID peer = srdi.getReplicaPeer(pipeQry.getPipeType() + PipeAdvertisement.IdTag + pipeQry.getPipeID().toString());
-                if (null != peer) {
-                    srdi.forwardQuery(peer, query);
-                    return queryID;
-                }
-            }
-
-            resolver.sendQuery(null, query);
-        } else {
-            // send it only to the peers whose result we would accept.
-
-            for (ID targetPeer : targetPeers) {
-                resolver.sendQuery(targetPeer.toString(), query);
-            }
-        }
-        return queryID;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    SrdiIndex getSrdiIndex() {
-        return srdiIndex;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * This implementation knows nothing of deltas, it just pushes it all.
-     */
-    private void pushSrdi(PeerID peer, boolean all) {
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Pushing " + (all ? "all" : "deltas") + " SRDI to " + peer);
-        }
-
-        Map<String, List<Entry>> types = new HashMap<String, List<Entry>>();
-
-        synchronized (this) {
-            for (InputPipe ip : localInputPipes.values()) {
-                Entry entry = new Entry(PipeAdvertisement.IdTag, ip.getPipeID().toString(), Long.MAX_VALUE);
-                String type = ip.getType();
-                List<Entry> entries = types.get(type);
-
-                if (null == entries) {
-                    entries = new ArrayList<Entry>();
-                    types.put(type, entries);
-                }
-                entries.add(entry);
-            }
-        }
-
-        for (String type : types.keySet()) {
-            List<Entry> entries = types.get(type);
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Sending a Pipe SRDI messsage in " + myGroup.getPeerGroupID() + " of " + entries.size() + " entries of type " + type);
-            }
-
-            SrdiMessage srdiMsg = new SrdiMessageImpl(myGroup.getPeerID(), 1, type, entries);
-            if (null == peer) {
-                srdi.pushSrdi(null, srdiMsg);
-            } else {
-                srdi.pushSrdi(peer, srdiMsg);
-            }
-        }
-    }
-
-    /**
-     * Push SRDI entry for the specified pipe
-     *
-     * @param ip     the pipe who's entry we are pushing
-     * @param adding adding an entry for the pipe or expiring the entry?
-     */
-    private void pushSrdi(InputPipe ip, boolean adding) {
-
-        srdiIndex.add(ip.getType(), PipeAdvertisement.IdTag, ip.getPipeID().toString(), myGroup.getPeerID(),
-                adding ? Long.MAX_VALUE : 0);
-
-        SrdiMessage srdiMsg;
-        try {
-            srdiMsg = new SrdiMessageImpl(myGroup.getPeerID(), 1, // ttl
-                    ip.getType(), PipeAdvertisement.IdTag, ip.getPipeID().toString(), adding ? Long.MAX_VALUE : 0);
-
-            if (myGroup.isRendezvous()) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Replicating a" + (adding ? "n add" : " remove") + " Pipe SRDI entry for pipe [" + ip.getPipeID()
-                            + "] of type " + ip.getType());
-                }
-
-                srdi.replicateEntries(srdiMsg);
-            } else {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Sending a" + (adding ? "n add" : " remove") + " Pipe SRDI messsage for pipe [" + ip.getPipeID()
-                            + "] of type " + ip.getType());
-                }
-                srdi.pushSrdi(null, srdiMsg);
-            }
-        } catch (Throwable e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Uncaught throwable pushing SRDI entries", e);
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/PipeServiceImpl.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/PipeServiceImpl.java
deleted file mode 100644 (file)
index e36833d..0000000
+++ /dev/null
@@ -1,748 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.pipe;
-
-
-import net.jxta.document.Advertisement;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.logging.Logging;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.pipe.InputPipe;
-import net.jxta.pipe.OutputPipe;
-import net.jxta.pipe.OutputPipeEvent;
-import net.jxta.pipe.OutputPipeListener;
-import net.jxta.pipe.PipeID;
-import net.jxta.pipe.PipeMsgListener;
-import net.jxta.pipe.PipeService;
-import net.jxta.platform.Module;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.protocol.PipeAdvertisement;
-import net.jxta.service.Service;
-import net.jxta.peer.PeerID;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.text.MessageFormat;
-
-
-/**
- * A JXTA {@link net.jxta.pipe.PipeService} implementation which implements the
- * standard JXTA Pipe Resolver Protocol (PRP).
- * <p/>
- * This class provides implementation for Unicast, unicast secure and
- * (indirectly) propagate pipes.
- *
- * @see net.jxta.pipe.PipeService
- * @see net.jxta.pipe.InputPipe
- * @see net.jxta.pipe.OutputPipe
- * @see net.jxta.endpoint.Message
- * @see net.jxta.protocol.PipeAdvertisement
- * @see net.jxta.protocol.PipeResolverMessage
- * @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-pbp" target="_blank">JXTA Protocols Specification : Pipe Binding Protocol</a>
- */
-public class PipeServiceImpl implements PipeService, PipeResolver.Listener {
-
-    /**
-     * The Logger
-     */
-    private final static Logger LOG = Logger.getLogger(PipeServiceImpl.class.getName());
-
-    /**
-     * the interval at which we verify that a pipe is still resolved at a
-     * remote peer.
-     */
-    static final long VERIFYINTERVAL = 20 * TimeUtils.AMINUTE;
-
-    /**
-     * The group this PipeService is working for.
-     */
-    private PeerGroup group = null;
-
-    /**
-     * Our resolver handler.
-     */
-    private PipeResolver pipeResolver = null;
-
-    /**
-     * Link to wire pipe impl.
-     */
-    private WirePipeImpl wirePipe = null;
-
-    /**
-     * the interface object we will hand out.
-     */
-    private PipeService myInterface = null;
-
-    /**
-     * the impl advertisement for this impl.
-     */
-    private ModuleImplAdvertisement implAdvertisement = null;
-
-    /**
-     * Table of listeners for asynchronous output pipe creation.
-     * <p/>
-     * <ul>
-     * <li>keys are {@link net.jxta.pipe.PipeID}</li>
-     * <li>values are {@link java.util.Map}</li>
-     * </ul>
-     * Within the value Map:
-     * <ul>
-     * <li>keys are {@link java.lang.Integer} representing queryid</li>
-     * <li>values are {@link OutputPipeHolder}</li>
-     * </ul>
-     */
-    private final Map<PipeID, Map<Integer, OutputPipeHolder>> outputPipeListeners = new HashMap<PipeID, Map<Integer, OutputPipeHolder>>();
-
-    /**
-     * Has the pipe service been started?
-     */
-    private volatile boolean started = false;
-
-    /**
-     * holds a pipe adv and a listener which will be called for resolutions
-     * of the pipe.
-     */
-    private static class OutputPipeHolder {
-        final PipeAdvertisement adv;
-        final Set<? extends ID> peers;
-        final OutputPipeListener listener;
-        final int queryid;
-
-        OutputPipeHolder(PipeAdvertisement adv, Set<? extends ID> peers, OutputPipeListener listener, int queryid) {
-            this.adv = adv;
-            this.peers = peers;
-            this.listener = listener;
-            this.queryid = queryid;
-        }
-    }
-
-
-    /**
-     * A listener useful for implementing synchronous behaviour.
-     */
-    private static class syncListener implements OutputPipeListener {
-
-        volatile OutputPipeEvent event = null;
-
-        syncListener() {}
-
-        /**
-         * Called when a input pipe has been located for a previously registered
-         * pipe. The event contains an {@link net.jxta.pipe.OutputPipe} which can
-         * be used to communicate with the remote peer.
-         *
-         * @param event <code>net.jxta.pipe.outputPipeEvent</code> event
-         */
-        public synchronized void outputPipeEvent(OutputPipeEvent event) {
-            // we only accept the first event.
-            if (null == this.event) {
-                this.event = event;
-                notifyAll();
-            }
-        }
-    }
-
-    /**
-     * Default Constructor (don't delete)
-     */
-    public PipeServiceImpl() {// What is reason for this constructor???
-        // the same is automatically generated.
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * We create only a single interface object and return it over and over
-     * again.
-     */
-    public synchronized PipeService getInterface() {
-        if (null == myInterface) {
-            myInterface = new PipeServiceInterface(this);
-        }
-        return myInterface;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ModuleImplAdvertisement getImplAdvertisement() {
-        return implAdvertisement;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized void init(PeerGroup group, ID assignedID, Advertisement impl) {
-
-        this.group = group;
-        implAdvertisement = (ModuleImplAdvertisement) impl;
-
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring Pipe Service : " + assignedID);
-
-            if (implAdvertisement != null) {
-                configInfo.append("\n\tImplementation :");
-                configInfo.append("\n\t\tModule Spec ID: ").append(implAdvertisement.getModuleSpecID());
-                configInfo.append("\n\t\tImpl Description : ").append(implAdvertisement.getDescription());
-                configInfo.append("\n\t\tImpl URI : ").append(implAdvertisement.getUri());
-                configInfo.append("\n\t\tImpl Code : ").append(implAdvertisement.getCode());
-            }
-
-            configInfo.append("\n\tGroup Params :");
-            configInfo.append("\n\t\tGroup : ").append(group);
-            configInfo.append("\n\t\tPeer ID : ").append(group.getPeerID());
-
-            configInfo.append("\n\tConfiguration :");
-            configInfo.append("\n\t\tVerify Interval : " + VERIFYINTERVAL + "ms");
-            LOG.config(configInfo.toString());
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Currently this service does not expect arguments.
-     */
-    public synchronized int startApp(String[] args) {
-
-        Service needed = group.getEndpointService();
-
-        if (null == needed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is an endpoint service");
-            }
-            return START_AGAIN_STALLED;
-        }
-
-        needed = group.getResolverService();
-        if (null == needed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is a resolver service");
-            }
-            return START_AGAIN_STALLED;
-        }
-
-        needed = group.getMembershipService();
-        if (null == needed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is a membership service");
-            }
-            return START_AGAIN_STALLED;
-        }
-
-        needed = group.getRendezVousService();
-        if (null == needed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is a rendezvous service");
-            }
-            return START_AGAIN_STALLED;
-        }
-
-        // create our resolver handler; it will register itself w/ the resolver.
-        pipeResolver = new PipeResolver(group);
-
-        // Create the WirePipe (propagated pipe)
-        wirePipe = new WirePipeImpl(group, pipeResolver);
-
-        // XXX 20061221 We could check the result of this.
-        wirePipe.startApp(args);
-
-        started = true;
-
-        return Module.START_OK;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized void stopApp() {
-        started = false;
-
-        try {
-            if (wirePipe != null) {
-                wirePipe.stopApp();
-            }
-        } catch (Throwable failed) {
-            LOG.log(Level.SEVERE, "Failed to stop wire pipe", failed);
-        } finally {
-            wirePipe = null;
-        }
-
-        try {
-            if (pipeResolver != null) {
-                pipeResolver.stop();
-            }
-        } catch (Throwable failed) {
-            LOG.log(Level.SEVERE, "Failed to stop pipe resolver", failed);
-        } finally {
-            pipeResolver = null;
-        }
-
-        // Avoid cross-reference problem with GC
-        group = null;
-        myInterface = null;
-
-        // clear outputPipeListeners
-        Collection<Map<Integer, OutputPipeHolder>> values = outputPipeListeners.values();
-
-        for (Map<Integer, OutputPipeHolder> value : values) {
-            value.clear();
-        }
-        outputPipeListeners.clear();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public InputPipe createInputPipe(PipeAdvertisement adv) throws IOException {
-        return createInputPipe(adv, null);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public InputPipe createInputPipe(PipeAdvertisement adv, PipeMsgListener listener) throws IOException {
-
-        if (!started) {
-            throw new IllegalStateException("Pipe Service has not been started or has been stopped");
-        }
-
-        String type = adv.getType();
-
-        if (type == null) {
-            throw new IllegalArgumentException("PipeAdvertisement type may not be null");
-        }
-
-        PipeID pipeId = (PipeID) adv.getPipeID();
-
-        if (pipeId == null) {
-            throw new IllegalArgumentException("PipeAdvertisement PipeID may not be null");
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Create " + type + " InputPipe for " + pipeId);
-        }
-
-        InputPipe inputPipe;
-        // create an InputPipe.
-        if (type.equals(PipeService.UnicastType)) {
-            inputPipe = new InputPipeImpl(pipeResolver, adv, listener);
-        } else if (type.equals(PipeService.UnicastSecureType)) {
-            inputPipe = new SecureInputPipeImpl(pipeResolver, adv, listener);
-        } else if (type.equals(PipeService.PropagateType)) {
-            if (wirePipe != null) {
-                inputPipe = wirePipe.createInputPipe(adv, listener);
-            } else {
-                throw new IOException("No propagated pipe servive available");
-            }
-        } else {
-            // Unknown type
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("Cannot create pipe for unknown type : " + type);
-            }
-            throw new IOException("Cannot create pipe for unknown type : " + type);
-        }
-        return inputPipe;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public OutputPipe createOutputPipe(PipeAdvertisement pipeAdv, long timeout) throws IOException {
-        return createOutputPipe(pipeAdv, Collections.<ID>emptySet(), timeout);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public OutputPipe createOutputPipe(PipeAdvertisement adv, Set<? extends ID> resolvablePeers, long timeout) throws IOException {
-        // convert zero to max value.
-        if (0 == timeout) {
-            timeout = Long.MAX_VALUE;
-        }
-
-        long absoluteTimeOut = TimeUtils.toAbsoluteTimeMillis(timeout);
-
-        // Make a listener, start async resolution and then wait until the timeout expires.
-        syncListener localListener = new syncListener();
-
-        int queryid = PipeResolver.getNextQueryID();
-
-        createOutputPipe(adv, resolvablePeers, localListener, queryid);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Waiting synchronously for " + timeout + "ms to resolve OutputPipe for " + adv.getPipeID());
-        }
-
-        try {
-            synchronized (localListener) {
-                while ((null == localListener.event) && (TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), absoluteTimeOut) < 0)) {
-                    try {
-                        localListener.wait(TimeUtils.ASECOND);
-                    } catch (InterruptedException woken) {
-                        Thread.interrupted();
-                    }
-                }
-            }
-        } finally {
-            // remove the listener we installed.
-            removeOutputPipeListener(adv.getPipeID().toString(), queryid);
-        }
-
-        if (null != localListener.event) {
-            return localListener.event.getOutputPipe();
-        } else {
-            throw new IOException("Output Pipe could not be resolved after " + timeout + "ms.");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void createOutputPipe(PipeAdvertisement pipeAdv, OutputPipeListener listener) throws IOException {
-        createOutputPipe(pipeAdv, Collections.<ID>emptySet(), listener);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void createOutputPipe(PipeAdvertisement pipeAdv, Set<? extends ID> resolvablePeers, OutputPipeListener listener) throws IOException {
-        createOutputPipe(pipeAdv, resolvablePeers, listener, PipeResolver.getNextQueryID());
-    }
-
-    private void createOutputPipe(PipeAdvertisement pipeAdv, Set<? extends ID> resolvablePeers, OutputPipeListener listener, int queryid) throws IOException {
-
-        if (!started) {
-            throw new IOException("Pipe Service has not been started or has been stopped");
-        }
-
-        // Recover the PipeId from the PipeServiceImpl Advertisement
-        PipeID pipeId = (PipeID) pipeAdv.getPipeID();
-        String type = pipeAdv.getType();
-
-        if (null == type) {
-            IllegalArgumentException failed = new IllegalArgumentException("Pipe type was not set");
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, failed.getMessage(), failed);
-            }
-            throw failed;
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Create " + type + " OutputPipe for " + pipeId);
-        }
-
-        if (PipeService.PropagateType.equals(type)) {
-            OutputPipe op;
-
-            if (resolvablePeers.size() == 1) {
-                op = new BlockingWireOutputPipe(group, pipeAdv, (PeerID) resolvablePeers.iterator().next());
-            } else {
-                if (wirePipe != null) {
-                    op = wirePipe.createOutputPipe(pipeAdv, resolvablePeers);
-                } else {
-                    throw new IOException("No propagated pipe service available");
-                }
-            }
-
-            if (null != op) {
-                OutputPipeEvent newevent = new OutputPipeEvent(this.getInterface(), op, pipeId.toString(), PipeResolver.ANYQUERY);
-
-                try {
-                    listener.outputPipeEvent(newevent);
-                } catch (Throwable ignored) {
-                    if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                        LOG.log(Level.SEVERE,
-                                "Uncaught Throwable in listener for " + pipeId + " (" + listener.getClass().getName() + ")",
-                                ignored);
-                    }
-                }
-            }
-        } else if (PipeService.UnicastType.equals(type) || PipeService.UnicastSecureType.equals(type)) {
-
-            addOutputPipeListener(pipeId, new OutputPipeHolder(pipeAdv, resolvablePeers, listener, queryid));
-            pipeResolver.addListener(pipeId, this, queryid);
-            pipeResolver.sendPipeQuery(pipeAdv, resolvablePeers, queryid);
-
-            // look locally for the pipe
-            if (resolvablePeers.isEmpty() || resolvablePeers.contains(group.getPeerID())) {
-                InputPipe local = pipeResolver.findLocal(pipeId);
-
-                // if we have a local instance, make sure the local instance is of the same type.
-                if (null != local) {
-                    if (local.getType().equals(pipeAdv.getType())) {
-                        pipeResolver.callListener(queryid, pipeId, local.getType(), group.getPeerID(), false);
-                    } else {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.warning(MessageFormat.format("rejecting local pipe ({0}) because type is not ({1})", local.getType(),
-                                    pipeAdv.getType()));
-                        }
-                    }
-                }
-            }
-        } else {
-            // Unknown type
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("createOutputPipe: cannot create pipe for unknown type : " + type);
-            }
-            throw new IOException("cannot create pipe for unknown type : " + type);
-        }
-    }
-
-    /*
-     * Add an output listener for the given pipeId.
-     */
-    private void addOutputPipeListener(PipeID pipeId, OutputPipeHolder pipeHolder) {
-        synchronized (outputPipeListeners) {
-            Map<Integer, OutputPipeHolder> perpipelisteners = outputPipeListeners.get(pipeId);
-
-            if (perpipelisteners == null) {
-                perpipelisteners = new HashMap<Integer, OutputPipeHolder>();
-                outputPipeListeners.put(pipeId, perpipelisteners);
-            }
-            if (perpipelisteners.get(pipeHolder.queryid) != null) {
-                LOG.warning("Clobbering output pipe listener for query " + pipeHolder.queryid);
-            }
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Adding pipe listener for pipe " + pipeId + " and query " + pipeHolder.queryid);
-            }
-            perpipelisteners.put(pipeHolder.queryid, pipeHolder);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public OutputPipeListener removeOutputPipeListener(String pipeID, OutputPipeListener listener) {
-        throw new UnsupportedOperationException("Legacy method not supported. Use interface object if you need this method.");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public OutputPipeListener removeOutputPipeListener(ID pipeID, OutputPipeListener listener) {
-
-        // remove all instances of this listener, regardless of queryid
-        if (pipeResolver == null) {
-            return null;
-        }
-
-        if (!(pipeID instanceof PipeID)) {
-            throw new IllegalArgumentException("pipeID must be a PipeID.");
-        }
-
-        synchronized (outputPipeListeners) {
-            Map<Integer, OutputPipeHolder> perpipelisteners = outputPipeListeners.get(pipeID);
-
-            if (perpipelisteners != null) {
-                Set<Map.Entry<Integer, OutputPipeHolder>> entries = perpipelisteners.entrySet();
-
-                for (Map.Entry<Integer, OutputPipeHolder> entry : entries) {
-                    OutputPipeHolder pl = entry.getValue();
-
-                    if (pl.listener == listener) {
-                        pipeResolver.removeListener((PipeID) pipeID, pl.queryid);
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Removing listener for query " + pl.queryid);
-                        }
-                        perpipelisteners.remove(entry.getKey());
-                    }
-                }
-                // clean up the map if there are no more listeners for the pipe
-                if (perpipelisteners.isEmpty()) {
-                    outputPipeListeners.remove(pipeID);
-                }
-            }
-        }
-        return listener;
-    }
-
-    private OutputPipeListener removeOutputPipeListener(String opID, int queryID) {
-
-        if (pipeResolver == null) {
-            return null;
-        }
-
-        PipeID pipeID;
-        try {
-            URI aPipeID = new URI(opID);
-            pipeID = (PipeID) IDFactory.fromURI(aPipeID);
-        } catch (URISyntaxException badID) {
-            throw new IllegalArgumentException("Bad pipe ID: " + opID);
-        } catch (ClassCastException badID) {
-            throw new IllegalArgumentException("id was not a pipe id: " + opID);
-        }
-
-        synchronized (outputPipeListeners) {
-            Map<Integer, OutputPipeHolder> perpipelisteners = outputPipeListeners.get(pipeID);
-
-            if (perpipelisteners != null) {
-                OutputPipeHolder pipeHolder = perpipelisteners.get(queryID);
-
-                perpipelisteners.remove(queryID);
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Removing listener for query " + queryID);
-                }
-                // clean up the map if there are no more listeners for the pipe
-                if (perpipelisteners.isEmpty()) {
-                    outputPipeListeners.remove(pipeID);
-                }
-                pipeResolver.removeListener(pipeID, queryID);
-                if (pipeHolder != null) {
-                    return pipeHolder.listener;
-                }
-            }
-
-        }
-        return null;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean pipeResolveEvent(PipeResolver.Event event) {
-
-        try {
-            ID peerID = event.getPeerID();
-            ID pipeID = event.getPipeID();
-            int queryID = event.getQueryID();
-            OutputPipeHolder pipeHolder;
-
-            synchronized (outputPipeListeners) {
-                Map<Integer, OutputPipeHolder> perpipelisteners = outputPipeListeners.get(pipeID);
-
-                if (perpipelisteners == null) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("No listener for event for pipe " + pipeID);
-                    }
-                    return false;
-                }
-                pipeHolder = perpipelisteners.get(queryID);
-                if (pipeHolder == null) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("No listener for event for query " + queryID);
-                    }
-                    return false;
-                }
-            }
-
-            // check if they wanted a resolve from a specific peer.
-            if (!pipeHolder.peers.isEmpty() && !pipeHolder.peers.contains(peerID)) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Event was for wrong peer \'" + peerID + "\'. Discarding.");
-                }
-                return false;
-            }
-
-            // create op
-            String type = pipeHolder.adv.getType();
-            OutputPipe op;
-
-            if (PipeService.UnicastType.equals(type)) {
-                op = new NonBlockingOutputPipe(group, pipeResolver, pipeHolder.adv, peerID, pipeHolder.peers);
-            } else if (PipeService.UnicastSecureType.equals(type)) {
-                op = new SecureOutputPipe(group, pipeResolver, pipeHolder.adv, peerID, pipeHolder.peers);
-            } else {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Could not create output pipe of type \'" + type + "\'. Discarding.");
-                }
-                return false;
-            }
-
-            // Generate an event when the output pipe was succesfully opened.
-            OutputPipeEvent newevent = new OutputPipeEvent(this.getInterface(), op, pipeID.toString(), queryID);
-            try {
-                pipeHolder.listener.outputPipeEvent(newevent);
-            } catch (Throwable ignored) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE
-                            ,
-                            "Uncaught Throwable in listener for " + pipeID + "(" + pipeHolder.getClass().getName() + ")", ignored);
-                }
-            }
-            removeOutputPipeListener(pipeID.toString(), queryID);
-            return true;
-        } catch (IOException ie) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Error creating output pipe " + event.getPipeID(), ie);
-            }
-        }
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("No listener for event for " + event.getPipeID());
-        }
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * We don't do anything with NAKs (yet)
-     */
-    public boolean pipeNAKEvent(PipeResolver.Event event) {
-        return false;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/PipeServiceInterface.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/PipeServiceInterface.java
deleted file mode 100644 (file)
index b362669..0000000
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.pipe;
-
-import net.jxta.document.Advertisement;
-import net.jxta.id.ID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.pipe.*;
-import net.jxta.protocol.PipeAdvertisement;
-import net.jxta.peer.PeerID;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.Set;
-import net.jxta.protocol.ModuleImplAdvertisement;
-
-/**
- * This class implements the Pipe interface.
- */
-class PipeServiceInterface implements PipeService {
-
-    PipeServiceImpl impl;
-
-    /**
-     * The only authorized constructor.
-     * @param theRealThing the PipeService
-     */
-    public PipeServiceInterface(PipeServiceImpl theRealThing) {
-        impl = theRealThing;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Since THIS is already such an object, it returns itself.
-     * FIXME: it is kind of absurd to have this method part of the
-     * interface but we do not want to define two levels of Service interface
-     * just for that.
-     *
-     * @return ResolverService An interface object that implements
-     *         this service and nothing more.
-     */
-    public PipeService getInterface() {
-        return this;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ModuleImplAdvertisement getImplAdvertisement() {
-        return impl.getImplAdvertisement();
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * FIXME: This is meaningless for the interface object;
-     * it is there only to satisfy the requirements of the
-     * interface that we implement. Ultimately, the API should define
-     * two levels of interfaces: one for the real service implementation
-     * and one for the interface object. Right now it feels a bit heavy
-     * to so that since the only different between the two would be
-     * init() and may-be getName().
-     */
-    public void init(PeerGroup pg, ID assignedID, Advertisement impl) {}
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * This is here for temporary class hierarchy reasons.
-     * it is ALWAYS ignored. By definition, the interface object
-     * protects the real object's start/stop methods from being called
-     */
-    public int startApp(String[] arg) {
-        return 0;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * This is here for temporary class hierarchy reasons.
-     * it is ALWAYS ignored. By definition, the interface object
-     * protects the real object's start/stop methods from being called
-     * <p/>
-     * This request is currently ignored.
-     */
-    public void stopApp() {}
-
-    /**
-     * {@inheritDoc}
-     */
-    public InputPipe createInputPipe(PipeAdvertisement adv) throws IOException {
-        return impl.createInputPipe(adv);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public InputPipe createInputPipe(PipeAdvertisement adv, PipeMsgListener listener) throws IOException {
-        return impl.createInputPipe(adv, listener);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public OutputPipe createOutputPipe(PipeAdvertisement pipeAdv, long timeout) throws IOException {
-        return impl.createOutputPipe(pipeAdv, timeout);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public OutputPipe createOutputPipe(PipeAdvertisement adv, Set<? extends ID> peers, long timeout) throws IOException {
-        return impl.createOutputPipe(adv, peers, timeout);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void createOutputPipe(PipeAdvertisement pipeAdv, OutputPipeListener listener) throws IOException {
-        impl.createOutputPipe(pipeAdv, listener);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void createOutputPipe(PipeAdvertisement adv, Set<? extends ID> peers, OutputPipeListener listener) throws IOException {
-        impl.createOutputPipe(adv, peers, listener);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public OutputPipeListener removeOutputPipeListener(String pipeID, OutputPipeListener listener) {
-        return removeOutputPipeListener(ID.create(URI.create(pipeID)), listener);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public OutputPipeListener removeOutputPipeListener(ID pipeID, OutputPipeListener listener) {
-        return impl.removeOutputPipeListener(pipeID, listener);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/SecureInputPipeImpl.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/SecureInputPipeImpl.java
deleted file mode 100644 (file)
index 8bdaae8..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.pipe;
-
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.Message;
-import net.jxta.impl.endpoint.tls.TlsTransport;
-import net.jxta.pipe.PipeMsgListener;
-import net.jxta.protocol.PipeAdvertisement;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.io.IOException;
-
-/**
- * Implements the {@link net.jxta.pipe.InputPipe} interface by listening on the
- * endpoint for messages to service "PipeService" and a param of the Pipe ID.
- */
-public class SecureInputPipeImpl extends InputPipeImpl {
-    private final static Logger LOG = Logger.getLogger(SecureInputPipeImpl.class.getName());
-
-    /**
-     * Constructor for the SecureInputPipeImpl object
-     *
-     * @param pipeResolver   pipe resolver
-     * @param adv pipe advertisement
-     * @throws IOException  if an io error occurs
-     */
-    SecureInputPipeImpl(PipeResolver pipeResolver, PipeAdvertisement adv) throws IOException {
-
-        this(pipeResolver, adv, null);
-    }
-
-    /**
-     * Constructor for the SecureInputPipeImpl object
-     * @param r  pipe resolver
-     * @param adv the pipe advertisement
-     * @param listener the message listener
-     * @throws IOException  if an io error occurs
-     */
-    SecureInputPipeImpl(PipeResolver r, PipeAdvertisement adv, PipeMsgListener listener) throws IOException {
-
-        super(r, adv, listener);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void processIncomingMessage(Message msg, EndpointAddress srcAddr, EndpointAddress dstAddr) {
-
-        Object fromTLS = msg.getMessageProperty(TlsTransport.class);
-
-        if (null != fromTLS) {
-            super.processIncomingMessage(msg, srcAddr, dstAddr);
-        } else {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("processIncomingMessage : Discarding " + msg + " because it did not come from TLS");
-            }
-        }
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/SecureOutputPipe.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/SecureOutputPipe.java
deleted file mode 100644 (file)
index 1577506..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.pipe;
-
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.Message;
-import net.jxta.id.ID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.protocol.PipeAdvertisement;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.io.IOException;
-import java.util.Set;
-
-/**
- * This class implements the Secure non blocking Output Pipe
- */
-class SecureOutputPipe extends NonBlockingOutputPipe {
-
-    private static final Logger LOG = Logger.getLogger(SecureOutputPipe.class.getName());
-
-    public SecureOutputPipe(PeerGroup group, PipeResolver resolver, PipeAdvertisement pipeAdv, ID destPeer, Set<? extends ID> peers) throws IOException {
-        super(group, resolver, pipeAdv, destPeer, peers);
-    }
-
-    /**
-     * {@inheritDoc}
-     * 
-     * <p/>
-     * We can't fail to send a message. Secure pipes are expected to be
-     * reliable and ordered.
-     */
-    @Override
-    public synchronized boolean send(Message msg) throws IOException {
-
-        boolean sent = false;
-        int attempts = 1;
-
-        while (!sent && !isClosed()) {
-            try {
-                sent = super.send(msg);
-
-                if (!sent) {
-                    wait(10 + (1 << Math.min(attempts, 14)));
-                    attempts++;
-                }
-            } catch (InterruptedException woken) {
-                Thread.interrupted();
-            }
-        }
-
-        if (!sent && isClosed()) {
-            IOException failed = new IOException("Could not enqueue " + msg + " for sending. Pipe is closed.");
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, failed.getMessage(), failed);
-            }
-            throw failed;
-        }
-        return sent;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected EndpointAddress mkAddress(ID destPeer, ID pipeID) {
-       return new EndpointAddress("jxtatls", destPeer.getUniqueValue().toString(), "PipeService", pipeID.toString());
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/WireHeader.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/WireHeader.java
deleted file mode 100644 (file)
index e6abfb4..0000000
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.pipe;
-
-import net.jxta.document.Attribute;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredTextDocument;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.logging.Logging;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Enumeration;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * This class implements a JXTA-WIRE header.
- */
-public class WireHeader {
-
-    /**
-     * Logger
-     */
-    private final static Logger LOG = Logger.getLogger(WireHeader.class.getName());
-
-    private static final String Name = "JxtaWire";
-    private static final String MsgIdTag = "MsgId";
-    private static final String PipeIdTag = "PipeId";
-    private static final String SrcTag = "SrcPeer";
-    private static final String TTLTag = "TTL";
-    private static final String PeerTag = "VisitedPeer";
-
-    private ID srcPeer = ID.nullID;
-    private ID pipeID = ID.nullID;
-    private String msgId = null;
-    private int TTL = Integer.MIN_VALUE;
-
-    public WireHeader() {}
-
-    public WireHeader(Element root) {
-        initialize(root);
-    }
-
-    public void setSrcPeer(ID p) {
-        srcPeer = p;
-    }
-
-    public ID getSrcPeer() {
-        return srcPeer;
-    }
-
-    public void setTTL(int t) {
-        TTL = t;
-    }
-
-    public int getTTL() {
-        return TTL;
-    }
-
-    public String getMsgId() {
-        return msgId;
-    }
-
-    public void setMsgId(String id) {
-        this.msgId = id;
-    }
-
-    public ID getPipeID() {
-        return pipeID;
-    }
-
-    public void setPipeID(ID id) {
-        this.pipeID = id;
-    }
-
-    /**
-     * Called to handle elements during parsing.
-     *
-     * @param elem Element to parse
-     * @return true if element was handled, otherwise false.
-     */
-    protected boolean handleElement(XMLElement elem) {
-        if (elem.getName().equals(SrcTag)) {
-            try {
-                URI pID = new URI(elem.getTextValue());
-                setSrcPeer(IDFactory.fromURI(pID));
-            } catch (URISyntaxException badID) {
-                throw new IllegalArgumentException("Bad PeerID ID in header: " + elem.getTextValue());
-            }
-            return true;
-        }
-
-        if (elem.getName().equals(MsgIdTag)) {
-            msgId = elem.getTextValue();
-            return true;
-        }
-
-        if (elem.getName().equals(PipeIdTag)) {
-            try {
-                URI pipeID = new URI(elem.getTextValue());
-                setPipeID(IDFactory.fromURI(pipeID));
-            } catch (URISyntaxException badID) {
-                throw new IllegalArgumentException("Bad pipe ID in header");
-            }
-            return true;
-        }
-
-        if (elem.getName().equals(TTLTag)) {
-            TTL = Integer.parseInt(elem.getTextValue());
-            return true;
-        }
-
-        // IGNORE obsolete element "VisitedPeer"
-        return elem.getName().equals(PeerTag);
-
-    }
-
-    /**
-     * internal method to process a document into a header.
-     *
-     * @param root where to start.
-     */
-    protected void initialize(Element root) {
-        if (!XMLElement.class.isInstance(root)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-        }
-
-        XMLElement doc = (XMLElement) root;
-        String doctype = doc.getName();
-        String typedoctype = "";
-        Attribute itsType = doc.getAttribute("type");
-
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-
-        if (!doctype.equals(Name) && !Name.equals(typedoctype)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-
-        Enumeration elements = doc.getChildren();
-        while (elements.hasMoreElements()) {
-            XMLElement elem = (XMLElement) elements.nextElement();
-
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Unhandled Element: " + elem.getName());
-                }
-            }
-        }
-
-        // Sanity Check!
-
-        if (null == getMsgId()) {
-            throw new IllegalArgumentException("Header does not contain a message id");
-        }
-
-        if (ID.nullID == getPipeID()) {
-            throw new IllegalArgumentException("Header does not contain a pipe id");
-        }
-
-        if (TTL < 1) {
-            throw new IllegalArgumentException("TTL must be >= 1");
-        }
-    }
-
-    /**
-     * Returns the docment for this header
-     *
-     * @param encodeAs mime type encoding
-     * @return the docment for this header
-     */
-    public Document getDocument(MimeMediaType encodeAs) {
-        StructuredTextDocument doc = (StructuredTextDocument)
-                StructuredDocumentFactory.newStructuredDocument(encodeAs, Name);
-
-        if (doc instanceof XMLDocument) {
-            ((XMLDocument) doc).addAttribute("xmlns:jxta", "http://jxta.org");
-        }
-
-        if (null == getMsgId()) {
-            throw new IllegalStateException("Message id is not initialized");
-        }
-
-        if (ID.nullID == getPipeID()) {
-            throw new IllegalStateException("PipeID is not initialized");
-        }
-
-        if (TTL < 1) {
-            throw new IllegalStateException("TTL must be >= 1");
-        }
-
-        Element e;
-        if ((srcPeer != null) && (srcPeer != ID.nullID)) {
-            e = doc.createElement(SrcTag, srcPeer.toString());
-            doc.appendChild(e);
-        }
-
-        e = doc.createElement(PipeIdTag, getPipeID().toString());
-        doc.appendChild(e);
-
-        e = doc.createElement(MsgIdTag, getMsgId());
-        doc.appendChild(e);
-
-        e = doc.createElement(TTLTag, Integer.toString(TTL));
-        doc.appendChild(e);
-
-        return doc;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/WirePipe.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/WirePipe.java
deleted file mode 100644 (file)
index 22dbbe3..0000000
+++ /dev/null
@@ -1,557 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.pipe;
-
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.XMLDocument;
-import net.jxta.endpoint.*;
-import net.jxta.id.ID;
-import net.jxta.impl.cm.SrdiIndex;
-import net.jxta.impl.id.UUID.UUID;
-import net.jxta.impl.id.UUID.UUIDFactory;
-import net.jxta.logging.Logging;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.pipe.InputPipe;
-import net.jxta.pipe.PipeService;
-import net.jxta.protocol.PipeAdvertisement;
-import net.jxta.rendezvous.RendezVousService;
-
-import java.io.IOException;
-import java.util.*;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * WirePipe (aka Propagated pipe) is very similar to IGMP, where a creation of an
- * input pipe results in a propagated pipe membership registration with the peer's
- * rendezvous peer, and a closure results in a propagated pipe group resignation,
- * these group registration/resignation are simply PipeService SRDI messages.
- */
-public class WirePipe implements EndpointListener, InputPipe, PipeRegistrar {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(WirePipe.class.getName());
-
-    /**
-     * The number of message ID we track to eliminate duplicate messages.
-     */
-    private static final int MAX_RECORDED_MSGIDS = 250;
-
-    private volatile boolean closed = false;
-
-    private final PeerGroup peerGroup;
-    private final PipeResolver pipeResolver;
-    private final WirePipeImpl wireService;
-    private final PipeAdvertisement pipeAdv;
-
-    private final RendezVousService rendezvous;
-    private final PeerID localPeerId;
-    private NonBlockingWireOutputPipe repropagater;
-    int messagesReceived = 0;
-
-    /**
-     * Table of local input pipes listening on this pipe. Weak map (used as a
-     * Set) so that we don't keep pipes unnaturally alive and consuming
-     * resources.
-     */
-    private final Map<InputPipe, Object> wireinputpipes = new WeakHashMap<InputPipe, Object>();
-
-    /**
-     * The list of message ids we have already seen. The most recently seen
-     * messages are at the end of the list.
-     * <p/>
-     * XXX 20031102 bondolo@jxta.org: We might want to consider three
-     * performance enhancements:
-     * <p/>
-     * <ul>
-     * <li>Reverse the order of elements in the list. This would result
-     * in faster searching since the default strategy for ArrayList to
-     * search in index order. We are most likely to see duplicate messages
-     * amongst the messages we have seen recently. This would make
-     * additions more costly.</li>
-     * <p/>
-     * <li>When we do find a duplicate in the list, exchange it's location
-     * with the newest message in the list. This will keep annoying dupes
-     * close to the start of the list.</li>
-     * <p/>
-     * <li>When the array reaches MaxNbOfStoredIds treat it as a ring.</li>
-     * </ul>
-     */
-    private final List<UUID> msgIds = new ArrayList<UUID>(MAX_RECORDED_MSGIDS);
-
-    /**
-     * Constructor
-     *
-     * @param group            The Group associated with this service
-     * @param pipeResolver the associated pipe resolver
-     * @param wireService  The pipe service associated with this pipe
-     * @param adv          pipe advertisement
-     */
-    public WirePipe(PeerGroup group, PipeResolver pipeResolver, WirePipeImpl wireService, PipeAdvertisement adv) {
-        this.peerGroup = group;
-        this.pipeResolver = pipeResolver;
-        this.wireService = wireService;
-        this.pipeAdv = adv;
-        localPeerId = peerGroup.getPeerID();
-        rendezvous = group.getRendezVousService();
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Closes the pipe.
-     */
-    @Override
-    protected synchronized void finalize() throws Throwable {
-
-        if (!closed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Pipe is being finalized without being previously closed. This is likely a bug.");
-            }
-        }
-        close();
-        super.finalize();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized boolean register(InputPipe wireinputpipe) {
-        if (closed) {
-            return false;
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Registering input pipe for " + pipeAdv.getPipeID());
-        }
-
-        wireinputpipes.put(wireinputpipe, null);
-        boolean registered;
-        if (1 == wireinputpipes.size()) {
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("Registering " + pipeAdv.getPipeID() + " with pipe resolver.");
-            }
-            registered = pipeResolver.register(this);
-        } else {
-            registered = true;
-        }
-        return registered;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized boolean forget(InputPipe wireinputpipe) {
-        boolean removed = null != wireinputpipes.remove(wireinputpipe);
-
-        if (wireinputpipes.isEmpty()) {
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("Deregistering wire pipe with pipe resolver");
-            }
-            pipeResolver.forget(this);
-        }
-
-        if (removed && Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Removed input pipe for " + pipeAdv.getPipeID());
-        }
-        return removed;
-    }
-
-    // This is the InputPipe API implementation.
-    // This is needed only to be able to register an InputPipe to the PipeResolver.
-    // Not everything has to be implemented.
-
-    /**
-     * {@inheritDoc}
-     */
-    public Message waitForMessage() throws InterruptedException {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("This method is not really supported.");
-        }
-        return null;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Message poll(int timeout) throws InterruptedException {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("This method is not really supported.");
-        }
-        return null;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized void close() {
-        if (closed) {
-            return;
-        }
-
-        closed = true;
-
-        if (null != repropagater) {
-            repropagater.close();
-            repropagater = null;
-        }
-
-        List<InputPipe> inputPipes = new ArrayList<InputPipe>(wireinputpipes.keySet());
-
-        for (InputPipe anInputPipe : inputPipes) {
-            anInputPipe.close();
-        }
-
-        wireinputpipes.clear();
-        msgIds.clear();
-        wireService.forgetWirePipe(pipeAdv.getPipeID());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getType() {
-        return pipeAdv.getType();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ID getPipeID() {
-        return pipeAdv.getPipeID();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getName() {
-        return pipeAdv.getName();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PipeAdvertisement getAdvertisement() {
-        return pipeAdv;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Handler for messages received through the normal pipe endpoint
-     * listener.
-     * <p/>
-     * "PipeService" / &lt;PipeID&gt;
-     */
-    public void processIncomingMessage(Message message, EndpointAddress srcAddr, EndpointAddress dstAddr) {
-
-        // Check if there is a JXTA-WIRE header
-        MessageElement elem = message.getMessageElement(WirePipeImpl.WIRE_HEADER_ELEMENT_NAMESPACE,
-                WirePipeImpl.WIRE_HEADER_ELEMENT_NAME);
-
-        if (null == elem) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("No JxtaWireHeader element. Discarding " + message);
-            }
-            return;
-        }
-
-        WireHeader header;
-        try {
-            XMLDocument doc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(elem);
-            header = new WireHeader(doc);
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "bad wire header", e);
-            }
-            return;
-        }
-        processIncomingMessage(message, header, srcAddr, dstAddr);
-    }
-
-    /**
-     * local version with the wire header already parsed. There are two paths
-     * to this point; via the local endpoint listener or via the general
-     * propagation listener in WirePipeImpl.
-     *
-     * @param message the message
-     * @param header  the wire header
-     * @param srcAddr source
-     * @param dstAddr destination
-     */
-    void processIncomingMessage(Message message, WireHeader header, EndpointAddress srcAddr, EndpointAddress dstAddr) {
-        if (recordSeenMessage(header.getMsgId())) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Discarding duplicate " + message);
-            }
-            return;
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Processing " + message + " from " + srcAddr + " on " + pipeAdv.getPipeID());
-        }
-        callLocalListeners(message, srcAddr, dstAddr);
-        if (peerGroup.isRendezvous()) {
-            repropagate(message, header);
-        }
-    }
-
-    /**
-     * Calls the local listeners for a given pipe.
-     *
-     * @param message the message
-     * @param srcAddr source The peer which sent us the message (last hop).
-     * @param dstAddr dest The wire pipe the message was sent to.
-     */
-    private void callLocalListeners(Message message, EndpointAddress srcAddr, EndpointAddress dstAddr) {
-
-        List<InputPipeImpl> listeners = new ArrayList(wireinputpipes.keySet());
-        if (listeners.isEmpty()) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("No local listeners for " + pipeAdv.getPipeID());
-            }
-        } else {
-            int listenersCalled = 0;
-            for (InputPipeImpl anInputPipe : listeners) {
-                try {
-                    anInputPipe.processIncomingMessage(message.clone(), srcAddr, dstAddr);
-                    listenersCalled++;
-                } catch (Throwable ignored) {
-                    if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                        LOG.log(Level.SEVERE, "Uncaught Throwable during callback (" + anInputPipe + ") for " + anInputPipe.getPipeID(), ignored);
-                    }
-                }
-            }
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Called " + listenersCalled + " of " + listeners.size() + " local listeners for " + pipeAdv.getPipeID());
-            }
-        }
-    }
-
-    /**
-     * Repropagate a message.
-     *
-     * @param message the message
-     * @param header  the header
-     */
-    void repropagate(Message message, WireHeader header) {
-
-        if (closed) {
-            return;
-        }
-
-        if ((header.getTTL() <= 1)) {
-            // This message has run out of fuel.
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("No TTL remaining - discarding " + message + " on " + header.getPipeID());
-            }
-            return;
-        }
-
-        Message msg = message.clone();
-        header.setTTL(header.getTTL() - 1);
-        XMLDocument headerDoc = (XMLDocument) header.getDocument(MimeMediaType.XMLUTF8);
-        MessageElement elem = new TextDocumentMessageElement(WirePipeImpl.WIRE_HEADER_ELEMENT_NAME, headerDoc, null);
-
-        msg.replaceMessageElement(WirePipeImpl.WIRE_HEADER_ELEMENT_NAMESPACE, elem);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Repropagating " + msg + " on " + header.getPipeID());
-        }
-
-        synchronized (this) {
-            if (closed) {
-                return;
-            }
-            if (null == repropagater) {
-                repropagater = wireService.createOutputPipe(pipeAdv, Collections.EMPTY_SET);
-            }
-        }
-
-        try {
-            if (!repropagater.sendUnModified(msg, header)) {
-                // XXX bondolo@jxta.org we don't make any attempt to retry.
-                // There is a potential problem in that we have accepted the
-                // message locally but didn't resend it. If we get another copy
-                // of this message then we will NOT attempt to repropagate it
-                // even if we should.
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Failure repropagating " + msg + " on " + header.getPipeID() + ". Could not queue message.");
-                }
-            }
-        } catch (IOException failed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failure repropagating " + msg + " on " + header.getPipeID(), failed);
-            }
-        }
-    }
-
-    /**
-     * Sends a message on the propagated pipe.  if set is not empty, then the
-     * message is sent to set of peers.
-     *
-     * @param message    The message to send.
-     * @param peers  The peers to which the message will be sent. If the
-     *               set is empty then the message is sent to all members of the pipe that are
-     *               connected to the rendezvous, as well as walk the message through the network
-     * @param header message header
-     * @throws java.io.IOException if an io error occurs
-     */
-    void sendMessage(Message message, Set<? extends ID> peers, WireHeader header) throws IOException {
-        message = message.clone();
-
-        // do local listeners if we are to be one of the destinations
-        if (peers.isEmpty() || peers.contains(localPeerId)) {
-            if (!recordSeenMessage(header.getMsgId())) {
-                callLocalListeners(message, new EndpointAddress(localPeerId, null, null),
-                        new EndpointAddress(pipeAdv.getPipeID(), null, null));
-            }
-        }
-
-        if (peers.isEmpty()) {
-            if (peerGroup.isRendezvous()) {
-                // propagate to my clients
-                SrdiIndex srdiIndex = pipeResolver.getSrdiIndex();
-                List<PeerID> peerids = srdiIndex.query(PipeService.PropagateType, PipeAdvertisement.IdTag, getPipeID().toString(),
-                        Integer.MAX_VALUE);
-
-                peerids.retainAll(rendezvous.getConnectedPeerIDs());
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Propagating " + message + " to " + peerids.size() + " subscriber peers.");
-                }
-                rendezvous.propagate(Collections.enumeration(peerids), message, WirePipeImpl.WIRE_SERVICE_NAME,
-                        wireService.getServiceParameter(), 1);
-            } else {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Propagating " + message + " to whole network.");
-                }
-                // propagate to local sub-net
-                rendezvous.propagateToNeighbors(message, WirePipeImpl.WIRE_SERVICE_NAME, wireService.getServiceParameter(),
-                        RendezVousService.DEFAULT_TTL);
-            }
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Walking " + message + " through peerview.");
-            }
-            // walk the message through rdv network (edge, or rendezvous)
-            rendezvous.walk(message, WirePipeImpl.WIRE_SERVICE_NAME, wireService.getServiceParameter(),
-                    RendezVousService.DEFAULT_TTL);
-        } else {
-            // Send to specific peers
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Propagating " + message + " to " + peers.size() + " peers.");
-            }
-            rendezvous.propagate(Collections.enumeration(peers), message, WirePipeImpl.WIRE_SERVICE_NAME,
-                    wireService.getServiceParameter(), 1);
-        }
-    }
-
-    /**
-     * Create a unique (mostly) identifier for this message
-     *
-     * @return a message sequence uuid
-     */
-    static String createMsgId() {
-        return UUIDFactory.newSeqUUID().toString();
-    }
-
-    /**
-     * Adds a message ID to our table or stored IDs.
-     *
-     * @param id to add.
-     * @return false if ID was added, true if it was a duplicate.
-     */
-    private boolean recordSeenMessage(String id) {
-
-        UUID msgid;
-        try {
-            msgid = new UUID(id);
-        } catch (IllegalArgumentException notauuid) {
-            // XXX 20031024 bondolo@jxta.org these two conversions are provided
-            // for backwards compatibility and should eventually be removed.
-            try {
-                msgid = UUIDFactory.newHashUUID(Long.parseLong(id), 0);
-            } catch (NumberFormatException notanumber) {
-                msgid = UUIDFactory.newHashUUID(id.hashCode(), 0);
-            }
-        }
-        synchronized (msgIds) {
-            if (msgIds.contains(msgid)) {
-                // Already there. Nothing to do
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("duplicate " + msgid);
-                }
-                return true;
-            }
-            if (msgIds.size() < MAX_RECORDED_MSGIDS) {
-                msgIds.add(msgid);
-            } else {
-                msgIds.set((messagesReceived % MAX_RECORDED_MSGIDS), msgid);
-            }
-            messagesReceived++;
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("added " + msgid);
-        }
-        return false;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/WirePipeImpl.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/WirePipeImpl.java
deleted file mode 100644 (file)
index c976b54..0000000
+++ /dev/null
@@ -1,345 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.pipe;
-
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.XMLDocument;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointListener;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.id.ID;
-import net.jxta.logging.Logging;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.pipe.InputPipe;
-import net.jxta.pipe.PipeMsgListener;
-import net.jxta.pipe.PipeService;
-import net.jxta.platform.Module;
-import net.jxta.protocol.PipeAdvertisement;
-import net.jxta.rendezvous.RendezVousService;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * The Wire (Propagated) Pipe Service.
- */
-public class WirePipeImpl implements EndpointListener {
-
-    /**
-     * Logger
-     */
-    private final static Logger LOG = Logger.getLogger(WirePipeImpl.class.getName());
-
-    /**
-     * Service name we register our listener with.
-     */
-    final static String WIRE_SERVICE_NAME = "jxta.service.wirepipe";
-
-    /**
-     * Service param we register our listener with.
-     * <p/>
-     * Including the wireParam as part of the destination endpoint address
-     * is needed only for backwards compatibility with legacy version of JXTA.
-     * The wireParam is no longer registered as part of the endpoint listener
-     * address.
-     */
-    private final String wireParam;
-
-    /**
-     * The Message namespace we use for passing the wire header.
-     */
-    final static String WIRE_HEADER_ELEMENT_NAMESPACE = "jxta";
-
-    /**
-     * The Message Element name we use for passing the wire header.
-     */
-    final static String WIRE_HEADER_ELEMENT_NAME = "JxtaWireHeader";
-
-    /**
-     * The wire pipes we know of.
-     */
-    private final Map<ID, WirePipe> wirePipes = new HashMap<ID, WirePipe>();
-
-    private final PeerGroup group;
-    private final PipeResolver pipeResolver;
-
-    private EndpointService endpoint = null;
-    private RendezVousService rendezvous = null;
-
-    /**
-     * @param group        Description of the Parameter
-     * @param pipeResolver Description of the Parameter
-     */
-    WirePipeImpl(PeerGroup group, PipeResolver pipeResolver) {
-        this.group = group;
-        this.pipeResolver = pipeResolver;
-        this.wireParam = group.getPeerGroupID().getUniqueValue().toString();
-    }
-
-    /**
-     * To support WirePipe.send(Message, Enumeration)
-     *
-     * @return The serviceParameter value
-     */
-    public String getServiceParameter() {
-        return wireParam;
-    }
-
-    /**
-     * Supply arguments and starts this service if it hadn't started by itself.
-     * <p/>
-     * Currently this service does not expect arguments.
-     *
-     * @param arg A table of strings arguments.
-     * @return int status indication.
-     */
-    public int startApp(String[] arg) {
-        endpoint = group.getEndpointService();
-
-        if (null == endpoint) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is an endpoint service");
-            }
-            return Module.START_AGAIN_STALLED;
-        }
-
-        rendezvous = group.getRendezVousService();
-        if (null == rendezvous) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is a rendezvous service");
-            }
-            return Module.START_AGAIN_STALLED;
-        }
-
-        // Set our Endpoint Listener
-        try {
-            endpoint.addIncomingMessageListener(this, WIRE_SERVICE_NAME, null);
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed registering Endpoint Listener", e);
-            }
-            throw new IllegalStateException("Failed registering Endpoint Listener");
-        }
-        return Module.START_OK;
-    }
-
-    /**
-     * Ask this service to stop.
-     */
-    public void stopApp() {
-        Collection<WirePipe> allWirePipes = new ArrayList<WirePipe>(wirePipes.values());
-
-        for (WirePipe aWirePipe : allWirePipes) {
-            // Close all of the wire pipes.
-            aWirePipe.close();
-        }
-        wirePipes.clear();
-
-        // Clear our listener
-        endpoint.removeIncomingMessageListener(WIRE_SERVICE_NAME, null);
-
-        endpoint = null;
-        rendezvous = null;
-    }
-
-    /**
-     * create an InputPipe from a pipe Advertisement
-     *
-     * @param adv      is the advertisement of the PipeServiceImpl.
-     * @param listener PipeMsgListener to receive msgs.
-     * @return InputPipe InputPipe object created
-     * @throws IOException error creating input pipe
-     */
-    InputPipe createInputPipe(PipeAdvertisement adv, PipeMsgListener listener) throws IOException {
-        WirePipe wirePipe = getWirePipe(adv);
-        return new InputPipeImpl(wirePipe, adv, listener);
-    }
-
-    /**
-     * create an OutputPipe from the pipe Advertisement giving a PeerId(s)
-     * where the corresponding InputPipe is supposed to be.
-     *
-     * @param adv   is the advertisement of the NetPipe.
-     * @param peers is a set of the PeerId of the peers where to look
-     *              for the corresponding Pipes
-     * @return OuputPipe corresponding OutputPipe
-     */
-    NonBlockingWireOutputPipe createOutputPipe(PipeAdvertisement adv, Set<? extends ID> peers) {
-        WirePipe wirePipe = getWirePipe(adv);
-        return new NonBlockingWireOutputPipe(group, wirePipe, adv, peers);
-    }
-
-    /**
-     * PropagateType pipes
-     *
-     * @param adv the pipe adv
-     * @return the wire pipe
-     */
-    private WirePipe getWirePipe(PipeAdvertisement adv) {
-        WirePipe wirePipe;
-
-        synchronized (wirePipes) {
-            // First see if we have already a WirePipe for this pipe
-            wirePipe = wirePipes.get(adv.getPipeID());
-
-            if (null == wirePipe) {
-                // No.. There is none. Create a new one.
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Creating new wire pipe for " + adv.getPipeID());
-                }
-                wirePipe = new WirePipe(group, pipeResolver, this, adv);
-                wirePipes.put(adv.getPipeID(), wirePipe);
-            }
-        }
-        return wirePipe;
-    }
-
-    /**
-     * PropagateType pipes
-     *
-     * @param pipeID Pipe ID
-     * @param create if true create one if one does not exist
-     * @return the wire pipe
-     */
-    private WirePipe getWirePipe(ID pipeID, boolean create) {
-        WirePipe wirePipe;
-
-        synchronized (wirePipes) {
-            // First see if we have already a WirePipe for this pipe
-            wirePipe = wirePipes.get(pipeID);
-
-            if ((null == wirePipe) && create) {
-                // No.. There is none. Create a new one.
-                // XXX 20031019 bondolo@jxta.org Check for the adv in local discovery maybe?
-                PipeAdvertisement adv = (PipeAdvertisement) AdvertisementFactory.newAdvertisement(
-                        PipeAdvertisement.getAdvertisementType());
-
-                adv.setPipeID(pipeID);
-                adv.setType(PipeService.PropagateType);
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Creating new wire pipe for " + adv.getPipeID());
-                }
-                wirePipe = new WirePipe(group, pipeResolver, this, adv);
-                wirePipes.put(pipeID, wirePipe);
-            }
-        }
-        return wirePipe;
-    }
-
-    /**
-     * Remove a wire pipe from our collection of wire pipes.
-     *
-     * @param pipeID The ID of the wire pipe to forget.
-     * @return {@code true} if the wire pipe had been registered otherwise
-     *         {@code false}.
-     */
-    boolean forgetWirePipe(ID pipeID) {
-        synchronized (wirePipes) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Removing wire pipe for " + pipeID);
-            }
-            return null != wirePipes.remove(pipeID);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Listener for "jxta.service.wirepipe" / &lt;null&gt;
-     */
-    public void processIncomingMessage(Message message, EndpointAddress srcAddr, EndpointAddress dstAddr) {
-        // Check if there is a JXTA-WIRE header
-        MessageElement elem = message.getMessageElement(WIRE_HEADER_ELEMENT_NAMESPACE, WIRE_HEADER_ELEMENT_NAME);
-
-        if (null == elem) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("No JxtaWireHeader element. Discarding " + message);
-            }
-            return;
-        }
-
-        WireHeader header;
-
-        try {
-            XMLDocument doc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(elem);
-            header = new WireHeader(doc);
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "bad wire header for " + message, e);
-            }
-            return;
-        }
-
-        WirePipe wirePipe = getWirePipe(header.getPipeID(), rendezvous.isRendezVous());
-        if (null != wirePipe) {
-            wirePipe.processIncomingMessage(message, header, srcAddr, dstAddr);
-        } else {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Ignoring message " + message + " for id " + header.getPipeID());
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/pipe/package.html
deleted file mode 100644 (file)
index b4d52dd..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-<HEAD>
-</HEAD>
-<BODY>
-A JXTA {@link net.jxta.pipe.PipeService} implementation which implements the
-standard JXTA Pipe Resolver Protocol (PRP).
-
-@see net.jxta.pipe.PipeService
-@see net.jxta.pipe.InputPipe
-@see net.jxta.pipe.OutputPipe
-@see net.jxta.protocol.PipeAdvertisement
-@see net.jxta.endpoint.Message
-@see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-pbp" target="_blank">JXTA Protocols
-    Specification : Pipe Binding Protocol</a>
-</BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/AccessPointAdv.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/AccessPointAdv.java
deleted file mode 100644 (file)
index d6d6946..0000000
+++ /dev/null
@@ -1,319 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Attribute;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.logging.Logging;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.protocol.AccessPointAdvertisement;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Enumeration;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * Associates a set of EndpointAddresses with a PeerID.
- * <p/>
- * <pre>
- *    &lt;xs:complexType name ="jxta:APA">
- *      &lt;xs:sequence>
- *        &lt;xs:element name="PID" type="jxta:JXTAID" minOccurs="0" maxOccurs="1"/>
- *        &lt;xs:sequence>
- *          &lt;xs:element name="EA" type="jxta:JXTAID" minOccurs="0" maxOccurs="unbounded"/>
- *        &lt;/xs:sequence>
- *      &lt;/xs:sequence>
- *    &lt;/xs:complexType>
- *  </pre>
- *
- * @see net.jxta.protocol.AccessPointAdvertisement
- */
-public class AccessPointAdv extends AccessPointAdvertisement implements Cloneable {
-
-    /**
-     * Log4J Logger
-     */
-    private static final Logger LOG = Logger.getLogger(AccessPointAdv.class.getName());
-
-    private static final String PID_TAG = "PID";
-    private static final String EA_TAG = "EA";
-
-    private static final String[] INDEXFIELDS = { PID_TAG};
-
-    /**
-     * Instantiator for AdvertisementFactory
-     */
-    public static class Instantiator implements AdvertisementFactory.Instantiator {
-
-        /**
-         * {@inheritDoc}
-         */
-        public String getAdvertisementType() {
-            return AccessPointAdv.getAdvertisementType();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance() {
-            return new AccessPointAdv();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance(Element root) {
-            return new AccessPointAdv(root);
-        }
-    }
-
-    /**
-     * Returns the identifying type of this Advertisement.
-     * <p/>
-     * <b>Note:</b> This is a static method. It cannot be used to determine
-     * the runtime type of an advertisment. ie.
-     * </p><code><pre>
-     *      Advertisement adv = module.getSomeAdv();
-     *      String advType = adv.getAdvertisementType();
-     *  </pre></code>
-     * <p/>
-     * <b>This is wrong and does not work the way you might expect.</b>
-     * This call is not polymorphic and calls
-     * Advertiement.getAdvertisementType() no matter what the real type of the
-     * advertisment.
-     *
-     * @return String the type of advertisement
-     */
-    public static String getAdvertisementType() {
-        return "jxta:APA";
-    }
-
-    /**
-     * Private constructor.  Use the Advertisement factory and accessors.
-     */
-    private AccessPointAdv() {}
-
-    /**
-     * Private constructor.  Use the Advertisement factory and accessors.
-     *
-     * @param root the element
-     */
-    private AccessPointAdv(Element root) {
-        if (!(root instanceof XMLElement)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-        }
-
-        XMLElement doc = (XMLElement) root;
-
-        String doctype = doc.getName();
-
-        String typedoctype = "";
-        Attribute itsType = doc.getAttribute("type");
-
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-
-        if (!doctype.equals(getAdvertisementType()) && !getAdvertisementType().equals(typedoctype)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-
-        Enumeration elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            XMLElement elem = (XMLElement) elements.nextElement();
-
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Unhandled Element: " + elem.toString());
-                }
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public AccessPointAdv clone() {
-        return (AccessPointAdv) super.clone();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String[] getIndexFields() {
-        return INDEXFIELDS;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public ID getID() {
-        ID pid = getPeerID();
-
-        if (null == pid) {
-            throw new IllegalStateException("cannot build ID: no peer id");
-        }
-
-        try {
-            // We have not yet built it. Do it now
-            String seed = getAdvType() + getPeerID().toString();
-
-            InputStream in = new ByteArrayInputStream(seed.getBytes());
-
-            return IDFactory.newCodatID(PeerGroupID.worldPeerGroupID, seed.getBytes(), in);
-        } catch (Exception ez) {
-            IllegalStateException failed = new IllegalStateException("cannot build ID");
-
-            failed.initCause(ez);
-
-            throw failed;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected boolean handleElement(Element raw) {
-
-        if (super.handleElement(raw)) {
-            return true;
-        }
-
-        XMLElement elem = (XMLElement) raw;
-
-        if (PID_TAG.equals(elem.getName())) {
-            String uri = elem.getTextValue();
-
-            if (null != uri) {
-                try {
-                    URI pID = new URI(uri.trim());
-
-                    setPeerID((PeerID) IDFactory.fromURI(pID));
-                } catch (URISyntaxException badID) {
-                    throw new IllegalArgumentException("Bad PeerID ID in advertisement");
-                } catch (ClassCastException notPID) {
-                    throw new IllegalArgumentException("Not a Peer ID");
-                }
-
-                return true;
-            }
-        }
-
-        if (EA_TAG.equals(elem.getName())) {
-            String epa = elem.getTextValue();
-
-            if (null != epa) {
-                addEndpointAddress(epa.trim());
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Document getDocument(MimeMediaType encodeAs) {
-        StructuredDocument adv = (StructuredDocument) super.getDocument(encodeAs);
-
-        if (getPeerID() != null) {
-            Element e = adv.createElement(PID_TAG, getPeerID().toString());
-
-            adv.appendChild(e);
-        }
-
-        Enumeration each = getEndpointAddresses();
-
-        while (each.hasMoreElements()) {
-            Element e2 = adv.createElement(EA_TAG, each.nextElement().toString());
-
-            adv.appendChild(e2);
-        }
-        return adv;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/Certificate.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/Certificate.java
deleted file mode 100644 (file)
index adb8fb9..0000000
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import net.jxta.document.*;
-import net.jxta.impl.membership.pse.PSEUtils;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.StringReader;
-import java.security.cert.CertificateEncodingException;
-import java.security.cert.CertificateException;
-import java.security.cert.CertificateFactory;
-import java.security.cert.X509Certificate;
-import java.util.*;
-
-
-/**
- * A lightweight container for X.509 Certificates.
- * *
- * <pre><code>
- *   &lt;xs:element name="jxta:cert" type="Certificate"/>
- * <p/>
- *   &lt;xs:complexType name="Certificate" type="xs:string">
- *      &lt;xs:element name="Issuer" type="jxta:cert" minOccurs="0" />
- *   &lt;/xs:complexType>
- * </code></pre>
- */
-public class Certificate {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(Certificate.class.getName());
-
-    /**
-     *
-     **/
-    private List<X509Certificate> certs = null;
-
-    /**
-     **/
-    public Certificate() {
-        super();
-    }
-
-    public Certificate(Element root) {
-        this();
-        certs = new ArrayList<X509Certificate>();
-        initialize(root);
-    }
-
-    /**
-     * returns the Message type. This will match the XML doctype declaration.
-     *
-     * @return a string
-     */
-    public static String getMessageType() {
-        return "jxta:cert";
-    }
-
-    public X509Certificate[] getCertificates() {
-        return certs.toArray(new X509Certificate[certs.size()]);
-    }
-
-    public void setCertificates(X509Certificate[] certs) {
-        this.certs = new ArrayList<X509Certificate>(Arrays.asList(certs));
-    }
-
-    public void setCertificates(List<X509Certificate> certs) {
-        this.certs = new ArrayList<X509Certificate>(certs);
-    }
-
-    /**
-     * Initializes the message from a document.
-     *
-     * @param root the element
-     */
-    private void initialize(Element root) {
-
-        if (!XMLElement.class.isInstance(root)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports XMLElement");
-        }
-
-        XMLElement doc = (XMLElement) root;
-
-        String doctype = doc.getName();
-
-        String typedoctype = "";
-        Attribute itsType = doc.getAttribute("type");
-
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-
-        if (!doctype.equals(getMessageType()) && !getMessageType().equals(typedoctype)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-
-        String value = doc.getTextValue();
-
-        value = value.trim();
-
-        try {
-            byte[] cert_der = PSEUtils.base64Decode(new StringReader(value));
-
-            CertificateFactory cf = CertificateFactory.getInstance("X.509");
-
-            certs.add((X509Certificate) cf.generateCertificate(new ByteArrayInputStream(cert_der)));
-        } catch (IOException error) {
-            throw new IllegalArgumentException("bad certificate.");
-        } catch (CertificateException error) {
-            throw new IllegalArgumentException("bad certificate.");
-        }
-
-        Enumeration elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            Element elem = (Element) elements.nextElement();
-
-            if (!elem.getKey().equals("Issuer")) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Unhandled Element: " + elem.toString());
-                }
-                continue;
-            }
-
-            Certificate issuer = new Certificate(elem);
-
-            certs.addAll(Arrays.asList(issuer.getCertificates()));
-        }
-
-        // Begin checking sanity!
-        if (certs.isEmpty()) {
-            throw new IllegalArgumentException("certificate not initialized.");
-        }
-    }
-
-    /**
-     * Creates a document out of the message.
-     *
-     * @param encodeAs The document representation format requested.
-     * @return the message as a document.
-     */
-    public Document getDocument(MimeMediaType encodeAs) {
-        String encodedCert;
-
-        try {
-            encodedCert = PSEUtils.base64Encode((certs.get(0)).getEncoded());
-        } catch (CertificateEncodingException failed) {
-            IllegalStateException failure = new IllegalStateException("bad certificate.");
-
-            failure.initCause(failed);
-
-            throw failure;
-        } catch (IOException failed) {
-            IllegalStateException failure = new IllegalStateException("Could not encode certificate.");
-
-            failure.initCause(failed);
-
-            throw failure;
-        }
-
-        StructuredDocument doc = StructuredDocumentFactory.newStructuredDocument(encodeAs, getMessageType(), encodedCert);
-
-        if (doc instanceof XMLDocument) {
-            ((XMLDocument) doc).addAttribute("xmlns:jxta", "http://jxta.org");
-            ((XMLDocument) doc).addAttribute("xml:space", "preserve");
-        }
-
-        Iterator<X509Certificate> eachCert = certs.iterator();
-
-        eachCert.next(); // skip me.
-
-        Element addTo = doc;
-
-        while (eachCert.hasNext()) {
-            X509Certificate anIssuer = eachCert.next();
-
-            try {
-                encodedCert = PSEUtils.base64Encode(anIssuer.getEncoded());
-            } catch (CertificateEncodingException failed) {
-                IllegalStateException failure = new IllegalStateException("bad certificate.");
-
-                failure.initCause(failed);
-
-                throw failure;
-            } catch (IOException failed) {
-                IllegalStateException failure = new IllegalStateException("Could not encode certificate.");
-
-                failure.initCause(failed);
-
-                throw failure;
-            }
-
-            Element issuerElement = doc.createElement("Issuer", encodedCert);
-
-            addTo.appendChild(issuerElement);
-
-            if (doc instanceof Attributable) {
-                ((Attributable) issuerElement).addAttribute("type", getMessageType());
-            }
-
-            addTo = issuerElement;
-        }
-
-        return doc;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/CertificateSigningRequest.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/CertificateSigningRequest.java
deleted file mode 100644 (file)
index d10a85e..0000000
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import java.io.StringReader;
-
-import java.io.IOException;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import org.bouncycastle.jce.PKCS10CertificationRequest;
-
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredTextDocument;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.XMLElement;
-
-import net.jxta.impl.membership.pse.PSEUtils;
-
-
-/**
- * A lightweight container for a PKCS#10/RFC2986 Certificate Signing Request.
- *
- *  @deprecated The types exported from this implementation are subject to
- *  change.
- *
- * <pre><code>
- *   &lt;xs:element name="jxta:csr" type="CertificateSigningRequest"/>
- *
- *   &lt;xs:complexType name="csr">
- *     &lt;xs:all>
- *     &lt;/xs:all>
- *   &lt;/xs:complexType>
- * </code></pre>
- *
- *  @see <a href="http://http://www.rsasecurity.com/rsalabs/pkcs/pkcs-10/" target='_blank'>PKCS #10</a>
- *  @see <a href="ftp://ftp.isi.edu/in-notes/rfc2986.txt" target='_blank'>IETF RFC 2986</a>
- **/
-@Deprecated
-public class CertificateSigningRequest {
-    
-    /**
-     *  Logger
-     **/
-    private final static transient Logger LOG = Logger.getLogger(CertificateSigningRequest.class.getName());
-    
-    private PKCS10CertificationRequest csr = null;
-    
-    public CertificateSigningRequest() {
-        super();
-    }
-    
-    public CertificateSigningRequest(Element root) {
-        this();
-        initialize(root);
-    }
-    
-    /**
-     *    returns the Message type. This will match the XML doctype declaration.
-     *
-     *    @return a string
-     **/
-    public static String getMessageType() {
-        return "jxta:CertificateSigningRequest";
-    }
-    
-    public PKCS10CertificationRequest getCSR() {
-        return csr;
-    }
-    
-    public void setCSR(PKCS10CertificationRequest csr) {
-        this.csr = csr;
-    }
-    
-    /**
-     *  Initializes the message from a document.
-     **/
-    protected void initialize(Element root) {
-        if (!XMLElement.class.isInstance(root)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports XMLElement");
-        }
-        
-        XMLElement doc = (XMLElement) root;
-        
-        String docName = doc.getName();
-        
-        if (!docName.equals(getMessageType())) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + docName);
-        }
-        
-        String value = doc.getTextValue();
-
-        value = value.trim();
-        
-        try {
-            byte[] csr_der = PSEUtils.base64Decode(new StringReader(value));
-
-            csr = new PKCS10CertificationRequest(csr_der);
-        } catch (IOException error) {
-            throw new IllegalArgumentException("bad certificate signing request.");
-        }
-        
-        // Begin checking sanity!
-        if (null == csr) {
-            throw new IllegalArgumentException("certificate signing request not initialized.");
-        }
-    }
-    
-    /**
-     *  Creates a document out of the message.
-     *
-     *  @param  encodeAs  The document representation format requested.
-     *  @return the message as a document.
-     **/
-    public Document getDocument(MimeMediaType encodeAs) {
-        
-        String encodedCSR;
-
-        try {
-            encodedCSR = PSEUtils.base64Encode(csr.getEncoded());
-        } catch (IOException failed) {
-            IllegalStateException failure = new IllegalStateException("Could not encode certificate signing request.");
-
-            failure.initCause(failed);
-            
-            throw failure;
-        }
-        
-        StructuredTextDocument doc = (StructuredTextDocument) StructuredDocumentFactory.newStructuredDocument(encodeAs
-                ,
-                getMessageType(), encodedCSR);
-        
-        if (doc instanceof XMLDocument) {
-            ((XMLDocument) doc).addAttribute("xmlns:jxta", "http://jxta.org");
-            ((XMLDocument) doc).addAttribute("xml:space", "preserve");
-        }
-        
-        return doc;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/DiscoveryConfigAdv.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/DiscoveryConfigAdv.java
deleted file mode 100644 (file)
index 6e5a9d5..0000000
+++ /dev/null
@@ -1,347 +0,0 @@
-/*
- * Copyright (c) 2004-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import java.util.Enumeration;
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Attributable;
-import net.jxta.document.Attribute;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.ExtendableAdvertisement;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.id.ID;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-
-/**
- * Contains parameters for configuration of the Reference Implemenation
- * Rendezvous Service.
- *
- * <p/><pre><code>
- *
- * </code></pre>
- *
- */
-public final class DiscoveryConfigAdv extends ExtendableAdvertisement {
-
-    /**
-     *  Instantiator for DiscoveryConfigAdv
-     */
-    public static class Instantiator implements AdvertisementFactory.Instantiator {
-
-        /**
-         * {@inheritDoc}
-         */
-        public String getAdvertisementType() {
-            return advType;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance() {
-            return new DiscoveryConfigAdv();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance(Element root) {
-            return new DiscoveryConfigAdv(root);
-        }
-    }
-
-    /**
-     *  Log4J Logger
-     */
-    private static final Logger LOG = Logger.getLogger(DiscoveryConfigAdv.class.getName());
-
-    /**
-     *  Our DOCTYPE
-     */
-    private static final String advType = "jxta:DiscoConfigAdv";
-
-    private static final String FORWARD_ALWAYS_REPLICA = "forwardAlwaysReplica";
-    private static final String FORWARD_BELOW_TRESHOLD = "forwardBelowThreshold";
-    private static final String LOCAL_ONLY = "localOnly";
-
-    private static final String[] fields = {};
-
-    /**
-     * If true, the discovery service will always forward queries to the replica peer
-     * even if there are local responses, unless the replica peer is the local peer.
-     */
-    private boolean forwardAlwaysReplica = false;
-
-    /**
-     * If true, the discovery service will always forward queries if the number of local
-     * responses is below the specified threshold. The threshold may be reduced by the number
-     * of local responses before forwarding. NOTE: not yet implemented.
-     */
-    private boolean forwardBelowTreshold = false;
-
-    /**
-     * localOnly discovery.
-     */
-    private boolean localOnly = false;
-
-    /**
-     *  Returns the identifying type of this Advertisement.
-     *
-     *  <p/><b>Note:</b> This is a static method. It cannot be used to determine
-     *  the runtime type of an advertisment. ie.
-     *  </p><code><pre>
-     *      Advertisement adv = module.getSomeAdv();
-     *      String advType = adv.getAdvertisementType();
-     *  </pre></code>
-     *
-     *  <p/><b>This is wrong and does not work the way you might expect.</b>
-     *  This call is not polymorphic and calls
-     *  Advertiement.getAdvertisementType() no matter what the real type of the
-     *  advertisment.
-     *
-     * @return String the type of advertisement
-     */
-    public static String getAdvertisementType() {
-        return advType;
-    }
-
-    /**
-     *  Use the Instantiator through the factory
-     */
-    DiscoveryConfigAdv() {}
-
-    /**
-     *  Use the Instantiator through the factory
-     * @param root the element
-     */
-    DiscoveryConfigAdv(Element root) {
-        if (!XMLElement.class.isInstance(root)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-        }
-
-        XMLElement doc = (XMLElement) root;
-
-        String doctype = doc.getName();
-
-        String typedoctype = "";
-        Attribute itsType = doc.getAttribute("type");
-
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-
-        if (!doctype.equals(getAdvertisementType()) && !getAdvertisementType().equals(typedoctype)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-
-        Enumeration eachAttr = doc.getAttributes();
-
-        while (eachAttr.hasMoreElements()) {
-            Attribute aDiscoAttr = (Attribute) eachAttr.nextElement();
-            String name = aDiscoAttr.getName();
-            boolean flag = Boolean.valueOf(aDiscoAttr.getValue().trim());
-
-            if (FORWARD_ALWAYS_REPLICA.equals(name)) {
-                forwardAlwaysReplica = flag;
-            } else if (FORWARD_BELOW_TRESHOLD.equals(name)) {
-                forwardBelowTreshold = flag;
-            } else if (LOCAL_ONLY.equals(name)) {
-                localOnly = flag;
-            } else {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Unhandled Attribute: " + name);
-                }
-            }
-        }
-    }
-
-    /**
-     * Make a safe clone of this DiscoveryConfigAdv.
-     *
-     * @return Object A copy of this DiscoveryConfigAdv
-     */
-    @Override
-    public DiscoveryConfigAdv clone() throws CloneNotSupportedException {
-
-        throw new CloneNotSupportedException("Not implemented");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public final String getBaseAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public ID getID() {
-        return ID.nullID;
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public Document getDocument(MimeMediaType encodeAs) {
-        StructuredDocument adv = (StructuredDocument) super.getDocument(encodeAs);
-
-        if (adv instanceof Attributable) {
-            Attributable attrDoc = (Attributable) adv;
-
-            // Do not output if false. It is the default value.
-            if (forwardAlwaysReplica) {
-                attrDoc.addAttribute(FORWARD_ALWAYS_REPLICA, Boolean.toString(forwardAlwaysReplica));
-            }
-            if (forwardBelowTreshold) {
-                attrDoc.addAttribute(FORWARD_BELOW_TRESHOLD, Boolean.toString(forwardBelowTreshold));
-            }
-            if (localOnly) {
-                attrDoc.addAttribute(FORWARD_BELOW_TRESHOLD, Boolean.toString(localOnly));
-            }
-        }
-        return adv;
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public String[] getIndexFields() {
-        return fields;
-    }
-
-    /**
-     * True if this discovery service will forward queries to the replica peer in all cases, rather
-     * than only in the absence of local responses.
-     *
-     * @return The current setting.
-     */
-    public boolean getForwardAlwaysReplica() {
-        return forwardAlwaysReplica;
-    }
-
-    /**
-     * Specifies if this discovery service will forward queries to the replica peer in all cases, rather than only in the absence
-     * of local responses.
-     *
-     * @param newvalue The new setting.
-     */
-    public void setForwardAlwaysReplica(boolean newvalue) {
-        forwardAlwaysReplica = newvalue;
-    }
-
-    /**
-     * True if this discovery service will forward queries when the number of local responses
-     * is below the specified treshold, rather than only in the absence of local responses.
-     *
-     * @return The current setting.
-     */
-    public boolean getForwardBelowTreshold() {
-        return forwardBelowTreshold;
-    }
-
-    /**
-     * Specifies if this discovery service will forward queries when the number of local responses is below the specified
-     * treshold, rather than only in the absence of local responses.
-     *
-     * @param newvalue The new setting.
-     */
-    public void setForwardBelowTreshold(boolean newvalue) {
-        forwardBelowTreshold = newvalue;
-    }
-
-    /**
-     * True if this discovery service performs only local discovery.
-     *
-     * @return The current setting.
-     */
-    public boolean getLocalOnly() {
-        return localOnly;
-    }
-
-    /**
-     * Specifies if this discovery service will perform local only discovery.
-     *
-     * @param newvalue The new setting.
-     */
-    public void setLocalOnly(boolean newvalue) {
-        localOnly = newvalue;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/DiscoveryQuery.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/DiscoveryQuery.java
deleted file mode 100644 (file)
index 3c3dbee..0000000
+++ /dev/null
@@ -1,327 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import java.io.IOException;
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.*;
-import net.jxta.protocol.DiscoveryQueryMsg;
-import net.jxta.protocol.PeerAdvertisement;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.io.StringReader;
-import java.lang.reflect.UndeclaredThrowableException;
-import java.util.Enumeration;
-
-
-/**
- * Implements the Discovery Query Message according to the schema defined by the
- * standard JXTA Peer Discovery Protocol (PDP).
- * <p/>
- * <p/><pre>
- * &lt;xs:element name="DiscoveryQuery" type="jxta:DiscoveryQuery"/>
- * <p/>
- * &lt;xsd:simpleType name="DiscoveryQueryType">
- *   &lt;xsd:restriction base="xsd:string">
- *     &lt;!-- peer -->
- *     &lt;xsd:enumeration value="0"/>
- *     &lt;!-- group -->
- *     &lt;xsd:enumeration value="1"/>
- *     &lt;!-- adv -->
- *     &lt;xsd:enumeration value="2"/>
- *   &lt;/xsd:restriction>
- * &lt;/xsd:simpleType>
- * <p/>
- * &lt;xs:complexType name="DiscoveryQuery">
- *   &lt;xs:sequence>
- *     &lt;xs:element name="Type" type="jxta:DiscoveryQueryType"/>
- *     &lt;xs:element name="Threshold" type="xs:unsignedInt" minOccurs="0"/>
- *     &lt;xs:element name="Attr" type="xs:string" minOccurs="0"/>
- *     &lt;xs:element name="Value" type="xs:string" minOccurs="0"/>
- *     &lt;!-- The following should refer to a peer adv, but is instead a whole doc for historical reasons -->
- *     &lt;xs:element name="PeerAdv" type="xs:string" minOccurs="0"/>
- *   &lt;/xs:sequence>
- * &lt;/xs:complexType>
- * </pre>
- *
- * @see net.jxta.discovery.DiscoveryService
- * @see net.jxta.impl.discovery.DiscoveryServiceImpl
- * @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-pdp" target="_blank">JXTA Protocols Specification : Peer Discovery Protocol</a>
- */
-public class DiscoveryQuery extends DiscoveryQueryMsg {
-
-    private static final Logger LOG = Logger.getLogger(DiscoveryQuery.class.getName());
-
-    private static final String typeTag = "Type";
-    private static final String peerAdvTag = "PeerAdv";
-    private static final String thresholdTag = "Threshold";
-    private static final String queryAttrTag = "Attr";
-    private static final String queryValueTag = "Value";
-
-    /**
-     * Default constructor
-     */
-    public DiscoveryQuery() {}
-
-    /**
-     * Construct from a StructuredDocument
-     *
-     * @param doc the element
-     */
-    public DiscoveryQuery(Element doc) {
-        initialize(doc);
-    }
-
-    /**
-     * Process an individual element from the document during parse. Normally,
-     * implementations will allow the base advertisments a chance to handle the
-     * element before attempting ot handle the element themselves. ie.
-     * <p/>
-     * <p/><pre><code>
-     *  protected boolean handleElement(Element elem) {
-     * <p/>
-     *      if (super.handleElement()) {
-     *           // it's been handled.
-     *           return true;
-     *           }
-     * <p/>
-     *      <i>... handle elements here ...</i>
-     * <p/>
-     *      // we don't know how to handle the element
-     *      return false;
-     *      }
-     *  </code></pre>
-     *
-     * @param elem the element to be processed.
-     * @return true if the element was recognized, otherwise false.
-     */
-    protected boolean handleElement(XMLElement elem) {
-        
-        String value = elem.getTextValue();
-        
-        if(null == value) {
-            return false;
-        }
-        
-        value = value.trim();
-        
-        if(0 == value.length()) {
-            return false;
-        }
-
-        if (elem.getName().equals(typeTag)) {
-            setDiscoveryType(Integer.parseInt(value));
-            return true;
-        }
-        if (elem.getName().equals(thresholdTag)) {
-            setThreshold(Integer.parseInt(value));
-            return true;
-        }
-        if (elem.getName().equals(peerAdvTag)) {
-            try {
-                XMLDocument asDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, new StringReader(value));
-                PeerAdvertisement adv = (PeerAdvertisement) AdvertisementFactory.newAdvertisement(asDoc);
-                setPeerAdvertisement(adv);
-                return true;
-            } catch(IOException failed) {
-                IllegalArgumentException failure = new IllegalArgumentException("Bad Peer Advertisement");
-                failure.initCause(failed);
-                
-                throw failure;
-            }
-        }
-        if (elem.getName().equals(queryAttrTag)) {
-            setAttr(value);
-            return true;
-        }
-        if (elem.getName().equals(queryValueTag)) {
-            setValue(value);
-            return true;
-        }
-
-        // element was not handled
-        return false;
-    }
-
-    /**
-     * Intialize a Discovery Query from a portion of a structured document.
-     *
-     * @param root document to intialize from
-     */
-    protected void initialize(Element root) {
-
-        if (!XMLElement.class.isInstance(root)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports XMLElement");
-        }
-
-        XMLElement doc = (XMLElement) root;
-
-        if (!doc.getName().equals(getAdvertisementType())) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-
-        setDiscoveryType(-1); // force illegal value;
-
-        Enumeration<XMLElement> elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            XMLElement elem = elements.nextElement();
-
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Unhandled Element : " + elem.toString());
-                }
-            }
-        }
-
-        // sanity check time!
-
-        if ((DiscoveryService.PEER != getDiscoveryType()) && (DiscoveryService.GROUP != getDiscoveryType())
-                && (DiscoveryService.ADV != getDiscoveryType())) {
-            throw new IllegalArgumentException("Type is not one of the required values.");
-        }
-        if (getThreshold() < 0) {
-            throw new IllegalArgumentException("Threshold must not be less than zero.");
-        }
-        if ((getDiscoveryType() != DiscoveryService.PEER) && (getThreshold() == 0)) {
-            throw new IllegalArgumentException("Threshold may not be zero.");
-        }
-        if ((null == getAttr()) && (null != getValue())) {
-            throw new IllegalArgumentException("Value specified without attribute.");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Document getDocument(MimeMediaType asMimeType) {
-        StructuredDocument adv = StructuredDocumentFactory.newStructuredDocument(asMimeType, getAdvertisementType());
-
-        if (adv instanceof XMLDocument) {
-            XMLDocument xmlDoc = (XMLDocument) adv;
-
-            xmlDoc.addAttribute("xmlns:jxta", "http://jxta.org");
-            xmlDoc.addAttribute("xml:space", "preserve");
-        }
-
-        Element e;
-
-        e = adv.createElement(typeTag, Integer.toString(getDiscoveryType()));
-        adv.appendChild(e);
-
-        int threshold = getThreshold();
-
-        if (threshold < 0) {
-            throw new IllegalStateException("threshold must be >= 0");
-        }
-        e = adv.createElement(thresholdTag, Integer.toString(threshold));
-        adv.appendChild(e);
-
-        PeerAdvertisement peerAdv = getPeerAdvertisement();
-
-        if ((peerAdv != null)) {
-            e = adv.createElement(peerAdvTag, peerAdv.toString());
-            adv.appendChild(e);
-        }
-
-        String attr = getAttr();
-
-        if ((attr != null) && (attr.length() > 0)) {
-            e = adv.createElement(queryAttrTag, attr.trim());
-            adv.appendChild(e);
-
-            String value = getValue();
-
-            if ((value != null) && (value.length() > 0)) {
-                e = adv.createElement(queryValueTag, value.trim());
-                adv.appendChild(e);
-            } else {
-                if (threshold < 0) {
-                    throw new IllegalStateException("Attribute specified, but no value was specified.");
-                }
-            }
-        }
-        return adv;
-    }
-
-    /**
-     * return the string representaion of this doc
-     *
-     * @deprecated should not be used. use getDocument().toString() instead.
-     */
-    @Override
-    @Deprecated
-    public String toString() {
-
-        try {
-            StructuredTextDocument doc = (StructuredTextDocument) getDocument(MimeMediaType.XMLUTF8);
-
-            return doc.toString();
-        } catch (Exception e) {
-            if (e instanceof RuntimeException) {
-                throw (RuntimeException) e;
-            } else {
-                throw new UndeclaredThrowableException(e);
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/DiscoveryResponse.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/DiscoveryResponse.java
deleted file mode 100644 (file)
index bfeba1b..0000000
+++ /dev/null
@@ -1,347 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.io.StringReader;
-import java.io.UnsupportedEncodingException;
-import java.lang.reflect.UndeclaredThrowableException;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Vector;
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Attributable;
-import net.jxta.document.Attribute;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredTextDocument;
-import net.jxta.document.TextElement;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.protocol.DiscoveryResponseMsg;
-import net.jxta.protocol.PeerAdvertisement;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-
-/**
- *  DiscoveryResponse.
- *
- *  <p/>This message is part of the standard JXTA Peer Discovery Protocol (PDP).
- *
- *  <pre>
- * &lt;xs:element name="DiscoveryResponse" type="jxta:DiscoveryResponse"/>
- *
- * &lt;xs:complexType name="DiscoveryResponse">
- *   &lt;xs:sequence>
- *     &lt;xs:element name="Type" type="jxta:DiscoveryQueryType"/>
- *     &lt;xs:element name="Count" type="xs:unsignedInt" minOccurs="0"/>
- *     &lt;xs:element name="Attr" type="xs:string" minOccurs="0"/>
- *     &lt;xs:element name="Value" type="xs:string" minOccurs="0"/>
- *     &lt;!-- The following should refer to a peer adv, but is instead a whole doc for historical reasons -->
- *     &lt;xs:element name="PeerAdv" minOccurs="0">
- *     &lt;xs:complexType>
- *       &lt;xs:simpleContent>
- *         &lt;xs:extension base="xs:string">
- *           &lt;xs:attribute name="Expiration" type="xs:unsignedLong"/>
- *         &lt;/xs:extension>
- *       &lt;/xs:simpleContent>
- *     &lt;/xs:complexType>
- *     &lt;/xs:element>
- *     &lt;xs:element name="Response" maxOccurs="unbounded">
- *     &lt;xs:complexType>
- *       &lt;xs:simpleContent>
- *         &lt;xs:extension base="xs:string">
- *           &lt;xs:attribute name="Expiration" type="xs:unsignedLong"/>
- *         &lt;/xs:extension>
- *       &lt;/xs:simpleContent>
- *     &lt;/xs:complexType>
- *     &lt;/xs:element>
- *   &lt;/xs:sequence>
- * &lt;/xs:complexType>
- * </pre>
- *
- *@see    net.jxta.discovery.DiscoveryService
- *@see    net.jxta.impl.discovery.DiscoveryServiceImpl
- *@see    <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-pdp" 
- *        target="_blank">JXTA Protocols Specification : Peer Discovery Protocol</a>
- */
-public class DiscoveryResponse extends DiscoveryResponseMsg {
-
-    private final static transient Logger LOG = Logger.getLogger(DiscoveryResponse.class.getName());
-
-    private final static String countTag = "Count";
-    private final static String expirationTag = "Expiration";
-    private final static String peerAdvTag = "PeerAdv";
-    private final static String queryAttrTag = "Attr";
-    private final static String queryValueTag = "Value";
-    private final static String responsesTag = "Response";
-    private final static String typeTag = "Type";
-
-    /**
-     *  Constructor for new instances.
-     */
-    public DiscoveryResponse() {}
-
-    /**
-     *  Construct from a StructuredDocument
-     *
-     *@param  root  Description of the Parameter
-     */
-    public DiscoveryResponse(Element root) {
-
-        if (!XMLElement.class.isInstance(root)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports XMLElement");
-        }
-        XMLElement doc = (XMLElement) root;
-        String docName = doc.getName();
-
-        if (!getAdvertisementType().equals(docName)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + " from doc containing a " + docName);
-        }
-        readIt(doc);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Document getDocument(MimeMediaType asMimeType) {
-
-        StructuredTextDocument adv = (StructuredTextDocument)
-                StructuredDocumentFactory.newStructuredDocument(asMimeType, getAdvertisementType());
-
-        if (adv instanceof XMLDocument) {
-            ((XMLDocument) adv).addAttribute("xmlns:jxta", "http://jxta.org");
-        }
-
-        Element e;
-
-        e = adv.createElement(countTag, Integer.toString(responses.size()));
-        adv.appendChild(e);
-        e = adv.createElement(typeTag, Integer.toString(type));
-        adv.appendChild(e);
-
-        PeerAdvertisement myPeerAdv = getPeerAdvertisement();
-
-        if (null != myPeerAdv) {
-            e = adv.createElement(peerAdvTag, myPeerAdv.toString());
-            adv.appendChild(e);
-        }
-
-        if ((attr != null) && (attr.length() > 0)) {
-            e = adv.createElement(queryAttrTag, getQueryAttr());
-            adv.appendChild(e);
-            if ((value != null) && (value.length() > 0)) {
-                e = adv.createElement(queryValueTag, value);
-                adv.appendChild(e);
-            }
-        }
-
-        Enumeration<String> advs = getResponses();
-        Enumeration exps = getExpirations();
-
-        try {
-            while (advs.hasMoreElements()) {
-                Long l = (Long) exps.nextElement();
-                String response = advs.nextElement();
-
-                e = adv.createElement(responsesTag, response);
-
-                adv.appendChild(e);
-                if (adv instanceof Attributable) {
-                    ((Attributable) e).addAttribute(expirationTag, l.toString());
-                }
-            }
-        } catch (Exception failed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Got an Exception during doc creation", failed);
-            }
-            IllegalStateException failure = new IllegalStateException("Got an Exception during doc creation");
-
-            failure.initCause(failed);
-            throw failure;
-        }
-        return adv;
-    }
-
-    /**
-     *  Parses a document into this object
-     *
-     *@param  doc  Document
-     */
-    private void readIt(XMLElement doc) {
-        Vector<String> res = new Vector<String>();
-        Vector<Long> exps = new Vector<Long>();
-
-        try {
-            Enumeration elements = doc.getChildren();
-
-            while (elements.hasMoreElements()) {
-                XMLElement elem = (XMLElement) elements.nextElement();
-
-                if (elem.getName().equals(typeTag)) {
-                    type = Integer.parseInt(elem.getTextValue());
-                    continue;
-                }
-
-                if (elem.getName().equals(peerAdvTag)) {
-                    String peerString = elem.getTextValue();
-
-                    if (null == peerString) {
-                        continue;
-                    }
-
-                    peerString = peerString.trim();
-                    if (peerString.length() > 0) {
-                        XMLDocument xmlPeerAdv = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(
-                                MimeMediaType.XMLUTF8, new StringReader(peerString));
-
-                        setPeerAdvertisement((PeerAdvertisement) AdvertisementFactory.newAdvertisement(xmlPeerAdv));
-                    }
-                    continue;
-                }
-
-                if (elem.getName().equals(queryAttrTag)) {
-                    setQueryAttr(elem.getTextValue());
-                    continue;
-                }
-
-                if (elem.getName().equals(queryValueTag)) {
-                    setQueryValue(elem.getTextValue());
-                    continue;
-                }
-
-                if (elem.getName().equals(responsesTag)) {
-                    // get the response
-                    String aResponse = elem.getTextValue();
-
-                    if (null == aResponse) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Discarding an empty response tag");
-                        }
-                        continue;
-                    }
-                    res.add(aResponse);
-
-                    long exp;
-                    // get expiration associated with this response
-                    Attribute attr = (elem).getAttribute(expirationTag);
-
-                    if (null != attr) {
-                        exp = Long.parseLong(attr.getValue());
-                    } else {
-                        // if there are no attribute use DEFAULT_EXPIRATION
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine(
-                                    "Received an old-style DiscoveryResponse.\n You received a response from a peer that does \nnot support advertisement aging. \nSetting expiration to DiscoveryService.DEFAULT_EXPIRATION ");
-                        }
-                        exp = DiscoveryService.DEFAULT_EXPIRATION;
-                    }
-
-                    exps.add(exp);
-                }
-            }
-        } catch (Exception failed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Got an Exception during Parse ", failed);
-            }
-            IllegalArgumentException failure = new IllegalArgumentException("Got an Exception during parse");
-
-            failure.initCause(failed);
-            throw failure;
-        }
-        
-        setResponses(res);
-        setExpirations(exps);
-    }
-
-    /**
-     * Return a string representation of this message. The string will
-     * contain the message formated as a UTF-8 encoded XML Document.
-     *
-     * @return String  a String containing the message.
-     */
-    @Override
-    public String toString() {
-        
-        try {
-            XMLDocument doc = (XMLDocument) getDocument(MimeMediaType.XMLUTF8);
-            
-            return doc.toString();
-        } catch (Throwable e) {
-            if (e instanceof Error) {
-                throw (Error) e;
-            } else if (e instanceof RuntimeException) {
-                throw (RuntimeException) e;
-            } else {
-                throw new UndeclaredThrowableException(e);
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/GroupConfig.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/GroupConfig.java
deleted file mode 100644 (file)
index 6eef38c..0000000
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *
- *  The Sun Project JXTA(TM) Software License
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *
- *  3. The end-user documentation included with the redistribution, if any, must
- *     include the following acknowledgment: "This product includes software
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology."
- *     Alternately, this acknowledgment may appear in the software itself, if
- *     and wherever such third-party acknowledgments normally appear.
- *
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must
- *     not be used to endorse or promote products derived from this software
- *     without prior written permission. For written permission, please contact
- *     Project JXTA at http://www.jxta.org.
- *
- *  5. Products derived from this software may not be called "JXTA", nor may
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United
- *  States and other countries.
- *
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of
- *  the license in source files.
- *
- *  ====================================================================
- *
- *  This software consists of voluntary contributions made by many individuals
- *  on behalf of Project JXTA. For more information on Project JXTA, please see
- *  http://www.jxta.org.
- *
- *  This license is based on the BSD license adopted by the Apache Foundation.
- */
-
-package net.jxta.impl.protocol;
-
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Attribute;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.logging.Logging;
-import java.util.Enumeration;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import net.jxta.id.ID;
-import net.jxta.protocol.ConfigParams;
-
-
-/**
- * Configuration container for any Peer Group.
- */
-public class GroupConfig extends ConfigParams implements Cloneable {
-    
-    /**
-     *  Logger
-     */
-    private static final Logger LOG = Logger.getLogger(GroupConfig.class.getName());
-    
-    private static final String advType = "jxta:GroupConfig";
-    
-    /**
-     * Instantiator for GroupConfig
-     */
-    public final static class Instantiator implements AdvertisementFactory.Instantiator {
-        
-        /**
-         * {@inheritDoc}
-         */
-        public String getAdvertisementType() {
-            return advType;
-        }
-        
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance() {
-            return new GroupConfig();
-        }
-        
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance(Element root) {
-            if (!XMLElement.class.isInstance(root)) {
-                throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-            }
-            
-            return new GroupConfig((XMLElement) root);
-        }
-    }
-    
-    /**
-     * Use the Instantiator through the factory
-     */
-    GroupConfig() {}
-    
-    /**
-     * Use the Instantiator through the factory
-     *
-     * @param root the element
-     */
-    GroupConfig(XMLElement doc) {
-        String doctype = doc.getName();
-        
-        String typedoctype = "";
-        Attribute itsType = doc.getAttribute("type");
-        
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-        
-        if (!doctype.equals(getAdvertisementType()) && !getAdvertisementType().equals(typedoctype)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-        
-        Enumeration<XMLElement> elements = doc.getChildren();
-        
-        while (elements.hasMoreElements()) {
-            Element elem = (Element) elements.nextElement();
-            
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Unhandled Element: " + elem.toString());
-                }
-            }
-        }
-    }
-    
-    /**
-     * Make a safe clone of this GroupConfig.
-     *
-     * @return Object an object of class GroupConfig that is a deep-enough
-     *         copy of this one.
-     */
-    @Override
-    public GroupConfig clone() {
-        GroupConfig result = (GroupConfig) super.clone();
-        
-        return result;
-    }
-    
-    /**
-     * returns the advertisement type
-     *
-     * @return string type
-     */
-    public static String getAdvertisementType() {
-        return advType;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getAdvType() {
-        return getAdvertisementType();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public StructuredDocument getDocument(MimeMediaType encodeAs) {
-        StructuredDocument adv = (StructuredDocument) super.getDocument(encodeAs);
-        
-        addDocumentElements(adv);
-        
-        return adv;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String[] getIndexFields() {
-        return new String[0];
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public ID getID() {
-        return null;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/HTTPAdv.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/HTTPAdv.java
deleted file mode 100644 (file)
index e253c96..0000000
+++ /dev/null
@@ -1,561 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import net.jxta.document.*;
-import net.jxta.protocol.TransportAdvertisement;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.util.Arrays;
-import java.util.Enumeration;
-
-
-/**
- * Configuration parameters for HttpServelet Message Transport.
- */
-public class HTTPAdv extends TransportAdvertisement {
-
-    /**
-     * Log4J Logger
-     */
-    private static final Logger LOG = Logger.getLogger(HTTPAdv.class.getName());
-
-    private static final String CONFIGMODES[] = { "auto", "manual"};
-    private static final String INDEXFIELDS[] = {/* none */};
-
-    private static final String ProtocolTag = "Protocol";
-    private static final String ProxyTag = "Proxy";
-    private static final String ServerTag = "Server";
-    private static final String PortTag = "Port";
-    private static final String IntfAddrTag = "InterfaceAddress";
-    private static final String ConfModeTag = "ConfigMode";
-    private static final String FlagsTag = "Flags";
-    private static final String PublicAddressOnlyAttr = "PublicAddressOnly";
-    private static final String ProxyOffTag = "ProxyOff";
-    private static final String ServerOffTag = "ServerOff";
-    private static final String ClientOffTag = "ClientOff";
-
-    private String proxy = null;
-    private String server = null;
-    private int listenPort = -1; // The real port a server listens to
-
-    private String interfaceAddress = null; // What IP to bind to locally
-
-    private String configMode = CONFIGMODES[0];
-    private boolean publicAddressOnly = false;
-
-    // These are for configuration; They get saved in the document only if they are
-    // off and the correspondig item has a non-null value. So that the value is not lost.
-    // When HttpTransport is done initializing, the unused values are set to null, and thus
-    // pruned from the published adv.
-
-    private boolean proxyEnabled = true;
-    private boolean serverEnabled = true;
-    private boolean clientEnabled = true;
-
-    /**
-     * Our instantiator.
-     */
-    public static class Instantiator implements AdvertisementFactory.Instantiator {
-
-        /**
-         * {@inheritDoc}
-         */
-        public String getAdvertisementType() {
-            return HTTPAdv.getAdvertisementType();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance() {
-            return new HTTPAdv();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance(Element root) {
-            if (!XMLElement.class.isInstance(root)) {
-                throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-            }
-
-            return new HTTPAdv((XMLElement) root);
-        }
-    }
-
-    /**
-     * Returns the identifying type of this Advertisement.
-     * <p/>
-     * <p/><b>Note:</b> This is a static method. It cannot be used to determine
-     * the runtime type of an advertisement. ie.
-     * </p><code><pre>
-     *      Advertisement adv = module.getSomeAdv();
-     *      String advType = adv.getAdvertisementType();
-     *  </pre></code>
-     * <p/>
-     * <p/><b>This is wrong and does not work the way you might expect.</b>
-     * This call is not polymorphic and calls
-     * Advertisement.getAdvertisementType() no matter what the real type of the
-     * advertisement.
-     *
-     * @return String the type of advertisement
-     */
-    public static String getAdvertisementType() {
-        return "jxta:HTTPTransportAdvertisement";
-    }
-
-    /**
-     *  Private constructor for new instances. Use the instantiator.
-     */
-    private HTTPAdv() {
-    }
-
-    /**
-     *  Private constructor for xml serialized instances. Use the instantiator.
-     *  
-     *  @param doc The XML serialization of the advertisement.
-     */
-    private HTTPAdv(XMLElement doc) {
-        String doctype = doc.getName();
-
-        String typedoctype = "";
-        Attribute itsType = doc.getAttribute("type");
-
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-
-        if (!doctype.equals(getAdvertisementType()) && !getAdvertisementType().equals(typedoctype)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-
-        Attribute attr = doc.getAttribute(FlagsTag);
-
-        if (attr != null) {
-            String options = attr.getValue();
-
-            publicAddressOnly = (options.indexOf(PublicAddressOnlyAttr) != -1);
-        }
-
-        Enumeration elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            XMLElement elem = (XMLElement) elements.nextElement();
-
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Unhandled Element: " + elem.toString());
-                }
-            }
-        }
-
-        // Sanity Check!!!
-
-        // For consistency we force the flags to "disabled" for items we do not
-        // have data for. However, the flags truely matter only when there is
-        // data.
-        if (proxy == null) {
-            proxyEnabled = false;
-        }
-
-        if (serverEnabled && (0 == listenPort)) {
-            throw new IllegalArgumentException("Dynmaic port selection not supported with incoming connections.");
-        }
-
-        if ((listenPort < -1) || (listenPort > 65535)) {
-            throw new IllegalArgumentException("Illegal Listen Port Value");
-        }
-
-        if (!Arrays.asList(CONFIGMODES).contains(configMode)) {
-            throw new IllegalArgumentException("Unsupported configuration mode.");
-        }
-
-        // XXX 20050118 bondolo Some versions apparently don't initialize this field. Eventually make it required.
-        if (null == getProtocol()) {
-            setProtocol("http");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected boolean handleElement(Element raw) {
-
-        if (super.handleElement(raw)) {
-            return true;
-        }
-
-        XMLElement elem = (XMLElement) raw;
-
-        String tag = elem.getName();
-
-        if (tag.equals(ProxyOffTag)) {
-            proxyEnabled = false;
-            return true;
-        }
-
-        if (tag.equals(ServerOffTag)) {
-            serverEnabled = false;
-            return true;
-        }
-
-        if (tag.equals(ClientOffTag)) {
-            clientEnabled = false;
-            return true;
-        }
-
-        String value = elem.getTextValue();
-
-        if (null == value) {
-            return false;
-        }
-
-        value = value.trim();
-
-        if (0 == value.length()) {
-            return false;
-        }
-
-        if (tag.equals(ProtocolTag)) {
-            setProtocol(value);
-            return true;
-        }
-
-        if (tag.equals(IntfAddrTag)) {
-            setInterfaceAddress(value);
-            return true;
-        }
-
-        if (tag.equals(ConfModeTag)) {
-            setConfigMode(value);
-            return true;
-        }
-
-        if (tag.equals(PortTag)) {
-            setPort(Integer.parseInt(value.trim()));
-            return true;
-        }
-
-        if (tag.equals(ProxyTag)) {
-            proxy = value;
-            return true;
-        }
-
-        if (tag.equals(ServerTag)) {
-            server = value;
-            return true;
-        }
-
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * <p/><emphasis>NB</emphasis>: we do not try to enforce dependency rules
-     * such as Proxy only when router, because we want to convey the complete
-     * configuration, even items corresponding to not currently enabled
-     * features. HttpTransport will gracefully disregard items that have
-     * no use in the current context.
-     */
-    @Override
-    public Document getDocument(MimeMediaType encodeAs) {
-        if (serverEnabled && (0 == listenPort)) {
-            throw new IllegalStateException("Dynmaic port selection not supported with incoming connections.");
-        }
-
-        if ((listenPort < -1) || (listenPort > 65535)) {
-            throw new IllegalStateException("Illegal Listen Port Value");
-        }
-
-        if (!Arrays.asList(CONFIGMODES).contains(configMode)) {
-            throw new IllegalStateException("Unsupported configuration mode.");
-        }
-
-        // XXX 20050118 bondolo Some versions apparently don't initialize this field. Eventually make it required.
-        if (null == getProtocol()) {
-            setProtocol("http");
-        }
-
-        StructuredDocument adv = (StructuredDocument) super.getDocument(encodeAs);
-
-        if (adv instanceof Attributable) {
-            // Only one flag for now. Easy.
-            if (publicAddressOnly) {
-                ((Attributable) adv).addAttribute(FlagsTag, PublicAddressOnlyAttr);
-            }
-        }
-
-        Element e1 = adv.createElement(ProtocolTag, getProtocol());
-
-        adv.appendChild(e1);
-
-        if (null != getInterfaceAddress()) {
-            Element e2 = adv.createElement(IntfAddrTag, getInterfaceAddress());
-
-            adv.appendChild(e2);
-        }
-
-        Element e3 = adv.createElement(ConfModeTag, getConfigMode());
-
-        adv.appendChild(e3);
-
-        Element e4 = adv.createElement(PortTag, Integer.toString(getPort()));
-
-        adv.appendChild(e4);
-
-        Element ext;
-
-        if (proxy != null) {
-            ext = adv.createElement(ProxyTag, proxy);
-            adv.appendChild(ext);
-        }
-
-        // If disabled, say it; otherwise it is assumed on. In published
-        // advs, we only keep data for items that are ON, so we do not
-        // have to clutter them with the flag.
-        if (!proxyEnabled) {
-            ext = adv.createElement(ProxyOffTag);
-            adv.appendChild(ext);
-        }
-
-        if (server != null) {
-            ext = adv.createElement(ServerTag, server);
-            adv.appendChild(ext);
-        }
-
-        // If disabled, say it; otherwise it is assumed on. In published
-        // advs, we only keep data for items that are ON, so we do not
-        // have to clutter them with the flag.
-        if (!serverEnabled) {
-            ext = adv.createElement(ServerOffTag);
-            adv.appendChild(ext);
-        }
-
-        // If disabled, say it; otherwise it is assumed on. In published
-        // advs, we only keep data for items that are ON, so we do not
-        // have to clutter them with the flag.
-        if (!clientEnabled) {
-            ext = adv.createElement(ClientOffTag);
-            adv.appendChild(ext);
-        }
-
-        return adv;
-    }
-
-    /**
-     * Returns the interfaceAddr. That is, the ip of the IF to which to bind
-     * locally created sockets.
-     *
-     * @return string The address.
-     */
-    public String getInterfaceAddress() {
-        return interfaceAddress;
-    }
-
-    /**
-     * Sets the interfaceAddr. That is, the ip of the IF to which to bind
-     * locally created sockets.
-     *
-     * @param address The address
-     */
-    public void setInterfaceAddress(String address) {
-        this.interfaceAddress = address;
-    }
-
-    public boolean getPublicAddressOnly() {
-        return publicAddressOnly;
-    }
-
-    public void setPublicAddressOnly(boolean only) {
-        publicAddressOnly = only;
-    }
-
-    /**
-     * returns the config mode. That is, how the user prefers to configure
-     * the interface address: "auto", "manual"
-     *
-     * @return string config mode
-     */
-    public String getConfigMode() {
-        return configMode;
-    }
-
-    /**
-     * set the config mode. That is, how the user prefers to configure
-     * the interface address: "auto", "manual"
-     * <p/>
-     * This is just a pure config item. It is never in published advs. The TCP
-     * transport strips it when it initializes.
-     *
-     * @param mode Can be "auto", "manual" other settings will act as the default
-     *             which is "auto".
-     */
-    public void setConfigMode(String mode) {
-        if (!Arrays.asList(CONFIGMODES).contains(mode)) {
-            throw new IllegalArgumentException("Unsupported configuration mode.");
-        }
-
-        configMode = mode;
-    }
-
-    /**
-     * Returns the port number to which server sockets are locally bound.
-     *
-     * @return String the port
-     */
-    public int getPort() {
-        return listenPort;
-    }
-
-    /**
-     * Sets the port number to which server sockets are locally bound.
-     *
-     * @param newPort the port
-     */
-    public void setPort(int newPort) {
-        listenPort = newPort;
-    }
-
-    /**
-     * @return the proxy string
-     * @deprecated This has been deprecated. Set your proxy directly with the JVM
-     */
-    @Deprecated
-    public String getProxy() {
-        return proxy;
-    }
-
-    public String getServer() {
-        return server;
-    }
-
-    /**
-     * @return true if proxy enabled
-     * @deprecated This has been deprecated. Set your proxy directly with the JVM
-     */
-    @Deprecated
-    public boolean isProxyEnabled() {
-        return proxyEnabled;
-    }
-
-    public boolean isServerEnabled() {
-        return serverEnabled;
-    }
-
-    public boolean isClientEnabled() {
-        return clientEnabled;
-    }
-
-    // If one of proxy, server, or router is cleared, the corresponding
-    // enabled flag should be false (the opposite is not true).
-
-    /**
-     * @param name the proxy string
-     * @deprecated This has been deprecated. Set your proxy directly with the JVM
-     */
-    @Deprecated
-    public void setProxy(String name) {
-        proxy = name;
-        if (name == null) {
-            proxyEnabled = false;
-        }
-    }
-
-    public void setServer(String name) {
-        server = name;
-    }
-
-    /**
-     * @param enabled true if proxy is enabled
-     * @deprecated This has been deprecated. Set your proxy directly with the JVM
-     */
-    @Deprecated
-    public void setProxyEnabled(boolean enabled) {
-        proxyEnabled = enabled;
-    }
-
-    public void setServerEnabled(boolean enabled) {
-        serverEnabled = enabled;
-    }
-
-    public void setClientEnabled(boolean enabled) {
-        clientEnabled = enabled;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String[] getIndexFields() {
-        return INDEXFIELDS;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/LeaseRequestMsg.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/LeaseRequestMsg.java
deleted file mode 100644 (file)
index ae36078..0000000
+++ /dev/null
@@ -1,463 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.UUID;
-
-import java.net.URISyntaxException;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.Attribute;
-import net.jxta.document.Attributable;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.peer.PeerID;
-import net.jxta.protocol.PeerAdvertisement;
-
-
-/**
- * A Leasing Protocol Request Message.
- *
- * <p/><pre><code>
- *  &lt;xs:complexType name="LeaseRequestMessage">
- *      &lt;xs:sequence>
- *          &lt;xs:element name="Credential" type="jxta:Cred" />
- *          &lt;xs:element name="ClientAdv" minOccurs="0" >
- *              &lt;xs:complexType>
- *                  &lt;xs:complexContent>
- *                      &lt;xs:extension  base="jxta:PA">
- *                          &lt;xs:attribute name="expiration" use="required" type="xs:unsignedLong" />
- *                      &lt;/xs:extension>
- *                  &lt;/xs:complexContent>
- *              &lt;/xs:complexType>
- *          &lt;/xs:element>
- *          &lt;xs:element name="Option" minOccurs="0" maxOccurs="unbounded" type="xs:anyType" />
- *      &lt;/xs:sequence>
- *      &lt;xs:attribute name="client_id" use="required" type="jxta:JXTAID" />
- *      &lt;xs:attribute name="requested_lease" type="xs:unsignedLong" />
- *      &lt;xs:attribute name="server_adv_gen" type="jxta:uuid" />
- *      &lt;xs:attribute name="referral_advs" type="xs:unsignedInt" />
- *  &lt;/xs:complexType>
- * </code></pre>
- *
- * @since 2.5
- */
-public class LeaseRequestMsg {
-    
-    /**
-     *  Log4J Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(LeaseRequestMsg.class.getName());
-    
-    private final static String LEASE_REQUEST_MSG = "LeaseRequestMessage";
-    private final static String CLIENT_ID_ATTR = "client_id";
-    private final static String REQUESTED_LEASE_ATTR = "requested_lease";
-    private final static String SERVER_ADV_GEN_ATTR = "server_adv_gen";
-    private final static String REFERRAL_ADVS_ATTR = "referral_advs";
-    
-    private final static String CLIENT_CRED_TAG = "Credential";
-    private final static String CLIENT_ADV_TAG = "ClientAdv";
-    private final static String CLIENT_ADV_EXP_ATTR = "ClientAdv";
-    
-    private final static String OPTION_TAG = "Options";
-    
-    /**
-     *  The ID of the client.
-     */
-    private ID clientID = null;
-    
-    /**
-     *  Length of lease to request. {@code Long.MIN_VALUE} means that no lease
-     *  is being requested, instead the message is being sent to retrieve
-     *  referrals.
-     */
-    private long requestedLease = Long.MIN_VALUE;
-    
-    /**
-     *  last UUID version of the server's advertisement that the client saw or
-     *  {@code null} if client claims to have seen no pervious version.
-     */
-    private UUID serverAdvGen = null;
-    
-    /**
-     *  The number of referral advertisements being requested.
-     */
-    private int referralAdvs = Integer.MIN_VALUE;
-    
-    /**
-     *  The credential of the client.
-     */
-    private XMLElement credential = null;
-    
-    /**
-     *  The optional peer advertisement of the client.
-     */
-    private PeerAdvertisement clientAdv = null;
-    
-    /**
-     *  Expiration value for client peer advertisement. {@code Long.MIN_VALUE} 
-     *  means that no value has been specified.
-     */
-    private long clientAdvExp = Integer.MIN_VALUE;
-    
-    /**
-     *  Options
-     */
-    private List options = new ArrayList();
-    
-    /**
-     *  New LeaseRequestMsg
-     */
-    public LeaseRequestMsg() {}
-    
-    /**
-     * Construct from a XLMElement
-     **/
-    public LeaseRequestMsg(Element root) {
-        if (!XMLElement.class.isInstance(root)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-        }
-        
-        XMLElement doc = (XMLElement) root;
-        
-        String doctype = doc.getName();
-        
-        String typedoctype = "";
-        Attribute itsType = doc.getAttribute("type");
-        
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-        
-        if (!doc.getName().equals(getMessageType())) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + " from doc containing a '" + doc.getName()
-                    + "'. Should be : " + getMessageType());
-        }
-        
-        Enumeration eachAttr = doc.getAttributes();
-        
-        while (eachAttr.hasMoreElements()) {
-            Attribute aLeaseReqAttr = (Attribute) eachAttr.nextElement();
-            
-            if (REQUESTED_LEASE_ATTR.equals(aLeaseReqAttr.getName())) {
-                requestedLease = Long.valueOf(aLeaseReqAttr.getValue());
-            } else if (SERVER_ADV_GEN_ATTR.equals(aLeaseReqAttr.getName())) {
-                serverAdvGen = UUID.fromString(aLeaseReqAttr.getValue());
-            } else if (CLIENT_ID_ATTR.equals(aLeaseReqAttr.getName())) {
-                try {
-                    URI srcURI = new URI(aLeaseReqAttr.getValue());
-                    ID srcID = IDFactory.fromURI(srcURI);
-                    
-                    setClientID(srcID);
-                } catch (URISyntaxException badID) {
-                    IllegalArgumentException iae = new IllegalArgumentException("Bad ID in message");
-                    
-                    iae.initCause(badID);
-                    throw iae;
-                }
-            } else if ("type".equals(aLeaseReqAttr.getName())) {
-                ;
-            } else if ("xmlns:jxta".equals(aLeaseReqAttr.getName())) {
-                ;
-            } else {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Unhandled Attribute: " + aLeaseReqAttr.getName());
-                }
-            }
-        }
-        
-        Enumeration elements = doc.getChildren();
-        
-        while (elements.hasMoreElements()) {
-            XMLElement elem = (XMLElement) elements.nextElement();
-            
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Unhandled Element: " + elem.toString());
-                }
-            }
-        }
-        
-        // Sanity Check!!!
-        
-        if (null == getClientID()) {
-            throw new IllegalArgumentException("Missing client ID value.");
-        }
-        
-        if ((getRequestedLease() < 0) && (getRequestedLease() != Long.MIN_VALUE)) {
-            throw new IllegalArgumentException("Invalid requested lease duration.");
-        }
-        
-        if ((getReferralAdvs() < 0) && (getReferralAdvs() != Integer.MIN_VALUE)) {
-            throw new IllegalArgumentException("Invalid referral advertisements request value.");
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public Object clone() throws CloneNotSupportedException {
-        LeaseRequestMsg clone = (LeaseRequestMsg) super.clone();
-
-        clone.setClientID(getClientID());
-        clone.setServerAdvGen(getServerAdvGen());
-        clone.setRequestedLease(getRequestedLease());
-        clone.setReferralAdvs(getReferralAdvs());
-        clone.setCredential(getCredential());
-        return clone;
-    }
-    
-    /**
-     *  Returns the ID of the client making this request.
-     *
-     *  @return ID of the client.
-     */
-    public ID getClientID() {
-        return clientID;
-    }
-    
-    /**
-     *  Sets the ID of the client making this request.
-     *
-     *  @param clientID ID of the client.
-     */
-    public void setClientID(ID clientID) {
-        this.clientID = clientID;
-    }
-    
-    /**
-     *  Returns the advertisement generation of the server advertisement which
-     *  is known to the client. May be {@code null} to indicate that the client
-     *  does not have a previous version of the server advertisement.
-     *
-     *  @return The server advertisement generation.
-     */
-    public UUID getServerAdvGen() {
-        return serverAdvGen;
-    }
-    
-    /**
-     *  Sets the advertisement generation of the server advertisement which is
-     *  known to the client. May be {@code null} to indicate that the client
-     *  does not have a previous version of the server advertisement.
-     *
-     *  @param serverAdvGen The server advertisement generation.
-     */
-    public void setServerAdvGen(UUID serverAdvGen) {
-        this.serverAdvGen = serverAdvGen;
-    }
-    
-    /**
-     *  Return the duration of the lease being requested. The duration must be
-     *  a positive integer or {@code Long.MIN_VALUE} which indicates that no
-     *  lease is being requested.
-     *
-     *  @return The duration of the lease being requested.
-     */
-    public long getRequestedLease() {
-        return requestedLease;
-    }
-    
-    /**
-     *  Set the duration of the lease being requested. The duration must be
-     *  a positive integer or {@code Long.MIN_VALUE} which indicates that no
-     *  lease is being requested.
-     *
-     *  @param requestedLease The duration of the lease being requested.
-     */
-    public void setRequestedLease(long requestedLease) {
-        this.requestedLease = requestedLease;
-    }
-    
-    /**
-     *  Returns the number of referral advertisements requested by the client.
-     *  Must be a positive integer or {@code Integer.MIN_VALUE} which indicates
-     *  that the default number is requested.
-     * @return the number of referral advertisements requested by the client.
-     */
-    public int getReferralAdvs() {
-        return referralAdvs;
-    }
-    
-    /**
-     *  Sets the number of referral advertisements requested by the client.
-     *  Must be a positive integer or {@code Integer.MIN_VALUE} which indicates
-     *  that the default number is requested.
-     *
-     *  @param referralAdvs The number of referral advertisements requested.
-     */
-    public void setReferralAdvs(int referralAdvs) {
-        this.referralAdvs = referralAdvs;
-    }
-    
-    /**
-     *  Returns the credential of the client making this request in XML format.
-     *
-     *  @return The credential associated with this request if any. May be
-     *  {@code null} to indicate that no credential was provided.
-     */
-    public XMLElement getCredential() {
-        return (XMLElement) ((null != credential) ? StructuredDocumentUtils.copyAsDocument(credential) : null);
-    }
-    
-    /**
-     *  Sets the credential of the client making this request in XML format.
-     *
-     *  @param newCred The credential associated with this request if any. May
-     *  be {@code null} to indicate that no credential is being provided.
-     */
-    public void setCredential(XMLElement newCred) {
-        this.credential = (XMLElement) ((null != newCred) ? StructuredDocumentUtils.copyAsDocument(newCred) : null);
-    }
-    
-    /**
-     *  Our DOCTYPE
-     *
-     *  @return the type of this message.
-     **/
-    public static String getMessageType() {
-        return "jxta:LeaseRequestMsg";
-    }
-    
-    protected boolean handleElement(XMLElement elem) {
-        
-        if (CLIENT_CRED_TAG.equals(elem.getName())) {
-            credential = (XMLElement) StructuredDocumentUtils.copyAsDocument(elem);
-            
-            return true;
-        }
-        
-        String value = elem.getTextValue();
-        
-        if (null != value) {
-            value = value.trim();
-            
-            if (0 == value.length()) {
-                value = null;
-            }
-        }
-        
-        if (null == value) {
-            return false;
-        }
-        
-        return false;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    public Document getDocument(MimeMediaType mediaType) {
-        
-        if (null == getClientID()) {
-            throw new IllegalStateException("Missing client ID value.");
-        }
-        
-        if ((getRequestedLease() < 0) && (getRequestedLease() != Long.MIN_VALUE)) {
-            throw new IllegalStateException("Invalid requested lease duration.");
-        }
-        
-        if ((getReferralAdvs() < 0) && (getReferralAdvs() != Integer.MIN_VALUE)) {
-            throw new IllegalStateException("Invalid referral advertisements request value.");
-        }
-        
-        StructuredDocument msg = StructuredDocumentFactory.newStructuredDocument(mediaType, getMessageType());
-        
-        if (!(msg instanceof Attributable)) {
-            throw new UnsupportedOperationException("Only 'Attributable' document types are supported.");
-        }
-        
-        if (msg instanceof XMLDocument) {
-            ((XMLDocument) msg).addAttribute("xmlns:jxta", "http://jxta.org");
-        }
-        
-        ((Attributable) msg).addAttribute(CLIENT_ID_ATTR, getClientID().toString());
-        
-        if (Long.MIN_VALUE != getRequestedLease()) {
-            ((Attributable) msg).addAttribute(REQUESTED_LEASE_ATTR, Long.toString(getRequestedLease()));
-        }
-        
-        if (null != getServerAdvGen()) {
-            ((Attributable) msg).addAttribute(SERVER_ADV_GEN_ATTR, getServerAdvGen().toString());
-        }
-        
-        if (null != credential) {
-            StructuredDocumentUtils.copyElements(msg, msg, credential, CLIENT_CRED_TAG);
-        }
-        
-        return msg;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/LeaseResponseMsg.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/LeaseResponseMsg.java
deleted file mode 100644 (file)
index b029745..0000000
+++ /dev/null
@@ -1,626 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-import java.util.UUID;
-
-import java.net.URISyntaxException;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Attribute;
-import net.jxta.document.Attributable;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.protocol.RdvAdvertisement;
-
-
-/**
- * A Leasing Protocol Response Message.
- *
- * <p/><pre><code>
- * <xs:complexType name="LeaseResponseMessage">
- *   <xs:sequence>
- *     <xs:element name="credential" minOccurs="0" maxOccurs="1" type="jxta:Cred" />
- *     <xs:element name="serverAdv" minOccurs="0" maxOccurs="1">
- *       <xs:complexType>
- *         <xs:complexContent>
- *           <xs:extension  base="jxta:RdvAdvertisement">
- *             <xs:attribute name="serverAdvGen" use="required" type="xs:string" /> <!-- a UUID -->
- *             <xs:attribute name="expiration" use="required" type="xs:unsignedLong" />
- *           </xs:extension>
- *         </xs:complexContent>
- *       </xs:complexType>
- *     </xs:element>
- *     <xs:element name="referralAdv" minOccurs="0" maxOccurs="unbounded">
- *       <xs:complexType>
- *         <xs:complexContent>
- *           <xs:extension  base="jxta:RdvAdvertisement">
- *             <xs:attribute name="expiration" use="required" type="xs:unsignedLong" />
- *           </xs:extension>
- *         </xs:complexContent>
- *       </xs:complexType>
- *     </xs:element>
- *   </xs:sequence>
- *   <xs:attribute name="serverID" use="required" type="jxta:JXTAID" />
- *   <xs:attribute name="offeredLease" type="xs:unsignedLong" />
- * </xs:complexType>
- * </code></pre>
- *
- * @since JXTA 2.4
- */
-public class LeaseResponseMsg {
-    
-    /**
-     *  Log4J Logger
-     **/
-    private final static transient Logger LOG = Logger.getLogger(LeaseResponseMsg.class.getName());
-    
-    private final static String OFFERED_LEASE_ATTR = "offeredLease";
-    
-    private final static String SERVER_ID_ATTR = "serverID";
-    
-    private final static String SERVER_ADV_TAG = "serverAdv";
-    private final static String ADV_GEN_ATTR = "advGen";
-    private final static String ADV_EXP_ATTR = "expiration";
-    private final static String REFERRAL_ADV_TAG = "referralAdv";
-    
-    private final static String SERVER_CRED_TAG = "credential";
-    
-    /**
-     *  ID of the server providing this response.
-     */
-    private ID serverID = null;
-    
-    /**
-     *  The advertisement of the server providing this response.
-     */
-    private RdvAdvertisement serverAdv = null;
-    
-    /**
-     *  The expiration duration of the server advertisement.
-     */
-    private long serverAdvExp = Long.MIN_VALUE;
-    
-    /**
-     *  The advertisement generation of the server advertisement.
-     */
-    private UUID serverAdvGen = null;
-    
-    /**
-     *  Credential of the server.
-     */
-    private XMLElement credential = null;
-    
-    /**
-     *  Ordered list of referral advertisements.
-     */
-    private List<RdvAdvertisement> referralAdvs = new ArrayList<RdvAdvertisement>();
-    
-    /**
-     *  Ordered list of referral advertisement expirations. The order matches
-     *  the order of advertisements in {@link #referralAdvs}.
-     */
-    private List<Long> referralAdvExps = new ArrayList<Long>();
-    
-    /**
-     *  The duration of the offered lease. May also be {@code Long.MIN_VALUE} to
-     *  indicate that no lease is being offered.
-     */
-    private long offeredLease = Long.MIN_VALUE;
-    
-    /**
-     *  New LeaseResponseMsg
-     */
-    public LeaseResponseMsg() {}
-    
-    /**
-     * Construct from a StructuredDocument
-     * @param root the element
-     */
-    public LeaseResponseMsg(Element root) {
-        if (!XMLElement.class.isInstance(root)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-        }
-        
-        XMLElement doc = (XMLElement) root;
-        
-        String doctype = doc.getName();
-        
-        String typedoctype = "";
-        Attribute itsType = doc.getAttribute("type");
-        
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-        
-        if (!doc.getName().equals(getMessageType())) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + " from doc containing a '" + doc.getName()
-                    + "'. Should be : " + getMessageType());
-        }
-        
-        Enumeration eachAttr = doc.getAttributes();
-        
-        while (eachAttr.hasMoreElements()) {
-            Attribute aRdvAttr = (Attribute) eachAttr.nextElement();
-            
-            if (SERVER_ID_ATTR.equals(aRdvAttr.getName())) {
-                try {
-                    URI srcURI = new URI(aRdvAttr.getValue());
-                    ID srcID = IDFactory.fromURI(srcURI);
-                    
-                    setServerID(srcID);
-                } catch (URISyntaxException badID) {
-                    IllegalArgumentException iae = new IllegalArgumentException("Bad server ID in message");
-                    
-                    iae.initCause(badID);
-                    throw iae;
-                }
-            } else if (OFFERED_LEASE_ATTR.equals(aRdvAttr.getName())) {
-                offeredLease = Long.valueOf(aRdvAttr.getValue());
-            } else if ("type".equals(aRdvAttr.getName())) {
-                ;
-            } else if ("xmlns:jxta".equals(aRdvAttr.getName())) {
-                ;
-            } else {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Unhandled Attribute: " + aRdvAttr.getName());
-                }
-            }
-        }
-        
-        Enumeration elements = doc.getChildren();
-        
-        while (elements.hasMoreElements()) {
-            XMLElement elem = (XMLElement) elements.nextElement();
-            
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Unhandled Element: " + elem.toString());
-                }
-            }
-        }
-        
-        // Sanity Check!!!
-        
-        if (null == serverID) {
-            throw new IllegalArgumentException("Missing Server ID.");
-        }
-        
-        if ((null != serverAdv) && (null == serverAdvGen)) {
-            throw new IllegalArgumentException("Missing Server Advertisement Generation.");
-        }
-        
-        if ((null != serverAdv) && (Long.MIN_VALUE == serverAdvExp)) {
-            throw new IllegalArgumentException("Missing Server Advertisement Expiration.");
-        }
-        
-        if ((null != serverAdv) && (serverAdvExp <= 0)) {
-            throw new IllegalArgumentException("Illegal Server Advertisement Expiration.");
-        }
-        
-        if ((offeredLease < 0) && (Long.MIN_VALUE != offeredLease)) {
-            throw new IllegalArgumentException("Illegal Lease offered.");
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public Object clone()  throws CloneNotSupportedException {
-        LeaseResponseMsg clone = (LeaseResponseMsg) super.clone();
-
-        clone.setServerID(getServerID());
-        clone.setServerAdv(getServerAdv(), getServerAdvGen(), getServerAdvExp());
-        clone.setCredential(getCredential());
-        clone.addReferralAdvs(Arrays.asList(getReferralAdvs()), Arrays.asList(getReferralAdvExps()));
-        clone.setOfferedLease(getOfferedLease());
-        return clone;
-    }
-    
-    /**
-     *  Returns the ID of the server providing this response.
-     *
-     *  @return ID of the server.
-     */
-    public ID getServerID() {
-        return serverID;
-    }
-    
-    /**
-     *  Sets the ID of the server providing this response.
-     *
-     *  @param serverID ID of the server.
-     */
-    public void setServerID(ID serverID) {
-        this.serverID = serverID;
-    }
-    
-    /**
-     *  Returns the advertisement of the server providing this response.
-     *
-     *  @return The servers advertisement.
-     */
-    public RdvAdvertisement getServerAdv() {
-        return serverAdv;
-    }
-    
-    /**
-     *  Returns the advertisement generation of the server's advertisement.
-     *
-     *  @return The advertisement generation of the server's advertisement.
-     */
-    public UUID getServerAdvGen() {
-        return serverAdvGen;
-    }
-    
-    /**
-     *  Returns the advertisement expiration duration of the server's 
-     *  advertisement. Must be a positive integer.
-     *
-     *  @return The advertisement expiration duration of the server's advertisement.
-     */
-    public long getServerAdvExp() {
-        return serverAdvExp;
-    }
-    
-    /**
-     *  Sets the server advertisement and the associated advertisement 
-     *  generation and expiration.
-     *
-     *  @param serverAdv The servers advertisement.
-     *  @param serverAdvGen The advertisement generation of the server's 
-     *  advertisement. Must be a positive integer.
-     *  @param serverAdvExp The advertisement expiration duration of the 
-     *  server's advertisement.
-     */
-    public void setServerAdv(RdvAdvertisement serverAdv, UUID serverAdvGen, long serverAdvExp) {
-        this.serverAdv = serverAdv;
-        this.serverAdvGen = serverAdvGen;
-        this.serverAdvExp = serverAdvExp;
-    }
-    
-    /**
-     *  Returns an ordered list of the referral advertisements.
-     *
-     *  @return An ordered list of the referral advertisements.
-     */
-    public RdvAdvertisement[] getReferralAdvs() {
-        return referralAdvs.toArray(new RdvAdvertisement[referralAdvs.size()]);
-    }
-    
-    /**
-     *  Returns an ordered list of the referral advertisements expirations. The
-     *  order of the expirations matches the order of advertisements returned
-     *  by {@link #getReferralAdvs()}. Each entry is a positive integer.
-     *
-     *  @return An ordered list of the referral advertisements expirations.
-     */
-    public Long[] getReferralAdvExps() {
-        return referralAdvExps.toArray(new Long[referralAdvExps.size()]);
-    }
-    
-    /**
-     *  Adds a referral advertisement to the collection of referral 
-     *  advertisements. The advertisement is added at the end of the ordered
-     *  list.
-     *
-     *  @param referralAdv The referral advertisement.
-     *  @param referralAdvExp The expiration time of the referral advertisement.
-     *  The value must be a positive integer.
-     */
-    public void addReferralAdv(RdvAdvertisement referralAdv, long referralAdvExp) {
-        referralAdvs.add(referralAdv);
-        referralAdvExps.add(referralAdvExp);
-    }
-    
-    /**
-     *  Adds referral advertisements to the collection of referral 
-     *  advertisements. The advertisements are added at the end of the ordered 
-     *  list.
-     *
-     *  @param referralAdvs The referral advertisements.
-     *  @param referralAdvExps The expiration times of the referral advertisement.
-     *  The values must be a positive integer.
-     */
-    public void addReferralAdvs(List<RdvAdvertisement> referralAdvs, List<Long> referralAdvExps) {
-        this.referralAdvs.addAll(referralAdvs);
-        this.referralAdvExps.addAll(referralAdvExps);
-    }
-    
-    /**
-     *  Clears the list of referral advertisements.
-     */
-    public void clearReferralAdvs() {
-        referralAdvs.clear();
-        referralAdvExps.clear();
-    }
-    
-    /**
-     *  Returns the lease being offered. The value must be greater than or
-     *  equal to zero or the constant {@code Long.MIN_VALUE} which indicates
-     *  that no lease is being offered.
-     *
-     *  @return The lease being offered.
-     */
-    public long getOfferedLease() {
-        return offeredLease;
-    }
-    
-    /**
-     *  Sets the lease being offered. The value must be greater than or
-     *  equal to zero or the constant {@code Long.MIN_VALUE} which indicates
-     *  that no lease is being offered.
-     *
-     *  @param offeredLease The lease being offered.
-     */
-    public void setOfferedLease(long offeredLease) {
-        this.offeredLease = offeredLease;
-    }
-    
-    /**
-     *  Returns the credential of the server providing this response in XML 
-     *  format.
-     *
-     *  @return The credential associated with this response if any. May be 
-     *  {@code null} to indicate that no credential was provided.
-     */
-    public XMLElement getCredential() {
-        return (XMLElement) ((null != credential) ? StructuredDocumentUtils.copyAsDocument(credential) : null);
-    }
-    
-    /**
-     *  Sets the credential of the server providing this response in XML 
-     *  format.
-     *
-     *  @param newCred The credential associated with this response if any. May 
-     *  be {@code null} to indicate that no credential is being provided.
-     */
-    public void setCredential(XMLElement newCred) {
-        this.credential = (XMLElement) ((null != newCred) ? StructuredDocumentUtils.copyAsDocument(newCred) : null);
-    }
-    
-    /**
-     *  Our DOCTYPE
-     *
-     *  @return the type of this message.
-     */
-    public static String getMessageType() {
-        return "jxta:LeaseResponseMsg";
-    }
-    
-    /**
-     *  Process an element of the message XML document.
-     *
-     *  @param elem The element to process.
-     *  @return If {@code true} then the element was processed otherwise {@code false}.
-     */
-    protected boolean handleElement(XMLElement elem) {
-        
-        if (SERVER_ADV_TAG.equals(elem.getName())) {
-            Enumeration eachAttr = elem.getAttributes();
-            
-            while (eachAttr.hasMoreElements()) {
-                Attribute anAdvAttr = (Attribute) eachAttr.nextElement();
-                
-                if (ADV_GEN_ATTR.equals(anAdvAttr.getName())) {
-                    serverAdvGen = UUID.fromString(anAdvAttr.getValue());
-                } else if (ADV_EXP_ATTR.equals(anAdvAttr.getName())) {
-                    serverAdvExp = Long.valueOf(anAdvAttr.getValue());
-                } else if ("type".equals(anAdvAttr.getName())) {
-                    ;
-                } else if ("xmlns:jxta".equals(anAdvAttr.getName())) {
-                    ;
-                } else {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Unhandled Attribute: " + anAdvAttr.getName());
-                    }
-                }
-            }
-            
-            serverAdv = (RdvAdvertisement) AdvertisementFactory.newAdvertisement(elem);
-            return true;
-        } else if (REFERRAL_ADV_TAG.equals(elem.getName())) {
-            long expiration = Long.MIN_VALUE;
-            
-            Enumeration eachAttr = elem.getAttributes();
-            
-            while (eachAttr.hasMoreElements()) {
-                Attribute anAdvAttr = (Attribute) eachAttr.nextElement();
-                
-                if (ADV_EXP_ATTR.equals(anAdvAttr.getName())) {
-                    expiration = Long.valueOf(anAdvAttr.getValue());
-                } else if ("type".equals(anAdvAttr.getName())) {
-                    ;
-                } else if ("xmlns:jxta".equals(anAdvAttr.getName())) {
-                    ;
-                } else {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Unhandled Attribute: " + anAdvAttr.getName());
-                    }
-                }
-            }
-            
-            if (Long.MIN_VALUE == expiration) {
-                throw new IllegalArgumentException("Missing Referral Advertisement Expiration.");
-            }
-            
-            if (expiration <= 0) {
-                throw new IllegalArgumentException("Illegal Referral Advertisement Expiration.");
-            }
-            
-            RdvAdvertisement referralAdv = (RdvAdvertisement) AdvertisementFactory.newAdvertisement(elem);
-            
-            // Fix the embedded Route Adv. Often it does not contain a PeerID
-            // in the route because its redundant.
-            referralAdv.getRouteAdv().setDestPeerID(referralAdv.getPeerID());
-
-            referralAdvs.add(referralAdv);
-            referralAdvExps.add(expiration);
-            return true;
-        } else if (SERVER_CRED_TAG.equals(elem.getName())) {
-            credential = (XMLElement) StructuredDocumentUtils.copyAsDocument(elem);
-            
-            return true;
-        }
-        
-        return false;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public Document getDocument(MimeMediaType mediaType) {
-        if (null == serverID) {
-            throw new IllegalStateException("Missing Server ID.");
-        }
-        
-        if ((null != serverAdv) && (null == serverAdvGen)) {
-            throw new IllegalStateException("Missing Server Advertisement Generation.");
-        }
-        
-        if ((null != serverAdv) && (Long.MIN_VALUE == serverAdvExp)) {
-            throw new IllegalStateException("Missing Server Advertisement Expiration.");
-        }
-        
-        if ((null != serverAdv) && (serverAdvExp <= 0)) {
-            throw new IllegalStateException("Illegal Server Advertisement Expiration.");
-        }
-        
-        if ((offeredLease < 0) && (Long.MIN_VALUE != offeredLease)) {
-            throw new IllegalStateException("Illegal Lease offered.");
-        }
-        
-        StructuredDocument msg = StructuredDocumentFactory.newStructuredDocument(mediaType, getMessageType());
-        
-        if (!(msg instanceof Attributable)) {
-            throw new UnsupportedOperationException("Only 'Attributable' document types are supported.");
-        }
-        
-        if (msg instanceof XMLDocument) {
-            ((XMLDocument) msg).addAttribute("xmlns:jxta", "http://jxta.org");
-        }
-        
-        ((Attributable) msg).addAttribute(SERVER_ID_ATTR, getServerID().toString());
-        
-        if (Long.MIN_VALUE != offeredLease) {
-            ((Attributable) msg).addAttribute(OFFERED_LEASE_ATTR, Long.toString(getOfferedLease()));
-        }
-        
-        if (null != credential) {
-            StructuredDocumentUtils.copyElements(msg, msg, credential, SERVER_CRED_TAG);
-        }
-        
-        Element e;
-        
-        if (null != serverAdv) {
-            e = StructuredDocumentUtils.copyElements(msg, msg, (StructuredDocument) serverAdv.getDocument(mediaType)
-                    ,
-                    SERVER_ADV_TAG);
-            
-            if (null != getServerAdvGen()) {
-                ((Attributable) e).addAttribute(ADV_GEN_ATTR, getServerAdvGen().toString());
-            }
-            
-            if (Long.MIN_VALUE != getServerAdvExp()) {
-                ((Attributable) e).addAttribute(ADV_EXP_ATTR, Long.toString(getServerAdvExp()));
-            }
-        }
-        
-        Iterator<Long> eachReferralAdvExp = referralAdvExps.iterator();
-
-        for (RdvAdvertisement aReferralAdv : referralAdvs) {
-            e = StructuredDocumentUtils.copyElements(msg, msg, (StructuredDocument) aReferralAdv.getDocument(mediaType)
-                    ,
-                    REFERRAL_ADV_TAG);
-            
-            long expiration = eachReferralAdvExp.next();
-            
-            if (Long.MIN_VALUE == expiration) {
-                throw new IllegalStateException("Missing Referral Advertisement Expiration.");
-            }
-            
-            if (expiration <= 0) {
-                throw new IllegalStateException("Illegal Referral Advertisement Expiration.");
-            }
-            
-            ((Attributable) e).addAttribute(ADV_EXP_ATTR, Long.toString(expiration));
-        }
-        
-        return msg;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/LimitedRangeRdvMsg.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/LimitedRangeRdvMsg.java
deleted file mode 100644 (file)
index 57b3d74..0000000
+++ /dev/null
@@ -1,473 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import net.jxta.document.*;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.peer.PeerID;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Enumeration;
-
-
-/**
- * The LimitedRangeRdv walk header message.
- * <p/>
- * <p/><pre><code>
- * &lt;xs:simpleType name="WalkDirection">
- *   &lt;xs:restriction base="xs:unsignedInt">
- *     &lt;!-- UP -->
- *     &lt;xs:enumeration value="1" />
- *     &lt;!-- DOWN -->
- *     &lt;xs:enumeration value="2" />
- *     &lt;!-- BOTH -->
- *     &lt;xs:enumeration value="3" />
- *   &lt;/xs:restriction>
- * &lt;/xs:simpleType>
- * <p/>
- * &lt;xs:complexType name="LimitedRangeRdvMessage">
- *   &lt;xs:sequence>
- *     &lt;xs:element name="TTL" type="xs:unsignedInt" />
- *     &lt;xs:element name="Dir" type="jxta:WalkDirection" />
- *     &lt;xs:element name="SrcPeerID" type="jxta:JXTAID" />
- *     &lt;xs:element name="SrcSvcName" type="xs:string" />
- *     &lt;xs:element name="SrcSvcParams" minOccurs="0" type="xs:string" />
- *   &lt;/xs:sequence>
- * &lt;/xs:complexType>
- * </code></pre>
- *
- * @see net.jxta.impl.rendezvous.limited.LimitedRangeWalk
- * @see net.jxta.impl.rendezvous.limited.LimitedRangeWalker
- * @see net.jxta.impl.rendezvous.limited.LimitedRangeGreeter
- * @since JXTA 2.0
- */
-public class LimitedRangeRdvMsg {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(LimitedRangeRdvMsg.class.getName());
-
-    private final static String TTL_ELEMENT = "TTL";
-    private final static String DIRECTION_ELEMENT = "Dir";
-    private final static String SRCPEERID_ELEMENT = "SrcPeerID";
-    private final static String SRCSVCNAME_ELEMENT = "SrcSvcName";
-    private final static String SRCSVCPARAM_ELEMENT = "SrcSvcParams";
-
-    private int ttl = 0;
-    private WalkDirection direction = null;
-    private PeerID srcPeerID = null;
-    private String srcSvcName = null;
-    private String srcSvcParams = null;
-
-    /**
-     * Enumeration of possible walk directions.
-     */
-    public enum WalkDirection {
-        UP(1), DOWN(2), BOTH(3);
-
-        /**
-         * The protocol integer value associated with this direction.
-         */
-        private final int proto_direction;
-
-        private WalkDirection(int direction) {
-            proto_direction = direction;
-        }
-
-        /**
-         * Convert a walk code as used by the standard walker protocol to a
-         * direction object.
-         *
-         * @param code the protocol code
-         * @return A direction object.
-         * @throws IllegalArgumentException For illegal protocol codes.
-         */
-        public static WalkDirection toWalkDirection(int code) {
-            switch (code) {
-            case 1:
-                return UP;
-
-            case 2:
-                return DOWN;
-
-            case 3:
-                return BOTH;
-
-            default:
-                throw new IllegalArgumentException("Illegal direction");
-            }
-        }
-
-        /**
-         * Return the protocol code used by the standard walker protocol for
-         * this WalkDirection.
-         *
-         * @return the walk direction as a numeric value for use in protocol
-         *         messages.
-         */
-        public int toProtocolCode() {
-            return proto_direction;
-        }
-    }
-
-    /**
-     * Constructor
-     */
-    public LimitedRangeRdvMsg() {}
-
-    /**
-     * Construct from a StructuredDocument
-     *
-     * @param root the element
-     */
-    public LimitedRangeRdvMsg(Element root) {
-        if (!XMLElement.class.isInstance(root)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports XMLElement");
-        }
-
-        XMLElement doc = (XMLElement) root;
-
-        if (!doc.getName().equals(getMessageType())) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + " from doc containing a '" + doc.getName()
-                    + "'. Should be : " + getMessageType());
-        }
-
-        Enumeration elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            XMLElement elem = (XMLElement) elements.nextElement();
-
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Unhandled Element: " + elem);
-                }
-            }
-        }
-
-        // Sanity check time!
-        if (getTTL() < 1) {
-            throw new IllegalArgumentException("Illegal TTL value.");
-        }
-
-        if (null == getDirection()) {
-            throw new IllegalArgumentException("No Direction specified.");
-        }
-
-        if (null == getSrcPeerID()) {
-            throw new IllegalArgumentException("No source peer id specified.");
-        }
-
-        if (null == getSrcSvcName()) {
-            throw new IllegalArgumentException("No source service name specified.");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public LimitedRangeRdvMsg clone() {
-
-        try {
-            LimitedRangeRdvMsg clone = (LimitedRangeRdvMsg) super.clone();
-
-            clone.setSrcPeerID(getSrcPeerID());
-            clone.setDirection(getDirection());
-            clone.setTTL(getTTL());
-            clone.setSrcSvcName(getSrcSvcName());
-            clone.setSrcSvcParams(getSrcSvcParams());
-
-            return clone;
-        } catch (CloneNotSupportedException impossible) {
-            throw new Error("Object.clone() threw CloneNotSupportedException", impossible);
-        }
-    }
-
-    /**
-     * Get the TTL
-     *
-     * @return Time To Live
-     */
-    public int getTTL() {
-        return ttl;
-    }
-
-    /**
-     * set the TTL
-     *
-     * @param ttl TTL
-     */
-    public void setTTL(int ttl) {
-        this.ttl = ttl;
-    }
-
-    /**
-     * Get the direction the message will take
-     *
-     * @return UP, DOWN or BOTH
-     */
-    public WalkDirection getDirection() {
-        return direction;
-    }
-
-    /**
-     * Set the direction the message will take
-     *
-     * @param dir direction
-     */
-    public void setDirection(WalkDirection dir) {
-        direction = dir;
-    }
-
-    /**
-     * Get the Source Service Name (listening for the response)
-     *
-     * @return Source Service Name
-     */
-    public String getSrcSvcName() {
-        return srcSvcName;
-    }
-
-    /**
-     * Set the Source Service Name (listening for the response)
-     *
-     * @param srcSvcName Source Service Name
-     */
-    public void setSrcSvcName(String srcSvcName) {
-        this.srcSvcName = srcSvcName;
-    }
-
-    /**
-     * Get the Source Service Param (listening for the response)
-     *
-     * @return Source Service Param
-     */
-    public String getSrcSvcParams() {
-        return srcSvcParams;
-    }
-
-    /**
-     * Set the Source Service Params (listening for the response)
-     *
-     * @param srcSvcParams Source Service Params
-     */
-    public void setSrcSvcParams(String srcSvcParams) {
-        this.srcSvcParams = srcSvcParams;
-    }
-
-    /**
-     * Get the Source PeerID (walk originiator)
-     *
-     * @return Source PeerID
-     */
-    public ID getSrcPeerID() {
-        return srcPeerID;
-    }
-
-    /**
-     * Set the Source PeerID (walk originiator)
-     *
-     * @param srcPeerID Source PeerID
-     */
-    public void setSrcPeerID(ID srcPeerID) {
-        this.srcPeerID = (PeerID) srcPeerID;
-    }
-
-    /**
-     * Our DOCTYPE
-     *
-     * @return the type of this message.
-     */
-    public static String getMessageType() {
-        return "jxta:LimitedRangeRdvMessage";
-    }
-
-    /**
-     * Process an individual element from the document during parse. Normally,
-     * implementations will allow the base advertisments a chance to handle the
-     * element before attempting ot handle the element themselves. ie.
-     * <p/>
-     * <p/><pre><code>
-     *  protected boolean handleElement( Element elem ) {
-     * <p/>
-     *      if ( super.handleElement() ) {
-     *           // it's been handled.
-     *           return true;
-     *           }
-     * <p/>
-     *      <i>... handle elements here ...</i>
-     * <p/>
-     *      // we don't know how to handle the element
-     *      return false;
-     *      }
-     *  </code></pre>
-     *
-     * @param elem the element to be processed.
-     * @return true if the element was recognized, otherwise false.
-     */
-    protected boolean handleElement(XMLElement elem) {
-
-        String value = elem.getTextValue();
-
-        if (null != value) {
-            value = value.trim();
-
-            if (0 == value.length()) {
-                value = null;
-            }
-        }
-
-        if (null == value) {
-            return false;
-        }
-
-        if (elem.getName().equals(TTL_ELEMENT)) {
-            setTTL(Integer.parseInt(value));
-            return true;
-        }
-
-        if (elem.getName().equals(DIRECTION_ELEMENT)) {
-            int direction = Integer.parseInt(value);
-
-            setDirection(LimitedRangeRdvMsg.WalkDirection.toWalkDirection(direction));
-            return true;
-        }
-
-        if (elem.getName().equals(SRCPEERID_ELEMENT)) {
-            try {
-                URI srcURI = new URI(value);
-                ID srcID = IDFactory.fromURI(srcURI);
-
-                setSrcPeerID(srcID);
-            } catch (URISyntaxException badID) {
-                IllegalArgumentException iae = new IllegalArgumentException("Bad ID in message");
-
-                iae.initCause(badID);
-                throw iae;
-            }
-            return true;
-        }
-
-        if (elem.getName().equals(SRCSVCNAME_ELEMENT)) {
-            setSrcSvcName(value);
-            return true;
-        }
-
-        if (elem.getName().equals(SRCSVCPARAM_ELEMENT)) {
-            setSrcSvcParams(value);
-            return true;
-        }
-
-        return false;
-    }
-
-    /**
-     * @inheritDoc
-     */
-    public Document getDocument(MimeMediaType mediaType) {
-
-        if (getTTL() < 1) {
-            throw new IllegalStateException("Illegal TTL value.");
-        }
-
-        if (null == getDirection()) {
-            throw new IllegalStateException("No Direction specified.");
-        }
-
-        if (null == getSrcPeerID()) {
-            throw new IllegalStateException("No source peer id specified.");
-        }
-
-        if (null == getSrcSvcName()) {
-            throw new IllegalStateException("No source service name specified.");
-        }
-
-        StructuredDocument msg = StructuredDocumentFactory.newStructuredDocument(mediaType, getMessageType());
-
-        if (msg instanceof XMLDocument) {
-            ((XMLDocument) msg).addAttribute("xmlns:jxta", "http://jxta.org");
-        }
-
-        Element e = msg.createElement(TTL_ELEMENT, Integer.toString(getTTL()));
-
-        msg.appendChild(e);
-
-        e = msg.createElement(DIRECTION_ELEMENT, Integer.toString(getDirection().toProtocolCode()));
-        msg.appendChild(e);
-
-        e = msg.createElement(SRCPEERID_ELEMENT, getSrcPeerID().toString());
-        msg.appendChild(e);
-
-        e = msg.createElement(SRCSVCNAME_ELEMENT, getSrcSvcName());
-        msg.appendChild(e);
-
-        if (getSrcSvcParams() != null) {
-            e = msg.createElement(SRCSVCPARAM_ELEMENT, getSrcSvcParams());
-            msg.appendChild(e);
-        }
-
-        return msg;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/ModuleClassAdv.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/ModuleClassAdv.java
deleted file mode 100644 (file)
index 0575bd2..0000000
+++ /dev/null
@@ -1,263 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import net.jxta.document.*;
-import net.jxta.id.IDFactory;
-import net.jxta.platform.ModuleClassID;
-import net.jxta.protocol.ModuleClassAdvertisement;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Enumeration;
-
-
-/**
- * Provides XML serialization support for ModuleClassAdvertisement matching the
- * schema defined by the JXTA Core Specification.
- * <p/>
- * <p/><pre>
- *  &lt;xs:complexType name="MCA">
- *    &lt;xs:sequence>
- *      &lt;xs:element name="MCID" type="jxta:JXTAID" />
- *      &lt;xs:element name="Name" type="xs:string" minOccurs="0" />
- *      &lt;xs:element name="Desc" type="xs:anyType" minOccurs="0" />
- *    &lt;/xs:sequence>
- *  &lt;/xs:complexType>
- *  </pre>
- *
- * @see net.jxta.document.Advertisement
- * @see net.jxta.protocol.ModuleSpecAdvertisement
- * @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#advert-mca> target='_blank'>JXTA Protocols Specification - Advertisements : Module Class Advertisement</a>
- */
-public class ModuleClassAdv extends ModuleClassAdvertisement {
-
-    /**
-     * Logger
-     */
-    private static final Logger LOG = Logger.getLogger(ModuleClassAdv.class.getName());
-
-    private static final String nameTag = "Name";
-    private static final String idTag = "MCID";
-    private static final String descTag = "Desc";
-    private static final String[] fields = {nameTag, idTag};
-
-    public static class Instantiator implements AdvertisementFactory.Instantiator {
-
-        /**
-         * {@inheritDoc}
-         */
-        public String getAdvertisementType() {
-            return ModuleClassAdvertisement.getAdvertisementType();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance() {
-            return new ModuleClassAdv();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance(Element root) {
-            if (!XMLElement.class.isInstance(root)) {
-                throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-            }
-
-            return new ModuleClassAdv((XMLElement) root);
-        }
-    }
-
-    /**
-     *  Private constructor for new instances. Use the instantiator.
-     */
-    private ModuleClassAdv() {}
-
-    /**
-     *  Private constructor for xml serialized instances. Use the instantiator.
-     *  
-     *  @param doc The XML serialization of the advertisement.
-     */
-    private ModuleClassAdv(XMLElement doc) {
-
-        String doctype = doc.getName();
-
-        String typedoctype = "";
-        Attribute itsType = doc.getAttribute("type");
-
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-
-        if (!doctype.equals(getAdvertisementType()) && !getAdvertisementType().equals(typedoctype)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-
-        Enumeration<XMLElement> elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            XMLElement elem = elements.nextElement();
-
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Unhandled Element: " + elem.toString());
-                }
-            }
-        }
-
-        // Sanity Check!!!
-        if (null == getModuleClassID()) {
-            throw new IllegalArgumentException("Module Class ID was not specified.");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected boolean handleElement(Element raw) {
-
-        if (super.handleElement(raw)) {
-            return true;
-        }
-
-        XMLElement elem = (XMLElement) raw;
-
-        if (elem.getName().equals(nameTag)) {
-            setName(elem.getTextValue());
-            return true;
-        }
-
-        if (elem.getName().equals(descTag)) {
-            setDesc(elem);
-            return true;
-        }
-
-        if (elem.getName().equals(idTag)) {
-            try {
-                URI clID = new URI(elem.getTextValue());
-
-                setModuleClassID((ModuleClassID) IDFactory.fromURI(clID));
-            } catch (URISyntaxException badID) {
-                throw new IllegalArgumentException("Bad mcid in advertisement");
-            } catch (ClassCastException badID) {
-                throw new IllegalArgumentException("Unusable mcid in advertisement");
-            }
-            return true;
-        }
-
-        return false;
-
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Document getDocument(MimeMediaType encodeAs) {
-        if (null == getModuleClassID()) {
-            throw new IllegalStateException("Module Class ID was not specified.");
-        }
-
-        StructuredDocument adv = (StructuredDocument) super.getDocument(encodeAs);
-
-        Element e;
-
-        e = adv.createElement(idTag, getModuleClassID().toString());
-        adv.appendChild(e);
-
-        // name is optional
-        String name = getName();
-
-        if (null != name) {
-            e = adv.createElement(nameTag, name);
-            adv.appendChild(e);
-        }
-
-        // desc is optional
-        StructuredDocument desc = getDesc();
-
-        if (desc != null) {
-            StructuredDocumentUtils.copyElements(adv, adv, desc);
-        }
-
-        return adv;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String[] getIndexFields() {
-        return fields;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/ModuleImplAdv.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/ModuleImplAdv.java
deleted file mode 100644 (file)
index 6dea104..0000000
+++ /dev/null
@@ -1,344 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import net.jxta.document.*;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.platform.ModuleSpecID;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Enumeration;
-
-
-/**
- * Provides XML serialization support for ModuleImplAdvertisement matching the
- * schema defined by the JXTA Core Specification.
- * <p/>
- * <p/><pre>
- * &lt;xs:complexType name="MIA">
- *   &lt;xs:sequence>
- *     &lt;xs:element name="MSID" type="jxta:JXTAID"/>
- *     &lt;xs:element name="Comp" type="xs:anyType"/>
- *     &lt;xs:element name="Code" type="xs:anyType"/>
- *     &lt;xs:element name="PURI" type="xs:anyURI" minOccurs="0"/>
- *     &lt;xs:element name="Prov" type="xs:string" minOccurs="0"/>
- *     &lt;xs:element name="Desc" type="xs:anyType" minOccurs="0"/>
- *     &lt;xs:element name="Parm" type="xs:anyType" minOccurs="0"/>
- *   &lt;/xs:sequence>
- * &lt;/xs:complexType>
- * </pre>
- *
- * @see net.jxta.document.Advertisement
- * @see net.jxta.protocol.ModuleImplAdvertisement
- * @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#advert-mia> target='_blank'>JXTA Protocols Specification - Advertisements : Module Implementation Advertisement</a>
- */
-public class ModuleImplAdv extends ModuleImplAdvertisement {
-
-    /**
-     * Log4J Logger
-     */
-    private static final Logger LOG = Logger.getLogger(ModuleImplAdv.class.getName());
-
-    private static final String msidTag = "MSID";
-    private static final String compTag = "Comp";
-    private static final String codeTag = "Code";
-    private static final String uriTag = "PURI";
-    private static final String provTag = "Prov";
-    private static final String descTag = "Desc";
-    private static final String paramTag = "Parm";
-    private static final String[] INDEXFIELDS = { msidTag};
-
-    /**
-     * Create new instances of ModuleImplAdv
-     */
-    public final static class Instantiator implements AdvertisementFactory.Instantiator {
-
-        /**
-         * {@inheritDoc}
-         */
-        public String getAdvertisementType() {
-            return ModuleImplAdv.getAdvertisementType();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance() {
-            return new ModuleImplAdv();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance(Element root) {
-            if (!XMLElement.class.isInstance(root)) {
-                throw new IllegalArgumentException(getClass().getName() + " only supports XMLElement");
-            }
-
-            return new ModuleImplAdv((XMLElement) root);
-        }
-    }
-
-    /**
-     * Construct a new instance.
-     */
-    private ModuleImplAdv() {}
-
-    /**
-     * Construct an instance from a document.
-     *
-     * @param root The portion of a document containing the ModuleImplAdv.
-     */
-    private ModuleImplAdv(XMLElement doc) {
-        String doctype = doc.getName();
-
-        String typedoctype = "";
-        Attribute itsType = doc.getAttribute("type");
-
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-
-        if (!doctype.equals(getAdvertisementType()) && !getAdvertisementType().equals(typedoctype)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-
-        Enumeration elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            XMLElement elem = (XMLElement) elements.nextElement();
-
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Unhandled Element: " + elem.toString());
-                }
-            }
-        }
-
-        // Sanity Check!!!
-
-        ID moduleID = getModuleSpecID();
-
-        if ((null == moduleID) || (moduleID.equals(ID.nullID))) {
-            throw new IllegalArgumentException("Module Spec ID was not initialized by advertisement");
-        }
-
-        if (null == getCode() || (0 == getCode().length())) {
-            throw new IllegalArgumentException("Code was not initialized by advertisement");
-        }
-
-        Element compat = getCompat();
-
-        if (null == compat) {
-            throw new IllegalArgumentException("Compatibility statement was not initialized by advertisement");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected boolean handleElement(Element raw) {
-
-        if (super.handleElement(raw)) {
-            return true;
-        }
-
-        XMLElement elem = (XMLElement) raw;
-
-        String nm = elem.getName();
-
-        if (nm.equals(msidTag)) {
-            try {
-                URI spID = new URI(elem.getTextValue());
-
-                setModuleSpecID((ModuleSpecID) IDFactory.fromURI(spID));
-            } catch (URISyntaxException badID) {
-                throw new IllegalArgumentException("Bad module spec ID in advertisement");
-            } catch (ClassCastException badID) {
-                throw new IllegalArgumentException("Unusable ID in advertisement");
-            }
-            return true;
-        }
-
-        if (nm.equals(compTag)) {
-            // setCompat keeps a copy a stand alone document.
-            setCompat(elem);
-            return true;
-        }
-
-        if (nm.equals(codeTag)) {
-            setCode(elem.getTextValue());
-            return true;
-        }
-
-        if (nm.equals(uriTag)) {
-            setUri(elem.getTextValue());
-            return true;
-        }
-
-        if (nm.equals(provTag)) {
-            setProvider(elem.getTextValue());
-            return true;
-        }
-
-        if (nm.equals(descTag)) {
-            setDesc(elem);
-            return true;
-        }
-
-        if (nm.equals(paramTag)) {
-            // setParam keeps a copy of this element as a standalone document.
-            setParam(elem);
-            return true;
-        }
-
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Document getDocument(MimeMediaType encodeAs) {
-        StructuredDocument adv = (StructuredDocument) super.getDocument(encodeAs);
-
-        // sanity check time!
-
-        ID moduleID = getModuleSpecID();
-
-        if ((null == moduleID) || (moduleID.equals(ID.nullID))) {
-            throw new IllegalStateException("Module Spec ID is not initialized.");
-        }
-
-        if (null == getCode() || (0 == getCode().length())) {
-            throw new IllegalStateException("Code is not initialized.");
-        }
-
-        Element compat = getCompatPriv();
-
-        if (null == compat) {
-            throw new IllegalStateException("Compatibility statement is not initialized.");
-        }
-
-        // create the document
-
-        Element e;
-
-        e = adv.createElement(msidTag, getModuleSpecID().toString());
-        adv.appendChild(e);
-
-        // desc is optional
-        StructuredDocument desc = getDesc();
-
-        if (desc != null) {
-            StructuredDocumentUtils.copyElements(adv, adv, desc);
-        }
-
-        // Copy the compat document as an element of adv.
-        StructuredDocumentUtils.copyElements(adv, adv, compat, compTag);
-
-        if (getCode() != null) {
-            e = adv.createElement(codeTag, getCode());
-            adv.appendChild(e);
-        }
-
-        if (getUri() != null) {
-            e = adv.createElement(uriTag, getUri());
-            adv.appendChild(e);
-        }
-
-        if (getProvider() != null) {
-            e = adv.createElement(provTag, getProvider());
-            adv.appendChild(e);
-        }
-
-        Element param = getParamPriv();
-
-        // Copy the param document as an element of adv.
-        if (param != null) {
-            // Force the element to be named "Parm" even if that is not
-            // the name of paramDoc.
-            StructuredDocumentUtils.copyElements(adv, adv, param, paramTag);
-        }
-        return adv;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String[] getIndexFields() {
-        return INDEXFIELDS;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/ModuleSpecAdv.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/ModuleSpecAdv.java
deleted file mode 100644 (file)
index cdb84b5..0000000
+++ /dev/null
@@ -1,376 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import net.jxta.document.*;
-import net.jxta.id.IDFactory;
-import net.jxta.platform.ModuleSpecID;
-import net.jxta.protocol.ModuleSpecAdvertisement;
-import net.jxta.protocol.PipeAdvertisement;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Enumeration;
-
-
-/**
- * Provides XML serialization support for ModuleSpecAdvertisement matching the
- * schema defined by the JXTA Core Specification.
- * <p/>
- * <p/><pre>
- *  &lt;xs:complexType name="MSA">
- *    &lt;xs:sequence>
- *      &lt;xs:element name="MSID" type="jxta:JXTAID" />
- *      &lt;xs:element name="Name" type="xs:string" minOccurs="0" />
- *      &lt;xs:element name="Desc" type="xs:anyType" minOccurs="0" />
- *      &lt;xs:element name="Crtr" type="xs:string" minOccurs="0" />
- *      &lt;xs:element name="SURI" type="xs:anyURI" minOccurs="0" />
- *      &lt;xs:element name="Vers" type="xs:string" />
- *      &lt;xs:element name="Parm" type="xs:anyType" minOccurs="0" />
- *      &lt;xs:element ref="jxta:PipeAdvertisement" minOccurs="0" />
- *      &lt;xs:element name="Proxy" type="xs:anyURI" minOccurs="0" />
- *      &lt;xs:element name="Auth" type="jxta:JXTAID" minOccurs="0" />
- *    &lt;/xs:sequence>
- *  &lt;/xs:complexType>
- * </pre>
- *
- * @see net.jxta.document.Advertisement
- * @see net.jxta.protocol.ModuleSpecAdvertisement
- * @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#advert-msa> target='_blank'>JXTA Protocols Specification - Advertisements : Module Specification Advertisement</a>
- */
-public class ModuleSpecAdv extends ModuleSpecAdvertisement {
-
-    /**
-     * Logger
-     */
-    private static final Logger LOG = Logger.getLogger(ModuleSpecAdv.class.getName());
-
-    private static final String idTag = "MSID";
-    private static final String nameTag = "Name";
-    private static final String creatorTag = "Crtr";
-    private static final String uriTag = "SURI";
-    private static final String versTag = "Vers";
-    private static final String descTag = "Desc";
-    private static final String paramTag = "Parm";
-    private static final String proxyIdTag = "Proxy";
-    private static final String authIdTag = "Auth";
-    private static final String[] fields = { nameTag, idTag};
-
-    public static class Instantiator implements AdvertisementFactory.Instantiator {
-
-        /**
-         * {@inheritDoc}
-         */
-
-        public String getAdvertisementType() {
-            return ModuleSpecAdv.getAdvertisementType();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-
-        public Advertisement newInstance() {
-            return new ModuleSpecAdv();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-
-        public Advertisement newInstance(net.jxta.document.Element root) {
-            if (!XMLElement.class.isInstance(root)) {
-                throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-            }
-
-            return new ModuleSpecAdv((XMLElement) root);
-        }
-    }
-
-    /**
-     *  Private constructor for new instances. Use the instantiator.
-     */
-    private ModuleSpecAdv() {}
-
-    /**
-     *  Private constructor for xml serialized instances. Use the instantiator.
-     *  
-     *  @param doc The XML serialization of the advertisement.
-     */
-    private ModuleSpecAdv(XMLElement doc) {
-        String doctype = doc.getName();
-
-        String typedoctype = "";
-        Attribute itsType = doc.getAttribute("type");
-
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-
-        if (!doctype.equals(getAdvertisementType()) && !getAdvertisementType().equals(typedoctype)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-
-        Enumeration elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            XMLElement elem = (XMLElement) elements.nextElement();
-
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Unhandled Element: " + elem.toString());
-                }
-            }
-        }
-
-        // Sanity Check!!!
-        if (null == getModuleSpecID()) {
-            throw new IllegalArgumentException("Module Spec Advertisement did not contain a module spec id.");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected boolean handleElement(Element raw) {
-
-        if (super.handleElement(raw)) {
-            return true;
-        }
-
-        XMLElement elem = (XMLElement) raw;
-
-        String nm = elem.getName();
-
-        if (nm.equals(nameTag)) {
-            setName(elem.getTextValue());
-            return true;
-        }
-
-        if (nm.equals(descTag)) {
-            setDesc(elem);
-            return true;
-        }
-
-        if (nm.equals(idTag)) {
-            try {
-                URI specID = new URI(elem.getTextValue());
-
-                setModuleSpecID((ModuleSpecID) IDFactory.fromURI(specID));
-            } catch (URISyntaxException badID) {
-                throw new IllegalArgumentException("Bad msid in advertisement");
-            } catch (ClassCastException badID) {
-                throw new IllegalArgumentException("Unusable msid in advertisement");
-            }
-            return true;
-        }
-
-        if (nm.equals(creatorTag)) {
-            setCreator(elem.getTextValue());
-            return true;
-        }
-
-        if (nm.equals(uriTag)) {
-            setSpecURI(elem.getTextValue());
-            return true;
-        }
-
-        if (nm.equals(versTag)) {
-            setVersion(elem.getTextValue());
-            return true;
-        }
-
-        if (nm.equals(paramTag)) {
-            // Copy the element into a complete new document
-            // which type matches the element name. There is no
-            // API Advertisement for it, each module implementation
-            // may have its own Advertisement subclass for its param.
-            setParam(elem);
-            return true;
-        }
-
-        if (nm.equals(proxyIdTag)) {
-            try {
-                URI spID = new URI(elem.getTextValue());
-
-                setProxySpecID((ModuleSpecID) IDFactory.fromURI(spID));
-            } catch (URISyntaxException badID) {
-                throw new IllegalArgumentException("Bad proxy spec id in advertisement");
-            } catch (ClassCastException badID) {
-                throw new IllegalArgumentException("Unusable proxy spec id in advertisement");
-            }
-            return true;
-        }
-
-        if (nm.equals(authIdTag)) {
-            try {
-                URI spID = new URI(elem.getTextValue());
-
-                setAuthSpecID((ModuleSpecID) IDFactory.fromURI(spID));
-            } catch (URISyntaxException badID) {
-                throw new IllegalArgumentException("Bad auth spec id in advertisement");
-            } catch (ClassCastException badID) {
-                throw new IllegalArgumentException("Unusable auth spec id in advertisement");
-            }
-            return true;
-        }
-
-        if (nm.equals(PipeAdvertisement.getAdvertisementType())) {
-            try {
-                PipeAdvertisement pipeAdv = (PipeAdvertisement)
-                        AdvertisementFactory.newAdvertisement(elem);
-
-                setPipeAdvertisement(pipeAdv);
-            } catch (ClassCastException wrongAdv) {
-                throw new IllegalArgumentException("Bad pipe advertisement in advertisement");
-            }
-            return true;
-        }
-
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Document getDocument(MimeMediaType encodeAs) {
-        if (null == getModuleSpecID()) {
-            throw new IllegalStateException("Module Spec Advertisement did not contain a module spec id.");
-        }
-
-        StructuredDocument adv = (StructuredDocument) super.getDocument(encodeAs);
-
-        Element e;
-
-        e = adv.createElement(idTag, getModuleSpecID().toString());
-        adv.appendChild(e);
-
-        if (null != getName()) {
-            e = adv.createElement(nameTag, getName());
-            adv.appendChild(e);
-        }
-
-        // desc is optional
-        StructuredDocument desc = getDesc();
-
-        if (desc != null) {
-            StructuredDocumentUtils.copyElements(adv, adv, desc);
-        }
-
-        e = adv.createElement(creatorTag, getCreator());
-        adv.appendChild(e);
-
-        e = adv.createElement(uriTag, getSpecURI());
-        adv.appendChild(e);
-
-        e = adv.createElement(versTag, getVersion());
-        adv.appendChild(e);
-
-        PipeAdvertisement pipeAdv = getPipeAdvertisement();
-
-        if (pipeAdv != null) {
-            StructuredTextDocument advDoc = (StructuredTextDocument)
-                    pipeAdv.getDocument(encodeAs);
-
-            StructuredDocumentUtils.copyElements(adv, adv, advDoc);
-        }
-        ModuleSpecID tmpId = getProxySpecID();
-
-        if (tmpId != null) {
-            e = adv.createElement(proxyIdTag, tmpId.toString());
-            adv.appendChild(e);
-        }
-        tmpId = getAuthSpecID();
-        if (tmpId != null) {
-            e = adv.createElement(authIdTag, tmpId.toString());
-            adv.appendChild(e);
-        }
-
-        e = getParamPriv();
-        // Copy the param document as an element of adv.
-        if (e != null) {
-            // Force the element to be named "Parm" even if that is not
-            // the name of paramDoc.
-            StructuredDocumentUtils.copyElements(adv, adv, e, paramTag);
-        }
-
-        return adv;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String[] getIndexFields() {
-        return fields;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PSEConfigAdv.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PSEConfigAdv.java
deleted file mode 100644 (file)
index b99fcf2..0000000
+++ /dev/null
@@ -1,766 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.StringReader;
-import java.net.URI;
-import java.security.PrivateKey;
-import java.security.cert.X509Certificate;
-import java.security.cert.CertificateFactory;
-import java.util.Enumeration;
-import java.util.Arrays;
-import java.util.ArrayList;
-import java.util.List;
-import javax.crypto.EncryptedPrivateKeyInfo;
-
-import java.io.IOException;
-import java.lang.reflect.UndeclaredThrowableException;
-import java.net.URISyntaxException;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.ExtendableAdvertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Attributable;
-import net.jxta.document.Attribute;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.impl.membership.pse.PSEUtils;
-import net.jxta.peergroup.PeerGroupID;
-
-
-/**
- *  Contains parameters for configuration of the PSE Membership Service.
- *
- *  <p/>The configuration advertisement can include an optional seed certificate
- *  chain and encrypted private key. If this seed information is present the PSE 
- *  Membership Service will require an initial authentication to unlock the 
- *  encrypted private key before creating the PSE keystore. The newly created 
- *  PSE keystore will be "seeded" with the certificate chain and the private key.
- *
- *  <p/>This mechanism allows for out-of-band distribution of JXTA identity
- *  information and avoids the need for remote authentication.
- *
- *  <p/>Note: This implementation contemplates multiple root certs in its
- *  schema, but the API has not yet been extended to include this functionality.
- */
-public final class PSEConfigAdv extends ExtendableAdvertisement implements Cloneable {
-
-    /**
-     *   Log4J Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(PSEConfigAdv.class.getName());
-
-    /**
-     *  Our DOCTYPE
-     */
-    private final static String advType = "jxta:PSEConfig";
-
-    /**
-     *  Instantiator for PSEConfigAdv
-     */
-    public static class Instantiator implements AdvertisementFactory.Instantiator {
-
-        /**
-         * {@inheritDoc}
-         */
-        public String getAdvertisementType() {
-            return advType;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance() {
-            return new PSEConfigAdv();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance(Element root) {
-            return new PSEConfigAdv(root);
-        }
-    }
-
-    private final static String ROOT_CERT_TAG = "RootCert";
-    private final static String CERT_TAG = "Certificate";
-    private final static String ENCRYPTED_PRIVATE_KEY_TAG = "EncryptedPrivateKey";
-    private final static String KEY_STORE_TYPE_ATTR = "KeyStoreType";
-    private final static String KEY_STORE_PROVIDER_ATTR = "KeyStoreProvider";
-    private final static String KEY_STORE_LOCATION_TAG = "KeyStoreLocation";
-
-    private final static String[] INDEX_FIELDS = {};
-
-    private final List<X509Certificate> certs = new ArrayList<X509Certificate>();
-
-    private EncryptedPrivateKeyInfo encryptedPrivateKey = null;
-
-    private String privAlgorithm = null;
-
-    private String keyStoreType = null;
-
-    private String keyStoreProvider = null;
-
-    private URI keyStoreLocation = null;
-
-    /**
-     *  Returns the identifying type of this Advertisement.
-     *
-     *  <p/><b>Note:</b> This is a static method. It cannot be used to determine
-     *  the runtime type of an advertisement. ie.
-     *  </p><code><pre>
-     *      Advertisement adv = module.getSomeAdv();
-     *      String advType = adv.getAdvertisementType();
-     *  </pre></code>
-     *
-     *  <p/><b>This is wrong and does not work the way you might expect.</b>
-     *  This call is not polymorphic and calls
-     *  {@code Advertisement.getAdvertisementType()} no matter what the real 
-     *  type of the advertisement.
-     *
-     * @return String the type of advertisement
-     */
-    public static String getAdvertisementType() {
-        return advType;
-    }
-
-    /**
-     *  Use the Instantiator through the factory
-     */
-    private PSEConfigAdv() {}
-
-    /**
-     *  Use the Instantiator through the factory
-     *
-     *  @param root The XMLElement which is the root element of the PSEConfigAdv.
-     */
-    private PSEConfigAdv(Element root) {
-        if (!XMLElement.class.isInstance(root)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-        }
-
-        XMLElement doc = (XMLElement) root;
-
-        String doctype = doc.getName();
-
-        String typedoctype = "";
-        Attribute itsType = doc.getAttribute("type");
-
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-
-        if (!doctype.equals(getAdvertisementType()) && !getAdvertisementType().equals(typedoctype)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-
-        Enumeration eachAttr = doc.getAttributes();
-
-        while (eachAttr.hasMoreElements()) {
-            Attribute anAttr = (Attribute) eachAttr.nextElement();
-
-            if (super.handleAttribute(anAttr)) {
-                // nothing to do
-                ;
-            } else if (KEY_STORE_TYPE_ATTR.equals(anAttr.getName())) {
-                keyStoreType = anAttr.getValue().trim();
-            } else if (KEY_STORE_PROVIDER_ATTR.equals(anAttr.getName())) {
-                keyStoreProvider = anAttr.getValue().trim();
-            } else {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Unhandled Attribute: " + anAttr.getName());
-                }
-            }
-        }
-
-        certs.clear();
-
-        Enumeration elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            XMLElement elem = (XMLElement) elements.nextElement();
-
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Unhandled Element: " + elem.toString());
-                }
-            }
-        }
-
-        // Sanity Check!!!
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public PSEConfigAdv clone() {
-
-        PSEConfigAdv result;
-
-        try {
-            result = (PSEConfigAdv) super.clone();
-        } catch (CloneNotSupportedException e) {
-            throw new Error("Object.clone() threw CloneNotSupportedException", e);
-        }
-
-        result.setKeyStoreLocation(getKeyStoreLocation());
-        result.setKeyStoreType(getKeyStoreType());
-        result.setKeyStoreProvider(getKeyStoreProvider());
-
-        result.setEncryptedPrivateKey(getEncryptedPrivateKey(), getEncryptedPrivateKeyAlgo());
-        result.setCertificateChain(getCertificateChain());
-
-        return result;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public final String getBaseAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public ID getID() {
-        InputStream data = new ByteArrayInputStream(getCert().getBytes());
-
-        try {
-            return IDFactory.newCodatID(PeerGroupID.worldPeerGroupID, new byte[16], data);
-        } catch (IOException failed) {
-            throw new UndeclaredThrowableException(failed, "Could not generate id");
-        }
-    }
-
-    /**
-     *  Returns the seed certificate. If present, this certificate will be used
-     *  to initialize the PSE keystore and will be stored using the peer id of
-     *  the authenticating peer.
-     *
-     *  @return The seed certificate or {@code null} if there is no seed
-     *  certificate defined.
-     */
-    public X509Certificate getCertificate() {
-        if (certs.isEmpty()) {
-            return null;
-        } else {
-            return certs.get(0);
-        }
-    }
-
-    /**
-     *  Returns the seed certificate chain. If present, this certificate chain 
-     *  will be used to initialize the PSE keystore and will be stored using the 
-     *  peer id of the authenticating peer.
-     *
-     *  @return the seed certificate chain for this peer or {@code null} if 
-     *  there is no seed certificate chain defined.
-     */
-    public X509Certificate[] getCertificateChain() {
-        return certs.toArray(new X509Certificate[certs.size()]);
-    }
-
-    /**
-     *  Returns the seed certificate encoded as a BASE64 String.
-     *
-     *  @return the seed certificate encoded as a BASE64 String.
-     */
-    public String getCert() {
-        X509Certificate rootCert = getCertificate();
-
-        if (null != rootCert) {
-            try {
-                return PSEUtils.base64Encode(getCertificate().getEncoded());
-            } catch (Throwable failed) {
-                throw new IllegalStateException("Failed to process seed cert");
-            }
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     *  Sets the seed certificate for this peer from a BASE64 String.
-     *
-     *  @param newCert The seed certificate for this peer as a BASE64 String.
-     */
-    public void setCert(String newCert) {
-        try {
-            byte[] cert_der = PSEUtils.base64Decode(new StringReader(newCert));
-
-            CertificateFactory cf = CertificateFactory.getInstance("X509");
-
-            setCertificate((X509Certificate) cf.generateCertificate(new ByteArrayInputStream(cert_der)));
-        } catch (Exception failed) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Failed to process seed cert", failed);
-            }
-
-            IllegalArgumentException failure = new IllegalArgumentException("Failed to process seed cert");
-
-            failure.initCause(failed);
-
-            throw failure;
-        }
-    }
-
-    /**
-     *  Sets the seed certificate for this peer. If {@code null} then the 
-     *  Private Key is also cleared.
-     *
-     *  @param newCert The seed certificate for this PSE instance or {@code null}
-     *  to clear the seed certificates and private key.
-     */
-    public void setCertificate(X509Certificate newCert) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("setCert : " + newCert);
-        }
-
-        certs.clear();
-
-        if (null == newCert) {
-            encryptedPrivateKey = null;
-        } else {
-            certs.add(newCert);
-        }
-    }
-
-    /**
-     *  Sets the seed Certificate chain for this peer. If {@code null} then the  
-     *  Private Key is also cleared.
-     *
-     *  @param newCerts The seed certificate chain  or {@code null}
-     *  to clear the seed certificates and private key.
-     */
-    public void setCertificateChain(X509Certificate[] newCerts) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("setCert : " + newCerts);
-        }
-
-        certs.clear();
-
-        if (null == newCerts) {
-            encryptedPrivateKey = null;
-        } else {
-            certs.addAll(Arrays.asList(newCerts));
-        }
-    }
-
-    /**
-     *  Get the seed private key from this advertisement. The private key is
-     *  retrieved from the advertisement using the provided password.
-     *
-     *  @param password the password to use in attempting to decrypt the private
-     *  key.
-     *  @return the decrypted private key.
-     */
-    public PrivateKey getPrivateKey(char[] password) {
-
-        return PSEUtils.pkcs5_Decrypt_pbePrivateKey(password, privAlgorithm, encryptedPrivateKey);
-    }
-
-    /**
-     *  Get the encrypted seed private key from this advertisement.
-     *
-     *  @return the encrypted seed private key.
-     */
-    public EncryptedPrivateKeyInfo getEncryptedPrivateKey() {
-
-        return encryptedPrivateKey;
-    }
-
-    /**
-     *  Get the encrypted seed private key algorithm from this advertisement.
-     *
-     *  @return the decrypted seed private key algorithm.
-     */
-    public String getEncryptedPrivateKeyAlgo() {
-
-        return privAlgorithm;
-    }
-
-    /**
-     *  Get the encrypted seed private key from this advertisement.
-     *
-     *  @return the encoded encrypted private key, a BASE64 String of a DER
-     *  encoded PKCS8 EncrpytePrivateKeyInfo.
-     */
-    public String getEncryptedPrivKey() {
-        try {
-            if (null == encryptedPrivateKey) {
-                return null;
-            }
-
-            return PSEUtils.base64Encode(encryptedPrivateKey.getEncoded());
-        } catch (Exception failed) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Failed to process private key", failed);
-            }
-
-            IllegalStateException failure = new IllegalStateException("Failed to process private key");
-
-            failure.initCause(failed);
-            throw failure;
-        }
-    }
-
-    /**
-     *  Return the JCE Keystore type which the PSE Membership Service should use.
-     *  This value should be the name of valid JCE Keystore or {@code null} if
-     *  the default Keystore type should be used. The PSE Membership Service
-     *  will create the keystore via 
-     *  {@code KeyStore.getInstance(keystore_type)}.
-     *  
-     *  @return The name of the Keystore type which the PSE Membership Service
-     *  will use or {@code null} if the default keystore type should be used.
-     */
-    public String getKeyStoreType() {
-        return keyStoreType;
-    }
-
-    /**
-     *  Set the JCE Keystore type which the PSE Membership Service 
-     *  should use. This value should be the name of valid JCE Keystore or 
-     *  {@code null} if the default Keystore type should be used. The PSE 
-     *  Membership Service will create the keystore via 
-     *  {@code KeyStore.getInstance(keystore_type)}.
-     *
-     *  @param type The JCE Keystore type which the PSE Membership Service 
-     *  should use. This value should be the name of valid JCE Keystore or 
-     *  {@code null} if the default Keystore type should be used.
-     */
-    public void setKeyStoreType(String type) {
-        keyStoreType = type;
-    }
-
-    /**
-     *  Return the JCE provider which the PSE Membership Service 
-     *  should use for Keystores. This value should be the name of valid JCE 
-     *  provider or {@code null} if the default provider should be used. The PSE 
-     *  Membership Service will create the keystore via 
-     *  {@code KeyStore.getInstance(keystore_type, provider)}.
-     *
-     *  @return The JCE provider which the PSE Membership Service 
-     *  should use for Keystores. This value should be the name of valid JCE 
-     *  provider or {@code null} if the default provider should be used.
-     */
-    public String getKeyStoreProvider() {
-        return keyStoreProvider;
-    }
-
-    /**
-     *  Set the JCE provider which the PSE Membership Service 
-     *  should use for Keystores. This value should be the name of valid JCE 
-     *  provider or {@code null} if the default provider should be used. The PSE 
-     *  Membership Service will create the keystore via 
-     *  {@code KeyStore.getInstance(keystore_type, provider)}.
-     *
-     *  @param provider The JCE provider which the PSE Membership Service 
-     *  should use for Keystores. This value should be the name of valid JCE 
-     *  provider or {@code null} if the default provider should be used.
-     */
-    public void setKeyStoreProvider(String provider) {
-        keyStoreProvider = provider;
-    }
-
-    /**
-     *  Return the location of the Keystore or {@code null} if the PSE 
-     *  Membership Service should use the default location. The actual default
-     *  location may vary depending upon they Keystore type and provider and not
-     *  all location values may be valid for all Keystore types and providers.
-     *  
-     *  @return The location of the Keystore or {@code null} if the PSE 
-     *  Membership Service should use the default location.
-     */
-    public URI getKeyStoreLocation() {
-        return keyStoreLocation;
-    }
-
-    /**
-     *  Set the location of the Keystore or {@code null} if the PSE 
-     *  Membership Service should use the default location. The actual default
-     *  location may vary depending upon they Keystore type and provider and not
-     *  all location values may be valid for all Keystore types and providers.
-     *  
-     *  @param location The location of the Keystore or {@code null} if the PSE 
-     *  Membership Service should use the default location.
-     */
-    public void setKeyStoreLocation(URI location) {
-        keyStoreLocation = location;
-    }
-
-    /**
-     *  Set the encrypted private key for this advertisement. The private key
-     *  is provided as a BASE64 String of a DER encoded PKCS8
-     *  EncrpytePrivateKeyInfo.
-     *
-     *  @param newPriv a BASE64 String of a DER encoded PKCS8
-     *  EncrpytePrivateKeyInfo.
-     *  @param algorithm The public key algorithm used by this private key.
-     *  Currently only "RSA" is supported.
-     */
-    public void setEncryptedPrivateKey(String newPriv, String algorithm) {
-        try {
-            byte[] key_der = PSEUtils.base64Decode(new StringReader(newPriv));
-
-            EncryptedPrivateKeyInfo newEncryptedPriv = new EncryptedPrivateKeyInfo(key_der);
-
-            setEncryptedPrivateKey(newEncryptedPriv, algorithm);
-        } catch (Exception failed) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Failed to process private key", failed);
-            }
-
-            IllegalArgumentException failure = new IllegalArgumentException("Failed to process private key");
-
-            failure.initCause(failed);
-
-            throw failure;
-        }
-    }
-
-    /**
-     *  Set the encrypted seed private key for this advertisement.
-     *
-     *  @param newPriv The encrypted seed private key.
-     *  @param algorithm The public key algorithm used by this private key.
-     *  Currently only "RSA" is supported.
-     */
-    public void setEncryptedPrivateKey(EncryptedPrivateKeyInfo newPriv, String algorithm) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("setPrivateKey : " + newPriv);
-        }
-
-        encryptedPrivateKey = newPriv;
-        privAlgorithm = algorithm;
-    }
-
-    /**
-     *  Set the encrypted seed private key for this advertisement.
-     *
-     *  @param password The password to be used in encrypting the private key
-     *  @param newPriv  The private key to be stored in encrypted form.
-     */
-    public void setPrivateKey(PrivateKey newPriv, char[] password) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("setPrivateKey : " + newPriv);
-        }
-
-        EncryptedPrivateKeyInfo encypted = PSEUtils.pkcs5_Encrypt_pbePrivateKey(password, newPriv, 500);
-
-        setEncryptedPrivateKey(encypted, newPriv.getAlgorithm());
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    protected boolean handleElement(Element raw) {
-
-        if (super.handleElement(raw)) {
-            return true;
-        }
-
-        XMLElement elem = (XMLElement) raw;
-
-        if (ROOT_CERT_TAG.equals(elem.getName())) {
-
-            Enumeration elements = elem.getChildren();
-
-            while (elements.hasMoreElements()) {
-                XMLElement eachcertelem = (XMLElement) elements.nextElement();
-
-                if (CERT_TAG.equals(eachcertelem.getName())) {
-                    // XXX bondolo 20040415 backwards compatibility
-                    eachcertelem.addAttribute("type", net.jxta.impl.protocol.Certificate.getMessageType());
-
-                    net.jxta.impl.protocol.Certificate certChain = new net.jxta.impl.protocol.Certificate(eachcertelem);
-
-                    setCertificateChain(certChain.getCertificates());
-
-                    continue;
-                }
-
-                if (ENCRYPTED_PRIVATE_KEY_TAG.equals(eachcertelem.getName())) {
-                    String value = eachcertelem.getTextValue();
-
-                    if (null == value) {
-                        throw new IllegalArgumentException("Empty Private Key element");
-                    }
-
-                    value = value.trim();
-
-                    Attribute algo = eachcertelem.getAttribute("algorithm");
-
-                    if (null == algo) {
-                        throw new IllegalArgumentException("Private Key element must include algorithm attribute");
-                    }
-
-                    setEncryptedPrivateKey(value, algo.getValue());
-                    continue;
-                }
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Unhandled Element: " + eachcertelem.getName());
-                }
-
-            }
-
-            return true;
-        }
-
-        if (KEY_STORE_LOCATION_TAG.equals(elem.getName())) {
-            try {
-                keyStoreLocation = new URI(elem.getTextValue());
-            } catch (URISyntaxException badURI) {
-                IllegalArgumentException iae = new IllegalArgumentException("Bad key store location URI");
-
-                iae.initCause(badURI);
-
-                throw iae;
-            }
-            
-            return true;
-        }
-
-        return false;
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public Document getDocument(MimeMediaType encodeAs) {
-        StructuredDocument adv = (StructuredDocument) super.getDocument(encodeAs);
-
-        if (adv instanceof Attributable) {
-            Attributable attrDoc = (Attributable) adv;
-
-            if (null != keyStoreType) {
-                attrDoc.addAttribute(KEY_STORE_TYPE_ATTR, keyStoreType);
-
-                if (null != keyStoreProvider) {
-                    attrDoc.addAttribute(KEY_STORE_PROVIDER_ATTR, keyStoreProvider);
-                }
-            }
-        }
-
-        if (null != keyStoreLocation) {
-            Element keyStoreLocationURI = adv.createElement(KEY_STORE_LOCATION_TAG, keyStoreLocation.toString());
-
-            adv.appendChild(keyStoreLocationURI);
-        }
-
-        String encodedRoot = getCert();
-        String encodedPrivateKey = getEncryptedPrivKey();
-
-        if ((null != encodedRoot) && (null != encodedPrivateKey)) {
-            Element rootcert = adv.createElement(ROOT_CERT_TAG, null);
-
-            adv.appendChild(rootcert);
-
-            // FIXME bondolo 20040501 needs to write certificate chain.
-
-            Element cert = adv.createElement(CERT_TAG, encodedRoot);
-
-            rootcert.appendChild(cert);
-
-            Element privatekey = adv.createElement(ENCRYPTED_PRIVATE_KEY_TAG, encodedPrivateKey);
-
-            rootcert.appendChild(privatekey);
-
-            if (privatekey instanceof Attributable) {
-                ((Attributable) privatekey).addAttribute("algorithm", privAlgorithm);
-            }
-        }
-
-        return adv;
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public String[] getIndexFields() {
-        return INDEX_FIELDS;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PeerAdv.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PeerAdv.java
deleted file mode 100644 (file)
index 39c8a0a..0000000
+++ /dev/null
@@ -1,364 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import java.net.URI;
-import java.util.Enumeration;
-import java.util.Hashtable;
-
-import java.net.URISyntaxException;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Attribute;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.document.XMLElement;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.platform.ModuleClassID;
-import net.jxta.protocol.PeerAdvertisement;
-
-
-/**
- * Implementation of {@link PeerAdvertisement} matching the standard JXTA
- * Protocol Specification.
- *
- * It implements Peer Advertisement using the following schema:
- *
- * <pre><tt>
- * &lt;xs:complexType name="PA">
- *   &lt;xs:sequence>
- *     &lt;xs:element name="PID" type="JXTAID"/>
- *     &lt;xs:element name="GID" type="JXTAID"/>
- *     &lt;xs:element name="Name" type="xs:string" minOccurs="0"/>
- *     &lt;xs:element name="Desc" type="xs:anyType" minOccurs="0"/>
- *     &lt;xs:element name="Svc" type="jxta:serviceParams" minOccurs="0" maxOccurs="unbounded"/>
- *   &lt;xs:sequence>
- * &lt;/xs:complexType>
- * </tt></pre>
- *
- * @see net.jxta.protocol.PeerAdvertisement
- * @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#advert-pa" target="_blank">JXTA Protocols Specification : Peer Advertisement</a>
- **/
-public class PeerAdv extends PeerAdvertisement {
-
-    /**
-     *  Logger
-     **/
-    private static final Logger LOG = Logger.getLogger(PeerAdv.class.getName());
-    
-    private static final String pidTag = "PID";
-    private static final String gidTag = "GID";
-    private static final String nameTag = "Name";
-    private static final String descTag = "Desc";
-    private static final String svcTag = "Svc";
-    private static final String mcidTag = "MCID";
-    private static final String paramTag = "Parm";
-    private static final String[] fields = { nameTag, pidTag };
-    
-    /**
-     *  Creates instances of PeerAdvertisement.
-     **/
-    public static class Instantiator implements AdvertisementFactory.Instantiator {
-
-        /**
-         *  {@inheritDoc}
-         **/
-        public String getAdvertisementType() {
-            return PeerAdvertisement.getAdvertisementType();
-        }
-        
-        /**
-         *  {@inheritDoc}
-         **/
-        public Advertisement newInstance() {
-            return new PeerAdv();
-        }
-        
-        /**
-         *  {@inheritDoc}
-         **/
-        public Advertisement newInstance(Element root) {
-            if (!XMLElement.class.isInstance(root)) {
-                throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-            }
-        
-            return new PeerAdv((XMLElement) root);
-        }
-    }
-
-    /**
-     *  Private constructor for new instances. Use the instantiator.
-     */
-    private PeerAdv() {}
-
-    /**
-     *  Private constructor for xml serialized instances. Use the instantiator.
-     *  
-     *  @param doc The XML serialization of the advertisement.
-     */
-    private PeerAdv(XMLElement doc) {
-        String doctype = doc.getName();
-        
-        String typedoctype = "";
-        Attribute itsType = doc.getAttribute("type");
-
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-        
-        if (!doctype.equals(getAdvertisementType()) && !getAdvertisementType().equals(typedoctype)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-        
-        Enumeration elements = doc.getChildren();
-        
-        while (elements.hasMoreElements()) {
-            XMLElement elem = (XMLElement) elements.nextElement();
-            
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Unhandled Element: " + elem.toString());
-                }
-            }
-        }
-        
-        // Sanity Check!!!
-        
-        // sanity check time!
-        if (null == getPeerID()) {
-            throw new IllegalArgumentException("Peer Advertisement did not contain a peer id.");
-        }
-        
-        if (null == getPeerGroupID()) {
-            throw new IllegalArgumentException("Peer Advertisement did not contain a peer group id.");
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    protected boolean handleElement(Element raw) {
-        
-        if (super.handleElement(raw)) {
-            return true;
-        }
-        
-        XMLElement elem = (XMLElement) raw;
-        
-        if (elem.getName().equals(pidTag)) {
-            try {
-                URI pID = new URI(elem.getTextValue());
-
-                setPeerID((PeerID) IDFactory.fromURI(pID));
-            } catch (URISyntaxException badID) {
-                throw new IllegalArgumentException("Bad PeerID ID in advertisement: " + elem.getTextValue());
-            } catch (ClassCastException badID) {
-                throw new IllegalArgumentException("Id is not a peer id: " + elem.getTextValue());
-            }
-            return true;
-        }
-        
-        if (elem.getName().equals(gidTag)) {
-            try {
-                URI gID = new URI(elem.getTextValue());
-
-                setPeerGroupID((PeerGroupID) IDFactory.fromURI(gID));
-            } catch (URISyntaxException badID) {
-                throw new IllegalArgumentException("Bad PeerGroupID in advertisement: " + elem.getTextValue());
-            } catch (ClassCastException badID) {
-                throw new IllegalArgumentException("Id is not a group id: " + elem.getTextValue());
-            }
-            return true;
-        }
-
-        if (elem.getName().equals(nameTag)) {
-            setName(elem.getTextValue());
-            return true;
-        }
-        
-        if (elem.getName().equals(descTag)) {
-            setDesc(elem);
-            return true;
-        }
-        
-        if (elem.getName().equals(svcTag)) {
-            Enumeration elems = elem.getChildren();
-            ModuleClassID classID = null;
-            Element param = null;
-
-            while (elems.hasMoreElements()) {
-                XMLElement e = (XMLElement) elems.nextElement();
-
-                if (e.getName().equals(mcidTag)) {
-                    try {
-                        URI mcid = new URI(e.getTextValue());
-
-                        classID = (ModuleClassID) IDFactory.fromURI(mcid);
-                    } catch (URISyntaxException badID) {
-                        throw new IllegalArgumentException("Unusable ModuleClassID in advertisement: " + e.getTextValue());
-                    } catch (ClassCastException badID) {
-                        throw new IllegalArgumentException("Id is not a ModuleClassID: " + e.getTextValue());
-                    }
-                    continue;
-                }
-                if (e.getName().equals(paramTag)) {
-                    param = e;
-                }
-            }
-            if (classID != null && param != null) {
-                // Add this param to the table. putServiceParam()
-                // clones param into a standalone document automatically.
-                // (classID gets cloned too).
-                putServiceParam(classID, param);
-            }
-            return true;
-        }
-        
-        // element was not handled
-        return false;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public Document getDocument(MimeMediaType encodeAs) {
-        StructuredDocument adv = (StructuredDocument) super.getDocument(encodeAs);
-        
-        PeerID peerID = getPeerID();
-
-        if ((null == peerID) || ID.nullID.equals(peerID)) {
-            throw new IllegalStateException("Cannot generate Peer Advertisement with no Peer ID!");
-        }
-        Element e = adv.createElement(pidTag, peerID.toString());
-
-        adv.appendChild(e);
-        
-        PeerGroupID groupID = getPeerGroupID();
-
-        if ((null == groupID) || ID.nullID.equals(groupID)) {
-            throw new IllegalStateException("Cannot generate Peer Advertisement with no group ID!");
-        } else {
-            e = adv.createElement(gidTag, groupID.toString());
-            adv.appendChild(e);
-        }
-        
-        // name is optional
-        if (getName() != null) {
-            e = adv.createElement(nameTag, getName());
-            adv.appendChild(e);
-        }
-        
-        // desc is optional
-        StructuredDocument desc = getDesc();
-
-        if (desc != null) {
-            StructuredDocumentUtils.copyElements(adv, adv, desc);
-        }
-        
-        // service params are optional
-        // FIXME: this is inefficient - we force our base class to make
-        // a deep clone of the table.
-        Hashtable serviceParams = getServiceParams();
-        Enumeration classIds = serviceParams.keys();
-
-        while (classIds.hasMoreElements()) {
-            ModuleClassID classId = (ModuleClassID) classIds.nextElement();
-            
-            Element s = adv.createElement(svcTag);
-
-            adv.appendChild(s);
-            
-            e = adv.createElement(mcidTag, classId.toString());
-            s.appendChild(e);
-            
-            e = (Element) serviceParams.get(classId);
-            StructuredDocumentUtils.copyElements(adv, s, e, paramTag);
-        }
-        return adv;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public String[] getIndexFields() {
-        return fields;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PeerGroupAdv.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PeerGroupAdv.java
deleted file mode 100644 (file)
index c700407..0000000
+++ /dev/null
@@ -1,334 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Attribute;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.document.TextElement;
-import net.jxta.document.XMLElement;
-import net.jxta.id.IDFactory;
-import net.jxta.logging.Logging;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.platform.ModuleClassID;
-import net.jxta.platform.ModuleSpecID;
-import net.jxta.protocol.PeerGroupAdvertisement;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-public class PeerGroupAdv extends PeerGroupAdvertisement {
-
-    /**
-     * Log4J Logger
-     */
-    private static final Logger LOG = Logger.getLogger(PeerGroupAdv.class.getName());
-
-    private static final String nameTag = "Name";
-    private static final String gidTag = "GID";
-    private static final String descTag = "Desc";
-    private static final String msidTag = "MSID";
-    private static final String svcTag = "Svc";
-    private static final String mcidTag = "MCID";
-    private static final String paramTag = "Parm";
-    private static final String[] fields = { nameTag, gidTag, descTag, msidTag};
-
-    public static class Instantiator implements AdvertisementFactory.Instantiator {
-
-        /**
-         * {@inheritDoc}
-         */
-
-        public String getAdvertisementType() {
-            return PeerGroupAdv.getAdvertisementType();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance() {
-            return new PeerGroupAdv();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance(net.jxta.document.Element root) {
-            return new PeerGroupAdv(root);
-        }
-    }
-
-    /**
-     * Use the Instantiator method to construct Peer Group Advs.
-     */
-    private PeerGroupAdv() {}
-
-    /**
-     * Use the Instantiator method to construct Peer Group Advs.
-     *
-     * @param root the element
-     */
-    private PeerGroupAdv(Element root) {
-        if (!XMLElement.class.isInstance(root)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-        }
-
-        XMLElement doc = (XMLElement) root;
-
-        String doctype = doc.getName();
-
-        String typedoctype = "";
-        Attribute itsType = doc.getAttribute("type");
-
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-
-        if (!doctype.equals(getAdvertisementType()) && !getAdvertisementType().equals(typedoctype)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-
-        Enumeration elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            XMLElement elem = (XMLElement) elements.nextElement();
-
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Unhandled Element: " + elem.toString());
-                }
-            }
-        }
-
-        // Sanity Check!!!
-        if (null == getPeerGroupID()) {
-            throw new IllegalArgumentException("Peer Group Advertisement did not contain a peer group id.");
-        }
-
-        if (null == getModuleSpecID()) {
-            throw new IllegalArgumentException("Peer Group Advertisement did not contain a module spec id.");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected boolean handleElement(Element raw) {
-
-        if (super.handleElement(raw)) {
-            return true;
-        }
-
-        XMLElement elem = (XMLElement) raw;
-
-        if (elem.getName().equals(nameTag)) {
-            setName(elem.getTextValue());
-            return true;
-        }
-
-        if (elem.getName().equals(descTag)) {
-            setDesc(elem);
-            return true;
-        }
-
-        if (elem.getName().equals(gidTag)) {
-            try {
-                URI grID = new URI(elem.getTextValue());
-
-                setPeerGroupID((PeerGroupID) IDFactory.fromURI(grID));
-            } catch (URISyntaxException badID) {
-                throw new IllegalArgumentException("Bad peer group ID in advertisement: " + elem.getTextValue());
-            } catch (ClassCastException badID) {
-                throw new IllegalArgumentException("Id is not a group id: " + elem.getTextValue());
-            }
-            return true;
-        }
-
-        if (elem.getName().equals(msidTag)) {
-            try {
-                URI specID = new URI(elem.getTextValue());
-
-                setModuleSpecID((ModuleSpecID) IDFactory.fromURI(specID));
-            } catch (URISyntaxException badID) {
-                throw new IllegalArgumentException("Bad msid in advertisement: " + elem.getTextValue());
-            } catch (ClassCastException badID) {
-                throw new IllegalArgumentException("Id is not a module spec id: " + elem.getTextValue());
-            }
-            return true;
-        }
-
-        if (elem.getName().equals(svcTag)) {
-            Enumeration elems = elem.getChildren();
-            String classID = null;
-            Element param = null;
-
-            while (elems.hasMoreElements()) {
-                TextElement e = (TextElement) elems.nextElement();
-
-                if (e.getName().equals(mcidTag)) {
-                    classID = e.getTextValue();
-                    continue;
-                }
-                if (e.getName().equals(paramTag)) {
-                    param = e;
-                }
-            }
-            if (classID != null && param != null) {
-                // Add this param to the table. putServiceParam()
-                // clones param into a standalone document automatically.
-                // (classID gets cloned too).
-                try {
-                    putServiceParam(IDFactory.fromURI(new URI(classID)), param);
-                } catch (URISyntaxException badID) {
-                    throw new IllegalArgumentException("Bad mcid in advertisement: " + elem.getTextValue());
-                } catch (ClassCastException badID) {
-                    throw new IllegalArgumentException("Id is not a module class id: " + elem.getTextValue());
-                }
-            }
-            return true;
-        }
-
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Document getDocument(MimeMediaType encodeAs) {
-        if (null == getPeerGroupID()) {
-            throw new IllegalStateException("Peer Group Advertisement did not contain a peer group id.");
-        }
-
-        if (null == getModuleSpecID()) {
-            throw new IllegalStateException("Peer Group Advertisement did not contain a module spec id.");
-        }
-
-        StructuredDocument adv = (StructuredDocument) super.getDocument(encodeAs);
-
-        Element e;
-
-        e = adv.createElement(gidTag, getPeerGroupID().toString());
-        adv.appendChild(e);
-
-        e = adv.createElement(msidTag, getModuleSpecID().toString());
-        adv.appendChild(e);
-
-        // name is optional
-        if (null != getName()) {
-            e = adv.createElement(nameTag, getName());
-            adv.appendChild(e);
-        }
-
-        // desc is optional
-        StructuredDocument desc = getDesc();
-
-        if (desc != null) {
-            StructuredDocumentUtils.copyElements(adv, adv, desc);
-        }
-
-        // FIXME: this is inefficient - we force our base class to make
-        // a deep clone of the table.
-        Hashtable serviceParams = getServiceParams();
-        Enumeration classIds = serviceParams.keys();
-
-        while (classIds.hasMoreElements()) {
-            ModuleClassID classId = (ModuleClassID) classIds.nextElement();
-
-            Element s = adv.createElement(svcTag);
-
-            adv.appendChild(s);
-
-            e = adv.createElement(mcidTag, classId.toString());
-            s.appendChild(e);
-
-            e = (Element) serviceParams.get(classId);
-            StructuredDocumentUtils.copyElements(adv, s, e, paramTag);
-
-        }
-        return adv;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String[] getIndexFields() {
-        return fields;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PeerGroupConfigAdv.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PeerGroupConfigAdv.java
deleted file mode 100644 (file)
index c468459..0000000
+++ /dev/null
@@ -1,443 +0,0 @@
-/*
- * Copyright (c) 2004-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Attribute;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.ExtendableAdvertisement;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.logging.Logging;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Enumeration;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * Defines Peer Group Runtime Configuration parameters.
- * <p/>
- * This typically includes the peer group ID to use, the peer group name (if any) to use, and optional descriptive
- * meta-data.
- * <p/>
- * <pre><code>
- *   NetPeerGroupID=uuid-59313231343132314A484431544E504702
- *   PeerGroupName=Network Infrastructure PeerGroup
- *   PeerGroupDesc=Infrastructure Group Description
- * </code></pre>
- */
-public final class PeerGroupConfigAdv extends ExtendableAdvertisement implements Cloneable {
-
-    /**
-     * Logger
-     */
-    private static final Logger LOG = Logger.getLogger(PeerGroupConfigAdv.class.getName());
-
-    /**
-     *  The advertisement index fields. (currently none).
-     */
-    private final static String[] INDEX_FIELDS = {};
-
-    /**
-     * The DOCTYPE
-     */
-    private final static String advType = "jxta:PeerGroupConfigAdv";
-
-    private final static String PEERGROUP_ID_TAG = "PeerGroupID";
-    private final static String PEERGROUP_NAME_TAG = "PeerGroupName";
-    private final static String PEERGROUP_DESC_TAG = "PeerGroupDesc";
-
-    /**
-     * Instantiator for PeerGroupConfigAdv
-     */
-    public static class Instantiator implements AdvertisementFactory.Instantiator {
-
-        /**
-         * {@inheritDoc}
-         */
-        public String getAdvertisementType() {
-            return advType;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance() {
-            return new PeerGroupConfigAdv();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance(Element root) {
-            if (!XMLElement.class.isInstance(root)) {
-                throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-            }
-
-            return new PeerGroupConfigAdv((XMLElement) root);
-        }
-    }
-
-    /**
-     * ID for the peer group.
-     */
-    private ID gid = null;
-
-    /**
-     * Informal, non-canonical name of this peer group
-     */
-    private String name = null;
-
-    /**
-     * Descriptive meta-data about this peer group.
-     */
-    private Element description = null;
-
-    /**
-     * Returns the identifying type of this Advertisement.
-     * <p/>
-     * <b>Note:</b> This is a static method. It cannot be used to determine
-     * the runtime type of an advertisement. ie.
-     * </p><code><pre>
-     *      Advertisement adv = module.getSomeAdv();
-     *      String advType = adv.getAdvertisementType();
-     *  </pre></code>
-     * <p/>
-     * <b>This is wrong and does not work the way you might expect.</b>
-     * This call is not polymorphic and calls
-     * Advertisement.getAdvertisementType() no matter what the real type of the
-     * advertisement.
-     *
-     * @return String the type of advertisement
-     */
-    public static String getAdvertisementType() {
-        return advType;
-    }
-
-    /**
-     * Use the Instantiator through the factory
-     */
-    private PeerGroupConfigAdv() {}
-
-    /**
-     * Use the Instantiator method to construct Peer Group Config Advs.
-     *
-     * @param doc the element
-     */
-    private PeerGroupConfigAdv(XMLElement doc) {
-        String doctype = doc.getName();
-
-        String typedoctype = "";
-        Attribute itsType = doc.getAttribute("type");
-
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-
-        if (!doctype.equals(getAdvertisementType()) && !getAdvertisementType().equals(typedoctype)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-
-        Enumeration elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            XMLElement elem = (XMLElement) elements.nextElement();
-
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Unhandled Element: " + elem.toString());
-                }
-            }
-        }
-
-        // Validate group id
-        if (null == getPeerGroupID()) {
-            throw new IllegalArgumentException("Peer Group Config Advertisement does not contain a peer group id.");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected boolean handleElement(Element raw) {
-
-        if (super.handleElement(raw)) {
-            return true;
-        }
-
-        XMLElement elem = (XMLElement) raw;
-
-        if (PEERGROUP_ID_TAG.equals(elem.getName())) {
-            try {
-                URI grID = new URI(elem.getTextValue());
-
-                setPeerGroupID(IDFactory.fromURI(grID));
-            } catch (URISyntaxException badID) {
-                throw new IllegalArgumentException("Invalid peer group ID in advertisement: " + elem.getTextValue());
-            } catch (ClassCastException badID) {
-                throw new IllegalArgumentException("Invalid group ID: " + elem.getTextValue());
-            }
-            return true;
-        }
-
-        if (PEERGROUP_NAME_TAG.equals(elem.getName())) {
-            setName(elem.getTextValue());
-            return true;
-        }
-
-        if (PEERGROUP_DESC_TAG.equals(elem.getName())) {
-            setDesc(elem);
-            return true;
-        }
-
-        return false;
-    }
-
-    /**
-     * Make a safe clone of this PeerGroupConfigAdv.
-     *
-     * @return Object A copy of this PeerGroupConfigAdv
-     */
-    @Override
-    public PeerGroupConfigAdv clone() {
-        try {
-            PeerGroupConfigAdv clone = (PeerGroupConfigAdv) super.clone();
-            
-            clone.setPeerGroupID(getPeerGroupID());
-            clone.setName(getName());
-            clone.setDesc(getDesc());
-            
-            return clone;
-        } catch (CloneNotSupportedException impossible) {
-            throw new Error("Object.clone() threw CloneNotSupportedException", impossible);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public final String getBaseAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public ID getID() {
-        return ID.nullID;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Document getDocument(MimeMediaType encodeAs) {
-        if (null == getPeerGroupID()) {
-            throw new IllegalStateException("Peer Group Config Advertisement does not contain a peer group id.");
-        }
-
-        StructuredDocument adv = (StructuredDocument) super.getDocument(encodeAs);
-
-        Element e = adv.createElement(PEERGROUP_ID_TAG, getPeerGroupID().toString());
-
-        adv.appendChild(e);
-
-        // name is optional
-        if (null != getName()) {
-            e = adv.createElement(PEERGROUP_NAME_TAG, getName());
-            adv.appendChild(e);
-        }
-
-        // desc is optional
-        StructuredDocument desc = getDesc();
-
-        if (desc != null) {
-            StructuredDocumentUtils.copyElements(adv, adv, desc);
-        }
-
-        return adv;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String[] getIndexFields() {
-        return INDEX_FIELDS;
-    }
-
-    /**
-     * Returns the id of the peer group.
-     *
-     * @return ID the group id
-     */
-
-    public ID getPeerGroupID() {
-        return gid;
-    }
-
-    /**
-     * Sets the id of the peer group.
-     *
-     * @param gid The id of this group.
-     */
-
-    public void setPeerGroupID(ID gid) {
-        this.gid = gid;
-    }
-
-    /**
-     * Gets the name to use for the peer group.
-     *
-     * @return The name value
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * Sets the name to use for the peer group.
-     *
-     * @param name The new name value
-     */
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    /**
-     * returns the description
-     *
-     * @return String the description
-     */
-    public String getDescription() {
-        if (description != null) {
-            return (String) description.getValue();
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * sets the description
-     *
-     * @param description the description
-     */
-    public void setDescription(String description) {
-
-        if (null != description) {
-            XMLDocument newdoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8
-                    ,
-                    PEERGROUP_DESC_TAG, description);
-
-            setDesc(newdoc);
-        } else {
-            this.description = null;
-        }
-    }
-
-    /**
-     * returns the description
-     *
-     * @return the description
-     */
-    public XMLDocument getDesc() {
-        XMLDocument newDoc = null;
-
-        if (description != null) {
-            newDoc = (XMLDocument) StructuredDocumentUtils.copyAsDocument(description);
-        }
-        return newDoc;
-    }
-
-    /**
-     * Sets the description
-     *
-     * @param desc the description
-     */
-    public void setDesc(XMLElement desc) {
-
-        if (desc != null) {
-            this.description = StructuredDocumentUtils.copyAsDocument(desc);
-        } else {
-            this.description = null;
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PeerInfoQueryMsg.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PeerInfoQueryMsg.java
deleted file mode 100644 (file)
index 1d29291..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import net.jxta.document.*;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.peer.PeerID;
-import net.jxta.protocol.PeerInfoQueryMessage;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Enumeration;
-
-
-/**
- * This class implements {@link net.jxta.protocol.PeerInfoQueryMessage}.
- * <p/>
- * <p>This message is part of the Peer PeerInfoService protocol
- * <p/>
- * <pre>
- * &lt;xs:element name="<classname>PeerInfoQueryMessage</classname>" type="jxta:PeerInfoQueryMessage"/>
- * <p/>
- * &lt;xs:complexType name="PeerInfoQueryMessage">
- *     &lt;xs:element name="sourcePid" type="xs:anyURI"/>
- *     &lt;xs:element name="targetPid" type="xs:anyURI"/>
- *     &lt;!-- if no present then the response is the general peerinfo -->
- *     &lt;xs:element name="request" type="xs:anyType" minOccurs="0"/>
- * &lt;/xs:complexType>
- * </pre>
- *
- * @since JXTA 1.0
- */
-public class PeerInfoQueryMsg extends PeerInfoQueryMessage {
-
-    public PeerInfoQueryMsg() {
-        super();
-    }
-
-    public PeerInfoQueryMsg(Element root) {
-        initialize(root);
-    }
-
-    public void initialize(Element root) {
-        if (!TextElement.class.isInstance(root)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports TextElement");
-        }
-
-        setSourcePid(null);
-        setTargetPid(null);
-
-        TextElement doc = (TextElement) root;
-
-        Enumeration elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            TextElement element = (TextElement) elements.nextElement();
-            String elementName = element.getName();
-
-            if (elementName.equals("sourcePid")) {
-                try {
-                    URI peerid = new URI(element.getTextValue());
-                    ID id = IDFactory.fromURI(peerid);
-
-                    setSourcePid((PeerID) id);
-                } catch (URISyntaxException badID) {
-                    throw new IllegalArgumentException("Bad peerid ID in advertisement");
-                } catch (ClassCastException badID) {
-                    throw new IllegalArgumentException("Unusable ID in advertisement");
-                }
-                continue;
-            }
-
-            if (elementName.equals("targetPid")) {
-                try {
-                    URI peerid = new URI(element.getTextValue());
-                    ID id = IDFactory.fromURI(peerid);
-
-                    setTargetPid((PeerID) id);
-                } catch (URISyntaxException badID) {
-                    throw new IllegalArgumentException("Bad peerid ID in advertisement");
-                } catch (ClassCastException badID) {
-                    throw new IllegalArgumentException("Unusable ID in advertisement");
-                }
-            } else if (elementName.equals("request")) {
-                Enumeration elems = element.getChildren();
-
-                if (elems.hasMoreElements()) {
-                    setRequest(StructuredDocumentUtils.copyAsDocument((Element) elems.nextElement()));
-                }
-            }
-        }
-    }
-
-    @Override
-    public Document getDocument(MimeMediaType encodeAs) {
-        StructuredTextDocument doc = (StructuredTextDocument)
-                StructuredDocumentFactory.newStructuredDocument(encodeAs, getMessageType());
-
-        if (doc instanceof Attributable) {
-            ((Attributable) doc).addAttribute("xmlns:jxta", "http://jxta.org");
-        }
-
-        Element e = doc.createElement("sourcePid", getSourcePid().toString());
-
-        doc.appendChild(e);
-
-        e = doc.createElement("targetPid", getTargetPid().toString());
-        doc.appendChild(e);
-
-        Element request = getRequest();
-
-        if (null != request) {
-            e = doc.createElement("request");
-            doc.appendChild(e);
-
-            StructuredDocumentUtils.copyElements(doc, e, request);
-        }
-
-        return doc;
-    }
-
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PeerInfoResponseMsg.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PeerInfoResponseMsg.java
deleted file mode 100644 (file)
index 5a54cb3..0000000
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import net.jxta.document.*;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.peer.PeerID;
-import net.jxta.protocol.PeerInfoResponseMessage;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Enumeration;
-
-
-/**
- * This class implements {@link net.jxta.protocol.PeerInfoResponseMessage}.
- * <p/>
- * <p>This message is part of the Peer PeerInfoService protocol
- * <p/>
- * <pre>
- * &lt;xs:element name="<classname>PeerInfoResponse</classname>" type="jxta:PeerInfoResponse"/>
- * <p/>
- * &lt;xs:complexType name="PeerInfoResponse">
- *     &lt;xs:element name="sourcePid" type="xs:anyURI"/>
- *     &lt;xs:element name="targetPid" type="xs:anyURI"/>
- *     &lt;xs:element name="uptime" type="xs:unsignedLong" minOccurs="0"/>
- *     &lt;xs:element name="timestamp" type="xs:unsignedLong" minOccurs="0"/>
- *     &lt;xs:element name="response" type="xs:anyType" minOccurs="0"/>
- * &lt;/xs:complexType>
- * </pre>
- *
- * @since JXTA 1.0
- */
-public class PeerInfoResponseMsg extends PeerInfoResponseMessage {
-
-    public PeerInfoResponseMsg() {}
-
-    /**
-     * @param spid      source PeerID
-     * @param tpid      target PeerID
-     * @param uptime    uotime in millis
-     * @param timestamp TimeStamp
-     * @deprecated Please use the individual setters
-     */
-    @Deprecated
-    public PeerInfoResponseMsg(PeerID spid, PeerID tpid, long uptime, long timestamp) {
-        setSourcePid(spid);
-        setTargetPid(tpid);
-        setUptime(uptime);
-        setTimestamp(timestamp);
-    }
-
-    public PeerInfoResponseMsg(Element root) {
-        initialize(root);
-    }
-
-    private void initialize(Element root) {
-
-        if (!TextElement.class.isInstance(root)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports TextElement");
-        }
-
-        setSourcePid(null);
-        setTargetPid(null);
-        setUptime(0);
-        setTimestamp(0);
-
-        TextElement doc = (TextElement) root;
-
-        Enumeration elements;
-
-        elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            TextElement element = (TextElement) elements.nextElement();
-            String elementName = element.getName();
-
-            if (elementName.equals("sourcePid")) {
-                try {
-                    URI peerid = new URI(element.getTextValue());
-                    ID id = IDFactory.fromURI(peerid);
-
-                    if (!(id instanceof PeerID)) {
-                        throw new IllegalArgumentException("Bad ID in advertisement, not a PeerID");
-                    }
-                    setSourcePid((PeerID) id);
-                } catch (URISyntaxException badID) {
-                    throw new IllegalArgumentException("Bad peerid ID in advertisement");
-                }
-                continue;
-            }
-
-            if (elementName.equals("targetPid")) {
-                try {
-                    URI peerid = new URI(element.getTextValue());
-                    PeerID id = (PeerID) IDFactory.fromURI(peerid);
-
-                    setTargetPid(id);
-                } catch (URISyntaxException badID) {
-                    throw new IllegalArgumentException("Bad peerid ID in advertisement");
-                } catch (ClassCastException badID) {
-                    throw new IllegalArgumentException("Bad ID in advertisement, not a PeerID");
-                }
-            }
-
-            if (elementName.equals("uptime")) {
-                setUptime(Long.parseLong(element.getTextValue()));
-                continue;
-            }
-
-            if (elementName.equals("timestamp")) {
-                setTimestamp(Long.parseLong(element.getTextValue()));
-                continue;
-            }
-
-            if (elementName.equals("response")) {
-                Enumeration elems = element.getChildren();
-
-                if (elems.hasMoreElements()) {
-                    setResponse(StructuredDocumentUtils.copyAsDocument((Element) elems.nextElement()));
-                }
-            }
-
-        }
-    }
-
-    @Override
-    public Document getDocument(MimeMediaType encodeAs) {
-
-        StructuredTextDocument doc = (StructuredTextDocument)
-                StructuredDocumentFactory.newStructuredDocument(encodeAs, getMessageType());
-        TextElement e;
-
-        if (doc instanceof Attributable) {
-            ((Attributable) doc).addAttribute("xmlns:jxta", "http://jxta.org");
-        }
-
-        e = doc.createElement("sourcePid", getSourcePid().toString());
-        doc.appendChild(e);
-
-        e = doc.createElement("targetPid", getTargetPid().toString());
-        doc.appendChild(e);
-
-        Element response = getResponse();
-
-        if (null != response) {
-            e = doc.createElement("response");
-            doc.appendChild(e);
-
-            StructuredDocumentUtils.copyElements(doc, e, response);
-        }
-
-        e = doc.createElement("uptime", String.valueOf(getUptime()));
-        doc.appendChild(e);
-
-        e = doc.createElement("timestamp", String.valueOf(getTimestamp()));
-        doc.appendChild(e);
-
-        return doc;
-    }
-
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PipeAdv.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PipeAdv.java
deleted file mode 100644 (file)
index ca0916c..0000000
+++ /dev/null
@@ -1,303 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import java.net.URI;
-import java.util.Enumeration;
-import java.net.URISyntaxException;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Attribute;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.document.XMLElement;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.pipe.PipeService;
-import net.jxta.protocol.PipeAdvertisement;
-
-
-/**
- * This class implements the Pipe Advertisement according to the schema used by
- * the standard Pipe Binding Protocol. (PBP)
- *
- * <p/><pre>
- * &lt;xs:complexType name="PipeAdvertisement">
- *   &lt;xs:sequence>
- *     &lt;xs:element name="Id" type="jxta:JXTAID"/>
- *     &lt;xs:element name="Type" type="xs:string"/>
- *     &lt;xs:element name="Name" type="xs:string" minOccurs="0"/>
- *     &lt;xs:element name="Desc" type="xs:anyType" minOccurs="0"/>
- *   &lt;/xs:sequence>
- * &lt;/xs:complexType>
- * </pre>
- *
- *  @see net.jxta.protocol.PipeAdvertisement
- *  @see net.jxta.pipe.PipeService
- *  @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-pbp" target="_blank">JXTA Protocols Specification : Pipe Binding Protocol</a>
- */
-public class PipeAdv extends PipeAdvertisement {
-
-    /**
-     *  Logger
-     */
-    private final static Logger LOG = Logger.getLogger(PipeAdv.class.getName());
-
-    /**
-     *  Fields which will be returned by {@link #getIndexFields()}
-     **/
-    private static final String[] INDEX_FIELDS = { PipeAdvertisement.NameTag, PipeAdvertisement.IdTag};
-
-    /**
-     *  AvertisementFactory instantiator for our type.
-     */
-    public final static class Instantiator implements AdvertisementFactory.Instantiator {
-
-        /**
-         *  {@inheritDoc}
-         */
-        public String getAdvertisementType() {
-            return PipeAdv.getAdvertisementType();
-        }
-
-        /**
-         *  {@inheritDoc}
-         */
-        public Advertisement newInstance() {
-            return new PipeAdv();
-        }
-
-        /**
-         *  {@inheritDoc}
-         */
-        public Advertisement newInstance(Element root) {
-            if (!XMLElement.class.isInstance(root)) {
-                throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-            }
-
-            return new PipeAdv((XMLElement) root);
-        }
-    }
-
-    /**
-     *  Private constructor for new instances. Use the instantiator.
-     */
-    private PipeAdv() {}
-
-    /**
-     *  Private constructor for xml serialized instances. Use the instantiator.
-     *  
-     *  @param doc The XML serialization of the advertisement.
-     */
-    private PipeAdv(XMLElement doc) {
-        String doctype = doc.getName();
-
-        String typedoctype = "";
-        Attribute itsType = doc.getAttribute("type");
-
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-
-        if (!doctype.equals(getAdvertisementType()) && !getAdvertisementType().equals(typedoctype)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-
-        Enumeration elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            XMLElement elem = (XMLElement) elements.nextElement();
-
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Unhandled Element: " + elem);
-                }
-            }
-        }
-
-        // Sanity Check!!!
-        if ((null == getPipeID()) || getPipeID().equals(ID.nullID)) {
-            throw new IllegalArgumentException("Bad pipe ID in advertisement");
-        }
-
-        if ((null == getType()) || (0 == getType().length())) {
-            throw new IllegalArgumentException("Bad pipe type in advertisement");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    protected boolean handleElement(Element raw) {
-
-        if (super.handleElement(raw)) {
-            return true;
-        }
-
-        XMLElement elem = (XMLElement) raw;
-
-        if (PipeAdvertisement.descTag.equals(elem.getName())) {
-            setDesc(elem);
-            return true;
-        }
-
-        String value = elem.getTextValue();
-        
-        if ((null == value) || (0 == value.trim().length())) {
-            return false;
-        }
-        
-        value = value.trim();
-        
-        if (PipeAdvertisement.IdTag.equals(elem.getName())) {
-            try {
-                URI pipeID = new URI(value);
-
-                setPipeID(IDFactory.fromURI(pipeID));
-            } catch (URISyntaxException badID) {
-                throw new IllegalArgumentException("Bad pipe ID in advertisement");
-            } catch (ClassCastException badID) {
-                throw new IllegalArgumentException("ID is not a pipe ID");
-            }
-            return true;
-        }
-
-        if (PipeAdvertisement.NameTag.equals(elem.getName())) {
-            setName(value);
-            return true;
-        }
-
-        if (PipeAdvertisement.TypeTag.equals(elem.getName())) {
-            setType(value);
-            return true;
-        }
-        
-        return false;
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public Document getDocument(MimeMediaType encodeAs) {
-        StructuredDocument adv = (StructuredDocument) super.getDocument(encodeAs);
-
-        ID itsID = getPipeID();
-
-        if ((null == itsID) || itsID.equals(ID.nullID)) {
-            throw new IllegalStateException("Pipe has no assigned ID");
-        }
-
-        Element e = adv.createElement(PipeAdvertisement.IdTag, itsID.toString());
-
-        adv.appendChild(e);
-
-        if ((null == getType()) || (0 == getType().length())) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Pipe type not set. Defaulting to " + PipeService.UnicastType + "."
-                        + "\n This default is deprecated. Please set the pipe type in your code.");
-            }
-
-            setType(PipeService.UnicastType);
-            // throw new IllegalArgumentException("Pipe type missing in advertisement");
-        }
-
-        e = adv.createElement(PipeAdvertisement.TypeTag, getType());
-        adv.appendChild(e);
-
-        // name is optional
-        if (getName() != null) {
-            e = adv.createElement(PipeAdvertisement.NameTag, getName());
-            adv.appendChild(e);
-        }
-
-        // desc is optional
-        StructuredDocument desc = getDesc();
-
-        if (desc != null) {
-            StructuredDocumentUtils.copyElements(adv, adv, desc);
-        }
-        return adv;
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public String[] getIndexFields() {
-        return INDEX_FIELDS;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PipeResolverMsg.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PipeResolverMsg.java
deleted file mode 100644 (file)
index 10e82bf..0000000
+++ /dev/null
@@ -1,341 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import net.jxta.document.*;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.pipe.PipeID;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.PipeResolverMessage;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.io.IOException;
-import java.io.StringReader;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Enumeration;
-import java.util.Set;
-
-
-/**
- * This class implements {@link net.jxta.protocol.PipeResolverMessage} by
- * providing {@link #initialize(Element)} and {@link #getDocument(MimeMediaType)}
- * implementations.
- * <p/>
- * <p/>It implements the PipeResolver message for the standard Pipe
- * Binding Protocol (PBP) with the following schema:
- * <p/>
- * <pre><code>
- * &lt;xs:element name="jxta:PipeResolver" type="jxta:PipeResolver"/>
- * <p/>
- * &lt;xs:simpleType name="PipeResolverMsgType">
- *   &lt;xs:restriction base="xs:string">
- *     &lt;!-- QUERY -->
- *     &lt;xs:enumeration value="Query"/>
- *     &lt;!-- ANSWER -->
- *     &lt;xs:enumeration value="Answer"/>
- *   &lt;/xs:restriction>
- * &lt;/xs:simpleType>
- * <p/>
- * &lt;xs:complexType name="PipeResolver">
- *   &lt;xs:sequence>
- *     &lt;xs:element name="MsgType" type="jxta:PipeResolverMsgType"/>
- *     &lt;xs:element name="PipeId" type="jxta:JXTAID"/>
- * &lt;xs:element name="Type" type="xs:string"/>
- * <p/>
- *     &lt;!-- used in the query -->
- * &lt;xs:element name="Cached" type="xs:boolean" default="true" minOccurs="0"/>
- *     &lt;xs:element name="Peer" type="jxta:JXTAID" minOccurs="0" maxOccurs="unbounded"/>
- * <p/>
- *     &lt;!-- used in the answer -->
- *     &lt;xs:element name="Found" minOccurs="0" type="xs:boolean"/>
- * &lt;!-- This should refer to a peer adv, but is instead a whole doc -->
- * &lt;xs:element name="PeerAdv" minOccurs="0" type="xs:string" />
- *   &lt;/xs:sequence>
- * &lt;/xs:complexType>
- * </code></pre>
- *
- * @see net.jxta.pipe.PipeService
- * @see net.jxta.impl.pipe.PipeServiceImpl
- * @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-pbp" target="_blank">JXTA Protocols Specification : Pipe Binding Protocol</a>
- */
-public class PipeResolverMsg extends PipeResolverMessage {
-
-    /**
-     * Log4J Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(PipeResolverMsg.class.getName());
-
-    private final static String MsgTypeTag = "MsgType";
-    private final static String PipeIdTag = "PipeId";
-    private final static String PipeTypeTag = "Type";
-    private final static String PeerIdTag = "Peer";
-    private final static String PeerAdvTag = "PeerAdv";
-    private final static String FoundTag = "Found";
-
-    private final static String QueryMsgType = "Query";
-    private final static String AnswerMsgType = "Answer";
-
-    public PipeResolverMsg() {}
-
-    public PipeResolverMsg(Element root) {
-        initialize(root);
-    }
-
-    private void initialize(Element root) {
-        if (!TextElement.class.isInstance(root)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports TextElement");
-        }
-
-        TextElement doc = (TextElement) root;
-
-        String docName = doc.getName();
-
-        if (!docName.equals(getMessageType())) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + docName);
-        }
-
-        Enumeration each = doc.getChildren();
-
-        while (each.hasMoreElements()) {
-            TextElement elem = (TextElement) each.nextElement();
-
-            if (elem.getName().equals(MsgTypeTag)) {
-                String msgtype = elem.getTextValue();
-
-                if (msgtype.equals(QueryMsgType)) {
-                    setMsgType(PipeResolverMessage.MessageType.QUERY);
-                } else if (msgtype.equals(AnswerMsgType)) {
-                    setMsgType(PipeResolverMessage.MessageType.ANSWER);
-                } else {
-                    throw new IllegalArgumentException("Unexpected Message Type in parsing.");
-                }
-                continue;
-            }
-
-            if (elem.getName().equals(PipeIdTag)) {
-                try {
-                    URI pipeID = new URI(elem.getTextValue());
-
-                    setPipeID(IDFactory.fromURI(pipeID));
-                } catch (URISyntaxException badID) {
-                    throw new IllegalArgumentException("Bad pipe ID in message");
-                }
-                continue;
-            }
-
-            if (elem.getName().equals(PipeTypeTag)) {
-                setPipeType(elem.getTextValue());
-                continue;
-            }
-
-            if (elem.getName().equals(PeerIdTag)) {
-                try {
-                    URI peerID = new URI(elem.getTextValue());
-
-                    addPeerID(IDFactory.fromURI(peerID));
-                } catch (URISyntaxException badID) {
-                    throw new IllegalArgumentException("Bad peer ID in message");
-                }
-                continue;
-            }
-
-            if (elem.getName().equals(FoundTag)) {
-                setFound(Boolean.valueOf(elem.getTextValue()));
-                continue;
-            }
-
-            // let's check whether the responder sent us a adv
-            if (elem.getName().equals(PeerAdvTag)) {
-                String peerAdv = elem.getTextValue();
-
-                try {
-                    setInputPeerAdv(
-                            (PeerAdvertisement) AdvertisementFactory.newAdvertisement(MimeMediaType.XMLUTF8
-                            ,
-                            new StringReader(peerAdv)));
-                } catch (IOException caught) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.log(Level.FINE, "Malformed peer adv in message", caught);
-                    }
-                    throw new IllegalArgumentException("Malformed peer adv in message : " + caught.getMessage());
-                }
-            }
-
-        }
-
-        // Begin validation
-        PipeResolverMessage.MessageType msgType = getMsgType();
-
-        if (null == msgType) {
-            throw new IllegalArgumentException("Message type was never set!");
-        }
-
-        ID pipeID = getPipeID();
-
-        if ((null == pipeID) || ID.nullID.equals(pipeID) || !(pipeID instanceof PipeID)) {
-            throw new IllegalArgumentException("Input Pipe ID not set or invalid");
-        }
-
-        if (null == getPipeType()) {
-            throw new IllegalArgumentException("Pipe type was never set!");
-        }
-
-        // Response extra checks
-        if (PipeResolverMessage.MessageType.ANSWER.equals(msgType)) {
-            if (getPeerIDs().isEmpty()) {
-                throw new IllegalArgumentException("An answer without responses is invalid");
-            }
-        }
-    }
-
-    /**
-     * Creates a document out of the message.
-     *
-     * @param encodeAs The document representation format requested.
-     * @return the message as a document.
-     */
-    @Override
-    public Document getDocument(MimeMediaType encodeAs) {
-        StructuredTextDocument doc = (StructuredTextDocument)
-                StructuredDocumentFactory.newStructuredDocument(encodeAs, getMessageType());
-
-        if (doc instanceof Attributable) {
-            ((Attributable) doc).addAttribute("xmlns:jxta", "http://jxta.org");
-        }
-
-        PipeResolverMessage.MessageType msgType = getMsgType();
-
-        if (null == msgType) {
-            throw new IllegalStateException("Message type was never set!");
-        }
-
-        ID pipeID = getPipeID();
-
-        if ((null == pipeID) || ID.nullID.equals(pipeID) || !(pipeID instanceof PipeID)) {
-            throw new IllegalStateException("Pipe ID not set or invalid.");
-        }
-
-        String pipeType = getPipeType();
-
-        if ((null == pipeType) || (0 == pipeType.trim().length())) {
-            throw new IllegalStateException("Pipe type was never set or is invalid.");
-        }
-
-        Element element;
-
-        if (PipeResolverMessage.MessageType.QUERY.equals(msgType)) {
-            element = doc.createElement(MsgTypeTag, QueryMsgType);
-        } else if (PipeResolverMessage.MessageType.ANSWER.equals(msgType)) {
-            element = doc.createElement(MsgTypeTag, AnswerMsgType);
-        } else {
-            throw new IllegalStateException("Unknown message type :" + msgType.toString());
-        }
-        doc.appendChild(element);
-
-        element = doc.createElement(PipeIdTag, pipeID.toString());
-        doc.appendChild(element);
-
-        if ((pipeType != null) && (0 != pipeType.length())) {
-            element = doc.createElement(PipeTypeTag, pipeType);
-            doc.appendChild(element);
-        }
-
-        // Write the peer ids.
-        Set peers = getPeerIDs();
-
-        if (PipeResolverMessage.MessageType.ANSWER.equals(msgType) && peers.isEmpty()) {
-            throw new IllegalStateException("An ANSWER message must contain at least one peer as part of the response.");
-        }
-
-        for (Object peer : peers) {
-            ID aPeer = (ID) peer;
-
-            element = doc.createElement(PeerIdTag, aPeer.toString());
-            doc.appendChild(element);
-        }
-
-        if (PipeResolverMessage.MessageType.QUERY.equals(msgType)) {// nothing for now...
-        } else if (PipeResolverMessage.MessageType.ANSWER.equals(msgType)) {
-            element = doc.createElement(FoundTag, (isFound() ? Boolean.TRUE : Boolean.FALSE).toString());
-            doc.appendChild(element);
-
-            PeerAdvertisement peerAdv = getInputPeerAdv();
-
-            if (peerAdv != null) {
-                if (!peers.contains(peerAdv.getPeerID())) {
-                    throw new IllegalStateException(
-                            "Provided Peer Advertisement does not refer to one of the peers in the response list.");
-                }
-
-                StructuredTextDocument asDoc = (StructuredTextDocument) peerAdv.getDocument(MimeMediaType.XMLUTF8);
-
-                element = doc.createElement(PeerAdvTag, asDoc.toString());
-                doc.appendChild(element);
-            }
-        } else {
-            throw new IllegalStateException("Unknown message type :" + msgType.toString());
-        }
-        return doc;
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PlatformConfig.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/PlatformConfig.java
deleted file mode 100644 (file)
index 181d0fb..0000000
+++ /dev/null
@@ -1,441 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Attribute;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.document.XMLElement;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.logging.Logging;
-import net.jxta.peer.PeerID;
-import net.jxta.protocol.ConfigParams;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Enumeration;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * Configuration container for the World Peer Group. For historical reasons the
- * same configuration container and instance is also used for the Net Peer Group.
- */
-public final class PlatformConfig extends GroupConfig implements Cloneable {
-
-    private static final String advType = "jxta:PlatformConfig";
-
-    /**
-     * Instantiator for PlatformConfig
-     */
-    public final static class Instantiator implements AdvertisementFactory.Instantiator {
-
-        /**
-         * {@inheritDoc}
-         */
-        public String getAdvertisementType() {
-            return advType;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance() {
-            return new PlatformConfig();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance(Element root) {
-            if (!XMLElement.class.isInstance(root)) {
-                throw new IllegalArgumentException(advType + " only supports XLMElement");
-            }
-
-            return new PlatformConfig((XMLElement) root);
-        }
-    }
-
-    private static final Logger LOG = Logger.getLogger(PlatformConfig.class.getName());
-
-    private static final String PID_TAG = "PID";
-    private static final String NAME_TAG = "Name";
-    private static final String DESC_TAG = "Desc";
-
-    /**
-     * The id of this peer.
-     */
-    private PeerID pid = null;
-
-    /**
-     * The name of this peer. Not guaranteed to be unique in any way. May be
-     * empty or null.
-     */
-    private String name = null;
-
-    /**
-     * Descriptive meta-data about this peer.
-     */
-    private Element description = null;
-
-    /**
-     * Use the Instantiator through the factory
-     */
-    PlatformConfig() {}
-
-    /**
-     * Use the Instantiator through the factory
-     *
-     * @param doc the element
-     */
-    PlatformConfig(XMLElement doc) {
-        String doctype = doc.getName();
-
-        String typedoctype = "";
-        Attribute itsType = doc.getAttribute("type");
-
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-
-        if (!doctype.equals(getAdvertisementType()) && !getAdvertisementType().equals(typedoctype)) {
-            throw new IllegalArgumentException( "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-
-        Enumeration<XMLElement> elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            XMLElement elem = elements.nextElement();
-
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Unhandled Element: " + elem.toString());
-                }
-            }
-        }
-    }
-
-    /**
-     * Make a safe clone of this PlatformConfig.
-     *
-     * @return Object an object of class PlatformConfig that is a deep-enough
-     *         copy of this one.
-     */
-    @Override
-    public PlatformConfig clone() {
-        PlatformConfig result = (PlatformConfig) super.clone();
-
-        result.setPeerID(getPeerID());
-        result.setName(getName());
-        result.setDesc(getDesc());
-
-        return result;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object other) {
-        if(this == other) {
-            return true;
-        }
-        
-        if(other instanceof PlatformConfig) {
-            PlatformConfig likeMe = (PlatformConfig) other;
-            
-            boolean se = super.equals(likeMe);
-            
-            boolean ne = ((null == name) && (null == likeMe.name)) || ((null != name) && name.equals(likeMe.name));
-            boolean ie = ((null == pid) && (null == likeMe.pid)) || ((null != pid) && pid.equals(likeMe.pid));
-            boolean de = ((null == description) && (null == likeMe.description)) || ((null != description) && description.equals(likeMe.description));
-            
-            return se && ne && ie && de;
-        }
-        
-        return false;
-    }
-    
-    /**
-     * returns the advertisement type
-     *
-     * @return string type
-     */
-    public static String getAdvertisementType() {
-        return advType;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     * returns the name of the peer.
-     *
-     * @return String name of the peer.
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * sets the name of the peer.
-     *
-     * @param name name of the peer.
-     */
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    /**
-     * Returns the id of the peer.
-     *
-     * @return PeerID the peer id
-     */
-    public PeerID getPeerID() {
-        return pid;
-    }
-
-    /**
-     * Sets the peer ID to use for this peer.
-     *
-     * @param pid The peer ID to use for this peer.
-     */
-    public void setPeerID(PeerID pid) {
-        this.pid = pid;
-    }
-
-    /**
-     * Returns a unique ID for that peer X group intersection. This is for
-     * indexing purposes only.
-     */
-    @Override
-    public ID getID() {
-        return pid;
-    }
-
-    /**
-     * returns the description
-     *
-     * @return String the description
-     */
-    public String getDescription() {
-        return (null == description) ? null : (String) description.getValue();
-    }
-
-    /**
-     * Sets the description
-     *
-     * @param description the description
-     */
-    public void setDescription(String description) {
-        StructuredDocument newdoc = null;
-
-        if (null != description) {
-            newdoc = StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, DESC_TAG, description);
-        }
-        setDesc(newdoc);
-    }
-
-    /**
-     * Returns the description
-     *
-     * @return the description
-     */
-    public StructuredDocument getDesc() {
-        StructuredDocument newDoc = null;
-
-        if (null != description) {
-            newDoc = StructuredDocumentUtils.copyAsDocument(description);
-        }
-        return newDoc;
-    }
-
-    /**
-     * Sets the description
-     *
-     * @param desc the description
-     */
-    public void setDesc(Element desc) {
-        if (null != desc) {
-            this.description = StructuredDocumentUtils.copyAsDocument(desc);
-        } else {
-            this.description = null;
-        }
-    }
-
-    /**
-     * returns the debugLevel
-     *
-     * @deprecated The debug level is no longer set via this api. See
-     * {@link net.jxta.logging.Logging}.
-     *
-     * @return String the debugLevel
-     */
-    @Deprecated
-    public String getDebugLevel() {
-        return "user default";
-    }
-
-    /**
-     * Sets the debugLevel
-     *
-     * @deprecated The debug level is no longer set via this api. See
-     * {@link net.jxta.logging.Logging}.
-     *
-     * @param debugLevel the debugLevel
-     */
-    @Deprecated
-    public void setDebugLevel(String debugLevel) {}
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected boolean handleElement(Element raw) {
-
-        if (super.handleElement(raw)) {
-            return true;
-        }
-
-        XMLElement elem = (XMLElement) raw;
-        String elName = elem.getName();
-
-        if (DESC_TAG.equals(elName)) {
-            setDesc(elem);
-            return true;
-        }
-
-        String value = elem.getTextValue();
-
-        if (null == value) {
-            return false;
-        }
-        value = value.trim();
-
-        if (0 == value.length()) {
-            return false;
-        }
-
-        if (PID_TAG.equals(elName)) {
-            try {
-                URI asURI = new URI(value);
-                PeerID pID = (PeerID) IDFactory.fromURI(asURI);
-
-                setPeerID(pID);
-            } catch (URISyntaxException badID) {
-                throw new IllegalArgumentException("Invalid PeerID in advertisement: " + value);
-            } catch (ClassCastException badID) {
-                throw new IllegalArgumentException("Invalid PeerID: " + value);
-            }
-            return true;
-        }
-
-        if (NAME_TAG.equals(elName)) {
-            setName(value);
-            return true;
-        }
-
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean addDocumentElements(StructuredDocument adv) {
-
-        Element e;
-        // peer ID is optional. (at least for the PlatformConfig it is)
-        PeerID peerID = getPeerID();
-
-        if ((null != peerID) && !ID.nullID.equals(peerID)) {
-            e = adv.createElement(PID_TAG, peerID.toString());
-            adv.appendChild(e);
-        }
-
-        // name is optional
-        if (getName() != null) {
-            e = adv.createElement(NAME_TAG, getName());
-            adv.appendChild(e);
-        }
-
-        // desc is optional
-        StructuredDocument desc = getDesc();
-
-        if (desc != null) {
-            StructuredDocumentUtils.copyElements(adv, adv, desc);
-        }
-        
-        super.addDocumentElements(adv);
-
-        return true;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/RdvAdv.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/RdvAdv.java
deleted file mode 100644 (file)
index 05d12b5..0000000
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import java.net.URI;
-import java.util.Enumeration;
-
-import java.net.URISyntaxException;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Attribute;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredTextDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.id.IDFactory;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.protocol.RdvAdvertisement;
-import net.jxta.protocol.RouteAdvertisement;
-
-
-/**
- * This class implements the RdvAdvertisement.
- *
- * <p/><pre>
- *   &lt;xs:complexType name="RdvAdvertisement">
- *     &lt;xs:sequence>
- *       &lt;xs:element name="RdvGroupId" type="jxta:JXTAID"/>
- *       &lt;xs:element name="RdvPeerId" type="jxta:JXTAID"/>
- *       &lt;xs:element name="RdvServiceName" type="xs:string"/>
- *       &lt;xs:element name="Name" type="xs:string" minOccurs="0"/>
- *       &lt;!-- This should be a route -->
- *       &lt;xs:element name="RdvRoute" type="xs:anyType" minOccurs="0"/>
- *     &lt;/xs:sequence>
- *   &lt;/xs:complexType>
- * </pre>
- **/
-public class RdvAdv extends RdvAdvertisement {
-    
-    /**
-     *  Log4J Logger
-     **/
-    private final static transient Logger LOG = Logger.getLogger(RdvAdv.class.getName());   
-    
-    private static final String[] INDEX_FIELDS = { PeerIDTag, ServiceNameTag, GroupIDTag };
-    
-    /**
-     * Instantiator for our advertisement
-     **/
-    public static class Instantiator implements AdvertisementFactory.Instantiator {
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public String getAdvertisementType() {
-            return RdvAdv.getAdvertisementType();
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public Advertisement newInstance() {
-            return new RdvAdv();
-        }
-        
-        /**
-         * {@inheritDoc}
-         **/
-        public Advertisement newInstance(Element root) {
-            if (!XMLElement.class.isInstance(root)) {
-                throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-            }
-        
-            return new RdvAdv((XMLElement) root);
-        }
-    }
-    
-    /**
-     *  Private constructor for new instances. Use the instantiator.
-     */
-    private RdvAdv() {
-    }
-
-    /**
-     *  Private constructor for xml serialized instances. Use the instantiator.
-     *  
-     *  @param doc The XML serialization of the advertisement.
-     */
-    private RdvAdv(XMLElement doc) {
-        String doctype = doc.getName();
-        
-        String typedoctype = "";
-        Attribute itsType = doc.getAttribute("type");
-
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-        
-        if (!doctype.equals(getAdvertisementType()) && !getAdvertisementType().equals(typedoctype)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-        
-        Enumeration elements = doc.getChildren();
-        
-        while (elements.hasMoreElements()) {
-            XMLElement elem = (XMLElement) elements.nextElement();
-            
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Unhandled Element: " + elem.toString());
-                }
-            }
-        }
-        
-        // Sanity Check!!!
-        if (null == getGroupID()) {
-            throw new IllegalArgumentException("Missing peer group ID");
-        }
-        
-        if (null == getPeerID()) {
-            throw new IllegalArgumentException("Missing peer ID");
-        }
-        
-        if (null == getServiceName()) {
-            throw new IllegalArgumentException("Missing service name");
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    protected boolean handleElement(Element raw) {
-        
-        if (super.handleElement(raw)) {
-            return true;
-        }
-        
-        XMLElement elem = (XMLElement) raw;
-        
-        if (elem.getName().equals(RdvAdvertisement.GroupIDTag)) {
-            try {
-                URI groupID = new URI(elem.getTextValue().trim());
-
-                setGroupID((PeerGroupID) IDFactory.fromURI(groupID));
-            } catch (URISyntaxException badID) {
-                throw new IllegalArgumentException("Bad group ID in advertisement");
-            } catch (ClassCastException badID) {
-                throw new IllegalArgumentException("ID is not a group ID");
-            }
-            return true;
-        }
-        
-        if (elem.getName().equals(RdvAdvertisement.PeerIDTag)) {
-            try {
-                URI peerID = new URI(elem.getTextValue().trim());
-
-                setPeerID((PeerID) IDFactory.fromURI(peerID));
-            } catch (URISyntaxException badID) {
-                throw new IllegalArgumentException("Bad group ID in advertisement");
-            } catch (ClassCastException badID) {
-                throw new IllegalArgumentException("ID is not a group ID");
-            }
-            return true;
-        }
-        
-        if (elem.getName().equals(RdvAdvertisement.ServiceNameTag)) {
-            setServiceName(elem.getTextValue());
-            return true;
-        }
-        
-        if (elem.getName().equals(RdvAdvertisement.RouteTag)) {
-            for (Enumeration eachXpt = elem.getChildren(); eachXpt.hasMoreElements();) {
-                
-                XMLElement aXpt = (XMLElement) eachXpt.nextElement();
-                
-                RouteAdvertisement xptAdv = (RouteAdvertisement)
-                        AdvertisementFactory.newAdvertisement(aXpt);
-
-                setRouteAdv(xptAdv);
-            }
-            return true;
-        }
-        
-        if (elem.getName().equals(RdvAdvertisement.NameTag)) {
-            setName(elem.getTextValue());
-            return true;
-        }
-        
-        return false;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public Document getDocument(MimeMediaType encodeAs) {
-        
-        // Sanity Check!!!
-        if (null == getGroupID()) {
-            throw new IllegalStateException("Missing peer group ID");
-        }
-        
-        if (null == getPeerID()) {
-            throw new IllegalStateException("Missing peer ID");
-        }
-        
-        if (null == getServiceName()) {
-            throw new IllegalStateException("Missing service name");
-        }
-
-        StructuredDocument adv = (StructuredDocument) super.getDocument(encodeAs);
-        
-        Element e = adv.createElement(RdvAdvertisement.GroupIDTag, getGroupID().toString());
-
-        adv.appendChild(e);
-        
-        e = adv.createElement(RdvAdvertisement.PeerIDTag, getPeerID().toString());
-        adv.appendChild(e);
-        
-        e = adv.createElement(RdvAdvertisement.ServiceNameTag, getServiceName());
-        adv.appendChild(e);
-        
-        String peerName = getName();
-
-        if (null != peerName) {
-            e = adv.createElement(RdvAdvertisement.NameTag, getName());
-            adv.appendChild(e);
-        }
-        
-        if (getRouteAdv() != null) {
-            Element el = adv.createElement(RdvAdvertisement.RouteTag);
-
-            adv.appendChild(el);
-            
-            StructuredTextDocument xptDoc = (StructuredTextDocument)
-                    getRouteAdv().getDocument(encodeAs);
-
-            StructuredDocumentUtils.copyElements(adv, el, xptDoc);
-        }
-        
-        return adv;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public String[] getIndexFields() {
-        return INDEX_FIELDS;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/RdvConfigAdv.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/RdvConfigAdv.java
deleted file mode 100644 (file)
index b743e16..0000000
+++ /dev/null
@@ -1,948 +0,0 @@
-/*
- * Copyright (c) 2004-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Attributable;
-import net.jxta.document.Attribute;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.ExtendableAdvertisement;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.id.ID;
-import net.jxta.logging.Logging;
-
-import java.net.URI;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * Contains parameters for configuration of the Reference Implementation
- * Rendezvous Service.
- * <p/>
- * <p/><pre><code>
- * &lt;xs:complexType name="RdvConfig">
- *   &lt;xs:sequence>
- *     &lt;xs:element name="seeds" minOccurs="0" maxOccurs="1">
- *       &lt;xs:complexType>
- *         &lt;xs:sequence>
- *           &lt;xs:element name="addr" minOccurs="1" maxOccurs="unbounded">
- *             &lt;xs:complexType>
- *               &lt;xs:simpleContent>
- *                 &lt;xs:extension base="jxta:JXTAID">
- *                   &lt;xs:attribute name="seeding" type="xs:boolean" default="false"/>
- *                 &lt;/xs:extension>
- *               &lt;/xs:simpleContent>
- *             &lt;/xs:complexType>
- *           &lt;/xs:element>
- *         &lt;/xs:sequence>
- *         &lt;xs:attribute name="useOnlySeeds" type="xs:boolean" default="false"/>
- *         &lt;xs:attribute name="connectDelay" type="xs:unsignedLong"/>
- *       &lt;/xs:complexType>
- *     &lt;/xs:element>
- *   &lt;/xs:sequence>
- *   &lt;xs:attribute name="config" type="jxta:RdvConfiguration"/>
- *   &lt;xs:attribute name="maxTTL" type="xs:unsignedInt"/>
- *   &lt;xs:attribute name="autoRendezvousInterval" type="xs:unsignedInt"/>
- *   &lt;xs:attribute name="probeRelays" type="xs:boolean" default="true"/>
- *   &lt;xs:attribute name="maxClients" type="xs:unsignedInt"/>
- *   &lt;xs:attribute name="leaseDuration" type="xs:unsignedLong"/>
- *   &lt;xs:attribute name="leaseMargin" type="xs:unsignedLong"/>
- *   &lt;xs:attribute name="minHappyPeerView" type="xs:unsignedInt"/>
- * &lt;/xs:complexType>
- * </code></pre>
- *
- * @since JXTA 2.2
- */
-public final class RdvConfigAdv extends ExtendableAdvertisement implements Cloneable {
-
-    /**
-     * Logger
-     */
-    private static final Logger LOG = Logger.getLogger(RdvConfigAdv.class.getName());
-
-    /**
-     * Instantiator for RdvConfigAdv
-     */
-    public static class Instantiator implements AdvertisementFactory.Instantiator {
-
-        /**
-         * {@inheritDoc}
-         */
-        public String getAdvertisementType() {
-            return advType;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance() {
-            return new RdvConfigAdv();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance(Element root) {
-            if (!XMLElement.class.isInstance(root)) {
-                throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-            }
-
-            return new RdvConfigAdv((XMLElement) root);
-        }
-    }
-
-    /**
-     * Our DOCTYPE
-     */
-    private static final String advType = "jxta:RdvConfig";
-
-    private static final String RDV_CONFIG_ATTR = "config";
-    private static final String MAX_TTL_ATTR = "maxTTL";
-    private static final String AUTO_RDV_INTERVAL_ATTR = "autoRendezvousInterval";
-    private static final String PROBE_RELAYS_ATTR = "probeRelays";
-    private static final String MAX_CLIENTS_ATTR = "maxClients";
-    private static final String LEASE_DURATION_ATTR = "leaseDuration";
-    private static final String LEASE_MARGIN_ATTR = "leaseMargin";
-    private static final String MIN_HAPPY_PEERVIEW_ATTR = "minHappyPeerView";
-
-    private static final String SEEDS_RDV_ELEMENT = "seeds";
-    private static final String USE_ONLY_SEEDS_ATTR = "useOnlySeeds";
-    private static final String CONNECT_DELAY_ATTR = "connectDelay";
-
-    private static final String SEED_RDV_ADDR_ELEMENT = "addr";
-    private static final String SEED_RDV_ADDR_SEEDING_ATTR = "seeding";
-    private static final String ACL_URI = "acl";
-
-    // This one is deprecated.
-    private static final String PROPAGATE_RESPOND_ATTR = "propagateRespondProbability";
-
-    private static final String[] INDEXFIELDS = {};
-
-    /**
-     * Configuration for this peer.
-     */
-    private RendezVousConfiguration configuration = RendezVousConfiguration.EDGE;
-
-    /**
-     * The interval in relative milliseconds at which this peer will re-evaluate
-     * it's state as a rendezvous. If <code>0</code> (zero), the default, then
-     * the peer will remain in the state of <code>isRendezvous</code>.
-     */
-    private long autoRendezvousCheckInterval = 0L;
-
-    /**
-     * If true then rendezvous clients will probe relay servers for rendezvous.
-     */
-    private boolean probeRelays = true;
-
-    /**
-     * Max Clients
-     */
-    private int maxClients = -1;
-
-    /**
-     * Maximum TTL
-     */
-    private int maximumTTL = -1;
-
-    /**
-     * Lease Duration
-     */
-    private long leaseDuration = 0L;
-
-    /**
-     * Lease Margin
-     */
-    private long leaseMargin = 0L;
-
-    /**
-     * Minimum desirable peerview size.
-     */
-    private int minHappyPeerView = -1;
-
-    /**
-     * If true then this peer will use only seed rendezvous when configured as
-     * an edge peer.
-     */
-    private boolean useOnlySeeds = false;
-
-    /**
-     * The interval in relative milliseconds before which this peer will
-     * attempt to contact the the seed peers.
-     */
-    private long seedRendezvousConnectDelay = 0L;
-
-    /**
-     * The set of seed rendezvous.
-     */
-    private final Set<URI> seedRendezvous = new HashSet<URI>();
-
-    /**
-     * The set of seeding resources.
-     */
-    private final Set<URI> seedingURIs = new HashSet<URI>();
-
-    /**
-     * Access control URI
-     */
-    private URI aclURI = null;
-
-    /**
-     * Possible Rendezvous configurations.
-     */
-    public enum RendezVousConfiguration {
-        
-        /**
-         *  Connectionless 
-         */
-        AD_HOC, 
-        
-        /**
-         *  Edge peer
-         */
-        EDGE, 
-                
-        /**
-         *  Rendezvous peer
-         */
-        RENDEZVOUS
-    }
-
-    /**
-     * Returns the identifying type of this Advertisement.
-     * <p/>
-     * <p/><b>Note:</b> This is a static method. It cannot be used to determine
-     * the runtime type of an advertisement. ie.
-     * </p><code><pre>
-     *      Advertisement adv = module.getSomeAdv();
-     *      String advType = adv.getAdvertisementType();
-     *  </pre></code>
-     * <p/>
-     * <p/><b>This is wrong and does not work the way you might expect.</b>
-     * This call is not polymorphic and calls
-     * Advertisement.getAdvertisementType() no matter what the real type of the
-     * advertisement.
-     *
-     * @return String the type of advertisement
-     */
-    public static String getAdvertisementType() {
-        return advType;
-    }
-
-    /**
-     *  Private constructor for new instances. Use the instantiator.
-     */
-    private RdvConfigAdv() {}
-
-    /**
-     *  Private constructor for xml serialized instances. Use the instantiator.
-     *  
-     *  @param doc The XML serialization of the advertisement.
-     */
-    private RdvConfigAdv(XMLElement doc) {
-        String doctype = doc.getName();
-
-        String typedoctype = "";
-        Attribute itsType = doc.getAttribute("type");
-
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-
-        if (!doctype.equals(getAdvertisementType()) && !getAdvertisementType().equals(typedoctype)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-
-        Enumeration eachAttr = doc.getAttributes();
-
-        while (eachAttr.hasMoreElements()) {
-            Attribute aRdvAttr = (Attribute) eachAttr.nextElement();
-
-            if (super.handleAttribute(aRdvAttr)) {// nothing to do
-            } else if (RDV_CONFIG_ATTR.equals(aRdvAttr.getName())) {
-                String config = aRdvAttr.getValue().trim();
-
-                if ("adhoc".equals(config)) {
-                    configuration = RendezVousConfiguration.AD_HOC;
-                } else if ("client".equals(config)) {
-                    configuration = RendezVousConfiguration.EDGE;
-                } else if ("rendezvous".equals(config)) {
-                    configuration = RendezVousConfiguration.RENDEZVOUS;
-                } else {
-                    throw new IllegalArgumentException("Unrecognized Rendezvous configuration :" + config);
-                }
-            } else if (MAX_TTL_ATTR.equals(aRdvAttr.getName())) {
-                maximumTTL = Integer.parseInt(aRdvAttr.getValue().trim());
-            } else if (AUTO_RDV_INTERVAL_ATTR.equals(aRdvAttr.getName())) {
-                autoRendezvousCheckInterval = Long.parseLong(aRdvAttr.getValue().trim());
-            } else if (PROBE_RELAYS_ATTR.equals(aRdvAttr.getName())) {
-                probeRelays = Boolean.valueOf(aRdvAttr.getValue().trim());
-            } else if (MAX_CLIENTS_ATTR.equals(aRdvAttr.getName())) {
-                maxClients = Integer.parseInt(aRdvAttr.getValue().trim());
-            } else if (LEASE_DURATION_ATTR.equals(aRdvAttr.getName())) {
-                leaseDuration = Long.parseLong(aRdvAttr.getValue().trim());
-            } else if (LEASE_MARGIN_ATTR.equals(aRdvAttr.getName())) {
-                leaseMargin = Long.parseLong(aRdvAttr.getValue().trim());
-            } else if (MIN_HAPPY_PEERVIEW_ATTR.equals(aRdvAttr.getName())) {
-                minHappyPeerView = Integer.parseInt(aRdvAttr.getValue().trim());
-            } else if (PROPAGATE_RESPOND_ATTR.equals(aRdvAttr.getName())) {// Ignored; deprecated.
-            } else if ("Flags".equals(aRdvAttr.getName())) { // deprecated
-                boolean onlySeeds = (aRdvAttr.getValue().indexOf("UseOnlySeeds") != -1);
-
-                setUseOnlySeeds(onlySeeds);
-            } else {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Unhandled Attribute: " + aRdvAttr.getName());
-                }
-            }
-        }
-
-        Enumeration elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            XMLElement elem = (XMLElement) elements.nextElement();
-
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Unhandled Element: " + elem.toString());
-                }
-            }
-        }
-
-        // Sanity Check!!!
-
-        if ((maximumTTL != -1) && (maximumTTL < 0)) {
-            throw new IllegalArgumentException("Maximum TTL must be >= 0");
-        }
-
-        if (autoRendezvousCheckInterval < 0) {
-            throw new IllegalArgumentException("Auto Rendezvous Check Interval must be >= 0");
-        }
-
-        if (seedRendezvousConnectDelay < 0) {
-            throw new IllegalArgumentException("Seed Rendezvous Connect Delay must be >= 0");
-        }
-
-        if ((-1 != minHappyPeerView) && (minHappyPeerView <= 0)) {
-            throw new IllegalArgumentException("Min Happy Peer View must be > 0");
-        }
-
-        if ((seedingURIs.isEmpty() && seedRendezvous.isEmpty() && useOnlySeeds) && (configuration == RendezVousConfiguration.EDGE)) {
-            throw new IllegalArgumentException("Must specify rendezvous if 'useOnlySeeds' is enabled and configured as client");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public final String getBaseAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public ID getID() {
-        return ID.nullID;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected boolean handleElement(Element raw) {
-
-        if (super.handleElement(raw)) {
-            return true;
-        }
-
-        XMLElement elem = (XMLElement) raw;
-
-        if (SEEDS_RDV_ELEMENT.equals(elem.getName())) {
-
-            Enumeration eachSeedElem = elem.getChildren();
-
-            while (eachSeedElem.hasMoreElements()) {
-                XMLElement aSeedElem = (XMLElement) eachSeedElem.nextElement();
-
-                if (SEED_RDV_ADDR_ELEMENT.equals(aSeedElem.getName())) {
-                    String endpAddrString = aSeedElem.getTextValue();
-
-                    if (null != endpAddrString) {
-                        URI endpAddr = URI.create(endpAddrString.trim());
-
-                        Attribute seedingAttr = aSeedElem.getAttribute(SEED_RDV_ADDR_SEEDING_ATTR);
-
-                        if ((null != seedingAttr) && Boolean.valueOf(seedingAttr.getValue().trim())) {
-                            seedingURIs.add(endpAddr);
-                        } else {
-                            seedRendezvous.add(endpAddr);
-                        }
-                    }
-                } else {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Unhandled Element: " + aSeedElem.getName());
-                    }
-                }
-            }
-
-            Enumeration eachAttr = elem.getAttributes();
-
-            while (eachAttr.hasMoreElements()) {
-                Attribute aSeedAttr = (Attribute) eachAttr.nextElement();
-
-                if (USE_ONLY_SEEDS_ATTR.equals(aSeedAttr.getName())) {
-                    useOnlySeeds = Boolean.valueOf(aSeedAttr.getValue().trim());
-                } else if (CONNECT_DELAY_ATTR.equals(aSeedAttr.getName())) {
-                    seedRendezvousConnectDelay = Long.parseLong(aSeedAttr.getValue().trim());
-                } else {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Unhandled Attribute: " + aSeedAttr.getName());
-                    }
-                }
-            }
-
-            return true;
-        } else if (ACL_URI.equals(elem.getName())) {
-            String addrElement = elem.getTextValue();
-
-            if (null != addrElement) {
-                aclURI = URI.create(addrElement.trim());
-            }
-
-            return true;
-        }
-
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Document getDocument(MimeMediaType encodeAs) {
-        StructuredDocument adv = (StructuredDocument) super.getDocument(encodeAs);
-
-        if (!(adv instanceof Attributable)) {
-            throw new IllegalStateException("Only Attributable documents are supported.");
-        }
-
-        Attributable attrDoc = (Attributable) adv;
-
-        if (RendezVousConfiguration.AD_HOC == configuration) {
-            attrDoc.addAttribute(RDV_CONFIG_ATTR, "adhoc");
-        } else if (RendezVousConfiguration.EDGE == configuration) {
-            attrDoc.addAttribute(RDV_CONFIG_ATTR, "client");
-        } else if (RendezVousConfiguration.RENDEZVOUS == configuration) {
-            attrDoc.addAttribute(RDV_CONFIG_ATTR, "rendezvous");
-        }
-
-        if (maximumTTL != -1) {
-            if (maximumTTL < 0) {
-                throw new IllegalStateException("Maximum TTL must be >= 0");
-            }
-
-            attrDoc.addAttribute(MAX_TTL_ATTR, Integer.toString(maximumTTL));
-        }
-
-        if ((seedingURIs.isEmpty() && seedRendezvous.isEmpty() && useOnlySeeds) && (configuration == RendezVousConfiguration.EDGE)) {
-            throw new IllegalStateException("Must specify rendezvous if 'useOnlySeeds' is enabled and configured as client");
-        }
-
-        if (0 != autoRendezvousCheckInterval) {
-            if (autoRendezvousCheckInterval < 0) {
-                throw new IllegalStateException("Auto Rendezvous Check Interval must be >= 0");
-            }
-
-            attrDoc.addAttribute(AUTO_RDV_INTERVAL_ATTR, Long.toString(autoRendezvousCheckInterval));
-        }
-
-        if (!probeRelays) {
-            attrDoc.addAttribute(PROBE_RELAYS_ATTR, Boolean.toString(probeRelays));
-        }
-
-        if (-1 != maxClients) {
-            if (maxClients < 0) {
-                throw new IllegalStateException("Max Clients must be >= 0");
-            }
-
-            attrDoc.addAttribute(MAX_CLIENTS_ATTR, Integer.toString(maxClients));
-        }
-
-        if (0 != leaseDuration) {
-            if (leaseDuration < 0) {
-                throw new IllegalStateException("Lease Duration must be >= 0");
-            }
-
-            attrDoc.addAttribute(LEASE_DURATION_ATTR, Long.toString(leaseDuration));
-        }
-
-        if (0 != leaseMargin) {
-            if (leaseMargin < 0) {
-                throw new IllegalStateException("Lease Margin must be >= 0");
-            }
-
-            attrDoc.addAttribute(LEASE_MARGIN_ATTR, Long.toString(leaseMargin));
-        }
-
-        if (-1 != minHappyPeerView) {
-            if (minHappyPeerView < 0) {
-                throw new IllegalStateException("Min Happy Peer View must be > 0");
-            }
-
-            attrDoc.addAttribute(MIN_HAPPY_PEERVIEW_ATTR, Integer.toString(minHappyPeerView));
-        }
-
-        if (!seedRendezvous.isEmpty() || !seedingURIs.isEmpty()) {
-            Element seedsElem = adv.createElement(SEEDS_RDV_ELEMENT);
-
-            adv.appendChild(seedsElem);
-
-            Attributable attrSeeds = (Attributable) seedsElem;
-
-            if (useOnlySeeds) {
-                attrSeeds.addAttribute(USE_ONLY_SEEDS_ATTR, Boolean.toString(useOnlySeeds));
-            }
-
-            if (0 != seedRendezvousConnectDelay) {
-                if (seedRendezvousConnectDelay < 0) {
-                    throw new IllegalStateException("Seed Rendezvous Connect Delay must be >= 0");
-                }
-
-                attrSeeds.addAttribute(CONNECT_DELAY_ATTR, Long.toString(seedRendezvousConnectDelay));
-            }
-
-            for (URI seedRendezvou : seedRendezvous) {
-                Element aSeed = adv.createElement(SEED_RDV_ADDR_ELEMENT, seedRendezvou.toString());
-
-                seedsElem.appendChild(aSeed);
-            }
-
-            for (URI seedingURI : seedingURIs) {
-                Element aSeed = adv.createElement(SEED_RDV_ADDR_ELEMENT, seedingURI.toString());
-
-                seedsElem.appendChild(aSeed);
-
-                Attributable seedAttr = (Attributable) aSeed;
-
-                seedAttr.addAttribute(SEED_RDV_ADDR_SEEDING_ATTR, Boolean.TRUE.toString());
-            }
-            if (aclURI != null) {
-                Element acl = adv.createElement(ACL_URI, aclURI.toString());
-
-                adv.appendChild(acl);
-            }
-        }
-
-        return adv;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String[] getIndexFields() {
-        return INDEXFIELDS;
-    }
-
-    /**
-     * True if this peer is to default to act as a rendezvous.
-     *
-     * @return True if this peer is to be a rendezvous
-     */
-    public RendezVousConfiguration getConfiguration() {
-        return configuration;
-    }
-
-    /**
-     * Set the default rendezvous state of this peer.
-     *
-     * @param newstate if true then this peer should default to acting as a
-     *                 rendezvous.
-     */
-    public void setConfiguration(RendezVousConfiguration newstate) {
-        configuration = newstate;
-    }
-
-    /**
-     * The interval in relative milliseconds at which this peer will re-evaluate
-     * it's state as a rendezvous. If <code>0</code> (zero), the default, then
-     * the peer will remain in the state of <code>isRendezvous</code>.
-     *
-     * @return The interval in relative milliseconds at which this peer will re-evaluate
-     *         it's state as a rendezvous. If <code>0</code> (zero), the default, then
-     *         the peer will remain in the state of <code>isRendezvous</code>.
-     */
-    public long getAutoRendezvousCheckInterval() {
-        return autoRendezvousCheckInterval;
-    }
-
-    /**
-     * Sets the interval in relative milliseconds at which this peer will re-evaluate
-     * it's state as a rendezvous. If <code>0</code> (zero), the default, then
-     * the peer will remain in the state of <code>isRendezvous</code>.
-     *
-     * @param newvalue The interval in relative milliseconds at which this peer
-     *                 will re-evaluate it's state as a rendezvous. If <code>0</code> (zero),
-     *                 the default, then the peer will remain in the state of
-     *                 <code>isRendezvous</code>.
-     */
-    public void setAutoRendezvousCheckInterval(long newvalue) {
-        if (newvalue < 0) {
-            throw new IllegalArgumentException("Auto Rendezvous Check Interval must be >= 0");
-        }
-
-        autoRendezvousCheckInterval = newvalue;
-    }
-
-    /**
-     * If true then rendezvous clients will probe relay servers for rendezvous.
-     *
-     * @return If true then rendezvous clients will probe relay servers for rendezvous.
-     */
-    public boolean getProbeRelays() {
-        return probeRelays;
-    }
-
-    /**
-     * Set whether rendezvous clients will probe relay servers for rendezvous.
-     *
-     * @param doProbe If true then rendezvous clients will probe relay servers for rendezvous.
-     */
-    public void setProbeRelays(boolean doProbe) {
-        probeRelays = doProbe;
-    }
-
-    public URI[] getSeedRendezvous() {
-        return seedRendezvous.toArray(new URI[seedRendezvous.size()]);
-    }
-
-    public void addSeedRendezvous(URI addr) {
-        if (null == addr) {
-            throw new IllegalArgumentException("addr may not be null");
-        }
-
-        seedRendezvous.add(addr);
-    }
-
-    public void addSeedRendezvous(String addr) {
-        if (null == addr) {
-            throw new IllegalArgumentException("addr may not be null");
-        }
-
-        seedRendezvous.add(URI.create(addr));
-    }
-
-    public boolean removeSeedRendezvous(URI addr) {
-        if (null == addr) {
-            throw new IllegalArgumentException("addr may not be null");
-        }
-
-        return seedRendezvous.remove(addr);
-    }
-
-    public void clearSeedRendezvous() {
-        seedRendezvous.clear();
-    }
-
-    public URI[] getSeedingURIs() {
-        return seedingURIs.toArray(new URI[seedingURIs.size()]);
-    }
-
-    public void addSeedingURI(URI addr) {
-        if (null == addr) {
-            throw new IllegalArgumentException("addr may not be null");
-        }
-
-        seedingURIs.add(addr);
-    }
-
-    public void addSeedingURI(String addr) {
-        if (null == addr) {
-            throw new IllegalArgumentException("addr may not be null");
-        }
-
-        seedingURIs.add(URI.create(addr));
-    }
-
-    public boolean removeSeedingURI(URI addr) {
-        if (null == addr) {
-            throw new IllegalArgumentException("addr may not be null");
-        }
-
-        return seedingURIs.remove(addr);
-    }
-
-    public void clearSeedingURIs() {
-        seedingURIs.clear();
-    }
-
-    /**
-     * If true then this peer will use only seed rendezvous when configured as
-     * an edge peer.
-     *
-     * @return If true then this peer will use only seed rendezvous when
-     *         configured as an edge peer.
-     */
-    public boolean getUseOnlySeeds() {
-        return useOnlySeeds;
-    }
-
-    /**
-     * Set whether this peer will use only seed rendezvous when configured as
-     * an edge peer.
-     *
-     * @param onlySeeds If true then this peer will use only seed rendezvous
-     *                  when configured as an edge peer.
-     */
-    public void setUseOnlySeeds(boolean onlySeeds) {
-        useOnlySeeds = onlySeeds;
-    }
-
-    /**
-     * The interval in relative milliseconds before which this peer will
-     * attempt to contact the the seed peers.
-     *
-     * @return The interval in relative milliseconds before which this peer will
-     *         attempt to contact the the seed peers.
-     */
-    public long getSeedRendezvousConnectDelay() {
-        return seedRendezvousConnectDelay;
-    }
-
-    /**
-     * Sets the interval in relative milliseconds before which this peer will
-     * attempt to contact the the seed peers.
-     *
-     * @param newvalue The interval in relative milliseconds before which this peer will
-     *                 attempt to contact the the seed peers  or
-     *                 <code>-1</code> for the default value.
-     */
-    public void setSeedRendezvousConnectDelay(long newvalue) {
-        if ((-1 != newvalue) && (newvalue < 0)) {
-            throw new IllegalArgumentException("Seed Rendezvous Connect Delay must be >= 0");
-        }
-
-        seedRendezvousConnectDelay = newvalue;
-    }
-
-    /**
-     * The interval in relative milliseconds of leases offered by rendezvous
-     * peers.
-     *
-     * @return The interval in relative milliseconds of leases offered by rendezvous
-     *         peers.
-     */
-    public long getLeaseDuration() {
-        return leaseDuration;
-    }
-
-    /**
-     * Sets interval in relative milliseconds of leases to be offered by rendezvous
-     * peers.
-     *
-     * @param newvalue The interval in relative milliseconds of leases to be  offered by rendezvous
-     *                 peers  or  <code>-1</code> for the default value.
-     */
-    public void setLeaseDuration(long newvalue) {
-        if ((-1 != newvalue) && (newvalue < 0)) {
-            throw new IllegalArgumentException("Lease Duration must be >= 0");
-        }
-
-        leaseDuration = newvalue;
-    }
-
-    /**
-     * The interval in relative milliseconds of leases offered by rendezvous
-     * peers.
-     *
-     * @return The interval in relative milliseconds of leases offered by rendezvous
-     *         peers.
-     */
-    public long getLeaseMargin() {
-        return leaseMargin;
-    }
-
-    /**
-     * Sets interval in relative milliseconds of leases to be offered by rendezvous
-     * peers.
-     *
-     * @param newvalue The interval in relative milliseconds of leases to be  offered by rendezvous
-     *                 peers  or
-     *                 <code>-1</code> for the default value.
-     */
-    public void setLeaseMargin(long newvalue) {
-        if ((-1 != newvalue) && (newvalue < 0)) {
-            throw new IllegalArgumentException("Lease Margin must be >= 0");
-        }
-
-        leaseMargin = newvalue;
-    }
-
-    /**
-     * Return the maximum number of clients.
-     *
-     * @return The maximum number of clients.
-     */
-    public int getMaxClients() {
-        return maxClients;
-    }
-
-    /**
-     * Sets he maximum number of clients.
-     *
-     * @param newvalue The maximum number of clients or
-     *                 <code>-1</code> for the default value.
-     */
-    public void setMaxClients(int newvalue) {
-        if ((-1 != newvalue) && (newvalue <= 0)) {
-            throw new IllegalArgumentException("Max Clients must be > 0");
-        }
-
-        maxClients = newvalue;
-    }
-
-    /**
-     * Returns the maximum TTL for messages propagated by this peer or
-     * -1 for the default value.
-     *
-     * @return the maximum TTL for messages propagated by this peer or
-     *         -1 for the default value.
-     */
-    public int getMaxTTL() {
-        return maximumTTL;
-    }
-
-    /**
-     * Sets the maximum TTL for messages propagated by this peer.
-     *
-     * @param newvalue the maximum TTL for messages propagated by this peer or
-     *                 <code>-1</code> for the default value.
-     */
-    public void setMaxTTL(int newvalue) {
-        if ((-1 != newvalue) && (newvalue <= 0)) {
-            throw new IllegalArgumentException("Max TTL must be >= 0");
-        }
-
-        maximumTTL = newvalue;
-    }
-
-    /**
-     * Returns the minimum peerview size which the rendezvous service will
-     * find sufficient.
-     *
-     * @return the minimum peerview size.
-     */
-    public int getMinHappyPeerView() {
-        return minHappyPeerView;
-    }
-
-    /**
-     * Sets the minimum peerview size which the rendezvous service will find
-     * sufficient.  If the peerview size is below that threshold, the peerview
-     * will more aggressively try to discover additional members. If permitted,
-     * the local peer may eventually decide to become a rendezvous in order for
-     * the peerview to reach that size.
-     *
-     * @param newvalue the minimum peerview size, which must be > 0 or
-     *                 <code>-1</code> for the default value.
-     */
-    public void setMinHappyPeerView(int newvalue) {
-        if ((-1 != newvalue) && (newvalue <= 0)) {
-            throw new IllegalArgumentException("Min Happy Peer View size must be > 0");
-        }
-        minHappyPeerView = newvalue;
-    }
-
-    /**
-     * Return ACL URI if set
-     *
-     * @return ACL URI if set, null otherwise
-     */
-    public URI getAclUri() {
-        return aclURI;
-    }
-
-    /**
-     * Sets ACL URI
-     *
-     * @param uri URI if set, null otherwise
-     */
-    public void setAclUri(URI uri) {
-        aclURI = uri;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/RelayConfigAdv.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/RelayConfigAdv.java
deleted file mode 100644 (file)
index 8707da7..0000000
+++ /dev/null
@@ -1,997 +0,0 @@
-/*
- * Copyright (c) 2004-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Attributable;
-import net.jxta.document.Attribute;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.ExtendableAdvertisement;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.id.ID;
-import net.jxta.impl.util.TimeUtils;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.net.URI;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Set;
-
-
-/**
- * Contains parameters for configuration of the Reference Implemenation
- * Relay Service.
- * <p/>
- * <p/><pre><code>
- * <p/>
- * </code></pre>
- */
-public final class RelayConfigAdv extends ExtendableAdvertisement implements Cloneable {
-
-    /**
-     * Log4J Logger
-     */
-    private static final Logger LOG = Logger.getLogger(RelayConfigAdv.class.getName());
-
-    /**
-     * Our DOCTYPE
-     */
-    private static final String advType = "jxta:RelayConfig";
-
-    private static final String RELAY_CLIENT_ATTR = "client";
-    private static final String RELAY_SERVER_ATTR = "server";
-
-    private static final String RELAY_CLIENT_ELEMENT = "client";
-    private static final String RELAY_CLIENT_SERVERS_ATTR = "maxRelays";
-    private static final String RELAY_CLIENT_LEASE_ATTR = "maxLease";
-    private static final String RELAY_CLIENT_POLL_ATTR = "messengerPollInterval";
-
-    private static final String RELAY_CLIENT_SEEDS_ELEMENT = "seeds";
-    private static final String USE_ONLY_SEEDS_ATTR = "useOnlySeeds";
-
-    private static final String SEED_RELAY_ADDR_ELEMENT = "addr";
-    private static final String SEED_RELAY_ADDR_SEEDING_ATTR = "seeding";
-
-    private static final String RELAY_SERVER_ELEMENT = "server";
-    private static final String RELAY_SERVER_CLIENTS_ATTR = "maxClients";
-    private static final String RELAY_SERVER_QUEUE_ATTR = "clientQueue";
-    private static final String RELAY_SERVER_LEASE_ATTR = "leaseDuration";
-    private static final String RELAY_SERVER_STALL_ATTR = "stallTimeout";
-    private static final String RELAY_SERVER_ANNOUNCE_ATTR = "announceInterval";
-    private static final String ACL_URI = "acl";
-
-    private static final String[] fields = {};
-
-    /**
-     * Are we configured as a relay client?
-     */
-    private boolean clientEnabled = false;
-
-    /**
-     * Max Relays
-     */
-    private int maxRelays = -1;
-
-    /**
-     * Max clients lease in relative milliseconds.
-     */
-    private long maxClientLeaseDuration = -1;
-
-    /**
-     * Messenger poll interval in relative milliseconds.
-     */
-    private long messengerPollInterval = -1;
-
-    /**
-     * Use only seeded relays.
-     */
-    private boolean useOnlySeeds = false;
-
-    /**
-     * Seed Relays
-     * <p/>
-     * <ul>
-     * <li>Elements are {@link net.jxta.endpoint.EndpointAddress}</li>
-     * </ul>
-     */
-    private Set<EndpointAddress> seedRelays = new HashSet<EndpointAddress>();
-
-    /**
-     * The list of seeding resources.
-     * <p/>
-     * <p/><ul>
-     * <li>The values are {@link java.net.URI}.</li>
-     * </ul>
-     */
-    private Set<URI> seedingURIs = new HashSet<URI>();
-
-    /**
-     * Are we configured as a relay server?
-     */
-    private boolean serverEnabled = false;
-
-    /**
-     * Max Clients
-     */
-    private int maxClients = -1;
-
-    /**
-     */
-    private int maxClientMessageQueue = -1;
-
-    /**
-     * Max Lease offered by server in relative milliseconds.
-     */
-    private long maxServerLeaseDuration = -1;
-
-    /**
-     * Stall timeout in relative milliseconds.
-     */
-    private long stallTimeout = -1;
-
-    /**
-     * Announce interval in relative milliseconds.
-     */
-    private long announceInterval = -1;
-
-    /**
-     * Access control URI
-     */
-    private URI aclURI = null;
-
-    /**
-     * Instantiator for RelayConfigAdv
-     */
-    public static class Instantiator implements AdvertisementFactory.Instantiator {
-
-        /**
-         * {@inheritDoc}
-         */
-        public String getAdvertisementType() {
-            return advType;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance() {
-            return new RelayConfigAdv();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance(Element root) {
-            return new RelayConfigAdv(root);
-        }
-    }
-
-    /**
-     * Returns the identifying type of this Advertisement.
-     * <p/>
-     * <p/><b>Note:</b> This is a static method. It cannot be used to determine
-     * the runtime type of an advertisment. ie.
-     * </p><code><pre>
-     *      Advertisement adv = module.getSomeAdv();
-     *      String advType = adv.getAdvertisementType();
-     *  </pre></code>
-     * <p/>
-     * <p/><b>This is wrong and does not work the way you might expect.</b>
-     * This call is not polymorphic and calls
-     * Advertiement.getAdvertisementType() no matter what the real type of the
-     * advertisment.
-     *
-     * @return String the type of advertisement
-     */
-    public static String getAdvertisementType() {
-        return advType;
-    }
-
-    private RelayConfigAdv() {}
-
-    private RelayConfigAdv(Element root) {
-        if (!XMLElement.class.isInstance(root)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-        }
-
-        XMLElement doc = (XMLElement) root;
-
-        String doctype = doc.getName();
-
-        String typedoctype = "";
-        Attribute itsType = doc.getAttribute("type");
-
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-
-        if (!doctype.equals(getAdvertisementType()) && !getAdvertisementType().equals(typedoctype)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-
-        Enumeration eachAttr = doc.getAttributes();
-
-        while (eachAttr.hasMoreElements()) {
-            Attribute aRelayAttr = (Attribute) eachAttr.nextElement();
-
-            if (super.handleAttribute(aRelayAttr)) {
-                // nothing to do
-                ;
-            } else if (RELAY_CLIENT_ATTR.equals(aRelayAttr.getName())) {
-                clientEnabled = Boolean.valueOf(aRelayAttr.getValue().trim());
-            } else if (RELAY_SERVER_ATTR.equals(aRelayAttr.getName())) {
-                serverEnabled = Boolean.valueOf(aRelayAttr.getValue().trim());
-            } else {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Unhandled Attribute: " + aRelayAttr.getName());
-                }
-            }
-        }
-
-        Enumeration elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            XMLElement elem = (XMLElement) elements.nextElement();
-
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Unhandled Element: " + elem.toString());
-                }
-            }
-        }
-
-        // Sanity Check!!!
-        if ((-1 != maxRelays) && (maxRelays <= 0)) {
-            throw new IllegalArgumentException("Max relays must not be negative or zero.");
-        }
-
-        if ((-1 != maxClientLeaseDuration) && (maxClientLeaseDuration <= 0)) {
-            throw new IllegalArgumentException("Max lease duration must not be negative or zero.");
-        }
-
-        if ((-1 != messengerPollInterval) && (messengerPollInterval <= 0)) {
-            throw new IllegalArgumentException("Messenger poll interval must not be negative or zero.");
-        }
-
-        if (useOnlySeeds && clientEnabled && seedRelays.isEmpty() && seedingURIs.isEmpty()) {
-            throw new IllegalArgumentException("Cannot specify 'useOnlySeeds' and no seed relays");
-        }
-
-        if ((-1 != maxClients) && (maxClients <= 0)) {
-            throw new IllegalArgumentException("Max clients must not be negative or zero.");
-        }
-
-        if ((-1 != maxClientMessageQueue) && (maxClientMessageQueue <= 0)) {
-            throw new IllegalArgumentException("Max client queue must not be negative or zero.");
-        }
-
-        if ((-1 != maxServerLeaseDuration) && (maxServerLeaseDuration <= 0)) {
-            throw new IllegalArgumentException("Max lease duration must not be negative or zero.");
-        }
-
-        if ((-1 != stallTimeout) && (stallTimeout <= 0)) {
-            throw new IllegalArgumentException("Client stall timeout duration must not be negative or zero.");
-        }
-
-        if ((-1 != announceInterval) && (announceInterval <= 0)) {
-            throw new IllegalArgumentException("Announce interval must not be negative or zero.");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public RelayConfigAdv clone() {
-
-        RelayConfigAdv result;
-        
-        try {
-            result = (RelayConfigAdv) super.clone();
-        } catch (CloneNotSupportedException impossible) {
-            throw new Error("Object.clone() threw CloneNotSupportedException", impossible);
-        }  
-
-        result.setAnnounceInterval(getAnnounceInterval());
-        result.setClientEnabled(isClientEnabled());
-        result.setClientLeaseDuration(getClientLeaseDuration());
-        result.setClientMessageQueueSize(getClientMessageQueueSize());
-        result.setMaxClients(getMaxClients());
-        result.setMaxRelays(getMaxRelays());
-        result.setMessengerPollInterval(getMessengerPollInterval());
-        result.setServerEnabled(isServerEnabled());
-        result.setServerLeaseDuration(getServerLeaseDuration());
-        result.setStallTimeout(getStallTimeout());
-        result.setUseOnlySeeds(getUseOnlySeeds());
-        
-        return result;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public final String getBaseAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public ID getID() {
-        return ID.nullID;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected boolean handleElement(Element raw) {
-
-        if (super.handleElement(raw)) {
-            return true;
-        }
-
-        XMLElement elem = (XMLElement) raw;
-
-        if (RELAY_CLIENT_ELEMENT.equals(elem.getName())) {
-            Enumeration eachAttr = elem.getAttributes();
-
-            while (eachAttr.hasMoreElements()) {
-                Attribute aRelayAttr = (Attribute) eachAttr.nextElement();
-
-                if (RELAY_CLIENT_SERVERS_ATTR.equals(aRelayAttr.getName())) {
-                    maxRelays = Integer.parseInt(aRelayAttr.getValue().trim());
-                } else if (RELAY_CLIENT_LEASE_ATTR.equals(aRelayAttr.getName())) {
-                    maxClientLeaseDuration = Long.parseLong(aRelayAttr.getValue().trim());
-                } else if (RELAY_CLIENT_POLL_ATTR.equals(aRelayAttr.getName())) {
-                    messengerPollInterval = Long.parseLong(aRelayAttr.getValue().trim());
-                } else {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Unhandled Attribute: " + aRelayAttr.getName());
-                    }
-                }
-            }
-
-            Enumeration elements = elem.getChildren();
-
-            while (elements.hasMoreElements()) {
-                XMLElement seedsElem = (XMLElement) elements.nextElement();
-
-                if (RELAY_CLIENT_SEEDS_ELEMENT.equals(seedsElem.getName())) {
-                    Enumeration eachSeedsAttr = seedsElem.getAttributes();
-
-                    while (eachSeedsAttr.hasMoreElements()) {
-                        Attribute aRelayAttr = (Attribute) eachSeedsAttr.nextElement();
-
-                        if (USE_ONLY_SEEDS_ATTR.equals(aRelayAttr.getName())) {
-                            useOnlySeeds = Boolean.valueOf(aRelayAttr.getValue().trim());
-                        } else {
-                            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                                LOG.warning("Unhandled Attribute: " + aRelayAttr.getName());
-                            }
-                        }
-                    }
-
-                    Enumeration addrElements = seedsElem.getChildren();
-
-                    while (addrElements.hasMoreElements()) {
-                        XMLElement addrElem = (XMLElement) addrElements.nextElement();
-
-                        if (SEED_RELAY_ADDR_ELEMENT.equals(addrElem.getName())) {
-                            String endpAddrString = addrElem.getTextValue();
-
-                            if (null != endpAddrString) {
-                                URI endpURI = URI.create(endpAddrString.trim());
-
-                                Attribute seedingAttr = addrElem.getAttribute(SEED_RELAY_ADDR_SEEDING_ATTR);
-
-                                if ((null != seedingAttr) && Boolean.valueOf(seedingAttr.getValue().trim())) {
-                                    seedingURIs.add(endpURI);
-                                } else {
-                                    seedRelays.add(new EndpointAddress(endpURI));
-                                }
-                            }
-                        } else {
-                            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                                LOG.warning("Unhandled Element: " + elem.toString());
-                            }
-                        }
-                    }
-                } else {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Unhandled Element: " + elem.toString());
-                    }
-                }
-            }
-
-            return true;
-        } else if (RELAY_SERVER_ELEMENT.equals(elem.getName())) {
-            Enumeration eachAttr = elem.getAttributes();
-
-            while (eachAttr.hasMoreElements()) {
-                Attribute aRelayAttr = (Attribute) eachAttr.nextElement();
-
-                if (RELAY_SERVER_CLIENTS_ATTR.equals(aRelayAttr.getName())) {
-                    maxClients = Integer.parseInt(aRelayAttr.getValue().trim());
-                } else if (RELAY_SERVER_QUEUE_ATTR.equals(aRelayAttr.getName())) {
-                    maxClientMessageQueue = Integer.parseInt(aRelayAttr.getValue().trim());
-                } else if (RELAY_SERVER_LEASE_ATTR.equals(aRelayAttr.getName())) {
-                    maxServerLeaseDuration = Long.parseLong(aRelayAttr.getValue().trim());
-                } else if (RELAY_SERVER_STALL_ATTR.equals(aRelayAttr.getName())) {
-                    stallTimeout = Long.parseLong(aRelayAttr.getValue().trim());
-                } else if (RELAY_SERVER_ANNOUNCE_ATTR.equals(aRelayAttr.getName())) {
-                    announceInterval = Long.parseLong(aRelayAttr.getValue().trim());
-                } else {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Unhandled Attribute: " + aRelayAttr.getName());
-                    }
-                }
-            }
-
-            return true;
-        } else if (ACL_URI.equals(elem.getName())) {
-            String addrElement = elem.getTextValue();
-
-            if (null != addrElement) {
-                aclURI = URI.create(addrElement.trim());
-            }
-
-            return true;
-        }
-
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Document getDocument(MimeMediaType encodeAs) {
-        StructuredDocument adv = (StructuredDocument) super.getDocument(encodeAs);
-
-        if (!(adv instanceof Attributable)) {
-            throw new IllegalStateException("Only Attributable documents are supported.");
-        }
-
-        if ((-1 != maxRelays) && (maxRelays <= 0)) {
-            throw new IllegalStateException("Max relays must not be negative or zero.");
-        }
-
-        if ((-1 != maxClientLeaseDuration) && (maxClientLeaseDuration <= 0)) {
-            throw new IllegalStateException("Max lease duration must not be negative or zero.");
-        }
-
-        if ((-1 != messengerPollInterval) && (messengerPollInterval <= 0)) {
-            throw new IllegalStateException("Messenger poll interval must not be negative or zero.");
-        }
-
-        if (useOnlySeeds && clientEnabled && seedRelays.isEmpty() && seedingURIs.isEmpty()) {
-            throw new IllegalStateException("Cannot specify 'useOnlySeeds' and no seed relays");
-        }
-
-        if ((-1 != maxClients) && (maxClients <= 0)) {
-            throw new IllegalStateException("Max clients must not be negative or zero.");
-        }
-
-        if ((-1 != maxClientMessageQueue) && (maxClientMessageQueue <= 0)) {
-            throw new IllegalStateException("Max client queue must not be negative or zero.");
-        }
-
-        if ((-1 != maxServerLeaseDuration) && (maxServerLeaseDuration <= 0)) {
-            throw new IllegalStateException("Max lease duration must not be negative or zero.");
-        }
-
-        if ((-1 != stallTimeout) && (stallTimeout <= 0)) {
-            throw new IllegalStateException("Client stall timeout duration must not be negative or zero.");
-        }
-
-        if ((-1 != announceInterval) && (announceInterval <= 0)) {
-            throw new IllegalStateException("Announce interval must not be negative or zero.");
-        }
-
-        Attributable attrDoc = (Attributable) adv;
-
-        if (clientEnabled) {
-            attrDoc.addAttribute(RELAY_CLIENT_ATTR, Boolean.TRUE.toString());
-        }
-
-        if (serverEnabled) {
-            attrDoc.addAttribute(RELAY_SERVER_ATTR, Boolean.TRUE.toString());
-        }
-
-        Element clientElem = adv.createElement(RELAY_CLIENT_ELEMENT);
-
-        adv.appendChild(clientElem);
-
-        Attributable attrElem = (Attributable) clientElem;
-
-        if (-1 != maxRelays) {
-            attrElem.addAttribute(RELAY_CLIENT_SERVERS_ATTR, Integer.toString(maxRelays));
-        }
-
-        if (-1 != maxClientLeaseDuration) {
-            attrElem.addAttribute(RELAY_CLIENT_LEASE_ATTR, Long.toString(maxClientLeaseDuration));
-        }
-
-        if (-1 != messengerPollInterval) {
-            attrElem.addAttribute(RELAY_CLIENT_POLL_ATTR, Long.toString(messengerPollInterval));
-        }
-
-        if (!seedRelays.isEmpty() || !seedingURIs.isEmpty()) {
-            Element seedsElem = adv.createElement(RELAY_CLIENT_SEEDS_ELEMENT);
-
-            clientElem.appendChild(seedsElem);
-
-            attrElem = (Attributable) seedsElem;
-
-            if (useOnlySeeds) {
-                attrElem.addAttribute(USE_ONLY_SEEDS_ATTR, Boolean.TRUE.toString());
-            }
-
-            for (EndpointAddress seedRelay : seedRelays) {
-                Element addrElement = adv.createElement(SEED_RELAY_ADDR_ELEMENT, seedRelay.toString());
-
-                seedsElem.appendChild(addrElement);
-            }
-
-            for (URI seedingURI : seedingURIs) {
-                Element addrElement = adv.createElement(SEED_RELAY_ADDR_ELEMENT, seedingURI.toString());
-
-                seedsElem.appendChild(addrElement);
-
-                ((Attributable) addrElement).addAttribute(SEED_RELAY_ADDR_SEEDING_ATTR, Boolean.TRUE.toString());
-            }
-        }
-
-        Element serverElem = adv.createElement(RELAY_SERVER_ELEMENT);
-
-        adv.appendChild(serverElem);
-
-        attrElem = (Attributable) serverElem;
-
-        if (-1 != maxClients) {
-            attrElem.addAttribute(RELAY_SERVER_CLIENTS_ATTR, Integer.toString(maxClients));
-        }
-
-        if (-1 != maxClientMessageQueue) {
-            attrElem.addAttribute(RELAY_SERVER_QUEUE_ATTR, Integer.toString(maxClientMessageQueue));
-        }
-
-        if (-1 != maxServerLeaseDuration) {
-            attrElem.addAttribute(RELAY_SERVER_LEASE_ATTR, Long.toString(maxServerLeaseDuration));
-        }
-
-        if (-1 != stallTimeout) {
-            attrElem.addAttribute(RELAY_SERVER_STALL_ATTR, Long.toString(stallTimeout));
-        }
-
-        if (-1 != announceInterval) {
-            attrElem.addAttribute(RELAY_SERVER_ANNOUNCE_ATTR, Long.toString(announceInterval));
-        }
-        if (aclURI != null) {
-            Element acl = adv.createElement(ACL_URI, aclURI.toString());
-
-            adv.appendChild(acl);
-        }
-        return adv;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String[] getIndexFields() {
-        return fields;
-    }
-
-    /**
-     * If true then this peer will act as a relay client.
-     *
-     * @return If true then this peer will act as a relay client.
-     */
-    public boolean isClientEnabled() {
-        return clientEnabled;
-    }
-
-    /**
-     * If true then this peer will act as a relay client.
-     *
-     * @param enabled If true then this peer will act as a relay client.
-     */
-    public void setClientEnabled(boolean enabled) {
-        clientEnabled = enabled;
-    }
-
-    /**
-     * Return the maximum number of relay clients.
-     *
-     * @return The maximum number of relay clients or <code>-1</code> for
-     *         default value.
-     */
-    public int getMaxRelays() {
-        return maxRelays;
-    }
-
-    /**
-     * Sets the maximum number of relay clients.
-     *
-     * @param newvalue The maximum number of relay clients or <code>-1</code>
-     *                 for default value or <code>-1</code> for default value.
-     */
-    public void setMaxRelays(int newvalue) {
-        if ((-1 != newvalue) && (newvalue <= 0)) {
-            throw new IllegalArgumentException("Max Relays must be > 0");
-        }
-
-        maxRelays = newvalue;
-    }
-
-    /**
-     * The interval in relative milliseconds of leases accepted by clients.
-     *
-     * @return The interval in relative milliseconds of leases accepted by
-     *         clients or <code>-1</code> for default value.
-     */
-    public long getClientLeaseDuration() {
-        return maxClientLeaseDuration;
-    }
-
-    /**
-     * Sets interval in relative milliseconds of leases accepted by clients.
-     *
-     * @param newvalue The interval in relative milliseconds of leases accepted
-     *                 by clients or <code>-1</code> for default value.
-     */
-    public void setClientLeaseDuration(long newvalue) {
-        if ((-1 != newvalue) && (newvalue <= 0)) {
-            throw new IllegalArgumentException("Lease Duration must be > 0");
-        }
-
-        maxClientLeaseDuration = newvalue;
-    }
-
-    /**
-     * The interval in relative milliseconds of at which clients will poll for
-     * messengers
-     *
-     * @return The interval in relative milliseconds of at which clients will
-     *         poll for messengers or <code>-1</code> for default value.
-     */
-    public long getMessengerPollInterval() {
-        return messengerPollInterval;
-    }
-
-    /**
-     * Sets interval in relative milliseconds of at which clients will poll for
-     * messengers.
-     *
-     * @param newvalue The interval in relative milliseconds of at which clients
-     *                 will poll for messengers or <code>-1</code> for default value.
-     */
-    public void setMessengerPollInterval(long newvalue) {
-        if ((-1 != newvalue) && (newvalue <= 0)) {
-            throw new IllegalArgumentException("Poll interval must be > 0");
-        }
-
-        messengerPollInterval = newvalue;
-    }
-
-    /**
-     * If true then this peer will use only seed rendezvous when configured as
-     * an edge peer.
-     *
-     * @return If true then this peer will use only seed rendezvous when configured as
-     *         an edge peer.
-     */
-    public boolean getUseOnlySeeds() {
-        return useOnlySeeds;
-    }
-
-    /**
-     * Set whether this peer will use only seed rendezvous when configured as
-     * an edge peer.
-     *
-     * @param onlySeeds If true then this peer will use only seed rendezvous when configured as
-     *                  an edge peer.
-     */
-    public void setUseOnlySeeds(boolean onlySeeds) {
-        useOnlySeeds = onlySeeds;
-    }
-
-    public EndpointAddress[] getSeedRelays() {
-        return seedRelays.toArray(new EndpointAddress[seedRelays.size()]);
-    }
-
-    public void addSeedRelay(EndpointAddress addr) {
-        if (null == addr) {
-            throw new IllegalArgumentException("addr may not be null");
-        }
-
-        seedRelays.add(addr);
-    }
-
-    public void addSeedRelay(String addr) {
-        if (null == addr) {
-            throw new IllegalArgumentException("addr may not be null");
-        }
-
-        seedRelays.add(new EndpointAddress(addr));
-    }
-
-    public boolean removeSeedRelay(EndpointAddress addr) {
-        if (null == addr) {
-            throw new IllegalArgumentException("addr may not be null");
-        }
-
-        return seedRelays.remove(addr);
-    }
-
-    public void clearSeedRelays() {
-        seedRelays.clear();
-    }
-
-    public URI[] getSeedingURIs() {
-        return seedingURIs.toArray(new URI[seedingURIs.size()]);
-    }
-
-    public void addSeedingURI(URI addr) {
-        if (null == addr) {
-            throw new IllegalArgumentException("addr may not be null");
-        }
-
-        seedingURIs.add(addr);
-    }
-
-    public void addSeedingURI(String addr) {
-        if (null == addr) {
-            throw new IllegalArgumentException("addr may not be null");
-        }
-
-        seedingURIs.add(URI.create(addr));
-    }
-
-    public boolean removeSeedingURI(URI addr) {
-        if (null == addr) {
-            throw new IllegalArgumentException("addr may not be null");
-        }
-
-        return seedingURIs.remove(addr);
-    }
-
-    public void clearSeedingURIs() {
-        seedingURIs.clear();
-    }
-
-    /**
-     * If true then this peer will act as a relay server.
-     *
-     * @return If true then this peer will act as a relay server.
-     */
-    public boolean isServerEnabled() {
-        return serverEnabled;
-    }
-
-    /**
-     * If true then this peer will act as a relay server.
-     *
-     * @param enabled If true then this peer will act as a relay server.
-     */
-    public void setServerEnabled(boolean enabled) {
-        serverEnabled = enabled;
-    }
-
-    /**
-     * Return the maximum number of relay clients.
-     *
-     * @return The maximum number of relay clients or <code>-1</code> for
-     *         default value.
-     */
-    public int getMaxClients() {
-        return maxClients;
-    }
-
-    /**
-     * Sets he maximum number of relay clients.
-     *
-     * @param newvalue The maximum number of relay clients or <code>-1</code>
-     *                 for default value.
-     */
-    public void setMaxClients(int newvalue) {
-        if ((-1 != newvalue) && (newvalue <= 0)) {
-            throw new IllegalArgumentException("Max Clients must be > 0");
-        }
-
-        maxClients = newvalue;
-    }
-
-    /**
-     * Return the client message queue length size.
-     *
-     * @return The client message queue length size or <code>-1</code> for default value.
-     */
-    public int getClientMessageQueueSize() {
-        return maxClientMessageQueue;
-    }
-
-    /**
-     * Sets the client message queue length size.
-     *
-     * @param newvalue The client message queue length size or <code>-1</code>
-     *                 for default value.
-     */
-    public void setClientMessageQueueSize(int newvalue) {
-        if ((-1 != newvalue) && (newvalue <= 0)) {
-            throw new IllegalArgumentException("Client Message Queue Size must be > 0");
-        }
-
-        maxClientMessageQueue = newvalue;
-    }
-
-    /**
-     * The interval in relative milliseconds of leases offered by servers.
-     *
-     * @return The interval in relative milliseconds of leases offered by servers.
-     */
-    public long getServerLeaseDuration() {
-        return maxServerLeaseDuration;
-    }
-
-    /**
-     * Sets interval in relative milliseconds of leases  offered by servers.
-     *
-     * @param newvalue The interval in relative milliseconds of leases offered
-     *                 by servers or <code>-1</code> for default value.
-     */
-    public void setServerLeaseDuration(long newvalue) {
-        if ((-1 != newvalue) && (newvalue <= 0)) {
-            throw new IllegalArgumentException("Lease Duration must be >= 0");
-        }
-
-        maxServerLeaseDuration = newvalue;
-    }
-
-    /**
-     * The interval in relative milliseconds after which a client is assumed to
-     * no longer be connected if it fails to request messages.
-     *
-     * @return The interval in relative milliseconds after which a client is
-     *         assumed to no longer be connected if it fails to request messages or
-     *         <code>-1</code> for default value.
-     */
-    public long getStallTimeout() {
-        return stallTimeout;
-    }
-
-    /**
-     * Sets interval in relative milliseconds after which a client is assumed to
-     * no longer be connected if it fails to request messages.
-     *
-     * @param newvalue The interval in relative milliseconds after which a
-     *                 client is  assumed to no longer be connected if it fails to request
-     *                 messages or <code>-1</code> for default value.
-     */
-    public void setStallTimeout(long newvalue) {
-        if ((-1 != newvalue) && (newvalue <= 0)) {
-            throw new IllegalArgumentException("Stall timeout must be > 0");
-        }
-
-        stallTimeout = newvalue;
-    }
-
-    /**
-     * The interval in relative milliseconds at which relay server will
-     * announce its presence.
-     *
-     * @return The interval in relative milliseconds at which relay server will
-     *         broadcast its presence or <code>-1</code> for default value.
-     */
-    public long getAnnounceInterval() {
-        return announceInterval;
-    }
-
-    /**
-     * Sets interval in relative milliseconds at which relay server will
-     * announce its presence  or <code>-1</code> for default value.
-     *
-     * @param newvalue The interval in relative milliseconds at which relay server will
-     *                 announce its presence.
-     */
-    public void setAnnounceInterval(long newvalue) {
-        if ((-1 != newvalue) && (newvalue <= 0)) {
-            throw new IllegalArgumentException("Announce Interval must be > 0");
-        }
-
-        announceInterval = newvalue;
-    }
-
-    /**
-     * Return ACL URI if set
-     *
-     * @return ACL URI if set, null otherwise
-     */
-    public URI getAclUri() {
-        return aclURI;
-    }
-
-    /**
-     * Sets ACL URI
-     *
-     * @param uri URI if set, null otherwise
-     */
-    public void setAclUri(URI uri) {
-        aclURI = uri;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/ResolverQuery.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/ResolverQuery.java
deleted file mode 100644 (file)
index ac1ce00..0000000
+++ /dev/null
@@ -1,401 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.protocol;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Enumeration;
-
-import java.util.logging.Level;
-
-import net.jxta.logging.Logging;
-
-import java.util.logging.Logger;
-
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.document.StructuredTextDocument;
-import net.jxta.document.TextElement;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.id.IDFactory;
-import net.jxta.protocol.ResolverQueryMsg;
-import net.jxta.protocol.ResolverResponseMsg;
-import net.jxta.protocol.RouteAdvertisement;
-
-/**
- * Implements the Resolver Query Message according to the
- * schema defined by the core JXTA Peer Resolver Protocol (PRP).
- * <p/>
- * <p/><pre>
- * &lt;xs:element name="ResolverQuery" type="jxta:ResolverQuery"/>
- * <p/>
- * &lt;xs:complexType name="ResolverQuery">
- *   &lt;xs:all>
- *     &lt;xs:element ref="jxta:Cred" minOccurs="0"/>
- *     &lt;xs:element name="SrcPeerID" type="jxta:JXTAID"/>
- *     &lt;xs:element name="SrcPeerRoute" type="jxta:JXTA RouteAdv"/>
- *     &lt;!-- This could be extended with a pattern restriction -->
- *     &lt;xs:element name="HandlerName" type="xs:string"/>
- *     &lt;xs:element name="QueryID" type="xs:string"/>
- *     &lt;xs:element name="HC" type="xs:unsignedInt"/>
- *     &lt;xs:element name="Query" type="xs:anyType"/>
- *   &lt;/xs:all>
- * &lt;/xs:complexType>
- * </pre>
- * <p/>
- * <p/><ephasis>IMPORTANT</emphasis>: a ResolverQuery contains an internal
- * state, the hopCount, which is incremented by various services that needs to.
- * As a result, a ResolverQuery may have to be cloned when the hopCount state
- * needs to be reset.
- *
- * @see net.jxta.resolver.ResolverService
- * @see net.jxta.protocol.ResolverQueryMsg
- * @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-prp" target="_blank">JXTA Protocols Specification : Peer Resolver Protocol</a>
- */
-public class ResolverQuery extends ResolverQueryMsg implements Cloneable {
-
-    /**
-     * The logger
-     */
-    private final static Logger LOG = Logger.getLogger(ResolverQuery.class.getName());
-
-    private static final String handlernameTag = "HandlerName";
-    private static final String credentialTag = "jxta:Cred";
-    private static final String queryIdTag = "QueryID";
-    private static final String hopCountTag = "HC";
-    private static final String srcPeerIdTag = "SrcPeerID";
-    private static final String srcRouteTag = "SrcPeerRoute";
-    private static final String queryTag = "Query";
-
-    /**
-     * Default constructor
-     */
-    public ResolverQuery() {
-        super();
-    }
-
-    /**
-     * Construct a doc from strings
-     *
-     * @param HandlerName the handler name
-     * @param Credential  credential document
-     * @param pId         source PeerID
-     * @param Query       opaque query string
-     * @param qid         query ID
-     * @deprecated use the individual accessor methods instead.
-     */
-    @Deprecated
-    public ResolverQuery(String HandlerName, StructuredDocument Credential, String pId, String Query, int qid) {
-
-        this();
-        setHandlerName(HandlerName);
-        setCredential(Credential);
-        setQueryId(qid);
-        setSrc(pId);
-        setQuery(Query);
-    }
-
-    /**
-     * Construct from a StructuredDocument
-     *
-     * @param root the element
-     */
-    public ResolverQuery(Element root) {
-
-        this();
-        if (!XMLElement.class.isInstance(root)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-        }
-
-        XMLElement doc = (XMLElement) root;
-        String doctype = doc.getName();
-
-        if (!getAdvertisementType().equals(doctype)) {
-            throw new IllegalArgumentException("Could not construct : " + getClass().getName() + "from doc containing a " + doctype);
-        }
-        readIt(doc);
-
-        // sanity check!
-        if (null == getHandlerName()) {
-            throw new IllegalArgumentException("Query message does not contain a handler name.");
-        }
-
-        if (null == getQuery()) {
-            throw new IllegalArgumentException("Query message does not contain a query.");
-        }
-
-        if (null == getSrcPeer()) {
-            throw new IllegalArgumentException("Query message does not define a source.");
-        }
-
-        RouteAdvertisement ra = getSrcPeerRoute();
-
-        if ((null != ra) && (null == ra.getDestPeerID())) {
-            throw new IllegalArgumentException("Route does not define a destination.");
-        }
-    }
-
-    /**
-     * parses an XML document into this object
-     *
-     * @param doc the element
-     */
-    public void readIt(XMLElement doc) {
-
-        Enumeration elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            TextElement elem = (TextElement) elements.nextElement();
-
-            if (elem.getName().equals(handlernameTag)) {
-                setHandlerName(elem.getTextValue());
-                continue;
-            }
-            // Set credential
-            if (elem.getName().equals(credentialTag)) {
-                setCredential(StructuredDocumentUtils.copyAsDocument(elem));
-                continue;
-            }
-            // Set queryid
-            if (elem.getName().equals(queryIdTag)) {
-                queryid = Integer.parseInt(elem.getTextValue());
-                continue;
-            }
-
-            // Set source route
-            if (elem.getName().equals(srcRouteTag)) {
-                for (Enumeration eachXpt = elem.getChildren(); eachXpt.hasMoreElements();) {
-                    XMLElement aXpt = (XMLElement) eachXpt.nextElement();
-                    RouteAdvertisement routeAdv = (RouteAdvertisement) AdvertisementFactory.newAdvertisement(aXpt);
-
-                    if (null != routeAdv.getDestPeerID()) {
-                        setSrcPeerRoute(routeAdv);
-                        setSrcPeer(routeAdv.getDestPeerID());
-                    } else {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.warning("Incomplete Route Advertisement (missing peer id).");
-                        }
-                    }
-                }
-                continue;
-            }
-
-            // Set hopcount
-            if (elem.getName().equals(hopCountTag)) {
-                setHopCount(Integer.parseInt(elem.getTextValue()));
-                continue;
-            }
-
-            // Set source peer
-            // FIXME tra 20031108 Since Peer Id is already part
-            // of the SrcRoute Tag. We should be able to remove
-            // processing this tag in the future.
-            if (elem.getName().equals(srcPeerIdTag)) {
-                try {
-                    String value = elem.getTextValue();
-                    if (value != null && value.length() > 0) {
-                        URI srcURI = new URI(elem.getTextValue());
-                        setSrcPeer(IDFactory.fromURI(srcURI));
-                    }
-                } catch (URISyntaxException failed) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Bad ID in message", failed);
-                    }
-                    RuntimeException failure = new IllegalArgumentException("Bad ID in message");
-                    failure.initCause(failed);
-                    throw failure;
-                }
-                continue;
-            }
-            // Set query
-            if (elem.getName().equals(queryTag)) {
-                setQuery(elem.getTextValue());
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Document getDocument(MimeMediaType encodeAs) {
-        // sanity check!
-        if (null == getHandlerName()) {
-            throw new IllegalStateException("Query message does not contain a handler name.");
-        }
-
-        if (null == getQuery()) {
-            throw new IllegalStateException("Query message does not contain a query.");
-        }
-
-        if (null == getSrcPeer()) {
-            throw new IllegalStateException("Query message does not define a source.");
-        }
-
-        RouteAdvertisement ra = getSrcPeerRoute();
-
-        if ((null != ra) && (null == ra.getDestPeerID())) {
-            throw new IllegalStateException("Route does not define a destination.");
-        }
-
-        StructuredTextDocument adv = (StructuredTextDocument)
-                StructuredDocumentFactory.newStructuredDocument(encodeAs, getAdvertisementType());
-
-        if (adv instanceof XMLDocument) {
-            ((XMLDocument) adv).addAttribute("xmlns:jxta", "http://jxta.org");
-        }
-        Element e;
-
-        e = adv.createElement(handlernameTag, getHandlerName());
-        adv.appendChild(e);
-        if (getCredential() != null) {
-            StructuredDocumentUtils.copyElements(adv, adv, getCredential());
-        }
-        e = adv.createElement(queryIdTag, Integer.toString(queryid));
-        adv.appendChild(e);
-        e = adv.createElement(hopCountTag, Integer.toString(hopcount));
-        adv.appendChild(e);
-
-        // FIXME tra 20031108 Since Peer Id is already part of the SrcRoute Tag.
-        // We should stop emitting this tag in the future.
-        if (null != getSrcPeer()) {
-            e = adv.createElement(srcPeerIdTag, getSrcPeer().toString());
-            adv.appendChild(e);
-        }
-
-        RouteAdvertisement radv = this.getSrcPeerRoute();
-
-        if (radv != null) {
-            e = adv.createElement(srcRouteTag);
-            adv.appendChild(e);
-            StructuredTextDocument xptDoc = (StructuredTextDocument)radv.getDocument(encodeAs);
-            StructuredDocumentUtils.copyElements(adv, e, xptDoc);
-        }
-
-        e = adv.createElement(queryTag, getQuery());
-        adv.appendChild(e);
-        return adv;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>Result is the query as an XML string.
-     */
-    @Override
-    public String toString() {
-        return getDocument(MimeMediaType.XMLUTF8).toString();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public ResolverQuery clone() {
-        ResolverQuery tmp;
-
-        try {
-            tmp = (ResolverQuery) super.clone();
-        } catch (CloneNotSupportedException e) {
-            throw new Error("Object.clone() threw CloneNotSupportedException", e);
-        }
-
-        tmp.setHandlerName(getHandlerName());
-        tmp.setCredential(getCredential());
-        tmp.setSrcPeer(getSrcPeer());
-        tmp.setQuery(getQuery());
-        tmp.setQueryId(getQueryId());
-        tmp.setHopCount(getHopCount());
-        tmp.setSrcPeerRoute(getSrcPeerRoute());
-        
-        return tmp;
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * @return ResolverResponse Msg
-     */
-    @Override
-    public ResolverResponseMsg makeResponse() {
-        // construct a new response
-        ResolverResponse res = new ResolverResponse();
-
-        // transfer the query information
-        res.setHandlerName(this.getHandlerName());
-        res.setQueryId(this.getQueryId());
-
-        // transfer optional route information available in the query
-        // to the response.
-        //
-        // NOTE: The route field is just attached to the response and
-        // will not be sent as part of the response. We just use this to
-        // pass information to the resolver. The other alternative will
-        // be to add a resolver or peergroup arg to makeResponse() as
-        // we don't have access to any peergroup info here to process
-        // the route information we just received. We will process
-        // the information just before we send the response. This
-        // may be better anyway as the service may never really respond.
-        res.setSrcPeerRoute(this.getSrcPeerRoute());
-
-        return res;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/ResolverResponse.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/ResolverResponse.java
deleted file mode 100644 (file)
index 211d772..0000000
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import java.util.Enumeration;
-
-import net.jxta.document.*;
-import net.jxta.protocol.ResolverResponseMsg;
-import net.jxta.protocol.RouteAdvertisement;
-
-
-/**
- * ResolverResponse provides an implementation for 
- * {@link net.jxta.protocol.ResolverResponseMsg} using the standard JXTA
- * Peer Resolver Protocol.
- *
- * <p/>The message is implemented with the following schema:
- *
- *<pre><tt>
- * &lt;xs:complexType name="ResolverResponse">
- *   &lt;xs:all>
- *     &lt;xs:element ref="jxta:Cred" minOccurs="0"/>
- *     &lt;xs:element name="HandlerName" type="xs:string"/>
- *     &lt;xs:element name="QueryID" type="xs:string"/>
- *     &lt;xs:element name="Response" type="xs:anyType"/>
- *   &lt;/xs:all>
- * &lt;/xs:complexType>
- *</tt></pre>
- *
- * @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-prp" target="_blank">JXTA Protocols Specification : Peer Resolver Protocol</a>
- */
-public class ResolverResponse extends ResolverResponseMsg {
-
-    private static final String handlernameTag = "HandlerName";
-    private static final String  credentialTag = "jxta:Cred";
-    private static final String     queryIdTag = "QueryID";
-    private static final String   responseTag = "Response";
-
-    /**
-     * optional route information to send the response
-     */
-    private RouteAdvertisement srcRoute = null;
-
-    /**
-     *
-     *  Standard Constructor for new instances.
-     */
-    public ResolverResponse() {}
-
-    /**
-     * Construct a doc from strings
-     *
-     *  @deprecated use the individual accessor methods instead.
-     * @param HandlerName the handler name
-     * @param Credential the credential doc
-     * @param QueryId    query ID
-     * @param Response   the response
-     *
-     */
-    @Deprecated
-    public ResolverResponse(String HandlerName, StructuredDocument Credential, int QueryId, String Response) {
-        setHandlerName(HandlerName);
-        setCredential(Credential);
-        setQueryId(QueryId);
-        setResponse(Response);
-    }
-
-    /**
-     * Construct from a StructuredDocument
-     *
-     * @param root the element
-     */
-    public ResolverResponse(Element root) {
-
-        this();
-        if (!XMLElement.class.isInstance(root)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-        }
-
-        XMLElement doc = (XMLElement) root;
-        String doctype = doc.getName();
-
-        if (!getAdvertisementType().equals(doctype)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doctype);
-        }
-
-        readIt(doc);
-
-        // sanity check
-        if (null == getHandlerName()) {
-            throw new IllegalArgumentException("Response message does not contain a handler name");
-        }
-
-        if (null == getResponse()) {
-            throw new IllegalArgumentException("Response message does not contain a response");
-        }
-    }
-
-    public void readIt(TextElement doc) {
-        Enumeration elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            TextElement elem = (TextElement) elements.nextElement();
-
-            if (elem.getName().equals(handlernameTag)) {
-                setHandlerName(elem.getTextValue());
-                continue;
-            }
-            // Set credential
-            if (elem.getName().equals(credentialTag)) {
-                setCredential(StructuredDocumentUtils.copyAsDocument(elem));
-                continue;
-            }
-            // Set queryid
-            if (elem.getName().equals(queryIdTag)) {
-                queryid = Integer.parseInt(elem.getTextValue());
-                continue;
-            }
-            // Set response
-            if (elem.getName().equals(responseTag)) {
-                setResponse(elem.getTextValue());
-            }
-        }
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public Document getDocument(MimeMediaType asMimeType) {
-
-        StructuredTextDocument adv = (StructuredTextDocument)
-                StructuredDocumentFactory.newStructuredDocument(asMimeType, getAdvertisementType());
-
-        if (adv instanceof Attributable) {
-            ((Attributable) adv).addAttribute("xmlns:jxta", "http://jxta.org");
-        }
-
-        Element e;
-
-        e = adv.createElement(handlernameTag, getHandlerName());
-        adv.appendChild(e);
-        if (getCredential() != null) {
-            StructuredDocumentUtils.copyElements(adv, adv, getCredential());
-        }
-        e = adv.createElement(queryIdTag, Integer.toString(queryid));
-        adv.appendChild(e);
-        e = adv.createElement(responseTag, getResponse());
-        adv.appendChild(e);
-        return adv;
-    }
-
-    /**
-     *  {@inheritDoc}
-     *
-     *  <p/>Result is the response as an XML string.
-     */
-    @Override
-    public String toString() {
-        return getDocument(MimeMediaType.XMLUTF8).toString();
-    }
-
-    /**
-     * Set optional route information as part of the response.
-     * This information is just attached to the response and
-     * will not be sent as part of the response
-     *
-     * @param route RouteAdvertisement to send the response
-     */
-
-    @Override
-    public void setSrcPeerRoute(RouteAdvertisement route) {
-        srcRoute = route;
-    }
-
-    /**
-     * Get optional route information that may be attached to the
-     * response. This information is just attached to the response and will
-     * not be sent as part of the response
-     *
-     * @return RouteAdvertisement to send the response
-     */
-
-    @Override
-    public RouteAdvertisement  getSrcPeerRoute() {
-        if (srcRoute != null) {
-            return srcRoute.clone();
-        } else {
-            return null;
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/ResolverSrdiMsgImpl.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/ResolverSrdiMsgImpl.java
deleted file mode 100644 (file)
index e061b8f..0000000
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.protocol;
-
-
-import java.util.Enumeration;
-
-import net.jxta.credential.Credential;
-import net.jxta.document.*;
-import net.jxta.membership.MembershipService;
-import net.jxta.protocol.ResolverSrdiMsg;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-
-/**
- * ResolverQuery provides the binding for the message to query other nodes
- */
-public class ResolverSrdiMsgImpl extends ResolverSrdiMsg {
-
-    private final static Logger LOG = Logger.getLogger(ResolverSrdiMsgImpl.class.getName());
-
-    /**
-     * Description of the Field
-     */
-    public final static String handlernameTag = "HandlerName";
-
-    /**
-     * Description of the Field
-     */
-    public final static String credentialTag = "jxta:Cred";
-
-    /**
-     * Description of the Field
-     */
-    public final static String payloadTag = "Payload";
-
-    /**
-     * Constructor for the ResolverSrdiMsgImpl object
-     */
-    public ResolverSrdiMsgImpl() {}
-
-    /**
-     * Construct from a StructuredDocument
-     *
-     * @param root       the underlying document
-     * @param membership membership service used to verify credentials
-     */
-    public ResolverSrdiMsgImpl(Element root, MembershipService membership) {
-        if (!XMLElement.class.isInstance(root)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-        }
-
-        XMLElement doc = (XMLElement) root;
-        String doctype = doc.getName();
-
-        if (!getMessageType().equals(doctype)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doctype);
-        }
-        readIt(doc, membership);
-    }
-
-    /**
-     * Creates this object with a specific handler name, credential and payload
-     *
-     * @param handlerName the
-     * @param cred        the credntial
-     * @param payload     the payload
-     */
-    public ResolverSrdiMsgImpl(String handlerName, Credential cred, String payload) {
-
-        setHandlerName(handlerName);
-        setPayload(payload);
-        setCredential(cred);
-    }
-
-    /**
-     * return the string representaion of this doc
-     *
-     * @return string representation of the message
-     */
-    @Override
-    public String toString() {
-
-        StructuredTextDocument doc = (StructuredTextDocument) getDocument(MimeMediaType.XMLUTF8);
-
-        return doc.toString();
-    }
-
-    /**
-     * return a Document represetation of this object
-     *
-     * @param asMimeType type of message
-     * @return document
-     */
-    @Override
-    public Document getDocument(MimeMediaType asMimeType) {
-        StructuredTextDocument adv = (StructuredTextDocument) StructuredDocumentFactory.newStructuredDocument(asMimeType
-                ,
-                getMessageType());
-
-        if (adv instanceof XMLElement) {
-            ((XMLElement) adv).addAttribute("xmlns:jxta", "http://jxta.org");
-        }
-
-        Element e;
-
-        e = adv.createElement(handlernameTag, getHandlerName());
-        adv.appendChild(e);
-        if (getCredential() != null) {
-            try {
-                StructuredDocumentUtils.copyElements(adv, adv, (getCredential()).getDocument(asMimeType));
-            } catch (Exception ce) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Got an Exception during credential creation ", ce);
-                }
-            }
-        }
-        e = adv.createElement(payloadTag, getPayload());
-        adv.appendChild(e);
-        return adv;
-    }
-
-    /**
-     * Parses an XML document into this object
-     *
-     * @param doc        the underlying document
-     * @param membership used to parse credentails if any
-     */
-    private void readIt(XMLElement doc, MembershipService membership) {
-        Enumeration elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            XMLElement elem = (XMLElement) elements.nextElement();
-
-            if (elem.getName().equals(handlernameTag)) {
-                setHandlerName(elem.getTextValue());
-                continue;
-            }
-            // Set credential
-            if (elem.getName().equals(credentialTag)) {
-                Credential credential;
-
-                if (elem.getTextValue() != null) {
-                    try {
-                        credential = membership.makeCredential(elem);
-                        setCredential(credential);
-                    } catch (Exception ce) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.log(Level.WARNING, "Credential creation failed", ce);
-                        }
-                    }
-                }
-                continue;
-            }
-
-            // Set payload
-            if (elem.getName().equals(payloadTag)) {
-                setPayload(elem.getTextValue());
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/RouteAdv.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/RouteAdv.java
deleted file mode 100644 (file)
index fd23362..0000000
+++ /dev/null
@@ -1,332 +0,0 @@
-/*
-Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Attribute;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.document.XMLElement;
-import net.jxta.id.IDFactory;
-import net.jxta.logging.Logging;
-import net.jxta.peer.PeerID;
-import net.jxta.protocol.AccessPointAdvertisement;
-import net.jxta.protocol.RouteAdvertisement;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Enumeration;
-import java.util.Vector;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * This class implements the basic Route advertisement.
- * <p/>
- * <pre>
- *    &lt;xs:complexType name="RA">
- *      &lt;xs:sequence>
- *          &lt;xs:element name="DstPID" type="jxta:JXTAID" minOccurs="0"/>
- *          &lt;xs:element name="Dst">
- *              &lt;xs:complexType>
- *            &lt;xs:sequence>
- *                      &lt;xs:element ref="jxta:APA" />
- *            &lt;/xs:sequence>
- *              &lt;/xs:complexType>
- *        &lt;/xs:element>
- *        &lt;xs:element name="Hops" minOccurs="0">
- *              &lt;xs:complexType>
- *            &lt;xs:sequence>
- *                      &lt;xs:element ref="jxta:APA" maxOccurs="unbounded" />
- *            &lt;/xs:sequence>
- *              &lt;/xs:complexType>
- *        &lt;/xs:element>
- *      &lt;/xs:sequence>
- *    &lt;/xs:complexType>
- * </pre>
- *
- * @see net.jxta.protocol.RouteAdvertisement
- */
-public class RouteAdv extends RouteAdvertisement implements Cloneable {
-
-    /**
-     * Logger
-     */
-    private static final Logger LOG = Logger.getLogger(RouteAdv.class.getName());
-
-    private static final String[] INDEX_FIELDS = {DEST_PID_TAG};
-
-    /**
-     * Instantiator for our advertisement
-     */
-    public static class Instantiator implements AdvertisementFactory.Instantiator {
-
-        /**
-         * {@inheritDoc}
-         */
-        public String getAdvertisementType() {
-            return RouteAdv.getAdvertisementType();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance() {
-            return new RouteAdv();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance(Element root) {
-            if (!XMLElement.class.isInstance(root)) {
-                throw new IllegalArgumentException(getAdvertisementType() + " only supports XLMElement");
-            }
-
-            return new RouteAdv((XMLElement) root);
-        }
-    }
-
-    /**
-     * Private constructor. Use instantiator
-     */
-    private RouteAdv() {}
-
-    /**
-     * Private constructor. Use instantiator
-     *
-     * @param doc the element
-     */
-    private RouteAdv(XMLElement doc) {
-        String doctype = doc.getName();
-
-        String typedoctype = "";
-        Attribute itsType = doc.getAttribute("type");
-
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-
-        if (!doctype.equals(getAdvertisementType()) && !getAdvertisementType().equals(typedoctype)) {
-            throw new IllegalArgumentException("Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-
-        Enumeration<XMLElement> elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            XMLElement elem = elements.nextElement();
-
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Unhandled Element: " + elem.toString());
-                }
-            }
-        }
-
-        // Compatibility hack
-        setDestPeerID(getDestPeerID());
-
-        // Sanity Check!!!
-        if (hasALoop()) {
-            throw new IllegalArgumentException("Route contains a loop!");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public RouteAdv clone() {
-        return (RouteAdv) super.clone();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected boolean handleElement(Element raw) {
-
-        if (super.handleElement(raw)) {
-            return true;
-        }
-
-        XMLElement elem = (XMLElement) raw;
-
-        if (DEST_PID_TAG.equals(elem.getName())) {
-            try {
-                URI pID = new URI(elem.getTextValue());
-
-                setDestPeerID((PeerID) IDFactory.fromURI(pID));
-            } catch (URISyntaxException badID) {
-                throw new IllegalArgumentException("Bad PeerID in advertisement");
-            } catch (ClassCastException badID) {
-                throw new IllegalArgumentException("ID in advertisement is not a peer id");
-            }
-            return true;
-        }
-
-        if ("Dst".equals(elem.getName())) {
-            for (Enumeration eachXpt = elem.getChildren(); eachXpt.hasMoreElements();) {
-                XMLElement aXpt = (XMLElement) eachXpt.nextElement();
-
-                AccessPointAdvertisement xptAdv = (AccessPointAdvertisement)
-                        AdvertisementFactory.newAdvertisement(aXpt);
-
-                setDest(xptAdv);
-            }
-            return true;
-        }
-
-        if ("Hops".equals(elem.getName())) {
-            Vector<AccessPointAdvertisement> hops = new Vector<AccessPointAdvertisement>();
-
-            for (Enumeration eachXpt = elem.getChildren(); eachXpt.hasMoreElements();) {
-                XMLElement aXpt = (XMLElement) eachXpt.nextElement();
-
-                AccessPointAdvertisement xptAdv = (AccessPointAdvertisement)
-                        AdvertisementFactory.newAdvertisement(aXpt);
-
-                hops.addElement(xptAdv);
-            }
-            setHops(hops);
-            return true;
-        }
-
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Document getDocument(MimeMediaType encodeAs) {
-        StructuredDocument adv = (StructuredDocument) super.getDocument(encodeAs);
-
-        if (hasALoop()) {
-            throw new IllegalStateException("I won't write a doc for a route with a loop");
-        }
-
-        PeerID pid = getDestPeerID();
-
-        if (null != pid) {
-            Element e0 = adv.createElement(DEST_PID_TAG, pid.toString());
-
-            adv.appendChild(e0);
-        }
-
-        Element e1 = adv.createElement("Dst");
-
-        adv.appendChild(e1);
-
-        AccessPointAdvertisement dest = getDest();
-
-        // create a copy without the PID if necessary (the pid is redundant)
-        AccessPointAdvertisement destAPA = dest;
-        if(null != dest.getPeerID()) {
-            destAPA = dest.clone();
-            destAPA.setPeerID(null);
-        }
-        
-        StructuredDocument xptDoc = (StructuredDocument) destAPA.getDocument(encodeAs);
-        StructuredDocumentUtils.copyElements(adv, e1, xptDoc);
-
-        Enumeration<AccessPointAdvertisement> eachHop = getHops();
-
-        // only include hops if we have some
-        if (eachHop.hasMoreElements()) {            
-            Element e2 = adv.createElement("Hops");
-
-            adv.appendChild(e2);
-
-            while (eachHop.hasMoreElements()) {
-                AccessPointAdvertisement hop = eachHop.nextElement();
-                
-                if (null == hop.getPeerID()) {
-                    // Refuse to write illegal hops.
-                    continue;
-                }
-
-                xptDoc = (StructuredDocument) hop.getDocument(encodeAs);
-                    
-                StructuredDocumentUtils.copyElements(adv, e2, xptDoc);
-            }
-        }
-        return adv;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String[] getIndexFields() {
-        return INDEX_FIELDS;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/RouteQuery.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/RouteQuery.java
deleted file mode 100644 (file)
index 9afedf3..0000000
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Attributable;
-import net.jxta.document.Attribute;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.document.XMLElement;
-import net.jxta.id.IDFactory;
-import net.jxta.peer.PeerID;
-import net.jxta.protocol.RouteAdvertisement;
-import net.jxta.protocol.RouteQueryMsg;
-
-import java.lang.reflect.UndeclaredThrowableException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Collection;
-import java.util.Enumeration;
-import net.jxta.document.XMLDocument;
-
-/**
- * RouteQuery message used by the Endpoint Routing protocol to
- * query for route
- */
-public class RouteQuery extends RouteQueryMsg {
-
-    private static final String destPIDTag = "Dst";
-    private static final String srcRouteTag = "Src";
-    private static final String badHopTag = "Bad";
-
-    /**
-     * Default Constructor
-     */
-    public RouteQuery() {}
-
-    /**
-     * Constructs a RouteQuery
-     *
-     * @deprecated Use default constructor and accessors.
-     *
-     * @param dest     dest PeerID
-     * @param srcRoute source source
-     * @param badhops  lis of AccessPointAdvertisements
-     */
-    @Deprecated
-    public RouteQuery(PeerID dest, RouteAdvertisement srcRoute, Collection<PeerID> badhops) {
-        setDestPeerID(dest);
-        setSrcRoute(srcRoute);
-        setBadHops(badhops);
-    }
-
-    /**
-     * Construct from an XML document fragment.
-     *
-     * @param doc the element
-     */
-    public RouteQuery(XMLElement doc) {
-        String doctype = doc.getName();
-        
-        if (!doctype.equals(getAdvertisementType())) {
-            throw new IllegalArgumentException(
-                    "Can not construct : " + getClass().getName() + " from doc containing a " + doctype);
-        }
-
-        Enumeration<XMLElement> elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            XMLElement elem = elements.nextElement();
-
-            if (elem.getName().equals(destPIDTag)) {
-                try {
-                    URI pID = new URI(elem.getTextValue());
-                    PeerID pid = (PeerID) IDFactory.fromURI(pID);
-
-                    setDestPeerID(pid);
-                } catch (URISyntaxException badID) {
-                    throw new IllegalArgumentException("Bad PeerID ID in advertisement");
-                } catch (ClassCastException badID) {
-                    throw new IllegalArgumentException("Not a peer id");
-                }
-                continue;
-            }
-
-            if (elem.getName().equals(srcRouteTag)) {
-                for (Enumeration<XMLElement> eachXpt = elem.getChildren(); eachXpt.hasMoreElements();) {
-                    XMLElement aXpt = eachXpt.nextElement();
-
-                    RouteAdvertisement route = (RouteAdvertisement) AdvertisementFactory.newAdvertisement(aXpt);
-
-                    setSrcRoute(route);
-                }
-                continue;
-            }
-
-            if (elem.getName().equals(badHopTag)) {
-                try {
-                    URI pID = new URI(elem.getTextValue());
-                    PeerID pid = (PeerID) IDFactory.fromURI(pID);
-
-                    addBadHop(pid);
-                } catch (URISyntaxException badID) {
-                    throw new IllegalArgumentException("Bad PeerID ID in advertisement");
-                } catch (ClassCastException badID) {
-                    throw new IllegalArgumentException("Not a peer id");
-                }
-            }
-        }
-        
-        if(null == getDestPeerID()) {
-            throw new IllegalArgumentException("Destination peer not initialized");
-        }        
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public StructuredDocument getDocument(MimeMediaType asMimeType) {
-        if(null == getDestPeerID()) {
-            throw new IllegalStateException("Destination peer not initialized");
-        }
-        
-        StructuredDocument adv = StructuredDocumentFactory.newStructuredDocument(asMimeType, getAdvertisementType());
-
-        if (adv instanceof XMLElement) {
-            ((Attributable) adv).addAttribute("xmlns:jxta", "http://jxta.org");
-            ((Attributable) adv).addAttribute("xml:space", "preserve");
-        }
-
-        Element e;
-
-        PeerID dest = getDestPeerID();
-
-        e = adv.createElement(destPIDTag, dest.toString());
-        adv.appendChild(e);
-        
-        RouteAdvertisement route = getSrcRoute();
-
-        if (route != null) {
-            e = adv.createElement(srcRouteTag);
-            adv.appendChild(e);
-            StructuredDocument xptDoc = (StructuredDocument) route.getDocument(asMimeType);
-
-            StructuredDocumentUtils.copyElements(adv, e, xptDoc);
-        }
-
-        for (PeerID eachPeer : getBadHops()) {
-            e = adv.createElement(badHopTag, eachPeer.toString());
-            adv.appendChild(e);
-        }
-
-        return adv;
-    }
-
-    /**
-     * return a string representation of this RouteQuery doc
-     */
-    @Override
-    public String toString() {
-        XMLDocument doc = (XMLDocument) getDocument(MimeMediaType.XMLUTF8);
-
-        doc.addAttribute("xml:space", "default");
-
-        return doc.toString();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/RouteResponse.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/RouteResponse.java
deleted file mode 100644 (file)
index 22a60fe..0000000
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import net.jxta.document.*;
-import net.jxta.protocol.RouteAdvertisement;
-import net.jxta.protocol.RouteResponseMsg;
-
-import java.lang.reflect.UndeclaredThrowableException;
-import java.util.Enumeration;
-
-
-/**
- * Used by the Endpoint Routing protocol in response to Route Query Messages.
- * The Route Response Message contains a route advertisement for the destination
- * peer.
- * <p/>
- * <p/><pre>
- * &lt;xs:complexType name="ERR">
- *   &lt;xs:sequence>
- *     &lt;xs:element name="Dst">
- *       &lt;xs:complexType>
- *         &lt;xs:sequence>
- *           &lt;xs:element ref="jxta:RA" />
- *         &lt;/xs:sequence>
- *       &lt;/xs:complexType>
- *     &lt;/xs:element>
- *     &lt;xs:element name="Src">
- *       &lt;xs:complexType>
- *         &lt;xs:sequence>
- *           &lt;xs:element ref="jxta:RA" />
- *         &lt;/xs:sequence>
- *       &lt;/xs:complexType>
- *     &lt;/xs:element>
- *   &lt;/xs:sequence>
- * &lt;/xs:complexType>
- * </pre>
- *
- * @see net.jxta.impl.endpoint.router.EndpointRouter
- * @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-erp"
- *      target="_blank">JXTA Protocols Specification : Endpoint Routing Protocol</a>
- */
-public class RouteResponse extends RouteResponseMsg {
-
-    private static final String destRouteTag = "Dst";
-    private static final String srcRouteTag = "Src";
-
-    /**
-     * Construct a new Route Response Message
-     */
-    public RouteResponse() {}
-
-    /**
-     * Construct from an XML document fragment.
-     *
-     * @param doc the element
-     */
-    public RouteResponse(XMLElement doc) {
-
-        String doctype = doc.getName();
-
-        if (!doctype.equals(getAdvertisementType())) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + " from doc containing a " + doctype);
-        }
-
-        Enumeration<XMLElement> elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            XMLElement elem = elements.nextElement();
-
-            if (elem.getName().equals(destRouteTag)) {
-                for (Enumeration<XMLElement> eachXpt = elem.getChildren(); eachXpt.hasMoreElements();) {
-                    XMLElement aXpt = eachXpt.nextElement();
-
-                    RouteAdvertisement route = (RouteAdvertisement) AdvertisementFactory.newAdvertisement(aXpt);
-
-                    setDestRoute(route);
-                }
-                continue;
-            }
-
-            if (elem.getName().equals(srcRouteTag)) {
-                for (Enumeration<XMLElement> eachXpt = elem.getChildren(); eachXpt.hasMoreElements();) {
-                    XMLElement aXpt = eachXpt.nextElement();
-
-                    RouteAdvertisement route = (RouteAdvertisement) AdvertisementFactory.newAdvertisement(aXpt);
-
-                    setSrcRoute(route);
-                }
-            }
-        }
-        
-        // Validate.
-        
-        if (null == getSrcRoute()) {
-            throw new IllegalArgumentException("Missing source route.");
-        }
-        
-        if (null == getDestRoute()) {
-            throw new IllegalArgumentException("Missing destination route.");
-        }
-
-        if (null == getSrcRoute().getDestPeerID()) {
-            throw new IllegalArgumentException("Bad source route.");
-        }
-        
-        if (null == getDestRoute().getDestPeerID()) {
-            throw new IllegalArgumentException("Bad destination route.");
-        }
-    }
-
-    /**
-     * return a Document representation of this object
-     */
-    @Override
-    public Document getDocument(MimeMediaType asMimeType) {        
-        if (null == getSrcRoute()) {
-            throw new IllegalStateException("Missing source route.");
-        }
-        
-        if (null == getDestRoute()) {
-            throw new IllegalStateException("Missing destination route.");
-        }
-
-        if (null == getSrcRoute().getDestPeerID()) {
-            throw new IllegalStateException("Bad source route.");
-        }
-        
-        if (null == getDestRoute().getDestPeerID()) {
-            throw new IllegalStateException("Bad destination route.");
-        }
-
-        StructuredDocument adv = StructuredDocumentFactory.newStructuredDocument(asMimeType, getAdvertisementType());
-
-        if (adv instanceof XMLDocument) {
-            ((XMLDocument) adv).addAttribute("xmlns:jxta", "http://jxta.org");
-            ((XMLDocument) adv).addAttribute("xml:space", "preserve");
-        }
-
-        Element e;
-
-        RouteAdvertisement route = getDestRoute();
-
-        if (route != null) {
-            e = adv.createElement(destRouteTag);
-            adv.appendChild(e);
-            StructuredTextDocument xptDoc = (StructuredTextDocument)
-                    route.getDocument(asMimeType);
-
-            StructuredDocumentUtils.copyElements(adv, e, xptDoc);
-        }
-
-        route = getSrcRoute();
-        if (route != null) {
-            e = adv.createElement(srcRouteTag);
-            adv.appendChild(e);
-            StructuredTextDocument xptDoc = (StructuredTextDocument)
-                    route.getDocument(asMimeType);
-
-            StructuredDocumentUtils.copyElements(adv, e, xptDoc);
-        }
-        return adv;
-    }
-
-    /**
-     * {@inheritDoc}
-     * 
-     * <p/>String representation of this RouteResponse doc.
-     */
-    @Override
-    public String toString() {
-        XMLDocument doc = (XMLDocument) getDocument(MimeMediaType.XMLUTF8);
-
-        doc.addAttribute("xml:space", "default");
-
-        return doc.toString();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/SignedAdv.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/SignedAdv.java
deleted file mode 100644 (file)
index b37fc0f..0000000
+++ /dev/null
@@ -1,384 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import net.jxta.document.*;
-import net.jxta.id.ID;
-import net.jxta.impl.membership.pse.PSECredential;
-import net.jxta.impl.util.BASE64InputStream;
-import net.jxta.impl.util.BASE64OutputStream;
-import net.jxta.protocol.SignedAdvertisement;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.io.*;
-import java.lang.reflect.UndeclaredThrowableException;
-import java.security.Signature;
-import java.util.Enumeration;
-
-
-/**
- * A container for signed Advertisements
- */
-public class SignedAdv extends SignedAdvertisement {
-
-    /**
-     * Logger
-     */
-    private static final transient Logger LOG = Logger.getLogger(SignedAdv.class.getName());
-
-    private static final String ADV_TYPE = "jxta:SA";
-
-    private static final String[] INDEX_FIELDS = {};
-
-    /**
-     * Instantiator for SignedAdv
-     */
-    public static class Instantiator implements AdvertisementFactory.Instantiator {
-
-        /**
-         * {@inheritDoc}
-         */
-        public String getAdvertisementType() {
-            return ADV_TYPE;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance() {
-            return new SignedAdv();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance(Element root) {
-            if (!XMLElement.class.isInstance(root)) {
-                throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-            }
-            return new SignedAdv((XMLElement) root);
-        }
-    }
-
-    private byte[] signature = null;
-
-    /**
-     * Returns the identifying type of this Advertisement.
-     * <p/>
-     * <p/><b>Note:</b> This is a static method. It cannot be used to determine
-     * the runtime type of an advertisement. ie.
-     * </p><code><pre>
-     *      Advertisement adv = module.getSomeAdv();
-     *      String advType = adv.getAdvertisementType();
-     *  </pre></code>
-     * <p/>
-     * <p/><b>This is wrong and does not work the way you might expect.</b>
-     * This call is not polymorphic and calls
-     * Advertisement.getAdvertisementType() no matter what the real type of the
-     * advertisement.
-     *
-     * @return String the type of advertisement
-     */
-    public static String getAdvertisementType() {
-        return ADV_TYPE;
-    }
-
-    /**
-     *  Private constructor for new instances. Use the instantiator.
-     */
-    private SignedAdv() {
-    }
-
-    /**
-     *  Private constructor for xml serialized instances. Use the instantiator.
-     *  
-     *  @param doc The XML serialization of the advertisement.
-     */
-    private SignedAdv(XMLElement doc) {
-        String doctype = doc.getName();
-
-        String typedoctype = "";
-        Attribute itsType = doc.getAttribute("type");
-
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-
-        if (!doctype.equals(getAdvertisementType()) && !getAdvertisementType().equals(typedoctype)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-
-        Enumeration elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            Element elem = (Element) elements.nextElement();
-
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Unhandled Element: " + elem.toString());
-                }
-            }
-        }
-
-        // Sanity Check!!!
-
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String[] getIndexFields() {
-        return INDEX_FIELDS;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public net.jxta.id.ID getID() {
-        // FIXME bondolo Needs real implementation.
-        return ID.nullID;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected boolean handleElement(Element raw) {
-
-        if (super.handleElement(raw)) {
-            return true;
-        }
-
-        XMLElement elem = (XMLElement) raw;
-
-        if ("Credential".equals(elem.getName())) {
-            signer = new PSECredential(elem);
-
-            return true;
-        } else if ("Signature".equals(elem.getName())) {
-            try {
-                Reader signatureB64 = new StringReader(elem.getTextValue());
-                InputStream bis = new BASE64InputStream(signatureB64);
-                ByteArrayOutputStream bos = new ByteArrayOutputStream();
-
-                do {
-                    int c = bis.read();
-
-                    if (-1 == c) {
-                        break;
-                    }
-                    bos.write(c);
-                } while (true);
-
-                bis.close();
-                bos.close();
-                signature = bos.toByteArray();
-
-                return true;
-            } catch (IOException failed) {
-                IllegalArgumentException failure = new IllegalArgumentException("Could not process Signature");
-
-                failure.initCause(failed);
-
-                throw failure;
-            }
-        } else if ("Advertisement".equals(elem.getName())) {
-            try {
-                Reader advertisementB64 = new StringReader(elem.getTextValue());
-                InputStream bis = new BASE64InputStream(advertisementB64);
-                ByteArrayOutputStream bos = new ByteArrayOutputStream();
-
-                do {
-                    int c = bis.read();
-
-                    if (-1 == c) {
-                        break;
-                    }
-                    bos.write(c);
-                } while (true);
-
-                byte advbytes[] = bos.toByteArray();
-
-                Signature verifier = ((PSECredential) signer).getSignatureVerifier("SHA1WITHRSA");
-
-                verifier.update(advbytes);
-
-                boolean matched = verifier.verify(signature);
-
-                if (!matched) {
-                    throw new IllegalArgumentException("Advertisement could not be verified");
-                }
-
-                advertisementB64 = new StringReader(elem.getTextValue());
-                bis = new BASE64InputStream(advertisementB64);
-
-                adv = AdvertisementFactory.newAdvertisement(elem.getRoot().getMimeType(), bis);
-
-                return true;
-            } catch (IOException failed) {
-                IllegalArgumentException failure = new IllegalArgumentException("Could not process Advertisement");
-
-                failure.initCause(failed);
-
-                throw failure;
-            } catch (java.security.NoSuchAlgorithmException failed) {
-                IllegalArgumentException failure = new IllegalArgumentException("Could not process Advertisement");
-
-                failure.initCause(failed);
-
-                throw failure;
-            } catch (java.security.SignatureException failed) {
-                IllegalArgumentException failure = new IllegalArgumentException("Could not process Advertisement");
-
-                failure.initCause(failed);
-
-                throw failure;
-            }
-        }
-
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Document getDocument(MimeMediaType encodeAs) {
-
-        if (null == adv) {
-            throw new IllegalStateException("Advertisement not initialized");
-        }
-
-        if (null == signer) {
-            throw new IllegalStateException("Signer Credential not initialized");
-        }
-
-        if (!(signer instanceof PSECredential)) {
-            throw new IllegalStateException("Signer Credential not initialized");
-        }
-
-        StructuredDocument doc = (StructuredDocument) super.getDocument(encodeAs);
-
-        StructuredDocument advDoc = (StructuredDocument) adv.getDocument(encodeAs);
-
-        try {
-            ByteArrayOutputStream bos = new ByteArrayOutputStream();
-
-            advDoc.sendToStream(bos);
-            bos.close();
-
-            byte advData[] = bos.toByteArray();
-
-            PSECredential psecred = (PSECredential) signer;
-
-            Signature advSigner = psecred.getSigner("SHA1WITHRSA");
-
-            advSigner.update(advData);
-
-            byte signature[] = advSigner.sign();
-
-            StringWriter signatureB64 = new StringWriter();
-            StringWriter advertisementB64 = new StringWriter();
-
-            OutputStream signatureOut = new BASE64OutputStream(signatureB64);
-
-            signatureOut.write(signature);
-            signatureOut.close();
-
-            OutputStream advertisementOut = new BASE64OutputStream(advertisementB64, 72);
-
-            advertisementOut.write(advData);
-            advertisementOut.close();
-
-            StructuredDocument creddoc = signer.getDocument(encodeAs);
-
-            StructuredDocumentUtils.copyElements(doc, doc, creddoc, "Credential");
-
-            Element elem = doc.createElement("Signature", signatureB64.toString());
-
-            doc.appendChild(elem);
-
-            elem = doc.createElement("Advertisement", advertisementB64.toString());
-            doc.appendChild(elem);
-            if (doc instanceof Attributable) {
-                ((Attributable) elem).addAttribute("type", adv.getAdvType());
-            }
-        } catch (Exception failed) {
-            if (failed instanceof RuntimeException) {
-                throw (RuntimeException) failed;
-            } else {
-                throw new UndeclaredThrowableException(failed, "Failure building document");
-            }
-        }
-
-        return doc;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/SrdiMessageImpl.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/SrdiMessageImpl.java
deleted file mode 100644 (file)
index 7e890e7..0000000
+++ /dev/null
@@ -1,355 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import net.jxta.document.*;
-import net.jxta.id.IDFactory;
-import net.jxta.peer.PeerID;
-import net.jxta.protocol.SrdiMessage;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-
-
-/**
- * SrdiMessageImpl provides the SRDI message binding
- */
-public class SrdiMessageImpl extends SrdiMessage {
-
-    /**
-     * The Log4J debugging category.
-     */
-    private final static Logger LOG = Logger.getLogger(SrdiMessageImpl.class.getName());
-
-    /**
-     * PeerID element name
-     */
-    public final static String pidTag = "PID";
-
-    /**
-     * scope element name
-     */
-    public final static String scopeTag = "ttl";
-
-    /**
-     * Entry element name
-     */
-    public final static String entryTag = "Entry";
-
-    /**
-     * Primary Key element name
-     */
-    public final static String pKeyTag = "PKey";
-
-    /**
-     * Secondary Key element name
-     */
-    public final static String sKeyTag = "SKey";
-
-    /**
-     * Value element name
-     */
-    public final static String valTag = "Value";
-
-    /**
-     * Expiration element name
-     */
-    public final static String expirationTag = "Expiration";
-
-    /**
-     * Construct an empty doc
-     */
-    public SrdiMessageImpl() {
-        setScope(PERSISTONLY);
-    }
-
-    /**
-     * Construct a doc from InputStream
-     *
-     * @param stream the underlying input stream.
-     * @throws IOException if an I/O error occurs.
-     * @deprecated It's better to generate the document yourself. This method
-     *             cannot deduce the mime type of the content.
-     */
-    @Deprecated
-    public SrdiMessageImpl(InputStream stream) throws IOException {
-
-        // We are asked to assume that the message from which this response
-        // is constructed is an XML document.
-        XMLDocument doc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, stream);
-
-        readIt(doc);
-    }
-
-    /**
-     * Construct from a StructuredDocument
-     *
-     * @param root the underlying document
-     */
-    public SrdiMessageImpl(Element root) {
-        if (!XMLElement.class.isInstance(root)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-        }
-
-        XMLElement doc = (XMLElement) root;
-        String doctype = doc.getName();
-
-        String typedoctype = "";
-        Attribute itsType = doc.getAttribute("type");
-
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-
-        if (!doctype.equals(getMessageType()) && !getMessageType().equals(typedoctype)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-        readIt(doc);
-    }
-
-    /**
-     * Construct a msg from entries
-     *
-     * @param peerid  PeerID associated with this message
-     * @param scope   scope @see #PERSISTONLY, #REPLICATE
-     * @param pKey    primary key
-     * @param entries the entries for this message
-     */
-    public SrdiMessageImpl(PeerID peerid, int scope, String pKey, List<Entry> entries) {
-
-        setPeerID(peerid);
-        setScope(scope);
-        setPrimaryKey(pKey);
-        setEntries(entries);
-    }
-
-    /**
-     * Construct a msg consisting of a single entry
-     *
-     * @param peerid     PeerID associated with this message
-     * @param scope   scope @see #PERSISTONLY, #REPLICATE
-     * @param pKey       primary key
-     * @param key        the secondary key
-     * @param value      value for the key
-     * @param expiration expirations for this entry
-     */
-    public SrdiMessageImpl(PeerID peerid, int scope, String pKey, String key, String value, long expiration) {
-
-        setPeerID(peerid);
-        setScope(scope);
-        setPrimaryKey(pKey);
-        addEntry(key, value, expiration);
-    }
-
-    /**
-     * Construct a doc from vectors of strings
-     *
-     * @param peerid  PeerID associated with this message
-     * @param scope   scope @see #PERSISTONLY, #REPLICATE
-     * @param pKey    primary key
-     * @param entries the entries for this message
-     */
-    public SrdiMessageImpl(String peerid, int scope, String pKey, List<Entry> entries) {
-
-        PeerID pid;
-
-        try {
-            pid = (PeerID) IDFactory.fromURI(new URI(peerid));
-        } catch (URISyntaxException badID) {
-            throw new IllegalArgumentException("Invalid PeerID ID in message");
-        }
-
-        setPeerID(pid);
-        setScope(scope);
-        setPrimaryKey(pKey);
-        setEntries(entries);
-    }
-
-    /**
-     * @param doc the element
-     */
-    public void readIt(XMLElement doc) {
-
-        String key;
-        String value;
-        long expiration;
-
-        Enumeration elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            XMLElement elem = (XMLElement) elements.nextElement();
-
-            if (elem.getName().equals(pidTag)) {
-                try {
-                    URI pID = new URI(elem.getTextValue());
-
-                    setPeerID((PeerID) IDFactory.fromURI(pID));
-                } catch (URISyntaxException badID) {
-                    throw new IllegalArgumentException("Invalid PeerID ID in message");
-                }
-                continue;
-            }
-            if (elem.getName().equals(pKeyTag)) {
-                setPrimaryKey(elem.getTextValue());
-            }
-            if (elem.getName().equals(scopeTag)) {
-                setScope(Integer.parseInt(elem.getTextValue()));
-            }
-
-            if (elem.getName().equals(entryTag)) {
-                Attribute keyEl = elem.getAttribute(sKeyTag);
-
-                if (keyEl == null) {
-                    key = "NA";
-                } else {
-                    key = keyEl.getValue();
-                }
-
-                value = elem.getTextValue();
-                if (null != value) {
-                    Attribute expAttr = elem.getAttribute(expirationTag);
-
-                    if (expAttr != null) {
-                        String expstr = expAttr.getValue();
-
-                        expiration = Long.parseLong(expstr);
-                    } else {
-                        expiration = -1;
-                    }
-                    SrdiMessage.Entry entry = new SrdiMessage.Entry(key, value, expiration);
-
-                    addEntry(entry);
-                } else {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("SrdiMessage Entry with a Null value");
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * return a Document representation of this object
-     *
-     * @param encodeAs the mime type encoding
-     * @return document represtation of this object
-     */
-    @Override
-    public Document getDocument(MimeMediaType encodeAs) {
-
-        StructuredTextDocument adv = (StructuredTextDocument)
-                StructuredDocumentFactory.newStructuredDocument(encodeAs, getMessageType());
-
-        if (adv instanceof Attributable) {
-            ((Attributable) adv).addAttribute("xmlns:jxta", "http://jxta.org");
-        }
-
-        Element e;
-        Iterator eachEntry = getEntries().iterator();
-        PeerID peerid = getPeerID();
-
-        if (peerid != null) {
-            e = adv.createElement(pidTag, peerid.toString());
-            adv.appendChild(e);
-        }
-        if (getPrimaryKey() != null) {
-            e = adv.createElement(pKeyTag, getPrimaryKey());
-            adv.appendChild(e);
-        }
-        if (getScope() > 0) {
-            e = adv.createElement(scopeTag, Integer.toString(getScope()));
-            adv.appendChild(e);
-        }
-
-        while (eachEntry.hasNext()) {
-            SrdiMessage.Entry entry = (SrdiMessage.Entry) eachEntry.next();
-
-            if (entry.key == null && entry.value == null) {
-                // skip bad entries
-                continue;
-            }
-            e = adv.createElement(entryTag, entry.value);
-            adv.appendChild(e);
-            ((Attributable) e).addAttribute(expirationTag, Long.toString(entry.expiration));
-            ((Attributable) e).addAttribute(sKeyTag, entry.key);
-        }
-        return adv;
-    }
-
-    /**
-     * returns the document string representation of this object
-     *
-     * @return String representation of the of this message type
-     */
-    @Override
-    public String toString() {
-        StructuredTextDocument doc = (StructuredTextDocument) getDocument(MimeMediaType.XMLUTF8);
-
-        return doc.toString();
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/TCPAdv.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/TCPAdv.java
deleted file mode 100644 (file)
index cd15eba..0000000
+++ /dev/null
@@ -1,827 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.protocol;
-
-
-import java.util.Arrays;
-import java.util.Enumeration;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Attributable;
-import net.jxta.document.Attribute;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.protocol.TransportAdvertisement;
-
-
-/**
- * Provides configuration parameters for the JXTA TCP Message Transport.
- */
-public class TCPAdv extends TransportAdvertisement {
-
-    /**
-     *  Logger
-     */
-    private static final Logger LOG = Logger.getLogger(TCPAdv.class.getName());
-
-    private static final String CONFIGMODES[] = { "auto", "manual" };
-    private static final String INDEXFIELDS[] = {/* none */};
-
-    private static final String PORT_ELEMENT = "Port";
-    private static final String ClientOffTag = "ClientOff";
-    private static final String ServerOffTag = "ServerOff";
-    private static final String MULTICAST_OFF_TAG = "MulticastOff";
-    private static final String FlagsTag = "Flags";
-    private static final String PublicAddressOnlyAttr = "PublicAddressOnly";
-
-    private String configMode = CONFIGMODES[0];
-    private String interfaceAddress = null;
-    private int startPort = -1;
-    private int listenPort = -1;
-    private int endPort = -1;
-    private String publicAddress = null;
-    private String multicastaddr = null;
-    private int multicastport = -1;
-    private int multicastsize = -1;
-    private boolean clientEnabled = true;
-    private boolean serverEnabled = true;
-    private boolean multicastEnabled = true;
-    private boolean publicAddressOnly = false;
-
-    /**
-     *  Our instantiator
-     */
-    public static class Instantiator implements AdvertisementFactory.Instantiator {
-
-        /**
-         * {@inheritDoc}
-         */
-        public String getAdvertisementType() {
-            return TCPAdv.getAdvertisementType();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance() {
-            return new TCPAdv();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Advertisement newInstance(net.jxta.document.Element root) {
-            if (!XMLElement.class.isInstance(root)) {
-                throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-            }
-
-            return new TCPAdv((XMLElement) root);
-        }
-    }
-
-    /**
-     *  Returns the identifying type of this Advertisement.
-     *
-     *  <p/><b>Note:</b> This is a static method. It cannot be used to determine
-     *  the runtime type of an advertisement. ie.
-     *  </p><code><pre>
-     *      Advertisement adv = module.getSomeAdv();
-     *      String advType = adv.getAdvertisementType();
-     *  </pre></code>
-     *
-     *  <p/><b>This is wrong and does not work the way you might expect.</b>
-     *  This call is not polymorphic and calls
-     *  Advertisement.getAdvertisementType() no matter what the real type of the
-     *  advertisement.
-     *
-     * @return String the type of advertisement
-     */
-    public static String getAdvertisementType() {
-        return "jxta:TCPTransportAdvertisement";
-    }
-
-    private TCPAdv() {
-        setProtocol("tcp");
-    }
-
-    private TCPAdv(XMLElement doc) {
-        this();
-        
-        String doctype = doc.getName();
-
-        String typedoctype = "";
-        Attribute itsType = doc.getAttribute("type");
-
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-
-        if (!doctype.equals(getAdvertisementType()) && !getAdvertisementType().equals(typedoctype)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-
-        Attribute attr = doc.getAttribute(FlagsTag);
-
-        if (attr != null) {
-            String options = attr.getValue();
-
-            publicAddressOnly = (options.indexOf(PublicAddressOnlyAttr) != -1);
-        }
-
-        Enumeration elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            XMLElement elem = (XMLElement) elements.nextElement();
-
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Unhandled Element: " + elem);
-                }
-            }
-        }
-
-        // Sanity Check!!!
-        if (!Arrays.asList(CONFIGMODES).contains(configMode)) {
-            throw new IllegalArgumentException("Unsupported configuration mode.");
-        }
-
-        if ((listenPort < -1) || (listenPort > 65535)) {
-            throw new IllegalArgumentException("Illegal Listen Port Value");
-        }
-
-        if ((startPort < -1) || (startPort > 65535)) {
-            throw new IllegalArgumentException("Illegal Start Port Value");
-        }
-
-        if ((endPort < -1) || (endPort > 65535)) {
-            throw new IllegalArgumentException("Illegal End Port Value");
-        }
-
-        if ((0 == startPort) && (endPort != 0) || (0 != startPort) && (endPort == 0)) {
-            throw new IllegalArgumentException("Port ranges must both be 0 or non-0");
-        }
-
-        if ((-1 == startPort) && (endPort != -1) || (-1 != startPort) && (endPort == -1)) {
-            throw new IllegalArgumentException("Port ranges must both be -1 or not -1");
-        }
-
-        if ((null != publicAddress) && ((-1 != startPort) || (listenPort <= 0))) {
-            throw new IllegalArgumentException("Dynamic ports not supported with public address port forwarding.");
-        }
-
-        if (getMulticastState() && (null == getMulticastAddr())) {
-            throw new IllegalArgumentException("Multicast enabled and no address specified.");
-        }
-
-        if (getMulticastState() && (-1 == getMulticastPort())) {
-            throw new IllegalArgumentException("Multicast enabled and no port specified.");
-        }
-
-        if (getMulticastState() && ((getMulticastPort() <= 0) || (getMulticastPort() > 65536))) {
-            throw new IllegalArgumentException("Illegal Multicast Port Value");
-        }
-
-        if (getMulticastState() && (-1 == getMulticastSize())) {
-            throw new IllegalArgumentException("Multicast enabled and no size specified.");
-        }
-
-        if (getMulticastState() && ((getMulticastSize() <= 0) || (getMulticastSize() > 1048575L))) {
-            throw new IllegalArgumentException("Illegal Multicast datagram size");
-        }
-
-        // XXX 20050118 bondolo Some versions apparently don't initialize this field. Eventually make it required.
-        if (null == getProtocol()) {
-            setProtocol("tcp");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getAdvType() {
-        return getAdvertisementType();
-    }
-
-    /**
-     * Returns the interface which the TCP transport will use.
-     *
-     * @return The interface to use. May be a DNS name or an IP Address.
-     */
-    public String getInterfaceAddress() {
-        return interfaceAddress;
-    }
-
-    /**
-     * Sets the interface which the TCP transport will use.
-     *
-     * @param ia The interface to use. May be a DNS name or an IP Address.
-     */
-    public void setInterfaceAddress(String ia) {
-        if (null != ia) {
-            ia = ia.trim();
-
-            if (0 == ia.length()) {
-                ia = null;
-            }
-        }
-
-        this.interfaceAddress = ia;
-    }
-
-    /**
-     * Returns the port on which the TCP Transport will listen if configured to
-     * do so. If a port range is specified then this the preference. Valid
-     * values are <code>-1</code>, <code>0</code> and <code>1-65535</code>.
-     * The <code>-1</code> value is used to signify that there is no port
-     * preference and any port in range will be used. The <code>0</code>
-     * specifies that the Socket API dynamic port allocation should be used.
-     * For values <code>1-65535</code> the value specifies the required port on
-     * which the TCP transport will listen.
-     *
-     * @return the port
-     */
-    public int getPort() {
-        return listenPort;
-    }
-
-    /**
-     * Sets the port on which the TCP Transport will listen if configured to
-     * do so. If a port range is specified then this the preference. Valid
-     * values are <code>-1</code>, <code>0</code> and <code>1-65535</code>.
-     * The <code>-1</code> value is used to signify that there is no port
-     * preference and any port in range will be used. The <code>0</code>
-     * specifies that the Socket API dynamic port allocation should be used.
-     * For values <code>1-65535</code> the value specifies the required port on
-     * which the TCP transport will listen.
-     *
-     * @param port the port on which to listen.
-     */
-    public void setPort(int port) {
-        listenPort = port;
-    }
-
-    /**
-     * Return the lowest port on which the TCP Transport will listen if
-     * configured to do so. Valid values are <code>-1</code>, <code>0</code> and
-     * <code>1-65535</code>. The <code>-1</code> value is used to signify that
-     * the port range feature should be disabled. The <code>0</code> specifies
-     * that the Socket API dynamic port allocation should be used. For values
-     * <code>1-65535</code> the value must be equal to or less than the value
-     * used for end port.
-     *
-     * @return the lowest port on which to listen.
-     */
-    public int getStartPort() {
-        return startPort;
-    }
-
-    /**
-     * Sets the lowest port on which the TCP Transport will listen if configured
-     * to do so. Valid values are <code>-1</code>, <code>0</code> and
-     * <code>1-65535</code>. The <code>-1</code> value is used to signify that
-     * the port range feature should be disabled. The <code>0</code> specifies
-     * that the Socket API dynamic port allocation should be used. For values
-     * <code>1-65535</code> the value must be equal to or less than the value
-     * used for end port.
-     *
-     * @param start the lowest port on which to listen.
-     */
-    public void setStartPort(int start) {
-        startPort = start;
-    }
-
-    /**
-     * Return the highest port on which the TCP Transport will listen if
-     * configured to do so. Valid values are <code>-1</code>, <code>0</code> and
-     * <code>1-65535</code>. The <code>-1</code> value is used to signify that
-     * the port range feature should be disabled. The <code>0</code> specifies
-     * that the Socket API dynamic port allocation should be used. For values
-     * <code>1-65535</code> the value must be equal to or greater than the value
-     * used for start port.
-     *
-     * @return the highest port on which to listen.
-     */
-    public int getEndPort() {
-        return endPort;
-    }
-
-    /**
-     * Sets the highest port on which the TCP Transport will listen if
-     * configured to do so. Valid values are <code>-1</code>, <code>0</code> and
-     * <code>1-65535</code>. The <code>-1</code> value is used to signify that
-     * the port range feature should be disabled. The <code>0</code> specifies
-     * that the Socket API dynamic port allocation should be used. For values
-     * <code>1-65535</code> the value must be equal to or greater than the value
-     * used for start port.
-     *
-     * @param end the highest port on which to listen.
-     */
-    public void setEndPort(int end) {
-        endPort = end;
-    }
-
-    /**
-     * Determine whether multicast if off or not
-     *
-     * @return boolean  current multicast state
-     */
-    public boolean getMulticastState() {
-        return multicastEnabled;
-    }
-
-    /**
-     * Enable or disable multicast.
-     *
-     * @param newState the desired state.
-     */
-    public void setMulticastState(boolean newState) {
-        multicastEnabled = newState;
-    }
-
-    /**
-     * returns the multicastaddr
-     *
-     * @return string multicastaddr
-     */
-    public String getMulticastAddr() {
-        return multicastaddr;
-    }
-
-    /**
-     * set the multicastaddr
-     *
-     * @param multicastaddr set multicastaddr
-     */
-    public void setMulticastAddr(String multicastaddr) {
-        if (null != multicastaddr) {
-            multicastaddr = multicastaddr.trim();
-
-            if (0 == multicastaddr.length()) {
-                multicastaddr = null;
-            }
-        }
-
-        this.multicastaddr = multicastaddr;
-    }
-
-    /**
-     * returns the multicastport
-     *
-     * @return string multicastport
-     */
-    public int getMulticastPort() {
-        return multicastport;
-    }
-
-    /**
-     * set the multicastport
-     * @param multicastport set multicastport
-     */
-    public void setMulticastPort(int multicastport) {
-        this.multicastport = multicastport;
-    }
-
-    /**
-     * returns the multicastsize
-     *
-     * @return integer containting the multicast size
-     */
-    public int getMulticastSize() {
-        return multicastsize;
-    }
-
-    /**
-     * set the multicastsize
-     *
-     * @param multicastsize set multicast size
-     */
-    public void setMulticastSize(int multicastsize) {
-        this.multicastsize = multicastsize;
-    }
-
-    /**
-     * Returns the public address
-     *
-     * @return string public address
-     */
-    public String getServer() {
-        return publicAddress;
-    }
-
-    /**
-     * Set the public address. That is, a the address of a server socket
-     * to connect to from the outside. Argument is in the form host:port
-     *
-     * @param address address
-     */
-    public void setServer(String address) {
-        if (null != address) {
-            address = address.trim();
-
-            if (0 == address.length()) {
-                address = null;
-            }
-        }
-
-        this.publicAddress = address;
-    }
-
-    /**
-     *  Returns the configuration for outbound connections.
-     *
-     *  @return <code>true</code> if outbound connections are allowed otherwise
-     *  <code>false</code>
-     */
-    public boolean isClientEnabled() {
-        return clientEnabled;
-    }
-
-    /**
-     *  Sets the configuration for outbound connections.
-     *
-     *  @param enabled <code>true</code> if outbound connections are allowed otherwise
-     *  <code>false</code>
-     */
-    public void setClientEnabled(boolean enabled) {
-        clientEnabled = enabled;
-    }
-
-    /**
-     *  Returns the configuration for inbound connections.
-     *
-     *  @return <code>true</code> if inbound connections are allowed otherwise
-     *  <code>false</code>
-     */
-    public boolean isServerEnabled() {
-        return serverEnabled;
-    }
-
-    /**
-     *  Sets the configuration for inbound connections.
-     *
-     *  @param enabled <code>true</code> if inbound connections are allowed otherwise
-     *  <code>false</code>
-     */
-    public void setServerEnabled(boolean enabled) {
-        serverEnabled = enabled;
-    }
-
-    /**
-     * returns the config mode. That is, how the user prefers to configure
-     * the interface address: "auto", "manual"
-     *
-     * @return string config mode
-     */
-    public String getConfigMode() {
-        return configMode;
-    }
-
-    /**
-     * set the config mode. That is, how the user prefers to configure
-     * the interface address: "auto", "manual"
-     *
-     * This is just a pure config item. It is never in published advs. The TCP
-     * transport strips it when it initializes.
-     *
-     * @param mode Can be "auto", "manual" other settings will act as the default
-     * which is "auto".
-     */
-    public void setConfigMode(String mode) {
-        if (!Arrays.asList(CONFIGMODES).contains(mode)) {
-            throw new IllegalArgumentException("Unsupported configuration mode.");
-        }
-
-        configMode = mode;
-    }
-
-    /**
-     * Returns the state of whether to only use public address
-     * @return boolean true if set to use "Public Address Only"
-     */
-    public boolean getPublicAddressOnly() {
-        return publicAddressOnly;
-    }
-
-    /**
-     * Sets the state of whether to only use public address
-     * @param only true to use "Public Address Only"
-     */
-    public void setPublicAddressOnly(boolean only) {
-        publicAddressOnly = only;
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    protected boolean handleElement(Element raw) {
-
-        if (super.handleElement(raw)) {
-            return true;
-        }
-
-        XMLElement elem = (XMLElement) raw;
-
-        if (elem.getName().equals(MULTICAST_OFF_TAG)) {
-            setMulticastState(false);
-            return true;
-        }
-
-        if (elem.getName().equals(ClientOffTag)) {
-            setClientEnabled(false);
-            return true;
-        }
-
-        if (elem.getName().equals(ServerOffTag)) {
-            setServerEnabled(false);
-            return true;
-        }
-
-        String value = elem.getTextValue();
-
-        if ((null == value) || (0 == value.trim().length())) {
-            return false;
-        }
-
-        value = value.trim();
-
-        if (elem.getName().equals("Protocol")) {
-            setProtocol(value);
-            return true;
-        }
-
-        if (PORT_ELEMENT.equals(elem.getName())) {
-            try {
-                setPort(Integer.parseInt(value));
-                Attribute startAttr = elem.getAttribute("start");
-                Attribute endAttr = elem.getAttribute("end");
-
-                if ((null != startAttr) && (null != endAttr)) {
-                    setStartPort(Integer.parseInt(startAttr.getValue().trim()));
-                    setEndPort(Integer.parseInt(endAttr.getValue().trim()));
-                }
-            } catch (NumberFormatException badPort) {
-                throw new IllegalArgumentException("Illegal port value : " + value);
-            }
-            return true;
-        }
-
-        if (elem.getName().equals("MulticastAddr")) {
-            setMulticastAddr(value);
-            return true;
-        }
-
-        if (elem.getName().equals("MulticastPort")) {
-            try {
-                setMulticastPort(Integer.parseInt(value));
-            } catch (NumberFormatException badPort) {
-                throw new IllegalArgumentException("Illegal multicast port value : " + value);
-            }
-            return true;
-        }
-
-        if (elem.getName().equals("MulticastSize")) {
-            try {
-                int theMulticastSize = Integer.parseInt(value);
-
-                setMulticastSize(theMulticastSize);
-            } catch (NumberFormatException badPort) {
-                throw new IllegalArgumentException("Illegal multicast datagram size : " + value);
-            }
-            return true;
-        }
-
-        if (elem.getName().equals("Server")) {
-            setServer(value);
-            return true;
-        }
-
-        if (elem.getName().equals("InterfaceAddress")) {
-            setInterfaceAddress(value);
-            return true;
-        }
-
-        if (elem.getName().equals("ConfigMode")) {
-            setConfigMode(value);
-            return true;
-        }
-
-        return false;
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public Document getDocument(MimeMediaType encodeAs) {
-        StructuredDocument adv = (StructuredDocument) super.getDocument(encodeAs);
-
-        if (!(adv instanceof Attributable)) {
-            throw new IllegalStateException("Only Attributable document types allowed.");
-        }
-
-        // XXX 20050118 bondolo Some versions apparently don't initialize this field. Eventually make it required.
-        if (null == getProtocol()) {
-            setProtocol("tcp");
-        }
-
-        if ((listenPort < -1) || (listenPort > 65535)) {
-            throw new IllegalStateException("Illegal Listen Port Value");
-        }
-
-        if ((startPort < -1) || (startPort > 65535)) {
-            throw new IllegalStateException("Illegal Start Port Value");
-        }
-
-        if ((endPort < -1) || (endPort > 65535)) {
-            throw new IllegalStateException("Illegal End Port Value");
-        }
-
-        if ((0 == startPort) && (endPort != 0) || (0 != startPort) && (endPort == 0)) {
-            throw new IllegalStateException("Port ranges must both be 0 or non-0");
-        }
-
-        if ((-1 == startPort) && (endPort != -1) || (-1 != startPort) && (endPort == -1)) {
-            throw new IllegalStateException("Port ranges must both be -1 or not -1");
-        }
-
-        if ((null != publicAddress) && ((-1 != startPort) || (listenPort <= 0))) {
-            throw new IllegalStateException("Dynamic ports not supported with public address port forwarding.");
-        }
-
-        if (getMulticastState() && (null == getMulticastAddr())) {
-            throw new IllegalStateException("Multicast enabled and no address specified.");
-        }
-
-        if (getMulticastState() && (-1 == getMulticastPort())) {
-            throw new IllegalStateException("Multicast enabled and no port specified.");
-        }
-
-        if (getMulticastState() && ((getMulticastPort() <= 0) || (getMulticastPort() > 65536))) {
-            throw new IllegalStateException("Illegal Multicast Port Value");
-        }
-
-        if (getMulticastState() && (-1 == getMulticastSize())) {
-            throw new IllegalStateException("Multicast enabled and no size specified.");
-        }
-
-        if (getMulticastState() && ((getMulticastSize() <= 0) || (getMulticastSize() > 1048575L))) {
-            throw new IllegalStateException("Illegal Multicast datagram size");
-        }
-
-        if (adv instanceof Attributable) {
-            // Only one flag for now. Easy.
-            if (publicAddressOnly) {
-                ((Attributable) adv).addAttribute(FlagsTag, PublicAddressOnlyAttr);
-            }
-        }
-
-        Element e11 = adv.createElement("Protocol", getProtocol());
-
-        adv.appendChild(e11);
-
-        if (!isClientEnabled()) {
-            Element e19 = adv.createElement(ClientOffTag);
-
-            adv.appendChild(e19);
-        }
-
-        if (!isServerEnabled()) {
-            Element e20 = adv.createElement(ServerOffTag);
-
-            adv.appendChild(e20);
-        }
-
-        if (getConfigMode() != null) {
-            Element e18 = adv.createElement("ConfigMode", getConfigMode());
-
-            adv.appendChild(e18);
-        }
-
-        String interfaceAddr = getInterfaceAddress();
-
-        if (null != interfaceAddr) {
-            Element e17 = adv.createElement("InterfaceAddress", interfaceAddr);
-
-            adv.appendChild(e17);
-        }
-
-        Element e12 = adv.createElement(PORT_ELEMENT, Integer.toString(listenPort));
-
-        adv.appendChild(e12);
-        if (adv instanceof Attributable) {
-            Attributable attrElem = (Attributable) e12;
-
-            if ((-1 != startPort) && (-1 != endPort)) {
-                attrElem.addAttribute("start", Integer.toString(startPort));
-                attrElem.addAttribute("end", Integer.toString(endPort));
-            }
-        }
-
-        String serverAddr = getServer();
-
-        if (null != serverAddr) {
-            Element e16 = adv.createElement("Server", serverAddr);
-
-            adv.appendChild(e16);
-        }
-
-        if (!getMulticastState()) {
-            Element e19 = adv.createElement(MULTICAST_OFF_TAG);
-
-            adv.appendChild(e19);
-        }
-
-        if (null != getMulticastAddr()) {
-            Element e13 = adv.createElement("MulticastAddr", getMulticastAddr());
-
-            adv.appendChild(e13);
-        }
-
-        if (-1 != getMulticastPort()) {
-            Element e14 = adv.createElement("MulticastPort", Integer.toString(getMulticastPort()));
-
-            adv.appendChild(e14);
-        }
-
-        if (-1 != getMulticastSize()) {
-            Element e15 = adv.createElement("MulticastSize", Integer.toString(getMulticastSize()));
-
-            adv.appendChild(e15);
-        }
-
-        return adv;
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public String[] getIndexFields() {
-        return INDEXFIELDS;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/protocol/package.html
deleted file mode 100644 (file)
index 9574bd1..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    Provides implementation objects for Advertisments and protocol messages for 
-    the JXTA 
-               <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#gloss-jcs" target='_blank'>Core</a>
-               and
-               <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#gloss-jss" target='_blank'>Standard</a>
-    Protocols. These classes are responsible for serializing and deserializing
-    messages and advertisements.
-
-               @see net.jxta.document.Advertisement
-               @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#overview-advertisements" target='_blank'>JXTA Protocols Specification - Overview : Advertisements</a>
-               @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#core-advert" target='_blank'>JXTA Protocols Specification - Advertisements</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/proxy/ProxyService.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/proxy/ProxyService.java
deleted file mode 100644 (file)
index 81e1cd9..0000000
+++ /dev/null
@@ -1,1191 +0,0 @@
-/*
- * Copyright (c) 2005-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.proxy;
-
-import net.jxta.discovery.DiscoveryEvent;
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.MimeMediaType;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointListener;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.StringMessageElement;
-import net.jxta.exception.PeerGroupException;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.impl.util.Cache;
-import net.jxta.impl.util.CacheEntry;
-import net.jxta.impl.util.CacheEntryListener;
-import net.jxta.impl.util.LRUCache;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.pipe.InputPipe;
-import net.jxta.pipe.OutputPipe;
-import net.jxta.pipe.OutputPipeEvent;
-import net.jxta.pipe.OutputPipeListener;
-import net.jxta.pipe.PipeMsgEvent;
-import net.jxta.pipe.PipeMsgListener;
-import net.jxta.pipe.PipeService;
-import net.jxta.protocol.DiscoveryResponseMsg;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.PeerGroupAdvertisement;
-import net.jxta.protocol.PipeAdvertisement;
-import net.jxta.service.Service;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.io.IOException;
-import java.io.StringReader;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.Map;
-import java.util.TreeMap;
-
-import net.jxta.platform.Module;
-
-
-// FIXME: jice@jxta.org - 20020515
-// All public methods are synchronized.
-// None of them does anything blocking so that should be about OK, however
-// first it is not 100% sure, second eventhough non-blocking, some of these
-// operations could take a significant amount of time, which may be unfair
-// to other threads that wish to enter for a quick operation.
-// Making the locking finer-grain would require significant code rework, so
-// it will have to do for now.
-
-public class ProxyService implements Service, EndpointListener, PipeMsgListener, OutputPipeListener, CacheEntryListener {
-
-    private final static Logger LOG = Logger.getLogger(ProxyService.class.getName());
-
-    public final static int DEFAULT_THRESHOLD = 2;
-    public final static int DEFAULT_LIFETIME = 1000 * 60 * 30; // 30 minutes
-
-    /**
-     * *********************************************************************
-     * Define the proxy message tags
-     * ********************************************************************
-     */
-    public static final String REQUEST_TAG = "request";
-    public static final String RESPONSE_TAG = "response";
-
-    static final String REQUESTID_TAG = "requestId";
-    static final String TYPE_TAG = "type";
-    static final String NAME_TAG = "name";
-    static final String ID_TAG = "id";
-    static final String ARG_TAG = "arg";
-    static final String ATTRIBUTE_TAG = "attr";
-    static final String VALUE_TAG = "value";
-    static final String THRESHOLD_TAG = "threshold";
-    static final String ERROR_MESSAGE_TAG = "error";
-    static final String PROXYNS = "proxy";
-
-    /**
-     * *********************************************************************
-     * Define the proxy request types
-     * ********************************************************************
-     */
-    public static final String REQUEST_JOIN = "join";
-    public static final String REQUEST_CREATE = "create";
-    public static final String REQUEST_SEARCH = "search";
-    public static final String REQUEST_LISTEN = "listen";
-    public static final String REQUEST_CLOSE = "close";
-    public static final String REQUEST_SEND = "send";
-
-    /**
-     * *********************************************************************
-     * Define the proxy response types
-     * ********************************************************************
-     */
-    public static final String RESPONSE_SUCCESS = "success";
-    public static final String RESPONSE_ERROR = "error";
-    public static final String RESPONSE_INFO = "info";
-    public static final String RESPONSE_RESULT = "result";
-    public static final String RESPONSE_MESSAGE = "data";
-
-    /**
-     * *********************************************************************
-     * Define the proxy type tags
-     * ********************************************************************
-     */
-    public static final String TYPE_PEER = "PEER";
-    public static final String TYPE_GROUP = "GROUP";
-    public static final String TYPE_PIPE = "PIPE";
-
-    private PeerGroup group = null;
-    private ID assignedID = null;
-    private String serviceName = null;
-    private String serviceParameter = null;
-    private EndpointService endpoint = null;
-    private DiscoveryService discovery = null;
-    private PipeService pipe = null;
-    private ModuleImplAdvertisement implAdvertisement = null;
-
-    private final LRUCache<Integer, Requestor> searchRequests = new LRUCache<Integer, Requestor>(25); // Currently unused
-    private final Map<String, PipeListenerList> pipeListeners = new TreeMap<String, PipeListenerList>();
-
-    /**
-     * Pending pipes cost only memory, so it is not a problrm to
-     * wait for the GC to cleanup things. No CacheEntryListener.
-     */
-    private final Cache pendingPipes = new Cache(200, null);
-    private Cache resolvedPipes;
-
-    private static Map<String, PeerGroup> proxiedGroups = new HashMap<String, PeerGroup>(16);
-    private static Map<String, String> passwords = new HashMap<String, String>(16);
-
-    /**
-     * {@inheritDoc}
-     */
-    public void init(PeerGroup group, ID assignedID, Advertisement implAdv) throws PeerGroupException {
-        this.group = group;
-        this.assignedID = assignedID;
-        this.serviceName = assignedID.toString();
-        this.implAdvertisement = (ModuleImplAdvertisement) implAdv;
-
-        serviceParameter = group.getPeerGroupID().toString();
-
-        // Resolved pipes cost non-memory resources, so we need to close
-        // them as early as we forget them. Need a CacheEntryListener (this).
-        resolvedPipes = new Cache(200, this);
-
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring JXME Proxy Service : " + assignedID);
-
-            configInfo.append("\n\tImplementation :");
-            configInfo.append("\n\t\tModule Spec ID: ").append(implAdvertisement.getModuleSpecID());
-            configInfo.append("\n\t\tImpl Description : ").append(implAdvertisement.getDescription());
-            configInfo.append("\n\t\tImpl URI : ").append(implAdvertisement.getUri());
-            configInfo.append("\n\t\tImpl Code : ").append(implAdvertisement.getCode());
-            configInfo.append("\n\tGroup Params :");
-            configInfo.append("\n\t\tGroup : ").append(group.getPeerGroupName());
-            configInfo.append("\n\t\tGroup ID : ").append(group.getPeerGroupID());
-            configInfo.append("\n\t\tPeer ID : ").append(group.getPeerID());
-            LOG.config(configInfo.toString());
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public int startApp(String[] args) {
-
-        Service needed = group.getEndpointService();
-
-        if (null == needed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is a endpoint service");
-            }
-
-            return START_AGAIN_STALLED;
-        }
-
-        needed = group.getDiscoveryService();
-        if (null == needed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is a discovery service");
-            }
-
-            return START_AGAIN_STALLED;
-        }
-
-        needed = group.getPipeService();
-        if (null == needed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is a pipe service");
-            }
-
-            return START_AGAIN_STALLED;
-        }
-
-        endpoint = group.getEndpointService();
-        discovery = group.getDiscoveryService();
-        pipe = group.getPipeService();
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("addListener " + serviceName + serviceParameter);
-        }
-
-        endpoint.addIncomingMessageListener(this, serviceName, serviceParameter);
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("JXME Proxy Service started.");
-        }
-        return Module.START_OK;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void stopApp() {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("removeListener " + serviceName + serviceParameter);
-        }
-
-        endpoint.removeIncomingMessageListener(serviceName, serviceParameter);
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("JXME Proxy Service stopped.");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ModuleImplAdvertisement getImplAdvertisement() {
-        return implAdvertisement;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ProxyService getInterface() {
-        return this;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized void processIncomingMessage(Message message, EndpointAddress srcAddr, EndpointAddress dstAddr) {
-
-        logMessage(message, LOG);
-
-        Requestor requestor = null;
-
-        try {
-            // requestor = Requestor.createRequestor(group, message, srcAddr);
-            // Commented out the above line and added the following three lines.
-            // The change allows to reduce the traffice going to a JXME peer
-            // by able to remove ERM completly. As a side effect (severe one)
-            // JXTA Proxy and JXTA relay need to be running on the same peer.
-            // This changes should be pulled out as soon as ERM is implemented
-            // in a more inteligent and effective way so that it doesn't
-            // have any impact on JXME peers.
-            EndpointAddress relayAddr = new EndpointAddress("relay", srcAddr.getProtocolAddress(), srcAddr.getServiceName(),
-                    srcAddr.getServiceParameter());
-
-            requestor = Requestor.createRequestor(group, message, relayAddr, 0);
-        } catch (IOException e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "could not create requestor", e);
-            }
-        }
-
-        String request = popString(REQUEST_TAG, message);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("request = " + request + " requestor " + requestor);
-        }
-
-        if (request != null && requestor != null) {
-            if (REQUEST_JOIN.equals(request)) {
-                handleJoinRequest(requestor, popString(ID_TAG, message), popString(ARG_TAG, message));
-            } else if (REQUEST_CREATE.equals(request)) {
-                handleCreateRequest(requestor, popString(TYPE_TAG, message), popString(NAME_TAG, message),
-                        popString(ID_TAG, message), popString(ARG_TAG, message));
-            } else if (REQUEST_SEARCH.equals(request)) {
-                handleSearchRequest(requestor, popString(TYPE_TAG, message), popString(ATTRIBUTE_TAG, message),
-                        popString(VALUE_TAG, message), popString(THRESHOLD_TAG, message));
-            } else if ("listen".equals(request)) {
-                handleListenRequest(requestor, popString(ID_TAG, message));
-            } else if ("close".equals(request)) {
-                handleCloseRequest(requestor, popString(ID_TAG, message));
-            } else if ("send".equals(request)) {
-                handleSendRequest(requestor, popString(ID_TAG, message), message);
-            }
-        }
-    }
-
-    // Right now there's a security hole: passwd come in clear.
-    // And not much is done for stopping clients to use the new group
-    // without being authenticated. We also never get rid of these
-    // additional groups.
-    private synchronized void handleJoinRequest(Requestor requestor, String grpId, String passwd) {
-
-        PeerGroup g = proxiedGroups.get(grpId);
-
-        if (g != null) {
-            if (g == this.group) {
-                requestor.notifyError("Same group");
-            } else if (!passwords.get(grpId).equals(passwd)) {
-                requestor.notifyError("Incorrect password");
-            } else {
-                requestor.notifySuccess();
-            }
-            return;
-        }
-
-        try {
-            g = group.newGroup((PeerGroupID) IDFactory.fromURI(new URI(grpId)));
-            g.getRendezVousService().startRendezVous();
-        } catch (Exception ge) {
-            requestor.notifyError(ge.getMessage());
-            return;
-        }
-
-        // XXX check membership here. (would work only for single passwd grps)
-        // For now, assume join is always welcome.
-
-        // So far so good. Try to start a proxy in that grp.
-        try {
-            // Fork this proxy into the new grp.
-            ProxyService proxyService = new ProxyService();
-            proxyService.init(g, assignedID, implAdvertisement);
-            proxyService.startApp(null);
-        } catch (Exception e) {
-            requestor.notifyError(e.getMessage());
-            return;
-        }
-        // set non-deft passwd
-        passwords.put(grpId, passwd);
-        proxiedGroups.put(grpId, g);
-        requestor.notifySuccess();
-    }
-
-    private void handleCreateRequest(Requestor requestor, String type, String name, String id, String arg) {
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("handleCreateRequest type=" + type + " name=" + name + " id=" + id + " arg=" + arg);
-        }
-
-        if (name == null) {
-            name = ""; // default name
-        }
-
-        if (TYPE_PEER.equals(type)) {
-            PeerAdvertisement adv = createPeerAdvertisement(name, id);
-
-            if (adv != null) {
-                try {
-                    discovery.publish(adv);
-                } catch (Exception e) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Could not publish peer advertisement", e);
-                    }
-                }
-                requestor.send(adv, RESPONSE_SUCCESS);
-            } else {
-                requestor.notifyError("could not create advertisement");
-            }
-        } else if (TYPE_GROUP.equals(type)) {
-            PeerGroupAdvertisement adv = createGroupAdvertisement(name, id);
-
-            if (adv != null) {
-                requestor.send(adv, RESPONSE_SUCCESS);
-            } else {
-                requestor.notifyError("could not create advertisement");
-            }
-        } else if (TYPE_PIPE.equals(type)) {
-            if (arg == null) {
-                arg = PipeService.UnicastType; // default pipe type
-            }
-
-            PipeAdvertisement adv = createPipeAdvertisement(name, id, arg);
-
-            if (adv != null) {
-                try {
-                    discovery.publish(adv);
-                } catch (Exception e) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Could not publish pipe advertisement", e);
-                    }
-                }
-
-                requestor.send(adv, RESPONSE_SUCCESS);
-            } else {
-                requestor.notifyError("could not create advertisement");
-            }
-        } else {
-            requestor.notifyError("unsupported type");
-        }
-    }
-
-    private void handleSearchRequest(Requestor requestor, String type, String attribute, String value, String threshold) {
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("handleSearchRequest type=" + type + " attribute=" + attribute + " value=" + value + " threshold=" + threshold);
-        }
-
-        int discoveryType;
-        int thr = DEFAULT_THRESHOLD;
-        try {
-            thr = Integer.parseInt(threshold);
-        } catch (NumberFormatException nex) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("handleSearchRequest failed to parse threshold " + threshold + ", using default " + DEFAULT_THRESHOLD);
-            }
-        }
-        requestor.setThreshold(thr);
-
-        if (TYPE_PEER.equals(type)) {
-            discoveryType = DiscoveryService.PEER;
-        } else if (TYPE_GROUP.equals(type)) {
-            discoveryType = DiscoveryService.GROUP;
-        } else {
-            discoveryType = DiscoveryService.ADV;
-        }
-
-        Enumeration<Advertisement> each = null;
-
-        try {
-            each = discovery.getLocalAdvertisements(discoveryType, attribute, value);
-        } catch (IOException e) {
-            requestor.notifyError("could not search locally");
-        }
-
-        int i = 0;
-        while (each.hasMoreElements() && i < thr) {
-            Advertisement adv = each.nextElement();
-
-            // notify the requestor of the result
-            // FIXME this can be optimized by sending all adv's in a
-            // single message
-            requestor.send(adv, RESPONSE_RESULT);
-            i++;
-        }
-
-        // start the query
-        int queryId = discovery.getRemoteAdvertisements(null, discoveryType, attribute, value, thr);
-
-        // register the query
-        searchRequests.put(queryId, requestor);
-    }
-
-    /**
-     * Finds a JXTA Pipe and starts listening to it.
-     *
-     * @param requestor the peer sending listen request.
-     * @param id        the id of the Pipe.
-     */
-    private void handleListenRequest(Requestor requestor, String id) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("handleListenRequest id=" + id);
-        }
-
-        if (id == null) {
-            requestor.notifyError("Pipe ID not specified");
-            return;
-        }
-
-        PipeAdvertisement pipeAdv = findPipeAdvertisement(null, id, null);
-
-        if (pipeAdv == null) {
-            requestor.notifyError("Pipe Advertisement not found");
-            return;
-        }
-
-        String pipeId = pipeAdv.getPipeID().toString();
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("listen to pipe name=" + pipeAdv.getName() + " id=" + pipeAdv.getPipeID() + " type=" + pipeAdv.getType());
-        }
-
-        // check to see if the input pipe already exist
-        PipeListenerList list = pipeListeners.get(pipeId);
-
-        if (list == null) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("first listener, create input pipe");
-            }
-
-            // create an input pipe
-            try {
-                list = new PipeListenerList(pipe.createInputPipe(pipeAdv, this), pipeListeners, pipeId);
-            } catch (IOException e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "could not listen to pipe", e);
-                }
-                requestor.notifyError("could not listen to pipe");
-                return;
-            }
-            pipeListeners.put(pipeId, list);
-        }
-
-        // add requestor to list
-        list.add(requestor);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("add requestor=" + requestor + " id=" + pipeId + " list=" + list);
-            LOG.fine("publish PipeAdvertisement");
-        }
-        // advertise the pipe locally
-        try {
-            discovery.publish(pipeAdv);
-        } catch (IOException e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Could not publish pipe advertisement", e);
-            }
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("done with listen request");
-        }
-
-        // notify requestor of success
-        requestor.notifySuccess();
-    }
-
-    private void handleCloseRequest(Requestor requestor, String id) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("handleCloseRequest id=" + id);
-        }
-
-        PipeListenerList list = pipeListeners.get(id);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("handleCloseRequest list = " + list);
-        }
-        if (list != null) {
-            list.remove(requestor);
-            if (list.size() == 0) {
-                pipeListeners.remove(id);
-            }
-        }
-
-        // notify requestor of success
-        requestor.notifySuccess();
-    }
-
-    // Send the given message to the given pipe.
-    private void sendToPipe(Requestor req, Message mess, OutputPipe out) {
-        try {
-            out.send(mess);
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("output pipe send end");
-            }
-            // notify requestor of success
-            req.notifySuccess();
-        } catch (IOException e) {
-            req.notifyError("could not send to pipe");
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "could not send to pipe", e);
-            }
-        }
-    }
-
-    class ClientMessage {
-        private Requestor requestor;
-        private Message message;
-
-        public ClientMessage(Requestor req, Message mess) {
-            requestor = req;
-            message = mess;
-        }
-
-        // Send this (pending) message
-        public void send(OutputPipe out) {
-            sendToPipe(requestor, message, out);
-        }
-
-    }
-
-
-    class PendingPipe {
-        private ClientMessage pending;
-
-        public PendingPipe() {
-            pending = null;
-        }
-
-        // Just got resolved ! Will send the pending message(s).
-        public void sendPending(OutputPipe out) {
-            pending.send(out);
-            pending = null;
-        }
-
-        // Enqueue a new pending message.
-        // (for now we only enqueue 1; others get trashed)
-        public void enqueue(Requestor req, Message mess) {
-            if (pending != null) {
-                return;
-            }
-            pending = new ClientMessage(req, mess);
-        }
-    }
-
-    private void handleSendRequest(Requestor requestor, String id, Message message) {
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("handleSendRequest id=" + id);
-        }
-
-        PipeAdvertisement pipeAdv = findPipeAdvertisement(null, id, null);
-
-        if (pipeAdv == null) {
-            requestor.notifyError("Could not find pipe");
-            return;
-        }
-
-        String pipeId = pipeAdv.getPipeID().toString();
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine(
-                    "send to pipe name=" + pipeAdv.getName() + " id=" + pipeAdv.getPipeID().toString() + " arg="
-                    + pipeAdv.getType());
-        }
-
-        // check if there are local listeners
-
-        PipeListenerList list = pipeListeners.get(pipeId);
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("local listener list " + list);
-        }
-
-        if (list != null && PipeService.UnicastType.equals(pipeAdv.getType())) {
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("start sending to each requestor");
-            }
-
-            list.send(message, pipeId);
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("end sending to each requestor");
-            }
-            // notify requestor of success
-            requestor.notifySuccess();
-            return;
-        }
-
-        // NOTE: This part is NOT exercised by the load test because all
-        // clients are local. To exercise this part, comment out the
-        // optimization above.
-
-        // This is not a unicast pipe with at least one local listener
-        // so we need to fingure out where the message should go.
-        // This may take a while and has to be done asynchronously...
-        // Carefull that the resolution can occur synchronously by this
-        // very thread, and java lock will not prevent re-entry.
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("output pipe creation begin");
-        }
-
-        // Look for the pipe in the resolved list. If not found
-        // look in the pending list or add it there.
-        OutputPipe out = (OutputPipe) resolvedPipes.get(pipeId);
-
-        if (out != null) {
-            sendToPipe(requestor, message, out);
-            return;
-        }
-        PendingPipe p = (PendingPipe) pendingPipes.get(pipeId);
-
-        if (p != null) {
-            p.enqueue(requestor, message);
-            return;
-        }
-
-        try {
-            p = new PendingPipe();
-            p.enqueue(requestor, message);
-            pendingPipes.put(pipeId, p);
-            pipe.createOutputPipe(pipeAdv, this);
-        } catch (IOException e) {
-            pendingPipes.remove(pipeId);
-            requestor.notifyError("could not create output pipe");
-        }
-    }
-
-    // TBD: DO WE NEED THIS FUNCTIONALITY FOR JXME?
-    private PeerAdvertisement createPeerAdvertisement(String name, String id) {
-        PeerAdvertisement adv = null;
-
-        PeerID pid = null;
-
-        if (id != null) {
-            try {
-                ID tempId = IDFactory.fromURI(new URI(id));
-
-                pid = (PeerID) tempId;
-            } catch (URISyntaxException e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Could not parse peerId from url", e);
-                }
-            } catch (ClassCastException e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "id was not a peerid", e);
-                }
-            }
-        }
-
-        if (pid == null) {
-            pid = IDFactory.newPeerID(group.getPeerGroupID());
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("newPeerAdvertisement name=" + name + " id=" + pid.toString());
-        }
-
-        try {
-            // Create a pipe advertisement for this pipe.
-            adv = (PeerAdvertisement) AdvertisementFactory.newAdvertisement(PeerAdvertisement.getAdvertisementType());
-
-            adv.setPeerID(pid);
-            adv.setPeerGroupID(group.getPeerGroupID());
-            adv.setName(name);
-            adv.setDescription("Peer Advertisement created for a jxme device");
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "newPeerAdvertisement Exception", e);
-            }
-        }
-
-        return adv;
-    }
-
-    private PeerGroupAdvertisement createGroupAdvertisement(String name, String id) {
-        PeerGroupAdvertisement adv;
-
-        PeerGroupID gid = null;
-
-        if (id != null) {
-            try {
-                ID tempId = IDFactory.fromURI(new URI(id));
-
-                gid = (PeerGroupID) tempId;
-            } catch (URISyntaxException e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Invalid peergroupId", e);
-                }
-            } catch (ClassCastException e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "id was not a peergroup id", e);
-                }
-            }
-        }
-
-        if (gid == null) {
-            gid = IDFactory.newPeerGroupID();
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("newPeerGroupAdvertisement name=" + name + " id=" + gid.toString());
-        }
-
-        adv = group.getPeerGroupAdvertisement().clone();
-
-        try {
-            // Create a PeerGroup Advertisement for this pipe.
-            adv = (PeerGroupAdvertisement) AdvertisementFactory.newAdvertisement(PeerGroupAdvertisement.getAdvertisementType());
-            adv.setName(name);
-            adv.setPeerGroupID(gid);
-            adv.setModuleSpecID(PeerGroup.allPurposePeerGroupSpecID);
-            adv.setDescription("PeerGroup Advertisement created for a jxme device");
-            ModuleImplAdvertisement groupImplAdv = group.getAllPurposePeerGroupImplAdvertisement();
-
-            discovery.publish(groupImplAdv);
-            discovery.publish(adv);
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "newPeerGroupAdvertisement Exception", e);
-            }
-        }
-
-        return adv;
-    }
-
-    private PipeAdvertisement createPipeAdvertisement(String pipeName, String pipeId, String pipeType) {
-        PipeAdvertisement adv = null;
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("newPipeAdvertisement name=" + pipeName + " pipeId=" + pipeId + " pipeType=" + pipeType);
-        }
-
-        if (pipeType == null || pipeType.length() == 0) {
-            pipeType = PipeService.UnicastType;
-        }
-
-        if (pipeId == null) {
-            pipeId = IDFactory.newPipeID(group.getPeerGroupID()).toString();
-        }
-
-        try {
-            // Create a pipe advertisement for this pipe.
-            adv = (PipeAdvertisement) AdvertisementFactory.newAdvertisement(PipeAdvertisement.getAdvertisementType());
-
-            adv.setName(pipeName);
-            adv.setPipeID(IDFactory.fromURI(new URI(pipeId)));
-            adv.setType(pipeType);
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "newPipeAdvertisement Exception", e);
-            }
-        }
-
-        return adv;
-    }
-
-    private PipeAdvertisement findPipeAdvertisement(String name, String id, String arg) {
-        String attribute, value;
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("findPipeAdvertisement name=" + name + " id=" + id + " arg=" + arg);
-        }
-
-        if (id != null) {
-            attribute = PipeAdvertisement.IdTag;
-            value = id;
-        } else if (name != null) {
-            attribute = PipeAdvertisement.NameTag;
-            value = name;
-        } else {
-            // the id or the name must be specified
-            return null;
-        }
-
-        Enumeration<Advertisement> each;
-
-        try {
-            each = discovery.getLocalAdvertisements(DiscoveryService.ADV, attribute, value);
-        } catch (IOException e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "IOException in getLocalAdvertisements()", e);
-            }
-            return null;
-        }
-
-        PipeAdvertisement pipeAdv = null;
-
-        while (each.hasMoreElements()) {
-            Advertisement adv = each.nextElement();
-
-            // take the first match
-            if (adv instanceof PipeAdvertisement) {
-                pipeAdv = (PipeAdvertisement) adv;
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("found PipeAdvertisement = " + pipeAdv);
-                }
-                break;
-            }
-        }
-
-        return pipeAdv;
-    }
-
-    public synchronized void discoveryEvent(DiscoveryEvent event) {
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("discoveryEvent " + event);
-        }
-
-        Requestor requestor = searchRequests.get(event.getQueryID());
-        if (requestor == null) {
-            return;
-        }
-
-        DiscoveryResponseMsg response = event.getResponse();
-        if (response == null) {
-            return;
-        }
-
-        Enumeration<Advertisement> each = response.getAdvertisements();
-        if (each == null || !each.hasMoreElements()) {
-            return;
-        }
-        // we have a response remove it from the LRUCache
-        searchRequests.remove(event.getQueryID());
-        int i = 0;
-
-        while (each.hasMoreElements() && i < requestor.getThreshold()) {
-            try {
-                requestor.send(each.nextElement(), RESPONSE_RESULT);
-            } catch (Exception e) {
-                // this should not happen unless a bad result is returned
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Bad result returned by DiscoveryService", e);
-                }
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized void pipeMsgEvent(PipeMsgEvent event) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("pipeMsgEvent " + event.getPipeID());
-        }
-
-        String id = event.getPipeID().toString();
-
-        PipeListenerList list = pipeListeners.get(id);
-
-        if (list != null) {
-            Message message = event.getMessage();
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("pipeMsgEvent: start sending to each requestor");
-            }
-            list.send(message.clone(), id);
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("pipeMsgEvent: end sending to each requestor");
-            }
-        } else {
-            // there are no listeners, close the input pipe
-            ((InputPipe) event.getSource()).close();
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("close pipe id=" + id);
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized void outputPipeEvent(OutputPipeEvent event) {
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("outputPipeEvent " + event);
-        }
-        PendingPipe p = (PendingPipe) pendingPipes.remove(event.getPipeID());
-
-        // No one cares (anylonger). TBD should it be removed then??
-        if (p == null) {
-            event.getOutputPipe().close();
-            return;
-        }
-
-        resolvedPipes.put(event.getPipeID(), event.getOutputPipe());
-        p.sendPending(event.getOutputPipe());
-    }
-
-    private static String popString(String name, Message message) {
-        MessageElement el = message.getMessageElement(PROXYNS, name);
-
-        if (el != null) {
-            message.removeMessageElement(el);
-            return el.toString();
-        }
-        return null;
-    }
-
-    static class PipeListenerList {
-        LinkedList<Requestor> list = new LinkedList<Requestor>();
-        InputPipe inputPipe = null;
-        Map<String, PipeListenerList> pipeListeners = null;
-        String id = null;
-
-        PipeListenerList(InputPipe inputPipe, Map<String, PipeListenerList> pipeListeners, String id) {
-            this.inputPipe = inputPipe;
-            this.pipeListeners = pipeListeners;
-            this.id = id;
-
-            if (pipeListeners != null) {
-                if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-                    LOG.config("number of pipeListeners = " + pipeListeners.size());
-                }
-            }
-        }
-
-        void add(Requestor requestor) {
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("add " + requestor + " from " + toString());
-            }
-
-            if (!list.contains(requestor)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("requestor add");
-                }
-                list.add(requestor);
-            } else {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("requestor exits already");
-                }
-            }
-        }
-
-        void remove(Requestor requestor) {
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("remove " + requestor + " from " + toString());
-            }
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("removed = " + list.remove(requestor));
-            }
-
-            if (list.size() == 0) {
-                // close the pipe and remove from the listenerList
-                if (inputPipe != null) {
-                    inputPipe.close();
-                }
-
-                if (id != null && pipeListeners != null) {
-                    pipeListeners.remove(id);
-                }
-            }
-        }
-
-        int size() {
-            int size = list.size();
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("size " + size);
-            }
-            return size;
-        }
-
-        private static StringMessageElement sme = new StringMessageElement(RESPONSE_TAG, RESPONSE_MESSAGE, null);
-
-        void send(Message message, String id) {
-            LOG.fine("send list.size = " + list.size());
-
-            message.addMessageElement(PROXYNS, sme);
-            message.addMessageElement(PROXYNS, new StringMessageElement(ID_TAG, id, null));
-
-            // removed all element that are known to be not needed
-            Iterator<MessageElement> elements = message.getMessageElements();
-
-            while (elements.hasNext()) {
-                MessageElement el = elements.next();
-                String name = el.getElementName();
-
-                if (name.startsWith("RendezVousPropagate")) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("removeMessageElement " + name);
-                    }
-                    elements.remove();
-                } else if (name.startsWith("JxtaWireHeader")) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("removeMessageElement " + name);
-                    }
-                    elements.remove();
-                } else if (name.startsWith("RdvIncarnjxta")) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("removeMessageElement " + name);
-                    }
-                    elements.remove();
-                } else if (name.startsWith("JxtaEndpointRouter")) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("removeMessageElement " + name);
-                    }
-                    elements.remove();
-                } else if (name.startsWith("EndpointRouterMsg")) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("removeMessageElement " + name);
-                    }
-                    elements.remove();
-                } else if (name.startsWith("EndpointHeaderSrcPeer")) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("removeMessageElement " + name);
-                    }
-                    elements.remove();
-                }
-            }
-
-            Iterator<Requestor> iterator = list.iterator();
-            try {
-                while (iterator.hasNext()) {
-                    Requestor requestor = iterator.next();
-
-                    if (!requestor.send(message.clone())) {
-                        // could not send to listener, remove them from the list
-                        remove(requestor);
-                    }
-                }
-            } catch (Exception ex) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Error sending" + ex);
-                }
-            }
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public String toString() {
-            return "PipeListenerList size=" + list.size();
-        }
-    }
-
-    protected static void logMessage(Message message, Logger log) {
-        if (!Logging.SHOW_FINER || !log.isLoggable(Level.FINER)) {
-            return;
-        }
-
-        StringBuilder out = new StringBuilder("\n**************** begin ****************\n");
-
-        Message.ElementIterator elements = message.getMessageElements();
-
-        while (elements.hasNext()) {
-            MessageElement element = elements.next();
-
-            out.append("[").append(elements.getNamespace()).append(",").append(element.getElementName()).append("]=").append(element.toString()).append(
-                    "\n");
-        }
-
-        out.append("****************  end  ****************\n");
-        log.finer(out.toString());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void purged(CacheEntry ce) {
-        // A resolved pipe was purged from the cache because we have to
-        // many pre-resolved pipes hanging around. Close it, because
-        // it may be holding critical resources that the GC will not be
-        // sensitive to.
-        ((OutputPipe) (ce.getValue())).close();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/proxy/Requestor.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/proxy/Requestor.java
deleted file mode 100644 (file)
index 7d651b8..0000000
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.proxy;
-
-
-import net.jxta.document.Advertisement;
-import net.jxta.endpoint.*;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.PeerGroupAdvertisement;
-import net.jxta.protocol.PipeAdvertisement;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import java.io.IOException;
-
-
-public class Requestor {
-    private final static Logger LOG = Logger.getLogger(Requestor.class.getName());
-
-    private PeerGroup group;
-    private EndpointAddress address;
-    private MessageElement requestId;
-    private Messenger messenger;
-    private int threshold = 1;
-
-    public boolean send(Message message) {
-        int count;
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("send to " + address.toString());
-        }
-
-        try {
-            synchronized (this) {
-                if ((null == messenger) || messenger.isClosed()) {
-                    messenger = null;
-                    count = 0;
-                    // Add a retry in case we did not obtain a new messenger.
-                    // Due to the heavy polling of the client, it seems that
-                    // we can run in a race condition where we don't get
-                    // a new messenger.
-                    while (count < 2 && messenger == null) {
-                        messenger = group.getEndpointService().getMessengerImmediate(address, null);
-                        if (messenger != null) {
-                            break;
-                        }
-                        try {
-                            Thread.sleep(500);
-                        } catch (InterruptedException e) {
-                            Thread.interrupted();
-                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                LOG.fine("Retry getting a messenger" + e);
-                            }
-                        }
-                        count++;
-                    }
-
-                    if (null == messenger) {
-                        LOG.warning("Could not get messenger for " + address);
-                        return false;
-                    }
-                }
-            }
-            messenger.sendMessage(message);
-        } catch (IOException e) {
-            LOG.log(Level.WARNING, "Could not send message to requestor for " + address, e);
-            return false;
-        }
-
-        ProxyService.logMessage(message, LOG);
-
-        return true;
-    }
-
-    public boolean send(Advertisement adv, String resultType) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("send " + adv);
-        }
-
-        Message message = new Message();
-
-        if (resultType == null) {
-            resultType = "";
-        }
-        setString(message, ProxyService.RESPONSE_TAG, resultType);
-
-        if (requestId != null) {
-            message.addMessageElement(ProxyService.PROXYNS, requestId);
-        }
-
-        if (adv instanceof PeerAdvertisement) {
-            PeerAdvertisement peerAdv = (PeerAdvertisement) adv;
-
-            message.addMessageElement(ProxyService.PROXYNS
-                    ,
-                    new StringMessageElement(ProxyService.TYPE_TAG, ProxyService.TYPE_PEER, null));
-
-            message.addMessageElement(ProxyService.PROXYNS
-                    ,
-                    new StringMessageElement(ProxyService.NAME_TAG, peerAdv.getName(), null));
-
-            message.addMessageElement(ProxyService.PROXYNS
-                    ,
-                    new StringMessageElement(ProxyService.ID_TAG, peerAdv.getPeerID().toString(), null));
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("send PeerAdvertisement name=" + peerAdv.getName() + " id=" + peerAdv.getPeerID().toString());
-            }
-
-        } else if (adv instanceof PeerGroupAdvertisement) {
-            PeerGroupAdvertisement groupAdv = (PeerGroupAdvertisement) adv;
-
-            message.addMessageElement(ProxyService.PROXYNS
-                    ,
-                    new StringMessageElement(ProxyService.TYPE_TAG, ProxyService.TYPE_GROUP, null));
-
-            message.addMessageElement(ProxyService.PROXYNS
-                    ,
-                    new StringMessageElement(ProxyService.NAME_TAG, groupAdv.getName(), null));
-
-            message.addMessageElement(ProxyService.PROXYNS
-                    ,
-                    new StringMessageElement(ProxyService.ID_TAG, groupAdv.getPeerGroupID().toString(), null));
-
-            LOG.fine("send GroupAdvertisement name=" + groupAdv.getName() + " id=" + groupAdv.getPeerGroupID().toString());
-
-        } else if (adv instanceof PipeAdvertisement) {
-            PipeAdvertisement pipeAdv = (PipeAdvertisement) adv;
-
-            message.addMessageElement(ProxyService.PROXYNS
-                    ,
-                    new StringMessageElement(ProxyService.TYPE_TAG, ProxyService.TYPE_PIPE, null));
-
-            message.addMessageElement(ProxyService.PROXYNS
-                    ,
-                    new StringMessageElement(ProxyService.NAME_TAG, pipeAdv.getName(), null));
-
-            message.addMessageElement(ProxyService.PROXYNS
-                    ,
-                    new StringMessageElement(ProxyService.ID_TAG, pipeAdv.getPipeID().toString(), null));
-
-            message.addMessageElement(ProxyService.PROXYNS
-                    ,
-                    new StringMessageElement(ProxyService.ARG_TAG, pipeAdv.getType(), null));
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(
-                        "send PipeAdvertisement name=" + pipeAdv.getName() + " id=" + pipeAdv.getPipeID().toString() + " arg="
-                        + pipeAdv.getType());
-            }
-
-        } else {
-            return false;
-        }
-
-        return send(message);
-    }
-
-    public boolean notifySuccess() {
-        LOG.fine("notifySuccess");
-
-        Message message = new Message();
-
-        message.addMessageElement(ProxyService.PROXYNS
-                ,
-                new StringMessageElement(ProxyService.RESPONSE_TAG, ProxyService.RESPONSE_SUCCESS, null));
-
-        if (requestId != null) {
-            message.addMessageElement(ProxyService.PROXYNS, requestId);
-        }
-
-        return send(message);
-    }
-
-    public boolean notifyError(String errorString) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("notifyError " + errorString);
-        }
-
-        Message message = new Message();
-
-        if (requestId != null) {
-            message.addMessageElement(ProxyService.PROXYNS, requestId);
-        }
-
-        if (errorString != null && errorString.length() > 0) {
-            message.addMessageElement(ProxyService.PROXYNS
-                    ,
-                    new StringMessageElement(ProxyService.ERROR_MESSAGE_TAG, errorString, null));
-        }
-
-        return send(message);
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object obj) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine(this + " equals " + obj);
-        }
-
-        if (obj instanceof Requestor) {
-            Requestor dest = (Requestor) obj;
-
-            if (address != null && dest.address != null) {
-                if (dest.address.toString().equals(address.toString())) {
-                    return true;
-                }
-            }
-        }
-
-        return false;
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        int result = 17;
-
-        return 37 * result + requestId.hashCode();
-    }
-
-    /**
-     *  {@inheritDoc}
-     */
-    @Override    
-    public String toString() {
-        return "Requestor " + address.toString();
-    }
-
-    private Requestor(PeerGroup group, EndpointAddress address, MessageElement requestId) throws IOException {
-        this.group = group;
-        this.address = address;
-        this.requestId = requestId;
-    }
-
-    public static Requestor createRequestor(PeerGroup group, Message message, EndpointAddress address, int threshold) throws IOException {
-        Requestor requestor;
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("create new Requestor - " + address.toString());
-        }
-
-        MessageElement elem = message.getMessageElement(ProxyService.REQUESTID_TAG);
-
-        requestor = new Requestor(group, address, elem);
-        requestor.setThreshold(threshold);
-        message.removeMessageElement(elem);
-        return requestor;
-    }
-
-    void setThreshold(int threshold) {
-        this.threshold = threshold;
-    }
-
-    int getThreshold() {
-        return threshold;
-    }
-
-    private void setString(Message message, String tag, String value) {
-        StringMessageElement sme = new StringMessageElement(tag, value, null);
-
-        message.addMessageElement(ProxyService.PROXYNS, sme);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/PeerConnection.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/PeerConnection.java
deleted file mode 100644 (file)
index 9d3ff39..0000000
+++ /dev/null
@@ -1,370 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous;
-
-import java.util.Enumeration;
-
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.Messenger;
-import net.jxta.endpoint.OutgoingMessageEvent;
-import net.jxta.endpoint.OutgoingMessageEventListener;
-import net.jxta.id.ID;
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.RouteAdvertisement;
-
-import java.util.logging.Level;
-
-import net.jxta.logging.Logging;
-
-import java.util.logging.Logger;
-
-import net.jxta.impl.endpoint.EndpointUtils;
-
-/**
- * Manages a connection with a remote client or a rendezvous peer.
- */
-public abstract class PeerConnection implements OutgoingMessageEventListener {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(PeerConnection.class.getName());
-
-    protected final PeerGroup group;
-    protected final EndpointService endpoint;
-
-    /**
-     * ID of the remote peer.
-     */
-    protected final ID peerid;
-
-    /**
-     * Cached name of the peer for display purposes.
-     */
-    protected String peerName = null;
-
-    /**
-     * If true then we believe we are still connected to the remote peer.
-     */
-    protected volatile boolean connected = true;
-
-    /**
-     * The absolute time in milliseconds at which we expect this connection to
-     * expire unless renewed.
-     */
-    protected long leasedTil = -1;
-
-    /**
-     * A cached messenger to be used for sending messages to the remote peer.
-     */
-    protected Messenger cachedMessenger = null;
-
-    /**
-     * Constructor for the PeerConnection object
-     *
-     * @param group    group context
-     * @param endpoint the endpoint service to use for sending messages.
-     * @param peerid   destination peerid
-     */
-    public PeerConnection(PeerGroup group, EndpointService endpoint, ID peerid) {
-        this.group = group;
-        this.endpoint = endpoint;
-        this.peerid = peerid;
-
-        this.peerName = peerid.toString();
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * <p/>performs PeerID comparison
-     */
-    @Override
-    public boolean equals(Object obj) {
-        return obj instanceof PeerConnection && peerid.equals(((PeerConnection) obj).peerid);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        return peerid.hashCode();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String toString() {
-        return getPeerName() + (connected ? " C" : " c") + " : " + Long.toString(TimeUtils.toRelativeTimeMillis(leasedTil));
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void messageSendFailed(OutgoingMessageEvent event) {
-        // If it's just a case of queue overflow, ignore it.
-        if (event.getFailure() == null) {
-            return;
-        }
-        setConnected(false);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void messageSendSucceeded(OutgoingMessageEvent event) {// hurray!
-    }
-
-    /**
-     * Get the peer id of the peer associated with this connection.
-     *
-     * @return The peer id of the connected peer.
-     */
-    public ID getPeerID() {
-        return peerid;
-    }
-
-    /**
-     * Get the peer name. If the symbolic name is available, use it,
-     * otherwise returns the peer id.
-     *
-     * @return The name of the connected peer.
-     */
-    public String getPeerName() {
-        return peerName;
-    }
-
-    /**
-     * set the peer name.
-     *
-     * @param name the peer name
-     */
-    protected void setPeerName(String name) {
-        peerName = name;
-    }
-
-    /**
-     * Set the lease duration in relative milliseconds.
-     *
-     * @param leaseDuration the lease duration in relative milliseconds.
-     */
-    protected void setLease(long leaseDuration) {
-        leasedTil = TimeUtils.toAbsoluteTimeMillis(leaseDuration);
-    }
-
-    /**
-     * Time at which the lease will expire in absolute milliseconds.
-     *
-     * @return The lease value
-     */
-    public long getLeaseEnd() {
-        return leasedTil;
-    }
-
-    /**
-     * Declare that we are connected for the specified amount of time.
-     *
-     * @param leaseDuration The duration of the lease in relative milliseconds.
-     */
-    protected void connect(long leaseDuration) {
-        setLease(leaseDuration);
-        setConnected(true);
-    }
-
-    /**
-     * Test if the connection is still active.
-     *
-     * @return The connected value
-     */
-    public boolean isConnected() {
-        connected &= (TimeUtils.toRelativeTimeMillis(leasedTil) >= 0);
-
-        return connected;
-    }
-
-    /**
-     * Set the connection state. This operation must be idempotent.
-     *
-     * @param isConnected The new connected state. Be very careful when
-     *                    setting <code>true</code> state without setting a new lease.
-     */
-    public void setConnected(boolean isConnected) {
-        connected = isConnected;
-    }
-
-    /**
-     * Return a messenger suitable for communicating to this peer.
-     *
-     * @return a messenger for sending to this peer or <code>null</code> if
-     *         none is available.
-     * @deprecated Preferred style is to pass the connection object around and
-     *             use the sendMessage method rather than getting the messenger.
-     */
-    @Deprecated
-    protected Messenger getCachedMessenger() {
-
-        // We don't do the check on existing messenger under synchronization
-        // hence the temporary variable.
-        Messenger result = cachedMessenger;
-
-        if ((null == result) || result.isClosed()) {
-            // We need a new messenger.
-            PeerAdvertisement padv = null;
-
-            DiscoveryService discovery = group.getDiscoveryService();
-
-            // Try to see if we have a peer advertisement for this peer.
-            // This is very likely.
-            if (null != discovery) {
-                try {
-                    Enumeration each = discovery.getLocalAdvertisements(DiscoveryService.PEER, "PID", peerid.toString());
-
-                    if (each.hasMoreElements()) {
-                        padv = (PeerAdvertisement) each.nextElement();
-                    }
-                } catch (Exception ignored) {
-                    //ignored
-                }
-            }
-            result = getCachedMessenger(padv);
-        }
-
-        return result;
-    }
-
-    /**
-     * Return a messenger suitable for communicating to this peer.
-     *
-     * @param padv A peer advertisement which will be used for route hints if
-     *             a new messenger is needed.
-     * @return a messenger for sending to this peer or <code>null</code> if
-     *         none is available.
-     */
-    protected synchronized Messenger getCachedMessenger(PeerAdvertisement padv) {
-        if ((null != padv) && !peerid.equals(padv.getPeerID())) {
-            throw new IllegalArgumentException("Peer Advertisement does not match connection");
-        }
-
-        if ((null != padv) && (null != padv.getName())) {
-            setPeerName(padv.getName());
-        }
-
-        // if we have a good messenger then re-use it.
-        if ((null != cachedMessenger) && !cachedMessenger.isClosed()) {
-            return cachedMessenger;
-        }
-
-        cachedMessenger = null;
-
-        if (isConnected()) {
-            // we only get new messengers while we are connected. It is not
-            // worth the effort for a disconnected peer. We WILL use an existing
-            // open messenger if we have one though.
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Getting new cached Messenger for " + peerName);
-            }
-
-            RouteAdvertisement hint = null;
-
-            if (null != padv) {
-                hint = EndpointUtils.extractRouteAdv(padv);
-            }
-
-            EndpointAddress destAddress = new EndpointAddress(peerid, null, null);
-
-            cachedMessenger = endpoint.getMessenger(destAddress, hint);
-
-            if (null == cachedMessenger) {
-                // no messenger? avoid doing more work.
-                setConnected(false);
-            }
-        } else {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("connection closed : NOT getting new cached Messenger for " + peerName);
-            }
-        }
-
-        return cachedMessenger;
-    }
-
-    /**
-     * Send a message to the remote peer.
-     *
-     * @param msg     the message to send.
-     * @param service The destination service.
-     * @param param   Parameters for the destination service.
-     * @return <true>true</true> if the message was queued to be sent,
-     *         otherwise <code>false</code>. A <code>true</code> result does not mean
-     *         that the destination peer will receive the message.
-     */
-    public boolean sendMessage(Message msg, String service, String param) {
-        Messenger messenger = getCachedMessenger();
-
-        if (null != messenger) {
-            messenger.sendMessage(msg, service, param, this);
-            return true;
-        } else {
-            return false;
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/RdvGreeter.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/RdvGreeter.java
deleted file mode 100644 (file)
index dab9789..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous;
-
-import java.io.IOException;
-
-import net.jxta.endpoint.Message;
-
-/**
- * A Greeter is reponsible for receiving messages from walkers, and push them to
- * the service that is listening to them.
- *
- * @see net.jxta.impl.rendezvous.RdvWalk
- * @see net.jxta.impl.rendezvous.RdvWalker
- */
-public interface RdvGreeter {
-
-    /**
-     * Reply to a message received by the Greeter.
-     *
-     * @param msg   The source message received previously by the Greeter
-     * @param reply The reply message to be sent to the source of the message.
-     * @throws IOException when the reply cannot be sent.
-     */
-    public void replyMessage(Message msg, Message reply) throws IOException;
-
-    /**
-     * Stop the greeter
-     */
-    public void stop();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/RdvWalk.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/RdvWalk.java
deleted file mode 100644 (file)
index 8650857..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous;
-
-import net.jxta.endpoint.EndpointListener;
-import net.jxta.peergroup.PeerGroup;
-
-/**
- * A Walk implements a particular protocol/behavior policy for sending messages
- * through the Rendezvous Peers. A walk strategy is composed of a Walker and a
- * Greeter. The Walker is used for sending messages according to the strategy.
- * The Greeter receives messages and forwards them to a local listener and may
- * provide the ability to continue a walk.
- * <p/>
- * <p/>Each walk is associated with a source service name and service param.
- * These are the name and optional parameter of the service that uses the
- * RdvWalk.
- *
- * @see net.jxta.impl.rendezvous.RdvWalker
- * @see net.jxta.impl.rendezvous.RdvGreeter
- */
-public abstract class RdvWalk {
-
-    /**
-     * Peergroup in which this walk is running.
-     */
-    protected final PeerGroup group;
-
-    /**
-     * Intended recipient of messages received as part of this walk.
-     */
-    protected final EndpointListener listener;
-
-    /**
-     * Service name used by the (client) of this walk.
-     */
-    protected final String srcServiceName;
-
-    /**
-     * Optional service parameter used by the client of this walk.
-     */
-    protected final String srcServiceParam;
-
-    /**
-     * Standard constructor
-     *
-     * @param group           Peergroup in which this walk is running.
-     * @param listener        Intended recipient of messages received as part of this walk.
-     * @param srcServiceName  Service name used by the client of this walk.
-     * @param srcServiceParam Optional service parameter used by the client of this walk.
-     */
-    public RdvWalk(PeerGroup group, EndpointListener listener, String srcServiceName, String srcServiceParam) {
-        this.group = group;
-        this.listener = listener;
-        this.srcServiceName = srcServiceName;
-        this.srcServiceParam = srcServiceParam;
-    }
-
-    /**
-     * Stop the walk.
-     */
-    public abstract void stop();
-
-    /**
-     * Get/Create a walker to be used with this walk.
-     *
-     * @return A walker to be used with this walk. {@code null} is returned if
-     *         no greeter is available or the walk has been stopped.
-     */
-    public abstract RdvWalker getWalker();
-
-    /**
-     * Get/Create a greeter to be used with this walk.
-     *
-     * @return A greeter to be used with this walk. {@code null} is returned if
-     *         no greeter is available or the walk has been stopped.
-     */
-    public abstract RdvGreeter getGreeter();
-
-    /**
-     * Return the Peer Group in which this walk occurs.
-     *
-     * @return the Peer Group in which this walk occurs.
-     */
-    public PeerGroup getPeerGroup() {
-        return group;
-    }
-
-    /**
-     * Return the listener associated with this walk
-     *
-     * @return The listener associated with this walk.
-     */
-    public EndpointListener getListener() {
-        return listener;
-    }
-
-    /**
-     * Return the source Service Name for this walk.
-     *
-     * @return The source Service Name for this walk.
-     */
-    public String getServiceName() {
-        return srcServiceName;
-    }
-
-    /**
-     * Return the source Service Param for this walk.
-     *
-     * @return The source Service Param for this walk.
-     */
-    public String getServiceParam() {
-        return srcServiceParam;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/RdvWalker.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/RdvWalker.java
deleted file mode 100644 (file)
index 369cd96..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous;
-
-import java.io.IOException;
-
-import net.jxta.endpoint.Message;
-import net.jxta.peer.PeerID;
-
-/**
- * A walker is responsible for implementing the strategy of sending messages for
- * a walk.
- *
- * @see net.jxta.impl.rendezvous.RdvWalk
- * @see net.jxta.impl.rendezvous.RdvGreeter
- */
-public interface RdvWalker {
-
-    /**
-     * Walk a message to other Rendezvous peers participating into the walk. An
-     * initial rendezvous peer can be optionally provided as a hint.
-     *
-     * @param destPeer     An optional PeerID of the peer which will be the initial
-     *                     recipient of the walked message.
-     * @param msg          The message to walk. The message will be modified.
-     * @param serviceName  The name of the service.
-     * @param serviceParam The parameter of the service.
-     * @param ttl          The maximum TTL of the message. This value may be decreased by
-     *                     the Walker implementation, but will never be increased.
-     * @throws IOException If the message was not sent to any other rendezvous
-     *                     peers.
-     */
-    public void walkMessage(PeerID destPeer, Message msg, String serviceName, String serviceParam, int ttl) throws IOException;
-
-    /**
-     * Stop the walker. Some walkers may implement a strategy that has state and
-     * this method will stop any internal processing.
-     */
-    public void stop();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/RendezVousPropagateMessage.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/RendezVousPropagateMessage.java
deleted file mode 100644 (file)
index ace7add..0000000
+++ /dev/null
@@ -1,332 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous;
-
-import net.jxta.document.Attributable;
-import net.jxta.document.Attribute;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.impl.id.UUID.UUID;
-import net.jxta.impl.id.UUID.UUIDFactory;
-import net.jxta.logging.Logging;
-
-import java.net.URI;
-import java.util.Enumeration;
-import java.util.LinkedHashSet;
-import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * This class defines the wire format of the Propagation header for messages.
- */
-public class RendezVousPropagateMessage {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(RendezVousPropagateMessage.class.getName());
-
-    public final static String MSG_NAME = "jxta:RendezVousPropagateMessage";
-    public static final String MsgIdTag = "MessageId";
-    public final static String DestSNameTag = "DestSName";
-    public final static String DestSParamTag = "DestSParam";
-    public final static String TTLTag = "TTL";
-    public final static String PathTag = "Path";
-
-    /**
-     * Description of the Field
-     */
-    public final static String Name = "RendezVousPropagate";
-
-    private UUID msgId = null;
-    private String destSName = null;
-    private String destSParam = null;
-    private int TTL = Integer.MIN_VALUE;
-    private final Set<URI> visited = new LinkedHashSet<URI>();
-
-    /**
-     * Constructor for the RendezVousPropagateMessage object
-     */
-    public RendezVousPropagateMessage() {}
-
-    /**
-     * Constructor for the RendezVousPropagateMessage object
-     *
-     * @param root The root element of the message.
-     */
-    public RendezVousPropagateMessage(Element root) {
-        this();
-
-        if (!XMLElement.class.isInstance(root)) {
-            throw new IllegalArgumentException(getClass().getName() + " only supports XLMElement");
-        }
-
-        XMLElement doc = (XMLElement) root;
-
-        String doctype = doc.getName();
-
-        String typedoctype = "";
-        Attribute itsType = doc.getAttribute("type");
-
-        if (null != itsType) {
-            typedoctype = itsType.getValue();
-        }
-
-        if (!doctype.equals(MSG_NAME) && !MSG_NAME.equals(typedoctype)) {
-            throw new IllegalArgumentException(
-                    "Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-        }
-
-        Enumeration elements = doc.getChildren();
-
-        while (elements.hasMoreElements()) {
-            XMLElement elem = (XMLElement) elements.nextElement();
-
-            if (!handleElement(elem)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Unhandled Element: " + elem.toString());
-                }
-            }
-        }
-
-        // Sanity Check!!!
-
-        if (Integer.MIN_VALUE == getTTL()) {
-            throw new IllegalArgumentException("TTL value not specified");
-        }
-
-        if (null == destSName) {
-            throw new IllegalArgumentException("Destination service name uninitialized");
-        }
-
-        if (null == msgId) {
-            throw new IllegalArgumentException("Message id uninitialized");
-        }
-    }
-
-    /**
-     * Process the document
-     *
-     * @param raw the document
-     * @return true if successful
-     */
-    protected boolean handleElement(Element raw) {
-
-        XMLElement elem = (XMLElement) raw;
-
-        if (elem.getName().equals(MsgIdTag)) {
-            try {
-                msgId = new UUID(elem.getTextValue().trim());
-            } catch (IllegalArgumentException iae) {
-                // old message id format
-                try {
-                    msgId = UUIDFactory.newHashUUID(Long.parseLong(elem.getTextValue().trim()), 0);
-                } catch (NumberFormatException notanumber) {
-                    msgId = UUIDFactory.newHashUUID(elem.getTextValue().trim().hashCode(), 0);
-                }
-            }
-            return true;
-        }
-
-        if (elem.getName().equals(DestSNameTag)) {
-            destSName = elem.getTextValue().trim();
-            return true;
-        }
-
-        if (elem.getName().equals(DestSParamTag)) {
-            destSParam = elem.getTextValue().trim();
-            return true;
-        }
-
-        if (elem.getName().equals(TTLTag)) {
-            TTL = Integer.parseInt(elem.getTextValue().trim());
-            return true;
-        }
-
-        if (elem.getName().equals(PathTag)) {
-            addVisited(URI.create(elem.getTextValue().trim()));
-            return true;
-        }
-
-        return false;
-    }
-
-    public UUID getMsgId() {
-        return msgId;
-    }
-
-    public void setMsgId(UUID id) {
-        msgId = id;
-    }
-
-    public String getDestSName() {
-        return destSName;
-    }
-
-    public void setDestSName(String sName) {
-        this.destSName = sName;
-    }
-
-    public String getDestSParam() {
-        return destSParam;
-    }
-
-    public void setDestSParam(String sParam) {
-        this.destSParam = sParam;
-    }
-
-    /**
-     * Gets the TTL attribute of the RendezVousPropagateMessage object
-     *
-     * @return The TTL value
-     */
-    public int getTTL() {
-        return TTL;
-    }
-
-    /**
-     * Sets the TTL attribute of the RendezVousPropagateMessage object
-     *
-     * @param ttl The new TTL value
-     */
-    public void setTTL(int ttl) {
-        TTL = ttl;
-    }
-
-    /**
-     * Adds a location to the Visited Set
-     *
-     * @param location which was visited.
-     */
-    public void addVisited(URI location) {
-        visited.add(location);
-    }
-
-    /**
-     * Returns true if the specified location is in the visited Set.
-     *
-     * @param location The location to check
-     * @return true if specified location has been visited.
-     */
-    public boolean isVisited(URI location) {
-        return visited.contains(location);
-    }
-
-    /**
-     * Returns the path which this message has travelled.
-     *
-     * @return the path this message travelled.
-     */
-    public URI[] getPath() {
-        return visited.toArray(new URI[visited.size()]);
-    }
-
-    public Document getDocument(MimeMediaType encodeAs) {
-
-        // Sanity Check!!!
-
-        if (getTTL() <= 0) {
-            throw new IllegalStateException("TTL value < 1");
-        }
-
-        if (null == destSName) {
-            throw new IllegalStateException("Destination service name uninitialized");
-        }
-
-        if (null == msgId) {
-            throw new IllegalStateException("Message id uninitialized");
-        }
-
-        if (visited.isEmpty()) {
-            throw new IllegalStateException("Message has not visited local peer.");
-        }
-
-        StructuredDocument doc = StructuredDocumentFactory.newStructuredDocument(encodeAs, MSG_NAME);
-
-        if (doc instanceof XMLDocument) {
-            ((Attributable) doc).addAttribute("xmlns:jxta", "http://jxta.org");
-            ((Attributable) doc).addAttribute("xml:space", "preserve");
-        }
-
-        Element e = null;
-
-        e = doc.createElement(MsgIdTag, msgId.toString());
-        doc.appendChild(e);
-
-        e = doc.createElement(DestSNameTag, destSName);
-        doc.appendChild(e);
-
-        if (null != destSParam) {
-            e = doc.createElement(DestSParamTag, destSParam);
-            doc.appendChild(e);
-        }
-
-        e = doc.createElement(TTLTag, Integer.toString(TTL));
-        doc.appendChild(e);
-
-        for (Object aVisited : visited) {
-            e = doc.createElement(PathTag, aVisited.toString());
-            doc.appendChild(e);
-        }
-        return doc;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/RendezVousServiceImpl.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/RendezVousServiceImpl.java
deleted file mode 100644 (file)
index a1c2103..0000000
+++ /dev/null
@@ -1,945 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Random;
-import java.util.Set;
-import java.util.Timer;
-import java.util.TimerTask;
-import java.util.Vector;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.List;
-import java.util.NoSuchElementException;
-
-import java.util.logging.Level;
-
-import net.jxta.logging.Logging;
-
-import java.util.logging.Logger;
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.XMLDocument;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointListener;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.Message;
-import net.jxta.id.ID;
-import net.jxta.impl.endpoint.EndpointUtils;
-import net.jxta.meter.MonitorResources;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.platform.Module;
-import net.jxta.protocol.ConfigParams;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.RdvAdvertisement;
-import net.jxta.protocol.RouteAdvertisement;
-import net.jxta.rendezvous.RendezVousService;
-import net.jxta.rendezvous.RendezvousEvent;
-import net.jxta.rendezvous.RendezVousStatus;
-import net.jxta.rendezvous.RendezvousListener;
-import net.jxta.service.Service;
-
-import net.jxta.impl.id.UUID.UUID;
-import net.jxta.impl.id.UUID.UUIDFactory;
-import net.jxta.impl.meter.MonitorManager;
-import net.jxta.impl.protocol.RdvConfigAdv;
-import net.jxta.impl.rendezvous.adhoc.AdhocPeerRdvService;
-import net.jxta.impl.rendezvous.edge.EdgePeerRdvService;
-import net.jxta.impl.rendezvous.rdv.RdvPeerRdvService;
-import net.jxta.impl.rendezvous.rendezvousMeter.RendezvousMeterBuildSettings;
-import net.jxta.impl.rendezvous.rendezvousMeter.RendezvousServiceMonitor;
-import net.jxta.impl.rendezvous.rpv.PeerView;
-import net.jxta.impl.rendezvous.rpv.PeerViewElement;
-import net.jxta.impl.util.TimeUtils;
-
-/**
- * A JXTA {@link net.jxta.rendezvous.RendezVousService} implementation which
- * implements the standard JXTA Rendezvous Protocol (RVP).
- *
- * @see net.jxta.rendezvous.RendezVousService
- * @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-rvp" target="_blank">JXTA Protocols Specification : Rendezvous Protocol</a>
- */
-public final class RendezVousServiceImpl implements RendezVousService {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(RendezVousServiceImpl.class.getName());
-
-    private final static long rdv_watchdog_interval_default = 5 * TimeUtils.AMINUTE; // 5 Minutes
-
-    private static final double DEMOTION_FACTOR = 0.05;
-    private static final long DEMOTION_MIN_PEERVIEW_COUNT = 5;
-    private static final long DEMOTION_MIN_CLIENT_COUNT = 3;
-    protected static final int MAX_MSGIDS = 1000;
-
-    private final static Random random = new Random();
-
-    private PeerGroup group = null;
-    private ID assignedID = null;
-    private ModuleImplAdvertisement implAdvertisement = null;
-
-    public EndpointService endpoint = null;
-
-    private RendezvousServiceMonitor rendezvousServiceMonitor;
-
-    private Timer timer;
-    private RdvWatchdogTask autoRdvTask = null;
-
-    private long rdv_watchdog_interval = 5 * TimeUtils.AMINUTE; // 5 Minutes
-
-    private final Set<RendezvousListener> eventListeners = Collections.synchronizedSet(new HashSet<RendezvousListener>());
-
-    /**
-     * The message IDs we have seen. Used for duplicate removal.
-     */
-    private final List<UUID> msgIds = new ArrayList<UUID>(MAX_MSGIDS);
-
-    /**
-     * Total number of messages which have been received.
-     */
-    private int messagesReceived;
-
-    private RdvConfigAdv.RendezVousConfiguration config = RdvConfigAdv.RendezVousConfiguration.EDGE;
-    private boolean autoRendezvous = false;
-
-    private String[] savedArgs = null;
-
-    /**
-     * If {@code true} then a rdv provider change is in progress.
-     */
-    private AtomicBoolean rdvProviderSwitchStatus = new AtomicBoolean(false);
-
-    /**
-     * The current provider
-     */
-    private RendezVousServiceProvider provider = null;
-
-    /**
-     * Our interface object. We currently always return the same object.
-     */
-    private final RendezVousServiceInterface rendezvousInterface = new RendezVousServiceInterface(this);
-
-    /**
-     * Constructor for the RendezVousServiceImpl object
-     */
-    public RendezVousServiceImpl() {
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public RendezVousService getInterface() {
-        return rendezvousInterface;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ModuleImplAdvertisement getImplAdvertisement() {
-        return implAdvertisement;
-    }
-
-    /**
-     * Return the assigned ID for this service.
-     *
-     * @return The assigned ID for this service.
-     */
-    public ID getAssignedID() {
-        return assignedID;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * <p/><b>Note</b>: it is permissible to pass null as the impl parameter
-     * when this instance is not being loaded via the module framework.
-     */
-    public synchronized void init(PeerGroup g, ID assignedID, Advertisement impl) {
-        this.group = g;
-        this.assignedID = assignedID;
-        this.implAdvertisement = (ModuleImplAdvertisement) impl;
-
-        RdvConfigAdv rdvConfigAdv = null;
-        ConfigParams confAdv = group.getConfigAdvertisement();
-
-        // Get the config. If we do not have a config, we're done; we just keep
-        // the defaults (edge peer/no auto-rdv)
-        if (confAdv != null) {
-            Advertisement adv = null;
-
-            try {
-                XMLDocument configDoc = (XMLDocument) confAdv.getServiceParam(getAssignedID());
-
-                if (null != configDoc) {
-                    adv = AdvertisementFactory.newAdvertisement(configDoc);
-                }
-            } catch (NoSuchElementException failed) {
-                //ignored
-            }
-
-            if (adv instanceof RdvConfigAdv) {
-                rdvConfigAdv = (RdvConfigAdv) adv;
-            }
-        }
-
-        if (null == rdvConfigAdv) {
-            // Make a new advertisement for defaults.
-            rdvConfigAdv = (RdvConfigAdv) AdvertisementFactory.newAdvertisement(RdvConfigAdv.getAdvertisementType());
-        }
-
-        config = rdvConfigAdv.getConfiguration();
-
-        autoRendezvous = rdvConfigAdv.getAutoRendezvousCheckInterval() > 0;
-
-        rdv_watchdog_interval = rdvConfigAdv.getAutoRendezvousCheckInterval();
-
-        // force AD-HOC config for World Peer Group.
-        if (PeerGroupID.worldPeerGroupID.equals(group.getPeerGroupID())) {
-            config = RdvConfigAdv.RendezVousConfiguration.AD_HOC;
-        }
-
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring RendezVous Service : " + assignedID);
-
-            if (implAdvertisement != null) {
-                configInfo.append("\n\tImplementation :");
-                configInfo.append("\n\t\tModule Spec ID: ").append(implAdvertisement.getModuleSpecID());
-                configInfo.append("\n\t\tImpl Description : ").append(implAdvertisement.getDescription());
-                configInfo.append("\n\t\tImpl URI : ").append(implAdvertisement.getUri());
-                configInfo.append("\n\t\tImpl Code : ").append(implAdvertisement.getCode());
-            }
-
-            configInfo.append("\n\tGroup Params :");
-            configInfo.append("\n\t\tGroup : ").append(group);
-            configInfo.append("\n\t\tPeer ID : ").append(group.getPeerID());
-
-            configInfo.append("\n\tConfiguration :");
-            configInfo.append("\n\t\tRendezVous : ").append(config);
-            configInfo.append("\n\t\tAuto RendezVous : ").append(autoRendezvous);
-            configInfo.append("\n\t\tAuto-RendezVous Reconfig Interval : ").append(rdv_watchdog_interval);
-
-            LOG.config(configInfo.toString());
-        }
-
-        // "start" a rendezvous provider switch. We will finish in startApp()
-        rdvProviderSwitchStatus.set(true);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public int startApp(String[] arg) {
-        endpoint = group.getEndpointService();
-
-        if (null == endpoint) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is an endpoint service");
-            }
-
-            return START_AGAIN_STALLED;
-        }
-
-        Service needed = group.getMembershipService();
-
-        if (null == needed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is a membership service");
-            }
-
-            return START_AGAIN_STALLED;
-        }
-
-        // if( !PeerGroupID.worldPeerGroupID.equals(group.getPeerGroupID())) {
-        // MessageTransport router = endpoint.getMessageTransport( "jxta" );
-        //
-        // if( null == router ) {
-        // if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-        // LOG.warning("Stalled until there is a router ");
-        // }
-        //
-        // return START_AGAIN_STALLED;
-        // }
-        // }
-        //
-
-        timer = new Timer("RendezVousServiceImpl Timer for " + group.getPeerGroupID(), true);
-
-        if (!rdvProviderSwitchStatus.compareAndSet(true, true)) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("Unable to start rendezvous provider.");
-            }
-
-            return -1;
-        }
-
-        if (RdvConfigAdv.RendezVousConfiguration.AD_HOC == config) {
-            provider = new AdhocPeerRdvService(group, this);
-        } else if (RdvConfigAdv.RendezVousConfiguration.EDGE == config) {
-            provider = new EdgePeerRdvService(group, this);
-        } else if (RdvConfigAdv.RendezVousConfiguration.RENDEZVOUS == config) {
-            provider = new RdvPeerRdvService(group, this);
-        } else {
-            throw new IllegalStateException("Unrecognized rendezvous configuration");
-        }
-
-        if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING) {
-            rendezvousServiceMonitor = (RendezvousServiceMonitor) MonitorManager.getServiceMonitor(group
-                    ,
-                    MonitorResources.rendezvousServiceMonitorClassID);
-            provider.setRendezvousServiceMonitor(rendezvousServiceMonitor);
-        }
-
-        provider.startApp(null);
-
-        rdvProviderSwitchStatus.set(false);
-
-        if (autoRendezvous && !PeerGroupID.worldPeerGroupID.equals(group.getPeerGroupID())) {
-            startWatchDogTimer();
-        }
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Rendezvous Serivce started");
-        }
-
-        return Module.START_OK;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized void stopApp() {
-
-        // We won't ever release this lock. We are shutting down. There is
-        // no reason to switch after stopping is begun.
-        rdvProviderSwitchStatus.set(true);
-
-        if (provider != null) {
-            provider.stopApp();
-            provider = null;
-        }
-
-        timer.cancel();
-        timer = null;
-
-        msgIds.clear();
-        eventListeners.clear();
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Rendezvous Serivce stopped");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isRendezVous() {
-        RendezVousStatus currentStatus = getRendezVousStatus();
-
-        return (RendezVousStatus.AUTO_RENDEZVOUS == currentStatus) || (RendezVousStatus.RENDEZVOUS == currentStatus);
-    }
-
-    /**
-     * @inheritDoc
-     */
-    public RendezVousStatus getRendezVousStatus() {
-        RendezVousServiceProvider currentProvider = provider;
-
-        if (null == currentProvider) {
-            return RendezVousStatus.NONE;
-        } else if (currentProvider instanceof AdhocPeerRdvService) {
-            return RendezVousStatus.ADHOC;
-        } else if (currentProvider instanceof EdgePeerRdvService) {
-            return autoRendezvous ? RendezVousStatus.AUTO_EDGE : RendezVousStatus.EDGE;
-        } else if (currentProvider instanceof RdvPeerRdvService) {
-            return autoRendezvous ? RendezVousStatus.AUTO_RENDEZVOUS : RendezVousStatus.RENDEZVOUS;
-        } else {
-            return RendezVousStatus.UNKNOWN;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean setAutoStart(boolean auto) {
-        return setAutoStart(auto, rdv_watchdog_interval_default);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized boolean setAutoStart(boolean auto, long period) {
-        rdv_watchdog_interval = period;
-        boolean old = autoRendezvous;
-
-        autoRendezvous = auto;
-
-        if (auto && !old) {
-            startWatchDogTimer();
-        } else if (old && !auto) {
-            stopWatchDogTimer();
-        }
-        return old;
-    }
-
-    /**
-     * Attempt to connect to the specified rendezvous peer.
-     *
-     * @param addr The endpoint address of the rendezvous peer.
-     * @param hint An optional hint which may be {@code null}.
-     * @throws IOException If no connection could be made to the specified
-     *                     peer.
-     */
-    private void connectToRendezVous(EndpointAddress addr, RouteAdvertisement hint) throws IOException {
-        RendezVousServiceProvider currentProvider = provider;
-
-        if (currentProvider != null) {
-            currentProvider.connectToRendezVous(addr, hint);
-        } else {
-            throw new IOException("Currently switching rendezvous roles.");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void connectToRendezVous(PeerAdvertisement adv) throws IOException {
-        EndpointAddress addr = new EndpointAddress("jxta", adv.getPeerID().getUniqueValue().toString(), null, null);
-        connectToRendezVous(addr, EndpointUtils.extractRouteAdv(adv));
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void connectToRendezVous(EndpointAddress addr) throws IOException {
-        connectToRendezVous(addr, null);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void challengeRendezVous(ID peer, long delay) {
-        RendezVousServiceProvider currentProvider = provider;
-
-        if (currentProvider != null) {
-            currentProvider.challengeRendezVous(peer, delay);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void disconnectFromRendezVous(ID peerId) {
-
-        RendezVousServiceProvider currentProvider = provider;
-
-        if (currentProvider != null) {
-            currentProvider.disconnectFromRendezVous(peerId);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Enumeration<ID> getConnectedRendezVous() {
-        throw new UnsupportedOperationException("Deprecated opertaion. Use interface if you want to use this operation.");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Enumeration<ID> getDisconnectedRendezVous() {
-        throw new UnsupportedOperationException("Deprecated opertaion. Use interface if you want to use this operation.");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Enumeration<ID> getConnectedPeers() {
-        throw new UnsupportedOperationException("Deprecated opertaion. Use interface if you want to use this operation.");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Vector<ID> getConnectedPeerIDs() {
-        RendezVousServiceProvider currentProvider = provider;
-
-        if (currentProvider != null) {
-            return currentProvider.getConnectedPeerIDs();
-        }
-        return new Vector<ID>();
-    }
-
-    /**
-     * Gets the rendezvousConnected attribute of the RendezVousServiceImpl object
-     *
-     * @return true if connected to a rendezvous, false otherwise
-     */
-    public boolean isConnectedToRendezVous() {
-        RendezVousServiceProvider currentProvider = provider;
-        return currentProvider != null && currentProvider.isConnectedToRendezVous();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void startRendezVous() {
-        try {
-            if (isRendezVous() || PeerGroupID.worldPeerGroupID.equals(group.getPeerGroupID())) {
-                return;
-            }
-
-            if (!rdvProviderSwitchStatus.compareAndSet(false, true)) {
-                IOException failed = new IOException("Currently switching rendezvous configuration. try again later.");
-
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Failed to start rendezvous", failed);
-                }
-                throw failed;
-            }
-
-            // We are at this moment an Edge Peer. First, the current implementation
-            // must be stopped.
-            if (provider != null) {
-                provider.stopApp();
-                provider = null;
-            }
-
-            config = RdvConfigAdv.RendezVousConfiguration.RENDEZVOUS;
-
-            // Now, a new instance of RdvPeerRdvService must be created and initialized.
-            provider = new RdvPeerRdvService(group, this);
-
-            if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING) {
-                provider.setRendezvousServiceMonitor(rendezvousServiceMonitor);
-            }
-
-            provider.startApp(savedArgs);
-
-            rdvProviderSwitchStatus.set(false);
-        } catch (IOException failure) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed to start rendezvous", failure);
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void stopRendezVous() {
-
-        if (!isRendezVous()) {
-            return;
-        }
-
-        if (!rdvProviderSwitchStatus.compareAndSet(false, true)) {
-            IOException failed = new IOException("Currently switching rendezvous configuration. try again later.");
-
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Failed to stop rendezvous", failed);
-            }
-        }
-
-        // If the service was already started, then it needs to be stopped,
-        // and a new instance of an EdgePeerRdvService must be created and initialized and
-        // started.
-
-        if (provider != null) {
-            provider.stopApp();
-            provider = null;
-        }
-
-        config = RdvConfigAdv.RendezVousConfiguration.EDGE;
-
-        provider = new EdgePeerRdvService(group, this);
-
-        if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING) {
-            provider.setRendezvousServiceMonitor(rendezvousServiceMonitor);
-        }
-
-        provider.startApp(savedArgs);
-
-        rdvProviderSwitchStatus.set(false);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean addPropagateListener(String serviceName, String serviceParam, EndpointListener listener) {
-        if (null == endpoint) {
-            throw new IllegalStateException("Unable to register propagate listener. (not started)");
-        }
-
-        return endpoint.addIncomingMessageListener(listener, serviceName, serviceParam);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public EndpointListener removePropagateListener(String serviceName, String serviceParam, EndpointListener listener) {
-
-        if (null == endpoint) {
-            throw new IllegalStateException("Unable to remove propagate listener. (not started)");
-        }
-
-        EndpointListener removed = endpoint.removeIncomingMessageListener(serviceName, serviceParam);
-
-        if ((removed != listener) && (null != removed)) {
-            // Not the listener we expected.
-            // It's kind of bad that we removed it at all, but putting it back should fix things.
-            endpoint.addIncomingMessageListener(removed, serviceName, serviceParam);
-            return null;
-        }
-        return listener;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void propagate(Message msg, String serviceName, String serviceParam, int defaultTTL) throws IOException {
-
-        RendezVousServiceProvider currentProvider = provider;
-
-        if (null == currentProvider) {
-            throw new IOException("No RDV provider");
-        }
-        currentProvider.propagate(msg, serviceName, serviceParam, defaultTTL);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void propagate(Enumeration<? extends ID> destPeerIDs, Message msg, String serviceName, String serviceParam, int defaultTTL) throws IOException {
-
-        RendezVousServiceProvider currentProvider = provider;
-
-        if (null == currentProvider) {
-            throw new IOException("No RDV provider");
-        }
-        currentProvider.propagate(destPeerIDs, msg, serviceName, serviceParam, defaultTTL);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void walk(Message msg, String serviceName, String serviceParam, int defaultTTL) throws IOException {
-        RendezVousServiceProvider currentProvider = provider;
-
-        if (null == currentProvider) {
-            throw new IOException("No RDV provider");
-        }
-        currentProvider.walk(msg, serviceName, serviceParam, defaultTTL);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void walk(Vector<? extends ID> destPeerIDs, Message msg, String serviceName, String serviceParam, int defaultTTL) throws IOException {
-
-        RendezVousServiceProvider currentProvider = provider;
-
-        if (null == currentProvider) {
-            throw new IOException("No RDV provider");
-        }
-        currentProvider.walk(destPeerIDs, msg, serviceName, serviceParam, defaultTTL);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Vector<RdvAdvertisement> getLocalWalkView() {
-
-        Vector<RdvAdvertisement> result = new Vector<RdvAdvertisement>();
-
-        PeerView currView = getPeerView();
-
-        if (null == currView) {
-            return result;
-        }
-
-        Collection<PeerViewElement> allPVE = new ArrayList<PeerViewElement>(currView.getView());
-
-        for (PeerViewElement pve : allPVE) {
-            RdvAdvertisement adv = pve.getRdvAdvertisement();
-            result.add(adv);
-        }
-
-        return result;
-    }
-
-    /**
-     * Returns the PeerView
-     *
-     * @return the PeerView
-     */
-    public PeerView getPeerView() {
-        RendezVousServiceProvider currentProvider = provider;
-
-        if (currentProvider instanceof RdvPeerRdvService) {
-            return ((RdvPeerRdvService) currentProvider).rpv;
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void propagateToNeighbors(Message msg, String serviceName, String serviceParam, int ttl) throws IOException {
-        RendezVousServiceProvider currentProvider = provider;
-
-        if (null == currentProvider) {
-            throw new IOException("No RDV provider");
-        }
-        currentProvider.propagateToNeighbors(msg, serviceName, serviceParam, ttl);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void propagateInGroup(Message msg, String serviceName, String serviceParam, int ttl) throws IOException {
-        RendezVousServiceProvider currentProvider = provider;
-        if (null == currentProvider) {
-            throw new IOException("No RDV provider");
-        }
-        currentProvider.propagateInGroup(msg, serviceName, serviceParam, ttl);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final void addListener(RendezvousListener listener) {
-        eventListeners.add(listener);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public final boolean removeListener(RendezvousListener listener) {
-        return eventListeners.remove(listener);
-    }
-
-    /**
-     * Creates a rendezvous event and sends it to all registered listeners.
-     *
-     * @param type      event type
-     * @param regarding event peer ID
-     */
-    public final void generateEvent(int type, ID regarding) {
-
-        Iterator eachListener = Arrays.asList(eventListeners.toArray()).iterator();
-        RendezvousEvent event = new RendezvousEvent(getInterface(), type, regarding);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Calling listeners for " + event);
-        }
-
-        while (eachListener.hasNext()) {
-            RendezvousListener aListener = (RendezvousListener) eachListener.next();
-
-            try {
-                aListener.rendezvousEvent(event);
-            } catch (Throwable ignored) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Uncaught Throwable in listener (" + aListener + ")", ignored);
-                }
-            }
-        }
-    }
-
-    private synchronized void startWatchDogTimer() {
-        stopWatchDogTimer();
-
-        autoRdvTask = new RdvWatchdogTask();
-
-        // Now that we have an Auto-switch flag we only use the higher timeout
-        // if auto-switch is off .
-        // Set a watchdog, so the peer will become rendezvous if, after rdv_watchdog_interval it
-        // still has not connected to any rendezvous peer.
-        timer.schedule(autoRdvTask, rdv_watchdog_interval, rdv_watchdog_interval);
-    }
-
-    private synchronized void stopWatchDogTimer() {
-        RdvWatchdogTask tw = autoRdvTask;
-
-        if (tw != null) {
-            autoRdvTask.cancel();
-            autoRdvTask = null;
-        }
-    }
-
-    /**
-     * Edge Peer mode connection watchdog.
-     */
-    private class RdvWatchdogTask extends TimerTask {
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public synchronized void run() {
-            try {
-                int connectedPeers = getConnectedPeerIDs().size();
-
-                if (!isRendezVous()) {
-                    if (0 == connectedPeers) {
-                        // This peer has not been able to connect to any rendezvous peer.
-                        // become one.
-
-                        // become a rendezvous peer.
-                        startRendezVous();
-                    }
-                } else {
-                    // Perhaps we can demote ourselves back to an edge
-
-                    int peerViewSize = getLocalWalkView().size();
-
-                    boolean isManyElementsInPeerView = (peerViewSize > DEMOTION_MIN_PEERVIEW_COUNT);
-                    boolean isFewClients = (connectedPeers < DEMOTION_MIN_CLIENT_COUNT);
-
-                    if (isManyElementsInPeerView) {
-                        if (connectedPeers == 0) {
-                            // Demote ourselves if there are no clients and
-                            // there are more than the minimum rendezvous around
-                            stopRendezVous();
-                        } else if (isFewClients && (RendezVousServiceImpl.random.nextDouble() < DEMOTION_FACTOR)) {
-                            // Randomly Demote ourselves if there are few clients and
-                            // there are many rendezvous
-                            stopRendezVous();
-                        }
-                    }
-                }
-            } catch (Throwable all) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Uncaught Throwable in Timer : " + Thread.currentThread().getName(), all);
-                }
-            }
-        }
-    }
-
-    public boolean isMsgIdRecorded(UUID id) {
-
-        boolean found;
-
-        synchronized (msgIds) {
-            found = msgIds.contains(id);
-        }
-
-        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-            LOG.finer(id + " = " + found);
-        }
-
-        return found;
-    }
-
-    /**
-     * Checks if a message id has been recorded.
-     *
-     * @param id message to record.
-     * @return {@code true} If message was added otherwise (duplicate)
-     *         {@code false}.
-     */
-    public boolean addMsgId(UUID id) {
-
-        synchronized (msgIds) {
-            if (isMsgIdRecorded(id)) {
-                // Already there. Nothing to do
-                return false;
-            }
-
-            if (msgIds.size() < MAX_MSGIDS) {
-                msgIds.add(id);
-            } else {
-                msgIds.set((messagesReceived % MAX_MSGIDS), id);
-            }
-
-            messagesReceived++;
-        }
-
-        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-            LOG.finer("Added Message ID : " + id);
-        }
-
-        return true;
-    }
-
-    public UUID createMsgId() {
-        return UUIDFactory.newSeqUUID();
-    }
-
-    /**
-     * Get the current provider. This is for debugging purposes only.
-     *
-     * @return the provider
-     * @deprecated This is private for debugging and diagnostics only.
-     */
-    @Deprecated
-    net.jxta.impl.rendezvous.RendezVousServiceProvider getRendezvousProvider() {
-        return provider;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/RendezVousServiceInterface.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/RendezVousServiceInterface.java
deleted file mode 100644 (file)
index 518a75e..0000000
+++ /dev/null
@@ -1,377 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous;
-
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.Vector;
-
-import java.io.IOException;
-import java.util.Collection;
-
-import net.jxta.document.Advertisement;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointListener;
-import net.jxta.endpoint.Message;
-import net.jxta.id.ID;
-import net.jxta.protocol.RdvAdvertisement;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.rendezvous.RendezVousService;
-import net.jxta.rendezvous.RendezVousStatus;
-import net.jxta.rendezvous.RendezvousListener;
-import net.jxta.service.Service;
-
-import net.jxta.impl.rendezvous.rpv.PeerView;
-import net.jxta.platform.Module;
-
-/**
- * This class implements the RendezVousService interface.
- */
-public class RendezVousServiceInterface implements RendezVousService {
-
-    RendezVousServiceImpl impl = null;
-
-    /**
-     * The only authorized constructor.
-     *
-     * @param theRealThing the wrapped service
-     */
-    RendezVousServiceInterface(RendezVousServiceImpl theRealThing) {
-        impl = theRealThing;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * <p/>Since THIS is already such an object, it returns itself.
-     * FIXME: it is kind of absurd to have this method part of the
-     * interface but we do not want to define two levels of Service interface
-     * just for that.
-     */
-    public Service getInterface() {
-        return this;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ModuleImplAdvertisement getImplAdvertisement() {
-        return impl.getImplAdvertisement();
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * <p/>FIXME: This is meaningless for the interface object;
-     * it is there only to satisfy the requirements of the
-     * interface that we implement. Ultimately, the API should define
-     * two levels of interfaces: one for the real service implementation
-     * and one for the interface object. Right now it feels a bit heavy
-     * to so that since the only different between the two would be
-     * init() and may-be getName().
-     */
-
-    public void init(PeerGroup pg, ID assignedID, Advertisement impl) {
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * <p/>This is here for temporary class hierarchy reasons.
-     * it is ALWAYS ignored. By definition, the interface object
-     * protects the real object's start/stop methods from being called
-     */
-    public int startApp(String[] arg) {
-        return Module.START_OK;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * <p/>This is here for temporary class hierarchy reasons.
-     * it is ALWAYS ignored. By definition, the interface object
-     * protects the real object's start/stop methods from being called
-     * <p/>
-     * <p/>This request is currently ignored.
-     */
-    public void stopApp() {
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void connectToRendezVous(PeerAdvertisement adv) throws IOException {
-        impl.connectToRendezVous(adv);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void connectToRendezVous(EndpointAddress addr) throws IOException {
-        impl.connectToRendezVous(addr);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void challengeRendezVous(ID peer, long delay) {
-        impl.challengeRendezVous(peer, delay);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void disconnectFromRendezVous(ID rendezVous) {
-        impl.disconnectFromRendezVous(rendezVous);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Enumeration<ID> getConnectedRendezVous() {
-        Collection<ID> connectedPeers = getConnectedPeerIDs();
-
-        return Collections.enumeration(connectedPeers);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Enumeration<ID> getDisconnectedRendezVous() {
-        Collection<ID> empty = Collections.emptyList();
-
-        return Collections.enumeration(empty);
-    }
-
-    /**
-     * This portion is for peers that are RendezVous
-     */
-
-    /**
-     * {@inheritDoc}
-     */
-    public void startRendezVous() {
-        impl.startRendezVous();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void stopRendezVous() {
-        impl.stopRendezVous();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Enumeration<ID> getConnectedPeers() {
-        Collection<ID> connectedPeers = getConnectedPeerIDs();
-
-        return Collections.enumeration(connectedPeers);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Vector<ID> getConnectedPeerIDs() {
-        return impl.getConnectedPeerIDs();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean addPropagateListener(String serviceName, String serviceParam, EndpointListener listener) {
-
-        return impl.addPropagateListener(serviceName, serviceParam, listener);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public EndpointListener removePropagateListener(String serviceName, String serviceParam, EndpointListener listener) {
-
-        return impl.removePropagateListener(serviceName, serviceParam, listener);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void addListener(RendezvousListener listener) {
-
-        impl.addListener(listener);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean removeListener(RendezvousListener listener) {
-
-        return impl.removeListener(listener);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void propagate(Message msg, String serviceName, String serviceParam, int defaultTTL) throws IOException {
-
-        impl.propagate(msg, serviceName, serviceParam, defaultTTL);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void propagate(Enumeration<? extends ID> destPeerIDs, Message msg, String serviceName, String serviceParam, int defaultTTL) throws IOException {
-
-        impl.propagate(destPeerIDs, msg, serviceName, serviceParam, defaultTTL);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void walk(Message msg, String serviceName, String serviceParam, int defaultTTL) throws IOException {
-
-        impl.walk(msg, serviceName, serviceParam, defaultTTL);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void walk(Vector<? extends ID> destPeerIDs, Message msg, String serviceName, String serviceParam, int defaultTTL) throws IOException {
-
-        impl.walk(destPeerIDs, msg, serviceName, serviceParam, defaultTTL);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Vector<RdvAdvertisement> getLocalWalkView() {
-
-        return impl.getLocalWalkView();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void propagateToNeighbors(Message msg, String serviceName, String serviceParam, int defaultTTL) throws IOException {
-        impl.propagateToNeighbors(msg, serviceName, serviceParam, defaultTTL);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void propagateInGroup(Message msg, String serviceName, String serviceParam, int defaultTTL) throws IOException {
-        impl.propagateInGroup(msg, serviceName, serviceParam, defaultTTL);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isConnectedToRendezVous() {
-        return impl.isConnectedToRendezVous();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isRendezVous() {
-        return impl.isRendezVous();
-    }
-
-    /**
-     * @inheritDoc
-     */
-    public RendezVousStatus getRendezVousStatus() {
-        return impl.getRendezVousStatus();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean setAutoStart(boolean auto) {
-        return impl.setAutoStart(auto);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean setAutoStart(boolean auto, long period) {
-        return impl.setAutoStart(auto, period);
-    }
-
-    /**
-     * Get the current peerview. This is for debugging purposes only.
-     *
-     * @return the peer view
-     * @deprecated This is private for debugging and diagnostics only.
-     */
-    @Deprecated
-    public PeerView getPeerView() {
-        return impl.getPeerView();
-    }
-
-    /**
-     * Get the current provider. This is for debugging purposes only.
-     *
-     * @return the provider
-     * @deprecated This is private for debugging and diagnostics only.
-     */
-    @Deprecated
-    public net.jxta.impl.rendezvous.RendezVousServiceProvider getRendezvousProvider() {
-        return impl.getRendezvousProvider();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/RendezVousServiceProvider.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/RendezVousServiceProvider.java
deleted file mode 100644 (file)
index 3696b13..0000000
+++ /dev/null
@@ -1,788 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous;
-
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointListener;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.TextDocumentMessageElement;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.impl.id.UUID.UUID;
-import net.jxta.impl.rendezvous.rendezvousMeter.RendezvousMeter;
-import net.jxta.impl.rendezvous.rendezvousMeter.RendezvousMeterBuildSettings;
-import net.jxta.impl.rendezvous.rendezvousMeter.RendezvousServiceMonitor;
-import net.jxta.logging.Logging;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.platform.Module;
-import net.jxta.protocol.PeerAdvertisement;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Enumeration;
-import java.util.Vector;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * This abstract class must be extended for all RendezVous Service providers
- * that are managed by RendezVousServiceImpl.
- * <p/>
- * Implementors of providers are responsible for using appropriate
- * synchronization. The RendezvousServiceImpl provides synchronization control
- * only only those methods which involve changing the active provider.
- */
-public abstract class RendezVousServiceProvider implements EndpointListener {
-
-    /**
-     * Logger
-     */
-    private final static Logger LOG = Logger.getLogger(RendezVousServiceProvider.class.getName());
-
-    protected static final String PropSName = "JxtaPropagate";
-
-    protected static final String RDV_MSG_NAMESPACE_NAME = "jxta";
-
-    protected final String PropPName;
-    protected final String PROP_HDR_ELEMENT_NAME;
-
-    /**
-     * Maximum TTL we will allow for propagation and repropagation issued by
-     * this peer.
-     */
-    protected int MAX_TTL;
-
-    protected final PeerGroup group;
-    protected final RendezVousServiceImpl rdvService;
-    protected boolean closed = false;
-
-    private PeerAdvertisement cachedPeerAdv = null;
-    private int cachedPeerAdvModCount = -1;
-    private XMLDocument cachedPeerAdvDoc = null;
-
-    protected RendezvousServiceMonitor rendezvousServiceMonitor = null;
-    protected RendezvousMeter rendezvousMeter = null;
-
-    /**
-     *
-     * @param group the peergroup
-     * @param rdvService the implementation
-     */
-    protected RendezVousServiceProvider(PeerGroup group, RendezVousServiceImpl rdvService) {
-
-        this.group = group;
-        this.rdvService = rdvService;
-
-        PropPName = this.group.getPeerGroupID().getUniqueValue().toString();
-        PROP_HDR_ELEMENT_NAME = RendezVousPropagateMessage.Name + PropPName;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * EndpointListener for the JxtaPropagate/<peergroup-unique value>
-     */
-    public void processIncomingMessage(Message msg, EndpointAddress srcAddr, EndpointAddress dstAddr) {
-
-        RendezVousPropagateMessage propHdr = checkPropHeader(msg);
-
-        if (null != propHdr) {
-            // Get the destination real destination of the message
-            String sName = propHdr.getDestSName();
-            String sParam = propHdr.getDestSParam();
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Processing " + msg + "(" + propHdr.getMsgId() + ") for " + sName + "/" + sParam + " from " + srcAddr);
-            }
-
-            // Check if we have a local listener for this message
-            processReceivedMessage(msg, propHdr, srcAddr, new EndpointAddress(dstAddr, sName, sParam));
-        }
-    }
-
-    protected XMLDocument getPeerAdvertisementDoc() {
-        PeerAdvertisement newPadv;
-
-        synchronized (this) {
-            newPadv = group.getPeerAdvertisement();
-            int newModCount = newPadv.getModCount();
-
-            if ((cachedPeerAdv != newPadv) || (cachedPeerAdvModCount != newModCount)) {
-                cachedPeerAdv = newPadv;
-                cachedPeerAdvModCount = newModCount;
-            } else {
-                newPadv = null;
-            }
-
-            if (null != newPadv) {
-                cachedPeerAdvDoc = (XMLDocument) cachedPeerAdv.getDocument(MimeMediaType.XMLUTF8);
-            }
-        }
-
-        return cachedPeerAdvDoc;
-    }
-
-    /**
-     * Supply arguments and starts this service if it hadn't started by itself.
-     * <p/>
-     * Currently this service starts by itself and does not expect arguments.
-     * @return 0 if successful
-     * @param arg argument params
-     */
-    protected int startApp(String[] arg) {
-
-        // All propagated messages originated by RendezvousService.propagate are handled by the
-        // rendezvous service before being delivered to their local recipient.
-        // This includes:
-        // messages delivered here via netWorkPropagation. Therefore the rdv service has a special
-        // endpointService listener for that purpose.
-        // messages delivered here by rdv-to-rdv walk.
-        try {
-            if (!rdvService.endpoint.addIncomingMessageListener(this, PropSName, PropPName)) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.severe("Cannot register the propagation listener (already registered)");
-                }
-
-                return -1;
-            }
-        } catch (Exception ez1) {
-            // Not much we can do here.
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Failed registering the endpoint listener", ez1);
-            }
-
-            return -1;
-        }
-
-        try {
-            // Update the peeradv with our status
-            if (rdvService.isRendezVous()) {
-                XMLDocument params = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "Parm");
-                XMLElement e = params.createElement("Rdv", Boolean.TRUE.toString());
-
-                params.appendChild(e);
-                group.getPeerAdvertisement().putServiceParam(rdvService.getAssignedID(), params);
-            } else {
-                group.getPeerAdvertisement().removeServiceParam(rdvService.getAssignedID());
-            }
-        } catch (Exception ignored) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Could not update Rdv Params in Peer Advertisement", ignored);
-            }
-        }
-
-        return Module.START_OK;
-    }
-
-    /**
-     * Ask this service to stop.
-     */
-    protected void stopApp() {
-        EndpointListener shouldbeMe = rdvService.endpoint.removeIncomingMessageListener(PropSName, PropPName);
-
-        if ((null != shouldbeMe) && (this != shouldbeMe)) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Unregistered listener was not as expected." + this + " != " + shouldbeMe);
-            }
-        }
-
-        // Update the peeradv. We are not a rdv.
-        group.getPeerAdvertisement().removeServiceParam(rdvService.getAssignedID());
-    }
-
-    /**
-     * Set the RendezvousServiceMonitor. The RendezvousServiceMonitor is used to
-     * meter the activity of the RendezvousService.
-     *
-     * @param rendezvousServiceMonitor The monitor.
-     * @see net.jxta.impl.meter.MonitorManager
-     */
-    public void setRendezvousServiceMonitor(RendezvousServiceMonitor rendezvousServiceMonitor) {
-        if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING) {
-            this.rendezvousServiceMonitor = rendezvousServiceMonitor;
-
-            if (rendezvousServiceMonitor != null) {
-                this.rendezvousMeter = rendezvousServiceMonitor.getRendezvousMeter();
-            }
-        }
-    }
-
-    /**
-     * Resets the local idea of the lease to the specified value.
-     * As a result a lease response must be sought and obtained within the
-     * new specified delay or the rdv is considered disconnected.
-     *
-     * @param peer  The peer to be challenged
-     * @param delay The delay
-     */
-    public abstract void challengeRendezVous(ID peer, long delay);
-
-    /**
-     * Attempt to connect to the specified rendezvous peer.
-     *
-     * @param addr The endpoint address of the rendezvous peer.
-     * @param hint An optional hint which may be {@code null}.
-     * @throws IOException If no connection could be made to the specified peer.
-     */
-    public abstract void connectToRendezVous(EndpointAddress addr, Object hint) throws IOException;
-
-    /**
-     * Remove a RendezVousService point.
-     *
-     * @param peerID the PeerId of the RendezVous to disconnect from.
-     */
-    public abstract void disconnectFromRendezVous(ID peerID);
-
-    /**
-     * Returns the peers that are currently connected to this peer.
-     *
-     * @return The peers that are currently connected to this peer.
-     */
-    public abstract Vector<ID> getConnectedPeerIDs();
-
-    /**
-     * Propagates a message onto as many peers on the local network
-     * as possible. Typically the message will go to all the peers to
-     * which at least one endpoint transport can address without using
-     * the router.
-     * <p/>
-     * This method sends the message to all peers, rendezvous peers and
-     * edge peer. This method of propagation is very expensive and should
-     * not be frequently used. When rendezvous peers are used in order to
-     * cache index of data, it is more efficient to use the walk() method.
-     * <p/>
-     * Only a single HOP at a time is performed. Messages are always
-     * delivered to the destination handler on arrival. This handler
-     * is responsible for repropagating further, if deemed appropriate.
-     * <p/>
-     * Loop and TTL control are performed automatically.
-     * <p/>
-     * Messages can be propagated via this method for the first time or
-     * can be re-propagated by re-using a message that came in via propagation.
-     * In the later case, the TTL and loop detection parameters CANNOT be
-     * re-initialized. If one wants to "re-propagate" a message with a new TTL
-     * and blank gateways list one must generate a completely new message.
-     * This limits the risk of accidental propagation storms, although they
-     * can always be engineered deliberately.
-     * <p/>
-     * Note: The original msg is not modified and may be reused upon return.
-     *
-     * @param msg          is the message to propagate.
-     * @param serviceName  is the name of the service
-     * @param serviceParam is the parameter of the service
-     * @param initialTTL   is the maximum TTL of the message (note that the Rendezvous
-     *                     Service implementation is free to decrease that value.
-     * @throws java.io.IOException if an io error occurs
-     */
-    public abstract void propagate(Message msg, String serviceName, String serviceParam, int initialTTL) throws IOException;
-
-    /**
-     * Propagates a message onto as many peers on the local network
-     * as possible. Typically the message will go to all the peers to
-     * which at least one endpoint transport can address without using
-     * the router.
-     * <p/>
-     * This method sends the message to all peers, rendezvous peers and
-     * edge peer. This method of propagation is very expensive and should
-     * not be frequently used. When rendezvous peers are used in order to
-     * cache index of data, it is more efficient to use the walk() method.
-     * <p/>
-     * Only a single HOP at a time is performed. Messages are always
-     * delivered to the destination handler on arrival. This handler
-     * is responsible for repropagating further, if deemed appropriate.
-     * <p/>
-     * Loop and TTL control are performed automatically.
-     * <p/>
-     * Messages can be propagated via this method for the first time or
-     * can be re-propagated by re-using a message that came in via propagation.
-     * In the later case, the TTL and loop detection parameters CANNOT be
-     * re-initialized. If one wants to "re-propagate" a message with a new TTL
-     * and blank gateways list one must generate a completely new message.
-     * This limits the risk of accidental propagation storms, although they
-     * can always be engineered deliberately.
-     * <p/>
-     * Note: The original msg is not modified and may be reused upon return.
-     *
-     * @param destPeerIds  An enumeration of the peers that are recipients of the
-     *                     propagated message.
-     * @param msg          is the message to propagate.
-     * @param serviceName  is the name of the service
-     * @param serviceParam is the parameter of the service
-     * @param initialTTL   is the maximum TTL of the message (note that the Rendezvous
-     *                     Service implementation is free to decrease that value.
-     * @throws java.io.IOException if an io error occurs
-     */
-    public abstract void propagate(Enumeration<? extends ID> destPeerIds, Message msg, String serviceName, String serviceParam, int initialTTL) throws IOException;
-
-    /**
-     * Propagates a message onto as many peers on the local network
-     * as possible. Typically the message will go to all the peers to
-     * which at least one endpoint transport can address without using
-     * the router.
-     * <p/>
-     * Only a single HOP at a time is performed. Messages are always
-     * delivered to the destination handler on arrival. This handler
-     * is responsible for repropagating further, if deemed appropriate.
-     * <p/>
-     * Loop and TTL control are performed automatically.
-     * <p/>
-     * Messages can be propagated via this method for the first time or
-     * can be re-propagated by re-using a message that came in via propagation.
-     * In the later case, the TTL and loop detection parameters CANNOT be
-     * re-initialized. If one wants to "re-propagate" a message with a new TTL
-     * and blank gateways list one must generate a completely new message.
-     * This limits the risk of accidental propagation storms, although they
-     * can always be engineered deliberately.
-     * <p/>
-     * Note: The original msg is not modified and may be reused upon return.
-     *
-     * @param msg          is the message to propagate.
-     * @param serviceName  is the name of the service
-     * @param serviceParam is the parameter of the service
-     * @param initialTTL   is the maximum TTL of the message (note that the Rendezvous
-     *                     Service implementation is free to decrease that value.
-     * @throws java.io.IOException if an io error occurs
-     */
-    public abstract void propagateToNeighbors(Message msg, String serviceName, String serviceParam, int initialTTL) throws IOException;
-
-    /**
-     * Return true if connected to a rendezvous.
-     *
-     * @return true if connected to a rendezvous, false otherwise
-     */
-    public abstract boolean isConnectedToRendezVous();
-
-    /**
-     ** The following API is related to the new Rendezvous Peer walk mechanism.
-     **
-     **/
-
-    /**
-     * Walk a message through the rendezvous peers of the network: only
-     * rendezvous peers will receive the message.
-     * <p/>
-     * Only a single HOP at a time is performed. Messages are always
-     * delivered to the destination handler on arrival. This handler
-     * is responsible for repropagating further, if deemed appropriate.
-     * <p/>
-     * Loop and TTL control are performed automatically.
-     * <p/>
-     * Messages can be propagated via this method for the first time or
-     * can be re-propagated by re-using a message that came in via propagation.
-     * In the later case, the TTL and loop detection parameters CANNOT be
-     * re-initialized. If one wants to "re-propagate" a message with a new TTL
-     * and blank gateways list one must generate a completely new message.
-     * This limits the risk of accidental propagation storms, although they
-     * can always be engineered deliberately.
-     * <p/>
-     * Note: The original msg is not modified and may be reused upon return.
-     *
-     * @param msg          is the message to walk.
-     * @param serviceName  is the name of the service
-     * @param serviceParam is the parameter of the service
-     * @param initialTTL   is the maximum TTL of the message (note that the Rendezvous
-     *                     Service implementation is free to decrease that value.
-     * @throws IOException when walking the message is impossible (network failure)
-     */
-    public abstract void walk(Message msg, String serviceName, String serviceParam, int initialTTL) throws IOException;
-
-    /**
-     * Walk a message through the rendezvous peers of the network: only
-     * rendezvous peers will receive the message.
-     * <p/>
-     * Only a single HOP at a time is performed. Messages are always
-     * delivered to the destination handler on arrival. This handler
-     * is responsible for repropagating further, if deemed appropriate.
-     * <p/>
-     * Loop and TTL control are performed automatically.
-     * <p/>
-     * Messages can be propagated via this method for the first time or
-     * can be re-propagated by re-using a message that came in via propagation.
-     * In the later case, the TTL and loop detection parameters CANNOT be
-     * re-initialized. If one wants to "re-propagate" a message with a new TTL
-     * and blank gateways list one must generate a completely new message.
-     * This limits the risk of accidental propagation storms, although they
-     * can always be engineered deliberately.
-     * <p/>
-     * Note: The original msg is not modified and may be reused upon return.
-     *
-     * @param destPeerIDs  is a Vector of PeerID of the peers which are receiving
-     *                     first the walker. Note that each entry in the Vector will create its own
-     *                     walker.
-     * @param msg          is the message to walk.
-     * @param serviceName  is the name of the service
-     * @param serviceParam is the parameter of the service
-     * @param initialTTL   is the maximum TTL of the message (note that the Rendezvous
-     *                     Service implementation is free to decrease that value.
-     * @throws IOException when walking the message is impossible (network failure)
-     */
-    public abstract void walk(Vector<? extends ID> destPeerIDs, Message msg, String serviceName, String serviceParam, int initialTTL) throws IOException;
-
-    /**
-     * Process a propagated message.
-     *
-     * @param message the message received
-     * @param propHdr the message header
-     * @param srcAddr the source address
-     * @param dstAddr the message destination addreess
-     */
-    protected void processReceivedMessage(Message message, RendezVousPropagateMessage propHdr, EndpointAddress srcAddr, EndpointAddress dstAddr) {
-
-        EndpointListener listener = rdvService.endpoint.getIncomingMessageListener(dstAddr.getServiceName(),
-                dstAddr.getServiceParameter());
-
-        if (listener != null) {
-            // We have a local listener for this message. Deliver it.
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Calling local listener " + listener.getClass().getName() + " for [" + dstAddr.getServiceName() + "/"
-                        + dstAddr.getServiceParameter() + "] with " + message + " (" + propHdr.getMsgId() + ")");
-            }
-
-            rdvService.endpoint.processIncomingMessage(message, srcAddr, dstAddr);
-            if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-                rendezvousMeter.receivedMessageProcessedLocally();
-            }
-
-            // NOTE: this this is only beneficial in ad-hoc mode with no rendezvous infrastructure
-            // with one node bridging two networks (2 interfaces).
-            // This should not be a base feature but rather an ad-hoc mode only feature, as
-            // it creates additional unnecessary traffic leading to message loss and latency.
-            // hamada disabling this feature as a general base functionality.
-            // This should addressed differently in Ad-hoc mode, where a multi-homed node would
-            // repropagate when more than one interface is enabled
-
-            // Pass the message on.
-            // repropagate(message, propHdr, dstAddr.getServiceName(), dstAddr.getServiceParameter());
-        } else {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("No message listener found for ServiceName :" + dstAddr.getServiceName() + " ServiceParam :"
-                        + dstAddr.getServiceParameter());
-            }
-        }
-    }
-
-    /**
-     * Responsible for forwarding received messages to the rest of the network
-     * as appropriate. This generally only makes sense for multicast or
-     * broadcast scenarios.
-     *
-     * @param msg          the message to be repropagated.
-     * @param propHdr      It's current propagation header.
-     * @param serviceName  The destination service.
-     * @param serviceParam The destination service parameter.
-     */
-    protected abstract void repropagate(Message msg, RendezVousPropagateMessage propHdr, String serviceName, String serviceParam);
-
-    public abstract void propagateInGroup(Message msg, String serviceName, String serviceParam, int ttl) throws IOException;
-
-    /**
-     * Propagates the message via endpoint propagation (multicast/broadcast) on
-     * all Message Transports.
-     * <p/>
-     * Note: The original msg is not modified and may be reused upon return.
-     *
-     * @param msg     The message to be propagated.
-     * @param propHdr It's current propagation header.
-     * @throws java.io.IOException if an io error occurs
-     */
-    protected void sendToNetwork(Message msg, RendezVousPropagateMessage propHdr) throws IOException {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Endpoint propagating " + msg + " (" + propHdr.getMsgId() + ")");
-        }
-
-        rdvService.endpoint.propagate(msg, PropSName, PropPName);
-    }
-
-    /**
-     * Convenience method for constructing an endpoint address from an id
-     *
-     * @param destPeer peer id
-     * @param serv     the service name (if any)
-     * @param parm     the service param (if any)
-     * @return endpointAddress for this peer id.
-     */
-    protected static EndpointAddress mkAddress(String destPeer, String serv, String parm) {
-        ID asID;
-        try {
-            asID = IDFactory.fromURI(new URI(destPeer));
-        } catch (URISyntaxException caught) {
-            throw new IllegalArgumentException(caught.getMessage());
-        }
-
-        return mkAddress(asID, serv, parm);
-    }
-
-    /**
-     * Convenience method for constructing an endpoint address from an id
-     *
-     * @param destPeer peer id
-     * @param serv     the service name (if any)
-     * @param parm     the service param (if any)
-     * @return endpointAddress for this peer id.
-     */
-    protected static EndpointAddress mkAddress(ID destPeer, String serv, String parm) {
-        EndpointAddress addr = new EndpointAddress(RDV_MSG_NAMESPACE_NAME, destPeer.getUniqueValue().toString(), serv, parm);
-        return addr;
-    }
-
-    /**
-     * Get propagate header from the message.
-     *
-     * @param msg The source message.
-     * @return The message's propagate header if any, otherwise null.
-     */
-    protected RendezVousPropagateMessage getPropHeader(Message msg) {
-
-        MessageElement elem = msg.getMessageElement(RDV_MSG_NAMESPACE_NAME, PROP_HDR_ELEMENT_NAME);
-
-        if (elem == null) {
-            return null;
-        }
-
-        try {
-            StructuredDocument asDoc = StructuredDocumentFactory.newStructuredDocument(elem);
-            return new RendezVousPropagateMessage(asDoc);
-        } catch (IOException failed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Could not get prop header of " + msg, failed);
-            }
-            IllegalArgumentException failure = new IllegalArgumentException("Could not get prop header of " + msg);
-            failure.initCause(failed);
-            throw failure;
-        }
-    }
-
-    /**
-     * Check and updates the header message element
-     *
-     * @param msg the message to check
-     * @return an upadate message
-     */
-    protected RendezVousPropagateMessage checkPropHeader(Message msg) {
-        RendezVousPropagateMessage propHdr;
-
-        try {
-            propHdr = getPropHeader(msg);
-            if (null == propHdr) {
-                // No header. Discard the message
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Discarding " + msg + " -- missing propagate header.");
-                }
-                if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-                    rendezvousMeter.invalidMessageReceived();
-                }
-                return null;
-            }
-        } catch (Exception failure) {
-            // Bad header. Discard the message
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Discarding " + msg + " -- bad propagate header.", failure);
-            }
-
-            if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-                rendezvousMeter.invalidMessageReceived();
-            }
-            return null;
-        }
-        // Look at the Propagate header if any and check for loops.
-        // Do not remove it; we do not have to change it yet, and we have
-        // do look at it at different places and looking costs less on
-        // incoming elements than on outgoing.
-
-        // TTL detection. A message arriving with TTL <= 0 should not even
-        // have been sent. Kill it.
-
-        if (propHdr.getTTL() <= 0) {
-            // This message is dead on arrival. Drop it.
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Discarding " + msg + "(" + propHdr.getMsgId() + ") -- dead on arrival (TTl=" + propHdr.getTTL() + ").");
-            }
-
-            if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-                rendezvousMeter.receivedDeadMessage();
-            }
-            return null;
-        }
-
-        if (!rdvService.addMsgId(propHdr.getMsgId())) {
-            // We already received this message - discard
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Discarding " + msg + "(" + propHdr.getMsgId() + ") -- feedback.");
-            }
-
-            if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-                rendezvousMeter.receivedDuplicateMessage();
-            }
-            return null;
-        }
-
-        // Loop detection
-        if (propHdr.isVisited(group.getPeerID().toURI())) {
-            // Loop is detected - discard.
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Discarding " + msg + "(" + propHdr.getMsgId() + ") -- loopback.");
-            }
-            if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-                rendezvousMeter.receivedLoopbackMessage();
-            }
-            return null;
-        }
-        // Message is valid
-        return propHdr;
-    }
-
-    protected RendezVousPropagateMessage updatePropHeader(Message msg, RendezVousPropagateMessage propHdr, String serviceName, String serviceParam, int initialTTL) {
-
-        boolean newHeader = false;
-
-        if (null == propHdr) {
-            propHdr = newPropHeader(serviceName, serviceParam, initialTTL);
-            newHeader = true;
-        } else {
-            if (null == updatePropHeader(propHdr, initialTTL)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("TTL expired for " + msg + " (" + propHdr.getMsgId() + ") TTL=" + propHdr.getTTL());
-                }
-                return null;
-            }
-        }
-
-        XMLDocument propHdrDoc = (XMLDocument) propHdr.getDocument(MimeMediaType.XMLUTF8);
-        MessageElement elem = new TextDocumentMessageElement(PROP_HDR_ELEMENT_NAME, propHdrDoc, null);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine((newHeader ? "Added" : "Updated") + " prop header for " + msg + " (" + propHdr.getMsgId() + ") TTL = "
-                    + propHdr.getTTL());
-        }
-
-        msg.replaceMessageElement(RDV_MSG_NAMESPACE_NAME, elem);
-        return propHdr;
-    }
-
-    /**
-     * Adds a propagation header to the given message with the given default
-     * TTL. Also adds this peer to the path recorded in the message.
-     *
-     * @param serviceName the service name
-     * @param serviceParam the parameter
-     * @param initialTTL initial TTL
-     * @return  a updated message with the proper TTL and ID
-     */
-    private RendezVousPropagateMessage newPropHeader(String serviceName, String serviceParam, int initialTTL) {
-
-        RendezVousPropagateMessage propHdr = new RendezVousPropagateMessage();
-
-        propHdr.setTTL(initialTTL);
-        propHdr.setDestSName(serviceName);
-        propHdr.setDestSParam(serviceParam);
-
-        UUID msgID = rdvService.createMsgId();
-
-        propHdr.setMsgId(msgID);
-        rdvService.addMsgId(msgID);
-
-        // Add this peer to the path.
-        propHdr.addVisited(group.getPeerID().toURI());
-
-        return propHdr;
-    }
-
-    /**
-     * Updates the propagation header of the message. Also adds this peer to the
-     * path recorded in the message. Returns true if the message should be
-     * repropagated, false otherwise.
-     *
-     * @param propHdr The propHdr for the message.
-     * @param maxTTL  The maximum TTL which will be allowed.
-     * @return The updated propagate header if the message should be
-     *         repropagated otherwise null.
-     */
-    private RendezVousPropagateMessage updatePropHeader(RendezVousPropagateMessage propHdr, int maxTTL) {
-
-        int msgTTL = propHdr.getTTL();
-        URI me = group.getPeerID().toURI();
-
-        int useTTL = msgTTL;
-
-        if (!propHdr.isVisited(me)) {
-            // only reduce TTL if message has not previously visited us.
-            useTTL--;
-        }
-
-        // ensure TTL does not exceed maxTTL
-        useTTL = Math.min(useTTL, maxTTL);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Updating propagation header (" + propHdr.getMsgId() + ") TTL: " + msgTTL + "-->" + useTTL);
-        }
-
-        propHdr.setTTL(useTTL);
-
-        // Add this peer to the path.
-        propHdr.addVisited(me);
-
-        // If message came in with TTL one or less, it was last trip. It can not go any further.
-        return (useTTL <= 0) ? null : propHdr;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/StdRendezVousService.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/StdRendezVousService.java
deleted file mode 100644 (file)
index f0c1153..0000000
+++ /dev/null
@@ -1,520 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous;
-
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointListener;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.Messenger;
-import net.jxta.endpoint.TextDocumentMessageElement;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.impl.endpoint.EndpointUtils;
-import net.jxta.impl.rendezvous.rdv.RdvPeerRdvService;
-import net.jxta.impl.rendezvous.rendezvousMeter.RendezvousMeterBuildSettings;
-import net.jxta.impl.rendezvous.rpv.PeerViewElement;
-import net.jxta.logging.Logging;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.RouteAdvertisement;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Arrays;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Timer;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Base class for providers which implement the JXTA Standard Rendezvous
- * Protocol.
- *
- * @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-rvp" target="_blank">JXTA Protocols Specification : Rendezvous Protocol</a>
- */
-public abstract class StdRendezVousService extends RendezVousServiceProvider {
-
-    /**
-     * Logger
-     */
-    private final static Logger LOG = Logger.getLogger(StdRendezVousService.class.getName());
-
-    public final static String ConnectRequest = "Connect";
-    public final static String DisconnectRequest = "Disconnect";
-    public final static String ConnectedPeerReply = "ConnectedPeer";
-    public final static String ConnectedLeaseReply = "ConnectedLease";
-    public final static String ConnectedRdvAdvReply = "RdvAdvReply";
-
-    /**
-     * Default Maximum TTL.
-     */
-    protected static final int DEFAULT_MAX_TTL = 200;
-
-    protected final String pName;
-    protected final String pParam;
-
-    /**
-     * The registered handler for messages using the Standard Rendezvous
-     * Protocol.
-     *
-     * @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-rvp" target="_blank">JXTA Protocols Specification : Rendezvous Protocol
-     */
-    private StdRdvProtocolListener handler;
-
-    protected final Timer timer;
-
-    /**
-     * Interface for listeners to : &lt;assignedID>/<group-unique>
-     */
-    protected interface StdRdvProtocolListener extends EndpointListener {}
-
-    /**
-     * Constructor
-     *
-     * @param group      the PeerGroup
-     * @param rdvService the parent rendezvous service
-     */
-    protected StdRendezVousService(PeerGroup group, RendezVousServiceImpl rdvService) {
-
-        super(group, rdvService);
-
-        MAX_TTL = DEFAULT_MAX_TTL;
-
-        pName = rdvService.getAssignedID().toString();
-        pParam = group.getPeerGroupID().getUniqueValue().toString();
-
-        timer = new Timer("StdRendezVousService Timer for " + group.getPeerGroupID(), true);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    protected int startApp(String[] argv, StdRdvProtocolListener handler) {
-
-        this.handler = handler;
-
-        rdvService.endpoint.addIncomingMessageListener(handler, pName, null);
-
-        return super.startApp(argv);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void stopApp() {
-        EndpointListener shouldbehandler = rdvService.endpoint.removeIncomingMessageListener(pName, null);
-
-        if (handler != shouldbehandler) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Unregistered listener was not as expected." + handler + " != " + shouldbehandler);
-            }
-        }
-
-        timer.cancel();
-
-        super.stopApp();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void processReceivedMessage(Message message, RendezVousPropagateMessage propHdr, EndpointAddress srcAddr, EndpointAddress dstAddr) {
-
-        if (srcAddr.getProtocolName().equalsIgnoreCase("jxta")) {
-            String idstr = ID.URIEncodingName + ":" + ID.URNNamespace + ":" + srcAddr.getProtocolAddress();
-
-            ID peerid;
-            try {
-                peerid = IDFactory.fromURI(new URI(idstr));
-            } catch (URISyntaxException badID) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Bad ID in message", badID);
-                }
-                return;
-            }
-
-            if (!group.getPeerID().equals(peerid)) {
-                PeerConnection pConn = getPeerConnection(peerid);
-
-                if (null == pConn) {
-                    PeerViewElement pve;
-
-                    if (this instanceof RdvPeerRdvService) {
-                        // cheap hack....
-                        pve = ((RdvPeerRdvService) this).rpv.getPeerViewElement(peerid);
-                    } else {
-                        pve = null;
-                    }
-
-                    if (null == pve) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Received " + message + " (" + propHdr.getMsgId() + ") from unrecognized peer : " + peerid);
-                        }
-
-                        propHdr.setTTL(Math.min(propHdr.getTTL(), 3)); // will be reduced during repropagate stage.
-
-                        // FIXME 20040503 bondolo need to add tombstones so that we don't end up spamming disconnects.
-                        if (rdvService.isRendezVous() || (getPeerConnections().length > 0)) {
-                            // edge peers with no rdv should not send disconnect.
-                            sendDisconnect(peerid, null);
-                        }
-                    } else {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Received " + message + " (" + propHdr.getMsgId() + ") from " + pve);
-                        }
-                    }
-                } else {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Received " + message + " (" + propHdr.getMsgId() + ") from " + pConn);
-                    }
-                }
-            } else {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Received " + message + " (" + propHdr.getMsgId() + ") from loopback.");
-                }
-            }
-        } else {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Received " + message + " (" + propHdr.getMsgId() + ") from network -- repropagating with TTL 2");
-            }
-
-            propHdr.setTTL(Math.min(propHdr.getTTL(), 3)); // will be reduced during repropagate stage.
-        }
-        super.processReceivedMessage(message, propHdr, srcAddr, dstAddr);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void propagate(Enumeration<? extends ID> destPeerIDs, Message msg, String serviceName, String serviceParam, int initialTTL) {
-        msg = msg.clone();
-        int useTTL = Math.min(initialTTL, MAX_TTL);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine(
-                    "Propagating " + msg + "(TTL=" + useTTL + ") to :" + "\n\tsvc name:" + serviceName + "\tsvc params:"
-                    + serviceParam);
-        }
-
-        RendezVousPropagateMessage propHdr = updatePropHeader(msg, getPropHeader(msg), serviceName, serviceParam, useTTL);
-
-        if (null != propHdr) {
-            int numPeers = 0;
-
-            try {
-                while (destPeerIDs.hasMoreElements()) {
-                    ID dest = destPeerIDs.nextElement();
-
-                    try {
-                        PeerConnection pConn = getPeerConnection(dest);
-
-                        // TODO: make use of PeerView connections as well
-                        if (null == pConn) {
-                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                LOG.fine("Sending " + msg + " (" + propHdr.getMsgId() + ") to " + dest);
-                            }
-
-                            EndpointAddress addr = mkAddress(dest, PropSName, PropPName);
-
-                            Messenger messenger = rdvService.endpoint.getMessengerImmediate(addr, null);
-
-                            if (null != messenger) {
-                                try {
-                                    messenger.sendMessage(msg);
-                                } catch (IOException ignored) {
-                                    continue;
-                                }
-                            } else {
-                                continue;
-                            }
-                        } else {
-                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                LOG.fine("Sending " + msg + " (" + propHdr.getMsgId() + ") to " + pConn);
-                            }
-
-                            if (pConn.isConnected()) {
-                                pConn.sendMessage(msg.clone(), PropSName, PropPName);
-                            } else {
-                                continue;
-                            }
-                        }
-                        numPeers++;
-                    } catch (Exception failed) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.warning("Failed to send " + msg + " (" + propHdr.getMsgId() + ") to " + dest);
-                        }
-                    }
-                }
-            } finally {
-                if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-                    rendezvousMeter.propagateToPeers(numPeers);
-                }
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Propagated " + msg + " (" + propHdr.getMsgId() + ") to " + numPeers + " peers.");
-                }
-            }
-        } else {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Declined to send " + msg + " ( no propHdr )");
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void propagateToNeighbors(Message msg, String serviceName, String serviceParam, int initialTTL) throws IOException {
-        msg = msg.clone();
-        int useTTL = Math.min(initialTTL, MAX_TTL);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Propagating " + msg + "(TTL=" + useTTL + ") to neighbors to :" + "\n\tsvc name:" + serviceName+ "\tsvc params:" + serviceParam);
-        }
-
-        RendezVousPropagateMessage propHdr = updatePropHeader(msg, getPropHeader(msg), serviceName, serviceParam, useTTL);
-
-        if (null != propHdr) {
-            try {
-                sendToNetwork(msg, propHdr);
-
-                if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-                    rendezvousMeter.propagateToNeighbors();
-                }
-            } catch (IOException failed) {
-                if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-                    rendezvousMeter.propagateToNeighborsFailed();
-                }
-
-                throw failed;
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected void repropagate(Message msg, RendezVousPropagateMessage propHdr, String serviceName, String serviceParam) {
-        msg = msg.clone();
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Repropagating " + msg + " (" + propHdr.getMsgId() + ")");
-        }
-
-        if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-            rendezvousMeter.receivedMessageRepropagatedInGroup();
-        }
-
-        try {
-            propHdr = updatePropHeader(msg, propHdr, serviceName, serviceParam, MAX_TTL);
-
-            if (null != propHdr) {
-                // Note (hamada): This is an unnecessary operation, and serves
-                // no purpose other than the additional loads it imposes on the
-                // rendezvous.  Local subnet network operations should be (and are)
-                // sufficient to achieve the goal.
-                // sendToEachConnection(msg, propHdr);
-                sendToNetwork(msg, propHdr);
-            } else {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("No propagate header, declining to repropagate " + msg + ")");
-                }
-            }
-        } catch (Exception ez1) {
-            // Not much we can do
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                if (propHdr != null) {
-                    LOG.log(Level.WARNING, "Failed to repropagate " + msg + " (" + propHdr.getMsgId() + ")", ez1);
-                } else {
-                    LOG.log(Level.WARNING, "Could to repropagate " + msg, ez1);
-                }
-            }
-        }
-    }
-
-    /**
-     * Returns the peer connection or null if not present.
-     *
-     * @param id the node ID
-     * @return PeerConnection the peer connection or null if not present.
-     */
-    public abstract PeerConnection getPeerConnection(ID id);
-
-    /**
-     * Returns an array of the current peer connections.
-     *
-     * @return An array of the current peer connections.
-     */
-    protected abstract PeerConnection[] getPeerConnections();
-
-    /**
-     * Sends to all connected peers.
-     * <p/>
-     * Note: The original msg is not modified and may be reused upon return.
-     *
-     * @param msg     The message to be sent.
-     * @param propHdr The propagation header associated with the message.
-     * @return the number of nodes the message was sent to
-     */
-    protected int sendToEachConnection(Message msg, RendezVousPropagateMessage propHdr) {
-        List<PeerConnection> peers = Arrays.asList(getPeerConnections());
-        int sentToPeers = 0;
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Sending " + msg + "(" + propHdr.getMsgId() + ") to " + peers.size() + " peers.");
-        }
-
-        for (PeerConnection pConn : peers) {
-            // Check if this rendezvous has already processed this propagated message.
-            if (!pConn.isConnected()) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Skipping " + pConn + " for " + msg + "(" + propHdr.getMsgId() + ") -- disconnected.");
-                }
-                // next!
-                continue;
-            }
-
-            if (propHdr.isVisited(pConn.getPeerID().toURI())) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Skipping " + pConn + " for " + msg + "(" + propHdr.getMsgId() + ") -- already visited.");
-                }
-                // next!
-                continue;
-            }
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Sending " + msg + "(" + propHdr.getMsgId() + ") to " + pConn);
-            }
-
-            if (pConn.sendMessage(msg.clone(), PropSName, PropPName)) {
-                sentToPeers++;
-            }
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Sent " + msg + "(" + propHdr.getMsgId() + ") to " + sentToPeers + " of " + peers.size() + " peers.");
-        }
-
-        return sentToPeers;
-    }
-
-    /**
-     * Sends a disconnect message to the specified peer.
-     *
-     * @param peerid The peer to be disconnected.
-     * @param padv   The peer to be disconnected.
-     */
-    protected void sendDisconnect(ID peerid, PeerAdvertisement padv) {
-
-        Message msg = new Message();
-
-        // The request simply includes the local peer advertisement.
-        try {
-            msg.replaceMessageElement("jxta", new TextDocumentMessageElement(DisconnectRequest, getPeerAdvertisementDoc(), null));
-
-            EndpointAddress addr = mkAddress(peerid, null, null);
-
-            RouteAdvertisement hint = null;
-
-            if (null != padv) {
-                hint = EndpointUtils.extractRouteAdv(padv);
-            }
-
-            Messenger messenger = rdvService.endpoint.getMessengerImmediate(addr, hint);
-
-            if (null == messenger) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Could not get messenger for " + peerid);
-                }
-                return;
-            }
-
-            messenger.sendMessage(msg, pName, pParam);
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "sendDisconnect failed", e);
-            }
-        }
-    }
-
-    /**
-     * Sends a disconnect message to the specified peer.
-     *
-     * @param pConn The peer to be disconnected.
-     */
-    protected void sendDisconnect(PeerConnection pConn) {
-
-        Message msg = new Message();
-
-        // The request simply includes the local peer advertisement.
-        try {
-            msg.replaceMessageElement("jxta", new TextDocumentMessageElement(DisconnectRequest, getPeerAdvertisementDoc(), null));
-
-            pConn.sendMessage(msg, pName, pParam);
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "sendDisconnect failed", e);
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/adhoc/AdhocPeerRdvService.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/adhoc/AdhocPeerRdvService.java
deleted file mode 100644 (file)
index 8d7b0d3..0000000
+++ /dev/null
@@ -1,401 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.rendezvous.adhoc;
-
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.XMLDocument;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.Messenger;
-import net.jxta.id.ID;
-import net.jxta.impl.protocol.RdvConfigAdv;
-import net.jxta.impl.rendezvous.RendezVousPropagateMessage;
-import net.jxta.impl.rendezvous.RendezVousServiceImpl;
-import net.jxta.impl.rendezvous.RendezVousServiceProvider;
-import net.jxta.impl.rendezvous.rendezvousMeter.RendezvousMeterBuildSettings;
-import net.jxta.logging.Logging;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.platform.Module;
-import net.jxta.protocol.ConfigParams;
-import net.jxta.rendezvous.RendezvousEvent;
-
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.Vector;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * A JXTA {@link net.jxta.rendezvous.RendezVousService} implementation which
- * implements the ad hoc portion of the standard JXTA Rendezvous Protocol (RVP).
- *
- * @see net.jxta.rendezvous.RendezVousService
- * @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-rvp" target="_blank">JXTA Protocols Specification : Rendezvous Protocol</a>
- */
-public class AdhocPeerRdvService extends RendezVousServiceProvider {
-
-    /**
-     * Log4J Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(AdhocPeerRdvService.class.getName());
-
-    /**
-     * Default Maximum TTL. This is minimum needed to bridge networks.
-     */
-    private static final int DEFAULT_MAX_TTL = 2;
-
-    /**
-     * Constructor
-     *
-     * @param g          the peergroup
-     * @param rdvService the rendezvous service
-     */
-    public AdhocPeerRdvService(PeerGroup g, RendezVousServiceImpl rdvService) {
-
-        super(g, rdvService);
-
-        ConfigParams confAdv = g.getConfigAdvertisement();
-
-        // Get the config. If we do not have a config, we're done; we just keep
-        // the defaults (edge peer/no auto-rdv)
-        if (confAdv != null) {
-            Advertisement adv = null;
-
-            try {
-                XMLDocument configDoc = (XMLDocument) confAdv.getServiceParam(rdvService.getAssignedID());
-
-                if (null != configDoc) {
-                    // XXX 20041027 backwards compatibility
-                    configDoc.addAttribute("type", RdvConfigAdv.getAdvertisementType());
-
-                    adv = AdvertisementFactory.newAdvertisement(configDoc);
-                }
-            } catch (java.util.NoSuchElementException ignored) {// ignored
-            }
-
-            if (adv instanceof RdvConfigAdv) {
-                RdvConfigAdv rdvConfigAdv = (RdvConfigAdv) adv;
-
-                MAX_TTL = (-1 != rdvConfigAdv.getMaxTTL()) ? rdvConfigAdv.getMaxTTL() : DEFAULT_MAX_TTL;
-            } else {
-                MAX_TTL = DEFAULT_MAX_TTL;
-            }
-        } else {
-            MAX_TTL = DEFAULT_MAX_TTL;
-        }
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("RendezVous Service is initialized for " + g.getPeerGroupID() + " as an ad hoc peer. ");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected int startApp(String[] arg) {
-
-        super.startApp(arg);
-
-        // The other services may not be fully functional but they're there
-        // so we can start our subsystems.
-        // As for us, it does not matter if our methods are called between init
-        // and startApp().
-
-        if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-            rendezvousMeter.startEdge();
-        }
-
-        // we are nominally an edge peer
-        rdvService.generateEvent(RendezvousEvent.BECAMEEDGE, group.getPeerID());
-
-        return Module.START_OK;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized void stopApp() {
-
-        if (closed) {
-            return;
-        }
-
-        closed = true;
-
-        super.stopApp();
-
-        if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-            rendezvousMeter.stopEdge();
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Vector<ID> getConnectedPeerIDs() {
-
-        return new Vector<ID>(0);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean isConnectedToRendezVous() {
-        // It's as connected as it's ever going to get....
-        return true;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void connectToRendezVous(EndpointAddress addr, Object hint) throws IOException {
-
-        throw new UnsupportedOperationException("Not supported by ad hoc");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void challengeRendezVous(ID peer, long delay) {
-
-        throw new UnsupportedOperationException("Not supported by ad hoc");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void disconnectFromRendezVous(ID peerId) {
-
-        throw new UnsupportedOperationException("Not supported by ad hoc");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void propagate(Message msg, String serviceName, String serviceParam, int ttl) throws IOException {
-
-        ttl = Math.min(ttl, MAX_TTL);
-
-        RendezVousPropagateMessage propHdr = updatePropHeader(msg, getPropHeader(msg), serviceName, serviceParam, ttl);
-
-        if (null != propHdr) {
-            sendToNetwork(msg, propHdr);
-
-            if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-                rendezvousMeter.propagateToGroup();
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void propagateInGroup(Message msg, String serviceName, String serviceParam, int ttl) throws IOException {
-
-        ttl = Math.min(ttl, MAX_TTL);
-
-        RendezVousPropagateMessage propHdr = updatePropHeader(msg, getPropHeader(msg), serviceName, serviceParam, ttl);
-
-        if (null != propHdr) {
-            sendToNetwork(msg, propHdr);
-
-            if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-                rendezvousMeter.propagateToGroup();
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void propagate(Enumeration<? extends ID> destPeerIDs, Message msg, String serviceName, String serviceParam, int ttl) {
-
-        ttl = Math.min(ttl, MAX_TTL);
-
-        RendezVousPropagateMessage propHdr = updatePropHeader(msg, getPropHeader(msg), serviceName, serviceParam, ttl);
-
-        if (null != propHdr) {
-            int numPeers = 0;
-
-            try {
-                while (destPeerIDs.hasMoreElements()) {
-                    ID dest = destPeerIDs.nextElement();
-
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Sending " + msg + " to client " + dest);
-                    }
-
-                    EndpointAddress addr = mkAddress(dest, PropSName, PropPName);
-
-                    Messenger messenger = rdvService.endpoint.getMessenger(addr);
-
-                    if (null != messenger) {
-                        try {
-                            messenger.sendMessage(msg);
-                            numPeers++;
-                        } catch (IOException failed) {// ignored
-                        }
-                    }
-                }
-            } finally {
-                if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-                    rendezvousMeter.propagateToPeers(numPeers);
-                }
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void propagateToNeighbors(Message msg, String serviceName, String serviceParam, int ttl) throws IOException {
-
-        ttl = Math.min(ttl, MAX_TTL);
-
-        RendezVousPropagateMessage propHdr = updatePropHeader(msg, getPropHeader(msg), serviceName, serviceParam, ttl);
-
-        if (null != propHdr) {
-            try {
-                sendToNetwork(msg, propHdr);
-
-                if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-                    rendezvousMeter.propagateToNeighbors();
-                }
-            } catch (IOException failed) {
-                if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-                    rendezvousMeter.propagateToNeighborsFailed();
-                }
-
-                throw failed;
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * The definition of walk says that we should forward the message to the
-     * most appropriate peer. Since we don't make any effort keep track of other
-     * peers we don't have anywhere to send the message.
-     */
-    @Override
-    public void walk(Message msg, String serviceName, String serviceParam, int ttl) throws IOException {
-        // Do nothing. Really.
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Unlike the undirected walk we are told where to send the message so we
-     * deliver it as requested.
-     */
-    @Override
-    public void walk(Vector<? extends ID> destPeerIDs, Message msg, String serviceName, String serviceParam, int ttl) throws IOException {
-
-        propagate(destPeerIDs.elements(), msg, serviceName, serviceParam, ttl);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected void repropagate(Message msg, RendezVousPropagateMessage propHdr, String serviceName, String serviceParam) {
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Repropagating " + msg + " (" + propHdr.getMsgId() + ")");
-        }
-
-        if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-            rendezvousMeter.receivedMessageRepropagatedInGroup();
-        }
-
-        try {
-            propHdr = updatePropHeader(msg, propHdr, serviceName, serviceParam, MAX_TTL);
-
-            if (null != propHdr) {
-                sendToNetwork(msg, propHdr);
-            } else {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("No propagate header, declining to repropagate " + msg + ")");
-                }
-            }
-        } catch (Exception ez1) {
-            // Not much we can do
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                if (propHdr != null) {
-                    LOG.log(Level.WARNING, "Failed to repropagate " + msg + " (" + propHdr.getMsgId() + ")", ez1);
-                } else {
-                    LOG.log(Level.WARNING, "Could to repropagate " + msg, ez1);
-                }
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/edge/EdgePeerRdvService.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/edge/EdgePeerRdvService.java
deleted file mode 100644 (file)
index 1c22185..0000000
+++ /dev/null
@@ -1,866 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous.edge;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.TimerTask;
-import java.util.Vector;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import java.io.IOException;
-import java.net.URISyntaxException;
-
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.XMLDocument;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.Messenger;
-import net.jxta.endpoint.MessageTransport;
-import net.jxta.endpoint.TextDocumentMessageElement;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.impl.endpoint.relay.RelayReferralSeedingManager;
-import net.jxta.logging.Logging;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.platform.Module;
-import net.jxta.protocol.ConfigParams;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.RouteAdvertisement;
-import net.jxta.rendezvous.RendezvousEvent;
-
-import net.jxta.impl.protocol.RdvConfigAdv;
-import net.jxta.impl.rendezvous.PeerConnection;
-import net.jxta.impl.rendezvous.RendezVousPropagateMessage;
-import net.jxta.impl.rendezvous.RendezVousServiceImpl;
-import net.jxta.impl.rendezvous.RendezVousServiceProvider;
-import net.jxta.impl.rendezvous.StdRendezVousService;
-import net.jxta.impl.rendezvous.rendezvousMeter.RendezvousConnectionMeter;
-import net.jxta.impl.rendezvous.rendezvousMeter.RendezvousMeterBuildSettings;
-import net.jxta.impl.rendezvous.rpv.PeerviewSeedingManager;
-import net.jxta.impl.util.SeedingManager;
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.impl.util.URISeedingManager;
-
-/**
- * A JXTA {@link net.jxta.rendezvous.RendezVousService} implementation which
- * implements the client portion of the standard JXTA Rendezvous Protocol (RVP).
- *
- * @see net.jxta.rendezvous.RendezVousService
- * @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-rvp" target="_blank">JXTA Protocols Specification : Rendezvous Protocol</a>
- */
-public class EdgePeerRdvService extends StdRendezVousService {
-    
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(EdgePeerRdvService.class.getName());
-    
-    /**
-     * Interval in milliseconds at which we will check our rendezvous connection.
-     */
-    private final static long MONITOR_INTERVAL = 15 * TimeUtils.ASECOND;
-    
-    /**
-     * Number of rendezvous we will try to connect to.
-     */
-    private final int MAX_RDV_CONNECTIONS = 2;
-    
-    /**
-     * The default amount of time we will attempt to renew a lease before it
-     * expires.
-     */
-    private long LEASE_MARGIN = 5 * TimeUtils.AMINUTE;
-    
-    /**
-     * Our source for rendezvous server seeds.
-     */
-    private final SeedingManager seedingManager;
-    
-    /**
-     * Our current seeds.
-     */
-    private final List<RouteAdvertisement> seeds = new ArrayList<RouteAdvertisement>();
-    
-    /**
-     * Our current connections with RendezVous peers.
-     */
-    private final Map<ID, RdvConnection> rendezVous = Collections.synchronizedMap(new HashMap<ID, RdvConnection>());
-    
-    /**
-     * Standard Constructor
-     *
-     * @param group      Description of Parameter
-     * @param rdvService Description of Parameter
-     */
-    public EdgePeerRdvService(PeerGroup group, RendezVousServiceImpl rdvService) {
-        
-        super(group, rdvService);
-        
-        Advertisement adv = null;
-        ConfigParams confAdv = group.getConfigAdvertisement();
-        
-        // Get the config. If we do not have a config, we're done; we just keep
-        // the defaults (edge peer/no auto-rdv)
-        if (confAdv != null) {
-            adv = confAdv.getSvcConfigAdvertisement(rdvService.getAssignedID());
-        }
-        
-        RdvConfigAdv rdvConfigAdv;
-        
-        if (!(adv instanceof RdvConfigAdv)) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Creating new RdvConfigAdv for defaults.");
-            }
-
-            rdvConfigAdv = (RdvConfigAdv) AdvertisementFactory.newAdvertisement(RdvConfigAdv.getAdvertisementType());
-        } else {
-            rdvConfigAdv = (RdvConfigAdv) adv;
-        }
-        
-        if (-1 != rdvConfigAdv.getMaxTTL()) {
-            MAX_TTL = rdvConfigAdv.getMaxTTL();
-        }
-        
-        if (0 != rdvConfigAdv.getLeaseMargin()) {
-            LEASE_MARGIN = rdvConfigAdv.getLeaseMargin();
-        }
-        
-        String serviceName = rdvService.getAssignedID().toString() + group.getPeerGroupID().getUniqueValue().toString();
-        if (PeerGroupID.worldPeerGroupID.equals(group.getParentGroup().getPeerGroupID())) {
-            URISeedingManager uriSeedingManager;
-            
-            if (rdvConfigAdv.getProbeRelays()) {
-                uriSeedingManager = new RelayReferralSeedingManager(rdvConfigAdv.getAclUri(), rdvConfigAdv.getUseOnlySeeds(), group, serviceName);
-            } else {
-                uriSeedingManager = new URISeedingManager(rdvConfigAdv.getAclUri(), rdvConfigAdv.getUseOnlySeeds(), group, serviceName);
-            }
-            
-            for (URI aSeeder : Arrays.asList(rdvConfigAdv.getSeedingURIs())) {
-                uriSeedingManager.addSeedingURI(aSeeder);
-            }
-            
-            for (URI aSeed : Arrays.asList(rdvConfigAdv.getSeedRendezvous())) {
-                uriSeedingManager.addSeed(aSeed);
-            }
-            
-            this.seedingManager = uriSeedingManager;
-        } else {
-            this.seedingManager = new PeerviewSeedingManager(rdvConfigAdv.getAclUri(), group, group.getParentGroup(), serviceName);
-        }
-        
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("RendezVous Service is initialized for " + group.getPeerGroupID() + " as an Edge peer.");
-        }
-    }
-    
-    /**
-     * Listener for
-     * <p/>
-     * &lt;assignedID>
-     */
-    private class StdRdvEdgeProtocolListener implements StdRendezVousService.StdRdvProtocolListener {
-        
-        /**
-         * {@inheritDoc}
-         */
-        public void processIncomingMessage(Message msg, EndpointAddress srcAddr, EndpointAddress dstAddr) {
-            
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("[" + group.getPeerGroupID() + "] processing " + msg);
-            }
-            
-            if ((msg.getMessageElement(RendezVousServiceProvider.RDV_MSG_NAMESPACE_NAME, ConnectedPeerReply) != null)
-                    || (msg.getMessageElement(RendezVousServiceProvider.RDV_MSG_NAMESPACE_NAME, ConnectedRdvAdvReply) != null)) {
-                processConnectedReply(msg);
-            }
-            
-            if (msg.getMessageElement(RendezVousServiceProvider.RDV_MSG_NAMESPACE_NAME, DisconnectRequest) != null) {
-                processDisconnectRequest(msg);
-            }
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected int startApp(String[] arg) {
-        
-        super.startApp(arg, new StdRdvEdgeProtocolListener());
-        
-        // The other services may not be fully functional but they're there
-        // so we can start our subsystems.
-        // As for us, it does not matter if our methods are called between init
-        // and startApp().
-        
-        if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-            rendezvousMeter.startEdge();
-        }
-        
-        rdvService.generateEvent(RendezvousEvent.BECAMEEDGE, group.getPeerID());
-        
-        timer.schedule(new MonitorTask(), 0, MONITOR_INTERVAL);
-        
-        return Module.START_OK;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized void stopApp() {
-        
-        if (closed) {
-            return;
-        }
-        
-        closed = true;
-        
-        seedingManager.stop();
-        
-        disconnectFromAllRendezVous();
-        
-        super.stopApp();
-        
-        if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-            rendezvousMeter.stopEdge();
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Vector<ID> getConnectedPeerIDs() {
-        return new Vector<ID>(rendezVous.keySet());
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean isConnectedToRendezVous() {
-        return !rendezVous.isEmpty();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void connectToRendezVous(EndpointAddress addr, Object hint) {
-        if (seedingManager instanceof URISeedingManager) {
-            URISeedingManager uriseed = (URISeedingManager) seedingManager;
-            
-            if (hint instanceof RouteAdvertisement) {
-                uriseed.addSeed((RouteAdvertisement) hint);
-            } else {
-                uriseed.addSeed(addr.toURI());
-            }
-        } else if (seedingManager instanceof PeerviewSeedingManager) {
-            PeerviewSeedingManager pvseed = (PeerviewSeedingManager) seedingManager;
-            
-            if (hint instanceof RouteAdvertisement) {
-                pvseed.addSeed((RouteAdvertisement) hint);
-            }
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void challengeRendezVous(ID peerid, long delay) {
-        
-        // If immediate failure is requested, just do it.
-        // {@code disconnectFromRendezVous()} will at least get the peer
-        // removed from the peerView, even if it is not currently a rendezvous
-        // of ours. That permits to purge from the peerview rdvs that we try
-        // and fail to connect to, faster than the background keep alive done
-        // by PeerView itself.
-        if (delay <= 0) {
-            removeRdv(peerid, false);
-            return;
-        }
-        
-        RdvConnection pConn = rendezVous.get(peerid);
-        
-        if (null != pConn) {
-            long adjusted_delay = Math.max(0, Math.min(TimeUtils.toRelativeTimeMillis(pConn.getLeaseEnd()), delay));
-            
-            pConn.setLease(adjusted_delay, adjusted_delay);
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void disconnectFromRendezVous(ID peerId) {
-        removeRdv(peerId, false);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void propagate(Message msg, String serviceName, String serviceParam, int initialTTL) throws IOException {
-        msg = msg.clone();
-        int useTTL = Math.min(initialTTL, MAX_TTL);
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Propagating " + msg + "(TTL=" + useTTL + ") to :" + "\n\tsvc name:" + serviceName + "\tsvc params:"+ serviceParam);
-        }
-        
-        RendezVousPropagateMessage propHdr = updatePropHeader(msg, getPropHeader(msg), serviceName, serviceParam, useTTL);
-        
-        if (null != propHdr) {
-            sendToEachConnection(msg, propHdr);
-            sendToNetwork(msg, propHdr);
-            
-            if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-                rendezvousMeter.propagateToGroup();
-            }
-        } else {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Declining to propagate " + msg + " (No prop header)");
-            }
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void propagateInGroup(Message msg, String serviceName, String serviceParam, int initialTTL) throws IOException {
-        msg = msg.clone();
-        int useTTL = Math.min(initialTTL, MAX_TTL);
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Propagating " + msg + "(TTL=" + useTTL + ") in group to :" + "\n\tsvc name:" + serviceName + "\tsvc params:"
-                    + serviceParam);
-        }
-        
-        RendezVousPropagateMessage propHdr = updatePropHeader(msg, getPropHeader(msg), serviceName, serviceParam, useTTL);
-        
-        if (null != propHdr) {
-            sendToEachConnection(msg, propHdr);
-            
-            if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-                rendezvousMeter.propagateToGroup();
-            }
-        } else {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Declining to propagate " + msg + " (No prop header)");
-            }
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void walk(Message msg, String serviceName, String serviceParam, int initialTTL) throws IOException {
-        
-        propagateInGroup(msg, serviceName, serviceParam, initialTTL);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void walk(Vector<? extends ID> destPeerIDs, Message msg, String serviceName, String serviceParam, int initialTTL) throws IOException {
-        
-        propagate(destPeerIDs.elements(), msg, serviceName, serviceParam, initialTTL);
-    }
-    
-    /**
-     * @inheritDoc
-     */
-    @Override
-    public PeerConnection getPeerConnection(ID peer) {
-        return rendezVous.get(peer);
-    }
-    
-    /**
-     * @inheritDoc
-     */
-    @Override
-    protected PeerConnection[] getPeerConnections() {
-        return rendezVous.values().toArray(new PeerConnection[0]);
-    }
-    
-    private void disconnectFromAllRendezVous() {
-        
-        for (RdvConnection pConn : new ArrayList<RdvConnection>(rendezVous.values())) {
-            try {
-                disconnectFromRendezVous(pConn.getPeerID());
-            } catch (Exception failed) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "disconnectFromRendezVous failed for " + pConn, failed);
-                }
-            }
-        }
-    }
-    
-    /**
-     * Handle a disconnection request from a remote peer.
-     *
-     * @param msg Description of Parameter
-     */
-    private void processDisconnectRequest(Message msg) {
-        
-        try {
-            MessageElement elem = msg.getMessageElement(RendezVousServiceProvider.RDV_MSG_NAMESPACE_NAME, DisconnectRequest);
-            
-            if (null != elem) {
-                XMLDocument asDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(elem);
-                
-                PeerAdvertisement adv = (PeerAdvertisement) AdvertisementFactory.newAdvertisement(asDoc);
-                
-                RdvConnection rdvConnection = rendezVous.get(adv.getPeerID());
-                
-                if (null != rdvConnection) {
-                    rdvConnection.setConnected(false);
-                    removeRdv(adv.getPeerID(), true);
-                } else {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Ignoring disconnect request from " + adv.getPeerID());
-                    }
-                }
-            }
-        } catch (Exception failure) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failure processing disconnect request", failure);
-            }
-        }
-    }
-    
-    /**
-     * Add a rendezvous to our collection of rendezvous peers.
-     *
-     * @param padv  PeerAdvertisement for the rendezvous peer.
-     * @param lease The duration of the lease in relative milliseconds.
-     */
-    private void addRdv(PeerAdvertisement padv, long lease) {
-        
-        int eventType;
-        
-        RdvConnection rdvConnection;
-        
-        synchronized (rendezVous) {
-            rdvConnection = rendezVous.get(padv.getPeerID());
-            
-            if (null == rdvConnection) {
-                rdvConnection = new RdvConnection(group, rdvService, padv.getPeerID());
-                rendezVous.put(padv.getPeerID(), rdvConnection);
-                eventType = RendezvousEvent.RDVCONNECT;
-            } else {
-                eventType = RendezvousEvent.RDVRECONNECT;
-            }
-        }
-        
-        // Check if the peer is already registered.
-        if (RendezvousEvent.RDVRECONNECT == eventType) {
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("Renewed RDV lease from " + rdvConnection);
-            }
-            
-            // Already connected, just upgrade the lease
-            
-            if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousServiceMonitor != null)) {
-                RendezvousConnectionMeter rendezvousConnectionMeter = rendezvousServiceMonitor.getRendezvousConnectionMeter(
-                        padv.getPeerID());
-                
-                rendezvousConnectionMeter.leaseRenewed(lease);
-            }
-        } else {
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("New RDV lease from " + rdvConnection);
-            }
-            
-            if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousServiceMonitor != null)) {
-                RendezvousConnectionMeter rendezvousConnectionMeter = rendezvousServiceMonitor.getRendezvousConnectionMeter(
-                        padv.getPeerID());
-                
-                rendezvousConnectionMeter.connectionEstablished(lease);
-            }
-        }
-        
-        rdvConnection.connect(padv, lease, Math.min(LEASE_MARGIN, (lease / 2)));
-        
-        rdvService.generateEvent(eventType, padv.getPeerID());
-    }
-    
-    /**
-     * Remove the specified rendezvous from our collection of rendezvous.
-     *
-     * @param rdvid the id of the rendezvous to remove.
-     * @param requested if true, indicates a requested operation
-     */
-    private void removeRdv(ID rdvid, boolean requested) {
-        
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Disconnect from RDV " + rdvid);
-        }
-        
-        PeerConnection rdvConnection;
-        
-        synchronized (this) {
-            rdvConnection = rendezVous.remove(rdvid);
-        }
-        
-        if (null != rdvConnection) {
-            if (rdvConnection.isConnected()) {
-                rdvConnection.setConnected(false);
-                sendDisconnect(rdvConnection);
-            }
-        }
-        
-        rdvService.generateEvent(requested ? RendezvousEvent.RDVDISCONNECT : RendezvousEvent.RDVFAILED, rdvid);
-        
-        if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousServiceMonitor != null)) {
-            RendezvousConnectionMeter rendezvousConnectionMeter = rendezvousServiceMonitor.getRendezvousConnectionMeter(
-                    (PeerID) rdvid);
-            
-            rendezvousConnectionMeter.connectionDisconnected();
-        }
-    }
-    
-    /**
-     *  Send lease request to the specified peer.
-     *
-     *  @param pConn The peer to which the message should be sent.
-     *  @throws IOException Thrown for errors sending the lease request.
-     */
-    private void sendLeaseRequest(RdvConnection pConn) throws IOException {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Sending Lease request to " + pConn);
-        }
-        
-        RendezvousConnectionMeter rendezvousConnectionMeter = null;
-        
-        if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousServiceMonitor != null)) {
-            rendezvousConnectionMeter = rendezvousServiceMonitor.getRendezvousConnectionMeter(pConn.getPeerID().toString());
-        }
-        
-        Message msg = new Message();
-        
-        // The request simply includes the local peer advertisement.
-        msg.replaceMessageElement(RendezVousServiceProvider.RDV_MSG_NAMESPACE_NAME
-                ,
-                new TextDocumentMessageElement(ConnectRequest, getPeerAdvertisementDoc(), null));
-        
-        pConn.sendMessage(msg, pName, pParam);
-        
-        if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousConnectionMeter != null)) {
-            rendezvousConnectionMeter.beginConnection();
-        }
-    }
-    
-    /**
-     * Description of the Method
-     *
-     * @param msg Description of Parameter
-     */
-    private void processConnectedReply(Message msg) {
-        
-        // get the Peer Advertisement of the RDV.
-        MessageElement peerElem = msg.getMessageElement(RendezVousServiceProvider.RDV_MSG_NAMESPACE_NAME, ConnectedRdvAdvReply);
-        
-        if (null == peerElem) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Missing rendezvous peer advertisement");
-            }
-            
-            return;
-        }
-        
-        long lease;
-        
-        try {
-            MessageElement el = msg.getMessageElement(RendezVousServiceProvider.RDV_MSG_NAMESPACE_NAME, ConnectedLeaseReply);
-            
-            if (el == null) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("missing lease");
-                }
-                return;
-            }
-            lease = Long.parseLong(el.toString());
-        } catch (Exception e) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.log(Level.FINE, "Parse lease failed with ", e);
-            }
-            return;
-        }
-        
-        ID pId;
-        MessageElement el = msg.getMessageElement(RendezVousServiceProvider.RDV_MSG_NAMESPACE_NAME, ConnectedPeerReply);
-        
-        if (el == null) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("missing rdv peer");
-            }
-            return;
-        }
-        
-        try {
-            pId = IDFactory.fromURI(new URI(el.toString()));
-        } catch (URISyntaxException badID) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Bad RDV peer ID");
-            }
-            return;
-        }
-        
-        if (lease <= 0) {
-            removeRdv(pId, false);
-        } else {
-            if (rendezVous.containsKey(pId) || (rendezVous.size() < MAX_RDV_CONNECTIONS)) {
-                PeerAdvertisement padv = null;
-                
-                try {
-                    XMLDocument asDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(peerElem);
-                    
-                    padv = (PeerAdvertisement) AdvertisementFactory.newAdvertisement(asDoc);
-                } catch (Exception failed) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Failed processing peer advertisement");
-                    }
-                }
-                
-                if (null == padv) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Missing rendezvous peer advertisement");
-                    }
-                    return;
-                }
-                
-                if (!seedingManager.isAcceptablePeer(padv)) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Rejecting lease offer from unacceptable peer : " + padv.getPeerID());
-                    }
-                    
-                    // XXX bondolo 20061123 perhaps we should send a disconnect here.
-                    
-                    return;
-                }
-                
-                addRdv(padv, lease);
-                
-                try {
-                    DiscoveryService discovery = group.getDiscoveryService();
-                    
-                    if (null != discovery) {
-                        // This is not our own peer adv so we choose not to share it and keep it for only a short time.
-                        discovery.publish(padv, lease * 2, 0);
-                    }
-                } catch (IOException e) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.log(Level.FINE, "failed to publish Rendezvous Advertisement", e);
-                    }
-                }
-                
-                String rdvName = padv.getName();
-                
-                if (null == padv.getName()) {
-                    rdvName = pId.toString();
-                }
-                
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("RDV Connect Response : peer=" + rdvName + " lease=" + lease + "ms");
-                }
-            } else {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Ignoring lease offer from " + pId);
-                }
-                // XXX bondolo 20040423 perhaps we should send a disconnect here.
-            }
-        }
-    }
-    
-    /**
-     * A timer task for monitoring our active rendezvous connections.
-     * <p/>
-     * Checks leases, initiates lease renewals, starts new lease requests.
-     */
-    private class MonitorTask extends TimerTask {
-        
-        /**
-         * @inheritDoc
-         */
-        @Override
-        public void run() {
-            try {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("[" + group + "] Periodic rendezvous check");
-                }
-                
-                if (closed) {
-                    return;
-                }
-                
-                if (!PeerGroupID.worldPeerGroupID.equals(group.getPeerGroupID())) {
-                    MessageTransport router = rdvService.endpoint.getMessageTransport("jxta");
-                    
-                    if (null == router) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.warning("Rendezvous connection stalled until router is started!");
-                        }
-                        
-                        // Reschedule another run very soon.
-                        timer.schedule(new MonitorTask(), 2 * TimeUtils.ASECOND);
-                        return;
-                    }
-                }
-                
-                List<RdvConnection> currentRdvs = new ArrayList<RdvConnection>(rendezVous.values());
-                
-                for (RdvConnection pConn : currentRdvs) {
-                    try {
-                        if (!pConn.isConnected()) {
-                            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                                LOG.fine("[" + group.getPeerGroupID() + "] Lease expired. Disconnected from " + pConn);
-                            }
-                            removeRdv(pConn.getPeerID(), false);
-                            continue;
-                        }
-                        
-                        if (TimeUtils.toRelativeTimeMillis(pConn.getRenewal()) <= 0) {
-                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                LOG.fine("[" + group.getPeerGroupID() + "] Attempting lease renewal for " + pConn);
-                            }
-                            
-                            sendLeaseRequest(pConn);
-                        }
-                    } catch (Exception e) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.log(Level.WARNING, "[" + group.getPeerGroupID() + "] Failure while checking " + pConn, e);
-                        }
-                    }
-                }
-                
-                // Not enough Rdvs? Try finding more.
-                if (rendezVous.size() < MAX_RDV_CONNECTIONS) {
-                    if (seeds.isEmpty()) {                       
-                        seeds.addAll(Arrays.asList(EdgePeerRdvService.this.seedingManager.getActiveSeedRoutes()));
-                    }
-                    
-                    int sentLeaseRequests = 0;
-                    
-                    while (!seeds.isEmpty() && (sentLeaseRequests < 3)) {
-                        RouteAdvertisement aSeed = seeds.remove(0);
-                        
-                        Message msg = new Message();
-                        
-                        // The lease request simply includes the local peer advertisement.
-                        msg.addMessageElement(RendezVousServiceProvider.RDV_MSG_NAMESPACE_NAME
-                                ,
-                                new TextDocumentMessageElement(ConnectRequest, getPeerAdvertisementDoc(), null));
-                        
-                        Messenger msgr = null;
-                        
-                        if (null == aSeed.getDestPeerID()) {
-                            // It is an incomplete route advertisement. We are going to assume that it is only a wrapper for a single ea.
-                            List<String> seed_eas = aSeed.getDest().getVectorEndpointAddresses();
-                            
-                            if (!seed_eas.isEmpty()) {
-                                EndpointAddress aSeedHost = new EndpointAddress(seed_eas.get(0));
-                                
-                                msgr = rdvService.endpoint.getMessengerImmediate(aSeedHost, null);
-                            }
-                        } else {
-                            // We have a full route, send it to the virtual address of the route!
-                            EndpointAddress aSeedHost = new EndpointAddress(aSeed.getDestPeerID(), null, null);
-                            
-                            msgr = rdvService.endpoint.getMessengerImmediate(aSeedHost, aSeed);
-                        }
-                        
-                        if (null != msgr) {
-                            try {
-                                msgr.sendMessageN(msg, pName, pParam);
-                                sentLeaseRequests++;
-                            } catch (Exception failed) {
-                                // ignored
-                                ;
-                            }
-                        }
-                    }
-                } else {
-                    // We don't need any of the current seeds. Get new ones when we need them.
-                    seeds.clear();
-                }
-            } catch (Throwable t) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Uncaught throwable in thread :" + Thread.currentThread().getName(), t);
-                }
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/edge/RdvConnection.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/edge/RdvConnection.java
deleted file mode 100644 (file)
index 62b3cba..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous.edge;
-
-import net.jxta.id.ID;
-import net.jxta.impl.rendezvous.PeerConnection;
-import net.jxta.impl.rendezvous.RendezVousServiceImpl;
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.protocol.PeerAdvertisement;
-
-import java.util.logging.Level;
-
-import net.jxta.logging.Logging;
-
-import java.util.logging.Logger;
-
-/**
- * Manages a connection with a client or a rendezvous peer.
- */
-public class RdvConnection extends PeerConnection {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(RdvConnection.class.getName());
-
-    protected long leasedTil;
-    protected long beginRenewalAt;
-
-    protected PeerAdvertisement cachedPeerAdvertisement = null;
-    protected int cachedModCount = -1;
-
-    /**
-     * Constructor for the PeerConnection object
-     *
-     * @param group      group context
-     * @param rdvService the rendezvous service to use for sending messages.
-     * @param peer       destination peerid
-     */
-    public RdvConnection(PeerGroup group, RendezVousServiceImpl rdvService, ID peer) {
-        super(group, rdvService.endpoint, peer);
-
-        cachedPeerAdvertisement = group.getPeerAdvertisement();
-        cachedModCount = cachedPeerAdvertisement.getModCount();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String toString() {
-        return super.toString() + " / " + Long.toString(TimeUtils.toRelativeTimeMillis(beginRenewalAt));
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected void setLease(long leaseDuration) {
-        setLease(leaseDuration, 0);
-    }
-
-    /**
-     * Set the lease duration in relative milliseconds.
-     *
-     * @param leaseDuration the lease duration in relative milliseconds.
-     * @param earlyRenewal  amount of time in relative milliseconds before lease end to begin renewal
-     */
-    public void setLease(long leaseDuration, long earlyRenewal) {
-
-        if (leaseDuration < earlyRenewal) {
-            throw new IllegalArgumentException("Renewal scheduled before begining of lease");
-        }
-
-        super.setLease(leaseDuration);
-        beginRenewalAt = TimeUtils.toAbsoluteTimeMillis(leaseDuration - earlyRenewal);
-    }
-
-    /**
-     * Declare that we are connected.
-     *
-     * @param padv          the node advertisement
-     * @param leaseDuration lease duration in milliseconds
-     * @param earlyRenewal  early renwal in milliseconds
-     */
-    public void connect(PeerAdvertisement padv, long leaseDuration, long earlyRenewal) {
-        super.connect(leaseDuration);
-
-        setLease(leaseDuration, earlyRenewal);
-
-        // We will almost certainly need a messenger soon. Get it now.
-        getCachedMessenger(padv);
-    }
-
-    /**
-     * Time at which the lease needs renewal in absolute milliseconds.
-     *
-     * @return The lease value
-     */
-    public long getRenewal() {
-        return beginRenewalAt;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/limited/LimitedRangeGreeter.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/limited/LimitedRangeGreeter.java
deleted file mode 100644 (file)
index ebfc19e..0000000
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous.limited;
-
-import java.io.IOException;
-
-import java.util.logging.Level;
-
-import net.jxta.logging.Logging;
-
-import java.util.logging.Logger;
-
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointListener;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.Message;
-
-import net.jxta.impl.protocol.LimitedRangeRdvMsg;
-import net.jxta.impl.rendezvous.RdvGreeter;
-import net.jxta.impl.rendezvous.rpv.PeerViewElement;
-
-/**
- * The limited range rendezvous peer greeter.
- *
- * @see net.jxta.impl.rendezvous.RdvGreeter
- * @see net.jxta.impl.rendezvous.RdvWalk
- * @see net.jxta.impl.rendezvous.RdvWalker
- * @see net.jxta.impl.protocol.LimitedRangeRdvMsg
- */
-public class LimitedRangeGreeter implements EndpointListener, RdvGreeter {
-
-    /**
-     * Logger
-     */
-    private static final Logger LOG = Logger.getLogger(LimitedRangeGreeter.class.getName());
-
-    /**
-     * The walk we are associated with.
-     */
-    private final LimitedRangeWalk walk;
-
-    /**
-     * XXX It would be nice to avoid making another link to the endpoint.
-     */
-    private final EndpointService endpoint;
-
-    /**
-     * Constructor
-     *
-     * @param walk The walk we will be associated with.
-     */
-    public LimitedRangeGreeter(LimitedRangeWalk walk) {
-        this.walk = walk;
-
-        this.endpoint = walk.getPeerGroup().getEndpointService();
-
-        if (!endpoint.addIncomingMessageListener(this, walk.getWalkServiceName(), walk.getWalkServiceParam())) {
-            throw new IllegalStateException("Could not register endpoint listener for greeter.");
-        }
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Listening on " + walk.getWalkServiceName() + "/" + walk.getWalkServiceParam());
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized void stop() {
-        endpoint.removeIncomingMessageListener(walk.getWalkServiceName(), walk.getWalkServiceParam());
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     *  Listens on "LR-Greeter"&lt;groupid>/&lt;walkSvc>&lt;walkParam>
-     * <p/>
-     * Currently, all this method has to do, is to invoke the upper layer.
-     */
-    public void processIncomingMessage(Message message, EndpointAddress srcAddr, EndpointAddress dstAddr) {
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Processing " + message + " from " + srcAddr);
-        }
-
-        LimitedRangeRdvMsg rdvMsg = LimitedRangeWalk.getRdvMessage(message);
-
-        // Check and update the Limited Range Rdv Message
-        if (null == rdvMsg) {
-            // Message is invalid, drop it
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Limited Range Greeter received invalid " + message + ". Dropping it.");
-            }
-            return;
-        }
-
-        if (rdvMsg.getTTL() <= 0) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("No TTL remaining for " + message + ". Dropping it.");
-            }
-            return;
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Limited Range Greeter calling listener");
-        }
-
-        try {
-            walk.getListener().processIncomingMessage(message, srcAddr, dstAddr);
-        } catch (Throwable ignored) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Uncaught Throwable in listener (" + walk.getListener() + ")", ignored);
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void replyMessage(Message msg, Message reply) throws IOException {
-        LimitedRangeRdvMsg rdvMsg = LimitedRangeWalk.getRdvMessage(msg);
-
-        if (rdvMsg == null) {
-            // No RdvMessage. This message was not received by this Greeter.
-            throw new IOException("LimitedRangeWalker was not able to send message" + ": not from this greeter");
-        }
-
-        PeerViewElement pve = walk.getPeerView().getPeerViewElement(rdvMsg.getSrcPeerID());
-
-        if (null == pve) {
-            throw new IOException("LimitedRangeWalker was not able to send message" + ": no pve");
-        }
-
-        if (!pve.sendMessage(msg, rdvMsg.getSrcSvcName(), rdvMsg.getSrcSvcParams())) {
-            throw new IOException("LimitedRangeWalker was not able to send message" + ": send failed");
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/limited/LimitedRangeWalk.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/limited/LimitedRangeWalk.java
deleted file mode 100644 (file)
index 8404161..0000000
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous.limited;
-
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.XMLDocument;
-import net.jxta.endpoint.EndpointListener;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.peergroup.PeerGroup;
-
-import net.jxta.impl.protocol.LimitedRangeRdvMsg;
-import net.jxta.impl.rendezvous.RdvWalk;
-import net.jxta.impl.rendezvous.rpv.PeerView;
-
-/**
- * This class is the Limited Walk Policy.
- *
- * @see net.jxta.impl.rendezvous.limited.LimitedRangeWalker
- * @see net.jxta.impl.rendezvous.limited.LimitedRangeGreeter
- */
-public class LimitedRangeWalk extends RdvWalk {
-
-    /**
-     * The prefix we will use for service name we use for messaging.
-     */
-    public static final String SERVICENAME = "LR-Greeter";
-
-    /**
-     * The name of the message element in which we will store our information.
-     */
-
-    public static final String ELEMENTNAME = "LimitedRangeRdvMessage";
-
-    /**
-     * The PeerView we walk.
-     */
-    private final PeerView rpv;
-
-    /**
-     * The service name for listener of this walk. All walkers in the same
-     * peer group have the same service name.
-     */
-    private final String walkSvcName;
-
-    /**
-     * The service param for listener of this walk. The walker param is
-     * composed of the walk service name concated with the walk service param.
-     */
-    private final String walkSvcParam;
-
-    /**
-     * Our walker (sender)
-     */
-    private LimitedRangeWalker walker = null;
-
-    /**
-     * Our greeter (listener)
-     */
-    private LimitedRangeGreeter greeter = null;
-
-    /**
-     * Returns the parsed LimitedRangeRdvMsg from the provided message or
-     * {@code null} if the message did not contain an appropriate element or
-     * the element couldn't be parsed.
-     *
-     * @param msg the Message which must contain the LimitedRangeRdvMsg.
-     * @return The LimitedRangeRdvMsg from the message or {@code null}.
-     */
-    static LimitedRangeRdvMsg getRdvMessage(Message msg) {
-        MessageElement el = msg.getMessageElement("jxta", ELEMENTNAME);
-
-        if (el == null) {
-            // The sender did not use this protocol
-            return null;
-        }
-
-        try {
-            XMLDocument asDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(el);
-
-            return new LimitedRangeRdvMsg(asDoc);
-        } catch (Exception ez) {
-            return null;
-        }
-    }
-
-    /**
-     * Standard constructor
-     *
-     * @param group           Peergroup in which this walk is running.
-     * @param listener        Intended recipient of messages received as part of this walk.
-     * @param srcServiceName  Service name used by the client of this walk.
-     * @param srcServiceParam Optional service parameter used by the client of this walk.
-     * @param rpv             the rendezvous peer PeerView to be used by this walk.
-     */
-    public LimitedRangeWalk(PeerGroup group, EndpointListener listener, String srcServiceName, String srcServiceParam, PeerView rpv) {
-        super(group, listener, srcServiceName, srcServiceParam);
-
-        this.rpv = rpv;
-
-        this.walkSvcName = SERVICENAME + group.getPeerGroupID().toString();
-        this.walkSvcParam = srcServiceName + srcServiceParam;
-
-        this.walker = new LimitedRangeWalker(this);
-        this.greeter = new LimitedRangeGreeter(this);
-    }
-
-    /**
-     * Return the Rendezvous peer PeerView used by this walk.
-     *
-     * @return The rendezvous peer PeerView used by this walk.
-     */
-    PeerView getPeerView() {
-        return rpv;
-    }
-
-    /**
-     * Return the Service Name used by listener of this walk.
-     *
-     * @return the Service Name used by listener of this walk.
-     */
-    String getWalkServiceName() {
-        return walkSvcName;
-    }
-
-    /**
-     * Return the Service Param used by listener of this walk.
-     *
-     * @return the Service Param used by listener of this walk.
-     */
-    String getWalkServiceParam() {
-        return walkSvcParam;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public LimitedRangeWalker getWalker() {
-        return this.walker;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public LimitedRangeGreeter getGreeter() {
-        return this.greeter;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized void stop() {
-        if (walker != null) {
-            walker.stop();
-            walker = null;
-        }
-
-        if (greeter != null) {
-            greeter.stop();
-            greeter = null;
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/limited/LimitedRangeWalker.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/limited/LimitedRangeWalker.java
deleted file mode 100644 (file)
index 7a7abe7..0000000
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous.limited;
-
-import java.io.IOException;
-
-import java.util.logging.Level;
-
-import net.jxta.logging.Logging;
-
-import java.util.logging.Logger;
-
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.XMLDocument;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.TextDocumentMessageElement;
-import net.jxta.peer.PeerID;
-
-import net.jxta.impl.protocol.LimitedRangeRdvMsg;
-import net.jxta.impl.rendezvous.RdvWalker;
-import net.jxta.impl.rendezvous.rpv.PeerViewElement;
-
-/**
- * The Limited Range Walker is designed to be used by Rendezvous Peer in
- * order to propagate a message amongst them. A target destination peer
- * is used in order to send the message to a primary peer. Then, depending
- * on the TTL, the message is duplicated into two messages, each of them
- * being sent in opposite "directions" of the RPV.
- */
-public class LimitedRangeWalker implements RdvWalker {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(LimitedRangeWalker.class.getName());
-
-    /**
-     * The walk we are associated with.
-     */
-    private final LimitedRangeWalk walk;
-
-    /**
-     * Constructor
-     *
-     * @param walk The walk we will be associated with.
-     */
-    public LimitedRangeWalker(LimitedRangeWalk walk) {
-        this.walk = walk;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void stop() {
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Sends message on :
-     * <pre>
-     *  "LR-Greeter"&lt;groupid>/&lt;walkSvc>&lt;walkParam>
-     *  </pre>
-     * <p/>
-     * XXX bondolo 20060720 This method will currently fail to walk the
-     * message to the DOWN peer if there is a failure sending the message to
-     * the UP peer. Perhaps it would be better to ignore any errors from
-     * sending to either peer?
-     */
-    private void walkMessage(Message msg, LimitedRangeRdvMsg rdvMsg) throws IOException {
-
-        LimitedRangeRdvMsg.WalkDirection dir = rdvMsg.getDirection();
-
-        if ((dir == LimitedRangeRdvMsg.WalkDirection.BOTH) || (dir == LimitedRangeRdvMsg.WalkDirection.UP)) {
-            PeerViewElement upPeer = walk.getPeerView().getUpPeer();
-
-            if ((upPeer != null) && upPeer.isAlive()) {
-                Message newMsg = msg.clone();
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Walking " + newMsg + " [UP] to " + upPeer);
-                }
-
-                rdvMsg.setDirection(LimitedRangeRdvMsg.WalkDirection.UP);
-
-                updateRdvMessage(newMsg, rdvMsg);
-                upPeer.sendMessage(newMsg, walk.getWalkServiceName(), walk.getWalkServiceParam());
-            }
-        }
-
-        if ((dir == LimitedRangeRdvMsg.WalkDirection.BOTH) || (dir == LimitedRangeRdvMsg.WalkDirection.DOWN)) {
-            PeerViewElement downPeer = walk.getPeerView().getDownPeer();
-
-            if ((downPeer != null) && downPeer.isAlive()) {
-                Message newMsg = msg.clone();
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Walking " + newMsg + " [DOWN] to " + downPeer);
-                }
-
-                rdvMsg.setDirection(LimitedRangeRdvMsg.WalkDirection.DOWN);
-
-                updateRdvMessage(newMsg, rdvMsg);
-                downPeer.sendMessage(newMsg, walk.getWalkServiceName(), walk.getWalkServiceParam());
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void walkMessage(PeerID destination, Message msg, String srcSvcName, String srcSvcParam, int ttl) throws IOException {
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Walking " + msg + " to " + srcSvcName + "/" + srcSvcParam);
-        }
-
-        // Check if there is already a Rdv Message
-        LimitedRangeRdvMsg rdvMsg = LimitedRangeWalk.getRdvMessage(msg);
-
-        if (rdvMsg == null) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Creating new Walk Header for " + msg + " with TTL=" + ttl);
-            }
-
-            // Create a new one.
-            rdvMsg = new LimitedRangeRdvMsg();
-
-            rdvMsg.setTTL(Integer.MAX_VALUE); // will be reduced.
-            rdvMsg.setDirection(LimitedRangeRdvMsg.WalkDirection.BOTH);
-            rdvMsg.setSrcPeerID(walk.getPeerGroup().getPeerID());
-            rdvMsg.setSrcSvcName(srcSvcName);
-            rdvMsg.setSrcSvcParams(srcSvcParam);
-        } else {
-            // decrement TTL before walk.
-            rdvMsg.setTTL(rdvMsg.getTTL() - 1);
-        }
-
-        int useTTL = Math.min(ttl, rdvMsg.getTTL());
-
-        useTTL = Math.min(useTTL, walk.getPeerView().getView().size() + 1);
-
-        rdvMsg.setTTL(useTTL);
-
-        if (useTTL <= 0) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("LimitedRangeWalker was not able to send " + msg + " : No TTL remaining");
-            }
-
-            return;
-        }
-
-        // Forward the message according to the direction set in the Rdv Message.
-        if (null != destination) {
-            Message tmp = msg.clone();
-
-            updateRdvMessage(tmp, rdvMsg);
-            sendToPeer(destination, walk.getWalkServiceName(), walk.getWalkServiceParam(), tmp);
-        } else {
-            walkMessage(msg, rdvMsg);
-        }
-    }
-
-    /**
-     * Replace the old version of the rdvMsg
-     *
-     * @param msg    The message to be updated.
-     * @param rdvMsg The LimitedRangeRdvMsg which will update the message.
-     * @return the updated message
-     */
-    private Message updateRdvMessage(Message msg, LimitedRangeRdvMsg rdvMsg) {
-        XMLDocument asDoc = (XMLDocument) rdvMsg.getDocument(MimeMediaType.XMLUTF8);
-        MessageElement el = new TextDocumentMessageElement(LimitedRangeWalk.ELEMENTNAME, asDoc, null);
-
-        msg.replaceMessageElement("jxta", el);
-
-        return msg;
-    }
-
-    /**
-     * Sends the provided message to the specified peer. The peer must be a
-     * current member of the PeerView.
-     *
-     * @param dest     The destination peer.
-     * @param svcName  The destinations service.
-     * @param svcParam The destination service params.
-     * @param msg      The message to send.
-     * @throws IOException Thrown for problems sending the message.
-     */
-    private void sendToPeer(PeerID dest, String svcName, String svcParam, Message msg) throws IOException {
-        PeerViewElement pve = walk.getPeerView().getPeerViewElement(dest);
-
-        if (null == pve) {
-            throw new IOException("LimitedRangeWalker was not able to send " + msg + " : no pve");
-        }
-
-        if (!pve.sendMessage(msg, svcName, svcParam)) {
-            throw new IOException("LimitedRangeWalker was not able to send " + msg + " : send failed");
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/package.html
deleted file mode 100644 (file)
index 554fba6..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    A JXTA {@link net.jxta.rendezvous.RendezVousService} implementation which
-    implements the standard JXTA Rendezvous Protocol (RVP).
-
-    @see net.jxta.rendezvous.RendezVousService
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-rvp"
-target="_blank">JXTA Protocols Specification : Rendezvous Protocol</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rdv/ClientConnection.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rdv/ClientConnection.java
deleted file mode 100644 (file)
index 9893ec9..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous.rdv;
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-
-import net.jxta.logging.Logging;
-
-import net.jxta.id.ID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.protocol.PeerAdvertisement;
-
-import net.jxta.impl.rendezvous.PeerConnection;
-import net.jxta.impl.rendezvous.RendezVousServiceImpl;
-
-/**
- * Manages a connection with a client peer.
- */
-public class ClientConnection extends PeerConnection {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(ClientConnection.class.getName());
-
-    /**
-     * Constructor for the PeerConnection object
-     *
-     * @param group      The group context.
-     * @param rdvService The rendezvous service instance this connection is associated with.
-     * @param peer       The peer id of the connection.
-     */
-    public ClientConnection(PeerGroup group, RendezVousServiceImpl rdvService, ID peer) {
-        super(group, rdvService.endpoint, peer);
-    }
-
-    /**
-     * Declare that we are connected.
-     *
-     * @param padv          The peer advertisement of the peer.
-     * @param leaseDuration The duration of the lease which is offered to the client.
-     */
-    public void connect(PeerAdvertisement padv, long leaseDuration) {
-
-        super.connect(leaseDuration);
-
-        // We will almost certainly need a messenger soon. Get it now.
-        getCachedMessenger(padv);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rdv/RdvPeerRdvService.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rdv/RdvPeerRdvService.java
deleted file mode 100644 (file)
index bebb827..0000000
+++ /dev/null
@@ -1,869 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous.rdv;
-
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.XMLDocument;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointListener;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.StringMessageElement;
-import net.jxta.endpoint.TextDocumentMessageElement;
-import net.jxta.id.ID;
-import net.jxta.impl.protocol.RdvConfigAdv;
-import net.jxta.impl.rendezvous.PeerConnection;
-import net.jxta.impl.rendezvous.RdvWalk;
-import net.jxta.impl.rendezvous.RdvWalker;
-import net.jxta.impl.rendezvous.RendezVousPropagateMessage;
-import net.jxta.impl.rendezvous.RendezVousServiceImpl;
-import net.jxta.impl.rendezvous.StdRendezVousService;
-import net.jxta.impl.rendezvous.limited.LimitedRangeWalk;
-import net.jxta.impl.rendezvous.rendezvousMeter.ClientConnectionMeter;
-import net.jxta.impl.rendezvous.rendezvousMeter.RendezvousMeterBuildSettings;
-import net.jxta.impl.rendezvous.rpv.PeerView;
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.logging.Logging;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.platform.Module;
-import net.jxta.protocol.ConfigParams;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.rendezvous.RendezvousEvent;
-
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.TimerTask;
-import java.util.Vector;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * A JXTA {@link net.jxta.rendezvous.RendezVousService} implementation which
- * implements the rendezvous server portion of the standard JXTA Rendezvous
- * Protocol (RVP).
- *
- * @see net.jxta.rendezvous.RendezVousService
- * @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-rvp" target="_blank">JXTA Protocols Specification : Rendezvous Protocol</a>
- */
-public class RdvPeerRdvService extends StdRendezVousService {
-
-    /**
-     * Logger
-     */
-    private final static Logger LOG = Logger.getLogger(RdvPeerRdvService.class.getName());
-
-    public static final String RDV_WALK_SVC_NAME = "RdvWalkSvcName";
-    public static final String RDV_WALK_SVC_PARAM = "RdvWalkSvcParam";
-
-    public final static long GC_INTERVAL = 2 * TimeUtils.AMINUTE;
-    public final static long DEFAULT_LEASE_DURATION = 20L * TimeUtils.AMINUTE;
-    public final static int DEFAULT_MAX_CLIENTS = 200;
-
-    /**
-     * Duration of leases we offer measured in relative milliseconds.
-     */
-    private final long LEASE_DURATION;
-
-    /**
-     * The maximum number of simultaneous clients we will allow.
-     */
-    private final int MAX_CLIENTS;
-
-    /**
-     * The clients which currently have a lease with us.
-     */
-    private final Map<ID, ClientConnection> clients = Collections.synchronizedMap(new HashMap<ID, ClientConnection>());
-
-    private RdvWalk walk = null;
-    private RdvWalker walker = null;
-
-    /**
-     * The peer view for this rendezvous server.
-     */
-    public final PeerView rpv;
-
-    /**
-     * Constructor for the RdvPeerRdvService object
-     *
-     * @param group      the peer group
-     * @param rdvService the rendezvous service object
-     */
-    public RdvPeerRdvService(PeerGroup group, RendezVousServiceImpl rdvService) {
-
-        super(group, rdvService);
-
-        Advertisement adv = null;
-        ConfigParams confAdv = group.getConfigAdvertisement();
-
-        // Get the config. If we do not have a config, we're done; we just keep
-        // the defaults (edge peer/no auto-rdv)
-        if (confAdv != null) {
-            try {
-                XMLDocument configDoc = (XMLDocument) confAdv.getServiceParam(rdvService.getAssignedID());
-
-                if (null != configDoc) {
-                    adv = AdvertisementFactory.newAdvertisement(configDoc);
-                }
-            } catch (java.util.NoSuchElementException failed) {// ignored
-            }
-        }
-
-        RdvConfigAdv rdvConfigAdv;
-
-        if (!(adv instanceof RdvConfigAdv)) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Creating new RdvConfigAdv for defaults.");
-            }
-
-            rdvConfigAdv = (RdvConfigAdv) AdvertisementFactory.newAdvertisement(RdvConfigAdv.getAdvertisementType());
-        } else {
-            rdvConfigAdv = (RdvConfigAdv) adv;
-        }
-
-        if (rdvConfigAdv.getMaxTTL() > 0) {
-            MAX_TTL = rdvConfigAdv.getMaxTTL();
-        } else {
-            MAX_TTL = StdRendezVousService.DEFAULT_MAX_TTL;
-        }
-
-        if (rdvConfigAdv.getMaxClients() > 0) {
-            MAX_CLIENTS = rdvConfigAdv.getMaxClients();
-        } else {
-            MAX_CLIENTS = DEFAULT_MAX_CLIENTS;
-        }
-
-        if (rdvConfigAdv.getLeaseDuration() > 0) {
-            LEASE_DURATION = rdvConfigAdv.getLeaseDuration();
-        } else {
-            LEASE_DURATION = DEFAULT_LEASE_DURATION;
-        }
-
-        // Update the peeradv with that information:
-        // XXX 20050409 bondolo How does this interact with auto-rdv?
-        try {
-            XMLDocument params = (XMLDocument)
-                    StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "Parm");
-            Element e = params.createElement("Rdv", Boolean.TRUE.toString());
-
-            params.appendChild(e);
-            group.getPeerAdvertisement().putServiceParam(rdvService.getAssignedID(), params);
-        } catch (Exception ohwell) {
-            // don't worry about it for now. It'll still work.
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed adding service params", ohwell);
-            }
-        }
-
-        PeerGroup advGroup = group.getParentGroup();
-
-        if ((null == advGroup) || PeerGroupID.worldPeerGroupID.equals(advGroup.getPeerGroupID())) {
-            // For historical reasons, we publish in our own group rather than
-            // the parent if our parent is the world group.
-            advGroup = null;
-        }
-
-        rpv = new PeerView(group, advGroup, rdvService,
-                rdvService.getAssignedID().toString() + group.getPeerGroupID().getUniqueValue().toString());
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("RendezVous Service is initialized for " + group.getPeerGroupID() + " as a Rendezvous peer.");
-        }
-    }
-
-    /**
-     * Listener for
-     * <p/>
-     * &lt;assignedID>/&lt;group-unique>
-     */
-    private class StdRdvRdvProtocolListener implements StdRendezVousService.StdRdvProtocolListener {
-
-        /**
-         * {@inheritDoc}
-         */
-        public void processIncomingMessage(Message msg, EndpointAddress srcAddr, EndpointAddress dstAddr) {
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("[" + group.getPeerGroupID() + "] processing " + msg);
-            }
-
-            if (msg.getMessageElement("jxta", ConnectRequest) != null) {
-                processLeaseRequest(msg);
-            }
-
-            if (msg.getMessageElement("jxta", DisconnectRequest) != null) {
-                processDisconnectRequest(msg);
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected int startApp(String[] argv) {
-
-        super.startApp(argv, new StdRdvRdvProtocolListener());
-
-        rpv.start();
-
-        // The other services may not be fully functional but they're there
-        // so we can start our subsystems.
-        // As for us, it does not matter if our methods are called between init
-        // and startApp().
-
-        // Start the Walk protcol. Create a LimitedRange Walk
-        walk = new LimitedRangeWalk(group, new WalkListener(), pName, pParam, rpv);
-
-        // We need to use a Walker in order to propagate the request
-        // when when have no answer.
-        walker = walk.getWalker();
-
-        timer.scheduleAtFixedRate(new GCTask(), GC_INTERVAL, GC_INTERVAL);
-
-        if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-            rendezvousMeter.startRendezvous();
-        }
-
-        rdvService.generateEvent(RendezvousEvent.BECAMERDV, group.getPeerID());
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("RdvPeerRdvService is started");
-        }
-
-        return Module.START_OK;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized void stopApp() {
-
-        if (closed) {
-            return;
-        }
-
-        closed = true;
-
-        walk.stop();
-        walk = null;
-
-        rpv.stop();
-
-        // Tell all our clientss that we are going down
-        disconnectAllClients();
-
-        clients.clear();
-
-        super.stopApp();
-
-        if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-            rendezvousMeter.stopRendezvous();
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void connectToRendezVous(EndpointAddress addr, Object hint) {
-        throw new UnsupportedOperationException("Not supported by rendezvous");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void challengeRendezVous(ID peer, long delay) {
-        throw new UnsupportedOperationException("Not supported by rendezvous");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void disconnectFromRendezVous(ID peerId) {
-
-        throw new UnsupportedOperationException("Not supported by rendezvous");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean isConnectedToRendezVous() {
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Vector<ID> getConnectedPeerIDs() {
-
-        Vector<ID> result = new Vector<ID>();
-        List allClients = Arrays.asList(clients.values().toArray());
-
-        for (Object allClient : allClients) {
-            PeerConnection aConnection = (PeerConnection) allClient;
-
-            if (aConnection.isConnected()) {
-                result.add(aConnection.getPeerID());
-            }
-        }
-        return result;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void propagate(Message msg, String serviceName, String serviceParam, int initialTTL) throws IOException {
-        if (closed) {
-            return;
-        }
-
-        msg = msg.clone();
-        int useTTL = Math.min(initialTTL, MAX_TTL);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Propagating " + msg + "(TTL=" + useTTL + ") to :" +
-                    "\n\tsvc name:" + serviceName + "\tsvc params:" + serviceParam);
-        }
-
-        RendezVousPropagateMessage propHdr = updatePropHeader(msg, getPropHeader(msg), serviceName, serviceParam, useTTL);
-
-        if (null != propHdr) {
-            walk(msg, PropSName, PropPName, useTTL);
-            // hamada: this is a very expensive operation and therefore not a supported operation
-            // sendToEachConnection(msg, propHdr);
-            sendToNetwork(msg, propHdr);
-
-            if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-                rendezvousMeter.propagateToGroup();
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void propagateInGroup(Message msg, String serviceName, String serviceParam, int initialTTL) throws IOException {
-        if (closed) {
-            return;
-        }
-
-        msg = msg.clone();
-        int useTTL = Math.min(initialTTL, MAX_TTL);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Propagating " + msg + "(TTL=" + useTTL + ") in group to :" +
-                    "\n\tsvc name:" + serviceName + "\tsvc params:" + serviceParam);
-        }
-
-        RendezVousPropagateMessage propHdr = updatePropHeader(msg, getPropHeader(msg), serviceName, serviceParam, useTTL);
-
-        if (null != propHdr) {
-            walk(msg, PropSName, PropPName, useTTL);
-            sendToEachConnection(msg, propHdr);
-
-            if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-                rendezvousMeter.propagateToGroup();
-            }
-        }
-    }
-
-    /**
-     * @inheritDoc
-     */
-    @Override
-    public PeerConnection getPeerConnection(ID peer) {
-        return clients.get(peer);
-    }
-
-    /**
-     * @inheritDoc
-     */
-    @Override
-    protected PeerConnection[] getPeerConnections() {
-        return clients.values().toArray(new PeerConnection[0]);
-    }
-
-    /**
-     * Add a client to our collection of clients.
-     *
-     * @param padv  The advertisement of the peer to be added.
-     * @param lease The lease duration in relative milliseconds.
-     * @return the ClientConnection
-     */
-    private ClientConnection addClient(PeerAdvertisement padv, long lease) {
-        ClientConnectionMeter clientConnectionMeter = null;
-
-        int eventType;
-        ClientConnection pConn;
-
-        synchronized (clients) {
-            pConn = clients.get(padv.getPeerID());
-
-            // Check if the peer is already registered.
-            if (null != pConn) {
-                eventType = RendezvousEvent.CLIENTRECONNECT;
-            } else {
-                eventType = RendezvousEvent.CLIENTCONNECT;
-                pConn = new ClientConnection(group, rdvService, padv.getPeerID());
-                clients.put(padv.getPeerID(), pConn);
-            }
-        }
-
-        if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousServiceMonitor != null)) {
-            clientConnectionMeter = rendezvousServiceMonitor.getClientConnectionMeter(padv.getPeerID());
-        }
-
-        if (RendezvousEvent.CLIENTCONNECT == eventType) {
-            if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (clientConnectionMeter != null)) {
-                clientConnectionMeter.clientConnectionEstablished(lease);
-            }
-        } else {
-            if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (clientConnectionMeter != null)) {
-                clientConnectionMeter.clientLeaseRenewed(lease);
-            }
-        }
-
-        rdvService.generateEvent(eventType, padv.getPeerID());
-
-        pConn.connect(padv, lease);
-
-        return pConn;
-    }
-
-    /**
-     * Removes the specified client from the clients collections.
-     *
-     * @param pConn     The connection object to remove.
-     * @param requested If <code>true</code> then the disconnection was
-     *                  requested by the remote peer.
-     * @return the ClientConnection object of the client or <code>null</code>
-     *         if the client was not known.
-     */
-    private ClientConnection removeClient(PeerConnection pConn, boolean requested) {
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Disconnecting client " + pConn);
-        }
-
-        if (pConn.isConnected()) {
-            pConn.setConnected(false);
-            sendDisconnect(pConn);
-        }
-
-        rdvService.generateEvent(requested ? RendezvousEvent.CLIENTDISCONNECT : RendezvousEvent.CLIENTFAILED, pConn.getPeerID());
-
-        if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousServiceMonitor != null)) {
-            ClientConnectionMeter clientConnectionMeter = rendezvousServiceMonitor.getClientConnectionMeter(
-                    (PeerID) pConn.getPeerID());
-
-            clientConnectionMeter.clientConnectionDisconnected(requested);
-        }
-
-        return clients.remove(pConn.getPeerID());
-    }
-
-    private void disconnectAllClients() {
-        for (Object o : Arrays.asList(clients.values().toArray())) {
-            ClientConnection pConn = (ClientConnection) o;
-
-            try {
-                removeClient(pConn, false);
-            } catch (Exception ez1) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "disconnectClient failed for" + pConn, ez1);
-                }
-            }
-        }
-    }
-
-    /**
-     * Handle a disconnection request
-     *
-     * @param msg Message containing the disconnection request.
-     */
-    private void processDisconnectRequest(Message msg) {
-
-        PeerAdvertisement adv;
-
-        try {
-            MessageElement elem = msg.getMessageElement("jxta", DisconnectRequest);
-
-            XMLDocument asDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(elem);
-
-            adv = (PeerAdvertisement) AdvertisementFactory.newAdvertisement(asDoc);
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Could not process disconnect request", e);
-            }
-            return;
-        }
-
-        ClientConnection pConn = clients.get(adv.getPeerID());
-
-        if (null != pConn) {
-            pConn.setConnected(false); // Make sure we don't send a disconnect
-            removeClient(pConn, true);
-        }
-    }
-
-    /**
-     * Handles a lease request message
-     *
-     * @param msg Message containing the lease request
-     */
-    private void processLeaseRequest(Message msg) {
-
-        PeerAdvertisement padv;
-
-        try {
-            MessageElement elem = msg.getMessageElement("jxta", ConnectRequest);
-
-            XMLDocument asDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(elem);
-
-            padv = (PeerAdvertisement) AdvertisementFactory.newAdvertisement(asDoc);
-            msg.removeMessageElement(elem);
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Cannot retrieve advertisment from lease request", e);
-            }
-            return;
-        }
-
-        // Publish the client's peer advertisement
-        try {
-            // This is not our own peer adv so we must not keep it longer than
-            // its expiration time.
-            DiscoveryService discovery = group.getDiscoveryService();
-
-            if (null != discovery) {
-                discovery.publish(padv, LEASE_DURATION * 2, 0);
-            }
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Client peer advertisement publish failed", e);
-            }
-        }
-
-        long lease;
-
-        ClientConnection pConn = clients.get(padv.getPeerID());
-
-        if (null != pConn) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Renewing client lease to " + pConn);
-            }
-
-            lease = LEASE_DURATION;
-        } else {
-            if (clients.size() < MAX_CLIENTS) {
-                lease = LEASE_DURATION;
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Offering new client lease to " + padv.getName() + " [" + padv.getPeerID() + "]");
-                }
-            } else {
-                lease = 0;
-
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning(
-                            "Max clients exceeded, declining lease request from: " + padv.getName() + " [" + padv.getPeerID()
-                                    + "]");
-                }
-            }
-        }
-
-        if (lease > 0) {
-            pConn = addClient(padv, lease);
-
-            // FIXME 20041015 bondolo We're supposed to send a lease 0 if we can't accept new clients.
-            sendLease(pConn, lease);
-        }
-    }
-
-    /**
-     * Sends a Connected lease reply message to the specified peer
-     *
-     * @param pConn The client peer.
-     * @param lease lease duration.
-     * @return Description of the Returned Value
-     */
-    private boolean sendLease(ClientConnection pConn, long lease) {
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Sending lease (" + lease + ") to " + pConn.getPeerName());
-        }
-
-        Message msg = new Message();
-
-        msg.addMessageElement("jxta", new TextDocumentMessageElement(ConnectedRdvAdvReply, getPeerAdvertisementDoc(), null));
-
-        msg.addMessageElement("jxta", new StringMessageElement(ConnectedPeerReply, group.getPeerID().toString(), null));
-
-        msg.addMessageElement("jxta", new StringMessageElement(ConnectedLeaseReply, Long.toString(lease), null));
-
-        return pConn.sendMessage(msg, pName, pParam);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void walk(Message msg, String serviceName, String serviceParam, int initialTTL) throws IOException {
-        if (closed) {
-            return;
-        }
-
-        msg = msg.clone();
-        int useTTL = Math.min(initialTTL, MAX_TTL);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine(
-                    "Undirected walk of " + msg + "(TTL=" + useTTL + ") to :" + "\n\tsvc name:" + serviceName + "\tsvc params:"
-                            + serviceParam);
-        }
-
-        msg.replaceMessageElement("jxta", new StringMessageElement(RDV_WALK_SVC_NAME, serviceName, null));
-
-        msg.replaceMessageElement("jxta", new StringMessageElement(RDV_WALK_SVC_PARAM, serviceParam, null));
-
-        try {
-            walker.walkMessage(null, msg, pName, pParam, useTTL);
-
-            if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-                rendezvousMeter.walk();
-            }
-        } catch (IOException failure) {
-            if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-                rendezvousMeter.walkFailed();
-            }
-
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Cannot send message with Walker", failure);
-            }
-
-            throw failure;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void walk(Vector<? extends ID> destPeerIDs, Message msg, String serviceName, String serviceParam, int initialTTL) throws IOException {
-        if (closed) {
-            return;
-        }
-
-        msg = msg.clone();
-        int useTTL = Math.min(initialTTL, MAX_TTL);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine(
-                    "Directed walk of " + msg + "(TTL=" + useTTL + ") to :" + "\n\tsvc name:" + serviceName + "\tsvc params:"
-                            + serviceParam);
-        }
-
-        msg.replaceMessageElement("jxta", new StringMessageElement(RDV_WALK_SVC_NAME, serviceName, null));
-
-        msg.replaceMessageElement("jxta", new StringMessageElement(RDV_WALK_SVC_PARAM, serviceParam, null));
-
-        for (ID destPeerID : destPeerIDs) {
-            try {
-                walker.walkMessage((PeerID) destPeerID, msg.clone(), pName, pParam, useTTL);
-            } catch (IOException failed) {
-                if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-                    rendezvousMeter.walkToPeersFailed();
-                }
-
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Cannot send message with Walker to: " + destPeerID, failed);
-                }
-
-                IOException failure = new IOException("Cannot send message with Walker to: " + destPeerID);
-
-                failure.initCause(failed);
-
-                throw failure;
-            }
-        }
-        if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-            rendezvousMeter.walkToPeers(destPeerIDs.size());
-        }
-    }
-
-    /**
-     * Periodic cleanup task
-     */
-    private class GCTask extends TimerTask {
-
-        /**
-         * {@inheritDoc
-         */
-        @Override
-        public void run() {
-
-            try {
-                long gcStart = TimeUtils.timeNow();
-                int gcedClients = 0;
-
-                List allClients = Arrays.asList(clients.values().toArray());
-
-                for (Object allClient : allClients) {
-                    ClientConnection pConn = (ClientConnection) allClient;
-
-                    try {
-                        long now = TimeUtils.timeNow();
-
-                        if (!pConn.isConnected() || (pConn.getLeaseEnd() < now)) {
-                            // This client has dropped out or the lease is over.
-                            // remove it.
-
-                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                LOG.fine("GC CLIENT: dropping " + pConn);
-                            }
-
-                            pConn.setConnected(false);
-                            removeClient(pConn, false);
-                            gcedClients++;
-                        }
-                    } catch (Exception e) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.log(Level.WARNING, "GCTask failed for " + pConn, e);
-                        }
-                    }
-                }
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine(
-                            "Client GC " + gcedClients + " of " + allClients.size() + " clients completed in "
-                                    + TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), gcStart) + "ms.");
-                }
-            } catch (Throwable all) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Uncaught Throwable in thread :" + Thread.currentThread().getName(), all);
-                }
-            }
-        }
-    }
-
-
-    /**
-     * @inheritDoc
-     */
-    private class WalkListener implements EndpointListener {
-
-        /**
-         * {@inheritDoc}
-         */
-        public void processIncomingMessage(Message msg, EndpointAddress srcAddr, EndpointAddress dstAddr) {
-
-            MessageElement serviceME = msg.getMessageElement("jxta", RDV_WALK_SVC_NAME);
-
-            if (null == serviceME) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Discarding " + msg + " because its missing service name element");
-                }
-                return;
-            }
-
-            msg.removeMessageElement(serviceME);
-            String sName = serviceME.toString();
-
-            MessageElement paramME = msg.getMessageElement("jxta", RDV_WALK_SVC_PARAM);
-
-            String sParam;
-
-            if (null == paramME) {
-                sParam = null;
-            } else {
-                msg.removeMessageElement(paramME);
-                sParam = paramME.toString();
-            }
-
-            EndpointAddress realDest = new EndpointAddress(dstAddr, sName, sParam);
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(
-                        "Calling local listener for [" + realDest.getServiceName() + " / " + realDest.getServiceParameter()
-                                + "] with " + msg);
-            }
-
-            rdvService.endpoint.processIncomingMessage(msg, srcAddr, realDest);
-
-            if (RendezvousMeterBuildSettings.RENDEZVOUS_METERING && (rendezvousMeter != null)) {
-                rendezvousMeter.receivedMessageProcessedLocally();
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/ClientConnectionMeter.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/ClientConnectionMeter.java
deleted file mode 100644 (file)
index bb7d7de..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Micro//Systems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.rendezvous.rendezvousMeter;
-
-
-import net.jxta.peer.*;
-import net.jxta.endpoint.*;
-
-
-/**
- * The rendezvous's meter for a client peer interacting with a it
- **/
-public class ClientConnectionMeter {
-    private PeerID peerID;
-
-    private ClientConnectionMetric cumulativeMetrics;
-    private ClientConnectionMetric deltaMetrics;
-
-    private long transitionTime = 0;
-    private long lastLeaseRenewalTime = 0;
-
-    public ClientConnectionMeter(PeerID peerID) {
-        this.peerID = peerID;
-        cumulativeMetrics = new ClientConnectionMetric(peerID);
-    }
-
-    public ClientConnectionMetric getCumulativeMetrics() {
-        return cumulativeMetrics;
-    }
-       
-    public synchronized ClientConnectionMetric collectMetrics() {
-        ClientConnectionMetric prevDelta = deltaMetrics;
-
-        deltaMetrics = null;
-        return prevDelta;
-    }
-       
-    private void createDeltaMetric() {
-        deltaMetrics = new ClientConnectionMetric(cumulativeMetrics);
-    }
-
-    public void clientConnectionEstablished(long lease) {
-        transitionTime = System.currentTimeMillis();
-               
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.clientConnectionEstablished(transitionTime, lease);
-        cumulativeMetrics.clientConnectionEstablished(transitionTime, lease);
-    }
-
-    public void clientLeaseRenewed(long lease) {
-        lastLeaseRenewalTime = System.currentTimeMillis();
-
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.clientLeaseRenewed(lastLeaseRenewalTime, lease);
-        cumulativeMetrics.clientLeaseRenewed(lastLeaseRenewalTime, lease);
-    }
-
-    public void errorAddingClient() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.errorAddingClient();
-        cumulativeMetrics.errorAddingClient();
-    }  
-
-    public void clientConnectionDisconnected(boolean normal) {
-        transitionTime = System.currentTimeMillis();
-       
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.clientConnectionDisconnected(normal, transitionTime);
-        cumulativeMetrics.clientConnectionDisconnected(normal, transitionTime);
-    }
-
-    public void unableToRespondToConnectRequest() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.unableToRespondToConnectRequest();
-        cumulativeMetrics.unableToRespondToConnectRequest();
-    }
-
-    public void clientConnectionRefused() { 
-        transitionTime = System.currentTimeMillis();
-
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.clientConnectionRefused(transitionTime);
-        cumulativeMetrics.clientConnectionRefused(transitionTime);
-    }
-
-    @Override
-    public String toString() {
-        return "ClientConnectionMeter(" + peerID + ")";
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/ClientConnectionMetric.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/ClientConnectionMetric.java
deleted file mode 100644 (file)
index ff9d912..0000000
+++ /dev/null
@@ -1,399 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Micro//Systems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.rendezvous.rendezvousMeter;
-
-
-import net.jxta.impl.meter.*;
-import net.jxta.rendezvous.*;
-import net.jxta.util.documentSerializable.*;
-import net.jxta.document.*;
-import net.jxta.peer.*;
-import net.jxta.endpoint.*;
-import net.jxta.util.*;
-import net.jxta.exception.*;
-
-import java.util.*;
-
-
-/**
- * The rendezvous's metric for a client peer interacting with a it
- **/
-public class ClientConnectionMetric implements DocumentSerializable {
-    public static final String CONNECTED = "connected";
-    public static final String DISCONNECTED = "disconnected";
-    public static final String REFUSED = "refused";
-
-    private PeerID peerID;
-       
-    private String state = null;
-    private long transitionTime;
-    private long lastLeaseRenewalTime;
-       
-    private long lease;
-    private int numConnects;
-    private int numLeaseRenewals;
-    private int numDisconnects;        
-    private int numConnectionsRefused;
-    private int numErrorsAddingClient;
-    private int numUnableToRespondToConnectRequest;
-
-    private long totalTimeConnected;
-       
-    public ClientConnectionMetric() {}
-
-    public ClientConnectionMetric(PeerID peerID) { 
-        this.peerID = peerID;
-        this.state = DISCONNECTED;
-    }
-
-    public ClientConnectionMetric(ClientConnectionMetric prototype) {
-        this.peerID = prototype.peerID;
-        this.state = prototype.state;
-        this.transitionTime = prototype.transitionTime;
-        this.lastLeaseRenewalTime = prototype.lastLeaseRenewalTime;
-        this.lease = prototype.lease;
-    }
-
-    /** Peer ID of this Client Connection **/
-    public PeerID getPeerID() {
-        return peerID;
-    }
-
-    /**
-     * State of Client Connection
-     * @return ClientConnectionMetric.CONNECTED, ClientConnectionMetric.DISCONNECTED or ClientConnectionMetric.REFUSED
-     **/
-    public String getState() {
-        return state;
-    }
-
-    /** Get the time that it entered the current state 
-     * @return transition time in ms since January 1, 1970, 00:00:00 GMT
-     **/
-    public long getTransitionTime() {
-        return transitionTime;
-    }
-       
-    /** Is this client connected **/
-    public boolean isConnected() {
-        return (state != null) && state.equals(CONNECTED);
-    }
-
-    /** Get time Connected
-     * @return time or 0 if not connected
-     **/
-    public long getTimeConnectionEstablished() {
-        return isConnected() ? transitionTime : 0;
-    }
-
-    /** Get time Connected
-     * @return time or 0 if not disconnected
-     **/
-    public long getDisconnectTime() {
-        return isDisconnected() ? transitionTime : 0;
-    }
-
-    /** Is this client disconnected **/
-    public boolean isDisconnected() {
-        return (state != null) && (state.equals(DISCONNECTED) || state.equals(REFUSED));
-    }
-       
-    /** Get Lease time granted for last lease Renewal Request.
-     * @see #getLastLeaseRenewalTime()
-     **/
-    public long getLease() {
-        return lease;
-    }
-
-    /** Get Last Received Lease Renewal Time 
-     * @see #getLease()
-     **/
-    public long getLastLeaseRenewalTime() {
-        return lastLeaseRenewalTime;
-    }
-
-    /** Get number of granted connect messages received from this peer **/
-    public int getNumConnects() {
-        return numConnects;
-    }
-
-    /** Get number of granted lease renewal messages received from this peer **/
-    public int getNumLeaseRenewals() {
-        return numLeaseRenewals;
-    }
-
-    /** Get number of disconnect messages received from this peer **/
-    public int getNumDisconnects() {
-        return numDisconnects;
-    }
-
-    /** Get number of refused connect/lease-renewal messages received from this peer **/
-    public int getNumConnectionsRefused() {
-        return numConnectionsRefused;
-    }
-
-    /** Get number of errors when attempting to add this peer as a client **/
-    public int getNumErrorsAddingClient() {
-        return numErrorsAddingClient;
-    }
-
-    /** Get number of errors when attempting to respond to this peer's request**/
-    public int getNumUnableToRespondToConnectRequest() {
-        return numUnableToRespondToConnectRequest;
-    }
-       
-    /** Get the total time this peer has been connected.
-     * <BR><BR>
-     * <B>Note:</B> This does not include the current time connected (if it is currently connected)
-     * @see #getTotalTimeConnected(long)
-     * @return time in ms (see note above)
-     **/
-    public long getTotalTimeConnected() {
-        return totalTimeConnected;
-    }
-
-    /** Get the total time this peer has been connected.  If it is currently 
-     * connected, then the total time is adjusted to include the time since the transition time
-     * to become connected until the provided time
-     * @param adjustmentTime The time of this metric will be adjusted to
-     * @see #getTotalTimeConnected()
-     * @return time in ms (see note above)
-     **/
-    public long getTotalTimeConnected(long adjustmentTime) { 
-        long result = totalTimeConnected;
-
-        if (isConnected()) { 
-            result += (adjustmentTime - this.transitionTime);
-        }
-                       
-        return result; 
-    }
-
-    /** Get the duration of current connection relative to local clock (from transition time)
-     * <BR><BR>
-     * <B>Note:</B> This assumes the clocks are in sync with the reporting peer 
-     * @see #getTotalTimeConnected(long)
-     * @return time in ms (see note above) or 0 if not connected
-     **/
-    public long getTimeConnected() {
-        return getTimeConnected(System.currentTimeMillis());
-    }
-
-    /** Get the duration of current connection until the specified time
-     * @param adjustmentTime The time of this metric will be computed until
-     * @see #getTimeConnected()
-     * @return time in ms (see note above) or 0 if not connected
-     **/
-    public long getTimeConnected(long adjustmentTime) { 
-
-        if (isConnected()) { 
-            return (adjustmentTime - this.transitionTime);
-        } else {       
-            return 0;
-        } 
-    }
-
-    private void resetState(String state, long transitionTime) {
-        if (isConnected()) { 
-            totalTimeConnected += (System.currentTimeMillis() - this.transitionTime);
-        }
-
-        this.state = state;
-        this.transitionTime = transitionTime;
-    }
-
-    void clientConnectionEstablished(long transitionTime, long lease) {
-        resetState(CONNECTED, transitionTime);
-                       
-        this.numConnects++;
-        this.lease = lease;
-    }
-
-    void clientLeaseRenewed(long lastLeaseRenewalTime, long lease) {
-        this.numLeaseRenewals++;
-        this.lease = lease;
-        this.lastLeaseRenewalTime = System.currentTimeMillis();
-
-        if (!isConnected()) {
-            resetState(CONNECTED, lastLeaseRenewalTime);
-        }
-    }
-
-    void errorAddingClient() {
-        this.numErrorsAddingClient++;
-        ;
-    }
-       
-    void clientConnectionDisconnected(boolean normal, long transitionTime) {
-        resetState(DISCONNECTED, transitionTime);
-        this.numDisconnects++;
-        this.lease = 0;
-    }
-
-    void unableToRespondToConnectRequest() {
-        this.numUnableToRespondToConnectRequest++;
-    }  
-
-    void clientConnectionRefused(long transitionTime) {
-        if (!isDisconnected()) {
-            clientConnectionDisconnected(false, transitionTime);
-        }
-                       
-        this.transitionTime = transitionTime;
-        this.numConnectionsRefused++;          
-    }  
-
-    public void serializeTo(Element element) throws DocumentSerializationException {
-        if (peerID != null) {
-            DocumentSerializableUtilities.addString(element, "peerID", peerID.toString());
-        }
-        if (state != null) {
-            DocumentSerializableUtilities.addString(element, "state", state);
-        }
-        if (transitionTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "transitionTime", transitionTime);
-        }
-        if (lastLeaseRenewalTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "lastLeaseRenewalTime", lastLeaseRenewalTime);
-        }
-        if (lease != 0) {
-            DocumentSerializableUtilities.addLong(element, "lease", lease);
-        }
-        if (numConnects != 0) {
-            DocumentSerializableUtilities.addInt(element, "numConnects", numConnects);
-        }
-        if (numLeaseRenewals != 0) {
-            DocumentSerializableUtilities.addInt(element, "numLeaseRenewals", numLeaseRenewals);
-        }
-        if (numDisconnects != 0) {
-            DocumentSerializableUtilities.addInt(element, "numDisconnects", numDisconnects);
-        }
-        if (numConnectionsRefused != 0) {
-            DocumentSerializableUtilities.addInt(element, "numConnectionsRefused", numConnectionsRefused);
-        }
-        if (numErrorsAddingClient != 0) {
-            DocumentSerializableUtilities.addInt(element, "numErrorsAddingClient", numErrorsAddingClient);
-        }
-        if (numUnableToRespondToConnectRequest != 0) {
-            DocumentSerializableUtilities.addInt(element, "numUnableToRespondToConnectRequest", numUnableToRespondToConnectRequest);
-        }
-        if (totalTimeConnected != 0) {
-            DocumentSerializableUtilities.addLong(element, "totalTimeConnected", totalTimeConnected);
-        }
-    }
-
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        state = null;
-
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element childElement = (TextElement) e.nextElement();
-            String tagName = (String) childElement.getKey();
-
-            if (tagName.equals("peerID")) {
-                String peerIDText = DocumentSerializableUtilities.getString(childElement);
-
-                peerID = MetricUtilities.getPeerIdFromString(peerIDText);
-            } else if (tagName.equals("state")) { 
-                state = DocumentSerializableUtilities.getString(childElement);
-            } else if (tagName.equals("transitionTime")) { 
-                transitionTime = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("lastLeaseRenewalTime")) { 
-                lastLeaseRenewalTime = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("lease")) { 
-                lease = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("numConnects")) { 
-                numConnects = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numLeaseRenewals")) { 
-                numLeaseRenewals = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numDisconnects")) { 
-                numDisconnects = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numConnectionsRefused")) { 
-                numConnectionsRefused = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numErrorsAddingClient")) { 
-                numErrorsAddingClient = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numUnableToRespondToConnectRequest")) { 
-                numUnableToRespondToConnectRequest = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("totalTimeConnected")) { 
-                totalTimeConnected = DocumentSerializableUtilities.getLong(childElement);
-            }
-        }
-    }
-
-    public void mergeMetrics(ClientConnectionMetric otherClientConnectionMetric) {
-        if (otherClientConnectionMetric == null) {
-            return;  
-        }
-
-        if (otherClientConnectionMetric.state != null) {
-            state = otherClientConnectionMetric.state;
-        }
-
-        if (otherClientConnectionMetric.transitionTime != 0) {
-            transitionTime = otherClientConnectionMetric.transitionTime;
-        }
-
-        lease = otherClientConnectionMetric.lease;
-
-        numConnects += otherClientConnectionMetric.numConnects;
-        numLeaseRenewals += otherClientConnectionMetric.numLeaseRenewals;
-        numDisconnects += otherClientConnectionMetric.numDisconnects;
-        numConnectionsRefused += otherClientConnectionMetric.numConnectionsRefused;
-        numErrorsAddingClient += otherClientConnectionMetric.numErrorsAddingClient;
-        numUnableToRespondToConnectRequest += otherClientConnectionMetric.numUnableToRespondToConnectRequest;
-        totalTimeConnected += otherClientConnectionMetric.totalTimeConnected;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/ConditionalRendezvousMeterBuildSettings.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/ConditionalRendezvousMeterBuildSettings.java
deleted file mode 100644 (file)
index 921f0f0..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Copyright (c) 2001-2006 Sun Microsystems, Inc. All rights reserved.
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at https://jxta.dev.java.net.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <https://jxta.dev.java.net/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
-
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  https://jxta.dev.java.net/
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- *  
- */
-
-
-/*  ****  THIS IS A GENERATED FILE. DO NOT EDIT.  ****  */
-
-package net.jxta.impl.rendezvous.rendezvousMeter;
-
-import java.util.ResourceBundle;
-import net.jxta.impl.meter.*;
-
-public class ConditionalRendezvousMeterBuildSettings {
-       public static boolean isRuntimeMetering() {
-               boolean runtimeMetering = false; 
-
-               try { 
-                       ResourceBundle userResourceBundle = ResourceBundle.getBundle( "net.jxta.user" ); 
-                       String meteringProperty = "net.jxta.meter.conditionalRendezvousMetering"; 
-                       String meteringValue = userResourceBundle.getString( meteringProperty ); 
-                       runtimeMetering = "on".equalsIgnoreCase( meteringValue ); 
-               } catch (Exception ignored) { 
-               }
-
-               return runtimeMetering;
-       }
-}
\ No newline at end of file
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/RendezvousConnectionMeter.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/RendezvousConnectionMeter.java
deleted file mode 100644 (file)
index a0919e5..0000000
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Micro//Systems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.rendezvous.rendezvousMeter;
-
-
-import net.jxta.peer.*;
-
-
-/**
- * The meter about a client peer's connection to a rendezvous
- **/
-public class RendezvousConnectionMeter {
-    private PeerID peerID;
-
-    private RendezvousConnectionMetric cumulativeMetrics;
-    private RendezvousConnectionMetric deltaMetrics;
-
-    private long transitionTime = 0;
-    private long lastLeaseRenewalTime = 0;
-
-    public RendezvousConnectionMeter(PeerID peerID) {
-        this.peerID = peerID;
-        cumulativeMetrics = new RendezvousConnectionMetric(peerID);
-    }
-
-    public RendezvousConnectionMetric getCumulativeMetrics() {
-        return cumulativeMetrics;
-    }
-
-    public PeerID getPeerID() {
-        return peerID;
-    }
-
-    public String getState() {
-        return cumulativeMetrics.getState();
-    }
-
-    public synchronized RendezvousConnectionMetric collectMetrics() {
-        RendezvousConnectionMetric prevDelta = deltaMetrics;
-
-        deltaMetrics = null;
-        return prevDelta;
-    }
-
-    private void createDeltaMetric() {
-        deltaMetrics = new RendezvousConnectionMetric(cumulativeMetrics);
-    }
-
-    @Override
-    public String toString() {
-        return "RendezvousConnectionMeter(" + peerID + ")";
-    }
-
-    public void beginConnection() {
-        transitionTime = System.currentTimeMillis();
-               
-        if (deltaMetrics == null) {
-            createDeltaMetric();
-        }
-
-        deltaMetrics.beginConnection(transitionTime);
-        cumulativeMetrics.beginConnection(transitionTime);
-    }
-
-    public void connectionEstablished(long lease) {
-        long now = System.currentTimeMillis();
-        long timeToConnect = now - transitionTime;
-
-        transitionTime = now;
-               
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.connectionEstablished(transitionTime, timeToConnect, lease);
-        cumulativeMetrics.connectionEstablished(transitionTime, timeToConnect, lease);
-    }  
-
-    public void leaseRenewed(long lease) {
-        lastLeaseRenewalTime = System.currentTimeMillis();
-
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.leaseRenewed(lastLeaseRenewalTime, lease);
-        cumulativeMetrics.leaseRenewed(lastLeaseRenewalTime, lease);
-    }
-
-    public void connectionRefused() {
-        transitionTime = System.currentTimeMillis();
-               
-        if (deltaMetrics == null) {
-            createDeltaMetric();
-        }
-
-        deltaMetrics.connectionRefused(transitionTime);
-        cumulativeMetrics.connectionRefused(transitionTime);
-    }
-
-    public void connectionDisconnected() {
-        transitionTime = System.currentTimeMillis();
-               
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.connectionDisconnected(transitionTime);
-        cumulativeMetrics.connectionDisconnected(transitionTime);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/RendezvousConnectionMetric.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/RendezvousConnectionMetric.java
deleted file mode 100644 (file)
index 89421ca..0000000
+++ /dev/null
@@ -1,422 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystem, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.rendezvous.rendezvousMeter;
-
-
-import net.jxta.rendezvous.*;
-import net.jxta.util.documentSerializable.*;
-import net.jxta.document.*;
-import net.jxta.peer.*;
-import net.jxta.endpoint.*;
-import net.jxta.util.*;
-import net.jxta.exception.*;
-import net.jxta.impl.meter.*;
-import java.util.*;
-
-
-/**
- * The metrics about a client peer's connection to a rendezvous
- **/
-public class RendezvousConnectionMetric implements DocumentSerializable {
-    public static final String CONNECTING = "connecting";
-    public static final String CONNECTED = "connected";
-    public static final String DISCONNECTED = "disconnected";
-    public static final String REFUSED = "refused";
-       
-    private PeerID peerID;
-       
-    private String state = null;
-    private long transitionTime;
-
-    private long lease;
-    private int numConnectionsBegun = 0;
-    private int numConnectionsEstablished = 0;
-    private int numConnectionsRefused = 0;
-    private long totalTimesToConnect;
-    private long totalTimeConnected;
-
-    private long lastLeaseRenewalTime;
-    private int numLeaseRenewals;
-
-    private int numDisconnects;
-
-    public RendezvousConnectionMetric() {}
-
-    public RendezvousConnectionMetric(PeerID peerID) {
-        this.peerID = peerID;
-        this.state = DISCONNECTED;             
-    }
-
-    public RendezvousConnectionMetric(RendezvousConnectionMetric prototype) {
-        this.peerID = prototype.peerID;        
-        this.state = prototype.state;
-        this.transitionTime = prototype.transitionTime;
-        this.lastLeaseRenewalTime = prototype.lastLeaseRenewalTime;
-        this.lease = prototype.lease;          
-    }
-
-    /** Peer ID of  Rendezvous  **/
-    public PeerID getPeerID() {
-        return peerID;
-    }
-
-    /**
-     * State of Client Rendezvous
-     * @return RendezvousConnectionMetric.CONNECTING, RendezvousConnectionMetric.CONNECTED, RendezvousConnectionMetric.DISCONNECTED or RendezvousConnectionMetric.REFUSED
-     **/
-    public String getState() {
-        return state;
-    }
-
-    /** Get the time that it entered the current state 
-     * @return transition time in ms since January 1, 1970, 00:00:00 GMT
-     **/
-    public long getTransitionTime() {
-        return transitionTime;
-    }
-       
-    /** Is connecting to Rendezvous **/
-    public boolean isConnecting() {
-        return (state != null) && state.equals(CONNECTING);
-    }
-
-    /** Get time began connecting to Rendezvous 
-     * @return time began or 0 if not connecting
-     **/
-    public long getBeginConnectionTime() {
-        return isConnecting() ? transitionTime : 0;
-    }
-
-    /** Is connected to Rendezvous **/
-    public boolean isConnected() {
-        return (state != null) && state.equals(CONNECTED);
-    }
-
-    /** Get time connected to Rendezvous 
-     * @return time began or 0 if not connected
-     **/
-    public long getTimeConnectionEstablished() {
-        return isConnected() ? transitionTime : 0;
-    }
-
-    /** Get lease establised with Rendezvous **/
-    public long getLease() {
-        return lease;
-    }
-
-    /** Get Number of Connections begun with Rendezvous **/
-    public int getNumConnectionsBegun() {
-        return numConnectionsBegun;
-    }
-
-    /** Get Number of Connections established with Rendezvous **/
-    public int getNumConnectionsEstablished() {
-        return numConnectionsEstablished;
-    }
-
-    /** Get Number of Connections refused by Rendezvous **/
-    public int getNumConnectionsRefused() {
-        return numConnectionsRefused;
-    }
-
-    /** Get Sum of times it took to connect **/
-    public long getTotalTimesToConnect() {
-        return totalTimesToConnect;
-    }
-
-    /** Get Last Lease Renewal Time **/
-    public long getLastLeaseRenewalTime() {
-        return lastLeaseRenewalTime;
-    }
-
-    /** Get Number of lease Renewals **/
-    public int getNumLeaseRenewals() {
-        return numLeaseRenewals;
-    }
-
-    /** Get Number of Disconnects **/
-    public int getNumDisconnects() {
-        return numDisconnects;
-    }
-
-    /** Get time disconnected to Rendezvous 
-     * @return time began or 0 if not disconnected
-     **/
-    public long getDisconnectTime() {
-        return isDisconnected() ? transitionTime : 0;
-    }
-
-    /** Have we disconnected fromthis Rendezvous **/
-    public boolean isDisconnected() {
-        return (state != null) && (state.equals(DISCONNECTED) || state.equals(REFUSED));
-    }
-       
-    /** Get the total time this peer has been connected.
-     * <BR><BR>
-     * <B>Note:</B> This does not include the current time connected (if it is currently connected)
-     * @see #getTotalTimeConnected(long)
-     * @return time in ms (see note above)
-     **/
-    public long getTotalTimeConnected() {
-        return totalTimeConnected;
-    }
-
-    /** Get the total time this peer has been connected.  If it is currently 
-     * connected, then the total time is adjusted to include the time since the transition time
-     * to become connected until the provided time
-     * @param adjustmentTime The time of this metric will be adjusted to
-     * @see #getTotalTimeConnected()
-     * @return time in ms (see note above)
-     **/
-    public long getTotalTimeConnected(long adjustmentTime) { 
-        long result = totalTimeConnected;
-
-        if (isConnected()) { 
-            result += (adjustmentTime - this.transitionTime);
-        }
-                       
-        return result; 
-    }
-
-    /** Get the duration of current connection relative to local clock (from transition time)
-     * <BR><BR>
-     * <B>Note:</B> This assumes the clocks are in sync with the reporting peer 
-     * @see #getTotalTimeConnected(long)
-     * @return time in ms (see note above) or 0 if not connected
-     **/
-    public long getTimeConnected() {
-        return getTimeConnected(System.currentTimeMillis());
-    }
-
-    /** Get the duration of current connection until the specified time
-     * @param adjustmentTime The time of this metric will be computed until
-     * @see #getTimeConnected()
-     * @return time in ms (see note above) or 0 if not connected
-     **/
-    public long getTimeConnected(long adjustmentTime) { 
-
-        if (isConnected()) { 
-            return (adjustmentTime - this.transitionTime);
-        } else {       
-            return 0;
-        } 
-    }
-
-    private void resetState(String state, long transitionTime) {
-        if (isConnected()) { 
-            totalTimeConnected += (System.currentTimeMillis() - this.transitionTime);
-        }
-
-        this.state = state;
-        this.transitionTime = transitionTime;
-    }
-
-    void beginConnection(long transitionTime) {
-        resetState(CONNECTING, transitionTime);
-
-        this.numConnectionsBegun++;
-    }
-
-    void connectionEstablished(long transitionTime, long timeToConnectTime, long lease) {
-        resetState(CONNECTED, transitionTime);
-        this.totalTimesToConnect += timeToConnectTime;
-        this.numConnectionsEstablished++;
-               
-        this.lease = lease;     
-    }
-
-    void leaseRenewed(long lastLeaseRenewalTime, long lease) {
-        this.numLeaseRenewals++;
-               
-        this.lastLeaseRenewalTime = lastLeaseRenewalTime;
-        this.lease = lease;
-
-        if (!isConnected()) {
-            resetState(CONNECTED, lastLeaseRenewalTime);
-        }              
-    }
-       
-    void connectionRefused(long transitionTime) {
-        resetState(REFUSED, lastLeaseRenewalTime);
-        numConnectionsRefused++;
-    }
-       
-    void connectionDisconnected(long transitionTime) {
-        resetState(DISCONNECTED, lastLeaseRenewalTime);
-
-        numDisconnects++;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (obj instanceof RendezvousConnectionMetric) {
-            RendezvousConnectionMetric other = (RendezvousConnectionMetric) obj;
-                       
-            return (peerID.equals(other.peerID));
-        } else {
-            return false;
-        }
-    }
-
-    @Override
-    public int hashCode() {
-        return peerID.hashCode();
-    }
-
-    public void serializeTo(Element element) throws DocumentSerializationException {
-        if (peerID != null) {
-            DocumentSerializableUtilities.addString(element, "peerID", peerID.toString());
-        }
-        if (state != null) {
-            DocumentSerializableUtilities.addString(element, "state", state);
-        }
-        if (transitionTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "transitionTime", transitionTime);
-        }
-        if (lease != 0) {
-            DocumentSerializableUtilities.addLong(element, "lease", lease);
-        }
-        if (numConnectionsBegun != 0) {
-            DocumentSerializableUtilities.addInt(element, "numConnectionsBegun", numConnectionsBegun);
-        }
-        if (numConnectionsEstablished != 0) {
-            DocumentSerializableUtilities.addInt(element, "numConnectionsEstablished", numConnectionsEstablished);
-        }
-        if (numConnectionsRefused != 0) {
-            DocumentSerializableUtilities.addInt(element, "numConnectionsRefused", numConnectionsRefused);
-        }
-        if (totalTimesToConnect != 0) {
-            DocumentSerializableUtilities.addLong(element, "totalTimesToConnect", totalTimesToConnect);
-        }
-        if (totalTimeConnected != 0) {
-            DocumentSerializableUtilities.addLong(element, "totalTimeConnected", totalTimeConnected);
-        }
-        if (lastLeaseRenewalTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "lastLeaseRenewalTime", lastLeaseRenewalTime);
-        }
-        if (numLeaseRenewals != 0) {
-            DocumentSerializableUtilities.addInt(element, "numLeaseRenewals", numLeaseRenewals);
-        }
-        if (numDisconnects != 0) {
-            DocumentSerializableUtilities.addInt(element, "numDisconnects", numDisconnects);
-        }
-    }
-
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element childElement = (TextElement) e.nextElement();
-            String tagName = (String) childElement.getKey();
-
-            if (tagName.equals("peerID")) {
-                String peerIDText = DocumentSerializableUtilities.getString(childElement);
-
-                peerID = MetricUtilities.getPeerIdFromString(peerIDText);
-            } else if (tagName.equals("state")) { 
-                state = DocumentSerializableUtilities.getString(childElement);
-            } else if (tagName.equals("transitionTime")) { 
-                transitionTime = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("lease")) { 
-                lease = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("numConnectionsBegun")) { 
-                numConnectionsBegun = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numConnectionsEstablished")) { 
-                numConnectionsEstablished = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numConnectionsRefused")) { 
-                numConnectionsRefused = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("totalTimesToConnect")) { 
-                totalTimesToConnect = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("totalTimeConnected")) { 
-                totalTimeConnected = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("lastLeaseRenewalTime")) { 
-                lastLeaseRenewalTime = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("numLeaseRenewals")) { 
-                numLeaseRenewals = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numDisconnects")) { 
-                numDisconnects = DocumentSerializableUtilities.getInt(childElement);
-            }
-        }
-    }
-
-    public void mergeMetrics(RendezvousConnectionMetric otherRendezvousConnectionMetric) {
-        if (otherRendezvousConnectionMetric == null) {
-            return; 
-        }
-
-        if (otherRendezvousConnectionMetric.state != null) {
-            state = otherRendezvousConnectionMetric.state;
-        }
-
-        if (otherRendezvousConnectionMetric.transitionTime != 0) {
-            transitionTime = otherRendezvousConnectionMetric.transitionTime;
-        }
-
-        if (otherRendezvousConnectionMetric.lastLeaseRenewalTime != 0) {
-            lastLeaseRenewalTime = otherRendezvousConnectionMetric.transitionTime;
-        }
-       
-        lease = otherRendezvousConnectionMetric.lease;
-                       
-        numConnectionsBegun += otherRendezvousConnectionMetric.numConnectionsBegun;
-        numConnectionsEstablished += otherRendezvousConnectionMetric.numConnectionsEstablished;
-        numConnectionsRefused += otherRendezvousConnectionMetric.numConnectionsRefused;
-        totalTimeConnected += otherRendezvousConnectionMetric.totalTimeConnected;
-       
-        numLeaseRenewals += otherRendezvousConnectionMetric.numLeaseRenewals;
-       
-        numDisconnects += otherRendezvousConnectionMetric.numDisconnects;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/RendezvousMeter.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/RendezvousMeter.java
deleted file mode 100644 (file)
index 4059bba..0000000
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Micro//Systems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.rendezvous.rendezvousMeter;
-
-
-import net.jxta.peer.*;
-import net.jxta.peergroup.*;
-import net.jxta.rendezvous.*;
-import net.jxta.impl.rendezvous.*;
-import java.net.*;
-import java.util.*;
-
-
-/**
- The Meter corresponding to the state and aggregate information of a Rendezvous Service
- **/
-public class RendezvousMeter {
-    private RendezvousMetric cumulativeMetrics;
-    private RendezvousMetric deltaMetrics;
-
-    private long transitionTime = System.currentTimeMillis();
-
-    public RendezvousMeter() {
-        cumulativeMetrics = new RendezvousMetric(null);
-    }
-
-    public RendezvousMetric getCumulativeMetrics() { 
-        return cumulativeMetrics; 
-    }
-
-    public synchronized RendezvousMetric collectMetrics() {    
-        RendezvousMetric prevDelta = deltaMetrics;
-
-        deltaMetrics = null;
-
-        return prevDelta;
-    }
-
-    private void createDeltaMetric() {
-        deltaMetrics = new RendezvousMetric(cumulativeMetrics);
-    }
-
-    @Override
-    public String toString() {
-        return "RendezvousMeter";
-    }
-
-    public void startEdge() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        transitionTime = System.currentTimeMillis();
-        deltaMetrics.startEdge(transitionTime);
-        cumulativeMetrics.startEdge(transitionTime);
-    }
-       
-    public void stopEdge() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        long now = System.currentTimeMillis();
-        long timeAsEdge = now - transitionTime;
-               
-        transitionTime = now;
-
-        if (!cumulativeMetrics.isEdge()) {
-            timeAsEdge = 0;
-        }
-               
-        deltaMetrics.stopEdge(now, timeAsEdge);
-        cumulativeMetrics.stopEdge(now, timeAsEdge);
-    }
-
-    public void startRendezvous() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        transitionTime = System.currentTimeMillis();
-        deltaMetrics.startRendezvous(transitionTime);
-        cumulativeMetrics.startRendezvous(transitionTime);
-    }
-
-    public void stopRendezvous() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        long now = System.currentTimeMillis();
-        long timeAsRendezvous = cumulativeMetrics.isRendezvous() ? (now - transitionTime) : 0;
-               
-        transitionTime = now;
-
-        deltaMetrics.stopRendezvous(now, timeAsRendezvous);
-        cumulativeMetrics.stopRendezvous(now, timeAsRendezvous);
-    }
-
-    public void invalidMessageReceived() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.invalidMessageReceived();
-        cumulativeMetrics.invalidMessageReceived();
-    }
-
-    public void receivedMessageProcessedLocally() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.receivedMessageProcessedLocally();
-        cumulativeMetrics.receivedMessageProcessedLocally();
-    }
-
-    public void receivedMessageRepropagatedInGroup() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.receivedMessageRepropagatedInGroup();
-        cumulativeMetrics.receivedMessageRepropagatedInGroup();
-    }
-
-    public void receivedDeadMessage() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.receivedDeadMessage();
-        cumulativeMetrics.receivedDeadMessage();
-    }
-
-    public void receivedLoopbackMessage() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.receivedLoopbackMessage();
-        cumulativeMetrics.receivedLoopbackMessage();
-    }
-
-    public void receivedDuplicateMessage() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.receivedDuplicateMessage();
-        cumulativeMetrics.receivedDuplicateMessage();
-    }
-
-    public void propagateToPeers(int numPeers) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.propagateToPeers(numPeers);
-        cumulativeMetrics.propagateToPeers(numPeers);
-    }
-
-    public void propagateToNeighbors() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.propagateToNeighbors();
-        cumulativeMetrics.propagateToNeighbors();
-    }
-       
-    public void propagateToNeighborsFailed() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.propagateToNeighborsFailed();
-        cumulativeMetrics.propagateToNeighborsFailed();
-    }
-
-    public void propagateToGroup() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.propagateToGroup();
-        cumulativeMetrics.propagateToGroup();
-    }
-
-    public void walk() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.walk();
-        cumulativeMetrics.walk();
-    }
-
-    public void walkFailed() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.walkFailed();
-        cumulativeMetrics.walkFailed();
-    }
-
-    public void walkToPeers(int numPeers) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.walkToPeers(numPeers);
-        cumulativeMetrics.walkToPeers(numPeers);
-    }
-
-    public void walkToPeersFailed() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.walkToPeersFailed();
-        cumulativeMetrics.walkToPeersFailed();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/RendezvousMeterBuildSettings.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/RendezvousMeterBuildSettings.java
deleted file mode 100644 (file)
index 3989855..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Copyright (c) 2001-2006 Sun Microsystems, Inc. All rights reserved.
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at https://jxta.dev.java.net.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <https://jxta.dev.java.net/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
-
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  https://jxta.dev.java.net/
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- *  
- */
-
-
-/*  ****  THIS IS A GENERATED FILE. DO NOT EDIT.  ****  */
-
-package net.jxta.impl.rendezvous.rendezvousMeter;
-
-import net.jxta.impl.meter.*;
-
-public interface RendezvousMeterBuildSettings extends MeterBuildSettings {
-       public static final boolean RENDEZVOUS_METERING = ConditionalRendezvousMeterBuildSettings.isRuntimeMetering();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/RendezvousMetric.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/RendezvousMetric.java
deleted file mode 100644 (file)
index 719c0f0..0000000
+++ /dev/null
@@ -1,666 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.rendezvous.rendezvousMeter;
-
-
-import net.jxta.rendezvous.*;
-import net.jxta.util.documentSerializable.*;
-import net.jxta.document.*;
-
-import java.util.*;
-
-
-/**
- The Metric corresponding to the state and aggregate information of a Rendezvous Service
- **/
-public class RendezvousMetric implements DocumentSerializable {
-       
-    public static final String EDGE = "edge";
-    public static final String RENDEZVOUS = "rendezvous";
-    public static final String STOPPED = "stopped"; // but internally represent as null
-
-    private String state = null;
-    private long transitionTime = 0;
-
-    private long totalEdgeTime;
-    private int numEdgeTransitions;
-
-    private long totalRendezvousTime;
-    private long numRendezvousTransitions;
-
-    private int numReceivedProcessedLocally;
-    private int numReceivedRepropagatedInGroup;
-    private int numReceivedInvalid;
-    private int numReceivedDead;
-    private int numReceivedLoopback;
-    private int numReceivedDuplicate;
-
-    private int numPropagated;
-    private int numFailedPropagating;
-    private int numRepropagated;
-    private int numFailedRepropagating;
-       
-    private int numPropagatedToPeers;
-    private int numFailedPropagatingToPeers;
-    private int numPeersPropagatedTo;
-       
-    private int numPropagatedInGroup;
-       
-    private int numPropagatedToNeighbors;
-    private int numFailedPropagatingToNeighbors;
-       
-    private int numWalks;
-    private int numFailedWalks;
-       
-    private int numWalkedToPeers;
-    private int numFailedWalkToPeers;
-    private int numPeersWalkedTo;
-
-    public RendezvousMetric() {}
-       
-    public RendezvousMetric(RendezvousMetric prototype) {
-        if (prototype == null) {
-            this.state = STOPPED;
-        } else {
-            this.state = prototype.state;
-            this.transitionTime = prototype.transitionTime;
-        }
-    }
-
-    /** Get the current state (edge, rendezvous or stopped) 
-     * @return RendezvousMetric.EDGE, RendezvousMetric.RENDEZVOUS or RendezvousMetric.STOPPED
-     **/
-    public String getState() {
-        return (state != null) ? state : STOPPED;
-    }
-
-    /** Get the time that it entered the current state 
-     * @return transition time in ms since January 1, 1970, 00:00:00 GMT
-     **/
-    public long getTransitionTime() {
-        return transitionTime;
-    }
-
-    /** Is this Rendezvous currently operating as an Edge **/
-    public boolean isEdge() {
-        return (state != null) && state.equals(EDGE);
-    }
-
-    /** Is this Rendezvous currently operating as an Rendezvous */
-    public boolean isRendezvous() {
-        return (state != null) && state.equals(RENDEZVOUS);
-    }
-
-    /** Get the time that it began operating as an Edge
-     * @return time or 0 if it is not currently an Edge 
-     **/
-    public long getEdgeStartTime() {
-        return isEdge() ? transitionTime : 0;
-    }
-
-    /** Get the total time it began operating as an Edge.
-     * <BR><BR>
-     * <B>Note:</B> This does not include the current time as edge (if it is currently an edge)
-     * @see #getTotalEdgeTime(long)
-     * @return time in ms (see note above)
-     **/
-    public long getTotalEdgeTime() {
-        return totalEdgeTime;
-    }
-
-    /** Get the total time it began operating as an Edge.  If it is currently operating as
-     * an edge, then the total time is adjusted to include the time since the transition time
-     * to an edge until the provided time
-     * @param adjustmentTime The time of this metric will be adjusted to
-     * @see #getTotalEdgeTime()
-     * @return time in ms (see note above)
-     **/
-    public long getTotalEdgeTime(long adjustmentTime) {
-        long result = totalEdgeTime;
-
-        if (isEdge()) { 
-            result += (adjustmentTime - this.transitionTime);
-        }
-                       
-        return result; 
-    }
-
-    /** The number of times the peer has become an edge **/
-    public int getNumEdgeTransitions() {
-        return numEdgeTransitions;
-    }
-       
-    /** Get the time that it began operating as an Rendezvous
-     * @return time or 0 if it is not currently an Rendezvous 
-     **/
-    public long getRendezvousStartTime() {
-        return isRendezvous() ? transitionTime : 0;
-    }
-
-    /** Get the total time it began operating as an Rendezvous.
-     * <BR><BR>
-     * <B>Note:</B> This does not include the current time as rendezvous (if it is currently an rendezvous)
-     * @see #getTotalRendezvousTime(long)
-     * @return time in ms (see note above)
-     **/
-    public long getTotalRendezvousTime() {
-        return totalRendezvousTime;
-    }
-
-    /** Get the total time it began operating as an Rendezvous.  If it is currently operating as
-     * a rendezvous, then the total time is adjusted to include the time since the transition time
-     * to an rendezvous until the provided time
-     * @param adjustmentTime The time of this metric will be adjusted to
-     * @see #getTotalRendezvousTime()
-     * @return time in ms (see note above)
-     **/
-    public long getTotalRendezvousTime(long adjustmentTime) {
-        long result = totalRendezvousTime;
-
-        if (isRendezvous()) { 
-            result += (adjustmentTime - this.transitionTime);
-        }
-                       
-        return result; 
-    }
-
-    /** The number of times the peer has become an rendezvous **/
-    public long getNumRendezvousTransitions() {
-        return numRendezvousTransitions;
-    }
-
-    /** The number of messages received that were sent to local listeners **/
-    public int getNumReceivedProcessedLocally() {
-        return numReceivedProcessedLocally;
-    }
-
-    /** The number of messages received that were repropagated to the group **/
-    public int getNumReceivedRepropagatedInGroup() {
-        return numReceivedRepropagatedInGroup;
-    }
-
-    /** The number of invalid messages received **/
-    public int getNumReceivedInvalid() {
-        return numReceivedInvalid;
-    }
-
-    /** The number of TTL Dead messages received **/
-    public int getNumReceivedDead() {
-        return numReceivedDead;
-    }
-
-    /** The number of messages received that originated at peer **/
-    public int getNumReceivedLoopback() {
-        return numReceivedLoopback;
-    }
-
-    /** The number of duplicate messages received **/
-    public int getNumReceivedDuplicate() {
-        return numReceivedDuplicate;
-    }
-
-    /** The total number of inbound messages to the rendezvous service that could not be delivered**/
-    public int getTotalReceivedUndelivered() {
-        return numReceivedInvalid + numReceivedDead + numReceivedLoopback + numReceivedDuplicate;
-    }
-
-    /** The total number of inbound messages to the rendezvous service **/
-    public int getTotalReceived() {
-        return getTotalReceivedUndelivered() + numReceivedProcessedLocally + numReceivedRepropagatedInGroup;
-    }
-
-    /** The number of outbound messages propagated **/
-    public int getNumPropagated() {
-        return numPropagated;
-    }
-
-    /** The number of outbound messages failed during propagation **/
-    public int getNumFailedPropagating() {
-        return numFailedPropagating;
-    }
-
-    /** The number of outbound messages repropagated **/
-    public int getNumRepropagated() {
-        return numRepropagated;
-    }
-
-    /** The number of outbound messages failed during repropagation **/
-    public int getNumFailedRepropagating() {
-        return numFailedRepropagating;
-    }
-
-    /** The number of outbound messages propagated to peers **/
-    public int getNumPropagatedToPeers() {
-        return numPropagatedToPeers;
-    }
-
-    /** The number of outbound messages failed when propagated to peers **/
-    public int getNumFailedPropagatingToPeers() {
-        return numFailedPropagatingToPeers;
-    }
-
-    /** The number of peers that outbound messages were propagated to **/
-    public int getNumPeersPropagatedTo() {
-        return numPeersPropagatedTo;
-    }
-
-    /** The number of outbound messages propagated in group **/
-    public int getNumPropagatedInGroup() {
-        return numPropagatedInGroup;
-    }
-
-    /** The number of outbound messages propagated to neighbors **/
-    public int getNumPropagatedToNeighbors() {
-        return numPropagatedToNeighbors;
-    }
-
-    /** The number of outbound messages failed when propagated to neighbors **/
-    public int getNumFailedPropagatingToNeighbors() {
-        return numFailedPropagatingToNeighbors;
-    }
-
-    /** The number of outbound messages walked  **/
-    public int getNumWalks() {
-        return numWalks;
-    }
-
-    /** The number of outbound messages failed attempting walk **/
-    public int getNumFailedWalks() {
-        return numFailedWalks;
-    }
-
-    /** The number of outbound messages walked to a set of peers **/
-    public int getNumWalkedToPeers() {
-        return numWalkedToPeers;
-    }
-
-    /** The number of outbound messages failed in an attempt to walk to a set of peers **/
-    public int getNumFailedWalkToPeers() {
-        return numFailedWalkToPeers;
-    }
-
-    /** The number of peers that outbound messages were walked to **/
-    public int getNumPeersWalkedTo() {
-        return numPeersWalkedTo;
-    }
-
-    /** Get the duration of current transition to an edge
-     * <BR><BR>
-     * <B>Note:</B> This assumes the clocks are in sync with the reporting peer 
-     * @see #getTimeAsEdge(long)
-     * @return time in ms (see note above) or 0 if not edge
-     **/
-    public long getTimeAsEdge() {
-        return getTimeAsEdge(System.currentTimeMillis());
-    }
-
-    /** Get the duration of time became an edge until the specified time
-     * @param adjustmentTime The time of this metric will be computed until
-     * @see #getTimeAsEdge()
-     * @return time in ms (see note above) or 0 if not connected
-     **/
-    public long getTimeAsEdge(long adjustmentTime) { 
-        if (isEdge()) { 
-            return (adjustmentTime - this.transitionTime);
-        } else {
-            return 0;
-        }
-    }
-
-    /** Get the duration of current transition to a rendezvous
-     * <BR><BR>
-     * <B>Note:</B> This assumes the clocks are in sync with the reporting peer 
-     * @see #getTimeAsRendezvous(long)
-     * @return time in ms (see note above) or 0 if not edge
-     **/
-    public long getTimeAsRendezvous() {
-        return getTimeAsRendezvous(System.currentTimeMillis());
-    }
-
-    /** Get the duration of time became an rendezvous until the specified time
-     * @param adjustmentTime The time of this metric will be computed until
-     * @see #getTimeAsRendezvous()
-     * @return time in ms (see note above) or 0 if not connected
-     **/
-    public long getTimeAsRendezvous(long adjustmentTime) { 
-        if (isRendezvous()) { 
-            return (adjustmentTime - this.transitionTime);
-        } else {
-            return 0;
-        }
-    }
-
-    void startEdge(long transitionTime) {
-        this.transitionTime = transitionTime;
-        this.state = EDGE;
-        this.numEdgeTransitions++;
-    }
-
-    void stopEdge(long transitionTime, long timeAsEdge) {
-        this.state = STOPPED;
-        this.transitionTime = transitionTime;
-        this.totalEdgeTime += timeAsEdge;
-    }
-
-    void startRendezvous(long transitionTime) {
-        this.state = RENDEZVOUS;
-        this.transitionTime = transitionTime;
-        this.numRendezvousTransitions++;
-    }
-
-    void stopRendezvous(long transitionTime, long timeAsRendezvous) {
-        this.state = STOPPED;
-        this.transitionTime = transitionTime;
-        this.totalRendezvousTime += timeAsRendezvous;
-    }
-
-    void invalidMessageReceived() {
-        numReceivedInvalid++;
-    } 
-
-    void receivedMessageProcessedLocally() {
-        numReceivedProcessedLocally++;
-    } 
-
-    void receivedMessageRepropagatedInGroup() {
-        numReceivedRepropagatedInGroup++;
-    } 
-
-    void receivedDeadMessage() {
-        numReceivedDead++;
-    } 
-
-    void receivedLoopbackMessage() {
-        numReceivedLoopback++;
-    } 
-
-    void receivedDuplicateMessage() {
-        numReceivedDuplicate++;
-    } 
-       
-    void propagateToPeers(int numPeers) {
-        numPropagatedToPeers++;
-        numPeersPropagatedTo += numPeers;
-    }
-
-    void propagateToNeighbors() {
-        numPropagatedToNeighbors++;
-    }
-       
-    void propagateToNeighborsFailed() {
-        numFailedPropagatingToNeighbors++;
-    } 
-
-    void propagateToGroup() {
-        numPropagatedInGroup++;
-    } 
-
-    void walk() {
-        numWalks++;
-    } 
-
-    void walkFailed() {
-        numFailedWalks++;
-    } 
-
-    void walkToPeers(int numPeers) {
-        numWalkedToPeers++;
-        numPeersWalkedTo += numPeers;
-    } 
-
-    void walkToPeersFailed() {
-        numFailedWalkToPeers++;
-    } 
-
-    public void mergeMetrics(RendezvousMetric otherRendezvousMetric) { 
-        if (otherRendezvousMetric == null) {
-            return;  
-        }
-
-        if (otherRendezvousMetric.state != null) {
-            state = otherRendezvousMetric.state;
-        }
-
-        if (otherRendezvousMetric.transitionTime != 0) {
-            transitionTime = otherRendezvousMetric.transitionTime;
-        }
-                       
-        this.totalEdgeTime += otherRendezvousMetric.totalEdgeTime;
-        this.numEdgeTransitions += otherRendezvousMetric.numEdgeTransitions;
-
-        this.totalRendezvousTime += otherRendezvousMetric.totalRendezvousTime;
-        this.numRendezvousTransitions += otherRendezvousMetric.numRendezvousTransitions;
-
-        this.numReceivedProcessedLocally += otherRendezvousMetric.numReceivedProcessedLocally;
-        this.numReceivedRepropagatedInGroup += otherRendezvousMetric.numReceivedRepropagatedInGroup;
-
-        this.numReceivedInvalid += otherRendezvousMetric.numReceivedInvalid;
-
-        this.numReceivedDead += otherRendezvousMetric.numReceivedDead;
-        this.numReceivedLoopback += otherRendezvousMetric.numReceivedLoopback;
-        this.numReceivedDuplicate += otherRendezvousMetric.numReceivedDuplicate;
-       
-        this.numPropagated += otherRendezvousMetric.numPropagated;
-        this.numFailedPropagating += otherRendezvousMetric.numFailedPropagating;
-        this.numRepropagated += otherRendezvousMetric.numRepropagated;
-        this.numFailedRepropagating += otherRendezvousMetric.numFailedRepropagating;
-               
-        this.numPropagatedToPeers += otherRendezvousMetric.numPropagatedToPeers;
-        this.numFailedPropagatingToPeers += otherRendezvousMetric.numFailedPropagatingToPeers;
-        this.numPeersPropagatedTo += otherRendezvousMetric.numPeersPropagatedTo;
-               
-        this.numPropagatedInGroup += otherRendezvousMetric.numPropagatedInGroup;
-               
-        this.numPropagatedToNeighbors += otherRendezvousMetric.numPropagatedToNeighbors;
-        this.numFailedPropagatingToNeighbors += otherRendezvousMetric.numFailedPropagatingToNeighbors;
-               
-        this.numWalks += otherRendezvousMetric.numWalks;
-        this.numFailedWalks += otherRendezvousMetric.numFailedWalks;
-               
-        this.numWalkedToPeers += otherRendezvousMetric.numWalkedToPeers;
-        this.numFailedWalkToPeers += otherRendezvousMetric.numFailedWalkToPeers;
-        this.numPeersWalkedTo += otherRendezvousMetric.numPeersWalkedTo;
-    }
-       
-    public void serializeTo(Element element) throws DocumentSerializationException {
-        if (state != null) {
-            DocumentSerializableUtilities.addString(element, "state", state);
-        }
-        if (transitionTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "transitionTime", transitionTime);
-        }
-        if (totalEdgeTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "totalEdgeTime", totalEdgeTime);
-        }
-        if (numEdgeTransitions != 0) {
-            DocumentSerializableUtilities.addInt(element, "numEdgeTransitions", numEdgeTransitions);
-        }
-        if (totalRendezvousTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "totalRendezvousTime", totalRendezvousTime);
-        }
-        if (numRendezvousTransitions != 0) {
-            DocumentSerializableUtilities.addLong(element, "numRendezvousTransitions", numRendezvousTransitions);
-        }
-        if (numReceivedProcessedLocally != 0) {
-            DocumentSerializableUtilities.addInt(element, "numReceivedProcessedLocally", numReceivedProcessedLocally);
-        }
-        if (numReceivedRepropagatedInGroup != 0) {
-            DocumentSerializableUtilities.addInt(element, "numReceivedRepropagatedInGroup", numReceivedRepropagatedInGroup);
-        }
-        if (numReceivedInvalid != 0) {
-            DocumentSerializableUtilities.addInt(element, "numReceivedInvalid", numReceivedInvalid);
-        }
-        if (numReceivedDead != 0) {
-            DocumentSerializableUtilities.addInt(element, "numReceivedDead", numReceivedDead);
-        }
-        if (numReceivedLoopback != 0) {
-            DocumentSerializableUtilities.addInt(element, "numReceivedLoopback", numReceivedLoopback);
-        }
-        if (numReceivedDuplicate != 0) {
-            DocumentSerializableUtilities.addInt(element, "numReceivedDuplicate", numReceivedDuplicate);
-        }
-        if (numPropagated != 0) {
-            DocumentSerializableUtilities.addInt(element, "numPropagated", numPropagated);
-        }
-        if (numFailedPropagating != 0) {
-            DocumentSerializableUtilities.addInt(element, "numFailedPropagating", numFailedPropagating);
-        }
-        if (numRepropagated != 0) {
-            DocumentSerializableUtilities.addInt(element, "numRepropagated", numRepropagated);
-        }
-        if (numFailedRepropagating != 0) {
-            DocumentSerializableUtilities.addInt(element, "numFailedRepropagating", numFailedRepropagating);
-        }
-        if (numPropagatedToPeers != 0) {
-            DocumentSerializableUtilities.addInt(element, "numPropagatedToPeers", numPropagatedToPeers);
-        }
-        if (numFailedPropagatingToPeers != 0) {
-            DocumentSerializableUtilities.addInt(element, "numFailedPropagatingToPeers", numFailedPropagatingToPeers);
-        }
-        if (numPeersPropagatedTo != 0) {
-            DocumentSerializableUtilities.addInt(element, "numPeersPropagatedTo", numPeersPropagatedTo);
-        }
-        if (numPropagatedInGroup != 0) {
-            DocumentSerializableUtilities.addInt(element, "numPropagatedInGroup", numPropagatedInGroup);
-        }
-        if (numPropagatedToNeighbors != 0) {
-            DocumentSerializableUtilities.addInt(element, "numPropagatedToNeighbors", numPropagatedToNeighbors);
-        }
-        if (numFailedPropagatingToNeighbors != 0) {
-            DocumentSerializableUtilities.addInt(element, "numFailedPropagatingToNeighbors", numFailedPropagatingToNeighbors);
-        }
-        if (numWalks != 0) {
-            DocumentSerializableUtilities.addInt(element, "numWalks", numWalks);
-        }
-        if (numFailedWalks != 0) {
-            DocumentSerializableUtilities.addInt(element, "numFailedWalks", numFailedWalks);
-        }
-        if (numWalkedToPeers != 0) {
-            DocumentSerializableUtilities.addInt(element, "numWalkedToPeers", numWalkedToPeers);
-        }
-        if (numFailedWalkToPeers != 0) {
-            DocumentSerializableUtilities.addInt(element, "numFailedWalkToPeers", numFailedWalkToPeers);
-        }
-        if (numPeersWalkedTo != 0) {
-            DocumentSerializableUtilities.addInt(element, "numPeersWalkedTo", numPeersWalkedTo);
-        }
-    }
-
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element childElement = (TextElement) e.nextElement();
-            String tagName = (String) childElement.getKey();
-
-            if (tagName.equals("state")) { 
-                state = DocumentSerializableUtilities.getString(childElement);
-            } else if (tagName.equals("transitionTime")) { 
-                transitionTime = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("totalEdgeTime")) { 
-                totalEdgeTime = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("numEdgeTransitions")) { 
-                numEdgeTransitions = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("totalRendezvousTime")) { 
-                totalRendezvousTime = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("numRendezvousTransitions")) { 
-                numRendezvousTransitions = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("numReceivedProcessedLocally")) { 
-                numReceivedProcessedLocally = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numReceivedRepropagatedInGroup")) { 
-                numReceivedRepropagatedInGroup = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numReceivedInvalid")) { 
-                numReceivedInvalid = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numReceivedDead")) { 
-                numReceivedDead = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numReceivedLoopback")) { 
-                numReceivedLoopback = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numReceivedDuplicate")) { 
-                numReceivedDuplicate = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numPropagated")) { 
-                numPropagated = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numFailedPropagating")) { 
-                numFailedPropagating = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numRepropagated")) { 
-                numRepropagated = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numFailedRepropagating")) { 
-                numFailedRepropagating = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numPropagatedToPeers")) { 
-                numPropagatedToPeers = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numFailedPropagatingToPeers")) { 
-                numFailedPropagatingToPeers = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numPeersPropagatedTo")) { 
-                numPeersPropagatedTo = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numPropagatedInGroup")) { 
-                numPropagatedInGroup = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numPropagatedToNeighbors")) { 
-                numPropagatedToNeighbors = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numFailedPropagatingToNeighbors")) { 
-                numFailedPropagatingToNeighbors = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numWalks")) { 
-                numWalks = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numFailedWalks")) { 
-                numFailedWalks = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numWalkedToPeers")) { 
-                numWalkedToPeers = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numFailedWalkToPeers")) { 
-                numFailedWalkToPeers = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numPeersWalkedTo")) { 
-                numPeersWalkedTo = DocumentSerializableUtilities.getInt(childElement);
-            }
-        }
-    }
-
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/RendezvousServiceMetric.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/RendezvousServiceMetric.java
deleted file mode 100644 (file)
index d2e56f6..0000000
+++ /dev/null
@@ -1,358 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.rendezvous.rendezvousMeter;
-
-
-import net.jxta.meter.*;
-import net.jxta.peer.*;
-
-import net.jxta.util.documentSerializable.*;
-import net.jxta.document.*;
-import net.jxta.platform.*;
-import java.util.*;
-import net.jxta.util.*;
-import net.jxta.exception.*;
-import net.jxta.id.*;
-import java.net.*;
-
-
-/**
- * The Service Monitor Metric for the standard Rendezvous Service
- **/
-public class RendezvousServiceMetric implements ServiceMetric {
-    private RendezvousMetric rendezvousMetric;
-    private LinkedList rendezvousConnectionMetrics = new LinkedList();
-    private LinkedList clientConnectionMetrics = new LinkedList();
-    private ModuleClassID moduleClassID = MonitorResources.rendezvousServiceMonitorClassID;
-
-    /**
-     * Create a Service Metric: No-arg constructor is required 
-     **/
-    public RendezvousServiceMetric() {}
-       
-    private RendezvousServiceMetric(ModuleClassID moduleClassID) {
-        init(moduleClassID);
-    }
-
-    /**
-     *         Initialize the metric with the ModuleClassID of the Monitor
-     **/
-    public void init(ModuleClassID moduleClassID) { 
-        this.moduleClassID = moduleClassID;
-    }
-
-    /** Get the ModuleClassID of the Monitor that generated this ServiceMetric **/
-    public ModuleClassID getModuleClassID() {
-        return moduleClassID;
-    }
-
-    /**
-     * Get the General Rendezvous Metric
-     **/
-    public RendezvousMetric getRendezvousMetric() {
-        return rendezvousMetric;
-    }
-
-    void setRendezvousMetric(RendezvousMetric rendezvousMetric) { 
-        this.rendezvousMetric = rendezvousMetric; 
-    }
-
-    /**
-     * Append a Client Connection Metric 
-     **/
-    public void addClientConnectionMetric(ClientConnectionMetric clientConnectionMetric) {
-        synchronized (clientConnectionMetrics) {
-            clientConnectionMetrics.add(clientConnectionMetric);
-        }
-    }
-
-    /**
-     * Get all the Client Connection Metrics 
-     **/
-    public Iterator getClientConnectionMetrics() {
-        return clientConnectionMetrics.iterator();
-    }
-
-    void clearClientConnectionMetrics() {
-        clientConnectionMetrics.clear();
-    }
-
-    /**
-     * Get the Client Connection Metrics for a single Peers ID
-     **/
-    public ClientConnectionMetric getClientConnectionMetric(PeerID peerId) {
-        for (Iterator i = clientConnectionMetrics.iterator(); i.hasNext();) {
-            ClientConnectionMetric clientConnectionMetric = (ClientConnectionMetric) i.next();
-
-            if (peerId.equals(clientConnectionMetric.getPeerID())) {
-                return clientConnectionMetric;
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * Append a Rendezvous Connection Metric 
-     **/
-    public void addRendezvousConnectionMetric(RendezvousConnectionMetric rendezvousConnectionMetric) {
-        synchronized (rendezvousConnectionMetrics) {
-            rendezvousConnectionMetrics.add(rendezvousConnectionMetric);
-        }
-    }
-
-    /**
-     * Get all the Rendezvous Connection Metrics 
-     **/
-    public Iterator getRendezvousConnectionMetrics() {
-        return rendezvousConnectionMetrics.iterator();
-    }
-
-    void clearRendezvousConnectionMetrics() {
-        rendezvousConnectionMetrics.clear();
-    }
-
-    /**
-     * Get the Rendezvous Connection Metrics for each Peers ID
-     **/
-    public RendezvousConnectionMetric getRendezvousConnectionMetric(PeerID peerID) {
-        for (Iterator i = rendezvousConnectionMetrics.iterator(); i.hasNext();) {
-            RendezvousConnectionMetric rendezvousConnectionMetric = (RendezvousConnectionMetric) i.next();
-                       
-            if (peerID.equals(rendezvousConnectionMetric.getPeerID())) {
-                return rendezvousConnectionMetric;
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * {@inheritDoc}
-     **/
-    public void serializeTo(Element element) throws DocumentSerializationException {
-        if (rendezvousMetric != null) {
-            DocumentSerializableUtilities.addDocumentSerializable(element, "rendezvousMetric", rendezvousMetric);
-        }
-
-        for (Iterator i = clientConnectionMetrics.iterator(); i.hasNext();) {
-            ClientConnectionMetric clientConnectionMetric = (ClientConnectionMetric) i.next();
-
-            DocumentSerializableUtilities.addDocumentSerializable(element, "clientConnectionMetric", clientConnectionMetric);          
-        }
-
-        for (Iterator i = rendezvousConnectionMetrics.iterator(); i.hasNext();) {
-            RendezvousConnectionMetric rendezvousConnectionMetric = (RendezvousConnectionMetric) i.next();
-
-            DocumentSerializableUtilities.addDocumentSerializable(element, "rendezvousConnectionMetric"
-                    ,
-                    rendezvousConnectionMetric);               
-        }
-
-        if (moduleClassID != null) {
-            DocumentSerializableUtilities.addString(element, "moduleClassID", moduleClassID.toString());               
-        }
-
-    }
-
-    /**
-     * {@inheritDoc}
-     **/
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element childElement = (TextElement) e.nextElement();
-            String tagName = (String) childElement.getKey();
-                       
-            if (tagName.equals("clientConnectionMetric")) {
-                ClientConnectionMetric clientConnectionMetric = (ClientConnectionMetric) DocumentSerializableUtilities.getDocumentSerializable(
-                        childElement, ClientConnectionMetric.class);
-
-                clientConnectionMetrics.add(clientConnectionMetric);
-            } else if (tagName.equals("rendezvousConnectionMetric")) {
-                RendezvousConnectionMetric rendezvousConnectionMetric = (RendezvousConnectionMetric) DocumentSerializableUtilities.getDocumentSerializable(
-                        childElement, RendezvousConnectionMetric.class);
-
-                rendezvousConnectionMetrics.add(rendezvousConnectionMetric);
-            } else if (tagName.equals("rendezvousMetric")) {
-                rendezvousMetric = (RendezvousMetric) DocumentSerializableUtilities.getDocumentSerializable(childElement
-                        ,
-                        RendezvousMetric.class);
-            }
-            if (tagName.equals("moduleClassID")) {
-                try {
-                    moduleClassID = (ModuleClassID) IDFactory.fromURI(
-                            new URI(DocumentSerializableUtilities.getString(childElement)));
-                } catch (URISyntaxException jex) {
-                    throw new DocumentSerializationException("Can't read moduleClassID", jex);
-                }
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     **/
-    public void mergeMetrics(ServiceMetric otherServiceMetric) {
-        mergeMetrics(otherServiceMetric, true, true, true);
-    }
-
-    /**
-     * Make a deep copy of this metric only including the portions designated in the Filter
-     * The resulting metric is Safe to modify without danger to the underlying Monitor Metrics
-     * @param rendezvousServiceMonitorFilter Filter designates constituant parts to be included
-     * @return a copy of this metric with references to the designated parts
-     **/
-    public RendezvousServiceMetric deepCopy(RendezvousServiceMonitorFilter rendezvousServiceMonitorFilter) {
-        RendezvousServiceMetric serviceMetric = new RendezvousServiceMetric();
-
-        serviceMetric.moduleClassID = moduleClassID;
-
-        serviceMetric.mergeMetrics(this, true, rendezvousServiceMonitorFilter.isIncludeClientConnectionMetrics()
-                ,
-                rendezvousServiceMonitorFilter.isIncludeRendezvousConnectionMetrics());
-        return serviceMetric;  
-    } 
-
-    /**
-     * {@inheritDoc}
-     * <p> This will only merge the designated submetrics
-     * @param includeRendezvousMetric Include the basic Rendezvous Metric in the merge
-     * @param includeClientConnectionMetrics Include Client Connection Metrics in the merge
-     * @param includeRendezvousConnectionMetrics Include Rendezvous Connection Metrics in the merge
-     **/
-    public void mergeMetrics(ServiceMetric otherServiceMetric, boolean includeRendezvousMetric, boolean includeClientConnectionMetrics, boolean includeRendezvousConnectionMetrics) {
-        RendezvousServiceMetric otherRendezvousServiceMetric = (RendezvousServiceMetric) otherServiceMetric;
-
-        if (includeRendezvousMetric) {
-            RendezvousMetric otherRendezvousMetric = otherRendezvousServiceMetric.getRendezvousMetric();
-
-            if ((rendezvousMetric == null) && (otherRendezvousMetric != null)) {
-                rendezvousMetric = new RendezvousMetric(otherRendezvousMetric);
-            }
-
-            if (otherRendezvousMetric != null) { 
-                rendezvousMetric.mergeMetrics(otherRendezvousMetric);
-            }
-        }
-
-        if (includeClientConnectionMetrics) {
-            for (Iterator i = otherRendezvousServiceMetric.getClientConnectionMetrics(); i.hasNext();) {
-                ClientConnectionMetric otherClientConnectionMetric = (ClientConnectionMetric) i.next();
-                ClientConnectionMetric clientConnectionMetric = getClientConnectionMetric(otherClientConnectionMetric.getPeerID());
-                               
-                if (clientConnectionMetric == null) {
-                    clientConnectionMetric = new ClientConnectionMetric(otherClientConnectionMetric);
-                    addClientConnectionMetric(clientConnectionMetric);
-                }
-                                
-                clientConnectionMetric.mergeMetrics(otherClientConnectionMetric);                      
-            }
-        }
-
-        if (includeRendezvousConnectionMetrics) {
-            for (Iterator i = otherRendezvousServiceMetric.getRendezvousConnectionMetrics(); i.hasNext();) {
-                RendezvousConnectionMetric otherRendezvousConnectionMetric = (RendezvousConnectionMetric) i.next();
-                RendezvousConnectionMetric rendezvousConnectionMetric = getRendezvousConnectionMetric(
-                        otherRendezvousConnectionMetric.getPeerID());
-
-                if (rendezvousConnectionMetric == null) {
-                    rendezvousConnectionMetric = new RendezvousConnectionMetric(otherRendezvousConnectionMetric);
-                    addRendezvousConnectionMetric(rendezvousConnectionMetric);
-                }
-
-                rendezvousConnectionMetric.mergeMetrics(otherRendezvousConnectionMetric);                      
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     **/
-    public void diffMetrics(ServiceMetric otherOne) {
-        throw new RuntimeException("Not Supported");
-    }
-
-    /**
-     * Make a shallow copy of this metric only including the portions designated in the Filter
-     * <P> Note: since this is a shallow copy it is dangerous to modify the submetrics
-     * @param rendezvousServiceMonitorFilter Filter designates constituant parts to be included
-     * @return a copy of this metric with references to the designated parts
-     **/
-    public RendezvousServiceMetric shallowCopy(RendezvousServiceMonitorFilter rendezvousServiceMonitorFilter) {
-        RendezvousServiceMetric rendezvousServiceMetric = new RendezvousServiceMetric(moduleClassID);
-
-        rendezvousServiceMetric.rendezvousMetric = rendezvousMetric;
-               
-        if (rendezvousServiceMonitorFilter.isIncludeClientConnectionMetrics()) {
-            for (Iterator i = getClientConnectionMetrics(); i.hasNext();) {
-                ClientConnectionMetric clientConnectionMetric = (ClientConnectionMetric) i.next();
-
-                rendezvousServiceMetric.addClientConnectionMetric(clientConnectionMetric);
-            }
-        }
-
-        if (rendezvousServiceMonitorFilter.isIncludeRendezvousConnectionMetrics()) {
-            for (Iterator i = getRendezvousConnectionMetrics(); i.hasNext();) {
-                RendezvousConnectionMetric rendezvousConnectionMetric = (RendezvousConnectionMetric) i.next();
-
-                rendezvousServiceMetric.addRendezvousConnectionMetric(rendezvousConnectionMetric);
-            }
-        }
-
-        return rendezvousServiceMetric;        
-    }  
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/RendezvousServiceMonitor.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/RendezvousServiceMonitor.java
deleted file mode 100644 (file)
index 07e2cc9..0000000
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.rendezvous.rendezvousMeter;
-
-
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.impl.meter.GenericServiceMonitor;
-import net.jxta.impl.meter.MetricUtilities;
-import net.jxta.meter.ServiceMetric;
-import net.jxta.meter.ServiceMonitorFilter;
-import net.jxta.peer.PeerID;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.LinkedList;
-
-
-/**
- * The Service Monitor for the standard Rendezvous Service
- */
-public class RendezvousServiceMonitor extends GenericServiceMonitor {
-    private Hashtable<PeerID, ClientConnectionMeter> clientConnectionMeters = new Hashtable<PeerID, ClientConnectionMeter>();
-    private LinkedList<RendezvousConnectionMeter> rendezvousConnectionMeters = new LinkedList<RendezvousConnectionMeter>();
-
-    private RendezvousMeter rendezvousMeter = new RendezvousMeter();
-
-    private RendezvousServiceMetric cumulativeRendezvousServiceMetric;
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected void init() {
-        cumulativeRendezvousServiceMetric = (RendezvousServiceMetric) getCumulativeServiceMetric();
-        cumulativeRendezvousServiceMetric.setRendezvousMetric(rendezvousMeter.getCumulativeMetrics());
-    }
-
-    /**
-     * Get the General RendezvousMeter
-     * @return client RendezvousMeter
-     */
-    public RendezvousMeter getRendezvousMeter() {
-        return rendezvousMeter;
-    }
-
-    /**
-     * Get a Client Connection Meter
-     *
-     * @param endpointAddress containing Peer Id for the Meter
-     * @return client connection meter
-     */
-    public synchronized ClientConnectionMeter getClientConnectionMeter(EndpointAddress endpointAddress) {
-        PeerID peerID = MetricUtilities.getPeerIdFromEndpointAddress(endpointAddress);
-
-        return getClientConnectionMeter(peerID);
-    }
-
-    /**
-     * Get a Client Connection Meter
-     *
-     * @param peerId Peer Id for the Meter
-     * @return client connection meter
-     */
-    public synchronized ClientConnectionMeter getClientConnectionMeter(PeerID peerId) {
-        ClientConnectionMeter clientConnectionMeter = clientConnectionMeters.get(peerId);
-
-        if (clientConnectionMeter == null) {
-            clientConnectionMeter = new ClientConnectionMeter(peerId);
-            clientConnectionMeters.put(peerId, clientConnectionMeter);
-            cumulativeRendezvousServiceMetric.addClientConnectionMetric(clientConnectionMeter.getCumulativeMetrics());
-        }
-
-        return clientConnectionMeter;
-    }
-
-    /**
-     * Get a Client Connection Meter
-     *
-     * @param peerIdString Peer Id as a String
-     * @return client connection meter
-     */
-    public synchronized ClientConnectionMeter getClientConnectionMeter(String peerIdString) {
-        PeerID peerID = MetricUtilities.getPeerIdFromString(peerIdString);
-
-        return getClientConnectionMeter(peerID);
-    }
-
-    /*
-     public synchronized void removeClientConnectionMeter(String peerId) {
-     clientConnectionMeters.remove(peerId);
-     }
-     */
-
-    /**
-     * Get a Rendezvous Connection Meter
-     *
-     * @param peerIdStr Peer Id for the Meter as a String
-     * @return  the Rendezvous Connection Meter
-     */
-    public synchronized RendezvousConnectionMeter getRendezvousConnectionMeter(String peerIdStr) {
-        PeerID peerID = MetricUtilities.getPeerIdFromString(peerIdStr);
-
-        return getRendezvousConnectionMeter(peerID);
-    }
-
-    /**
-     * Get a Rendezvous Connection Meter
-     *
-     * @param peerID Peer Id for the Meter
-     * @return  the Rendezvous Connection Meter
-     */
-    public synchronized RendezvousConnectionMeter getRendezvousConnectionMeter(PeerID peerID) {
-        if (peerID == null) {
-            peerID = MetricUtilities.BAD_PEERID;
-        }
-
-        for (Object rendezvousConnectionMeter1 : rendezvousConnectionMeters) {
-            RendezvousConnectionMeter rendezvousConnectionMeter = (RendezvousConnectionMeter) rendezvousConnectionMeter1;
-
-            if (peerID.equals(rendezvousConnectionMeter.getPeerID())) {
-                return rendezvousConnectionMeter;
-            }
-        }
-
-        RendezvousConnectionMeter rendezvousConnectionMeter = new RendezvousConnectionMeter(peerID);
-
-        rendezvousConnectionMeters.add(rendezvousConnectionMeter);
-        cumulativeRendezvousServiceMetric.addRendezvousConnectionMetric(rendezvousConnectionMeter.getCumulativeMetrics());
-
-        return rendezvousConnectionMeter;
-    }
-
-    /*
-     public synchronized void removeRendezvousConnectionMeter(PeerID peerID) {
-     if (peerID == null)
-     return;
-     
-     for (Iterator i = rendezvousConnectionMeters.iterator(); i.hasNext(); ) {
-     RendezvousConnectionMeter rendezvousConnectionMeter = (RendezvousConnectionMeter)i.next();
-     if (peerID.equals(rendezvousConnectionMeter.getPeerID())) {
-     i.remove();
-     return;
-     }
-     }
-     }
-     */
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected synchronized ServiceMetric collectServiceMetrics() {
-        RendezvousServiceMetric rendezvousServiceMetric = (RendezvousServiceMetric) createServiceMetric();
-
-        boolean anyData = false;
-
-        for (Enumeration<ClientConnectionMeter> e = clientConnectionMeters.elements(); e.hasMoreElements();) {
-            ClientConnectionMeter clientConnectionMeter = e.nextElement();
-            ClientConnectionMetric clientConnectionMetric = clientConnectionMeter.collectMetrics(); // clears delta from meter
-
-            if (clientConnectionMetric != null) {
-                rendezvousServiceMetric.addClientConnectionMetric(clientConnectionMetric);
-                anyData = true;
-            }
-        }
-
-        for (RendezvousConnectionMeter rendezvousConnectionMeter : rendezvousConnectionMeters) {
-            RendezvousConnectionMetric rendezvousConnectionMetric = rendezvousConnectionMeter.collectMetrics(); // clears delta from meter
-
-            if (rendezvousConnectionMetric != null) {
-                rendezvousServiceMetric.addRendezvousConnectionMetric(rendezvousConnectionMetric);
-                anyData = true;
-            }
-        }
-
-        RendezvousMetric rendezvousMetric = rendezvousMeter.collectMetrics();
-
-        if (rendezvousMetric != null) {
-            rendezvousServiceMetric.setRendezvousMetric(rendezvousMetric);
-            anyData = true;
-        }
-
-        if (anyData) {
-            return rendezvousServiceMetric;
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public ServiceMetric getServiceMetric(ServiceMonitorFilter serviceMonitorFilter, long fromTime, long toTime, int pulseIndex, long reportRate) {
-        int deltaReportRateIndex = monitorManager.getReportRateIndex(reportRate);
-        RendezvousServiceMetric origMetric = (RendezvousServiceMetric) deltaServiceMetrics[deltaReportRateIndex];
-
-        if (origMetric == null) {
-            return null;
-        }
-
-        RendezvousServiceMonitorFilter rendezvousServiceMonitorFilter = (RendezvousServiceMonitorFilter) serviceMonitorFilter;
-
-        return origMetric.shallowCopy(rendezvousServiceMonitorFilter);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public ServiceMetric getCumulativeServiceMetric(ServiceMonitorFilter serviceMonitorFilter, long fromTime, long toTime) {
-        RendezvousServiceMonitorFilter rendezvousServiceMonitorFilter = (RendezvousServiceMonitorFilter) serviceMonitorFilter;
-        RendezvousServiceMetric origMetric = (RendezvousServiceMetric) getCumulativeServiceMetric();
-
-        return origMetric.deepCopy(rendezvousServiceMonitorFilter);
-    }
-
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/RendezvousServiceMonitorFilter.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rendezvousMeter/RendezvousServiceMonitorFilter.java
deleted file mode 100644 (file)
index 25c8218..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.rendezvous.rendezvousMeter;
-
-
-import net.jxta.meter.*;
-import net.jxta.platform.*;
-import net.jxta.document.*;
-import net.jxta.util.documentSerializable.*;
-import java.util.*;
-import net.jxta.util.*;
-import net.jxta.exception.*;
-import java.net.*;
-import net.jxta.id.IDFactory;
-
-
-public class RendezvousServiceMonitorFilter implements ServiceMonitorFilter {
-    private boolean includeClientConnectionMetrics = true;
-    private boolean includeRendezvousConnectionMetrics = true;
-    private ModuleClassID moduleClassID = MonitorResources.rendezvousServiceMonitorClassID;
-
-    public ModuleClassID getModuleClassID() {
-        return moduleClassID; 
-    }
-
-    public RendezvousServiceMonitorFilter() {}
-
-    public void init(ModuleClassID moduleClassID) {
-        this.moduleClassID = moduleClassID;
-    }
-
-    public boolean isIncludeClientConnectionMetrics() {
-        return includeClientConnectionMetrics;
-    }
-
-    public boolean isIncludeRendezvousConnectionMetrics() {
-        return includeRendezvousConnectionMetrics;
-    }
-
-    public void setIncludeClientConnectionMetrics(boolean includeClientConnectionMetrics) { 
-        this.includeClientConnectionMetrics = includeClientConnectionMetrics;
-    }
-       
-    public void setIncludeRendezvousConnectionMetrics(boolean includeClientConnectionMetrics) { 
-        this.includeRendezvousConnectionMetrics = includeClientConnectionMetrics; 
-    }
-       
-    public void serializeTo(Element element) throws DocumentSerializationException {
-        DocumentSerializableUtilities.addBoolean(element, "includeClientConnectionMetrics", includeClientConnectionMetrics);
-        DocumentSerializableUtilities.addBoolean(element, "includeRendezvousConnectionMetrics", includeRendezvousConnectionMetrics);
-        if (moduleClassID != null) {
-            DocumentSerializableUtilities.addString(element, "moduleClassID", moduleClassID.toString());               
-        }
-    }
-
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element childElement = (TextElement) e.nextElement();
-            String tagName = (String) childElement.getKey();
-                       
-            if (tagName.equals("includeClientConnectionMetrics")) { 
-                includeClientConnectionMetrics = DocumentSerializableUtilities.getBoolean(childElement);
-            } else if (tagName.equals("includeRendezvousConnectionMetrics")) { 
-                includeRendezvousConnectionMetrics = DocumentSerializableUtilities.getBoolean(childElement);
-            } else if (tagName.equals("moduleClassID")) {
-                try {
-                    moduleClassID = (ModuleClassID) IDFactory.fromURI(
-                            new URI((DocumentSerializableUtilities.getString(childElement))));
-                } catch (URISyntaxException jex) {
-                    throw new DocumentSerializationException("Can't read moduleClassID", jex);
-                }
-            }
-        }
-    }
-       
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerView.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerView.java
deleted file mode 100644 (file)
index 44b006d..0000000
+++ /dev/null
@@ -1,2067 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Micro//Systems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous.rpv;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.NoSuchElementException;
-import java.util.Random;
-import java.util.Set;
-import java.util.SortedSet;
-import java.util.Timer;
-import java.util.TimerTask;
-import java.util.TreeSet;
-import java.util.Vector;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.XMLDocument;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointListener;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.Messenger;
-import net.jxta.endpoint.StringMessageElement;
-import net.jxta.endpoint.TextDocumentMessageElement;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.logging.Logging;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.pipe.InputPipe;
-import net.jxta.pipe.OutputPipe;
-import net.jxta.pipe.PipeID;
-import net.jxta.pipe.PipeMsgEvent;
-import net.jxta.pipe.PipeMsgListener;
-import net.jxta.pipe.PipeService;
-import net.jxta.protocol.ConfigParams;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.PipeAdvertisement;
-import net.jxta.protocol.RdvAdvertisement;
-import net.jxta.protocol.RouteAdvertisement;
-import net.jxta.rendezvous.RendezvousEvent;
-import net.jxta.rendezvous.RendezvousListener;
-
-import net.jxta.impl.endpoint.EndpointUtils;
-import net.jxta.impl.endpoint.relay.RelayReferralSeedingManager;
-import net.jxta.impl.protocol.RdvConfigAdv;
-import net.jxta.impl.rendezvous.RendezVousServiceImpl;
-import net.jxta.impl.util.SeedingManager;
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.impl.util.URISeedingManager;
-
-/**
- * This class models a Rendezvous Peer View (RPV):
- * ordered collection of all other Rendezvous Peers visible to
- * this peer.
- * <p/>
- * Presently this class implements a random "diffusion" algorithm
- * where each Peer periodically selects a randomly selected peer advertisement
- * from its view and sends it over to a randomly selected peer from its view.
- * Over time, this causes every peer to learn about every other peer, resulting
- * in a "converged" peer view.
- * <p/>
- * This diffusion process is bootstrapped by every peer sending their
- * own peer advertisements to some well-known, stable, "seed" peers on
- * startup.
- */
-public final class PeerView implements EndpointListener, RendezvousListener {
-
-    /**
-     * Logger
-     */
-    private static final transient Logger LOG = Logger.getLogger(PeerView.class.getName());
-
-    /**
-     * Our service name
-     */
-    static final String SERVICE_NAME = "PeerView";
-
-    /**
-     * Namespace used for rdv message elements.
-     */
-    static final String MESSAGE_NAMESPACE = "jxta";
-
-    /**
-     * Element name of outgoing messages. Note that the element contains a
-     * RdvAvertisement and <emphasis>not</emphasis> a Peer Advertisement.
-     */
-    static final String MESSAGE_ELEMENT_NAME = "PeerView.PeerAdv";
-
-    /**
-     * Element name of responses. Note that the element contains a
-     * RdvAvertisement and <emphasis>not</emphasis> a Peer Advertisement.
-     */
-    static final String RESPONSE_ELEMENT_NAME = "PeerView.PeerAdv.Response";
-
-    /**
-     * Message element name for PeerView "Cached" Message Element
-     */
-    static final String CACHED_RADV_ELEMENT_NAME = "PeerView.Cached";
-
-    /**
-     * Optional message element that specifies by its presence in a peerview
-     * message that the referenced peer is not the provider of the
-     * RdvAdvertisement and the advertisement is a "hint" or referral from the
-     * responding peer.
-     * <p/>
-     * In practice, when sending its own RdvAdvertisement, a peer does not
-     * include this element, but when sending another peer's RdvAdvertisement,
-     * this element is included.
-     */
-    static final MessageElement CACHED_RADV_ELEMENT = new StringMessageElement(CACHED_RADV_ELEMENT_NAME, Boolean.TRUE.toString(), null);
-
-    /**
-     * Message element name that specifies the route advertisement of the
-     * source of the message.
-     */
-    static final String SRCROUTEADV_ELEMENT_NAME = "PeerView.SrcRouteAdv";
-
-    /**
-     * Message element name for PeerView "Edge" Message Element
-     */
-    static final String EDGE_ELEMENT_NAME = "PeerView.EdgePeer";
-
-    /**
-     * Optional message element that specifies by its presence in a peerview
-     * message that the referenced peer is an edge peer and not a member of the
-     * peerview.
-     */
-    static final MessageElement EDGE_ELEMENT = new StringMessageElement(EDGE_ELEMENT_NAME, Boolean.TRUE.toString(), null);
-
-    /**
-     * Message element name for PeerView "Failure" Message Element
-     */
-    static final String FAILURE_ELEMENT_NAME = "PeerView.Failure";
-
-    /**
-     * Optional message element that specifies by its presence in a peerview
-     * message that the referenced peer has either failed or is quitting. If the
-     * "cached" element is also set then the error is being reported by a third
-     * party.
-     */
-    static final MessageElement FAILURE_ELEMENT = new StringMessageElement(FAILURE_ELEMENT_NAME, Boolean.TRUE.toString(), null);
-
-    /**
-     * This is the interval between adv exchange in seconds. This is
-     * the main tunable runtime parameter for the diffusion
-     * process. An interval that is too low will improve view
-     * consistency at the expense of gratuitous network traffic. On
-     * the other hand, an interval that is too high will cause the
-     * view to become inconsistent. It is desirable to err on the side
-     * of extra traffic.
-     */
-    private static final long DEFAULT_SEEDING_PERIOD = 5 * TimeUtils.ASECOND;
-
-    private static final long WATCHDOG_PERIOD = 30 * TimeUtils.ASECOND;
-    private static final long WATCHDOG_GRACE_DELAY = 5 * TimeUtils.AMINUTE;
-
-    private static final long DEFAULT_BOOTSTRAP_KICK_INTERVAL = 3 * TimeUtils.ASECOND;
-
-    private static final int MIN_BOOTLEVEL = 0;
-    private static final int BOOTLEVEL_INCREMENT = 1;
-    private static final int MAX_BOOTLEVEL = 6;
-
-    /**
-     * DEFAULT_SEEDING_RDVPEERS
-     * <p/>
-     * This value is the maximum number of rendezvous peers that will be
-     * send our own advertisement at boot time.
-     */
-    //private static final int DEFAULT_SEEDING_RDVPEERS = 5;
-
-    private final PeerGroup group;
-    
-    /**
-     *  The group in which our propagate pipe will run.
-     */
-    private final PeerGroup advertisingGroup;
-    private final RendezVousServiceImpl rdvService;
-    private final EndpointService endpoint;
-
-    /**
-     * The name of this PeerView.
-     * <p/>
-     * FIXME 20040623 bondolo This should be a CodatID.
-     */
-    private final String name;
-
-    /**
-     * Delay in relative milliseconds to apply before contacting seeding rdvs.
-     * 0 is supposed to be reserved by RdvConfig to mean "use the default".
-     * However, it is in fact a valid value and also the one we want for the default.
-     * The only problem with that is that it is not possible to configure this value
-     * explicitly, should it one day not be the default. The issue is actually in RdvConfig.
-     */
-    private long seedingRdvConnDelay = 0;
-
-    private final boolean useOnlySeeds;
-
-    private final SeedingManager seedingManager;
-
-    /**
-     * If the peerview is smaller than this we will try harder to find
-     * additional peerview members.
-     */
-    private int minHappyPeerView = 4;
-
-    /**
-     * A single timer is used to periodically kick each PeerView
-     * into activity. For the Random PeerView, this activity consists
-     * of selecting a PeerViewElement at random from its view and
-     * sending it across to a randomly-selected peer from its view.
-     * <p/>
-     * FIXME 20021121 lomax
-     * <p/>
-     * The original idea of using a common timer in order to save threads IS a
-     * very good idea. However, limitations, and actually, bugs, in java.util.Timer
-     * creates the following problems when using a static Timer:
-     * <p/>
-     * <ul>
-     * <li>Memory Leak: Canceling a TimerTask does not remove it from the
-     * execution queue of the Timer until the Timer is canceled or the
-     * TimerTask is fired. Since most of the TimerTasks are inner classes
-     * this can mean that the PeerView is held around for a long time.</li>
-     * <p/>
-     * <li>java.util.Timer is not only not real-time (which is more or less fine
-     * for the PeerView, but it sequentially invokes tasks (only one Thread
-     * per Timer). As a result, tasks that takes a long time to run delays
-     * other tasks.</li>
-     * </ul>
-     * <p/>
-     * The PeerView would function better with a better Timer, but JDK does
-     * not provide a standard timer that would fulfill the needs of the
-     * PeerView. Maybe we should implement a JXTA Timer, since lots of the JXTA
-     * services, by being very asynchronous, rely on the same kind of timer
-     * semantics as the PeerView. Until then, creating a Timer per instance of
-     * the PeerView (i.e. per instance of joined PeerGroup) is the best
-     * workaround.
-     */
-    private final Timer timer;
-
-    /**
-     * A random number generator.
-     */
-    private final static Random random = new Random();
-
-    /**
-     * List of scheduled tasks
-     */
-    private final Set<TimerTask> scheduledTasks = Collections.synchronizedSet(new HashSet<TimerTask>());
-
-    /**
-     * Describes the frequency and amount of effort we will spend updating
-     * the peerview.
-     */
-    private int bootLevel = MIN_BOOTLEVEL;
-
-    /**
-     * Earliest absolute time in milliseconds at which we will allow a reseed
-     * to take place.
-     */
-    private long earliestReseed = 0L;
-
-    private final String uniqueGroupId;
-
-    /**
-     * Listeners for PeerView Events.
-     */
-    private final Set<PeerViewListener> rpvListeners = Collections.synchronizedSet(new HashSet<PeerViewListener>());
-
-    /**
-     * Used for querying for pves.
-     */
-    private InputPipe wirePipeInputPipe = null;
-
-    /**
-     * Used for querying for pves.
-     */
-    private OutputPipe wirePipeOutputPipe = null;
-
-    /**
-     * Used for notifications about pve failures.
-     */
-    private InputPipe localGroupWirePipeInputPipe = null;
-
-    /**
-     * Used for notifications about pve failures.
-     */
-    private OutputPipe localGroupWirePipeOutputPipe = null;
-
-    /**
-     * A task which monitors the up and down peers in the peerview.
-     */
-    private WatchdogTask watchdogTask = null;
-
-    /**
-     * This is the accumulated view by an instance of this class.
-     */
-    private final SortedSet<PeerViewDestination> localView = Collections.synchronizedSortedSet(new TreeSet<PeerViewDestination>());
-
-    /**
-     * PVE for ourself.
-     * <p/>
-     * FIXME bondolo 20041015 This should be part of the local view.
-     */
-    private final PeerViewElement self;
-    private PeerViewElement upPeer = null;
-    private PeerViewElement downPeer = null;
-
-    private final PeerViewStrategy replyStrategy;
-
-    private final PeerViewStrategy kickRecipientStrategy;
-
-    private final PeerViewStrategy kickAdvertisementStrategy;
-
-    private final PeerViewStrategy refreshRecipientStrategy;
-
-    // PeerAdv tracking.
-    private PeerAdvertisement lastPeerAdv = null;
-    private int lastModCount = -1;
-
-    private final PipeAdvertisement localGroupWirePipeAdv;
-    private final PipeAdvertisement advGroupPropPipeAdv;
-
-    /**
-     * If <code>true</code> then this Peer View instance is closed and is
-     * shutting down.
-     */
-    private volatile boolean closed = false;
-
-    /**
-     * Get an instance of PeerView for the specified PeerGroup and Service.
-     *
-     * @param group            Peer Group in which this Peer View instance operates.
-     * @param advertisingGroup Peer Group in which this Peer View instance will
-     *                         advertise and broadcast its existence.
-     * @param rdvService       The rdvService we are to use.
-     * @param name             The identifying name for this Peer View instance.
-     */
-    public PeerView(PeerGroup group, PeerGroup advertisingGroup, RendezVousServiceImpl rdvService, String name) {
-        this.group = group;
-        this.advertisingGroup = advertisingGroup;
-        this.rdvService = rdvService;
-        this.name = name;
-
-        this.endpoint = group.getEndpointService();
-
-        this.uniqueGroupId = group.getPeerGroupID().getUniqueValue().toString();
-
-        timer = new Timer("PeerView Timer for " + group.getPeerGroupID(), true);
-
-        Advertisement adv = null;
-        ConfigParams confAdv = group.getConfigAdvertisement();
-
-        // Get the config. If we do not have a config, we're done; we just keep
-        // the defaults (edge peer/no auto-rdv)
-        if (confAdv != null) {
-            try {
-                XMLDocument configDoc = (XMLDocument) confAdv.getServiceParam(rdvService.getAssignedID());
-
-                if (null != configDoc) {
-                    adv = AdvertisementFactory.newAdvertisement(configDoc);
-                }
-            } catch (java.util.NoSuchElementException failed) {// ignored
-            }
-        }
-
-        RdvConfigAdv rdvConfigAdv;
-
-        if (!(adv instanceof RdvConfigAdv)) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Creating new RdvConfigAdv for defaults.");
-            }
-
-            rdvConfigAdv = (RdvConfigAdv) AdvertisementFactory.newAdvertisement(RdvConfigAdv.getAdvertisementType());
-        } else {
-            rdvConfigAdv = (RdvConfigAdv) adv;
-        }
-
-        if (rdvConfigAdv.getSeedRendezvousConnectDelay() > 0) {
-            seedingRdvConnDelay = rdvConfigAdv.getSeedRendezvousConnectDelay();
-        }
-
-        useOnlySeeds = rdvConfigAdv.getUseOnlySeeds();
-
-        if (rdvConfigAdv.getMinHappyPeerView() > 0) {
-            minHappyPeerView = rdvConfigAdv.getMinHappyPeerView();
-        }
-
-        URISeedingManager seedingManager;
-
-        if ((null == advertisingGroup) && rdvConfigAdv.getProbeRelays()) {
-            seedingManager = new RelayReferralSeedingManager(rdvConfigAdv.getAclUri(), useOnlySeeds, group, name);
-        } else {
-            seedingManager = new URISeedingManager(rdvConfigAdv.getAclUri(), useOnlySeeds, group, name);
-        }
-
-        for (URI aSeeder : Arrays.asList(rdvConfigAdv.getSeedingURIs())) {
-            seedingManager.addSeedingURI(aSeeder);
-        }
-
-        for (URI aSeed : Arrays.asList(rdvConfigAdv.getSeedRendezvous())) {
-            seedingManager.addSeed(aSeed);
-        }
-
-        this.seedingManager = seedingManager;
-
-        lastPeerAdv = group.getPeerAdvertisement();
-        lastModCount = lastPeerAdv.getModCount();
-
-        // create a new local RdvAdvertisement and set it to self.
-        RdvAdvertisement radv = createRdvAdvertisement(lastPeerAdv, name);
-
-        self = new PeerViewElement(endpoint, radv);
-
-        // addPeerViewElement( self );
-
-        // setup endpoint listener
-        endpoint.addIncomingMessageListener(this, SERVICE_NAME, uniqueGroupId);
-
-        // add rendezvous listener
-        rdvService.addListener(this);
-
-        // initialize strategies
-        replyStrategy = new PeerViewRandomWithReplaceStrategy(localView);
-
-        kickRecipientStrategy = new PeerViewRandomStrategy(localView);
-
-        kickAdvertisementStrategy = new PeerViewRandomWithReplaceStrategy(localView);
-
-        refreshRecipientStrategy = new PeerViewSequentialStrategy(localView);
-
-        localGroupWirePipeAdv = makeWirePipeAdvertisement(group, group, name);
-
-        if (null != advertisingGroup) {
-            advGroupPropPipeAdv = makeWirePipeAdvertisement(advertisingGroup, group, name);
-        } else {
-            advGroupPropPipeAdv = null;
-        }
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info( "PeerView created for group \"" + group.getPeerGroupName() +
-                    "\" [" + group.getPeerGroupID() + "] name \"" + name + "\"");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Listener for "PeerView"/&lt;peergroup-unique-id> and propagate pipes.
-     */
-    public void processIncomingMessage(Message msg, EndpointAddress srcAddr, EndpointAddress dstAddr) {
-
-        // check what kind of message this is (response or not).
-        boolean isResponse = false;
-        MessageElement me = msg.getMessageElement(MESSAGE_NAMESPACE, MESSAGE_ELEMENT_NAME);
-
-        if (me == null) {
-            me = msg.getMessageElement(MESSAGE_NAMESPACE, RESPONSE_ELEMENT_NAME);
-            if (me == null) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Discarding damaged " + msg + ".");
-                }
-                return;
-            } else {
-                isResponse = true;
-            }
-        }
-
-        Advertisement adv;
-
-        try {
-            XMLDocument asDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(me);
-
-            adv = AdvertisementFactory.newAdvertisement(asDoc);
-        } catch (RuntimeException failed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed building rdv advertisement from message element", failed);
-            }
-            return;
-        } catch (IOException failed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed building rdv advertisement from message element", failed);
-            }
-            return;
-        }
-
-        if (!(adv instanceof RdvAdvertisement)) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Response does not contain radv (" + adv.getAdvertisementType() + ")");
-            }
-            return;
-        }
-
-        RdvAdvertisement radv = (RdvAdvertisement) adv;
-
-        if (null == radv.getRouteAdv()) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Rdv Advertisement does not contain route.");
-            }
-            return;
-        }
-
-        // See if we can find a src route adv in the message.
-        me = msg.getMessageElement(MESSAGE_NAMESPACE, SRCROUTEADV_ELEMENT_NAME);
-        if (me != null) {
-            try {
-                XMLDocument asDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(me);
-                Advertisement routeAdv = AdvertisementFactory.newAdvertisement(asDoc);
-
-                if (!(routeAdv instanceof RouteAdvertisement)) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Advertisement is not a RouteAdvertisement");
-                    }
-                } else {
-                    RouteAdvertisement rdvRouteAdv = radv.getRouteAdv().clone();
-
-                    // XXX we stich them together even if in the end it gets optimized away
-                    RouteAdvertisement.stichRoute(rdvRouteAdv, (RouteAdvertisement) routeAdv);
-                    radv.setRouteAdv(rdvRouteAdv);
-                }
-            } catch (RuntimeException failed) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failed building route adv from message element", failed);
-                }
-            } catch (IOException failed) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failed building route adv from message element", failed);
-                }
-            }
-        }
-        me = null;
-
-        // Is this a message about ourself?
-        if (group.getPeerID().equals(radv.getPeerID())) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Received a PeerView message about self. Discard.");
-            }
-
-            return;
-        }
-
-        // Collect the various flags.
-
-        boolean isFailure = (msg.getMessageElement(MESSAGE_NAMESPACE, FAILURE_ELEMENT_NAME) != null);
-        boolean isCached = (msg.getMessageElement(MESSAGE_NAMESPACE, CACHED_RADV_ELEMENT_NAME) != null);
-        boolean isFromEdge = (msg.getMessageElement(MESSAGE_NAMESPACE, EDGE_ELEMENT_NAME) != null);
-        boolean isTrusted = isFromEdge || seedingManager.isAcceptablePeer(radv.getRouteAdv());
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            String srcPeer = srcAddr.toString();
-
-            if ("jxta".equals(srcAddr.getProtocolName())) {
-                try {
-                    String idstr = ID.URIEncodingName + ":" + ID.URNNamespace + ":" + srcAddr.getProtocolAddress();
-
-                    ID asID = IDFactory.fromURI(new URI(idstr));
-
-                    PeerViewElement pve = getPeerViewElement(asID);
-
-                    if (null != pve) {
-                        srcPeer = "\"" + pve.getRdvAdvertisement().getName() + "\"";
-                    }
-                } catch (URISyntaxException failed) {// ignored
-                }
-            }
-
-            LOG.fine(
-                    "[" + group.getPeerGroupID() + "] Received a" + (isCached ? " cached" : "") + (isResponse ? " response" : "")
-                    + (isFailure ? " failure" : "") + " message (" + msg.toString() + ")" + (isFromEdge ? " from edge" : "")
-                    + " regarding \"" + radv.getName() + "\" from " + srcPeer);
-        }
-
-        if (!isTrusted) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Rejecting peerview message from " + radv.getPeerID());
-            }
-            return;
-        }
-
-        // if this is a notification failure. All we have to do is locally
-        // process the failure
-        if (isFailure) {
-            notifyFailure(radv.getPeerID(), false);
-            return;
-        }
-
-        handlePeerViewMessage(isResponse, isCached, isFromEdge, isTrusted, radv);
-    }
-
-    /**
-     * Following the extraction of a peerview message from a
-     */
-    private void handlePeerViewMessage(boolean isResponse, boolean isCached, boolean isFromEdge, boolean isTrusted, RdvAdvertisement radv) {
-
-        // Figure out if we know that peer already. If we do, reuse the pve
-        // that we have.
-        boolean isNewbie = false;
-        boolean added = false;
-        PeerViewElement pve;
-
-        synchronized (localView) {
-            PeerViewElement newbie = new PeerViewElement(endpoint, radv);
-
-            pve = getPeerViewElement(newbie);
-
-            if (null == pve) {
-                pve = newbie;
-                isNewbie = true;
-            }
-
-            if (!isFromEdge && !isCached && isTrusted) {
-                if (isNewbie) {
-                    added = addPeerViewElement(pve);
-                } else {
-                    pve.setRdvAdvertisement(radv);
-                }
-            }
-        }
-
-        if (!isNewbie && isFromEdge && !isCached) {
-            // The message stated that it is from an edge we believed was a 
-            // peerview member. Best thing to do is tell everyone that it's no 
-            // longer in peerview.
-            notifyFailure(pve, true);
-            // we continue processing because it's not the other peer's fault we had the wrong idea.
-        }
-
-        // Do the rest of the add related tasks out of synch.
-        // We must not nest any possibly synchronized ops in
-        // the LocalView lock; it's the lowest level.
-
-        if (added) {
-            // Notify local listeners
-            generateEvent(PeerViewEvent.ADD, pve);
-        }
-
-        /*
-         * Now, see what if any message we have to send as a result.
-         * There are three kinds of messages we can send:
-         *
-         * - A response with ourselves, if we're being probed and we're
-         * a rdv.
-         *
-         * - A probe to the peer whose adv we received, because we want
-         * confirmation that it's alive.
-         *
-         * - A response with a random adv from our cache if we're being probed
-         *
-         * We may send more than one message.
-         */
-
-        boolean status;
-
-        if (!isCached) {
-            if (!isResponse) {
-                // Type 1: Respond to probe
-                //
-                // We are being probed by an edge peer or peerview member. We respond
-                // with our own advertisement.
-                status = send(pve, self, true, false);
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Type 1 (Respond with self PVE) : Sent to " + pve + " result =" + status);
-                }
-
-                // Type 3: Respond with random entry from our PV when we are probed.
-                //
-                // Respond with a strategized adv from our view.
-                PeerViewElement sendpve = replyStrategy.next();
-
-                if ((sendpve != null) && !pve.equals(sendpve) && !self.equals(sendpve)) {
-                    status = send(pve, sendpve, true, false);
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Type 3 (Respond with random PVE) : Sent " + sendpve + " to " + pve + " result=" + status);
-                    }
-                }
-            } else {
-                // Heartbeat: do nothing.
-            }
-        } else if (isResponse) {
-            if (isNewbie && !useOnlySeeds && !isFromEdge) {
-                // Type 2: Probe a peer we have just learned about from a referral.
-                //
-                // If useOnlySeeds, we're not allowed to talk to peers other than our 
-                // seeds, so do not probe anything we learn from 3rd party. (Probing of
-                // seeds happens as part of the "kick" strategy).
-                status = send(pve, self, false, false);
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Type 2 (Probe PVE) : Probed " + pve + " result=" + status);
-                }
-            } else {
-                // Already known or ignoring: do nothing.
-            }
-        } else {
-            // Invalid : do nothing.
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @SuppressWarnings("fallsthrough")
-    public void rendezvousEvent(RendezvousEvent event) {
-
-        if (closed) {
-            return;
-        }
-
-        boolean notifyFailure = false;
-
-        synchronized (this) {
-
-            int theEventType = event.getType();
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("[" + group.getPeerGroupName() + "] Processing  " + event);
-            }
-
-            refreshSelf();
-
-            if ((RendezvousEvent.BECAMERDV == theEventType) || (RendezvousEvent.BECAMEEDGE == theEventType)) {
-                // kill any existing watchdog task
-                if (null != watchdogTask) {
-                    removeTask(watchdogTask);
-                    watchdogTask.cancel();
-                    watchdogTask = null;
-                }
-            }
-
-            switch (theEventType) {
-            case RendezvousEvent.RDVCONNECT:
-            case RendezvousEvent.RDVRECONNECT:
-            case RendezvousEvent.CLIENTCONNECT:
-            case RendezvousEvent.CLIENTRECONNECT:
-            case RendezvousEvent.RDVFAILED:
-            case RendezvousEvent.RDVDISCONNECT:
-            case RendezvousEvent.CLIENTFAILED:
-            case RendezvousEvent.CLIENTDISCONNECT:
-                break;
-
-            case RendezvousEvent.BECAMERDV:
-                openWirePipes();
-                watchdogTask = new WatchdogTask();
-                addTask(watchdogTask, WATCHDOG_PERIOD, WATCHDOG_PERIOD);
-                rescheduleKick(true);
-                break;
-
-            case RendezvousEvent.BECAMEEDGE:
-                openWirePipes();
-                if (!localView.isEmpty()) {
-                    // FIXME bondolo 20040229 since we likely don't have a
-                    // rendezvous connection, it is kind of silly to be sending
-                    // this now. probably should wait until we get a rendezvous
-                    // connection.
-                    notifyFailure = true;
-                }
-                rescheduleKick(true);
-                break;
-
-            default:
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("[" + group.getPeerGroupName() + "] Unexpected RDV event : " + event);
-                }
-                break;
-            }
-        }
-
-        // we can't do the notification under synchronization.
-        if (notifyFailure) {
-            notifyFailure(self, true);
-        }
-    }
-
-    public void start() {// do nothing for now... all the good stuff happens as a result of
-        // rendezvous events.
-    }
-
-    public void stop() {
-
-        synchronized (this) {
-            // Only one thread gets to perform the shutdown.
-            if (closed) {
-                return;
-            }
-            closed = true;
-        }
-
-        // notify other rendezvous peers that we are going down
-        notifyFailure(self, true);
-
-        // From now on we can nullify everything we want. Other threads check
-        // the closed flag where it matters.
-        synchronized (this) {
-            if (watchdogTask != null) {
-                removeTask(watchdogTask);
-                watchdogTask.cancel();
-                watchdogTask = null;
-            }
-
-            // Remove message listener.
-            endpoint.removeIncomingMessageListener(SERVICE_NAME, uniqueGroupId);
-
-            // Remove rendezvous listener.
-            rdvService.removeListener(this);
-
-            // Remove all our pending scheduled tasks
-            // Carefull with the indices while removing: do it backwards, it's
-            // cheaper and simpler.
-
-            synchronized (scheduledTasks) {
-                Iterator<TimerTask> eachTask = scheduledTasks.iterator();
-
-                while (eachTask.hasNext()) {
-                    try {
-                        TimerTask task = eachTask.next();
-
-                        task.cancel();
-                        eachTask.remove();
-                    } catch (Exception ez1) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.log(Level.WARNING, "Cannot cancel task: ", ez1);
-                        }
-                    }
-                }
-            }
-
-            // Make sure that we close our WirePipes
-            closeWirePipes();
-
-            // Let go of the up and down peers.
-            downPeer = null;
-            upPeer = null;
-            localView.clear();
-
-            timer.cancel();
-
-            rpvListeners.clear();
-        }
-    }
-
-    protected void addTask(TimerTask task, long delay, long interval) {
-
-        synchronized (scheduledTasks) {
-            if (scheduledTasks.contains(task)) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Task list already contains specified task.");
-                }
-            }
-            scheduledTasks.add(task);
-        }
-
-        if (interval >= 1) {
-            timer.schedule(task, delay, interval);
-        } else {
-            timer.schedule(task, delay);
-        }
-    }
-
-    protected void removeTask(TimerTask task) {
-        scheduledTasks.remove(task);
-    }
-
-    /**
-     * Adds the specified URI to the list of seeds. Even if useOnlySeeds is in
-     * effect, this seed may now be used, as if it was part of the initial
-     * configuration.
-     *
-     * @param seed the URI of the seed rendezvous.
-     */
-    public void addSeed(URI seed) {
-        if (seedingManager instanceof URISeedingManager) {
-            ((URISeedingManager) seedingManager).addSeed(seed);
-        }
-    }
-
-    /**
-     * Probe the specified peer immediately.
-     * <p/>
-     * Note: If "useOnlySeeds" is in effect and the peer is not a seed, any response to this probe will be ignored.
-     */
-    public boolean probeAddress(EndpointAddress address, RouteAdvertisement hint) {
-
-        PeerViewElement holdIt;
-
-        synchronized (localView) {
-            holdIt = self;
-        }
-
-        return send(address, hint, holdIt, false, false);
-    }
-
-    /**
-     * Send our own advertisement to all of the seed rendezvous.
-     */
-    public void seed() {
-        long reseedRemaining = earliestReseed - TimeUtils.timeNow();
-
-        if (reseedRemaining > 0) {
-            // Too early; the previous round is not even done.
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("Still Seeding for " + reseedRemaining + "ms.");
-            }
-            return;
-        }
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("New Seeding...");
-        }
-
-        // Schedule sending propagated query to our local network neighbors.
-        send(null, null, self, false, false);
-
-        long iterations = 0;
-
-        if (localView.size() < minHappyPeerView) {
-            // We only do these things if we don't have a "happy" Peer View.
-            // If the Peer View is already "happy" then we will use only
-            // Peer View referrals for learning of new entires.
-
-            List<RouteAdvertisement> seedRdvs = new ArrayList<RouteAdvertisement>(
-                    Arrays.asList(seedingManager.getActiveSeedRoutes()));
-
-            while (!seedRdvs.isEmpty()) {
-                RouteAdvertisement aSeed = seedRdvs.remove(0);
-
-                if (null == aSeed.getDestPeerID()) {
-                    // It is an incomplete route advertisement. We are going to assume that it is only a wrapper for a single ea.
-                    Vector<String> seed_eas = aSeed.getDest().getVectorEndpointAddresses();
-
-                    if (!seed_eas.isEmpty()) {
-                        EndpointAddress aSeedHost = new EndpointAddress(seed_eas.get(0));
-
-                        // XXX 20061220 bondolo We could check all of our current PVEs to make sure that this address is not already known.
-
-                        send(aSeedHost, null, self, false, false);
-                    }
-                } else {
-                    // We have a full route, send it to the virtual address of the route!
-                    // FIXME malveaux 20070816 Second part of conjunct can be removed once 'self' is included in the peerview
-                    if ((null == getPeerViewElement(aSeed.getDestPeerID())) && !group.getPeerID().equals(aSeed.getDestPeerID())) {
-                        EndpointAddress aSeedHost = new EndpointAddress("jxta", aSeed.getDestPeerID().getUniqueValue().toString(),
-                                null, null);
-
-                        send(aSeedHost, aSeed, self, false, false);
-                    }
-                }
-            }
-
-            if (!useOnlySeeds) {
-                // If use only seeds, we're not allowed to put in the peerview
-                // anything but our seed rdvs. So, we've done everything that
-                // was required.
-
-                // Schedule sending propagated query to our advertising group
-                if (advertisingGroup != null) {
-                    // send it, but not immediately.
-                    scheduleAdvertisingGroupQuery(DEFAULT_SEEDING_PERIOD * 2);
-                }
-            }
-        }
-
-        earliestReseed = TimeUtils.toAbsoluteTimeMillis(seedingRdvConnDelay + (DEFAULT_SEEDING_PERIOD * iterations));
-    }
-
-    /**
-     * Make sure that the PeerView properly changes behavior, when switching
-     * from edge mode to rdv mode, and vice-versa.
-     * Since openWirePipes() requires some other services such as the Pipe
-     * Service, and since updateStatus is invoked this work must happen in
-     * background, giving a chance to other services to be started.
-     */
-    private class OpenPipesTask extends TimerTask {
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public void run() {
-            try {
-                if (closed) {
-                    return;
-                }
-
-                openWirePipes();
-            } catch (Throwable all) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Uncaught Throwable in thread: " + Thread.currentThread().getName(), all);
-                }
-            } finally {
-                removeTask(this);
-            }
-        }
-    }
-
-    private void scheduleOpenPipes(long delay) {
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Scheduling open pipes attempt in " + delay + "ms.");
-        }
-
-        addTask(new OpenPipesTask(), delay, -1);
-    }
-
-    /**
-     * Send a PeerView Message to the specified peer.
-     *
-     * @param response indicates whether this is a response. Otherwise
-     *                 we may create a distributed loop where peers keep perpetually
-     *                 responding to each-other.
-     * @param failure  Construct the message as a failure notification.
-     */
-    private boolean send(PeerViewElement dest, PeerViewElement pve, boolean response, boolean failure) {
-
-        Message msg = makeMessage(pve, response, failure);
-
-        boolean result = dest.sendMessage(msg, SERVICE_NAME, uniqueGroupId);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Sending " + msg + " to " + dest + " success = " + result);
-        }
-
-        return result;
-    }
-
-    /**
-     * Send a PeerView Message to the specified peer.
-     *
-     * @param response indicates whether this is a response. Otherwise
-     *                 we may create a distributed loop where peers keep perpetually
-     *                 responding to each-other.
-     * @param failure  Construct the message as a failure notification.
-     */
-    private boolean send(EndpointAddress dest, RouteAdvertisement hint, PeerViewElement pve, boolean response, boolean failure) {
-
-        Message msg = makeMessage(pve, response, failure);
-
-        if (null != dest) {
-            EndpointAddress realAddr = new EndpointAddress(dest, SERVICE_NAME, uniqueGroupId);
-
-            Messenger messenger = rdvService.endpoint.getMessengerImmediate(realAddr, hint);
-
-            if (null != messenger) {
-                try {
-                    boolean result = messenger.sendMessage(msg);
-
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Sending " + msg + " to " + dest + " success = " + result);
-                    }
-
-                    return result;
-                } catch (IOException failed) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Could not send " + msg + " to " + dest, failed);
-                    }
-                    return false;
-                }
-            } else {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Could not get messenger for " + dest);
-                }
-
-                return false;
-            }
-        } else {
-            // Else, propagate the message.
-            try {
-                endpoint.propagate(msg, SERVICE_NAME, uniqueGroupId);
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Sent " + msg + " via propagate");
-                }
-                return true;
-            } catch (IOException ez) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    // Pretty strange. This has little basis for failure...
-                    LOG.log(Level.WARNING, "Could not propagate " + msg, ez);
-                }
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Send a PeerView Message to the specified peer.
-     *
-     * @param response indicates whether this is a response. Otherwise
-     *                 we may create a distributed loop where peers keep perpetually
-     *                 responding to each-other.
-     * @param failure  Construct the message as a failure notification.
-     * @param dest destination output pipe
-     * @param pve the peer view element
-     * @return  true if successful
-     */
-    private boolean send(OutputPipe dest, PeerViewElement pve, boolean response, boolean failure) {
-
-        Message msg = makeMessage(pve, response, failure);
-
-        try {
-            return dest.send(msg);
-        } catch (IOException ez) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Could not send " + msg, ez);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Make a PeerView Message
-     *
-     * @param content the peer view element
-     * @param response the response
-     * @param failure whether to create a message based on a failure
-     * @return the message
-     */
-    private Message makeMessage(PeerViewElement content, boolean response, boolean failure) {
-
-        Message msg = new Message();
-
-        // // edge peers add an identifying element, RDV peers do not
-        // if (!rdvService.isRendezVous()) {
-        // msg.addMessageElement(MESSAGE_NAMESPACE, EDGE_ELEMENT);
-        // }
-        //
-        if (failure) {
-            // This is a failure notification.
-            msg.addMessageElement(MESSAGE_NAMESPACE, FAILURE_ELEMENT);
-        }
-
-        refreshSelf();
-
-        RdvAdvertisement radv = content.getRdvAdvertisement();
-
-        XMLDocument doc = (XMLDocument) radv.getDocument(MimeMediaType.XMLUTF8);
-        String msgName = response ? RESPONSE_ELEMENT_NAME : MESSAGE_ELEMENT_NAME;
-
-        MessageElement msge = new TextDocumentMessageElement(msgName, doc, null);
-
-        msg.addMessageElement(MESSAGE_NAMESPACE, msge);
-
-        if (!content.equals(self)) {
-            // This is a cached RdvAdvertisement
-            msg.addMessageElement(MESSAGE_NAMESPACE, CACHED_RADV_ELEMENT);
-
-            // This message contains an RdvAdvertisement which is not ourself. In that
-            // case, it is wise to also send the local route advertisement (as the optional
-            // SrcRdvAdv) so the destination might have a better change to access the "content"
-            // RendezvousAdv (this peer will then act as a hop).
-
-            RouteAdvertisement localra = EndpointUtils.extractRouteAdv(lastPeerAdv);
-
-            if (localra != null) {
-                try {
-                    XMLDocument radoc = (XMLDocument) localra.getDocument(MimeMediaType.XMLUTF8);
-
-                    msge = new TextDocumentMessageElement(SRCROUTEADV_ELEMENT_NAME, radoc, null);
-                    msg.addMessageElement(MESSAGE_NAMESPACE, msge);
-                } catch (Exception ez1) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Could not create optional src route adv for " + content, ez1);
-                    }
-                }
-            }
-        }
-
-        return msg;
-    }
-
-    /**
-     * Invoked by anyone in order to inform the PeerView of a failure
-     * of one of the member peers.
-     *
-     * @param pid              ID of the peer which failed.
-     * @param propagateFailure If <tt>true</tt>then broadcast the failure to
-     *                         other peers otherwise only update the local peerview.
-     */
-    public void notifyFailure(PeerID pid, boolean propagateFailure) {
-
-        PeerViewElement pve = getPeerViewElement(pid);
-
-        if (null != pve) {
-            notifyFailure(pve, propagateFailure);
-        }
-    }
-
-    /**
-     * Invoked when a peerview member peer becomes unreachable.
-     *
-     * @param pve              The peer which failed.
-     * @param propagateFailure If {@code true} then broadcast the failure to
-     *                         other peers otherwise only update the local peerview.
-     */
-    void notifyFailure(PeerViewElement pve, boolean propagateFailure) {
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Notifying failure of " + pve);
-        }
-
-        try {
-            boolean removedFromPeerView = removePeerViewElement(pve);
-
-            // only propagate if we actually knew of the peer
-            propagateFailure &= (removedFromPeerView || (self == pve));
-
-            // Notify local listeners
-            if (removedFromPeerView) {
-                generateEvent(PeerViewEvent.FAIL, pve);
-            }
-
-            boolean emptyPeerView = localView.isEmpty();
-
-            // If the local view has become empty, reset the kicker into
-            // a seeding mode.
-            if (emptyPeerView && removedFromPeerView) {
-                rescheduleKick(true);
-            }
-
-            if (propagateFailure) {
-                // Notify other rendezvous peers that there has been a failure.
-                OutputPipe op = localGroupWirePipeOutputPipe;
-
-                if (null != op) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Propagating failure of " + pve);
-                    }
-
-                    send(op, pve, true, true);
-                }
-            }
-        } catch (Exception ez) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failure while generating noficiation of failure of PeerView : " + pve, ez);
-            }
-        }
-    }
-
-    /**
-     * Invoked by the Timer thread to cause each PeerView to initiate
-     * a Peer Advertisement exchange.
-     */
-    private void kick() {
-
-        try {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Begun kick() in " + group.getPeerGroupID());
-            }
-
-            // Use seed strategy. (it has its own throttling and resource limiting).
-            seed();
-
-            // refresh ourself to a peer in our view
-            PeerViewElement refreshee = refreshRecipientStrategy.next();
-
-            if ((refreshee != null) && (self != refreshee)) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Refresh " + refreshee);
-                }
-                send(refreshee, self, false, false);
-            }
-
-            // now share an adv from our local view to another peer from our
-            // local view.
-
-            PeerViewElement recipient = kickRecipientStrategy.next();
-
-            if (recipient == null) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("No recipient to send adv ");
-                }
-                return;
-            }
-
-            PeerViewElement rpve = kickAdvertisementStrategy.next();
-
-            if (rpve == null) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("No adv to send");
-                }
-                return;
-            }
-
-            if (rpve.equals(recipient) || self.equals(recipient)) {
-                // give up: no point in sending a peer its own adv
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("adv to send is same as recipient: Nothing to do.");
-                }
-                return;
-            }
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Sending adv " + rpve + " to " + recipient);
-            }
-
-            send(recipient, rpve, true, false);
-        } finally {
-            rescheduleKick(false);
-        }
-    }
-
-    /**
-     * Choose a boot level appropriate for the current configuration and state.
-     *
-     * @return the new boot level.
-     */
-    private int adjustBootLevel() {
-
-        boolean areWeHappy = localView.size() >= minHappyPeerView;
-
-        // increment boot level faster if we have a reasonable peerview.
-        int increment = areWeHappy ? BOOTLEVEL_INCREMENT : BOOTLEVEL_INCREMENT * 2;
-
-        // if we don't have a reasonable peerview, we continue to try harder.
-        int maxbootlevel = MAX_BOOTLEVEL - (areWeHappy ? 0 : BOOTLEVEL_INCREMENT);
-
-        bootLevel = Math.min(maxbootlevel, bootLevel + increment);
-
-        return bootLevel;
-    }
-
-    private synchronized void rescheduleKick(boolean now) {
-
-        if (closed) {
-            return;
-        }
-
-        // Set the next iteration
-        try {
-            if (now) {
-                bootLevel = MIN_BOOTLEVEL;
-            } else {
-                adjustBootLevel();
-            }
-
-            long tilNextKick = DEFAULT_BOOTSTRAP_KICK_INTERVAL * ((1L << bootLevel) - 1);
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(
-                        "Scheduling kick in " + (tilNextKick / TimeUtils.ASECOND) + " seconds at bootLevel " + bootLevel
-                        + " in group " + group.getPeerGroupID());
-            }
-
-            KickerTask task = new KickerTask();
-
-            addTask(task, tilNextKick, -1);
-        } catch (Exception ez1) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "Cannot set timer. RPV will not work.", ez1);
-            }
-        }
-    }
-
-    /**
-     * Refresh the local copy of the peer advertisement and the rendezvous
-     * advertisement.
-     */
-    private void refreshSelf() {
-
-        RdvAdvertisement radv;
-
-        synchronized (this) {
-            PeerAdvertisement newPadv = group.getPeerAdvertisement();
-            int newModCount = newPadv.getModCount();
-
-            if ((lastPeerAdv != newPadv) || (lastModCount != newModCount)) {
-                lastPeerAdv = newPadv;
-                lastModCount = newModCount;
-
-                // create a new local RdvAdvertisement and set it to self.
-                radv = createRdvAdvertisement(lastPeerAdv, name);
-
-                if (radv != null) {
-                    self.setRdvAdvertisement(radv);
-                }
-            }
-        }
-    }
-
-    static RdvAdvertisement createRdvAdvertisement(PeerAdvertisement padv, String serviceName) {
-
-        try {
-            // FIX ME: 10/19/2002 lomax@jxta.org. We need to properly set up the service ID. Unfortunately
-            // this current implementation of the PeerView takes a String as a service name and not its ID.
-            // Since currently, there is only PeerView per group (all peerviews share the same "service", this
-            // is not a problem, but that will have to be fixed eventually.
-
-            // create a new RdvAdvertisement
-            RdvAdvertisement rdv = (RdvAdvertisement) AdvertisementFactory.newAdvertisement(
-                    RdvAdvertisement.getAdvertisementType());
-
-            rdv.setPeerID(padv.getPeerID());
-            rdv.setGroupID(padv.getPeerGroupID());
-            rdv.setServiceName(serviceName);
-            rdv.setName(padv.getName());
-
-            RouteAdvertisement ra = EndpointUtils.extractRouteAdv(padv);
-
-            // Insert it into the RdvAdvertisement.
-            rdv.setRouteAdv(ra);
-
-            return rdv;
-        } catch (Exception ez) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Cannot create Local RdvAdvertisement: ", ez);
-            }
-            return null;
-        }
-    }
-
-    /**
-     * Add a listener for PeerViewEvent
-     *
-     * @param listener An PeerViewListener to process the event.
-     * @return  true if successful
-     */
-    public boolean addListener(PeerViewListener listener) {
-        boolean added = rpvListeners.add(listener);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Registered PeerViewEvent Listener (" + listener.getClass().getName() + ")");
-        }
-
-        return added;
-    }
-
-    /**
-     * Removes a PeerViewEvent Listener previously added with addListener.
-     *
-     * @param listener the PeerViewListener listener remove
-     * @return whether successful or not
-     */
-    public boolean removeListener(PeerViewListener listener) {
-        boolean removed = rpvListeners.remove(listener);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Removed PeerViewEvent Listener (" + listener.getClass().getName() + ")");
-        }
-
-        return removed;
-    }
-
-    /**
-     * Generate a PeerView Event and notify all listeners.
-     *
-     * @param type    the Event Type.
-     * @param element The peer having the event.
-     */
-    private void generateEvent(int type, PeerViewElement element) {
-
-        PeerViewEvent newevent = new PeerViewEvent(this, type, element);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Calling listeners for " + newevent + " in group " + group.getPeerGroupID());
-        }
-
-        for (Object o : Arrays.asList(rpvListeners.toArray())) {
-            PeerViewListener pvl = (PeerViewListener) o;
-
-            try {
-                pvl.peerViewEvent(newevent);
-            } catch (Throwable ignored) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Uncaught Throwable in PeerViewEvent listener : (" + pvl.getClass().getName() + ")"
-                            ,
-                            ignored);
-                }
-            }
-        }
-    }
-
-    static PipeAdvertisement makeWirePipeAdvertisement(PeerGroup destGroup, PeerGroup group, String name) {
-
-        PipeAdvertisement adv = (PipeAdvertisement) AdvertisementFactory.newAdvertisement(PipeAdvertisement.getAdvertisementType());
-
-        // Create a pipe advertisement for this group.
-        // Generate a well known but unique ID.
-        // FIXME bondolo 20040507 The ID created is really poor, it has only
-        // 2 unique bytes on average. it would be much better to hash something
-        // also, since the the definition of how to use the seed bytes is not
-        // fixed, it's not reliable.
-        PipeID pipeId = IDFactory.newPipeID(destGroup.getPeerGroupID()
-                ,
-                (SERVICE_NAME + group.getPeerGroupID().getUniqueValue().toString() + name).getBytes());
-
-        adv.setPipeID(pipeId);
-        adv.setType(PipeService.PropagateType);
-        adv.setName(SERVICE_NAME + " pipe for " + group.getPeerGroupID());
-
-        return adv;
-    }
-
-    private synchronized void openWirePipes() {
-
-        PipeService pipes = group.getPipeService();
-
-        if (null == pipes) {
-            scheduleOpenPipes(TimeUtils.ASECOND); // Try again in one second.
-            return;
-        }
-
-        try {
-            // First, listen to in our own PeerGroup
-            if (null == localGroupWirePipeInputPipe) {
-                localGroupWirePipeInputPipe = pipes.createInputPipe(localGroupWirePipeAdv, new WirePipeListener());
-            }
-
-            if (null == localGroupWirePipeOutputPipe) {
-                // Creates the OutputPipe - note that timeout is irrelevant for
-                // propagated pipe.
-
-                localGroupWirePipeOutputPipe = pipes.createOutputPipe(localGroupWirePipeAdv, 1 * TimeUtils.ASECOND);
-            }
-
-            if (localGroupWirePipeOutputPipe == null) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Cannot get OutputPipe for current group");
-                }
-            }
-        } catch (Exception failed) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("PipeService not ready yet. Trying again in 1 second.");
-            }
-            // Try again in one second.
-            scheduleOpenPipes(TimeUtils.ASECOND);
-            return;
-        }
-
-        if (advertisingGroup != null) {
-            try {
-                pipes = advertisingGroup.getPipeService();
-
-                if (null == pipes) {
-                    // Try again in one second.
-                    scheduleOpenPipes(TimeUtils.ASECOND);
-                    return;
-                }
-
-                if (null == wirePipeInputPipe) {
-                    wirePipeInputPipe = pipes.createInputPipe(advGroupPropPipeAdv, new WirePipeListener());
-                }
-
-                if (null == wirePipeOutputPipe) {
-                    wirePipeOutputPipe = pipes.createOutputPipe(advGroupPropPipeAdv, 1 * TimeUtils.ASECOND);
-                }
-
-                if (wirePipeOutputPipe == null) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Cannot get OutputPipe for current group");
-                    }
-                }
-            } catch (Exception failed) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Could not open pipes in local group. Trying again in 1 second.");
-                }
-                // Try again in one second.
-                scheduleOpenPipes(TimeUtils.ASECOND);
-                return;
-            }
-        }
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Propagate Pipes opened.");
-        }
-    }
-
-    private synchronized void closeWirePipes() {
-
-        if (localGroupWirePipeInputPipe != null) {
-            localGroupWirePipeInputPipe.close();
-            localGroupWirePipeInputPipe = null;
-        }
-
-        if (localGroupWirePipeOutputPipe != null) {
-            localGroupWirePipeOutputPipe.close();
-            localGroupWirePipeOutputPipe = null;
-        }
-
-        if (wirePipeInputPipe != null) {
-            wirePipeInputPipe.close();
-            wirePipeInputPipe = null;
-        }
-
-        if (wirePipeOutputPipe != null) {
-            wirePipeOutputPipe.close();
-            wirePipeOutputPipe = null;
-        }
-
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Propagate Pipes closed.");
-        }
-    }
-
-    /**
-     * Adapter class for receiving wire pipe messages
-     */
-    private class WirePipeListener implements PipeMsgListener {
-
-        /**
-         * {@inheritDoc}
-         */
-        public void pipeMsgEvent(PipeMsgEvent event) {
-
-            Message msg = event.getMessage();
-
-            boolean failure = (null != msg.getMessageElement(MESSAGE_NAMESPACE, FAILURE_ELEMENT_NAME));
-            boolean response = (null != msg.getMessageElement(MESSAGE_NAMESPACE, RESPONSE_ELEMENT_NAME));
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(
-                        "Received a PeerView " + (failure ? "failure " : "") + (response ? "response " : "") + "message [" + msg
-                        + "] on propagated pipe " + event.getPipeID());
-            }
-
-            if (!failure && !response) {
-
-                // If this is not a failure message then decide if we will respond.
-                //
-                // We play a game that is tuned by the view size so that the expectation of number of responses is equal to
-                // minHappyPeerView. The game is to draw a number between 0 and the pv size.  If the result is < minHappyPeerView,
-                // then we win (respond) else we lose (stay silent). The probability of winning is HAPPY_SIZE/viewsize. If each of
-                // the viewsize peers plays the same game, on average HAPPY_SIZE of them win (with a significant variance, but
-                // that is good enough). If viewsize is <= HAPPY_SIZE, then all respond.  This is approximate, of course, since
-                // the view size is not always consistent among peers.
-
-                int viewsize = PeerView.this.localView.size();
-
-                if (viewsize > minHappyPeerView) {
-                    int randinview = random.nextInt(viewsize);
-
-                    if (randinview >= minHappyPeerView) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Ignoring " + msg + " from pipe " + event.getPipeID());
-                        }
-                        // We "lose".
-                        return;
-                    }
-                } // Else, we always win; don't bother playing.
-            }
-
-            // Fabricate dummy src and dst addrs so that we can call processIncoming. These are
-            // only used for traces. The merit of using the pipeID is that it is recognizable
-            // in these traces.
-            EndpointAddress src = new EndpointAddress(event.getPipeID(), SERVICE_NAME, null);
-            EndpointAddress dest = new EndpointAddress(event.getPipeID(), SERVICE_NAME, null);
-
-            try {
-                // call the peerview.
-                PeerView.this.processIncomingMessage(msg, src, dest);
-            } catch (Throwable ez) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failed processing " + msg + " from pipe " + event.getPipeID(), ez);
-                }
-            }
-        }
-    }
-
-    private synchronized void scheduleAdvertisingGroupQuery(long delay) {
-
-        if (closed) {
-            return;
-        }
-
-        TimerTask task = new AdvertisingGroupQueryTask();
-
-        addTask(task, delay, -1);
-    }
-
-    /**
-     * Class implementing the query request on the AdvertisingGroup
-     */
-    private final class AdvertisingGroupQueryTask extends TimerTask {
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public boolean cancel() {
-            boolean res = super.cancel();
-            return res;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public void run() {
-            try {
-                if (closed) {
-                    return;
-                }
-
-                OutputPipe op = wirePipeOutputPipe;
-
-                if (null != op) {
-                    Message msg = makeMessage(self, false, false);
-
-                    op.send(msg);
-                }
-            } catch (Throwable all) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Uncaught Throwable in thread :" + Thread.currentThread().getName(), all);
-                }
-            } finally {
-                removeTask(this);
-            }
-        }
-    }
-
-    /**
-     * Get a copy of the PeerView for this group.
-     *
-     * @return A SortedSet which is the current local view of the peerview
-     */
-    public SortedSet<PeerViewElement> getView() {
-        synchronized (localView) {
-            return new TreeSet<PeerViewElement>((SortedSet)localView);
-        }
-    }
-
-    /**
-     * Add the provided element to the local peerview.
-     *
-     * @param pve the <code>PeerViewElement</code> to add.
-     * @return <code>true</true> if the element was not present and added
-     *         otherwise <code>false</code>.
-     */
-    private boolean addPeerViewElement(PeerViewElement pve) {
-        boolean added;
-
-        if (null == pve.getRdvAdvertisement()) {
-            throw new IllegalStateException("Cannot add a seed pve to local view");
-        }
-
-        synchronized (localView) {
-            added = localView.add(pve);
-
-            if (added) {
-                // Refresh, if necessary, our up and down peers.
-                updateUpAndDownPeers();
-            }
-        }
-
-        if (added) {
-            pve.setPeerView(this);
-        }
-
-        return added;
-    }
-
-    /**
-     * Remove the provided element from the local peerview.
-     *
-     * @param pve the <code>PeerViewElement</code> to remove.
-     * @return <code>true</true> if the element was present and removed
-     *         otherwise <code>false</code>.
-     */
-    private boolean removePeerViewElement(PeerViewElement pve) {
-        boolean removed;
-
-        synchronized (localView) {
-            removed = localView.remove(pve);
-
-            if (removed) {
-                // Refresh, if necessary, our up and down peers.
-                updateUpAndDownPeers();
-            }
-        }
-
-        if (removed) {
-            pve.setPeerView(null);
-        }
-
-        return removed;
-    }
-
-    /**
-     * Return from the local view, the PeerViewElement that is equal to the
-     * given PeerViewDestination, if one exists or <code>null</code> if it is
-     * not present. Identity is defined by {@link PeerViewDestination#equals}
-     * which only looks at the destination address. Thus a PeerViewDestination
-     * is enough. A full PeerViewElement may be passed as well.  This method
-     * does not require external synchronization.
-     *
-     * @param wanted PeerViewDestination matching the desired one.
-     * @return the matching PeerViewElement or <code>null</code> if it could not
-     *         be found.
-     */
-    public PeerViewElement getPeerViewElement(PeerViewDestination wanted) {
-
-        try {
-            PeerViewElement found = (PeerViewElement) localView.tailSet(wanted).first();
-
-            if (wanted.equals(found)) {
-                return found;
-            }
-        } catch (NoSuchElementException nse) {// This can happen if the tailset is empty. We could test for it,
-            // but it could still become empty after the test, since it reflects
-            // concurrent changes to localView. Not worth synchronizing for that
-            // rare occurence. The end-result is still correct.
-        }
-
-        return null;
-    }
-
-    /**
-     * Get from the local view, the PeerViewElement for the given PeerID, if one
-     * exists. Null otherwise. This method does not require external
-     * synchronization.
-     *
-     * @param pid the PeerID of the desired element.
-     * @return the matching PeerViewElement null if it could not be found.
-     */
-    public PeerViewElement getPeerViewElement(ID pid) {
-
-        return getPeerViewElement(new PeerViewDestination(pid));
-    }
-
-    /**
-     * Get the down peer from the local peer.
-     *
-     * @return the down PeerViewElement or null if there is no such peer.
-     */
-    public PeerViewElement getDownPeer() {
-        return downPeer;
-    }
-
-    /**
-     * Get the local peer.
-     *
-     * @return the local PeerViewElement
-     */
-    public PeerViewElement getSelf() {
-        return self;
-    }
-
-    /**
-     * Get the up peer from the local peer.
-     *
-     * @return the up PeerViewElement or null if there is no such peer.
-     */
-    public PeerViewElement getUpPeer() {
-        return upPeer;
-    }
-
-    /**
-     * update Up and Down Peers
-     */
-    private void updateUpAndDownPeers() {
-
-        synchronized (localView) {
-            final PeerViewElement oldDown = downPeer;
-            final PeerViewElement oldUp = upPeer;
-
-            SortedSet<PeerViewDestination> headSet = localView.headSet(self);
-
-            if (!headSet.isEmpty()) {
-                downPeer = (PeerViewElement) headSet.last();
-            } else {
-                downPeer = null;
-            }
-
-            SortedSet<PeerViewDestination> tailSet = localView.tailSet(self);
-
-            if (!tailSet.isEmpty()) {
-                if (self.equals(tailSet.first())) {
-                    Iterator eachTail = tailSet.iterator();
-
-                    eachTail.next(); // self
-
-                    if (eachTail.hasNext()) {
-                        upPeer = (PeerViewElement) eachTail.next();
-                    } else {
-                        upPeer = null;
-                    }
-                } else {
-                    upPeer = (PeerViewElement) tailSet.first();
-                }
-            } else {
-                upPeer = null;
-            }
-
-            if ((oldDown != downPeer) && (downPeer != null)) {
-                downPeer.setLastUpdateTime(TimeUtils.timeNow());
-            }
-
-            if ((oldUp != upPeer) && (upPeer != null)) {
-                upPeer.setLastUpdateTime(TimeUtils.timeNow());
-            }
-        }
-    }
-
-    /**
-     * A task that checks on upPeer and downPeer.
-     */
-    private final class WatchdogTask extends TimerTask {
-
-        /**
-         *  The number of iterations that the watchdog task has executed.
-         */
-        int iterations = 0;
-        
-        WatchdogTask() {}
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public void run() {
-            try {
-                if (closed) {
-                    return;
-                }
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Watchdog task executing for group " + PeerView.this.group.getPeerGroupID());
-                }
-
-                refreshSelf();
-                
-                if(0 == (iterations % 5)) {
-                    DiscoveryService discovery = group.getDiscoveryService();
-                    if(null != discovery) {
-                        discovery.publish(self.getRdvAdvertisement(), WATCHDOG_PERIOD * 10, WATCHDOG_PERIOD * 5);
-                    }
-                }
-                
-                PeerViewElement up = PeerView.this.getUpPeer();
-
-                if (up != null) {
-                    if (TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), up.getLastUpdateTime()) > WATCHDOG_GRACE_DELAY) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.warning("UP peer has gone MIA : " + up);
-                        }
-
-                        notifyFailure(up, true);
-
-                    } else {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Checking on UP peer : " + up);
-                        }
-
-                        PeerView.this.send(up, PeerView.this.getSelf(), false, false);
-                    }
-                }
-
-                PeerViewElement down = PeerView.this.getDownPeer();
-
-                if (down != null) {
-                    if (TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), down.getLastUpdateTime()) > WATCHDOG_GRACE_DELAY) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.warning("DOWN peer has gone MIA : " + down);
-                        }
-
-                        notifyFailure(down, true);
-
-                    } else {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Checking on DOWN peer : " + down);
-                        }
-
-                        PeerView.this.send(down, PeerView.this.getSelf(), false, false);
-                    }
-                }
-            } catch (Throwable all) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Uncaught Throwable in thread :" + Thread.currentThread().getName(), all);
-                }
-            }
-            
-            iterations++;
-        }
-    }
-
-
-    /**
-     * Class implementing the kicker
-     */
-    private final class KickerTask extends TimerTask {
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public void run() {
-            try {
-                if (closed) {
-                    return;
-                }
-
-                PeerView.this.kick();
-            } catch (Throwable all) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.log(Level.SEVERE, "Uncaught Throwable in thread : " + Thread.currentThread().getName(), all);
-                }
-            } finally {
-                removeTask(this);
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerViewDestination.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerViewDestination.java
deleted file mode 100644 (file)
index 27a2594..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Micro//Systems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous.rpv;
-
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.id.ID;
-
-/**
- * This class contains only the comparable portion of PeerViewElement, so that it is possible
- * to search for elements in the sorted set that the local PeerView is, without having
- * enough information to create a valid PeerViewElement.
- */
-class PeerViewDestination implements Comparable<PeerViewDestination> {
-    
-    /**
-     * The peer which is associated with this element.
-     */
-    private final ID peerid;
-    
-    /**
-     * Constructs a PeerViewDestination from a (peer)ID.
-     */
-    PeerViewDestination(ID destination) {
-        peerid = destination;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public boolean equals(Object other) {
-        return this == other || other instanceof PeerViewDestination && 0 == compareTo((PeerViewDestination) other);
-
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public int hashCode() {
-        return peerid.hashCode();
-    }
-    
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * Note that this compares the unique value of the id.
-     */
-    public int compareTo(PeerViewDestination pve) {
-        String myUniqueValue = peerid.getUniqueValue().toString();
-        String itsUniqueValue = pve.peerid.getUniqueValue().toString();
-
-        return myUniqueValue.compareTo(itsUniqueValue);
-    }
-
-    /**
-     *  Get the peer id of the peer associated with this connection.
-     *
-     *  @return    The peer id of the connected peer.
-     */
-    public ID getPeerID() {
-        return peerid;
-    }
-    
-    /**
-     *  returns the destination address.
-     *
-     *  @return The endpoint address of the connected peer.
-     */
-    public EndpointAddress getDestAddress() {
-        return new EndpointAddress(peerid, null, null);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerViewElement.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerViewElement.java
deleted file mode 100644 (file)
index fab64a4..0000000
+++ /dev/null
@@ -1,391 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Micro//Systems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous.rpv;
-
-import java.io.IOException;
-
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.Messenger;
-import net.jxta.endpoint.OutgoingMessageEvent;
-import net.jxta.endpoint.OutgoingMessageEventListener;
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.protocol.RdvAdvertisement;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-/**
- * An element of the PeerView.
- *
- * <p/>The destination address (peerID) is part of PeerViewDestination, which implements the
- * comparable interface. That makes it possible to sort and create ordered lists of
- * PeerViewElements, and to search these lists while knowing only a destination address.
- */
-public final class PeerViewElement extends PeerViewDestination implements OutgoingMessageEventListener {
-
-    /**
-     *  Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(PeerViewElement.class.getName());
-
-    /**
-     * EndpointService that this PeerViewElement must use.
-     */
-    private final EndpointService endpoint;
-
-    /**
-     * Absolute time in milliseconds at which this element was created.
-     */
-    private final long created;
-
-    /**
-     * Absolute time in milliseconds at which this element was created.
-     */
-    private long lastUpdate = 0;
-
-    /**
-     * The encapsulated RdvAdvertisement for the Peer this instance
-     * represents.
-     */
-    private RdvAdvertisement radv = null;
-
-    /**
-     * True is the remote peer is known to be alive, false otherwise.
-     * It is always alive at birth. It may die soon after and we want to
-     * generate an event in that case.
-     */
-    private boolean alive = true;
-
-    /**
-     * If true then we are not accepting new messages until something unclogs.
-     */
-    private volatile boolean throttling = false;
-
-    /**
-     * PeerView that owns this PeerViewElement.
-     */
-    private PeerView peerview = null;
-
-    /**
-     *  A cached Messenger for sending to the destination peer.
-     */
-    private Messenger cachedMessenger = null;
-
-    /**
-     * Initialize from a RdvAdvertisement.
-     *
-     * @param endpoint The endpoint service.
-     * @param radv the RdvAdvertisement from which to initialize
-     */
-    PeerViewElement(EndpointService endpoint, RdvAdvertisement radv) {
-
-        super(radv.getPeerID());
-
-        this.endpoint = endpoint;
-        this.radv = radv;
-
-        created = TimeUtils.timeNow();
-        lastUpdate = created;
-    }
-
-    /**
-     *  {@inheritDoc}
-     *  <p/>
-     *  A simple implementation for debugging. Do not attempt to parse this value!
-     */
-    @Override
-    public String toString() {
-        StringBuilder asString = new StringBuilder();
-
-        asString.append('\"');
-        asString.append(radv.getName());
-        asString.append('\"');
-        asString.append(alive ? " A " : " a ");
-        asString.append(isInPeerView() ? " P " : " p ");
-        asString.append(throttling ? " T " : " t ");
-        asString.append(" [");
-        asString.append(TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), created) / TimeUtils.ASECOND);
-        asString.append("/");
-        asString.append(TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), lastUpdate) / TimeUtils.ASECOND);
-        asString.append("]");
-        return asString.toString();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void messageSendSucceeded(OutgoingMessageEvent e) {
-
-        // As far as we know, connectivity is fine.
-        setAlive(true, true);
-
-        throttling = false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void messageSendFailed(OutgoingMessageEvent e) {
-
-        // As far as we know, connectivity is down.
-        // Except if failure is null; then it's just a queue overflow.
-
-        if (null != e.getFailure()) {
-            setAlive(false, true);
-        }
-
-        throttling = (e.getFailure() == null);
-    }
-
-    /**
-     * Return <code>true</code> if the remote peer is known to be alive,
-     * <code>false</code> otherwise.
-     *
-     * @return Return <code>true</code> if the remote peer is known to be
-     * alive, <code>false</code> otherwise.
-     */
-    public boolean isAlive() {
-        return alive;
-    }
-
-    /**
-     * Update the connection status based upon the result of the last message
-     * send.
-     *
-     * <p/>We track the current dead-alive state and If we're in a peerview
-     * notify it of the transitions from alive to dead.
-     *
-     * @param live The known liveness of our connection to this peer.
-     * @param doNotify {@code true} will cause failure notifications to be sent.
-     * {@code false} makes notifications the caller's responsibility.
-     * @return {@code true} if a failure notification needs to be sent otherwise
-     * {@code false}.
-     */
-    boolean setAlive(boolean live, boolean doNotify) {
-        boolean mustNotify;
-
-        synchronized (this) {
-            mustNotify = alive && !live;
-            alive = live;
-        }
-
-        // Since we do this out of sync, it is in theory possible that our alive
-        // status has already changed. It is rare but will only cause a little
-        // shake. So leave the sync behind, it causes a deadlock.
-        if (mustNotify && doNotify) {
-            PeerView temp = peerview;
-
-            if (null != temp) {
-                temp.notifyFailure(this, true);
-            }
-        }
-        
-        return mustNotify;
-    }
-
-    boolean isInPeerView() {
-        return (null != peerview);
-    }
-
-    /**
-     *  Sets the peerview
-     */
-    synchronized void setPeerView(PeerView pv) {
-        if ((null != peerview) && (null != pv)) {
-            throw new IllegalStateException("Element already in " + peerview);
-        }
-
-        peerview = pv;
-    }
-
-    /**
-     *  Return the time in absolute milliseconds at which we last updated this peer.
-     */
-    long getLastUpdateTime() {
-        return lastUpdate;
-    }
-
-    /**
-     *  Sets the time in absolute milliseconds at which we last updated this peer.
-     */
-    void setLastUpdateTime(long last) {
-        lastUpdate = last;
-    }
-
-    /**
-     * Send a message to the peer which is represented by the current
-     * PeerViewElement.
-     *
-     * @param msg the message to send
-     *
-     * @param serviceName the service name on the destination peer to
-     * which the message will be demultiplexed
-     *
-     * @param serviceParam the service param on the destination peer
-     * to which the message will be demultiplexed
-     *
-     * @return true if the message was successfully handed off to the
-     * endpoint for delivery, false otherwise
-     */
-    public boolean sendMessage(Message msg, String serviceName, String serviceParam) {
-
-        if (throttling) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Declining to send -- throttling on " + this);
-            }
-            return false;
-        }
-
-        Messenger sendVia = getCachedMessenger();
-
-        if (null == sendVia) {
-            // There is nothing really we can do.
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Could not get messenger for " + getPeerID());
-            }
-
-            OutgoingMessageEvent event = new OutgoingMessageEvent(msg,
-                    new IOException("Couldn't get messenger for " + getPeerID()));
-
-            messageSendFailed(event);
-            return false;
-        }
-
-        sendVia.sendMessage(msg, serviceName, serviceParam, this);
-
-        return true;
-    }
-
-    /**
-     * Get the encapsulated Peer Advertisement.
-     *
-     * @return the Advertisement of the Peer represented by this
-     * object
-     */
-    public RdvAdvertisement getRdvAdvertisement() {
-        return radv;
-    }
-
-    /**
-     * Set the encapsulated Peer Advertisement.
-     *
-     * @param adv is the RdvAdvertisement to be set.
-     * @return RdvAdvertisement the old Advertisement of the Peer represented by this
-     * object
-     */
-    RdvAdvertisement setRdvAdvertisement(RdvAdvertisement adv) {
-
-        if (!radv.getPeerID().equals(adv.getPeerID())) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.severe("adv refers to a different peer");
-            }
-
-            throw new IllegalArgumentException("adv refers to a different peer");
-        }
-
-        RdvAdvertisement old = radv;
-
-        this.radv = adv;
-
-        setLastUpdateTime(TimeUtils.timeNow());
-
-        return old;
-    }
-
-    /**
-     *  Return a messenger suitable for sending to this peer.
-     *
-     *  @return a messenger to this PVE peer or if {@code null} if peer is
-     *  unreachable.
-     */
-    private Messenger getCachedMessenger() {
-
-        boolean mustNotify = false;
-        
-        synchronized (this) {
-            if ((null == cachedMessenger) || ((cachedMessenger.getState() & Messenger.USABLE) == 0)) {
-                cachedMessenger = null;
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Getting cached Messenger for " + radv.getName());
-                }
-
-                cachedMessenger = endpoint.getMessengerImmediate(getDestAddress(), radv.getRouteAdv());
-                
-                if (null == cachedMessenger) {
-                    mustNotify = setAlive(false, false);
-                } else if ((cachedMessenger.getState() & Messenger.RESOLVED) != 0) {
-                    mustNotify = setAlive(true, false);
-                }
-            }
-        }
-
-        // Since we do this out of sync, it is in theory possible that our alive
-        // status has already changed. It is rare but will only cause a little
-        // shake. So leave the sync behind, it causes a deadlock.
-        if (mustNotify) {
-            PeerView temp = peerview;
-
-            if (null != temp) {
-                temp.notifyFailure(this, true);
-            }
-        }
-
-        return cachedMessenger;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerViewEvent.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerViewEvent.java
deleted file mode 100644 (file)
index 023bc5e..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous.rpv;
-
-import java.util.EventObject;
-
-/**
- * Container for PeerViewEvent events.
- */
-public class PeerViewEvent extends EventObject {
-
-    public static final int ADD = 10;
-    public static final int REMOVE = 11;
-    public static final int FAIL = 12;
-
-    private static final String EVENTNAMES[] = {
-            "ADD", "REMOVE", "FAIL"
-    };
-
-    private int type;
-    private PeerViewElement element;
-
-    /**
-     * Creates a new event
-     *
-     * @param source  The peer view which is generating the event.
-     * @param type    the event type
-     * @param element the peer associated with the event
-     */
-    public PeerViewEvent(Object source, int type, PeerViewElement element) {
-        super(source);
-        this.type = type;
-        this.element = element;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String toString() {
-        String eventType;
-
-        if ((type >= ADD) && (type <= FAIL)) {
-            eventType = EVENTNAMES[type - ADD];
-        } else {
-            eventType = "UNKNOWN (" + type + ")";
-        }
-
-        return super.toString() + " : " + eventType + " for " + element;
-    }
-
-    /**
-     * Returns the event type
-     *
-     * @return int type
-     */
-    public int getType() {
-        return type;
-    }
-
-    /**
-     * Returns the PeerViewElement
-     *
-     * @return the peer view element associated with the event
-     */
-    public PeerViewElement getPeerViewElement() {
-
-        return element;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerViewListener.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerViewListener.java
deleted file mode 100644 (file)
index cdad84e..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous.rpv;
-
-import java.util.EventListener;
-
-/**
- *  The listener interface for receiving PeerView events
- */
-public interface PeerViewListener extends EventListener {
-
-    /**
-     * Called when a peer view event occurs
-     * @param event the peerViewEvent event
-     */
-    void peerViewEvent(PeerViewEvent event);
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerViewRandomStrategy.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerViewRandomStrategy.java
deleted file mode 100644 (file)
index 08a7371..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2002 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous.rpv;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.SortedSet;
-
-/**
- * Random without replacement
- */
-final class PeerViewRandomStrategy implements PeerViewStrategy {
-
-    private SortedSet set;
-    private List copy = new ArrayList();
-
-    PeerViewRandomStrategy(SortedSet set) {
-        this.set = set;
-        reset();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void reset() {
-        copy.clear();
-        copy.addAll(set);
-        Collections.shuffle(copy);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerViewElement next() {
-        synchronized (set) {
-            if (set.isEmpty()) {
-                copy.clear();
-                return null;
-            }
-
-            if (copy.isEmpty()) {
-                reset();
-            }
-
-            PeerViewElement pve = (PeerViewElement) copy.remove(0);
-
-            if (set.contains(pve)) {
-                return pve;
-            }
-        }
-        return next();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerViewRandomWithReplaceStrategy.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerViewRandomWithReplaceStrategy.java
deleted file mode 100644 (file)
index 99b0898..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2002 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous.rpv;
-
-import java.util.Random;
-import java.util.SortedSet;
-import java.util.Iterator;
-
-/**
- * Random with replacement
- */
-class PeerViewRandomWithReplaceStrategy implements PeerViewStrategy {
-
-    private static Random random = new Random();
-    private SortedSet set = null;
-
-    PeerViewRandomWithReplaceStrategy(SortedSet set) {
-        this.set = set;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void reset() {
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerViewElement next() {
-        synchronized (set) {
-            if (set.isEmpty()) {
-                return null;
-            }
-
-            int i = random.nextInt(set.size());
-
-            // return the ith element
-            int n = 0;
-            Iterator si = set.iterator();
-
-            while (n < i) {
-                si.next();
-                n++;
-            }
-            return (PeerViewElement) si.next();
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerViewSequentialStrategy.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerViewSequentialStrategy.java
deleted file mode 100644 (file)
index 59c707a..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (c) 2002-2004 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous.rpv;
-
-import java.util.SortedSet;
-import java.util.Iterator;
-
-/**
- * Sequential
- */
-class PeerViewSequentialStrategy implements PeerViewStrategy {
-
-    private final SortedSet<PeerViewDestination> set;
-    private PeerViewElement current;
-
-    PeerViewSequentialStrategy(SortedSet<PeerViewDestination> aset) {
-        set = aset;
-        reset();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void reset() {
-        current = null;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public PeerViewElement next() {
-
-        synchronized (set) {
-            do {
-                if (null == current) {
-                    if (!set.isEmpty()) {
-                        // no current, take the first
-                        current = (PeerViewElement) set.first();
-                        break;
-                    } else {
-                        // no first, return null
-                        break;
-                    }
-                } else {
-                    SortedSet<PeerViewDestination> tail = set.tailSet(current);
-
-                    Iterator<PeerViewDestination> fromTail = tail.iterator();
-
-                    if (fromTail.hasNext()) {
-                        PeerViewDestination tailFirst = fromTail.next();
-
-                        if (0 == current.compareTo(tailFirst)) {
-                            if (fromTail.hasNext()) {
-                                // first in tail is current so the new current
-                                // is second in tail.
-                                current = (PeerViewElement) fromTail.next();
-                                break;
-                            } else {
-                                // none left in tail after current, start over.
-                                current = null;
-                            }
-                        } else {
-                            // current is not in the tail set, so first in tail
-                            // is new current
-                            current = (PeerViewElement) tailFirst;
-                            break;
-                        }
-                    } else {
-                        // none in tail, start over.
-                        current = null;
-                    }
-                }
-                //FIXME by hamada this does not loop, current is always null, is the intended behavior?
-            } while (null == current);
-        }
-
-        return current;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerViewStrategy.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerViewStrategy.java
deleted file mode 100644 (file)
index 7ce022e..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2002 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous.rpv;
-
-/**
- * Describes a strategy for iterating over the values in a peerview.
- */
-interface PeerViewStrategy {
-
-    /**
-     * Reset the strategy. The meaning of reset depends entirely on the strategy
-     * which is used to return peer view elements.
-     */
-    void reset();
-
-    /**
-     * Return the next PeerView Element using the strategy applied by this
-     * instance.
-     *
-     * @return the next peer view element in sequence or null if the peerview
-     *         is empty.
-     */
-    PeerViewElement next();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerviewSeedingManager.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/rendezvous/rpv/PeerviewSeedingManager.java
deleted file mode 100644 (file)
index f456b30..0000000
+++ /dev/null
@@ -1,380 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.rendezvous.rpv;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-
-import net.jxta.logging.Logging;
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.XMLDocument;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointListener;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.TextDocumentMessageElement;
-
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.protocol.RouteAdvertisement;
-
-import net.jxta.protocol.RdvAdvertisement;
-import net.jxta.impl.util.ACLSeedingManager;
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.pipe.OutputPipe;
-import net.jxta.pipe.PipeService;
-import net.jxta.protocol.PipeAdvertisement;
-
-/**
- * A Seeding Manager which uses the peerview advertisement pipes in order to
- * locate seed peers for a given peer group.
- */
-public class PeerviewSeedingManager extends ACLSeedingManager implements EndpointListener {
-
-    /**
-     * Logger
-     */
-    private static final transient Logger LOG = Logger.getLogger(PeerviewSeedingManager.class.getName());
-
-    /**
-     * This is the minimum interval at which we will refresh our "peerview"
-     */
-    protected final static long MINIMUM_PEERVIEW_REFRESH_INTERVAL = 1 * TimeUtils.AMINUTE;
-
-    /**
-     * The standard time interval after which we will refresh our "peerview"
-     */
-    protected final static long STANDARD_PEERVIEW_REFRESH_INTERVAL = 20 * TimeUtils.AMINUTE;
-
-    /**
-     * Our mock peerview we use to keep responses.
-     */
-    protected Set<RouteAdvertisement> peerview = new HashSet<RouteAdvertisement>();
-
-    /**
-     * The absolute time at which we will refresh our "PeerView"
-     */
-    protected long nextPeerViewRefresh = 0;
-
-    /**
-     * The absolute time at which we will refresh our "PeerView"
-     */
-    protected int unsuccessfulProbes = 0;
-
-    protected final PeerGroup advGroup;
-
-    protected final PeerGroup group;
-
-    protected final String name;
-
-    protected final PipeAdvertisement advPipeAdv;
-
-    /**
-     * Creates a new instance of PeerviewSeedingManager
-     *
-     * @param aclLocation ACL uri
-     * @param group       the group context
-     * @param advGroup    the advertising group
-     * @param name        service name
-     */
-    public PeerviewSeedingManager(URI aclLocation, PeerGroup group, PeerGroup advGroup, String name) {
-        super(aclLocation);
-
-        this.group = group;
-        this.advGroup = advGroup;
-        this.name = name;
-
-        advPipeAdv = PeerView.makeWirePipeAdvertisement(advGroup, group, name);
-
-        group.getEndpointService().addIncomingMessageListener(this, PeerView.SERVICE_NAME, group.getPeerGroupID().getUniqueValue().toString());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void stop() {
-        group.getEndpointService().removeIncomingMessageListener(PeerView.SERVICE_NAME, group.getPeerGroupID().getUniqueValue().toString());
-    }
-
-    /**
-     * Adds a rpv seed
-     *
-     * @param seed the seed
-     */
-    public void addSeed(RouteAdvertisement seed) {
-        peerview.add(seed);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public URI[] getActiveSeedURIs() {
-        throw new UnsupportedOperationException("Not supported.");
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized RouteAdvertisement[] getActiveSeedRoutes() {
-        refreshActiveSeeds();
-
-        List<RouteAdvertisement> result = new ArrayList<RouteAdvertisement>();
-
-        for (RouteAdvertisement anRA : peerview) {
-            result.add(anRA.clone());
-        }
-
-        return result.toArray(new RouteAdvertisement[result.size()]);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public synchronized boolean isAcceptablePeer(RouteAdvertisement radv) {
-        boolean acceptable = peerview.contains(radv);
-
-        return acceptable && super.isAcceptablePeer(radv);
-    }
-
-    protected void refreshActiveSeeds() {
-        if (TimeUtils.timeNow() < nextPeerViewRefresh) {
-            return;
-        }
-
-        // remove the old stale entries.
-        peerview.clear();
-
-        Message message = makeMessage();
-
-        try {
-            PipeService pipes = advGroup.getPipeService();
-
-            OutputPipe output = pipes.createOutputPipe(advPipeAdv, 30 * TimeUtils.ASECOND);
-
-            output.send(message);
-
-            output.close();
-
-            // Only update the refresh if we we able to send.
-
-            long untilNextRefresh;
-
-            if (peerview.isEmpty()) {
-                unsuccessfulProbes++;
-                untilNextRefresh = Math.min(unsuccessfulProbes * MINIMUM_PEERVIEW_REFRESH_INTERVAL,
-                        STANDARD_PEERVIEW_REFRESH_INTERVAL);
-            } else {
-                untilNextRefresh = STANDARD_PEERVIEW_REFRESH_INTERVAL;
-            }
-
-            nextPeerViewRefresh = TimeUtils.toAbsoluteTimeMillis(untilNextRefresh);
-        } catch (IOException failed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed sending " + message + ".", failed);
-            }
-        }
-    }
-
-    /**
-     * Make a PeerView Message.
-     *
-     * @return a peer view message
-     */
-    private Message makeMessage() {
-
-        Message msg = new Message();
-
-        msg.addMessageElement(PeerView.MESSAGE_NAMESPACE, PeerView.EDGE_ELEMENT);
-
-        RdvAdvertisement radv = PeerView.createRdvAdvertisement(group.getPeerAdvertisement(), name);
-
-        XMLDocument doc = (XMLDocument) radv.getDocument(MimeMediaType.XMLUTF8);
-
-        MessageElement msge = new TextDocumentMessageElement(PeerView.MESSAGE_ELEMENT_NAME, doc, null);
-
-        msg.addMessageElement(PeerView.MESSAGE_NAMESPACE, msge);
-
-        return msg;
-    }
-
-    /**
-     * {@inheritDoc}
-     * <p/>
-     * <p/>Listener for "PeerView"/&lt;peergroup-unique-id> and propagate pipes.
-     */
-    public synchronized void processIncomingMessage(Message msg, EndpointAddress srcAddr, EndpointAddress dstAddr) {
-
-        // check what kind of message this is (response or not).
-        boolean isResponse = false;
-        MessageElement me = msg.getMessageElement(PeerView.MESSAGE_NAMESPACE, PeerView.MESSAGE_ELEMENT_NAME);
-
-        if (me == null) {
-            me = msg.getMessageElement(PeerView.MESSAGE_NAMESPACE, PeerView.RESPONSE_ELEMENT_NAME);
-            if (me == null) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Discarding damaged " + msg + ".");
-                }
-                return;
-            } else {
-                isResponse = true;
-            }
-        }
-
-        Advertisement adv;
-
-        try {
-            XMLDocument asDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(me);
-
-            adv = AdvertisementFactory.newAdvertisement(asDoc);
-        } catch (RuntimeException failed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed building rdv advertisement from message element", failed);
-            }
-            return;
-        } catch (IOException failed) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed building rdv advertisement from message element", failed);
-            }
-            return;
-        }
-
-        if (!(adv instanceof RdvAdvertisement)) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Response does not contain radv (" + adv.getAdvertisementType() + ")");
-            }
-            return;
-        }
-
-        RdvAdvertisement radv = (RdvAdvertisement) adv;
-
-        if (null == radv.getRouteAdv()) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Radv does not contain route");
-            }
-            return;
-        }
-
-        // See if we can find a src route adv in the message.s
-        me = msg.getMessageElement(PeerView.MESSAGE_NAMESPACE, PeerView.SRCROUTEADV_ELEMENT_NAME);
-        if (me != null) {
-            try {
-                XMLDocument asDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(me);
-                Advertisement routeAdv = AdvertisementFactory.newAdvertisement(asDoc);
-
-                if (!(routeAdv instanceof RouteAdvertisement)) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Advertisement is not a RouteAdvertisement");
-                    }
-                } else {
-                    RouteAdvertisement rdvRouteAdv = radv.getRouteAdv().clone();
-
-                    // XXX we stich them together even if in the end it gets optimized away
-                    RouteAdvertisement.stichRoute(rdvRouteAdv, (RouteAdvertisement) routeAdv);
-                    radv.setRouteAdv(rdvRouteAdv);
-                }
-            } catch (RuntimeException failed) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failed building route adv from message element", failed);
-                }
-            } catch (IOException failed) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failed building route adv from message element", failed);
-                }
-            }
-        }
-        me = null;
-
-        // Is this a message about ourself?
-        if (group.getPeerID().equals(radv.getPeerID())) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Received a PeerView message about self. Discard.");
-            }
-
-            return;
-        }
-
-        // Collect the various flags.
-
-        boolean isFailure = (msg.getMessageElement(PeerView.MESSAGE_NAMESPACE, PeerView.FAILURE_ELEMENT_NAME) != null);
-        boolean isCached = (msg.getMessageElement(PeerView.MESSAGE_NAMESPACE, PeerView.CACHED_RADV_ELEMENT_NAME) != null);
-        boolean isFromEdge = (msg.getMessageElement(PeerView.MESSAGE_NAMESPACE, PeerView.EDGE_ELEMENT_NAME) != null);
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            String srcPeer = srcAddr.toString();
-            LOG.fine("[" + group.getPeerGroupID() + "] Received a" + (isCached ? " cached" : "") + (isResponse ? " response" : "")
-                    + (isFailure ? " failure" : "") + " message (" + msg.toString() + ")" + (isFromEdge ? " from edge" : "")
-                    + " regarding \"" + radv.getName() + "\" from " + srcPeer);
-        }
-
-        if (!isResponse || isFailure || isCached || isFromEdge) {
-            // We don't care about anything except responses from active rdvs.
-            return;
-        }
-
-        peerview.add(radv.getRouteAdv());
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/InternalQueryHandler.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/InternalQueryHandler.java
deleted file mode 100644 (file)
index 03171ed..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.resolver;
-
-
-import net.jxta.resolver.QueryHandler;
-import net.jxta.protocol.ResolverResponseMsg;
-import net.jxta.protocol.ResolverQueryMsg;
-import net.jxta.endpoint.EndpointAddress;
-
-
-/**
- * Services that wish to act as a resolver handler must implement this interface.
- * <p/>
- * This interface extends the normal resolver query handler interface to add the
- * source of the query. Typically this the query's last hop which may or may not
- * be the same as the query's originator. Knowing the source of the query can be
- * useful for sending NAK messages.
- *
- * @see net.jxta.resolver.ResolverService
- * @see net.jxta.protocol.ResolverQueryMsg
- */
-public interface InternalQueryHandler extends QueryHandler {
-
-    /**
-     * Process the resolver query, and generate response
-     * it is the responsibility of the handler to send the response
-     *
-     * <p/><pre>
-     * result = processIncommingQuery(query);
-     * if (result != null) {
-     *   resolver.sendResponse(query.getSrc(), response);
-     *   return resolver.OK;
-     *  } else return resolver.Repropagate;
-     * </pre>
-     * 
-     * @param srcAddr source address
-     * @param query ResolverQueryMsg query
-     * @return int status, {@link net.jxta.resolver.ResolverService#OK OK} success,
-     *  {@link net.jxta.resolver.ResolverService#Repropagate Repropagate} to 
-     * indicate a re-propagation is needed
-     */
-
-    public int processQuery(ResolverQueryMsg query, EndpointAddress srcAddr);
-
-    /**
-     * Called when messages are received by the ResolverService
-     * it calls back this method to deal with received responses
-     *
-     * @param response ResolverQueryMsg response
-     * @param srcAddr source address
-     */
-    public void processResponse(ResolverResponseMsg response, EndpointAddress srcAddr);
-
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/ResolverServiceImpl.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/ResolverServiceImpl.java
deleted file mode 100644 (file)
index e505e26..0000000
+++ /dev/null
@@ -1,1293 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.resolver;
-
-import net.jxta.credential.Credential;
-import net.jxta.document.Advertisement;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.XMLDocument;
-import net.jxta.endpoint.*;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.impl.endpoint.router.EndpointRouter;
-import net.jxta.impl.endpoint.router.RouteControl;
-import net.jxta.impl.meter.MonitorManager;
-import net.jxta.impl.protocol.ResolverQuery;
-import net.jxta.impl.protocol.ResolverResponse;
-import net.jxta.impl.protocol.ResolverSrdiMsgImpl;
-import net.jxta.impl.resolver.resolverMeter.QueryHandlerMeter;
-import net.jxta.impl.resolver.resolverMeter.ResolverMeter;
-import net.jxta.impl.resolver.resolverMeter.ResolverMeterBuildSettings;
-import net.jxta.impl.resolver.resolverMeter.ResolverServiceMonitor;
-import net.jxta.impl.resolver.resolverMeter.SrdiHandlerMeter;
-import net.jxta.logging.Logging;
-import net.jxta.membership.MembershipService;
-import net.jxta.meter.MonitorResources;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.platform.Module;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.protocol.ResolverQueryMsg;
-import net.jxta.protocol.ResolverResponseMsg;
-import net.jxta.protocol.ResolverSrdiMsg;
-import net.jxta.protocol.RouteAdvertisement;
-import net.jxta.rendezvous.RendezVousService;
-import net.jxta.rendezvous.RendezVousStatus;
-import net.jxta.resolver.QueryHandler;
-import net.jxta.resolver.ResolverService;
-import net.jxta.resolver.SrdiHandler;
-
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.util.zip.GZIPInputStream;
-import java.util.zip.GZIPOutputStream;
-
-/**
- * Implements the {@link net.jxta.resolver.ResolverService} using the standard
- * JXTA Endpoint Resolver Protocol (ERP).
- *
- * @see net.jxta.resolver.ResolverService
- * @see <a href="http://spec.jxta.org/v1.0/docbook/JXTAProtocols.html#proto-erp">JXTA Protocols Specification : Endpoint Resolver Protocol</a>
- */
-public class ResolverServiceImpl implements ResolverService {
-
-    /**
-     * Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(ResolverServiceImpl.class.getName());
-
-    /**
-     * Resolver query endpoint postfix
-     */
-    public final static String outQueNameShort = "ORes";
-
-    /**
-     * Resolver response endpoint postfix
-     */
-    public final static String inQueNameShort = "IRes";
-
-    /**
-     * Resolver srdi endpoint postfix
-     */
-    public final static String srdiQueNameShort = "Srdi";
-
-    /**
-     * MIME Type for gzipped SRDI messages.
-     */
-    private final static MimeMediaType GZIP_MEDIA_TYPE = new MimeMediaType("application/gzip").intern();
-
-    private String outQueName = outQueNameShort;
-    private String inQueName = inQueNameShort;
-    private String srdiQueName = srdiQueNameShort;
-
-    private String handlerName = null;
-    private PeerGroup group = null;
-    private ModuleImplAdvertisement implAdvertisement = null;
-    private EndpointService endpoint = null;
-    private MembershipService membership = null;
-
-    private RouteControl routeControl = null;
-
-    private final Map<String, QueryHandler> handlers = Collections.synchronizedMap(new HashMap<String, QueryHandler>(5));
-    private final Map<String, SrdiHandler> srdiHandlers = Collections.synchronizedMap(new HashMap<String, SrdiHandler>(5));
-
-    private EndpointListener queryListener = null;
-    private EndpointListener responseListener = null;
-    private EndpointListener srdiListener = null;
-
-    private ResolverServiceMonitor resolverServiceMonitor;
-    private ResolverMeter resolverMeter;
-
-    /**
-     * the resolver interface object
-     */
-    private ResolverService resolverInterface = null;
-
-    /**
-     * Encapsulates current Membership Service credential.
-     */
-    final static class CurrentCredential {
-
-        /**
-         * The current default credential
-         */
-        final Credential credential;
-
-        /**
-         * The current default credential in serialized XML form.
-         */
-        final XMLDocument credentialDoc;
-
-        CurrentCredential(Credential credential, XMLDocument credentialDoc) {
-            this.credential = credential;
-            this.credentialDoc = credentialDoc;
-        }
-    }
-
-    /**
-     * The current Membership service default credential.
-     */
-    CurrentCredential currentCredential;
-
-    /**
-     * Listener we use for membership property events.
-     */
-    private class CredentialListener implements PropertyChangeListener {
-
-        /**
-         * Standard Constructor
-         */
-        CredentialListener() {
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public void propertyChange(PropertyChangeEvent evt) {
-            if (MembershipService.DEFAULT_CREDENTIAL_PROPERTY.equals(evt.getPropertyName())) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("New default credential event");
-                }
-
-                synchronized (ResolverServiceImpl.this) {
-                    Credential cred = (Credential) evt.getNewValue();
-                    XMLDocument credentialDoc;
-
-                    if (null != cred) {
-                        try {
-                            credentialDoc = (XMLDocument) cred.getDocument(MimeMediaType.XMLUTF8);
-                            currentCredential = new CurrentCredential(cred, credentialDoc);
-                        } catch (Exception all) {
-                            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                                LOG.log(Level.WARNING, "Could not generate credential document", all);
-                            }
-                            currentCredential = null;
-                        }
-                    } else {
-                        currentCredential = null;
-                    }
-                }
-            }
-        }
-    }
-
-    final CredentialListener membershipCredListener = new CredentialListener();
-
-    /**
-     * Convenience method for constructing an endpoint address from an id
-     *
-     * @param destPeer peer id
-     * @param serv     the service name (if any)
-     * @param parm     the service param (if any)
-     * @return endpointAddress for this peer id.
-     */
-    private static EndpointAddress mkAddress(ID destPeer, String serv, String parm) {
-        return new EndpointAddress("jxta", destPeer.getUniqueValue().toString(), serv, parm);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void init(PeerGroup group, ID assignedID, Advertisement impl) {
-        implAdvertisement = (ModuleImplAdvertisement) impl;
-
-        this.group = group;
-        handlerName = assignedID.toString();
-        String uniqueStr = group.getPeerGroupID().getUniqueValue().toString();
-
-        outQueName = uniqueStr + outQueNameShort;
-        inQueName = uniqueStr + inQueNameShort;
-        srdiQueName = uniqueStr + srdiQueNameShort;
-
-        if (ResolverMeterBuildSettings.RESOLVER_METERING) { // Fix-Me: This needs to be moved to startApp() when the load order issue is resolved
-            resolverServiceMonitor = (ResolverServiceMonitor) MonitorManager.getServiceMonitor(group,
-                    MonitorResources.resolverServiceMonitorClassID);
-            if (resolverServiceMonitor != null) {
-                resolverMeter = resolverServiceMonitor.getResolverMeter();
-            }
-        }
-
-        // Tell tell the world about our configuration.
-        if (Logging.SHOW_CONFIG && LOG.isLoggable(Level.CONFIG)) {
-            StringBuilder configInfo = new StringBuilder("Configuring Resolver Service : " + assignedID);
-
-            if (implAdvertisement != null) {
-                configInfo.append("\n\tImplementation :");
-                configInfo.append("\n\t\tModule Spec ID: ").append(implAdvertisement.getModuleSpecID());
-                configInfo.append("\n\t\tImpl Description : ").append(implAdvertisement.getDescription());
-                configInfo.append("\n\t\tImpl URI : ").append(implAdvertisement.getUri());
-                configInfo.append("\n\t\tImpl Code : ").append(implAdvertisement.getCode());
-            }
-
-            configInfo.append("\n\tGroup Params :");
-            configInfo.append("\n\t\tGroup : ").append(group);
-            configInfo.append("\n\t\tPeer ID : ").append(group.getPeerID());
-
-            configInfo.append("\n\tConfiguration:");
-            configInfo.append("\n\t\tIn Queue name: ").append(outQueName);
-            configInfo.append("\n\t\tOut Queue name: ").append(inQueName);
-            configInfo.append("\n\t\tSRDI Queue name: ").append(srdiQueName);
-
-            LOG.config(configInfo.toString());
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public int startApp(String[] arg) {
-        endpoint = group.getEndpointService();
-
-        if (null == endpoint) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is an endpoint service");
-            }
-            return Module.START_AGAIN_STALLED;
-        }
-
-        membership = group.getMembershipService();
-
-        if (null == membership) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Stalled until there is a membership service");
-            }
-            return Module.START_AGAIN_STALLED;
-        }
-
-        // Register Listeners
-        try {
-            // Register Query Listener
-            queryListener = new DemuxQuery();
-            if (!endpoint.addIncomingMessageListener(queryListener, handlerName, outQueName)) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.severe("Cannot register listener (already registered)");
-                }
-            }
-
-            // Register Response Listener
-            responseListener = new DemuxResponse();
-            if (!endpoint.addIncomingMessageListener(responseListener, handlerName, inQueName)) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.severe("Cannot register listener (already registered)");
-                }
-            }
-
-            // Register SRDI Listener
-            srdiListener = new DemuxSrdi();
-            if (!endpoint.addIncomingMessageListener(srdiListener, handlerName, srdiQueName)) {
-                if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                    LOG.severe("Cannot register listener (already registered)");
-                }
-            }
-        } catch (Exception e) {
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                LOG.log(Level.SEVERE, "failed to add listeners", e);
-            }
-            return -1;
-        }
-
-        synchronized (this) {
-            // register our credential listener.
-            membership.addPropertyChangeListener(MembershipService.DEFAULT_CREDENTIAL_PROPERTY, membershipCredListener);
-            try {
-                // set the initial version of the default credential.
-                currentCredential = null;
-                Credential credential = membership.getDefaultCredential();
-                XMLDocument credentialDoc;
-                if (null != credential) {
-                    credentialDoc = (XMLDocument) credential.getDocument(MimeMediaType.XMLUTF8);
-                    currentCredential = new CurrentCredential(credential, credentialDoc);
-                }
-            } catch (Exception all) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "could not get default credential", all);
-                }
-            }
-        }
-        return Module.START_OK;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void stopApp() {
-        endpoint.removeIncomingMessageListener(handlerName, outQueName);
-        endpoint.removeIncomingMessageListener(handlerName, inQueName);
-
-        if (null != srdiListener) {
-            endpoint.removeIncomingMessageListener(handlerName, srdiQueName);
-        }
-
-        queryListener = null;
-        responseListener = null;
-        srdiListener = null;
-
-        membership.removePropertyChangeListener("defaultCredential", membershipCredListener);
-        currentCredential = null;
-
-        routeControl = null;
-        membership = null;
-        group = null;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public synchronized ResolverService getInterface() {
-        if (resolverInterface == null) {
-            resolverInterface = new ResolverServiceInterface(this);
-        }
-        return resolverInterface;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public ModuleImplAdvertisement getImplAdvertisement() {
-        return implAdvertisement;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public QueryHandler registerHandler(String name, QueryHandler handler) {
-        if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverServiceMonitor != null)) {
-            resolverServiceMonitor.registerQueryHandlerMeter(name);
-        }
-        return handlers.put(name, handler);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public QueryHandler unregisterHandler(String name) {
-        if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverServiceMonitor != null)) {
-            resolverServiceMonitor.unregisterQueryHandlerMeter(name);
-        }
-        return handlers.remove(name);
-    }
-
-    /**
-     * given a name returns the query handler associated with it
-     *
-     * @param name the handler to lookup
-     * @return returns the query handler
-     */
-    public QueryHandler getHandler(String name) {
-        return handlers.get(name);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public SrdiHandler registerSrdiHandler(String name, SrdiHandler handler) {
-        if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverServiceMonitor != null)) {
-            resolverServiceMonitor.registerSrdiHandlerMeter(name);
-        }
-        return srdiHandlers.put(name, handler);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public SrdiHandler unregisterSrdiHandler(String name) {
-        if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverServiceMonitor != null)) {
-            resolverServiceMonitor.unregisterSrdiHandlerMeter(name);
-        }
-        return srdiHandlers.remove(name);
-    }
-
-    /**
-     * given a name returns the srdi handler associated with it
-     *
-     * @param name the handler to lookup
-     * @return returns the SRDI handler
-     */
-    public SrdiHandler getSrdiHandler(String name) {
-        return srdiHandlers.get(name);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void sendQuery(String destPeer, ResolverQueryMsg query) {
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("sending query to resolver handler: " + query.getHandlerName());
-        }
-
-        // NOTE: Add route information about the issuing peer, so the
-        // resolver query responding peer can respond to the issuer without
-        // requiring any route discovery. In most case the responding peer
-        // is unlikely to know the route to the query issuer. This is a good
-        // optimization for edge peers. This optimzation is much less
-        // important for RDV peers as they are more likely to have a route
-        // to peers. Also, there is the concern that adding route info
-        // in resolver query exchanged between RDV will increase overhead due
-        // to the larger amount of information exchanged between RDV.
-        // Only update query if the query does not already contain any route
-        // information. We are mostly interested in the original src
-        // route information.
-        if (query.getSrcPeerRoute() == null) {
-            if (getRouteControl() != null) {
-                // FIXME tra 20031102 Until the new subscription service
-                // is implemented, we use the Router Control IOCTL
-                RouteAdvertisement route = routeControl.getMyLocalRoute();
-
-                if (route != null) {
-                    query.setSrcPeerRoute(route.clone());
-                }
-
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Sending query with route info to " + destPeer);
-                }
-            } else {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("No route control--could not set local route on query");
-                }
-            }
-        }
-
-        String queryHandlerName = query.getHandlerName();
-        QueryHandlerMeter queryHandlerMeter = null;
-
-        if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverServiceMonitor != null)) {
-            queryHandlerMeter = resolverServiceMonitor.getQueryHandlerMeter(queryHandlerName);
-        }
-
-        if (destPeer == null) {
-            try {
-                Message queryMsg = new Message();
-                XMLDocument asDoc = (XMLDocument) query.getDocument(MimeMediaType.XMLUTF8);
-                MessageElement docElem = new TextDocumentMessageElement(outQueName, asDoc, null);
-                queryMsg.addMessageElement("jxta", docElem);
-                RendezVousService rendezvous = group.getRendezVousService();
-
-                if (null != rendezvous) {
-                    if (rendezvous.getRendezVousStatus() != RendezVousStatus.ADHOC) {
-                        // Walk the message
-                        rendezvous.walk(queryMsg.clone(), handlerName, outQueName, RendezVousService.DEFAULT_TTL);
-                    }
-                    // propagate to local net as well
-                    rendezvous.propagateToNeighbors(queryMsg, handlerName, outQueName, 2);
-                } else {
-                    endpoint.propagate(queryMsg, handlerName, outQueName);
-                }
-
-                if (ResolverMeterBuildSettings.RESOLVER_METERING && (queryHandlerMeter != null)) {
-                    queryHandlerMeter.querySentInGroup(query);
-                }
-            } catch (IOException e) {
-                if (ResolverMeterBuildSettings.RESOLVER_METERING && (queryHandlerMeter != null)) {
-                    queryHandlerMeter.queryPropagateError();
-                }
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failure during propagate", e);
-                }
-            }
-        } else {
-            // unicast instead
-            boolean success = sendMessage(destPeer, null, handlerName, outQueName, outQueName,
-                    (XMLDocument) query.getDocument(MimeMediaType.XMLUTF8), false);
-
-            if (ResolverMeterBuildSettings.RESOLVER_METERING && (queryHandlerMeter != null)) {
-                if (success) {
-                    queryHandlerMeter.querySentViaUnicast(destPeer, query);
-                } else {
-                    queryHandlerMeter.querySendError();
-                }
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void sendResponse(String destPeer, ResolverResponseMsg response) {
-
-        if (destPeer == null) {
-            propagateResponse(response);
-        } else {
-            QueryHandlerMeter queryHandlerMeter = null;
-            try {
-                if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverServiceMonitor != null)) {
-                    queryHandlerMeter = resolverServiceMonitor.getQueryHandlerMeter(response.getHandlerName());
-                }
-
-                // Check if an optional route information is available to send the response
-                RouteAdvertisement route = response.getSrcPeerRoute();
-                boolean success = sendMessage(destPeer, route, handlerName, inQueName, inQueName,
-                        (XMLDocument) response.getDocument(MimeMediaType.XMLUTF8), false);
-
-                if (ResolverMeterBuildSettings.RESOLVER_METERING && (queryHandlerMeter != null)) {
-                    if (success) {
-                        queryHandlerMeter.responseSentViaUnicast(destPeer, response);
-                    } else {
-                        queryHandlerMeter.responseSendError();
-                    }
-                }
-            } catch (Exception e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Error in sending response", e);
-                }
-
-                if (ResolverMeterBuildSettings.RESOLVER_METERING && (queryHandlerMeter != null)) {
-                    queryHandlerMeter.responseSendError();
-                }
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void sendSrdi(String destPeer, ResolverSrdiMsg srdi) {
-        String srdiHandlerName = srdi.getHandlerName();
-        SrdiHandlerMeter srdiHandlerMeter = null;
-
-        if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverServiceMonitor != null)) {
-            srdiHandlerMeter = resolverServiceMonitor.getSrdiHandlerMeter(srdiHandlerName);
-        }
-
-        if (destPeer == null) {
-            RendezVousService rendezvous = group.getRendezVousService();
-
-            if (rendezvous == null) {
-                // no rendezvous service, dump it.
-                return;
-            }
-            Message propagateMsg = new Message();
-
-            try {
-                ByteArrayOutputStream baos = new ByteArrayOutputStream();
-                GZIPOutputStream gos = new GZIPOutputStream(baos);
-
-                srdi.getDocument(MimeMediaType.XMLUTF8).sendToStream(gos);
-                gos.finish();
-                gos.close();
-                byte gzipBytes[] = baos.toByteArray();
-
-                MessageElement zipElem = new ByteArrayMessageElement(srdiQueName, GZIP_MEDIA_TYPE, gzipBytes, null);
-
-                propagateMsg.addMessageElement("jxta", zipElem);
-
-                if (rendezvous.getRendezVousStatus() != RendezVousStatus.ADHOC) {
-                    rendezvous.walk(propagateMsg, handlerName, srdiQueName, RendezVousService.DEFAULT_TTL);
-                }
-
-                // propagate to local net as well
-                rendezvous.propagateToNeighbors(propagateMsg, handlerName, srdiQueName, 2);
-
-                if (ResolverMeterBuildSettings.RESOLVER_METERING && (srdiHandlerMeter != null)) {
-                    srdiHandlerMeter.messageSentViaWalker(srdi);
-                }
-            } catch (IOException e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failure sending srdi message", e);
-                }
-
-                if (ResolverMeterBuildSettings.RESOLVER_METERING && (srdiHandlerMeter != null)) {
-                    srdiHandlerMeter.errorPropagatingMessage();
-                }
-            }
-        } else {
-            try {
-                boolean success = sendMessage(destPeer, null, handlerName, srdiQueName, srdiQueName,
-                        (XMLDocument) srdi.getDocument(MimeMediaType.XMLUTF8),
-                        // compression
-                        true);
-
-                if (ResolverMeterBuildSettings.RESOLVER_METERING && (srdiHandlerMeter != null)) {
-                    if (success) {
-                        srdiHandlerMeter.messageSentViaUnicast(destPeer, srdi);
-                    } else {
-                        srdiHandlerMeter.errorSendingMessage();
-                    }
-                }
-            } catch (Exception e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Error in sending srdi message", e);
-                }
-                if (ResolverMeterBuildSettings.RESOLVER_METERING && (srdiHandlerMeter != null)) {
-                    srdiHandlerMeter.errorSendingMessage();
-                }
-            }
-        }
-    }
-
-    private void repropagateQuery(Message msg, ResolverQueryMsg query) {
-        RendezVousService rendezvous = group.getRendezVousService();
-
-        if ((null != rendezvous) && !group.isRendezvous()) {
-            // not a Rendezvous peer? Let someone else forward it.
-            return;
-        }
-
-        // just in case an excessive of attempt to forward a query
-        // hopCount is used to determine forward counts independent of any other TTL
-        if (query.getHopCount() > 3) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("discarding ResolverQuery. HopCount exceeded : " + query.getHopCount());
-            }
-
-            if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverMeter != null)) {
-                resolverMeter.propagationQueryDropped(query);
-            }
-            return;
-        }
-
-        XMLDocument asDoc = (XMLDocument) query.getDocument(MimeMediaType.XMLUTF8);
-        MessageElement docElem = new TextDocumentMessageElement(outQueName, asDoc, null);
-
-        msg.replaceMessageElement("jxta", docElem);
-
-        // Re-propagate the message.
-        // Loop and TTL control is done in demux and propagate(). The TTL
-        // below is just a default it will be reduced appropriately.
-
-        try {
-            if (null != rendezvous) {
-                if (rendezvous.getRendezVousStatus() != RendezVousStatus.ADHOC) {
-                    rendezvous.walk(msg, handlerName, outQueName, RendezVousService.DEFAULT_TTL);
-                }
-                // propagate to local net as well
-                rendezvous.propagateToNeighbors(msg, handlerName, outQueName, 2);
-            } else {
-                endpoint.propagate(msg, handlerName, inQueName);
-            }
-
-            if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverMeter != null)) {
-                resolverMeter.queryPropagatedViaWalker(query);
-            }
-        } catch (IOException e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failure propagating query", e);
-
-                if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverMeter != null)) {
-                    resolverMeter.queryPropagationError(query);
-                }
-            }
-        }
-    }
-
-    /**
-     * Process a resolver query.
-     *
-     * @param query   The query.
-     * @param srcAddr Who sent the query to us. May not be the same as the
-     *                query originator.
-     * @return the query id assigned to the query
-     */
-    private int processQuery(ResolverQueryMsg query, EndpointAddress srcAddr) {
-        String queryHandlerName = query.getHandlerName();
-        QueryHandler theHandler = getHandler(queryHandlerName);
-
-        if (query.getHopCount() > 2) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Discarding query #" + query.getQueryId() + " hopCount > 2 : " + query.getHopCount());
-            }
-
-            // query has been forwarded too many times stop
-            if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverServiceMonitor != null)) {
-                QueryHandlerMeter queryHandlerMeter = resolverServiceMonitor.getQueryHandlerMeter(queryHandlerName);
-                if (queryHandlerMeter != null) {
-                    queryHandlerMeter.queryHopCountDropped();
-                } else {
-                    resolverMeter.invalidQueryDiscarded(srcAddr);
-                }
-            }
-            return ResolverService.OK;
-        }
-
-        if (theHandler == null) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Discarding query #" + query.getQueryId() + ", no handler for :" + queryHandlerName);
-            }
-            // If this peer is a rendezvous peer, it needs to repropagate the query to other rendezvous peer that
-            // may have a handler.
-            if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverMeter != null)) {
-                resolverMeter.unknownHandlerForQuery(query);
-            }
-            return ResolverService.Repropagate;
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Handing query #" + query.getQueryId() + " to : " + queryHandlerName);
-        }
-
-        QueryHandlerMeter queryHandlerMeter = null;
-        long startTime = 0;
-        if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverServiceMonitor != null)) {
-            startTime = System.currentTimeMillis();
-            queryHandlerMeter = resolverServiceMonitor.getQueryHandlerMeter(queryHandlerName);
-        }
-
-        try {
-            int result;
-            if (theHandler instanceof InternalQueryHandler) {
-                result = ((InternalQueryHandler) theHandler).processQuery(query, srcAddr);
-            } else {
-                result = theHandler.processQuery(query);
-            }
-
-            if (ResolverMeterBuildSettings.RESOLVER_METERING && (queryHandlerMeter != null)) {
-                queryHandlerMeter.queryProcessed(query, result, System.currentTimeMillis() - startTime);
-            }
-            return result;
-        } catch (Throwable any) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Uncaught Throwable from handler for : " + queryHandlerName, any);
-            }
-            if (ResolverMeterBuildSettings.RESOLVER_METERING && (queryHandlerMeter != null)) {
-                queryHandlerMeter.errorWhileProcessingQuery(query);
-            }
-            // stop repropagation
-            return ResolverService.OK;
-        }
-    }
-
-    /**
-     * Process a resolver response.
-     *
-     * @param resp    The response.
-     * @param srcAddr Who sent the response. May not be the same as the
-     *                originator response.
-     */
-    private void processResponse(ResolverResponseMsg resp, EndpointAddress srcAddr) {
-        String handlerName = resp.getHandlerName();
-
-        if (handlerName == null) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Missing handlername in response");
-            }
-
-            if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverMeter != null)) {
-                resolverMeter.invalidResponseDiscarded(srcAddr);
-            }
-            return;
-        }
-
-        QueryHandler theHandler = getHandler(handlerName);
-        if (theHandler == null) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("No handler for :" + handlerName);
-            }
-            if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverMeter != null)) {
-                resolverMeter.unknownHandlerForResponse(srcAddr, resp);
-            }
-            return;
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Process response to query #" + resp.getQueryId() + " with " + handlerName);
-        }
-
-        QueryHandlerMeter queryHandlerMeter = null;
-        long startTime = 0;
-
-        if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverServiceMonitor != null)) {
-            startTime = System.currentTimeMillis();
-            queryHandlerMeter = resolverServiceMonitor.getQueryHandlerMeter(handlerName);
-        }
-
-        try {
-            if (theHandler instanceof InternalQueryHandler) {
-                ((InternalQueryHandler) theHandler).processResponse(resp, srcAddr);
-            } else {
-                theHandler.processResponse(resp);
-            }
-
-            if (ResolverMeterBuildSettings.RESOLVER_METERING && (queryHandlerMeter != null)) {
-                queryHandlerMeter.responseProcessed(resp, System.currentTimeMillis() - startTime, srcAddr);
-            }
-        } catch (Throwable all) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Uncaught Throwable from handler for: " + handlerName, all);
-            }
-
-            if (ResolverMeterBuildSettings.RESOLVER_METERING && (queryHandlerMeter != null)) {
-                queryHandlerMeter.errorWhileProcessingResponse(srcAddr);
-            }
-        }
-    }
-
-    /**
-     * propagate a response
-     *
-     * @param response response message to propagate
-     */
-    private void propagateResponse(ResolverResponseMsg response) {
-
-        Message propagateMsg = new Message();
-
-        String queryHandlerName = response.getHandlerName();
-        QueryHandlerMeter queryHandlerMeter = null;
-
-        try {
-            if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverServiceMonitor != null)) {
-                queryHandlerMeter = resolverServiceMonitor.getQueryHandlerMeter(queryHandlerName);
-            }
-
-            XMLDocument responseDoc = (XMLDocument) response.getDocument(MimeMediaType.XMLUTF8);
-            MessageElement elemDoc = new TextDocumentMessageElement(inQueName, responseDoc, null);
-            propagateMsg.addMessageElement("jxta", elemDoc);
-            RendezVousService rendezvous = group.getRendezVousService();
-
-            if (null != rendezvous) {
-                rendezvous.walk(propagateMsg, handlerName, inQueName, RendezVousService.DEFAULT_TTL);
-                if (ResolverMeterBuildSettings.RESOLVER_METERING && (queryHandlerMeter != null)) {
-                    queryHandlerMeter.responseSentViaWalker(response);
-                }
-            } else {
-                endpoint.propagate(propagateMsg, handlerName, inQueName);
-                if (ResolverMeterBuildSettings.RESOLVER_METERING && (queryHandlerMeter != null)) {
-                    // FIXME bondolo 20040909 not technically the correct metric
-                    queryHandlerMeter.responseSentViaWalker(response);
-                }
-            }
-        } catch (IOException e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "failure during propagateResponse", e);
-            }
-            if (ResolverMeterBuildSettings.RESOLVER_METERING && (queryHandlerMeter != null)) {
-                queryHandlerMeter.responsePropagateError();
-            }
-        }
-    }
-
-    /**
-     * Process an SRDI message.
-     *
-     * @param srdimsg The SRDI message.
-     * @param srcAddr Who sent the message. May not be the same as the
-     *                originator of the message.
-     */
-    private void processSrdi(ResolverSrdiMsgImpl srdimsg, EndpointAddress srcAddr) {
-        String handlerName = srdimsg.getHandlerName();
-
-        if (handlerName == null) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Missing handlername in response");
-            }
-
-            if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverMeter != null)) {
-                resolverMeter.invalidSrdiMessageDiscarded(srcAddr);
-            }
-            return;
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Processing an SRDI msg for : " + handlerName + " in Group ID:" + group.getPeerGroupID());
-        }
-
-        SrdiHandler theHandler = getSrdiHandler(handlerName);
-        if (theHandler != null) {
-            SrdiHandlerMeter srdiHandlerMeter = null;
-
-            try {
-                long startTime = 0;
-                if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverServiceMonitor != null)) {
-                    startTime = System.currentTimeMillis();
-                    srdiHandlerMeter = resolverServiceMonitor.getSrdiHandlerMeter(handlerName);
-                }
-
-                theHandler.processSrdi(srdimsg);
-                if (ResolverMeterBuildSettings.RESOLVER_METERING && (srdiHandlerMeter != null)) {
-                    srdiHandlerMeter.messageProcessed(srdimsg, System.currentTimeMillis() - startTime, srcAddr);
-                }
-            } catch (Throwable all) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Uncaught Throwable from handler for: " + handlerName, all);
-                }
-
-                if (ResolverMeterBuildSettings.RESOLVER_METERING && (srdiHandlerMeter != null)) {
-                    srdiHandlerMeter.errorWhileProcessing(srcAddr);
-                }
-            }
-        } else {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING) && group.isRendezvous()) {
-                LOG.warning("No srdi handler registered :" + handlerName + " for Group ID:" + group.getPeerGroupID());
-            } else if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("No srdi handler registered :" + handlerName + " for Group ID:" + group.getPeerGroupID());
-            }
-            if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverMeter != null)) {
-                resolverMeter.unknownHandlerForSrdiMessage(srcAddr, handlerName);
-            }
-        }
-    }
-
-    /**
-     * Send a resolver message to a peer
-     *
-     * @param destPeer destination peer
-     * @param route    destination route advertisement
-     * @param pName    service name on the destination
-     * @param pParam   service param on the destination
-     * @param tagName  tag name of the message element
-     * @param body     the body of the message element
-     * @param gzip     If <code>true</code> then encode the message body using gzip.
-     * @return {@code true} if successful
-     */
-    private boolean sendMessage(String destPeer, RouteAdvertisement route, String pName, String pParam, String tagName, XMLDocument body, boolean gzip) {
-        // Get the messenger ready
-        ID dest;
-        try {
-            dest = IDFactory.fromURI(new URI(destPeer));
-        } catch (URISyntaxException badpeer) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "bad destination peerid : " + destPeer, badpeer);
-            }
-            
-            return false;
-        }
-
-        EndpointAddress destAddress = mkAddress(dest, pName, pParam);
-
-        // FIXME add route to responses as well
-        Messenger messenger = null;
-        if (route == null) {
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer("No route info available for " + destPeer);
-            }
-        } else {
-            // ok we have a route let's pass it to the router
-            if ((null == getRouteControl()) || (routeControl.addRoute(route) == RouteControl.FAILED)) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Failed to add route for " + route.getDestPeerID());
-                }
-            } else {
-                if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                    LOG.finer("Added route for " + route.getDestPeerID());
-                }
-            }
-        }
-        
-        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-            LOG.finer("Creating a messenger immediate for :" + destAddress);
-        }
-
-        messenger = endpoint.getMessengerImmediate(destAddress, route);
-        if (null == messenger) {        
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Failed creating messenger for " + destAddress);
-            }
-            return false;
-        }
-
-        Message msg = new Message();
-        try {
-            MessageElement msgEl;
-            if (gzip) {
-                ByteArrayOutputStream baos = new ByteArrayOutputStream();
-                GZIPOutputStream gos = new GZIPOutputStream(baos);
-
-                body.sendToStream(gos);
-                gos.finish();
-                gos.close();
-                byte gzipBytes[] = baos.toByteArray();
-
-                msgEl = new ByteArrayMessageElement(tagName, GZIP_MEDIA_TYPE, gzipBytes, null);
-            } else {
-                msgEl = new TextDocumentMessageElement(tagName, body, null);
-            }
-            msg.addMessageElement("jxta", msgEl);
-        } catch (Exception ez1) {
-            // Not much we can do
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed building message", ez1);
-            }
-            return false;
-        }
-
-        // Send the message
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Sending " + msg + " to " + destAddress + " " + tagName);
-        }
-
-        // XXX 20040924 bondolo Convert this to ListenerAdaptor
-        messenger.sendMessage(msg, null, null, new FailureListener(dest));
-        
-        return true;
-    }
-
-    private RouteControl getRouteControl() {
-        // Obtain the route control object to manipulate route information when sending and receiving resolver queries.
-        if (routeControl == null) {
-            // insignificant race condition here
-            MessageTransport endpointRouter = endpoint.getMessageTransport("jxta");
-            if (endpointRouter != null) {
-                routeControl = (RouteControl) endpointRouter.transportControl(EndpointRouter.GET_ROUTE_CONTROL, null);
-            } else {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Failed to get RouteControl object. Resolver will not set route hints.");
-                }
-            }
-        }
-        return routeControl;
-    }
-
-    /**
-     * Inner class to handle incoming queries
-     */
-    private class DemuxQuery implements EndpointListener {
-
-        /**
-         * {@inheritDoc}
-         */
-        public void processIncomingMessage(Message message, EndpointAddress srcAddr, EndpointAddress dstAddr) {
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Demuxing a query message from " + srcAddr);
-            }
-
-            MessageElement element = message.getMessageElement("jxta", outQueName);
-            if (element == null) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Message does not contain a query. Discarding message");
-                }
-
-                if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverMeter != null)) {
-                    resolverMeter.invalidQueryDiscarded(srcAddr);
-                }
-                return;
-            }
-
-            ResolverQueryMsg query;
-            try {
-                StructuredDocument asDoc = StructuredDocumentFactory.newStructuredDocument(element);
-                query = new ResolverQuery(asDoc);
-            } catch (IOException e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Ill formatted resolver query, ignoring.", e);
-                }
-                if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverMeter != null)) {
-                    resolverMeter.invalidQueryDiscarded(srcAddr);
-                }
-                return;
-            } catch (IllegalArgumentException e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Ill formatted resolver query, ignoring.", e);
-                }
-                if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverMeter != null)) {
-                    resolverMeter.invalidQueryDiscarded(srcAddr);
-                }
-                return;
-            }
-
-            int res = processQuery(query, srcAddr);
-            if (ResolverService.Repropagate == res) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Repropagating query " + message + " from " + srcAddr);
-                }
-                repropagateQuery(message, query);
-            }
-        }
-    }
-
-    /**
-     * Inner class to handle incoming responses
-     */
-    private class DemuxResponse implements EndpointListener {
-
-        /**
-         * @inheritDoc
-         */
-        public void processIncomingMessage(Message message, EndpointAddress srcAddr, EndpointAddress dstAddr) {
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Demuxing a response from " + srcAddr);
-            }
-
-            MessageElement element = message.getMessageElement("jxta", inQueName);
-            if (null == element) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Message does not contain a response. Discarding message");
-                }
-
-                if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverMeter != null)) {
-                    resolverMeter.invalidResponseDiscarded(srcAddr);
-                }
-                return;
-            }
-
-            ResolverResponse resolverResponse;
-            try {
-                StructuredDocument asDoc = StructuredDocumentFactory.newStructuredDocument(element);
-                resolverResponse = new ResolverResponse(asDoc);
-            } catch (IOException e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Ill formatted resolver response, ignoring.", e);
-                }
-                if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverMeter != null)) {
-                    resolverMeter.invalidResponseDiscarded(srcAddr);
-                }
-                return;
-            } catch (IllegalArgumentException e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Ill formatted resolver response, ignoring.", e);
-                }
-                if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverMeter != null)) {
-                    resolverMeter.invalidResponseDiscarded(srcAddr);
-                }
-                return;
-            }
-            processResponse(resolverResponse, srcAddr);
-        }
-    }
-
-    /**
-     * Inner class to handle SRDI messages
-     */
-    private class DemuxSrdi implements EndpointListener {
-
-        /**
-         * @inheritDoc
-         */
-        public void processIncomingMessage(Message message, EndpointAddress srcAddr, EndpointAddress dstAddr) {
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Demuxing an SRDI message from : " + srcAddr);
-            }
-
-            MessageElement element = message.getMessageElement("jxta", srdiQueName);
-            if (element == null) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Message does not contain a SRDI element. Discarding message");
-                }
-                if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverMeter != null)) {
-                    resolverMeter.invalidSrdiMessageDiscarded(srcAddr);
-                }
-                return;
-            }
-
-            ResolverSrdiMsgImpl srdimsg;
-            try {
-                if (element.getMimeType().getBaseMimeMediaType().equals(GZIP_MEDIA_TYPE)) {
-                    InputStream gzipStream = new GZIPInputStream(element.getStream());
-                    StructuredDocument asDoc = StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, gzipStream);
-                    srdimsg = new ResolverSrdiMsgImpl(asDoc, membership);
-                } else {
-                    StructuredDocument asDoc = StructuredDocumentFactory.newStructuredDocument(element);
-                    srdimsg = new ResolverSrdiMsgImpl(asDoc, membership);
-                }
-            } catch (IOException e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Ill formatted SRDI message, ignoring.", e);
-                }
-                if (ResolverMeterBuildSettings.RESOLVER_METERING && (resolverMeter != null)) {
-                    resolverMeter.invalidSrdiMessageDiscarded(srcAddr);
-                }
-                return;
-            }
-            processSrdi(srdimsg, srcAddr);
-        }
-    }
-
-    /**
-     * Listener to find bad destinations and clean srdi tables for them.
-     */
-    class FailureListener implements OutgoingMessageEventListener {
-        final ID dest;
-
-        FailureListener(ID dest) {
-            this.dest = dest;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public void messageSendFailed(OutgoingMessageEvent event) {
-            // Ignore the failure if it's a case of queue overflow.
-            if (event.getFailure() == null) {
-                return;
-            }
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.warning("Clearing SRDI tables for failed peer : " + dest);
-            }
-
-            for (Object o : Arrays.asList(srdiHandlers.values().toArray())) {
-                SrdiHandler theHandler = (SrdiHandler) o;
-                try {
-                    theHandler.messageSendFailed((PeerID) dest, event);
-                } catch (Throwable all) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Uncaught Throwable from handler : " + theHandler, all);
-                    }
-                }
-            }
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public void messageSendSucceeded(OutgoingMessageEvent event) {// great!
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/ResolverServiceInterface.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/ResolverServiceInterface.java
deleted file mode 100644 (file)
index c3e9bcb..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.resolver;
-
-
-import net.jxta.document.Advertisement;
-import net.jxta.id.ID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.platform.Module;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.protocol.ResolverQueryMsg;
-import net.jxta.protocol.ResolverResponseMsg;
-import net.jxta.protocol.ResolverSrdiMsg;
-import net.jxta.resolver.QueryHandler;
-import net.jxta.resolver.ResolverService;
-import net.jxta.resolver.SrdiHandler;
-import net.jxta.service.Service;
-
-
-/**
- *  Provides a controlled interface to the Resolver Service.
- **/
-public class ResolverServiceInterface implements ResolverService {
-    
-    private final ResolverServiceImpl impl;
-    
-    /**
-     * Only authorized constructor
-     * @param theRealThing reference to the impl
-     */
-    ResolverServiceInterface(ResolverServiceImpl theRealThing) {
-        impl = theRealThing;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     *
-     *  <p/>Since THIS is already such an object, it returns itself.
-     * FIXME: it is kind of absurd to have this method part of the
-     * interface but we do not want to define two levels of Service interface
-     * just for that.
-     */
-    public ResolverService getInterface() {
-        return this;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     *
-     * <p/>FIXME: This is meaningless for the interface object;
-     * it is there only to satisfy the requirements of the
-     * interface that we implement. Ultimately, the API should define
-     * two levels of interfaces: one for the real service implementation
-     * and one for the interface object. Right now it feels a bit heavy
-     * to so that since the only different between the two would be
-     * init() and may-be getName().
-     */
-    public void init(PeerGroup g, ID assignedID, Advertisement impl) {}
-    
-    /**
-     *  {@inheritDoc}
-     *
-     *  <p/>Does nothing in the interface object.
-     */
-    public int startApp(String[] arg) {
-        return Module.START_OK;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     *
-     *  <p/>Does nothing in the interface object.
-     */
-    public void stopApp() {}
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public ModuleImplAdvertisement getImplAdvertisement() {
-        return impl.getImplAdvertisement();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public QueryHandler registerHandler(String name, QueryHandler handler) {
-        return impl.registerHandler(name, handler);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public QueryHandler unregisterHandler(String name) {
-        return impl.unregisterHandler(name);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public SrdiHandler registerSrdiHandler(String name, SrdiHandler handler) {
-        return impl.registerSrdiHandler(name, handler);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public SrdiHandler unregisterSrdiHandler(String name) {
-        return impl.unregisterSrdiHandler(name);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public void  sendQuery(String rdvPeer, ResolverQueryMsg query) {
-        impl.sendQuery(rdvPeer, query);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public void  sendResponse(String destPeer, ResolverResponseMsg response) {
-        impl.sendResponse(destPeer, response);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public void sendSrdi(String destPeer, ResolverSrdiMsg srdi) {
-        impl.sendSrdi(destPeer, srdi);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/package.html
deleted file mode 100644 (file)
index 595f571..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    A JXTA {@link net.jxta.resolver.ResolverService} implementation which 
-                               implements the  standard JXTA Endpoint Resolver Protocol (ERP).
-
-    @see net.jxta.resolver.ResolverService
-    @see <a href="https://jxta-spec.dev.java.net/nonav/JXTAProtocols.html#proto-erp" target="_blank">JXTA Protocols Specification : Endpoint Resolver Protocol</a>
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/ConditionalResolverMeterBuildSettings.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/ConditionalResolverMeterBuildSettings.java
deleted file mode 100644 (file)
index c326f19..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Copyright (c) 2001-2006 Sun Microsystems, Inc. All rights reserved.
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at https://jxta.dev.java.net.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <https://jxta.dev.java.net/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
-
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  https://jxta.dev.java.net/
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- *  
- */
-
-
-/*  ****  THIS IS A GENERATED FILE. DO NOT EDIT.  ****  */
-
-package net.jxta.impl.resolver.resolverMeter;
-
-import java.util.ResourceBundle;
-import net.jxta.impl.meter.*;
-
-public class ConditionalResolverMeterBuildSettings {
-       public static boolean isRuntimeMetering() {
-               boolean runtimeMetering = false; 
-
-               try { 
-                       ResourceBundle userResourceBundle = ResourceBundle.getBundle( "net.jxta.user" ); 
-                       String meteringProperty = "net.jxta.meter.conditionalResolverMetering"; 
-                       String meteringValue = userResourceBundle.getString( meteringProperty ); 
-                       runtimeMetering = "on".equalsIgnoreCase( meteringValue ); 
-               } catch (Exception ignored) { 
-               }
-
-               return runtimeMetering;
-       }
-}
\ No newline at end of file
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/QueryDestinationMeter.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/QueryDestinationMeter.java
deleted file mode 100644 (file)
index 5b6cd6a..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.resolver.resolverMeter;
-
-
-import net.jxta.peer.*;
-import net.jxta.endpoint.*;
-import net.jxta.util.documentSerializable.*;
-import net.jxta.document.*;
-import net.jxta.util.*;
-import java.util.*;
-
-
-public class QueryDestinationMeter {
-    private PeerID peerID;
-    private QueryDestinationMetric cumulativeMetrics;
-    private QueryDestinationMetric deltaMetrics;
-
-    public QueryDestinationMeter(PeerID peerID) {
-        cumulativeMetrics = new QueryDestinationMetric(peerID);
-    }
-       
-    public synchronized QueryDestinationMetric collectMetrics() {
-        QueryDestinationMetric prevDelta = deltaMetrics;
-
-        deltaMetrics = null;
-        return prevDelta;
-    }
-               
-    public QueryDestinationMetric getCumulativeMetrics() {
-        return cumulativeMetrics;
-    }
-
-    private void createDeltaMetric() {
-        deltaMetrics = new QueryDestinationMetric(peerID);
-    }
-
-    protected void querySentViaUnicast() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        deltaMetrics.querySentViaUnicast();
-        cumulativeMetrics.querySentViaUnicast();
-    }
-
-    protected void responseSentViaUnicast() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        deltaMetrics.responseSentViaUnicast();
-        cumulativeMetrics.responseSentViaUnicast();
-    }
-       
-    protected void responseProcessed() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        deltaMetrics.responseProcessed();
-        cumulativeMetrics.responseProcessed();
-    }
-
-    protected void responseToUnregisteredHandler() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        deltaMetrics.responseToUnregisteredHandler();
-        cumulativeMetrics.responseToUnregisteredHandler();
-    }
-       
-    protected void errorWhileProcessingResponse() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        deltaMetrics.errorWhileProcessingResponse();
-        cumulativeMetrics.errorWhileProcessingResponse();
-    }
-       
-    protected void queryProcessed() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        deltaMetrics.queryProcessed();
-        cumulativeMetrics.queryProcessed();
-    }
-
-    protected void queryToUnregisteredHandler() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        deltaMetrics.queryToUnregisteredHandler();
-        cumulativeMetrics.queryToUnregisteredHandler();
-    }
-               
-    protected void errorWhileProcessingQuery() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        deltaMetrics.errorWhileProcessingQuery();
-        cumulativeMetrics.errorWhileProcessingQuery();
-    }
-
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/QueryDestinationMetric.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/QueryDestinationMetric.java
deleted file mode 100644 (file)
index e50e03a..0000000
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.resolver.resolverMeter;
-
-
-import net.jxta.peer.*;
-import net.jxta.endpoint.*;
-import net.jxta.util.documentSerializable.*;
-import net.jxta.document.*;
-import net.jxta.util.*;
-import net.jxta.impl.meter.*;
-
-import java.util.*;
-
-
-/**
- * Metrics for a specific Query Destination for a specific handler 
- **/
-public class QueryDestinationMetric implements DocumentSerializable {
-    private PeerID peerID;
-    private int errorWhileProcessingQuery;
-    private int queryProcessed;
-    private int errorWhileProcessingResponse;
-    private int responseProcessed;
-    private int responseSentViaUnicast;
-    private int querySentViaUnicast;
-
-    private int queryToUnregisteredHandler;
-    private int responseToUnregisteredHandler;
-       
-    public QueryDestinationMetric(PeerID pid) {
-        this.peerID = pid;
-    }
-
-    public QueryDestinationMetric(QueryDestinationMetric prototype) {
-        this.peerID = prototype.peerID;        
-    }
-
-    public QueryDestinationMetric() {}
-
-    public PeerID getPeerID() {
-        return peerID;
-    }
-
-    void querySentViaUnicast() {
-        querySentViaUnicast++;
-    }
-
-    /** Get Queries Sent via Unicast to this destinations **/
-    public int getQueriesSentViaUnicast() {
-        return querySentViaUnicast;
-    }
-       
-    void responseSentViaUnicast() {
-        responseSentViaUnicast++;
-    }
-
-    /** Get Responses Sent via Unicast to this destinations **/
-    public int getResponsesSentViaUnicast() {
-        return responseSentViaUnicast;
-    }
-
-    void responseToUnregisteredHandler() {
-        responseToUnregisteredHandler++;
-    }
-
-    /** Get Responses Recieved to this handler when not registered **/
-    public int getResponseToUnregisteredHandler() {
-        return responseToUnregisteredHandler;
-    }
-               
-    void responseProcessed() {
-        responseProcessed++;
-    }
-
-    /** Get Responses received and processed locally **/
-    public int getResponsesProcessed() {
-        return responseProcessed;
-    }
-       
-    void errorWhileProcessingResponse() {
-        errorWhileProcessingResponse++;
-    }
-
-    /** Get Responses received but failing when processed locally **/
-    public int getErrorsWhileProcessingResponse() {
-        return errorWhileProcessingResponse;
-    }
-       
-    void queryProcessed() {
-        queryProcessed++;
-    }
-
-    /** Get Queries received and processed locally **/
-    public int getQueriesProcessed() {
-        return queryProcessed;
-    }
-
-    void queryToUnregisteredHandler() {
-        queryToUnregisteredHandler++;
-    }
-
-    /** Get Queries Recieved to this handler when not registered **/
-    public int getQueryToUnregisteredHandler() {
-        return queryToUnregisteredHandler;
-    }
-       
-    void errorWhileProcessingQuery() {
-        errorWhileProcessingQuery++;
-    }
-
-    /** Get Queries received but failing when processed locally **/
-    public int getErrorsWhileProcessingQuery() {
-        return errorWhileProcessingQuery;
-    }
-
-    public void serializeTo(Element element) throws DocumentSerializationException {
-        if (peerID != null) {
-            DocumentSerializableUtilities.addString(element, "peerID", peerID.toString());
-        }
-        if (errorWhileProcessingQuery != 0) {
-            DocumentSerializableUtilities.addInt(element, "errorWhileProcessingQuery", errorWhileProcessingQuery);
-        }
-        if (queryProcessed != 0) {
-            DocumentSerializableUtilities.addInt(element, "queryProcessed", queryProcessed);
-        }
-        if (errorWhileProcessingResponse != 0) {
-            DocumentSerializableUtilities.addInt(element, "errorWhileProcessingResponse", errorWhileProcessingResponse);
-        }
-        if (responseProcessed != 0) {
-            DocumentSerializableUtilities.addInt(element, "responseProcessed", responseProcessed);
-        }
-        if (responseSentViaUnicast != 0) {
-            DocumentSerializableUtilities.addInt(element, "responseSentViaUnicast", responseSentViaUnicast);
-        }
-        if (querySentViaUnicast != 0) {
-            DocumentSerializableUtilities.addInt(element, "querySentViaUnicast", querySentViaUnicast);
-        }
-        if (queryToUnregisteredHandler != 0) {
-            DocumentSerializableUtilities.addInt(element, "queryToUnregisteredHandler", queryToUnregisteredHandler);
-        }
-        if (responseToUnregisteredHandler != 0) {
-            DocumentSerializableUtilities.addInt(element, "responseToUnregisteredHandler", responseToUnregisteredHandler);
-        }
-    }
-
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element childElement = (TextElement) e.nextElement();
-            String tagName = (String) childElement.getKey();
-
-            if (tagName.equals("peerID")) {
-                String peerIDText = DocumentSerializableUtilities.getString(childElement);
-
-                peerID = MetricUtilities.getPeerIdFromString(peerIDText);
-            } else if (tagName.equals("errorWhileProcessingQuery")) { 
-                errorWhileProcessingQuery = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("queryProcessed")) { 
-                queryProcessed = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("errorWhileProcessingResponse")) { 
-                errorWhileProcessingResponse = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("responseProcessed")) { 
-                responseProcessed = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("responseSentViaUnicast")) { 
-                responseSentViaUnicast = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("querySentViaUnicast")) { 
-                querySentViaUnicast = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("queryToUnregisteredHandler")) { 
-                queryToUnregisteredHandler = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("responseToUnregisteredHandler")) { 
-                responseToUnregisteredHandler = DocumentSerializableUtilities.getInt(childElement);
-            }
-        }
-    }
-
-    public void mergeMetrics(QueryDestinationMetric otherQueryDestinationMetric) {
-        this.errorWhileProcessingQuery += otherQueryDestinationMetric.errorWhileProcessingQuery;
-        this.queryProcessed += otherQueryDestinationMetric.queryProcessed;
-        this.errorWhileProcessingResponse += otherQueryDestinationMetric.errorWhileProcessingResponse;
-        this.responseProcessed += otherQueryDestinationMetric.responseProcessed;
-        this.responseSentViaUnicast += otherQueryDestinationMetric.responseSentViaUnicast;
-        this.querySentViaUnicast += otherQueryDestinationMetric.querySentViaUnicast;
-        this.queryToUnregisteredHandler += otherQueryDestinationMetric.queryToUnregisteredHandler;
-        this.responseToUnregisteredHandler += otherQueryDestinationMetric.responseToUnregisteredHandler;
-    }
-
-    @Override
-    public int hashCode() {
-        return peerID.hashCode();
-    }
-       
-    @Override
-    public boolean equals(Object other) {
-        if (other instanceof QueryDestinationMetric) {
-            QueryDestinationMetric otherQueryDestinationMetric = (QueryDestinationMetric) other;
-
-            return peerID.equals(otherQueryDestinationMetric.peerID);
-        } else {
-            return false;
-        }
-    }  
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/QueryHandlerMeter.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/QueryHandlerMeter.java
deleted file mode 100644 (file)
index f08337c..0000000
+++ /dev/null
@@ -1,522 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Micro//Systems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.resolver.resolverMeter;
-
-
-import net.jxta.peer.*;
-import net.jxta.peergroup.*;
-import net.jxta.resolver.*;
-import net.jxta.impl.resolver.*;
-import net.jxta.impl.meter.*;
-import net.jxta.protocol.*;
-import net.jxta.meter.*;
-import net.jxta.util.*;
-
-import net.jxta.endpoint.*;
-import net.jxta.exception.*;
-
-import java.net.*;
-import java.util.*;
-
-
-public class QueryHandlerMeter {
-    private static final int QUERY_CULLING_INTERVAL = 5 * 60 * 1000; // Fix-Me: Five minutes hardcoded for now...
-       
-    private ResolverServiceMonitor resolverServiceMonitor;
-    private String handlerName;
-
-    private QueryHandlerMetric cumulativeMetrics;
-    private QueryHandlerMetric deltaMetrics;
-
-    private Hashtable queryDestinationMeters = new Hashtable();
-
-    private Hashtable queryMetricsTable = null;
-
-    private class QueryMetricsTable extends Hashtable {
-
-        void deReference() {
-            queryMetricsTable = null;
-        }
-
-        @Override
-        public String toString() {
-            return handlerName;
-        }
-    }
-
-
-    private class QueryMetric {
-        int queryId;
-        long querySentTime = System.currentTimeMillis();
-        int numResponsesReceived = 0;
-        long lastResponseTime = 0;
-
-        QueryMetric(int queryId) {
-            this.queryId = queryId;
-        }
-    }
-
-    private static LinkedList queryMetricsTables = new LinkedList();
-       
-    static {
-        Thread cullQueries = new Thread(new Runnable() {
-            public void run() {
-                for (;;) {
-                    try {
-                        Thread.sleep(QUERY_CULLING_INTERVAL);
-                    } catch (Exception e) {}
-
-                    long dormantTime = System.currentTimeMillis() - QUERY_CULLING_INTERVAL;
-                                       
-                    synchronized (queryMetricsTables) {
-                        LinkedList keysToRemove = new LinkedList();
-                                               
-                        for (Iterator i = queryMetricsTables.iterator(); i.hasNext();) {
-                            QueryMetricsTable queryMetricsTable = (QueryMetricsTable) i.next();
-
-                            keysToRemove.clear();
-                                                       
-                            synchronized (queryMetricsTable) {
-                                for (Enumeration e = queryMetricsTable.keys(); e.hasMoreElements();) {
-                                    Integer key = (Integer) e.nextElement();
-                                    QueryMetric queryMetric = (QueryMetric) queryMetricsTable.get(key);
-       
-                                    if (queryMetric.lastResponseTime < dormantTime) {
-                                        keysToRemove.add(key);
-                                    }
-                                }
-
-                                for (Iterator k = keysToRemove.iterator(); k.hasNext();) {
-                                    Integer key = (Integer) k.next();
-
-                                    queryMetricsTable.deReference();
-                                    queryMetricsTable.remove(key);
-                                }
-
-                                if (queryMetricsTable.size() == 0) {
-                                    i.remove();
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }, "Resolver Query Metrics Culling Thread");
-
-        cullQueries.setDaemon(true);
-        cullQueries.start();
-    }
-
-    public QueryHandlerMeter(String handlerName, ResolverServiceMonitor resolverServiceMonitor) {
-        this.handlerName = handlerName;
-        cumulativeMetrics = new QueryHandlerMetric(handlerName);
-        this.resolverServiceMonitor = resolverServiceMonitor;
-    }
-
-    public QueryHandlerMetric getCumulativeMetrics() {
-        return cumulativeMetrics;
-    }
-
-    public String getHandlerName() {
-        return handlerName;
-    }
-       
-    public synchronized QueryHandlerMetric collectMetrics() {
-        QueryHandlerMetric prevDelta = deltaMetrics;
-
-        for (Enumeration e = queryDestinationMeters.elements(); e.hasMoreElements();) {
-            QueryDestinationMeter queryDestinationMeter = (QueryDestinationMeter) e.nextElement();
-
-            QueryDestinationMetric queryDestinationMetric = queryDestinationMeter.collectMetrics();
-
-            if (queryDestinationMetric != null) {
-
-                /* Fix-me: while fixing an exception thrown by SrdiHandlerMeter, I noticed that
-                 a similar problem might occur here if there can be a case where a destinationMtric
-                 is available even though nothing has happened to create the delta.
-                 If that is not possible (we need to do a code review!) remove the check for
-                 a null delta here.
-                 */
-                if (prevDelta == null) {
-                    createDeltaMetric();
-                    prevDelta = deltaMetrics;
-                }
-                prevDelta.addQueryDestinationMetric(queryDestinationMetric);
-            }
-        }
-        deltaMetrics = null;
-        return prevDelta;
-    }
-
-    public synchronized QueryDestinationMeter getQueryDestinationMeter(EndpointAddress endpointAddress) {
-        PeerID peerID = MetricUtilities.getPeerIdFromEndpointAddress(endpointAddress);
-
-        return getQueryDestinationMeter(peerID);
-    }
-               
-    public synchronized QueryDestinationMeter getQueryDestinationMeter(String peerIdString) {
-        PeerID peerID = MetricUtilities.getPeerIdFromString(peerIdString);
-
-        return getQueryDestinationMeter(peerID);
-    }
-               
-    public synchronized QueryDestinationMeter getQueryDestinationMeter(PeerID peerID) {
-        QueryDestinationMeter queryDestinationMeter = (QueryDestinationMeter) queryDestinationMeters.get(peerID);
-
-        if (queryDestinationMeter == null) {
-            queryDestinationMeter = new QueryDestinationMeter(peerID);
-                       
-            queryDestinationMeters.put(peerID, queryDestinationMeter);
-            cumulativeMetrics.addQueryDestinationMetric(queryDestinationMeter.getCumulativeMetrics());
-        }
-
-        return queryDestinationMeter;
-    }
-       
-    private void createDeltaMetric() {
-        deltaMetrics = new QueryHandlerMetric(handlerName);
-    }
-
-    @Override
-    public String toString() {
-        return "ResolverHandlerMeter(" + handlerName + ")";
-    }
-
-    public void setRegistered(boolean registered) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.setRegistered(registered);
-        cumulativeMetrics.setRegistered(registered);
-    }
-
-    private QueryMetric getQueryMetric(int queryId) {
-        Integer key = new Integer(queryId);
-
-        synchronized (queryMetricsTables) {
-            if (queryMetricsTable == null) {
-                queryMetricsTable = new QueryMetricsTable();
-                               
-                queryMetricsTables.add(queryMetricsTable);
-            }
-                       
-            QueryMetric queryMetric = (QueryMetric) queryMetricsTable.get(key);
-       
-            if (queryMetric == null) {
-                queryMetric = new QueryMetric(queryId);
-                               
-                queryMetricsTable.put(key, queryMetric);
-            }
-       
-            return queryMetric;        
-        }
-    }
-       
-    // Sent Queries
-
-       
-    public void querySentInGroup(ResolverQueryMsg query) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        getQueryMetric(query.getQueryId()); // register the query
-
-        deltaMetrics.querySentInGroup();
-        cumulativeMetrics.querySentInGroup();          
-    }
-
-    public void querySentViaWalker(ResolverQueryMsg query) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        getQueryMetric(query.getQueryId()); // register the query
-
-        deltaMetrics.querySentViaWalker();
-        cumulativeMetrics.querySentViaWalker();                
-    }
-
-    public void querySentViaUnicast(String peer, ResolverQueryMsg query) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        getQueryMetric(query.getQueryId()); // register the query
-               
-        deltaMetrics.querySentViaUnicast(peer);
-        cumulativeMetrics.querySentViaUnicast(peer);
-
-        QueryDestinationMeter destinationMeter = getQueryDestinationMeter(peer);
-
-        destinationMeter.querySentViaUnicast();
-    }
-
-    public void querySendError() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.querySendError();
-        cumulativeMetrics.querySendError();            
-    }
-
-    public void queryPropagateError() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.queryPropagateError();
-        cumulativeMetrics.queryPropagateError();               
-    }
-
-    public void queryHopCountDropped() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.queryHopCountDropped();
-        cumulativeMetrics.queryHopCountDropped();              
-    }
-
-    public void unableToPropagate() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.unableToPropagate();
-        cumulativeMetrics.unableToPropagate();         
-    }
-
-    // Propagate Query
-
-    public void queryPropagatedInGroup() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.queryPropagatedInGroup();
-        cumulativeMetrics.queryPropagatedInGroup();            
-    }
-
-    public void queryPropagatedViaWalker() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.queryPropagatedViaWalker();
-        cumulativeMetrics.queryPropagatedViaWalker();          
-    }
-
-    public void propagationQueryDropped() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.propagationQueryDropped();
-        cumulativeMetrics.propagationQueryDropped();           
-    }
-       
-    // Sent Responses
-
-    public void responseSentViaUnicast(String peer, ResolverResponseMsg response) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.responseSentViaUnicast();
-        cumulativeMetrics.responseSentViaUnicast();    
-
-        QueryDestinationMeter destinationMeter = getQueryDestinationMeter(peer);
-
-        destinationMeter.responseSentViaUnicast();
-    }
-
-    public void responseSentViaWalker(ResolverResponseMsg response) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.responseSentViaWalker();
-        cumulativeMetrics.responseSentViaWalker();             
-    }
-
-    public void responseSentInGroup(ResolverResponseMsg response) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.responseSentInGroup();
-        cumulativeMetrics.responseSentInGroup();               
-    }          
-
-    public void responseSendError() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.responseSendError();
-        cumulativeMetrics.responseSendError();         
-    }
-
-    public void responsePropagateError() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.responsePropagateError();
-        cumulativeMetrics.responsePropagateError();            
-    }
-
-    // Received Responses
-
-    public void responseProcessed(ResolverResponseMsg response, long processTime, EndpointAddress srcAddr) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        QueryMetric queryMetric = getQueryMetric(response.getQueryId());
-        long now = System.currentTimeMillis();
-        long responseTime = now - queryMetric.querySentTime;
-       
-        queryMetric.lastResponseTime = now;
-        queryMetric.numResponsesReceived++;
-               
-        deltaMetrics.responseProcessed(responseTime, processTime);
-        cumulativeMetrics.responseProcessed(responseTime, processTime);
-
-        QueryDestinationMeter destinationMeter = getQueryDestinationMeter(srcAddr);
-
-        destinationMeter.responseProcessed();
-    }
-
-    public void responseToUnregisteredHandler(EndpointAddress src) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.responseToUnregisteredHandler();
-        cumulativeMetrics.responseToUnregisteredHandler();
-
-        QueryDestinationMeter destinationMeter = getQueryDestinationMeter(src);
-
-        destinationMeter.responseToUnregisteredHandler();
-    }
-
-    public void errorWhileProcessingResponse(EndpointAddress srcAddr) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.errorWhileProcessingResponse();
-        cumulativeMetrics.errorWhileProcessingResponse();
-
-        QueryDestinationMeter destinationMeter = getQueryDestinationMeter(srcAddr);
-
-        destinationMeter.errorWhileProcessingResponse();
-    }  
-       
-    // Received Queries        
-
-    public void queryProcessed(ResolverQueryMsg query, int result, long processTime) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.queryProcessed(result, processTime);
-        cumulativeMetrics.queryProcessed(result, processTime);
-
-        QueryDestinationMeter destinationMeter = getQueryDestinationMeter(query.getSrc());
-
-        destinationMeter.queryProcessed();
-    }
-
-    public void queryToUnregisteredHandler(ResolverQueryMsg query) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.queryToUnregisteredHandler();
-        cumulativeMetrics.queryToUnregisteredHandler();
-
-        QueryDestinationMeter destinationMeter = getQueryDestinationMeter(query.getSrc());
-
-        destinationMeter.queryToUnregisteredHandler();
-    }
-
-    public void errorWhileProcessingQuery(ResolverQueryMsg query) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.errorWhileProcessingQuery();
-        cumulativeMetrics.errorWhileProcessingQuery();
-
-        QueryDestinationMeter destinationMeter = getQueryDestinationMeter(query.getSrc());
-
-        destinationMeter.errorWhileProcessingQuery();
-    }
-
-    public Enumeration getQueryDestinationMeters() {
-        return queryDestinationMeters.elements();
-    }
-
-    public int getQueryDestinationCount() {
-        return queryDestinationMeters.size();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/QueryHandlerMetric.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/QueryHandlerMetric.java
deleted file mode 100644 (file)
index e9eac4b..0000000
+++ /dev/null
@@ -1,582 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.resolver.resolverMeter;
-
-
-import net.jxta.resolver.*;
-import net.jxta.util.documentSerializable.*;
-import net.jxta.document.*;
-import net.jxta.endpoint.*;
-import net.jxta.exception.*;
-import net.jxta.peer.*;
-import net.jxta.util.*;
-import java.util.*;
-
-
-/**
- * Metrics for a Registered handler Name
- **/
-public class QueryHandlerMetric implements DocumentSerializable {
-    public static final String REGISTERED = "registered";
-    public static final String UNREGISTERED = "unregistered";
-       
-    private String handlerName;
-    private String registered;
-       
-    private int numResponses = 0;
-    private long responseProcessingTime = 0;
-    private long responseTime = 0;
-    private int numResponseErrors = 0;
-
-    private int numQueries = 0;
-    private int numQueriesRepropagated = 0;
-    private long queryProcessingTime = 0;
-    private int numQueryErrors = 0;
-
-    private int numQueriesSentInGroup = 0;
-    private int numQueriesSentViaWalker = 0;
-    private int numQueriesSentViaUnicast = 0;
-    private int numErrorsSendingQueries = 0;
-    private int numErrorsPropagatingQueries = 0;
-    private int numQueriesHopCountDropped = 0;
-
-    private int numPropagationQueriesDropped = 0;      
-    private int numPropagatedInGroup = 0;      
-    private int numPropagatedViaWalker = 0;
-    private int numUnableToPropagate = 0;
-       
-    private int numResponsesToUnregisteredHandler = 0;
-    private int numQueriesToUnregisteredHandler = 0;
-       
-    private int numResponsesSentInGroup = 0;
-    private int numResponsesSentViaWalker = 0;
-    private int numResponsesSentViaUnicast = 0;
-    private int numErrorsSendingResponses = 0;
-    private int numErrorsPropagatingResponses = 0;
-       
-    private HashMap destinationMetrics = new HashMap();
-
-    public QueryHandlerMetric(String handlerName) {
-        this.handlerName = handlerName;
-    }
-
-    public QueryHandlerMetric() {}
-
-    public QueryHandlerMetric(QueryHandlerMetric prototype) {
-        this.handlerName = prototype.handlerName;
-    }
-
-    void responseProcessed(long responseTime, long processingTime) {
-        numResponses++;
-        responseTime += responseTime;
-        responseProcessingTime += processingTime;
-    }
-
-    void responseToUnregisteredHandler() {
-        numResponsesToUnregisteredHandler++;
-    }
-
-    void errorWhileProcessingResponse() {
-        numResponseErrors++;
-    }
-
-    void queryProcessed(int result, long processingTime) {
-        numQueries++;
-
-        if (result == ResolverService.Repropagate) {
-            numQueriesRepropagated++;
-        }
-                       
-        queryProcessingTime += processingTime;
-    }
-
-    void queryToUnregisteredHandler() {
-        numQueriesToUnregisteredHandler++;
-    }
-       
-    void errorWhileProcessingQuery() {
-        numQueryErrors++;
-    }
-
-    void querySentInGroup() {
-        numQueriesSentInGroup++;
-    }
-
-    void querySentViaWalker() {
-        numQueriesSentViaWalker++;
-    }
-
-    void querySentViaUnicast(String peer) {
-        numQueriesSentViaUnicast++;
-    }
-
-    void querySendError() {
-        numErrorsSendingQueries++;
-    }
-
-    void queryPropagateError() {
-        numErrorsPropagatingQueries++;
-    }
-
-    void queryHopCountDropped() {
-        numQueriesHopCountDropped++;
-    }
-
-    void responseSentInGroup() {
-        numResponsesSentInGroup++;
-    }
-
-    void responseSentViaWalker() {
-        numResponsesSentViaWalker++;
-    }
-
-    void responseSentViaUnicast() {
-        numResponsesSentViaUnicast++;
-    }
-
-    void responseSendError() {
-        numErrorsSendingResponses++;
-    }
-       
-    void responsePropagateError() {
-        numErrorsPropagatingResponses++;
-    }
-
-    void propagationQueryDropped() {
-        numPropagationQueriesDropped++;
-    }
-
-    void queryPropagatedInGroup() {
-        numPropagatedInGroup++;
-    }
-
-    void queryPropagatedViaWalker() {
-        numPropagatedViaWalker++;
-    }
-
-    void unableToPropagate() {
-        numUnableToPropagate++;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (obj instanceof QueryHandlerMetric) {
-            QueryHandlerMetric otherQueryHandlerMetric = (QueryHandlerMetric) obj;
-
-            return handlerName.equals((otherQueryHandlerMetric.handlerName));
-        } else {
-            return false;
-        }
-    }
-
-    @Override
-    public int hashCode() { 
-        return handlerName.hashCode();
-    }
-
-    void setRegistered(boolean isRegistered) {
-        this.registered = isRegistered ? REGISTERED : UNREGISTERED;
-    }
-
-    /** Get Handler Name for this Metric **/
-    public String getHandlerName() {
-        return handlerName;
-    }
-
-    /** Get State of Handler currently 
-     * @return REGISTERED or UNREGISTERED
-     **/
-    public String getRegistered() {
-        return (registered != null) ? registered : UNREGISTERED;
-    }
-
-    /** The number of responses received by this Handler **/
-    public int getNumResponses() {
-        return numResponses;
-    }
-
-    /** The total clock time to process all responses received by this Handler **/
-    public long getResponseProcessingTime() {
-        return responseProcessingTime;
-    }
-
-    /** The average clock time to process responses received by this Handler **/
-    public long getAverageResponseProcessingTime() {
-        return (numResponses == 0) ? 0 : (responseProcessingTime / numResponses);
-    }
-
-    /** The total time to receive all responses to queries sent by this Handler **/
-    public long getResponseTime() {
-        return responseTime;
-    }
-
-    /** The average time to receive responses to queries sent by this Handler **/
-    public long getAverageResponseTime() {
-        return (numResponses == 0) ? 0 : (responseTime / numResponses);
-    }
-
-    /** Number of local errors while processing received responses **/
-    public int getNumResponseErrors() {
-        return numResponseErrors;
-    }
-       
-    /** The number of queries received by this Handler **/
-    public int getNumQueries() {
-        return numQueries;
-    }
-
-    /** The number of queries received and repropagated by this Handler **/
-    public int getNumQueriesRepropagated() {
-        return numQueriesRepropagated;
-    }
-
-    /** The total clock time to process all Queries received by this Handler **/
-    public long getQueryProcessingTime() {
-        return queryProcessingTime;
-    }
-
-    /** The average clock time to process Queries received by this Handler **/
-    public long getAverageQueryProcessingTime() {
-        return (numQueries == 0) ? 0 : (queryProcessingTime / numQueries);
-    }
-
-    /** Number of local errors while processing received Queries **/
-    public int getNumQueryErrors() {
-        return numQueryErrors;
-    }
-
-    /** Number of Queries sent in Group ***/
-    public int getNumQueriesSentInGroup() {
-        return numQueriesSentInGroup;
-    }
-
-    /** Number of Queries sent via Walker ***/
-    public int getNumQueriesSentViaWalker() {
-        return numQueriesSentViaWalker;
-    }
-
-    /** Number of Queries sent via Unicast ***/
-    public int getNumQueriesSentViaUnicast() {
-        return numQueriesSentViaUnicast;
-    }
-
-    /** Number of Errors while sending Queries ***/
-    public int getNumErrorsSendingQueries() {
-        return numErrorsSendingQueries;
-    }
-
-    /** Number of Errors while propagating Queries ***/
-    public int getNumErrorsPropagatingQueries() {
-        return numErrorsPropagatingQueries;
-    }
-       
-    /** Number of Responses sent in Group ***/
-    public int getNumResponsesSentInGroup() {
-        return numResponsesSentInGroup;
-    }
-
-    /** Number of Responses sent via Walker ***/
-    public int getNumResponsesSentViaWalker() {
-        return numResponsesSentViaWalker;
-    }
-
-    /** Number of Responses sent via Unicast ***/
-    public int getNumResponsesSentViaUnicast() {
-        return numResponsesSentViaUnicast;
-    }
-
-    /** Number of Errors while sending Responses ***/
-    public int getNumErrorsSendingResponses() {
-        return numErrorsSendingResponses;
-    }
-
-    /** Number of Errors while propagating Responses ***/
-    public int getNumErrorsPropagatingResponses() {
-        return numErrorsPropagatingResponses;
-    }
-
-    public int getNumQueriesSent() {
-        return (numQueriesSentInGroup + numQueriesSentViaWalker + numQueriesSentViaUnicast);
-    }
-
-    public int getNumQuerySendErrors() {
-        return (numErrorsSendingQueries + numErrorsPropagatingQueries);
-    }
-
-    public int getNumResponsesSent() {
-        return (numResponsesSentInGroup + numResponsesSentViaWalker + numResponsesSentViaUnicast);
-    }
-
-    public int getNumResponseSendErrors() {
-        return (numErrorsSendingResponses + numErrorsPropagatingResponses);
-    }
-       
-    public void addQueryDestinationMetric(QueryDestinationMetric queryDestinationMetric) {
-        destinationMetrics.put(queryDestinationMetric.getPeerID(), queryDestinationMetric);
-    }
-       
-    public QueryDestinationMetric getQueryDestinationMetric(PeerID peerID) {
-        QueryDestinationMetric destinationMetric = (QueryDestinationMetric) destinationMetrics.get(peerID);
-               
-        if (destinationMetric == null) {
-            destinationMetric = new QueryDestinationMetric(peerID);
-            destinationMetrics.put(peerID, destinationMetric);
-        }
-        return destinationMetric;
-    }
-
-    public Iterator getDestinationMetrics() {
-
-        return destinationMetrics.values().iterator();
-    }
-       
-    public void serializeTo(Element element) throws DocumentSerializationException {
-        if (handlerName != null) {
-            DocumentSerializableUtilities.addString(element, "handlerName", handlerName);
-        }
-        if (registered != null) {
-            DocumentSerializableUtilities.addString(element, "registered", registered);
-        }
-        if (numResponses != 0) {
-            DocumentSerializableUtilities.addInt(element, "numResponses", numResponses);
-        }
-        if (responseProcessingTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "responseProcessingTime", responseProcessingTime);
-        }
-        if (responseTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "responseTime", responseTime);
-        }
-        if (numResponseErrors != 0) {
-            DocumentSerializableUtilities.addInt(element, "numResponseErrors", numResponseErrors);
-        }
-        if (numQueries != 0) {
-            DocumentSerializableUtilities.addInt(element, "numQueries", numQueries);
-        }
-        if (numQueriesRepropagated != 0) {
-            DocumentSerializableUtilities.addInt(element, "numQueriesRepropagated", numQueriesRepropagated);
-        }
-        if (queryProcessingTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "queryProcessingTime", queryProcessingTime);
-        }
-        if (numQueryErrors != 0) {
-            DocumentSerializableUtilities.addInt(element, "numQueryErrors", numQueryErrors);
-        }
-        if (numQueriesSentInGroup != 0) {
-            DocumentSerializableUtilities.addInt(element, "numQueriesSentInGroup", numQueriesSentInGroup);
-        }
-        if (numQueriesSentViaWalker != 0) {
-            DocumentSerializableUtilities.addInt(element, "numQueriesSentViaWalker", numQueriesSentViaWalker);
-        }
-        if (numQueriesSentViaUnicast != 0) {
-            DocumentSerializableUtilities.addInt(element, "numQueriesSentViaUnicast", numQueriesSentViaUnicast);
-        }
-        if (numErrorsSendingQueries != 0) {
-            DocumentSerializableUtilities.addInt(element, "numErrorsSendingQueries", numErrorsSendingQueries);
-        }
-        if (numErrorsPropagatingQueries != 0) {
-            DocumentSerializableUtilities.addInt(element, "numErrorsPropagatingQueries", numErrorsPropagatingQueries);
-        }
-        if (numQueriesHopCountDropped != 0) {
-            DocumentSerializableUtilities.addInt(element, "numQueriesHopCountDropped", numQueriesHopCountDropped);
-        }
-        if (numPropagationQueriesDropped != 0) {
-            DocumentSerializableUtilities.addInt(element, "numPropagationQueriesDropped", numPropagationQueriesDropped);
-        }
-        if (numPropagatedInGroup != 0) {
-            DocumentSerializableUtilities.addInt(element, "numPropagatedInGroup", numPropagatedInGroup);
-        }
-        if (numPropagatedViaWalker != 0) {
-            DocumentSerializableUtilities.addInt(element, "numPropagatedViaWalker", numPropagatedViaWalker);
-        }
-        if (numUnableToPropagate != 0) {
-            DocumentSerializableUtilities.addInt(element, "numUnableToPropagate", numUnableToPropagate);
-        }
-        if (numResponsesToUnregisteredHandler != 0) {
-            DocumentSerializableUtilities.addInt(element, "numResponsesToUnregisteredHandler", numResponsesToUnregisteredHandler);
-        }
-        if (numQueriesToUnregisteredHandler != 0) {
-            DocumentSerializableUtilities.addInt(element, "numQueriesToUnregisteredHandler", numQueriesToUnregisteredHandler);
-        }
-        if (numResponsesSentInGroup != 0) {
-            DocumentSerializableUtilities.addInt(element, "numResponsesSentInGroup", numResponsesSentInGroup);
-        }
-        if (numResponsesSentViaWalker != 0) {
-            DocumentSerializableUtilities.addInt(element, "numResponsesSentViaWalker", numResponsesSentViaWalker);
-        }
-        if (numResponsesSentViaUnicast != 0) {
-            DocumentSerializableUtilities.addInt(element, "numResponsesSentViaUnicast", numResponsesSentViaUnicast);
-        }
-        if (numErrorsSendingResponses != 0) {
-            DocumentSerializableUtilities.addInt(element, "numErrorsSendingResponses", numErrorsSendingResponses);
-        }
-        if (numErrorsPropagatingResponses != 0) {
-            DocumentSerializableUtilities.addInt(element, "numErrorsPropagatingResponses", numErrorsPropagatingResponses);
-        }
-       
-        for (Iterator i = destinationMetrics.values().iterator(); i.hasNext();) {
-            Element queryDestinationElement = DocumentSerializableUtilities.createChildElement(element, "destination");
-            QueryDestinationMetric queryDestinationMetric = (QueryDestinationMetric) i.next();
-
-            queryDestinationMetric.serializeTo(queryDestinationElement);
-        }
-    }
-
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element childElement = (TextElement) e.nextElement();
-            String tagName = (String) childElement.getKey();
-
-            if (tagName.equals("handlerName")) { 
-                handlerName = DocumentSerializableUtilities.getString(childElement);
-            } else if (tagName.equals("registered")) { 
-                registered = DocumentSerializableUtilities.getString(childElement);
-            } else if (tagName.equals("numResponses")) { 
-                numResponses = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("responseProcessingTime")) { 
-                responseProcessingTime = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("responseTime")) { 
-                responseTime = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("numResponseErrors")) { 
-                numResponseErrors = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numQueries")) { 
-                numQueries = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numQueriesRepropagated")) { 
-                numQueriesRepropagated = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("queryProcessingTime")) { 
-                queryProcessingTime = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("numQueryErrors")) { 
-                numQueryErrors = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numQueriesSentInGroup")) { 
-                numQueriesSentInGroup = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numQueriesSentViaWalker")) { 
-                numQueriesSentViaWalker = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numQueriesSentViaUnicast")) { 
-                numQueriesSentViaUnicast = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numErrorsSendingQueries")) { 
-                numErrorsSendingQueries = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numErrorsPropagatingQueries")) { 
-                numErrorsPropagatingQueries = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numQueriesHopCountDropped")) { 
-                numQueriesHopCountDropped = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numPropagationQueriesDropped")) { 
-                numPropagationQueriesDropped = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numPropagatedInGroup")) { 
-                numPropagatedInGroup = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numPropagatedViaWalker")) { 
-                numPropagatedViaWalker = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numUnableToPropagate")) { 
-                numUnableToPropagate = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numResponsesToUnregisteredHandler")) { 
-                numResponsesToUnregisteredHandler = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numQueriesToUnregisteredHandler")) { 
-                numQueriesToUnregisteredHandler = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numResponsesSentInGroup")) { 
-                numResponsesSentInGroup = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numResponsesSentViaWalker")) { 
-                numResponsesSentViaWalker = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numResponsesSentViaUnicast")) { 
-                numResponsesSentViaUnicast = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numErrorsSendingResponses")) { 
-                numErrorsSendingResponses = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numErrorsPropagatingResponses")) { 
-                numErrorsPropagatingResponses = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("destination")) {
-                QueryDestinationMetric queryDestinationMetric = new QueryDestinationMetric();
-
-                queryDestinationMetric.initializeFrom(childElement);
-                addQueryDestinationMetric(queryDestinationMetric);
-            }
-        }
-    }
-
-    public void mergeMetrics(QueryHandlerMetric otherQueryHandlerMetric) {
-        this.numResponses += otherQueryHandlerMetric.numResponses;
-        this.responseProcessingTime += otherQueryHandlerMetric.responseProcessingTime;
-        this.responseTime += otherQueryHandlerMetric.responseTime;
-        this.numResponseErrors += otherQueryHandlerMetric.numResponseErrors;
-
-        this.numQueries += otherQueryHandlerMetric.numQueries;
-        this.numQueriesRepropagated += otherQueryHandlerMetric.numQueriesRepropagated;
-        this.queryProcessingTime += otherQueryHandlerMetric.queryProcessingTime;
-        this.numQueryErrors += otherQueryHandlerMetric.numQueryErrors;
-
-        this.numQueriesSentInGroup += otherQueryHandlerMetric.numQueriesSentInGroup;
-        this.numQueriesSentViaWalker += otherQueryHandlerMetric.numQueriesSentViaWalker;
-        this.numQueriesSentViaUnicast += otherQueryHandlerMetric.numQueriesSentViaUnicast;
-        this.numErrorsSendingQueries += otherQueryHandlerMetric.numErrorsSendingQueries;
-        this.numErrorsPropagatingQueries += otherQueryHandlerMetric.numErrorsPropagatingQueries;
-        this.numQueriesHopCountDropped += otherQueryHandlerMetric.numQueriesHopCountDropped;
-
-        this.numResponsesSentInGroup += otherQueryHandlerMetric.numResponsesSentInGroup;
-        this.numResponsesSentViaWalker += otherQueryHandlerMetric.numResponsesSentViaWalker;
-        this.numResponsesSentViaUnicast += otherQueryHandlerMetric.numResponsesSentViaUnicast;
-        this.numErrorsSendingResponses += otherQueryHandlerMetric.numErrorsSendingResponses;
-        this.numErrorsPropagatingResponses += otherQueryHandlerMetric.numErrorsPropagatingResponses;   
-
-        for (Iterator i = otherQueryHandlerMetric.getDestinationMetrics(); i.hasNext();) {
-            QueryDestinationMetric otherQueryDestinationMetric = (QueryDestinationMetric) i.next();
-            QueryDestinationMetric ourQueryDestinationMetric = getQueryDestinationMetric(otherQueryDestinationMetric.getPeerID());
-
-            if (ourQueryDestinationMetric == null) {
-                ourQueryDestinationMetric = new QueryDestinationMetric(otherQueryDestinationMetric);
-                addQueryDestinationMetric(ourQueryDestinationMetric);
-            }
-
-            ourQueryDestinationMetric.mergeMetrics(otherQueryDestinationMetric);
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/ResolverMeter.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/ResolverMeter.java
deleted file mode 100644 (file)
index a528855..0000000
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Micro//Systems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.resolver.resolverMeter;
-
-
-import net.jxta.peer.*;
-import net.jxta.peergroup.*;
-import net.jxta.resolver.*;
-import net.jxta.impl.resolver.*;
-import net.jxta.protocol.*;
-import net.jxta.endpoint.*;
-
-import java.net.*;
-import java.util.*;
-
-
-public class ResolverMeter {
-    private ResolverServiceMonitor resolverServiceMonitor;
-    private ResolverMetric cumulativeMetrics;
-    private ResolverMetric deltaMetrics;
-
-    public ResolverMeter(ResolverServiceMonitor resolverServiceMonitor) {
-        this.resolverServiceMonitor = resolverServiceMonitor;
-        cumulativeMetrics = new ResolverMetric();
-    }
-
-    public ResolverMetric getCumulativeMetrics() {
-        return cumulativeMetrics;
-    }
-
-    public synchronized ResolverMetric collectMetrics() {
-        ResolverMetric prevDelta = deltaMetrics;
-
-        deltaMetrics = null;
-        return prevDelta;
-    }
-       
-    private void createDeltaMetric() {
-        deltaMetrics = new ResolverMetric();
-    }
-
-    @Override
-    public String toString() {
-        return "ResolverMeter";
-    }
-
-    public void invalidSrdiMessageDiscarded(EndpointAddress src) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.invalidSrdiMessageDiscarded();
-        cumulativeMetrics.invalidSrdiMessageDiscarded();               
-    }
-
-    public void unknownHandlerForSrdiMessage(EndpointAddress src, String handlerName) {
-        if (handlerName != null) {
-            SrdiHandlerMeter srdiHandlerMeter = resolverServiceMonitor.getSrdiHandlerMeter(handlerName);
-
-            srdiHandlerMeter.srdiToUnregisteredHandler(src);
-        } else { 
-            invalidSrdiDiscarded();
-        }                      
-    }
-
-    public void invalidSrdiDiscarded() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.invalidResponseDiscarded();
-        cumulativeMetrics.invalidResponseDiscarded();          
-    }  
-       
-    public void invalidResponseDiscarded(EndpointAddress src) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.invalidResponseDiscarded();
-        cumulativeMetrics.invalidResponseDiscarded();          
-    }
-
-    public void unknownHandlerForResponse(EndpointAddress src, ResolverResponseMsg resp) {
-        String handlerName = resp.getHandlerName();
-               
-        if (handlerName != null) {
-            QueryHandlerMeter queryHandlerMeter = resolverServiceMonitor.getQueryHandlerMeter(handlerName);
-
-            queryHandlerMeter.responseToUnregisteredHandler(src);
-        } else { 
-            invalidResponseDiscarded(src);
-        }                      
-    }
-
-    public void invalidQueryDiscarded(EndpointAddress src) {
-        invalidQueryDiscarded(); // We aren't tracking on source at this point (or ever?)
-    }
-       
-    public void invalidQueryDiscarded() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.invalidQueryDiscarded();
-        cumulativeMetrics.invalidQueryDiscarded();             
-    }
-
-    public void unknownHandlerForQuery(ResolverQueryMsg query) {
-        String handlerName = query.getHandlerName();
-               
-        if (handlerName != null) {
-            QueryHandlerMeter queryHandlerMeter = resolverServiceMonitor.getQueryHandlerMeter(handlerName);
-
-            queryHandlerMeter.queryToUnregisteredHandler(query);
-        } else { 
-            invalidQueryDiscarded();
-        }              
-    }
-       
-    public void queryPropagatedInGroup(ResolverQueryMsg query) {
-        String handlerName = query.getHandlerName();
-               
-        if (handlerName != null) {
-            QueryHandlerMeter queryHandlerMeter = resolverServiceMonitor.getQueryHandlerMeter(handlerName);
-
-            queryHandlerMeter.queryPropagatedInGroup();
-        } else { 
-            invalidQueryDiscarded();
-        }      
-    }
-
-    public void queryPropagatedViaWalker(ResolverQueryMsg query) {
-        String handlerName = query.getHandlerName();
-               
-        if (handlerName != null) {
-            QueryHandlerMeter queryHandlerMeter = resolverServiceMonitor.getQueryHandlerMeter(handlerName);
-
-            queryHandlerMeter.queryPropagatedViaWalker();
-        } else { 
-            invalidQueryDiscarded();
-        }              
-    }
-
-    public void propagationQueryDropped(ResolverQueryMsg query) {
-        String handlerName = query.getHandlerName();
-               
-        if (handlerName != null) {
-            QueryHandlerMeter queryHandlerMeter = resolverServiceMonitor.getQueryHandlerMeter(handlerName);
-
-            queryHandlerMeter.propagationQueryDropped();
-        } else { 
-            invalidQueryDiscarded();
-        }
-    }
-
-    public void queryPropagationError(ResolverQueryMsg query) {
-        String handlerName = query.getHandlerName();
-               
-        if (handlerName != null) {
-            QueryHandlerMeter queryHandlerMeter = resolverServiceMonitor.getQueryHandlerMeter(handlerName);
-
-            queryHandlerMeter.unableToPropagate();
-        } else { 
-            invalidQueryDiscarded();
-        }
-    }          
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/ResolverMeterBuildSettings.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/ResolverMeterBuildSettings.java
deleted file mode 100644 (file)
index a6d7b12..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Copyright (c) 2001-2006 Sun Microsystems, Inc. All rights reserved.
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at https://jxta.dev.java.net.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <https://jxta.dev.java.net/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
-
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  https://jxta.dev.java.net/
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- *  
- */
-
-
-/*  ****  THIS IS A GENERATED FILE. DO NOT EDIT.  ****  */
-
-package net.jxta.impl.resolver.resolverMeter;
-
-import net.jxta.impl.meter.*;
-
-public interface ResolverMeterBuildSettings extends MeterBuildSettings {
-       public static final boolean RESOLVER_METERING = ConditionalResolverMeterBuildSettings.isRuntimeMetering();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/ResolverMetric.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/ResolverMetric.java
deleted file mode 100644 (file)
index ae75b1d..0000000
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.resolver.resolverMeter;
-
-
-import net.jxta.resolver.*;
-import net.jxta.util.documentSerializable.*;
-import net.jxta.document.*;
-
-import java.util.*;
-
-
-/**
- * The general Metric for this resolver 
- **/
-public class ResolverMetric implements DocumentSerializable {
-    private int numInvalidSrdiMessages = 0;
-    private int numSrdiMessagesToUnknownHandler = 0;
-               
-    private int numInvalidResponses = 0;
-    private int numResponsesToUnknownHandler = 0;
-       
-    private int numInvalidQueries = 0;
-    private int numQueriesToUnknownHandler = 0;
-
-    public ResolverMetric() {}
-
-    public ResolverMetric(ResolverMetric prototype) {}
-
-    /** Number of invalid Srdi Messages received */
-    public int getNumInvalidSrdiMessages() {
-        return numInvalidSrdiMessages;
-    }
-
-    /** Number of Srdi Messages received for unknown handlers */
-    public int getNumSrdiMessagesToUnknownHandler() {
-        return numSrdiMessagesToUnknownHandler;
-    }
-
-    /** Number of invalid Query Response Messages received */
-    public int getNumInvalidResponses() {
-        return numInvalidResponses;
-    }
-
-    /** Number of Response Messages to unknown handlers received */
-    public int getNumResponsesToUnknownHandler() {
-        return numResponsesToUnknownHandler;
-    }
-
-    /** Number of invalid Query Messages received */
-    public int getNumInvalidQueries() {
-        return numInvalidQueries;
-    }
-
-    /** Number of Query Messages to unknown handlers received */
-    public int getNumQueriesToUnknownHandler() {
-        return numQueriesToUnknownHandler;
-    }
-
-    void invalidSrdiMessageDiscarded() {
-        numInvalidSrdiMessages++;
-    }
-       
-    void unknownHandlerForSrdiMessage() {
-        numSrdiMessagesToUnknownHandler++;
-    }
-
-    void invalidResponseDiscarded() {
-        numInvalidResponses++;
-    }
-
-    void unknownHandlerForResponse() {
-        numResponsesToUnknownHandler++;
-    }
-
-    void invalidQueryDiscarded() {
-        numInvalidQueries++;
-    }
-
-    void unknownHandlerForQuery() {
-        numQueriesToUnknownHandler++;
-    }  
-
-    public void serializeTo(Element element) throws DocumentSerializationException {
-        if (numInvalidSrdiMessages != 0) {
-            DocumentSerializableUtilities.addInt(element, "numInvalidSrdiMessages", numInvalidSrdiMessages);
-        }
-        if (numSrdiMessagesToUnknownHandler != 0) {
-            DocumentSerializableUtilities.addInt(element, "numSrdiMessagesToUnknownHandler", numSrdiMessagesToUnknownHandler);
-        }
-        if (numInvalidResponses != 0) {
-            DocumentSerializableUtilities.addInt(element, "numInvalidResponses", numInvalidResponses);
-        }
-        if (numResponsesToUnknownHandler != 0) {
-            DocumentSerializableUtilities.addInt(element, "numResponsesToUnknownHandler", numResponsesToUnknownHandler);
-        }
-        if (numInvalidQueries != 0) {
-            DocumentSerializableUtilities.addInt(element, "numInvalidQueries", numInvalidQueries);
-        }
-        if (numQueriesToUnknownHandler != 0) {
-            DocumentSerializableUtilities.addInt(element, "numQueriesToUnknownHandler", numQueriesToUnknownHandler);
-        }
-    }
-
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element childElement = (TextElement) e.nextElement();
-            String tagName = (String) childElement.getKey();
-
-            if (tagName.equals("numInvalidSrdiMessages")) { 
-                numInvalidSrdiMessages = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numSrdiMessagesToUnknownHandler")) { 
-                numSrdiMessagesToUnknownHandler = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numInvalidResponses")) { 
-                numInvalidResponses = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numResponsesToUnknownHandler")) { 
-                numResponsesToUnknownHandler = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numInvalidQueries")) { 
-                numInvalidQueries = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numQueriesToUnknownHandler")) { 
-                numQueriesToUnknownHandler = DocumentSerializableUtilities.getInt(childElement);
-            }
-        }
-    }
-
-    public void mergeMetrics(ResolverMetric otherResolverMetric) {     
-        if (otherResolverMetric == null) {
-            return;  
-        }
-        this.numInvalidSrdiMessages += otherResolverMetric.numInvalidSrdiMessages;
-        this.numSrdiMessagesToUnknownHandler += otherResolverMetric.numSrdiMessagesToUnknownHandler;
-
-        this.numInvalidResponses += otherResolverMetric.numInvalidResponses;
-        this.numResponsesToUnknownHandler += otherResolverMetric.numResponsesToUnknownHandler;
-
-        this.numInvalidQueries += otherResolverMetric.numInvalidQueries;
-        this.numQueriesToUnknownHandler += otherResolverMetric.numQueriesToUnknownHandler;
-
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/ResolverServiceMetric.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/ResolverServiceMetric.java
deleted file mode 100644 (file)
index f455fc8..0000000
+++ /dev/null
@@ -1,327 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.resolver.resolverMeter;
-
-
-import net.jxta.meter.*;
-
-import net.jxta.util.documentSerializable.*;
-import net.jxta.document.*;
-import net.jxta.platform.*;
-import net.jxta.id.*;
-import java.util.*;
-import net.jxta.util.*;
-import net.jxta.exception.*;
-import java.net.*;
-
-
-/**
- * The Service Monitor Metric for the standard Resolver Service
- **/
-public class ResolverServiceMetric implements ServiceMetric {
-    private ResolverMetric resolverMetric;
-    private LinkedList queryHandlerMetrics = new LinkedList();
-    private LinkedList srdiHandlerMetrics = new LinkedList();
-    private ModuleClassID moduleClassID = MonitorResources.resolverServiceMonitorClassID;
-
-    public ResolverServiceMetric() {}
-
-    public ResolverServiceMetric(ModuleClassID moduleClassID) {
-        init(moduleClassID);
-    }
-
-    public void init(ModuleClassID moduleClassID) { 
-        this.moduleClassID = moduleClassID;
-    }
-
-    public ModuleClassID getModuleClassID() {
-        return moduleClassID;
-    }
-
-    /**
-     * Get the General Resolver Metric
-     **/
-    public ResolverMetric getResolverMetric() {
-        return resolverMetric;
-    }
-       
-    void setResolverMetric(ResolverMetric resolverMetric) { 
-        this.resolverMetric = resolverMetric; 
-    }
-       
-    /**
-     * Add a Query Handler Metric
-     **/
-    public void addQueryHandlerMetric(QueryHandlerMetric queryHandlerMetric) {
-        queryHandlerMetrics.add(queryHandlerMetric);
-    }
-
-    /**
-     * Get All Query Handler Metrics as an iterator
-     **/
-    public Iterator getQueryHandlerMetrics() {
-        return queryHandlerMetrics.iterator();
-    }
-
-    /**
-     * Get Query Handler Metrics for the corresponding handler
-     * @return Handler or null if not found
-     **/
-    public QueryHandlerMetric getQueryHandlerMetric(String handlerName) {
-        for (Iterator i = queryHandlerMetrics.iterator(); i.hasNext();) {
-            QueryHandlerMetric queryHandlerMetric = (QueryHandlerMetric) i.next();
-
-            if (handlerName.equals(queryHandlerMetric.getHandlerName())) {
-                return queryHandlerMetric;
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * Add a Srdi Handler Metric
-     **/
-    public void addSrdiHandlerMetric(SrdiHandlerMetric srdiHandlerMetric) {
-        srdiHandlerMetrics.add(srdiHandlerMetric);
-    }
-
-    /**
-     * Get All Srdi Handler Metrics as an iterator
-     **/
-    public Iterator getSrdiHandlerMetrics() {
-        return srdiHandlerMetrics.iterator();
-    }
-
-    /**
-     * Get Srdi Handler Metrics for the corresponding handler
-     * @return Handler or null if not found
-     **/
-    public SrdiHandlerMetric getSrdiHandlerMetric(String handlerName) {
-        for (Iterator i = srdiHandlerMetrics.iterator(); i.hasNext();) {
-            SrdiHandlerMetric srdiHandlerMetric = (SrdiHandlerMetric) i.next();
-
-            if (handlerName.equals(srdiHandlerMetric.getHandlerName())) {
-                return srdiHandlerMetric;
-            }
-        }
-
-        return null;
-    }
-
-    public void serializeTo(Element element) throws DocumentSerializationException {
-
-        for (Iterator i = queryHandlerMetrics.iterator(); i.hasNext();) {
-            QueryHandlerMetric queryHandlerMetric = (QueryHandlerMetric) i.next();
-
-            DocumentSerializableUtilities.addDocumentSerializable(element, "queryHandlerMetric", queryHandlerMetric);          
-        }
-
-        for (Iterator i = srdiHandlerMetrics.iterator(); i.hasNext();) {
-            SrdiHandlerMetric srdiHandlerMetric = (SrdiHandlerMetric) i.next();
-
-            DocumentSerializableUtilities.addDocumentSerializable(element, "srdiHandlerMetric", srdiHandlerMetric);            
-        }
-
-        if (resolverMetric != null) {
-            DocumentSerializableUtilities.addDocumentSerializable(element, "resolverMetric", resolverMetric);
-        }      
-
-        if (moduleClassID != null) {
-            DocumentSerializableUtilities.addString(element, "moduleClassID", moduleClassID.toString());               
-        }
-    }
-
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element childElement = (TextElement) e.nextElement();
-            String tagName = (String) childElement.getKey();
-                       
-            if (tagName.equals("queryHandlerMetric")) {
-                QueryHandlerMetric queryHandlerMetric = (QueryHandlerMetric) DocumentSerializableUtilities.getDocumentSerializable(
-                        childElement, QueryHandlerMetric.class);
-
-                queryHandlerMetrics.add(queryHandlerMetric);
-            }
-
-            if (tagName.equals("srdiHandlerMetric")) {
-                SrdiHandlerMetric srdiHandlerMetric = (SrdiHandlerMetric) DocumentSerializableUtilities.getDocumentSerializable(
-                        childElement, SrdiHandlerMetric.class);
-
-                srdiHandlerMetrics.add(srdiHandlerMetric);
-            }
-
-            if (tagName.equals("resolverMetric")) {
-                resolverMetric = (ResolverMetric) DocumentSerializableUtilities.getDocumentSerializable(childElement
-                        ,
-                        ResolverMetric.class);
-            }
-            if (tagName.equals("moduleClassID")) {
-                try {
-                    moduleClassID = (ModuleClassID) IDFactory.fromURI(
-                            new URI(DocumentSerializableUtilities.getString(childElement)));
-                } catch (URISyntaxException jex) {
-                    throw new DocumentSerializationException("Can't read moduleClassID", jex);
-                }
-            }
-        }
-    }
-
-    public void mergeMetrics(ServiceMetric otherOne) {
-        mergeMetrics(otherOne, true, true, true);
-    }
-
-    /**
-     * Make a deep copy of this metric only including the portions designated in the Filter
-     * The resulting metric is Safe to modify without danger to the underlying Monitor Metrics
-     * @param resolverServiceMonitorFilter Filter designates constituant parts to be included
-     * @return a copy of this metric with references to the designated parts
-     **/
-    public ResolverServiceMetric deepCopy(ResolverServiceMonitorFilter resolverServiceMonitorFilter) {
-        ResolverServiceMetric serviceMetric = new ResolverServiceMetric();
-
-        serviceMetric.moduleClassID = moduleClassID;
-
-        serviceMetric.mergeMetrics(this, true, resolverServiceMonitorFilter.isIncludeQueryHandlerMetrics()
-                ,
-                resolverServiceMonitorFilter.isIncludeSrdiHandlerMetrics());
-        return serviceMetric;  
-    } 
-       
-    public void mergeMetrics(ServiceMetric otherOne, boolean includeResolverMetric, boolean includeQueryHandlerMetrics, boolean includeSrdiHandlerMetrics) {
-        ResolverServiceMetric otherResolverServiceMetric = (ResolverServiceMetric) otherOne;
-
-        if (includeResolverMetric) {
-            ResolverMetric otherResolverMetric = otherResolverServiceMetric.getResolverMetric();
-
-            if ((resolverMetric == null) && (otherResolverMetric != null)) {
-                resolverMetric = new ResolverMetric(otherResolverMetric);
-            }
-
-            if (otherResolverMetric != null) { 
-                resolverMetric.mergeMetrics(otherResolverMetric);
-            }
-        }
-
-        if (includeQueryHandlerMetrics) {
-            for (Iterator i = otherResolverServiceMetric.getQueryHandlerMetrics(); i.hasNext();) {
-                QueryHandlerMetric otherQueryHandlerMetric = (QueryHandlerMetric) i.next();
-                QueryHandlerMetric queryHandlerMetric = getQueryHandlerMetric(otherQueryHandlerMetric.getHandlerName());
-                               
-                if (queryHandlerMetric == null) {
-                    queryHandlerMetric = new QueryHandlerMetric(otherQueryHandlerMetric);
-                    addQueryHandlerMetric(queryHandlerMetric);
-                }
-                                
-                queryHandlerMetric.mergeMetrics(otherQueryHandlerMetric);                      
-            }
-        }
-
-        if (includeSrdiHandlerMetrics) {
-            for (Iterator i = otherResolverServiceMetric.getSrdiHandlerMetrics(); i.hasNext();) {
-                SrdiHandlerMetric otherSrdiHandlerMetric = (SrdiHandlerMetric) i.next();
-                SrdiHandlerMetric srdiHandlerMetric = getSrdiHandlerMetric(otherSrdiHandlerMetric.getHandlerName());
-                                       
-                if (srdiHandlerMetric == null) {
-                    srdiHandlerMetric = new SrdiHandlerMetric(otherSrdiHandlerMetric);
-                    addSrdiHandlerMetric(srdiHandlerMetric);
-                }
-                                
-                srdiHandlerMetric.mergeMetrics(otherSrdiHandlerMetric);                        
-            }
-        }
-    }
-
-    /**
-     * Make a shallow copy of this metric only including the portions designated in the Filter
-     * <P> Note: since this is a shallow copy it is dangerous to modify the submetrics
-     * @param resolverServiceMonitorFilter Filter designates constituant parts to be included
-     * @return a copy of this metric with references to the designated parts
-     **/
-    public ResolverServiceMetric shallowCopy(ResolverServiceMonitorFilter resolverServiceMonitorFilter) {
-        ResolverServiceMetric resolverServiceMetric = new ResolverServiceMetric(moduleClassID);
-
-        resolverServiceMetric.resolverMetric = resolverMetric;
-               
-        if (resolverServiceMonitorFilter.isIncludeQueryHandlerMetrics()) {
-            for (Iterator i = getQueryHandlerMetrics(); i.hasNext();) {
-                QueryHandlerMetric queryHandlerMetric = (QueryHandlerMetric) i.next();
-
-                resolverServiceMetric.addQueryHandlerMetric(queryHandlerMetric);
-            }
-        }
-
-        if (resolverServiceMonitorFilter.isIncludeSrdiHandlerMetrics()) {
-            for (Iterator i = getSrdiHandlerMetrics(); i.hasNext();) {
-                SrdiHandlerMetric srdiHandlerMetric = (SrdiHandlerMetric) i.next();
-
-                resolverServiceMetric.addSrdiHandlerMetric(srdiHandlerMetric);
-            }
-        }
-
-        return resolverServiceMetric;  
-    }  
-
-    public void diffMetrics(ServiceMetric otherOne) {
-        throw new RuntimeException("Not Supported");
-    }
-
-    @Override
-    public Object clone() throws CloneNotSupportedException {
-        return super.clone();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/ResolverServiceMonitor.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/ResolverServiceMonitor.java
deleted file mode 100644 (file)
index 19530b3..0000000
+++ /dev/null
@@ -1,249 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.resolver.resolverMeter;
-
-
-import net.jxta.meter.*;
-import net.jxta.impl.meter.*;
-import java.util.*;
-
-
-/**
- * The Service Monitor Metric for the standard Resolver Service
- **/
-public class ResolverServiceMonitor extends GenericServiceMonitor {
-    public static final String UNKNOWN_HANDLER = "--UNKNOWN-HANDLER--";
-       
-    private Hashtable queryHandlerMeters = new Hashtable();
-    private Hashtable srdiHandlerMeters = new Hashtable();
-    private Hashtable destinationMeters = new Hashtable();
-    private Hashtable sourceMeters = new Hashtable();
-       
-    private ResolverMeter resolverMeter = new ResolverMeter(this);
-       
-    private ResolverServiceMetric cumulativeResolverServiceMetric;
-
-    @Override
-    protected void init() {
-        cumulativeResolverServiceMetric = (ResolverServiceMetric) getCumulativeServiceMetric();
-        cumulativeResolverServiceMetric.setResolverMetric(resolverMeter.getCumulativeMetrics());
-    }
-
-    public ResolverMeter getResolverMeter() {
-        return resolverMeter;
-    }
-       
-    public synchronized QueryHandlerMeter registerQueryHandlerMeter(String handlerName) {
-        QueryHandlerMeter queryHandlerMeter = (QueryHandlerMeter) queryHandlerMeters.get(handlerName);
-        
-        if (queryHandlerMeter == null) { 
-            queryHandlerMeter = addQueryHandlerMeter(handlerName, true);
-        }
-
-        queryHandlerMeter.setRegistered(true);
-
-        return queryHandlerMeter;
-    }
-
-    public synchronized QueryHandlerMeter addQueryHandlerMeter(String handlerName, boolean registered) {
-        QueryHandlerMeter queryHandlerMeter = new QueryHandlerMeter(handlerName, this);
-
-        queryHandlerMeters.put(handlerName, queryHandlerMeter);
-        cumulativeResolverServiceMetric.addQueryHandlerMetric(queryHandlerMeter.getCumulativeMetrics());
-        queryHandlerMeter.setRegistered(registered);
-               
-        return queryHandlerMeter;
-    }
-
-    public synchronized QueryHandlerMeter unregisterQueryHandlerMeter(String handlerName) {
-        QueryHandlerMeter queryHandlerMeter = getQueryHandlerMeter(handlerName);
-
-        queryHandlerMeter.setRegistered(false);
-
-        return queryHandlerMeter;
-    }
-
-    public QueryHandlerMeter getQueryHandlerMeter(String handlerName) {
-        QueryHandlerMeter queryHandlerMeter = (QueryHandlerMeter) queryHandlerMeters.get(handlerName);
-               
-        if (queryHandlerMeter == null) {
-            queryHandlerMeter = addQueryHandlerMeter(handlerName, false);
-        }
-
-        return queryHandlerMeter;
-    }
-
-    public synchronized SrdiHandlerMeter registerSrdiHandlerMeter(String handlerName) {
-        SrdiHandlerMeter srdiHandlerMeter = (SrdiHandlerMeter) srdiHandlerMeters.get(handlerName);
-        
-        if (srdiHandlerMeter == null) { 
-            srdiHandlerMeter = addSrdiHandlerMeter(handlerName, true);
-        }
-
-        srdiHandlerMeter.setRegistered(true);
-
-        return srdiHandlerMeter;
-    }
-
-    public synchronized SrdiHandlerMeter addSrdiHandlerMeter(String handlerName, boolean registered) {
-        SrdiHandlerMeter srdiHandlerMeter = new SrdiHandlerMeter(handlerName);
-
-        srdiHandlerMeters.put(handlerName, srdiHandlerMeter);
-        cumulativeResolverServiceMetric.addSrdiHandlerMetric(srdiHandlerMeter.getCumulativeMetrics());
-        srdiHandlerMeter.setRegistered(registered);
-               
-        return srdiHandlerMeter;
-    }
-
-    public synchronized SrdiHandlerMeter unregisterSrdiHandlerMeter(String handlerName) {
-        SrdiHandlerMeter srdiHandlerMeter = getSrdiHandlerMeter(handlerName);
-
-        srdiHandlerMeter.setRegistered(false);
-
-        return srdiHandlerMeter;
-    }
-
-    public SrdiHandlerMeter getSrdiHandlerMeter(String handlerName) {
-        SrdiHandlerMeter srdiHandlerMeter = (SrdiHandlerMeter) srdiHandlerMeters.get(handlerName);
-               
-        if (srdiHandlerMeter == null) {
-            srdiHandlerMeter = addSrdiHandlerMeter(handlerName, false);
-        }
-
-        return srdiHandlerMeter;
-    }
-
-    @Override
-    protected ServiceMetric collectServiceMetrics() {
-        ResolverServiceMetric resolverServiceMetric = (ResolverServiceMetric) createServiceMetric();
-
-        boolean anyData = false;
-               
-        for (Enumeration e = queryHandlerMeters.elements(); e.hasMoreElements();) {
-            QueryHandlerMeter queryHandlerMeter = (QueryHandlerMeter) e.nextElement();
-            QueryHandlerMetric queryHandlerMetric = queryHandlerMeter.collectMetrics(); // clears delta from meter
-
-            if (queryHandlerMetric != null) {
-                resolverServiceMetric.addQueryHandlerMetric(queryHandlerMetric);
-                anyData = true;
-            }
-        }
-
-        for (Enumeration e = srdiHandlerMeters.elements(); e.hasMoreElements();) {
-            SrdiHandlerMeter srdiHandlerMeter = (SrdiHandlerMeter) e.nextElement();
-            SrdiHandlerMetric srdiHandlerMetric = srdiHandlerMeter.collectMetrics(); // clears delta from meter
-
-            if (srdiHandlerMetric != null) {
-                resolverServiceMetric.addSrdiHandlerMetric(srdiHandlerMetric);
-                anyData = true;
-            }
-        }
-
-        ResolverMetric resolverMetric = resolverMeter.collectMetrics();
-
-        if (resolverMetric != null) {
-            resolverServiceMetric.setResolverMetric(resolverMetric);
-            anyData = true;
-        }
-
-        if (anyData) {
-            return resolverServiceMetric;
-        } else {
-            return null;
-        }
-    }
-
-    @Override
-    public ServiceMetric getServiceMetric(ServiceMonitorFilter serviceMonitorFilter, long fromTime, long toTime, int pulseIndex, long reportRate) {
-        int deltaReportRateIndex = monitorManager.getReportRateIndex(reportRate);
-        ResolverServiceMetric origMetric = (ResolverServiceMetric) deltaServiceMetrics[deltaReportRateIndex];
-
-        if (origMetric == null) {
-            return null;
-        } 
-
-        ResolverServiceMonitorFilter resolverServiceMonitorFilter = (ResolverServiceMonitorFilter) serviceMonitorFilter;
-
-        return origMetric.shallowCopy(resolverServiceMonitorFilter);
-    }
-
-    @Override
-    public ServiceMetric getCumulativeServiceMetric(ServiceMonitorFilter serviceMonitorFilter, long fromTime, long toTime) {
-        ResolverServiceMonitorFilter resolverServiceMonitorFilter = (ResolverServiceMonitorFilter) serviceMonitorFilter;
-        ResolverServiceMetric origMetric = (ResolverServiceMetric) cumulativeServiceMetric;
-
-        return origMetric.deepCopy(resolverServiceMonitorFilter);
-    }
-
-    /*
-     private ResolverServiceMetric copy(ResolverServiceMetric origMetric) {
-     ResolverServiceMetric resolverServiceMetric = new ResolverServiceMetric();
-     
-     for (Iterator i = origMetric.getQueryHandlerMetrics(); i.hasNext(); ) {
-     QueryHandlerMetric queryHandlerMetric = (QueryHandlerMetric)i.next();
-     resolverServiceMetric.addQueryHandlerMetric(queryHandlerMetric);
-     }
-
-     for (Iterator i = origMetric.getSrdiHandlerMetrics(); i.hasNext(); ) {
-     SrdiHandlerMetric srdiHandlerMetric = (SrdiHandlerMetric)i.next();
-     resolverServiceMetric.addSrdiHandlerMetric(srdiHandlerMetric);
-     }
-
-     return resolverServiceMetric;     
-     }
-     */                        
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/ResolverServiceMonitorFilter.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/ResolverServiceMonitorFilter.java
deleted file mode 100644 (file)
index de4b98a..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.resolver.resolverMeter;
-
-
-import net.jxta.meter.*;
-import net.jxta.platform.*;
-import net.jxta.document.*;
-import net.jxta.util.documentSerializable.*;
-import java.util.*;
-import net.jxta.util.*;
-import net.jxta.exception.*;
-import java.net.*;
-import net.jxta.id.*;
-
-
-public class ResolverServiceMonitorFilter implements ServiceMonitorFilter {
-    private boolean includeQueryHandlerMetrics = true;
-    private boolean includeSrdiHandlerMetrics = true;
-    private ModuleClassID moduleClassID = MonitorResources.resolverServiceMonitorClassID;
-
-    public ModuleClassID getModuleClassID() {
-        return moduleClassID; 
-    }
-
-    public ResolverServiceMonitorFilter() {}
-
-    public void init(ModuleClassID moduleClassID) {
-        this.moduleClassID = moduleClassID;
-    }
-
-    public boolean isIncludeQueryHandlerMetrics() {
-        return includeQueryHandlerMetrics;
-    }
-
-    public boolean isIncludeSrdiHandlerMetrics() {
-        return includeSrdiHandlerMetrics;
-    }
-
-    public void setIncludeQueryHandlerMetrics(boolean includeQueryHandlerMetrics) {
-        this.includeQueryHandlerMetrics = includeQueryHandlerMetrics;
-    }
-
-    public void setIncludeSrdiHandlerMetrics(boolean includeSrdiHandlerMetrics) {
-        this.includeSrdiHandlerMetrics = includeSrdiHandlerMetrics;
-    }
-       
-    public void serializeTo(Element element) throws DocumentSerializationException {
-        DocumentSerializableUtilities.addBoolean(element, "includeQueryHandlerMetrics", includeQueryHandlerMetrics);
-        DocumentSerializableUtilities.addBoolean(element, "includeSrdiHandlerMetrics", includeSrdiHandlerMetrics);
-        if (moduleClassID != null) {
-            DocumentSerializableUtilities.addString(element, "moduleClassID", moduleClassID.toString());               
-        }
-    }
-
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element childElement = (TextElement) e.nextElement();
-            String tagName = (String) childElement.getKey();
-                       
-            if (tagName.equals("includeQueryHandlerMetrics")) { 
-                includeQueryHandlerMetrics = DocumentSerializableUtilities.getBoolean(childElement);
-            }
-            if (tagName.equals("includeSrdiHandlerMetrics")) { 
-                includeSrdiHandlerMetrics = DocumentSerializableUtilities.getBoolean(childElement);
-            }
-            if (tagName.equals("moduleClassID")) {
-                try {
-                    moduleClassID = (ModuleClassID) IDFactory.fromURI(
-                            new URI(DocumentSerializableUtilities.getString(childElement)));
-                } catch (URISyntaxException jex) {
-                    throw new DocumentSerializationException("Can't read moduleClassID", jex);
-                }
-            }
-        }
-    }
-       
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/SrdiDestinationMeter.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/SrdiDestinationMeter.java
deleted file mode 100644 (file)
index fb705e5..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Micro//Systems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.resolver.resolverMeter;
-
-
-import net.jxta.peer.*;
-import net.jxta.endpoint.*;
-import net.jxta.util.documentSerializable.*;
-import net.jxta.document.*;
-import net.jxta.util.*;
-import java.util.*;
-
-
-public class SrdiDestinationMeter {
-    private PeerID peerID;
-       
-    private SrdiDestinationMetric cumulativeMetrics;
-    private SrdiDestinationMetric deltaMetrics;
-
-    public SrdiDestinationMeter(PeerID peerID) {
-        this.peerID = peerID;
-        cumulativeMetrics = new SrdiDestinationMetric(peerID);
-    }
-
-    /*
-     public SrdiDestinationMeter(EndpointAddress addr) {
-     super(addr);
-     cumulativeMetrics = new SrdiDestinationMetric(addr);
-     }
-     */        
-    public synchronized SrdiDestinationMetric collectMetrics() {
-        SrdiDestinationMetric prevDelta = deltaMetrics;
-
-        deltaMetrics = null;
-        return prevDelta;
-    }
-               
-    public SrdiDestinationMetric getCumulativeMetrics() {
-        return cumulativeMetrics;
-    }
-
-    private void createDeltaMetric() {
-        deltaMetrics = new SrdiDestinationMetric(peerID);
-    }
-
-    public PeerID getPeerID() {
-        return peerID;
-    }
-
-    protected void messageProcessed() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        deltaMetrics.messageProcessed();
-        cumulativeMetrics.messageProcessed();
-    }
-       
-    protected void srdiToUnregisteredHandler() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        deltaMetrics.srdiToUnregisteredHandler();
-        cumulativeMetrics.srdiToUnregisteredHandler();
-    }  
-       
-    protected void errorWhileProcessing() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        deltaMetrics.errorWhileProcessing();
-        cumulativeMetrics.errorWhileProcessing();
-    }
-       
-    protected void messageSentViaUnicast() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        deltaMetrics.messageSentViaUnicast();
-        cumulativeMetrics.messageSentViaUnicast();
-    }
-
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/SrdiDestinationMetric.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/SrdiDestinationMetric.java
deleted file mode 100644 (file)
index 0bb9a5d..0000000
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.resolver.resolverMeter;
-
-
-import net.jxta.peer.*;
-import net.jxta.endpoint.*;
-import net.jxta.util.documentSerializable.*;
-import net.jxta.document.*;
-import java.util.*;
-import net.jxta.impl.meter.*;
-
-import net.jxta.util.*;
-
-
-/**
- * Metrics for a specific Srdi Destination for a specific handler 
- **/
-public class SrdiDestinationMetric implements DocumentSerializable {
-    private PeerID peerID;
-    private int messageProcessed;
-    private int errorWhileProcessing;
-    private int srdiToUnregisteredHandler = 0;
-
-    private int messageSentViaUnicast;
-
-    public SrdiDestinationMetric(PeerID peerID) {
-        this.peerID = peerID;
-    }
-       
-    public SrdiDestinationMetric(SrdiDestinationMetric prototype) {
-        this.peerID = prototype.peerID;                
-    }
-
-    public SrdiDestinationMetric() {}
-
-    public PeerID getPeerID() {
-        return peerID;
-    }
-
-    void messageProcessed() {
-        messageProcessed++;
-    }
-
-    /** Messages Received and Processed from this destinations **/
-    public int getMessagesProcessed() {
-        return messageProcessed;
-    }
-       
-    void errorWhileProcessing() {
-        errorWhileProcessing++;
-    }
-
-    /** Messages Received, but generating errors when processing **/
-    public int getErrorsWhileProcessing() {
-        return errorWhileProcessing;
-    }
-       
-    void messageSentViaUnicast() {
-        messageSentViaUnicast++;
-    }
-
-    /** Get Messages Sent via Unicast to this destinations **/
-    public int getMessagesSentViaUnicast() {
-        return messageSentViaUnicast;
-    }
-       
-    public void srdiToUnregisteredHandler() {
-        srdiToUnregisteredHandler++;
-    }  
-
-    /** Messages Received, to this when it was not registered **/
-    public int getSrdiToUnregisteredHandler() {
-        return srdiToUnregisteredHandler;
-    }
-
-    public void serializeTo(Element element) throws DocumentSerializationException {
-        if (peerID != null) {
-            DocumentSerializableUtilities.addString(element, "peerID", peerID.toString());
-        }
-        if (messageProcessed != 0) {
-            DocumentSerializableUtilities.addInt(element, "messageProcessed", messageProcessed);
-        }
-        if (errorWhileProcessing != 0) {
-            DocumentSerializableUtilities.addInt(element, "errorWhileProcessing", errorWhileProcessing);
-        }
-        if (srdiToUnregisteredHandler != 0) {
-            DocumentSerializableUtilities.addInt(element, "srdiToUnregisteredHandler", srdiToUnregisteredHandler);
-        }
-        if (messageSentViaUnicast != 0) {
-            DocumentSerializableUtilities.addInt(element, "messageSentViaUnicast", messageSentViaUnicast);
-        }
-    }
-
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element childElement = (TextElement) e.nextElement();
-            String tagName = (String) childElement.getKey();
-
-            if (tagName.equals("peerID")) {
-                String peerIDText = DocumentSerializableUtilities.getString(childElement);
-
-                peerID = MetricUtilities.getPeerIdFromString(peerIDText);
-            } else if (tagName.equals("messageProcessed")) { 
-                messageProcessed = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("errorWhileProcessing")) { 
-                errorWhileProcessing = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("srdiToUnregisteredHandler")) { 
-                srdiToUnregisteredHandler = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("messageSentViaUnicast")) { 
-                messageSentViaUnicast = DocumentSerializableUtilities.getInt(childElement);
-            }
-        }
-    }
-
-    public void mergeMetrics(SrdiDestinationMetric otherSrdiDestinationMetric) {
-        this.errorWhileProcessing += otherSrdiDestinationMetric.errorWhileProcessing;
-        this.messageProcessed += otherSrdiDestinationMetric.messageProcessed;
-        this.messageSentViaUnicast += otherSrdiDestinationMetric.messageSentViaUnicast;
-    }
-
-    @Override
-    public int hashCode() {
-        return peerID.hashCode();
-    }
-
-    @Override
-    public boolean equals(Object other) {
-        if (other instanceof SrdiDestinationMetric) {
-            SrdiDestinationMetric otherSrdiDestinationMetric = (SrdiDestinationMetric) other;
-
-            return peerID.equals(otherSrdiDestinationMetric.peerID);
-        } else {
-            return false;
-        }
-    }          
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/SrdiHandlerMeter.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/SrdiHandlerMeter.java
deleted file mode 100644 (file)
index bdc6a90..0000000
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Micro//Systems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.resolver.resolverMeter;
-
-
-import net.jxta.protocol.ResolverSrdiMsg;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.peer.*;
-import net.jxta.util.*;
-import net.jxta.impl.meter.*;
-import net.jxta.exception.*;
-import java.util.*;
-
-
-public class SrdiHandlerMeter {
-    private String handlerName;
-
-    private SrdiHandlerMetric cumulativeMetrics;
-    private SrdiHandlerMetric deltaMetrics;
-    private Hashtable srdiDestinationMeters = new Hashtable();
-
-    public SrdiHandlerMeter(String handlerName) {
-        this.handlerName = handlerName;
-        cumulativeMetrics = new SrdiHandlerMetric(handlerName);
-    }
-
-    public SrdiHandlerMetric getCumulativeMetrics() {
-        return cumulativeMetrics;
-    }
-
-    public String getHandlerName() {
-        return handlerName;
-    }
-       
-    public synchronized SrdiHandlerMetric collectMetrics() {
-        SrdiHandlerMetric prevDelta = deltaMetrics;
-
-        for (Enumeration e = srdiDestinationMeters.elements(); e.hasMoreElements();) {
-            SrdiDestinationMeter srdiDestinationMeter = (SrdiDestinationMeter) e.nextElement();
-
-            SrdiDestinationMetric srdiDestinationMetric = srdiDestinationMeter.collectMetrics();
-
-            if (srdiDestinationMetric != null) {
-
-                /* Fix-me: Apparantly, we can have a case where NO Srdi mteric is tickled, but a 
-                 destination metric is available.  This may be a bug.  For now, we'll create the
-                 delta in that case.
-                 */
-                if (prevDelta == null) {
-                    createDeltaMetric();
-                    prevDelta = deltaMetrics;
-                }
-                prevDelta.addSrdiDestinationMetric(srdiDestinationMetric);
-            }
-        }
-        deltaMetrics = null;
-        return prevDelta;
-    }
-
-    public synchronized SrdiDestinationMeter getSrdiDestinationMeter(EndpointAddress endpointAddress) {
-        PeerID peerID = MetricUtilities.getPeerIdFromEndpointAddress(endpointAddress);
-
-        return getSrdiDestinationMeter(peerID);
-    }
-       
-    public synchronized SrdiDestinationMeter getSrdiDestinationMeter(String peer) {
-        PeerID peerID = MetricUtilities.getPeerIdFromString(peer);
-
-        return getSrdiDestinationMeter(peerID);
-    }
-       
-    public synchronized SrdiDestinationMeter getSrdiDestinationMeter(PeerID peerID) {
-               
-        SrdiDestinationMeter srdiDestinationMeter = (SrdiDestinationMeter) srdiDestinationMeters.get(peerID);
-
-        if (srdiDestinationMeter == null) {
-            srdiDestinationMeter = new SrdiDestinationMeter(peerID);
-            srdiDestinationMeters.put(peerID, srdiDestinationMeter);
-            cumulativeMetrics.addSrdiDestinationMetric(srdiDestinationMeter.getCumulativeMetrics());
-        }
-
-        return srdiDestinationMeter;
-    }
-       
-    private void createDeltaMetric() {
-        deltaMetrics = new SrdiHandlerMetric(handlerName);
-    }
-
-    @Override
-    public String toString() {
-        return "SrdiHandlerMeter(" + handlerName + ")";
-    }
-
-    public void setRegistered(boolean registered) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.setRegistered(registered);
-        cumulativeMetrics.setRegistered(registered);
-    }
-
-    // received
-
-    public void messageProcessed(ResolverSrdiMsg srdi, long processTime, EndpointAddress srcAddr) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.messageProcessed(processTime);
-        cumulativeMetrics.messageProcessed(processTime);
-
-        SrdiDestinationMeter destinationMeter = getSrdiDestinationMeter(srcAddr);
-
-        destinationMeter.messageProcessed();
-    }
-
-    public void errorWhileProcessing(EndpointAddress srcAddr) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-        deltaMetrics.errorWhileProcessing();
-        cumulativeMetrics.errorWhileProcessing();
-
-        SrdiDestinationMeter destinationMeter = getSrdiDestinationMeter(srcAddr);
-
-        destinationMeter.errorWhileProcessing();
-    }
-
-    public void srdiToUnregisteredHandler(EndpointAddress srcAddr) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-                       
-        deltaMetrics.srdiToUnregisteredHandler();
-        cumulativeMetrics.srdiToUnregisteredHandler();
-
-        SrdiDestinationMeter destinationMeter = getSrdiDestinationMeter(srcAddr);
-
-        destinationMeter.srdiToUnregisteredHandler();
-    }
-
-    // send
-
-
-    public void messageSentViaUnicast(String peer, ResolverSrdiMsg srdi) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.messageSentViaUnicast();
-        cumulativeMetrics.messageSentViaUnicast();     
-                       
-        SrdiDestinationMeter destinationMeter = getSrdiDestinationMeter(peer);
-
-        destinationMeter.messageSentViaUnicast();
-    }
-
-    public void messageSentViaWalker(ResolverSrdiMsg srdi) {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.messageSentViaWalker();
-        cumulativeMetrics.messageSentViaWalker();              
-    }
-
-    public void errorSendingMessage() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.errorSendingMessage();
-        cumulativeMetrics.errorSendingMessage();               
-    }
-
-    public void errorPropagatingMessage() {
-        if (deltaMetrics == null) {    
-            createDeltaMetric();
-        }
-
-        deltaMetrics.errorPropagatingMessage();
-        cumulativeMetrics.errorPropagatingMessage();           
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/SrdiHandlerMetric.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/resolver/resolverMeter/SrdiHandlerMetric.java
deleted file mode 100644 (file)
index 45815f4..0000000
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Micro//Systems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.resolver.resolverMeter;
-
-
-import net.jxta.resolver.*;
-import net.jxta.util.documentSerializable.*;
-import net.jxta.document.*;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.peer.*;
-import net.jxta.impl.meter.*;
-
-import java.util.*;
-
-
-public class SrdiHandlerMetric implements DocumentSerializable {
-    private String handlerName;
-    private boolean registered = true;
-    private int numProcessed = 0;
-    private int numErrorsWhileProcessing = 0;
-    private int numToUnregisteredHandler = 0;
-       
-    private long totalProcessTime = 0;
-       
-    private int numMessagesSentViaWalker = 0;
-    private int numMessagesSentViaUnicast = 0;
-    private int numErrorsSendingMessages = 0;
-    private int numErrorsPropagatingMessages = 0;
-       
-    private HashMap destinationMetrics = new HashMap();
-               
-    public SrdiHandlerMetric(String handlerName) {
-        this.handlerName = handlerName;
-    }
-
-    public SrdiHandlerMetric() {}
-
-    public SrdiHandlerMetric(SrdiHandlerMetric prototype) {
-        this.handlerName = prototype.handlerName;
-    }
-       
-    public void setRegistered(boolean registered) {
-        this.registered = registered;
-    }
-
-    public String getHandlerName() {
-        return handlerName;
-    }
-
-    public boolean getRegistered() {
-        return registered;
-    }
-
-    public int getNumProcessed() {
-        return numProcessed;
-    }
-
-    public int getNumErrorsWhileProcessing() {
-        return numErrorsWhileProcessing;
-    }
-
-    public long getTotalProcessTime() {
-        return totalProcessTime;
-    }
-
-    public int getNumMessagesSentViaWalker() {
-        return numMessagesSentViaWalker;
-    }
-
-    public int getNumMessagesSentViaUnicast() {
-        return numMessagesSentViaUnicast;
-    }
-
-    public int getNumErrorsSendingMessages() {
-        return numErrorsSendingMessages;
-    }
-
-    public int getNumErrorsPropagatingMessages() {
-        return numErrorsPropagatingMessages;
-    }
-       
-    @Override
-    public boolean equals(Object obj) {
-        if (obj instanceof SrdiHandlerMetric) {
-            SrdiHandlerMetric otherSrdiHandlerMetric = (SrdiHandlerMetric) obj;
-
-            return handlerName.equals((otherSrdiHandlerMetric.handlerName));
-        } else {
-            return false;
-        }
-    }
-
-    @Override
-    public int hashCode() { 
-        return handlerName.hashCode();
-    }
-
-    public void messageProcessed(long processTime) {
-        numProcessed++;
-        totalProcessTime += processTime;
-    }
-
-    public void errorWhileProcessing() {
-        numErrorsWhileProcessing++;
-    }
-
-    public void srdiToUnregisteredHandler() {
-        numToUnregisteredHandler++;
-    }  
-
-    public void messageSentViaWalker() {
-        numMessagesSentViaWalker++;
-    }
-
-    public void messageSentViaUnicast() {
-        numMessagesSentViaUnicast++;
-    }
-
-    public void errorSendingMessage() {
-        numErrorsSendingMessages++;
-    }
-
-    public void errorPropagatingMessage() {
-        numErrorsPropagatingMessages++;
-    }  
-
-    SrdiDestinationMetric getSrdiDestinationMetric(EndpointAddress endpointAddress) {
-        PeerID peerID = MetricUtilities.getPeerIdFromEndpointAddress(endpointAddress);
-
-        return getSrdiDestinationMetric(peerID);
-    }
-               
-    SrdiDestinationMetric getSrdiDestinationMetric(PeerID peerID) {
-               
-        SrdiDestinationMetric destinationMetric = (SrdiDestinationMetric) destinationMetrics.get(peerID);
-               
-        if (destinationMetric == null) {
-            destinationMetric = new SrdiDestinationMetric(peerID);
-            destinationMetrics.put(peerID, destinationMetric);
-        }
-        return destinationMetric;
-    }
-
-    public Iterator getDestinationMetrics() {
-
-        return destinationMetrics.values().iterator();
-    }
-
-    public void addSrdiDestinationMetric(SrdiDestinationMetric srdiDestinationMetric) {
-        destinationMetrics.put(srdiDestinationMetric.getPeerID(), srdiDestinationMetric);
-    }
-
-    public void serializeTo(Element element) throws DocumentSerializationException {
-        if (handlerName != null) {
-            DocumentSerializableUtilities.addString(element, "handlerName", handlerName);
-        }
-        DocumentSerializableUtilities.addBoolean(element, "registered", registered);
-        if (numProcessed != 0) {
-            DocumentSerializableUtilities.addInt(element, "numProcessed", numProcessed);
-        }
-        if (numErrorsWhileProcessing != 0) {
-            DocumentSerializableUtilities.addInt(element, "numErrorsWhileProcessing", numErrorsWhileProcessing);
-        }
-        if (numToUnregisteredHandler != 0) {
-            DocumentSerializableUtilities.addInt(element, "numToUnregisteredHandler", numToUnregisteredHandler);
-        }
-        if (totalProcessTime != 0) {
-            DocumentSerializableUtilities.addLong(element, "totalProcessTime", totalProcessTime);
-        }
-        if (numMessagesSentViaWalker != 0) {
-            DocumentSerializableUtilities.addInt(element, "numMessagesSentViaWalker", numMessagesSentViaWalker);
-        }
-        if (numMessagesSentViaUnicast != 0) {
-            DocumentSerializableUtilities.addInt(element, "numMessagesSentViaUnicast", numMessagesSentViaUnicast);
-        }
-        if (numErrorsSendingMessages != 0) {
-            DocumentSerializableUtilities.addInt(element, "numErrorsSendingMessages", numErrorsSendingMessages);
-        }
-        if (numErrorsPropagatingMessages != 0) {
-            DocumentSerializableUtilities.addInt(element, "numErrorsPropagatingMessages", numErrorsPropagatingMessages);
-        }
-
-        for (Iterator i = destinationMetrics.values().iterator(); i.hasNext();) {
-            Element srdiDestinationElement = DocumentSerializableUtilities.createChildElement(element, "destination");
-            SrdiDestinationMetric srdiDestinationMetric = (SrdiDestinationMetric) i.next();
-
-            srdiDestinationMetric.serializeTo(srdiDestinationElement);
-        }
-    }
-
-    public void initializeFrom(Element element) throws DocumentSerializationException {
-        for (Enumeration e = element.getChildren(); e.hasMoreElements();) {
-            Element childElement = (TextElement) e.nextElement();
-            String tagName = (String) childElement.getKey();
-
-            if (tagName.equals("handlerName")) { 
-                handlerName = DocumentSerializableUtilities.getString(childElement);
-            } else if (tagName.equals("registered")) { 
-                registered = DocumentSerializableUtilities.getBoolean(childElement);
-            } else if (tagName.equals("numProcessed")) { 
-                numProcessed = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numErrorsWhileProcessing")) { 
-                numErrorsWhileProcessing = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numToUnregisteredHandler")) { 
-                numToUnregisteredHandler = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("totalProcessTime")) { 
-                totalProcessTime = DocumentSerializableUtilities.getLong(childElement);
-            } else if (tagName.equals("numMessagesSentViaWalker")) { 
-                numMessagesSentViaWalker = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numMessagesSentViaUnicast")) { 
-                numMessagesSentViaUnicast = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numErrorsSendingMessages")) { 
-                numErrorsSendingMessages = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("numErrorsPropagatingMessages")) { 
-                numErrorsPropagatingMessages = DocumentSerializableUtilities.getInt(childElement);
-            } else if (tagName.equals("destination")) {
-                SrdiDestinationMetric srdiDestinationMetric = new SrdiDestinationMetric();
-
-                srdiDestinationMetric.initializeFrom(childElement);
-                addSrdiDestinationMetric(srdiDestinationMetric);
-            }
-        }
-    }
-
-    public void mergeMetrics(SrdiHandlerMetric otherSrdiHandlerMetric) {
-        numProcessed += otherSrdiHandlerMetric.numProcessed;
-        numErrorsWhileProcessing += otherSrdiHandlerMetric.numErrorsWhileProcessing;
-        totalProcessTime += otherSrdiHandlerMetric.totalProcessTime;
-        numMessagesSentViaWalker += otherSrdiHandlerMetric.numMessagesSentViaWalker;
-        numMessagesSentViaUnicast += otherSrdiHandlerMetric.numMessagesSentViaUnicast;
-        numErrorsSendingMessages += otherSrdiHandlerMetric.numErrorsSendingMessages;
-        numErrorsPropagatingMessages += otherSrdiHandlerMetric.numErrorsPropagatingMessages;
-        for (Iterator i = otherSrdiHandlerMetric.getDestinationMetrics(); i.hasNext();) {
-            SrdiDestinationMetric otherSrdiDestinationMetric = (SrdiDestinationMetric) i.next();
-            SrdiDestinationMetric ourSrdiDestinationMetric = getSrdiDestinationMetric(otherSrdiDestinationMetric.getPeerID());
-
-            if (ourSrdiDestinationMetric == null) {
-                ourSrdiDestinationMetric = new SrdiDestinationMetric(otherSrdiDestinationMetric);
-                addSrdiDestinationMetric(ourSrdiDestinationMetric);
-            }
-                               
-            ourSrdiDestinationMetric.mergeMetrics(otherSrdiDestinationMetric);
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/ACLSeedingManager.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/ACLSeedingManager.java
deleted file mode 100644 (file)
index 97e9358..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright (c) 2002-2004 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util;
-
-
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URL;
-import java.net.URLConnection;
-
-import java.io.IOException;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.RouteAdvertisement;
-
-import net.jxta.impl.access.AccessList;
-import net.jxta.impl.endpoint.EndpointUtils;
-
-
-/**
- * Provides support for the optional access control list which determines which
- * peers may be used.
- */
-public abstract class ACLSeedingManager implements SeedingManager {
-    
-    /**
-     * Logger
-     */
-    private static final transient Logger LOG = Logger.getLogger(ACLSeedingManager.class.getName());
-    
-    /**
-     * The interval in milliseconds at which the ACL be refreshed from the
-     * source.
-     */
-    private static final long ACL_REFRESH_INTERVAL = 30 * TimeUtils.AMINUTE;
-    
-    /**
-     *  The access control list which controls which hosts are allowed.
-     */
-    private final URI aclLocation;
-    
-    /**
-     *  The last known modification time of the ACL.
-     */
-    private long aclLastModified = 0;
-    
-    /**
-     *  Manages access to the seeds.
-     */
-    protected final AccessList acl = new AccessList();
-    
-    /**
-     *  The absolute time in milliseconds after which we will attempt to refresh
-     *  the access control list from the acl URI.
-     */
-    private long nextACLrefreshTime = 0;
-    
-    /**
-     *  Constructs a new ACL seeding manager.
-     *
-     *  @param aclLocation The location of the ACL file or {@code null} if no
-     *  ACL file should be used.
-     */
-    public ACLSeedingManager(URI aclLocation) {
-        this.aclLocation = aclLocation;
-        
-        // Default to allowing all peers.
-        acl.setGrantAll(true);
-        if (null == aclLocation) {
-            // forever.
-            nextACLrefreshTime = Long.MAX_VALUE;
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * <p/>Performs it's determination based solely on the list of peers in
-     * the access list.
-     */
-    public boolean isAcceptablePeer(PeerAdvertisement peeradv) {
-        RouteAdvertisement route = EndpointUtils.extractRouteAdv(peeradv);
-        
-        if (null != route) {
-            return isAcceptablePeer(route);
-        } else {
-            // No route? It's only OK if we are approving everyone.
-            return acl.getGrantAll();
-        }        
-    }
-    
-    /**
-     * {@inheritDoc}
-     *
-     * <p/>Performs it's determination based solely on the list of peers in
-     * the access list.
-     */
-    public synchronized boolean isAcceptablePeer(RouteAdvertisement radv) {
-                
-        // Refresh the ACL?
-        
-        if (TimeUtils.timeNow() > nextACLrefreshTime) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Updating ACL");
-            }
-
-            try {
-                URL asURL = aclLocation.toURL();
-                URLConnection connection = asURL.openConnection();
-                
-                connection.setDoInput(true);
-                InputStream is = connection.getInputStream();
-                
-                long last_mod = connection.getLastModified();
-                
-                if ((last_mod == 0) || (last_mod > aclLastModified)) {
-                    acl.setGrantAll(false);
-                    acl.refresh(is);
-                }
-                
-                nextACLrefreshTime = TimeUtils.toAbsoluteTimeMillis(ACL_REFRESH_INTERVAL);
-            } catch (IOException failed) {
-                // be lenient in response to failures.
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "ACL update failed. GRANTING ALL PERMISSIONS.", failed);
-                }
-
-                acl.setGrantAll(true);
-                
-                nextACLrefreshTime = TimeUtils.toAbsoluteTimeMillis(ACL_REFRESH_INTERVAL / 2);
-            }
-        }
-        
-        return acl.isAllowed(radv.getDestPeerID());
-    }    
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/AdvCooker.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/AdvCooker.java
deleted file mode 100644 (file)
index b9bbe67..0000000
+++ /dev/null
@@ -1,513 +0,0 @@
-
-
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util;
-
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredTextDocument;
-import net.jxta.document.TextElement;
-import net.jxta.document.XMLDocument;
-import net.jxta.id.IDFactory;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.platform.ModuleClassID;
-import net.jxta.platform.ModuleSpecID;
-import net.jxta.protocol.ModuleClassAdvertisement;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.protocol.ModuleSpecAdvertisement;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.protocol.PipeAdvertisement;
-
-import net.jxta.impl.peergroup.StdPeerGroup;
-import net.jxta.impl.peergroup.StdPeerGroupParamAdv;
-
-
-/**
- * Advertisements and ID's "cooked" according to recipes lifted
- * from J-C and Frog. Static methods meant for convenience in developing
- * experimental propagation modules (pipe or rendezvous services,
- * rendezvous managers) but maybe generally useful.
- *
- * @author vasha
- */
-public class AdvCooker {
-    
-    /**
-     * Reconstructs a ModuleClassID from its String representation
-     * as printed by the foregoing recipes.
-     *
-     * @param url -- the module class id in String form, "urn:jxta:uuid-[the big hex string]"
-     * @throws URISyntaxException -- if url is messed up
-     * @return -- module class id reconstructed from String
-     */
-    private static ModuleClassID buildModuleClassID(String uri) throws URISyntaxException {
-        return (ModuleClassID) IDFactory.fromURI(new URI(uri));
-    }
-    
-    /** Reconstructs a ModuleSpecID from its String representation
-     * as printed by the foregoing recipes.
-     *
-     * @param url -- the module spec id in String form, "urn:jxta:uuid-[the big hex string]"
-     * @throws URISyntaxException -- if url is messed up
-     * @return -- module spec id reconstructed from String
-     */
-    private static ModuleSpecID buildModuleSpecID(String uri) throws URISyntaxException {
-        return (ModuleSpecID) IDFactory.fromURI(new URI(uri));
-    }
-    
-    /**
-     * The module class advertisement is to simply advertise the
-     * existence of a module.
-     *
-     * @param mcid -- the module class id
-     * @param serviceName -- something like "JXTAMOD:JXTA-WIRE-MyNewThing"
-     * @param serviceDescription -- something like "JXTA-WIRE MyNewThing Module"
-     * @return an appropriate ModuleClassAdvertisement
-     */
-    public static ModuleClassAdvertisement buildModuleClassAdvertisement(ModuleClassID mcid, String serviceName, String serviceDescription) {
-        ModuleClassAdvertisement mcadv = (ModuleClassAdvertisement)
-                AdvertisementFactory.newAdvertisement(ModuleClassAdvertisement.getAdvertisementType());
-
-        mcadv.setName(serviceName);
-        mcadv.setDescription(serviceDescription);
-        mcadv.setModuleClassID(mcid);
-        return mcadv;
-    }
-    
-    /**
-     * The ModuleSpecAdvertisement has two purposes, to publish
-     * the uri of its formal specs for developers and to publish the
-     * means of remote access to the module's services if that
-     * is appropriate. (See {@link ModuleSpecAdvertisement} )
-     * Use this form for a minimal advertisement, suitable
-     * for development.
-     *
-     * @param msid -- the module spec id, "urn:jxta:uuid-[the big hex string]"
-     * @param moduleSpecName -- something like "JXTASPEC:JXTA-WIRE-MyNewThing-SPEC"
-     * @param moduleSpecDescription -- something like "JXTA-WIRE MyNewThing Specification"
-     * @return -- a boilerplate suitable for development.
-     */
-    public static ModuleSpecAdvertisement buildModuleSpecAdvertisement(ModuleSpecID msid, String moduleSpecName, String moduleSpecDescription) {
-        return buildModuleSpecAdvertisement(msid, moduleSpecName, moduleSpecDescription, null, null, null, null, null, null, null);
-    }
-    
-    /**
-     * Use this form for production provided remote access is not required.
-     *
-     * @param msid -- the module spec id, "urn:jxta:uuid-[the big hex string]"
-     * @param moduleSpecName -- something like "JXTASPEC:JXTA-WIRE-MyNewThing-SPEC"
-     * @param moduleSpecDescription -- something like "JXTA-WIRE MyNewThing Specification"
-     * @param creator -- something like "jxta.org"
-     * @param version -- something like "Version 1.0"
-     * @param specURI -- where to locate the formal specs, e.g. "http://www.jxta.org/MyNewThing"
-     * @return -- a fully populated advert suitable if remote access is not required.
-     */
-    public static ModuleSpecAdvertisement buildModuleSpecAdvertisement(ModuleSpecID msid, String moduleSpecName, String moduleSpecDescription, String creator, String version, String specURI) {
-        return buildModuleSpecAdvertisement(msid, moduleSpecName, moduleSpecDescription, creator, version, specURI, null, null
-                ,
-                null, null);
-    }
-    
-    /**
-     * Use this form for a fully populated advert.
-     *
-     * @param msid -- the module spec id, "urn:jxta:uuid-[the big hex string]"
-     * @param moduleSpecName -- something like "JXTASPEC:JXTA-WIRE-MyNewThing-SPEC"
-     * @param moduleSpecDescription -- something like "JXTA-WIRE MyNewThing Specification"
-     * @param creator -- something like "jxta.org"
-     * @param version -- something like "Version 2.0"
-     * @param specURI -- where to locate the formal specs, e.g. "http://www.jxta.org/MyNewThing"
-     * @param pipeAdv -- to make the module useable remotely (see {@link ModuleSpecAdvertisement})
-     * @param proxySpecID -- sometimes required for remote use (see {@link ModuleSpecAdvertisement})
-     * @param authorizationSpecID -- sometimes required for remote use (see {@link ModuleSpecAdvertisement})
-     * @param param -- anything else
-     * @return -- a fully populated advert specifying remote access to module services.
-     */
-    public static ModuleSpecAdvertisement buildModuleSpecAdvertisement(ModuleSpecID msid, String moduleSpecName, String moduleSpecDescription, String creator, String version, String specURI, PipeAdvertisement pipeAdv, ModuleSpecID proxySpecID, ModuleSpecID authorizationSpecID, StructuredDocument param) {
-        ModuleSpecAdvertisement msadv = (ModuleSpecAdvertisement)
-                AdvertisementFactory.newAdvertisement(ModuleSpecAdvertisement.getAdvertisementType());
-
-        msadv.setModuleSpecID(msid);
-        msadv.setName(moduleSpecName);
-        msadv.setDescription(moduleSpecDescription);
-        msadv.setCreator(creator == null ? "jxta.org" : creator);
-        msadv.setVersion(version == null ? "Version 2.0" : version);
-        msadv.setSpecURI(specURI == null ? "http://www.jxta.org/" + moduleSpecName : specURI);
-        if (pipeAdv != null) {
-            msadv.setPipeAdvertisement(pipeAdv);
-        }
-        if (proxySpecID != null) {
-            msadv.setProxySpecID(proxySpecID);
-        }
-        if (authorizationSpecID != null) {
-            msadv.setAuthSpecID(authorizationSpecID);
-        }
-        if (param != null) {
-            msadv.setParam(param);
-        }
-        return msadv;
-    }
-    
-    /**
-     * Compat's (compatibility statements) serve to narrow the search
-     *  for a ModuleImplAdvertisement. Basically you want something
-     *  compatible with your group's implementation. Use this form for
-     *  compatibilty with the current StdPeerGroup.
-     *
-     *  @return -- boilerplate compat for StdPeerGroup
-     */
-    public static XMLDocument buildCompat() {
-        
-        try {
-            PeerGroup wpg = PeerGroup.globalRegistry.lookupInstance(PeerGroupID.worldPeerGroupID);
-        
-            ModuleImplAdvertisement implAdv = wpg.getAllPurposePeerGroupImplAdvertisement();
-            
-            wpg.unref();
-            
-            XMLDocument compat = (XMLDocument) implAdv.getCompat();
-            
-            return compat;
-        } catch (Exception e) {
-            // but if it doesn't work default to what was current on Feb 22 2006.
-            return buildCompat("JDK1.4.1", "V2.0 Ref Impl");
-        }
-    }
-    
-    /**
-     * Use this form for customized compatibility statements.
-     * Alternatively a group's compat is accessible via
-     * group.getCompat()
-     *
-     * @param efmt -- something like "JDK1.4"
-     * @param bind -- something like "V1.0 Ref Impl"
-     * @return -- custom compatibility tag
-     */
-    public static XMLDocument buildCompat(String efmt, String bind) {
-        XMLDocument doc = (XMLDocument)
-                StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "Comp");
-        
-        Element e = doc.createElement("Efmt", efmt);
-
-        doc.appendChild(e);
-        e = doc.createElement("Bind", bind);
-        doc.appendChild(e);
-        
-        return doc;
-    }
-    
-    /**
-     * A ModuleImplAdvertisement represents one of any number of
-     * published implementations of a given specification. Use this form
-     * with for a development boilerplate. Use buildCompat() for a compat
-     * boilerplate.
-     * (See {@link ModuleImplAdvertisement}.)
-     *
-     * @param msid -- the module spec id
-     * @param code -- the module's fully qualified classname, "net.jxta.impl.wire.MyNewThing"
-     * @param compat -- a compatibility statement. Use buildCompat() for a boilerplate.
-     * @return -- a development boilerplate with custom compatibility.
-     */
-    public static ModuleImplAdvertisement buildModuleImplAdvertisement(ModuleSpecID msid, String code, Element compat) {
-        ModuleImplAdvertisement miadv = (ModuleImplAdvertisement)
-                AdvertisementFactory.newAdvertisement(ModuleImplAdvertisement.getAdvertisementType());
-
-        miadv.setCompat(compat);
-        miadv.setModuleSpecID(msid);
-        miadv.setCode(code);
-        miadv.setDescription(code + " Module, J2SE Implementation");
-        miadv.setProvider("jxta.org");
-        miadv.setUri("http://download.jxta.org");
-        return miadv;
-    }
-    
-    /** Use this form to fully populate a ModuleImplAdvertisement.
-     * A ModuleImplAdvertisement has an optional field, "param" which is
-     * neglected here. If needed it should be set with advert's setParam method.
-     * (See {@link ModuleImplAdvertisement}.)
-     *
-     * @param msid -- the module spec id
-     * @param code -- the module's fully qualified classname, "net.jxta.impl.wire.MyNewThing"
-     * @param compat -- a compatibility statement
-     * @param description -- something like "MyNewThing Module, J2SE Implementation"
-     * @param provider -- something like "jxta.org"
-     * @param uri -- currently ornamental, eventually where to find binaries.
-     * @return -- a custom advert, fully populated except for "param" field.
-     */
-    public static ModuleImplAdvertisement buildModuleImplAdvertisement(ModuleSpecID msid, String code, Element compat, String description, String provider, String uri) {
-        ModuleImplAdvertisement miadv = buildModuleImplAdvertisement(msid, code, compat);
-
-        miadv.setDescription(description);
-        miadv.setProvider(provider);
-        miadv.setUri(uri);
-        return miadv;
-    }
-    
-    /**
-     * Modifies a copy of the parent's implementation
-     * advertisement to reflect the addition or replacement of
-     * services.  The newServices Hashtable must have ModuleClassID
-     * keys and ModuleImplAdvertisement values. I've deferred adding
-     * applications or protocols for the moment --vasha@jxta.org Dec 3 2001.
-     *
-     * @return -- advert for the new peergroup which the StdPeerGroup module will implement.
-     * @param parent -- a running instance of the new group's parent
-     * @param newGroupModuleSpecID -- since new or replacement services are involved
-     * @param newDescription -- the new group's reason to be
-     * @param newServices -- advert's for the new services
-     * @throws IllegalArgumentException -- for a bad key or value type
-     * @throws Exception --- if the parent can't produce a copy of its own impl advert
-     */
-    public static ModuleImplAdvertisement buildPeerGroupImplAdvertisement(StdPeerGroup parent, ModuleSpecID newGroupModuleSpecID, String newDescription, Map newServices) throws Exception {
-        Map newApps = null, newProtos = null;
-
-        // illegal types will cause an IllegalArgumentException
-        typeCheckKeys(newServices);
-        typeCheckValues(newServices);
-        // get a copy of parent's general purpose advert as a template
-        ModuleImplAdvertisement implAdv = parent.getAllPurposePeerGroupImplAdvertisement();
-
-        implAdv.setDescription(newDescription);
-        implAdv.setModuleSpecID(newGroupModuleSpecID);
-        // extract embedded ad for standard modules
-        TextElement paramElement = (TextElement) implAdv.getParam();
-        StdPeerGroupParamAdv paramAdv = new StdPeerGroupParamAdv(paramElement);
-        // alter services
-        Map services = paramAdv.getServices();
-
-        typeCheckKeys(services);
-        // mergeTables will override old services with new if base classes are the same
-        services = mergeTables(services, newServices);
-        paramAdv.setServices(services);
-        paramElement = (TextElement) paramAdv.getDocument(MimeMediaType.XMLUTF8);
-        implAdv.setParam(paramElement);
-        return implAdv;
-    }
-    
-    public static ModuleImplAdvertisement buildPeerGroupImplAdvertisement(PeerGroup parent, ModuleSpecID newGroupModuleSpecID, String newDescription, Map newServices, Map newApps) throws Exception {
-        Map newProtos = null;
-
-        // illegal types will cause an IllegalArgumentException
-        typeCheckKeys(newServices);
-        typeCheckValues(newServices);
-        typeCheckKeys(newApps);
-        typeCheckValues(newApps);
-        
-        // get a copy of parent's general purpose advert as a template
-        ModuleImplAdvertisement implAdv = parent.getAllPurposePeerGroupImplAdvertisement();
-
-        implAdv.setDescription(newDescription);
-        implAdv.setModuleSpecID(newGroupModuleSpecID);
-        // extract embedded ad for standard modules
-        TextElement paramElement = (TextElement) implAdv.getParam();
-        StdPeerGroupParamAdv paramAdv = new StdPeerGroupParamAdv(paramElement);
-        
-        // alter services
-        Map services = paramAdv.getServices();
-
-        typeCheckKeys(services);
-        // mergeTables will override old services with new if base classes are the same
-        services = mergeTables(services, newServices);
-        paramAdv.setServices(services);
-        
-        // alter apps
-        Map apps = paramAdv.getApps();
-
-        typeCheckKeys(apps);
-        apps = mergeTables(apps, newApps);
-        paramAdv.setApps(apps);
-        
-        paramElement = (TextElement) paramAdv.getDocument(MimeMediaType.XMLUTF8);
-        implAdv.setParam(paramElement);
-        
-        return implAdv;
-    }
-    
-    public static ModuleImplAdvertisement buildPeerGroupImplAdvertisement(PeerGroup parent, ModuleSpecID newGroupModuleSpecID, String newDescription, Map newServices, Map newApps, Map newProtos) throws Exception {
-        
-        // illegal types will cause an IllegalArgumentException
-        typeCheckKeys(newServices);
-        typeCheckValues(newServices);
-        typeCheckKeys(newApps);
-        typeCheckValues(newApps);
-        typeCheckKeys(newProtos);
-        typeCheckValues(newProtos);
-        
-        // get a copy of parent's general purpose advert as a template
-        ModuleImplAdvertisement implAdv = parent.getAllPurposePeerGroupImplAdvertisement();
-
-        implAdv.setDescription(newDescription);
-        implAdv.setModuleSpecID(newGroupModuleSpecID);
-        // extract embedded ad for standard modules
-        TextElement paramElement = (TextElement) implAdv.getParam();
-        StdPeerGroupParamAdv paramAdv = new StdPeerGroupParamAdv(paramElement);
-        
-        // alter services
-        Map services = paramAdv.getServices();
-
-        typeCheckKeys(services);
-        // mergeTables will override old services with new if base classes are the same
-        services = mergeTables(services, newServices);
-        paramAdv.setServices(services);
-        
-        // alter apps
-        Map apps = paramAdv.getApps();
-
-        typeCheckKeys(apps);
-        apps = mergeTables(apps, newApps);
-        paramAdv.setApps(newApps);
-        
-        // alter protos
-        Map protos = paramAdv.getProtos();
-
-        typeCheckKeys(protos);
-        apps = mergeTables(protos, newProtos);
-        paramAdv.setProtos(newProtos);
-        
-        paramElement = (TextElement) paramAdv.getDocument(MimeMediaType.XMLUTF8);
-        implAdv.setParam(paramElement);
-
-        return implAdv;
-    }
-    
-    /**
-     * Module table vaules must be ModuleImplAdvertisements here.
-     * Though StdPeerGroup allows for values of type ModuleSpecID,
-     * the context in which they seem to apply is not our context of adding
-     * or replacing modules, so I've prohibited them. --vasha@jxta.org dec 3 2001.
-     *
-     * @param moduleTable -- a Hashtable of services, applications or protocols.
-     * @throws IllegalArgumentException -- for an invalid key or value type
-     */
-    public static void typeCheckValues(Map moduleTable) {
-        String badVal = "Module table value not a ModuleImplAdvertisement ";
-        Iterator keys = moduleTable.keySet().iterator();
-
-        while (keys.hasNext()) {
-            // Tables allow for ModuleSpecID values when, as I understand it,
-            // they can load the module from the parent. I'm insisting that
-            // NEW or ALTERNATIVE modules supply a ModuleImplAdvertisement.
-            Object value = moduleTable.get(keys.next());
-            boolean legalValue = value instanceof ModuleImplAdvertisement;
-
-            if (!legalValue) {
-                throw(new IllegalArgumentException(badVal + value));
-            }
-        }
-    }
-    
-    /**
-     * Module table keys must be ModuleClassID's.
-     *
-     * @param moduleTable -- a Hashtable of services, applications or protocols.
-     * @throws IllegalArgumentException -- for an invalid key or value type
-     */
-    public static void typeCheckKeys(Map moduleTable) {
-        String badKey = "Module table key not a ModuleClassID ";
-        Iterator keys = moduleTable.keySet().iterator();
-
-        while (keys.hasNext()) {
-            Object key = keys.next();
-            boolean legalKey = key instanceof ModuleClassID;
-
-            if (!legalKey) {
-                throw(new IllegalArgumentException(badKey + key));
-            }
-        }
-    }
-    
-    /**
-     * Merge two hashtables of servcices, overwriting old with new if
-     * they have the same base class id.
-     *
-     * @oldServices --service table of a parent group
-     * @newServices --services to be added or substituted
-     * @return --merged table
-     */
-    private static Map mergeTables(Map oldServices, Map newServices) {
-        // just use brute force; we won't be doing it that often
-        Map mergedServices = new HashMap(oldServices);
-        Iterator newKeys = newServices.keySet().iterator();
-
-        while (newKeys.hasNext()) {
-            ModuleClassID key = (ModuleClassID) newKeys.next();
-            Iterator oldKeys = oldServices.keySet().iterator();
-
-            while (oldKeys.hasNext()) {
-                ModuleClassID oldkey = (ModuleClassID) oldKeys.next();
-
-                if (oldkey.isOfSameBaseClass(key)) {
-                    mergedServices.remove(oldkey);
-                }
-            }
-            mergedServices.put(key, newServices.get(key));
-        }
-        return mergedServices;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/BASE64InputStream.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/BASE64InputStream.java
deleted file mode 100644 (file)
index 656a346..0000000
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util;
-
-
-import java.io.InputStream;
-import java.io.Reader;
-
-import java.io.IOException;
-
-/**
- *  An <code>InputStream</code> implementation which decodes BASE64 encoded
- *  data from a text <code>Reader</code>.
- *
- * <p/>This implementation is not thread safe.
- *
- *  @see net.jxta.impl.util.BASE64OutputStream
- *  @see <a href="http://www.ietf.org/rfc/rfc2045.txt" target="_blank">IETF RFC 2045 <i>MIME : Format of Internet Message Bodies</i></a>
- **/
-public class BASE64InputStream extends InputStream {
-    
-    /**
-     *  The input source of BASE64 text data.
-     **/
-    private Reader source;
-    
-    /**
-     *  If <code>true</code> then the stream has been closed.
-     **/
-    private boolean closed = false;
-    
-    /**
-     *  If <code>true</code> then the source reader has reached EOF.
-     **/
-    private boolean atEOF = false;
-    
-    /**
-     *  Buffer for unread but decoded bytes.
-     **/
-    private byte buffer[] = new byte[3];
-    
-    /**
-     *  Position of current available character in buffer.
-     **/
-    private byte inBuffer = 3;
-    
-    /**
-     *  Construct InputStream given a source of BASE64 encoded text.
-     **/
-    public BASE64InputStream(Reader source) {
-        this.source = source;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public int available() throws IOException {
-        if (closed) {
-            throw new IOException("InputStream closed.");
-        }
-        
-        int bufferAvail = buffer.length - inBuffer;
-        
-        return (bufferAvail > 0) ? bufferAvail : (source.ready() ? 1 : 0);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public void close() throws IOException {
-        closed = true;
-        
-        source.close();
-        source = null;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public void mark(int readLimit) {
-        throw new IllegalStateException("Mark not supported.");
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public boolean markSupported() {
-        return false;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public int read() throws IOException {
-        if (closed) {
-            throw new IOException("InputStream closed.");
-        }
-        
-        while (!atEOF) {
-            if (inBuffer < buffer.length) {
-                return buffer[inBuffer++] & 0x00FF;
-            }
-            
-            inBuffer = 0;
-            
-            int s0;
-
-            do {
-                s0 = source.read();
-            } while ((-1 != s0) && Character.isWhitespace((char) s0));
-            
-            if (-1 == s0) {
-                atEOF = true;
-                break;
-            }
-            
-            int s1 = source.read();
-            int s2 = source.read();
-            int s3 = source.read();
-            
-            if ((-1 == s1) || (-1 == s2) || (-1 == s3)) {
-                throw new IOException("Unexpected EOF");
-            }
-            
-            int c0 = decodeSixBits((char) s0);
-            int c1 = decodeSixBits((char) s1);
-            int c2 = decodeSixBits((char) s2);
-            int c3 = decodeSixBits((char) s3);
-            
-            if ((-1 == c0) || (-1 == c1) || (-1 == c2) || (-1 == c3)) {
-                throw new IOException("Bad character in BASE64 data");
-            }
-            
-            if (Integer.MAX_VALUE == c0) {
-                throw new IOException("'=' found in first position of BASE64 data");
-            }
-            
-            if (Integer.MAX_VALUE == c1) {
-                throw new IOException("'=' found in second position of BASE64 data");
-            }
-            
-            if (Integer.MAX_VALUE == c3) {
-                c3 = 0;
-                inBuffer++;
-            }
-            
-            if (Integer.MAX_VALUE == c2) {
-                c2 = 0;
-                inBuffer++;
-            }
-            
-            int val = (c0 << 18) + (c1 << 12) + (c2 << 6) + c3;
-            
-            buffer[ inBuffer ] = (byte) (val >> 16);
-            
-            if ((inBuffer + 1) < buffer.length) {
-                buffer[ inBuffer + 1 ] = (byte) (val >> 8);
-            }
-            
-            if ((inBuffer + 2) < buffer.length) {
-                buffer[ inBuffer + 2 ] = (byte) val;
-            }
-        }
-        
-        return -1;
-    }
-    
-    /**
-     *
-     *  XXX bondolo this would be faster as a table.
-     **/
-    private static int decodeSixBits(char c) {
-        int v;
-        
-        if ('A' <= c && c <= 'Z') {
-            v = (c - 'A');
-        } else if ('a' <= c && c <= 'z') {
-            v = (c - 'a') + 26;
-        } else if ('0' <= c && c <= '9') {
-            v = (c - '0') + 52;
-        } else if (c == '+') {
-            v = 62;
-        } else if (c == '/') {
-            v = 63;
-        } else  if (c == '=') {
-            v = Integer.MAX_VALUE;
-        } else {
-            v = -1;
-        }
-        
-        return v;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/BASE64OutputStream.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/BASE64OutputStream.java
deleted file mode 100644 (file)
index f2bf45f..0000000
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util;
-
-
-import java.io.OutputStream;
-import java.io.Writer;
-
-import java.io.IOException;
-import java.io.StringReader;
-import java.io.ByteArrayOutputStream;
-import java.io.StringWriter;
-
-
-/**
- * An OutputStream implementation which encodes the written bytes into BASE64
- * encoded character data and writes the output to an associated text Writer.
- *
- * <p/>This implementation is not thread safe.
- *
- * @see net.jxta.impl.util.BASE64InputStream
- * @see <a href="http://www.ietf.org/rfc/rfc2045.txt" target="_blank">IETF RFC 2045 <i>MIME : Format of Internet Message Bodies</i></a>
- **/
-public class BASE64OutputStream extends OutputStream {
-    
-    /**
-     *  If <code>true</code> then the output stream has been closed.
-     **/
-    private boolean closed = false;
-    
-    /**
-     *  The output writer.
-     **/
-    private Writer sendTo = null;
-    
-    /**
-     *  Column width to breakup out.
-     **/
-    private final int columnWidth;
-    
-    /**
-     *  Current output column.
-     **/
-    private int column = 0;
-    
-    /**
-     *  Buffer for incomplete characters.
-     **/
-    private byte[] buffer = new byte[] { 0, 0, 0 };
-    
-    /**
-     *  The number of characters currently in the buffer.
-     **/
-    private byte inBuffer = 0;
-    
-    /**
-     * Construct a BASE64 Output Stream.
-     *
-     * @param sendTo The text Writer to which the BASE64 output will be
-     * written.
-     **/
-    public BASE64OutputStream(Writer sendTo) {
-        this(sendTo, -1);
-    }
-    
-    /**
-     * Construct a BASE64 Output Stream. The output will be broken into lines
-     * <code>columnWidth</code> long.
-     *
-     * @param sendTo The text Writer to which the BASE64 output will be
-     * written.
-     * @param columnWidth The width of lines to break output into.
-     **/
-    public BASE64OutputStream(Writer sendTo, int columnWidth) {
-        this.sendTo = sendTo;
-        this.columnWidth = columnWidth;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public void write(int b) throws IOException {
-        if (closed) {
-            throw new IOException("OutputStream closed.");
-        }
-        
-        buffer[ inBuffer++ ] = (byte) b;
-        
-        if (buffer.length == inBuffer) {
-            writeBuffer();
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     *
-     *  <p/>The output writer is <b>NOT</b> closed.
-     **/
-    @Override
-    public void close() throws IOException {
-        flush();
-        
-        closed = true;
-        sendTo = null;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public void flush() throws IOException {
-        writeBuffer();
-    }
-    
-    /**
-     *  Write a full or partial buffer to the output writer.
-     **/
-    private void writeBuffer() throws IOException {
-        if (0 == inBuffer) {
-            return;
-        }
-        
-        int val = ((buffer[0] & 0x00FF) << 16) + ((buffer[1] & 0x00FF) << 8) + (buffer[2] & 0x00FF);
-        
-        int c0 = (val >> 18) & 0x003F;
-        int c1 = (val >> 12) & 0x003F;
-        int c2 = (val >> 6) & 0x003F;
-        int c3 = val & 0x003F;
-        
-        if ((columnWidth > 0) && (column > columnWidth)) {
-            sendTo.write('\n');
-            column = 0;
-        }
-        
-        sendTo.write(encodeSixBits(c0));
-        sendTo.write(encodeSixBits(c1));
-        
-        if (inBuffer > 1) {
-            sendTo.write(encodeSixBits(c2));
-        } else {
-            sendTo.write('=');
-        }
-        
-        if (inBuffer > 2) {
-            sendTo.write(encodeSixBits(c3));
-        } else {
-            sendTo.write('=');
-        }
-        
-        buffer[0] = 0;
-        buffer[1] = 0;
-        buffer[2] = 0;
-        
-        inBuffer = 0;
-        column += 4;
-    }
-    
-    /**
-     *  BASE64 Encoding Table
-     **/
-    static final char encode[] = {
-        'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X'
-                ,
-        'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v'
-                ,
-        'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'
-    };
-    
-    /**
-     *  Encode six bits into a character using the standard BASE64 table.
-     *
-     *  @param b the bits to encode. b must be >=0 and <= 63
-     *  @return the appropriate character for the input value.
-     **/
-    private static char encodeSixBits(int b) {
-        char c;
-        
-        if ((b < 0) || (b > 63)) {
-            throw new IllegalArgumentException("bad encode value");
-        } else {
-            c = encode[b];
-        }
-        
-        return c;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/Base64.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/Base64.java
deleted file mode 100644 (file)
index cea4bf0..0000000
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util;
-
-
-import java.io.IOException;
-import java.io.StringReader;
-import java.io.ByteArrayOutputStream;
-import java.io.StringWriter;
-
-
-/**
- * @deprecated Planned for removal. This implementation has been replaced by
- * {@link net.jxta.impl.util.BASE64InputStream} and 
- * {@link net.jxta.impl.util.BASE64OutputStream}.
- *
- **/
-@Deprecated
-public final class Base64 {
-    
-    private Base64() {}
-    
-    // Base64 encoding.  See Rfc1341
-    
-    static public byte[] decodeBase64(String text) throws IOException {
-        ByteArrayOutputStream os = new ByteArrayOutputStream();
-        StringReader r = new StringReader(text);
-        
-        for (;;) {
-            char c0 = getBase64Char(r);
-
-            if (c0 == '\0') {
-                break;
-            }
-            char c1 = getBase64Char(r);
-
-            if (c1 == '\0') {
-                throw new IOException("binary data not a multiple of four bytes");
-            }
-            char c2 = getBase64Char(r);
-
-            if (c2 == '\0') {
-                throw new IOException("binary data not a multiple of four bytes");
-            }
-            char c3 = getBase64Char(r);
-
-            if (c3 == '\0') {
-                throw new IOException("binary data not a multiple of four bytes");
-            }
-            
-            if (c0 == '=') {
-                throw new IOException("'=' found in first position of base64 data");
-            }
-            if (c1 == '=') {
-                throw new IOException("'=' found in second position of base64 data");
-            }
-            int n = 3;
-
-            if (c2 == '=') {
-                n = 1;
-                c2 = c3 = 'A'; // So we get a value of 0.
-            } else if (c3 == '=') {
-                n = 2;
-                c3 = 'A'; // So we get a value of 0.
-            }
-            
-            int v = (decodeSixBits(c0) << 18) + (decodeSixBits(c1) << 12) + (decodeSixBits(c2) << 6) + decodeSixBits(c3);
-            
-            int b0 = (v >> 16) & 0xff;
-            int b1 = (v >> 8) & 0xff;
-            int b2 = (v) & 0xff;
-
-            os.write(b0);
-            if (n >= 2) {
-                os.write(b1);
-            }
-            if (n == 3) {
-                os.write(b2);
-            }
-        }
-        
-        return os.toByteArray();
-    }
-    
-    /**
-     * '\0' represents end of file.
-     */
-    static private char getBase64Char(StringReader r) throws IOException {
-        for (;;) {
-            int i = r.read();
-
-            if (i == -1) {
-                return '\0';
-            }
-            
-            char c = (char) i;
-
-            if ('A' <= c && c <= 'Z') {
-                return c;
-            } else if ('a' <= c && c <= 'z') {
-                return c;
-            } else if ('0' <= c && c <= '9') {
-                return c;
-            } else if (c == '+') {
-                return c;
-            } else if (c == '/') {
-                return c;
-            } else if (c == '=') {
-                return c;
-            }
-            
-            // Not a base64 char, loop around and try again.
-            
-        }
-    }
-    
-    static public String encodeBase64(byte[] bytes) {
-        int n = 0;
-        StringWriter w = new StringWriter();
-        int v;
-        int h; // Six bits.  Six, thus h for hex.
-        
-        int len = bytes.length / 3 * 3;
-
-        for (int i = 0; i < len; i += 3) {
-            v = (bytes[i] << 16) + ((bytes[i + 1] & 0xff) << 8) + (bytes[i + 2] & 0xff);
-            
-            h = (v >> 18) & 0x3f;
-            w.write(encodeSixBits(h));
-            
-            h = ((v >> 12) & 0x3f);
-            w.write(encodeSixBits(h));
-            
-            h = ((v >> 6) & 0x3f);
-            w.write(encodeSixBits(h));
-            
-            h = ((v >> 0) & 0x3f);
-            w.write(encodeSixBits(h));
-            
-            n += 4;
-            if (n >= 76) {
-                w.write("\r\n");
-                n = 0;
-            }
-            
-        }
-        
-        switch (bytes.length - len) {
-        case 0:
-            break;
-
-        case 1:
-            v = (bytes[len] << 16);
-                
-            h = (v >> 18) & 0x3f;
-            w.write(encodeSixBits(h));
-                
-            h = (v >> 12) & 0x3f;
-            w.write(encodeSixBits(h));
-                
-            w.write('=');
-            w.write('=');
-            break;
-
-        case 2:
-            v = (bytes[len] << 16) + ((bytes[len + 1] & 0xff) << 8);
-                
-            h = (v >> 18) & 0x3f;
-            w.write(encodeSixBits(h));
-                
-            h = ((v >> 12) & 0x3f);
-            w.write(encodeSixBits(h));
-                
-            h = ((v >> 6) & 0x3f);
-            w.write(encodeSixBits(h));
-                
-            w.write('=');
-            break;
-        }
-        w.write("\r\n");
-        return w.toString();
-    }
-    
-    static private char encodeSixBits(int b) {
-        char c;
-        
-        if (b <= 25) {
-            c = (char) ('A' + b);
-        } else if (b <= 51) {
-            c = (char) ('a' + b - 26);
-        } else if (b <= 61) {
-            c = (char) ('0' + b - 52);
-        } else if (b == 62) {
-            c = '+';
-        } else {
-            // if (b == 63)
-            c = '/';
-        }
-        return c;
-    }
-    
-    static private int decodeSixBits(char c) {
-        int v;
-        
-        if ('A' <= c && c <= 'Z') {
-            v = (c - 'A');
-        } else if ('a' <= c && c <= 'z') {
-            v = (c - 'a') + 26;
-        } else if ('0' <= c && c <= '9') {
-            v = (c - '0') + 52;
-        } else if (c == '+') {
-            v = 62;
-        } else {
-            // if (c == '/')
-            v = 63;
-        }
-        
-        return v;
-    }
-    
-    public static void main(String args[]) {
-        byte bytes[] = new byte[200];
-        
-        for (int i = 0; i < bytes.length; ++i) {
-            bytes[i] = (byte) i;
-        }
-        
-        System.out.println(encodeBase64(bytes));
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/Cache.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/Cache.java
deleted file mode 100644 (file)
index b7399de..0000000
+++ /dev/null
@@ -1,351 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util;
-
-
-import java.util.HashMap;
-import java.util.Map;
-
-
-/**
- * A Cache which is similar to {@link java.util.LinkedHashMap}
- *
- * <p/>LinkedList cannot be used efficiently because it
- * cannot remove an element efficiently from the middle. For that, we need
- * the externally referenced element (the thing to be removed) to
- * be the list entry itself, rather than referenced by an invisible
- * list entry. That is why we use the DLink/Dlist family.
- */
-public class Cache {
-    
-    /**
-     * CacheEntryImpl objects are both part of a doubly linked list and
-     * inserted in a HashMap. They refer to the thing mapped which is what
-     * users of this class want to get, and to the key. The reason is
-     * that we need the key to remove from the map
-     * an entry that we found in list. The otherway around is made easy by
-     * the nature of the dlinked structure.
-     **/
-    
-    class CacheEntryImpl extends Dlink implements CacheEntry {
-        
-        private final Object value;
-        private final Object key;
-        
-        // The application interface.
-        public CacheEntryImpl(Object k, Object v) {
-            key = k;
-            value = v;
-        }
-        
-        /**
-         *  {@inheritDoc}
-         **/
-        public Object getKey() {
-            return key;
-        }
-        
-        /**
-         *  {@inheritDoc}
-         **/
-        public Object getValue() {
-            return value;
-        }
-    }
-    
-    private final long maxSize;
-    private long size;
-    private final Map map = new HashMap();
-    private final Dlist lru = new Dlist();
-    
-    private final CacheEntryListener listener;
-    
-    /**
-     * Creates a cache whih will keep at most maxSize purgeable entries.
-     * Every new entry is purgeable by default.
-     *
-     * <p/>Entries that are not purgeable are not counted and are never removed
-     * unless clear() or remove() is called. Purgeable entries are removed
-     * silently as needed to make room for new entries so that the number
-     * of purgeable entries remains < maxSize.
-     *
-     * <p/>Entries prugeability is controlled by invoking the sticky() method
-     * or the stickyCacheEntry() method.
-     *
-     * <p/>For now, purged entries are abandonned to the GC which is probably not
-     * so bad. To permit acceleration of the collection of resources, a
-     * purge listener will be added soon.
-     */
-    public Cache(long maxSize, CacheEntryListener listener) {
-        this.maxSize = maxSize;
-        this.size = 0;
-        this.listener = listener;
-    }
-    
-    /**
-     * Empties the cache completely.
-     * The entries are abandonned to the GC.
-     */
-    public void clear() {
-        lru.clear();
-        map.clear();
-    }
-    
-    /**
-     * Purges some of the cache.
-     * The entries are cleaned-up properly.
-     */
-    public void purge(int fraction) {
-        if (size == 0) {
-            return;
-        }
-        
-        if (fraction == 0) {
-            fraction = 1;
-        }
-        long nbToPurge = size / fraction;
-
-        if (nbToPurge == 0) {
-            nbToPurge = 1;
-        }
-        
-        while (nbToPurge-- > 0) {
-            CacheEntryImpl toRm = (CacheEntryImpl) lru.next();
-
-            map.remove(toRm.getKey());
-            toRm.unlink();
-            --size;
-            if (listener != null) {
-                listener.purged(toRm);
-            }
-        }
-    }
-    
-    /**
-     * Inserts the given cache entry directly.
-     * Returns the previous cache entry associated with the given key, if any.
-     * Not exposed yet. Should not be a problem to expose it, but it is not
-     * needed yet.
-     */
-    protected CacheEntry putCacheEntry(Object key, CacheEntry value) {
-        if (size == maxSize) {
-            CacheEntryImpl toRm = (CacheEntryImpl) lru.next();
-
-            map.remove(toRm.getKey());
-            toRm.unlink();
-            --size;
-            if (listener != null) {
-                listener.purged(toRm);
-            }
-        }
-        
-        lru.putLast((CacheEntryImpl) value);
-        ++size;
-        
-        CacheEntryImpl oldEntry = (CacheEntryImpl) map.put(key, value);
-
-        if (oldEntry == null) {
-            return null;
-        }
-        
-        if (oldEntry.isLinked()) {
-            oldEntry.unlink();
-            --size;
-        }
-        return oldEntry;
-    }
-    
-    /**
-     * Create a cache entry to hold the given value, and insert it.
-     * Returns the previous value associated with the given key, if any.
-     */
-    public Object put(Object key, Object value) {
-        CacheEntry oldEntry = putCacheEntry(key, new CacheEntryImpl(key, value));
-        
-        if (oldEntry == null) {
-            return null;
-        }
-        
-        return oldEntry.getValue();
-    }
-    
-    /**
-     * Remove the value, if any, and cacheEntry associated with the given key.
-     * return the cacheEntry that has been removed.
-     * Not exposed yet. Should not be a problem to expose it, but it is not
-     * needed yet.
-     */
-    protected CacheEntry removeCacheEntry(Object key) {
-        CacheEntryImpl oldEntry = (CacheEntryImpl) map.remove(key);
-
-        if (oldEntry == null) {
-            return null;
-        }
-        if (oldEntry.isLinked()) {
-            oldEntry.unlink();
-            --size;
-        }
-        return oldEntry;
-    }
-    
-    /**
-     * Remove the value, if any, and cacheEntry associated with the given key.
-     * returns the value that has been removed.
-     */
-    public Object remove(Object key) {
-        CacheEntry oldEntry = removeCacheEntry(key);
-
-        if (oldEntry == null) {
-            return null;
-        }
-        return oldEntry.getValue();
-    }
-    
-    /**
-     * Return the cache entry, if any, associated with the given key.
-     * This is public; it improves performance by letting the application
-     * do a single lookup instead of two when it needs to find an object in
-     * the cache and then change its purgeability.
-     */
-    public CacheEntry getCacheEntry(Object key) {
-        CacheEntryImpl foundEntry = (CacheEntryImpl) map.get(key);
-
-        if (foundEntry == null) {
-            return null;
-        }
-        
-        // Leave the purgeability status alone but manage lru position if
-        // purgeable.
-        if (foundEntry.isLinked()) {
-            lru.putLast(foundEntry);
-        }
-        return foundEntry;
-    }
-    
-    /**
-     * Return the value, if any associated with the given key.
-     */
-    public Object get(Object key) {
-        CacheEntry foundEntry = getCacheEntry(key);
-
-        if (foundEntry == null) {
-            return null;
-        }
-        return foundEntry.getValue();
-    }
-    
-    /**
-     * Change the purgeability of the given cacheEntry.
-     * If sticky is true, the entry cannot be purged.
-     * Note: if the CacheEntry is known, it is more efficient to use this
-     * method than sticky(), since sticky will preform a hashmap lookup
-     * to locate the cache entry.
-     */
-    public void stickyCacheEntry(CacheEntry ce, boolean sticky) {
-        CacheEntryImpl target = (CacheEntryImpl) ce;
-        
-        if (sticky) {
-            
-            // Stiky => not purgeable.
-            
-            if (!target.isLinked()) {
-                return;
-            }
-            target.unlink();
-            --size;
-            
-        } else {
-            
-            // ! Sticky => purgeable.
-            
-            if (target.isLinked()) {
-                return;
-            }
-            if (size == maxSize) {
-                CacheEntryImpl toRm = (CacheEntryImpl) lru.next();
-
-                map.remove(toRm.getKey());
-                toRm.unlink();
-                if (listener != null) {
-                    listener.purged(toRm);
-                }
-                --size;
-            }
-            
-            lru.putLast(target);
-            ++size;
-            
-        }
-    }
-    
-    /**
-     * Force the value associated with the given key to be purgeable or
-     * non-purgeable from the cache (non-sticky vs. sticky).
-     * Note: Most often, a call to the get() method will be performed
-     * before it can be decided to invoke sticky(). Whenever this is the case
-     * it is better to invoke getCacheEntry() + getValue() and then
-     * stickyCacheEntry() since that eliminates one hashmap lookup.
-     */
-    public void sticky(Object key, boolean sticky) {
-        CacheEntry foundEntry = (CacheEntry) map.get(key);
-
-        if (foundEntry == null) {
-            return;
-        }
-        stickyCacheEntry(foundEntry, sticky);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/CacheEntry.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/CacheEntry.java
deleted file mode 100644 (file)
index ab25ff8..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util;
-
-
-/**
- * Part of a pre jdk1.4 replacement for LinkedHashMap which is basically a
- * cache. The following is the definition of an entry in the cache.
- * The implementation is the business of the Cache class. As far as the
- * application is concerned, it is a handle that can return a key and
- * a value. It is constructed and managed by the Cache class.
- */
-
-public interface CacheEntry {
-    public Object getKey();
-    public Object getValue();
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/CacheEntryListener.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/CacheEntryListener.java
deleted file mode 100644 (file)
index 40fa9bb..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util;
-
-
-/**
- * Part of a pre jdk1.4 replacement for LinkedHashMap which is basically a
- * cache. The following is the definition of an entry in the cache.
- * The implementation is the business of the Cache user.
- * This listener is used to alerts the cache owner of events that affect
- * cache entries. Currently purge() is the only method. It is called when a
- * cache entry is purged from the cache.
- */
-
-public interface CacheEntryListener {
-    public void purged(CacheEntry c);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/ConsumerBiasedQueue.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/ConsumerBiasedQueue.java
deleted file mode 100644 (file)
index e5b29e5..0000000
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util;
-
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-import java.util.List;
-import java.util.ArrayList;
-
-import net.jxta.impl.util.TimeUtils;
-
-
-/**
- *  A queue who's implementation is biased towards effciency in removing 
- elements from the queue.
- *
- *  FIXME 20020511  bondolo@jxta.org    This could be more efficient with a
- *  circular queue implementation, but its a pain to write since we allow the
- *  queue to be resizable.
- *
- *  FIXME 20020511  bondolo@jxta.org    Exercise for the reader: Extend this
- *  class so that it does both LIFO and FIFO.
- *
- *  @deprecated Please convert all code to use the java.util.concurrent BlockingQueue instead.
- *
- **/
-@Deprecated
-public class ConsumerBiasedQueue extends UnbiasedQueue {
-    
-    /**
-     *  Log4J
-     **/
-    private static final Logger LOG = Logger.getLogger(ConsumerBiasedQueue.class.getName());
-    
-    /**
-     * Default constructor. 100 element FIFO queue which drops oldest element
-     * when full.
-     */
-    public ConsumerBiasedQueue() {
-        this(DEFAULT_MAX_OBJECTS, DROP_OLDEST_OBJECT);
-    }
-    
-    /**
-     * Full featured constructor for creating a new ConsumerBiasedQueue.
-     *
-     * @param size    Queue will be not grow larger than this size. Use
-     *    Integer.MAX_VALUE for "unbounded" queue size.
-     * @param dropOldest  Controls behaviour of element insertion when the queue is
-     * full. If "true" and the queue is full upon a push operation then the
-     * oldest element will be dropped to be replaced with the element currently
-     * being pushed. If "false" then then newest item will be dropped.
-     */
-    public ConsumerBiasedQueue(int size, boolean dropOldest) {
-        super(size, dropOldest, new ArrayList());
-    }
-    
-    /**
-     *  Flush the queue of all pending objects.
-     **/
-    @Override
-    public void clear() {
-        synchronized (queue) {
-            super.clear();
-        }
-    }
-    
-    @Override
-    public synchronized boolean push(Object obj) {
-        synchronized (queue) {
-            boolean pushed = super.push(obj);
-
-            queue.notify(); // inform someone who is waiting. we dont have to tell everyone though
-            return pushed;
-        }
-    }
-    
-    /**
-     * Push an object onto the queue. If the queue is full then the push will
-     *  wait for up to "timeout" milliseconds to push the object. At the end of
-     *  "timeout" milliseconds, the push will either return false or remove the
-     *  oldest item from the queue and insert "obj". This behaviour is contolled
-     *  by the constructor parameter "dropOldest".
-     *
-     *  This method, unlike all others is synchronized. This creates a
-     *  bottleneck for producers seperate from the primary lock on the "queue"
-     *  member. This reduces contention on the primary lock which benefits users
-     *  who are popping items from the queue (Consumers).
-     *
-     * @param obj Object to be pushed onto the queue
-     * @param timeout Time in milliseconds to try to insert the item into a full
-     *  queue. Per Java standards, a timeout of "0" (zero) will wait indefinitly.
-     *  Negative values force no wait period at all.
-     *  @return true if the object was intersted into the queue, otherwise false.
-     *  @throws InterruptedException    if the operation is interrupted before
-     *      the timeout interval is completed.
-     **/
-    @Override
-    public synchronized boolean push(Object obj, long timeout) throws InterruptedException {
-        return super.push(obj, timeout);
-    }
-    
-    /**
-     * Return next obj in the queue if there is one.
-     *
-     * @return Object, null if the queue is empty
-     **/
-    @Override
-    public Object pop() {
-        synchronized (queue) {
-            return super.pop();
-        }
-    }
-    
-    /**
-     *  Returns an array of objects, possibly empty, from the queue.
-     *
-     *  @param maxObjs  the maximum number of items to return.
-     *  @return an array of objects, possibly empty containing the returned
-     *  queue elements.
-     **/
-    @Override
-    public Object[] popMulti(int maxObjs) {
-        synchronized (queue) {
-            return super.popMulti(maxObjs);
-        }
-    }
-    
-    /**
-     *  Set how many objects this queue may store. Note that if there are more
-     *  objects already in the queue than the specified amount then the queue
-     *  will retain its current capacity.
-     *
-     *  @param maxObjs  The number of objects which the queue must be able to
-     *  store.
-     **/
-    @Override
-    public void setMaxQueueSize(int maxObjs) {
-        synchronized (queue) {
-            super.setMaxQueueSize(maxObjs);
-        }
-    }
-    
-    /**
-     *  Return the number of elements currently in the queue. This method is
-     *  useful for statistical sampling, but should not be used to determine
-     *  program logic due to the multi-threaded behaviour of these queues. You
-     *  should use the return values and timeout behaviour of the push() and
-     * pop() methods to regulate how you use the queue.
-     *
-     *  @return the number of elements currently in the queue. Be warned that
-     *  even two sequential calls to this method may return different answers
-     *  due to activity on other threads.
-     *
-     **/
-    @Override
-    public int getCurrentInQueue() {
-        synchronized (queue) {
-            return super.getCurrentInQueue();
-        }
-    }
-    
-    /**
-     *  Return the average number of elements in the queue at Enqueue time.
-     *
-     *  @return average number of elements which were in the queue at during all
-     *  of the "push" operations which returned a "true" result. Does not
-     *  include the item being pushed. If no elements have ever been enqueued
-     *  then "NaN" will be returned.
-     **/
-    @Override
-    public double getAvgInQueueAtEnqueue() {
-        synchronized (queue) {
-            return super.getAvgInQueueAtEnqueue();
-        }
-    }
-    
-    /**
-     *  Return the average number of elements in the queue at dequeue time.
-     *
-     *  @return average number of elements which were in the queue at during all
-     *  of the "pop" operations which returned a non-null result. Includes the
-     * item being "pop"ed in the average. If no elements have ever been dequeued
-     *  then "NaN" will be returned.
-     **/
-    @Override
-    public double getAvgInQueueAtDequeue() {
-        synchronized (queue) {
-            return super.getAvgInQueueAtDequeue();
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/Dlink.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/Dlink.java
deleted file mode 100644 (file)
index ea9eaff..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util;
-
-
-/**
- * A dlinkable base class.
- * It is far less general than java's LinkedList but permits much better
- * removal performance from the middle of the list because a contained
- * element and the corresponding chaining object are one and the same.
- *
- * The major inconvenient of this class is that it is...a class, not an
- * interface. Making it an interface does not make sense since one would have
- * to re-implement it entirely. There is almost no value added in a List class
- * in addition to a Link class. A list of these Dlink is just a stand-alone
- * Dlink with just a couple of additional convenience methods.
- */
-
-public class Dlink {
-
-    /**
-     * Previous element in list.
-     */
-    private Dlink prev;
-
-    /**
-     * Next element in list.
-     */
-    private Dlink next;
-
-    private void setNext(Dlink n) {
-        next = n;
-    }
-
-    private void setPrev(Dlink p) {
-        prev = p;
-    }
-
-    public Dlink next() {
-        return next;
-    }
-
-    public Dlink prev() {
-        return prev;
-    }
-
-    public void unlink() {
-        next.setPrev(prev);
-        prev.setNext(next);
-        next = prev = this;
-    }
-
-    public boolean isLinked() {
-        return next != this;
-    }
-
-    public void linkNewNext(Dlink ne) {
-        ne.unlink();
-        ne.setPrev(this);
-        ne.setNext(next);
-        next.setPrev(ne);
-        next = ne;
-    }
-
-    public void linkNewPrev(Dlink ne) {
-        ne.unlink();
-        ne.setNext(this);
-        ne.setPrev(prev);
-        prev.setNext(ne);
-        prev = ne;
-    }
-
-    public Dlink() {
-        next = prev = this;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/Dlist.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/Dlist.java
deleted file mode 100644 (file)
index f2f357a..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util;
-
-
-/**
- * A cheap doubly linked list.
- * It is far less general than java's LinkedList but permits much better
- * removal performance from the middle of the list because a contained
- * element and the corresponding chaining object are one and the same.
- *
- * The major inconvenient of Dlink is that it is a class, not an
- * interface. Making it an interface does not make sense since one would have
- * to re-implement it entirely. A DList is just a stand-alone
- * Dlink with just a couple of additional convenience methods.
- *
- * Note this class does not keep an element count. The way element removal
- * works makes it impossible. Do it from the outside.
- */
-
-public class Dlist extends Dlink {
-
-    public void putLast(Dlink ne) {
-        linkNewPrev(ne);
-    }
-
-    public void putFirst(Dlink ne) {
-        linkNewNext(ne);
-    }
-
-    public Dlink last() {
-        return prev();
-    }
-
-    public Dlink first() {
-        return next();
-    }
-
-    public void addLast(Dlink ne) {
-        linkNewPrev(ne);
-    }
-
-    public void addFirst(Dlink ne) {
-        linkNewNext(ne);
-    }
-
-    public Dlink getLast() {
-        return prev();
-    }
-
-    public Dlink getFirst() {
-        return next();
-    }
-
-    public Dlink removeLast() {
-        Dlink p = prev();
-
-        p.unlink();
-        return p;
-    }
-
-    public Dlink removeFirst() {
-        Dlink n = next();
-
-        n.unlink();
-        return n;
-    }
-
-    public void clear() {
-        unlink();
-    }
-
-    public boolean isEmpty() {
-        return !isLinked();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/DynamicEnumeration.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/DynamicEnumeration.java
deleted file mode 100644 (file)
index 4df5507..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util;
-
-
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.List;
-
-import java.util.NoSuchElementException;
-
-
-/**
- *  A dynamic {@link java.util.Enumeration} which allows items to added to the
- *  enumeration while it is in use. This is mostly intended for use with
- *  {@link java.io.SequenceInputStream}. When used with {@code SequenceInputStream}
- *  it is important to call {@code close()} on the enumeration before calling
- *  {@code close()} on the stream. Failing to do so will cause the stream to
- *  block as it tries to "drain" the enumeration.
- *
- *  <p/>This class is entirely thread safe. Attempting to use the enumeration
- *  and to add objects from a single thread is not recommended, as it may
- *  deadlock the thread.
- *
- **/
-public class DynamicEnumeration implements Enumeration {
-    private List sequence = new ArrayList();
-    
-    private volatile boolean closed = false;
-    
-    /**
-     * Creates a new instance of DynamicEnumeration
-     **/
-    public DynamicEnumeration() {}
-    
-    /**
-     * Creates a new instance of DynamicEnumeration
-     **/
-    public DynamicEnumeration(List initial) {
-        sequence.addAll(initial);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     *
-     *  <p/>If the Enumeration has not been closed we may have to block until we
-     *  have a stream to return.
-     **/
-    public boolean hasMoreElements() {
-        while (!closed) {
-            synchronized (sequence) {
-                if (!sequence.isEmpty()) {
-                    return true;
-                }
-                
-                try {
-                    sequence.wait();
-                } catch (InterruptedException woken) {
-                    Thread.interrupted();
-                }
-            }
-        }
-        
-        return false;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     *
-     *  <p/>If the Enumeration has not been closed we may have to block until we
-     *  have a stream to return.
-     **/
-    public synchronized Object nextElement() {
-        while (!closed) {
-            synchronized (sequence) {
-                if (sequence.isEmpty()) {
-                    try {
-                        sequence.wait();
-                    } catch (InterruptedException woken) {
-                        Thread.interrupted();
-                    }
-                    continue;
-                }
-                
-                Object result = sequence.remove(0);
-
-                return result;
-            }
-        }
-        
-        throw new NoSuchElementException("No more elements");
-    }
-    
-    /**
-     *  Add another object to the enumeration.
-     **/
-    public void add(Object add) {
-        if (closed) {
-            throw new IllegalStateException("Enumeration was closed");
-        }
-        
-        synchronized (sequence) {
-            sequence.add(add);
-            sequence.notify();
-        }
-    }
-    
-    /**
-     *  There will be no more objects added.
-     **/
-    public void close() {
-        closed = true;
-        synchronized (sequence) {
-            sequence.notify();
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/EndpointServiceStatsFilter.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/EndpointServiceStatsFilter.java
deleted file mode 100644 (file)
index c58fdf1..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util;
-
-
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.MessageFilterListener;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-
-
-/**
- * Instances of this clas can be registered with an EndpointService
- * to gather statistics about what kind of messages pass through it.
- * <p/>
- * This class is not MT-safe, so make sure you plug it only
- * into one endpoint service.
- *
- * @see net.jxta.endpoint.EndpointService#addIncomingMessageFilterListener
- */
-
-public class EndpointServiceStatsFilter implements MessageFilterListener {
-
-    long lastMessageTime;
-    Hashtable channelTrafficTable;
-    Hashtable sourceCountTable;
-    Hashtable destCountTable;
-
-    public EndpointServiceStatsFilter() {
-
-        channelTrafficTable = new Hashtable();
-        sourceCountTable = new Hashtable();
-        destCountTable = new Hashtable();
-    }
-
-    /**
-     * This method is called by the EndpointService to give us a chance
-     * to look at the message before it is dispatched to any listeners.
-     */
-    public Message filterMessage(Message msg, EndpointAddress source, EndpointAddress dest) {
-        Message.ElementIterator e = msg.getMessageElements();
-        MessageElement el;
-        String namespace;
-        String name;
-
-        while (e.hasNext()) {
-            el = e.next();
-
-            namespace = e.getNamespace();
-            name = el.getElementName();
-
-            incrementCount(channelTrafficTable, source.getProtocolName() + "://" + source.getProtocolAddress() + "/" + namespace
-                    ,
-                    (int) el.getByteLength());
-            incrementCount(channelTrafficTable, source.getProtocolName() + "://" + source.getProtocolAddress() + "/" + name
-                    ,
-                    (int) el.getByteLength());
-        }
-
-        if (source != null) {
-            incrementCount(sourceCountTable, source, 1);
-        }
-
-        if (dest != null) {
-            incrementCount(destCountTable, dest, 1);
-        }
-
-        lastMessageTime = System.currentTimeMillis();
-
-        return msg;
-    }
-
-    /**
-     * Get the time we last saw a message.
-     *
-     * @return time last message was received, in milliseconds,
-     *         since Jan. 1, 1970.
-     */
-
-    public long getLastMessageTime() {
-        return lastMessageTime;
-    }
-
-    /**
-     * Get the number of messages seen with a given message element
-     * namespace or full message element name.  (Both are referred
-     * to as "channel" here because filters and listeners are
-     * dispatched by the EndpointService based on message element
-     * namespaces or fully name.)
-     */
-    public long getTrafficOnChannel(String channel) {
-
-        return getCount(channelTrafficTable, channel);
-    }
-
-    public Enumeration getChannelNames() {
-        return channelTrafficTable.keys();
-    }
-
-    /**
-     * Get the number of messages received from a given address.
-     */
-    public long getMessageCountFrom(EndpointAddress addr) {
-        return getCount(sourceCountTable, addr);
-    }
-
-    /**
-     * Get the number of messages we've seen that were adderssed
-     * to a given address.
-     */
-    public long getMessageCountTo(EndpointAddress addr) {
-        return getCount(destCountTable, addr);
-    }
-
-    private long getCount(Hashtable table, Object key) {
-        Counter counter = (Counter) table.get(key);
-
-        return counter == null ? -1 : counter.value;
-    }
-
-    private void incrementCount(Hashtable table, Object key, int incr) {
-        Counter counter = (Counter) table.get(key);
-
-        if (counter == null) {
-            counter = new Counter();
-
-            table.put(key, counter);
-        }
-
-        counter.value += incr;
-    }
-
-    private static final class Counter {
-        long value;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/GenerateID.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/GenerateID.java
deleted file mode 100644 (file)
index 10cf02c..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc. All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.util;
-
-
-import net.jxta.id.*;
-import net.jxta.platform.*;
-import net.jxta.peergroup.*;
-import net.jxta.peer.*;
-import net.jxta.pipe.*;
-import net.jxta.codat.*;
-
-
-/**
- * @deprecated This would be much better as a JXTA shell command. Will be removed soon.
- *  
- * Generate a new JXTA IDs from the command line.
- * 
- * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- */
-@Deprecated
-public class GenerateID {
-
-    /**
-     * main()
-     *
-     */
-    public static void main(String[] args) {
-
-        try { 
-            
-            ModuleClassID classID = IDFactory.newModuleClassID();
-            
-            ModuleSpecID specID = IDFactory.newModuleSpecID(classID);
-            
-            PeerGroupID groupID = IDFactory.newPeerGroupID();
-            
-            PeerID peerID = IDFactory.newPeerID(groupID);
-            
-            PipeID pipeID = IDFactory.newPipeID(groupID);
-            
-            CodatID codatID = IDFactory.newCodatID(groupID);
-            
-            ModuleSpecID groupSpecID = IDFactory.newModuleSpecID(PeerGroup.allPurposePeerGroupSpecID.getBaseClass());
-
-            System.out.println("Module Class ID             -  " + classID.toString());
-            System.out.println("Module Spec  ID             -  " + specID.toString());
-            System.out.println("Peer Group ID               -  " + groupID.toString());
-            System.out.println("Peer ID                     -  " + peerID.toString());
-            System.out.println("Pipe ID                     -  " + pipeID.toString());
-            System.out.println("Codat ID                    -  " + codatID.toString());
-            System.out.println("Peer Group Module Spec ID   -  " + groupSpecID.toString());
-            
-        } catch (Throwable t) {
-            
-            t.printStackTrace();
-            
-        }
-        
-    }
-    
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/JxtaHash.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/JxtaHash.java
deleted file mode 100644 (file)
index 1d10121..0000000
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.util;
-
-
-import java.util.*;
-import java.io.File;
-import java.math.BigInteger;
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.ByteArrayInputStream;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-
-/**
- *  A message digest wrapper to provide hashing using java.security.MesssageDigest
- */
-public class JxtaHash {
-    private final static Logger LOG = Logger.getLogger(JxtaHash.class.getName());
-    public final static String SHA = "SHA";
-    public final static String SHA1 = "SHA1";
-    public final static String MD2 = "MD2";
-    public final static String MD5 = "MD5";
-    public final static String DSA = "DSA";
-    public final static String RSA = "RSA";
-    public final static String SHA1withDSA = "SHA1WITHDSA";
-    private MessageDigest dig = null;
-
-    /**
-     * Default JxtaHash constructor, with the default algorithm SHA1
-     *
-     */
-    public JxtaHash() {
-        try {
-            dig = MessageDigest.getInstance(SHA1);
-        } catch (NoSuchAlgorithmException ex) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(ex.toString());
-            }
-        }
-    }
-
-    /**
-     * Default JxtaHash constructor, with the default algorithm SHA1
-     *
-     * @param  expression  message to hash
-     */
-    public JxtaHash(String expression) {
-        this(SHA1, expression);
-    }
-
-    /**
-     * Constructor for the JxtaHash object
-     *
-     * @deprecated This implementation may produce inconsistent results
-     * based upon varience of the locale. (The locale of getBytes() is
-     * not defined).
-     *
-     * @param  algorithm   algorithm - the name of the algorithm requested
-     * @param  expression  expression to digest
-     */
-    @Deprecated
-    public JxtaHash(String algorithm, String expression) {
-               
-        this(algorithm, expression.getBytes());
-    }
-
-    /**
-     * Constructor for the JxtaHash object
-     *
-     * @param  algorithm   algorithm - the name of the algorithm requested
-     * @param  expression  expression to digest
-     */
-    public JxtaHash(String algorithm, byte[] expression) {
-        try {
-            dig = MessageDigest.getInstance(algorithm);
-            if (expression != null) {
-                dig.update(expression);
-            }
-        } catch (NoSuchAlgorithmException ex) {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine(ex.toString());
-            }
-        }
-    }
-
-    /**
-     * Constructor for the JxtaHash object
-     *
-     * @param  expression  expression to digest
-     */
-    public void update(String expression) {
-        if (expression != null) {
-            dig.update(expression.getBytes());
-        }
-    }
-
-    /**
-     *  Gets the digest as digestInteger
-     *
-     * @return    The digestInteger value
-     */
-    public BigInteger getDigestInteger() {
-
-        return new BigInteger(dig.digest());
-    }
-
-    /**
-     *  Gets the digest as digestInteger
-     *
-     * @param  expression  expression to digest
-     * @return             The digestInteger value
-     */
-    public BigInteger getDigestInteger(byte[] expression) {
-        dig.reset();
-        dig.update(expression);
-        return new BigInteger(dig.digest());
-    }
-
-    /**
-     *  Gets the digest as digestInteger
-     *
-     * @param  expression  expression to digest
-     * @return             The digestInteger value
-     */
-    public BigInteger getDigestInteger(String expression) {
-
-        return getDigestInteger(expression.getBytes());
-    }
-
-    /**
-     *   Returns a int whose value is (getDigestInteger mod m).
-     *
-     * @param  m  the modulus.
-     * @return    (getDigestInteger mod m).
-     */
-    public int mod(long m) {
-        BigInteger bi = getDigestInteger();
-        BigInteger mod = new BigInteger(longToBytes(m));
-        BigInteger result = bi.mod(mod);
-
-        return result.intValue();
-    }
-
-    /**
-     *  convert a long into the byte array
-     *
-     * @param  value  long value to convert
-     * @return        byte array
-     */
-    private byte[] longToBytes(long value) {
-        byte[] bytes = new byte[8];
-
-        for (int eachByte = 0; eachByte < 8; eachByte++) {
-            bytes[eachByte] = (byte) (value >> ((7 - eachByte) * 8L));
-        }
-        return bytes;
-    }
-
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/LRUCache.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/LRUCache.java
deleted file mode 100644 (file)
index e48ee64..0000000
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- *  Copyright 1999-2004 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package net.jxta.impl.util;
-
-import java.util.Iterator;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * This class implements a Generic LRU Cache. The cache is not thread-safe.
- *
- * @author Ignacio J. Ortega
- * @author Mohamed Abdelaziz
- */
-
-public class LRUCache<K, V> {
-
-    private final transient int cacheSize;
-    private transient int currentSize;
-    private transient CacheNode<K, V> first;
-    private transient CacheNode<K, V> last;
-    private final transient Map<K, CacheNode<K, V>> nodes;
-
-    /**
-     * Constructor for the LRUCache object
-     *
-     * @param size Description of the Parameter
-     */
-    public LRUCache(int size) {
-        currentSize = 0;
-        cacheSize = size;
-        nodes = new HashMap<K, CacheNode<K, V>>(size);
-    }
-
-    /**
-     * clear the cache
-     */
-    public void clear() {
-        first = null;
-        last = null;
-        nodes.clear();
-        currentSize = 0;
-    }
-
-    /**
-     * returns the number of elements currently in cache
-     *
-     * @return the number of elements in cache
-     */
-    public int size() {
-        return currentSize;
-    }
-
-    /**
-     * retrieve an object from cache
-     *
-     * @param key key
-     * @return object
-     */
-    public V get(K key) {
-        CacheNode<K, V> node = nodes.get(key);
-
-        if (node != null) {
-            moveToHead(node);
-            return node.value;
-        }
-        return null;
-    }
-
-    public boolean contains(K key) {
-        return nodes.keySet().contains(key);
-    }
-
-    protected Iterator<V> iterator(int size) {
-        List<V> list = new ArrayList<V>();
-
-        for (CacheNode<K, V> node : nodes.values()) {
-            list.add(node.value);
-            if (list.size() >= size) {
-                break;
-            }
-        }
-        return list.iterator();
-    }
-
-    private void moveToHead(CacheNode<K, V> node) {
-        if (node == first) {
-            return;
-        }
-        if (node.prev != null) {
-            node.prev.next = node.next;
-        }
-        if (node.next != null) {
-            node.next.prev = node.prev;
-        }
-        if (last == node) {
-            last = node.prev;
-        }
-        if (first != null) {
-            node.next = first;
-            first.prev = node;
-        }
-        first = node;
-        node.prev = null;
-        if (last == null) {
-            last = first;
-        }
-    }
-
-    /**
-     * puts an object into cache
-     *
-     * @param key   key to store value by
-     * @param value object to insert
-     */
-    public void put(K key, V value) {
-        CacheNode<K, V> node = nodes.get(key);
-
-        if (node == null) {
-            if (currentSize >= cacheSize) {
-                if (last != null) {
-                    nodes.remove(last.key);
-                }
-                removeLast();
-            } else {
-                currentSize++;
-            }
-            node = new CacheNode<K, V>(key, value);
-        }
-        node.value = value;
-        moveToHead(node);
-        nodes.put(key, node);
-    }
-
-    /**
-     * remove an object from cache
-     *
-     * @param key key
-     * @return Object removed
-     */
-    public V remove(K key) {
-        CacheNode<K, V> node = nodes.get(key);
-
-        if (node != null) {
-            if (node.prev != null) {
-                node.prev.next = node.next;
-            }
-            if (node.next != null) {
-                node.next.prev = node.prev;
-            }
-            if (last == node) {
-                last = node.prev;
-            }
-            if (first == node) {
-                first = node.next;
-            }
-        }
-        if (node != null) {
-            return node.value;
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * removes the last entry from cache
-     */
-    private void removeLast() {
-        if (last != null) {
-            if (last.prev != null) {
-                last.prev.next = null;
-            } else {
-                first = null;
-            }
-            last = last.prev;
-        }
-    }
-
-    /**
-     * cache node object wrapper
-     */
-    protected class CacheNode<K, V> {
-        final K key;
-        CacheNode<K, V> next;
-
-        CacheNode<K, V> prev;
-        V value;
-
-        /**
-         * Constructor for the CacheNode object
-         *
-         * @param key   key
-         * @param value value
-         */
-        CacheNode(K key, V value) {
-            this.key = key;
-            this.value = value;
-        }
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/ModuleManager.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/ModuleManager.java
deleted file mode 100644 (file)
index 81fb365..0000000
+++ /dev/null
@@ -1,655 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util;
-
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.io.IOException;
-
-import net.jxta.platform.Module;
-import net.jxta.platform.ModuleClassID;
-import net.jxta.platform.ModuleSpecID;
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Element;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.StructuredDocumentUtils;
-import net.jxta.document.TextElement;
-import net.jxta.protocol.ModuleClassAdvertisement;
-import net.jxta.protocol.ModuleImplAdvertisement;
-import net.jxta.protocol.ModuleSpecAdvertisement;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.id.IDFactory;
-
-
-/**
- * Module Manager.
- *
- * This class allows to manage modules to be loaded, started and stopped
- * within a PeerGroup. Modules that are loaded using the ModuleManager do not need
- * to be listed within the PeerGroup advertisement, nor do they have to have
- * published their ModuleSpec and ModuleImpl advertisements: the ModuleManager
- * takes care of this task. However, other peers which may want to load the Module
- * will also have to use its own loader (or the ModuleManager itself, of course):
- * the ModuleManager only manages Modules on the local peer.
- *
- * The Module Manager allows, as an option, to use an application provided class loader.
- * The default class loader is the PeerGroup class loader.
- *
- * The following example shows how to use the ModuleManager:
- *
- *
- * <pre>
- *      // Get the peergroup
- *      PeerGroup group = getMyPeerGroup();
- *      // Get the ModuleManager
- *      ModuleManager moduleManager = ModuleManager.getModuleManager (group);
- *
- *      // Is the Module already loaded ?
- *      Module module = moduleManager.lookupModule ("SampleModule");
- *      if (module == null) {
- *          // SampleModue is not loaded yet. Load it now.
- *          module = moduleManager.loadModule ( "SampleModule", "net.jxta.app.SampleModule.SampleModule");
- *      }
- *
- *      // Start SampleModule
- *      moduleManager.startModule ("SampleModule", moduleArgs);
- * </pre>
- */
-
-public class ModuleManager {
-
-    private static Hashtable<PeerGroupID, ModuleManager> managers = null;
-    private static long LOCAL_ADV_TTL = 5 * 60 * 1000;
-    // 5 minutes is more than sufficient
-    private static long REMOTE_ADV_TTL = 0;
-    // We do not allow remote access of the advertisements.
-
-    private final Hashtable<String, ModuleDesc> modules = new Hashtable<String, ModuleDesc>();
-    private final PeerGroup group;
-
-    /**
-     * Private constructor that allows to create an instance of the Module Manager for each
-     * PeerGroup.
-     *
-     * @param  group  the PeerGroup for which the ModuleManager needs to allocated a new instance
-     * of itself.
-     */
-    private ModuleManager(PeerGroup group) {
-        this.group = group;
-    }
-
-    /**
-     * startModule
-     *
-     * This method is invoked by the application to start a previously loaded
-     * module.
-     *
-     * @param  moduleName  is the symbolic name of the module.
-     * @param  args        is an array of String containing optional arguments for the module. This
-     * array is passed directly to the startApp (String[] ) method of the Module.
-     */
-    public void startModule(String moduleName, String[] args) {
-
-        ModuleDesc moduleDesc = modules.get(moduleName);
-
-        if (moduleDesc == null) {
-            // Cannot find such a module
-            return;
-        }
-        moduleDesc.startApp(args);
-    }
-
-    /**
-     * stopModule
-     *
-     * This method is invoked by the application to stop a running module.
-     *
-     * @param  moduleName  is the symbolic name of the module.
-     */
-    public void stopModule(String moduleName) {
-
-        ModuleDesc moduleDesc = modules.get(moduleName);
-
-        if (moduleDesc == null) {
-            // Cannot find such a module
-            return;
-        }
-        moduleDesc.stopApp();
-    }
-
-    /**
-     * getModuleManager
-     *
-     * This method is used in order to get the instance of the ModuleManager for a given
-     * PeerGroup. getModuleManager will create a new instance automatically if there is no
-     * instance for the given PeerGroup.
-     *
-     * @param  group  the PeerGroup for which the ModuleManager is asked.
-     * @return        the ModuleManager instance for the given PeerGroup.
-     */
-    public static ModuleManager getModuleManager(PeerGroup group) {
-
-        if (managers == null) {
-            // This is the first time the ModuleManager is invoked. Create
-            // the Hashtable
-            managers = new Hashtable<PeerGroupID, ModuleManager>();
-        }
-        ModuleManager manager;
-
-        manager = managers.get(group.getPeerGroupID());
-
-        if (manager == null) {
-            manager = new ModuleManager(group);
-            managers.put(group.getPeerGroupID(), manager);
-        }
-        return manager;
-    }
-
-    /**
-     *  Description of the Method
-     *
-     * @param  moduleName  Description of the Parameter
-     * @param  module      Description of the Parameter
-     * @return             Description of the Return Value
-     */
-    private synchronized boolean registerModule(String moduleName, Module module) {
-
-        ModuleDesc moduleDesc = modules.get(moduleName);
-
-        if (moduleDesc != null) {
-            // There is already a module registered to that name.
-            return false;
-        }
-        moduleDesc = new ModuleDesc(module);
-        modules.put(moduleName, moduleDesc);
-        return true;
-    }
-
-    /**
-     * lookupModule
-     *
-     * Get the Module from its symbolic name.
-     *
-     * @param  moduleName  symbolic name of the Module
-     * @return             the Module for the given name. null is returned if there is no module
-     * of the given name.
-     */
-    public synchronized Module lookupModule(String moduleName) {
-
-        ModuleDesc moduleDesc = modules.get(moduleName);
-
-        if (moduleDesc == null) {
-            // There is not any module registered to that name.
-            return null;
-        }
-        return moduleDesc.module;
-    }
-
-    /**
-     * loadModule
-     *
-     * Loads a Module. A class loaded is provided by the application.
-     * If the module has already been loaded, the existing Module is returned.
-     *
-     * @param  moduleName  symbolic name of the Module
-     * @param  loader      application provided class loader
-     * @return             the Module for the given name. null is returned if the module could not be
-     * loaded
-     */
-
-    public synchronized Module loadModule(String moduleName, ModuleManagerLoader loader) {
-
-        // First check if the module is already loaded and registered
-        Module module = lookupModule(moduleName);
-
-        if (module != null) {
-            return module;
-        }
-        module = loader.loadModule(moduleName);
-        if (module != null) {
-            // Since this module is not started by the standard
-            // JXTA PeerGroup, we need to initialize ourself.
-            // Note that the ID and the ModuleImplAdvertisement is
-            // then set to null, which is fine, since that has been
-            // the decision from the application to actually not use
-            // the standard PeerGroup Module loading scheme.
-            try {
-                module.init(group, null, null);
-            } catch (Exception e) {
-                // Init failed, the module cannot be initialized
-                return null;
-            }
-            registerModule(moduleName, module);
-        }
-        return module;
-    }
-
-    /**
-     * loadModule
-     *
-     * Loads a Module. The default PeerGroup class loader will be used. The class
-     * must be within the CLASSPATH of the platform.
-     * If the module has already been loaded, the existing Module is returned.
-     *
-     * @param  moduleName  symbolic name of the Module
-     * @param  moduleCode  the name of the class to be loaded.
-     * @return             the Module for the given name. null is returned if the module could not be
-     * loaded
-     */
-    public synchronized Module loadModule(String moduleName, String moduleCode) {
-
-        // First check if the module is already loaded and registered
-        Module module = lookupModule(moduleName);
-
-        if (module != null) {
-            return module;
-        }
-
-        if (!createModuleAdvs(moduleName, null, moduleCode, null, LOCAL_ADV_TTL, REMOTE_ADV_TTL)) {
-
-            // Creation of the module advertisement has failed.
-            return null;
-        }
-        // Get the module. This should always work since the advertisements have
-        // just been created.
-        module = loadModule(moduleName);
-        if (module == null) {
-            // There is really nothing more we can do here.
-            return null;
-        }
-        return module;
-    }
-
-    /**
-     *  Description of the Method
-     *
-     * @param  moduleName  Description of the Parameter
-     * @return             Description of the Return Value
-     */
-    private synchronized Module loadModule(String moduleName) {
-
-        // First check if the module is already loaded and registered
-        Module module = lookupModule(moduleName);
-
-        if (module != null) {
-            return module;
-        }
-
-        try {
-            // Recover the ModuleClassAdvertisement
-            Enumeration each = group.getDiscoveryService().getLocalAdvertisements(DiscoveryService.ADV, "Name", moduleName);
-
-            if (!each.hasMoreElements()) {
-                // No advertisement.
-                return null;
-            }
-
-            ModuleClassAdvertisement mcAdv = null;
-
-            while (each.hasMoreElements()) {
-                try {
-                    mcAdv = (ModuleClassAdvertisement) each.nextElement();
-                    break;
-                } catch (Exception ez1) {// ignored
-                }
-            }
-
-            // Revover the Module Specification Advertisement
-            each = group.getDiscoveryService().getLocalAdvertisements(DiscoveryService.ADV, "Name", moduleName);
-            if (!each.hasMoreElements()) {
-                return null;
-            }
-
-            ModuleSpecAdvertisement mSpecAdv = null;
-
-            while (each.hasMoreElements()) {
-                try {
-                    mSpecAdv = (ModuleSpecAdvertisement) each.nextElement();
-                    break;
-                } catch (Exception ez1) {// ignored
-                }
-            }
-
-            module = group.loadModule(mcAdv.getModuleClassID(), mSpecAdv.getModuleSpecID(), PeerGroup.Here);
-
-            if (module != null) {
-                registerModule(moduleName, module);
-            }
-            return module;
-        } catch (Exception ez2) {
-            return null;
-        }
-    }
-
-    /**
-     *  Description of the Method
-     *
-     * @param  moduleName     Description of the Parameter
-     * @param  moduleSpecURI  Description of the Parameter
-     * @param  moduleCode     Description of the Parameter
-     * @param  moduleCodeURI  Description of the Parameter
-     * @param  localTTL       Description of the Parameter
-     * @param  remoteTTL      Description of the Parameter
-     * @return                Description of the Return Value
-     */
-    private boolean createModuleAdvs(String moduleName, String moduleSpecURI, String moduleCode, String moduleCodeURI, long localTTL, long remoteTTL) {
-
-        DiscoveryService disco = group.getDiscoveryService();
-
-        try {
-            // First create the Module class advertisement associated with the module
-            // We build the module class advertisement using the advertisement
-            // Factory class by passing it the type of the advertisement we
-            // want to construct. The Module class advertisement is to be used
-            // to simply advertise the existence of the module. This is a
-            // a very small advertisement that only advertise the existence
-            // of module. In order to access the module, a peer will
-            // have to discover the associated module spec advertisement.
-
-            ModuleClassAdvertisement mcadv = (ModuleClassAdvertisement)
-                    AdvertisementFactory.newAdvertisement(ModuleClassAdvertisement.getAdvertisementType());
-
-            mcadv.setName(moduleName);
-            mcadv.setDescription("Created by ModuleManager: " + moduleName);
-
-            ModuleClassID mcID = IDFactory.newModuleClassID();
-
-            mcadv.setModuleClassID(mcID);
-
-            // Ok the Module Class advertisement was created, just publish
-            // it in my local cache and to my peergroup. This
-            // is the NetPeerGroup
-            disco.publish(mcadv, localTTL, remoteTTL);
-
-            // Create the Module Spec advertisement associated with the module
-            // We build the module Spec Advertisement using the advertisement
-            // Factory class by passing in the type of the advertisement we
-            // want to construct. The Module Spec advertisement will contain
-            // all the information necessary for a client to contact the module
-            // for instance it will contain a pipe advertisement to
-            // be used to contact the module
-
-            ModuleSpecAdvertisement mdadv = (ModuleSpecAdvertisement)
-                    AdvertisementFactory.newAdvertisement(ModuleSpecAdvertisement.getAdvertisementType());
-
-            // ModuleManager does not allow to set up any customized
-            // information for the Module.
-
-            mdadv.setName(moduleName);
-            mdadv.setCreator("jxta.org");
-            mdadv.setModuleSpecID(IDFactory.newModuleSpecID(mcID));
-
-            if (moduleSpecURI != null) {
-                mdadv.setSpecURI(moduleSpecURI);
-            }
-
-            // Ok the Module advertisement was created, just publish
-            // it in my local cache and into the NetPeerGroup.
-            disco.publish(mdadv, localTTL, remoteTTL);
-
-            // Create the Module Implementation advertisement
-            ModuleImplAdvertisement miadv = (ModuleImplAdvertisement)
-                    AdvertisementFactory.newAdvertisement(ModuleImplAdvertisement.getAdvertisementType());
-
-            miadv.setModuleSpecID(mdadv.getModuleSpecID());
-            if (moduleCode != null) {
-                miadv.setCode(moduleCode);
-            }
-
-            if (moduleCodeURI != null) {
-                miadv.setUri(moduleCodeURI);
-            }
-            miadv.setDescription("Created by ModuleManager: " + moduleName);
-
-            // Steal the compat, provider, and uri from the
-            // group's own impl adv. We DO want them identical in
-            // this case.
-            ModuleImplAdvertisement pgImpl = (ModuleImplAdvertisement) group.getImplAdvertisement();
-
-            miadv.setCompat(pgImpl.getCompat());
-            miadv.setUri(pgImpl.getUri());
-
-            // Ok the Module Class advertisement was created, just publish
-            // it in my local cache and to my peergroup. This
-            // is the NetPeerGroup
-            disco.publish(miadv, localTTL, remoteTTL);
-        } catch (Exception ex) {
-            return false;
-        }
-        return true;
-    }
-
-    // FIXME this method should be refactored
-    /**
-     *  Creates a Module Class, Spec, and Impl advertisements, and adds the service
-     *  Advertisement as part of the Module Impl Advertisement, and publishes the advertisements
-     *  in local cache
-     *
-     * @param  group            group 
-     * @param  moduleName       module name
-     * @param  description      module description 
-     * @param  moduleSpecURI    module spec uri
-     * @param  moduleCode       module code
-     * @param  moduleCodeURI    module code uri 
-     * @param  mcID             module class id
-     * @param  msID             module spec id
-     * @param code              module code
-     * @param  serviceAdv       service advertisement
-     * @param  localTTL         local cache lifetime in ms
-     * @param  remoteTTL        remote cache lifetime in ms
-     * @exception  IOException  if an io error occurs
-     */
-    public void createServiceAdvertisement(PeerGroup group, String moduleName, String description, String moduleSpecURI, String moduleCode, String moduleCodeURI, ModuleClassID mcID, ModuleSpecID msID, String code, Advertisement serviceAdv, long localTTL, long remoteTTL) throws IOException {
-
-        DiscoveryService discovery = group.getDiscoveryService();
-        // Create module class advertisement
-        ModuleClassAdvertisement mcadv = (ModuleClassAdvertisement)
-                AdvertisementFactory.newAdvertisement(ModuleClassAdvertisement.getAdvertisementType());
-
-        mcadv.setModuleClassID(mcID);
-        mcadv.setName(moduleName);
-        mcadv.setDescription(description);
-
-        // Module spec advertisement
-        ModuleSpecAdvertisement mdspec = (ModuleSpecAdvertisement)
-                AdvertisementFactory.newAdvertisement(ModuleSpecAdvertisement.getAdvertisementType());
-
-        mdspec.setModuleSpecID(msID);
-        mdspec.setName(moduleName);
-        mdspec.setSpecURI(moduleSpecURI);
-
-        // Module implementation advertisement
-        ModuleImplAdvertisement miadv = (ModuleImplAdvertisement)
-                AdvertisementFactory.newAdvertisement(ModuleImplAdvertisement.getAdvertisementType());
-
-        miadv.setModuleSpecID(mdspec.getModuleSpecID());
-        miadv.setDescription(description);
-        if (moduleCodeURI != null) {
-            miadv.setUri(moduleCodeURI);
-        }
-        if (moduleCode != null) {
-            miadv.setCode(moduleCode);
-        }
-        // Steal the compat, provider, and uri from the
-        // group's own impl adv. We DO want them identical in
-        // this case.
-        ModuleImplAdvertisement pgImpl = (ModuleImplAdvertisement) group.getImplAdvertisement();
-
-        miadv.setCompat(pgImpl.getCompat());
-        miadv.setCode(code);
-        Element pEl = (Element) serviceAdv.getDocument(MimeMediaType.XMLUTF8);
-        StructuredDocument svcParm = StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, "Parm");
-
-        StructuredDocumentUtils.copyElements(svcParm, svcParm, pEl);
-        miadv.setParam(svcParm);
-        // publish the advertisements
-        discovery.publish(mcadv, localTTL, remoteTTL);
-        discovery.publish(mdspec, localTTL, remoteTTL);
-        discovery.publish(miadv, localTTL, remoteTTL);
-    }
-
-    /**
-     *  Retreives a Service Advertisement from a module impl advertisement
-     * @param  group             peer group
-     * @param  mia               ModuleImplAdvertisement
-     * @param  advertismentType  service advertisment string Type
-     * @return                   The service Advertisement 
-     * @exception  IOException   if an io error occurs
-     */
-    public Advertisement getServiceAdvertisement(PeerGroup group, ModuleImplAdvertisement mia, String advertismentType) throws IOException {
-        Element param = mia.getParam();
-        Element pel = null;
-
-        if (param != null) {
-            Enumeration list = param.getChildren(advertismentType);
-
-            if (list.hasMoreElements()) {
-                pel = (Element) list.nextElement();
-            }
-        }
-        Advertisement adv = AdvertisementFactory.newAdvertisement((TextElement) pel);
-
-        return adv;
-    }
-
-    /**
-     *  Description of the Class
-     */
-    private class ModuleDesc {
-
-        /**
-         *  Description of the Field
-         */
-        protected Module module = null;
-        private boolean started = false;
-        private boolean stopped = true;
-
-        /**
-         *Constructor for the ModuleDesc object
-         *
-         * @param  module  Description of the Parameter
-         */
-        public ModuleDesc(Module module) {
-            this.module = module;
-        }
-
-        /**
-         *  Description of the Method
-         *
-         * @param  args  Description of the Parameter
-         */
-        public void startApp(String[] args) {
-            if (module == null) {
-                return;
-            }
-            if (started) {
-                // Already started - nothing to do
-                return;
-            }
-            module.startApp(args);
-            started = true;
-            stopped = false;
-        }
-
-        /**
-         *  Description of the Method
-         */
-        public void stopApp() {
-            if (module == null) {
-                return;
-            }
-            if (stopped) {
-                // Already stopped - nothing to do
-                return;
-            }
-            module.stopApp();
-            stopped = true;
-            started = false;
-        }
-    }
-
-
-    /**
-     * ModuleManagerLoader interface.
-     * This interface is used by the application in order to provide its own
-     * class loader instead of using the standard PeerGroup loader.
-     */
-
-    public interface ModuleManagerLoader {
-
-        /**
-         * This method is invoked by the ModuleManager when it is time to load
-         * the class associated to the module. The name of the module is provided,
-         * which allows the application provided loader to be able to load a variety
-         * of modules, if that is necessary for the application. Note that the ModuleManager
-         * assumes that the module which is loaded by the provided loader is not started:
-         * loading and starting a module are two different operations for the ModuleManager.
-         *
-         * @param  moduleName  is the symbolic name of the Module.
-         * @return             Module the object that has been loaded.
-         */
-        public Module loadModule(String moduleName);
-    }
-
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/ProducerBiasedQueue.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/ProducerBiasedQueue.java
deleted file mode 100644 (file)
index 084276d..0000000
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util;
-
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-import java.util.List;
-import java.util.ArrayList;
-
-import net.jxta.impl.util.TimeUtils;
-
-
-/**
- *  A queue who's implementation is biased towards effciency in adding elements
- *  to the queue.
- *
- *  @deprecated Please convert all code to use the java.util.concurrent BlockingQueue instead.
- *
- **/
-@Deprecated
-public class ProducerBiasedQueue extends UnbiasedQueue {
-    
-    /**
-     *  Log4J
-     **/
-    private static final Logger LOG = Logger.getLogger(ProducerBiasedQueue.class.getName());
-    
-    /**
-     * Default constructor. 100 element FIFO queue which drops oldest element
-     * when full.
-     */
-    public ProducerBiasedQueue() {
-        this(DEFAULT_MAX_OBJECTS, DROP_OLDEST_OBJECT);
-    }
-    
-    /**
-     * Full featured constructor for creating a new ConsumerBiasedQueue.
-     *
-     * @param size    Queue will be not grow larger than this size. Use
-     *    Integer.MAX_VALUE for "unbounded" queue size.
-     * @param dropOldest  Controls behaviour of element insertion when the queue is
-     * full. If "true" and the queue is full upon a push operation then the
-     * oldest element will be dropped to be replaced with the element currently
-     * being pushed. If "false" then then newest item will be dropped.
-     */
-    public ProducerBiasedQueue(int size, boolean dropOldest) {
-        super(size, dropOldest, new ArrayList<Object>());
-    }
-    
-    /**
-     *  Flush the queue of all pending objects.
-     **/
-    @Override
-    public void clear() {
-        synchronized (queue) {
-            super.clear();
-        }
-    }
-    
-    @Override
-    public boolean push(Object obj) {
-        synchronized (queue) {
-            boolean pushed;
-
-            pushed = super.push(obj);
-            queue.notify(); // inform someone who is waiting. we dont have to tell everyone though.
-            return pushed;
-        }
-    }
-    
-    /* The pop methods of this queue, unlike the "push" method. This creates a
-     *  bottleneck for producers seperate from the primary lock on the "queue"
-     *  member. This reduces contention on the primary lock which benefits users
-     *  who are popping items from the queue (Consumers).
-     *
-     */
-    
-    /**
-     * Return next obj in the queue if there is one.
-     *
-     * @return Object, null if the queue is empty
-     **/
-    @Override
-    public synchronized Object pop() {
-        synchronized (queue) {
-            return super.pop();
-        }
-    }
-    
-    /**
-     * Gets a Object from the queue. If no Object is immediately available,
-     * then wait the specified amount of time. Per Java convention, a timeout
-     * of zero (0) means wait an infinite amount of time. Negative values mean
-     * do not wait at all.
-     *
-     * @param timeout amount of time to wait in milliseconds for an object to
-     * be available. Per Java convention, a timeout of zero (0) means wait an
-     * infinite amount of time. Negative values mean do not wait at all.
-     * @return The next object in the queue.
-     * @throws InterruptedException    if the operation is interrupted before
-     *     the timeout interval is completed.
-     */
-    @Override
-    public synchronized Object pop(long timeout) throws InterruptedException {
-        synchronized (queue) {
-            return super.pop(timeout);
-        }
-    }
-    
-    /**
-     *  Returns an array of objects, possibly empty, from the queue.
-     *
-     *  @param maxObjs  the maximum number of items to return.
-     *  @return an array of objects, possibly empty containing the returned
-     *  queue elements.
-     **/
-    @Override
-    public synchronized Object[] popMulti(int maxObjs) {
-        synchronized (queue) {
-            return super.popMulti(maxObjs);
-        }
-    }
-    
-    /**
-     *  Set how many objects this queue may store. Note that if there are more
-     *  objects already in the queue than the specified amount then the queue
-     *  will retain its current capacity.
-     *
-     *  @param maxObjs  The number of objects which the queue must be able to
-     *  store.
-     **/
-    @Override
-    public void setMaxQueueSize(int maxObjs) {
-        synchronized (queue) {
-            super.setMaxQueueSize(maxObjs);
-        }
-    }
-    
-    /**
-     *  Return the number of elements currently in the queue. This method is
-     *  useful for statistical sampling, but should not be used to determine
-     *  program logic due to the multi-threaded behaviour of these queues. You
-     *  should use the return values and timeout behaviour of the push() and
-     * pop() methods to regulate how you use the queue.
-     *
-     *  @return the number of elements currently in the queue. Be warned that
-     *  even two sequential calls to this method may return different answers
-     *  due to activity on other threads.
-     *
-     **/
-    @Override
-    public int getCurrentInQueue() {
-        synchronized (queue) {
-            return super.getCurrentInQueue();
-        }
-    }
-    
-    /**
-     *  Return the average number of elements in the queue at Enqueue time.
-     *
-     *  @return average number of elements which were in the queue at during all
-     *  of the "push" operations which returned a "true" result. Does not
-     *  include the item being pushed. If no elements have ever been enqueued
-     *  then "NaN" will be returned.
-     **/
-    @Override
-    public double getAvgInQueueAtEnqueue() {
-        synchronized (queue) {
-            return super.getAvgInQueueAtEnqueue();
-        }
-    }
-    
-    /**
-     *  Return the average number of elements in the queue at dequeue time.
-     *
-     *  @return average number of elements which were in the queue at during all
-     *  of the "pop" operations which returned a non-null result. Includes the
-     * item being "pop"ed in the average. If no elements have ever been dequeued
-     *  then "NaN" will be returned.
-     **/
-    @Override
-    public double getAvgInQueueAtDequeue() {
-        synchronized (queue) {
-            return super.getAvgInQueueAtDequeue();
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/RdvAdvSeedingManager.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/RdvAdvSeedingManager.java
deleted file mode 100644 (file)
index 7f0cdbd..0000000
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * Copyright (c) 2002-2004 Sun Microsystems, Inc.  All rights reserved.
- *
- *  The Sun Project JXTA(TM) Software License
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *
- *  3. The end-user documentation included with the redistribution, if any, must
- *     include the following acknowledgment: "This product includes software
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology."
- *     Alternately, this acknowledgment may appear in the software itself, if
- *     and wherever such third-party acknowledgments normally appear.
- *
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must
- *     not be used to endorse or promote products derived from this software
- *     without prior written permission. For written permission, please contact
- *     Project JXTA at http://www.jxta.org.
- *
- *  5. Products derived from this software may not be called "JXTA", nor may
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United
- *  States and other countries.
- *
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of
- *  the license in source files.
- *
- *  ====================================================================
- *
- *  This software consists of voluntary contributions made by many individuals
- *  on behalf of Project JXTA. For more information on Project JXTA, please see
- *  http://www.jxta.org.
- *
- *  This license is based on the BSD license adopted by the Apache Foundation.
- */
-
-package net.jxta.impl.util;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Advertisement;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.logging.Logging;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.protocol.RdvAdvertisement;
-import net.jxta.protocol.RouteAdvertisement;
-
-/**
- * Adds the ability to discover RdvAdvs via Discovery.
- */
-public class RdvAdvSeedingManager extends ACLSeedingManager {
-    
-    /**
-     *  Logger
-     */
-    private static final transient Logger LOG = Logger.getLogger(URISeedingManager.class.getName());
-    
-    /**
-     *  The minimum frequence at which we will update our seed lists.
-     */
-    final static long MIN_REFRESH_INTERVAL = 30 * TimeUtils.ASECOND;
-    
-    /**
-     *  Group who's services we will utilize.
-     */
-    final PeerGroup group;
-    
-    /**
-     *  The identifier which we use to distinguish our RdvAdvertisements.
-     */
-    final String serviceName;
-    
-    /**
-     *  The absolute time in milliseconds at which we may sen our next remote
-     *  discovery.
-     */
-    long nextRemoteDiscovery = 0;
-    
-    /**
-     *  The Route Advertisements we have discovered.
-     */
-    final List<RouteAdvertisement> discoveredRoutes = new ArrayList<RouteAdvertisement>();
-    
-    /**
-     * Creates a new instance of RdvAdvSeedingManager
-     *
-     * @param aclLocation The location of the ACL file or {@code null} if no
-     * ACL file should be used.
-     */
-    public RdvAdvSeedingManager(URI aclLocation, PeerGroup group, String serviceName) {
-        super(aclLocation);
-        
-        this.group = group;
-        this.serviceName = serviceName;
-    }
-    
-    /**
-     *  Update seeds
-     */
-    private void refreshActiveSeeds() {
-        DiscoveryService discovery = group.getDiscoveryService();
-        
-        if((null != discovery) && (TimeUtils.timeNow() > nextRemoteDiscovery)) {
-            // Send a remote search hoping for future responses.
-            discovery.getRemoteAdvertisements(null, DiscoveryService.ADV, RdvAdvertisement.ServiceNameTag, serviceName, 3);
-            
-            Enumeration<Advertisement> advs;
-            try {
-                advs = discovery.getLocalAdvertisements(DiscoveryService.ADV, RdvAdvertisement.ServiceNameTag, serviceName);
-            } catch( IOException failed ) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failure retrieving advertisements" , failed);
-                }
-                
-                return;
-            }
-            
-            synchronized(this) {
-                discoveredRoutes.clear();
-                
-                while(advs.hasMoreElements()) {
-                    Advertisement anAdv = advs.nextElement();
-                    if(!(anAdv instanceof RdvAdvertisement)) {
-                        continue;
-                    }
-                    
-                    RdvAdvertisement rdvAdv = (RdvAdvertisement) anAdv;
-                    RouteAdvertisement routeAdv = rdvAdv.getRouteAdv();
-                    routeAdv.setDestPeerID(rdvAdv.getPeerID());
-                    
-                    discoveredRoutes.add(routeAdv);
-                }
-                
-                Collections.shuffle(discoveredRoutes);
-                
-                if(discoveredRoutes.isEmpty()) {
-                    // Be extra aggressive if we haven't found anything yet.
-                    nextRemoteDiscovery = TimeUtils.toAbsoluteTimeMillis(MIN_REFRESH_INTERVAL / 2);
-                } else {
-                    nextRemoteDiscovery = TimeUtils.toAbsoluteTimeMillis(MIN_REFRESH_INTERVAL);
-                }
-            }
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public void stop() { 
-        // do nothing.
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public synchronized URI[] getActiveSeedURIs() {
-        refreshActiveSeeds();        
-
-        List<URI> results = new ArrayList<URI>();
-        
-        int eaIndex = 0;
-        boolean addedEA;
-        
-        do {
-            addedEA = false;
-            
-            for (RouteAdvertisement aRA : discoveredRoutes) {
-                List<EndpointAddress> raEAs = aRA.getDestEndpointAddresses();
-                if (eaIndex < raEAs.size()) {
-                    URI seedURI = raEAs.get(eaIndex).toURI();
-                    if(!results.contains(seedURI)) {
-                        results.add(seedURI);
-                    }
-                    addedEA = true;
-                }
-            }
-            
-            // Next loop we use the next most preferred address.
-            eaIndex++;
-        } while (addedEA);
-        
-        return results.toArray(new URI[results.size()]);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public synchronized RouteAdvertisement[] getActiveSeedRoutes() {
-        refreshActiveSeeds();        
-
-        List<RouteAdvertisement> results = new ArrayList<RouteAdvertisement>();
-        
-        for( RouteAdvertisement eachRoute : discoveredRoutes ) {
-            if(!results.contains(eachRoute)) {
-                results.add(eachRoute);
-            }
-        }
-        
-        return results.toArray(new RouteAdvertisement[results.size()]);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/ResourceAccount.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/ResourceAccount.java
deleted file mode 100644 (file)
index b505ebb..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util;
-
-
-/**
- *  A descriptor for a resource consumser. The resource consumer's resource
- *  allocation and dynamic usage is tracked.
- */
-public interface ResourceAccount {
-    
-    /**
-     * Tear down this account.
-     * Releases all reserved resources.
-     */
-    public void close();
-    
-    /**
-     * Try and grant a new item to this account. If it cannot be done,
-     * the account may be eligible for the next available extra item.
-     * The account is automatically set to be in need, as if inNeed(true)
-     * has been invoked.
-     *
-     * @return boolean true if an item was granted, false otherwise.
-     */
-    public boolean obtainItem();
-    
-    /**
-     * Try and grant a certain quantity.
-     *
-     * <p/>It is useful to manage the allocation of variable sized aggregates
-     * when what matters is the cummulated quantity rather than an item
-     * count. Quantity could be a number of bytes needed to store
-     * something for example. The advantage of using this method rather
-     * than obtainItem repeatedly is that it is obvisouly faster if
-     * quantity is more than one or two, and also that it is atomic;
-     * the entire quantity is either granted or denied.
-     * Using this routine is by definition incompatible with the round-robin
-     * mode, which could only re-assign quantities of 1.
-     *
-     * <p/>It is legal to use this routine along with round-robin mode if the
-     * same dispatcher is used to manage quantities of 1 in this manner,
-     * but an account that has failed to obtain its desired quantity is
-     * not queued for later re-assignment. And items released with
-     * releaseQuantity() are not re-assigned, so overall it is
-     * probably best to not mix the two.
-     *
-     * @param quantity The number of units wanted. The unit is arbitrary
-     * It is only meaningfull to the code that uses this dispatcher.
-     * @return boolean whether the requested quantity is authorized.
-     */
-    public boolean obtainQuantity(long quantity);
-    
-    /**
-     * This will release an item and return the most eligible account to
-     * re-use this item for. The account that is returned has been granted
-     * the item and thus the invoker is expected to do with this account
-     * whatever an invoker of obtainItem() would do in case of success.
-     * If the items that are managed are threads, the invoker is
-     * likely to be one these threads and it should therefore process
-     * the returned account as it did the one for which it was calling
-     * releaseItem, however be very carefull not to process the new account
-     * in the context of the old one; that would rapidly lead to stack
-     * overflow. In other words, be carefull of not making a construct
-     * equivalent to:
-     *
-     * <p/><pre>
-     * process() {
-     *   doStuff();
-     *   myAccount.releaseItem().getUserObject().process();
-     * }
-     * </pre>
-     *
-     * That won't work. Instead do:
-     *
-     * <p/><pre>
-     * work() {
-     *  while (myAccount != null) {
-     *   myAccount.getUserObject().doStuff();
-     *   myAccount = myAccount.releaseItem();
-     *  }
-     * }
-     * </pre>
-     *
-     * <p/>Or similar; always go back to base stack level.
-     * It is mandatory to handle accounts returned by {@code releaseItem()}.
-     * If handling leads to releaseItem, then it has to be done in a
-     * forever loop. That is typical if the items are threads.
-     * That is normally not happening if the items are only memory.
-     *
-     * @return ResourceAccount the account to which the released item
-     * has been re-assigned. null if the released item was not re-assigned.
-     */
-    public ResourceAccount releaseItem();
-    
-    /**
-     * This will release a number of items at once rather than
-     * once. To be used in conjunctino with obtainItems(). See that
-     * method.
-     *
-     * @param quantity the number of items to be released.
-     */
-    public void releaseQuantity(long quantity);
-    
-    /**
-     * Call this with true as soon as this account needs a new item.
-     * Call this with false as soon as this account has all that it needs.
-     * For proper operation, this must be done.
-     *
-     * @param needs Whether the account needs a new item or not.
-     */
-    public void inNeed(boolean needs);
-    
-    /**
-     * @return Object The userObject that was supplied when creating the
-     * account.
-     */
-    public Object getUserObject();
-    
-    /**
-     * Set the userObject associated with that account.
-     */
-    public void setUserObject(Object obj);
-    
-    /**
-     * Returns the number of reserved items that can still be obtained by
-     * this account.
-     *
-     * <p/>If that number is negative or zero, it means that all reserved
-     * items are currently in use. Still more items might still be obtained
-     * from the extra items pool.
-     *
-     * @return long The number of reserved items.
-     */
-    public long getNbReserved();
-    
-    /**
-     * Tells if this account is idle (that is, none of the resources
-     * that it controls are currently in use). This means it can be closed
-     * safely.
-     */
-    public boolean isIdle();
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/ResourceDispatcher.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/ResourceDispatcher.java
deleted file mode 100644 (file)
index 019ce2d..0000000
+++ /dev/null
@@ -1,722 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util;
-
-
-import java.util.LinkedList;
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-import net.jxta.impl.util.ResourceAccount;
-
-
-/**
- * This class does not in itself allocate anything; it just does accounting.
- * Its role is to make sure that resource consumers ("accounts")
- * are guaranteed to be able to hold a pre-determined number of items,
- * the extra being granted on a first-come-first-serve basis.
- * It just replies yes/no to an account that wants to allocate an item.
- * Synchronization is external.
- *
- * <p/><em>Note that this is all essentially a limiter device. It assumes
- * that the resources that are dispatched in that way are not otherwise
- * in short supply.</em>
- *
- * <p/>The rules of the game are as follows:
- * <p/>At initialization, an absolute maximum authorized number of items
- * is computed. All item reservations and authorizations are done
- * within this budget.
- * <p/>At any given point in time, out of this maximum, a number of items are
- * permanently reserved for the minimum guaranteed to each current account,
- * a number of items are set aside for future accounts guarantee reservation,
- * and the rest is open for dynamic attribution on a first come first serve
- * basis.
- *
- * <p/>The current strategy is as follows:
- *
- * The initialization parameters are:<ul>
- * <li>minimum number of guaranteed accounts: {@code minAccounts}</li>
- * <li>minimum commitment to new accounts up to minAccounts: {@code minReserve}</li>
- * <li>maximum commitment to new accounts: {@code maxReserve}</li>
- * <li>extra number of dynamically allocatable items: {@code extraItems}</li>
- * </ul>
- *
- * <p/>We infer the number of items dedicated to reservation: {@code reservedItems}
- * That is {@code minReserve * minAccounts}.
- *
- * <p/>Accounts can ask for a commitment in excess of minReserve. Any reservation
- * made by an account beyond the minimum is satisfied from extraItems
- * limited by what's available and maxReserve. When minAccounts have
- * registered, it is possible that reservedItems is exhausted. New accounts
- * are then accepted on a best effort basis using extra items exclusively. This
- * may cause such new accounts to be given a commitment inferior to minReserve,
- * including zero. It is up to the account to reject the offer and give up
- * by closing, or to go along with the offer. At this time, we do not try
- * to raise the commitment made to an account while it is registered.
- *
- * <p/>During the life of the account, items are allocated first from the set
- * reserved by this account. If the account is out of reserved items, an attempt
- * is made at getting the item from extraItems.
- *
- * <p/>For each account we count the number of items reserved from reservedItems,
- * reserved from extraItems, allocated from the local reserved items
- * and allocated from extraItems separately. When an item is released, it is
- * accounted to extraItems if the account had anything allocated from
- * extra items, or to the local reserved items.
- * When an account goes away, the number of items that were reserved from
- * reserveItems go back to reserveItems and likewise for those coming
- * from extraItems. This is done rather than giving priority to reserve
- * items so that the system does not favor reservation beyond its initial
- * parameters when an account goes away under load.
- *
- * <p/>When resources are scarce, two modes of operations are available.
- * <dl>
- * <dt>Unfair</dt>
- * <dd>each account keeps its items as long it has a use for them. If
- * the allocation of a new item is denied for an account, the account just has
- * to live with it and try again the next time more items are desired.
- * <dd>
- * <dt>RoundRobin<dt>
- * <dd>Each account releases each item after one use. When allocation
- * of a new item is denied for an account by reason of item shortage, the
- * account is placed on a list of eligible accounts. Every time an item is
- * released, it is re-assigned to the oldest eligible account.
- * </dd>
- * </dl>
- * <p/>From an API point of view the difference is not visible: account users
- * are advised to release items after one use. Release returns the account to
- * which the item has been re-assigned. If RoundRobin is not used, then
- * the item is always re-assigned to the account that releases it unless it
- * is not needed, in which case it returns to the available pool.
- * So, with round-robin off the following is true:
- * <pre>
- * a.releaseItem() == (a.needs ? a : null);
- * </pre>
- */
-
-public class ResourceDispatcher {
-    
-    /**
-     *  Logger
-     */
-    private final static transient Logger LOG = Logger.getLogger(ResourceDispatcher.class.getName());
-    
-    private long extraItems;
-    private long reservedItems;
-    private final long maxReservedPerAccount;
-    private final long minReservedPerAccount;
-    private final long maxExtraPerAccount;
-    private final long minExtraPoolSize;
-    private int nbEligibles;
-    
-    private final String myName;
-    
-    class ClientAccount extends Dlink implements ResourceAccount {
-        
-        /**
-         * Tells whether this account has any use for extra resources
-         * or not. This feature is required to support roundRobin mode
-         * properly when resources are scarce.
-         */
-        private boolean needs;
-        
-        /**
-         * The number of items reserved for this account that may still be
-         * allocated. This decrements when we grant an item allocation. When
-         * it is <= 0, new items may be obtained from extraItems. If obtained
-         * we still decrement. When an item is released, if this counter is
-         * < 0 we return the item to extra items. This counter gets
-         * incremented either way.
-         */
-        private long nbReserved;
-        
-        /**
-         * The number out of nbReserved that is due back in reservedItems
-         * when this account disappears.
-         * The rest goes back to extraItems.
-         * NOTE: If we go away with items unaccounted for, we take the option
-         * of accounting them as allocated. In other words, that amount is
-         * not returned to its right full item account. That's why we do not
-         * need to keep track of allocated items. The leak is felt
-         * by this allocator. Alternatively we could pretend that the
-         * leaked resources are not ours; but that might break the actual
-         * allocator of the resource if it relies on our accounting.
-         */
-        private long fromReservedItems;
-        
-        /**
-         * Same idea but they have been reserved by reducing the number
-         * of extra items available.
-         */
-        private final long fromExtraItems;
-        
-        /**
-         * The limit for extra items allocation.
-         * When nbReserved is at or below that, extra items cannot be
-         * granted.
-         */
-        private final long extraLimit;
-        
-        /**
-         * The external object for which this account manages items.
-         * This is an opaque cookie to us. Whatever code invokes
-         * releaseItem knows what to do with it and the re-assigned item, but
-         * it needs to be told which of its own object got an item assigned.
-         */
-        private Object userObject;
-        
-        /**
-         * Creates a client account with this resource manager.
-         * Not for external use.
-         * @param fromReservedItems
-         * @param fromExtraItems
-         * @param extraLimit
-         * @param userObject
-         */
-        ClientAccount(long fromReservedItems, long fromExtraItems, long extraLimit, Object userObject) {
-            
-            this.nbReserved = fromReservedItems + fromExtraItems;
-            this.fromReservedItems = fromReservedItems;
-            this.fromExtraItems = fromExtraItems;
-            this.extraLimit = -extraLimit;
-            this.userObject = userObject;
-            this.needs = false;
-        }
-        
-        /**
-         * {@inheritDoc}
-         *
-         * <p/>To accelerate return of resources to the global pool, one
-         * may call close() explicitly. Otherwise it is called by
-         * {@code finalize}.
-         *
-         * <p/>Calling close() or letting the account be GC'ed while some of the
-         * resources have not been returned is an error, may create a leak and
-         * may display a warning message.
-         */
-        public void close() {
-            notEligible();
-            userObject = null;
-            
-            if ((nbReserved == 0) && (fromReservedItems == 0) && (fromExtraItems == 0)) {
-                return;
-            }
-            
-            if (nbReserved < (fromReservedItems + fromExtraItems)) {
-                // !!! someone just gave up on its resource controller
-                // without returning the resources !
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("An account was abandoned with resources still allocated.");
-                }
-                
-                // Release whatever we can.
-                if (nbReserved >= fromReservedItems) {
-                    releaseExtra(nbReserved - fromReservedItems);
-                    releaseReserved(fromReservedItems);
-                } else if (nbReserved > 0) {
-                    releaseReserved(nbReserved);
-                }
-                
-            } else {
-                releaseReserved(fromReservedItems);
-                releaseExtra(fromExtraItems);
-            }
-            
-            nbReserved = 0;
-        }
-        
-        /**
-         *  {@inheritDoc}
-         *
-         *  <p/>Will close the account. (close is idempotent).
-         */
-        @Override
-        protected void finalize() throws Throwable {
-            close();
-            
-            super.finalize();
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        public boolean isIdle() {
-            return (nbReserved == fromExtraItems + fromReservedItems);
-        }
-        
-        public boolean isEligible() {
-            return isLinked();
-        }
-        
-        /**
-         * Put that account in the queue of accounts eligible to
-         * receive a resource when one becomes available.
-         */
-        public void beEligible() {
-            if ((eligibles != null) && !isEligible()) {
-                newEligible(this);
-            }
-        }
-        
-        /**
-         * Remove that account from the queue of accounts eligible to
-         * receive a resource when one becomes available.
-         */
-        public void notEligible() {
-            if ((eligibles != null) && isEligible()) {
-                unEligible(this);
-            }
-        }
-        
-        // An extra item is being granted to this account (by being reassigned
-        // from another account upon release).
-        private void granted() {
-            
-            // In theory, there cannot be an account that should NOT be granted
-            // an item in the eligibles list. For now, check whether the theory
-            // survives observations.
-            // It could happen that the need flag was turned off while this
-            // account was in the eligible list. That's not realy a problem.
-            // Either it will be released immediately, or we could filter
-            // it in mostEligible().
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                if (nbReserved <= extraLimit) {
-                    LOG.warning("An account that should not get an item was found in the eligibles list");
-                }
-            }
-            
-            --nbReserved;
-            
-            // We've been assigned an item. No-longer eligible.
-            notEligible();
-        }
-        
-        /**
-         * {@inheritDoc}
-         */
-        public boolean obtainQuantity(long quantity) {
-            
-            if ((nbReserved - quantity) < extraLimit) {
-                // That's asking too much. Denied.
-                return false;
-            }
-            
-            if (quantity > nbReserved) {
-                // We need to get some or all of it from the extra items.
-                long toAsk = nbReserved > 0 ? quantity - nbReserved : quantity;
-                long res = holdExtra(toAsk);
-
-                if (res != toAsk) {
-                    // Could not get enough. We got nothing.
-                    releaseExtra(res);
-                    return false;
-                }
-            }
-            
-            // Now record it.
-            nbReserved -= quantity;
-            
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                if (nbReserved > fromReservedItems + fromExtraItems) {
-                    LOG.severe("Incorrect values after obtaining " + quantity + " : [" + this + "]");
-                }
-            }
-            
-            return true;
-        }
-        
-        /**
-         * {@inheritDoc}
-         */
-        public boolean obtainItem() {
-            
-            // Set it for consistency. It will get cleared when
-            // the item is used to satisfy the need.
-            needs = true;
-            
-            if (nbReserved > 0) {
-                notEligible();
-                --nbReserved;
-                return true; // Its pre-reserved.
-            }
-            
-            // This account may deliberately limit the number of extra
-            // items it uses. this translates into a lower limit for
-            // nbReserved when <= 0.
-            if (nbReserved <= extraLimit) {
-                notEligible();
-                return false;
-            }
-            
-            if (holdExtra(1) == 1) { // Need authorization.
-                notEligible();
-                --nbReserved;
-                return true;
-            }
-            
-            // We are out of luck but eligible.
-            beEligible();
-            return false;
-        }
-        
-        /**
-         * {@inheritDoc}
-         */
-        public void releaseQuantity(long quantity) {
-            if (nbReserved < 0) {
-                releaseExtra(quantity < -nbReserved ? quantity : -nbReserved);
-            }
-            nbReserved += quantity;
-            if (Logging.SHOW_SEVERE && LOG.isLoggable(Level.SEVERE)) {
-                if (nbReserved > fromReservedItems + fromExtraItems) {
-                    LOG.severe("Incorrect values after releasing " + quantity + " : [" + this + "]");
-                }
-            }
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        public ResourceAccount releaseItem() {
-            if (nbReserved < 0) {
-                if (eligibles == null) {
-                    // RoundRobin is OFF either we reuse it or we let
-                    // it go.
-                    if (needs) {
-                        return this;
-                    }
-                    
-                    ++nbReserved;
-                    releaseExtra(1);
-                    return null;
-                }
-                
-                // RoundRobin is ON, we compete with others for this item.
-                ++nbReserved;
-                
-                // Update our eligibility which depends on extraLimit and
-                // whether we have a use for the item or not.
-                if ((nbReserved > extraLimit) && needs) {
-                    beEligible();
-                }
-                
-                ClientAccount next = mostEligible();
-                
-                if (next == null) {
-                    releaseExtra(1); // noone wants it. return to main pool
-                } else {
-                    next.granted();
-                }
-                return next;
-            }
-            
-            // Since we are (back) in our reserved range, we can't be eligible
-            // for extra.
-            notEligible();
-            
-            // In reserved range; we keep using the item if we need it.
-            if (needs) {
-                return this;
-            }
-            
-            ++nbReserved;
-            return null;
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        public void inNeed(boolean needs) {
-            this.needs = needs;
-            if ((nbReserved < 0) && (nbReserved > extraLimit) && needs) {
-                beEligible();
-            } else {
-                notEligible();
-            }
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        public Object getUserObject() {
-            return userObject;
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        public void setUserObject(Object object) {
-            userObject = object;
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        public long getNbReserved() {
-            return nbReserved;
-        }
-        
-        /**
-         *  {@inheritDoc}
-         *
-         *  <p/>Returns some human-readable status and identity information useful for debugging.
-         */
-        @Override
-        public String toString() {
-            return super.toString() + " : needs=" + needs + " nbReserved=" + nbReserved + " fromReservedItems="
-                    + fromReservedItems + " fromExtraItems=" + fromExtraItems + " extraLimit=" + extraLimit;
-        }
-        
-    }
-    
-    /**
-     * The list of eligible accounts.
-     */
-    private Dlist eligibles;
-    
-    /**
-     * Construct a Fair Resource Allocator with the given parameters:
-     * @param minAccounts The minimum number of client accounts that we want to
-     * guarantee we can handle. <0 means 0
-     *
-     * @param minReservedPerAccount The minimum reservation request that we will
-     * always grant to accounts as long as we have less than minAccounts <0 means
-     * 0.
-     * @param maxReservedPerAccount The maximum reservation request that we ever
-     * will grant to any given account. <minReservedPerAccount means ==
-     * @param extraItems The total number of items that we will authorize
-     * beyond what has been reserved. <0 means 0.
-     * @param maxExtraPerAccount The maximum number of extra items we will ever
-     * let any given account occupy. <0 or >extraItems means ==extraItems.
-     * @param minExtraPoolSize The number of extra items that can never be
-     * taken out of the extra pool to satisfy a reservation request.
-     * @param roundRobin If true, when there is no items available, all
-     * eligible accounts are put in a FIFO. Accounts release items often, and the
-     * oldest account in the FIFO will get it. If false, accounts always keep
-     * items for as long as they can use them, and there is no FIFO of eligible
-     * accounts. Accounts can obtain new resources only if available at the time
-     * they try to aquire it. RoundRobin is more fair but has more overhead.
-     * Neither mode will cause starvation as long as accounts reserve at least
-     * one item each. RoundRobin is most useful when allocating threads.
-     */
-    public ResourceDispatcher(long minAccounts, long minReservedPerAccount, long maxReservedPerAccount, long extraItems, long maxExtraPerAccount, long minExtraPoolSize, boolean roundRobin, String dispatcherName) {
-        if (minAccounts < 0) {
-            minAccounts = 0;
-        }
-        if (minReservedPerAccount < 0) {
-            minReservedPerAccount = 0;
-        }
-        if (maxReservedPerAccount < minReservedPerAccount) {
-            maxReservedPerAccount = minReservedPerAccount;
-        }
-        if (extraItems < 0) {
-            extraItems = 0;
-        }
-        if (minExtraPoolSize < 0) {
-            minExtraPoolSize = 0;
-        }
-        
-        if ((maxExtraPerAccount < 0) || (maxExtraPerAccount > extraItems)) {
-            maxExtraPerAccount = extraItems;
-        }
-        
-        this.extraItems = extraItems;
-        this.minExtraPoolSize = minExtraPoolSize;
-        this.maxReservedPerAccount = maxReservedPerAccount;
-        this.minReservedPerAccount = minReservedPerAccount;
-        this.reservedItems = minAccounts * minReservedPerAccount;
-        this.maxExtraPerAccount = maxExtraPerAccount;
-        nbEligibles = 0;
-        if (roundRobin) {
-            eligibles = new Dlist();
-        }
-        
-        this.myName = dispatcherName;
-    }
-    
-    private long holdReserved(long req) {
-        if (req > reservedItems) {
-            req = reservedItems;
-        }
-        reservedItems -= req;
-        return req;
-    }
-    
-    private void releaseReserved(long nb) {
-        reservedItems += nb;
-    }
-    
-    private long holdExtra(long req) {
-        if (req > extraItems) {
-            req = extraItems;
-        }
-        extraItems -= req;
-        return req;
-    }
-    
-    // Get items from the extra pool but only if there is at least
-    // minExtraPoolSize item
-    // left after that. The goal is to make sure we keep at least one
-    // un-reserved item when granting reserved items from the extra pool.
-    // Thanks to that, even accounts that could not get a single reserved
-    // item still stand a chance to make progress by taking turns using
-    // the one extra item left.
-    private long holdExtraKeepSome(long req) {
-        if (extraItems <= minExtraPoolSize) {
-            return 0;
-        }
-        long allowed = extraItems - minExtraPoolSize;
-
-        if (req > allowed) {
-            req = allowed;
-        }
-        extraItems -= req;
-        return req;
-    }
-    
-    private void releaseExtra(long nb) {
-        extraItems += nb;
-    }
-    
-    private void newEligible(ClientAccount account) {
-        ++nbEligibles;
-        eligibles.putLast(account);
-    }
-    
-    private ClientAccount mostEligible() {
-        if (nbEligibles == 0) {
-            return null;
-        }
-        return (ClientAccount) eligibles.getFirst();
-    }
-    
-    private void unEligible(ClientAccount account) {
-        --nbEligibles;
-        account.unlink();
-    }
-    
-    // Not synch; it's just a snapshot for trace purposes.
-    public int getNbEligibles() {
-        return nbEligibles;
-    }
-    
-    /**
-     * Creates and returns a new client account.
-     *
-     * @param nbReq the number of reserved items requested (may not be
-     * always granted in full). A negative value is taken to mean 0.
-     * @param maxExtra the number of additional items that this account
-     * authorizes to be allocated in addition to the reserved ones. This
-     * is typically useful if the items are threads and if some accounts
-     * are not re-entrant. Then nbReq would be 1 and maxExtra would be 0.
-     * It is also permitted to have some accounts receive no items at all
-     * ever by setting nbReq and maxExtra both to zero. A negative maxExtra
-     * is taken as meaning no specified limit, in which case an actual limit
-     * may be set silently.
-     * @param userObject An opaque cookie that the account object will return
-     * when requested. This is useful to relate an account returned by
-     * ClientAccount.releaseItem() to an invoking code relevant object.
-     * @return ResourceAccount An account with this allocator.
-     */
-    public ResourceAccount newAccount(long nbReq, long maxExtra, Object userObject) {
-        
-        long extra = 0; // reserved from extra pool
-        long reserved = 0; // reserved from reserved pool
-        
-        if (nbReq > maxReservedPerAccount) {
-            nbReq = maxReservedPerAccount;
-        }
-        
-        // Anything beyond the minimum comes from extra items if there's
-        // enough.
-        if (nbReq > minReservedPerAccount) {
-            extra = holdExtraKeepSome(nbReq - minReservedPerAccount);
-            nbReq = minReservedPerAccount;
-        }
-        
-        // Then the minimum comes from reserved items, if we can.
-        reserved = holdReserved(nbReq);
-        nbReq -= reserved;
-        
-        // If there's some letf to be had, it means that we're getting
-        // short on reserved items, we'll try to compensate by getting
-        // more items from extra, but the app should start getting rid
-        // of stale accounts if it can.
-        if (nbReq > 0) {
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("Accepting extra account on a best effort basis.");
-            }
-            
-            extra += holdExtraKeepSome(nbReq);
-            if (extra + reserved < minReservedPerAccount) {
-                // Even that was not enough to reach our minimal commitment.
-                // The app should realy consider some cleanup.
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("[" + myName + "] Accepting extra account with below-minimal commitment:[" + userObject + "]");
-                }
-            }
-        }
-        
-        if ((maxExtra > maxExtraPerAccount) || (maxExtra < 0)) {
-            maxExtra = maxExtraPerAccount;
-        }
-        
-        return new ClientAccount(reserved, extra, maxExtra, userObject);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/SeedingManager.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/SeedingManager.java
deleted file mode 100644 (file)
index e9b2031..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright (c) 2002-2004 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util;
-
-
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.URI;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Random;
-import java.util.Set;
-import java.util.SortedSet;
-import java.util.Timer;
-import java.util.TimerTask;
-import java.util.TreeSet;
-
-import java.io.IOException;
-import java.io.File;
-import java.net.URISyntaxException;
-import java.util.NoSuchElementException;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Attribute;
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.endpoint.EndpointListener;
-import net.jxta.endpoint.EndpointService;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.Messenger;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.MessageTransport;
-import net.jxta.endpoint.StringMessageElement;
-import net.jxta.endpoint.TextDocumentMessageElement;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.pipe.InputPipe;
-import net.jxta.pipe.OutputPipe;
-import net.jxta.pipe.PipeID;
-import net.jxta.pipe.PipeMsgEvent;
-import net.jxta.pipe.PipeMsgListener;
-import net.jxta.pipe.PipeService;
-import net.jxta.protocol.AccessPointAdvertisement;
-import net.jxta.protocol.ConfigParams;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.PipeAdvertisement;
-import net.jxta.protocol.RdvAdvertisement;
-import net.jxta.protocol.RouteAdvertisement;
-import net.jxta.rendezvous.RendezvousEvent;
-import net.jxta.rendezvous.RendezvousListener;
-
-import net.jxta.impl.access.AccessList;
-import net.jxta.impl.endpoint.relay.RelayClient;
-import net.jxta.impl.protocol.RdvConfigAdv;
-import net.jxta.impl.rendezvous.RendezVousServiceImpl;
-import net.jxta.impl.util.TimeUtils;
-
-
-/**
- * Manages the location of seed peers.
- */
-public interface SeedingManager {
-    
-    /**
-     *  Stop this seeding manager.
-     */
-    public void stop(); 
-    
-    /**
-     * Returns the route advertisements of the active seed peers. The route
-     * advertisements are returned in the order which the consumer should
-     * attempt to contact the seed peers. In some cases the returned route 
-     * advertisements may omit the destination {@code PeerID} if it is not 
-     * known.
-     *
-     * @return The route advertisements of the active seed peers in the order
-     * in which the seed peers should be contacted.
-     */
-    public RouteAdvertisement[] getActiveSeedRoutes();
-    
-    /**
-     * Returns the {@code URI} of the endpoint addresses of the active seed
-     * peers. The {@code URI}s are returned in the order which the consumer
-     * should attempt to contact the seed peers. 
-     * 
-     * <p/>Using the endpoint address {@code URI}s is less optimal than using 
-     * the route advertisements as there is no association between the 
-     * potentially multiple message transport addresses referring to a single 
-     * peer.
-     * 
-     * @return The {@code URI}s of the active seed peers in the order
-     * in which the seed peers should be contacted.
-     */
-    public URI[] getActiveSeedURIs();
-    
-    /**
-     * Returns {@code true} if the provided peer advertisement is an acceptable
-     * peer as determined by the seeding manager.
-     *
-     * @param peeradv The {@code PeerAdvertisement} of the peer being tested.
-     */
-    public boolean isAcceptablePeer(PeerAdvertisement peeradv);
-    
-    /**
-     * Returns {@code true} if the provided route advertisement is an acceptable
-     * peer as determined by the seeding manager.
-     *
-     * @param radv The {@code RouteAdvertisement} of the peer being tested.
-     */
-    public boolean isAcceptablePeer(RouteAdvertisement radv);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/SequenceIterator.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/SequenceIterator.java
deleted file mode 100644 (file)
index eec3b00..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util;
-
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import java.util.NoSuchElementException;
-
-
-/**
- *  This class lets you combine a number of iterators.
- */
-public class SequenceIterator implements Iterator {
-    
-    private Iterator iterators;
-    
-    private Iterator current = null;
-    
-    private Iterator previous = null;
-    
-    /**
-     * Creates a new instance of SequenceIterator
-     *
-     * @param iterators An iterator containing instances of Iterator. This
-     * iterator will iterate over all of the item in these iterators.
-     **/
-    public SequenceIterator(Iterator iterators) {
-        this.iterators = iterators;
-    }
-    
-    /**
-     * Creates a new instance of SequenceIterator
-     **/
-    public SequenceIterator(Iterator first, Iterator second) {
-        List iterators = new ArrayList(2);
-        
-        iterators.add(first);
-        iterators.add(second);
-        
-        this.iterators = iterators.iterator();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    public boolean hasNext() {
-        
-        if ((null == current) || (!current.hasNext())) {
-            do {
-                if (!iterators.hasNext()) {
-                    return false;
-                }
-                
-                current = (Iterator) iterators.next();
-            } while (!current.hasNext());
-        }
-        
-        return true;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    public Object next() {
-        if (!hasNext()) {
-            throw new NoSuchElementException("no next element");
-        }
-
-        previous = current;
-        return current.next();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    public void remove() {
-        if (null == previous) {
-            throw new IllegalStateException("next() has not been called");
-        }
-        
-        previous.remove();
-        previous = null;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/TimeUtils.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/TimeUtils.java
deleted file mode 100644 (file)
index 41c2292..0000000
+++ /dev/null
@@ -1,439 +0,0 @@
-/*
- * Copyright (c) 2002-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.util;
-
-/**
- * Utilities for manipulating absolute and relative times and for accelerating
- * and decelerating time for testing purposes.
- * <p/>
- * The "time warp" functionality is useful for debugging and is scoped to
- * the class loader in which the TimeUtils class is loaded.
- */
-public final class TimeUtils {
-
-    /**
-     * Zero milliseconds (yes its redundant).
-     */
-    public static final long ZEROMILLISECONDS = 0L;
-
-    /**
-     * The number of milliseconds in a millisecond. (yes its redundant).
-     */
-    public static final long AMILLISECOND = 1L;
-
-    /**
-     * The number of milliseconds in a hundredth of a second.
-     */
-    public static final long AHUNDREDTHOFASECOND = 10 * AMILLISECOND;
-
-    /**
-     * The number of milliseconds in a tenth of a second.
-     */
-    public static final long ATENTHOFASECOND = 100 * AMILLISECOND;
-
-    /**
-     * The number of milliseconds in a second.
-     */
-    public static final long ASECOND = 1000 * AMILLISECOND;
-
-    /**
-     * The number of milliseconds in a minute.
-     */
-    public static final long AMINUTE = 60 * ASECOND;
-
-    /**
-     * The number of milliseconds in an hour.
-     */
-    public static final long ANHOUR = 60 * AMINUTE;
-
-    /**
-     * The number of milliseconds in a day.
-     */
-    public static final long ADAY = 24 * ANHOUR;
-
-    /**
-     * The number of milliseconds in a week.
-     */
-    public static final long AWEEK = 7 * ADAY;
-
-    /**
-     * The number of milliseconds in a fortnight (two weeks).
-     */
-    public static final long AFORTNIGHT = 14 * ADAY;
-
-    /**
-     * The number of milliseconds in the month of January.
-     */
-    public static final long AJANUARY = 31 * ADAY;
-
-    /**
-     * The number of milliseconds in the month of February in a non-leap year.
-     */
-    public static final long AFEBRUARY = 28 * ADAY;
-
-    /**
-     * The number of milliseconds in the month of February in a leap year.
-     */
-    public static final long ALEAPFEBRUARY = 29 * ADAY;
-
-    /**
-     * The number of milliseconds in the month of March.
-     */
-    public static final long AMARCH = 31 * ADAY;
-
-    /**
-     * The number of milliseconds in the month of April.
-     */
-    public static final long ANAPRIL = 30 * ADAY;
-
-    /**
-     * The number of milliseconds in the month of May.
-     */
-    public static final long AMAY = 31 * ADAY;
-
-    /**
-     * The number of milliseconds in the month of June.
-     */
-    public static final long AJUNE = 30 * ADAY;
-
-    /**
-     * The number of milliseconds in the month of July.
-     */
-    public static final long AJULY = 31 * ADAY;
-
-    /**
-     * The number of milliseconds in the month of August.
-     */
-    public static final long ANAUGUST = 31 * ADAY;
-
-    /**
-     * The number of milliseconds in the month of September.
-     */
-    public static final long ASEPTEMBER = 30 * ADAY;
-
-    /**
-     * The number of milliseconds in the month of October.
-     */
-    public static final long ANOCTOBER = 31 * ADAY;
-
-    /**
-     * The number of milliseconds in the month of November.
-     */
-    public static final long ANOVEMBER = 30 * ADAY;
-
-    /**
-     * The number of milliseconds in the month of December.
-     */
-    public static final long ADECEMBER = 31 * ADAY;
-
-    /**
-     * The number of milliseconds in a non-leap year.
-     */
-    public static final long AYEAR = AJANUARY + AFEBRUARY + AMARCH + ANAPRIL + AMAY + AJUNE + AJULY + ANAUGUST + ASEPTEMBER
-            + ANOCTOBER + ANOVEMBER + ADECEMBER;
-
-    /**
-     * The number of milliseconds in a leap year.
-     */
-    public static final long ALEAPYEAR = AJANUARY + ALEAPFEBRUARY + AMARCH + ANAPRIL + AMAY + AJUNE + AJULY + ANAUGUST
-            + ASEPTEMBER + ANOCTOBER + ANOVEMBER + ADECEMBER;
-
-    /**
-     * This odd little guy is for use in testing. it is applied anywhere the
-     * current time is used and allows modules which use timeutils to be tested
-     * through long (simulated) periods of time passing.
-     */
-    static volatile long TIMEWARP = 0;
-
-    /**
-     * Absolute time in millis at which we began timewarping.
-     */
-    static long WARPBEGAN = 0;
-
-    /**
-     * The rate at which time is warped using the auto-warper.
-     */
-    static double WARPFACTOR = 1.0;
-
-    /**
-     * Don't let anyone instantiate this class.
-     */
-    private TimeUtils() {
-    }
-
-    /**
-     * Return the current time. This value may differ from the value returned
-     * by {@link System#currentTimeMillis()} if the {@link #timeWarp(long)} or
-     * {@link #autoWarp(double)} features are being used. Using
-     * {@link #timeNow()} allows test harnesses to simulate long periods of
-     * time passing.
-     *
-     * @return The current time which has been possibly adjusted by a "time warp"
-     *         factor.
-     */
-    public static long timeNow() {
-        long now = System.currentTimeMillis();
-
-        if (WARPFACTOR != 1.0) {
-            long elapsed = now - WARPBEGAN;
-
-            long dialation = (long) (elapsed * WARPFACTOR);
-
-            TIMEWARP += (dialation - elapsed);
-        }
-
-        return now + TIMEWARP;
-    }
-
-    /**
-     * Convert a duration into a duration expressed in milliseconds to absolute
-     * time realtive to the current real time. Special handling for the maximum
-     * and minimum durations converts them to the maximum and minimum absolute
-     * times.
-     *
-     * @param duration a time duration expressed in milliseconds.
-     * @return an absolute time in milliseconds based on the duration's
-     *         relation to the current real time.
-     */
-    public static long toAbsoluteTimeMillis(long duration) {
-
-        return toAbsoluteTimeMillis(duration, timeNow());
-    }
-
-    /**
-     * Convert a duration into a duration expressed in milliseconds to absolute
-     * time realtive to the provided absolute time. Special handling for the
-     * maximum and minimum durations converts them to the maximum and minimum
-     * absolute times.
-     *
-     * @param duration a time duration expressed in milliseconds.
-     * @param fromWhen an absolute time expressed in milliseconds.
-     * @return an absolute time in milliseconds based on the duration's
-     *         relation to the provided absolute time.
-     */
-    public static long toAbsoluteTimeMillis(long duration, long fromWhen) {
-
-        // Special cases for the boundaries.
-
-        if (Long.MAX_VALUE == duration) {
-            return Long.MAX_VALUE;
-        }
-
-        if (Long.MIN_VALUE == duration) {
-            return Long.MIN_VALUE;
-        }
-
-        long whence = fromWhen + duration;
-
-        if (duration > 0) {
-            // check for overflow
-            if (whence < fromWhen) {
-                whence = Long.MAX_VALUE;
-            }
-
-        } else {
-            // check for underflow
-            if (whence > fromWhen) {
-                whence = Long.MIN_VALUE;
-            }
-        }
-
-        return whence;
-    }
-
-    /**
-     * Convert an absolute real time in milliseconds to a duration relative
-     * to the current real time. Special handling for the maximum and minimum
-     * absolute times converts them to the maximum and minimum durations.
-     *
-     * @param whence an absolute real time expressed in milliseconds.
-     * @return a duration expressed in milliseconds relative to the current
-     *         real time.
-     */
-    public static long toRelativeTimeMillis(long whence) {
-        return toRelativeTimeMillis(whence, timeNow());
-    }
-
-    /**
-     * Convert an absolute real time in milliseconds to a duration relative
-     * to the specified absolute real time. Special handling for the maximum
-     * and minimum absolute times converts them to the maximum and minimum
-     * durations.
-     *
-     * @param whence   An absolute real time expressed in milliseconds.
-     * @param fromWhen The base time in absolute real time expressed in
-     *                 milliseconds from which the relative time will be calculated.
-     * @return a duration expressed in milliseconds relative to the provided
-     *         absolute time.
-     */
-    public static long toRelativeTimeMillis(long whence, long fromWhen) {
-        // Special cases for the boundaries.
-
-        if (Long.MAX_VALUE == whence) {
-            return Long.MAX_VALUE;
-        }
-
-        if (Long.MIN_VALUE == whence) {
-            return Long.MIN_VALUE;
-        }
-
-        return whence - fromWhen;
-    }
-
-    /**
-     * Multiplies a duration in relative milliseconds by a multiplier while
-     * accounting for overflow and underflow of the magnitude value.
-     *
-     * @param duration   a time duration expressed in milliseconds.
-     * @param multiplier a non-negative value which will be multiplied against
-     *                   the duration.
-     * @return a time duration expressed in milliseconds.
-     */
-    public static long multiplyRelativeTimeMillis(long duration, long multiplier) {
-        if (multiplier < 0) {
-            throw new IllegalArgumentException("Only non-negative multipliers are allowed.");
-        }
-
-        long result_mag = (Long.MIN_VALUE != duration)
-                ? Long.highestOneBit(Math.abs(duration)) + Long.highestOneBit(multiplier)
-                : Long.SIZE + Long.highestOneBit(multiplier);
-        long result = duration * multiplier;
-
-        if (result_mag > (Long.SIZE - 1)) {
-            // over or underflowed
-            result = (duration < 0) ? Long.MIN_VALUE : Long.MAX_VALUE;
-        }
-
-        return result;
-    }
-
-    /**
-     * A utility for advancing the timewarp by the number of milliseconds
-     * specified. May not be used if you are also using {@link #autoWarp(double)}.
-     *
-     * @param advanceby Advance the timewarp by the number of milliseconds
-     *                  specified.
-     */
-    public static void timeWarp(long advanceby) {
-        if (0 != WARPBEGAN) {
-            throw new IllegalStateException("auto time warping already initialized at warp factor " + WARPFACTOR);
-        }
-
-        TIMEWARP += advanceby;
-    }
-
-    /**
-     * A utility for automagically adjusting the time dialation of the
-     * time warp.
-     *
-     * @param warpfactor a decimal ratio at which artifical time will pass.
-     *                   <p/>
-     *                   <ul>
-     *                   <li>To have time pass at the rate of an hour every minute, initialize
-     *                   with: <tt>(double)(TimeUtils.ANHOUR / TimeUtils.AMINUTE)</tt>.</li>
-     *                   <li>To have time pass at five times normal rate, initialize
-     *                   with: <tt>5.0</tt>.</li>
-     *                   <li>etc.</li>
-     *                   </ul>
-     */
-    public static void autoWarp(double warpfactor) {
-        if (0 != WARPBEGAN) {
-            throw new IllegalStateException("Auto time warping already initialized at warp factor " + WARPFACTOR);
-        }
-
-        if (warpfactor <= 0.0) {
-            throw new IllegalArgumentException("Time should not stand still or run backwards. It's unnatural.");
-        }
-
-        if (warpfactor != 1.0) {
-            WARPFACTOR = warpfactor;
-            WARPBEGAN = System.currentTimeMillis();
-        }
-    }
-
-    /**
-     * Return a relative time adjusted by the current warping factor.
-     * Needed for external methods which do not use {@link #timeNow()} such
-     * as {@link Object#wait(long)} and
-     * {@link java.net.Socket#setSoTimeout(int)}.
-     *
-     * @param initial The initial time value to "warp".
-     * @return The provided initial time adjusted by the current warping factor.
-     */
-    public static long warpedRelativeTime(long initial) {
-        if (0 == initial) {
-            return 0;
-        }
-
-        long adjusted = (long) (initial * WARPFACTOR);
-
-        // Handle overflow and underflow
-        if (initial < 0) {
-            if (adjusted >= 0) {
-                adjusted = Long.MIN_VALUE;
-            }
-        } else {
-            if (adjusted < 0) {
-                adjusted = Long.MAX_VALUE;
-            }
-        }
-
-        // since 0 is usually a special "wait forever" value we don't allow time
-        // to be reduced to zero because that would cause a change of behaviour
-        // in many cases.
-        return (0 != adjusted) ? adjusted : 1;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/TimerThreadNamer.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/TimerThreadNamer.java
deleted file mode 100644 (file)
index d0f711a..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util;
-
-
-import java.util.TimerTask;
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-
-/**
- * A simple timer task who's sole purpose is to name the Thread on which timer
- * tasks are running. You normally use it by :
- *
- * <pre><code>
- *  Timer timer = new Timer();
- *  timer.schedule( new TimerThreadNamer( "name for timer" ), 0 );
- * </code></pre>
- *
- * @deprecated Beginning with JSE 5.0 you may now name a Timer directly.
- *
- * <p/>Note that this implementation assumes the Timer implemntation found in
- * Sun JDK 1.2-1.5 (and possibly later) in that there is a single thread
- * attached to each Timer object.
- **/
-@Deprecated
-public class TimerThreadNamer extends TimerTask {
-    
-    private final static transient Logger LOG = Logger.getLogger(TimerThreadNamer.class.getName());
-    
-    private boolean firstRun = true;
-    
-    private String nameToUse;
-    
-    /**
-     *  Construct a Timer Thread Namer object
-     *
-     *  @param useName The name which the timer thread will be given.
-     **/
-    public TimerThreadNamer(String useName) {
-        nameToUse = useName;
-        
-    }
-    
-    /**
-     *  {@inheritDoc}
-     **/
-    @Override
-    public synchronized void run() {
-        
-        if (firstRun) {
-            Thread.currentThread().setName(nameToUse);
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Naming TimerThread to : " + nameToUse);
-            }
-            nameToUse = null;
-            firstRun = false;
-        } 
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/URISeedingManager.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/URISeedingManager.java
deleted file mode 100644 (file)
index 835f95a..0000000
+++ /dev/null
@@ -1,554 +0,0 @@
-/*
- * Copyright (c) 2002-2004 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util;
-
-
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.URI;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Set;
-
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.text.MessageFormat;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-import net.jxta.document.Attribute;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.endpoint.EndpointAddress;
-import net.jxta.impl.endpoint.EndpointUtils;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.protocol.AccessPointAdvertisement;
-import net.jxta.protocol.PeerAdvertisement;
-import net.jxta.protocol.RouteAdvertisement;
-
-
-/**
- *  A seeding manager that supports both explicit seed peers and loading of
- *  seeds from seeding resources.
- */
-public class URISeedingManager extends RdvAdvSeedingManager {
-    
-    /**
-     *  Logger
-     */
-    private static final transient Logger LOG = Logger.getLogger(URISeedingManager.class.getName());
-    
-    /**
-     *  The minimum amount of time we will wait between attempts to resolve the
-     *  seeding URI sources.
-     */
-    private static final long MINIMUM_SEEDING_REFRESH_INTERVAL = 5 * TimeUtils.AMINUTE;
-    
-    /**
-     *  The standard interval at which we will attempt to refresh from the
-     *  seeding URI sources. Also the maximum we will wait between failed
-     *  attempts.
-     */
-    private static final long STANDARD_SEEDING_REFRESH_INTERVAL = 30 * TimeUtils.AMINUTE;
-    
-    /**
-     * Whether we are restricted to using seed rdvs only.
-     */
-    private boolean allowOnlySeeds = false;
-    
-    /**
-     * These URIs specify location of seed peer lists. The URIs will be resolved
-     * via URLConnection and are assumed to refer to plain text lists of
-     * absolute URIs or an XML document containing a list of Route Advertisements.
-     */
-    private final Set<URI> seedingURIs = new HashSet<URI>();
-    
-    /**
-     *  The absolute time in milliseconds after which we will attempt to refresh
-     *  the active seeds list using the seeding URIs.
-     */
-    private long nextSeedingURIrefreshTime = 0;
-    
-    /**
-     *  The number of sequential failures we have encountered while loading
-     */
-    private int failedSeedingLoads = 0;
-    
-    /**
-     * These are seed peers which were specified as part of the configuration
-     * data or programmatically. These seeds are never deleted.
-     */
-    private final Set<RouteAdvertisement> permanentSeeds = new HashSet<RouteAdvertisement>();
-    
-    /**
-     *  The ranked list of active seed peers. The seed addresses are ranked as
-     *  follows :
-     *
-     *  <ol>
-     *      <li>The lists of seed addresses returned by reading from the seeding
-     *      addresses in the order they were returned. The seeding addresses are
-     *      processed in random order.</li>
-     *      <li>The list of permanent seed addresses in random order.</li>
-     *  </ol>
-     *
-     *  Consumers of the seed list should process the list in the order returned
-     *  and not request a new list until they have exhausted all entries from
-     *  the each returned lists or found an active seed.
-     */
-    private final List<RouteAdvertisement> activeSeeds = new ArrayList<RouteAdvertisement>();
-    
-    
-    /**
-     * Get an instance of URISeedingManager.
-     *
-     * @param aclLocation The location of the ACL file or {@code null} if no
-     * ACL file should be used.
-     * @param allowOnlySeeds If {@code true} then the only peers which are part
-     * of the seed peer set will be
-     */
-    public URISeedingManager(URI aclLocation, boolean allowOnlySeeds, PeerGroup group, String serviceName) {
-        super(aclLocation, group, serviceName);
-        
-        this.allowOnlySeeds = allowOnlySeeds;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public void stop() { 
-        super.stop();
-    }
-    
-    /**
-     * Adds the specified URI to the list of permanent seeds. Even if
-     * {@code allowOnlySeeds} is in effect, this seed may now be used, as if it
-     * was part of the initial configuration.
-     *
-     * @param seed The URI of the seed peer.
-     */
-    public synchronized void addSeed(URI seed) {
-        RouteAdvertisement ra = (RouteAdvertisement) 
-                AdvertisementFactory.newAdvertisement(RouteAdvertisement.getAdvertisementType());
-        AccessPointAdvertisement apa = (AccessPointAdvertisement) 
-                AdvertisementFactory.newAdvertisement(AccessPointAdvertisement.getAdvertisementType());
-        
-        ra.addDestEndpointAddress(new EndpointAddress(seed));
-        
-        permanentSeeds.add(ra);
-        activeSeeds.add(ra);
-    }
-    
-    /**
-     * Adds the specified URI to the list of permanent seeds. Even if
-     * {@code allowOnlySeeds} is in effect, this seed may now be used, as if it
-     * was part of the initial configuration.
-     *
-     * @param seed The RouteAdvertisement of the seed peer.
-     */
-    public synchronized void addSeed(RouteAdvertisement seed) {
-        permanentSeeds.add(seed.clone());
-        activeSeeds.add(seed.clone());
-    }
-    
-    /**
-     * Adds the specified URI to the list of seeding URIs.
-     *
-     * @param seeding The URI of the seeding list.
-     */
-    public synchronized void addSeedingURI(URI seeding) {
-        seedingURIs.add(seeding);
-        
-        // Reset the refresh timer so that our new seeding URI will get used.
-        nextSeedingURIrefreshTime = TimeUtils.timeNow();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public synchronized URI[] getActiveSeedURIs() {
-        List<URI> result = new ArrayList<URI>();
-        
-        refreshActiveSeeds();
-        
-        int eaIndex = 0;
-        boolean addedEA;
-        
-        do {
-            addedEA = false;
-            
-            for (RouteAdvertisement aRA : activeSeeds) {
-                List<String> eas = aRA.getDest().getVectorEndpointAddresses();
-                
-                if (eaIndex < eas.size()) {
-                    String anEndpointAddress = eas.get(eaIndex);
-                    
-                    try {
-                        result.add(new URI(anEndpointAddress));
-                        addedEA = true;
-                    } catch (URISyntaxException failed) {
-                        if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.log(Level.WARNING, "bad address in route : " + anEndpointAddress, failed);
-                        }
-                    }
-                }
-            }
-            
-            // Next loop we use the next most preferred address.
-            eaIndex++;
-        } while (addedEA);
-        
-        // Add more primordial seeds.
-        if(!allowOnlySeeds) {
-            for(URI eachURI : Arrays.asList(super.getActiveSeedURIs())) {
-                if(!result.contains(eachURI)) {
-                    result.add(eachURI);
-                }
-            }
-        }
-        
-        return result.toArray(new URI[result.size()]);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public synchronized RouteAdvertisement[] getActiveSeedRoutes() {
-        
-        refreshActiveSeeds();
-        
-        List<RouteAdvertisement> result = new ArrayList<RouteAdvertisement>(activeSeeds);
-                
-        // Add more primordial seeds.
-        if(!allowOnlySeeds) {
-            for(RouteAdvertisement eachRoute : Arrays.asList(super.getActiveSeedRoutes())) {
-                if(!result.contains(eachRoute)) {
-                    result.add(eachRoute);
-                }
-            }
-        }
-        
-        return result.toArray(new RouteAdvertisement[result.size()]);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public synchronized boolean isAcceptablePeer(PeerAdvertisement peeradv) {
-        RouteAdvertisement route = EndpointUtils.extractRouteAdv(peeradv);
-        
-        boolean acceptable = true;
-        
-        if (allowOnlySeeds) {
-            acceptable = isSeedPeer(route);
-        }
-        
-        if (!acceptable) {
-            return false;
-        }
-        
-        if (null != route) {
-            return isAcceptablePeer(route);
-        } else {
-            return acl.getGrantAll();
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public synchronized boolean isAcceptablePeer(RouteAdvertisement radv) {
-        boolean acceptable = true;
-        
-        if (allowOnlySeeds) {
-            acceptable = isSeedPeer(radv);
-        }
-        
-        return acceptable && super.isAcceptablePeer(radv);
-    }
-    
-    private void refreshActiveSeeds() {
-        if (TimeUtils.timeNow() < nextSeedingURIrefreshTime) {
-            return;
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Regenerating active seeds list.");
-        }
-        
-        activeSeeds.clear();
-        
-        if (!seedingURIs.isEmpty()) {
-            List<URI> allSeedingURIs = new ArrayList<URI>(seedingURIs);
-            boolean allLoadsFailed = true;
-            
-            Collections.shuffle(allSeedingURIs);
-            
-            for (URI aSeedingURI : allSeedingURIs) {
-                try {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Loading seeding list from : " + aSeedingURI);
-                    }
-                    
-                    RouteAdvertisement ras[] = loadSeeds(aSeedingURI);
-                    
-                    for (RouteAdvertisement aRA : Arrays.asList(ras)) {
-                        if (!activeSeeds.contains(aRA)) {
-                            // Only add non-duplicates.
-                            activeSeeds.add(aRA);
-                            allLoadsFailed = false;
-                        }
-                    }
-                } catch (IOException failed) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.warning("Failed loading seeding list from : " + aSeedingURI);
-                    }
-                }
-            }
-            
-            if (allLoadsFailed) {
-                // Allow for an early reload if we couldn't contact any of the
-                // seeding URIS.
-                failedSeedingLoads++;
-                long nextAttemptInterval = Math.min(MINIMUM_SEEDING_REFRESH_INTERVAL * failedSeedingLoads,
-                        STANDARD_SEEDING_REFRESH_INTERVAL);
-
-                nextSeedingURIrefreshTime = TimeUtils.toAbsoluteTimeMillis(nextAttemptInterval);
-            } else {
-                failedSeedingLoads = 0;
-                nextSeedingURIrefreshTime = TimeUtils.toAbsoluteTimeMillis(STANDARD_SEEDING_REFRESH_INTERVAL);
-            }
-        }
-        
-        // Add the (shuffled) permanent seeds at the last.
-        List<RouteAdvertisement> asList = new ArrayList<RouteAdvertisement>(permanentSeeds);
-
-        Collections.shuffle(asList);
-        activeSeeds.addAll(asList);
-    }
-    
-    /**
-     * Evaluates if the given route corresponds to one of our seeds. This is
-     * to support the allowOnlySeeds flag. The test is not completely foolproof
-     * since our list of seeds is just transport addresses. We could be given a
-     * pve that exhibits an address that corresponds to one of our seeds but is
-     * fake. And we might later succeed in connecting to that peer via one
-     * the other, real addresses. As a result, allowOnlySeeds is *not* a 
-     * security feature, just a convenience for certain kind of deployments. 
-     * The remote peer's certificates should be examined in order to fully
-     * establish that it an appropriate peer. 
-     */
-    private boolean isSeedPeer(RouteAdvertisement route) {
-        List<?> addrList = route.getDestEndpointAddresses();
-        
-        ListIterator eachAddr = addrList.listIterator();
-        
-        // convert each EndpointAddress to a URI to compare with seedHosts
-        while (eachAddr.hasNext()) {
-            EndpointAddress anAddr = (EndpointAddress) eachAddr.next();
-            
-            eachAddr.set(anAddr.toURI());
-        }
-        
-        addrList.retainAll(Arrays.asList(getActiveSeedURIs()));
-        
-        // What's left is the intersection of activeSeeds and the set of
-        // endpoint addresses in the given APA. If it is non-empty, then we
-        // accept the route as that of a seed host.
-        return (!addrList.isEmpty());
-    }
-    
-    /**
-     *  Load a list of seed peer RouteAdvertisements from the specified URI.
-     *  <p/>
-     *  Two formats are supported:
-     *  <dl>
-     *      <dt>TEXT</dt>
-     *      <dd>A simple UTF-8 or US ASCII text file containing one seed 
-     *      endpoint address per line. These entries are converted into very 
-     *      simple {@code RouteAdvertisement}s.</dd>
-     *      <dt>XML</dt>
-     *      <dd>A simple XML file containing a sequence of seed
-     *      {@code RouteAdvertisement}s. The seed advertisements may be ordered
-     *      or unordered.</dd>
-     *  </dl>
-     *
-     *  @param seedingURI The intended source of the {@code RouteAdvertisement}s.
-     *  @return The loaded {@code RouteAdvertisement}s.
-     *  @throws IOException Thrown for errors encountered loading the seed
-     *  RouteAdvertisements.
-     */
-    static RouteAdvertisement[] loadSeeds(URI seedingURI) throws IOException {
-        boolean isXML;
-        URL seedingURL = seedingURI.toURL();
-        URLConnection connection = seedingURL.openConnection();
-        
-        connection.setDoInput(true);
-        InputStream is = connection.getInputStream();
-        
-        // Determine if the input file is an XML document or a plain text list.
-        // If it is not XML then we assume it is text.
-        String content_type = connection.getContentType();
-        MimeMediaType type;
-        
-        if (null == content_type) {
-            // If we couldn't get a content-type from the connection then let's
-            // try to get it from the URI path.
-            String name = seedingURI.getPath();
-            int extIdx = name.lastIndexOf('.');
-            int sepIdx = name.lastIndexOf('/');
-            
-            if ((-1 != extIdx) && (extIdx > sepIdx)) {
-                String ext = name.substring(extIdx + 1);
-
-                type = StructuredDocumentFactory.getMimeTypeForFileExtension(ext);
-            } else {
-                // Type is unknown. :-(
-                type = MimeMediaType.AOS;
-            }
-        } else {
-            type = new MimeMediaType(content_type);
-        }
-        
-        isXML = MimeMediaType.XML_DEFAULTENCODING.equalsIngoringParams(type)
-                || MimeMediaType.APPLICATION_XML_DEFAULTENCODING.equalsIngoringParams(type);
-        
-        BufferedReader seeds = new BufferedReader(new InputStreamReader(is));
-        
-        List<RouteAdvertisement> result = new ArrayList<RouteAdvertisement>();
-        
-        if (isXML) {
-            // Read in XML format seeds. (a list of Route Advertisements)
-            XMLDocument xmldoc = (XMLDocument) 
-                    StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XML_DEFAULTENCODING, seeds);
-            
-            Enumeration<XMLElement> eachRA = xmldoc.getChildren(RouteAdvertisement.getAdvertisementType());
-            
-            while (eachRA.hasMoreElements()) {
-                XMLElement anRAElement = eachRA.nextElement();
-                RouteAdvertisement ra = (RouteAdvertisement) AdvertisementFactory.newAdvertisement(anRAElement);
-                
-                result.add(ra);
-            }
-            
-            boolean randomize = true;
-            
-            Attribute ordered = xmldoc.getAttribute("ordered");
-
-            if (null != ordered) {
-                randomize = !Boolean.valueOf(ordered.getValue());
-            }
-            
-            if (randomize) {
-                Collections.shuffle(result);
-            }
-        } else {
-            // Read in plain text format seeds. A list of Endpoint Addresses
-            while (true) {
-                String aSeed = seeds.readLine();
-                
-                if (null == aSeed) {
-                    break;
-                }
-                
-                aSeed = aSeed.trim();
-                
-                if (0 == aSeed.length()) {
-                    continue;
-                }
-                
-                try {
-                    URI validation = URI.create(aSeed);
-                    EndpointAddress ea = new EndpointAddress(validation.toString());
-                    
-                    RouteAdvertisement ra = (RouteAdvertisement) AdvertisementFactory.newAdvertisement(
-                            RouteAdvertisement.getAdvertisementType());
-                    
-                    ra.addDestEndpointAddress(ea);
-                    
-                    // Add the world's most pathetic RouteAdvertisement to the result.
-                    result.add(ra);
-                } catch (IllegalArgumentException badURI) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "bad URI in seeding list : " + aSeed, badURI);
-                    }
-                }
-            }
-        }
-        
-        is.close();
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine(MessageFormat.format("Loaded #{0} seeds from : {1}", result.size(), seedingURI));
-        }
-        
-        return result.toArray(new RouteAdvertisement[result.size()]);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/UnbiasedQueue.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/UnbiasedQueue.java
deleted file mode 100644 (file)
index 25b8a57..0000000
+++ /dev/null
@@ -1,875 +0,0 @@
-/*
- * Copyright (c) 2001-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util;
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-import net.jxta.impl.util.TimeUtils;
-
-
-/**
- *  A generic queue class. This queue is explicitly <b>NOT</b> a synchronized queue.
- *
- *  <p/>FIXME 20020511  bondolo@jxta.org    This could be more efficient with a
- *  circular queue implementation, but its a pain to write since we allow the
- *  queue to be resizable.
- *
- *  <p/>FIXME 20020511  bondolo@jxta.org    Exercise for the reader: Extend this
- *  class so that it does both LIFO and FIFO.
- *
- *  <p/>FIXME 20020910  bondolo@jxta.org    Needs an optional listener callback
- *  for droppped elments.
- *
- *  <p/>FIXME 20020910  bondolo@jxta.org    Needs an optional "strategy" for
- *  element insertion and removal.
- *
- *  @deprecated Please convert all code to use the java.util.concurrent BlockingQueue instead.
- *
- */
-@Deprecated
-public class UnbiasedQueue {
-    
-    /**
-     *  Logger
-     */
-    private static final Logger LOG = Logger.getLogger(UnbiasedQueue.class.getName());
-    
-    /**
-     *  Default number of queue elements.
-     */
-    protected static final int DEFAULT_MAX_OBJECTS = 100;
-    
-    /**
-     *  Default object dropping behaviour
-     */
-    protected static final boolean DROP_OLDEST_OBJECT = true;
-    
-    /**
-     *  Number of milliseconds between notifications that objects are being dropped.
-     */
-    protected static final long DROPPED_OBJECT_WARNING_INTERVAL = 10 * TimeUtils.ASECOND;
-    
-    /**
-     *  Contains the objects we currently have queued.
-     */
-    protected List<Object> queue = null;
-    
-    /**
-     *  The maximum number of objects we will hold in the queue at one time.
-     */
-    protected int maxObjects;
-    
-    /**
-     *  If true the queue is being closed and is currently in the process of
-     *  being flushed. All new "push" requests will be refused.
-     */
-    protected volatile boolean closeFlag = false;
-    
-    /**
-     *  When we need to drop objects, drop the oldest obj.
-     */
-    protected boolean dropOldestObject = true;
-    
-    /**
-     * total number of objects which have been enqueued into this queue
-     */
-    protected long numEnqueued = 0;
-    
-    /**
-     * sum of queue sizes at enqueue time.
-     */
-    protected long sumOfQueueSizesEnqueue = 0;
-    
-    /**
-     * total number of objects which have been dequeued from this queue
-     */
-    protected long numDequeued = 0;
-    
-    /**
-     * sum of queue sizes at dequeue time.
-     */
-    protected long sumOfQueueSizesDequeue = 0;
-    
-    /**
-     * the number of objects we have dropped since we began working.
-     */
-    protected long numDropped = 0;
-    
-    /**
-     * absolute time in millis when it will be ok to display a obj about
-     * dropping objects. We throttle this so that there is a chance to do work
-     * rather than just always spewing warnings.
-     */
-    protected long nextDroppedWarn = 0L;
-    
-    /**
-     *  An inner class for wrapping arbitrary queues with synchronization.
-     */
-    protected static class SynchronizedQueue extends UnbiasedQueue {
-        UnbiasedQueue innerqueue;
-        
-        /**
-         *  Constructs a SynchronizedQueue from an UnbiasedQueue
-         *  instance.
-         */
-        public SynchronizedQueue(UnbiasedQueue queue) {
-            innerqueue = queue;
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        @Override
-        public boolean isClosed() {
-            synchronized (innerqueue.queue) {
-                return innerqueue.isClosed();
-            }
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        @Override
-        public void close() {
-            synchronized (innerqueue.queue) {
-                innerqueue.close();
-            }
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        @Override
-        public void clear() {
-            synchronized (innerqueue.queue) {
-                innerqueue.clear();
-            }
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        @Override
-        public boolean push(Object obj) {
-            synchronized (innerqueue.queue) {
-                return innerqueue.push(obj);
-            }
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        @Override
-        public boolean pushBack(Object obj) {
-            synchronized (innerqueue.queue) {
-                return innerqueue.pushBack(obj);
-            }
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        @Override
-        public boolean push(Object obj, long timeout) throws InterruptedException {
-            synchronized (innerqueue.queue) {
-                return innerqueue.push(obj, timeout);
-            }
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        @Override
-        public boolean pushBack(Object obj, long timeout) throws InterruptedException {
-            synchronized (innerqueue.queue) {
-                return innerqueue.pushBack(obj, timeout);
-            }
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        @Override
-        public Object peek() {
-            synchronized (innerqueue.queue) {
-                return innerqueue.peek();
-            }
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        @Override
-        public Object pop() {
-            synchronized (innerqueue.queue) {
-                return innerqueue.pop();
-            }
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        @Override
-        public Object pop(long timeout) throws InterruptedException {
-            synchronized (innerqueue.queue) {
-                return innerqueue.pop(timeout);
-            }
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        @Override
-        public Object[] popMulti(int maxObjs) {
-            synchronized (innerqueue.queue) {
-                return innerqueue.popMulti(maxObjs);
-            }
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        @Override
-        public int getMaxQueueSize() {
-            synchronized (innerqueue.queue) {
-                return innerqueue.getMaxQueueSize();
-            }
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        @Override
-        public void setMaxQueueSize(int maxObjs) {
-            synchronized (innerqueue.queue) {
-                innerqueue.setMaxQueueSize(maxObjs);
-            }
-        }
-        
-        @Override
-        public int getCurrentInQueue() {
-            synchronized (innerqueue.queue) {
-                return innerqueue.getCurrentInQueue();
-            }
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        @Override
-        public long getNumEnqueued() {
-            synchronized (innerqueue.queue) {
-                return innerqueue.getNumEnqueued();
-            }
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        @Override
-        public double getAvgInQueueAtEnqueue() {
-            synchronized (innerqueue.queue) {
-                return innerqueue.getAvgInQueueAtEnqueue();
-            }
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        @Override
-        public long getNumDequeued() {
-            synchronized (innerqueue.queue) {
-                return innerqueue.getNumDequeued();
-            }
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        @Override
-        public double getAvgInQueueAtDequeue() {
-            synchronized (innerqueue.queue) {
-                return innerqueue.getAvgInQueueAtDequeue();
-            }
-        }
-        
-        /**
-         *  {@inheritDoc}
-         */
-        @Override
-        public long getNumDropped() {
-            synchronized (innerqueue.queue) {
-                return innerqueue.getNumDropped();
-            }
-        }
-    }
-    
-    /**
-     *  Returns a synchronized (thread-safe) list backed by the specified queue.
-     *  Most UnbiasedQueue subclasses are either unsynchronized or internally
-     *  synchronized. If you need to do any atomic operations upon
-     *  UnbiasedQueues (or subclasses) then this method should be used to
-     *  "wrap" the queue with synchronization.
-     *
-     *  <p/>In order to guarantee serial access, it is critical that all access
-     * to the backing queue is accomplished through the returned queue.
-     *
-     *  @param queue the queue to be "wrapped" in a synchronized queue.
-     */
-    public static UnbiasedQueue synchronizedQueue(UnbiasedQueue queue) {
-        return new SynchronizedQueue(queue);
-    }
-    
-    /**
-     * Default constructor. 100 element FIFO queue which drops oldest element
-     * when full.
-     */
-    public UnbiasedQueue() {
-        this(DEFAULT_MAX_OBJECTS, DROP_OLDEST_OBJECT);
-    }
-    
-    /**
-     * Full featured constructor for creating a new UnBiasedQueue.
-     *
-     * @param maxsize   Queue will not grow larger than this size. Use
-     *  {@link java.lang.Integer#MAX_VALUE} for "unbounded" queue size.
-     * @param dropOldest    Controls behaviour of element insertion when the
-     * queue is full. If <tt>true</tt> and the queue is full upon a
-     * {@link #push(Object) push} operation then the oldest element will be
-     * dropped to be replaced with the element currently being pushed. If
-     * <tt>false</tt> then the element will not be inserted if the queue is full.
-     */
-    public UnbiasedQueue(int maxsize, boolean dropOldest) {
-        this(maxsize, dropOldest, new ArrayList<Object>());
-    }
-    
-    /**
-     * Full featured constructor for creating a new UnBiasedQueue.
-     *
-     *  @param maxsize   Queue will not grow larger than this size. Use
-     *  {@link java.lang.Integer#MAX_VALUE} for "unbounded" queue size.
-     *  @param dropOldest    Controls behaviour of element insertion when the
-     *  queue is full. If <tt>true</tt> and the queue is full upon a
-     *  {@link #push(Object) push} operation then the oldest element will be
-     *  dropped to be replaced with the element currently being pushed. If
-     *  <tt>false</tt> then the element will not be inserted if the queue is
-     * full.
-     *  @param queue    the List class instance to use. This does not need to be
-     *  a synchronized list class. (and it works more effciently if it isn't).
-     */
-    public UnbiasedQueue(int maxsize, boolean dropOldest, List<Object> queue) {
-        if (maxsize <= 0) {
-            throw new IllegalArgumentException("size must be > 0");
-        }
-        
-        if (null == queue) {
-            throw new IllegalArgumentException("queue must be non-null");
-        }
-        
-        maxObjects = maxsize;
-        this.queue = queue;
-        closeFlag = false;
-        
-        dropOldestObject = dropOldest;
-    }
-    
-    /**
-     * {@inheritDoc}
-     *
-     *  <p/>A diagnostic toString implementation.
-     */
-    @Override
-    public synchronized String toString() {
-        
-        return this.getClass().getName() + " :" + " size=" + getCurrentInQueue() + " capacity=" + getMaxQueueSize() + " enqueued="
-                + getNumEnqueued() + " avgAtEnqueue=" + getAvgInQueueAtEnqueue() + " dequeued=" + getNumDequeued()
-                + " avgAtDequeue=" + getAvgInQueueAtDequeue();
-    }
-    
-    /**
-     *  Atomically return whether or not this queue has been closed. Closed
-     *  queues will not accept "push" requests, but elements will still be
-     *  returned with "pop".
-     *
-     *  @return boolean indicating whether this queue has been closed.
-     */
-    public boolean isClosed() {
-        return closeFlag; // closeFlag is volatile.
-    }
-    
-    /**
-     * Close the queue. This will prevent any further objects from being enqueued.
-     */
-    public void close() {
-        closeFlag = true;
-        synchronized (queue) {
-            queue.notifyAll();
-        }
-    }
-    
-    /**
-     *  Flush the queue of all pending objects.
-     */
-    public void clear() {
-        numDropped += queue.size();
-        queue.clear();
-    }
-    
-    /**
-     *  Attempt to push an object onto the queue. If the queue is full then the
-     *  object will not be pushed. This method does not use any synchronization
-     *  and should not be used if other threads are using {@link #pop(long)} to
-     *  retrieve elements.
-     *
-     *  @param obj object to push
-     *  @return true if the obj was pushed, otherwise false.
-     */
-    public boolean push(Object obj) {
-        if (queue.size() >= maxObjects) {
-            return false;
-        }
-        
-        numEnqueued++;
-        sumOfQueueSizesEnqueue += queue.size();
-        queue.add(obj);
-        
-        return true;
-    }
-    
-    /**
-     *  Attempt to push an object back at the head the queue. If the queue is
-     *  full then the object will not be pushed. This method does not use any
-     * synchronization and should not be used if other threads are using
-     * {@link #pop(long)} to retrieve elements.
-     *
-     *  @param obj object to push
-     *  @return true if the obj was pushed, otherwise false.
-     */
-    public boolean pushBack(Object obj) {
-        if (queue.size() >= maxObjects) {
-            return false;
-        }
-        
-        numEnqueued++;
-        sumOfQueueSizesEnqueue += queue.size();
-        queue.add(0, obj);
-        
-        return true;
-    }
-    
-    /**
-     * Push an object onto the queue. If the queue is full then the push will
-     *  wait for up to "timeout" milliseconds to push the object. At the end of
-     *  "timeout" milliseconds, the push will either return false or remove the
-     *  oldest item from the queue and insert "obj". This behaviour is contolled
-     *  by the constructor parameter "dropOldest".
-     *
-     * @param obj Object to be pushed onto the queue
-     * @param timeout Time in milliseconds to try to insert the item into a full
-     *  queue. Per Java standards, a timeout of "0" (zero) will wait indefinitly.
-     *  Negative values force no wait period at all.
-     *  @return true if the object was intersted into the queue, otherwise false.
-     *  @throws InterruptedException    if the operation is interrupted before
-     *      the timeout interval is completed.
-     */
-    public boolean push(Object obj, long timeout) throws InterruptedException {
-        return push3(obj, timeout, false);
-    }
-    
-    /**
-     *  Push an object back at the head of the queue. If the queue is full then
-     *  the push will wait for up to "timeout" milliseconds to push the object.
-     *  At the end of "timeout" milliseconds, the push will either return false
-     *  or remove the oldest item from the queue and insert "obj". This behaviour
-     *  is contolled by the constructor parameter "dropOldest".
-     *
-     *  <p/>Timeout control is accomplished via synchronization and
-     *  {@link Object#wait(long)}. {@link #pushBack(Object,long)} should only
-     *  be used in conjunction with {@link #push(Object,long)} and
-     *  {@link #pop(long)}
-     *
-     * @param obj Object to be pushed onto the queue
-     * @param timeout Time in milliseconds to try to insert the item into a full
-     *  queue. Per Java standards, a timeout of "0" (zero) will wait indefinitly.
-     *  Negative values force no wait period at all.
-     *  @return <tt>true</tt> if the object was intersted into the queue,
-     *  otherwise <tt>false</tt>.
-     *  @throws InterruptedException    if the operation is interrupted before
-     *  the timeout interval is completed.
-     */
-    public boolean pushBack(Object obj, long timeout) throws InterruptedException {
-        return push3(obj, timeout, true);
-    }
-    
-    private boolean push3(Object obj, long timeout, boolean atHead) throws InterruptedException {
-        if (null == obj) {
-            throw new AssertionError("obj is null");
-        }
-
-        if (null == queue) {
-            throw new AssertionError("queue is null");
-        }
-       
-        if (0 == timeout) {
-            timeout = Long.MAX_VALUE;
-        }
-        
-        long absoluteTimeOut = TimeUtils.toAbsoluteTimeMillis(timeout);
-        
-        synchronized (queue) {
-            // this is the loop we stay in until there is space in the queue,
-            // the queue becomes closed or we get tired of waiting.
-            do {
-                // This queue is closed. No additional objects allowed.
-                if (isClosed()) {
-                    queue.notify(); // inform someone who is waiting. we dont have to tell everyone though.
-                    return false;
-                }
-                
-                if (queue.size() >= maxObjects) {
-                    long waitfor = TimeUtils.toRelativeTimeMillis(absoluteTimeOut);
-
-                    if (waitfor > 0) {
-                        queue.wait(waitfor);
-                        
-                        // something happened, we check again.
-                        continue;
-                    }
-                    
-                    // Queue is full but its time to do something.
-                    // discard an element or simply return.
-                    if (dropOldestObject) {
-                        // Issue a warning if we have not done so recently.
-                        long now = TimeUtils.timeNow();
-
-                        if ((now > nextDroppedWarn) && Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                            LOG.warning("Queue full, dropped one or more elements. Now dropped " + numDropped + " elements.");
-                            nextDroppedWarn = now + DROPPED_OBJECT_WARNING_INTERVAL;
-                        }
-                        
-                        if (atHead) {
-                            // we have chosen to drop this element since it is
-                            // the oldest. We can safely return true because we
-                            // took the right action for this element.
-                            
-                            numEnqueued++; // one was queued.
-                            numDropped++; // one was dropped.
-                            // (happens they are the same)
-
-                            queue.notify(); // inform someone who is waiting. we dont have to tell everyone though.
-                            return true;
-                        } else {
-                            // Due to queue resizing, we have have to drop more than
-                            // one element
-                            while (queue.size() >= maxObjects) {
-                                numDropped++;
-                                queue.remove(0);
-                            }
-                        }
-                    } else {
-                        queue.notify(); // inform someone who is waiting. we dont have to tell everyone though.
-                        return false;
-                    }
-                    
-                } else {
-                    break;
-                }
-            } while (!isClosed());
-            
-            boolean pushed = (atHead ? pushBack(obj) : push(obj));
-            
-            queue.notify(); // inform someone who is waiting. we dont have to tell everyone though.
-            return pushed;
-        }
-    }
-    
-    /**
-     * Return the next Object from the queue without removing it.
-     *
-     * @return Object, null if the queue is empty.
-     */
-    public Object peek() {
-        Object result = null;
-        
-        if (queue.isEmpty()) {
-            return null;
-        }
-        
-        result = queue.get(0);
-        
-        return  result;
-    }
-    
-    /**
-     * Remove and return the next Object from the queue.
-     *
-     * @return Object, null if the queue is empty.
-     */
-    public Object pop() {
-        Object result = null;
-        
-        if (queue.isEmpty()) {
-            return null;
-        }
-        
-        sumOfQueueSizesDequeue += queue.size();
-        numDequeued++;
-        
-        result = queue.remove(0);
-        
-        return  result;
-    }
-    
-    /**
-     * Gets a Object from the queue. If no Object is immediately available,
-     * then wait the specified amount of time for an Object to be inserted.
-     *
-     * @param timeout   Amount of time to wait in milliseconds for an object to
-     * be available. Per Java convention, a timeout of zero (0) means wait an
-     * infinite amount of time. Negative values mean do not wait at all.
-     * @return The next object in the queue.
-     * @throws InterruptedException    if the operation is interrupted before
-     * the timeout interval is completed.
-     */
-    public Object pop(long timeout) throws InterruptedException {
-        
-        if (0 == timeout) {
-            timeout = Long.MAX_VALUE;
-        }
-        
-        long absoluteTimeOut = TimeUtils.toAbsoluteTimeMillis(timeout);
-        
-        Object result = null;
-        
-        synchronized (queue) {
-            do {
-
-                /*
-                 *  Because there may be more than one thread waiting on this
-                 *  queue, when we are woken up we do not necessarily get the
-                 *  next obj in the queue. In this case, rather than terminating
-                 *  because we didn't get the obj we resume waiting, but we
-                 *  ensure that we never wait longer than the amount of time
-                 *  which was originally requested. (if we fail to get the obj
-                 *  after being woken its actually a little less than the
-                 *  requested time)
-                 */
-                result = pop();
-                
-                if (null != result) {
-                    break;
-                }          // we have an obj
-                
-                if (isClosed()) { // we didn't get one and its closed so there
-                    break;
-                }          // is no chance there will ever be one.
-                
-                long waitfor = TimeUtils.toRelativeTimeMillis(absoluteTimeOut);
-                
-                if (waitfor <= 0) { // there is no wait time left.
-                    break;
-                }
-                
-                queue.wait(waitfor);
-            } while (!isClosed());
-            
-            // wake someone else who might be waiting. This is apparently better
-            // than just letting the scheduler notice the synchro is no longer
-            // occupied.
-            queue.notify();
-        }
-        
-        return result;
-    }
-    
-    /**
-     *  Returns an array of objects, possibly empty, from the queue.
-     *
-     *  @param maxObjs  the maximum number of items to return.
-     *  @return an array of objects, possibly empty containing the returned
-     *  queue elements.
-     */
-    public Object[] popMulti(int maxObjs) {
-        if (maxObjs <= 0) {
-            throw new IllegalArgumentException("maxObjs must be > 0");
-        }
-        
-        maxObjs = Math.min(maxObjs, queue.size());
-        Object[] result = new Object[maxObjs];
-
-        for (int eachElement = 0; eachElement < maxObjs; eachElement++) {
-            sumOfQueueSizesDequeue += queue.size();
-            numDequeued++;
-            result[eachElement] = queue.remove(0);
-        }
-        
-        return result;
-    }
-    
-    /**
-     *  How many objects will fit in this queue
-     *
-     *  @return int indicating how many objects will fit in the queue.
-     */
-    public int getMaxQueueSize() {
-        return maxObjects;
-    }
-    
-    /**
-     *  Set how many objects this queue may store. Note that if there are more
-     *  objects already in the queue than the specified amount then the queue
-     *  will retain its current capacity.
-     *
-     *  @param maxObjs  The number of objects which the queue must be able to
-     *  store.
-     */
-    public void setMaxQueueSize(int maxObjs) {
-        maxObjects = maxObjs;
-    }
-    
-    /**
-     *  Return the number of elements currently in the queue. This method is
-     *  useful for statistical sampling, but should not be used to determine
-     *  program logic due to the multi-threaded behaviour of these queues.
-     *
-     *  <p/>You should use the return values and timeout behaviour of the
-     *  {@link #push(Object)} and {@link #pop(long)} methods to regulate how you
-     *  use the queue.
-     *
-     *  @return the number of elements currently in the queue. Be warned that
-     *  even two sequential calls to this method may return different answers
-     *  due to activity on other threads.
-     */
-    public int getCurrentInQueue() {
-        return queue.size();
-    }
-    
-    /**
-     *  Return the total number of objects which have been enqueued on to this
-     *  queue during its existance.
-     *
-     *  @return how many objects have been queued.
-     */
-    public long getNumEnqueued() {
-        return numEnqueued;
-    }
-    
-    /**
-     *  Return the average number of elements in the queue at Enqueue time.
-     *
-     *  @return average number of elements which were in the queue at during all
-     *  of the "push" operations which returned a "true" result. Does not
-     *  include the item being pushed. If no elements have ever been enqueued
-     *  then "NaN" will be returned.
-     */
-    public double getAvgInQueueAtEnqueue() {
-        if (numEnqueued > 0) {
-            return (double) sumOfQueueSizesEnqueue / numEnqueued;
-        } else {
-            return Double.NaN;
-        }
-    }
-    
-    /**
-     *  Return the total number of objects which have been dequeued from this
-     *  queue during its existance.
-     *
-     *  @return how many objects have been queued.
-     */
-    public long getNumDequeued() {
-        return numDequeued;
-    }
-    
-    /**
-     *  Return the average number of elements in the queue at dequeue time.
-     *
-     *  @return average number of elements which were in the queue at during all
-     *  of the "pop" operations which returned a non-null result. Includes the
-     * item being "pop"ed in the average. If no elements have ever been dequeued
-     *  then "NaN" will be returned.
-     */
-    public double getAvgInQueueAtDequeue() {
-        if (numDequeued > 0) {
-            return (double) sumOfQueueSizesDequeue / numDequeued;
-        } else {
-            return Double.NaN;
-        }
-    }
-    
-    /**
-     *  Return the total number of objects which have been dropped by this queue
-     *  during its existance.
-     *
-     *  @return how many objects have been dropped.
-     */
-    public long getNumDropped() {
-        return numDropped;
-    }
-    
-    public void interrupt() {
-        synchronized (queue) {
-            queue.notify();
-        }
-    }
-    
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/cm/DumpCm.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/cm/DumpCm.java
deleted file mode 100644 (file)
index ee6564a..0000000
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * Copyright (c) 2003-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util.cm;
-
-
-import net.jxta.impl.xindice.core.DBException;
-import net.jxta.impl.xindice.core.data.Record;
-import net.jxta.impl.xindice.core.data.Value;
-import net.jxta.impl.xindice.core.filer.BTreeCallback;
-import net.jxta.impl.xindice.core.filer.BTreeFiler;
-import net.jxta.impl.xindice.core.indexer.IndexQuery;
-import net.jxta.impl.xindice.core.indexer.NameIndexer;
-
-import java.io.DataInputStream;
-import java.io.File;
-import java.io.IOException;
-
-
-/**
- * A utility to dump the CM databases.
- */
-
-public class DumpCm {
-
-    private static final IndexQuery ANY = new IndexQuery(IndexQuery.ANY, "*");
-
-    public interface DumpCmCallback {
-        void println(String val);
-    }
-
-    public static void dump(String args[], DumpCmCallback callback) throws IOException {
-        String type = null;
-        String dir = null;
-        String file = null;
-
-        for (int i = 0; i < args.length; i++) {
-            if (args[i].equals("-type") && i + 1 < args.length) {
-                type = args[++i];
-            } else if (args[i].equals("-dir") && i + 1 < args.length) {
-                dir = args[++i];
-            } else if (args[i].equals("-file") && i + 1 < args.length) {
-                file = args[++i];
-            } else {
-                throw new IllegalArgumentException("Incorrect option");
-            }
-        }
-
-        if (callback == null) {
-            throw new IllegalArgumentException("No callback was provided.");
-        }
-
-        if (type == null || dir == null || file == null) {
-            throw new IllegalArgumentException("Missing mandatory option");
-        }
-
-        if (type.equals("index")) {
-            dumpIndex(dir, file, callback);
-        } else if (type.equals("offsets")) {
-            dumpOffsets(dir, file, callback);
-        } else if (type.equals("db")) {
-            dumpDatabase(dir, file, callback);
-        } else {
-            throw new IllegalArgumentException("Incorrect type");
-        }
-    }
-
-    public static void dumpIndex(String dir, String file, DumpCmCallback callback) throws IOException {
-        NameIndexer indexer = new NameIndexer();
-
-        // remove the suffix if present (setLocation automatically adds it back)
-        final String SUFFIX = ".idx";
-
-        if (file.endsWith(SUFFIX)) {
-            file = file.substring(0, file.length() - SUFFIX.length());
-        }
-
-        indexer.setLocation(dir, file);
-        try {
-            if (!indexer.open()) {
-                throw new IOException("Failed to open index file " + dir + File.separator + file + SUFFIX);
-            }
-            callback.println("Index " + dir + File.separator + file + SUFFIX);
-            indexer.query(ANY, new IndexCallback(callback));
-        } catch (DBException dbe) {
-            throw new IOException(dbe.getMessage());
-        }
-    }
-
-    private static final class IndexCallback implements BTreeCallback {
-
-        private DumpCmCallback callback = null;
-
-        public IndexCallback(DumpCmCallback callback) {
-            this.callback = callback;
-        }
-
-        public boolean indexInfo(Value val, long pos) {
-            callback.println(pos + " \t " + val.toString());
-            return true;
-        }
-    }
-
-    public static void dumpOffsets(String dir, String file, DumpCmCallback callback) throws IOException {
-        BTreeFiler filer = new BTreeFiler();
-
-        // remove the suffix if present (setLocation automatically adds it back)
-        final String SUFFIX = ".tbl";
-
-        if (file.endsWith(SUFFIX)) {
-            file = file.substring(0, file.length() - SUFFIX.length());
-        }
-
-        filer.setLocation(dir, file);
-        try {
-            if (!filer.open()) {
-                throw new IOException("Failed to open offsets file " + dir + File.separator + file + SUFFIX);
-            }
-            callback.println("Offsets " + dir + File.separator + file + SUFFIX);
-            filer.query(ANY, new OffsetsCallback(filer, callback));
-        } catch (DBException dbe) {
-            throw new IOException(dbe.getMessage());
-        }
-    }
-
-    private static final class OffsetsCallback implements BTreeCallback {
-
-        private BTreeFiler filer = null;
-        private DumpCmCallback callback = null;
-
-        public OffsetsCallback(BTreeFiler filer, DumpCmCallback callback) {
-            this.filer = filer;
-            this.callback = callback;
-        }
-
-        public boolean indexInfo(Value val, long pos) {
-            Record record = null;
-
-            try {
-                record = filer.readRecord(pos);
-            } catch (DBException dbe) {
-                callback.println("Error reading record: " + dbe.getMessage());
-            }
-
-            StringBuilder offsets = new StringBuilder();
-            DataInputStream dis = null;
-
-            if (record != null) {
-                dis = new DataInputStream(record.getValue().getInputStream());
-            }
-            try {
-                int size = 0;
-
-                if (dis != null) {
-                    size = dis.readInt();
-                }
-                for (int i = 0; i < size; i++) {
-                    if (dis != null) {
-                        offsets.append(Long.toString(dis.readLong()));
-                    }
-                    offsets.append(" ");
-                }
-            } catch (IOException ie) {
-                callback.println("Error reading record: " + ie.getMessage());
-            }
-
-            callback.println(pos + " \t " + val.toString() + "\n\t " + offsets.toString());
-            return true;
-        }
-    }
-
-    public static void dumpDatabase(String dir, String file, DumpCmCallback callback) throws IOException {
-        BTreeFiler filer = new BTreeFiler();
-
-        // remove the suffix if present (setLocation automatically adds it back)
-        final String SUFFIX = ".tbl";
-
-        if (file.endsWith(SUFFIX)) {
-            file = file.substring(0, file.length() - SUFFIX.length());
-        }
-
-        filer.setLocation(dir, file);
-        try {
-            if (!filer.open()) {
-                throw new IOException("Failed to open database file " + dir + File.separator + file + SUFFIX);
-            }
-            callback.println("Database " + dir + File.separator + file + SUFFIX);
-            filer.query(ANY, new DatabaseCallback(filer, callback));
-        } catch (DBException dbe) {
-            throw new IOException(dbe.getMessage());
-        }
-    }
-
-    private static final class DatabaseCallback implements BTreeCallback {
-
-        private BTreeFiler filer = null;
-        private DumpCmCallback callback = null;
-
-        public DatabaseCallback(BTreeFiler filer, DumpCmCallback callback) {
-            this.filer = filer;
-            this.callback = callback;
-        }
-
-        public boolean indexInfo(Value val, long pos) {
-            Record record = null;
-
-            try {
-                record = filer.readRecord(pos);
-            } catch (DBException dbe) {
-                callback.println("Error reading record: " + dbe.getMessage());
-            }
-
-            if (record != null) {
-                callback.println(pos + " \t " + val.toString() + "\n" + record.getValue().toString());
-            }
-            return true;
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/package.html b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/package.html
deleted file mode 100644 (file)
index 006640a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<HTML>
-  <HEAD>
-  </HEAD>
-  <BODY>
-    A collection of utility classes used by the JXTA implementation. These
-                               utilities are not exposed in the public JXTA API because they are either
-                               specific to the implementation or not specifically related to JXTA.
-  </BODY>
-</HTML>
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/AdaptiveFlowControl.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/AdaptiveFlowControl.java
deleted file mode 100644 (file)
index f460de7..0000000
+++ /dev/null
@@ -1,360 +0,0 @@
-/*
- * Copyright (c) 2003-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util.pipe.reliable;
-
-
-import net.jxta.impl.util.TimeUtils;
-
-
-public class AdaptiveFlowControl extends FlowControl {
-
-    static final int DEFAULT_RWINDOW = 2;
-
-    /**
-     * global state.
-     */
-    private int MAX_TENSION = 3;
-    private int tension = 0;
-    private long nextRwinChange = TimeUtils.timeNow();
-    private long prevAveRTT = 10 * TimeUtils.ASECOND;
-    private int RINGSZ = 8;
-    private long[] ackTimeRing = new long[RINGSZ];
-    private int currAckRingOff = 0;
-    private int nbSamples = 0;
-    private long currAvePeriod = 1;
-    private long prevAvePeriod = 1; // not in use yet.
-    private long periodRangeSlow = Long.MAX_VALUE; // not in use, yet.
-    private long periodRangeFast = (periodRangeSlow / 3) * 2;
-
-    /**
-     * Current recommended rwindow.
-     */
-    private volatile int rwindow = 0;
-
-    /**
-     * state of the currentAck being processed
-     */
-
-    // Accum of acked packets
-    private int numberACKed = 0;
-
-    // Accum of missing packets
-    private int numberMissing = 0;
-
-    // Time this ACK arrived
-    private long currACKTime = 0;
-
-    // These variables are used to evaluate the longest run
-    // of consecutive holes in the sack list. That is consecutive
-    // seqnums from the retrQ that are not being acknowleged,
-    // followed by an acknowleged one.
-    private int prevHole = -2;
-    private int btbHoles = 0;
-    private int maxHoleRun = 0;
-
-    /**
-     * Constructs an adaptive flow control module with an initial rwindow of
-     * DEFAULT_RWINDOW.
-     */
-    public AdaptiveFlowControl() {
-        this(DEFAULT_RWINDOW);
-    }
-
-    /**
-     * @param rwindow Use this value as the initial value (not recommended
-     * except for experimental purposes.
-     */
-    public AdaptiveFlowControl(int rwindow) {
-        this.currACKTime = TimeUtils.timeNow();
-        this.rwindow = rwindow;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int getRwindow() {
-        return rwindow;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void ackEventBegin() {
-        currACKTime = TimeUtils.timeNow();
-        numberACKed = 0;
-        numberMissing = 0;
-        maxHoleRun = 0;
-
-        // Note the currently open holerun carries over from the prev ACK.
-        // So, we leave prevHole and btbHoles alone.
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void packetACKed(int seqnum) {
-        if (btbHoles > maxHoleRun) {
-            maxHoleRun = btbHoles;
-        }
-        btbHoles = 0;
-        prevHole = -2;
-        numberACKed++;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void packetMissing(int seqnum) {
-
-        if (seqnum != prevHole + 1) {
-            // End of run, begining of next
-            if (btbHoles > maxHoleRun) {
-                maxHoleRun = btbHoles;
-            }
-            btbHoles = 0;
-        }
-        btbHoles++;
-        prevHole = seqnum;
-        numberMissing++;
-    }
-
-    boolean fastMode = true;
-    int takeAchance = 0;
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int ackEventEnd(int rQSize, long aveRTT, long lastRTT) {
-
-        // Compute average ack rate. If nothing was acked by this
-        // ack msg, consider it a bad sign as far as ack rates go: as good
-        // as no ack at all.
-
-        // Even if a few ack messages where lost, the current event
-        // encapsulate all the acks we missed. Count each of them
-        // as one individual ack for the purpose of rate computation:
-        // we want to count the messages the other side has received
-        // not the number of ack messages that found their way back.
-
-        if (numberACKed > 0) {
-            for (int a = 0; a < numberACKed; ++a) {
-
-                // Adds a new sample to the ring. Returns the new average
-                // sample period. Once the ring is filled, the average is
-                // computed by substracting the sample at the current
-                // offset (the oldest) from the new sample that replaces
-                // it, and dividing by the ring size (10).  During the
-                // first round, we use the first sample, so precision is
-                // poorer.
-
-                long oldest = ackTimeRing[currAckRingOff];
-
-                if (nbSamples < RINGSZ) {
-                    // make a fake (very) oldest sample if there is nothing yet.
-                    if (nbSamples == 0) {
-                        ackTimeRing[0] = currACKTime / 2;
-                    }
-                    ++nbSamples;
-                    oldest = ackTimeRing[0];
-                }
-                ackTimeRing[currAckRingOff++] = currACKTime;
-                if (currAckRingOff == RINGSZ) {
-                    currAckRingOff = 0;
-                }
-                prevAvePeriod = currAvePeriod;
-                currAvePeriod = (currACKTime - oldest) / nbSamples;
-            }
-        }
-
-        // Compute rwindow. It should keep oscillating around
-        // the best value.
-        // Up to a certain point, the higher we keep rwindow the more
-        // we keep all the bandwidth utilized. Beyond that point we have
-        // it just serves to create congestion.
-
-        int oldSize = rwindow;
-
-        if (TimeUtils.toRelativeTimeMillis(nextRwinChange) < 0) {
-            if (maxHoleRun < 4) {
-
-                if (numberACKed > 0) {
-
-                    if (currAvePeriod < periodRangeFast) {
-
-                        // All is well: new rate record. We can
-                        // push some more.  and adjust the
-                        // expected rate range towards speed.
-
-                        periodRangeFast = currAvePeriod;
-                        periodRangeSlow = (periodRangeFast * 3) / 2;
-
-                        prevAveRTT = aveRTT;
-
-                        tension = 0;
-
-                    } else {
-
-                        // If rate is not up and RTT has
-                        // increased by one inter-ack period or more
-                        // since the last time we took the mark, it
-                        // looks like one or more packet just had to
-                        // wait its turn. So packets are being
-                        // buffered, which does not do any
-                        // good. Refrain from pushing under these
-                        // conditions. Wait for a more favorable time.
-
-                        // This compares the change in RTT with the period
-                        // and gives us a badness index from 0 to 10 * n
-                        // Beyond 20 or so, we start getting worried.
-                        // The hairy formula below compensates for non
-                        // linearity of the rtt_diff/period ratio with
-                        // period. The formulat compresses the scale towards
-                        // a period of 0. There is no compression at a period
-                        // of around 100 and maximum compression at 0.
-                        // To make the index less sensitive for low periods,
-                        // increase the compression ratio.
-
-                        int compressionRatio100 = 90;
-                        int pivot = 100;
-                        long period = currAvePeriod <= 0 ? 1 : currAvePeriod;
-                        long backupSign = (10 * pivot * (aveRTT - prevAveRTT))
-                                / (pivot * period + Math.max((compressionRatio100 * (pivot * period - period * period)) / 100, 0));
-
-                        if (backupSign > 18) {
-
-                            // if detect a speed increase, we'll reset our
-                            // idea of the normal RTT for next time. But we
-                            // will drop rwindow tension for now.
-
-                            rwindow--;
-                            tension = MAX_TENSION;
-
-                            // The first time this happens, it's the end of fast
-                            // mode.
-                            fastMode = false;
-
-                        } else if ((backupSign < 1) && (currAvePeriod >= periodRangeSlow)) {
-
-                            if (tension >= MAX_TENSION) {
-                                // May be we should give it another chance
-                                // and nudge it just a little. On very lossy
-                                // links we may end-up with no congestion
-                                // at all but stuck at low speed because
-                                // we have stopped believing in speed increase.
-                                if (takeAchance++ > 10) {
-                                    takeAchance = 0;
-                                    tension--;
-                                }
-                            }
-                        } else {
-                            takeAchance = 0;
-                        }
-                    }
-
-                    if (tension < MAX_TENSION) {
-                        tension++;
-                        rwindow++;
-                    }
-
-                } else {
-                    // Carefull, the other side did not ack anything
-                    // it is stuck on a missing packet...better slow down
-                    tension = MAX_TENSION;
-                }
-
-            } else {
-
-                // We saturated the pipe. We need to slow down
-                // arbitrarily without changing our idea of speed,
-                // so that the correlation between speed and
-                // rwindow is shifted towards a smaller
-                // rwindow.
-
-                rwindow -= (MAX_TENSION + 1);
-                prevAveRTT = aveRTT;
-                tension = MAX_TENSION;
-
-                // The first time this happens, it's the end of fast
-                // mode.
-                fastMode = false;
-            }
-
-            if (rwindow > rQSize) {
-                rwindow = rQSize;
-            }
-
-            if (rwindow < 2) {
-                rwindow = 2;
-            }
-
-            if (oldSize != rwindow) {
-                if (fastMode && (tension < MAX_TENSION)) {
-                    nextRwinChange = TimeUtils.toAbsoluteTimeMillis(lastRTT / 10);
-                } else {
-                    nextRwinChange = TimeUtils.toAbsoluteTimeMillis(aveRTT * 2);
-                }
-            }
-        }
-
-        return rwindow;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/Defs.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/Defs.java
deleted file mode 100644 (file)
index 34f12d4..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2003-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util.pipe.reliable;
-
-
-import net.jxta.document.MimeMediaType;             
-
-
-public final class Defs {
-
-    public static final int MAXQUEUESIZE = 100;
-
-    public static final String NAMESPACE = "jxtarel";
-
-    public static final String RETRY_ELEMENT_NAME = "retry";
-    public static final String RETRY_ELEMENT_VALUE = "RETRY";
-
-    public static final String ACK_ELEMENT_NAME = "ack";
-
-    public static final MimeMediaType MIME_TYPE_MSG = MimeMediaType.valueOf("application/x-jxta-msg");
-
-    public static final MimeMediaType MIME_TYPE_BLOCK = MimeMediaType.valueOf("application/x-jxta-reliable-block");
-
-    public static final MimeMediaType MIME_TYPE_ACK = MimeMediaType.valueOf("application/x-jxta-reliable-ack");
-
-    /**
-     *  Static class
-     */
-    private Defs() {}
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/FixedFlowControl.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/FixedFlowControl.java
deleted file mode 100644 (file)
index ab92b13..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2003-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util.pipe.reliable;
-
-
-public class FixedFlowControl extends FlowControl {
-
-    static final int DEFAULT_RWINDOW = 5;
-    int maxRwindow = 0;
-    int rwindow = 2;
-
-    /**
-     * Constructs a fixed flow control module with a fixed rwindow of
-     * DEFAULT_RWINDOW. It is not completely fixed. It grows by one
-     * at every ack message until it reaches the set RWINDOW.
-     */
-    public FixedFlowControl() {
-        this(DEFAULT_RWINDOW);
-    }
-
-    /**
-     * @param rwindow Use the specified value as the constant rwindow
-     */
-    public FixedFlowControl(int rwindow) {
-        this.maxRwindow = rwindow;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int getRwindow() {
-        return rwindow;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int ackEventEnd(int rQSize, long aveRTT, long lastRTT) {
-        if (rwindow < maxRwindow) {
-            ++rwindow;
-        }
-        return rwindow;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/FlowControl.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/FlowControl.java
deleted file mode 100644 (file)
index b2562e1..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2003-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util.pipe.reliable;
-
-
-/**
- * A basis for any flow control module to be plugged into
- * ReliableOutputStream.  Synchronization can is assumed to be
- * provided externaly. However all implementations are required to
- * allow the getRwindow() method to be called at any time without
- * synchronization.
- */
-
-public abstract class FlowControl {
-
-    /**
-     * Returns the rwindow size that this flow control module suggests to use
-     * at this point in time.
-     * @return the remote window size
-     */
-    public abstract int getRwindow();
-
-    /**
-     * Indicates that a new ack message is being processed.
-     */
-    public void ackEventBegin() {}
-
-    /**
-     * Invoked for each packet that is believed to have been received
-     * per the current ack message.
-     *
-     * @param seqnum The sequence number of the received packet.
-     */
-    public void packetACKed(int seqnum) {}
-
-    /**
-     * Invoked for each packet that is believed to have been lost
-     * per the current ack message.
-     *
-     * @param seqnum The sequence number of the missing packet.
-     */
-    public void packetMissing(int seqnum) {}
-
-    /**
-     * Concludes rwindow update for this ackEvent. That's where all the
-     * smarts are. A number of externally computed parameters must be
-     * passed.
-     *
-     * @param rQSize the last known value of the remote queue size.
-     * @param aveRTT the latest estimate of the average RTT.
-     * @param lastRTT the RTT inferred from the most recent ACK message.
-     * @return int the new recommended value for rwindow.
-     */
-
-    public abstract int ackEventEnd(int rQSize, long aveRTT, long lastRTT);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/Incoming.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/Incoming.java
deleted file mode 100644 (file)
index 5c510cc..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2003-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util.pipe.reliable;
-
-
-import net.jxta.endpoint.Message;
-
-
-/**
- * Incoming messages are delivered to a class implementing
- * this interface.
- */
-public interface Incoming {
-
-    /**
-     * Receive this incoming message. This method should
-     * return quickly. If the receiving class needs to do
-     * substantial work with incoming messages, it should
-     * insert this message into a queue and then drain the
-     * queue processing the messages in its own thread.
-     * @param msg the message
-     */
-    void recv(Message msg);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/IncomingPipeAdaptor.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/IncomingPipeAdaptor.java
deleted file mode 100644 (file)
index b0462cf..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 2003-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util.pipe.reliable;
-
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-import net.jxta.pipe.InputPipe;
-import net.jxta.endpoint.Message;
-
-
-public class IncomingPipeAdaptor implements Runnable {
-
-    private static final Logger LOG = Logger.getLogger(IncomingPipeAdaptor.class.getName());
-
-    private InputPipe pipe = null;
-    private Incoming incoming = null;
-    private Thread poller = null;
-
-    public IncomingPipeAdaptor(InputPipe pipe, Incoming incoming) {
-        if (pipe == null) {
-            throw new IllegalArgumentException("pipe cannot be null");
-        }
-        this.pipe = pipe;
-
-        if (incoming == null) {
-            throw new IllegalArgumentException("incoming cannot be null");
-        }
-        this.incoming = incoming;
-
-        poller = new Thread(this, "Reliable IncomingPipe Message Poll Thread");
-        poller.setDaemon(true);
-        poller.start();
-    }
-
-    public void run() {
-        try {
-            while (true) {
-                Message msg = null;
-
-                try {
-                    msg = pipe.waitForMessage();
-                } catch (InterruptedException ignore) {
-                    continue;
-                }
-
-                if (msg != null) {
-                    incoming.recv(msg);
-                }
-            }
-        } catch (Throwable all) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Uncaught Throwable in thread :" + Thread.currentThread().getName(), all);
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/Outgoing.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/Outgoing.java
deleted file mode 100644 (file)
index f61a195..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 2003-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util.pipe.reliable;
-
-
-import java.io.IOException;
-import net.jxta.endpoint.Message;
-
-
-/**
- * This interface specifies the methods that must be
- * implemented by a connection in order to be able to
- * reliably deliver messages over the connection.
- */
-public interface Outgoing {
-
-    /**
-     * Send a message to the remote peer.
-     * @param msg the message
-     * @return true is successful
-     * @throws java.io.IOException if io error occurs
-     */
-    boolean send(Message msg) throws IOException;
-
-    /**
-     * Close the connection.
-     */
-    void close();
-
-    /**
-     * Amount of a connection must be idle before a
-     * reconnection attempt will be considered.
-     * @return min idle reconnect time in millis
-     */
-    long getMinIdleReconnectTime();
-
-    /**
-     *  Sets the Timeout attribute. A timeout of 0 blocks forever
-     *
-     * @param  timeout The new soTimeout value
-     */
-    void setTimeout(int timeout);
-    
-    /**
-     * Amount of time after which a connection is
-     * considered idle and may be scavenged.
-     * @return idle timeout in millis
-     */
-    long getIdleTimeout();
-
-    /**
-     * Amount if time during which retries may remain
-     * queued for retransmission. If still unACKed after
-     * this amount of time then the connection is
-     * considered dead.
-     * @return max retry age in millis
-     */
-    long getMaxRetryAge();
-
-    /**
-     * Get the time when this connection was last used.
-     * @return last accessed in millis
-     */
-    long getLastAccessed();
-
-    /**
-     * Set the time when this connection was last used.
-     * @param time in millis
-     */
-    void setLastAccessed(long time);
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/OutgoingMsgrAdaptor.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/OutgoingMsgrAdaptor.java
deleted file mode 100644 (file)
index 0ebf764..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright (c) 2003-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-package net.jxta.impl.util.pipe.reliable;
-
-
-import java.io.IOException;
-
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.Messenger;
-import net.jxta.impl.util.TimeUtils;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-
-/**
- *  OutgoingMessengerAdaptor
- */
-public class OutgoingMsgrAdaptor implements Outgoing {
-
-    private final static transient Logger LOG = Logger.getLogger(OutgoingMsgrAdaptor.class.getName());
-
-    private final Messenger msgr;
-    private int timeout;
-    private long lastAccessed = 0;
-    private boolean closed = false;
-
-    /**
-     *  Constructor for the OutgoingMsgrAdaptor object
-     *
-     *@param  msgr     the messenger used to send messages
-     *@param  timeout  timeout in milliseconds
-     */
-    public OutgoingMsgrAdaptor(Messenger msgr, int timeout) {
-        if (msgr == null) {
-            throw new IllegalArgumentException("messenger cannot be null");
-        }
-        this.msgr = msgr;
-        this.timeout = timeout;
-
-        // initialize to some reasonable value
-        lastAccessed = TimeUtils.timeNow();
-    }
-
-    /**
-     *  returns last accessed time as a string
-     *
-     *@return    last accessed time as a string
-     */
-    @Override
-    public String toString() {
-        return " lastAccessed=" + Long.toString(lastAccessed);
-    }
-
-    /**
-     *  Sets the Timeout attribute. A timeout of 0 blocks forever
-     *
-     * @param  timeout The new soTimeout value
-     */
-    public void setTimeout(int timeout) {
-        this.timeout = timeout;
-    }
-
-    /**
-     *  close the messenger (does not close the messenger)
-     */
-    public void close() {
-        closed = true;
-    }
-
-    /**
-     *  Gets the minIdleReconnectTime of the OutgoingMsgrAdaptor
-     *  (obsolete).
-     *@return    The minIdleReconnectTime value
-     */
-    public long getMinIdleReconnectTime() {
-        return timeout;
-    }
-
-    /**
-     *  Gets the idleTimeout of the OutgoingMsgrAdaptor. The adaptor never times out.
-     *@return    <code>Long.MAX_VALUE</code>
-     */
-    public long getIdleTimeout() {
-        return Long.MAX_VALUE;
-    }
-
-    /**
-     *  Gets the maxRetryAge attribute of the OutgoingMsgrAdaptor
-     *
-     *@return    The maxRetryAge value
-     */
-    public long getMaxRetryAge() {
-        return timeout == 0 ? Long.MAX_VALUE : timeout;
-    }
-
-    /**
-     *  Gets the lastAccessed time of OutgoingMsgrAdaptor
-     *
-     *@return    The lastAccessed in milliseconds
-     */
-    public long getLastAccessed() {
-        return lastAccessed;
-    }
-
-    /**
-     *  Sets the lastAccessed of OutgoingMsgrAdaptor
-     *
-     *@param  time  The new lastAccessed in milliseconds
-     */
-    public void setLastAccessed(long time) {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Setting lastAccessed to :" + lastAccessed);
-        }
-        lastAccessed = time;
-    }
-
-    /**
-     *  Sends a message
-     *
-     *@param  msg              message to send
-     *@return                  true if message send is successful
-     *@exception  IOException  if an io error occurs
-     */
-    public boolean send(Message msg) throws IOException {
-        if (closed) {
-            throw new IOException("broken connection");
-        }
-
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Sending a Message");
-        }
-        
-        msgr.sendMessageB(msg, null, null);
-        return true;
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/OutgoingPipeAdaptor.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/OutgoingPipeAdaptor.java
deleted file mode 100644 (file)
index 34f0b40..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright (c) 2003-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util.pipe.reliable;
-
-
-import java.io.IOException;
-
-import net.jxta.endpoint.Message;
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.pipe.OutputPipe;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-
-public class OutgoingPipeAdaptor implements Outgoing {
-    
-    private static final Logger LOG = Logger.getLogger(OutgoingPipeAdaptor.class.getName());
-    
-    private final OutputPipe pipe;
-    
-    private long lastAccessed = 0;
-    
-    public OutgoingPipeAdaptor(OutputPipe pipe, int wsize) {
-        if (pipe == null) {
-            throw new IllegalArgumentException("pipe cannot be null.");
-        }
-        
-        this.pipe = pipe;
-
-        // initialize to some reasonable value
-        lastAccessed = TimeUtils.timeNow();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public String toString() {
-        return pipe.toString() + " lastAccessed=" + Long.toString(lastAccessed);
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public boolean send(Message msg) throws IOException {
-        try {
-            return pipe.send(msg);
-        } catch (IOException ex) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Failed to send message " + msg, ex);
-            }
-            
-            return false;
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public void close() {
-        pipe.close();
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public long getMinIdleReconnectTime() {
-        return 10 * TimeUtils.AMINUTE;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public void setTimeout(int timeout) {}
-    
-    /**
-     *  {@inheritDoc}
-     *
-     * <p/>Default should be "never", otherwise, connection closes while not
-     * in active use and ReliableOutputStream does NOT reconnect automatically.
-     */
-    public long getIdleTimeout() {
-        return Long.MAX_VALUE;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     *
-     *  <p/>This is the important tunable: how long to wait on a stale connection.
-     */
-    public long getMaxRetryAge() {
-        return 2 * TimeUtils.AMINUTE;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public long getLastAccessed() {
-        return lastAccessed;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public void setLastAccessed(long time) {
-        lastAccessed = time;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/OutgoingPipeAdaptorSync.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/OutgoingPipeAdaptorSync.java
deleted file mode 100644 (file)
index 80b5afd..0000000
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * Copyright (c) 2003-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util.pipe.reliable;
-
-
-import java.io.IOException;
-import java.lang.IllegalStateException;
-
-import net.jxta.pipe.OutputPipe;
-import net.jxta.endpoint.Message;
-import net.jxta.impl.util.TimeUtils;
-
-
-/**
- *  And ountgoing pipe adaptor which does not use a thread or queue.
- *  Additionally, the pipe does not need to be provided at construction time.
- *  The send() method blocks until the pipe is specified.
- */
-public class OutgoingPipeAdaptorSync implements Outgoing {
-    
-    private OutputPipe pipe = null;
-    private long lastAccessed = 0;
-    private boolean closed = false;
-    
-    public OutgoingPipeAdaptorSync(OutputPipe pipe) {
-        
-        // Null permitted. Send will block until setPipe is called.
-        this.pipe = pipe;
-        
-        // initialize to some reasonable value
-        lastAccessed = TimeUtils.timeNow();
-    }
-    
-    public boolean sendNb(Message msg) throws IOException {
-        OutputPipe locPipe;
-        
-        synchronized (this) {
-            locPipe = pipe;
-        }
-        
-        if (closed || locPipe == null) {
-            return false;
-        }
-        
-        locPipe.send(msg);
-        
-        return true;
-    }
-    
-    public boolean send(Message msg) throws IOException {
-        
-        OutputPipe locPipe;
-        
-        synchronized (this) {
-            while (pipe == null && !closed) {
-                try {
-                    wait();
-                } catch (InterruptedException ignore) {}
-            }
-            if (closed) {
-                return false;
-            }
-            locPipe = pipe;
-        }
-        
-        return locPipe.send(msg);
-    }
-    
-    public void setPipe(OutputPipe pipe) {
-        synchronized (this) {
-            if (closed || this.pipe != null) {
-                throw new IllegalStateException("Cannot change pipe nor re-open");
-            }
-            this.pipe = pipe;
-            notifyAll();
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public void close() {
-        synchronized (this) {
-            if (closed) {
-                return;
-            }
-            
-            closed = true;
-            
-            if (pipe != null) {
-                pipe.close();
-                pipe = null;
-            }
-            
-            notifyAll();            
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public long getMinIdleReconnectTime() {
-        return 10 * TimeUtils.AMINUTE;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     *
-     * <p/>Default should be "never", otherwise, connection closes while not
-     * in active use and ReliableOutputStream does NOT reconnect automatically.
-     */
-    public long getIdleTimeout() {
-        return Long.MAX_VALUE;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public void setTimeout(int timeout) {}
-    
-    /**
-     *  {@inheritDoc}
-     *
-     *  <p/>This is the important tunable: how long to wait on a stale connection.
-     */
-    public long getMaxRetryAge() {
-        return 1 * TimeUtils.AMINUTE;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public long getLastAccessed() {
-        return lastAccessed;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public void setLastAccessed(long time) {
-        lastAccessed = time;
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    @Override
-    public String toString() {
-        return ((pipe == null) ? "no pipe yet" : pipe.toString()) + " lastAccessed=" + Long.toString(lastAccessed);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/ReliableInputStream.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/ReliableInputStream.java
deleted file mode 100644 (file)
index 5233416..0000000
+++ /dev/null
@@ -1,779 +0,0 @@
-/*
- * Copyright (c) 2003-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util.pipe.reliable;
-
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InterruptedIOException;
-import java.net.SocketTimeoutException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-import net.jxta.endpoint.ByteArrayMessageElement;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.WireFormatMessageFactory;
-import net.jxta.impl.util.TimeUtils;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-
-/**
- *  Acts as a reliable input stream. Accepts data which
- *  arrives in messages and orders it.
- */
-public class ReliableInputStream extends InputStream implements Incoming {
-    
-    /**
-     *  Logger
-     */
-    private static final Logger LOG = Logger.getLogger(ReliableInputStream.class.getName());
-    
-    /**
-     *  Connection we are working for.
-     */
-    private Outgoing outgoing;
-    
-    private volatile boolean closed = false;
-    private boolean closing = false;
-    
-    private MsgListener listener = null;
-    
-    /**
-     *  The amount of time that read() operation will block. > 0
-     */
-    private long timeout;
-    
-    /**
-     *  The current sequence number we are reading bytes from.
-     */
-    private volatile int sequenceNumber = 0;
-    
-    /**
-     *  Queue of incoming messages.
-     */
-    private final List<IQElt> inputQueue = new ArrayList<IQElt>();
-    
-    /**
-     *  The I/O record for the message we are currently using for stream data.
-     */
-    private final Record record;
-    
-    /**
-     * Input record Object
-     */
-    private static class Record {
-        public InputStream inputStream;
-        // next inbuff byte
-        public long nextByte;
-        // size of Record
-        public long size;
-        
-        public Record() {
-            inputStream = null; // allocated by caller
-            nextByte = 0; // We read here (set by caller)
-            size = 0; // Record size(set by caller)
-        }
-        
-        /** reset the record element
-         *
-         */
-        public void resetRecord() {
-            if (null != inputStream) {
-                try {
-                    inputStream.close();
-                } catch (IOException ignored) {}
-            }
-            inputStream = null;
-            size = nextByte = 0;
-        }
-    }
-    
-
-    /**
-     *  An input queue element which breaks out a received message in 
-     *  enqueueMessage().
-     */
-    private static class IQElt implements Comparable {
-        final int seqnum;
-        final MessageElement elt;
-        boolean ackd = false;
-        
-        IQElt(int sequence, MessageElement element) {
-            seqnum = sequence;
-            elt = element;
-        }
-        
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        public boolean equals(Object obj) {
-            if (this == obj) {
-                return true;
-            }
-            if (obj instanceof IQElt) {
-                IQElt targ = (IQElt) obj;
-
-                return (this.seqnum == targ.seqnum);
-            }
-            return false;
-        }
-        
-        public int compareTo(IQElt el) {
-            return this.seqnum < el.seqnum ? -1 : this.seqnum == el.seqnum ? 0 : 1;
-        }
-        
-        /**
-         * {@inheritDoc}
-         */
-        public int compareTo(Object o) {
-            return compareTo((IQElt) o);
-        }
-    }
-    
-    public ReliableInputStream(Outgoing outgoing, int timeout) {
-        this(outgoing, timeout, null);
-    }
-    
-    public ReliableInputStream(Outgoing outgoing, int timeout, MsgListener listener) {
-        this.outgoing = outgoing;
-        setTimeout(timeout);
-        
-        record = new Record();
-        this.listener = listener;
-        // 1 <= seq# <= maxint, monotonically increasing
-        // Incremented before compare.
-        sequenceNumber = 0;
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            if (listener != null) {
-                LOG.info("Listener based ReliableInputStream created");
-            }
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     *
-     * <p/>This is an explicit close operation. All subsequent {@code read()}
-     * operations will fail.
-     */
-    @Override
-    public void close() throws IOException {
-        super.close();
-        synchronized (inputQueue) {
-            closed = true;
-            inputQueue.clear();
-            inputQueue.notifyAll();
-        }
-    }
-    
-    /**
-     * Returns true if closed
-     *
-     * @return true if closed
-     */
-    public boolean isInputShutdown() {
-        return closed;
-    }
-    
-    /**
-     * Prepare this input stream to being closed. It will still deliver the
-     * packets that have been received, but nothing more. This is meant to be
-     * called in response to the other side having initiated closure. We assume
-     * that when the other side does it it means that it is satisfied with what
-     * we have acknowledged so far.
-     */
-    public void softClose() {
-        synchronized (inputQueue) {
-            closing = true;
-            inputQueue.notifyAll();
-        }
-    }
-    
-    /**
-     *  Sets the Timeout attribute. A timeout of 0 blocks forever
-     *
-     * @param  timeout The new soTimeout value
-     */
-    public void setTimeout(int timeout) {
-        if (timeout < 0) {
-            throw new IllegalArgumentException("Timeout must be >=0");
-        }
-        
-        this.timeout = (0 == timeout) ? Long.MAX_VALUE : timeout;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int read() throws IOException {
-        if (closed) {
-            return -1;
-        }
-        
-        byte[] a = new byte[1];
-        
-        while (true) {
-            int len = local_read(a, 0, 1);
-            
-            if (len < 0) {
-                break;
-            }
-            if (len > 0) {
-                if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                    LOG.finer("Read() : " + (a[0] & 255));
-                }
-                
-                return a[0] & 0xFF; // The byte
-            }
-        }
-        
-        // If we've reached EOF, there's nothing to do but close().
-        
-        close();
-        return -1;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int read(byte[] a, int offset, int length) throws IOException {
-        if (closed) {
-            return -1;
-        }
-        
-        if (0 == length) {
-            return 0;
-        }
-        
-        int i = local_read(a, offset, length);
-        
-        if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-            LOG.finer("Read(byte[], int, " + length + "), bytes read = " + i);
-        }
-        
-        // If we've reached EOF; there's nothing to do but close().
-        if (i == -1) {
-            close();
-        }
-        return i;
-    }
-    
-    /**
-     *  Send a sequential ACK and selective ACKs for all of
-     *  the queued messages.
-     *
-     *  @param seqnAck the sequence number being sequential ACKed
-     */
-    private void sendACK(int seqnAck) {
-        // No need to sync on inputQueue, acking as many as we can is want we want
-        List<Integer> selectedAckList = new ArrayList<Integer>();
-        List<IQElt> queue;
-        
-        synchronized (inputQueue) {
-            queue = new ArrayList<IQElt>(inputQueue);
-        }
-        
-        Iterator<IQElt> eachInQueue = queue.iterator();
-
-        while (eachInQueue.hasNext() && (selectedAckList.size() < Defs.MAXQUEUESIZE)) {
-            IQElt anIQElt = eachInQueue.next();
-
-            if (anIQElt.seqnum > seqnAck) {
-                if (!anIQElt.ackd) {
-                    selectedAckList.add(anIQElt.seqnum);
-                    anIQElt.ackd = true;
-                }
-            }
-        }
-        
-        // PERMIT DUPLICATE ACKS. Just a list and one small message.
-        sendACK(seqnAck, selectedAckList);
-    }
-    
-    /**
-     *  Build an ACK message. The message provides a sequential ACK count and
-     *  an optional list of selective ACKs.
-     *
-     *  @param seqnAck the sequence number being sequential ACKed
-     *  @param sackList a list of selective ACKs. Must be sorted in increasing
-     *  order.
-     */
-    private void sendACK(int seqnAck, List<Integer> sackList) {
-        ByteArrayOutputStream bos = new ByteArrayOutputStream((1 + sackList.size()) * 4);
-        DataOutputStream dos = new DataOutputStream(bos);
-        
-        try {
-            dos.writeInt(seqnAck);
-            for (Integer aSackList : sackList) {
-                dos.writeInt(aSackList);
-            }
-            dos.close();
-            bos.close();
-            
-            Message ACKMsg = new Message();
-            MessageElement elt = new ByteArrayMessageElement(Defs.ACK_ELEMENT_NAME, Defs.MIME_TYPE_ACK, bos.toByteArray(), null);
-            
-            ACKMsg.addMessageElement(Defs.NAMESPACE, elt);
-            
-            outgoing.send(ACKMsg);
-            
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("SENT ACK, seqn#" + seqnAck + " and " + sackList.size() + " SACKs ");
-            }
-        } catch (IOException e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "sendACK caught IOException:", e);
-            }
-        }
-    }
-    
-    /**
-     *  {@inheritDoc}
-     */
-    public void recv(Message msg) {
-        queueIncomingMessage(msg);
-    }
-    
-    public boolean hasNextMessage() {
-        return !inputQueue.isEmpty();
-    }
-       
-    Message nextMessage(boolean blocking) throws IOException {
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("nextMessage blocking?  [" + blocking + "]");
-        }
-        MessageElement elt = dequeueMessage(sequenceNumber + 1, blocking);
-
-        if (null == elt) {
-            return null;
-        }
-        sequenceNumber += 1; // next msg sequence number
-        
-        Message msg;
-
-        try {
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Converting message seqn :" + (sequenceNumber - 1) + "element to message");
-            }
-            
-            msg = WireFormatMessageFactory.fromWire(elt.getStream(), Defs.MIME_TYPE_MSG, null);
-        } catch (IOException ex) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Could not deserialize message " + elt.getElementName(), ex);
-            }
-            return null;
-        }
-        return msg;
-    }
-    
-    /**
-     *  queue messages by sequence number.
-     */
-    private void queueIncomingMessage(Message msg) {
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Queue Incoming Message begins for " + msg);
-        }
-        
-        long startEnqueue = TimeUtils.timeNow();
-        
-        Iterator<MessageElement> eachElement = msg.getMessageElements(Defs.NAMESPACE, Defs.MIME_TYPE_BLOCK);
-        
-        // OK look for jxta message
-        while (!closed && !closing && eachElement.hasNext()) {
-            MessageElement elt = eachElement.next();
-
-            eachElement.remove();
-            
-            int msgSeqn;
-
-            try {
-                msgSeqn = Integer.parseInt(elt.getElementName());
-            } catch (NumberFormatException n) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.warning("Discarding element (" + elt.getElementName() + ") Not one of ours.");
-                }
-                continue;
-            }
-            
-            IQElt newElt = new IQElt(msgSeqn, elt);
-            
-            // OK we must enqueue
-            
-            // We rely on the sender to not to send more than the window size
-            // because we do not limit the number of elements we allow to be
-            // enqueued.
-            
-            // see if this is a duplicate
-            if (newElt.seqnum <= sequenceNumber) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("RCVD OLD MESSAGE : Discard seqn#" + newElt.seqnum + " now at seqn#" + sequenceNumber);
-                }
-                break;
-            }
-            
-            synchronized (inputQueue) {
-                
-                // dbl check with the lock held.
-                if (closing || closed) {
-                    return;
-                }
-                
-                // Insert this message into the input queue.
-                // 1. Do not add duplicate messages
-                // 2. Store in increasing sequence nos.
-                int insertIndex = inputQueue.size();
-                boolean duplicate = false;
-                
-                for (int j = 0; j < inputQueue.size(); j++) {
-                    IQElt iq = inputQueue.get(j);
-
-                    if (newElt.seqnum < iq.seqnum) {
-                        insertIndex = j;
-                        break;
-                    } else if (newElt.seqnum == iq.seqnum) {
-                        duplicate = true;
-                        break;
-                    }
-                }
-                
-                if (duplicate) {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("RCVD OLD MESSAGE :  Discard duplicate msg, seqn#" + newElt.seqnum);
-                    }
-                    break;
-                }
-                
-                inputQueue.add(insertIndex, newElt);
-                
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Enqueued msg with seqn#" + newElt.seqnum + " at index " + insertIndex);
-                }
-                
-                inputQueue.notifyAll();
-            }
-        }
-        
-        if (listener != null) {
-            Message newmsg = null;
-
-            while (true) {
-                try {
-                    newmsg = nextMessage(false);
-                } catch (IOException io) {// do nothing as this exception will never occur
-                }
-                if (newmsg == null) {
-                    break;
-                }
-                try {
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("In listener mode, calling back listener");
-                    }
-                    listener.processIncomingMessage(newmsg);
-                } catch (Throwable all) {
-                    if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                        LOG.log(Level.WARNING, "Uncaught Throwable calling listener", all);
-                    }
-                }
-            }
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            long waited = TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), startEnqueue);
-
-            LOG.fine("Queue Incoming Message for " + msg + " completed in " + waited + " msec.");
-        }
-    }
-    
-    long nextRetransRequest = TimeUtils.toAbsoluteTimeMillis(TimeUtils.ASECOND);
-    
-    /**
-     *  Dequeue the message with the desired sequence number waiting as needed
-     *  until the message is available.
-     *
-     *  @param desiredSeqn the sequence number to be dequeued.
-     *  @param blocking If {@code true} then this method should block while
-     *  waiting for the specified message sequence number.
-     *  @return the Message Element with the desired sequence number or null if
-     *  the queue has been closed.
-     */
-    private MessageElement dequeueMessage(int desiredSeqn, boolean blocking) throws IOException {
-        IQElt iQ = null;
-        
-        // Wait for incoming message here
-        long startDequeue = TimeUtils.timeNow();
-        long timeoutAt = TimeUtils.toAbsoluteTimeMillis(timeout);
-        int wct = 0;
-        
-        synchronized (inputQueue) {
-            while (!closed) {
-                if (inputQueue.isEmpty()) {
-                    if (!blocking) {
-                        return null;
-                    }
-                    if (closing) {
-                        return null;
-                    }
-                    try {
-                        wct++;
-                        inputQueue.wait(TimeUtils.ASECOND);
-                        if (timeoutAt < TimeUtils.timeNow()) {
-                            throw new SocketTimeoutException("Read timeout reached");
-                        }
-                    } catch (InterruptedException e) {
-                        Thread.interrupted();
-                    }
-                    // reset retrans request timer since we don't want to immediately
-                    // request retry after a long wait for out of order messages.
-                    
-                    nextRetransRequest = TimeUtils.toAbsoluteTimeMillis(TimeUtils.ASECOND);
-                    continue;
-                }
-                
-                iQ = inputQueue.get(0); // FIFO
-                
-                if (iQ.seqnum < desiredSeqn) {
-                    // Ooops a DUPE slipped in the head of the queue undetected
-                    // (seqnum consistency issue).
-                    // Just drop it.
-                    inputQueue.remove(0);
-                    // if such is the case then notify the other end so that
-                    // the message does not remain in the retry queue eventually
-                    // triggering a broken pipe exception
-                    sendACK(iQ.seqnum);
-                    continue;
-                } else if (iQ.seqnum != desiredSeqn) {
-                    if (TimeUtils.toRelativeTimeMillis(nextRetransRequest) < 0) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Trigger retransmission. Wanted seqn#" + desiredSeqn + " found seqn#" + iQ.seqnum);
-                        }
-                        sendACK(desiredSeqn - 1);
-                        nextRetransRequest = TimeUtils.toAbsoluteTimeMillis(TimeUtils.ASECOND);
-                    }
-                    if (!blocking) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("Message out of sequece in Non-Blocking mode. returning");
-                        }
-                        // not the element of interest return nothing
-                        return null;
-                    }
-                    try {
-                        wct++;
-                        inputQueue.wait(TimeUtils.ASECOND);
-                        if (timeoutAt < TimeUtils.timeNow()) {
-                            throw new SocketTimeoutException("Read timeout reached");
-                        }
-                    } catch (InterruptedException e) {
-                        throw new InterruptedIOException("IO interrupted ");
-                    }
-                    continue;
-                }
-                inputQueue.remove(0);
-                break;
-            }
-        }
-        nextRetransRequest = 0;
-        // if we are closed then we return null
-        if (null == iQ) {
-            return null;
-        }
-        
-        sendACK(desiredSeqn);
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            long waited = TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), startDequeue);
-
-            LOG.fine("DEQUEUED seqn#" + iQ.seqnum + " in " + waited + " msec on input queue");
-            if (wct > 0) {
-                LOG.fine("DEQUEUE waited " + wct + " times on input queue");
-            }
-        }
-        return iQ.elt;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int available() throws IOException {
-        if (listener != null) {
-            throw new IOException("available() not supported in async mode");
-        }
-        if (closed) {
-            throw new IOException("Stream closed");
-        }
-        synchronized (record) {
-            if (record.inputStream != null) {
-                if ((record.size == 0) || (record.nextByte == record.size)) {
-                    if (inputQueue.isEmpty()) {
-                        return 0;
-                    }
-                    // reset the record
-                    record.resetRecord(); // GC as necessary(inputStream byte[])
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Getting next data block at seqn#" + (sequenceNumber + 1));
-                    }
-                    MessageElement elt = dequeueMessage(sequenceNumber + 1, false);
-
-                    if (null == elt) {
-                        return 0;
-                    }
-                    sequenceNumber += 1; // next msg sequence number
-                    // Get the length of the Record
-                    record.size = elt.getByteLength();
-                    record.inputStream = elt.getStream();
-                }
-                return record.inputStream.available();
-            }
-        }
-        return 0;
-    }
-    
-    private int local_read(byte[] buf, int offset, int length) throws IOException {
-        
-        if (listener != null) {
-            throw new IOException("read() not supported in async mode");
-        }
-        
-        synchronized (record) {
-            if ((record.size == 0) || (record.nextByte == record.size)) {
-                
-                // reset the record
-                record.resetRecord(); // GC as necessary(inputStream byte[])
-                
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("Getting next data block at seqn#" + (sequenceNumber + 1));
-                }
-                
-                MessageElement elt = dequeueMessage(sequenceNumber + 1, true);
-                
-                if (null == elt) {
-                    return -1;
-                }
-                
-                sequenceNumber += 1; // next msg sequence number
-                
-                // Get the length of the Record
-                record.size = elt.getByteLength();
-                record.inputStream = elt.getStream();
-                
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("new seqn#" + sequenceNumber + ", bytes = " + record.size);
-                }
-            }
-            
-            // return the requested Record data
-            // These calls should NEVER ask for more data than is in the
-            // received Record.
-            
-            long left = record.size - record.nextByte;
-            int copyLen = (int) Math.min(length, left);
-            int copied = 0;
-            
-            do {
-                int res = record.inputStream.read(buf, offset + copied, copyLen - copied);
-                
-                if (res < 0) {
-                    break;
-                }
-                copied += res;
-            } while (copied < copyLen);
-            
-            record.nextByte += copied;
-            
-            if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) {
-                LOG.finer("Requested " + length + ", Read " + copied + " bytes");
-            }
-            
-            return copied;
-        }
-    }
-    
-    /**
-     * Returns the message listener for this pipe
-     * @return MsgListener
-     *
-     */
-    public MsgListener getListener() {
-        return listener;
-    }
-    
-    /**
-     *  The listener interface for receiving {@link net.jxta.endpoint.Message}
-     */
-    public interface MsgListener {
-        
-        /**
-         * Called for each message received.
-         *
-         * @param message The message to be received.
-         */
-        void processIncomingMessage(Message message);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/ReliableOutputStream.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/util/pipe/reliable/ReliableOutputStream.java
deleted file mode 100644 (file)
index f612963..0000000
+++ /dev/null
@@ -1,1277 +0,0 @@
-/*
- * Copyright (c) 2003-2007 Sun Microsystems, Inc.  All rights reserved.
- *  
- *  The Sun Project JXTA(TM) Software License
- *  
- *  Redistribution and use in source and binary forms, with or without 
- *  modification, are permitted provided that the following conditions are met:
- *  
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  
- *  2. Redistributions in binary form must reproduce the above copyright notice, 
- *     this list of conditions and the following disclaimer in the documentation 
- *     and/or other materials provided with the distribution.
- *  
- *  3. The end-user documentation included with the redistribution, if any, must 
- *     include the following acknowledgment: "This product includes software 
- *     developed by Sun Microsystems, Inc. for JXTA(TM) technology." 
- *     Alternately, this acknowledgment may appear in the software itself, if 
- *     and wherever such third-party acknowledgments normally appear.
- *  
- *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
- *     not be used to endorse or promote products derived from this software 
- *     without prior written permission. For written permission, please contact 
- *     Project JXTA at http://www.jxta.org.
- *  
- *  5. Products derived from this software may not be called "JXTA", nor may 
- *     "JXTA" appear in their name, without prior written permission of Sun.
- *  
- *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- *  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUN 
- *  MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- *  OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
- *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
- *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  
- *  JXTA is a registered trademark of Sun Microsystems, Inc. in the United 
- *  States and other countries.
- *  
- *  Please see the license information page at :
- *  <http://www.jxta.org/project/www/license.html> for instructions on use of 
- *  the license in source files.
- *  
- *  ====================================================================
- *  
- *  This software consists of voluntary contributions made by many individuals 
- *  on behalf of Project JXTA. For more information on Project JXTA, please see 
- *  http://www.jxta.org.
- *  
- *  This license is based on the BSD license adopted by the Apache Foundation. 
- */
-
-package net.jxta.impl.util.pipe.reliable;
-
-
-import java.io.ByteArrayOutputStream;
-import net.jxta.endpoint.ByteArrayMessageElement;
-import net.jxta.endpoint.Message;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.StringMessageElement;
-import net.jxta.endpoint.WireFormatMessage;
-import net.jxta.endpoint.WireFormatMessageFactory;
-import net.jxta.impl.util.TimeUtils;
-import net.jxta.logging.Logging;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * Accepts data and packages it into messages for sending to the remote. The
- * messages are kept in a retry queue until the remote peer acknowledges
- * receipt of the message.
- */
-public class ReliableOutputStream extends OutputStream implements Incoming {
-    
-    /**
-     * Logger
-     */
-    private final static Logger LOG = Logger.getLogger(ReliableOutputStream.class.getName());
-    
-    /**
-     * Initial estimated Round Trip Time
-     */
-    private final static long initRTT = 10 * TimeUtils.ASECOND;
-    
-    /**
-     *  The default size for the blocks we will chunk the stream into.
-     */
-    private final static int DEFAULT_MESSAGE_CHUNK_SIZE = 63 * 1024;
-    
-    private final static MessageElement RETELT = new StringMessageElement(Defs.RETRY_ELEMENT_NAME, Defs.RETRY_ELEMENT_VALUE, null);
-    
-    /**
-     * A lock we use to ensure that write operations happen in order.
-     */
-    private final Object writeLock = new String("writeLock");
-    
-    /**
-     * The buffer we cache writes to.
-     */
-    private byte[] writeBuffer = null;
-    
-    /**
-     * Number of bytes written to the write buffer.
-     */
-    private int writeCount = 0;
-    
-    /**
-     * Set the default write buffer size.
-     */
-    private int writeBufferSize = DEFAULT_MESSAGE_CHUNK_SIZE;
-    
-    /**
-     * Absolute time in milliseconds at which the write buffer began
-     * accumulating bytes to be written.
-     */
-    private long writeBufferAge = Long.MAX_VALUE;
-    
-    /**
-     * If less than {@code TimeUtils.timenow()} then we are closed otherwise
-     * this is the absolute time at which we will become closed. We begin by
-     * setting this value as {@Long.MAX_VALUE} until we establish an earlier
-     * close deadline.
-     */
-    private long closedAt = Long.MAX_VALUE;
-    
-    /**
-     * If {@code true} then we have received a close request from the remote
-     * side. They do not want to receive any more messages from us.
-     */
-    private volatile boolean remoteClosed = false;
-    
-    /**
-     * If {@code true} then we have closed this stream locally and will not
-     * accept any further messages for sending. Unacknowledged messages will
-     * be retransmitted until the linger delay is passed.
-     */
-    private volatile boolean localClosed = false;
-    
-    /**
-     * The relative time in milliseconds that we will allow our connection to
-     * linger.
-     */
-    private long lingerDelay = 120 * TimeUtils.ASECOND;
-    
-    /**
-     * Sequence number of the message we most recently sent out.
-     */
-    private AtomicInteger sequenceNumber = new AtomicInteger(0);
-    
-    /**
-     * Sequence number of highest sequential ACK.
-     */
-    private volatile int maxACK = 0;
-    
-    /**
-     * connection we are working for
-     */
-    private final Outgoing outgoing;
-    
-    /**
-     *  The daemon thread that performs retransmissions.
-     */
-    private Thread retrThread = null;
-    
-    // for retransmission
-    /**
-     * Average round trip time in milliseconds.
-     */
-    private volatile long aveRTT = initRTT;
-    private volatile long remRTT = 0;
-    
-    /**
-     * Has aveRTT been set at least once over its initial guesstimate value.
-     */
-    private boolean aveRTTreset = false;
-    
-    /**
-     * Number of ACK message received.
-     */
-    private AtomicInteger numACKS = new AtomicInteger(0);
-    
-    /**
-     * When to start computing aveRTT
-     */
-    private int rttThreshold = 0;
-    
-    /**
-     * Retry Time Out measured in milliseconds.
-     */
-    private volatile long RTO = 0;
-    
-    /**
-     * Minimum Retry Timeout measured in milliseconds.
-     */
-    private volatile long minRTO = initRTT * 5;
-    
-    /**
-     * Maximum Retry Timeout measured in milliseconds.
-     */
-    private volatile long maxRTO = initRTT * 60;
-    
-    /**
-     * absolute time in milliseconds of last sequential ACK.
-     */
-    private volatile long lastACKTime = 0;
-    
-    /**
-     * absolute time in milliseconds of last SACK based retransmit.
-     */
-    private volatile long sackRetransTime = 0;
-    
-    // running average of receipients Input Queue
-    private int nIQTests = 0;
-    private int aveIQSize = 0;
-    
-    /**
-     * Our estimation of the current free space in the remote input queue.
-     */
-    private volatile int mrrIQFreeSpace = 0;
-    
-    /**
-     * Our estimation of the maximum size of the remote input queue.
-     */
-    private int rmaxQSize = Defs.MAXQUEUESIZE;
-    
-    /**
-     * The flow control module.
-     */
-    private final FlowControl fc;
-    
-    /**
-     * Cache of the last rwindow recommendation by fc.
-     */
-    private volatile int rwindow = 0;
-    
-    /**
-     * retrans queue element
-     */
-    private static class RetrQElt {
-        
-        /**
-         * sequence number of this message.
-         */
-        final int seqnum;
-        
-        /**
-         * the message
-         */
-        final Message msg;
-        
-        /**
-         * absolute time of original enqueuing
-         */
-        final long enqueuedAt;
-        
-        /**
-         * has been marked as retransmission
-         */
-        int marked;
-        
-        /**
-         * absolute time when this msg was last transmitted
-         */
-        long sentAt;
-        
-        /**
-         * Constructor for the RetrQElt object
-         *
-         * @param seqnum sequence number
-         * @param msg    the message
-         */
-        public RetrQElt(int seqnum, Message msg) {
-            this.seqnum = seqnum;
-            this.msg = msg;
-            this.enqueuedAt = TimeUtils.timeNow();
-            this.sentAt = this.enqueuedAt;
-            this.marked = 0;
-        }
-    }
-    
-    /**
-     * The collection of messages available for re-transmission.
-     */
-    protected final List<RetrQElt> retrQ = new ArrayList<RetrQElt>();
-    
-    /**
-     * Constructor for the ReliableOutputStream object
-     *
-     * @param outgoing the outgoing object
-     */
-    public ReliableOutputStream(Outgoing outgoing) {
-        // By default use the old behaviour: fixed fc with a rwin of 20
-        this(outgoing, new FixedFlowControl(20));
-    }
-    
-    /**
-     * Constructor for the ReliableOutputStream object
-     *
-     * @param outgoing the outgoing object
-     * @param fc       flow-control
-     */
-    public ReliableOutputStream(Outgoing outgoing, FlowControl fc) {
-        this.outgoing = outgoing;
-        
-        // initial RTO is set to maxRTO so as to give time
-        // to the receiver to catch-up
-        this.RTO = maxRTO;
-        
-        this.mrrIQFreeSpace = rmaxQSize;
-        this.rttThreshold = rmaxQSize;
-        
-        // Init last ACK Time to now
-        this.lastACKTime = TimeUtils.timeNow();
-        this.sackRetransTime = TimeUtils.timeNow();
-        
-        // Attach the flowControl module
-        this.fc = fc;
-        
-        // Update our initial rwindow to reflect fc's initial value
-        this.rwindow = fc.getRwindow();
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void close() throws IOException {
-        flush();
-        
-        super.close();
-        localClosed = true;
-        closedAt = TimeUtils.toRelativeTimeMillis(lingerDelay);
-        
-        synchronized (retrQ) {
-            retrQ.notifyAll();
-        }
-        
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Closed.");
-        }
-    }
-    
-    public long getLingerDelay() {
-        return lingerDelay;
-    }
-    
-    public void setLingerDelay(long linger) {
-        if (linger < 0) {
-            throw new IllegalArgumentException("Linger delay may not be negative.");
-        }
-        
-        if (0 == linger) {
-            linger = Long.MAX_VALUE;
-        }
-        
-        lingerDelay = linger;
-    }
-    
-    /**
-     * Return the size of the buffers we are using for accumulating writes.
-     *
-     * @return size of our write buffers.
-     */
-    public int setSendBufferSize() {
-        return writeBufferSize;
-    }
-    
-    /**
-     * Set the size of the buffers we will use for accumulating writes.
-     *
-     * @param size The desired size of write buffers.
-     * @throws IOException if an I/O error occurs. In particular, an IOException is thrown if the output stream is closed.
-     */
-    public void setSendBufferSize(int size) throws IOException {
-        if (size <= 0) {
-            throw new IllegalArgumentException("Send buffer size may not be <= 0");
-        }
-        
-        // Flush any existing buffered writes. Then next write will use the new buffer size.
-        synchronized (writeLock) {
-            flushBuffer();
-            writeBufferSize = size;
-        }
-    }
-    
-    /**
-     * We have received a close request from the remote peer. We must stop
-     * retransmissions immediately.
-     */
-    public void hardClose() {
-        remoteClosed = true;
-        closedAt = TimeUtils.timeNow();
-        
-        // Clear the retry queue. Remote side doesn't care.
-        synchronized (retrQ) {
-            retrQ.clear();
-            retrQ.notifyAll();
-        }
-        
-        // Clear the write queue. Remote side doesn't care.
-        synchronized (writeLock) {
-            writeCount = 0;
-            writeBuffer = null;
-            writeBufferAge = Long.MAX_VALUE;
-        }
-        
-        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-            LOG.info("Hard closed.");
-        }
-    }
-    
-    /**
-     * Returns the state of the stream
-     *
-     * @return true if closed
-     */
-    public boolean isClosed() {
-        return localClosed || remoteClosed;
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void flush() throws IOException {
-        synchronized (writeLock) {
-            flushBuffer();
-        }
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void write(int b) throws IOException {
-        write(new byte[] { (byte) b }, 0, 1);
-    }
-    
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void write(byte b[], int off, int len) throws IOException {
-        synchronized (writeLock) {
-            if (isClosed()) {
-                throw new IOException("stream is closed");
-            }
-            
-            if ((off < 0) || (off > b.length) || (len < 0) || ((off + len) > b.length) || ((off + len) < 0)) {
-                throw new IndexOutOfBoundsException();
-            }
-            
-            if (len == 0) {
-                return;
-            }
-            
-            int current = off;
-            int end = current + len;
-            
-            while (current < end) {
-                if (0 == writeCount) {
-                    // No bytes written? We need a new buffer.
-                    writeBuffer = new byte[writeBufferSize];
-                    writeBufferAge = TimeUtils.timeNow();
-                }
-                
-                int remain = end - current;
-                
-                int available = writeBuffer.length - writeCount;
-                int copy = Math.min(available, remain);
-                
-                System.arraycopy(b, current, writeBuffer, writeCount, copy);
-                writeCount += copy;
-                current += copy;
-                
-                if (writeBuffer.length == writeCount) {
-                    flushBuffer();
-                }
-            }
-        }
-    }
-    
-    /**
-     * Flush the internal buffer. {@code writeLock} must have been previously
-     * acquired.
-     * @throws IOException if an I/O error occurs. In particular, an IOException is thrown if the output stream is closed.
-     */
-    private void flushBuffer() throws IOException {
-        if (writeCount > 0) {
-            // send the message
-            try {
-                writeBuffer(writeBuffer, 0, writeCount);
-            } finally {
-                writeCount = 0;
-                writeBuffer = null;
-                writeBufferAge = Long.MAX_VALUE;
-            }
-        }
-    }
-    
-    /**
-     * Write the internal buffer. {@code writeLock} must have been previously
-     * acquired.
-     *
-     * @param b data
-     * @param off  the start offset in the data.
-     * @param len     the number of bytes to write.
-     * @throws IOException if an I/O error occurs. In particular, an IOException is thrown if the output stream is closed.
-     */
-    private void writeBuffer(byte[] b, int off, int len) throws IOException {
-        if ((off < 0) || (off > b.length) || (len < 0) || ((off + len) > b.length) || ((off + len) < 0)) {
-            throw new IndexOutOfBoundsException();
-        }
-        
-        if (len == 0) {
-            return;
-        }
-        
-        if (null == retrThread) {
-            retrThread = new Thread(new Retransmitter(), "JXTA Reliable Retransmiter for " + this);
-            retrThread.setDaemon(true);
-            retrThread.start();
-        }
-        
-        // allocate new message
-        Message jmsg = new Message();
-
-        synchronized (retrQ) {
-            while (true) {
-                if (isClosed()) {
-                    throw new IOException("Connection is " + (localClosed ? "closing" : "closed"));
-                }
-                if (retrQ.size() > Math.min(rwindow, mrrIQFreeSpace * 2)) {
-                    try {
-                        retrQ.wait(1000);
-                    } catch (InterruptedException ignored) {// ignored
-                    }
-                    continue;
-                }
-                break;
-            }
-            
-            int sequenceToUse = sequenceNumber.incrementAndGet();
-            MessageElement element = new ByteArrayMessageElement(Integer.toString(sequenceToUse), Defs.MIME_TYPE_BLOCK, b, off
-                    ,
-                    len, null);
-
-            jmsg.addMessageElement(Defs.NAMESPACE, element);
-            RetrQElt retrQel = new RetrQElt(sequenceToUse, jmsg.clone());
-            
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Reliable WRITE : seqn#" + sequenceNumber + " length=" + len);
-            }
-            
-            // place copy on retransmission queue
-            retrQ.add(retrQel);
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Retrans Enqueue added seqn#" + sequenceNumber + " retrQ.size()=" + retrQ.size());
-            }
-        }
-        
-        outgoing.send(jmsg);
-        mrrIQFreeSpace--;
-        // assume we have now taken a slot
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("SENT : seqn#" + sequenceNumber + " length=" + len);
-        }
-    }
-    
-    /**
-     * Serialize a JXTA message as a reliable message.
-     *
-     * <p/>This method bypasses the built-in buffering and ignores the MTU size.
-     *
-     * @param msg message to send
-     * @return message sequence number
-     * @throws IOException if an I/O error occurs
-     */
-    public int send(Message msg) throws IOException {
-        WireFormatMessage msgSerialized = WireFormatMessageFactory.toWire(msg, Defs.MIME_TYPE_MSG, null);
-        ByteArrayOutputStream baos = new ByteArrayOutputStream((int) msgSerialized.getByteLength());
-
-        msgSerialized.sendToStream(baos);
-        baos.close();
-        byte[] bytes = baos.toByteArray();
-        
-        synchronized (writeLock) {
-            flushBuffer();
-            writeBuffer(bytes, 0, bytes.length);
-            return sequenceNumber.get();
-        }
-    }
-    
-    /**
-     * Gets the maxAck attribute of the ReliableOutputStream object
-     *
-     * @return The maxAck value
-     */
-    public int getMaxAck() {
-        return maxACK;
-    }
-    
-    /**
-     * Gets the seqNumber attribute of the ReliableOutputStream object
-     *
-     * @return The seqNumber value
-     */
-    public int getSeqNumber() {
-        return sequenceNumber.get();
-    }
-    
-    /**
-     * Gets the queueFull attribute of the ReliableOutputStream object
-     *
-     * @return The queueFull value
-     */
-    protected boolean isQueueFull() {
-        return mrrIQFreeSpace < 1;
-    }
-    
-    /**
-     * Gets the queueEmpty attribute of the ReliableOutputStream object.
-     *
-     * @return {@code true} if the queue is empty otherwise {@code false}.
-     */
-    public boolean isQueueEmpty() {
-        synchronized (retrQ) {
-            return retrQ.isEmpty();
-        }
-    }
-    
-    /**
-     * Waits for the retransmit queue to become empty.
-     *
-     * @param timeout The relative time in milliseconds to wait for the queue to
-     *                become empty.
-     * @return {@code true} if the queue is empty otherwise {@code false}.
-     * @throws InterruptedException if interrupted
-     */
-    public boolean waitQueueEmpty(long timeout) throws InterruptedException {
-        long timeoutAt = TimeUtils.toAbsoluteTimeMillis(timeout);
-        
-        synchronized (retrQ) {
-            while (!retrQ.isEmpty() && (TimeUtils.timeNow() < timeoutAt)) {
-                long sleepTime = TimeUtils.toRelativeTimeMillis(timeoutAt);
-                
-                if (sleepTime > 0) {
-                    retrQ.wait(sleepTime);
-                }
-            }
-            
-            return retrQ.isEmpty();
-        }
-    }
-    
-    /**
-     * wait for activity on the retry queue
-     *
-     * @param timeout timeout in millis
-     * @throws InterruptedException when interrupted
-     */
-    public void waitQueueEvent(long timeout) throws InterruptedException {
-        synchronized (retrQ) {
-            retrQ.wait(timeout);
-        }
-    }
-    
-    /**
-     * Calculates a message retransmission time-out
-     *
-     * @param dt        base time
-     * @param msgSeqNum Message sequence number
-     */
-    private void calcRTT(long dt, int msgSeqNum) {
-        
-        if (numACKS.incrementAndGet() == 1) {
-            // First ACK arrived. We can start computing aveRTT on the messages
-            // we send from now on.
-            rttThreshold = sequenceNumber.get() + 1;
-        }
-        
-        if (msgSeqNum > rttThreshold) {
-            // Compute only when it has stabilized a bit
-            // Since the initial mrrIQFreeSpace is small; the first few
-            // messages will be sent early on and may wait a long time
-            // for the return channel to initialize. After that things
-            // start flowing and RTT becomes relevant.
-            // Carefull with the computation: integer division with round-down
-            // causes cumulative damage: the ave never goes up if this is not
-            // taken care of. We keep the reminder from one round to the other.
-            
-            if (!aveRTTreset) {
-                aveRTT = dt;
-                aveRTTreset = true;
-            } else {
-                long tmp = (8 * aveRTT) + ((8 * remRTT) / 9) + dt;
-
-                aveRTT = tmp / 9;
-                remRTT = tmp - aveRTT * 9;
-            }
-        }
-        
-        // Set retransmission time out: 2.5 x RTT
-        // RTO = (aveRTT << 1) + (aveRTT >> 1);
-        RTO = aveRTT * 2;
-        
-        // Enforce a min/max
-        RTO = Math.max(RTO, minRTO);
-        RTO = Math.min(RTO, maxRTO);
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("RTT = " + dt + "ms aveRTT = " + aveRTT + "ms" + " RTO = " + RTO + "ms");
-        }
-    }
-    
-    /**
-     * @param iq Description of the Parameter
-     * @return Description of the Return Value
-     */
-    private int calcAVEIQ(int iq) {
-        int n = nIQTests;
-
-        nIQTests += 1;
-        aveIQSize = ((n * aveIQSize) + iq) / nIQTests;
-        return aveIQSize;
-    }
-    
-    /**
-     * process an incoming message
-     *
-     * @param msg message to process
-     */
-    public void recv(Message msg) {
-        
-        Iterator<MessageElement> eachACK = msg.getMessageElements(Defs.NAMESPACE, Defs.MIME_TYPE_ACK);
-        
-        while (eachACK.hasNext()) {
-            MessageElement elt = eachACK.next();
-
-            eachACK.remove();
-            int sackCount = ((int) elt.getByteLength() / 4) - 1;
-            
-            try {
-                DataInputStream dis = new DataInputStream(elt.getStream());
-                int seqack = dis.readInt();
-                int[] sacs = new int[sackCount];
-
-                for (int eachSac = 0; eachSac < sackCount; eachSac++) {
-                    sacs[eachSac] = dis.readInt();
-                }
-                Arrays.sort(sacs);
-                // take care of the ACK here;
-                ackReceived(seqack, sacs);
-            } catch (IOException failed) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failure processing ACK", failed);
-                }
-            }
-        }
-    }
-    
-    /**
-     * Process an ACK Message. We remove ACKed
-     * messages from the retry queue.  We only
-     * acknowledge messages received in sequence.
-     * <p/>
-     * The seqnum is for the largest unacknowledged seqnum
-     * the recipient has received.
-     * <p/>
-     * The sackList is a sequence of all of the
-     * received messages in the sender's input Q. All
-     * will be sequence numbers higher than the
-     * sequential ACK seqnum.
-     * <p/>
-     * Recipients are passive and only ack upon the
-     * receipt of an in sequence message.
-     * <p/>
-     * They depend on our RTO to fill holes in message
-     * sequences.
-     *
-     * @param seqnum   message sequence number
-     * @param sackList array of message sequence numbers
-     */
-    public void ackReceived(int seqnum, int[] sackList) {
-        
-        int numberACKed = 0;
-        long rttCalcDt = 0;
-        int rttCalcSeqnum = -1;
-        long fallBackDt = 0;
-        int fallBackSeqnum = -1;
-        
-        // remove acknowledged messages from retrans Q.
-        synchronized (retrQ) {
-            lastACKTime = TimeUtils.timeNow();
-            fc.ackEventBegin();
-            maxACK = Math.max(maxACK, seqnum);
-            
-            // dump the current Retry queue and the SACK list
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                StringBuilder dumpRETRQ = new StringBuilder("ACK RECEIVE : " + Integer.toString(seqnum));
-                
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    dumpRETRQ.append('\n');
-                }
-                dumpRETRQ.append("\tRETRQ (size=").append(retrQ.size()).append(")");
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    dumpRETRQ.append(" : ");
-                    for (int y = 0; y < retrQ.size(); y++) {
-                        if (0 != y) {
-                            dumpRETRQ.append(", ");
-                        }
-                        RetrQElt r = retrQ.get(y);
-                        
-                        dumpRETRQ.append(r.seqnum);
-                    }
-                }
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    dumpRETRQ.append('\n');
-                }
-                dumpRETRQ.append("\tSACKLIST (size=").append(sackList.length).append(")");
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    dumpRETRQ.append(" : ");
-                    for (int y = 0; y < sackList.length; y++) {
-                        if (0 != y) {
-                            dumpRETRQ.append(", ");
-                        }
-                        dumpRETRQ.append(sackList[y]);
-                    }
-                }
-                LOG.fine(dumpRETRQ.toString());
-            }
-            
-            Iterator<RetrQElt> eachRetryQueueEntry = retrQ.iterator();
-
-            // First remove monotonically increasing seq#s in retrans vector
-            while (eachRetryQueueEntry.hasNext()) {
-                RetrQElt retrQElt = eachRetryQueueEntry.next();
-
-                if (retrQElt.seqnum > seqnum) {
-                    break;
-                }
-                // Acknowledged
-                eachRetryQueueEntry.remove();
-                
-                // Update RTT, RTO. Use only those that where acked
-                // w/o retrans otherwise the number may be phony (ack
-                // of first xmit received just after resending => RTT
-                // seems small).  Also, we keep the worst of the bunch
-                // we encounter.  If we really can't find a single
-                // non-resent message, we make do with a pessimistic
-                // approximation: we must not be left behind with an
-                // RTT that's too short, we'd keep resending like
-                // crazy.
-                long enqueuetime = retrQElt.enqueuedAt;
-                long dt = TimeUtils.toRelativeTimeMillis(lastACKTime, enqueuetime);
-
-                // Update RTT, RTO
-                if (retrQElt.marked == 0) {
-                    if (dt > rttCalcDt) {
-                        rttCalcDt = dt;
-                        rttCalcSeqnum = retrQElt.seqnum;
-                    }
-                } else {
-                    // In case we find no good candidate, make
-                    // a guess by dividing by the number of attempts
-                    // and keep the worst of them too. Since we
-                    // know it may be too short, we will not use it
-                    // if shortens rtt.
-                    dt /= (retrQElt.marked + 1);
-                    if (dt > fallBackDt) {
-                        fallBackDt = dt;
-                        fallBackSeqnum = retrQElt.seqnum;
-                    }
-                }
-                fc.packetACKed(retrQElt.seqnum);
-                retrQElt = null;
-                numberACKed++;
-            }
-            // Update last accessed time in response to getting seq acks.
-            if (numberACKed > 0) {
-                outgoing.setLastAccessed(TimeUtils.timeNow());
-            }
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("SEQUENTIALLY ACKD SEQN = " + seqnum + ", (" + numberACKed + " acked)");
-            }
-            // most recent remote IQ free space
-            mrrIQFreeSpace = rmaxQSize - sackList.length;
-            // let's look at average sacs.size(). If it is big, then this
-            // probably means we must back off because the system is slow.
-            // Our retrans Queue can be large and we can overwhelm the
-            // receiver with retransmissions.
-            // We will keep the rwin <= ave real input queue size.
-            int aveIQ = calcAVEIQ(sackList.length);
-
-            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("remote IQ free space = " + mrrIQFreeSpace + " remote avg IQ occupancy = " + aveIQ);
-            }
-            
-            int retrans = 0;
-
-            if (sackList.length > 0) {
-                Iterator<RetrQElt> eachRetrQElement = retrQ.iterator();
-                int currentSACK = 0;
-
-                while (eachRetrQElement.hasNext()) {
-                    RetrQElt retrQElt = eachRetrQElement.next();
-
-                    while (sackList[currentSACK] < retrQElt.seqnum) {
-                        currentSACK++;
-                        if (currentSACK == sackList.length) {
-                            break;
-                        }
-                    }
-                    if (currentSACK == sackList.length) {
-                        break;
-                    }
-                    if (sackList[currentSACK] == retrQElt.seqnum) {
-                        fc.packetACKed(retrQElt.seqnum);
-                        numberACKed++;
-                        eachRetrQElement.remove();
-                        
-                        // Update RTT, RTO. Use only those that where acked w/o retrans
-                        // otherwise the number is completely phony.
-                        // Also, we keep the worst of the bunch we encounter.
-                        long enqueuetime = retrQElt.enqueuedAt;
-                        long dt = TimeUtils.toRelativeTimeMillis(lastACKTime, enqueuetime);
-
-                        // Update RTT, RTO
-                        if (retrQElt.marked == 0) {
-                            if (dt > rttCalcDt) {
-                                rttCalcDt = dt;
-                                rttCalcSeqnum = retrQElt.seqnum;
-                            }
-                        } else {
-                            // In case we find no good candidate, make
-                            // a guess by dividing by the number of attempts
-                            // and keep the worst of them too. Since we
-                            // know it may be too short, we will not use it
-                            // if shortens rtt.
-                            dt /= (retrQElt.marked + 1);
-                            if (dt > fallBackDt) {
-                                fallBackDt = dt;
-                                fallBackSeqnum = retrQElt.seqnum;
-                            }
-                        }
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("SACKD SEQN = " + retrQElt.seqnum);
-                        }
-                        
-                        // GC this stuff
-                        retrQElt = null;
-                        
-                    } else {
-                        // Retransmit? Only if there is a hole in the selected
-                        // acknowledgement list. Otherwise let RTO deal.
-                        
-                        // Given that this SACK acknowledged messages still
-                        // in the retrQ:
-                        // seqnum is the max consectively SACKD message.
-                        // seqnum < retrQElt.seqnum means a message has not reached
-                        // receiver. EG: sacklist == 10,11,13 seqnum == 11
-                        // We retransmit 12.
-                        if (seqnum < retrQElt.seqnum) {
-                            fc.packetMissing(retrQElt.seqnum);
-                            retrans++;
-                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                LOG.fine("RETR: Fill hole, SACK, seqn#" + retrQElt.seqnum + ", Window =" + retrans);
-                            }
-                        }
-                    }
-                }
-                
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("SELECTIVE ACKD (" + numberACKed + ") " + retrans + " retrans wanted");
-                }
-            }
-            
-            // Compute aveRTT on the most representative message,
-            // if any. That's the most accurate data.
-            // Failing that we use the fall back, provided that it not
-            // more recent than aveRTT ago - that would decrease aveRTT
-            // and in the absence of solid data, we do not want to take
-            // that risk.
-            if (rttCalcSeqnum != -1) {
-                calcRTT(rttCalcDt, rttCalcSeqnum);
-                // get fc to recompute rwindow
-                rwindow = fc.ackEventEnd(rmaxQSize, aveRTT, rttCalcDt);
-            } else if ((fallBackSeqnum != -1) && (fallBackDt > aveRTT)) {
-                calcRTT(fallBackDt, fallBackSeqnum);
-                // get fc to recompute rwindow
-                rwindow = fc.ackEventEnd(rmaxQSize, aveRTT, fallBackDt);
-            }
-            retrQ.notifyAll();
-        }
-    }
-    
-    /**
-     * retransmit unacknowledged  messages
-     *
-     * @param rwin        max number of messages to retransmit
-     * @param triggerTime base time
-     * @return number of messages retransmitted.
-     */
-    private int retransmit(int rwin, long triggerTime) {
-        
-        List<RetrQElt> retransMsgs = new ArrayList<RetrQElt>();
-        
-        int numberToRetrans;
-        
-        // build a list of retries.
-        synchronized (retrQ) {
-            numberToRetrans = Math.min(retrQ.size(), rwin);
-            if (numberToRetrans > 0 && Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                LOG.fine("Number of messages pending retransmit =" + numberToRetrans);
-            }
-            for (int j = 0; j < numberToRetrans; j++) {
-                RetrQElt r = retrQ.get(j);
-
-                // Mark message as retransmission
-                // need to know if a msg was retr or not for RTT eval
-                if (r.marked == 0) {
-                    // First time: we're here because this message has not arrived, but
-                    // the next one has. It may be an out of order message.
-                    // Experience shows that such a message rarely arrives older than
-                    // 1.2 * aveRTT. Beyond that, it's lost. It is also rare that we
-                    // detect a hole within that delay. So, often enough, as soon as
-                    // a hole is detected, it's time to resend...but not always.
-                    if (TimeUtils.toRelativeTimeMillis(triggerTime, r.sentAt) < (6 * aveRTT) / 5) {
-                        // Nothing to worry about, yet.
-                        continue;
-                    }
-                } else {
-                    // That one has been retransmitted at least once already.
-                    // So, we don't have much of a clue other than the age of the
-                    // last transmission. It is unlikely that it arrives before aveRTT/2
-                    // but we have to anticipate its loss at the risk of making dupes.
-                    // Otherwise the receiver will reach the hole, and that's really
-                    // expensive. (Think that we've been trying for a while already.)
-                    
-                    if (TimeUtils.toRelativeTimeMillis(triggerTime, r.sentAt) < aveRTT) {
-                        // Nothing to worry about, yet.
-                        continue;
-                    }
-                }
-                r.marked++;
-                // Make a copy to for sending
-                retransMsgs.add(r);
-            }
-        }
-        
-        // send the retries.
-        int retransmitted = 0;
-        Iterator<RetrQElt> eachRetrans = retransMsgs.iterator();
-
-        while (eachRetrans.hasNext()) {
-            RetrQElt r = eachRetrans.next();
-
-            eachRetrans.remove();
-            try {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.fine("RETRANSMIT seqn#" + r.seqnum);
-                }
-                Message sending = r.msg;
-
-                // its possible that the message was
-                // acked while we were working in this
-                // case r.msg will have been nulled.
-                if (null != sending) {
-                    sending = sending.clone();
-                    sending.replaceMessageElement(Defs.NAMESPACE, RETELT);
-                    if (outgoing.send(sending)) {
-                        r.sentAt = TimeUtils.timeNow();
-                        mrrIQFreeSpace--;
-                        // assume we have now taken a slot
-                        retransmitted++;
-                    } else {
-                        break;
-                        // don't bother continuing sending now.
-                    }
-                }
-            } catch (IOException e) {
-                if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                    LOG.log(Level.FINE, "FAILED RETRANS seqn#" + r.seqnum, e);
-                }
-                break;
-                // don't bother continuing.
-            }
-        }
-        
-        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-            LOG.fine("RETRANSMITED " + retransmitted + " of " + numberToRetrans);
-        }
-        
-        return retransmitted;
-    }
-    
-    /**
-     * Retransmission daemon thread
-     */
-    private class Retransmitter implements Runnable {
-        
-        int nAtThisRTO = 0;
-        volatile int nretransmitted = 0;
-        
-        /**
-         * Constructor for the Retransmitter object
-         */
-        public Retransmitter() {
-            if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                LOG.info("STARTED Reliable Retransmitter, RTO = " + RTO);
-            }
-        }
-        
-        /**
-         * Gets the retransCount attribute of the Retransmitter object
-         *
-         * @return The retransCount value
-         */
-        public int getRetransCount() {
-            return nretransmitted;
-        }
-        
-        /**
-         *  {@inheritDoc}
-         *
-         *  <p/>Main processing method for the Retransmitter object
-         */
-        public void run() {
-            try {
-                int idleCounter = 0;
-                
-                while (TimeUtils.toRelativeTimeMillis(closedAt) > 0) {
-                    long conn_idle = TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), outgoing.getLastAccessed());
-
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine(outgoing + " idle for " + conn_idle);
-                    }
-                    
-                    // check to see if we have not idled out.
-                    if (outgoing.getIdleTimeout() < conn_idle) {
-                        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                            LOG.info("Shutting down idle " + "connection " + outgoing);
-                        }
-                        
-                        break;
-                    }
-                    
-                    long sinceLastACK;
-                    long oldestInQueueWait;
-                    
-                    synchronized (retrQ) {
-                        try {
-                            if (RTO > 0) {
-                                retrQ.wait(RTO);
-                            }
-                            Thread.currentThread().setName(
-                                    "JXTA Reliable Retransmiter for " + this + " Queue size : " + retrQ.size());
-                        } catch (InterruptedException e) {// ignored
-                        }
-                        
-                        if (TimeUtils.toRelativeTimeMillis(closedAt) <= 0) {
-                            break;
-                        }
-                        
-                        // see if we recently did a retransmit triggered by a SACK
-                        long sinceLastSACKRetr = TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), sackRetransTime);
-
-                        if (sinceLastSACKRetr < RTO) {
-                            if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                                LOG.fine("SACK retrans " + sinceLastSACKRetr + "ms ago");
-                            }
-                            continue;
-                        }
-                        // See how long we've waited since RTO was set
-                        sinceLastACK = TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), lastACKTime);
-                        
-                        if (!retrQ.isEmpty()) {
-                            RetrQElt elt = retrQ.get(0);
-
-                            oldestInQueueWait = TimeUtils.toRelativeTimeMillis(TimeUtils.timeNow(), elt.enqueuedAt);
-                        } else {
-                            oldestInQueueWait = 0;
-                        }
-                    }
-                    
-                    if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                        LOG.fine("Last ACK " + sinceLastACK + "ms ago. Age of oldest in Queue " + oldestInQueueWait + "ms.");
-                    }
-                    
-                    // see if the queue has gone dead
-                    if (oldestInQueueWait > outgoing.getMaxRetryAge()) {
-                        if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                            LOG.info("Shutting down stale connection " + outgoing);
-                        }
-                        
-                        break;
-                    }
-                    
-                    // get real wait as max of age of oldest in retrQ and
-                    // lastAck time
-                    long realWait = Math.max(oldestInQueueWait, sinceLastACK);
-
-                    // Retransmit only if RTO has expired.
-                    // a. real wait time is longer than RTO
-                    // b. oldest message on Q has been there longer
-                    // than RTO. This is necessary because we may
-                    // have just sent a message, and we do not
-                    // want to overrun the receiver. Also, we
-                    // do not want to restransmit a message that
-                    // has not been idle for the RTO.
-                    if ((realWait >= RTO) && (oldestInQueueWait >= RTO)) {
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("RTO RETRANSMISSION [" + rwindow + "]");
-                        }
-                        // retransmit
-                        int retransed = retransmit(rwindow, TimeUtils.timeNow());
-
-                        // Total
-                        nretransmitted += retransed;
-                        // number at this RTO
-                        nAtThisRTO += retransed;
-                        // See if real wait is too long and queue is non-empty
-                        // Remote may be dead - double until max.
-                        // Double after window restransmitted msgs at this RTO
-                        // exceeds the rwindow, and we've had no response for
-                        // twice the current RTO.
-                        if ((retransed > 0) && (realWait >= 2 * RTO) && (nAtThisRTO >= 2 * rwindow)) {
-                            RTO = (realWait > maxRTO ? maxRTO : 2 * RTO);
-                            nAtThisRTO = 0;
-                        }
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine(
-                                    "RETRANSMISSION " + retransed + " retrans " + nAtThisRTO + " at this RTO (" + RTO + ") "
-                                    + nretransmitted + " total retrans");
-                        }
-                    } else {
-                        idleCounter += 1;
-                        // reset RTO to min if we are idle
-                        if (idleCounter == 2) {
-                            RTO = minRTO;
-                            idleCounter = 0;
-                            nAtThisRTO = 0;
-                        }
-                        if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
-                            LOG.fine("IDLE : RTO=" + RTO + " WAIT=" + realWait);
-                        }
-                    }
-                }
-            } catch (Throwable all) {
-                LOG.log(Level.SEVERE, "Uncaught Throwable in thread :" + Thread.currentThread().getName(), all);
-            } finally {
-                hardClose();
-                
-                retrThread = null;
-                
-                if (Logging.SHOW_INFO && LOG.isLoggable(Level.INFO)) {
-                    LOG.info("STOPPED Retransmit thread");
-                }
-            }
-        }
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/Debug.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/Debug.java
deleted file mode 100644 (file)
index 6ddf13f..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-package net.jxta.impl.xindice;
-
-
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xindice" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, The dbXML
- * Group, L.L.C., http://www.dbxmlgroup.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
-
- */
-
-import net.jxta.impl.xindice.util.*;
-import java.io.*;
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-
-
-/**
- * Debug is a debugging class for the Xindice Server.  Because the class
- * and the Debugging field are final, the Java compiler should always
- * inline the methods and optimize them away if Debugging is set to false.
- */
-
-public final class Debug {
-   
-    /**
-     *   Log4J Logger. Since this is the logger for the whole of xindice, we
-     *   compose the name a little differently than normal.
-     **/
-    private final static Logger LOG = Logger.getLogger(Debug.class.getName());
-    
-    public static final boolean Debugging = true;
-   
-    public static void SetPrintStream(PrintStream out) {
-        ;
-    }
-
-    public static void println(Object obj, Object message) {
-        if (Debugging) {
-            if (obj instanceof Named) {
-                LOG.fine(((Named) obj).getName() + ": " + message);
-            } else {
-                LOG.fine(message + "\n\t@ " + obj);
-            }
-        }
-    }
-
-    public static void println(Object message) {
-        if (Debugging) {
-            LOG.fine(message.toString());
-        }
-    }
-
-    public static void println() {
-        if (Debugging) {
-            LOG.fine("");
-        }
-    }
-   
-    public static void printStackTrace(Throwable t) {
-        if (Debugging) {
-            LOG.log(Level.WARNING, t.getMessage(), t);
-        }
-    }
-   
-    public static void setPrintStream(PrintStream outStream) {
-        ;
-    }
-   
-    public static void setPrefix(String debugPrefix) {
-        ;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/DBException.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/DBException.java
deleted file mode 100644 (file)
index 9fdb2f6..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xindice" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, The dbXML
- * Group, L.L.C., http://www.dbxmlgroup.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-package net.jxta.impl.xindice.core;
-
-import net.jxta.impl.xindice.util.XindiceException;
-
-/**
- * A DBException is thrown by the database if an exception occurs in the
- * managing (creating, dropping) database objects such as Collections,
- * Indexes, and XMLObjects.
- */
-public class DBException extends XindiceException {
-    public int faultCode;
-
-    public DBException() {
-        this(FaultCodes.GEN_UNKNOWN, "", null);
-    }
-
-    public DBException(int faultCode) {
-        this(faultCode, "", null);
-    }
-
-    public DBException(int faultCode, String message) {
-        this(faultCode, message, null);
-    }
-
-    public DBException(int faultCode, String message, Throwable cause) {
-        super(message, cause);
-        this.faultCode = faultCode;
-    }
-
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/DBObject.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/DBObject.java
deleted file mode 100644 (file)
index 4b13995..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-package net.jxta.impl.xindice.core;
-
-
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xindice" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, The dbXML
- * Group, L.L.C., http://www.dbxmlgroup.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
-
- */
-
-
-/**
- * DBObject is the interface implemented by all Xindice database objects.
- * DBObjects are typically objects that can be managed using XML
- * configuration information, which is typically stored in the system
- * database.  XMLObjects are not considered DBObjects because of the
- * steps involved in having to generate them, which is usually
- * compilation of source code.
- */
-
-public interface DBObject {
-
-    /**
-     * create creates a new DBObject and any associated resources for the new
-     * DBObject, such as disk files, etc.
-     *
-     * @return Whether or not the DBObject was created
-     * @throws DBException if a DB error occurs
-     */
-    boolean create() throws DBException;
-
-    /**
-     * open opens the DBObject
-     *
-     * @return Whether or not the DBObject was opened
-     * @throws DBException if a DB error occurs
-     */
-    boolean open() throws DBException;
-
-    /**
-     * isOpened returns whether or not the DBObject is opened for business.
-     *
-     * @return The open status of the DBObject
-     * @throws DBException if a DB error occurs
-     */
-    boolean isOpened() throws DBException;
-
-    /**
-     * exists returns whether or not a physical representation of this
-     * DBObject actually exists.  In the case of a HashFiler, this would
-     * check for the file, and in the case of an FTPFiler, it might
-     * perform a connection check.
-     *
-     * @return Whether or not the physical resource exists
-     * @throws DBException if a DB error occurs
-     */
-    boolean exists() throws DBException;
-
-    /**
-     * drop instructs the DBObjectimplementation to remove itself from
-     * existence.  The DBObject's parent is responsible for removing any
-     * references to the DBObject in its own context.
-     *
-     * @return Whether or not the DBObject was dropped
-     * @throws DBException if a DB error occurs
-     */
-    boolean drop() throws DBException;
-
-    /**
-     * close closes the DBObject
-     *
-     * @return Whether or not the DBObject was closed
-     * @throws DBException if a DB error occurs
-     */
-    boolean close() throws DBException;
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/FaultCodes.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/FaultCodes.java
deleted file mode 100644 (file)
index b7f21a9..0000000
+++ /dev/null
@@ -1,555 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xindice" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, The dbXML
- * Group, L.L.C., http://www.dbxmlgroup.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-package net.jxta.impl.xindice.core;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * FaultCodes defines the Xindice specific fault codes and associated error
- * messages.
- */
-public abstract class FaultCodes {
-
-    // the constants below have been pasted from
-    // org.apache.xindice.client.corba.db.FaultCodes
-
-    //
-    // Constant value
-    //
-    public static final int GEN = (int) (0l);
-
-    //
-    // Constant value
-    //
-    public static final int OBJ = (int) (100l);
-
-    //
-    // Constant value
-    //
-    public static final int COL = (int) (200l);
-
-    //
-    // Constant value
-    //
-    public static final int IDX = (int) (300l);
-
-    //
-    // Constant value
-    //
-    public static final int TRX = (int) (400l);
-
-    //
-    // Constant value
-    //
-    public static final int DBE = (int) (500l);
-
-    //
-    // Constant value
-    //
-    public static final int QRY = (int) (600l);
-
-    //
-    // Constant value
-    //
-    public static final int SEC = (int) (700l);
-
-    //
-    // Constant value
-    //
-    public static final int URI = (int) (800l);
-
-    //
-    // Constant value
-    //
-    public static final int JAVA = (int) (2000l);
-
-    //
-    // Constant value
-    //
-    public static final int GEN_UNKNOWN = (int) (0l);
-
-    //
-    // Constant value
-    //
-    public static final int GEN_GENERAL_ERROR = (int) (40l);
-
-    //
-    // Constant value
-    //
-    public static final int GEN_CRITICAL_ERROR = (int) (70l);
-
-    //
-    // Constant value
-    //
-    public static final int GEN_FATAL_ERROR = (int) (90l);
-
-    //
-    // Constant value
-    //
-    public static final int OBJ_OBJECT_NOT_FOUND = (int) (100l);
-
-    //
-    // Constant value
-    //
-    public static final int OBJ_METHOD_NOT_FOUND = (int) (101l);
-
-    //
-    // Constant value
-    //
-    public static final int OBJ_NULL_RESULT = (int) (140l);
-
-    //
-    // Constant value
-    //
-    public static final int OBJ_INVALID_RESULT = (int) (141l);
-
-    //
-    // Constant value
-    //
-    public static final int OBJ_DUPLICATE_OBJECT = (int) (142l);
-
-    //
-    // Constant value
-    //
-    public static final int OBJ_RUNTIME_EXCEPTION = (int) (170l);
-
-    //
-    // Constant value
-    //
-    public static final int OBJ_CLASS_FORMAT_ERROR = (int) (171l);
-
-    //
-    // Constant value
-    //
-    public static final int OBJ_INVALID_CONTEXT = (int) (172l);
-
-    //
-    // Constant value
-    //
-    public static final int OBJ_CANNOT_CREATE = (int) (173l);
-
-    //
-    // Constant value
-    //
-    public static final int COL_COLLECTION_NOT_FOUND = (int) (200l);
-
-    //
-    // Constant value
-    //
-    public static final int COL_DOCUMENT_NOT_FOUND = (int) (201l);
-
-    //
-    // Constant value
-    //
-    public static final int COL_DUPLICATE_COLLECTION = (int) (240l);
-
-    //
-    // Constant value
-    //
-    public static final int COL_NULL_RESULT = (int) (241l);
-
-    //
-    // Constant value
-    //
-    public static final int COL_NO_FILER = (int) (242l);
-
-    //
-    // Constant value
-    //
-    public static final int COL_NO_INDEXMANAGER = (int) (242l);
-
-    //
-    // Constant value
-    //
-    public static final int COL_DOCUMENT_MALFORMED = (int) (243l);
-
-    //
-    // Constant value
-    //
-    public static final int COL_CANNOT_STORE = (int) (244l);
-
-    //
-    // Constant value
-    //
-    public static final int COL_CANNOT_RETRIEVE = (int) (245l);
-
-    //
-    // Constant value
-    //
-    public static final int COL_COLLECTION_READ_ONLY = (int) (246l);
-
-    //
-    // Constant value
-    //
-    public static final int COL_COLLECTION_CLOSED = (int) (247l);
-
-    //
-    // Constant value
-    //
-    public static final int COL_CANNOT_CREATE = (int) (270l);
-
-    //
-    // Constant value
-    //
-    public static final int COL_CANNOT_DROP = (int) (271l);
-
-    //
-    // Constant value
-    //
-    public static final int IDX_VALUE_NOT_FOUND = (int) (300l);
-
-    //
-    // Constant value
-    //
-    public static final int IDX_INDEX_NOT_FOUND = (int) (301l);
-
-    //
-    // Constant value
-    //
-    public static final int IDX_MATCHES_NOT_FOUND = (int) (340l);
-
-    //
-    // Constant value
-    //
-    public static final int IDX_DUPLICATE_INDEX = (int) (341l);
-
-    //
-    // Constant value
-    //
-    public static final int IDX_NOT_SUPPORTED = (int) (370l);
-
-    //
-    // Constant value
-    //
-    public static final int IDX_STYLE_NOT_FOUND = (int) (371l);
-
-    //
-    // Constant value
-    //
-    public static final int IDX_CORRUPTED = (int) (372l);
-
-    //
-    // Constant value
-    //
-    public static final int IDX_CANNOT_CREATE = (int) (373l);
-
-    //
-    // Constant value
-    //
-    public static final int TRX_DOC_LOCKED = (int) (400l);
-
-    //
-    // Constant value
-    //
-    public static final int TRX_NO_CONTEXT = (int) (440l);
-
-    //
-    // Constant value
-    //
-    public static final int TRX_NOT_ACTIVE = (int) (441l);
-
-    //
-    // Constant value
-    //
-    public static final int TRX_NOT_SUPPORTED = (int) (470l);
-
-    //
-    // Constant value
-    //
-    public static final int DBE_NO_PARENT = (int) (500l);
-
-    //
-    // Constant value
-    //
-    public static final int DBE_CANNOT_DROP = (int) (570l);
-
-    //
-    // Constant value
-    //
-    public static final int DBE_CANNOT_CREATE = (int) (571l);
-
-    //
-    // Constant value
-    //
-    public static final int QRY_NULL_RESULT = (int) (600l);
-
-    //
-    // Constant value
-    //
-    public static final int QRY_COMPILATION_ERROR = (int) (640l);
-
-    //
-    // Constant value
-    //
-    public static final int QRY_PROCESSING_ERROR = (int) (641l);
-
-    //
-    // Constant value
-    //
-    public static final int QRY_NOT_SUPPORTED = (int) (670l);
-
-    //
-    // Constant value
-    //
-    public static final int QRY_STYLE_NOT_FOUND = (int) (671l);
-
-    //
-    // Constant value
-    //
-    public static final int SEC_INVALID_USER = (int) (770l);
-
-    //
-    // Constant value
-    //
-    public static final int SEC_INVALID_GROUP = (int) (771l);
-
-    //
-    // Constant value
-    //
-    public static final int SEC_INVALID_ACCESS = (int) (772l);
-
-    //
-    // Constant value
-    //
-    public static final int SEC_INVALID_CREDENTIALS = (int) (773l);
-
-    //
-    // Constant value
-    //
-    public static final int URI_EMPTY = (int) (800l);
-
-    //
-    // Constant value
-    //
-    public static final int URI_NULL = (int) (801l);
-
-    //
-    // Constant value
-    //
-    public static final int URI_PARSE_ERROR = (int) (820l);
-
-    //
-    // Constant value
-    //
-    public static final int JAVA_RUNTIME_ERROR = (int) (2070l);
-
-    private static final Map<Integer, String> FaultMsg = new HashMap<Integer, String>();
-
-    private FaultCodes() {}
-
-    static {
-        // General errors 0 series
-        putCodeMessage(GEN_UNKNOWN, "Unknown");
-        putCodeMessage(GEN_GENERAL_ERROR, "General Error");
-        putCodeMessage(GEN_CRITICAL_ERROR, "Critical Error");
-        putCodeMessage(GEN_FATAL_ERROR, "Fatal Error");
-
-        // XMLObject invocation errors 100 series
-        putCodeMessage(OBJ_OBJECT_NOT_FOUND, "XMLObject Not Found");
-        putCodeMessage(OBJ_METHOD_NOT_FOUND, "XMLObject Method Not Found");
-        putCodeMessage(OBJ_NULL_RESULT, "XMLObject Null Result");
-        putCodeMessage(OBJ_INVALID_RESULT, "XMLObject Invalid Result");
-        putCodeMessage(OBJ_DUPLICATE_OBJECT, "XMLObject Duplicate Object");
-        putCodeMessage(OBJ_RUNTIME_EXCEPTION, "XMLObject Runtime Exception");
-        putCodeMessage(OBJ_CLASS_FORMAT_ERROR, "XMLObject Class Format Error");
-        putCodeMessage(OBJ_INVALID_CONTEXT, "XMLObject Invalid Context");
-        putCodeMessage(OBJ_CANNOT_CREATE, "XMLObject Cannot Create");
-      
-        // Collection-related errors 200 series
-        putCodeMessage(COL_COLLECTION_NOT_FOUND, "Collection Not Found");
-        putCodeMessage(COL_DOCUMENT_NOT_FOUND, "Collection Document Not Found");
-        putCodeMessage(COL_DUPLICATE_COLLECTION, "Collection Duplicated");
-        putCodeMessage(COL_NULL_RESULT, "Collection Null Result");
-        putCodeMessage(COL_NO_FILER, "Collection No Filer");
-        putCodeMessage(COL_NO_INDEXMANAGER, "Collection No IndexManager");
-        putCodeMessage(COL_DOCUMENT_MALFORMED, "Collection Document Malformed");
-        putCodeMessage(COL_CANNOT_STORE, "Collection Cannot Store");
-        putCodeMessage(COL_CANNOT_RETRIEVE, "Collection Cannot Retrieve");
-        putCodeMessage(COL_COLLECTION_READ_ONLY, "Collection Read-only");
-        putCodeMessage(COL_COLLECTION_CLOSED, "Collection Closed");
-        putCodeMessage(COL_CANNOT_CREATE, "Collection Cannot Create");
-        putCodeMessage(COL_CANNOT_DROP, "Collection Cannot Drop");
-
-        // Index-related errors 300 series
-        putCodeMessage(IDX_VALUE_NOT_FOUND, "Index Value Not Found");
-        putCodeMessage(IDX_INDEX_NOT_FOUND, "Index Not Found");
-        putCodeMessage(IDX_MATCHES_NOT_FOUND, "Index Matches Not Found");
-        putCodeMessage(IDX_DUPLICATE_INDEX, "Index Duplicate Index");
-        putCodeMessage(IDX_NOT_SUPPORTED, "Index Not Supported");
-        putCodeMessage(IDX_STYLE_NOT_FOUND, "Index Style Not Found");
-        putCodeMessage(IDX_CORRUPTED, "Index Corrupted");
-        putCodeMessage(IDX_CANNOT_CREATE, "Index Cannot Create");
-
-        // Transaction-related errors 400 series
-        putCodeMessage(TRX_DOC_LOCKED, "Transaction Document Locked");
-        putCodeMessage(TRX_NO_CONTEXT, "Transaction No Context");
-        putCodeMessage(TRX_NOT_ACTIVE, "Transaction Not Active");
-        putCodeMessage(TRX_NOT_SUPPORTED, "Transaction Not Supported");
-
-        // Database-related errors 500 series
-        putCodeMessage(DBE_NO_PARENT, "Database No Parent");
-        putCodeMessage(DBE_CANNOT_DROP, "Database Cannot Drop");
-        putCodeMessage(DBE_CANNOT_CREATE, "Database Cannot Create");
-
-        // Query-related errors 600 series
-        putCodeMessage(QRY_NULL_RESULT, "Query Null Result");
-        putCodeMessage(QRY_COMPILATION_ERROR, "Query Compilation Error");
-        putCodeMessage(QRY_PROCESSING_ERROR, "Query Processing Error");
-        putCodeMessage(QRY_NOT_SUPPORTED, "Query Not Supported");
-        putCodeMessage(QRY_STYLE_NOT_FOUND, "Query Style Not Found");
-
-        // Security-related errors 700 series
-        putCodeMessage(SEC_INVALID_USER, "Security Invalid User");
-        putCodeMessage(SEC_INVALID_GROUP, "Security Invalid Group");
-        putCodeMessage(SEC_INVALID_ACCESS, "Security Invalid Access");
-        putCodeMessage(SEC_INVALID_CREDENTIALS, "Security Invalid Credentials");
-      
-        // URI-related errors 800 series
-        putCodeMessage(URI_EMPTY, "URI Empty");
-        putCodeMessage(URI_NULL, "URI Null");
-        putCodeMessage(URI_PARSE_ERROR, "URI Parse Error");
-      
-        // Java-related errors 2000 series
-        putCodeMessage(JAVA_RUNTIME_ERROR, "Java Runtime Error");
-    }
-
-    private static void putCodeMessage(int code, String message) {
-        FaultMsg.put(code, message);
-    }
-
-    /**
-     * getMessage returns a textual form for the specified fault code.
-     *
-     * @param code The Fault Code
-     * @return It's textual form
-     */
-    public static String getMessage(int code) {
-        String msg = FaultMsg.get(code);
-
-        return msg != null ? msg : "";
-    }
-
-    /**
-     * getFaultCodeType examines the provided exception to determine
-     * the general fault code that is associated with it.  General
-     * fault codes are reduced from actual fault codes to be one of
-     * the GEN_ prefixed fault code values.
-     *
-     * @param e The Exception to examine
-     * @return The General Fault Code
-     */
-    public static int getFaultCodeType(Exception e) {
-        int code = 0;
-
-        if (e instanceof DBException) {
-            code = ((DBException) e).faultCode;
-        }
-        // Strip it to the General series
-        code = code % 100;
-        // Narrow to a General value
-        code = code - (code % 10);
-        return code;
-    }
-
-    /**
-     * getFaultCodeSeries examines the provided exception to
-     * determine the fault code series that is associated with it.
-     * Series are reduced from actual fault codes to be one of
-     * the fault code prefixes (ex: COL, DB, SEC).
-     *
-     * @param e The Exception to examine
-     * @return The Fault Code Series
-     */
-    public static int getFaultCodeSeries(Exception e) {
-        int code = 0;
-
-        if (e instanceof DBException) {
-            code = ((DBException) e).faultCode;
-        }
-        // Strip it to the series
-        code = code - (code % 100);
-        return code;
-    }
-
-    /**
-     * getFaultCode examines the provided exception to determine
-     * the fault code that is associated with it.
-     *
-     * @param e The Exception to examine
-     * @return The Fault Code
-     */
-    public static int getFaultCode(Exception e) {
-        if (e instanceof DBException) {
-            return ((DBException) e).faultCode;
-        } else {
-            return 0;
-        }
-    }
-
-    /**
-     * getFaultMessage examines the provided exception to determine
-     * the fault message that is associated with it.
-     *
-     * @param e The Exception to examine
-     * @return The Fault Message
-     */
-    public static String getFaultMessage(Exception e) {
-        return getMessage(getFaultCode(e));
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/data/Key.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/data/Key.java
deleted file mode 100644 (file)
index 8091cd0..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xindice" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, The dbXML
- * Group, L.L.C., http://www.dbxmlgroup.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-package net.jxta.impl.xindice.core.data;
-
-/**
- * Key extends Value by providing a hash value for the Key.
- */
-public final class Key extends Value {
-    private int hash = 0;
-
-    public Key(Value value) {
-        super(value);
-    }
-
-    public Key(byte[] data) {
-        super(data);
-    }
-
-    public Key(byte[] data, int pos, int len) {
-        super(data, pos, len);
-    }
-
-    public Key(String data) {
-        super(data);
-    }
-
-    // TODO: This has to be revisited
-    private void calculateHash() {
-        hash = 0;
-        int pl = pos + len;
-
-        for (int i = pos; i < pl; i++) {
-            hash = (hash << 5) ^ data[i];
-            hash = hash % 1234567891;
-        }
-        hash = Math.abs(hash);
-    }
-
-    public int getHash() {
-        if (hash == 0) {
-            calculateHash();
-        }
-        return hash;
-    }
-
-    @Override
-    public boolean equals(Value value) {
-        if (value instanceof Key) {
-            Key key = (Key) value;
-
-            return getHash() == key.getHash() && compareTo(key) == 0;
-        } else {
-            return super.equals(value);
-        }
-    }
-
-    @Override
-    public int hashCode() {
-        return getHash();
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (obj instanceof Key) {
-            return equals((Key) obj);
-        } else {
-            return super.equals(obj);
-        }
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/data/Record.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/data/Record.java
deleted file mode 100644 (file)
index 7b775f9..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xindice" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, The dbXML
- * Group, L.L.C., http://www.dbxmlgroup.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-package net.jxta.impl.xindice.core.data;
-
-import java.util.Map;
-
-/**
- * Record is a container for Key/Value pairs.  Record also provides
- * metadata for a Value stored in the database.
- */
-public final class Record {
-    public static final String CREATED = "created";
-    public static final String MODIFIED = "modified";
-    public static final String LIFETIME = "lifetime";
-    public static final String EXPIRATION = "expiration";
-    public static final String OWNER = "owner";
-    public static final String GROUP = "group";
-   
-    private Key key = null;
-    private Value value = null;
-    private Map meta = null;
-
-    public Record() {}
-
-    public Record(Key key, Value value, Map meta) {
-        this.key = key;
-        this.value = value;
-        this.meta = meta;
-    }
-   
-    public Record(Key key, Value value) {
-        this.key = key;
-        this.value = value;
-    }
-   
-    /**
-     * setKey sets the Record's Key.
-     *
-     * @param key The new key
-     */
-    public void setKey(Key key) {
-        this.key = key;
-    }
-
-    /**
-     * getKey returns the Record's Key.
-     *
-     * @return The Record's Key
-     */
-    public Key getKey() {
-        return key;
-    }
-
-    /**
-     * setValue sets the Record's Value.
-     *
-     * @param value The new Value
-     */
-    public void setValue(Value value) {
-        this.value = value;
-    }
-
-    /**
-     * setValue sets the Record's Value.
-     *
-     * @param value The new Value
-     */
-    public void setValue(String value) {
-        this.value = new Value(value);
-    }
-
-    /**
-     * getValue returns the Record's Value.
-     *
-     * @return The Record's Value
-     */
-    public Value getValue() {
-        return value;
-    }
-   
-    /**
-     * getMetaData returns metadata about the Value.
-     *
-     * @param name The property name
-     * @return The metadata value
-     */
-    public Object getMetaData(Object name) {
-        return meta != null ? meta.get(name) : null;
-    }
-
-    @Override
-    public String toString() {
-        return 
-                (key != null ? key.toString() : "") + (value != null ? " = " + value.toString() : "")
-                + (meta != null ? " meta " + meta.toString() : "");
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/data/RecordSet.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/data/RecordSet.java
deleted file mode 100644 (file)
index b4b3074..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-package net.jxta.impl.xindice.core.data;
-
-
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xindice" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, The dbXML
- * Group, L.L.C., http://www.dbxmlgroup.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-
-import net.jxta.impl.xindice.core.DBException;
-
-/**
- * RecordSet is an interface for iterating over a set of Records.
- * It is almost always returned by Filers.
- */
-public interface RecordSet {
-
-    /**
-     * hasMoreRecords returns whether or not there are any Records
-     * left in the set.
-     *
-     * @return Whether there are any more Records
-     * @throws net.jxta.impl.xindice.core.filer.BTreeException if a DB exception occurs
-     */
-    boolean hasMoreRecords() throws DBException;
-   
-    /**
-     * getNextRecord returns the next Record in the set.
-     *
-     * @return The next Record
-     * @throws net.jxta.impl.xindice.core.filer.BTreeException if a DB exception occurs
-     */
-    Record getNextRecord() throws DBException;
-   
-    /**
-     * getNextKey returns the next Record's Key, and skips the
-     * RecordSet ahead to the next Record.
-     *
-     * @return The next Key
-     * @throws net.jxta.impl.xindice.core.filer.BTreeException if a DB exception occurs
-     */
-    Key getNextKey() throws DBException;
-
-    /**
-     * getNextValue returns the next Record's Value, and skips the
-     * RecordSet ahead to the next Record.
-     *
-     * @return The next Value
-     * @throws net.jxta.impl.xindice.core.filer.BTreeException if a DB exception occurs
-     */
-    Value getNextValue() throws DBException;
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/data/Value.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/data/Value.java
deleted file mode 100644 (file)
index 3291128..0000000
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xindice" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, The dbXML
- * Group, L.L.C., http://www.dbxmlgroup.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-package net.jxta.impl.xindice.core.data;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-
-/**
- * Value is the primary base class for all data storing objects.
- * The content window of Value objects are immutable, but the
- * underlying byte array is not.
- *
- */
-public class Value implements Comparable {
-
-    protected byte[] data = null;
-    protected int pos = 0;
-    protected int len = -1;
-
-    public Value(Value value) {
-        this.data = value.data;
-        this.pos = value.pos;
-        this.len = value.len;
-    }
-
-    public Value(byte[] data) {
-        this.data = data;
-        this.len = data.length;
-    }
-
-    public Value(byte[] data, int pos, int len) {
-        this.data = data;
-        this.pos = pos;
-        this.len = len;
-    }
-
-    public Value(String data) {
-        try {
-            this.data = data.getBytes("utf-8");
-            this.len = this.data.length;
-        } catch (UnsupportedEncodingException e) {
-            throw new RuntimeException("Java doesn't support UTF-8 encoding", e);
-        }
-    }
-
-    /**
-     * getData retrieves the data being stored by the Value as a byte array.
-     *
-     * @return The Data
-     */
-    public final byte[] getData() {
-        if (len != data.length) {
-            byte[] b = new byte[len];
-
-            System.arraycopy(data, pos, b, 0, len);
-            return b;
-        } else {
-            return data;
-        }
-    }
-
-    /**
-     * getLength retrieves the length of the data being stored by the Value.
-     *
-     * @return The Value length
-     */
-    public final int getLength() {
-        return len;
-    }
-
-    /**
-     * getInputStream returns an InputStream for the Value.
-     *
-     * @return An InputStream
-     */
-    public final InputStream getInputStream() {
-        return new ByteArrayInputStream(data, pos, len);
-    }
-
-    /**
-     * streamTo streams the content of the Value to an OutputStream.
-     *
-     * @param out the OutputStream
-     * @throws java.io.IOException if an io error occurs
-     */
-    public final void streamTo(OutputStream out) throws IOException {
-        out.write(data, pos, len);
-    }
-
-    public final void copyTo(byte[] tdata, int tpos) {
-        System.arraycopy(data, pos, tdata, tpos, len);
-    }
-
-    public final void copyTo(byte[] tdata, int tpos, int len) {
-        System.arraycopy(data, pos, tdata, tpos, len);
-    }
-
-    @Override
-    public final String toString() {
-        try {
-            return new String(data, pos, len, "utf-8");
-        } catch (UnsupportedEncodingException e) {
-            throw new RuntimeException("Java doesn't seem to support UTF-8!", e);
-        }
-    }
-
-    @Override
-    public int hashCode() {
-        return toString().hashCode();
-    }
-
-    public boolean equals(Value value) {
-        return len == value.len && compareTo(value) == 0;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj instanceof Value) {
-            return equals((Value) obj);
-        } else {
-            return equals(new Value(obj.toString()));
-        }
-    }
-
-    public final int compareTo(Value value) {
-        byte[] ddata = value.data;
-        int dpos = value.pos;
-        int dlen = value.len;
-
-        int stop = len > dlen ? dlen : len;
-
-        for (int i = 0; i < stop; i++) {
-            byte b1 = data[pos + i];
-            byte b2 = ddata[dpos + i];
-
-            if (b1 == b2) {
-                // do nothing
-            } else {
-                short s1 = (short) (b1 >>> 0);
-                short s2 = (short) (b2 >>> 0);
-
-                return s1 > s2 ? (i + 1) : -(i + 1);
-            }
-        }
-
-        if (len == dlen) {
-            return 0;
-        } else {
-            return len > dlen ? stop + 1 : -(stop + 1);
-        }
-    }
-
-    public final int compareTo(Object obj) {
-        if (obj instanceof Value) {
-            return compareTo((Value) obj);
-        } else {
-            return compareTo(new Value(obj.toString()));
-        }
-    }
-
-    public final boolean startsWith(Value value) {
-        if (len < value.len) {
-            return false;
-        }
-
-        byte[] ddata = value.data;
-        int dpos = value.pos;
-
-        for (int i = 0; i < value.len; i++) {
-            if (data[i + pos] != ddata[i + dpos]) {
-                return false;
-            }
-        }
-
-        return true;
-    }
-
-    public final boolean endsWith(Value value) {
-        if (len < value.len) {
-            return false;
-        }
-
-        byte[] ddata = value.data;
-        int dpos = value.pos;
-
-        int offset = len - value.len;
-
-        for (int i = 0; i < value.len; i++) {
-            if (data[i + pos + offset] != ddata[i + dpos]) {
-                return false;
-            }
-        }
-
-        return true;
-    }
-
-    public final boolean contains(Value value) {
-        if (len < value.len) {
-            return false;
-        }
-        boolean match;
-        byte[] ddata = value.data;
-        int dpos = value.pos;
-
-        for (int offset = 0; offset <= len - value.len; offset++) {
-            match = true;
-            for (int i = 0; i < value.len; i++) {
-                if (data[i + pos + offset] != ddata[i + dpos]) {
-                    match = false;
-                }
-            }
-            if (match) {
-                return true;
-            }
-        }
-        return false;
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/BTree.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/BTree.java
deleted file mode 100644 (file)
index 958e456..0000000
+++ /dev/null
@@ -1,1194 +0,0 @@
-package net.jxta.impl.xindice.core.filer;
-
-
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xindice" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, The dbXML
- * Group, L.L.C., http://www.dbxmlgroup.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
-
- */
-
-import net.jxta.impl.xindice.core.DBException;
-import net.jxta.impl.xindice.core.FaultCodes;
-import net.jxta.impl.xindice.core.data.Value;
-import net.jxta.impl.xindice.core.indexer.IndexQuery;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.lang.ref.WeakReference;
-import java.util.Arrays;
-import java.util.Map;
-import java.util.WeakHashMap;
-
-import java.util.logging.Level;
-import net.jxta.logging.Logging;
-import java.util.logging.Logger;
-
-
-/**
- * BTree represents a Variable Magnitude Simple-Prefix B+Tree File.
- * A BTree is a bit flexible in that it can be used for set or
- * map-based indexing.  HashFiler uses the BTree as a set for
- * producing RecordSet entries.  The Indexers use BTree as a map for
- * indexing entity and attribute values in Documents.
- * <br><br>
- * For those who don't know how a Simple-Prefix B+Tree works, the primary
- * distinction is that instead of promoting actual keys to branch pages,
- * when leaves are split, a shortest-possible separator is generated at
- * the pivot.  That separator is what is promoted to the parent branch
- * (and continuing up the list).  As a result, actual keys and pointers
- * can only be found at the leaf level.  This also affords the index the
- * ability to ignore costly merging and redistribution of pages when
- * deletions occur.  Deletions only affect leaf pages in this
- * implementation, and so it is entirely possible for a leaf page to be
- * completely empty after all of its keys have been removed.
- * <br><br>
- * Also, the Variable Magnitude attribute means that the btree attempts
- * to store as many values and pointers on one page as is possible.
- * <br><br>
- * This implementation supports the notion of nested roots.  This means
- * that you can create a btree where the pointers actually point to the
- * root of a separate btree being managed in the same file.
- */
-
-public class BTree extends Paged {
-    private final static Logger LOG = Logger.getLogger(BTree.class.getName());
-    protected static final byte LEAF = 1;
-    protected static final byte BRANCH = 2;
-    protected static final byte STREAM = 3;
-
-    /**
-     * Cache of the recently used tree nodes.
-     *
-     * Cache contains weak references to the BTreeNode objects, keys are page numbers (Long objects).
-     * Access synchronized by this map itself.
-     */
-    private final Map<Long, WeakReference<BTreeNode>> cache = new WeakHashMap<Long, WeakReference<BTreeNode>>();
-
-    private BTreeFileHeader fileHeader;
-    private BTreeRootInfo rootInfo;
-    private BTreeNode rootNode;
-
-    public BTree() {
-        super();
-        fileHeader = (BTreeFileHeader) getFileHeader();
-    }
-
-    public BTree(File file) {
-        this();
-        setFile(file);
-    }
-
-    /**
-     * Setting this option forces all system buffers with the underlying device
-     * if sync is set writes return after all modified data and attributes of the DB
-     * have been written to the device.
-     * by default sync is true.
-     * {@link java.io.FileDescriptor}
-     * @param sync if true, invokes FD.sync(), an expensive operation, required to ensure high consistency, especially
-     * with system failures.
-     */
-    public void setSync(boolean sync) {
-        this.sync = sync;
-    }
-
-    @Override
-    public boolean open() throws DBException {
-        if (super.open()) {
-            long p = fileHeader.getRootPage();
-
-            rootInfo = new BTreeRootInfo(p);
-            rootNode = getBTreeNode(p, null);
-            return true;
-        } else {
-            return false;
-        }
-    }
-
-    @Override
-    public boolean create() throws DBException {
-        if (super.create()) {
-            try {
-                // Don't call this.open() as it will try to read rootNode from the disk
-                super.open();
-
-                long p = fileHeader.getRootPage();
-
-                rootInfo = new BTreeRootInfo(p);
-
-                // Initialize root node
-                rootNode = new BTreeNode(getPage(p), null, new Value[0], new long[0]);
-                rootNode.ph.setStatus(LEAF);
-                rootNode.write();
-                synchronized (cache) {
-                    cache.put(rootNode.page.getPageNum(), new WeakReference<BTreeNode>(rootNode));
-                }
-                close();
-                return true;
-            } catch (Exception e) {
-                if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                    LOG.log(Level.WARNING, "Failed to create BTree, return false", e);
-                }
-            }
-        }
-        return false;
-    }
-
-    /**
-     * addValue adds a Value to the BTree and associates a pointer with
-     * it.  The pointer can be used for referencing any type of data, it
-     * just so happens that Xindice uses it for referencing pages of
-     * associated data in the BTree file or other files.
-     *
-     * @param value The Value to add
-     * @param pointer The pointer to associate with it
-     * @return The previous value for the pointer (or -1)
-     * @throws java.io.IOException if an io error occurs
-     * @throws BTreeException if a DB exception occurs
-     */
-    public long addValue(Value value, long pointer) throws IOException, BTreeException {
-        return getRootNode().addValue(value, pointer);
-    }
-
-    /**
-     * addValue adds a Value to the BTree and associates a pointer with
-     * it.  The pointer can be used for referencing any type of data, it
-     * just so happens that Xindice uses it for referencing pages of
-     * associated data in the BTree file or other files.
-     *
-     * @param root The BTree's root information (for nested trees)
-     * @param value The Value to add
-     * @param pointer The pointer to associate with it
-     * @return The previous value for the pointer (or -1)
-     * @throws java.io.IOException if an io error occurs
-     * @throws BTreeException if a DB exception occurs
-     */
-    public long addValue(BTreeRootInfo root, Value value, long pointer) throws IOException, BTreeException {
-        return getRootNode(root).addValue(value, pointer);
-    }
-
-    /**
-     * removeValue removes a Value from the BTree and returns the
-     * associated pointer for it.
-     *
-     * @param value The Value to remove
-     * @return The pointer that was associated with it
-     * @throws java.io.IOException if an io error occurs
-     * @throws BTreeException if a DB exception occurs
-     */
-    public long removeValue(Value value) throws IOException, BTreeException {
-        return getRootNode().removeValue(value);
-    }
-
-    /**
-     * removeValue removes a Value from the BTree and returns the
-     * associated pointer for it.
-     *
-     * @param root The BTree's root information (for nested trees)
-     * @param value The Value to remove
-     * @return The pointer that was associated with it
-     * @throws java.io.IOException if an io error occurs
-     * @throws BTreeException if a DB exception occurs
-     */
-    public long removeValue(BTreeRootInfo root, Value value) throws IOException, BTreeException {
-        return getRootNode(root).removeValue(value);
-    }
-
-    /**
-     * findValue finds a Value in the BTree and returns the associated
-     * pointer for it.
-     *
-     * @param value The Value to find
-     * @return The pointer that was associated with it
-     * @throws java.io.IOException if an io error occurs
-     * @throws BTreeException if a DB exception occurs
-     */
-    public long findValue(Value value) throws IOException, BTreeException {
-        return getRootNode().findValue(value);
-    }
-
-    /**
-     * findValue finds a Value in the BTree and returns the associated
-     * pointer for it.
-     *
-     * @param root The BTree's root information (for nested trees)
-     * @param value The Value to find
-     * @return The pointer that was associated with it
-     * @throws java.io.IOException if an io error occurs
-     * @throws BTreeException if a DB exception occurs
-     */
-    public long findValue(BTreeRootInfo root, Value value) throws IOException, BTreeException {
-        return getRootNode(root).findValue(value);
-    }
-
-    /**
-     * query performs a query against the BTree and performs callback
-     * operations to report the search results.
-     *
-     * @param query The IndexQuery to use (or null for everything)
-     * @param callback The callback instance
-     * @throws java.io.IOException if an io error occurs
-     * @throws BTreeException if a DB exception occurs
-     */
-    public void query(IndexQuery query, BTreeCallback callback) throws IOException, BTreeException {
-        getRootNode().query(query, callback);
-    }
-
-    /**
-     * query performs a query against the BTree and performs callback
-     * operations to report the search results.
-     *
-     * @param root The BTree's root information (for nested trees)
-     * @param query The IndexQuery to use (or null for everything)
-     * @param callback The callback instance
-     * @throws java.io.IOException if an io error occurs
-     * @throws BTreeException if a DB exception occurs
-     */
-    public void query(BTreeRootInfo root, IndexQuery query, BTreeCallback callback) throws IOException, BTreeException {
-        getRootNode(root).query(query, callback);
-    }
-
-    /**
-     * createBTreeRoot creates a new BTree root node in the BTree file
-     * based on the provided value for the main tree.
-     *
-     * @param v The sub-tree Value to create
-     * @return The new BTreeRootInfo instance
-     * @throws java.io.IOException if an io error occurs
-     * @throws BTreeException if a DB exception occurs
-     */
-    protected final BTreeRootInfo createBTreeRoot(Value v) throws IOException, BTreeException {
-        BTreeNode n = createBTreeNode(BTree.LEAF, null);
-        n.write();
-        long position = n.page.getPageNum();
-
-        addValue(v, position);
-        return new BTreeRootInfo(v, position);
-    }
-
-    /**
-     * createBTreeRoot creates a new BTree root node in the BTree file
-     * based on the provided root information, and value for the tree.
-     *
-     * @param root The BTreeRootInfo to build off of
-     * @param v The sub-tree Value to create
-     * @return The new BTreeRootInfo instance
-     * @throws java.io.IOException if an io error occurs
-     * @throws BTreeException if a DB exception occurs
-     */
-    protected final BTreeRootInfo createBTreeRoot(BTreeRootInfo root, Value v) throws IOException, BTreeException {
-        BTreeNode n = createBTreeNode(BTree.LEAF, null);
-
-        n.write();
-
-        long position = n.page.getPageNum();
-
-        addValue(v, position);
-        return new BTreeRootInfo(root, v, position);
-    }
-
-    /**
-     * findBTreeRoot searches for a BTreeRoot in the file and returns
-     * the BTreeRootInfo for the specified value based on the main tree.
-     *
-     * @param v The sub-tree Value to search for
-     * @return The new BTreeRootInfo instance
-     * @throws java.io.IOException if an io error occurs
-     * @throws BTreeException if a DB exception occurs
-     */
-    protected final BTreeRootInfo findBTreeRoot(Value v) throws IOException, BTreeException {
-        long position = findValue(v);
-
-        return new BTreeRootInfo(v, position);
-    }
-
-    /**
-     * findBTreeRoot searches for a BTreeRoot in the file and returns
-     * the BTreeRootInfo for the specified value based on the provided
-     * BTreeRootInfo value.
-     *
-     * @param root The BTreeRootInfo to search from
-     * @param v The sub-tree Value to search for
-     * @return The new BTreeRootInfo instance
-     * @throws java.io.IOException if an io error occurs
-     * @throws BTreeException if a DB exception occurs
-     */
-    protected final BTreeRootInfo findBTreeRoot(BTreeRootInfo root, Value v) throws IOException, BTreeException {
-        long position = findValue(root, v);
-
-        return new BTreeRootInfo(root, v, position);
-    }
-
-    /**
-     * setRootNode resets the root for the specified root object to the
-     * provided BTreeNode's page number.
-     *
-     * This method is not thread safe.
-     *
-     * @param root The root to reset
-     * @param newRoot the new root node to use
-     * @throws java.io.IOException if an io error occurs
-     * @throws BTreeException if a DB exception occurs
-     */
-    protected final void setRootNode(BTreeRootInfo root, BTreeNode newRoot) throws IOException, BTreeException {
-        BTreeRootInfo parent = root.getParent();
-
-        if (parent == null) {
-            rootNode = newRoot;
-            long p = rootNode.page.getPageNum();
-
-            rootInfo.setPage(p);
-            fileHeader.setRootPage(p);
-        } else {
-            long p = newRoot.page.getPageNum();
-
-            root.setPage(p);
-            addValue(parent, root.name, p);
-        }
-    }
-
-    /**
-     * setRootNode resets the file's root to the provided
-     * BTreeNode's page number.
-     *
-     * This method is not thread safe.
-     *
-     * @param rootNode the new root node to use
-     * @throws java.io.IOException if an io error occurs
-     * @throws BTreeException if a DB exception occurs
-     */
-    protected final void setRootNode(BTreeNode rootNode) throws IOException, BTreeException {
-        setRootNode(rootInfo, rootNode);
-    }
-
-    /**
-     * getRootNode retreives the BTree node for the specified
-     * root object.
-     *
-     * @param root The root object to retrieve with
-     * @return The root node
-     */
-    protected final BTreeNode getRootNode(BTreeRootInfo root) {
-        if (root.page == rootInfo.page) {
-            return rootNode;
-        } else {
-            return getBTreeNode(root.getPage(), null);
-        }
-    }
-
-    /**
-     * getRootNode retreives the BTree node for the file's root.
-     *
-     * @return The root node
-     */
-    protected final BTreeNode getRootNode() {
-        return rootNode;
-    }
-
-    private BTreeNode getBTreeNode(long page, BTreeNode parent) {
-        try {
-            BTreeNode node = null;
-
-            synchronized (cache) {
-                WeakReference<BTreeNode> ref = cache.get(page);
-
-                if (ref != null) {
-                    node = ref.get();
-                }
-
-                if (node == null) {
-                    node = new BTreeNode(getPage(page), parent);
-                } else {
-                    node.parent = parent;
-                }
-
-                cache.put(node.page.getPageNum(), new WeakReference<BTreeNode>(node));
-            }
-
-            node.read();
-            return node;
-        } catch (Exception e) {
-            if (Logging.SHOW_WARNING && LOG.isLoggable(Level.WARNING)) {
-                LOG.log(Level.WARNING, "Ignored exception", e);
-            }
-            return null;
-        }
-    }
-
-    private BTreeNode createBTreeNode(byte status, BTreeNode parent) throws IOException {
-        Page p = getFreePage();
-        BTreeNode node = new BTreeNode(p, parent, new Value[0], new long[0]);
-
-        node.ph.setStatus(status);
-        synchronized (cache) {
-            cache.put(p.getPageNum(), new WeakReference<BTreeNode>(node));
-        }
-        return node;
-    }
-
-    /**
-     * BTreeRootInfo
-     */
-    public final class BTreeRootInfo {
-        private final BTreeRootInfo parent;
-        private final Value name;
-        private long page;
-
-        public BTreeRootInfo(BTreeRootInfo parent, String name, long page) {
-            this.parent = parent;
-            this.name = new Value(name);
-            this.page = page;
-        }
-
-        public BTreeRootInfo(BTreeRootInfo parent, Value name, long page) {
-            this.parent = parent;
-            this.name = name;
-            this.page = page;
-        }
-
-        public BTreeRootInfo(String name, long page) {
-            this.parent = rootInfo;
-            this.name = new Value(name);
-            this.page = page;
-        }
-
-        public BTreeRootInfo(Value name, long page) {
-            this.parent = rootInfo;
-            this.name = name;
-            this.page = page;
-        }
-
-        private BTreeRootInfo(long page) {
-            parent = null;
-            name = null;
-            this.page = page;
-        }
-
-        public BTreeRootInfo getParent() {
-            return parent;
-        }
-
-        public Value getName() {
-            return name;
-        }
-
-        public synchronized long getPage() {
-            return page;
-        }
-
-        public synchronized void setPage(long page) {
-            this.page = page;
-        }
-    }
-
-
-    /**
-     * BTreeNode
-     */
-    private final class BTreeNode {
-        private final Page page;
-        private final BTreePageHeader ph;
-        private Value[] values;
-        private long[] ptrs;
-        private BTreeNode parent;
-        private boolean loaded;
-
-        public BTreeNode(Page page) {
-            this(page, null);
-        }
-
-        public BTreeNode(Page page, BTreeNode parent) {
-            this.page = page;
-            this.parent = parent;
-            this.ph = (BTreePageHeader) page.getPageHeader();
-        }
-
-        public BTreeNode(Page page, BTreeNode parent, Value[] values, long[] ptrs) {
-            this(page, parent);
-            set(values, ptrs);
-            this.loaded = true;
-        }
-
-        /**
-         * Sets values and pointers.
-         * Internal (to the BTreeNode) method, not synchronized.
-         * @param ptrs  pointers
-         * @param values their values
-         */
-        private void set(Value[] values, long[] ptrs) {
-            this.values = values;
-            this.ph.setValueCount((short) values.length);
-            this.ptrs = ptrs;
-        }
-
-        /**
-         * Reads node only if it is not loaded yet
-         * @throws java.io.IOException if an io error occurs
-         */
-        public synchronized void read() throws IOException {
-            if (!this.loaded) {
-                Value v = readValue(page);
-                DataInputStream is = new DataInputStream(v.getInputStream());
-
-                // Read in the Values
-                values = new Value[ph.getValueCount()];
-                for (int i = 0; i < values.length; i++) {
-                    short valSize = is.readShort();
-                    byte[] b = new byte[valSize];
-
-                    is.read(b);
-                    values[i] = new Value(b);
-                }
-
-                // Read in the pointers
-                ptrs = new long[ph.getPointerCount()];
-                for (int i = 0; i < ptrs.length; i++) {
-                    ptrs[i] = is.readLong();
-                }
-
-                this.loaded = true;
-            }
-        }
-
-        public synchronized void write() throws IOException {
-            ByteArrayOutputStream bos = new ByteArrayOutputStream(fileHeader.getWorkSize());
-            DataOutputStream os = new DataOutputStream(bos);
-
-            // Write out the Values
-            for (Value value : values) {
-                os.writeShort(value.getLength());
-                value.streamTo(os);
-            }
-
-            // Write out the pointers
-            for (long ptr : ptrs) {
-                os.writeLong(ptr);
-            }
-
-            writeValue(page, new Value(bos.toByteArray()));
-        }
-
-        /**
-         * Internal (to the BTreeNode) method.
-         * Because this method is called only by BTreeNode itself, no synchronization done inside of this method.
-         * @param idx  the index
-         * @return the BTree node
-         */
-        private BTreeNode getChildNode(int idx) {
-            if (ph.getStatus() == BRANCH && idx >= 0 && idx < ptrs.length) {
-                return getBTreeNode(ptrs[idx], this);
-            } else {
-                return null;
-            }
-        }
-
-        /* Not used
-         private synchronized void getChildStream(int idx, Streamable stream) throws IOException {
-         if (ph.getStatus() == LEAF && idx >= 0 && idx < ptrs.length) {
-         Value v = readValue(ptrs[idx]);
-         DataInputStream dis = new DataInputStream(v.getInputStream());
-         stream.read(dis);
-         }
-         }
-         */
-
-        public synchronized long removeValue(Value value) throws IOException, BTreeException {
-            int idx = Arrays.binarySearch(values, value);
-
-            switch (ph.getStatus()) {
-            case BRANCH:
-                idx = idx < 0 ? -(idx + 1) : idx + 1;
-                return getChildNode(idx).removeValue(value);
-
-            case LEAF:
-                if (idx < 0) {
-                    throw new BTreeNotFoundException("Value '" + value + "' doesn't exist");
-                } else {
-                    long oldPtr = ptrs[idx];
-
-                    set(deleteArrayValue(values, idx), deleteArrayLong(ptrs, idx));
-
-                    write();
-                    return oldPtr;
-                }
-
-            default:
-                throw new BTreeCorruptException("Invalid page type '" + ph.getStatus() + "' in removeValue");
-            }
-        }
-
-        public synchronized long addValue(Value value, long pointer) throws IOException, BTreeException {
-            if (value == null) {
-                throw new BTreeException(FaultCodes.DBE_CANNOT_CREATE, "Can't add a null Value");
-            }
-
-            int idx = Arrays.binarySearch(values, value);
-
-            switch (ph.getStatus()) {
-            case BRANCH:
-                idx = idx < 0 ? -(idx + 1) : idx + 1;
-                return getChildNode(idx).addValue(value, pointer);
-
-            case LEAF:
-                if (idx >= 0) {
-                    // Value was found... Overwrite
-                    long oldPtr = ptrs[idx];
-
-                    ptrs[idx] = pointer;
-
-                    set(values, ptrs);
-
-                    write();
-                    return oldPtr;
-                } else {
-                    // Value was not found
-                    idx = -(idx + 1);
-
-                    // Check to see if we've exhausted the block
-                    boolean split = needSplit(value);
-
-                    set(insertArrayValue(values, value, idx), insertArrayLong(ptrs, pointer, idx));
-
-                    if (split) {
-                        split();
-                    } else {
-                        write();
-                    }
-                }
-                return -1;
-
-            default:
-                throw new BTreeCorruptException("Invalid Page Type In addValue");
-            }
-        }
-
-        private synchronized void promoteValue(Value value, long rightPointer) throws IOException, BTreeException {
-            // Check to see if we've exhausted the block
-            boolean split = needSplit(value);
-
-            int idx = Arrays.binarySearch(values, value);
-
-            idx = idx < 0 ? -(idx + 1) : idx + 1;
-
-            set(insertArrayValue(values, value, idx), insertArrayLong(ptrs, rightPointer, idx + 1));
-
-            if (split) {
-                split();
-            } else {
-                write();
-            }
-        }
-
-        private Value getSeparator(Value value1, Value value2) {
-            int idx = value1.compareTo(value2);
-            byte[] b = new byte[Math.abs(idx)];
-
-            value2.copyTo(b, 0, b.length);
-            return new Value(b);
-        }
-
-        /**
-         * Do we need to split this node after adding one more value?
-         * @param value the value to split
-         * @return true if successful
-         */
-        private boolean needSplit(Value value) {
-            // Do NOT split if just 4 key/values are in the node.
-            return this.values.length > 4 && // CurrLength + one Long pointer + value length + one short
-                    this.ph.getDataLen() + 8 + value.getLength() + 2 > BTree.this.fileHeader.getWorkSize();
-        }
-
-        /**
-         * Internal to the BTreeNode method
-         * @throws java.io.IOException if an io error occurs
-         * @throws BTreeException if a DB exception occurs
-         */
-        private void split() throws IOException, BTreeException {
-            Value[] leftVals;
-            Value[] rightVals;
-            long[] leftPtrs;
-            long[] rightPtrs;
-            Value separator;
-
-            short vc = ph.getValueCount();
-            int pivot = vc / 2;
-
-            // Split the node into two nodes
-            switch (ph.getStatus()) {
-            case BRANCH:
-                leftVals = new Value[pivot];
-                leftPtrs = new long[leftVals.length + 1];
-                rightVals = new Value[vc - (pivot + 1)];
-                rightPtrs = new long[rightVals.length + 1];
-
-                System.arraycopy(values, 0, leftVals, 0, leftVals.length);
-                System.arraycopy(ptrs, 0, leftPtrs, 0, leftPtrs.length);
-                System.arraycopy(values, leftVals.length + 1, rightVals, 0, rightVals.length);
-                System.arraycopy(ptrs, leftPtrs.length, rightPtrs, 0, rightPtrs.length);
-
-                separator = values[leftVals.length];
-                break;
-
-            case LEAF:
-                leftVals = new Value[pivot];
-                leftPtrs = new long[leftVals.length];
-                rightVals = new Value[vc - pivot];
-                rightPtrs = new long[rightVals.length];
-
-                System.arraycopy(values, 0, leftVals, 0, leftVals.length);
-                System.arraycopy(ptrs, 0, leftPtrs, 0, leftPtrs.length);
-                System.arraycopy(values, leftVals.length, rightVals, 0, rightVals.length);
-                System.arraycopy(ptrs, leftPtrs.length, rightPtrs, 0, rightPtrs.length);
-
-                separator = getSeparator(leftVals[leftVals.length - 1], rightVals[0]);
-                break;
-
-            default:
-                throw new BTreeCorruptException("Invalid Page Type In split");
-            }
-
-            // Promote the pivot to the parent branch
-            if (parent == null) {
-                // This can only happen if this is the root
-                BTreeNode rNode = createBTreeNode(ph.getStatus(), this);
-
-                rNode.set(rightVals, rightPtrs);
-
-                BTreeNode lNode = createBTreeNode(ph.getStatus(), this);
-
-                lNode.set(leftVals, leftPtrs);
-
-                ph.setStatus(BRANCH);
-                set(new Value[] {
-                    separator
-                }, new long[] {lNode.page.getPageNum(), rNode.page.getPageNum()});
-
-                write();
-                rNode.write();
-                lNode.write();
-            } else {
-                set(leftVals, leftPtrs);
-
-                BTreeNode rNode = createBTreeNode(ph.getStatus(), parent);
-
-                rNode.set(rightVals, rightPtrs);
-
-                write();
-                rNode.write();
-                parent.promoteValue(separator, rNode.page.getPageNum());
-            }
-        }
-
-        // ///////////////////////////////////////////////////////////////
-
-        public synchronized long findValue(Value value) throws IOException, BTreeException {
-            if (value == null) {
-                throw new BTreeNotFoundException("Can't search on null Value");
-            }
-
-            int idx = Arrays.binarySearch(values, value);
-
-            switch (ph.getStatus()) {
-            case BRANCH:
-                idx = idx < 0 ? -(idx + 1) : idx + 1;
-                return getChildNode(idx).findValue(value);
-
-            case LEAF:
-                if (idx < 0) {
-                    throw new BTreeNotFoundException("Value '" + value + "' doesn't exist");
-                } else {
-                    return ptrs[idx];
-                }
-
-            default:
-                throw new BTreeCorruptException("Invalid page type '" + ph.getStatus() + "' in findValue");
-            }
-        }
-
-        // query is a BEAST of a method
-        public synchronized void query(IndexQuery query, BTreeCallback callback) throws IOException, BTreeException {
-            if (query != null && query.getOperator() != IndexQuery.ANY) {
-                Value[] qvals = query.getValues();
-                int leftIdx = Arrays.binarySearch(values, qvals[0]);
-                int rightIdx = qvals.length > 1 ? Arrays.binarySearch(values, qvals[qvals.length - 1]) : leftIdx;
-
-                switch (ph.getStatus()) {
-                case BRANCH:
-                    leftIdx = leftIdx < 0 ? -(leftIdx + 1) : leftIdx + 1;
-                    rightIdx = rightIdx < 0 ? -(rightIdx + 1) : rightIdx + 1;
-
-                    switch (query.getOperator()) {
-                    case IndexQuery.BWX:
-                    case IndexQuery.BW:
-                    case IndexQuery.IN:
-                    case IndexQuery.SW:
-                        // TODO: Can leftIdx be less than 0 here?
-                        if (leftIdx < 0) {
-                            leftIdx = 0;
-                        }
-                        if (rightIdx > ptrs.length - 1) {
-                            rightIdx = ptrs.length - 1;
-                        }
-                        for (int i = leftIdx; i <= rightIdx; i++) {
-                            getChildNode(i).query(query, callback);
-                        }
-                        break;
-
-                    case IndexQuery.NBWX:
-                    case IndexQuery.NBW:
-                    case IndexQuery.NIN:
-                    case IndexQuery.NSW:
-                        if (leftIdx > ptrs.length - 1) {
-                            leftIdx = ptrs.length - 1;
-                        }
-                        for (int i = 0; i <= leftIdx; i++) {
-                            getChildNode(i).query(query, callback);
-                        }
-                        if (rightIdx < 0) {
-                            rightIdx = 0;
-                        }
-                        for (int i = rightIdx; i < ptrs.length; i++) {
-                            getChildNode(i).query(query, callback);
-                        }
-                        break;
-
-                    case IndexQuery.EQ:
-                        getChildNode(leftIdx).query(query, callback);
-                        break;
-
-                    case IndexQuery.LT:
-                    case IndexQuery.LEQ:
-                        if (leftIdx > ptrs.length - 1) {
-                            leftIdx = ptrs.length - 1;
-                        }
-                        for (int i = 0; i <= leftIdx; i++) {
-                            getChildNode(i).query(query, callback);
-                        }
-                        break;
-
-                    case IndexQuery.GT:
-                    case IndexQuery.GEQ:
-                        if (rightIdx < 0) {
-                            rightIdx = 0;
-                        }
-                        for (int i = rightIdx; i < ptrs.length; i++) {
-                            getChildNode(i).query(query, callback);
-                        }
-                        break;
-
-                    case IndexQuery.NEQ:
-                    default:
-                        for (int i = 0; i < ptrs.length; i++) {
-                            getChildNode(i).query(query, callback);
-                        }
-                        break;
-                    }
-                    break;
-
-                case LEAF:
-                    switch (query.getOperator()) {
-                    case IndexQuery.EQ:
-                        if (leftIdx >= 0) {
-                            callback.indexInfo(values[leftIdx], ptrs[leftIdx]);
-                        }
-                        break;
-
-                    case IndexQuery.NEQ:
-                        for (int i = 0; i < ptrs.length; i++) {
-                            if (i != leftIdx) {
-                                callback.indexInfo(values[i], ptrs[i]);
-                            }
-                        }
-                        break;
-
-                    case IndexQuery.BWX:
-                    case IndexQuery.BW:
-                    case IndexQuery.SW:
-                    case IndexQuery.IN:
-                        if (leftIdx < 0) {
-                            leftIdx = -(leftIdx + 1);
-                        }
-                        if (rightIdx < 0) {
-                            rightIdx = -(rightIdx + 1);
-                        }
-                        for (int i = 0; i < ptrs.length; i++) { // FIXME: VG: Optimize this loop
-                            if (i >= leftIdx && i <= rightIdx && query.testValue(values[i])) {
-                                callback.indexInfo(values[i], ptrs[i]);
-                            }
-                        }
-                        break;
-
-                    case IndexQuery.NBWX:
-                    case IndexQuery.NBW:
-                    case IndexQuery.NSW:
-                        if (leftIdx < 0) {
-                            leftIdx = -(leftIdx + 1);
-                        }
-                        if (rightIdx < 0) {
-                            rightIdx = -(rightIdx + 1);
-                        }
-                        for (int i = 0; i < ptrs.length; i++) {
-                            if ((i <= leftIdx || i >= rightIdx) && query.testValue(values[i])) {
-                                callback.indexInfo(values[i], ptrs[i]);
-                            }
-                        }
-                        break;
-
-                    case IndexQuery.LT:
-                    case IndexQuery.LEQ:
-                        if (leftIdx < 0) {
-                            leftIdx = -(leftIdx + 1);
-                        }
-                        for (int i = 0; i < ptrs.length; i++) {
-                            if (i <= leftIdx && query.testValue(values[i])) {
-                                callback.indexInfo(values[i], ptrs[i]);
-                            }
-                        }
-                        break;
-
-                    case IndexQuery.GT:
-                    case IndexQuery.GEQ:
-                        if (rightIdx < 0) {
-                            rightIdx = -(rightIdx + 1);
-                        }
-
-                        for (int i = 0; i < ptrs.length; i++) {
-                            if (i >= rightIdx && query.testValue(values[i])) {
-                                callback.indexInfo(values[i], ptrs[i]);
-                            }
-                        }
-                        break;
-
-                    case IndexQuery.NIN:
-                    default:
-                        for (int i = 0; i < ptrs.length; i++) {
-                            if (query.testValue(values[i])) {
-                                callback.indexInfo(values[i], ptrs[i]);
-                            }
-                        }
-                        break;
-                    }
-                    break;
-
-                default:
-                    throw new BTreeCorruptException("Invalid Page Type In query");
-                }
-
-            } else {
-                // No Query - Just Walk The Tree
-                switch (ph.getStatus()) {
-                case BRANCH:
-                    for (int i = 0; i < ptrs.length; i++) {
-                        getChildNode(i).query(query, callback);
-                    }
-                    break;
-
-                case LEAF:
-                    for (int i = 0; i < values.length; i++) {
-                        callback.indexInfo(values[i], ptrs[i]);
-                    }
-                    break;
-
-                default:
-                    throw new BTreeCorruptException("Invalid Page Type In query");
-                }
-            }
-        }
-    }
-
-    // //////////////////////////////////////////////////////////////////
-
-    @Override
-    public FileHeader createFileHeader() {
-        BTreeFileHeader header = new BTreeFileHeader();
-
-        header.setPageCount(1);
-        header.setTotalCount(1);
-        return header;
-    }
-
-    @Override
-    public FileHeader createFileHeader(boolean read) throws IOException {
-        return new BTreeFileHeader(read);
-    }
-
-    @Override
-    public FileHeader createFileHeader(long pageCount) {
-        return new BTreeFileHeader(pageCount);
-    }
-
-    @Override
-    public FileHeader createFileHeader(long pageCount, int pageSize) {
-        return new BTreeFileHeader(pageCount, pageSize);
-    }
-
-    @Override
-    public PageHeader createPageHeader() {
-        return new BTreePageHeader();
-    }
-
-    /**
-     * BTreeFileHeader
-     */
-
-    protected class BTreeFileHeader extends FileHeader {
-        private long rootPage = 0;
-
-        public BTreeFileHeader() {}
-
-        public BTreeFileHeader(long pageCount) {
-            super(pageCount);
-        }
-
-        public BTreeFileHeader(long pageCount, int pageSize) {
-            super(pageCount, pageSize);
-        }
-
-        public BTreeFileHeader(boolean read) throws IOException {
-            super(read);
-        }
-
-        @Override
-        public synchronized void read(RandomAccessFile raf) throws IOException {
-            super.read(raf);
-            rootPage = raf.readLong();
-        }
-
-        @Override
-        public synchronized void write(RandomAccessFile raf) throws IOException {
-            super.write(raf);
-            raf.writeLong(rootPage);
-        }
-
-        /**
-         *  The root page of the storage tree
-         * @param rootPage the new root page
-         */
-        public synchronized final void setRootPage(long rootPage) {
-            this.rootPage = rootPage;
-            setDirty();
-        }
-
-        /**
-         * The root page of the storage tree
-         * @return the root page
-         */
-        public synchronized final long getRootPage() {
-            return rootPage;
-        }
-    }
-
-
-    /**
-     * BTreePageHeader
-     */
-
-    protected class BTreePageHeader extends PageHeader {
-        private short valueCount = 0;
-
-        public BTreePageHeader() {}
-
-        public BTreePageHeader(DataInputStream dis) throws IOException {
-            super(dis);
-        }
-
-        @Override
-        public synchronized void read(DataInputStream dis) throws IOException {
-            super.read(dis);
-            if (getStatus() == UNUSED) {
-                return;
-            }
-
-            valueCount = dis.readShort();
-        }
-
-        @Override
-        public synchronized void write(DataOutputStream dos) throws IOException {
-            super.write(dos);
-            dos.writeShort(valueCount);
-        }
-
-        /** The number of values stored by this page
-         * @param valueCount the value count
-         */
-        public synchronized final void setValueCount(short valueCount) {
-            this.valueCount = valueCount;
-            setDirty();
-        }
-
-        /**
-         * The number of values stored by this page
-         * @return the value count
-         */
-        public synchronized final short getValueCount() {
-            return valueCount;
-        }
-
-        /**
-         * The number of pointers stored by this page
-         * @return the pointer count
-         */
-        public synchronized final short getPointerCount() {
-            if (getStatus() == BRANCH) {
-                return (short) (valueCount + 1);
-            } else {
-                return valueCount;
-            }
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/BTreeCallback.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/BTreeCallback.java
deleted file mode 100644 (file)
index fe04d57..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xindice" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, The dbXML
- * Group, L.L.C., http://www.dbxmlgroup.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-package net.jxta.impl.xindice.core.filer;
-
-import net.jxta.impl.xindice.core.data.Value;
-
-/**
- * BTreeCallback is a callback interface for BTree queries.
- */
-
-public interface BTreeCallback {
-
-    /**
-     * indexInfo is a callback method for index enumeration.
-     *
-     * @param value The Value being reported
-     * @param pointer The data pointer being reported
-     * @return false to cancel the enumeration
-     */
-    boolean indexInfo(Value value, long pointer);
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/BTreeCorruptException.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/BTreeCorruptException.java
deleted file mode 100644 (file)
index 5d43597..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xindice" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, The dbXML
- * Group, L.L.C., http://www.dbxmlgroup.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-package net.jxta.impl.xindice.core.filer;
-
-import net.jxta.impl.xindice.core.FaultCodes;
-
-/**
- * A BTreecorruptException is thrown by the BTree if the BTree
- * appears to be corrupted in some way.
- */
-
-public final class BTreeCorruptException extends BTreeException {
-    public BTreeCorruptException() {
-        super(FaultCodes.IDX_CORRUPTED);
-    }
-   
-    public BTreeCorruptException(String message) {
-        super(FaultCodes.IDX_CORRUPTED, message);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/BTreeException.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/BTreeException.java
deleted file mode 100644 (file)
index d475410..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xindice" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, The dbXML
- * Group, L.L.C., http://www.dbxmlgroup.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-package net.jxta.impl.xindice.core.filer;
-
-/**
- * A BTreeException is thrown by the BTree if an exception occurs
- * in the managing of the BTree.
- */
-public class BTreeException extends FilerException {
-    public BTreeException(int faultCode) {
-        super(faultCode);
-    }
-   
-    public BTreeException(int faultCode, String message) {
-        super(faultCode, message);
-    }
-
-    public BTreeException(int faultCode, String message, Throwable cause) {
-        super(faultCode, message, cause);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/BTreeFiler.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/BTreeFiler.java
deleted file mode 100644 (file)
index 4ad7990..0000000
+++ /dev/null
@@ -1,491 +0,0 @@
-package net.jxta.impl.xindice.core.filer;
-
-
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xindice" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, The dbXML
- * Group, L.L.C., http://www.dbxmlgroup.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-import net.jxta.impl.xindice.core.DBException;
-import net.jxta.impl.xindice.core.FaultCodes;
-import net.jxta.impl.xindice.core.data.Key;
-import net.jxta.impl.xindice.core.data.Record;
-import net.jxta.impl.xindice.core.data.RecordSet;
-import net.jxta.impl.xindice.core.data.Value;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * BTreeFiler is a Filer implementation based on the BTree class.
- */
-public final class BTreeFiler extends BTree implements Filer {
-
-    protected static final byte RECORD = 20;
-
-    private static final short PAGESIZE = 512;
-    // TODO: MAXKEYSIZE might need tuning
-    private static final short MAXKEYSIZE = 256;
-
-    private BTreeFilerHeader fileHeader;
-
-    private static final int DBE_CANNOT_READ = (int) (572l);
-    
-    public BTreeFiler() {
-        super();
-        fileHeader = (BTreeFilerHeader) getFileHeader();
-    }
-
-    public void setLocation(String dir, String file) {
-        setFile(new File(dir, file + ".tbl"));
-    }
-
-    public String getName() {
-        return getFile().getName();
-    }
-
-    @Override
-    public boolean open() throws DBException {
-        if (super.open()) {
-            // These are the only properties that can be changed after creation
-            fileHeader.setMaxKeySize(MAXKEYSIZE);
-            return true;
-        } else {
-            return false;
-        }
-    }
-
-    @Override
-    public boolean create() throws DBException {
-        fileHeader.setPageSize(PAGESIZE);
-        fileHeader.setMaxKeySize(MAXKEYSIZE);
-        return super.create();
-    }
-
-    public Record readRecord(Key key) throws DBException {
-        if (key == null || key.getLength() == 0) {
-            return null;
-        }
-
-        checkOpened();
-        try {
-            long pos = findValue(key);
-            Record record = readRecord(pos);
-
-            record.setKey(key);
-            return record;
-        } catch (BTreeNotFoundException b) {// do nothing
-        } catch (BTreeException b) {
-            throw b;
-        } catch (IOException e) {
-            throw new FilerException(DBE_CANNOT_READ, "Can't read record '" + key + "': " + e.getMessage(), e);
-        }
-        return null;
-    }
-
-    public Record readRecord(long pos) throws DBException {
-        checkOpened();
-        try {
-            Page startPage = getPage(pos);
-            Value v = readValue(startPage);
-            BTreeFilerPageHeader sph = (BTreeFilerPageHeader) startPage.getPageHeader();
-
-            HashMap<String, Long> meta = new HashMap<String, Long>(4);
-
-            meta.put(Record.CREATED, sph.getCreated());
-            meta.put(Record.MODIFIED, sph.getModified());
-            meta.put(Record.LIFETIME, sph.getLifetime());
-            meta.put(Record.EXPIRATION, sph.getExpiration());
-
-            return new Record(null, v, meta);
-        } catch (IOException e) {
-            throw new FilerException(DBE_CANNOT_READ, "Can't read record : " + e.getMessage(), e);
-        }
-    }
-
-    public long writeRecord(Key key, Value value) throws DBException {
-
-        return writeRecord(key, value, 0, 0);
-    }
-
-    public long writeRecord(Key key, Value value, long lifetime, long expiration) throws DBException {
-
-        if (key == null || key.getLength() == 0) {
-            throw new FilerException(FaultCodes.DBE_CANNOT_CREATE, "Invalid key: '" + key + "'");
-        }
-        if (value == null) {
-            throw new FilerException(FaultCodes.DBE_CANNOT_CREATE, "Invalid null value");
-        }
-        checkOpened();
-        try {
-            Page p;
-            long pos;
-            try {
-                pos = findValue(key);
-                p = getPage(pos);
-            } catch (BTreeNotFoundException b) {
-                p = getFreePage();
-                pos = p.getPageNum();
-                addValue(key, p.getPageNum());
-                fileHeader.incRecordCount();
-            }
-            BTreeFilerPageHeader ph = (BTreeFilerPageHeader) p.getPageHeader();
-
-            long t = System.currentTimeMillis();
-
-            if (ph.getStatus() == UNUSED) {
-                ph.setCreated(t);
-            }
-         
-            ph.setModified(t);
-            ph.setLifetime(lifetime);
-            ph.setExpiration(expiration);
-            ph.setStatus(RECORD);
-
-            writeValue(p, value);
-            flush();
-            return pos;
-        } catch (IOException e) {
-            throw new FilerException(FaultCodes.DBE_CANNOT_CREATE, "Can't write record '" + key + "': " + e.getMessage(), e);
-        }
-    }
-
-    public long writeRecord(long pos, Value value) throws DBException {
-
-        if (value == null) {
-            throw new FilerException(FaultCodes.DBE_CANNOT_CREATE, "Invalid null value");
-        }
-        checkOpened();
-        try {
-            writeValue(pos, value);
-            flush();
-            return pos;
-        } catch (IOException e) {
-            throw new FilerException(FaultCodes.DBE_CANNOT_CREATE, "Can't write record '" + value + "': " + e.getMessage(), e);
-        }
-    }
-
-    public boolean deleteRecord(Key key) throws DBException {
-        if (key == null || key.getLength() == 0) {
-            return false;
-        }
-        checkOpened();
-        try {
-            long pos = findValue(key);
-            Page p = getPage(pos);
-
-            removeValue(key);
-            unlinkPages(p.getPageNum());
-
-            fileHeader.decRecordCount();
-
-            flush();
-
-            return true;
-        } catch (BTreeNotFoundException b) {// not found move on
-        } catch (IOException e) {
-            throw new FilerException(FaultCodes.DBE_CANNOT_DROP, "Can't delete record '" + key + "': " + e.getMessage(), e);
-        }
-        return false;
-    }
-
-    public long getRecordCount() throws DBException {
-        checkOpened();
-        return fileHeader.getRecordCount();
-    }
-
-    public RecordSet getRecordSet() throws DBException {
-        checkOpened();
-        return new BTreeFilerRecordSet();
-    }
-
-    /**
-     * BTreeFilerRecordSet
-     */
-
-    private class BTreeFilerRecordSet implements RecordSet, BTreeCallback {
-        private List<Key> keys = new ArrayList<Key>();
-        private Iterator<Key> it;
-
-        public BTreeFilerRecordSet() throws DBException {
-            try {
-                query(null, this);
-                it = keys.iterator();
-            } catch (IOException e) {
-                throw new FilerException(FaultCodes.GEN_CRITICAL_ERROR, "Error generating RecordSet", e);
-            }
-        }
-
-        public synchronized boolean indexInfo(Value value, long pointer) {
-            keys.add(new Key(value));
-            return true;
-        }
-
-        public synchronized Key getNextKey() {
-            return it.next();
-        }
-
-        public synchronized Record getNextRecord() throws DBException {
-            return readRecord(it.next());
-        }
-
-        public synchronized Value getNextValue() throws DBException {
-            return getNextRecord().getValue();
-        }
-
-        public synchronized boolean hasMoreRecords() {
-            return it.hasNext();
-        }
-    }
-
-    // //////////////////////////////////////////////////////////////////
-
-    @Override
-    public FileHeader createFileHeader() {
-        return new BTreeFilerHeader();
-    }
-
-    @Override
-    public FileHeader createFileHeader(boolean read) throws IOException {
-        return new BTreeFilerHeader(read);
-    }
-
-    @Override
-    public FileHeader createFileHeader(long pageCount) {
-        return new BTreeFilerHeader(pageCount);
-    }
-
-    @Override
-    public FileHeader createFileHeader(long pageCount, int pageSize) {
-        return new BTreeFilerHeader(pageCount, pageSize);
-    }
-
-    @Override
-    public PageHeader createPageHeader() {
-        return new BTreeFilerPageHeader();
-    }
-
-    /**
-     * BTreeFilerHeader
-     */
-
-    private final class BTreeFilerHeader extends BTreeFileHeader {
-        private long totalBytes = 0;
-
-        public BTreeFilerHeader() {}
-
-        public BTreeFilerHeader(long pageCount) {
-            super(pageCount);
-        }
-
-        public BTreeFilerHeader(long pageCount, int pageSize) {
-            super(pageCount, pageSize);
-        }
-
-        public BTreeFilerHeader(boolean read) throws IOException {
-            super(read);
-        }
-
-        @Override
-        public synchronized void read(RandomAccessFile raf) throws IOException {
-            super.read(raf);
-            totalBytes = raf.readLong();
-        }
-
-        @Override
-        public synchronized void write(RandomAccessFile raf) throws IOException {
-            super.write(raf);
-            raf.writeLong(totalBytes);
-        }
-
-        /**
-         * The total number of bytes in use by the file
-         * @param totalBytes the new total number of bytes
-         */
-        public synchronized void setTotalBytes(long totalBytes) {
-            this.totalBytes = totalBytes;
-            setDirty();
-        }
-
-        /**
-         * The total number of bytes in use by the file
-         * @return the total number of bytes
-         */
-        public synchronized long getTotalBytes() {
-            return totalBytes;
-        }
-    }
-
-
-    /**
-     * BTreeFilerPageHeader
-     */
-
-    private final class BTreeFilerPageHeader extends BTreePageHeader {
-        private long created = 0;
-        private long modified = 0;
-        private long lifetime = 0;
-        private long expiration = 0;
-
-        public BTreeFilerPageHeader() {}
-
-        public BTreeFilerPageHeader(DataInputStream dis) throws IOException {
-            super(dis);
-        }
-
-        @Override
-        public synchronized void read(DataInputStream dis) throws IOException {
-            super.read(dis);
-
-            if (getStatus() == UNUSED) {
-                return;
-            }
-
-            created = dis.readLong();
-            modified = dis.readLong();
-            lifetime = dis.readLong();
-            expiration = dis.readLong();
-        }
-
-        @Override
-        public synchronized void write(DataOutputStream dos) throws IOException {
-            super.write(dos);
-            dos.writeLong(created);
-            dos.writeLong(modified);
-            dos.writeLong(lifetime);
-            dos.writeLong(expiration);
-        }
-
-        @Override
-        public synchronized void setRecordLen(int recordLen) {
-            fileHeader.setTotalBytes((fileHeader.totalBytes - getRecordLen()) + recordLen);
-            super.setRecordLen(recordLen);
-        }
-
-        /**
-         * UNIX-time when this record was created
-         * @param created creation time
-         */
-        public synchronized void setCreated(long created) {
-            this.created = created;
-            setDirty();
-        }
-
-        /**
-         * UNIX-time when this record was created
-         * @return creation time
-         */
-        public synchronized long getCreated() {
-            return created;
-        }
-
-        /**
-         * UNIX-time when this record was last modified
-         * @param modified modified time
-         */
-        public synchronized void setModified(long modified) {
-            this.modified = modified;
-            setDirty();
-        }
-
-        /**
-         *  UNIX-time when this record was last modified
-         * @return modified time
-         */
-        public synchronized long getModified() {
-            return modified;
-        }
-
-        /**
-         *  JXTA-lifetime this record's lifetime
-         * @param lifetime the new record lifetime
-         */
-        public synchronized void setLifetime(long lifetime) {
-            this.lifetime = lifetime;
-            setDirty();
-        }
-
-        /**
-         * JXTA-lifetime this record's lifetime
-         * @return the record lifetime
-         */
-        public synchronized long getLifetime() {
-            return lifetime;
-        }
-
-        /**
-         * JXTA-expiration this record's expiration
-         * @param expiration the record expiration time
-         */
-        public synchronized void setExpiration(long expiration) {
-            this.expiration = expiration;
-            setDirty();
-        }
-
-        /**
-         * JXTA-expiration this record's expiration
-         * @return the record expiration time
-         */
-        public synchronized long getExpiration() {
-            return expiration;
-        }
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/BTreeNotFoundException.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/BTreeNotFoundException.java
deleted file mode 100644 (file)
index c4cb520..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xindice" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, The dbXML
- * Group, L.L.C., http://www.dbxmlgroup.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-package net.jxta.impl.xindice.core.filer;
-
-import net.jxta.impl.xindice.core.FaultCodes;
-
-/**
- * A BTreeNotFoundException is thrown by the BTree if a Value
- * can't be found in the BTree.
- */
-public final class BTreeNotFoundException extends BTreeException {
-    public BTreeNotFoundException() {
-        super(FaultCodes.IDX_VALUE_NOT_FOUND);
-    }
-   
-    public BTreeNotFoundException(String message) {
-        super(FaultCodes.IDX_VALUE_NOT_FOUND, message);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/Filer.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/Filer.java
deleted file mode 100644 (file)
index f36fa2b..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xindice" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, The dbXML
- * Group, L.L.C., http://www.dbxmlgroup.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-package net.jxta.impl.xindice.core.filer;
-
-import net.jxta.impl.xindice.core.DBException;
-import net.jxta.impl.xindice.core.DBObject;
-import net.jxta.impl.xindice.core.data.Key;
-import net.jxta.impl.xindice.core.data.Record;
-import net.jxta.impl.xindice.core.data.RecordSet;
-import net.jxta.impl.xindice.core.data.Value;
-import net.jxta.impl.xindice.util.Named;
-
-/**
- * Filer is the low-level file management interface for Xindice.  A Filer object
- * is implemented in order to provide a data source to the Xindice Collection
- * class.  Filers are developed to perform transparent storage and retrieval to
- * and from heterogenous data sources (such as FTP, HTTP, RDBMS, etc...)
- */
-public interface Filer extends Named, DBObject {
-
-    /**
-     * readRecord returns a Record from the Filer based on the specified
-     * Key.
-     *
-     * @param key The Record's Key
-     * @return The returned Record
-     * @throws net.jxta.impl.xindice.core.DBException if a db exception occurs
-     */
-    Record readRecord(Key key) throws DBException;
-
-    /**
-     * readRecord returns a Record from the Filer at the specified
-     * position. The Record's Key will be set to null.
-     *
-     * @param pos The Record's position
-     * @return The returned Record
-     * @throws net.jxta.impl.xindice.core.DBException if a db exception occurs
-     */
-    Record readRecord(long pos) throws DBException;
-
-    /**
-     * writeRecord writes a Value to the Filer based on the specified Key.
-     *
-     * @param key The Record's Key
-     * @param value The Record's Value
-     * @return 0 if the Record could not be written, the starting
-     * offset of the Record otherwise (used for indexing)
-     * @throws net.jxta.impl.xindice.core.DBException if a db exception occurs
-     */
-    long writeRecord(Key key, Value value) throws DBException;
-
-    /**
-     * deleteRecord removes a Record from the Filer based on the
-     * specified Key.
-     *
-     * @param key The Record's Key
-     * @return Whether or not the Record was deleted
-     * @throws net.jxta.impl.xindice.core.DBException if a db exception occurs
-     */
-    boolean deleteRecord(Key key) throws DBException;
-
-    /**
-     * getRecordCount returns the number of Records in the Filer.
-     *
-     * @return The Record count
-     * @throws net.jxta.impl.xindice.core.DBException if a db exception occurs
-     */
-    long getRecordCount() throws DBException;
-
-    /**
-     * getRecordSet returns a RecordSet object for the current Filer.
-     *
-     * @return The Filer Enumerator
-     * @throws net.jxta.impl.xindice.core.DBException if a db exception occurs
-     */
-    RecordSet getRecordSet() throws DBException;
-   
-    /**
-     * flush forcefully flushes any unwritten buffers to disk.
-     * @throws net.jxta.impl.xindice.core.DBException if a db exception occurs
-     */
-    void flush() throws DBException;
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/FilerException.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/FilerException.java
deleted file mode 100644 (file)
index 5b7b0e9..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xindice" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, The dbXML
- * Group, L.L.C., http://www.dbxmlgroup.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-package net.jxta.impl.xindice.core.filer;
-
-import net.jxta.impl.xindice.core.DBException;
-
-/**
- * A FilerException is thrown by a Filer if an exception occurs
- * in the managing of the Filer.
- */
-public class FilerException extends DBException {
-    public FilerException(int faultCode) {
-        super(faultCode);
-    }
-   
-    public FilerException(int faultCode, String message) {
-        super(faultCode, message);
-    }
-
-    public FilerException(int faultCode, String message, Throwable cause) {
-        super(faultCode, message, cause);
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/MemFiler.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/MemFiler.java
deleted file mode 100644 (file)
index 0f4c887..0000000
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xindice" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, The dbXML
- * Group, L.L.C., http://www.dbxmlgroup.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-package net.jxta.impl.xindice.core.filer;
-
-import net.jxta.impl.xindice.core.DBException;
-import net.jxta.impl.xindice.core.FaultCodes;
-import net.jxta.impl.xindice.core.data.Key;
-import net.jxta.impl.xindice.core.data.Value;
-import net.jxta.impl.xindice.core.data.Record;
-import net.jxta.impl.xindice.core.data.RecordSet;
-
-import java.io.File;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * MemFiler is an In-Memory Filer implementation for Xindice.  MemFiler can be
- * used for temporary collections and caching.  It's basically a layering on
- * top of HashMap.
- */
-public final class MemFiler implements Filer {
-    private Map<Key, Record> hashTable = null;
-    private Map<Long, Key> posTable = null;
-    private boolean opened = false;
-    private boolean readOnly = false;
-    private long position = 0;
-    public MemFiler() {
-        hashTable = Collections.synchronizedMap(new HashMap<Key, Record>());
-        posTable = Collections.synchronizedMap(new HashMap<Long, Key>());
-    }
-
-    public MemFiler(Map<Key, Record> hashTable, boolean readOnly) {
-        this.hashTable = hashTable;
-        this.readOnly = readOnly;
-    }
-
-    public MemFiler(Map<Key, Record> hashTable) {
-        this(hashTable, false);
-    }
-
-    public void setLocation(File root, String location) {}
-
-    public String getName() {
-        return "MemFiler";
-    }
-
-    private void checkOpened() throws DBException {
-        if (!opened) {
-            throw new FilerException(FaultCodes.COL_COLLECTION_CLOSED, "Filer is closed");
-        }
-    }
-
-    private void checkReadOnly() throws DBException {
-        if (readOnly) {
-            throw new FilerException(FaultCodes.COL_COLLECTION_READ_ONLY, "Filer is read-only");
-        }
-    }
-
-    public boolean create() {
-        hashTable.clear();
-        return true;
-    }
-
-    public boolean open() {
-        opened = true;
-        return opened;
-    }
-
-    public boolean isOpened() {
-        return opened;
-    }
-
-    public boolean exists() {
-        return true;
-    }
-
-    public boolean drop() {
-        hashTable.clear();
-        opened = false;
-        return !opened;
-    }
-
-    public boolean close() {
-        opened = false;
-        return !opened;
-    }
-
-    public void flush() {}
-
-    public Record readRecord(Key key) throws DBException {
-        if (key == null || key.getLength() == 0) {
-            return null;
-        }
-        checkOpened();
-        return hashTable.get(key);
-    }
-   
-    public Record readRecord(long pos) throws DBException {
-        if (pos < 0) {
-            return null;
-        }
-        checkOpened();
-        Key key = posTable.get(pos);
-
-        return hashTable.get(key);
-    }
-   
-    public long writeRecord(Key key, Value value) throws DBException {
-        if (key == null || key.getLength() == 0) {
-            throw new FilerException(FaultCodes.DBE_CANNOT_CREATE, "Invalid key: '" + key + "'");
-        }
-        if (value == null) {
-            throw new FilerException(FaultCodes.DBE_CANNOT_CREATE, "Invalid null value");
-        }
-        checkOpened();
-        checkReadOnly();
-        hashTable.put(key, new Record(key, value));
-        posTable.put(position, key);
-        long result = position;
-
-        position++;
-        return result;
-    }
-   
-    public boolean deleteRecord(Key key) throws DBException {
-        if (key == null || key.getLength() == 0) {
-            return false;
-        }
-        checkOpened();
-        checkReadOnly();
-        return hashTable.remove(key) != null;
-    }
-
-    public long getRecordCount() throws DBException {
-        checkOpened();
-        return hashTable.size();
-    }
-
-    public RecordSet getRecordSet() throws DBException {
-        checkOpened();
-        return new MemRecordSet();
-    }
-
-    /**
-     * MemRecordSet
-     */
-
-    private class MemRecordSet implements RecordSet {
-        private Iterator<Record> it = hashTable.values().iterator();
-
-        public synchronized boolean hasMoreRecords() throws DBException {
-            return it.hasNext();
-        }
-
-        public synchronized Record getNextRecord() throws DBException {
-            checkOpened();
-            return it.next();
-        }
-
-        public synchronized Value getNextValue() throws DBException {
-            checkOpened();
-            return (it.next()).getValue();
-        }
-
-        public synchronized Key getNextKey() {
-            return (it.next()).getKey();
-        }
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/Paged.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/Paged.java
deleted file mode 100644 (file)
index bd3c483..0000000
+++ /dev/null
@@ -1,1501 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xindice" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, The dbXML
- * Group, L.L.C., http://www.dbxmlgroup.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-package net.jxta.impl.xindice.core.filer;
-
-import net.jxta.impl.xindice.core.DBException;
-import net.jxta.impl.xindice.core.FaultCodes;
-import net.jxta.impl.xindice.core.data.Key;
-import net.jxta.impl.xindice.core.data.Value;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.RandomAccessFile;
-import java.lang.ref.WeakReference;
-import java.util.Collection;
-import java.util.EmptyStackException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Stack;
-import java.util.WeakHashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Paged is a paged file implementation that is foundation for both the
- * BTree class and the HashFiler. It provides flexible paged I/O and
- * page caching functionality.
- * <p/>
- * Page has folowing configuration attributes:
- * <ul>
- * <li><strong>pagesize</strong>: Size of the page used by the paged file.
- * Default page size is 4096 bytes. This parameter can be set only
- * before paged file is created. Once it is created, this parameter
- * can not be changed.</li>
- * <li><strong>maxkeysize</strong>: Maximum allowed size of the key.
- * Default maximum key size is 256 bytes.</li>
- * <li><strong>max-descriptors</strong>: Defines maximum amount of
- * simultaneously opened file descriptors this paged file can have.
- * Several descriptors are needed to provide multithreaded access
- * to the underlying file. Too large number will limit amount of
- * collections you can open. Default value is 16
- * (DEFAULT_DESCRIPTORS_MAX).</li>
- * </ul>
- * <p/>
- * <br>FIXME: Currently it seems that maxkeysize is not used anywhere.
- * <br>TODO: Introduce Paged interface, implementations.
- */
-public abstract class Paged {
-
-    /**
-     * Logger
-     */
-    private final static Logger LOG = Logger.getLogger(Paged.class.getName());
-
-    /**
-     * The maximum number of pages that will be held in the dirty cache.
-     * Once number reaches the limit, pages are flushed to disk.
-     */
-    private static final int MAX_DIRTY_SIZE = 128;
-
-    // The maximum number of open random access files we can have
-    private static final int DEFAULT_DESCRIPTORS_MAX = 16;
-
-    /**
-     * Unused page status
-     */
-    protected static final byte UNUSED = 0;
-
-    /**
-     * Overflow page status
-     */
-    protected static final byte OVERFLOW = 126;
-
-    /**
-     * Deleted page status
-     */
-    protected static final byte DELETED = 127;
-
-    /**
-     * Page ID of non-existent page
-     */
-    protected static final int NO_PAGE = -1;
-
-    /**
-     * flag whether to sync DB on every write or not.
-     */
-    protected boolean sync = true;
-
-    // TODO: This is not a cache right now, but a way to assure that only one page instance at most exists in memory at all times.
-    /**
-     * Cache of recently read pages.
-     * <p/>
-     * Cache contains weak references to the Page objects, keys are page numbers (Long objects).
-     * Access synchronized by this map itself.
-     */
-    private final Map<Long, WeakReference<Page>> pages = new WeakHashMap<Long, WeakReference<Page>>();
-
-    /**
-     * Cache of modified pages waiting to be written out.
-     * Access is synchronized by the {@link #dirtyLock}.
-     */
-    private Map<Long, Page> dirty = new HashMap<Long, Page>();
-
-    /**
-     * Lock for synchronizing access to the {@link #dirty} map.
-     */
-    private final Object dirtyLock = new Object();
-
-    /**
-     * Random access file descriptors cache.
-     * Access to it and to {@link #descriptorsCount} is synchronized by itself.
-     */
-    private final Stack<RandomAccessFile> descriptors = new Stack<RandomAccessFile>();
-
-    /**
-     * The number of random access file objects that exist, either in the
-     * cache {@link #descriptors}, or currently in use.
-     */
-    private int descriptorsCount;
-
-    /**
-     * The maximum number of random access file objects that can be opened
-     * by this paged instance.
-     */
-    private int descriptorsMax;
-
-    /**
-     * Whether the file is opened or not.
-     */
-    private boolean opened;
-
-    /**
-     * The underlying file where the Paged object stores its pages.
-     */
-    private File file;
-
-    /**
-     * Header of this Paged
-     */
-    private final FileHeader fileHeader;
-
-    public Paged() {
-        descriptorsMax = DEFAULT_DESCRIPTORS_MAX;
-        fileHeader = createFileHeader();
-    }
-
-    public Paged(File file) {
-        this();
-        setFile(file);
-    }
-
-    /**
-     * setFile sets the file object for this Paged.
-     *
-     * @param file The File
-     */
-    protected final void setFile(final File file) {
-        this.file = file;
-    }
-
-    /**
-     * getFile returns the file object for this Paged.
-     *
-     * @return The File
-     */
-    protected final File getFile() {
-        return file;
-    }
-
-    /**
-     * Obtain RandomAccessFile ('descriptor') object out of the pool.
-     * If no descriptors available, and maximum amount already allocated,
-     * the call will block.
-     * @return the file
-     * @throws java.io.IOException if an io error occurs
-     */
-    protected final RandomAccessFile getDescriptor() throws IOException {
-        synchronized (descriptors) {
-            // If there are descriptors in the cache return one.
-            if (!descriptors.empty()) {
-                return descriptors.pop();
-            }
-            // Otherwise we need to get one some other way.
-
-            // First try to create a new one if there's room
-            if (descriptorsCount < descriptorsMax) {
-                descriptorsCount++;
-                return new RandomAccessFile(file, "rw");
-            }
-
-            // Otherwise we have to wait for one to be released by another thread.
-            while (true) {
-                try {
-                    descriptors.wait();
-                    return descriptors.pop();
-                } catch (InterruptedException e) {// Ignore, and continue to wait
-                } catch (EmptyStackException e) {// Ignore, and continue to wait
-                }
-            }
-        }
-    }
-
-    /**
-     * Puts a RandomAccessFile ('descriptor') back into the descriptor pool.
-     * @param raf the file to add
-     */
-    protected final void putDescriptor(RandomAccessFile raf) {
-        if (raf != null) {
-            synchronized (descriptors) {
-                descriptors.push(raf);
-                descriptors.notify();
-            }
-        }
-    }
-
-    /**
-     * Closes a RandomAccessFile ('descriptor') and removes it from the pool.
-     * @param raf the file to close
-     */
-    protected final void closeDescriptor(RandomAccessFile raf) {
-        if (raf != null) {
-            try {
-                raf.close();
-            } catch (IOException e) {// Ignore close exception
-            }
-
-            // Synchronization is necessary as decrement operation is not atomic
-            synchronized (descriptors) {
-                descriptorsCount--;
-            }
-        }
-    }
-
-    /**
-     * getPage returns the page specified by pageNum.
-     *
-     * @param pageNum The Page number
-     * @return The requested Page
-     * @throws IOException if an Exception occurs
-     */
-    protected final Page getPage(long pageNum) throws IOException {
-        final Long lp = pageNum;
-        Page page;
-
-        synchronized (this) {
-            // Check if it's in the dirty cache
-            // No need to synchronize on dirtyLock thanks to atomic assignment
-            page = dirty.get(lp);
-
-            // if not check if it's already loaded in the page cache
-            if (page == null) {
-                WeakReference<Page> ref = pages.get(lp);
-
-                if (ref != null) {
-                    page = ref.get();
-                }
-            }
-
-            // if still not found we need to create it and add it to the page cache.
-            if (page == null) {
-                page = new Page(lp);
-                pages.put(page.pageNum, new WeakReference<Page>(page));
-            }
-        }
-
-        // Load the page from disk if necessary
-        page.read();
-        return page;
-    }
-
-    /**
-     * readValue reads the multi-Paged Value starting at the specified
-     * Page.
-     *
-     * @param page The starting Page
-     * @return The Value
-     * @throws IOException if an Exception occurs
-     */
-    protected final Value readValue(Page page) throws IOException {
-        final PageHeader sph = page.getPageHeader();
-        ByteArrayOutputStream bos = new ByteArrayOutputStream(sph.getRecordLen());
-
-        // Loop until we've read all the pages into memory.
-        Page p = page;
-
-        while (true) {
-            PageHeader ph = p.getPageHeader();
-
-            // Add the contents of the page onto the stream
-            p.streamTo(bos);
-
-            // Continue following the list of pages until we get to the end.
-            long nextPage = ph.getNextPage();
-
-            if (nextPage == NO_PAGE) {
-                break;
-            }
-            p = getPage(nextPage);
-        }
-
-        // Return a Value with the collected contents of all pages.
-        return new Value(bos.toByteArray());
-    }
-
-    /**
-     * readValue reads the multi-Paged Value starting at the specified
-     * page number.
-     *
-     * @param page The starting page number
-     * @return The Value
-     * @throws IOException if an Exception occurs
-     */
-    protected final Value readValue(long page) throws IOException {
-        return readValue(getPage(page));
-    }
-
-    /**
-     * writeValue writes the multi-Paged Value starting at the specified
-     * Page.
-     *
-     * @param page  The starting Page
-     * @param value The Value to write
-     * @throws IOException if an Exception occurs
-     */
-    protected final void writeValue(Page page, Value value) throws IOException {
-        if (value == null) {
-            throw new IOException("Can't write a null value");
-        }
-
-        InputStream is = value.getInputStream();
-
-        // Write as much as we can onto the primary page.
-        PageHeader hdr = page.getPageHeader();
-
-        hdr.setRecordLen(value.getLength());
-        page.streamFrom(is);
-
-        // Write out the rest of the value onto any needed overflow pages
-        while (is.available() > 0) {
-            Page lpage = page;
-            PageHeader lhdr = hdr;
-
-            // Find an overflow page to use
-            long np = lhdr.getNextPage();
-
-            if (np != NO_PAGE) {
-                // Use an existing page.
-                page = getPage(np);
-            } else {
-                // Create a new overflow page
-                page = getFreePage();
-                lhdr.setNextPage(page.getPageNum());
-            }
-
-            // Mark the page as an overflow page.
-            hdr = page.getPageHeader();
-            hdr.setStatus(OVERFLOW);
-
-            // Write some more of the value to the overflow page.
-            page.streamFrom(is);
-            lpage.write();
-        }
-
-        // Cleanup any unused overflow pages. i.e. the value is smaller then the
-        // last time it was written.
-        long np = hdr.getNextPage();
-
-        if (np != NO_PAGE) {
-            unlinkPages(np);
-        }
-
-        hdr.setNextPage(NO_PAGE);
-        page.write();
-    }
-
-    /**
-     * writeValue writes the multi-Paged Value starting at the specified
-     * page number.
-     *
-     * @param page  The starting page number
-     * @param value The Value to write
-     * @throws IOException if an Exception occurs
-     */
-    protected final void writeValue(long page, Value value) throws IOException {
-        writeValue(getPage(page), value);
-    }
-
-    /**
-     * unlinkPages unlinks a set of pages starting at the specified Page.
-     *
-     * @param page The starting Page to unlink
-     * @throws IOException if an Exception occurs
-     */
-    protected final void unlinkPages(Page page) throws IOException {
-        // Handle the page if it's in primary space by setting its status to
-        // DELETED and freeing any overflow pages linked to it.
-        if (page.pageNum < fileHeader.pageCount) {
-            long nextPage = page.header.nextPage;
-
-            page.header.setStatus(DELETED);
-            page.header.setNextPage(NO_PAGE);
-            page.write();
-
-            // See if there are any chained pages from the page that was just removed
-            if (nextPage == NO_PAGE) {
-                page = null;
-            } else {
-                page = getPage(nextPage);
-            }
-        }
-
-        // Add any overflow pages to the list of free pages.
-        if (page != null) {
-            // Get the first and last page in the chain.
-            long firstPage = page.pageNum;
-
-            while (page.header.nextPage != NO_PAGE) {
-                page = getPage(page.header.nextPage);
-            }
-            long lastPage = page.pageNum;
-
-            // Free the chain
-            synchronized (fileHeader) {
-                // If there are already some free pages, add the start of the chain
-                // to the list of free pages.
-                if (fileHeader.lastFreePage != NO_PAGE) {
-                    Page p = getPage(fileHeader.lastFreePage);
-
-                    p.header.setNextPage(firstPage);
-                    p.write();
-                }
-
-                // Otherwise set the chain as the list of free pages.
-                if (fileHeader.firstFreePage == NO_PAGE) {
-                    fileHeader.setFirstFreePage(firstPage);
-                }
-
-                // Add a reference to the end of the chain.
-                fileHeader.setLastFreePage(lastPage);
-            }
-        }
-    }
-
-    /**
-     * unlinkPages unlinks a set of pages starting at the specified
-     * page number.
-     *
-     * @param pageNum The starting page number to unlink
-     * @throws IOException if an Exception occurs
-     */
-    protected final void unlinkPages(long pageNum) throws IOException {
-        unlinkPages(getPage(pageNum));
-    }
-
-    /**
-     * getFreePage returns the first free Page from secondary storage.
-     * If no Pages are available, the file is grown as appropriate.
-     *
-     * @return The next free Page
-     * @throws IOException if an Exception occurs
-     */
-    protected final Page getFreePage() throws IOException {
-        Page p = null;
-
-        // Synchronize read and write to the fileHeader.firstFreePage
-        synchronized (fileHeader) {
-            if (fileHeader.firstFreePage != NO_PAGE) {
-                // Steal a deleted page
-                p = getPage(fileHeader.firstFreePage);
-                fileHeader.setFirstFreePage(p.getPageHeader().nextPage);
-                if (fileHeader.firstFreePage == NO_PAGE) {
-                    fileHeader.setLastFreePage(NO_PAGE);
-                }
-            }
-        }
-
-        if (p == null) {
-            // No deleted pages, grow the file
-            p = getPage(fileHeader.incTotalCount());
-        }
-
-        // Initialize The Page Header (Cleanly)
-        p.header.setNextPage(NO_PAGE);
-        p.header.setStatus(UNUSED);
-        return p;
-    }
-
-    /**
-     * @throws DBException COL_COLLECTION_CLOSED if paged file is closed
-     */
-    protected final void checkOpened() throws DBException {
-        if (!opened) {
-            throw new FilerException(FaultCodes.COL_COLLECTION_CLOSED, "Filer is closed");
-        }
-    }
-
-    /**
-     * getFileHeader returns the FileHeader
-     *
-     * @return The FileHeader
-     */
-    public FileHeader getFileHeader() {
-        return fileHeader;
-    }
-
-    public boolean exists() {
-        return file.exists();
-    }
-
-    public boolean create() throws DBException {
-        try {
-            createFile();
-            fileHeader.write();
-            flush();
-            return true;
-        } catch (Exception e) {
-            throw new FilerException(FaultCodes.GEN_CRITICAL_ERROR, "Error creating " + file.getName(), e);
-        }
-    }
-
-    private void createFile() throws IOException {
-        RandomAccessFile raf = null;
-
-        try {
-            raf = getDescriptor();
-            long o = fileHeader.headerSize + (fileHeader.pageCount + 1) * fileHeader.pageSize - 1;
-
-            raf.seek(o);
-            raf.write(0);
-        } finally {
-            putDescriptor(raf);
-        }
-    }
-
-    public boolean open() throws DBException {
-        RandomAccessFile raf = null;
-
-        try {
-            if (exists()) {
-                raf = getDescriptor();
-                fileHeader.read();
-                opened = true;
-            } else {
-                opened = false;
-            }
-            return opened;
-        } catch (Exception e) {
-            throw new FilerException(FaultCodes.GEN_CRITICAL_ERROR, "Error opening " + file.getName(), e);
-        } finally {
-            putDescriptor(raf);
-        }
-    }
-
-    public synchronized boolean close() throws DBException {
-        if (isOpened()) {
-            try {
-                // First of all, mark as closed to prevent operations
-                opened = false;
-                flush();
-
-                synchronized (descriptors) {
-                    final int total = descriptorsCount;
-
-                    // Close descriptors in cache
-                    while (!descriptors.empty()) {
-                        closeDescriptor(descriptors.pop());
-                    }
-                    // Attempt to close descriptors in use. Max wait time = 0.5s * MAX_DESCRIPTORS
-                    int n = descriptorsCount;
-
-                    while (descriptorsCount > 0 && n > 0) {
-                        try {
-                            descriptors.wait(500);
-                        } catch (InterruptedException woken) {
-                            Thread.interrupted();
-                        }
-
-                        if (descriptors.isEmpty()) {
-                            n--;
-                        } else {
-                            closeDescriptor(descriptors.pop());
-                        }
-                    }
-                    if (descriptorsCount > 0) {
-                        LOG.fine(descriptorsCount + " out of " + total + " files were not closed during close.");
-                    }
-                }
-            } catch (Exception e) {
-                // Failed to close, leave open
-                opened = true;
-                throw new FilerException(FaultCodes.GEN_CRITICAL_ERROR, "Error closing " + file.getName(), e);
-            }
-        }
-        return true;
-    }
-
-    public boolean isOpened() {
-        return opened;
-    }
-
-    public boolean drop() throws DBException {
-        try {
-            close();
-            return !exists() || getFile().delete();
-        } catch (Exception e) {
-            throw new FilerException(FaultCodes.COL_CANNOT_DROP, "Can't drop " + file.getName(), e);
-        }
-    }
-
-    void addDirty(Page page) throws IOException {
-        synchronized (dirtyLock) {
-            dirty.put(page.pageNum, page);
-            if (dirty.size() > MAX_DIRTY_SIZE) {
-                try {
-                    // Too many dirty pages... flush them
-                    flush();
-                } catch (Exception e) {
-                    throw new IOException(e.getMessage());
-                }
-            }
-        }
-    }
-
-    public void flush() throws DBException {
-        // This method is not synchronized
-
-        // Error flag/counter
-        int error = 0;
-
-        // Obtain collection of dirty pages
-        Collection<Page> pages;
-
-        synchronized (dirtyLock) {
-            pages = dirty.values();
-            dirty = new HashMap<Long, Page>();
-        }
-
-        // Flush dirty pages
-        for (Object page : pages) {
-            Page p = (Page) page;
-
-            try {
-                p.flush();
-            } catch (Exception e) {
-                LOG.log(Level.WARNING, "Exception while flushing page", e);
-                error++;
-            }
-        }
-
-        // Flush header
-        if (fileHeader.dirty) {
-            try {
-                fileHeader.write();
-            } catch (Exception e) {
-                LOG.log(Level.WARNING, "Exception while flushing file header", e);
-                error++;
-            }
-        }
-
-        if (error != 0) {
-            throw new FilerException(FaultCodes.GEN_CRITICAL_ERROR, "Error performing flush! Failed to flush " + error + " pages!");
-        }
-    }
-
-    /**
-     * createFileHeader must be implemented by a Paged implementation
-     * in order to create an appropriate subclass instance of a FileHeader.
-     *
-     * @return a new FileHeader
-     */
-    public abstract FileHeader createFileHeader();
-
-    /**
-     * createFileHeader must be implemented by a Paged implementation
-     * in order to create an appropriate subclass instance of a FileHeader.
-     *
-     * @param read If true, reads the FileHeader from disk
-     * @return a new FileHeader
-     * @throws IOException if an exception occurs
-     */
-    public abstract FileHeader createFileHeader(boolean read) throws IOException;
-
-    /**
-     * createFileHeader must be implemented by a Paged implementation
-     * in order to create an appropriate subclass instance of a FileHeader.
-     *
-     * @param pageCount The number of pages to allocate for primary storage
-     * @return a new FileHeader
-     */
-    public abstract FileHeader createFileHeader(long pageCount);
-
-    /**
-     * createFileHeader must be implemented by a Paged implementation
-     * in order to create an appropriate subclass instance of a FileHeader.
-     *
-     * @param pageCount The number of pages to allocate for primary storage
-     * @param pageSize  The size of a Page (should be a multiple of a FS block)
-     * @return a new FileHeader
-     */
-    public abstract FileHeader createFileHeader(long pageCount, int pageSize);
-
-    /**
-     * createPageHeader must be implemented by a Paged implementation
-     * in order to create an appropriate subclass instance of a PageHeader.
-     *
-     * @return a new PageHeader
-     */
-    public abstract PageHeader createPageHeader();
-
-    // These are a bunch of utility methods for subclasses
-
-    public static Value[] insertArrayValue(Value[] vals, Value val, int idx) {
-        Value[] newVals = new Value[vals.length + 1];
-
-        if (idx > 0) {
-            System.arraycopy(vals, 0, newVals, 0, idx);
-        }
-        newVals[idx] = val;
-        if (idx < vals.length) {
-            System.arraycopy(vals, idx, newVals, idx + 1, vals.length - idx);
-        }
-        return newVals;
-    }
-
-    public static Value[] deleteArrayValue(Value[] vals, int idx) {
-        Value[] newVals = new Value[vals.length - 1];
-
-        if (idx > 0) {
-            System.arraycopy(vals, 0, newVals, 0, idx);
-        }
-        if (idx < newVals.length) {
-            System.arraycopy(vals, idx + 1, newVals, idx, newVals.length - idx);
-        }
-        return newVals;
-    }
-
-    public static long[] insertArrayLong(long[] vals, long val, int idx) {
-        long[] newVals = new long[vals.length + 1];
-
-        if (idx > 0) {
-            System.arraycopy(vals, 0, newVals, 0, idx);
-        }
-        newVals[idx] = val;
-        if (idx < vals.length) {
-            System.arraycopy(vals, idx, newVals, idx + 1, vals.length - idx);
-        }
-        return newVals;
-    }
-
-    public static long[] deleteArrayLong(long[] vals, int idx) {
-        long[] newVals = new long[vals.length - 1];
-
-        if (idx > 0) {
-            System.arraycopy(vals, 0, newVals, 0, idx);
-        }
-        if (idx < newVals.length) {
-            System.arraycopy(vals, idx + 1, newVals, idx, newVals.length - idx);
-        }
-        return newVals;
-    }
-
-    public static int[] insertArrayInt(int[] vals, int val, int idx) {
-        int[] newVals = new int[vals.length + 1];
-
-        if (idx > 0) {
-            System.arraycopy(vals, 0, newVals, 0, idx);
-        }
-        newVals[idx] = val;
-        if (idx < vals.length) {
-            System.arraycopy(vals, idx, newVals, idx + 1, vals.length - idx);
-        }
-        return newVals;
-    }
-
-    public static int[] deleteArrayInt(int[] vals, int idx) {
-        int[] newVals = new int[vals.length - 1];
-
-        if (idx > 0) {
-            System.arraycopy(vals, 0, newVals, 0, idx);
-        }
-        if (idx < newVals.length) {
-            System.arraycopy(vals, idx + 1, newVals, idx, newVals.length - idx);
-        }
-        return newVals;
-    }
-
-    public static short[] insertArrayShort(short[] vals, short val, int idx) {
-        short[] newVals = new short[vals.length + 1];
-
-        if (idx > 0) {
-            System.arraycopy(vals, 0, newVals, 0, idx);
-        }
-        newVals[idx] = val;
-        if (idx < vals.length) {
-            System.arraycopy(vals, idx, newVals, idx + 1, vals.length - idx);
-        }
-
-        return newVals;
-    }
-
-    public static short[] deleteArrayShort(short[] vals, int idx) {
-        short[] newVals = new short[vals.length - 1];
-
-        if (idx > 0) {
-            System.arraycopy(vals, 0, newVals, 0, idx);
-        }
-        if (idx < newVals.length) {
-            System.arraycopy(vals, idx + 1, newVals, idx, newVals.length - idx);
-        }
-
-        return newVals;
-    }
-
-    /**
-     * Paged file's header
-     */
-    public abstract class FileHeader {
-        private boolean dirty = false;
-        private int workSize;
-
-        private short headerSize;
-        private int pageSize;
-        private long pageCount;
-        private long totalCount;
-        private long firstFreePage = -1;
-        private long lastFreePage = -1;
-        private byte pageHeaderSize = 64;
-        private short maxKeySize = 256;
-        private long recordCount;
-
-        public FileHeader() {
-            this(1024);
-        }
-
-        public FileHeader(long pageCount) {
-            this(pageCount, 4096);
-        }
-
-        public FileHeader(long pageCount, int pageSize) {
-            this.pageSize = pageSize;
-            this.pageCount = pageCount;
-            totalCount = pageCount;
-            headerSize = (short) 4096;
-            calculateWorkSize();
-        }
-
-        public FileHeader(boolean read) throws IOException {
-            if (read) {
-                read();
-            }
-        }
-
-        public synchronized final void read() throws IOException {
-            RandomAccessFile raf = null;
-
-            try {
-                raf = getDescriptor();
-                raf.seek(0);
-                read(raf);
-                calculateWorkSize();
-            } finally {
-                putDescriptor(raf);
-            }
-        }
-
-        public synchronized void read(RandomAccessFile raf) throws IOException {
-            headerSize = raf.readShort();
-            pageSize = raf.readInt();
-            pageCount = raf.readLong();
-            totalCount = raf.readLong();
-            firstFreePage = raf.readLong();
-            lastFreePage = raf.readLong();
-            pageHeaderSize = raf.readByte();
-            maxKeySize = raf.readShort();
-            recordCount = raf.readLong();
-        }
-
-        public synchronized final void write() throws IOException {
-            if (!dirty) {
-                return;
-            }
-
-            RandomAccessFile raf = null;
-
-            try {
-                raf = getDescriptor();
-                raf.seek(0);
-                write(raf);
-                dirty = false;
-            } finally {
-                putDescriptor(raf);
-            }
-        }
-
-        public synchronized void write(RandomAccessFile raf) throws IOException {
-            raf.writeShort(headerSize);
-            raf.writeInt(pageSize);
-            raf.writeLong(pageCount);
-            raf.writeLong(totalCount);
-            raf.writeLong(firstFreePage);
-            raf.writeLong(lastFreePage);
-            raf.writeByte(pageHeaderSize);
-            raf.writeShort(maxKeySize);
-            raf.writeLong(recordCount);
-        }
-
-        public synchronized final void setDirty() {
-            dirty = true;
-        }
-
-        public synchronized final boolean isDirty() {
-            return dirty;
-        }
-
-        /**
-         * The size of the FileHeader. Usually 1 OS Page.
-         * This method should be called only while initializing Paged, not during normal processing.
-         * @param headerSize the new header size
-         */
-        public synchronized final void setHeaderSize(short headerSize) {
-            this.headerSize = headerSize;
-            dirty = true;
-        }
-
-        /**
-         * The size of the FileHeader.  Usually 1 OS Page
-         * @return the header size
-         */
-        public synchronized final short getHeaderSize() {
-            return headerSize;
-        }
-
-        /**
-         * The size of a page. Usually a multiple of a FS block.
-         * This method should be called only while initializing Paged, not during normal processing.
-         * @param pageSize the new page size
-         */
-        public synchronized final void setPageSize(int pageSize) {
-            this.pageSize = pageSize;
-            calculateWorkSize();
-            dirty = true;
-        }
-
-        /**
-         * The size of a page.  Usually a multiple of a FS block
-         * @return the page size
-         */
-        public synchronized final int getPageSize() {
-            return pageSize;
-        }
-
-        /**
-         * The number of pages in primary storage.
-         * This method should be called only while initializing Paged, not during normal processing.
-         * @param pageCount the new page count
-         */
-        public synchronized final void setPageCount(long pageCount) {
-            this.pageCount = pageCount;
-            dirty = true;
-        }
-
-        /**
-         * The number of pages in primary storage
-         * @return the page count
-         */
-        public synchronized final long getPageCount() {
-            return pageCount;
-        }
-
-        /**
-         * The number of total pages in the file.
-         * This method should be called only while initializing Paged, not during normal processing.
-         * @param totalCount the new total count
-         */
-        public synchronized final void setTotalCount(long totalCount) {
-            this.totalCount = totalCount;
-            dirty = true;
-        }
-
-        public synchronized final long incTotalCount() {
-            dirty = true;
-            return this.totalCount++;
-        }
-
-        /**
-         * The number of total pages in the file
-         * @return the total count
-         */
-        public synchronized final long getTotalCount() {
-            return totalCount;
-        }
-
-        /**
-         * The first free page in unused secondary space
-         * @param firstFreePage the new first free page
-         */
-        public synchronized final void setFirstFreePage(long firstFreePage) {
-            this.firstFreePage = firstFreePage;
-            dirty = true;
-        }
-
-        /**
-         * The first free page in unused secondary space
-         * @return the first free page
-         */
-        public synchronized final long getFirstFreePage() {
-            return firstFreePage;
-        }
-
-        /**
-         * The last free page in unused secondary space
-         * @param lastFreePage sets the last free page
-         */
-        public synchronized final void setLastFreePage(long lastFreePage) {
-            this.lastFreePage = lastFreePage;
-            dirty = true;
-        }
-
-        /**
-         * The last free page in unused secondary space
-         * @return the last free page
-         */
-        public synchronized final long getLastFreePage() {
-            return lastFreePage;
-        }
-
-        /**
-         * Set the size of a page header.
-         * <p/>
-         * Normally, 64 is sufficient.
-         * @param pageHeaderSize the new page header size
-         */
-        public synchronized final void setPageHeaderSize(byte pageHeaderSize) {
-            this.pageHeaderSize = pageHeaderSize;
-            calculateWorkSize();
-            dirty = true;
-        }
-
-        /**
-         * Get the size of a page header.
-         * <p/>
-         * Normally, 64 is sufficient
-         * @return the page header size
-         */
-        public synchronized final byte getPageHeaderSize() {
-            return pageHeaderSize;
-        }
-
-        /**
-         * Set the maximum number of bytes a key can be.
-         * <p/>
-         * Normally, 256 is good
-         * @param maxKeySize the new max key size
-         */
-        public synchronized final void setMaxKeySize(short maxKeySize) {
-            this.maxKeySize = maxKeySize;
-            dirty = true;
-        }
-
-        /**
-         * Get the maximum number of bytes.
-         * <p/>
-         * Normally, 256 is good.
-         * @return max key size
-         */
-        public synchronized final short getMaxKeySize() {
-            return maxKeySize;
-        }
-
-        /**
-         * Increment the number of records being managed by the file
-         */
-        public synchronized final void incRecordCount() {
-            recordCount++;
-            dirty = true;
-        }
-
-        /**
-         * Decrement the number of records being managed by the file
-         */
-        public synchronized final void decRecordCount() {
-            recordCount--;
-            dirty = true;
-        }
-
-        /**
-         * The number of records being managed by the file (not pages)
-         * @return the record count
-         */
-        public synchronized final long getRecordCount() {
-            return recordCount;
-        }
-
-        private synchronized void calculateWorkSize() {
-            workSize = pageSize - pageHeaderSize;
-        }
-
-        public synchronized final int getWorkSize() {
-            return workSize;
-        }
-    }
-
-
-    /**
-     * PageHeader
-     */
-
-    public abstract class PageHeader implements Streamable {
-        private boolean dirty = false;
-        private byte status = UNUSED;
-        private int keyLen = 0;
-        private int keyHash = 0;
-        private int dataLen = 0;
-        private int recordLen = 0;
-        private long nextPage = -1;
-
-        public PageHeader() {}
-
-        public PageHeader(DataInputStream dis) throws IOException {
-            read(dis);
-        }
-
-        public synchronized void read(DataInputStream dis) throws IOException {
-            status = dis.readByte();
-            dirty = false;
-            if (status == UNUSED) {
-                return;
-            }
-
-            keyLen = dis.readInt();
-            if (keyLen < 0) {
-                // hack for win98/ME - see issue 564
-                keyLen = 0;
-            }
-            keyHash = dis.readInt();
-            dataLen = dis.readInt();
-            recordLen = dis.readInt();
-            nextPage = dis.readLong();
-        }
-
-        public synchronized void write(DataOutputStream dos) throws IOException {
-            dirty = false;
-            dos.writeByte(status);
-            dos.writeInt(keyLen);
-            dos.writeInt(keyHash);
-            dos.writeInt(dataLen);
-            dos.writeInt(recordLen);
-            dos.writeLong(nextPage);
-        }
-
-        public synchronized final boolean isDirty() {
-            return dirty;
-        }
-
-        public synchronized final void setDirty() {
-            dirty = true;
-        }
-
-        /**
-         * The status of this page (UNUSED, RECORD, DELETED, etc...)
-         * @param status the new status
-         */
-        public synchronized final void setStatus(byte status) {
-            this.status = status;
-            dirty = true;
-        }
-
-        /**
-         * The status of this page (UNUSED, RECORD, DELETED, etc...)
-         * @return the status
-         */
-        public synchronized final byte getStatus() {
-            return status;
-        }
-
-        public synchronized final void setKey(Key key) {
-            // setKey WIPES OUT the Page data
-            setRecordLen(0);
-            dataLen = 0;
-            keyHash = key.getHash();
-            keyLen = key.getLength();
-            dirty = true;
-        }
-
-        /**
-         * The length of the Key
-         * @param keyLen the new key length
-         */
-        public synchronized final void setKeyLen(int keyLen) {
-            this.keyLen = keyLen;
-            dirty = true;
-        }
-
-        /**
-         * The length of the Key
-         * @return the key length
-         */
-        public synchronized final int getKeyLen() {
-            return keyLen;
-        }
-
-        /**
-         * The hashed value of the Key for quick comparisons
-         * @param keyHash sets the key hash
-         */
-        public synchronized final void setKeyHash(int keyHash) {
-            this.keyHash = keyHash;
-            dirty = true;
-        }
-
-        /**
-         * The hashed value of the Key for quick comparisons
-         * @return the key hash
-         */
-        public synchronized final int getKeyHash() {
-            return keyHash;
-        }
-
-        /**
-         * The length of the Data
-         * @param dataLen sets the data length
-         */
-        public synchronized final void setDataLen(int dataLen) {
-            this.dataLen = dataLen;
-            dirty = true;
-        }
-
-        /**
-         * The length of the Data
-         * @return the data length
-         */
-        public synchronized final int getDataLen() {
-            return dataLen;
-        }
-
-        /**
-         * The length of the Record's value
-         * @param recordLen sets the record length
-         */
-        public synchronized void setRecordLen(int recordLen) {
-            this.recordLen = recordLen;
-            dirty = true;
-        }
-
-        /**
-         * The length of the Record's value
-         * @return record length
-         */
-        public synchronized final int getRecordLen() {
-            return recordLen;
-        }
-
-        /**
-         * The next page for this Record (if overflowed)
-         * @param nextPage next page
-         */
-        public synchronized final void setNextPage(long nextPage) {
-            this.nextPage = nextPage;
-            dirty = true;
-        }
-
-        /**
-         * The next page for this Record (if overflowed)
-         * @return next page
-         */
-        public synchronized final long getNextPage() {
-            return nextPage;
-        }
-    }
-
-
-    /**
-     * Paged file's page
-     */
-    public final class Page implements Comparable<Page> {
-
-        /**
-         * This page number
-         */
-        private final Long pageNum;
-
-        /**
-         * The Header for this Page
-         */
-        private final PageHeader header;
-
-        /**
-         * The offset into the file that this page starts
-         */
-        private final long offset;
-
-        /**
-         * The data for this page. Null if page is not loaded.
-         */
-        private byte[] data;
-
-        /**
-         * The position (relative) of the Key in the data array
-         */
-        private int keyPos;
-
-        /**
-         * The position (relative) of the Data in the data array
-         */
-        private int dataPos;
-
-        public Page(Long pageNum) {
-            this.header = createPageHeader();
-            this.pageNum = pageNum;
-            this.offset = fileHeader.headerSize + (pageNum * fileHeader.pageSize);
-        }
-
-        /**
-         * Reads a page into the memory, once. Subsequent calls are ignored.
-         * @throws java.io.IOException if an io error occurs
-         */
-        public synchronized void read() throws IOException {
-            if (data == null) {
-                RandomAccessFile raf = null;
-
-                try {
-                    byte[] data = new byte[fileHeader.pageSize];
-
-                    raf = getDescriptor();
-                    raf.seek(this.offset);
-                    raf.read(data);
-
-                    // Read in the header
-                    ByteArrayInputStream bis = new ByteArrayInputStream(data);
-
-                    this.header.read(new DataInputStream(bis));
-
-                    this.keyPos = fileHeader.pageHeaderSize;
-                    this.dataPos = this.keyPos + this.header.keyLen;
-
-                    // Successfully read all the data
-                    this.data = data;
-                } finally {
-                    putDescriptor(raf);
-                }
-            }
-        }
-
-        /**
-         * Writes out the header into the this.data, and adds a page to the set of
-         * dirty pages.
-         * @throws java.io.IOException if an io error occurs
-         */
-        public void write() throws IOException {
-            // Write out the header into the this.data
-            synchronized (this) {
-                ByteArrayOutputStream bos = new ByteArrayOutputStream(fileHeader.getPageHeaderSize());
-
-                header.write(new DataOutputStream(bos));
-                byte[] b = bos.toByteArray();
-
-                System.arraycopy(b, 0, data, 0, b.length);
-            }
-
-            // Add to the list of dirty pages
-            Paged.this.addDirty(this);
-        }
-
-        /**
-         * Flushes content of the dirty page into the file
-         * @throws java.io.IOException if an io error occurs
-         */
-        public synchronized void flush() throws IOException {
-            RandomAccessFile raf = null;
-
-            try {
-                raf = getDescriptor();
-                if (this.offset >= raf.length()) {
-                    // Grow the file
-                    long o = (fileHeader.headerSize + ((fileHeader.totalCount * 3) / 2) * fileHeader.pageSize)
-                            + (fileHeader.pageSize - 1);
-
-                    raf.seek(o);
-                    raf.writeByte(0);
-                }
-                raf.seek(this.offset);
-                raf.write(this.data);
-                if (sync) {
-                    raf.getFD().sync();
-                }
-            } finally {
-                putDescriptor(raf);
-            }
-        }
-
-        // No synchronization - pageNum is final
-        public Long getPageNum() {
-            return this.pageNum;
-        }
-
-        // No synchronization - header is final
-        public PageHeader getPageHeader() {
-            return this.header;
-        }
-
-        public synchronized void setKey(Key key) {
-            header.setKey(key);
-            // Insert the key into the data array.
-            key.copyTo(this.data, this.keyPos);
-
-            // Set the start of data to skip over the key.
-            this.dataPos = this.keyPos + header.keyLen;
-        }
-
-        public synchronized Key getKey() {
-            if (header.keyLen > 0) {
-                return new Key(this.data, this.keyPos, header.keyLen);
-            } else {
-                return null;
-            }
-        }
-
-        public synchronized void streamTo(OutputStream os) throws IOException {
-            if (header.dataLen > 0) {
-                os.write(this.data, this.dataPos, header.dataLen);
-            }
-        }
-
-        public synchronized void streamFrom(InputStream is) throws IOException {
-            int avail = is.available();
-
-            header.dataLen = fileHeader.workSize - header.keyLen;
-            if (avail < header.dataLen) {
-                header.dataLen = avail;
-            }
-            if (header.dataLen > 0) {
-                is.read(this.data, this.keyPos + header.keyLen, header.dataLen);
-            }
-        }
-
-        // No synchronization: pageNum is final.
-        public int compareTo(Page o) {
-            return (int) (this.pageNum - o.pageNum);
-        }
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/Streamable.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/filer/Streamable.java
deleted file mode 100644 (file)
index 6541bb1..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xindice" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, The dbXML
- * Group, L.L.C., http://www.dbxmlgroup.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-package net.jxta.impl.xindice.core.filer;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-/**
- * Streamable is an interface implemented by objects used by Filers and
- * Indexers in order to serialize objects to and from IO streams.
- */
-public interface Streamable {
-
-    /**
-     * read reads the object state from the stream.
-     *
-     * @param is The DataInputStream
-     * @throws IOException if an IOException occurs
-     */
-    public void read(DataInputStream is) throws IOException;
-
-    /**
-     * write writes the object state to the stream.
-     *
-     * @param os The DataOutputStream
-     * @throws IOException if an IOException occurs
-     */
-    public void write(DataOutputStream os) throws IOException;
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/indexer/IndexQuery.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/indexer/IndexQuery.java
deleted file mode 100644 (file)
index 059a945..0000000
+++ /dev/null
@@ -1,275 +0,0 @@
-package net.jxta.impl.xindice.core.indexer;
-
-
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xindice" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, The dbXML
- * Group, L.L.C., http://www.dbxmlgroup.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
-
- */
-
-import net.jxta.impl.xindice.core.data.*;
-import java.util.*;
-
-
-/**
- * IndexQuery represents the most primitive form of index querying.
- * Instances of this object should be created by QueryResolvers and
- * cached in Query instances.
- */
-
-public class IndexQuery {
-    // No Operator
-    public static final int ANY = 0; // Any And All Matches
-   
-    // Singleton Operators
-    public static final int EQ = 1; // Equal To
-    public static final int NEQ = -1; // Not Equal To
-    public static final int GT = 2; // Greater Than
-    public static final int LEQ = -2; // Less Than Or Equal To
-    public static final int LT = 3; // Less Than
-    public static final int GEQ = -3; // Greater Than Or Equal To
-   
-    // Range Operators
-    public static final int BW = 4; // Between (Inclusive)
-    public static final int NBW = -4; // Not Between (Inclusive)
-    public static final int BWX = 5; // Between (Exclusive)
-    public static final int NBWX = -5; // Not Between (Exclusive)
-   
-    // Set Operators
-    public static final int IN = 6; // In The Set
-    public static final int NIN = -6; // Not In The Set
-   
-    // Other operators
-    public static final int SW = 7; // Starts-with
-    public static final int NSW = -7; // Not Starts-with
-   
-    public static final int EW = 8; // Ends-with
-    public static final int NEW = -8; // Not Ends-with
-
-    protected int op;
-    protected Value[] vals;
-   
-    public IndexQuery() {
-        op = ANY;
-    }
-   
-    public IndexQuery(int op, Value[] vals) {
-        this.op = op;
-        this.vals = vals;
-    }
-   
-    public IndexQuery(Value[] vals) {
-        this(IN, vals);
-    }
-
-    public IndexQuery(int op, Value val1) {
-        this.op = op;
-        if (op == SW || op == NSW) {
-            byte[] b = new byte[val1.getLength() + 1];
-
-            System.arraycopy(val1.getData(), 0, b, 0, b.length - 1);
-            b[b.length - 1] = 127; // TODO: Must fix this
-            Value val2 = new Value(b);
-
-            vals = new Value[] { val1, val2 };
-        } else {
-            vals = new Value[] { val1 };
-        }
-    }
-      
-    public IndexQuery(Value val1) {
-        this(EQ, val1);
-    }
-   
-    public IndexQuery(int op, Value val1, Value val2) {
-        this.op = op;
-        vals = new Value[] { val1, val2 };
-    }
-   
-    public IndexQuery(Value val1, Value val2) {
-        this(IN, val1, val2);
-    }
-   
-    public IndexQuery(int op, String val1) {
-        this(op, new Value(val1));
-    }
-   
-    public IndexQuery(String val1) {
-        this(new Value(val1));
-    }
-   
-    public IndexQuery(int op, String val1, String val2) {
-        this(op, new Value(val1), new Value(val2));
-    }
-   
-    public IndexQuery(String val1, String val2) {
-        this(new Value(val1), new Value(val2));
-    }
-   
-    /**
-     * getOperator returns the operator associated with this query.
-     *
-     * @return The operator
-     */
-    public int getOperator() {
-        return op;
-    }
-   
-    /**
-     * getValue returns one of the Values associated with this query.
-     *
-     * @param index The Value index
-     * @return The request Value
-     */
-    public final Value getValue(int index) {
-        return vals[index];
-    }
-
-    /**
-     * getValues returns the Values associated with this query.
-     *
-     * @return The Value set
-     */
-    public Value[] getValues() {
-        return vals;
-    }
-   
-    /**
-     * getLength returns the length of the Value set associated with
-     * this query.
-     *
-     * @return The Value set length
-     */
-    public final int getLength() {
-        return vals.length;
-    }
-   
-    /**
-     * testValue tests the specified value for validity against this
-     * IndexQuery.  The helper classes in org.apache.xindice.core.indexer.helpers
-     * should be used for optimized performance.
-     *
-     * @param value The Value to compare
-     * @return Whether or not the value matches
-     */
-    public boolean testValue(Value value) {
-        switch (op) {
-        // No Comparison (Any)
-        case ANY:
-            return true;
-            
-        // Singleton Comparisons
-        case EQ:
-            return value.equals(vals[0]);
-
-        case NEQ:
-            return !value.equals(vals[0]);
-
-        case GT:
-            return value.compareTo(vals[0]) > 0;
-
-        case LEQ:
-            return value.compareTo(vals[0]) <= 0;
-
-        case LT:
-            return value.compareTo(vals[0]) < 0;
-
-        case GEQ:
-            return value.compareTo(vals[0]) >= 0;
-            
-        // Range Comparisons
-        case BW:
-            return value.compareTo(vals[0]) >= 0 && value.compareTo(vals[1]) <= 0;
-
-        case NBW:
-            return value.compareTo(vals[0]) <= 0 || value.compareTo(vals[1]) >= 0;
-
-        case BWX:
-            return value.compareTo(vals[0]) > 0 && value.compareTo(vals[1]) < 0;
-
-        case NBWX:
-            return value.compareTo(vals[0]) < 0 || value.compareTo(vals[1]) > 0;
-            
-        // Set Comparisons
-        case IN:
-        case NIN:
-            return Arrays.binarySearch(vals, value) >= 0 ? op == IN : op == NIN;
-            
-        // Other comparisons
-        case SW:
-        case NSW:
-            return value.startsWith(vals[0]) ? op == SW : op == NSW;
-         
-        case EW:
-        case NEW:
-            return value.endsWith(vals[0]) ? op == EW : op == NEW;
-         
-        }
-        return false;
-    }
-
-    /**
-     * testValue tests the specified value for validity against this
-     * IndexQuery.  The helper classes in org.apache.xindice.core.indexer.helpers
-     * should be used for optimized performance.
-     *
-     * @param value The Value to compare
-     * @return Whether or not the value matches
-     */
-    public final boolean testValue(String value) {
-        return testValue(new Value(value));
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/indexer/Indexer.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/indexer/Indexer.java
deleted file mode 100644 (file)
index d0f4d5d..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-package net.jxta.impl.xindice.core.indexer;
-
-
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xindice" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, The dbXML
- * Group, L.L.C., http://www.dbxmlgroup.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
-
- */
-
-import net.jxta.impl.xindice.core.*;
-import net.jxta.impl.xindice.core.data.*;
-
-
-/**
- * Indexer is the abstract indexing interface for Xindice.  An Indexer
- * object is implemented in order to retrieve and manage indexes.
- * <br><br>
- * Any number of Indexer instances may be associated with a single
- * Collection.  The type of Indexer utilized by a query depends on
- * the 'Style' of Indexer and the type of QueryResolver that is being
- * used to performt he query.  Currently, Xindice only internally
- * supports one kind of Indexer: 'XPath'.
- */
-
-public interface Indexer extends DBObject {
-   
-    /**
-     * remove removes all references to the specified Key from the Indexer.
-     *
-     * @param key The Object ID
-     */
-    void remove(Key key) throws DBException;
-
-    /**
-     * add adds a Document to the Indexer.
-     *
-     * @param key The Object ID
-     * @param pos record position
-     */
-    void add(Key key, long pos) throws DBException;
-   
-    /**
-     * flush forcefully flushes any unwritten buffers to disk.
-     */
-    void flush() throws DBException;
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/indexer/NameIndexer.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/core/indexer/NameIndexer.java
deleted file mode 100644 (file)
index 6af7fe3..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-package net.jxta.impl.xindice.core.indexer;
-
-
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xindice" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, The dbXML
- * Group, L.L.C., http://www.dbxmlgroup.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
-
- */
-
-import net.jxta.impl.xindice.core.DBException;
-import net.jxta.impl.xindice.core.data.Key;
-import net.jxta.impl.xindice.core.filer.BTree;
-import net.jxta.impl.xindice.core.filer.BTreeCorruptException;
-
-import java.io.File;
-import java.io.IOException;
-
-
-/**
- * NameIndexer is a basic implementation of the Indexer interface.
- * It is used for maintaining element and element@attribute unique
- * indexes.
- */
-
-public final class NameIndexer extends BTree implements Indexer {
-
-    private static final short PAGESIZE = 4096;
-    // TODO: MAXKEYSIZE might need tuning
-    private static final short MAXKEYSIZE = 256;
-
-    private FileHeader fileHeader;
-
-    public NameIndexer() {
-        super();
-        fileHeader = getFileHeader();
-        fileHeader.setPageSize(PAGESIZE);
-        fileHeader.setMaxKeySize(MAXKEYSIZE);
-    }
-
-    public void setLocation(String dir, String file) {
-        setFile(new File(dir, file + ".idx"));
-    }
-
-    public synchronized void remove(Key key) throws DBException {
-        try {
-            removeValue(key);
-        } catch (IOException e) {
-            throw new BTreeCorruptException("Corruption detected on remove");
-        }
-    }
-
-    public synchronized void add(Key key, long pos) throws DBException {
-        try {
-            addValue(key, pos);
-            flush();
-        } catch (IOException e) {
-            throw new BTreeCorruptException("Corruption detected on add");
-        }
-    }
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/util/Named.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/util/Named.java
deleted file mode 100644 (file)
index 17be80a..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-package net.jxta.impl.xindice.util;
-
-
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xindice" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, The dbXML
- * Group, L.L.C., http://www.dbxmlgroup.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
-
- */
-
-/**
- * Named identifies an object as having a contextually important Name.
- */
-
-public interface Named {
-
-    /**
-     * getName retrieves the contextually important name of the object
-     *
-     * @return The object's name
-     */
-    String getName();
-}
-
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/util/XindiceException.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/util/XindiceException.java
deleted file mode 100644 (file)
index 8fe7682..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-package net.jxta.impl.xindice.util;
-
-
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xindice" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, The dbXML
- * Group, L.L.C., http://www.dbxmlgroup.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
-
- */
-
-import java.io.*;
-
-
-/**
- * A XindiceException is the base class for all Xindice related
- * Exceptions.
- */
-
-public class XindiceException extends Exception {
-
-    public XindiceException() {}
-
-    public XindiceException(String message) {
-        super(message);
-    }
-
-    public XindiceException(String message, Throwable wrapped) {
-        super(message);
-        initCause(wrapped);
-    }
-
-    public Throwable getWrappedThrowable() {
-        return getCause();
-    }
-}
diff --git a/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/util/XindiceRuntimeException.java b/p2pproxy/dependencies-src/jxse-src-2.5/impl/src/net/jxta/impl/xindice/util/XindiceRuntimeException.java
deleted file mode 100644 (file)
index cdddff9..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * CVS $Id$
- * CVS XindiceRuntimeException.java,v 1.5 2004/02/08 02:59:39 vgritsenko Exp $
- */
-
-package net.jxta.impl.xindice.util;
-
-
-import java.io.PrintStream;
-import java.io.PrintWriter;
-
-
-/**
- * A XindiceRuntimeException is the base class for all Xindice related RuntimeExceptions.
- *
- * @version CVS $Revision$, $Date$
- */
-public class XindiceRuntimeException extends RuntimeException {
-    protected Throwable cause;
-
-    public XindiceRuntimeException() {}
-
-    public XindiceRuntimeException(String message) {
-        super(message);
-    }
-
-    public XindiceRuntimeException(Throwable cause) {
-        super();
-        this.cause = cause;
-    }
-
-    public XindiceRuntimeException(String message, Throwable cause) {
-        super(message);
-        this.cause = cause;
-    }
-
-    @Override
-    public void printStackTrace() {
-        printStackTrace(System.err);
-    }
-
-    @Override
-    public void printStackTrace(PrintStream s) {
-        super.printStackTrace(s);
-        if (this.cause != null) {
-            s.print("Caused by: ");
-            this.cause.printStackTrace(s);
-        }
-    }
-
-    @Override
-    public void printStackTrace(PrintWriter s) {
-        super.printStackTrace(s);
-        if (this.cause != null) {
-            s.print("Caused by: ");
-            this.cause.printStackTrace(s);
-        }
-    }
-
-    @Override
-    public Throwable getCause() {
-        return cause;
-    }
-}
diff --git a/p2pproxy/dependencies/MJSIP.COPYRIGHT.txt b/p2pproxy/dependencies/MJSIP.COPYRIGHT.txt
deleted file mode 100644 (file)
index 9aa8e35..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-MjSip - http://www.mjsip.org
-
-Copyright (C) 2005 by Luca Veltri - University of Parma - Italy.
-__________________________________________________
-
-
-MjSip 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.
-
-MjSip 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 MjSip; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-
-PLEASE READ CAREFULLY THE LICENSE DOCUMENT RECEIVED ALONG WITH THIS LIBRARY.
\ No newline at end of file
diff --git a/p2pproxy/dependencies/bcprov-jdk14.jar b/p2pproxy/dependencies/bcprov-jdk14.jar
deleted file mode 100644 (file)
index b27a810..0000000
Binary files a/p2pproxy/dependencies/bcprov-jdk14.jar and /dev/null differ
diff --git a/p2pproxy/dependencies/bouncycastle-LICENSE.txt b/p2pproxy/dependencies/bouncycastle-LICENSE.txt
deleted file mode 100644 (file)
index e8a967c..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-License
-
-Copyright (c) 2000 - 2004 The Legion Of The Bouncy Castle 
-(http://www.bouncycastle.org)
-
-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 
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
-SOFTWARE. 
diff --git a/p2pproxy/dependencies/javax.servlet.jar b/p2pproxy/dependencies/javax.servlet.jar
deleted file mode 100644 (file)
index d2dee6f..0000000
Binary files a/p2pproxy/dependencies/javax.servlet.jar and /dev/null differ
diff --git a/p2pproxy/dependencies/jstun-0.7.0.jar b/p2pproxy/dependencies/jstun-0.7.0.jar
deleted file mode 100644 (file)
index 4d220ef..0000000
Binary files a/p2pproxy/dependencies/jstun-0.7.0.jar and /dev/null differ
diff --git a/p2pproxy/dependencies/junit-4.3.1.jar b/p2pproxy/dependencies/junit-4.3.1.jar
deleted file mode 100644 (file)
index ff5d188..0000000
Binary files a/p2pproxy/dependencies/junit-4.3.1.jar and /dev/null differ
diff --git a/p2pproxy/dependencies/jxta_license.html b/p2pproxy/dependencies/jxta_license.html
deleted file mode 100644 (file)
index ceb0e5c..0000000
+++ /dev/null
@@ -1,248 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-                 
- <head>
- <style type="text/css"> /* <![CDATA[ */
- @import "/branding/css/tigris.css";
- @import "/branding/css/inst.css";
- /* ]]> */</style>
- <link rel="stylesheet" type="text/css" href="/branding/css/print.css" media="print" />
- <script src="/branding/scripts/tigris.js" type="text/javascript"></script>
-  
-             
-  <script src="/branding/scripts/alm.js" type="text/javascript"></script>
- <style type="text/css">
-    /* <![CDATA[ */
-    @import "/branding/css/alm.css";
-   /* ]]> */
- </style>
-                                                       <title>
-         Content
-    </title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <meta http-equiv="Content-Style-Type" content="text/css" />
- <meta name="version" content="4.5.1.52.1" />
- <meta name="keywords" content="SourceCast, CollabNet, collaboration, companies, software, development, model, enterprise, open source, developer, network, San Francisco" />
- <meta name="description" content="SourceCast, a collaborative software development platform from CollabNet" />
-
-</head>
-<body  class="composite">
- <div id="collabnet">
- <div id="login"> 
-     <div>
-      <a href="http://www.jxta.org/servlets/Login?detour=http://www.jxta.org/jxta_license.html">Login</a>
-      |    <a href="http://www.jxta.org/servlets/Join">Register</a>     </div>
- </div>
- <a href="http://www.collab.net/special/clickpbc0502.html" id="cnlogo">
-<span class="alt">CollabNet Enterprise Edition</span></a>
-</div>
- <div id="banner">\r<table border="0" cellspacing="0" cellpadding="0" width="100%">\r    <tr>\r           <td>\r                   <div><a href="http://jxta.org"><img src="/branding/images/jxta-connect2.gif" alt="JXTA" width="333" height="53" id="jxtalogo" /></a></div>\r             </td>\r          <td class="right">\r                     <div id="domainlinks">\r                         \r                                                               <div id="loginbox">\r                                                                                            <div>\r                             <a href="http://www.jxta.org/servlets/TLogin?detour=http://www.jxta.org/jxta_license.html">Login</a>                                                                 |    <a href="http://www.jxta.org/servlets/Join">Register</a>                                                           </div>\r                                                         </div>\r                                                         \r                       </div>\r         </td>\r          </tr>\r</table>\r</div> 
- <div id="toptabs">\r\r<table cellpadding="4" cellspacing="0" border="0"><tr>\r\r\r<td>   <a href="http://www.jxta.org/servlets/StartPage">My pages</a> </td>\r\r<td>   <a href="http://www.jxta.org/servlets/ProjectList">Projects</a> </td>\r\r   <th>   <a href="http://www.jxta.org/servlets/DomainHome">Home</a> </th>\r\r           <td>   <a href="http://www.jxta.org/servlets/OpenCollabNet">openCollabNet</a> </td>\r\r\r</tr></table>\r</div>\r\r 
-<table border="0" cellspacing="0" cellpadding="4" width="100%" id="main">
-<tr>
-<td id="navcol">
-
-
-
-
- <dl id="projecttools" class="navgroup">
- <dt>About JXTA</dt>
- <dd>
-  <ul>
-   <li><a href="http://www.jxta.org/background.html">JXTA Vision</a></li>
-   <li><a href="http://www.jxta.org/community.html">Community</a></li>
-   <li><a href="http://www.jxta.org/JXTAFAQ.html">General FAQ</a></li>
-  </ul>
- </dd>
- <dt>For Developers</dt>
- <dd>
-  <ul>
-   <li><a href="http://www.jxta.org/download.html">Downloads</a></li>
-   <li><a href="http://www.jxta.org/maillist.html">Mailing Lists</a></li>
-   <li><a href="http://www.jxta.org/bugs.html">Report Bugs</a></li>
-   <li><a href="http://www.jxta.org/getstart.html">Getting Started</a></li>
-   <li><a href="http://www.jxta.org/Tutorials.html">Tutorials</a></li>
-<!--
-   <li><a href="http://www.jxta.org/docs/JxtaProgGuide_v2.3.pdf">Programmer's Guide</a></li>
--->
-   <li><a href="http://www.jxta.org/white_papers.html">Documentation</a></li>
-   <li><a href="http://www.jxta.org/research">Research</a></li>
-   <li><a href="http://wiki.java.net/bin/view/Jxta/WebHome">Wiki</a> and <a href="http://weblogs.java.net/weblogs/project/238">Blogs</a></li>
-  </ul>
- </dd>
- <dt>Go to Market</dt>
- <dd>
-  <ul>
-   <li><a href="http://www.jxta.org/pressbox.html">Press Box</a></li>
-   <li><a href="http://www.jxta.org/busmktg.html">Business &amp; Marketing</a></li>
-   <li><a href="http://www.jxta.org/Catalog/index-catalog.html">JXTA Solutions</a></li>
-   <li><a href="http://www.jxta.org/comktg_isv.html">Co-Marketing</a></li>
-  </ul>
- </dd> 
- <dt>Our Legalese</dt>
- <dd>
-  <ul>
-   <li><a href="http://www.jxta.org/license.html">License</a></li>
-   <li><a href="http://www.jxta.org/govern.html">Governance</a></li>
-  </ul>
- </dd> 
-</dl>
-
-
-
-<form action="http://www.jxta.org/servlets/Search" method="get">
- <dl id="searchbox" class="navgroup">
-  
-      <dt>Search</dt>
-  <dd>
-   <div>
-      </div>
-   <div>
-    <input type="hidden" name="resultsPerPage" value="40" /> 
-    <input type="text" name="query" size="10" maxlength="99" /> 
-    <input type="submit" name="Button" value="Go" />
-   </div>
-   <div>
-       <a href="http://www.jxta.org/servlets/Search?mode=advanced">Advanced search</a>    </div>
-  </dd>
-
- </dl>
-</form>
-
-
-<dl id="helptext" class="navgroup">
- <dt>How do I...</dt>
- <dd>
-  <ul>
-     
-   <li> <a href="http://www.collab.net/rn/" onclick="return launch(this.href, 1)" 
- title="Note: link may open in new window" class="helplink">
- Get release notes for CollabNet 4.5.1?</a>
-</li>
-
-   <li><a href="http://www.jxta.org/nonav/servlets/HelpTOC" onclick="return launch(this.href, 1)" 
-title="Note: link may open in new window" class="helplink">Get help?</a></li>
-  </ul>
- </dd>
-</dl>
-
-
-
-<div class="strut">&nbsp;</div>
-</td>
-<td id="midcol">
-<div id="bodycol">
-        
-                 
-                 
-           
-    
-  
-
-
-
-
-<table width="100%" border="0" cellspacing="0" cellpadding="0">
-<tr valign="top">
-<td height="10"><spacer type="block" width="1" height="10"></td>
-</tr>
-<tr>
-<td valign="top"><font color="#990000"><span class="Header"><b>The Sun Project JXTA(TM) Software License (Based on the Apache Software License Version 1.1)</b></span></font></td>
-</tr>
-</table>
-
-<table width="100%" border="0" cellspacing="0" cellpadding="0">
-<tr>
-<td height="100%" width="100%" valign="top" class="PlainText"><br><br>
-Copyright (c) 2001-2004 Sun Microsystems, Inc.  All rights reserved.<br><br>
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:<br><br>
-
-1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.<br><br>
-
-2. Redistributions in binary form must reproduce the above copyright notice, 
-this list of conditions and the following disclaimer in the documentation 
-and/or other materials provided with the distribution.<br><br>
-
-3. The end-user documentation included with the redistribution, if any, must 
-include the following acknowledgment: "This product includes software 
-developed by Sun Microsystems, Inc. for JXTA(TM) technology." Alternately, this 
-acknowledgment may appear in the software itself, if and wherever such 
-third-party acknowledgments normally appear.<br><br>
-
-4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must 
-not be used to endorse or promote products derived from this software without 
-prior written permission. For written permission, please contact Project JXTA 
-at http://www.jxta.org.<br><br>
-
-5. Products derived from this software may not be called "JXTA", nor may "JXTA"
-appear in their name, without prior written permission of Sun. <br><br>
-
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, 
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE 
-DISCLAIMED.  IN NO EVENT SHALL SUN MICROSYSTEMS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<br><br>
-JXTA is a registered trademark of Sun Microsystems, Inc. in the United States and other countries.<br><br>
-<hr size="1" noshade>
-      <p>Please see the <a href="http://www.jxta.org/project/www/license.html">license 
-        information page</a> for instructions on use of the license in source 
-        files.</p>
-      <p>This software consists of voluntary contributions made by many individuals 
-        on behalf of Project JXTA. For more information on Project JXTA, please 
-        see <a href="http://www.jxta.org">http://www.jxta.org</a>.<br>
-        <br>
-        This license is based on the BSD license adopted by the Apache Foundation. 
-      </p>
-    </td>
-</tr>
-</table>
-</div>
-</td>
-</tr>
-</table>
- <div id="footer"><table border="0" cellspacing="0" cellpadding="4"><tr><td><a href="http://www.collab.net/special/clickpbc0502.html" target="collab"><img src="/branding/images/poweredby_036.gif" alt="This site is Powered by CollabNet." id="poweredby" width="102" height="38" border="0" /></a></td><td>
-<div style="padding-left: 50px;">
-<a href="http://www.jxta.org/feedback.html">Feedback</a> |
-<a href="http://www.jxta.org/nonav/servlets/LegalNotices?type=TermsOfService" onclick="return launch(this.href, 1)" title="Note: link may open in new window" class="helplink">Terms of service</a> | 
-<a href="http://www.jxta.org/nonav/servlets/LegalNotices?type=PrivacyPolicy" onclick="return launch(this.href, 1)" title="Note: link may open in new window" class="helplink">Privacy policy</a> | 
-<a href="http://www.collab.net/developers/tools/" target="collab">Developer tools</a>
-
-
-<p>Copyright &copy; 2006 CollabNet, Inc. All rights reserved. 
-<p>Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.</p></div></td></tr></table></div>
-</body>
-</html>
diff --git a/p2pproxy/dependencies/log4j.LICENSE b/p2pproxy/dependencies/log4j.LICENSE
deleted file mode 100644 (file)
index 6279e52..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright 1999-2005 The Apache Software Foundation
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
diff --git a/p2pproxy/dependencies/log4j.jar b/p2pproxy/dependencies/log4j.jar
deleted file mode 100644 (file)
index dde9972..0000000
Binary files a/p2pproxy/dependencies/log4j.jar and /dev/null differ
diff --git a/p2pproxy/dependencies/org.mortbay.jetty.jar b/p2pproxy/dependencies/org.mortbay.jetty.jar
deleted file mode 100644 (file)
index db8d081..0000000
Binary files a/p2pproxy/dependencies/org.mortbay.jetty.jar and /dev/null differ
diff --git a/p2pproxy/dependencies/sip.jar b/p2pproxy/dependencies/sip.jar
deleted file mode 100644 (file)
index a8e9884..0000000
Binary files a/p2pproxy/dependencies/sip.jar and /dev/null differ
diff --git a/p2pproxy/launcher/.cdtproject b/p2pproxy/launcher/.cdtproject
deleted file mode 100644 (file)
index a080fff..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?eclipse-cdt version="2.0"?>
-
-<cdtproject id="org.eclipse.cdt.managedbuilder.core.managedMake">
-<data>
-<item id="org.eclipse.cdt.core.pathentry">
-<pathentry kind="src" path=""/>
-<pathentry kind="out" path=""/>
-<pathentry kind="con" path="org.eclipse.cdt.managedbuilder.MANAGED_CONTAINER"/>
-</item>
-</data>
-</cdtproject>
diff --git a/p2pproxy/launcher/.cproject b/p2pproxy/launcher/.cproject
deleted file mode 100644 (file)
index a6611c7..0000000
+++ /dev/null
@@ -1,848 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?fileVersion 4.0.0?>
-
-<cproject>
-<storageModule moduleId="org.eclipse.cdt.core.settings">
-<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.312796505">
-<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.312796505" moduleId="org.eclipse.cdt.core.settings" name="Debug">
-<externalSettings>
-<externalSetting languages="cdt.managedbuild.tool.gnu.c.compiler.input.1981684865"/>
-</externalSettings>
-<extensions>
-<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
-<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-</extensions>
-</storageModule>
-<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-<configuration artifactExtension="" artifactName="p2pproxy-launcher" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.312796505" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug">
-<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.312796505." name="/" resourcePath="">
-<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.2036307059" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
-<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.636786031" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
-<builder buildPath="${workspace_loc:/p2pproxy-launcher/Debug}" id="cdt.managedbuild.target.gnu.builder.exe.debug.708356431" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
-<tool id="cdt.managedbuild.tool.gnu.archiver.base.1241333679" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
-<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.661000544" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
-<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.1508620817" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
-<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.1709970444" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1096933276" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
-<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.1993355777" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
-<option id="gnu.c.compiler.exe.debug.option.debugging.level.1450610821" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
-<option id="gnu.c.compiler.option.preprocessor.nostdinc.1573130554" name="Do not search system directories (-nostdinc)" superClass="gnu.c.compiler.option.preprocessor.nostdinc"/>
-<option id="gnu.c.compiler.option.preprocessor.preprocess.1954881471" name="Preprocess only (-E)" superClass="gnu.c.compiler.option.preprocessor.preprocess"/>
-<option id="gnu.c.compiler.option.preprocessor.def.symbols.1964217186" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols"/>
-<option id="gnu.c.compiler.option.preprocessor.undef.symbol.209668825" name="Undefined symbols (-U)" superClass="gnu.c.compiler.option.preprocessor.undef.symbol"/>
-<option id="gnu.c.compiler.option.include.paths.34505845" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
-<listOptionValue builtIn="false" value="/usr/lib/jvm/java-6-openjdk/include"/>
-</option>
-<option id="gnu.c.compiler.option.optimization.flags.2043930593" name="Other optimization flags" superClass="gnu.c.compiler.option.optimization.flags"/>
-<option id="gnu.c.compiler.option.debugging.other.1176102779" name="Other debugging flags" superClass="gnu.c.compiler.option.debugging.other"/>
-<option id="gnu.c.compiler.option.debugging.gprof.1352829499" name="Generate gprof information (-pg)" superClass="gnu.c.compiler.option.debugging.gprof"/>
-<option id="gnu.c.compiler.option.debugging.prof.75886981" name="Generate prof information (-p)" superClass="gnu.c.compiler.option.debugging.prof"/>
-<option id="gnu.c.compiler.option.warnings.syntax.981848362" name="Check syntax only (-fsyntax-only)" superClass="gnu.c.compiler.option.warnings.syntax"/>
-<option id="gnu.c.compiler.option.warnings.pedantic.215846584" name="Pedantic (-pedantic)" superClass="gnu.c.compiler.option.warnings.pedantic"/>
-<option id="gnu.c.compiler.option.warnings.pedantic.error.1601669555" name="Pedantic warnings as errors (-pedantic-errors)" superClass="gnu.c.compiler.option.warnings.pedantic.error"/>
-<option id="gnu.c.compiler.option.warnings.nowarn.340889811" name="Inhibit all warnings (-w)" superClass="gnu.c.compiler.option.warnings.nowarn"/>
-<option id="gnu.c.compiler.option.warnings.allwarn.1348717177" name="All warnings (-Wall)" superClass="gnu.c.compiler.option.warnings.allwarn"/>
-<option id="gnu.c.compiler.option.warnings.toerrors.168149749" name="Warnings as errors (-Werror)" superClass="gnu.c.compiler.option.warnings.toerrors"/>
-<option id="gnu.c.compiler.option.misc.other.465456911" name="Other flags" superClass="gnu.c.compiler.option.misc.other"/>
-<option id="gnu.c.compiler.option.misc.verbose.1739414683" name="Verbose (-v)" superClass="gnu.c.compiler.option.misc.verbose"/>
-<option id="gnu.c.compiler.option.misc.ansi.2034289138" name="Support ANSI programs (-ansi)" superClass="gnu.c.compiler.option.misc.ansi" value="true" valueType="boolean"/>
-<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1981684865" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.1568763747" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug">
-<option id="gnu.c.link.option.nostart.1991501963" name="Do not use standard start files (-nostartfiles)" superClass="gnu.c.link.option.nostart"/>
-<option id="gnu.c.link.option.nodeflibs.539771628" name="Do not use default libraries (-nodefaultlibs)" superClass="gnu.c.link.option.nodeflibs"/>
-<option id="gnu.c.link.option.nostdlibs.955372049" name="No startup or default libs (-nostdlib)" superClass="gnu.c.link.option.nostdlibs"/>
-<option id="gnu.c.link.option.strip.1537216802" name="Omit all symbol information (-s)" superClass="gnu.c.link.option.strip"/>
-<option id="gnu.c.link.option.noshared.1465451213" name="No shared libraries (-static)" superClass="gnu.c.link.option.noshared"/>
-<option id="gnu.c.link.option.libs.1384396098" name="Libraries (-l)" superClass="gnu.c.link.option.libs" valueType="libs">
-<listOptionValue builtIn="false" value="jvm"/>
-</option>
-<option id="gnu.c.link.option.paths.1688143928" name="Library search path (-L)" superClass="gnu.c.link.option.paths" valueType="libPaths">
-<listOptionValue builtIn="false" value="/usr/lib/jvm/java-6-openjdk/jre/lib/amd64"/>
-<listOptionValue builtIn="false" value="/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server"/>
-</option>
-<option id="gnu.c.link.option.ldflags.188251023" name="Linker flags" superClass="gnu.c.link.option.ldflags"/>
-<option id="gnu.c.link.option.other.298467217" name="Other options (-Xlinker [option])" superClass="gnu.c.link.option.other"/>
-<option id="gnu.c.link.option.userobjs.1273411547" name="Other objects" superClass="gnu.c.link.option.userobjs"/>
-<option id="gnu.c.link.option.shared.1011456240" name="Shared (-shared)" superClass="gnu.c.link.option.shared"/>
-<option id="gnu.c.link.option.soname.31072369" name="Shared object name (-Wl,-soname=)" superClass="gnu.c.link.option.soname"/>
-<option id="gnu.c.link.option.implname.1528051438" name="Import Library name (-Wl,--out-implib=)" superClass="gnu.c.link.option.implname"/>
-<option id="gnu.c.link.option.defname.817573434" name="DEF file name (-Wl,--output-def=)" superClass="gnu.c.link.option.defname"/>
-<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1286615934" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
-<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
-<additionalInput kind="additionalinput" paths="$(LIBS)"/>
-</inputType>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.1919208012" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug"/>
-<tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.1811112681" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug">
-<option id="gnu.both.asm.option.include.paths.1319439484" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths"/>
-<inputType id="cdt.managedbuild.tool.gnu.assembler.input.959803972" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
-</tool>
-</toolChain>
-</folderInfo>
-<fileInfo id="cdt.managedbuild.config.gnu.exe.debug.312796505.965156440" name="launcher.c" rcbsApplicability="disable" resourcePath="src/p2pproxy.c" toolsToInvoke="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1096933276.439216232">
-<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1096933276.439216232" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1096933276">
-<option id="gnu.c.compiler.option.include.paths.699307389" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
-<listOptionValue builtIn="false" value="/usr/lib/jvm/java-6-openjdk/include"/>
-</option>
-<option id="gnu.c.compiler.option.preprocessor.nostdinc.548229460" name="Do not search system directories (-nostdinc)" superClass="gnu.c.compiler.option.preprocessor.nostdinc"/>
-<option id="gnu.c.compiler.option.preprocessor.preprocess.785785269" name="Preprocess only (-E)" superClass="gnu.c.compiler.option.preprocessor.preprocess"/>
-<option id="gnu.c.compiler.option.preprocessor.def.symbols.222611447" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols"/>
-<option id="gnu.c.compiler.option.preprocessor.undef.symbol.1060431896" name="Undefined symbols (-U)" superClass="gnu.c.compiler.option.preprocessor.undef.symbol"/>
-<option id="gnu.c.compiler.exe.debug.option.optimization.level.1584521330" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level"/>
-<option id="gnu.c.compiler.option.optimization.flags.269412830" name="Other optimization flags" superClass="gnu.c.compiler.option.optimization.flags"/>
-<option id="gnu.c.compiler.exe.debug.option.debugging.level.1601719914" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level"/>
-<option id="gnu.c.compiler.option.debugging.other.1651918914" name="Other debugging flags" superClass="gnu.c.compiler.option.debugging.other"/>
-<option id="gnu.c.compiler.option.debugging.gprof.1662993705" name="Generate gprof information (-pg)" superClass="gnu.c.compiler.option.debugging.gprof"/>
-<option id="gnu.c.compiler.option.debugging.prof.901398565" name="Generate prof information (-p)" superClass="gnu.c.compiler.option.debugging.prof"/>
-<option id="gnu.c.compiler.option.warnings.syntax.2091319510" name="Check syntax only (-fsyntax-only)" superClass="gnu.c.compiler.option.warnings.syntax"/>
-<option id="gnu.c.compiler.option.warnings.pedantic.587133511" name="Pedantic (-pedantic)" superClass="gnu.c.compiler.option.warnings.pedantic"/>
-<option id="gnu.c.compiler.option.warnings.pedantic.error.459592912" name="Pedantic warnings as errors (-pedantic-errors)" superClass="gnu.c.compiler.option.warnings.pedantic.error"/>
-<option id="gnu.c.compiler.option.warnings.nowarn.1063269877" name="Inhibit all warnings (-w)" superClass="gnu.c.compiler.option.warnings.nowarn"/>
-<option id="gnu.c.compiler.option.warnings.allwarn.1752481932" name="All warnings (-Wall)" superClass="gnu.c.compiler.option.warnings.allwarn"/>
-<option id="gnu.c.compiler.option.warnings.toerrors.2063337025" name="Warnings as errors (-Werror)" superClass="gnu.c.compiler.option.warnings.toerrors"/>
-<option id="gnu.c.compiler.option.misc.other.676396200" name="Other flags" superClass="gnu.c.compiler.option.misc.other"/>
-<option id="gnu.c.compiler.option.misc.verbose.1885722707" name="Verbose (-v)" superClass="gnu.c.compiler.option.misc.verbose"/>
-<option id="gnu.c.compiler.option.misc.ansi.134114436" name="Support ANSI programs (-ansi)" superClass="gnu.c.compiler.option.misc.ansi" value="true" valueType="boolean"/>
-<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.479507797" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
-</tool>
-</fileInfo>
-<sourceEntries>
-<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
-</sourceEntries>
-</configuration>
-</storageModule>
-
-<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
-<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
-<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
-
-
-<storageModule moduleId="scannerConfiguration">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.312796505;cdt.managedbuild.config.gnu.exe.debug.312796505.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1096933276;cdt.managedbuild.tool.gnu.c.compiler.input.1981684865">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.359473509;cdt.managedbuild.config.gnu.exe.release.359473509.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.1156644530;cdt.managedbuild.tool.gnu.c.compiler.input.163302042">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.312796505;cdt.managedbuild.config.gnu.exe.debug.312796505.965156440;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1096933276.439216232;cdt.managedbuild.tool.gnu.c.compiler.input.479507797">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-</storageModule>
-</cconfiguration>
-<cconfiguration id="cdt.managedbuild.config.gnu.exe.release.359473509">
-<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.359473509" moduleId="org.eclipse.cdt.core.settings" name="Release">
-<externalSettings/>
-<extensions>
-<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
-<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-</extensions>
-</storageModule>
-<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-<configuration artifactName="p2pproxy-launcher" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.release.359473509" name="Release" parent="cdt.managedbuild.config.gnu.exe.release">
-<folderInfo id="cdt.managedbuild.config.gnu.exe.release.359473509." name="/" resourcePath="">
-<toolChain id="cdt.managedbuild.toolchain.gnu.exe.release.567834999" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
-<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.release.558415555" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.release"/>
-<builder buildPath="${workspace_loc:/p2pproxy-launcher/Release}" id="cdt.managedbuild.target.gnu.builder.exe.release.213223469" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.release"/>
-<tool id="cdt.managedbuild.tool.gnu.archiver.base.1408531686" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
-<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.381196257" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release">
-<option id="gnu.cpp.compiler.exe.release.option.optimization.level.2083390039" name="Optimization Level" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
-<option id="gnu.cpp.compiler.exe.release.option.debugging.level.584003464" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.1156644530" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release">
-<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.779209861" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" valueType="enumerated"/>
-<option id="gnu.c.compiler.exe.release.option.debugging.level.1002147897" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
-<option id="gnu.c.compiler.option.include.paths.1161049631" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
-<listOptionValue builtIn="false" value="&quot;${env_var(JAVA_HOME}/include&quot;"/>
-</option>
-<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.163302042" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.release.2145134115" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.release">
-<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1319890468" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
-<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
-<additionalInput kind="additionalinput" paths="$(LIBS)"/>
-</inputType>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.release.1472129075" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.release"/>
-<tool id="cdt.managedbuild.tool.gnu.assembler.exe.release.1886810501" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.release">
-<inputType id="cdt.managedbuild.tool.gnu.assembler.input.162545108" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
-</tool>
-</toolChain>
-</folderInfo>
-<sourceEntries>
-<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
-</sourceEntries>
-</configuration>
-</storageModule>
-
-<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
-<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
-<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
-
-
-<storageModule moduleId="scannerConfiguration">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.312796505;cdt.managedbuild.config.gnu.exe.debug.312796505.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1096933276;cdt.managedbuild.tool.gnu.c.compiler.input.1981684865">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.359473509;cdt.managedbuild.config.gnu.exe.release.359473509.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.1156644530;cdt.managedbuild.tool.gnu.c.compiler.input.163302042">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.312796505;cdt.managedbuild.config.gnu.exe.debug.312796505.965156440;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1096933276.439216232;cdt.managedbuild.tool.gnu.c.compiler.input.479507797">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-</storageModule>
-</cconfiguration>
-</storageModule>
-<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-<project id="p2pproxy-launcher.cdt.managedbuild.target.gnu.exe.484656409" name="Executable" projectType="cdt.managedbuild.target.gnu.exe"/>
-</storageModule>
-</cproject>
diff --git a/p2pproxy/launcher/.project b/p2pproxy/launcher/.project
deleted file mode 100644 (file)
index cf9890a..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>p2pproxy-launcher</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
-                       <triggers>clean,full,incremental,</triggers>
-                       <arguments>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
-                                       <value>all</value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>?name?</key>
-                                       <value></value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
-                                       <value>false</value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.buildLocation</key>
-                                       <value>${workspace_loc:/p2pproxy-launcher/Debug}</value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.enableFullBuild</key>
-                                       <value>true</value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
-                                       <value>true</value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
-                                       <value>clean</value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.append_environment</key>
-                                       <value>true</value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.contents</key>
-                                       <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
-                                       <value>true</value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.buildArguments</key>
-                                       <value></value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.buildCommand</key>
-                                       <value>make</value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
-                                       <value>all</value>
-                               </dictionary>
-                               <dictionary>
-                                       <key>org.eclipse.cdt.make.core.stopOnError</key>
-                                       <value>true</value>
-                               </dictionary>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.cdt.core.cnature</nature>
-               <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
-               <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
-       </natures>
-</projectDescription>
diff --git a/p2pproxy/launcher/.settings/org.eclipse.cdt.core.prefs b/p2pproxy/launcher/.settings/org.eclipse.cdt.core.prefs
deleted file mode 100644 (file)
index 488bd5f..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Sep 24 10:53:31 CEST 2008
-eclipse.preferences.version=1
-environment/project/cdt.managedbuild.config.gnu.exe.debug.312796505=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment append\="true" appendContributed\="true"/>\n
diff --git a/p2pproxy/launcher/Debug/makefile b/p2pproxy/launcher/Debug/makefile
deleted file mode 100644 (file)
index 9685c76..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
--include ../makefile.init
-
-RM := rm -rf
-
-# All of the sources participating in the build are defined here
--include sources.mk
--include subdir.mk
--include src/subdir.mk
--include objects.mk
-
-ifneq ($(MAKECMDGOALS),clean)
-ifneq ($(strip $(C_DEPS)),)
--include $(C_DEPS)
-endif
-endif
-
--include ../makefile.defs
-
-# Add inputs and outputs from these tool invocations to the build variables 
-
-# All Target
-all: p2pproxy-launcher
-
-# Tool invocations
-p2pproxy-launcher: $(OBJS) $(USER_OBJS)
-       @echo 'Building target: $@'
-       @echo 'Invoking: GCC C Linker'
-       gcc -L/usr/lib/jvm/java-6-openjdk/jre/lib/amd64 -L/usr/lib/jvm/java-6-openjdk/jre/lib/i386 -L/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server -L/usr/lib/jvm/java-6-openjdk/jre/lib/i386/server -o"p2pproxy-launcher" $(OBJS) $(USER_OBJS) $(LIBS)
-       @echo 'Finished building target: $@'
-       @echo ' '
-
-# Other Targets
-clean:
-       -$(RM) $(OBJS)$(EXECUTABLES)$(C_DEPS) p2pproxy-launcher
-       -@echo ' '
-
-.PHONY: all clean dependents
-.SECONDARY:
-
--include ../makefile.targets
diff --git a/p2pproxy/launcher/Debug/objects.mk b/p2pproxy/launcher/Debug/objects.mk
deleted file mode 100644 (file)
index bb7a3d5..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-LIBS := -ljvm
-
-USER_OBJS :=
diff --git a/p2pproxy/launcher/Debug/sources.mk b/p2pproxy/launcher/Debug/sources.mk
deleted file mode 100644 (file)
index 1b13571..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-C_SRCS := 
-O_SRCS := 
-ASM_SRCS := 
-S_SRCS := 
-OBJ_SRCS := 
-OBJS := 
-EXECUTABLES := 
-C_DEPS := 
-
-# Every subdirectory with source files must be described here
-SUBDIRS := \
-src \
-
diff --git a/p2pproxy/launcher/Debug/src/launcher-tester.d b/p2pproxy/launcher/Debug/src/launcher-tester.d
deleted file mode 100644 (file)
index f3d7000..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-src/launcher-tester.d src/launcher-tester.o: ../src/launcher-tester.c \
-  ../src/p2pproxy.h
-
-../src/p2pproxy.h:
diff --git a/p2pproxy/launcher/Debug/src/p2pproxy.d b/p2pproxy/launcher/Debug/src/p2pproxy.d
deleted file mode 100644 (file)
index a6f15d4..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-src/p2pproxy.d src/p2pproxy.o: ../src/p2pproxy.c \
-  /usr/lib/jvm/java-6-openjdk/include/jni.h \
-  /usr/lib/jvm/java-6-openjdk/include/jni_md.h ../src/p2pproxy.h
-
-/usr/lib/jvm/java-6-openjdk/include/jni.h:
-
-/usr/lib/jvm/java-6-openjdk/include/jni_md.h:
-
-../src/p2pproxy.h:
diff --git a/p2pproxy/launcher/Debug/src/p2pproxy_wrap.d b/p2pproxy/launcher/Debug/src/p2pproxy_wrap.d
deleted file mode 100644 (file)
index d375224..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-src/p2pproxy_wrap.d src/p2pproxy_wrap.o: ../src/p2pproxy_wrap.c \
-  /usr/lib/jvm/java-6-openjdk/include/jni.h \
-  /usr/lib/jvm/java-6-openjdk/include/jni_md.h
-
-/usr/lib/jvm/java-6-openjdk/include/jni.h:
-
-/usr/lib/jvm/java-6-openjdk/include/jni_md.h:
diff --git a/p2pproxy/launcher/Debug/src/subdir.mk b/p2pproxy/launcher/Debug/src/subdir.mk
deleted file mode 100644 (file)
index 6246aeb..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-# Add inputs and outputs from these tool invocations to the build variables 
-C_SRCS += \
-../src/launcher-tester.c \
-../src/p2pproxy.c \
-../src/p2pproxy_wrap.c 
-
-OBJS += \
-./src/launcher-tester.o \
-./src/p2pproxy.o \
-./src/p2pproxy_wrap.o 
-
-C_DEPS += \
-./src/launcher-tester.d \
-./src/p2pproxy.d \
-./src/p2pproxy_wrap.d 
-
-
-# Each subdirectory must supply rules for building sources it contributes
-src/%.o: ../src/%.c
-       @echo 'Building file: $<'
-       @echo 'Invoking: GCC C Compiler'
-       gcc -I/usr/lib/jvm/java-6-openjdk/include -O0 -g3 -Wall -c -fmessage-length=0 -ansi -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<"
-       @echo 'Finished building: $<'
-       @echo ' '
-
-src/p2pproxy.o: ../src/p2pproxy.c
-       @echo 'Building file: $<'
-       @echo 'Invoking: GCC C Compiler'
-       gcc -I/usr/lib/jvm/java-6-openjdk/include -O2 -g -Wall -c -fmessage-length=0 -ansi -MMD -MP -MF"$(@:%.o=%.d)" -MT"src/p2pproxy.d" -o"$@" "$<"
-       @echo 'Finished building: $<'
-       @echo ' '
-
-
diff --git a/p2pproxy/launcher/Makefile.am b/p2pproxy/launcher/Makefile.am
deleted file mode 100644 (file)
index 1bfdcf4..0000000
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS=src
diff --git a/p2pproxy/launcher/src/Makefile.am b/p2pproxy/launcher/src/Makefile.am
deleted file mode 100644 (file)
index a47d232..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-JAVA_LIBS=-L$(javadir)/jre/lib/amd64 -L$(javadir)/jre/lib/i386 \
-                       -L$(javadir)/jre/lib/amd64/server -L$(javadir)/jre/lib/i386/server -ljava 
-
-JAVA_LDFLAGS=\
-       -Wl,-rpath,$(javadir)/jre/lib/amd64 -Wl,-rpath,$(javadir)/jre/lib/i386 \
-       -Wl,-rpath,$(javadir)/jre/lib/amd64/server -Wl,-rpath,$(javadir)/jre/lib/i386/server
-
-noinst_LTLIBRARIES=libfonisc.la
-
-libfonisc_la_SOURCES=p2pproxy.c p2pproxy.h
-
-libfonisc_la_LIBADD=$(JAVA_LIBS)
-
-libfonisc_la_LDFLAGS=$(JAVA_LDFLAGS)
-
-noinst_PROGRAMS=launcher-tester
-
-launcher_tester_SOURCES=launcher-tester.c
-
-launcher_tester_LDADD=libfonisc.la $(JAVA_LIBS)
-
-launcher_tester_LDFLAGS=$(JAVA_LDFLAGS)
-
-INCLUDES=-I$(javadir)/include -I$(javadir)/include/linux
diff --git a/p2pproxy/launcher/src/launcher-tester.c b/p2pproxy/launcher/src/launcher-tester.c
deleted file mode 100644 (file)
index 810010b..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-#include "p2pproxy.h"
-#include <pthread.h>
-#include <unistd.h>
-
-static void * thread_starter(void *args){
-       char* largs[] = {"-seeding-server","-sip", "5058"};
-       p2pproxy_application_start(3,largs);
-       printf("exit from application \n");
-       return NULL;
-}
-
-
-int main(int argc, char **argv) {
-       pthread_t th;
-       printf("starting p2pproxy tester \n");
-       pthread_create(&th,NULL,thread_starter,NULL);
-       sleep(5);
-       
-       if (p2pproxy_application_get_state() == P2PPROXY_CONNECTED) {
-               printf("CONNECTED \n");
-       } else {
-               printf("NOT CONNECTED \n");
-       };
-
-
-       /* account management */
-       
-       if (p2pproxy_accountmgt_createAccount("sip:titi@p2p.linphone.org") != P2PPROXY_NO_ERROR) {
-               printf("cannot create account \n");     
-       }
-       
-       
-       if (p2pproxy_accountmgt_isValidAccount("sip:titi@p2p.linphone.org") != P2PPROXY_ACCOUNTMGT_USER_EXIST) {
-               printf("user not created \n");  
-       }
-       /* sip proxy  */
-       char string_buffer[256];
-       if (p2pproxy_resourcemgt_lookup_sip_proxy(string_buffer,256,"p2p.linphone.org") != P2PPROXY_NO_ERROR) {
-               printf("cannot get proxy\n");   
-       } else {
-               printf("registrar is [%s]\n",string_buffer);
-       }
-       
-       if (p2pproxy_resourcemgt_revoke_sip_proxy(string_buffer) != P2PPROXY_NO_ERROR) {
-               printf("cannot fulsh  proxy [%s]\n",string_buffer);     
-       }
-
-       if (p2pproxy_resourcemgt_lookup_sip_proxy(string_buffer,256,"toto.linphone.org") != P2PPROXY_RESOURCEMGT_SERVER_NOT_FOUND) {
-               printf("unexpected proxy [%s]\n",string_buffer);        
-       } else {
-               printf("cannot find proxy\n");
-       }
-
-       /* media resource mgt */
-       p2pproxy_resourcemgt_resource_list_t* resource_list;
-       resource_list =  p2pproxy_resourcemgt_new_resource_list();
-       if (resource_list == 0) {
-               printf("cannot allocate p2pproxy_resourcemgt_resource_list_t \n");
-       } else {
-                       
-               if (p2pproxy_resourcemgt_lookup_media_resource(resource_list,"p2p.linphone.org") != P2PPROXY_NO_ERROR) {
-                       printf("cannot get media resource\n");  
-               } else {
-                       int i;
-                       for (i=0;i<resource_list->size;i++) {
-                               printf("media resource is [%s]\n",resource_list->resource_uri[i]);
-                       }
-                               
-               }
-               
-               if (p2pproxy_resourcemgt_revoke_media_resource(resource_list->resource_uri[0]) != P2PPROXY_NO_ERROR) {
-                       printf("cannot fulsh  media resource [%s]\n",resource_list->resource_uri[0]);   
-               }
-       
-               if (p2pproxy_resourcemgt_lookup_media_resource(resource_list,"p2p.linphone.org") != P2PPROXY_NO_ERROR) {
-                       printf("cannot get media resource\n");  
-               } else {
-                       int i;
-                       for (i=0;i<resource_list->size;i++) {
-                               printf("media resource is [%s]\n",resource_list->resource_uri[i]);
-                       }
-                               
-               }
-               p2pproxy_resourcemgt_delete_resource_list(resource_list);
-       }
-
-
-
-
-       if (p2pproxy_accountmgt_deleteAccount("sip:titi@p2p.linphone.org") != P2PPROXY_NO_ERROR) {
-               printf("cannot delete account \n");     
-       }
-       
-       
-       p2pproxy_application_stop();
-       pthread_join(th,NULL);
-       return 0;
-}
diff --git a/p2pproxy/launcher/src/p2pproxy.c b/p2pproxy/launcher/src/p2pproxy.c
deleted file mode 100644 (file)
index 05574c5..0000000
+++ /dev/null
@@ -1,268 +0,0 @@
-#include <stdio.h>
-#include <jni.h>
-#include <string.h>
-#include <stdlib.h>
-#include "p2pproxy.h"
-
-#ifndef P2PPROXY_JMX_PORT
-       #define P2PPROXY_JMX_PORT "5678"
-#endif
-#ifndef P2PPROXY_INSTALLDIR
-       #define P2PPROXY_INSTALLDIR "/usr/share/java/fonis"
-#endif 
-#ifndef P2PPROXY_BUILDDIR
-       #define P2PPROXY_BUILDDIR "../antbuild/dist/p2pproxy_0.1"
-#endif
-#define NUMBER_OF_OPTION 7
-JavaVM *p2pproxy_application_jvm = 0;
-
-#define GET_JNI_ENV \
-       jint lResult = 0 ;\
-       JNIEnv *lJniEnv = 0;\
-       jclass  lMainClass = 0;\
-       if (p2pproxy_application_jvm==0) return P2PPROXY_ERROR_APPLICATION_NOT_STARTED; \
-       lResult = (*p2pproxy_application_jvm)->AttachCurrentThread(p2pproxy_application_jvm,(void**)&lJniEnv,NULL);\
-       if (lResult != 0) { \
-               fprintf(stderr,"cannot attach VM\n");\
-               return P2PPROXY_ERROR;\
-       }\
-       lMainClass = (*lJniEnv)->FindClass(lJniEnv, "org/linphone/p2pproxy/core/P2pProxyMain");\
-       if (lMainClass == 0) { \
-               fprintf(stderr,"cannot load class org/linphone/p2pproxy/core/P2pProxyMain\n");\
-               return P2PPROXY_ERROR; \
-       } \
-
-
-int p2pproxy_application_start(int argc, char **argv) {
-       JNIEnv *lJniEnv = 0;
-       jclass  lMainClass = 0;
-       JavaVMInitArgs args;
-       JavaVMOption options[NUMBER_OF_OPTION];
-       jint res=-1;
-       jmethodID mainMethod;
-       jobjectArray applicationArgsList;
-       jstring applicationArg;
-       int i=0;
-       int optioncount=0;
-
-       if (p2pproxy_application_jvm != 0) {
-               fprintf(stderr,"p2pproxy already started");
-               return P2PPROXY_ERROR_APPLICATION_ALREADY_STARTED;
-       }
-       args.version = JNI_VERSION_1_4;
-       
-       /*options[optioncount++].optionString = "-verbose:jni";*/
-       /*options[optioncount++].optionString = "-verbose:class";*/
-       /*options[optioncount++].optionString = "-verbose:class";*/
-       options[optioncount++].optionString = "-Djava.class.path="P2PPROXY_BUILDDIR"/p2pproxy.jar:"\
-                                                               P2PPROXY_INSTALLDIR"/p2pproxy.jar:"\
-                                                               P2PPROXY_BUILDDIR"/log4j.jar:"\
-                                                               P2PPROXY_INSTALLDIR"/log4j.jar";
-
-
-
-       options[optioncount++].optionString = "-Dcom.sun.management.jmxremote";
-       options[optioncount++].optionString = "-Dcom.sun.management.jmxremote.port="P2PPROXY_JMX_PORT;
-       options[optioncount++].optionString = "-Dcom.sun.management.jmxremote.authenticate=false";
-       options[optioncount++].optionString = "-Dcom.sun.management.jmxremote.ssl=false";
-       options[optioncount++].optionString = "-Dorg.linphone.p2pproxy.install.dir="P2PPROXY_INSTALLDIR;
-       options[optioncount++].optionString = "-Dorg.linphone.p2pproxy.build.dir="P2PPROXY_BUILDDIR;
-
-       args.nOptions = NUMBER_OF_OPTION;
-       args.options = options;
-       args.ignoreUnrecognized = JNI_FALSE;
-       
-
-       res = JNI_CreateJavaVM(&p2pproxy_application_jvm,  (void**)& lJniEnv, &args);
-       if (res < 0) {
-               fprintf(stderr,"cannot start p2pproxy vm [%i]",res);
-               return P2PPROXY_ERROR;
-       }
-       lMainClass = (*lJniEnv)->FindClass(lJniEnv, "org/linphone/p2pproxy/core/P2pProxyMain");
-
-       if (lMainClass == 0) {
-               fprintf(stderr,"cannot load class org/linphone/p2pproxy/core/P2pProxyMain\n");
-               return P2PPROXY_ERROR;
-       }
-       mainMethod = (*lJniEnv)->GetStaticMethodID(lJniEnv, lMainClass, "main", "([Ljava/lang/String;)V");
-
-       applicationArgsList = (*lJniEnv)->NewObjectArray(lJniEnv, argc, (*lJniEnv)->FindClass(lJniEnv, "java/lang/String"), NULL);
-       
-       for (i=0;i<argc;i++) {
-               applicationArg = (*lJniEnv)->NewStringUTF(lJniEnv, argv[i]);
-               (*lJniEnv)->SetObjectArrayElement(lJniEnv, applicationArgsList, i, applicationArg);
-
-       }
-
-       (*lJniEnv)->CallStaticVoidMethod(lJniEnv, lMainClass, mainMethod, applicationArgsList);
-       (*p2pproxy_application_jvm)->DestroyJavaVM(p2pproxy_application_jvm);
-       p2pproxy_application_jvm = 0;
-       return P2PPROXY_NO_ERROR;
-}
-       
-
-
-const char* p2pproxy_status_string(int status_code) {
-       return 0;
-}
-
-
-int p2pproxy_accountmgt_createAccount(const char* user_name) {
-       jmethodID createAccountMethod;
-       jstring applicationArg;
-       GET_JNI_ENV
-       createAccountMethod = (*lJniEnv)->GetStaticMethodID(lJniEnv, lMainClass, "createAccount", "(Ljava/lang/String;)I");
-       applicationArg = (*lJniEnv)->NewStringUTF(lJniEnv, user_name);
-       lResult = (*lJniEnv)->CallStaticIntMethod(lJniEnv, lMainClass, createAccountMethod, applicationArg);
-       (*p2pproxy_application_jvm)->DetachCurrentThread(p2pproxy_application_jvm);
-       return lResult;
-}
-
-int p2pproxy_accountmgt_isValidAccount(const char* user_name) {
-       jmethodID isValidAccountMethod;
-       jstring applicationArg; 
-       GET_JNI_ENV
-       isValidAccountMethod = (*lJniEnv)->GetStaticMethodID(lJniEnv, lMainClass, "isValidAccount", "(Ljava/lang/String;)I");
-       applicationArg = (*lJniEnv)->NewStringUTF(lJniEnv, user_name);
-       lResult = (*lJniEnv)->CallStaticIntMethod(lJniEnv, lMainClass, isValidAccountMethod, applicationArg);
-       (*p2pproxy_application_jvm)->DetachCurrentThread(p2pproxy_application_jvm);
-       return lResult;
-}
-
-int p2pproxy_accountmgt_deleteAccount(const char* user_name) {
-       jmethodID deleteAccountMethod;
-       jstring applicationArg; 
-       GET_JNI_ENV
-       deleteAccountMethod = (*lJniEnv)->GetStaticMethodID(lJniEnv, lMainClass, "deleteAccount", "(Ljava/lang/String;)I");
-       applicationArg = (*lJniEnv)->NewStringUTF(lJniEnv, user_name);
-       lResult = (*lJniEnv)->CallStaticIntMethod(lJniEnv, lMainClass, deleteAccountMethod, applicationArg);
-       (*p2pproxy_application_jvm)->DetachCurrentThread(p2pproxy_application_jvm);
-       return lResult;
-}
-
-int p2pproxy_resourcemgt_lookup_sip_proxy(char* proxy_uri,size_t size, const char* domain) {
-       jmethodID lLookupSipProxyUriMethod;
-       jstring lJStringResult; 
-       const char* lString;
-       jboolean  lIsCopy;
-       jstring applicationArg;
-       
-       GET_JNI_ENV
-        
-       
-       applicationArg = (*lJniEnv)->NewStringUTF(lJniEnv, domain);
-       lLookupSipProxyUriMethod = (*lJniEnv)->GetStaticMethodID(lJniEnv, lMainClass, "lookupSipProxyUri", "(Ljava/lang/String;)Ljava/lang/String;");
-       lJStringResult = (*lJniEnv)->CallStaticObjectMethod(lJniEnv, lMainClass, lLookupSipProxyUriMethod, applicationArg);
-       if (lJStringResult == 0) {
-               return P2PPROXY_RESOURCEMGT_SERVER_NOT_FOUND;
-       }
-       lString =  (*lJniEnv)->GetStringUTFChars(lJniEnv, lJStringResult, &lIsCopy);
-       memcpy(proxy_uri,lString,size);
-       (*lJniEnv)->ReleaseStringUTFChars(lJniEnv, lJStringResult, lString);
-       (*p2pproxy_application_jvm)->DetachCurrentThread(p2pproxy_application_jvm);
-       return P2PPROXY_NO_ERROR;
-}
-
-int p2pproxy_resourcemgt_revoke_sip_proxy(const char* proxy_uri) {
-       jmethodID revokeProxyMethod;
-       jstring applicationArg;
-       GET_JNI_ENV
-       
-       applicationArg = (*lJniEnv)->NewStringUTF(lJniEnv, proxy_uri);
-       revokeProxyMethod = (*lJniEnv)->GetStaticMethodID(lJniEnv, lMainClass, "revokeSipProxy", "(Ljava/lang/String;)I");
-       lResult = (*lJniEnv)->CallStaticIntMethod(lJniEnv, lMainClass, revokeProxyMethod,applicationArg);
-       (*p2pproxy_application_jvm)->DetachCurrentThread(p2pproxy_application_jvm);
-       return lResult;
-}
-
-int p2pproxy_application_get_state() {
-       jmethodID stateMethod;
-       GET_JNI_ENV
-       stateMethod = (*lJniEnv)->GetStaticMethodID(lJniEnv, lMainClass, "getState", "()I");
-       if (stateMethod==NULL) {
-               lResult=P2PPROXY_ERROR_APPLICATION_NOT_STARTED;
-               goto end;
-       }
-       lResult = (*lJniEnv)->CallStaticIntMethod(lJniEnv, lMainClass, stateMethod);
-       goto end;
-       end:
-       (*p2pproxy_application_jvm)->DetachCurrentThread(p2pproxy_application_jvm);
-       return lResult;
-       
-}
-
-int p2pproxy_application_stop() {
-       jmethodID stopMethod = 0;
-       GET_JNI_ENV
-       
-       stopMethod = (*lJniEnv)->GetStaticMethodID(lJniEnv, lMainClass, "stop", "()V");
-       (*lJniEnv)->CallStaticVoidMethod(lJniEnv, lMainClass, stopMethod);
-       (*p2pproxy_application_jvm)->DetachCurrentThread(p2pproxy_application_jvm);
-       return 0;
-}
-
-
-p2pproxy_resourcemgt_resource_list_t* p2pproxy_resourcemgt_new_resource_list() {
-       p2pproxy_resourcemgt_resource_list_t* resource_list = malloc(sizeof (p2pproxy_resourcemgt_resource_list_t));
-       resource_list->size = 0;
-       return resource_list;
-}
-
-void p2pproxy_resourcemgt_delete_resource_list(p2pproxy_resourcemgt_resource_list_t* resource_list) {
-       int i;
-       if (resource_list == 0 ) {
-               return;
-       }
-       for (i=0;i<resource_list->size;i++) {
-               free(resource_list->resource_uri[i]);
-       }
-       resource_list->size = 0;
-       free(resource_list);  
-}
-
-int p2pproxy_resourcemgt_lookup_media_resource(p2pproxy_resourcemgt_resource_list_t* resource_list, const char* domain)  {
-       jmethodID lLookupMediaResourceMethod;
-       jarray lJStringResults;
-       jstring lResourceInstance; 
-       const char* lString;
-       jboolean  lIsCopy;
-       jstring applicationArg;
-       int i;
-       jsize lStringSize;
-       jsize lArraySize;
-       
-       GET_JNI_ENV
-        
-       
-       applicationArg = (*lJniEnv)->NewStringUTF(lJniEnv, domain);
-       lLookupMediaResourceMethod = (*lJniEnv)->GetStaticMethodID(lJniEnv, lMainClass, "lookupMediaServerAddress", "(Ljava/lang/String;)[Ljava/lang/String;");
-       lJStringResults = (*lJniEnv)->CallStaticObjectMethod(lJniEnv, lMainClass, lLookupMediaResourceMethod, applicationArg);
-       if (lJStringResults == 0) {
-               return P2PPROXY_RESOURCEMGT_SERVER_NOT_FOUND;
-       }
-       
-       lArraySize = (*lJniEnv)->GetArrayLength(lJniEnv, lJStringResults);
-       for (i=0;i<lArraySize & i<P2PPROXY_MAX_RESOURCE_LIST_SIZE; i++) {
-               lResourceInstance =  (*lJniEnv)->GetObjectArrayElement(lJniEnv,lJStringResults, i);
-               lString =  (*lJniEnv)->GetStringUTFChars(lJniEnv, lResourceInstance, &lIsCopy);
-               lStringSize = (*lJniEnv)->GetStringLength(lJniEnv, lResourceInstance);
-               resource_list->resource_uri[i] = malloc(lStringSize);
-               strcpy(resource_list->resource_uri[i],lString);
-               resource_list->size=i;
-               (*lJniEnv)->ReleaseStringUTFChars(lJniEnv, lResourceInstance, lString);
-       }
-       
-       (*p2pproxy_application_jvm)->DetachCurrentThread(p2pproxy_application_jvm);
-       return P2PPROXY_NO_ERROR;
-}
-int p2pproxy_resourcemgt_revoke_media_resource(const char* resource_uri) {
-       jmethodID revokeMediaResourceMethod;
-       jstring applicationArg;
-       GET_JNI_ENV
-       
-       applicationArg = (*lJniEnv)->NewStringUTF(lJniEnv, resource_uri);
-       revokeMediaResourceMethod = (*lJniEnv)->GetStaticMethodID(lJniEnv, lMainClass, "revokeMediaServer", "(Ljava/lang/String;)I");
-       lResult = (*lJniEnv)->CallStaticIntMethod(lJniEnv, lMainClass, revokeMediaResourceMethod,applicationArg);
-       (*p2pproxy_application_jvm)->DetachCurrentThread(p2pproxy_application_jvm);
-       return lResult;
-}
diff --git a/p2pproxy/launcher/src/p2pproxy.h b/p2pproxy/launcher/src/p2pproxy.h
deleted file mode 100644 (file)
index 158f014..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-p2pproxy.h - sip proxy.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-#ifndef P2PPROXY_LAUNCHER_H_
-#define P2PPROXY_LAUNCHER_H_
-
-#include <stdio.h>
-#ifdef SWIG
-%module P2pProxylauncher
-%javaconst(1);
-%include "p2pproxy.h"
-#endif /*SWIG*/
-#define P2PPROXY_EWOULDBLOCK  4
-#define P2PPROXY_ACCOUNTMGT_USER_EXIST 1
-#define P2PPROXY_ACCOUNTMGT_USER_NOT_EXIST 0 
-#define P2PPROXY_RESOURCEMGT_SERVER_NOT_FOUND  3
-/* state code*/
-#define P2PPROXY_CONNECTED 2
-#define P2PPROXY_NOT_CONNECTED 1
-/* status code*/
-#define P2PPROXY_NO_ERROR 0
-/*error codes*/
-#define P2PPROXY_ERROR -1
-#define P2PPROXY_ERROR_APPLICATION_NOT_STARTED  -2
-#define P2PPROXY_ERROR_APPLICATION_ALREADY_STARTED  -3
-#define P2PPROXY_ERROR_ACCOUNTMGT_USER_ALREADY_EXIST  -4
-#define P2PPROXY_ERROR_ACCOUNTMGT_BAD_SIP_URI  -5
-#define P2PPROXY_ERROR_RESOURCEMGT_SERVER_NOT_FOUND  -6
-
-#ifndef SWIG
-/**
- *  start p2pproxy application
- *  blocking call
- *  @param argc number of argument
- *  @param argv arguments
- *     @return status code
- * 
- */
-int p2pproxy_application_start(int argc, char **argv);
-
-/**
- *  return status
- *     @return P2PPROXY_CONNECTED, P2PPROXY_NOT_ERROR
- * 
- */
-int p2pproxy_application_get_state(void);
-
-/**
- *  stop p2pproxy application
- * 
- */
-int p2pproxy_application_stop(void);
-
-/**
- * return the status string corresponding to the status code
- */
-/*const char* p2pproxy_status_string(int status_code);*/
-
-/************************/
-/***account management***/
-/************************/
-
-/**
-* create an account with the given name (must be unique)
-* @param user_name user sip uri (sip:joe@p2p.linphone.org)
-*  
-* @return  P2PPROXY_NO_ERROR, P2PPROXY_ERROR_APPLICATIONNOTSTARTED, P2PPROXY_ERROR_ACCOUNTMGT_USERALREADYEXIST, P2PPROXY_ERROR_ACCOUNTMGT_BADSIPURI
-*/
-int p2pproxy_accountmgt_createAccount(const char* user_name);
-/**
-* check if a user name has been already created
-* @param user_name user sip uri (sip:joe@p2p.linphone.org)
-* @return P2PPROXY_ACCOUNTMGT_USEREXIST, P2PPROXY_ACCOUNTMGT_USERNOTEXIST , P2PPROXY_ERROR_APPLICATIONNOTSTARTED
-*/
-int p2pproxy_accountmgt_isValidAccount(const char* user_name);
-
-/**
-* delete an account with the given name 
-* @param user_name  user sip uri (sip:joe@p2p.linphone.org)
-* @return P2PPROXY_NO_ERROR, P2PPROXY_ERROR_APPLICATIONNOTSTARTED
-*/
-int p2pproxy_accountmgt_deleteAccount(const char* user_name);
-
-/****************************/
-/***resource management******/
-/****************************/
-/**
- * Structure to store resource list, must be instanciated by 
- * p2pproxy_resourcemgt_new_resource_list and deleted by p2pproxy_resourcemgt_delete_resource_list.
- * 
- */
-#define P2PPROXY_MAX_RESOURCE_LIST_SIZE 10
-typedef struct p2pproxy_resourcemgt_resource_list {
-       char* resource_uri[P2PPROXY_MAX_RESOURCE_LIST_SIZE]; /* uri list*/
-       unsigned char size;   /*number of element in the list*/
-} p2pproxy_resourcemgt_resource_list_t;
-
-/**
- * Instanciate a p2pproxy_resourcemgt_resource_list
- */
-p2pproxy_resourcemgt_resource_list_t* p2pproxy_resourcemgt_new_resource_list(void);
-/**
- * delete a p2pproxy_resourcemgt_resource_list 
- */
-void p2pproxy_resourcemgt_delete_resource_list(p2pproxy_resourcemgt_resource_list_t* resource_list);
-
-/**
-* access a proxy registrar sip addreess for a given domaine name 
-* @param [out] proxy_uri buffer allocated by the user
-* @param [in] size buffer size
-* @param [in] domaine name
-* @return status code P2PPROXY_NO_ERROR, P2PPROXY_ERROR_RESOURCELOCATOR_SERVER_NOT_FOUND
-*/
-int p2pproxy_resourcemgt_lookup_sip_proxy(char* proxy_uri,size_t size, const char* domain) ;
-/**
-* access a media ressource addresses for a given domaine name 
-* @param [out] p2pproxy_resourcemgt_resource_list_t  allocated by the user (size = 0)
-* @param [in] domaine name
-* @return status code P2PPROXY_NO_ERROR, P2PPROXY_ERROR_RESOURCELOCATOR_SERVER_NOT_FOUND
-*/
-int p2pproxy_resourcemgt_lookup_media_resource(p2pproxy_resourcemgt_resource_list_t* resource_list, const char* domain) ;
-/*
- * notify the library at a given proxy is no longuer reachable 
-* @param [in] proxy sip uri
-* @return status code P2PPROXY_NO_ERROR
-*/
-int p2pproxy_resourcemgt_revoke_sip_proxy(const char* proxy_uri);
-
-/*
- * notify the library at a given Media resoure is no longuer reachable 
-* @param [in] media resource uri (udp://hostname:port)
-* @return status code P2PPROXY_NO_ERROR
-*/
-int p2pproxy_resourcemgt_revoke_media_resource(const char* resource_uri);
-
-#endif /*SWIG*/
-
-#endif /*P2PPROXY_LAUNCHER_H_*/
diff --git a/p2pproxy/log4j.properties b/p2pproxy/log4j.properties
deleted file mode 100644 (file)
index 43ab871..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-### Configuration file for log4j. For more details, see log4j's site:
-###
-###   http://jakarta.apache.org/log4j/
-
-### Set root loger level and its appender
-log4j.rootLogger=ERROR, A1, R
-
-### Create an appender named A1 to log to console
-log4j.appender.A1=org.apache.log4j.ConsoleAppender
-log4j.appender.A1.Target=System.out
-#log4j.appender.A1.Threshold=WARN
-log4j.appender.A1.layout=org.apache.log4j.PatternLayout
-## the following conversion pattern produces:
-## <DEBUG 2003-10-21 11:03:27,490 RendezVousImpl::connectToRendezVous:769> connectToRendezVous
-log4j.appender.A1.layout.ConversionPattern=<%-5p %d{ISO8601} %c{1}::%M:%L> %x %m\n
-
-log4j.appender.R.Threshold=TRACE
-log4j.appender.R=org.apache.log4j.RollingFileAppender
-log4j.appender.R.File=${org.linphone.p2pproxy.home}/logs/p2pproxy.log
-log4j.appender.R.MaxFileSize=1000KB
-# Keep one backup file
-log4j.appender.R.MaxBackupIndex=1
-log4j.appender.R.layout=org.apache.log4j.PatternLayout
-log4j.appender.R.layout.ConversionPattern=<%-5p %d{ISO8601} %c{1}::%M:%L> %x %m\n
-
-
-#java.util.logging
-handlers=java.util.logging.FileHandler, java.util.logging.ConsoleHandler
-java.util.logging.FileHandler.limit = 50000
-java.util.logging.FileHandler.count = 1
-java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
-
-# Limit the message that are printed on the console to INFO and above
-java.util.logging.ConsoleHandler.level = FINEST
-java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
-# Facility specific properties.
-# Provides extra control for each logger.
-#
-# For example, set the net.jxta.impi.pipe.PipeResolver logger to only log SEVERE
-# messages:
-#net.jxta.level = FINEST
-
-#net.jxta.impl.peergroup.AutomaticConfigurator.level=INFO
-#net.jxta.impl.peergroup.ConfigDialog.level=INFO
-#net.jxta.impl.peergroup.DefaultConfigurator.level=INFO
-#net.jxta.impl.peergroup.NullConfigurator.level=INFO
-
-### per-package filtering examples:
- #net.jxta.level=WARN
-# net.jxta.impl.peergroup.level=INFO
-#net.jxta.impl.rendezvous.edge.level=FINEST
-# net.jxta.impl.endpoint.relay.level=FINEST
-#net.jxta.impl.endpoint.WireFormatMessageBinary.level=FINEST
-#net.jxta.impl.discovery.level=FINEST
-#net.jxta.impl.cm.level=FINEST
-# net.jxta.impl.resolver.level=FINEST
-# net.jxta.impl.endpoint.level=FINEST
-# net.jxta.impl.endpoint.relay.level=FINEST
-#net.jxta.impl.endpoint.relay.RelayClient.level=FINEST
- #net.jxta.impl.endpoint.tcp.level=FINEST
-#net.jxta.impl.endpoint.servlethttp.level=INFO
-#net.jxta.impl.endpoint.servlethttp.HttpClientMessenger.level=FINEST
-# net.jxta.impl.endpoint.router.EndpointRouter.level=WARNING
-# net.jxta.impl.endpoint.EndpointServiceImpl.level=FINEST
- #net.jxta.impl.pipe.level=FINEST
-#net.jxta.socket.level=FINEST
-#net.jxta.impl.util.pipe.reliable.level=FINEST
-#net.jxta.impl.util.RdvAdvSeedingManager.level=FINEST
-
-#net.jxta.impl.endpoint.router.level=INFO
-#net.jxta.platform.level=FINEST
-
-log4j.logger.org.linphone.p2pproxy=INFO
-#log4j.logger.net.jxta.impl.rendezvous.rpv=WARN
-log4j.logger.org.linphone.p2pproxy.core.JxtaNetworkManager=DEBUG
-log4j.logger.org.linphone.p2pproxy.core.P2pProxyAccountManagementImpl=DEBUG
-
-log4j.logger.org.linphone.p2pproxy.api.P2pProxyInstance=INFO
-#log4j.logger.org.linphone.p2pproxy.test.utils=INFO
-log4j.logger.org.linphone.p2pproxy.test=DEBUG
-#log4j.logger.org.linphone.p2pproxy.core.rdvautoconfig=DEBUG
diff --git a/p2pproxy/plugin-src/Makefile.am b/p2pproxy/plugin-src/Makefile.am
deleted file mode 100644 (file)
index 5b8495a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#plugin to enable fonis into linphone
-
-JAVA_LDFLAGS=\
-       -Wl,-rpath,$(javadir)/jre/lib/amd64 -Wl,-rpath,$(javadir)/jre/lib/i386 \
-       -Wl,-rpath,$(javadir)/jre/lib/amd64/server -Wl,-rpath,$(javadir)/jre/lib/i386/server
-
-pluginsdir=$(LINPHONE_PLUGINS_DIR)
-
-plugins_LTLIBRARIES=libfonisprovider.la
-
-libfonisprovider_la_SOURCES=fonis.c
-
-libfonisprovider_la_LIBADD=$(top_builddir)/launcher/src/libfonisc.la
-
-libfonisprovider_la_LDFLAGS=$(JAVA_LDFLAGS)
-
-AM_CFLAGS= $(LIBLINPHONE_CFLAGS)
-
-INCLUDES=-I$(top_srcdir)/launcher/src
\ No newline at end of file
diff --git a/p2pproxy/plugin-src/fonis.c b/p2pproxy/plugin-src/fonis.c
deleted file mode 100644 (file)
index 7faccef..0000000
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
-linphone
-Copyright (C) 2000  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-
-#include "linphonecore.h"
-
-#include "p2pproxy.h"
-
-typedef struct _FonisContext{
-       int toto;
-}FonisContext;
-
-static ms_thread_t fonis_thread;
-
-
-static void *fonis_thread_func(void *arg){
-       char *argv[]={"-edge-only","-sip", "5058",NULL};
-       if (p2pproxy_application_start(3,argv)!=0){
-               ms_error("Fail to start fonis thread !");
-       }
-       return NULL;
-}
-
-static bool_t fonis_init(void){
-       static bool_t initd=FALSE;
-       if (!initd){
-               ms_thread_create(&fonis_thread,NULL,fonis_thread_func,NULL);
-               initd=TRUE;
-               while( p2pproxy_application_get_state()==P2PPROXY_ERROR_APPLICATION_NOT_STARTED){
-                       usleep(200000);
-                       ms_message("Waiting for p2pproxy to start");
-               }
-       }
-       return TRUE;
-}
-
-static bool_t fonis_check_connected(SipSetupContext *ctx){
-       int retries;
-       LinphoneCore *lc=linphone_proxy_config_get_core(sip_setup_context_get_proxy_config(ctx));
-       for(retries=0;retries<1200;retries++){
-               if (p2pproxy_application_get_state()==P2PPROXY_CONNECTED){
-                       if (retries>0) linphone_core_stop_waiting(lc);
-                       return TRUE;
-               }
-               if (retries==0){
-                       ms_message("Waiting for p2pproxy to connect to the network...");
-                       linphone_core_start_waiting(lc,"Trying to connect to the fonis network...");
-               }else linphone_core_update_progress(lc,NULL,-1);
-       }
-       linphone_core_stop_waiting(lc);
-       return FALSE;
-}
-
-static int fonis_test_account(SipSetupContext *ctx, const char *uri){
-       int ret;
-       LinphoneCore *lc=linphone_proxy_config_get_core(sip_setup_context_get_proxy_config(ctx));
-       if (!fonis_check_connected(ctx)) return -1;
-       linphone_core_start_waiting(lc,"Checking...");
-       ret=(p2pproxy_accountmgt_isValidAccount(uri)==P2PPROXY_ACCOUNTMGT_USER_EXIST) ? 1 : 0;
-       linphone_core_update_progress(lc,NULL,1);
-       linphone_core_stop_waiting(lc);
-       return ret;
-}
-
-static int fonis_create_account(SipSetupContext *ctx, const char *uri, const char *passwd){
-       int err;
-       LinphoneCore *lc=linphone_proxy_config_get_core(sip_setup_context_get_proxy_config(ctx));
-       if (!fonis_check_connected(ctx)) return -1;
-       linphone_core_start_waiting(lc,"Creating account...");
-       err=p2pproxy_accountmgt_createAccount(uri);
-       ms_message("Account creation result for %s: %i",uri,err);
-       linphone_core_update_progress(lc,NULL,1);
-       linphone_core_stop_waiting(lc);
-       if (err<0) return -1;
-       return 0;
-}
-
-static int fonis_login_account(SipSetupContext * ctx,const char *uri, const char *passwd){
-       if (!fonis_check_connected(ctx)) return -1;
-       if (p2pproxy_accountmgt_isValidAccount(uri)==P2PPROXY_ACCOUNTMGT_USER_EXIST) {
-               return 0;
-       }
-       else return -1;
-}
-
-static int fonis_get_proxy(SipSetupContext *ctx, const char *domain, char *proxy, size_t sz){
-       int err;
-       if (!fonis_check_connected(ctx)) return -1;
-       err=p2pproxy_resourcemgt_lookup_sip_proxy(proxy,sz,(char*)domain);
-       if (err==0) return 0;
-       else return -1;
-}
-
-static int fonis_get_stun_servers(SipSetupContext *ctx, char *stun1, char *stun2, size_t size){
-       FonisContext *fc=(FonisContext*)ctx->data;
-       int ret=-1;
-       p2pproxy_resourcemgt_resource_list_t* l=p2pproxy_resourcemgt_new_resource_list();
-       if (p2pproxy_resourcemgt_lookup_media_resource(l,ctx->domain)==0){
-               if (l->size>0) strncpy(stun1,l->resource_uri[0],size);
-               if (l->size>1) strncpy(stun2,l->resource_uri[1],size);
-               ret=0;
-       }
-       p2pproxy_resourcemgt_delete_resource_list(l);
-       return ret;
-}
-
-static int fonis_get_relay(SipSetupContext *ctx, char *relay, size_t size){
-       FonisContext *fc=(FonisContext*)ctx->data;
-       int ret=-1;
-       p2pproxy_resourcemgt_resource_list_t* l=p2pproxy_resourcemgt_new_resource_list();
-       if (p2pproxy_resourcemgt_lookup_media_resource(l,ctx->domain)==0){
-               if (l->size>0) strncpy(relay,l->resource_uri[0],size);
-               ret=0;
-       }
-       p2pproxy_resourcemgt_delete_resource_list(l);
-       return ret;
-}
-
-static void fonis_exit(){
-       p2pproxy_application_stop();
-}
-
-static const char *fonis_get_notice(SipSetupContext *ssctx){
-       return "<b>WARNING: experimental feature !</b>"
-"FONIS stands for Free Overlay Network for Instant SIP.\n"
-"Based on SIP and Peer to Peer technologies, it allows people to find each other through the help of a virtual network."
-"Once you and your friends are registered, you'll be able to call each other simply by entering your friend's username in "
-"linphone's sip uri box."
-"Read more information about FONIS at http://www.fonis.org";
-}
-
-static const char *fonis_domains[]={
-       "p2p.linphone.org",
-       NULL
-};
-
-static const char ** fonis_get_domains(SipSetupContext *ssctx){
-       return fonis_domains;
-}
-
-
-
-static SipSetup fonis_sip_setup={
-       .capabilities=SIP_SETUP_CAP_PROXY_PROVIDER|SIP_SETUP_CAP_STUN_PROVIDER|
-                               SIP_SETUP_CAP_RELAY_PROVIDER|SIP_SETUP_CAP_ACCOUNT_MANAGER,
-       .name="fonis",
-       .init=fonis_init,
-       .account_exists=fonis_test_account,
-       .create_account=fonis_create_account,
-       .login_account=fonis_login_account,
-       .get_proxy=fonis_get_proxy,
-       .get_stun_servers=fonis_get_stun_servers,
-       .get_relay=fonis_get_relay,
-       .exit=fonis_exit,
-       .get_notice=fonis_get_notice,
-       .get_domains=fonis_get_domains
-};
-
-void libfonisprovider_init(void){
-       sip_setup_register(&fonis_sip_setup);
-}
-
diff --git a/p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyException.java b/p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyException.java
deleted file mode 100644 (file)
index 15a0230..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-P2pProxyException.java -Generic purpose Exception for P2pProxyMain.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.api;
-
-@SuppressWarnings("serial")
-public class P2pProxyException extends Exception {
-
-       public P2pProxyException() {
-               super();
-               // TODO Auto-generated constructor stub
-       }
-
-       public P2pProxyException(String arg0, Throwable arg1) {
-               super(arg0, arg1);
-               // TODO Auto-generated constructor stub
-       }
-
-       public P2pProxyException(String arg0) {
-               super(arg0);
-               // TODO Auto-generated constructor stub
-       }
-
-       public P2pProxyException(Throwable arg0) {
-               super(arg0);
-               // TODO Auto-generated constructor stub
-       }
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyInstance.java b/p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyInstance.java
deleted file mode 100644 (file)
index f325156..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-P2pProxyInstance.java -- 
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.api;
-
-import org.zoolu.sip.provider.SipProvider;
-
-public interface P2pProxyInstance {
-   public static int BASE_HTTP = 30700;
-   public static int BASE_TCP = 9701;
-    
-   public enum Mode {relay, edge, auto,seeding_server};
-   /**
-    * @return Returns the Mode.
-    */
-   public abstract Mode getMode();
-
-   /**
-    * @param aModet.
-    */
-   public abstract void setMode(Mode aMode);
-
-   /**
-    * @return Returns the mIndex.
-    */
-   public abstract int getIndex();
-
-   /**
-    * @param index The mIndex to set.
-    */
-   public abstract void setIndex(int index);
-
-   public abstract void start() throws Exception;
-   public abstract void stop() throws Exception;
-   
-   public abstract boolean isStarted() throws P2pProxyException; 
-   
-   public abstract SipProvider getSipClientProvider();
-   
-   public abstract String getSipClientName();
-   
-   public int getNumberOfconnectedPeers();
-   
-   public Object getOpaqueNetworkManager();
-   
-   public void setPrivateHostAdress(String anAddress);
-   
-   public void setPublicHostAdress(String anAddress);
-
-   public abstract P2pProxyNetworkProbe getManager();
-   
-   public abstract P2pProxyRtpRelayManagement getRtpRelayManager();
-   
-   public void setRelayCapacity(int aCapacity);
-   
-   public void setProperty(String key,String value) throws P2pProxyException;
-   
-   public int getAdvertisementDiscoveryTimeout();
-   
-}
\ No newline at end of file
diff --git a/p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyManagement.java b/p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyManagement.java
deleted file mode 100644 (file)
index 2ebeb32..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-P2pProxyManagement.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.api;
-
-
-public interface P2pProxyManagement extends P2pProxyNetworkProbe,P2pProxyResourceManagement {
-
-   /**
-    * test if according both to local peer capabilities and supeer peer election polity this peer should become a super peer
-    * 
-    * @return
-    */  
-   public boolean shouldIBehaveAsAnRdv() throws P2pProxyException;
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyNetworkProbe.java b/p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyNetworkProbe.java
deleted file mode 100644 (file)
index c273243..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- p2pproxy
- Copyright (C) 2007  Jehan Monnier ()
-
- P2pProxyNetworkProbe.java - .
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-package org.linphone.p2pproxy.api;
-
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-
-
-
-
-public interface P2pProxyNetworkProbe {
-   public enum Protocol {tcp,udp};
-   /**
-    * request the rdv server for the edge IP address
-    * @return
-    * @throws P2pProxyException
-    */
-   public abstract InetAddress getPublicIpAddress() throws P2pProxyException;
-
-   /**
-    * Ask the network to test if the given ip,port, protocol is reachable from the network
-    * @param aSocketAddress
-    * @param aProtocol
-    * @return true if reachable
-    * @throws P2pProxyException
-    */
-   public abstract boolean probeSocket(InetSocketAddress aSocketAddress,
-         Protocol aProtocol) throws P2pProxyException;
-
-}
\ No newline at end of file
diff --git a/p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyNotReadyException.java b/p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyNotReadyException.java
deleted file mode 100644 (file)
index 6ec39cc..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-P2pProxyUserNotFoundException.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.api;
-
-
-@SuppressWarnings("serial")
-public class P2pProxyNotReadyException extends P2pProxyException {
-
-   /**
-    * 
-    */
-   public P2pProxyNotReadyException() {
-      super();
-   }
-
-   /**
-    * @param arg0
-    * @param arg1
-    */
-   public P2pProxyNotReadyException(String arg0, Throwable arg1) {
-      super(arg0, arg1);
-   }
-
-   /**
-    * @param arg0
-    */
-   public P2pProxyNotReadyException(String arg0) {
-      super(arg0);
-   }
-
-   /**
-    * @param arg0
-    */
-   public P2pProxyNotReadyException(Throwable arg0) {
-      super(arg0);
-   }
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyResourceManagement.java b/p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyResourceManagement.java
deleted file mode 100644 (file)
index d8159d6..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-P2pProxySipProxyRegistrarManagement.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-package org.linphone.p2pproxy.api;
-
-
-
-public interface P2pProxyResourceManagement {
-       public final String DOMAINE="p2p.linphone.org";
-       /**
-    * 
-    * @return the SIP uris of an available sip proxy registrar for a given domaine 
-    */
-   public String[] lookupSipProxiesUri(String aDomaine) throws P2pProxyException ;
-   
-   public void revokeSipProxy(String aProxy) throws P2pProxyException;
-   
-   public void revokeMediaServer(String aMediaServer) throws P2pProxyException;
-   /**
-    * return 2 adresses where to contact media server (stun/rtprelay)
-    */
-   public String[] getMediaServerList() throws P2pProxyException;
-
-
-   
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyRtpRelayManagement.java b/p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyRtpRelayManagement.java
deleted file mode 100644 (file)
index d2ee5b5..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.linphone.p2pproxy.api;
-
-import java.net.InetSocketAddress;
-import java.util.Map;
-
-import org.linphone.p2pproxy.core.media.rtprelay.MediaType;
-
-public interface P2pProxyRtpRelayManagement {
-       
-    /**
-     * 
-     * @param aSource get list Socket address available for relay
-     */
-    public Map<MediaType,InetSocketAddress> getAddresses() throws P2pProxyException ;
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyUserAlreadyExistException.java b/p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyUserAlreadyExistException.java
deleted file mode 100644 (file)
index e3ba5ac..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-P2pProxyUserAlreadyExistException.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.api;
-
-public class P2pProxyUserAlreadyExistException extends Exception {
-
-   /**
-    * 
-    */
-   public P2pProxyUserAlreadyExistException() {
-      super();
-      // TODO Auto-generated constructor stub
-   }
-
-   /**
-    * @param arg0
-    * @param arg1
-    */
-   public P2pProxyUserAlreadyExistException(String arg0, Throwable arg1) {
-      super(arg0, arg1);
-      // TODO Auto-generated constructor stub
-   }
-
-   /**
-    * @param arg0
-    */
-   public P2pProxyUserAlreadyExistException(String arg0) {
-      super(arg0);
-      // TODO Auto-generated constructor stub
-   }
-
-   /**
-    * @param arg0
-    */
-   public P2pProxyUserAlreadyExistException(Throwable arg0) {
-      super(arg0);
-      // TODO Auto-generated constructor stub
-   }
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyUserNotFoundException.java b/p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyUserNotFoundException.java
deleted file mode 100644 (file)
index f628e00..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-P2pProxyUserNotFoundException.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.api;
-
-
-@SuppressWarnings("serial")
-public class P2pProxyUserNotFoundException extends P2pProxyException {
-
-   /**
-    * 
-    */
-   public P2pProxyUserNotFoundException() {
-      super();
-   }
-
-   /**
-    * @param arg0
-    * @param arg1
-    */
-   public P2pProxyUserNotFoundException(String arg0, Throwable arg1) {
-      super(arg0, arg1);
-   }
-
-   /**
-    * @param arg0
-    */
-   public P2pProxyUserNotFoundException(String arg0) {
-      super(arg0);
-   }
-
-   /**
-    * @param arg0
-    */
-   public P2pProxyUserNotFoundException(Throwable arg0) {
-      super(arg0);
-   }
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/Configurator.java b/p2pproxy/src/org/linphone/p2pproxy/core/Configurator.java
deleted file mode 100644 (file)
index 56950b0..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-Configurator.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.Date;
-import java.util.InvalidPropertiesFormatException;
-import java.util.Properties;
-import java.util.Set;
-
-import org.apache.log4j.Logger;
-
-@SuppressWarnings("serial")
-public class Configurator extends Properties {
-       private final static Logger mLog = Logger.getLogger(Configurator.class);
-       private final File mFile;
-       public Configurator (File aFile) throws InvalidPropertiesFormatException, FileNotFoundException, IOException {
-               super();
-               mFile = aFile;
-             if (mFile.exists()) {
-                 loadFromXML(new FileInputStream(mFile));
-             }
-       }
-       /**
-        * save to disk
-        * @throws IOException 
-        * @throws FileNotFoundException 
-        */
-       public void save() throws FileNotFoundException, IOException {
-               storeToXML(new FileOutputStream(mFile),new Date().toString());
-       }
-       public Object setProperty(String key,String value) {
-               Object lReturn = super.setProperty(key, value);
-               try {
-                       save();
-               } catch (Exception e) {
-                       mLog.error("enable to save prop ["+key+"] value ["+value+"]", e);
-               }
-               return lReturn;
-       }
-    public void serProperties(Properties aProperties) {
-       for (Object key :aProperties.keySet()){
-          setProperty((String)key,aProperties.getProperty((String)key));
-       }
-    }
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/EdgePeerServiceManager.java b/p2pproxy/src/org/linphone/p2pproxy/core/EdgePeerServiceManager.java
deleted file mode 100644 (file)
index bc70b5d..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-EdgePeerServiceManager.java - EdgePeer Service Manager.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core;
-
-
-import java.net.SocketException;
-import java.net.UnknownHostException;
-
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.core.rdvautoconfig.AutoConfigService;
-
-// Referenced classes of package org.linphone.p2pproxy.core:
-//            ServiceProvider, JxtaNetworkManager, Configurator
-
-public class EdgePeerServiceManager extends P2pProxyManagementImpl
-{
-   private final AutoConfigService mAutoConfigService;
-   private final static Logger mLog = Logger.getLogger(EdgePeerServiceManager.class);
-   EdgePeerServiceManager(Configurator aConfigurator, JxtaNetworkManager aJxtaNetworkManager)throws SocketException, UnknownHostException
-    {
-      super(aConfigurator,aJxtaNetworkManager);  
-      mAutoConfigService = new AutoConfigService(mConfigurator,mJxtaNetworkManager,this);
-    }
-
-    public void start(long aTimeout) throws P2pProxyException
-    {
-        super.start(aTimeout);
-        mAutoConfigService.start(aTimeout);
-    }
-
-    public void stop() {
-       super.stop();
-       mAutoConfigService.stop();
-       mLog.info("EdgePeerServiceManager stopped");
-    }
-
-
-   public boolean shouldIBehaveAsAnRdv() throws P2pProxyException{
-      return mAutoConfigService.canIBehaveAsASuperPeer();
-   }
-
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/GenericService.java b/p2pproxy/src/org/linphone/p2pproxy/core/GenericService.java
deleted file mode 100644 (file)
index 186cd29..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-RtpRelayService.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core;
-
-import java.io.IOException;
-import java.net.Socket;
-import java.net.URI;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.id.IDFactory;
-
-import net.jxta.platform.ModuleClassID;
-import net.jxta.platform.ModuleSpecID;
-import net.jxta.protocol.ModuleClassAdvertisement;
-import net.jxta.protocol.ModuleSpecAdvertisement;
-import net.jxta.protocol.PipeAdvertisement;
-import net.jxta.socket.JxtaServerSocket;
-
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyException;
-
-
-public class GenericService implements Runnable,ServiceProvider {
-   public interface ServiceSocketHandlerFactory {
-
-      public Runnable create(Socket aSocket) ; 
-
-   }
-   private final JxtaNetworkManager mJxtaNetworkManager;
-   private final Configurator mProperties;
-   private final  String SERVICE_PIPE_ID;
-   private final static Logger mLog = Logger.getLogger(GenericService.class);
-   private final  String ADV_NAME ;  
-   private final  String MODULE_CLASS_ID;
-   private final  String MODULE_SPEC_ID;
-   private JxtaServerSocket mJxtaServerSocket;
-   private final String mServiceName; 
-   private Thread mSocketServerThread ;
-   private final ExecutorService mPool;
-   private final ServiceSocketHandlerFactory mServiceSocketHandlerFactory;
-   private boolean mExist = false;
-  
-   public GenericService(Configurator lProperties,JxtaNetworkManager aJxtaNetworkManager,String aServiceName,ServiceSocketHandlerFactory aServiceSocketHandlerFactory) {
-       mJxtaNetworkManager = aJxtaNetworkManager; 
-       mProperties = lProperties;
-       mServiceName = aServiceName.trim();
-       SERVICE_PIPE_ID="org.linphone.p2pproxy."+mServiceName+".bidi-pipe.id";
-       ADV_NAME = "JXTASPEC:LINPHONE-"+mServiceName;
-       MODULE_CLASS_ID="org.linphone.p2pproxy."+mServiceName+"Service.module-class.id";
-       MODULE_SPEC_ID="org.linphone.p2pproxy."+mServiceName+"Service.module-spec.id";
-       mSocketServerThread = new Thread(this,mServiceName+"Service server thread");
-       mPool = Executors.newCachedThreadPool();
-       mServiceSocketHandlerFactory = aServiceSocketHandlerFactory;
-   }
-
-   public void start(long l)  throws P2pProxyException {
-      try {         
-         mLog.info("Start the RtpRelayService daemon");
-         ModuleClassAdvertisement lModuleAdvertisement = (ModuleClassAdvertisement) AdvertisementFactory.newAdvertisement(ModuleClassAdvertisement.getAdvertisementType());
-
-         lModuleAdvertisement.setName("JXTAMOD:LINPHONE-"+mServiceName);
-         lModuleAdvertisement.setDescription("Service to provide " +mServiceName);
-
-         ModuleClassID lModuleClassID;
-         // to avoid ID creation at each start
-         if (mProperties.getProperty(MODULE_CLASS_ID) == null) {
-            lModuleClassID = IDFactory.newModuleClassID();
-            mProperties.setProperty(MODULE_CLASS_ID, lModuleClassID.toURI().toString());
-         } else {
-            lModuleClassID = (ModuleClassID) IDFactory.fromURI(URI.create(mProperties.getProperty(MODULE_CLASS_ID)));
-         }
-         lModuleAdvertisement.setModuleClassID(lModuleClassID);
-
-         // publish local only
-         mJxtaNetworkManager.getPeerGroup().getDiscoveryService().publish(lModuleAdvertisement);
-
-         ModuleSpecAdvertisement lModuleSpecAdvertisement = (ModuleSpecAdvertisement)AdvertisementFactory.newAdvertisement(ModuleSpecAdvertisement.getAdvertisementType());
-         lModuleSpecAdvertisement.setName(ADV_NAME);
-         lModuleSpecAdvertisement.setVersion("Version 1.0");
-         lModuleSpecAdvertisement.setCreator("linphone.org");
-         // to avoid ID creation at each start
-         ModuleSpecID  lModuleSpecId;
-         if (mProperties.getProperty(MODULE_SPEC_ID) == null) {
-            lModuleSpecId = IDFactory.newModuleSpecID(lModuleClassID);
-            mProperties.setProperty(MODULE_SPEC_ID, lModuleSpecId.toURI().toString());
-         } else {
-            lModuleSpecId = (ModuleSpecID) IDFactory.fromURI(URI.create(mProperties.getProperty(MODULE_SPEC_ID)));
-         }
-         lModuleSpecAdvertisement.setModuleSpecID(lModuleSpecId);
-         lModuleSpecAdvertisement.setSpecURI("http://www.linphone.org/"+mServiceName.toLowerCase());
-
-         PipeAdvertisement lSocketAdvertisement = mJxtaNetworkManager.createPipeAdvertisement(SERVICE_PIPE_ID, mServiceName.toLowerCase());
-
-         lModuleSpecAdvertisement.setPipeAdvertisement(lSocketAdvertisement);
-         mJxtaServerSocket = new JxtaServerSocket(mJxtaNetworkManager.getPeerGroup(), lSocketAdvertisement, 10);
-         mJxtaServerSocket.setSoTimeout(0);
-         mSocketServerThread.start();
-         //publish local only
-         mJxtaNetworkManager.getPeerGroup().getDiscoveryService().publish(lModuleSpecAdvertisement);
-         mLog.info("Adv ["+lModuleSpecAdvertisement+"] published");
-      }
-      catch(Exception e)
-      {
-         mLog.error("socket instance error", e);
-      }        
-   }
-   public void stop(){
-          try {
-               mJxtaServerSocket.close();
-       } catch (IOException e) {
-               //nop
-       }
-          mExist = true;
-   }
-   public void run() {
-      while (mExist) {
-         try {
-            mLog.info("Waiting for connection on service ["+ADV_NAME+"]");
-             Socket lSocket = mJxtaServerSocket.accept();
-             // set reliable
-             if (lSocket != null) {
-                mLog.info("socket created");
-                mPool.execute(mServiceSocketHandlerFactory.create(lSocket));
-             }
-         } catch (Exception e) {
-            mLog.error("Server socket  error",e);
-         }
-     }
-      
-   }
-
-   /**
-    * @return Returns the aDV_NAME.
-    */
-   public String getAdvName() {
-      return ADV_NAME;
-   }
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/GenericServiceClient.java b/p2pproxy/src/org/linphone/p2pproxy/core/GenericServiceClient.java
deleted file mode 100644 (file)
index 21b7698..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-PeerInfoServiceClient.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core;
-
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.net.DatagramPacket;
-import java.net.DatagramSocket;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.ServerSocket;
-import java.net.SocketAddress;
-import java.net.SocketTimeoutException;
-import java.util.List;
-
-import net.jxta.document.Advertisement;
-import net.jxta.id.ID;
-import net.jxta.protocol.ModuleSpecAdvertisement;
-import net.jxta.socket.JxtaSocket;
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.api.P2pProxyNetworkProbe;
-import org.linphone.p2pproxy.core.Configurator;
-import org.linphone.p2pproxy.core.JxtaNetworkManager;
-import org.linphone.p2pproxy.core.ServiceProvider;
-import org.linphone.p2pproxy.core.JxtaNetworkManager.Mode;
-
-
-public abstract class GenericServiceClient implements ServiceProvider{
-   protected final JxtaNetworkManager mJxtaNetworkManager;
-   private final Configurator mProperties;
-   private final static Logger mLog = Logger.getLogger(GenericServiceClient.class);
-   protected JxtaSocket mJxtaSocket;
-   protected ObjectOutputStream mOut;
-   protected ObjectInputStream mIn;
-   boolean mStarted = false;
-   protected final int mSoTimout;
-   private final String mAdvertisementName;
-   
-   public GenericServiceClient(Configurator lProperties,JxtaNetworkManager aJxtaNetworkManager,String aAdvertisementName) {
-      mJxtaNetworkManager = aJxtaNetworkManager; 
-      mProperties = lProperties;
-      mSoTimout = Integer.parseInt(lProperties.getProperty(JxtaNetworkManager.SO_TIMEOUT, "10000"));
-      mAdvertisementName = aAdvertisementName;
-  }
-   
-   public void start(long aTimeOut) throws P2pProxyException {
-      // 1 check if connected to a rdv
-      try {
-
-          mStarted = true;
-          mLog.info(mAdvertisementName+" client started");
-      }
-      catch(Exception e) {
-          throw new P2pProxyException(e);
-      }
-  
-   }
-
-
-   public void stop() {
-      try {
-         checkObject();
-         mIn.close();
-         mOut.close();
-         mJxtaSocket.close();
-      }catch (Exception e ) {
-         mLog.error("cannot "+mAdvertisementName+" client" , e);
-      }
-      mLog.info(mAdvertisementName+" client stopped");
-    }
-
-   protected void checkSocketConnection() throws  IOException, P2pProxyException, InterruptedException {
-      //wo because close not sent
-      if (mJxtaSocket != null) mJxtaSocket.close();
-      
-      if (mJxtaSocket == null ||mJxtaSocket.isClosed() || mJxtaSocket.isBound() == false) {
-         try {
-            mLog.info("Opening socket for ["+mAdvertisementName+"]");
-            // try from local
-            mJxtaSocket = mJxtaNetworkManager.openSocket(null, mAdvertisementName, mSoTimout,true);
-         } catch (P2pProxyException e) {
-            //last chance
-            mLog.warn("cannot open socket ["+mAdvertisementName+"], trying from remote",e);
-            mJxtaSocket = mJxtaNetworkManager.openSocket(null, mAdvertisementName, mSoTimout,false);
-         }
-         if (mJxtaSocket == null) throw new P2pProxyException("Cannot start"+mAdvertisementName+" client  because cannot bind jxta socket"); 
-         mOut = new ObjectOutputStream(mJxtaSocket.getOutputStream());
-         mIn = new ObjectInputStream(mJxtaSocket.getInputStream());
-         //just to work-around socket establishment
-         mIn.readBoolean();
-      }
-
-   }
-
-   protected void checkObject() throws P2pProxyException{
-      if(!mStarted) throw new P2pProxyException(mAdvertisementName+" client not started");
-   }
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/GenericUdpSession.java b/p2pproxy/src/org/linphone/p2pproxy/core/GenericUdpSession.java
deleted file mode 100644 (file)
index f5fab0a..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-GenericUdpSession.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core;
-
-
-import java.net.DatagramPacket;
-import java.net.DatagramSocket;
-import java.net.InetSocketAddress;
-
-import java.net.SocketException;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.List;
-
-
-
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.core.media.jxtaudpproxy.UdpSession;
-
-public class GenericUdpSession implements Runnable {
-   public interface MessageHandler {
-      public  void onMessage(DatagramPacket lMessage);
-   }
-   private final static Logger mLog = Logger.getLogger(UdpSession.class);   
-   private  final DatagramSocket mLocalSocket;
-   private final Thread mLocalSocketThread;
-
-   private final List<MessageHandler> mMessageHandlerList = new ArrayList<MessageHandler>();
-   private boolean mExit = false;
-   public GenericUdpSession(InetSocketAddress aSocketAddress) throws SocketException, UnknownHostException {
-      mLocalSocket = new DatagramSocket(aSocketAddress);
-      mLocalSocketThread = new Thread(this,"udp session rtp ["+aSocketAddress+"]");
-      mLocalSocketThread.start();
-   }
-   public GenericUdpSession(InetSocketAddress aSocketAddress,MessageHandler aMessageHandler) throws SocketException, UnknownHostException {
-      this(aSocketAddress);
-      mMessageHandlerList.add(aMessageHandler);
-   }
-   public void run() {
-
-       while (mExit != true) {
-           try {
-               byte[] lBuff = new byte[1500];
-               DatagramPacket lDatagramPacket = new DatagramPacket(lBuff,lBuff.length);
-               mLocalSocket.receive(lDatagramPacket);
-                       if (mLog.isInfoEnabled()) mLog.info(mLocalSocket.getLocalAddress().getHostAddress() + ":" + mLocalSocket.getLocalPort() + " datagram received from " + lDatagramPacket.getAddress().getHostAddress() + ":" + lDatagramPacket.getPort());
-               for (MessageHandler lmMessageHandlerList : mMessageHandlerList) {
-                  lmMessageHandlerList.onMessage(lDatagramPacket);
-               }
-           }catch(Exception e) {
-               //nop
-           }
-       }
-       mLog.info("exit from thread ["+mLocalSocketThread+"]");
-
-   }
-
-   public void close() {
-       mExit = true;
-       mLocalSocket.close();
-    }
-
-   public DatagramSocket getSocket() {
-      return mLocalSocket;
-   }
-   public void addMessageHandler(MessageHandler aMessageHandler) {
-      mMessageHandlerList.add(aMessageHandler);
-   }
-
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/JxtaNetworkManager.java b/p2pproxy/src/org/linphone/p2pproxy/core/JxtaNetworkManager.java
deleted file mode 100644 (file)
index 351fc9c..0000000
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-JxtaNetworkManager.java -- connection to a jxta network.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Properties;
-import java.util.StringTokenizer;
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.TimeUnit;
-
-import javax.security.cert.CertificateException;
-
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.core.sipproxy.NetworkResourceAdvertisement;
-import org.linphone.p2pproxy.core.sipproxy.superpeers.P2pUserRegistrationAdvertisement;
-
-
-
-import net.jxta.discovery.DiscoveryEvent;
-import net.jxta.discovery.DiscoveryListener;
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.exception.JxtaException;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-import net.jxta.peer.PeerID;
-import net.jxta.peergroup.NetPeerGroupFactory;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.pipe.InputPipe;
-import net.jxta.pipe.PipeID;
-import net.jxta.pipe.PipeMsgListener;
-import net.jxta.pipe.PipeService;
-import net.jxta.platform.NetworkConfigurator;
-import net.jxta.protocol.ConfigParams;
-import net.jxta.protocol.DiscoveryResponseMsg;
-import net.jxta.protocol.ModuleSpecAdvertisement;
-import net.jxta.protocol.PipeAdvertisement;
-import net.jxta.rendezvous.RendezVousService;
-import net.jxta.socket.JxtaSocket;
-
-
-public class JxtaNetworkManager {
-   public enum Mode  {relay, edge, auto,seeding_server};
-   private  PeerGroup mNetworkPeerGroup;
-   private  RendezVousService mRendezVousService;
-   private final static Logger mLog = Logger.getLogger(JxtaNetworkManager.class);
-   public final static String RDV_CONNECT_TIMEOUT="org.linphone.p2pproxy.JxtaNetworkManager.rdv-connect.timout";
-   public final static String ADV_DISCOVERY_TIMEOUT="org.linphone.p2pproxy.JxtaNetworkManager.adv-discovery.timout";   
-   public final static String MODE="org.linphone.p2pproxy.JxtaNetworkManager.mode";
-   public final static String RELAY_CAPACITY="org.linphone.p2pproxy.JxtaNetworkManager.relay-capacity";
-   public final static String SEEDING_RDV="org.linphone.p2pproxy.JxtaNetworkManager.seeding-rdv.url";
-   public final static String SEEDING_RELAY="org.linphone.p2pproxy.JxtaNetworkManager.seeding-relay.url";
-   public final static String TCP_LISTENING_PORT="org.linphone.p2pproxy.JxtaNetworkManager.tcp.port";
-   public final static String HTTP_LISTENING_PORT="org.linphone.p2pproxy.JxtaNetworkManager.http.port";
-   public final static String HTTP_LISTENING_PUBLIC_ADDRESS="org.linphone.p2pproxy.JxtaNetworkManager.http.listening.public.address";
-   public final static String TCP_LISTENING_PUBLIC_ADDRESS="org.linphone.p2pproxy.JxtaNetworkManager.tcp.listening.public.address";
-   public final static String SEEDING_RDV_URL="org.linphone.p2pproxy.JxtaNetworkManager.seeding-rdv.url-location";
-   public final static String SEEDING_RELAY_URL="org.linphone.p2pproxy.JxtaNetworkManager.seeding-relay.url-location";
-
-   public final static String SO_TIMEOUT="org.linphone.p2pproxy.so-timout";
-   public final static String ENABLE_HTTP_CLIENT="org.linphone.p2pproxy.JxtaNetworkManager.http.client.enable";
-   public static int EDGE_MODE =  NetworkConfigurator.TCP_CLIENT| NetworkConfigurator.RDV_CLIENT | NetworkConfigurator.RELAY_CLIENT;
-   public static int SUPER_PEER_MODE = NetworkConfigurator.RDV_RELAY_PROXY_NODE;
-   final private Properties mProperties;
-   private Mode mMode;
-   public static int ADV_DISCOVERY_TIMEOUT_INT = 15000; 
-   static {
-      System.setProperty("net.jxta.impl.cm.index.rebuild", "true");
-   }
-   /**
-    * @return Returns the mMode.
-    */
-   public Mode getMode() {
-      return mMode;
-   }
-   /**
-    * Create a jxta connection from a given config directory
-    * and connect to a rendez vous perr 
-    * @param aConfigDir a jxta config dir
-    * @param aRdvConnectionTimout time in ms to wait until a succesfull connection to a rdv peer
-    * @throws JxtaException
-    * @throws InterruptedException 
-    * @throws P2pProxyException 
-    * @throws IOException 
-    * @throws URISyntaxException 
-    * @throws CertificateException 
-    */
-   public JxtaNetworkManager(Configurator aProperties,File aConfigDir) throws JxtaException, InterruptedException, P2pProxyException, IOException, URISyntaxException, CertificateException {
-          super();
-          // get configuration
-          //System.setProperty("JXTA_HOME", aConfigDir.getAbsolutePath());
-
-          NetworkConfigurator lNetworkConfigurator;
-          mProperties = aProperties;
-          // set mode
-          mMode = Mode.valueOf(aProperties.getProperty(MODE, Mode.edge.name()));
-          int lMode;
-          if (mMode == Mode.relay || mMode == Mode.seeding_server) {
-                  lMode = SUPER_PEER_MODE;
-          } else {
-                  lMode = EDGE_MODE;
-          }
-          if (aProperties.getProperty(ENABLE_HTTP_CLIENT) != null && Boolean.parseBoolean(aProperties.getProperty(ENABLE_HTTP_CLIENT)) == true) {
-                  lMode = lMode | NetworkConfigurator.HTTP_CLIENT;
-          } 
-
-          lNetworkConfigurator = new NetworkConfigurator(lMode,aConfigDir.toURI());
-
-          if (!lNetworkConfigurator.exists()) {
-                  lNetworkConfigurator.setPeerID(IDFactory.newPeerID(PeerGroupID.defaultNetPeerGroupID));
-                  lNetworkConfigurator.setName(InetAddress.getLocalHost().toString()+" "+aProperties.getProperty(TCP_LISTENING_PORT));
-                  lNetworkConfigurator.setDescription("p2p proxy instance");
-                  lNetworkConfigurator.save();
-          } else {
-                  lNetworkConfigurator.load();
-          }
-          //mode is alway taken from start line
-          lNetworkConfigurator.setMode(lMode);
-          // set sedding host
-          if (aProperties.getProperty(SEEDING_RDV) != null) {
-                  StringTokenizer lSeedingRdvList =  new StringTokenizer(aProperties.getProperty(SEEDING_RDV),"|" );
-                  while (lSeedingRdvList.hasMoreTokens()) {
-                          lNetworkConfigurator.addSeedRendezvous(new URI(lSeedingRdvList.nextToken()));
-                  }
-          }
-          if (aProperties.getProperty(SEEDING_RELAY) != null) {
-                  StringTokenizer lSeedingRelayList =  new StringTokenizer(aProperties.getProperty(SEEDING_RELAY),"|" );
-                  while (lSeedingRelayList.hasMoreTokens()) {
-                          lNetworkConfigurator.addSeedRelay(new URI(lSeedingRelayList.nextToken()));
-                  }
-          }
-
-
-          if (aProperties.getProperty(SEEDING_RDV_URL) != null) {
-                  StringTokenizer lSeedingRdvList =  new StringTokenizer(aProperties.getProperty(SEEDING_RDV_URL),"|" );
-                  while (lSeedingRdvList.hasMoreTokens()) {
-                          lNetworkConfigurator.addRdvSeedingURI(new URI(lSeedingRdvList.nextToken()));
-                  }
-          } else {
-                  lNetworkConfigurator.addRdvSeedingURI("http://seeding.fonis.net/rdv");
-          }
-          if (aProperties.getProperty(SEEDING_RELAY_URL) != null) {
-                  StringTokenizer lSeedingRelayList =  new StringTokenizer(aProperties.getProperty(SEEDING_RELAY_URL),"|" );
-                  while (lSeedingRelayList.hasMoreTokens()) {
-                          lNetworkConfigurator.addRelaySeedingURI(new URI(lSeedingRelayList.nextToken()));
-                  }
-          } else {
-                  lNetworkConfigurator.addRelaySeedingURI("http://seeding.fonis.net/relay");
-          }
-
-          if (aProperties.getProperty(HTTP_LISTENING_PUBLIC_ADDRESS) != null) {
-                  lNetworkConfigurator.setHttpPublicAddress(aProperties.getProperty(HTTP_LISTENING_PUBLIC_ADDRESS), true);
-          }
-
-          // set listening ports
-          if (aProperties.getProperty(HTTP_LISTENING_PORT) != null) {
-                  lNetworkConfigurator.setHttpPort(Integer.parseInt(aProperties.getProperty(HTTP_LISTENING_PORT)));
-          }
-
-          if (aProperties.getProperty(TCP_LISTENING_PUBLIC_ADDRESS) != null) {
-                  lNetworkConfigurator.setTcpPublicAddress(aProperties.getProperty(TCP_LISTENING_PUBLIC_ADDRESS), true);
-                  lNetworkConfigurator.setTcpStartPort(-1);
-                  lNetworkConfigurator.setTcpEndPort(-1);
-          }
-
-          if (aProperties.getProperty(TCP_LISTENING_PORT) != null) {
-                  lNetworkConfigurator.setTcpPort(Integer.parseInt(aProperties.getProperty(TCP_LISTENING_PORT)));
-          }
-
-          // connect to rdv
-          int lRdvConnectionTimout = Integer.parseInt(aProperties.getProperty(RDV_CONNECT_TIMEOUT,"60000"));
-          init(lNetworkConfigurator,lRdvConnectionTimout,mMode);
-
-
-   }
-   /**
-    * @param aProperties use to store pipe ID
-    * @param aNetworkConfigurator jxya native config
-    * @param aConnectTimout rdv connection timeout
-    * @throws JxtaException
-    * @throws InterruptedException
-    * @throws P2pProxyException
-    * @throws IOException
-    * @throws URISyntaxException
-    * @throws CertificateException
-    */
-   public JxtaNetworkManager(Configurator aProperties, NetworkConfigurator aNetworkConfigurator,int aConnectTimout,Mode aMode) throws JxtaException, InterruptedException, P2pProxyException, IOException, URISyntaxException, CertificateException {
-      mProperties = aProperties;
-      mMode  = aMode;
-      init(aNetworkConfigurator,aConnectTimout,aMode);
-   }
-   private void init(NetworkConfigurator aNetworkConfigurator,int aConnectTimout, Mode aMode) throws JxtaException, InterruptedException, P2pProxyException, IOException, URISyntaxException, CertificateException {
-      // connect to rdv
-      if (mProperties.getProperty(ADV_DISCOVERY_TIMEOUT) != null) {
-         ADV_DISCOVERY_TIMEOUT_INT = Integer.parseInt(mProperties.getProperty(ADV_DISCOVERY_TIMEOUT));
-      }
-      NetPeerGroupFactory lFactory  = new NetPeerGroupFactory((ConfigParams) aNetworkConfigurator.getPlatformConfig(),aNetworkConfigurator.getHome().toURI());
-      mNetworkPeerGroup = lFactory.getInterface();
-      
-      // The following step is required and only need to be done once,
-      // without this step the AdvertisementFactory has no means of
-      // associating an advertisement name space with the proper object
-      // in this cast the AdvertisementTutorial
-      AdvertisementFactory.registerAdvertisementInstance(P2pUserProfileAdvertisement.getAdvertisementType(),new P2pUserProfileAdvertisement.Instantiator());
-      AdvertisementFactory.registerAdvertisementInstance(P2pUserRegistrationAdvertisement.getAdvertisementType(),new P2pUserRegistrationAdvertisement.Instantiator());
-      AdvertisementFactory.registerAdvertisementInstance(NetworkResourceAdvertisement.getAdvertisementType(),new NetworkResourceAdvertisement.Instantiator());
-      
-      mRendezVousService = mNetworkPeerGroup.getRendezVousService();
-      mLog.info("Node PeerID ["+mNetworkPeerGroup.getPeerID()+"]");
-      if ( aMode == Mode.edge && isConnectedToRendezVous(aConnectTimout) == false) {
-         throw new P2pProxyException("Cannot connect to rdv in the last "+aConnectTimout+" ms");
-      }
-      mLog.info("jxta info name ["+mNetworkPeerGroup+"] mode ["+aMode+"] ");
-
-   }
-   public PeerGroup getPeerGroup() {
-      return mNetworkPeerGroup;
-   }
-   
-   public PipeAdvertisement createPipeAdvertisement(String aPipePropertyName,String aPipeName) throws IOException {
-      PipeID lpipeID = null;
-      if (mProperties.getProperty(aPipePropertyName) == null) {
-         lpipeID = IDFactory.newPipeID(PeerGroupID.defaultNetPeerGroupID);
-         mProperties.setProperty(aPipePropertyName, lpipeID.toURI().toString());
-
-      } else {
-         lpipeID = (PipeID) ID.create(URI.create(mProperties.getProperty(aPipePropertyName)));
-      }
-      //create advertisement
-      PipeAdvertisement lAdvertisement = (PipeAdvertisement)AdvertisementFactory.newAdvertisement(PipeAdvertisement.getAdvertisementType());
-      lAdvertisement.setPipeID(lpipeID);
-      lAdvertisement.setType(PipeService.UnicastType);
-      lAdvertisement.setName(aPipeName);
-      mLog.debug("aPipePropertyName pipe:"+lAdvertisement);
-      return lAdvertisement;
-   }
-   
-   public InputPipe createPipe(PipeAdvertisement aPipeAdvertisement,PipeMsgListener aListener) throws IOException {
-      //create pipe
-      return mNetworkPeerGroup.getPipeService().createInputPipe(aPipeAdvertisement, aListener);   
-   }
-   /**
-    * @param aPipePropertyName name use to save/load this pipe ID in the configuration file
-    * @param aPipeName pipe name
-    * @return
-    * @throws IOException
-    */
-   public InputPipe createPipe(String aPipePropertyName,String aPipeName,PipeMsgListener aListener) throws IOException {
-      return createPipe(createPipeAdvertisement(aPipePropertyName,aPipeName),aListener);
-   }   
-   public Advertisement getAdvertisement(String aPeerId, String anAdvertisementName,boolean isTryFromLocal) throws InterruptedException, IOException, P2pProxyAdvertisementNotFoundException {
-      return getAdvertisementList(aPeerId, anAdvertisementName,isTryFromLocal).get(0);
-   }      
-   
-   /**
-    * seach advervitisement indexed by attribute "Name"
-    * @param aPeerId
-    * @param anAdvertisementName
-    * @param isTryFromLocal
-    * @return
-    * @throws InterruptedException
-    * @throws IOException
-    * @throws P2pProxyAdvertisementNotFoundException
-    */
-   public  List<? extends Advertisement> getAdvertisementList(String aPeerId, String anAdvertisementName,boolean isTryFromLocal) throws InterruptedException, IOException, P2pProxyAdvertisementNotFoundException {
-      return getAdvertisementList(aPeerId, "Name",anAdvertisementName, isTryFromLocal);
-   }
-   
-   public  List<? extends Advertisement> getAdvertisementList(String aPeerId, String anAttributeName,String anAttributeValue, boolean isTryFromLocal) throws InterruptedException, IOException, P2pProxyAdvertisementNotFoundException {
-          return getAdvertisementList(aPeerId, anAttributeName, anAttributeValue, isTryFromLocal, 1);
-   }
-   public  List<? extends Advertisement> getAdvertisementList(String aPeerId, String anAttributeName,String anAttributeValue, boolean isTryFromLocal, int numberOfexpectedAdv) throws InterruptedException, IOException, P2pProxyAdvertisementNotFoundException {
-      DiscoveryService lDiscoveryService = getPeerGroup().getDiscoveryService();
-      final Semaphore lSemaphore = new Semaphore(1-numberOfexpectedAdv);
-      final List<Advertisement> lReturnList = new ArrayList<Advertisement>();
-      DiscoveryListener lDiscoveryListener = new DiscoveryListener() {
-         
-         public void discoveryEvent(DiscoveryEvent event) {
-            DiscoveryResponseMsg lRes = event.getResponse();
-            int lOrigListSize = lReturnList.size();
-            enumeration2List(lRes.getAdvertisements(), lReturnList);
-            lSemaphore.release(lReturnList.size()-lOrigListSize);
-         }
-         
-      };
-      if (isTryFromLocal == true) {
-         mLog.info("looking for advertisement indexing with  ["+ anAttributeName+"="+anAttributeValue+"]");
-         Enumeration lEnumeration = lDiscoveryService.getLocalAdvertisements(DiscoveryService.ADV, anAttributeName,anAttributeValue);
-         enumeration2List(lEnumeration, lReturnList);
-      }
-      if (lReturnList.size() < numberOfexpectedAdv) {
-         mLog.info(lReturnList.size() +" of ["+numberOfexpectedAdv+"] advertisements found in local, trying remote...");
-         lDiscoveryService.getRemoteAdvertisements(aPeerId, DiscoveryService.ADV, anAttributeName,anAttributeValue, 10,lDiscoveryListener);
-         if (lSemaphore.tryAcquire(ADV_DISCOVERY_TIMEOUT_INT,TimeUnit.MILLISECONDS) == false && lReturnList.isEmpty()) {
-            throw new P2pProxyAdvertisementNotFoundException( anAttributeName+"="+anAttributeValue+ " not found");
-         }
-         lSemaphore.release();
-      }
-     if (mLog.isInfoEnabled() && mLog.isDebugEnabled() == false) mLog.info(lReturnList.get(0).toString());
-     for (Advertisement lAdvertisement :lReturnList) {
-        mLog.debug(lAdvertisement.toString());
-     }
-      return lReturnList;  
-   }
-   public JxtaSocket openSocket(String aPeerId, String anAdvertisementName,int aSocketTimout,boolean isTryFromLocal) throws InterruptedException, P2pProxyException, IOException {
-      List<ModuleSpecAdvertisement> lModuleSpecAdvertisementList;
-      lModuleSpecAdvertisementList = (List<ModuleSpecAdvertisement>) getAdvertisementList(aPeerId, anAdvertisementName, isTryFromLocal);
-      // reset just in case
-      JxtaSocket lJxtaSocket = null;
-      for (int i=0; i < lModuleSpecAdvertisementList.size(); i++) {
-         try {
-            lJxtaSocket = new JxtaSocket(getPeerGroup(), null, lModuleSpecAdvertisementList.get(i).getPipeAdvertisement(), aSocketTimout, true);
-            // ok, socket connected :-)
-            mLog.info("socket ["+lJxtaSocket+"] connected");
-            break;
-         }catch (IOException e) {
-            mLog.warn("cannot open socket, for index ["+i+"]  try next from ["+lModuleSpecAdvertisementList.size()+"]", e);
-            mLog.debug("bad adv "+lModuleSpecAdvertisementList.get(i).getPipeAdvertisement().toString());
-         }
-      }
-      if (lJxtaSocket == null) {
-         throw new P2pProxyException("Cannot start peer info service because cannot bind jxta socket"); 
-      } else {
-         return lJxtaSocket;
-      }
-
-}
-   /**
-    * check if connected to an rdv for aTimeout
-    * @param aTimeout
-    * @return true if connected else false
-    * @throws InterruptedException
-    */
-   public boolean isConnectedToRendezVous(long aTimeout) throws InterruptedException{
-      long lStartTime = System.currentTimeMillis();
-      boolean lExit = false;
-      while(lExit == false) {
-         if (mRendezVousService.isConnectedToRendezVous() ) {
-            ID lRdvPeerId = (ID)getPeerGroup().getRendezVousService().getConnectedRendezVous().nextElement();
-            mLog.info("Connected to rdv   ["+lRdvPeerId+"]");
-            lExit=true;
-         } else {
-            if (System.currentTimeMillis() - lStartTime > aTimeout) {
-               return  false;
-            }
-            mLog.info("waiting to rdv connection");
-            Thread.sleep(500);
-         }
-
-      }
-      return true;      
-   }
-   public void stop() {
-      mNetworkPeerGroup.stopApp();
-      //mNetworkPeerGroup.unref();
-   }
-   private List<Advertisement> enumeration2List(Enumeration<Advertisement> lEnumeration,List<Advertisement> aList) {
-      if (aList == null) {
-         aList = new ArrayList<Advertisement>();
-      }
-      while (lEnumeration.hasMoreElements()) {
-         Advertisement lNewAdv =  lEnumeration.nextElement();
-         //1 check if already exist
-         for (Advertisement lAdv: aList) {
-                 if (lAdv.equals(lNewAdv)) {
-                         if (mLog.isInfoEnabled()) mLog.info("adv ["+lNewAdv.getID()+"]already gathered");
-                         if (mLog.isDebugEnabled()) mLog.debug(lNewAdv);
-                         lNewAdv = null;
-                         break;
-                 }
-         }
-         
-         if (lNewAdv != null) {
-                 aList.add((lNewAdv)) ;
-         }
-       }
-      return aList;
-   }
-//   private List<PeerID> getRdvPeers() {
-//   
-//        
-//   }
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/MessageDispatcher.java b/p2pproxy/src/org/linphone/p2pproxy/core/MessageDispatcher.java
deleted file mode 100644 (file)
index 21f4002..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-MessageDispatcher.java 
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-
-import net.jxta.pipe.PipeMsgEvent;
-import net.jxta.pipe.PipeMsgListener;
-
-/**
- * 
- * @author jehan
- *
- */
-public class MessageDispatcher implements PipeMsgListener {
-       private final static Logger mLog = Logger.getLogger(MessageDispatcher.class);
-
-       private List<PipeMsgListener> mPipeMsgListenerList = Collections.synchronizedList(new ArrayList<PipeMsgListener>());
-       
-       public void pipeMsgEvent(PipeMsgEvent event) {
-               synchronized (this) {
-                       mLog.debug("receiving event with message ["+event.getMessage()+"] propagating to ["+mPipeMsgListenerList.size()+"]");
-                       for (PipeMsgListener lPipeMsgListener:mPipeMsgListenerList) {
-                               lPipeMsgListener.pipeMsgEvent(event);
-                       }
-               }
-       }
-       public synchronized void addPipeMsgListener(PipeMsgListener aPipeMsgListener) {
-               mPipeMsgListenerList.add(aPipeMsgListener);
-       }
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/P2pProxyAccountManagement.java b/p2pproxy/src/org/linphone/p2pproxy/core/P2pProxyAccountManagement.java
deleted file mode 100644 (file)
index 117fac4..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-P2pProxyAccountManagement.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core;
-
-
-import java.io.IOException;
-import java.util.List;
-
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.api.P2pProxyUserNotFoundException;
-
-import org.linphone.p2pproxy.api.P2pProxyUserAlreadyExistException;
-
-public class P2pProxyAccountManagement implements ServiceProvider, P2pProxyAccountManagementMBean {
-   private final static Logger mLog = Logger.getLogger(P2pProxyAccountManagement.class);
-   protected final JxtaNetworkManager mJxtaNetworkManager;
-   
-   public P2pProxyAccountManagement() {
-      mJxtaNetworkManager = null;
-   }
-   /**
-    * @param jxtaNetworkManager
-    */
-   public P2pProxyAccountManagement(final JxtaNetworkManager jxtaNetworkManager) {
-      super();
-      mJxtaNetworkManager = jxtaNetworkManager;
-   }
-
-   public void start(long aTimeOut) throws P2pProxyException {
-     mLog.info("P2pProxyAccountManagementMBean started");
-   }
-
-   public void stop() {
-      mLog.info("P2pProxyAccountManagementMBean stopped");
-   }
-
-   public void createAccount(String aUserName) throws P2pProxyException, P2pProxyUserAlreadyExistException {
-      // 1 check if already exist
-      if (isValidAccount(aUserName) == false) {
-         
-         // 2 creates and remote publish
-         P2pUserProfileAdvertisement lP2pUserProfileAdvertisement = (P2pUserProfileAdvertisement) AdvertisementFactory.newAdvertisement(P2pUserProfileAdvertisement.getAdvertisementType());
-         
-         lP2pUserProfileAdvertisement.setID(IDFactory.newCodatID(mJxtaNetworkManager.getPeerGroup().getPeerGroupID()));
-         lP2pUserProfileAdvertisement.setUserName(aUserName);
-         try {
-            mJxtaNetworkManager.getPeerGroup().getDiscoveryService().publish(lP2pUserProfileAdvertisement,DiscoveryService.INFINITE_LIFETIME,DiscoveryService.DEFAULT_EXPIRATION);
-         } catch (IOException e1) {
-            throw new P2pProxyException(e1);
-         }
-         mJxtaNetworkManager.getPeerGroup().getDiscoveryService().remotePublish(lP2pUserProfileAdvertisement, DiscoveryService.NO_EXPIRATION);
-         mLog.debug("publishing P2pUserProfileAdvertisement :"+lP2pUserProfileAdvertisement);
-      } else {
-         throw new P2pProxyUserAlreadyExistException(aUserName);
-      }
-      
-   }
-
-   public void deleteAccount(String aUserName) throws P2pProxyException, P2pProxyUserNotFoundException {
-      // 1 check if already exist
-      try {
-         List<? extends Advertisement> lAdvertisements = mJxtaNetworkManager.getAdvertisementList(null, P2pUserProfileAdvertisement.USER_NAME_TAG, aUserName, true);
-         if (lAdvertisements.isEmpty()) throw new P2pProxyUserNotFoundException (aUserName +" not found");
-         
-         // 2 local and remote publish to 0
-         mJxtaNetworkManager.getPeerGroup().getDiscoveryService().flushAdvertisement(lAdvertisements.get(0));
-         mJxtaNetworkManager.getPeerGroup().getDiscoveryService().remotePublish(lAdvertisements.get(0), 0);
-      } catch (P2pProxyAdvertisementNotFoundException e) {
-         throw e;
-     } catch (InterruptedException e) {
-         throw new P2pProxyException(e);
-      } catch (IOException e) {
-         throw new P2pProxyException(e);
-      }
-      
-   }
-
-   public boolean isValidAccount(String aUserName) throws P2pProxyException {
-      boolean lStatus = false;
-      try {
-         if (mJxtaNetworkManager.getAdvertisementList(null, P2pUserProfileAdvertisement.USER_NAME_TAG, aUserName, true).size() >0 ) {
-            lStatus = true;;
-         }
-      } catch (P2pProxyAdvertisementNotFoundException e) {
-         lStatus = false;
-      }catch (Exception e) {
-         mLog.error("cannot check acount",e);
-      }
-      return lStatus;
-   }
-
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/P2pProxyAccountManagementMBean.java b/p2pproxy/src/org/linphone/p2pproxy/core/P2pProxyAccountManagementMBean.java
deleted file mode 100644 (file)
index a36dc98..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-P2pProxyAccountManagementMBean.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core;
-
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.api.P2pProxyUserAlreadyExistException;
-
-public interface P2pProxyAccountManagementMBean {
-   /**
-    * a create an account with the given name (must be unique)
-    * @param aUserName
-    * @exception P2pProxyUserAlreadyExistException 
-    * @throws P2pProxyException 
-    */
-   public void createAccount(String aUserName) throws P2pProxyUserAlreadyExistException, P2pProxyException;
-   /**
-    * check if a user name has been already created
-    * @param aUserName
-    * @return true if the account has been successfully created
-    * @exception P2pProxyUserAlreadyExistException 
-    * @throws P2pProxyException 
-    */
-   public boolean isValidAccount(String aUserName) throws P2pProxyException;
-
-   /**
-    * delete an account with the given name (must be unique)
-    * @param aUserName
-    * @exception P2pProxyUserAlreadyExistException 
-    */
-   public void deleteAccount(String aUserName) throws P2pProxyException;
-   }
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/P2pProxyAdvertisementNotFoundException.java b/p2pproxy/src/org/linphone/p2pproxy/core/P2pProxyAdvertisementNotFoundException.java
deleted file mode 100644 (file)
index d35cf3f..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-P2pProxyAdvertisementNotFoundException.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core;
-
-import org.linphone.p2pproxy.api.P2pProxyException;
-
-@SuppressWarnings("serial")
-public class P2pProxyAdvertisementNotFoundException extends P2pProxyException {
-
-   /**
-    * 
-    */
-   public P2pProxyAdvertisementNotFoundException() {
-      super();
-   }
-
-   /**
-    * @param arg0
-    * @param arg1
-    */
-   public P2pProxyAdvertisementNotFoundException(String arg0, Throwable arg1) {
-      super(arg0, arg1);
-   }
-
-   /**
-    * @param arg0
-    */
-   public P2pProxyAdvertisementNotFoundException(String arg0) {
-      super(arg0);
-   }
-
-   /**
-    * @param arg0
-    */
-   public P2pProxyAdvertisementNotFoundException(Throwable arg0) {
-      super(arg0);
-   }
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/P2pProxyInstanceImpl.java b/p2pproxy/src/org/linphone/p2pproxy/core/P2pProxyInstanceImpl.java
deleted file mode 100644 (file)
index 9598ba2..0000000
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-P2pProxyInstanceImpl.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core;
-
-
-import java.io.File;
-import java.net.InetAddress;
-import java.net.URI;
-import java.net.UnknownHostException;
-import java.util.Enumeration;
-import java.util.Properties;
-
-import net.jxta.id.IDFactory;
-import net.jxta.peergroup.PeerGroupID;
-import net.jxta.platform.NetworkConfigurator;
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.api.P2pProxyInstance;
-import org.linphone.p2pproxy.api.P2pProxyManagement;
-import org.linphone.p2pproxy.api.P2pProxyNetworkProbe;
-import org.linphone.p2pproxy.api.P2pProxyRtpRelayManagement;
-import org.linphone.p2pproxy.core.sipproxy.SipProxyRegistrar;
-import org.zoolu.net.SocketAddress;
-import org.zoolu.sip.provider.SipProvider;
-
-
-public class P2pProxyInstanceImpl implements P2pProxyInstance {
-   private final static Logger mLog = Logger.getLogger(P2pProxyInstance.class);
-   private static int BASE_PROXY_SIP_PORT = 6000;
-   private static int BASE_CLIENT_SIP_PORT = 8000;
-   int mIndex=0;
-   private Mode mMode = Mode.edge ;
-   boolean isStarted = false;
-   boolean isRevoked = false;
-   JxtaNetworkManager mJxtaNetworkManager;
-   SipProxyRegistrar mSipProxy;
-   SipProvider mProviderForSipClient;
-   String mSipClientName;
-   String mPrivateHostAddress;
-   String mPublicHostAddress ;   
-   private ServiceProvider mServiceProvider;
-   private P2pProxyManagement mP2pProxyManagement;
-   private P2pProxyAccountManagementMBean mP2pProxyAccountManagement;
-   private int mRelayCapacity=4;
-   private Configurator mConfigurator;
-   private Properties startupProperties = new Properties();
-   public P2pProxyInstanceImpl () {
-             
-   }
-    /* (non-Javadoc)
-    * @see org.linphone.p2pproxy.P2pProxyInstance#getIndex()
-    */
-   public int getIndex() {
-      return mIndex;
-   }
-   /* (non-Javadoc)
-    * @see org.linphone.p2pproxy.P2pProxyInstance#setIndex(int)
-    */
-   public void setIndex(int index) {
-      mIndex = index;
-   }
-   /* (non-Javadoc)
-    * @see org.linphone.p2pproxy.P2pProxyInstance#start()
-    */
-   public void start() throws Exception{
-      Thread lThread = new Thread() {
-         public void run() {
-            try {
-               File lJxtaDirectory = new File ("P2pNetwork-"+getMode()+"-"+mIndex);
-               if (lJxtaDirectory.exists() == false) lJxtaDirectory.mkdir();
-               mConfigurator = new Configurator(new File (lJxtaDirectory.getAbsolutePath()+"/prop.xml"));  
-               mConfigurator.serProperties(P2pProxyInstanceImpl.this.startupProperties);
-               mConfigurator.setProperty(JxtaNetworkManager.RELAY_CAPACITY, String.valueOf(mRelayCapacity));
-               // setup jxta network
-               NetworkConfigurator lNetworkConfigurator;
-               // set mode
-               lNetworkConfigurator = new NetworkConfigurator(JxtaNetworkManager.EDGE_MODE,lJxtaDirectory.toURI());
-               lNetworkConfigurator.setHome(lJxtaDirectory);
-               if (!lNetworkConfigurator.exists()) {
-                  lNetworkConfigurator.setPeerID(IDFactory.newPeerID(PeerGroupID.defaultNetPeerGroupID));
-                  lNetworkConfigurator.setDescription("p2p proxy instance");
-                  lNetworkConfigurator.save();
-               } else {
-                  lNetworkConfigurator.load();
-               }
-              // set sedding host
-                  lNetworkConfigurator.addSeedRendezvous(new URI("tcp://"+getPublicHostAddress()+":"+BASE_TCP));
-                  lNetworkConfigurator.addSeedRelay(new URI("tcp://"+getPublicHostAddress()+":"+BASE_TCP));
-               // set listening ports
-//                  lNetworkConfigurator.setTcpInterfaceAddress(getPrivateHostAddress());
-//                  lNetworkConfigurator.setHttpInterfaceAddress(getPrivateHostAddress());
-//                  lNetworkConfigurator.setHttpPort(BASE_HTTP + mIndex);
-                  lNetworkConfigurator.setTcpPort(BASE_TCP + mIndex);
-               
-                  switch (mMode) {
-                  case edge:
-                     startEdge(mConfigurator,lNetworkConfigurator);
-                     break;
-                  case relay:
-                     startRelay(mConfigurator,lNetworkConfigurator,false);
-                     break;
-                  case seeding_server:
-                     startRelay(mConfigurator,lNetworkConfigurator,true);
-                     break;
-                  case auto:
-                     //1 start edge 
-                     startEdge(mConfigurator,lNetworkConfigurator);
-                     // check if peer mode required
-                     if (mP2pProxyManagement.shouldIBehaveAsAnRdv() == true) {
-                        String lPublicHttpAddress = mP2pProxyManagement.getPublicIpAddress().getHostAddress();
-                        
-                        lNetworkConfigurator.setHttpPublicAddress(lPublicHttpAddress+":"+(BASE_HTTP + mIndex), true);
-                        mServiceProvider.stop();
-                        mJxtaNetworkManager.stop();
-                        
-                        startRelay(mConfigurator,lNetworkConfigurator,false);
-                        // become relay
-                        mMode = Mode.relay;
-                     } else {
-                        mMode = Mode.edge;
-                     }
-                     break;
-                  default:
-                     throw new Exception("unsupported mode ["+mMode+"]");
-                  }
-               mConfigurator.setProperty(SipProxyRegistrar.REGISTRAR_PORT,Integer.toString(BASE_PROXY_SIP_PORT+mIndex));
-               // setup sip proxy
-               mP2pProxyAccountManagement = new P2pProxyAccountManagement(mJxtaNetworkManager);
-               mSipProxy = new SipProxyRegistrar(mConfigurator,mJxtaNetworkManager,mP2pProxyAccountManagement);
-               // setup sip client                
-               mProviderForSipClient = new SipProvider(getPrivateHostAddress(),BASE_CLIENT_SIP_PORT+mIndex);
-               mProviderForSipClient.setOutboundProxy(new SocketAddress(getPrivateHostAddress(),BASE_PROXY_SIP_PORT+mIndex));
-               mSipClientName="sip:user-"+mIndex+"@p2pproxy.linphone.org";
-
-               
-               mLog.info(P2pProxyInstanceImpl.this+" started ");
-               isStarted = true;
-            } catch (Exception e) {
-               mLog.error(P2pProxyInstanceImpl.this+" cannot be started",e);
-               isRevoked = true;
-            }
-         }
-      };
-      lThread.start();
-   }
-   public boolean isStarted() throws P2pProxyException{
-      if (isRevoked == true)  {
-         throw new P2pProxyException("cannot start " + this.toString() );
-      } else {
-         return isStarted;
-      }
-   }
-   public SipProvider getSipClientProvider() {
-      return mProviderForSipClient;
-   }
-   
-   public String toString() {
-      return "p2p instance ["+mIndex+"] mode ["+mMode+"] sip port ["+BASE_PROXY_SIP_PORT+mIndex+"]";
-   }
-   public String getSipClientName() {
-      return mSipClientName;
-   }
-   public void stop() throws Exception {
-      mProviderForSipClient.halt();
-      //mSipProxy.halt();
-      mJxtaNetworkManager.stop();
-   }
-   public int getNumberOfconnectedPeers() {
-     Enumeration lConnectedPeers = mJxtaNetworkManager.getPeerGroup().getRendezVousService().getConnectedPeers();
-     int lResult = 0;
-     while (lConnectedPeers.hasMoreElements()) {
-        lResult++;
-        lConnectedPeers.nextElement();
-        }
-     return lResult;
-   }
-   public Object getOpaqueNetworkManager() {
-      return mJxtaNetworkManager;
-   }
-   /**
-    * @return Returns the mHostAddress.
-    * @throws UnknownHostException 
-    */
-   public String getPrivateHostAddress() throws UnknownHostException {
-      if (mPrivateHostAddress == null) {
-         mPrivateHostAddress = InetAddress.getLocalHost().getHostAddress();
-      }
-      return mPrivateHostAddress;
-   }
-   public String getPublicHostAddress() throws UnknownHostException {
-      if (mPublicHostAddress == null) {
-         mPublicHostAddress = InetAddress.getLocalHost().getHostAddress();
-      }
-      return mPublicHostAddress;
-   }
-
-   public void setPrivateHostAdress(String anAddress) {
-      mPrivateHostAddress = anAddress; 
-   }
-   public void setPublicHostAdress(String anAddress) {
-      mPublicHostAddress = anAddress;
-   }
-   public P2pProxyNetworkProbe getManager() {
-      return (P2pProxyNetworkProbe)mServiceProvider;
-   }
-   public Mode getMode() {
-      return mMode;
-   }
-   public void setMode(Mode aMode) {
-      mMode = aMode;
-   }
-   private  void startEdge(Configurator aProperties,NetworkConfigurator aNetworkConfigurator) throws Exception{
-      // setup jxta
-      aNetworkConfigurator.setMode(JxtaNetworkManager.EDGE_MODE);
-      aNetworkConfigurator.setHttpEnabled(true);
-      aNetworkConfigurator.setHttpOutgoing(true);
-
-      mJxtaNetworkManager = new JxtaNetworkManager(aProperties,aNetworkConfigurator,60000,JxtaNetworkManager.Mode.edge);
-      mServiceProvider = new EdgePeerServiceManager(aProperties, mJxtaNetworkManager);
-      mP2pProxyManagement = (P2pProxyManagement) mServiceProvider;
-      mServiceProvider.start(3000L);
-   }
-
-   private  void startRelay(Configurator aProperties,NetworkConfigurator aNetworkConfigurator,boolean isSeeding) throws Exception{
-      // setup jxta
-      aNetworkConfigurator.setMode(JxtaNetworkManager.SUPER_PEER_MODE);
-      if (isSeeding == true) {
-         mJxtaNetworkManager = new JxtaNetworkManager(aProperties,aNetworkConfigurator,60000,JxtaNetworkManager.Mode.seeding_server);
-         mServiceProvider = new SeedingPeerServiceManager(aProperties, mJxtaNetworkManager,true);
-         mP2pProxyManagement = null;
-      } else {
-         mJxtaNetworkManager = new JxtaNetworkManager(aProperties,aNetworkConfigurator,60000,JxtaNetworkManager.Mode.relay);
-         mServiceProvider = new SuperPeerServiceManager(aProperties, mJxtaNetworkManager);
-         mP2pProxyManagement = (P2pProxyManagement) mServiceProvider;
-      }
-      mServiceProvider.start(3000L);
-   }
-   public void setRelayCapacity(int aCapacity) {
-      mRelayCapacity = aCapacity;
-      
-   }
-   public void setProperty(String key, String value) throws P2pProxyException {
-      if (mConfigurator == null) {
-         startupProperties.setProperty(key, value);
-      } else {
-         throw new P2pProxyException(" started");
-      }
-   }
-   public int getAdvertisementDiscoveryTimeout() {
-      return JxtaNetworkManager.ADV_DISCOVERY_TIMEOUT_INT;
-   }
-   public P2pProxyRtpRelayManagement getRtpRelayManager() {
-      return (P2pProxyRtpRelayManagement)mServiceProvider;
-   }
-}
\ No newline at end of file
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/P2pProxyMain.java b/p2pproxy/src/org/linphone/p2pproxy/core/P2pProxyMain.java
deleted file mode 100644 (file)
index 82f15fc..0000000
+++ /dev/null
@@ -1,520 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-P2pProxyMain.java - main class.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core;
-
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-import java.lang.management.ManagementFactory;
-import java.util.InvalidPropertiesFormatException;
-import java.util.Properties;
-import java.util.concurrent.Callable;
-import java.util.concurrent.Future;
-
-import javax.management.ObjectName;
-
-import net.jxta.exception.JxtaException;
-import org.apache.log4j.Logger;
-import org.apache.log4j.PropertyConfigurator;
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.api.P2pProxyManagement;
-import org.linphone.p2pproxy.api.P2pProxyNotReadyException;
-import org.linphone.p2pproxy.api.P2pProxyResourceManagement;
-import org.linphone.p2pproxy.api.P2pProxyUserAlreadyExistException;
-import org.linphone.p2pproxy.core.media.MediaResourceService;
-import org.linphone.p2pproxy.core.sipproxy.SipProxyRegistrar;
-import org.linphone.p2pproxy.core.utils.Excecutor;
-import org.zoolu.sip.provider.SipStack;
-import org.linphone.p2pproxy.launcher.P2pProxylauncherConstants;
-
-public class P2pProxyMain  implements P2pProxyMainMBean {
-   private  static Logger mLog = null;
-   private  static JxtaNetworkManager mJxtaNetworkManager;
-   private  static ServiceProvider mServiceProvider;
-   private  static P2pProxyManagement mP2pProxyManagement;
-   private  static SipProxyRegistrar mSipAndPipeListener;
-   private static P2pProxyAccountManagementMBean mP2pProxyAccountManagement;
-   private static P2pProxyResourceManagement mP2pProxySipProxyRegistrarManagement;
-   public final static String ACCOUNT_MGR_MBEAN_NAME="org.linphone.p2proxy:type=account-manager";
-   public final static String PROXY_REG_MBEAN_NAME="org.linphone.p2proxy:type=proxy-registrar";
-   public final static String MAIN_MBEAN_NAME="org.linphone.p2proxy:type=main";
-   private static P2pProxyMain mP2pProxyMain = new P2pProxyMain();
-   private static Configurator mConfigurator;
-   private static String mConfigHomeDir;
-   static private boolean mExit = false;
-   static private boolean isReady = false;
-   
-   
-   
-   static {
-//      System.setProperty("com.sun.management.jmxremote", "true");
-//      System.setProperty("com.sun.management.jmxremote.port", "6789");
-//      System.setProperty("com.sun.management.jmxremote.authenticate", "false");
-//      System.setProperty("com.sun.management.jmxremote.ssl", "false");
-   }
-
-   /**
-    * @param args
-    * @throws P2pProxyException 
-    * @throws InterruptedException 
-    * @throws JxtaException 
-    * @throws IOException 
-    * @throws FileNotFoundException 
-    * @throws InvalidPropertiesFormatException 
-    */
-   public static void main(String[] args) {
-          try {
-                  mConfigHomeDir=System.getProperty("user.home")+"/.p2pproxy";
-                  int lsipPort=5040;
-                  int lMediaPort=MediaResourceService.AUDIO_VIDEO_LOCAL_PORT_DEFAULT_VALUE;
-                  int lP2pPort = 9701;
-                  JxtaNetworkManager.Mode lMode = JxtaNetworkManager.Mode.auto;
-                  // setup logging
-
-                  // get config dire first
-                  for (int i=0; i < args.length; i=i+2) {  
-                          String argument = args[i];
-                          if (argument.equals("-jxta")) {
-                                  mConfigHomeDir = args[i + 1];
-                                  File lFile = new File(mConfigHomeDir);
-                                  if (lFile.exists() == false) lFile.mkdir();
-                                
-                                  System.out.println("mConfigHomeDir detected[" + mConfigHomeDir + "]");
-                          } 
-                  }
-                  System.setProperty("org.linphone.p2pproxy.home", mConfigHomeDir);
-                 
-                  
-                  System.setProperty("net.jxta.logging.Logging", "FINEST");
-                  System.setProperty("net.jxta.level", "FINEST");
-                  
-                  mP2pProxyMain.loadTraceConfigFile();
-                  
-                  
-                  
-                  mLog.info("p2pproxy initilizing...");
-
-                  File lPropertyFile =  new File(mConfigHomeDir+"/p2pproxy.properties.xml");
-                  mConfigurator = new Configurator(lPropertyFile);
-                  try {
-                          ObjectName lObjectName = new ObjectName(MAIN_MBEAN_NAME);
-                          ManagementFactory.getPlatformMBeanServer().registerMBean(mP2pProxyMain,lObjectName);
-
-
-                  } catch (Exception e) {
-                          mLog.warn("cannot register MBean",e);
-                  }         
-       
-                  // get other params
-                  for (int i=0; i < args.length; i=i+2) {  
-                          String argument = args[i];
-                          if (argument.equals("-jxta") || argument.equals("-home")) {
-                                  mConfigHomeDir = args[i + 1];
-                                  //nop
-                          } else if (argument.equals("-sip")) {
-                                  lsipPort = Integer.parseInt(args[i + 1]);
-                                  System.out.println("sipPort detected[" + lsipPort + "]");
-                                  mConfigurator.setProperty(SipProxyRegistrar.REGISTRAR_PORT, Integer.toString(lsipPort));
-                          } else if (argument.equals("-media")) {
-                  lMediaPort = Integer.parseInt(args[i + 1]);
-                  System.out.println("media detected[" + lMediaPort + "]");
-                  mConfigurator.setProperty(MediaResourceService.AUDIO_VIDEO_LOCAL_PORT, Integer.toString(lMediaPort));
-              } else if (argument.equals("-p2p")) {
-                  lP2pPort = Integer.parseInt(args[i + 1]);
-                  System.out.println("p2p port detected[" + lP2pPort + "]");
-                  mConfigurator.setProperty(JxtaNetworkManager.TCP_LISTENING_PORT, Integer.toString(lP2pPort));
-              } else if (argument.equals("-relay")) {
-                                  lMode = JxtaNetworkManager.Mode.relay;
-                                  mConfigurator.setProperty(JxtaNetworkManager.MODE, lMode.name());
-                                  System.out.println("relay mode detected");
-                                  i--;
-                          } else if (argument.equals("-edge-only")) {
-                                  lMode = JxtaNetworkManager.Mode.edge;
-                                  mConfigurator.setProperty(JxtaNetworkManager.MODE, lMode.name());
-                                  System.out.println("edge only mode detected");
-                                  i--;
-                          }else if (argument.equals("-seeding-server")) {
-                                  lMode = JxtaNetworkManager.Mode.seeding_server;
-                                  mConfigurator.setProperty(JxtaNetworkManager.MODE, lMode.name());
-                                  System.out.println("seeding-server  detected");
-                                  i--;
-                          } else if (argument.equals("-auto-config")) {
-                                  lMode = JxtaNetworkManager.Mode.auto;
-                                  mConfigurator.setProperty(JxtaNetworkManager.MODE, lMode.name());
-                                  System.out.println("auto-mode mode detected");
-                                  i--;
-                          }  else if (argument.equals("-seeding-rdv")) {
-                                  mConfigurator.setProperty(JxtaNetworkManager.SEEDING_RDV, args[i + 1]);
-                                  System.out.println("seeding rdv detected[" + args[i + 1] + "]");
-                          }
-                          else if (argument.equals("-seeding-relay")) {
-                                  mConfigurator.setProperty(JxtaNetworkManager.SEEDING_RELAY, args[i + 1]);
-                                  System.out.println("seeding relay detected[" + args[i + 1] + "]");
-                          }  else if (argument.equals("-seeding")) {
-                                  mConfigurator.setProperty(JxtaNetworkManager.SEEDING_RDV, args[i + 1]);
-                                  mConfigurator.setProperty(JxtaNetworkManager.SEEDING_RELAY, args[i + 1]);
-                                  System.out.println("seeding  detected[" + args[i + 1] + "]");
-                          }
-                          else if (argument.equals("-public-address")) {
-                                  mConfigurator.setProperty(JxtaNetworkManager.HTTP_LISTENING_PUBLIC_ADDRESS,args[i + 1]+":9700");
-                                  mConfigurator.setProperty(JxtaNetworkManager.TCP_LISTENING_PUBLIC_ADDRESS,args[i + 1]+":"+lP2pPort);
-                   mConfigurator.setProperty(MediaResourceService.AUDIO_VIDEO_PUBLIC_URI,"udp://"+args[i + 1]+":"+lMediaPort);
-                   mConfigurator.setProperty(SipProxyRegistrar.REGISTRAR_PUBLIC_ADDRESS,args[i + 1]);
-                   System.out.println("public address detected[" + args[i + 1] + "]");
-                          }            
-                          else
-                          {
-                                  System.out.println("Invalid option: " + args[i]);
-                                  usage();
-                                  System.exit(1);
-                          }
-                  }
-
-                  File lJxtaDirectory = new File (mConfigHomeDir);
-                  if (lJxtaDirectory.exists() == false) lJxtaDirectory.mkdir();
-
-
-                  switch (lMode) {
-                  case edge:
-                          startEdge(mConfigurator,lJxtaDirectory);
-                          break;
-                  case relay:
-                          startRelay(mConfigurator,lJxtaDirectory);
-                          break;
-                  case seeding_server:
-                          startSeeding(mConfigurator,lJxtaDirectory);
-                          break; 
-                  case auto:
-                          //1 start edge 
-                          startEdge(mConfigurator,lJxtaDirectory);
-                          // check if peer mode required
-                          if (mP2pProxyManagement.shouldIBehaveAsAnRdv() == true) {
-                                  String lPublicAddress = mP2pProxyManagement.getPublicIpAddress().getHostAddress();
-                                  mConfigurator.setProperty(JxtaNetworkManager.HTTP_LISTENING_PUBLIC_ADDRESS, lPublicAddress+":9700");
-                                  mConfigurator.setProperty(JxtaNetworkManager.TCP_LISTENING_PUBLIC_ADDRESS, lPublicAddress+":9701");
-                                  mServiceProvider.stop();
-                                  mJxtaNetworkManager.stop();
-                                  startRelay(mConfigurator,lJxtaDirectory);
-                                  mJxtaNetworkManager.getPeerGroup().getRendezVousService().setAutoStart(true);
-                          }
-                          break;
-                  default:
-                          mLog.fatal("unsupported mode ["+lMode+"]");
-                  System.exit(1);
-
-                  }
-
-
-                  //set management
-                  try {
-                          ObjectName lObjectName = new ObjectName(ACCOUNT_MGR_MBEAN_NAME);
-                          ManagementFactory.getPlatformMBeanServer().registerMBean(mP2pProxyAccountManagement,lObjectName);
-                  } catch (Exception e) {
-                          mLog.warn("cannot register MBean",e);
-                  }
-
-
-                  mLog.warn("p2pproxy initilized");
-                  isReady = true;
-                  while (mExit == false) {
-                          Thread.sleep(1000);
-                  }
-                  if (mServiceProvider!= null) mServiceProvider.stop();
-                  if (mServiceProvider!= null) mServiceProvider.stop();
-                  if (mSipAndPipeListener!= null) mSipAndPipeListener.stop();
-                  if (mJxtaNetworkManager != null) mJxtaNetworkManager.stop();
-                  mLog.info("p2pproxy stopped");
-                  return;
-                  
-          } catch (Exception e) {
-                  mLog.fatal("error",e);
-                  System.exit(1);
-          }
-   }
-   private static void startEdge(Configurator aProperties,File aConfigDir) throws Exception{
-      // setup jxta
-      mJxtaNetworkManager = new JxtaNetworkManager(aProperties,aConfigDir);
-      mServiceProvider = new EdgePeerServiceManager(aProperties, mJxtaNetworkManager);
-      mP2pProxyManagement = (P2pProxyManagement) mServiceProvider;
-      mP2pProxySipProxyRegistrarManagement = (P2pProxyResourceManagement) mServiceProvider;
-          //setup account manager
-          mP2pProxyAccountManagement = new P2pProxyAccountManagement(mJxtaNetworkManager);
-      mServiceProvider.start(3000L);
-   }
-
-   private static void startRelay(Configurator aProperties,File aConfigDir) throws Exception{
-      // setup jxta
-      mJxtaNetworkManager = new JxtaNetworkManager(aProperties,aConfigDir);
-      mServiceProvider = new SuperPeerServiceManager(aProperties, mJxtaNetworkManager);
-      mP2pProxyManagement = (P2pProxyManagement) mServiceProvider;
-      mP2pProxySipProxyRegistrarManagement = (P2pProxyResourceManagement) mServiceProvider;
-      mServiceProvider.start(3000L);
-          //setup account manager
-          mP2pProxyAccountManagement = new P2pProxyAccountManagement(mJxtaNetworkManager);
-//    setup sip provider
-          SipStack.log_path = mConfigHomeDir+"/logs";
-          mSipAndPipeListener = new SipProxyRegistrar(mConfigurator,mJxtaNetworkManager,mP2pProxyAccountManagement);
-          //set management
-          try {
-                  ObjectName lObjectName  = new ObjectName(PROXY_REG_MBEAN_NAME);
-                  ManagementFactory.getPlatformMBeanServer().registerMBean(mSipAndPipeListener,lObjectName);
-
-          } catch (Exception e) {
-                  mLog.warn("cannot register MBean",e);
-          }
-   }
-   private static void startSeeding(Configurator aProperties,File aConfigDir) throws Exception{
-      // setup jxta
-      mJxtaNetworkManager = new JxtaNetworkManager(aProperties,aConfigDir);
-      mServiceProvider = new SeedingPeerServiceManager(aProperties, mJxtaNetworkManager,true);
-      mP2pProxyManagement = null;
-      mP2pProxySipProxyRegistrarManagement = (P2pProxyResourceManagement) mServiceProvider;
-      mServiceProvider.start(3000L);
-          //setup account manager
-          mP2pProxyAccountManagement = new P2pProxyAccountManagement(mJxtaNetworkManager);
-          //    setup sip provider
-          SipStack.log_path = mConfigHomeDir+"/logs";
-          mSipAndPipeListener = new SipProxyRegistrar(mConfigurator,mJxtaNetworkManager,mP2pProxyAccountManagement);
-          //set management
-          try {
-                  ObjectName lObjectName  = new ObjectName(PROXY_REG_MBEAN_NAME);
-                  ManagementFactory.getPlatformMBeanServer().registerMBean(mSipAndPipeListener,lObjectName);
-
-          } catch (Exception e) {
-                  mLog.warn("cannot register MBean",e);
-          }
-   }   
-   private static void usage() {
-      System.out.println("p2pproxy");
-      System.out.println("-home : directory where configuration/cache is located  (including jxta cache.default is $HOME/.p2pproxy");
-      System.out.println("-sip : udp proxy port, default 5060");
-      System.out.println("-media : udp relay/stun port, default 16000");
-      System.out.println("-p2p : p2p tcp port, default 9701");
-      System.out.println("-relay : super peer mode");
-      System.out.println("-edge-only : edge mode");
-      System.out.println("-seeding-server : seeding server mode");
-      System.out.println("-auto-config : automatically choose edge or relay (default mode)");
-      System.out.println("-seeding : list of boostrap rdv separated by | (ex tcp://127.0.0.1:9701|http://127.0.0.2:9700)");
-      System.out.println("-public-address : ip as exported to peers (ex myPublicAddress.no-ip.org)");
-   }
-  
-public void loadTraceConfigFile() throws P2pProxyException {
-   staticLoadTraceConfigFile();
-   }
-public  static void staticLoadTraceConfigFile()  throws P2pProxyException {
-   try {
-          InputStream lLog4jStream = null;
-          String lSearchDir;
-      //search build dir
-      lSearchDir = System.getProperty("org.linphone.p2pproxy.build.dir");
-      File lFile = new File(lSearchDir+"/log4j.properties");
-      if (lFile.exists() == false) {
-         lSearchDir = mConfigHomeDir;
-         lFile = new File(lSearchDir+"/log4j.properties");
-         if (lFile.exists() == false) {
-            lSearchDir=".";
-            lFile = new File(lSearchDir+"/log4j.properties");
-            if (lFile.exists() == false) {
-               lLog4jStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("log4j.properties");
-               
-            }
-         }
-      }
-      if (lLog4jStream == null) {
-         lLog4jStream = new FileInputStream(lFile);
-      }
-      Properties llog4Properties = new Properties();
-      llog4Properties.load(lLog4jStream);
-      PropertyConfigurator.configure(llog4Properties);
-      mLog = Logger.getLogger(P2pProxyMain.class);
-      // read java.util.logging properties 
-
-      llog4Properties.setProperty("java.util.logging.FileHandler.pattern",System.getProperty("org.linphone.p2pproxy.home")+"/logs/p2pproxy.log");
-      File lLogConfigFile = new File(mConfigHomeDir.concat("log4j.properties")+".tmp");
-      if (lLogConfigFile.exists() == false) {
-         lLogConfigFile.createNewFile();
-      }
-      llog4Properties.store(new FileOutputStream(lLogConfigFile), "tmp");
-      System.setProperty("java.util.logging.config.file",lLogConfigFile.getAbsolutePath());
-      java.util.logging.LogManager.getLogManager().readConfiguration();
-   } catch (Exception e) {
-      throw new P2pProxyException("enable to load traces",e);
-   }
-}
-private static boolean isReadyNoThrow() {
-       try {
-               isReady();
-               return true;
-       } catch (P2pProxyNotReadyException e) {
-               return false;
-       }
-}
-private static void isReady() throws P2pProxyNotReadyException {
-    try {
-      if ((isReady == true && mJxtaNetworkManager.isConnectedToRendezVous(0) == true) 
-         || 
-         (isReady == true && mJxtaNetworkManager.getPeerGroup().getRendezVousService().isRendezVous())) {
-         //nop connected
-      } else {
-         if (mJxtaNetworkManager != null ) {
-                 throw new P2pProxyNotReadyException("not connected to any rdv: status ["+mJxtaNetworkManager.getPeerGroup().getRendezVousService().getRendezVousStatus()+"]");
-         } else {
-                 throw new P2pProxyNotReadyException("initializing");
-         }
-      }
-   } catch (InterruptedException e) {
-      throw new P2pProxyNotReadyException(e);
-   }
-}
-/* p2pproxy.h implementation*/
-private static int excecuteAction(Future<Integer> aResult, Class<? extends Callable<Integer>> classTaskName) {
-       try {
-               if (aResult.isDone() == false)  {
-                       return P2pProxylauncherConstants.P2PPROXY_EWOULDBLOCK;
-               } else if (aResult == null) {
-                       createAccountResult = Excecutor.pool.submit(classTaskName.newInstance());
-               } else  {
-                       Future<Integer> lResult = createAccountResult;
-                       createAccountResult = null;
-                       return lResult.get();
-               }
-               return P2pProxylauncherConstants.P2PPROXY_ERROR;
-       } catch (Exception e) {
-               return P2pProxylauncherConstants.P2PPROXY_ERROR;
-       }     
-}
-
-static Future<Integer> createAccountResult = null;
-public synchronized static int createAccount(final String aUserName) {
-       class CreateAcountTask implements Callable<Integer> {
-               public Integer call() throws Exception {
-                       try {
-                               mP2pProxyAccountManagement.createAccount(aUserName);
-                       } catch (P2pProxyUserAlreadyExistException e) {
-                               return P2pProxylauncherConstants.P2PPROXY_ACCOUNTMGT_USER_EXIST;
-                       } catch (P2pProxyException e) {
-                               return P2pProxylauncherConstants.P2PPROXY_ERROR;
-                       }
-                       return P2pProxylauncherConstants.P2PPROXY_NO_ERROR;
-               }
-       };
-       return excecuteAction(createAccountResult,CreateAcountTask.class);
-} 
-
-static Future<Integer> deleteAccountResult = null;
-public static int deleteAccount(final String aUserName)  {
-       class DeleteAccountTask implements Callable<Integer> {
-
-               public Integer call() throws Exception {
-                       mP2pProxyAccountManagement.deleteAccount(aUserName);
-                       return P2pProxylauncherConstants.P2PPROXY_NO_ERROR;
-               }
-
-       };
-       return excecuteAction(deleteAccountResult,DeleteAccountTask.class);
-}
-
-static Future<Integer> isValidAccountResult = null;
-public static int isValidAccount(final String aUserName){
-       class IsValidAccountResultTask implements Callable<Integer> {
-
-               public Integer call() throws Exception {
-                     if (mP2pProxyAccountManagement.isValidAccount(aUserName)) {
-                         return P2pProxylauncherConstants.P2PPROXY_ACCOUNTMGT_USER_EXIST;
-                      } else {
-                         return P2pProxylauncherConstants.P2PPROXY_ACCOUNTMGT_USER_NOT_EXIST;
-                      }
-               }
-
-       };
-       return excecuteAction(isValidAccountResult,IsValidAccountResultTask.class);
-}
-
-static Future<Integer> lookupSipProxyUriResult = null;
-public static String lookupSipProxyUri(final String aDomaine) {
-   try {
-      isReady();
-      String[] lProxies = mP2pProxySipProxyRegistrarManagement.lookupSipProxiesUri(aDomaine);
-      if (lProxies.length != 0) {
-         return lProxies[0];
-      } else {
-         return null;
-      }
-   } catch (Exception e) {
-      return null;
-   } 
-}
-
-public static String[] lookupSipProxiesUri(String aDomaine) {
-          try {
-             isReady();
-             return mP2pProxySipProxyRegistrarManagement.lookupSipProxiesUri(aDomaine);
-          } catch (Exception e) {
-             return null;
-          } 
-       }
-
-public static String[] lookupMediaServerAddress(String aDomaine) {
-   try {
-      isReady();
-      return mP2pProxySipProxyRegistrarManagement.getMediaServerList();
-   } catch (Exception e) {
-          mLog.error("cannot find media resource",e);
-          return null;
-   } 
-}
-
-public static int getState() {
-   try {
-      isReady();
-      return P2pProxylauncherConstants.P2PPROXY_CONNECTED;
-   } catch (P2pProxyException e) {
-      //if (mLog != null) mLog.info("cannot get state",e);
-      return P2pProxylauncherConstants.P2PPROXY_NOT_CONNECTED;
-   }   
-}
-public static int revokeSipProxy(String aProxy) {
-   try {
-      isReady();
-      mP2pProxySipProxyRegistrarManagement.revokeSipProxy(aProxy);
-      return P2pProxylauncherConstants.P2PPROXY_NO_ERROR;
-   } catch (P2pProxyException e) {
-      return P2pProxylauncherConstants.P2PPROXY_NOT_CONNECTED;
-   }   
-}
-public static int revokeMediaServer(String aServer) {
-          try {
-             isReady();
-             mP2pProxySipProxyRegistrarManagement.revokeMediaServer(aServer);
-             return P2pProxylauncherConstants.P2PPROXY_NO_ERROR;
-          } catch (P2pProxyException e) {
-             return P2pProxylauncherConstants.P2PPROXY_NOT_CONNECTED;
-          }   
-       }
-public static void stop() {
-   mExit = true;
-  
-}
-}
\ No newline at end of file
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/P2pProxyMainMBean.java b/p2pproxy/src/org/linphone/p2pproxy/core/P2pProxyMainMBean.java
deleted file mode 100644 (file)
index 29bc46d..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-P2pProxyMainMBean.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core;
-
-import org.linphone.p2pproxy.api.P2pProxyException;
-
-public interface P2pProxyMainMBean {
-   /**
-    * reload traces from file
-    * @throws P2pProxyException
-    */
-   public void loadTraceConfigFile() throws P2pProxyException ;
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/P2pProxyManagementImpl.java b/p2pproxy/src/org/linphone/p2pproxy/core/P2pProxyManagementImpl.java
deleted file mode 100644 (file)
index 6a508f3..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-P2pProxyManagementImpl.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core;
-
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.SocketException;
-import java.net.UnknownHostException;
-
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.api.P2pProxyManagement;
-
-import org.linphone.p2pproxy.core.rdvautoconfig.PeerInfoServiceClient;
-
-public abstract class P2pProxyManagementImpl extends P2pProxyResourceManagementImpl implements ServiceProvider,P2pProxyManagement {
-   protected final Configurator mConfigurator;
-   private final PeerInfoServiceClient mPeerInfoServiceClient;
-   private final static Logger mLog = Logger.getLogger(P2pProxyManagementImpl.class);
-   
-   P2pProxyManagementImpl(Configurator aConfigurator, JxtaNetworkManager aJxtaNetworkManager) throws SocketException, UnknownHostException
-    {
-        super(aJxtaNetworkManager);
-        mConfigurator = aConfigurator;
-        mPeerInfoServiceClient = new PeerInfoServiceClient(aConfigurator, aJxtaNetworkManager);
-    }
-
-    public void start(long aTimeout) throws P2pProxyException
-    {
-        mPeerInfoServiceClient.start(aTimeout);
-        
-    }
-
-    public void stop() {
-        mPeerInfoServiceClient.stop();
-        mLog.info("P2pProxyManagementImpl stopped");
-    }
-
-    public InetAddress getPublicIpAddress()
-        throws P2pProxyException
-    {
-        return mPeerInfoServiceClient.getPublicIpAddress();
-    }
-
-   public boolean probeSocket(InetSocketAddress aSocketAddress, Protocol aProtocol) throws P2pProxyException {
-      return mPeerInfoServiceClient.probeSocket(aSocketAddress, aProtocol);
-   }
-
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/P2pProxyResourceManagementImpl.java b/p2pproxy/src/org/linphone/p2pproxy/core/P2pProxyResourceManagementImpl.java
deleted file mode 100644 (file)
index 9f5694d..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.linphone.p2pproxy.core;
-
-import java.util.List;
-
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.api.P2pProxyResourceManagement;
-import org.linphone.p2pproxy.core.media.MediaResourceService;
-import org.linphone.p2pproxy.core.sipproxy.NetworkResourceAdvertisement;
-import org.linphone.p2pproxy.core.sipproxy.SipProxyRegistrar;
-
-public class P2pProxyResourceManagementImpl implements P2pProxyResourceManagement {
-       protected final JxtaNetworkManager mJxtaNetworkManager;
-
-       private final static Logger mLog = Logger.getLogger(P2pProxyResourceManagementImpl.class);
-       P2pProxyResourceManagementImpl(JxtaNetworkManager aJxtaNetworkManager) {
-               mJxtaNetworkManager = aJxtaNetworkManager;
-       }
-       public String[] lookupSipProxiesUri(String aDomaine) throws P2pProxyException {
-               try {
-                       if (!DOMAINE.equals(aDomaine)) {
-                               //unknown domaine
-                               return new String[0];
-                       }
-                       List<NetworkResourceAdvertisement> lSipProxyRegistrarAdvertisements =  (List<NetworkResourceAdvertisement>) (mJxtaNetworkManager.getAdvertisementList(null, "Name",SipProxyRegistrar.ADV_NAME, true,2));
-                       String[] lAddresses = new String[lSipProxyRegistrarAdvertisements.size()];
-                       for (int i=0;i<lSipProxyRegistrarAdvertisements.size();i++) {
-                               lAddresses[i] = lSipProxyRegistrarAdvertisements.get(i).getAddress();
-                       }
-                       return lAddresses;
-               }catch (Exception e) {
-                       throw new P2pProxyException(e);
-               }
-
-       }
-       public void revokeSipProxy(String aProxy) throws P2pProxyException {
-               revokeNetworkResoure(aProxy, SipProxyRegistrar.ADV_NAME);
-       }
-       public String[] getMediaServerList() throws P2pProxyException {
-               try {
-
-                       List<NetworkResourceAdvertisement> lMediaResoureAdvertisements =  (List<NetworkResourceAdvertisement>) (mJxtaNetworkManager.getAdvertisementList(null, "Name",MediaResourceService.ADV_NAME, true,2));
-                       String[] lAddresses = new String[lMediaResoureAdvertisements.size()];
-                       for (int i=0;i<lMediaResoureAdvertisements.size();i++) {
-                               lAddresses[i] = lMediaResoureAdvertisements.get(i).getAddress();
-                       }
-                       return lAddresses;
-               }catch (Exception e) {
-                       throw new P2pProxyException(e);
-               }
-       }
-
-       public void revokeMediaServer(String aMediaServer) throws P2pProxyException {
-               revokeNetworkResoure(aMediaServer, MediaResourceService.ADV_NAME);
-       }
-       private void revokeNetworkResoure(String aResource,String anAdvName) throws P2pProxyException {
-               try {
-                       List<NetworkResourceAdvertisement> lMediaResourceAdvertisement = (List<NetworkResourceAdvertisement>) (mJxtaNetworkManager.getAdvertisementList(null,anAdvName, true));
-                       for (NetworkResourceAdvertisement lMediaResource:lMediaResourceAdvertisement) {
-                               if (lMediaResource.getAddress().equals("udp://"+aResource)) {
-                                       mJxtaNetworkManager.getPeerGroup().getDiscoveryService().flushAdvertisement(lMediaResource);
-                                       mLog.info(aResource +" revoked");
-                               }
-
-                       }
-               } catch (Exception e) {
-                       throw new P2pProxyException(e);
-               }       
-       }
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/P2pUserProfileAdvertisement.java b/p2pproxy/src/org/linphone/p2pproxy/core/P2pUserProfileAdvertisement.java
deleted file mode 100644 (file)
index beda4b1..0000000
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-P2pUserProfileAdvertisement.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core;
-
-
-import java.io.Serializable;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Enumeration;
-
-import org.apache.log4j.Logger;
-
-
-
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Attributable;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.ExtendableAdvertisement;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.TextElement;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-
-/**
- * derivated from jxta Advertisement tutorial
- * <pre>
- * &lt;?xml version="1.0"?>
- * &lt;!DOCTYPE jxta:System>
- * &lt;jxta:System xmlns:jxta="http://jxta.org">
- *   &lt;id>id&lt;/id>
- *   &lt;user-name>endpoint user name&lt;/name>
- * &lt;/jxta:System>
- * </pre>
- */
-public class P2pUserProfileAdvertisement extends ExtendableAdvertisement implements Comparable, Cloneable, Serializable {
-   /**
-    * Instantiator
-    */
-   public static class Instantiator implements AdvertisementFactory.Instantiator {
-
-      /**
-       * Returns the identifying type of this Advertisement.
-       *
-       * @return String the type of advertisement
-       */
-      public String getAdvertisementType() {
-         return P2pUserProfileAdvertisement.getAdvertisementType();
-      }
-
-      /**
-       * Constructs an instance of <CODE>Advertisement</CODE> matching the
-       * type specified by the <CODE>advertisementType</CODE> parameter.
-       *
-       * @return The instance of <CODE>Advertisement</CODE> or null if it
-       *         could not be created.
-       */
-      public Advertisement newInstance() {
-         return new P2pUserProfileAdvertisement();
-      }
-
-      /**
-       * Constructs an instance of <CODE>Advertisement</CODE> matching the
-       * type specified by the <CODE>advertisementType</CODE> parameter.
-       *
-       * @param root Specifies a portion of a StructuredDocument which will
-       *             be converted into an Advertisement.
-       * @return The instance of <CODE>Advertisement</CODE> or null if it
-       *         could not be created.
-       */
-      public Advertisement newInstance(net.jxta.document.Element root) {
-         return new P2pUserProfileAdvertisement(root);
-      }
-   }
-   private ID mId ;;
-   private String mName;
-   public final static String USER_NAME_TAG = "user-name";
-   private final static String mIdTag = "ID";
-   private final static String[] mIndexs = {USER_NAME_TAG};
-   private final static Logger mLog = Logger.getLogger(P2pUserProfileAdvertisement.class);
-   /**
-    * 
-    */
-   public P2pUserProfileAdvertisement(Element root) {
-
-      TextElement doc = (TextElement) root;
-
-      if (!getAdvertisementType().equals(doc.getName())) {
-         throw new IllegalArgumentException("Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-      }
-      initialize(doc);
-
-   }
-   public P2pUserProfileAdvertisement() {
-
-      // TODO Auto-generated constructor stub
-   }
-   /* (non-Javadoc)
-    * @see net.jxta.document.ExtendableAdvertisement#getDocument(net.jxta.document.MimeMediaType)
-    */
-   @Override
-   public Document getDocument(MimeMediaType asMimeType) {
-
-      StructuredDocument adv = StructuredDocumentFactory.newStructuredDocument(asMimeType,
-            getAdvertisementType());
-      if (adv instanceof Attributable) {
-         ((Attributable) adv).addAttribute("xmlns:jxta", "http://jxta.org");
-      }
-      Element e;
-      e = adv.createElement(mIdTag, getID().toString());
-      adv.appendChild(e);
-      e = adv.createElement(USER_NAME_TAG, getUserName().trim());
-      adv.appendChild(e);
-      return adv;
-   }
-
-   @Override
-   public ID getID() {
-      return mId;
-   }
-
-   @Override
-   public String[] getIndexFields() {
-      return mIndexs;
-   }
-   public static String getAdvertisementType() {
-      return "jxta:p2p-proxy-user-profile";
-   }
-   /* (non-Javadoc)
-    * @see net.jxta.document.Advertisement#toString()
-    */
-   @Override
-   public String toString() {
-      // TODO Auto-generated method stub
-      return super.toString();
-   }
-   public int compareTo(Object other) {
-      return getID().toString().compareTo(other.toString());
-   }
-   /**
-    * Intialize a System advertisement from a portion of a structured document.
-    *
-    * @param root document root
-    */
-   protected void initialize(Element root) {
-      if (!TextElement.class.isInstance(root)) {
-         throw new IllegalArgumentException(getClass().getName() +
-               " only supports TextElement");
-      }
-      TextElement doc = (TextElement) root;
-      if (!doc.getName().equals(getAdvertisementType())) {
-         throw new IllegalArgumentException("Could not construct : "
-               + getClass().getName() + "from doc containing a " +
-               doc.getName());
-      }
-      Enumeration elements = doc.getChildren();
-      while (elements.hasMoreElements()) {
-         TextElement elem = (TextElement) elements.nextElement();
-         if (!handleElement(elem)) {
-            mLog.warn("Unhandleded element \'" + elem.getName() + "\' in " +  doc.getName());
-         }
-      }
-   }
-   /**
-    * Process an individual element from the document.
-    *
-    * @param elem the element to be processed.
-    * @return true if the element was recognized, otherwise false.
-    */
-   protected boolean handleElement(TextElement elem) {
-      if (elem.getName().equals(mIdTag)) {
-         try {
-            URI id = new URI(elem.getTextValue());
-            setID(IDFactory.fromURI(id));
-         } catch (URISyntaxException badID) {
-            throw new IllegalArgumentException("unknown ID format in advertisement: " +
-                  elem.getTextValue());
-         }
-         catch (ClassCastException badID) {
-            throw new IllegalArgumentException("Id is not a known id type: " +
-                  elem.getTextValue());
-         }
-         return true;
-      }
-      if (elem.getName().equals(USER_NAME_TAG)) {
-         setUserName(elem.getTextValue());
-         return true;
-      }
-      return false;
-   }
-   public void setID(ID id) {
-      mId = id;
-   }
-   @Override
-   public String getBaseAdvType() {
-      // TODO Auto-generated method stub
-      return null;
-   }
-   /**
-    * @return Returns the mName.
-    */
-   public String getUserName() {
-      return mName;
-   }
-   /**
-    * @param name The mName to set.
-    */
-   public void setUserName(String name) {
-      mName = name;
-   }
-   /* (non-Javadoc)
-    * @see java.lang.Object#equals(java.lang.Object)
-    */
-   @Override
-   public boolean equals(Object obj) {
-
-      if (this == obj) {
-          return true;
-      }
-      if (obj instanceof P2pUserProfileAdvertisement) {
-         P2pUserProfileAdvertisement adv = (P2pUserProfileAdvertisement) obj;
-          return getID().equals(adv.getID());
-      }
-
-      return false;
-  
-   }
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/SeedingPeerServiceManager.java b/p2pproxy/src/org/linphone/p2pproxy/core/SeedingPeerServiceManager.java
deleted file mode 100644 (file)
index 364dd66..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
-// Jad home page: http://www.kpdus.com/jad.html
-// Decompiler options: packimports(3) 
-// Source File Name:   SuperPeerServiceManager.java
-
-package org.linphone.p2pproxy.core;
-
-
-
-import java.net.SocketException;
-import java.net.UnknownHostException;
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.core.media.MediaResourceService;
-import org.linphone.p2pproxy.core.rdvautoconfig.PeerInfoProviderService;
-
-public class SeedingPeerServiceManager extends P2pProxyResourceManagementImpl implements ServiceProvider {
-   protected final Configurator mConfigurator;
-   private final PeerInfoProviderService mPeerInfoProviderService; 
-   private MediaResourceService mStunUdpRelayService = null; 
-
-   private final static Logger mLog = Logger.getLogger(SeedingPeerServiceManager.class);
-   SeedingPeerServiceManager(Configurator aConfigurator, JxtaNetworkManager aJxtaNetworkManager,boolean enableUdpRelay) throws SocketException, UnknownHostException {
-      super(aJxtaNetworkManager);
-      mConfigurator = aConfigurator;
-      mPeerInfoProviderService = new PeerInfoProviderService(aConfigurator, aJxtaNetworkManager);
-      if (enableUdpRelay == true) {
-      mStunUdpRelayService = new MediaResourceService(aConfigurator,aJxtaNetworkManager);
-      }
-   }
-
-   public void start(long aTimeout) throws P2pProxyException     {
-      mPeerInfoProviderService.start(aTimeout);
-      if (mStunUdpRelayService != null) {
-         mStunUdpRelayService.start(aTimeout);
-      }
-      mLog.info("SeedingPeerServiceManager started");
-   }
-
-   public void stop() {
-      mPeerInfoProviderService.stop();
-      if (mStunUdpRelayService != null) {
-         mStunUdpRelayService.stop();
-      }
-      mLog.info("SeedingPeerServiceManager stopped");
-   }
-
-
-
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/ServiceProvider.java b/p2pproxy/src/org/linphone/p2pproxy/core/ServiceProvider.java
deleted file mode 100644 (file)
index b5a9829..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
-// Jad home page: http://www.kpdus.com/jad.html
-// Decompiler options: packimports(3) 
-// Source File Name:   ServiceProvider.java
-
-package org.linphone.p2pproxy.core;
-
-import org.linphone.p2pproxy.api.P2pProxyException;
-
-public interface ServiceProvider
-{
-
-    public abstract void start(long aTimeOut) throws P2pProxyException;
-
-    public abstract void stop();
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/SuperPeerServiceManager.java b/p2pproxy/src/org/linphone/p2pproxy/core/SuperPeerServiceManager.java
deleted file mode 100644 (file)
index 9db1c99..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
-// Jad home page: http://www.kpdus.com/jad.html
-// Decompiler options: packimports(3) 
-// Source File Name:   SuperPeerServiceManager.java
-
-package org.linphone.p2pproxy.core;
-
-import java.net.SocketException;
-import java.net.UnknownHostException;
-
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyException;
-
-import org.linphone.p2pproxy.core.rdvautoconfig.PeerInfoProviderService;
-
-// Referenced classes of package org.linphone.p2pproxy.core:
-//            EdgePeerServiceManager, Configurator, JxtaNetworkManager
-
-public class SuperPeerServiceManager extends P2pProxyManagementImpl {
-   private final static Logger mLog = Logger.getLogger(SuperPeerServiceManager.class);
-   private final PeerInfoProviderService mPeerInfoProviderService;
-   SuperPeerServiceManager(Configurator aConfigurator, JxtaNetworkManager aJxtaNetworkManager) throws P2pProxyException, SocketException, UnknownHostException
-   {
-     super(aConfigurator,aJxtaNetworkManager); 
-     mPeerInfoProviderService = new PeerInfoProviderService(aConfigurator, aJxtaNetworkManager);
-   }
-
-   public void start(long aTimeOut) throws P2pProxyException  {
-      mPeerInfoProviderService.start(aTimeOut);
-      mLog.info("SuperPeerServiceManager started");
-   }
-
-   public void stop() {
-      super.stop();
-      mPeerInfoProviderService.stop();
-      mLog.info("SuperPeerServiceManager stopped");
-   }
-
-
-   public boolean shouldIBehaveAsAnRdv() throws P2pProxyException{
-      return false;
-   }
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/jxtaext/EndpointRegistry.java b/p2pproxy/src/org/linphone/p2pproxy/core/jxtaext/EndpointRegistry.java
deleted file mode 100644 (file)
index 7240a21..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-EndpointRegistry.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.jxtaext;
-
-import java.net.InetAddress;
-import java.util.HashMap;
-import java.util.Map;
-
-public class EndpointRegistry {
-   final static private EndpointRegistry mInstance = new EndpointRegistry();
-   final private Map<String,InetAddress> mMap = new HashMap<String,InetAddress>();
-   private EndpointRegistry() {
-   }
-   
-   static public EndpointRegistry getInstance() {
-      return mInstance;
-   }
-   /**
-    * @param aKey peer Id as retyrned by EndpointAdress.getProtocolAddress()
-    * @return
-    */
-   synchronized public boolean isPresent(String aKey) {
-      return mMap.containsKey(aKey);
-   }
-   /**
-    * @param aKey peer Id as retyrned by EndpointAdress.getProtocolAddress()
-    * @return IP address or null 
-    */
-   synchronized public InetAddress get(String aKey) {
-      return mMap.get(aKey);
-   }
-   /**
-    * @param a Key peer Id as retyrned by EndpointAdress.getProtocolAddress()
-    * @param aValue 
-    */
-   synchronized public void add(String aKey,InetAddress aValue) {
-      mMap.put(aKey, aValue) ;
-   }
-   /**
-    * @param aKey peer Id as retyrned by EndpointAdress.getProtocolAddress()
-    */
-   synchronized public void remove(String aKey) {
-      mMap.remove(aKey) ;
-   }
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/jxtaext/NatedEndPointAddress.java b/p2pproxy/src/org/linphone/p2pproxy/core/jxtaext/NatedEndPointAddress.java
deleted file mode 100644 (file)
index 6264442..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-NatedEndPointAddress.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.jxtaext;
-
-
-import net.jxta.endpoint.EndpointAddress;
-
-public class NatedEndPointAddress extends EndpointAddress {
-
-   String mRemoteHost;
-   /**
-    * @return Returns the mRemoteHost.
-    */
-   public String getRemoteHost() {
-      return mRemoteHost;
-   }
-
-
-   /**
-    * @param protocol
-    * @param address
-    * @param service
-    * @param serviceParam
-    */
-   public NatedEndPointAddress(String protocol, String address, String service, String serviceParam,String remoteHost) {
-      super(protocol, address, service, serviceParam);
-      // TODO Auto-generated constructor stub
-   }
-
-   public String toString() {
-      return super.toString() + "remote host address ["+mRemoteHost+"]";
-   }
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/media/MediaResourceService.java b/p2pproxy/src/org/linphone/p2pproxy/core/media/MediaResourceService.java
deleted file mode 100644 (file)
index 5a88711..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-MediaResourceService.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-package org.linphone.p2pproxy.core.media;
-
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.SocketException;
-import java.net.URI;
-import java.net.UnknownHostException;
-import java.util.Timer;
-import java.util.TimerTask;
-
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.id.IDFactory;
-
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.core.Configurator;
-import org.linphone.p2pproxy.core.GenericUdpSession;
-import org.linphone.p2pproxy.core.JxtaNetworkManager;
-import org.linphone.p2pproxy.core.ServiceProvider;
-import org.linphone.p2pproxy.core.media.rtprelay.RtpRelayServer;
-import org.linphone.p2pproxy.core.media.rtprelay.RtpRelayServerConfig;
-import org.linphone.p2pproxy.core.sipproxy.NetworkResourceAdvertisement;
-import org.linphone.p2pproxy.core.stun.StunServer;
-
-public class MediaResourceService implements ServiceProvider {
-   private final static Logger mLog = Logger.getLogger(MediaResourceService.class);   
-   public final static String AUDIO_VIDEO_LOCAL_PORT="org.linphone.p2pproxy.udp-media-relay.audio-video.port";
-   public final static int AUDIO_VIDEO_LOCAL_PORT_DEFAULT_VALUE=16000;
-   public final static String AUDIO_VIDEO_PUBLIC_URI="org.linphone.p2pproxy.udp-media-relay.audio-video.public-uri";
-
-   private GenericUdpSession mUdpSessionForStunRtp;
-   private  RtpRelayServer mRtpRelayServer;
-   private  StunServer mSturServer;
-   private RtpRelayServerConfig mConfig;
-   private final JxtaNetworkManager mJxtaNetworkManager;
-   private NetworkResourceAdvertisement mStunRtpServerAdvertisement;
-   Timer mPublishTimer = new Timer("MediaResourceService publish timer");
-   public final static String ADV_NAME = "p2p-proxy-stunrtp";
-   private final int ADV_LIFE_TIME=6000000;
-   TimerTask mPublishTask;
-   public MediaResourceService(Configurator aConfigurator, JxtaNetworkManager aJxtaNetworkManager) throws SocketException, UnknownHostException {
-         
-         int lAudioVideoLocalPort = Integer.valueOf(aConfigurator.getProperty(MediaResourceService.AUDIO_VIDEO_LOCAL_PORT,String.valueOf(AUDIO_VIDEO_LOCAL_PORT_DEFAULT_VALUE)));
-      URI lAudioVideoPublicUri = URI.create(aConfigurator.getProperty(MediaResourceService.AUDIO_VIDEO_PUBLIC_URI,"udp://"+InetAddress.getLocalHost().getHostAddress()+":"+lAudioVideoLocalPort));
-      mConfig = new RtpRelayServerConfig(new InetSocketAddress(lAudioVideoPublicUri.getHost(),lAudioVideoPublicUri.getPort())
-                                          ,new InetSocketAddress(lAudioVideoLocalPort));
-      mUdpSessionForStunRtp = new GenericUdpSession(new InetSocketAddress(lAudioVideoLocalPort));
-      mRtpRelayServer =  new RtpRelayServer(mUdpSessionForStunRtp.getSocket(),1000,1000);
-      mUdpSessionForStunRtp.addMessageHandler(mRtpRelayServer);
-      mSturServer = new StunServer(mUdpSessionForStunRtp.getSocket());
-      mUdpSessionForStunRtp.addMessageHandler(mSturServer);
-      mJxtaNetworkManager = aJxtaNetworkManager;
-   }
-
-   public void start(long timeOut) throws P2pProxyException {
-          mPublishTask = new TimerTask() {
-
-                  @Override
-                  public void run() {
-                          try {
-                                  mStunRtpServerAdvertisement = (NetworkResourceAdvertisement) AdvertisementFactory.newAdvertisement(NetworkResourceAdvertisement.getAdvertisementType());
-                                  mStunRtpServerAdvertisement.setAddress("udp://"+mConfig.getAudioVideoPublicSocketAddress().getAddress().getHostAddress()+":"+mConfig.getAudioVideoPublicSocketAddress().getPort());
-                                  mStunRtpServerAdvertisement.setID(IDFactory.newCodatID(mJxtaNetworkManager.getPeerGroup().getPeerGroupID(), Integer.toHexString(mStunRtpServerAdvertisement.getAddress().hashCode()).getBytes("US-ASCII")));
-                                  mStunRtpServerAdvertisement.setName(ADV_NAME);
-                                  mJxtaNetworkManager.getPeerGroup().getDiscoveryService().publish(mStunRtpServerAdvertisement,ADV_LIFE_TIME,ADV_LIFE_TIME/2);
-                                  mLog.info(mStunRtpServerAdvertisement + "published");
-                                 
-                          } catch (Exception e) {
-                                  mLog.error("Cannot publish StunRtpServerAdvertisement", e);
-                          }
-
-                  }
-
-          };
-          mPublishTimer.scheduleAtFixedRate(mPublishTask, 0, ADV_LIFE_TIME - ADV_LIFE_TIME/10);
-   }
-
-   public void stop() {
-      try {
-         mPublishTask.cancel();
-         mJxtaNetworkManager.getPeerGroup().getDiscoveryService().flushAdvertisement(mStunRtpServerAdvertisement);
-         mUdpSessionForStunRtp.close();
-      } catch (Exception e) {
-         mLog.error("cannot stop MediaResourceService",e);
-      }
-
-   }
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/media/MediaResoureUnreachableException.java b/p2pproxy/src/org/linphone/p2pproxy/core/media/MediaResoureUnreachableException.java
deleted file mode 100644 (file)
index a809879..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.linphone.p2pproxy.core.media;
-
-import org.linphone.p2pproxy.api.P2pProxyException;
-
-public class MediaResoureUnreachableException extends P2pProxyException {
-
-       private String mRourceAddress;
-       public MediaResoureUnreachableException() {
-               super();
-               // TODO Auto-generated constructor stub
-       }
-
-       public MediaResoureUnreachableException(String arg0, Throwable arg1) {
-               super(arg0, arg1);
-               // TODO Auto-generated constructor stub
-       }
-
-       public MediaResoureUnreachableException(String arg0) {
-               super(arg0);
-               // TODO Auto-generated constructor stub
-       }
-
-       public MediaResoureUnreachableException(Throwable arg0) {
-               super(arg0);
-               // TODO Auto-generated constructor stub
-       }
-       public void setRourceAddress(String anAddress) {
-               mRourceAddress = anAddress;
-       }
-       public String getResourceAddress() {
-               return mRourceAddress;
-       }
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/media/jxtaudpproxy/RtpSession.java b/p2pproxy/src/org/linphone/p2pproxy/core/media/jxtaudpproxy/RtpSession.java
deleted file mode 100644 (file)
index fa71f73..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.linphone.p2pproxy.core.media.jxtaudpproxy;
-
-import java.net.InetSocketAddress;
-
-public interface RtpSession {
-
-       public abstract void setRemoteAddress(InetSocketAddress aRemoteAddress);
-
-}
\ No newline at end of file
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/media/jxtaudpproxy/RtpSessionImpl.java b/p2pproxy/src/org/linphone/p2pproxy/core/media/jxtaudpproxy/RtpSessionImpl.java
deleted file mode 100644 (file)
index 6f0b5ae..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-UdpSession.java 
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.media.jxtaudpproxy;
-
-import java.io.IOException;
-import java.net.DatagramPacket;
-import java.net.DatagramSocket;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-import java.net.SocketException;
-import java.net.UnknownHostException;
-
-import net.jxta.pipe.OutputPipe;
-import net.jxta.pipe.PipeMsgEvent;
-import net.jxta.pipe.PipeMsgListener;
-import net.jxta.socket.JxtaSocket;
-
-
-public class RtpSessionImpl implements PipeMsgListener, RtpSession{
-       UdpSession mRtpChannel = null;
-       UdpSession mRtcpChannel = null;
-       int mLocalRtpPort;
-
-       public RtpSessionImpl(int portStart, String aDomaineName) throws IOException {
-               mLocalRtpPort = portStart;
-               while (mRtpChannel == null) {
-                       try {
-                               mRtpChannel = new UdpSession(mLocalRtpPort ,aDomaineName+"-RTP");
-                               mRtcpChannel = new UdpSession(mLocalRtpPort +1 ,aDomaineName+"-RCTP");
-                       }catch (Exception e) {
-                               //nop already used
-                               mLocalRtpPort += 2;
-                       }
-
-               }
-       }
-       /* (non-Javadoc)
-        * @see org.linphone.p2pproxy.core.jxtaudpproxy.RtpSession#setRemoteAddress(java.net.InetSocketAddress)
-        */
-       public void setRemoteAddress( InetSocketAddress aRemoteAddress) {
-               mRtpChannel.setRemoteAddress(aRemoteAddress);
-               InetSocketAddress lRtcpInetSocketAddress = new InetSocketAddress(aRemoteAddress.getAddress(),aRemoteAddress.getPort() + 1);
-               mRtcpChannel.setRemoteAddress(lRtcpInetSocketAddress);
-       }
-       public void setRemotePipe(OutputPipe aRemotePipe) {
-               mRtpChannel.setRemotePipe(aRemotePipe);
-               mRtcpChannel.setRemotePipe(aRemotePipe);
-       }
-       public void close() {
-               mRtpChannel.close();
-               mRtcpChannel.close();
-       }
-       public int getPort() {
-               return mRtpChannel.getPort();
-       }
-       public String toString() {
-               return "rtp ["+mRtpChannel+"] rtcp "+mRtcpChannel+"]";
-       }
-       public void pipeMsgEvent(PipeMsgEvent event) {
-               mRtpChannel.pipeMsgEvent(event);
-               mRtcpChannel.pipeMsgEvent(event);
-       }
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/media/jxtaudpproxy/SdpProcessorImpl.java b/p2pproxy/src/org/linphone/p2pproxy/core/media/jxtaudpproxy/SdpProcessorImpl.java
deleted file mode 100644 (file)
index 36da0dc..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-SdpProcessorImpl.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.media.jxtaudpproxy;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.util.Map;
-
-import net.jxta.pipe.OutputPipe;
-
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.core.Configurator;
-
-import org.linphone.p2pproxy.core.sipproxy.SdpProcessor;
-import org.linphone.p2pproxy.core.sipproxy.SipProxyRegistrar;
-import org.linphone.p2pproxy.core.sipproxy.SipProxyRegistrar.Registration;
-import org.linphone.p2pproxy.core.sipproxy.peers.NetworkResources;
-import org.zoolu.sdp.AttributeField;
-import org.zoolu.sdp.ConnectionField;
-import org.zoolu.sdp.MediaDescriptor;
-import org.zoolu.sdp.MediaField;
-import org.zoolu.sdp.SessionDescriptor;
-import org.zoolu.sip.message.Message;
-
-public class SdpProcessorImpl implements SdpProcessor {
-   private final static Logger mLog = Logger.getLogger(SdpProcessorImpl.class);
-   private final Map<String,Registration> mRegistrationTab;
-   private final Configurator mProperties;
-   public SdpProcessorImpl(Map<String,Registration> aRegistrationTab,Configurator aProperties) {
-      mRegistrationTab = aRegistrationTab;
-      mProperties = aProperties;;
-   }
-   /*
-    * process SDP in mode relay
-    * rewrite sdp.
-    */
-   public void processSdpBeforeSendingToSipUA( Message aMessage) throws P2pProxyException {
-      try {
-         //check if sdp present
-         if (aMessage.hasBody() && "application/sdp".equals(aMessage.getBodyType())) {
-            SessionDescriptor lOrigSessionDescriptor = new SessionDescriptor(aMessage.getBody());
-            SessionDescriptor lNewSessionDescriptor = new SessionDescriptor(aMessage.getBody());
-            lNewSessionDescriptor.removeMediaDescriptors();
-            lNewSessionDescriptor.setConnection(null);
-
-            String lUserName="";
-            if (aMessage.isInvite()) {
-               lUserName = aMessage.getToHeader().getNameAddress().getAddress().toString();
-            } else if (aMessage.isResponse()) {
-               lUserName = aMessage.getFromHeader().getNameAddress().getAddress().toString();
-            } else if (aMessage.isAck()) {
-               lUserName = aMessage.getToHeader().getNameAddress().getAddress().toString();
-            } else {
-               mLog.warn("strange, sdp in message ["+aMessage+"]");
-            }
-            // build rtp session if required
-            NetworkResources lNetworkResources = buildRtpSessions(lOrigSessionDescriptor, lUserName);
-
-            for (Object lMediaDescriptorObject :lOrigSessionDescriptor.getMediaDescriptors()) {
-               MediaDescriptor lMediaDescriptor = (MediaDescriptor)lMediaDescriptorObject;
-               RtpSessionImpl lRtpSession = lNetworkResources.getRtpSession(lMediaDescriptor.getMedia().getMedia()); 
-               // create new media desc
-               ConnectionField lConnectionField = new ConnectionField("IP4",InetAddress.getLocalHost().getHostAddress());
-               MediaField lOrigMediaField = lMediaDescriptor.getMedia();
-               MediaField lNewMediaField = new MediaField(lOrigMediaField.getMedia()
-                     , lRtpSession.getPort() //new port
-                     , 0
-                     , lOrigMediaField.getTransport()
-                     , lOrigMediaField.getFormatList());
-               MediaDescriptor lNewMediaDescriptor = new MediaDescriptor(lNewMediaField,lConnectionField);
-               for (Object lAttributeField:lMediaDescriptor.getAttributes()) {
-                  lNewMediaDescriptor.addAttribute((AttributeField) lAttributeField);
-               }
-               lNewSessionDescriptor.addMediaDescriptor(lNewMediaDescriptor);
-
-            }
-            aMessage.setBody(lNewSessionDescriptor.toString());
-            mLog.debug("new sdp:" +aMessage.getBody());
-
-         }
-      }catch (Exception e) {
-         throw new P2pProxyException(e);
-      }
-
-   }
-   public void processSdpAfterSentToPipe( Message aMessage,OutputPipe lOutputPipe) throws P2pProxyException {
-      try {
-         if (aMessage.hasBody() && "application/sdp".equals(aMessage.getBodyType())) {
-            SessionDescriptor lOrigSessionDescriptor = new SessionDescriptor(aMessage.getBody());
-            String lUserName="";
-            if (aMessage.isInvite()) {
-               lUserName = aMessage.getFromHeader().getNameAddress().getAddress().toString();
-            } else if (aMessage.isResponse()) {
-               lUserName = aMessage.getToHeader().getNameAddress().getAddress().toString();
-            } else if (aMessage.isAck()) {
-               lUserName = aMessage.getFromHeader().getNameAddress().getAddress().toString();
-            } else {
-               mLog.warn("strange, sdp in message ["+aMessage+"]");
-            }
-            // build rtp session if required
-            NetworkResources lNetworkResources = buildRtpSessions(lOrigSessionDescriptor, lUserName,lOutputPipe);
-            
-            // check remote address
-            ConnectionField lConnectionField = lOrigSessionDescriptor.getConnection();
-            //search from m blocs
-            for (Object lMediaDescriptorObject :lOrigSessionDescriptor.getMediaDescriptors()) {
-               MediaDescriptor lMediaDescriptor = (MediaDescriptor)lMediaDescriptorObject;
-               if (lConnectionField == null ) {
-                  lConnectionField = lMediaDescriptor.getConnection();
-               }
-               RtpSession lRtpSession = lNetworkResources.getRtpSession(lMediaDescriptor.getMedia().getMedia());
-               InetAddress lInetAddress =  InetAddress.getByName(lConnectionField.getAddress());
-               InetSocketAddress lInetSocketAddress = new InetSocketAddress(lInetAddress,lMediaDescriptor.getMedia().getPort());
-               lRtpSession.setRemoteAddress(lInetSocketAddress);
-               mLog.info("rtp session updated ["+lRtpSession+"]");
-            }
-            // 
-
-         }       
-      }catch (Exception e) {
-         throw new P2pProxyException(e);
-      }
-
-   }
-   private NetworkResources buildRtpSessions(SessionDescriptor lSessionDescriptor , String aFrom) throws P2pProxyException {
-          return buildRtpSessions(lSessionDescriptor , aFrom,null);
-   }
-   private NetworkResources buildRtpSessions(SessionDescriptor lSessionDescriptor , String aFrom,OutputPipe aRemotePipe) throws P2pProxyException {
-      try { 
-         // get Registration 
-         Registration lRegistration = mRegistrationTab.get(aFrom);
-
-         for (Object lMediaDescriptorObject :lSessionDescriptor.getMediaDescriptors()) {
-            MediaDescriptor lMediaDescriptor = (MediaDescriptor)lMediaDescriptorObject;
-            //1 check if port != 0
-            if (lMediaDescriptor.getMedia().getPort() == 0) {
-               // nothing to change, offers rejected
-               break;
-            }
-            //3 open datagram socket
-            if (lMediaDescriptor.getMedia().getTransport().equalsIgnoreCase("RTP/AVP") == false) { 
-               mLog.warn("enable to process non udp mlines ["+lMediaDescriptor.getMedia().getTransport()+"]");
-               break;
-            }
-
-            String lMLineName = lMediaDescriptor.getMedia().getMedia();
-            RtpSessionImpl lRtpSession = null;
-            if (((NetworkResources) lRegistration.NetResources).hasRtpSession(lMLineName) == false) {
-               // first time, just create
-               int lPortStart = 15000;
-               lRtpSession = new RtpSessionImpl (lPortStart,lMLineName);
-               ((NetworkResources) lRegistration.NetResources).putRtpSession(lMLineName, lRtpSession);
-            } else {
-               lRtpSession = ((NetworkResources) lRegistration.NetResources).getRtpSession(lMLineName);
-            }
-            if (aRemotePipe != null) {
-                lRtpSession.setRemotePipe(aRemotePipe);
-            }
-
-         }
-         return (NetworkResources) lRegistration.NetResources;
-      }catch (Exception e) {
-         throw new P2pProxyException(e);
-      }
-
-   }
-   public void processSdpBeforeSendingToPipe(Message message) throws P2pProxyException {
-      // TODO Auto-generated method stub
-
-   }
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/media/jxtaudpproxy/UdpSession.java b/p2pproxy/src/org/linphone/p2pproxy/core/media/jxtaudpproxy/UdpSession.java
deleted file mode 100644 (file)
index 312b899..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-package org.linphone.p2pproxy.core.media.jxtaudpproxy;
-
-import java.io.IOException;
-import java.net.DatagramPacket;
-import java.net.DatagramSocket;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.SocketException;
-import java.net.UnknownHostException;
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.core.GenericUdpSession;
-
-import net.jxta.endpoint.ByteArrayMessageElement;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.pipe.OutputPipe;
-import net.jxta.pipe.PipeMsgEvent;
-import net.jxta.pipe.PipeMsgListener;
-
-public class UdpSession implements GenericUdpSession.MessageHandler ,PipeMsgListener{
-   private final static Logger mLog = Logger.getLogger(UdpSession.class);   
-   private  InetSocketAddress mRemoteAddress;
-   private OutputPipe mRemotePipe;
-   private boolean mExit = false;
-   private final String mMessageName;
-   private final GenericUdpSession mGenericUdpSession;
-   UdpSession(int aPort,String aMessageName) throws SocketException, UnknownHostException {
-      mMessageName = aMessageName;
-      mGenericUdpSession = new GenericUdpSession(new InetSocketAddress(aPort),this);
-   }
-
-
-
-   public void pipeMsgEvent(PipeMsgEvent event) {
-      MessageElement lMessageElement = event.getMessage().getMessageElement(mMessageName);
-      if (lMessageElement == null) {
-         //nop, this is not for me
-         return;
-      }
-      //test if we have an address to forward to
-      if (mRemoteAddress == null) {
-         mLog.warn("no remote adress, message discarded");
-         return;
-      }
-      byte[] lBuff = lMessageElement.getBytes(false);
-      DatagramPacket lDatagramPacket = new DatagramPacket(lBuff,(int) lMessageElement.getByteLength());
-      lDatagramPacket.setSocketAddress(mRemoteAddress);
-      try {
-         mGenericUdpSession.getSocket().send(lDatagramPacket);
-         mLog.debug("message from ["+mMessageName+"] sent to ["+mRemoteAddress+"]");
-      } catch (IOException e) {
-         mLog.error("cannot send message for session ["+this+"]" , e);
-      }
-      //
-   }
-   public void setRemoteAddress( InetSocketAddress aRemoteAddress) {
-      mRemoteAddress = aRemoteAddress;
-   }
-   public void setRemotePipe(OutputPipe aRemotePipe) {
-      mRemotePipe = aRemotePipe;
-   }
-   public void close() {
-      mExit = true;
-      mGenericUdpSession.close();
-   }
-
-   public String toString() {
-      return "name ["+mMessageName +"] udp dest ["+mRemoteAddress+"]";
-   }
-   public int getPort() {
-      return mGenericUdpSession.getSocket().getPort();
-   }
-   public void onMessage(DatagramPacket message) {
-      try {
-         // if destination is known just send
-         if (mRemotePipe != null) {
-            net.jxta.endpoint.Message lMessage = new net.jxta.endpoint.Message();
-            ByteArrayMessageElement lByteArrayMessageElement = new ByteArrayMessageElement(mMessageName, null,message.getData(),0,message.getLength(), null);
-            lMessage.addMessageElement(mMessageName, lByteArrayMessageElement);
-            //send the message
-            mRemotePipe.send(lMessage);
-            mLog.debug("message from ["+message.getAddress()+":"+message.getPort()+"]sent to ["+mRemotePipe.getPipeID()+"]");
-         } else {
-            mLog.warn("output pipe not set for ["+this+"], discarding message");
-         }
-      }catch(Exception e) {
-         //nop
-      }
-
-   }
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/AddressRequest.java b/p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/AddressRequest.java
deleted file mode 100644 (file)
index 4bc2f3e..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-RouteAddRequest.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.media.rtprelay;
-
-import java.io.Serializable;
-import java.net.SocketAddress;
-
-public class AddressRequest implements Serializable {
-   private static final long serialVersionUID = 1L;
-   
-   public AddressRequest() {
-
-   }
-   
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/AddressResponse.java b/p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/AddressResponse.java
deleted file mode 100644 (file)
index c400697..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-RouteAddResponse.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.media.rtprelay;
-
-import java.io.Serializable;
-import java.net.InetSocketAddress;
-import java.util.Map;
-
-public class AddressResponse implements Serializable {
-   private static final long serialVersionUID = 1L;
-   private final Map<MediaType,InetSocketAddress> mAddressTable;
-   public AddressResponse(Map<MediaType,InetSocketAddress> anAddressTable) {
-      mAddressTable = anAddressTable;
-   }
-   /**
-    * @return Returns the mMediaType.
-    */
-   public Map<MediaType,InetSocketAddress> getAddressTable() {
-      return mAddressTable;
-   }
-   
-   public String toString() {
-      StringBuffer lReturnString = new StringBuffer();
-      for (MediaType lMediaType:mAddressTable.keySet()) {
-         lReturnString.append(mAddressTable.get(lMediaType)+" for type "+lMediaType+" :");
-      }
-      return lReturnString.toString();
-   }
-   
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/IceSdpProcessorImpl.java b/p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/IceSdpProcessorImpl.java
deleted file mode 100644 (file)
index 7a0b793..0000000
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-SdpProcessorImpl.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.media.rtprelay;
-
-import java.net.InetSocketAddress;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import net.jxta.pipe.OutputPipe;
-
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.api.P2pProxyRtpRelayManagement;
-import org.linphone.p2pproxy.core.sipproxy.SdpProcessor;
-import org.linphone.p2pproxy.core.sipproxy.SipProxyRegistrar.Registration;
-import org.zoolu.sdp.AttributeField;
-import org.zoolu.sdp.ConnectionField;
-import org.zoolu.sdp.MediaDescriptor;
-import org.zoolu.sdp.MediaField;
-import org.zoolu.sdp.SessionDescriptor;
-import org.zoolu.sip.message.Message;
-
-/**
- * rewrite SDP to insert an ICE aware rtp relay 
- *
- * 
- */
-public class IceSdpProcessorImpl implements SdpProcessor {
-   private final String CANDIDATE_RELAY_NAME="relay";
-
-   class CandidateAttributeParser {
-      final private  String mCandidateAttribute;
-
-      final private String mfoundation;
-      final private String mComponentId;
-      final private String mTransport;
-      final private String mPriority; 
-      final private String mConnectionAddress;
-      final private String mPort;    
-      final private String mType;    
-
-      public CandidateAttributeParser(String aCandidateAttribute){
-         mCandidateAttribute = aCandidateAttribute;
-         StringTokenizer st = new StringTokenizer(mCandidateAttribute);
-         mfoundation = st.nextToken();
-         mComponentId = st.nextToken();
-         mTransport = st.nextToken();
-         mPriority = st.nextToken(); 
-         mConnectionAddress = st.nextToken();
-         mPort = st.nextToken();
-         st.nextToken(); //skip typ
-         mType = st.nextToken();;
-      }
-      public CandidateAttributeParser(InetSocketAddress aRelayAddress){
-         mfoundation = "3";
-         mComponentId = "1";
-         mTransport = "UDP";
-         mPriority = "0"; 
-         mConnectionAddress =  aRelayAddress.getAddress().getHostAddress();
-         mPort =  String.valueOf(aRelayAddress.getPort());    
-         mType = CANDIDATE_RELAY_NAME; 
-         mCandidateAttribute = toString();
-      }
-
-      InetSocketAddress getAddress() {
-         return new InetSocketAddress(mConnectionAddress,Integer.parseInt(mPort));
-      }
-      public String toString() {
-         return mfoundation +" "+ mComponentId +" "+ mTransport +" "+ mPriority +" "+ mConnectionAddress +" "+ mPort +" typ " +mType;
-      }
-   }
-
-   private final static Logger mLog = Logger.getLogger(IceSdpProcessorImpl.class);
-   private final Map<String,Registration> mRegistrationTab;
-   private final P2pProxyRtpRelayManagement mP2pProxyRtpRelayManagement;
-   public IceSdpProcessorImpl(Map<String,Registration> aRegistrationTab,P2pProxyRtpRelayManagement aP2pProxyRtpRelayManagement) {
-      mRegistrationTab = aRegistrationTab;
-      mP2pProxyRtpRelayManagement = aP2pProxyRtpRelayManagement;
-
-   }
-   public void processSdpAfterSentToPipe(Message message, OutputPipe outputPipe)
-   throws P2pProxyException {
-      //nop
-
-   }
-
-   public void processSdpBeforeSendingToSipUA(Message aMessage) throws P2pProxyException {
-      String lUserName="";
-      if (aMessage.isInvite()) {
-         lUserName = aMessage.getToHeader().getNameAddress().getAddress().toString();
-      } else if (aMessage.isResponse()) {
-         lUserName = aMessage.getFromHeader().getNameAddress().getAddress().toString();
-      } else if (aMessage.isAck()) {
-         lUserName = aMessage.getToHeader().getNameAddress().getAddress().toString();
-      } else {
-         mLog.warn("strange, sdp in message ["+aMessage+"]");
-      }
-      processSdp(aMessage,lUserName);
-   }
-
-   public void processSdpBeforeSendingToPipe(Message aMessage) throws P2pProxyException {
-      String lUserName="";
-      if (aMessage.isInvite()) {
-         lUserName = aMessage.getFromHeader().getNameAddress().getAddress().toString();
-      } else if (aMessage.isResponse()) {
-         lUserName = aMessage.getToHeader().getNameAddress().getAddress().toString();
-      } else if (aMessage.isAck()) {
-         lUserName = aMessage.getFromHeader().getNameAddress().getAddress().toString();
-      } else {
-         mLog.warn("strange, sdp in message ["+aMessage+"]");
-      }
-      processSdp(aMessage,lUserName);
-   }
-
-   //check if already have relay candidate
-   //1 search for relay if not available
-   //2 rewrite c line /port
-   //3 add candidate
-   //4 if relay was available, clean relay  
-   private void processSdp(Message aMessage, String aUserName) throws P2pProxyException {
-      //check if sdp present
-      if (aMessage.hasBody() && "application/sdp".equals(aMessage.getBodyType())) {
-         SessionDescriptor lOrigSessionDescriptor = new SessionDescriptor(aMessage.getBody());
-
-         SessionDescriptor lNewSessionDescriptor = new SessionDescriptor(aMessage.getBody());
-         lNewSessionDescriptor.removeMediaDescriptors();
-         lNewSessionDescriptor.setConnection(null);
-
-         // get Registration 
-         Registration lRegistration = mRegistrationTab.get(aUserName);
-         if (lRegistration == null) {
-            throw new P2pProxyException("unknown user ["+aUserName+"]");
-         }
-         boolean lrelayCandidateDetected = false;
-         //check if already have relay candidate
-         for (Object lMediaDescriptorObject :lOrigSessionDescriptor.getMediaDescriptors()) {
-            MediaDescriptor lMediaDescriptor = (MediaDescriptor)lMediaDescriptorObject;
-            MediaType lMediaType = MediaType.parseString(lMediaDescriptor.getMedia().getMedia());
-            String lRelayCandidateValue = getRelayCandidate(lMediaDescriptor); 
-
-            if (lRelayCandidateValue != null) {
-               if (lRegistration.RtpRelays.containsKey(lMediaType) == false) {// get relay address from from candidate
-                  CandidateAttributeParser lCandidateAttributeParser = new CandidateAttributeParser(lRelayCandidateValue);
-                  lRegistration.RtpRelays.put(lMediaType, lCandidateAttributeParser.getAddress());
-                  mLog.info("relay candidate detected, adding relay ["+lCandidateAttributeParser.getAddress()+" for ["+lMediaDescriptor.getMedia().getMedia()+"]");
-               } else {
-                  lRegistration.RtpRelays.remove(lMediaType);
-                  mLog.info("relay candidate  removing address ");
-               }
-               lrelayCandidateDetected = true;
-            } else {
-               InetSocketAddress lInetSocketAddress=null;
-               if (lRegistration.RtpRelays.containsKey(lMediaType) == false) {
-                  //put relay candidate from network
-                  lRegistration.RtpRelays = mP2pProxyRtpRelayManagement.getAddresses();
-                  lInetSocketAddress = lRegistration.RtpRelays.get(lMediaType);
-               } else {
-                  lInetSocketAddress = lRegistration.RtpRelays.get(lMediaType);
-                  lRegistration.RtpRelays.remove(lMediaType);
-                  mLog.info("no relay candidate relay removing address ");
-               }
-
-               // build candidate attribute
-               CandidateAttributeParser lCandidateAttributeParser = new CandidateAttributeParser(lInetSocketAddress );
-               // create new media desc
-               ConnectionField lConnectionField = new ConnectionField("IP4",lInetSocketAddress.getAddress().getHostAddress());
-               MediaField lOrigMediaField = lMediaDescriptor.getMedia();
-               MediaField lNewMediaField = new MediaField(lOrigMediaField.getMedia()
-                     , lInetSocketAddress.getPort() //new port
-                     , 0
-                     , lOrigMediaField.getTransport()
-                     , lOrigMediaField.getFormatList());
-               MediaDescriptor lNewMediaDescriptor = new MediaDescriptor(lNewMediaField,lConnectionField);
-               for (Object lAttributeField:lMediaDescriptor.getAttributes()) {
-                  lNewMediaDescriptor.addAttribute((AttributeField) lAttributeField);
-               }
-               // add relay candidate
-               AttributeField lAttributeField = new AttributeField("candidate", lCandidateAttributeParser.toString());
-               lNewMediaDescriptor.addAttribute(lAttributeField);
-               lNewSessionDescriptor.addMediaDescriptor(lNewMediaDescriptor);
-            } 
-
-         }
-         if (lrelayCandidateDetected == false) {
-                //to work-around mjsip bug
-                lNewSessionDescriptor.setConnection(((MediaDescriptor)lNewSessionDescriptor.getMediaDescriptors().elementAt(0)).getConnection());
-                aMessage.setBody(lNewSessionDescriptor.toString());
-            mLog.debug("new sdp:" +aMessage.getBody());
-         }
-
-      }
-   }
-
-   private String getRelayCandidate(MediaDescriptor aMediaDescriptor) {
-      //1 get candidate
-      for (Object lField:aMediaDescriptor.getAttributes()) {
-         AttributeField lAttributeField = (AttributeField)lField;
-         if (lAttributeField.getAttributeName().equalsIgnoreCase("candidate") && lAttributeField.getAttributeValue().contains(CANDIDATE_RELAY_NAME)) {
-            return lAttributeField.getAttributeValue();
-         }
-      }
-      return null;
-   }
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/MediaType.java b/p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/MediaType.java
deleted file mode 100644 (file)
index 3761b88..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-MediaType.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.media.rtprelay;
-
-import org.linphone.p2pproxy.api.P2pProxyException;
-
-public enum MediaType {
-   audio,video,any;
-   static MediaType parseString (String value) throws P2pProxyException{
-      if ("audio".equals(value)) {
-         return audio;
-      } else if("video".equals(value)) {
-         return video;
-      } else if("any".equals(value)) {
-         return any;
-      } else {
-         throw new P2pProxyException("unknown media type ["+value+"]");
-      }
-   }
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/RouteAddRequest.java b/p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/RouteAddRequest.java
deleted file mode 100644 (file)
index 7bf52c5..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-RouteAddRequest.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.media.rtprelay;
-
-import java.io.Serializable;
-import java.net.SocketAddress;
-
-public class RouteAddRequest implements Serializable {
-   private final SocketAddress mSource;
-   private final SocketAddress mDest;
-   private final MediaType mMediaType;
-   private static final long serialVersionUID = 1L;
-   public RouteAddRequest(SocketAddress aSource, SocketAddress aDest,MediaType aMediaType) {
-      mSource = aSource;
-      mDest = aDest;
-      mMediaType = aMediaType;
-   }
-   /**
-    * @return Returns the mSource.
-    */
-   public SocketAddress getSource() {
-      return mSource;
-   }
-   /**
-    * @return Returns the mDest.
-    */
-   public SocketAddress getDest() {
-      return mDest;
-   }
-   /**
-    * @return Returns the mMediaType.
-    */
-   public MediaType getMediaType() {
-      return mMediaType;
-   }
-   public String toString() {
-      return "source ["+mSource+"] dest ["+mDest+"] type ["+mMediaType+"]";
-   }
-   
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/RouteAddResponse.java b/p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/RouteAddResponse.java
deleted file mode 100644 (file)
index 106cf1b..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-RouteAddResponse.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.media.rtprelay;
-
-import java.io.Serializable;
-import java.net.SocketAddress;
-
-public class RouteAddResponse implements Serializable {
-   private static final long serialVersionUID = 1L;
-   private final SocketAddress mSocketAddress;
-   private final MediaType mMediaType;
-   
-   public RouteAddResponse(SocketAddress aSocketAddress,MediaType aMediaType) {
-      mSocketAddress = aSocketAddress;
-      mMediaType =aMediaType;
-   }
-   public String toString() {
-      return "sdp adress ["+mSocketAddress+"] type ["+mMediaType+"]";
-   }
-   /**
-    * @return Returns the mMediaType.
-    */
-   public MediaType getMediaType() {
-      return mMediaType;
-   }
-   /**
-    * @return Returns the mSocketAddress.
-    */
-   public SocketAddress getSocketAddress() {
-      return mSocketAddress;
-   }
-   
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/RoutingTable.java b/p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/RoutingTable.java
deleted file mode 100644 (file)
index c1afd50..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-RoutingTable.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.media.rtprelay;
-
-
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyException;
-
-public class RoutingTable implements RtpRoutingRules {
-   private final static Logger mLog = Logger.getLogger(RoutingTable.class);
-   static private RoutingTable mInstance = new RoutingTable();
-   private final Map<SocketAddress,SocketAddress> mTable = new HashMap<SocketAddress,SocketAddress>();
-   
-   private RoutingTable() {
-      
-   }
-   static public RoutingTable getInstance() {
-      return mInstance;
-   }
-   /**
-    * @param aSource
-    * @return null if not found
-    */
-   public SocketAddress getRoute(SocketAddress aSource) {
-      return mTable.get(aSource);
-   }
-   public void addRoute(int anSsrc, InetSocketAddress source) {
-      mLog.info("route for ["+anSsrc+"] dest ["+source+"] added");
-      
-   }
-   public SocketAddress getRoute(int anSsrc) throws P2pProxyException {
-      // TODO Auto-generated method stub
-      return null;
-   }
-   public void removeRoute(int anSsrc) {
-      mLog.info("route for ["+anSsrc+"] removed");
-   }
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/RtpRelayServer.java b/p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/RtpRelayServer.java
deleted file mode 100644 (file)
index 9f8fc1f..0000000
+++ /dev/null
@@ -1,334 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-UdpSession.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.media.rtprelay;
-
-import java.io.IOException;
-import java.net.DatagramPacket;
-import java.net.DatagramSocket;
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-import java.net.SocketException;
-import java.net.UnknownHostException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Timer;
-import java.util.TimerTask;
-
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.core.GenericUdpSession;
-
-
-
-public class RtpRelayServer implements GenericUdpSession.MessageHandler {
-   private final static Logger mLog = Logger.getLogger(RtpRelayServer.class);
-   private final DatagramSocket mSocket;
-   
-   
-   class RoutingTable {
-      class GarbageCollectorTask extends TimerTask {
-
-         public void run() {
-            synchronized (RtpRelayServer.RoutingTable.this) {
-               for (RoutingElement lElement :new HashMap <String,RoutingElement>(mSessionIdTable).values()) {
-                  if (System.currentTimeMillis() - lElement.getLastAccess() > mMaxSilenceDuration) {
-                         mLog.info("removing element ["+lElement+"]");
-                         mSessionIdTable.remove(lElement.mSessionId);
-                         mSsrcElementTable.remove(lElement.mSsrcA);
-                         mSsrcElementTable.remove(lElement.mSsrcB);
-                  }
-               }
-            }
-         }
-      }
-      class RoutingElement {
-         //private final String mSessionId;
-         private SocketAddress mPeerARtp;
-         private SocketAddress mPeerARtcp;
-         private long mSsrcA;
-         private  SocketAddress mPeerBRtp;
-         private  SocketAddress mPeerBRtcp;
-         private long mSsrcB;
-         private long mLastDestAddressAccess = System.currentTimeMillis();
-         private final String mSessionId;
-         RoutingElement(long aSsrc, String aSessionId) {
-            mSsrcA = aSsrc;
-            mSessionId = aSessionId;
-         }
-         void setPeerAddress(SocketAddress aReceivedAddress,long aSsrc,boolean isRtcp) {
-            if (aSsrc == mSsrcA ) {
-               if (isRtcp) {
-                  mPeerARtcp = aReceivedAddress;
-               } else {
-                  mPeerARtp = aReceivedAddress;
-               }
-            } else if (aSsrc == mSsrcB) {
-               if (isRtcp) {
-                  mPeerBRtcp = aReceivedAddress;
-               } else {
-                  mPeerBRtp = aReceivedAddress;
-               }
-            } else {
-               mLog.warn("ssrc ["+aSsrc+" not found for ["+aReceivedAddress+"]");
-            }
-         }
-         void setPeerBSsrc(long aSsrc) {
-            mSsrcB = aSsrc;
-         }
-         public SocketAddress getDestAddr(long aSourceSsrc,boolean isRtcp) throws P2pProxyException{
-            mLastDestAddressAccess = System.currentTimeMillis();
-            if (aSourceSsrc == mSsrcA && isRtcp) {
-               if  ( mPeerBRtcp != null) {
-                  return mPeerBRtcp ;
-               } else {
-                  throw new P2pProxyException("PeerBRtcp not found for ssrc ["+aSourceSsrc+"]");
-               }
-            } else if (aSourceSsrc == mSsrcA && !isRtcp) {
-
-               if  ( mPeerBRtp != null) {
-                  return mPeerBRtp ;
-               } else {
-                  throw new P2pProxyException("PeerBRtp not found for ssrc ["+aSourceSsrc+" ");
-               }
-            } else if (aSourceSsrc == mSsrcB && isRtcp) {
-
-               if  ( mPeerARtcp != null) {
-                  return mPeerARtcp ;
-               } else {
-                  throw new P2pProxyException("PeerARtcp not found for ssrc ["+aSourceSsrc+" ");
-               }
-            } else if (aSourceSsrc == mSsrcB && !isRtcp) {
-
-               if  ( mPeerARtp != null) {
-                  return mPeerARtp ;
-               } else {
-                  throw new P2pProxyException("PeerARtp not found for ssrc ["+aSourceSsrc+" ");
-               }
-            }else {
-               throw new P2pProxyException("ssrc ["+aSourceSsrc+" not found");
-            }
-
-         }
-         public long getLastAccess() {
-            return mLastDestAddressAccess;
-         }
-         public String toString() {
-                return "Session id ["+mSessionId+"] ssrc a ["+mSsrcA+"] rtp source ["+mPeerARtp+"] rtcp source ["+mPeerARtcp+"]"
-                               +"ssrc b ["+mSsrcB+"] rtp source ["+mPeerBRtp+"] rtcp source ["+mPeerBRtcp+"]";
-         }
-      }
-      private final Map <String,RoutingElement> mSessionIdTable =  new HashMap <String,RoutingElement>();
-      private final Map <Long,RoutingElement> mSsrcElementTable =  new HashMap <Long,RoutingElement>();
-      private final long mMaxSilenceDuration ;
-      private final long mGCPeriod;
-      Timer mTimer = new Timer("Routing Elements GC");
-
-      public RoutingTable (long aMaxSilenceDuration, long aGCPeriod) {
-         mMaxSilenceDuration = aMaxSilenceDuration;
-         mGCPeriod = aGCPeriod;
-         mTimer.scheduleAtFixedRate(new GarbageCollectorTask(), 0, mGCPeriod);
-      }
-      public synchronized boolean containsSessionId(String aSessionId) {
-         return mSessionIdTable.containsKey(aSessionId);
-      }
-
-      public synchronized void addRoutingElement(String aSessionId, long aSsrc) {
-         if (mLog.isInfoEnabled()) mLog.info("add routing element for session id ["+aSessionId+"] with ssrc ["+aSsrc+"]");
-         RoutingElement lRoutingElement = new RoutingElement(aSsrc,aSessionId); 
-         mSessionIdTable.put(aSessionId, lRoutingElement);
-         mSsrcElementTable.put(aSsrc, lRoutingElement);
-      }
-
-      public synchronized void UpdateRoutingElement(String aSessionId, long aSsrc) {
-         if (mLog.isInfoEnabled()) mLog.info("update routing element session id ["+aSessionId+"] with ssrc ["+aSsrc+"]");
-         RoutingElement lRoutingElement = mSessionIdTable.get(aSessionId);
-         lRoutingElement.setPeerBSsrc(aSsrc);
-         mSsrcElementTable.put(aSsrc, lRoutingElement);
-         
-      }
-      
-      public synchronized void updateSourceAddress(long aSsrc, SocketAddress aSocketAddress,boolean isRtcp) throws P2pProxyException{
-         if (mSsrcElementTable.containsKey(aSsrc) == false) {
-            throw new P2pProxyException("No routing element present for ssrc["+aSsrc+"]");
-         }
-         if (mLog.isInfoEnabled()) mLog.info("update routing element for ssrc ["+aSsrc+"] with address ["+aSocketAddress+"]" );
-         RoutingElement lRoutineElement = mSsrcElementTable.get(aSsrc);
-         lRoutineElement.setPeerAddress(aSocketAddress, aSsrc, isRtcp);
-      }
-      public synchronized SocketAddress getDestAddress(long aSsrc,boolean isRtcp) throws P2pProxyException{
-         //1 check if element exist for this ssrc
-         if (mSsrcElementTable.containsKey(aSsrc) == false) {
-            throw new P2pProxyException("No routing element present for ssrc["+aSsrc+"]");
-         }
-         RoutingElement lRoutingElement = mSsrcElementTable.get(aSsrc);
-         return lRoutingElement.getDestAddr(aSsrc, isRtcp);
-      }
-      public synchronized int getSize() {
-         return mSessionIdTable.size();
-      }
-   }
-   
-
-   
-   private static final String SESSIONID_NAME="RSID"; //Relay session Id 
-   private  final RoutingTable mRoutingTable;
-   public RtpRelayServer(DatagramSocket aListeningSocket) throws SocketException, UnknownHostException {
-      this(aListeningSocket,3600000,60000);
-   }
-   public RtpRelayServer(DatagramSocket aListeningSocket,long aMaxSilenceDuration, long aGCPeriod) throws SocketException, UnknownHostException {
-      mRoutingTable = new RoutingTable(aMaxSilenceDuration,aGCPeriod);
-      mSocket = aListeningSocket;
-     
-   }
-   public void onMessage(DatagramPacket aMessage) {
-      try {
-         if (mLog.isInfoEnabled()) mLog.info("new incoming message from ["+aMessage.getSocketAddress()+"]");
-         if (isRtpRtcpPacket(aMessage) == false) {
-            if (mLog.isInfoEnabled()) mLog.info("not rtp/rtcp packet skip");
-            return;
-         }
-         long lSsrc = getSsrc(aMessage);
-         if (isSessionIdPresent(aMessage)) {
-            String lSessionId = getSessionId(aMessage);
-            //1 check if already exist
-            if (mRoutingTable.containsSessionId(lSessionId)) {
-               //second call, update ssrc
-               mRoutingTable.UpdateRoutingElement(lSessionId,lSsrc);
-
-            } else {
-               //first call 
-               mRoutingTable.addRoutingElement(lSessionId,lSsrc); 
-            }
-         }
-         mRoutingTable.updateSourceAddress(lSsrc, aMessage.getSocketAddress(),isRtcp(aMessage));
-
-         SocketAddress lDestAddress = mRoutingTable.getDestAddress(lSsrc,isRtcp(aMessage));
-         //does not forward session id msg
-         if (!isSessionIdPresent(aMessage)) {
-            // ok forwarding
-            if (mLog.isInfoEnabled()) mLog.info("forwarding ["+aMessage.getLength()+"] bytes  from ["+aMessage.getSocketAddress()+"] to ["+lDestAddress+"]");
-            aMessage.setSocketAddress(lDestAddress);
-            mSocket.send(aMessage);
-         }
-      } catch (IOException e) {
-         mLog.error("cannot forward ["+aMessage+"]", e);
-      } catch (Exception e) {
-         mLog.warn("unknown destination for message from ["+aMessage.getSocketAddress()+"] discarding",e);
-
-      }      
-   }
-   public InetSocketAddress getInetSocketAddress() {
-      return (InetSocketAddress) mSocket.getLocalSocketAddress();
-   }
-   private long getSsrc(DatagramPacket aMessage) {
-//      The RTP header has the following format:
-//
-//         0                   1                   2                   3
-//         0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-//        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-//        |V=2|P|X|  CC   |M|     PT      |       sequence number         |
-//        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-//        |                           timestamp                           |
-//        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-//        |           synchronization source (SSRC) identifier            |
-//        +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
-//        |            contributing source (CSRC) identifiers             |
-//        |                             ....                              |
-//        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-      if (isRtcp(aMessage)) {
-         //rtcp packet
-         return  b2UB(aMessage.getData()[7]) 
-               + (b2UB(aMessage.getData()[6]) << 8) 
-               + (b2UB(aMessage.getData()[5]) << 16) 
-               + (b2UB(aMessage.getData()[4]) << 24);
-      } else {
-         //rtp packet 
-         return  b2UB(aMessage.getData()[11])
-               + (b2UB(aMessage.getData()[10]) << 8) 
-               + (b2UB(aMessage.getData()[9]) << 16) 
-               + (b2UB(aMessage.getData()[8]) << 24);
-      }
-      
-   }
-   private boolean isSessionIdPresent(DatagramPacket aMessage) {
-//    APP: Application-Defined RTCP Packet
-//
-//            0                   1                   2                   3
-//            0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-//           +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-//           |V=2|P| subtype |   PT=APP=204  |             length            |
-//           +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-//           |                           SSRC/CSRC                           |
-//           +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-//           |                          name (ASCII)                         |
-//           +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-//           |                   application-dependent data                ...
-//           +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-      if (b2UB(aMessage.getData()[1]) != 204) return false;
-      String aName =   String.valueOf((char)b2UB(aMessage.getData()[8])) 
-                     + String.valueOf((char)b2UB(aMessage.getData()[9]))
-                     + String.valueOf((char)b2UB(aMessage.getData()[10]))
-                     + String.valueOf((char)b2UB(aMessage.getData()[11]));
-      return SESSIONID_NAME.equalsIgnoreCase(aName);
-   }
-
-   private String getSessionId(DatagramPacket aMessage) throws P2pProxyException{
-//      APP: Application-Defined RTCP Packet
-//
-//      0                   1                   2                   3
-//      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-//     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-//     |V=2|P| subtype |   PT=APP=204  |             length            |
-//     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-//     |                           SSRC/CSRC                           |
-//     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-//     |                          name (ASCII)                         |
-//     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-//     |                   application-dependent data                ...
-//     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-      
-      if (isSessionIdPresent(aMessage) == false) {
-         throw new  P2pProxyException("Cannot find SessionId");
-      }
-      long lPacketLenght = 1 + b2UB(aMessage.getData()[3]) + (b2UB(aMessage.getData()[2]) << 8) ;
-      StringBuffer lSessionId = new StringBuffer();
-      for (int i = 12 ; i< lPacketLenght; i++) {
-         lSessionId.append(b2UB(aMessage.getData()[i]));
-      }
-      return lSessionId.toString();
-      
-   }
-   private boolean isRtcp(DatagramPacket aMessage) {
-      return b2UB(aMessage.getData()[1]) >= 200 ;
-   }
-   public static int b2UB(byte b) {
-      return b >= 0 ? b : 256 + b;
-   }
-   
-   //stats
-   public int getRoutingtableSize() {
-      return mRoutingTable.getSize();
-   }
-   boolean isRtpRtcpPacket(DatagramPacket aMessage) {
-      return (aMessage.getData()[0]  >> 6) != 0;
-   }
-   
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/RtpRelayServerConfig.java b/p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/RtpRelayServerConfig.java
deleted file mode 100644 (file)
index 9f49887..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.linphone.p2pproxy.core.media.rtprelay;
-
-import java.net.InetSocketAddress;
-
-/**
- */
-public class RtpRelayServerConfig {
-   private final InetSocketAddress mAudioVideoPublicSocketAddress;
-   private final InetSocketAddress mVideovideoPrivateSocketAddress;
-
-   public RtpRelayServerConfig(InetSocketAddress anAudioVideoPublicSocketAddress,InetSocketAddress anAudioVideoPrivateSocketAddress) {
-      mAudioVideoPublicSocketAddress = anAudioVideoPublicSocketAddress;
-      mVideovideoPrivateSocketAddress = anAudioVideoPrivateSocketAddress;
-   }
-
-   /**
-    * @return Returns the mAudioPublicSocketAddress.
-    */
-   public InetSocketAddress getAudioVideoPublicSocketAddress() {
-      return mAudioVideoPublicSocketAddress;
-   }
-   /**
-    * @return Returns the mVideoPublicSocketAddress.
-    */
-   public InetSocketAddress getAudioVideoPrivateSocketAddress() {
-      return mVideovideoPrivateSocketAddress;
-   }
-}
\ No newline at end of file
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/RtpRoutingRules.java b/p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/RtpRoutingRules.java
deleted file mode 100644 (file)
index 0660a77..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-RtpRoutingRules.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-package org.linphone.p2pproxy.core.media.rtprelay;
-
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-
-import org.linphone.p2pproxy.api.P2pProxyException;
-
-public interface RtpRoutingRules {
-   
-   /**
-    * add route for a given ssrc
-    * @param aSource
-    */
-   public void addRoute(int anSsrc, InetSocketAddress aSource); 
-   
-   /**
-    * remove route
-    * @param aSource
-    */
-   public void removeRoute(int anSsrc); 
-   
-   /**
-    * return dest address 
-    * @param aSource
-    * @return the destination address
-    * @throws P2pProxyException
-    */
-   public SocketAddress getRoute(int anSsrc) throws P2pProxyException;
-}
\ No newline at end of file
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/SdpProcessorImpl.java b/p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/SdpProcessorImpl.java
deleted file mode 100644 (file)
index 0618b45..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-SdpProcessorImpl.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.media.rtprelay;
-
-import java.net.InetSocketAddress;
-import java.util.Map;
-import net.jxta.pipe.OutputPipe;
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.api.P2pProxyRtpRelayManagement;
-import org.linphone.p2pproxy.core.sipproxy.SdpProcessor;
-import org.zoolu.sdp.AttributeField;
-import org.zoolu.sdp.MediaDescriptor;
-import org.zoolu.sdp.SessionDescriptor;
-import org.zoolu.sip.message.Message;
-
-/**
- * rewrite SDP to insert a=relay-add
- *
- * 
- */
-public class SdpProcessorImpl implements SdpProcessor {
-   private final String RELAY_ADDR_NAME="relay-addr";
-
-   private final static Logger mLog = Logger.getLogger(SdpProcessorImpl.class);
-   private final P2pProxyRtpRelayManagement mP2pProxyRtpRelayManagement;
-   public SdpProcessorImpl(P2pProxyRtpRelayManagement aP2pProxyRtpRelayManagement) {
-      mP2pProxyRtpRelayManagement = aP2pProxyRtpRelayManagement;
-
-   }
-   public void processSdpAfterSentToPipe(Message message, OutputPipe outputPipe)
-   throws P2pProxyException {
-      //nop
-
-   }
-
-   public void processSdpBeforeSendingToSipUA(Message aMessage) throws P2pProxyException {
-      //nop
-   }
-
-   public void processSdpBeforeSendingToPipe(Message aMessage) throws P2pProxyException {
-      if (aMessage.isInvite() || aMessage.isAck()) {
-         //check if sdp present
-         if (aMessage.hasBody() && "application/sdp".equals(aMessage.getBodyType())) {
-            SessionDescriptor lOrigSessionDescriptor = new SessionDescriptor(aMessage.getBody());
-            //check if already have relay-session-id
-            Map <MediaType,InetSocketAddress> lRelayAddresses = null;
-            for (Object lMediaDescriptorObject :lOrigSessionDescriptor.getMediaDescriptors()) {
-               MediaDescriptor lMediaDescriptor = (MediaDescriptor)lMediaDescriptorObject;
-               MediaType lMediaType = MediaType.parseString(lMediaDescriptor.getMedia().getMedia());
-               AttributeField lSessionID = lMediaDescriptor.getAttribute("relay-session-id");
-               AttributeField lRelayAddr = lMediaDescriptor.getAttribute(RELAY_ADDR_NAME);
-               if (lSessionID != null  && lRelayAddr == null) {
-                  //need to find a relay
-                  if (lRelayAddresses == null) lRelayAddresses = mP2pProxyRtpRelayManagement.getAddresses();
-                  if (lRelayAddresses.get(lMediaType) !=  null) {
-                     lRelayAddr = new AttributeField(RELAY_ADDR_NAME, lRelayAddresses.get(lMediaType).toString().substring(1));
-                     lMediaDescriptor.addAttribute(lRelayAddr);
-                     mLog.info("adding relay ["+lRelayAddr+ "to mline ["+lMediaType+"]");
-                  } else {
-                     mLog.warn("no relay for this media type ["+lMediaType+"]");
-
-                  }
-               }
-
-            } 
-         } else {
-            mLog.info("strange, sdp in message ["+aMessage+"]");
-         }
-      }
-   }
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/SingleAddressResponse.java b/p2pproxy/src/org/linphone/p2pproxy/core/media/rtprelay/SingleAddressResponse.java
deleted file mode 100644 (file)
index 5907c1e..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-SingleAddressResponse.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.media.rtprelay;
-
-import java.io.Serializable;
-import java.net.InetSocketAddress;
-
-
-public class SingleAddressResponse implements Serializable {
-   private static final long serialVersionUID = 1L;
-   private final InetSocketAddress mAddress;
-   public SingleAddressResponse(InetSocketAddress anAddress) {
-      mAddress = anAddress;
-   }
-   /**
-    * @return Returns the relay adress.
-    */
-   public InetSocketAddress getAddress() {
-      return mAddress;
-   }
-
-   public String toString() {
-
-      return mAddress.toString();
-   }
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/rdvautoconfig/AutoConfigService.java b/p2pproxy/src/org/linphone/p2pproxy/core/rdvautoconfig/AutoConfigService.java
deleted file mode 100644 (file)
index f30cf88..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-AutoConfigService.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.rdvautoconfig;
-
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-import java.util.Enumeration;
-
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.XMLDocument;
-import net.jxta.document.XMLElement;
-import net.jxta.impl.protocol.HTTPAdv;
-import net.jxta.impl.protocol.TCPAdv;
-import net.jxta.peergroup.PeerGroup;
-import net.jxta.protocol.TransportAdvertisement;
-
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.api.P2pProxyNetworkProbe;
-import org.linphone.p2pproxy.core.Configurator;
-import org.linphone.p2pproxy.core.JxtaNetworkManager;
-import org.linphone.p2pproxy.core.ServiceProvider;
-import org.linphone.p2pproxy.core.media.MediaResourceService;
-
-
-public class AutoConfigService implements ServiceProvider {
-   private final static Logger mLog = Logger.getLogger(AutoConfigService.class);
-   private final JxtaNetworkManager mJxtaNetworkManager;
-   private final Configurator mProperties;
-   private final int mRelayCapacity; 
-   private final P2pProxyNetworkProbe mP2pProxyManagement;
-   private InetAddress mPubliAddress;
-   public AutoConfigService(Configurator lProperties,JxtaNetworkManager aJxtaNetworkManager,P2pProxyNetworkProbe aServiceProvider) {
-      mJxtaNetworkManager = aJxtaNetworkManager; 
-      mProperties = lProperties;
-      mP2pProxyManagement = aServiceProvider;
-      mRelayCapacity = Integer.parseInt(lProperties.getProperty(JxtaNetworkManager.RELAY_CAPACITY, "100"));
-  }   
-   public void start(long aTimeOut) throws P2pProxyException {
-      try {
-         if(!mJxtaNetworkManager.isConnectedToRendezVous(aTimeOut))
-             throw new P2pProxyException("Cannot start peer info service because not connected to any rdv");
-         //check if capable
-
-         mLog.info("AutoConfigService started");
-     }
-     catch(Exception e) {
-         throw new P2pProxyException(e);
-     }
-
-   }
-
-   public void stop() {
-      mLog.info("AutoConfigService stopped");
-   }
-   private HTTPAdv getHttpAdv() throws P2pProxyException {
-
-      XMLDocument lHttpDoc = (XMLDocument) mJxtaNetworkManager.getPeerGroup().getConfigAdvertisement().getServiceParam(PeerGroup.httpProtoClassID);
-      if (lHttpDoc == null)  {
-         throw new P2pProxyException("cannot find HTTPAdv");
-      }
-      Enumeration lHttpChilds = lHttpDoc.getChildren( TransportAdvertisement.getAdvertisementType());
-      // get the HTTPAdv from TransportAdv
-      if( lHttpChilds.hasMoreElements() ) {
-         return (HTTPAdv) AdvertisementFactory.newAdvertisement( (XMLElement) lHttpChilds.nextElement() );
-      }  else {
-         throw new P2pProxyException("cannot find HTTPAdv from transport");
-      }
-   }
-   private TCPAdv getTcpAdv() throws P2pProxyException {
-             XMLDocument lTcpDoc = (XMLDocument) mJxtaNetworkManager.getPeerGroup().getConfigAdvertisement().getServiceParam(PeerGroup.tcpProtoClassID);
-             if (lTcpDoc == null)  {
-                throw new P2pProxyException("cannot find TCPAdv");
-             }
-             Enumeration lHttpChilds = lTcpDoc.getChildren( TransportAdvertisement.getAdvertisementType());
-             // get the HTTPAdv from TransportAdv
-             if( lHttpChilds.hasMoreElements() ) {
-                return (TCPAdv) AdvertisementFactory.newAdvertisement( (XMLElement) lHttpChilds.nextElement() );
-             }  else {
-                throw new P2pProxyException("cannot find TCPAdv from transport");
-             }
-          }
-   /**
-    * test if the peer is capable to behave as a superpeer
-    * @return
-    */
-   public boolean canIBehaveAsASuperPeer() {
-          boolean lHttpServerOk=false;
-          boolean lTcpServerOk=false;
-
-          try {
-//                1 check local ip
-             mPubliAddress = mP2pProxyManagement.getPublicIpAddress();
-                  //2 probe the http socket
-                     InetSocketAddress  lSocketAddress = new InetSocketAddress(mPubliAddress,getHttpAdv().getPort());
-                     lHttpServerOk = mP2pProxyManagement.probeSocket(lSocketAddress, P2pProxyNetworkProbe.Protocol.tcp);
-                          
-                  // 3 probe tcp socket
-                     lSocketAddress = new InetSocketAddress(mPubliAddress,getTcpAdv().getPort());
-                     lTcpServerOk = mP2pProxyManagement.probeSocket(lSocketAddress, P2pProxyNetworkProbe.Protocol.tcp);
-
-                     if (lTcpServerOk || lHttpServerOk) {
-                          mLog.info("can behave as a super peer :-)");
-                          return true;
-                  } else {
-                          mLog.info("cannot behave as a super peer :-(");
-                          return false;
-                  }
-          } catch (P2pProxyException e) {
-                  mLog.info("cannot behave as a super peer", e);
-                  return false;
-          }
-   }
-   public boolean startUdpProxyIfPossible() {
-      int lAudioVideoPort = Integer.parseInt(mProperties.getProperty(MediaResourceService.AUDIO_VIDEO_LOCAL_PORT,"16000"));
-      InetSocketAddress  lSocketAddress=null;
-      try {
-          lSocketAddress = new InetSocketAddress(mPubliAddress,lAudioVideoPort);
-          mP2pProxyManagement.probeSocket(lSocketAddress, P2pProxyNetworkProbe.Protocol.udp);
-         return true;
-      }catch (P2pProxyException e) {
-          mLog.info("cannot open audio server on ["+lSocketAddress+"]", e);
-      }      
-   return false;
-   }
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/rdvautoconfig/P2pproxyRdvListener.java b/p2pproxy/src/org/linphone/p2pproxy/core/rdvautoconfig/P2pproxyRdvListener.java
deleted file mode 100644 (file)
index 444c265..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-P2pproxyRdvListener.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.rdvautoconfig;
-
-import net.jxta.rendezvous.RendezvousEvent;
-import net.jxta.rendezvous.RendezvousListener;
-
-public class P2pproxyRdvListener implements RendezvousListener {
-
-   public void rendezvousEvent(RendezvousEvent event) {
-      // TODO Auto-generated method stub
-
-   }
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/rdvautoconfig/PeerInfoProvider.java b/p2pproxy/src/org/linphone/p2pproxy/core/rdvautoconfig/PeerInfoProvider.java
deleted file mode 100644 (file)
index 93c55eb..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-PeerInfoProvider.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.rdvautoconfig;
-
-import java.net.InetAddress;
-
-public interface PeerInfoProvider {
-   /**
-    * get the public address as found in the http header during the ping procedure.
-    * @param aPeerAddress jxta address
-    * @return an IP address  or null
-    */
-   public InetAddress getPublicAddress(String aPeerAddress);
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/rdvautoconfig/PeerInfoProviderService.java b/p2pproxy/src/org/linphone/p2pproxy/core/rdvautoconfig/PeerInfoProviderService.java
deleted file mode 100644 (file)
index 2e7f1d4..0000000
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-PeerInfoProviderService.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.rdvautoconfig;
-
-
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.net.DatagramPacket;
-import java.net.DatagramSocket;
-import java.net.InetAddress;
-import java.net.Socket;
-import java.net.SocketTimeoutException;
-import java.net.URI;
-
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.id.IDFactory;
-import net.jxta.platform.ModuleClassID;
-import net.jxta.platform.ModuleSpecID;
-import net.jxta.protocol.ModuleClassAdvertisement;
-import net.jxta.protocol.ModuleSpecAdvertisement;
-import net.jxta.protocol.PipeAdvertisement;
-import net.jxta.socket.JxtaServerSocket;
-
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.core.Configurator;
-import org.linphone.p2pproxy.core.JxtaNetworkManager;
-import org.linphone.p2pproxy.core.ServiceProvider;
-import org.linphone.p2pproxy.core.jxtaext.EndpointRegistry;
-
-
-
-public class PeerInfoProviderService implements Runnable,PeerInfoProvider,ServiceProvider{
-   private final JxtaNetworkManager mJxtaNetworkManager;
-   private final Configurator mProperties;
-   public final static String PEER_INFO_SERVICE_PIPE_ID="org.linphone.p2pproxy.PeerInfoProviderService.bidi-pipe.id";
-   private final static Logger mLog = Logger.getLogger(PeerInfoProviderService.class);
-   private JxtaServerSocket mJxtaServerSocket;
-   private Thread mSocketServerThread = new Thread(this,"PeerInfoProviderService server thread");
-   public final static String ADV_NAME = "JXTASPEC:LINPHONE-PEERINFO";  
-   private final static int SO_TIMOUT=3000;
-   public final static String PEERINFO_MODULE_CLASS_ID="org.linphone.p2pproxy.PeerInfoProviderService.module-class.id";
-   public final static String PEERINFO_MODULE_SPEC_ID="org.linphone.p2pproxy.PeerInfoProviderService.module-spec.id";
-   private boolean mExist = false; 
-   
-   public PeerInfoProviderService(Configurator lProperties,JxtaNetworkManager aJxtaNetworkManager) {
-       mJxtaNetworkManager = aJxtaNetworkManager; 
-       mProperties = lProperties;
-   }
-
-   public void start(long l)  throws P2pProxyException {
-      try {         
-         mLog.info("Start the PeerInfoProviderService daemon");
-         ModuleClassAdvertisement lModuleAdvertisement = (ModuleClassAdvertisement) AdvertisementFactory.newAdvertisement(ModuleClassAdvertisement.getAdvertisementType());
-
-         lModuleAdvertisement.setName("JXTAMOD:LINPHONE-PEERINFO");
-         lModuleAdvertisement.setDescription("Service to provide peer with data like its public ip,etc");
-
-         ModuleClassID lModuleClassID;
-         // to avoid ID creation at each start
-         if (mProperties.getProperty(PEERINFO_MODULE_CLASS_ID) == null) {
-            lModuleClassID = IDFactory.newModuleClassID();
-            mProperties.setProperty(PEERINFO_MODULE_CLASS_ID, lModuleClassID.toURI().toString());
-         } else {
-            lModuleClassID = (ModuleClassID) IDFactory.fromURI(URI.create(mProperties.getProperty(PEERINFO_MODULE_CLASS_ID)));
-         }
-         lModuleAdvertisement.setModuleClassID(lModuleClassID);
-
-         // publish local only
-         mJxtaNetworkManager.getPeerGroup().getDiscoveryService().publish(lModuleAdvertisement);
-
-         ModuleSpecAdvertisement lModuleSpecAdvertisement = (ModuleSpecAdvertisement)AdvertisementFactory.newAdvertisement(ModuleSpecAdvertisement.getAdvertisementType());
-         lModuleSpecAdvertisement.setName(ADV_NAME);
-         lModuleSpecAdvertisement.setVersion("Version 1.0");
-         lModuleSpecAdvertisement.setCreator("linphone.org");
-         // to avoid ID creation at each start
-         ModuleSpecID  lModuleSpecId;
-         if (mProperties.getProperty(PEERINFO_MODULE_SPEC_ID) == null) {
-            lModuleSpecId = IDFactory.newModuleSpecID(lModuleClassID);
-            mProperties.setProperty(PEERINFO_MODULE_SPEC_ID, lModuleSpecId.toURI().toString());
-         } else {
-            lModuleSpecId = (ModuleSpecID) IDFactory.fromURI(URI.create(mProperties.getProperty(PEERINFO_MODULE_SPEC_ID)));
-         }
-         lModuleSpecAdvertisement.setModuleSpecID(lModuleSpecId);
-         lModuleSpecAdvertisement.setSpecURI("http://www.linphone.org/peerinfo");
-
-         PipeAdvertisement lSocketAdvertisement = mJxtaNetworkManager.createPipeAdvertisement(PEER_INFO_SERVICE_PIPE_ID, "peer-info-service");
-
-         lModuleSpecAdvertisement.setPipeAdvertisement(lSocketAdvertisement);
-         mJxtaServerSocket = new JxtaServerSocket(mJxtaNetworkManager.getPeerGroup(), lSocketAdvertisement, 10);
-         mJxtaServerSocket.setSoTimeout(0);
-         mSocketServerThread.start();
-         //publish local only
-         mJxtaNetworkManager.getPeerGroup().getDiscoveryService().publish(lModuleSpecAdvertisement);
-         mLog.info("Adv ["+lModuleSpecAdvertisement+"] published");
-      }
-      catch(Exception e)
-      {
-         PeerInfoProviderService.mLog.error("socket instance error", e);
-      }        
-   }
-   public void stop() {
-          try {
-                  mJxtaServerSocket.close();
-          } catch (IOException e) {
-                  //nop
-          }
-          mExist = true;
-          mLog.info("PeerInfoProviderService stopped");
-   }
-
-   public void run() {
-      while (mExist) {
-         try {
-            mLog.info("Waiting for connection on ["+ADV_NAME+"]");
-             Socket lSocket = mJxtaServerSocket.accept();
-             // set reliable
-             if (lSocket != null) {
-                mLog.info("socket created");
-                Thread thread = new Thread(new PeerInfoProviderServiceHandler(lSocket), "Connection Handler Thread");
-                thread.start();
-             }
-         } catch (Exception e) {
-            mLog.error("Server socket  error",e);
-         }
-     }
-      
-   }
-   class PeerInfoProviderServiceHandler implements Runnable {
-      Socket mSocket = null;
-
-      PeerInfoProviderServiceHandler(Socket aSocket) {
-          mSocket = aSocket;
-      }
-
-      public void run() {
-         try {
-         ObjectOutputStream lOut = new ObjectOutputStream(mSocket.getOutputStream());
-         //work around to unlock the socket
-         lOut.writeBoolean(true);
-         lOut.flush();
-         ObjectInputStream lIn = new ObjectInputStream(mSocket.getInputStream());
-         Object lInputObj;
-         Object lOutputObj;
-         while (mExist == false) {
-            lInputObj = lIn.readObject();
-            mLog.info("request message ["+lInputObj+"] received");
-            
-            if (lInputObj instanceof PublicIpAddressRequest) {
-//             PublicIpAddressRequest
-               PublicIpAddressRequest lPublicIpAddressRequest = (PublicIpAddressRequest) lInputObj;
-               InetAddress lInetAddress = getPeerInfoProvider().getPublicAddress(lPublicIpAddressRequest.getPeerId());   
-               PublicIpAddressResponse lPublicIpAddressResponse;
-               if (lInetAddress == null) {
-                  lPublicIpAddressResponse = new PublicIpAddressResponse("address not found for["+lPublicIpAddressRequest.getPeerId()+"]");
-               } else {
-                  lPublicIpAddressResponse = new PublicIpAddressResponse(lInetAddress);
-               }
-               lOutputObj = lPublicIpAddressResponse;
-               lOut.writeObject(lOutputObj);
-               lOut.flush();
-               mLog.info("request reponse ["+lOutputObj+"] sent");  
-            } else if (lInputObj instanceof SocketProbeRequest) {
-//             SocketProbeRequest
-               SocketProbeRequest lSocketProbeRequest = (SocketProbeRequest)lInputObj;
-               switch (lSocketProbeRequest.getProtocol()) {
-               case tcp: {
-                  Socket lSocket = new Socket();
-                  lSocket.setSoTimeout(SO_TIMOUT);
-                  
-                  try {
-                     lSocket.connect(lSocketProbeRequest.getSocketAddress());
-                     mLog.info("socket  ["+lSocketProbeRequest+"] is reachable");
-                  }catch (Exception e) {
-                     mLog.info("cannot reach  ["+lSocketProbeRequest+"] in mode ["+lSocketProbeRequest.getProtocol()+"] for"+SO_TIMOUT+"");
-                  }                  
-                  lSocket.close(); 
-                  break;
-               }
-               case udp: {
-                  DatagramSocket lSocket = new DatagramSocket();
-                  String lPing = "ping";
-                  DatagramPacket lDatagramPacket = new DatagramPacket(lPing.getBytes(),lPing.getBytes().length);
-                  lDatagramPacket.setSocketAddress(lSocketProbeRequest.getSocketAddress());
-                  lSocket.send(lDatagramPacket);
-                   mLog.info("ping sent to socket  ["+lSocketProbeRequest+"] in mode ["+lSocketProbeRequest.getProtocol()+"]");
-                  lSocket.close(); 
-                  break;
-               }
-               default: throw new P2pProxyException("unsupported protocol ["+lSocketProbeRequest.getProtocol()+"]");
-               }
-
-            }else {
-               mLog.error("unknown request ["+lInputObj+"]");
-               lOutputObj = null;
-            }
-
-
-         }
-         } catch (Exception e) {
-            mLog.error("socket instance error",e);
-         }
-         finally {
-            try {
-               mSocket.close();
-            } catch (IOException e) {
-               mLog.error("cannot close socket ",e);
-            }
-         }
-      }
-   }
-   public PeerInfoProvider getPeerInfoProvider() {
-      return this;
-   }
-   public InetAddress getPublicAddress(String aPeerAddress) {
-      return EndpointRegistry.getInstance().get(aPeerAddress);
-   }
-
-}
\ No newline at end of file
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/rdvautoconfig/PeerInfoServiceClient.java b/p2pproxy/src/org/linphone/p2pproxy/core/rdvautoconfig/PeerInfoServiceClient.java
deleted file mode 100644 (file)
index d83526f..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-PeerInfoServiceClient.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.rdvautoconfig;
-
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.net.DatagramPacket;
-import java.net.DatagramSocket;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.ServerSocket;
-import java.net.SocketAddress;
-import java.net.SocketTimeoutException;
-import java.util.List;
-
-import net.jxta.document.Advertisement;
-import net.jxta.id.ID;
-import net.jxta.protocol.ModuleSpecAdvertisement;
-import net.jxta.socket.JxtaSocket;
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.api.P2pProxyNetworkProbe;
-import org.linphone.p2pproxy.core.Configurator;
-import org.linphone.p2pproxy.core.GenericServiceClient;
-import org.linphone.p2pproxy.core.JxtaNetworkManager;
-import org.linphone.p2pproxy.core.ServiceProvider;
-import org.linphone.p2pproxy.core.JxtaNetworkManager.Mode;
-
-
-public class PeerInfoServiceClient extends GenericServiceClient implements P2pProxyNetworkProbe, ServiceProvider{
-   private final static Logger mLog = Logger.getLogger(PeerInfoServiceClient.class);
-   
-   public PeerInfoServiceClient(Configurator lProperties,JxtaNetworkManager aJxtaNetworkManager) {
-   super(lProperties,aJxtaNetworkManager,PeerInfoProviderService.ADV_NAME);
-   }
-   
-   public InetAddress getPublicIpAddress()  throws P2pProxyException {
-      checkObject();
-      try {
-         checkSocketConnection();
-         PublicIpAddressRequest lPublicIpAddressRequest = new PublicIpAddressRequest(mJxtaNetworkManager.getPeerGroup().getPeerID().toString());
-         mOut.writeObject(lPublicIpAddressRequest);
-         mOut.flush();
-         mLog.info("request message ["+lPublicIpAddressRequest+"] sent");
-         Object lInputObj = mIn.readObject();
-         mLog.info("response message ["+lInputObj+"] received");
-         if(lInputObj instanceof PublicIpAddressResponse) {
-            PublicIpAddressResponse lPublicIpAddressResponse = (PublicIpAddressResponse)lInputObj;
-            InetAddress lInetAddress = lPublicIpAddressResponse.getPublicAddress();
-            mLog.info("public IP ["+lInetAddress+"] received");
-            return lInetAddress;
-         } else {
-            throw new P2pProxyException("unknown response ["+lInputObj+"]");
-         }
-      }
-      catch(Exception e) {
-         throw new P2pProxyException(e);
-      }
-
-   }
-
-
-   public boolean probeSocket(InetSocketAddress aSocketAddress, Protocol aProtocol) throws P2pProxyException {
-      checkObject();
-      boolean lResult = false;
-      try {
-         checkSocketConnection();
-         switch(aProtocol) {
-         case tcp: {
-            // open the socket on 0.0.0.0:port for NAT
-           
-            ServerSocket lSocketServer = new ServerSocket(aSocketAddress.getPort());
-            lSocketServer.setSoTimeout(mSoTimout);
-            
-            // send request to server
-            sendRequest(aSocketAddress,aProtocol);
-             try {
-               lSocketServer.accept();
-              
-               lResult = true;
-            }catch (SocketTimeoutException e) {
-               //            
-            }
-            lSocketServer.close();
-            break;
-         }
-         case udp: {
-            // open the socket on 0.0.0.0:port for NAT
-            DatagramSocket lLocalSocket = new DatagramSocket(aSocketAddress.getPort());
-            byte[] lBuff = new byte[1500];
-            DatagramPacket lDatagramPacket = new DatagramPacket(lBuff,lBuff.length);
-            lLocalSocket.setSoTimeout(mSoTimout);
-           
-            // send request to server
-            SocketProbeRequest lSocketProbeRequest = new SocketProbeRequest(aSocketAddress,aProtocol);
-            mOut.writeObject(lSocketProbeRequest);
-            mOut.flush();
-            mLog.info("request message ["+lSocketProbeRequest+"] sent");
-            try {
-               lLocalSocket.receive(lDatagramPacket);
-                lResult = true;
-            }catch (SocketTimeoutException e) {
-               // nop
-            }
-            lLocalSocket.close(); 
-            break;
-         }
-         default: throw new P2pProxyException("unsupported protocol ["+aProtocol+"]");
-         }
-         if (lResult) {
-            mLog.info("socket  ["+aSocketAddress+"] is reachable with protocol ["+aProtocol+"]");
-         } else {
-            mLog.info("cannot reach  ["+aSocketAddress+"] with protocol ["+aProtocol+"] for ["+mSoTimout+"] ms");
-         }
-         return lResult;
-      }
-      catch(Exception e) {
-         throw new P2pProxyException(e);
-      }
-   }
-   private void sendRequest(SocketAddress aSocketAddress, Protocol aProtocol) throws IOException {
-      SocketProbeRequest lSocketProbeRequest = new SocketProbeRequest(aSocketAddress,aProtocol);
-      mOut.writeObject(lSocketProbeRequest);
-      mOut.flush();
-      mLog.info("request message ["+lSocketProbeRequest+"] sent");      
-   }
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/rdvautoconfig/PublicIpAddressRequest.java b/p2pproxy/src/org/linphone/p2pproxy/core/rdvautoconfig/PublicIpAddressRequest.java
deleted file mode 100644 (file)
index 86904dd..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-PublicIpAddressRequest.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.rdvautoconfig;
-
-import java.io.Serializable;
-
-public class PublicIpAddressRequest implements Serializable{
-   /**
-    * 
-    */
-   private static final long serialVersionUID = 1L;
-   final private String mPeerId;
-   PublicIpAddressRequest(String aPeerId) {
-      mPeerId = aPeerId;
-   }
-   public String getPeerId() {
-      return mPeerId; 
-   }
-   public String toString() {
-      return  "PublicIpAddressRequest for ["+mPeerId+"]";
-   }
-   
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/rdvautoconfig/PublicIpAddressResponse.java b/p2pproxy/src/org/linphone/p2pproxy/core/rdvautoconfig/PublicIpAddressResponse.java
deleted file mode 100644 (file)
index 7d246d0..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-PublicIpAddressResponse.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.rdvautoconfig;
-
-import java.io.Serializable;
-import java.net.InetAddress;
-
-public class PublicIpAddressResponse implements Serializable {
-   
-   /**
-    * 
-    */
-   private static final long serialVersionUID = 1L;
-   final private InetAddress mPublicAddress;
-   final private boolean mIsError;
-   final private String mErrorText;
-   public PublicIpAddressResponse(InetAddress aPublicAdress) {
-      mPublicAddress = aPublicAdress;
-      mIsError = false;
-      mErrorText ="";
-   }
-   public PublicIpAddressResponse(String anErroText) {
-      mPublicAddress = null;
-      mIsError = true;
-      mErrorText =anErroText;
-      
-   }
-   public InetAddress getPublicAddress() {
-      return mPublicAddress;
-   }
-   public boolean  isError() {
-      return mIsError;
-   }
-   public String  getErrorText() {
-      return mErrorText;
-   }
-   public String toString() {
-      return  "PublicIpAddressResponse  ip ["+mPublicAddress+"] error ["+mErrorText+"]";
-   }   
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/rdvautoconfig/SocketProbeRequest.java b/p2pproxy/src/org/linphone/p2pproxy/core/rdvautoconfig/SocketProbeRequest.java
deleted file mode 100644 (file)
index adcfc0e..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-SocketProbeRequest.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.rdvautoconfig;
-
-import java.io.Serializable;
-import java.net.SocketAddress;
-
-import org.linphone.p2pproxy.api.P2pProxyNetworkProbe.Protocol;
-
-public class SocketProbeRequest implements Serializable {
-   /**
-    * 
-    */
-   private static final long serialVersionUID = 1L;
-   final private SocketAddress mSocketAddress;    
-   final private Protocol mProtocol;
-   public SocketProbeRequest(SocketAddress aSocketAddress, Protocol aProtocol) {
-      mSocketAddress = aSocketAddress;
-      mProtocol = aProtocol;
-   }
-   /**
-    * @return Returns the mProtocol.
-    */
-   public Protocol getProtocol() {
-      return mProtocol;
-   }
-   /**
-    * @return Returns the mSocketAddress.
-    */
-   public SocketAddress getSocketAddress() {
-      return mSocketAddress;
-   }
-   
-   public String toString() {
-      return "SocketProbeRequest for ["+mSocketAddress+"] protocol ["+mProtocol+"]";
-   }
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/NetworkResourceAdvertisement.java b/p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/NetworkResourceAdvertisement.java
deleted file mode 100644 (file)
index f03c397..0000000
+++ /dev/null
@@ -1,267 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-P2pUserRegistrationAdvertisement.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.sipproxy;
-
-
-import java.io.Serializable;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Enumeration;
-
-import org.apache.log4j.Logger;
-
-
-
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Attributable;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.ExtendableAdvertisement;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.TextElement;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-
-/**
- * derivated from jxta Advertisement tutorial
- * <pre>
- * &lt;?xml version="1.0"?>
- * &lt;!DOCTYPE jxta:System>
- * &lt;jxta:System xmlns:jxta="http://jxta.org">
- *   &lt;id> &lt;/id>
- *   &lt;Name> &lt;/Name>
- *   &lt;address>address where a sip endpoint can join&lt;/registrar-address>
- * &lt;/jxta:System>
- * </pre>
- */
-public class NetworkResourceAdvertisement extends ExtendableAdvertisement implements Comparable, Cloneable, Serializable {
-   /**
-    * Instantiator
-    */
-   public static class Instantiator implements AdvertisementFactory.Instantiator {
-
-      /**
-       * Returns the identifying type of this Advertisement.
-       *
-       * @return String the type of advertisement
-       */
-      public String getAdvertisementType() {
-         return NetworkResourceAdvertisement.getAdvertisementType();
-      }
-
-      /**
-       * Constructs an instance of <CODE>Advertisement</CODE> matching the
-       * type specified by the <CODE>advertisementType</CODE> parameter.
-       *
-       * @return The instance of <CODE>Advertisement</CODE> or null if it
-       *         could not be created.
-       */
-      public Advertisement newInstance() {
-         return new NetworkResourceAdvertisement();
-      }
-
-      /**
-       * Constructs an instance of <CODE>Advertisement</CODE> matching the
-       * type specified by the <CODE>advertisementType</CODE> parameter.
-       *
-       * @param root Specifies a portion of a StructuredDocument which will
-       *             be converted into an Advertisement.
-       * @return The instance of <CODE>Advertisement</CODE> or null if it
-       *         could not be created.
-       */
-      public Advertisement newInstance(net.jxta.document.Element root) {
-         return new NetworkResourceAdvertisement(root);
-      }
-   }
-   private ID mId ;;
-   private String mAddress;
-   private String mName;
-   public final static String ADDRESS_TAG = "address";
-   private final static String ID_TAG = "ID";
-   final static String NAME_TAG = "Name";
-   //public final static String NAME = "p2p-proxy-proxyregistrar";
-   private final static String[] mIndexs = {NAME_TAG};
-   private final static Logger mLog = Logger.getLogger(NetworkResourceAdvertisement.class);
-   /**
-    * 
-    */
-   public NetworkResourceAdvertisement(Element root) {
-
-      TextElement doc = (TextElement) root;
-
-      if (!getAdvertisementType().equals(doc.getName())) {
-         throw new IllegalArgumentException("Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-      }
-      initialize(doc);
-
-   }
-   public NetworkResourceAdvertisement() {
-
-      // TODO Auto-generated constructor stub
-   }
-   /* (non-Javadoc)
-    * @see net.jxta.document.ExtendableAdvertisement#getDocument(net.jxta.document.MimeMediaType)
-    */
-   @Override
-   public Document getDocument(MimeMediaType asMimeType) {
-
-      StructuredDocument adv = StructuredDocumentFactory.newStructuredDocument(asMimeType,
-            getAdvertisementType());
-      if (adv instanceof Attributable) {
-         ((Attributable) adv).addAttribute("xmlns:jxta", "http://jxta.org");
-      }
-      Element e;
-      e = adv.createElement(ID_TAG, getID().toString());
-      adv.appendChild(e);
-      e = adv.createElement(NAME_TAG, getName().toString());
-      adv.appendChild(e);
-      e = adv.createElement(ADDRESS_TAG, getAddress().trim());
-      adv.appendChild(e);
-      return adv;
-   }
-
-   public String getName() {
-      return mName;
-   }
-   @Override
-   public ID getID() {
-      return mId;
-   }
-
-   @Override
-   public String[] getIndexFields() {
-      return mIndexs;
-   }
-   public static String getAdvertisementType() {
-      return "jxta:p2p-proxy-networkresource";
-   }
-   /* (non-Javadoc)
-    * @see net.jxta.document.Advertisement#toString()
-    */
-   @Override
-   public String toString() {
-      // TODO Auto-generated method stub
-      return super.toString();
-   }
-   public int compareTo(Object other) {
-      return getID().toString().compareTo(other.toString());
-   }
-   /**
-    * Intialize a System advertisement from a portion of a structured document.
-    *
-    * @param root document root
-    */
-   protected void initialize(Element root) {
-      if (!TextElement.class.isInstance(root)) {
-         throw new IllegalArgumentException(getClass().getName() +
-               " only supports TextElement");
-      }
-      TextElement doc = (TextElement) root;
-      if (!doc.getName().equals(getAdvertisementType())) {
-         throw new IllegalArgumentException("Could not construct : "
-               + getClass().getName() + "from doc containing a " +
-               doc.getName());
-      }
-      Enumeration elements = doc.getChildren();
-      while (elements.hasMoreElements()) {
-         TextElement elem = (TextElement) elements.nextElement();
-         if (!handleElement(elem)) {
-            mLog.warn("Unhandleded element \'" + elem.getName() + "\' in " +  doc.getName());
-         }
-      }
-   }
-   /**
-    * Process an individual element from the document.
-    *
-    * @param elem the element to be processed.
-    * @return true if the element was recognized, otherwise false.
-    */
-   protected boolean handleElement(TextElement elem) {
-      if (elem.getName().equals(ID_TAG)) {
-         try {
-            URI id = new URI(elem.getTextValue());
-            setID(IDFactory.fromURI(id));
-         } catch (URISyntaxException badID) {
-            throw new IllegalArgumentException("unknown ID format in advertisement: " +
-                  elem.getTextValue());
-         }
-         catch (ClassCastException badID) {
-            throw new IllegalArgumentException("Id is not a known id type: " +
-                  elem.getTextValue());
-         }
-         return true;
-      } else if (elem.getName().equals(ADDRESS_TAG)) {
-         setAddress(elem.getTextValue());
-         return true;
-      } else if (elem.getName().equals(NAME_TAG)) {
-         setName(elem.getTextValue());
-         return true;
-      } else {
-         return false;
-      }
-   }
-   public void setID(ID id) {
-      mId = id;
-   }
-   @Override
-   public String getBaseAdvType() {
-      // TODO Auto-generated method stub
-      return null;
-   }
-   /**
-    * @return Returns the address as a sip uri.
-    */
-   public String getAddress() {
-      return mAddress;
-   }
-   /**
-    * @param name The mName to set.
-    */
-   public void setAddress(String anAddress) {
-      mAddress = anAddress;
-   }
-   public void setName(String aName) {
-          mName = aName;
-   }
-
-   /* (non-Javadoc)
-    * @see java.lang.Object#equals(java.lang.Object)
-    */
-   @Override
-   public boolean equals(Object obj) {
-
-      if (this == obj) {
-          return true;
-      }
-      if (obj instanceof NetworkResourceAdvertisement) {
-         NetworkResourceAdvertisement adv = (NetworkResourceAdvertisement) obj;
-          return getID().equals(adv.getID());
-      }
-
-      return false;
-  
-   }
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/RegistrationHandler.java b/p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/RegistrationHandler.java
deleted file mode 100644 (file)
index 9a86b8a..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-RegistrationHandler.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-package org.linphone.p2pproxy.core.sipproxy;
-
-
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.core.sipproxy.SipProxyRegistrar.Registration;
-import org.zoolu.sip.message.Message;
-
-public interface RegistrationHandler {
-   public void updateRegistration(Registration aRegistration, Message aRegistrationMessage) throws P2pProxyException;
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/SdpProcessor.java b/p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/SdpProcessor.java
deleted file mode 100644 (file)
index ca553b1..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-SdpProcessor.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-package org.linphone.p2pproxy.core.sipproxy;
-
-
-
-import net.jxta.pipe.OutputPipe;
-
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.zoolu.sip.message.Message;
-
-public interface SdpProcessor {
-  /**
-   *  process SDP in mode relay
-   * rewrite sdp.
-   */
-  public void processSdpBeforeSendingToSipUA( Message aMessage) throws P2pProxyException;
-  
-  public void processSdpBeforeSendingToPipe( Message aMessage) throws P2pProxyException;
-  
-  public void processSdpAfterSentToPipe( Message aMessage,OutputPipe lOutputPipe) throws P2pProxyException;
-}
\ No newline at end of file
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/SipProxy.java b/p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/SipProxy.java
deleted file mode 100644 (file)
index fcc16ce..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-SipProxy.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-package org.linphone.p2pproxy.core.sipproxy;
-
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.zoolu.sip.message.Message;
-import org.zoolu.sip.provider.SipProvider;
-
-public interface SipProxy {
-   public void proxyRequest(SipProvider aProvider, Message aMessage) throws P2pProxyException;
-   public void proxyResponse(SipProvider aProvider, Message aMessage) throws P2pProxyException;
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/SipProxyRegistrar.java b/p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/SipProxyRegistrar.java
deleted file mode 100644 (file)
index 0efaacb..0000000
+++ /dev/null
@@ -1,404 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-SipListener.java - sip proxy.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-package org.linphone.p2pproxy.core.sipproxy;
-
-
-import java.io.File;
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Timer;
-import java.util.TimerTask;
-import java.util.concurrent.Callable;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Future;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.id.IDFactory;
-import org.apache.log4j.Logger;
-import org.apache.log4j.NDC;
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.api.P2pProxyUserNotFoundException;
-
-import org.linphone.p2pproxy.core.Configurator;
-import org.linphone.p2pproxy.core.JxtaNetworkManager;
-import org.linphone.p2pproxy.core.P2pProxyAccountManagementMBean;
-import org.linphone.p2pproxy.core.media.rtprelay.MediaType;
-import org.linphone.p2pproxy.core.sipproxy.superpeers.SuperPeerProxy;
-import org.zoolu.sip.header.ExpiresHeader;
-import org.zoolu.sip.header.MultipleHeader;
-import org.zoolu.sip.message.Message;
-import org.zoolu.sip.message.MessageFactory;
-import org.zoolu.sip.provider.SipProvider;
-import org.zoolu.sip.provider.SipProviderListener;
-import org.zoolu.sip.provider.SipStack;
-import org.zoolu.sip.transaction.TransactionServer;
-import java.util.Collections;
-
-public class SipProxyRegistrar implements SipProviderListener,SipProxyRegistrarMBean {
-   private final static Logger mLog = Logger.getLogger(SipProxyRegistrar.class);   
-   public final static String REGISTRAR_PORT="org.linphone.p2pproxy.SipListener.registrar.port";
-   public final static String REGISTRAR_PUBLIC_ADDRESS="org.linphone.p2pproxy.SipListener.registrar.public.address";
-   public final static String ADV_NAME = "p2p-proxy-proxyregistrar";
-   private final int ADV_LIFE_TIME=6000000;
-   //
-   private final SipProvider mProvider;
-   private final JxtaNetworkManager mJxtaNetworkManager;
-   private final ExecutorService mPool;
-
-   private final Map<String,Registration> mRegistrationTab = Collections.synchronizedMap(new HashMap<String,Registration>()); 
-   private final Map<String,SipMessageTask> mCancalableTaskTab = Collections.synchronizedMap(new HashMap<String,SipMessageTask>());
-
-   private final P2pProxyAccountManagementMBean mP2pProxyAccountManagement;
-   private final Configurator mProperties;
-   private final SuperPeerProxy mSuperPeerProxy;
-   private  NetworkResourceAdvertisement mProxyRegistrationAdvertisement;
-   private final Timer mTimer = new Timer ("Proxy registrar adv publisher");
-  
-   //private long mNumberOfEstablishedCall;
-   private long mNumberOfRefusedRegistration;
-   private long mNumberOfSuccessfullRegistration;
-   private long mNumberOfUSerNotFound;
-   private long mNumberOfUnknownUSers;
-   private long mNumberOfUnknownUsersForRegistration;
-   private long mNumberOfUnRegistration;
-   
-   
-   public static class Registration {
-      long RegistrationDate;
-      public long Expiration;
-      //implementation specific context
-      public Object NetResources;
-      public  Map<MediaType,InetSocketAddress> RtpRelays = new HashMap<MediaType,InetSocketAddress>() ;
-      public String Contact;
-      public final String From;
-      public Registration(String aFrom) {From = aFrom;}
-      public String toString() {
-         return "reg date ["+RegistrationDate+"] exp ["+Expiration+"] contact ["+Contact+"] from ["+From+"]";
-      }
-   }
-   
-   class SipMessageTask implements Callable<Boolean> {
-      private final SipProvider mProvider;
-      private final Message mMessage;
-      private Future<?> mFuture;
-      
-      /**
-       * @return Returns the mMessage.
-       */
-      public Message getMessage() {
-         return mMessage;
-      }
-      SipMessageTask(SipProvider aProvider, Message aMessage) {
-         mProvider = aProvider;
-         mMessage = aMessage;
-      }
-      public Boolean call() throws Exception {
-         NDC.push(mMessage.getFirstLine() + mMessage.getCallIdHeader().getCallId() +":");
-         try {
-            if (mMessage.isRequest()) {
-               if (mMessage.isRegister()) {
-                  processRegister(mProvider, mMessage);
-               } else {
-                  proxyRequest(mProvider, mMessage);
-               }
-            } else {
-               //1 remove via header   
-               SipUtils.removeVia(mProvider,mMessage);
-               //2 process response
-               proxyResponse(mProvider, mMessage);
-            }
-            if (mMessage.isInvite() && mCancalableTaskTab.containsKey(mMessage.getCallIdHeader().getCallId()) )  {
-               mCancalableTaskTab.remove(mMessage.getCallIdHeader().getCallId());
-            }
-         } catch (InterruptedException eInter) {
-            mLog.info("request interrupted",eInter);
-            //nop
-         }
-         catch (Exception e) {
-            mLog.error("unexpected behavior",e);
-            if (mMessage.isRequest()) {
-               Message lResp= null;
-               lResp = MessageFactory.createResponse(mMessage,500,e.getMessage(),null);
-               TransactionServer lTransactionServer = new TransactionServer(mProvider,mMessage,null);
-               lTransactionServer.respondWith(lResp);
-               synchronized (SipProxyRegistrar.this) {
-                  if (mMessage.isInvite() && mCancalableTaskTab.containsKey(mMessage.getCallIdHeader().getCallId()) )  {
-                     mCancalableTaskTab.remove(mMessage.getCallIdHeader().getCallId());
-                  }
-               }
-            }
-         } finally {
-                NDC.pop();
-         }
-         return true;
-      }
-      /**
-       * @return Returns the mFuture.
-       */
-      public Future<?> getFuture() {
-         return mFuture;
-      }
-      /**
-       * @param future The mFuture to set.
-       */
-      public void setFuture(Future<?> future) {
-         mFuture = future;
-      }
-      
-   }
-   
-   public SipProxyRegistrar(Configurator lProperties,JxtaNetworkManager aJxtaNetworkManager,P2pProxyAccountManagementMBean aP2pProxyAccountManagement) throws IOException {
-      mJxtaNetworkManager =  aJxtaNetworkManager;
-      mP2pProxyAccountManagement = aP2pProxyAccountManagement;
-      mProperties = lProperties;
-      File lFile = new File(SipStack.log_path);
-      if (lFile.exists() == false) lFile.mkdir();
-      String lViaAddress = lProperties.getProperty(REGISTRAR_PUBLIC_ADDRESS);
-      int lPort = Integer.parseInt(lProperties.getProperty(REGISTRAR_PORT, "5060"));
-      String[] lProto = {SipProvider.PROTO_UDP};
-      mProvider=new SipProvider(lViaAddress,lPort,lProto,SipProvider.ALL_INTERFACES);
-      mProvider.addSipProviderListener(SipProvider.PROMISQUE,this);
-      mPool = Executors.newCachedThreadPool();
-      mSuperPeerProxy = new SuperPeerProxy(aJxtaNetworkManager, "sip:"+mProvider.getViaAddress()+":"+mProvider.getPort(),mRegistrationTab);
-      TimerTask lPublisherTask = new TimerTask() {
-
-               @Override
-               public void run() {
-                       try {
-                               SipProxyRegistrar.this.publishAdvertisement();
-                       } catch (IOException e) {
-                               mLog.error("cannot publish proxy registar adv", e);
-                       }
-                       
-               }
-         
-      };
-      mTimer.scheduleAtFixedRate(lPublisherTask, 0, ADV_LIFE_TIME-ADV_LIFE_TIME/10);
-      TimerTask lRegistrationTableGC = new TimerTask() {
-
-               @Override
-               public void run() {
-                       // copy list
-                       Collection<Registration> lCurrentRegistrations = mRegistrationTab.values();
-                       long lCurrentDate = System.currentTimeMillis();
-                       for (Registration lRegistration : lCurrentRegistrations) {
-                               if ((lCurrentDate - lRegistration.RegistrationDate - lRegistration.Expiration) > 0) {
-                                       if (mLog.isInfoEnabled()) mLog.info("registration entry ["+lRegistration+"] has expired");
-                                       mRegistrationTab.remove(lRegistration.From);
-                               }
-                       }
-               }
-         
-      };
-      mTimer.scheduleAtFixedRate(lRegistrationTableGC, 0, 60000);
-      
-   }
-   public  void onReceivedMessage(SipProvider aProvider, Message aMessage) {
-      if (aProvider.getListeners().containsKey(aMessage.getTransactionId())) {
-         if (mLog.isDebugEnabled()) mLog.debug ("nothing to do, transaction already handled for ["+aMessage+"]");
-         return;
-      }
-      if (mLog.isInfoEnabled()) mLog.info("receiving message ["+aMessage+"]");
-      String lCallId = aMessage.getCallIdHeader().getCallId();
-      SipMessageTask lPendingSipMessageTask = mCancalableTaskTab.get(lCallId);
-      
-      if (aMessage.isCancel() && lPendingSipMessageTask != null ) {
-         // search for pending transaction
-         
-         lPendingSipMessageTask.getFuture().cancel(true);
-         mCancalableTaskTab.remove(lCallId);
-
-         SipUtils.removeVia(mProvider,lPendingSipMessageTask.getMessage());
-         // accept cancel
-         Message lCancelResp = MessageFactory.createResponse(aMessage,200,"ok",null);
-         TransactionServer lCancelTransactionServer = new TransactionServer(mProvider,aMessage,null);
-         lCancelTransactionServer.respondWith(lCancelResp);
-         
-         // cancel invite
-         Message lInviteResp = MessageFactory.createResponse(lPendingSipMessageTask.getMessage(),487,"Request Terminated",null);
-         TransactionServer lInviteTransactionServer = new TransactionServer(mProvider,lPendingSipMessageTask.getMessage(),null);
-         lInviteTransactionServer.respondWith(lInviteResp);          
-      } else {
-         // normal behavior
-         SipMessageTask lSipMessageTask = new SipMessageTask(aProvider,aMessage);
-         lSipMessageTask.setFuture(mPool.submit(lSipMessageTask));
-         if (aMessage.isInvite()) {
-            mCancalableTaskTab.put(aMessage.getCallIdHeader().getCallId(),lSipMessageTask);                
-         }
-         
-      }
-      
-   }
-//////////////////////////////////////////////////////////////////////
-////Proxy methods
-/////////////////////////////////////////////////////////////////////  
-   private void proxyResponse(SipProvider aProvider, Message aMessage) throws NumberFormatException, InterruptedException, P2pProxyException, IOException {
-      mSuperPeerProxy.proxyResponse(aProvider, aMessage);
-   }
-   private void proxyRequest(SipProvider aProvider, Message aMessage) throws Exception {
-      if (aMessage.isAck() && aMessage.getToHeader().getTag() == null) {
-         // just terminate the Invite transaction
-         return;
-      }
-      
-      if (aMessage.isInvite() == true) {
-         // 100 trying
-         TransactionServer lTransactionServer = new TransactionServer(aProvider,aMessage,null);
-         Message l100Trying = MessageFactory.createResponse(aMessage,100,"trying",null);
-         lTransactionServer.respondWith(l100Trying);
-         lTransactionServer.terminate();
-      }
-      //remove route
-      MultipleHeader lMultipleRoute = aMessage.getRoutes();
-      if (lMultipleRoute != null) {
-         lMultipleRoute.removeTop();
-         aMessage.setRoutes(lMultipleRoute);
-      }
-      // add Via only udp
-      SipUtils.addVia(aProvider,aMessage);
-      try {
-         mSuperPeerProxy.proxyRequest(aProvider, aMessage);
-      }catch (P2pProxyUserNotFoundException e) {
-         //remove via 
-         SipUtils.removeVia(aProvider, aMessage);
-         if (aMessage.isInvite()) {
-            Message lresp = MessageFactory.createResponse(aMessage,404,e.getMessage(),null);
-            TransactionServer lTransactionServer = new TransactionServer(aProvider,aMessage,null);
-            lTransactionServer.respondWith(lresp);
-            lTransactionServer.terminate();
-         } else {
-            throw e;
-         }
-      }
-   }
-   
-   
-//////////////////////////////////////////////////////////////////////
-////Registrar methods
-/////////////////////////////////////////////////////////////////////  
-   
-   private  void processRegister(SipProvider aProvider, Message aMessage) throws IOException, P2pProxyException {
-      TransactionServer lTransactionServer = new TransactionServer(aProvider,aMessage,null);
-      Message l100Trying = MessageFactory.createResponse(aMessage,100,"trying",null);
-      lTransactionServer.respondWith(l100Trying);
-      Registration lRegistration=null;
-      
-      //check if already registered
-      
-      String lFromName = aMessage.getFromHeader().getNameAddress().getAddress().toString();
-      if ((lRegistration = mRegistrationTab.get(lFromName)) != null) {
-         
-         updateRegistration(lRegistration,aMessage);
-         
-         if (aMessage.getExpiresHeader().getDeltaSeconds() == 0) {
-            mRegistrationTab.remove(lFromName);
-         } 
-         
-      } else {
-         // new registration
-         // test if account already created
-         
-         if (mP2pProxyAccountManagement.isValidAccount(lFromName)) {
-         lRegistration = new Registration(lFromName);
-         // forgot contact, use rport lRegistration.Contact = aMessage.getContactHeader().getNameAddress().getAddress().toString();;
-         
-         updateRegistration(lRegistration,aMessage);
-         mRegistrationTab.put(lFromName, lRegistration);
-         } else {
-            // create negative answers
-            mLog.info("account for user ["+lFromName+"] not created yet");
-            Message lresp = MessageFactory.createResponse(aMessage,404,"Not found",null);
-            lTransactionServer.respondWith(lresp);
-            return;
-         }
-      }
-      // ok, create answers
-      Message lresp = MessageFactory.createResponse(aMessage,200,"Ok",null);
-      lresp.addContactHeader(aMessage.getContactHeader(), false);
-      ExpiresHeader lExpireHeader = new  ExpiresHeader((int) (lRegistration.Expiration/1000));
-      lresp.addHeader(lExpireHeader, false);
-      lTransactionServer.respondWith(lresp);
-      
-   }
-   private void updateRegistration(Registration aRegistration, Message aRegistrationMessage) throws P2pProxyException {
-      aRegistration.RegistrationDate = System.currentTimeMillis();
-      // default registration period
-      aRegistration.Expiration = 3600000;
-      if (aRegistrationMessage.getExpiresHeader() != null ) {
-         aRegistration.Expiration =  aRegistrationMessage.getExpiresHeader().getDeltaSeconds()*1000; 
-      }
-      aRegistration.Contact = "sip:"+aRegistrationMessage.getRemoteAddress()+":"+aRegistrationMessage.getRemotePort();
-      mSuperPeerProxy.updateRegistration(aRegistration, aRegistrationMessage); 
-   }
-   
-   
-public void stop() {
-   try {
-      mJxtaNetworkManager.getPeerGroup().getDiscoveryService().flushAdvertisement(mProxyRegistrationAdvertisement);
-   } catch (IOException e) {
-      mLog.warn("cannot flush registrar adv",e );
-   }
-   mProvider.halt();
-}
- //   public long getNumberOfEstablishedCall() {
-//      return mNumberOfEstablishedCall;
-//   }
-   public long getNumberOfRefusedRegistration() {
-      return mNumberOfRefusedRegistration;
-   }
-   public long getNumberOfSuccessfullRegistration() {
-      return mNumberOfSuccessfullRegistration;
-   }
-   public long getNumberOfUSerNotFound() {
-      return mNumberOfUSerNotFound;
-   }
-   public long getNumberOfUnknownUSers() {
-      return mNumberOfUnknownUSers;
-   }
-   public long getNumberOfUnknownUsersForRegistration() {
-       return mNumberOfUnknownUsersForRegistration;
-   }
-   public String[] getRegisteredList() {
-      String[] lRegisteredList = new String[mRegistrationTab.size()] ;
-      int i=0;
-      for (String lRegistrationKey : mRegistrationTab.keySet()) {
-         lRegisteredList[i++] = lRegistrationKey;
-      }
-      return   lRegisteredList;
-   }
-   public long getNumberOfUnRegistration() {
-      return mNumberOfUnRegistration;
-   }
-   private void publishAdvertisement() throws IOException {
-          if (mProxyRegistrationAdvertisement == null) {   
-          mProxyRegistrationAdvertisement = (NetworkResourceAdvertisement) AdvertisementFactory.newAdvertisement(NetworkResourceAdvertisement.getAdvertisementType());
-             mProxyRegistrationAdvertisement.setID(IDFactory.newCodatID(mJxtaNetworkManager.getPeerGroup().getPeerGroupID(), Integer.toHexString(mSuperPeerProxy.getSipProxyRegistrarAddress().hashCode()).getBytes("US-ASCII")));
-             mProxyRegistrationAdvertisement.setAddress(mSuperPeerProxy.getSipProxyRegistrarAddress());
-             mProxyRegistrationAdvertisement.setName(ADV_NAME);
-          }
-          mJxtaNetworkManager.getPeerGroup().getDiscoveryService().publish(mProxyRegistrationAdvertisement,ADV_LIFE_TIME,ADV_LIFE_TIME/2);        
-          mLog.info(mProxyRegistrationAdvertisement + "published");
-   }
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/SipProxyRegistrarMBean.java b/p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/SipProxyRegistrarMBean.java
deleted file mode 100644 (file)
index 882d185..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-SipProxyRegistrarMBean.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.sipproxy;
-
-public interface SipProxyRegistrarMBean {
-   // registrar
-   public long getNumberOfSuccessfullRegistration();
-   public long getNumberOfUnRegistration();
-   public long getNumberOfRefusedRegistration();
-   public long getNumberOfUnknownUsersForRegistration();
-   public String[] getRegisteredList();
-   //proxy
-   //public long getNumberOfEstablishedCall();
-   public long getNumberOfUSerNotFound();
-   public long getNumberOfUnknownUSers();
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/SipUtils.java b/p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/SipUtils.java
deleted file mode 100644 (file)
index 6666122..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-SipUtils.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-package org.linphone.p2pproxy.core.sipproxy;
-
-import org.zoolu.sip.address.NameAddress;
-import org.zoolu.sip.address.SipURL;
-import org.zoolu.sip.header.Header;
-import org.zoolu.sip.header.RecordRouteHeader;
-import org.zoolu.sip.header.ViaHeader;
-import org.zoolu.sip.message.Message;
-import org.zoolu.sip.provider.SipProvider;
-
-public class SipUtils {
-   public static void addVia(SipProvider aProvider, Message aMessage) {
-      ViaHeader via=new ViaHeader("udp",aProvider.getViaAddress(),aProvider.getPort());
-      String branch=aProvider.pickBranch(aMessage);
-      via.setBranch(branch);
-      aMessage.addViaHeader(via);      
-   }
-   public static void addRecordRoute(SipProvider aProvider, Message aMessage) {
-      SipURL lRecordRoute;
-      lRecordRoute=new SipURL(aProvider.getViaAddress(),aProvider.getPort());
-      lRecordRoute.addLr();
-      RecordRouteHeader lRecordRouteHeader=new RecordRouteHeader(new NameAddress(lRecordRoute));
-      aMessage.addRecordRouteHeader(lRecordRouteHeader);    
-   }
-   public static void removeVia(SipProvider aProvider, Message aMessage) {
-      synchronized (aMessage) {
-         ViaHeader lViaHeader =new ViaHeader((Header)aMessage.getVias().getHeaders().elementAt(0));
-         if (lViaHeader.getHost().equals(aProvider.getViaAddress()) && lViaHeader.getPort() == aProvider.getPort() ) {
-            aMessage.removeViaHeader();
-         }       
-      }
-   }
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/peers/JxtaSipProxy.java b/p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/peers/JxtaSipProxy.java
deleted file mode 100644 (file)
index 0dd6ba3..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-JxtaSipProxy.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-package org.linphone.p2pproxy.core.sipproxy.peers;
-
-import java.io.IOException;
-import java.util.Map;
-
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Advertisement;
-import net.jxta.endpoint.MessageElement;
-import net.jxta.endpoint.StringMessageElement;
-import net.jxta.pipe.OutputPipe;
-import net.jxta.pipe.PipeMsgEvent;
-import net.jxta.pipe.PipeMsgListener;
-import net.jxta.protocol.PipeAdvertisement;
-
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.api.P2pProxyRtpRelayManagement;
-import org.linphone.p2pproxy.api.P2pProxyUserNotFoundException;
-import org.linphone.p2pproxy.core.JxtaNetworkManager;
-import org.linphone.p2pproxy.core.P2pProxyAdvertisementNotFoundException;
-import org.linphone.p2pproxy.core.media.rtprelay.SdpProcessorImpl;
-import org.linphone.p2pproxy.core.sipproxy.RegistrationHandler;
-import org.linphone.p2pproxy.core.sipproxy.SdpProcessor;
-import org.linphone.p2pproxy.core.sipproxy.SipProxy;
-import org.linphone.p2pproxy.core.sipproxy.SipProxyRegistrar;
-import org.linphone.p2pproxy.core.sipproxy.SipUtils;
-import org.linphone.p2pproxy.core.sipproxy.SipProxyRegistrar.Registration;
-import org.zoolu.sip.address.NameAddress;
-import org.zoolu.sip.address.SipURL;
-import org.zoolu.sip.header.MultipleHeader;
-import org.zoolu.sip.header.RouteHeader;
-import org.zoolu.sip.message.Message;
-import org.zoolu.sip.message.MessageFactory;
-import org.zoolu.sip.provider.SipProvider;
-import org.zoolu.sip.transaction.TransactionServer;
-
-public class JxtaSipProxy implements SipProxy, PipeMsgListener,RegistrationHandler {
-   private final JxtaNetworkManager mJxtaNetworkManager;
-   private final Map<String,SipProxyRegistrar.Registration> mRegistrationTab;
-   private final SdpProcessor mSdpProcessor;
-   private final SipProvider mProvider;
-   
-   private final static Logger mLog = Logger.getLogger(JxtaSipProxy.class);   
-   
-   public JxtaSipProxy(SipProvider aProvider,JxtaNetworkManager aJxtaNetworkManager, Map<String,SipProxyRegistrar.Registration> aRegistrationTab,P2pProxyRtpRelayManagement aP2pProxyRtpRelayManagement) {
-      mJxtaNetworkManager =  aJxtaNetworkManager;
-      mSdpProcessor = new SdpProcessorImpl(aP2pProxyRtpRelayManagement);
-      mRegistrationTab = aRegistrationTab;
-      mProvider = aProvider;
-   }
-   public void proxyRequest(SipProvider aProvider, Message aMessage) throws P2pProxyException {
-      String lTo =  aMessage.getToHeader().getNameAddress().getAddress().toString();
-      try {
-         mSdpProcessor.processSdpBeforeSendingToPipe(aMessage);
-         // proxy message to pipe
-         OutputPipe lOutputPipe = sendMessageToPipe(lTo,aMessage.toString());
-         mSdpProcessor.processSdpAfterSentToPipe( aMessage,lOutputPipe);
-      }  catch (Exception e2) {
-         //remove via 
-         SipUtils.removeVia(aProvider, aMessage);
-         throw new P2pProxyException(e2);
-
-      }
-
-
-   }
-
-   public void proxyResponse(SipProvider aProvider, Message aMessage) throws P2pProxyException {
-      try {
-         String lFrom =  aMessage.getFromHeader().getNameAddress().getAddress().toString();
-         mSdpProcessor.processSdpBeforeSendingToPipe(aMessage);
-         OutputPipe lOutputPipe = sendMessageToPipe(lFrom,aMessage.toString());
-         mSdpProcessor.processSdpAfterSentToPipe( aMessage,lOutputPipe);
-      } catch(Exception e) {
-         throw new P2pProxyException(e);
-      }
-
-   }
-   private Advertisement getPipeAdv(String aUser,long aDiscoveryTimout,boolean isTryFromLocal) throws InterruptedException, P2pProxyUserNotFoundException, IOException {
-      // search on all peers
-      try {
-         return mJxtaNetworkManager.getAdvertisement(null,aUser, isTryFromLocal);
-      } catch (P2pProxyAdvertisementNotFoundException e) {
-         throw new P2pProxyUserNotFoundException(e);
-      } 
-   }
-   private OutputPipe sendMessageToPipe(String aDestination,String lContent) throws NumberFormatException, InterruptedException, P2pProxyException, IOException {
-      
-      //1 search for pipe
-      long lTimeout = JxtaNetworkManager.ADV_DISCOVERY_TIMEOUT_INT;
-      PipeAdvertisement lPipeAdvertisement = (PipeAdvertisement)getPipeAdv(aDestination,lTimeout,true);
-      OutputPipe lOutputPipe=null;
-      try {
-         // create output pipe
-         lOutputPipe = mJxtaNetworkManager.getPeerGroup().getPipeService().createOutputPipe(lPipeAdvertisement, lTimeout);
-         //create the message
-      } catch (IOException e) {
-         //second try from remote only to avoid wrong cached value
-          mJxtaNetworkManager.getPeerGroup().getDiscoveryService().flushAdvertisement(lPipeAdvertisement);
-          mLog.warn("cannot create output pipe, trying to ask from rdv ",e);
-         lPipeAdvertisement = (PipeAdvertisement)getPipeAdv(aDestination,lTimeout,false);
-         lOutputPipe = mJxtaNetworkManager.getPeerGroup().getPipeService().createOutputPipe(lPipeAdvertisement, lTimeout);
-      }
-      net.jxta.endpoint.Message lMessage = new net.jxta.endpoint.Message();
-      StringMessageElement lStringMessageElement = new StringMessageElement("SIP", lContent, null);
-      lMessage.addMessageElement("SIP", lStringMessageElement);
-      //send the message
-      lOutputPipe.send(lMessage);
-      mLog.debug("message sent to ["+aDestination+"]");
-      return lOutputPipe;
-      
-   }   
-//////////////////////////////////////////////////////////////////////
-////jxta service methods
-/////////////////////////////////////////////////////////////////////   
-  
-
-  public void pipeMsgEvent(PipeMsgEvent anEvent) {
-     MessageElement lMessageElement = anEvent.getMessage().getMessageElement("SIP");
-     if (lMessageElement == null) {
-         //nop, this is not for me
-         return;
-     }
-     String lMesssage = lMessageElement.toString();
-     mLog.info("pipe event sip message["+lMesssage+"]");
-     Message lSipMessage = new Message(lMesssage);
-     // process request
-     if (lSipMessage.isRequest()) {
-        SipURL  lNextHope ;
-        // get next hope from registrar
-        String lToName = lSipMessage.getToHeader().getNameAddress().getAddress().toString();
-        if (mRegistrationTab.containsKey(lToName)) {
-           lNextHope = new SipURL(mRegistrationTab.get(lToName).Contact); 
-        } else {
-           mLog.error("user ["+lToName+"] not found");
-           return;
-        }
-        //RequestLine lRequestLine = new RequestLine(lSipMessage.getRequestLine().getMethod(),lNextHope);
-        //lSipMessage.setRequestLine(lRequestLine);
-        MultipleHeader lMultipleRoute = lSipMessage.getRoutes();
-        RouteHeader lRouteHeader = new RouteHeader(new NameAddress(lNextHope+";lr"));
-        //lRouteHeader.setParameter("lr", null);
-        if (lMultipleRoute != null) {
-           lMultipleRoute.addTop(lRouteHeader);
-           lSipMessage.setRoutes(lMultipleRoute);
-        } else {
-           lSipMessage.addRouteHeader(lRouteHeader);
-        }
-        // add Via only udp
-        SipUtils.addVia(mProvider,lSipMessage);
-        // add recordRoute
-        SipUtils.addRecordRoute(mProvider,lSipMessage);
-        
-     } else {
-        //response
-        //1 remove via header   
-        SipUtils.removeVia(mProvider,lSipMessage);
-     }
-     try {
-        mSdpProcessor.processSdpBeforeSendingToSipUA( lSipMessage);
-   } catch (P2pProxyException e) {
-       mLog.error("enable to re-write sdp",e);
-   }
-     
-     mProvider.sendMessage(lSipMessage);
-     //
-  }
-public void updateRegistration(Registration aRegistration, Message aRegistrationMessage) throws P2pProxyException {
-   try {
-   if (aRegistration.NetResources == null) {
-      // new registration, create pipe
-      NetworkResources lRegistration = new NetworkResources(aRegistration.From,mJxtaNetworkManager);  
-      aRegistration.NetResources = lRegistration;
-      lRegistration.addPipeMsgListener(this);
-   }
-   
-   ((NetworkResources) aRegistration.NetResources).publish(aRegistration.Expiration);
-   } catch (Exception e) {
-      throw new P2pProxyException(e);
-   }
-   
-}
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/peers/NetworkResources.java b/p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/peers/NetworkResources.java
deleted file mode 100644 (file)
index 328ff38..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-NetworkResources.java -- connection to a jxta network.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.sipproxy.peers;
-
-import java.io.IOException;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.log4j.Logger;
-
-import org.linphone.p2pproxy.core.JxtaNetworkManager;
-import org.linphone.p2pproxy.core.MessageDispatcher;
-import org.linphone.p2pproxy.core.media.jxtaudpproxy.RtpSessionImpl;
-
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.pipe.InputPipe;
-
-import net.jxta.pipe.PipeMsgListener;
-
-/**
- * @author jehan
- *
- */
-public class NetworkResources {
-   public enum State {idle,offering,answering,ready} 
-   private static String PIPE_ID="org.linphone.p2pproxy.bidi-pipe.id";
-   private final InputPipe mInputPipe;
-   private MessageDispatcher mMessageDispatcher = new MessageDispatcher();
-   private Map<String,RtpSessionImpl> mRtpSessionTab = new HashMap<String,RtpSessionImpl>();
-   private final JxtaNetworkManager mJxtaNetworkManager;
-   private final static Logger mLog = Logger.getLogger(NetworkResources.class);
-   private State mState = State.idle;
-   public NetworkResources(String aUserName, JxtaNetworkManager aJxtaNetworkManager) throws IOException {
-      mJxtaNetworkManager = aJxtaNetworkManager;
-      mInputPipe = mJxtaNetworkManager.createPipe(PIPE_ID+"-"+aUserName, aUserName, mMessageDispatcher);
-   }
-   public void release(){
-      ;
-   }
-   public void putRtpSession(String key,RtpSessionImpl value) {
-          mRtpSessionTab.put(key, value);
-          addPipeMsgListener(value);
-   }
-   public RtpSessionImpl getRtpSession(String key) {
-          return mRtpSessionTab.get(key);
-   }
-   public boolean hasRtpSession(String key) {
-          return mRtpSessionTab.containsKey(key);
-   }
-   public void addPipeMsgListener(PipeMsgListener aPipeMsgListener) {
-      mMessageDispatcher.addPipeMsgListener( aPipeMsgListener);
-   }
-   public void publish(long anExpiration) throws IOException {
-      DiscoveryService lDiscoveryService = mJxtaNetworkManager.getPeerGroup().getDiscoveryService();
-      
-      if (anExpiration > 0) {
-         //publish sip pipe
-         lDiscoveryService.publish(mInputPipe.getAdvertisement(), anExpiration, anExpiration);
-      } else {
-          //first flush in any cases
-         lDiscoveryService.flushAdvertisement(mInputPipe.getAdvertisement());
-         mInputPipe.close();
-      }
-
-      mLog.info("adv ["+mInputPipe.getAdvertisement().getName()+"] published expire ["+anExpiration+"]");
-   }
-
-       public State getState() {
-               return mState;
-       }
-       public void setState(State state) {
-               mState = state;
-       }
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/superpeers/JxtaNetworkResources.java b/p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/superpeers/JxtaNetworkResources.java
deleted file mode 100644 (file)
index 04a4d8d..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-JxtaNetworkResources.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-package org.linphone.p2pproxy.core.sipproxy.superpeers;
-
-import java.io.IOException;
-
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.id.IDFactory;
-
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.core.JxtaNetworkManager;
-import org.linphone.p2pproxy.core.P2pUserProfileAdvertisement;
-
-
-public class JxtaNetworkResources {
-   private final JxtaNetworkManager mJxtaNetworkManager;
-   private final static Logger mLog = Logger.getLogger(JxtaNetworkResources.class);
-   private final P2pUserRegistrationAdvertisement mP2pUserRegistrationAdvertisement;
-   private final static long EXPIRATION= 120000;
-   
-   JxtaNetworkResources (String aUserName, JxtaNetworkManager aJxtaNetworkManager,String aRegistrarAddress) {
-      mJxtaNetworkManager = aJxtaNetworkManager;
-      mP2pUserRegistrationAdvertisement = (P2pUserRegistrationAdvertisement) AdvertisementFactory.newAdvertisement(P2pUserRegistrationAdvertisement.getAdvertisementType());
-      mP2pUserRegistrationAdvertisement.setID(IDFactory.newCodatID(mJxtaNetworkManager.getPeerGroup().getPeerGroupID(), aUserName.toString().getBytes()));
-      mP2pUserRegistrationAdvertisement.setUserName(aUserName.toString());
-      mP2pUserRegistrationAdvertisement.setRegistrarAddress(aRegistrarAddress.toString());
-      mLog.info("creating network resource for user ["+aUserName+"] on registrar ["+aRegistrarAddress+"]");
-   }
-   
-   void publish(long aLiveTime) throws P2pProxyException {
-      try {
-         DiscoveryService lDiscoveryService = mJxtaNetworkManager.getPeerGroup().getDiscoveryService();
-         if (aLiveTime > 0) {
-            lDiscoveryService.publish(mP2pUserRegistrationAdvertisement,aLiveTime,EXPIRATION);
-         } else {
-            //first flush in any cases
-            lDiscoveryService.flushAdvertisement(mP2pUserRegistrationAdvertisement);
-         }
-      } catch (IOException e1) {
-         throw new P2pProxyException(e1);
-      }
-      mLog.info("publishing P2pUserRegistration Advertisement ["+mP2pUserRegistrationAdvertisement+"]published expire ["+aLiveTime+"]");
-   }   
-   
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/superpeers/P2pUserRegistrationAdvertisement.java b/p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/superpeers/P2pUserRegistrationAdvertisement.java
deleted file mode 100644 (file)
index 4e68219..0000000
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-P2pUserRegistrationAdvertisement.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.sipproxy.superpeers;
-
-
-import java.io.Serializable;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Enumeration;
-
-import org.apache.log4j.Logger;
-
-
-
-
-import net.jxta.document.Advertisement;
-import net.jxta.document.AdvertisementFactory;
-import net.jxta.document.Attributable;
-import net.jxta.document.Document;
-import net.jxta.document.Element;
-import net.jxta.document.ExtendableAdvertisement;
-import net.jxta.document.MimeMediaType;
-import net.jxta.document.StructuredDocument;
-import net.jxta.document.StructuredDocumentFactory;
-import net.jxta.document.TextElement;
-import net.jxta.id.ID;
-import net.jxta.id.IDFactory;
-
-/**
- * derivated from jxta Advertisement tutorial
- * <pre>
- * &lt;?xml version="1.0"?>
- * &lt;!DOCTYPE jxta:System>
- * &lt;jxta:System xmlns:jxta="http://jxta.org">
- *   &lt;id>NULL &lt;/id>
- *   &lt;user-name>address where the sip endpoint is currently registered&lt;/user-name>
- *   &lt;registrar-address>address where the sip endpoint is currently registered&lt;/registrar-address>
- * &lt;/jxta:System>
- * </pre>
- */
-public class P2pUserRegistrationAdvertisement extends ExtendableAdvertisement implements Comparable, Cloneable, Serializable {
-   /**
-    * Instantiator
-    */
-   public static class Instantiator implements AdvertisementFactory.Instantiator {
-
-      /**
-       * Returns the identifying type of this Advertisement.
-       *
-       * @return String the type of advertisement
-       */
-      public String getAdvertisementType() {
-         return P2pUserRegistrationAdvertisement.getAdvertisementType();
-      }
-
-      /**
-       * Constructs an instance of <CODE>Advertisement</CODE> matching the
-       * type specified by the <CODE>advertisementType</CODE> parameter.
-       *
-       * @return The instance of <CODE>Advertisement</CODE> or null if it
-       *         could not be created.
-       */
-      public Advertisement newInstance() {
-         return new P2pUserRegistrationAdvertisement();
-      }
-
-      /**
-       * Constructs an instance of <CODE>Advertisement</CODE> matching the
-       * type specified by the <CODE>advertisementType</CODE> parameter.
-       *
-       * @param root Specifies a portion of a StructuredDocument which will
-       *             be converted into an Advertisement.
-       * @return The instance of <CODE>Advertisement</CODE> or null if it
-       *         could not be created.
-       */
-      public Advertisement newInstance(net.jxta.document.Element root) {
-         return new P2pUserRegistrationAdvertisement(root);
-      }
-   }
-   private ID mId ;;
-   private String mRegistrarAddress;
-   private String mUserUri;
-   public final static String REGISTRAR_ADDRESS_TAG = "registrar-address";
-   public final static String USER_NAME_TAG = "registration-user-name";
-   private final static String ID_TAG = "ID";
-   private final static String[] mIndexs = {USER_NAME_TAG};
-   private final static Logger mLog = Logger.getLogger(P2pUserRegistrationAdvertisement.class);
-   /**
-    * 
-    */
-   public P2pUserRegistrationAdvertisement(Element root) {
-
-      TextElement doc = (TextElement) root;
-
-      if (!getAdvertisementType().equals(doc.getName())) {
-         throw new IllegalArgumentException("Could not construct : " + getClass().getName() + "from doc containing a " + doc.getName());
-      }
-      initialize(doc);
-
-   }
-   public P2pUserRegistrationAdvertisement() {
-
-      // TODO Auto-generated constructor stub
-   }
-   /* (non-Javadoc)
-    * @see net.jxta.document.ExtendableAdvertisement#getDocument(net.jxta.document.MimeMediaType)
-    */
-   @Override
-   public Document getDocument(MimeMediaType asMimeType) {
-
-      StructuredDocument adv = StructuredDocumentFactory.newStructuredDocument(asMimeType,
-            getAdvertisementType());
-      if (adv instanceof Attributable) {
-         ((Attributable) adv).addAttribute("xmlns:jxta", "http://jxta.org");
-      }
-      Element e;
-      e = adv.createElement(ID_TAG, getID().toString());
-      adv.appendChild(e);
-      e = adv.createElement(USER_NAME_TAG, getUserName().trim());
-      adv.appendChild(e);
-      e = adv.createElement(REGISTRAR_ADDRESS_TAG, getRegistrarAddress().trim());
-      adv.appendChild(e);
-      return adv;
-   }
-
-   @Override
-   public ID getID() {
-      return mId;
-   }
-
-   @Override
-   public String[] getIndexFields() {
-      return mIndexs;
-   }
-   public static String getAdvertisementType() {
-      return "jxta:p2p-proxy-user-registration";
-   }
-   /* (non-Javadoc)
-    * @see net.jxta.document.Advertisement#toString()
-    */
-   @Override
-   public String toString() {
-      // TODO Auto-generated method stub
-      return super.toString();
-   }
-   public int compareTo(Object other) {
-      return getID().toString().compareTo(other.toString());
-   }
-   /**
-    * Intialize a System advertisement from a portion of a structured document.
-    *
-    * @param root document root
-    */
-   protected void initialize(Element root) {
-      if (!TextElement.class.isInstance(root)) {
-         throw new IllegalArgumentException(getClass().getName() +
-               " only supports TextElement");
-      }
-      TextElement doc = (TextElement) root;
-      if (!doc.getName().equals(getAdvertisementType())) {
-         throw new IllegalArgumentException("Could not construct : "
-               + getClass().getName() + "from doc containing a " +
-               doc.getName());
-      }
-      Enumeration elements = doc.getChildren();
-      while (elements.hasMoreElements()) {
-         TextElement elem = (TextElement) elements.nextElement();
-         if (!handleElement(elem)) {
-            mLog.warn("Unhandleded element \'" + elem.getName() + "\' in " +  doc.getName());
-         }
-      }
-   }
-   /**
-    * Process an individual element from the document.
-    *
-    * @param elem the element to be processed.
-    * @return true if the element was recognized, otherwise false.
-    */
-   protected boolean handleElement(TextElement elem) {
-      if (elem.getName().equals(ID_TAG)) {
-         try {
-            URI id = new URI(elem.getTextValue());
-            setID(IDFactory.fromURI(id));
-         } catch (URISyntaxException badID) {
-            throw new IllegalArgumentException("unknown ID format in advertisement: " +
-                  elem.getTextValue());
-         }
-         catch (ClassCastException badID) {
-            throw new IllegalArgumentException("Id is not a known id type: " +
-                  elem.getTextValue());
-         }
-         return true;
-      } else if (elem.getName().equals(USER_NAME_TAG)) {
-         setUserName(elem.getTextValue());
-         return true;
-      } else if (elem.getName().equals(REGISTRAR_ADDRESS_TAG)) {
-         setRegistrarAddress(elem.getTextValue());
-         return true;
-      } else {
-         return false;
-      }
-   }
-   public void setID(ID id) {
-      mId = id;
-   }
-   @Override
-   public String getBaseAdvType() {
-      // TODO Auto-generated method stub
-      return null;
-   }
-   /**
-    * @return Returns the mName.
-    */
-   public String getRegistrarAddress() {
-      return mRegistrarAddress;
-   }
-   /**
-    * @param name The mName to set.
-    */
-   public void setRegistrarAddress(String anAddress) {
-      mRegistrarAddress = anAddress;
-   }
-   /**
-    * @return Returns the mName.
-    */
-   public String getUserName() {
-      return mUserUri;
-   }
-   /**
-    * @param name The mName to set.
-    */
-   public void setUserName(String anName) {
-      mUserUri = anName;
-   }
-   /* (non-Javadoc)
-    * @see java.lang.Object#equals(java.lang.Object)
-    */
-   @Override
-   public boolean equals(Object obj) {
-
-      if (this == obj) {
-          return true;
-      }
-      if (obj instanceof P2pUserRegistrationAdvertisement) {
-         P2pUserRegistrationAdvertisement adv = (P2pUserRegistrationAdvertisement) obj;
-          return getID().equals(adv.getID());
-      }
-
-      return false;
-  
-   }
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/superpeers/SuperPeerProxy.java b/p2pproxy/src/org/linphone/p2pproxy/core/sipproxy/superpeers/SuperPeerProxy.java
deleted file mode 100644 (file)
index fd68158..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-SuperPeerProxy.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-package org.linphone.p2pproxy.core.sipproxy.superpeers;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-
-
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.api.P2pProxyUserNotFoundException;
-import org.linphone.p2pproxy.core.JxtaNetworkManager;
-import org.linphone.p2pproxy.core.P2pProxyAdvertisementNotFoundException;
-import org.linphone.p2pproxy.core.sipproxy.RegistrationHandler;
-import org.linphone.p2pproxy.core.sipproxy.SipProxy;
-import org.linphone.p2pproxy.core.sipproxy.SipUtils;
-import org.linphone.p2pproxy.core.sipproxy.SipProxyRegistrar.Registration;
-
-import org.zoolu.sip.address.NameAddress;
-import org.zoolu.sip.address.SipURL;
-import org.zoolu.sip.header.Header;
-import org.zoolu.sip.header.MultipleHeader;
-import org.zoolu.sip.header.RecordRouteHeader;
-import org.zoolu.sip.header.RequestLine;
-import org.zoolu.sip.header.RouteHeader;
-import org.zoolu.sip.message.Message;
-import org.zoolu.sip.provider.SipProvider;
-
-public class SuperPeerProxy implements SipProxy, RegistrationHandler {
-   private final JxtaNetworkManager mJxtaNetworkManager;
-   private final String mRegistrarAddress;
-   private final Map<String,Registration> mRegistrationTab;
-   private static Logger mLog = Logger.getLogger(SuperPeerProxy.class);
-   
-   public SuperPeerProxy(JxtaNetworkManager aJxtaNetworkManager, String aRegistrarAddress, Map<String,Registration> aRegistrationTab ) {
-      mJxtaNetworkManager = aJxtaNetworkManager;
-      mRegistrarAddress = aRegistrarAddress;
-      mRegistrationTab = aRegistrationTab;
-   }
-   public void proxyRequest(SipProvider aProvider, Message aMessage) throws P2pProxyException {
-      // 1 check if user is a local user
-      
-          if (mLog.isDebugEnabled()) mLog.debug("processing request " +aMessage);
-          String lTo = aMessage.getToHeader().getNameAddress().getAddress().toString();
-          SipURL lNextHope = null;
-       
-                  //ok need to find the root
-                  //is local ?
-                  synchronized (mRegistrationTab) {
-                          if (mRegistrationTab.containsKey(lTo)) {
-                                  //great, just need to get it
-                                  lNextHope = new SipURL(mRegistrationTab.get(lTo).Contact);
-                          } else {
-                                  if (aMessage.isInvite() || aMessage.isCancel()) {
-                                          //need to found the right proxy
-                                          try {
-                                                  List<P2pUserRegistrationAdvertisement> lAdvList = (List<P2pUserRegistrationAdvertisement>) mJxtaNetworkManager.getAdvertisementList(null, P2pUserRegistrationAdvertisement.USER_NAME_TAG,lTo, true);
-                                                  lNextHope = new SipURL(lAdvList.get(0).getRegistrarAddress());
-                                          } catch (Exception e) {
-                                                  throw new P2pProxyUserNotFoundException("user ["+lTo+"] not found",e);
-                                          } 
-                                          
-                                  } else {
-                                          //nop
-                                  }
-                          }
-                  }
-                  if (aMessage.isInvite() || aMessage.isCancel()) {
-                          //check if invite
-                          // add recordRoute
-                          SipUtils.addRecordRoute(aProvider,aMessage);    
-                  }
-                  
-          if (lNextHope == null) {
-                  // not for us
-                  //just look at route set
-                  MultipleHeader lMultipleRoute = aMessage.getRoutes();
-                  
-                  if (lMultipleRoute != null && lMultipleRoute.isEmpty()== false) {
-                          RouteHeader lRouteHeader = new RouteHeader(lMultipleRoute.getTop());
-                          lNextHope = lRouteHeader.getNameAddress().getAddress();
-                  } else {
-                          // last proxy, get route from request uri
-                          //check if we know the user
-                          lNextHope = aMessage.getRequestLine().getAddress();
-                  }
-                  
-          }
-       
-       aMessage.setRequestLine(new RequestLine(aMessage.getRequestLine().getMethod(), lNextHope));
-       aProvider.sendMessage(aMessage);
-
-   }
-
-   public void proxyResponse(SipProvider aProvider, Message aMessage) throws P2pProxyException {
-      if (mLog.isInfoEnabled()) mLog.info("processing response " +aMessage);
-      //1 remove via header   
-      SipUtils.removeVia(aProvider,aMessage);
-      aProvider.sendMessage(aMessage);
-
-   }
-
-   public void updateRegistration(Registration aRegistration, Message aRegistrationMessage) throws P2pProxyException {
-      if (aRegistration.NetResources == null) {
-         // new registration, create adv
-         JxtaNetworkResources lRegistration = new JxtaNetworkResources(aRegistration.From, mJxtaNetworkManager,mRegistrarAddress);  
-         aRegistration.NetResources = lRegistration;
-      }
-
-      ((JxtaNetworkResources) aRegistration.NetResources).publish(aRegistration.Expiration);
-   }
-   public String getSipProxyRegistrarAddress() {
-      return mRegistrarAddress;
-   }
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/stun/AddressInfo.java b/p2pproxy/src/org/linphone/p2pproxy/core/stun/AddressInfo.java
deleted file mode 100644 (file)
index 910da9b..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-AddressInfo.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-package org.linphone.p2pproxy.core.stun;
-
-import java.net.InetSocketAddress;
-
-public class AddressInfo {
-   enum Mode {
-        open
-      , blockedUDP
-      , fullCone
-      , restrictedCone
-      , portRestrictedCone
-      , symmetric
-      , symmetricUDPFirewall
-      , unknown
-   }
-   private final InetSocketAddress mPrivateAddress;
-   private InetSocketAddress mPublicAddress;
-   private Mode mMode = Mode.unknown;
-   
-   public AddressInfo(InetSocketAddress aPrivateAddress) {
-      mPrivateAddress = aPrivateAddress;
-   }
-   public Mode getMode() {
-      return mMode;
-   }
-   public void setMode(Mode aMode) {
-      mMode = aMode;
-   }
-   public InetSocketAddress getPrivateAddress() {
-      return mPrivateAddress;
-   }
-   public InetSocketAddress getPublicAddress() {
-      return mPublicAddress;
-   }
-   public void setPublicAddress(InetSocketAddress aPublicAddress) {
-          mPublicAddress = aPublicAddress;
-   }
-   public boolean isNated() {
-      if (mPublicAddress != null) { 
-         return mPublicAddress.equals(mPrivateAddress);
-      } else {
-         return false;
-      }
-   }
-   public String toString() {
-      return "private ["+mPrivateAddress+"] public ["+mPublicAddress+"] mode ["+mMode+"]";
-   }
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/stun/DiscoveryInfo.java b/p2pproxy/src/org/linphone/p2pproxy/core/stun/DiscoveryInfo.java
deleted file mode 100644 (file)
index 07e2e26..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package org.linphone.p2pproxy.core.stun;
-
-import java.net.*;
-
-public class DiscoveryInfo {
-       private boolean error = false;
-       private int errorResponseCode = 0;
-       private String errorReason;
-       private boolean blockedUDP = false;
-       private boolean fullCone = false;
-       private boolean symmetric = false;
-       private InetSocketAddress mTestSocketAddress;
-       private InetSocketAddress mPublicSocketAddress;
-       
-       public DiscoveryInfo(InetSocketAddress aTestSocketAddress) {
-               mTestSocketAddress = aTestSocketAddress;
-       }
-       
-       public boolean isError() {
-               return error;
-       }
-       
-       public void setError(int responseCode, String reason) {
-               this.error = true;
-               this.errorResponseCode = responseCode;
-               this.errorReason = reason;
-       }
-       
-
-
-       public boolean isBlockedUDP() {
-               if (error) return false;
-               return blockedUDP;
-       }
-
-       public void setBlockedUDP() {
-               this.blockedUDP = true;
-       }
-       
-       public boolean isFullCone() {
-               if (error) return false;
-               return fullCone;
-       }
-
-       public void setFullCone() {
-               this.fullCone = true;
-       }
-
-       public boolean isSymmetric() {
-               if (error) return false;
-               return symmetric;
-       }
-
-       public void setSymmetric() {
-               this.symmetric = true;
-       }
-
-       public InetSocketAddress getLocalSocketAddress() {
-               return mTestSocketAddress;
-       }
-       
-       public InetSocketAddress getPublicSocketAddress() {
-               return mPublicSocketAddress;
-       }       
-       public void setPublicSocketAddress(InetSocketAddress address) {
-               mPublicSocketAddress = address;
-       }       
-
-       public String toString() {
-               StringBuffer sb = new StringBuffer();
-               sb.append("Network interface: ");
-               try {
-                       sb.append(NetworkInterface.getByInetAddress(mTestSocketAddress.getAddress()).getName());
-               } catch (SocketException se) {
-                       sb.append("unknown");
-               }
-               sb.append("\n");
-               sb.append("Local Socket address: ");
-               sb.append(mTestSocketAddress);
-               sb.append("\n");
-               if (error) {
-                       sb.append(errorReason + " - Responsecode: " + errorResponseCode);
-                       return sb.toString();
-               }
-               sb.append("Result: ");
-               if (blockedUDP) sb.append("Firewall blocks UDP.\n");
-               if (fullCone) sb.append("Full Cone NAT handles connections.\n");
-               if (symmetric) sb.append("Symmetric Cone NAT handles connections.\n");
-               sb.append("Public IP address: ");
-               if (mPublicSocketAddress != null) {
-                       sb.append(mPublicSocketAddress.toString());
-               } else {
-                       sb.append("unknown");
-               }
-               sb.append("\n");
-               return sb.toString();
-       }
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/stun/StunClient.java b/p2pproxy/src/org/linphone/p2pproxy/core/stun/StunClient.java
deleted file mode 100644 (file)
index 2892902..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-StunClient.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-package org.linphone.p2pproxy.core.stun;
-
-import java.io.IOException;
-import java.net.DatagramPacket;
-import java.net.DatagramSocket;
-import java.net.InetSocketAddress;
-import java.net.PortUnreachableException;
-import java.net.SocketException;
-import java.net.SocketTimeoutException;
-import java.net.URI;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.List;
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.core.JxtaNetworkManager;
-import org.linphone.p2pproxy.core.P2pProxyAdvertisementNotFoundException;
-import org.linphone.p2pproxy.core.media.MediaResourceService;
-import org.linphone.p2pproxy.core.media.MediaResoureUnreachableException;
-import org.linphone.p2pproxy.core.sipproxy.NetworkResourceAdvertisement;
-import de.javawi.jstun.attribute.ChangeRequest;
-import de.javawi.jstun.attribute.ErrorCode;
-import de.javawi.jstun.attribute.MappedAddress;
-import de.javawi.jstun.attribute.MessageAttribute;
-import de.javawi.jstun.attribute.MessageAttributeException;
-import de.javawi.jstun.attribute.MessageAttributeParsingException;
-import de.javawi.jstun.attribute.ResponseAddress;
-import de.javawi.jstun.header.MessageHeader;
-import de.javawi.jstun.header.MessageHeaderParsingException;
-import de.javawi.jstun.util.Address;
-import de.javawi.jstun.util.UtilityException;
-
-public class StunClient {
-       private static Logger mLog = Logger.getLogger(StunClient.class);
-       private List<InetSocketAddress> mStunServerList;
-   JxtaNetworkManager mJxtaNetworkManager;
-   
-   private int SO_TIME_OUT = 300;
-   
-   public StunClient(String[] aStunServerList) {
-      List<InetSocketAddress> lAddressList = new ArrayList<InetSocketAddress>();
-      for (String lStunInstance:aStunServerList) {
-         URI lUri = URI.create(lStunInstance);
-         InetSocketAddress lInetSocketAddress = new InetSocketAddress(lUri.getHost(),lUri.getPort());
-         lAddressList.add(lInetSocketAddress);
-      }
-      mStunServerList = lAddressList;
-   }
-   StunClient(List<InetSocketAddress> aStunServerList) {
-      mStunServerList = aStunServerList;
-   }
-   public StunClient(JxtaNetworkManager aJxtaNetworkManager) throws P2pProxyException {
-      //need to acquire stun server address()
-      mJxtaNetworkManager = aJxtaNetworkManager;
-      try {
-         mStunServerList = acquireStunServerAddress();
-      } catch (Exception e) {
-         throw new P2pProxyException(e);
-      }
-   }   
-   public List<InetSocketAddress> getStrunServerList() {
-          return mStunServerList;
-   }
-   private List<InetSocketAddress> acquireStunServerAddress() throws P2pProxyAdvertisementNotFoundException, InterruptedException, IOException {
-      List<NetworkResourceAdvertisement> lStunServerAdv = (List<NetworkResourceAdvertisement>) mJxtaNetworkManager.getAdvertisementList(null, MediaResourceService.ADV_NAME, true);
-      List<InetSocketAddress> lSocketAddressList = new ArrayList<InetSocketAddress>(lStunServerAdv.size());
-      for (NetworkResourceAdvertisement lNetworkResourceAdvertisement: lStunServerAdv) {
-         URI lServerUri = URI.create(lNetworkResourceAdvertisement.getAddress());
-         lSocketAddressList.add(new InetSocketAddress(lServerUri.getHost(),lServerUri.getPort()));
-      }
-      return lSocketAddressList;
-   }
-   
-   public AddressInfo computeAddressInfo(DatagramSocket lLocalSocket) throws PortUnreachableException, P2pProxyException {
-      AddressInfo lAddressInfo = new AddressInfo((InetSocketAddress) lLocalSocket.getLocalSocketAddress()); 
-      InetSocketAddress lCurrentMediaServerAddress = null; 
-      try {
-             DiscoveryInfo lDiscoveryInfo = new DiscoveryInfo((InetSocketAddress) lLocalSocket.getLocalSocketAddress()); 
-             //1 bind request 
-             bindRequest(lDiscoveryInfo,lLocalSocket,lLocalSocket,null,lCurrentMediaServerAddress = mStunServerList.get(0));
-                  //2 bind request
-                  if (mStunServerList.size() > 1) {
-                  //open new socket
-                  DatagramSocket lDatagramSocket = new DatagramSocket();
-                  bindRequest(lDiscoveryInfo,lDatagramSocket, lLocalSocket, lDiscoveryInfo.getPublicSocketAddress(),lCurrentMediaServerAddress = mStunServerList.get(1));
-                  lDatagramSocket.close();
-                  }
-                  //analyse
-                   
-                  lAddressInfo.setPublicAddress(lDiscoveryInfo.getPublicSocketAddress());
-                  
-       } catch (PortUnreachableException pex) {
-               MediaResoureUnreachableException lExeption = new MediaResoureUnreachableException(pex);
-               lExeption.setRourceAddress(lCurrentMediaServerAddress.getAddress().getHostAddress()+":"+lCurrentMediaServerAddress.getPort());
-               throw lExeption;
-       } catch (Exception e) {
-               throw new P2pProxyException(e);
-       }
-          return lAddressInfo;
-   }
-   private void bindRequest(DiscoveryInfo aDiscoveryInfo,DatagramSocket aLocalSocket, DatagramSocket aResponseSocket,InetSocketAddress aResponseAddress, InetSocketAddress aStunAddress) throws UtilityException, SocketException, UnknownHostException, IOException, MessageAttributeParsingException, MessageHeaderParsingException, P2pProxyException {
-          int timeSinceFirstTransmission = 0;
-          int lSoTimeOut = SO_TIME_OUT;
-          while (true) {
-                  try {
-                          aLocalSocket.setReuseAddress(true);
-                          aLocalSocket.connect(aStunAddress);
-                          aLocalSocket.setSoTimeout(lSoTimeOut);
-
-                          MessageHeader sendMH = new MessageHeader(MessageHeader.MessageHeaderType.BindingRequest);
-                          sendMH.generateTransactionID();
-
-                          ChangeRequest changeRequest = new ChangeRequest();
-                          sendMH.addMessageAttribute(changeRequest);
-                          if (!((InetSocketAddress)aLocalSocket.getLocalSocketAddress()).equals((InetSocketAddress)aResponseSocket.getLocalSocketAddress()) && aResponseAddress != null) {
-                                  // add response address
-                                  ResponseAddress lResponseAddress = new ResponseAddress();
-                                  lResponseAddress.setAddress(new Address(aResponseAddress.getAddress().getHostAddress()));
-                                  try {
-                                          lResponseAddress.setPort(aResponseAddress.getPort());
-                                          sendMH.addMessageAttribute(lResponseAddress);
-                                  } catch (MessageAttributeException e) {
-                                          mLog.info("Cannot set Response address ["+lResponseAddress+"]");
-                                  }
-                          }
-
-                          byte[] data = sendMH.getBytes();
-                          DatagramPacket send = new DatagramPacket(data, data.length);
-                          aLocalSocket.send(send);
-
-                          MessageHeader receiveMH = new MessageHeader();
-                          while (!(receiveMH.equalTransactionID(sendMH))) {
-                                  DatagramPacket receive = new DatagramPacket(new byte[200], 200);
-                                  aResponseSocket.receive(receive);
-                                  receiveMH = MessageHeader.parseHeader(receive.getData());
-                                  receiveMH.parseAttributes(receive.getData());
-                          }
-
-                          MappedAddress lMappedAddress = (MappedAddress) receiveMH.getMessageAttribute(MessageAttribute.MessageAttributeType.MappedAddress);
-                          ErrorCode ec = (ErrorCode) receiveMH.getMessageAttribute(MessageAttribute.MessageAttributeType.ErrorCode);
-                          if (ec != null) {
-                                  aDiscoveryInfo.setError(ec.getResponseCode(), ec.getReason());
-                                  throw new P2pProxyException("Message header contains an Errorcode message attribute. ["+ec+"]");
-                          }
-                          if ((lMappedAddress == null)) {
-                                  throw new P2pProxyException("Response does not contain a Mapped Address message attribute.");
-
-                          } else {
-                                  if (aLocalSocket.getLocalSocketAddress().equals(aResponseSocket.getLocalSocketAddress())) {
-                                          aDiscoveryInfo.setPublicSocketAddress(new InetSocketAddress(lMappedAddress.getAddress().getInetAddress(),lMappedAddress.getPort()));
-                                  } else {
-                                          aDiscoveryInfo.setFullCone();
-                                  }
-                          }
-                          return;
-
-                  } catch (PortUnreachableException pex ) {
-                          throw pex;
-                  }
-                  catch (SocketTimeoutException ste) {
-                          if (timeSinceFirstTransmission < 7900) {
-                                  if (mLog.isInfoEnabled()) mLog.info("Socket timeout while receiving the response.");
-                                  timeSinceFirstTransmission += lSoTimeOut;
-                                  int timeoutAddValue = (timeSinceFirstTransmission * 2);
-                                  if (timeoutAddValue > 1600) timeoutAddValue = 1600;
-                                  lSoTimeOut = timeoutAddValue;
-                          } else {
-                                  // node is not capable of udp communication
-                                  if (mLog.isInfoEnabled()) mLog.info("Socket timeout while receiving the response. Maximum retry limit exceed. Give up.");
-                                  if (aLocalSocket.getLocalSocketAddress().equals(aResponseSocket.getLocalSocketAddress())) {
-                                          aDiscoveryInfo.setBlockedUDP();
-                                  } else {
-                                          aDiscoveryInfo.setSymmetric();
-                                  }
-                                  if (mLog.isInfoEnabled()) mLog.info("Node is not capable of UDP communication.");
-                                  return ;
-                          }
-                  } 
-          }
-   }
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/stun/StunServer.java b/p2pproxy/src/org/linphone/p2pproxy/core/stun/StunServer.java
deleted file mode 100644 (file)
index 10261cb..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-StunServer.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.stun;
-
-
-import java.net.DatagramPacket;
-import java.net.DatagramSocket;
-import java.net.SocketException;
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.core.GenericUdpSession;
-import org.linphone.p2pproxy.core.ServiceProvider;
-
-import de.javawi.jstun.attribute.ChangeRequest;
-import de.javawi.jstun.attribute.ErrorCode;
-import de.javawi.jstun.attribute.MappedAddress;
-import de.javawi.jstun.attribute.MessageAttributeException;
-import de.javawi.jstun.attribute.ResponseAddress;
-import de.javawi.jstun.attribute.SourceAddress;
-import de.javawi.jstun.attribute.UnknownAttribute;
-import de.javawi.jstun.attribute.UnknownMessageAttributeException;
-import de.javawi.jstun.attribute.MessageAttributeInterface.MessageAttributeType;
-import de.javawi.jstun.header.MessageHeader;
-import de.javawi.jstun.header.MessageHeaderParsingException;
-import de.javawi.jstun.header.MessageHeaderInterface.MessageHeaderType;
-import de.javawi.jstun.util.Address;
-
-
-/*
- * This class implements a STUN server as described in RFC 3489.
- * neither change port nor change address are implemented 
- */
-public class StunServer implements GenericUdpSession.MessageHandler {
-       private static Logger mLog = Logger.getLogger(StunServer.class);
-       private final DatagramSocket mSocket;
-       
-       public StunServer(DatagramSocket mListeningSocket) throws SocketException {
-               mSocket = mListeningSocket;
-       }
-
-       public void onMessage(DatagramPacket lMessage) {
-               // derivated from JSTUN (Thomas King) 
-               MessageHeader receiveMH = null;
-               try {
-                       receiveMH = MessageHeader.parseHeader(lMessage.getData());
-               } catch (MessageHeaderParsingException e1) {
-                       if (mLog.isInfoEnabled()) mLog.info("not a stun message");
-                       return;
-               }
-
-               try {
-                       receiveMH.parseAttributes(lMessage.getData());
-                       if (receiveMH.getType() == MessageHeaderType.BindingRequest) {
-                               ChangeRequest cr = (ChangeRequest) receiveMH.getMessageAttribute(MessageAttributeType.ChangeRequest);
-                               if (cr == null) throw new MessageAttributeException("Message attribute change request is not set.");
-                               ResponseAddress ra = (ResponseAddress) receiveMH.getMessageAttribute(MessageAttributeType.ResponseAddress);
-
-                               MessageHeader sendMH = new MessageHeader(MessageHeaderType.BindingResponse);
-                               sendMH.setTransactionID(receiveMH.getTransactionID());
-
-                               // Mapped address attribute
-                               MappedAddress ma = new MappedAddress();
-                               ma.setAddress(new Address(lMessage.getAddress().getAddress()));
-                               ma.setPort(lMessage.getPort());
-                               sendMH.addMessageAttribute(ma);
-                               if ((!cr.isChangePort()) && (!cr.isChangeIP())) {
-                                       if (mLog.isInfoEnabled()) mLog.info("Nothing received in Change Request attribute");
-                                       // Source address attribute
-                                       SourceAddress sa = new SourceAddress();
-                                       sa.setAddress(new Address(mSocket.getLocalAddress().getAddress()));
-                                       sa.setPort(mSocket.getLocalPort());
-                                       sendMH.addMessageAttribute(sa);
-                                       byte[] data = sendMH.getBytes();
-                                       DatagramPacket send = new DatagramPacket(data, data.length);
-                                       if (ra != null) {
-                                               send.setPort(ra.getPort());
-                                               send.setAddress(ra.getAddress().getInetAddress());
-                                       } else {
-                                               send.setPort(lMessage.getPort());
-                                               send.setAddress(lMessage.getAddress());
-                                       }
-                                       mSocket.send(send);
-                                       if (mLog.isInfoEnabled()) mLog.info(mSocket.getLocalAddress().getHostAddress() + ":" + mSocket.getLocalPort() + " send Binding Response to " + send.getAddress().getHostAddress() + ":" + send.getPort());
-                               } else {
-//                                     Generate Binding error response
-                                       sendMH = new MessageHeader(MessageHeaderType.BindingErrorResponse);
-                                       sendMH.setTransactionID(receiveMH.getTransactionID());
-                                       ErrorCode lErrorCode = new ErrorCode();
-                                       lErrorCode.setResponseCode(400); //bad request
-                                       sendMH.addMessageAttribute(lErrorCode);
-                                       byte[] data = sendMH.getBytes();
-                                       DatagramPacket send = new DatagramPacket(data, data.length);
-                                       send.setPort(lMessage.getPort());
-                                       send.setAddress(lMessage.getAddress());
-                                       mSocket.send(send);
-                                       if (mLog.isInfoEnabled()) mLog.info("cannot handle cr ["+cr+"] attibute");
-                               }
-                       }
-               } catch ( Exception e) {
-
-                       try {
-                               // Generate Binding error response
-
-                               MessageHeader sendMH = new MessageHeader(MessageHeaderType.BindingErrorResponse);
-                               sendMH.setTransactionID(receiveMH.getTransactionID());
-
-                               if (e instanceof UnknownMessageAttributeException) {
-                                       // Unknown attributes
-                                       UnknownAttribute ua = new UnknownAttribute();
-                                       ua.addAttribute(((UnknownMessageAttributeException) e).getType());
-                                       sendMH.addMessageAttribute(ua);
-                               } else {
-                                       ErrorCode lErrorCode = new ErrorCode();
-                                       lErrorCode.setResponseCode(500);
-                                       sendMH.addMessageAttribute(lErrorCode); 
-                               }
-                               byte[] data = sendMH.getBytes();
-                               DatagramPacket send = new DatagramPacket(data, data.length);
-                               send.setPort(lMessage.getPort());
-                               send.setAddress(lMessage.getAddress());
-                               mSocket.send(send);
-                               mLog.error(" send Binding Error Response to " + send.getAddress().getHostAddress() + ":" + send.getPort(),e);
-                       } catch(Exception e1) {
-                               mLog.error("cannot handle error", e1);
-                       }
-               }       
-
-       }
-
-
-}
\ No newline at end of file
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/utils/AccountManagerCli.java b/p2pproxy/src/org/linphone/p2pproxy/core/utils/AccountManagerCli.java
deleted file mode 100644 (file)
index 36951c1..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-AccountManagerCli.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.utils;
-
-
-import javax.management.MBeanServerConnection;
-import javax.management.MBeanServerInvocationHandler;
-import javax.management.ObjectName;
-import javax.management.remote.JMXConnector;
-import javax.management.remote.JMXConnectorFactory;
-import javax.management.remote.JMXServiceURL;
-
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.api.P2pProxyUserAlreadyExistException;
-import org.linphone.p2pproxy.core.JxtaNetworkManager;
-import org.linphone.p2pproxy.core.P2pProxyAccountManagementMBean;
-import org.linphone.p2pproxy.core.P2pProxyMain;
-import org.linphone.p2pproxy.core.P2pProxyMainMBean;
-import org.linphone.p2pproxy.core.sipproxy.SipProxyRegistrar;
-
-public class AccountManagerCli {
-   public final static String USER_ADD = "user-add";
-   public final static String RELOAD_TRACE = "reload-trace";
-   /**
-    * @param args
-    * @throws Exception 
-    */
-   public static void main(String[] args)  {
-      try {
-         // get other params
-         String lCommand = "null";
-         int lCommandArgsIndex=0;
-         for (int i=0; i < args.length; i=i+2) {  
-            String argument = args[i];
-            if (argument.equals("-c")) {
-               lCommand = args[i + 1];
-               //nop
-            } else {
-               // no more option, takes args
-               lCommandArgsIndex = i;
-
-            }
-         }
-         // Create an RMI connector client and
-         // connect it to the RMI connector server
-         //
-         JMXServiceURL lJMXServiceURL = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://:6789/jmxrmi");
-         JMXConnector lJMXConnector = JMXConnectorFactory.connect(lJMXServiceURL, null);
-
-         // Get an MBeanServerConnection
-         //
-         MBeanServerConnection lMBeanServerConnection = lJMXConnector.getMBeanServerConnection();
-
-         
-         ObjectName lP2pProxyAccountManagementMBeanName = new ObjectName(P2pProxyMain.ACCOUNT_MGR_MBEAN_NAME);
-         ObjectName lP2pProxyMainMBeanName = new ObjectName(P2pProxyMain.MAIN_MBEAN_NAME);
-         
-         if (USER_ADD.equals(lCommand)) {
-            P2pProxyAccountManagementMBean lP2pProxyAccountManagementMBean = (P2pProxyAccountManagementMBean)
-            MBeanServerInvocationHandler.newProxyInstance(  lMBeanServerConnection
-                  ,lP2pProxyAccountManagementMBeanName
-                  ,P2pProxyAccountManagementMBean.class
-                  ,true);
-
-            System.out.println("creating user account for "+args[lCommandArgsIndex]);
-            System.out.println("please wait");
-            try {
-               lP2pProxyAccountManagementMBean.createAccount(args[lCommandArgsIndex]);
-            } catch (P2pProxyUserAlreadyExistException e) {
-               System.out.println("cannot create user account for "+args[lCommandArgsIndex]);
-               System.out.println("already exist");
-
-            } 
-            System.out.println("done");
-         } else if (RELOAD_TRACE.equals(lCommand)) {
-            P2pProxyMainMBean lP2pProxyMainMBean = (P2pProxyMainMBean)
-            MBeanServerInvocationHandler.newProxyInstance(  lMBeanServerConnection
-                  ,lP2pProxyMainMBeanName
-                  ,P2pProxyMainMBean.class
-                  ,true);
-
-            System.out.println("loading trace config file...");
-            try {
-               lP2pProxyMainMBean.loadTraceConfigFile();
-            } catch (P2pProxyException e) {
-               System.out.println("cannot load trace config file");
-            } 
-            System.out.println("done");         
-         }   
-            else {
-         
-            System.out.println("unkwon command ["+lCommand+"]");
-            usage();
-            System.exit(1);
-         }
-         lJMXConnector.close();
-      }catch (Exception e) {
-         e.printStackTrace();
-         System.exit(1);
-      }
-
-
-
-   }
-
-   private static void usage() {
-      System.out.println("p2pproxy-cli");
-      System.out.println("-c : command to execute {"+USER_ADD+" | "+RELOAD_TRACE+"}");
-      System.out.println("-p : client port");
-   }
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/utils/DumpLocalCache.java b/p2pproxy/src/org/linphone/p2pproxy/core/utils/DumpLocalCache.java
deleted file mode 100644 (file)
index 9f6f2d7..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-DumpLocalCache.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.core.utils;
-
-
-
-import net.jxta.impl.util.cm.DumpCm;
-import net.jxta.impl.util.cm.DumpCm.DumpCmCallback;
-
-public class DumpLocalCache {
-
-   /**
-    * @param args
-    * @throws Exception 
-    */
-   public static void main(String[] args) throws Exception {
-      DumpCm.dump(args, new DumpCmCallback() {
-
-         public void println(String val) {
-            System.out.println(val);
-         }
-         
-      });
-
-   }
-
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/utils/Excecutor.java b/p2pproxy/src/org/linphone/p2pproxy/core/utils/Excecutor.java
deleted file mode 100644 (file)
index 8101fed..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-package org.linphone.p2pproxy.core.utils;
-
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-public class Excecutor {
-        public final static ExecutorService pool = Executors.newCachedThreadPool();;
-}
diff --git a/p2pproxy/src/org/linphone/p2pproxy/core/utils/PeerGroupIdGenerator.java b/p2pproxy/src/org/linphone/p2pproxy/core/utils/PeerGroupIdGenerator.java
deleted file mode 100644 (file)
index e78dbc0..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-package org.linphone.p2pproxy.core.utils;
-import java.security.MessageDigest;
-
-import net.jxta.id.IDFactory;
-
-/*
- * Created on Sep 14, 2007
- *
- * To change the template for this generated file go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-
-public class PeerGroupIdGenerator {
-
-   /**
-    * @param args
-    */
-   public static void main(String[] args) {
-     
-         System.out.print(createInfrastructurePeerGroupID("p2p.linphone.org","p2pproxy"));
-   }
-   public static final net.jxta.peergroup.PeerGroupID createInfrastructurePeerGroupID(String clearTextID, String function){
-      System.out.println("Creating peer group ID =  clearText:'"+clearTextID+"' , function:'"+function+"'");
-      byte[] digest = generateHash(clearTextID, function);
-      net.jxta.peergroup.PeerGroupID peerGroupID = IDFactory.newPeerGroupID(  digest );
-      return peerGroupID;
-  }
-  /**
-   * Generates an SHA-1 digest hash of the string: clearTextID+"-"+function or: clearTextID if function was blank.<p>
-   *
-   * Note that the SHA-1 used only creates a 20 byte hash.<p>
-   *
-   * @param clearTextID A string that is to be hashed. This can be any string used for hashing or hiding data.
-   * @param function A function related to the clearTextID string. This is used to create a hash associated with clearTextID so that it is a uique code.
-   *
-   * @return array of bytes containing the hash of the string: clearTextID+"-"+function or clearTextID if function was blank. Can return null if SHA-1 does not exist on platform.
-   */
-  public static final byte[] generateHash(String clearTextID, String function) {
-      String id;
-      String functionSeperator = "-";      
-      if (function == null) {
-          id = clearTextID;
-      } else {
-          ;
-         id = clearTextID + functionSeperator + function;
-      }
-      byte[] buffer = id.getBytes();
-      
-      MessageDigest algorithm = null;
-      
-      try {
-          algorithm = MessageDigest.getInstance("MD5");
-      } catch (Exception e) {
-          System.out.println("Cannot load selected Digest Hash implementation");
-          e.printStackTrace();
-          return null;
-      }
-      
-      
-      // Generate the digest.
-      algorithm.reset();
-      algorithm.update(buffer);
-      
-      try{
-          byte[] digest1 = algorithm.digest();
-          return digest1;
-      }catch(Exception de){
-          System.out.println("Failed to creat a digest.");
-          de.printStackTrace();
-          return null;
-      }
-  }
-}
diff --git a/p2pproxy/test-src/org/linphone/p2pproxy/test/P2pAutoConfigTester.java b/p2pproxy/test-src/org/linphone/p2pproxy/test/P2pAutoConfigTester.java
deleted file mode 100644 (file)
index 3ef51d0..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-P2pAutoConfigTester.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.test;
-
-
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-import org.apache.log4j.Logger;
-import org.apache.log4j.PropertyConfigurator;
-import org.linphone.p2pproxy.api.P2pProxyInstance;
-import org.linphone.p2pproxy.api.P2pProxyNetworkProbe;
-import org.linphone.p2pproxy.api.P2pProxyInstance.Mode;
-import org.linphone.p2pproxy.core.P2pProxyInstanceImpl;
-
-public class P2pAutoConfigTester extends TestCase {
-   static private P2pProxyInstance mP2pProxyInstance;
-   private final static Logger mLog = Logger.getLogger(P2pAutoConfigTester.class);
-   //@BeforeClass
-   public static void setUpBeforeClass() throws Exception {
-      // setup logging
-      PropertyConfigurator.configure("log4j.properties");
-//      // 1 setup relays
-//      String lRunString = "java -cp eclipsebuild:dependencies/*.jar ";
-//      //lRunString +=" -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n";
-//      lRunString +=" org.linphone.p2pproxy.core.P2pProxyMain";
-//      lRunString +=" -jxta " +System.getProperty("user.home")+"/P2pAutoConfigTester-seeding";
-//      lRunString +=" -sip 5040 -seeding-server ";
-//      lRunString +=" -seeding-relay http://"+InetAddress.getLocalHost().getHostAddress()+":"+P2pProxyInstance.BASE_HTTP;
-//      lRunString +=" -seeding-rdv http://"+InetAddress.getLocalHost().getHostAddress()+":"+P2pProxyInstance.BASE_HTTP;
-//      mLog.info("starting ["+lRunString+"]");
-//      Process lProcess = Runtime.getRuntime().exec(lRunString);
-
-     
-      // setup edge
-      mP2pProxyInstance = new P2pProxyInstanceImpl();
-      mP2pProxyInstance.setMode(Mode.edge);
-      mP2pProxyInstance.setIndex(1);
-      mP2pProxyInstance.start();
-      while (mP2pProxyInstance.isStarted() == false) Thread.sleep(500);
-      
-   }
-
-   //@Before
-   public void setUp() throws Exception {
-      if (mP2pProxyInstance == null) {
-         setUpBeforeClass();
-      }
-   }
-   /**
-    * 
-    */
-   public void testGetPublicAddress() {
-      try {
-         Assert.assertEquals("wrong public ip" ,mP2pProxyInstance.getManager().getPublicIpAddress().getHostAddress(), InetAddress.getLocalHost().getHostAddress());
-         mLog.info("testGetPublicAddress ok");
-      } catch (Exception e) {
-          mLog.error("testGetPublicAddress ko",e);
-          Assert.fail(e.getMessage());
-      }  
-   }
-   /**
-    * 
-    */
-   public void testProbeTcpSocket() {
-      try {
-         InetSocketAddress  lSocketAddress = new InetSocketAddress(InetAddress.getLocalHost(),9500);
-         Assert.assertTrue("cannot prob" ,mP2pProxyInstance.getManager().probeSocket(lSocketAddress, P2pProxyNetworkProbe.Protocol.tcp));
-         mLog.info("testProbeSocket ok");
-      } catch (Exception e) {
-          mLog.error("testProbeSocket ko",e);
-          Assert.fail(e.getMessage());
-      }  
-   }
-   /**
-    * 
-    */
-   public void testProbeUdpSocket() {
-      try {
-         InetSocketAddress  lSocketAddress = new InetSocketAddress(InetAddress.getLocalHost(),9500);
-         Assert.assertTrue("cannot prob" ,mP2pProxyInstance.getManager().probeSocket(lSocketAddress, P2pProxyNetworkProbe.Protocol.udp));
-         mLog.info("testProbeSocket ok");
-      } catch (Exception e) {
-          mLog.error("testProbeSocket ko",e);
-          Assert.fail(e.getMessage());
-      }  
-   }
-}
diff --git a/p2pproxy/test-src/org/linphone/p2pproxy/test/P2pProxyAccountManagementTester.java b/p2pproxy/test-src/org/linphone/p2pproxy/test/P2pProxyAccountManagementTester.java
deleted file mode 100644 (file)
index 837845b..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-P2pProxyAccountManagementTester.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.test;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.PropertyConfigurator;
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.api.P2pProxyUserAlreadyExistException;
-import org.linphone.p2pproxy.core.JxtaNetworkManager;
-import org.linphone.p2pproxy.core.P2pProxyAccountManagement;
-import org.linphone.p2pproxy.core.P2pProxyAccountManagementMBean;
-import org.linphone.p2pproxy.test.utils.P2pNetwork;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-
-public class P2pProxyAccountManagementTester extends TestCase {
-   private final static Logger mLog = Logger.getLogger(P2pProxyAccountManagementTester.class);
-   static private P2pNetwork mP2pNetwork=null;
-   static private P2pProxyAccountManagementMBean mP2pProxyAccountManagementA;
-   static private final String USER_A = "sip:usera@p2pproxytester.org";
-   /* (non-Javadoc)
-    * @see junit.framework.TestCase#setUp()
-    */
-   @Override
-   protected void setUp() throws Exception {
-      if (mP2pNetwork == null) {
-          // setup logging
-        PropertyConfigurator.configure("log4j.properties");
-
-         mP2pNetwork = new P2pNetwork(0,1);
-         mP2pProxyAccountManagementA = new P2pProxyAccountManagement((JxtaNetworkManager) mP2pNetwork.getSuperPeers().get(0).getOpaqueNetworkManager());
-      }
-   }
-
-   /* (non-Javadoc)
-    * @see junit.framework.TestCase#tearDown()
-    */
-   @Override
-   protected void tearDown() throws Exception {
-      // TODO Auto-generated method stub
-      super.tearDown();
-   }
-   public void testCreateAccount() {
-      try {
-         //1 create
-         mP2pProxyAccountManagementA.createAccount(USER_A);
-         //2 delete
-         mP2pProxyAccountManagementA.deleteAccount(USER_A);
-      } catch (Exception e) {
-         mLog.error("testCreateAccount ko",e);
-         Assert.fail(e.getMessage());
-     } 
-   }
-
-   public void testDeleteAccount() {
-      
-   }
-
-   public void testCreateAlreadyExistingAccount() {
-      
-   }
-   public void testDeleteNotExistingAccount() {
-      
-   }
-
-}
diff --git a/p2pproxy/test-src/org/linphone/p2pproxy/test/P2pProxyNatedNetworkTester.java b/p2pproxy/test-src/org/linphone/p2pproxy/test/P2pProxyNatedNetworkTester.java
deleted file mode 100644 (file)
index 075af0c..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-P2pProxyNatedNetworkTester.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.test;
-
-import java.net.InetAddress;
-import java.util.ArrayList;
-
-import org.linphone.p2pproxy.api.P2pProxyInstance;
-import org.linphone.p2pproxy.test.utils.P2pNetwork;
-import org.linphone.p2pproxy.test.utils.SipClient;
-
-
-public class P2pProxyNatedNetworkTester extends P2pProxyNetworkingTester {
-
-   /* (non-Javadoc)
-    * @see org.linphone.p2pproxy.test.P2pProxyNetworkingTester#setUp()
-    */
-   @Override
-   protected void setUp() throws Exception {
-      if (mP2pNetwork == null) {
-         mP2pNetwork = new P2pNetwork(1,1,0,0,10,true,System.getProperty("p2pproxy.publicAddressUser",System.getProperty("user.name")),System.getProperty("p2pproxy.publicAddress",InetAddress.getLocalHost().getHostName()));
-         mProxyInstanceList = new ArrayList<P2pProxyInstance>(mP2pNetwork.getAllPeers());
-          for (P2pProxyInstance lP2pProxyInstance:mProxyInstanceList) {
-             SipClient lSipClient = new SipClient(lP2pProxyInstance.getSipClientProvider(),lP2pProxyInstance.getSipClientName(),lP2pProxyInstance.getAdvertisementDiscoveryTimeout()); 
-             lSipClient.register();
-             mClientList.add(lSipClient);
-          }
-      }
-   }
-}
diff --git a/p2pproxy/test-src/org/linphone/p2pproxy/test/P2pProxyNetworkingTester.java b/p2pproxy/test-src/org/linphone/p2pproxy/test/P2pProxyNetworkingTester.java
deleted file mode 100644 (file)
index e354b73..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-P2pProxyNetworkTester.java - junit test for a whole p2pproxy network
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.test;
-
-import java.net.InetAddress;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.PropertyConfigurator;
-import org.linphone.p2pproxy.api.P2pProxyInstance;
-import org.linphone.p2pproxy.test.utils.P2pNetwork;
-import org.linphone.p2pproxy.test.utils.SipClient;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-public class P2pProxyNetworkingTester extends TestCase {
-   static {
-          PropertyConfigurator.configure("log4j.properties");
-   }
-       static P2pNetwork mP2pNetwork =null;
-   static List<SipClient> mClientList = new ArrayList<SipClient>();
-   static List<P2pProxyInstance> mProxyInstanceList;
-   private final static Logger mLog = Logger.getLogger(P2pProxyNetworkingTester.class);
-       public P2pProxyNetworkingTester() {
-               // TODO Auto-generated constructor stub
-       }
-
-       public P2pProxyNetworkingTester(String arg0) {
-               super(arg0);
-               // TODO Auto-generated constructor stub
-       }
-       public void testConnectedRdv() {
-          int lConnectedPeers=0;
-       for (P2pProxyInstance lSuperPeer:mP2pNetwork.getSuperPeers()) {
-          lConnectedPeers += lSuperPeer.getNumberOfconnectedPeers();
-       }
-       Assert.assertEquals("all peer are not connected",mP2pNetwork.getEdgesPeers().size(),lConnectedPeers) ;
-    mLog.info("testConnectedPeers ok");
-    }
-    /**
-        *  test call from all peers
-        *
-        */
-       public void testBasicCallFromAllPeers() {
-          try {
-
-             for (int i=0;i<mClientList.size();i++) {
-                SipClient lCaller = mClientList.get(i);
-                for (int j=0;j<mClientList.size();j++) {
-                   if (i!=j) {
-                      P2pProxyInstance lCallee = mProxyInstanceList.get(j);
-                      lCaller.call(lCallee.getSipClientName(),lCallee.getSipClientProvider());
-                   }
-                }
-             }
-             mLog.info("testBasicCallFrom ok");
-          } catch (Exception e) {
-             mLog.error("testBasicCallFrom ko",e);
-             Assert.fail(e.getMessage());
-          }
-          
-       }
-    /**
-     *  same as testBasicCallFromAllPeers but wihout seeding relay
-     *
-     */
-    public void testBasicCallWithoutSeedingPeer() {
-       try {
-          
-          
-          //1 shutdown seeding peer
-          mProxyInstanceList.get(0).stop();
-          Thread.sleep(60000);
-          int lConnectedPeers=0;
-          for (int j=1;j<mP2pNetwork.getSuperPeers().size();j++) {
-             lConnectedPeers += mP2pNetwork.getSuperPeers().get(j).getNumberOfconnectedPeers();
-          }
-          //Assert.assertEquals("all peer are not connected to rdv",mP2pNetwork.getEdgesPeers().size(),lConnectedPeers) ;
-          mLog.warn("all peer are not connected to rdv edges["+mP2pNetwork.getEdgesPeers().size()+"connected ["+lConnectedPeers+"]") ;
-          //Thread.sleep(5000);
-          for (int i=1;i<mClientList.size();i++) {
-             SipClient lCaller = mClientList.get(i);
-             for (int j=1;j<mClientList.size();j++) {
-                if (i!=j) {
-                   P2pProxyInstance lCallee = mProxyInstanceList.get(j);
-                   lCaller.call(lCallee.getSipClientName(),lCallee.getSipClientProvider());
-                }
-             }
-          }
-          mLog.info("testBasicCallWithoutSeedingPeer ok");
-       } catch (Exception e) {
-          mLog.error("testBasicCallWithoutSeedingPeer ko",e);
-          Assert.fail(e.getMessage());
-       }
-       
-    }
-
-   /* (non-Javadoc)
-    * @see junit.framework.TestCase#setUp()
-    */
-   @Override
-   protected void setUp() throws Exception {
-      super.setUp();
-      if (mP2pNetwork == null) {
-         mP2pNetwork = new P2pNetwork(4,2,4,0,14,false,System.getProperty("p2pproxy.publicAddressUser",System.getProperty("user.name")),System.getProperty("p2pproxy.publicAddress",InetAddress.getLocalHost().getHostName()));
-         Thread.sleep(10000);
-         mProxyInstanceList = new ArrayList<P2pProxyInstance>(mP2pNetwork.getAllPeers());
-          for (P2pProxyInstance lP2pProxyInstance:mProxyInstanceList) {
-             SipClient lSipClient = new SipClient(lP2pProxyInstance.getSipClientProvider(),lP2pProxyInstance.getSipClientName(),lP2pProxyInstance.getAdvertisementDiscoveryTimeout()); 
-             lSipClient.register();
-             mClientList.add(lSipClient);
-          }
-          Thread.sleep(10000);
-      }
-   }
-
-   /* (non-Javadoc)
-    * @see junit.framework.TestCase#tearDown()
-    */
-   @Override
-   protected void tearDown() throws Exception {
-      // TODO Auto-generated method stub
-      super.tearDown();
-//      for (P2pProxyInstance lP2pProxyInstance:mProxyInstanceList) {
-//         SipClient lSipClient = new SipClient(lP2pProxyInstance.getSipClientProvider(),lP2pProxyInstance.getSipClientName()); 
-//         lSipClient.unRegister();
-//      }
-   }
-}
diff --git a/p2pproxy/test-src/org/linphone/p2pproxy/test/P2pProxyTester.java b/p2pproxy/test-src/org/linphone/p2pproxy/test/P2pProxyTester.java
deleted file mode 100644 (file)
index 0c53f2f..0000000
+++ /dev/null
@@ -1,487 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-P2pProxyTester.java - junit test for p2pproxy
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.test;
-
-import java.net.DatagramSocket;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.TimeUnit;
-
-
-
-import net.jxta.discovery.DiscoveryEvent;
-import net.jxta.discovery.DiscoveryListener;
-import net.jxta.discovery.DiscoveryService;
-import net.jxta.document.Advertisement;
-import net.jxta.protocol.DiscoveryResponseMsg;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.PropertyConfigurator;
-import org.linphone.p2pproxy.api.P2pProxyInstance;
-import org.linphone.p2pproxy.api.P2pProxyInstance.Mode;
-import org.linphone.p2pproxy.core.JxtaNetworkManager;
-import org.linphone.p2pproxy.core.P2pProxyAccountManagement;
-import org.linphone.p2pproxy.core.P2pProxyAccountManagementMBean;
-import org.linphone.p2pproxy.core.P2pProxyInstanceImpl;
-import org.linphone.p2pproxy.core.P2pProxyMain;
-import org.linphone.p2pproxy.core.sipproxy.NetworkResourceAdvertisement;
-import org.linphone.p2pproxy.core.sipproxy.SipProxyRegistrar;
-import org.linphone.p2pproxy.core.stun.AddressInfo;
-import org.linphone.p2pproxy.core.stun.StunClient;
-import org.linphone.p2pproxy.test.utils.DefaultCallListener;
-import org.linphone.p2pproxy.test.utils.SipClient;
-import org.zoolu.sip.address.NameAddress;
-import org.zoolu.sip.call.Call;
-import org.zoolu.sip.call.CallListener;
-import org.zoolu.sip.message.Message;
-import org.zoolu.sip.provider.SipProvider;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-public class P2pProxyTester extends TestCase {
-
-
-   private final static Logger mLog = Logger.getLogger(P2pProxyTester.class);
-
-       static private  SipProvider mProvider;
-    static final String mDefaultSipIdentity = "sip:p2pTester@linphone.org";
-    static private  SipClient mSipClient;
-    static private P2pProxyInstance mP2pProxyInstance;
-    final private String mCallerUri = "sip:caller@linphone.org";
-    final private String mCalleeUri = "sip:callee@linphone.org";
-    final private int RDV_DISCOVERY_TIMEOUT = 5000;
-    static private P2pProxyAccountManagementMBean mP2pProxyAccountManagement;
-
-    public P2pProxyTester() {
-       
-       }   
-       protected void setUp() throws Exception {
-        
-               if (mP2pProxyInstance == null) {
-                 // setup logging
-              System.setProperty("org.linphone.p2pproxy.home", ".");
-              P2pProxyMain.staticLoadTraceConfigFile(); 
-              //PropertyConfigurator.configure("log4j.properties");
-           setupJxta(); 
-           mProvider = mP2pProxyInstance.getSipClientProvider() ;
-           mSipClient = new SipClient(mProvider, mDefaultSipIdentity,RDV_DISCOVERY_TIMEOUT*2);
-           // create account for user mDefaultSipIdentity, mCallerUri, mCalleeUri if not exist
-           mP2pProxyAccountManagement = new P2pProxyAccountManagement((JxtaNetworkManager)mP2pProxyInstance.getOpaqueNetworkManager());
-
-           try {
-              mP2pProxyAccountManagement.createAccount(mDefaultSipIdentity);
-            } catch (Exception e) {
-              mLog.warn(e);
-           }           
-            try {
-               mP2pProxyAccountManagement.createAccount(mCallerUri);
-             } catch (Exception e) {
-               mLog.warn(e);
-            }
-
-             try {
-                mP2pProxyAccountManagement.createAccount(mCalleeUri);
-              } catch (Exception e) {
-                mLog.warn(e);
-             }
-               }
-               
-       }
-
-       protected void tearDown() throws Exception {
-       }
-
-       public void testStunClient() {
-          try {
-//           if (mP2pProxyInstance2 == null) {
-//              try {
-//                 setupJxta2();
-//              } catch (Exception e) {
-//                 mLog.error("cannot start peer2");
-//              }
-//           }
-             DatagramSocket lDatagramSocket = new DatagramSocket();
-             StunClient lStunClient = new StunClient((JxtaNetworkManager)mP2pProxyInstance.getOpaqueNetworkManager());
-             AddressInfo lAddressInfo = lStunClient.computeAddressInfo(lDatagramSocket);
-             mLog.info("AddressInfo ["+lAddressInfo+"]");
-          }catch (Exception e) {
-             mLog.error("testStunClient ko",e);
-             Assert.fail(e.getMessage());
-          }
-
-       }
-       public void testGetRegistrarAdress() {
-          try {
-             NetworkResourceAdvertisement lSipProxyRegistrarAdvertisement = (NetworkResourceAdvertisement) (((JxtaNetworkManager)mP2pProxyInstance.getOpaqueNetworkManager()).getAdvertisement(null,SipProxyRegistrar.ADV_NAME, true));
-             mLog.info("testGetRegistrarAdress ok ["+lSipProxyRegistrarAdvertisement.getAddress()+"]");
-          } catch (Exception e) {
-             mLog.error("testGetRegistrarAdress ko",e);
-             Assert.fail(e.getMessage());
-          }
-
-       }
-       public void testSipRegisterUnregister() {
-               try {
-                       //register
-           mSipClient.register();
-                       //unregister
-           mSipClient.unRegister();
-                       mLog.info("testSipRegisterUnregister ok");
-               } catch (Exception e) {
-                       mLog.error("testSipRegisterUnregister ko",e);
-                       Assert.fail(e.getMessage());
-               }
-               
-       }
-    public void testRegisterUnknownUser() {
-        try {
-            //register
-          Assert.assertFalse(mSipClient.register(900,"sip:toto@linphone.org",404));
-           mLog.info("testRegisterUnknownUser ok");
-        } catch (Exception e) {
-            mLog.error("testRegisterUnknownUser ko",e);
-            Assert.fail(e.getMessage());
-        }
-        
-    }    
-//     public void testPipeDiscovery() {
-//             try {
-//           long lDiscoveryTimout = 10000;
-//                     //register
-//           mSipClient.register(900,mDefaultSipIdentity);
-//                     DiscoveryService lDiscoveryService = ((JxtaNetworkManager)mP2pProxyInstance.getOpaqueNetworkManager()).getPeerGroup().getDiscoveryService();
-//                     final Semaphore lSemaphore = new Semaphore(0);
-//                     DiscoveryListener lDiscoveryListener = new DiscoveryListener() {
-//
-//                             public void discoveryEvent(DiscoveryEvent event) {
-//                                     DiscoveryResponseMsg LRes = event.getResponse();
-//                                     Enumeration lAdvertisementLists = LRes.getAdvertisements();
-//                                     Advertisement lAdvertisement = (Advertisement) lAdvertisementLists.nextElement();
-//                                     //Assert.assertEquals("not the good adv name", lContact, lAdvertisement.)
-//                                     mLog.info(lAdvertisement.toString());
-//                                     lSemaphore.release();
-//                             }
-//                             
-//                     };
-//                     lDiscoveryService.getRemoteAdvertisements(null, DiscoveryService.ADV, "Name",mDefaultSipIdentity, 1,lDiscoveryListener);
-//                     Assert.assertTrue("pipe not found until ["+lDiscoveryTimout+"]", lSemaphore.tryAcquire(lDiscoveryTimout,TimeUnit.MILLISECONDS));
-//                     lSemaphore.release();
-//                     
-//                     //unregister
-//            mSipClient.register(0,mDefaultSipIdentity);
-//                     mLog.info("testPipeDiscovery ok");
-//             } catch (Exception e) {
-//                     mLog.error("testPipeDiscovery ko",e);
-//                     Assert.fail(e.getMessage());
-//             }
-//             
-//     }
-    public void testCall() {
-       try {
-          Call(false);
-       } catch (Exception e) {
-          mLog.error("testCall ko",e);
-          Assert.fail(e.getMessage());
-      }       
-       
-    }
-    public void testCallWithSdp() {
-       try {
-          Call(true);
-       } catch (Exception e) {
-          mLog.error("testCallWithSdp ko",e);
-          Assert.fail(e.getMessage());
-      }       
-       
-    }
-
-    private void Call(boolean useSdp) throws Exception {
-                       //register
-            mSipClient.register(900,mCallerUri);
-            mSipClient.register(900,mCalleeUri);
-            call(mCallerUri,mCalleeUri,useSdp);
-                       // unregister
-            mSipClient.register(0,mCallerUri);
-            mSipClient.register(0,mCalleeUri);
-
-                       mLog.info("testCall ok");
-
-       }
-    public void testUserNotFound() {
-        try {
-            long lTimout = (long) (RDV_DISCOVERY_TIMEOUT * 2);
-            //register
-            mSipClient.register(900,mCallerUri);
-            final Semaphore lCallerSemaphoreRefused = new Semaphore(0);
-            CallListener lCallerListener = new DefaultCallListener() {
-            public void onCallRefused(Call call, String reason, Message resp) {
-               lCallerSemaphoreRefused.release();
-               Assert.assertEquals("bad reason, must be user not found", 404, resp.getStatusLine().getCode());
-            }
-            };
-            Call  lCaller = new Call(mProvider, mCallerUri, mSipClient.getContact(mProvider), lCallerListener);
-            lCaller.call(mCalleeUri);
-            Assert.assertTrue("caller  call not refused until ["+lTimout+"]", lCallerSemaphoreRefused.tryAcquire(lTimout,TimeUnit.MILLISECONDS));
-            // unregister
-            mSipClient.register(0,mCallerUri);
-
-            mLog.info("testUserNotFound ok");
-        } catch (Exception e) {
-            mLog.error("testUserNotFound ko",e);
-            Assert.fail(e.getMessage());
-        }       
-    }
-    public void testUserUnregisterred() {
-       try {
-           long lTimout = RDV_DISCOVERY_TIMEOUT * 2;
-           //register
-           mSipClient.register(900,mCallerUri);
-           mSipClient.register(900,mCalleeUri);
-           //unregister callee
-           mSipClient.register(0,mCalleeUri);
-           final Semaphore lCallerSemaphoreRefused = new Semaphore(0);
-           CallListener lCallerListener = new DefaultCallListener() {
-           public void onCallRefused(Call call, String reason, Message resp) {
-              lCallerSemaphoreRefused.release();
-              Assert.assertEquals("bad reason, must be user not found", 404, resp.getStatusLine().getCode());
-           }
-           };
-           Call  lCaller = new Call(mProvider, mCallerUri, mSipClient.getContact(mProvider), lCallerListener);
-           lCaller.call(mCalleeUri);
-           Assert.assertTrue("caller  call not refused until ["+lTimout+"]", lCallerSemaphoreRefused.tryAcquire(lTimout,TimeUnit.MILLISECONDS));
-           // unregister caller
-           mSipClient.register(0,mCallerUri);
-
-           mLog.info("testUserNotFound ok");
-       } catch (Exception e) {
-           mLog.error("testUserNotFound ko",e);
-           Assert.fail(e.getMessage());
-       }       
-   }
-    public void xxxCallCancelledBeforeDialogEstablishement() {
-       try {
-          //Assert.fail("not debugged yet");
-           long lTimout = RDV_DISCOVERY_TIMEOUT * 2;
-          //register
-          mSipClient.register(900,mCallerUri);
-          //mSipClient.register(900,mCalleeUri);
-          final Semaphore lCallerSemaphoreCancel = new Semaphore(0);
-          CallListener lCallerListener = new DefaultCallListener() {
-             public void onCallRefused(Call call, String reason, Message resp) {
-                Assert.assertEquals("bad reason, must be  Request Terminated", 487, resp.getStatusLine().getCode());
-                lCallerSemaphoreCancel.release();         
-                }                
-
-          };
-          Call  lCaller = new Call(mProvider, mCallerUri, mSipClient.getContact(mProvider), lCallerListener);
-          lCaller.call(mCalleeUri);
-          Thread.sleep(1000);
-          lCaller.cancel();
-          Assert.assertTrue("caller  call not canceled until ["+lTimout+"]", lCallerSemaphoreCancel.tryAcquire(lTimout,TimeUnit.MILLISECONDS));
-          // unregister
-          mSipClient.register(0,mCallerUri);
-          
-          mLog.info("testCallCancelledBeforeDialogEstablishement ok");
-       } catch (Exception e) {
-          mLog.error("testCallCancelledBeforeDialogEstablishement ko",e);
-          Assert.fail(e.getMessage());
-       }       
-    }
-    
-    public void testCallCancelledAfterRinging() {
-        try {
-            long lTimout = RDV_DISCOVERY_TIMEOUT * 2;
-            //register
-           mSipClient.register(900,mCallerUri);
-           mSipClient.register(900,mCalleeUri);
-            final Semaphore lCalleeSemaphoreCanceling = new Semaphore(0);
-            final Semaphore lCallerSemaphoreRinging = new Semaphore(0);
-            final Semaphore lCallerSemaphoreCanceled = new Semaphore(0);
-            CallListener lCallerListener = new DefaultCallListener() {
-
-                public void onCallRinging(Call call, Message resp) {
-                    lCallerSemaphoreRinging.release();
-                }
-                public void onCallRefused(Call call, String reason, Message resp) {
-                   Assert.assertEquals("bad reason, must be  Request Terminated", 487, resp.getStatusLine().getCode());
-                   lCallerSemaphoreCanceled.release();         
-                   }                
-            };
-            Call  lCaller = new Call(mProvider, mCallerUri, mSipClient.getContact(mProvider), lCallerListener);
-            final Semaphore lCalleeSemaphoreIncoming = new Semaphore(0);
-            CallListener lCalleeListener = new DefaultCallListener() {
-               public void onCallIncoming(Call call, NameAddress callee, NameAddress caller, String sdp, Message invite) {
-                    lCalleeSemaphoreIncoming.release();
-                    call.ring();
-                }
-                public void onCallCanceling(Call call, Message cancel) {
-                   lCalleeSemaphoreCanceling.release();
-               }
-
-            };
-            Call  lCallee = new Call(mProvider, mCalleeUri, mSipClient.getContact(mProvider), lCalleeListener);
-            lCallee.listen();
-            lCaller.call(mCalleeUri);
-
-            Assert.assertTrue("callee  not alerted until ["+lTimout+"]", lCalleeSemaphoreIncoming.tryAcquire(lTimout,TimeUnit.MILLISECONDS));
-            Assert.assertTrue("callee  call not ringing until ["+lTimout+"]", lCallerSemaphoreRinging.tryAcquire(lTimout,TimeUnit.MILLISECONDS));
-            lCaller.cancel();
-            Assert.assertTrue("caller  call not canceling until ["+lTimout+"]", lCalleeSemaphoreCanceling.tryAcquire(lTimout,TimeUnit.MILLISECONDS));
-            Assert.assertTrue("caller  call not refused until ["+lTimout+"]", lCallerSemaphoreCanceled.tryAcquire(lTimout,TimeUnit.MILLISECONDS));
-            
-            // unregister
-           mSipClient.register(0,mCallerUri);
-           mSipClient.register(0,mCalleeUri);
-
-            mLog.info("testCallCancelledAfterRinging ok");
-        } catch (Exception e) {
-            mLog.error("testCallCancelledAfterRinging ko",e);
-            Assert.fail(e.getMessage());
-        }       
-
-   }
-    public void testAlreadyRegister() {
-       Assert.fail("not implemented yet");
-    }
-    public void testReRegisterAfterExpired() {
-        try {
-             //register
-           mSipClient.register(10,mCallerUri);
-           mSipClient.register(10,mCalleeUri);
-           call(mCallerUri,mCalleeUri);
-           // wait
-           Thread.sleep(10000);
-           mSipClient.register(20,mCallerUri);
-           mSipClient.register(20,mCalleeUri);
-           
-           call(mCallerUri,mCalleeUri);
-
-           // unregister
-           mSipClient.register(0,mCallerUri);
-           mSipClient.register(0,mCalleeUri);
-
-            mLog.info("testReRegisterAfterExpired ok");
-        } catch (Exception e) {
-            mLog.error("testtestReRegisterAfterExpired ko",e);
-            Assert.fail(e.getMessage());
-        }       
-
-    
-    }
-    public void testReRegisterBeforeExpired() {
-       try {
-           //register
-          mSipClient.register(900,mCallerUri);
-          mSipClient.register(900,mCalleeUri);
-          
-          call(mCallerUri,mCalleeUri);
-          //re-register
-          mSipClient.register(900,mCallerUri);
-          mSipClient.register(900,mCalleeUri);
-          
-          call(mCallerUri,mCalleeUri);
-
-          // unregister
-          mSipClient.register(0,mCallerUri);
-          mSipClient.register(0,mCalleeUri);
-
-           mLog.info("testReRegisterBeforeExpired ok");
-       } catch (Exception e) {
-           mLog.error("testReRegisterBeforeExpired ko",e);
-           Assert.fail(e.getMessage());
-       }       
-
-   
-   }
-
-       private void setupJxta() throws Exception {
-       mP2pProxyInstance = new P2pProxyInstanceImpl();
-       mP2pProxyInstance.setMode(Mode.seeding_server);
-       mP2pProxyInstance.setIndex(1);
-       mP2pProxyInstance.setProperty(JxtaNetworkManager.ADV_DISCOVERY_TIMEOUT, String.valueOf(RDV_DISCOVERY_TIMEOUT));
-       mP2pProxyInstance.start();
-       while (mP2pProxyInstance.isStarted() == false) Thread.sleep(500);
-       }
-
-       private void call(String aCaller,String aCallee) throws Exception {
-          call(aCaller,aCallee,false);
-       }
-       
-       private void call(String aCaller,String aCallee,boolean useSdp) throws Exception {
-          long lTimout = 1000;
-          final Semaphore lCallerSemaphoreAccepted = new Semaphore(0);
-          final Semaphore lCalleeSemaphoreClosed = new Semaphore(0);
-          final Semaphore lCallerSemaphoreRinging = new Semaphore(0);
-          CallListener lCallerListener = new DefaultCallListener() {
-             public void onCallAccepted(Call call, String sdp, Message resp) {
-                lCallerSemaphoreAccepted.release();
-                call.ackWithAnswer(sdp);
-             }
-             public void onCallClosing(Call call, Message bye) {
-                //nop
-             }
-             public void onCallRinging(Call call, Message resp) {
-                lCallerSemaphoreRinging.release();
-             }
-          };
-          Call  lCaller = new Call(mProvider, aCaller, mSipClient.getContact(mProvider), lCallerListener);
-       if (useSdp) {
-          lCaller.setLocalSessionDescriptor(SipClient.sdp_offer);
-       }
-          final Semaphore lCalleeSemaphoreConfirmed = new Semaphore(0);
-          final Semaphore lCalleeSemaphoreIncoming = new Semaphore(0);
-          CallListener lCalleeListener = new DefaultCallListener() {
-             public void onCallConfirmed(Call call, String sdp, Message ack) {
-                lCalleeSemaphoreConfirmed.release();
-                call.bye();
-             }
-             public void onCallIncoming(Call call, NameAddress callee, NameAddress caller, String sdp, Message invite) {
-                lCalleeSemaphoreIncoming.release();
-                call.accept(sdp);
-             }
-             public void onCallClosed(Call call, Message resp) {
-                lCalleeSemaphoreClosed.release();
-             }
-          };
-          Call  lCallee = new Call(mProvider, aCallee, mSipClient.getContact(mProvider), lCalleeListener);
-       if (useSdp) {
-          lCallee.setLocalSessionDescriptor(SipClient.sdp_offer);
-       }
-          lCallee.listen();
-          lCaller.call(aCallee);
-          
-          Assert.assertTrue("callee  not alerted until ["+lTimout+"]", lCalleeSemaphoreIncoming.tryAcquire(lTimout,TimeUnit.MILLISECONDS));
-          Assert.assertTrue("caller  call not accepted until ["+lTimout+"]", lCallerSemaphoreAccepted.tryAcquire(lTimout,TimeUnit.MILLISECONDS));
-          Assert.assertTrue("callee  call not confirmed until ["+lTimout+"]", lCalleeSemaphoreConfirmed.tryAcquire(lTimout,TimeUnit.MILLISECONDS));
-          Assert.assertTrue("caller  call not closed until ["+lTimout+"]", lCalleeSemaphoreClosed.tryAcquire(lTimout,TimeUnit.MILLISECONDS));
-          
-       }
-       public void testBunchOfCall() {
-               for (int i=0;i<20;i++) {
-                       //testCallCancelledBeforeDialogEstablishement();
-                       testCall();
-                       testCallCancelledAfterRinging();
-               }
-       }
-
-}
diff --git a/p2pproxy/test-src/org/linphone/p2pproxy/test/RtpRelayServerTester.java b/p2pproxy/test-src/org/linphone/p2pproxy/test/RtpRelayServerTester.java
deleted file mode 100644 (file)
index e234734..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
-package org.linphone.p2pproxy.test;
-
-
-import java.net.DatagramPacket;
-import java.net.DatagramSocket;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.SocketTimeoutException;
-import java.net.UnknownHostException;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.apache.log4j.BasicConfigurator;
-import org.apache.log4j.Logger;
-import org.junit.After;
-import org.junit.Before;
-import org.linphone.p2pproxy.core.GenericUdpSession;
-import org.linphone.p2pproxy.core.media.rtprelay.RtpRelayServer;
-import org.linphone.p2pproxy.core.stun.StunServer;
-
-public class RtpRelayServerTester extends TestCase{
-       private final static Logger mLog = Logger.getLogger(RtpRelayServerTester.class);
-       static private RtpRelayServer mRtpRelayServer;
-       static private int RTP_SERVER_PORT = 16000;
-       private static  GenericUdpSession mGenericUdpSession;
-       static StunServer mSturServer = null;
-       private final int SO_TIMEOUT=100;
-       private final InetSocketAddress mServerSocket;
-       
-       public RtpRelayServerTester() throws UnknownHostException {
-               mServerSocket = new InetSocketAddress(InetAddress.getByName("localhost"), RTP_SERVER_PORT);
-       }
-       
-       public RtpRelayServerTester(InetSocketAddress aServerAddress) {
-               mServerSocket = aServerAddress;
-       }
-       @Before
-       public void setUp() throws Exception {
-               if (mRtpRelayServer == null) {
-                  BasicConfigurator.configure();
-                  mGenericUdpSession = new GenericUdpSession(new InetSocketAddress(RTP_SERVER_PORT));
-                  mRtpRelayServer =  new RtpRelayServer(mGenericUdpSession.getSocket(),1000,1000);
-                  mGenericUdpSession.addMessageHandler(mRtpRelayServer);
-                  mSturServer = new StunServer(mGenericUdpSession.getSocket());
-           mGenericUdpSession.addMessageHandler(mSturServer);
-               }
-       }
-
-       @After
-       public void tearDown() throws Exception {
-          //mRtpRelayServer.close();
-       }
-       public void testRouting() {
-          _testRouting(1);
-       }
-       private void _testRouting(int aSessionId) {
-          byte lSsrcA = (byte) aSessionId;
-          byte lSsrcB = (byte) ~aSessionId;
-          byte[] lRtcpA = {0x55,(byte) 204,0x0,16
-                            ,0x0,0x01,0x02,lSsrcA //ssrc
-                                        ,'R','S','I','D'
-                                        ,'S','E','S','S',(byte) aSessionId};
-
-        byte[] lRtpA = {0x55,(byte) 34,0x0,16
-                       ,0x55,0x55,0x55,0x55
-                       ,0x0,0x01,0x02,lSsrcA //ssrc
-                       ,0x55,0x55,0x55,0x55
-                       ,0x55,0x55,0x55,0x55};
-               
-               
-               byte[] lRtcpB = {0x55,(byte) 204,0x0,16
-                               ,0x04,0x05,0x06,lSsrcB
-                               ,'R','S','I','D'
-                               ,'S','E','S','S',(byte) aSessionId};
-
-               byte[] lRtpB = {0x55,(byte) 34,0x0,16
-                       ,0x55,0x55,0x55,0x55
-                       ,0x04,0x05,0x06,lSsrcB //ssrc
-                       ,0x55,0x55,0x55,0x55
-                       ,0x55,0x55,0x55,0x55};
-
-               
-               try {
-                       //1 send rtcp app A
-                       DatagramSocket lRtcpSocketA = new DatagramSocket();
-                       DatagramPacket lRtcpaPacket = new DatagramPacket(lRtcpA,lRtcpA.length,mServerSocket);
-                       lRtcpSocketA.setSoTimeout(SO_TIMEOUT);
-                       lRtcpSocketA.send(lRtcpaPacket);
-                       
-                       //2 send rtcp app B
-                       DatagramSocket lRtcpSocketB = new DatagramSocket();
-                       DatagramPacket lRtcpbPacket = new DatagramPacket(lRtcpB,lRtcpB.length,mServerSocket);
-                       lRtcpSocketB.setSoTimeout(SO_TIMEOUT);
-                       lRtcpSocketB.send(lRtcpbPacket);
-                       
-
-            //3 send rtp A
-            DatagramSocket lRtpSocketA = new DatagramSocket();
-            DatagramPacket lRtpaPacket = new DatagramPacket(lRtpA,lRtpA.length,mServerSocket);
-            lRtpSocketA.setSoTimeout(SO_TIMEOUT);
-            lRtpSocketA.send(lRtpaPacket);
-            
-            //4 send rtp B
-            DatagramSocket lRtpSocketB = new DatagramSocket();
-            DatagramPacket lRtpblPacket = new DatagramPacket(lRtpB,lRtpB.length,mServerSocket);
-            lRtpSocketB.send(lRtpblPacket);
-            lRtpSocketB.setSoTimeout(SO_TIMEOUT);
-            
-            
-            
-            // check RTP B -> A
-            DatagramPacket lReceivedRtpaPacket = new DatagramPacket(new byte[1500],1500);
-            
-          
-            try {
-               lRtpSocketA.receive(lReceivedRtpaPacket);
-               // check ssrc
-               Assert.assertEquals("Unexpected packet received ",lSsrcB,(byte)RtpRelayServer.b2UB(lReceivedRtpaPacket.getData()[11]));
-            } catch (SocketTimeoutException e) {
-               Assert.fail("packet not relayed cause [" + e.getMessage()+"]");
-            }
-
-            //check RTP A->B
-            DatagramPacket lReceivedRtpbPacket = new DatagramPacket(new byte[1500],1500);
-            lRtpSocketA.setSoTimeout(SO_TIMEOUT);
-            lRtpSocketA.send(lRtpaPacket);
-            try {
-               lRtpSocketB.receive(lReceivedRtpbPacket);
-               // check ssrc
-               Assert.assertEquals("Unexpected packet received ",lSsrcA,(byte)RtpRelayServer.b2UB(lReceivedRtpbPacket.getData()[11]));
-            } catch (SocketTimeoutException e) {
-               Assert.fail("packet not relayed cause [" + e.getMessage()+"]");
-            }
-            
-            // check RTCP A->B
-            byte[] lRtcpASR = {0x55,(byte) 200,0x0,16
-                              ,0x0,0x01,0x02,lSsrcA //ssrc
-                              ,'B','L','A','B','L','A'};
-            
-            DatagramPacket lRtcpASRPacket = new DatagramPacket(lRtcpASR,lRtcpASR.length,mServerSocket);
-            lRtcpSocketA.send(lRtcpASRPacket);
-            try {
-               lRtcpSocketB.receive(lReceivedRtpbPacket);
-               // check ssrc
-               Assert.assertEquals("Unexpected packet received ",lSsrcA,(byte)RtpRelayServer.b2UB(lReceivedRtpbPacket.getData()[7]));
-            } catch (SocketTimeoutException e) {
-               Assert.fail("packet not relayed cause [" + e.getMessage()+"]");
-            }
-            
-            // check RTCP B->A
-            byte[] lRtcpBSR = {0x55,(byte) 200,0x0,16
-                              ,0x04,0x05,0x06,lSsrcB //ssrc
-                              ,'B','L','A','B','L','A'};
-            
-            DatagramPacket lRtcpBSRPacket = new DatagramPacket(lRtcpBSR,lRtcpBSR.length,mServerSocket);
-            lRtcpSocketB.send(lRtcpBSRPacket);
-            try {
-               lRtcpSocketA.receive(lReceivedRtpbPacket);
-               // check ssrc
-               Assert.assertEquals("Unexpected packet received ",lSsrcB,(byte)RtpRelayServer.b2UB(lReceivedRtpbPacket.getData()[7]));
-            } catch (SocketTimeoutException e) {
-               Assert.fail("packet not relayed cause [" + e.getMessage()+"]");
-            }
-
-            // check unknown RTCP B->A
-            byte[] lRtcpSR = {0x55,(byte) 200,0x0,16
-                              ,0x55,0x55,0x56,0x55 //ssrc
-                              ,'B','L','A','B','L','A'};
-            
-            DatagramPacket lRtcpSRPacket = new DatagramPacket(lRtcpSR,lRtcpSR.length,mServerSocket);
-            lRtcpSocketB.send(lRtcpSRPacket);
-            try {
-               lRtcpSocketA.receive(lReceivedRtpbPacket);
-               // check ssrc
-               Assert.fail("Unexpected packet received ");
-            } catch (SocketTimeoutException e) {
-               //ok
-            }
-
-            
-               } catch (Exception e) {
-                       Assert.fail(e.getMessage());
-               }
-
-       }
-       public void testGC() {
-          try {
-      //1 launch traffic
-             int lOldValue = mRtpRelayServer.getRoutingtableSize();
-          _testRouting(2);
-          Assert.assertEquals("unexpected routing table size", lOldValue+1,mRtpRelayServer.getRoutingtableSize());
-          //2 wait 1,5s
-          Thread.sleep(1500);
-          Assert.assertTrue("unexpected routing table size ["+mRtpRelayServer.getRoutingtableSize()+"] should be less than or equal to ["+lOldValue+"]", mRtpRelayServer.getRoutingtableSize()<=lOldValue);
-          } catch (Exception e) {
-          Assert.fail(e.getMessage());
-      }
-          
-       }
-
-}
diff --git a/p2pproxy/test-src/org/linphone/p2pproxy/test/StunServerTester.java b/p2pproxy/test-src/org/linphone/p2pproxy/test/StunServerTester.java
deleted file mode 100644 (file)
index 32c5c44..0000000
+++ /dev/null
@@ -1,425 +0,0 @@
-/*
- * This file is part of JSTUN. 
- * 
- * Copyright (c) 2005 Thomas King <king@t-king.de> - All rights
- * reserved.
- * 
- * This software is licensed under either the GNU Public License (GPL),
- * or the Apache 2.0 license. Copies of both license agreements are
- * included in this distribution.
- */
-
-package org.linphone.p2pproxy.test;
-
-import java.io.IOException;
-import java.net.DatagramPacket;
-import java.net.DatagramSocket;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.SocketException;
-import java.net.SocketTimeoutException;
-import java.net.UnknownHostException;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.apache.log4j.BasicConfigurator;
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.core.GenericUdpSession;
-import org.linphone.p2pproxy.core.stun.StunServer;
-
-
-
-import de.javawi.jstun.attribute.ChangeRequest;
-import de.javawi.jstun.attribute.ChangedAddress;
-import de.javawi.jstun.attribute.ErrorCode;
-import de.javawi.jstun.attribute.MappedAddress;
-import de.javawi.jstun.attribute.MessageAttribute;
-import de.javawi.jstun.attribute.MessageAttributeException;
-import de.javawi.jstun.attribute.MessageAttributeParsingException;
-import de.javawi.jstun.header.MessageHeader;
-import de.javawi.jstun.header.MessageHeaderParsingException;
-import de.javawi.jstun.test.DiscoveryInfo;
-import de.javawi.jstun.util.UtilityException;
-
-public class StunServerTester extends TestCase {
-       private static Logger logger = Logger.getLogger(StunServerTester.class);
-       InetAddress iaddress ;
-       String stunServer = "localhost";
-       int port = 16000;
-       int timeoutInitValue = 300; //ms
-       MappedAddress ma = null;
-       ChangedAddress ca = null;
-       boolean nodeNatted = true;
-       DatagramSocket socketTest1 = null;
-       DiscoveryInfo di = null;
-       static StunServer mSturServer = null;
-       static GenericUdpSession mGenericUdpSession = null;
-       
-
-       public void setUp() throws Exception {
-           
-          if (mSturServer == null) {
-              BasicConfigurator.configure();
-              mGenericUdpSession = new GenericUdpSession(new InetSocketAddress(port));
-              mSturServer = new StunServer(mGenericUdpSession.getSocket());
-              mGenericUdpSession.addMessageHandler(mSturServer);
-              iaddress = InetAddress.getLocalHost();
-             }
-          di = new DiscoveryInfo(iaddress);
-          }
-       
-       public DiscoveryInfo xxxtest() throws UtilityException, SocketException, UnknownHostException, IOException, MessageAttributeParsingException, MessageAttributeException, MessageHeaderParsingException{
-               ma = null;
-               ca = null;
-               nodeNatted = true;
-               socketTest1 = null;
-               di = new DiscoveryInfo(iaddress);
-               
-//             if (test1()) {
-//                     if (test2()) {
-//                             if (test1Redo()) {
-//                                     test3();
-//                             }
-//                     }
-//             }
-               
-               socketTest1.close();
-               
-               return di;
-       }
-       
-       public void testBindRequest() {
-          try {
-         bindRequest();
-      } catch (Exception e) {
-         logger.error("testBindRequest ko",e);
-         Assert.fail(e.getMessage());
-      }
-          
-       }
-       private boolean bindRequest() throws UtilityException, SocketException, UnknownHostException, IOException, MessageAttributeParsingException, MessageHeaderParsingException {
-               int timeSinceFirstTransmission = 0;
-               int timeout = timeoutInitValue;
-               while (true) {
-                       try {
-                               // Test 1 including response
-                               socketTest1 = new DatagramSocket(new InetSocketAddress(iaddress, 0));
-                               socketTest1.setReuseAddress(true);
-                               socketTest1.connect(mGenericUdpSession.getSocket().getLocalSocketAddress());
-                               socketTest1.setSoTimeout(timeout);
-                               
-                               MessageHeader sendMH = new MessageHeader(MessageHeader.MessageHeaderType.BindingRequest);
-                               sendMH.generateTransactionID();
-                               
-                               ChangeRequest changeRequest = new ChangeRequest();
-                               sendMH.addMessageAttribute(changeRequest);
-                               
-                               byte[] data = sendMH.getBytes();
-                               DatagramPacket send = new DatagramPacket(data, data.length);
-                               socketTest1.send(send);
-                               logger.info("Test 1: Binding Request sent.");
-                       
-                               MessageHeader receiveMH = new MessageHeader();
-                               while (!(receiveMH.equalTransactionID(sendMH))) {
-                                       DatagramPacket receive = new DatagramPacket(new byte[200], 200);
-                                       socketTest1.receive(receive);
-                                       receiveMH = MessageHeader.parseHeader(receive.getData());
-                                       receiveMH.parseAttributes(receive.getData());
-                               }
-                               
-                               ma = (MappedAddress) receiveMH.getMessageAttribute(MessageAttribute.MessageAttributeType.MappedAddress);
-                               ca = (ChangedAddress) receiveMH.getMessageAttribute(MessageAttribute.MessageAttributeType.ChangedAddress);
-                               ErrorCode ec = (ErrorCode) receiveMH.getMessageAttribute(MessageAttribute.MessageAttributeType.ErrorCode);
-                               if (ec != null) {
-                                       di.setError(ec.getResponseCode(), ec.getReason());
-                                       logger.info("Message header contains an Errorcode message attribute.");
-                                       return false;
-                               }
-                               if ((ma == null)) {
-                                       di.setError(700, "The server is sending an incomplete response (Mapped Address and Changed Address message attributes are missing). The client should not retry.");
-                                       logger.info("Response does not contain a Mapped Address or Changed Address message attribute.");
-                                       return false;
-                               } else {
-                                       di.setPublicIP(ma.getAddress().getInetAddress());
-                                       if ((ma.getPort() == socketTest1.getLocalPort()) && (ma.getAddress().getInetAddress().equals(socketTest1.getLocalAddress()))) {
-                                               logger.info("Node is not natted.");
-                                               nodeNatted = false;
-                                       } else {
-                                               logger.info("Node is natted.");
-                                       }
-                                       return true;
-                               }
-                       } catch (SocketTimeoutException ste) {
-                               if (timeSinceFirstTransmission < 7900) {
-                                       logger.info("Test 1: Socket timeout while receiving the response.");
-                                       timeSinceFirstTransmission += timeout;
-                                       int timeoutAddValue = (timeSinceFirstTransmission * 2);
-                                       if (timeoutAddValue > 1600) timeoutAddValue = 1600;
-                                       timeout = timeoutAddValue;
-                               } else {
-                                       // node is not capable of udp communication
-                                       logger.info("Test 1: Socket timeout while receiving the response. Maximum retry limit exceed. Give up.");
-                                       di.setBlockedUDP();
-                                       logger.info("Node is not capable of UDP communication.");
-                                       return false;
-                               }
-                       } 
-               }
-       }
-       /**
-        * Test allocate request
-        * ALLOCATEREQUEST
-        * 
-        */
-       public void  xxxAllocateRequest()  {
-
-               int timeSinceFirstTransmission = 0;
-               int timeout = timeoutInitValue;
-               try {
-                       // Test 1 including response
-                       socketTest1 = new DatagramSocket(new InetSocketAddress(iaddress, 0));
-                       socketTest1.setReuseAddress(true);
-                       socketTest1.connect(InetAddress.getByName(stunServer), port);
-                       socketTest1.setSoTimeout(timeout);
-
-                       MessageHeader sendMH = new MessageHeader(MessageHeader.MessageHeaderType.AllocateRequest);
-                       sendMH.generateTransactionID();
-
-                       ChangeRequest changeRequest = new ChangeRequest();
-                       sendMH.addMessageAttribute(changeRequest);
-
-                       byte[] data = sendMH.getBytes();
-                       DatagramPacket send = new DatagramPacket(data, data.length);
-                       socketTest1.send(send);
-                       logger.info("Allocate Request sent.");
-
-                       MessageHeader receiveMH = new MessageHeader();
-                       while (!(receiveMH.equalTransactionID(sendMH))) {
-                               DatagramPacket receive = new DatagramPacket(new byte[200], 200);
-                               socketTest1.receive(receive);
-                               receiveMH = MessageHeader.parseHeader(receive.getData());
-                               receiveMH.parseAttributes(receive.getData());
-                       }
-
-               } catch (Exception ste) {
-                       if (timeSinceFirstTransmission < 7900) {
-                               logger.info("Allocate Rquest: Socket timeout while receiving the response.");
-                               timeSinceFirstTransmission += timeout;
-                               int timeoutAddValue = (timeSinceFirstTransmission * 2);
-                               if (timeoutAddValue > 1600) timeoutAddValue = 1600;
-                               timeout = timeoutAddValue;
-                       } else {
-                               // node is not capable of udp communication
-                               logger.info("Allocate Rquest: Socket timeout while receiving the response. Maximum retry limit exceed. Give up.");
-                               di.setBlockedUDP();
-                               logger.info("Node is not capable of UDP communication.");
-                       }
-               } 
-       }
-
-       
-       private boolean xxxtest2() throws UtilityException, SocketException, UnknownHostException, IOException, MessageAttributeParsingException, MessageAttributeException, MessageHeaderParsingException {
-               int timeSinceFirstTransmission = 0;
-               int timeout = timeoutInitValue;
-               while (true) {
-                       try {
-                               // Test 2 including response
-                               DatagramSocket sendSocket = new DatagramSocket(new InetSocketAddress(iaddress, 0));
-                               sendSocket.connect(InetAddress.getByName(stunServer), port);
-                               sendSocket.setSoTimeout(timeout);
-                               
-                               MessageHeader sendMH = new MessageHeader(MessageHeader.MessageHeaderType.BindingRequest);
-                               sendMH.generateTransactionID();
-                               
-                               ChangeRequest changeRequest = new ChangeRequest();
-                               changeRequest.setChangeIP();
-                               changeRequest.setChangePort();
-                               sendMH.addMessageAttribute(changeRequest);
-                                        
-                               byte[] data = sendMH.getBytes(); 
-                               DatagramPacket send = new DatagramPacket(data, data.length);
-                               sendSocket.send(send);
-                               logger.info("Test 2: Binding Request sent.");
-                               
-                               int localPort = sendSocket.getLocalPort();
-                               InetAddress localAddress = sendSocket.getLocalAddress();
-                               
-                               sendSocket.close();
-                               
-                               DatagramSocket receiveSocket = new DatagramSocket(localPort, localAddress);
-                               receiveSocket.connect(ca.getAddress().getInetAddress(), ca.getPort());
-                               receiveSocket.setSoTimeout(timeout);
-                               
-                               MessageHeader receiveMH = new MessageHeader();
-                               while(!(receiveMH.equalTransactionID(sendMH))) {
-                                       DatagramPacket receive = new DatagramPacket(new byte[200], 200);
-                                       receiveSocket.receive(receive);
-                                       receiveMH = MessageHeader.parseHeader(receive.getData());
-                                       receiveMH.parseAttributes(receive.getData());
-                               }
-                               ErrorCode ec = (ErrorCode) receiveMH.getMessageAttribute(MessageAttribute.MessageAttributeType.ErrorCode);
-                               if (ec != null) {
-                                       di.setError(ec.getResponseCode(), ec.getReason());
-                                       logger.info("Message header contains an Errorcode message attribute.");
-                                       return false;
-                               }
-                               if (!nodeNatted) {
-                                       di.setOpenAccess();
-                                       logger.info("Node has open access to the Internet (or, at least the node is behind a full-cone NAT without translation).");
-                               } else {
-                                       di.setFullCone();
-                                       logger.info("Node is behind a full-cone NAT.");
-                               }
-                               return false;
-                       } catch (SocketTimeoutException ste) {
-                               if (timeSinceFirstTransmission < 7900) {
-                                       logger.info("Test 2: Socket timeout while receiving the response.");
-                                       timeSinceFirstTransmission += timeout;
-                                       int timeoutAddValue = (timeSinceFirstTransmission * 2);
-                                       if (timeoutAddValue > 1600) timeoutAddValue = 1600;
-                                       timeout = timeoutAddValue;
-                               } else {
-                                       logger.info("Test 2: Socket timeout while receiving the response. Maximum retry limit exceed. Give up.");
-                                       if (!nodeNatted) {
-                                               di.setSymmetricUDPFirewall();
-                                               logger.info("Node is behind a symmetric UDP firewall.");
-                                               return false;
-                                       } else {
-                                               // not is natted
-                                               // redo test 1 with address and port as offered in the changed-address message attribute
-                                               return true;
-                                       }
-                               }
-                       }
-               }
-       }
-       
-       private boolean xxxtest1Redo() throws UtilityException, SocketException, UnknownHostException, IOException, MessageAttributeParsingException, MessageHeaderParsingException{
-               int timeSinceFirstTransmission = 0;
-               int timeout = timeoutInitValue;
-               while (true) {
-                       // redo test 1 with address and port as offered in the changed-address message attribute
-                       try {
-                               // Test 1 with changed port and address values
-                               socketTest1.connect(ca.getAddress().getInetAddress(), ca.getPort());
-                               socketTest1.setSoTimeout(timeout);
-                               
-                               MessageHeader sendMH = new MessageHeader(MessageHeader.MessageHeaderType.BindingRequest);
-                               sendMH.generateTransactionID();
-                               
-                               ChangeRequest changeRequest = new ChangeRequest();
-                               sendMH.addMessageAttribute(changeRequest);
-                               
-                               byte[] data = sendMH.getBytes();
-                               DatagramPacket send = new DatagramPacket(data, data.length);
-                               socketTest1.send(send);
-                               logger.info("Test 1 redo with changed address: Binding Request sent.");
-                               
-                               MessageHeader receiveMH = new MessageHeader();
-                               while (!(receiveMH.equalTransactionID(sendMH))) {
-                                       DatagramPacket receive = new DatagramPacket(new byte[200], 200);
-                                       socketTest1.receive(receive);
-                                       receiveMH = MessageHeader.parseHeader(receive.getData());
-                                       receiveMH.parseAttributes(receive.getData());
-                               }
-                               MappedAddress ma2 = (MappedAddress) receiveMH.getMessageAttribute(MessageAttribute.MessageAttributeType.MappedAddress);
-                               ErrorCode ec = (ErrorCode) receiveMH.getMessageAttribute(MessageAttribute.MessageAttributeType.ErrorCode);
-                               if (ec != null) {
-                                       di.setError(ec.getResponseCode(), ec.getReason());
-                                       logger.info("Message header contains an Errorcode message attribute.");
-                                       return false;
-                               }
-                               if (ma2 == null) {
-                                       di.setError(700, "The server is sending an incomplete response (Mapped Address message attribute is missing). The client should not retry.");
-                                       logger.info("Response does not contain a Mapped Address message attribute.");
-                                       return false;
-                               } else {
-                                       if ((ma.getPort() != ma2.getPort()) || (!(ma.getAddress().getInetAddress().equals(ma2.getAddress().getInetAddress())))) {
-                                               di.setSymmetric();
-                                               logger.info("Node is behind a symmetric NAT.");
-                                               return false;
-                                       }
-                               }
-                               return true;
-                       } catch (SocketTimeoutException ste2) {
-                               if (timeSinceFirstTransmission < 7900) {
-                                       logger.info("Test 1 redo with changed address: Socket timeout while receiving the response.");
-                                       timeSinceFirstTransmission += timeout;
-                                       int timeoutAddValue = (timeSinceFirstTransmission * 2);
-                                       if (timeoutAddValue > 1600) timeoutAddValue = 1600;
-                                       timeout = timeoutAddValue;
-                               } else {
-                                       logger.info("Test 1 redo with changed address: Socket timeout while receiving the response.  Maximum retry limit exceed. Give up.");
-                                       return false;
-                               }
-                       }
-               }
-       }
-       
-       private void xxxtest3() throws UtilityException, SocketException, UnknownHostException, IOException, MessageAttributeParsingException, MessageAttributeException, MessageHeaderParsingException {
-               int timeSinceFirstTransmission = 0;
-               int timeout = timeoutInitValue;
-               while (true) {
-                       try {
-                               // Test 3 including response
-                               DatagramSocket sendSocket = new DatagramSocket(new InetSocketAddress(iaddress, 0));
-                               sendSocket.connect(InetAddress.getByName(stunServer), port);
-                               sendSocket.setSoTimeout(timeout);
-                               
-                               MessageHeader sendMH = new MessageHeader(MessageHeader.MessageHeaderType.BindingRequest);
-                               sendMH.generateTransactionID();
-                               
-                               ChangeRequest changeRequest = new ChangeRequest();
-                               changeRequest.setChangePort();
-                               sendMH.addMessageAttribute(changeRequest);
-                               
-                               byte[] data = sendMH.getBytes();
-                               DatagramPacket send = new DatagramPacket(data, data.length);
-                               sendSocket.send(send);
-                               logger.info("Test 3: Binding Request sent.");
-                               
-                               int localPort = sendSocket.getLocalPort();
-                               InetAddress localAddress = sendSocket.getLocalAddress();
-                               
-                               sendSocket.close();
-                               
-                               DatagramSocket receiveSocket = new DatagramSocket(localPort, localAddress);
-                               receiveSocket.connect(InetAddress.getByName(stunServer), ca.getPort());
-                               receiveSocket.setSoTimeout(timeout);
-                               
-                               MessageHeader receiveMH = new MessageHeader();
-                               while (!(receiveMH.equalTransactionID(sendMH))) {
-                                       DatagramPacket receive = new DatagramPacket(new byte[200], 200);
-                                       receiveSocket.receive(receive);
-                                       receiveMH = MessageHeader.parseHeader(receive.getData());
-                                       receiveMH.parseAttributes(receive.getData());
-                               }
-                               ErrorCode ec = (ErrorCode) receiveMH.getMessageAttribute(MessageAttribute.MessageAttributeType.ErrorCode);
-                               if (ec != null) {
-                                       di.setError(ec.getResponseCode(), ec.getReason());
-                                       logger.info("Message header contains an Errorcode message attribute.");
-                                       return;
-                               }
-                               if (nodeNatted) {
-                                       di.setRestrictedCone();
-                                       logger.info("Node is behind a restricted NAT.");
-                                       return;
-                               }
-                       } catch (SocketTimeoutException ste) {
-                               if (timeSinceFirstTransmission < 7900) {
-                                       logger.info("Test 3: Socket timeout while receiving the response.");
-                                       timeSinceFirstTransmission += timeout;
-                                       int timeoutAddValue = (timeSinceFirstTransmission * 2);
-                                       if (timeoutAddValue > 1600) timeoutAddValue = 1600;
-                                       timeout = timeoutAddValue;
-                               } else {
-                                       logger.info("Test 3: Socket timeout while receiving the response. Maximum retry limit exceed. Give up.");
-                                       di.setPortRestrictedCone();
-                                       logger.info("Node is behind a port restricted NAT.");
-                                       return;
-                               }
-                       }
-               }
-       }
-}
diff --git a/p2pproxy/test-src/org/linphone/p2pproxy/test/UdpRelayTester.java b/p2pproxy/test-src/org/linphone/p2pproxy/test/UdpRelayTester.java
deleted file mode 100644 (file)
index add0cde..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-P2pAutoConfigTester.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.test;
-
-
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-import org.apache.log4j.Logger;
-import org.apache.log4j.PropertyConfigurator;
-import org.linphone.p2pproxy.api.P2pProxyInstance;
-import org.linphone.p2pproxy.api.P2pProxyNetworkProbe;
-import org.linphone.p2pproxy.api.P2pProxyInstance.Mode;
-import org.linphone.p2pproxy.core.JxtaNetworkManager;
-import org.linphone.p2pproxy.core.P2pProxyAccountManagement;
-import org.linphone.p2pproxy.core.P2pProxyInstanceImpl;
-import org.linphone.p2pproxy.core.P2pProxyMain;
-import org.linphone.p2pproxy.test.utils.SipClient;
-
-public class UdpRelayTester extends TestCase {
-   static private P2pProxyInstance mP2pProxyInstance;
-   private static P2pProxyAccountManagement mP2pProxyAccountManagement;
-   static final String mDefaultSipIdentity = "sip:p2pTester@p2p.linphone.org";
-   static final private String mCallerUri = "sip:caller@p2p.linphone.org";
-   static final private String mCalleeUri = "sip:callee@p2p.linphone.org";
-   
-   private final static Logger mLog = Logger.getLogger(UdpRelayTester.class);
-   
-   //@BeforeClass
-   public static void setUpBeforeClass() throws Exception {
-      // setup logging
-      //PropertyConfigurator.configure("log4j.properties");
-//      // 1 setup relays
-//      String lRunString = "java -cp eclipsebuild:dependencies/*.jar ";
-//      //lRunString +=" -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n";
-//      lRunString +=" org.linphone.p2pproxy.core.P2pProxyMain";
-//      lRunString +=" -jxta " +System.getProperty("user.home")+"/P2pAutoConfigTester-seeding";
-//      lRunString +=" -sip 5040 -seeding-server ";
-//      lRunString +=" -seeding-relay http://"+InetAddress.getLocalHost().getHostAddress()+":"+P2pProxyInstance.BASE_HTTP;
-//      lRunString +=" -seeding-rdv http://"+InetAddress.getLocalHost().getHostAddress()+":"+P2pProxyInstance.BASE_HTTP;
-//      mLog.info("starting ["+lRunString+"]");
-//      Process lProcess = Runtime.getRuntime().exec(lRunString);
-
-      System.setProperty("org.linphone.p2pproxy.home", ".");
-      P2pProxyMain.staticLoadTraceConfigFile();
-      // setup edge
-      mP2pProxyInstance = new P2pProxyInstanceImpl();
-      mP2pProxyInstance.setMode(Mode.edge);
-      mP2pProxyInstance.setIndex(1);
-      mP2pProxyInstance.start();
-      while (mP2pProxyInstance.isStarted() == false) Thread.sleep(500);
-      
-      mP2pProxyAccountManagement = new P2pProxyAccountManagement((JxtaNetworkManager)mP2pProxyInstance.getOpaqueNetworkManager());
-
-      try {
-         mP2pProxyAccountManagement.createAccount(mDefaultSipIdentity);
-       } catch (Exception e) {
-         mLog.warn(e);
-      }           
-       try {
-          mP2pProxyAccountManagement.createAccount(mCallerUri);
-        } catch (Exception e) {
-          mLog.warn(e);
-       }
-
-        try {
-           mP2pProxyAccountManagement.createAccount(mCalleeUri);
-         } catch (Exception e) {
-           mLog.warn(e);
-        }
-   }
-
-   //@Before
-   public void setUp() throws Exception {
-      if (mP2pProxyInstance == null) {
-         setUpBeforeClass();
-      }
-   }
-   public void testAddressRequest() throws Exception {
-      try {
-         
-         Assert.assertTrue("cannot get relay addresses" ,mP2pProxyInstance.getRtpRelayManager().getAddresses().size()!=0);
-         mLog.info("testAddressRequest ok");
-      } catch (Exception e) {
-          mLog.error("testAddressRequest ko",e);
-          Assert.fail(e.getMessage());
-      }  
-   }
-   public void testCallWithRelay() throws Exception {
-      try {
-         SipClient lCaller = new SipClient(mP2pProxyInstance.getSipClientProvider(),mCallerUri,mP2pProxyInstance.getAdvertisementDiscoveryTimeout());
-         lCaller.register();
-         SipClient lCallee = new SipClient(mP2pProxyInstance.getSipClientProvider(),mCalleeUri,mP2pProxyInstance.getAdvertisementDiscoveryTimeout());
-         lCallee.register();
-         
-         mLog.info("testCallWithRelay ok");
-      } catch (Exception e) {
-          mLog.error("testCallWithRelay ko",e);
-          Assert.fail(e.getMessage());
-      }  
-      
-   }
-}
diff --git a/p2pproxy/test-src/org/linphone/p2pproxy/test/utils/DefaultCallListener.java b/p2pproxy/test-src/org/linphone/p2pproxy/test/utils/DefaultCallListener.java
deleted file mode 100644 (file)
index fddfbb1..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-DefaultCallListener.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.test.utils;
-
-import java.util.Vector;
-
-import junit.framework.Assert;
-
-import org.zoolu.sip.address.NameAddress;
-import org.zoolu.sip.call.Call;
-import org.zoolu.sip.call.CallListener;
-import org.zoolu.sip.message.Message;
-
-public class   DefaultCallListener implements CallListener {
-    public void onCallAccepted(Call call, String sdp, Message resp) {
-        Assert.fail("call accepted");
-    }
-    public void onCallCanceling(Call call, Message cancel) {
-        Assert.fail("call canceled");
-    }
-    public void onCallClosed(Call call, Message resp) {
-        Assert.fail("call closed");         }
-
-    public void onCallClosing(Call call, Message bye) {
-        Assert.fail("call closing");
-    }
-    public void onCallConfirmed(Call call, String sdp, Message ack) {
-        Assert.fail("call Confirmed");
-    }
-    public void onCallIncoming(Call call, NameAddress callee, NameAddress caller, String sdp, Message invite) {
-        Assert.fail("call Incoming");
-    }
-    public void onCallModifying(Call call, String sdp, Message invite) {
-        Assert.fail("call Modifying");
-    }
-    public void onCallReInviteAccepted(Call call, String sdp, Message resp) {
-        Assert.fail("call ReInviteAccepted");
-    }
-    public void onCallReInviteRefused(Call call, String reason, Message resp) {
-        Assert.fail("call ReInviteRefused");
-    }
-    public void onCallReInviteTimeout(Call call) {
-        Assert.fail("call ReInviteTimeout");
-    }
-    public void onCallRedirection(Call call, String reason, Vector contact_list, Message resp) {
-        Assert.fail("call Redirection");
-    }
-    public void onCallRefused(Call call, String reason, Message resp) {
-        Assert.fail("call Refused reason ["+resp.getStatusLine()+"]");
-    }
-    public void onCallRinging(Call call, Message resp) {
-        Assert.fail("call Ringing");
-    }
-    public void onCallTimeout(Call call) {
-        Assert.fail("call Timeout");
-    }
-}
diff --git a/p2pproxy/test-src/org/linphone/p2pproxy/test/utils/P2pNetwork.java b/p2pproxy/test-src/org/linphone/p2pproxy/test/utils/P2pNetwork.java
deleted file mode 100644 (file)
index eefbe34..0000000
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
-p2pproxy Copyright (C) 2007  Jehan Monnier ()
-
-P2pNetwork.java -- create a jxta network.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.test.utils;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.InvalidPropertiesFormatException;
-import java.util.List;
-
-import javax.security.cert.CertificateException;
-
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyInstance;
-import org.linphone.p2pproxy.api.P2pProxyInstance.Mode;
-
-import net.jxta.exception.JxtaException;
-
-//import org.linphone.p2pproxy.Configurator;
-//import org.linphone.p2pproxy.JxtaNetworkManager;
-//import org.linphone.p2pproxy.P2pProxyException;
-
-
-public class P2pNetwork {
-       private List<P2pProxyInstance> mEdges = new ArrayList<P2pProxyInstance>();
-    private List<P2pProxyInstance> mSuperPeers = new ArrayList<P2pProxyInstance>();
-    private final static Logger mLog = Logger.getLogger(P2pNetwork.class);
-    Process mSshProcess;
-    //String mPrivateAdress = "192.168.145.1";
-    String mPrivateAdress = "127.0.0.1";
-
-    String mPublicAdress ;
-    String mPublicAdressUser ;
-   /**
-        * create a p2p network with super peers and edges
-        * @param nEdgees number of edge peer
-        * @param mRdv number of super peer
-    * @throws IOException 
-    * @throws FileNotFoundException 
-    * @throws InvalidPropertiesFormatException 
-    * @throws CertificateException 
-    * @throws URISyntaxException 
-    * @throws P2pProxyException 
-    * @throws InterruptedException 
-    * @throws JxtaException 
-        */
-    public P2pNetwork(int nEdge,int mRdv) throws Exception {
-       this(nEdge,mRdv,0,0,100,false,System.getProperty("user.name"),"127.0.0.1");
-    }
-    public P2pNetwork(int nEdge,int mRdv,int pAuto,int aBaseIndex,int aRelayCapacity, boolean isNated, String aUser,String aRemoteHost) throws Exception {
-       mPublicAdress = aRemoteHost;
-       mPublicAdressUser=aUser;
-       try {
-
-          if (isNated == true) {
-
-             //1
-             setupDummySocks(aBaseIndex,nEdge+mRdv+pAuto);
-             //2
-
-             System.setProperty("socksProxyHost", mPrivateAdress);
-             System.setProperty("socksProxyPort", "1080");
-          }
-          String [] lClassPath = {
-                "./antbuild/p2pproxy"
-                ,"./dependencies/bcprov-jdk14.jar"
-                ,"./dependencies/javax.servlet.jar"
-                ,"./dependencies/org.mortbay.jetty.jar"
-          };
-          URL[] lUrlTab = new URL[lClassPath.length];
-          for (int i=0;i<lClassPath.length;i++) {
-             lUrlTab[i]=  new File(lClassPath[i]).toURL();
-          }
-          // build relays
-          
-          ClassLoader lRootClassLoader = Thread.currentThread().getContextClassLoader();
-          // first relay
-          ClassLoader lFirstClassLoader = new URLClassLoader(lUrlTab,lRootClassLoader);
-          P2pProxyInstance lFirstP2pProxyInstance = (P2pProxyInstance) Class.forName("org.linphone.p2pproxy.core.P2pProxyInstanceImpl",true,lFirstClassLoader).newInstance();
-          lFirstP2pProxyInstance.setIndex(aBaseIndex);
-          lFirstP2pProxyInstance.setMode(Mode.seeding_server);
-          if (isNated == true)  {
-             lFirstP2pProxyInstance.setPrivateHostAdress(mPrivateAdress);
-             lFirstP2pProxyInstance.setPublicHostAdress(mPublicAdress);
-          }
-          lFirstP2pProxyInstance.start();
-          mSuperPeers.add(lFirstP2pProxyInstance);
-          while (lFirstP2pProxyInstance.isStarted() == false) {
-             Thread.sleep(1000);
-          }
-          for (int i=1;i<mRdv;i++) {
-             ClassLoader lClassLoader = new URLClassLoader(lUrlTab,lRootClassLoader);
-             P2pProxyInstance lP2pProxyInstance = (P2pProxyInstance) Class.forName("org.linphone.p2pproxy.core.P2pProxyInstanceImpl",true,lClassLoader).newInstance();
-             lP2pProxyInstance.setIndex(aBaseIndex+i);
-             lP2pProxyInstance.setMode(Mode.relay);
-             lP2pProxyInstance.setRelayCapacity(aRelayCapacity);
-             if (isNated == true)  {
-                lP2pProxyInstance.setPrivateHostAdress(mPrivateAdress);
-                lP2pProxyInstance.setPublicHostAdress(mPublicAdress);
-             }
-             mSuperPeers.add(lP2pProxyInstance);
-             lP2pProxyInstance.start();
-          }
-          //edges
-          for (int j=0;j<nEdge;j++) {
-             ClassLoader lClassLoader = new URLClassLoader(lUrlTab,lRootClassLoader);
-             P2pProxyInstance lP2pProxyInstance = (P2pProxyInstance) Class.forName("org.linphone.p2pproxy.core.P2pProxyInstanceImpl",true,lClassLoader).newInstance();
-             lP2pProxyInstance.setIndex(aBaseIndex+mRdv+j);
-             lP2pProxyInstance.setMode(Mode.edge);
-             lP2pProxyInstance.setRelayCapacity(aRelayCapacity);
-             if (isNated == true)  {
-                lP2pProxyInstance.setPrivateHostAdress(mPrivateAdress);
-                lP2pProxyInstance.setPublicHostAdress(mPublicAdress);
-             }
-             mEdges.add(lP2pProxyInstance);
-             lP2pProxyInstance.start();
-          }
-          //auto
-          for (int k=0;k<pAuto;k++) {
-             ClassLoader lClassLoader = new URLClassLoader(lUrlTab,lRootClassLoader);
-             P2pProxyInstance lP2pProxyInstance = (P2pProxyInstance) Class.forName("org.linphone.p2pproxy.core.P2pProxyInstanceImpl",true,lClassLoader).newInstance();
-             lP2pProxyInstance.setIndex(aBaseIndex+mRdv+nEdge+k);
-             lP2pProxyInstance.setMode(Mode.auto);
-             lP2pProxyInstance.setRelayCapacity(aRelayCapacity);
-             if (isNated == true)  {
-                lP2pProxyInstance.setPrivateHostAdress(mPrivateAdress);
-                lP2pProxyInstance.setPublicHostAdress(mPublicAdress);
-             }
-             mEdges.add(lP2pProxyInstance);
-             lP2pProxyInstance.start();
-          }
-          
-          boolean lstarted;
-          // wait untill all instances are started
-          do {
-             lstarted = true;
-             for (P2pProxyInstance lP2pProxyInstance : mSuperPeers) {
-                if (lP2pProxyInstance.isStarted() == false) lstarted = false;
-             } 
-             for (P2pProxyInstance lP2pProxyInstance : new ArrayList<P2pProxyInstance>(mEdges)) {
-                if (lP2pProxyInstance.isStarted() == false) {
-                   lstarted = false;
-                } else {
-                   if (lP2pProxyInstance.getMode() == Mode.relay) {
-                      // move from edge list to relay
-                      mEdges.remove(lP2pProxyInstance);
-                      mSuperPeers.add(lP2pProxyInstance);
-                      mLog.info("peer [ "+lP2pProxyInstance+"] moved from edge to relay" );
-                   }
-                }
-             }
-             Thread.sleep(1000);
-          }while (lstarted == false);
-          mLog.info("P2pNetwork started with ["+getEdgesPeers().size()+"] egdges and ["+getSuperPeers().size()+"]super peers");
-          
-       } catch (Exception e) {
-          mLog.fatal("cannot create network",e);
-       }
-       
-    }
-   /**
-    * @return Returns the mEdges.
-    */
-   public List<P2pProxyInstance> getEdgesPeers() {
-      return mEdges;
-   }
-   /**
-    * @return Returns the mSuperPeers.
-    */
-   public List<P2pProxyInstance> getSuperPeers() {
-      return mSuperPeers;
-   }
-   public List<P2pProxyInstance> getAllPeers() {
-      List<P2pProxyInstance> lP2pProxyInstanceList = new ArrayList <P2pProxyInstance>();
-      lP2pProxyInstanceList.addAll(mSuperPeers);
-      lP2pProxyInstanceList.addAll(mEdges);
-      return lP2pProxyInstanceList;
-   }
-   public void stop() {
-      for (P2pProxyInstance lP2pProxyInstance:getAllPeers()) {
-         try {
-            lP2pProxyInstance.stop();
-         } catch (Exception e) {
-            mLog.error("stop error", e);
-            //nop
-         }
-      }
-      mSshProcess.destroy();
-      
-   }
-   private void setupDummySocks(int aBaseIndex, int numberOfPeers) throws InterruptedException, IOException {
-      StringBuffer lCommand =new StringBuffer("ssh -D "+mPrivateAdress+":1080 ");
-      for (int i=aBaseIndex; i<aBaseIndex + numberOfPeers;i++) {
-         lCommand.append("-R"+mPublicAdress+":"+(P2pProxyInstance.BASE_HTTP+i)+":"+mPrivateAdress+":"+(P2pProxyInstance.BASE_HTTP+i)+" ");
-      }
-      lCommand.append(mPublicAdressUser+"@"+mPublicAdress);
-      mLog.info("executing ["+lCommand.toString()+"]");
-      mSshProcess = Runtime.getRuntime().exec(lCommand.toString());
-   }
-       
-}
diff --git a/p2pproxy/test-src/org/linphone/p2pproxy/test/utils/SipClient.java b/p2pproxy/test-src/org/linphone/p2pproxy/test/utils/SipClient.java
deleted file mode 100644 (file)
index 371ddbc..0000000
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-SipClient.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.test.utils;
-
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.log4j.Logger;
-import org.zoolu.sip.address.NameAddress;
-import org.zoolu.sip.call.Call;
-import org.zoolu.sip.call.CallListener;
-import org.zoolu.sip.header.ExpiresHeader;
-import org.zoolu.sip.message.Message;
-import org.zoolu.sip.message.MessageFactory;
-import org.zoolu.sip.provider.SipProvider;
-import org.zoolu.sip.transaction.TransactionClient;
-import org.zoolu.sip.transaction.TransactionClientListener;
-
-import junit.framework.Assert;
-
-
-public class SipClient {
-   private final static Logger mLog = Logger.getLogger(SipClient.class);
-   private  final SipProvider mProvider;
-   private final String mSipIdentity;
-   private final long mTransactionTimeout;
-   public final static String sdp_offer = "v=0\n"
-                                          +"o=jdoe 2890844526 2890842807 IN IP4 10.0.1.1\n"
-                                          +"s=\n"
-                                          +"c=IN IP4 192.0.2.3\n"
-                                          +"t=0 0\n"
-                                          +"m=audio 45664 RTP/AVP 0\n"
-                                          +"a=rtpmap:0 PCMU/8000\n"
-                                          +"a=relay-session-id:toto";
-   
-   
-   
-   public SipClient(SipProvider aProvider,String aSipIdentity,long aTransactionTimeout) {
-      mProvider=aProvider;
-      mSipIdentity = aSipIdentity;
-      mTransactionTimeout = aTransactionTimeout;
-   }
-   public void register() throws InterruptedException {
-        register(900,mSipIdentity);
-    }
-   
-   public void unRegister() throws InterruptedException {
-        register(0,mSipIdentity);
-    }
-   public void register(int expiration,String aTo) throws InterruptedException {
-      register(expiration,aTo, 200);
-   }
-   public boolean register(int expiration,String aTo,final int aReturnCode) throws InterruptedException {
-            final long TryingTimout = 2000;
-            
-            NameAddress lContact = new NameAddress(getContact(mProvider));
-            NameAddress lT0 = new NameAddress(aTo);
-            Message req=MessageFactory.createRegisterRequest(mProvider,lT0,lT0,lContact);
-            req.setExpiresHeader(new ExpiresHeader(expiration));
-            final Semaphore l100Semaphore = new Semaphore(0);
-            final Semaphore l200Semaphore = new Semaphore(0);
-            final boolean[] lstatus = {false};
-            TransactionClientListener lTransactionClient = new TransactionClientListener() {
-
-                public void onTransFailureResponse(TransactionClient tc, Message resp) {
-                    if (aReturnCode < 400) {
-                       Assert.fail("transaction failure ["+resp.getStatusLine().toString()+"]");
-                    } else {
-                       Assert.assertEquals("unexpected return code" ,aReturnCode, resp.getStatusLine().getCode());
-                       l100Semaphore.release();
-                       l200Semaphore.release();
-                    }
-                }
-                public void onTransProvisionalResponse(TransactionClient tc, Message resp) {
-                    int lStatusCode = resp.getStatusLine().getCode();
-                    Assert.assertEquals("bad status code" ,100, lStatusCode);
-                    l100Semaphore.release();
-                }
-                public void onTransSuccessResponse(TransactionClient tc, Message resp) {
-                   lstatus[0] = true; 
-                   l200Semaphore.release();
-                }
-                public void onTransTimeout(TransactionClient tc) {
-                    Assert.fail("transaction timeout");
-                }
-
-            };
-            TransactionClient t=new TransactionClient(mProvider,req,lTransactionClient);
-            t.request();
-            Assert.assertTrue("100 trying received too late["+TryingTimout+"]", l100Semaphore.tryAcquire(TryingTimout,TimeUnit.MILLISECONDS));
-            l100Semaphore.release();
-            Assert.assertTrue("200 received too late["+mTransactionTimeout+"]", l200Semaphore.tryAcquire(mTransactionTimeout,TimeUnit.MILLISECONDS));
-            l200Semaphore.release();
-            return lstatus[0];
-    }
-   public String getContact(SipProvider aProvider) {
-        return "sip:"+aProvider.getViaAddress()+":"+aProvider.getPort();
-    }
-   
-   /**
-    * @param aTo uri to call
-    * @param aProvider sip provider of the To party
-    */
-   public void call(String aTo,SipProvider aCalleeProvider) {
-      call(aTo,aCalleeProvider,false);
-   }
-   /**
-    * @param aTo uri to call
-    * @param aProvider sip provider of the To party
-    * @param should I put an SDP ?
-    */
-   public void call(String aTo,SipProvider aCalleeProvider,boolean enableSdp) {
-          call(aTo, aCalleeProvider, enableSdp, 0);
-   }
-   /**
-    * @param aTo uri to call
-    * @param aProvider sip provider of the To party
-    * @param should I put an SDP ?
-    */
-   public Call call(String aTo,SipProvider aCalleeProvider,boolean enableSdp,final long aCallDuration) {
-
-        try {
-            String lCallerUri = mSipIdentity;
-            String lCalleeUri = aTo;
-            mLog.info("Calling  ["+aTo+"] from ["+mSipIdentity+"]");
-            long lTimout = 30000;
-
-            final Semaphore lCallerSemaphoreAccepted = new Semaphore(0);
-            final Semaphore lCalleeSemaphoreClosed = new Semaphore(0);
-            final Semaphore lCallerSemaphoreRinging = new Semaphore(0);
-            CallListener lCallerListener = new DefaultCallListener() {
-                public void onCallAccepted(Call call, String sdp, Message resp) {
-                    lCallerSemaphoreAccepted.release();
-                  call.ackWithAnswer(sdp);
-              }
-              public void onCallClosing(Call call, Message bye) {
-                  //nop
-              }
-                public void onCallRinging(Call call, Message resp) {
-                    lCallerSemaphoreRinging.release();
-                }
-            };
-            Call  lCaller = new Call(mProvider, lCallerUri, getContact(mProvider), lCallerListener);
-            if (enableSdp) {
-               lCaller.setLocalSessionDescriptor(sdp_offer);
-            }
-            final Semaphore lCalleeSemaphoreConfirmed = new Semaphore(0);
-            final Semaphore lCalleeSemaphoreIncoming = new Semaphore(0);
-            CallListener lCalleeListener = new DefaultCallListener() {
-                public void onCallConfirmed(Call call, String sdp, Message ack) {
-                    lCalleeSemaphoreConfirmed.release();
-                    if (aCallDuration != Long.MAX_VALUE) {
-                       try {
-                                                       Thread.sleep(aCallDuration);
-                                               } catch (InterruptedException e) {
-                                                       //nop
-                                               }
-                       call.bye();
-                    }
-                    
-                }
-                public void onCallIncoming(Call call, NameAddress callee, NameAddress caller, String sdp, Message invite) {
-                    lCalleeSemaphoreIncoming.release();
-                    call.accept(sdp);
-                }
-              public void onCallClosed(Call call, Message resp) {
-                  lCalleeSemaphoreClosed.release();
-              }
-            };
-            Call  lCallee = new Call(aCalleeProvider, lCalleeUri, getContact(aCalleeProvider), lCalleeListener);
-            if (enableSdp) {
-               lCallee.setLocalSessionDescriptor(sdp_offer);
-            }
-
-            lCallee.listen();
-            lCaller.call(lCalleeUri);
-
-            Assert.assertTrue("callee  not alerted until ["+lTimout+"]", lCalleeSemaphoreIncoming.tryAcquire(lTimout,TimeUnit.MILLISECONDS));
-            Assert.assertTrue("caller  call not accepted until ["+lTimout+"]", lCallerSemaphoreAccepted.tryAcquire(lTimout,TimeUnit.MILLISECONDS));
-            Assert.assertTrue("callee  call not confirmed until ["+lTimout+"]", lCalleeSemaphoreConfirmed.tryAcquire(lTimout,TimeUnit.MILLISECONDS));
-            Assert.assertTrue("caller  call not closed until ["+lTimout+"]", lCalleeSemaphoreClosed.tryAcquire(lTimout,TimeUnit.MILLISECONDS));
-            mLog.info("Call ok");
-            return lCaller;
-        } catch (Exception e) {
-            mLog.error("Call ko",e);
-            Assert.fail(e.getMessage());
-            return null;
-        }       
-
-          
-   }
-   /**
-    * @param aTo uri to call
-    * @param should I put an SDP ?
-    */
-   public Call call(String aTo,boolean enableSdp,final long aCallDuration) {
-
-        try {
-            String lCallerUri = mSipIdentity;
-            String lCalleeUri = aTo;
-            mLog.info("Calling  ["+aTo+"] from ["+mSipIdentity+"]");
-            long lTimout = 30000;
-
-            final Semaphore lCallerSemaphoreAccepted = new Semaphore(0);
-            final Semaphore lCalleeSemaphoreClosed = new Semaphore(0);
-            final Semaphore lCallerSemaphoreRinging = new Semaphore(0);
-            CallListener lCallerListener = new DefaultCallListener() {
-                public void onCallAccepted(Call call, String sdp, Message resp) {
-                    lCallerSemaphoreAccepted.release();
-                  call.ackWithAnswer(sdp);
-              }
-
-                public void onCallRinging(Call call, Message resp) {
-                    lCallerSemaphoreRinging.release();
-                }
-                public void onCallClosed(Call call, Message resp) {
-                       lCalleeSemaphoreClosed.release();
-                }
-            };
-            Call  lCaller = new Call(mProvider, lCallerUri, getContact(mProvider), lCallerListener);
-            if (enableSdp) {
-               lCaller.setLocalSessionDescriptor(sdp_offer);
-            }
-
-            lCaller.call(lCalleeUri);
-            Assert.assertTrue("caller  call not accepted until ["+lTimout+"]", lCallerSemaphoreAccepted.tryAcquire(lTimout,TimeUnit.MILLISECONDS));
-            
-               try {
-                               Thread.sleep(aCallDuration);
-                       } catch (InterruptedException e) {
-                               //nop
-                       }
-                       lCaller.bye();
-
-            Assert.assertTrue("caller  call not closed until ["+aCallDuration + aCallDuration/10+"]", lCalleeSemaphoreClosed.tryAcquire(aCallDuration + aCallDuration/10,TimeUnit.MILLISECONDS));
-   
-            mLog.info("Call ok");
-            return lCaller;
-        } catch (Exception e) {
-            mLog.error("Call ko",e);
-            Assert.fail(e.getMessage());
-            return null;
-        }       
-
-          
-   }  
-   public void listen() {
-      CallListener lCalleeListener = new DefaultCallListener() {
-           public void onCallConfirmed(Call call, String sdp, Message ack) {
-               
-           }
-           public void onCallIncoming(Call call, NameAddress callee, NameAddress caller, String sdp, Message invite) {
-               call.accept(sdp);
-           }
-           public void onCallClosing(Call call, Message bye) {
-               //nop
-           }
-       };
-       Call  lCallee = new Call(mProvider, mSipIdentity, getContact(mProvider), lCalleeListener);
-       lCallee.setLocalSessionDescriptor(sdp_offer);
-       lCallee.listen();
-   }
-}
diff --git a/p2pproxy/test-src/org/linphone/p2pproxy/test/utils/UserInstance.java b/p2pproxy/test-src/org/linphone/p2pproxy/test/utils/UserInstance.java
deleted file mode 100644 (file)
index 5e589a7..0000000
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
-p2pproxy
-Copyright (C) 2007  Jehan Monnier ()
-
-P2pAutoConfigTester.java - .
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-package org.linphone.p2pproxy.test.utils;
-
-import java.io.File;
-import java.net.DatagramSocket;
-import java.net.InetAddress;
-import java.net.PortUnreachableException;
-import java.net.URI;
-import java.util.Timer;
-import java.util.TimerTask;
-
-import org.apache.log4j.Logger;
-import org.linphone.p2pproxy.api.P2pProxyException;
-import org.linphone.p2pproxy.api.P2pProxyResourceManagement;
-import org.linphone.p2pproxy.core.P2pProxyMain;
-import org.linphone.p2pproxy.core.media.MediaResoureUnreachableException;
-import org.linphone.p2pproxy.core.stun.AddressInfo;
-import org.linphone.p2pproxy.core.stun.StunClient;
-import org.linphone.p2pproxy.launcher.P2pProxylauncherConstants;
-import org.linphone.p2pproxy.test.RtpRelayServerTester;
-import org.zoolu.net.SocketAddress;
-import org.zoolu.sip.provider.SipProvider;
-import org.zoolu.sip.provider.SipStack;
-
-public class UserInstance {
-private final Thread mFonisThread;
-private Timer mTimer = new Timer("Registartion timer");
-private final SipProvider mProvider;
-private final SipClient mSipClient;
-private RtpRelayServerTester mRtpRelayServerTester;
-private StunClient mStunClient;
-private final int REGISTRATION_PERIOD=60;
-private final static Logger mLog = Logger.getLogger(UserInstance.class);
-private static boolean mIsRegistered = false;
-DatagramSocket mAudioSocket;
-public UserInstance(final String userName,final String aPreferedProxyUri) throws  P2pProxyException {
-       try {
-               mAudioSocket  = new DatagramSocket();
-               DatagramSocket lSocket = new DatagramSocket();
-               lSocket.setReuseAddress(true);
-               int lSipPort = lSocket.getLocalPort();
-               lSocket.close();
-               URI lUserNameUri = URI.create(userName);
-               final String[] lParam = {"-jxta" ,"userinstance-"+lUserNameUri.getSchemeSpecificPart()
-                               ,"-edge-only"
-                               ,"-seeding", "tcp://91.121.81.212:9701|tcp://91.121.81.212:9702"};
-               lSocket.close();
-
-               Runnable lFonisTask = new Runnable() {
-                       public void run() {
-                               P2pProxyMain.main(lParam);
-                       }
-
-               };
-               mFonisThread = new Thread(lFonisTask,"fonis lib");
-               mFonisThread.start();
-               int lRetry=0;
-               while (P2pProxyMain.getState() != P2pProxylauncherConstants.P2PPROXY_CONNECTED && lRetry++<20) {
-                       Thread.sleep(500);
-               }
-               if (P2pProxyMain.getState() != P2pProxylauncherConstants.P2PPROXY_CONNECTED) {
-                       throw new P2pProxyException("Cannot connect to fonis network");
-               }
-               P2pProxyMain.createAccount(userName);
-               SipStack.log_path = "userinstance-"+lUserNameUri.getSchemeSpecificPart()+"/logs";
-               File lFile = new File(SipStack.log_path);
-               if (lFile.exists() == false) lFile.mkdir();
-               //InetAddress[] lAddresses = InetAddress.getAllByName("localhost");
-               mProvider=new SipProvider(null,lSipPort);
-               mSipClient = new SipClient(mProvider,userName,30000);
-
-               class RegistrarTimerTask extends  TimerTask {
-                       @Override
-                       public void run() {
-                               try {
-                                       URI     lProxyUri = null;
-                                       // 1 get proxy address
-                                       String [] lProxies = P2pProxyMain.lookupSipProxiesUri(P2pProxyResourceManagement.DOMAINE);
-                                       if (lProxies.length == 0) {
-                                               System.out.println("cannot find registrar");
-                                               return;
-                                       }
-                                       //default choice
-                                       lProxyUri = URI.create(lProxies[0]);
-                                       //search
-                                       for (String lProxy: lProxies) {
-                                               if  (lProxy.equals(aPreferedProxyUri)) {
-                                                       lProxyUri = URI.create(lProxy);
-                                                       break;
-                                               }
-                                       }
-                                       //2 setOutbound proxy
-                                       mProvider.setOutboundProxy(new SocketAddress(lProxyUri.getRawSchemeSpecificPart()));
-                                       mLog.info("use outband proxy ["+mProvider.getOutboundProxy()+"]");
-                                       //3 setup stun client
-
-                                       String [] lMediaServer = P2pProxyMain.lookupMediaServerAddress(P2pProxyResourceManagement.DOMAINE);
-                                       
-                                       mStunClient =  new StunClient(lMediaServer);
-                                       try {
-                                               AddressInfo lAudioAddressInfo = mStunClient.computeAddressInfo(mAudioSocket);
-                                               mLog.info("audio socket info ["+lAudioAddressInfo+"]");
-                                       }catch (MediaResoureUnreachableException pex) {
-                                               mLog.error("cannot reach media server, flushing ["+pex.getResourceAddress()+"]",pex);
-                                               P2pProxyMain.revokeMediaServer(pex.getResourceAddress());
-                                       }
-                                       
-                                       try{
-                                               mSipClient.register(REGISTRATION_PERIOD,userName);
-                                       }catch(Exception e) {
-                                               mLog.error("registration error", e);
-                                       }
-                                       if (lMediaServer.length > 0) {
-                                               mRtpRelayServerTester = new RtpRelayServerTester(mStunClient.getStrunServerList().get(0));
-                                       }
-                                       mIsRegistered = true;
-                               }       
-                                       catch(Exception e) {
-                                       mLog.error("cannot register user["+userName+"]",e);
-                               } finally {
-                                       mTimer.schedule(new  RegistrarTimerTask(), 1000 *(REGISTRATION_PERIOD-REGISTRATION_PERIOD/10));
-                               }
-                       }
-
-               };
-               mTimer.schedule(new  RegistrarTimerTask(), 0);
-               mSipClient.listen();
-       } catch (Exception e) {
-               throw new P2pProxyException("cannot start client",e);
-       }
-}
-public void call(String aTo, int duration) {
-       mSipClient.call(aTo, true, duration);
-       if (mRtpRelayServerTester != null) {
-               mRtpRelayServerTester.testRouting();
-               mLog.info("rtp relay ok");
-       }
-}
-public static void main(String[] args) throws P2pProxyException {
-       String lFrom=null, lTo=null, lPreferedProxyUri=null;
-       int lDuration = 10000, lLoop=0;
-       for (int i=0; i < args.length; i=i+2) {  
-                  String argument = args[i];
-                  if (argument.equals("-from")) {
-                          lFrom = args[i + 1];
-                          System.out.println("from [" + lFrom + "]");
-                          //nop
-                  } else if (argument.equals("-to")) {
-                          lTo = args[i + 1];
-                          System.out.println("to [" + lTo + "]");
-                          
-                  } else if (argument.equals("-duration")) {
-                          lDuration =  Integer.parseInt(args[i + 1]);
-                          System.out.println("duration [" + lDuration + "]");
-                          
-                  } else if (argument.equals("-nb-call")) {
-                          lLoop =  Integer.parseInt(args[i + 1]);
-                          System.out.println("nb-call [" + lLoop + "]");
-                  } else if (argument.equals("-prefered-proxy")) {
-                          lPreferedProxyUri =  args[i + 1];
-                          System.out.println("prefered-proxy [" + lLoop + "]");
-                  } 
-                  else {
-                          System.out.println("Invalid option: " + args[i]);
-                          usage();
-                          System.exit(1);
-                  }
-          }    
-       
-   if (lFrom == null) {
-          System.out.println("missing -from ");
-          usage();
-          System.exit(1);
-   }
-   if (lLoop != 0 && lTo == null) {
-          System.out.println("missing -to ");
-          usage();
-          System.exit(1);
-   }
-
-   UserInstance lUserInstance= new UserInstance(lFrom,lPreferedProxyUri);
-   while (mIsRegistered == false) {
-          try {
-                  Thread.sleep(1000);
-          } catch (InterruptedException e) {
-                  //nop;
-          }
-   }
-   for (int i=0;i<lLoop;i++) {
-          lUserInstance.call(lTo, lDuration);
-   }
-   while (true) {
-          try {
-                  Thread.sleep(1000);
-          } catch (InterruptedException e) {
-                  //nop;
-          }
-   }
-          
-}
-private static void usage() {
-       // TODO Auto-generated method stub
-       
-}
-}
diff --git a/pixmaps/.gitignore b/pixmaps/.gitignore
new file mode 100644 (file)
index 0000000..282522d
--- /dev/null
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/pixmaps/Makefile.am b/pixmaps/Makefile.am
new file mode 100644 (file)
index 0000000..52ae8cd
--- /dev/null
@@ -0,0 +1,13 @@
+
+
+pixmapdir=$(datadir)/pixmaps/linphone
+
+pixmap_DATA= linphone2.png  linphone2.xpm  linphone.png \
+sip-away.png      sip-bifm.png       \
+sip-busy.png      sip-closed.png     \
+sip-online.png    sip-otl.png        \
+sip-otp.png       sip-wfa.png \
+green.png red.png \
+mic_muted.png mic_active.png
+
+EXTRA_DIST=$(pixmap_DATA)
diff --git a/pixmaps/green.png b/pixmaps/green.png
new file mode 100644 (file)
index 0000000..0005537
Binary files /dev/null and b/pixmaps/green.png differ
diff --git a/pixmaps/linphone.png b/pixmaps/linphone.png
new file mode 100644 (file)
index 0000000..06cf183
Binary files /dev/null and b/pixmaps/linphone.png differ
diff --git a/pixmaps/linphone2.png b/pixmaps/linphone2.png
new file mode 100644 (file)
index 0000000..d1bf1ab
Binary files /dev/null and b/pixmaps/linphone2.png differ
diff --git a/pixmaps/linphone2.xpm b/pixmaps/linphone2.xpm
new file mode 100644 (file)
index 0000000..717f8c4
--- /dev/null
@@ -0,0 +1,883 @@
+/* XPM */
+static char * linphone2_xpm[] = {
+"50 45 835 2",
+"      c None",
+".     c #211F1D",
+"+     c #53514E",
+"@     c #5F5D59",
+"#     c #7D7C78",
+"$     c #605F5C",
+"%     c #94928C",
+"&     c #95938D",
+"*     c #7B7A77",
+"=     c #605E5C",
+"-     c #353432",
+";     c #585754",
+">     c #84827D",
+",     c #B9B6B0",
+"'     c #D9D5CE",
+")     c #DFDBD3",
+"!     c #EAE6DE",
+"~     c #EFEBE2",
+"{     c #EEEAE1",
+"]     c #EFEBE3",
+"^     c #EEEAE2",
+"/     c #75726D",
+"(     c #5E5C58",
+"_     c #7D7B77",
+":     c #BAB6AF",
+"<     c #E5E1D8",
+"[     c #DAD7CF",
+"}     c #C8C4BD",
+"|     c #898782",
+"1     c #949089",
+"2     c #938F88",
+"3     c #5B5854",
+"4     c #45433F",
+"5     c #4D4943",
+"6     c #5F5C56",
+"7     c #A5A199",
+"8     c #DCD5C5",
+"9     c #6F6B63",
+"0     c #42413F",
+"a     c #A19E97",
+"b     c #DAD6CE",
+"c     c #EDE9E1",
+"d     c #D4D0C9",
+"e     c #96928C",
+"f     c #63605B",
+"g     c #827C73",
+"h     c #6F6961",
+"i     c #90877A",
+"j     c #8E8578",
+"k     c #B4A999",
+"l     c #B9AD9D",
+"m     c #C0B5A3",
+"n     c #BCB1A0",
+"o     c #858075",
+"p     c #C3BCAE",
+"q     c #EAE5DB",
+"r     c #E0D9C9",
+"s     c #C5BDAE",
+"t     c #20201E",
+"u     c #8D8B86",
+"v     c #CAC7C1",
+"w     c #D2CEC6",
+"x     c #918F89",
+"y     c #5D5A56",
+"z     c #A0998F",
+"A     c #827B6F",
+"B     c #C0B4A2",
+"C     c #C2B7A5",
+"D     c #C1B6A4",
+"E     c #8A8174",
+"F     c #94918B",
+"G     c #C7C3BB",
+"H     c #AFAAA1",
+"I     c #938B7E",
+"J     c #646058",
+"K     c #D8D1C3",
+"L     c #ECE7DE",
+"M     c #EBE7DD",
+"N     c #E4DED0",
+"O     c #DED6C5",
+"P     c #57544D",
+"Q     c #202020",
+"R     c #7E7C77",
+"S     c #DFDCD4",
+"T     c #F0ECE4",
+"U     c #EDE9E0",
+"V     c #ECE8E1",
+"W     c #B6B2AB",
+"X     c #77736E",
+"Y     c #767067",
+"Z     c #A3998B",
+"`     c #BCB09F",
+" .    c #C3B7A6",
+"..    c #BFB3A1",
+"+.    c #C3B8A7",
+"@.    c #BFB4A2",
+"#.    c #BDB2A1",
+"$.    c #3E3B35",
+"%.    c #BBB4A6",
+"&.    c #A7A39C",
+"*.    c #ECE9E1",
+"=.    c #77736A",
+"-.    c #E7E1D5",
+";.    c #E3DDCE",
+">.    c #8F897F",
+",.    c #22201E",
+"'.    c #91908C",
+").    c #EFECE3",
+"!.    c #EBE7DE",
+"~.    c #878581",
+"{.    c #5B574F",
+"].    c #7F786C",
+"^.    c #8D867A",
+"/.    c #9C9994",
+"(.    c #98958F",
+"_.    c #837B6E",
+":.    c #C4B9A7",
+"<.    c #958B7E",
+"[.    c #736D62",
+"}.    c #4E4942",
+"|.    c #4C4842",
+"1.    c #383632",
+"2.    c #99968F",
+"3.    c #ECE8DE",
+"4.    c #7C7972",
+"5.    c #CCC6BB",
+"6.    c #E9E4D9",
+"7.    c #EDE8DF",
+"8.    c #E1D9C9",
+"9.    c #BFB8A9",
+"0.    c #1A1A1A",
+"a.    c #C3BFB8",
+"b.    c #CFCCC4",
+"c.    c #85827C",
+"d.    c #56514A",
+"e.    c #A69C8D",
+"f.    c #BFB3A2",
+"g.    c #C2B7A6",
+"h.    c #B4AA9A",
+"i.    c #757168",
+"j.    c #706D68",
+"k.    c #918E88",
+"l.    c #464441",
+"m.    c #97948E",
+"n.    c #C9C6BF",
+"o.    c #8C8A85",
+"p.    c #8E897F",
+"q.    c #999488",
+"r.    c #817E77",
+"s.    c #C1BEB7",
+"t.    c #807D75",
+"u.    c #8A8377",
+"v.    c #6E6A63",
+"w.    c #A8A49C",
+"x.    c #EAE4D9",
+"y.    c #E4DDCF",
+"z.    c #D8D0C0",
+"A.    c #AFA99C",
+"B.    c #848076",
+"C.    c #BFBBB4",
+"D.    c #B1AEA8",
+"E.    c #47443F",
+"F.    c #5C5851",
+"G.    c #686259",
+"H.    c #B0A595",
+"I.    c #B7AC9B",
+"J.    c #817A6F",
+"K.    c #7E7A70",
+"L.    c #AEA99D",
+"M.    c #9A9791",
+"N.    c #EEE9E1",
+"O.    c #E6E2DA",
+"P.    c #CCC8BF",
+"Q.    c #E3DCCE",
+"R.    c #86827A",
+"S.    c #C6C3BC",
+"T.    c #7C7974",
+"U.    c #4A4642",
+"V.    c #6E685F",
+"W.    c #89837A",
+"X.    c #7B7873",
+"Y.    c #9A9892",
+"Z.    c #827D73",
+"`.    c #56534C",
+" +    c #6A675E",
+".+    c #E2DBCC",
+"++    c #EDE9DF",
+"@+    c #DED8CC",
+"#+    c #DDD5C4",
+"$+    c #C4BDAE",
+"%+    c #6F6B62",
+"&+    c #312F2B",
+"*+    c #6D6960",
+"=+    c #A19B8F",
+"-+    c #E5E1DA",
+";+    c #7F7D79",
+">+    c #CFCBC3",
+",+    c #ACA9A2",
+"'+    c #B6B1A8",
+")+    c #B4B0AA",
+"!+    c #827F7A",
+"~+    c #444340",
+"{+    c #262524",
+"]+    c #C1BEB8",
+"^+    c #9A968D",
+"/+    c #242322",
+"(+    c #CEC7B7",
+"_+    c #DFD8C7",
+":+    c #E6E0D3",
+"<+    c #747067",
+"[+    c #D3CCBC",
+"}+    c #857F74",
+"|+    c #595856",
+"1+    c #CCC8C2",
+"2+    c #D4D1C9",
+"3+    c #ECE8DF",
+"4+    c #CFCBC4",
+"5+    c #93918C",
+"6+    c #2F2E2C",
+"7+    c #312F2C",
+"8+    c #969185",
+"9+    c #BAB3A5",
+"0+    c #B1AB9D",
+"a+    c #363532",
+"b+    c #E2DED5",
+"c+    c #676360",
+"d+    c #4C4B4A",
+"e+    c #767471",
+"f+    c #75736D",
+"g+    c #5B5956",
+"h+    c #928D81",
+"i+    c #E5DFD2",
+"j+    c #EEE9E0",
+"k+    c #EBE6DB",
+"l+    c #C0B9AB",
+"m+    c #A7A195",
+"n+    c #8D887E",
+"o+    c #C4BCAD",
+"p+    c #BCB8B1",
+"q+    c #D5D1C9",
+"r+    c #7A746D",
+"s+    c #AEABA4",
+"t+    c #B2AFA8",
+"u+    c #98948D",
+"v+    c #7D7A76",
+"w+    c #69655D",
+"x+    c #9B9589",
+"y+    c #A9A396",
+"z+    c #A7A49F",
+"A+    c #D8D2C9",
+"B+    c #948F83",
+"C+    c #454340",
+"D+    c #D7D3CC",
+"E+    c #63615E",
+"F+    c #141414",
+"G+    c #000000",
+"H+    c #53504A",
+"I+    c #EBE7DC",
+"J+    c #E4DDD0",
+"K+    c #898479",
+"L+    c #ADA79A",
+"M+    c #CBC3B4",
+"N+    c #89847A",
+"O+    c #CDC6B6",
+"P+    c #AAA59C",
+"Q+    c #9F9D98",
+"R+    c #E6E2D9",
+"S+    c #AFACA7",
+"T+    c #615F5C",
+"U+    c #201F1D",
+"V+    c #66625B",
+"W+    c #AEA89A",
+"X+    c #AEA89B",
+"Y+    c #B7B0A2",
+"Z+    c #070707",
+"`+    c #E0DED9",
+" @    c #CFC7B8",
+".@    c #6B6863",
+"+@    c #63625E",
+"@@    c #DBD3C3",
+"#@    c #534D46",
+"$@    c #807E7B",
+"%@    c #DDD9D1",
+"&@    c #36322E",
+"*@    c #4B4A49",
+"=@    c #6E6C67",
+"-@    c #E5DED1",
+";@    c #E9E4D8",
+">@    c #EFEAE2",
+",@    c #E2DCD0",
+"'@    c #8F8A7F",
+")@    c #999387",
+"!@    c #4E4B45",
+"~@    c #6B665E",
+"{@    c #47433D",
+"]@    c #D4CDC0",
+"^@    c #E8E3DA",
+"/@    c #1F1E1E",
+"(@    c #65615A",
+"_@    c #ADA699",
+":@    c #949494",
+"<@    c #BEBEBC",
+"[@    c #DAD2C2",
+"}@    c #7F7B74",
+"|@    c #4D4D4D",
+"1@    c #959084",
+"2@    c #DAD5C9",
+"3@    c #B9B1A2",
+"4@    c #3C3934",
+"5@    c #989693",
+"6@    c #B1ADA5",
+"7@    c #76746F",
+"8@    c #4C4A44",
+"9@    c #DCD4C3",
+"0@    c #E9E3D8",
+"a@    c #DCD8CE",
+"b@    c #A6A49E",
+"c@    c #9C9890",
+"d@    c #7B776D",
+"e@    c #55534E",
+"f@    c #B5B3AD",
+"g@    c #474440",
+"h@    c #D0C9B9",
+"i@    c #E7E2D7",
+"j@    c #65635D",
+"k@    c #4F4E4C",
+"l@    c #B7B1A3",
+"m@    c #B7B3A9",
+"n@    c #96948E",
+"o@    c #BCBBBB",
+"p@    c #BCB6A9",
+"q@    c #ABA6A1",
+"r@    c #8E8C87",
+"s@    c #161514",
+"t@    c #545350",
+"u@    c #B9B1A1",
+"v@    c #958F84",
+"w@    c #8C867B",
+"x@    c #81796E",
+"y@    c #BFB4A3",
+"z@    c #C6BBAA",
+"A@    c #5E5B53",
+"B@    c #96938D",
+"C@    c #696762",
+"D@    c #DFD7C7",
+"E@    c #C6C2B9",
+"F@    c #817C72",
+"G@    c #B3AC9F",
+"H@    c #B5AFA4",
+"I@    c #6C6964",
+"J@    c #DFD8C9",
+"K@    c #9C9C9B",
+"L@    c #716E6A",
+"M@    c #B8B1A3",
+"N@    c #2A2926",
+"O@    c #625F58",
+"P@    c #E0D8C9",
+"Q@    c #C1BAAB",
+"R@    c #252321",
+"S@    c #E1DDD5",
+"T@    c #7B7977",
+"U@    c #625E57",
+"V@    c #322F2A",
+"W@    c #C4B9A8",
+"X@    c #D1C7B6",
+"Y@    c #C1B5A4",
+"Z@    c #C8BEAC",
+"`@    c #9A9387",
+" #    c #2D2C28",
+".#    c #595752",
+"+#    c #A29D94",
+"@#    c #D5CEBD",
+"##    c #CBC4B4",
+"$#    c #DBD3C2",
+"%#    c #A09C94",
+"&#    c #C1C1C1",
+"*#    c #95938E",
+"=#    c #7F7A70",
+"-#    c #8B867C",
+";#    c #D6D0C4",
+">#    c #C9C2B3",
+",#    c #7C7B78",
+"'#    c #BEBBB5",
+")#    c #D1CABA",
+"!#    c #44423F",
+"~#    c #D6D2CA",
+"{#    c #3A3835",
+"]#    c #262421",
+"^#    c #33302C",
+"/#    c #69645B",
+"(#    c #8B8478",
+"_#    c #5F5951",
+":#    c #605C53",
+"<#    c #67635B",
+"[#    c #BFB8AA",
+"}#    c #928D82",
+"|#    c #B8B2A4",
+"1#    c #938F85",
+"2#    c #989287",
+"3#    c #89857C",
+"4#    c #706E6A",
+"5#    c #DED7C6",
+"6#    c #928F88",
+"7#    c #979797",
+"8#    c #B4AEA2",
+"9#    c #918C81",
+"0#    c #68645C",
+"a#    c #979286",
+"b#    c #4A4741",
+"c#    c #5E5D5A",
+"d#    c #B2AFAA",
+"e#    c #47453F",
+"f#    c #C2BBAC",
+"g#    c #B5AEA0",
+"h#    c #D4CDBC",
+"i#    c #CAC7C0",
+"j#    c #B5AEA1",
+"k#    c #CCC4B5",
+"l#    c #ACABA7",
+"m#    c #797979",
+"n#    c #757169",
+"o#    c #BDB6A7",
+"p#    c #68655D",
+"q#    c #A09B92",
+"r#    c #D1CABB",
+"s#    c #8D887D",
+"t#    c #80807F",
+"u#    c #C5BEAF",
+"v#    c #1E1D1B",
+"w#    c #A3A099",
+"x#    c #888681",
+"y#    c #6A6864",
+"z#    c #B3AEA3",
+"A#    c #4D4A44",
+"B#    c #D6CFBE",
+"C#    c #A29E95",
+"D#    c #C1BAAC",
+"E#    c #918C82",
+"F#    c #6D6961",
+"G#    c #B9B3A5",
+"H#    c #979084",
+"I#    c #3A3836",
+"J#    c #BDBBB7",
+"K#    c #C7C0B1",
+"L#    c #6C6860",
+"M#    c #D2CBBB",
+"N#    c #393836",
+"O#    c #66635D",
+"P#    c #A19D94",
+"Q#    c #656461",
+"R#    c #32302C",
+"S#    c #CCC5B5",
+"T#    c #DEDAD1",
+"U#    c #B1ACA3",
+"V#    c #7C7C7C",
+"W#    c #B5B4B1",
+"X#    c #5A5853",
+"Y#    c #4F4C46",
+"Z#    c #A09A8E",
+"`#    c #76726A",
+" $    c #88857F",
+".$    c #4B4843",
+"+$    c #DAD2C1",
+"@$    c #B4ADA0",
+"#$    c #B7B4AF",
+"$$    c #CCC9C2",
+"%$    c #282623",
+"&$    c #888378",
+"*$    c #262522",
+"=$    c #A8A194",
+"-$    c #9A9388",
+";$    c #BEB7A8",
+">$    c #E3DCCD",
+",$    c #D1CEC6",
+"'$    c #ACA699",
+")$    c #AFA99B",
+"!$    c #B2ADA2",
+"~$    c #A09D97",
+"{$    c #C0BCB5",
+"]$    c #B0A99C",
+"^$    c #7A776F",
+"/$    c #99958E",
+"($    c #8A8681",
+"_$    c #777068",
+":$    c #B3AB9D",
+"<$    c #131211",
+"[$    c #5D5A53",
+"}$    c #090908",
+"|$    c #8C877C",
+"1$    c #C7C1B4",
+"2$    c #D3CEC5",
+"3$    c #EAE5DA",
+"4$    c #83817D",
+"5$    c #C7C0B0",
+"6$    c #484743",
+"7$    c #C3BFB7",
+"8$    c #C7C1B3",
+"9$    c #9E998F",
+"0$    c #CCC9C1",
+"a$    c #C3C0B8",
+"b$    c #817E78",
+"c$    c #7F786E",
+"d$    c #AFA494",
+"e$    c #ABA396",
+"f$    c #474645",
+"g$    c #BCB9B3",
+"h$    c #9B9893",
+"i$    c #2B2926",
+"j$    c #070706",
+"k$    c #74716D",
+"l$    c #B7B4AD",
+"m$    c #484641",
+"n$    c #504D47",
+"o$    c #DBD6CC",
+"p$    c #65615B",
+"q$    c #DCD5C6",
+"r$    c #B3ADA1",
+"s$    c #A8A296",
+"t$    c #949086",
+"u$    c #999690",
+"v$    c #AAA6A0",
+"w$    c #6D675F",
+"x$    c #A09789",
+"y$    c #C2B6A5",
+"z$    c #6C6259",
+"A$    c #66645F",
+"B$    c #2D2D2D",
+"C$    c #64615B",
+"D$    c #2F2D2A",
+"E$    c #8B8781",
+"F$    c #64625D",
+"G$    c #0A0908",
+"H$    c #393733",
+"I$    c #C2BAAB",
+"J$    c #D9D5CD",
+"K$    c #9C978C",
+"L$    c #CFC8B8",
+"M$    c #9C968A",
+"N$    c #928D83",
+"O$    c #98958E",
+"P$    c #CBC8C0",
+"Q$    c #B1ADA7",
+"R$    c #8D8A84",
+"S$    c #878177",
+"T$    c #B4AA9B",
+"U$    c #B3A898",
+"V$    c #7A7368",
+"W$    c #706E6B",
+"X$    c #292826",
+"Y$    c #A9A499",
+"Z$    c #3F3E3C",
+"`$    c #1B1A18",
+" %    c #9F9C96",
+".%    c #2D2A27",
+"+%    c #C8C1B1",
+"@%    c #E6DFD2",
+"#%    c #C0BDB7",
+"$%    c #8C8982",
+"%%    c #C7C3BC",
+"&%    c #8E8B84",
+"*%    c #958E86",
+"=%    c #837B6F",
+"-%    c #AFA595",
+";%    c #80796E",
+">%    c #31302D",
+",%    c #8F8C87",
+"'%    c #74726E",
+")%    c #5E5C57",
+"!%    c #393430",
+"~%    c #413F3B",
+"{%    c #413C37",
+"]%    c #605E5A",
+"^%    c #22201D",
+"/%    c #0C0B0A",
+"(%    c #E9E4DA",
+"_%    c #D6CFC2",
+":%    c #7E766A",
+"<%    c #C0B4A3",
+"[%    c #C1B6A5",
+"}%    c #605B52",
+"|%    c #97938B",
+"1%    c #181817",
+"2%    c #0A0A0A",
+"3%    c #8D8981",
+"4%    c #787369",
+"5%    c #D4CFC6",
+"6%    c #DCD6C9",
+"7%    c #CAC6BC",
+"8%    c #A5A096",
+"9%    c #78756E",
+"0%    c #726E65",
+"a%    c #4A4742",
+"b%    c #605E59",
+"c%    c #363433",
+"d%    c #0B0A0A",
+"e%    c #BFB5A5",
+"f%    c #C3B8A6",
+"g%    c #6C6359",
+"h%    c #7C786E",
+"i%    c #46433D",
+"j%    c #55534F",
+"k%    c #BAB5AB",
+"l%    c #E1DACA",
+"m%    c #B1AA9C",
+"n%    c #928B80",
+"o%    c #ACA598",
+"p%    c #CCC5B8",
+"q%    c #E1DACB",
+"r%    c #CFC9BE",
+"s%    c #44413C",
+"t%    c #23221F",
+"u%    c #AFA89B",
+"v%    c #D5CCBB",
+"w%    c #BEB2A1",
+"x%    c #A59A8B",
+"y%    c #5C564D",
+"z%    c #0F0F0E",
+"A%    c #65625C",
+"B%    c #B8B4AE",
+"C%    c #AAA498",
+"D%    c #55514B",
+"E%    c #332F2A",
+"F%    c #47443E",
+"G%    c #252320",
+"H%    c #3A3833",
+"I%    c #6B665C",
+"J%    c #857D71",
+"K%    c #90887B",
+"L%    c #CBC1B0",
+"M%    c #CBC1AF",
+"N%    c #DED7CA",
+"O%    c #9B968A",
+"P%    c #59554E",
+"Q%    c #B5AB9C",
+"R%    c #7B7469",
+"S%    c #57524A",
+"T%    c #040303",
+"U%    c #2F2D29",
+"V%    c #BEBBB4",
+"W%    c #D2CEC3",
+"X%    c #1D1C1A",
+"Y%    c #292827",
+"Z%    c #1C1A18",
+"`%    c #090807",
+" &    c #181613",
+".&    c #807A6E",
+"+&    c #DCD5C7",
+"@&    c #B8B2A5",
+"#&    c #191815",
+"$&    c #B8B0A2",
+"%&    c #C9C1B2",
+"&&    c #6A6259",
+"*&    c #AEA393",
+"=&    c #625D54",
+"-&    c #010100",
+";&    c #353431",
+">&    c #76736C",
+",&    c #C8C5BD",
+"'&    c #979287",
+")&    c #3A3733",
+"!&    c #413E39",
+"~&    c #8A8680",
+"{&    c #BFB8AB",
+"]&    c #3A3631",
+"^&    c #494440",
+"/&    c #3C3731",
+"(&    c #28231F",
+"_&    c #181715",
+":&    c #040404",
+"<&    c #3D3933",
+"[&    c #B9B1A3",
+"}&    c #85827B",
+"|&    c #080807",
+"1&    c #645F57",
+"2&    c #8F897E",
+"3&    c #71675D",
+"4&    c #B5AB9A",
+"5&    c #766E63",
+"6&    c #38342F",
+"7&    c #0D0C0B",
+"8&    c #0D0B0A",
+"9&    c #33312D",
+"0&    c #D5CFC4",
+"a&    c #DBD4C5",
+"b&    c #534E48",
+"c&    c #030303",
+"d&    c #5E5D5E",
+"e&    c #535153",
+"f&    c #666460",
+"g&    c #3D3B39",
+"h&    c #79756B",
+"i&    c #43413B",
+"j&    c #B9B4A9",
+"k&    c #D5D0C6",
+"l&    c #CEC8BC",
+"m&    c #BDB6A9",
+"n&    c #97948F",
+"o&    c #D5CEC0",
+"p&    c #B2AC9E",
+"q&    c #ADA293",
+"r&    c #797166",
+"s&    c #151412",
+"t&    c #76736D",
+"u&    c #DBD4C8",
+"v&    c #D9D2C1",
+"w&    c #2E2B28",
+"x&    c #171615",
+"y&    c #454243",
+"z&    c #2C2B2A",
+"A&    c #68655E",
+"B&    c #807C75",
+"C&    c #BAB5AA",
+"D&    c #D0CABD",
+"E&    c #D9D1C0",
+"F&    c #E1DACD",
+"G&    c #DCD3C3",
+"H&    c #D0C7B7",
+"I&    c #D6CEBE",
+"J&    c #A8A299",
+"K&    c #54524D",
+"L&    c #0B0A09",
+"M&    c #5E5A53",
+"N&    c #9C9486",
+"O&    c #948C7E",
+"P&    c #544F47",
+"Q&    c #0D0C0A",
+"R&    c #DDD7CC",
+"S&    c #E4DFD3",
+"T&    c #AFAA9F",
+"U&    c #847F76",
+"V&    c #BFB7AB",
+"W&    c #E5DFD1",
+"X&    c #E8E3D7",
+"Y&    c #C6BBA9",
+"Z&    c #C8BDAC",
+"`&    c #B8AE9F",
+" *    c #756F65",
+".*    c #46413B",
+"+*    c #6A665D",
+"@*    c #B0AA9C",
+"#*    c #D7CFBF",
+"$*    c #E0D8C8",
+"%*    c #B8B2A7",
+"&*    c #5B5851",
+"**    c #272623",
+"=*    c #191513",
+"-*    c #413F3A",
+";*    c #4B4842",
+">*    c #87837B",
+",*    c #B7B2A9",
+"'*    c #A6A199",
+")*    c #E7E1D4",
+"!*    c #D7CEBD",
+"~*    c #D9D1C2",
+"{*    c #CDC4B3",
+"]*    c #B1A89A",
+"^*    c #837D73",
+"/*    c #534F48",
+"(*    c #373531",
+"_*    c #22211F",
+":*    c #C7BFB0",
+"<*    c #3F3D38",
+"[*    c #A8A295",
+"}*    c #BAB5A9",
+"|*    c #3B3935",
+"1*    c #706C63",
+"2*    c #91887C",
+"3*    c #C1B7A7",
+"4*    c #B7AD9D",
+"5*    c #69645C",
+"6*    c #74716B",
+"7*    c #A19D95",
+"8*    c #918B82",
+"9*    c #484640",
+"0*    c #636058",
+"a*    c #68635B",
+"b*    c #38332F",
+"c*    c #0E0C0B",
+"d*    c #837E73",
+"e*    c #34322E",
+"f*    c #050505",
+"g*    c #060606",
+"h*    c #060505",
+"i*    c #12100E",
+"j*    c #78746C",
+"k*    c #C5C0B5",
+"l*    c #AFABA1",
+"m*    c #44433F",
+"n*    c #100E0C",
+"o*    c #21201D",
+"p*    c #6C6963",
+"q*    c #D0CBBF",
+"r*    c #53504B",
+"s*    c #4E4B44",
+"t*    c #CCC5B6",
+"u*    c #72716C",
+"v*    c #6E6C66",
+"w*    c #43403B",
+"x*    c #B0AA9F",
+"y*    c #85817A",
+"z*    c #D5CFC3",
+"A*    c #8C887E",
+"B*    c #2D2C2A",
+"C*    c #2A2723",
+"D*    c #65635E",
+"E*    c #BCB7AC",
+"F*    c #66625A",
+"G*    c #7F796F",
+"H*    c #96928A",
+"I*    c #CCC7BE",
+"J*    c #B5B1A9",
+"K*    c #938F86",
+"L*    c #CCC8BE",
+"M*    c #1E1C1A",
+"N*    c #817D73",
+"O*    c #191715",
+"P*    c #726D64",
+"Q*    c #747069",
+"R*    c #E8E2D6",
+"S*    c #99958B",
+"T*    c #E5E0D3",
+"U*    c #7F7C73",
+"V*    c #666159",
+"W*    c #1A1917",
+"X*    c #131110",
+"Y*    c #726E66",
+"Z*    c #45433E",
+"`*    c #D9D1C1",
+" =    c #1E1B19",
+".=    c #CDC5B5",
+"+=    c #A7A194",
+"@=    c #242220",
+"#=    c #42403B",
+"$=    c #060605",
+"%=    c #484540",
+"                                                                                                    ",
+"                                                        . + @ # $ % & % * =                         ",
+"                                              - ; > , ' ) ! ~ { ] { ] { ~ ^ /                       ",
+"                                        ( _ : < ~ ^ ~ ^ [ } | 1 2 3 4 5 6 7 8 9                     ",
+"                                  0 a b ^ ^ ~ c d e f g h i j k l m n o p q r s                     ",
+"                            t u v { ] { w x y z A B C m D E F G H I J K L M N O P                   ",
+"                        Q R S T U V W X Y Z `  ...+.@.C #.$.%.&.*.=.O -.{ ;.O O >.                  ",
+"                    ,.'.^ { ).!.~.{.].#.^./.(._.:.<.[.}.|.1.O 2.3.4.5.6.] 7.-.8.9.                  ",
+"                  0.a.{ ^ b.c.d.e.f.g.h.i.j.c k.l.m.n.o.p.q.O r.s.t.u.v.w.x.y.O z.                  ",
+"                  A.B.C.D.9 E.F.G.H.I.J.K.L.] M.).N.] { O.P.Q.R.S.T.U.V.W.X.Y.R.Z.`.                ",
+"                 +O .+++@+O O #+$+%+&+*+=+p.-+;+{ ] ^ ~ ^ ^ ^ U >+,+'+)+!+~+{+]+^+                  ",
+"                /+(+_+U N.:+O O O O <+[+O }+|+1+^ ~ [ 2+^ ^ 3+4+5+@ 6+7+8+9+0+a+b+c+                ",
+"          d+e+f+g+h+i+j+k+j+:+O O l+m+n+O o+p+q+M.r+s+t+u+v+y w+x+y+8+z+A+O O B+C+D+E+              ",
+"        d+u F+G+H+#+;.I+^ ] J+O K+L+M+N+O O+P+Q+R+S+T+U+V+W+X+Y+Z+`+ @.@+@O O @@#@$@%@&@            ",
+"      *@=@G+    B+-@;@] >@{ ,@'@)@O M+!@~@{@]@^@/@(@_@O y.:@<@[@}@|@[@Y+1@2@O O 3@4@5@6@            ",
+"      7@        8@9@0@a@b@c@d@O O O e@f@g@h@O i@j@O O O h@_ k@l@O m@n@Q.H o@p@O O O &+q@r@          ",
+"    s@t@        G+u@v@w@x@y@z@O O A@B@C@(+O O D@E@F@O O O G@H@I@r J@K@L@M@N@O@P@O O Q@R@S@T@        ",
+"    U@<+          V@W@X@Y@Z@:.`@ #.#+#@#O O O O Q.1 ##O O $#%#&#*#$+=#-#;#>#,#'#)#O O K+!#~#{#      ",
+"      w+i.]#        ^#/#(#_#:#<#[#}#|#O O O O O O q 1#O O O $#2#3#4#5#6#7#8#9#0#a#O O O b#c#d#      ",
+"        e#f#          e#>#g#h#O O O O O O O O O O y.i#j#O O O k#l#m#n#o#p#q#r#s#t#5.O O u#v#w#x#    ",
+"        y#z#          A#B#O O O O O O O O O O O O O y.C#O+O O O D#E#F#G#H#I#J#K#T+L#M#O O Y+N#4+O#  ",
+"      P#Q#              R#S#O O O O O O O O O O O O O T#/ #+O O O U#V#W#9+X#Y#Z#`# $.$+$#+@$.@#$$$  ",
+"      %$&$                *$=$O O -$8+;$O O O O O O O >$,$'$O O O O 8@i.)$!$~${$L i+]$^$/$: ($_$:$G+",
+"      <$[$U@                }$|$1$s+2$=.O O O O O O O O 3$4$Q@O O O 5$6$7${ 3$8$9$u+0$a$b$c$d$@.e$G+",
+"    f$g$h$i$                j$k$l$m$n$9#O O O O O O O O 5#o$p$)#O O O q$r$s$t$u$b+v$w$x$n Y@Y@y$z$A$",
+"    B$C$D$                  E$F$G$H$I$9#O O O O O O O O O N J$K$L$M$N$O$P$Q$R$S$T$U$m D Y@D D Y@V$W$",
+"      X$Y$Z$              `$ %    .%+%w+O O O O O O O O O O @%#%$%%%0$&%*%=%-%D Y@D Y@D Y@D D Y@;%4#",
+"    >%,%'%)%      !%~%{%  R@]%      ^%/%S$[@O O O O O O O O D@(%_%&$:%d$Y@D D m y$<%C m D Y@Y@[%}%F$",
+"    |%1%  2%`$3%4%5%;@N 6%7%8%9%0%a%b%c%d%H+K#O O O O O O O O e% .f. .<%y$D m C @.f%@.C m D D U$g%  ",
+"    [$h%i%j%k%l%O m%k#n%o%p%-@++q%0@:+r%h%s%t%u%O O O O O O O v%..:.f.g.m D y$B f%w%+.@.C x%y%z%    ",
+"      A%B%C%l%$+D%E%F%G%H%H%I%J%K%L%M%N%;.y.O%<$P%5$O O O O +$Q%+.w%f%B y$D m g.f.:...R%S%T%G+      ",
+"    U%V%W%z.s#X%Y%Z%G+G+G+G+G+G+j$`% &.&+&3$N @&#&v#$&O O O %&&&@.f%@.C m D y$<%*&=&}$-&            ",
+"  ;&>&,&'&)&!&Q ~&{&]&G+      ^&/&(&_&:&<&[&:+D@}&G+|&1&z.O 2&3&C <%y$m D 4&5&6&7&8&                ",
+"  9&0&a&b&c&d&e&f&g&h&Z%i&a+j&k&l&>+m&n&>%P%L%O o&G+  G+^#p&h%{.Y@D q&r&6&s&G+                      ",
+"  t&u&v&w&x&y&z&A&B&C&D&E&8 F&G&H&I&y.-.3$J&b#O K&G+      L&M&N&O&P&Q&G+                            ",
+"n$R&S&T&U&u#V&]@W&X&;.+$Y&Z&`& *.*+*@*#*$*%*&*=#**G+        =*G+G+                                  ",
+"-*;*>*,*'*)*!*-@~*{*]*^*/*(*_*H%M$:*<*U@[*#+}***G+                                                  ",
+"  |*1*=$2*3*4*5*.$G+6*7*8*8&v#9*0*a*H+b*c*M@+$d*e*                                                  ",
+"      f*g*h*i*    U+-#E#N j*G+G+            k*l*m*n*                                                ",
+"                    o*u%p*q*r*G+          s*t*u*v*G+                                                ",
+"                      w*x*y*z*A*B*C*      D*E*[*}$G+                                                ",
+"                        L#F*G*H*I*J*p@K*L*M#M*N*O*                                                  ",
+"                          b#P*(+Q*R*S*T*U*l+1.V*W*                                                  ",
+"                            X*Y*Z*`* =.=X%+=@=G+                                                    ",
+"                                  #=$=%=G+                                                          "};
diff --git a/pixmaps/mic_active.png b/pixmaps/mic_active.png
new file mode 100644 (file)
index 0000000..6625269
Binary files /dev/null and b/pixmaps/mic_active.png differ
diff --git a/pixmaps/mic_muted.png b/pixmaps/mic_muted.png
new file mode 100644 (file)
index 0000000..f813691
Binary files /dev/null and b/pixmaps/mic_muted.png differ
diff --git a/pixmaps/red.png b/pixmaps/red.png
new file mode 100644 (file)
index 0000000..e6136b3
Binary files /dev/null and b/pixmaps/red.png differ
diff --git a/pixmaps/sip-away.png b/pixmaps/sip-away.png
new file mode 100644 (file)
index 0000000..ba7580f
Binary files /dev/null and b/pixmaps/sip-away.png differ
diff --git a/pixmaps/sip-bifm.png b/pixmaps/sip-bifm.png
new file mode 100644 (file)
index 0000000..898a18a
Binary files /dev/null and b/pixmaps/sip-bifm.png differ
diff --git a/pixmaps/sip-busy.png b/pixmaps/sip-busy.png
new file mode 100644 (file)
index 0000000..550e10a
Binary files /dev/null and b/pixmaps/sip-busy.png differ
diff --git a/pixmaps/sip-closed.png b/pixmaps/sip-closed.png
new file mode 100644 (file)
index 0000000..6bbe083
Binary files /dev/null and b/pixmaps/sip-closed.png differ
diff --git a/pixmaps/sip-online.png b/pixmaps/sip-online.png
new file mode 100644 (file)
index 0000000..a6656ec
Binary files /dev/null and b/pixmaps/sip-online.png differ
diff --git a/pixmaps/sip-otl.png b/pixmaps/sip-otl.png
new file mode 100644 (file)
index 0000000..cc9023b
Binary files /dev/null and b/pixmaps/sip-otl.png differ
diff --git a/pixmaps/sip-otp.png b/pixmaps/sip-otp.png
new file mode 100644 (file)
index 0000000..0df6f91
Binary files /dev/null and b/pixmaps/sip-otp.png differ
diff --git a/pixmaps/sip-wfa.png b/pixmaps/sip-wfa.png
new file mode 100644 (file)
index 0000000..d6fe73b
Binary files /dev/null and b/pixmaps/sip-wfa.png differ
diff --git a/po/.gitignore b/po/.gitignore
new file mode 100644 (file)
index 0000000..5af5323
--- /dev/null
@@ -0,0 +1,7 @@
+.intltool-merge-cache
+Makefile
+Makefile.in
+Makefile.in.in
+POTFILES
+*.gmo
+stamp-*
diff --git a/po/ChangeLog b/po/ChangeLog
new file mode 100644 (file)
index 0000000..63269d9
--- /dev/null
@@ -0,0 +1,97 @@
+2007-01-17  gettextize  <bug-gnu-gettext@gnu.org>
+
+       * Makefile.in.in: Upgrade to gettext-0.16.1.
+       * cat-id-tbl.c: Remove file.
+
+2006-07-20  gettextize  <bug-gnu-gettext@gnu.org>
+
+       * Makefile.in.in: Upgrade to gettext-0.14.6.
+       * boldquot.sed: New file, from gettext-0.14.6.
+       * en@boldquot.header: New file, from gettext-0.14.6.
+       * en@quot.header: New file, from gettext-0.14.6.
+       * insert-header.sin: New file, from gettext-0.14.6.
+       * quot.sed: New file, from gettext-0.14.6.
+       * remove-potcdate.sin: New file, from gettext-0.14.6.
+       * Rules-quot: New file, from gettext-0.14.6.
+       * cat-id-tbl.c: Remove file.
+
+2002-10-15  gettextize  <bug-gnu-gettext@gnu.org>
+
+       * cat-id-tbl.c: Remove file.
+       * stamp-cat-id: Remove file.
+
+2002-10-08  gettextize  <bug-gnu-gettext@gnu.org>
+
+       * cat-id-tbl.c: Remove file.
+       * stamp-cat-id: Remove file.
+
+2002-10-08  gettextize  <bug-gnu-gettext@gnu.org>
+
+       * boldquot.sed: New file, from gettext-0.11.5.
+       * en@boldquot.header: New file, from gettext-0.11.5.
+       * en@quot.header: New file, from gettext-0.11.5.
+       * insert-header.sin: New file, from gettext-0.11.5.
+       * quot.sed: New file, from gettext-0.11.5.
+       * remove-potcdate.sin: New file, from gettext-0.11.5.
+       * Rules-quot: New file, from gettext-0.11.5.
+       * cat-id-tbl.c: Remove file.
+       * stamp-cat-id: Remove file.
+
+2002-10-04  gettextize  <bug-gnu-gettext@gnu.org>
+
+       * cat-id-tbl.c: Remove file.
+       * stamp-cat-id: Remove file.
+
+2002-10-04  gettextize  <bug-gnu-gettext@gnu.org>
+
+       * Makefile.in.in: Upgrade to gettext-0.11.5.
+
+2002-10-04  gettextize  <bug-gnu-gettext@gnu.org>
+
+       * Makefile.in.in: New file, from gettext-0.11.5.
+
+2002-10-01  gettextize  <bug-gnu-gettext@gnu.org>
+
+       * Makefile.in.in: Upgrade to gettext-0.11.5.
+       * boldquot.sed: New file, from gettext-0.11.5.
+       * en@boldquot.header: New file, from gettext-0.11.5.
+       * en@quot.header: New file, from gettext-0.11.5.
+       * insert-header.sin: New file, from gettext-0.11.5.
+       * quot.sed: New file, from gettext-0.11.5.
+       * remove-potcdate.sin: New file, from gettext-0.11.5.
+       * Rules-quot: New file, from gettext-0.11.5.
+       * cat-id-tbl.c: Remove file.
+       * stamp-cat-id: Remove file.
+
+2002-08-04  gettextize  <bug-gnu-utils@gnu.org>
+
+       * Makefile.in.in: Upgrade to gettext-0.10.40.
+
+2002-08-04  gettextize  <bug-gnu-utils@gnu.org>
+
+       * Makefile.in.in: Upgrade to gettext-0.10.40.
+       * cat-id-tbl.c: Remove file.
+       * stamp-cat-id: Remove file.
+
+2002-07-16  gettextize  <bug-gnu-utils@gnu.org>
+
+       * Makefile.in.in: Upgrade to gettext-0.10.40.
+       * cat-id-tbl.c: Remove file.
+       * stamp-cat-id: Remove file.
+
+2002-02-16  gettextize  <bug-gnu-utils@gnu.org>
+
+       * Makefile.in.in: Upgrade to gettext-0.10.40.
+       * cat-id-tbl.c: Remove file.
+       * stamp-cat-id: Remove file.
+
+2002-02-10  gettextize  <bug-gnu-utils@gnu.org>
+
+       * Makefile.in.in: Upgrade to gettext-0.10.40.
+
+2002-02-10  gettextize  <bug-gnu-utils@gnu.org>
+
+       * Makefile.in.in: Upgrade to gettext-0.10.40.
+       * cat-id-tbl.c: Remove file.
+       * stamp-cat-id: Remove file.
+
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
new file mode 100644 (file)
index 0000000..c7e8302
--- /dev/null
@@ -0,0 +1,217 @@
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+# Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns@gmail.com>
+#
+# This file may be copied and used freely without restrictions.  It may
+# be used in projects which are not available under a GNU Public License,
+# but which still want to provide support for the GNU gettext functionality.
+#
+# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
+#   instead of PACKAGE and to look for po2tbl in ./ not in intl/
+#
+# - Modified by jacob berkman <jacob@ximian.com> to install
+#   Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
+#
+# - Modified by Rodney Dawes <dobey.pwns@gmail.com> for use with intltool
+#
+# We have the following line for use by intltoolize:
+# INTLTOOL_MAKEFILE
+
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = @top_builddir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = @datadir@
+datarootdir = @datarootdir@
+libdir = @libdir@
+DATADIRNAME = @DATADIRNAME@
+itlocaledir = $(prefix)/$(DATADIRNAME)/locale
+subdir = po
+install_sh = @install_sh@
+# Automake >= 1.8 provides @mkdir_p@.
+# Until it can be supposed, use the safe fallback:
+mkdir_p = $(install_sh) -d
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+GMSGFMT = @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = @XGETTEXT@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
+GENPOT   = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
+
+ALL_LINGUAS = @ALL_LINGUAS@
+
+PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
+
+USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep '^$$lang$$' $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep '^$$lang$$'`"; then printf "$$lang "; fi; done; fi)
+
+USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
+
+POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
+
+DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
+EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS
+
+POTFILES = \
+# This comment gets stripped out
+
+CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
+
+.SUFFIXES:
+.SUFFIXES: .po .pox .gmo .mo .msg .cat
+
+.po.pox:
+       $(MAKE) $(GETTEXT_PACKAGE).pot
+       $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
+
+.po.mo:
+       $(MSGFMT) -o $@ $<
+
+.po.gmo:
+       file=`echo $* | sed 's,.*/,,'`.gmo \
+         && rm -f $$file && $(GMSGFMT) -o $$file $<
+
+.po.cat:
+       sed -f ../intl/po2msg.sed < $< > $*.msg \
+         && rm -f $@ && gencat $@ $*.msg
+
+
+all: all-@USE_NLS@
+
+all-yes: $(CATALOGS)
+all-no:
+
+$(GETTEXT_PACKAGE).pot: $(POTFILES)
+       $(GENPOT)
+
+install: install-data
+install-data: install-data-@USE_NLS@
+install-data-no: all
+install-data-yes: all
+       linguas="$(USE_LINGUAS)"; \
+       for lang in $$linguas; do \
+         dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
+         $(mkdir_p) $$dir; \
+         if test -r $$lang.gmo; then \
+           $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+           echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
+         else \
+           $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+           echo "installing $(srcdir)/$$lang.gmo as" \
+                "$$dir/$(GETTEXT_PACKAGE).mo"; \
+         fi; \
+         if test -r $$lang.gmo.m; then \
+           $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
+           echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
+         else \
+           if test -r $(srcdir)/$$lang.gmo.m ; then \
+             $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
+               $$dir/$(GETTEXT_PACKAGE).mo.m; \
+             echo "installing $(srcdir)/$$lang.gmo.m as" \
+                  "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
+           else \
+             true; \
+           fi; \
+         fi; \
+       done
+
+# Empty stubs to satisfy archaic automake needs
+dvi info tags TAGS ID:
+
+# Define this as empty until I found a useful application.
+install-exec installcheck:
+
+uninstall:
+       linguas="$(USE_LINGUAS)"; \
+       for lang in $$linguas; do \
+         rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
+         rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
+       done
+
+check: all $(GETTEXT_PACKAGE).pot
+       rm -f missing notexist
+       srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
+       if [ -r missing -o -r notexist ]; then \
+         exit 1; \
+       fi
+
+mostlyclean:
+       rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
+       rm -f .intltool-merge-cache
+
+clean: mostlyclean
+
+distclean: clean
+       rm -f Makefile Makefile.in POTFILES stamp-it
+       rm -f *.mo *.msg *.cat *.cat.m *.gmo
+
+maintainer-clean: distclean
+       @echo "This command is intended for maintainers to use;"
+       @echo "it deletes files that may require special tools to rebuild."
+       rm -f Makefile.in.in
+
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: $(DISTFILES)
+       dists="$(DISTFILES)"; \
+       extra_dists="$(EXTRA_DISTFILES)"; \
+       for file in $$extra_dists; do \
+         test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
+       done; \
+       for file in $$dists; do \
+         test -f $$file || file="$(srcdir)/$$file"; \
+         ln $$file $(distdir) 2> /dev/null \
+           || cp -p $$file $(distdir); \
+       done
+
+update-po: Makefile
+       $(MAKE) $(GETTEXT_PACKAGE).pot
+       tmpdir=`pwd`; \
+       linguas="$(USE_LINGUAS)"; \
+       for lang in $$linguas; do \
+         echo "$$lang:"; \
+         result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
+         if $$result; then \
+           if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+             rm -f $$tmpdir/$$lang.new.po; \
+            else \
+             if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+               :; \
+             else \
+               echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+               rm -f $$tmpdir/$$lang.new.po; \
+               exit 1; \
+             fi; \
+           fi; \
+         else \
+           echo "msgmerge for $$lang.gmo failed!"; \
+           rm -f $$tmpdir/$$lang.new.po; \
+         fi; \
+       done
+
+Makefile POTFILES: stamp-it
+       @if test ! -f $@; then \
+         rm -f stamp-it; \
+         $(MAKE) stamp-it; \
+       fi
+
+stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
+       cd $(top_builddir) \
+         && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
+              $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/po/Makevars b/po/Makevars
new file mode 100644 (file)
index 0000000..32692ab
--- /dev/null
@@ -0,0 +1,41 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
+# package.  (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.)  Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright.  The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+#   in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+#   understood.
+# - Strings which make invalid assumptions about notation of date, time or
+#   money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS =
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used.  It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
diff --git a/po/Makevars.template b/po/Makevars.template
new file mode 100644 (file)
index 0000000..32692ab
--- /dev/null
@@ -0,0 +1,41 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
+# package.  (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.)  Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright.  The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+#   in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+#   understood.
+# - Strings which make invalid assumptions about notation of date, time or
+#   money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS =
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used.  It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644 (file)
index 0000000..09fc22e
--- /dev/null
@@ -0,0 +1,71 @@
+# List of source files containing translatable strings.
+gtk-glade/calllogs.c
+gtk-glade/logging.c
+gtk-glade/support.c
+gtk-glade/chat.c
+gtk-glade/main.c
+gtk-glade/friendlist.c
+gtk-glade/propertybox.c
+gtk-glade/update.c
+gtk-glade/buddylookup.c
+gtk-glade/setupwizard.c
+gtk-glade/incall_view.c
+gtk-glade/loginframe.c
+gtk-glade/main.glade
+gtk-glade/about.glade
+gtk-glade/contact.glade
+gtk-glade/log.glade
+gtk-glade/password.glade
+gtk-glade/call_logs.glade
+gtk-glade/main.glade
+gtk-glade/sip_account.glade
+gtk-glade/chatroom.glade
+gtk-glade/incoming_call.glade
+gtk-glade/parameters.glade
+gtk-glade/buddylookup.glade
+gtk-glade/waiting.glade
+coreapi/linphonecore.c
+coreapi/misc.c
+coreapi/exevents.c
+coreapi/presence.c
+coreapi/friend.c
+coreapi/proxy.c
+mediastreamer2/src/alaw.c
+mediastreamer2/src/alsa.c
+mediastreamer2/src/aqsnd.c
+mediastreamer2/src/dtmfgen.c
+mediastreamer2/src/gsm.c
+mediastreamer2/src/macsnd.c
+mediastreamer2/src/msconf.c
+mediastreamer2/src/msfileplayer.c
+mediastreamer2/src/msfilerec.c
+mediastreamer2/src/msfilerec_win.c
+mediastreamer2/src/msjoin.c
+mediastreamer2/src/msresample.c
+mediastreamer2/src/msrtp.c
+mediastreamer2/src/msspeex.c
+mediastreamer2/src/msvolume.c
+mediastreamer2/src/msv4l.c
+mediastreamer2/src/msv4l2.c
+mediastreamer2/src/msv4m.m
+mediastreamer2/src/nowebcam.c
+mediastreamer2/src/oss.c
+mediastreamer2/src/pixconv.c
+mediastreamer2/src/sizeconv.c
+mediastreamer2/src/speexec.c
+mediastreamer2/src/tee.c
+mediastreamer2/src/theora.c
+mediastreamer2/src/ulaw.c
+mediastreamer2/src/videodec.c
+mediastreamer2/src/videoenc.c
+mediastreamer2/src/videoout.c
+mediastreamer2/src/wincevideods.c
+mediastreamer2/src/winvideo.c
+mediastreamer2/src/winvideods.c
+mediastreamer2/src/winvideo2.c
+mediastreamer2/src/ice.c
+mediastreamer2/src/void.c
+mediastreamer2/src/equalizer.c
+mediastreamer2/src/msdscap-mingw.cc
+
+
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
new file mode 100755 (executable)
index 0000000..8b13789
--- /dev/null
@@ -0,0 +1 @@
+
diff --git a/po/Rules-quot b/po/Rules-quot
new file mode 100644 (file)
index 0000000..9c2a995
--- /dev/null
@@ -0,0 +1,47 @@
+# Special Makefile rules for English message catalogs with quotation marks.
+
+DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
+
+.SUFFIXES: .insert-header .po-update-en
+
+en@quot.po-create:
+       $(MAKE) en@quot.po-update
+en@boldquot.po-create:
+       $(MAKE) en@boldquot.po-update
+
+en@quot.po-update: en@quot.po-update-en
+en@boldquot.po-update: en@boldquot.po-update-en
+
+.insert-header.po-update-en:
+       @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
+       if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
+       tmpdir=`pwd`; \
+       echo "$$lang:"; \
+       ll=`echo $$lang | sed -e 's/@.*//'`; \
+       LC_ALL=C; export LC_ALL; \
+       cd $(srcdir); \
+       if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
+         if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+           rm -f $$tmpdir/$$lang.new.po; \
+         else \
+           if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+             :; \
+           else \
+             echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+             exit 1; \
+           fi; \
+         fi; \
+       else \
+         echo "creation of $$lang.po failed!" 1>&2; \
+         rm -f $$tmpdir/$$lang.new.po; \
+       fi
+
+en@quot.insert-header: insert-header.sin
+       sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
+
+en@boldquot.insert-header: insert-header.sin
+       sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
+
+mostlyclean: mostlyclean-quot
+mostlyclean-quot:
+       rm -f *.insert-header
diff --git a/po/boldquot.sed b/po/boldquot.sed
new file mode 100644 (file)
index 0000000..4b937aa
--- /dev/null
@@ -0,0 +1,10 @@
+s/"\([^"]*\)"/“\1”/g
+s/`\([^`']*\)'/‘\1’/g
+s/ '\([^`']*\)' / ‘\1’ /g
+s/ '\([^`']*\)'$/ ‘\1’/g
+s/^'\([^`']*\)' /‘\1’ /g
+s/“”/""/g
+s/“/“\e[1m/g
+s/”/\e[0m”/g
+s/‘/‘\e[1m/g
+s/’/\e[0m’/g
diff --git a/po/cat-id-tbl.c b/po/cat-id-tbl.c
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/po/cs.po b/po/cs.po
new file mode 100644 (file)
index 0000000..1329052
--- /dev/null
+++ b/po/cs.po
@@ -0,0 +1,2066 @@
+# translation of linphone.po to cs_CZ
+# This file is distributed under the same license as the linphone package.
+# Copyright (C) 2009 Simon Morlat (msgids)
+# Klara Cihlarova <koty@seznam.cz>, 2005.
+# Petr Pisar <petr.pisar@atlas.cz>, 2006, 2007, 2008, 2009.
+#
+# XXX: Don't translate gtk-* messages. They will be replaced from GTK+
+# catalogue.
+msgid ""
+msgstr ""
+"Project-Id-Version: linphone-3.2.0-r659\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-10-16 15:24+0200\n"
+"PO-Revision-Date: 2009-09-21 21:44+0200\n"
+"Last-Translator: Petr Pisar <petr.pisar@atlas.cz>\n"
+"Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
+
+#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
+#: ../gtk-glade/support.c:102
+#, c-format
+msgid "Couldn't find pixmap file: %s"
+msgstr "Nelze najít soubor s obrázkem: %s"
+
+#: ../gtk-glade/chat.c:27
+#, c-format
+msgid "Chat with %s"
+msgstr "Diskuze s %s"
+
+#: ../gtk-glade/main.c:90
+msgid "log to stdout some debug information while running."
+msgstr "za běhu vypisovat některé ladicí informace na standardní výstup."
+
+#: ../gtk-glade/main.c:97
+msgid "Start only in the system tray, do not show the main interface."
+msgstr ""
+
+#: ../gtk-glade/main.c:104
+msgid "address to call right now"
+msgstr "zavolat právě teď na tuto adresu"
+
+#: ../gtk-glade/main.c:111
+msgid "if set automatically answer incoming calls"
+msgstr "je-li nastaveno, automaticky zvedne příchozí hovor"
+
+#: ../gtk-glade/main.c:119
+msgid ""
+"Specifiy a working directory (should be the base of the installation, eg: c:"
+"\\Program Files\\Linphone)"
+msgstr ""
+
+#: ../gtk-glade/main.c:675
+#, c-format
+msgid "Incoming call from %s"
+msgstr "Příchozí hovor od %s"
+
+#: ../gtk-glade/main.c:707
+#, c-format
+msgid ""
+"%s would like to add you to his contact list.\n"
+"Would you allow him to see your presence status or add him to your contact "
+"list ?\n"
+"If you answer no, this person will be temporarily blacklisted."
+msgstr ""
+"%s si vás chce přidat do svého adresáře.\n"
+"Dovolíte mu, aby viděl váš stav přítomnosti, nebo si ho také chcete přidat "
+"do svého adresáře?\n"
+"Odpovíte-li ne, tato osobo bude dočasně blokována."
+
+#: ../gtk-glade/main.c:777
+#, fuzzy, c-format
+msgid ""
+"Please enter your password for username <i>%s</i>\n"
+" at domain <i>%s</i>:"
+msgstr "Prosím, zadejte svoje heslo pro doménu %s:"
+
+#: ../gtk-glade/main.c:871
+msgid "Website link"
+msgstr ""
+
+#: ../gtk-glade/main.c:907
+msgid "Linphone - a video internet phone"
+msgstr "Lipnhone – internetový videofon"
+
+#: ../gtk-glade/main.c:926
+#, c-format
+msgid "%s (Default)"
+msgstr "%s (Výchozí)"
+
+#: ../gtk-glade/main.c:1168
+msgid "A free SIP video-phone"
+msgstr "Volný SIP videofon"
+
+#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
+#: ../gtk-glade/contact.glade.h:3
+msgid "Name"
+msgstr "Jméno"
+
+#: ../gtk-glade/friendlist.c:212
+msgid "Presence status"
+msgstr "Stav"
+
+#: ../gtk-glade/friendlist.c:243
+#, c-format
+msgid "Search in %s directory"
+msgstr "Hledat v adresáři %s"
+
+#: ../gtk-glade/friendlist.c:432
+msgid "Invalid sip contact !"
+msgstr "Neplatný sipový kontakt!"
+
+#: ../gtk-glade/friendlist.c:474
+#, c-format
+msgid "Call %s"
+msgstr "Volat komu: %s"
+
+#: ../gtk-glade/friendlist.c:475
+#, c-format
+msgid "Send text to %s"
+msgstr "Poslat text komu: %s"
+
+#: ../gtk-glade/friendlist.c:476
+#, c-format
+msgid "Edit contact '%s'"
+msgstr "Upravit kontakt „%s“"
+
+#: ../gtk-glade/friendlist.c:477
+#, c-format
+msgid "Delete contact '%s'"
+msgstr "Odstranit kontakt „%s“"
+
+#: ../gtk-glade/friendlist.c:519
+#, c-format
+msgid "Add new contact from %s directory"
+msgstr "Přidat nový kontakt z adresáře %s"
+
+#: ../gtk-glade/propertybox.c:251
+msgid "Rate (Hz)"
+msgstr "Rychlost (Hz)"
+
+#: ../gtk-glade/propertybox.c:257
+msgid "Status"
+msgstr "Stav"
+
+#: ../gtk-glade/propertybox.c:263
+msgid "Min bitrate (kbit/s)"
+msgstr "Min. rychlost (kbit/s)"
+
+#: ../gtk-glade/propertybox.c:269
+msgid "Parameters"
+msgstr "Parametry"
+
+#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
+msgid "Enabled"
+msgstr "Povoleno"
+
+#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
+msgid "Disabled"
+msgstr "Zakázáno"
+
+#: ../gtk-glade/propertybox.c:480
+msgid "Account"
+msgstr "Účet"
+
+#: ../gtk-glade/propertybox.c:620
+msgid "English"
+msgstr "angličtina"
+
+#: ../gtk-glade/propertybox.c:621
+msgid "French"
+msgstr "francouzština"
+
+#: ../gtk-glade/propertybox.c:622
+msgid "Swedish"
+msgstr "švédština"
+
+#: ../gtk-glade/propertybox.c:623
+msgid "Italian"
+msgstr "italština"
+
+#: ../gtk-glade/propertybox.c:624
+msgid "Spanish"
+msgstr "španělština"
+
+#: ../gtk-glade/propertybox.c:625
+msgid "Brazilian Portugese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:626
+msgid "Polish"
+msgstr "polština"
+
+#: ../gtk-glade/propertybox.c:627
+msgid "German"
+msgstr "němčina"
+
+#: ../gtk-glade/propertybox.c:628
+msgid "Russian"
+msgstr "ruština"
+
+#: ../gtk-glade/propertybox.c:629
+msgid "Japanese"
+msgstr "japonština"
+
+#: ../gtk-glade/propertybox.c:630
+msgid "Dutch"
+msgstr "dánština"
+
+#: ../gtk-glade/propertybox.c:631
+msgid "Hungarian"
+msgstr "maďarština"
+
+#: ../gtk-glade/propertybox.c:632
+msgid "Czech"
+msgstr "čeština"
+
+#: ../gtk-glade/propertybox.c:633
+msgid "Chinese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:690
+msgid ""
+"You need to restart linphone for the new language selection to take effect."
+msgstr "Aby se projevil výběr nového jazyka, je nutné znovu spustit linphone."
+
+#: ../gtk-glade/update.c:80
+#, c-format
+msgid ""
+"A more recent version is availalble from %s.\n"
+"Would you like to open a browser to download it ?"
+msgstr ""
+"Na %s je dostupná novější verze.\n"
+"Přejete si otevřít prohlížeč, abyste si ji mohli stáhnout?"
+
+#: ../gtk-glade/update.c:91
+msgid "You are running the lastest version."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:66
+msgid "Firstname, Lastname"
+msgstr "První jméno, Poslední jméno"
+
+#: ../gtk-glade/buddylookup.c:73
+msgid "SIP address"
+msgstr "SIP adresa"
+
+#: ../gtk-glade/buddylookup.c:121
+msgid "Error communicating with server."
+msgstr "Chyba komunikace se serverem."
+
+#: ../gtk-glade/buddylookup.c:125
+msgid "Connecting..."
+msgstr "Připojuje se…"
+
+#: ../gtk-glade/buddylookup.c:129
+msgid "Connected"
+msgstr "Připojeno"
+
+#: ../gtk-glade/buddylookup.c:133
+msgid "Receiving data..."
+msgstr "Přijímají se data…"
+
+#: ../gtk-glade/buddylookup.c:141
+#, c-format
+msgid "Found %i contact"
+msgid_plural "Found %i contacts"
+msgstr[0] "Nalezen %i kontakt"
+msgstr[1] "Nalezeny %i kontakty"
+msgstr[2] "Nalezeno %i kontaktů"
+
+#: ../gtk-glade/setupwizard.c:25
+msgid ""
+"Welcome !\n"
+"This assistant will help you to use a SIP account for your calls."
+msgstr ""
+"Vítejte!\n"
+"Tento průvodce vám pomůže používat sipový účet při vašich hovorech."
+
+#: ../gtk-glade/setupwizard.c:34
+msgid "Create an account by choosing a username"
+msgstr "Vytvořit účet vybráním uživatelského jména"
+
+#: ../gtk-glade/setupwizard.c:35
+msgid "I have already an account and just want to use it"
+msgstr "Účet již mám a chci jej použít"
+
+#: ../gtk-glade/setupwizard.c:53
+msgid "Please choose a username:"
+msgstr "Prosím, vyberte si uživatelské jméno:"
+
+#: ../gtk-glade/setupwizard.c:54
+msgid "Username:"
+msgstr "Uživatelské jméno:"
+
+#: ../gtk-glade/setupwizard.c:92
+#, c-format
+msgid "Checking if '%s' is available..."
+msgstr "Zjišťuji, zda-li je „%s“ přípustné…"
+
+#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
+msgid "Please wait..."
+msgstr "Prosím, čekejte…"
+
+#: ../gtk-glade/setupwizard.c:101
+msgid "Sorry this username already exists. Please try a new one."
+msgstr "Je nám líto, ale toto jméno již existuje. Prosím, zvolte jiné."
+
+#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
+msgid "Ok !"
+msgstr "V pořádku!"
+
+#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
+msgid "Communication problem, please try again later."
+msgstr "Chyba při komunikaci. Prosím, zkuste to později."
+
+#: ../gtk-glade/setupwizard.c:134
+msgid "Thank you. Your account is now configured and ready for use."
+msgstr "Děkujeme vám. Váš účet je nyní nastaven a připraven k použití."
+
+#: ../gtk-glade/setupwizard.c:228
+msgid "Welcome to the account setup assistant"
+msgstr "Vítejte v průvodci nastavení účtu"
+
+#: ../gtk-glade/setupwizard.c:232
+msgid "Account setup assistant"
+msgstr "Průvodce nastavením účtu"
+
+#: ../gtk-glade/setupwizard.c:236
+msgid "Choosing a username"
+msgstr "Výběr uživatelského jména"
+
+#: ../gtk-glade/setupwizard.c:240
+msgid "Verifying"
+msgstr "Ověřování"
+
+#: ../gtk-glade/setupwizard.c:244
+msgid "Confirmation"
+msgstr "Potvrzení"
+
+#: ../gtk-glade/setupwizard.c:249
+msgid "Creating your account"
+msgstr "Vytváření účtu"
+
+#: ../gtk-glade/setupwizard.c:253
+msgid "Now ready !"
+msgstr "Připraveno!"
+
+#: ../gtk-glade/incall_view.c:98
+msgid "<b>Calling...</b>"
+msgstr "<b>Volá se…</b>"
+
+#: ../gtk-glade/incall_view.c:122
+msgid "<b>In call with</b>"
+msgstr "<b>Hovor s</b>"
+
+#: ../gtk-glade/incall_view.c:124
+msgid "00::00::00"
+msgstr "00:00:00"
+
+#: ../gtk-glade/incall_view.c:140
+#, c-format
+msgid "%02i::%02i::%02i"
+msgstr "%02i:%02i:%02i"
+
+#: ../gtk-glade/incall_view.c:158
+msgid "<b>Call ended.</b>"
+msgstr "<b>Hovor skončil.</b>"
+
+#: ../gtk-glade/incall_view.c:176
+#, fuzzy
+msgid "Unmute"
+msgstr "Neomezená"
+
+#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
+msgid "Mute"
+msgstr "Ztlumit"
+
+#: ../gtk-glade/loginframe.c:82
+#, c-format
+msgid "Please enter login information for %s"
+msgstr "Prosím, zadejte své přihlašovací jméno pro %s:"
+
+#: ../gtk-glade/main.glade.h:1
+msgid "#"
+msgstr "#"
+
+#: ../gtk-glade/main.glade.h:2
+msgid "*"
+msgstr "*"
+
+#: ../gtk-glade/main.glade.h:3
+msgid "0"
+msgstr "0"
+
+#: ../gtk-glade/main.glade.h:4
+msgid "1"
+msgstr "1"
+
+#: ../gtk-glade/main.glade.h:5
+msgid "2"
+msgstr "2"
+
+#: ../gtk-glade/main.glade.h:6
+msgid "3"
+msgstr "3"
+
+#: ../gtk-glade/main.glade.h:7
+msgid "4"
+msgstr "4"
+
+#: ../gtk-glade/main.glade.h:8
+msgid "5"
+msgstr "5"
+
+#: ../gtk-glade/main.glade.h:9
+msgid "6"
+msgstr "6"
+
+#: ../gtk-glade/main.glade.h:10
+msgid "7"
+msgstr "7"
+
+#: ../gtk-glade/main.glade.h:11
+msgid "8"
+msgstr "8"
+
+#: ../gtk-glade/main.glade.h:12
+msgid "9"
+msgstr "9"
+
+#: ../gtk-glade/main.glade.h:13
+msgid "<b>Contact list</b>"
+msgstr "<b>Seznam kontaktů</b>"
+
+#: ../gtk-glade/main.glade.h:14
+msgid "<b>Terminate call</b>"
+msgstr "<b>Ukončit hovor</b>"
+
+#: ../gtk-glade/main.glade.h:15
+msgid "<b>Welcome !</b>"
+msgstr "<b>Vítejte!</b>"
+
+#: ../gtk-glade/main.glade.h:16
+msgid "A"
+msgstr "A"
+
+#: ../gtk-glade/main.glade.h:17
+msgid ""
+"ADSL\n"
+"Fiber Channel"
+msgstr ""
+"ADSL\n"
+"Fiber Channel"
+
+#: ../gtk-glade/main.glade.h:19
+msgid ""
+"All users\n"
+"Online users"
+msgstr ""
+"všech uživatelích\n"
+"připojených uživatelích"
+
+#: ../gtk-glade/main.glade.h:21
+msgid "Assistant"
+msgstr "Průvodce"
+
+#: ../gtk-glade/main.glade.h:22
+msgid "Audio & Video"
+msgstr "Zvuk i obraz"
+
+#: ../gtk-glade/main.glade.h:23
+msgid "Audio only"
+msgstr "Pouze zvuk"
+
+#: ../gtk-glade/main.glade.h:24
+#, fuzzy
+msgid "Automatically log me in"
+msgstr "Automaticky uhodnout platné jméno"
+
+#: ../gtk-glade/main.glade.h:25
+msgid "B"
+msgstr "B"
+
+#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
+msgid "C"
+msgstr "C"
+
+#: ../gtk-glade/main.glade.h:27
+msgid "Check for updates"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:28
+msgid "D"
+msgstr "D"
+
+#: ../gtk-glade/main.glade.h:29
+msgid "Default"
+msgstr "Výchozí"
+
+#: ../gtk-glade/main.glade.h:30
+msgid "Digits"
+msgstr "Číslice"
+
+#: ../gtk-glade/main.glade.h:31
+msgid "Duration"
+msgstr "Délka"
+
+#: ../gtk-glade/main.glade.h:32
+msgid "Duration:"
+msgstr "Délka:"
+
+#: ../gtk-glade/main.glade.h:33
+msgid "Enable self-view"
+msgstr "Zobrazovat sám sebe"
+
+#: ../gtk-glade/main.glade.h:34
+msgid "Enter username, phone number, or full sip address"
+msgstr "Zadejte uživatelské jméno, telefonní číslo nebo plnou sipovou adresu"
+
+#: ../gtk-glade/main.glade.h:35
+msgid "In call"
+msgstr "Telefonuje se"
+
+#: ../gtk-glade/main.glade.h:36
+msgid "Internet connection:"
+msgstr "Připojení k Internetu:"
+
+#: ../gtk-glade/main.glade.h:37
+msgid "Login information"
+msgstr "Informace o přihlášení"
+
+#: ../gtk-glade/main.glade.h:38
+msgid "Lookup:"
+msgstr "Hledat:"
+
+#: ../gtk-glade/main.glade.h:39
+msgid "Main view"
+msgstr "Hlavní zobrazení"
+
+#: ../gtk-glade/main.glade.h:41
+msgid "My current identity:"
+msgstr "Moje současná totožnost:"
+
+#: ../gtk-glade/main.glade.h:42
+msgid "Password"
+msgstr "Heslo"
+
+#: ../gtk-glade/main.glade.h:43
+msgid "SIP address or phone number:"
+msgstr "SIP adresa nebo telefonní číslo:"
+
+#: ../gtk-glade/main.glade.h:44
+msgid "Show current call"
+msgstr "Zobrazit současný hovor"
+
+#: ../gtk-glade/main.glade.h:45
+msgid "Start call"
+msgstr "Zahájit hovor"
+
+#: ../gtk-glade/main.glade.h:46
+msgid "Terminate call"
+msgstr "Ukončit hovor"
+
+#: ../gtk-glade/main.glade.h:47
+msgid "Username"
+msgstr "Uživatelské jméno"
+
+#: ../gtk-glade/main.glade.h:48
+msgid "_Linphone"
+msgstr "_Linphone"
+
+#: ../gtk-glade/main.glade.h:49
+msgid "_Modes"
+msgstr "Reži_my"
+
+#: ../gtk-glade/main.glade.h:50
+msgid "gtk-connect"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:51
+msgid "gtk-find"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:52
+msgid "in"
+msgstr "ve"
+
+# XXX: Dummy string. Make it not translatable or use real message
+#: ../gtk-glade/main.glade.h:53
+msgid "label"
+msgstr ""
+
+#: ../gtk-glade/about.glade.h:1
+msgid "About linphone"
+msgstr "O Linphonu"
+
+# FIXME: standart
+#: ../gtk-glade/about.glade.h:2
+msgid "An internet video phone using the standart SIP (rfc3261) protocol."
+msgstr "Internetový videofon používající standardní protokol SIP (RFC 3261)."
+
+#: ../gtk-glade/about.glade.h:3
+msgid "Created by Simon Morlat\n"
+msgstr "Vytvořil Simon Morlat\n"
+
+#: ../gtk-glade/about.glade.h:5
+msgid ""
+"fr: Simon Morlat\n"
+"en: Simon Morlat and Delphine Perreau\n"
+"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
+"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
+"sv: Daniel Nylander <po@danielnylander.se>\n"
+"es: Jesus Benitez <gnelson at inMail dot sk>\n"
+"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
+"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
+"pl: Robert Nasiadek <darkone@darkone.pl>\n"
+"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
+"hu: anonymous\n"
+msgstr ""
+"fr: Simon Morlat\n"
+"en: Simon Morlat a Delphine Perreau\n"
+"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
+"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
+"sv: Daniel Nylander <po@danielnylander.se>\n"
+"es: Jesus Benitez <gnelson at inMail dot sk>\n"
+"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
+"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
+"pl: Robert Nasiadek <darkone@darkone.pl>\n"
+"cs: Petr Písař <petr.pisar@atlas.cz>\n"
+"hu: anonym\n"
+
+#: ../gtk-glade/contact.glade.h:1
+#, fuzzy
+msgid "<b>Contact information</b>"
+msgstr "Informace o kontaktu"
+
+#: ../gtk-glade/contact.glade.h:2
+msgid "Allow this contact to see my presence status"
+msgstr "Dovolit tomuto kontaktu, aby viděl můj stav přítomnosti"
+
+#: ../gtk-glade/contact.glade.h:4
+msgid "SIP Address"
+msgstr "SIP adresa"
+
+#: ../gtk-glade/contact.glade.h:5
+msgid "Show this contact presence status"
+msgstr "U tohoto kontaktu zobrazovat stav přítomnosti"
+
+#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
+#: ../gtk-glade/sip_account.glade.h:9
+msgid "gtk-cancel"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
+#: ../gtk-glade/sip_account.glade.h:10
+msgid "gtk-ok"
+msgstr ""
+
+#: ../gtk-glade/log.glade.h:1
+msgid "Linphone debug window"
+msgstr "Ladicí okno Linphonu"
+
+#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
+#: ../gtk-glade/chatroom.glade.h:2
+msgid "gtk-close"
+msgstr ""
+
+#: ../gtk-glade/password.glade.h:1
+msgid "Linphone - Authentication required"
+msgstr "Linphone – Ověření totožnosti vyžadováno"
+
+#: ../gtk-glade/password.glade.h:2
+msgid "Password:"
+msgstr "Heslo:"
+
+#: ../gtk-glade/password.glade.h:3
+msgid "Please enter the domain password"
+msgstr "Prosím, zadejte heslo pro doménu"
+
+#: ../gtk-glade/password.glade.h:4
+msgid "UserID"
+msgstr ""
+
+#: ../gtk-glade/call_logs.glade.h:1
+msgid "Call history"
+msgstr "Historie volání"
+
+#: ../gtk-glade/sip_account.glade.h:1
+msgid "Configure a SIP account"
+msgstr "Nastavit SIP účet"
+
+#: ../gtk-glade/sip_account.glade.h:2
+msgid "Linphone - Configure a SIP account"
+msgstr "Linphone – Nastav SIP účet"
+
+#: ../gtk-glade/sip_account.glade.h:3
+msgid "Publish presence information"
+msgstr "Zveřejnit stav přítomnosti"
+
+#: ../gtk-glade/sip_account.glade.h:4
+msgid "Register at startup"
+msgstr "Zaregistrovat při spuštění"
+
+#: ../gtk-glade/sip_account.glade.h:5
+msgid "Registration duration (sec):"
+msgstr "Registrační období (s):"
+
+#: ../gtk-glade/sip_account.glade.h:6
+msgid "Route (optional):"
+msgstr "Směrování (volitelné):"
+
+#: ../gtk-glade/sip_account.glade.h:7
+msgid "SIP Proxy address:"
+msgstr "Adresa SIP proxy:"
+
+#: ../gtk-glade/sip_account.glade.h:8
+msgid "Your SIP identity:"
+msgstr "Vaše SIP totožnost:"
+
+#: ../gtk-glade/sip_account.glade.h:11
+msgid "sip:"
+msgstr "sip:"
+
+#: ../gtk-glade/chatroom.glade.h:1
+msgid "Send"
+msgstr "Odeslat"
+
+#: ../gtk-glade/incoming_call.glade.h:1
+msgid "Accept"
+msgstr "Přijmout"
+
+#: ../gtk-glade/incoming_call.glade.h:2
+msgid "Decline"
+msgstr "Odmítnout"
+
+#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
+msgid "Incoming call"
+msgstr "Příchozí hovor"
+
+#: ../gtk-glade/incoming_call.glade.h:4
+msgid "Incoming call from"
+msgstr "Příchozí hovor od"
+
+#: ../gtk-glade/incoming_call.glade.h:5
+msgid "Linphone - Incoming call"
+msgstr "Linphone – Příchozí hovor"
+
+#: ../gtk-glade/parameters.glade.h:1
+msgid "0 stands for \"unlimited\""
+msgstr "0 znamená „neomezeno“"
+
+#: ../gtk-glade/parameters.glade.h:2
+msgid "<b>Audio</b>"
+msgstr "<b>Zvuk</b>"
+
+#: ../gtk-glade/parameters.glade.h:3
+msgid "<b>Bandwidth control</b>"
+msgstr "<b>Využití šířky pásma</b>"
+
+#: ../gtk-glade/parameters.glade.h:4
+msgid "<b>Codecs</b>"
+msgstr "<b>Kodeky</b>"
+
+#: ../gtk-glade/parameters.glade.h:5
+msgid "<b>Default identity</b>"
+msgstr "<b>Implicitní totožnost</b>"
+
+#: ../gtk-glade/parameters.glade.h:6
+msgid "<b>Language</b>"
+msgstr "<b>Jazyk</b>"
+
+#: ../gtk-glade/parameters.glade.h:7
+msgid "<b>NAT and Firewall</b>"
+msgstr "<b>NAT a firewall</b>"
+
+#: ../gtk-glade/parameters.glade.h:8
+msgid "<b>Ports</b>"
+msgstr "<b>Porty</b>"
+
+#: ../gtk-glade/parameters.glade.h:9
+msgid "<b>Privacy</b>"
+msgstr "<b>Soukromí</b>"
+
+#: ../gtk-glade/parameters.glade.h:10
+msgid "<b>Proxy accounts</b>"
+msgstr "<b>Proxy účty</b>"
+
+#: ../gtk-glade/parameters.glade.h:11
+msgid "<b>Transport</b>"
+msgstr "<b>Přenos</b>"
+
+#: ../gtk-glade/parameters.glade.h:12
+msgid "<b>Video</b>"
+msgstr "<b>Obraz</b>"
+
+#: ../gtk-glade/parameters.glade.h:13
+msgid "ALSA special device (optional):"
+msgstr "Zvláštní ALSA zařízení (volitelné):"
+
+#: ../gtk-glade/parameters.glade.h:14
+msgid "Add"
+msgstr "Přidat"
+
+#: ../gtk-glade/parameters.glade.h:15
+msgid "Audio RTP/UDP:"
+msgstr "Zvukový RTP/UDP:"
+
+#: ../gtk-glade/parameters.glade.h:16
+msgid ""
+"Audio codecs\n"
+"Video codecs"
+msgstr ""
+"Kodeky zvuku\n"
+"Kodeky obrazu"
+
+#: ../gtk-glade/parameters.glade.h:18
+msgid "Behind NAT / Firewall (specify gateway IP below)"
+msgstr "Za NAT/firewallem (adresu brány zadejte níže)"
+
+#: ../gtk-glade/parameters.glade.h:19
+msgid "Behind NAT / Firewall (use STUN to resolve)"
+msgstr "Za NAT/firewallem (adresu určí STUN)"
+
+#: ../gtk-glade/parameters.glade.h:21
+msgid "CIF"
+msgstr "CIF"
+
+#: ../gtk-glade/parameters.glade.h:22
+msgid "Capture device:"
+msgstr "Zařízení pro nahrávání:"
+
+#: ../gtk-glade/parameters.glade.h:23
+msgid "Codecs"
+msgstr "Kodeky"
+
+#: ../gtk-glade/parameters.glade.h:24
+msgid "Direct connection to the Internet"
+msgstr "Přímé připojení do Internetu"
+
+#: ../gtk-glade/parameters.glade.h:25
+msgid "Disable"
+msgstr "Zakázat"
+
+#: ../gtk-glade/parameters.glade.h:26
+msgid "Done"
+msgstr "Hotovo"
+
+#: ../gtk-glade/parameters.glade.h:27
+msgid "Download speed limit in Kbit/sec:"
+msgstr "Omezení příchozí rychlosti (kb/s):"
+
+#: ../gtk-glade/parameters.glade.h:28
+msgid "Edit"
+msgstr "Upravit"
+
+#: ../gtk-glade/parameters.glade.h:29
+msgid "Enable"
+msgstr "Povolit"
+
+#: ../gtk-glade/parameters.glade.h:30
+msgid "Enable echo cancellation"
+msgstr "Zapnout potlačení ozvěny"
+
+#: ../gtk-glade/parameters.glade.h:31
+msgid "Erase all passwords"
+msgstr "Vymazat všechna hesla"
+
+#: ../gtk-glade/parameters.glade.h:32
+msgid "Manage SIP Accounts"
+msgstr "Nastavení SIP účtů"
+
+#: ../gtk-glade/parameters.glade.h:33
+msgid "Multimedia settings"
+msgstr "Nastavení multimédií"
+
+#: ../gtk-glade/parameters.glade.h:34
+msgid "Network settings"
+msgstr "Nastavení sítě"
+
+#: ../gtk-glade/parameters.glade.h:35
+msgid "Playback device:"
+msgstr "Zařízení pro přehrávání:"
+
+#: ../gtk-glade/parameters.glade.h:36
+msgid "Prefered video resolution:"
+msgstr "Upřednostňované rozlišení obrazu:"
+
+#: ../gtk-glade/parameters.glade.h:37
+msgid "Public IP address:"
+msgstr "Veřejná IP adresa:"
+
+#: ../gtk-glade/parameters.glade.h:38
+msgid ""
+"Register to FONICS\n"
+"virtual network !"
+msgstr ""
+"Zaregistrovat se do\n"
+"virtuální sítě FONICS!"
+
+#: ../gtk-glade/parameters.glade.h:40
+msgid "Remove"
+msgstr "Odstranit"
+
+#: ../gtk-glade/parameters.glade.h:41
+msgid "Ring device:"
+msgstr "Zařízení pro vyzvánění:"
+
+#: ../gtk-glade/parameters.glade.h:42
+msgid "Ring sound:"
+msgstr "Vyzvánění:"
+
+#: ../gtk-glade/parameters.glade.h:43
+msgid "SIP (UDP):"
+msgstr "SIP (UDP):"
+
+#: ../gtk-glade/parameters.glade.h:44
+msgid "Send DTMFs as SIP info"
+msgstr "Odesílat tóny DTMF jako SIP INFO zprávy"
+
+#: ../gtk-glade/parameters.glade.h:45
+msgid "Set Maximum Transmission Unit:"
+msgstr "Nastavit MTU (největší přenositelná zpráva):"
+
+#: ../gtk-glade/parameters.glade.h:46
+msgid "Settings"
+msgstr "Nastavení"
+
+#: ../gtk-glade/parameters.glade.h:47
+msgid "Stun server:"
+msgstr "STUN server:"
+
+#: ../gtk-glade/parameters.glade.h:48
+msgid "This section defines your SIP address when not using a SIP account"
+msgstr "Tento oddíl určuje vaši SIP adresu, když se nepoužívá žádný účet"
+
+#: ../gtk-glade/parameters.glade.h:49
+msgid "Upload speed limit in Kbit/sec:"
+msgstr "Omezení odchozí rychlosti (kb/s):"
+
+#: ../gtk-glade/parameters.glade.h:50
+msgid "Use IPv6 instead of IPv4"
+msgstr "Používat IPv6 místo IPv4"
+
+#: ../gtk-glade/parameters.glade.h:51
+msgid "User interface"
+msgstr "Uživatelské rozhraní"
+
+#: ../gtk-glade/parameters.glade.h:52
+msgid "Video RTP/UDP:"
+msgstr "Obrazový RTP/UDP:"
+
+#: ../gtk-glade/parameters.glade.h:53
+msgid "Video input device:"
+msgstr "Vstupní zařízení obrazu:"
+
+#: ../gtk-glade/parameters.glade.h:54
+msgid "Your display name (eg: John Doe):"
+msgstr "Vaše zobrazované jméno (např. Jan Novák):"
+
+#: ../gtk-glade/parameters.glade.h:55
+msgid "Your resulting SIP address:"
+msgstr "Vaše výsledná SIP adresa:"
+
+#: ../gtk-glade/parameters.glade.h:56
+msgid "Your username:"
+msgstr "Vaše uživatelské jméno:"
+
+#: ../gtk-glade/parameters.glade.h:57
+msgid "a sound card\n"
+msgstr "zvuková karta\n"
+
+#: ../gtk-glade/parameters.glade.h:59
+msgid "default camera"
+msgstr "implicitní kamera"
+
+#: ../gtk-glade/parameters.glade.h:60
+msgid "default soundcard"
+msgstr "implicitní zvuková karta"
+
+#: ../gtk-glade/parameters.glade.h:61
+msgid "default soundcard\n"
+msgstr "implicitní zvuková karta\n"
+
+#: ../gtk-glade/parameters.glade.h:63
+msgid "gtk-go-down"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:64
+msgid "gtk-go-up"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:65
+msgid "gtk-media-play"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:1
+msgid "<b>Search somebody</b>"
+msgstr "<b>Hledat někoho</b>"
+
+#: ../gtk-glade/buddylookup.glade.h:2
+msgid "Add to my list"
+msgstr "Přidat na svůj seznam"
+
+#: ../gtk-glade/buddylookup.glade.h:3
+msgid "Search contacts in directory"
+msgstr "Hledat kontakty v adresáři"
+
+#: ../gtk-glade/waiting.glade.h:1
+msgid "Linphone"
+msgstr "Linphone"
+
+#: ../gtk-glade/waiting.glade.h:2
+msgid "Please wait"
+msgstr "Prosím, čekejte"
+
+#: ../coreapi/linphonecore.c:195
+#, c-format
+msgid "You have missed %i call."
+msgid_plural "You have missed %i calls."
+msgstr[0] "Máte %i zmeškaný hovor."
+msgstr[1] "Máte %i zmeškané hovory."
+msgstr[2] "Máte %i zmeškaných hovorů."
+
+#: ../coreapi/linphonecore.c:223
+msgid "aborted"
+msgstr "přerušen"
+
+#: ../coreapi/linphonecore.c:226
+msgid "completed"
+msgstr "dokončen"
+
+#: ../coreapi/linphonecore.c:229
+msgid "missed"
+msgstr "promeškán"
+
+#: ../coreapi/linphonecore.c:234
+#, c-format
+msgid ""
+"%s at %s\n"
+"From: %s\n"
+"To: %s\n"
+"Status: %s\n"
+"Duration: %i mn %i sec\n"
+msgstr ""
+"%s v %s\n"
+"Od: %s\n"
+"Pro: %s\n"
+"Stav: %s\n"
+"Délka: %i min %i s\n"
+
+#: ../coreapi/linphonecore.c:235
+msgid "Outgoing call"
+msgstr "Odchozí hovor"
+
+#: ../coreapi/linphonecore.c:445
+msgid ""
+"Your machine appears to be connected to an IPv6 network. By default linphone "
+"always uses IPv4. Please update your configuration if you want to use IPv6"
+msgstr ""
+"Zdá se, že váš počítač je připojen do IPv6 sítě. Standardně linphone používá "
+"pouze IPv4. Prosím, změňte nastavení programu, pokud chcete používat IPv6."
+
+#: ../coreapi/linphonecore.c:739
+msgid "Ready"
+msgstr "Připraven."
+
+#: ../coreapi/linphonecore.c:1014
+msgid "Remote end seems to have disconnected, the call is going to be closed."
+msgstr "Vzdálený konec se asi odpojil, hovor bude ukončen."
+
+#: ../coreapi/linphonecore.c:1172
+msgid "Looking for telephone number destination..."
+msgstr "Vyhledává se umístění čísla…"
+
+#: ../coreapi/linphonecore.c:1174
+msgid "Could not resolve this number."
+msgstr "Toto číslo nelze vyhledat."
+
+#: ../coreapi/linphonecore.c:1239
+msgid ""
+"Could not parse given sip address. A sip url usually looks like sip:"
+"user@domain"
+msgstr ""
+"Špatně zadaná SIP adresa. Adresa má mít tento formát <sip:uživatel@doména>"
+
+#: ../coreapi/linphonecore.c:1340
+msgid "Sorry, having multiple simultaneous calls is not supported yet !"
+msgstr "Promiňte, vedení více současných hovorů není podporováno!"
+
+#: ../coreapi/linphonecore.c:1387
+msgid "Contacting"
+msgstr "Kontaktuji"
+
+#: ../coreapi/linphonecore.c:1402
+msgid "could not call"
+msgstr "Nelze volat."
+
+#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
+msgid "Connected."
+msgstr "Připojeno."
+
+#: ../coreapi/linphonecore.c:1813
+msgid "Call ended"
+msgstr "Hovor skončil."
+
+#: ../coreapi/linphonecore.c:2175
+msgid "No nat/firewall address supplied !"
+msgstr "Žádná adresa NATu/firewallu nebyla zadána!"
+
+#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
+#, c-format
+msgid "Invalid nat address '%s' : %s"
+msgstr "Neplatná adresa NATu '%s': '%s"
+
+#: ../coreapi/misc.c:134
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the pcm oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+"'modprobe snd-pcm-oss' as root to load it."
+msgstr ""
+"Váš počítač používá zvukový ovladač ALSA. Jde o nejlepší\n"
+"volbu. Linphone však potřebuje ke své práci modul emulace\n"
+"oss, který chybí. Prosím zadejte jako uživatel root příkaz\n"
+"'modprobe snd-pcm-oss', kterým modul zavede."
+
+#: ../coreapi/misc.c:137
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the mixer oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+" 'modprobe snd-mixer-oss' as root to load it."
+msgstr ""
+"Váš počítač používá zvukový ovladač ALSA. Jde o nejlepší\n"
+"volbu. Linphone však potřebuje ke své práci modul mixer emulace\n"
+"oss, který chybí. Prosím zadejte jako uživatel root příkaz\n"
+"'modprobe snd-mixer-oss', kterým modul zavede."
+
+#: ../coreapi/misc.c:610
+msgid "Stun lookup in progress..."
+msgstr "Hledá se adresa pomocí STUN…"
+
+#: ../coreapi/exevents.c:127
+msgid "Call terminated."
+msgstr "Hovor ukončen."
+
+#: ../coreapi/exevents.c:149
+msgid "Could not reach destination."
+msgstr "Cíl je nedostupný."
+
+#: ../coreapi/exevents.c:158
+msgid "User is busy."
+msgstr "Uživatel je zaneprázdněn."
+
+#: ../coreapi/exevents.c:159
+msgid "User is temporarily unavailable."
+msgstr "Uživatel je dočasně nedostupný."
+
+#: ../coreapi/exevents.c:160
+msgid "Request Cancelled."
+msgstr "Dotaz přerušen."
+
+#. char *retrymsg=_("%s. Retry after %i minute(s).");
+#: ../coreapi/exevents.c:162
+msgid "User does not want to be disturbed."
+msgstr "Uživatel si nepřeje být rušen."
+
+#: ../coreapi/exevents.c:163
+msgid "Call declined."
+msgstr "Volání odmítnuto."
+
+#: ../coreapi/exevents.c:191
+msgid "Bad request"
+msgstr "Chybný dotaz"
+
+#: ../coreapi/exevents.c:194
+msgid "User cannot be found at given address."
+msgstr "Uživatele nelze na dané adrese zastihnout."
+
+#: ../coreapi/exevents.c:197
+msgid "Remote user cannot support any of proposed codecs."
+msgstr "Vzdálený uživatel nemá podporu pro žádný z navržených kodeků."
+
+#. time out, call leg is lost
+#: ../coreapi/exevents.c:227
+msgid "Timeout."
+msgstr "Vypršení časového limitu."
+
+#: ../coreapi/exevents.c:230
+msgid "Remote host was found but refused connection."
+msgstr "Vzdálený počítač byl nalezen, ale odmítl připojení."
+
+#: ../coreapi/exevents.c:339
+msgid "is contacting you."
+msgstr "vás volá."
+
+#: ../coreapi/exevents.c:424
+#, c-format
+msgid "Redirected to %s..."
+msgstr "Přesměrováno na %s…"
+
+#: ../coreapi/exevents.c:440
+msgid ""
+"User is not reachable at the moment but he invites you\n"
+"to contact him using the following alternate resource:"
+msgstr ""
+"Uživatel je nedostupný, ale navrhuje tyto alternativní\n"
+"setkání:"
+
+#: ../coreapi/exevents.c:861
+msgid "Early media."
+msgstr "Časná média."
+
+#: ../coreapi/exevents.c:972
+#, c-format
+msgid "Registration on %s failed: %s"
+msgstr "Registrace na %s selhala: %s"
+
+#: ../coreapi/exevents.c:972
+msgid "no response timeout"
+msgstr "odpověď nedorazila včas"
+
+#: ../coreapi/exevents.c:998
+#, c-format
+msgid "Registration on %s successful."
+msgstr "Registrace na %s byla úspěšná."
+
+#: ../coreapi/exevents.c:999
+#, fuzzy, c-format
+msgid "Unregistration on %s done."
+msgstr "Registrace na %s byla úspěšná."
+
+#. people for which we don't have yet an answer should appear as offline
+#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
+msgid "Gone"
+msgstr "Pryč"
+
+#: ../coreapi/presence.c:129
+msgid "Waiting for Approval"
+msgstr "Čekám na schválení"
+
+#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
+msgid "Online"
+msgstr "Připojeno"
+
+#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
+msgid "Busy"
+msgstr "Zaneprázdněn"
+
+#: ../coreapi/presence.c:142
+msgid "Be Right Back"
+msgstr "Na chvíli pryč"
+
+#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
+msgid "Away"
+msgstr "Pryč"
+
+#: ../coreapi/presence.c:151
+msgid "On The Phone"
+msgstr "Na příjmu"
+
+#: ../coreapi/presence.c:156
+msgid "Out To Lunch"
+msgstr "Na obědě"
+
+#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
+msgid "Closed"
+msgstr "Zavřeno"
+
+#: ../coreapi/friend.c:35
+msgid "Unknown"
+msgstr "Stav není znám"
+
+#: ../coreapi/friend.c:44
+msgid "Be right back"
+msgstr "Za chvíli se vrátím"
+
+#: ../coreapi/friend.c:50
+msgid "On the phone"
+msgstr "U telefonu"
+
+#: ../coreapi/friend.c:53
+msgid "Out to lunch"
+msgstr "Na obědě"
+
+#: ../coreapi/friend.c:56
+msgid "Do not disturb"
+msgstr "Nerušit"
+
+#: ../coreapi/friend.c:59
+msgid "Moved"
+msgstr "Přestěhoval se"
+
+#: ../coreapi/friend.c:62
+msgid "Using another messaging service"
+msgstr "Používá jinou službu přenosu zpráv"
+
+#: ../coreapi/friend.c:65
+msgid "Offline"
+msgstr "Odpojeno"
+
+#: ../coreapi/friend.c:68
+msgid "Pending"
+msgstr "Čeká"
+
+#: ../coreapi/friend.c:74
+msgid "Unknown-bug"
+msgstr "Neznámá chyba"
+
+#: ../coreapi/proxy.c:221
+msgid ""
+"The sip proxy address you entered is invalid, it must start with \"sip:\" "
+"followed by a hostname."
+msgstr ""
+"Adresa SIP proxy, kterou jste zadali, není platná. Musí začínat na „sip:“ a "
+"pak musí následovat jméno stroje."
+
+#: ../coreapi/proxy.c:227
+msgid ""
+"The sip identity you entered is invalid.\n"
+"It should look like sip:username@proxydomain, such as sip:alice@example.net"
+msgstr ""
+"SIP identita, kterou jste zadali, není platná.\n"
+"Měla by mít tvar sip:uživatel@proxydoména, například sip:alice@example.net"
+
+#: ../coreapi/proxy.c:634
+#, c-format
+msgid "Could not login as %s"
+msgstr "Nelze se přihlásit jako %s"
+
+#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
+msgid "ITU-G.711 alaw encoder"
+msgstr "Kodér a-law ITU-G.711"
+
+#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
+msgid "ITU-G.711 alaw decoder"
+msgstr "Dekodér a-law ITU-G.711"
+
+#: ../mediastreamer2/src/alsa.c:923
+msgid "Alsa sound source"
+msgstr "Zdroj zvuku ALSA"
+
+#: ../mediastreamer2/src/alsa.c:1027
+msgid "Alsa sound output"
+msgstr "Zvukový výstup ALSA"
+
+#: ../mediastreamer2/src/aqsnd.c:891
+msgid "Sound capture filter for MacOS X Audio Queue Service"
+msgstr "Filtr zachytávání zvuku přes MacOS X službu zvukové fronty"
+
+#: ../mediastreamer2/src/aqsnd.c:915
+msgid "Sound playback filter for MacOS X Audio Queue Service"
+msgstr "Filtr přehrávání zvuku přes MacOS X službu zvukové fronty"
+
+#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
+msgid "DTMF generator"
+msgstr "Generátor DTMF"
+
+#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
+msgid "The GSM full-rate codec"
+msgstr "Kodek plnopásmového GSM"
+
+#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
+msgid "The GSM codec"
+msgstr "GSM kodek"
+
+#: ../mediastreamer2/src/macsnd.c:670
+msgid "Sound capture filter for MacOS X Core Audio drivers"
+msgstr "Filtr zachytávání zvuku přes MacOS X ovladače Core Audio"
+
+#: ../mediastreamer2/src/macsnd.c:684
+msgid "Sound playback filter for MacOS X Core Audio drivers"
+msgstr "Filtr přehrávání zvuku přes MacOS X ovladače Core Audio"
+
+#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
+msgid "A filter to make conferencing"
+msgstr "Filtr pro vytváření konferencí"
+
+#: ../mediastreamer2/src/msfileplayer.c:295
+#: ../mediastreamer2/src/msfileplayer.c:313
+msgid "Raw files and wav reader"
+msgstr "Čtení syrových souborů a souborů WAV"
+
+#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
+#: ../mediastreamer2/src/msfilerec_win.c:216
+#: ../mediastreamer2/src/msfilerec_win.c:234
+msgid "Wav file recorder"
+msgstr "Nahrávání do souborů WAV"
+
+#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
+msgid "A filter that send several inputs to one output."
+msgstr "Filtr, který směšuje několik vstupů do jednoho výstupu."
+
+#: ../mediastreamer2/src/msresample.c:221
+#: ../mediastreamer2/src/msresample.c:239
+msgid "frequency resampler"
+msgstr "měnič frekvence"
+
+#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
+msgid "RTP output filter"
+msgstr "Filtr RTP výstupu"
+
+#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
+msgid "RTP input filter"
+msgstr "Filtr RTP vstupu"
+
+#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
+#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
+msgid "The free and wonderful speex codec"
+msgstr "Svobodný a úžasný kodek speex"
+
+#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
+msgid "A filter that controls and measure sound volume"
+msgstr "Filtr, který měří a řídí hlasitost zvuku"
+
+#: ../mediastreamer2/src/msv4l.c:1009
+msgid "A video4linux compatible source filter to stream pictures."
+msgstr "Zdrojový filtr kompatibilní s Video4Linux proudující obrázky."
+
+#: ../mediastreamer2/src/msv4l2.c:458
+msgid "A filter to grab pictures from Video4Linux2-powered cameras"
+msgstr "Filtr zachytávající obrázky z Video4Linux2 kamer"
+
+#: ../mediastreamer2/src/nowebcam.c:1780
+msgid "A filter that outputs a static image."
+msgstr "Filtr, který vydává nehybný obrázek."
+
+#: ../mediastreamer2/src/oss.c:567
+msgid "Sound capture filter for OSS drivers"
+msgstr "Zvukový zachytávací filtr pro ovladače OSS"
+
+#: ../mediastreamer2/src/oss.c:581
+msgid "Sound playback filter for OSS drivers"
+msgstr "Zvukový přehrávací filtr pro ovladače OSS"
+
+#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
+msgid "A pixel format converter"
+msgstr "Převodník formátu pixelů"
+
+#: ../mediastreamer2/src/sizeconv.c:204
+msgid "A video size converter"
+msgstr "Převaděč velikosti videa"
+
+#: ../mediastreamer2/src/sizeconv.c:222
+msgid "a small video size converter"
+msgstr "Převaděč velikosti malých videí"
+
+#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
+msgid "Echo canceler using speex library"
+msgstr "Potlačení ozvěny používající knihovnu speex"
+
+#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
+msgid "A filter that reads from input and copy to its multiple outputs."
+msgstr "Filtr, který čte vstup a kopíruje ho více výstupů."
+
+#: ../mediastreamer2/src/theora.c:375
+msgid "The theora video encoder from xiph.org"
+msgstr "Kodér videa do theory od xiph.org"
+
+#: ../mediastreamer2/src/theora.c:393
+msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
+msgstr ""
+"Kodek pro video „theora“ od xiph.org, který má otevřený zdrojový kód a je "
+"prostý licenčních poplatků"
+
+#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
+msgid "The theora video decoder from xiph.org"
+msgstr "Dekodér theora videa od xiph.org"
+
+#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
+msgid "ITU-G.711 ulaw encoder"
+msgstr "Kodér µ-law ITU-G.711"
+
+#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
+msgid "ITU-G.711 ulaw decoder"
+msgstr "Dekodér µ-law ITU-G.711"
+
+#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
+#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
+msgid "A H.263 decoder using ffmpeg library"
+msgstr "Dekodér H.263 používající knihovnu ffmpeg"
+
+#: ../mediastreamer2/src/videodec.c:688
+msgid "A MPEG4 decoder using ffmpeg library"
+msgstr "Dekodér MPEG4 používající knihovnu ffmpeg"
+
+#: ../mediastreamer2/src/videodec.c:704
+#, fuzzy
+msgid "A RTP/JPEG decoder using ffmpeg library"
+msgstr "Dekodér MPEG používající knihovnu ffmpeg"
+
+#: ../mediastreamer2/src/videodec.c:720
+msgid "A MJPEG decoder using ffmpeg library"
+msgstr "Dekodér MPEG používající knihovnu ffmpeg"
+
+#: ../mediastreamer2/src/videodec.c:736
+msgid "A snow decoder using ffmpeg library"
+msgstr "Dekodér snow používající knihovnu ffmpeg"
+
+#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
+msgid "A video H.263 encoder using ffmpeg library."
+msgstr "Kodér H.263 používající knihovnu ffmpeg."
+
+#: ../mediastreamer2/src/videoenc.c:856
+msgid ""
+"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
+"spec."
+msgstr ""
+"Kodér H.263 videa používající knihovnu ffmpeg. Vyhovuje staré specifikaci "
+"RFC 2190."
+
+#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
+msgid "A video MPEG4 encoder using ffmpeg library."
+msgstr "Kodér MPEG4 videa používající knihovnu ffmpeg."
+
+#: ../mediastreamer2/src/videoenc.c:888
+msgid "A video snow encoder using ffmpeg library."
+msgstr "Kodér snow videa používající knihovnu ffmpeg."
+
+#: ../mediastreamer2/src/videoenc.c:904
+#, fuzzy
+msgid "A RTP/MJPEG encoder using ffmpeg library."
+msgstr "Dekodér MPEG používající knihovnu ffmpeg"
+
+#: ../mediastreamer2/src/videoenc.c:938
+msgid ""
+"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
+msgstr ""
+"Kodér H.263 videa používající knihovnu ffmpeg, vyhovuje staré specifikaci "
+"RFC 2190."
+
+#: ../mediastreamer2/src/videoenc.c:970
+msgid ""
+"The snow codec is royalty-free and is open-source. \n"
+"It uses innovative techniques that makes it one of most promising video "
+"codec. It is implemented within the ffmpeg project.\n"
+"However it is under development, quite unstable and compatibility with other "
+"versions cannot be guaranteed."
+msgstr ""
+"Kodek snow není zatížen poplatky a má otevřený zdrojový kód.\n"
+"Využívá průkopnické techniky, které jej činí jedním z nejslibnějších video "
+"kodeků. Je implementován v projektu ffmpeg.\n"
+"Avšak stále se vyvíjí, je trochu nestabilní a kompatibilita s ostatními "
+"verzemi není zaručena."
+
+#: ../mediastreamer2/src/videoenc.c:990
+#, fuzzy
+msgid "A MJPEG encoder using ffmpeg library."
+msgstr "Dekodér MPEG používající knihovnu ffmpeg"
+
+#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
+msgid "A generic video display"
+msgstr "Obecné zobrazování videa"
+
+#: ../mediastreamer2/src/wincevideods.c:966
+#: ../mediastreamer2/src/wincevideods.c:984
+#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
+#: ../mediastreamer2/src/winvideods.c:1306
+#: ../mediastreamer2/src/winvideods.c:1324
+msgid "A video4windows compatible source filter to stream pictures."
+msgstr "Zdrojový filtr kompatibilní s video4windows proudující obrázky."
+
+#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
+msgid "A video for windows (vfw.h) based source filter to grab pictures."
+msgstr ""
+"Zdrojový filtr založený na videu pro windows (vwf.h) pro zachytávání obrázků."
+
+#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
+msgid "ICE filter"
+msgstr "Filtr ICE"
+
+#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
+msgid "A filter that trashes its input (useful for terminating some graphs)."
+msgstr ""
+"Filtr, který zahazuje svůj vstup (užitečné na zakončení některých grafů)."
+
+#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
+msgid "Parametric sound equalizer."
+msgstr "Parametrický ekvalizér zvuku."
+
+#: ../mediastreamer2/src/msdscap-mingw.cc:1003
+msgid "A webcam grabber based on directshow."
+msgstr "Snímač kamer postavený na directshow."
+
+#~ msgid "Bresilian"
+#~ msgstr "brazilská portugalština"
+
+#~ msgid "Homepage"
+#~ msgstr "Domovská stránka"
+
+#~ msgid "Show debug window"
+#~ msgstr "Zobrazit ladicí okno"
+
+#~ msgid "_View"
+#~ msgstr "_Zobrazit"
+
+#~ msgid "A filter to make level measurements on 16 bits pcm audio stream"
+#~ msgstr "Filtr, který měří hlasitost na 16b zvukovém PCM proudu"
+
+#~ msgid "A video for macosx compatible source filter to stream pictures."
+#~ msgstr "Zdrojový filtr kompatibilní s MacOS X videem proudující obrázky."
+
+#~ msgid "A video display window using SDL"
+#~ msgstr "Zobrazovaní videa v SDL okně"
+
+#~ msgid ""
+#~ "Show All\n"
+#~ "Show Online"
+#~ msgstr ""
+#~ "Zobrazovat vše\n"
+#~ "Zobrazovat připojené"
+
+#~ msgid "Search:"
+#~ msgstr "Hledat:"
+
+#~ msgid "Display filters"
+#~ msgstr "Filtry pro zobrazení"
+
+#~ msgid "I'm not behing a firewall"
+#~ msgstr "Nejsem za firewallem"
+
+#~ msgid "I'm behind a firewall, use supplied public IP address"
+#~ msgstr "Jsem za firewallem, použij zadanou veřejnou IP adresu"
+
+#~ msgid "Use the supplied stun server above and do as best as possible"
+#~ msgstr "Použij výše zadaný STUN server a snaž se, jak nejlépe umíš"
+
+#~ msgid "<b>Miscelaneous</b>"
+#~ msgstr "<b>Různé</b>"
+
+#~ msgid "Go"
+#~ msgstr "Soubor"
+
+#~ msgid "Address book"
+#~ msgstr "Adresář"
+
+#~ msgid "Shows calls"
+#~ msgstr "Zobrazit volání"
+
+#~ msgid "Exit"
+#~ msgstr "Ukončit"
+
+#~ msgid "Help"
+#~ msgstr "Nápověda"
+
+#~ msgid "Shows the address book"
+#~ msgstr "Zobrazit adresář"
+
+#~ msgid "..."
+#~ msgstr "…"
+
+#~ msgid "Proxy to use:"
+#~ msgstr "Proxy:"
+
+#~ msgid ""
+#~ "Call or\n"
+#~ "answer"
+#~ msgstr ""
+#~ "Volat nebo\n"
+#~ "přijmout"
+
+#~ msgid ""
+#~ "Hangup\n"
+#~ "or refuse"
+#~ msgstr ""
+#~ "Zavěsit nebo\n"
+#~ "odmítnout"
+
+#~ msgid "Or chat !"
+#~ msgstr "Nebo poslat zprávu!"
+
+#~ msgid "Show more..."
+#~ msgstr "Zobrazit více…"
+
+#~ msgid "Playback level:"
+#~ msgstr "Úroveň přehrávání:"
+
+#~ msgid "Recording level:"
+#~ msgstr "Úroveň nahrávání:"
+
+#~ msgid "Ring level:"
+#~ msgstr "Úroveň vyzvánění:"
+
+#~ msgid "Controls"
+#~ msgstr "Ovládání"
+
+#~ msgid "Reachable"
+#~ msgstr "Dosažitelný"
+
+#~ msgid "Busy, I'll be back in "
+#~ msgstr "Mám práci, jsem zpět za "
+
+#~ msgid "The other party will be informed that you'll be back in X minutes"
+#~ msgstr "Druhá strana bude informována, že se vrátíte za X minut"
+
+#~ msgid "mn"
+#~ msgstr "min"
+
+#~ msgid "Moved temporarily"
+#~ msgstr "Dočasně mimo"
+
+#~ msgid "Alternative service"
+#~ msgstr "Alternativní služba"
+
+#~ msgid "URL:"
+#~ msgstr "URL:"
+
+#~ msgid "Presence"
+#~ msgstr "Přítomnost"
+
+#~ msgid "Press digits to send DTMFs."
+#~ msgstr "Zadejte čísla pro zaslání DTMF."
+
+#~ msgid ""
+#~ "  3\n"
+#~ "def"
+#~ msgstr ""
+#~ "  3\n"
+#~ "def"
+
+#~ msgid ""
+#~ "  2\n"
+#~ "abc"
+#~ msgstr ""
+#~ "  2\n"
+#~ "abc"
+
+#~ msgid ""
+#~ "  4\n"
+#~ "ghi"
+#~ msgstr ""
+#~ "  4\n"
+#~ "ghi"
+
+#~ msgid ""
+#~ " 5\n"
+#~ "jkl"
+#~ msgstr ""
+#~ " 5\n"
+#~ "jkl"
+
+#~ msgid ""
+#~ "  6\n"
+#~ "mno"
+#~ msgstr ""
+#~ "  6\n"
+#~ "mno"
+
+#~ msgid ""
+#~ "   7\n"
+#~ "pqrs"
+#~ msgstr ""
+#~ "   7\n"
+#~ "pqrs"
+
+#~ msgid ""
+#~ "  8\n"
+#~ "tuv"
+#~ msgstr ""
+#~ "  8\n"
+#~ "tuv"
+
+#~ msgid ""
+#~ "   9\n"
+#~ "wxyz"
+#~ msgstr ""
+#~ "   9\n"
+#~ "wxyz"
+
+#~ msgid "DTMF"
+#~ msgstr "DTMF"
+
+#~ msgid "My online friends"
+#~ msgstr "Přátelé online"
+
+#~ msgid ""
+#~ "C: 2001\n"
+#~ "Made in Old Europe"
+#~ msgstr ""
+#~ "© 2001\n"
+#~ "Vyrobeno ve Staré Dobré Evropě"
+
+#~ msgid ""
+#~ "Linphone is a web-phone.\n"
+#~ "It is compatible with SIP and RTP protocols."
+#~ msgstr ""
+#~ "Linphone je program pro IP telefonii.\n"
+#~ "Je kompatibilní s protokoly SIP a RTP."
+
+#~ msgid "http://www.linphone.org"
+#~ msgstr "http://www.linphone.org/"
+
+#~ msgid "Use IPv6 network (if available)"
+#~ msgstr "Použít IPv6 síť (je-li dostupná)"
+
+#~ msgid ""
+#~ "Toggle this if you are on an ipv6 network and you wish linphone to use it."
+#~ msgstr ""
+#~ "Jestliže jste v síti podporující IPv6 protokol a chcete-li, aby jej "
+#~ "linphone používal, zapněte tuto volbu."
+
+#~ msgid "Global"
+#~ msgstr "Obecné"
+
+#~ msgid ""
+#~ "These options is only for users in a private network, behind a gateway. "
+#~ "If you are not in this situation, then leave this empty."
+#~ msgstr ""
+#~ "Tato volba je určena pouze pro uživatele v intranetu za firewallem. Pokud "
+#~ "to není váš případ, nevyplňujte."
+
+#~ msgid "No firewall"
+#~ msgstr "Bez firewallu"
+
+#~ msgid "Use this STUN server to guess firewall address :"
+#~ msgstr "Pro odhad veřejné adresy použít tento STUN server:"
+
+#~ msgid "Specify firewall address manually:"
+#~ msgstr "Veřejná adresa firewallu:"
+
+#~ msgid "NAT traversal options (experimental)"
+#~ msgstr "Volby průchodu NATem (experimentální)"
+
+#~ msgid "Number of buffered miliseconds (jitter compensation):"
+#~ msgstr "Velikosti vyrovnávací fronty v milisekundách (potlačení rozptylu):"
+
+#~ msgid "RTP port used for audio:"
+#~ msgstr "RTP port pro zvuk:"
+
+#~ msgid "RTP properties"
+#~ msgstr "RTP vlastnosti"
+
+#~ msgid "Use SIP INFO message instead of RTP rfc2833 for DTMF transmitting"
+#~ msgstr "Místo RTP rfc2833 použít pro DTMF přenos SIP INFO zprávu"
+
+#~ msgid "RTP-RFC2833 is the recommended way."
+#~ msgstr "Doporučeno je RTP-RFC2833."
+
+#~ msgid "Other"
+#~ msgstr "Ostatní"
+
+#~ msgid "micro"
+#~ msgstr "mikrofon"
+
+#~ msgid "Recording source:"
+#~ msgstr "Zdroj nahrávání:"
+
+#~ msgid "Enable echo-canceler (cancels the echo heard by the remote party)"
+#~ msgstr "Potlačit ozvěnu (projeví se na druhém konci)"
+
+#~ msgid "Choose file"
+#~ msgstr "Vyberte soubor"
+
+#~ msgid "Listen"
+#~ msgstr "Test"
+
+#~ msgid "Sound properties"
+#~ msgstr "Vlastnosti zvuku"
+
+#~ msgid "Run sip user agent on port:"
+#~ msgstr "Spustit uživatelského agenta SIP na portu:"
+
+#~ msgid "It is strongly recommended to use port 5060."
+#~ msgstr "Je doporučeno používat port 5060."
+
+#~ msgid "SIP port"
+#~ msgstr "SIP port"
+
+#~ msgid "@"
+#~ msgstr "@"
+
+#~ msgid "Identity"
+#~ msgstr "Identita"
+
+#~ msgid "Add proxy/registrar"
+#~ msgstr "Přidat proxy/registraci"
+
+#~ msgid "Remote services"
+#~ msgstr "Vzdálené služby"
+
+#~ msgid "Clear all stored authentication information (username,password...)"
+#~ msgstr "Vyprázdnit všechny ověřovací informace (uživatelské jméno, heslo…)"
+
+#~ msgid "Authentication information"
+#~ msgstr "Ověřovací informace"
+
+#~ msgid "SIP"
+#~ msgstr "SIP"
+
+#~ msgid "List of audio codecs, in order of preference:"
+#~ msgstr "Seznam audio kodeků podle preference:"
+
+#~ msgid "Video Codecs"
+#~ msgstr "Kodeky obrazu"
+
+#~ msgid ""
+#~ "Note: Codecs in red are not usable regarding to your connection type to "
+#~ "the internet."
+#~ msgstr ""
+#~ "Poznámka: Kodeky označené červeně nelze u vašeho typu připojení použít."
+
+#~ msgid "No information availlable"
+#~ msgstr "Nejsou dostupné žádné informace"
+
+#~ msgid "Codec information"
+#~ msgstr "Informace o kodeku"
+
+#~ msgid "Address Book"
+#~ msgstr "Adresář"
+
+#~ msgid "Select"
+#~ msgstr "Vybrat"
+
+#~ msgid ""
+#~ "User is not reachable at the moment but he invites you to contact him "
+#~ "using the following alternate ressource:"
+#~ msgstr ""
+#~ "Uživatel je momentálně nedostupný, ale navrhuje tyto alternativní formy "
+#~ "kontaktu:"
+
+#~ msgid "None."
+#~ msgstr "Žádné."
+
+#~ msgid "Proxy/Registrar configuration box"
+#~ msgstr "Konfigurace proxy a registrace"
+
+#~ msgid "Send registration:"
+#~ msgstr "Odeslat registraci:"
+
+#~ msgid "Name:"
+#~ msgstr "Jméno:"
+
+#~ msgid "Subscribe policy:"
+#~ msgstr "Pravidlo přihlášení:"
+
+#~ msgid "Send subscription (see person's online status)"
+#~ msgstr "Odeslat přihlášení (podle online stavu osoby)"
+
+#~ msgid "New incoming subscription"
+#~ msgstr "Nové příchozí přihlášení"
+
+#~ msgid "You have received a new subscription..."
+#~ msgstr "Obdrželi jste nové přihlášení…"
+
+#~ msgid "Refuse"
+#~ msgstr "Odmítnout"
+
+#~ msgid "Authentication required for realm"
+#~ msgstr "pro doménu je vyžadováno ověření"
+
+#~ msgid "userid:"
+#~ msgstr "ID uživatele:"
+
+#~ msgid "realm:"
+#~ msgstr "doména:"
+
+#~ msgid "Chat Room"
+#~ msgstr "Diskuzní skupina"
+
+#~ msgid "Text:"
+#~ msgstr "Text:"
+
+#~ msgid "The caller asks for resource reservation. Do you agree ?"
+#~ msgstr "Volající žádá o rezervaci zdrojů. Souhlasíte?"
+
+#~ msgid ""
+#~ "The caller doesn't use resource reservation. \t\t\t\t\tDo you wish to "
+#~ "continue anyway ?"
+#~ msgstr ""
+#~ "Volající nepoužívá rezervaci zdrojů. \t\t\t\t\tChcete přesto pokračovat?"
+
+#~ msgid "linphone - receiving call from %s"
+#~ msgstr "linphone – příchozí hovor z %s"
+
+#~ msgid ""
+#~ "You have received a subscription from %s.This means that this person "
+#~ "wishes to be notified of your presence information (online, busy, "
+#~ "away...).\n"
+#~ "Do you agree ?"
+#~ msgstr ""
+#~ "Obdrželi jste přihlášení od %s. Znamená to, že si tato osoba přeje být "
+#~ "informována o vašem stavu přítomnosti (online, zaneprázdněn, pryč…).\n"
+#~ "Souhlasíte?"
+
+#~ msgid "Authentication required for realm %s"
+#~ msgstr "Pro doménu %s je vyžadováno ověření"
+
+#~ msgid "None"
+#~ msgstr "Žádná"
+
+#~ msgid "Wait"
+#~ msgstr "Zdržet"
+
+#~ msgid "Deny"
+#~ msgstr "Odmítnout"
+
+#~ msgid "Bad sip address: a sip address looks like sip:user@domain"
+#~ msgstr "Špatně zadaná SIP adresa: SIP adresa má tvar sip:uživatel@doména"
+
+#~ msgid "Stun lookup done..."
+#~ msgstr "STUN vyhledávání dokončeno…"
+
+#~ msgid "enter sip uri here"
+#~ msgstr "Sem zadejte SIP URI"
+
+#~ msgid "User manual"
+#~ msgstr "Uživatelská příručka"
+
+#~ msgid "Ring sound selection"
+#~ msgstr "Výběr zvonění"
+
+#~ msgid "Communication ended."
+#~ msgstr "Komunikace ukončena."
+
+#~ msgid "Call cancelled."
+#~ msgstr "Volání přerušeno."
+
+#~ msgid "Firewall 's external ip address (in dot notations):"
+#~ msgstr "Vnější IP adresa firewallu (v tečkové notaci):"
+
+#~ msgid "Index"
+#~ msgstr "Rejstřík"
+
+#~ msgid "28k modem"
+#~ msgstr "28k modem"
+
+#~ msgid "56k modem"
+#~ msgstr "56k modem"
+
+#~ msgid "64k modem (numeris)"
+#~ msgstr "64k modem"
+
+#~ msgid "ADSL or Cable modem"
+#~ msgstr "ADSL nebo kabelový modem"
+
+#~ msgid "Ethernet or equivalent"
+#~ msgstr "Ethernet nebo podobný"
+
+#~ msgid "Connection type:"
+#~ msgstr "Typ připojení:"
+
+#~ msgid "Server address"
+#~ msgstr "Adresa serveru:"
+
+#~ msgid ""
+#~ "Linphone could not open audio device %s. Check if your sound card is "
+#~ "fully configured and working."
+#~ msgstr ""
+#~ "Linphone nemůže otevřít zvukové zařízení %s. Překontrolujte nastavení a "
+#~ "funkčnost zvukové karty."
+
+#~ msgid "Type here the sip address of the person you want to call."
+#~ msgstr "Zde zadejte SIP adresu osoby, které si přejete volat."
+
+#~ msgid ""
+#~ "Release or\n"
+#~ "Refuse"
+#~ msgstr ""
+#~ "Přijmout nebo\n"
+#~ "odmítnout"
+
+#~ msgid "%s. Retry after %i minute(s)."
+#~ msgstr "%s. Zkusit znovu po %i min."
diff --git a/po/de.po b/po/de.po
new file mode 100644 (file)
index 0000000..eac8409
--- /dev/null
+++ b/po/de.po
@@ -0,0 +1,2192 @@
+# SIP Telephony Application.
+# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Simon Morlat <linphone@free.fr>, 2001.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: linphone 0.7.1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-10-16 15:24+0200\n"
+"PO-Revision-Date: 2003-05-23 17:51-0400\n"
+"Last-Translator: Jean-Jacques Sarton <jj.sarton@t-online.de>, Ursula Herles-"
+"Hartz <UAHartz@t-online.de>\n"
+"Language-Team: Deutsch <de@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
+#: ../gtk-glade/support.c:102
+#, c-format
+msgid "Couldn't find pixmap file: %s"
+msgstr "Pixmapdatei %s nicht gefunden"
+
+#: ../gtk-glade/chat.c:27
+#, c-format
+msgid "Chat with %s"
+msgstr "Chat mit %s"
+
+#: ../gtk-glade/main.c:90
+msgid "log to stdout some debug information while running."
+msgstr ""
+
+#: ../gtk-glade/main.c:97
+msgid "Start only in the system tray, do not show the main interface."
+msgstr ""
+
+#: ../gtk-glade/main.c:104
+msgid "address to call right now"
+msgstr ""
+
+#: ../gtk-glade/main.c:111
+msgid "if set automatically answer incoming calls"
+msgstr ""
+
+#: ../gtk-glade/main.c:119
+msgid ""
+"Specifiy a working directory (should be the base of the installation, eg: c:"
+"\\Program Files\\Linphone)"
+msgstr ""
+
+#: ../gtk-glade/main.c:675
+#, fuzzy, c-format
+msgid "Incoming call from %s"
+msgstr "Eingehendes Gespr�h"
+
+#: ../gtk-glade/main.c:707
+#, c-format
+msgid ""
+"%s would like to add you to his contact list.\n"
+"Would you allow him to see your presence status or add him to your contact "
+"list ?\n"
+"If you answer no, this person will be temporarily blacklisted."
+msgstr ""
+
+#: ../gtk-glade/main.c:777
+#, c-format
+msgid ""
+"Please enter your password for username <i>%s</i>\n"
+" at domain <i>%s</i>:"
+msgstr ""
+
+#: ../gtk-glade/main.c:871
+msgid "Website link"
+msgstr ""
+
+#: ../gtk-glade/main.c:907
+msgid "Linphone - a video internet phone"
+msgstr ""
+
+#: ../gtk-glade/main.c:926
+#, c-format
+msgid "%s (Default)"
+msgstr ""
+
+#: ../gtk-glade/main.c:1168
+msgid "A free SIP video-phone"
+msgstr "Ein freies SIP Video-Fone"
+
+#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
+#: ../gtk-glade/contact.glade.h:3
+msgid "Name"
+msgstr "Name"
+
+#: ../gtk-glade/friendlist.c:212
+msgid "Presence status"
+msgstr "Anwesenheitsstatus"
+
+#: ../gtk-glade/friendlist.c:243
+#, c-format
+msgid "Search in %s directory"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:432
+msgid "Invalid sip contact !"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:474
+#, fuzzy, c-format
+msgid "Call %s"
+msgstr "Gesprächsverlauf"
+
+#: ../gtk-glade/friendlist.c:475
+#, c-format
+msgid "Send text to %s"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:476
+#, fuzzy, c-format
+msgid "Edit contact '%s'"
+msgstr "Bearbeite Kontaktinformationen"
+
+#: ../gtk-glade/friendlist.c:477
+#, c-format
+msgid "Delete contact '%s'"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:519
+#, c-format
+msgid "Add new contact from %s directory"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:251
+msgid "Rate (Hz)"
+msgstr "Rate (Hz)"
+
+#: ../gtk-glade/propertybox.c:257
+msgid "Status"
+msgstr "Status"
+
+#: ../gtk-glade/propertybox.c:263
+msgid "Min bitrate (kbit/s)"
+msgstr "Min Bitrate (kbit/s)"
+
+#: ../gtk-glade/propertybox.c:269
+msgid "Parameters"
+msgstr "Parameter"
+
+#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
+msgid "Enabled"
+msgstr "Freigegeben"
+
+#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
+msgid "Disabled"
+msgstr "Gesperrt"
+
+#: ../gtk-glade/propertybox.c:480
+msgid "Account"
+msgstr "Konto"
+
+#: ../gtk-glade/propertybox.c:620
+msgid "English"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:621
+msgid "French"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:622
+msgid "Swedish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:623
+msgid "Italian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:624
+msgid "Spanish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:625
+msgid "Brazilian Portugese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:626
+msgid "Polish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:627
+msgid "German"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:628
+msgid "Russian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:629
+msgid "Japanese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:630
+msgid "Dutch"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:631
+msgid "Hungarian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:632
+msgid "Czech"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:633
+msgid "Chinese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:690
+msgid ""
+"You need to restart linphone for the new language selection to take effect."
+msgstr ""
+
+#: ../gtk-glade/update.c:80
+#, c-format
+msgid ""
+"A more recent version is availalble from %s.\n"
+"Would you like to open a browser to download it ?"
+msgstr ""
+
+#: ../gtk-glade/update.c:91
+msgid "You are running the lastest version."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:66
+msgid "Firstname, Lastname"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:73
+#, fuzzy
+msgid "SIP address"
+msgstr "Adresse"
+
+#: ../gtk-glade/buddylookup.c:121
+msgid "Error communicating with server."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:125
+#, fuzzy
+msgid "Connecting..."
+msgstr "Verbindung"
+
+#: ../gtk-glade/buddylookup.c:129
+#, fuzzy
+msgid "Connected"
+msgstr "Verbunden."
+
+#: ../gtk-glade/buddylookup.c:133
+msgid "Receiving data..."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:141
+#, c-format
+msgid "Found %i contact"
+msgid_plural "Found %i contacts"
+msgstr[0] ""
+msgstr[1] ""
+
+#: ../gtk-glade/setupwizard.c:25
+msgid ""
+"Welcome !\n"
+"This assistant will help you to use a SIP account for your calls."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:34
+msgid "Create an account by choosing a username"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:35
+msgid "I have already an account and just want to use it"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:53
+msgid "Please choose a username:"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:54
+#, fuzzy
+msgid "Username:"
+msgstr "Benutzername:"
+
+#: ../gtk-glade/setupwizard.c:92
+#, c-format
+msgid "Checking if '%s' is available..."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
+msgid "Please wait..."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:101
+msgid "Sorry this username already exists. Please try a new one."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
+msgid "Ok !"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
+msgid "Communication problem, please try again later."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:134
+msgid "Thank you. Your account is now configured and ready for use."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:228
+msgid "Welcome to the account setup assistant"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:232
+msgid "Account setup assistant"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:236
+#, fuzzy
+msgid "Choosing a username"
+msgstr "Benutzername:"
+
+#: ../gtk-glade/setupwizard.c:240
+msgid "Verifying"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:244
+#, fuzzy
+msgid "Confirmation"
+msgstr "Information"
+
+#: ../gtk-glade/setupwizard.c:249
+msgid "Creating your account"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:253
+msgid "Now ready !"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:98
+#, fuzzy
+msgid "<b>Calling...</b>"
+msgstr "Kontaktliste"
+
+#: ../gtk-glade/incall_view.c:122
+#, fuzzy
+msgid "<b>In call with</b>"
+msgstr "Kontaktliste"
+
+#: ../gtk-glade/incall_view.c:124
+msgid "00::00::00"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:140
+#, c-format
+msgid "%02i::%02i::%02i"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:158
+#, fuzzy
+msgid "<b>Call ended.</b>"
+msgstr "Anruf beendet"
+
+#: ../gtk-glade/incall_view.c:176
+#, fuzzy
+msgid "Unmute"
+msgstr "Unbegrenzt"
+
+#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
+msgid "Mute"
+msgstr ""
+
+#: ../gtk-glade/loginframe.c:82
+#, c-format
+msgid "Please enter login information for %s"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:1
+msgid "#"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:2
+msgid "*"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:3
+msgid "0"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:4
+msgid "1"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:5
+msgid "2"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:6
+msgid "3"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:7
+msgid "4"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:8
+msgid "5"
+msgstr "5"
+
+#: ../gtk-glade/main.glade.h:9
+msgid "6"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:10
+msgid "7"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:11
+msgid "8"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:12
+msgid "9"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:13
+#, fuzzy
+msgid "<b>Contact list</b>"
+msgstr "Kontaktliste"
+
+#: ../gtk-glade/main.glade.h:14
+#, fuzzy
+msgid "<b>Terminate call</b>"
+msgstr "Kontaktliste"
+
+#: ../gtk-glade/main.glade.h:15
+#, fuzzy
+msgid "<b>Welcome !</b>"
+msgstr "Kontaktliste"
+
+#: ../gtk-glade/main.glade.h:16
+msgid "A"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:17
+msgid ""
+"ADSL\n"
+"Fiber Channel"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:19
+msgid ""
+"All users\n"
+"Online users"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:21
+msgid "Assistant"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:22
+#, fuzzy
+msgid "Audio & Video"
+msgstr "Eigenschaften des Audiocodecs"
+
+#: ../gtk-glade/main.glade.h:23
+#, fuzzy
+msgid "Audio only"
+msgstr "Audio"
+
+#: ../gtk-glade/main.glade.h:24
+#, fuzzy
+msgid "Automatically log me in"
+msgstr "Automatisch einen gültigen Hostnamen erraten"
+
+#: ../gtk-glade/main.glade.h:25
+msgid "B"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
+msgid "C"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:27
+msgid "Check for updates"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:28
+msgid "D"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:29
+msgid "Default"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:30
+msgid "Digits"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:31
+#, fuzzy
+msgid "Duration"
+msgstr "Information"
+
+#: ../gtk-glade/main.glade.h:32
+#, fuzzy
+msgid "Duration:"
+msgstr "Information"
+
+#: ../gtk-glade/main.glade.h:33
+#, fuzzy
+msgid "Enable self-view"
+msgstr "Video einschalten"
+
+#: ../gtk-glade/main.glade.h:34
+msgid "Enter username, phone number, or full sip address"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:35
+#, fuzzy
+msgid "In call"
+msgstr "Eingehendes Gespr�h"
+
+#: ../gtk-glade/main.glade.h:36
+msgid "Internet connection:"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:37
+#, fuzzy
+msgid "Login information"
+msgstr "Kontaktinformationen"
+
+#: ../gtk-glade/main.glade.h:38
+msgid "Lookup:"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:39
+msgid "Main view"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:41
+#, fuzzy
+msgid "My current identity:"
+msgstr "SIP Identität"
+
+#: ../gtk-glade/main.glade.h:42
+#, fuzzy
+msgid "Password"
+msgstr "Passwort"
+
+#: ../gtk-glade/main.glade.h:43
+#, fuzzy
+msgid "SIP address or phone number:"
+msgstr "Sip-Adresse oder Telefonnummer eingeben."
+
+#: ../gtk-glade/main.glade.h:44
+#, fuzzy
+msgid "Show current call"
+msgstr "Konnte kein Anruf vornehmen"
+
+#: ../gtk-glade/main.glade.h:45
+msgid "Start call"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:46
+msgid "Terminate call"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:47
+#, fuzzy
+msgid "Username"
+msgstr "Benutzername:"
+
+#: ../gtk-glade/main.glade.h:48
+#, fuzzy
+msgid "_Linphone"
+msgstr "Linphone"
+
+#: ../gtk-glade/main.glade.h:49
+#, fuzzy
+msgid "_Modes"
+msgstr "Codecs"
+
+#: ../gtk-glade/main.glade.h:50
+#, fuzzy
+msgid "gtk-connect"
+msgstr "Verbunden."
+
+#: ../gtk-glade/main.glade.h:51
+msgid "gtk-find"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:52
+msgid "in"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:53
+#, fuzzy
+msgid "label"
+msgstr "label37"
+
+#: ../gtk-glade/about.glade.h:1
+#, fuzzy
+msgid "About linphone"
+msgstr "linphone"
+
+#: ../gtk-glade/about.glade.h:2
+msgid "An internet video phone using the standart SIP (rfc3261) protocol."
+msgstr ""
+
+#: ../gtk-glade/about.glade.h:3
+msgid "Created by Simon Morlat\n"
+msgstr ""
+
+#: ../gtk-glade/about.glade.h:5
+msgid ""
+"fr: Simon Morlat\n"
+"en: Simon Morlat and Delphine Perreau\n"
+"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
+"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
+"sv: Daniel Nylander <po@danielnylander.se>\n"
+"es: Jesus Benitez <gnelson at inMail dot sk>\n"
+"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
+"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
+"pl: Robert Nasiadek <darkone@darkone.pl>\n"
+"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
+"hu: anonymous\n"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:1
+#, fuzzy
+msgid "<b>Contact information</b>"
+msgstr "Kontaktinformationen"
+
+#: ../gtk-glade/contact.glade.h:2
+msgid "Allow this contact to see my presence status"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:4
+#, fuzzy
+msgid "SIP Address"
+msgstr "Adresse"
+
+#: ../gtk-glade/contact.glade.h:5
+msgid "Show this contact presence status"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
+#: ../gtk-glade/sip_account.glade.h:9
+msgid "gtk-cancel"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
+#: ../gtk-glade/sip_account.glade.h:10
+msgid "gtk-ok"
+msgstr ""
+
+#: ../gtk-glade/log.glade.h:1
+#, fuzzy
+msgid "Linphone debug window"
+msgstr "Linphone Ende"
+
+#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
+#: ../gtk-glade/chatroom.glade.h:2
+msgid "gtk-close"
+msgstr ""
+
+#: ../gtk-glade/password.glade.h:1
+#, fuzzy
+msgid "Linphone - Authentication required"
+msgstr "Authentifikation erfordert"
+
+#: ../gtk-glade/password.glade.h:2
+#, fuzzy
+msgid "Password:"
+msgstr "Passwort"
+
+#: ../gtk-glade/password.glade.h:3
+msgid "Please enter the domain password"
+msgstr ""
+
+#: ../gtk-glade/password.glade.h:4
+msgid "UserID"
+msgstr ""
+
+#: ../gtk-glade/call_logs.glade.h:1
+#, fuzzy
+msgid "Call history"
+msgstr "Linphone - Gesprächsverlauf"
+
+#: ../gtk-glade/sip_account.glade.h:1
+msgid "Configure a SIP account"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:2
+msgid "Linphone - Configure a SIP account"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:3
+#, fuzzy
+msgid "Publish presence information"
+msgstr "Anwesenheit Information publzieren"
+
+#: ../gtk-glade/sip_account.glade.h:4
+msgid "Register at startup"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:5
+#, fuzzy
+msgid "Registration duration (sec):"
+msgstr "Registrierungsdauer."
+
+#: ../gtk-glade/sip_account.glade.h:6
+msgid "Route (optional):"
+msgstr "Route (optional):"
+
+#: ../gtk-glade/sip_account.glade.h:7
+#, fuzzy
+msgid "SIP Proxy address:"
+msgstr "SIP Proxy:"
+
+#: ../gtk-glade/sip_account.glade.h:8
+#, fuzzy
+msgid "Your SIP identity:"
+msgstr "SIP Identität"
+
+#: ../gtk-glade/sip_account.glade.h:11
+msgid "sip:"
+msgstr "sip:"
+
+#: ../gtk-glade/chatroom.glade.h:1
+#, fuzzy
+msgid "Send"
+msgstr "Ton"
+
+#: ../gtk-glade/incoming_call.glade.h:1
+msgid "Accept"
+msgstr "Annehmen"
+
+#: ../gtk-glade/incoming_call.glade.h:2
+#, fuzzy
+msgid "Decline"
+msgstr "Leitung"
+
+#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
+msgid "Incoming call"
+msgstr "Eingehendes Gespr�h"
+
+#: ../gtk-glade/incoming_call.glade.h:4
+#, fuzzy
+msgid "Incoming call from"
+msgstr "Eingehendes Gespr�h"
+
+#: ../gtk-glade/incoming_call.glade.h:5
+#, fuzzy
+msgid "Linphone - Incoming call"
+msgstr "Eingehendes Gespr�h"
+
+#: ../gtk-glade/parameters.glade.h:1
+msgid "0 stands for \"unlimited\""
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:2
+#, fuzzy
+msgid "<b>Audio</b>"
+msgstr "Kontaktliste"
+
+#: ../gtk-glade/parameters.glade.h:3
+msgid "<b>Bandwidth control</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:4
+#, fuzzy
+msgid "<b>Codecs</b>"
+msgstr "Kontaktliste"
+
+#: ../gtk-glade/parameters.glade.h:5
+msgid "<b>Default identity</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:6
+msgid "<b>Language</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:7
+msgid "<b>NAT and Firewall</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:8
+#, fuzzy
+msgid "<b>Ports</b>"
+msgstr "Kontaktliste"
+
+#: ../gtk-glade/parameters.glade.h:9
+msgid "<b>Privacy</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:10
+#, fuzzy
+msgid "<b>Proxy accounts</b>"
+msgstr "Kontaktliste"
+
+#: ../gtk-glade/parameters.glade.h:11
+#, fuzzy
+msgid "<b>Transport</b>"
+msgstr "Kontaktliste"
+
+#: ../gtk-glade/parameters.glade.h:12
+msgid "<b>Video</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:13
+msgid "ALSA special device (optional):"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:14
+msgid "Add"
+msgstr "Hinzufgen"
+
+#: ../gtk-glade/parameters.glade.h:15
+msgid "Audio RTP/UDP:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:16
+#, fuzzy
+msgid ""
+"Audio codecs\n"
+"Video codecs"
+msgstr "Audio und Video Codecs"
+
+#: ../gtk-glade/parameters.glade.h:18
+msgid "Behind NAT / Firewall (specify gateway IP below)"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:19
+msgid "Behind NAT / Firewall (use STUN to resolve)"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:21
+msgid "CIF"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:22
+#, fuzzy
+msgid "Capture device:"
+msgstr "Audio Aufnahmegerät:"
+
+#: ../gtk-glade/parameters.glade.h:23
+#, fuzzy
+msgid "Codecs"
+msgstr "Codecs"
+
+#: ../gtk-glade/parameters.glade.h:24
+msgid "Direct connection to the Internet"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:25
+msgid "Disable"
+msgstr "Sperren"
+
+#: ../gtk-glade/parameters.glade.h:26
+#, fuzzy
+msgid "Done"
+msgstr "Gegangen"
+
+#: ../gtk-glade/parameters.glade.h:27
+#, fuzzy
+msgid "Download speed limit in Kbit/sec:"
+msgstr "Download-Bandbreite (kbit/sec):"
+
+#: ../gtk-glade/parameters.glade.h:28
+msgid "Edit"
+msgstr "Bearbeiten"
+
+#: ../gtk-glade/parameters.glade.h:29
+msgid "Enable"
+msgstr "Freigeben"
+
+#: ../gtk-glade/parameters.glade.h:30
+msgid "Enable echo cancellation"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:31
+msgid "Erase all passwords"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:32
+msgid "Manage SIP Accounts"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:33
+msgid "Multimedia settings"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:34
+#, fuzzy
+msgid "Network settings"
+msgstr "Netzwerk"
+
+#: ../gtk-glade/parameters.glade.h:35
+#, fuzzy
+msgid "Playback device:"
+msgstr "Ton Wiedergabegerät:"
+
+#: ../gtk-glade/parameters.glade.h:36
+msgid "Prefered video resolution:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:37
+#, fuzzy
+msgid "Public IP address:"
+msgstr "Sip-Adresse:"
+
+#: ../gtk-glade/parameters.glade.h:38
+msgid ""
+"Register to FONICS\n"
+"virtual network !"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:40
+msgid "Remove"
+msgstr "Entfernen"
+
+#: ../gtk-glade/parameters.glade.h:41
+#, fuzzy
+msgid "Ring device:"
+msgstr "Klingel Wiedergabegerät:"
+
+#: ../gtk-glade/parameters.glade.h:42
+#, fuzzy
+msgid "Ring sound:"
+msgstr "Klingelton:"
+
+#: ../gtk-glade/parameters.glade.h:43
+msgid "SIP (UDP):"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:44
+msgid "Send DTMFs as SIP info"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:45
+msgid "Set Maximum Transmission Unit:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:46
+msgid "Settings"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:47
+#, fuzzy
+msgid "Stun server:"
+msgstr "Umleitungs-Server"
+
+#: ../gtk-glade/parameters.glade.h:48
+msgid "This section defines your SIP address when not using a SIP account"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:49
+#, fuzzy
+msgid "Upload speed limit in Kbit/sec:"
+msgstr "Upload-Bandbreite (kbit/sec):"
+
+#: ../gtk-glade/parameters.glade.h:50
+msgid "Use IPv6 instead of IPv4"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:51
+#, fuzzy
+msgid "User interface"
+msgstr "Benutzername:"
+
+#: ../gtk-glade/parameters.glade.h:52
+msgid "Video RTP/UDP:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:53
+#, fuzzy
+msgid "Video input device:"
+msgstr "Audiogerät"
+
+#: ../gtk-glade/parameters.glade.h:54
+msgid "Your display name (eg: John Doe):"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:55
+#, fuzzy
+msgid "Your resulting SIP address:"
+msgstr "Ihre Sip-Adresse:"
+
+#: ../gtk-glade/parameters.glade.h:56
+#, fuzzy
+msgid "Your username:"
+msgstr "Benutzername:"
+
+#: ../gtk-glade/parameters.glade.h:57
+msgid "a sound card\n"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:59
+msgid "default camera"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:60
+msgid "default soundcard"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:61
+msgid "default soundcard\n"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:63
+msgid "gtk-go-down"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:64
+msgid "gtk-go-up"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:65
+msgid "gtk-media-play"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:1
+msgid "<b>Search somebody</b>"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:2
+msgid "Add to my list"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:3
+msgid "Search contacts in directory"
+msgstr ""
+
+#: ../gtk-glade/waiting.glade.h:1
+msgid "Linphone"
+msgstr "Linphone"
+
+#: ../gtk-glade/waiting.glade.h:2
+msgid "Please wait"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:195
+#, fuzzy, c-format
+msgid "You have missed %i call."
+msgid_plural "You have missed %i calls."
+msgstr[0] "Sie haben %i Anruf(e) in Abwesenheit."
+msgstr[1] "Sie haben %i Anruf(e) in Abwesenheit."
+
+#: ../coreapi/linphonecore.c:223
+msgid "aborted"
+msgstr "abgebrochen"
+
+#: ../coreapi/linphonecore.c:226
+msgid "completed"
+msgstr "beendet"
+
+#: ../coreapi/linphonecore.c:229
+msgid "missed"
+msgstr "verpasst"
+
+#: ../coreapi/linphonecore.c:234
+#, c-format
+msgid ""
+"%s at %s\n"
+"From: %s\n"
+"To: %s\n"
+"Status: %s\n"
+"Duration: %i mn %i sec\n"
+msgstr ""
+"%s am %sVon: %s\n"
+"An: %s\n"
+"Status: %s\n"
+"Dauer: %i mn %i sec\n"
+
+#: ../coreapi/linphonecore.c:235
+msgid "Outgoing call"
+msgstr "Abgehendes Gespräch"
+
+#: ../coreapi/linphonecore.c:445
+msgid ""
+"Your machine appears to be connected to an IPv6 network. By default linphone "
+"always uses IPv4. Please update your configuration if you want to use IPv6"
+msgstr ""
+"Ihr Rechner scheint an einen IPv6 Netz angeschlossen zu sein. "
+"Linphoneverwendet normalerweise IPv4. Bitte Konfiguration anpassen wenn sie "
+"IPv6 verwenden wollen"
+
+#: ../coreapi/linphonecore.c:739
+msgid "Ready"
+msgstr "Bereit"
+
+#: ../coreapi/linphonecore.c:1014
+msgid "Remote end seems to have disconnected, the call is going to be closed."
+msgstr ""
+
+#: ../coreapi/linphonecore.c:1172
+msgid "Looking for telephone number destination..."
+msgstr "Suche Telefonnummernziel.."
+
+#: ../coreapi/linphonecore.c:1174
+msgid "Could not resolve this number."
+msgstr "Konnte dies Nummer nicht auflösen."
+
+#: ../coreapi/linphonecore.c:1239
+msgid ""
+"Could not parse given sip address. A sip url usually looks like sip:"
+"user@domain"
+msgstr ""
+"Sip-Adresse kann nicht bestimmt werden. Eine Sip-Adresse hat folgenden "
+"Aufbau <sip:anwendername@domainname>"
+
+#: ../coreapi/linphonecore.c:1340
+msgid "Sorry, having multiple simultaneous calls is not supported yet !"
+msgstr "Mehrfachen gleichzeitigen Anrufen nicht unterstützt !"
+
+#: ../coreapi/linphonecore.c:1387
+msgid "Contacting"
+msgstr "Rufe an"
+
+#: ../coreapi/linphonecore.c:1402
+msgid "could not call"
+msgstr "Konnte kein Anruf vornehmen"
+
+#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
+msgid "Connected."
+msgstr "Verbunden."
+
+#: ../coreapi/linphonecore.c:1813
+msgid "Call ended"
+msgstr "Anruf beendet"
+
+#: ../coreapi/linphonecore.c:2175
+msgid "No nat/firewall address supplied !"
+msgstr "Keine Nat/Firewall Adresse vorgegeben !"
+
+#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
+#, c-format
+msgid "Invalid nat address '%s' : %s"
+msgstr "Ungültige NAT Adresse '%s' : '%s'"
+
+#: ../coreapi/misc.c:134
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the pcm oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+"'modprobe snd-pcm-oss' as root to load it."
+msgstr ""
+"Ihre Rechner verwendet anscheinend einen ALSA-Soundtreiber.\n"
+"Dies ist die beste Lösung; allerdings ist die von Linphone benötigte pcm OSS "
+"Emulation\n"
+"nicht vorhanden. Für die Einbindung des Moduls\n"
+"bitte den Befehl 'modprobe snd-pcm-oss' als Anwender-Root verwenden."
+
+#: ../coreapi/misc.c:137
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the mixer oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+" 'modprobe snd-mixer-oss' as root to load it."
+msgstr ""
+"Ihre Rechner verwendet anscheinend einen ALSA-Soundtreiber.\n"
+"Dies ist die beste Lösung; allerdings ist die von Linphone benötigte pcm OSS "
+"Emulation\n"
+"nicht vorhanden. Fr die Einbindung des Moduls\n"
+"bitte den Befehl 'modprobe snd-pcm-oss' als Anwender-Root verwenden."
+
+#: ../coreapi/misc.c:610
+msgid "Stun lookup in progress..."
+msgstr "Stun Ermittlung läuft..."
+
+#: ../coreapi/exevents.c:127
+msgid "Call terminated."
+msgstr "Anruf beendet"
+
+#: ../coreapi/exevents.c:149
+msgid "Could not reach destination."
+msgstr "Konnte Ziel nicht erreichen"
+
+#: ../coreapi/exevents.c:158
+msgid "User is busy."
+msgstr "Besetzt."
+
+#: ../coreapi/exevents.c:159
+msgid "User is temporarily unavailable."
+msgstr "Teilnehmer zur Zeit nicht ansprechbar."
+
+#: ../coreapi/exevents.c:160
+msgid "Request Cancelled."
+msgstr "Anruf annulliert."
+
+#. char *retrymsg=_("%s. Retry after %i minute(s).");
+#: ../coreapi/exevents.c:162
+msgid "User does not want to be disturbed."
+msgstr "Teilnehmer möchte nicht gestört werden."
+
+#: ../coreapi/exevents.c:163
+msgid "Call declined."
+msgstr "Anruf abgewiesen"
+
+#: ../coreapi/exevents.c:191
+msgid "Bad request"
+msgstr "Fehlerhafte Anfrage"
+
+#: ../coreapi/exevents.c:194
+msgid "User cannot be found at given address."
+msgstr "Teilnehmer ist unter der angegebene Adresse nicht erreichbar."
+
+#: ../coreapi/exevents.c:197
+msgid "Remote user cannot support any of proposed codecs."
+msgstr "Die Gegenstelle untersttzt die angebotenen Codecs nicht."
+
+#. time out, call leg is lost
+#: ../coreapi/exevents.c:227
+msgid "Timeout."
+msgstr "Zeitberschreitung."
+
+#: ../coreapi/exevents.c:230
+msgid "Remote host was found but refused connection."
+msgstr "Die Gegenstelle hat die Verbindung abgewiesen."
+
+#: ../coreapi/exevents.c:339
+msgid "is contacting you."
+msgstr "ruft Sie an"
+
+#: ../coreapi/exevents.c:424
+#, c-format
+msgid "Redirected to %s..."
+msgstr "Nach %s umgeleitet..."
+
+#: ../coreapi/exevents.c:440
+msgid ""
+"User is not reachable at the moment but he invites you\n"
+"to contact him using the following alternate resource:"
+msgstr ""
+"Teilnehmer nicht erreichbar. Bitte versuchen Sie es unter nachstehender "
+"Ressource:"
+
+#: ../coreapi/exevents.c:861
+msgid "Early media."
+msgstr ""
+
+#: ../coreapi/exevents.c:972
+#, fuzzy, c-format
+msgid "Registration on %s failed: %s"
+msgstr "Registrierung auf %s schlug fehl (Zeitberschreitung)."
+
+#: ../coreapi/exevents.c:972
+msgid "no response timeout"
+msgstr ""
+
+#: ../coreapi/exevents.c:998
+#, c-format
+msgid "Registration on %s successful."
+msgstr "Registrierung auf %s erfolgreich."
+
+#: ../coreapi/exevents.c:999
+#, fuzzy, c-format
+msgid "Unregistration on %s done."
+msgstr "Registrierung auf %s erfolgreich."
+
+#. people for which we don't have yet an answer should appear as offline
+#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
+msgid "Gone"
+msgstr "Gegangen"
+
+#: ../coreapi/presence.c:129
+msgid "Waiting for Approval"
+msgstr "Warte aud Bestätigung"
+
+#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
+msgid "Online"
+msgstr "Verbunden"
+
+#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
+msgid "Busy"
+msgstr "Besetzt"
+
+#: ../coreapi/presence.c:142
+msgid "Be Right Back"
+msgstr "Bald wieder da"
+
+#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
+msgid "Away"
+msgstr "Abwesend"
+
+#: ../coreapi/presence.c:151
+msgid "On The Phone"
+msgstr "Am Höhrer"
+
+#: ../coreapi/presence.c:156
+msgid "Out To Lunch"
+msgstr "Beim Essen"
+
+#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
+msgid "Closed"
+msgstr ""
+
+#: ../coreapi/friend.c:35
+msgid "Unknown"
+msgstr ""
+
+#: ../coreapi/friend.c:44
+#, fuzzy
+msgid "Be right back"
+msgstr "Bald wieder da"
+
+#: ../coreapi/friend.c:50
+#, fuzzy
+msgid "On the phone"
+msgstr "Am Höhrer"
+
+#: ../coreapi/friend.c:53
+#, fuzzy
+msgid "Out to lunch"
+msgstr "Beim Essen"
+
+#: ../coreapi/friend.c:56
+msgid "Do not disturb"
+msgstr "Nicht stören"
+
+#: ../coreapi/friend.c:59
+#, fuzzy
+msgid "Moved"
+msgstr "Codecs"
+
+#: ../coreapi/friend.c:62
+msgid "Using another messaging service"
+msgstr ""
+
+#: ../coreapi/friend.c:65
+#, fuzzy
+msgid "Offline"
+msgstr "Verbunden"
+
+#: ../coreapi/friend.c:68
+msgid "Pending"
+msgstr ""
+
+#: ../coreapi/friend.c:74
+msgid "Unknown-bug"
+msgstr ""
+
+#: ../coreapi/proxy.c:221
+msgid ""
+"The sip proxy address you entered is invalid, it must start with \"sip:\" "
+"followed by a hostname."
+msgstr ""
+
+#: ../coreapi/proxy.c:227
+msgid ""
+"The sip identity you entered is invalid.\n"
+"It should look like sip:username@proxydomain, such as sip:alice@example.net"
+msgstr ""
+
+#: ../coreapi/proxy.c:634
+#, fuzzy, c-format
+msgid "Could not login as %s"
+msgstr "Pixmapdatei %s nicht gefunden"
+
+#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
+msgid "ITU-G.711 alaw encoder"
+msgstr ""
+
+#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
+msgid "ITU-G.711 alaw decoder"
+msgstr ""
+
+#: ../mediastreamer2/src/alsa.c:923
+msgid "Alsa sound source"
+msgstr ""
+
+#: ../mediastreamer2/src/alsa.c:1027
+msgid "Alsa sound output"
+msgstr ""
+
+#: ../mediastreamer2/src/aqsnd.c:891
+msgid "Sound capture filter for MacOS X Audio Queue Service"
+msgstr ""
+
+#: ../mediastreamer2/src/aqsnd.c:915
+msgid "Sound playback filter for MacOS X Audio Queue Service"
+msgstr ""
+
+#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
+msgid "DTMF generator"
+msgstr ""
+
+#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
+msgid "The GSM full-rate codec"
+msgstr ""
+
+#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
+msgid "The GSM codec"
+msgstr ""
+
+#: ../mediastreamer2/src/macsnd.c:670
+msgid "Sound capture filter for MacOS X Core Audio drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/macsnd.c:684
+msgid "Sound playback filter for MacOS X Core Audio drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
+msgid "A filter to make conferencing"
+msgstr ""
+
+#: ../mediastreamer2/src/msfileplayer.c:295
+#: ../mediastreamer2/src/msfileplayer.c:313
+msgid "Raw files and wav reader"
+msgstr ""
+
+#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
+#: ../mediastreamer2/src/msfilerec_win.c:216
+#: ../mediastreamer2/src/msfilerec_win.c:234
+msgid "Wav file recorder"
+msgstr ""
+
+#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
+msgid "A filter that send several inputs to one output."
+msgstr ""
+
+#: ../mediastreamer2/src/msresample.c:221
+#: ../mediastreamer2/src/msresample.c:239
+msgid "frequency resampler"
+msgstr ""
+
+#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
+msgid "RTP output filter"
+msgstr ""
+
+#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
+msgid "RTP input filter"
+msgstr ""
+
+#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
+#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
+msgid "The free and wonderful speex codec"
+msgstr ""
+
+#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
+msgid "A filter that controls and measure sound volume"
+msgstr ""
+
+#: ../mediastreamer2/src/msv4l.c:1009
+msgid "A video4linux compatible source filter to stream pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/msv4l2.c:458
+msgid "A filter to grab pictures from Video4Linux2-powered cameras"
+msgstr ""
+
+#: ../mediastreamer2/src/nowebcam.c:1780
+msgid "A filter that outputs a static image."
+msgstr ""
+
+#: ../mediastreamer2/src/oss.c:567
+msgid "Sound capture filter for OSS drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/oss.c:581
+msgid "Sound playback filter for OSS drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
+msgid "A pixel format converter"
+msgstr ""
+
+#: ../mediastreamer2/src/sizeconv.c:204
+msgid "A video size converter"
+msgstr ""
+
+#: ../mediastreamer2/src/sizeconv.c:222
+msgid "a small video size converter"
+msgstr ""
+
+#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
+msgid "Echo canceler using speex library"
+msgstr ""
+
+#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
+msgid "A filter that reads from input and copy to its multiple outputs."
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:375
+msgid "The theora video encoder from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:393
+msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
+msgid "The theora video decoder from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
+msgid "ITU-G.711 ulaw encoder"
+msgstr ""
+
+#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
+msgid "ITU-G.711 ulaw decoder"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
+#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
+msgid "A H.263 decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:688
+msgid "A MPEG4 decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:704
+msgid "A RTP/JPEG decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:720
+msgid "A MJPEG decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:736
+msgid "A snow decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
+msgid "A video H.263 encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:856
+msgid ""
+"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
+"spec."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
+msgid "A video MPEG4 encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:888
+msgid "A video snow encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:904
+msgid "A RTP/MJPEG encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:938
+msgid ""
+"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:970
+msgid ""
+"The snow codec is royalty-free and is open-source. \n"
+"It uses innovative techniques that makes it one of most promising video "
+"codec. It is implemented within the ffmpeg project.\n"
+"However it is under development, quite unstable and compatibility with other "
+"versions cannot be guaranteed."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:990
+msgid "A MJPEG encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
+msgid "A generic video display"
+msgstr ""
+
+#: ../mediastreamer2/src/wincevideods.c:966
+#: ../mediastreamer2/src/wincevideods.c:984
+#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
+#: ../mediastreamer2/src/winvideods.c:1306
+#: ../mediastreamer2/src/winvideods.c:1324
+msgid "A video4windows compatible source filter to stream pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
+msgid "A video for windows (vfw.h) based source filter to grab pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
+msgid "ICE filter"
+msgstr ""
+
+#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
+msgid "A filter that trashes its input (useful for terminating some graphs)."
+msgstr ""
+
+#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
+msgid "Parametric sound equalizer."
+msgstr ""
+
+#: ../mediastreamer2/src/msdscap-mingw.cc:1003
+msgid "A webcam grabber based on directshow."
+msgstr ""
+
+#, fuzzy
+#~ msgid "_View"
+#~ msgstr "Video"
+
+#, fuzzy
+#~ msgid "Display filters"
+#~ msgstr "Angezeigter Name:"
+
+#, fuzzy
+#~ msgid "_Properties"
+#~ msgstr "RTP-Eigenschaften"
+
+#, fuzzy
+#~ msgid "Show logs"
+#~ msgstr "Zeigt Gespräche"
+
+#, fuzzy
+#~ msgid "_About"
+#~ msgstr "Konto"
+
+#, fuzzy
+#~ msgid "gtk-remove"
+#~ msgstr "Entfernen"
+
+#, fuzzy
+#~ msgid "Proxy in use"
+#~ msgstr "Benutze Proxy-Server:"
+
+#~ msgid "Sound"
+#~ msgstr "Ton"
+
+#, fuzzy
+#~ msgid "Default identity"
+#~ msgstr "SIP Identität"
+
+#, fuzzy
+#~ msgid "Proxy accounts"
+#~ msgstr "Benutze Proxy-Server:"
+
+#~ msgid "Go"
+#~ msgstr "Start"
+
+#~ msgid "Address book"
+#~ msgstr "Adressbuch"
+
+#~ msgid "Exit"
+#~ msgstr "Beenden"
+
+#~ msgid "Help"
+#~ msgstr "Hilfe"
+
+#~ msgid "Shows the address book"
+#~ msgstr "Adressbuch"
+
+#~ msgid "..."
+#~ msgstr "..."
+
+#~ msgid ""
+#~ "Call or\n"
+#~ "answer"
+#~ msgstr ""
+#~ "Anrufen oder\n"
+#~ "Entgegennehmen"
+
+#~ msgid ""
+#~ "Hangup\n"
+#~ "or refuse"
+#~ msgstr ""
+#~ "Auflegen\n"
+#~ "oder Abweisen"
+
+#~ msgid "Or chat !"
+#~ msgstr "Oder Chat"
+
+#~ msgid "Show more..."
+#~ msgstr "Mehr anzeigen"
+
+#~ msgid "Playback level:"
+#~ msgstr "Abhörpegel"
+
+#~ msgid "Recording level:"
+#~ msgstr "Aufnamepegel"
+
+#~ msgid "Ring level:"
+#~ msgstr "Klingelpegel"
+
+#~ msgid "Controls"
+#~ msgstr "Kontrolle"
+
+#~ msgid "Reachable"
+#~ msgstr "Erreichbar"
+
+#~ msgid "Busy, I'll be back in "
+#~ msgstr "Beschäftigt, wieder erreichbar in "
+
+#~ msgid "The other party will be informed that you'll be back in X minutes"
+#~ msgstr ""
+#~ "Der Teilnehmer wird informiert, dass Sie in X Minuten wieder anwesend "
+#~ "sind."
+
+#~ msgid "mn"
+#~ msgstr "mn"
+
+#~ msgid "Moved temporarily"
+#~ msgstr "Unterwegs"
+
+#~ msgid "Alternative service"
+#~ msgstr "Andere Dienste"
+
+#~ msgid "URL:"
+#~ msgstr "URL:"
+
+#~ msgid "Presence"
+#~ msgstr "Anwesenheit"
+
+#~ msgid "Press digits to send DTMFs."
+#~ msgstr "Zifferntasten drücken, um DTMF zu senden"
+
+#~ msgid "DTMF"
+#~ msgstr "DTMF"
+
+#~ msgid "My online friends"
+#~ msgstr "Meine online Freunde"
+
+#~ msgid ""
+#~ "C: 2001\n"
+#~ "Made in Old Europe"
+#~ msgstr ""
+#~ "C: 2001\n"
+#~ "In Alt Europa erzeugt"
+
+#~ msgid ""
+#~ "Linphone is a web-phone.\n"
+#~ "It is compatible with SIP and RTP protocols."
+#~ msgstr ""
+#~ "Linphone ist ein web-phone.\n"
+#~ "Es ist mit den SIP- und RTP-Protokollen kompatibel."
+
+#~ msgid "Use IPv6 network (if available)"
+#~ msgstr "IPv6 Netzwerk (falls vorhanden) verwenden"
+
+# msgstr "Teilnehmer zur Zeit nicht ansprechbar."
+#~ msgid ""
+#~ "Toggle this if you are on an ipv6 network and you wish linphone to use it."
+#~ msgstr ""
+#~ "Ankreuzen wenn Sie ein ipv6 Netz haben und wenn Sie es wünschen dass "
+#~ "linphone es verwendet"
+
+#~ msgid ""
+#~ "These options is only for users in a private network, behind a gateway. "
+#~ "If you are not in this situation, then leave this empty."
+#~ msgstr ""
+#~ "Diese Option gilt nur für Anwender in einem privaten Netzwerk oder wenn "
+#~ "der Rechner durch einen Firewall geschützt ist. Andernfalls wird das Feld "
+#~ "nicht ausgefüllt"
+
+#~ msgid "No firewall"
+#~ msgstr "Kein Firewall"
+
+#~ msgid "Use this STUN server to guess firewall address :"
+#~ msgstr "Dieses STUN Server verwenden um die Firewalladresse zu Ermitteln"
+
+#~ msgid "Specify firewall address manually:"
+#~ msgstr "Firewall Adresse von Hand angeben"
+
+#~ msgid "NAT traversal options (experimental)"
+#~ msgstr "NAT-Transversaloptionen (experimentell)"
+
+#~ msgid "Number of buffered miliseconds (jitter compensation):"
+#~ msgstr "Anzahl der gepufferten Pakete (Jitterausgleich):"
+
+#~ msgid "RTP port used for audio:"
+#~ msgstr "Sound RTP Port:"
+
+#~ msgid "Use SIP INFO message instead of RTP rfc2833 for DTMF transmitting"
+#~ msgstr "Benutze SIP INFO Nachricht statt RTP rfc2833 für DTMF Übertragung"
+
+#~ msgid "RTP-RFC2833 is the recommended way."
+#~ msgstr "RTP-RFC2833 wird empfohlen"
+
+#~ msgid "Other"
+#~ msgstr "Andere"
+
+#~ msgid "micro"
+#~ msgstr "Mikrofon"
+
+#~ msgid "Recording source:"
+#~ msgstr "Aufnahmequelle:"
+
+#~ msgid "Enable echo-canceler (cancels the echo heard by the remote party)"
+#~ msgstr ""
+#~ "Echounterdrückung einschalten (eliminiert das von Gesprächspartnet "
+#~ "gehörter Echo)"
+
+#~ msgid "Listen"
+#~ msgstr "Anhören"
+
+#~ msgid "Sound properties"
+#~ msgstr "Audio Eigenschaften"
+
+#~ msgid "Run sip user agent on port:"
+#~ msgstr "Sip \"user agent\" an Port:"
+
+#~ msgid "It is strongly recommended to use port 5060."
+#~ msgstr "Wir empfehlen, Port 5060 zu verwenden"
+
+#~ msgid "SIP port"
+#~ msgstr "SIP-Port"
+
+#~ msgid "@"
+#~ msgstr "@"
+
+#~ msgid "Identity"
+#~ msgstr "Identität"
+
+#~ msgid "Add proxy/registrar"
+#~ msgstr "Proxy/Registrator hinzufügen"
+
+#~ msgid "Remote services"
+#~ msgstr "Dienste auf entferntem Server"
+
+#~ msgid "Clear all stored authentication information (username,password...)"
+#~ msgstr ""
+#~ "Alle gespeicherten Authentifikationsinformationen löschen (Benutzername, "
+#~ "Passwort,...)"
+
+#~ msgid "Authentication information"
+#~ msgstr "Authentifikationsinformation"
+
+#~ msgid "SIP"
+#~ msgstr "SIP"
+
+#~ msgid "List of audio codecs, in order of preference:"
+#~ msgstr "Liste von Audio-CoDecs in der Reihenfolge ihrer Präferenz"
+
+#~ msgid "Video Codecs"
+#~ msgstr "Videocodecs"
+
+#~ msgid ""
+#~ "Note: Codecs in red are not usable regarding to your connection type to "
+#~ "the internet."
+#~ msgstr ""
+#~ "Notiz: Rot markierten Codecs können bei Ihrer Internetverbindungsart "
+#~ "nicht verwendet werden."
+
+#~ msgid "No information availlable"
+#~ msgstr "Informationen nicht verfügbar"
+
+#~ msgid "Codec information"
+#~ msgstr "Codec Information"
+
+#~ msgid "Address Book"
+#~ msgstr "Adressbuch"
+
+#~ msgid "Select"
+#~ msgstr "Auswählen"
+
+#~ msgid ""
+#~ "User is not reachable at the moment but he invites you to contact him "
+#~ "using the following alternate ressource:"
+#~ msgstr ""
+#~ "Teilnehmer nicht erreichbar. Bitte stattdessen nachstehende Ressource "
+#~ "verwenden:"
+
+#~ msgid "None."
+#~ msgstr "Nichts."
+
+#~ msgid "Proxy/Registrar configuration box"
+#~ msgstr "Proxy/Registrator Konfigurationsbox"
+
+#~ msgid "Send registration:"
+#~ msgstr "Sende Registrierung:"
+
+#~ msgid "Name:"
+#~ msgstr "Name:"
+
+#~ msgid "Subscribe policy:"
+#~ msgstr "Subskription Police"
+
+#~ msgid "Send subscription (see person's online status)"
+#~ msgstr "Sende Subskription (zeige Onlinestatus der Person an)"
+
+#~ msgid "New incoming subscription"
+#~ msgstr "Neu ankommende Subskription"
+
+#~ msgid "You have received a new subscription..."
+#~ msgstr "Sie haben eine neue Subskription empfangen"
+
+#~ msgid "Refuse"
+#~ msgstr "Ablehnen"
+
+#~ msgid "Authentication required for realm"
+#~ msgstr "Authentifikation erforderlich für Bereich"
+
+#~ msgid "userid:"
+#~ msgstr "Benutzer ID:"
+
+#~ msgid "realm:"
+#~ msgstr "Bereich:"
+
+#~ msgid "Chat Room"
+#~ msgstr "Chat Raum"
+
+#~ msgid "Text:"
+#~ msgstr "Text"
+
+#~ msgid "The caller asks for resource reservation. Do you agree ?"
+#~ msgstr "Der Anrufer erbittet Resourcenreservierung. Sind Sie einverstanden?"
+
+#~ msgid ""
+#~ "The caller doesn't use resource reservation. \t\t\t\t\tDo you wish to "
+#~ "continue anyway ?"
+#~ msgstr ""
+#~ "Der Anrufer benutzt keine Resourcenreservierung. \t\t\t\t\tWollen Sie "
+#~ "dennoch fortfahren?"
+
+#~ msgid "linphone - receiving call from %s"
+#~ msgstr "Linphone- empfängt ein Anruf von %s"
+
+#~ msgid ""
+#~ "You have received a subscription from %s.This means that this person "
+#~ "wishes to be notified of your presence information (online, busy, "
+#~ "away...).\n"
+#~ "Do you agree ?"
+#~ msgstr ""
+#~ "Sie haben eine Subskription von %s empfangen. Das heißt, dass diese "
+#~ "Person ber Ihre Anwesenheitsinformation benachrichtigt werden will "
+#~ "(erreichbar, beschäftig, abwesend...).\n"
+#~ "Sind Sie einverstanden ?"
+
+#~ msgid "Authentication required for realm %s"
+#~ msgstr "Authentifikation erforderlich für Bereich %s"
+
+#~ msgid "None"
+#~ msgstr "Keinen"
+
+#~ msgid "Wait"
+#~ msgstr "Warten"
+
+#~ msgid "Deny"
+#~ msgstr "Abweisen"
+
+#~ msgid "Bad sip address: a sip address looks like sip:user@domain"
+#~ msgstr ""
+#~ "Fehlerhafte Sip-Adresse. Eine Sip-Adresse hat folgenden Aufbau <sip:"
+#~ "anwendername@domainname>"
+
+#~ msgid "Stun lookup done..."
+#~ msgstr "Stun Ermittlung beendet..."
+
+#~ msgid "enter sip uri here"
+#~ msgstr "Sip URI eingeben"
+
+#~ msgid "User manual"
+#~ msgstr "Anwender-Handbuch"
+
+#~ msgid "Ring sound selection"
+#~ msgstr "Klingelton ausw�len"
+
+#~ msgid "Communication ended."
+#~ msgstr "Kommunikation beendet."
+
+#~ msgid "Call cancelled."
+#~ msgstr "Anruf annulliert"
+
+#, fuzzy
+#~ msgid "Firewall 's external ip address (in dot notations):"
+#~ msgstr "IP-Adresse des Firewall (in Punktnotation)"
+
+#, fuzzy
+#~ msgid "Server address"
+#~ msgstr "Server-Adresse:"
+
+#~ msgid "28k modem"
+#~ msgstr "28K Modem"
+
+#~ msgid "56k modem"
+#~ msgstr "56K Modem"
+
+#~ msgid "64k modem (numeris)"
+#~ msgstr "64K Modem (ISDN)"
+
+#~ msgid "ADSL or Cable modem"
+#~ msgstr "ADSL oder Kabel-Modem"
+
+#~ msgid "Ethernet or equivalent"
+#~ msgstr "Ethernet oder äquivalent"
+
+#~ msgid "Connection type:"
+#~ msgstr "Verbindungstyp:"
+
+#, fuzzy
+#~ msgid ""
+#~ "Linphone could not open audio device %s. Check if your sound card is "
+#~ "fully configured and working."
+#~ msgstr ""
+#~ "Linphone kann das Soundgerät nicht öffnen. Prfen Sie nach, ob die "
+#~ "Soundkarte vollst�dig konfiguriert und funktionsfähig ist."
+
+#~ msgid "Type here the sip address of the person you want to call."
+#~ msgstr ""
+#~ "Geben Sie die Sip-Adresse des Anwenders, den Sie anrufen möchten, hier "
+#~ "ein."
+
+#~ msgid ""
+#~ "Release or\n"
+#~ "Refuse"
+#~ msgstr ""
+#~ "Auflegen oder\n"
+#~ "Abweisen"
+
+#~ msgid "%s. Retry after %i minute(s)."
+#~ msgstr "%s. In %i Minuten wieder versuchen."
+
+#~ msgid "Timeout..."
+#~ msgstr "Zeitüberschreitung..."
+
+#, fuzzy
+#~ msgid ""
+#~ "Add address\n"
+#~ "book"
+#~ msgstr "Adressbuch"
+
+#~ msgid "Toggle this if you want to be registered on a remote server."
+#~ msgstr ""
+#~ "Bitte ankreuzen, wenn Sie auf einem Sip-Server registriert werden wollen."
+
+#~ msgid "Address of record:"
+#~ msgstr "Adresse des Eintrags:"
+
+#~ msgid ""
+#~ "The password used for registration. On some servers it is not necessary"
+#~ msgstr ""
+#~ "Passwort für die Registrierung.  Bei manchen Servern nicht erforderlich."
+
+#~ msgid "Use this registrar server as outbound proxy."
+#~ msgstr "Verwenden Sie diesen Registrarserver als externen proxy."
+
+#~ msgid "sip address:"
+#~ msgstr "SIP-Adresse:"
+
+#~ msgid "Modify"
+#~ msgstr "Ändern"
+
+#~ msgid "Registering..."
+#~ msgstr "Registrierung"
+
+#~ msgid ""
+#~ "You are currently using the i810_audio driver.\n"
+#~ "This driver is buggy and so does not work with Linphone.\n"
+#~ "We suggest that you replace it by its equivalent ALSA driver,\n"
+#~ "either with packages from your distribution, or by downloading\n"
+#~ "ALSA drivers at http://www.alsa-project.org."
+#~ msgstr ""
+#~ "Sie verwenden zur Zeit den i810_audio Treiber.\n"
+#~ "Diese Treiber ist fehlerhaft und funktioniert nicht mit Linphone\n"
+#~ "Wir empfehlen, den Treiber entweder durch das ALSA-Treiber-Paket von "
+#~ "ihrer Distribution\n"
+#~ "zu ersetzen oder die gewnschten ALSA-Treiber von http://www.alsa-project."
+#~ "org\n"
+#~ "zu beziehen und zu installieren"
+
+#~ msgid "Unregistration successfull."
+#~ msgstr "Abmeldung erfolgreich."
+
+#~ msgid "Select network interface to use:"
+#~ msgstr "Netzwerkschnittstelle wählen:"
+
+#~ msgid "Network interface properties"
+#~ msgstr "Eigenschaften der Netzwerkschnittstelle"
+
+#~ msgid "RTP"
+#~ msgstr "RTP"
+
+#~ msgid "C: 2001"
+#~ msgstr "April 2001"
+
+#~ msgid "Threads not supported by glib. Upgrade your glib.\n"
+#~ msgstr ""
+#~ "Threads werden von glib nicht unterstützt.  Bitte aktualisieren Sie Ihre "
+#~ "glib.\n"
+
+#~ msgid "Run linphone as a gnome-applet."
+#~ msgstr "Linphone als gnome-Applet ausfhren."
+
+#~ msgid "Run linphone as a daemon (for use without gnome)."
+#~ msgstr "Linphone als daemon ausführen (Verwendung ohne Gnome)."
+
+#~ msgid ""
+#~ "Cannot find network previously used interface %s.\n"
+#~ "If your computer is temporary connected to the internet, please connect "
+#~ "and then run linphone.\n"
+#~ "If you want to change your default network interface, go to the "
+#~ "parameters 'box."
+#~ msgstr ""
+#~ "Linphone konnte die zuvor verwendete Netzwerkschnittstelle %s nicht "
+#~ "finden.\n"
+#~ "Wenn linphone nur temporär am Internet angeschlossen ist, stellen Sie "
+#~ "eine Verbindung her und rufen Sie linphone erneut auf.\n"
+#~ "Wenn Sie die vorgegebene Netzwerkschnittstelle ändern wollen, wählen Sie "
+#~ "bitte \"Einstellungen\"."
+
+#~ msgid ""
+#~ "Linphone cannot open the audio device.\n"
+#~ "It may be caused by other programs using it.\n"
+#~ "Do you want linphone to kill these programs (esd or artsd) ?"
+#~ msgstr ""
+#~ "Linphone kann die Soundschnittstelle nicht öffnen.\n"
+#~ "Dies kann durch andere Applikationen verursacht sein.\n"
+#~ "Möchten sie diese Programme (esd oder artsd) beenden?"
+
+#~ msgid "Use it as a:"
+#~ msgstr "Verwenden als:"
+
+#~ msgid "Outbound proxy"
+#~ msgstr "Ausgehender Proxy-Server"
+
+#~ msgid ""
+#~ "Toggle this button if the registrar must be used to proxy calls through a "
+#~ "firewall."
+#~ msgstr ""
+#~ "Verwenden Sie diesen Knopf, falls der Registrar zum Tunneln durch einen "
+#~ "Firewall verwendet werden muß"
+
+#~ msgid "kbit/s"
+#~ msgstr "Kbits/s"
+
+#~ msgid "OSS"
+#~ msgstr "OSS"
+
+#~ msgid "ALSA"
+#~ msgstr "ALSA"
+
+#~ msgid "Automatically kill applications using soundcard when needed"
+#~ msgstr "Applikationen die die Soundkarte verwenden, automatisch beenden."
+
+#~ msgid ""
+#~ "Your computer is connected to several networks. Check in the global "
+#~ "parameters if Linphone uses the one that you want."
+#~ msgstr ""
+#~ "Ihr Rechner ist an mehere Netze angeschlossen. Stellen Sie sicher, daß in "
+#~ "den Globalen Parametern die richtige Schnittstelle selektiert ist."
+
+#~ msgid ""
+#~ "Linphone failed to open the sound device. See the README file included in "
+#~ "the distribution for details."
+#~ msgstr ""
+#~ "Linphone konnte die Soundschnittstelle nicht öffnen. Weitere "
+#~ "Informationen finden Sie in der README-Datei (enthalten in der "
+#~ "Distribution)."
+
+#~ msgid "Interface not found."
+#~ msgstr "Schnittstelle nicht gefunden."
+
+#~ msgid "Warning"
+#~ msgstr "Warnung"
+
+#~ msgid ""
+#~ "Linphone cannot open the sound device. It may be caused by other programs "
+#~ "using it. Do you want linphone to kill these programs (esd or artsd) ?"
+#~ msgstr ""
+#~ "Linphone kann die Soundschnittstelle nicht öffnen. Dies kann durch andere "
+#~ "Applikationen verursacht sein. Möchten sie diese Programme (esd oder "
+#~ "artsd) beenden?"
+
+#~ msgid "Linphone shutdowns..."
+#~ msgstr "Linphone Ende..."
+
+#~ msgid ""
+#~ "Please, wait a few seconds untils linphone unregisters your sip addess "
+#~ "from registrar server..."
+#~ msgstr "Bitte einige Sekunden warten, bis Sip-Adresse ausgetragen ist."
+
+#~ msgid "Bad formuled sip address."
+#~ msgstr "SIP-Adresse fehlerhaft."
+
+#~ msgid "Couldn't create pixmap from file: %s"
+#~ msgstr "Konnte Pixmap nicht aus Datei %s erzeugen."
+
+#~ msgid ""
+#~ "Linphone did not detect any valid network interface. If you use a "
+#~ "temporary internet connection, please connect and then run linphone again."
+#~ msgstr ""
+#~ "Linphone konnte keine Netzwerkschnittstelle finden. Wenn Sie nur eine "
+#~ "temporäre Internetverbindung haben, bitte erneut eine Internetverbindung "
+#~ "herstellen und linphone nochmals starten."
+
+#~ msgid "List of network interfaces on your system."
+#~ msgstr "Vorhandene Netzwerkschnittstellen ihres Systems"
diff --git a/po/en@boldquot.header b/po/en@boldquot.header
new file mode 100644 (file)
index 0000000..fedb6a0
--- /dev/null
@@ -0,0 +1,25 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
+# This catalog furthermore displays the text between the quotation marks in
+# bold face, assuming the VT100/XTerm escape sequences.
+#
diff --git a/po/en@quot.header b/po/en@quot.header
new file mode 100644 (file)
index 0000000..a9647fc
--- /dev/null
@@ -0,0 +1,22 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
diff --git a/po/es.po b/po/es.po
new file mode 100644 (file)
index 0000000..5f486ce
--- /dev/null
+++ b/po/es.po
@@ -0,0 +1,2041 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: Linphone 0.9.1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-10-16 15:24+0200\n"
+"PO-Revision-Date: 2002-10-15 HO:MI+ZONE\n"
+"Last-Translator: Nelson Benitez <gnelson@inMail.sk>\n"
+"Language-Team: es <es@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
+#: ../gtk-glade/support.c:102
+#, c-format
+msgid "Couldn't find pixmap file: %s"
+msgstr "No se pudo encontrar el archivo pixmap: %s"
+
+#: ../gtk-glade/chat.c:27
+#, c-format
+msgid "Chat with %s"
+msgstr ""
+
+#: ../gtk-glade/main.c:90
+msgid "log to stdout some debug information while running."
+msgstr ""
+
+#: ../gtk-glade/main.c:97
+msgid "Start only in the system tray, do not show the main interface."
+msgstr ""
+
+#: ../gtk-glade/main.c:104
+msgid "address to call right now"
+msgstr ""
+
+#: ../gtk-glade/main.c:111
+msgid "if set automatically answer incoming calls"
+msgstr ""
+
+#: ../gtk-glade/main.c:119
+msgid ""
+"Specifiy a working directory (should be the base of the installation, eg: c:"
+"\\Program Files\\Linphone)"
+msgstr ""
+
+#: ../gtk-glade/main.c:675
+#, c-format
+msgid "Incoming call from %s"
+msgstr ""
+
+#: ../gtk-glade/main.c:707
+#, c-format
+msgid ""
+"%s would like to add you to his contact list.\n"
+"Would you allow him to see your presence status or add him to your contact "
+"list ?\n"
+"If you answer no, this person will be temporarily blacklisted."
+msgstr ""
+
+#: ../gtk-glade/main.c:777
+#, c-format
+msgid ""
+"Please enter your password for username <i>%s</i>\n"
+" at domain <i>%s</i>:"
+msgstr ""
+
+#: ../gtk-glade/main.c:871
+msgid "Website link"
+msgstr ""
+
+#: ../gtk-glade/main.c:907
+msgid "Linphone - a video internet phone"
+msgstr ""
+
+#: ../gtk-glade/main.c:926
+#, c-format
+msgid "%s (Default)"
+msgstr ""
+
+#: ../gtk-glade/main.c:1168
+msgid "A free SIP video-phone"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
+#: ../gtk-glade/contact.glade.h:3
+msgid "Name"
+msgstr "Nombre"
+
+#: ../gtk-glade/friendlist.c:212
+#, fuzzy
+msgid "Presence status"
+msgstr "Estado"
+
+#: ../gtk-glade/friendlist.c:243
+#, c-format
+msgid "Search in %s directory"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:432
+msgid "Invalid sip contact !"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:474
+#, c-format
+msgid "Call %s"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:475
+#, c-format
+msgid "Send text to %s"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:476
+#, fuzzy, c-format
+msgid "Edit contact '%s'"
+msgstr "(Ninguna informacion de contacto !)"
+
+#: ../gtk-glade/friendlist.c:477
+#, c-format
+msgid "Delete contact '%s'"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:519
+#, c-format
+msgid "Add new contact from %s directory"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:251
+msgid "Rate (Hz)"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:257
+msgid "Status"
+msgstr "Estado"
+
+#: ../gtk-glade/propertybox.c:263
+msgid "Min bitrate (kbit/s)"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:269
+msgid "Parameters"
+msgstr "Parametros"
+
+#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
+msgid "Enabled"
+msgstr "Activado"
+
+#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
+msgid "Disabled"
+msgstr "Desactivado"
+
+#: ../gtk-glade/propertybox.c:480
+msgid "Account"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:620
+msgid "English"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:621
+msgid "French"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:622
+msgid "Swedish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:623
+msgid "Italian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:624
+msgid "Spanish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:625
+msgid "Brazilian Portugese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:626
+msgid "Polish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:627
+msgid "German"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:628
+msgid "Russian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:629
+msgid "Japanese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:630
+msgid "Dutch"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:631
+msgid "Hungarian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:632
+msgid "Czech"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:633
+msgid "Chinese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:690
+msgid ""
+"You need to restart linphone for the new language selection to take effect."
+msgstr ""
+
+#: ../gtk-glade/update.c:80
+#, c-format
+msgid ""
+"A more recent version is availalble from %s.\n"
+"Would you like to open a browser to download it ?"
+msgstr ""
+
+#: ../gtk-glade/update.c:91
+msgid "You are running the lastest version."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:66
+msgid "Firstname, Lastname"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:73
+#, fuzzy
+msgid "SIP address"
+msgstr "Direccion"
+
+#: ../gtk-glade/buddylookup.c:121
+msgid "Error communicating with server."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:125
+#, fuzzy
+msgid "Connecting..."
+msgstr "Conexion"
+
+#: ../gtk-glade/buddylookup.c:129
+#, fuzzy
+msgid "Connected"
+msgstr "Conectado."
+
+#: ../gtk-glade/buddylookup.c:133
+msgid "Receiving data..."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:141
+#, c-format
+msgid "Found %i contact"
+msgid_plural "Found %i contacts"
+msgstr[0] ""
+msgstr[1] ""
+
+#: ../gtk-glade/setupwizard.c:25
+msgid ""
+"Welcome !\n"
+"This assistant will help you to use a SIP account for your calls."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:34
+msgid "Create an account by choosing a username"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:35
+msgid "I have already an account and just want to use it"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:53
+msgid "Please choose a username:"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:54
+#, fuzzy
+msgid "Username:"
+msgstr "Manual de Usuario"
+
+#: ../gtk-glade/setupwizard.c:92
+#, c-format
+msgid "Checking if '%s' is available..."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
+msgid "Please wait..."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:101
+msgid "Sorry this username already exists. Please try a new one."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
+msgid "Ok !"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
+msgid "Communication problem, please try again later."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:134
+msgid "Thank you. Your account is now configured and ready for use."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:228
+msgid "Welcome to the account setup assistant"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:232
+msgid "Account setup assistant"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:236
+msgid "Choosing a username"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:240
+msgid "Verifying"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:244
+#, fuzzy
+msgid "Confirmation"
+msgstr "Informacion"
+
+#: ../gtk-glade/setupwizard.c:249
+msgid "Creating your account"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:253
+msgid "Now ready !"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:98
+#, fuzzy
+msgid "<b>Calling...</b>"
+msgstr "Contactando "
+
+#: ../gtk-glade/incall_view.c:122
+#, fuzzy
+msgid "<b>In call with</b>"
+msgstr "Contactando "
+
+#: ../gtk-glade/incall_view.c:124
+msgid "00::00::00"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:140
+#, c-format
+msgid "%02i::%02i::%02i"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:158
+#, fuzzy
+msgid "<b>Call ended.</b>"
+msgstr "Llamada cancelada."
+
+#: ../gtk-glade/incall_view.c:176
+msgid "Unmute"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
+msgid "Mute"
+msgstr ""
+
+#: ../gtk-glade/loginframe.c:82
+#, c-format
+msgid "Please enter login information for %s"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:1
+msgid "#"
+msgstr "#"
+
+#: ../gtk-glade/main.glade.h:2
+msgid "*"
+msgstr "*"
+
+#: ../gtk-glade/main.glade.h:3
+msgid "0"
+msgstr "0"
+
+#: ../gtk-glade/main.glade.h:4
+msgid "1"
+msgstr "1"
+
+#: ../gtk-glade/main.glade.h:5
+msgid "2"
+msgstr "2"
+
+#: ../gtk-glade/main.glade.h:6
+msgid "3"
+msgstr "3"
+
+#: ../gtk-glade/main.glade.h:7
+msgid "4"
+msgstr "4"
+
+#: ../gtk-glade/main.glade.h:8
+msgid "5"
+msgstr "10"
+
+#: ../gtk-glade/main.glade.h:9
+msgid "6"
+msgstr "6"
+
+#: ../gtk-glade/main.glade.h:10
+msgid "7"
+msgstr "7"
+
+#: ../gtk-glade/main.glade.h:11
+msgid "8"
+msgstr "8"
+
+#: ../gtk-glade/main.glade.h:12
+msgid "9"
+msgstr "9"
+
+#: ../gtk-glade/main.glade.h:13
+#, fuzzy
+msgid "<b>Contact list</b>"
+msgstr "Contactando "
+
+#: ../gtk-glade/main.glade.h:14
+#, fuzzy
+msgid "<b>Terminate call</b>"
+msgstr "Contactando "
+
+#: ../gtk-glade/main.glade.h:15
+#, fuzzy
+msgid "<b>Welcome !</b>"
+msgstr "Contactando "
+
+#: ../gtk-glade/main.glade.h:16
+msgid "A"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:17
+msgid ""
+"ADSL\n"
+"Fiber Channel"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:19
+msgid ""
+"All users\n"
+"Online users"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:21
+msgid "Assistant"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:22
+#, fuzzy
+msgid "Audio & Video"
+msgstr "Propiedades del codec de Audio"
+
+#: ../gtk-glade/main.glade.h:23
+#, fuzzy
+msgid "Audio only"
+msgstr "Propiedades del codec de Audio"
+
+#: ../gtk-glade/main.glade.h:24
+msgid "Automatically log me in"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:25
+msgid "B"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
+msgid "C"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:27
+msgid "Check for updates"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:28
+msgid "D"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:29
+msgid "Default"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:30
+msgid "Digits"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:31
+#, fuzzy
+msgid "Duration"
+msgstr "Informacion"
+
+#: ../gtk-glade/main.glade.h:32
+#, fuzzy
+msgid "Duration:"
+msgstr "Informacion"
+
+#: ../gtk-glade/main.glade.h:33
+#, fuzzy
+msgid "Enable self-view"
+msgstr "Activado"
+
+#: ../gtk-glade/main.glade.h:34
+msgid "Enter username, phone number, or full sip address"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:35
+msgid "In call"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:36
+msgid "Internet connection:"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:37
+#, fuzzy
+msgid "Login information"
+msgstr "Informacion de codec"
+
+#: ../gtk-glade/main.glade.h:38
+msgid "Lookup:"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:39
+msgid "Main view"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:41
+#, fuzzy
+msgid "My current identity:"
+msgstr "Identidad"
+
+#: ../gtk-glade/main.glade.h:42
+#, fuzzy
+msgid "Password"
+msgstr "Tu Contraseña:"
+
+#: ../gtk-glade/main.glade.h:43
+#, fuzzy
+msgid "SIP address or phone number:"
+msgstr "La direccion SIP del servidor de registro."
+
+#: ../gtk-glade/main.glade.h:44
+msgid "Show current call"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:45
+msgid "Start call"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:46
+msgid "Terminate call"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:47
+#, fuzzy
+msgid "Username"
+msgstr "Manual de Usuario"
+
+#: ../gtk-glade/main.glade.h:48
+#, fuzzy
+msgid "_Linphone"
+msgstr "linphone"
+
+#: ../gtk-glade/main.glade.h:49
+#, fuzzy
+msgid "_Modes"
+msgstr "Codecs"
+
+#: ../gtk-glade/main.glade.h:50
+#, fuzzy
+msgid "gtk-connect"
+msgstr "Conectado."
+
+#: ../gtk-glade/main.glade.h:51
+msgid "gtk-find"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:52
+msgid "in"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:53
+msgid "label"
+msgstr ""
+
+#: ../gtk-glade/about.glade.h:1
+#, fuzzy
+msgid "About linphone"
+msgstr "linphone"
+
+#: ../gtk-glade/about.glade.h:2
+msgid "An internet video phone using the standart SIP (rfc3261) protocol."
+msgstr ""
+
+#: ../gtk-glade/about.glade.h:3
+msgid "Created by Simon Morlat\n"
+msgstr ""
+
+#: ../gtk-glade/about.glade.h:5
+msgid ""
+"fr: Simon Morlat\n"
+"en: Simon Morlat and Delphine Perreau\n"
+"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
+"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
+"sv: Daniel Nylander <po@danielnylander.se>\n"
+"es: Jesus Benitez <gnelson at inMail dot sk>\n"
+"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
+"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
+"pl: Robert Nasiadek <darkone@darkone.pl>\n"
+"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
+"hu: anonymous\n"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:1
+#, fuzzy
+msgid "<b>Contact information</b>"
+msgstr "Informacion de codec"
+
+#: ../gtk-glade/contact.glade.h:2
+msgid "Allow this contact to see my presence status"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:4
+#, fuzzy
+msgid "SIP Address"
+msgstr "Direccion"
+
+#: ../gtk-glade/contact.glade.h:5
+msgid "Show this contact presence status"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
+#: ../gtk-glade/sip_account.glade.h:9
+msgid "gtk-cancel"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
+#: ../gtk-glade/sip_account.glade.h:10
+msgid "gtk-ok"
+msgstr ""
+
+#: ../gtk-glade/log.glade.h:1
+#, fuzzy
+msgid "Linphone debug window"
+msgstr "Linphone esta terminando..."
+
+#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
+#: ../gtk-glade/chatroom.glade.h:2
+msgid "gtk-close"
+msgstr ""
+
+#: ../gtk-glade/password.glade.h:1
+msgid "Linphone - Authentication required"
+msgstr ""
+
+#: ../gtk-glade/password.glade.h:2
+#, fuzzy
+msgid "Password:"
+msgstr "Tu Contraseña:"
+
+#: ../gtk-glade/password.glade.h:3
+msgid "Please enter the domain password"
+msgstr ""
+
+#: ../gtk-glade/password.glade.h:4
+msgid "UserID"
+msgstr ""
+
+#: ../gtk-glade/call_logs.glade.h:1
+msgid "Call history"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:1
+msgid "Configure a SIP account"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:2
+msgid "Linphone - Configure a SIP account"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:3
+#, fuzzy
+msgid "Publish presence information"
+msgstr "Informacion de codec"
+
+#: ../gtk-glade/sip_account.glade.h:4
+msgid "Register at startup"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:5
+#, fuzzy
+msgid "Registration duration (sec):"
+msgstr "Se ha registrado con exito."
+
+#: ../gtk-glade/sip_account.glade.h:6
+msgid "Route (optional):"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:7
+#, fuzzy
+msgid "SIP Proxy address:"
+msgstr "Direccion SIP"
+
+#: ../gtk-glade/sip_account.glade.h:8
+#, fuzzy
+msgid "Your SIP identity:"
+msgstr "Identidad"
+
+#: ../gtk-glade/sip_account.glade.h:11
+msgid "sip:"
+msgstr "SIP:"
+
+#: ../gtk-glade/chatroom.glade.h:1
+#, fuzzy
+msgid "Send"
+msgstr "Sonido"
+
+#: ../gtk-glade/incoming_call.glade.h:1
+msgid "Accept"
+msgstr ""
+
+#: ../gtk-glade/incoming_call.glade.h:2
+#, fuzzy
+msgid "Decline"
+msgstr "linea"
+
+#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
+msgid "Incoming call"
+msgstr ""
+
+#: ../gtk-glade/incoming_call.glade.h:4
+msgid "Incoming call from"
+msgstr ""
+
+#: ../gtk-glade/incoming_call.glade.h:5
+msgid "Linphone - Incoming call"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:1
+msgid "0 stands for \"unlimited\""
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:2
+#, fuzzy
+msgid "<b>Audio</b>"
+msgstr "Contactando "
+
+#: ../gtk-glade/parameters.glade.h:3
+msgid "<b>Bandwidth control</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:4
+#, fuzzy
+msgid "<b>Codecs</b>"
+msgstr "Contactando "
+
+#: ../gtk-glade/parameters.glade.h:5
+msgid "<b>Default identity</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:6
+msgid "<b>Language</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:7
+msgid "<b>NAT and Firewall</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:8
+#, fuzzy
+msgid "<b>Ports</b>"
+msgstr "Contactando "
+
+#: ../gtk-glade/parameters.glade.h:9
+msgid "<b>Privacy</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:10
+#, fuzzy
+msgid "<b>Proxy accounts</b>"
+msgstr "Contactando "
+
+#: ../gtk-glade/parameters.glade.h:11
+#, fuzzy
+msgid "<b>Transport</b>"
+msgstr "Contactando "
+
+#: ../gtk-glade/parameters.glade.h:12
+msgid "<b>Video</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:13
+msgid "ALSA special device (optional):"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:14
+msgid "Add"
+msgstr "Añadir"
+
+#: ../gtk-glade/parameters.glade.h:15
+msgid "Audio RTP/UDP:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:16
+#, fuzzy
+msgid ""
+"Audio codecs\n"
+"Video codecs"
+msgstr "Propiedades del codec de Audio"
+
+#: ../gtk-glade/parameters.glade.h:18
+msgid "Behind NAT / Firewall (specify gateway IP below)"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:19
+msgid "Behind NAT / Firewall (use STUN to resolve)"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:21
+msgid "CIF"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:22
+#, fuzzy
+msgid "Capture device:"
+msgstr "Usar dispositivo de sonido:"
+
+#: ../gtk-glade/parameters.glade.h:23
+#, fuzzy
+msgid "Codecs"
+msgstr "Codecs"
+
+#: ../gtk-glade/parameters.glade.h:24
+msgid "Direct connection to the Internet"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:25
+msgid "Disable"
+msgstr "Desactivado"
+
+#: ../gtk-glade/parameters.glade.h:26
+#, fuzzy
+msgid "Done"
+msgstr "Ninguno."
+
+#: ../gtk-glade/parameters.glade.h:27
+msgid "Download speed limit in Kbit/sec:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:28
+msgid "Edit"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:29
+msgid "Enable"
+msgstr "Activado"
+
+#: ../gtk-glade/parameters.glade.h:30
+msgid "Enable echo cancellation"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:31
+msgid "Erase all passwords"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:32
+msgid "Manage SIP Accounts"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:33
+msgid "Multimedia settings"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:34
+#, fuzzy
+msgid "Network settings"
+msgstr "Red"
+
+#: ../gtk-glade/parameters.glade.h:35
+#, fuzzy
+msgid "Playback device:"
+msgstr "Usar dispositivo de sonido:"
+
+#: ../gtk-glade/parameters.glade.h:36
+msgid "Prefered video resolution:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:37
+#, fuzzy
+msgid "Public IP address:"
+msgstr "Direccion SIP"
+
+#: ../gtk-glade/parameters.glade.h:38
+msgid ""
+"Register to FONICS\n"
+"virtual network !"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:40
+msgid "Remove"
+msgstr "Borrar"
+
+#: ../gtk-glade/parameters.glade.h:41
+#, fuzzy
+msgid "Ring device:"
+msgstr "Usar dispositivo de sonido:"
+
+#: ../gtk-glade/parameters.glade.h:42
+#, fuzzy
+msgid "Ring sound:"
+msgstr "Fuente de grabacion:"
+
+#: ../gtk-glade/parameters.glade.h:43
+msgid "SIP (UDP):"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:44
+msgid "Send DTMFs as SIP info"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:45
+msgid "Set Maximum Transmission Unit:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:46
+msgid "Settings"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:47
+#, fuzzy
+msgid "Stun server:"
+msgstr "Servidor de Redireccionamiento"
+
+#: ../gtk-glade/parameters.glade.h:48
+msgid "This section defines your SIP address when not using a SIP account"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:49
+msgid "Upload speed limit in Kbit/sec:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:50
+msgid "Use IPv6 instead of IPv4"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:51
+#, fuzzy
+msgid "User interface"
+msgstr "Manual de Usuario"
+
+#: ../gtk-glade/parameters.glade.h:52
+msgid "Video RTP/UDP:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:53
+#, fuzzy
+msgid "Video input device:"
+msgstr "Usar dispositivo de sonido:"
+
+#: ../gtk-glade/parameters.glade.h:54
+msgid "Your display name (eg: John Doe):"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:55
+#, fuzzy
+msgid "Your resulting SIP address:"
+msgstr "Tu direccion SIP:"
+
+#: ../gtk-glade/parameters.glade.h:56
+msgid "Your username:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:57
+msgid "a sound card\n"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:59
+msgid "default camera"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:60
+msgid "default soundcard"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:61
+msgid "default soundcard\n"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:63
+msgid "gtk-go-down"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:64
+msgid "gtk-go-up"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:65
+msgid "gtk-media-play"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:1
+msgid "<b>Search somebody</b>"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:2
+msgid "Add to my list"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:3
+msgid "Search contacts in directory"
+msgstr ""
+
+#: ../gtk-glade/waiting.glade.h:1
+#, fuzzy
+msgid "Linphone"
+msgstr "linphone"
+
+#: ../gtk-glade/waiting.glade.h:2
+msgid "Please wait"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:195
+#, c-format
+msgid "You have missed %i call."
+msgid_plural "You have missed %i calls."
+msgstr[0] ""
+msgstr[1] ""
+
+#: ../coreapi/linphonecore.c:223
+msgid "aborted"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:226
+msgid "completed"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:229
+msgid "missed"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:234
+#, c-format
+msgid ""
+"%s at %s\n"
+"From: %s\n"
+"To: %s\n"
+"Status: %s\n"
+"Duration: %i mn %i sec\n"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:235
+msgid "Outgoing call"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:445
+msgid ""
+"Your machine appears to be connected to an IPv6 network. By default linphone "
+"always uses IPv4. Please update your configuration if you want to use IPv6"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:739
+#, fuzzy
+msgid "Ready"
+msgstr "Preparado."
+
+#: ../coreapi/linphonecore.c:1014
+msgid "Remote end seems to have disconnected, the call is going to be closed."
+msgstr ""
+
+#: ../coreapi/linphonecore.c:1172
+msgid "Looking for telephone number destination..."
+msgstr ""
+
+#: ../coreapi/linphonecore.c:1174
+msgid "Could not resolve this number."
+msgstr ""
+
+#: ../coreapi/linphonecore.c:1239
+#, fuzzy
+msgid ""
+"Could not parse given sip address. A sip url usually looks like sip:"
+"user@domain"
+msgstr ""
+"Direccion SIP mal escrita. Una direccion SIP es <sip:username@domainname>"
+
+#: ../coreapi/linphonecore.c:1340
+msgid "Sorry, having multiple simultaneous calls is not supported yet !"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:1387
+#, fuzzy
+msgid "Contacting"
+msgstr "Contactando "
+
+#: ../coreapi/linphonecore.c:1402
+msgid "could not call"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
+msgid "Connected."
+msgstr "Conectado."
+
+#: ../coreapi/linphonecore.c:1813
+#, fuzzy
+msgid "Call ended"
+msgstr "Llamada cancelada."
+
+#: ../coreapi/linphonecore.c:2175
+msgid "No nat/firewall address supplied !"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
+#, c-format
+msgid "Invalid nat address '%s' : %s"
+msgstr ""
+
+#: ../coreapi/misc.c:134
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the pcm oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+"'modprobe snd-pcm-oss' as root to load it."
+msgstr ""
+"Tu ordenador parece estar usando los controladores de ALSA.\n"
+"Esa es la mejor eleccion. Sin embargo el modulo de emulacion pcm de OSS\n"
+"no se encuentra y linphone lo necesita. Por favor ejecute\n"
+"'modprobe snd-pcm-oss' como root para cargarlo."
+
+#: ../coreapi/misc.c:137
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the mixer oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+" 'modprobe snd-mixer-oss' as root to load it."
+msgstr ""
+"Tu ordenador parece estar usando los controladores de ALSA.\n"
+"Esa es la mejor eleccion. Sin embargo el modulo de emulacion mixer de OSS\n"
+"no se encuentra y linphone lo necesita. Por favor ejecute\n"
+" 'modprobe snd-mixer-oss' como root para cargarlo."
+
+#: ../coreapi/misc.c:610
+msgid "Stun lookup in progress..."
+msgstr ""
+
+#: ../coreapi/exevents.c:127
+#, fuzzy
+msgid "Call terminated."
+msgstr "Llamada cancelada."
+
+#: ../coreapi/exevents.c:149
+msgid "Could not reach destination."
+msgstr ""
+
+#: ../coreapi/exevents.c:158
+msgid "User is busy."
+msgstr "El usuario esta ocupado."
+
+#: ../coreapi/exevents.c:159
+msgid "User is temporarily unavailable."
+msgstr "El usuario le dice que volvera enseguida."
+
+#: ../coreapi/exevents.c:160
+#, fuzzy
+msgid "Request Cancelled."
+msgstr "Llamada cancelada."
+
+#. char *retrymsg=_("%s. Retry after %i minute(s).");
+#: ../coreapi/exevents.c:162
+msgid "User does not want to be disturbed."
+msgstr "El usuario no quiere que lo molesten."
+
+#: ../coreapi/exevents.c:163
+msgid "Call declined."
+msgstr "Llamada cancelada."
+
+#: ../coreapi/exevents.c:191
+msgid "Bad request"
+msgstr ""
+
+#: ../coreapi/exevents.c:194
+msgid "User cannot be found at given address."
+msgstr "No se encontro ningun usuario en la direccion indicada."
+
+#: ../coreapi/exevents.c:197
+msgid "Remote user cannot support any of proposed codecs."
+msgstr "El usuario remoto no soporta ninguno de los codecs propuestos."
+
+#. time out, call leg is lost
+#: ../coreapi/exevents.c:227
+msgid "Timeout."
+msgstr "Tiempo agotado."
+
+#: ../coreapi/exevents.c:230
+msgid "Remote host was found but refused connection."
+msgstr "Se encontro host remoto pero rechazo la conexion."
+
+#: ../coreapi/exevents.c:339
+#, fuzzy
+msgid "is contacting you."
+msgstr "le esta llamando."
+
+#: ../coreapi/exevents.c:424
+#, c-format
+msgid "Redirected to %s..."
+msgstr ""
+
+#: ../coreapi/exevents.c:440
+msgid ""
+"User is not reachable at the moment but he invites you\n"
+"to contact him using the following alternate resource:"
+msgstr ""
+"Usuario no disponible en este momento pero le invita\n"
+"a contactarle usando el siguiente recurso alternativo:"
+
+#: ../coreapi/exevents.c:861
+msgid "Early media."
+msgstr ""
+
+#: ../coreapi/exevents.c:972
+#, fuzzy, c-format
+msgid "Registration on %s failed: %s"
+msgstr "Se ha registrado con exito."
+
+#: ../coreapi/exevents.c:972
+msgid "no response timeout"
+msgstr ""
+
+#: ../coreapi/exevents.c:998
+#, fuzzy, c-format
+msgid "Registration on %s successful."
+msgstr "Se ha registrado con exito."
+
+#: ../coreapi/exevents.c:999
+#, fuzzy, c-format
+msgid "Unregistration on %s done."
+msgstr "Se ha registrado con exito."
+
+#. people for which we don't have yet an answer should appear as offline
+#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
+#, fuzzy
+msgid "Gone"
+msgstr "Ninguno."
+
+#: ../coreapi/presence.c:129
+msgid "Waiting for Approval"
+msgstr ""
+
+#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
+#, fuzzy
+msgid "Online"
+msgstr "linea"
+
+#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
+msgid "Busy"
+msgstr ""
+
+#: ../coreapi/presence.c:142
+msgid "Be Right Back"
+msgstr ""
+
+#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
+msgid "Away"
+msgstr "Ausente"
+
+#: ../coreapi/presence.c:151
+msgid "On The Phone"
+msgstr ""
+
+#: ../coreapi/presence.c:156
+msgid "Out To Lunch"
+msgstr ""
+
+#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
+msgid "Closed"
+msgstr ""
+
+#: ../coreapi/friend.c:35
+msgid "Unknown"
+msgstr ""
+
+#: ../coreapi/friend.c:44
+msgid "Be right back"
+msgstr ""
+
+#: ../coreapi/friend.c:50
+#, fuzzy
+msgid "On the phone"
+msgstr "linphone"
+
+#: ../coreapi/friend.c:53
+msgid "Out to lunch"
+msgstr ""
+
+#: ../coreapi/friend.c:56
+msgid "Do not disturb"
+msgstr "No molestar"
+
+#: ../coreapi/friend.c:59
+#, fuzzy
+msgid "Moved"
+msgstr "Codecs"
+
+#: ../coreapi/friend.c:62
+msgid "Using another messaging service"
+msgstr ""
+
+#: ../coreapi/friend.c:65
+#, fuzzy
+msgid "Offline"
+msgstr "linea"
+
+#: ../coreapi/friend.c:68
+msgid "Pending"
+msgstr ""
+
+#: ../coreapi/friend.c:74
+msgid "Unknown-bug"
+msgstr ""
+
+#: ../coreapi/proxy.c:221
+msgid ""
+"The sip proxy address you entered is invalid, it must start with \"sip:\" "
+"followed by a hostname."
+msgstr ""
+
+#: ../coreapi/proxy.c:227
+msgid ""
+"The sip identity you entered is invalid.\n"
+"It should look like sip:username@proxydomain, such as sip:alice@example.net"
+msgstr ""
+
+#: ../coreapi/proxy.c:634
+#, fuzzy, c-format
+msgid "Could not login as %s"
+msgstr "No se pudo encontrar el archivo pixmap: %s"
+
+#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
+msgid "ITU-G.711 alaw encoder"
+msgstr ""
+
+#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
+msgid "ITU-G.711 alaw decoder"
+msgstr ""
+
+#: ../mediastreamer2/src/alsa.c:923
+msgid "Alsa sound source"
+msgstr ""
+
+#: ../mediastreamer2/src/alsa.c:1027
+msgid "Alsa sound output"
+msgstr ""
+
+#: ../mediastreamer2/src/aqsnd.c:891
+msgid "Sound capture filter for MacOS X Audio Queue Service"
+msgstr ""
+
+#: ../mediastreamer2/src/aqsnd.c:915
+msgid "Sound playback filter for MacOS X Audio Queue Service"
+msgstr ""
+
+#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
+msgid "DTMF generator"
+msgstr ""
+
+#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
+msgid "The GSM full-rate codec"
+msgstr ""
+
+#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
+msgid "The GSM codec"
+msgstr ""
+
+#: ../mediastreamer2/src/macsnd.c:670
+msgid "Sound capture filter for MacOS X Core Audio drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/macsnd.c:684
+msgid "Sound playback filter for MacOS X Core Audio drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
+msgid "A filter to make conferencing"
+msgstr ""
+
+#: ../mediastreamer2/src/msfileplayer.c:295
+#: ../mediastreamer2/src/msfileplayer.c:313
+msgid "Raw files and wav reader"
+msgstr ""
+
+#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
+#: ../mediastreamer2/src/msfilerec_win.c:216
+#: ../mediastreamer2/src/msfilerec_win.c:234
+msgid "Wav file recorder"
+msgstr ""
+
+#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
+msgid "A filter that send several inputs to one output."
+msgstr ""
+
+#: ../mediastreamer2/src/msresample.c:221
+#: ../mediastreamer2/src/msresample.c:239
+msgid "frequency resampler"
+msgstr ""
+
+#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
+msgid "RTP output filter"
+msgstr ""
+
+#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
+msgid "RTP input filter"
+msgstr ""
+
+#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
+#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
+msgid "The free and wonderful speex codec"
+msgstr ""
+
+#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
+msgid "A filter that controls and measure sound volume"
+msgstr ""
+
+#: ../mediastreamer2/src/msv4l.c:1009
+msgid "A video4linux compatible source filter to stream pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/msv4l2.c:458
+msgid "A filter to grab pictures from Video4Linux2-powered cameras"
+msgstr ""
+
+#: ../mediastreamer2/src/nowebcam.c:1780
+msgid "A filter that outputs a static image."
+msgstr ""
+
+#: ../mediastreamer2/src/oss.c:567
+msgid "Sound capture filter for OSS drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/oss.c:581
+msgid "Sound playback filter for OSS drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
+msgid "A pixel format converter"
+msgstr ""
+
+#: ../mediastreamer2/src/sizeconv.c:204
+msgid "A video size converter"
+msgstr ""
+
+#: ../mediastreamer2/src/sizeconv.c:222
+msgid "a small video size converter"
+msgstr ""
+
+#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
+msgid "Echo canceler using speex library"
+msgstr ""
+
+#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
+msgid "A filter that reads from input and copy to its multiple outputs."
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:375
+msgid "The theora video encoder from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:393
+msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
+msgid "The theora video decoder from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
+msgid "ITU-G.711 ulaw encoder"
+msgstr ""
+
+#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
+msgid "ITU-G.711 ulaw decoder"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
+#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
+msgid "A H.263 decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:688
+msgid "A MPEG4 decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:704
+msgid "A RTP/JPEG decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:720
+msgid "A MJPEG decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:736
+msgid "A snow decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
+msgid "A video H.263 encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:856
+msgid ""
+"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
+"spec."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
+msgid "A video MPEG4 encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:888
+msgid "A video snow encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:904
+msgid "A RTP/MJPEG encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:938
+msgid ""
+"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:970
+msgid ""
+"The snow codec is royalty-free and is open-source. \n"
+"It uses innovative techniques that makes it one of most promising video "
+"codec. It is implemented within the ffmpeg project.\n"
+"However it is under development, quite unstable and compatibility with other "
+"versions cannot be guaranteed."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:990
+msgid "A MJPEG encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
+msgid "A generic video display"
+msgstr ""
+
+#: ../mediastreamer2/src/wincevideods.c:966
+#: ../mediastreamer2/src/wincevideods.c:984
+#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
+#: ../mediastreamer2/src/winvideods.c:1306
+#: ../mediastreamer2/src/winvideods.c:1324
+msgid "A video4windows compatible source filter to stream pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
+msgid "A video for windows (vfw.h) based source filter to grab pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
+msgid "ICE filter"
+msgstr ""
+
+#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
+msgid "A filter that trashes its input (useful for terminating some graphs)."
+msgstr ""
+
+#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
+msgid "Parametric sound equalizer."
+msgstr ""
+
+#: ../mediastreamer2/src/msdscap-mingw.cc:1003
+msgid "A webcam grabber based on directshow."
+msgstr ""
+
+#, fuzzy
+#~ msgid "Display filters"
+#~ msgstr "Nombre a mostrar:"
+
+#, fuzzy
+#~ msgid "_Properties"
+#~ msgstr "Propiedades de RTP"
+
+#, fuzzy
+#~ msgid "gtk-remove"
+#~ msgstr "Borrar"
+
+#, fuzzy
+#~ msgid "Proxy in use"
+#~ msgstr "Servidor Proxy"
+
+#~ msgid "Sound"
+#~ msgstr "Sonido"
+
+#, fuzzy
+#~ msgid "Default identity"
+#~ msgstr "Identidad"
+
+#, fuzzy
+#~ msgid "Proxy accounts"
+#~ msgstr "Servidor Proxy"
+
+#~ msgid "Address book"
+#~ msgstr "Agenda"
+
+#, fuzzy
+#~ msgid "Shows the address book"
+#~ msgstr "Muestra la Agenda"
+
+#, fuzzy
+#~ msgid ""
+#~ "Call or\n"
+#~ "answer"
+#~ msgstr ""
+#~ "Llamar o\n"
+#~ "Responder"
+
+#~ msgid "Show more..."
+#~ msgstr "Mostrar mas..."
+
+#~ msgid "Playback level:"
+#~ msgstr "Nivel de reproduccion:"
+
+#~ msgid "Recording level:"
+#~ msgstr "Nivel de Grabacion:"
+
+#, fuzzy
+#~ msgid "Ring level:"
+#~ msgstr "Nivel de Grabacion:"
+
+#~ msgid "Reachable"
+#~ msgstr "Disponible"
+
+#~ msgid "Busy, I'll be back in "
+#~ msgstr "Ocupado, estare de vuelta en "
+
+#~ msgid "The other party will be informed that you'll be back in X minutes"
+#~ msgstr ""
+#~ "Se le comunicara a la otra persona que estaras de vuelta en X minutos"
+
+#~ msgid "mn"
+#~ msgstr "min"
+
+#~ msgid "Moved temporarily"
+#~ msgstr "Vengo enseguida"
+
+#~ msgid "Alternative service"
+#~ msgstr "Servicio alternativo"
+
+#~ msgid "URL:"
+#~ msgstr "URL:"
+
+#~ msgid "Presence"
+#~ msgstr "Estado"
+
+#~ msgid "Press digits to send DTMFs."
+#~ msgstr "Pulsa los digitos para mandar DTMFs."
+
+#~ msgid "DTMF"
+#~ msgstr "DTMF"
+
+#~ msgid ""
+#~ "Linphone is a web-phone.\n"
+#~ "It is compatible with SIP and RTP protocols."
+#~ msgstr ""
+#~ "Linphone es un telefono para Internet.\n"
+#~ "Es compatible con los protocolos SIP y RTP."
+
+#, fuzzy
+#~ msgid "Use IPv6 network (if available)"
+#~ msgstr "El usuario le dice que volvera enseguida."
+
+#, fuzzy
+#~ msgid ""
+#~ "These options is only for users in a private network, behind a gateway. "
+#~ "If you are not in this situation, then leave this empty."
+#~ msgstr ""
+#~ "Esta opcion es solo para usuarios en una red privada, detras de un "
+#~ "cortafuegos. Siese no es tu caso, deja esto vacio."
+
+#, fuzzy
+#~ msgid "NAT traversal options (experimental)"
+#~ msgstr "Opciones para NAT transversal (experimental)"
+
+#, fuzzy
+#~ msgid "Number of buffered miliseconds (jitter compensation):"
+#~ msgstr "Numero de milisegundos en el buffer(compensacion jitter):"
+
+#~ msgid "RTP port used for audio:"
+#~ msgstr "Puerto RTP usado para audio:"
+
+#~ msgid "micro"
+#~ msgstr "microfono"
+
+#~ msgid "Recording source:"
+#~ msgstr "Fuente de grabacion:"
+
+#~ msgid "Sound properties"
+#~ msgstr "Propiedades de sonido"
+
+#~ msgid "Run sip user agent on port:"
+#~ msgstr "Ejecutar SIP user agent en el puerto:"
+
+#~ msgid "It is strongly recommended to use port 5060."
+#~ msgstr "Se recomienda encarecidamente usar el puerto 5060."
+
+#~ msgid "SIP port"
+#~ msgstr "Puerto SIP"
+
+#~ msgid "@"
+#~ msgstr "@"
+
+#~ msgid "Identity"
+#~ msgstr "Identidad"
+
+#, fuzzy
+#~ msgid "Add proxy/registrar"
+#~ msgstr "Usar el registro SIP"
+
+#~ msgid "Remote services"
+#~ msgstr "Servicios Remotos:"
+
+#, fuzzy
+#~ msgid "Authentication information"
+#~ msgstr "Informacion de codec"
+
+#~ msgid "SIP"
+#~ msgstr "SIP"
+
+#~ msgid "List of audio codecs, in order of preference:"
+#~ msgstr "Lista de codecs de audio, en orden de preferencia:"
+
+#, fuzzy
+#~ msgid "Video Codecs"
+#~ msgstr "Propiedades del codec de Audio"
+
+#~ msgid ""
+#~ "Note: Codecs in red are not usable regarding to your connection type to "
+#~ "the internet."
+#~ msgstr ""
+#~ "Nota: Los codecs en ROJO no son adecuados para tu conexion a internet."
+
+#, fuzzy
+#~ msgid "No information availlable"
+#~ msgstr "Informacion no disponible"
+
+#, fuzzy
+#~ msgid "Codec information"
+#~ msgstr "Informacion de codec"
+
+#~ msgid "Address Book"
+#~ msgstr "Agenda"
+
+#~ msgid "Select"
+#~ msgstr "Seleccionar"
+
+#~ msgid ""
+#~ "User is not reachable at the moment but he invites you to contact him "
+#~ "using the following alternate ressource:"
+#~ msgstr ""
+#~ "Usuario no disponible en este momento pero le invita a contactarle usando "
+#~ "el siguiente recurso alternativo:"
+
+#~ msgid "None."
+#~ msgstr "Ninguno."
+
+#, fuzzy
+#~ msgid "Name:"
+#~ msgstr "Nombre"
+
+#, fuzzy
+#~ msgid "None"
+#~ msgstr "Ninguno."
+
+#, fuzzy
+#~ msgid "Bad sip address: a sip address looks like sip:user@domain"
+#~ msgstr ""
+#~ "Direccion SIP mal escrita. Una direccion SIP es <sip:username@domainname>"
+
+#~ msgid "Communication ended."
+#~ msgstr "Comunicacion finalizada."
+
+#~ msgid "Call cancelled."
+#~ msgstr "Llamada cancelada."
+
+#, fuzzy
+#~ msgid "Firewall 's external ip address (in dot notations):"
+#~ msgstr "Direccion IP del cortafuegos (en notacion con puntos):"
+
+#~ msgid "Index"
+#~ msgstr "Indice"
+
+#, fuzzy
+#~ msgid "Server address"
+#~ msgstr "Direccion del Servidor:"
+
+#~ msgid "28k modem"
+#~ msgstr "modem 28k"
+
+#~ msgid "56k modem"
+#~ msgstr "modem 56k"
+
+#~ msgid "64k modem (numeris)"
+#~ msgstr "modem 64k (numeris)"
+
+#~ msgid "ADSL or Cable modem"
+#~ msgstr "ADSL o Cable"
+
+#~ msgid "Ethernet or equivalent"
+#~ msgstr "Ethernet o equivalente"
+
+#~ msgid "Connection type:"
+#~ msgstr "Tipo de conexion:"
+
+#, fuzzy
+#~ msgid ""
+#~ "Linphone could not open audio device %s. Check if your sound card is "
+#~ "fully configured and working."
+#~ msgstr ""
+#~ "Linphone no pudo abrir el dispositivo de audio. Asegurese que su tarjeta "
+#~ "de sonido esta completamente configurada y operativa."
+
+#~ msgid "Type here the sip address of the person you want to call."
+#~ msgstr "Escribe aqui la direccion SIP de la persona que quieres llamar."
+
+#~ msgid ""
+#~ "Release or\n"
+#~ "Refuse"
+#~ msgstr ""
+#~ "Descolgar o\n"
+#~ "Rechazar"
+
+#~ msgid "%s. Retry after %i minute(s)."
+#~ msgstr "%s. Reintentar tras %i minutos."
+
+#, fuzzy
+#~ msgid "Timeout..."
+#~ msgstr "Tiempo agotado."
+
+#, fuzzy
+#~ msgid ""
+#~ "Add address\n"
+#~ "book"
+#~ msgstr "Agenda"
+
+#~ msgid "Toggle this if you want to be registered on a remote server."
+#~ msgstr "Marcar opcion si desea registrarse en un servidor remoto."
+
+#~ msgid "Address of record:"
+#~ msgstr "Nombre de registro:"
+
+#~ msgid ""
+#~ "The password used for registration. On some servers it is not necessary"
+#~ msgstr ""
+#~ "La contraseña usada para registrarse. En algunos servidores no es "
+#~ "necesaria"
+
+#~ msgid "Use this registrar server as outbound proxy."
+#~ msgstr "Usar el servidor de registro como outbound proxy."
+
+#~ msgid "sip address:"
+#~ msgstr "Direccion SIP:"
+
+#~ msgid "Modify"
+#~ msgstr "Modificar"
+
+#~ msgid "Registering..."
+#~ msgstr "Registrando..."
+
+#~ msgid ""
+#~ "You are currently using the i810_audio driver.\n"
+#~ "This driver is buggy and so does not work with Linphone.\n"
+#~ "We suggest that you replace it by its equivalent ALSA driver,\n"
+#~ "either with packages from your distribution, or by downloading\n"
+#~ "ALSA drivers at http://www.alsa-project.org."
+#~ msgstr ""
+#~ "Estas usando actualmente el controlador i810_audio.\n"
+#~ "Ese controlador tiene errores y por tanto no funciona con Linphone.\n"
+#~ "Le recomendamos que lo sustituya por su controlador equivalente de ALSA,\n"
+#~ "ya sea mediante paquetes de su distribucion, o descargando\n"
+#~ "controladores ALSA de http://www.alsa-project.org."
+
+#~ msgid "Unregistration successfull."
+#~ msgstr "Cancelacion del registro completada."
+
+#~ msgid "C: 2001"
+#~ msgstr "Abril 2001"
+
+#~ msgid "Select network interface to use:"
+#~ msgstr "Selecciona la interfaz de red para usar:"
+
+#~ msgid "Network interface properties"
+#~ msgstr "Propiedades de Interfaz de Red:"
+
+#~ msgid "RTP"
+#~ msgstr "RTP"
+
+#~ msgid "Threads not supported by glib. Upgrade your glib.\n"
+#~ msgstr "Threads no soportados por glib. Actualize su glib.\n"
+
+#~ msgid "Run linphone as a gnome-applet."
+#~ msgstr "Lanzar linphone como un gnome-applet."
+
+#~ msgid "Run linphone as a daemon (for use without gnome)."
+#~ msgstr "Ejecutar linphone como demonio (para uso sin gnome)."
+
+#~ msgid ""
+#~ "Cannot find network previously used interface %s.\n"
+#~ "If your computer is temporary connected to the internet, please connect "
+#~ "and then run linphone.\n"
+#~ "If you want to change your default network interface, go to the "
+#~ "parameters 'box."
+#~ msgstr ""
+#~ "No se puede encontrar la interfaz de red usada previamente %s.\n"
+#~ "Si tu ordenador esta conectado temporalmente a Internet, por favor "
+#~ "conecta y entonces ejecuta linphone.\n"
+#~ "Si quieres cambiar tu interfaz de red predeterminada, ve a la opcion "
+#~ "Parametros."
+
+#, fuzzy
+#~ msgid ""
+#~ "Linphone cannot open the audio device.\n"
+#~ "It may be caused by other programs using it.\n"
+#~ "Do you want linphone to kill these programs (esd or artsd) ?"
+#~ msgstr ""
+#~ "Linphone no puede abrir el dispositivo de audio.\n"
+#~ " Puede deberse a que otros programas lo esten usando.\n"
+#~ "¿ Quiere que Linphone cierre esos programas (esd o artsd) ?"
+
+#~ msgid "Use it as a:"
+#~ msgstr "Usarlo como un:"
+
+#~ msgid "Outbound proxy"
+#~ msgstr "Outbound proxy"
+
+#~ msgid ""
+#~ "Togle this button if the registrar must be used to proxy calls through a "
+#~ "firewall."
+#~ msgstr ""
+#~ "Marcar esta opcion si el servidor de registro debe ser usado para "
+#~ "llamadas a proxy a traves de un cortafuegos."
+
+#~ msgid "OSS"
+#~ msgstr "OSS"
+
+#~ msgid "ALSA"
+#~ msgstr "ALSA"
+
+#~ msgid "Automatically kill applications using soundcard when needed"
+#~ msgstr ""
+#~ "Cerrar aplicaciones que usen la tarjeta de sonido cuando se necesite."
+
+#~ msgid ""
+#~ "Your computer is connected to several networks. Check in the global "
+#~ "parameters if Linphone uses the one that you want."
+#~ msgstr ""
+#~ "Tu ordenador esta conectado a varias redes. Revisa en los Parametros "
+#~ "globales si Linphone usa la que necesitas."
+
+#~ msgid ""
+#~ "Linphone failed to open the sound device. See the README file included in "
+#~ "the distribution for details."
+#~ msgstr ""
+#~ "Linphone fallo al abrir el dispositivo de sonido. Vea el archivo README "
+#~ "incluido en la distribucion para mas detalles."
+
+#~ msgid "Interface not found."
+#~ msgstr "Interfaz no encontrada."
+
+#~ msgid "Warning"
+#~ msgstr "Atencion"
+
+#~ msgid ""
+#~ "Linphone cannot open the sound device. It may be caused by other programs "
+#~ "using it. Do you want linphone to kill these programs (esd or artsd) ?"
+#~ msgstr ""
+#~ "Linphone no puede abrir el dispositivo de sonido. Puede deberse a que "
+#~ "otros programaslo esten usando. ¿ Quiere que Linphone cierre esos "
+#~ "programas (esd o artsd) ?"
+
+#~ msgid "Linphone shutdowns..."
+#~ msgstr "Linphone esta terminando..."
+
+#~ msgid ""
+#~ "Please, wait a few seconds untils linphone unregisters your sip addess "
+#~ "from registrar server..."
+#~ msgstr ""
+#~ "Por favor, espere unos segundos hasta que Linphone cancele el registro de "
+#~ "su direccion SIP en el servidor de registros..."
+
+#~ msgid "Bad formuled sip address."
+#~ msgstr "Direccion SIP mal escrita."
+
+#~ msgid "Couldn't create pixmap from file: %s"
+#~ msgstr "No se pudo crear pixmap desde el archivo: %s"
+
+#~ msgid ""
+#~ "Linphone did not detect any valid network interface. If you use a "
+#~ "temporary internet connection, please connect and then run linphone again."
+#~ msgstr ""
+#~ "Linphone no detecto ninguna interfaz de red valida. Si usas una conexion "
+#~ "temporal a Internet, por favor conecta y vuelve a ejecutar Linphone."
+
+#~ msgid "List of network interfaces on your system."
+#~ msgstr "Lista de interfaces de red en tu sistema."
+
+#~ msgid ""
+#~ "RTP est le mode de transport de la voix. Modifier ces paramètres pour "
+#~ "tenter d'améliorer la qualité de la communication si celle-ci est "
+#~ "dégradée."
+#~ msgstr ""
+#~ "RTP es el modelo de transporte de la voz. Modifica estos parametros para "
+#~ "intentar mejorar la calidad de la comunicacion, si es que.es mala."
+
+#~ msgid "Use rtp port:"
+#~ msgstr "Puerto RTP:"
+
+#~ msgid ""
+#~ "Les codecs ou vocodeurs sont les algorithmes utilisés pour compresser la "
+#~ "voix."
+#~ msgstr ""
+#~ "Los codecs o codificadores/decodificadores son los algoritmos usados para "
+#~ "comprimir la voz."
+
+#~ msgid ""
+#~ "Vous pouvez ajuster avec cet onglet des paramètre liés à votre carte son."
+#~ msgstr "Puede modificar estos parametros a su gusto."
diff --git a/po/fr.po b/po/fr.po
new file mode 100644 (file)
index 0000000..5126073
--- /dev/null
+++ b/po/fr.po
@@ -0,0 +1,1549 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2001 Free Software Foundation, Inc.
+# Simon Morlat <simon.morlat@linphone.org>, 2001.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Linphone 0.9.1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-10-16 15:24+0200\n"
+"PO-Revision-Date: 2002-12-06 17:33+0100\n"
+"Last-Translator: Simon Morlat <simon.morlat@linphone.org>\n"
+"Language-Team: french <fr@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
+#: ../gtk-glade/support.c:102
+#, c-format
+msgid "Couldn't find pixmap file: %s"
+msgstr "Icone non trouvée: %s"
+
+#: ../gtk-glade/chat.c:27
+#, c-format
+msgid "Chat with %s"
+msgstr "Chat avec %s"
+
+#: ../gtk-glade/main.c:90
+msgid "log to stdout some debug information while running."
+msgstr ""
+
+#: ../gtk-glade/main.c:97
+msgid "Start only in the system tray, do not show the main interface."
+msgstr ""
+
+#: ../gtk-glade/main.c:104
+msgid "address to call right now"
+msgstr ""
+
+#: ../gtk-glade/main.c:111
+msgid "if set automatically answer incoming calls"
+msgstr ""
+
+#: ../gtk-glade/main.c:119
+msgid ""
+"Specifiy a working directory (should be the base of the installation, eg: c:"
+"\\Program Files\\Linphone)"
+msgstr ""
+
+#: ../gtk-glade/main.c:675
+#, c-format
+msgid "Incoming call from %s"
+msgstr "Appel entrant de %s"
+
+#: ../gtk-glade/main.c:707
+#, c-format
+msgid ""
+"%s would like to add you to his contact list.\n"
+"Would you allow him to see your presence status or add him to your contact "
+"list ?\n"
+"If you answer no, this person will be temporarily blacklisted."
+msgstr ""
+
+#: ../gtk-glade/main.c:777
+#, fuzzy, c-format
+msgid ""
+"Please enter your password for username <i>%s</i>\n"
+" at domain <i>%s</i>:"
+msgstr "Entrez votre mot de passe pour le domaine %s"
+
+#: ../gtk-glade/main.c:871
+msgid "Website link"
+msgstr ""
+
+#: ../gtk-glade/main.c:907
+msgid "Linphone - a video internet phone"
+msgstr "Linphone - un téléphone video pour l'internet"
+
+#: ../gtk-glade/main.c:926
+#, c-format
+msgid "%s (Default)"
+msgstr "%s (par défaut)"
+
+#: ../gtk-glade/main.c:1168
+msgid "A free SIP video-phone"
+msgstr "Un visiophone libre"
+
+#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
+#: ../gtk-glade/contact.glade.h:3
+msgid "Name"
+msgstr "Nom"
+
+#: ../gtk-glade/friendlist.c:212
+msgid "Presence status"
+msgstr "Info de présence"
+
+#: ../gtk-glade/friendlist.c:243
+#, fuzzy, c-format
+msgid "Search in %s directory"
+msgstr "Rechercher dans l'annuaire"
+
+#: ../gtk-glade/friendlist.c:432
+msgid "Invalid sip contact !"
+msgstr "Contact sip invalide !"
+
+#: ../gtk-glade/friendlist.c:474
+#, c-format
+msgid "Call %s"
+msgstr "Appeler %s"
+
+#: ../gtk-glade/friendlist.c:475
+#, c-format
+msgid "Send text to %s"
+msgstr "Chatter avec %s"
+
+#: ../gtk-glade/friendlist.c:476
+#, c-format
+msgid "Edit contact '%s'"
+msgstr "Editer le contact '%s'"
+
+#: ../gtk-glade/friendlist.c:477
+#, c-format
+msgid "Delete contact '%s'"
+msgstr "Supprimer le contact '%s'"
+
+#: ../gtk-glade/friendlist.c:519
+#, c-format
+msgid "Add new contact from %s directory"
+msgstr "Ajouter un contact depuis l'annuaire %s"
+
+#: ../gtk-glade/propertybox.c:251
+msgid "Rate (Hz)"
+msgstr "Fréquence (Hz)"
+
+#: ../gtk-glade/propertybox.c:257
+msgid "Status"
+msgstr "Etat"
+
+#: ../gtk-glade/propertybox.c:263
+msgid "Min bitrate (kbit/s)"
+msgstr "Débit min. (kbit/s)"
+
+#: ../gtk-glade/propertybox.c:269
+msgid "Parameters"
+msgstr "Paramètres"
+
+#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
+msgid "Enabled"
+msgstr "Activé"
+
+#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
+msgid "Disabled"
+msgstr "Désactivé"
+
+#: ../gtk-glade/propertybox.c:480
+msgid "Account"
+msgstr "Compte"
+
+#: ../gtk-glade/propertybox.c:620
+msgid "English"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:621
+msgid "French"
+msgstr "Français"
+
+#: ../gtk-glade/propertybox.c:622
+msgid "Swedish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:623
+msgid "Italian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:624
+msgid "Spanish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:625
+msgid "Brazilian Portugese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:626
+msgid "Polish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:627
+msgid "German"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:628
+msgid "Russian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:629
+msgid "Japanese"
+msgstr "日本語"
+
+#: ../gtk-glade/propertybox.c:630
+msgid "Dutch"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:631
+msgid "Hungarian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:632
+msgid "Czech"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:633
+msgid "Chinese"
+msgstr "简体中文"
+
+#: ../gtk-glade/propertybox.c:690
+msgid ""
+"You need to restart linphone for the new language selection to take effect."
+msgstr ""
+"La nouvelle selection de langue prendra effet au prochain démarrage de "
+"linphone."
+
+#: ../gtk-glade/update.c:80
+#, c-format
+msgid ""
+"A more recent version is availalble from %s.\n"
+"Would you like to open a browser to download it ?"
+msgstr ""
+
+#: ../gtk-glade/update.c:91
+msgid "You are running the lastest version."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:66
+msgid "Firstname, Lastname"
+msgstr "Prénom, Nom"
+
+#: ../gtk-glade/buddylookup.c:73
+msgid "SIP address"
+msgstr "Adresse SIP"
+
+#: ../gtk-glade/buddylookup.c:121
+msgid "Error communicating with server."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:125
+msgid "Connecting..."
+msgstr "Connexion..."
+
+#: ../gtk-glade/buddylookup.c:129
+msgid "Connected"
+msgstr "Connecté"
+
+#: ../gtk-glade/buddylookup.c:133
+msgid "Receiving data..."
+msgstr "Reception des données"
+
+#: ../gtk-glade/buddylookup.c:141
+#, c-format
+msgid "Found %i contact"
+msgid_plural "Found %i contacts"
+msgstr[0] "%i contact trouvé."
+msgstr[1] "%i contacts trouvés."
+
+#: ../gtk-glade/setupwizard.c:25
+msgid ""
+"Welcome !\n"
+"This assistant will help you to use a SIP account for your calls."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:34
+msgid "Create an account by choosing a username"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:35
+msgid "I have already an account and just want to use it"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:53
+msgid "Please choose a username:"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:54
+msgid "Username:"
+msgstr "Nom d'utilisateur:"
+
+#: ../gtk-glade/setupwizard.c:92
+#, c-format
+msgid "Checking if '%s' is available..."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
+msgid "Please wait..."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:101
+msgid "Sorry this username already exists. Please try a new one."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
+msgid "Ok !"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
+msgid "Communication problem, please try again later."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:134
+msgid "Thank you. Your account is now configured and ready for use."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:228
+msgid "Welcome to the account setup assistant"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:232
+msgid "Account setup assistant"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:236
+#, fuzzy
+msgid "Choosing a username"
+msgstr "Votre nom d'utilisateur"
+
+#: ../gtk-glade/setupwizard.c:240
+msgid "Verifying"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:244
+#, fuzzy
+msgid "Confirmation"
+msgstr "Information sur le contact"
+
+#: ../gtk-glade/setupwizard.c:249
+msgid "Creating your account"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:253
+msgid "Now ready !"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:98
+#, fuzzy
+msgid "<b>Calling...</b>"
+msgstr "<b>Usage de l'IPv6</b>"
+
+#: ../gtk-glade/incall_view.c:122
+#, fuzzy
+msgid "<b>In call with</b>"
+msgstr "Raccrocher"
+
+#: ../gtk-glade/incall_view.c:124
+msgid "00::00::00"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:140
+#, c-format
+msgid "%02i::%02i::%02i"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:158
+#, fuzzy
+msgid "<b>Call ended.</b>"
+msgstr "Appel terminé."
+
+#: ../gtk-glade/incall_view.c:176
+msgid "Unmute"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
+msgid "Mute"
+msgstr ""
+
+#: ../gtk-glade/loginframe.c:82
+#, fuzzy, c-format
+msgid "Please enter login information for %s"
+msgstr "Entrez votre mot de passe pour le domaine %s"
+
+#: ../gtk-glade/main.glade.h:1
+msgid "#"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:2
+msgid "*"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:3
+msgid "0"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:4
+msgid "1"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:5
+msgid "2"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:6
+msgid "3"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:7
+msgid "4"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:8
+msgid "5"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:9
+msgid "6"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:10
+msgid "7"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:11
+msgid "8"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:12
+msgid "9"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:13
+msgid "<b>Contact list</b>"
+msgstr "<b>List de contacts</b>"
+
+#: ../gtk-glade/main.glade.h:14
+msgid "<b>Terminate call</b>"
+msgstr "Raccrocher"
+
+#: ../gtk-glade/main.glade.h:15
+#, fuzzy
+msgid "<b>Welcome !</b>"
+msgstr "<b>Rechercher une personne</b>"
+
+#: ../gtk-glade/main.glade.h:16
+msgid "A"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:17
+msgid ""
+"ADSL\n"
+"Fiber Channel"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:19
+msgid ""
+"All users\n"
+"Online users"
+msgstr ""
+"Tous\n"
+"En ligne"
+
+#: ../gtk-glade/main.glade.h:21
+msgid "Assistant"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:22
+msgid "Audio & Video"
+msgstr "Audio et video"
+
+#: ../gtk-glade/main.glade.h:23
+msgid "Audio only"
+msgstr "Audio seul"
+
+#: ../gtk-glade/main.glade.h:24
+msgid "Automatically log me in"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:25
+msgid "B"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
+msgid "C"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:27
+msgid "Check for updates"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:28
+msgid "D"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:29
+msgid "Default"
+msgstr "Par défaut"
+
+#: ../gtk-glade/main.glade.h:30
+msgid "Digits"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:31
+msgid "Duration"
+msgstr "Durée"
+
+#: ../gtk-glade/main.glade.h:32
+msgid "Duration:"
+msgstr "Durée:"
+
+#: ../gtk-glade/main.glade.h:33
+msgid "Enable self-view"
+msgstr "Se voir"
+
+#: ../gtk-glade/main.glade.h:34
+msgid "Enter username, phone number, or full sip address"
+msgstr ""
+"Entrez un nom d'utilisateur, un numéro de téléphone, ou une addresse SIP"
+
+#: ../gtk-glade/main.glade.h:35
+msgid "In call"
+msgstr "Appel en cours"
+
+#: ../gtk-glade/main.glade.h:36
+msgid "Internet connection:"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:37
+#, fuzzy
+msgid "Login information"
+msgstr "Information sur le contact"
+
+#: ../gtk-glade/main.glade.h:38
+msgid "Lookup:"
+msgstr "Rechercher:"
+
+#: ../gtk-glade/main.glade.h:39
+msgid "Main view"
+msgstr "Vue principale"
+
+#: ../gtk-glade/main.glade.h:41
+msgid "My current identity:"
+msgstr "Mon identité sip :"
+
+#: ../gtk-glade/main.glade.h:42
+#, fuzzy
+msgid "Password"
+msgstr "Mot de passe:"
+
+#: ../gtk-glade/main.glade.h:43
+msgid "SIP address or phone number:"
+msgstr "Addresse SIP ou numéro"
+
+#: ../gtk-glade/main.glade.h:44
+msgid "Show current call"
+msgstr "Voir l'appel en cours"
+
+#: ../gtk-glade/main.glade.h:45
+msgid "Start call"
+msgstr "Démarrer l'appel"
+
+#: ../gtk-glade/main.glade.h:46
+msgid "Terminate call"
+msgstr "Raccrocher"
+
+#: ../gtk-glade/main.glade.h:47
+#, fuzzy
+msgid "Username"
+msgstr "Nom d'utilisateur:"
+
+#: ../gtk-glade/main.glade.h:48
+msgid "_Linphone"
+msgstr "_Linphone"
+
+#: ../gtk-glade/main.glade.h:49
+msgid "_Modes"
+msgstr "_Modes"
+
+#: ../gtk-glade/main.glade.h:50
+#, fuzzy
+msgid "gtk-connect"
+msgstr "Connecté"
+
+#: ../gtk-glade/main.glade.h:51
+msgid "gtk-find"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:52
+msgid "in"
+msgstr "dans"
+
+#: ../gtk-glade/main.glade.h:53
+msgid "label"
+msgstr ""
+
+#: ../gtk-glade/about.glade.h:1
+msgid "About linphone"
+msgstr "A propos de linphone"
+
+#: ../gtk-glade/about.glade.h:2
+msgid "An internet video phone using the standart SIP (rfc3261) protocol."
+msgstr "Un visiophone pour l'internet, compatible SIP (rfc3261)"
+
+#: ../gtk-glade/about.glade.h:3
+msgid "Created by Simon Morlat\n"
+msgstr "Créé par Simon Morlat\n"
+
+#: ../gtk-glade/about.glade.h:5
+msgid ""
+"fr: Simon Morlat\n"
+"en: Simon Morlat and Delphine Perreau\n"
+"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
+"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
+"sv: Daniel Nylander <po@danielnylander.se>\n"
+"es: Jesus Benitez <gnelson at inMail dot sk>\n"
+"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
+"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
+"pl: Robert Nasiadek <darkone@darkone.pl>\n"
+"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
+"hu: anonymous\n"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:1
+#, fuzzy
+msgid "<b>Contact information</b>"
+msgstr "Information sur le contact"
+
+#: ../gtk-glade/contact.glade.h:2
+msgid "Allow this contact to see my presence status"
+msgstr "Autoriser ce contact à voir ma présence"
+
+#: ../gtk-glade/contact.glade.h:4
+msgid "SIP Address"
+msgstr "Adresse SIP"
+
+#: ../gtk-glade/contact.glade.h:5
+msgid "Show this contact presence status"
+msgstr "Voir l'état de présence de ce contact"
+
+#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
+#: ../gtk-glade/sip_account.glade.h:9
+msgid "gtk-cancel"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
+#: ../gtk-glade/sip_account.glade.h:10
+msgid "gtk-ok"
+msgstr ""
+
+#: ../gtk-glade/log.glade.h:1
+msgid "Linphone debug window"
+msgstr "Fenêtre de débogage de linphone"
+
+#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
+#: ../gtk-glade/chatroom.glade.h:2
+msgid "gtk-close"
+msgstr ""
+
+#: ../gtk-glade/password.glade.h:1
+msgid "Linphone - Authentication required"
+msgstr "Linphone - Autentification requise"
+
+#: ../gtk-glade/password.glade.h:2
+msgid "Password:"
+msgstr "Mot de passe:"
+
+#: ../gtk-glade/password.glade.h:3
+msgid "Please enter the domain password"
+msgstr "Entrez votre mot de passe pour le domaine"
+
+#: ../gtk-glade/password.glade.h:4
+msgid "UserID"
+msgstr ""
+
+#: ../gtk-glade/call_logs.glade.h:1
+msgid "Call history"
+msgstr "Historique des appels"
+
+#: ../gtk-glade/sip_account.glade.h:1
+msgid "Configure a SIP account"
+msgstr "Configuer un compte SIP"
+
+#: ../gtk-glade/sip_account.glade.h:2
+msgid "Linphone - Configure a SIP account"
+msgstr "Linphone - Configurer un compte SIP"
+
+#: ../gtk-glade/sip_account.glade.h:3
+msgid "Publish presence information"
+msgstr "Publier la présence"
+
+#: ../gtk-glade/sip_account.glade.h:4
+msgid "Register at startup"
+msgstr "S'enregistrer au démarrage"
+
+#: ../gtk-glade/sip_account.glade.h:5
+msgid "Registration duration (sec):"
+msgstr "Période d'enregistrement (secondes):"
+
+#: ../gtk-glade/sip_account.glade.h:6
+msgid "Route (optional):"
+msgstr "Route (optionnel):"
+
+#: ../gtk-glade/sip_account.glade.h:7
+msgid "SIP Proxy address:"
+msgstr "Addresse du proxy SIP:"
+
+#: ../gtk-glade/sip_account.glade.h:8
+msgid "Your SIP identity:"
+msgstr "Votre identité SIP:"
+
+#: ../gtk-glade/sip_account.glade.h:11
+msgid "sip:"
+msgstr ""
+
+#: ../gtk-glade/chatroom.glade.h:1
+msgid "Send"
+msgstr "Envoyer"
+
+#: ../gtk-glade/incoming_call.glade.h:1
+msgid "Accept"
+msgstr "Accepter"
+
+#: ../gtk-glade/incoming_call.glade.h:2
+msgid "Decline"
+msgstr "Refuser"
+
+#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
+msgid "Incoming call"
+msgstr "Appel entrant"
+
+#: ../gtk-glade/incoming_call.glade.h:4
+msgid "Incoming call from"
+msgstr "Appel entrant de"
+
+#: ../gtk-glade/incoming_call.glade.h:5
+msgid "Linphone - Incoming call"
+msgstr "Linphone - Appel entrant"
+
+#: ../gtk-glade/parameters.glade.h:1
+msgid "0 stands for \"unlimited\""
+msgstr "Indiquez 0 pour ne pas mettre de limite"
+
+#: ../gtk-glade/parameters.glade.h:2
+msgid "<b>Audio</b>"
+msgstr "<b>Son</b>"
+
+#: ../gtk-glade/parameters.glade.h:3
+msgid "<b>Bandwidth control</b>"
+msgstr "<b>Gestion de la bande passante</b>"
+
+#: ../gtk-glade/parameters.glade.h:4
+msgid "<b>Codecs</b>"
+msgstr "<b>Codecs</b>"
+
+#: ../gtk-glade/parameters.glade.h:5
+msgid "<b>Default identity</b>"
+msgstr "<b>Identité par défaut</b>"
+
+#: ../gtk-glade/parameters.glade.h:6
+#, fuzzy
+msgid "<b>Language</b>"
+msgstr "<b>Usage de l'IPv6</b>"
+
+#: ../gtk-glade/parameters.glade.h:7
+msgid "<b>NAT and Firewall</b>"
+msgstr "<b>Paramètres liés au pare-feu</b>"
+
+#: ../gtk-glade/parameters.glade.h:8
+msgid "<b>Ports</b>"
+msgstr "<b>Ports utilisés</b>"
+
+#: ../gtk-glade/parameters.glade.h:9
+msgid "<b>Privacy</b>"
+msgstr "<b>Sécurité</b>"
+
+#: ../gtk-glade/parameters.glade.h:10
+msgid "<b>Proxy accounts</b>"
+msgstr "<b>Comptes SIP via des proxy</b>"
+
+#: ../gtk-glade/parameters.glade.h:11
+msgid "<b>Transport</b>"
+msgstr "<b>Transport</b>"
+
+#: ../gtk-glade/parameters.glade.h:12
+msgid "<b>Video</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:13
+msgid "ALSA special device (optional):"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:14
+msgid "Add"
+msgstr "Ajouter"
+
+#: ../gtk-glade/parameters.glade.h:15
+msgid "Audio RTP/UDP:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:16
+msgid ""
+"Audio codecs\n"
+"Video codecs"
+msgstr ""
+"Codecs audio\n"
+"Codecs video"
+
+#: ../gtk-glade/parameters.glade.h:18
+msgid "Behind NAT / Firewall (specify gateway IP below)"
+msgstr "Derrière un pare-feu (spécifier la passerelle ci dessous)"
+
+#: ../gtk-glade/parameters.glade.h:19
+msgid "Behind NAT / Firewall (use STUN to resolve)"
+msgstr "Derrière un pare-feu (utiliser STUN)"
+
+#: ../gtk-glade/parameters.glade.h:21
+msgid "CIF"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:22
+msgid "Capture device:"
+msgstr "Périphérique de capture:"
+
+#: ../gtk-glade/parameters.glade.h:23
+msgid "Codecs"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:24
+msgid "Direct connection to the Internet"
+msgstr "Connection directe à l'Internet"
+
+#: ../gtk-glade/parameters.glade.h:25
+msgid "Disable"
+msgstr "Désactive"
+
+#: ../gtk-glade/parameters.glade.h:26
+msgid "Done"
+msgstr "Fermer"
+
+#: ../gtk-glade/parameters.glade.h:27
+msgid "Download speed limit in Kbit/sec:"
+msgstr "Limite de débit descendant en kbits/sec:"
+
+#: ../gtk-glade/parameters.glade.h:28
+msgid "Edit"
+msgstr "Editer"
+
+#: ../gtk-glade/parameters.glade.h:29
+msgid "Enable"
+msgstr "Active"
+
+#: ../gtk-glade/parameters.glade.h:30
+msgid "Enable echo cancellation"
+msgstr "Activer l'annulation d'écho"
+
+#: ../gtk-glade/parameters.glade.h:31
+msgid "Erase all passwords"
+msgstr "Effacer tous les mots de passe"
+
+#: ../gtk-glade/parameters.glade.h:32
+msgid "Manage SIP Accounts"
+msgstr "Gérer mes comptes SIP"
+
+#: ../gtk-glade/parameters.glade.h:33
+msgid "Multimedia settings"
+msgstr "Paramètres multimedia"
+
+#: ../gtk-glade/parameters.glade.h:34
+msgid "Network settings"
+msgstr "Paramètres réseau"
+
+#: ../gtk-glade/parameters.glade.h:35
+msgid "Playback device:"
+msgstr "Périphérique d'écoute:"
+
+#: ../gtk-glade/parameters.glade.h:36
+msgid "Prefered video resolution:"
+msgstr "Résolution video préférée:"
+
+#: ../gtk-glade/parameters.glade.h:37
+msgid "Public IP address:"
+msgstr "Addresse IP publique:"
+
+#: ../gtk-glade/parameters.glade.h:38
+msgid ""
+"Register to FONICS\n"
+"virtual network !"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:40
+msgid "Remove"
+msgstr "Enlever"
+
+#: ../gtk-glade/parameters.glade.h:41
+msgid "Ring device:"
+msgstr "Périphérique de sonnerie:"
+
+#: ../gtk-glade/parameters.glade.h:42
+msgid "Ring sound:"
+msgstr "Sonnerie:"
+
+#: ../gtk-glade/parameters.glade.h:43
+msgid "SIP (UDP):"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:44
+msgid "Send DTMFs as SIP info"
+msgstr "Envoyer les digits en tant que SIP INFO"
+
+#: ../gtk-glade/parameters.glade.h:45
+msgid "Set Maximum Transmission Unit:"
+msgstr "Spécifier la Maximum Transmission Unit"
+
+#: ../gtk-glade/parameters.glade.h:46
+msgid "Settings"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:47
+msgid "Stun server:"
+msgstr "Serveur STUN:"
+
+#: ../gtk-glade/parameters.glade.h:48
+msgid "This section defines your SIP address when not using a SIP account"
+msgstr ""
+"Cette rubrique permet de définir son addresse SIP lorsqu'on ne possède pas "
+"de compte SIP"
+
+#: ../gtk-glade/parameters.glade.h:49
+msgid "Upload speed limit in Kbit/sec:"
+msgstr "Limite de débit montant en kbits/sec:"
+
+#: ../gtk-glade/parameters.glade.h:50
+msgid "Use IPv6 instead of IPv4"
+msgstr "Utiliser l'IPv6 au lieu d'IPv4"
+
+#: ../gtk-glade/parameters.glade.h:51
+msgid "User interface"
+msgstr "Interface utilisateur"
+
+#: ../gtk-glade/parameters.glade.h:52
+msgid "Video RTP/UDP:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:53
+msgid "Video input device:"
+msgstr "Périphérique d'entrée video"
+
+#: ../gtk-glade/parameters.glade.h:54
+msgid "Your display name (eg: John Doe):"
+msgstr "Votre nom d'affichage (ex: James Bond)"
+
+#: ../gtk-glade/parameters.glade.h:55
+msgid "Your resulting SIP address:"
+msgstr "Votre addresse SIP:"
+
+#: ../gtk-glade/parameters.glade.h:56
+msgid "Your username:"
+msgstr "Votre nom d'utilisateur"
+
+#: ../gtk-glade/parameters.glade.h:57
+msgid "a sound card\n"
+msgstr "une carte son\n"
+
+#: ../gtk-glade/parameters.glade.h:59
+msgid "default camera"
+msgstr "camera par défaut"
+
+#: ../gtk-glade/parameters.glade.h:60
+msgid "default soundcard"
+msgstr "Carte son par défaut"
+
+#: ../gtk-glade/parameters.glade.h:61
+msgid "default soundcard\n"
+msgstr "Carte son par défaut\n"
+
+#: ../gtk-glade/parameters.glade.h:63
+msgid "gtk-go-down"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:64
+msgid "gtk-go-up"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:65
+msgid "gtk-media-play"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:1
+msgid "<b>Search somebody</b>"
+msgstr "<b>Rechercher une personne</b>"
+
+#: ../gtk-glade/buddylookup.glade.h:2
+msgid "Add to my list"
+msgstr "Ajouter à ma liste"
+
+#: ../gtk-glade/buddylookup.glade.h:3
+msgid "Search contacts in directory"
+msgstr "Rechercher dans l'annuaire"
+
+#: ../gtk-glade/waiting.glade.h:1
+msgid "Linphone"
+msgstr "Linphone"
+
+#: ../gtk-glade/waiting.glade.h:2
+msgid "Please wait"
+msgstr "En attente"
+
+#: ../coreapi/linphonecore.c:195
+#, c-format
+msgid "You have missed %i call."
+msgid_plural "You have missed %i calls."
+msgstr[0] "Vous avez manqué %i appel"
+msgstr[1] "Vous avez manqué %i appels"
+
+#: ../coreapi/linphonecore.c:223
+msgid "aborted"
+msgstr "abandonné"
+
+#: ../coreapi/linphonecore.c:226
+msgid "completed"
+msgstr "terminé"
+
+#: ../coreapi/linphonecore.c:229
+msgid "missed"
+msgstr "manqué"
+
+#: ../coreapi/linphonecore.c:234
+#, c-format
+msgid ""
+"%s at %s\n"
+"From: %s\n"
+"To: %s\n"
+"Status: %s\n"
+"Duration: %i mn %i sec\n"
+msgstr ""
+"%s le %s\nDe: %s\n"
+"A destination de: %s\n"
+"Etat: %s\n"
+"Durée: %i mn %i sec\n"
+
+#: ../coreapi/linphonecore.c:235
+msgid "Outgoing call"
+msgstr "Appel sortant"
+
+#: ../coreapi/linphonecore.c:445
+msgid ""
+"Your machine appears to be connected to an IPv6 network. By default linphone "
+"always uses IPv4. Please update your configuration if you want to use IPv6"
+msgstr ""
+"Votre machine semble être connectée à un réseau IPv6. Par defaut linphone "
+"utilise toujours de l'IPv4. Merci de mettre à jour votre configuration si "
+"vous souhaitez utilisez un réseau IPv6."
+
+#: ../coreapi/linphonecore.c:739
+msgid "Ready"
+msgstr "Prêt."
+
+#: ../coreapi/linphonecore.c:1014
+msgid "Remote end seems to have disconnected, the call is going to be closed."
+msgstr "Votre correspondant a du se déconnecter, l'appel va être raccroché."
+
+#: ../coreapi/linphonecore.c:1172
+msgid "Looking for telephone number destination..."
+msgstr "Recherche de la destination du numéro de téléphone..."
+
+#: ../coreapi/linphonecore.c:1174
+msgid "Could not resolve this number."
+msgstr "La destination n'a pu être trouvée."
+
+#: ../coreapi/linphonecore.c:1239
+msgid ""
+"Could not parse given sip address. A sip url usually looks like sip:"
+"user@domain"
+msgstr ""
+"Adresse SIP mal formulée. Une address sip ressemble à <sip:nom@domaine>"
+
+#: ../coreapi/linphonecore.c:1340
+msgid "Sorry, having multiple simultaneous calls is not supported yet !"
+msgstr "Désolé, vous ne pouvez appeler plusieurs personnes simultanément !"
+
+#: ../coreapi/linphonecore.c:1387
+msgid "Contacting"
+msgstr "Appel de"
+
+#: ../coreapi/linphonecore.c:1402
+msgid "could not call"
+msgstr "Echec"
+
+#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
+msgid "Connected."
+msgstr "En ligne."
+
+#: ../coreapi/linphonecore.c:1813
+msgid "Call ended"
+msgstr "Appel terminé."
+
+#: ../coreapi/linphonecore.c:2175
+msgid "No nat/firewall address supplied !"
+msgstr "Pas d'addresse NAT fournie"
+
+#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
+#, c-format
+msgid "Invalid nat address '%s' : %s"
+msgstr "Adresse nat invalide '%s' : %s"
+
+#: ../coreapi/misc.c:134
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the pcm oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+"'modprobe snd-pcm-oss' as root to load it."
+msgstr ""
+"Votre ordinateur semble utiliser les pilotes sons ALSA.\n"
+"C'est en g��al le meilleur choix, cependant un module\n"
+"d'emulation oss est manquant et linphone en a besoin.\n"
+"Veuillez s'il vous plait executer la commande\n"
+"'modprobe snd-pcm-oss' en tant que root afin de le charger."
+
+#: ../coreapi/misc.c:137
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the mixer oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+" 'modprobe snd-mixer-oss' as root to load it."
+msgstr ""
+"Votre ordinateur semble utiliser les pilotes sons ALSA. C'est en g��al le\n"
+"meilleur choix, cependant un module d'emulation est manquant et linphone en\n"
+"a besoin. Veuillez s'il vous plait executer la commande\n"
+"'modprobe snd-mixer-oss' en tant que root afin de le charger."
+
+#: ../coreapi/misc.c:610
+msgid "Stun lookup in progress..."
+msgstr "Découverte STUN en cours"
+
+#: ../coreapi/exevents.c:127
+msgid "Call terminated."
+msgstr "Appel terminé."
+
+#: ../coreapi/exevents.c:149
+msgid "Could not reach destination."
+msgstr "Impossible de joindre votre correspondant."
+
+#: ../coreapi/exevents.c:158
+msgid "User is busy."
+msgstr "Occupé..."
+
+#: ../coreapi/exevents.c:159
+msgid "User is temporarily unavailable."
+msgstr "L'usager est temporairement indisponible."
+
+#: ../coreapi/exevents.c:160
+msgid "Request Cancelled."
+msgstr "Requête annulée."
+
+#. char *retrymsg=_("%s. Retry after %i minute(s).");
+#: ../coreapi/exevents.c:162
+msgid "User does not want to be disturbed."
+msgstr "L'usager ne souhaite pas être dérangé"
+
+#: ../coreapi/exevents.c:163
+msgid "Call declined."
+msgstr "Appel décliné."
+
+#: ../coreapi/exevents.c:191
+msgid "Bad request"
+msgstr "Requete erronée"
+
+#: ../coreapi/exevents.c:194
+msgid "User cannot be found at given address."
+msgstr "L'utilisateur n'a pu être trouvé à l'addresse spécifiée"
+
+#: ../coreapi/exevents.c:197
+msgid "Remote user cannot support any of proposed codecs."
+msgstr "Votre correspondant ne supporte aucun des codecs proposés."
+
+#. time out, call leg is lost
+#: ../coreapi/exevents.c:227
+msgid "Timeout."
+msgstr "Temps d'attente dépassé..."
+
+#: ../coreapi/exevents.c:230
+msgid "Remote host was found but refused connection."
+msgstr "La machine distante a été trouvée mais a refusé la connexion."
+
+#: ../coreapi/exevents.c:339
+msgid "is contacting you."
+msgstr "vous appelle."
+
+#: ../coreapi/exevents.c:424
+#, c-format
+msgid "Redirected to %s..."
+msgstr "Redirigé vers %s ..."
+
+#: ../coreapi/exevents.c:440
+msgid ""
+"User is not reachable at the moment but he invites you\n"
+"to contact him using the following alternate resource:"
+msgstr ""
+"Votre correspondant n'est pas joignable actuellement mais il vous propose\n"
+"de le contacter en utilisant le moyen alternatif suivant:"
+
+#: ../coreapi/exevents.c:861
+msgid "Early media."
+msgstr "Prise d'appel anticipée"
+
+#: ../coreapi/exevents.c:972
+#, c-format
+msgid "Registration on %s failed: %s"
+msgstr "Echec de l'enregistrement sur %s: %s"
+
+#: ../coreapi/exevents.c:972
+msgid "no response timeout"
+msgstr "Pas de réponse."
+
+#: ../coreapi/exevents.c:998
+#, c-format
+msgid "Registration on %s successful."
+msgstr "Enregistrement sur %s effectué."
+
+#: ../coreapi/exevents.c:999
+#, fuzzy, c-format
+msgid "Unregistration on %s done."
+msgstr "Enregistrement sur %s effectué."
+
+#. people for which we don't have yet an answer should appear as offline
+#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
+msgid "Gone"
+msgstr "Parti"
+
+#: ../coreapi/presence.c:129
+msgid "Waiting for Approval"
+msgstr "En attente"
+
+#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
+msgid "Online"
+msgstr "Disponible"
+
+#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
+msgid "Busy"
+msgstr "Occupé"
+
+#: ../coreapi/presence.c:142
+msgid "Be Right Back"
+msgstr "De retour"
+
+#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
+msgid "Away"
+msgstr "Absent"
+
+#: ../coreapi/presence.c:151
+msgid "On The Phone"
+msgstr "Au téléphone"
+
+#: ../coreapi/presence.c:156
+msgid "Out To Lunch"
+msgstr "A table"
+
+#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
+msgid "Closed"
+msgstr "Eteint"
+
+#: ../coreapi/friend.c:35
+msgid "Unknown"
+msgstr ""
+
+#: ../coreapi/friend.c:44
+msgid "Be right back"
+msgstr "De retour"
+
+#: ../coreapi/friend.c:50
+msgid "On the phone"
+msgstr "Au téléphone"
+
+#: ../coreapi/friend.c:53
+msgid "Out to lunch"
+msgstr "A table"
+
+#: ../coreapi/friend.c:56
+msgid "Do not disturb"
+msgstr ""
+
+#: ../coreapi/friend.c:59
+msgid "Moved"
+msgstr ""
+
+#: ../coreapi/friend.c:62
+msgid "Using another messaging service"
+msgstr ""
+
+#: ../coreapi/friend.c:65
+msgid "Offline"
+msgstr "Non connecté"
+
+#: ../coreapi/friend.c:68
+msgid "Pending"
+msgstr "En attente"
+
+#: ../coreapi/friend.c:74
+msgid "Unknown-bug"
+msgstr "Bug inconnu"
+
+#: ../coreapi/proxy.c:221
+msgid ""
+"The sip proxy address you entered is invalid, it must start with \"sip:\" "
+"followed by a hostname."
+msgstr ""
+
+#: ../coreapi/proxy.c:227
+msgid ""
+"The sip identity you entered is invalid.\n"
+"It should look like sip:username@proxydomain, such as sip:alice@example.net"
+msgstr ""
+
+#: ../coreapi/proxy.c:634
+#, fuzzy, c-format
+msgid "Could not login as %s"
+msgstr "Icone non trouvée: %s"
+
+#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
+msgid "ITU-G.711 alaw encoder"
+msgstr ""
+
+#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
+msgid "ITU-G.711 alaw decoder"
+msgstr ""
+
+#: ../mediastreamer2/src/alsa.c:923
+msgid "Alsa sound source"
+msgstr "Source alsa"
+
+#: ../mediastreamer2/src/alsa.c:1027
+msgid "Alsa sound output"
+msgstr "Sortie alsa"
+
+#: ../mediastreamer2/src/aqsnd.c:891
+msgid "Sound capture filter for MacOS X Audio Queue Service"
+msgstr ""
+
+#: ../mediastreamer2/src/aqsnd.c:915
+msgid "Sound playback filter for MacOS X Audio Queue Service"
+msgstr ""
+
+#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
+msgid "DTMF generator"
+msgstr ""
+
+#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
+msgid "The GSM full-rate codec"
+msgstr "Le codec GSM full-rate"
+
+#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
+msgid "The GSM codec"
+msgstr ""
+
+#: ../mediastreamer2/src/macsnd.c:670
+msgid "Sound capture filter for MacOS X Core Audio drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/macsnd.c:684
+msgid "Sound playback filter for MacOS X Core Audio drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
+msgid "A filter to make conferencing"
+msgstr ""
+
+#: ../mediastreamer2/src/msfileplayer.c:295
+#: ../mediastreamer2/src/msfileplayer.c:313
+msgid "Raw files and wav reader"
+msgstr ""
+
+#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
+#: ../mediastreamer2/src/msfilerec_win.c:216
+#: ../mediastreamer2/src/msfilerec_win.c:234
+msgid "Wav file recorder"
+msgstr ""
+
+#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
+msgid "A filter that send several inputs to one output."
+msgstr ""
+
+#: ../mediastreamer2/src/msresample.c:221
+#: ../mediastreamer2/src/msresample.c:239
+msgid "frequency resampler"
+msgstr ""
+
+#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
+msgid "RTP output filter"
+msgstr ""
+
+#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
+msgid "RTP input filter"
+msgstr ""
+
+#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
+#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
+msgid "The free and wonderful speex codec"
+msgstr ""
+
+#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
+msgid "A filter that controls and measure sound volume"
+msgstr ""
+
+#: ../mediastreamer2/src/msv4l.c:1009
+msgid "A video4linux compatible source filter to stream pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/msv4l2.c:458
+msgid "A filter to grab pictures from Video4Linux2-powered cameras"
+msgstr ""
+
+#: ../mediastreamer2/src/nowebcam.c:1780
+msgid "A filter that outputs a static image."
+msgstr ""
+
+#: ../mediastreamer2/src/oss.c:567
+msgid "Sound capture filter for OSS drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/oss.c:581
+msgid "Sound playback filter for OSS drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
+msgid "A pixel format converter"
+msgstr ""
+
+#: ../mediastreamer2/src/sizeconv.c:204
+msgid "A video size converter"
+msgstr ""
+
+#: ../mediastreamer2/src/sizeconv.c:222
+msgid "a small video size converter"
+msgstr ""
+
+#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
+msgid "Echo canceler using speex library"
+msgstr ""
+
+#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
+msgid "A filter that reads from input and copy to its multiple outputs."
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:375
+msgid "The theora video encoder from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:393
+msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
+msgid "The theora video decoder from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
+msgid "ITU-G.711 ulaw encoder"
+msgstr ""
+
+#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
+msgid "ITU-G.711 ulaw decoder"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
+#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
+msgid "A H.263 decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:688
+msgid "A MPEG4 decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:704
+msgid "A RTP/JPEG decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:720
+msgid "A MJPEG decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:736
+msgid "A snow decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
+msgid "A video H.263 encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:856
+msgid ""
+"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
+"spec."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
+msgid "A video MPEG4 encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:888
+msgid "A video snow encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:904
+msgid "A RTP/MJPEG encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:938
+msgid ""
+"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:970
+msgid ""
+"The snow codec is royalty-free and is open-source. \n"
+"It uses innovative techniques that makes it one of most promising video "
+"codec. It is implemented within the ffmpeg project.\n"
+"However it is under development, quite unstable and compatibility with other "
+"versions cannot be guaranteed."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:990
+msgid "A MJPEG encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
+msgid "A generic video display"
+msgstr ""
+
+#: ../mediastreamer2/src/wincevideods.c:966
+#: ../mediastreamer2/src/wincevideods.c:984
+#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
+#: ../mediastreamer2/src/winvideods.c:1306
+#: ../mediastreamer2/src/winvideods.c:1324
+msgid "A video4windows compatible source filter to stream pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
+msgid "A video for windows (vfw.h) based source filter to grab pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
+msgid "ICE filter"
+msgstr ""
+
+#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
+msgid "A filter that trashes its input (useful for terminating some graphs)."
+msgstr ""
+
+#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
+msgid "Parametric sound equalizer."
+msgstr ""
+
+#: ../mediastreamer2/src/msdscap-mingw.cc:1003
+msgid "A webcam grabber based on directshow."
+msgstr ""
diff --git a/po/hu.po b/po/hu.po
new file mode 100644 (file)
index 0000000..03f5fe6
--- /dev/null
+++ b/po/hu.po
@@ -0,0 +1,2002 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-10-16 15:24+0200\n"
+"PO-Revision-Date: 2007-12-14 11:12+0100\n"
+"Last-Translator: \n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
+#: ../gtk-glade/support.c:102
+#, c-format
+msgid "Couldn't find pixmap file: %s"
+msgstr "Nemtalálható a pixmap fájl: %s"
+
+#: ../gtk-glade/chat.c:27
+#, c-format
+msgid "Chat with %s"
+msgstr "Chat-elés %s -el"
+
+#: ../gtk-glade/main.c:90
+msgid "log to stdout some debug information while running."
+msgstr ""
+
+#: ../gtk-glade/main.c:97
+msgid "Start only in the system tray, do not show the main interface."
+msgstr ""
+
+#: ../gtk-glade/main.c:104
+msgid "address to call right now"
+msgstr ""
+
+#: ../gtk-glade/main.c:111
+msgid "if set automatically answer incoming calls"
+msgstr ""
+
+#: ../gtk-glade/main.c:119
+msgid ""
+"Specifiy a working directory (should be the base of the installation, eg: c:"
+"\\Program Files\\Linphone)"
+msgstr ""
+
+#: ../gtk-glade/main.c:675
+#, fuzzy, c-format
+msgid "Incoming call from %s"
+msgstr "Beérkező hívás"
+
+#: ../gtk-glade/main.c:707
+#, c-format
+msgid ""
+"%s would like to add you to his contact list.\n"
+"Would you allow him to see your presence status or add him to your contact "
+"list ?\n"
+"If you answer no, this person will be temporarily blacklisted."
+msgstr ""
+
+#: ../gtk-glade/main.c:777
+#, c-format
+msgid ""
+"Please enter your password for username <i>%s</i>\n"
+" at domain <i>%s</i>:"
+msgstr ""
+
+#: ../gtk-glade/main.c:871
+msgid "Website link"
+msgstr ""
+
+#: ../gtk-glade/main.c:907
+msgid "Linphone - a video internet phone"
+msgstr ""
+
+#: ../gtk-glade/main.c:926
+#, c-format
+msgid "%s (Default)"
+msgstr ""
+
+#: ../gtk-glade/main.c:1168
+msgid "A free SIP video-phone"
+msgstr "Egy ingyenes SIP video-telefon"
+
+#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
+#: ../gtk-glade/contact.glade.h:3
+msgid "Name"
+msgstr "Név"
+
+#: ../gtk-glade/friendlist.c:212
+msgid "Presence status"
+msgstr "Jelenlét státusz"
+
+#: ../gtk-glade/friendlist.c:243
+#, c-format
+msgid "Search in %s directory"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:432
+msgid "Invalid sip contact !"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:474
+#, fuzzy, c-format
+msgid "Call %s"
+msgstr "Hivás előzmények"
+
+#: ../gtk-glade/friendlist.c:475
+#, c-format
+msgid "Send text to %s"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:476
+#, fuzzy, c-format
+msgid "Edit contact '%s'"
+msgstr "Kapcsolatinformációk szerkesztése"
+
+#: ../gtk-glade/friendlist.c:477
+#, c-format
+msgid "Delete contact '%s'"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:519
+#, c-format
+msgid "Add new contact from %s directory"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:251
+msgid "Rate (Hz)"
+msgstr "Érték (Hz)"
+
+#: ../gtk-glade/propertybox.c:257
+msgid "Status"
+msgstr "Állapot"
+
+#: ../gtk-glade/propertybox.c:263
+msgid "Min bitrate (kbit/s)"
+msgstr "Min bitrate (kbit/s)"
+
+#: ../gtk-glade/propertybox.c:269
+msgid "Parameters"
+msgstr "Paraméterek"
+
+#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
+msgid "Enabled"
+msgstr "Engedélyezve"
+
+#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
+msgid "Disabled"
+msgstr "Tiltva"
+
+#: ../gtk-glade/propertybox.c:480
+msgid "Account"
+msgstr "Hozzáférés"
+
+#: ../gtk-glade/propertybox.c:620
+msgid "English"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:621
+msgid "French"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:622
+msgid "Swedish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:623
+msgid "Italian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:624
+msgid "Spanish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:625
+msgid "Brazilian Portugese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:626
+msgid "Polish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:627
+msgid "German"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:628
+msgid "Russian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:629
+msgid "Japanese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:630
+msgid "Dutch"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:631
+msgid "Hungarian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:632
+msgid "Czech"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:633
+msgid "Chinese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:690
+msgid ""
+"You need to restart linphone for the new language selection to take effect."
+msgstr ""
+
+#: ../gtk-glade/update.c:80
+#, c-format
+msgid ""
+"A more recent version is availalble from %s.\n"
+"Would you like to open a browser to download it ?"
+msgstr ""
+
+#: ../gtk-glade/update.c:91
+msgid "You are running the lastest version."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:66
+msgid "Firstname, Lastname"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:73
+#, fuzzy
+msgid "SIP address"
+msgstr "Sip cím:"
+
+#: ../gtk-glade/buddylookup.c:121
+msgid "Error communicating with server."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:125
+#, fuzzy
+msgid "Connecting..."
+msgstr "Kapcsolódás"
+
+#: ../gtk-glade/buddylookup.c:129
+#, fuzzy
+msgid "Connected"
+msgstr "Kapcsolódva."
+
+#: ../gtk-glade/buddylookup.c:133
+msgid "Receiving data..."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:141
+#, c-format
+msgid "Found %i contact"
+msgid_plural "Found %i contacts"
+msgstr[0] ""
+msgstr[1] ""
+
+#: ../gtk-glade/setupwizard.c:25
+msgid ""
+"Welcome !\n"
+"This assistant will help you to use a SIP account for your calls."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:34
+msgid "Create an account by choosing a username"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:35
+msgid "I have already an account and just want to use it"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:53
+msgid "Please choose a username:"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:54
+#, fuzzy
+msgid "Username:"
+msgstr "felhasználónév:"
+
+#: ../gtk-glade/setupwizard.c:92
+#, c-format
+msgid "Checking if '%s' is available..."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
+msgid "Please wait..."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:101
+msgid "Sorry this username already exists. Please try a new one."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
+msgid "Ok !"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
+msgid "Communication problem, please try again later."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:134
+msgid "Thank you. Your account is now configured and ready for use."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:228
+msgid "Welcome to the account setup assistant"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:232
+msgid "Account setup assistant"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:236
+#, fuzzy
+msgid "Choosing a username"
+msgstr "felhasználónév:"
+
+#: ../gtk-glade/setupwizard.c:240
+msgid "Verifying"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:244
+#, fuzzy
+msgid "Confirmation"
+msgstr "Információk"
+
+#: ../gtk-glade/setupwizard.c:249
+msgid "Creating your account"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:253
+msgid "Now ready !"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:98
+#, fuzzy
+msgid "<b>Calling...</b>"
+msgstr "Kapcsolatilista"
+
+#: ../gtk-glade/incall_view.c:122
+#, fuzzy
+msgid "<b>In call with</b>"
+msgstr "Kapcsolatilista"
+
+#: ../gtk-glade/incall_view.c:124
+msgid "00::00::00"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:140
+#, c-format
+msgid "%02i::%02i::%02i"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:158
+#, fuzzy
+msgid "<b>Call ended.</b>"
+msgstr "Hívás vége"
+
+#: ../gtk-glade/incall_view.c:176
+#, fuzzy
+msgid "Unmute"
+msgstr "Korlátlan"
+
+#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
+msgid "Mute"
+msgstr ""
+
+#: ../gtk-glade/loginframe.c:82
+#, c-format
+msgid "Please enter login information for %s"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:1
+msgid "#"
+msgstr "#"
+
+#: ../gtk-glade/main.glade.h:2
+msgid "*"
+msgstr "*"
+
+#: ../gtk-glade/main.glade.h:3
+msgid "0"
+msgstr "0"
+
+#: ../gtk-glade/main.glade.h:4
+msgid "1"
+msgstr "1"
+
+#: ../gtk-glade/main.glade.h:5
+msgid "2"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:6
+msgid "3"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:7
+msgid "4"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:8
+msgid "5"
+msgstr "5"
+
+#: ../gtk-glade/main.glade.h:9
+msgid "6"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:10
+msgid "7"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:11
+msgid "8"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:12
+msgid "9"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:13
+#, fuzzy
+msgid "<b>Contact list</b>"
+msgstr "Kapcsolatilista"
+
+#: ../gtk-glade/main.glade.h:14
+#, fuzzy
+msgid "<b>Terminate call</b>"
+msgstr "Kapcsolatilista"
+
+#: ../gtk-glade/main.glade.h:15
+#, fuzzy
+msgid "<b>Welcome !</b>"
+msgstr "Kapcsolatilista"
+
+#: ../gtk-glade/main.glade.h:16
+msgid "A"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:17
+msgid ""
+"ADSL\n"
+"Fiber Channel"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:19
+msgid ""
+"All users\n"
+"Online users"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:21
+msgid "Assistant"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:22
+#, fuzzy
+msgid "Audio & Video"
+msgstr "Audio kodekek"
+
+#: ../gtk-glade/main.glade.h:23
+#, fuzzy
+msgid "Audio only"
+msgstr "Audio kodekek"
+
+#: ../gtk-glade/main.glade.h:24
+#, fuzzy
+msgid "Automatically log me in"
+msgstr "Automatikus valós hostnév megállapítása"
+
+#: ../gtk-glade/main.glade.h:25
+msgid "B"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
+msgid "C"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:27
+msgid "Check for updates"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:28
+msgid "D"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:29
+msgid "Default"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:30
+msgid "Digits"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:31
+#, fuzzy
+msgid "Duration"
+msgstr "Információk"
+
+#: ../gtk-glade/main.glade.h:32
+#, fuzzy
+msgid "Duration:"
+msgstr "Információk"
+
+#: ../gtk-glade/main.glade.h:33
+#, fuzzy
+msgid "Enable self-view"
+msgstr "Video engedélyezés"
+
+#: ../gtk-glade/main.glade.h:34
+msgid "Enter username, phone number, or full sip address"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:35
+#, fuzzy
+msgid "In call"
+msgstr "Beérkező hívás"
+
+#: ../gtk-glade/main.glade.h:36
+msgid "Internet connection:"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:37
+#, fuzzy
+msgid "Login information"
+msgstr "Kapcsolatiinformáció"
+
+#: ../gtk-glade/main.glade.h:38
+msgid "Lookup:"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:39
+msgid "Main view"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:41
+#, fuzzy
+msgid "My current identity:"
+msgstr "SIP azonosító:"
+
+#: ../gtk-glade/main.glade.h:42
+#, fuzzy
+msgid "Password"
+msgstr "jelszó:"
+
+#: ../gtk-glade/main.glade.h:43
+#, fuzzy
+msgid "SIP address or phone number:"
+msgstr "Gépeld ide a sip címet vagy a telefonszámot"
+
+#: ../gtk-glade/main.glade.h:44
+#, fuzzy
+msgid "Show current call"
+msgstr "nem sikerült hívni"
+
+#: ../gtk-glade/main.glade.h:45
+msgid "Start call"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:46
+msgid "Terminate call"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:47
+#, fuzzy
+msgid "Username"
+msgstr "felhasználónév:"
+
+#: ../gtk-glade/main.glade.h:48
+#, fuzzy
+msgid "_Linphone"
+msgstr "Linphone"
+
+#: ../gtk-glade/main.glade.h:49
+#, fuzzy
+msgid "_Modes"
+msgstr "Kodekek"
+
+#: ../gtk-glade/main.glade.h:50
+#, fuzzy
+msgid "gtk-connect"
+msgstr "Kapcsolódva."
+
+#: ../gtk-glade/main.glade.h:51
+msgid "gtk-find"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:52
+msgid "in"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:53
+msgid "label"
+msgstr ""
+
+#: ../gtk-glade/about.glade.h:1
+#, fuzzy
+msgid "About linphone"
+msgstr "linphone"
+
+#: ../gtk-glade/about.glade.h:2
+msgid "An internet video phone using the standart SIP (rfc3261) protocol."
+msgstr ""
+
+#: ../gtk-glade/about.glade.h:3
+msgid "Created by Simon Morlat\n"
+msgstr ""
+
+#: ../gtk-glade/about.glade.h:5
+msgid ""
+"fr: Simon Morlat\n"
+"en: Simon Morlat and Delphine Perreau\n"
+"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
+"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
+"sv: Daniel Nylander <po@danielnylander.se>\n"
+"es: Jesus Benitez <gnelson at inMail dot sk>\n"
+"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
+"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
+"pl: Robert Nasiadek <darkone@darkone.pl>\n"
+"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
+"hu: anonymous\n"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:1
+#, fuzzy
+msgid "<b>Contact information</b>"
+msgstr "Kapcsolatiinformáció"
+
+#: ../gtk-glade/contact.glade.h:2
+msgid "Allow this contact to see my presence status"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:4
+#, fuzzy
+msgid "SIP Address"
+msgstr "Sip cím:"
+
+#: ../gtk-glade/contact.glade.h:5
+msgid "Show this contact presence status"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
+#: ../gtk-glade/sip_account.glade.h:9
+msgid "gtk-cancel"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
+#: ../gtk-glade/sip_account.glade.h:10
+msgid "gtk-ok"
+msgstr ""
+
+#: ../gtk-glade/log.glade.h:1
+msgid "Linphone debug window"
+msgstr ""
+
+#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
+#: ../gtk-glade/chatroom.glade.h:2
+msgid "gtk-close"
+msgstr ""
+
+#: ../gtk-glade/password.glade.h:1
+#, fuzzy
+msgid "Linphone - Authentication required"
+msgstr "Hitelesítést kértek"
+
+#: ../gtk-glade/password.glade.h:2
+#, fuzzy
+msgid "Password:"
+msgstr "jelszó:"
+
+#: ../gtk-glade/password.glade.h:3
+msgid "Please enter the domain password"
+msgstr ""
+
+#: ../gtk-glade/password.glade.h:4
+msgid "UserID"
+msgstr ""
+
+#: ../gtk-glade/call_logs.glade.h:1
+#, fuzzy
+msgid "Call history"
+msgstr "Linphone - Híváselőzmények"
+
+#: ../gtk-glade/sip_account.glade.h:1
+msgid "Configure a SIP account"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:2
+msgid "Linphone - Configure a SIP account"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:3
+#, fuzzy
+msgid "Publish presence information"
+msgstr "Jelenléti információ közlése:"
+
+#: ../gtk-glade/sip_account.glade.h:4
+msgid "Register at startup"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:5
+#, fuzzy
+msgid "Registration duration (sec):"
+msgstr "Regisztrálási Időköz:"
+
+#: ../gtk-glade/sip_account.glade.h:6
+msgid "Route (optional):"
+msgstr "Út (nem kötelező):"
+
+#: ../gtk-glade/sip_account.glade.h:7
+#, fuzzy
+msgid "SIP Proxy address:"
+msgstr "SIP Proxy:"
+
+#: ../gtk-glade/sip_account.glade.h:8
+#, fuzzy
+msgid "Your SIP identity:"
+msgstr "SIP azonosító:"
+
+#: ../gtk-glade/sip_account.glade.h:11
+msgid "sip:"
+msgstr "sip:"
+
+#: ../gtk-glade/chatroom.glade.h:1
+#, fuzzy
+msgid "Send"
+msgstr "Hang"
+
+#: ../gtk-glade/incoming_call.glade.h:1
+msgid "Accept"
+msgstr "Elfogad"
+
+#: ../gtk-glade/incoming_call.glade.h:2
+#, fuzzy
+msgid "Decline"
+msgstr "line"
+
+#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
+msgid "Incoming call"
+msgstr "Beérkező hívás"
+
+#: ../gtk-glade/incoming_call.glade.h:4
+#, fuzzy
+msgid "Incoming call from"
+msgstr "Beérkező hívás"
+
+#: ../gtk-glade/incoming_call.glade.h:5
+#, fuzzy
+msgid "Linphone - Incoming call"
+msgstr "Beérkező hívás"
+
+#: ../gtk-glade/parameters.glade.h:1
+msgid "0 stands for \"unlimited\""
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:2
+#, fuzzy
+msgid "<b>Audio</b>"
+msgstr "Kapcsolatilista"
+
+#: ../gtk-glade/parameters.glade.h:3
+msgid "<b>Bandwidth control</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:4
+#, fuzzy
+msgid "<b>Codecs</b>"
+msgstr "Kapcsolatilista"
+
+#: ../gtk-glade/parameters.glade.h:5
+msgid "<b>Default identity</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:6
+msgid "<b>Language</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:7
+msgid "<b>NAT and Firewall</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:8
+#, fuzzy
+msgid "<b>Ports</b>"
+msgstr "Kapcsolatilista"
+
+#: ../gtk-glade/parameters.glade.h:9
+msgid "<b>Privacy</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:10
+#, fuzzy
+msgid "<b>Proxy accounts</b>"
+msgstr "Kapcsolatilista"
+
+#: ../gtk-glade/parameters.glade.h:11
+#, fuzzy
+msgid "<b>Transport</b>"
+msgstr "Kapcsolatilista"
+
+#: ../gtk-glade/parameters.glade.h:12
+msgid "<b>Video</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:13
+msgid "ALSA special device (optional):"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:14
+msgid "Add"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:15
+msgid "Audio RTP/UDP:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:16
+#, fuzzy
+msgid ""
+"Audio codecs\n"
+"Video codecs"
+msgstr "Audio és video kodekek"
+
+#: ../gtk-glade/parameters.glade.h:18
+msgid "Behind NAT / Firewall (specify gateway IP below)"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:19
+msgid "Behind NAT / Firewall (use STUN to resolve)"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:21
+msgid "CIF"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:22
+#, fuzzy
+msgid "Capture device:"
+msgstr "Felvevő hang eszköz:"
+
+#: ../gtk-glade/parameters.glade.h:23
+#, fuzzy
+msgid "Codecs"
+msgstr "Kodekek"
+
+#: ../gtk-glade/parameters.glade.h:24
+msgid "Direct connection to the Internet"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:25
+msgid "Disable"
+msgstr "Tiltás"
+
+#: ../gtk-glade/parameters.glade.h:26
+#, fuzzy
+msgid "Done"
+msgstr "Elveszítve"
+
+#: ../gtk-glade/parameters.glade.h:27
+#, fuzzy
+msgid "Download speed limit in Kbit/sec:"
+msgstr "Letöltési sávszélesség (kbit/sec):"
+
+#: ../gtk-glade/parameters.glade.h:28
+msgid "Edit"
+msgstr "Szerkesztés"
+
+#: ../gtk-glade/parameters.glade.h:29
+msgid "Enable"
+msgstr "Engedélyezés"
+
+#: ../gtk-glade/parameters.glade.h:30
+msgid "Enable echo cancellation"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:31
+msgid "Erase all passwords"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:32
+msgid "Manage SIP Accounts"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:33
+msgid "Multimedia settings"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:34
+#, fuzzy
+msgid "Network settings"
+msgstr "Hálózat"
+
+#: ../gtk-glade/parameters.glade.h:35
+#, fuzzy
+msgid "Playback device:"
+msgstr "Lejátszó hang eszköz:"
+
+#: ../gtk-glade/parameters.glade.h:36
+msgid "Prefered video resolution:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:37
+#, fuzzy
+msgid "Public IP address:"
+msgstr "Sip cím:"
+
+#: ../gtk-glade/parameters.glade.h:38
+msgid ""
+"Register to FONICS\n"
+"virtual network !"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:40
+msgid "Remove"
+msgstr "Eltávolítás"
+
+#: ../gtk-glade/parameters.glade.h:41
+#, fuzzy
+msgid "Ring device:"
+msgstr "Csengőhang forrás:"
+
+#: ../gtk-glade/parameters.glade.h:42
+#, fuzzy
+msgid "Ring sound:"
+msgstr "Csengőhang:"
+
+#: ../gtk-glade/parameters.glade.h:43
+msgid "SIP (UDP):"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:44
+msgid "Send DTMFs as SIP info"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:45
+msgid "Set Maximum Transmission Unit:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:46
+msgid "Settings"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:47
+#, fuzzy
+msgid "Stun server:"
+msgstr "Hang eszköz"
+
+#: ../gtk-glade/parameters.glade.h:48
+msgid "This section defines your SIP address when not using a SIP account"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:49
+#, fuzzy
+msgid "Upload speed limit in Kbit/sec:"
+msgstr "Feltöltési sávszélesség (kbit/sec):"
+
+#: ../gtk-glade/parameters.glade.h:50
+msgid "Use IPv6 instead of IPv4"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:51
+#, fuzzy
+msgid "User interface"
+msgstr "felhasználónév:"
+
+#: ../gtk-glade/parameters.glade.h:52
+msgid "Video RTP/UDP:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:53
+#, fuzzy
+msgid "Video input device:"
+msgstr "Hang eszköz"
+
+#: ../gtk-glade/parameters.glade.h:54
+msgid "Your display name (eg: John Doe):"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:55
+#, fuzzy
+msgid "Your resulting SIP address:"
+msgstr "Saját sip cím:"
+
+#: ../gtk-glade/parameters.glade.h:56
+#, fuzzy
+msgid "Your username:"
+msgstr "felhasználónév:"
+
+#: ../gtk-glade/parameters.glade.h:57
+msgid "a sound card\n"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:59
+msgid "default camera"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:60
+msgid "default soundcard"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:61
+msgid "default soundcard\n"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:63
+msgid "gtk-go-down"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:64
+msgid "gtk-go-up"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:65
+msgid "gtk-media-play"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:1
+msgid "<b>Search somebody</b>"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:2
+msgid "Add to my list"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:3
+msgid "Search contacts in directory"
+msgstr ""
+
+#: ../gtk-glade/waiting.glade.h:1
+msgid "Linphone"
+msgstr "Linphone"
+
+#: ../gtk-glade/waiting.glade.h:2
+msgid "Please wait"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:195
+#, fuzzy, c-format
+msgid "You have missed %i call."
+msgid_plural "You have missed %i calls."
+msgstr[0] "Van %i elhibázott hivás."
+msgstr[1] "Van %i elhibázott hivás."
+
+#: ../coreapi/linphonecore.c:223
+msgid "aborted"
+msgstr "megszakítva"
+
+#: ../coreapi/linphonecore.c:226
+msgid "completed"
+msgstr "befejezve"
+
+#: ../coreapi/linphonecore.c:229
+msgid "missed"
+msgstr "elhibázva"
+
+#: ../coreapi/linphonecore.c:234
+#, c-format
+msgid ""
+"%s at %s\n"
+"From: %s\n"
+"To: %s\n"
+"Status: %s\n"
+"Duration: %i mn %i sec\n"
+msgstr ""
+"%s nél %s\n"
+"Tól: %s\n"
+"Ig: %s\n"
+"Állapot: %s\n"
+"Időtartam: %i perc %i másodperc\n"
+
+#: ../coreapi/linphonecore.c:235
+msgid "Outgoing call"
+msgstr "Kimenő hívás"
+
+#: ../coreapi/linphonecore.c:445
+msgid ""
+"Your machine appears to be connected to an IPv6 network. By default linphone "
+"always uses IPv4. Please update your configuration if you want to use IPv6"
+msgstr ""
+"A géped úgy tűnik, hogy csatlakozik egy IPv6 hálózathoz. Alapból a linphone "
+"mindig az IPv4-et használja. Frissítsd a konfigurációdat, ha használni "
+"akarod az IPv6-ot"
+
+#: ../coreapi/linphonecore.c:739
+msgid "Ready"
+msgstr "Kész"
+
+#: ../coreapi/linphonecore.c:1014
+msgid "Remote end seems to have disconnected, the call is going to be closed."
+msgstr ""
+
+#: ../coreapi/linphonecore.c:1172
+msgid "Looking for telephone number destination..."
+msgstr "Telefonszám-cél keresése..."
+
+#: ../coreapi/linphonecore.c:1174
+msgid "Could not resolve this number."
+msgstr "Nem sikkerült értelmezni a számot."
+
+#: ../coreapi/linphonecore.c:1239
+msgid ""
+"Could not parse given sip address. A sip url usually looks like sip:"
+"user@domain"
+msgstr ""
+"Az adott szám nem értelmezhető. Egy sip cím általában így néz ki: user@domain"
+
+#: ../coreapi/linphonecore.c:1340
+msgid "Sorry, having multiple simultaneous calls is not supported yet !"
+msgstr "Bocsánat, a többszörös egyidejű hívások még nem támogatottak!"
+
+#: ../coreapi/linphonecore.c:1387
+msgid "Contacting"
+msgstr "Kapcsolódás"
+
+#: ../coreapi/linphonecore.c:1402
+msgid "could not call"
+msgstr "nem sikerült hívni"
+
+#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
+msgid "Connected."
+msgstr "Kapcsolódva."
+
+#: ../coreapi/linphonecore.c:1813
+msgid "Call ended"
+msgstr "Hívás vége"
+
+#: ../coreapi/linphonecore.c:2175
+msgid "No nat/firewall address supplied !"
+msgstr "Nincs nat/tűzfal cím megadva!"
+
+#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
+#, c-format
+msgid "Invalid nat address '%s' : %s"
+msgstr "Hibás nat cím '%s' : %s"
+
+#: ../coreapi/misc.c:134
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the pcm oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+"'modprobe snd-pcm-oss' as root to load it."
+msgstr ""
+"A számítógéped úgy tűnik, hogy ALSA hangot használ.\n"
+"Ez a legjobb választás. Mindazonáltal a pcm* OSS emuláció modulra\n"
+" a linphone-nak szüksége van és ez hiányzik. Kérem futassa le a\n"
+"'modprobe snd-pcm-oss' parancsot rendszergazdaként."
+
+#: ../coreapi/misc.c:137
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the mixer oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+" 'modprobe snd-mixer-oss' as root to load it."
+msgstr ""
+"A számítógéped úgy tűnik, hogy ALSA hangot használ.\n"
+"Ez a legjobb választás. Mindazonáltal a mixer OSS emuláció modulra\n"
+" a linphone-nak szüksége van és ez hiányzik. Kérem futassa le a\n"
+"'modprobe snd-pcm-oss' parancsot rendszergazdaként."
+
+#: ../coreapi/misc.c:610
+msgid "Stun lookup in progress..."
+msgstr "Stun keresés folyamatban..."
+
+#: ../coreapi/exevents.c:127
+msgid "Call terminated."
+msgstr "A hívás befejezve."
+
+#: ../coreapi/exevents.c:149
+msgid "Could not reach destination."
+msgstr "A cél elérhetetlen."
+
+#: ../coreapi/exevents.c:158
+msgid "User is busy."
+msgstr "A felhasználó foglalt."
+
+#: ../coreapi/exevents.c:159
+msgid "User is temporarily unavailable."
+msgstr "A felhasználó ideiglenesen nem elérhető"
+
+#: ../coreapi/exevents.c:160
+msgid "Request Cancelled."
+msgstr "Kérelem elutasítva."
+
+#. char *retrymsg=_("%s. Retry after %i minute(s).");
+#: ../coreapi/exevents.c:162
+msgid "User does not want to be disturbed."
+msgstr "A felhasználó nem akarja, hogy zavarják."
+
+#: ../coreapi/exevents.c:163
+msgid "Call declined."
+msgstr "Hívás elutasítva"
+
+#: ../coreapi/exevents.c:191
+msgid "Bad request"
+msgstr "Rossz kérés"
+
+#: ../coreapi/exevents.c:194
+msgid "User cannot be found at given address."
+msgstr "Nem telálható felhasználó at adott címen."
+
+#: ../coreapi/exevents.c:197
+msgid "Remote user cannot support any of proposed codecs."
+msgstr ""
+"A távoli felhasználó nem rendelkezik a javasolt kódoló-dekódolókkal (codecs)"
+
+#. time out, call leg is lost
+#: ../coreapi/exevents.c:227
+msgid "Timeout."
+msgstr "Időtúllépés."
+
+#: ../coreapi/exevents.c:230
+msgid "Remote host was found but refused connection."
+msgstr "A távoli gép elérhető, de a kapcsolatot visszautasította."
+
+#: ../coreapi/exevents.c:339
+msgid "is contacting you."
+msgstr "kapcsolatba lép veled."
+
+#: ../coreapi/exevents.c:424
+#, c-format
+msgid "Redirected to %s..."
+msgstr "Átirányítva idw %s..."
+
+#: ../coreapi/exevents.c:440
+msgid ""
+"User is not reachable at the moment but he invites you\n"
+"to contact him using the following alternate resource:"
+msgstr ""
+"A felhasználó nem elérhető pillanatnyilag de meghívja Önt\n"
+"thogy lépjen kapcsolatba vele miközben használja a következő alternatív "
+"erőforrást:"
+
+#: ../coreapi/exevents.c:861
+msgid "Early media."
+msgstr "Korai médiák."
+
+#: ../coreapi/exevents.c:972
+#, c-format
+msgid "Registration on %s failed: %s"
+msgstr "A regisztáció a %s -n nem sikerült: %s"
+
+#: ../coreapi/exevents.c:972
+msgid "no response timeout"
+msgstr "időtúllépés után nincs válasz"
+
+#: ../coreapi/exevents.c:998
+#, c-format
+msgid "Registration on %s successful."
+msgstr "A regisztáció a %s -n sikerült."
+
+#: ../coreapi/exevents.c:999
+#, fuzzy, c-format
+msgid "Unregistration on %s done."
+msgstr "A regisztáció a %s -n sikerült."
+
+#. people for which we don't have yet an answer should appear as offline
+#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
+msgid "Gone"
+msgstr "Elveszítve"
+
+#: ../coreapi/presence.c:129
+msgid "Waiting for Approval"
+msgstr "Jóváhagyásra vár"
+
+#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
+msgid "Online"
+msgstr "Elérhető"
+
+#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
+msgid "Busy"
+msgstr "Foglalt"
+
+#: ../coreapi/presence.c:142
+msgid "Be Right Back"
+msgstr "Legyen igazad"
+
+#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
+msgid "Away"
+msgstr "Nem elérhető"
+
+#: ../coreapi/presence.c:151
+msgid "On The Phone"
+msgstr "Telefonál"
+
+#: ../coreapi/presence.c:156
+msgid "Out To Lunch"
+msgstr "Ebédelni ment"
+
+#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
+msgid "Closed"
+msgstr "Lezárva"
+
+#: ../coreapi/friend.c:35
+msgid "Unknown"
+msgstr ""
+
+#: ../coreapi/friend.c:44
+#, fuzzy
+msgid "Be right back"
+msgstr "Legyen igazad"
+
+#: ../coreapi/friend.c:50
+#, fuzzy
+msgid "On the phone"
+msgstr "Telefonál"
+
+#: ../coreapi/friend.c:53
+#, fuzzy
+msgid "Out to lunch"
+msgstr "Ebédelni ment"
+
+#: ../coreapi/friend.c:56
+msgid "Do not disturb"
+msgstr "Ne zavarj"
+
+#: ../coreapi/friend.c:59
+#, fuzzy
+msgid "Moved"
+msgstr "Kodekek"
+
+#: ../coreapi/friend.c:62
+msgid "Using another messaging service"
+msgstr ""
+
+#: ../coreapi/friend.c:65
+#, fuzzy
+msgid "Offline"
+msgstr "Elérhető"
+
+#: ../coreapi/friend.c:68
+msgid "Pending"
+msgstr ""
+
+#: ../coreapi/friend.c:74
+msgid "Unknown-bug"
+msgstr ""
+
+#: ../coreapi/proxy.c:221
+msgid ""
+"The sip proxy address you entered is invalid, it must start with \"sip:\" "
+"followed by a hostname."
+msgstr ""
+
+#: ../coreapi/proxy.c:227
+msgid ""
+"The sip identity you entered is invalid.\n"
+"It should look like sip:username@proxydomain, such as sip:alice@example.net"
+msgstr ""
+
+#: ../coreapi/proxy.c:634
+#, fuzzy, c-format
+msgid "Could not login as %s"
+msgstr "Nemtalálható a pixmap fájl: %s"
+
+#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
+msgid "ITU-G.711 alaw encoder"
+msgstr ""
+
+#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
+msgid "ITU-G.711 alaw decoder"
+msgstr ""
+
+#: ../mediastreamer2/src/alsa.c:923
+msgid "Alsa sound source"
+msgstr ""
+
+#: ../mediastreamer2/src/alsa.c:1027
+msgid "Alsa sound output"
+msgstr ""
+
+#: ../mediastreamer2/src/aqsnd.c:891
+msgid "Sound capture filter for MacOS X Audio Queue Service"
+msgstr ""
+
+#: ../mediastreamer2/src/aqsnd.c:915
+msgid "Sound playback filter for MacOS X Audio Queue Service"
+msgstr ""
+
+#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
+msgid "DTMF generator"
+msgstr ""
+
+#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
+msgid "The GSM full-rate codec"
+msgstr ""
+
+#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
+msgid "The GSM codec"
+msgstr ""
+
+#: ../mediastreamer2/src/macsnd.c:670
+msgid "Sound capture filter for MacOS X Core Audio drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/macsnd.c:684
+msgid "Sound playback filter for MacOS X Core Audio drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
+msgid "A filter to make conferencing"
+msgstr ""
+
+#: ../mediastreamer2/src/msfileplayer.c:295
+#: ../mediastreamer2/src/msfileplayer.c:313
+msgid "Raw files and wav reader"
+msgstr ""
+
+#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
+#: ../mediastreamer2/src/msfilerec_win.c:216
+#: ../mediastreamer2/src/msfilerec_win.c:234
+msgid "Wav file recorder"
+msgstr ""
+
+#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
+msgid "A filter that send several inputs to one output."
+msgstr ""
+
+#: ../mediastreamer2/src/msresample.c:221
+#: ../mediastreamer2/src/msresample.c:239
+msgid "frequency resampler"
+msgstr ""
+
+#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
+msgid "RTP output filter"
+msgstr ""
+
+#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
+msgid "RTP input filter"
+msgstr ""
+
+#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
+#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
+msgid "The free and wonderful speex codec"
+msgstr ""
+
+#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
+msgid "A filter that controls and measure sound volume"
+msgstr ""
+
+#: ../mediastreamer2/src/msv4l.c:1009
+msgid "A video4linux compatible source filter to stream pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/msv4l2.c:458
+msgid "A filter to grab pictures from Video4Linux2-powered cameras"
+msgstr ""
+
+#: ../mediastreamer2/src/nowebcam.c:1780
+msgid "A filter that outputs a static image."
+msgstr ""
+
+#: ../mediastreamer2/src/oss.c:567
+msgid "Sound capture filter for OSS drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/oss.c:581
+msgid "Sound playback filter for OSS drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
+msgid "A pixel format converter"
+msgstr ""
+
+#: ../mediastreamer2/src/sizeconv.c:204
+msgid "A video size converter"
+msgstr ""
+
+#: ../mediastreamer2/src/sizeconv.c:222
+msgid "a small video size converter"
+msgstr ""
+
+#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
+msgid "Echo canceler using speex library"
+msgstr ""
+
+#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
+msgid "A filter that reads from input and copy to its multiple outputs."
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:375
+msgid "The theora video encoder from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:393
+msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
+msgid "The theora video decoder from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
+msgid "ITU-G.711 ulaw encoder"
+msgstr ""
+
+#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
+msgid "ITU-G.711 ulaw decoder"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
+#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
+msgid "A H.263 decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:688
+msgid "A MPEG4 decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:704
+msgid "A RTP/JPEG decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:720
+msgid "A MJPEG decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:736
+msgid "A snow decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
+msgid "A video H.263 encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:856
+msgid ""
+"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
+"spec."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
+msgid "A video MPEG4 encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:888
+msgid "A video snow encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:904
+msgid "A RTP/MJPEG encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:938
+msgid ""
+"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:970
+msgid ""
+"The snow codec is royalty-free and is open-source. \n"
+"It uses innovative techniques that makes it one of most promising video "
+"codec. It is implemented within the ffmpeg project.\n"
+"However it is under development, quite unstable and compatibility with other "
+"versions cannot be guaranteed."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:990
+msgid "A MJPEG encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
+msgid "A generic video display"
+msgstr ""
+
+#: ../mediastreamer2/src/wincevideods.c:966
+#: ../mediastreamer2/src/wincevideods.c:984
+#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
+#: ../mediastreamer2/src/winvideods.c:1306
+#: ../mediastreamer2/src/winvideods.c:1324
+msgid "A video4windows compatible source filter to stream pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
+msgid "A video for windows (vfw.h) based source filter to grab pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
+msgid "ICE filter"
+msgstr ""
+
+#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
+msgid "A filter that trashes its input (useful for terminating some graphs)."
+msgstr ""
+
+#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
+msgid "Parametric sound equalizer."
+msgstr ""
+
+#: ../mediastreamer2/src/msdscap-mingw.cc:1003
+msgid "A webcam grabber based on directshow."
+msgstr ""
+
+#, fuzzy
+#~ msgid "_View"
+#~ msgstr "Video"
+
+#, fuzzy
+#~ msgid "_Properties"
+#~ msgstr "RTP beállítások"
+
+#, fuzzy
+#~ msgid "Show logs"
+#~ msgstr "Mutasd a hívásokat"
+
+#, fuzzy
+#~ msgid "_About"
+#~ msgstr "Hozzáférés"
+
+#, fuzzy
+#~ msgid "gtk-remove"
+#~ msgstr "Eltávolítás"
+
+#, fuzzy
+#~ msgid "Proxy in use"
+#~ msgstr "Használt SIP Proxy:"
+
+#~ msgid "Sound"
+#~ msgstr "Hang"
+
+#, fuzzy
+#~ msgid "Default identity"
+#~ msgstr "SIP azonosító:"
+
+#, fuzzy
+#~ msgid "Proxy accounts"
+#~ msgstr "Használt SIP Proxy:"
+
+#~ msgid "Go"
+#~ msgstr "Ugrás"
+
+#~ msgid "Address book"
+#~ msgstr "Címjegyzék"
+
+#~ msgid "Exit"
+#~ msgstr "Kilépés"
+
+#~ msgid "Help"
+#~ msgstr "Help"
+
+#~ msgid "Shows the address book"
+#~ msgstr "Mutasd a címjegyzéket"
+
+#~ msgid "..."
+#~ msgstr "..."
+
+#~ msgid ""
+#~ "Call or\n"
+#~ "answer"
+#~ msgstr ""
+#~ "Hívás vagy\n"
+#~ "Válasz"
+
+#~ msgid ""
+#~ "Hangup\n"
+#~ "or refuse"
+#~ msgstr ""
+#~ "Lerak vagy\n"
+#~ "Nem válaszol"
+
+#~ msgid "Or chat !"
+#~ msgstr "Vagy chat-elj!"
+
+#~ msgid "Show more..."
+#~ msgstr "További beállítások..."
+
+#~ msgid "Playback level:"
+#~ msgstr "Lejátszási hangerő:"
+
+#~ msgid "Recording level:"
+#~ msgstr "Felvételi hangerő:"
+
+#~ msgid "Ring level:"
+#~ msgstr "Csengetési hangerő:"
+
+#~ msgid "Controls"
+#~ msgstr "Vezérlés"
+
+#~ msgid "Reachable"
+#~ msgstr "Elérhető"
+
+#~ msgid "Busy, I'll be back in "
+#~ msgstr "Foglalt vagyok, jövök vissza"
+
+#~ msgid "The other party will be informed that you'll be back in X minutes"
+#~ msgstr "A másik fél tájékoztatva lesz, hogy X perc alatt vissza fogsz jönni"
+
+#~ msgid "mn"
+#~ msgstr "perc"
+
+#~ msgid "Moved temporarily"
+#~ msgstr "Ideiglenesen nem elérhető"
+
+#~ msgid "Alternative service"
+#~ msgstr "Átirányítás"
+
+#~ msgid "URL:"
+#~ msgstr "URL:"
+
+#~ msgid "Presence"
+#~ msgstr "Elérhető"
+
+#~ msgid "Press digits to send DTMFs."
+#~ msgstr "Nyomja le a számokat a DTMF küldéshez"
+
+#~ msgid ""
+#~ "  3\n"
+#~ "def"
+#~ msgstr ""
+#~ "  3\n"
+#~ "def"
+
+#~ msgid ""
+#~ "  2\n"
+#~ "abc"
+#~ msgstr ""
+#~ "  2\n"
+#~ "abc"
+
+#~ msgid ""
+#~ "  4\n"
+#~ "ghi"
+#~ msgstr ""
+#~ "  4\n"
+#~ "ghi"
+
+#~ msgid ""
+#~ " 5\n"
+#~ "jkl"
+#~ msgstr ""
+#~ " 5\n"
+#~ "jkl"
+
+#~ msgid ""
+#~ "  6\n"
+#~ "mno"
+#~ msgstr ""
+#~ "  6\n"
+#~ "mno"
+
+#~ msgid ""
+#~ "   7\n"
+#~ "pqrs"
+#~ msgstr ""
+#~ "   7\n"
+#~ "pqrs"
+
+#~ msgid ""
+#~ "  8\n"
+#~ "tuv"
+#~ msgstr ""
+#~ "  8\n"
+#~ "tuv"
+
+#~ msgid ""
+#~ "   9\n"
+#~ "wxyz"
+#~ msgstr ""
+#~ "   9\n"
+#~ "wxyz"
+
+#~ msgid "DTMF"
+#~ msgstr "DTMF"
+
+#~ msgid "My online friends"
+#~ msgstr "Elérhető partnerek"
+
+#~ msgid ""
+#~ "C: 2001\n"
+#~ "Made in Old Europe"
+#~ msgstr ""
+#~ "C: 2001\n"
+#~ "Made in Old Europe"
+
+#~ msgid ""
+#~ "Linphone is a web-phone.\n"
+#~ "It is compatible with SIP and RTP protocols."
+#~ msgstr ""
+#~ "A Linphone egy web-telefon.\n"
+#~ "SIP és RTP kompatíbilis."
+
+#~ msgid "http://www.linphone.org"
+#~ msgstr "http://www.linphone.org"
+
+#~ msgid "Use IPv6 network (if available)"
+#~ msgstr "IPv6 hálózat használata (ha elérhető)"
+
+#~ msgid ""
+#~ "Toggle this if you are on an ipv6 network and you wish linphone to use it."
+#~ msgstr "Ha egy IPv6 hálózat elérhető, akkor a linphone használja azt."
+
+#~ msgid "Global"
+#~ msgstr "Általános"
+
+#~ msgid ""
+#~ "These options is only for users in a private network, behind a gateway. "
+#~ "If you are not in this situation, then leave this empty."
+#~ msgstr ""
+#~ "Ez az opció azoknak a felhasználóknak kell, akik egy privát hálózaton "
+#~ "tűzfal mögül interneteznek. Egyébként üresen kell hagyni."
+
+#~ msgid "No firewall"
+#~ msgstr "Nincs tűzfal"
+
+#~ msgid "Use this STUN server to guess firewall address :"
+#~ msgstr "STUN szerver használata a tűzfal címének meghatározásához."
+
+#~ msgid "Specify firewall address manually:"
+#~ msgstr "Tűzfal külső címe:"
+
+#~ msgid "NAT traversal options (experimental)"
+#~ msgstr "NAT beállítások áttekintése (kísérleti)"
+
+#~ msgid "Number of buffered miliseconds (jitter compensation):"
+#~ msgstr "A pufferelt milisecondok száma (jitter compensation):"
+
+#~ msgid "RTP port used for audio:"
+#~ msgstr "RTP port, audió használatra:"
+
+#~ msgid "Use SIP INFO message instead of RTP rfc2833 for DTMF transmitting"
+#~ msgstr "Használj SIP INFO üzenetet RTP rfc2833 helyett a DTMF átvitelnél"
+
+#~ msgid "RTP-RFC2833 is the recommended way."
+#~ msgstr "RTP-RFC2833 az ajánlott."
+
+#~ msgid "Other"
+#~ msgstr "Egyéb"
+
+#~ msgid "micro"
+#~ msgstr "mikrofon"
+
+#~ msgid "Recording source:"
+#~ msgstr "Felvételi forrás:"
+
+#~ msgid "Enable echo-canceler (cancels the echo heard by the remote party)"
+#~ msgstr ""
+#~ "Visszhang törlés engedélyezése (törli a visszhangot, amit hall a távoli "
+#~ "partner"
+
+#~ msgid "Choose file"
+#~ msgstr "Fájl kiválasztás"
+
+#~ msgid "Listen"
+#~ msgstr "Hallgatás"
+
+#~ msgid "Sound properties"
+#~ msgstr "Hang beállítások"
+
+#~ msgid "Run sip user agent on port:"
+#~ msgstr "SIP felhasználó ügynök által használt port:"
+
+#~ msgid "It is strongly recommended to use port 5060."
+#~ msgstr "Erősen ajánlott az 5060-as port használata."
+
+#~ msgid "SIP port"
+#~ msgstr "SIP port"
+
+#~ msgid "@"
+#~ msgstr "@"
+
+#~ msgid "Identity"
+#~ msgstr "Azonosító"
+
+#~ msgid "Add proxy/registrar"
+#~ msgstr "Proxy vagy regisztráció hozzáadás"
+
+#~ msgid "Remote services"
+#~ msgstr "Távoli szolgáltatások"
+
+#~ msgid "Clear all stored authentication information (username,password...)"
+#~ msgstr ""
+#~ "Az összes tárolt hitelesítési információ törlése (felhasználónév, "
+#~ "jelszó...)"
+
+#~ msgid "Authentication information"
+#~ msgstr "Hitelesítési információ"
+
+#~ msgid "SIP"
+#~ msgstr "SIP"
+
+#~ msgid "List of audio codecs, in order of preference:"
+#~ msgstr "Az audió kódoló-dekódolók listája, a preferencia rendjében:"
+
+#~ msgid "Video Codecs"
+#~ msgstr "Audio kodekek"
+
+#~ msgid ""
+#~ "Note: Codecs in red are not usable regarding to your connection type to "
+#~ "the internet."
+#~ msgstr ""
+#~ "Figyelem: A pirosban lévő kodekek nem használhatók a jelenlegi "
+#~ "internetkapcsolattal."
+
+#~ msgid "No information availlable"
+#~ msgstr "Nem érhető el információ"
+
+#~ msgid "Codec information"
+#~ msgstr "Kodekinformáció"
+
+#~ msgid "Address Book"
+#~ msgstr "Címjegyzék"
+
+#~ msgid "Select"
+#~ msgstr "Kiválasztás"
+
+#~ msgid ""
+#~ "User is not reachable at the moment but he invites you to contact him "
+#~ "using the following alternate ressource:"
+#~ msgstr ""
+#~ "A felhasználó jelenleg nem elérhető, de kéri, hogy lépj vele kapcsolatba "
+#~ "itt:"
+
+#~ msgid "None."
+#~ msgstr "Nincs."
+
+#~ msgid "Proxy/Registrar configuration box"
+#~ msgstr "Proxy/Regisztráció konfigurációs doboz"
+
+#~ msgid "Send registration:"
+#~ msgstr "Regisztárció küldés:"
+
+#~ msgid "Name:"
+#~ msgstr "Név:"
+
+#~ msgid "Subscribe policy:"
+#~ msgstr "Láthatósági szabály:"
+
+#~ msgid "Send subscription (see person's online status)"
+#~ msgstr "Láthatóság küldése (látszik a személy elérhetőségi státusza)"
+
+#~ msgid "New incoming subscription"
+#~ msgstr "Új beérkező előfizetés"
+
+#~ msgid "You have received a new subscription..."
+#~ msgstr "Megkaptál egy új előfizetést."
+
+#~ msgid "Refuse"
+#~ msgstr "Hulladék"
+
+#~ msgid "Authentication required for realm"
+#~ msgstr "Hitelesítési kérelem a tartománynak"
+
+#~ msgid "userid:"
+#~ msgstr "felhasználói azonosító:"
+
+#~ msgid "realm:"
+#~ msgstr "tartomány:"
+
+#~ msgid "Chat Room"
+#~ msgstr "Chat szoba"
+
+#~ msgid "Text:"
+#~ msgstr "Szöveg:"
+
+#~ msgid "The caller asks for resource reservation. Do you agree ?"
+#~ msgstr "A hívó forrásfoglalást kér. Egyetértesz?"
+
+#~ msgid ""
+#~ "The caller doesn't use resource reservation. \t\t\t\t\tDo you wish to "
+#~ "continue anyway ?"
+#~ msgstr ""
+#~ "A hívó nem használ forrásfoglalást. \t\t\t\t\tÍgy is szeretnéd folytatni?"
+
+#~ msgid "linphone - receiving call from %s"
+#~ msgstr "linphone - hívást fogad innen %s"
+
+#~ msgid ""
+#~ "You have received a subscription from %s.This means that this person "
+#~ "wishes to be notified of your presence information (online, busy, "
+#~ "away...).\n"
+#~ "Do you agree ?"
+#~ msgstr ""
+#~ "Kaptál egy előfizetést tőle %s. Ez azt jelenti, hogy ez a személy "
+#~ "szeretné, hogy értesítsék a jelenlétinformációd (online, elfoglalt, "
+#~ "away...).\n"
+#~ "Egyetértesz?"
+
+#~ msgid "Authentication required for realm %s"
+#~ msgstr "Hitelesítési kérelem ebből a tartományból %s"
+
+#~ msgid "None"
+#~ msgstr "Nincs"
+
+#~ msgid "Wait"
+#~ msgstr "Várakozás"
+
+#~ msgid "Deny"
+#~ msgstr "Tiltás"
+
+#~ msgid "Bad sip address: a sip address looks like sip:user@domain"
+#~ msgstr "Rossz sip cím: egy sip cím általában így néz ki: user@domain"
+
+#~ msgid "Stun lookup done..."
+#~ msgstr "Stun keresés kész..."
diff --git a/po/insert-header.sin b/po/insert-header.sin
new file mode 100644 (file)
index 0000000..b26de01
--- /dev/null
@@ -0,0 +1,23 @@
+# Sed script that inserts the file called HEADER before the header entry.
+#
+# At each occurrence of a line starting with "msgid ", we execute the following
+# commands. At the first occurrence, insert the file. At the following
+# occurrences, do nothing. The distinction between the first and the following
+# occurrences is achieved by looking at the hold space.
+/^msgid /{
+x
+# Test if the hold space is empty.
+s/m/m/
+ta
+# Yes it was empty. First occurrence. Read the file.
+r HEADER
+# Output the file's contents by reading the next line. But don't lose the
+# current line while doing this.
+g
+N
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
diff --git a/po/it.po b/po/it.po
new file mode 100644 (file)
index 0000000..2c3b11a
--- /dev/null
+++ b/po/it.po
@@ -0,0 +1,1556 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Linphone 3.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-10-16 15:24+0200\n"
+"PO-Revision-Date: 2002-10-15 HO:MI+ZONE\n"
+"Last-Translator: Matteo Piazza <matteo.piazza@trentinonetwork.it>\n"
+"Language-Team: it <it@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
+#: ../gtk-glade/support.c:102
+#, c-format
+msgid "Couldn't find pixmap file: %s"
+msgstr ""
+
+#: ../gtk-glade/chat.c:27
+#, c-format
+msgid "Chat with %s"
+msgstr "Chat con %s"
+
+#: ../gtk-glade/main.c:90
+msgid "log to stdout some debug information while running."
+msgstr ""
+
+#: ../gtk-glade/main.c:97
+msgid "Start only in the system tray, do not show the main interface."
+msgstr ""
+
+#: ../gtk-glade/main.c:104
+msgid "address to call right now"
+msgstr ""
+
+#: ../gtk-glade/main.c:111
+msgid "if set automatically answer incoming calls"
+msgstr ""
+
+#: ../gtk-glade/main.c:119
+msgid ""
+"Specifiy a working directory (should be the base of the installation, eg: c:"
+"\\Program Files\\Linphone)"
+msgstr ""
+
+#: ../gtk-glade/main.c:675
+#, c-format
+msgid "Incoming call from %s"
+msgstr "Chiamata proveniente da %s"
+
+#: ../gtk-glade/main.c:707
+#, c-format
+msgid ""
+"%s would like to add you to his contact list.\n"
+"Would you allow him to see your presence status or add him to your contact "
+"list ?\n"
+"If you answer no, this person will be temporarily blacklisted."
+msgstr ""
+"%s voui aggiungere il tuo contatto alla sua listaVoui permettere che lui "
+"veda il tuo stato o aggiungerlo alla tua lista dei contatti Se rispondi no "
+"questo utente sarà momentaneamente bloccato."
+
+#: ../gtk-glade/main.c:777
+#, c-format
+msgid ""
+"Please enter your password for username <i>%s</i>\n"
+" at domain <i>%s</i>:"
+msgstr "Prego inserire la password per username <i>%s</i> e dominio <i>%s<i>"
+
+#: ../gtk-glade/main.c:871
+msgid "Website link"
+msgstr ""
+
+#: ../gtk-glade/main.c:907
+msgid "Linphone - a video internet phone"
+msgstr ""
+
+#: ../gtk-glade/main.c:926
+#, c-format
+msgid "%s (Default)"
+msgstr "%s (Default)"
+
+#: ../gtk-glade/main.c:1168
+msgid "A free SIP video-phone"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
+#: ../gtk-glade/contact.glade.h:3
+msgid "Name"
+msgstr "Nome"
+
+#: ../gtk-glade/friendlist.c:212
+msgid "Presence status"
+msgstr "Presenza"
+
+#: ../gtk-glade/friendlist.c:243
+#, c-format
+msgid "Search in %s directory"
+msgstr "Cerca contatti nella directory %s"
+
+#: ../gtk-glade/friendlist.c:432
+msgid "Invalid sip contact !"
+msgstr "Contatto SIP non valido"
+
+#: ../gtk-glade/friendlist.c:474
+#, c-format
+msgid "Call %s"
+msgstr "Chiamata %s"
+
+#: ../gtk-glade/friendlist.c:475
+#, c-format
+msgid "Send text to %s"
+msgstr "Invia testo a %s"
+
+#: ../gtk-glade/friendlist.c:476
+#, c-format
+msgid "Edit contact '%s'"
+msgstr "Modifica contatto %s"
+
+#: ../gtk-glade/friendlist.c:477
+#, c-format
+msgid "Delete contact '%s'"
+msgstr "Elimina contatto %s"
+
+#: ../gtk-glade/friendlist.c:519
+#, c-format
+msgid "Add new contact from %s directory"
+msgstr "Aggiungi nuovo contatto dalla directory %s"
+
+#: ../gtk-glade/propertybox.c:251
+msgid "Rate (Hz)"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:257
+msgid "Status"
+msgstr "Stato"
+
+#: ../gtk-glade/propertybox.c:263
+msgid "Min bitrate (kbit/s)"
+msgstr "Bitrate Min (kbit/s)"
+
+#: ../gtk-glade/propertybox.c:269
+msgid "Parameters"
+msgstr "Parametri"
+
+#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
+msgid "Enabled"
+msgstr "Attivato"
+
+#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
+msgid "Disabled"
+msgstr "Disattivato"
+
+#: ../gtk-glade/propertybox.c:480
+msgid "Account"
+msgstr "Account"
+
+#: ../gtk-glade/propertybox.c:620
+msgid "English"
+msgstr "Inglese"
+
+#: ../gtk-glade/propertybox.c:621
+msgid "French"
+msgstr "Francese"
+
+#: ../gtk-glade/propertybox.c:622
+msgid "Swedish"
+msgstr "Svedese"
+
+#: ../gtk-glade/propertybox.c:623
+msgid "Italian"
+msgstr "Italiano"
+
+#: ../gtk-glade/propertybox.c:624
+msgid "Spanish"
+msgstr "Spagnolo"
+
+#: ../gtk-glade/propertybox.c:625
+msgid "Brazilian Portugese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:626
+msgid "Polish"
+msgstr "Polacco"
+
+#: ../gtk-glade/propertybox.c:627
+msgid "German"
+msgstr "Tedesco"
+
+#: ../gtk-glade/propertybox.c:628
+msgid "Russian"
+msgstr "Russo"
+
+#: ../gtk-glade/propertybox.c:629
+msgid "Japanese"
+msgstr "Giapponese"
+
+#: ../gtk-glade/propertybox.c:630
+msgid "Dutch"
+msgstr "Olandese"
+
+#: ../gtk-glade/propertybox.c:631
+msgid "Hungarian"
+msgstr "Ungherese"
+
+#: ../gtk-glade/propertybox.c:632
+msgid "Czech"
+msgstr "Ceco"
+
+#: ../gtk-glade/propertybox.c:633
+msgid "Chinese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:690
+msgid ""
+"You need to restart linphone for the new language selection to take effect."
+msgstr "Riavviare il software per utilizzare la nuova lingua selezionata"
+
+#: ../gtk-glade/update.c:80
+#, c-format
+msgid ""
+"A more recent version is availalble from %s.\n"
+"Would you like to open a browser to download it ?"
+msgstr ""
+"Una versione più recente è disponibile da %s.\n"
+"Vuoi aprire un browser per eseguire il download ?"
+
+#: ../gtk-glade/update.c:91
+msgid "You are running the lastest version."
+msgstr "Non è stato trovato alcun aggiornamento"
+
+#: ../gtk-glade/buddylookup.c:66
+msgid "Firstname, Lastname"
+msgstr "Nome, Cognome"
+
+#: ../gtk-glade/buddylookup.c:73
+msgid "SIP address"
+msgstr "Indirizzi SIP"
+
+#: ../gtk-glade/buddylookup.c:121
+msgid "Error communicating with server."
+msgstr "Errore di comunicazione"
+
+#: ../gtk-glade/buddylookup.c:125
+msgid "Connecting..."
+msgstr "In connessione..."
+
+#: ../gtk-glade/buddylookup.c:129
+msgid "Connected"
+msgstr "Connessione"
+
+#: ../gtk-glade/buddylookup.c:133
+msgid "Receiving data..."
+msgstr "Ricezione data..."
+
+#: ../gtk-glade/buddylookup.c:141
+#, c-format
+msgid "Found %i contact"
+msgid_plural "Found %i contacts"
+msgstr[0] "Trovato %i contatto"
+msgstr[1] "Trovato %i contatti"
+
+#: ../gtk-glade/setupwizard.c:25
+msgid ""
+"Welcome !\n"
+"This assistant will help you to use a SIP account for your calls."
+msgstr ""
+"Benvenuti !\n"
+"La procedura vi aiutera a configurare un account SIP."
+
+#: ../gtk-glade/setupwizard.c:34
+msgid "Create an account by choosing a username"
+msgstr "Creare un account scegliendo l'username"
+
+#: ../gtk-glade/setupwizard.c:35
+msgid "I have already an account and just want to use it"
+msgstr "Ho gia un account e voglio usarlo"
+
+#: ../gtk-glade/setupwizard.c:53
+msgid "Please choose a username:"
+msgstr "Prego scegliere un username"
+
+#: ../gtk-glade/setupwizard.c:54
+msgid "Username:"
+msgstr "Manuale utente"
+
+#: ../gtk-glade/setupwizard.c:92
+#, c-format
+msgid "Checking if '%s' is available..."
+msgstr "Controllo se '%s' è disponibile..."
+
+#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
+msgid "Please wait..."
+msgstr "Prego attendere ..."
+
+#: ../gtk-glade/setupwizard.c:101
+msgid "Sorry this username already exists. Please try a new one."
+msgstr "Spiacenti, questo usernsame è gia utilizzato. Prego riprovare"
+
+#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
+msgid "Ok !"
+msgstr "Ok !"
+
+#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
+msgid "Communication problem, please try again later."
+msgstr "Errore di comunicazione, prego riprovare."
+
+#: ../gtk-glade/setupwizard.c:134
+msgid "Thank you. Your account is now configured and ready for use."
+msgstr "Grazie. Il tuo account è configurato e pronto all'uso"
+
+#: ../gtk-glade/setupwizard.c:228
+msgid "Welcome to the account setup assistant"
+msgstr "Benvenuto nel configuratore di account"
+
+#: ../gtk-glade/setupwizard.c:232
+msgid "Account setup assistant"
+msgstr "Configuratore di account"
+
+#: ../gtk-glade/setupwizard.c:236
+msgid "Choosing a username"
+msgstr "Scegli un username"
+
+#: ../gtk-glade/setupwizard.c:240
+msgid "Verifying"
+msgstr "Verifica"
+
+#: ../gtk-glade/setupwizard.c:244
+msgid "Confirmation"
+msgstr "Informazioni"
+
+#: ../gtk-glade/setupwizard.c:249
+msgid "Creating your account"
+msgstr "Creazione account"
+
+#: ../gtk-glade/setupwizard.c:253
+msgid "Now ready !"
+msgstr "Pronto !"
+
+#: ../gtk-glade/incall_view.c:98
+#, fuzzy
+msgid "<b>Calling...</b>"
+msgstr "<b>Linguaggio</b>"
+
+#: ../gtk-glade/incall_view.c:122
+msgid "<b>In call with</b>"
+msgstr "<b>In chiamata con</b>"
+
+#: ../gtk-glade/incall_view.c:124
+msgid "00::00::00"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:140
+#, c-format
+msgid "%02i::%02i::%02i"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:158
+msgid "<b>Call ended.</b>"
+msgstr "<b>Chiamata terminata.</b>"
+
+#: ../gtk-glade/incall_view.c:176
+msgid "Unmute"
+msgstr "Attiva\nmicrofono"
+
+#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
+msgid "Mute"
+msgstr "Chiudi\nmicrofono"
+
+#: ../gtk-glade/loginframe.c:82
+#, c-format
+msgid "Please enter login information for %s"
+msgstr "Prego inserire le proprie credenziali di accesso per %s"
+
+#: ../gtk-glade/main.glade.h:1
+msgid "#"
+msgstr "#"
+
+#: ../gtk-glade/main.glade.h:2
+msgid "*"
+msgstr "*"
+
+#: ../gtk-glade/main.glade.h:3
+msgid "0"
+msgstr "0"
+
+#: ../gtk-glade/main.glade.h:4
+msgid "1"
+msgstr "1"
+
+#: ../gtk-glade/main.glade.h:5
+msgid "2"
+msgstr "2"
+
+#: ../gtk-glade/main.glade.h:6
+msgid "3"
+msgstr "3"
+
+#: ../gtk-glade/main.glade.h:7
+msgid "4"
+msgstr "4"
+
+#: ../gtk-glade/main.glade.h:8
+msgid "5"
+msgstr "5"
+
+#: ../gtk-glade/main.glade.h:9
+msgid "6"
+msgstr "6"
+
+#: ../gtk-glade/main.glade.h:10
+msgid "7"
+msgstr "7"
+
+#: ../gtk-glade/main.glade.h:11
+msgid "8"
+msgstr "8"
+
+#: ../gtk-glade/main.glade.h:12
+msgid "9"
+msgstr "9"
+
+#: ../gtk-glade/main.glade.h:13
+msgid "<b>Contact list</b>"
+msgstr "<b>Lista contatti</b>"
+
+#: ../gtk-glade/main.glade.h:14
+msgid "<b>Terminate call</b>"
+msgstr "<b>Termina chiamata</b>"
+
+#: ../gtk-glade/main.glade.h:15
+msgid "<b>Welcome !</b>"
+msgstr "<b>Benvenuto !</b>"
+
+#: ../gtk-glade/main.glade.h:16
+msgid "A"
+msgstr "A"
+
+#: ../gtk-glade/main.glade.h:17
+msgid ""
+"ADSL\n"
+"Fiber Channel"
+msgstr ""
+"ADSL\n"
+"Fibra Ottica"
+
+#: ../gtk-glade/main.glade.h:19
+msgid ""
+"All users\n"
+"Online users"
+msgstr ""
+"Tutti gli utenti\n"
+"Utenti Online"
+
+#: ../gtk-glade/main.glade.h:21
+msgid "Assistant"
+msgstr "Configuratore"
+
+#: ../gtk-glade/main.glade.h:22
+msgid "Audio & Video"
+msgstr "Audio & Video"
+
+#: ../gtk-glade/main.glade.h:23
+msgid "Audio only"
+msgstr "Solo Audio"
+
+#: ../gtk-glade/main.glade.h:24
+msgid "Automatically log me in"
+msgstr "Login Automatico"
+
+#: ../gtk-glade/main.glade.h:25
+msgid "B"
+msgstr "B"
+
+#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
+msgid "C"
+msgstr "C"
+
+#: ../gtk-glade/main.glade.h:27
+msgid "Check for updates"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:28
+msgid "D"
+msgstr "D"
+
+#: ../gtk-glade/main.glade.h:29
+msgid "Default"
+msgstr "Default"
+
+#: ../gtk-glade/main.glade.h:30
+msgid "Digits"
+msgstr "Caratteri"
+
+#: ../gtk-glade/main.glade.h:31
+msgid "Duration"
+msgstr "Durata"
+
+#: ../gtk-glade/main.glade.h:32
+msgid "Duration:"
+msgstr "Durata:"
+
+#: ../gtk-glade/main.glade.h:33
+msgid "Enable self-view"
+msgstr "Self-view abilitato"
+
+#: ../gtk-glade/main.glade.h:34
+msgid "Enter username, phone number, or full sip address"
+msgstr "Inserisci username, numero o indirizzo sip"
+
+#: ../gtk-glade/main.glade.h:35
+msgid "In call"
+msgstr "In chiamata"
+
+#: ../gtk-glade/main.glade.h:36
+msgid "Internet connection:"
+msgstr "Connessione Internet:"
+
+#: ../gtk-glade/main.glade.h:37
+msgid "Login information"
+msgstr "Credenziali di accesso"
+
+#: ../gtk-glade/main.glade.h:38
+msgid "Lookup:"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:39
+msgid "Main view"
+msgstr "Vista principale"
+
+#: ../gtk-glade/main.glade.h:41
+msgid "My current identity:"
+msgstr "Identità corrente"
+
+#: ../gtk-glade/main.glade.h:42
+msgid "Password"
+msgstr "Password"
+
+#: ../gtk-glade/main.glade.h:43
+msgid "SIP address or phone number:"
+msgstr "Indirizzo sip o numero."
+
+#: ../gtk-glade/main.glade.h:44
+msgid "Show current call"
+msgstr "Mostra chiamata corrente"
+
+#: ../gtk-glade/main.glade.h:45
+msgid "Start call"
+msgstr "Inizia chiamata"
+
+#: ../gtk-glade/main.glade.h:46
+msgid "Terminate call"
+msgstr "Termina chiamata"
+
+#: ../gtk-glade/main.glade.h:47
+msgid "Username"
+msgstr "Username"
+
+#: ../gtk-glade/main.glade.h:48
+msgid "_Linphone"
+msgstr "_Linphone"
+
+#: ../gtk-glade/main.glade.h:49
+msgid "_Modes"
+msgstr "_Modi"
+
+#: ../gtk-glade/main.glade.h:50
+msgid "gtk-connect"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:51
+msgid "gtk-find"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:52
+msgid "in"
+msgstr "in"
+
+#: ../gtk-glade/main.glade.h:53
+msgid "label"
+msgstr "etichetta"
+
+#: ../gtk-glade/about.glade.h:1
+msgid "About linphone"
+msgstr "Info Linphone"
+
+#: ../gtk-glade/about.glade.h:2
+msgid "An internet video phone using the standart SIP (rfc3261) protocol."
+msgstr "Un internet video telefono basato sullo standard SIP (rfc3261)"
+
+#: ../gtk-glade/about.glade.h:3
+msgid "Created by Simon Morlat\n"
+msgstr "Creato da Simon Morlat\n"
+
+#: ../gtk-glade/about.glade.h:5
+msgid ""
+"fr: Simon Morlat\n"
+"en: Simon Morlat and Delphine Perreau\n"
+"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
+"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
+"sv: Daniel Nylander <po@danielnylander.se>\n"
+"es: Jesus Benitez <gnelson at inMail dot sk>\n"
+"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
+"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
+"pl: Robert Nasiadek <darkone@darkone.pl>\n"
+"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
+"hu: anonymous\n"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:1
+msgid "<b>Contact information</b>"
+msgstr "<b>Contact informazioni</b>"
+
+#: ../gtk-glade/contact.glade.h:2
+msgid "Allow this contact to see my presence status"
+msgstr "Permitti al contatto di vedere il mio stato di presenza"
+
+#: ../gtk-glade/contact.glade.h:4
+msgid "SIP Address"
+msgstr "Rubrica"
+
+#: ../gtk-glade/contact.glade.h:5
+msgid "Show this contact presence status"
+msgstr "Mostra lo stato di presenza del contatto"
+
+#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
+#: ../gtk-glade/sip_account.glade.h:9
+msgid "gtk-cancel"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
+#: ../gtk-glade/sip_account.glade.h:10
+msgid "gtk-ok"
+msgstr ""
+
+#: ../gtk-glade/log.glade.h:1
+msgid "Linphone debug window"
+msgstr "Linphone debug window"
+
+#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
+#: ../gtk-glade/chatroom.glade.h:2
+msgid "gtk-close"
+msgstr ""
+
+#: ../gtk-glade/password.glade.h:1
+msgid "Linphone - Authentication required"
+msgstr "Linphone - Autenticazione richiesta"
+
+#: ../gtk-glade/password.glade.h:2
+msgid "Password:"
+msgstr "Password:"
+
+#: ../gtk-glade/password.glade.h:3
+msgid "Please enter the domain password"
+msgstr "Prego inserire la password di dominio"
+
+#: ../gtk-glade/password.glade.h:4
+msgid "UserID"
+msgstr ""
+
+#: ../gtk-glade/call_logs.glade.h:1
+msgid "Call history"
+msgstr "Cronologia"
+
+#: ../gtk-glade/sip_account.glade.h:1
+msgid "Configure a SIP account"
+msgstr "Configurazione SIP account"
+
+#: ../gtk-glade/sip_account.glade.h:2
+msgid "Linphone - Configure a SIP account"
+msgstr "Linphone - Configurazione SIP account"
+
+#: ../gtk-glade/sip_account.glade.h:3
+msgid "Publish presence information"
+msgstr "Pubblica stato della presenza"
+
+#: ../gtk-glade/sip_account.glade.h:4
+msgid "Register at startup"
+msgstr "Registra all'avvio"
+
+#: ../gtk-glade/sip_account.glade.h:5
+msgid "Registration duration (sec):"
+msgstr "Durata registrazione (sec)"
+
+#: ../gtk-glade/sip_account.glade.h:6
+msgid "Route (optional):"
+msgstr "Rotta (opzionale)"
+
+#: ../gtk-glade/sip_account.glade.h:7
+msgid "SIP Proxy address:"
+msgstr "Indirizzo sip proxy:"
+
+#: ../gtk-glade/sip_account.glade.h:8
+msgid "Your SIP identity:"
+msgstr "Identità SIP"
+
+#: ../gtk-glade/sip_account.glade.h:11
+msgid "sip:"
+msgstr "sip:"
+
+#: ../gtk-glade/chatroom.glade.h:1
+msgid "Send"
+msgstr "Invia"
+
+#: ../gtk-glade/incoming_call.glade.h:1
+msgid "Accept"
+msgstr "Accetta"
+
+#: ../gtk-glade/incoming_call.glade.h:2
+msgid "Decline"
+msgstr "Rifiuta"
+
+#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
+msgid "Incoming call"
+msgstr "Chimata in entrata"
+
+#: ../gtk-glade/incoming_call.glade.h:4
+msgid "Incoming call from"
+msgstr "Chiama in entrata da"
+
+#: ../gtk-glade/incoming_call.glade.h:5
+msgid "Linphone - Incoming call"
+msgstr "Linphone - Chiamata in entrata"
+
+#: ../gtk-glade/parameters.glade.h:1
+msgid "0 stands for \"unlimited\""
+msgstr "0 sta per illimitato"
+
+#: ../gtk-glade/parameters.glade.h:2
+msgid "<b>Audio</b>"
+msgstr "<b>Audio</b>"
+
+#: ../gtk-glade/parameters.glade.h:3
+msgid "<b>Bandwidth control</b>"
+msgstr "<b>Gestione banda</b>"
+
+#: ../gtk-glade/parameters.glade.h:4
+msgid "<b>Codecs</b>"
+msgstr "<b>Codecs</b>"
+
+#: ../gtk-glade/parameters.glade.h:5
+msgid "<b>Default identity</b>"
+msgstr "<b>Identità di default</b>"
+
+#: ../gtk-glade/parameters.glade.h:6
+msgid "<b>Language</b>"
+msgstr "<b>Linguaggio</b>"
+
+#: ../gtk-glade/parameters.glade.h:7
+msgid "<b>NAT and Firewall</b>"
+msgstr "<b>NAT and Firewall</b>"
+
+#: ../gtk-glade/parameters.glade.h:8
+msgid "<b>Ports</b>"
+msgstr "<b>Porte</b>"
+
+#: ../gtk-glade/parameters.glade.h:9
+msgid "<b>Privacy</b>"
+msgstr "<b>Privacy</b>"
+
+#: ../gtk-glade/parameters.glade.h:10
+msgid "<b>Proxy accounts</b>"
+msgstr "<b>Account proxy</b>"
+
+#: ../gtk-glade/parameters.glade.h:11
+msgid "<b>Transport</b>"
+msgstr "<b>Transporto</b>"
+
+#: ../gtk-glade/parameters.glade.h:12
+msgid "<b>Video</b>"
+msgstr "<b>Video</b>"
+
+#: ../gtk-glade/parameters.glade.h:13
+msgid "ALSA special device (optional):"
+msgstr "Dispositivo ALSA (optional):"
+
+#: ../gtk-glade/parameters.glade.h:14
+msgid "Add"
+msgstr "Aggiungi"
+
+#: ../gtk-glade/parameters.glade.h:15
+msgid "Audio RTP/UDP:"
+msgstr "Audio RTP/UDP:"
+
+#: ../gtk-glade/parameters.glade.h:16
+msgid ""
+"Audio codecs\n"
+"Video codecs"
+msgstr ""
+"Audio codecs\n"
+"Video codecs"
+
+#: ../gtk-glade/parameters.glade.h:18
+msgid "Behind NAT / Firewall (specify gateway IP below)"
+msgstr "Dietro NAT / Firewall (IP del gateway)"
+
+#: ../gtk-glade/parameters.glade.h:19
+msgid "Behind NAT / Firewall (use STUN to resolve)"
+msgstr "Dietro NAT / Firewall (utilizza STUN)"
+
+#: ../gtk-glade/parameters.glade.h:21
+msgid "CIF"
+msgstr "CIF"
+
+#: ../gtk-glade/parameters.glade.h:22
+msgid "Capture device:"
+msgstr "Dispositivo microfono:"
+
+#: ../gtk-glade/parameters.glade.h:23
+msgid "Codecs"
+msgstr "Codec"
+
+#: ../gtk-glade/parameters.glade.h:24
+msgid "Direct connection to the Internet"
+msgstr "Connessione diretta a internet"
+
+#: ../gtk-glade/parameters.glade.h:25
+msgid "Disable"
+msgstr "Disattivato"
+
+#: ../gtk-glade/parameters.glade.h:26
+msgid "Done"
+msgstr "Fatto"
+
+#: ../gtk-glade/parameters.glade.h:27
+msgid "Download speed limit in Kbit/sec:"
+msgstr "Velocita massima in Dowload Kbit/sec"
+
+#: ../gtk-glade/parameters.glade.h:28
+msgid "Edit"
+msgstr "Edita"
+
+#: ../gtk-glade/parameters.glade.h:29
+msgid "Enable"
+msgstr "Attivato"
+
+#: ../gtk-glade/parameters.glade.h:30
+msgid "Enable echo cancellation"
+msgstr "Attiva cancellazione eco"
+
+#: ../gtk-glade/parameters.glade.h:31
+msgid "Erase all passwords"
+msgstr "Cancella tutte le password"
+
+#: ../gtk-glade/parameters.glade.h:32
+msgid "Manage SIP Accounts"
+msgstr "Gestici SIP Account"
+
+#: ../gtk-glade/parameters.glade.h:33
+msgid "Multimedia settings"
+msgstr "Impostazioni multimediali"
+
+#: ../gtk-glade/parameters.glade.h:34
+msgid "Network settings"
+msgstr "Impostazioni di rete"
+
+#: ../gtk-glade/parameters.glade.h:35
+msgid "Playback device:"
+msgstr "Dispositivo uscita audio:"
+
+#: ../gtk-glade/parameters.glade.h:36
+msgid "Prefered video resolution:"
+msgstr "Risoluzione video preferita"
+
+#: ../gtk-glade/parameters.glade.h:37
+msgid "Public IP address:"
+msgstr "Indirizzo ip pubblico:"
+
+#: ../gtk-glade/parameters.glade.h:38
+msgid ""
+"Register to FONICS\n"
+"virtual network !"
+msgstr ""
+"Registrati a  FONICS\n"
+"virtual network !"
+
+#: ../gtk-glade/parameters.glade.h:40
+msgid "Remove"
+msgstr "Rimuovi"
+
+#: ../gtk-glade/parameters.glade.h:41
+msgid "Ring device:"
+msgstr "Dispositivo squillo:"
+
+#: ../gtk-glade/parameters.glade.h:42
+msgid "Ring sound:"
+msgstr "Suoneria:"
+
+#: ../gtk-glade/parameters.glade.h:43
+msgid "SIP (UDP):"
+msgstr "SIP (UDP)"
+
+#: ../gtk-glade/parameters.glade.h:44
+msgid "Send DTMFs as SIP info"
+msgstr "Invia DTMF come SIP info"
+
+#: ../gtk-glade/parameters.glade.h:45
+msgid "Set Maximum Transmission Unit:"
+msgstr "Imposta Maximum Transmission Unit:"
+
+#: ../gtk-glade/parameters.glade.h:46
+msgid "Settings"
+msgstr "Preferenze"
+
+#: ../gtk-glade/parameters.glade.h:47
+msgid "Stun server:"
+msgstr "Stun server:"
+
+#: ../gtk-glade/parameters.glade.h:48
+msgid "This section defines your SIP address when not using a SIP account"
+msgstr ""
+"questa sezione definisce il tuo indirizzo SIP se non hai account attivi"
+
+#: ../gtk-glade/parameters.glade.h:49
+msgid "Upload speed limit in Kbit/sec:"
+msgstr "Velocità massima in upload Kbit/sec:"
+
+#: ../gtk-glade/parameters.glade.h:50
+msgid "Use IPv6 instead of IPv4"
+msgstr "Usa IPv6 invece che IPv4"
+
+#: ../gtk-glade/parameters.glade.h:51
+msgid "User interface"
+msgstr "Interfaccia utente"
+
+#: ../gtk-glade/parameters.glade.h:52
+msgid "Video RTP/UDP:"
+msgstr "Video RTP/UDP"
+
+#: ../gtk-glade/parameters.glade.h:53
+msgid "Video input device:"
+msgstr "Dispositivo Video:"
+
+#: ../gtk-glade/parameters.glade.h:54
+msgid "Your display name (eg: John Doe):"
+msgstr "Nome visualizzato (es: Mario Rossi):"
+
+#: ../gtk-glade/parameters.glade.h:55
+msgid "Your resulting SIP address:"
+msgstr "Il tuo indirizzo sip:"
+
+#: ../gtk-glade/parameters.glade.h:56
+msgid "Your username:"
+msgstr "Username"
+
+#: ../gtk-glade/parameters.glade.h:57
+msgid "a sound card\n"
+msgstr "una scheda audio\n"
+
+#: ../gtk-glade/parameters.glade.h:59
+msgid "default camera"
+msgstr "default videocamera"
+
+#: ../gtk-glade/parameters.glade.h:60
+msgid "default soundcard"
+msgstr "default scheda audio"
+
+#: ../gtk-glade/parameters.glade.h:61
+msgid "default soundcard\n"
+msgstr "default scheda audio\n"
+
+#: ../gtk-glade/parameters.glade.h:63
+msgid "gtk-go-down"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:64
+msgid "gtk-go-up"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:65
+msgid "gtk-media-play"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:1
+msgid "<b>Search somebody</b>"
+msgstr "<b>Cerca</b>"
+
+#: ../gtk-glade/buddylookup.glade.h:2
+msgid "Add to my list"
+msgstr "Aggiungi alla mia lista"
+
+#: ../gtk-glade/buddylookup.glade.h:3
+msgid "Search contacts in directory"
+msgstr "Cerca contatti nella directory"
+
+#: ../gtk-glade/waiting.glade.h:1
+msgid "Linphone"
+msgstr "Linphone"
+
+#: ../gtk-glade/waiting.glade.h:2
+msgid "Please wait"
+msgstr "Prego attendere"
+
+#: ../coreapi/linphonecore.c:195
+#, c-format
+msgid "You have missed %i call."
+msgid_plural "You have missed %i calls."
+msgstr[0] ""
+msgstr[1] ""
+
+#: ../coreapi/linphonecore.c:223
+msgid "aborted"
+msgstr "annullato"
+
+#: ../coreapi/linphonecore.c:226
+msgid "completed"
+msgstr "comletato"
+
+#: ../coreapi/linphonecore.c:229
+msgid "missed"
+msgstr "mancante"
+
+#: ../coreapi/linphonecore.c:234
+#, c-format
+msgid ""
+"%s at %s\n"
+"From: %s\n"
+"To: %s\n"
+"Status: %s\n"
+"Duration: %i mn %i sec\n"
+msgstr ""
+"%s at %s\n"
+"Da: %s\n"
+"Verso: %s\n"
+"Stato: %s\n"
+"Durata: %i mn %i sec\n"
+
+#: ../coreapi/linphonecore.c:235
+msgid "Outgoing call"
+msgstr "Chiamata in uscita"
+
+#: ../coreapi/linphonecore.c:445
+msgid ""
+"Your machine appears to be connected to an IPv6 network. By default linphone "
+"always uses IPv4. Please update your configuration if you want to use IPv6"
+msgstr ""
+"La tua macchina sembra connessa ad una rete IPv6. Di default linphone "
+"utilizza IPv4. Prego aggiorna la tua configurazione se vuoi usare IPv6"
+
+#: ../coreapi/linphonecore.c:739
+msgid "Ready"
+msgstr "Pronto"
+
+#: ../coreapi/linphonecore.c:1014
+msgid "Remote end seems to have disconnected, the call is going to be closed."
+msgstr "L'utente remoto sembra disconesso, la chiamata verrà terminata"
+
+#: ../coreapi/linphonecore.c:1172
+msgid "Looking for telephone number destination..."
+msgstr "Ricerca numero destinazione..."
+
+#: ../coreapi/linphonecore.c:1174
+msgid "Could not resolve this number."
+msgstr "Impossibile risolvere il numero."
+
+#: ../coreapi/linphonecore.c:1239
+msgid ""
+"Could not parse given sip address. A sip url usually looks like sip:"
+"user@domain"
+msgstr ""
+"Errore nel formato del contatto sip. Usualmente un indirizzo appare sip:"
+"user@domain"
+
+#: ../coreapi/linphonecore.c:1340
+msgid "Sorry, having multiple simultaneous calls is not supported yet !"
+msgstr "Spiacenti, le chiamate multiple non sono supportate"
+
+#: ../coreapi/linphonecore.c:1387
+msgid "Contacting"
+msgstr "In connessione"
+
+#: ../coreapi/linphonecore.c:1402
+msgid "could not call"
+msgstr "chiamata fallita"
+
+#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
+msgid "Connected."
+msgstr "Connessione"
+
+#: ../coreapi/linphonecore.c:1813
+msgid "Call ended"
+msgstr "Chiamata terminata"
+
+#: ../coreapi/linphonecore.c:2175
+msgid "No nat/firewall address supplied !"
+msgstr "Non è stato fornito un indirizzo nat/firewall!"
+
+#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
+#, c-format
+msgid "Invalid nat address '%s' : %s"
+msgstr "Indirizzo NAT invalido '%s' : %s"
+
+#: ../coreapi/misc.c:134
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the pcm oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+"'modprobe snd-pcm-oss' as root to load it."
+msgstr ""
+"Il tuo computer appare utlizzare il driver ALSA.\n"
+"Questa è la scelta migliore. Tuttavia il modulo di emulazione pcm oss\n"
+"è assente e linphone lo richede. Prego eseguire\n"
+"'modprobe snd-pcm-oss' da utente root per caricarlo."
+
+#: ../coreapi/misc.c:137
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the mixer oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+" 'modprobe snd-mixer-oss' as root to load it."
+msgstr ""
+"Il tuo computer appare utlizzare il driver ALSA.\n"
+"Questa è la scelta migliore. Tuttavia il modulo di emulazione mixer oss\n"
+"è assente e linphone lo richede. Prego eseguire\n"
+"'modprobe snd-mixer-oss' da utente root per caricarlo."
+
+#: ../coreapi/misc.c:610
+msgid "Stun lookup in progress..."
+msgstr "Ricerca Stun in progresso ..."
+
+#: ../coreapi/exevents.c:127
+msgid "Call terminated."
+msgstr "Chiamata terminata."
+
+#: ../coreapi/exevents.c:149
+msgid "Could not reach destination."
+msgstr "Non posso raggiungere la destinazione"
+
+#: ../coreapi/exevents.c:158
+msgid "User is busy."
+msgstr "Utente occupato"
+
+#: ../coreapi/exevents.c:159
+msgid "User is temporarily unavailable."
+msgstr "Utente non disponibile"
+
+#: ../coreapi/exevents.c:160
+msgid "Request Cancelled."
+msgstr "Richiesta cancellata"
+
+#. char *retrymsg=_("%s. Retry after %i minute(s).");
+#: ../coreapi/exevents.c:162
+msgid "User does not want to be disturbed."
+msgstr "L'utente non vuole essere disturbato"
+
+#: ../coreapi/exevents.c:163
+msgid "Call declined."
+msgstr "Chiamata rifiutata"
+
+#: ../coreapi/exevents.c:191
+msgid "Bad request"
+msgstr "Richiesta errata"
+
+#: ../coreapi/exevents.c:194
+msgid "User cannot be found at given address."
+msgstr "L'utente non trovato."
+
+#: ../coreapi/exevents.c:197
+msgid "Remote user cannot support any of proposed codecs."
+msgstr "L'utente remoto non supporta alcun code proposto."
+
+#. time out, call leg is lost
+#: ../coreapi/exevents.c:227
+msgid "Timeout."
+msgstr "Timeout."
+
+#: ../coreapi/exevents.c:230
+msgid "Remote host was found but refused connection."
+msgstr "Utente remoto trovato ma ha rifiutato la connessione."
+
+#: ../coreapi/exevents.c:339
+msgid "is contacting you."
+msgstr "ti sta conttatando."
+
+#: ../coreapi/exevents.c:424
+#, c-format
+msgid "Redirected to %s..."
+msgstr "Rediretto verso %s..."
+
+#: ../coreapi/exevents.c:440
+msgid ""
+"User is not reachable at the moment but he invites you\n"
+"to contact him using the following alternate resource:"
+msgstr ""
+"L'utente non è raggiungibile ma ti ha invitato\n"
+"per contattarlo usare l'indirizzo alternativo:"
+
+#: ../coreapi/exevents.c:861
+msgid "Early media."
+msgstr ""
+
+#: ../coreapi/exevents.c:972
+#, c-format
+msgid "Registration on %s failed: %s"
+msgstr "Registrazione su %s fallita: %s"
+
+#: ../coreapi/exevents.c:972
+msgid "no response timeout"
+msgstr "timeout no risposta"
+
+#: ../coreapi/exevents.c:998
+#, c-format
+msgid "Registration on %s successful."
+msgstr "Registrazione su %s attiva"
+
+#: ../coreapi/exevents.c:999
+#, c-format
+msgid "Unregistration on %s done."
+msgstr "Unregistrazione su %s"
+
+#. people for which we don't have yet an answer should appear as offline
+#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
+msgid "Gone"
+msgstr "Uscita"
+
+#: ../coreapi/presence.c:129
+msgid "Waiting for Approval"
+msgstr "In attesa di approvazione"
+
+#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
+msgid "Online"
+msgstr "Onlinea"
+
+#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
+msgid "Busy"
+msgstr "Occupato"
+
+#: ../coreapi/presence.c:142
+msgid "Be Right Back"
+msgstr "Torno subito"
+
+#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
+msgid "Away"
+msgstr "Assente"
+
+#: ../coreapi/presence.c:151
+msgid "On The Phone"
+msgstr "Al telefono"
+
+#: ../coreapi/presence.c:156
+msgid "Out To Lunch"
+msgstr "Fuori per pranzo"
+
+#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
+msgid "Closed"
+msgstr "Chiuso"
+
+#: ../coreapi/friend.c:35
+msgid "Unknown"
+msgstr "Sconosciuto"
+
+#: ../coreapi/friend.c:44
+msgid "Be right back"
+msgstr "Torno subito"
+
+#: ../coreapi/friend.c:50
+msgid "On the phone"
+msgstr "Al telefono"
+
+#: ../coreapi/friend.c:53
+msgid "Out to lunch"
+msgstr "Fuori per pranzo"
+
+#: ../coreapi/friend.c:56
+msgid "Do not disturb"
+msgstr "Non disturbare"
+
+#: ../coreapi/friend.c:59
+msgid "Moved"
+msgstr "Mosso"
+
+#: ../coreapi/friend.c:62
+msgid "Using another messaging service"
+msgstr "Utilizza una altro servizio di meesaggistica"
+
+#: ../coreapi/friend.c:65
+msgid "Offline"
+msgstr "Offline"
+
+#: ../coreapi/friend.c:68
+msgid "Pending"
+msgstr "Pendente"
+
+#: ../coreapi/friend.c:74
+msgid "Unknown-bug"
+msgstr "Bug-sconosciuto"
+
+#: ../coreapi/proxy.c:221
+msgid ""
+"The sip proxy address you entered is invalid, it must start with \"sip:\" "
+"followed by a hostname."
+msgstr ""
+"L'indirizzo sip proxy utilizzato è invalido, deve iniziare con  \"sip:\" "
+"seguito dall' hostaname."
+
+#: ../coreapi/proxy.c:227
+msgid ""
+"The sip identity you entered is invalid.\n"
+"It should look like sip:username@proxydomain, such as sip:alice@example.net"
+msgstr ""
+"L'identità sip utilizza è invalida.\n"
+"Dovrebbre essere sip:username@proxydomain, esempio: sip:alice@example.net"
+
+#: ../coreapi/proxy.c:634
+#, c-format
+msgid "Could not login as %s"
+msgstr "impossibile login come %s"
+
+#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
+msgid "ITU-G.711 alaw encoder"
+msgstr "ITU-G.711 alaw encoder"
+
+#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
+msgid "ITU-G.711 alaw decoder"
+msgstr "ITU-G.711 alaw decoder"
+
+#: ../mediastreamer2/src/alsa.c:923
+msgid "Alsa sound source"
+msgstr "Alsa sound sorgente"
+
+#: ../mediastreamer2/src/alsa.c:1027
+msgid "Alsa sound output"
+msgstr "Alsa sound riproduzione"
+
+#: ../mediastreamer2/src/aqsnd.c:891
+msgid "Sound capture filter for MacOS X Audio Queue Service"
+msgstr "Sound capture filter for MacOS X Audio Queue Service"
+
+#: ../mediastreamer2/src/aqsnd.c:915
+msgid "Sound playback filter for MacOS X Audio Queue Service"
+msgstr "Sound playback filter for MacOS X Audio Queue Service"
+
+#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
+msgid "DTMF generator"
+msgstr "Generatore DTMF"
+
+#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
+msgid "The GSM full-rate codec"
+msgstr "GSM full-rate codec"
+
+#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
+msgid "The GSM codec"
+msgstr "GSM codec"
+
+#: ../mediastreamer2/src/macsnd.c:670
+msgid "Sound capture filter for MacOS X Core Audio drivers"
+msgstr "Sound capture filter for MacOS X Core Audio drivers"
+
+#: ../mediastreamer2/src/macsnd.c:684
+msgid "Sound playback filter for MacOS X Core Audio drivers"
+msgstr "Sound playback filter for MacOS X Core Audio drivers"
+
+#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
+msgid "A filter to make conferencing"
+msgstr "Un filtro per fare conferenze"
+
+#: ../mediastreamer2/src/msfileplayer.c:295
+#: ../mediastreamer2/src/msfileplayer.c:313
+msgid "Raw files and wav reader"
+msgstr "Raw files and wav reader"
+
+#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
+#: ../mediastreamer2/src/msfilerec_win.c:216
+#: ../mediastreamer2/src/msfilerec_win.c:234
+msgid "Wav file recorder"
+msgstr "Registratore Wav file"
+
+#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
+msgid "A filter that send several inputs to one output."
+msgstr "Un filtro che invia alcuni inputs in un unico output"
+
+#: ../mediastreamer2/src/msresample.c:221
+#: ../mediastreamer2/src/msresample.c:239
+msgid "frequency resampler"
+msgstr "campionatore di frequenza"
+
+#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
+msgid "RTP output filter"
+msgstr "RTP output filter"
+
+#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
+msgid "RTP input filter"
+msgstr "RTP imput filter"
+
+#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
+#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
+msgid "The free and wonderful speex codec"
+msgstr "The free and wonderful speex codec"
+
+#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
+msgid "A filter that controls and measure sound volume"
+msgstr "Un filtro che controlla e misura il volume"
+
+#: ../mediastreamer2/src/msv4l.c:1009
+msgid "A video4linux compatible source filter to stream pictures."
+msgstr "Un video4linux filtro per inviare immagini"
+
+#: ../mediastreamer2/src/msv4l2.c:458
+msgid "A filter to grab pictures from Video4Linux2-powered cameras"
+msgstr "un filtro per catturare immagini da video4linux2 videocamere"
+
+#: ../mediastreamer2/src/nowebcam.c:1780
+msgid "A filter that outputs a static image."
+msgstr "Un filtro che invia una immagine statica"
+
+#: ../mediastreamer2/src/oss.c:567
+msgid "Sound capture filter for OSS drivers"
+msgstr "Filtro per la cattura audio per i driver OSS"
+
+#: ../mediastreamer2/src/oss.c:581
+msgid "Sound playback filter for OSS drivers"
+msgstr "Filtro per la riproduzione audio per i driver OSS"
+
+#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
+msgid "A pixel format converter"
+msgstr "Un convertitore di formati pixel"
+
+#: ../mediastreamer2/src/sizeconv.c:204
+msgid "A video size converter"
+msgstr "Un convertitore dimesione video "
+
+#: ../mediastreamer2/src/sizeconv.c:222
+msgid "a small video size converter"
+msgstr "un piccolo convertitore dimesione video"
+
+#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
+msgid "Echo canceler using speex library"
+msgstr "Cancellazione eco utilizzando la libreria speex"
+
+#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
+msgid "A filter that reads from input and copy to its multiple outputs."
+msgstr "Un filtro che legge gli inout e copia su multipli output."
+
+#: ../mediastreamer2/src/theora.c:375
+msgid "The theora video encoder from xiph.org"
+msgstr "Theora video encoder da xiph.org"
+
+#: ../mediastreamer2/src/theora.c:393
+msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
+msgstr "Open-source and royalty-free 'theora' video codec da xiph.org"
+
+#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
+msgid "The theora video decoder from xiph.org"
+msgstr "Theora video decoder from xiph.org"
+
+#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
+msgid "ITU-G.711 ulaw encoder"
+msgstr "ITU-G.711 ulaw encoder"
+
+#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
+msgid "ITU-G.711 ulaw decoder"
+msgstr "ITU-G.711 ulaw decoder"
+
+#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
+#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
+msgid "A H.263 decoder using ffmpeg library"
+msgstr "Un H.263 decoder che utilizza le librerie ffmpeg"
+
+#: ../mediastreamer2/src/videodec.c:688
+msgid "A MPEG4 decoder using ffmpeg library"
+msgstr "Un MPEG4 decoder che utilizza le librerie ffmpeg"
+
+#: ../mediastreamer2/src/videodec.c:704
+msgid "A RTP/JPEG decoder using ffmpeg library"
+msgstr "Un RTP/JPEG decoder che utilizza le librerie ffmpeg"
+
+#: ../mediastreamer2/src/videodec.c:720
+msgid "A MJPEG decoder using ffmpeg library"
+msgstr "Un MJPEG decoder che utilizza le librerie ffmpeg"
+
+#: ../mediastreamer2/src/videodec.c:736
+msgid "A snow decoder using ffmpeg library"
+msgstr "Un snow decoder che utilizza le librerie ffmpeg"
+
+#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
+msgid "A video H.263 encoder using ffmpeg library."
+msgstr "Un H.263 encoder che utilizza le librerie ffmpeg"
+
+#: ../mediastreamer2/src/videoenc.c:856
+msgid ""
+"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
+"spec."
+msgstr ""
+"Un H.263 encoder che utilizza le librerie ffmpeg. Compliante con RFC2190 "
+"spec."
+
+#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
+msgid "A video MPEG4 encoder using ffmpeg library."
+msgstr "Un MPEG4 encoder che utilizza le librerie ffmpeg"
+
+#: ../mediastreamer2/src/videoenc.c:888
+msgid "A video snow encoder using ffmpeg library."
+msgstr "Un snow encoder che utilizza le librerie ffmpeg"
+
+#: ../mediastreamer2/src/videoenc.c:904
+msgid "A RTP/MJPEG encoder using ffmpeg library."
+msgstr "Un RTP/JPEG decoder che utilizza le librerie ffmpeg"
+
+#: ../mediastreamer2/src/videoenc.c:938
+msgid ""
+"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
+msgstr ""
+"Un H.263 encoder che utilizza le librerie ffmpeg. Compliante con RFC2190 "
+"spec."
+
+#: ../mediastreamer2/src/videoenc.c:970
+msgid ""
+"The snow codec is royalty-free and is open-source. \n"
+"It uses innovative techniques that makes it one of most promising video "
+"codec. It is implemented within the ffmpeg project.\n"
+"However it is under development, quite unstable and compatibility with other "
+"versions cannot be guaranteed."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:990
+msgid "A MJPEG encoder using ffmpeg library."
+msgstr "Un MJPEG encoder che utilizza le librerie ffmpeg"
+
+#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
+msgid "A generic video display"
+msgstr "Un generico video display"
+
+#: ../mediastreamer2/src/wincevideods.c:966
+#: ../mediastreamer2/src/wincevideods.c:984
+#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
+#: ../mediastreamer2/src/winvideods.c:1306
+#: ../mediastreamer2/src/winvideods.c:1324
+msgid "A video4windows compatible source filter to stream pictures."
+msgstr "Un filtro video4windows per lo streaming delle immagini."
+
+#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
+msgid "A video for windows (vfw.h) based source filter to grab pictures."
+msgstr "Un filtro (vfw.h) per catturare immagini."
+
+#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
+msgid "ICE filter"
+msgstr "Filtro ICE"
+
+#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
+msgid "A filter that trashes its input (useful for terminating some graphs)."
+msgstr ""
+
+#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
+msgid "Parametric sound equalizer."
+msgstr "Equalizzatore di suono."
+
+#: ../mediastreamer2/src/msdscap-mingw.cc:1003
+msgid "A webcam grabber based on directshow."
+msgstr "Un webcam grabber basato su directshow."
+
+#~ msgid "Bresilian"
+#~ msgstr "Brasiliano"
diff --git a/po/ja.po b/po/ja.po
new file mode 100644 (file)
index 0000000..d17f37b
--- /dev/null
+++ b/po/ja.po
@@ -0,0 +1,1900 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# 山口善也 <yushiya@anet.ne.jp>, 2002.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: linphone 0.10\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-10-16 15:24+0200\n"
+"PO-Revision-Date: 2003-01-21 00:05+9000\n"
+"Last-Translator: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
+"Language-Team: <ja@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
+#: ../gtk-glade/support.c:102
+#, c-format
+msgid "Couldn't find pixmap file: %s"
+msgstr "pixmapファイルが見つかりません %s"
+
+#: ../gtk-glade/chat.c:27
+#, c-format
+msgid "Chat with %s"
+msgstr ""
+
+#: ../gtk-glade/main.c:90
+msgid "log to stdout some debug information while running."
+msgstr ""
+
+#: ../gtk-glade/main.c:97
+msgid "Start only in the system tray, do not show the main interface."
+msgstr ""
+
+#: ../gtk-glade/main.c:104
+msgid "address to call right now"
+msgstr ""
+
+#: ../gtk-glade/main.c:111
+msgid "if set automatically answer incoming calls"
+msgstr ""
+
+#: ../gtk-glade/main.c:119
+msgid ""
+"Specifiy a working directory (should be the base of the installation, eg: c:"
+"\\Program Files\\Linphone)"
+msgstr ""
+
+#: ../gtk-glade/main.c:675
+#, c-format
+msgid "Incoming call from %s"
+msgstr ""
+
+#: ../gtk-glade/main.c:707
+#, c-format
+msgid ""
+"%s would like to add you to his contact list.\n"
+"Would you allow him to see your presence status or add him to your contact "
+"list ?\n"
+"If you answer no, this person will be temporarily blacklisted."
+msgstr ""
+
+#: ../gtk-glade/main.c:777
+#, c-format
+msgid ""
+"Please enter your password for username <i>%s</i>\n"
+" at domain <i>%s</i>:"
+msgstr ""
+
+#: ../gtk-glade/main.c:871
+msgid "Website link"
+msgstr ""
+
+#: ../gtk-glade/main.c:907
+msgid "Linphone - a video internet phone"
+msgstr ""
+
+#: ../gtk-glade/main.c:926
+#, c-format
+msgid "%s (Default)"
+msgstr ""
+
+#: ../gtk-glade/main.c:1168
+msgid "A free SIP video-phone"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
+#: ../gtk-glade/contact.glade.h:3
+msgid "Name"
+msgstr "名前"
+
+#: ../gtk-glade/friendlist.c:212
+#, fuzzy
+msgid "Presence status"
+msgstr "状態"
+
+#: ../gtk-glade/friendlist.c:243
+#, c-format
+msgid "Search in %s directory"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:432
+msgid "Invalid sip contact !"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:474
+#, c-format
+msgid "Call %s"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:475
+#, c-format
+msgid "Send text to %s"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:476
+#, fuzzy, c-format
+msgid "Edit contact '%s'"
+msgstr "(接続するための情報がありません!)"
+
+#: ../gtk-glade/friendlist.c:477
+#, c-format
+msgid "Delete contact '%s'"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:519
+#, c-format
+msgid "Add new contact from %s directory"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:251
+msgid "Rate (Hz)"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:257
+msgid "Status"
+msgstr "状態"
+
+#: ../gtk-glade/propertybox.c:263
+msgid "Min bitrate (kbit/s)"
+msgstr "最低限のビットレート (kbit/s)"
+
+#: ../gtk-glade/propertybox.c:269
+msgid "Parameters"
+msgstr "パラメーター"
+
+#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
+msgid "Enabled"
+msgstr "使用する"
+
+#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
+msgid "Disabled"
+msgstr "使用しない"
+
+#: ../gtk-glade/propertybox.c:480
+msgid "Account"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:620
+msgid "English"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:621
+msgid "French"
+msgstr "Français"
+
+#: ../gtk-glade/propertybox.c:622
+msgid "Swedish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:623
+msgid "Italian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:624
+msgid "Spanish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:625
+msgid "Brazilian Portugese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:626
+msgid "Polish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:627
+msgid "German"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:628
+msgid "Russian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:629
+msgid "Japanese"
+msgstr "日本語"
+
+#: ../gtk-glade/propertybox.c:630
+msgid "Dutch"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:631
+msgid "Hungarian"
+msgstr "Magyar"
+
+#: ../gtk-glade/propertybox.c:632
+msgid "Czech"
+msgstr "čeština"
+
+#: ../gtk-glade/propertybox.c:633
+msgid "Chinese"
+msgstr "简体中文"
+
+#: ../gtk-glade/propertybox.c:690
+msgid ""
+"You need to restart linphone for the new language selection to take effect."
+msgstr ""
+
+#: ../gtk-glade/update.c:80
+#, c-format
+msgid ""
+"A more recent version is availalble from %s.\n"
+"Would you like to open a browser to download it ?"
+msgstr ""
+
+#: ../gtk-glade/update.c:91
+msgid "You are running the lastest version."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:66
+msgid "Firstname, Lastname"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:73
+#, fuzzy
+msgid "SIP address"
+msgstr "アドレス"
+
+#: ../gtk-glade/buddylookup.c:121
+msgid "Error communicating with server."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:125
+#, fuzzy
+msgid "Connecting..."
+msgstr "コネクション"
+
+#: ../gtk-glade/buddylookup.c:129
+#, fuzzy
+msgid "Connected"
+msgstr "接続しました。"
+
+#: ../gtk-glade/buddylookup.c:133
+msgid "Receiving data..."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:141
+#, c-format
+msgid "Found %i contact"
+msgid_plural "Found %i contacts"
+msgstr[0] ""
+msgstr[1] ""
+
+#: ../gtk-glade/setupwizard.c:25
+msgid ""
+"Welcome !\n"
+"This assistant will help you to use a SIP account for your calls."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:34
+msgid "Create an account by choosing a username"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:35
+msgid "I have already an account and just want to use it"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:53
+msgid "Please choose a username:"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:54
+#, fuzzy
+msgid "Username:"
+msgstr "ユーザーマニュアル"
+
+#: ../gtk-glade/setupwizard.c:92
+#, c-format
+msgid "Checking if '%s' is available..."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
+msgid "Please wait..."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:101
+msgid "Sorry this username already exists. Please try a new one."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
+msgid "Ok !"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
+msgid "Communication problem, please try again later."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:134
+msgid "Thank you. Your account is now configured and ready for use."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:228
+msgid "Welcome to the account setup assistant"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:232
+msgid "Account setup assistant"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:236
+msgid "Choosing a username"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:240
+msgid "Verifying"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:244
+#, fuzzy
+msgid "Confirmation"
+msgstr "情報"
+
+#: ../gtk-glade/setupwizard.c:249
+msgid "Creating your account"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:253
+msgid "Now ready !"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:98
+#, fuzzy
+msgid "<b>Calling...</b>"
+msgstr "接続中"
+
+#: ../gtk-glade/incall_view.c:122
+#, fuzzy
+msgid "<b>In call with</b>"
+msgstr "接続中"
+
+#: ../gtk-glade/incall_view.c:124
+msgid "00::00::00"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:140
+#, c-format
+msgid "%02i::%02i::%02i"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:158
+#, fuzzy
+msgid "<b>Call ended.</b>"
+msgstr "通話は拒否されました。"
+
+#: ../gtk-glade/incall_view.c:176
+msgid "Unmute"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
+msgid "Mute"
+msgstr ""
+
+#: ../gtk-glade/loginframe.c:82
+#, c-format
+msgid "Please enter login information for %s"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:1
+msgid "#"
+msgstr "#"
+
+#: ../gtk-glade/main.glade.h:2
+msgid "*"
+msgstr "*"
+
+#: ../gtk-glade/main.glade.h:3
+msgid "0"
+msgstr "0"
+
+#: ../gtk-glade/main.glade.h:4
+msgid "1"
+msgstr "1"
+
+#: ../gtk-glade/main.glade.h:5
+msgid "2"
+msgstr "2"
+
+#: ../gtk-glade/main.glade.h:6
+msgid "3"
+msgstr "3"
+
+#: ../gtk-glade/main.glade.h:7
+msgid "4"
+msgstr "4"
+
+#: ../gtk-glade/main.glade.h:8
+msgid "5"
+msgstr "5"
+
+#: ../gtk-glade/main.glade.h:9
+msgid "6"
+msgstr "6"
+
+#: ../gtk-glade/main.glade.h:10
+msgid "7"
+msgstr "7"
+
+#: ../gtk-glade/main.glade.h:11
+msgid "8"
+msgstr "8"
+
+#: ../gtk-glade/main.glade.h:12
+msgid "9"
+msgstr "9"
+
+#: ../gtk-glade/main.glade.h:13
+#, fuzzy
+msgid "<b>Contact list</b>"
+msgstr "接続中"
+
+#: ../gtk-glade/main.glade.h:14
+#, fuzzy
+msgid "<b>Terminate call</b>"
+msgstr "接続中"
+
+#: ../gtk-glade/main.glade.h:15
+#, fuzzy
+msgid "<b>Welcome !</b>"
+msgstr "接続中"
+
+#: ../gtk-glade/main.glade.h:16
+msgid "A"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:17
+msgid ""
+"ADSL\n"
+"Fiber Channel"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:19
+msgid ""
+"All users\n"
+"Online users"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:21
+msgid "Assistant"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:22
+#, fuzzy
+msgid "Audio & Video"
+msgstr "オーディオコーデックのプロパティー"
+
+#: ../gtk-glade/main.glade.h:23
+#, fuzzy
+msgid "Audio only"
+msgstr "オーディオ"
+
+#: ../gtk-glade/main.glade.h:24
+msgid "Automatically log me in"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:25
+msgid "B"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
+msgid "C"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:27
+msgid "Check for updates"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:28
+msgid "D"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:29
+msgid "Default"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:30
+msgid "Digits"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:31
+#, fuzzy
+msgid "Duration"
+msgstr "情報"
+
+#: ../gtk-glade/main.glade.h:32
+#, fuzzy
+msgid "Duration:"
+msgstr "情報"
+
+#: ../gtk-glade/main.glade.h:33
+#, fuzzy
+msgid "Enable self-view"
+msgstr "使用する"
+
+#: ../gtk-glade/main.glade.h:34
+msgid "Enter username, phone number, or full sip address"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:35
+msgid "In call"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:36
+msgid "Internet connection:"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:37
+#, fuzzy
+msgid "Login information"
+msgstr "コーデックの情報"
+
+#: ../gtk-glade/main.glade.h:38
+msgid "Lookup:"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:39
+msgid "Main view"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:41
+#, fuzzy
+msgid "My current identity:"
+msgstr "個人情報"
+
+#: ../gtk-glade/main.glade.h:42
+#, fuzzy
+msgid "Password"
+msgstr "パスワード"
+
+#: ../gtk-glade/main.glade.h:43
+#, fuzzy
+msgid "SIP address or phone number:"
+msgstr "レジストラサーバーのSIPアドレス"
+
+#: ../gtk-glade/main.glade.h:44
+msgid "Show current call"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:45
+msgid "Start call"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:46
+msgid "Terminate call"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:47
+#, fuzzy
+msgid "Username"
+msgstr "ユーザーマニュアル"
+
+#: ../gtk-glade/main.glade.h:48
+#, fuzzy
+msgid "_Linphone"
+msgstr "Linphone"
+
+#: ../gtk-glade/main.glade.h:49
+#, fuzzy
+msgid "_Modes"
+msgstr "コーデック"
+
+#: ../gtk-glade/main.glade.h:50
+#, fuzzy
+msgid "gtk-connect"
+msgstr "接続しました。"
+
+#: ../gtk-glade/main.glade.h:51
+msgid "gtk-find"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:52
+msgid "in"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:53
+msgid "label"
+msgstr ""
+
+#: ../gtk-glade/about.glade.h:1
+#, fuzzy
+msgid "About linphone"
+msgstr "Linphone"
+
+#: ../gtk-glade/about.glade.h:2
+msgid "An internet video phone using the standart SIP (rfc3261) protocol."
+msgstr ""
+
+#: ../gtk-glade/about.glade.h:3
+msgid "Created by Simon Morlat\n"
+msgstr ""
+
+#: ../gtk-glade/about.glade.h:5
+msgid ""
+"fr: Simon Morlat\n"
+"en: Simon Morlat and Delphine Perreau\n"
+"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
+"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
+"sv: Daniel Nylander <po@danielnylander.se>\n"
+"es: Jesus Benitez <gnelson at inMail dot sk>\n"
+"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
+"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
+"pl: Robert Nasiadek <darkone@darkone.pl>\n"
+"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
+"hu: anonymous\n"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:1
+#, fuzzy
+msgid "<b>Contact information</b>"
+msgstr "コーデックの情報"
+
+#: ../gtk-glade/contact.glade.h:2
+msgid "Allow this contact to see my presence status"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:4
+#, fuzzy
+msgid "SIP Address"
+msgstr "アドレス"
+
+#: ../gtk-glade/contact.glade.h:5
+msgid "Show this contact presence status"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
+#: ../gtk-glade/sip_account.glade.h:9
+msgid "gtk-cancel"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
+#: ../gtk-glade/sip_account.glade.h:10
+msgid "gtk-ok"
+msgstr ""
+
+#: ../gtk-glade/log.glade.h:1
+msgid "Linphone debug window"
+msgstr ""
+
+#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
+#: ../gtk-glade/chatroom.glade.h:2
+msgid "gtk-close"
+msgstr ""
+
+#: ../gtk-glade/password.glade.h:1
+msgid "Linphone - Authentication required"
+msgstr ""
+
+#: ../gtk-glade/password.glade.h:2
+#, fuzzy
+msgid "Password:"
+msgstr "パスワード"
+
+#: ../gtk-glade/password.glade.h:3
+msgid "Please enter the domain password"
+msgstr ""
+
+#: ../gtk-glade/password.glade.h:4
+msgid "UserID"
+msgstr ""
+
+#: ../gtk-glade/call_logs.glade.h:1
+msgid "Call history"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:1
+msgid "Configure a SIP account"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:2
+msgid "Linphone - Configure a SIP account"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:3
+#, fuzzy
+msgid "Publish presence information"
+msgstr "コーデックの情報"
+
+#: ../gtk-glade/sip_account.glade.h:4
+msgid "Register at startup"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:5
+#, fuzzy
+msgid "Registration duration (sec):"
+msgstr "登録しました。"
+
+#: ../gtk-glade/sip_account.glade.h:6
+msgid "Route (optional):"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:7
+#, fuzzy
+msgid "SIP Proxy address:"
+msgstr "Sipアドレス:"
+
+#: ../gtk-glade/sip_account.glade.h:8
+#, fuzzy
+msgid "Your SIP identity:"
+msgstr "個人情報"
+
+#: ../gtk-glade/sip_account.glade.h:11
+msgid "sip:"
+msgstr "sip:"
+
+#: ../gtk-glade/chatroom.glade.h:1
+#, fuzzy
+msgid "Send"
+msgstr "サウンド"
+
+#: ../gtk-glade/incoming_call.glade.h:1
+msgid "Accept"
+msgstr ""
+
+#: ../gtk-glade/incoming_call.glade.h:2
+#, fuzzy
+msgid "Decline"
+msgstr "ライン入力"
+
+#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
+msgid "Incoming call"
+msgstr ""
+
+#: ../gtk-glade/incoming_call.glade.h:4
+msgid "Incoming call from"
+msgstr ""
+
+#: ../gtk-glade/incoming_call.glade.h:5
+msgid "Linphone - Incoming call"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:1
+msgid "0 stands for \"unlimited\""
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:2
+#, fuzzy
+msgid "<b>Audio</b>"
+msgstr "接続中"
+
+#: ../gtk-glade/parameters.glade.h:3
+msgid "<b>Bandwidth control</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:4
+#, fuzzy
+msgid "<b>Codecs</b>"
+msgstr "接続中"
+
+#: ../gtk-glade/parameters.glade.h:5
+msgid "<b>Default identity</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:6
+msgid "<b>Language</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:7
+msgid "<b>NAT and Firewall</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:8
+#, fuzzy
+msgid "<b>Ports</b>"
+msgstr "接続中"
+
+#: ../gtk-glade/parameters.glade.h:9
+msgid "<b>Privacy</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:10
+#, fuzzy
+msgid "<b>Proxy accounts</b>"
+msgstr "接続中"
+
+#: ../gtk-glade/parameters.glade.h:11
+#, fuzzy
+msgid "<b>Transport</b>"
+msgstr "接続中"
+
+#: ../gtk-glade/parameters.glade.h:12
+msgid "<b>Video</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:13
+msgid "ALSA special device (optional):"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:14
+msgid "Add"
+msgstr "追加する"
+
+#: ../gtk-glade/parameters.glade.h:15
+msgid "Audio RTP/UDP:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:16
+#, fuzzy
+msgid ""
+"Audio codecs\n"
+"Video codecs"
+msgstr "オーディオコーデックのプロパティー"
+
+#: ../gtk-glade/parameters.glade.h:18
+msgid "Behind NAT / Firewall (specify gateway IP below)"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:19
+msgid "Behind NAT / Firewall (use STUN to resolve)"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:21
+msgid "CIF"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:22
+#, fuzzy
+msgid "Capture device:"
+msgstr "使用するサウンドデバイス"
+
+#: ../gtk-glade/parameters.glade.h:23
+#, fuzzy
+msgid "Codecs"
+msgstr "コーデック"
+
+#: ../gtk-glade/parameters.glade.h:24
+msgid "Direct connection to the Internet"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:25
+msgid "Disable"
+msgstr "使用しない"
+
+#: ../gtk-glade/parameters.glade.h:26
+#, fuzzy
+msgid "Done"
+msgstr "ありません。"
+
+#: ../gtk-glade/parameters.glade.h:27
+msgid "Download speed limit in Kbit/sec:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:28
+msgid "Edit"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:29
+msgid "Enable"
+msgstr "使用する"
+
+#: ../gtk-glade/parameters.glade.h:30
+msgid "Enable echo cancellation"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:31
+msgid "Erase all passwords"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:32
+msgid "Manage SIP Accounts"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:33
+msgid "Multimedia settings"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:34
+#, fuzzy
+msgid "Network settings"
+msgstr "ネットワーク"
+
+#: ../gtk-glade/parameters.glade.h:35
+#, fuzzy
+msgid "Playback device:"
+msgstr "使用するサウンドデバイス"
+
+#: ../gtk-glade/parameters.glade.h:36
+msgid "Prefered video resolution:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:37
+#, fuzzy
+msgid "Public IP address:"
+msgstr "Sipアドレス:"
+
+#: ../gtk-glade/parameters.glade.h:38
+msgid ""
+"Register to FONICS\n"
+"virtual network !"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:40
+msgid "Remove"
+msgstr "削除する"
+
+#: ../gtk-glade/parameters.glade.h:41
+#, fuzzy
+msgid "Ring device:"
+msgstr "使用するサウンドデバイス"
+
+#: ../gtk-glade/parameters.glade.h:42
+#, fuzzy
+msgid "Ring sound:"
+msgstr "録音する音源"
+
+#: ../gtk-glade/parameters.glade.h:43
+msgid "SIP (UDP):"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:44
+msgid "Send DTMFs as SIP info"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:45
+msgid "Set Maximum Transmission Unit:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:46
+msgid "Settings"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:47
+#, fuzzy
+msgid "Stun server:"
+msgstr "使用するサウンドデバイス"
+
+#: ../gtk-glade/parameters.glade.h:48
+msgid "This section defines your SIP address when not using a SIP account"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:49
+msgid "Upload speed limit in Kbit/sec:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:50
+msgid "Use IPv6 instead of IPv4"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:51
+#, fuzzy
+msgid "User interface"
+msgstr "ユーザーマニュアル"
+
+#: ../gtk-glade/parameters.glade.h:52
+msgid "Video RTP/UDP:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:53
+#, fuzzy
+msgid "Video input device:"
+msgstr "使用するサウンドデバイス"
+
+#: ../gtk-glade/parameters.glade.h:54
+msgid "Your display name (eg: John Doe):"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:55
+#, fuzzy
+msgid "Your resulting SIP address:"
+msgstr "あなたのSIPアドレス"
+
+#: ../gtk-glade/parameters.glade.h:56
+msgid "Your username:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:57
+msgid "a sound card\n"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:59
+msgid "default camera"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:60
+msgid "default soundcard"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:61
+msgid "default soundcard\n"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:63
+msgid "gtk-go-down"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:64
+msgid "gtk-go-up"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:65
+msgid "gtk-media-play"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:1
+msgid "<b>Search somebody</b>"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:2
+msgid "Add to my list"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:3
+msgid "Search contacts in directory"
+msgstr ""
+
+#: ../gtk-glade/waiting.glade.h:1
+#, fuzzy
+msgid "Linphone"
+msgstr "Linphone"
+
+#: ../gtk-glade/waiting.glade.h:2
+msgid "Please wait"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:195
+#, c-format
+msgid "You have missed %i call."
+msgid_plural "You have missed %i calls."
+msgstr[0] ""
+msgstr[1] ""
+
+#: ../coreapi/linphonecore.c:223
+msgid "aborted"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:226
+msgid "completed"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:229
+msgid "missed"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:234
+#, c-format
+msgid ""
+"%s at %s\n"
+"From: %s\n"
+"To: %s\n"
+"Status: %s\n"
+"Duration: %i mn %i sec\n"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:235
+msgid "Outgoing call"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:445
+msgid ""
+"Your machine appears to be connected to an IPv6 network. By default linphone "
+"always uses IPv4. Please update your configuration if you want to use IPv6"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:739
+#, fuzzy
+msgid "Ready"
+msgstr "準備完了。"
+
+#: ../coreapi/linphonecore.c:1014
+msgid "Remote end seems to have disconnected, the call is going to be closed."
+msgstr ""
+
+#: ../coreapi/linphonecore.c:1172
+msgid "Looking for telephone number destination..."
+msgstr ""
+
+#: ../coreapi/linphonecore.c:1174
+msgid "Could not resolve this number."
+msgstr ""
+
+#: ../coreapi/linphonecore.c:1239
+#, fuzzy
+msgid ""
+"Could not parse given sip address. A sip url usually looks like sip:"
+"user@domain"
+msgstr ""
+"SIPアドレスの形式エラーです。SIPアドレスは、<sip:username@domainname>のような"
+"形式です。"
+
+#: ../coreapi/linphonecore.c:1340
+msgid "Sorry, having multiple simultaneous calls is not supported yet !"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:1387
+#, fuzzy
+msgid "Contacting"
+msgstr "接続中"
+
+#: ../coreapi/linphonecore.c:1402
+msgid "could not call"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
+msgid "Connected."
+msgstr "接続しました。"
+
+#: ../coreapi/linphonecore.c:1813
+#, fuzzy
+msgid "Call ended"
+msgstr "通話は拒否されました。"
+
+#: ../coreapi/linphonecore.c:2175
+msgid "No nat/firewall address supplied !"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
+#, c-format
+msgid "Invalid nat address '%s' : %s"
+msgstr ""
+
+#: ../coreapi/misc.c:134
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the pcm oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+"'modprobe snd-pcm-oss' as root to load it."
+msgstr ""
+"このコンピューターはALSAサウンドドライバーを使用しているようです。\n"
+"それは最良の選択です。しかし、Linphoneが必要とする\n"
+"pcm ossエミュレーションモジュールが見つかりません。\n"
+"ロードするために、ルート権限で'modprobe snd-pcm-oss'を実行してください。"
+
+#: ../coreapi/misc.c:137
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the mixer oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+" 'modprobe snd-mixer-oss' as root to load it."
+msgstr ""
+"このコンピューターはALSAサウンドドライバーを使用しているようです。\n"
+"それは最良の選択です。しかし、Linphoneが必要とする\n"
+"mixer ossエミュレーションモジュールが見つかりません。\n"
+"ロードするために、ルート権限で'modprobe snd-mixer-oss'を実行してください。"
+
+#: ../coreapi/misc.c:610
+msgid "Stun lookup in progress..."
+msgstr ""
+
+#: ../coreapi/exevents.c:127
+#, fuzzy
+msgid "Call terminated."
+msgstr "通話は拒否されました。"
+
+#: ../coreapi/exevents.c:149
+msgid "Could not reach destination."
+msgstr ""
+
+#: ../coreapi/exevents.c:158
+msgid "User is busy."
+msgstr "ユーザーはビジーです"
+
+#: ../coreapi/exevents.c:159
+msgid "User is temporarily unavailable."
+msgstr "ユーザーは、今出られません。"
+
+#: ../coreapi/exevents.c:160
+#, fuzzy
+msgid "Request Cancelled."
+msgstr "通話はキャンセルされました。"
+
+#. char *retrymsg=_("%s. Retry after %i minute(s).");
+#: ../coreapi/exevents.c:162
+msgid "User does not want to be disturbed."
+msgstr "ユーザーは手が離せないようです。"
+
+#: ../coreapi/exevents.c:163
+msgid "Call declined."
+msgstr "通話は拒否されました。"
+
+#: ../coreapi/exevents.c:191
+msgid "Bad request"
+msgstr ""
+
+#: ../coreapi/exevents.c:194
+msgid "User cannot be found at given address."
+msgstr "ユーザーが見つかりません。"
+
+#: ../coreapi/exevents.c:197
+msgid "Remote user cannot support any of proposed codecs."
+msgstr "相手側では、提案したコーデックを一つもサポートしていません。"
+
+#. time out, call leg is lost
+#: ../coreapi/exevents.c:227
+msgid "Timeout."
+msgstr "時間切れです。"
+
+#: ../coreapi/exevents.c:230
+msgid "Remote host was found but refused connection."
+msgstr "リモートホストが見つかりましたが、接続を拒否されました。"
+
+#: ../coreapi/exevents.c:339
+#, fuzzy
+msgid "is contacting you."
+msgstr "から電話です。"
+
+#: ../coreapi/exevents.c:424
+#, c-format
+msgid "Redirected to %s..."
+msgstr ""
+
+#: ../coreapi/exevents.c:440
+msgid ""
+"User is not reachable at the moment but he invites you\n"
+"to contact him using the following alternate resource:"
+msgstr ""
+"ユーザーに接続することができませんが、ユーザーは代わりの手段に招待していま"
+"す。\n"
+"他の手段で連絡をとってください。"
+
+#: ../coreapi/exevents.c:861
+msgid "Early media."
+msgstr ""
+
+#: ../coreapi/exevents.c:972
+#, fuzzy, c-format
+msgid "Registration on %s failed: %s"
+msgstr "登録しました。"
+
+#: ../coreapi/exevents.c:972
+msgid "no response timeout"
+msgstr ""
+
+#: ../coreapi/exevents.c:998
+#, fuzzy, c-format
+msgid "Registration on %s successful."
+msgstr "登録しました。"
+
+#: ../coreapi/exevents.c:999
+#, fuzzy, c-format
+msgid "Unregistration on %s done."
+msgstr "登録しました。"
+
+#. people for which we don't have yet an answer should appear as offline
+#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
+#, fuzzy
+msgid "Gone"
+msgstr "ありません。"
+
+#: ../coreapi/presence.c:129
+msgid "Waiting for Approval"
+msgstr ""
+
+#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
+#, fuzzy
+msgid "Online"
+msgstr "ライン入力"
+
+#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
+msgid "Busy"
+msgstr ""
+
+#: ../coreapi/presence.c:142
+msgid "Be Right Back"
+msgstr ""
+
+#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
+msgid "Away"
+msgstr "退席中"
+
+#: ../coreapi/presence.c:151
+msgid "On The Phone"
+msgstr ""
+
+#: ../coreapi/presence.c:156
+msgid "Out To Lunch"
+msgstr ""
+
+#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
+msgid "Closed"
+msgstr ""
+
+#: ../coreapi/friend.c:35
+msgid "Unknown"
+msgstr ""
+
+#: ../coreapi/friend.c:44
+msgid "Be right back"
+msgstr ""
+
+#: ../coreapi/friend.c:50
+#, fuzzy
+msgid "On the phone"
+msgstr "Linphone"
+
+#: ../coreapi/friend.c:53
+msgid "Out to lunch"
+msgstr ""
+
+#: ../coreapi/friend.c:56
+msgid "Do not disturb"
+msgstr "手が離せません"
+
+#: ../coreapi/friend.c:59
+#, fuzzy
+msgid "Moved"
+msgstr "コーデック"
+
+#: ../coreapi/friend.c:62
+msgid "Using another messaging service"
+msgstr ""
+
+#: ../coreapi/friend.c:65
+#, fuzzy
+msgid "Offline"
+msgstr "ライン入力"
+
+#: ../coreapi/friend.c:68
+msgid "Pending"
+msgstr ""
+
+#: ../coreapi/friend.c:74
+msgid "Unknown-bug"
+msgstr ""
+
+#: ../coreapi/proxy.c:221
+msgid ""
+"The sip proxy address you entered is invalid, it must start with \"sip:\" "
+"followed by a hostname."
+msgstr ""
+
+#: ../coreapi/proxy.c:227
+msgid ""
+"The sip identity you entered is invalid.\n"
+"It should look like sip:username@proxydomain, such as sip:alice@example.net"
+msgstr ""
+
+#: ../coreapi/proxy.c:634
+#, fuzzy, c-format
+msgid "Could not login as %s"
+msgstr "pixmapファイルが見つかりません %s"
+
+#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
+msgid "ITU-G.711 alaw encoder"
+msgstr ""
+
+#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
+msgid "ITU-G.711 alaw decoder"
+msgstr ""
+
+#: ../mediastreamer2/src/alsa.c:923
+msgid "Alsa sound source"
+msgstr ""
+
+#: ../mediastreamer2/src/alsa.c:1027
+msgid "Alsa sound output"
+msgstr ""
+
+#: ../mediastreamer2/src/aqsnd.c:891
+msgid "Sound capture filter for MacOS X Audio Queue Service"
+msgstr ""
+
+#: ../mediastreamer2/src/aqsnd.c:915
+msgid "Sound playback filter for MacOS X Audio Queue Service"
+msgstr ""
+
+#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
+msgid "DTMF generator"
+msgstr ""
+
+#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
+msgid "The GSM full-rate codec"
+msgstr ""
+
+#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
+msgid "The GSM codec"
+msgstr ""
+
+#: ../mediastreamer2/src/macsnd.c:670
+msgid "Sound capture filter for MacOS X Core Audio drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/macsnd.c:684
+msgid "Sound playback filter for MacOS X Core Audio drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
+msgid "A filter to make conferencing"
+msgstr ""
+
+#: ../mediastreamer2/src/msfileplayer.c:295
+#: ../mediastreamer2/src/msfileplayer.c:313
+msgid "Raw files and wav reader"
+msgstr ""
+
+#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
+#: ../mediastreamer2/src/msfilerec_win.c:216
+#: ../mediastreamer2/src/msfilerec_win.c:234
+msgid "Wav file recorder"
+msgstr ""
+
+#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
+msgid "A filter that send several inputs to one output."
+msgstr ""
+
+#: ../mediastreamer2/src/msresample.c:221
+#: ../mediastreamer2/src/msresample.c:239
+msgid "frequency resampler"
+msgstr ""
+
+#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
+msgid "RTP output filter"
+msgstr ""
+
+#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
+msgid "RTP input filter"
+msgstr ""
+
+#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
+#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
+msgid "The free and wonderful speex codec"
+msgstr ""
+
+#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
+msgid "A filter that controls and measure sound volume"
+msgstr ""
+
+#: ../mediastreamer2/src/msv4l.c:1009
+msgid "A video4linux compatible source filter to stream pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/msv4l2.c:458
+msgid "A filter to grab pictures from Video4Linux2-powered cameras"
+msgstr ""
+
+#: ../mediastreamer2/src/nowebcam.c:1780
+msgid "A filter that outputs a static image."
+msgstr ""
+
+#: ../mediastreamer2/src/oss.c:567
+msgid "Sound capture filter for OSS drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/oss.c:581
+msgid "Sound playback filter for OSS drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
+msgid "A pixel format converter"
+msgstr ""
+
+#: ../mediastreamer2/src/sizeconv.c:204
+msgid "A video size converter"
+msgstr ""
+
+#: ../mediastreamer2/src/sizeconv.c:222
+msgid "a small video size converter"
+msgstr ""
+
+#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
+msgid "Echo canceler using speex library"
+msgstr ""
+
+#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
+msgid "A filter that reads from input and copy to its multiple outputs."
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:375
+msgid "The theora video encoder from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:393
+msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
+msgid "The theora video decoder from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
+msgid "ITU-G.711 ulaw encoder"
+msgstr ""
+
+#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
+msgid "ITU-G.711 ulaw decoder"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
+#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
+msgid "A H.263 decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:688
+msgid "A MPEG4 decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:704
+msgid "A RTP/JPEG decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:720
+msgid "A MJPEG decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:736
+msgid "A snow decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
+msgid "A video H.263 encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:856
+msgid ""
+"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
+"spec."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
+msgid "A video MPEG4 encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:888
+msgid "A video snow encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:904
+msgid "A RTP/MJPEG encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:938
+msgid ""
+"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:970
+msgid ""
+"The snow codec is royalty-free and is open-source. \n"
+"It uses innovative techniques that makes it one of most promising video "
+"codec. It is implemented within the ffmpeg project.\n"
+"However it is under development, quite unstable and compatibility with other "
+"versions cannot be guaranteed."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:990
+msgid "A MJPEG encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
+msgid "A generic video display"
+msgstr ""
+
+#: ../mediastreamer2/src/wincevideods.c:966
+#: ../mediastreamer2/src/wincevideods.c:984
+#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
+#: ../mediastreamer2/src/winvideods.c:1306
+#: ../mediastreamer2/src/winvideods.c:1324
+msgid "A video4windows compatible source filter to stream pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
+msgid "A video for windows (vfw.h) based source filter to grab pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
+msgid "ICE filter"
+msgstr ""
+
+#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
+msgid "A filter that trashes its input (useful for terminating some graphs)."
+msgstr ""
+
+#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
+msgid "Parametric sound equalizer."
+msgstr ""
+
+#: ../mediastreamer2/src/msdscap-mingw.cc:1003
+msgid "A webcam grabber based on directshow."
+msgstr ""
+
+#, fuzzy
+#~ msgid "Display filters"
+#~ msgstr "表示される名前"
+
+#, fuzzy
+#~ msgid "_Properties"
+#~ msgstr "RTPのプロパティー"
+
+#, fuzzy
+#~ msgid "gtk-remove"
+#~ msgstr "削除する"
+
+#~ msgid "Sound"
+#~ msgstr "サウンド"
+
+#, fuzzy
+#~ msgid "Default identity"
+#~ msgstr "個人情報"
+
+#~ msgid "Address book"
+#~ msgstr "電話帳"
+
+#, fuzzy
+#~ msgid "Shows the address book"
+#~ msgstr "電話帳"
+
+#, fuzzy
+#~ msgid ""
+#~ "Call or\n"
+#~ "answer"
+#~ msgstr ""
+#~ "電話をかける\n"
+#~ "電話に出る"
+
+#~ msgid "Show more..."
+#~ msgstr "詳細"
+
+#~ msgid "Playback level:"
+#~ msgstr "受話音量"
+
+#~ msgid "Recording level:"
+#~ msgstr "送話音量"
+
+#, fuzzy
+#~ msgid "Ring level:"
+#~ msgstr "送話音量"
+
+#~ msgid "Reachable"
+#~ msgstr "在席中"
+
+#~ msgid "Busy, I'll be back in "
+#~ msgstr "今席をはずしています。"
+
+#~ msgid "The other party will be informed that you'll be back in X minutes"
+#~ msgstr "発信者は、あなたがX分後に戻ってくることが分かります。"
+
+#~ msgid "mn"
+#~ msgstr "分"
+
+#~ msgid "Moved temporarily"
+#~ msgstr "すぐ戻ります"
+
+#~ msgid "Alternative service"
+#~ msgstr "他の連絡手段を使って下さい"
+
+#~ msgid "URL:"
+#~ msgstr "URL:"
+
+#~ msgid "Presence"
+#~ msgstr "状態"
+
+#~ msgid "Press digits to send DTMFs."
+#~ msgstr "DTMFを送信するための数字を押して下さい。"
+
+#~ msgid "DTMF"
+#~ msgstr "DTMF"
+
+#~ msgid ""
+#~ "Linphone is a web-phone.\n"
+#~ "It is compatible with SIP and RTP protocols."
+#~ msgstr ""
+#~ "Linphoneはインターネット電話です。\n"
+#~ "SIP・RTPプロトコルと互換性があります。"
+
+#, fuzzy
+#~ msgid "Use IPv6 network (if available)"
+#~ msgstr "ユーザーは、今出られません。"
+
+#, fuzzy
+#~ msgid "Number of buffered miliseconds (jitter compensation):"
+#~ msgstr ""
+#~ "バッファするミリ秒\n"
+#~ "(音声が途切れるときは大きくします)"
+
+#~ msgid "RTP port used for audio:"
+#~ msgstr "オーディオに使用するRTPポート番号"
+
+#~ msgid "micro"
+#~ msgstr "マイク入力"
+
+#~ msgid "Recording source:"
+#~ msgstr "録音する音源"
+
+#~ msgid "Sound properties"
+#~ msgstr "サウンドのプロパティー"
+
+#~ msgid "Run sip user agent on port:"
+#~ msgstr "SIPユーザーエージェントが起動するポート"
+
+#~ msgid "It is strongly recommended to use port 5060."
+#~ msgstr "5060番ポートを使うことを強く推奨します。"
+
+#~ msgid "SIP port"
+#~ msgstr "SIPのポート"
+
+#~ msgid "@"
+#~ msgstr "@"
+
+#~ msgid "Identity"
+#~ msgstr "個人情報"
+
+#, fuzzy
+#~ msgid "Add proxy/registrar"
+#~ msgstr "SIPレジストラを使う"
+
+#~ msgid "Remote services"
+#~ msgstr "リモートのサービス"
+
+#, fuzzy
+#~ msgid "Authentication information"
+#~ msgstr "コーデックの情報"
+
+#~ msgid "SIP"
+#~ msgstr "SIP"
+
+#~ msgid "List of audio codecs, in order of preference:"
+#~ msgstr "コーデックのリストです。使いたい順に並べてください。"
+
+#, fuzzy
+#~ msgid "Video Codecs"
+#~ msgstr "オーディオコーデックのプロパティー"
+
+#~ msgid ""
+#~ "Note: Codecs in red are not usable regarding to your connection type to "
+#~ "the internet."
+#~ msgstr ""
+#~ "注意:赤い色のコーデックは、現在のネットワーク接続方法では使えません。"
+
+#, fuzzy
+#~ msgid "No information availlable"
+#~ msgstr "特に情報はありません"
+
+#~ msgid "Codec information"
+#~ msgstr "コーデックの情報"
+
+#~ msgid "Address Book"
+#~ msgstr "電話帳"
+
+#~ msgid "Select"
+#~ msgstr "選択する"
+
+#~ msgid ""
+#~ "User is not reachable at the moment but he invites you to contact him "
+#~ "using the following alternate ressource:"
+#~ msgstr ""
+#~ "ユーザーに接続することができませんが、ユーザーは代わりの手段に招待していま"
+#~ "す。他の手段で連絡をとってください。"
+
+#~ msgid "None."
+#~ msgstr "ありません。"
+
+#, fuzzy
+#~ msgid "Name:"
+#~ msgstr "名前"
+
+#, fuzzy
+#~ msgid "None"
+#~ msgstr "ありません。"
+
+#, fuzzy
+#~ msgid "Bad sip address: a sip address looks like sip:user@domain"
+#~ msgstr ""
+#~ "SIPアドレスの形式エラーです。SIPアドレスは、<sip:username@domainname>のよ"
+#~ "うな形式です。"
+
+#~ msgid "Communication ended."
+#~ msgstr "会話は終了しました。"
+
+#~ msgid "Call cancelled."
+#~ msgstr "通話はキャンセルされました。"
+
+#, fuzzy
+#~ msgid "Server address"
+#~ msgstr "サーバーのアドレス"
+
+#~ msgid "28k modem"
+#~ msgstr "28kのモデム"
+
+#~ msgid "56k modem"
+#~ msgstr "56kのモデム"
+
+#~ msgid "64k modem (numeris)"
+#~ msgstr "64Kのモデム(ISDN)"
+
+#~ msgid "ADSL or Cable modem"
+#~ msgstr "ADSL・CATVモデム"
+
+#~ msgid "Ethernet or equivalent"
+#~ msgstr "イーサネットなど"
+
+#~ msgid "Connection type:"
+#~ msgstr "接続のタイプ"
+
+#, fuzzy
+#~ msgid ""
+#~ "Linphone could not open audio device %s. Check if your sound card is "
+#~ "fully configured and working."
+#~ msgstr ""
+#~ "Linphoneはオーディオデバイスをオープンできませんでした。サウンドカードの設"
+#~ "定が完全で、正しく動いているかどうか確認して下さい。"
+
+#~ msgid "Type here the sip address of the person you want to call."
+#~ msgstr "電話をかけたい相手のSIPアドレスを入力して下さい。"
+
+#~ msgid ""
+#~ "Release or\n"
+#~ "Refuse"
+#~ msgstr ""
+#~ "電話を切る\n"
+#~ "会話を拒否"
+
+#~ msgid "%s. Retry after %i minute(s)."
+#~ msgstr "%s。%i 分後にかけ直して下さい。"
+
+#, fuzzy
+#~ msgid "Timeout..."
+#~ msgstr "時間切れです。"
+
+#, fuzzy
+#~ msgid ""
+#~ "Add address\n"
+#~ "book"
+#~ msgstr "電話帳"
+
+#~ msgid "Toggle this if you want to be registered on a remote server."
+#~ msgstr "リモートサーバーに登録するときは、チェックして下さい。"
+
+#~ msgid "Address of record:"
+#~ msgstr "登録するアドレス"
+
+#~ msgid ""
+#~ "The password used for registration. On some servers it is not necessary"
+#~ msgstr "登録にパスワードを用います。必須でないサーバーもあります。"
+
+#~ msgid "Use this registrar server as outbound proxy."
+#~ msgstr "レジストラサーバーをアウトバウンドプロクシとして使用します。"
+
+#~ msgid "sip address:"
+#~ msgstr "SIPアドレス"
+
+#~ msgid "Modify"
+#~ msgstr "修正"
+
+#~ msgid "Registering..."
+#~ msgstr "登録中……"
+
+#, fuzzy
+#~ msgid ""
+#~ "You are currently using the i810_audio driver.\n"
+#~ "This driver is buggy and so does not work with Linphone.\n"
+#~ "We suggest that you replace it by its equivalent ALSA driver,\n"
+#~ "either with packages from your distribution, or by downloading\n"
+#~ "ALSA drivers at http://www.alsa-project.org."
+#~ msgstr ""
+#~ "現在、i810オーディオドライバーを使っています。\n"
+#~ "このドライバーにはバグがあり、Linphoneではうまく動作しません。\n"
+#~ "ALSAドライバーに相当する\n"
+#~ "あなたのディストリビュージョンのパッケージか、\n"
+#~ "ALSAドライバー(http://www.alsa-project.org)への交換を推奨します。"
+
+#~ msgid "Unregistration successfull."
+#~ msgstr "登録を解除しました。"
+
+#~ msgid "Select network interface to use:"
+#~ msgstr "使用するネットワークインターフェースを選んで下さい"
+
+#~ msgid "Network interface properties"
+#~ msgstr "ネットワークインターフェースのプロパティー"
+
+#~ msgid "RTP"
+#~ msgstr "RTP"
+
+#~ msgid "C: 2001"
+#~ msgstr "C: 2001"
+
+#~ msgid "/dev/dsp"
+#~ msgstr "/dev/dsp"
+
+#~ msgid "/dev/dsp1"
+#~ msgstr "/dev/dsp1"
+
+#~ msgid "/dev/dsp2"
+#~ msgstr "/dev/dsp2"
+
+#~ msgid "/dev/dsp3"
+#~ msgstr "/dev/dsp3"
+
+#~ msgid "Set the selected address in linphone'main window."
+#~ msgstr "選択したアドレスがLinphoneのメインウインドウに現れます。"
diff --git a/po/nl.po b/po/nl.po
new file mode 100644 (file)
index 0000000..021dfae
--- /dev/null
+++ b/po/nl.po
@@ -0,0 +1,2071 @@
+# translation of nl.po to Nederlands
+# Dutch translation of linphone.
+# Copyright (C) 2005 THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the linphone package.
+# Taco Witte <tcwitte@cs.uu.nl>, 2005.
+# Hendrik-Jan Heins <hjh@passys.nl>, 2005.
+# Hendrik-Jan Heins <hjh@passys.nl>, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: nl\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-10-16 15:24+0200\n"
+"PO-Revision-Date: 2007-09-05 10:40+0200\n"
+"Last-Translator: Hendrik-Jan Heins <hjheins@gmail.com>\n"
+"Language-Team: Nederlands <vertaling@nl.linux.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
+#: ../gtk-glade/support.c:102
+#, c-format
+msgid "Couldn't find pixmap file: %s"
+msgstr "Kon pixmap bestand %s niet vinden"
+
+#: ../gtk-glade/chat.c:27
+#, c-format
+msgid "Chat with %s"
+msgstr "Chat met %s"
+
+#: ../gtk-glade/main.c:90
+msgid "log to stdout some debug information while running."
+msgstr ""
+
+#: ../gtk-glade/main.c:97
+msgid "Start only in the system tray, do not show the main interface."
+msgstr ""
+
+#: ../gtk-glade/main.c:104
+msgid "address to call right now"
+msgstr ""
+
+#: ../gtk-glade/main.c:111
+msgid "if set automatically answer incoming calls"
+msgstr ""
+
+#: ../gtk-glade/main.c:119
+msgid ""
+"Specifiy a working directory (should be the base of the installation, eg: c:"
+"\\Program Files\\Linphone)"
+msgstr ""
+
+#: ../gtk-glade/main.c:675
+#, fuzzy, c-format
+msgid "Incoming call from %s"
+msgstr "Inkomende oproep"
+
+#: ../gtk-glade/main.c:707
+#, c-format
+msgid ""
+"%s would like to add you to his contact list.\n"
+"Would you allow him to see your presence status or add him to your contact "
+"list ?\n"
+"If you answer no, this person will be temporarily blacklisted."
+msgstr ""
+
+#: ../gtk-glade/main.c:777
+#, c-format
+msgid ""
+"Please enter your password for username <i>%s</i>\n"
+" at domain <i>%s</i>:"
+msgstr ""
+
+#: ../gtk-glade/main.c:871
+msgid "Website link"
+msgstr ""
+
+#: ../gtk-glade/main.c:907
+msgid "Linphone - a video internet phone"
+msgstr ""
+
+#: ../gtk-glade/main.c:926
+#, c-format
+msgid "%s (Default)"
+msgstr ""
+
+#: ../gtk-glade/main.c:1168
+msgid "A free SIP video-phone"
+msgstr "Een Vrije SIP video-telefoon"
+
+#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
+#: ../gtk-glade/contact.glade.h:3
+msgid "Name"
+msgstr "Naam"
+
+#: ../gtk-glade/friendlist.c:212
+msgid "Presence status"
+msgstr "Aanwezigheidsstatus"
+
+#: ../gtk-glade/friendlist.c:243
+#, c-format
+msgid "Search in %s directory"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:432
+msgid "Invalid sip contact !"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:474
+#, fuzzy, c-format
+msgid "Call %s"
+msgstr "Oproepgeschiedenis"
+
+#: ../gtk-glade/friendlist.c:475
+#, c-format
+msgid "Send text to %s"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:476
+#, fuzzy, c-format
+msgid "Edit contact '%s'"
+msgstr "Bewerk contactgegevens"
+
+#: ../gtk-glade/friendlist.c:477
+#, c-format
+msgid "Delete contact '%s'"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:519
+#, c-format
+msgid "Add new contact from %s directory"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:251
+msgid "Rate (Hz)"
+msgstr "Frequentie (Hz)"
+
+#: ../gtk-glade/propertybox.c:257
+msgid "Status"
+msgstr "Status"
+
+#: ../gtk-glade/propertybox.c:263
+msgid "Min bitrate (kbit/s)"
+msgstr "Minimale bitrate (kbit/s)"
+
+#: ../gtk-glade/propertybox.c:269
+msgid "Parameters"
+msgstr "Parameters"
+
+#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
+msgid "Enabled"
+msgstr "Aan"
+
+#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
+msgid "Disabled"
+msgstr "Uit"
+
+#: ../gtk-glade/propertybox.c:480
+msgid "Account"
+msgstr "Account"
+
+#: ../gtk-glade/propertybox.c:620
+msgid "English"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:621
+msgid "French"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:622
+msgid "Swedish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:623
+msgid "Italian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:624
+msgid "Spanish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:625
+msgid "Brazilian Portugese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:626
+msgid "Polish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:627
+msgid "German"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:628
+msgid "Russian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:629
+msgid "Japanese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:630
+msgid "Dutch"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:631
+msgid "Hungarian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:632
+msgid "Czech"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:633
+msgid "Chinese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:690
+msgid ""
+"You need to restart linphone for the new language selection to take effect."
+msgstr ""
+
+#: ../gtk-glade/update.c:80
+#, c-format
+msgid ""
+"A more recent version is availalble from %s.\n"
+"Would you like to open a browser to download it ?"
+msgstr ""
+
+#: ../gtk-glade/update.c:91
+msgid "You are running the lastest version."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:66
+msgid "Firstname, Lastname"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:73
+#, fuzzy
+msgid "SIP address"
+msgstr "Adres"
+
+#: ../gtk-glade/buddylookup.c:121
+msgid "Error communicating with server."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:125
+#, fuzzy
+msgid "Connecting..."
+msgstr "Verbinden"
+
+#: ../gtk-glade/buddylookup.c:129
+#, fuzzy
+msgid "Connected"
+msgstr "Verbonden."
+
+#: ../gtk-glade/buddylookup.c:133
+msgid "Receiving data..."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:141
+#, c-format
+msgid "Found %i contact"
+msgid_plural "Found %i contacts"
+msgstr[0] ""
+msgstr[1] ""
+
+#: ../gtk-glade/setupwizard.c:25
+msgid ""
+"Welcome !\n"
+"This assistant will help you to use a SIP account for your calls."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:34
+msgid "Create an account by choosing a username"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:35
+msgid "I have already an account and just want to use it"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:53
+msgid "Please choose a username:"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:54
+#, fuzzy
+msgid "Username:"
+msgstr "gebruikersnaam:"
+
+#: ../gtk-glade/setupwizard.c:92
+#, c-format
+msgid "Checking if '%s' is available..."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
+msgid "Please wait..."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:101
+msgid "Sorry this username already exists. Please try a new one."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
+msgid "Ok !"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
+msgid "Communication problem, please try again later."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:134
+msgid "Thank you. Your account is now configured and ready for use."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:228
+msgid "Welcome to the account setup assistant"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:232
+msgid "Account setup assistant"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:236
+#, fuzzy
+msgid "Choosing a username"
+msgstr "gebruikersnaam:"
+
+#: ../gtk-glade/setupwizard.c:240
+msgid "Verifying"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:244
+#, fuzzy
+msgid "Confirmation"
+msgstr "Informatie"
+
+#: ../gtk-glade/setupwizard.c:249
+msgid "Creating your account"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:253
+msgid "Now ready !"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:98
+#, fuzzy
+msgid "<b>Calling...</b>"
+msgstr "Contactlijst"
+
+#: ../gtk-glade/incall_view.c:122
+#, fuzzy
+msgid "<b>In call with</b>"
+msgstr "Contactlijst"
+
+#: ../gtk-glade/incall_view.c:124
+msgid "00::00::00"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:140
+#, c-format
+msgid "%02i::%02i::%02i"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:158
+#, fuzzy
+msgid "<b>Call ended.</b>"
+msgstr "Oproep beeindigd"
+
+#: ../gtk-glade/incall_view.c:176
+#, fuzzy
+msgid "Unmute"
+msgstr "Ongelimiteerd"
+
+#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
+msgid "Mute"
+msgstr ""
+
+#: ../gtk-glade/loginframe.c:82
+#, c-format
+msgid "Please enter login information for %s"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:1
+msgid "#"
+msgstr "#"
+
+#: ../gtk-glade/main.glade.h:2
+msgid "*"
+msgstr "*"
+
+#: ../gtk-glade/main.glade.h:3
+msgid "0"
+msgstr "0"
+
+#: ../gtk-glade/main.glade.h:4
+msgid "1"
+msgstr "1"
+
+#: ../gtk-glade/main.glade.h:5
+msgid "2"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:6
+msgid "3"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:7
+msgid "4"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:8
+msgid "5"
+msgstr "5"
+
+#: ../gtk-glade/main.glade.h:9
+msgid "6"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:10
+msgid "7"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:11
+msgid "8"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:12
+msgid "9"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:13
+#, fuzzy
+msgid "<b>Contact list</b>"
+msgstr "Contactlijst"
+
+#: ../gtk-glade/main.glade.h:14
+#, fuzzy
+msgid "<b>Terminate call</b>"
+msgstr "Contactlijst"
+
+#: ../gtk-glade/main.glade.h:15
+#, fuzzy
+msgid "<b>Welcome !</b>"
+msgstr "Contactlijst"
+
+#: ../gtk-glade/main.glade.h:16
+msgid "A"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:17
+msgid ""
+"ADSL\n"
+"Fiber Channel"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:19
+msgid ""
+"All users\n"
+"Online users"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:21
+msgid "Assistant"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:22
+#, fuzzy
+msgid "Audio & Video"
+msgstr "Audio codecs"
+
+#: ../gtk-glade/main.glade.h:23
+#, fuzzy
+msgid "Audio only"
+msgstr "Audio codecs"
+
+#: ../gtk-glade/main.glade.h:24
+#, fuzzy
+msgid "Automatically log me in"
+msgstr "Automatisch een geldige hostnaam raden"
+
+#: ../gtk-glade/main.glade.h:25
+msgid "B"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
+msgid "C"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:27
+msgid "Check for updates"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:28
+msgid "D"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:29
+msgid "Default"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:30
+msgid "Digits"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:31
+#, fuzzy
+msgid "Duration"
+msgstr "Informatie"
+
+#: ../gtk-glade/main.glade.h:32
+#, fuzzy
+msgid "Duration:"
+msgstr "Informatie"
+
+#: ../gtk-glade/main.glade.h:33
+#, fuzzy
+msgid "Enable self-view"
+msgstr "Video aan"
+
+#: ../gtk-glade/main.glade.h:34
+msgid "Enter username, phone number, or full sip address"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:35
+#, fuzzy
+msgid "In call"
+msgstr "Inkomende oproep"
+
+#: ../gtk-glade/main.glade.h:36
+msgid "Internet connection:"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:37
+#, fuzzy
+msgid "Login information"
+msgstr "Contact informatie"
+
+#: ../gtk-glade/main.glade.h:38
+msgid "Lookup:"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:39
+msgid "Main view"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:41
+#, fuzzy
+msgid "My current identity:"
+msgstr "SIP-identiteit:"
+
+#: ../gtk-glade/main.glade.h:42
+#, fuzzy
+msgid "Password"
+msgstr "wachtwoord:"
+
+#: ../gtk-glade/main.glade.h:43
+#, fuzzy
+msgid "SIP address or phone number:"
+msgstr "Geef het SIP adres of telefoonnummer in"
+
+#: ../gtk-glade/main.glade.h:44
+#, fuzzy
+msgid "Show current call"
+msgstr "Kon niet oproepen"
+
+#: ../gtk-glade/main.glade.h:45
+msgid "Start call"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:46
+msgid "Terminate call"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:47
+#, fuzzy
+msgid "Username"
+msgstr "gebruikersnaam:"
+
+#: ../gtk-glade/main.glade.h:48
+#, fuzzy
+msgid "_Linphone"
+msgstr "linphone"
+
+#: ../gtk-glade/main.glade.h:49
+#, fuzzy
+msgid "_Modes"
+msgstr "Codecs"
+
+#: ../gtk-glade/main.glade.h:50
+#, fuzzy
+msgid "gtk-connect"
+msgstr "Verbonden."
+
+#: ../gtk-glade/main.glade.h:51
+msgid "gtk-find"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:52
+msgid "in"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:53
+msgid "label"
+msgstr ""
+
+#: ../gtk-glade/about.glade.h:1
+#, fuzzy
+msgid "About linphone"
+msgstr "linphone"
+
+#: ../gtk-glade/about.glade.h:2
+msgid "An internet video phone using the standart SIP (rfc3261) protocol."
+msgstr ""
+
+#: ../gtk-glade/about.glade.h:3
+msgid "Created by Simon Morlat\n"
+msgstr ""
+
+#: ../gtk-glade/about.glade.h:5
+msgid ""
+"fr: Simon Morlat\n"
+"en: Simon Morlat and Delphine Perreau\n"
+"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
+"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
+"sv: Daniel Nylander <po@danielnylander.se>\n"
+"es: Jesus Benitez <gnelson at inMail dot sk>\n"
+"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
+"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
+"pl: Robert Nasiadek <darkone@darkone.pl>\n"
+"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
+"hu: anonymous\n"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:1
+#, fuzzy
+msgid "<b>Contact information</b>"
+msgstr "Contact informatie"
+
+#: ../gtk-glade/contact.glade.h:2
+msgid "Allow this contact to see my presence status"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:4
+#, fuzzy
+msgid "SIP Address"
+msgstr "Adres"
+
+#: ../gtk-glade/contact.glade.h:5
+msgid "Show this contact presence status"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
+#: ../gtk-glade/sip_account.glade.h:9
+msgid "gtk-cancel"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
+#: ../gtk-glade/sip_account.glade.h:10
+msgid "gtk-ok"
+msgstr ""
+
+#: ../gtk-glade/log.glade.h:1
+msgid "Linphone debug window"
+msgstr ""
+
+#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
+#: ../gtk-glade/chatroom.glade.h:2
+msgid "gtk-close"
+msgstr ""
+
+#: ../gtk-glade/password.glade.h:1
+#, fuzzy
+msgid "Linphone - Authentication required"
+msgstr "Authorisatie gevraagd"
+
+#: ../gtk-glade/password.glade.h:2
+#, fuzzy
+msgid "Password:"
+msgstr "wachtwoord:"
+
+#: ../gtk-glade/password.glade.h:3
+msgid "Please enter the domain password"
+msgstr ""
+
+#: ../gtk-glade/password.glade.h:4
+msgid "UserID"
+msgstr ""
+
+#: ../gtk-glade/call_logs.glade.h:1
+#, fuzzy
+msgid "Call history"
+msgstr "Linphone - Oproepgeschiedenis"
+
+#: ../gtk-glade/sip_account.glade.h:1
+msgid "Configure a SIP account"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:2
+msgid "Linphone - Configure a SIP account"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:3
+#, fuzzy
+msgid "Publish presence information"
+msgstr "Toon informatie over aanwezigheid:"
+
+#: ../gtk-glade/sip_account.glade.h:4
+msgid "Register at startup"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:5
+#, fuzzy
+msgid "Registration duration (sec):"
+msgstr "Registratieperiode:"
+
+#: ../gtk-glade/sip_account.glade.h:6
+msgid "Route (optional):"
+msgstr "Route (optioneel):"
+
+#: ../gtk-glade/sip_account.glade.h:7
+#, fuzzy
+msgid "SIP Proxy address:"
+msgstr "SIP-proxy:"
+
+#: ../gtk-glade/sip_account.glade.h:8
+#, fuzzy
+msgid "Your SIP identity:"
+msgstr "SIP-identiteit:"
+
+#: ../gtk-glade/sip_account.glade.h:11
+msgid "sip:"
+msgstr "sip:"
+
+#: ../gtk-glade/chatroom.glade.h:1
+#, fuzzy
+msgid "Send"
+msgstr "Geluid"
+
+#: ../gtk-glade/incoming_call.glade.h:1
+msgid "Accept"
+msgstr "Accepteren"
+
+#: ../gtk-glade/incoming_call.glade.h:2
+#, fuzzy
+msgid "Decline"
+msgstr "lijn"
+
+#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
+msgid "Incoming call"
+msgstr "Inkomende oproep"
+
+#: ../gtk-glade/incoming_call.glade.h:4
+#, fuzzy
+msgid "Incoming call from"
+msgstr "Inkomende oproep"
+
+#: ../gtk-glade/incoming_call.glade.h:5
+#, fuzzy
+msgid "Linphone - Incoming call"
+msgstr "Inkomende oproep"
+
+#: ../gtk-glade/parameters.glade.h:1
+msgid "0 stands for \"unlimited\""
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:2
+#, fuzzy
+msgid "<b>Audio</b>"
+msgstr "Contactlijst"
+
+#: ../gtk-glade/parameters.glade.h:3
+msgid "<b>Bandwidth control</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:4
+#, fuzzy
+msgid "<b>Codecs</b>"
+msgstr "Contactlijst"
+
+#: ../gtk-glade/parameters.glade.h:5
+msgid "<b>Default identity</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:6
+msgid "<b>Language</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:7
+msgid "<b>NAT and Firewall</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:8
+#, fuzzy
+msgid "<b>Ports</b>"
+msgstr "Contactlijst"
+
+#: ../gtk-glade/parameters.glade.h:9
+msgid "<b>Privacy</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:10
+#, fuzzy
+msgid "<b>Proxy accounts</b>"
+msgstr "Contactlijst"
+
+#: ../gtk-glade/parameters.glade.h:11
+#, fuzzy
+msgid "<b>Transport</b>"
+msgstr "Contactlijst"
+
+#: ../gtk-glade/parameters.glade.h:12
+msgid "<b>Video</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:13
+msgid "ALSA special device (optional):"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:14
+#, fuzzy
+msgid "Add"
+msgstr "Adres"
+
+#: ../gtk-glade/parameters.glade.h:15
+msgid "Audio RTP/UDP:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:16
+#, fuzzy
+msgid ""
+"Audio codecs\n"
+"Video codecs"
+msgstr "Audio en video codecs"
+
+#: ../gtk-glade/parameters.glade.h:18
+msgid "Behind NAT / Firewall (specify gateway IP below)"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:19
+msgid "Behind NAT / Firewall (use STUN to resolve)"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:21
+msgid "CIF"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:22
+#, fuzzy
+msgid "Capture device:"
+msgstr "Geluidsapparaat gebruiken:"
+
+#: ../gtk-glade/parameters.glade.h:23
+#, fuzzy
+msgid "Codecs"
+msgstr "Codecs"
+
+#: ../gtk-glade/parameters.glade.h:24
+msgid "Direct connection to the Internet"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:25
+msgid "Disable"
+msgstr "Uit"
+
+#: ../gtk-glade/parameters.glade.h:26
+#, fuzzy
+msgid "Done"
+msgstr "Weg"
+
+#: ../gtk-glade/parameters.glade.h:27
+#, fuzzy
+msgid "Download speed limit in Kbit/sec:"
+msgstr "Download bandbreedte (kbit/sec):"
+
+#: ../gtk-glade/parameters.glade.h:28
+msgid "Edit"
+msgstr "Bewerken"
+
+#: ../gtk-glade/parameters.glade.h:29
+msgid "Enable"
+msgstr "Aan"
+
+#: ../gtk-glade/parameters.glade.h:30
+msgid "Enable echo cancellation"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:31
+msgid "Erase all passwords"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:32
+msgid "Manage SIP Accounts"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:33
+msgid "Multimedia settings"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:34
+#, fuzzy
+msgid "Network settings"
+msgstr "Netwerk"
+
+#: ../gtk-glade/parameters.glade.h:35
+#, fuzzy
+msgid "Playback device:"
+msgstr "Geluidsapparaat gebruiken:"
+
+#: ../gtk-glade/parameters.glade.h:36
+msgid "Prefered video resolution:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:37
+#, fuzzy
+msgid "Public IP address:"
+msgstr "SIP-adres:"
+
+#: ../gtk-glade/parameters.glade.h:38
+msgid ""
+"Register to FONICS\n"
+"virtual network !"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:40
+msgid "Remove"
+msgstr "Verwijderen"
+
+#: ../gtk-glade/parameters.glade.h:41
+#, fuzzy
+msgid "Ring device:"
+msgstr "Geluidsapparaat gebruiken:"
+
+#: ../gtk-glade/parameters.glade.h:42
+#, fuzzy
+msgid "Ring sound:"
+msgstr "Belgeluid:"
+
+#: ../gtk-glade/parameters.glade.h:43
+msgid "SIP (UDP):"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:44
+msgid "Send DTMFs as SIP info"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:45
+msgid "Set Maximum Transmission Unit:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:46
+msgid "Settings"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:47
+#, fuzzy
+msgid "Stun server:"
+msgstr "Geluidsapparaat"
+
+#: ../gtk-glade/parameters.glade.h:48
+msgid "This section defines your SIP address when not using a SIP account"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:49
+#, fuzzy
+msgid "Upload speed limit in Kbit/sec:"
+msgstr "Upload bandbreedte (kbit/sec):"
+
+#: ../gtk-glade/parameters.glade.h:50
+msgid "Use IPv6 instead of IPv4"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:51
+#, fuzzy
+msgid "User interface"
+msgstr "gebruikersnaam:"
+
+#: ../gtk-glade/parameters.glade.h:52
+msgid "Video RTP/UDP:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:53
+#, fuzzy
+msgid "Video input device:"
+msgstr "Geluidsapparaat"
+
+#: ../gtk-glade/parameters.glade.h:54
+msgid "Your display name (eg: John Doe):"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:55
+#, fuzzy
+msgid "Your resulting SIP address:"
+msgstr "Uw SIP-adres:"
+
+#: ../gtk-glade/parameters.glade.h:56
+#, fuzzy
+msgid "Your username:"
+msgstr "gebruikersnaam:"
+
+#: ../gtk-glade/parameters.glade.h:57
+msgid "a sound card\n"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:59
+msgid "default camera"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:60
+msgid "default soundcard"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:61
+msgid "default soundcard\n"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:63
+msgid "gtk-go-down"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:64
+msgid "gtk-go-up"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:65
+msgid "gtk-media-play"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:1
+msgid "<b>Search somebody</b>"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:2
+msgid "Add to my list"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:3
+msgid "Search contacts in directory"
+msgstr ""
+
+#: ../gtk-glade/waiting.glade.h:1
+#, fuzzy
+msgid "Linphone"
+msgstr "linphone"
+
+#: ../gtk-glade/waiting.glade.h:2
+msgid "Please wait"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:195
+#, fuzzy, c-format
+msgid "You have missed %i call."
+msgid_plural "You have missed %i calls."
+msgstr[0] "U heeft %i oproep(en) gemist."
+msgstr[1] "U heeft %i oproep(en) gemist."
+
+#: ../coreapi/linphonecore.c:223
+msgid "aborted"
+msgstr "afgebroken"
+
+#: ../coreapi/linphonecore.c:226
+msgid "completed"
+msgstr "voltooid"
+
+#: ../coreapi/linphonecore.c:229
+msgid "missed"
+msgstr "gemist"
+
+#: ../coreapi/linphonecore.c:234
+#, c-format
+msgid ""
+"%s at %s\n"
+"From: %s\n"
+"To: %s\n"
+"Status: %s\n"
+"Duration: %i mn %i sec\n"
+msgstr ""
+"%s op %s\n"
+"Van: %s\n"
+"Aan: %s\n"
+"Status: %s\n"
+"Tijdsduur: %i mins %i secs\n"
+
+#: ../coreapi/linphonecore.c:235
+msgid "Outgoing call"
+msgstr "Uitgaande oproep"
+
+#: ../coreapi/linphonecore.c:445
+msgid ""
+"Your machine appears to be connected to an IPv6 network. By default linphone "
+"always uses IPv4. Please update your configuration if you want to use IPv6"
+msgstr ""
+"Uw machine lijkt verbonden te zijn met een IPv6 netwerk. Standaard gebruikt "
+"linphone altijd IPv4. Wijzig uw configuratie wanneer u IPv6 wilt gebruiken."
+
+#: ../coreapi/linphonecore.c:739
+msgid "Ready"
+msgstr "Gereed."
+
+#: ../coreapi/linphonecore.c:1014
+msgid "Remote end seems to have disconnected, the call is going to be closed."
+msgstr ""
+
+#: ../coreapi/linphonecore.c:1172
+msgid "Looking for telephone number destination..."
+msgstr "Zoekt de lokatie van het telefoonnummer..."
+
+#: ../coreapi/linphonecore.c:1174
+msgid "Could not resolve this number."
+msgstr "Kon dit nummer niet vinden."
+
+#: ../coreapi/linphonecore.c:1239
+msgid ""
+"Could not parse given sip address. A sip url usually looks like sip:"
+"user@domain"
+msgstr ""
+"Slecht geformuleerd SIP-adres. Een SIP-adres ziet er uit als sip:"
+"gebruikersnaam@domeinnaam"
+
+#: ../coreapi/linphonecore.c:1340
+msgid "Sorry, having multiple simultaneous calls is not supported yet !"
+msgstr "Helaas, meerdere gelijktijdige gesprekken wordt nog niet ondersteund!"
+
+#: ../coreapi/linphonecore.c:1387
+msgid "Contacting"
+msgstr "Verbinden"
+
+#: ../coreapi/linphonecore.c:1402
+msgid "could not call"
+msgstr "Kon niet oproepen"
+
+#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
+msgid "Connected."
+msgstr "Verbonden."
+
+#: ../coreapi/linphonecore.c:1813
+msgid "Call ended"
+msgstr "Oproep beeindigd"
+
+#: ../coreapi/linphonecore.c:2175
+msgid "No nat/firewall address supplied !"
+msgstr "Geen NAT/firewall adres opgegeven"
+
+#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
+#, c-format
+msgid "Invalid nat address '%s' : %s"
+msgstr "Ongeldig NAT adres '%s' : %s"
+
+#: ../coreapi/misc.c:134
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the pcm oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+"'modprobe snd-pcm-oss' as root to load it."
+msgstr ""
+"Uw computer maakt schijnbaar gebruik van ALSA geluidsdrivers.\n"
+"Dit is de beste keuze. Maar de pcm oss emulatie module mist\n"
+"en linphone heeft deze nodig. Geeft u alstublieft het commando\n"
+"'modprobe snd-pcm-oss' als root om de module te laden."
+
+#: ../coreapi/misc.c:137
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the mixer oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+" 'modprobe snd-mixer-oss' as root to load it."
+msgstr ""
+"Uw computer maakt schijnbaar gebruik van ALSA geluidsdrivers.\n"
+"Dit is de beste keuze. Maar de mixer oss emulatie module mist\n"
+"en linphone heeft deze nodig. Geeft u alstublieft het commando\n"
+"'modprobe snd-mixer-oss' als root om de module te laden."
+
+#: ../coreapi/misc.c:610
+msgid "Stun lookup in progress..."
+msgstr "STUN adres wordt opgezocht..."
+
+#: ../coreapi/exevents.c:127
+msgid "Call terminated."
+msgstr "Oproep beeindigd."
+
+#: ../coreapi/exevents.c:149
+msgid "Could not reach destination."
+msgstr "Kon bestemming niet bereiken."
+
+#: ../coreapi/exevents.c:158
+msgid "User is busy."
+msgstr "Gebruiker is bezet."
+
+#: ../coreapi/exevents.c:159
+msgid "User is temporarily unavailable."
+msgstr "Gebruiker is tijdelijk niet beschikbaar."
+
+#: ../coreapi/exevents.c:160
+msgid "Request Cancelled."
+msgstr "Verzoek geannuleerd."
+
+#. char *retrymsg=_("%s. Retry after %i minute(s).");
+#: ../coreapi/exevents.c:162
+msgid "User does not want to be disturbed."
+msgstr "De gebruiker wenst niet gestoord te worden."
+
+#: ../coreapi/exevents.c:163
+msgid "Call declined."
+msgstr "Oproep geweigerd."
+
+#: ../coreapi/exevents.c:191
+msgid "Bad request"
+msgstr "Slecht geformuleerd verzoek"
+
+#: ../coreapi/exevents.c:194
+msgid "User cannot be found at given address."
+msgstr "Gebruiker kan niet worden gevonden bij opgegeven adres."
+
+#: ../coreapi/exevents.c:197
+msgid "Remote user cannot support any of proposed codecs."
+msgstr "De externe gebruiker ondersteunt geen van de voorgestelde codecs."
+
+#. time out, call leg is lost
+#: ../coreapi/exevents.c:227
+msgid "Timeout."
+msgstr "Time-out."
+
+#: ../coreapi/exevents.c:230
+msgid "Remote host was found but refused connection."
+msgstr "Externe machine is gevonden, maar verbinding is geweigerd."
+
+#: ../coreapi/exevents.c:339
+msgid "is contacting you."
+msgstr "belt u."
+
+#: ../coreapi/exevents.c:424
+#, c-format
+msgid "Redirected to %s..."
+msgstr "Doorgeschakeld naar %s..."
+
+#: ../coreapi/exevents.c:440
+msgid ""
+"User is not reachable at the moment but he invites you\n"
+"to contact him using the following alternate resource:"
+msgstr ""
+"De gebruiker is op dit moment niet bereikbaar, maar hij nodigt u uit om\n"
+"op de volgende, alternatieve, manier contact met hem op te nemen:"
+
+#: ../coreapi/exevents.c:861
+msgid "Early media."
+msgstr ""
+
+#: ../coreapi/exevents.c:972
+#, fuzzy, c-format
+msgid "Registration on %s failed: %s"
+msgstr "Registratie op %s mislukt (time-out)."
+
+#: ../coreapi/exevents.c:972
+msgid "no response timeout"
+msgstr ""
+
+#: ../coreapi/exevents.c:998
+#, c-format
+msgid "Registration on %s successful."
+msgstr "Registratie op %s gelukt."
+
+#: ../coreapi/exevents.c:999
+#, fuzzy, c-format
+msgid "Unregistration on %s done."
+msgstr "Registratie op %s gelukt."
+
+#. people for which we don't have yet an answer should appear as offline
+#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
+msgid "Gone"
+msgstr "Weg"
+
+#: ../coreapi/presence.c:129
+msgid "Waiting for Approval"
+msgstr "Wachten op accoord"
+
+#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
+msgid "Online"
+msgstr "Aanwezig"
+
+#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
+msgid "Busy"
+msgstr "Bezet"
+
+#: ../coreapi/presence.c:142
+msgid "Be Right Back"
+msgstr "Kom zo terug"
+
+#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
+msgid "Away"
+msgstr "Afwezig"
+
+#: ../coreapi/presence.c:151
+msgid "On The Phone"
+msgstr "Aan de telefoon"
+
+#: ../coreapi/presence.c:156
+msgid "Out To Lunch"
+msgstr "Aan het lunchen"
+
+#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
+msgid "Closed"
+msgstr "Gesloten"
+
+#: ../coreapi/friend.c:35
+msgid "Unknown"
+msgstr ""
+
+#: ../coreapi/friend.c:44
+#, fuzzy
+msgid "Be right back"
+msgstr "Kom zo terug"
+
+#: ../coreapi/friend.c:50
+#, fuzzy
+msgid "On the phone"
+msgstr "Aan de telefoon"
+
+#: ../coreapi/friend.c:53
+#, fuzzy
+msgid "Out to lunch"
+msgstr "Aan het lunchen"
+
+#: ../coreapi/friend.c:56
+msgid "Do not disturb"
+msgstr "Niet storen"
+
+#: ../coreapi/friend.c:59
+#, fuzzy
+msgid "Moved"
+msgstr "Codecs"
+
+#: ../coreapi/friend.c:62
+msgid "Using another messaging service"
+msgstr ""
+
+#: ../coreapi/friend.c:65
+#, fuzzy
+msgid "Offline"
+msgstr "Aanwezig"
+
+#: ../coreapi/friend.c:68
+msgid "Pending"
+msgstr ""
+
+#: ../coreapi/friend.c:74
+msgid "Unknown-bug"
+msgstr ""
+
+#: ../coreapi/proxy.c:221
+msgid ""
+"The sip proxy address you entered is invalid, it must start with \"sip:\" "
+"followed by a hostname."
+msgstr ""
+
+#: ../coreapi/proxy.c:227
+msgid ""
+"The sip identity you entered is invalid.\n"
+"It should look like sip:username@proxydomain, such as sip:alice@example.net"
+msgstr ""
+
+#: ../coreapi/proxy.c:634
+#, fuzzy, c-format
+msgid "Could not login as %s"
+msgstr "Kon pixmap bestand %s niet vinden"
+
+#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
+msgid "ITU-G.711 alaw encoder"
+msgstr ""
+
+#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
+msgid "ITU-G.711 alaw decoder"
+msgstr ""
+
+#: ../mediastreamer2/src/alsa.c:923
+msgid "Alsa sound source"
+msgstr ""
+
+#: ../mediastreamer2/src/alsa.c:1027
+msgid "Alsa sound output"
+msgstr ""
+
+#: ../mediastreamer2/src/aqsnd.c:891
+msgid "Sound capture filter for MacOS X Audio Queue Service"
+msgstr ""
+
+#: ../mediastreamer2/src/aqsnd.c:915
+msgid "Sound playback filter for MacOS X Audio Queue Service"
+msgstr ""
+
+#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
+msgid "DTMF generator"
+msgstr ""
+
+#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
+msgid "The GSM full-rate codec"
+msgstr ""
+
+#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
+msgid "The GSM codec"
+msgstr ""
+
+#: ../mediastreamer2/src/macsnd.c:670
+msgid "Sound capture filter for MacOS X Core Audio drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/macsnd.c:684
+msgid "Sound playback filter for MacOS X Core Audio drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
+msgid "A filter to make conferencing"
+msgstr ""
+
+#: ../mediastreamer2/src/msfileplayer.c:295
+#: ../mediastreamer2/src/msfileplayer.c:313
+msgid "Raw files and wav reader"
+msgstr ""
+
+#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
+#: ../mediastreamer2/src/msfilerec_win.c:216
+#: ../mediastreamer2/src/msfilerec_win.c:234
+msgid "Wav file recorder"
+msgstr ""
+
+#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
+msgid "A filter that send several inputs to one output."
+msgstr ""
+
+#: ../mediastreamer2/src/msresample.c:221
+#: ../mediastreamer2/src/msresample.c:239
+msgid "frequency resampler"
+msgstr ""
+
+#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
+msgid "RTP output filter"
+msgstr ""
+
+#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
+msgid "RTP input filter"
+msgstr ""
+
+#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
+#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
+msgid "The free and wonderful speex codec"
+msgstr ""
+
+#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
+msgid "A filter that controls and measure sound volume"
+msgstr ""
+
+#: ../mediastreamer2/src/msv4l.c:1009
+msgid "A video4linux compatible source filter to stream pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/msv4l2.c:458
+msgid "A filter to grab pictures from Video4Linux2-powered cameras"
+msgstr ""
+
+#: ../mediastreamer2/src/nowebcam.c:1780
+msgid "A filter that outputs a static image."
+msgstr ""
+
+#: ../mediastreamer2/src/oss.c:567
+msgid "Sound capture filter for OSS drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/oss.c:581
+msgid "Sound playback filter for OSS drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
+msgid "A pixel format converter"
+msgstr ""
+
+#: ../mediastreamer2/src/sizeconv.c:204
+msgid "A video size converter"
+msgstr ""
+
+#: ../mediastreamer2/src/sizeconv.c:222
+msgid "a small video size converter"
+msgstr ""
+
+#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
+msgid "Echo canceler using speex library"
+msgstr ""
+
+#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
+msgid "A filter that reads from input and copy to its multiple outputs."
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:375
+msgid "The theora video encoder from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:393
+msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
+msgid "The theora video decoder from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
+msgid "ITU-G.711 ulaw encoder"
+msgstr ""
+
+#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
+msgid "ITU-G.711 ulaw decoder"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
+#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
+msgid "A H.263 decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:688
+msgid "A MPEG4 decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:704
+msgid "A RTP/JPEG decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:720
+msgid "A MJPEG decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:736
+msgid "A snow decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
+msgid "A video H.263 encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:856
+msgid ""
+"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
+"spec."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
+msgid "A video MPEG4 encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:888
+msgid "A video snow encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:904
+msgid "A RTP/MJPEG encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:938
+msgid ""
+"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:970
+msgid ""
+"The snow codec is royalty-free and is open-source. \n"
+"It uses innovative techniques that makes it one of most promising video "
+"codec. It is implemented within the ffmpeg project.\n"
+"However it is under development, quite unstable and compatibility with other "
+"versions cannot be guaranteed."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:990
+msgid "A MJPEG encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
+msgid "A generic video display"
+msgstr ""
+
+#: ../mediastreamer2/src/wincevideods.c:966
+#: ../mediastreamer2/src/wincevideods.c:984
+#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
+#: ../mediastreamer2/src/winvideods.c:1306
+#: ../mediastreamer2/src/winvideods.c:1324
+msgid "A video4windows compatible source filter to stream pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
+msgid "A video for windows (vfw.h) based source filter to grab pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
+msgid "ICE filter"
+msgstr ""
+
+#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
+msgid "A filter that trashes its input (useful for terminating some graphs)."
+msgstr ""
+
+#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
+msgid "Parametric sound equalizer."
+msgstr ""
+
+#: ../mediastreamer2/src/msdscap-mingw.cc:1003
+msgid "A webcam grabber based on directshow."
+msgstr ""
+
+#, fuzzy
+#~ msgid "_View"
+#~ msgstr "Video"
+
+#, fuzzy
+#~ msgid "_Properties"
+#~ msgstr "RTP-eigenschappen"
+
+#, fuzzy
+#~ msgid "Show logs"
+#~ msgstr "Oproepen weergeven"
+
+#, fuzzy
+#~ msgid "_About"
+#~ msgstr "Account"
+
+#, fuzzy
+#~ msgid "gtk-remove"
+#~ msgstr "Verwijderen"
+
+#, fuzzy
+#~ msgid "Proxy in use"
+#~ msgstr "Te gebruiken proxy:"
+
+#~ msgid "Sound"
+#~ msgstr "Geluid"
+
+#, fuzzy
+#~ msgid "Default identity"
+#~ msgstr "SIP-identiteit:"
+
+#, fuzzy
+#~ msgid "Proxy accounts"
+#~ msgstr "Te gebruiken proxy:"
+
+#~ msgid "Go"
+#~ msgstr "Ga"
+
+#~ msgid "Address book"
+#~ msgstr "Adresboek"
+
+#~ msgid "Exit"
+#~ msgstr "Einde"
+
+#~ msgid "Help"
+#~ msgstr "Help"
+
+#~ msgid "Shows the address book"
+#~ msgstr "Het adresboek weergeven"
+
+#~ msgid "..."
+#~ msgstr "..."
+
+#~ msgid ""
+#~ "Call or\n"
+#~ "answer"
+#~ msgstr ""
+#~ "Oproepen of\n"
+#~ "beantwoorden"
+
+#~ msgid ""
+#~ "Hangup\n"
+#~ "or refuse"
+#~ msgstr ""
+#~ "Ophangen\n"
+#~ "of weigeren"
+
+#~ msgid "Or chat !"
+#~ msgstr "Of chat!"
+
+#~ msgid "Show more..."
+#~ msgstr "Meer weergeven..."
+
+#~ msgid "Playback level:"
+#~ msgstr "Geluidssterkte afspelen:"
+
+#~ msgid "Recording level:"
+#~ msgstr "Geluidssterkte opname:"
+
+#, fuzzy
+#~ msgid "Ring level:"
+#~ msgstr "Geluidssterkte opname:"
+
+#~ msgid "Controls"
+#~ msgstr "Functies"
+
+#~ msgid "Reachable"
+#~ msgstr "Bereikbaar"
+
+#~ msgid "Busy, I'll be back in "
+#~ msgstr "Bezig; ik ben terug over "
+
+#~ msgid "The other party will be informed that you'll be back in X minutes"
+#~ msgstr ""
+#~ "De andere partij zal worden geïnformeerd dat u over X minuten terug bent"
+
+#~ msgid "mn"
+#~ msgstr "min"
+
+#~ msgid "Moved temporarily"
+#~ msgstr "Tijdelijk verplaatst"
+
+#~ msgid "Alternative service"
+#~ msgstr "Alternatieve dienst"
+
+#~ msgid "URL:"
+#~ msgstr "URL:"
+
+#~ msgid "Presence"
+#~ msgstr "Aanwezigheid"
+
+#~ msgid "Press digits to send DTMFs."
+#~ msgstr "Druk op de cijfers om DTMF's te sturen"
+
+#~ msgid ""
+#~ "  3\n"
+#~ "def"
+#~ msgstr ""
+#~ "  3\n"
+#~ "def"
+
+#~ msgid ""
+#~ "  2\n"
+#~ "abc"
+#~ msgstr ""
+#~ "  2\n"
+#~ "abc"
+
+#~ msgid ""
+#~ "  4\n"
+#~ "ghi"
+#~ msgstr ""
+#~ "  4\n"
+#~ "ghi"
+
+#~ msgid ""
+#~ " 5\n"
+#~ "jkl"
+#~ msgstr ""
+#~ " 5\n"
+#~ "jkl"
+
+#~ msgid ""
+#~ "  6\n"
+#~ "mno"
+#~ msgstr ""
+#~ "  6\n"
+#~ "mno"
+
+#~ msgid ""
+#~ "   7\n"
+#~ "pqrs"
+#~ msgstr ""
+#~ "   7\n"
+#~ "pqrs"
+
+#~ msgid ""
+#~ "  8\n"
+#~ "tuv"
+#~ msgstr ""
+#~ "  8\n"
+#~ "tuv"
+
+#~ msgid ""
+#~ "   9\n"
+#~ "wxyz"
+#~ msgstr ""
+#~ "   9\n"
+#~ "wxyz"
+
+#~ msgid "DTMF"
+#~ msgstr "DTMF"
+
+#~ msgid "My online friends"
+#~ msgstr "Mijn online vrienden"
+
+#~ msgid ""
+#~ "C: 2001\n"
+#~ "Made in Old Europe"
+#~ msgstr ""
+#~ "C: 2001\n"
+#~ "Gemaakt in antiek Europa"
+
+#~ msgid ""
+#~ "Linphone is a web-phone.\n"
+#~ "It is compatible with SIP and RTP protocols."
+#~ msgstr ""
+#~ "Linphone is een webtelefoon.\n"
+#~ "Het werkt met de SIP- en RTP-protocollen."
+
+#~ msgid "http://www.linphone.org"
+#~ msgstr "http://www.linphone.org"
+
+#~ msgid "Use IPv6 network (if available)"
+#~ msgstr "Gebruik IPv6 netwerk (wanneer het beschikbaar is)"
+
+#~ msgid ""
+#~ "Toggle this if you are on an ipv6 network and you wish linphone to use it."
+#~ msgstr ""
+#~ "Wijzig dit wanneer u op een IPv6 netwerk zit en linphone daarop wilt "
+#~ "gebruiken."
+
+#~ msgid "Global"
+#~ msgstr "Globaal"
+
+#~ msgid ""
+#~ "These options is only for users in a private network, behind a gateway. "
+#~ "If you are not in this situation, then leave this empty."
+#~ msgstr ""
+#~ "Deze optie is alleen voor gebruikers in een lokaal netwerk, achter een "
+#~ "gateway: Wanneer u niet in deze situatie zit, laat dit dan leeg."
+
+#~ msgid "No firewall"
+#~ msgstr "Geen firewall"
+
+#~ msgid "Use this STUN server to guess firewall address :"
+#~ msgstr "Gebruik deze STUN server om het firewall adres te achterhalen"
+
+#~ msgid "Specify firewall address manually:"
+#~ msgstr "Geef het firewall adres handmatig op"
+
+#~ msgid "NAT traversal options (experimental)"
+#~ msgstr "NAT-doorstuur opties (experimenteel)"
+
+#~ msgid "Number of buffered miliseconds (jitter compensation):"
+#~ msgstr "Aantal gebufferde miliseconden (jitter compensatie):"
+
+#~ msgid "RTP port used for audio:"
+#~ msgstr "RTP-poort voor geluid:"
+
+#~ msgid "Use SIP INFO message instead of RTP rfc2833 for DTMF transmitting"
+#~ msgstr ""
+#~ "Gebruik SIP INFO bericht in plaats van RTP rfc2833 voor DTMF berichten"
+
+#~ msgid "RTP-RFC2833 is the recommended way."
+#~ msgstr "RTP-RFC2833 is de aanbevolen manier."
+
+#~ msgid "Other"
+#~ msgstr "Overige"
+
+#~ msgid "micro"
+#~ msgstr "microfoon"
+
+#~ msgid "Recording source:"
+#~ msgstr "Bron voor opname:"
+
+#~ msgid "Enable echo-canceler (cancels the echo heard by the remote party)"
+#~ msgstr ""
+#~ "Activeer de echo-onderdrukking (onderdrukt de echo die de andere partij "
+#~ "hoort)"
+
+#~ msgid "Choose file"
+#~ msgstr "Kies bestand"
+
+#~ msgid "Listen"
+#~ msgstr "Luisteren"
+
+#~ msgid "Sound properties"
+#~ msgstr "Geluidseigenschappen"
+
+#~ msgid "Run sip user agent on port:"
+#~ msgstr "Start SIP gebruikerssysteem op poort:"
+
+#~ msgid "It is strongly recommended to use port 5060."
+#~ msgstr "Het wordt sterk aangeraden om poort 5060 te gebruiken."
+
+#~ msgid "SIP port"
+#~ msgstr "SIP-poort"
+
+#~ msgid "@"
+#~ msgstr "@"
+
+#~ msgid "Identity"
+#~ msgstr "Identiteit"
+
+#~ msgid "Add proxy/registrar"
+#~ msgstr "Voeg proxy/registratieserver toe"
+
+#~ msgid "Remote services"
+#~ msgstr "Externe diensten"
+
+#~ msgid "Clear all stored authentication information (username,password...)"
+#~ msgstr ""
+#~ "Schoon alle opgeslagen authorisatie gegevens op (gebruikersnaam, "
+#~ "wachtwoord...)"
+
+#~ msgid "Authentication information"
+#~ msgstr "Authorisatie gegevens"
+
+#~ msgid "SIP"
+#~ msgstr "SIP"
+
+#~ msgid "List of audio codecs, in order of preference:"
+#~ msgstr "Lijst met audio codecs, in volgorde van voorkeur:"
+
+#~ msgid "Video Codecs"
+#~ msgstr "Video codecs"
+
+#~ msgid ""
+#~ "Note: Codecs in red are not usable regarding to your connection type to "
+#~ "the internet."
+#~ msgstr ""
+#~ "Opmerking: Met rood weergegeven codecs zijn niet bruikbaar vanwege het "
+#~ "soort internetverbinding dat u heeft"
+
+#, fuzzy
+#~ msgid "No information availlable"
+#~ msgstr "Geen informatie beschikbaar"
+
+#~ msgid "Codec information"
+#~ msgstr "Codec informatie"
+
+#~ msgid "Address Book"
+#~ msgstr "Adresboek"
+
+#~ msgid "Select"
+#~ msgstr "Kiezen"
+
+#~ msgid ""
+#~ "User is not reachable at the moment but he invites you to contact him "
+#~ "using the following alternate ressource:"
+#~ msgstr ""
+#~ "De gebruiker is op dit moment niet bereikbaar, maar hij nodigt u uit op "
+#~ "de volgende, alternatieve, manier contact met hem op te nemen:"
+
+#~ msgid "None."
+#~ msgstr "Geen."
+
+#~ msgid "Proxy/Registrar configuration box"
+#~ msgstr "Proxy/registratieserver registratieveld"
+
+#~ msgid "Send registration:"
+#~ msgstr "Verstruur registratie:"
+
+#~ msgid "Name:"
+#~ msgstr "Naam:"
+
+#~ msgid "Subscribe policy:"
+#~ msgstr "Aanmeldbeleid:"
+
+#~ msgid "Send subscription (see person's online status)"
+#~ msgstr "Verstruur aanmelding (bekijk de online status van een persoon)"
+
+#~ msgid "New incoming subscription"
+#~ msgstr "Nieuwe inkomende aanmelding"
+
+#~ msgid "You have received a new subscription..."
+#~ msgstr "U heeft een nieuwe aanmelding ontvangen..."
+
+#~ msgid "Refuse"
+#~ msgstr "Weigeren"
+
+#~ msgid "Authentication required for realm"
+#~ msgstr "Authorisatie benodigd voor gebied"
+
+#~ msgid "userid:"
+#~ msgstr "gebruikersID:"
+
+#~ msgid "realm:"
+#~ msgstr "gebied:"
+
+#~ msgid "Chat Room"
+#~ msgstr "Chat box"
+
+#~ msgid "Text:"
+#~ msgstr "Tekst:"
+
+#~ msgid "The caller asks for resource reservation. Do you agree ?"
+#~ msgstr "De beller vraagt om reservering van bronnen. Gaat u accoord?"
+
+#~ msgid ""
+#~ "The caller doesn't use resource reservation. \t\t\t\t\tDo you wish to "
+#~ "continue anyway ?"
+#~ msgstr ""
+#~ "De beller gebruikt geen bron reservatie. \t\t\t\t\tWilt u toch doorgaan?"
+
+#~ msgid "linphone - receiving call from %s"
+#~ msgstr "Linphone - binnenkomend gesprek van %s"
+
+#~ msgid ""
+#~ "You have received a subscription from %s.This means that this person "
+#~ "wishes to be notified of your presence information (online, busy, "
+#~ "away...).\n"
+#~ "Do you agree ?"
+#~ msgstr ""
+#~ "U heeft een aanmelding ontvangen van %s. Dit betekent dat deze persoon "
+#~ "een melding wil ontvangen wat betreft uw status (online, bezig, weg...).\n"
+#~ "Gaat u accoord?"
+
+#~ msgid "Authentication required for realm %s"
+#~ msgstr "Authorisatie benodigd voor gebied %s"
+
+#~ msgid "None"
+#~ msgstr "Geen"
+
+#~ msgid "Wait"
+#~ msgstr "Wachten"
+
+#~ msgid "Deny"
+#~ msgstr "Weigeren"
+
+#~ msgid "Bad sip address: a sip address looks like sip:user@domain"
+#~ msgstr ""
+#~ "Slecht geformuleerd SIP-adres. Een SIP-adres ziet er uit als sip:"
+#~ "gebruikersnaam@domeinnaam"
+
+#~ msgid "Stun lookup done..."
+#~ msgstr "STUN adres gevonden..."
+
+#~ msgid "User manual"
+#~ msgstr "Handleiding"
+
+#~ msgid "Ring sound selection"
+#~ msgstr "Belgeluid keuze"
+
+#~ msgid "Communication ended."
+#~ msgstr "Communicatie beëindigd."
+
+#~ msgid "Call cancelled."
+#~ msgstr "Oproep geannuleerd."
+
+#~ msgid "Firewall 's external ip address (in dot notations):"
+#~ msgstr "Extern IP adres van de firewall (in  x.x.x.x notatie):"
+
+#~ msgid "Index"
+#~ msgstr "Index"
+
+#~ msgid "Server address"
+#~ msgstr "Serveradres"
+
+#~ msgid "28k modem"
+#~ msgstr "28k modem"
+
+#~ msgid "56k modem"
+#~ msgstr "56k modem"
+
+#~ msgid "64k modem (numeris)"
+#~ msgstr "64k modem (ISDN)"
+
+#~ msgid "ADSL or Cable modem"
+#~ msgstr "ADSL- of kabelmodem"
+
+#~ msgid "Ethernet or equivalent"
+#~ msgstr "Ethernet of vergelijkbaar"
+
+#~ msgid "Connection type:"
+#~ msgstr "Soort verbinding:"
+
+#~ msgid ""
+#~ "Linphone could not open audio device %s. Check if your sound card is "
+#~ "fully configured and working."
+#~ msgstr ""
+#~ "Linphone kon het geluidsapparaat %s niet openen. Controleer of uw "
+#~ "geluidskaart goed is ingesteld en werkt."
+
+#~ msgid "Type here the sip address of the person you want to call."
+#~ msgstr "Geef hier het SIP-adres op van de persoon die u wilt bellen."
+
+#~ msgid ""
+#~ "Release or\n"
+#~ "Refuse"
+#~ msgstr ""
+#~ "Ophangen\n"
+#~ "of weigeren"
+
+#~ msgid "%s. Retry after %i minute(s)."
+#~ msgstr "%s. Opnieuw proberen na %i minu(u)t(en)."
diff --git a/po/pl.po b/po/pl.po
new file mode 100644 (file)
index 0000000..11dfd8c
--- /dev/null
+++ b/po/pl.po
@@ -0,0 +1,1881 @@
+# SIP Telephony Application.
+# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Simon Morlat <linphone@free.fr>, 2001.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: linphone 0.7.1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-10-16 15:24+0200\n"
+"PO-Revision-Date: 2003-08-22 12:50+0200\n"
+"Last-Translator: Robert Nasiadek <darkone@darkone.pl>\n"
+"Language-Team: Polski <pl@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
+#: ../gtk-glade/support.c:102
+#, c-format
+msgid "Couldn't find pixmap file: %s"
+msgstr "Nie można znaleźć pixmapy: %s"
+
+#: ../gtk-glade/chat.c:27
+#, c-format
+msgid "Chat with %s"
+msgstr ""
+
+#: ../gtk-glade/main.c:90
+msgid "log to stdout some debug information while running."
+msgstr ""
+
+#: ../gtk-glade/main.c:97
+msgid "Start only in the system tray, do not show the main interface."
+msgstr ""
+
+#: ../gtk-glade/main.c:104
+msgid "address to call right now"
+msgstr ""
+
+#: ../gtk-glade/main.c:111
+msgid "if set automatically answer incoming calls"
+msgstr ""
+
+#: ../gtk-glade/main.c:119
+msgid ""
+"Specifiy a working directory (should be the base of the installation, eg: c:"
+"\\Program Files\\Linphone)"
+msgstr ""
+
+#: ../gtk-glade/main.c:675
+#, c-format
+msgid "Incoming call from %s"
+msgstr ""
+
+#: ../gtk-glade/main.c:707
+#, c-format
+msgid ""
+"%s would like to add you to his contact list.\n"
+"Would you allow him to see your presence status or add him to your contact "
+"list ?\n"
+"If you answer no, this person will be temporarily blacklisted."
+msgstr ""
+
+#: ../gtk-glade/main.c:777
+#, c-format
+msgid ""
+"Please enter your password for username <i>%s</i>\n"
+" at domain <i>%s</i>:"
+msgstr ""
+
+#: ../gtk-glade/main.c:871
+msgid "Website link"
+msgstr ""
+
+#: ../gtk-glade/main.c:907
+msgid "Linphone - a video internet phone"
+msgstr ""
+
+#: ../gtk-glade/main.c:926
+#, c-format
+msgid "%s (Default)"
+msgstr ""
+
+#: ../gtk-glade/main.c:1168
+msgid "A free SIP video-phone"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
+#: ../gtk-glade/contact.glade.h:3
+msgid "Name"
+msgstr "Nazwa"
+
+#: ../gtk-glade/friendlist.c:212
+#, fuzzy
+msgid "Presence status"
+msgstr "Obecność"
+
+#: ../gtk-glade/friendlist.c:243
+#, c-format
+msgid "Search in %s directory"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:432
+msgid "Invalid sip contact !"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:474
+#, c-format
+msgid "Call %s"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:475
+#, c-format
+msgid "Send text to %s"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:476
+#, fuzzy, c-format
+msgid "Edit contact '%s'"
+msgstr "(Brak informacji kontaktowych !)"
+
+#: ../gtk-glade/friendlist.c:477
+#, c-format
+msgid "Delete contact '%s'"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:519
+#, c-format
+msgid "Add new contact from %s directory"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:251
+msgid "Rate (Hz)"
+msgstr "Jakość (Hz)"
+
+#: ../gtk-glade/propertybox.c:257
+msgid "Status"
+msgstr "Status"
+
+#: ../gtk-glade/propertybox.c:263
+msgid "Min bitrate (kbit/s)"
+msgstr "Min przepustowość (kbit/s)"
+
+#: ../gtk-glade/propertybox.c:269
+msgid "Parameters"
+msgstr "Parametr"
+
+#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
+msgid "Enabled"
+msgstr "Włączone"
+
+#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
+msgid "Disabled"
+msgstr "Wyłączone"
+
+#: ../gtk-glade/propertybox.c:480
+msgid "Account"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:620
+msgid "English"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:621
+msgid "French"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:622
+msgid "Swedish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:623
+msgid "Italian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:624
+msgid "Spanish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:625
+msgid "Brazilian Portugese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:626
+msgid "Polish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:627
+msgid "German"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:628
+msgid "Russian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:629
+msgid "Japanese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:630
+msgid "Dutch"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:631
+msgid "Hungarian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:632
+msgid "Czech"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:633
+msgid "Chinese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:690
+msgid ""
+"You need to restart linphone for the new language selection to take effect."
+msgstr ""
+
+#: ../gtk-glade/update.c:80
+#, c-format
+msgid ""
+"A more recent version is availalble from %s.\n"
+"Would you like to open a browser to download it ?"
+msgstr ""
+
+#: ../gtk-glade/update.c:91
+msgid "You are running the lastest version."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:66
+msgid "Firstname, Lastname"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:73
+#, fuzzy
+msgid "SIP address"
+msgstr "Adres"
+
+#: ../gtk-glade/buddylookup.c:121
+msgid "Error communicating with server."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:125
+#, fuzzy
+msgid "Connecting..."
+msgstr "Lącze"
+
+#: ../gtk-glade/buddylookup.c:129
+#, fuzzy
+msgid "Connected"
+msgstr "Połączony"
+
+#: ../gtk-glade/buddylookup.c:133
+msgid "Receiving data..."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:141
+#, c-format
+msgid "Found %i contact"
+msgid_plural "Found %i contacts"
+msgstr[0] ""
+msgstr[1] ""
+
+#: ../gtk-glade/setupwizard.c:25
+msgid ""
+"Welcome !\n"
+"This assistant will help you to use a SIP account for your calls."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:34
+msgid "Create an account by choosing a username"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:35
+msgid "I have already an account and just want to use it"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:53
+msgid "Please choose a username:"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:54
+#, fuzzy
+msgid "Username:"
+msgstr "Podręcznik"
+
+#: ../gtk-glade/setupwizard.c:92
+#, c-format
+msgid "Checking if '%s' is available..."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
+msgid "Please wait..."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:101
+msgid "Sorry this username already exists. Please try a new one."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
+msgid "Ok !"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
+msgid "Communication problem, please try again later."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:134
+msgid "Thank you. Your account is now configured and ready for use."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:228
+msgid "Welcome to the account setup assistant"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:232
+msgid "Account setup assistant"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:236
+msgid "Choosing a username"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:240
+msgid "Verifying"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:244
+#, fuzzy
+msgid "Confirmation"
+msgstr "Informacja"
+
+#: ../gtk-glade/setupwizard.c:249
+msgid "Creating your account"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:253
+msgid "Now ready !"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:98
+#, fuzzy
+msgid "<b>Calling...</b>"
+msgstr "Dzwonie do "
+
+#: ../gtk-glade/incall_view.c:122
+#, fuzzy
+msgid "<b>In call with</b>"
+msgstr "Dzwonie do "
+
+#: ../gtk-glade/incall_view.c:124
+msgid "00::00::00"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:140
+#, c-format
+msgid "%02i::%02i::%02i"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:158
+#, fuzzy
+msgid "<b>Call ended.</b>"
+msgstr "Rozmowa odrzucona."
+
+#: ../gtk-glade/incall_view.c:176
+msgid "Unmute"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
+msgid "Mute"
+msgstr ""
+
+#: ../gtk-glade/loginframe.c:82
+#, c-format
+msgid "Please enter login information for %s"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:1
+msgid "#"
+msgstr "#"
+
+#: ../gtk-glade/main.glade.h:2
+msgid "*"
+msgstr "*"
+
+#: ../gtk-glade/main.glade.h:3
+msgid "0"
+msgstr "0"
+
+#: ../gtk-glade/main.glade.h:4
+msgid "1"
+msgstr "1"
+
+#: ../gtk-glade/main.glade.h:5
+msgid "2"
+msgstr "2"
+
+#: ../gtk-glade/main.glade.h:6
+msgid "3"
+msgstr "3"
+
+#: ../gtk-glade/main.glade.h:7
+msgid "4"
+msgstr "4"
+
+#: ../gtk-glade/main.glade.h:8
+msgid "5"
+msgstr "5"
+
+#: ../gtk-glade/main.glade.h:9
+msgid "6"
+msgstr "6"
+
+#: ../gtk-glade/main.glade.h:10
+msgid "7"
+msgstr "7"
+
+#: ../gtk-glade/main.glade.h:11
+msgid "8"
+msgstr "8"
+
+#: ../gtk-glade/main.glade.h:12
+msgid "9"
+msgstr "9"
+
+#: ../gtk-glade/main.glade.h:13
+#, fuzzy
+msgid "<b>Contact list</b>"
+msgstr "Dzwonie do "
+
+#: ../gtk-glade/main.glade.h:14
+#, fuzzy
+msgid "<b>Terminate call</b>"
+msgstr "Dzwonie do "
+
+#: ../gtk-glade/main.glade.h:15
+#, fuzzy
+msgid "<b>Welcome !</b>"
+msgstr "Dzwonie do "
+
+#: ../gtk-glade/main.glade.h:16
+msgid "A"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:17
+msgid ""
+"ADSL\n"
+"Fiber Channel"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:19
+msgid ""
+"All users\n"
+"Online users"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:21
+msgid "Assistant"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:22
+#, fuzzy
+msgid "Audio & Video"
+msgstr "Kodeki audio"
+
+#: ../gtk-glade/main.glade.h:23
+#, fuzzy
+msgid "Audio only"
+msgstr "Kodeki audio"
+
+#: ../gtk-glade/main.glade.h:24
+msgid "Automatically log me in"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:25
+msgid "B"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
+msgid "C"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:27
+msgid "Check for updates"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:28
+msgid "D"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:29
+msgid "Default"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:30
+msgid "Digits"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:31
+#, fuzzy
+msgid "Duration"
+msgstr "Informacja"
+
+#: ../gtk-glade/main.glade.h:32
+#, fuzzy
+msgid "Duration:"
+msgstr "Informacja"
+
+#: ../gtk-glade/main.glade.h:33
+#, fuzzy
+msgid "Enable self-view"
+msgstr "Włączone"
+
+#: ../gtk-glade/main.glade.h:34
+msgid "Enter username, phone number, or full sip address"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:35
+msgid "In call"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:36
+msgid "Internet connection:"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:37
+#, fuzzy
+msgid "Login information"
+msgstr "Informacje o kodeku"
+
+#: ../gtk-glade/main.glade.h:38
+msgid "Lookup:"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:39
+msgid "Main view"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:41
+#, fuzzy
+msgid "My current identity:"
+msgstr "Tożsamość"
+
+#: ../gtk-glade/main.glade.h:42
+#, fuzzy
+msgid "Password"
+msgstr "Twoje hasło:"
+
+#: ../gtk-glade/main.glade.h:43
+#, fuzzy
+msgid "SIP address or phone number:"
+msgstr "Adres serwera rejestracji sip"
+
+#: ../gtk-glade/main.glade.h:44
+msgid "Show current call"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:45
+msgid "Start call"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:46
+msgid "Terminate call"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:47
+#, fuzzy
+msgid "Username"
+msgstr "Podręcznik"
+
+#: ../gtk-glade/main.glade.h:48
+#, fuzzy
+msgid "_Linphone"
+msgstr "linphone"
+
+#: ../gtk-glade/main.glade.h:49
+#, fuzzy
+msgid "_Modes"
+msgstr "Kodeki"
+
+#: ../gtk-glade/main.glade.h:50
+#, fuzzy
+msgid "gtk-connect"
+msgstr "Połączony"
+
+#: ../gtk-glade/main.glade.h:51
+msgid "gtk-find"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:52
+msgid "in"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:53
+msgid "label"
+msgstr ""
+
+#: ../gtk-glade/about.glade.h:1
+#, fuzzy
+msgid "About linphone"
+msgstr "linphone"
+
+#: ../gtk-glade/about.glade.h:2
+msgid "An internet video phone using the standart SIP (rfc3261) protocol."
+msgstr ""
+
+#: ../gtk-glade/about.glade.h:3
+msgid "Created by Simon Morlat\n"
+msgstr ""
+
+#: ../gtk-glade/about.glade.h:5
+msgid ""
+"fr: Simon Morlat\n"
+"en: Simon Morlat and Delphine Perreau\n"
+"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
+"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
+"sv: Daniel Nylander <po@danielnylander.se>\n"
+"es: Jesus Benitez <gnelson at inMail dot sk>\n"
+"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
+"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
+"pl: Robert Nasiadek <darkone@darkone.pl>\n"
+"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
+"hu: anonymous\n"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:1
+#, fuzzy
+msgid "<b>Contact information</b>"
+msgstr "Informacje o kodeku"
+
+#: ../gtk-glade/contact.glade.h:2
+msgid "Allow this contact to see my presence status"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:4
+#, fuzzy
+msgid "SIP Address"
+msgstr "Adres"
+
+#: ../gtk-glade/contact.glade.h:5
+msgid "Show this contact presence status"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
+#: ../gtk-glade/sip_account.glade.h:9
+msgid "gtk-cancel"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
+#: ../gtk-glade/sip_account.glade.h:10
+msgid "gtk-ok"
+msgstr ""
+
+#: ../gtk-glade/log.glade.h:1
+msgid "Linphone debug window"
+msgstr ""
+
+#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
+#: ../gtk-glade/chatroom.glade.h:2
+msgid "gtk-close"
+msgstr ""
+
+#: ../gtk-glade/password.glade.h:1
+msgid "Linphone - Authentication required"
+msgstr ""
+
+#: ../gtk-glade/password.glade.h:2
+#, fuzzy
+msgid "Password:"
+msgstr "Twoje hasło:"
+
+#: ../gtk-glade/password.glade.h:3
+msgid "Please enter the domain password"
+msgstr ""
+
+#: ../gtk-glade/password.glade.h:4
+msgid "UserID"
+msgstr ""
+
+#: ../gtk-glade/call_logs.glade.h:1
+msgid "Call history"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:1
+msgid "Configure a SIP account"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:2
+msgid "Linphone - Configure a SIP account"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:3
+#, fuzzy
+msgid "Publish presence information"
+msgstr "Informacje o kodeku"
+
+#: ../gtk-glade/sip_account.glade.h:4
+msgid "Register at startup"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:5
+#, fuzzy
+msgid "Registration duration (sec):"
+msgstr "Rejestracja powiodła się."
+
+#: ../gtk-glade/sip_account.glade.h:6
+msgid "Route (optional):"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:7
+#, fuzzy
+msgid "SIP Proxy address:"
+msgstr "Adres sip:"
+
+#: ../gtk-glade/sip_account.glade.h:8
+#, fuzzy
+msgid "Your SIP identity:"
+msgstr "Tożsamość"
+
+#: ../gtk-glade/sip_account.glade.h:11
+msgid "sip:"
+msgstr "sip:"
+
+#: ../gtk-glade/chatroom.glade.h:1
+#, fuzzy
+msgid "Send"
+msgstr "Dźwięk"
+
+#: ../gtk-glade/incoming_call.glade.h:1
+msgid "Accept"
+msgstr ""
+
+#: ../gtk-glade/incoming_call.glade.h:2
+#, fuzzy
+msgid "Decline"
+msgstr "linia"
+
+#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
+msgid "Incoming call"
+msgstr ""
+
+#: ../gtk-glade/incoming_call.glade.h:4
+msgid "Incoming call from"
+msgstr ""
+
+#: ../gtk-glade/incoming_call.glade.h:5
+msgid "Linphone - Incoming call"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:1
+msgid "0 stands for \"unlimited\""
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:2
+#, fuzzy
+msgid "<b>Audio</b>"
+msgstr "Dzwonie do "
+
+#: ../gtk-glade/parameters.glade.h:3
+msgid "<b>Bandwidth control</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:4
+#, fuzzy
+msgid "<b>Codecs</b>"
+msgstr "Dzwonie do "
+
+#: ../gtk-glade/parameters.glade.h:5
+msgid "<b>Default identity</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:6
+msgid "<b>Language</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:7
+msgid "<b>NAT and Firewall</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:8
+#, fuzzy
+msgid "<b>Ports</b>"
+msgstr "Dzwonie do "
+
+#: ../gtk-glade/parameters.glade.h:9
+msgid "<b>Privacy</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:10
+#, fuzzy
+msgid "<b>Proxy accounts</b>"
+msgstr "Dzwonie do "
+
+#: ../gtk-glade/parameters.glade.h:11
+#, fuzzy
+msgid "<b>Transport</b>"
+msgstr "Dzwonie do "
+
+#: ../gtk-glade/parameters.glade.h:12
+msgid "<b>Video</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:13
+msgid "ALSA special device (optional):"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:14
+#, fuzzy
+msgid "Add"
+msgstr "Adres"
+
+#: ../gtk-glade/parameters.glade.h:15
+msgid "Audio RTP/UDP:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:16
+#, fuzzy
+msgid ""
+"Audio codecs\n"
+"Video codecs"
+msgstr "Kodeki audio"
+
+#: ../gtk-glade/parameters.glade.h:18
+msgid "Behind NAT / Firewall (specify gateway IP below)"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:19
+msgid "Behind NAT / Firewall (use STUN to resolve)"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:21
+msgid "CIF"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:22
+#, fuzzy
+msgid "Capture device:"
+msgstr "Użyj tego urządzenia dźwięku:"
+
+#: ../gtk-glade/parameters.glade.h:23
+#, fuzzy
+msgid "Codecs"
+msgstr "Kodeki"
+
+#: ../gtk-glade/parameters.glade.h:24
+msgid "Direct connection to the Internet"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:25
+msgid "Disable"
+msgstr "Wyłącz"
+
+#: ../gtk-glade/parameters.glade.h:26
+#, fuzzy
+msgid "Done"
+msgstr "Brak."
+
+#: ../gtk-glade/parameters.glade.h:27
+msgid "Download speed limit in Kbit/sec:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:28
+msgid "Edit"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:29
+msgid "Enable"
+msgstr "Włączony"
+
+#: ../gtk-glade/parameters.glade.h:30
+msgid "Enable echo cancellation"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:31
+msgid "Erase all passwords"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:32
+msgid "Manage SIP Accounts"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:33
+msgid "Multimedia settings"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:34
+#, fuzzy
+msgid "Network settings"
+msgstr "Sieć"
+
+#: ../gtk-glade/parameters.glade.h:35
+#, fuzzy
+msgid "Playback device:"
+msgstr "Użyj tego urządzenia dźwięku:"
+
+#: ../gtk-glade/parameters.glade.h:36
+msgid "Prefered video resolution:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:37
+#, fuzzy
+msgid "Public IP address:"
+msgstr "Adres sip:"
+
+#: ../gtk-glade/parameters.glade.h:38
+msgid ""
+"Register to FONICS\n"
+"virtual network !"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:40
+msgid "Remove"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:41
+#, fuzzy
+msgid "Ring device:"
+msgstr "Użyj tego urządzenia dźwięku:"
+
+#: ../gtk-glade/parameters.glade.h:42
+#, fuzzy
+msgid "Ring sound:"
+msgstr "Źródło nagrywania:"
+
+#: ../gtk-glade/parameters.glade.h:43
+msgid "SIP (UDP):"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:44
+msgid "Send DTMFs as SIP info"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:45
+msgid "Set Maximum Transmission Unit:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:46
+msgid "Settings"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:47
+#, fuzzy
+msgid "Stun server:"
+msgstr "Dźwięk"
+
+#: ../gtk-glade/parameters.glade.h:48
+msgid "This section defines your SIP address when not using a SIP account"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:49
+msgid "Upload speed limit in Kbit/sec:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:50
+msgid "Use IPv6 instead of IPv4"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:51
+#, fuzzy
+msgid "User interface"
+msgstr "Podręcznik"
+
+#: ../gtk-glade/parameters.glade.h:52
+msgid "Video RTP/UDP:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:53
+#, fuzzy
+msgid "Video input device:"
+msgstr "Dźwięk"
+
+#: ../gtk-glade/parameters.glade.h:54
+msgid "Your display name (eg: John Doe):"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:55
+#, fuzzy
+msgid "Your resulting SIP address:"
+msgstr "Twój adres sip:"
+
+#: ../gtk-glade/parameters.glade.h:56
+msgid "Your username:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:57
+msgid "a sound card\n"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:59
+msgid "default camera"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:60
+msgid "default soundcard"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:61
+msgid "default soundcard\n"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:63
+msgid "gtk-go-down"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:64
+msgid "gtk-go-up"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:65
+msgid "gtk-media-play"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:1
+msgid "<b>Search somebody</b>"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:2
+msgid "Add to my list"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:3
+msgid "Search contacts in directory"
+msgstr ""
+
+#: ../gtk-glade/waiting.glade.h:1
+#, fuzzy
+msgid "Linphone"
+msgstr "linphone"
+
+#: ../gtk-glade/waiting.glade.h:2
+msgid "Please wait"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:195
+#, c-format
+msgid "You have missed %i call."
+msgid_plural "You have missed %i calls."
+msgstr[0] ""
+msgstr[1] ""
+
+#: ../coreapi/linphonecore.c:223
+msgid "aborted"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:226
+msgid "completed"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:229
+msgid "missed"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:234
+#, c-format
+msgid ""
+"%s at %s\n"
+"From: %s\n"
+"To: %s\n"
+"Status: %s\n"
+"Duration: %i mn %i sec\n"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:235
+msgid "Outgoing call"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:445
+msgid ""
+"Your machine appears to be connected to an IPv6 network. By default linphone "
+"always uses IPv4. Please update your configuration if you want to use IPv6"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:739
+#, fuzzy
+msgid "Ready"
+msgstr "Gotowy."
+
+#: ../coreapi/linphonecore.c:1014
+msgid "Remote end seems to have disconnected, the call is going to be closed."
+msgstr ""
+
+#: ../coreapi/linphonecore.c:1172
+msgid "Looking for telephone number destination..."
+msgstr ""
+
+#: ../coreapi/linphonecore.c:1174
+msgid "Could not resolve this number."
+msgstr ""
+
+#: ../coreapi/linphonecore.c:1239
+#, fuzzy
+msgid ""
+"Could not parse given sip address. A sip url usually looks like sip:"
+"user@domain"
+msgstr "Nie poprawny adres sip. Adres sip wygląda tak <sip:osoba@serwer>"
+
+#: ../coreapi/linphonecore.c:1340
+msgid "Sorry, having multiple simultaneous calls is not supported yet !"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:1387
+#, fuzzy
+msgid "Contacting"
+msgstr "Dzwonie do "
+
+#: ../coreapi/linphonecore.c:1402
+msgid "could not call"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
+msgid "Connected."
+msgstr "Połączony"
+
+#: ../coreapi/linphonecore.c:1813
+#, fuzzy
+msgid "Call ended"
+msgstr "Rozmowa odrzucona."
+
+#: ../coreapi/linphonecore.c:2175
+msgid "No nat/firewall address supplied !"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
+#, c-format
+msgid "Invalid nat address '%s' : %s"
+msgstr ""
+
+#: ../coreapi/misc.c:134
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the pcm oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+"'modprobe snd-pcm-oss' as root to load it."
+msgstr ""
+"Używasz sterowników ALSA do dźwięku.\n"
+"To jest najlepszy wybór. Jednak brakuje modułu emulacji pcm oss,\n"
+"a Linphone go wymaga. Uruchom 'modprobe snd-pcm-oss' jako root,\n"
+"aby go załadować"
+
+#: ../coreapi/misc.c:137
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the mixer oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+" 'modprobe snd-mixer-oss' as root to load it."
+msgstr ""
+"Używasz sterowników ALSA do dźwięku.\n"
+"To jest najlepszy wybór. Jednak brakuje modułu emulacji mixera oss,\n"
+"a Linphone go wymaga. Uruchom 'modprobe snd-mixer-oss' jako root,\n"
+"aby go załadować"
+
+#: ../coreapi/misc.c:610
+msgid "Stun lookup in progress..."
+msgstr ""
+
+#: ../coreapi/exevents.c:127
+#, fuzzy
+msgid "Call terminated."
+msgstr "Rozmowa odrzucona."
+
+#: ../coreapi/exevents.c:149
+msgid "Could not reach destination."
+msgstr ""
+
+#: ../coreapi/exevents.c:158
+msgid "User is busy."
+msgstr "Osoba jest zajęta."
+
+#: ../coreapi/exevents.c:159
+msgid "User is temporarily unavailable."
+msgstr "Osoba jest tymczasowo niedostępna."
+
+#: ../coreapi/exevents.c:160
+#, fuzzy
+msgid "Request Cancelled."
+msgstr "Połączenie odwołane."
+
+#. char *retrymsg=_("%s. Retry after %i minute(s).");
+#: ../coreapi/exevents.c:162
+msgid "User does not want to be disturbed."
+msgstr "Osoba nie chce, aby jej przeszkadzać."
+
+#: ../coreapi/exevents.c:163
+msgid "Call declined."
+msgstr "Rozmowa odrzucona."
+
+#: ../coreapi/exevents.c:191
+msgid "Bad request"
+msgstr ""
+
+#: ../coreapi/exevents.c:194
+msgid "User cannot be found at given address."
+msgstr "Osoba nie istnieje pod tym adresem."
+
+#: ../coreapi/exevents.c:197
+msgid "Remote user cannot support any of proposed codecs."
+msgstr "Osoba nie posiada żadnych zaproponowanych kodeków."
+
+#. time out, call leg is lost
+#: ../coreapi/exevents.c:227
+msgid "Timeout."
+msgstr "Upłynął limit czasu."
+
+#: ../coreapi/exevents.c:230
+msgid "Remote host was found but refused connection."
+msgstr "Serwer istnieje, ale odrzucił połączenie."
+
+#: ../coreapi/exevents.c:339
+#, fuzzy
+msgid "is contacting you."
+msgstr "dzwoni do Ciebie."
+
+#: ../coreapi/exevents.c:424
+#, c-format
+msgid "Redirected to %s..."
+msgstr ""
+
+#: ../coreapi/exevents.c:440
+msgid ""
+"User is not reachable at the moment but he invites you\n"
+"to contact him using the following alternate resource:"
+msgstr ""
+"Użytkownik nie jest dostępny, ale proponuje kontakt poprzez alternatywny "
+"adres:"
+
+#: ../coreapi/exevents.c:861
+msgid "Early media."
+msgstr ""
+
+#: ../coreapi/exevents.c:972
+#, fuzzy, c-format
+msgid "Registration on %s failed: %s"
+msgstr "Rejestracja powiodła się."
+
+#: ../coreapi/exevents.c:972
+msgid "no response timeout"
+msgstr ""
+
+#: ../coreapi/exevents.c:998
+#, fuzzy, c-format
+msgid "Registration on %s successful."
+msgstr "Rejestracja powiodła się."
+
+#: ../coreapi/exevents.c:999
+#, fuzzy, c-format
+msgid "Unregistration on %s done."
+msgstr "Rejestracja powiodła się."
+
+#. people for which we don't have yet an answer should appear as offline
+#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
+#, fuzzy
+msgid "Gone"
+msgstr "Brak."
+
+#: ../coreapi/presence.c:129
+msgid "Waiting for Approval"
+msgstr ""
+
+#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
+#, fuzzy
+msgid "Online"
+msgstr "linia"
+
+#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
+msgid "Busy"
+msgstr ""
+
+#: ../coreapi/presence.c:142
+msgid "Be Right Back"
+msgstr ""
+
+#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
+msgid "Away"
+msgstr "Zajęty"
+
+#: ../coreapi/presence.c:151
+msgid "On The Phone"
+msgstr ""
+
+#: ../coreapi/presence.c:156
+msgid "Out To Lunch"
+msgstr ""
+
+#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
+msgid "Closed"
+msgstr ""
+
+#: ../coreapi/friend.c:35
+msgid "Unknown"
+msgstr ""
+
+#: ../coreapi/friend.c:44
+msgid "Be right back"
+msgstr ""
+
+#: ../coreapi/friend.c:50
+#, fuzzy
+msgid "On the phone"
+msgstr "linphone"
+
+#: ../coreapi/friend.c:53
+msgid "Out to lunch"
+msgstr ""
+
+#: ../coreapi/friend.c:56
+msgid "Do not disturb"
+msgstr "Nie przeszkadzać"
+
+#: ../coreapi/friend.c:59
+#, fuzzy
+msgid "Moved"
+msgstr "Kodeki"
+
+#: ../coreapi/friend.c:62
+msgid "Using another messaging service"
+msgstr ""
+
+#: ../coreapi/friend.c:65
+#, fuzzy
+msgid "Offline"
+msgstr "linia"
+
+#: ../coreapi/friend.c:68
+msgid "Pending"
+msgstr ""
+
+#: ../coreapi/friend.c:74
+msgid "Unknown-bug"
+msgstr ""
+
+#: ../coreapi/proxy.c:221
+msgid ""
+"The sip proxy address you entered is invalid, it must start with \"sip:\" "
+"followed by a hostname."
+msgstr ""
+
+#: ../coreapi/proxy.c:227
+msgid ""
+"The sip identity you entered is invalid.\n"
+"It should look like sip:username@proxydomain, such as sip:alice@example.net"
+msgstr ""
+
+#: ../coreapi/proxy.c:634
+#, fuzzy, c-format
+msgid "Could not login as %s"
+msgstr "Nie można znaleźć pixmapy: %s"
+
+#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
+msgid "ITU-G.711 alaw encoder"
+msgstr ""
+
+#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
+msgid "ITU-G.711 alaw decoder"
+msgstr ""
+
+#: ../mediastreamer2/src/alsa.c:923
+msgid "Alsa sound source"
+msgstr ""
+
+#: ../mediastreamer2/src/alsa.c:1027
+msgid "Alsa sound output"
+msgstr ""
+
+#: ../mediastreamer2/src/aqsnd.c:891
+msgid "Sound capture filter for MacOS X Audio Queue Service"
+msgstr ""
+
+#: ../mediastreamer2/src/aqsnd.c:915
+msgid "Sound playback filter for MacOS X Audio Queue Service"
+msgstr ""
+
+#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
+msgid "DTMF generator"
+msgstr ""
+
+#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
+msgid "The GSM full-rate codec"
+msgstr ""
+
+#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
+msgid "The GSM codec"
+msgstr ""
+
+#: ../mediastreamer2/src/macsnd.c:670
+msgid "Sound capture filter for MacOS X Core Audio drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/macsnd.c:684
+msgid "Sound playback filter for MacOS X Core Audio drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
+msgid "A filter to make conferencing"
+msgstr ""
+
+#: ../mediastreamer2/src/msfileplayer.c:295
+#: ../mediastreamer2/src/msfileplayer.c:313
+msgid "Raw files and wav reader"
+msgstr ""
+
+#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
+#: ../mediastreamer2/src/msfilerec_win.c:216
+#: ../mediastreamer2/src/msfilerec_win.c:234
+msgid "Wav file recorder"
+msgstr ""
+
+#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
+msgid "A filter that send several inputs to one output."
+msgstr ""
+
+#: ../mediastreamer2/src/msresample.c:221
+#: ../mediastreamer2/src/msresample.c:239
+msgid "frequency resampler"
+msgstr ""
+
+#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
+msgid "RTP output filter"
+msgstr ""
+
+#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
+msgid "RTP input filter"
+msgstr ""
+
+#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
+#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
+msgid "The free and wonderful speex codec"
+msgstr ""
+
+#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
+msgid "A filter that controls and measure sound volume"
+msgstr ""
+
+#: ../mediastreamer2/src/msv4l.c:1009
+msgid "A video4linux compatible source filter to stream pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/msv4l2.c:458
+msgid "A filter to grab pictures from Video4Linux2-powered cameras"
+msgstr ""
+
+#: ../mediastreamer2/src/nowebcam.c:1780
+msgid "A filter that outputs a static image."
+msgstr ""
+
+#: ../mediastreamer2/src/oss.c:567
+msgid "Sound capture filter for OSS drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/oss.c:581
+msgid "Sound playback filter for OSS drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
+msgid "A pixel format converter"
+msgstr ""
+
+#: ../mediastreamer2/src/sizeconv.c:204
+msgid "A video size converter"
+msgstr ""
+
+#: ../mediastreamer2/src/sizeconv.c:222
+msgid "a small video size converter"
+msgstr ""
+
+#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
+msgid "Echo canceler using speex library"
+msgstr ""
+
+#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
+msgid "A filter that reads from input and copy to its multiple outputs."
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:375
+msgid "The theora video encoder from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:393
+msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
+msgid "The theora video decoder from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
+msgid "ITU-G.711 ulaw encoder"
+msgstr ""
+
+#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
+msgid "ITU-G.711 ulaw decoder"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
+#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
+msgid "A H.263 decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:688
+msgid "A MPEG4 decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:704
+msgid "A RTP/JPEG decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:720
+msgid "A MJPEG decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:736
+msgid "A snow decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
+msgid "A video H.263 encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:856
+msgid ""
+"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
+"spec."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
+msgid "A video MPEG4 encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:888
+msgid "A video snow encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:904
+msgid "A RTP/MJPEG encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:938
+msgid ""
+"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:970
+msgid ""
+"The snow codec is royalty-free and is open-source. \n"
+"It uses innovative techniques that makes it one of most promising video "
+"codec. It is implemented within the ffmpeg project.\n"
+"However it is under development, quite unstable and compatibility with other "
+"versions cannot be guaranteed."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:990
+msgid "A MJPEG encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
+msgid "A generic video display"
+msgstr ""
+
+#: ../mediastreamer2/src/wincevideods.c:966
+#: ../mediastreamer2/src/wincevideods.c:984
+#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
+#: ../mediastreamer2/src/winvideods.c:1306
+#: ../mediastreamer2/src/winvideods.c:1324
+msgid "A video4windows compatible source filter to stream pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
+msgid "A video for windows (vfw.h) based source filter to grab pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
+msgid "ICE filter"
+msgstr ""
+
+#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
+msgid "A filter that trashes its input (useful for terminating some graphs)."
+msgstr ""
+
+#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
+msgid "Parametric sound equalizer."
+msgstr ""
+
+#: ../mediastreamer2/src/msdscap-mingw.cc:1003
+msgid "A webcam grabber based on directshow."
+msgstr ""
+
+#, fuzzy
+#~ msgid "Display filters"
+#~ msgstr "Wyświetlana nazwa:"
+
+#, fuzzy
+#~ msgid "_Properties"
+#~ msgstr "Właściwości RTP"
+
+#~ msgid "Sound"
+#~ msgstr "Dźwięk"
+
+#, fuzzy
+#~ msgid "Default identity"
+#~ msgstr "Tożsamość"
+
+#~ msgid "Address book"
+#~ msgstr "Książka adresowa"
+
+#~ msgid "Shows the address book"
+#~ msgstr "Pokazuje książkę adresową"
+
+#~ msgid "..."
+#~ msgstr "..."
+
+#, fuzzy
+#~ msgid ""
+#~ "Call or\n"
+#~ "answer"
+#~ msgstr ""
+#~ "Zadzwoń lub\n"
+#~ "Odpowiedz"
+
+#~ msgid "Show more..."
+#~ msgstr "Pokaż więcej"
+
+#~ msgid "Playback level:"
+#~ msgstr "Poziom odtwarzania:"
+
+#~ msgid "Recording level:"
+#~ msgstr "Poziom nagrywania:"
+
+#, fuzzy
+#~ msgid "Ring level:"
+#~ msgstr "Poziom nagrywania:"
+
+#~ msgid "Reachable"
+#~ msgstr "Dostępny"
+
+#~ msgid "Busy, I'll be back in "
+#~ msgstr "Zajęty, wrócę za "
+
+#~ msgid "The other party will be informed that you'll be back in X minutes"
+#~ msgstr "Osoba zostanie powiadomiona, że wrócisz za X minut."
+
+#~ msgid "mn"
+#~ msgstr "mn"
+
+#~ msgid "Moved temporarily"
+#~ msgstr "Tymczasowo niedostępny"
+
+#~ msgid "Alternative service"
+#~ msgstr "Alternatywny adres"
+
+#~ msgid "URL:"
+#~ msgstr "URL:"
+
+#~ msgid "Presence"
+#~ msgstr "Obecność"
+
+#~ msgid "Press digits to send DTMFs."
+#~ msgstr "Nacisnij cyfry, aby wysłać DTMFy."
+
+#~ msgid "DTMF"
+#~ msgstr "DTMF"
+
+#~ msgid ""
+#~ "Linphone is a web-phone.\n"
+#~ "It is compatible with SIP and RTP protocols."
+#~ msgstr ""
+#~ "Linphone jest telefonem internetowym.\n"
+#~ "Jest kompatybilny z protokolami SIP i RTP."
+
+#, fuzzy
+#~ msgid "Use IPv6 network (if available)"
+#~ msgstr "Osoba jest tymczasowo niedostępna."
+
+#, fuzzy
+#~ msgid ""
+#~ "These options is only for users in a private network, behind a gateway. "
+#~ "If you are not in this situation, then leave this empty."
+#~ msgstr ""
+#~ "Ta opcja jest tylko dla osób w sieci prywatnej, znajdujących się za "
+#~ "firewallem. Jeżeli nie jesteś w takiej sytuacji, nie zmieniaj tej opcji."
+
+#~ msgid "NAT traversal options (experimental)"
+#~ msgstr "Opcje NAT traversal (eksperymentalne)"
+
+#, fuzzy
+#~ msgid "Number of buffered miliseconds (jitter compensation):"
+#~ msgstr "Czas bufora w milisekundach (kompensacja jitter):"
+
+#~ msgid "RTP port used for audio:"
+#~ msgstr "Port RTP dla dźwięku:"
+
+#~ msgid "micro"
+#~ msgstr "mikrofon"
+
+#~ msgid "Recording source:"
+#~ msgstr "Źródło nagrywania:"
+
+#~ msgid "Sound properties"
+#~ msgstr "Właściwości dźwięku"
+
+#~ msgid "Run sip user agent on port:"
+#~ msgstr "Uruchom agenta sip na porcie:"
+
+#~ msgid "It is strongly recommended to use port 5060."
+#~ msgstr "Rekomendowane jest użycie portu 5060."
+
+#~ msgid "SIP port"
+#~ msgstr "Port SIP"
+
+#~ msgid "@"
+#~ msgstr "@"
+
+#~ msgid "Identity"
+#~ msgstr "Tożsamość"
+
+#, fuzzy
+#~ msgid "Add proxy/registrar"
+#~ msgstr "Użyj rejestracji sip"
+
+#~ msgid "Remote services"
+#~ msgstr "Zdalne usługi"
+
+#, fuzzy
+#~ msgid "Authentication information"
+#~ msgstr "Informacje o kodeku"
+
+#~ msgid "SIP"
+#~ msgstr "SIP"
+
+#~ msgid "List of audio codecs, in order of preference:"
+#~ msgstr "Lista kodeków audio, w kolejności preferencji:"
+
+#, fuzzy
+#~ msgid "Video Codecs"
+#~ msgstr "Kodeki audio"
+
+#~ msgid ""
+#~ "Note: Codecs in red are not usable regarding to your connection type to "
+#~ "the internet."
+#~ msgstr ""
+#~ "Uwaga: Czerwone kodeki nie mogą być użyte, ze względu na typTwojego "
+#~ "połącznia z internetem."
+
+#, fuzzy
+#~ msgid "No information availlable"
+#~ msgstr "Brak informacji"
+
+#~ msgid "Codec information"
+#~ msgstr "Informacje o kodeku"
+
+#~ msgid "Address Book"
+#~ msgstr "Książka adresowa"
+
+#~ msgid "Select"
+#~ msgstr "Wybierz"
+
+#~ msgid ""
+#~ "User is not reachable at the moment but he invites you to contact him "
+#~ "using the following alternate ressource:"
+#~ msgstr ""
+#~ "Użytkownik nie jest dostępny, ale proponuje kontakt poprzez alternatywny "
+#~ "adres:"
+
+#~ msgid "None."
+#~ msgstr "Brak."
+
+#, fuzzy
+#~ msgid "Name:"
+#~ msgstr "Nazwa"
+
+#, fuzzy
+#~ msgid "None"
+#~ msgstr "Brak."
+
+#, fuzzy
+#~ msgid "Bad sip address: a sip address looks like sip:user@domain"
+#~ msgstr "Nie poprawny adres sip. Adres sip wygląda tak <sip:osoba@serwer>"
+
+#~ msgid "Communication ended."
+#~ msgstr "Komunikacja zakończona."
+
+#~ msgid "Call cancelled."
+#~ msgstr "Połączenie odwołane."
+
+#, fuzzy
+#~ msgid "Firewall 's external ip address (in dot notations):"
+#~ msgstr "Adres IP firewall'u (w notacji kropkowej):"
+
+#~ msgid "Index"
+#~ msgstr "Indeks"
+
+#, fuzzy
+#~ msgid "Server address"
+#~ msgstr "Adres serwera:"
+
+#~ msgid "28k modem"
+#~ msgstr "Modem 28K"
+
+#~ msgid "56k modem"
+#~ msgstr "Modem 56K"
+
+#~ msgid "64k modem (numeris)"
+#~ msgstr "Modem ISDN 64K"
+
+#~ msgid "ADSL or Cable modem"
+#~ msgstr "ADSL lub połączenie kablowe"
+
+#~ msgid "Ethernet or equivalent"
+#~ msgstr "LAN lub podobne"
+
+#~ msgid "Connection type:"
+#~ msgstr "Typ połączenia:"
+
+#, fuzzy
+#~ msgid ""
+#~ "Linphone could not open audio device %s. Check if your sound card is "
+#~ "fully configured and working."
+#~ msgstr ""
+#~ "Linphone nie mógł otworzyć urządzenia dźwięku. Sprawdź czy Twoja karta "
+#~ "jest dobrze skonfigurowana."
+
+#~ msgid "Type here the sip address of the person you want to call."
+#~ msgstr "Tutaj wpisz adres sip osoby, do której chcesz zadzwonić"
+
+#~ msgid ""
+#~ "Release or\n"
+#~ "Refuse"
+#~ msgstr ""
+#~ "Rozłącz lub\n"
+#~ "Odmów"
+
+#~ msgid "%s. Retry after %i minute(s)."
+#~ msgstr "%s. Spróbuj za %i minut."
+
+#, fuzzy
+#~ msgid "Timeout..."
+#~ msgstr "Upłynął limit czasu."
+
+#, fuzzy
+#~ msgid ""
+#~ "Add address\n"
+#~ "book"
+#~ msgstr "Książka adresowa"
+
+#~ msgid "Toggle this if you want to be registered on a remote server."
+#~ msgstr "Włącz to, jeżeli chcesz się zarejestrować na zdalnym serwerze."
+
+#~ msgid "Address of record:"
+#~ msgstr "Adres do rejestracji:"
+
+#~ msgid ""
+#~ "The password used for registration. On some servers it is not necessary"
+#~ msgstr "Hasło do rejestracji. Na niektórych serwerach nie jest wymagane"
+
+#~ msgid "Use this registrar server as outbound proxy."
+#~ msgstr "Użyj tego serwera rejestracji jako zewnętrznego proxy"
+
+#~ msgid "sip address:"
+#~ msgstr "Adres SIP:"
+
+#~ msgid "Modify"
+#~ msgstr "Zmień"
+
+#~ msgid "Registering..."
+#~ msgstr "Rejestruje..."
+
+#~ msgid ""
+#~ "You are currently using the i810_audio driver.\n"
+#~ "This driver is buggy and so does not work with Linphone.\n"
+#~ "We suggest that you replace it by its equivalent ALSA driver,\n"
+#~ "either with packages from your distribution, or by downloading\n"
+#~ "ALSA drivers at http://www.alsa-project.org."
+#~ msgstr ""
+#~ "Używasz sterownika i810_audio.\n"
+#~ "Ten sterownik ma błędy i nie działa z Linphone\n"
+#~ "Sugerujemy zmiane sterowników na ich odpowiedniki ALSA z pakietów Twojej "
+#~ "dystrybucji,\n"
+#~ "lub ze strony http://www.alsa-project.org/."
+
+#~ msgid "Unregistration successfull."
+#~ msgstr "Derejestracja powiodła się."
diff --git a/po/pt_BR.po b/po/pt_BR.po
new file mode 100644 (file)
index 0000000..b25b8b3
--- /dev/null
@@ -0,0 +1,1846 @@
+# Portuguese translations for gnomebaker package.
+# Copyright (C) 2005 THE linphone COPYRIGHT HOLDER
+# This file is distributed under the same license as the linphone package.
+# Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>, 2005.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: linphone-1.1.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-10-16 15:24+0200\n"
+"PO-Revision-Date: 2006-07-11 23:30+0200\n"
+"Last-Translator: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
+"Language-Team: pt_BR <pt_BR@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
+#: ../gtk-glade/support.c:102
+#, c-format
+msgid "Couldn't find pixmap file: %s"
+msgstr "Não é possível achar arquivo pixmap: %s"
+
+#: ../gtk-glade/chat.c:27
+#, c-format
+msgid "Chat with %s"
+msgstr "Bate-papo com %s"
+
+#: ../gtk-glade/main.c:90
+msgid "log to stdout some debug information while running."
+msgstr ""
+
+#: ../gtk-glade/main.c:97
+msgid "Start only in the system tray, do not show the main interface."
+msgstr ""
+
+#: ../gtk-glade/main.c:104
+msgid "address to call right now"
+msgstr ""
+
+#: ../gtk-glade/main.c:111
+msgid "if set automatically answer incoming calls"
+msgstr ""
+
+#: ../gtk-glade/main.c:119
+msgid ""
+"Specifiy a working directory (should be the base of the installation, eg: c:"
+"\\Program Files\\Linphone)"
+msgstr ""
+
+#: ../gtk-glade/main.c:675
+#, fuzzy, c-format
+msgid "Incoming call from %s"
+msgstr "Camadas recebidas"
+
+#: ../gtk-glade/main.c:707
+#, c-format
+msgid ""
+"%s would like to add you to his contact list.\n"
+"Would you allow him to see your presence status or add him to your contact "
+"list ?\n"
+"If you answer no, this person will be temporarily blacklisted."
+msgstr ""
+
+#: ../gtk-glade/main.c:777
+#, c-format
+msgid ""
+"Please enter your password for username <i>%s</i>\n"
+" at domain <i>%s</i>:"
+msgstr ""
+
+#: ../gtk-glade/main.c:871
+msgid "Website link"
+msgstr ""
+
+#: ../gtk-glade/main.c:907
+msgid "Linphone - a video internet phone"
+msgstr ""
+
+#: ../gtk-glade/main.c:926
+#, c-format
+msgid "%s (Default)"
+msgstr ""
+
+#: ../gtk-glade/main.c:1168
+msgid "A free SIP video-phone"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
+#: ../gtk-glade/contact.glade.h:3
+msgid "Name"
+msgstr "Nome"
+
+#: ../gtk-glade/friendlist.c:212
+msgid "Presence status"
+msgstr "Status de presença"
+
+#: ../gtk-glade/friendlist.c:243
+#, c-format
+msgid "Search in %s directory"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:432
+msgid "Invalid sip contact !"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:474
+#, fuzzy, c-format
+msgid "Call %s"
+msgstr "Histórico de chamadas"
+
+#: ../gtk-glade/friendlist.c:475
+#, c-format
+msgid "Send text to %s"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:476
+#, fuzzy, c-format
+msgid "Edit contact '%s'"
+msgstr "Edicar informação de contato"
+
+#: ../gtk-glade/friendlist.c:477
+#, c-format
+msgid "Delete contact '%s'"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:519
+#, c-format
+msgid "Add new contact from %s directory"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:251
+msgid "Rate (Hz)"
+msgstr "Taxa (Hz)"
+
+#: ../gtk-glade/propertybox.c:257
+msgid "Status"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:263
+msgid "Min bitrate (kbit/s)"
+msgstr "Bitrate mínimo (kbits/s)"
+
+#: ../gtk-glade/propertybox.c:269
+msgid "Parameters"
+msgstr "Parâmetros"
+
+#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
+msgid "Enabled"
+msgstr "Ativado"
+
+#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
+msgid "Disabled"
+msgstr "Desativado"
+
+#: ../gtk-glade/propertybox.c:480
+#, fuzzy
+msgid "Account"
+msgstr "Aceitar"
+
+#: ../gtk-glade/propertybox.c:620
+msgid "English"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:621
+msgid "French"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:622
+msgid "Swedish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:623
+msgid "Italian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:624
+msgid "Spanish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:625
+msgid "Brazilian Portugese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:626
+msgid "Polish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:627
+msgid "German"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:628
+msgid "Russian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:629
+msgid "Japanese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:630
+msgid "Dutch"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:631
+msgid "Hungarian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:632
+msgid "Czech"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:633
+msgid "Chinese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:690
+msgid ""
+"You need to restart linphone for the new language selection to take effect."
+msgstr ""
+
+#: ../gtk-glade/update.c:80
+#, c-format
+msgid ""
+"A more recent version is availalble from %s.\n"
+"Would you like to open a browser to download it ?"
+msgstr ""
+
+#: ../gtk-glade/update.c:91
+msgid "You are running the lastest version."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:66
+msgid "Firstname, Lastname"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:73
+#, fuzzy
+msgid "SIP address"
+msgstr "Endereço"
+
+#: ../gtk-glade/buddylookup.c:121
+msgid "Error communicating with server."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:125
+#, fuzzy
+msgid "Connecting..."
+msgstr "Contatando "
+
+#: ../gtk-glade/buddylookup.c:129
+#, fuzzy
+msgid "Connected"
+msgstr "Conectado."
+
+#: ../gtk-glade/buddylookup.c:133
+msgid "Receiving data..."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:141
+#, c-format
+msgid "Found %i contact"
+msgid_plural "Found %i contacts"
+msgstr[0] ""
+msgstr[1] ""
+
+#: ../gtk-glade/setupwizard.c:25
+msgid ""
+"Welcome !\n"
+"This assistant will help you to use a SIP account for your calls."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:34
+msgid "Create an account by choosing a username"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:35
+msgid "I have already an account and just want to use it"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:53
+msgid "Please choose a username:"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:54
+#, fuzzy
+msgid "Username:"
+msgstr "Usuário"
+
+#: ../gtk-glade/setupwizard.c:92
+#, c-format
+msgid "Checking if '%s' is available..."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
+msgid "Please wait..."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:101
+msgid "Sorry this username already exists. Please try a new one."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
+msgid "Ok !"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
+msgid "Communication problem, please try again later."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:134
+msgid "Thank you. Your account is now configured and ready for use."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:228
+msgid "Welcome to the account setup assistant"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:232
+msgid "Account setup assistant"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:236
+#, fuzzy
+msgid "Choosing a username"
+msgstr "Usuário"
+
+#: ../gtk-glade/setupwizard.c:240
+msgid "Verifying"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:244
+#, fuzzy
+msgid "Confirmation"
+msgstr "Informações"
+
+#: ../gtk-glade/setupwizard.c:249
+msgid "Creating your account"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:253
+msgid "Now ready !"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:98
+#, fuzzy
+msgid "<b>Calling...</b>"
+msgstr "Contatando "
+
+#: ../gtk-glade/incall_view.c:122
+#, fuzzy
+msgid "<b>In call with</b>"
+msgstr "Contatando "
+
+#: ../gtk-glade/incall_view.c:124
+msgid "00::00::00"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:140
+#, c-format
+msgid "%02i::%02i::%02i"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:158
+#, fuzzy
+msgid "<b>Call ended.</b>"
+msgstr "Chamada cancelada."
+
+#: ../gtk-glade/incall_view.c:176
+msgid "Unmute"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
+msgid "Mute"
+msgstr ""
+
+#: ../gtk-glade/loginframe.c:82
+#, c-format
+msgid "Please enter login information for %s"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:1
+msgid "#"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:2
+msgid "*"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:3
+msgid "0"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:4
+msgid "1"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:5
+msgid "2"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:6
+msgid "3"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:7
+msgid "4"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:8
+msgid "5"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:9
+msgid "6"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:10
+msgid "7"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:11
+msgid "8"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:12
+msgid "9"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:13
+#, fuzzy
+msgid "<b>Contact list</b>"
+msgstr "Contatando "
+
+#: ../gtk-glade/main.glade.h:14
+#, fuzzy
+msgid "<b>Terminate call</b>"
+msgstr "Contatando "
+
+#: ../gtk-glade/main.glade.h:15
+#, fuzzy
+msgid "<b>Welcome !</b>"
+msgstr "Contatando "
+
+#: ../gtk-glade/main.glade.h:16
+msgid "A"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:17
+msgid ""
+"ADSL\n"
+"Fiber Channel"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:19
+msgid ""
+"All users\n"
+"Online users"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:21
+msgid "Assistant"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:22
+#, fuzzy
+msgid "Audio & Video"
+msgstr "Codec's de áudio"
+
+#: ../gtk-glade/main.glade.h:23
+#, fuzzy
+msgid "Audio only"
+msgstr "Codec's de áudio"
+
+#: ../gtk-glade/main.glade.h:24
+#, fuzzy
+msgid "Automatically log me in"
+msgstr "Adquirir automaticamente um nome de servidor válido."
+
+#: ../gtk-glade/main.glade.h:25
+msgid "B"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
+msgid "C"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:27
+msgid "Check for updates"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:28
+msgid "D"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:29
+msgid "Default"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:30
+msgid "Digits"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:31
+#, fuzzy
+msgid "Duration"
+msgstr "Informações"
+
+#: ../gtk-glade/main.glade.h:32
+#, fuzzy
+msgid "Duration:"
+msgstr "Informações"
+
+#: ../gtk-glade/main.glade.h:33
+#, fuzzy
+msgid "Enable self-view"
+msgstr "Ativado"
+
+#: ../gtk-glade/main.glade.h:34
+msgid "Enter username, phone number, or full sip address"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:35
+#, fuzzy
+msgid "In call"
+msgstr "Camadas recebidas"
+
+#: ../gtk-glade/main.glade.h:36
+msgid "Internet connection:"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:37
+#, fuzzy
+msgid "Login information"
+msgstr "Informação de contato"
+
+#: ../gtk-glade/main.glade.h:38
+msgid "Lookup:"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:39
+msgid "Main view"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:41
+#, fuzzy
+msgid "My current identity:"
+msgstr "Identificação SIP:"
+
+#: ../gtk-glade/main.glade.h:42
+#, fuzzy
+msgid "Password"
+msgstr "Senha:"
+
+#: ../gtk-glade/main.glade.h:43
+msgid "SIP address or phone number:"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:44
+msgid "Show current call"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:45
+msgid "Start call"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:46
+msgid "Terminate call"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:47
+#, fuzzy
+msgid "Username"
+msgstr "Usuário"
+
+#: ../gtk-glade/main.glade.h:48
+msgid "_Linphone"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:49
+msgid "_Modes"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:50
+#, fuzzy
+msgid "gtk-connect"
+msgstr "Conectado."
+
+#: ../gtk-glade/main.glade.h:51
+msgid "gtk-find"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:52
+msgid "in"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:53
+msgid "label"
+msgstr ""
+
+#: ../gtk-glade/about.glade.h:1
+msgid "About linphone"
+msgstr ""
+
+#: ../gtk-glade/about.glade.h:2
+msgid "An internet video phone using the standart SIP (rfc3261) protocol."
+msgstr ""
+
+#: ../gtk-glade/about.glade.h:3
+msgid "Created by Simon Morlat\n"
+msgstr ""
+
+#: ../gtk-glade/about.glade.h:5
+msgid ""
+"fr: Simon Morlat\n"
+"en: Simon Morlat and Delphine Perreau\n"
+"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
+"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
+"sv: Daniel Nylander <po@danielnylander.se>\n"
+"es: Jesus Benitez <gnelson at inMail dot sk>\n"
+"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
+"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
+"pl: Robert Nasiadek <darkone@darkone.pl>\n"
+"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
+"hu: anonymous\n"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:1
+#, fuzzy
+msgid "<b>Contact information</b>"
+msgstr "Informação de contato"
+
+#: ../gtk-glade/contact.glade.h:2
+msgid "Allow this contact to see my presence status"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:4
+#, fuzzy
+msgid "SIP Address"
+msgstr "Endereço"
+
+#: ../gtk-glade/contact.glade.h:5
+msgid "Show this contact presence status"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
+#: ../gtk-glade/sip_account.glade.h:9
+msgid "gtk-cancel"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
+#: ../gtk-glade/sip_account.glade.h:10
+msgid "gtk-ok"
+msgstr ""
+
+#: ../gtk-glade/log.glade.h:1
+msgid "Linphone debug window"
+msgstr ""
+
+#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
+#: ../gtk-glade/chatroom.glade.h:2
+msgid "gtk-close"
+msgstr ""
+
+#: ../gtk-glade/password.glade.h:1
+#, fuzzy
+msgid "Linphone - Authentication required"
+msgstr "Autenticação requerida"
+
+#: ../gtk-glade/password.glade.h:2
+#, fuzzy
+msgid "Password:"
+msgstr "Senha:"
+
+#: ../gtk-glade/password.glade.h:3
+msgid "Please enter the domain password"
+msgstr ""
+
+#: ../gtk-glade/password.glade.h:4
+msgid "UserID"
+msgstr ""
+
+#: ../gtk-glade/call_logs.glade.h:1
+#, fuzzy
+msgid "Call history"
+msgstr "Linphone - Histórico de chamadas"
+
+#: ../gtk-glade/sip_account.glade.h:1
+msgid "Configure a SIP account"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:2
+msgid "Linphone - Configure a SIP account"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:3
+#, fuzzy
+msgid "Publish presence information"
+msgstr "Informar informação de presença"
+
+#: ../gtk-glade/sip_account.glade.h:4
+msgid "Register at startup"
+msgstr ""
+
+#: ../gtk-glade/sip_account.glade.h:5
+#, fuzzy
+msgid "Registration duration (sec):"
+msgstr "Período do registo:"
+
+#: ../gtk-glade/sip_account.glade.h:6
+msgid "Route (optional):"
+msgstr "Rota (opcional):"
+
+#: ../gtk-glade/sip_account.glade.h:7
+#, fuzzy
+msgid "SIP Proxy address:"
+msgstr "Proxy SIP:"
+
+#: ../gtk-glade/sip_account.glade.h:8
+#, fuzzy
+msgid "Your SIP identity:"
+msgstr "Identificação SIP:"
+
+#: ../gtk-glade/sip_account.glade.h:11
+msgid "sip:"
+msgstr ""
+
+#: ../gtk-glade/chatroom.glade.h:1
+#, fuzzy
+msgid "Send"
+msgstr "Som"
+
+#: ../gtk-glade/incoming_call.glade.h:1
+msgid "Accept"
+msgstr "Aceitar"
+
+#: ../gtk-glade/incoming_call.glade.h:2
+#, fuzzy
+msgid "Decline"
+msgstr "linha"
+
+#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
+msgid "Incoming call"
+msgstr "Camadas recebidas"
+
+#: ../gtk-glade/incoming_call.glade.h:4
+#, fuzzy
+msgid "Incoming call from"
+msgstr "Camadas recebidas"
+
+#: ../gtk-glade/incoming_call.glade.h:5
+#, fuzzy
+msgid "Linphone - Incoming call"
+msgstr "Camadas recebidas"
+
+#: ../gtk-glade/parameters.glade.h:1
+msgid "0 stands for \"unlimited\""
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:2
+#, fuzzy
+msgid "<b>Audio</b>"
+msgstr "Contatando "
+
+#: ../gtk-glade/parameters.glade.h:3
+msgid "<b>Bandwidth control</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:4
+#, fuzzy
+msgid "<b>Codecs</b>"
+msgstr "Contatando "
+
+#: ../gtk-glade/parameters.glade.h:5
+msgid "<b>Default identity</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:6
+msgid "<b>Language</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:7
+msgid "<b>NAT and Firewall</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:8
+#, fuzzy
+msgid "<b>Ports</b>"
+msgstr "Contatando "
+
+#: ../gtk-glade/parameters.glade.h:9
+msgid "<b>Privacy</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:10
+#, fuzzy
+msgid "<b>Proxy accounts</b>"
+msgstr "Contatando "
+
+#: ../gtk-glade/parameters.glade.h:11
+#, fuzzy
+msgid "<b>Transport</b>"
+msgstr "Contatando "
+
+#: ../gtk-glade/parameters.glade.h:12
+msgid "<b>Video</b>"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:13
+msgid "ALSA special device (optional):"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:14
+#, fuzzy
+msgid "Add"
+msgstr "Endereço"
+
+#: ../gtk-glade/parameters.glade.h:15
+msgid "Audio RTP/UDP:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:16
+#, fuzzy
+msgid ""
+"Audio codecs\n"
+"Video codecs"
+msgstr "Codec's de áudio"
+
+#: ../gtk-glade/parameters.glade.h:18
+msgid "Behind NAT / Firewall (specify gateway IP below)"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:19
+msgid "Behind NAT / Firewall (use STUN to resolve)"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:21
+msgid "CIF"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:22
+#, fuzzy
+msgid "Capture device:"
+msgstr "Dispositivo de captura de som:"
+
+#: ../gtk-glade/parameters.glade.h:23
+#, fuzzy
+msgid "Codecs"
+msgstr "Codec's de áudio"
+
+#: ../gtk-glade/parameters.glade.h:24
+msgid "Direct connection to the Internet"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:25
+msgid "Disable"
+msgstr "Desativar"
+
+#: ../gtk-glade/parameters.glade.h:26
+#, fuzzy
+msgid "Done"
+msgstr "Nenhum"
+
+#: ../gtk-glade/parameters.glade.h:27
+msgid "Download speed limit in Kbit/sec:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:28
+msgid "Edit"
+msgstr "Editar"
+
+#: ../gtk-glade/parameters.glade.h:29
+msgid "Enable"
+msgstr "Ativado"
+
+#: ../gtk-glade/parameters.glade.h:30
+msgid "Enable echo cancellation"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:31
+msgid "Erase all passwords"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:32
+msgid "Manage SIP Accounts"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:33
+msgid "Multimedia settings"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:34
+#, fuzzy
+msgid "Network settings"
+msgstr "Rede"
+
+#: ../gtk-glade/parameters.glade.h:35
+#, fuzzy
+msgid "Playback device:"
+msgstr "Dispositivo de som:"
+
+#: ../gtk-glade/parameters.glade.h:36
+msgid "Prefered video resolution:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:37
+#, fuzzy
+msgid "Public IP address:"
+msgstr "Endereço sip:"
+
+#: ../gtk-glade/parameters.glade.h:38
+msgid ""
+"Register to FONICS\n"
+"virtual network !"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:40
+msgid "Remove"
+msgstr "Remover"
+
+#: ../gtk-glade/parameters.glade.h:41
+#, fuzzy
+msgid "Ring device:"
+msgstr "Dispositivo de som"
+
+#: ../gtk-glade/parameters.glade.h:42
+#, fuzzy
+msgid "Ring sound:"
+msgstr "Som do toque:"
+
+#: ../gtk-glade/parameters.glade.h:43
+msgid "SIP (UDP):"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:44
+msgid "Send DTMFs as SIP info"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:45
+msgid "Set Maximum Transmission Unit:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:46
+msgid "Settings"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:47
+#, fuzzy
+msgid "Stun server:"
+msgstr "Dispositivo de som"
+
+#: ../gtk-glade/parameters.glade.h:48
+msgid "This section defines your SIP address when not using a SIP account"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:49
+msgid "Upload speed limit in Kbit/sec:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:50
+msgid "Use IPv6 instead of IPv4"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:51
+#, fuzzy
+msgid "User interface"
+msgstr "Usuário"
+
+#: ../gtk-glade/parameters.glade.h:52
+msgid "Video RTP/UDP:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:53
+#, fuzzy
+msgid "Video input device:"
+msgstr "Dispositivo de som"
+
+#: ../gtk-glade/parameters.glade.h:54
+msgid "Your display name (eg: John Doe):"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:55
+#, fuzzy
+msgid "Your resulting SIP address:"
+msgstr "Seu endereço SIP:"
+
+#: ../gtk-glade/parameters.glade.h:56
+#, fuzzy
+msgid "Your username:"
+msgstr "Usuário"
+
+#: ../gtk-glade/parameters.glade.h:57
+msgid "a sound card\n"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:59
+msgid "default camera"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:60
+msgid "default soundcard"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:61
+msgid "default soundcard\n"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:63
+msgid "gtk-go-down"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:64
+msgid "gtk-go-up"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:65
+msgid "gtk-media-play"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:1
+msgid "<b>Search somebody</b>"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:2
+msgid "Add to my list"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:3
+msgid "Search contacts in directory"
+msgstr ""
+
+#: ../gtk-glade/waiting.glade.h:1
+msgid "Linphone"
+msgstr ""
+
+#: ../gtk-glade/waiting.glade.h:2
+msgid "Please wait"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:195
+#, fuzzy, c-format
+msgid "You have missed %i call."
+msgid_plural "You have missed %i calls."
+msgstr[0] "Você perdeu %i ligação(ões)."
+msgstr[1] "Você perdeu %i ligação(ões)."
+
+#: ../coreapi/linphonecore.c:223
+msgid "aborted"
+msgstr "Abortado"
+
+#: ../coreapi/linphonecore.c:226
+msgid "completed"
+msgstr "Competado"
+
+#: ../coreapi/linphonecore.c:229
+msgid "missed"
+msgstr "Perdido"
+
+#: ../coreapi/linphonecore.c:234
+#, fuzzy, c-format
+msgid ""
+"%s at %s\n"
+"From: %s\n"
+"To: %s\n"
+"Status: %s\n"
+"Duration: %i mn %i sec\n"
+msgstr ""
+"%s em %sDe: %s\n"
+"Para: %s\n"
+"Status: %s\n"
+"Duração: %i min %i seg\n"
+
+#: ../coreapi/linphonecore.c:235
+msgid "Outgoing call"
+msgstr "Chamadas efetuadas"
+
+#: ../coreapi/linphonecore.c:445
+msgid ""
+"Your machine appears to be connected to an IPv6 network. By default linphone "
+"always uses IPv4. Please update your configuration if you want to use IPv6"
+msgstr ""
+"Sua máquina aparentemente está conectada em uma rede IPv6. Por padrão o "
+"linphone sempre usa IPv4. Por favor atualize sua configuração se deseja usar "
+"IPv6"
+
+#: ../coreapi/linphonecore.c:739
+#, fuzzy
+msgid "Ready"
+msgstr "Pronto."
+
+#: ../coreapi/linphonecore.c:1014
+msgid "Remote end seems to have disconnected, the call is going to be closed."
+msgstr ""
+
+#: ../coreapi/linphonecore.c:1172
+msgid "Looking for telephone number destination..."
+msgstr "Procurando por telefone de destino..."
+
+#: ../coreapi/linphonecore.c:1174
+msgid "Could not resolve this number."
+msgstr "Não foi possível encontrar este número."
+
+#: ../coreapi/linphonecore.c:1239
+msgid ""
+"Could not parse given sip address. A sip url usually looks like sip:"
+"user@domain"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:1340
+msgid "Sorry, having multiple simultaneous calls is not supported yet !"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:1387
+#, fuzzy
+msgid "Contacting"
+msgstr "Contatando "
+
+#: ../coreapi/linphonecore.c:1402
+msgid "could not call"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
+msgid "Connected."
+msgstr "Conectado."
+
+#: ../coreapi/linphonecore.c:1813
+#, fuzzy
+msgid "Call ended"
+msgstr "Chamada cancelada."
+
+#: ../coreapi/linphonecore.c:2175
+msgid "No nat/firewall address supplied !"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
+#, c-format
+msgid "Invalid nat address '%s' : %s"
+msgstr ""
+
+#: ../coreapi/misc.c:134
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the pcm oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+"'modprobe snd-pcm-oss' as root to load it."
+msgstr ""
+
+#: ../coreapi/misc.c:137
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the mixer oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+" 'modprobe snd-mixer-oss' as root to load it."
+msgstr ""
+
+#: ../coreapi/misc.c:610
+msgid "Stun lookup in progress..."
+msgstr ""
+
+#: ../coreapi/exevents.c:127
+msgid "Call terminated."
+msgstr ""
+
+#: ../coreapi/exevents.c:149
+msgid "Could not reach destination."
+msgstr "Não foi possível alcançar o detino."
+
+#: ../coreapi/exevents.c:158
+msgid "User is busy."
+msgstr "Usuário está ocupado."
+
+#: ../coreapi/exevents.c:159
+msgid "User is temporarily unavailable."
+msgstr "Usuário está temporáriamente indisponível."
+
+#: ../coreapi/exevents.c:160
+msgid "Request Cancelled."
+msgstr "Pedido cancelado."
+
+#. char *retrymsg=_("%s. Retry after %i minute(s).");
+#: ../coreapi/exevents.c:162
+msgid "User does not want to be disturbed."
+msgstr ""
+
+#: ../coreapi/exevents.c:163
+msgid "Call declined."
+msgstr ""
+
+#: ../coreapi/exevents.c:191
+msgid "Bad request"
+msgstr ""
+
+#: ../coreapi/exevents.c:194
+msgid "User cannot be found at given address."
+msgstr "Usuário não pode ser encontrado no endereço especificado."
+
+#: ../coreapi/exevents.c:197
+msgid "Remote user cannot support any of proposed codecs."
+msgstr ""
+
+#. time out, call leg is lost
+#: ../coreapi/exevents.c:227
+msgid "Timeout."
+msgstr "Tempo esgotado."
+
+#: ../coreapi/exevents.c:230
+msgid "Remote host was found but refused connection."
+msgstr "Servidor de destino encontrado, porém recusou a conexão."
+
+#: ../coreapi/exevents.c:339
+#, fuzzy
+msgid "is contacting you."
+msgstr "está chamado você."
+
+#: ../coreapi/exevents.c:424
+#, c-format
+msgid "Redirected to %s..."
+msgstr "Redirecionado para %s..."
+
+#: ../coreapi/exevents.c:440
+msgid ""
+"User is not reachable at the moment but he invites you\n"
+"to contact him using the following alternate resource:"
+msgstr ""
+
+#: ../coreapi/exevents.c:861
+msgid "Early media."
+msgstr ""
+
+#: ../coreapi/exevents.c:972
+#, fuzzy, c-format
+msgid "Registration on %s failed: %s"
+msgstr "Registro falhou (tempo esgotado)."
+
+#: ../coreapi/exevents.c:972
+msgid "no response timeout"
+msgstr ""
+
+#: ../coreapi/exevents.c:998
+#, fuzzy, c-format
+msgid "Registration on %s successful."
+msgstr "Registro em %s efetuado."
+
+#: ../coreapi/exevents.c:999
+#, fuzzy, c-format
+msgid "Unregistration on %s done."
+msgstr "Registro em %s efetuado."
+
+#. people for which we don't have yet an answer should appear as offline
+#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
+#, fuzzy
+msgid "Gone"
+msgstr "Nenhum"
+
+#: ../coreapi/presence.c:129
+msgid "Waiting for Approval"
+msgstr ""
+
+#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
+#, fuzzy
+msgid "Online"
+msgstr "linha"
+
+#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
+msgid "Busy"
+msgstr ""
+
+#: ../coreapi/presence.c:142
+msgid "Be Right Back"
+msgstr ""
+
+#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
+msgid "Away"
+msgstr "Ocupado"
+
+#: ../coreapi/presence.c:151
+msgid "On The Phone"
+msgstr ""
+
+#: ../coreapi/presence.c:156
+msgid "Out To Lunch"
+msgstr ""
+
+#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
+msgid "Closed"
+msgstr ""
+
+#: ../coreapi/friend.c:35
+msgid "Unknown"
+msgstr ""
+
+#: ../coreapi/friend.c:44
+msgid "Be right back"
+msgstr ""
+
+#: ../coreapi/friend.c:50
+msgid "On the phone"
+msgstr ""
+
+#: ../coreapi/friend.c:53
+msgid "Out to lunch"
+msgstr ""
+
+#: ../coreapi/friend.c:56
+msgid "Do not disturb"
+msgstr "Não perturbe"
+
+#: ../coreapi/friend.c:59
+msgid "Moved"
+msgstr ""
+
+#: ../coreapi/friend.c:62
+msgid "Using another messaging service"
+msgstr ""
+
+#: ../coreapi/friend.c:65
+#, fuzzy
+msgid "Offline"
+msgstr "linha"
+
+#: ../coreapi/friend.c:68
+msgid "Pending"
+msgstr ""
+
+#: ../coreapi/friend.c:74
+msgid "Unknown-bug"
+msgstr ""
+
+#: ../coreapi/proxy.c:221
+msgid ""
+"The sip proxy address you entered is invalid, it must start with \"sip:\" "
+"followed by a hostname."
+msgstr ""
+
+#: ../coreapi/proxy.c:227
+msgid ""
+"The sip identity you entered is invalid.\n"
+"It should look like sip:username@proxydomain, such as sip:alice@example.net"
+msgstr ""
+
+#: ../coreapi/proxy.c:634
+#, fuzzy, c-format
+msgid "Could not login as %s"
+msgstr "Não é possível achar arquivo pixmap: %s"
+
+#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
+msgid "ITU-G.711 alaw encoder"
+msgstr ""
+
+#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
+msgid "ITU-G.711 alaw decoder"
+msgstr ""
+
+#: ../mediastreamer2/src/alsa.c:923
+msgid "Alsa sound source"
+msgstr ""
+
+#: ../mediastreamer2/src/alsa.c:1027
+msgid "Alsa sound output"
+msgstr ""
+
+#: ../mediastreamer2/src/aqsnd.c:891
+msgid "Sound capture filter for MacOS X Audio Queue Service"
+msgstr ""
+
+#: ../mediastreamer2/src/aqsnd.c:915
+msgid "Sound playback filter for MacOS X Audio Queue Service"
+msgstr ""
+
+#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
+msgid "DTMF generator"
+msgstr ""
+
+#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
+msgid "The GSM full-rate codec"
+msgstr ""
+
+#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
+msgid "The GSM codec"
+msgstr ""
+
+#: ../mediastreamer2/src/macsnd.c:670
+msgid "Sound capture filter for MacOS X Core Audio drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/macsnd.c:684
+msgid "Sound playback filter for MacOS X Core Audio drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
+msgid "A filter to make conferencing"
+msgstr ""
+
+#: ../mediastreamer2/src/msfileplayer.c:295
+#: ../mediastreamer2/src/msfileplayer.c:313
+msgid "Raw files and wav reader"
+msgstr ""
+
+#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
+#: ../mediastreamer2/src/msfilerec_win.c:216
+#: ../mediastreamer2/src/msfilerec_win.c:234
+msgid "Wav file recorder"
+msgstr ""
+
+#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
+msgid "A filter that send several inputs to one output."
+msgstr ""
+
+#: ../mediastreamer2/src/msresample.c:221
+#: ../mediastreamer2/src/msresample.c:239
+msgid "frequency resampler"
+msgstr ""
+
+#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
+msgid "RTP output filter"
+msgstr ""
+
+#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
+msgid "RTP input filter"
+msgstr ""
+
+#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
+#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
+msgid "The free and wonderful speex codec"
+msgstr ""
+
+#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
+msgid "A filter that controls and measure sound volume"
+msgstr ""
+
+#: ../mediastreamer2/src/msv4l.c:1009
+msgid "A video4linux compatible source filter to stream pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/msv4l2.c:458
+msgid "A filter to grab pictures from Video4Linux2-powered cameras"
+msgstr ""
+
+#: ../mediastreamer2/src/nowebcam.c:1780
+msgid "A filter that outputs a static image."
+msgstr ""
+
+#: ../mediastreamer2/src/oss.c:567
+msgid "Sound capture filter for OSS drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/oss.c:581
+msgid "Sound playback filter for OSS drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
+msgid "A pixel format converter"
+msgstr ""
+
+#: ../mediastreamer2/src/sizeconv.c:204
+msgid "A video size converter"
+msgstr ""
+
+#: ../mediastreamer2/src/sizeconv.c:222
+msgid "a small video size converter"
+msgstr ""
+
+#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
+msgid "Echo canceler using speex library"
+msgstr ""
+
+#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
+msgid "A filter that reads from input and copy to its multiple outputs."
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:375
+msgid "The theora video encoder from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:393
+msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
+msgid "The theora video decoder from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
+msgid "ITU-G.711 ulaw encoder"
+msgstr ""
+
+#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
+msgid "ITU-G.711 ulaw decoder"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
+#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
+msgid "A H.263 decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:688
+msgid "A MPEG4 decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:704
+msgid "A RTP/JPEG decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:720
+msgid "A MJPEG decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:736
+msgid "A snow decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
+msgid "A video H.263 encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:856
+msgid ""
+"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
+"spec."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
+msgid "A video MPEG4 encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:888
+msgid "A video snow encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:904
+msgid "A RTP/MJPEG encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:938
+msgid ""
+"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:970
+msgid ""
+"The snow codec is royalty-free and is open-source. \n"
+"It uses innovative techniques that makes it one of most promising video "
+"codec. It is implemented within the ffmpeg project.\n"
+"However it is under development, quite unstable and compatibility with other "
+"versions cannot be guaranteed."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:990
+msgid "A MJPEG encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
+msgid "A generic video display"
+msgstr ""
+
+#: ../mediastreamer2/src/wincevideods.c:966
+#: ../mediastreamer2/src/wincevideods.c:984
+#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
+#: ../mediastreamer2/src/winvideods.c:1306
+#: ../mediastreamer2/src/winvideods.c:1324
+msgid "A video4windows compatible source filter to stream pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
+msgid "A video for windows (vfw.h) based source filter to grab pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
+msgid "ICE filter"
+msgstr ""
+
+#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
+msgid "A filter that trashes its input (useful for terminating some graphs)."
+msgstr ""
+
+#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
+msgid "Parametric sound equalizer."
+msgstr ""
+
+#: ../mediastreamer2/src/msdscap-mingw.cc:1003
+msgid "A webcam grabber based on directshow."
+msgstr ""
+
+#, fuzzy
+#~ msgid "_Properties"
+#~ msgstr "Propriedades RTP:"
+
+#, fuzzy
+#~ msgid "Show logs"
+#~ msgstr "Exibir chamadas"
+
+#, fuzzy
+#~ msgid "_About"
+#~ msgstr "Aceitar"
+
+#, fuzzy
+#~ msgid "gtk-remove"
+#~ msgstr "Remover"
+
+#, fuzzy
+#~ msgid "Proxy in use"
+#~ msgstr "Proxy à usar:"
+
+#~ msgid "Sound"
+#~ msgstr "Som"
+
+#, fuzzy
+#~ msgid "Default identity"
+#~ msgstr "Identificação SIP:"
+
+#, fuzzy
+#~ msgid "Proxy accounts"
+#~ msgstr "Proxy à usar:"
+
+#~ msgid "Go"
+#~ msgstr "Ir"
+
+#~ msgid "Address book"
+#~ msgstr "Catálogo de endereços"
+
+#, fuzzy
+#~ msgid "Exit"
+#~ msgstr "Editar"
+
+#~ msgid "Shows the address book"
+#~ msgstr "Exibe o catálogo de endereços"
+
+#~ msgid ""
+#~ "Call or\n"
+#~ "answer"
+#~ msgstr ""
+#~ "Ligar ou\n"
+#~ "atender"
+
+#~ msgid ""
+#~ "Hangup\n"
+#~ "or refuse"
+#~ msgstr ""
+#~ "Desligar\n"
+#~ "ou recusar"
+
+#~ msgid "Or chat !"
+#~ msgstr "Ou bate-papo!"
+
+#~ msgid "Show more..."
+#~ msgstr "Exibir mais..."
+
+#~ msgid "Playback level:"
+#~ msgstr "Volume do auto-falante:"
+
+#~ msgid "Recording level:"
+#~ msgstr "Volume do microfone:"
+
+#, fuzzy
+#~ msgid "Ring level:"
+#~ msgstr "Volume do microfone:"
+
+#~ msgid "Busy, I'll be back in "
+#~ msgstr "Ocupado, volto em "
+
+#~ msgid "mn"
+#~ msgstr "min"
+
+#~ msgid "Moved temporarily"
+#~ msgstr "Movido temporáriamente"
+
+#~ msgid "Alternative service"
+#~ msgstr "Serviço alternativo"
+
+#~ msgid "Presence"
+#~ msgstr "Presença"
+
+#~ msgid "My online friends"
+#~ msgstr "Meus amigos online"
+
+#~ msgid ""
+#~ "Linphone is a web-phone.\n"
+#~ "It is compatible with SIP and RTP protocols."
+#~ msgstr ""
+#~ "Linphone é um web-fone.\n"
+#~ "Ele é compatível com os protocolos SIP e RTP."
+
+#~ msgid "Use IPv6 network (if available)"
+#~ msgstr "Usar rede IPv6 (se disponível)"
+
+#~ msgid ""
+#~ "Toggle this if you are on an ipv6 network and you wish linphone to use it."
+#~ msgstr ""
+#~ "Marque isto se você estiver em uma rede IPv6, e deseja que o linphone "
+#~ "este protocolo."
+
+#, fuzzy
+#~ msgid ""
+#~ "These options is only for users in a private network, behind a gateway. "
+#~ "If you are not in this situation, then leave this empty."
+#~ msgstr ""
+#~ "Esta opção é somente para usuários de uma rede privada, atrás de um "
+#~ "gateway. Se você não está nesta situação, deixe isto em braco."
+
+#~ msgid "NAT traversal options (experimental)"
+#~ msgstr "Opções de NAT(Experimental)"
+
+#~ msgid "Number of buffered miliseconds (jitter compensation):"
+#~ msgstr "Número de segundos em bueffer:"
+
+#~ msgid "RTP port used for audio:"
+#~ msgstr "Porta RTP usada para audio:"
+
+#~ msgid "Use SIP INFO message instead of RTP rfc2833 for DTMF transmitting"
+#~ msgstr ""
+#~ "Usar mensagem SIP INFO em vez de RTP rfc2833 para transmissão de DTMF"
+
+#~ msgid "RTP-RFC2833 is the recommended way."
+#~ msgstr "RTP-RFC2833 é a maneira recomendada."
+
+#~ msgid "Other"
+#~ msgstr "Outro"
+
+#~ msgid "micro"
+#~ msgstr "microfone"
+
+#~ msgid "Recording source:"
+#~ msgstr "Origem de gravação:"
+
+#~ msgid "Listen"
+#~ msgstr "Escutar"
+
+#~ msgid "Sound properties"
+#~ msgstr "Propriedades de som"
+
+#~ msgid "Run sip user agent on port:"
+#~ msgstr "Executar agente sip na porta:"
+
+#~ msgid "It is strongly recommended to use port 5060."
+#~ msgstr "É altamente recomendavel usar a porta 5060."
+
+#~ msgid "SIP port"
+#~ msgstr "Porta SIP"
+
+#~ msgid "Identity"
+#~ msgstr "Identificação"
+
+#~ msgid "Add proxy/registrar"
+#~ msgstr "Adicionar proxy/registrador"
+
+#~ msgid "Remote services"
+#~ msgstr "Serviços remotos"
+
+#~ msgid "Clear all stored authentication information (username,password...)"
+#~ msgstr ""
+#~ "Limpar todas as informações de autenticação (nomes de usuário, senha...)"
+
+#~ msgid "Authentication information"
+#~ msgstr "Informações de autenticação"
+
+#~ msgid "List of audio codecs, in order of preference:"
+#~ msgstr "Lista de codecs de audio, em ordem de preferência:"
+
+#~ msgid "No information availlable"
+#~ msgstr "Informações não disponíveis"
+
+#~ msgid "Codec information"
+#~ msgstr "Informações sobre o codec"
+
+#~ msgid "Address Book"
+#~ msgstr "Catálogo de endereços"
+
+#~ msgid "Select"
+#~ msgstr "Selecionar"
+
+#~ msgid "None."
+#~ msgstr "Nenhum"
+
+#~ msgid "Proxy/Registrar configuration box"
+#~ msgstr "Configuração de proxy/registrador"
+
+#~ msgid "Send registration:"
+#~ msgstr "Enviar registro:"
+
+#~ msgid "Name:"
+#~ msgstr "Nome:"
+
+#~ msgid "Refuse"
+#~ msgstr "Recusar"
+
+#~ msgid "userid:"
+#~ msgstr "Identificação:"
+
+#~ msgid "Chat Room"
+#~ msgstr "Sala de bate-papo"
+
+#~ msgid "Text:"
+#~ msgstr "Texto:"
+
+#~ msgid "linphone - receiving call from %s"
+#~ msgstr "Linphone - Recebendo chamada de %s"
+
+#~ msgid "None"
+#~ msgstr "Nenhum"
+
+#~ msgid "User manual"
+#~ msgstr "Manual do usuário"
+
+#~ msgid "Ring sound selection"
+#~ msgstr "Seleção de toque"
+
+#~ msgid "Communication ended."
+#~ msgstr "Comunicação encerrada."
+
+#~ msgid "Firewall 's external ip address (in dot notations):"
+#~ msgstr "Endereço externo do firewall:"
+
+#~ msgid "Index"
+#~ msgstr "Índice"
+
+#~ msgid "Server address"
+#~ msgstr "Endereço do servidor"
+
+#~ msgid "28k modem"
+#~ msgstr "Modem 28k"
+
+#~ msgid "56k modem"
+#~ msgstr "Modem 56l"
+
+#~ msgid "64k modem (numeris)"
+#~ msgstr "Modem 64k"
+
+#~ msgid "ADSL or Cable modem"
+#~ msgstr "ADSL ou Cable modem"
+
+#~ msgid "Ethernet or equivalent"
+#~ msgstr "Ethernet ou equivalente"
+
+#~ msgid "Connection type:"
+#~ msgstr "Tipo de conexão:"
+
+#~ msgid ""
+#~ "Linphone could not open audio device %s. Check if your sound card is "
+#~ "fully configured and working."
+#~ msgstr ""
+#~ "Linphone não pode abrir dispositivo de áudio %s. Verifique se sua placa "
+#~ "de som está configurada e funcionando."
+
+#~ msgid "Type here the sip address of the person you want to call."
+#~ msgstr "Escreva aqui o endereço sip da pessoa que você quer ligar."
diff --git a/po/quot.sed b/po/quot.sed
new file mode 100644 (file)
index 0000000..0122c46
--- /dev/null
@@ -0,0 +1,6 @@
+s/"\([^"]*\)"/“\1”/g
+s/`\([^`']*\)'/‘\1’/g
+s/ '\([^`']*\)' / ‘\1’ /g
+s/ '\([^`']*\)'$/ ‘\1’/g
+s/^'\([^`']*\)' /‘\1’ /g
+s/“”/""/g
diff --git a/po/remove-potcdate.sin b/po/remove-potcdate.sin
new file mode 100644 (file)
index 0000000..2436c49
--- /dev/null
@@ -0,0 +1,19 @@
+# Sed script that remove the POT-Creation-Date line in the header entry
+# from a POT file.
+#
+# The distinction between the first and the following occurrences of the
+# pattern is achieved by looking at the hold space.
+/^"POT-Creation-Date: .*"$/{
+x
+# Test if the hold space is empty.
+s/P/P/
+ta
+# Yes it was empty. First occurrence. Remove the line.
+g
+d
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
diff --git a/po/ru.po b/po/ru.po
new file mode 100644 (file)
index 0000000..669a5a9
--- /dev/null
+++ b/po/ru.po
@@ -0,0 +1,2266 @@
+# SIP Telephony Application.
+# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Simon Morlat <linphone@free.fr>, 2001.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: linphone 0.7.1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-10-16 15:24+0200\n"
+"PO-Revision-Date: 2008-11-25 18:39+0300\n"
+"Last-Translator: Grigory Fateyev <greg@dial.com.ru>\n"
+"Language-Team: Russian <greg@dial.com.ru>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
+#: ../gtk-glade/support.c:102
+#, c-format
+msgid "Couldn't find pixmap file: %s"
+msgstr "Невозможно найти картинку: %s"
+
+#: ../gtk-glade/chat.c:27
+#, c-format
+msgid "Chat with %s"
+msgstr "Чат с %s"
+
+#: ../gtk-glade/main.c:90
+msgid "log to stdout some debug information while running."
+msgstr ""
+
+#: ../gtk-glade/main.c:97
+msgid "Start only in the system tray, do not show the main interface."
+msgstr ""
+
+#: ../gtk-glade/main.c:104
+msgid "address to call right now"
+msgstr ""
+
+#: ../gtk-glade/main.c:111
+msgid "if set automatically answer incoming calls"
+msgstr ""
+
+#: ../gtk-glade/main.c:119
+msgid ""
+"Specifiy a working directory (should be the base of the installation, eg: c:"
+"\\Program Files\\Linphone)"
+msgstr ""
+
+#: ../gtk-glade/main.c:675
+#, c-format
+msgid "Incoming call from %s"
+msgstr "Входящий звонок %s"
+
+#: ../gtk-glade/main.c:707
+#, c-format
+msgid ""
+"%s would like to add you to his contact list.\n"
+"Would you allow him to see your presence status or add him to your contact "
+"list ?\n"
+"If you answer no, this person will be temporarily blacklisted."
+msgstr ""
+"%s вы бы хотели быть добавленным в этот контактный лист.\n"
+"Вы разрешаете ему(ей) видеть ваш статус присутствия или добавить в "
+"контактный лист?\n"
+"Если вы ответите Нет, эта персона будет временно заблокированна."
+
+#: ../gtk-glade/main.c:777
+#, fuzzy, c-format
+msgid ""
+"Please enter your password for username <i>%s</i>\n"
+" at domain <i>%s</i>:"
+msgstr "Пожалуйста, введите пароль для домена %s:"
+
+#: ../gtk-glade/main.c:871
+msgid "Website link"
+msgstr ""
+
+#: ../gtk-glade/main.c:907
+msgid "Linphone - a video internet phone"
+msgstr "Linphone - Интернет видео телефон"
+
+#: ../gtk-glade/main.c:926
+#, c-format
+msgid "%s (Default)"
+msgstr "%s (По умолчанию)"
+
+#: ../gtk-glade/main.c:1168
+msgid "A free SIP video-phone"
+msgstr "Свободный SIP видео-телефон"
+
+#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
+#: ../gtk-glade/contact.glade.h:3
+msgid "Name"
+msgstr "Имя"
+
+#: ../gtk-glade/friendlist.c:212
+msgid "Presence status"
+msgstr "Статус присутствия"
+
+#: ../gtk-glade/friendlist.c:243
+#, c-format
+msgid "Search in %s directory"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:432
+msgid "Invalid sip contact !"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:474
+#, c-format
+msgid "Call %s"
+msgstr "Звонк %s"
+
+#: ../gtk-glade/friendlist.c:475
+#, c-format
+msgid "Send text to %s"
+msgstr "Послать текст к %s"
+
+#: ../gtk-glade/friendlist.c:476
+#, fuzzy, c-format
+msgid "Edit contact '%s'"
+msgstr "Редактировать контактную информацию"
+
+#: ../gtk-glade/friendlist.c:477
+#, c-format
+msgid "Delete contact '%s'"
+msgstr ""
+
+#: ../gtk-glade/friendlist.c:519
+#, c-format
+msgid "Add new contact from %s directory"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:251
+msgid "Rate (Hz)"
+msgstr "Частота (Hz)"
+
+#: ../gtk-glade/propertybox.c:257
+msgid "Status"
+msgstr "Статус"
+
+#: ../gtk-glade/propertybox.c:263
+msgid "Min bitrate (kbit/s)"
+msgstr "Минимальный битрейт (kbit/s)"
+
+#: ../gtk-glade/propertybox.c:269
+msgid "Parameters"
+msgstr "Параметры"
+
+#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
+msgid "Enabled"
+msgstr "Включить"
+
+#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
+msgid "Disabled"
+msgstr "Выключить"
+
+#: ../gtk-glade/propertybox.c:480
+msgid "Account"
+msgstr "Аккаунт"
+
+#: ../gtk-glade/propertybox.c:620
+msgid "English"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:621
+msgid "French"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:622
+msgid "Swedish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:623
+msgid "Italian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:624
+msgid "Spanish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:625
+msgid "Brazilian Portugese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:626
+msgid "Polish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:627
+msgid "German"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:628
+msgid "Russian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:629
+msgid "Japanese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:630
+msgid "Dutch"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:631
+msgid "Hungarian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:632
+msgid "Czech"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:633
+msgid "Chinese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:690
+msgid ""
+"You need to restart linphone for the new language selection to take effect."
+msgstr ""
+
+#: ../gtk-glade/update.c:80
+#, c-format
+msgid ""
+"A more recent version is availalble from %s.\n"
+"Would you like to open a browser to download it ?"
+msgstr ""
+
+#: ../gtk-glade/update.c:91
+msgid "You are running the lastest version."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:66
+msgid "Firstname, Lastname"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:73
+#, fuzzy
+msgid "SIP address"
+msgstr "SIP Адрес"
+
+#: ../gtk-glade/buddylookup.c:121
+msgid "Error communicating with server."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:125
+#, fuzzy
+msgid "Connecting..."
+msgstr "Verbindung"
+
+#: ../gtk-glade/buddylookup.c:129
+#, fuzzy
+msgid "Connected"
+msgstr "Соединён."
+
+#: ../gtk-glade/buddylookup.c:133
+msgid "Receiving data..."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:141
+#, c-format
+msgid "Found %i contact"
+msgid_plural "Found %i contacts"
+msgstr[0] ""
+msgstr[1] ""
+
+#: ../gtk-glade/setupwizard.c:25
+msgid ""
+"Welcome !\n"
+"This assistant will help you to use a SIP account for your calls."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:34
+msgid "Create an account by choosing a username"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:35
+msgid "I have already an account and just want to use it"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:53
+msgid "Please choose a username:"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:54
+#, fuzzy
+msgid "Username:"
+msgstr "Имя пользователя:"
+
+#: ../gtk-glade/setupwizard.c:92
+#, c-format
+msgid "Checking if '%s' is available..."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
+msgid "Please wait..."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:101
+msgid "Sorry this username already exists. Please try a new one."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
+msgid "Ok !"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
+msgid "Communication problem, please try again later."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:134
+msgid "Thank you. Your account is now configured and ready for use."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:228
+msgid "Welcome to the account setup assistant"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:232
+msgid "Account setup assistant"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:236
+#, fuzzy
+msgid "Choosing a username"
+msgstr "Ваше имя пользователя:"
+
+#: ../gtk-glade/setupwizard.c:240
+msgid "Verifying"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:244
+#, fuzzy
+msgid "Confirmation"
+msgstr "Информация"
+
+#: ../gtk-glade/setupwizard.c:249
+msgid "Creating your account"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:253
+msgid "Now ready !"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:98
+#, fuzzy
+msgid "<b>Calling...</b>"
+msgstr "<b>IPv6 использовать</b>"
+
+#: ../gtk-glade/incall_view.c:122
+#, fuzzy
+msgid "<b>In call with</b>"
+msgstr "Прервать звонок"
+
+#: ../gtk-glade/incall_view.c:124
+msgid "00::00::00"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:140
+#, c-format
+msgid "%02i::%02i::%02i"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:158
+#, fuzzy
+msgid "<b>Call ended.</b>"
+msgstr "Разговор окончен"
+
+#: ../gtk-glade/incall_view.c:176
+#, fuzzy
+msgid "Unmute"
+msgstr "Безлимитный"
+
+#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
+msgid "Mute"
+msgstr ""
+
+#: ../gtk-glade/loginframe.c:82
+#, fuzzy, c-format
+msgid "Please enter login information for %s"
+msgstr "Пожалуйста, введите пароль для домена %s:"
+
+#: ../gtk-glade/main.glade.h:1
+msgid "#"
+msgstr "#"
+
+#: ../gtk-glade/main.glade.h:2
+msgid "*"
+msgstr "*"
+
+#: ../gtk-glade/main.glade.h:3
+msgid "0"
+msgstr "0"
+
+#: ../gtk-glade/main.glade.h:4
+msgid "1"
+msgstr "1"
+
+#: ../gtk-glade/main.glade.h:5
+msgid "2"
+msgstr "2"
+
+#: ../gtk-glade/main.glade.h:6
+msgid "3"
+msgstr "3"
+
+#: ../gtk-glade/main.glade.h:7
+msgid "4"
+msgstr "4"
+
+#: ../gtk-glade/main.glade.h:8
+msgid "5"
+msgstr "5"
+
+#: ../gtk-glade/main.glade.h:9
+msgid "6"
+msgstr "6"
+
+#: ../gtk-glade/main.glade.h:10
+msgid "7"
+msgstr "7"
+
+#: ../gtk-glade/main.glade.h:11
+msgid "8"
+msgstr "8"
+
+#: ../gtk-glade/main.glade.h:12
+msgid "9"
+msgstr "9"
+
+#: ../gtk-glade/main.glade.h:13
+msgid "<b>Contact list</b>"
+msgstr "<b>Контактный лист</b>"
+
+#: ../gtk-glade/main.glade.h:14
+#, fuzzy
+msgid "<b>Terminate call</b>"
+msgstr "Прервать звонок"
+
+#: ../gtk-glade/main.glade.h:15
+#, fuzzy
+msgid "<b>Welcome !</b>"
+msgstr "<b>Видео</b>"
+
+#: ../gtk-glade/main.glade.h:16
+msgid "A"
+msgstr "А"
+
+#: ../gtk-glade/main.glade.h:17
+msgid ""
+"ADSL\n"
+"Fiber Channel"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:19
+msgid ""
+"All users\n"
+"Online users"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:21
+msgid "Assistant"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:22
+msgid "Audio & Video"
+msgstr "Аудио & Видео"
+
+#: ../gtk-glade/main.glade.h:23
+msgid "Audio only"
+msgstr "Только аудио"
+
+#: ../gtk-glade/main.glade.h:24
+#, fuzzy
+msgid "Automatically log me in"
+msgstr "Автоматически определить верный hostname"
+
+#: ../gtk-glade/main.glade.h:25
+msgid "B"
+msgstr "Б"
+
+#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
+msgid "C"
+msgstr "В"
+
+#: ../gtk-glade/main.glade.h:27
+msgid "Check for updates"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:28
+msgid "D"
+msgstr "Г"
+
+#: ../gtk-glade/main.glade.h:29
+msgid "Default"
+msgstr "По умолчанию"
+
+#: ../gtk-glade/main.glade.h:30
+msgid "Digits"
+msgstr "Цифры"
+
+#: ../gtk-glade/main.glade.h:31
+#, fuzzy
+msgid "Duration"
+msgstr "Информация"
+
+#: ../gtk-glade/main.glade.h:32
+#, fuzzy
+msgid "Duration:"
+msgstr "Информация"
+
+#: ../gtk-glade/main.glade.h:33
+#, fuzzy
+msgid "Enable self-view"
+msgstr "Включить видео"
+
+#: ../gtk-glade/main.glade.h:34
+msgid "Enter username, phone number, or full sip address"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:35
+#, fuzzy
+msgid "In call"
+msgstr "Входящие звонки"
+
+#: ../gtk-glade/main.glade.h:36
+msgid "Internet connection:"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:37
+#, fuzzy
+msgid "Login information"
+msgstr "Контактная информация"
+
+#: ../gtk-glade/main.glade.h:38
+msgid "Lookup:"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:39
+msgid "Main view"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:41
+#, fuzzy
+msgid "My current identity:"
+msgstr "Мой идентификатор:"
+
+#: ../gtk-glade/main.glade.h:42
+#, fuzzy
+msgid "Password"
+msgstr "Пароль"
+
+#: ../gtk-glade/main.glade.h:43
+#, fuzzy
+msgid "SIP address or phone number:"
+msgstr "Введите sip адрес или телефонный номер."
+
+#: ../gtk-glade/main.glade.h:44
+#, fuzzy
+msgid "Show current call"
+msgstr "Текущий звонок"
+
+#: ../gtk-glade/main.glade.h:45
+msgid "Start call"
+msgstr "Позвонить"
+
+#: ../gtk-glade/main.glade.h:46
+msgid "Terminate call"
+msgstr "Прервать звонок"
+
+#: ../gtk-glade/main.glade.h:47
+#, fuzzy
+msgid "Username"
+msgstr "Имя пользователя:"
+
+#: ../gtk-glade/main.glade.h:48
+#, fuzzy
+msgid "_Linphone"
+msgstr "Linphone"
+
+#: ../gtk-glade/main.glade.h:49
+msgid "_Modes"
+msgstr "_Режимы"
+
+#: ../gtk-glade/main.glade.h:50
+#, fuzzy
+msgid "gtk-connect"
+msgstr "Закрыть"
+
+#: ../gtk-glade/main.glade.h:51
+#, fuzzy
+msgid "gtk-find"
+msgstr "Выход"
+
+#: ../gtk-glade/main.glade.h:52
+msgid "in"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:53
+#, fuzzy
+msgid "label"
+msgstr "label37"
+
+#: ../gtk-glade/about.glade.h:1
+msgid "About linphone"
+msgstr "Про linphone"
+
+#: ../gtk-glade/about.glade.h:2
+msgid "An internet video phone using the standart SIP (rfc3261) protocol."
+msgstr "Интернет видео телефон использующий стандарт SIP (rfc3261) протокола."
+
+#: ../gtk-glade/about.glade.h:3
+msgid "Created by Simon Morlat\n"
+msgstr "Создан Simon Morlat\n"
+
+#: ../gtk-glade/about.glade.h:5
+msgid ""
+"fr: Simon Morlat\n"
+"en: Simon Morlat and Delphine Perreau\n"
+"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
+"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
+"sv: Daniel Nylander <po@danielnylander.se>\n"
+"es: Jesus Benitez <gnelson at inMail dot sk>\n"
+"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
+"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
+"pl: Robert Nasiadek <darkone@darkone.pl>\n"
+"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
+"hu: anonymous\n"
+msgstr ""
+"fr: Simon Morlat\n"
+"en: Simon Morlat and Delphine Perreau\n"
+"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
+"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
+"sv: Daniel Nylander <po@danielnylander.se>\n"
+"es: Jesus Benitez <gnelson at inMail dot sk>\n"
+"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
+"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
+"pl: Robert Nasiadek <darkone@darkone.pl>\n"
+"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
+"hu: anonymous\n"
+
+#: ../gtk-glade/contact.glade.h:1
+#, fuzzy
+msgid "<b>Contact information</b>"
+msgstr "Контактная информация"
+
+#: ../gtk-glade/contact.glade.h:2
+msgid "Allow this contact to see my presence status"
+msgstr "Разрешить этому контакту видеть мой статус присутствия"
+
+#: ../gtk-glade/contact.glade.h:4
+msgid "SIP Address"
+msgstr "SIP Адрес"
+
+#: ../gtk-glade/contact.glade.h:5
+msgid "Show this contact presence status"
+msgstr "Показывать этому контакту статус присутствия"
+
+#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
+#: ../gtk-glade/sip_account.glade.h:9
+msgid "gtk-cancel"
+msgstr "Выход"
+
+#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
+#: ../gtk-glade/sip_account.glade.h:10
+msgid "gtk-ok"
+msgstr "Ок"
+
+#: ../gtk-glade/log.glade.h:1
+msgid "Linphone debug window"
+msgstr "Linphone окно ошибок"
+
+#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
+#: ../gtk-glade/chatroom.glade.h:2
+msgid "gtk-close"
+msgstr "Закрыть"
+
+#: ../gtk-glade/password.glade.h:1
+msgid "Linphone - Authentication required"
+msgstr "Linphone - Регистрация необходима"
+
+#: ../gtk-glade/password.glade.h:2
+msgid "Password:"
+msgstr "Пароль"
+
+#: ../gtk-glade/password.glade.h:3
+#, fuzzy
+msgid "Please enter the domain password"
+msgstr "Пожалуйста, введите свой паспорт для домена..."
+
+#: ../gtk-glade/password.glade.h:4
+msgid "UserID"
+msgstr ""
+
+#: ../gtk-glade/call_logs.glade.h:1
+msgid "Call history"
+msgstr "История звонков"
+
+#: ../gtk-glade/sip_account.glade.h:1
+msgid "Configure a SIP account"
+msgstr "Настроить SIP аккаунт"
+
+#: ../gtk-glade/sip_account.glade.h:2
+msgid "Linphone - Configure a SIP account"
+msgstr "Linphone - Настроить SIP аккаунт"
+
+#: ../gtk-glade/sip_account.glade.h:3
+msgid "Publish presence information"
+msgstr "Показывать статус присутствия"
+
+#: ../gtk-glade/sip_account.glade.h:4
+msgid "Register at startup"
+msgstr "Регистрировать при старте"
+
+#: ../gtk-glade/sip_account.glade.h:5
+#, fuzzy
+msgid "Registration duration (sec):"
+msgstr "Период регистрации (сек):"
+
+#: ../gtk-glade/sip_account.glade.h:6
+msgid "Route (optional):"
+msgstr "Маршрут (необязательно):"
+
+#: ../gtk-glade/sip_account.glade.h:7
+msgid "SIP Proxy address:"
+msgstr "Адрес SIP прокси:"
+
+#: ../gtk-glade/sip_account.glade.h:8
+msgid "Your SIP identity:"
+msgstr "Ваш SIP идентификатор:"
+
+#: ../gtk-glade/sip_account.glade.h:11
+msgid "sip:"
+msgstr "sip:"
+
+#: ../gtk-glade/chatroom.glade.h:1
+msgid "Send"
+msgstr "Отправить"
+
+#: ../gtk-glade/incoming_call.glade.h:1
+msgid "Accept"
+msgstr "Принять"
+
+#: ../gtk-glade/incoming_call.glade.h:2
+msgid "Decline"
+msgstr "Понижение"
+
+#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
+msgid "Incoming call"
+msgstr "Входящие звонки"
+
+#: ../gtk-glade/incoming_call.glade.h:4
+msgid "Incoming call from"
+msgstr "Входящий звонок от"
+
+#: ../gtk-glade/incoming_call.glade.h:5
+msgid "Linphone - Incoming call"
+msgstr "Linphone - Входящий звонок"
+
+#: ../gtk-glade/parameters.glade.h:1
+msgid "0 stands for \"unlimited\""
+msgstr "0 поставить для \"безлимитный\""
+
+#: ../gtk-glade/parameters.glade.h:2
+#, fuzzy
+msgid "<b>Audio</b>"
+msgstr "<b>Звук</b>"
+
+#: ../gtk-glade/parameters.glade.h:3
+#, fuzzy
+msgid "<b>Bandwidth control</b>"
+msgstr "<b>Пропускная способность</b>"
+
+#: ../gtk-glade/parameters.glade.h:4
+msgid "<b>Codecs</b>"
+msgstr "<b>Кодеки</b>"
+
+#: ../gtk-glade/parameters.glade.h:5
+msgid "<b>Default identity</b>"
+msgstr "<b>Личность по умолчанию</b>"
+
+#: ../gtk-glade/parameters.glade.h:6
+#, fuzzy
+msgid "<b>Language</b>"
+msgstr "<b>IPv6 использовать</b>"
+
+#: ../gtk-glade/parameters.glade.h:7
+#, fuzzy
+msgid "<b>NAT and Firewall</b>"
+msgstr "<b>Настройки firewall</b>"
+
+#: ../gtk-glade/parameters.glade.h:8
+#, fuzzy
+msgid "<b>Ports</b>"
+msgstr "<b>Используемые порты</b>"
+
+#: ../gtk-glade/parameters.glade.h:9
+msgid "<b>Privacy</b>"
+msgstr "<b>Секретность</b>"
+
+#: ../gtk-glade/parameters.glade.h:10
+msgid "<b>Proxy accounts</b>"
+msgstr "<b>Proxy аккаунт</b>"
+
+#: ../gtk-glade/parameters.glade.h:11
+#, fuzzy
+msgid "<b>Transport</b>"
+msgstr "<b>Используемые порты</b>"
+
+#: ../gtk-glade/parameters.glade.h:12
+msgid "<b>Video</b>"
+msgstr "<b>Видео</b>"
+
+#: ../gtk-glade/parameters.glade.h:13
+#, fuzzy
+msgid "ALSA special device (optional):"
+msgstr "Специальное устройство ALSA (необязательно)"
+
+#: ../gtk-glade/parameters.glade.h:14
+msgid "Add"
+msgstr "Добавить"
+
+#: ../gtk-glade/parameters.glade.h:15
+#, fuzzy
+msgid "Audio RTP/UDP:"
+msgstr "Аудио RTP/UDP"
+
+#: ../gtk-glade/parameters.glade.h:16
+msgid ""
+"Audio codecs\n"
+"Video codecs"
+msgstr ""
+"Аудио кодеки\n"
+" и Видео кодеки"
+
+#: ../gtk-glade/parameters.glade.h:18
+msgid "Behind NAT / Firewall (specify gateway IP below)"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:19
+msgid "Behind NAT / Firewall (use STUN to resolve)"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:21
+msgid "CIF"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:22
+#, fuzzy
+msgid "Capture device:"
+msgstr "Устройство захвата"
+
+#: ../gtk-glade/parameters.glade.h:23
+msgid "Codecs"
+msgstr "Кодеки"
+
+#: ../gtk-glade/parameters.glade.h:24
+msgid "Direct connection to the Internet"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:25
+msgid "Disable"
+msgstr "Выключить"
+
+#: ../gtk-glade/parameters.glade.h:26
+#, fuzzy
+msgid "Done"
+msgstr "Ушёл"
+
+#: ../gtk-glade/parameters.glade.h:27
+#, fuzzy
+msgid "Download speed limit in Kbit/sec:"
+msgstr "Исходящий поток kbit/sec"
+
+#: ../gtk-glade/parameters.glade.h:28
+msgid "Edit"
+msgstr "Изменить"
+
+#: ../gtk-glade/parameters.glade.h:29
+msgid "Enable"
+msgstr "Включить"
+
+#: ../gtk-glade/parameters.glade.h:30
+#, fuzzy
+msgid "Enable echo cancellation"
+msgstr "Включить подавление эхо"
+
+#: ../gtk-glade/parameters.glade.h:31
+msgid "Erase all passwords"
+msgstr "Стереть все пароли"
+
+#: ../gtk-glade/parameters.glade.h:32
+msgid "Manage SIP Accounts"
+msgstr "Управление SIP аккаунтами"
+
+#: ../gtk-glade/parameters.glade.h:33
+msgid "Multimedia settings"
+msgstr "Настройка мультимедиа"
+
+#: ../gtk-glade/parameters.glade.h:34
+msgid "Network settings"
+msgstr "Настройки сети"
+
+#: ../gtk-glade/parameters.glade.h:35
+#, fuzzy
+msgid "Playback device:"
+msgstr "Устройство воспроизведения"
+
+#: ../gtk-glade/parameters.glade.h:36
+msgid "Prefered video resolution:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:37
+#, fuzzy
+msgid "Public IP address:"
+msgstr "Публичный IP адрес"
+
+#: ../gtk-glade/parameters.glade.h:38
+msgid ""
+"Register to FONICS\n"
+"virtual network !"
+msgstr ""
+"Регистрация в FONICS\n"
+"вирнтуальной сети!"
+
+#: ../gtk-glade/parameters.glade.h:40
+msgid "Remove"
+msgstr "Удалить"
+
+#: ../gtk-glade/parameters.glade.h:41
+#, fuzzy
+msgid "Ring device:"
+msgstr "Устройство звонка"
+
+#: ../gtk-glade/parameters.glade.h:42
+#, fuzzy
+msgid "Ring sound:"
+msgstr "Звук звонка"
+
+#: ../gtk-glade/parameters.glade.h:43
+#, fuzzy
+msgid "SIP (UDP):"
+msgstr "SIP (UDP)"
+
+#: ../gtk-glade/parameters.glade.h:44
+msgid "Send DTMFs as SIP info"
+msgstr "Отправить DTFMы как SIP инфо"
+
+#: ../gtk-glade/parameters.glade.h:45
+#, fuzzy
+msgid "Set Maximum Transmission Unit:"
+msgstr "Установка максимального числа передаваемых единиц"
+
+#: ../gtk-glade/parameters.glade.h:46
+msgid "Settings"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:47
+#, fuzzy
+msgid "Stun server:"
+msgstr "Stun сервер"
+
+#: ../gtk-glade/parameters.glade.h:48
+msgid "This section defines your SIP address when not using a SIP account"
+msgstr "Поле определяет ваш SIP адрес когда вы не используете SIP аккаунт"
+
+#: ../gtk-glade/parameters.glade.h:49
+#, fuzzy
+msgid "Upload speed limit in Kbit/sec:"
+msgstr "Входящий поток kbit/sec"
+
+#: ../gtk-glade/parameters.glade.h:50
+msgid "Use IPv6 instead of IPv4"
+msgstr "Использовать IPv6 вместо IPv4"
+
+#: ../gtk-glade/parameters.glade.h:51
+#, fuzzy
+msgid "User interface"
+msgstr "Имя пользователя:"
+
+#: ../gtk-glade/parameters.glade.h:52
+#, fuzzy
+msgid "Video RTP/UDP:"
+msgstr "Видео RTP/UDP"
+
+#: ../gtk-glade/parameters.glade.h:53
+#, fuzzy
+msgid "Video input device:"
+msgstr "Видео устройсво вывода"
+
+#: ../gtk-glade/parameters.glade.h:54
+msgid "Your display name (eg: John Doe):"
+msgstr "Ваше видимое имя (Иван Сидоров):"
+
+#: ../gtk-glade/parameters.glade.h:55
+msgid "Your resulting SIP address:"
+msgstr "Ваш результирующий sip адрес:"
+
+#: ../gtk-glade/parameters.glade.h:56
+msgid "Your username:"
+msgstr "Ваше имя пользователя:"
+
+#: ../gtk-glade/parameters.glade.h:57
+msgid "a sound card\n"
+msgstr "звуковая карта\n"
+
+#: ../gtk-glade/parameters.glade.h:59
+msgid "default camera"
+msgstr "камера по умолчаию"
+
+#: ../gtk-glade/parameters.glade.h:60
+msgid "default soundcard"
+msgstr "звуковая карта по умолчанию"
+
+#: ../gtk-glade/parameters.glade.h:61
+msgid "default soundcard\n"
+msgstr "звуковая карта по умолчанию\n"
+
+#: ../gtk-glade/parameters.glade.h:63
+msgid "gtk-go-down"
+msgstr "Свернуть"
+
+#: ../gtk-glade/parameters.glade.h:64
+msgid "gtk-go-up"
+msgstr "Развернуть"
+
+#: ../gtk-glade/parameters.glade.h:65
+msgid "gtk-media-play"
+msgstr "Медиа-play"
+
+#: ../gtk-glade/buddylookup.glade.h:1
+msgid "<b>Search somebody</b>"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:2
+msgid "Add to my list"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:3
+msgid "Search contacts in directory"
+msgstr ""
+
+#: ../gtk-glade/waiting.glade.h:1
+msgid "Linphone"
+msgstr "Linphone"
+
+#: ../gtk-glade/waiting.glade.h:2
+msgid "Please wait"
+msgstr ""
+
+#: ../coreapi/linphonecore.c:195
+#, fuzzy, c-format
+msgid "You have missed %i call."
+msgid_plural "You have missed %i calls."
+msgstr[0] "У вас пропущено %i звонков."
+msgstr[1] "У вас пропущено %i звонков."
+
+#: ../coreapi/linphonecore.c:223
+msgid "aborted"
+msgstr "остановленный"
+
+#: ../coreapi/linphonecore.c:226
+msgid "completed"
+msgstr "заверщённый"
+
+#: ../coreapi/linphonecore.c:229
+msgid "missed"
+msgstr "пропущен"
+
+#: ../coreapi/linphonecore.c:234
+#, c-format
+msgid ""
+"%s at %s\n"
+"From: %s\n"
+"To: %s\n"
+"Status: %s\n"
+"Duration: %i mn %i sec\n"
+msgstr ""
+"%s в %s\n"
+"От: %s\n"
+"К: %s\n"
+"Статус: %s\n"
+"Длительность: %i мн %i сек\n"
+
+#: ../coreapi/linphonecore.c:235
+msgid "Outgoing call"
+msgstr "Исходящие звонки"
+
+#: ../coreapi/linphonecore.c:445
+msgid ""
+"Your machine appears to be connected to an IPv6 network. By default linphone "
+"always uses IPv4. Please update your configuration if you want to use IPv6"
+msgstr ""
+"Похоже Ваш компьютер подключен по сети с IPv6. Linphone по умолчанию "
+"использует IPv4. Пожалуйста, обновите настройки если хотите использовать "
+"IPv6."
+
+#: ../coreapi/linphonecore.c:739
+msgid "Ready"
+msgstr "Готов"
+
+#: ../coreapi/linphonecore.c:1014
+msgid "Remote end seems to have disconnected, the call is going to be closed."
+msgstr "Удалённый узел отключился, звонок завершён."
+
+#: ../coreapi/linphonecore.c:1172
+msgid "Looking for telephone number destination..."
+msgstr "Поиск назначения для телефонного номера.."
+
+#: ../coreapi/linphonecore.c:1174
+msgid "Could not resolve this number."
+msgstr "Не может принять решение по этому номеру."
+
+#: ../coreapi/linphonecore.c:1239
+msgid ""
+"Could not parse given sip address. A sip url usually looks like sip:"
+"user@domain"
+msgstr ""
+"Не могу опознать sip адрес. SIP url обычно выглядит как: <sip:"
+"username@domainname>"
+
+#: ../coreapi/linphonecore.c:1340
+msgid "Sorry, having multiple simultaneous calls is not supported yet !"
+msgstr "Извините, несколько одновременных вызовов не поддерживаются пока!"
+
+#: ../coreapi/linphonecore.c:1387
+msgid "Contacting"
+msgstr "Соединение"
+
+#: ../coreapi/linphonecore.c:1402
+msgid "could not call"
+msgstr "невозможно позвонить"
+
+#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
+msgid "Connected."
+msgstr "Соединён."
+
+#: ../coreapi/linphonecore.c:1813
+msgid "Call ended"
+msgstr "Разговор окончен"
+
+#: ../coreapi/linphonecore.c:2175
+msgid "No nat/firewall address supplied !"
+msgstr "NAT/firewall адрес не установлен !"
+
+#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
+#, c-format
+msgid "Invalid nat address '%s' : %s"
+msgstr "Неверный NAT адрес '%s' : '%s'"
+
+#: ../coreapi/misc.c:134
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the pcm oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+"'modprobe snd-pcm-oss' as root to load it."
+msgstr ""
+"Ваш компьютер использует ALSA звуковой драйвер.\n"
+"Это лучший выбор. Однако, pcm oss модуль эмуляции\n"
+"не найден и он нужен для linphone.\n"
+"Пожалуйста, выполните от пользователя root 'modprobe snd-pcm-oss' чтоб "
+"загрузить его."
+
+#: ../coreapi/misc.c:137
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the mixer oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+" 'modprobe snd-mixer-oss' as root to load it."
+msgstr ""
+"Ваш компьютер использует ALSA звуковой драйвер.\n"
+"Это лучший выбор. Однако, oss микшера модуля\n"
+"не найден и он нужен для linphone.\n"
+"Пожалуйста, выполните от пользователя root 'modprobe snd-pcm-oss' чтоб "
+"загрузить его."
+
+#: ../coreapi/misc.c:610
+msgid "Stun lookup in progress..."
+msgstr "Поиск Stun продолжается..."
+
+#: ../coreapi/exevents.c:127
+msgid "Call terminated."
+msgstr "Звонок прерван."
+
+#: ../coreapi/exevents.c:149
+msgid "Could not reach destination."
+msgstr "Невозможно соединиться."
+
+#: ../coreapi/exevents.c:158
+msgid "User is busy."
+msgstr "Пользователь занят."
+
+#: ../coreapi/exevents.c:159
+msgid "User is temporarily unavailable."
+msgstr "Пользователь временно недоступен."
+
+#: ../coreapi/exevents.c:160
+msgid "Request Cancelled."
+msgstr "Запрос отменён."
+
+#. char *retrymsg=_("%s. Retry after %i minute(s).");
+#: ../coreapi/exevents.c:162
+msgid "User does not want to be disturbed."
+msgstr "Пользователь не хочет чтоб его беспокоили."
+
+#: ../coreapi/exevents.c:163
+msgid "Call declined."
+msgstr "Звонок отклонён."
+
+#: ../coreapi/exevents.c:191
+msgid "Bad request"
+msgstr "Неверный запрос"
+
+#: ../coreapi/exevents.c:194
+msgid "User cannot be found at given address."
+msgstr "Пользователь не может быть найден."
+
+#: ../coreapi/exevents.c:197
+msgid "Remote user cannot support any of proposed codecs."
+msgstr ""
+"Удалённый пользователь не поддерживает ни одного из предложенных кодеков."
+
+#. time out, call leg is lost
+#: ../coreapi/exevents.c:227
+msgid "Timeout."
+msgstr "Время закончилось."
+
+#: ../coreapi/exevents.c:230
+msgid "Remote host was found but refused connection."
+msgstr "Удалённый узел был найден, но отказал в соединении."
+
+#: ../coreapi/exevents.c:339
+msgid "is contacting you."
+msgstr "контактирует с вами."
+
+#: ../coreapi/exevents.c:424
+#, c-format
+msgid "Redirected to %s..."
+msgstr "Перенаправлен на %s..."
+
+#: ../coreapi/exevents.c:440
+msgid ""
+"User is not reachable at the moment but he invites you\n"
+"to contact him using the following alternate resource:"
+msgstr ""
+"Пользователь не доступен в данный момент, но\n"
+" приглашает Вас пообщаться на альтернативном ресурсе:"
+
+#: ../coreapi/exevents.c:861
+msgid "Early media."
+msgstr "Прошлые медиа."
+
+#: ../coreapi/exevents.c:972
+#, c-format
+msgid "Registration on %s failed: %s"
+msgstr "Регистрация на %s не удалась: %s"
+
+#: ../coreapi/exevents.c:972
+msgid "no response timeout"
+msgstr "нет ответа"
+
+#: ../coreapi/exevents.c:998
+#, c-format
+msgid "Registration on %s successful."
+msgstr "Регистрация на %s прошла успешно."
+
+#: ../coreapi/exevents.c:999
+#, fuzzy, c-format
+msgid "Unregistration on %s done."
+msgstr "Регистрация на %s прошла успешно."
+
+#. people for which we don't have yet an answer should appear as offline
+#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
+msgid "Gone"
+msgstr "Ушёл"
+
+#: ../coreapi/presence.c:129
+msgid "Waiting for Approval"
+msgstr "Ждать одобрения"
+
+#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
+msgid "Online"
+msgstr "В сети"
+
+#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
+msgid "Busy"
+msgstr "Занят"
+
+#: ../coreapi/presence.c:142
+msgid "Be Right Back"
+msgstr "Скоро вернусь"
+
+#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
+msgid "Away"
+msgstr "Отошёл"
+
+#: ../coreapi/presence.c:151
+msgid "On The Phone"
+msgstr "На телефоне"
+
+#: ../coreapi/presence.c:156
+msgid "Out To Lunch"
+msgstr "На обеде"
+
+#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
+msgid "Closed"
+msgstr "Закрыто"
+
+#: ../coreapi/friend.c:35
+msgid "Unknown"
+msgstr ""
+
+#: ../coreapi/friend.c:44
+#, fuzzy
+msgid "Be right back"
+msgstr "Скоро вернусь"
+
+#: ../coreapi/friend.c:50
+#, fuzzy
+msgid "On the phone"
+msgstr "На телефоне"
+
+#: ../coreapi/friend.c:53
+#, fuzzy
+msgid "Out to lunch"
+msgstr "На обеде"
+
+#: ../coreapi/friend.c:56
+msgid "Do not disturb"
+msgstr "Не беспокоить"
+
+#: ../coreapi/friend.c:59
+msgid "Moved"
+msgstr ""
+
+#: ../coreapi/friend.c:62
+msgid "Using another messaging service"
+msgstr ""
+
+#: ../coreapi/friend.c:65
+#, fuzzy
+msgid "Offline"
+msgstr "В сети"
+
+#: ../coreapi/friend.c:68
+msgid "Pending"
+msgstr ""
+
+#: ../coreapi/friend.c:74
+msgid "Unknown-bug"
+msgstr ""
+
+#: ../coreapi/proxy.c:221
+msgid ""
+"The sip proxy address you entered is invalid, it must start with \"sip:\" "
+"followed by a hostname."
+msgstr ""
+
+#: ../coreapi/proxy.c:227
+msgid ""
+"The sip identity you entered is invalid.\n"
+"It should look like sip:username@proxydomain, such as sip:alice@example.net"
+msgstr ""
+
+#: ../coreapi/proxy.c:634
+#, fuzzy, c-format
+msgid "Could not login as %s"
+msgstr "Невозможно найти картинку: %s"
+
+#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
+msgid "ITU-G.711 alaw encoder"
+msgstr ""
+
+#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
+msgid "ITU-G.711 alaw decoder"
+msgstr ""
+
+#: ../mediastreamer2/src/alsa.c:923
+#, fuzzy
+msgid "Alsa sound source"
+msgstr "звуковая карта\n"
+
+#: ../mediastreamer2/src/alsa.c:1027
+msgid "Alsa sound output"
+msgstr ""
+
+#: ../mediastreamer2/src/aqsnd.c:891
+msgid "Sound capture filter for MacOS X Audio Queue Service"
+msgstr ""
+
+#: ../mediastreamer2/src/aqsnd.c:915
+msgid "Sound playback filter for MacOS X Audio Queue Service"
+msgstr ""
+
+#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
+msgid "DTMF generator"
+msgstr ""
+
+#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
+msgid "The GSM full-rate codec"
+msgstr ""
+
+#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
+msgid "The GSM codec"
+msgstr ""
+
+#: ../mediastreamer2/src/macsnd.c:670
+msgid "Sound capture filter for MacOS X Core Audio drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/macsnd.c:684
+msgid "Sound playback filter for MacOS X Core Audio drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
+msgid "A filter to make conferencing"
+msgstr ""
+
+#: ../mediastreamer2/src/msfileplayer.c:295
+#: ../mediastreamer2/src/msfileplayer.c:313
+msgid "Raw files and wav reader"
+msgstr ""
+
+#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
+#: ../mediastreamer2/src/msfilerec_win.c:216
+#: ../mediastreamer2/src/msfilerec_win.c:234
+msgid "Wav file recorder"
+msgstr ""
+
+#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
+msgid "A filter that send several inputs to one output."
+msgstr ""
+
+#: ../mediastreamer2/src/msresample.c:221
+#: ../mediastreamer2/src/msresample.c:239
+msgid "frequency resampler"
+msgstr ""
+
+#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
+msgid "RTP output filter"
+msgstr ""
+
+#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
+msgid "RTP input filter"
+msgstr ""
+
+#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
+#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
+msgid "The free and wonderful speex codec"
+msgstr ""
+
+#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
+msgid "A filter that controls and measure sound volume"
+msgstr ""
+
+#: ../mediastreamer2/src/msv4l.c:1009
+msgid "A video4linux compatible source filter to stream pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/msv4l2.c:458
+msgid "A filter to grab pictures from Video4Linux2-powered cameras"
+msgstr ""
+
+#: ../mediastreamer2/src/nowebcam.c:1780
+msgid "A filter that outputs a static image."
+msgstr ""
+
+#: ../mediastreamer2/src/oss.c:567
+msgid "Sound capture filter for OSS drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/oss.c:581
+msgid "Sound playback filter for OSS drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
+msgid "A pixel format converter"
+msgstr ""
+
+#: ../mediastreamer2/src/sizeconv.c:204
+msgid "A video size converter"
+msgstr ""
+
+#: ../mediastreamer2/src/sizeconv.c:222
+msgid "a small video size converter"
+msgstr ""
+
+#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
+msgid "Echo canceler using speex library"
+msgstr ""
+
+#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
+msgid "A filter that reads from input and copy to its multiple outputs."
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:375
+msgid "The theora video encoder from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:393
+msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
+msgid "The theora video decoder from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
+msgid "ITU-G.711 ulaw encoder"
+msgstr ""
+
+#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
+msgid "ITU-G.711 ulaw decoder"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
+#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
+msgid "A H.263 decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:688
+msgid "A MPEG4 decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:704
+msgid "A RTP/JPEG decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:720
+msgid "A MJPEG decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:736
+msgid "A snow decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
+msgid "A video H.263 encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:856
+msgid ""
+"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
+"spec."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
+msgid "A video MPEG4 encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:888
+msgid "A video snow encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:904
+msgid "A RTP/MJPEG encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:938
+msgid ""
+"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:970
+msgid ""
+"The snow codec is royalty-free and is open-source. \n"
+"It uses innovative techniques that makes it one of most promising video "
+"codec. It is implemented within the ffmpeg project.\n"
+"However it is under development, quite unstable and compatibility with other "
+"versions cannot be guaranteed."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:990
+msgid "A MJPEG encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
+msgid "A generic video display"
+msgstr ""
+
+#: ../mediastreamer2/src/wincevideods.c:966
+#: ../mediastreamer2/src/wincevideods.c:984
+#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
+#: ../mediastreamer2/src/winvideods.c:1306
+#: ../mediastreamer2/src/winvideods.c:1324
+msgid "A video4windows compatible source filter to stream pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
+msgid "A video for windows (vfw.h) based source filter to grab pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
+msgid "ICE filter"
+msgstr ""
+
+#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
+msgid "A filter that trashes its input (useful for terminating some graphs)."
+msgstr ""
+
+#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
+msgid "Parametric sound equalizer."
+msgstr ""
+
+#: ../mediastreamer2/src/msdscap-mingw.cc:1003
+msgid "A webcam grabber based on directshow."
+msgstr ""
+
+#~ msgid "Show debug window"
+#~ msgstr "Показать окно ошибок"
+
+#~ msgid "_View"
+#~ msgstr "_Вид"
+
+#~ msgid "gtk-about"
+#~ msgstr "О программе"
+
+#~ msgid "gtk-help"
+#~ msgstr "Помощь"
+
+#~ msgid "gtk-preferences"
+#~ msgstr "Параметры"
+
+#~ msgid ""
+#~ "Show All\n"
+#~ "Show Online"
+#~ msgstr ""
+#~ "Показать все\n"
+#~ "Показать Online"
+
+#~ msgid "Search:"
+#~ msgstr "Поиск:"
+
+#~ msgid "Display filters"
+#~ msgstr "Показать фильтры"
+
+#~ msgid "I'm not behing a firewall"
+#~ msgstr "Я не за firewall"
+
+#~ msgid "I'm behind a firewall, use supplied public IP address"
+#~ msgstr "Я за firewall, использовать доступный IP адрес"
+
+#~ msgid "Use the supplied stun server above and do as best as possible"
+#~ msgstr "Использовать доступный Stun сервер и делать так хорошо как возможно"
+
+#~ msgid "<b>Miscelaneous</b>"
+#~ msgstr "<b>Разное</b>"
+
+#~ msgid "Go"
+#~ msgstr "Старт"
+
+#~ msgid "Address book"
+#~ msgstr "Адресная книга"
+
+#~ msgid "Shows calls"
+#~ msgstr "Показать звонки"
+
+#~ msgid "Exit"
+#~ msgstr "Выход"
+
+#~ msgid "Help"
+#~ msgstr "Помощь"
+
+#~ msgid "Shows the address book"
+#~ msgstr "Показать адресную книгу"
+
+#~ msgid "..."
+#~ msgstr "..."
+
+#~ msgid "Proxy to use:"
+#~ msgstr "Какой узел использовать:"
+
+#~ msgid ""
+#~ "Call or\n"
+#~ "answer"
+#~ msgstr ""
+#~ "Позвонить\n"
+#~ "или ответить"
+
+#~ msgid ""
+#~ "Hangup\n"
+#~ "or refuse"
+#~ msgstr ""
+#~ "Прервать\n"
+#~ "или отказать"
+
+#~ msgid "Or chat !"
+#~ msgstr "Или Чат ! "
+
+#~ msgid "Show more..."
+#~ msgstr "Показать больше..."
+
+#~ msgid "Playback level:"
+#~ msgstr "Уровень воспроизведения:"
+
+#~ msgid "Recording level:"
+#~ msgstr "Уровень записи:"
+
+#~ msgid "Ring level:"
+#~ msgstr "Уровень звонка:"
+
+#~ msgid "Controls"
+#~ msgstr "Управление"
+
+#~ msgid "Reachable"
+#~ msgstr "Доступен"
+
+#~ msgid "Busy, I'll be back in "
+#~ msgstr "Занят, я вернусь через "
+
+#~ msgid "The other party will be informed that you'll be back in X minutes"
+#~ msgstr "Другая часть информирует, что Вы вернётесь через X минут"
+
+#~ msgid "mn"
+#~ msgstr "мн"
+
+#~ msgid "Moved temporarily"
+#~ msgstr "Временно переехал"
+
+#~ msgid "Alternative service"
+#~ msgstr "Альтернативный сервис"
+
+#~ msgid "URL:"
+#~ msgstr "URL:"
+
+#~ msgid "Presence"
+#~ msgstr "Статус"
+
+#~ msgid "Press digits to send DTMFs."
+#~ msgstr "Введите цифры, чтоб отправить DTMF."
+
+#~ msgid ""
+#~ "  3\n"
+#~ "def"
+#~ msgstr ""
+#~ "  3\n"
+#~ "где"
+
+#~ msgid ""
+#~ "  2\n"
+#~ "abc"
+#~ msgstr ""
+#~ "  2\n"
+#~ "абв"
+
+#~ msgid ""
+#~ "  4\n"
+#~ "ghi"
+#~ msgstr ""
+#~ "  4\n"
+#~ "жзи"
+
+#~ msgid ""
+#~ " 5\n"
+#~ "jkl"
+#~ msgstr ""
+#~ "  5\n"
+#~ "клм"
+
+#~ msgid ""
+#~ "  6\n"
+#~ "mno"
+#~ msgstr ""
+#~ "  6\n"
+#~ "ноп"
+
+#~ msgid ""
+#~ "   7\n"
+#~ "pqrs"
+#~ msgstr ""
+#~ "  7\n"
+#~ "рст"
+
+#~ msgid ""
+#~ "  8\n"
+#~ "tuv"
+#~ msgstr ""
+#~ "  8\n"
+#~ "уфх"
+
+#~ msgid ""
+#~ "   9\n"
+#~ "wxyz"
+#~ msgstr ""
+#~ "  9\n"
+#~ "шюя"
+
+#~ msgid "DTMF"
+#~ msgstr "DTMF"
+
+#~ msgid "My online friends"
+#~ msgstr "Мои друзья онлайн:"
+
+#~ msgid ""
+#~ "C: 2001\n"
+#~ "Made in Old Europe"
+#~ msgstr ""
+#~ "C: 2001\n"
+#~ "Сделано в старой Европе"
+
+#~ msgid ""
+#~ "Linphone is a web-phone.\n"
+#~ "It is compatible with SIP and RTP protocols."
+#~ msgstr ""
+#~ "Linphone - это интернет телефон.\n"
+#~ "Он совместим с SIP и RTP протоколами."
+
+#~ msgid "http://www.linphone.org"
+#~ msgstr "http://www.linphone.org/"
+
+#~ msgid "Use IPv6 network (if available)"
+#~ msgstr "Использовать IPv6 сеть (если доступно)"
+
+# msgstr "Teilnehmer zur Zeit nicht ansprechbar."
+#~ msgid ""
+#~ "Toggle this if you are on an ipv6 network and you wish linphone to use it."
+#~ msgstr "Отметьте, если Вы в сети с ipv6 и будите использовать linphone."
+
+#~ msgid "Global"
+#~ msgstr "Основные"
+
+#~ msgid ""
+#~ "These options is only for users in a private network, behind a gateway. "
+#~ "If you are not in this situation, then leave this empty."
+#~ msgstr ""
+#~ "Эта опция используется в частных сетях, за шлюзом. Если вы не в этой "
+#~ "ситуации, просто оставьте пустой."
+
+#~ msgid "No firewall"
+#~ msgstr "Нет firewall'a"
+
+#~ msgid "Use this STUN server to guess firewall address :"
+#~ msgstr "Используйте этот STUN сервер чтоб определить адрес firewall :"
+
+#~ msgid "Specify firewall address manually:"
+#~ msgstr "Определить адрес Firewall вручную:"
+
+#~ msgid "NAT traversal options (experimental)"
+#~ msgstr "NAT опции (экспериментально)"
+
+#~ msgid "Number of buffered miliseconds (jitter compensation):"
+#~ msgstr "Число милисекунд для буферизации (компенсация дрожания):"
+
+#~ msgid "RTP port used for audio:"
+#~ msgstr "RTP порт для аудио:"
+
+#~ msgid "RTP properties"
+#~ msgstr "RTP свойства"
+
+#~ msgid "Use SIP INFO message instead of RTP rfc2833 for DTMF transmitting"
+#~ msgstr ""
+#~ "Используйте SIP INFO сообщения вместо RTP rfc2833 для DTMF препровождения"
+
+#~ msgid "RTP-RFC2833 is the recommended way."
+#~ msgstr "RTP-RFC2833 рекомендуемый."
+
+#~ msgid "Other"
+#~ msgstr "Другое"
+
+#~ msgid "micro"
+#~ msgstr "Микрофон"
+
+#~ msgid "Recording source:"
+#~ msgstr "Источник записи:"
+
+#~ msgid "Enable echo-canceler (cancels the echo heard by the remote party)"
+#~ msgstr ""
+#~ "Включить подавление эхо (подавляет эхо слышимое с удалённого устройства)"
+
+#~ msgid "Choose file"
+#~ msgstr "Выберите файл"
+
+#~ msgid "Listen"
+#~ msgstr "Слушать"
+
+#~ msgid "Sound properties"
+#~ msgstr "Настройки звука"
+
+#~ msgid "Sound device"
+#~ msgstr "Устройство звука"
+
+#~ msgid "Run sip user agent on port:"
+#~ msgstr "Запустить \"user agent\" на порту:"
+
+#~ msgid "It is strongly recommended to use port 5060."
+#~ msgstr "Рекомендуется использовать порт 5060."
+
+#~ msgid "SIP port"
+#~ msgstr "SIP порт"
+
+#~ msgid "@"
+#~ msgstr "@"
+
+#~ msgid "Identity"
+#~ msgstr "Личность"
+
+#~ msgid "Add proxy/registrar"
+#~ msgstr "Добавить прокси/регистратора"
+
+#~ msgid "Remote services"
+#~ msgstr "Удалённые сервисы"
+
+#~ msgid "Clear all stored authentication information (username,password...)"
+#~ msgstr "Удалить всю информацию аунтефикации (логин, пароль...)"
+
+#~ msgid "Authentication information"
+#~ msgstr "Информация аунтефикации"
+
+#~ msgid "SIP"
+#~ msgstr "SIP"
+
+#~ msgid "List of audio codecs, in order of preference:"
+#~ msgstr "Список аудио кодеков в приоритетном порядке:"
+
+#~ msgid ""
+#~ "Note: Codecs in red are not usable regarding to your connection type to "
+#~ "the internet."
+#~ msgstr ""
+#~ "Заметка: Кодеки отмеченные красным не подходят для вашего соединения в "
+#~ "Internet."
+
+#~ msgid "No information availlable"
+#~ msgstr "Информация недоступна"
+
+#~ msgid "Codec information"
+#~ msgstr "Информация о кодеке"
+
+#~ msgid "Address Book"
+#~ msgstr "Адресная книга"
+
+#~ msgid "Select"
+#~ msgstr "Выбор"
+
+#~ msgid ""
+#~ "User is not reachable at the moment but he invites you to contact him "
+#~ "using the following alternate ressource:"
+#~ msgstr ""
+#~ "Пользователь не доступен в данный момент, но приглашает пообщаться на "
+#~ "альтернативном ресурсе:"
+
+#~ msgid "None."
+#~ msgstr "Нет."
+
+#~ msgid "Proxy/Registrar configuration box"
+#~ msgstr "Прокси/Регистратор конфигуратор"
+
+#~ msgid "Send registration:"
+#~ msgstr "Отправить регистрацию:"
+
+#~ msgid "Name:"
+#~ msgstr "Имя:"
+
+#~ msgid "Subscribe policy:"
+#~ msgstr "Правило подписки:"
+
+#~ msgid "Send subscription (see person's online status)"
+#~ msgstr "Отправить подписку (смотреть статус персоны в сети)"
+
+#~ msgid "New incoming subscription"
+#~ msgstr "Подтверждение новой подписки"
+
+#~ msgid "You have received a new subscription..."
+#~ msgstr "Вы получили новое подтверждение..."
+
+#~ msgid "Refuse"
+#~ msgstr "Отказать"
+
+#~ msgid "Authentication required for realm"
+#~ msgstr "Регистрация для"
+
+#~ msgid "userid:"
+#~ msgstr "ID пользователя:"
+
+#~ msgid "realm:"
+#~ msgstr "Название:"
+
+#~ msgid "Linphone - Call history"
+#~ msgstr "Linphone - История звонков"
+
+#~ msgid "Chat Room"
+#~ msgstr "Комната чата"
+
+#~ msgid "Text:"
+#~ msgstr "Текст"
+
+#~ msgid "The caller asks for resource reservation. Do you agree ?"
+#~ msgstr ""
+#~ "Вызывающий абонент спрашивает о резервировании ресурса. Вы согласны ?"
+
+#~ msgid ""
+#~ "The caller doesn't use resource reservation. \t\t\t\t\tDo you wish to "
+#~ "continue anyway ?"
+#~ msgstr ""
+#~ "Вызывающий не использует резервирование ресурса. \t\t\t\t\tВы всё равно "
+#~ "желаете продолжить?"
+
+#~ msgid "linphone - receiving call from %s"
+#~ msgstr "Linphone - принял звонок от %s"
+
+#~ msgid ""
+#~ "You have received a subscription from %s.This means that this person "
+#~ "wishes to be notified of your presence information (online, busy, "
+#~ "away...).\n"
+#~ "Do you agree ?"
+#~ msgstr ""
+#~ "Вы получили запрос на подключение от %s. Это значит что этот человек "
+#~ "хочет знать ваш статус (онлайн, занят, отошёл...).\n"
+#~ "Вы согласны ?"
+
+#~ msgid "Authentication required for realm %s"
+#~ msgstr "Регистрация для %s"
+
+#~ msgid "None"
+#~ msgstr "Нет"
+
+#~ msgid "Wait"
+#~ msgstr "Подождать"
+
+#~ msgid "Deny"
+#~ msgstr "Отказать"
+
+#~ msgid "Bad sip address: a sip address looks like sip:user@domain"
+#~ msgstr "Неправильный sip адрес, он выглядит как: <sip:username@domainname>"
+
+#~ msgid "Stun lookup done..."
+#~ msgstr "Поиск Stun завершён..."
+
+#~ msgid "enter sip uri here"
+#~ msgstr "Sip URI eingeben"
+
+#~ msgid "User manual"
+#~ msgstr "Anwender-Handbuch"
+
+#~ msgid "Ring sound selection"
+#~ msgstr "Klingelton ausw�len"
+
+#~ msgid "Communication ended."
+#~ msgstr "Kommunikation beendet."
+
+#~ msgid "Call cancelled."
+#~ msgstr "Anruf annulliert"
+
+#, fuzzy
+#~ msgid "Firewall 's external ip address (in dot notations):"
+#~ msgstr "IP-Adresse des Firewall (in Punktnotation)"
+
+#, fuzzy
+#~ msgid "Server address"
+#~ msgstr "Server-Adresse:"
+
+#~ msgid "28k modem"
+#~ msgstr "28K Modem"
+
+#~ msgid "56k modem"
+#~ msgstr "56K Modem"
+
+#~ msgid "64k modem (numeris)"
+#~ msgstr "64K Modem (ISDN)"
+
+#~ msgid "ADSL or Cable modem"
+#~ msgstr "ADSL oder Kabel-Modem"
+
+#~ msgid "Ethernet or equivalent"
+#~ msgstr "Ethernet oder �uivalent"
+
+#~ msgid "Connection type:"
+#~ msgstr "Verbindungstyp:"
+
+#, fuzzy
+#~ msgid ""
+#~ "Linphone could not open audio device %s. Check if your sound card is "
+#~ "fully configured and working."
+#~ msgstr ""
+#~ "Linphone kann das Soundger� nicht �fnen. Prfen Sie nach, ob dieSoundkarte "
+#~ "vollst�dig konfiguriert und funktionsf�ig ist."
+
+#~ msgid "Type here the sip address of the person you want to call."
+#~ msgstr ""
+#~ "Geben Sie die Sip-Adresse des Anwenders, den Sie anrufen m�hten, hier ein."
+
+#~ msgid ""
+#~ "Release or\n"
+#~ "Refuse"
+#~ msgstr ""
+#~ "Auflegen oder\n"
+#~ "Abweisen"
+
+#~ msgid "%s. Retry after %i minute(s)."
+#~ msgstr "%s. In %i Minuten wieder versuchen."
+
+#~ msgid "Timeout..."
+#~ msgstr "Zeitberschreitung..."
+
+#, fuzzy
+#~ msgid ""
+#~ "Add address\n"
+#~ "book"
+#~ msgstr "Adressbuch"
+
+#~ msgid "Toggle this if you want to be registered on a remote server."
+#~ msgstr ""
+#~ "Bitte ankreuzen, wenn Sie auf einem Sip-Server registriert werden wollen."
+
+#~ msgid "Address of record:"
+#~ msgstr "Adresse des Eintrags:"
+
+#~ msgid ""
+#~ "The password used for registration. On some servers it is not necessary"
+#~ msgstr ""
+#~ "Passwort fr die Registrierung.  Bei manchen Servern nicht erforderlich."
+
+#~ msgid "Use this registrar server as outbound proxy."
+#~ msgstr "Verwenden Sie diesen Registrarserver als externen proxy."
+
+#~ msgid "sip address:"
+#~ msgstr "SIP-Adresse:"
+
+#~ msgid "Modify"
+#~ msgstr "�dern"
+
+#~ msgid "Registering..."
+#~ msgstr "Registrierung"
+
+#~ msgid ""
+#~ "You are currently using the i810_audio driver.\n"
+#~ "This driver is buggy and so does not work with Linphone.\n"
+#~ "We suggest that you replace it by its equivalent ALSA driver,\n"
+#~ "either with packages from your distribution, or by downloading\n"
+#~ "ALSA drivers at http://www.alsa-project.org."
+#~ msgstr ""
+#~ "Sie verwenden zur Zeit den i810_audio Treiber.\n"
+#~ "Diese Treiber ist fehlerhaft und funktioniert nicht mit Linphone\n"
+#~ "Wir empfehlen, den Treiber entweder durch das ALSA-Treiber-Paket von "
+#~ "ihrer Distribution\n"
+#~ "zu ersetzen oder die gewnschten ALSA-Treiber von http://www.alsa-project."
+#~ "org\n"
+#~ "zu beziehen und zu installieren"
+
+#~ msgid "Unregistration successfull."
+#~ msgstr "Abmeldung erfolgreich."
+
+#~ msgid "Select network interface to use:"
+#~ msgstr "Netzwerkschnittstelle w�len:"
+
+#~ msgid "Network interface properties"
+#~ msgstr "Eigenschaften der Netzwerkschnittstelle"
+
+#~ msgid "RTP"
+#~ msgstr "RTP"
+
+#~ msgid "C: 2001"
+#~ msgstr "April 2001"
+
+#~ msgid "Threads not supported by glib. Upgrade your glib.\n"
+#~ msgstr ""
+#~ "Threads werden von glib nicht untersttzt.  Bitte aktualisieren Sie Ihre "
+#~ "glib.\n"
+
+#~ msgid "Run linphone as a gnome-applet."
+#~ msgstr "Linphone als gnome-Applet ausfhren."
+
+#~ msgid "Run linphone as a daemon (for use without gnome)."
+#~ msgstr "Linphone als daemon ausfhren (Verwendung ohne Gnome)."
+
+#~ msgid ""
+#~ "Cannot find network previously used interface %s.\n"
+#~ "If your computer is temporary connected to the internet, please connect "
+#~ "and then run linphone.\n"
+#~ "If you want to change your default network interface, go to the "
+#~ "parameters 'box."
+#~ msgstr ""
+#~ "Linphone konnte die zuvor verwendete Netzwerkschnittstelle %s nicht "
+#~ "finden.\n"
+#~ "Wenn linphone nur tempor� am Internet angeschlossen ist, stellen Sie eine "
+#~ "Verbindung her und rufen Sie linphone erneut auf.\n"
+#~ "Wenn Sie die vorgegebene Netzwerkschnittstelle �dern wollen, w�len Sie "
+#~ "bitte \"Einstellungen\"."
+
+#~ msgid ""
+#~ "Linphone cannot open the audio device.\n"
+#~ "It may be caused by other programs using it.\n"
+#~ "Do you want linphone to kill these programs (esd or artsd) ?"
+#~ msgstr ""
+#~ "Linphone kann die Soundschnittstelle nicht �fnen.\n"
+#~ "Dies kann durch andere Applikationen verursacht sein.\n"
+#~ "M�hten sie diese Programme (esd oder artsd) beenden?"
+
+#~ msgid "Use it as a:"
+#~ msgstr "Verwenden als:"
+
+#~ msgid "Outbound proxy"
+#~ msgstr "Ausgehender Proxy-Server"
+
+#~ msgid ""
+#~ "Toggle this button if the registrar must be used to proxy calls through a "
+#~ "firewall."
+#~ msgstr ""
+#~ "Verwenden Sie diesen Knopf, falls der Registrar zum Tunneln durch einen "
+#~ "Firewall verwendet werden mu�"
+
+#~ msgid "kbit/s"
+#~ msgstr "Kbits/s"
+
+#~ msgid "OSS"
+#~ msgstr "OSS"
+
+#~ msgid "ALSA"
+#~ msgstr "ALSA"
+
+#~ msgid "Automatically kill applications using soundcard when needed"
+#~ msgstr "Applikationen die die Soundkarte verwenden, automatisch beenden."
+
+#~ msgid ""
+#~ "Your computer is connected to several networks. Check in the global "
+#~ "parameters if Linphone uses the one that you want."
+#~ msgstr ""
+#~ "Ihr Rechner ist an mehere Netze angeschlossen. Stellen Sie sicher, da�in "
+#~ "den Globalen Parametern die richtige Schnittstelle selektiert ist."
+
+#~ msgid ""
+#~ "Linphone failed to open the sound device. See the README file included in "
+#~ "the distribution for details."
+#~ msgstr ""
+#~ "Linphone konnte die Soundschnittstelle nicht �fnen. Weitere Informationen "
+#~ "finden Sie in der README-Datei (enthalten in der Distribution)."
+
+#~ msgid "Interface not found."
+#~ msgstr "Schnittstelle nicht gefunden."
+
+#~ msgid "Warning"
+#~ msgstr "Warnung"
+
+#~ msgid ""
+#~ "Linphone cannot open the sound device. It may be caused by other programs "
+#~ "using it. Do you want linphone to kill these programs (esd or artsd) ?"
+#~ msgstr ""
+#~ "Linphone kann die Soundschnittstelle nicht �fnen. Dies kann durch andere "
+#~ "Applikationen verursacht sein. M�hten sie diese Programme (esd oder "
+#~ "artsd) beenden?"
+
+#~ msgid "Linphone shutdowns..."
+#~ msgstr "Linphone Ende..."
+
+#~ msgid ""
+#~ "Please, wait a few seconds untils linphone unregisters your sip addess "
+#~ "from registrar server..."
+#~ msgstr "Bitte einige Sekunden warten, bis Sip-Adresse ausgetragen ist."
+
+#~ msgid "Bad formuled sip address."
+#~ msgstr "SIP-Adresse fehlerhaft."
+
+#~ msgid "Couldn't create pixmap from file: %s"
+#~ msgstr "Konnte Pixmap nicht aus Datei %s erzeugen."
+
+#~ msgid ""
+#~ "Linphone did not detect any valid network interface. If you use a "
+#~ "temporary internet connection, please connect and then run linphone again."
+#~ msgstr ""
+#~ "Linphone konnte keine Netzwerkschnittstelle finden. Wenn Sie nur eine "
+#~ "tempor�e Internetverbindung haben, bitte erneut eine Internetverbindung "
+#~ "herstellen und linphone nochmals starten."
+
+#~ msgid "List of network interfaces on your system."
+#~ msgstr "Vorhandene Netzwerkschnittstellen ihres Systems"
diff --git a/po/sv.po b/po/sv.po
new file mode 100644 (file)
index 0000000..41956ed
--- /dev/null
+++ b/po/sv.po
@@ -0,0 +1,1590 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-10-16 15:24+0200\n"
+"PO-Revision-Date: 2009-02-17 15:22+0100\n"
+"Last-Translator: Emmanuel Frécon <emmanuel.frecon@myjoice.com>\n"
+"Language-Team: SWEDISH <SE@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
+#: ../gtk-glade/support.c:102
+#, c-format
+msgid "Couldn't find pixmap file: %s"
+msgstr "Kunde inte hitta pixmap filen: %s"
+
+#: ../gtk-glade/chat.c:27
+#, c-format
+msgid "Chat with %s"
+msgstr "Chatta med %s"
+
+#: ../gtk-glade/main.c:90
+msgid "log to stdout some debug information while running."
+msgstr "skriv loggning information under körning"
+
+#: ../gtk-glade/main.c:97
+msgid "Start only in the system tray, do not show the main interface."
+msgstr "Starta ikonifierat, visa inte huvudfönstret"
+
+#: ../gtk-glade/main.c:104
+msgid "address to call right now"
+msgstr "Samtalsmottagare"
+
+#: ../gtk-glade/main.c:111
+msgid "if set automatically answer incoming calls"
+msgstr "Om på, besvara automatisk alla inkommande samtal"
+
+#: ../gtk-glade/main.c:119
+msgid ""
+"Specifiy a working directory (should be the base of the installation, eg: c:"
+"\\Program Files\\Linphone)"
+msgstr ""
+
+#: ../gtk-glade/main.c:675
+#, c-format
+msgid "Incoming call from %s"
+msgstr "Inkommande samtal från %s"
+
+#: ../gtk-glade/main.c:707
+#, c-format
+msgid ""
+"%s would like to add you to his contact list.\n"
+"Would you allow him to see your presence status or add him to your contact "
+"list ?\n"
+"If you answer no, this person will be temporarily blacklisted."
+msgstr ""
+"%s skulle vilja lägga till dig till hans/hennes kontaktlista.\n"
+"Vill du tillåta honom/henne att se din närvarostatus eller lägga till honom/"
+"henne till din kontaktlista?\n"
+"Om du svarar nej, personen kommer att vara bannlyst."
+
+#: ../gtk-glade/main.c:777
+#, c-format
+msgid ""
+"Please enter your password for username <i>%s</i>\n"
+" at domain <i>%s</i>:"
+msgstr ""
+"Mata in ditt lösenord för användaren <i>%s</i>\n"
+"vid domänen <i>%s</i>:"
+
+#: ../gtk-glade/main.c:871
+msgid "Website link"
+msgstr "Webbsajt"
+
+#: ../gtk-glade/main.c:907
+msgid "Linphone - a video internet phone"
+msgstr "Linphone - en video Internet telefon"
+
+#: ../gtk-glade/main.c:926
+#, c-format
+msgid "%s (Default)"
+msgstr "%s (Default)"
+
+#: ../gtk-glade/main.c:1168
+msgid "A free SIP video-phone"
+msgstr "En gratis SIP video-telefon"
+
+#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
+#: ../gtk-glade/contact.glade.h:3
+msgid "Name"
+msgstr "Namn"
+
+#: ../gtk-glade/friendlist.c:212
+msgid "Presence status"
+msgstr "Närvarostatus"
+
+#: ../gtk-glade/friendlist.c:243
+#, c-format
+msgid "Search in %s directory"
+msgstr "Sök i %s katalogen"
+
+#: ../gtk-glade/friendlist.c:432
+msgid "Invalid sip contact !"
+msgstr "ogiltig SIP kontakt!"
+
+#: ../gtk-glade/friendlist.c:474
+#, c-format
+msgid "Call %s"
+msgstr "Ringer %s"
+
+#: ../gtk-glade/friendlist.c:475
+#, c-format
+msgid "Send text to %s"
+msgstr "Skicka text till %s"
+
+#: ../gtk-glade/friendlist.c:476
+#, c-format
+msgid "Edit contact '%s'"
+msgstr "Ändra kontakt '%s'"
+
+#: ../gtk-glade/friendlist.c:477
+#, c-format
+msgid "Delete contact '%s'"
+msgstr "Ta bort kontakt '%s'"
+
+#: ../gtk-glade/friendlist.c:519
+#, c-format
+msgid "Add new contact from %s directory"
+msgstr "Lägg till kontakt ifrån %s katalogen"
+
+#: ../gtk-glade/propertybox.c:251
+msgid "Rate (Hz)"
+msgstr "Frekvens (Hz)"
+
+#: ../gtk-glade/propertybox.c:257
+msgid "Status"
+msgstr "Status"
+
+#: ../gtk-glade/propertybox.c:263
+msgid "Min bitrate (kbit/s)"
+msgstr "Min. datahastighet (kbit/s)"
+
+#: ../gtk-glade/propertybox.c:269
+msgid "Parameters"
+msgstr "Parametrar"
+
+#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
+msgid "Enabled"
+msgstr "På"
+
+#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
+msgid "Disabled"
+msgstr "Av"
+
+#: ../gtk-glade/propertybox.c:480
+msgid "Account"
+msgstr "Konto"
+
+#: ../gtk-glade/propertybox.c:620
+msgid "English"
+msgstr "Engelska"
+
+#: ../gtk-glade/propertybox.c:621
+msgid "French"
+msgstr "Fransk"
+
+#: ../gtk-glade/propertybox.c:622
+msgid "Swedish"
+msgstr "Svenska"
+
+#: ../gtk-glade/propertybox.c:623
+msgid "Italian"
+msgstr "Italiensk"
+
+#: ../gtk-glade/propertybox.c:624
+msgid "Spanish"
+msgstr "Spansk"
+
+#: ../gtk-glade/propertybox.c:625
+msgid "Brazilian Portugese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:626
+msgid "Polish"
+msgstr "Polska"
+
+#: ../gtk-glade/propertybox.c:627
+msgid "German"
+msgstr "Tyska"
+
+#: ../gtk-glade/propertybox.c:628
+msgid "Russian"
+msgstr "Ryska"
+
+#: ../gtk-glade/propertybox.c:629
+msgid "Japanese"
+msgstr "Japanska"
+
+#: ../gtk-glade/propertybox.c:630
+msgid "Dutch"
+msgstr "Nederländksa"
+
+#: ../gtk-glade/propertybox.c:631
+msgid "Hungarian"
+msgstr "Hungerska"
+
+#: ../gtk-glade/propertybox.c:632
+msgid "Czech"
+msgstr "Tjekiska"
+
+#: ../gtk-glade/propertybox.c:633
+#, fuzzy
+msgid "Chinese"
+msgstr "Kinesiska"
+
+#: ../gtk-glade/propertybox.c:690
+msgid ""
+"You need to restart linphone for the new language selection to take effect."
+msgstr "Du behöver starta om programmet för att det nya språket ska synas."
+
+#: ../gtk-glade/update.c:80
+#, c-format
+msgid ""
+"A more recent version is availalble from %s.\n"
+"Would you like to open a browser to download it ?"
+msgstr ""
+"En nyare version är tillgänglig på %s.\n"
+"Vill du öppna en browser för att ladda ner den?"
+
+#: ../gtk-glade/update.c:91
+msgid "You are running the lastest version."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:66
+msgid "Firstname, Lastname"
+msgstr "Förnamn, Efternamn"
+
+#: ../gtk-glade/buddylookup.c:73
+msgid "SIP address"
+msgstr "SIP Adress"
+
+#: ../gtk-glade/buddylookup.c:121
+msgid "Error communicating with server."
+msgstr "Error med förbindelsen till servern."
+
+#: ../gtk-glade/buddylookup.c:125
+msgid "Connecting..."
+msgstr "Kontaktar"
+
+#: ../gtk-glade/buddylookup.c:129
+msgid "Connected"
+msgstr "Kopplad"
+
+#: ../gtk-glade/buddylookup.c:133
+msgid "Receiving data..."
+msgstr "Tar emot data..."
+
+#: ../gtk-glade/buddylookup.c:141
+#, c-format
+msgid "Found %i contact"
+msgid_plural "Found %i contacts"
+msgstr[0] "Hittat kontakt %i"
+msgstr[1] "Hittat kontakt %i"
+
+#: ../gtk-glade/setupwizard.c:25
+msgid ""
+"Welcome !\n"
+"This assistant will help you to use a SIP account for your calls."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:34
+msgid "Create an account by choosing a username"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:35
+msgid "I have already an account and just want to use it"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:53
+msgid "Please choose a username:"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:54
+msgid "Username:"
+msgstr "Användarnamn:"
+
+#: ../gtk-glade/setupwizard.c:92
+#, c-format
+msgid "Checking if '%s' is available..."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
+msgid "Please wait..."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:101
+msgid "Sorry this username already exists. Please try a new one."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
+msgid "Ok !"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
+msgid "Communication problem, please try again later."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:134
+msgid "Thank you. Your account is now configured and ready for use."
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:228
+msgid "Welcome to the account setup assistant"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:232
+msgid "Account setup assistant"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:236
+msgid "Choosing a username"
+msgstr "Välj ditt användarnamn:"
+
+#: ../gtk-glade/setupwizard.c:240
+msgid "Verifying"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:244
+#, fuzzy
+msgid "Confirmation"
+msgstr "Kontakt information"
+
+#: ../gtk-glade/setupwizard.c:249
+msgid "Creating your account"
+msgstr ""
+
+#: ../gtk-glade/setupwizard.c:253
+msgid "Now ready !"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:98
+msgid "<b>Calling...</b>"
+msgstr "<b>Kontaktar...</b>"
+
+#: ../gtk-glade/incall_view.c:122
+msgid "<b>In call with</b>"
+msgstr "<b>I samtal med</b>"
+
+#: ../gtk-glade/incall_view.c:124
+msgid "00::00::00"
+msgstr "00:00:00"
+
+#: ../gtk-glade/incall_view.c:140
+#, c-format
+msgid "%02i::%02i::%02i"
+msgstr "%02i:%02i:%02i"
+
+#: ../gtk-glade/incall_view.c:158
+msgid "<b>Call ended.</b>"
+msgstr "<b>Samtalet slut</b>"
+
+#: ../gtk-glade/incall_view.c:176
+#, fuzzy
+msgid "Unmute"
+msgstr "Tyst"
+
+#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
+msgid "Mute"
+msgstr "Tyst"
+
+#: ../gtk-glade/loginframe.c:82
+#, c-format
+msgid "Please enter login information for %s"
+msgstr "Mata in ditt lösenord för domänen %s:"
+
+#: ../gtk-glade/main.glade.h:1
+msgid "#"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:2
+msgid "*"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:3
+msgid "0"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:4
+msgid "1"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:5
+msgid "2"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:6
+msgid "3"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:7
+msgid "4"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:8
+msgid "5"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:9
+msgid "6"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:10
+msgid "7"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:11
+msgid "8"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:12
+msgid "9"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:13
+msgid "<b>Contact list</b>"
+msgstr "<b>Kontaktlista</b>"
+
+#: ../gtk-glade/main.glade.h:14
+msgid "<b>Terminate call</b>"
+msgstr "<b>Lägg på</b>"
+
+#: ../gtk-glade/main.glade.h:15
+msgid "<b>Welcome !</b>"
+msgstr "<b>Välkommen!</b>"
+
+#: ../gtk-glade/main.glade.h:16
+msgid "A"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:17
+msgid ""
+"ADSL\n"
+"Fiber Channel"
+msgstr ""
+"ADSL\n"
+"Fiber"
+
+#: ../gtk-glade/main.glade.h:19
+msgid ""
+"All users\n"
+"Online users"
+msgstr ""
+"Alla användare\n"
+"Online användare"
+
+#: ../gtk-glade/main.glade.h:21
+msgid "Assistant"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:22
+msgid "Audio & Video"
+msgstr "Audio & Video"
+
+#: ../gtk-glade/main.glade.h:23
+msgid "Audio only"
+msgstr "Enbart audio"
+
+#: ../gtk-glade/main.glade.h:24
+msgid "Automatically log me in"
+msgstr "Logga mig automatiskt"
+
+#: ../gtk-glade/main.glade.h:25
+msgid "B"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
+msgid "C"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:27
+msgid "Check for updates"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:28
+msgid "D"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:29
+msgid "Default"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:30
+msgid "Digits"
+msgstr "Tangenter"
+
+#: ../gtk-glade/main.glade.h:31
+msgid "Duration"
+msgstr "Förlopp"
+
+#: ../gtk-glade/main.glade.h:32
+msgid "Duration:"
+msgstr "Förlopp:"
+
+#: ../gtk-glade/main.glade.h:33
+msgid "Enable self-view"
+msgstr "Själv bild"
+
+#: ../gtk-glade/main.glade.h:34
+msgid "Enter username, phone number, or full sip address"
+msgstr "Mata in användarnamn, telefonnummer eller SIP adress"
+
+#: ../gtk-glade/main.glade.h:35
+msgid "In call"
+msgstr "I samtal"
+
+#: ../gtk-glade/main.glade.h:36
+msgid "Internet connection:"
+msgstr "Internet förbindelse:"
+
+#: ../gtk-glade/main.glade.h:37
+msgid "Login information"
+msgstr "Login information"
+
+#: ../gtk-glade/main.glade.h:38
+msgid "Lookup:"
+msgstr "Sök:"
+
+#: ../gtk-glade/main.glade.h:39
+msgid "Main view"
+msgstr "Huvud vy"
+
+#: ../gtk-glade/main.glade.h:41
+msgid "My current identity:"
+msgstr "Min nuvarande identitet"
+
+#: ../gtk-glade/main.glade.h:42
+msgid "Password"
+msgstr "Lösenord"
+
+#: ../gtk-glade/main.glade.h:43
+msgid "SIP address or phone number:"
+msgstr "Användarnamn"
+
+#: ../gtk-glade/main.glade.h:44
+msgid "Show current call"
+msgstr "Nuvarande samtal"
+
+#: ../gtk-glade/main.glade.h:45
+msgid "Start call"
+msgstr "Ring"
+
+#: ../gtk-glade/main.glade.h:46
+msgid "Terminate call"
+msgstr "Lägg på"
+
+#: ../gtk-glade/main.glade.h:47
+msgid "Username"
+msgstr "Användarnamn:"
+
+#: ../gtk-glade/main.glade.h:48
+#, fuzzy
+msgid "_Linphone"
+msgstr "Apropå linphone"
+
+#: ../gtk-glade/main.glade.h:49
+msgid "_Modes"
+msgstr "_Media"
+
+#: ../gtk-glade/main.glade.h:50
+#, fuzzy
+msgid "gtk-connect"
+msgstr "Kopplad"
+
+#: ../gtk-glade/main.glade.h:51
+msgid "gtk-find"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:52
+msgid "in"
+msgstr "i"
+
+#: ../gtk-glade/main.glade.h:53
+msgid "label"
+msgstr ""
+
+#: ../gtk-glade/about.glade.h:1
+msgid "About linphone"
+msgstr "Apropå linphone"
+
+#: ../gtk-glade/about.glade.h:2
+msgid "An internet video phone using the standart SIP (rfc3261) protocol."
+msgstr "En Internet video telefon baserat på SIP protokoll."
+
+#: ../gtk-glade/about.glade.h:3
+msgid "Created by Simon Morlat\n"
+msgstr "Skapad av Simon Morlat\n"
+
+#: ../gtk-glade/about.glade.h:5
+msgid ""
+"fr: Simon Morlat\n"
+"en: Simon Morlat and Delphine Perreau\n"
+"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
+"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
+"sv: Daniel Nylander <po@danielnylander.se>\n"
+"es: Jesus Benitez <gnelson at inMail dot sk>\n"
+"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
+"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
+"pl: Robert Nasiadek <darkone@darkone.pl>\n"
+"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
+"hu: anonymous\n"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:1
+#, fuzzy
+msgid "<b>Contact information</b>"
+msgstr "Kontakt information"
+
+#: ../gtk-glade/contact.glade.h:2
+msgid "Allow this contact to see my presence status"
+msgstr "Tillåt den här kontakten att se min närvarostatus"
+
+#: ../gtk-glade/contact.glade.h:4
+msgid "SIP Address"
+msgstr "SIP Adress"
+
+#: ../gtk-glade/contact.glade.h:5
+msgid "Show this contact presence status"
+msgstr "Visa kontaktens närvarostatus"
+
+#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
+#: ../gtk-glade/sip_account.glade.h:9
+msgid "gtk-cancel"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
+#: ../gtk-glade/sip_account.glade.h:10
+msgid "gtk-ok"
+msgstr ""
+
+#: ../gtk-glade/log.glade.h:1
+msgid "Linphone debug window"
+msgstr "Linphone debug fönster"
+
+#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
+#: ../gtk-glade/chatroom.glade.h:2
+msgid "gtk-close"
+msgstr ""
+
+#: ../gtk-glade/password.glade.h:1
+msgid "Linphone - Authentication required"
+msgstr "Linphone - Autentisering krävs"
+
+#: ../gtk-glade/password.glade.h:2
+msgid "Password:"
+msgstr "Lösenord:"
+
+#: ../gtk-glade/password.glade.h:3
+msgid "Please enter the domain password"
+msgstr "Mata in lösenordet för domänen"
+
+#: ../gtk-glade/password.glade.h:4
+msgid "UserID"
+msgstr ""
+
+#: ../gtk-glade/call_logs.glade.h:1
+msgid "Call history"
+msgstr "Samtalshistorik"
+
+#: ../gtk-glade/sip_account.glade.h:1
+msgid "Configure a SIP account"
+msgstr "Konfigurera ett SIP konto"
+
+#: ../gtk-glade/sip_account.glade.h:2
+msgid "Linphone - Configure a SIP account"
+msgstr "Linphone - Konfigurera ett SIP konto"
+
+#: ../gtk-glade/sip_account.glade.h:3
+msgid "Publish presence information"
+msgstr "Publicera närvaro information"
+
+#: ../gtk-glade/sip_account.glade.h:4
+msgid "Register at startup"
+msgstr "Registrera vid start"
+
+#: ../gtk-glade/sip_account.glade.h:5
+msgid "Registration duration (sec):"
+msgstr "Registreringsfrekvens (sek.):"
+
+#: ../gtk-glade/sip_account.glade.h:6
+msgid "Route (optional):"
+msgstr "Route (tillval):"
+
+#: ../gtk-glade/sip_account.glade.h:7
+msgid "SIP Proxy address:"
+msgstr "SIP Proxy adress:"
+
+#: ../gtk-glade/sip_account.glade.h:8
+msgid "Your SIP identity:"
+msgstr "Din SIP identitet:"
+
+#: ../gtk-glade/sip_account.glade.h:11
+msgid "sip:"
+msgstr "sip:"
+
+#: ../gtk-glade/chatroom.glade.h:1
+msgid "Send"
+msgstr "Skicka"
+
+#: ../gtk-glade/incoming_call.glade.h:1
+msgid "Accept"
+msgstr "Godkänn"
+
+#: ../gtk-glade/incoming_call.glade.h:2
+msgid "Decline"
+msgstr "Avböj"
+
+#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
+msgid "Incoming call"
+msgstr "Inkommande samtal"
+
+#: ../gtk-glade/incoming_call.glade.h:4
+msgid "Incoming call from"
+msgstr "Inkommande samtal från"
+
+#: ../gtk-glade/incoming_call.glade.h:5
+msgid "Linphone - Incoming call"
+msgstr "Linphone - Inkommande samtal"
+
+#: ../gtk-glade/parameters.glade.h:1
+msgid "0 stands for \"unlimited\""
+msgstr "0 står för \"utan begränsning\""
+
+#: ../gtk-glade/parameters.glade.h:2
+msgid "<b>Audio</b>"
+msgstr "<b>Audio</b>"
+
+#: ../gtk-glade/parameters.glade.h:3
+msgid "<b>Bandwidth control</b>"
+msgstr "<b>Bandbreddskontroll</b>"
+
+#: ../gtk-glade/parameters.glade.h:4
+msgid "<b>Codecs</b>"
+msgstr "<b>Codecs</b>"
+
+#: ../gtk-glade/parameters.glade.h:5
+msgid "<b>Default identity</b>"
+msgstr "<b>Default identitet</b>"
+
+#: ../gtk-glade/parameters.glade.h:6
+msgid "<b>Language</b>"
+msgstr "<b>Språk</b>"
+
+#: ../gtk-glade/parameters.glade.h:7
+msgid "<b>NAT and Firewall</b>"
+msgstr "<b>NAT och Brandvägg</b>"
+
+#: ../gtk-glade/parameters.glade.h:8
+msgid "<b>Ports</b>"
+msgstr "<b>Portar</b>"
+
+#: ../gtk-glade/parameters.glade.h:9
+msgid "<b>Privacy</b>"
+msgstr "<b>Integritet</b>"
+
+#: ../gtk-glade/parameters.glade.h:10
+msgid "<b>Proxy accounts</b>"
+msgstr "<b>Proxy konton</b>"
+
+#: ../gtk-glade/parameters.glade.h:11
+msgid "<b>Transport</b>"
+msgstr "<b>Transport</b>"
+
+#: ../gtk-glade/parameters.glade.h:12
+msgid "<b>Video</b>"
+msgstr "<b>Video</b>"
+
+#: ../gtk-glade/parameters.glade.h:13
+msgid "ALSA special device (optional):"
+msgstr "ALSA speciell enhet (tillval):"
+
+#: ../gtk-glade/parameters.glade.h:14
+msgid "Add"
+msgstr "Lägg till"
+
+#: ../gtk-glade/parameters.glade.h:15
+msgid "Audio RTP/UDP:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:16
+msgid ""
+"Audio codecs\n"
+"Video codecs"
+msgstr ""
+"Audio codecs\n"
+"Video codecs"
+
+#: ../gtk-glade/parameters.glade.h:18
+msgid "Behind NAT / Firewall (specify gateway IP below)"
+msgstr "Bakom en NAT / brandvägg (specificera gatewap IP adress nedan)"
+
+#: ../gtk-glade/parameters.glade.h:19
+msgid "Behind NAT / Firewall (use STUN to resolve)"
+msgstr "Bakom en NAT / brandvägg (använd STUN för att avgöra adressen)"
+
+#: ../gtk-glade/parameters.glade.h:21
+msgid "CIF"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:22
+msgid "Capture device:"
+msgstr "Mikrofon enhet:"
+
+#: ../gtk-glade/parameters.glade.h:23
+msgid "Codecs"
+msgstr "Codecs"
+
+#: ../gtk-glade/parameters.glade.h:24
+msgid "Direct connection to the Internet"
+msgstr "Direkt förbindelse till Internet"
+
+#: ../gtk-glade/parameters.glade.h:25
+msgid "Disable"
+msgstr "Inaktivera"
+
+#: ../gtk-glade/parameters.glade.h:26
+msgid "Done"
+msgstr "Klar"
+
+#: ../gtk-glade/parameters.glade.h:27
+msgid "Download speed limit in Kbit/sec:"
+msgstr "Max downstream bandbreddshastighet i kbit/sek:"
+
+#: ../gtk-glade/parameters.glade.h:28
+msgid "Edit"
+msgstr "Editera"
+
+#: ../gtk-glade/parameters.glade.h:29
+msgid "Enable"
+msgstr "Möjliggör"
+
+#: ../gtk-glade/parameters.glade.h:30
+msgid "Enable echo cancellation"
+msgstr "Tillåta ekokancellering"
+
+#: ../gtk-glade/parameters.glade.h:31
+msgid "Erase all passwords"
+msgstr "Glöm alla lösenord"
+
+#: ../gtk-glade/parameters.glade.h:32
+msgid "Manage SIP Accounts"
+msgstr "Hantera SIP konton"
+
+#: ../gtk-glade/parameters.glade.h:33
+msgid "Multimedia settings"
+msgstr "Multimedia inställningar"
+
+#: ../gtk-glade/parameters.glade.h:34
+msgid "Network settings"
+msgstr "Nätverksinställningar"
+
+#: ../gtk-glade/parameters.glade.h:35
+msgid "Playback device:"
+msgstr "Uppspelningsenhet:"
+
+#: ../gtk-glade/parameters.glade.h:36
+msgid "Prefered video resolution:"
+msgstr "Video upplösning:"
+
+#: ../gtk-glade/parameters.glade.h:37
+msgid "Public IP address:"
+msgstr "Publik IP adress:"
+
+#: ../gtk-glade/parameters.glade.h:38
+msgid ""
+"Register to FONICS\n"
+"virtual network !"
+msgstr ""
+"Registrera hos FONICS\n"
+"virtuella nätverk!"
+
+#: ../gtk-glade/parameters.glade.h:40
+msgid "Remove"
+msgstr "Ta bort"
+
+#: ../gtk-glade/parameters.glade.h:41
+msgid "Ring device:"
+msgstr "Ringning enhet:"
+
+#: ../gtk-glade/parameters.glade.h:42
+msgid "Ring sound:"
+msgstr "Ring signal:"
+
+#: ../gtk-glade/parameters.glade.h:43
+msgid "SIP (UDP):"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:44
+msgid "Send DTMFs as SIP info"
+msgstr "Kicka DTMF koder som SIP info"
+
+#: ../gtk-glade/parameters.glade.h:45
+msgid "Set Maximum Transmission Unit:"
+msgstr "Välj MTU (Maximum Transmission Unit):"
+
+#: ../gtk-glade/parameters.glade.h:46
+msgid "Settings"
+msgstr "Inställningar"
+
+#: ../gtk-glade/parameters.glade.h:47
+msgid "Stun server:"
+msgstr "STUN server:"
+
+#: ../gtk-glade/parameters.glade.h:48
+msgid "This section defines your SIP address when not using a SIP account"
+msgstr ""
+"Denna sektion specificerar din SIP adress när du inte använder ett SIP konto"
+
+#: ../gtk-glade/parameters.glade.h:49
+msgid "Upload speed limit in Kbit/sec:"
+msgstr "Max upstream bandbreddshastighet i kbit/sek:"
+
+#: ../gtk-glade/parameters.glade.h:50
+msgid "Use IPv6 instead of IPv4"
+msgstr "Använd IPv6 istället av IPv4"
+
+#: ../gtk-glade/parameters.glade.h:51
+msgid "User interface"
+msgstr "Användarinterface:"
+
+#: ../gtk-glade/parameters.glade.h:52
+msgid "Video RTP/UDP:"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:53
+msgid "Video input device:"
+msgstr "Video ingångsenhet:"
+
+#: ../gtk-glade/parameters.glade.h:54
+msgid "Your display name (eg: John Doe):"
+msgstr "Ditt synliga namn, e.g. Kalle Karlsson:"
+
+#: ../gtk-glade/parameters.glade.h:55
+msgid "Your resulting SIP address:"
+msgstr "Din SIP adress:"
+
+#: ../gtk-glade/parameters.glade.h:56
+msgid "Your username:"
+msgstr "Ditt användarnamn:"
+
+#: ../gtk-glade/parameters.glade.h:57
+msgid "a sound card\n"
+msgstr "ett ljud kort\n"
+
+#: ../gtk-glade/parameters.glade.h:59
+msgid "default camera"
+msgstr "default kamera"
+
+#: ../gtk-glade/parameters.glade.h:60
+msgid "default soundcard"
+msgstr "default ljudkort"
+
+#: ../gtk-glade/parameters.glade.h:61
+msgid "default soundcard\n"
+msgstr "default ljudkort\n"
+
+#: ../gtk-glade/parameters.glade.h:63
+msgid "gtk-go-down"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:64
+msgid "gtk-go-up"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:65
+msgid "gtk-media-play"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:1
+msgid "<b>Search somebody</b>"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:2
+msgid "Add to my list"
+msgstr "Lägg till till min lista"
+
+#: ../gtk-glade/buddylookup.glade.h:3
+msgid "Search contacts in directory"
+msgstr "Sök för kontakter i katalogen"
+
+#: ../gtk-glade/waiting.glade.h:1
+msgid "Linphone"
+msgstr "Apropå linphone"
+
+#: ../gtk-glade/waiting.glade.h:2
+msgid "Please wait"
+msgstr "Vänta"
+
+#: ../coreapi/linphonecore.c:195
+#, c-format
+msgid "You have missed %i call."
+msgid_plural "You have missed %i calls."
+msgstr[0] "Du har %i missat samtal"
+msgstr[1] "Du har %i missade samtal"
+
+#: ../coreapi/linphonecore.c:223
+msgid "aborted"
+msgstr "avbrytade"
+
+#: ../coreapi/linphonecore.c:226
+msgid "completed"
+msgstr "avslutade"
+
+#: ../coreapi/linphonecore.c:229
+msgid "missed"
+msgstr "missade"
+
+#: ../coreapi/linphonecore.c:234
+#, c-format
+msgid ""
+"%s at %s\n"
+"From: %s\n"
+"To: %s\n"
+"Status: %s\n"
+"Duration: %i mn %i sec\n"
+msgstr ""
+"%s på %s\n"
+"Från: %s\n"
+"Till: %s\n"
+"Status: %s\n"
+"Längd: %i min %i sek\n"
+
+#: ../coreapi/linphonecore.c:235
+msgid "Outgoing call"
+msgstr "Utgående samtal"
+
+#: ../coreapi/linphonecore.c:445
+msgid ""
+"Your machine appears to be connected to an IPv6 network. By default linphone "
+"always uses IPv4. Please update your configuration if you want to use IPv6"
+msgstr ""
+"Din dator verkar vara kopplad till ett IPv6 nätverk. Default, använder "
+"linphone IPv4. Uppdatera din konfiguration om du vill använda IPv6."
+
+#: ../coreapi/linphonecore.c:739
+msgid "Ready"
+msgstr "Redo"
+
+#: ../coreapi/linphonecore.c:1014
+msgid "Remote end seems to have disconnected, the call is going to be closed."
+msgstr "Motparten verkar ha avbrutit samtalet, samtalet kommer att avslutas."
+
+#: ../coreapi/linphonecore.c:1172
+msgid "Looking for telephone number destination..."
+msgstr "Leta efter telefonnummer för destinationen..."
+
+#: ../coreapi/linphonecore.c:1174
+msgid "Could not resolve this number."
+msgstr "Kan inte nå dett nummer."
+
+#: ../coreapi/linphonecore.c:1239
+msgid ""
+"Could not parse given sip address. A sip url usually looks like sip:"
+"user@domain"
+msgstr ""
+"Kan inte förstå angiven SIP adress. En SIP adress vanligen ser ut som sip:"
+"användare@domänen"
+
+#: ../coreapi/linphonecore.c:1340
+msgid "Sorry, having multiple simultaneous calls is not supported yet !"
+msgstr "Förlåt, men linphone stödjer inte flera samtliga samtal än!"
+
+#: ../coreapi/linphonecore.c:1387
+msgid "Contacting"
+msgstr "Kontaktar"
+
+#: ../coreapi/linphonecore.c:1402
+msgid "could not call"
+msgstr "Kunde inte ringa"
+
+#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
+msgid "Connected."
+msgstr "Kopplad"
+
+#: ../coreapi/linphonecore.c:1813
+msgid "Call ended"
+msgstr "Samtalet slut"
+
+#: ../coreapi/linphonecore.c:2175
+msgid "No nat/firewall address supplied !"
+msgstr "Ingen NAT / brandväggs adress angiven!"
+
+#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
+#, c-format
+msgid "Invalid nat address '%s' : %s"
+msgstr "Fel NAT adress '%s': %s"
+
+#: ../coreapi/misc.c:134
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the pcm oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+"'modprobe snd-pcm-oss' as root to load it."
+msgstr ""
+"Din dator verkar använda ALSA drivrutiner för ljud.\n"
+"Detta är det bästa valet. Dock PCM OSS emuleringsmodulen\n"
+"saknas och linphone behöver ha det. Var god exekvera\n"
+"'modprobe snd-pcm-oss' som root för att ladda in den."
+
+#: ../coreapi/misc.c:137
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the mixer oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+" 'modprobe snd-mixer-oss' as root to load it."
+msgstr ""
+"Din dator verkar använda ALSA drivrutiner för ljud.\n"
+"Detta är det bästa valet. Dock OSS mixer emuleringsmodulen\n"
+"saknas och linphone behöver ha det. Var god exekvera\n"
+"'modprobe snd-mixer-oss' som root för att ladda in den."
+
+#: ../coreapi/misc.c:610
+msgid "Stun lookup in progress..."
+msgstr "STUN uppslagning pågår..."
+
+#: ../coreapi/exevents.c:127
+msgid "Call terminated."
+msgstr "Samtalet slut."
+
+#: ../coreapi/exevents.c:149
+msgid "Could not reach destination."
+msgstr "Kunde inte nå motparten."
+
+#: ../coreapi/exevents.c:158
+msgid "User is busy."
+msgstr "Användare upptagen."
+
+#: ../coreapi/exevents.c:159
+msgid "User is temporarily unavailable."
+msgstr "Användaren temporärt inte tillgänglig."
+
+#: ../coreapi/exevents.c:160
+msgid "Request Cancelled."
+msgstr "Förfrågan avbruten."
+
+#. char *retrymsg=_("%s. Retry after %i minute(s).");
+#: ../coreapi/exevents.c:162
+msgid "User does not want to be disturbed."
+msgstr "Användaren vill inte bli störd."
+
+#: ../coreapi/exevents.c:163
+msgid "Call declined."
+msgstr "Samtalet avböjdes."
+
+#: ../coreapi/exevents.c:191
+msgid "Bad request"
+msgstr "Fel förfråga."
+
+#: ../coreapi/exevents.c:194
+msgid "User cannot be found at given address."
+msgstr "Användaren kan inte hittas vid den angivna adressen."
+
+#: ../coreapi/exevents.c:197
+msgid "Remote user cannot support any of proposed codecs."
+msgstr "Motparten stödjer ingen av de föreslagna codecs."
+
+#. time out, call leg is lost
+#: ../coreapi/exevents.c:227
+msgid "Timeout."
+msgstr "time out."
+
+#: ../coreapi/exevents.c:230
+msgid "Remote host was found but refused connection."
+msgstr "Motparten hittades men ville inte ta emot samtalet."
+
+#: ../coreapi/exevents.c:339
+msgid "is contacting you."
+msgstr "kontaktar dig."
+
+#: ../coreapi/exevents.c:424
+#, c-format
+msgid "Redirected to %s..."
+msgstr "Omdirigerat till %s..."
+
+#: ../coreapi/exevents.c:440
+msgid ""
+"User is not reachable at the moment but he invites you\n"
+"to contact him using the following alternate resource:"
+msgstr ""
+"Användaren kan inte nås för tillfället men han/hon ber dig\att kontakta "
+"honom/henna vid följande resurs:"
+
+#: ../coreapi/exevents.c:861
+msgid "Early media."
+msgstr "Tidig media"
+
+#: ../coreapi/exevents.c:972
+#, c-format
+msgid "Registration on %s failed: %s"
+msgstr "Registrering hos %s mislyckades: %s"
+
+#: ../coreapi/exevents.c:972
+msgid "no response timeout"
+msgstr "Inget svar inom angiven tid"
+
+#: ../coreapi/exevents.c:998
+#, c-format
+msgid "Registration on %s successful."
+msgstr "Registrering hos %s lyckades."
+
+#: ../coreapi/exevents.c:999
+#, c-format
+msgid "Unregistration on %s done."
+msgstr "Avregistrering hos %s lyckades."
+
+#. people for which we don't have yet an answer should appear as offline
+#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
+msgid "Gone"
+msgstr "Har gått"
+
+#: ../coreapi/presence.c:129
+msgid "Waiting for Approval"
+msgstr "Väntar för godkännandet"
+
+#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
+msgid "Online"
+msgstr "Online"
+
+#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
+msgid "Busy"
+msgstr "Upptagen"
+
+#: ../coreapi/presence.c:142
+msgid "Be Right Back"
+msgstr "Kommer strax tillbaka"
+
+#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
+msgid "Away"
+msgstr "Borta"
+
+#: ../coreapi/presence.c:151
+msgid "On The Phone"
+msgstr "På telefon"
+
+#: ../coreapi/presence.c:156
+msgid "Out To Lunch"
+msgstr "Lunchar"
+
+#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
+msgid "Closed"
+msgstr "Stängt"
+
+#: ../coreapi/friend.c:35
+msgid "Unknown"
+msgstr "Okänd"
+
+#: ../coreapi/friend.c:44
+#, fuzzy
+msgid "Be right back"
+msgstr "Kommer strax tillbaka"
+
+#: ../coreapi/friend.c:50
+#, fuzzy
+msgid "On the phone"
+msgstr "På telefon"
+
+#: ../coreapi/friend.c:53
+#, fuzzy
+msgid "Out to lunch"
+msgstr "Lunchar"
+
+#: ../coreapi/friend.c:56
+msgid "Do not disturb"
+msgstr "Stör ej"
+
+#: ../coreapi/friend.c:59
+msgid "Moved"
+msgstr "Flyttat"
+
+#: ../coreapi/friend.c:62
+msgid "Using another messaging service"
+msgstr "Använder en annan tjänst"
+
+#: ../coreapi/friend.c:65
+msgid "Offline"
+msgstr "Offline"
+
+#: ../coreapi/friend.c:68
+msgid "Pending"
+msgstr "Pågående"
+
+#: ../coreapi/friend.c:74
+msgid "Unknown-bug"
+msgstr ""
+
+#: ../coreapi/proxy.c:221
+msgid ""
+"The sip proxy address you entered is invalid, it must start with \"sip:\" "
+"followed by a hostname."
+msgstr ""
+"SIP proxy adressen som du matade in är inte rätt, adressen måste starta med "
+"\"sip:\", följd av ett hostnamn"
+
+#: ../coreapi/proxy.c:227
+msgid ""
+"The sip identity you entered is invalid.\n"
+"It should look like sip:username@proxydomain, such as sip:alice@example.net"
+msgstr ""
+"SIP adressen som du matade in är inte rätt. Adressen borde se ut som sip:"
+"namn@domän, såsom sip:peter@exempel.se"
+
+#: ../coreapi/proxy.c:634
+#, c-format
+msgid "Could not login as %s"
+msgstr "Kunde inte logga in som %s"
+
+#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
+msgid "ITU-G.711 alaw encoder"
+msgstr ""
+
+#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
+msgid "ITU-G.711 alaw decoder"
+msgstr ""
+
+#: ../mediastreamer2/src/alsa.c:923
+msgid "Alsa sound source"
+msgstr "Alsa ljud ingång"
+
+#: ../mediastreamer2/src/alsa.c:1027
+msgid "Alsa sound output"
+msgstr "Also ljud utgång"
+
+#: ../mediastreamer2/src/aqsnd.c:891
+msgid "Sound capture filter for MacOS X Audio Queue Service"
+msgstr ""
+
+#: ../mediastreamer2/src/aqsnd.c:915
+msgid "Sound playback filter for MacOS X Audio Queue Service"
+msgstr ""
+
+#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
+msgid "DTMF generator"
+msgstr "DTMF generare"
+
+#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
+msgid "The GSM full-rate codec"
+msgstr "Hög hastighet GSM codec"
+
+#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
+msgid "The GSM codec"
+msgstr "GSM codec"
+
+#: ../mediastreamer2/src/macsnd.c:670
+msgid "Sound capture filter for MacOS X Core Audio drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/macsnd.c:684
+msgid "Sound playback filter for MacOS X Core Audio drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
+msgid "A filter to make conferencing"
+msgstr "Ett filter för konferens"
+
+#: ../mediastreamer2/src/msfileplayer.c:295
+#: ../mediastreamer2/src/msfileplayer.c:313
+msgid "Raw files and wav reader"
+msgstr "Raw filer och WAV läsare"
+
+#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
+#: ../mediastreamer2/src/msfilerec_win.c:216
+#: ../mediastreamer2/src/msfilerec_win.c:234
+msgid "Wav file recorder"
+msgstr "WAV fil inspelare"
+
+#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
+msgid "A filter that send several inputs to one output."
+msgstr "En filter som skickar flera ingångar till en utgång"
+
+#: ../mediastreamer2/src/msresample.c:221
+#: ../mediastreamer2/src/msresample.c:239
+msgid "frequency resampler"
+msgstr ""
+
+#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
+msgid "RTP output filter"
+msgstr ""
+
+#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
+msgid "RTP input filter"
+msgstr ""
+
+#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
+#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
+msgid "The free and wonderful speex codec"
+msgstr "Den fria speex codec"
+
+#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
+msgid "A filter that controls and measure sound volume"
+msgstr "Ett filter som kontrollerar och mäter ljudvolym"
+
+#: ../mediastreamer2/src/msv4l.c:1009
+msgid "A video4linux compatible source filter to stream pictures."
+msgstr "En video4linux kompatibel ingångsfilter för att strömma bilder"
+
+#: ../mediastreamer2/src/msv4l2.c:458
+msgid "A filter to grab pictures from Video4Linux2-powered cameras"
+msgstr "En filter för att fånga bilder från Video4Linux-2 capabla kameror"
+
+#: ../mediastreamer2/src/nowebcam.c:1780
+msgid "A filter that outputs a static image."
+msgstr "En filter med statisk bild"
+
+#: ../mediastreamer2/src/oss.c:567
+msgid "Sound capture filter for OSS drivers"
+msgstr "Fånga ljud med OSS drivrutiner"
+
+#: ../mediastreamer2/src/oss.c:581
+msgid "Sound playback filter for OSS drivers"
+msgstr "Ljud utgång med OSS drivrutiner"
+
+#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
+msgid "A pixel format converter"
+msgstr "En pixel format konverterare"
+
+#: ../mediastreamer2/src/sizeconv.c:204
+msgid "A video size converter"
+msgstr "En video storlek konverterare"
+
+#: ../mediastreamer2/src/sizeconv.c:222
+msgid "a small video size converter"
+msgstr "En liten video storlek konverterare"
+
+#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
+msgid "Echo canceler using speex library"
+msgstr "Echo cancellering med hjälp av speex"
+
+#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
+msgid "A filter that reads from input and copy to its multiple outputs."
+msgstr ""
+"En filter som läser från sin ingång och kopierar till multipla utgångar"
+
+#: ../mediastreamer2/src/theora.c:375
+msgid "The theora video encoder from xiph.org"
+msgstr "Theora video encoder från xiph.org"
+
+#: ../mediastreamer2/src/theora.c:393
+msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
+msgstr "Theora video codec från xiph.org, öppen källkod och utan royalties"
+
+#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
+msgid "The theora video decoder from xiph.org"
+msgstr "Theora video decoder från xiph.org"
+
+#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
+msgid "ITU-G.711 ulaw encoder"
+msgstr ""
+
+#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
+msgid "ITU-G.711 ulaw decoder"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
+#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
+msgid "A H.263 decoder using ffmpeg library"
+msgstr "En h.263 decoder via ffmpeg"
+
+#: ../mediastreamer2/src/videodec.c:688
+msgid "A MPEG4 decoder using ffmpeg library"
+msgstr "En MPEG4 decoder via ffmpeg"
+
+#: ../mediastreamer2/src/videodec.c:704
+#, fuzzy
+msgid "A RTP/JPEG decoder using ffmpeg library"
+msgstr "En MJPEG decode via ffmpeg"
+
+#: ../mediastreamer2/src/videodec.c:720
+msgid "A MJPEG decoder using ffmpeg library"
+msgstr "En MJPEG decode via ffmpeg"
+
+#: ../mediastreamer2/src/videodec.c:736
+msgid "A snow decoder using ffmpeg library"
+msgstr "En snow decoder via ffmpeg"
+
+#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
+msgid "A video H.263 encoder using ffmpeg library."
+msgstr "En video h.263 encoder via ffmpeg"
+
+#: ../mediastreamer2/src/videoenc.c:856
+msgid ""
+"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
+"spec."
+msgstr ""
+"En video h.263 encoder via ffmpeg, kompatibel med den gamla RFC2190 "
+"specificationen."
+
+#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
+msgid "A video MPEG4 encoder using ffmpeg library."
+msgstr "En video MPEG4 encoder via ffmpeg"
+
+#: ../mediastreamer2/src/videoenc.c:888
+msgid "A video snow encoder using ffmpeg library."
+msgstr "En video snow encoder via ffmpeg"
+
+#: ../mediastreamer2/src/videoenc.c:904
+#, fuzzy
+msgid "A RTP/MJPEG encoder using ffmpeg library."
+msgstr "En MJPEG decode via ffmpeg"
+
+#: ../mediastreamer2/src/videoenc.c:938
+msgid ""
+"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
+msgstr ""
+"En video h.263 encoder via ffmpeg, kompatible med den gamla RFC2190 "
+"specifikationen."
+
+#: ../mediastreamer2/src/videoenc.c:970
+msgid ""
+"The snow codec is royalty-free and is open-source. \n"
+"It uses innovative techniques that makes it one of most promising video "
+"codec. It is implemented within the ffmpeg project.\n"
+"However it is under development, quite unstable and compatibility with other "
+"versions cannot be guaranteed."
+msgstr ""
+"Snow codec:en är öppen källkod och utan royalties.\n"
+"Den använder sig av innovativa tekniker som gör den en av de bästa. Codec:en "
+"implementeras inom ffmpeg projektet.\n"
+"Dock, den är under utveckling och kompatibiliteten mellan versioner kan inte "
+"garanteras."
+
+#: ../mediastreamer2/src/videoenc.c:990
+#, fuzzy
+msgid "A MJPEG encoder using ffmpeg library."
+msgstr "En MJPEG decode via ffmpeg"
+
+#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
+msgid "A generic video display"
+msgstr "En generisk video utgång"
+
+#: ../mediastreamer2/src/wincevideods.c:966
+#: ../mediastreamer2/src/wincevideods.c:984
+#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
+#: ../mediastreamer2/src/winvideods.c:1306
+#: ../mediastreamer2/src/winvideods.c:1324
+msgid "A video4windows compatible source filter to stream pictures."
+msgstr "En video4windows kompatibel ingångsfilter för att strömma bilder."
+
+#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
+msgid "A video for windows (vfw.h) based source filter to grab pictures."
+msgstr "En video för windows kompatibel ingångsfilter för att fånga bilder."
+
+#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
+msgid "ICE filter"
+msgstr ""
+
+#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
+msgid "A filter that trashes its input (useful for terminating some graphs)."
+msgstr ""
+
+#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
+msgid "Parametric sound equalizer."
+msgstr ""
+
+#: ../mediastreamer2/src/msdscap-mingw.cc:1003
+msgid "A webcam grabber based on directshow."
+msgstr ""
+
+#~ msgid "Bresilian"
+#~ msgstr "Brasiliansk"
+
+#~ msgid "Homepage"
+#~ msgstr "Hemsidan"
+
+#~ msgid "Show debug window"
+#~ msgstr "Visa debugfönstret"
+
+#~ msgid "_View"
+#~ msgstr "_Vy"
+
+#~ msgid "A filter to make level measurements on 16 bits pcm audio stream"
+#~ msgstr "En filter för att mäta nivåer på 16 bitars PCM audio strömmar"
+
+#~ msgid "A video display window using SDL"
+#~ msgstr "En video utgångsfönster med SDL"
diff --git a/po/zh_CN.po b/po/zh_CN.po
new file mode 100644 (file)
index 0000000..d2817bb
--- /dev/null
@@ -0,0 +1,1583 @@
+# SIP Telephony Application.
+# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Simon Morlat <linphone@free.fr>, 2001.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: linphone 0.7.1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-10-16 15:24+0200\n"
+"PO-Revision-Date: 2009-09-24 18:39+0300\n"
+"Last-Translator: Jiang Honglei<jhonglei@gmail.com>\n"
+"Language-Team: Jiang Honglei<jhonglei@gmail.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../gtk-glade/support.c:49 ../gtk-glade/support.c:73
+#: ../gtk-glade/support.c:102
+#, c-format
+msgid "Couldn't find pixmap file: %s"
+msgstr "无法打开图像文件: %s"
+
+#: ../gtk-glade/chat.c:27
+#, c-format
+msgid "Chat with %s"
+msgstr "与 %s 聊天"
+
+#: ../gtk-glade/main.c:90
+msgid "log to stdout some debug information while running."
+msgstr ""
+
+#: ../gtk-glade/main.c:97
+msgid "Start only in the system tray, do not show the main interface."
+msgstr ""
+
+#: ../gtk-glade/main.c:104
+msgid "address to call right now"
+msgstr ""
+
+#: ../gtk-glade/main.c:111
+msgid "if set automatically answer incoming calls"
+msgstr "是否设置呼叫自动应答"
+
+#: ../gtk-glade/main.c:119
+msgid ""
+"Specifiy a working directory (should be the base of the installation, eg: c:"
+"\\Program Files\\Linphone)"
+msgstr ""
+
+#: ../gtk-glade/main.c:675
+#, c-format
+msgid "Incoming call from %s"
+msgstr "来自 %s 的呼叫"
+
+#: ../gtk-glade/main.c:707
+#, c-format
+msgid ""
+"%s would like to add you to his contact list.\n"
+"Would you allow him to see your presence status or add him to your contact "
+"list ?\n"
+"If you answer no, this person will be temporarily blacklisted."
+msgstr ""
+"%s 想加你为好友。\n"
+"你是否允许他看到你的在线状态或者将它加为你的好友允许?\n"
+"如果你回答否,则会将该人临时性的放入黑名单"
+
+#: ../gtk-glade/main.c:777
+#, fuzzy, c-format
+msgid ""
+"Please enter your password for username <i>%s</i>\n"
+" at domain <i>%s</i>:"
+msgstr "请输入你的密码 %s:"
+
+#: ../gtk-glade/main.c:871
+msgid "Website link"
+msgstr ""
+
+#: ../gtk-glade/main.c:907
+msgid "Linphone - a video internet phone"
+msgstr "Linphone - 互联网视频电话"
+
+#: ../gtk-glade/main.c:926
+#, c-format
+msgid "%s (Default)"
+msgstr "%s (缺省)"
+
+#: ../gtk-glade/main.c:1168
+msgid "A free SIP video-phone"
+msgstr "免费的 SIP 视频电话"
+
+#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:245
+#: ../gtk-glade/contact.glade.h:3
+msgid "Name"
+msgstr "名字"
+
+#: ../gtk-glade/friendlist.c:212
+msgid "Presence status"
+msgstr "在线状态"
+
+#: ../gtk-glade/friendlist.c:243
+#, c-format
+msgid "Search in %s directory"
+msgstr "在 %s 目录中查找 "
+
+#: ../gtk-glade/friendlist.c:432
+msgid "Invalid sip contact !"
+msgstr "无效的SIP contact"
+
+#: ../gtk-glade/friendlist.c:474
+#, c-format
+msgid "Call %s"
+msgstr "呼叫 %s"
+
+#: ../gtk-glade/friendlist.c:475
+#, c-format
+msgid "Send text to %s"
+msgstr "发送消息给 %s"
+
+#: ../gtk-glade/friendlist.c:476
+#, c-format
+msgid "Edit contact '%s'"
+msgstr "编辑好友 '%s'"
+
+#: ../gtk-glade/friendlist.c:477
+#, c-format
+msgid "Delete contact '%s'"
+msgstr "删除好友 '%s'"
+
+#: ../gtk-glade/friendlist.c:519
+#, c-format
+msgid "Add new contact from %s directory"
+msgstr "从 %s 目录增加好友 "
+
+#: ../gtk-glade/propertybox.c:251
+msgid "Rate (Hz)"
+msgstr "采样率 (Hz)"
+
+#: ../gtk-glade/propertybox.c:257
+msgid "Status"
+msgstr "状态"
+
+#: ../gtk-glade/propertybox.c:263
+msgid "Min bitrate (kbit/s)"
+msgstr "最小速率 (kbit/s)"
+
+#: ../gtk-glade/propertybox.c:269
+msgid "Parameters"
+msgstr "参数设置"
+
+#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:435
+msgid "Enabled"
+msgstr "启用"
+
+#: ../gtk-glade/propertybox.c:297 ../gtk-glade/propertybox.c:435
+msgid "Disabled"
+msgstr "禁用"
+
+#: ../gtk-glade/propertybox.c:480
+msgid "Account"
+msgstr "账号"
+
+#: ../gtk-glade/propertybox.c:620
+msgid "English"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:621
+msgid "French"
+msgstr "Français"
+
+#: ../gtk-glade/propertybox.c:622
+msgid "Swedish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:623
+msgid "Italian"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:624
+msgid "Spanish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:625
+msgid "Brazilian Portugese"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:626
+msgid "Polish"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:627
+msgid "German"
+msgstr ""
+
+#: ../gtk-glade/propertybox.c:628
+msgid "Russian"
+msgstr "русский язык"
+
+#: ../gtk-glade/propertybox.c:629
+msgid "Japanese"
+msgstr "日本語"
+
+#: ../gtk-glade/propertybox.c:630
+msgid "Dutch"
+msgstr "Nederlands"
+
+#: ../gtk-glade/propertybox.c:631
+msgid "Hungarian"
+msgstr "Magyar"
+
+#: ../gtk-glade/propertybox.c:632
+msgid "Czech"
+msgstr "čeština"
+
+#: ../gtk-glade/propertybox.c:633
+msgid "Chinese"
+msgstr "简体中文"
+
+#: ../gtk-glade/propertybox.c:690
+msgid ""
+"You need to restart linphone for the new language selection to take effect."
+msgstr "你需要重新启动linphone以使你的语言选择生效"
+
+#: ../gtk-glade/update.c:80
+#, c-format
+msgid ""
+"A more recent version is availalble from %s.\n"
+"Would you like to open a browser to download it ?"
+msgstr ""
+
+#: ../gtk-glade/update.c:91
+msgid "You are running the lastest version."
+msgstr ""
+
+#: ../gtk-glade/buddylookup.c:66
+msgid "Firstname, Lastname"
+msgstr "姓 ,名"
+
+#: ../gtk-glade/buddylookup.c:73
+#, fuzzy
+msgid "SIP address"
+msgstr "SIP 地址"
+
+#: ../gtk-glade/buddylookup.c:121
+msgid "Error communicating with server."
+msgstr "与服务器通讯失败"
+
+#: ../gtk-glade/buddylookup.c:125
+msgid "Connecting..."
+msgstr "正在连接..."
+
+#: ../gtk-glade/buddylookup.c:129
+msgid "Connected"
+msgstr "已连接"
+
+#: ../gtk-glade/buddylookup.c:133
+msgid "Receiving data..."
+msgstr "正在接收数据..."
+
+#: ../gtk-glade/buddylookup.c:141
+#, c-format
+msgid "Found %i contact"
+msgid_plural "Found %i contacts"
+msgstr[0] "找到 %i 联系方式"
+msgstr[1] "找到 %i 联系方式(多个)"
+
+#: ../gtk-glade/setupwizard.c:25
+msgid ""
+"Welcome !\n"
+"This assistant will help you to use a SIP account for your calls."
+msgstr ""
+"欢迎使用linphone!\n"
+"该设置向导用于帮助你配置打网络电话的SIP账号"
+
+#: ../gtk-glade/setupwizard.c:34
+msgid "Create an account by choosing a username"
+msgstr "通过选择一个用户名创建一个新的账户"
+
+#: ../gtk-glade/setupwizard.c:35
+msgid "I have already an account and just want to use it"
+msgstr "我已经有一个账号,并想使用原来的账号"
+
+#: ../gtk-glade/setupwizard.c:53
+msgid "Please choose a username:"
+msgstr "请选择用户名:"
+
+#: ../gtk-glade/setupwizard.c:54
+msgid "Username:"
+msgstr "用户名:"
+
+#: ../gtk-glade/setupwizard.c:92
+#, c-format
+msgid "Checking if '%s' is available..."
+msgstr "检查'%s'是否可用"
+
+#: ../gtk-glade/setupwizard.c:97 ../gtk-glade/setupwizard.c:164
+msgid "Please wait..."
+msgstr "请等待..."
+
+#: ../gtk-glade/setupwizard.c:101
+msgid "Sorry this username already exists. Please try a new one."
+msgstr "对不起,该用户已经存在"
+
+#: ../gtk-glade/setupwizard.c:103 ../gtk-glade/setupwizard.c:168
+msgid "Ok !"
+msgstr "成功!"
+
+#: ../gtk-glade/setupwizard.c:106 ../gtk-glade/setupwizard.c:171
+msgid "Communication problem, please try again later."
+msgstr "连接错误,请稍后重试。"
+
+#: ../gtk-glade/setupwizard.c:134
+msgid "Thank you. Your account is now configured and ready for use."
+msgstr "Thank you.你的账号已经可以使用"
+
+#: ../gtk-glade/setupwizard.c:228
+msgid "Welcome to the account setup assistant"
+msgstr "欢迎使用账号设置向导"
+
+#: ../gtk-glade/setupwizard.c:232
+msgid "Account setup assistant"
+msgstr "账号设置向导"
+
+#: ../gtk-glade/setupwizard.c:236
+#, fuzzy
+msgid "Choosing a username"
+msgstr "选择用户名:"
+
+#: ../gtk-glade/setupwizard.c:240
+msgid "Verifying"
+msgstr "验证中"
+
+#: ../gtk-glade/setupwizard.c:244
+#, fuzzy
+msgid "Confirmation"
+msgstr "确认"
+
+#: ../gtk-glade/setupwizard.c:249
+msgid "Creating your account"
+msgstr "正在创建您的账号"
+
+#: ../gtk-glade/setupwizard.c:253
+msgid "Now ready !"
+msgstr "就绪!"
+
+#: ../gtk-glade/incall_view.c:98
+#, fuzzy
+msgid "<b>Calling...</b>"
+msgstr "<b>正在呼叫...</b>"
+
+#: ../gtk-glade/incall_view.c:122
+#, fuzzy
+msgid "<b>In call with</b>"
+msgstr "<b>呼入</b>"
+
+#: ../gtk-glade/incall_view.c:124
+msgid "00::00::00"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:140
+#, c-format
+msgid "%02i::%02i::%02i"
+msgstr ""
+
+#: ../gtk-glade/incall_view.c:158
+#, fuzzy
+msgid "<b>Call ended.</b>"
+msgstr "<b>通话结束</b>"
+
+#: ../gtk-glade/incall_view.c:176
+#, fuzzy
+msgid "Unmute"
+msgstr "静音"
+
+#: ../gtk-glade/incall_view.c:180 ../gtk-glade/main.glade.h:40
+msgid "Mute"
+msgstr "静音"
+
+#: ../gtk-glade/loginframe.c:82
+#, fuzzy, c-format
+msgid "Please enter login information for %s"
+msgstr "请输入 %s 的登录信息:"
+
+#: ../gtk-glade/main.glade.h:1
+msgid "#"
+msgstr "#"
+
+#: ../gtk-glade/main.glade.h:2
+msgid "*"
+msgstr "*"
+
+#: ../gtk-glade/main.glade.h:3
+msgid "0"
+msgstr "0"
+
+#: ../gtk-glade/main.glade.h:4
+msgid "1"
+msgstr "1"
+
+#: ../gtk-glade/main.glade.h:5
+msgid "2"
+msgstr "2"
+
+#: ../gtk-glade/main.glade.h:6
+msgid "3"
+msgstr "3"
+
+#: ../gtk-glade/main.glade.h:7
+msgid "4"
+msgstr "4"
+
+#: ../gtk-glade/main.glade.h:8
+msgid "5"
+msgstr "5"
+
+#: ../gtk-glade/main.glade.h:9
+msgid "6"
+msgstr "6"
+
+#: ../gtk-glade/main.glade.h:10
+msgid "7"
+msgstr "7"
+
+#: ../gtk-glade/main.glade.h:11
+msgid "8"
+msgstr "8"
+
+#: ../gtk-glade/main.glade.h:12
+msgid "9"
+msgstr "9"
+
+#: ../gtk-glade/main.glade.h:13
+msgid "<b>Contact list</b>"
+msgstr "<b>好友列表</b>"
+
+#: ../gtk-glade/main.glade.h:14
+msgid "<b>Terminate call</b>"
+msgstr "挂断电话"
+
+#: ../gtk-glade/main.glade.h:15
+#, fuzzy
+msgid "<b>Welcome !</b>"
+msgstr "<b>欢迎 !</b>"
+
+#: ../gtk-glade/main.glade.h:16
+msgid "A"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:17
+msgid ""
+"ADSL\n"
+"Fiber Channel"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:19
+msgid ""
+"All users\n"
+"Online users"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:21
+msgid "Assistant"
+msgstr "配置向导"
+
+#: ../gtk-glade/main.glade.h:22
+msgid "Audio & Video"
+msgstr "音频 & 视频"
+
+#: ../gtk-glade/main.glade.h:23
+msgid "Audio only"
+msgstr "音频"
+
+#: ../gtk-glade/main.glade.h:24
+msgid "Automatically log me in"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:25
+msgid "B"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:26 ../gtk-glade/parameters.glade.h:20
+msgid "C"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:27
+msgid "Check for updates"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:28
+msgid "D"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:29
+msgid "Default"
+msgstr "缺省"
+
+#: ../gtk-glade/main.glade.h:30
+msgid "Digits"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:31
+msgid "Duration"
+msgstr "通话时间"
+
+#: ../gtk-glade/main.glade.h:32
+msgid "Duration:"
+msgstr "通话计时:"
+
+#: ../gtk-glade/main.glade.h:33
+msgid "Enable self-view"
+msgstr "启用self-view"
+
+#: ../gtk-glade/main.glade.h:34
+msgid "Enter username, phone number, or full sip address"
+msgstr "请输入用户名、电话号码或者SIP地址"
+
+#: ../gtk-glade/main.glade.h:35
+msgid "In call"
+msgstr "呼入"
+
+#: ../gtk-glade/main.glade.h:36
+msgid "Internet connection:"
+msgstr "网络连接:"
+
+#: ../gtk-glade/main.glade.h:37
+#, fuzzy
+msgid "Login information"
+msgstr "登陆信息"
+
+#: ../gtk-glade/main.glade.h:38
+msgid "Lookup:"
+msgstr "查找:"
+
+#: ../gtk-glade/main.glade.h:39
+msgid "Main view"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:41
+#, fuzzy
+msgid "My current identity:"
+msgstr "我的当前ID:"
+
+#: ../gtk-glade/main.glade.h:42
+#, fuzzy
+msgid "Password"
+msgstr "密码"
+
+#: ../gtk-glade/main.glade.h:43
+#, fuzzy
+msgid "SIP address or phone number:"
+msgstr "SIP地址或电话号码"
+
+#: ../gtk-glade/main.glade.h:44
+msgid "Show current call"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:45
+msgid "Start call"
+msgstr "开始呼叫"
+
+#: ../gtk-glade/main.glade.h:46
+msgid "Terminate call"
+msgstr "终止呼叫"
+
+#: ../gtk-glade/main.glade.h:47
+#, fuzzy
+msgid "Username"
+msgstr "用户名:"
+
+#: ../gtk-glade/main.glade.h:48
+#, fuzzy
+msgid "_Linphone"
+msgstr "_Linphone"
+
+#: ../gtk-glade/main.glade.h:49
+msgid "_Modes"
+msgstr "_模式"
+
+#: ../gtk-glade/main.glade.h:50
+#, fuzzy
+msgid "gtk-connect"
+msgstr "连接"
+
+#: ../gtk-glade/main.glade.h:51
+msgid "gtk-find"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:52
+msgid "in"
+msgstr ""
+
+#: ../gtk-glade/main.glade.h:53
+#, fuzzy
+msgid "label"
+msgstr "label"
+
+#: ../gtk-glade/about.glade.h:1
+msgid "About linphone"
+msgstr "关于 linphone"
+
+#: ../gtk-glade/about.glade.h:2
+msgid "An internet video phone using the standart SIP (rfc3261) protocol."
+msgstr "一个采用标准 SIP (rfc3261) 协议的互联网视频电话."
+
+#: ../gtk-glade/about.glade.h:3
+msgid "Created by Simon Morlat\n"
+msgstr "由Simon Morlat创建\n"
+
+#: ../gtk-glade/about.glade.h:5
+msgid ""
+"fr: Simon Morlat\n"
+"en: Simon Morlat and Delphine Perreau\n"
+"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
+"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
+"sv: Daniel Nylander <po@danielnylander.se>\n"
+"es: Jesus Benitez <gnelson at inMail dot sk>\n"
+"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
+"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
+"pl: Robert Nasiadek <darkone@darkone.pl>\n"
+"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
+"hu: anonymous\n"
+msgstr ""
+"fr: Simon Morlat\n"
+"en: Simon Morlat and Delphine Perreau\n"
+"it: Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it>\n"
+"de: Jean-Jacques Sarton <jj.sarton@-NO-SPAM-PLEASE-t-online.de>\n"
+"sv: Daniel Nylander <po@danielnylander.se>\n"
+"es: Jesus Benitez <gnelson at inMail dot sk>\n"
+"ja: YAMAGUCHI YOSHIYA <yushiya@anet.ne.jp>\n"
+"pt_BR: Rafael Caesar Lenzi <rc_lenzi@yahoo.com.br>\n"
+"pl: Robert Nasiadek <darkone@darkone.pl>\n"
+"cs: Petr Pisar <petr.pisar@atlas.cz>\n"
+"hu: anonymous\n"
+"zh_CN: Jiang Honglei <hongleij@126.com>\n"
+
+#: ../gtk-glade/contact.glade.h:1
+#, fuzzy
+msgid "<b>Contact information</b>"
+msgstr "好友信息"
+
+#: ../gtk-glade/contact.glade.h:2
+msgid "Allow this contact to see my presence status"
+msgstr "允许此人看到我的在线状态"
+
+#: ../gtk-glade/contact.glade.h:4
+msgid "SIP Address"
+msgstr "SIP 地址"
+
+#: ../gtk-glade/contact.glade.h:5
+msgid "Show this contact presence status"
+msgstr "显示该好友的在线状态"
+
+#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5
+#: ../gtk-glade/sip_account.glade.h:9
+msgid "gtk-cancel"
+msgstr ""
+
+#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6
+#: ../gtk-glade/sip_account.glade.h:10
+msgid "gtk-ok"
+msgstr ""
+
+#: ../gtk-glade/log.glade.h:1
+msgid "Linphone debug window"
+msgstr "Linphone 调试窗口"
+
+#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2
+#: ../gtk-glade/chatroom.glade.h:2
+msgid "gtk-close"
+msgstr ""
+
+#: ../gtk-glade/password.glade.h:1
+msgid "Linphone - Authentication required"
+msgstr "Linphone - 需要认证"
+
+#: ../gtk-glade/password.glade.h:2
+msgid "Password:"
+msgstr "密码:"
+
+#: ../gtk-glade/password.glade.h:3
+#, fuzzy
+msgid "Please enter the domain password"
+msgstr "请输入密码..."
+
+#: ../gtk-glade/password.glade.h:4
+msgid "UserID"
+msgstr ""
+
+#: ../gtk-glade/call_logs.glade.h:1
+msgid "Call history"
+msgstr "呼叫历史"
+
+#: ../gtk-glade/sip_account.glade.h:1
+msgid "Configure a SIP account"
+msgstr "配置 SIP 账户"
+
+#: ../gtk-glade/sip_account.glade.h:2
+msgid "Linphone - Configure a SIP account"
+msgstr "Linphone - 配置 SIP 账户"
+
+#: ../gtk-glade/sip_account.glade.h:3
+msgid "Publish presence information"
+msgstr "发布自己的在线状态"
+
+#: ../gtk-glade/sip_account.glade.h:4
+msgid "Register at startup"
+msgstr "在启动时注册"
+
+#: ../gtk-glade/sip_account.glade.h:5
+msgid "Registration duration (sec):"
+msgstr "注册间隔(秒):"
+
+#: ../gtk-glade/sip_account.glade.h:6
+msgid "Route (optional):"
+msgstr "路由 (可选项):"
+
+#: ../gtk-glade/sip_account.glade.h:7
+msgid "SIP Proxy address:"
+msgstr "SIP Proxy地址:"
+
+#: ../gtk-glade/sip_account.glade.h:8
+msgid "Your SIP identity:"
+msgstr "你的 SIP 账号:"
+
+#: ../gtk-glade/sip_account.glade.h:11
+msgid "sip:"
+msgstr "sip:"
+
+#: ../gtk-glade/chatroom.glade.h:1
+msgid "Send"
+msgstr "发送"
+
+#: ../gtk-glade/incoming_call.glade.h:1
+msgid "Accept"
+msgstr "接受"
+
+#: ../gtk-glade/incoming_call.glade.h:2
+msgid "Decline"
+msgstr "拒绝"
+
+#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:235
+msgid "Incoming call"
+msgstr "呼入"
+
+#: ../gtk-glade/incoming_call.glade.h:4
+msgid "Incoming call from"
+msgstr "来自"
+
+#: ../gtk-glade/incoming_call.glade.h:5
+msgid "Linphone - Incoming call"
+msgstr "Linphone - 呼入"
+
+#: ../gtk-glade/parameters.glade.h:1
+msgid "0 stands for \"unlimited\""
+msgstr "0 表示 \"没有限制\""
+
+#: ../gtk-glade/parameters.glade.h:2
+#, fuzzy
+msgid "<b>Audio</b>"
+msgstr "<b>音频</b>"
+
+#: ../gtk-glade/parameters.glade.h:3
+#, fuzzy
+msgid "<b>Bandwidth control</b>"
+msgstr "<b>带宽控制</b>"
+
+#: ../gtk-glade/parameters.glade.h:4
+msgid "<b>Codecs</b>"
+msgstr "<b>编码</b>"
+
+#: ../gtk-glade/parameters.glade.h:5
+msgid "<b>Default identity</b>"
+msgstr "<b>缺省账户</b>"
+
+#: ../gtk-glade/parameters.glade.h:6
+#, fuzzy
+msgid "<b>Language</b>"
+msgstr "<b>语言设置</b>"
+
+#: ../gtk-glade/parameters.glade.h:7
+#, fuzzy
+msgid "<b>NAT and Firewall</b>"
+msgstr "<b>NAT及防火墙</b>"
+
+#: ../gtk-glade/parameters.glade.h:8
+msgid "<b>Ports</b>"
+msgstr "<b>端口</b>"
+
+#: ../gtk-glade/parameters.glade.h:9
+msgid "<b>Privacy</b>"
+msgstr "<b>隐私</b>"
+
+#: ../gtk-glade/parameters.glade.h:10
+msgid "<b>Proxy accounts</b>"
+msgstr "<b>Proxy 账户</b>"
+
+#: ../gtk-glade/parameters.glade.h:11
+#, fuzzy
+msgid "<b>Transport</b>"
+msgstr "<b>传输协议</b>"
+
+#: ../gtk-glade/parameters.glade.h:12
+msgid "<b>Video</b>"
+msgstr "<b>视频</b>"
+
+#: ../gtk-glade/parameters.glade.h:13
+msgid "ALSA special device (optional):"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:14
+msgid "Add"
+msgstr "添加"
+
+#: ../gtk-glade/parameters.glade.h:15
+#, fuzzy
+msgid "Audio RTP/UDP:"
+msgstr "音频 RTP/UDP"
+
+#: ../gtk-glade/parameters.glade.h:16
+msgid ""
+"Audio codecs\n"
+"Video codecs"
+msgstr ""
+"音频编码\n"
+"视频编码"
+
+#: ../gtk-glade/parameters.glade.h:18
+msgid "Behind NAT / Firewall (specify gateway IP below)"
+msgstr "位于NAT或防火墙之后(请填写防火墙地址)"
+
+#: ../gtk-glade/parameters.glade.h:19
+msgid "Behind NAT / Firewall (use STUN to resolve)"
+msgstr "STUN服务器地址"
+
+#: ../gtk-glade/parameters.glade.h:21
+msgid "CIF"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:22
+#, fuzzy
+msgid "Capture device:"
+msgstr "录音设备"
+
+#: ../gtk-glade/parameters.glade.h:23
+msgid "Codecs"
+msgstr "编码"
+
+#: ../gtk-glade/parameters.glade.h:24
+msgid "Direct connection to the Internet"
+msgstr "直连"
+
+#: ../gtk-glade/parameters.glade.h:25
+msgid "Disable"
+msgstr "禁用"
+
+#: ../gtk-glade/parameters.glade.h:26
+msgid "Done"
+msgstr "确认"
+
+#: ../gtk-glade/parameters.glade.h:27
+#, fuzzy
+msgid "Download speed limit in Kbit/sec:"
+msgstr "下传速率限制 kbit/sec"
+
+#: ../gtk-glade/parameters.glade.h:28
+msgid "Edit"
+msgstr "编辑"
+
+#: ../gtk-glade/parameters.glade.h:29
+msgid "Enable"
+msgstr "启用"
+
+#: ../gtk-glade/parameters.glade.h:30
+msgid "Enable echo cancellation"
+msgstr "启用回声抑制"
+
+#: ../gtk-glade/parameters.glade.h:31
+msgid "Erase all passwords"
+msgstr "删除所有编码"
+
+#: ../gtk-glade/parameters.glade.h:32
+msgid "Manage SIP Accounts"
+msgstr "SIP账户管理"
+
+#: ../gtk-glade/parameters.glade.h:33
+msgid "Multimedia settings"
+msgstr "音视频设置"
+
+#: ../gtk-glade/parameters.glade.h:34
+msgid "Network settings"
+msgstr "网络设置"
+
+#: ../gtk-glade/parameters.glade.h:35
+msgid "Playback device:"
+msgstr "回放设备"
+
+#: ../gtk-glade/parameters.glade.h:36
+msgid "Prefered video resolution:"
+msgstr "视频分辨率"
+
+#: ../gtk-glade/parameters.glade.h:37
+msgid "Public IP address:"
+msgstr "公网 IP 地址"
+
+#: ../gtk-glade/parameters.glade.h:38
+msgid ""
+"Register to FONICS\n"
+"virtual network !"
+msgstr ""
+"注册到 FONICS\n"
+"虚拟网络!"
+
+#: ../gtk-glade/parameters.glade.h:40
+msgid "Remove"
+msgstr "移除"
+
+#: ../gtk-glade/parameters.glade.h:41
+msgid "Ring device:"
+msgstr "响铃设备"
+
+#: ../gtk-glade/parameters.glade.h:42
+msgid "Ring sound:"
+msgstr "铃声:"
+
+#: ../gtk-glade/parameters.glade.h:43
+msgid "SIP (UDP):"
+msgstr "SIP (UDP)"
+
+#: ../gtk-glade/parameters.glade.h:44
+msgid "Send DTMFs as SIP info"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:45
+msgid "Set Maximum Transmission Unit:"
+msgstr "设置Maximum Transmission Unit(MTU):"
+
+#: ../gtk-glade/parameters.glade.h:46
+msgid "Settings"
+msgstr "设置"
+
+#: ../gtk-glade/parameters.glade.h:47
+#, fuzzy
+msgid "Stun server:"
+msgstr "Stun 服务器地址:"
+
+#: ../gtk-glade/parameters.glade.h:48
+msgid "This section defines your SIP address when not using a SIP account"
+msgstr "该段在你不使用SIP账号时的SIP地址"
+
+#: ../gtk-glade/parameters.glade.h:49
+#, fuzzy
+msgid "Upload speed limit in Kbit/sec:"
+msgstr "上传速率限制 kbit/sec"
+
+#: ../gtk-glade/parameters.glade.h:50
+msgid "Use IPv6 instead of IPv4"
+msgstr "使用 IPv6"
+
+#: ../gtk-glade/parameters.glade.h:51
+#, fuzzy
+msgid "User interface"
+msgstr "界面设置:"
+
+#: ../gtk-glade/parameters.glade.h:52
+#, fuzzy
+msgid "Video RTP/UDP:"
+msgstr "视频 RTP/UDP"
+
+#: ../gtk-glade/parameters.glade.h:53
+#, fuzzy
+msgid "Video input device:"
+msgstr "视频输入设备"
+
+#: ../gtk-glade/parameters.glade.h:54
+msgid "Your display name (eg: John Doe):"
+msgstr "你的显示名 (如:张三):"
+
+#: ../gtk-glade/parameters.glade.h:55
+msgid "Your resulting SIP address:"
+msgstr "你的SIP地址结果:"
+
+#: ../gtk-glade/parameters.glade.h:56
+msgid "Your username:"
+msgstr "你的用户名:"
+
+#: ../gtk-glade/parameters.glade.h:57
+msgid "a sound card\n"
+msgstr "声卡\n"
+
+#: ../gtk-glade/parameters.glade.h:59
+msgid "default camera"
+msgstr "缺省摄像头"
+
+#: ../gtk-glade/parameters.glade.h:60
+msgid "default soundcard"
+msgstr "缺省声卡"
+
+#: ../gtk-glade/parameters.glade.h:61
+msgid "default soundcard\n"
+msgstr "缺省声卡\n"
+
+#: ../gtk-glade/parameters.glade.h:63
+msgid "gtk-go-down"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:64
+msgid "gtk-go-up"
+msgstr ""
+
+#: ../gtk-glade/parameters.glade.h:65
+msgid "gtk-media-play"
+msgstr ""
+
+#: ../gtk-glade/buddylookup.glade.h:1
+msgid "<b>Search somebody</b>"
+msgstr "<b>查找用户</b>"
+
+#: ../gtk-glade/buddylookup.glade.h:2
+msgid "Add to my list"
+msgstr "添加为好友"
+
+#: ../gtk-glade/buddylookup.glade.h:3
+msgid "Search contacts in directory"
+msgstr "查找好友"
+
+#: ../gtk-glade/waiting.glade.h:1
+msgid "Linphone"
+msgstr "Linphone"
+
+#: ../gtk-glade/waiting.glade.h:2
+msgid "Please wait"
+msgstr "请等待"
+
+#: ../coreapi/linphonecore.c:195
+#, fuzzy, c-format
+msgid "You have missed %i call."
+msgid_plural "You have missed %i calls."
+msgstr[0] "你丢失 %i 呼叫."
+msgstr[1] "你共丢失 %i 次呼叫."
+
+#: ../coreapi/linphonecore.c:223
+msgid "aborted"
+msgstr "中断"
+
+#: ../coreapi/linphonecore.c:226
+msgid "completed"
+msgstr "完成"
+
+#: ../coreapi/linphonecore.c:229
+msgid "missed"
+msgstr "丢失"
+
+#: ../coreapi/linphonecore.c:234
+#, c-format
+msgid ""
+"%s at %s\n"
+"From: %s\n"
+"To: %s\n"
+"Status: %s\n"
+"Duration: %i mn %i sec\n"
+msgstr ""
+"%s at %s\n"
+"From: %s\n"
+"To: %s\n"
+"Status: %s\n"
+"Status: %i min %i sec\n"
+
+#: ../coreapi/linphonecore.c:235
+msgid "Outgoing call"
+msgstr "呼出"
+
+#: ../coreapi/linphonecore.c:445
+msgid ""
+"Your machine appears to be connected to an IPv6 network. By default linphone "
+"always uses IPv4. Please update your configuration if you want to use IPv6"
+msgstr ""
+"你的机器缺省配置为IPv6. Linphone 缺省使用IPv4. 请修改配置如果你想使用IPv6. "
+
+#: ../coreapi/linphonecore.c:739
+msgid "Ready"
+msgstr "就绪"
+
+#: ../coreapi/linphonecore.c:1014
+msgid "Remote end seems to have disconnected, the call is going to be closed."
+msgstr "对方断开连接, 通话终止."
+
+#: ../coreapi/linphonecore.c:1172
+msgid "Looking for telephone number destination..."
+msgstr "查询对方电话号码.."
+
+#: ../coreapi/linphonecore.c:1174
+msgid "Could not resolve this number."
+msgstr "该号码无法解析."
+
+#: ../coreapi/linphonecore.c:1239
+msgid ""
+"Could not parse given sip address. A sip url usually looks like sip:"
+"user@domain"
+msgstr "无法解析给定的SIP地址. SIP url 应有如下格式: <sip:username@domainname>"
+
+#: ../coreapi/linphonecore.c:1340
+msgid "Sorry, having multiple simultaneous calls is not supported yet !"
+msgstr "抱歉, 还不支持并发多路呼叫!"
+
+#: ../coreapi/linphonecore.c:1387
+msgid "Contacting"
+msgstr "联系中"
+
+#: ../coreapi/linphonecore.c:1402
+msgid "could not call"
+msgstr "无法呼叫"
+
+#: ../coreapi/linphonecore.c:1787 ../coreapi/exevents.c:50
+msgid "Connected."
+msgstr "连接建立."
+
+#: ../coreapi/linphonecore.c:1813
+msgid "Call ended"
+msgstr "呼叫结束"
+
+#: ../coreapi/linphonecore.c:2175
+msgid "No nat/firewall address supplied !"
+msgstr "没有提供NAT/firewall地址!"
+
+#: ../coreapi/linphonecore.c:2187 ../coreapi/linphonecore.c:2199
+#, c-format
+msgid "Invalid nat address '%s' : %s"
+msgstr "无效NAT地址 '%s' : '%s'"
+
+#: ../coreapi/misc.c:134
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the pcm oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+"'modprobe snd-pcm-oss' as root to load it."
+msgstr ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the pcm oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+"'modprobe snd-pcm-oss' as root to load it."
+
+#: ../coreapi/misc.c:137
+msgid ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the mixer oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+" 'modprobe snd-mixer-oss' as root to load it."
+msgstr ""
+"Your computer appears to be using ALSA sound drivers.\n"
+"This is the best choice. However the mixer oss emulation module\n"
+"is missing and linphone needs it. Please execute\n"
+" 'modprobe snd-mixer-oss' as root to load it."
+
+#: ../coreapi/misc.c:610
+msgid "Stun lookup in progress..."
+msgstr "正在进行Stun查找..."
+
+#: ../coreapi/exevents.c:127
+msgid "Call terminated."
+msgstr "通话结束."
+
+#: ../coreapi/exevents.c:149
+msgid "Could not reach destination."
+msgstr "目标不可达."
+
+#: ../coreapi/exevents.c:158
+msgid "User is busy."
+msgstr "被叫忙."
+
+#: ../coreapi/exevents.c:159
+msgid "User is temporarily unavailable."
+msgstr "你呼叫的用户无法接通."
+
+#: ../coreapi/exevents.c:160
+msgid "Request Cancelled."
+msgstr "取消请求."
+
+#. char *retrymsg=_("%s. Retry after %i minute(s).");
+#: ../coreapi/exevents.c:162
+msgid "User does not want to be disturbed."
+msgstr "用户开启免打扰功能."
+
+#: ../coreapi/exevents.c:163
+msgid "Call declined."
+msgstr "呼叫被拒绝."
+
+#: ../coreapi/exevents.c:191
+msgid "Bad request"
+msgstr "错误请求"
+
+#: ../coreapi/exevents.c:194
+msgid "User cannot be found at given address."
+msgstr "用给定地址无法找到该用户."
+
+#: ../coreapi/exevents.c:197
+msgid "Remote user cannot support any of proposed codecs."
+msgstr "对方不支持相关编码."
+
+#. time out, call leg is lost
+#: ../coreapi/exevents.c:227
+msgid "Timeout."
+msgstr "超时."
+
+#: ../coreapi/exevents.c:230
+msgid "Remote host was found but refused connection."
+msgstr "找到该用户,但是连接被拒绝."
+
+#: ../coreapi/exevents.c:339
+msgid "is contacting you."
+msgstr "真正联系你."
+
+#: ../coreapi/exevents.c:424
+#, c-format
+msgid "Redirected to %s..."
+msgstr "重定向到 %s..."
+
+#: ../coreapi/exevents.c:440
+msgid ""
+"User is not reachable at the moment but he invites you\n"
+"to contact him using the following alternate resource:"
+msgstr ""
+"用户当前不可达,但是他向你发出呼叫请求\n"
+" 要联系该用户,请使用如下地址:"
+
+#: ../coreapi/exevents.c:861
+msgid "Early media."
+msgstr ""
+
+#: ../coreapi/exevents.c:972
+#, c-format
+msgid "Registration on %s failed: %s"
+msgstr "注册到 %s 失败: %s"
+
+#: ../coreapi/exevents.c:972
+msgid "no response timeout"
+msgstr "没有响应,超时"
+
+#: ../coreapi/exevents.c:998
+#, c-format
+msgid "Registration on %s successful."
+msgstr "成功注册到 %s "
+
+#: ../coreapi/exevents.c:999
+#, fuzzy, c-format
+msgid "Unregistration on %s done."
+msgstr "成功注册到 %s "
+
+#. people for which we don't have yet an answer should appear as offline
+#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147
+msgid "Gone"
+msgstr "离开"
+
+#: ../coreapi/presence.c:129
+msgid "Waiting for Approval"
+msgstr "等待批准"
+
+#: ../coreapi/presence.c:133 ../coreapi/friend.c:38
+msgid "Online"
+msgstr "在线"
+
+#: ../coreapi/presence.c:137 ../coreapi/friend.c:41
+msgid "Busy"
+msgstr "用户忙"
+
+#: ../coreapi/presence.c:142
+msgid "Be Right Back"
+msgstr "马上回来"
+
+#: ../coreapi/presence.c:146 ../coreapi/friend.c:47
+msgid "Away"
+msgstr "离开"
+
+#: ../coreapi/presence.c:151
+msgid "On The Phone"
+msgstr "通话中"
+
+#: ../coreapi/presence.c:156
+msgid "Out To Lunch"
+msgstr "外出就餐"
+
+#: ../coreapi/presence.c:160 ../coreapi/friend.c:71
+msgid "Closed"
+msgstr "离线"
+
+#: ../coreapi/friend.c:35
+#, fuzzy
+msgid "Unknown"
+msgstr "未知错误"
+
+#: ../coreapi/friend.c:44
+#, fuzzy
+msgid "Be right back"
+msgstr "离开"
+
+#: ../coreapi/friend.c:50
+#, fuzzy
+msgid "On the phone"
+msgstr "通话中"
+
+#: ../coreapi/friend.c:53
+#, fuzzy
+msgid "Out to lunch"
+msgstr "外出吃饭中.."
+
+#: ../coreapi/friend.c:56
+msgid "Do not disturb"
+msgstr "请勿打扰"
+
+#: ../coreapi/friend.c:59
+msgid "Moved"
+msgstr ""
+
+#: ../coreapi/friend.c:62
+msgid "Using another messaging service"
+msgstr ""
+
+#: ../coreapi/friend.c:65
+#, fuzzy
+msgid "Offline"
+msgstr "离线"
+
+#: ../coreapi/friend.c:68
+msgid "Pending"
+msgstr "挂起"
+
+#: ../coreapi/friend.c:74
+msgid "Unknown-bug"
+msgstr "未知错误"
+
+#: ../coreapi/proxy.c:221
+msgid ""
+"The sip proxy address you entered is invalid, it must start with \"sip:\" "
+"followed by a hostname."
+msgstr ""
+
+#: ../coreapi/proxy.c:227
+msgid ""
+"The sip identity you entered is invalid.\n"
+"It should look like sip:username@proxydomain, such as sip:alice@example.net"
+msgstr ""
+
+#: ../coreapi/proxy.c:634
+#, fuzzy, c-format
+msgid "Could not login as %s"
+msgstr "无法登陆: %s"
+
+#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162
+msgid "ITU-G.711 alaw encoder"
+msgstr ""
+
+#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211
+msgid "ITU-G.711 alaw decoder"
+msgstr ""
+
+#: ../mediastreamer2/src/alsa.c:923
+#, fuzzy
+msgid "Alsa sound source"
+msgstr "ALSA音频源"
+
+#: ../mediastreamer2/src/alsa.c:1027
+msgid "Alsa sound output"
+msgstr "ALSA音频输出"
+
+#: ../mediastreamer2/src/aqsnd.c:891
+msgid "Sound capture filter for MacOS X Audio Queue Service"
+msgstr ""
+
+#: ../mediastreamer2/src/aqsnd.c:915
+msgid "Sound playback filter for MacOS X Audio Queue Service"
+msgstr ""
+
+#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191
+msgid "DTMF generator"
+msgstr ""
+
+#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88
+msgid "The GSM full-rate codec"
+msgstr ""
+
+#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152
+msgid "The GSM codec"
+msgstr ""
+
+#: ../mediastreamer2/src/macsnd.c:670
+msgid "Sound capture filter for MacOS X Core Audio drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/macsnd.c:684
+msgid "Sound playback filter for MacOS X Core Audio drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/msconf.c:787 ../mediastreamer2/src/msconf.c:805
+msgid "A filter to make conferencing"
+msgstr ""
+
+#: ../mediastreamer2/src/msfileplayer.c:295
+#: ../mediastreamer2/src/msfileplayer.c:313
+msgid "Raw files and wav reader"
+msgstr ""
+
+#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188
+#: ../mediastreamer2/src/msfilerec_win.c:216
+#: ../mediastreamer2/src/msfilerec_win.c:234
+msgid "Wav file recorder"
+msgstr ""
+
+#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63
+msgid "A filter that send several inputs to one output."
+msgstr ""
+
+#: ../mediastreamer2/src/msresample.c:221
+#: ../mediastreamer2/src/msresample.c:239
+msgid "frequency resampler"
+msgstr ""
+
+#: ../mediastreamer2/src/msrtp.c:233 ../mediastreamer2/src/msrtp.c:251
+msgid "RTP output filter"
+msgstr ""
+
+#: ../mediastreamer2/src/msrtp.c:348 ../mediastreamer2/src/msrtp.c:366
+msgid "RTP input filter"
+msgstr ""
+
+#: ../mediastreamer2/src/msspeex.c:359 ../mediastreamer2/src/msspeex.c:377
+#: ../mediastreamer2/src/msspeex.c:504 ../mediastreamer2/src/msspeex.c:522
+msgid "The free and wonderful speex codec"
+msgstr ""
+
+#: ../mediastreamer2/src/msvolume.c:390 ../mediastreamer2/src/msvolume.c:405
+msgid "A filter that controls and measure sound volume"
+msgstr ""
+
+#: ../mediastreamer2/src/msv4l.c:1009
+msgid "A video4linux compatible source filter to stream pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/msv4l2.c:458
+msgid "A filter to grab pictures from Video4Linux2-powered cameras"
+msgstr ""
+
+#: ../mediastreamer2/src/nowebcam.c:1780
+msgid "A filter that outputs a static image."
+msgstr ""
+
+#: ../mediastreamer2/src/oss.c:567
+msgid "Sound capture filter for OSS drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/oss.c:581
+msgid "Sound playback filter for OSS drivers"
+msgstr ""
+
+#: ../mediastreamer2/src/pixconv.c:173 ../mediastreamer2/src/pixconv.c:191
+msgid "A pixel format converter"
+msgstr ""
+
+#: ../mediastreamer2/src/sizeconv.c:204
+msgid "A video size converter"
+msgstr ""
+
+#: ../mediastreamer2/src/sizeconv.c:222
+msgid "a small video size converter"
+msgstr ""
+
+#: ../mediastreamer2/src/speexec.c:349 ../mediastreamer2/src/speexec.c:367
+msgid "Echo canceler using speex library"
+msgstr ""
+
+#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98
+msgid "A filter that reads from input and copy to its multiple outputs."
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:375
+msgid "The theora video encoder from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:393
+msgid "The open-source and royalty-free 'theora' video codec from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/theora.c:561 ../mediastreamer2/src/theora.c:579
+msgid "The theora video decoder from xiph.org"
+msgstr ""
+
+#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164
+msgid "ITU-G.711 ulaw encoder"
+msgstr ""
+
+#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214
+msgid "ITU-G.711 ulaw decoder"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:655 ../mediastreamer2/src/videodec.c:671
+#: ../mediastreamer2/src/videodec.c:754 ../mediastreamer2/src/videodec.c:770
+msgid "A H.263 decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:688
+msgid "A MPEG4 decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:704
+msgid "A RTP/JPEG decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:720
+msgid "A MJPEG decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videodec.c:736
+msgid "A snow decoder using ffmpeg library"
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:840 ../mediastreamer2/src/videoenc.c:922
+msgid "A video H.263 encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:856
+msgid ""
+"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 "
+"spec."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:872 ../mediastreamer2/src/videoenc.c:954
+msgid "A video MPEG4 encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:888
+msgid "A video snow encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:904
+msgid "A RTP/MJPEG encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:938
+msgid ""
+"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:970
+msgid ""
+"The snow codec is royalty-free and is open-source. \n"
+"It uses innovative techniques that makes it one of most promising video "
+"codec. It is implemented within the ffmpeg project.\n"
+"However it is under development, quite unstable and compatibility with other "
+"versions cannot be guaranteed."
+msgstr ""
+
+#: ../mediastreamer2/src/videoenc.c:990
+msgid "A MJPEG encoder using ffmpeg library."
+msgstr ""
+
+#: ../mediastreamer2/src/videoout.c:974 ../mediastreamer2/src/videoout.c:992
+msgid "A generic video display"
+msgstr ""
+
+#: ../mediastreamer2/src/wincevideods.c:966
+#: ../mediastreamer2/src/wincevideods.c:984
+#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614
+#: ../mediastreamer2/src/winvideods.c:1306
+#: ../mediastreamer2/src/winvideods.c:1324
+msgid "A video4windows compatible source filter to stream pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454
+msgid "A video for windows (vfw.h) based source filter to grab pictures."
+msgstr ""
+
+#: ../mediastreamer2/src/ice.c:1349 ../mediastreamer2/src/ice.c:1367
+msgid "ICE filter"
+msgstr ""
+
+#: ../mediastreamer2/src/void.c:35 ../mediastreamer2/src/void.c:52
+msgid "A filter that trashes its input (useful for terminating some graphs)."
+msgstr ""
+
+#: ../mediastreamer2/src/equalizer.c:337 ../mediastreamer2/src/equalizer.c:355
+msgid "Parametric sound equalizer."
+msgstr ""
+
+#: ../mediastreamer2/src/msdscap-mingw.cc:1003
+msgid "A webcam grabber based on directshow."
+msgstr ""
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
new file mode 100644 (file)
index 0000000..f24d99f
--- /dev/null
@@ -0,0 +1,2 @@
+EXTRA_DIST=builder-mingw.mk Portfile.tmpl Portfile-devel.tmpl
+
diff --git a/scripts/Portfile-devel.tmpl b/scripts/Portfile-devel.tmpl
new file mode 100644 (file)
index 0000000..418c0a9
--- /dev/null
@@ -0,0 +1,24 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id: PortFile 57236 2009-09-08 00:18:44Z macsforever2000@macports.org $
+
+PortSystem            1.0
+
+name                  linphone-devel
+version               @VERSION@
+categories            net
+maintainers           linphone.org:jehan.monnier
+description           voice over IP sip phone
+long_description      With linphone you can communicate freely with people over the internet, with voice and text instant messaging.
+homepage              http://www.linphone.org/index.php
+platforms             darwin
+master_sites          http://download.savannah.gnu.org/releases-noredirect/linphone/unstable/source/
+                       
+distname              linphone-${version}
+
+checksums             md5 @LINPHONE_MD5@
+
+depends_lib           port:libglade2 \
+                      port:speex-devel \
+                      port:libeXosip2 
+
+configure.args-append --disable-video --with-readline=none
diff --git a/scripts/Portfile.tmpl b/scripts/Portfile.tmpl
new file mode 100644 (file)
index 0000000..e5ccd58
--- /dev/null
@@ -0,0 +1,22 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id: PortFile 57236 2009-09-08 00:18:44Z macsforever2000@macports.org $
+
+PortSystem            1.0
+
+name                  linphone
+version               @VERSION@
+categories            net
+maintainers           linphone.org:jehan.monnier
+description           voice over IP sip phone
+long_description      With linphone you can communicate freely with people over the internet, with voice and text instant messaging.
+homepage              http://www.linphone.org/index.php
+platforms             darwin
+master_sites          http://download.savannah.gnu.org/releases-noredirect/linphone/3.2.x/sources/
+                       
+checksums             md5 @LINPHONE_MD5@
+
+depends_lib           port:libglade2 \
+                      port:speex-devel \
+                      port:libeXosip2 
+
+configure.args-append --disable-video --with-readline=none
diff --git a/scripts/builder-mingw.mk b/scripts/builder-mingw.mk
new file mode 100644 (file)
index 0000000..3559ee8
--- /dev/null
@@ -0,0 +1,116 @@
+prefix=/opt/linphone\r
+\r
+\r
+MSX264_SRC_DIR=$(LINPHONE_SRC_DIR)/mediastreamer2/plugins/msx264\r
+BUDDYLOOKUP_SRC_DIR=$(LINPHONE_SRC_DIR)/coreapi/plugins/buddylookup\r
+LOCALDIR=$(shell pwd)\r
+WORKDIR=$(LOCALDIR)/build\r
+LINPHONE_ZIP=$(WORKDIR)/linphone.zip\r
+BUDDYLOOKUP_ZIP=$(WORKDIR)/buddylookup.zip\r
+MSX264_ZIP=$(WORKDIR)/msx264.zip\r
+INSTALL_ROOT=$(WORKDIR)/root\r
+FILELIST=$(WORKDIR)/linphone-bundle.filelist\r
+\r
+LINPHONE_VERSION=strings $(INSTALL_ROOT)/bin/linphone-3.exe |grep linphone_ident | sed 's/linphone_ident_string=//'\r
+\r
+$(WORKDIR):\r
+       mkdir -p $(WORKDIR)\r
+\r
+$(INSTALL_ROOT): $(WORKDIR)\r
+       mkdir -p $(INSTALL_ROOT)\r
+\r
+\r
+\r
+#Inno Setup 5 compiler\r
+ISCC=ISCC.exe\r
+\r
+$(LINPHONE_SRC_DIR)/configure:\r
+       cd $(LINPHONE_SRC_DIR) && ./autogen.sh\r
+\r
+$(LINPHONE_SRC_DIR)/Makefile: $(LINPHONE_SRC_DIR)/configure\r
+       cd $(LINPHONE_SRC_DIR) && \\r
+       ./configure --prefix=$(prefix) --enable-shared --disable-static $(LINPHONE_CONFIGURE_EXTRA_OPTIONS)\r
+\r
+build-linphone:        $(LINPHONE_SRC_DIR)/Makefile\r
+       cd $(LINPHONE_SRC_DIR) && make newdate && make $(LINPHONE_MAKE_OPTS) && make install $(LINPHONE_MAKE_OPTS)\r
+\r
+$(LINPHONE_ZIP):       build-linphone $(WORKDIR)\r
+       cd $(LINPHONE_SRC_DIR) && make zip ZIPFILE=$(LINPHONE_ZIP) $(LINPHONE_MAKE_OPTS)\r
+\r
+install-linphone: $(LINPHONE_ZIP) $(INSTALL_ROOT)\r
+       cd $(INSTALL_ROOT) && unzip -o $(LINPHONE_ZIP)\r
+\r
+clean-linphone:\r
+       - cd  $(LINPHONE_SRC_DIR) && make clean\r
+\r
+veryclean-linphone:\r
+       - cd $(LINPHONE_SRC_DIR) && make distclean\r
+       - cd $(LINPHONE_SRC_DIR) && rm configure\r
+\r
+##### msx264 rules\r
+\r
+$(MSX264_SRC_DIR)/configure:\r
+       cd $(MSX264_SRC_DIR) && ./autogen.sh\r
+\r
+\r
+$(MSX264_SRC_DIR)/Makefile:    $(MSX264_SRC_DIR)/configure\r
+       cd $(MSX264_SRC_DIR) && \\r
+       PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig ./configure --prefix=$(prefix) --enable-shared --disable-static --enable-hacked-x264\r
+\r
+\r
+build-msx264:  build-linphone $(MSX264_SRC_DIR)/Makefile\r
+       cd $(MSX264_SRC_DIR) && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig make\r
+\r
+$(MSX264_ZIP): build-msx264\r
+       cd $(MSX264_SRC_DIR) && make zip ZIPFILE=$(MSX264_ZIP)\r
+\r
+install-msx264:        $(MSX264_ZIP) $(INSTALL_ROOT)\r
+       cd $(INSTALL_ROOT) && unzip -o $(MSX264_ZIP)\r
+\r
+clean-msx264:\r
+       - cd  $(MSX264_SRC_DIR) && make clean\r
+\r
+veryclean-msx264:\r
+       - cd $(MSX264_SRC_DIR) && make distclean\r
+       - cd $(MSX264_SRC_DIR) && rm configure\r
+\r
+###### buddylookup rules\r
+\r
+$(BUDDYLOOKUP_SRC_DIR)/configure:\r
+       cd $(BUDDYLOOKUP_SRC_DIR) && ./autogen.sh\r
+\r
+\r
+$(BUDDYLOOKUP_SRC_DIR)/Makefile:       $(BUDDYLOOKUP_SRC_DIR)/configure\r
+       cd $(BUDDYLOOKUP_SRC_DIR) && \\r
+       PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig ./configure --prefix=$(prefix) --enable-shared --disable-static\r
+\r
+\r
+build-buddylookup:     build-linphone $(BUDDYLOOKUP_SRC_DIR)/Makefile\r
+       cd $(BUDDYLOOKUP_SRC_DIR) && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig make\r
+\r
+$(BUDDYLOOKUP_ZIP):    build-buddylookup\r
+       cd $(BUDDYLOOKUP_SRC_DIR) && make zip ZIPFILE=$(BUDDYLOOKUP_ZIP)\r
+\r
+install-buddylookup:   $(BUDDYLOOKUP_ZIP) $(INSTALL_ROOT)\r
+       cd $(INSTALL_ROOT) && unzip -o $(BUDDYLOOKUP_ZIP)\r
+\r
+clean-buddylookup:\r
+       - cd  $(BUDDYLOOKUP_SRC_DIR) && make clean\r
+\r
+veryclean-buddylookup:\r
+       - cd $(BUDDYLOOKUP_SRC_DIR) && make distclean\r
+       - cd $(BUDDYLOOKUP_SRC_DIR) && rm configure\r
+\r
+\r
+$(FILELIST): \r
+       cd $(INSTALL_ROOT) && \\r
+       rm -f $(FILELIST) && \\r
+       for file in `find` ; do \\r
+               if ! test -d $$file ; then \\r
+                       echo "Source: $$file; Destdir: {app}\\`dirname $$file`; Flags: ignoreversion" \\r
+                       >> $(FILELIST) ;\\r
+               fi \\r
+       done\r
+\r
+clean-install:\r
+       rm -rf $(INSTALL_ROOT)\r
diff --git a/share/.gitignore b/share/.gitignore
new file mode 100644 (file)
index 0000000..3d11e02
--- /dev/null
@@ -0,0 +1,4 @@
+Makefile
+Makefile.in
+*.raw
+linphone.pc
diff --git a/share/C/.gitignore b/share/C/.gitignore
new file mode 100644 (file)
index 0000000..e1d2077
--- /dev/null
@@ -0,0 +1,5 @@
+Makefile
+Makefile.in
+manual
+manual.junk
+manual.html
diff --git a/share/C/Makefile.am b/share/C/Makefile.am
new file mode 100644 (file)
index 0000000..ecd7c9e
--- /dev/null
@@ -0,0 +1,8 @@
+
+HELPLANG=C
+
+include ../Makefile.inc
+
+man_MANS = linphone.1 linphonec.1 sipomatic.1 linphonecsh.1
+
+EXTRA_DIST+=$(man_MANS)
diff --git a/share/C/linphone.1 b/share/C/linphone.1
new file mode 100644 (file)
index 0000000..8c87c64
--- /dev/null
@@ -0,0 +1,42 @@
+.\" Linphone is an internet phone compatible with the Session Initiation Protocol (SIP: RFC3261 )
+.TH "linphone" "1" "1.0.0" "Simon Morlat" "linphone"
+.SH "NAME"
+.LP 
+linphone \- Gnome interface of linphone, a SIP compatible
+internet phone.
+.SH "SYNTAX"
+.LP 
+linphone [\fI\-\-help\fP] [\fI\-\-verbose\fP] 
+
+.SH "DESCRIPTION"
+.LP 
+Linphone can be started without any extra argument. All parameters are accessible from the property box.
+
+.SH "OPTIONS"
+.LP 
+.TP 
+\fB\-\-help\fR
+Output help information and exit.
+.TP 
+\fB\-\-version\fR
+Output version information and exit.
+\fB\-\-verbose\fR
+Output internal messages on stdout, this is useful for debugging.
+.SH "FILES"
+.LP 
+\fI~/.gnome2/linphone\fP 
+.br 
+This is where linphone reads its config information. You do not have to modify or edit this file.
+.br 
+
+.SH "ENVIRONMENT VARIABLES"
+
+.SH "EXAMPLES"
+
+.SH "AUTHORS"
+.LP 
+Simon MORLAT <simon.morlat@linphone.org>
+See the AUTHORS file inside linphone's source for more details.
+.SH "SEE ALSO"
+.LP 
+linphonec(1) sipomatic(1)
diff --git a/share/C/linphonec.1 b/share/C/linphonec.1
new file mode 100644 (file)
index 0000000..c19bf21
--- /dev/null
@@ -0,0 +1,69 @@
+.\" Linphone is an internet phone compatible with the Session Initiation Protocol (SIP: RFC3261 )
+.TH "linphonec" "1" "1.0.0" "Florian Winterstein & Simon MORLAT" "linphone, internet phone"
+.SH "NAME"
+.LP 
+linphonec \- Console interface of linphone, a SIP compatible
+internet phone.
+.SH "SYNTAX"
+.LP 
+linphonec [\fI\-d\fP] <\fIdebug_level\fP> [\fI\-l\fP] <\fIdebug_file\fP> [\fI\-c\fP] <\fIconfig_file\fP> 
+.br 
+linphonec \fI\-v\fP
+.SH "DESCRIPTION"
+.LP 
+Linphonec is the console version of originally Gnome internet phone linphone (http://www.linphone.org) .
+.br 
+Linphonec can be started without arguments. It doesn't need any config file to start correctly and will create a default one at the first startup if the file does not exist.
+By default the path of the config file is ~/.linphonerc .
+Most parameters (proxy, passwords) can be changed from the command line, for some of them (path of sound rings), you'll need
+to edit the .linphonerc config file.
+.br 
+Once linphonec has started, linphonec wait for some commands and is ready to receive calls.
+.br 
+The most important commands are
+.br 
+.TP 
+call <sip url> : to call someone. A sip url is in the form sip:user@host
+.TP 
+terminate      : to terminate a call
+.TP 
+answer : to accept an incoming call.
+.TP 
+help   : to display interactive help.
+.TP 
+
+
+
+.SH "OPTIONS"
+.LP 
+.TP 
+\fB\-d\fR <\fIdebug_level\fP>
+Use debug mode with given verbosity (debug_level). The debug_level is an integer in the range 0..5 .
+.TP 
+\fB\-h\fR
+Output help information and exit.
+.TP 
+\fB\-l\fR <\fIlog_file\fP>
+Specifies a file where debug information will be written. Default is stdout.
+.TP 
+\fB\-c\fR <\fIconfig_file\fP>
+Specifies the config file to read at startup.
+.TP 
+.SH "FILES"
+.LP 
+\fI~/.linphonec\fP 
+.br 
+.SH "ENVIRONMENT VARIABLES"
+.LP 
+.SH "EXAMPLES"
+.LP 
+
+.SH "AUTHORS"
+.LP 
+Florian Winterstein <fwin at gmx.de>
+.br 
+Simon Morlat <simon.morlat at linphone.org>
+.SH "SEE ALSO"
+.LP 
+linphone(1) sipomatic(1)
diff --git a/share/C/linphonecsh.1 b/share/C/linphonecsh.1
new file mode 100644 (file)
index 0000000..6c7b77f
--- /dev/null
@@ -0,0 +1,61 @@
+.\" Linphone is an internet phone compatible with the Session Initiation Protocol (SIP: RFC3261 )
+.TH "linphonecsh" "1" "3.0.0" "Simon MORLAT" "linphone, internet phone"
+.SH "NAME"
+.LP 
+linphonecsh \- Sends a command to a linphonec running in daemon mode, and exits.
+.SH "SYNTAX"
+.LP 
+linphonecsh \fIinit\fP  <\fIoptional linphonec args\fP> 
+.br 
+linphonecsh \fIexit\fP
+.br 
+linphonecsh \fIgeneric\fP  <\fIlinphonec command line surrounded by quotes\fP>
+.br
+linphonecsh \fIregister\fP  \fI--username\fP <\fIusername\fP> \fI--host\fP <\fIproxy\fP> \fI--password\fP <\fIpassword\fP>
+.br
+linphonecsh \fIunregister\fP
+.br
+linphonecsh \fIdial\fP <\fIsip address or number\fP>
+.br
+linphonecsh \fIstatus\fP <\fIdomain = one of 'register', 'hook', 'autoanswer'\fP>
+.br
+linphonecsh \fI\--help\fP
+.SH "DESCRIPTION"
+.LP 
+Linphonecsh is a small utility to send basic commands to a linphonec (console mode linphone) process.
+Unlike linphonec, linphonecsh does not wait commands from standart input: it takes the command from its arguments 
+and sends it using unix pipe to a linphonec process started in daemon mode.
+The motivation for this tool is for example to simply execute voip calls from scripts, web-servers, or javascript web pages.
+.br 
+
+The very first thing to do before doing actions is to ask linphonecsh to spawn a linphonec daemon using
+.TP
+\fBlinphonecsh init\fR
+.br
+The resulting linphonec daemon does not read or write any configuration file.
+
+When the linphonec daemon is no more needed, the following commands makes it exit properly:
+.TP
+\fBlinphonecsh exit\fR
+.br
+
+
+.SH "FILES"
+.LP 
+By default a linphonec started as a daemon by 'linphonecsh init' does not use a config file.
+.br 
+.SH "ENVIRONMENT VARIABLES"
+.LP 
+.SH "EXAMPLES"
+.LP 
+
+.SH "AUTHORS"
+.LP 
+.br 
+Simon Morlat <simon.morlat at linphone.org>
+.SH "SEE ALSO"
+.LP 
+linphonec(1) sipomatic(1) linphone(1)
+.TH <program> <section number> "<date>" "" "Linux User's Manual"
+
diff --git a/share/C/manual.lyx b/share/C/manual.lyx
new file mode 100644 (file)
index 0000000..e11ca3b
--- /dev/null
@@ -0,0 +1,654 @@
+#LyX 1.4.4 created this file. For more info see http://www.lyx.org/
+\lyxformat 245
+\begin_document
+\begin_header
+\textclass docbook
+\language english
+\inputencoding default
+\fontscheme default
+\graphics default
+\paperfontsize default
+\spacing single
+\papersize default
+\use_geometry false
+\use_amsmath 1
+\cite_engine basic
+\use_bibtopic false
+\paperorientation portrait
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\defskip medskip
+\quotes_language french
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes true
+\end_header
+
+\begin_body
+
+\begin_layout Title
+Linphone's User Manual
+\end_layout
+
+\begin_layout Date
+July, 24th 2004
+\end_layout
+
+\begin_layout Section
+Introduction
+\end_layout
+
+\begin_layout Standard
+Linphone is a simple web-phone.
+ It allows you to make two party-calls using an IP network like the internet.
+ What you need to run Linphone is :
+\end_layout
+
+\begin_layout Itemize
+a computer running the GNU/Linux operating system
+\end_layout
+
+\begin_layout Itemize
+gtk+>=2.4, in order to use the graphical interface (highly recommended!).
+ The console-only application (linphonec) does not need gtk but libreadline.
+\end_layout
+
+\begin_layout Itemize
+a sound card correctly configured to use the ALSA linux sound system
+\end_layout
+
+\begin_layout Itemize
+headphones or speakers
+\end_layout
+
+\begin_layout Itemize
+a microphone
+\end_layout
+
+\begin_layout Itemize
+a connection to a network (the Internet for example), using a modem, an
+ ethernet card, a Wifi adapter or anything else
+\end_layout
+
+\begin_layout Standard
+Since linphone needs to use the computer's sound system,  before running
+ linphone, please make sure that no other application is using the audio
+ device.
+\end_layout
+
+\begin_layout Standard
+Linphone is free, it is released under 
+\emph on
+GNU Public License
+\emph default
+.
+\end_layout
+
+\begin_layout Standard
+
+\emph on
+WARNING: This software is provided with NO WARRANTY see file COPYING for
+ details.
+ This means you SHOULD NOT use linphone for confidential conversations:
+ there is NO encryption, so it is easy for any bad-intentioned person to
+ monitor the audio streams, and thus your conversation.
+ Note also that it is not recommended to run Linphone as root.
+\end_layout
+
+\begin_layout Section
+Running linphone
+\end_layout
+
+\begin_layout Standard
+Linphone can be run in three different ways:
+\end_layout
+
+\begin_layout Itemize
+as a normal application: in the gnome menu, linphone should appear in the
+ network sub-menu.
+ If you are not running gnome, you can execute linphone directly by typing
+ linphone in a terminal, for example.
+ Please note, that when linphone is not running, you cannot receive calls.
+\end_layout
+
+\begin_layout Itemize
+as a gnome applet: add the linphone applet by right-clicking on the gnome
+ panel, linphone appears in the network menu.
+ When linphone is running silently as a gnome panel, it is able to receive
+ calls even if its window is not shown.
+ If you want the main linphone window to appear, click on the applet.
+ When somebody calls you, the main window is shown and you will hear the
+ ring normally.
+\end_layout
+
+\begin_layout Section
+Making a call
+\end_layout
+
+\begin_layout Subsection
+Basic principles
+\end_layout
+
+\begin_layout Standard
+Linphone uses the Session Initiation Protocol (SIP) to establish a connection
+ with a remote host.
+ In this protocol each caller or callee is identified by a SIP url: sip:user_nam
+e@host_name.
+ A SIP url's syntax like an email address, with a 
+\begin_inset Quotes sld
+\end_inset
+
+sip:
+\begin_inset Quotes sld
+\end_inset
+
+ prefix.
+\end_layout
+
+\begin_layout Standard
+User_name is probably your login account on a Unix machine, and host_name
+ is the machines fully qualified domain name (FQDN) or IP address.
+\end_layout
+
+\begin_layout Standard
+Note that SIP is a new telecommunication protocol designed to be simple,
+ and it is not compatible with H323 at all.
+\end_layout
+
+\begin_layout Subsection
+When IP address are not static, or not routable.
+\end_layout
+
+\begin_layout Standard
+For that purpose, you can register to a SIP provider or SIP proxy.
+ There exist several SIP proxies on the net, and some of them are free.
+ See, for example, http://iptel.org.
+ You'll have to get an account on the proxy and then tell linphone to use
+ it.
+ In this case, the user_name will assigned to you by the VoIP provider,
+ when you register, and host_name is the provider's host name (usually something
+ like sip.example.com).
+\end_layout
+
+\begin_layout Subsection
+Test trial: If you have no friends to call at the moment (because it is
+ too late for example), but would like to know if linphone is really working.
+\end_layout
+
+\begin_layout Standard
+\begin_inset LatexCommand \label{sipomatic}
+
+\end_inset
+
+Since version 0.3.0, linphone comes with a test program called '
+\emph on
+sipomatic
+\emph default
+'.
+ Sipomatic can answer automatically calls from linphone.
+ To do this:
+\end_layout
+
+\begin_layout Itemize
+run sipomatic from a terminal.
+ Sipomatic does not have a graphical interface, but you don't have to interact
+ with it, so it doesn't need one.
+\end_layout
+
+\begin_layout Itemize
+Then type the following SIP url in the main window of linphone: sip:robot@127.0.0.1
+:5064 .
+ 127.0.0.1 is the local address for your computer, and robot is the name to
+ use for calling sipomatic.
+ 5064 is the port that sipomatic is listening to.
+ Normally you should always use 5060 (i.e the default port when no port is
+ specified) to call somebody, but sipomatic is the exception: it runs on
+ port 5064.
+ The reason for this is that linphone itself already runs on 5060, and you
+ cannot have two applications running on the same port, at the same time
+ and on the same machine.
+\end_layout
+
+\begin_layout Itemize
+Then press the call button.
+ After one second, sipomatic should answer to your call and you should hear
+ a short announcement.
+\end_layout
+
+\begin_layout Section
+\begin_inset LatexCommand \label{params}
+
+\end_inset
+
+Call parameters
+\end_layout
+
+\begin_layout Subsection
+\begin_inset LatexCommand \label{paramnetwork}
+
+\end_inset
+
+Network
+\end_layout
+
+\begin_layout Standard
+Linphone allows you to set your firewall address (see section 7) or a stun
+ server address that might help linphone calling and receiving calls.
+\end_layout
+
+\begin_layout Standard
+Linphone supports ipv6: you can enable it by toggling the 
+\begin_inset Quotes fld
+\end_inset
+
+Enable ipv6
+\begin_inset Quotes frd
+\end_inset
+
+ checkbox.
+ However it can support Ipv6 and Ipv4 together.
+\end_layout
+
+\begin_layout Subsection
+\begin_inset LatexCommand \label{paramrtp}
+
+\end_inset
+
+RTP
+\end_layout
+
+\begin_layout Standard
+RTP (Real Time Protocol) is a protocol used to send media streams over networks.
+\end_layout
+
+\begin_layout Itemize
+RTP port: linphone uses default port 7078 to send and receive audio streams.
+ If you think port 7078 is used by another application, change it as you
+ wish.
+\end_layout
+
+\begin_layout Itemize
+Jitter compensation: This number represents the number of audio packets
+ linphone is waiting for before starting to play them.
+ If sometimes some audio packets are late, they have a greater chance to
+ be played.
+ Increase this parameter, if the other person's voice sounds 'chopped',
+ in order to improve the quality of the transmission.
+ This will however increase the delay (you will hear the remote user's talk
+ with a few seconds delay).
+ If, on the other hand, you are using a fast network, and you have good
+ audio drivers, you can set this parameters down to three packets, and you
+ will have a very small delay.
+\end_layout
+
+\begin_layout Subsection
+\begin_inset LatexCommand \label{paramsip}
+
+\end_inset
+
+SIP
+\end_layout
+
+\begin_layout Standard
+SIP (Session Initiation Protocol) is a protocol to establish and destroy
+ media sessions over a network.
+ In simple words, it's responsible for controlling calls.
+ It rings the remote user, initiates the call and terminates it when one
+ of the two parties hangs up.
+\end_layout
+
+\begin_layout Itemize
+SIP port: linphone uses default port 5060 to send and receive SIP packets.
+ It is highly recommended by SIP's RFC to use port 5060.
+ So, please don't change this unless you really know what you are doing.
+\end_layout
+
+\begin_layout Itemize
+Use registrar: toggle this button if you need the services of a remote SIP
+ server.
+ See section 
+\begin_inset Quotes eld
+\end_inset
+
+Registering on a remote server
+\begin_inset Quotes erd
+\end_inset
+
+ for details about this.
+\end_layout
+
+\begin_layout Subsection
+\begin_inset LatexCommand \label{paramcodec}
+
+\end_inset
+
+Codecs
+\end_layout
+
+\begin_layout Standard
+Codecs are algorithms especially designed to compress voice data.
+ For example, digitized voice in 16bit / 8000 Hz represents a data flow
+ of 128 kbits/second.
+ Using the GSM codec, this flow is reduced to 13 kbits/second, without significa
+nt loss of quality.
+ Currently the best bitrate/quality compromise is achieved by using the
+ speex codec.
+\end_layout
+
+\begin_layout Itemize
+Codec choice: linphone can use several codecs.
+ Use buttons at the bottom of the codec list to put them in order of preference.
+ Note, that according to your network connection type, some codecs are not
+ usable.
+ They appear in red and they are not selectable.
+ You can decide to use or not a usable codec (in blue) by changing its status
+ with the enable/disable buttons at the bottom of the list.
+\end_layout
+
+\begin_layout Itemize
+Connection type: select how you are connected to the network you want to
+ use (in most cases that will be the internet).
+ This helps linphone configure itself according to the bandwidth of your
+ connection type.
+ For example some some high-bitrate codecs will be automatically disabled,
+ if you select connection with a 56k modem.
+\end_layout
+
+\begin_layout Subsection
+\begin_inset LatexCommand \label{paramaudio}
+
+\end_inset
+
+Audio parameters
+\end_layout
+
+\begin_layout Standard
+In this section you will find parameters related to your sound equipment.
+\end_layout
+
+\begin_layout Itemize
+Sound card choice: if you have several sound cards on your PC, you can select
+ the one to be used by linphone.
+\end_layout
+
+\begin_layout Itemize
+Source choice: in this combo box you can choose the recording source for
+ your voice.
+ In most cases it will be the microphone (mic).
+\end_layout
+
+\begin_layout Section
+Address book
+\end_layout
+
+\begin_layout Standard
+The address book lets you store and recall names and sip addresses of people.
+\end_layout
+
+\begin_layout Standard
+When adding a new contact, a little contact box is displayed, where you
+ can fill in information about the person, mainly of course his SIP address.
+ Additionally you can toggle the 
+\begin_inset Quotes fld
+\end_inset
+
+send subscription
+\begin_inset Quotes frd
+\end_inset
+
+ button if you want the person to keep you informed of his online status
+ (ready, busy, gone...).
+ You can also choose to reject subscription from this person, meaning that
+ he will not be informed of your online status.
+\end_layout
+
+\begin_layout Section
+Using SIP proxies and registrar.
+\end_layout
+
+\begin_layout Standard
+Registering with a SIP server can be useful in two main cases:
+\end_layout
+
+\begin_layout Itemize
+Your machine does not have a public domain name, which prevents other users
+ to call you as they can't guess your IP address.
+ In this case, you can register with a proxy or redirect SIP server to get
+ a public SIP address.
+ For example, you are <sip:bob@no-host-name> and let's suppose that there
+ exists a redirect or proxy SIP server at <sip:myserver.org>.
+ By registering as 'bob' with <sip:myserver.org>, your friends will be able
+ to call you at the address <sip:bob@myserver.org> .
+ Of course, the user_name assigned to you by the SIP server may be different
+ from your login name on the local machine.
+ It can even be a number resembling a regular (PSTN) phone number, eg.
+ 5002000307.
+ The proxy or redirect server myserver.org will forward or redirect the calls
+ from your friends to your exact location.
+\end_layout
+
+\begin_layout Standard
+With linphone>=1.0.0 you can choose to use several proxies simultaneously.
+ Go to the property box, section sip, and click on add proxy.
+ You'll be prompted for a proxy address, route and your identity (also known
+ as address of record).
+ This information should be given to you by the SIP provider you registered
+ with.
+ Route can be omitted (ie.
+ is optional), so leave it empty in case you don't know what to put there.
+ The identity is the SIP address you are known by the proxy.
+ Other users on the network are supposed to always be able to find you at
+ this SIP address.
+\end_layout
+
+\begin_layout Section
+Behind a firewall
+\end_layout
+
+\begin_layout Standard
+In some cases the configuration of your network is such that linphone (or
+ any other SIP phone program) cannot tell with certainty, how other computers
+ on the network can talk to your computer.
+ This is usually the case, when your machine is behind a firewall/router
+ that uses the Network Address Translation (NAT) protocol (RFC 1631).
+ In order to find out linphone can use the services of a "Simple Traversal
+ of User datagram through Network address translators" (STUN) server (RFC
+ 3489).
+ If you are behind a NAT firewall/router put the name of your STUN server
+ in the respective field.
+ This information is usually provided to you by your SIP proxy/server and
+ most times, assuming that your SIP server is 'sip.example.com', it looks
+ like 'stun.example.com'.
+ You may also have to specify the port your STUN server listens to (default
+ 3478).
+\end_layout
+
+\begin_layout Section
+Problems
+\end_layout
+
+\begin_layout Subsection
+Connection problems
+\end_layout
+
+\begin_layout Standard
+Firewalls are the main cause of problems in call routing.
+ Check that udp ports are opened and masqueraded, and subscribe to a SIP
+ proxy outside: most proxies are able to handle firewalls issues themselves.
+ If not possible read section 7 (Behind a firewall).
+\end_layout
+
+\begin_layout Subsection
+Audio problems
+\end_layout
+
+\begin_layout Quotation
+Linphone seems to connect to the remote SIP url, it rings, but when the
+ callee answers, nothing happens and we can't hear each other.
+\end_layout
+
+\begin_layout Itemize
+Using your audio mixer program (eg.
+ 'alsamixer', 'kmix', or 'aumix') make make sure the audio output is not
+ muted and that the playback (master volume, PCM) and recording (mic) controls
+ are set to at least their medium values.
+\end_layout
+
+\begin_layout Itemize
+If the voice is sometimes interrupted, you can modify parameter RTP->jitter
+ compensation in the property box to greater values to avoid this.
+ But this will also increase the transmission delay.
+\end_layout
+
+\begin_layout Itemize
+If linphone cannot open the audio device, check if the user has the right
+ permissions to open /dev/dsp, and close all programs able to use audio
+ device (xmms, kaiman...), as at this point linphone cannot share the audio
+ device with other applications.
+\end_layout
+
+\begin_layout Itemize
+Use ALSA drivers (see 
+\begin_inset LatexCommand \url[http://www.alsa-project.org]{http://www.alsa-project.org}
+
+\end_inset
+
+).
+ Most distributions still use the old OSS kernel-official drivers, that
+ have big latency problems and are often buggy.
+ ALSA drivers are much better.
+\end_layout
+
+\begin_layout Section
+Bugs reporting and suggestions
+\end_layout
+
+\begin_layout Standard
+First go to linphone's home page at 
+\begin_inset LatexCommand \url[http://www.linphone.org]{http://www.linphone.org}
+
+\end_inset
+
+ to check if you have the latest version if linphone.
+\end_layout
+
+\begin_layout Standard
+If linphone crashes, send a report to the mailing list, linphone-users@nongnu.org.
+ If linphone does not work, but does not crash, please ensure you have read
+ this manual in its entirety before sending a bug report at the above address.
+ You can also send e-mail to the mailing list to request a specific feature,
+ that you think is missing from linphone.
+ Note that video support, and conferencing are planned features.
+ If someone is interested in helping with the translations of linphone to
+ other languages, s/he can send me a xx.po file based on the po/linphone.pot
+ file of the distribution.
+ You can also translate this user manual in other languages.
+ In any case, please contact me if you want more details.
+\end_layout
+
+\begin_layout Section
+Authors
+\end_layout
+
+\begin_layout Standard
+Simon MORLAT (simon.morlat@linphone.org) wrote: 
+\end_layout
+
+\begin_layout Itemize
+main library (coreapi)
+\end_layout
+
+\begin_layout Itemize
+gnome interface (thanks to glade !)
+\end_layout
+
+\begin_layout Itemize
+RTP library (oRTP)
+\end_layout
+
+\begin_layout Itemize
+audio/video framework and wrappers (mediastreamer)
+\end_layout
+
+\begin_layout Standard
+Aymeric Moizard (jack@atosc.org) wrotes the osip and eXosip stacks that is
+ used by linphone.
+\end_layout
+
+\begin_layout Standard
+The speex codec 
+\begin_inset LatexCommand \url[http://www.speex.org]{http://www.speex.org}
+
+\end_inset
+
+ is a high quality low bitrate codec by Jean Marc Valin.
+\end_layout
+
+\begin_layout Standard
+The GSM library was written by : Jutta Degener and Carsten Bormann,Technische
+ Universitaet Berlin.
+\end_layout
+
+\begin_layout Standard
+The LPC10-1.5 library was written by: Andy Fingerhut Applied Research Laboratory
+ <-- this line is optional if Washington University, Campus Box 1045/Bryan
+ 509 you have limited space One Brookings Drive Saint Louis, MO 63130-4899
+ jaf@arl.wustl.edu http://www.arl.wustl.edu/~jaf/ See text files in gsmlib and
+ lpc10-1.5 directories for further information.
+\end_layout
+
+\begin_layout Standard
+Icons by Pablo Marcelo Moia.
+\end_layout
+
+\begin_layout Section
+Thanks
+\end_layout
+
+\begin_layout Standard
+Thanks to Daemon Chaplin, for having done Glade, the gtk interface builder.
+\end_layout
+
+\begin_layout Standard
+Thanks to Aymeric Moizard, for his famous oSIP library.
+\end_layout
+
+\begin_layout Standard
+Thanks to Florian Winstertein, for the console interface of linphone.
+\end_layout
+
+\begin_layout Standard
+Thanks to Jean Marc Valin, for his great speex codec.
+\end_layout
+
+\begin_layout Standard
+Thanks to the authors of LPC10-1.5 and GSM code.
+\end_layout
+
+\begin_layout Standard
+Thanks to Joel Barrios ( jbarrios@-NO-SPAM-linuxparatodos.com ) for his RPMS.
+\end_layout
+
+\begin_layout Standard
+Thanks to Pablo Marcelo Moia for the great icons he has made for linphone.
+\end_layout
+
+\begin_layout Standard
+\begin_inset LatexCommand \tableofcontents{}
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document
diff --git a/share/C/manual.sgml b/share/C/manual.sgml
new file mode 100644 (file)
index 0000000..4d4155e
--- /dev/null
@@ -0,0 +1,85 @@
+<!DOCTYPE article  PUBLIC "-//OASIS//DTD DocBook V4.2//EN"
+ [ <!ENTITY % output.print.png "IGNORE">
+<!ENTITY % output.print.pdf "IGNORE">
+<!ENTITY % output.print.eps "IGNORE">
+<!ENTITY % output.print.bmp "IGNORE">
+ ]>
+
+<!-- SGML file was created by LyX 1.4.4
+  See http://www.lyx.org/ for more information -->
+<article lang="en">
+<articleinfo>
+<title>Linphone's User Manual</title>
+<date>July, 24th 2004</date></articleinfo><sect1>
+<title>Introduction</title>
+<para>Linphone is a simple web-phone. It allows you to make two party-calls using an IP network like the internet. What you need to run Linphone is :</para><itemizedlist>
+<listitem><para>a computer running the GNU/Linux operating system</para></listitem><listitem><para>gtk+&gt;=2.4, in order to use the graphical interface (highly recommended!). The console-only application (linphonec) does not need gtk but libreadline.</para></listitem><listitem><para>a sound card correctly configured to use the ALSA linux sound system</para></listitem><listitem><para>headphones or speakers</para></listitem><listitem><para>a microphone</para></listitem><listitem><para>a connection to a network (the Internet for example), using a modem, an ethernet card, a Wifi adapter or anything else</para></listitem></itemizedlist><para>Since linphone needs to use the computer's sound system,  before running linphone, please make sure that no other application is using the audio device. </para>
+<para>Linphone is free, it is released under <emphasis>GNU Public License</emphasis>.</para>
+<para><emphasis>WARNING: This software is provided with NO WARRANTY see file COPYING for details. This means you SHOULD NOT use linphone for confidential conversations: there is NO encryption, so it is easy for any bad-intentioned person to monitor the audio streams, and thus your conversation. Note also that it is not recommended to run Linphone as root.</emphasis></para></sect1><sect1>
+<title>Running linphone</title>
+<para>Linphone can be run in three different ways:</para><itemizedlist>
+<listitem><para>as a normal application: in the gnome menu, linphone should appear in the network sub-menu. If you are not running gnome, you can execute linphone directly by typing linphone in a terminal, for example. Please note, that when linphone is not running, you cannot receive calls.</para></listitem><listitem><para>as a gnome applet: add the linphone applet by right-clicking on the gnome panel, linphone appears in the network menu. When linphone is running silently as a gnome panel, it is able to receive calls even if its window is not shown. If you want the main linphone window to appear, click on the applet. When somebody calls you, the main window is shown and you will hear the ring normally.</para></listitem></itemizedlist></sect1><sect1>
+<title>Making a call</title>
+<sect2>
+<title>Basic principles</title>
+<para>Linphone uses the Session Initiation Protocol (SIP) to establish a connection with a remote host. In this protocol each caller or callee is identified by a SIP url: sip:user_name@host_name. A SIP url's syntax like an email address, with a &ldquo;sip:&ldquo; prefix.</para>
+<para>User_name is probably your login account on a Unix machine, and host_name is the machines fully qualified domain name (FQDN) or IP address.</para>
+<para>Note that SIP is a new telecommunication protocol designed to be simple, and it is not compatible with H323 at all.</para></sect2><sect2>
+<title>When IP address are not static, or not routable.</title>
+<para>For that purpose, you can register to a SIP provider or SIP proxy. There exist several SIP proxies on the net, and some of them are free. See, for example, http://iptel.org. You'll have to get an account on the proxy and then tell linphone to use it. In this case, the user_name will assigned to you by the VoIP provider, when you register, and host_name is the provider's host name (usually something like sip.example.com). </para></sect2><sect2>
+<title>Test trial: If you have no friends to call at the moment (because it is too late for example), but would like to know if linphone is really working.</title>
+<para id="sipomatic" ><!-- anchor id="sipomatic" -->Since version 0.3.0, linphone comes with a test program called '<emphasis>sipomatic</emphasis>'. Sipomatic can answer automatically calls from linphone. To do this:</para><itemizedlist>
+<listitem><para>run sipomatic from a terminal. Sipomatic does not have a graphical interface, but you don't have to interact with it, so it doesn't need one. </para></listitem><listitem><para>Then type the following SIP url in the main window of linphone: sip:robot@127.0.0.1:5064 . 127.0.0.1 is the local address for your computer, and robot is the name to use for calling sipomatic. 5064 is the port that sipomatic is listening to. Normally you should always use 5060 (i.e the default port when no port is specified) to call somebody, but sipomatic is the exception: it runs on port 5064. The reason for this is that linphone itself already runs on 5060, and you cannot have two applications running on the same port, at the same time and on the same machine.</para></listitem><listitem><para>Then press the call button. After one second, sipomatic should answer to your call and you should hear a short announcement.</para></listitem></itemizedlist></sect2></sect1><sect1 id="params" >
+<title><!-- anchor id="params" -->Call parameters</title>
+<sect2 id="paramnetwork" >
+<title><!-- anchor id="paramnetwork" -->Network</title>
+<para>Linphone allows you to set your firewall address (see section 7) or a stun server address that might help linphone calling and receiving calls.</para>
+<para>Linphone supports ipv6: you can enable it by toggling the &ldquo;Enable ipv6&rdquo; checkbox. However it can support Ipv6 and Ipv4 together.</para></sect2><sect2 id="paramrtp" >
+<title><!-- anchor id="paramrtp" -->RTP</title>
+<para>RTP (Real Time Protocol) is a protocol used to send media streams over networks.</para><itemizedlist>
+<listitem><para>RTP port: linphone uses default port 7078 to send and receive audio streams. If you think port 7078 is used by another application, change it as you wish.</para></listitem><listitem><para>Jitter compensation: This number represents the number of audio packets linphone is waiting for before starting to play them. If sometimes some audio packets are late, they have a greater chance to be played. Increase this parameter, if the other person's voice sounds 'chopped', in order to improve the quality of the transmission. This will however increase the delay (you will hear the remote user's talk with a few seconds delay). If, on the other hand, you are using a fast network, and you have good audio drivers, you can set this parameters down to three packets, and you will have a very small delay.</para></listitem></itemizedlist></sect2><sect2 id="paramsip" >
+<title><!-- anchor id="paramsip" -->SIP</title>
+<para>SIP (Session Initiation Protocol) is a protocol to establish and destroy media sessions over a network. In simple words, it's responsible for controlling calls. It rings the remote user, initiates the call and terminates it when one of the two parties hangs up.</para><itemizedlist>
+<listitem><para>SIP port: linphone uses default port 5060 to send and receive SIP packets. It is highly recommended by SIP's RFC to use port 5060. So, please don't change this unless you really know what you are doing.</para></listitem><listitem><para>Use registrar: toggle this button if you need the services of a remote SIP server. See section &ldquo;Registering on a remote server&rdquo; for details about this.</para></listitem></itemizedlist></sect2><sect2 id="paramcodec" >
+<title><!-- anchor id="paramcodec" -->Codecs</title>
+<para>Codecs are algorithms especially designed to compress voice data. For example, digitized voice in 16bit / 8000 Hz represents a data flow of 128 kbits/second. Using the GSM codec, this flow is reduced to 13 kbits/second, without significant loss of quality. Currently the best bitrate/quality compromise is achieved by using the speex codec.</para><itemizedlist>
+<listitem><para>Codec choice: linphone can use several codecs. Use buttons at the bottom of the codec list to put them in order of preference. Note, that according to your network connection type, some codecs are not usable. They appear in red and they are not selectable. You can decide to use or not a usable codec (in blue) by changing its status with the enable/disable buttons at the bottom of the list.</para></listitem><listitem><para>Connection type: select how you are connected to the network you want to use (in most cases that will be the internet). This helps linphone configure itself according to the bandwidth of your connection type. For example some some high-bitrate codecs will be automatically disabled, if you select connection with a 56k modem.</para></listitem></itemizedlist></sect2><sect2 id="paramaudio" >
+<title><!-- anchor id="paramaudio" -->Audio parameters</title>
+<para>In this section you will find parameters related to your sound equipment.</para><itemizedlist>
+<listitem><para>Sound card choice: if you have several sound cards on your PC, you can select the one to be used by linphone.</para></listitem><listitem><para>Source choice: in this combo box you can choose the recording source for your voice. In most cases it will be the microphone (mic).</para></listitem></itemizedlist></sect2></sect1><sect1>
+<title>Address book</title>
+<para>The address book lets you store and recall names and sip addresses of people. </para>
+<para>When adding a new contact, a little contact box is displayed, where you can fill in information about the person, mainly of course his SIP address. Additionally you can toggle the &ldquo;send subscription&rdquo; button if you want the person to keep you informed of his online status (ready, busy, gone...). You can also choose to reject subscription from this person, meaning that he will not be informed of your online status.</para></sect1><sect1>
+<title>Using SIP proxies and registrar.</title>
+<para>Registering with a SIP server can be useful in two main cases:</para><itemizedlist>
+<listitem><para>Your machine does not have a public domain name, which prevents other users to call you as they can't guess your IP address. In this case, you can register with a proxy or redirect SIP server to get a public SIP address. For example, you are &lt;sip:bob@no-host-name&gt; and let's suppose that there exists a redirect or proxy SIP server at &lt;sip:myserver.org&gt;. By registering as 'bob' with &lt;sip:myserver.org&gt;, your friends will be able to call you at the address &lt;sip:bob@myserver.org&gt; . Of course, the user_name assigned to you by the SIP server may be different from your login name on the local machine. It can even be a number resembling a regular (PSTN) phone number, eg. 5002000307. The proxy or redirect server myserver.org will forward or redirect the calls from your friends to your exact location.</para></listitem></itemizedlist><para>With linphone&gt;=1.0.0 you can choose to use several proxies simultaneously. Go to the property box, section sip, and click on add proxy. You'll be prompted for a proxy address, route and your identity (also known as address of record). This information should be given to you by the SIP provider you registered with. Route can be omitted (ie. is optional), so leave it empty in case you don't know what to put there. The identity is the SIP address you are known by the proxy. Other users on the network are supposed to always be able to find you at this SIP address.</para></sect1><sect1>
+<title>Behind a firewall</title>
+<para>In some cases the configuration of your network is such that linphone (or any other SIP phone program) cannot tell with certainty, how other computers on the network can talk to your computer. This is usually the case, when your machine is behind a firewall/router that uses the Network Address Translation (NAT) protocol (RFC 1631). In order to find out linphone can use the services of a "Simple Traversal of User datagram through Network address translators" (STUN) server (RFC 3489). If you are behind a NAT firewall/router put the name of your STUN server in the respective field. This information is usually provided to you by your SIP proxy/server and most times, assuming that your SIP server is 'sip.example.com', it looks like 'stun.example.com'. You may also have to specify the port your STUN server listens to (default 3478).</para></sect1><sect1>
+<title>Problems</title>
+<sect2>
+<title>Connection problems</title>
+<para>Firewalls are the main cause of problems in call routing. Check that udp ports are opened and masqueraded, and subscribe to a SIP proxy outside: most proxies are able to handle firewalls issues themselves. If not possible read section 7 (Behind a firewall).</para></sect2><sect2>
+<title>Audio problems</title>
+<blockquote>
+<para>Linphone seems to connect to the remote SIP url, it rings, but when the callee answers, nothing happens and we can't hear each other.</para>
+</blockquote><itemizedlist>
+<listitem><para>Using your audio mixer program (eg. 'alsamixer', 'kmix', or 'aumix') make make sure the audio output is not muted and that the playback (master volume, PCM) and recording (mic) controls are set to at least their medium values.</para></listitem><listitem><para>If the voice is sometimes interrupted, you can modify parameter RTP-&gt;jitter compensation in the property box to greater values to avoid this. But this will also increase the transmission delay.</para></listitem><listitem><para>If linphone cannot open the audio device, check if the user has the right permissions to open /dev/dsp, and close all programs able to use audio device (xmms, kaiman...), as at this point linphone cannot share the audio device with other applications.</para></listitem><listitem><para>Use ALSA drivers (see <ulink url="http://www.alsa-project.org">http://www.alsa-project.org</ulink>). Most distributions still use the old OSS kernel-official drivers, that have big latency problems and are often buggy. ALSA drivers are much better. </para></listitem></itemizedlist></sect2></sect1><sect1>
+<title>Bugs reporting and suggestions</title>
+<para>First go to linphone's home page at <ulink url="http://www.linphone.org">http://www.linphone.org</ulink> to check if you have the latest version if linphone.</para>
+<para>If linphone crashes, send a report to the mailing list, linphone-users@nongnu.org. If linphone does not work, but does not crash, please ensure you have read this manual in its entirety before sending a bug report at the above address. You can also send e-mail to the mailing list to request a specific feature, that you think is missing from linphone. Note that video support, and conferencing are planned features. If someone is interested in helping with the translations of linphone to other languages, s/he can send me a xx.po file based on the po/linphone.pot file of the distribution. You can also translate this user manual in other languages. In any case, please contact me if you want more details.</para></sect1><sect1>
+<title>Authors</title>
+<para>Simon MORLAT (simon.morlat@linphone.org) wrote: </para><itemizedlist>
+<listitem><para>main library (coreapi)</para></listitem><listitem><para>gnome interface (thanks to glade !)</para></listitem><listitem><para>RTP library (oRTP)</para></listitem><listitem><para>audio/video framework and wrappers (mediastreamer)</para></listitem></itemizedlist><para>Aymeric Moizard (jack@atosc.org) wrotes the osip and eXosip stacks that is used by linphone. </para>
+<para>The speex codec <ulink url="http://www.speex.org">http://www.speex.org</ulink> is a high quality low bitrate codec by Jean Marc Valin.</para>
+<para>The GSM library was written by : Jutta Degener and Carsten Bormann,Technische Universitaet Berlin.</para>
+<para>The LPC10-1.5 library was written by: Andy Fingerhut Applied Research Laboratory &lt;-- this line is optional if Washington University, Campus Box 1045/Bryan 509 you have limited space One Brookings Drive Saint Louis, MO 63130-4899 jaf@arl.wustl.edu http://www.arl.wustl.edu/~jaf/ See text files in gsmlib and lpc10-1.5 directories for further information.</para>
+<para>Icons by Pablo Marcelo Moia.</para></sect1><sect1>
+<title>Thanks</title>
+<para>Thanks to Daemon Chaplin, for having done Glade, the gtk interface builder.</para>
+<para>Thanks to Aymeric Moizard, for his famous oSIP library.</para>
+<para>Thanks to Florian Winstertein, for the console interface of linphone.</para>
+<para>Thanks to Jean Marc Valin, for his great speex codec.</para>
+<para>Thanks to the authors of LPC10-1.5 and GSM code.</para>
+<para>Thanks to Joel Barrios ( jbarrios@-NO-SPAM-linuxparatodos.com ) for his RPMS.</para>
+<para>Thanks to Pablo Marcelo Moia for the great icons he has made for linphone.</para>
+<toc></toc></sect1></article>
\ No newline at end of file
diff --git a/share/C/sipomatic.1 b/share/C/sipomatic.1
new file mode 100644 (file)
index 0000000..a1f21e8
--- /dev/null
@@ -0,0 +1,70 @@
+.\" Sipomatic is a SIP phone server. It answers automatically to incoming calls by playing a short message.
+.TH "sipomatic" "1" "1.0.0" "Simon Morlat" "linphone"
+.SH "NAME"
+.LP 
+sipomatic \- SIP auto\-responder from the linphone project.
+.SH "SYNTAX"
+.LP 
+sipomatic [\fI\-u\fP] <\fIsip\-url\fP> [\fI\-f\fP] <\fIannouce\-file\fP> [\fI\-s\fP] <\fIsend\-port\fP> 
+.LP 
+sipomatic \fI\-v\fP
+.br 
+sipomatic \fI\-\-version\fP
+.LP 
+sipomatic \fI\-h\fP
+.br 
+sipomatic \fI\-\-help\fP
+.SH "DESCRIPTION"
+.LP 
+Sipomatic is primilarly a test tool for linphone.
+It waits for incoming sip calls, and answer to them by playing a wav sound file on disk. The sended stream is encoded using the preferred codec of the calling sip\-phone.
+.br 
+The default address of sipomatic is <sip:robot@127.0.0.1:5064>
+It can be overriden with the \-u option.
+.br 
+The default annouce file 'hello.wav' can be overriden with the \-f option.
+.br 
+If you attempt to run several sipomatic on the same machine, then you will require the \-s option to specify explicitely the UDP port used by sipomatic to send its SIP messages.
+
+.SH "OPTIONS"
+.LP 
+.TP 
+\fB\-u\fR <\fIurl\fP>
+Set the sip url sipomatic listens to. The host part of address MUST always be a numerical ip address. The default url is sip:robot@127.0.0.1:5064 .
+.TP 
+\fB\-f\fR <\fIannouce\-file\fP>
+Specifies a 8000Hz 16 bits wav file to be played to the calling users. Default is usually /usr/share/sounds/linphone/hello.wav.
+.TP 
+\fB\-s\fR <\fIsend\-port\fP>
+Specifies explicitely the udp port number to be used to send SIP messages.
+.TP 
+\fB\-v\fR
+\fB\-\-version\fR
+Output version information and exits.
+.TP 
+\fB\-h\fR
+\fB\-\-help\fR
+Output help information and exits.
+.TP 
+.SH "FILES"
+.LP 
+\fI/usr/share/sounds/linphone/hello.raw\fP 
+.br 
+This is the file that sipomatic plays by default to the calling phones.
+The format of this file is a 8000 Hz 16 bit wav file.
+.br 
+
+.SH "ENVIRONMENT VARIABLES"
+.LP 
+.TP 
+\fBSIPOMATIC_URL\fP
+Specifies the address sipomatic listens to. By default it is
+<sip:robot@127.0.0.1:5064> . 
+.SH "EXAMPLES"
+
+.SH "AUTHORS"
+.LP 
+Simon MORLAT <simon.morlat@linphone.org>
+.SH "SEE ALSO"
+.LP 
+linphone(1) linphonec(1)
diff --git a/share/Makefile.am b/share/Makefile.am
new file mode 100644 (file)
index 0000000..a15fe2e
--- /dev/null
@@ -0,0 +1,36 @@
+
+SUBDIRS=C fr it ja cs
+
+LINPHONE_SOUNDS=ringback.wav hello8000.wav hello16000.wav
+LINPHONE_RINGS=rings/orig.wav \
+                               rings/oldphone.wav \
+                               rings/rock.wav \
+                               rings/bigben.wav \
+                               rings/toy.wav \
+                               rings/sweet.wav \
+                               rings/synth.wav \
+                               rings/tapping.wav
+
+sounddir=$(datadir)/sounds/linphone
+
+sound_DATA=$(LINPHONE_SOUNDS)
+
+ringdir=$(datadir)/sounds/linphone/rings
+
+ring_DATA=$(LINPHONE_RINGS)
+
+#to be compliant with freedesktop.org:
+linphone_fddir= $(datadir)/applications
+linphone_fd_DATA= linphone.desktop
+
+
+pkgconfigdir=$(libdir)/pkgconfig
+pkgconfig_DATA=linphone.pc
+
+EXTRA_DIST =                                   $(LINPHONE_SOUNDS) \
+                                                               $(LINPHONE_RINGS) \
+                                                       linphone.gnorba     \
+                                                       linphone.desktop   \
+                                                       linphone_applet.desktop \
+                                                               linphone.pc.in \
+                                                               Makefile.inc
diff --git a/share/Makefile.inc b/share/Makefile.inc
new file mode 100644 (file)
index 0000000..47c0178
--- /dev/null
@@ -0,0 +1,25 @@
+linphone_manualdir = $(datadir)/gnome/help/linphone/$(HELPLANG)/
+
+linphone_help = \
+        $(top_builddir)/share/$(HELPLANG)
+
+if ENABLE_MANUAL
+all-local:     $(linphone_help)/manual.html
+else
+all-local:
+endif
+
+$(linphone_help)/manual.html:
+       rm -f $(linphone_help)/manual.html
+       sgmltools $(srcdir)/manual.sgml
+
+install-data-local:
+                       $(mkdir_p) $(DESTDIR)$(linphone_manualdir)
+                       -cp -f $(linphone_help)/*.html $(DESTDIR)/$(linphone_manualdir)/.
+                       -cp -f $(linphone_help)/*.css $(DESTDIR)/$(linphone_manualdir)/.
+
+uninstall-local:
+                       rm -rf $(linphone_manualdir)
+
+
+EXTRA_DIST=  manual.lyx manual.sgml
diff --git a/share/cs/.gitignore b/share/cs/.gitignore
new file mode 100644 (file)
index 0000000..3dda729
--- /dev/null
@@ -0,0 +1,2 @@
+Makefile.in
+Makefile
diff --git a/share/cs/Makefile.am b/share/cs/Makefile.am
new file mode 100644 (file)
index 0000000..8bd5c40
--- /dev/null
@@ -0,0 +1,8 @@
+
+HELPLANG=cs
+
+mandir=@mandir@/$(HELPLANG)
+
+man_MANS = linphone.1 linphonec.1 sipomatic.1
+
+EXTRA_DIST=$(man_MANS)
diff --git a/share/cs/linphone.1 b/share/cs/linphone.1
new file mode 100644 (file)
index 0000000..2e9967c
--- /dev/null
@@ -0,0 +1,49 @@
+.\" Encoding: ISO-8859-2
+.\" Linphone is an internet phone compatible with the Session Initiation Protocol (SIP: RFC3261 )
+.\" Translation into Czech by Petr Písaø <petr.pisar@atlas.cz>, 2006-02-26
+.TH "linphone" "1" "1.0.0" "Simon Morlat" "linphone"
+.do hla cs
+.do hpf hyphen.cs
+.SH "JMÉNO"
+.LP 
+linphone \- Gnome rozhraní pro linphone, internetový telefon podporující SIP.
+.SH "SYNTAXE"
+.LP 
+linphone [\fI\-\-help\fP] [\fI\-\-verbose\fP] 
+
+.SH "POPIS"
+.LP 
+Linphone mù¾e být spu¹tìn bez jakýchkoliv parametrù. V¹echny parametry jsou
+mìnitelné v nabídce Nastavení.
+
+.SH "VOLBY"
+.LP 
+.TP 
+\fB\-\-help\fR
+Vypí¹e tuto nápovìdu a skonèí.
+.TP 
+\fB\-\-version\fR
+Vypí¹e verzi programu a skonèí.
+.TP
+\fB\-\-verbose\fR
+Na standardní výstup vypisuje vnitøní hlá¹ení programu. Toto je vhodné pøi
+ladìní.
+.SH "SOUBORY"
+.LP 
+\fI~/.gnome2/linphone\fP 
+.br 
+Odtud linphone naèítá svoji konfiguraci. Tento soubor nemusíte mìnit.
+.br 
+
+.SH "PROMÌNNÉ PROSTØEDÍ"
+
+.SH "PØÍKLADY"
+
+.SH "AUTOØI"
+.LP 
+Simon MORLAT <simon.morlat@linphone.org>
+Pro podrobnosti nahlédnìte do souboru AUTHORS, který je souèástí zdrojových
+kódù linphone.
+.SH "VIZ TAKÉ"
+.LP 
+linphonec(1) sipomatic(1)
diff --git a/share/cs/linphonec.1 b/share/cs/linphonec.1
new file mode 100644 (file)
index 0000000..3073c82
--- /dev/null
@@ -0,0 +1,76 @@
+.\" Encoding: ISO-8859-2
+.\" Linphone is an internet phone compatible with the Session Initiation Protocol (SIP: RFC3261 )
+.\" Translation into Czech by Petr Písaø <petr.pisar@atlas.cz>, 2006-02-26
+.TH "linphonec" "1" "1.0.0" "Florian Winterstein & Simon MORLAT" "linphone, internetový telefon"
+.do hla cs
+.do hpf hyphen.cs
+.SH "JMÉNO"
+.LP 
+linphonec \- Øádkové rozhraní k linphone, internetový telefon podporující SIP.
+.SH "SYNTAXE"
+.LP 
+linphonec [\fI\-d\fP] <\fIúroveò_ladìní\fP> [\fI\-l\fP] <\fIlogovací_soubor\fP>
+[\fI\-c\fP] <\fIkonfiguraèní_soubor\fP> 
+.br 
+linphonec \fI\-v\fP
+.SH "POPIS"
+.LP 
+Linphonec je konzolová verze internetového telefonu linphone urèeného pro
+Gnome prostøedí (http://www.linphone.org).
+.LP 
+Linphonec mù¾e být spu¹tìn bez jakýchkoliv parametrù. Pro správné spu¹tìní
+nepotøebuje ¾ádný konfiguraèní soubor. Pokud ten neexistuje, pøi prvním spu¹tìní
+bude vytvoøen vzorový.
+Standardnì je konfiguraèní soubor ulo¾en v ~/.linphonerc.
+Vìt¹ina parametrù (proxy, hesla) mù¾e být zmìnìna z pøíkazové øádky. Nìkteré
+z nich (cesta k souboru s vyzvánìním) v¹ak lze zmìnit jen úpravou
+konfiguraèního souboru .linponerc.
+.LP 
+Jakmile je linphonec spu¹tìn, oèekává pøíkazy a je pøipraven pøijímat hovory.
+.LP
+Nejdùle¾itìj¹í pøíkazy jsou:
+.br 
+.TP 
+call <sip_url>  zavolat nìkomu. sip_url je ve tvaru sip:user@host
+.TP 
+terminate       ukonèit hovor
+.TP 
+answer          pøijmout pøíchozí hovor
+.TP 
+help            zobrazit interaktivní nápovìdu
+
+.SH "VOLBY"
+.LP 
+.TP 
+\fB\-d\fR <\fIúroveò_ladìní\fP>
+Pou¾ije ladící re¾im s danou mírou upovídanosti (úroveò_ladìní). úroveò_ladìní
+je celé èíslo v rozsahu 0..5.
+.TP 
+\fB\-h\fR
+Vypí¹e nápovìdu a skonèí.
+.TP 
+\fB\-l\fR <\fIlogovací_soubor\fP>
+Urèuje soubor, kam budou zapisovány ladící informace. Jinak se pou¾ije
+standardní výstup.
+.TP 
+\fB\-c\fR <\fIkonfiguraèní_soubor\fP>
+Urèuje konfiguraèní soubor, který bude naèten pøi spu¹tìní.
+.SH "SOUBORY"
+.LP 
+\fI~/.linphonec\fP 
+.br 
+.SH "PROMÌNNÉ PROSTØEDÍ"
+.LP 
+.SH "PØÍKLADY"
+.LP 
+
+.SH "AUTOØI"
+.LP 
+Florian Winterstein <fwin at gmx.de>
+.br 
+Simon Morlat <simon.morlat at linphone.org>
+.SH "VIZ TAKÉ"
+.LP 
+linphone(1) sipomatic(1)
diff --git a/share/cs/sipomatic.1 b/share/cs/sipomatic.1
new file mode 100644 (file)
index 0000000..bf9d35c
--- /dev/null
@@ -0,0 +1,82 @@
+.\" Encoding: ISO-8859-2
+.\" Sipomatic is a SIP phone server. It answers automatically to incoming calls by playing a short message.
+.\" Translation into Czech by Petr Písaø <petr.pisar@atlas.cz>, 2006-02-26
+.TH "sipomatic" "1" "1.0.0" "Simon Morlat" "linphone"
+.do hla cs
+.do hpf hyphen.cs
+.SH "JMÉNO"
+.LP 
+sipomatic \- SIP auto\-responder z projektu linphone.
+.SH "SYNTAXE"
+.LP 
+sipomatic [\fI\-u\fP] <\fIsip\-url\fP> [\fI\-f\fP] <\fInahrávka\fP>
+[\fI\-s\fP] <\fIodchozí_port\fP> 
+.LP 
+sipomatic \fI\-v\fP
+.br 
+sipomatic \fI\-\-version\fP
+.LP 
+sipomatic \fI\-h\fP
+.br 
+sipomatic \fI\-\-help\fP
+.SH "POPIS"
+.LP
+Sipomatic je základní testovací nástroj pro linphone.
+Èeká na pøíchozí sipový hovor a odpoví na nìj pøehráním zvukového souboru typu
+WAV z disku. Odeslaný zvukový proud je kódován preferovaným kodekem volajícího
+sipového telefonu.
+.LP 
+Výchozí adresa sipomaticu je <sip:robot@127.0.0.1:5064>. Mù¾e být zmìnìna
+volbou \-u.
+.br 
+Namísto výchozího oznamovacího souboru "hello.wav" lze vybrat jiný volbou \-f. 
+.br
+Jestli¾e se budete pokou¹et spustit více sipomatic klientù na jednom stroji,
+pak budete potøebovat volbou \-s explicitnì urèit UDP port, který bude pou¾it
+k odeslání vlastních SIP zpráv.
+
+.SH "VOLBY"
+.LP 
+.TP 
+\fB\-u\fR <\fIurl\fP>
+Nastaví SIP URL, na které bude sipomatic poslouchat. Èást adresy se jménem
+poèítaèe MUSÍ být v¾dy èíselná IP adresa. Výchozí URL je sip:robot@127.0.0.1:5064
+.TP 
+\fB\-f\fR <\fInahrávka\fP>
+Urèuje 8000Hz 16bitový WAV soubor, který bude pøehrán volajícímu u¾ivateli.
+Výchozí cesta bývá /usr/share/sounds/linphone/hello.wav.
+.TP 
+\fB\-s\fR <\fIodchozí_port\fP>
+Explicitnì definuje èíslo UDP portu, který bude pou¾it pro odchozí SIP zprávy. 
+.TP 
+\fB\-v\fR
+\fB\-\-version\fR
+Vytiskne informace o verzi a skonèí.
+.TP 
+\fB\-h\fR
+\fB\-\-help\fR
+Vypí¹e nápovìdu a skonèí.
+.LP 
+.SH "SOUBORY"
+.LP 
+\fI/usr/share/sounds/linphone/hello.raw\fP 
+.br
+Toto je soubor, který sipomatic standardnì pøehraje volajícímu telefonu.
+Formát tohoto souboru je WAV vzorkovaný 16bitovou hodnotou s frekvencí
+8000 Hz.
+.br 
+
+.SH "PROMÌNNÉ PROSTØEDÍ"
+.LP 
+.TP 
+\fBSIPOMATIC_URL\fP
+Definuje adresu, na které sipomatic poslouchá. Jinak je pou¾ita 
+<sip:robot@127.0.0.1:5064> 
+.SH "PØÍKLADY"
+
+.SH "AUTOØI"
+.LP 
+Simon MORLAT <simon.morlat@linphone.org>
+.SH "VIZ TAKÉ"
+.LP 
+linphone(1) linphonec(1)
diff --git a/share/fr/.gitignore b/share/fr/.gitignore
new file mode 100644 (file)
index 0000000..e1d2077
--- /dev/null
@@ -0,0 +1,5 @@
+Makefile
+Makefile.in
+manual
+manual.junk
+manual.html
diff --git a/share/fr/Makefile.am b/share/fr/Makefile.am
new file mode 100644 (file)
index 0000000..6da5a81
--- /dev/null
@@ -0,0 +1,3 @@
+HELPLANG=fr
+
+include ../Makefile.inc
diff --git a/share/fr/manual.lyx b/share/fr/manual.lyx
new file mode 100644 (file)
index 0000000..793c7f4
--- /dev/null
@@ -0,0 +1,745 @@
+#LyX 1.1 created this file. For more info see http://www.lyx.org/
+\lyxformat 218
+\textclass docbook
+\language french
+\inputencoding latin1
+\fontscheme default
+\graphics default
+\paperfontsize default
+\spacing single 
+\papersize Default
+\paperpackage a4
+\use_geometry 0
+\use_amsmath 0
+\paperorientation portrait
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\defskip medskip
+\quotes_language french
+\quotes_times 2
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+
+\layout Title
+
+
+\begin_inset LatexCommand \label{manual}
+
+\end_inset 
+
+MANUEL DE L'UTILISATEUR DE LINPHONE
+\layout Author
+
+Simon Morlat (simon.morlat@linphone.org)
+\layout Date
+
+11-13-2001
+\layout Section
+
+Introduction
+\layout Standard
+
+Linphone est un simple logiciel de téléphonie sur le web.
+ Il permet d'effectuer des conversations comprenants deux participants en
+ utilisant un réseau IP comme Internet.
+ Ainsi, voici l'équipement nécessaire pour utiliser Linphone : 
+\layout Itemize
+
+Linux ( Peut fonctionner dans d'autres environnements tels que BSD ou d'autres
+ UNIX, mais personne ne l'a encore testé.)
+\layout Itemize
+
+Gnome 1.2 ou supérieur, installé mais pas nécessairement utilisé.
+\layout Itemize
+
+Une carte son configuré correctement.
+\layout Itemize
+
+Des écouteurs ou haut-parleurs.
+\layout Itemize
+
+Un micro.
+\layout Itemize
+
+Une connection réseau (Internet par exemple), par modem, carte réseau Ethernet
+ ...
+\layout Standard
+
+Il est préférable de fermer toutes les applications utilisant la carte son
+ avant d'utiliser Linphone.
+ Linphone est un logiciel libre, il est distribué sous la license publique
+ GNU.
+\layout Standard
+
+
+\emph on 
+ATTENTION : Ce logiciel est distribué SANS GARANTIE.
+ Lisez le fichier COPYING pour plus de détails.
+ Ceci signifie entre autre que vous ne devez pas utiliser Linphone pour
+ des conversations confidentielles : il y a AUCUN CRYPTAGE, de ce fait,
+ il est peut-être facile pour quelqu'un de mal intentionné de pirater les
+ flux audios.
+ Notez toutefois, qu'il n'est pas recommandé d'utiliser Linphone en tant
+ qu'utilisateur root.
+\layout Section
+
+Utilisation
+\layout Standard
+
+Linphone peut être utilisé suivant 3 modes différents : 
+\layout Itemize
+
+En tant qu'application (normale) : Dans le menu de Gnome, Linphone devrait
+ apparaître dans la section Réseau ( "Network" ).
+ Si vous n'utilisez pas Gnome, vous pouvez démarrer Linphone dans une fenêtre
+ terminal par exemple.
+ Quand Linphone n'est pas en cours d'éxecution, vous ne pouvez pas recevoir
+ d'appel(s).
+\layout Itemize
+
+En tant qu'applet Gnome : en cliquant sur le panneau Gnome du bouton droit,
+ ajoutez l'applet.
+ Linphone apparait dans la section Réseau.
+ En tournant en tâche de fond dans le panneau Gnome, Linphone est capable
+ de recevoir des appel(s) même si sa fenêtre n'est pas visible.
+ Si vous voulez voir la fenêtre principale, cliquez sur l'applet.
+ Quand un appel arrive, la fenêtre principale passe en premier plan,et vous
+ entendrez normalement la sonnerie retentir.
+\layout Itemize
+
+En tant que démon : Ceci est intéressant pour les non-utilisateurs de Gnome.
+ Par exemple pour KDE, vous avez un repertoire /home/user/.kde2/AutoStart/
+ où vous pouvez rajouter les applications que vous voulez voir démarrer
+ à votre début de session.
+ Ainsi, dans le repertoire cité, à l'aide du gestionnaire de fichiers, ajouter
+ un lien en cliquant du bouton droit.
+ La commande à rentrer est "linphone -daemon".
+ Vous ne verrez pas l'interface de Linphone, donc, pour la faire apparaitre,
+ démarrez Linphone normalement, par exemple à travers une fenêtre terminal.
+\layout Section
+
+Comment appeler
+\layout Subsection
+
+Principes de base
+\layout Standard
+
+Linphone utilise le protocole SIP (Session Initiation Protocol) pour établir
+ les appels avec vos correspondants.
+ Le protocole spécifie que chaque personne doit être identifié par une URL
+ sip de la forme: sip:user_name@host_name.
+ Cette manière d'adresser les personnes est très proche de celle utilisée
+ pour le courrier électronique.
+\layout Standard
+
+User_name est un nom d'utilisateurs sur une machine, comme un nom de login
+ sur une machine linux, par exemple.
+ Host_name est le nom d'une machine, soit sous forme d'adresse IP, ou plus
+ simplement sous forme de nom de domaine (ex: linphone.org)
+\layout Standard
+
+Notez que SIP est un nouveau protocole de télécommunication fait pour être
+ simple et efficace sur l'internet, et qu'il est totalement différent et
+ incompatible avec H.323.
+ H.323 est le protocole actuellement utilisé par NetMeeting ou GnomeMeeting.
+\layout Subsection
+
+Application: deux personnes (Bob et Tom) se connectent à internet par un
+ modem analogique classique.
+\layout Standard
+
+Voici la manière la plus simple de procéder : 
+\layout Standard
+
+Pré-requis : 
+\layout Itemize
+
+Un modem 28.8 Baud ou plus.
+\layout Standard
+
+Déroulement : 
+\layout Itemize
+
+Il est convenu que Bob doit appeler Tom à 21h00.
+ A 21h00, Tom se connecte à Internet en utilisant kppp, gppp ou wvdial (ou
+ un autre).
+ Dès qu'il est connecté sur l'Internet, il peut lancer Linphone.En ouvrant
+ la fenêtre de statistiques de kppp ou gppp, il peut voir son adresse IP
+ (sinon, il peut taper /sbin/ifconfig pour l'obtenir).
+ Le nom de l'interface modem doit être ppp0.
+\layout Itemize
+
+Ensuite, il envoit un email à Bob disant : "Mon adresse IP estxxx.xxx.xxx.xxx".
+\layout Itemize
+
+Bob recoit l'email et tape dans la fenêtre de Linphone le nom est l'adresse
+ IP de la personne à contacter : Tom@xxx.xxx.xxx.xxx(L'adresse IP de Tom) et
+ pour finir, il appuit sur le bouton Appeler.
+\layout Itemize
+
+Linphone sonne à la maison de Tom ...Tom a juste à répondre à l'appel en cliquant
+ sur le bouton "répondre" et ainsi devrait pouvoir commencer la discussion.
+\layout Standard
+
+Si vous rencontrez des problèmes dans une de ces étapes, allez à la section
+ 4-Problèmes.
+\layout Subsection
+
+Essai en local: vous n'avez personne à appeler pour l'instant, mais vous
+ souhaiteriez voir si linphone marche vraiment.
+\layout Standard
+
+
+\begin_inset LatexCommand \label{sipomatic}
+
+\end_inset 
+
+Depuis la version 0.3.0, Linphone est livré avec un programme de test appelé
+ "sipomatic".
+ Sipomatic peut répondre automatiquement aux appels provenant de Linphone.
+ A vous d'essayer : 
+\layout Itemize
+
+Demarrez linphone.
+\layout Itemize
+
+Démarrez sipomatic dans une fenêtre terminal.
+ Ne soyez pas supris, sipomatic ne possède aucune interface graphique, mais
+ vous n'avez pas besoin de modifier quoi-que-ce-soit.
+\layout Itemize
+
+Dans Linphone, allez dans les propriétés, section réseau, et choisissez
+ "lo" comme interface par défaut.
+ Appliquez les changements en cliquant sur OK.
+ Tapez l'adresse S.I.P suivante dans la fenêtre principale : sip:robot@127.0.0.1:5064.
+ 127.0.0.1 est l'adresse locale de votre ordinateur, et robot est le nom à
+ utiliser pour appeler sipomatic.
+ 5064 est le port par lequel sipomatic peut-être contacté.
+ Normalement, vous devez toujours utiliser 5060 pour appeler quelqu'un,
+ mais sipomatic est une exception : il fonctionne sur le port 5064.
+ La raison est que Linphone fonctionne déjà sur le port 5060, et il est
+ impossible d'avoir deux applications utilisant le même port au même instant,
+ sur la même machine.
+\layout Itemize
+
+Appuyez sur le bouton "Appeler".
+ Après quelques secondes, sipomatic devrait répondre à votre appel et vous
+ devez entendre une courte annonce.
+\layout Section
+
+
+\begin_inset LatexCommand \label{params}
+
+\end_inset 
+
+Paramètres des appels
+\layout Subsection
+
+
+\begin_inset LatexCommand \label{paramnetwork}
+
+\end_inset 
+
+Réseau
+\layout Itemize
+
+Liste des interfaces réseau: vous devez choisir une interface réseau à utiliser
+ avec Linphone.
+ Si vous voulez contacter quelqu'un sur l'Internet, vous devez choisir l'interfa
+ce réseau connectée à l'Internet.
+ Par exemple, si vous utilisez un modem, celle-ci devrait être ppp0.
+ Si vous n'êtes connecté à aucun réseau, seulement l'interface réseau locale
+ appelé lo apparaitra dans la liste.
+ La seule chose que vous pouvez faire dans ce cas la est d'appeler 
+\begin_inset LatexCommand \ref[sipomatic]{sipomatic}
+
+\end_inset 
+
+.
+\layout Itemize
+
+Type de connection: choisissez le type de connection que vous utilisez pour
+ vous connecter au réseau que vous désirez utiliser.
+ Ceci aidera Linphone à s'auto-configurer en fonction de la bande passante
+ de votre type de connection.
+\layout Subsection
+
+
+\begin_inset LatexCommand \label{paramrtp}
+
+\end_inset 
+
+RTP
+\layout Standard
+
+RTP signifie Real Time Protocol, il permet d'envoyer des flux de données
+ multimedia.
+\layout Itemize
+
+port RTP: Linphone utilise le port 7072 par défaut pour envoyer et recevoir
+ des signaux audios.
+ Si vous pensez que le port 7072 est utilisé par une autre application,
+ changez le comme vous voulez.
+\layout Itemize
+
+Jitter compensation: ce nombre représente le nombre de paquets audios que
+ Linphone attend avant de vous les faire entendre.
+ Augmentez ce nombre si vous entendez une voix hachée de manière à améliorer
+ la qualité de la transmission, mais attention, ceci augmente le delai (vous
+ entendrez la voix de l'utilisateur distant quelques millisecondes plus
+ tard).D'un autre côté, si vous utilisez un réseau parfait, et que vous disposez
+ de bon drivers audios, vous pouvez descendre ces paramètres très bas jusqu'à
+ 3 paquets, ainsi vous aurez un délai très faible.
+\layout Subsection
+
+
+\begin_inset LatexCommand \label{paramsip}
+
+\end_inset 
+
+SIP
+\layout Standard
+
+SIP (Session Initiation Protocol) est un protocole qui permet d'établir
+ des sessions de téléphonie par l'intermédiaire d'un réseau IP.
+ En simplifiant, c'est la chose qui permet de faire sonner chez l'autre
+ utilisateur, démarrer ou terminer l'appel quand l'un des deux correspondants
+ raccroche.
+\layout Itemize
+
+port SIP: Linphone utilise par défaut le port 5060 pour envoyer / recevoir
+ des paquets SIP.
+ Il est hautement recommandé par la RFC du protocole SIP d'utiliser celui-ci.
+ Donc, ne le changez pas à moins que vous n'ayez vraiment pas le choix.
+\layout Itemize
+
+Votre adresse SIP: modifiez ici votre nom d'utilisateur et votre nom de
+ machine à votre gré.
+ Bien entendu donner un nom de machine ici ne signifie pas que ce nom soit
+ connue des autres machines du réseau.
+ Néammoins linphone utilisera peu ce nom de machine et préfèrera utiliser
+ votre adresse IP pour communiquer avec d'autres machines.
+\layout Itemize
+
+Utiliser un serveur sip registrar: Cochez ce choix, si vous voulez vous
+ enregistrer sur un serveur SIP (registrar) pour obtenir différents services.
+ Quand vous n'avez pas d'adresse IP fixe, cela peut-être très intéressant
+ pour permettre à vos amis de vous appeler.
+ Regardez la section intitulée "
+\begin_inset LatexCommand \ref[enregistrement sur un serveur sip]{registering}
+
+\end_inset 
+
+".
+\layout Subsection
+
+
+\begin_inset LatexCommand \label{paramcodec}
+
+\end_inset 
+
+Codecs
+\layout Standard
+
+Les codecs sont des algorithmes utilisés pour compresser la voix.
+ Par exemple, une voix digitalisée en 16bit/8000Hz représente un flux de
+ données de 128kbits/seconde.
+ En utilisant le vocodeur GSM, ce flux est réduit à 13kbits/seconde, sans
+ perte significative de qualité.
+\layout Itemize
+
+Choix de codecs: Linphone peut utiliser plusieurs codecs.
+ Utilisez les boutons situés en dessous de la liste des codecs de manière
+ à les placer dans un order de préférence.
+ Notez bien, qu'en fonction de votre type de connection réseau, certains
+ codecs sont inutilisables.Ils apparaitront en rouge et ne seront pas sélectionna
+ble.
+ Vous pouvez décider d'utiliser ou non un codec "utilisable" (en bleu) en
+ changeant son état à l'aide du bouton activer/désactiver en dessous de
+ la liste.
+\layout Subsection
+
+
+\begin_inset LatexCommand \label{paramaudio}
+
+\end_inset 
+
+Audio parameters
+\layout Itemize
+
+Mode de pilotage: si vous avez installé des drivers ALSA avec une librairie
+ ALSA <0.9, choisissez ALSA pour avoir de meilleires performances.
+ Sinon, ou si vous n'en savez rien, choisissez OSS, cela marche suffisemment
+ bien.
+\layout Itemize
+
+Choix de la source d'enregistrement: vous pouvez choisir votre source d'enregist
+rement pour la voix.
+ Dans la plupart des cas, celle-ci sera le microphone.
+\layout Itemize
+
+Auto-kill option: en choissant cette option, Linphone essaiera de stopper
+ les processus sonores (esd & artsd) qui peuvent bloquer votre périphérique
+ sonore et ainsi provoquer des problèmes d'ouverture des périphériques par
+ Linphone quand il en a besoin.
+ Il est recommandé d'activer cette option.
+\layout Section
+
+Carnet d'adresses
+\layout Standard
+
+Depuis la version 0.4.1 linphone dispose d'un carnet d'adresses (menu connexion,
+ carnet d'addresses), avec lequel vous pouvez memoriser des adresses, et
+ les rappeler facilement lorsque vous souhaitez appeler.
+\layout Section
+
+
+\begin_inset LatexCommand \label{registering}
+
+\end_inset 
+
+Enregistrement sur un serveur sip
+\layout Standard
+
+Vous pouvez souscrire des services sur des serveurs sip distants appelés
+ registrar, proxy ou redirect server.
+ Ces services peuvent être:
+\layout Standard
+
+You can suscribe for services on remote SIP servers.
+ These services can be:
+\layout Itemize
+
+redirection: linphone va demander au serveur la création d' un compte <sip:votre
+_nom@le_serveur_sip>.
+ Cette adresse pourra alors être utilisée par vos correspondants pour vous
+ joindre.
+ Un petit example concret pour bien comprendre: vous n'êtes qu'un pauvre
+ internaute connecté temporairement grace à un modem 56k.
+ Votre machine n'a pas de nom de domaine connu et votre adresse IP change
+ à chaque nouvelle connexion.
+ Il est impossible pour vos amis de vous joindre car il ne peuvent deviner
+ votre adresse IP, à moins que vous ne leur donniez en envoyant un courriel,
+ par exemple.
+ Pour palier à ce problème, vous pouvez demander à avoir un compte sur un
+ serveur sip connu de vos amis, qui lui est fixe et tout le temps connecté.
+ Pour cela, spécifiez l'adresse du serveur dans la boite de propriété, section
+ sip.
+ Cette adresse est par exemple <sip:serveur_exemple.com> et votre nom d'utilisate
+ur est 
+\begin_inset Quotes fld
+\end_inset 
+
+Bob
+\begin_inset Quotes frd
+\end_inset 
+
+.
+ Linphone va alors envoyer au serveur un message pour l'informer de la correspon
+dance entre l'adresse <sip:bob@serveur_exemple.com> et votre adresse IP actuelle.
+ Desormais vos amis peuvent vous appeler en utilisant cette nouvelle adresse,
+ leurs appels seront alors automatiquement redirigés vers votre machine.
+ Il n'ont plus besoin de connaitre votre adresse IP qui change tout le temps
+ pour vous joindre.
+ Bien sur, <sip:serveur_exemple.com> est supposée être bien connue de tout
+ vos amis.
+\layout Itemize
+
+proxy: c'est exactement le meme principe, excepté que la redirection se
+ fait de manière transparente et invisible le linphone de l'appelant.
+\layout Standard
+
+Le registrar que vous avez spécifié peut aussi être utilisé comme proxy
+ sortant.
+ Dans ce cas tous les appels émanant de votre linphone seront dirigé vers
+ ce serveur, et il sera supposé les faire suivre vers les bonnes personnes.
+ Ceci est très utile et même indispensable lorsque vous utilisez linphone
+ dans un réseau privé abrité par un firewall, si bien sur un proxy sip est
+ actif sur le firewall.
+\layout Standard
+
+Pour utiliser solliciter un serveur sip, vous devez aller à la boîte de
+ propriété, rubrique SIP, et cocher le bouton qui se trouve en face de "use
+ registrar".
+ Tapez l'adresse du registrar, et choisissez un nom d'utilisateur qui n'est
+ pas trop fréquent de manière à éviter les conflits de noms.
+ Donnez une indication du service que le serveur doit effectuer pour vous
+ en cochant les boutons 
+\begin_inset Quotes fld
+\end_inset 
+
+redirection
+\begin_inset Quotes frd
+\end_inset 
+
+ ou 
+\begin_inset Quotes fld
+\end_inset 
+
+proxy
+\begin_inset Quotes frd
+\end_inset 
+
+.
+ Sélectionnez aussi l'option 
+\begin_inset Quotes fld
+\end_inset 
+
+le serveur est un proxy sortant
+\begin_inset Quotes frd
+\end_inset 
+
+ si vous êtes derrière un pare-feu.
+\layout Standard
+
+Enfin en fermant la boite de propriétés linphone communiquera immédiatement
+ avec le serveur SIP pour y obtenir les services demandés.
+ De même lorsque vous fermez linphone, celui ci prendra quelques secondes
+ pour se désenregistrer auprès du serveur.
+\layout Standard
+
+Une liste de serveurs sip peut être trouvée à cette addresse: 
+\begin_inset LatexCommand \url[http://www.cs.columbia.edu/~hgs/sip/servers.html]{http://www.cs.columbia.edu/~hgs/sip/servers.html}
+
+\end_inset 
+
+.
+ Malheureusement, beaucoup de ces serveurs ne fonctionnent plus, peut-être
+ à cause de la crise et de ses faillites.
+ Certains ne sont pas utilisables car ils requierent des méthodes d'autentificat
+ion qui ne sont pas encore implémentées dans linphone.
+ Afin donc de ne pas vous faire perdre votre temps, une liste des serveurs
+ sip publiques fonctionnant avec linphone est disponible sur 
+\begin_inset LatexCommand \url[http://simon.morlat.free.fr/english/servers.html]{http://simon.morlat.free.fr/english/servers.html}
+
+\end_inset 
+
+.
+\layout Section
+
+Utilisation derrière les pares-feux
+\layout Standard
+
+Linphone est capable de fonctionner derrière les firewalls grâce à un serveur
+ proxy SIP fonctionnant sur la machine firewall.
+ Un tel serveur est en cours de développement sur 
+\begin_inset LatexCommand \url[http://osipproxy.sourceforge.net]{http://osipproxy.sourceforge.net}
+
+\end_inset 
+
+.
+ Bien sûr il sera libre et basé sur la librairie LGPL oSIP.
+\layout Standard
+
+Une fois le proxy serveur mis en place, il vous faut configurer linphone
+ pour qu'il l'utilise.
+ Pour cela rendez vous dans la boite de propriétés, section SIP et cochez
+ la case 
+\begin_inset Quotes fld
+\end_inset 
+
+Utiliser un registrar SIP
+\begin_inset Quotes frd
+\end_inset 
+
+, indiquez son adresse, et cocher l'option 
+\begin_inset Quotes fld
+\end_inset 
+
+le serveur est un proxy sortant
+\begin_inset Quotes frd
+\end_inset 
+
+.
+\layout Standard
+
+Il y a un cas pour lequel le proxy n'est pas indispensable: c'est le cas
+ où les machines du réseau privé possèdent une adresse publique, le firewall
+ étant là pour filtrer les paquets entrants ou sortants.
+ Vous devez pour permettre a linphone de fonctionner avec des machines exterieur
+es, autoriser le traffic UDP sur le port SIP (par defaut 5060, il est deconseill
+é de le changer), et sur le port RTP de chaque linphone du sous réseau.
+ Le port RTP est paramètrable comme bon vous semble dans la boite de proprietés.
+\layout Section
+
+Problèmes divers
+\layout Subsection
+
+Problèmes de connexion
+\layout Quotation
+
+J'essaye d'appeler mon pote <sip:toto@example.com>, mais rien ne se passe,
+ pas de sonnerie.
+\layout Standard
+
+Vous devez vérifier que linphone utilise l'interface réseau qui vous connecte
+ sur le réseau ou se trouve votre ami.
+ La liste des interface disponibles est donnée dans la boite de propriété,
+ section réseau.
+ Sélectionnez la bonne.
+\layout Standard
+
+Si le problème persiste, il y a fort à parier que votre ami ne soit pas
+ joignable actuellement.
+\layout Subsection
+
+Problèmes audio
+\layout Quotation
+
+Linphone semble correctement établir l'appel, il sonne, mais une fois que
+ le correspondant a décrocher, plus rien ne se passe et on ne s'entend pas.
+\layout Itemize
+
+La plupart des gens ont ce genre de symptome car ils n'ont pas choisi la
+ bonne interface réseau.
+ Si vous êtes connectés par modem, ce doit être ppp0.
+ En aucun cas l'interface 
+\begin_inset Quotes fld
+\end_inset 
+
+lo
+\begin_inset Quotes frd
+\end_inset 
+
+ ne peut permettre d'avoir une communication via le réseau.
+ Elle ne sert que pour le test local avec sipomatic (voir plus haut).
+\layout Itemize
+
+Augmentez le niveau sonore d'acquisition et de restitution, à l'aide des
+ potentiomètres situés en bas de la fenêtre principale.
+\layout Itemize
+
+Si la voix de votre correspondant vous semble coupée ou hachée, vous pouvez
+ essayer d'augmenter le paramètre jitter compensation de l'onglet RTP de
+ la boite de propriété.
+ Mais attention, cela augmente la latence en contrepartie.
+\layout Itemize
+
+Si linphone ne peut se servir de la carte son, vérifiez que celle ci n'est
+ pas utilisée au meme moment par d'autres programmes audio.
+\layout Itemize
+
+Enfin utilisez les drivers sons alsa (voir 
+\begin_inset LatexCommand \url[http://www.alsa-project.org]{http://www.alsa-project.org}
+
+\end_inset 
+
+) , plutôt que les oss fournit avec le kernel linux.
+ Malheureusement la plupart des distributions utilsent encore ces vieux
+ pilotes alors qu'ils presentent de nombreux bugs et problèmes de latence.
+ Les drivers ALSA sont beaucoup plus performants.
+ Notez que si vous changer vos drivers, vous n'avez nul besoin de recompiler
+ linphone ou de changer quoi que ce soit a sa configuration.
+\layout Section
+
+Rapports de bogues et suggestions
+\layout Standard
+
+En premier lieu, allez sur le site de Linphone 
+\begin_inset LatexCommand \url[http://www.linphone.org]{http://www.linphone.org}
+
+\end_inset 
+
+ afin de vérifier que vous ayez bien la dernière version de Linphone.
+\layout Standard
+
+Si linphone plante, envoyez moi directement un message à bugs@linphone.org.
+ Si Linphone ne fonctionne pas, mais ne se plante pas, vérifiez bien que
+ vous avez bien lu ce manuel entièrement avant de m'envoyer un compte rendu
+ à l'adresse précédente.
+ Dans tous les cas veillez à m'envoyer le plus d'information possible relatifs
+ à votre problème, notamment la sortie de debug que linphone écrit lorsque
+ vous l'executez depuis un terminal.
+ Si vous désirez autre chose, n'hésitez pas à m'envoyer un email à l'adresse
+ help@linphone.org.
+ Prenez note que l'ajout de la vidéo et du mode conférence sont planifiés.
+\layout Standard
+
+Si quelqu'un est interessé pour faire des traductions de Linphone, envoyez
+ moi un fichier xx.po basé sur celui se trouvant dans po/linphone.pot de la
+ distribution.
+ Vous pouvez aussi traduire ce manuel utilisateur dans d'autres langues.
+ Dans tous les cas, contactez moi si vous voulez plus de détails.
+\layout Section
+
+Auteurs
+\layout Standard
+
+Simon MORLAT (simon.morlat@linphone.org) a ecrit: 
+\layout Itemize
+
+Programme principal (src)
+\layout Itemize
+
+librairie RTP (lprtplib)
+\layout Itemize
+
+osipua : la librarie sip User Agent au dessus d'osip.
+\layout Itemize
+
+interface pour les drivers audio (audio)
+\layout Itemize
+
+les wrappers pour les codecs lpc10-1.5, gsm et g711.
+\layout Standard
+
+Aymeric Moizard (jack@atosc.org) a ecrit la pile SIP oSIP utilisé par linphone.
+\layout Standard
+
+La librairie GSM a été écrite par: Jutta Degener and Carsten Bormann,Technische
+ Universitaet Berlin.
+\layout Standard
+
+La librairie LPC10-1.5 par: Andy Fingerhut Applied Research Laboratory <--
+ this line is optional if Washington University, Campus Box 1045/Bryan 509
+ you have limited space One Brookings Drive Saint Louis, MO 63130-4899 jaf@arl.wu
+stl.edu http://www.arl.wustl.edu/~jaf/ Lisez les fichiers textes README dans
+ les repertoire gsmlib et lpc10-1.5 pour plus d'informations.
+\layout Standard
+
+Les icones sont de Pablo Marcelo Moia et le logo de Philippe Beau.
+\layout Section
+
+Remerciements
+\layout Standard
+
+Merci à Daemon Chaplin pour avoir fait Glade, le constructeur d'interface
+ graphique GTK+.
+\layout Standard
+
+Merci aux auteurs du code des LPC10-1.5 et GSM.
+\layout Standard
+
+Merci à Joel Barrios ( jbarrios@-NO-SPAM-linuxparatodos.com ) pour ses RPMS.
+\layout Standard
+
+Merci à Pablo Marcelo Moia pour les icones.
+\layout Standard
+
+Merci à Philippe Beau pour la traduction de ce manuel en Francais, pour
+ le logo, et pour le nouveau site web qu'il a fait pour linphone.
+\layout Standard
+
+
+\begin_inset LatexCommand \tableofcontents{}
+
+\end_inset 
+
+
+\the_end
diff --git a/share/fr/manual.sgml b/share/fr/manual.sgml
new file mode 100644 (file)
index 0000000..e800f05
--- /dev/null
@@ -0,0 +1,488 @@
+<!doctype article public "-//OASIS//DTD DocBook V3.1//EN">
+
+<article lang="fr">
+<!-- DocBook file was created by LyX 1.1
+  See http://www.lyx.org/ for more information -->
+  <artheader id="manual">
+   <title>
+   MANUEL DE L'UTILISATEUR DE LINPHONE
+  </title>
+  <author>
+   Simon Morlat (simon.morlat@linphone.org)
+  </author>
+  <date>
+   11-13-2001
+  </date>
+  </artheader>
+  <sect1>
+   <title>
+   Introduction
+  </title>
+  <para>
+   Linphone est un simple logiciel de téléphonie sur le web. Il permet d'effectuer des conversations comprenants deux participants en utilisant un réseau IP comme Internet. Ainsi, voici l'équipement nécessaire pour utiliser Linphone : 
+  </para>
+  <itemizedlist>
+   <listitem>
+   <para>
+   Linux ( Peut fonctionner dans d'autres environnements tels que BSD ou d'autres UNIX, mais personne ne l'a encore testé.)
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   Gnome 1.2 ou supérieur, installé mais pas nécessairement utilisé.
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   Une carte son configuré correctement.
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   Des écouteurs ou haut-parleurs.
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   Un micro.
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   Une connection réseau (Internet par exemple), par modem, carte réseau Ethernet ...
+   </para>
+  </listitem>
+  </itemizedlist>
+  <para>
+   Il est préférable de fermer toutes les applications utilisant la carte son avant d'utiliser Linphone. Linphone est un logiciel libre, il est distribué sous la license publique GNU.
+  </para>
+  <para>
+   ATTENTION : Ce logiciel est distribué SANS GARANTIE. Lisez le fichier COPYING pour plus de détails. Ceci signifie entre autre que vous ne devez pas utiliser Linphone pour des conversations confidentielles : il y a AUCUN CRYPTAGE, de ce fait, il est peut-être facile pour quelqu'un de mal intentionné de pirater les flux audios. Notez toutefois, qu'il n'est pas recommandé d'utiliser Linphone en tant qu'utilisateur root.
+  </para>
+  </sect1>
+  <sect1>
+   <title>
+   Utilisation
+  </title>
+  <para>
+   Linphone peut être utilisé suivant 3 modes différents : 
+  </para>
+  <itemizedlist>
+   <listitem>
+   <para>
+   En tant qu'application (normale) : Dans le menu de Gnome, Linphone devrait apparaître dans la section Réseau ( &quot;Network&quot; ). Si vous n'utilisez pas Gnome, vous pouvez démarrer Linphone dans une fenêtre terminal par exemple. Quand Linphone n'est pas en cours d'éxecution, vous ne pouvez pas recevoir d'appel(s).
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   En tant qu'applet Gnome : en cliquant sur le panneau Gnome du bouton droit, ajoutez l'applet. Linphone apparait dans la section Réseau. En tournant en tâche de fond dans le panneau Gnome, Linphone est capable de recevoir des appel(s) même si sa fenêtre n'est pas visible. Si vous voulez voir la fenêtre principale, cliquez sur l'applet. Quand un appel arrive, la fenêtre principale passe en premier plan,et vous entendrez normalement la sonnerie retentir.
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   En tant que démon : Ceci est intéressant pour les non-utilisateurs de Gnome. Par exemple pour KDE, vous avez un repertoire /home/user/.kde2/AutoStart/ où vous pouvez rajouter les applications que vous voulez voir démarrer à votre début de session. Ainsi, dans le repertoire cité, à l'aide du gestionnaire de fichiers, ajouter un lien en cliquant du bouton droit. La commande à rentrer est &quot;linphone -daemon&quot;. Vous ne verrez pas l'interface de Linphone, donc, pour la faire apparaitre, démarrez Linphone normalement, par exemple à travers une fenêtre terminal.
+   </para>
+  </listitem>
+  </itemizedlist>
+  </sect1>
+  <sect1>
+   <title>
+   Comment appeler
+  </title>
+   <sect2>
+    <title>
+    Principes de base
+   </title>
+   <para>
+    Linphone utilise le protocole SIP (Session Initiation Protocol) pour établir les appels avec vos correspondants. Le protocole spécifie que chaque personne doit être identifié par une URL sip de la forme: sip:user_name@host_name. Cette manière d'adresser les personnes est très proche de celle utilisée pour le courrier électronique.
+   </para>
+   <para>
+    User_name est un nom d'utilisateurs sur une machine, comme un nom de login sur une machine linux, par exemple. Host_name est le nom d'une machine, soit sous forme d'adresse IP, ou plus simplement sous forme de nom de domaine (ex: linphone.org)
+   </para>
+   <para>
+    Notez que SIP est un nouveau protocole de télécommunication fait pour être simple et efficace sur l'internet, et qu'il est totalement différent et incompatible avec H.323. H.323 est le protocole actuellement utilisé par NetMeeting ou GnomeMeeting.
+   </para>
+   </sect2>
+   <sect2>
+    <title>
+    Application: deux personnes (Bob et Tom) se connectent à internet par un modem analogique classique.
+   </title>
+   <para>
+    Voici la manière la plus simple de procéder : 
+   </para>
+   <para>
+    Pré-requis : 
+   </para>
+   <itemizedlist>
+    <listitem>
+    <para>
+    Un modem 28.8 Baud ou plus. 
+    </para>
+   </listitem>
+   </itemizedlist>
+   <para>
+    Déroulement : 
+   </para>
+   <itemizedlist>
+    <listitem>
+    <para>
+    Il est convenu que Bob doit appeler Tom à 21h00. A 21h00, Tom se connecte à Internet en utilisant kppp, gppp ou wvdial (ou un autre). Dès qu'il est connecté sur l'Internet, il peut lancer Linphone.En ouvrant la fenêtre de statistiques de kppp ou gppp, il peut voir son adresse IP (sinon, il peut taper /sbin/ifconfig pour l'obtenir). Le nom de l'interface modem doit être ppp0.
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Ensuite, il envoit un email à Bob disant : &quot;Mon adresse IP estxxx.xxx.xxx.xxx&quot;.
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Bob recoit l'email et tape dans la fenêtre de Linphone le nom est l'adresse IP de la personne à contacter : Tom@xxx.xxx.xxx.xxx(L'adresse IP de Tom) et pour finir, il appuit sur le bouton Appeler. 
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Linphone sonne à la maison de Tom ...Tom a juste à répondre à l'appel en cliquant sur le bouton &quot;répondre&quot; et ainsi devrait pouvoir commencer la discussion. 
+    </para>
+   </listitem>
+   </itemizedlist>
+   <para>
+    Si vous rencontrez des problèmes dans une de ces étapes, allez à la section 4-Problèmes.
+   </para>
+   </sect2>
+   <sect2>
+    <title>
+    Essai en local: vous n'avez personne à appeler pour l'instant, mais vous souhaiteriez voir si linphone marche vraiment.
+   </title>
+   <para>
+    <anchor id="sipomatic" ></anchor>Depuis la version 0.3.0, Linphone est livré avec un programme de test appelé &quot;sipomatic&quot;. Sipomatic peut répondre automatiquement aux appels provenant de Linphone. A vous d'essayer : 
+   </para>
+   <itemizedlist>
+    <listitem>
+    <para>
+    Demarrez linphone.
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Démarrez sipomatic dans une fenêtre terminal. Ne soyez pas supris, sipomatic ne possède aucune interface graphique, mais vous n'avez pas besoin de modifier quoi-que-ce-soit. 
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Dans Linphone, allez dans les propriétés, section réseau, et choisissez &quot;lo&quot; comme interface par défaut. Appliquez les changements en cliquant sur OK. Tapez l'adresse S.I.P suivante dans la fenêtre principale : sip:robot@127.0.0.1:5064. 127.0.0.1 est l'adresse locale de votre ordinateur, et robot est le nom à utiliser pour appeler sipomatic. 5064 est le port par lequel sipomatic peut-être contacté. Normalement, vous devez toujours utiliser 5060 pour appeler quelqu'un, mais sipomatic est une exception : il fonctionne sur le port 5064. La raison est que Linphone fonctionne déjà sur le port 5060, et il est impossible d'avoir deux applications utilisant le même port au même instant, sur la même machine. 
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Appuyez sur le bouton &quot;Appeler&quot;. Après quelques secondes, sipomatic devrait répondre à votre appel et vous devez entendre une courte annonce.
+    </para>
+   </listitem>
+   </itemizedlist>
+   </sect2>
+  </sect1>
+  <sect1 id="params">
+   <title>
+   Paramètres des appels
+  </title>
+   <sect2 id="paramnetwork">
+    <title>
+    Réseau
+   </title>
+   <itemizedlist>
+    <listitem>
+    <para>
+    Liste des interfaces réseau: vous devez choisir une interface réseau à utiliser avec Linphone. Si vous voulez contacter quelqu'un sur l'Internet, vous devez choisir l'interface réseau connectée à l'Internet. Par exemple, si vous utilisez un modem, celle-ci devrait être ppp0. Si vous n'êtes connecté à aucun réseau, seulement l'interface réseau locale appelé lo apparaitra dans la liste. La seule chose que vous pouvez faire dans ce cas la est d'appeler <link linkend="sipomatic">sipomatic</link>.
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Type de connection: choisissez le type de connection que vous utilisez pour vous connecter au réseau que vous désirez utiliser. Ceci aidera Linphone à s'auto-configurer en fonction de la bande passante de votre type de connection.
+    </para>
+   </listitem>
+   </itemizedlist>
+   </sect2>
+   <sect2 id="paramrtp">
+    <title>
+    RTP
+   </title>
+   <para>
+    RTP signifie Real Time Protocol, il permet d'envoyer des flux de données multimedia.
+   </para>
+   <itemizedlist>
+    <listitem>
+    <para>
+    port RTP: Linphone utilise le port 7072 par défaut pour envoyer et recevoir des signaux audios. Si vous pensez que le port 7072 est utilisé par une autre application, changez le comme vous voulez.
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Jitter compensation: ce nombre représente le nombre de paquets audios que Linphone attend avant de vous les faire entendre. Augmentez ce nombre si vous entendez une voix hachée de manière à améliorer la qualité de la transmission, mais attention, ceci augmente le delai (vous entendrez la voix de l'utilisateur distant quelques millisecondes plus tard).D'un autre côté, si vous utilisez un réseau parfait, et que vous disposez de bon drivers audios, vous pouvez descendre ces paramètres très bas jusqu'à 3 paquets, ainsi vous aurez un délai très faible.
+    </para>
+   </listitem>
+   </itemizedlist>
+   </sect2>
+   <sect2 id="paramsip">
+    <title>
+    SIP
+   </title>
+   <para>
+    SIP (Session Initiation Protocol) est un protocole qui permet d'établir des sessions de téléphonie par l'intermédiaire d'un réseau IP. En simplifiant, c'est la chose qui permet de faire sonner chez l'autre utilisateur, démarrer ou terminer l'appel quand l'un des deux correspondants raccroche.
+   </para>
+   <itemizedlist>
+    <listitem>
+    <para>
+    port SIP: Linphone utilise par défaut le port 5060 pour envoyer / recevoir des paquets SIP. Il est hautement recommandé par la RFC du protocole SIP d'utiliser celui-ci. Donc, ne le changez pas à moins que vous n'ayez vraiment pas le choix.
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Votre adresse SIP: modifiez ici votre nom d'utilisateur et votre nom de machine à votre gré. Bien entendu donner un nom de machine ici ne signifie pas que ce nom soit connue des autres machines du réseau. Néammoins linphone utilisera peu ce nom de machine et préfèrera utiliser votre adresse IP pour communiquer avec d'autres machines.
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Utiliser un serveur sip registrar: Cochez ce choix, si vous voulez vous enregistrer sur un serveur SIP (registrar) pour obtenir différents services. Quand vous n'avez pas d'adresse IP fixe, cela peut-être très intéressant pour permettre à vos amis de vous appeler. Regardez la section intitulée &quot;<link linkend="registering">enregistrement sur un serveur sip</link>&quot;.
+    </para>
+   </listitem>
+   </itemizedlist>
+   </sect2>
+   <sect2 id="paramcodec">
+    <title>
+    Codecs
+   </title>
+   <para>
+    Les codecs sont des algorithmes utilisés pour compresser la voix. Par exemple, une voix digitalisée en 16bit/8000Hz représente un flux de données de 128kbits/seconde. En utilisant le vocodeur GSM, ce flux est réduit à 13kbits/seconde, sans perte significative de qualité.
+   </para>
+   <itemizedlist>
+    <listitem>
+    <para>
+    Choix de codecs: Linphone peut utiliser plusieurs codecs. Utilisez les boutons situés en dessous de la liste des codecs de manière à les placer dans un order de préférence. Notez bien, qu'en fonction de votre type de connection réseau, certains codecs sont inutilisables.Ils apparaitront en rouge et ne seront pas sélectionnable. Vous pouvez décider d'utiliser ou non un codec &quot;utilisable&quot; (en bleu) en changeant son état à l'aide du bouton activer/désactiver en dessous de la liste.
+    </para>
+   </listitem>
+   </itemizedlist>
+   </sect2>
+   <sect2 id="paramaudio">
+    <title>
+    Audio parameters
+   </title>
+   <itemizedlist>
+    <listitem>
+    <para>
+    Mode de pilotage: si vous avez installé des drivers ALSA avec une librairie ALSA &lt;0.9, choisissez ALSA pour avoir de meilleires performances. Sinon, ou si vous n'en savez rien, choisissez OSS, cela marche suffisemment bien.
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Choix de la source d'enregistrement: vous pouvez choisir votre source d'enregistrement pour la voix. Dans la plupart des cas, celle-ci sera le microphone.
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Auto-kill option: en choissant cette option, Linphone essaiera de stopper les processus sonores (esd &amp; artsd) qui peuvent bloquer votre périphérique sonore et ainsi provoquer des problèmes d'ouverture des périphériques par Linphone quand il en a besoin. Il est recommandé d'activer cette option.
+    </para>
+   </listitem>
+   </itemizedlist>
+   </sect2>
+  </sect1>
+  <sect1>
+   <title>
+   Carnet d'adresses
+  </title>
+  <para>
+   Depuis la version 0.4.1 linphone dispose d'un carnet d'adresses (menu connexion, carnet d'addresses), avec lequel vous pouvez memoriser des adresses, et les rappeler facilement lorsque vous souhaitez appeler.
+  </para>
+  </sect1>
+  <sect1 id="registering">
+   <title>
+   Enregistrement sur un serveur sip
+  </title>
+  <para>
+   Vous pouvez souscrire des services sur des serveurs sip distants appelés registrar, proxy ou redirect server. Ces services peuvent être:
+  </para>
+  <para>
+   You can suscribe for services on remote SIP servers. These services can be:
+  </para>
+  <itemizedlist>
+   <listitem>
+   <para>
+   redirection: linphone va demander au serveur la création d' un compte &lt;sip:votre_nom@le_serveur_sip&gt;. Cette adresse pourra alors être utilisée par vos correspondants pour vous joindre. Un petit example concret pour bien comprendre: vous n'êtes qu'un pauvre internaute connecté temporairement grace à un modem 56k. Votre machine n'a pas de nom de domaine connu et votre adresse IP change à chaque nouvelle connexion. Il est impossible pour vos amis de vous joindre car il ne peuvent deviner votre adresse IP, à moins que vous ne leur donniez en envoyant un courriel, par exemple. Pour palier à ce problème, vous pouvez demander à avoir un compte sur un serveur sip connu de vos amis, qui lui est fixe et tout le temps connecté. Pour cela, spécifiez l'adresse du serveur dans la boite de propriété, section sip. Cette adresse est par exemple &lt;sip:serveur_exemple.com&gt; et votre nom d'utilisateur est &ldquo;Bob&rdquo;. Linphone va alors envoyer au serveur un message pour l'informer de la correspondance entre l'adresse &lt;sip:bob@serveur_exemple.com&gt; et votre adresse IP actuelle. Desormais vos amis peuvent vous appeler en utilisant cette nouvelle adresse, leurs appels seront alors automatiquement redirigés vers votre machine. Il n'ont plus besoin de connaitre votre adresse IP qui change tout le temps pour vous joindre. Bien sur, &lt;sip:serveur_exemple.com&gt; est supposée être bien connue de tout vos amis. 
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   proxy: c'est exactement le meme principe, excepté que la redirection se fait de manière transparente et invisible le linphone de l'appelant.
+   </para>
+  </listitem>
+  </itemizedlist>
+  <para>
+   Le registrar que vous avez spécifié peut aussi être utilisé comme proxy sortant. Dans ce cas tous les appels émanant de votre linphone seront dirigé vers ce serveur, et il sera supposé les faire suivre vers les bonnes personnes. Ceci est très utile et même indispensable lorsque vous utilisez linphone dans un réseau privé abrité par un firewall, si bien sur un proxy sip est actif sur le firewall. 
+  </para>
+  <para>
+   Pour utiliser solliciter un serveur sip, vous devez aller à la boîte de propriété, rubrique SIP, et cocher le bouton qui se trouve en face de &quot;use registrar&quot;. Tapez l'adresse du registrar, et choisissez un nom d'utilisateur qui n'est pas trop fréquent de manière à éviter les conflits de noms. Donnez une indication du service que le serveur doit effectuer pour vous en cochant les boutons &ldquo;redirection&rdquo; ou &ldquo;proxy&rdquo;. Sélectionnez aussi l'option &ldquo;le serveur est un proxy sortant&rdquo; si vous êtes derrière un pare-feu.
+  </para>
+  <para>
+   Enfin en fermant la boite de propriétés linphone communiquera immédiatement avec le serveur SIP pour y obtenir les services demandés. De même lorsque vous fermez linphone, celui ci prendra quelques secondes pour se désenregistrer auprès du serveur.
+  </para>
+  <para>
+   Une liste de serveurs sip peut être trouvée à cette addresse: <ulink url="http://www.cs.columbia.edu/~hgs/sip/servers.html">http://www.cs.columbia.edu/~hgs/sip/servers.html</ulink>. Malheureusement, beaucoup de ces serveurs ne fonctionnent plus, peut-être à cause de la crise et de ses faillites. Certains ne sont pas utilisables car ils requierent des méthodes d'autentification qui ne sont pas encore implémentées dans linphone. Afin donc de ne pas vous faire perdre votre temps, une liste des serveurs sip publiques fonctionnant avec linphone est disponible sur <ulink url="http://simon.morlat.free.fr/english/servers.html">http://simon.morlat.free.fr/english/servers.html</ulink>.
+  </para>
+  </sect1>
+  <sect1>
+   <title>
+   Utilisation derrière les pares-feux
+  </title>
+  <para>
+   Linphone est capable de fonctionner derrière les firewalls grâce à un serveur proxy SIP fonctionnant sur la machine firewall. Un tel serveur est en cours de développement sur <ulink url="http://osipproxy.sourceforge.net">http://osipproxy.sourceforge.net</ulink>. Bien sûr il sera libre et basé sur la librairie LGPL oSIP.
+  </para>
+  <para>
+   Une fois le proxy serveur mis en place, il vous faut configurer linphone pour qu'il l'utilise. Pour cela rendez vous dans la boite de propriétés, section SIP et cochez la case &ldquo;Utiliser un registrar SIP&rdquo;, indiquez son adresse, et cocher l'option &ldquo;le serveur est un proxy sortant&rdquo;.
+  </para>
+  <para>
+   Il y a un cas pour lequel le proxy n'est pas indispensable: c'est le cas où les machines du réseau privé possèdent une adresse publique, le firewall étant là pour filtrer les paquets entrants ou sortants. Vous devez pour permettre a linphone de fonctionner avec des machines exterieures, autoriser le traffic UDP sur le port SIP (par defaut 5060, il est deconseillé de le changer), et sur le port RTP de chaque linphone du sous réseau. Le port RTP est paramètrable comme bon vous semble dans la boite de proprietés.
+  </para>
+  </sect1>
+  <sect1>
+   <title>
+   Problèmes divers
+  </title>
+   <sect2>
+    <title>
+    Problèmes de connexion
+   </title>
+   <blockquote>
+   <para>
+    J'essaye d'appeler mon pote &lt;sip:toto@example.com&gt;, mais rien ne se passe, pas de sonnerie.
+   </para>
+   </blockquote>
+   <para>
+    Vous devez vérifier que linphone utilise l'interface réseau qui vous connecte sur le réseau ou se trouve votre ami. La liste des interface disponibles est donnée dans la boite de propriété, section réseau. Sélectionnez la bonne. 
+   </para>
+   <para>
+    Si le problème persiste, il y a fort à parier que votre ami ne soit pas joignable actuellement.
+   </para>
+   </sect2>
+   <sect2>
+    <title>
+    Problèmes audio
+   </title>
+   <blockquote>
+   <para>
+    Linphone semble correctement établir l'appel, il sonne, mais une fois que le correspondant a décrocher, plus rien ne se passe et on ne s'entend pas.
+   </para>
+   </blockquote>
+   <itemizedlist>
+    <listitem>
+    <para>
+    La plupart des gens ont ce genre de symptome car ils n'ont pas choisi la bonne interface réseau. Si vous êtes connectés par modem, ce doit être ppp0. En aucun cas l'interface &ldquo;lo&rdquo; ne peut permettre d'avoir une communication via le réseau. Elle ne sert que pour le test local avec sipomatic (voir plus haut).
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Augemtez le niveau sonore d'acquisition et de restitution, à l'aide des potentiomètres situés en bas de la fenêtre principale.
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Si la voix de votre correspondant vous semble coupée ou hachée, vous pouvez essayer d'augmenter le paramètre jitter compensation de l'onglet RTP de la boite de propriété. Mais attention, cela augmente la latence en contrepartie.
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Si linphone ne peut se servir de la carte son, vérifiez que celle ci n'est pas utilisée au meme moment par d'autres programmes audio. 
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Enfin utilisez les drivers sons alsa (voir <ulink url="http://www.alsa-project.org">http://www.alsa-project.org</ulink>) , plutôt que les oss fournit avec le kernel linux. Malheureusement la plupart des distributions utilsent encore ces vieux pilotes alors qu'ils presentent de nombreux bugs et problèmes de latence. Les drviers ALSA sont beaucoup plus performants. Notez que si vous changer vos drivers, vous n'avez nul besoin de recompiler linphone ou de changer quoi que ce soit a sa configuration. 
+    </para>
+   </listitem>
+   </itemizedlist>
+   </sect2>
+  </sect1>
+  <sect1>
+   <title>
+   Rapports de bogues et suggestions
+  </title>
+  <para>
+   En premier lieu, allez sur le site de Linphone <ulink url="http://www.linphone.org">http://www.linphone.org</ulink> afin de vérifier que vous ayez bien la dernière version de Linphone. 
+  </para>
+  <para>
+   Si linphone plante, envoyez moi durectement un message à bugs@linphone.org. Si Linphone ne fonctionne pas, mais ne se plante pas, vérifiez bien que vous avez bien lu ce manuel entièrement avant de m'envoyer un compte rendu à l'adresse précédente. Dans tous les cas veillez à m'envoyer le plus d'information possible relatifs à votre problème, notamment la sortie de debug que linphone ecrit lorsque vous l'executez depuis un terminal. Si vous désirez autre chose, n'hésitez pas à m'envoyer un email à l'adresse help@linphone.org. Prenez note que l'ajout de la vidéo et du mode conférence sont planifiés. 
+  </para>
+  <para>
+   Si quelqu'un est interessé pour faire des traductions de Linphone, envoyez moi un fichier xx.po basé sur celui se trouvant dans po/linphone.pot de la distribution. Vous pouvez aussi traduire ce manuel utiisateur dans d'autres langues. Dans tous les cas, contactez moi si vous voulez plus de détails.
+  </para>
+  </sect1>
+  <sect1>
+   <title>
+   Auteurs
+  </title>
+  <para>
+   Simon MORLAT (simon.morlat@linphone.org) a ecrit: 
+  </para>
+  <itemizedlist>
+   <listitem>
+   <para>
+   Programme principal (src)
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   librairie RTP (lprtplib)
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   osipua : la librarie sip User Agent au dessus d'osip.
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   interface pour les drivers audio (audio)
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   les wrappers pour les codecs lpc10-1.5, gsm et g711. 
+   </para>
+  </listitem>
+  </itemizedlist>
+  <para>
+   Aymeric Moizard (jack@atosc.org) a ecrit la pile SIP oSIP utilisé par linphone. 
+  </para>
+  <para>
+   La librairie GSM a été écrite par: Jutta Degener and Carsten Bormann,Technische Universitaet Berlin.
+  </para>
+  <para>
+   La librairie LPC10-1.5 par: Andy Fingerhut Applied Research Laboratory &lt;-- this line is optional if Washington University, Campus Box 1045/Bryan 509 you have limited space One Brookings Drive Saint Louis, MO 63130-4899 jaf@arl.wustl.edu http://www.arl.wustl.edu/&tilde;jaf/ Lisez les fichiers textes README dans les repertoire gsmlib et lpc10-1.5 pour plus d'informations.
+  </para>
+  <para>
+   Les icones sont de Pablo Marcelo Moia et le logo de Philippe Beau.
+  </para>
+  </sect1>
+  <sect1>
+   <title>
+   Remerciements
+  </title>
+  <para>
+   Merci à Daemon Chaplin pour avoir fait Glade, le constructeur d'interface graphique GTK+.
+  </para>
+  <para>
+   Merci aux auteurs du code des LPC10-1.5 et GSM.
+  </para>
+  <para>
+   Merci à Joel Barrios ( jbarrios@-NO-SPAM-linuxparatodos.com ) pour ses RPMS.
+  </para>
+  <para>
+   Merci à Pablo Marcelo Moia pour les icones.
+  </para>
+  <para>
+   Merci à Philippe Beau pour la traduction de ce manuel en Francais, pour le logo, et pour le nouveau site web qu'il a fait pour linphone.
+  </para>
+  <para>
+   <toc></toc>
+  </para>
+  </sect1>
+
+
+</article>
diff --git a/share/hello16000.wav b/share/hello16000.wav
new file mode 100644 (file)
index 0000000..92d44b1
Binary files /dev/null and b/share/hello16000.wav differ
diff --git a/share/hello8000.wav b/share/hello8000.wav
new file mode 100644 (file)
index 0000000..b787b20
Binary files /dev/null and b/share/hello8000.wav differ
diff --git a/share/it/.gitignore b/share/it/.gitignore
new file mode 100644 (file)
index 0000000..e1d2077
--- /dev/null
@@ -0,0 +1,5 @@
+Makefile
+Makefile.in
+manual
+manual.junk
+manual.html
diff --git a/share/it/Makefile.am b/share/it/Makefile.am
new file mode 100644 (file)
index 0000000..e194637
--- /dev/null
@@ -0,0 +1,3 @@
+HELPLANG=it
+
+include ../Makefile.inc
diff --git a/share/it/manual.lyx b/share/it/manual.lyx
new file mode 100644 (file)
index 0000000..d0a0b06
--- /dev/null
@@ -0,0 +1,741 @@
+#LyX 1.1 created this file. For more info see http://www.lyx.org/
+\lyxformat 218
+\textclass docbook
+\language french
+\inputencoding latin1
+\fontscheme default
+\graphics default
+\paperfontsize default
+\spacing single 
+\papersize Default
+\paperpackage a4
+\use_geometry 0
+\use_amsmath 0
+\paperorientation portrait
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\defskip medskip
+\quotes_language french
+\quotes_times 2
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+
+\layout Title
+
+
+\begin_inset LatexCommand \label{manual}
+
+\end_inset 
+
+MANUALE UTENTE LINPHONE
+\layout Author
+
+Simon Morlat (simon.morlat@linphone.org)
+\layout Date
+
+11-13-2001
+\layout Section
+
+Introduzione
+\layout Standard
+
+Linphone è un semplice strumento di telefonia su rete.
+ Permette di effettuare conversazioni tra due utenti utilizzando una modalità
+ IP come Internet.
+ Ecco l'equipaggiamento necessario per usare Linphone : 
+\layout Itemize
+
+Linux ( Può funzionare anche in altri ambienti come BSD, o altri\SpecialChar ~
+ UNIX, ma
+ non l'ho ancora testato personalmente.)
+\layout Itemize
+
+Gnome 1.2 o superiore, installato ma non necessariamente usato.
+\layout Itemize
+
+Una scheda sonora correttamente configurata.
+\layout Itemize
+
+Cuffie o altoparlanti.
+\layout Itemize
+
+Un microfono.
+\layout Itemize
+
+Una connessione rete (Internet ad esempio), modem, scheda Ethernet ...
+\layout Standard
+
+\SpecialChar ~
+E' consigliabile chiudere tutte le applicazioni che fanno uso della scheda
+ sonora prima di usare Linphone.
+ Linphone è un programma libero, distribuito sotto la licenza pubblica GNU.
+\layout Standard
+
+
+\emph on 
+ATTENZIONE : Questo strumento è distribuito SENZA GARANZIA.
+ Leggere il file COPYING per maggiori dettagli.
+ Questo significa tra l'altro che non dovete usare Linphone per chiamate
+ confidenziali: non ha ALCUNA CODIFICA DI PROTEZIONE, e quindi può essere
+ molto facile per qualche malintenzionato captare i flussi audio.
+ Si noti inoltre che si raccomanda di non usare Linphone come utente root.
+\layout Section
+
+Uso
+\layout Standard
+
+Linphone può essere usato in 3 modi diversi : 
+\layout Itemize
+
+Come applicazione (normale) : nel menu Gnome, Linphone dovrebbe apparire
+ nella sezione Rete.
+ Se non utilizzi Gnome, puoi lanciare Linphone da una finestra terminale,
+ per esempio.
+ Quando Linphone non è in esecuzione, non è possibile ricevere chiamate.
+\layout Itemize
+
+Come applet Gnome : cliccando sul pannello Gnome col pulsante destro, aggiungere
+ l'applet.
+ Linphone apparirà nella sezione Rete.
+ Apparendo nel pannello Gnome, Linphone è capace di ricevere chiamate anche
+ se la sua finestra non è visibile.
+ Se si vuol vedere la finestra principale, cliccare sull'applet.
+ Quando c'è una chiamata, la finestra principale passa in primo piano, e
+ sentirai gli squilli della chiamata.
+\layout Itemize
+
+Come demone : questo è interessante per coloro che non utilizzano Gnome.
+ Per esempio, per KDE, c'é una directory /home/user/.kde2/AutoStart/ dove
+ si possono inserire le applicazioni che si vogliono lanciare ad inizio
+ sessione.
+ Nella directory citata, con l'aiuto di un gestore di file, aggiungere un
+ collegamento cliccando col pulsante destro.
+ Il comando da inserire è "linphone -daemon".
+ L'interfaccia prinicipale di Linphone non sarà visibile, e dunque, per
+ farla apparire, si lanci Linphone normalmente, per esempio da una finestra
+ terminale.
+\layout Section
+
+Come lanciarlo
+\layout Subsection
+
+Principi di base
+\layout Standard
+
+Linphone utilizza il protocollo SIP (Session Initiation Protocol) per effettuare
+ chiamate con altri interlocutori.
+ Il protocollo specifica che ciascuna persona dev'essere identificata da
+ un URL sip della forma: sip:nome_utente@nome_host.
+ Questo modo di chiamare le persone è molto simile a quello utilizzato per
+ la posta elettronica.
+\layout Standard
+
+Nome_utente è il nome di un utente su una macchina, come il login su una
+ macchina linux, per esempio.
+ Nome_host è il nome di una macchina sotto forma di indirizzo IP, o più
+ semplicemente sotto forma di dominio (es: linphone.org).
+\layout Standard
+
+Si noti che SIP è un nuovo protocollo di telecomunicazione fatto per essere
+ semplice ed efficace su internet, che è totalmente diverso ed incompatibile
+ con H.323.
+ H.323 è il protocollo attualmente usato da NetMeeting e GnomeMeeting.
+\layout Subsection
+
+Applicazione: due persone (Bob e Tom) si connettono ad internet con un modem
+ analogico classico.
+\layout Standard
+
+Ecco il modo più semplice di procedere : 
+\layout Standard
+
+Prerequisito : 
+\layout Itemize
+
+Un modem da 28.8 Baud o più.
+\layout Standard
+
+Procedimento: 
+\layout Itemize
+
+Si è convenuto che Bob debba chiamare Tom alle 21.00.
+ Alle 21.00, Tom si connette ad Internet utilizzando kppp, gppp o wvdial
+ (o un altro).
+ Una volta connesso ad internet, può lanciare Linphone.
+ Aprendo la finestra delle statistiche di kppp o gppp, può vedere il suo
+ indirizzo IP (altrimenti può digitare /sbin/ifconfig per vederlo).
+ Il nome dell'interfaccia modem dev'essere ppp0.
+\layout Itemize
+
+Di seguito, manda un messaggio a Bob dicendo : "Il mio indirizzo IP è xxx.xxx.xxx.x
+xx".
+\layout Itemize
+
+Bob legge l'email e riporta nella finestra di Linphone il nome e l'indirizzo
+ IP della personne da contattare : Tom@xxx.xxx.xxx.xxx(L'indirizzo IP di Tom)
+ e per finire, clicca sul pulsante Chiamare.
+\layout Itemize
+
+Linphone suona a casa di Tom ...Tom risponde alla chiamata cliccando sul pulsante
+ "Rispondere" ed a questo punto la conversazione può iniziare.
+\layout Standard
+
+Se si incontrassero problemi in uno di questi punti, si vada alla sezione
+ 4 - Problemi.
+\layout Subsection
+
+Test in locale: non hai nessuno da chiamare per il momento, ma vuoi controllare
+ se Linphone funzioni davvero.
+\layout Standard
+
+
+\begin_inset LatexCommand \label{sipomatic}
+
+\end_inset 
+
+A partire dalla versione 0.3.0, Linphone è dotato di un programma di test
+ chiamato "sipomatic".
+ Sipomatic può rispondere automaticamente alle chiamate provenienti da Linphone.
+ A voi la scelta :
+\layout Itemize
+
+Lanciare linphone.
+\layout Itemize
+
+Lanciare sipomatic in una finestra terminale.
+ Non siate sorpresi, sipomatic non possiede alcuna interfaccia grafica,
+ ma non c'è bisogno di modificare quello che sta sotto.
+\layout Itemize
+
+In Linphone, menu Parametri, sezione Rete, scegliere "lo" come interfaccia
+ di default.
+ Applicare il cambiamento cliccando su OK.
+ Digitare l'indirizzo S.I.P seguente nella finestra principale : sip:robot@127.0.0.1:
+5064.
+ 127.0.0.1 è l'indirizzo locale del tuo computer, e robot è il nome da usare
+ per chiamare sipomatic.
+ 5064 è la porta con cui sipomatic può essere contattato.
+ Normalmente si deve utilizzare 5060 per chiamare qualcuno, ma sipomatic
+ fa eccezione : funziona con la porta 5064.
+ Il motivo è che Linphone funziona già sulla porta 5060, ed è impossibile
+ avere due applicazioni che utilizzino la stessa porta nello stesso momento,
+ sulla stessa macchina.
+\layout Itemize
+
+Cliccare sul pulsante "Chiamare".
+ Dopo qualche secondo, sipomatic dovrebbe rispondere alla chiamata e vi
+ dovrebbe dire un breve messaggio.
+\layout Section
+
+
+\begin_inset LatexCommand \label{params}
+
+\end_inset 
+
+Parametri di chiamata
+\layout Subsection
+
+
+\begin_inset LatexCommand \label{paramnetwork}
+
+\end_inset 
+
+Rete
+\layout Itemize
+
+Lista delle interfacce di rete: bisogna scegliere un'interfaccia di rete
+ da usare con Linphone.
+ Se si vuole contattare qualcuno su Internet, bisogna scegliere l'interfaccia
+ di rete connessa ad Internet.
+ Per esempio, se si utilizza un modem, dovrà essere ppp0.
+ Se non si è connessi ad alcuna rete, solo l'interfaccia di rete locale,
+ chiamata lo, apparirà nella lista.
+ L'unica scelta che si può fare in questo caso è chiamare 
+\begin_inset LatexCommand \ref[sipomatic]{sipomatic}
+
+\end_inset 
+
+.
+\layout Itemize
+
+Tipo di connessione: scegliere il tipo di connessione utilizzata per connettervi
+ alla rete che si desidera utilizzare.
+ Questo aiuterà Linphone ad autoconfigurarsi in funzione della banda passante
+ del tipo di connessione.
+\layout Subsection
+
+
+\begin_inset LatexCommand \label{paramrtp}
+
+\end_inset 
+
+RTP
+\layout Standard
+
+RTP 
+\layout Itemize
+
+porta RTP: \SpecialChar ~
+Linphone utilizza la porta 7072 di default per inviare e ricevere
+ segnali audio.
+ Se la porta 7072 è usata da un'altra applicazione, la si cambi a piacere.
+\layout Itemize
+
+Compensazione Jitter: questo numero rappresenta il numero di pacchetti audio
+ che Linphone aspetta prima di farli sentire.
+ Si aumenti questo numero se si sente male la voce, in modo da migliorare
+ la qualità di trasmissione, ma attenzione: questo aumenta il ritardo (Si
+ sentirà la voce dell'interlocutore qualche millisecondo più tardi).
+ D'altro canto, se si utilizza un server perfetto, e si dispone di buoni
+ driver audio, si può scegliere un valore basso fino a 3 pacchetti, sentendo
+ così un ritardo trascurabile.
+\layout Subsection
+
+
+\begin_inset LatexCommand \label{paramsip}
+
+\end_inset 
+
+SIP
+\layout Standard
+
+SIP (Session Initiation Protocol) è un protocollo che permette di stabilire
+ sessioni telefoniche grazie ad un server IP.
+ Semplificando, è ciò che permette di far suonare il telefono all'altro
+ interlocutore, sospendere o terminare una chiamata quando uno dei due riattacca.
+\layout Itemize
+
+porta SIP: Linphone utilizza di default la porta 5060 per inviare / ricevere
+ pacchetti SIP.
+ Si raccomanda caldamente per la RFC del protocollo SIP di utilizzare questo
+ valore.
+ Non lo si cambi a meno che non si sappia davvero cosa si stia facendo.
+\layout Itemize
+
+Indirizzo SIP: modifica nome utente e macchina a piacere.
+ Beninteso, dare un nome di macchina quinon significa che questo nome sia
+ conosciuto da altre macchine del server.
+ Nemmeno Linphone userà il nome della macchina e preferirà usare l'indirizzo
+ IP per comunicare con altre macchine.
+\layout Itemize
+
+Usare un server segretario sip: si faccia questa scelta, se ci si vuole
+ registrare su un server SIP (segretario) per ottenere servizi vari.
+ Quando non si ha un indirizzo IP fisso, questo può essere interessante
+ per permettere agli amici di chiamare.
+ Vedere la sezione "
+\begin_inset LatexCommand \ref[enregistrement sur un serveur sip]{registering}
+
+\end_inset 
+
+".
+\layout Subsection
+
+
+\begin_inset LatexCommand \label{paramcodec}
+
+\end_inset 
+
+Codec
+\layout Standard
+
+I codecs sono algoritmi per comprimere la voce.
+ Per esempio, una voce digitalizzata a 16bit/8000Hz rappresenta un flusso
+ di dati di 128kbits/secondo.
+ Usando il codificatore vocale GSM, questo flusso è ridotto a 13kbits/secondo,
+ senza perdita significativa di qualità.
+\layout Itemize
+
+Scelta dei codecs: Linphone può usare diversi codec.
+ Usare i pulsanti posti a lato della lista dei codec in modo da porli nell'ordin
+e preferito.
+ Si badi bene, che in funzione del tipo di connessione alla rete, alcuni
+ codec sono inutilizzabili.
+ Questi appariranno in rosso e non saranno selezionabili.
+ Si può decidere di usare o no un codec "utilizzabile" (in blu) cambiando
+ il suo stato con l'aiuto del pulsante Attiva / Disattiva in fianco alla
+ lista.
+\layout Subsection
+
+
+\begin_inset LatexCommand \label{paramaudio}
+
+\end_inset 
+
+Parametri audio
+\layout Itemize
+
+Modo d'uso: se si ha installato il driver ALSA con una libreria ALSA <0.9,
+ si scelga ALSA per avere risultati migliori.
+ Altrimenti, o se non si sa, usare OSS, che funziona sufficientemente bene.
+\layout Itemize
+
+\SpecialChar ~
+Scelta della fonte di registrazione: si può scegliere la fonte di registrazione
+ per la voce.
+ Nella maggior parte dei casi, sarà il microfono.
+\layout Itemize
+
+Opzione auto-kill: scegliendo questa opzione, Linphone fermerà i server
+ sonori (esd &#38; artsd) che possono bloccare la periferica sonora e provocare
+ così problemi problemi d'apertura delle periferiche da parte di Linphone
+ in caso di bisogno.
+ Si raccomanda di attivare questa opzione.
+\layout Section
+
+Rubrica
+\layout Standard
+
+A partire dalla versione 0.4.1 Linphone dispone di una rubrica (menu connessione,
+ rubrica), con la quale memorizzare indirizzi, e richiamarli facilmente
+ quando si vuol chiamare.
+\layout Section
+
+
+\begin_inset LatexCommand \label{registering}
+
+\end_inset 
+
+Registrazione su un server sip
+\layout Standard
+
+E' possibile sottoscrivere alcuni servizi sui server sip remoti chiamati
+ segretari, proxy o server ridiretti.
+ Questi servizi possono essere:
+\layout Itemize
+
+ridirezione: Linphone chiede al server la creazione di un account <sip:votre_nom
+@le_serveur_sip>.
+ Questo indirizzo potrà allora essere utilizzato dai tuoi interlocutori
+ per connetterti.
+ Un piccolo esempio concreto può essere utile: tu non sei altro che un internaut
+a poverino, connesso temporaneamente grazie ad un modem 56k.
+ La tua macchina non ha un nome di dominio conosciuto ed il tuo indirizzo
+ IP cambia ad ogni connessione.
+ E' impossibile per gli amici chiamare in mancanza dell'indirizzo IP, a
+ meno che non lo si comunichi via posta elettronica, per esempio.
+ Per risolvere questo problema, si può chiedere di avere un indirizzo su
+ un server sip conosciuto dagli amici, fisso e sempre connesso.
+ Per far ciò, specificare l'indirizzo del server nel menu parametri, sezione
+ sip.
+ Questo indirizzo è, per esempio, <sip:server_esempio.com> ed il nome utente
+ è 
+\begin_inset Quotes fld
+\end_inset 
+
+Bob
+\begin_inset Quotes frd
+\end_inset 
+
+.
+ Linphone invia allora al server un messaggio per informare della corrispondenza
+ tra l'indirizzo <sip:bob@server_esempio.com> e l'indirizzo IP attuale.
+ D'ora in poi gli amici potranno chiamare usando questo nuovo indirizzo:
+ le chiamate saranno ridirette automaticamente verso la tua macchina.
+ Non ci sarà più bisogno di conoscere l'indirizzo IP, che cambia ogni volta,
+ per contattarti.
+ Ovviamente, si suppone che <sip:server_esempio.com> sia conosciuto da tutti
+ gli amici.
+\layout Itemize
+
+Proxy: è esattamente lo stesso principio, tranne che la ridirezione viene
+ fatta in maniera trasparente ed invisibile dal Linphone del chiamante.
+\layout Standard
+
+Il segretario specificato può essere utilizzato come proxy in uscita.
+ In questo caso tutte le chiamate in uscita dal tuo Linphone saranno dirette
+ verso tale server, che si suppone sia gestito da brave persone.
+ E' quindi molto utile, per non dire indispensabile, che si usi Linphone
+ su una rete privata, gestita da un firewall, anche se su un proxy sip è
+ sicuramente attivo un firewall.
+\layout Standard
+
+Per usare fin da subito un server sip, bisogna aprire il menu Parametri,
+ SIP, e cliccare sul pulsante in fianco a "Usa il segretario sip".
+ Digitare l'indirizzo del segretario, e scegliere un nome utente non troppo
+ comune, in modo da evitare conflitti di nomi.
+ Dare un'indicazione del servizio che il server deve effettuare per te e
+ cliccare sui pulsanti 
+\begin_inset Quotes fld
+\end_inset 
+
+ridirezione
+\begin_inset Quotes frd
+\end_inset 
+
+ o 
+\begin_inset Quotes fld
+\end_inset 
+
+proxy
+\begin_inset Quotes frd
+\end_inset 
+
+.
+ Selezionare anche l'opzione 
+\begin_inset Quotes fld
+\end_inset 
+
+il server è un proxy in uscita
+\begin_inset Quotes frd
+\end_inset 
+
+ \SpecialChar ~
+se sei dietro ad un firewall.
+\layout Standard
+
+Infine, confermando la scelta, Linphone comunicherà immediatamente con il\SpecialChar ~
+
+ server SIP per ottenere i servizi richiesti.
+ Allo stesso modo, in fase di uscita da Linphone, ci vorrà qualche secondo
+ per togliere la registrazione dal server.
+\layout Standard
+
+Una lista di server sip può essere trovata a questo indirizzo: 
+\begin_inset LatexCommand \url[http://www.cs.columbia.edu/~hgs/sip/servers.html]{http://www.cs.columbia.edu/~hgs/sip/servers.html}
+
+\end_inset 
+
+.
+\layout Standard
+
+Sfortunatamente, poiché alcuni di questi server non funzionano più, forse
+ a causa della crisi e di fallimenti di società.
+ Alcuni non sono utilizzabili poiché richiedono metodi di autentificazione
+ non ancora implementati in Linphone.
+ Per non perdere tempo, una lista di server sip pubblici funzionanti con
+ Linphone è reperibile su 
+\begin_inset LatexCommand \url[http://simon.morlat.free.fr/english/servers.html]{http://simon.morlat.free.fr/english/servers.html}
+
+\end_inset 
+
+.
+\layout Section
+
+Uso dietro i firewall
+\layout Standard
+
+Linphone è in grado di funzionare dietro i firewall grazie ad un server
+ proxy SIP in funzione sulla macchina firewall.
+ Un tale server è in corso di sviluppo su 
+\begin_inset LatexCommand \url[http://osipproxy.sourceforge.net]{http://osipproxy.sourceforge.net}
+
+\end_inset 
+
+.
+ Ovviamente sarà libero e basato sulla libreria LGPL oSIP.
+\layout Standard
+
+Una volta che il server proxy sarà attivo, si potrà configurare Linphone
+ per utilizzarlo.
+ Per far ciò, andare in Parametri, sezione SIP e attivare la casella 
+\begin_inset Quotes fld
+\end_inset 
+
+Usa il segretario SIP
+\begin_inset Quotes frd
+\end_inset 
+
+, indicare il suo indirizzo, ed attivare l'opzione 
+\begin_inset Quotes fld
+\end_inset 
+
+il server è un proxy in uscita
+\begin_inset Quotes frd
+\end_inset 
+
+.
+\layout Standard
+
+C'è un caso in cui il\SpecialChar ~
+ proxy non è indispensabile: quello in cui le macchine
+ di reti private possiedano un indirizzo pubblico: il firewall filtra i
+ pacchetti in entrata o uscita.
+ Bisogna permettere a Linphone di funzionare con le macchine esterne, autorizzar
+e il traffico UDP sulla porta SIP (di default 5060, è possibile cambiarla),
+ e sulla porta RTP di ciascun Linphone nelle sottoreti.
+ La porta RTP è parametrizzabile, come si è visto, nel menu Parametri.
+\layout Section
+
+Problemi vari
+\layout Subsection
+
+Problemi di connessione
+\layout Quotation
+
+Tento di chiamare il mio amico <sip:toto@esempio.com>, ma niente da fare,
+ nessuno squillo.
+\layout Standard
+
+Bisogna verificare che Linphone usi l'interfaccia di rete a cui sei connesso
+ con la rete su cui si trova il tuo amico.
+ La lista delle interfacce disponibili si trova in Parametri, sezione Rete.
+ Selezionarla.
+\layout Standard
+
+Se il problema persistesse, potrebbe essere che il tuo amico non sia al
+ momento raggiungibile.
+\layout Subsection
+
+Problemi audio
+\layout Quotation
+
+Linphone sembra connettersi correttamente, si sentono gli squilli, ma appena
+ l'interlocutore risponde, non si sente o si capisce più nulla.
+\layout Itemize
+
+La maggior parte degli utenti ha di questi problemi poiché non è stata scelta
+ l'interfaccia di rete corretta.
+ Se si usa il modem, dev'essere ppp0.
+ In ogni caso, l'interfaccia 
+\begin_inset Quotes fld
+\end_inset 
+
+lo
+\begin_inset Quotes frd
+\end_inset 
+
+ non permette di avere una comunicazione via rete.
+ Serve solo per il test locale con sipomatic (vedere più avanti).
+\layout Itemize
+
+Aumentare il livello sonoro di acquisizione ed emissione, usando i potenziometri
+ posti nella finestra principale.
+\layout Itemize
+
+Se la voce dell'interlocutore sembra vibrare o echeggiare, si può tentaredi
+ aumentare il parametro comensazione jitter (Parametri, RTP).
+ Ma attenzione, questo aumenta il ritardo nella controparte.
+\layout Itemize
+
+Se Linphone nonriesce ad usare la scheda sonora, verificare che non sia
+ utilizzata da qualche altro programma audio.
+\layout Itemize
+
+Infine, utilizzare il driver sonoro ALSA (vedere 
+\begin_inset LatexCommand \url[http://www.alsa-project.org]{http://www.alsa-project.org}
+
+\end_inset 
+
+) , piuttosto che OSS, fornito con il kernel linux.
+ Sfortunatamente la maggior parte delle distribuzioni usano ancora vecchi
+ driver che hanno vari errori e problemi di ritardo.
+ I driver ALSA danno risultati migliori.
+ Si noti che se si cambiano driver, non c'è bisogno di ricompilare Linphone
+ o di cambiare una qualsiasi configurazione.
+\layout Section
+
+Errori e suggerimenti
+\layout Standard
+
+In primo luogo, andare sul sito di Linphone 
+\begin_inset LatexCommand \url[http://www.linphone.org]{http://www.linphone.org}
+
+\end_inset 
+
+ e verificare di avere la versione più recente di Linphone.
+\layout Standard
+
+Se Linphone si bloccassse, inviami direttamente un messaggio a bugs@linphone.org.
+ Qualora Linphone non funzionasse, ma non si bloccasse, verificare bene
+ di aver letto tutto il manuale prima di mandare un resoconto all'indirizzo
+ indicato.
+ In ogni caso invia più informazioni possibili relativamente al problema,
+ in particolar modo i messaggi che compaiono quando lo si lancia da un terminale.
+ Se desideri qualche altra cosa, non esitare ad inviarmi un messaggio a
+ help@linphone.org.Tieni presente che l'aggiunta della modalità video e conferenza
+ sono in programma.
+\layout Standard
+
+Se qualcuno fosse interessato a fare traduzioni di Linphone, mi invii un
+ file xx.po basato su quello in po/linphone.pot della distribuzione.
+ Si può anche tradurre il manuale utente in altre lingue.
+ In ogni caso, contattami qualora volessi maggiori dettagli.
+\layout Section
+
+Autori
+\layout Standard
+
+Simon MORLAT (simon.morlat@linphone.org) ha scritto: 
+\layout Itemize
+
+Programma principale (src)
+\layout Itemize
+
+Libreria RTP (lprtplib)
+\layout Itemize
+
+osipua : la libreria Agente utente sip .
+\layout Itemize
+
+Interfaccia per i driver audio (audio)
+\layout Itemize
+
+Wrappers per i codecs lpc10-1.5, gsm e g711.
+\layout Standard
+
+Aymeric Moizard (jack@atosc.org) ha scritto la pila SIP oSIP usata da linphone.
+\layout Standard
+
+La libreria GSM è stata scritta da: Jutta Degener and Carsten Bormann,Technische
+ Universitaet Berlin.
+\layout Standard
+
+La librairie LPC10-1.5 par: Andy Fingerhut Applied Research Laboratory Washington
+ University, Campus Box 1045/Bryan 509 One Brookings Drive Saint Louis,
+ MO 63130-4899 jaf@arl.wustl.edu http://www.arl.wustl.edu/~jaf/
+\layout Standard
+
+Leggere i file di testo README nella directory gsmlib e lpc10-1.5 per maggiori
+ informazioni.
+\layout Standard
+
+Le icone sono di Pablo Marcelo Moia ed il logo di Philippe Beau.
+\layout Section
+
+Ringraziamenti
+\layout Standard
+
+Grazie a Daemon Chaplin per aver scritto Glade, il costruttore d'interfaccia
+ grafica GTK+.
+\layout Standard
+
+Grazie agli autori del codice di LPC10-1.5 e GSM.
+\layout Standard
+
+Grazie a Joel Barrios ( jbarrios@-NO-SPAM-linuxparatodos.com ) per i suoi
+ RPMS.
+\layout Standard
+
+Grazie a Pablo Marcelo Moiaper le icone.
+\layout Standard
+
+Grazie a Philippe Beau per la traduzione di questo manuale in francese,
+ per il logo, e per il nuovo sito web che ha creato per Linphone.
+\layout Standard
+
+Grazie a Alberto Zanoni <alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it> per
+ la traduzione di linphone e questo manuale in Italiano.
+\layout Standard
+
+
+\begin_inset LatexCommand \tableofcontents{}
+
+\end_inset 
+
+
+\the_end
diff --git a/share/it/manual.sgml b/share/it/manual.sgml
new file mode 100644 (file)
index 0000000..3465759
--- /dev/null
@@ -0,0 +1,494 @@
+<!doctype article public "-//OASIS//DTD DocBook V3.1//EN">
+
+<article lang="fr">
+<!-- DocBook file was created by LyX 1.1
+  See http://www.lyx.org/ for more information -->
+  <artheader id="manual">
+   <title>
+   MANUALE UTENTE LINPHONE
+  </title>
+  <author>
+   Simon Morlat (simon.morlat@linphone.org)
+  </author>
+  <date>
+   11-13-2001
+  </date>
+  </artheader>
+  <sect1>
+   <title>
+   Introduzione
+  </title>
+  <para>
+   Linphone è un semplice strumento di telefonia su rete. Permette di effettuare conversazioni tra due utenti utilizzando una modalità IP come Internet. Ecco l'equipaggiamento necessario per usare Linphone : 
+  </para>
+  <itemizedlist>
+   <listitem>
+   <para>
+   Linux ( Può funzionare anche in altri ambienti come BSD, o altri  UNIX, ma non l'ho ancora testato personalmente.)
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   Gnome 1.2 o superiore, installato ma non necessariamente usato.
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   Una scheda sonora correttamente configurata.
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   Cuffie o altoparlanti.
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   Un microfono.
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   Una connessione rete (Internet ad esempio), modem, scheda Ethernet ...
+   </para>
+  </listitem>
+  </itemizedlist>
+  <para>
+    E' consigliabile chiudere tutte le applicazioni che fanno uso della scheda sonora prima di usare Linphone. Linphone è un programma libero, distribuito sotto la licenza pubblica GNU.
+  </para>
+  <para>
+   ATTENZIONE : Questo strumento è distribuito SENZA GARANZIA. Leggere il file COPYING per maggiori dettagli. Questo significa tra l'altro che non dovete usare Linphone per chiamate confidenziali: non ha ALCUNA CODIFICA DI PROTEZIONE, e quindi può essere molto facile per qualche malintenzionato captare i flussi audio. Si noti inoltre che si raccomanda di non usare Linphone come utente root.
+  </para>
+  </sect1>
+  <sect1>
+   <title>
+   Uso
+  </title>
+  <para>
+   Linphone può essere usato in 3 modi diversi : 
+  </para>
+  <itemizedlist>
+   <listitem>
+   <para>
+   Come applicazione (normale) : nel menu Gnome, Linphone dovrebbe apparire nella sezione Rete. Se non utilizzi Gnome, puoi lanciare Linphone da una finestra terminale, per esempio. Quando Linphone non è in esecuzione, non è possibile ricevere chiamate.
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   Come applet Gnome : cliccando sul pannello Gnome col pulsante destro, aggiungere l'applet. Linphone apparirà nella sezione Rete. Apparendo nel pannello Gnome, Linphone è capace di ricevere chiamate anche se la sua finestra non è visibile. Se si vuol vedere la finestra principale, cliccare sull'applet. Quando c'è una chiamata, la finestra principale passa in primo piano, e sentirai gli squilli della chiamata.
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   Come demone : questo è interessante per coloro che non utilizzano Gnome. Per esempio, per KDE, c'é una directory /home/user/.kde2/AutoStart/ dove si possono inserire le applicazioni che si vogliono lanciare ad inizio sessione. Nella directory citata, con l'aiuto di un gestore di file, aggiungere un collegamento cliccando col pulsante destro. Il comando da inserire è &quot;linphone -daemon&quot;. L'interfaccia prinicipale di Linphone non sarà visibile, e dunque, per farla apparire, si lanci Linphone normalmente, per esempio da una finestra terminale.
+   </para>
+  </listitem>
+  </itemizedlist>
+  </sect1>
+  <sect1>
+   <title>
+   Come lanciarlo
+  </title>
+   <sect2>
+    <title>
+    Principi di base
+   </title>
+   <para>
+    Linphone utilizza il protocollo SIP (Session Initiation Protocol) per effettuare chiamate con altri interlocutori. Il protocollo specifica che ciascuna persona dev'essere identificata da un URL sip della forma: sip:nome_utente@nome_host. Questo modo di chiamare le persone è molto simile a quello utilizzato per la posta elettronica.
+   </para>
+   <para>
+    Nome_utente è il nome di un utente su una macchina, come il login su una macchina linux, per esempio. Nome_host è il nome di una macchina sotto forma di indirizzo IP, o più semplicemente sotto forma di dominio (es: linphone.org).
+   </para>
+   <para>
+    Si noti che SIP è un nuovo protocollo di telecomunicazione fatto per essere semplice ed efficace su internet, che è totalmente diverso ed incompatibile con H.323. H.323 è il protocollo attualmente usato da NetMeeting e GnomeMeeting.
+   </para>
+   </sect2>
+   <sect2>
+    <title>
+    Applicazione: due persone (Bob e Tom) si connettono ad internet con un modem analogico classico.
+   </title>
+   <para>
+    Ecco il modo più semplice di procedere : 
+   </para>
+   <para>
+    Prerequisito : 
+   </para>
+   <itemizedlist>
+    <listitem>
+    <para>
+    Un modem da 28.8 Baud o più. 
+    </para>
+   </listitem>
+   </itemizedlist>
+   <para>
+    Procedimento: 
+   </para>
+   <itemizedlist>
+    <listitem>
+    <para>
+    Si è convenuto che Bob debba chiamare Tom alle 21.00. Alle 21.00, Tom si connette ad Internet utilizzando kppp, gppp o wvdial (o un altro). Una volta connesso ad internet, può lanciare Linphone. Aprendo la finestra delle statistiche di kppp o gppp, può vedere il suo indirizzo IP (altrimenti può digitare /sbin/ifconfig per vederlo). Il nome dell'interfaccia modem dev'essere ppp0.
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Di seguito, manda un messaggio a Bob dicendo : &quot;Il mio indirizzo IP è xxx.xxx.xxx.xxx&quot;.
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Bob legge l'email e riporta nella finestra di Linphone il nome e l'indirizzo IP della personne da contattare : Tom@xxx.xxx.xxx.xxx(L'indirizzo IP di Tom) e per finire, clicca sul pulsante Chiamare.
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Linphone suona a casa di Tom ...Tom risponde alla chiamata cliccando sul pulsante &quot;Rispondere&quot; ed a questo punto la conversazione può iniziare. 
+    </para>
+   </listitem>
+   </itemizedlist>
+   <para>
+    Se si incontrassero problemi in uno di questi punti, si vada alla sezione 4 - Problemi.
+   </para>
+   </sect2>
+   <sect2>
+    <title>
+    Test in locale: non hai nessuno da chiamare per il momento, ma vuoi controllare se Linphone funzioni davvero.
+   </title>
+   <para>
+    <anchor id="sipomatic" ></anchor>A partire dalla versione 0.3.0, Linphone è dotato di un programma di test chiamato &quot;sipomatic&quot;. Sipomatic può rispondere automaticamente alle chiamate provenienti da Linphone. A voi la scelta :
+   </para>
+   <itemizedlist>
+    <listitem>
+    <para>
+    Lanciare linphone.
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Lanciare sipomatic in una finestra terminale. Non siate sorpresi, sipomatic non possiede alcuna interfaccia grafica, ma non c'è bisogno di modificare quello che sta sotto. 
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    In Linphone, menu Parametri, sezione Rete, scegliere &quot;lo&quot; come interfaccia di default. Applicare il cambiamento cliccando su OK. Digitare l'indirizzo S.I.P seguente nella finestra principale : sip:robot@127.0.0.1:5064. 127.0.0.1 è l'indirizzo locale del tuo computer, e robot è il nome da usare per chiamare sipomatic. 5064 è la porta con cui sipomatic può essere contattato. Normalmente si deve utilizzare 5060 per chiamare qualcuno, ma sipomatic fa eccezione : funziona con la porta 5064. Il motivo è che Linphone funziona già sulla porta 5060, ed è impossibile avere due applicazioni che utilizzino la stessa porta nello stesso momento, sulla stessa macchina. 
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Cliccare sul pulsante &quot;Chiamare&quot;. Dopo qualche secondo, sipomatic dovrebbe rispondere alla chiamata e vi dovrebbe dire un breve messaggio.
+    </para>
+   </listitem>
+   </itemizedlist>
+   </sect2>
+  </sect1>
+  <sect1 id="params">
+   <title>
+   Parametri di chiamata
+  </title>
+   <sect2 id="paramnetwork">
+    <title>
+    Rete
+   </title>
+   <itemizedlist>
+    <listitem>
+    <para>
+    Lista delle interfacce di rete: bisogna scegliere un'interfaccia di rete da usare con Linphone. Se si vuole contattare qualcuno su Internet, bisogna scegliere l'interfaccia di rete connessa ad Internet. Per esempio, se si utilizza un modem, dovrà essere ppp0. Se non si è connessi ad alcuna rete, solo l'interfaccia di rete locale, chiamata lo, apparirà nella lista. L'unica scelta che si può fare in questo caso è chiamare <link linkend="sipomatic">sipomatic</link>.
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Tipo di connessione: scegliere il tipo di connessione utilizzata per connettervi alla rete che si desidera utilizzare. Questo aiuterà Linphone ad autoconfigurarsi in funzione della banda passante del tipo di connessione.
+    </para>
+   </listitem>
+   </itemizedlist>
+   </sect2>
+   <sect2 id="paramrtp">
+    <title>
+    RTP
+   </title>
+   <para>
+    RTP 
+   </para>
+   <itemizedlist>
+    <listitem>
+    <para>
+    porta RTP:  Linphone utilizza la porta 7072 di default per inviare e ricevere segnali audio. Se la porta 7072 è usata da un'altra applicazione, la si cambi a piacere.
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Compensazione Jitter: questo numero rappresenta il numero di pacchetti audio che Linphone aspetta prima di farli sentire. Si aumenti questo numero se si sente male la voce, in modo da migliorare la qualità di trasmissione, ma attenzione: questo aumenta il ritardo (Si sentirà la voce dell'interlocutore qualche millisecondo più tardi). D'altro canto, se si utilizza un server perfetto, e si dispone di buoni driver audio, si può scegliere un valore basso fino a 3 pacchetti, sentendo così un ritardo trascurabile.
+    </para>
+   </listitem>
+   </itemizedlist>
+   </sect2>
+   <sect2 id="paramsip">
+    <title>
+    SIP
+   </title>
+   <para>
+    SIP (Session Initiation Protocol) è un protocollo che permette di stabilire sessioni telefoniche grazie ad un server IP. Semplificando, è ciò che permette di far suonare il telefono all'altro interlocutore, sospendere o terminare una chiamata quando uno dei due riattacca.
+   </para>
+   <itemizedlist>
+    <listitem>
+    <para>
+    porta SIP: Linphone utilizza di default la porta 5060 per inviare / ricevere pacchetti SIP. Si raccomanda caldamente per la RFC del protocollo SIP di utilizzare questo valore. Non lo si cambi a meno che non si sappia davvero cosa si stia facendo.
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Indirizzo SIP: modifica nome utente e macchina a piacere. Beninteso, dare un nome di macchina quinon significa che questo nome sia conosciuto da altre macchine del server. Nemmeno Linphone userà il nome della macchina e preferirà usare l'indirizzo IP per comunicare con altre macchine.
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Usare un server segretario sip: si faccia questa scelta, se ci si vuole registrare su un server SIP (segretario) per ottenere servizi vari. Quando non si ha un indirizzo IP fisso, questo può essere interessante per permettere agli amici di chiamare. Vedere la sezione &quot;<link linkend="registering">enregistrement sur un serveur sip</link>&quot;.
+    </para>
+   </listitem>
+   </itemizedlist>
+   </sect2>
+   <sect2 id="paramcodec">
+    <title>
+    Codec
+   </title>
+   <para>
+    I codecs sono algoritmi per comprimere la voce. Per esempio, una voce digitalizzata a 16bit/8000Hz rappresenta un flusso di dati di 128kbits/secondo. Usando il codificatore vocale GSM, questo flusso è ridotto a 13kbits/secondo, senza perdita significativa di qualità.
+   </para>
+   <itemizedlist>
+    <listitem>
+    <para>
+    Scelta dei codecs: Linphone può usare diversi codec. Usare i pulsanti posti a lato della lista dei codec in modo da porli nell'ordine preferito. Si badi bene, che in funzione del tipo di connessione alla rete, alcuni codec sono inutilizzabili. Questi appariranno in rosso e non saranno selezionabili. Si può decidere di usare o no un codec &quot;utilizzabile&quot; (in blu) cambiando il suo stato con l'aiuto del pulsante Attiva / Disattiva in fianco alla lista.
+    </para>
+   </listitem>
+   </itemizedlist>
+   </sect2>
+   <sect2 id="paramaudio">
+    <title>
+    Parametri audio
+   </title>
+   <itemizedlist>
+    <listitem>
+    <para>
+    Modo d'uso: se si ha installato il driver ALSA con una libreria ALSA &lt;0.9, si scelga ALSA per avere risultati migliori. Altrimenti, o se non si sa, usare OSS, che funziona sufficientemente bene.
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+     Scelta della fonte di registrazione: si può scegliere la fonte di registrazione per la voce. Nella maggior parte dei casi, sarà il microfono.
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Opzione auto-kill: scegliendo questa opzione, Linphone fermerà i server sonori (esd &amp;&num;38; artsd) che possono bloccare la periferica sonora e provocare così problemi problemi d'apertura delle periferiche da parte di Linphone in caso di bisogno. Si raccomanda di attivare questa opzione.
+    </para>
+   </listitem>
+   </itemizedlist>
+   </sect2>
+  </sect1>
+  <sect1>
+   <title>
+   Rubrica
+  </title>
+  <para>
+   A partire dalla versione 0.4.1 Linphone dispone di una rubrica (menu connessione, rubrica), con la quale memorizzare indirizzi, e richiamarli facilmente quando si vuol chiamare.
+  </para>
+  </sect1>
+  <sect1 id="registering">
+   <title>
+   Registrazione su un server sip
+  </title>
+  <para>
+   E' possibile sottoscrivere alcuni servizi sui server sip remoti chiamati segretari, proxy o server ridiretti. Questi servizi possono essere:
+  </para>
+  <itemizedlist>
+   <listitem>
+   <para>
+   ridirezione: Linphone chiede al server la creazione di un account &lt;sip:votre_nom@le_serveur_sip&gt;. Questo indirizzo potrà allora essere utilizzato dai tuoi interlocutori per connetterti. Un piccolo esempio concreto può essere utile: tu non sei altro che un internauta poverino, connesso temporaneamente grazie ad un modem 56k. La tua macchina non ha un nome di dominio conosciuto ed il tuo indirizzo IP cambia ad ogni connessione. E' impossibile per gli amici chiamare in mancanza dell'indirizzo IP, a meno che non lo si comunichi via posta elettronica, per esempio. Per risolvere questo problema, si può chiedere di avere un indirizzo su un server sip conosciuto dagli amici, fisso e sempre connesso. Per far ciò, specificare l'indirizzo del server nel menu parametri, sezione sip. Questo indirizzo è, per esempio, &lt;sip:server_esempio.com&gt; ed il nome utente è &ldquo;Bob&rdquo;. Linphone invia allora al server un messaggio per informare della corrispondenza tra l'indirizzo &lt;sip:bob@server_esempio.com&gt; e l'indirizzo IP attuale. D'ora in poi gli amici potranno chiamare usando questo nuovo indirizzo: le chiamate saranno ridirette automaticamente verso la tua macchina. Non ci sarà più bisogno di conoscere l'indirizzo IP, che cambia ogni volta, per contattarti. Ovviamente, si suppone che &lt;sip:server_esempio.com&gt; sia conosciuto da tutti gli amici.
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   Proxy: è esattamente lo stesso principio, tranne che la ridirezione viene fatta in maniera trasparente ed invisibile dal Linphone del chiamante.
+   </para>
+  </listitem>
+  </itemizedlist>
+  <para>
+   Il segretario specificato può essere utilizzato come proxy in uscita. In questo caso tutte le chiamate in uscita dal tuo Linphone saranno dirette verso tale server, che si suppone sia gestito da brave persone. E' quindi molto utile, per non dire indispensabile, che si usi Linphone su una rete privata, gestita da un firewall, anche se su un proxy sip è sicuramente attivo un firewall. 
+  </para>
+  <para>
+   Per usare fin da subito un server sip, bisogna aprire il menu Parametri, SIP, e cliccare sul pulsante in fianco a &quot;Usa il segretario sip&quot;. Digitare l'indirizzo del segretario, e scegliere un nome utente non troppo comune, in modo da evitare conflitti di nomi. Dare un'indicazione del servizio che il server deve effettuare per te e cliccare sui pulsanti &ldquo;ridirezione&rdquo; o &ldquo;proxy&rdquo;. Selezionare anche l'opzione &ldquo;il server è un proxy in uscita&rdquo;  se sei dietro ad un firewall.
+  </para>
+  <para>
+   Infine, confermando la scelta, Linphone comunicherà immediatamente con il  server SIP per ottenere i servizi richiesti. Allo stesso modo, in fase di uscita da Linphone, ci vorrà qualche secondo per togliere la registrazione dal server.
+  </para>
+  <para>
+   Una lista di server sip può essere trovata a questo indirizzo: <ulink url="http://www.cs.columbia.edu/~hgs/sip/servers.html">http://www.cs.columbia.edu/~hgs/sip/servers.html</ulink>.
+  </para>
+  <para>
+   Sfortunatamente, poiché alcuni di questi server non funzionano più, forse a causa della crisi e di fallimenti di società. Alcuni non sono utilizzabili poiché richiedono metodi di autentificazione non ancora implementati in Linphone. Per non perdere tempo, una lista di server sip pubblici funzionanti con Linphone è reperibile su <ulink url="http://simon.morlat.free.fr/english/servers.html">http://simon.morlat.free.fr/english/servers.html</ulink>.
+  </para>
+  </sect1>
+  <sect1>
+   <title>
+   Uso dietro i firewall
+  </title>
+  <para>
+   Linphone è in grado di funzionare dietro i firewall grazie ad un server proxy SIP in funzione sulla macchina firewall. Un tale server è in corso di sviluppo su <ulink url="http://osipproxy.sourceforge.net">http://osipproxy.sourceforge.net</ulink>. Ovviamente sarà libero e basato sulla libreria LGPL oSIP.
+  </para>
+  <para>
+   Una volta che il server proxy sarà attivo, si potrà configurare Linphone per utilizzarlo. Per far ciò, andare in Parametri, sezione SIP e attivare la casella &ldquo;Usa il segretario SIP&rdquo;, indicare il suo indirizzo, ed attivare l'opzione &ldquo;il server è un proxy in uscita&rdquo;.
+  </para>
+  <para>
+   C'è un caso in cui il  proxy non è indispensabile: quello in cui le macchine di reti private possiedano un indirizzo pubblico: il firewall filtra i pacchetti in entrata o uscita. Bisogna permettere a Linphone di funzionare con le macchine esterne, autorizzare il traffico UDP sulla porta SIP (di default 5060, è possibile cambiarla), e sulla porta RTP di ciascun Linphone nelle sottoreti. La porta RTP è parametrizzabile, come si è visto, nel menu Parametri.
+  </para>
+  </sect1>
+  <sect1>
+   <title>
+   Problemi vari
+  </title>
+   <sect2>
+    <title>
+    Problemi di connessione
+   </title>
+   <blockquote>
+   <para>
+    Tento di chiamare il mio amico &lt;sip:toto@esempio.com&gt;, ma niente da fare, nessuno squillo.
+   </para>
+   </blockquote>
+   <para>
+    Bisogna verificare che Linphone usi l'interfaccia di rete a cui sei connesso con la rete su cui si trova il tuo amico. La lista delle interfacce disponibili si trova in Parametri, sezione Rete. Selezionarla. 
+   </para>
+   <para>
+    Se il problema persistesse, potrebbe essere che il tuo amico non sia al momento raggiungibile.
+   </para>
+   </sect2>
+   <sect2>
+    <title>
+    Problemi audio
+   </title>
+   <blockquote>
+   <para>
+    Linphone sembra connettersi correttamente, si sentono gli squilli, ma appena l'interlocutore risponde, non si sente o si capisce più nulla.
+   </para>
+   </blockquote>
+   <itemizedlist>
+    <listitem>
+    <para>
+    La maggior parte degli utenti ha di questi problemi poiché non è stata scelta l'interfaccia di rete corretta. Se si usa il modem, dev'essere ppp0. In ogni caso, l'interfaccia &ldquo;lo&rdquo; non permette di avere una comunicazione via rete. Serve solo per il test locale con sipomatic (vedere più avanti).
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Aumentare il livello sonoro di acquisizione ed emissione, usando i potenziometri posti nella finestra principale.
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Se la voce dell'interlocutore sembra vibrare o echeggiare, si può tentaredi aumentare il parametro comensazione jitter (Parametri, RTP). Ma attenzione, questo aumenta il ritardo nella controparte.
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Se Linphone nonriesce ad usare la scheda sonora, verificare che non sia utilizzata da qualche altro programma audio. 
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Infine, utilizzare il driver sonoro ALSA (vedere <ulink url="http://www.alsa-project.org">http://www.alsa-project.org</ulink>) , piuttosto che OSS, fornito con il kernel linux. Sfortunatamente la maggior parte delle distribuzioni usano ancora vecchi driver che hanno vari errori e problemi di ritardo. I driver ALSA danno risultati migliori. Si noti che se si cambiano driver, non c'è bisogno di ricompilare Linphone o di cambiare una qualsiasi configurazione. 
+    </para>
+   </listitem>
+   </itemizedlist>
+   </sect2>
+  </sect1>
+  <sect1>
+   <title>
+   Errori e suggerimenti
+  </title>
+  <para>
+   In primo luogo, andare sul sito di Linphone <ulink url="http://www.linphone.org">http://www.linphone.org</ulink> e verificare di avere la versione più recente di Linphone. 
+  </para>
+  <para>
+   Se Linphone si bloccassse, inviami direttamente un messaggio a bugs@linphone.org. Qualora Linphone non funzionasse, ma non si bloccasse, verificare bene di aver letto tutto il manuale prima di mandare un resoconto all'indirizzo indicato. In ogni caso invia più informazioni possibili relativamente al problema, in particolar modo i messaggi che compaiono quando lo si lancia da un terminale. Se desideri qualche altra cosa, non esitare ad inviarmi un messaggio a help@linphone.org.Tieni presente che l'aggiunta della modalità video e conferenza sono in programma. 
+  </para>
+  <para>
+   Se qualcuno fosse interessato a fare traduzioni di Linphone, mi invii un file xx.po basato su quello in po/linphone.pot della distribuzione. Si può anche tradurre il manuale utente in altre lingue. In ogni caso, contattami qualora volessi maggiori dettagli.
+  </para>
+  </sect1>
+  <sect1>
+   <title>
+   Autori
+  </title>
+  <para>
+   Simon MORLAT (simon.morlat@linphone.org) ha scritto: 
+  </para>
+  <itemizedlist>
+   <listitem>
+   <para>
+   Programma principale (src)
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   Libreria RTP (lprtplib)
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   osipua : la libreria Agente utente sip .
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   Interfaccia per i driver audio (audio)
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   Wrappers per i codecs lpc10-1.5, gsm e g711. 
+   </para>
+  </listitem>
+  </itemizedlist>
+  <para>
+   Aymeric Moizard (jack@atosc.org) ha scritto la pila SIP oSIP usata da linphone. 
+  </para>
+  <para>
+   La libreria GSM è stata scritta da: Jutta Degener and Carsten Bormann,Technische Universitaet Berlin.
+  </para>
+  <para>
+   La librairie LPC10-1.5 par: Andy Fingerhut Applied Research Laboratory Washington University, Campus Box 1045/Bryan 509 One Brookings Drive Saint Louis, MO 63130-4899 jaf@arl.wustl.edu http://www.arl.wustl.edu/&tilde;jaf/
+  </para>
+  <para>
+   Leggere i file di testo README nella directory gsmlib e lpc10-1.5 per maggiori informazioni.
+  </para>
+  <para>
+   Le icone sono di Pablo Marcelo Moia ed il logo di Philippe Beau.
+  </para>
+  </sect1>
+  <sect1>
+   <title>
+   Ringraziamenti
+  </title>
+  <para>
+   Grazie a Daemon Chaplin per aver scritto Glade, il costruttore d'interfaccia grafica GTK+.
+  </para>
+  <para>
+   Grazie agli autori del codice di LPC10-1.5 e GSM.
+  </para>
+  <para>
+   Grazie a Joel Barrios ( jbarrios@-NO-SPAM-linuxparatodos.com ) per i suoi RPMS.
+  </para>
+  <para>
+   Grazie a Pablo Marcelo Moiaper le icone.
+  </para>
+  <para>
+   Grazie a Philippe Beau per la traduzione di questo manuale in francese, per il logo, e per il nuovo sito web che ha creato per Linphone.
+  </para>
+  <para>
+   Grazie a Alberto Zanoni &lt;alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it&gt; per la traduzione di linphone e questo manuale in Italiano.
+  </para>
+  <para>
+   <toc></toc>
+  </para>
+  </sect1>
+
+
+</article>
diff --git a/share/ja/.gitignore b/share/ja/.gitignore
new file mode 100644 (file)
index 0000000..e1d2077
--- /dev/null
@@ -0,0 +1,5 @@
+Makefile
+Makefile.in
+manual
+manual.junk
+manual.html
diff --git a/share/ja/Makefile.am b/share/ja/Makefile.am
new file mode 100644 (file)
index 0000000..1d3028c
--- /dev/null
@@ -0,0 +1,3 @@
+HELPLANG=ja
+
+include ../Makefile.inc
diff --git a/share/ja/manual.lyx b/share/ja/manual.lyx
new file mode 100644 (file)
index 0000000..c1777bd
--- /dev/null
@@ -0,0 +1,505 @@
+#LyX 1.1 created this file. For more info see http://www.lyx.org/
+\lyxformat 218
+\textclass docbook
+\language english
+\inputencoding default
+\fontscheme default
+\graphics default
+\paperfontsize default
+\spacing single 
+\papersize Default
+\paperpackage a4
+\use_geometry 0
+\use_amsmath 0
+\paperorientation portrait
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\defskip medskip
+\quotes_language english
+\quotes_times 2
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+
+\layout Title
+
+LINPHONE¥æ¡¼¥¶¡¼¥Þ¥Ë¥å¥¢¥ë
+\layout Author
+
+Simon Morlat (simon.morlat@linphone.org)
+\layout Author
+
+Ìõ¡§»³¸ýÁ±Ìé(yushiya@anet.ne.jp)
+\layout Date
+
+11-13-2001
+\layout Section
+
+¤Ï¤¸¤á¤Ë
+\layout Standard
+
+Linphone¤Ï¡¢¥·¥ó¥×¥ë¤Ê¥¤¥ó¥¿¡¼¥Í¥Ã¥ÈÅÅÏäǤ¢¤ê¡¢Æó¼Ô´Ö¤ÎÄÌÏäò¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Ê¤É¤ÎIPÌÖ¤òÄ̤¸¤Æ²Äǽ¤Ë¤¹¤ë¤â¤Î¤Ç¤¢¤ë¡£Linphone¤òµ¯Æ°¤¹¤ë¤Ë¤Ï°Ê²¼
+¤Î¤â¤Î¤¬É¬ÍפȤʤ롣
+\layout Itemize
+
+Linux(BSD¤Î¤è¤¦¤Ê¾¤ÎUNIX¤Ç¤âµ¯Æ°¤¹¤ë¤À¤í¤¦¤¬¡¢Linux´Ä¶­¤Û¤É¾¤Î´Ä¶­¤Ï¥Æ¥¹¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¡£) 
+\layout Itemize
+
+gnome1.2°Ê¾å¤¬¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¤³¤È¡£É¬¤º¤·¤âµ¯Æ°¤·¤Æ¤¤¤ëɬÍפϤʤ¤¡£
+\layout Itemize
+
+¥Ø¥Ã¥É¥Û¥ó¤«¥¹¥Ô¡¼¥«¡¼¡£
+\layout Itemize
+
+¥µ¥¦¥ó¥É¥«¡¼¥É¤¬Àµ¤·¤¯ÀßÄꤵ¤ì¤Æ¤¤¤ë¤³¤È¡£ 
+\layout Itemize
+
+¥Þ¥¤¥¯¥í¥Õ¥©¥ó 
+\layout Itemize
+
+¥â¥Ç¥à¤ä¥¤¡¼¥µ¥Í¥Ã¥ÈÅù¤òÍѤ¤¤¿¡¢¥Í¥Ã¥È¥ï¡¼¥¯(¥¤¥ó¥¿¡¼¥Í¥Ã¥ÈÅù)¤Ø¤ÎÀܳ¡£ 
+\layout Standard
+
+¤Ê¤ª¡¢Linphone¤òµ¯Æ°¤¹¤ëÁ°¤Ë¥ª¡¼¥Ç¥£¥ª¥Ç¥Ð¥¤¥¹¤ò»ÈÍѤ¹¤ë¤¹¤Ù¤Æ¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ò½ªÎ»¤·¤Æ¤ª¤¯¤Î¤¬¤è¤¤¤À¤í¤¦¡£
+\layout Standard
+
+Linphone¤Ï¥Õ¥ê¡¼¥¦¥§¥¢¤Ç¤¢¤ê¡¢GNU Public Licence¤Ë½¾¤Ã¤ÆÇÛÉÛ¤µ¤ì¤ë¡£
+\layout Standard
+
+·Ù¹ð - Åö¥½¥Õ¥È¥¦¥§¥¢¤ÏÊݾڤʤ·¤ËÄ󶡤µ¤ì¤ë¤â¤Î¤Ç¤¢¤ë¡£¾Ü¤·¤¯¤ÏCOPYING¥Õ¥¡¥¤¥ë¤ò»²¾È¤µ¤ì¤¿¤¤¡£¤Ê¤ª¡¢Linphone¤Ï°Å¹æ²½¤òÍѤ¤¤Ê¤¤¤¿¤á¡¢°­°Õ¤¢¤ë¿Í
+ʪ¤¬Íưפ˲»À¼¾ðÊó¤ò½¦¤¦¤³¤È¤¬¤Ç¤­¤ë¡£¤Ä¤Þ¤ê¡¢Linphone¤ÏÈëÌ©¤Î²ñÏäËÍѤ¤¤ë¤Ù¤­¤Ç¤Ï¤Ê¤¤¡£¤Þ¤¿¡¢Linphone¤Ï¥ë¡¼¥È¸¢¸Â¤Çµ¯Æ°¤·¤Ê¤¤¿ä¾©¤¹¤ë¡£
+\layout Section
+
+Linphone¤Îµ¯Æ°
+\layout Standard
+
+Linphone¤Ï»°¤Ä¤ÎÊýË¡¤Çµ¯Æ°¤Ç¤­¤ë¡£
+\layout Itemize
+
+Ä̾ï¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤È¤·¤Æ - Linphone¤Ï¡¢gnome¥á¥Ë¥å¡¼¤ÎÃæ¤Î¥Í¥Ã¥È¥ï¡¼¥¯¥µ¥Ö¥á¥Ë¥å¡¼¤Ë¸½¤ì¤ë¡£¤â¤·¡¢gnome¤òµ¯Æ°¤·¤Æ¤Ê¤¤¤Î¤Ç¤¢¤ì¤Ð¡¢Î㤨¤Ð
+¥¿¡¼¥ß¥Ê¥ë¤Ë
+\begin_inset Quotes eld
+\end_inset 
+
+linphone
+\begin_inset Quotes erd
+\end_inset 
+
+¤È¥¿¥¤¥×¤¹¤ë¤³¤È¤Ç¼Â¹Ô¤Ç¤­¤ë¡£Linphone¤¬µ¯Æ°¤·¤Æ¤¤¤Ê¤¤¤È¤­¤Ï¡¢ÅÅÏäò¼õ¤±¤ë¤³¤È¤Ï¤Ç¤­¤Ê¤¤¡£ 
+\layout Itemize
+
+gnome¥¢¥×¥ì¥Ã¥È¤È¤·¤Æ - gnome¥Ñ¥Í¥ë¤ò±¦¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¢¥Ñ¥Í¥ë¤ËLinphone¤òÄɲ乤뤳¤È¤¬¤Ç¤­¤ë¡£Linphone¤Ï¥Í¥Ã¥È¡¼¥ï¡¼¥¯¥á¥Ë¥å¡¼¤ÎÃæ
+¤Ë¤¢¤ë¡£¤Ò¤Ã¤½¤ê¤È¥Ñ¥Í¥ë¤ÎÃæ¤Çµ¯Æ°¤¹¤ë¤³¤È¤Ç¡¢Linphone¤Ï¡¢¤¿¤È¤¨¥¦¥¤¥ó¥É¥¦¤¬¸½¤ì¤Æ¤¤¤Ê¤¯¤Æ¤âÅÅÏäò¼õ¤±¤ë¤³¤È¤¬¤Ç¤­¤ë¡£¥á¥¤¥ó¥¦¥¤¥ó¥É¥¦¤Ëɽ¼¨¤µ¤»¤¿¤¤¤È¤­
+¤Ë¤Ï¡¢¥¢¥×¥ì¥Ã¥È¤ò¥¯¥ê¥Ã¥¯¤¹¤ì¤Ð¤è¤¤¡£ÅÅÏ䬤«¤«¤Ã¤Æ¤­¤¿¤È¤­¤Ë¤Ï¡¢¥á¥¤¥ó¥¦¥¤¥ó¥É¥¦¤¬É½¤ì¤Æ¡¢Ä̾ïÄ̤ê¤Ë¥Ù¥ë¤¬ÌĤäƤ¤¤ë¤Î¤¬Ê¹¤³¤¨¤ë¤À¤í¤¦¡£ 
+\layout Itemize
+
+¤Ò¤Ã¤½¤ê¤È¥Ç¡¼¥â¥ó¤È¤·¤Æ - ¤³¤ì¤Ï¡¢Èógnome¥æ¡¼¥¶¡¼¤Î¤¿¤á¤Î¤â¤Î¤Ç¤¢¤ë¡£Î㤨¤Ðkde¤Ç¤Ï¡¢/home/user/.kde2/AutoStart¥Ç¥£¥ì¥¯¥È¥ê¤Ë
+¡¢¥í¥°¥¤¥ó»þ¤Ëµ¯Æ°¤·¤¿¤¤¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î¥ê¥ó¥¯¤òŽ¤ë¡£¤·¤¿¤¬¤Ã¤Æ¡¢¾å½Ò¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ë¥Õ¥¡¥¤¥ë¥Þ¥Í¡¼¥¸¥ã¡¼¤Ç°ÜÆ°¤·¡¢±¦¥¯¥ê¥Ã¥¯¤Ç¸½¤ì¤ë¥¢¥×¥ì¥Ã¥È¤«¤é¡¢¡Ö¥ê¥ó¥¯
+¤ÎÄɲáפò¼Â¹Ô¤¹¤ì¤Ð¤è¤¤¡£¤Ê¤ª¡¢µ¯Æ°¤¹¤ë¥³¥Þ¥ó¥É¤Ï¡¢
+\begin_inset Quotes eld
+\end_inset 
+
+ linphone -deamon
+\begin_inset Quotes erd
+\end_inset 
+
+¤Ç¤¢¤ë¡£¤³¤Î¾ì¹ç¡¢Linphone¤Î¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤ò¸«¤ë¤³¤È¤Ï¤Ê¤¤¤¬¡¢É½¼¨¤µ¤»¤¿¤¤¤È¤­¤Ë¤Ï¥¿¡¼¥ß¥Ê¥ëÅù¤«¤éLinphone¤òµ¯Æ°¤µ¤»¤ë¤Î¤ÈƱÍͤ˥¿¥¤¥×¤¹¤ì¤Ð¤è
+¤¤¡£ 
+\layout Section
+
+ÅÅÏäò¤«¤±¤ë
+\layout Subsection
+
+´ðËÜŪ¤Ê¸¶Â§
+\layout Standard
+
+¡Ösip:¥æ¡¼¥¶¡¼Ì¾@¥Û¥¹¥È̾¡×¤Î¤è¤¦¤ÊSIP URL¤Ë¤è¤Ã¤Æ¶èÊ̤µ¤ì¤ë¡£SIP URL¤Ï¡¢Æ¬¤Î¡Ösip:¡×¤ò½ü¤±¤ÐÈó¾ï¤Ëe-mail¥¢¥É¥ì¥¹¤È»÷¤Æ¤¤¤ë¡£
+\layout Standard
+
+¥æ¡¼¥¶¡¼Ì¾¤Ï¡¢UNIX¥Þ¥·¥ó¤Î¥í¥°¥¤¥ó¥Í¡¼¥à¤Î¤è¤¦¤Ê¤â¤Î¤Ç¡¢¥Û¥¹¥È̾¤Ï¥æ¡¼¥¶¡¼¤¬Àܳ¤¹¤ë¥Þ¥·¥ó¤Î̾Á°¤äIP¥¢¥É¥ì¥¹¤Ç¤¢¤ë¡£
+\layout Standard
+
+¤Ê¤ª¡¢SIP¤Ï¥·¥ó¥×¥ë¤ËÀ߷פµ¤ì¤¿¿·¤·¤¤ÄÌ¿®¤Î¥×¥í¥È¥³¥ë¤Ç¤¢¤ê¡¢H323¤È¤Ï¤Þ¤Ã¤¿¤¯¸ß´¹À­¤¬¤Ê¤¤¤³¤È¤ËÃí°Õ¤µ¤ì¤¿¤¤¡£
+\layout Subsection
+
+»ÈÍÑÎã:Æó¿Í¤Î¥æ¡¼¥¶¡¼¤¬¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Ë¥â¥Ç¥à¤ÇÀܳ¤·¤Æ¤¤¤ë¤È¤­
+\layout Standard
+
+¤³¤ì¤Ï¡¢Ã±½ã¤Ê¼ê³¤­¤Ç¤¢¤ë¡£É¬ÍפȤµ¤ì¤ë¥Í¥Ã¥È¥ï¡¼¥¯¤Ï¡¢
+\layout Itemize
+
+28k°Ê¾å¤Î¥â¥Ç¥à 
+\layout Standard
+
+¤Ç¤¢¤ë¡£
+\layout Standard
+
+¥·¥Ê¥ê¥ª¤Ï¡¢°Ê²¼¤ÎÄ̤ê¤Ç¤¢¤ë¡£
+\layout Itemize
+
+¥Ü¥Ö¤Ï¥È¥à¤Ë21:00¤ËÅÅÏ乤뤳¤È¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£¥È¥à¤Ï¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Ëkppp¤ägppp¤äwmdial¤Ê¤É¤ÇÀܳ¤·¤Æ¤¤¤ë¡£ 
+\layout Itemize
+
+¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤ËÀܳ¤·¤¿¤é¡¢¥Ü¥Ö¤ÏLinphone¤òµ¯Æ°¤Ç¤­¤ë¡£kppp¤ägppp¤Ê¤É¤ÎÅý·×¥Ü¥Ã¥¯¥¹¤ò³«¤¤¤Æ¡¢¥Ü¥Ö¤Ï¼«Ê¬¤ÎIP¥¢¥É¥ì¥¹¤òÃΤ뤳¤È¤¬¤Ç¤­¤ë¡£(/s
+bin/ifconfig¤ò»È¤ï¤Ê¤¯¤Æ¤â³Îǧ¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë)¡£ 
+\layout Itemize
+
+¼¡¤Ë¡¢¥È¥à¤Ï¥Ü¥Ö¤Ë¡ÖËͤÎIP¥¢¥É¥ì¥¹¤Ï¡¢xxx.xxx.xxx.xxx¤À¤è¡£¡×¤È¤¤¤¦ÆâÍÆ ¤Îe¥á¡¼¥ë¤òÁ÷¤ë¡£ 
+\layout Itemize
+
+¤½¤Î¤¹¤°¤¢¤È¤Ç¡¢¥È¥à¤Î²È¤ÎLinphone¤Î¥Ù¥ë¤¬ÌĤ롣¤½¤Î¤È¤­¡¢¥Ü¥Ö¤Ë¤â¸þ¤³¤¦¤Ç¥Ù¥ë¤¬ÌĤäƤ¤¤ë¤Î¤¬Ê¬¤«¤ë¤è¤¦¤Ë¥Ù¥ë¤Î²»¤¬Ê¹¤³¤¨¤ë¡£¤½¤³¤Ç¡¢¥È¥à¤¬ÅÅÏä˽Ф뤿
+¤á¤Ë¡ÖÅÅÏäò¤È¤ë¡×¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤À¤±¤Ç¤è¤¤¡£¤½¤¦¤¹¤ì¤Ð¡¢¸ß¤¤¤Ë²ñÏ䬤Ǥ­¤ë¤Ï¤º¤Ç¤¢¤ë¡£ 
+\layout Standard
+
+ÌäÂ꤬¤¢¤Ã¤¿¤é¡¢Âè4Àá¤ÎÌäÂê¤ò»²¾È¤·¤ÆÍߤ·¤¤¡£
+\layout Subsection
+
+¥Æ¥¹¥È¤Î»î¹Ô - ¸½ºß(Î㤨¤Ð¿¼Ìë¤Ê¤É¤Ç)ÅÅÏäò¤«¤±¤ëͧ¿Í¤¬¤¤¤Ê¤¤¤¬¡¢Linphone¤¬ËÜÅö¤ËÆ°¤¤¤Æ¤¤¤ë¤«¤É¤¦¤«ÃΤꤿ¤¤¤È¤­
+\layout Standard
+
+
+\begin_inset LatexCommand \label{sipomatic}
+
+\end_inset 
+
+¥Ð¡¼¥¸¥ç¥ó3.0¤«¤é¤Ï¡¢Linphone¤Ë¤Ï¡Ösiptomatic¡×¤È¤¤¤¦¥×¥í¥°¥é¥à¤¬ÉÕ°¤·¤Æ¤¤¤ë¡£¤³¤ì¤Ï¡¢°Ê²¼¤Î¼ê½ç¤Ç»ÈÍѤǤ­¤ë¡£
+\layout Itemize
+
+siptomatic¤ò¥¿¡¼¥ß¥Ê¥ë¤«¤éµ¯Æ°¤¹¤ë¡£siptomatic¤Ï¥°¥é¥Õ¥£¥«¥ë¥¤¥ó¥¿¡¼¥Õ¥§¥¤¥¹¤òÈ÷¤¨¤Æ¤¤¤Ê¤¤¤¬¡¢¶Ã¤«¤Ê¤¤¤ÇÍߤ·¤¤¡£Áê¸ßŪ¤Ê¤ä¤ê¤È¤ê¤ò¤¹¤ëɬÍפ¬
+¤Ê¤¤¤«¤é¤Ç¤¢¤ë¡£ 
+\layout Itemize
+
+Linphone¤Î¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤Î¥¿¥Ö¤«¤é¡¢¡Ölo¡×¤ò¥Ç¥Õ¥©¥ë¥È¤Î¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ë·èÄꤷ¡¢Êѹ¹¤òOK¤ò¥¯¥ê¥Ã¥¯¤·¤ÆŬÍѤ¹¤ë¡£
+\layout Itemize
+
+¡Ösip:robot@127.0.0.1:5064¡×¤È¤¤¤¦SIP URL¤ò¥á¥¤¥ó¥¦¥¤¥ó¥É¥¦¤ËÆþÎϤ¹¤ë¡£127.0.0.1¤Ï¡¢¤¢¤Ê¤¿¤Î¥³¥ó¥Ô¥å¡¼¥¿¡¼¤Î ¥í¡¼¥«¥ë¥¢¥É¥ì¥¹¤Ç¡¢r
+obot¤Ïsipomatic¤ËÅÅÏäò¤«¤±¤ëºÝ¤Î̾Á°¤Ç¤¢¤ë¡£5064¥Ý¡¼¥È¤¬¡¢sipomatic¤ËÀܳ²Äǽ¤Ê¥Ý¡¼¥È¤Ç¤¢¤ë¡£Ä̾ï¤ÏÅÅÏäò¤«¤±¤ë¤Î¤Ë5060È֥ݡ¼¥È¤ò
+ÍѤ¤¤ë¤¬¡¢sipomatic¤ÏÎã³°¤Ç5064È֥ݡ¼¥È¤Çµ¯Æ°¤·¤Æ¤¤¤ë¡£¤³¤ì¤Ï¡¢Linphone¤¬¤¹¤Ç¤Ë5060È֥ݡ¼¥È(¤¹¤Ê¤ï¤Á¡¢¥Ý¡¼¥È¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¥Ç¥Õ
+¥©¥ë¥È¤Î¥Ý¡¼¥È¤È¤·¤Æ)¤Çµ¯Æ°¤·¤Æ¤¤¤ë¤«¤é¤Ç¤¢¤ê¡¢Æ±¤¸¥Ý¡¼¥È¤ò»È¤¦2¤Ä¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤òƱ»þ¤ËƱ¤¸¥³¥ó¥Ô¥å¡¼¥¿¡¼¤Çµ¯Æ°¤¹¤ë¤³¤È¤¬¤Ç¤­¤Ê¤¤¤«¤é¤Ç¤¢¤ë¡£
+\layout Itemize
+
+¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¢¿ôÉøå¤Ësiptomatic¤¬¤¢¤Ê¤¿¤ÎÅÅÏäËÊÖÅú¤·¡¢Ã»¤¤¥¢¥Ê¥¦¥ó¥¹¤¬Ê¹¤³¤¨¤ë¤À¤í¤¦¡£ 
+\layout Section
+
+
+\begin_inset LatexCommand \label{params}
+
+\end_inset 
+
+ÅÅÏäΥѥé¥á¡¼¥¿¡¼
+\layout Subsection
+
+
+\begin_inset LatexCommand \label{paramnetwork}
+
+\end_inset 
+
+¥Í¥Ã¥È¥ï¡¼¥¯
+\layout Itemize
+
+¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Î¥ê¥¹¥È - ¤¢¤Ê¤¿¤Ï¡¢Linphone¤Ë»È¤¦¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤òÁª¤ÖɬÍפ¬¤¢¤ë¡£¤â¤·¡¢¥¤¥ó¥¿¡¼¥Í¥Ã¥È¾å¤Î狼¤ËÏ¢Íí¤ò¤·¤¿
+¤¤¤Î¤Ê¤é¡¢¤¢¤Ê¤¿¤Î¥³¥ó¥Ô¥å¡¼¥¿¡¼¤¬¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤ËÀܳ¤·¤Æ¤¤¤ë¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤òÁª¤Ö¤Ù¤­¤Ç¤¢¤ë¡£²¿¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤Ë¤â¤Ä¤Ê¤¬¤Ã¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢¡Ölo
+¡×¤È¸Æ¤Ð¤ì¤ë¥í¡¼¥«¥ë¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤À¤±¤¬¥ê¥¹¥È¤Ë¸½¤ì¤ë¤À¤í¤¦¡£¤½¤ì¤Ï¡¢siptomatic¤ËÅÅÏäò¤¹¤ë¤³¤È¤À¤±¤¬¤Ç¤­¤ë¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ç¤¢¤ë¡£
+\layout Itemize
+
+Àܳ¤Î¥¿¥¤¥× - »È¤¤¤¿¤¤¥Í¥Ã¥È¥ï¡¼¥¯¤Ø¤ÎÀܳ¤ÎÊýË¡¤òÁªÂò¤¹¤ë(ÂçÄñ¤Î¾ì¹ç¤Ï¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Ç¤¢¤ë)¡£¤³¤ì¤Ï¡¢Linphone¤¬¤¢¤Ê¤¿¤ÎÂÓ°è¤òÀßÄꤹ¤ë¤Î¤òÊä½õ¤¹¤ë
+¤¿¤á¤Ç¤¢¤ë¡£ 
+\layout Subsection
+
+
+\begin_inset LatexCommand \label{paramrtp}
+
+\end_inset 
+
+RTP
+\layout Standard
+
+RTP(Real Time Protocol)¤Ï¡¢¥á¥Ç¥£¥¢¥¹¥È¥ê¡¼¥à¤ò¥Í¥Ã¥È¥ï¡¼¥¯±Û¤·¤ËÁ÷¿®¤¹¤ëºÝ¤ËÍѤ¤¤ë¥×¥í¥È¥³¥ë¤Ç¤¢¤ë¡£
+\layout Itemize
+
+RTP¥Ý¡¼¥È - Linphone¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤Ç²»À¼¥Ç¡¼¥¿¤ÎÁ÷¼õ¿®¤Ë7000È֥ݡ¼¥È¤òÍøÍѤ¹¤ë¡£7000È֥ݡ¼¥È¤¬Â¾¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ë»È¤ï¤ì¤Æ¤¤¤ë¤È»×¤ï¤ì¤ë
+¾ì¹ç¤Ë¤Ï¡¢Ç¤°Õ¤Î¥Ý¡¼¥È¤ËÊѹ¹¤¹¤ë¡£
+\layout Itemize
+
+¥Ð¥Ã¥Õ¥¡¤¹¤ë¥ß¥êÉà- ¤³¤Î¿ô»ú¤Ï¡¢Linphone¤¬ºÆÀ¸¤òÂÔµ¡¤¹¤ë²»À¼¥Ñ¥±¥Ã¥È¤Î¿ô¤òɽ¤·¤Æ¤¤¤ë¡£²»À¼¥Ñ¥±¥Ã¥È¤¬Á÷¤ì¤¬¤Á¤Ê¾ì¹ç¤Ë¡¢ºÆÀ¸¤µ¤ì¤º¤ËÇË´þ¤µ¤ì¤ë²»À¼¥Ñ¥±
+¥Ã¥È¤ò¸º¤é¤¹¤³¤È¤¬¤Ç¤­¤ë¡£¡ÖÅÓÀÚ¤ìÅÓÀڤ첻¡×¤¬Ê¹¤³¤¨¤ë¾ì¹ç¡¢¤³¤ÎÃͤòÂ礭¤¯¤¹¤ë¤ÈÅÁÁ÷¤Î¸úΨ¤ò¾å¤²¤ë¤³¤È¤¬¤Ç¤­¤ë¤¬¡¢²»À¼¤ÎÃٱ䤬Â礭¤¯¤Ê¤ë(Áê¼ê¤ÎÀ¼¤¬¾¯¤·ÃÙ¤ì¤Æʹ
+¤³¤¨¤ë)¡£¤æ¤¨¤Ë¡¢¥Í¥Ã¥È¥ï¡¼¥¯¤¬´°Á´¤Ç¹âÉʼÁ¤Î¥ª¡¼¥Ç¥£¥ª¥É¥é¥¤¥Ð¤ò»ÈÍѤ·¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢¤³¤ÎÃͤò3¥Ñ¥±¥Ã¥È¤Ë²¼¤²¤ì¤Ðû¤¤ÃÙ±ä»þ´Ö¤ÇÏ令ë¤è¤¦¤Ë¤Ê¤ë¡£
+\layout Subsection
+
+
+\begin_inset LatexCommand \label{paramsip}
+
+\end_inset 
+
+SIP
+\layout Standard
+
+SIP(Session Initiation Protocol)¤Ï¡¢¥Í¥Ã¥È¥ï¡¼¥¯±Û¤·¤Ë¥á¥Ç¥£¥¢¤Î¥»¥Ã¥·¥ç¥ó¤ò³ÎΩ¤¹¤ë¥×¥í¥È¥³¥ë¤Ç¤¢¤ë¡£¤Ä¤Þ¤ê¤Ï¡¢¥ê¥â¡¼¥È¥æ¡¼¥¶¡¼
+´Ö¤Î²ñÏäò³«»Ï¤·¤¿¤ê¡¢ÊÒÊý¤¬ÅÅÏäòÀڤ俤Ȥ­¤Ë²ñÏäò½ªÎ»¤·¤¿¤ê¤¹¤ë¥×¥í¥È¥³¥ë¤Ç¤¢¤ë¡£
+\layout Itemize
+
+SIP¥Ý¡¼¥È - Linphone¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤ÇSIP¥Ñ¥±¥Ã¥È¤ÎÁ÷¼õ¿®¤Ë5060È֥ݡ¼¥È¤òÍѤ¤¤ë¡£SIP¤Î¥Ý¡¼¥È¤Ï¡¢RFC¤Ë5060ÈÖ¤òÍѤ¤¤ë¤³¤È¤¬¶¯¤¯¿ä¾©¤µ
+¤ì¤Æ¤¤¤ë¡£¤è¤Ã¤Æ¡¢²¿¤ò¤·¤¿¤¤¤Î¤«¤òÌÀ³Î¤ËÍý²ò¤·¤Æ¤¤¤ë¤È¤­¤ò½ü¤¤¤Æ¤Ï¡¢¤³¤ì¤òÊѹ¹¤¹¤Ù¤­¤Ç¤Ï¤Ê¤¤¡£
+\layout Itemize
+
+SIP¤ÎÅÐÏ¿¤Ë¤¹¤ë - ¥ê¥â¡¼¥È¤ÎSIP¥µ¡¼¥Ð¡¼¤ËÅÐÏ¿¤¹¤·¤¿¤¤¤È¤­¤Ë¤Ï¡¢¤³¤Î¥Ü¥¿¥ó¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£SIP¥µ¡¼¥Ð¡¼¤Î¥µ¡¼¥Ó¥¹¤Ë¤Ï¡¢Å¾Á÷¤ä¥¢¥¦¥È¥Ð¥¦¥ó¥É¥×¥í¥¯¥·¤¬¤¢
+¤ë¡£¾Ü¤·¤¯¤Ï¡¢¡Ö¥ê¥â¡¼¥È¤Î¥µ¡¼¥Ð¡¼¤ËÀܳ¤¹¤ë¡×¤ÎÀá¤ò»²¾È¤µ¤ì¤¿¤¤¡£ 
+\layout Subsection
+
+
+\begin_inset LatexCommand \label{paramcodec}
+
+\end_inset 
+
+¥³¡¼¥Ç¥Ã¥¯
+\layout Standard
+
+¥³¡¼¥Ç¥Ã¥¯¤È¤Ï¡¢Æä˲»À¼¥Ç¡¼¥¿¤Î°µ½Ì¤Î¤¿¤á¤ËÀ߷פµ¤ì¤¿¥¢¥ë¥´¥ê¥º¥à¤Î¤³¤È¤ò¸À¤¦¡£Î㤨¤Ð¡¢16bit/8000Hz¤Î¥Ç¥¸¥¿¥ë²½¤µ¤ì¤¿²»À¼¤È¸À¤¨¤Ð¡¢128kbit/
+ÉäΥǡ¼¥¿¤Îή¤ì¤òɽ¤·¤Æ¤¤¤ë¡£GSM¥Ü¥³¡¼¥À¡¼¤ò»ÈÍѤ¹¤ë¤È¡¢¤³¤ì¤Ï13bit kbit/Éä˽̾®¤µ¤ì¤ë¡£
+\layout Itemize
+
+¥³¡¼¥Ç¥Ã¥¯¤ÎÁªÂò - Linphone¤Ï¿ô¼ïÎà¤Î¥³¡¼¥Ç¥Ã¥¯¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤ë¡£ ¥³¡¼¥Ç¥Ã¥¯¤Î¥ê¥¹¥È¤Î²¼Éô¤Ë¤¢¤ë¥Ü¥¿¥ó¤ò»È¤¦¤È¡¢»È¤¤¤¿¤¤½çÈÖ¤Ëʤ٤뤳¤È¤¬¤Ç¤­¤ë¡£
+¤À¤¬¡¢¥Í¥Ã¥È¥ï¡¼¥¯Àܳ¤Î¥¿¥¤¥×¤Ë¤è¤Ã¤Æ¤Ï(¥Í¥Ã¥È¥ï¡¼¥¯¤ÎÀá¤ò»²¾È)¡¢»È¤¨¤Ê¤¤¥³¡¼¥Ç¥Ã¥¯¤Î¼ïÎà¤â¡¢»ÈÍѤ¹¤ë¤«¤É¤¦¤«¤ò·èÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤ë¡£ 
+\layout Subsection
+
+
+\begin_inset LatexCommand \label{paramaudio}
+
+\end_inset 
+
+¥ª¡¼¥Ç¥£¥ª¥Ñ¥é¥á¡¼¥¿¡¼
+\layout Standard
+
+¤³¤ÎÀá¤Ç¤Ï¡¢²»À¼µ»½Ñ¤Ë´Ø¤¹¤ë¥Ñ¥é¥á¡¼¥¿¡¼¤ò²òÀ⤹¤ë¡£
+\layout Itemize
+
+¥É¥é¥¤¥Ð¤ÎÁªÂò - Linux¤Ç¤Ï¡¢OSS(¥«¡¼¥Í¥ë¥É¥é¥¤¥Ð¡¼¤È¤â¸Æ¤Ð¤ì¤ë)¤ÈALSA¤È¡¢°Û¤Ê¤ë2¼ïÎà¤Î¥µ¥¦¥ó¥É¥«¡¼¥É¥é¥¤¥Ð¤ò»ÈÍѤ¹¤ë¤³¤È¤¬¤Ç¤­¤ë¤¬¡¢ALSA¥É
+¥é¥¤¥Ð¤ÏALSA¥é¥¤¥Ö¥é¥ê¤òÄ̤¹¤³¤È¤Ç¡¢¤µ¤é¤Ê ¤ë¥Ñ¥Õ¥©¡¼¥Þ¥ó¥¹¤òȯ´ø¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£¤·¤¿¤¬¤Ã¤Æ¡¢ALSA¥É¥é¥¤¥Ð¡¼(snd_*¤Ç»Ï¤Þ¤ë̾Á°¤Ç¤¢¤ë)¤ò»ÈÍѤ·¤Æ
+¤¤¤ë¾ì¹ç¤Ï¡¢ALSA¥â¡¼¥É¤òÁªÂò¤¹¤ë¤Î¤¬¤è¤¤¡£Ê¬¤«¤é¤Ê¤±¤ì¤Ð¡¢OSS¤òÁªÂò¤¹¤ë¡£
+\layout Itemize
+
+Auto-kill¥ª¥×¥·¥ç¥ó - ¤³¤Î¥ª¥×¥·¥ç¥ó¤ò»È¤¦¤È¡¢linphone¤Ï¥µ¥¦¥ó¥É¥Ç¡¼¥â¥ó(esd¤Èartsd)¤òÄä»ß¤·¤è¤¦¤È¤¹¤ë¡£¤³¤ì¤Ï¡¢¥ª¡¼¥Ç¥£¥ª¥Ç¥Ð¥¤¥¹
+¤Ë¹±µ×Ū¤Ê¼è¤ê³°¤»¤Ê¤¤¥í¥Ã¥¯¤ò¤«¤±¤Æ¤·¤Þ¤¤¡¢Linphone¤¬É¬ÍפȤ·¤Æ¤¤¤ë¥ª¡¼¥Ç¥£¥ª¥Ç¥Ð¥¤¥¹¤ò¥ª¡¼¥×¥ó¤µ¤»¤Ê¤¤¤è¤¦¤Ë¤¹¤ë¤â¤Î¤Ç¤¢¤ë¡¢¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï¡¢¥ª¥ó¤Ë¤·
+¤Æ¤ª¤¯¤³¤È¤ò¿ä¾©¤¹¤ë¡£ 
+\layout Section
+
+ÅÅÏÃÄ¢
+\layout Standard
+
+ÅÅÏÃÄ¢(conection¤Î¥á¥Ë¥å¡¼¤ÎÃæ¤Ë¤¢¤ë)¤ò»È¤¦¤È¡¢SIP¥¢¥É¥ì¥¹¤òµ­²±¤È¸Æ½Ð¤·¤¬¤Ç¤­¤ë¡£SIP¥¢¥É¥ì¥¹¤Ï¡¢sip:¥æ¡¼¥¶¡¼Ì¾@¥É¥á¥¤¥ó̾¤Î·Á¼°¤Ç¤¢¤ë¡£¤Þ
+¤¿¡¢¼«Ê¬¤¬Ê¬¤«¤ê¤ä¤¹¤¯¤¹¤ë¤¿¤á¤Ë¡¢É½¼¨¤µ¤ì¤ë̾Á°¤òÄɲ乤뤳¤È¤â¤Ç¤­¤ë¡£SIP¥¢¥É¥ì¥¹¤ò¸Æ¤Ó½Ð¤¹¤Ë¤Ï¡¢¥¢¥É¥ì¥¹¤Î¥ê¥¹¥È¤«¤éÁªÂò¤·¡¢¡ÖOK¡×¤Î¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë
+¡£¤¹¤ë¤È¡¢ÁªÂò¤·¤¿¥¢¥É¥ì¥¹¤¬¥á¥¤¥ó¥¦¥¤¥ó¥É¥¦¤Ë¸½¤ì¤ë¤Î¤¬³Îǧ¤Ç¤­¤ë¤À¤í¤¦¡£¸å¤Ï¡¢ÅÅÏäò¤«¤±¤ë¤¿¤á¤Ë¡ÖÅÅÏäò¤«¤±¤ë¡×¤Î¥Ü¥¿¥ó¤ò²¡¤»¤Ð¤è¤¤¤À¤±¤Ç¤¢¤ë¡£
+\layout Section
+
+SIP¥µ¡¼¥Ð¡¼¤ËÅÐÏ¿¤¹¤ë
+\layout Standard
+
+¥ê¥â¡¼¥È¤ÎSIP¥µ¡¼¥Ð¡¼¤Î¥µ¡¼¥Ó¥¹¤ËÅÐÏ¿¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¢¤ë¡£¤³¤Î¤è¤¦¤Ê¥µ¡¼¥Ó¥¹¤Ë¤Ï¡¢°Ê²¼¤Î¤è¤¦¤Ê¤â¤Î¤¬¤¢¤ë¡£
+\layout Itemize
+
+žÁ÷ - Linphon¤Ï¡¢¥µ¡¼¥Ð¡¼¤Ë<sip:example_registrar.com>¤Î¤è¤¦¤ÊSIP¥¢¥«¥¦¥ó¥È¤òºîÀ®¤¹¤ë¤è¤¦Í×ÀÁ¤¹¤ë¡£Î㤨¤Ð¡¢56k¤Î¥â¥Ç¥à
+¤ò»È¤Ã¤Æñ½ã¤Ë¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤ËÀܳ¤·¤Æ¤¤¤ë¾ì¹ç¡¢¤¢¤Ê¤¿¤ÎIP¥¢¥É¥ì¥¹¤ÏÀÅŪ¤Ç¤Ï¤Ê¤¯¡¢¥Í¡¼¥à¥µ¡¼¥Ð¡¼¤ËÃΤé¤ì¤Æ¤¤¤ë¥Û¥¹¥È̾¤â»ý¤Ã¤Æ¤¤¤Ê¤¤¡£¤³¤ì¤Ç¤Ï¡¢Í§Ã£¤Ï¤¢¤Ê¤¿¤¬
+IP¥¢¥É¥ì¥¹¤òÄÌÃΤ¹¤ë¥á¡¼¥ë¤òÁ÷¤é¤Ê¤¤¸Â¤ê¡¢¤¢¤Ê¤¿¤ËÏ¢Íí¤ò¤¹¤ë¤³¤È¤¬¤Ç¤­¤Ê¤¤¡£Îã¤È¤·¤Æ¡¢<sip:example_registrar.com>¤ËÅÐÏ¿¤ò¹Ô¤¦¤Î¤Ï´Êñ
+¤Ç¤¢¤ë¡£¤¢¤Ê¤¿¤Î¥æ¡¼¥¶¡¼Ì¾¤Ï¡Öbob¡×¤À¤È¤¹¤ë¡£¥µ¡¼¥Ð¡¼¤ËÅÐÏ¿¤¹¤ëºÝ¤Ë¡¢Linphone¤Ï¤¢¤Ê¤¿¤ÎIP¥¢¥É¥ì¥¹¤ò¥µ¡¼¥Ð¡¼¤ËÁ÷¿®¤·¡¢¥¢¥«¥¦¥ó¥È¡Ösip:bob@e
+xample_registrar.com¡×¤¬ºîÀ®¤µ¤ì¤ë¡£¤½¤¦¤¹¤ë¤È¡¢¤¢¤Ê¤¿¤Îͧã¤Î¥¸¥à¤Ï¡¢<sip:bob@example_registrar.com>¤È¤¤¤¦¥¢¥É¥ì
+¥¹¤ËÅÅÏäò¤«¤±¤ë¤³¤È¤¬¤Ç¤­¤ë¡£ÅöÁ³¤Î¤³¤È¤Ê¤¬¤é¡¢
+\begin_inset Quotes eld
+\end_inset 
+
+example_registar.com
+\begin_inset Quotes erd
+\end_inset 
+
+¤Ï¡¢¥¦¥§¥ë¥Î¥ó¡¦¥É¥á¥¤¥ó¥Í¡¼¥à¤Ç¤¢¤ë¡£¼¡¤Ë¡¢¥¸¥à¤ÎLinphone¤Ï¥Ü¥Ö¤Î³Î¼Â¤Ê¥í¥±¡¼¥·¥ç¥ó¤ò¼¨¤¹Å¾Á÷¥á¥Ã¥»¡¼¥¸¤ò¼õ¤±¼è¤ë¡£¤½¤¦¤·¤Æ¡¢¥Ü¥Ö¤Î²È¤Ç¥Ù¥ë¤¬ÌĤë¤Î¤Ç¤¢
+¤ë¡£
+\layout Itemize
+
+¥×¥í¥¯¥· - ¤³¤ì¤â¡¢Å¾Á÷¥á¥Ã¥»¡¼¥¸¤¬¥¸¥à¤ÎÅÅÏäËÁ÷¿®¤µ¤ì¤Ê¤¤¤³¤È¤ò¤Î¤¾¤±¤Ð¡¢Æ±Íͤθ¶Íý¤Ç¤¢¤ë¡£¤½¤ÎÂå¤ï¤ê¤Ë¡¢¥×¥í¥¯¥·¤Ï¥Ü¥Ö¤ÎLinphone¤Þ¤Ç¥À¥¤¥ì¥¯¥È¤Êž
+Á÷¤ò¹Ô¤¦¡£ 
+\layout Standard
+
+¤³¤Î¤è¤¦¤ÊÅÐÏ¿¤Ï¡¢¥¢¥¦¥È¥Ð¥¦¥ó¥É¥×¥í¥¯¥·¤Ë¤ª¤¤¤Æ¤âƱÍͤ˹Ԥï¤ì¤ë¡£¤³¤ì¤Ï¡¢Linphone¤ò¥Õ¥¡¥¤¥ä¡¼¥¦¥©¡¼¥ë¤ÎÃæ¤Ç»È¤¦¤È¤­¤ËÍ­¸ú¤Ç¤¢¤ë¡£¥¢¥¦¥È¥Ð¥¦¥ó¥É¥×¥í¥¯¥·
+¤Ï¡¢¥×¥é¥¤¥Ù¡¼¥È¥µ¥Ö¥Í¥Ã¥È¤Ë¤¢¤ëHTTP¥×¥í¥¯¥·¤ÈƱÍͤÎÌò³ä¤ò²Ì¤¿¤¹¡£³°Éô¤Ø¤Î²ñÏäϥ¢¥¦¥È¥Ð¥¦¥ó¥É¥×¥í¥¯¥·¤¬°·¤¤¡¢¥Í¥Ã¥È¥ï¡¼¥¯³°¤Ë¤¤¤ë¤È»×¤ï¤ì¤ë¿Í¤Ø¤Î²ñÏäΞÁ÷
+¤ÎǤ¤òÉ餦¡£
+\layout Standard
+
+ÅÐÏ¿¥µ¡¼¥Ð¡¼¤òLinphone¤Ç»È¤¦¤Ë¤Ï¡¢¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤«¤éSIP¤Î¥¿¥Ö¤òÁªÂò¤·¡¢¡ÖSIP¥¢¥É¥ì¥¹¤òÅÐÏ¿¤¹¤ë¡×¤Î¥Ü¥Ã¥¯¥¹¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£ÅÐÏ¿¤¹¤ë¥¢¥É¥ì¥¹¤ò
+ŬÀڤʥե£¡¼¥ë¥É¤ËÆþÎϤ·¤¿¤é¡¢¼¡¤Ë¡¢Å¾Á÷¤«¥×¥í¥¯¥·¤«¡¢Âбþ¤¹¤ë¥Ü¥Ã¥¯¥¹¤ò¥Á¥§¥Ã¥¯¤·¡¢ÅÐÏ¿¤òÍ׵᤹¤ë¥µ¡¼¥Ó¥¹¤Î¥¿¥¤¥×¤òÁªÂò¤¹¤ë¡£¤Þ¤¿¡¢³°Éô¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤Ø²ñÏäòÆ©
+²á¤µ¤»¤ë¤¿¤á¤ÎÅÐÏ¿¥µ¡¼¥Ð¡¼¤¬É¬ÍפʤȤ­¤Ë¤Ï¡¢¡Ö¥¢¥¦¥È¥Ð¥¦¥ó¥É¥×¥í¥¯¥·¤È¤·¤Æ»È¤¦¡×¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£
+\layout Standard
+
+ºÇ¸å¤Ë¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤ÎOK¥Ü¥¿¥ó¤ò²¡¤¹¤È¡¢¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤ÏÊĤ¸¤é¤ì¡¢¤¿¤À¤Á¤ËÅÐÏ¿¥µ¡¼¥Ð¡¼¤Ë¤¢¤Ê¤¿¤ÎÀµ³Î¤Ê¾ì½ê¤òÃΤ餻¤ë¤¿¤á¤Î¸ò¾Ä¤¬»Ï¤Þ¤ë¡£Linph
+one¤ò¥·¥ã¥Ã¥È¥À¥¦¥ó¤¹¤ë¤È¤­¤Ë¤Ï¡¢ÅÐÏ¿¥µ¡¼¥Ð¡¼¤«¤é¤¢¤Ê¤¿¤Î¾ì½ê¤ÎÅÐÏ¿¤ò²ò½ü¤¹¤ë¤¿¤á¡¢¿ôÉô֤«¤«¤ë¡£
+\layout Standard
+
+¥Ñ¥Ö¥ê¥Ã¥¯¤ÊÅÐÏ¿¥µ¡¼¥Ð¡¼¤Î¥ê¥¹¥È¤Ï¡¢°Ê²¼¤Ë·ÇºÜ¤µ¤ì¤Æ¤¤¤ë¡£
+\begin_inset LatexCommand \url[http://www.cs.columbia.edu/~hgs/sip/servers.html]{http://www.cs.columbia.edu/~hgs/sip/servers.html}
+
+\end_inset 
+
+
+\layout Standard
+
+¤À¤¬¡¢»ÄÇ°¤Ê¤³¤È¤Ë¡¢¤³¤ì¤é¤Î¥µ¡¼¥Ð¡¼¤Î¿¤¯¤Ï¤â¤¦Æ°¤¤¤Æ¤¤¤Ê¤¤¡£¤ª¤½¤é¤¯¡¢¶áº¢¤ÎÅŵ¤ÄÌ¿®¶È³¦¤Î´íµ¡¤Ë¤è¤ë¤â¤Î¤Ç¤¢¤í¤¦¡£Â¾¤ÎɬÍפȤµ¤ì¤ëǧ¾ÚÊýË¡¤Ï¡¢¸½ºßLinpho
+ne¤Ç¤Ï¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
+\layout Standard
+
+̵ÍѤʼê´Ö¤òÈò¤±¤¿¤¤¤È¤­¤Ë¤Ï¡¢»ÈÍѲÄǽ¤ÊÆ°ºî¤·¤Æ¤¤¤ë¥Ñ¥Ö¥ê¥Ã¥¯¤ÊSIP¥µ¡¼¥Ð¡¼¤Î¥ê¥¹¥È¤¬¡¢Linphoe¤Î°ÊÁ°¤ÎWEB¥µ¥¤¥È¤Î¥ê¥¹¥È¤¬
+\begin_inset LatexCommand \url[http://simon.morlat.free.fr/english/servers.html]{http://simon.morlat.free.fr/english/servers.html}
+
+\end_inset 
+
+¤Ç»²¾È¤Ç¤­¤ë¡£
+\layout Section
+
+¥Õ¥¡¥¤¥ä¡¼¥¦¥©¡¼¥ë¤ÎÆ⦤Ç
+\layout Standard
+
+¸½ºß¤Ç¤Ï¡¢SIP¥×¥í¥¯¥·¤òÍѤ¤¤ë¤³¤È¤Ç¡¢Linphone¤Ï¥Õ¥¡¥¤¥ä¡¼¥¦¥©¡¼¥ë¤ÎÆ⦤ÇÍøÍѲÄǽ¤Ç¤¢¤ë¡£SIP¥µ¡¼¥Ð¡¼¤Ï¡¢¥×¥é¥¤¥Ù¡¼¥È¥Í¥Ã¥È¥ï¡¼¥¯¤«¤é¤Î²ñÏäò³°Éô¤Î
+¥Í¥Ã¥È¥ï¡¼¥¯¤ØžÁ÷¤¹¤ëǤ¤òÉ餦¡£oSIP¥é¥¤¥Ö¥é¥ê¤òÍøÍѤ·¤¿SIP¥×¥í¥¯¥·¤Ï¡¢
+\begin_inset LatexCommand \url[http://osipproxy.sourceforge.net]{http://osipproxy.sourceforge.net}
+
+\end_inset 
+
+¤Ç³«È¯¤µ¤ì¤Æ¤¤¤ë¡£
+\layout Standard
+
+SIP¤ÎÀá¤Î¡¢¡ÖSIP¤ËÅÐÏ¿¤¹¤ë¡×¤Î¹àÌܤò»²¹Í¤Ë¡¢¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤ÇÍѤ¤¤ëSIP¥×¥í¥¯¥·¤ò»ØÄꤷ¤ÆÍߤ·¤¤¡£ÀßÄꤹ¤ë¤Ë¤Ï¡¢SIP¥×¥í¥¯¥·¤Î¥¢¥É¥ì¥¹¤òÆþÎϤ·¡¢¡Ö
+¥¢¥¦¥È¥Ð¥¦¥ó¥É¥×¥í¥¯¥·¤È¤·¤ÆÅÐÏ¿¤¹¤ë¡×¤Î¥Ü¥¿¥ó¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£
+\layout Standard
+
+¤Ê¤ª¡¢SIP¥×¥í¥¯¥·¤¬É¬Íפʤ¤¾ì¹ç¤â¤¢¤ë¡£¥Ñ¥Ö¥ê¥Ã¥¯¥¢¥É¥ì¥¹¤ò»ý¤Ã¤Æ¤¤¤ë¥Í¥Ã¥È¥ï¡¼¥¯²¼¤Ë¤¢¤Ê¤¿¤Î¥³¥ó¥Ô¥å¡¼¥¿¡¼¤¬¤¢¤ê¡¢¥Õ¥¡¥¤¥ä¡¼¥¦¥©¡¼¥ë¤Ï³°Éô¥Í¥Ã¥È¥ï¡¼¥¯¤«¤é¤Î
+¥Ñ¥±¥Ã¥È¤ÎÁ÷¼õ¿®¤ò¥Õ¥£¥ë¥¿¡¼¤¹¤ë¤À¤±¤Î¾ì¹ç¤Ç¤¢¤ë¡£¤³¤Î¾ì¹ç¤Ë¤Ï¡¢¥Õ¥¡¥¤¥ä¡¼¥¦¥©¡¼¥ë¤Î¥Þ¥·¥ó¤ÎSIP¤ÈRTP¤Î¥Ý¡¼¥È¤ò¥ª¡¼¥×¥ó¤¹¤ë¤À¤±¤Ç¤è¤¤¡£SIP¥Ý¡¼¥È¤Ï¥×¥í¥Ñ
+¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤ÎSIP¤Î¥¿¥Ö¤Ë¡¢RTP¥Ý¡¼¥È¤Ï¡¢RTP¥Ý¡¼¥È¤ÏRTP¤Î¥¿¥Ö¤Ë¤¢¤ë¡£Î¾¼Ô¤È¤â¤ËÊѹ¹²Äǽ¤Ç¤¢¤ë¤¬¡¢SIP¥Ý¡¼¥È(5060ÈÖ)¤Ï¡¢Êѹ¹¤·¤Ê¤¤¤Ç¤ª¤¯¤³¤È
+¤¬¶¯¤¯¿ä¾©¤µ¤ì¤ë¡£
+\layout Section
+
+º¤¤Ã¤¿¤È¤­¤Ë¤Ï
+\layout Subsection
+
+Àܳ¾å¤Ë¤ª¤±¤ëÌäÂê
+\layout Quotation
+
+»ä¤Ï¡¢Í§¿Í<sip:toto@example.com>¤ËÅÅÏäò¤«¤±¤è¤¦¤È¤·¤¿¤À¤¬¡¢¤Ê¤Ë¤âµ¯¤­¤Ê¤¤¡£¥Ù¥ë¤âÌĤé¤Ê¤¤¡¢¤Þ¤Ã¤¿¤¯²¿¤âµ¯¤³¤é¤Ê¤¤¡£
+\layout Standard
+
+Linphone¤¬»ÈÍѤ·¤Æ¤¤¤ë¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤ØÀܳ¤·¤Æ¤¤¤ë¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹(¤Þ¤¿¤Ï¡¢²ñÏ䬽ФƤ¤¤¯¤Ù¤­¥Í¥Ã¥È¥ï¡¼¥¯)¤ò¸¡¾Ú¤·¤Æ¤ß¤ë¤Ù¤­¤Ç¤¢¤í¤¦¡£¥×¥í
+¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤Î¡¢¥Í¥Ã¥È¥ï¡¼¥¯¥¿¥Ö¤«¤é¡¢Àµ¤·¤¤¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤òÁª¤ó¤Ç¤ß¤ë¤Î¤¬¤è¤¤¤À¤í¤¦¡£
+\layout Standard
+
+¤¢¤ë¤¤¤Ï¡¢¤¢¤Ê¤¿¤¬Àܳ¤·¤è¤¦¤È¤·¤Æ¤¤¤ë¿Í¤¬¡¢¸½ºß·ÐÏ©¤¬Àܳ¤Ç¤­¤Ê¤¤¾õ¶·¤Ë¤¢¤ë¤Î¤«¤âÃΤì¤Ê¤¤¡Ä¡Ä¡£
+\layout Subsection
+
+²»À¼¤Ë¤ª¤±¤ëÌäÂê
+\layout Quotation
+
+Linphone¤Ï¡¢¥ê¥â¡¼¥È¤ÎSIP URL¤ËÀܳ¤·¤Æ¤¤¤ë¤è¤¦¤Ç¡¢¥Ù¥ë¤ÏÌĤäƤ¤¤ë¤è¤¦¤À¡£¤±¤ì¤É¤â¡¢Áê¼ê¤¬ÅÅÏä˽Ф¿¤È¤­¤Ë¤Ï²¿¤âµ¯¤³¤é¤º¡¢¤ª¸ß¤¤¤ÎÀ¼¤¬Ê¹¤³¤¨¤Ê¤¤
+¡£
+\layout Itemize
+
+ÂçÄñ¤Î¿Í¤Ï¡¢¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤«¤é¡¢Àµ¤·¤¤¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤òÁª¤ó¤Ç¤¤¤Ê¤¤¤¿¤á¤Ë¡¢ÌäÂê¤òÀ¸¤¸¤µ¤»¤Æ¤·¤Þ¤¦¡£¥À¥¤¥ä¥ë¥¢¥Ã¥×Àܳ¤Ç¤Ï¡¢¡Öppp0¡×¤Ë¤Ê¤ë
+¤Ï¤º¤Ç¤¢¤ë¡£¡Ö\i \"{}
+lo¡×¤Ï¡¢¥Æ¥¹¥ÈÍѤˡ¢sipomatic¤À¤±¤Ë»ÈÍѤµ¤ì¤ë¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ç¤¢¤ë¤³¤È¤ËÃí°Õ¤µ¤ì¤¿¤¤¡£¤½¤Î¾¤Î¾ì¹ç¤Ç¤Ï µ¡Ç½¤·¤Ê¤¤¡£
+\layout Itemize
+
+¤Þ¤º¤Ï¡¢Á÷Ïò»Î̤ȼõÏò»Î̤ò¾å¤²¤Æ¤ß¤ë¤Î¤¬¤è¤¤¤À¤í¤¦¡£
+\layout Itemize
+
+²»À¼¤¬¤È¤®¤ì¤È¤®¤ì¤Ë¤Ê¤ë¾ì¹ç¤Ï¡¢¤³¤ì¤ò²óÈò¤¹¤ë¤¿¤á¤Ë¡¢¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤ÎRTP¥¿¥Ö¤Î¡Ö¥Ð¥Ã¥Õ¥¡¤¹¤ë¥ß¥êÉáפÎÃͤòÂ礭¤¯¤·¤Æ¤ß¤ë¤Î¤¬¤è¤¤¤À¤í¤¦¡£¤·¤«¤·¡¢¤³¤ì¤Ï
+ÄÌ¿®¤ÎÃÙ±ä¤òÁýÂ礵¤»¤ë¡£
+\layout Itemize
+
+Linphone¤¬¡¢¥ª¡¼¥Ç¥£¥ª¥Ç¥Ð¥¤¥¹¤ò¥ª¡¼¥×¥ó¤Ç¤­¤Ê¤¤¤È¤­¤Ë¤Ï¡¢/dev/dsp¤Î¥Ñ¡¼¥ß¥Ã¥·¥ç¥ó¤ò³Îǧ¤·¡¢¥ª¡¼¥Ç¥£¥ª¥Ç¥Ð¥¤¥¹¤ò»ÈÍѤ¹¤ë¤¹¤Ù¤Æ¤Î¥×¥í¥°¥é¥à(xm
+ms kaimanÅù)¤òÄä»ß¤¹¤ë¤Î¤¬¤è¤¤¤À¤í¤¦¡£
+\layout Itemize
+
+ALSA¥É¥é¥¤¥Ð¡¼¤ò»ÈÍѤ¹¤ë(
+\begin_inset LatexCommand \url[http://www.alsa-project.org]{http://www.alsa-project.org}
+
+\end_inset 
+
+¤ò»²¾È¤µ¤ì¤¿¤¤)¡£ÂçÄñ¤Î¥Ç¥£¥¹¥È¥ê¥Ó¥å¡¼¥¸¥ç¥ó¤Ï¡¢¤Þ¤À¸Å¤¤¥«¡¼¥Í¥ë¸øǧ¤Î¥É¥é¥¤¥Ð¡¼¤ò»ÈÍѤ·¤Æ¤¤¤ë¤¬¡¢¤³¤ì¤ÏÂ礭¤ÊÃÙ±ä¤È¿¤¯¤Î¥Ð¥°¤ò´Þ¤ó¤Ç¤¤¤ë¡£Linphone¤Ï
+¡¢ALSA¥É¥é¥¤¥Ð¡¼¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿¸å¤Î¥ê¥³¥ó¥Ñ¥¤¥ë¤òɬÍפȤ·¤Ê¤¤¤³¤È¡¢¤Þ¤¿¡¢¥ª¡¼¥Ç¥£¥ª¤ÎÀá¤Î¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤«¤é¤ÎALSA¥â¡¼¥É¤Ø¤ÎÊѹ¹¤Ïɬ¿Ü¤Ç¤Ï¤Ê¤¤¤³
+¤È¤â½Ò¤Ù¤Æ¤ª¤³¤¦¡£ 
+\layout Section
+
+¥Ð¥°Êó¹ð¤ÈÄó°Æ
+\layout Standard
+
+¤Þ¤º¤Ï¡¢Linphone¤Î¥Û¡¼¥à¥Ú¡¼¥¸
+\begin_inset LatexCommand \url[http://www.linphone.org]{http://www.linphone.org}
+
+\end_inset 
+
+¤«¤é¡¢ºÇ¿·¤ÎLinphone¤ò»ÈÍѤ·¤Æ¤¤¤ë¤«¤ò³Îǧ¤·¤ÆÍߤ·¤¤¡£ 
+\layout Standard
+
+¤â¤·¡¢Linphone¤¬¥¯¥é¥Ã¥·¥å¤·¤¿¤È¤­¤Ë¤Ï¡¢¥Ð¥°¥ì¥Ý¡¼¥È¤òľÀÜbugs@linphone.org¤Þ¤ÇÁ÷¤Ã¤ÆÍߤ·¤¤¡£¤â¤·¡¢¥¯¥é¥Ã¥·¥å¤Ï¤·¤Ê¤¤¤¬Linphone¤¬
+Æ°ºî¤·¤Ê¤¤¤È¤­¤Ë¤Ï¡¢¾å¤Î¥¢¥É¥ì¥¹¤Ë¥Ð¥°¥ì¥Ý¡¼¥È¤òÁ÷¤ëÁ°¤Ë¡¢¥Þ¥Ë¥å¥¢¥ë¤ò ¤â¤¦°ìÅÙÆɤߤ«¤¨¤·¤ÆÍߤ·¤¤¡£¤â¤·¡¢²¿¤«¤òÄó°Æ¤·¤¿¤¤¤È¤­¤Ë¤Ï¡¢±ó褻¤º¤Ë¡¢help@lin
+phone.org¤Þ¤Ç¥á¡¼¥ë¤òÁ÷¤Ã¤ÆÍߤ·¤¤¡£¤Ê¤ª¡¢¥Ó¥Ç¥ª¥µ¥Ý¡¼¥È¤È²ñµÄ¤Ï¡¢¾­Íè¤Î·×²è¤Ë¤¢¤ë¤³¤È¤ò½Ò¤Ù¤Æ¤ª¤³¤¦¡£¤Þ¤¿¡¢Linphonr¤ÎËÝÌõ¤Ë¶½Ì£¤ò»ý¤Ã¤¿¿Í¤Ï¡¢ÇÛÉÛ
+¤µ¤ì¤Æ¤¤¤ëpo/linpyhone.pot¤Ë´ð¤Å¤¤¤¿xx.po¥Õ¥¡¥¤¥ë¤ò»ä¤ËÁ÷¤Ã¤ÆÍߤ·¤¤¡£¤Þ¤¿¡¢¤³¤Î¥Þ¥Ë¥å¥¢¥ë¤ò¾¤Î¸À¸ì¤ËËÝÌõ¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¢¤ë¡£¤¤¤º¤ì¤Ë¤·¤Æ¤â¡¢
+¾Ü¤·¤¤¤³¤È¤¬ÃΤꤿ¤¤¤È¤­¤Ï»ä¤ËÏ¢Íí¤·¤ÆÍߤ·¤¤¡£
+\layout Section
+
+ºî¼Ô
+\layout Standard
+
+Simon MORLAT (simon.morlat@free.fr) ¤¬À½ºî¤·¤¿Éôʬ¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¢¤ë¡£
+\layout Itemize
+
+¥á¥¤¥ó¥×¥í¥°¥é¥à(src) 
+\layout Itemize
+
+RTP ¥é¥¤¥Ö¥é¥ê (lprtplib) 
+\layout Itemize
+
+osipua -- osip¥¹¥¿¥Ã¥¯¤Ë´ð¤Å¤¤¤¿¥æ¡¼¥¶¡¼¥¨¡¼¥¸¥§¥ó¥È¤ÎAPI¡£oss¤ÈALSA¥É¥é¥¤¥Ð¡¼¤Î²»À¼¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¡£
+\layout Itemize
+
+(²»À¼) lpc10-1.5ÍѤÎwrappers, gsm and g711 ¥³¡¼¥Ç¥Ã¥¯ 
+\layout Standard
+
+Aymeric Moizard (jack@atosc.org)¤Ï¡¢ Linphone¤¬ÍøÍѤ·¤Æ¤¤¤ëosip¥¹¥¿¥Ã¥¯¤òÀ½ºî¤·¤¿¡£
+\layout Standard
+
+GSM¥é¥¤¥Ö¥é¥ê¤Ï¡¢Jutta Degener¤ÈCarsten Bormann(Technische Universitaet Berlin)¤Ë¤è¤Ã¤Æ½ñ¤«¤ì¤¿¡£
+\layout Standard
+
+The LPC10-1.5 ¥é¥¤¥Ö¥é¥ê¤Ï¡¢Andy Fingerhut(Applied Research Laboratory)¤Ë¤è¤Ã¤Æ½ñ¤«¤ì¤¿¡£
+ <-- ¤³¤ÎÉôʬ¤Ï¥¹¥Ú¡¼¥¹¤ÎÅÔ¹ç¤Ë¤è¤ê¾Êά²Äǽ¤Ç¤¢¤ë¡£ Washington University, Campus Box 1045/Bryan
+ 509 ¥¹¥Ú¡¼¥¹¤Ë¸Â¤ê¤¬¤¢¤ë¾ì¹ç¤Ï¡¢¤³¤³¤«¤é¡£One Brookings Drive Saint Louis, MO 63130-4899 jaf@arl.wu
+stl.edu http://www.arl.wustl.edu/~jaf/¤µ¤é¤Ê¤ë¾ðÊó¤Ï¡¢gsmlib¤Èlpc10-1.5¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Î¥Æ¥­¥¹¥È¥Õ¥¡¥¤¥ë¤ò»²¾È¤µ¤ì¤¿¤¤
+¡£
+\layout Standard
+
+Pablo Marcelo Moia -- ¥¢¥¤¥³¥óÀ½ºî
+\layout Section
+
+¼Õ¼­
+\layout Standard
+
+GTK¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¥Ó¥ë¥À¡¼¤ÎDaemon Chaplin¤Ë´¶¼Õ¤ò¡£
+\layout Standard
+
+ÃøÌÀ¤ÊoSIP¥é¥¤¥Ö¥é¥ê¡¼¤ÎAymeric Moizard¤Ë´¶¼Õ¤ò¡£
+\layout Standard
+
+LPC10-1.5¤ÈGSM¥³¡¼¥É¤Îºî¼Ô¤Ë´¶¼Õ¤ò¡£
+\layout Standard
+
+RPM¤òÄ󶡤·¤Æ¤¯¤ì¤¿¡¢Joel Barrios ( jbarrios@-NO-SPAM-linuxparatodos.com )¤Ë´¶¼Õ¤ò¡£
+\layout Standard
+
+Linphone¤ËÁÇŨ¤Ê¥¢¥¤¥³¥ó¤òÄ󶡤·¤Æ¤¯¤ì¤¿¡¢Pablo Marcelo Moia¤Ë´¶¼Õ¤ò¡£
+\layout Standard
+
+
+\begin_inset LatexCommand \tableofcontents{}
+
+\end_inset 
+
+
+\the_end
diff --git a/share/ja/manual.sgml b/share/ja/manual.sgml
new file mode 100644 (file)
index 0000000..f36f0eb
--- /dev/null
@@ -0,0 +1,480 @@
+<!doctype article public "-//OASIS//DTD DocBook V3.1//EN">
+
+<article lang="en">
+<!-- DocBook file was created by LyX 1.1
+  See http://www.lyx.org/ for more information -->
+  <artheader>
+   <title>
+   LINPHONE¥æ¡¼¥¶¡¼¥Þ¥Ë¥å¥¢¥ë
+  </title>
+  <author>
+   Simon Morlat (simon.morlat@linphone.org)
+   Ìõ¡§»³¸ýÁ±Ìé(yushiya@anet.ne.jp)
+  </author>
+  <date>
+   11-13-2001
+  </date>
+  </artheader>
+  <sect1>
+   <title>
+   ¤Ï¤¸¤á¤Ë
+  </title>
+  <para>
+   Linphone¤Ï¡¢¥·¥ó¥×¥ë¤Ê¥¤¥ó¥¿¡¼¥Í¥Ã¥ÈÅÅÏäǤ¢¤ê¡¢Æó¼Ô´Ö¤ÎÄÌÏäò¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Ê¤É¤ÎIPÌÖ¤òÄ̤¸¤Æ²Äǽ¤Ë¤¹¤ë¤â¤Î¤Ç¤¢¤ë¡£Linphone¤òµ¯Æ°¤¹¤ë¤Ë¤Ï°Ê²¼¤Î¤â¤Î¤¬É¬ÍפȤʤ롣
+  </para>
+  <itemizedlist>
+   <listitem>
+   <para>
+   Linux(BSD¤Î¤è¤¦¤Ê¾¤ÎUNIX¤Ç¤âµ¯Æ°¤¹¤ë¤À¤í¤¦¤¬¡¢Linux´Ä¶­¤Û¤É¾¤Î´Ä¶­¤Ï¥Æ¥¹¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¡£) 
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   gnome1.2°Ê¾å¤¬¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¤³¤È¡£É¬¤º¤·¤âµ¯Æ°¤·¤Æ¤¤¤ëɬÍפϤʤ¤¡£
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   ¥Ø¥Ã¥É¥Û¥ó¤«¥¹¥Ô¡¼¥«¡¼¡£
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   ¥µ¥¦¥ó¥É¥«¡¼¥É¤¬Àµ¤·¤¯ÀßÄꤵ¤ì¤Æ¤¤¤ë¤³¤È¡£ 
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   ¥Þ¥¤¥¯¥í¥Õ¥©¥ó 
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   ¥â¥Ç¥à¤ä¥¤¡¼¥µ¥Í¥Ã¥ÈÅù¤òÍѤ¤¤¿¡¢¥Í¥Ã¥È¥ï¡¼¥¯(¥¤¥ó¥¿¡¼¥Í¥Ã¥ÈÅù)¤Ø¤ÎÀܳ¡£ 
+   </para>
+  </listitem>
+  </itemizedlist>
+  <para>
+   ¤Ê¤ª¡¢Linphone¤òµ¯Æ°¤¹¤ëÁ°¤Ë¥ª¡¼¥Ç¥£¥ª¥Ç¥Ð¥¤¥¹¤ò»ÈÍѤ¹¤ë¤¹¤Ù¤Æ¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ò½ªÎ»¤·¤Æ¤ª¤¯¤Î¤¬¤è¤¤¤À¤í¤¦¡£
+  </para>
+  <para>
+   Linphone¤Ï¥Õ¥ê¡¼¥¦¥§¥¢¤Ç¤¢¤ê¡¢GNU Public Licence¤Ë½¾¤Ã¤ÆÇÛÉÛ¤µ¤ì¤ë¡£
+  </para>
+  <para>
+   ·Ù¹ð - Åö¥½¥Õ¥È¥¦¥§¥¢¤ÏÊݾڤʤ·¤ËÄ󶡤µ¤ì¤ë¤â¤Î¤Ç¤¢¤ë¡£¾Ü¤·¤¯¤ÏCOPYING¥Õ¥¡¥¤¥ë¤ò»²¾È¤µ¤ì¤¿¤¤¡£¤Ê¤ª¡¢Linphone¤Ï°Å¹æ²½¤òÍѤ¤¤Ê¤¤¤¿¤á¡¢°­°Õ¤¢¤ë¿Íʪ¤¬Íưפ˲»À¼¾ðÊó¤ò½¦¤¦¤³¤È¤¬¤Ç¤­¤ë¡£¤Ä¤Þ¤ê¡¢Linphone¤ÏÈëÌ©¤Î²ñÏäËÍѤ¤¤ë¤Ù¤­¤Ç¤Ï¤Ê¤¤¡£¤Þ¤¿¡¢Linphone¤Ï¥ë¡¼¥È¸¢¸Â¤Çµ¯Æ°¤·¤Ê¤¤¿ä¾©¤¹¤ë¡£
+  </para>
+  </sect1>
+  <sect1>
+   <title>
+   Linphone¤Îµ¯Æ°
+  </title>
+  <para>
+   Linphone¤Ï»°¤Ä¤ÎÊýË¡¤Çµ¯Æ°¤Ç¤­¤ë¡£
+  </para>
+  <itemizedlist>
+   <listitem>
+   <para>
+   Ä̾ï¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤È¤·¤Æ - Linphone¤Ï¡¢gnome¥á¥Ë¥å¡¼¤ÎÃæ¤Î¥Í¥Ã¥È¥ï¡¼¥¯¥µ¥Ö¥á¥Ë¥å¡¼¤Ë¸½¤ì¤ë¡£¤â¤·¡¢gnome¤òµ¯Æ°¤·¤Æ¤Ê¤¤¤Î¤Ç¤¢¤ì¤Ð¡¢Î㤨¤Ð¥¿¡¼¥ß¥Ê¥ë¤Ë&ldquo;linphone&rdquo;¤È¥¿¥¤¥×¤¹¤ë¤³¤È¤Ç¼Â¹Ô¤Ç¤­¤ë¡£Linphone¤¬µ¯Æ°¤·¤Æ¤¤¤Ê¤¤¤È¤­¤Ï¡¢ÅÅÏäò¼õ¤±¤ë¤³¤È¤Ï¤Ç¤­¤Ê¤¤¡£ 
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   gnome¥¢¥×¥ì¥Ã¥È¤È¤·¤Æ - gnome¥Ñ¥Í¥ë¤ò±¦¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¢¥Ñ¥Í¥ë¤ËLinphone¤òÄɲ乤뤳¤È¤¬¤Ç¤­¤ë¡£Linphone¤Ï¥Í¥Ã¥È¡¼¥ï¡¼¥¯¥á¥Ë¥å¡¼¤ÎÃæ¤Ë¤¢¤ë¡£¤Ò¤Ã¤½¤ê¤È¥Ñ¥Í¥ë¤ÎÃæ¤Çµ¯Æ°¤¹¤ë¤³¤È¤Ç¡¢Linphone¤Ï¡¢¤¿¤È¤¨¥¦¥¤¥ó¥É¥¦¤¬¸½¤ì¤Æ¤¤¤Ê¤¯¤Æ¤âÅÅÏäò¼õ¤±¤ë¤³¤È¤¬¤Ç¤­¤ë¡£¥á¥¤¥ó¥¦¥¤¥ó¥É¥¦¤Ëɽ¼¨¤µ¤»¤¿¤¤¤È¤­¤Ë¤Ï¡¢¥¢¥×¥ì¥Ã¥È¤ò¥¯¥ê¥Ã¥¯¤¹¤ì¤Ð¤è¤¤¡£ÅÅÏ䬤«¤«¤Ã¤Æ¤­¤¿¤È¤­¤Ë¤Ï¡¢¥á¥¤¥ó¥¦¥¤¥ó¥É¥¦¤¬É½¤ì¤Æ¡¢Ä̾ïÄ̤ê¤Ë¥Ù¥ë¤¬ÌĤäƤ¤¤ë¤Î¤¬Ê¹¤³¤¨¤ë¤À¤í¤¦¡£ 
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   ¤Ò¤Ã¤½¤ê¤È¥Ç¡¼¥â¥ó¤È¤·¤Æ - ¤³¤ì¤Ï¡¢Èógnome¥æ¡¼¥¶¡¼¤Î¤¿¤á¤Î¤â¤Î¤Ç¤¢¤ë¡£Î㤨¤Ðkde¤Ç¤Ï¡¢/home/user/.kde2/AutoStart¥Ç¥£¥ì¥¯¥È¥ê¤Ë¡¢¥í¥°¥¤¥ó»þ¤Ëµ¯Æ°¤·¤¿¤¤¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î¥ê¥ó¥¯¤òŽ¤ë¡£¤·¤¿¤¬¤Ã¤Æ¡¢¾å½Ò¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ë¥Õ¥¡¥¤¥ë¥Þ¥Í¡¼¥¸¥ã¡¼¤Ç°ÜÆ°¤·¡¢±¦¥¯¥ê¥Ã¥¯¤Ç¸½¤ì¤ë¥¢¥×¥ì¥Ã¥È¤«¤é¡¢¡Ö¥ê¥ó¥¯¤ÎÄɲáפò¼Â¹Ô¤¹¤ì¤Ð¤è¤¤¡£¤Ê¤ª¡¢µ¯Æ°¤¹¤ë¥³¥Þ¥ó¥É¤Ï¡¢&ldquo; linphone -deamon&rdquo;¤Ç¤¢¤ë¡£¤³¤Î¾ì¹ç¡¢Linphone¤Î¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤ò¸«¤ë¤³¤È¤Ï¤Ê¤¤¤¬¡¢É½¼¨¤µ¤»¤¿¤¤¤È¤­¤Ë¤Ï¥¿¡¼¥ß¥Ê¥ëÅù¤«¤éLinphone¤òµ¯Æ°¤µ¤»¤ë¤Î¤ÈƱÍͤ˥¿¥¤¥×¤¹¤ì¤Ð¤è¤¤¡£ 
+   </para>
+  </listitem>
+  </itemizedlist>
+  </sect1>
+  <sect1>
+   <title>
+   ÅÅÏäò¤«¤±¤ë
+  </title>
+   <sect2>
+    <title>
+    ´ðËÜŪ¤Ê¸¶Â§
+   </title>
+   <para>
+    ¡Ösip:¥æ¡¼¥¶¡¼Ì¾@¥Û¥¹¥È̾¡×¤Î¤è¤¦¤ÊSIP URL¤Ë¤è¤Ã¤Æ¶èÊ̤µ¤ì¤ë¡£SIP URL¤Ï¡¢Æ¬¤Î¡Ösip:¡×¤ò½ü¤±¤ÐÈó¾ï¤Ëe-mail¥¢¥É¥ì¥¹¤È»÷¤Æ¤¤¤ë¡£
+   </para>
+   <para>
+    ¥æ¡¼¥¶¡¼Ì¾¤Ï¡¢UNIX¥Þ¥·¥ó¤Î¥í¥°¥¤¥ó¥Í¡¼¥à¤Î¤è¤¦¤Ê¤â¤Î¤Ç¡¢¥Û¥¹¥È̾¤Ï¥æ¡¼¥¶¡¼¤¬Àܳ¤¹¤ë¥Þ¥·¥ó¤Î̾Á°¤äIP¥¢¥É¥ì¥¹¤Ç¤¢¤ë¡£
+   </para>
+   <para>
+    ¤Ê¤ª¡¢SIP¤Ï¥·¥ó¥×¥ë¤ËÀ߷פµ¤ì¤¿¿·¤·¤¤ÄÌ¿®¤Î¥×¥í¥È¥³¥ë¤Ç¤¢¤ê¡¢H323¤È¤Ï¤Þ¤Ã¤¿¤¯¸ß´¹À­¤¬¤Ê¤¤¤³¤È¤ËÃí°Õ¤µ¤ì¤¿¤¤¡£
+   </para>
+   </sect2>
+   <sect2>
+    <title>
+    »ÈÍÑÎã:Æó¿Í¤Î¥æ¡¼¥¶¡¼¤¬¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Ë¥â¥Ç¥à¤ÇÀܳ¤·¤Æ¤¤¤ë¤È¤­
+   </title>
+   <para>
+    ¤³¤ì¤Ï¡¢Ã±½ã¤Ê¼ê³¤­¤Ç¤¢¤ë¡£É¬ÍפȤµ¤ì¤ë¥Í¥Ã¥È¥ï¡¼¥¯¤Ï¡¢
+   </para>
+   <itemizedlist>
+    <listitem>
+    <para>
+    28k°Ê¾å¤Î¥â¥Ç¥à 
+    </para>
+   </listitem>
+   </itemizedlist>
+   <para>
+    ¤Ç¤¢¤ë¡£
+   </para>
+   <para>
+    ¥·¥Ê¥ê¥ª¤Ï¡¢°Ê²¼¤ÎÄ̤ê¤Ç¤¢¤ë¡£
+   </para>
+   <itemizedlist>
+    <listitem>
+    <para>
+    ¥Ü¥Ö¤Ï¥È¥à¤Ë21:00¤ËÅÅÏ乤뤳¤È¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£¥È¥à¤Ï¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Ëkppp¤ägppp¤äwmdial¤Ê¤É¤ÇÀܳ¤·¤Æ¤¤¤ë¡£ 
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    ¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤ËÀܳ¤·¤¿¤é¡¢¥Ü¥Ö¤ÏLinphone¤òµ¯Æ°¤Ç¤­¤ë¡£kppp¤ägppp¤Ê¤É¤ÎÅý·×¥Ü¥Ã¥¯¥¹¤ò³«¤¤¤Æ¡¢¥Ü¥Ö¤Ï¼«Ê¬¤ÎIP¥¢¥É¥ì¥¹¤òÃΤ뤳¤È¤¬¤Ç¤­¤ë¡£(/sbin/ifconfig¤ò»È¤ï¤Ê¤¯¤Æ¤â³Îǧ¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë)¡£ 
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    ¼¡¤Ë¡¢¥È¥à¤Ï¥Ü¥Ö¤Ë¡ÖËͤÎIP¥¢¥É¥ì¥¹¤Ï¡¢xxx.xxx.xxx.xxx¤À¤è¡£¡×¤È¤¤¤¦ÆâÍÆ ¤Îe¥á¡¼¥ë¤òÁ÷¤ë¡£ 
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    ¤½¤Î¤¹¤°¤¢¤È¤Ç¡¢¥È¥à¤Î²È¤ÎLinphone¤Î¥Ù¥ë¤¬ÌĤ롣¤½¤Î¤È¤­¡¢¥Ü¥Ö¤Ë¤â¸þ¤³¤¦¤Ç¥Ù¥ë¤¬ÌĤäƤ¤¤ë¤Î¤¬Ê¬¤«¤ë¤è¤¦¤Ë¥Ù¥ë¤Î²»¤¬Ê¹¤³¤¨¤ë¡£¤½¤³¤Ç¡¢¥È¥à¤¬ÅÅÏä˽Ф뤿¤á¤Ë¡ÖÅÅÏäò¤È¤ë¡×¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤À¤±¤Ç¤è¤¤¡£¤½¤¦¤¹¤ì¤Ð¡¢¸ß¤¤¤Ë²ñÏ䬤Ǥ­¤ë¤Ï¤º¤Ç¤¢¤ë¡£ 
+    </para>
+   </listitem>
+   </itemizedlist>
+   <para>
+    ÌäÂ꤬¤¢¤Ã¤¿¤é¡¢Âè4Àá¤ÎÌäÂê¤ò»²¾È¤·¤ÆÍߤ·¤¤¡£
+   </para>
+   </sect2>
+   <sect2>
+    <title>
+    ¥Æ¥¹¥È¤Î»î¹Ô - ¸½ºß(Î㤨¤Ð¿¼Ìë¤Ê¤É¤Ç)ÅÅÏäò¤«¤±¤ëͧ¿Í¤¬¤¤¤Ê¤¤¤¬¡¢Linphone¤¬ËÜÅö¤ËÆ°¤¤¤Æ¤¤¤ë¤«¤É¤¦¤«ÃΤꤿ¤¤¤È¤­
+   </title>
+   <para>
+    <anchor id="sipomatic" ></anchor>¥Ð¡¼¥¸¥ç¥ó3.0¤«¤é¤Ï¡¢Linphone¤Ë¤Ï¡Ösiptomatic¡×¤È¤¤¤¦¥×¥í¥°¥é¥à¤¬ÉÕ°¤·¤Æ¤¤¤ë¡£¤³¤ì¤Ï¡¢°Ê²¼¤Î¼ê½ç¤Ç»ÈÍѤǤ­¤ë¡£
+   </para>
+   <itemizedlist>
+    <listitem>
+    <para>
+    siptomatic¤ò¥¿¡¼¥ß¥Ê¥ë¤«¤éµ¯Æ°¤¹¤ë¡£siptomatic¤Ï¥°¥é¥Õ¥£¥«¥ë¥¤¥ó¥¿¡¼¥Õ¥§¥¤¥¹¤òÈ÷¤¨¤Æ¤¤¤Ê¤¤¤¬¡¢¶Ã¤«¤Ê¤¤¤ÇÍߤ·¤¤¡£Áê¸ßŪ¤Ê¤ä¤ê¤È¤ê¤ò¤¹¤ëɬÍפ¬¤Ê¤¤¤«¤é¤Ç¤¢¤ë¡£ 
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Linphone¤Î¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤Î¥¿¥Ö¤«¤é¡¢¡Ölo¡×¤ò¥Ç¥Õ¥©¥ë¥È¤Î¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ë·èÄꤷ¡¢Êѹ¹¤òOK¤ò¥¯¥ê¥Ã¥¯¤·¤ÆŬÍѤ¹¤ë¡£ 
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    ¡Ösip:robot@127.0.0.1:5064¡×¤È¤¤¤¦SIP URL¤ò¥á¥¤¥ó¥¦¥¤¥ó¥É¥¦¤ËÆþÎϤ¹¤ë¡£127.0.0.1¤Ï¡¢¤¢¤Ê¤¿¤Î¥³¥ó¥Ô¥å¡¼¥¿¡¼¤Î ¥í¡¼¥«¥ë¥¢¥É¥ì¥¹¤Ç¡¢robot¤Ïsipomatic¤ËÅÅÏäò¤«¤±¤ëºÝ¤Î̾Á°¤Ç¤¢¤ë¡£5064¥Ý¡¼¥È¤¬¡¢sipomatic¤ËÀܳ²Äǽ¤Ê¥Ý¡¼¥È¤Ç¤¢¤ë¡£Ä̾ï¤ÏÅÅÏäò¤«¤±¤ë¤Î¤Ë5060È֥ݡ¼¥È¤òÍѤ¤¤ë¤¬¡¢sipomatic¤ÏÎã³°¤Ç5064È֥ݡ¼¥È¤Çµ¯Æ°¤·¤Æ¤¤¤ë¡£¤³¤ì¤Ï¡¢Linphone¤¬¤¹¤Ç¤Ë5060È֥ݡ¼¥È(¤¹¤Ê¤ï¤Á¡¢¥Ý¡¼¥È¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¥Ç¥Õ¥©¥ë¥È¤Î¥Ý¡¼¥È¤È¤·¤Æ)¤Çµ¯Æ°¤·¤Æ¤¤¤ë¤«¤é¤Ç¤¢¤ê¡¢Æ±¤¸¥Ý¡¼¥È¤ò»È¤¦2¤Ä¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤òƱ»þ¤ËƱ¤¸¥³¥ó¥Ô¥å¡¼¥¿¡¼¤Çµ¯Æ°¤¹¤ë¤³¤È¤¬¤Ç¤­¤Ê¤¤¤«¤é¤Ç¤¢¤ë¡£
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    ¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¢¿ôÉøå¤Ësiptomatic¤¬¤¢¤Ê¤¿¤ÎÅÅÏäËÊÖÅú¤·¡¢Ã»¤¤¥¢¥Ê¥¦¥ó¥¹¤¬Ê¹¤³¤¨¤ë¤À¤í¤¦¡£ 
+    </para>
+   </listitem>
+   </itemizedlist>
+   </sect2>
+  </sect1>
+  <sect1 id="params">
+   <title>
+   ÅÅÏäΥѥé¥á¡¼¥¿¡¼
+  </title>
+   <sect2 id="paramnetwork">
+    <title>
+    ¥Í¥Ã¥È¥ï¡¼¥¯
+   </title>
+   <itemizedlist>
+    <listitem>
+    <para>
+    ¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Î¥ê¥¹¥È - ¤¢¤Ê¤¿¤Ï¡¢Linphone¤Ë»È¤¦¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤òÁª¤ÖɬÍפ¬¤¢¤ë¡£¤â¤·¡¢¥¤¥ó¥¿¡¼¥Í¥Ã¥È¾å¤Î狼¤ËÏ¢Íí¤ò¤·¤¿¤¤¤Î¤Ê¤é¡¢¤¢¤Ê¤¿¤Î¥³¥ó¥Ô¥å¡¼¥¿¡¼¤¬¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤ËÀܳ¤·¤Æ¤¤¤ë¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤òÁª¤Ö¤Ù¤­¤Ç¤¢¤ë¡£²¿¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤Ë¤â¤Ä¤Ê¤¬¤Ã¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢¡Ölo¡×¤È¸Æ¤Ð¤ì¤ë¥í¡¼¥«¥ë¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤À¤±¤¬¥ê¥¹¥È¤Ë¸½¤ì¤ë¤À¤í¤¦¡£¤½¤ì¤Ï¡¢siptomatic¤ËÅÅÏäò¤¹¤ë¤³¤È¤À¤±¤¬¤Ç¤­¤ë¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ç¤¢¤ë¡£ 
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Àܳ¤Î¥¿¥¤¥× - »È¤¤¤¿¤¤¥Í¥Ã¥È¥ï¡¼¥¯¤Ø¤ÎÀܳ¤ÎÊýË¡¤òÁªÂò¤¹¤ë(ÂçÄñ¤Î¾ì¹ç¤Ï¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Ç¤¢¤ë)¡£¤³¤ì¤Ï¡¢Linphone¤¬¤¢¤Ê¤¿¤ÎÂÓ°è¤òÀßÄꤹ¤ë¤Î¤òÊä½õ¤¹¤ë¤¿¤á¤Ç¤¢¤ë¡£ 
+    </para>
+   </listitem>
+   </itemizedlist>
+   </sect2>
+   <sect2 id="paramrtp">
+    <title>
+    RTP
+   </title>
+   <para>
+    RTP(Real Time Protocol)¤Ï¡¢¥á¥Ç¥£¥¢¥¹¥È¥ê¡¼¥à¤ò¥Í¥Ã¥È¥ï¡¼¥¯±Û¤·¤ËÁ÷¿®¤¹¤ëºÝ¤ËÍѤ¤¤ë¥×¥í¥È¥³¥ë¤Ç¤¢¤ë¡£
+   </para>
+   <itemizedlist>
+    <listitem>
+    <para>
+    RTP¥Ý¡¼¥È - Linphone¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤Ç²»À¼¥Ç¡¼¥¿¤ÎÁ÷¼õ¿®¤Ë7000È֥ݡ¼¥È¤òÍøÍѤ¹¤ë¡£7000È֥ݡ¼¥È¤¬Â¾¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ë»È¤ï¤ì¤Æ¤¤¤ë¤È»×¤ï¤ì¤ë¾ì¹ç¤Ë¤Ï¡¢Ç¤°Õ¤Î¥Ý¡¼¥È¤ËÊѹ¹¤¹¤ë¡£
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    ¥Ð¥Ã¥Õ¥¡¤¹¤ë¥ß¥êÉà- ¤³¤Î¿ô»ú¤Ï¡¢Linphone¤¬ºÆÀ¸¤òÂÔµ¡¤¹¤ë²»À¼¥Ñ¥±¥Ã¥È¤Î¿ô¤òɽ¤·¤Æ¤¤¤ë¡£²»À¼¥Ñ¥±¥Ã¥È¤¬Á÷¤ì¤¬¤Á¤Ê¾ì¹ç¤Ë¡¢ºÆÀ¸¤µ¤ì¤º¤ËÇË´þ¤µ¤ì¤ë²»À¼¥Ñ¥±¥Ã¥È¤ò¸º¤é¤¹¤³¤È¤¬¤Ç¤­¤ë¡£¡ÖÅÓÀÚ¤ìÅÓÀڤ첻¡×¤¬Ê¹¤³¤¨¤ë¾ì¹ç¡¢¤³¤ÎÃͤòÂ礭¤¯¤¹¤ë¤ÈÅÁÁ÷¤Î¸úΨ¤ò¾å¤²¤ë¤³¤È¤¬¤Ç¤­¤ë¤¬¡¢²»À¼¤ÎÃٱ䤬Â礭¤¯¤Ê¤ë(Áê¼ê¤ÎÀ¼¤¬¾¯¤·ÃÙ¤ì¤Æʹ¤³¤¨¤ë)¡£¤æ¤¨¤Ë¡¢¥Í¥Ã¥È¥ï¡¼¥¯¤¬´°Á´¤Ç¹âÉʼÁ¤Î¥ª¡¼¥Ç¥£¥ª¥É¥é¥¤¥Ð¤ò»ÈÍѤ·¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢¤³¤ÎÃͤò3¥Ñ¥±¥Ã¥È¤Ë²¼¤²¤ì¤Ðû¤¤ÃÙ±ä»þ´Ö¤ÇÏ令ë¤è¤¦¤Ë¤Ê¤ë¡£
+    </para>
+   </listitem>
+   </itemizedlist>
+   </sect2>
+   <sect2 id="paramsip">
+    <title>
+    SIP
+   </title>
+   <para>
+    SIP(Session Initiation Protocol)¤Ï¡¢¥Í¥Ã¥È¥ï¡¼¥¯±Û¤·¤Ë¥á¥Ç¥£¥¢¤Î¥»¥Ã¥·¥ç¥ó¤ò³ÎΩ¤¹¤ë¥×¥í¥È¥³¥ë¤Ç¤¢¤ë¡£¤Ä¤Þ¤ê¤Ï¡¢¥ê¥â¡¼¥È¥æ¡¼¥¶¡¼´Ö¤Î²ñÏäò³«»Ï¤·¤¿¤ê¡¢ÊÒÊý¤¬ÅÅÏäòÀڤ俤Ȥ­¤Ë²ñÏäò½ªÎ»¤·¤¿¤ê¤¹¤ë¥×¥í¥È¥³¥ë¤Ç¤¢¤ë¡£
+   </para>
+   <itemizedlist>
+    <listitem>
+    <para>
+    SIP¥Ý¡¼¥È - Linphone¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤ÇSIP¥Ñ¥±¥Ã¥È¤ÎÁ÷¼õ¿®¤Ë5060È֥ݡ¼¥È¤òÍѤ¤¤ë¡£SIP¤Î¥Ý¡¼¥È¤Ï¡¢RFC¤Ë5060ÈÖ¤òÍѤ¤¤ë¤³¤È¤¬¶¯¤¯¿ä¾©¤µ¤ì¤Æ¤¤¤ë¡£¤è¤Ã¤Æ¡¢²¿¤ò¤·¤¿¤¤¤Î¤«¤òÌÀ³Î¤ËÍý²ò¤·¤Æ¤¤¤ë¤È¤­¤ò½ü¤¤¤Æ¤Ï¡¢¤³¤ì¤òÊѹ¹¤¹¤Ù¤­¤Ç¤Ï¤Ê¤¤¡£
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    SIP¤ÎÅÐÏ¿¤Ë¤¹¤ë - ¥ê¥â¡¼¥È¤ÎSIP¥µ¡¼¥Ð¡¼¤ËÅÐÏ¿¤¹¤·¤¿¤¤¤È¤­¤Ë¤Ï¡¢¤³¤Î¥Ü¥¿¥ó¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£SIP¥µ¡¼¥Ð¡¼¤Î¥µ¡¼¥Ó¥¹¤Ë¤Ï¡¢Å¾Á÷¤ä¥¢¥¦¥È¥Ð¥¦¥ó¥É¥×¥í¥¯¥·¤¬¤¢¤ë¡£¾Ü¤·¤¯¤Ï¡¢¡Ö¥ê¥â¡¼¥È¤Î¥µ¡¼¥Ð¡¼¤ËÀܳ¤¹¤ë¡×¤ÎÀá¤ò»²¾È¤µ¤ì¤¿¤¤¡£ 
+    </para>
+   </listitem>
+   </itemizedlist>
+   </sect2>
+   <sect2 id="paramcodec">
+    <title>
+    ¥³¡¼¥Ç¥Ã¥¯
+   </title>
+   <para>
+    ¥³¡¼¥Ç¥Ã¥¯¤È¤Ï¡¢Æä˲»À¼¥Ç¡¼¥¿¤Î°µ½Ì¤Î¤¿¤á¤ËÀ߷פµ¤ì¤¿¥¢¥ë¥´¥ê¥º¥à¤Î¤³¤È¤ò¸À¤¦¡£Î㤨¤Ð¡¢16bit/8000Hz¤Î¥Ç¥¸¥¿¥ë²½¤µ¤ì¤¿²»À¼¤È¸À¤¨¤Ð¡¢128kbit/ÉäΥǡ¼¥¿¤Îή¤ì¤òɽ¤·¤Æ¤¤¤ë¡£GSM¥Ü¥³¡¼¥À¡¼¤ò»ÈÍѤ¹¤ë¤È¡¢¤³¤ì¤Ï13bit kbit/Éä˽̾®¤µ¤ì¤ë¡£
+   </para>
+   <itemizedlist>
+    <listitem>
+    <para>
+    ¥³¡¼¥Ç¥Ã¥¯¤ÎÁªÂò - Linphone¤Ï¿ô¼ïÎà¤Î¥³¡¼¥Ç¥Ã¥¯¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤ë¡£ ¥³¡¼¥Ç¥Ã¥¯¤Î¥ê¥¹¥È¤Î²¼Éô¤Ë¤¢¤ë¥Ü¥¿¥ó¤ò»È¤¦¤È¡¢»È¤¤¤¿¤¤½çÈÖ¤Ëʤ٤뤳¤È¤¬¤Ç¤­¤ë¡£¤À¤¬¡¢¥Í¥Ã¥È¥ï¡¼¥¯Àܳ¤Î¥¿¥¤¥×¤Ë¤è¤Ã¤Æ¤Ï(¥Í¥Ã¥È¥ï¡¼¥¯¤ÎÀá¤ò»²¾È)¡¢»È¤¨¤Ê¤¤¥³¡¼¥Ç¥Ã¥¯¤Î¼ïÎà¤â¡¢»ÈÍѤ¹¤ë¤«¤É¤¦¤«¤ò·èÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤ë¡£ 
+    </para>
+   </listitem>
+   </itemizedlist>
+   </sect2>
+   <sect2 id="paramaudio">
+    <title>
+    ¥ª¡¼¥Ç¥£¥ª¥Ñ¥é¥á¡¼¥¿¡¼
+   </title>
+   <para>
+    ¤³¤ÎÀá¤Ç¤Ï¡¢²»À¼µ»½Ñ¤Ë´Ø¤¹¤ë¥Ñ¥é¥á¡¼¥¿¡¼¤ò²òÀ⤹¤ë¡£
+   </para>
+   <itemizedlist>
+    <listitem>
+    <para>
+    ¥É¥é¥¤¥Ð¤ÎÁªÂò - Linux¤Ç¤Ï¡¢OSS(¥«¡¼¥Í¥ë¥É¥é¥¤¥Ð¡¼¤È¤â¸Æ¤Ð¤ì¤ë)¤ÈALSA¤È¡¢°Û¤Ê¤ë2¼ïÎà¤Î¥µ¥¦¥ó¥É¥«¡¼¥É¥é¥¤¥Ð¤ò»ÈÍѤ¹¤ë¤³¤È¤¬¤Ç¤­¤ë¤¬¡¢ALSA¥É¥é¥¤¥Ð¤ÏALSA¥é¥¤¥Ö¥é¥ê¤òÄ̤¹¤³¤È¤Ç¡¢¤µ¤é¤Ê ¤ë¥Ñ¥Õ¥©¡¼¥Þ¥ó¥¹¤òȯ´ø¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£¤·¤¿¤¬¤Ã¤Æ¡¢ALSA¥É¥é¥¤¥Ð¡¼(snd_*¤Ç»Ï¤Þ¤ë̾Á°¤Ç¤¢¤ë)¤ò»ÈÍѤ·¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢ALSA¥â¡¼¥É¤òÁªÂò¤¹¤ë¤Î¤¬¤è¤¤¡£Ê¬¤«¤é¤Ê¤±¤ì¤Ð¡¢OSS¤òÁªÂò¤¹¤ë¡£
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Auto-kill¥ª¥×¥·¥ç¥ó - ¤³¤Î¥ª¥×¥·¥ç¥ó¤ò»È¤¦¤È¡¢linphone¤Ï¥µ¥¦¥ó¥É¥Ç¡¼¥â¥ó(esd¤Èartsd)¤òÄä»ß¤·¤è¤¦¤È¤¹¤ë¡£¤³¤ì¤Ï¡¢¥ª¡¼¥Ç¥£¥ª¥Ç¥Ð¥¤¥¹¤Ë¹±µ×Ū¤Ê¼è¤ê³°¤»¤Ê¤¤¥í¥Ã¥¯¤ò¤«¤±¤Æ¤·¤Þ¤¤¡¢Linphone¤¬É¬ÍפȤ·¤Æ¤¤¤ë¥ª¡¼¥Ç¥£¥ª¥Ç¥Ð¥¤¥¹¤ò¥ª¡¼¥×¥ó¤µ¤»¤Ê¤¤¤è¤¦¤Ë¤¹¤ë¤â¤Î¤Ç¤¢¤ë¡¢¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï¡¢¥ª¥ó¤Ë¤·¤Æ¤ª¤¯¤³¤È¤ò¿ä¾©¤¹¤ë¡£ 
+    </para>
+   </listitem>
+   </itemizedlist>
+   </sect2>
+  </sect1>
+  <sect1>
+   <title>
+   ÅÅÏÃÄ¢
+  </title>
+  <para>
+   ÅÅÏÃÄ¢(conection¤Î¥á¥Ë¥å¡¼¤ÎÃæ¤Ë¤¢¤ë)¤ò»È¤¦¤È¡¢SIP¥¢¥É¥ì¥¹¤òµ­²±¤È¸Æ½Ð¤·¤¬¤Ç¤­¤ë¡£SIP¥¢¥É¥ì¥¹¤Ï¡¢sip:¥æ¡¼¥¶¡¼Ì¾@¥É¥á¥¤¥ó̾¤Î·Á¼°¤Ç¤¢¤ë¡£¤Þ¤¿¡¢¼«Ê¬¤¬Ê¬¤«¤ê¤ä¤¹¤¯¤¹¤ë¤¿¤á¤Ë¡¢É½¼¨¤µ¤ì¤ë̾Á°¤òÄɲ乤뤳¤È¤â¤Ç¤­¤ë¡£SIP¥¢¥É¥ì¥¹¤ò¸Æ¤Ó½Ð¤¹¤Ë¤Ï¡¢¥¢¥É¥ì¥¹¤Î¥ê¥¹¥È¤«¤éÁªÂò¤·¡¢¡ÖOK¡×¤Î¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¡£¤¹¤ë¤È¡¢ÁªÂò¤·¤¿¥¢¥É¥ì¥¹¤¬¥á¥¤¥ó¥¦¥¤¥ó¥É¥¦¤Ë¸½¤ì¤ë¤Î¤¬³Îǧ¤Ç¤­¤ë¤À¤í¤¦¡£¸å¤Ï¡¢ÅÅÏäò¤«¤±¤ë¤¿¤á¤Ë¡ÖÅÅÏäò¤«¤±¤ë¡×¤Î¥Ü¥¿¥ó¤ò²¡¤»¤Ð¤è¤¤¤À¤±¤Ç¤¢¤ë¡£
+  </para>
+  </sect1>
+  <sect1>
+   <title>
+   SIP¥µ¡¼¥Ð¡¼¤ËÅÐÏ¿¤¹¤ë
+  </title>
+  <para>
+   ¥ê¥â¡¼¥È¤ÎSIP¥µ¡¼¥Ð¡¼¤Î¥µ¡¼¥Ó¥¹¤ËÅÐÏ¿¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¢¤ë¡£¤³¤Î¤è¤¦¤Ê¥µ¡¼¥Ó¥¹¤Ë¤Ï¡¢°Ê²¼¤Î¤è¤¦¤Ê¤â¤Î¤¬¤¢¤ë¡£
+  </para>
+  <itemizedlist>
+   <listitem>
+   <para>
+   Å¾Á÷ - Linphon¤Ï¡¢¥µ¡¼¥Ð¡¼¤Ë&lt;sip:example_registrar.com&gt;¤Î¤è¤¦¤ÊSIP¥¢¥«¥¦¥ó¥È¤òºîÀ®¤¹¤ë¤è¤¦Í×ÀÁ¤¹¤ë¡£Î㤨¤Ð¡¢56k¤Î¥â¥Ç¥à¤ò»È¤Ã¤Æñ½ã¤Ë¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤ËÀܳ¤·¤Æ¤¤¤ë¾ì¹ç¡¢¤¢¤Ê¤¿¤ÎIP¥¢¥É¥ì¥¹¤ÏÀÅŪ¤Ç¤Ï¤Ê¤¯¡¢¥Í¡¼¥à¥µ¡¼¥Ð¡¼¤ËÃΤé¤ì¤Æ¤¤¤ë¥Û¥¹¥È̾¤â»ý¤Ã¤Æ¤¤¤Ê¤¤¡£¤³¤ì¤Ç¤Ï¡¢Í§Ã£¤Ï¤¢¤Ê¤¿¤¬IP¥¢¥É¥ì¥¹¤òÄÌÃΤ¹¤ë¥á¡¼¥ë¤òÁ÷¤é¤Ê¤¤¸Â¤ê¡¢¤¢¤Ê¤¿¤ËÏ¢Íí¤ò¤¹¤ë¤³¤È¤¬¤Ç¤­¤Ê¤¤¡£Îã¤È¤·¤Æ¡¢&lt;sip:example_registrar.com&gt;¤ËÅÐÏ¿¤ò¹Ô¤¦¤Î¤Ï´Êñ¤Ç¤¢¤ë¡£¤¢¤Ê¤¿¤Î¥æ¡¼¥¶¡¼Ì¾¤Ï¡Öbob¡×¤À¤È¤¹¤ë¡£¥µ¡¼¥Ð¡¼¤ËÅÐÏ¿¤¹¤ëºÝ¤Ë¡¢Linphone¤Ï¤¢¤Ê¤¿¤ÎIP¥¢¥É¥ì¥¹¤ò¥µ¡¼¥Ð¡¼¤ËÁ÷¿®¤·¡¢¥¢¥«¥¦¥ó¥È¡Ösip:bob@example_registrar.com¡×¤¬ºîÀ®¤µ¤ì¤ë¡£¤½¤¦¤¹¤ë¤È¡¢¤¢¤Ê¤¿¤Îͧã¤Î¥¸¥à¤Ï¡¢&lt;sip:bob@example_registrar.com&gt;¤È¤¤¤¦¥¢¥É¥ì¥¹¤ËÅÅÏäò¤«¤±¤ë¤³¤È¤¬¤Ç¤­¤ë¡£ÅöÁ³¤Î¤³¤È¤Ê¤¬¤é¡¢&ldquo;example_registar.com&rdquo;¤Ï¡¢¥¦¥§¥ë¥Î¥ó¡¦¥É¥á¥¤¥ó¥Í¡¼¥à¤Ç¤¢¤ë¡£¼¡¤Ë¡¢¥¸¥à¤ÎLinphone¤Ï¥Ü¥Ö¤Î³Î¼Â¤Ê¥í¥±¡¼¥·¥ç¥ó¤ò¼¨¤¹Å¾Á÷¥á¥Ã¥»¡¼¥¸¤ò¼õ¤±¼è¤ë¡£¤½¤¦¤·¤Æ¡¢¥Ü¥Ö¤Î²È¤Ç¥Ù¥ë¤¬ÌĤë¤Î¤Ç¤¢¤ë¡£
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   ¥×¥í¥¯¥· - ¤³¤ì¤â¡¢Å¾Á÷¥á¥Ã¥»¡¼¥¸¤¬¥¸¥à¤ÎÅÅÏäËÁ÷¿®¤µ¤ì¤Ê¤¤¤³¤È¤ò¤Î¤¾¤±¤Ð¡¢Æ±Íͤθ¶Íý¤Ç¤¢¤ë¡£¤½¤ÎÂå¤ï¤ê¤Ë¡¢¥×¥í¥¯¥·¤Ï¥Ü¥Ö¤ÎLinphone¤Þ¤Ç¥À¥¤¥ì¥¯¥È¤ÊžÁ÷¤ò¹Ô¤¦¡£ 
+   </para>
+  </listitem>
+  </itemizedlist>
+  <para>
+   ¤³¤Î¤è¤¦¤ÊÅÐÏ¿¤Ï¡¢¥¢¥¦¥È¥Ð¥¦¥ó¥É¥×¥í¥¯¥·¤Ë¤ª¤¤¤Æ¤âƱÍͤ˹Ԥï¤ì¤ë¡£¤³¤ì¤Ï¡¢Linphone¤ò¥Õ¥¡¥¤¥ä¡¼¥¦¥©¡¼¥ë¤ÎÃæ¤Ç»È¤¦¤È¤­¤ËÍ­¸ú¤Ç¤¢¤ë¡£¥¢¥¦¥È¥Ð¥¦¥ó¥É¥×¥í¥¯¥·¤Ï¡¢¥×¥é¥¤¥Ù¡¼¥È¥µ¥Ö¥Í¥Ã¥È¤Ë¤¢¤ëHTTP¥×¥í¥¯¥·¤ÈƱÍͤÎÌò³ä¤ò²Ì¤¿¤¹¡£³°Éô¤Ø¤Î²ñÏäϥ¢¥¦¥È¥Ð¥¦¥ó¥É¥×¥í¥¯¥·¤¬°·¤¤¡¢¥Í¥Ã¥È¥ï¡¼¥¯³°¤Ë¤¤¤ë¤È»×¤ï¤ì¤ë¿Í¤Ø¤Î²ñÏäΞÁ÷¤ÎǤ¤òÉ餦¡£
+  </para>
+  <para>
+   ÅÐÏ¿¥µ¡¼¥Ð¡¼¤òLinphone¤Ç»È¤¦¤Ë¤Ï¡¢¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤«¤éSIP¤Î¥¿¥Ö¤òÁªÂò¤·¡¢¡ÖSIP¥¢¥É¥ì¥¹¤òÅÐÏ¿¤¹¤ë¡×¤Î¥Ü¥Ã¥¯¥¹¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£ÅÐÏ¿¤¹¤ë¥¢¥É¥ì¥¹¤òŬÀڤʥե£¡¼¥ë¥É¤ËÆþÎϤ·¤¿¤é¡¢¼¡¤Ë¡¢Å¾Á÷¤«¥×¥í¥¯¥·¤«¡¢Âбþ¤¹¤ë¥Ü¥Ã¥¯¥¹¤ò¥Á¥§¥Ã¥¯¤·¡¢ÅÐÏ¿¤òÍ׵᤹¤ë¥µ¡¼¥Ó¥¹¤Î¥¿¥¤¥×¤òÁªÂò¤¹¤ë¡£¤Þ¤¿¡¢³°Éô¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤Ø²ñÏäòÆ©²á¤µ¤»¤ë¤¿¤á¤ÎÅÐÏ¿¥µ¡¼¥Ð¡¼¤¬É¬ÍפʤȤ­¤Ë¤Ï¡¢¡Ö¥¢¥¦¥È¥Ð¥¦¥ó¥É¥×¥í¥¯¥·¤È¤·¤Æ»È¤¦¡×¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£
+  </para>
+  <para>
+   ºÇ¸å¤Ë¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤ÎOK¥Ü¥¿¥ó¤ò²¡¤¹¤È¡¢¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤ÏÊĤ¸¤é¤ì¡¢¤¿¤À¤Á¤ËÅÐÏ¿¥µ¡¼¥Ð¡¼¤Ë¤¢¤Ê¤¿¤ÎÀµ³Î¤Ê¾ì½ê¤òÃΤ餻¤ë¤¿¤á¤Î¸ò¾Ä¤¬»Ï¤Þ¤ë¡£Linphone¤ò¥·¥ã¥Ã¥È¥À¥¦¥ó¤¹¤ë¤È¤­¤Ë¤Ï¡¢ÅÐÏ¿¥µ¡¼¥Ð¡¼¤«¤é¤¢¤Ê¤¿¤Î¾ì½ê¤ÎÅÐÏ¿¤ò²ò½ü¤¹¤ë¤¿¤á¡¢¿ôÉô֤«¤«¤ë¡£
+  </para>
+  <para>
+   ¥Ñ¥Ö¥ê¥Ã¥¯¤ÊÅÐÏ¿¥µ¡¼¥Ð¡¼¤Î¥ê¥¹¥È¤Ï¡¢°Ê²¼¤Ë·ÇºÜ¤µ¤ì¤Æ¤¤¤ë¡£<ulink url="http://www.cs.columbia.edu/~hgs/sip/servers.html">http://www.cs.columbia.edu/~hgs/sip/servers.html</ulink>
+  </para>
+  <para>
+   ¤À¤¬¡¢»ÄÇ°¤Ê¤³¤È¤Ë¡¢¤³¤ì¤é¤Î¥µ¡¼¥Ð¡¼¤Î¿¤¯¤Ï¤â¤¦Æ°¤¤¤Æ¤¤¤Ê¤¤¡£¤ª¤½¤é¤¯¡¢¶áº¢¤ÎÅŵ¤ÄÌ¿®¶È³¦¤Î´íµ¡¤Ë¤è¤ë¤â¤Î¤Ç¤¢¤í¤¦¡£Â¾¤ÎɬÍפȤµ¤ì¤ëǧ¾ÚÊýË¡¤Ï¡¢¸½ºßLinphone¤Ç¤Ï¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
+  </para>
+  <para>
+   ÌµÍѤʼê´Ö¤òÈò¤±¤¿¤¤¤È¤­¤Ë¤Ï¡¢»ÈÍѲÄǽ¤ÊÆ°ºî¤·¤Æ¤¤¤ë¥Ñ¥Ö¥ê¥Ã¥¯¤ÊSIP¥µ¡¼¥Ð¡¼¤Î¥ê¥¹¥È¤¬¡¢Linphoe¤Î°ÊÁ°¤ÎWEB¥µ¥¤¥È¤Î¥ê¥¹¥È¤¬<ulink url="http://simon.morlat.free.fr/english/servers.html">http://simon.morlat.free.fr/english/servers.html</ulink>¤Ç»²¾È¤Ç¤­¤ë¡£
+  </para>
+  </sect1>
+  <sect1>
+   <title>
+   ¥Õ¥¡¥¤¥ä¡¼¥¦¥©¡¼¥ë¤ÎÆ⦤Ç
+  </title>
+  <para>
+   ¸½ºß¤Ç¤Ï¡¢SIP¥×¥í¥¯¥·¤òÍѤ¤¤ë¤³¤È¤Ç¡¢Linphone¤Ï¥Õ¥¡¥¤¥ä¡¼¥¦¥©¡¼¥ë¤ÎÆ⦤ÇÍøÍѲÄǽ¤Ç¤¢¤ë¡£SIP¥µ¡¼¥Ð¡¼¤Ï¡¢¥×¥é¥¤¥Ù¡¼¥È¥Í¥Ã¥È¥ï¡¼¥¯¤«¤é¤Î²ñÏäò³°Éô¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤ØžÁ÷¤¹¤ëǤ¤òÉ餦¡£oSIP¥é¥¤¥Ö¥é¥ê¤òÍøÍѤ·¤¿SIP¥×¥í¥¯¥·¤Ï¡¢<ulink url="http://osipproxy.sourceforge.net">http://osipproxy.sourceforge.net</ulink>¤Ç³«È¯¤µ¤ì¤Æ¤¤¤ë¡£
+  </para>
+  <para>
+   SIP¤ÎÀá¤Î¡¢¡ÖSIP¤ËÅÐÏ¿¤¹¤ë¡×¤Î¹àÌܤò»²¹Í¤Ë¡¢¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤ÇÍѤ¤¤ëSIP¥×¥í¥¯¥·¤ò»ØÄꤷ¤ÆÍߤ·¤¤¡£ÀßÄꤹ¤ë¤Ë¤Ï¡¢SIP¥×¥í¥¯¥·¤Î¥¢¥É¥ì¥¹¤òÆþÎϤ·¡¢¡Ö¥¢¥¦¥È¥Ð¥¦¥ó¥É¥×¥í¥¯¥·¤È¤·¤ÆÅÐÏ¿¤¹¤ë¡×¤Î¥Ü¥¿¥ó¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£
+  </para>
+  <para>
+   ¤Ê¤ª¡¢SIP¥×¥í¥¯¥·¤¬É¬Íפʤ¤¾ì¹ç¤â¤¢¤ë¡£¥Ñ¥Ö¥ê¥Ã¥¯¥¢¥É¥ì¥¹¤ò»ý¤Ã¤Æ¤¤¤ë¥Í¥Ã¥È¥ï¡¼¥¯²¼¤Ë¤¢¤Ê¤¿¤Î¥³¥ó¥Ô¥å¡¼¥¿¡¼¤¬¤¢¤ê¡¢¥Õ¥¡¥¤¥ä¡¼¥¦¥©¡¼¥ë¤Ï³°Éô¥Í¥Ã¥È¥ï¡¼¥¯¤«¤é¤Î¥Ñ¥±¥Ã¥È¤ÎÁ÷¼õ¿®¤ò¥Õ¥£¥ë¥¿¡¼¤¹¤ë¤À¤±¤Î¾ì¹ç¤Ç¤¢¤ë¡£¤³¤Î¾ì¹ç¤Ë¤Ï¡¢¥Õ¥¡¥¤¥ä¡¼¥¦¥©¡¼¥ë¤Î¥Þ¥·¥ó¤ÎSIP¤ÈRTP¤Î¥Ý¡¼¥È¤ò¥ª¡¼¥×¥ó¤¹¤ë¤À¤±¤Ç¤è¤¤¡£SIP¥Ý¡¼¥È¤Ï¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤ÎSIP¤Î¥¿¥Ö¤Ë¡¢RTP¥Ý¡¼¥È¤Ï¡¢RTP¥Ý¡¼¥È¤ÏRTP¤Î¥¿¥Ö¤Ë¤¢¤ë¡£Î¾¼Ô¤È¤â¤ËÊѹ¹²Äǽ¤Ç¤¢¤ë¤¬¡¢SIP¥Ý¡¼¥È(5060ÈÖ)¤Ï¡¢Êѹ¹¤·¤Ê¤¤¤Ç¤ª¤¯¤³¤È¤¬¶¯¤¯¿ä¾©¤µ¤ì¤ë¡£
+  </para>
+  </sect1>
+  <sect1>
+   <title>
+   º¤¤Ã¤¿¤È¤­¤Ë¤Ï
+  </title>
+   <sect2>
+    <title>
+    Àܳ¾å¤Ë¤ª¤±¤ëÌäÂê
+   </title>
+   <blockquote>
+   <para>
+    »ä¤Ï¡¢Í§¿Í&lt;sip:toto@example.com&gt;¤ËÅÅÏäò¤«¤±¤è¤¦¤È¤·¤¿¤À¤¬¡¢¤Ê¤Ë¤âµ¯¤­¤Ê¤¤¡£¥Ù¥ë¤âÌĤé¤Ê¤¤¡¢¤Þ¤Ã¤¿¤¯²¿¤âµ¯¤³¤é¤Ê¤¤¡£
+   </para>
+   </blockquote>
+   <para>
+    Linphone¤¬»ÈÍѤ·¤Æ¤¤¤ë¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤ØÀܳ¤·¤Æ¤¤¤ë¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹(¤Þ¤¿¤Ï¡¢²ñÏ䬽ФƤ¤¤¯¤Ù¤­¥Í¥Ã¥È¥ï¡¼¥¯)¤ò¸¡¾Ú¤·¤Æ¤ß¤ë¤Ù¤­¤Ç¤¢¤í¤¦¡£¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤Î¡¢¥Í¥Ã¥È¥ï¡¼¥¯¥¿¥Ö¤«¤é¡¢Àµ¤·¤¤¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤òÁª¤ó¤Ç¤ß¤ë¤Î¤¬¤è¤¤¤À¤í¤¦¡£
+   </para>
+   <para>
+    ¤¢¤ë¤¤¤Ï¡¢¤¢¤Ê¤¿¤¬Àܳ¤·¤è¤¦¤È¤·¤Æ¤¤¤ë¿Í¤¬¡¢¸½ºß·ÐÏ©¤¬Àܳ¤Ç¤­¤Ê¤¤¾õ¶·¤Ë¤¢¤ë¤Î¤«¤âÃΤì¤Ê¤¤¡Ä¡Ä¡£
+   </para>
+   </sect2>
+   <sect2>
+    <title>
+    ²»À¼¤Ë¤ª¤±¤ëÌäÂê
+   </title>
+   <blockquote>
+   <para>
+    Linphone¤Ï¡¢¥ê¥â¡¼¥È¤ÎSIP URL¤ËÀܳ¤·¤Æ¤¤¤ë¤è¤¦¤Ç¡¢¥Ù¥ë¤ÏÌĤäƤ¤¤ë¤è¤¦¤À¡£¤±¤ì¤É¤â¡¢Áê¼ê¤¬ÅÅÏä˽Ф¿¤È¤­¤Ë¤Ï²¿¤âµ¯¤³¤é¤º¡¢¤ª¸ß¤¤¤ÎÀ¼¤¬Ê¹¤³¤¨¤Ê¤¤¡£
+   </para>
+   </blockquote>
+   <itemizedlist>
+    <listitem>
+    <para>
+    ÂçÄñ¤Î¿Í¤Ï¡¢¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤«¤é¡¢Àµ¤·¤¤¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤òÁª¤ó¤Ç¤¤¤Ê¤¤¤¿¤á¤Ë¡¢ÌäÂê¤òÀ¸¤¸¤µ¤»¤Æ¤·¤Þ¤¦¡£¥À¥¤¥ä¥ë¥¢¥Ã¥×Àܳ¤Ç¤Ï¡¢¡Öppp0¡×¤Ë¤Ê¤ë¤Ï¤º¤Ç¤¢¤ë¡£¡Ö\"{}lo¡×¤Ï¡¢¥Æ¥¹¥ÈÍѤˡ¢sipomatic¤À¤±¤Ë»ÈÍѤµ¤ì¤ë¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ç¤¢¤ë¤³¤È¤ËÃí°Õ¤µ¤ì¤¿¤¤¡£¤½¤Î¾¤Î¾ì¹ç¤Ç¤Ï µ¡Ç½¤·¤Ê¤¤¡£
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    ¤Þ¤º¤Ï¡¢Á÷Ïò»Î̤ȼõÏò»Î̤ò¾å¤²¤Æ¤ß¤ë¤Î¤¬¤è¤¤¤À¤í¤¦¡£
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    ²»À¼¤¬¤È¤®¤ì¤È¤®¤ì¤Ë¤Ê¤ë¾ì¹ç¤Ï¡¢¤³¤ì¤ò²óÈò¤¹¤ë¤¿¤á¤Ë¡¢¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤ÎRTP¥¿¥Ö¤Î¡Ö¥Ð¥Ã¥Õ¥¡¤¹¤ë¥ß¥êÉáפÎÃͤòÂ礭¤¯¤·¤Æ¤ß¤ë¤Î¤¬¤è¤¤¤À¤í¤¦¡£¤·¤«¤·¡¢¤³¤ì¤ÏÄÌ¿®¤ÎÃÙ±ä¤òÁýÂ礵¤»¤ë¡£
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    Linphone¤¬¡¢¥ª¡¼¥Ç¥£¥ª¥Ç¥Ð¥¤¥¹¤ò¥ª¡¼¥×¥ó¤Ç¤­¤Ê¤¤¤È¤­¤Ë¤Ï¡¢/dev/dsp¤Î¥Ñ¡¼¥ß¥Ã¥·¥ç¥ó¤ò³Îǧ¤·¡¢¥ª¡¼¥Ç¥£¥ª¥Ç¥Ð¥¤¥¹¤ò»ÈÍѤ¹¤ë¤¹¤Ù¤Æ¤Î¥×¥í¥°¥é¥à(xmms kaimanÅù)¤òÄä»ß¤¹¤ë¤Î¤¬¤è¤¤¤À¤í¤¦¡£
+    </para>
+   </listitem>
+    <listitem>
+    <para>
+    ALSA¥É¥é¥¤¥Ð¡¼¤ò»ÈÍѤ¹¤ë(<ulink url="http://www.alsa-project.org">http://www.alsa-project.org</ulink>¤ò»²¾È¤µ¤ì¤¿¤¤)¡£ÂçÄñ¤Î¥Ç¥£¥¹¥È¥ê¥Ó¥å¡¼¥¸¥ç¥ó¤Ï¡¢¤Þ¤À¸Å¤¤¥«¡¼¥Í¥ë¸øǧ¤Î¥É¥é¥¤¥Ð¡¼¤ò»ÈÍѤ·¤Æ¤¤¤ë¤¬¡¢¤³¤ì¤ÏÂ礭¤ÊÃÙ±ä¤È¿¤¯¤Î¥Ð¥°¤ò´Þ¤ó¤Ç¤¤¤ë¡£Linphone¤Ï¡¢ALSA¥É¥é¥¤¥Ð¡¼¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿¸å¤Î¥ê¥³¥ó¥Ñ¥¤¥ë¤òɬÍפȤ·¤Ê¤¤¤³¤È¡¢¤Þ¤¿¡¢¥ª¡¼¥Ç¥£¥ª¤ÎÀá¤Î¥×¥í¥Ñ¥Æ¥£¡¼¥Ü¥Ã¥¯¥¹¤«¤é¤ÎALSA¥â¡¼¥É¤Ø¤ÎÊѹ¹¤Ïɬ¿Ü¤Ç¤Ï¤Ê¤¤¤³¤È¤â½Ò¤Ù¤Æ¤ª¤³¤¦¡£ 
+    </para>
+   </listitem>
+   </itemizedlist>
+   </sect2>
+  </sect1>
+  <sect1>
+   <title>
+   ¥Ð¥°Êó¹ð¤ÈÄó°Æ
+  </title>
+  <para>
+   ¤Þ¤º¤Ï¡¢Linphone¤Î¥Û¡¼¥à¥Ú¡¼¥¸<ulink url="http://www.linphone.org">http://www.linphone.org</ulink>¤«¤é¡¢ºÇ¿·¤ÎLinphone¤ò»ÈÍѤ·¤Æ¤¤¤ë¤«¤ò³Îǧ¤·¤ÆÍߤ·¤¤¡£ 
+  </para>
+  <para>
+   ¤â¤·¡¢Linphone¤¬¥¯¥é¥Ã¥·¥å¤·¤¿¤È¤­¤Ë¤Ï¡¢¥Ð¥°¥ì¥Ý¡¼¥È¤òľÀÜbugs@linphone.org¤Þ¤ÇÁ÷¤Ã¤ÆÍߤ·¤¤¡£¤â¤·¡¢¥¯¥é¥Ã¥·¥å¤Ï¤·¤Ê¤¤¤¬Linphone¤¬Æ°ºî¤·¤Ê¤¤¤È¤­¤Ë¤Ï¡¢¾å¤Î¥¢¥É¥ì¥¹¤Ë¥Ð¥°¥ì¥Ý¡¼¥È¤òÁ÷¤ëÁ°¤Ë¡¢¥Þ¥Ë¥å¥¢¥ë¤ò ¤â¤¦°ìÅÙÆɤߤ«¤¨¤·¤ÆÍߤ·¤¤¡£¤â¤·¡¢²¿¤«¤òÄó°Æ¤·¤¿¤¤¤È¤­¤Ë¤Ï¡¢±ó褻¤º¤Ë¡¢help@linphone.org¤Þ¤Ç¥á¡¼¥ë¤òÁ÷¤Ã¤ÆÍߤ·¤¤¡£¤Ê¤ª¡¢¥Ó¥Ç¥ª¥µ¥Ý¡¼¥È¤È²ñµÄ¤Ï¡¢¾­Íè¤Î·×²è¤Ë¤¢¤ë¤³¤È¤ò½Ò¤Ù¤Æ¤ª¤³¤¦¡£¤Þ¤¿¡¢Linphonr¤ÎËÝÌõ¤Ë¶½Ì£¤ò»ý¤Ã¤¿¿Í¤Ï¡¢ÇÛÉÛ¤µ¤ì¤Æ¤¤¤ëpo/linpyhone.pot¤Ë´ð¤Å¤¤¤¿xx.po¥Õ¥¡¥¤¥ë¤ò»ä¤ËÁ÷¤Ã¤ÆÍߤ·¤¤¡£¤Þ¤¿¡¢¤³¤Î¥Þ¥Ë¥å¥¢¥ë¤ò¾¤Î¸À¸ì¤ËËÝÌõ¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¢¤ë¡£¤¤¤º¤ì¤Ë¤·¤Æ¤â¡¢¾Ü¤·¤¤¤³¤È¤¬ÃΤꤿ¤¤¤È¤­¤Ï»ä¤ËÏ¢Íí¤·¤ÆÍߤ·¤¤¡£
+  </para>
+  </sect1>
+  <sect1>
+   <title>
+   ºî¼Ô
+  </title>
+  <para>
+   Simon MORLAT (simon.morlat@free.fr) ¤¬À½ºî¤·¤¿Éôʬ¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¢¤ë¡£
+  </para>
+  <itemizedlist>
+   <listitem>
+   <para>
+   ¥á¥¤¥ó¥×¥í¥°¥é¥à(src) 
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   RTP ¥é¥¤¥Ö¥é¥ê (lprtplib) 
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   osipua -- osip¥¹¥¿¥Ã¥¯¤Ë´ð¤Å¤¤¤¿¥æ¡¼¥¶¡¼¥¨¡¼¥¸¥§¥ó¥È¤ÎAPI¡£oss¤ÈALSA¥É¥é¥¤¥Ð¡¼¤Î²»À¼¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¡£
+   </para>
+  </listitem>
+   <listitem>
+   <para>
+   (²»À¼) lpc10-1.5ÍѤÎwrappers, gsm and g711 ¥³¡¼¥Ç¥Ã¥¯ 
+   </para>
+  </listitem>
+  </itemizedlist>
+  <para>
+   Aymeric Moizard (jack@atosc.org)¤Ï¡¢ Linphone¤¬ÍøÍѤ·¤Æ¤¤¤ëosip¥¹¥¿¥Ã¥¯¤òÀ½ºî¤·¤¿¡£
+  </para>
+  <para>
+   GSM¥é¥¤¥Ö¥é¥ê¤Ï¡¢Jutta Degener¤ÈCarsten Bormann(Technische Universitaet Berlin)¤Ë¤è¤Ã¤Æ½ñ¤«¤ì¤¿¡£
+  </para>
+  <para>
+   The LPC10-1.5 ¥é¥¤¥Ö¥é¥ê¤Ï¡¢Andy Fingerhut(Applied Research Laboratory)¤Ë¤è¤Ã¤Æ½ñ¤«¤ì¤¿¡£ &lt;-- ¤³¤ÎÉôʬ¤Ï¥¹¥Ú¡¼¥¹¤ÎÅÔ¹ç¤Ë¤è¤ê¾Êά²Äǽ¤Ç¤¢¤ë¡£ Washington University, Campus Box 1045/Bryan 509 ¥¹¥Ú¡¼¥¹¤Ë¸Â¤ê¤¬¤¢¤ë¾ì¹ç¤Ï¡¢¤³¤³¤«¤é¡£One Brookings Drive Saint Louis, MO 63130-4899 jaf@arl.wustl.edu http://www.arl.wustl.edu/&tilde;jaf/¤µ¤é¤Ê¤ë¾ðÊó¤Ï¡¢gsmlib¤Èlpc10-1.5¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Î¥Æ¥­¥¹¥È¥Õ¥¡¥¤¥ë¤ò»²¾È¤µ¤ì¤¿¤¤¡£
+  </para>
+  <para>
+   Pablo Marcelo Moia -- ¥¢¥¤¥³¥óÀ½ºî
+  </para>
+  </sect1>
+  <sect1>
+   <title>
+   ¼Õ¼­
+  </title>
+  <para>
+   GTK¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¥Ó¥ë¥À¡¼¤ÎDaemon Chaplin¤Ë´¶¼Õ¤ò¡£
+  </para>
+  <para>
+   ÃøÌÀ¤ÊoSIP¥é¥¤¥Ö¥é¥ê¡¼¤ÎAymeric Moizard¤Ë´¶¼Õ¤ò¡£
+  </para>
+  <para>
+   LPC10-1.5¤ÈGSM¥³¡¼¥É¤Îºî¼Ô¤Ë´¶¼Õ¤ò¡£
+  </para>
+  <para>
+   RPM¤òÄ󶡤·¤Æ¤¯¤ì¤¿¡¢Joel Barrios ( jbarrios@-NO-SPAM-linuxparatodos.com )¤Ë´¶¼Õ¤ò¡£
+  </para>
+  <para>
+   Linphone¤ËÁÇŨ¤Ê¥¢¥¤¥³¥ó¤òÄ󶡤·¤Æ¤¯¤ì¤¿¡¢Pablo Marcelo Moia¤Ë´¶¼Õ¤ò¡£
+  </para>
+  <para>
+   <toc></toc>
+  </para>
+  </sect1>
+
+
+</article>
diff --git a/share/linphone.desktop b/share/linphone.desktop
new file mode 100644 (file)
index 0000000..09e1104
--- /dev/null
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Linphone
+Comment=Linphone is a web-phone
+Comment[fr]=Linphone est un web-phone.
+Comment[de]=Linphone ist ein web-phone.
+Type=Application
+Exec=linphone-3
+Icon=linphone/linphone2.png
+Terminal=false
+Categories=Application;Network;
\ No newline at end of file
diff --git a/share/linphone.gnorba b/share/linphone.gnorba
new file mode 100644 (file)
index 0000000..b9e5059
--- /dev/null
@@ -0,0 +1,5 @@
+[linphone_applet]
+type=exe
+repo_id=IDL:GNOME/Applet:1.0
+description=Linphone is a web phone.
+location_info=linphone --applet
\ No newline at end of file
diff --git a/share/linphone.pc.in b/share/linphone.pc.in
new file mode 100644 (file)
index 0000000..f44eb23
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Requires: mediastreamer ortp
+Name: liblinphone
+Description: All in one linphone libs.
+Version: @VERSION@
+Libs: @LINPHONE_LIBS@
+Cflags: @LINPHONE_CFLAGS@
diff --git a/share/linphone_applet.desktop b/share/linphone_applet.desktop
new file mode 100644 (file)
index 0000000..4840327
--- /dev/null
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Linphone Applet
+Comment=Linphone is a web-phone
+Comment[fr]=Linphone est un web-phone.
+Comment[de]=Linphone ist ein web-phone.
+Type=Application
+Exec=linphone --applet --activate-goad-server=linphone_applet
+Icon=linphone/linphone2.png
+Terminal=0
\ No newline at end of file
diff --git a/share/ringback.wav b/share/ringback.wav
new file mode 100644 (file)
index 0000000..21f4b5b
Binary files /dev/null and b/share/ringback.wav differ
diff --git a/share/rings/bigben.wav b/share/rings/bigben.wav
new file mode 100644 (file)
index 0000000..f1ba850
Binary files /dev/null and b/share/rings/bigben.wav differ
diff --git a/share/rings/oldphone.wav b/share/rings/oldphone.wav
new file mode 100644 (file)
index 0000000..e3056cc
Binary files /dev/null and b/share/rings/oldphone.wav differ
diff --git a/share/rings/orig.wav b/share/rings/orig.wav
new file mode 100644 (file)
index 0000000..af74b54
Binary files /dev/null and b/share/rings/orig.wav differ
diff --git a/share/rings/rock.wav b/share/rings/rock.wav
new file mode 100644 (file)
index 0000000..12374c0
Binary files /dev/null and b/share/rings/rock.wav differ
diff --git a/share/rings/sweet.wav b/share/rings/sweet.wav
new file mode 100644 (file)
index 0000000..e514548
Binary files /dev/null and b/share/rings/sweet.wav differ
diff --git a/share/rings/synth.wav b/share/rings/synth.wav
new file mode 100644 (file)
index 0000000..7142f7a
Binary files /dev/null and b/share/rings/synth.wav differ
diff --git a/share/rings/tapping.wav b/share/rings/tapping.wav
new file mode 100644 (file)
index 0000000..862fd79
Binary files /dev/null and b/share/rings/tapping.wav differ
diff --git a/share/rings/toy.wav b/share/rings/toy.wav
new file mode 100644 (file)
index 0000000..7a51984
Binary files /dev/null and b/share/rings/toy.wav differ
diff --git a/stamp-h.in b/stamp-h.in
new file mode 100644 (file)
index 0000000..9788f70
--- /dev/null
@@ -0,0 +1 @@
+timestamp